@purpurds/tooltip 8.8.0 → 8.9.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/chunked-rush-logs/tooltip.test_unit.chunks.jsonl +5 -5
- package/.rush/temp/ci_build/@purpurds/tooltip/{1e9da9fa56ef5e203e7d1bacd2cc18d380799863.untar.log → 96f33c9303bbc08028c37d3be4fbf8051111750a.untar.log} +2 -2
- package/.rush/temp/operation/ci_build/all.log +5 -5
- package/.rush/temp/operation/ci_build/log-chunks.jsonl +5 -5
- package/.rush/temp/operation/ci_build/state.json +1 -1
- package/.rush/temp/operation/test_unit/all.log +5 -5
- package/.rush/temp/operation/test_unit/log-chunks.jsonl +5 -5
- package/.rush/temp/operation/test_unit/state.json +1 -1
- package/.rush/temp/shrinkwrap-deps.json +116 -135
- package/dist/LICENSE.txt +4 -4
- package/dist/tooltip.cjs.js +1 -21
- package/dist/tooltip.cjs.js.map +1 -1
- package/dist/tooltip.es.js +609 -649
- package/dist/tooltip.es.js.map +1 -1
- package/package.json +23 -23
package/dist/tooltip.es.js
CHANGED
|
@@ -1,23 +1,17 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as be, jsx as x, Fragment as Ln } from "react/jsx-runtime";
|
|
2
2
|
import * as f from "react";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
3
|
+
import { forwardRef as St, useLayoutEffect as Mn, useState as $n, Children as kn } from "react";
|
|
4
|
+
import * as Tt from "react-dom";
|
|
5
|
+
import Fn from "react-dom";
|
|
6
|
+
const In = {
|
|
7
7
|
LG: "lg"
|
|
8
8
|
};
|
|
9
|
-
function
|
|
9
|
+
function Hn(e) {
|
|
10
10
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
11
11
|
}
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Licensed under the MIT License (MIT), see
|
|
16
|
-
http://jedwatson.github.io/classnames
|
|
17
|
-
*/
|
|
18
|
-
var ut;
|
|
19
|
-
function Yn() {
|
|
20
|
-
return ut || (ut = 1, (function(e) {
|
|
12
|
+
var rt = { exports: {} }, ot;
|
|
13
|
+
function jn() {
|
|
14
|
+
return ot || (ot = 1, (function(e) {
|
|
21
15
|
(function() {
|
|
22
16
|
var t = {}.hasOwnProperty;
|
|
23
17
|
function n() {
|
|
@@ -46,33 +40,33 @@ function Yn() {
|
|
|
46
40
|
}
|
|
47
41
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
48
42
|
})();
|
|
49
|
-
})(
|
|
43
|
+
})(rt)), rt.exports;
|
|
50
44
|
}
|
|
51
|
-
var
|
|
52
|
-
const
|
|
45
|
+
var Wn = jn();
|
|
46
|
+
const Bn = /* @__PURE__ */ Hn(Wn), zn = "_rotate_12t9p_1", Vn = "_dash_12t9p_1", Un = {
|
|
53
47
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
54
|
-
rotate:
|
|
48
|
+
rotate: zn,
|
|
55
49
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
56
50
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
57
51
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
58
52
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
59
53
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
60
54
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
61
|
-
dash:
|
|
55
|
+
dash: Vn,
|
|
62
56
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
63
57
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
64
|
-
},
|
|
58
|
+
}, it = Bn.bind(Un), fe = "purpur-spinner", Yn = {
|
|
65
59
|
SM: "sm"
|
|
66
|
-
},
|
|
60
|
+
}, Nt = ({
|
|
67
61
|
disabled: e = !1,
|
|
68
62
|
negative: t = !1,
|
|
69
|
-
size: n =
|
|
63
|
+
size: n = Yn.SM,
|
|
70
64
|
className: o,
|
|
71
65
|
...i
|
|
72
|
-
}) => /* @__PURE__ */ x("div", { className:
|
|
66
|
+
}) => /* @__PURE__ */ x("div", { className: it(fe, `${fe}--${n}`, o), ...i, children: /* @__PURE__ */ x("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ x(
|
|
73
67
|
"circle",
|
|
74
68
|
{
|
|
75
|
-
className:
|
|
69
|
+
className: it(`${fe}__circle`, {
|
|
76
70
|
[`${fe}__circle--disabled`]: e,
|
|
77
71
|
[`${fe}__circle--negative`]: t
|
|
78
72
|
}),
|
|
@@ -81,19 +75,13 @@ const Gn = /* @__PURE__ */ Un(qn), Xn = "_rotate_12t9p_1", Zn = "_dash_12t9p_1",
|
|
|
81
75
|
r: "20"
|
|
82
76
|
}
|
|
83
77
|
) }) });
|
|
84
|
-
|
|
85
|
-
function
|
|
78
|
+
Nt.displayName = "Spinner";
|
|
79
|
+
function qn(e) {
|
|
86
80
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
87
81
|
}
|
|
88
|
-
var
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
Licensed under the MIT License (MIT), see
|
|
92
|
-
http://jedwatson.github.io/classnames
|
|
93
|
-
*/
|
|
94
|
-
var dt;
|
|
95
|
-
function er() {
|
|
96
|
-
return dt || (dt = 1, (function(e) {
|
|
82
|
+
var st = { exports: {} }, at;
|
|
83
|
+
function Gn() {
|
|
84
|
+
return at || (at = 1, (function(e) {
|
|
97
85
|
(function() {
|
|
98
86
|
var t = {}.hasOwnProperty;
|
|
99
87
|
function n() {
|
|
@@ -122,10 +110,10 @@ function er() {
|
|
|
122
110
|
}
|
|
123
111
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
124
112
|
})();
|
|
125
|
-
})(
|
|
113
|
+
})(st)), st.exports;
|
|
126
114
|
}
|
|
127
|
-
var
|
|
128
|
-
const
|
|
115
|
+
var Xn = Gn();
|
|
116
|
+
const Zn = /* @__PURE__ */ qn(Xn), Kn = {
|
|
129
117
|
"purpur-button": "_purpur-button_10jh0_1",
|
|
130
118
|
"purpur-button--xs": "_purpur-button--xs_10jh0_22",
|
|
131
119
|
"purpur-button--icon-only": "_purpur-button--icon-only_10jh0_25",
|
|
@@ -148,9 +136,9 @@ const nr = /* @__PURE__ */ Qn(tr), rr = {
|
|
|
148
136
|
"purpur-button--text-negative": "_purpur-button--text-negative_10jh0_185",
|
|
149
137
|
"purpur-button--text": "_purpur-button--text_10jh0_185",
|
|
150
138
|
"purpur-button__spinner": "_purpur-button__spinner_10jh0_235"
|
|
151
|
-
},
|
|
139
|
+
}, Jn = {
|
|
152
140
|
TERTIARY_PURPLE: "tertiary-purple"
|
|
153
|
-
},
|
|
141
|
+
}, ct = Zn.bind(Kn), Z = "purpur-button", Dt = St(
|
|
154
142
|
({
|
|
155
143
|
children: e,
|
|
156
144
|
className: t,
|
|
@@ -167,7 +155,7 @@ const nr = /* @__PURE__ */ Qn(tr), rr = {
|
|
|
167
155
|
}, h) => {
|
|
168
156
|
if (i && c === "destructive")
|
|
169
157
|
return null;
|
|
170
|
-
const d =
|
|
158
|
+
const d = ct(
|
|
171
159
|
[
|
|
172
160
|
Z,
|
|
173
161
|
`${Z}--${s ? `${c}-negative` : c}`,
|
|
@@ -183,7 +171,7 @@ const nr = /* @__PURE__ */ Qn(tr), rr = {
|
|
|
183
171
|
), m = (v) => {
|
|
184
172
|
n || r ? v.preventDefault() : a && a(v);
|
|
185
173
|
}, g = !!p["aria-disabled"] || n || r;
|
|
186
|
-
return /* @__PURE__ */
|
|
174
|
+
return /* @__PURE__ */ be(
|
|
187
175
|
"button",
|
|
188
176
|
{
|
|
189
177
|
className: d,
|
|
@@ -194,12 +182,12 @@ const nr = /* @__PURE__ */ Qn(tr), rr = {
|
|
|
194
182
|
...p,
|
|
195
183
|
children: [
|
|
196
184
|
r && /* @__PURE__ */ x(
|
|
197
|
-
|
|
185
|
+
Nt,
|
|
198
186
|
{
|
|
199
|
-
size: l ===
|
|
187
|
+
size: l === In.LG ? "xs" : "xxs",
|
|
200
188
|
negative: s,
|
|
201
189
|
disabled: g,
|
|
202
|
-
className:
|
|
190
|
+
className: ct(`${Z}__spinner`)
|
|
203
191
|
}
|
|
204
192
|
),
|
|
205
193
|
" ",
|
|
@@ -209,19 +197,13 @@ const nr = /* @__PURE__ */ Qn(tr), rr = {
|
|
|
209
197
|
);
|
|
210
198
|
}
|
|
211
199
|
);
|
|
212
|
-
|
|
213
|
-
function
|
|
200
|
+
Dt.displayName = "Button";
|
|
201
|
+
function Qn(e) {
|
|
214
202
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
215
203
|
}
|
|
216
|
-
var
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
Licensed under the MIT License (MIT), see
|
|
220
|
-
http://jedwatson.github.io/classnames
|
|
221
|
-
*/
|
|
222
|
-
var gt;
|
|
223
|
-
function sr() {
|
|
224
|
-
return gt || (gt = 1, (function(e) {
|
|
204
|
+
var lt = { exports: {} }, ut;
|
|
205
|
+
function er() {
|
|
206
|
+
return ut || (ut = 1, (function(e) {
|
|
225
207
|
(function() {
|
|
226
208
|
var t = {}.hasOwnProperty;
|
|
227
209
|
function n() {
|
|
@@ -250,10 +232,10 @@ function sr() {
|
|
|
250
232
|
}
|
|
251
233
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
252
234
|
})();
|
|
253
|
-
})(
|
|
235
|
+
})(lt)), lt.exports;
|
|
254
236
|
}
|
|
255
|
-
var
|
|
256
|
-
const
|
|
237
|
+
var tr = er();
|
|
238
|
+
const nr = /* @__PURE__ */ Qn(tr), rr = {
|
|
257
239
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
258
240
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
259
241
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -261,41 +243,35 @@ const cr = /* @__PURE__ */ ir(ar), lr = {
|
|
|
261
243
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
262
244
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
263
245
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
264
|
-
},
|
|
246
|
+
}, or = nr.bind(rr), ft = "purpur-icon", ir = "md", sr = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), ar = ({ content: e = "", title: t } = {}) => {
|
|
265
247
|
const n = [
|
|
266
248
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
267
249
|
{ name: "fill", value: "currentColor" },
|
|
268
250
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
269
251
|
t ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
270
252
|
], o = t ? `<title>${t}</title>` : "";
|
|
271
|
-
return `<svg ${
|
|
272
|
-
},
|
|
273
|
-
const r =
|
|
274
|
-
content:
|
|
253
|
+
return `<svg ${sr(n)}>${o}${e}</svg>`;
|
|
254
|
+
}, cr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Lt = ({ svg: e, allyTitle: t, className: n, size: o = ir, ...i }) => {
|
|
255
|
+
const r = ar({
|
|
256
|
+
content: cr(e.svg),
|
|
275
257
|
title: t
|
|
276
|
-
}), s =
|
|
258
|
+
}), s = or(ft, `${ft}--${o}`, n);
|
|
277
259
|
return /* @__PURE__ */ x("span", { className: s, dangerouslySetInnerHTML: { __html: r }, ...i });
|
|
278
260
|
};
|
|
279
|
-
|
|
280
|
-
const
|
|
261
|
+
Lt.displayName = "Icon";
|
|
262
|
+
const lr = {
|
|
281
263
|
name: "info",
|
|
282
264
|
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>',
|
|
283
265
|
keywords: ["info"],
|
|
284
266
|
category: "status"
|
|
285
|
-
},
|
|
286
|
-
|
|
287
|
-
function
|
|
267
|
+
}, Mt = (e) => /* @__PURE__ */ x(Lt, { ...e, svg: lr });
|
|
268
|
+
Mt.displayName = "IconInfo";
|
|
269
|
+
function ur(e) {
|
|
288
270
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
289
271
|
}
|
|
290
|
-
var
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
Licensed under the MIT License (MIT), see
|
|
294
|
-
http://jedwatson.github.io/classnames
|
|
295
|
-
*/
|
|
296
|
-
var wt;
|
|
297
|
-
function vr() {
|
|
298
|
-
return wt || (wt = 1, (function(e) {
|
|
272
|
+
var pt = { exports: {} }, dt;
|
|
273
|
+
function fr() {
|
|
274
|
+
return dt || (dt = 1, (function(e) {
|
|
299
275
|
(function() {
|
|
300
276
|
var t = {}.hasOwnProperty;
|
|
301
277
|
function n() {
|
|
@@ -324,10 +300,10 @@ function vr() {
|
|
|
324
300
|
}
|
|
325
301
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
326
302
|
})();
|
|
327
|
-
})(
|
|
303
|
+
})(pt)), pt.exports;
|
|
328
304
|
}
|
|
329
|
-
var
|
|
330
|
-
const
|
|
305
|
+
var pr = fr();
|
|
306
|
+
const dr = /* @__PURE__ */ ur(pr), hr = {
|
|
331
307
|
"purpur-paragraph": "_purpur-paragraph_1rh57_1",
|
|
332
308
|
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
|
|
333
309
|
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
|
|
@@ -342,70 +318,68 @@ const wr = /* @__PURE__ */ gr(yr), xr = {
|
|
|
342
318
|
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
|
|
343
319
|
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
|
|
344
320
|
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
|
|
345
|
-
},
|
|
321
|
+
}, mr = dr.bind(hr), $t = {
|
|
346
322
|
PARAGRAPH100: "paragraph-100"
|
|
347
|
-
}, pe = "purpur-paragraph",
|
|
323
|
+
}, pe = "purpur-paragraph", kt = ({
|
|
348
324
|
children: e,
|
|
349
325
|
className: t,
|
|
350
326
|
disabled: n,
|
|
351
327
|
enableHyphenation: o = !1,
|
|
352
328
|
negative: i = !1,
|
|
353
|
-
variant: r =
|
|
329
|
+
variant: r = $t.PARAGRAPH100,
|
|
354
330
|
...s
|
|
355
331
|
}) => {
|
|
356
|
-
const a =
|
|
332
|
+
const a = mr(t, pe, `${pe}--${r}`, {
|
|
357
333
|
[`${pe}--hyphens`]: o,
|
|
358
334
|
[`${pe}--disabled`]: n,
|
|
359
335
|
[`${pe}--negative`]: i
|
|
360
336
|
});
|
|
361
337
|
return /* @__PURE__ */ x("p", { ...s, className: a, children: e });
|
|
362
338
|
};
|
|
363
|
-
|
|
364
|
-
const
|
|
339
|
+
kt.displayName = "Paragraph";
|
|
340
|
+
const gr = "400ms";
|
|
365
341
|
function q(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
366
342
|
return function(i) {
|
|
367
|
-
if (e
|
|
368
|
-
return t
|
|
343
|
+
if (e?.(i), n === !1 || !i.defaultPrevented)
|
|
344
|
+
return t?.(i);
|
|
369
345
|
};
|
|
370
346
|
}
|
|
371
|
-
function
|
|
347
|
+
function ht(e, t) {
|
|
372
348
|
if (typeof e == "function")
|
|
373
349
|
return e(t);
|
|
374
350
|
e != null && (e.current = t);
|
|
375
351
|
}
|
|
376
|
-
function
|
|
352
|
+
function Ft(...e) {
|
|
377
353
|
return (t) => {
|
|
378
354
|
let n = !1;
|
|
379
355
|
const o = e.map((i) => {
|
|
380
|
-
const r =
|
|
356
|
+
const r = ht(i, t);
|
|
381
357
|
return !n && typeof r == "function" && (n = !0), r;
|
|
382
358
|
});
|
|
383
359
|
if (n)
|
|
384
360
|
return () => {
|
|
385
361
|
for (let i = 0; i < o.length; i++) {
|
|
386
362
|
const r = o[i];
|
|
387
|
-
typeof r == "function" ? r() :
|
|
363
|
+
typeof r == "function" ? r() : ht(e[i], null);
|
|
388
364
|
}
|
|
389
365
|
};
|
|
390
366
|
};
|
|
391
367
|
}
|
|
392
368
|
function ne(...e) {
|
|
393
|
-
return f.useCallback(
|
|
369
|
+
return f.useCallback(Ft(...e), e);
|
|
394
370
|
}
|
|
395
|
-
function
|
|
371
|
+
function It(e, t = []) {
|
|
396
372
|
let n = [];
|
|
397
373
|
function o(r, s) {
|
|
398
374
|
const a = f.createContext(s), l = n.length;
|
|
399
375
|
n = [...n, s];
|
|
400
376
|
const c = (p) => {
|
|
401
|
-
|
|
402
|
-
const { scope: h, children: d, ...m } = p, g = ((y = h == null ? void 0 : h[e]) == null ? void 0 : y[l]) || a, v = f.useMemo(() => m, Object.values(m));
|
|
377
|
+
const { scope: h, children: d, ...m } = p, g = h?.[e]?.[l] || a, v = f.useMemo(() => m, Object.values(m));
|
|
403
378
|
return /* @__PURE__ */ x(g.Provider, { value: v, children: d });
|
|
404
379
|
};
|
|
405
380
|
c.displayName = r + "Provider";
|
|
406
381
|
function u(p, h) {
|
|
407
|
-
|
|
408
|
-
const d = ((g = h == null ? void 0 : h[e]) == null ? void 0 : g[l]) || a, m = f.useContext(d);
|
|
382
|
+
const d = h?.[e]?.[l] || a, m = f.useContext(d);
|
|
409
383
|
if (m) return m;
|
|
410
384
|
if (s !== void 0) return s;
|
|
411
385
|
throw new Error(`\`${p}\` must be used within \`${r}\``);
|
|
@@ -415,16 +389,16 @@ function Vt(e, t = []) {
|
|
|
415
389
|
const i = () => {
|
|
416
390
|
const r = n.map((s) => f.createContext(s));
|
|
417
391
|
return function(a) {
|
|
418
|
-
const l =
|
|
392
|
+
const l = a?.[e] || r;
|
|
419
393
|
return f.useMemo(
|
|
420
394
|
() => ({ [`__scope${e}`]: { ...a, [e]: l } }),
|
|
421
395
|
[a, l]
|
|
422
396
|
);
|
|
423
397
|
};
|
|
424
398
|
};
|
|
425
|
-
return i.scopeName = e, [o,
|
|
399
|
+
return i.scopeName = e, [o, vr(i, ...t)];
|
|
426
400
|
}
|
|
427
|
-
function
|
|
401
|
+
function vr(...e) {
|
|
428
402
|
const t = e[0];
|
|
429
403
|
if (e.length === 1) return t;
|
|
430
404
|
const n = () => {
|
|
@@ -442,29 +416,29 @@ function Ar(...e) {
|
|
|
442
416
|
};
|
|
443
417
|
return n.scopeName = t.scopeName, n;
|
|
444
418
|
}
|
|
445
|
-
var
|
|
446
|
-
const { children: n, ...o } = e, i = f.Children.toArray(n), r = i.find(
|
|
419
|
+
var Ht = f.forwardRef((e, t) => {
|
|
420
|
+
const { children: n, ...o } = e, i = f.Children.toArray(n), r = i.find(yr);
|
|
447
421
|
if (r) {
|
|
448
422
|
const s = r.props.children, a = i.map((l) => l === r ? f.Children.count(s) > 1 ? f.Children.only(null) : f.isValidElement(s) ? s.props.children : null : l);
|
|
449
|
-
return /* @__PURE__ */ x(
|
|
423
|
+
return /* @__PURE__ */ x(Fe, { ...o, ref: t, children: f.isValidElement(s) ? f.cloneElement(s, void 0, a) : null });
|
|
450
424
|
}
|
|
451
|
-
return /* @__PURE__ */ x(
|
|
425
|
+
return /* @__PURE__ */ x(Fe, { ...o, ref: t, children: n });
|
|
452
426
|
});
|
|
453
|
-
|
|
454
|
-
var
|
|
427
|
+
Ht.displayName = "Slot";
|
|
428
|
+
var Fe = f.forwardRef((e, t) => {
|
|
455
429
|
const { children: n, ...o } = e;
|
|
456
430
|
if (f.isValidElement(n)) {
|
|
457
|
-
const i =
|
|
458
|
-
return n.type !== f.Fragment && (r.ref = t ?
|
|
431
|
+
const i = xr(n), r = wr(o, n.props);
|
|
432
|
+
return n.type !== f.Fragment && (r.ref = t ? Ft(t, i) : i), f.cloneElement(n, r);
|
|
459
433
|
}
|
|
460
434
|
return f.Children.count(n) > 1 ? f.Children.only(null) : null;
|
|
461
435
|
});
|
|
462
|
-
|
|
463
|
-
var
|
|
464
|
-
function
|
|
465
|
-
return f.isValidElement(e) && e.type ===
|
|
436
|
+
Fe.displayName = "SlotClone";
|
|
437
|
+
var jt = ({ children: e }) => /* @__PURE__ */ x(Ln, { children: e });
|
|
438
|
+
function yr(e) {
|
|
439
|
+
return f.isValidElement(e) && e.type === jt;
|
|
466
440
|
}
|
|
467
|
-
function
|
|
441
|
+
function wr(e, t) {
|
|
468
442
|
const n = { ...t };
|
|
469
443
|
for (const o in t) {
|
|
470
444
|
const i = e[o], r = t[o];
|
|
@@ -474,12 +448,11 @@ function Pr(e, t) {
|
|
|
474
448
|
}
|
|
475
449
|
return { ...e, ...n };
|
|
476
450
|
}
|
|
477
|
-
function
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
return n ? e.ref : (t = (i = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : i.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
451
|
+
function xr(e) {
|
|
452
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
453
|
+
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
481
454
|
}
|
|
482
|
-
var
|
|
455
|
+
var br = [
|
|
483
456
|
"a",
|
|
484
457
|
"button",
|
|
485
458
|
"div",
|
|
@@ -496,26 +469,23 @@ var Rr = [
|
|
|
496
469
|
"span",
|
|
497
470
|
"svg",
|
|
498
471
|
"ul"
|
|
499
|
-
], Q =
|
|
472
|
+
], Q = br.reduce((e, t) => {
|
|
500
473
|
const n = f.forwardRef((o, i) => {
|
|
501
|
-
const { asChild: r, ...s } = o, a = r ?
|
|
474
|
+
const { asChild: r, ...s } = o, a = r ? Ht : t;
|
|
502
475
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ x(a, { ...s, ref: i });
|
|
503
476
|
});
|
|
504
477
|
return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
|
|
505
478
|
}, {});
|
|
506
|
-
function
|
|
507
|
-
e &&
|
|
479
|
+
function _r(e, t) {
|
|
480
|
+
e && Tt.flushSync(() => e.dispatchEvent(t));
|
|
508
481
|
}
|
|
509
482
|
function ae(e) {
|
|
510
483
|
const t = f.useRef(e);
|
|
511
484
|
return f.useEffect(() => {
|
|
512
485
|
t.current = e;
|
|
513
|
-
}), f.useMemo(() => (...n) =>
|
|
514
|
-
var o;
|
|
515
|
-
return (o = t.current) == null ? void 0 : o.call(t, ...n);
|
|
516
|
-
}, []);
|
|
486
|
+
}), f.useMemo(() => (...n) => t.current?.(...n), []);
|
|
517
487
|
}
|
|
518
|
-
function
|
|
488
|
+
function Ar(e, t = globalThis?.document) {
|
|
519
489
|
const n = ae(e);
|
|
520
490
|
f.useEffect(() => {
|
|
521
491
|
const o = (i) => {
|
|
@@ -524,11 +494,11 @@ function Sr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
524
494
|
return t.addEventListener("keydown", o, { capture: !0 }), () => t.removeEventListener("keydown", o, { capture: !0 });
|
|
525
495
|
}, [n, t]);
|
|
526
496
|
}
|
|
527
|
-
var
|
|
497
|
+
var Pr = "DismissableLayer", Ie = "dismissableLayer.update", Cr = "dismissableLayer.pointerDownOutside", Or = "dismissableLayer.focusOutside", mt, Wt = f.createContext({
|
|
528
498
|
layers: /* @__PURE__ */ new Set(),
|
|
529
499
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
530
500
|
branches: /* @__PURE__ */ new Set()
|
|
531
|
-
}),
|
|
501
|
+
}), Bt = f.forwardRef(
|
|
532
502
|
(e, t) => {
|
|
533
503
|
const {
|
|
534
504
|
disableOutsidePointerEvents: n = !1,
|
|
@@ -538,36 +508,36 @@ var Tr = "DismissableLayer", je = "dismissableLayer.update", Nr = "dismissableLa
|
|
|
538
508
|
onInteractOutside: s,
|
|
539
509
|
onDismiss: a,
|
|
540
510
|
...l
|
|
541
|
-
} = e, c = f.useContext(
|
|
542
|
-
const
|
|
543
|
-
!b || L || (i
|
|
544
|
-
}, h),
|
|
545
|
-
const
|
|
546
|
-
[...c.branches].some((
|
|
511
|
+
} = e, c = f.useContext(Wt), [u, p] = f.useState(null), h = u?.ownerDocument ?? globalThis?.document, [, d] = f.useState({}), m = ne(t, (_) => p(_)), g = Array.from(c.layers), [v] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), y = g.indexOf(v), w = u ? g.indexOf(u) : -1, P = c.layersWithOutsidePointerEventsDisabled.size > 0, b = w >= y, A = Sr((_) => {
|
|
512
|
+
const E = _.target, L = [...c.branches].some((R) => R.contains(E));
|
|
513
|
+
!b || L || (i?.(_), s?.(_), _.defaultPrevented || a?.());
|
|
514
|
+
}, h), O = Tr((_) => {
|
|
515
|
+
const E = _.target;
|
|
516
|
+
[...c.branches].some((R) => R.contains(E)) || (r?.(_), s?.(_), _.defaultPrevented || a?.());
|
|
547
517
|
}, h);
|
|
548
|
-
return
|
|
549
|
-
w === c.layers.size - 1 && (o
|
|
518
|
+
return Ar((_) => {
|
|
519
|
+
w === c.layers.size - 1 && (o?.(_), !_.defaultPrevented && a && (_.preventDefault(), a()));
|
|
550
520
|
}, h), f.useEffect(() => {
|
|
551
521
|
if (u)
|
|
552
|
-
return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (
|
|
553
|
-
n && c.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents =
|
|
522
|
+
return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (mt = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(u)), c.layers.add(u), gt(), () => {
|
|
523
|
+
n && c.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = mt);
|
|
554
524
|
};
|
|
555
525
|
}, [u, h, n, c]), f.useEffect(() => () => {
|
|
556
|
-
u && (c.layers.delete(u), c.layersWithOutsidePointerEventsDisabled.delete(u),
|
|
526
|
+
u && (c.layers.delete(u), c.layersWithOutsidePointerEventsDisabled.delete(u), gt());
|
|
557
527
|
}, [u, c]), f.useEffect(() => {
|
|
558
528
|
const _ = () => d({});
|
|
559
|
-
return document.addEventListener(
|
|
529
|
+
return document.addEventListener(Ie, _), () => document.removeEventListener(Ie, _);
|
|
560
530
|
}, []), /* @__PURE__ */ x(
|
|
561
531
|
Q.div,
|
|
562
532
|
{
|
|
563
533
|
...l,
|
|
564
534
|
ref: m,
|
|
565
535
|
style: {
|
|
566
|
-
pointerEvents:
|
|
536
|
+
pointerEvents: P ? b ? "auto" : "none" : void 0,
|
|
567
537
|
...e.style
|
|
568
538
|
},
|
|
569
|
-
onFocusCapture: q(e.onFocusCapture,
|
|
570
|
-
onBlurCapture: q(e.onBlurCapture,
|
|
539
|
+
onFocusCapture: q(e.onFocusCapture, O.onFocusCapture),
|
|
540
|
+
onBlurCapture: q(e.onBlurCapture, O.onBlurCapture),
|
|
571
541
|
onPointerDownCapture: q(
|
|
572
542
|
e.onPointerDownCapture,
|
|
573
543
|
A.onPointerDownCapture
|
|
@@ -576,9 +546,9 @@ var Tr = "DismissableLayer", je = "dismissableLayer.update", Nr = "dismissableLa
|
|
|
576
546
|
);
|
|
577
547
|
}
|
|
578
548
|
);
|
|
579
|
-
|
|
580
|
-
var
|
|
581
|
-
const n = f.useContext(
|
|
549
|
+
Bt.displayName = Pr;
|
|
550
|
+
var Er = "DismissableLayerBranch", Rr = f.forwardRef((e, t) => {
|
|
551
|
+
const n = f.useContext(Wt), o = f.useRef(null), i = ne(t, o);
|
|
582
552
|
return f.useEffect(() => {
|
|
583
553
|
const r = o.current;
|
|
584
554
|
if (r)
|
|
@@ -587,16 +557,16 @@ var Lr = "DismissableLayerBranch", Mr = f.forwardRef((e, t) => {
|
|
|
587
557
|
};
|
|
588
558
|
}, [n.branches]), /* @__PURE__ */ x(Q.div, { ...e, ref: i });
|
|
589
559
|
});
|
|
590
|
-
|
|
591
|
-
function
|
|
560
|
+
Rr.displayName = Er;
|
|
561
|
+
function Sr(e, t = globalThis?.document) {
|
|
592
562
|
const n = ae(e), o = f.useRef(!1), i = f.useRef(() => {
|
|
593
563
|
});
|
|
594
564
|
return f.useEffect(() => {
|
|
595
565
|
const r = (a) => {
|
|
596
566
|
if (a.target && !o.current) {
|
|
597
567
|
let l = function() {
|
|
598
|
-
|
|
599
|
-
|
|
568
|
+
zt(
|
|
569
|
+
Cr,
|
|
600
570
|
n,
|
|
601
571
|
c,
|
|
602
572
|
{ discrete: !0 }
|
|
@@ -618,11 +588,11 @@ function $r(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
618
588
|
onPointerDownCapture: () => o.current = !0
|
|
619
589
|
};
|
|
620
590
|
}
|
|
621
|
-
function
|
|
591
|
+
function Tr(e, t = globalThis?.document) {
|
|
622
592
|
const n = ae(e), o = f.useRef(!1);
|
|
623
593
|
return f.useEffect(() => {
|
|
624
594
|
const i = (r) => {
|
|
625
|
-
r.target && !o.current &&
|
|
595
|
+
r.target && !o.current && zt(Or, n, { originalEvent: r }, {
|
|
626
596
|
discrete: !1
|
|
627
597
|
});
|
|
628
598
|
};
|
|
@@ -632,36 +602,36 @@ function kr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
632
602
|
onBlurCapture: () => o.current = !1
|
|
633
603
|
};
|
|
634
604
|
}
|
|
635
|
-
function
|
|
636
|
-
const e = new CustomEvent(
|
|
605
|
+
function gt() {
|
|
606
|
+
const e = new CustomEvent(Ie);
|
|
637
607
|
document.dispatchEvent(e);
|
|
638
608
|
}
|
|
639
|
-
function
|
|
609
|
+
function zt(e, t, n, { discrete: o }) {
|
|
640
610
|
const i = n.originalEvent.target, r = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
641
|
-
t && i.addEventListener(e, t, { once: !0 }), o ?
|
|
611
|
+
t && i.addEventListener(e, t, { once: !0 }), o ? _r(i, r) : i.dispatchEvent(r);
|
|
642
612
|
}
|
|
643
|
-
var ee = globalThis
|
|
644
|
-
},
|
|
645
|
-
}),
|
|
646
|
-
function
|
|
647
|
-
const [t, n] = f.useState(
|
|
613
|
+
var ee = globalThis?.document ? f.useLayoutEffect : () => {
|
|
614
|
+
}, Nr = f.useId || (() => {
|
|
615
|
+
}), Dr = 0;
|
|
616
|
+
function Lr(e) {
|
|
617
|
+
const [t, n] = f.useState(Nr());
|
|
648
618
|
return ee(() => {
|
|
649
|
-
n((o) => o ?? String(
|
|
619
|
+
n((o) => o ?? String(Dr++));
|
|
650
620
|
}, [e]), t ? `radix-${t}` : "";
|
|
651
621
|
}
|
|
652
|
-
const
|
|
622
|
+
const Mr = ["top", "right", "bottom", "left"], K = Math.min, I = Math.max, _e = Math.round, ye = Math.floor, V = (e) => ({
|
|
653
623
|
x: e,
|
|
654
624
|
y: e
|
|
655
|
-
}),
|
|
625
|
+
}), $r = {
|
|
656
626
|
left: "right",
|
|
657
627
|
right: "left",
|
|
658
628
|
bottom: "top",
|
|
659
629
|
top: "bottom"
|
|
660
|
-
},
|
|
630
|
+
}, kr = {
|
|
661
631
|
start: "end",
|
|
662
632
|
end: "start"
|
|
663
633
|
};
|
|
664
|
-
function
|
|
634
|
+
function He(e, t, n) {
|
|
665
635
|
return I(e, K(t, n));
|
|
666
636
|
}
|
|
667
637
|
function G(e, t) {
|
|
@@ -673,54 +643,54 @@ function X(e) {
|
|
|
673
643
|
function ce(e) {
|
|
674
644
|
return e.split("-")[1];
|
|
675
645
|
}
|
|
676
|
-
function
|
|
646
|
+
function Ve(e) {
|
|
677
647
|
return e === "x" ? "y" : "x";
|
|
678
648
|
}
|
|
679
|
-
function
|
|
649
|
+
function Ue(e) {
|
|
680
650
|
return e === "y" ? "height" : "width";
|
|
681
651
|
}
|
|
682
|
-
const
|
|
652
|
+
const Fr = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
683
653
|
function z(e) {
|
|
684
|
-
return
|
|
654
|
+
return Fr.has(X(e)) ? "y" : "x";
|
|
685
655
|
}
|
|
686
|
-
function
|
|
687
|
-
return
|
|
656
|
+
function Ye(e) {
|
|
657
|
+
return Ve(z(e));
|
|
688
658
|
}
|
|
689
|
-
function
|
|
659
|
+
function Ir(e, t, n) {
|
|
690
660
|
n === void 0 && (n = !1);
|
|
691
|
-
const o = ce(e), i =
|
|
661
|
+
const o = ce(e), i = Ye(e), r = Ue(i);
|
|
692
662
|
let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
693
|
-
return t.reference[r] > t.floating[r] && (s =
|
|
663
|
+
return t.reference[r] > t.floating[r] && (s = Ae(s)), [s, Ae(s)];
|
|
694
664
|
}
|
|
695
|
-
function
|
|
696
|
-
const t =
|
|
697
|
-
return [
|
|
665
|
+
function Hr(e) {
|
|
666
|
+
const t = Ae(e);
|
|
667
|
+
return [je(e), t, je(t)];
|
|
698
668
|
}
|
|
699
|
-
function
|
|
700
|
-
return e.replace(/start|end/g, (t) =>
|
|
669
|
+
function je(e) {
|
|
670
|
+
return e.replace(/start|end/g, (t) => kr[t]);
|
|
701
671
|
}
|
|
702
|
-
const
|
|
703
|
-
function
|
|
672
|
+
const vt = ["left", "right"], yt = ["right", "left"], jr = ["top", "bottom"], Wr = ["bottom", "top"];
|
|
673
|
+
function Br(e, t, n) {
|
|
704
674
|
switch (e) {
|
|
705
675
|
case "top":
|
|
706
676
|
case "bottom":
|
|
707
|
-
return n ? t ?
|
|
677
|
+
return n ? t ? yt : vt : t ? vt : yt;
|
|
708
678
|
case "left":
|
|
709
679
|
case "right":
|
|
710
|
-
return t ?
|
|
680
|
+
return t ? jr : Wr;
|
|
711
681
|
default:
|
|
712
682
|
return [];
|
|
713
683
|
}
|
|
714
684
|
}
|
|
715
|
-
function
|
|
685
|
+
function zr(e, t, n, o) {
|
|
716
686
|
const i = ce(e);
|
|
717
|
-
let r =
|
|
718
|
-
return i && (r = r.map((s) => s + "-" + i), t && (r = r.concat(r.map(
|
|
687
|
+
let r = Br(X(e), n === "start", o);
|
|
688
|
+
return i && (r = r.map((s) => s + "-" + i), t && (r = r.concat(r.map(je)))), r;
|
|
719
689
|
}
|
|
720
|
-
function
|
|
721
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
690
|
+
function Ae(e) {
|
|
691
|
+
return e.replace(/left|right|bottom|top/g, (t) => $r[t]);
|
|
722
692
|
}
|
|
723
|
-
function
|
|
693
|
+
function Vr(e) {
|
|
724
694
|
return {
|
|
725
695
|
top: 0,
|
|
726
696
|
right: 0,
|
|
@@ -729,8 +699,8 @@ function Zr(e) {
|
|
|
729
699
|
...e
|
|
730
700
|
};
|
|
731
701
|
}
|
|
732
|
-
function
|
|
733
|
-
return typeof e != "number" ?
|
|
702
|
+
function Vt(e) {
|
|
703
|
+
return typeof e != "number" ? Vr(e) : {
|
|
734
704
|
top: e,
|
|
735
705
|
right: e,
|
|
736
706
|
bottom: e,
|
|
@@ -755,12 +725,12 @@ function Pe(e) {
|
|
|
755
725
|
y: n
|
|
756
726
|
};
|
|
757
727
|
}
|
|
758
|
-
function
|
|
728
|
+
function wt(e, t, n) {
|
|
759
729
|
let {
|
|
760
730
|
reference: o,
|
|
761
731
|
floating: i
|
|
762
732
|
} = e;
|
|
763
|
-
const r = z(t), s =
|
|
733
|
+
const r = z(t), s = Ye(t), a = Ue(s), l = X(t), c = r === "y", u = o.x + o.width / 2 - i.width / 2, p = o.y + o.height / 2 - i.height / 2, h = o[a] / 2 - i[a] / 2;
|
|
764
734
|
let d;
|
|
765
735
|
switch (l) {
|
|
766
736
|
case "top":
|
|
@@ -803,7 +773,7 @@ function Pt(e, t, n) {
|
|
|
803
773
|
}
|
|
804
774
|
return d;
|
|
805
775
|
}
|
|
806
|
-
const
|
|
776
|
+
const Ur = async (e, t, n) => {
|
|
807
777
|
const {
|
|
808
778
|
placement: o = "bottom",
|
|
809
779
|
strategy: i = "absolute",
|
|
@@ -817,14 +787,14 @@ const Kr = async (e, t, n) => {
|
|
|
817
787
|
}), {
|
|
818
788
|
x: u,
|
|
819
789
|
y: p
|
|
820
|
-
} =
|
|
790
|
+
} = wt(c, o, l), h = o, d = {}, m = 0;
|
|
821
791
|
for (let g = 0; g < a.length; g++) {
|
|
822
792
|
const {
|
|
823
793
|
name: v,
|
|
824
794
|
fn: y
|
|
825
795
|
} = a[g], {
|
|
826
796
|
x: w,
|
|
827
|
-
y:
|
|
797
|
+
y: P,
|
|
828
798
|
data: b,
|
|
829
799
|
reset: A
|
|
830
800
|
} = await y({
|
|
@@ -841,7 +811,7 @@ const Kr = async (e, t, n) => {
|
|
|
841
811
|
floating: t
|
|
842
812
|
}
|
|
843
813
|
});
|
|
844
|
-
u = w ?? u, p =
|
|
814
|
+
u = w ?? u, p = P ?? p, d = {
|
|
845
815
|
...d,
|
|
846
816
|
[v]: {
|
|
847
817
|
...d[v],
|
|
@@ -854,7 +824,7 @@ const Kr = async (e, t, n) => {
|
|
|
854
824
|
}) : A.rects), {
|
|
855
825
|
x: u,
|
|
856
826
|
y: p
|
|
857
|
-
} =
|
|
827
|
+
} = wt(c, h, l)), g = -1);
|
|
858
828
|
}
|
|
859
829
|
return {
|
|
860
830
|
x: u,
|
|
@@ -880,7 +850,7 @@ async function de(e, t) {
|
|
|
880
850
|
elementContext: p = "floating",
|
|
881
851
|
altBoundary: h = !1,
|
|
882
852
|
padding: d = 0
|
|
883
|
-
} = G(t, e), m =
|
|
853
|
+
} = G(t, e), m = Vt(d), v = a[h ? p === "floating" ? "reference" : "floating" : p], y = Pe(await r.getClippingRect({
|
|
884
854
|
element: (n = await (r.isElement == null ? void 0 : r.isElement(v))) == null || n ? v : v.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(a.floating)),
|
|
885
855
|
boundary: c,
|
|
886
856
|
rootBoundary: u,
|
|
@@ -890,7 +860,7 @@ async function de(e, t) {
|
|
|
890
860
|
y: i,
|
|
891
861
|
width: s.floating.width,
|
|
892
862
|
height: s.floating.height
|
|
893
|
-
} : s.reference,
|
|
863
|
+
} : s.reference, P = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a.floating)), b = await (r.isElement == null ? void 0 : r.isElement(P)) ? await (r.getScale == null ? void 0 : r.getScale(P)) || {
|
|
894
864
|
x: 1,
|
|
895
865
|
y: 1
|
|
896
866
|
} : {
|
|
@@ -899,7 +869,7 @@ async function de(e, t) {
|
|
|
899
869
|
}, A = Pe(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
900
870
|
elements: a,
|
|
901
871
|
rect: w,
|
|
902
|
-
offsetParent:
|
|
872
|
+
offsetParent: P,
|
|
903
873
|
strategy: l
|
|
904
874
|
}) : w);
|
|
905
875
|
return {
|
|
@@ -909,7 +879,7 @@ async function de(e, t) {
|
|
|
909
879
|
right: (A.right - y.right + m.right) / b.x
|
|
910
880
|
};
|
|
911
881
|
}
|
|
912
|
-
const
|
|
882
|
+
const Yr = (e) => ({
|
|
913
883
|
name: "arrow",
|
|
914
884
|
options: e,
|
|
915
885
|
async fn(t) {
|
|
@@ -927,13 +897,13 @@ const Jr = (e) => ({
|
|
|
927
897
|
} = G(e, t) || {};
|
|
928
898
|
if (c == null)
|
|
929
899
|
return {};
|
|
930
|
-
const p =
|
|
900
|
+
const p = Vt(u), h = {
|
|
931
901
|
x: n,
|
|
932
902
|
y: o
|
|
933
|
-
}, d =
|
|
934
|
-
let _ =
|
|
935
|
-
(!_ || !await (s.isElement == null ? void 0 : s.isElement(
|
|
936
|
-
const
|
|
903
|
+
}, d = Ye(i), m = Ue(d), g = await s.getDimensions(c), v = d === "y", y = v ? "top" : "left", w = v ? "bottom" : "right", P = v ? "clientHeight" : "clientWidth", b = r.reference[m] + r.reference[d] - h[d] - r.floating[m], A = h[d] - r.reference[d], O = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c));
|
|
904
|
+
let _ = O ? O[P] : 0;
|
|
905
|
+
(!_ || !await (s.isElement == null ? void 0 : s.isElement(O))) && (_ = a.floating[P] || r.floating[m]);
|
|
906
|
+
const E = b / 2 - A / 2, L = _ / 2 - g[m] / 2 - 1, R = K(p[y], L), $ = K(p[w], L), k = R, T = _ - g[m] - $, S = _ / 2 - g[m] / 2 + E, F = He(k, S, T), N = !l.arrow && ce(i) != null && S !== F && r.reference[m] / 2 - (S < k ? R : $) - g[m] / 2 < 0, D = N ? S < k ? S - k : S - T : 0;
|
|
937
907
|
return {
|
|
938
908
|
[d]: h[d] + D,
|
|
939
909
|
data: {
|
|
@@ -946,7 +916,7 @@ const Jr = (e) => ({
|
|
|
946
916
|
reset: N
|
|
947
917
|
};
|
|
948
918
|
}
|
|
949
|
-
}),
|
|
919
|
+
}), qr = function(e) {
|
|
950
920
|
return e === void 0 && (e = {}), {
|
|
951
921
|
name: "flip",
|
|
952
922
|
options: e,
|
|
@@ -970,15 +940,15 @@ const Jr = (e) => ({
|
|
|
970
940
|
} = G(e, t);
|
|
971
941
|
if ((n = r.arrow) != null && n.alignmentOffset)
|
|
972
942
|
return {};
|
|
973
|
-
const y = X(i), w = z(a),
|
|
974
|
-
!h &&
|
|
975
|
-
const _ = [a, ...A],
|
|
976
|
-
let
|
|
977
|
-
if (u && L.push(
|
|
978
|
-
const S =
|
|
979
|
-
L.push(
|
|
943
|
+
const y = X(i), w = z(a), P = X(a) === a, b = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), A = h || (P || !g ? [Ae(a)] : Hr(a)), O = m !== "none";
|
|
944
|
+
!h && O && A.push(...zr(a, g, m, b));
|
|
945
|
+
const _ = [a, ...A], E = await de(t, v), L = [];
|
|
946
|
+
let R = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
947
|
+
if (u && L.push(E[y]), p) {
|
|
948
|
+
const S = Ir(i, s, b);
|
|
949
|
+
L.push(E[S[0]], E[S[1]]);
|
|
980
950
|
}
|
|
981
|
-
if (
|
|
951
|
+
if (R = [...R, {
|
|
982
952
|
placement: i,
|
|
983
953
|
overflows: L
|
|
984
954
|
}], !L.every((S) => S <= 0)) {
|
|
@@ -986,30 +956,30 @@ const Jr = (e) => ({
|
|
|
986
956
|
const S = ((($ = r.flip) == null ? void 0 : $.index) || 0) + 1, F = _[S];
|
|
987
957
|
if (F && (!(p === "alignment" ? w !== z(F) : !1) || // We leave the current main axis only if every placement on that axis
|
|
988
958
|
// overflows the main axis.
|
|
989
|
-
|
|
959
|
+
R.every((C) => z(C.placement) === w ? C.overflows[0] > 0 : !0)))
|
|
990
960
|
return {
|
|
991
961
|
data: {
|
|
992
962
|
index: S,
|
|
993
|
-
overflows:
|
|
963
|
+
overflows: R
|
|
994
964
|
},
|
|
995
965
|
reset: {
|
|
996
966
|
placement: F
|
|
997
967
|
}
|
|
998
968
|
};
|
|
999
|
-
let N = (k =
|
|
969
|
+
let N = (k = R.filter((D) => D.overflows[0] <= 0).sort((D, C) => D.overflows[1] - C.overflows[1])[0]) == null ? void 0 : k.placement;
|
|
1000
970
|
if (!N)
|
|
1001
971
|
switch (d) {
|
|
1002
972
|
case "bestFit": {
|
|
1003
973
|
var T;
|
|
1004
|
-
const D = (T =
|
|
1005
|
-
if (
|
|
1006
|
-
const M = z(
|
|
974
|
+
const D = (T = R.filter((C) => {
|
|
975
|
+
if (O) {
|
|
976
|
+
const M = z(C.placement);
|
|
1007
977
|
return M === w || // Create a bias to the `y` side axis due to horizontal
|
|
1008
978
|
// reading directions favoring greater width.
|
|
1009
979
|
M === "y";
|
|
1010
980
|
}
|
|
1011
981
|
return !0;
|
|
1012
|
-
}).map((
|
|
982
|
+
}).map((C) => [C.placement, C.overflows.filter((M) => M > 0).reduce((M, B) => M + B, 0)]).sort((C, M) => C[1] - M[1])[0]) == null ? void 0 : T[0];
|
|
1013
983
|
D && (N = D);
|
|
1014
984
|
break;
|
|
1015
985
|
}
|
|
@@ -1028,7 +998,7 @@ const Jr = (e) => ({
|
|
|
1028
998
|
}
|
|
1029
999
|
};
|
|
1030
1000
|
};
|
|
1031
|
-
function
|
|
1001
|
+
function xt(e, t) {
|
|
1032
1002
|
return {
|
|
1033
1003
|
top: e.top - t.height,
|
|
1034
1004
|
right: e.right - t.width,
|
|
@@ -1036,10 +1006,10 @@ function Ot(e, t) {
|
|
|
1036
1006
|
left: e.left - t.width
|
|
1037
1007
|
};
|
|
1038
1008
|
}
|
|
1039
|
-
function
|
|
1040
|
-
return
|
|
1009
|
+
function bt(e) {
|
|
1010
|
+
return Mr.some((t) => e[t] >= 0);
|
|
1041
1011
|
}
|
|
1042
|
-
const
|
|
1012
|
+
const Gr = function(e) {
|
|
1043
1013
|
return e === void 0 && (e = {}), {
|
|
1044
1014
|
name: "hide",
|
|
1045
1015
|
options: e,
|
|
@@ -1055,11 +1025,11 @@ const eo = function(e) {
|
|
|
1055
1025
|
const r = await de(t, {
|
|
1056
1026
|
...i,
|
|
1057
1027
|
elementContext: "reference"
|
|
1058
|
-
}), s =
|
|
1028
|
+
}), s = xt(r, n.reference);
|
|
1059
1029
|
return {
|
|
1060
1030
|
data: {
|
|
1061
1031
|
referenceHiddenOffsets: s,
|
|
1062
|
-
referenceHidden:
|
|
1032
|
+
referenceHidden: bt(s)
|
|
1063
1033
|
}
|
|
1064
1034
|
};
|
|
1065
1035
|
}
|
|
@@ -1067,11 +1037,11 @@ const eo = function(e) {
|
|
|
1067
1037
|
const r = await de(t, {
|
|
1068
1038
|
...i,
|
|
1069
1039
|
altBoundary: !0
|
|
1070
|
-
}), s =
|
|
1040
|
+
}), s = xt(r, n.floating);
|
|
1071
1041
|
return {
|
|
1072
1042
|
data: {
|
|
1073
1043
|
escapedOffsets: s,
|
|
1074
|
-
escaped:
|
|
1044
|
+
escaped: bt(s)
|
|
1075
1045
|
}
|
|
1076
1046
|
};
|
|
1077
1047
|
}
|
|
@@ -1080,13 +1050,13 @@ const eo = function(e) {
|
|
|
1080
1050
|
}
|
|
1081
1051
|
}
|
|
1082
1052
|
};
|
|
1083
|
-
},
|
|
1084
|
-
async function
|
|
1053
|
+
}, Ut = /* @__PURE__ */ new Set(["left", "top"]);
|
|
1054
|
+
async function Xr(e, t) {
|
|
1085
1055
|
const {
|
|
1086
1056
|
placement: n,
|
|
1087
1057
|
platform: o,
|
|
1088
1058
|
elements: i
|
|
1089
|
-
} = e, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = X(n), a = ce(n), l = z(n) === "y", c =
|
|
1059
|
+
} = e, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = X(n), a = ce(n), l = z(n) === "y", c = Ut.has(s) ? -1 : 1, u = r && l ? -1 : 1, p = G(t, e);
|
|
1090
1060
|
let {
|
|
1091
1061
|
mainAxis: h,
|
|
1092
1062
|
crossAxis: d,
|
|
@@ -1108,7 +1078,7 @@ async function to(e, t) {
|
|
|
1108
1078
|
y: d * u
|
|
1109
1079
|
};
|
|
1110
1080
|
}
|
|
1111
|
-
const
|
|
1081
|
+
const Zr = function(e) {
|
|
1112
1082
|
return e === void 0 && (e = 0), {
|
|
1113
1083
|
name: "offset",
|
|
1114
1084
|
options: e,
|
|
@@ -1119,7 +1089,7 @@ const no = function(e) {
|
|
|
1119
1089
|
y: r,
|
|
1120
1090
|
placement: s,
|
|
1121
1091
|
middlewareData: a
|
|
1122
|
-
} = t, l = await
|
|
1092
|
+
} = t, l = await Xr(t, e);
|
|
1123
1093
|
return s === ((n = a.offset) == null ? void 0 : n.placement) && (o = a.arrow) != null && o.alignmentOffset ? {} : {
|
|
1124
1094
|
x: i + l.x,
|
|
1125
1095
|
y: r + l.y,
|
|
@@ -1130,7 +1100,7 @@ const no = function(e) {
|
|
|
1130
1100
|
};
|
|
1131
1101
|
}
|
|
1132
1102
|
};
|
|
1133
|
-
},
|
|
1103
|
+
}, Kr = function(e) {
|
|
1134
1104
|
return e === void 0 && (e = {}), {
|
|
1135
1105
|
name: "shift",
|
|
1136
1106
|
options: e,
|
|
@@ -1158,15 +1128,15 @@ const no = function(e) {
|
|
|
1158
1128
|
} = G(e, t), c = {
|
|
1159
1129
|
x: n,
|
|
1160
1130
|
y: o
|
|
1161
|
-
}, u = await de(t, l), p = z(X(i)), h =
|
|
1131
|
+
}, u = await de(t, l), p = z(X(i)), h = Ve(p);
|
|
1162
1132
|
let d = c[h], m = c[p];
|
|
1163
1133
|
if (r) {
|
|
1164
|
-
const v = h === "y" ? "top" : "left", y = h === "y" ? "bottom" : "right", w = d + u[v],
|
|
1165
|
-
d =
|
|
1134
|
+
const v = h === "y" ? "top" : "left", y = h === "y" ? "bottom" : "right", w = d + u[v], P = d - u[y];
|
|
1135
|
+
d = He(w, d, P);
|
|
1166
1136
|
}
|
|
1167
1137
|
if (s) {
|
|
1168
|
-
const v = p === "y" ? "top" : "left", y = p === "y" ? "bottom" : "right", w = m + u[v],
|
|
1169
|
-
m =
|
|
1138
|
+
const v = p === "y" ? "top" : "left", y = p === "y" ? "bottom" : "right", w = m + u[v], P = m - u[y];
|
|
1139
|
+
m = He(w, m, P);
|
|
1170
1140
|
}
|
|
1171
1141
|
const g = a.fn({
|
|
1172
1142
|
...t,
|
|
@@ -1186,7 +1156,7 @@ const no = function(e) {
|
|
|
1186
1156
|
};
|
|
1187
1157
|
}
|
|
1188
1158
|
};
|
|
1189
|
-
},
|
|
1159
|
+
}, Jr = function(e) {
|
|
1190
1160
|
return e === void 0 && (e = {}), {
|
|
1191
1161
|
options: e,
|
|
1192
1162
|
fn(t) {
|
|
@@ -1203,7 +1173,7 @@ const no = function(e) {
|
|
|
1203
1173
|
} = G(e, t), u = {
|
|
1204
1174
|
x: n,
|
|
1205
1175
|
y: o
|
|
1206
|
-
}, p = z(i), h =
|
|
1176
|
+
}, p = z(i), h = Ve(p);
|
|
1207
1177
|
let d = u[h], m = u[p];
|
|
1208
1178
|
const g = G(a, t), v = typeof g == "number" ? {
|
|
1209
1179
|
mainAxis: g,
|
|
@@ -1214,13 +1184,13 @@ const no = function(e) {
|
|
|
1214
1184
|
...g
|
|
1215
1185
|
};
|
|
1216
1186
|
if (l) {
|
|
1217
|
-
const
|
|
1187
|
+
const P = h === "y" ? "height" : "width", b = r.reference[h] - r.floating[P] + v.mainAxis, A = r.reference[h] + r.reference[P] - v.mainAxis;
|
|
1218
1188
|
d < b ? d = b : d > A && (d = A);
|
|
1219
1189
|
}
|
|
1220
1190
|
if (c) {
|
|
1221
1191
|
var y, w;
|
|
1222
|
-
const
|
|
1223
|
-
m < A ? m = A : m >
|
|
1192
|
+
const P = h === "y" ? "width" : "height", b = Ut.has(X(i)), A = r.reference[p] - r.floating[P] + (b && ((y = s.offset) == null ? void 0 : y[p]) || 0) + (b ? 0 : v.crossAxis), O = r.reference[p] + r.reference[P] + (b ? 0 : ((w = s.offset) == null ? void 0 : w[p]) || 0) - (b ? v.crossAxis : 0);
|
|
1193
|
+
m < A ? m = A : m > O && (m = O);
|
|
1224
1194
|
}
|
|
1225
1195
|
return {
|
|
1226
1196
|
[h]: d,
|
|
@@ -1228,7 +1198,7 @@ const no = function(e) {
|
|
|
1228
1198
|
};
|
|
1229
1199
|
}
|
|
1230
1200
|
};
|
|
1231
|
-
},
|
|
1201
|
+
}, Qr = function(e) {
|
|
1232
1202
|
return e === void 0 && (e = {}), {
|
|
1233
1203
|
name: "size",
|
|
1234
1204
|
options: e,
|
|
@@ -1249,15 +1219,15 @@ const no = function(e) {
|
|
|
1249
1219
|
} = r.floating;
|
|
1250
1220
|
let v, y;
|
|
1251
1221
|
p === "top" || p === "bottom" ? (v = p, y = h === (await (s.isRTL == null ? void 0 : s.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (y = p, v = h === "end" ? "top" : "bottom");
|
|
1252
|
-
const w = g - u.top - u.bottom,
|
|
1253
|
-
let _ = b,
|
|
1254
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (
|
|
1255
|
-
const
|
|
1256
|
-
d ?
|
|
1222
|
+
const w = g - u.top - u.bottom, P = m - u.left - u.right, b = K(g - u[v], w), A = K(m - u[y], P), O = !t.middlewareData.shift;
|
|
1223
|
+
let _ = b, E = A;
|
|
1224
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (E = P), (o = t.middlewareData.shift) != null && o.enabled.y && (_ = w), O && !h) {
|
|
1225
|
+
const R = I(u.left, 0), $ = I(u.right, 0), k = I(u.top, 0), T = I(u.bottom, 0);
|
|
1226
|
+
d ? E = m - 2 * (R !== 0 || $ !== 0 ? R + $ : I(u.left, u.right)) : _ = g - 2 * (k !== 0 || T !== 0 ? k + T : I(u.top, u.bottom));
|
|
1257
1227
|
}
|
|
1258
1228
|
await l({
|
|
1259
1229
|
...t,
|
|
1260
|
-
availableWidth:
|
|
1230
|
+
availableWidth: E,
|
|
1261
1231
|
availableHeight: _
|
|
1262
1232
|
});
|
|
1263
1233
|
const L = await s.getDimensions(a.floating);
|
|
@@ -1269,49 +1239,49 @@ const no = function(e) {
|
|
|
1269
1239
|
}
|
|
1270
1240
|
};
|
|
1271
1241
|
};
|
|
1272
|
-
function
|
|
1242
|
+
function Oe() {
|
|
1273
1243
|
return typeof window < "u";
|
|
1274
1244
|
}
|
|
1275
1245
|
function le(e) {
|
|
1276
|
-
return
|
|
1246
|
+
return Yt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1277
1247
|
}
|
|
1278
|
-
function
|
|
1248
|
+
function H(e) {
|
|
1279
1249
|
var t;
|
|
1280
1250
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
1281
1251
|
}
|
|
1282
1252
|
function Y(e) {
|
|
1283
1253
|
var t;
|
|
1284
|
-
return (t = (
|
|
1254
|
+
return (t = (Yt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1285
1255
|
}
|
|
1286
|
-
function
|
|
1287
|
-
return
|
|
1256
|
+
function Yt(e) {
|
|
1257
|
+
return Oe() ? e instanceof Node || e instanceof H(e).Node : !1;
|
|
1288
1258
|
}
|
|
1289
|
-
function
|
|
1290
|
-
return
|
|
1259
|
+
function j(e) {
|
|
1260
|
+
return Oe() ? e instanceof Element || e instanceof H(e).Element : !1;
|
|
1291
1261
|
}
|
|
1292
1262
|
function U(e) {
|
|
1293
|
-
return
|
|
1263
|
+
return Oe() ? e instanceof HTMLElement || e instanceof H(e).HTMLElement : !1;
|
|
1294
1264
|
}
|
|
1295
|
-
function
|
|
1296
|
-
return !
|
|
1265
|
+
function _t(e) {
|
|
1266
|
+
return !Oe() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof H(e).ShadowRoot;
|
|
1297
1267
|
}
|
|
1298
|
-
const
|
|
1268
|
+
const eo = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
1299
1269
|
function me(e) {
|
|
1300
1270
|
const {
|
|
1301
1271
|
overflow: t,
|
|
1302
1272
|
overflowX: n,
|
|
1303
1273
|
overflowY: o,
|
|
1304
1274
|
display: i
|
|
1305
|
-
} =
|
|
1306
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !
|
|
1275
|
+
} = W(e);
|
|
1276
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !eo.has(i);
|
|
1307
1277
|
}
|
|
1308
|
-
const
|
|
1309
|
-
function
|
|
1310
|
-
return
|
|
1278
|
+
const to = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
1279
|
+
function no(e) {
|
|
1280
|
+
return to.has(le(e));
|
|
1311
1281
|
}
|
|
1312
|
-
const
|
|
1282
|
+
const ro = [":popover-open", ":modal"];
|
|
1313
1283
|
function Ee(e) {
|
|
1314
|
-
return
|
|
1284
|
+
return ro.some((t) => {
|
|
1315
1285
|
try {
|
|
1316
1286
|
return e.matches(t);
|
|
1317
1287
|
} catch {
|
|
@@ -1319,15 +1289,15 @@ function Ee(e) {
|
|
|
1319
1289
|
}
|
|
1320
1290
|
});
|
|
1321
1291
|
}
|
|
1322
|
-
const
|
|
1323
|
-
function
|
|
1324
|
-
const t =
|
|
1325
|
-
return
|
|
1292
|
+
const oo = ["transform", "translate", "scale", "rotate", "perspective"], io = ["transform", "translate", "scale", "rotate", "perspective", "filter"], so = ["paint", "layout", "strict", "content"];
|
|
1293
|
+
function qe(e) {
|
|
1294
|
+
const t = Ge(), n = j(e) ? W(e) : e;
|
|
1295
|
+
return oo.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) || io.some((o) => (n.willChange || "").includes(o)) || so.some((o) => (n.contain || "").includes(o));
|
|
1326
1296
|
}
|
|
1327
|
-
function
|
|
1297
|
+
function ao(e) {
|
|
1328
1298
|
let t = J(e);
|
|
1329
1299
|
for (; U(t) && !ie(t); ) {
|
|
1330
|
-
if (
|
|
1300
|
+
if (qe(t))
|
|
1331
1301
|
return t;
|
|
1332
1302
|
if (Ee(t))
|
|
1333
1303
|
return null;
|
|
@@ -1335,18 +1305,18 @@ function ho(e) {
|
|
|
1335
1305
|
}
|
|
1336
1306
|
return null;
|
|
1337
1307
|
}
|
|
1338
|
-
function
|
|
1308
|
+
function Ge() {
|
|
1339
1309
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1340
1310
|
}
|
|
1341
|
-
const
|
|
1311
|
+
const co = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
1342
1312
|
function ie(e) {
|
|
1343
|
-
return
|
|
1313
|
+
return co.has(le(e));
|
|
1344
1314
|
}
|
|
1345
|
-
function
|
|
1346
|
-
return
|
|
1315
|
+
function W(e) {
|
|
1316
|
+
return H(e).getComputedStyle(e);
|
|
1347
1317
|
}
|
|
1348
|
-
function
|
|
1349
|
-
return
|
|
1318
|
+
function Re(e) {
|
|
1319
|
+
return j(e) ? {
|
|
1350
1320
|
scrollLeft: e.scrollLeft,
|
|
1351
1321
|
scrollTop: e.scrollTop
|
|
1352
1322
|
} : {
|
|
@@ -1361,80 +1331,80 @@ function J(e) {
|
|
|
1361
1331
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
1362
1332
|
e.assignedSlot || // DOM Element detected.
|
|
1363
1333
|
e.parentNode || // ShadowRoot detected.
|
|
1364
|
-
|
|
1334
|
+
_t(e) && e.host || // Fallback.
|
|
1365
1335
|
Y(e)
|
|
1366
1336
|
);
|
|
1367
|
-
return
|
|
1337
|
+
return _t(t) ? t.host : t;
|
|
1368
1338
|
}
|
|
1369
|
-
function
|
|
1339
|
+
function qt(e) {
|
|
1370
1340
|
const t = J(e);
|
|
1371
|
-
return ie(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : U(t) && me(t) ? t :
|
|
1341
|
+
return ie(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : U(t) && me(t) ? t : qt(t);
|
|
1372
1342
|
}
|
|
1373
1343
|
function he(e, t, n) {
|
|
1374
1344
|
var o;
|
|
1375
1345
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
1376
|
-
const i =
|
|
1346
|
+
const i = qt(e), r = i === ((o = e.ownerDocument) == null ? void 0 : o.body), s = H(i);
|
|
1377
1347
|
if (r) {
|
|
1378
|
-
const a =
|
|
1348
|
+
const a = We(s);
|
|
1379
1349
|
return t.concat(s, s.visualViewport || [], me(i) ? i : [], a && n ? he(a) : []);
|
|
1380
1350
|
}
|
|
1381
1351
|
return t.concat(i, he(i, [], n));
|
|
1382
1352
|
}
|
|
1383
|
-
function
|
|
1353
|
+
function We(e) {
|
|
1384
1354
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1385
1355
|
}
|
|
1386
|
-
function
|
|
1387
|
-
const t =
|
|
1356
|
+
function Gt(e) {
|
|
1357
|
+
const t = W(e);
|
|
1388
1358
|
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
1389
|
-
const i = U(e), r = i ? e.offsetWidth : n, s = i ? e.offsetHeight : o, a =
|
|
1359
|
+
const i = U(e), r = i ? e.offsetWidth : n, s = i ? e.offsetHeight : o, a = _e(n) !== r || _e(o) !== s;
|
|
1390
1360
|
return a && (n = r, o = s), {
|
|
1391
1361
|
width: n,
|
|
1392
1362
|
height: o,
|
|
1393
1363
|
$: a
|
|
1394
1364
|
};
|
|
1395
1365
|
}
|
|
1396
|
-
function
|
|
1397
|
-
return
|
|
1366
|
+
function Xe(e) {
|
|
1367
|
+
return j(e) ? e : e.contextElement;
|
|
1398
1368
|
}
|
|
1399
1369
|
function oe(e) {
|
|
1400
|
-
const t =
|
|
1370
|
+
const t = Xe(e);
|
|
1401
1371
|
if (!U(t))
|
|
1402
1372
|
return V(1);
|
|
1403
1373
|
const n = t.getBoundingClientRect(), {
|
|
1404
1374
|
width: o,
|
|
1405
1375
|
height: i,
|
|
1406
1376
|
$: r
|
|
1407
|
-
} =
|
|
1408
|
-
let s = (r ?
|
|
1377
|
+
} = Gt(t);
|
|
1378
|
+
let s = (r ? _e(n.width) : n.width) / o, a = (r ? _e(n.height) : n.height) / i;
|
|
1409
1379
|
return (!s || !Number.isFinite(s)) && (s = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
1410
1380
|
x: s,
|
|
1411
1381
|
y: a
|
|
1412
1382
|
};
|
|
1413
1383
|
}
|
|
1414
|
-
const
|
|
1415
|
-
function
|
|
1416
|
-
const t =
|
|
1417
|
-
return !
|
|
1384
|
+
const lo = /* @__PURE__ */ V(0);
|
|
1385
|
+
function Xt(e) {
|
|
1386
|
+
const t = H(e);
|
|
1387
|
+
return !Ge() || !t.visualViewport ? lo : {
|
|
1418
1388
|
x: t.visualViewport.offsetLeft,
|
|
1419
1389
|
y: t.visualViewport.offsetTop
|
|
1420
1390
|
};
|
|
1421
1391
|
}
|
|
1422
|
-
function
|
|
1423
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
1392
|
+
function uo(e, t, n) {
|
|
1393
|
+
return t === void 0 && (t = !1), !n || t && n !== H(e) ? !1 : t;
|
|
1424
1394
|
}
|
|
1425
1395
|
function te(e, t, n, o) {
|
|
1426
1396
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1427
|
-
const i = e.getBoundingClientRect(), r =
|
|
1397
|
+
const i = e.getBoundingClientRect(), r = Xe(e);
|
|
1428
1398
|
let s = V(1);
|
|
1429
|
-
t && (o ?
|
|
1430
|
-
const a =
|
|
1399
|
+
t && (o ? j(o) && (s = oe(o)) : s = oe(e));
|
|
1400
|
+
const a = uo(r, n, o) ? Xt(r) : V(0);
|
|
1431
1401
|
let l = (i.left + a.x) / s.x, c = (i.top + a.y) / s.y, u = i.width / s.x, p = i.height / s.y;
|
|
1432
1402
|
if (r) {
|
|
1433
|
-
const h =
|
|
1434
|
-
let m = h, g =
|
|
1403
|
+
const h = H(r), d = o && j(o) ? H(o) : o;
|
|
1404
|
+
let m = h, g = We(m);
|
|
1435
1405
|
for (; g && o && d !== m; ) {
|
|
1436
|
-
const v = oe(g), y = g.getBoundingClientRect(), w =
|
|
1437
|
-
l *= v.x, c *= v.y, u *= v.x, p *= v.y, l +=
|
|
1406
|
+
const v = oe(g), y = g.getBoundingClientRect(), w = W(g), P = y.left + (g.clientLeft + parseFloat(w.paddingLeft)) * v.x, b = y.top + (g.clientTop + parseFloat(w.paddingTop)) * v.y;
|
|
1407
|
+
l *= v.x, c *= v.y, u *= v.x, p *= v.y, l += P, c += b, m = H(g), g = We(m);
|
|
1438
1408
|
}
|
|
1439
1409
|
}
|
|
1440
1410
|
return Pe({
|
|
@@ -1444,18 +1414,18 @@ function te(e, t, n, o) {
|
|
|
1444
1414
|
y: c
|
|
1445
1415
|
});
|
|
1446
1416
|
}
|
|
1447
|
-
function
|
|
1448
|
-
const n =
|
|
1417
|
+
function Se(e, t) {
|
|
1418
|
+
const n = Re(e).scrollLeft;
|
|
1449
1419
|
return t ? t.left + n : te(Y(e)).left + n;
|
|
1450
1420
|
}
|
|
1451
|
-
function
|
|
1452
|
-
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft -
|
|
1421
|
+
function Zt(e, t) {
|
|
1422
|
+
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - Se(e, n), i = n.top + t.scrollTop;
|
|
1453
1423
|
return {
|
|
1454
1424
|
x: o,
|
|
1455
1425
|
y: i
|
|
1456
1426
|
};
|
|
1457
1427
|
}
|
|
1458
|
-
function
|
|
1428
|
+
function fo(e) {
|
|
1459
1429
|
let {
|
|
1460
1430
|
elements: t,
|
|
1461
1431
|
rect: n,
|
|
@@ -1470,11 +1440,11 @@ function yo(e) {
|
|
|
1470
1440
|
scrollTop: 0
|
|
1471
1441
|
}, c = V(1);
|
|
1472
1442
|
const u = V(0), p = U(o);
|
|
1473
|
-
if ((p || !p && !r) && ((le(o) !== "body" || me(s)) && (l =
|
|
1443
|
+
if ((p || !p && !r) && ((le(o) !== "body" || me(s)) && (l = Re(o)), U(o))) {
|
|
1474
1444
|
const d = te(o);
|
|
1475
1445
|
c = oe(o), u.x = d.x + o.clientLeft, u.y = d.y + o.clientTop;
|
|
1476
1446
|
}
|
|
1477
|
-
const h = s && !p && !r ?
|
|
1447
|
+
const h = s && !p && !r ? Zt(s, l) : V(0);
|
|
1478
1448
|
return {
|
|
1479
1449
|
width: n.width * c.x,
|
|
1480
1450
|
height: n.height * c.y,
|
|
@@ -1482,34 +1452,34 @@ function yo(e) {
|
|
|
1482
1452
|
y: n.y * c.y - l.scrollTop * c.y + u.y + h.y
|
|
1483
1453
|
};
|
|
1484
1454
|
}
|
|
1485
|
-
function
|
|
1455
|
+
function po(e) {
|
|
1486
1456
|
return Array.from(e.getClientRects());
|
|
1487
1457
|
}
|
|
1488
|
-
function
|
|
1489
|
-
const t = Y(e), n =
|
|
1490
|
-
let s = -n.scrollLeft +
|
|
1458
|
+
function ho(e) {
|
|
1459
|
+
const t = Y(e), n = Re(e), o = e.ownerDocument.body, i = I(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), r = I(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
1460
|
+
let s = -n.scrollLeft + Se(e);
|
|
1491
1461
|
const a = -n.scrollTop;
|
|
1492
|
-
return
|
|
1462
|
+
return W(o).direction === "rtl" && (s += I(t.clientWidth, o.clientWidth) - i), {
|
|
1493
1463
|
width: i,
|
|
1494
1464
|
height: r,
|
|
1495
1465
|
x: s,
|
|
1496
1466
|
y: a
|
|
1497
1467
|
};
|
|
1498
1468
|
}
|
|
1499
|
-
const
|
|
1500
|
-
function
|
|
1501
|
-
const n =
|
|
1469
|
+
const At = 25;
|
|
1470
|
+
function mo(e, t) {
|
|
1471
|
+
const n = H(e), o = Y(e), i = n.visualViewport;
|
|
1502
1472
|
let r = o.clientWidth, s = o.clientHeight, a = 0, l = 0;
|
|
1503
1473
|
if (i) {
|
|
1504
1474
|
r = i.width, s = i.height;
|
|
1505
|
-
const u =
|
|
1475
|
+
const u = Ge();
|
|
1506
1476
|
(!u || u && t === "fixed") && (a = i.offsetLeft, l = i.offsetTop);
|
|
1507
1477
|
}
|
|
1508
|
-
const c =
|
|
1478
|
+
const c = Se(o);
|
|
1509
1479
|
if (c <= 0) {
|
|
1510
1480
|
const u = o.ownerDocument, p = u.body, h = getComputedStyle(p), d = u.compatMode === "CSS1Compat" && parseFloat(h.marginLeft) + parseFloat(h.marginRight) || 0, m = Math.abs(o.clientWidth - p.clientWidth - d);
|
|
1511
|
-
m <=
|
|
1512
|
-
} else c <=
|
|
1481
|
+
m <= At && (r -= m);
|
|
1482
|
+
} else c <= At && (r += c);
|
|
1513
1483
|
return {
|
|
1514
1484
|
width: r,
|
|
1515
1485
|
height: s,
|
|
@@ -1517,8 +1487,8 @@ function bo(e, t) {
|
|
|
1517
1487
|
y: l
|
|
1518
1488
|
};
|
|
1519
1489
|
}
|
|
1520
|
-
const
|
|
1521
|
-
function
|
|
1490
|
+
const go = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
1491
|
+
function vo(e, t) {
|
|
1522
1492
|
const n = te(e, !0, t === "fixed"), o = n.top + e.clientTop, i = n.left + e.clientLeft, r = U(e) ? oe(e) : V(1), s = e.clientWidth * r.x, a = e.clientHeight * r.y, l = i * r.x, c = o * r.y;
|
|
1523
1493
|
return {
|
|
1524
1494
|
width: s,
|
|
@@ -1527,16 +1497,16 @@ function Ao(e, t) {
|
|
|
1527
1497
|
y: c
|
|
1528
1498
|
};
|
|
1529
1499
|
}
|
|
1530
|
-
function
|
|
1500
|
+
function Pt(e, t, n) {
|
|
1531
1501
|
let o;
|
|
1532
1502
|
if (t === "viewport")
|
|
1533
|
-
o =
|
|
1503
|
+
o = mo(e, n);
|
|
1534
1504
|
else if (t === "document")
|
|
1535
|
-
o =
|
|
1536
|
-
else if (
|
|
1537
|
-
o =
|
|
1505
|
+
o = ho(Y(e));
|
|
1506
|
+
else if (j(t))
|
|
1507
|
+
o = vo(t, n);
|
|
1538
1508
|
else {
|
|
1539
|
-
const i =
|
|
1509
|
+
const i = Xt(e);
|
|
1540
1510
|
o = {
|
|
1541
1511
|
x: t.x - i.x,
|
|
1542
1512
|
y: t.y - i.y,
|
|
@@ -1546,34 +1516,34 @@ function Tt(e, t, n) {
|
|
|
1546
1516
|
}
|
|
1547
1517
|
return Pe(o);
|
|
1548
1518
|
}
|
|
1549
|
-
function
|
|
1519
|
+
function Kt(e, t) {
|
|
1550
1520
|
const n = J(e);
|
|
1551
|
-
return n === t || !
|
|
1521
|
+
return n === t || !j(n) || ie(n) ? !1 : W(n).position === "fixed" || Kt(n, t);
|
|
1552
1522
|
}
|
|
1553
|
-
function
|
|
1523
|
+
function yo(e, t) {
|
|
1554
1524
|
const n = t.get(e);
|
|
1555
1525
|
if (n)
|
|
1556
1526
|
return n;
|
|
1557
|
-
let o = he(e, [], !1).filter((a) =>
|
|
1558
|
-
const r =
|
|
1527
|
+
let o = he(e, [], !1).filter((a) => j(a) && le(a) !== "body"), i = null;
|
|
1528
|
+
const r = W(e).position === "fixed";
|
|
1559
1529
|
let s = r ? J(e) : e;
|
|
1560
|
-
for (;
|
|
1561
|
-
const a =
|
|
1562
|
-
!l && a.position === "fixed" && (i = null), (r ? !l && !i : !l && a.position === "static" && !!i &&
|
|
1530
|
+
for (; j(s) && !ie(s); ) {
|
|
1531
|
+
const a = W(s), l = qe(s);
|
|
1532
|
+
!l && a.position === "fixed" && (i = null), (r ? !l && !i : !l && a.position === "static" && !!i && go.has(i.position) || me(s) && !l && Kt(e, s)) ? o = o.filter((u) => u !== s) : i = a, s = J(s);
|
|
1563
1533
|
}
|
|
1564
1534
|
return t.set(e, o), o;
|
|
1565
1535
|
}
|
|
1566
|
-
function
|
|
1536
|
+
function wo(e) {
|
|
1567
1537
|
let {
|
|
1568
1538
|
element: t,
|
|
1569
1539
|
boundary: n,
|
|
1570
1540
|
rootBoundary: o,
|
|
1571
1541
|
strategy: i
|
|
1572
1542
|
} = e;
|
|
1573
|
-
const s = [...n === "clippingAncestors" ? Ee(t) ? [] :
|
|
1574
|
-
const p =
|
|
1543
|
+
const s = [...n === "clippingAncestors" ? Ee(t) ? [] : yo(t, this._c) : [].concat(n), o], a = s[0], l = s.reduce((c, u) => {
|
|
1544
|
+
const p = Pt(t, u, i);
|
|
1575
1545
|
return c.top = I(p.top, c.top), c.right = K(p.right, c.right), c.bottom = K(p.bottom, c.bottom), c.left = I(p.left, c.left), c;
|
|
1576
|
-
},
|
|
1546
|
+
}, Pt(t, a, i));
|
|
1577
1547
|
return {
|
|
1578
1548
|
width: l.right - l.left,
|
|
1579
1549
|
height: l.bottom - l.top,
|
|
@@ -1581,17 +1551,17 @@ function Po(e) {
|
|
|
1581
1551
|
y: l.top
|
|
1582
1552
|
};
|
|
1583
1553
|
}
|
|
1584
|
-
function
|
|
1554
|
+
function xo(e) {
|
|
1585
1555
|
const {
|
|
1586
1556
|
width: t,
|
|
1587
1557
|
height: n
|
|
1588
|
-
} =
|
|
1558
|
+
} = Gt(e);
|
|
1589
1559
|
return {
|
|
1590
1560
|
width: t,
|
|
1591
1561
|
height: n
|
|
1592
1562
|
};
|
|
1593
1563
|
}
|
|
1594
|
-
function
|
|
1564
|
+
function bo(e, t, n) {
|
|
1595
1565
|
const o = U(t), i = Y(t), r = n === "fixed", s = te(e, !0, r, t);
|
|
1596
1566
|
let a = {
|
|
1597
1567
|
scrollLeft: 0,
|
|
@@ -1599,15 +1569,15 @@ function Ro(e, t, n) {
|
|
|
1599
1569
|
};
|
|
1600
1570
|
const l = V(0);
|
|
1601
1571
|
function c() {
|
|
1602
|
-
l.x =
|
|
1572
|
+
l.x = Se(i);
|
|
1603
1573
|
}
|
|
1604
1574
|
if (o || !o && !r)
|
|
1605
|
-
if ((le(t) !== "body" || me(i)) && (a =
|
|
1575
|
+
if ((le(t) !== "body" || me(i)) && (a = Re(t)), o) {
|
|
1606
1576
|
const d = te(t, !0, r, t);
|
|
1607
1577
|
l.x = d.x + t.clientLeft, l.y = d.y + t.clientTop;
|
|
1608
1578
|
} else i && c();
|
|
1609
1579
|
r && !o && i && c();
|
|
1610
|
-
const u = i && !o && !r ?
|
|
1580
|
+
const u = i && !o && !r ? Zt(i, a) : V(0), p = s.left + a.scrollLeft - l.x - u.x, h = s.top + a.scrollTop - l.y - u.y;
|
|
1611
1581
|
return {
|
|
1612
1582
|
x: p,
|
|
1613
1583
|
y: h,
|
|
@@ -1615,39 +1585,39 @@ function Ro(e, t, n) {
|
|
|
1615
1585
|
height: s.height
|
|
1616
1586
|
};
|
|
1617
1587
|
}
|
|
1618
|
-
function
|
|
1619
|
-
return
|
|
1588
|
+
function Le(e) {
|
|
1589
|
+
return W(e).position === "static";
|
|
1620
1590
|
}
|
|
1621
|
-
function
|
|
1622
|
-
if (!U(e) ||
|
|
1591
|
+
function Ct(e, t) {
|
|
1592
|
+
if (!U(e) || W(e).position === "fixed")
|
|
1623
1593
|
return null;
|
|
1624
1594
|
if (t)
|
|
1625
1595
|
return t(e);
|
|
1626
1596
|
let n = e.offsetParent;
|
|
1627
1597
|
return Y(e) === n && (n = n.ownerDocument.body), n;
|
|
1628
1598
|
}
|
|
1629
|
-
function
|
|
1630
|
-
const n =
|
|
1599
|
+
function Jt(e, t) {
|
|
1600
|
+
const n = H(e);
|
|
1631
1601
|
if (Ee(e))
|
|
1632
1602
|
return n;
|
|
1633
1603
|
if (!U(e)) {
|
|
1634
1604
|
let i = J(e);
|
|
1635
1605
|
for (; i && !ie(i); ) {
|
|
1636
|
-
if (
|
|
1606
|
+
if (j(i) && !Le(i))
|
|
1637
1607
|
return i;
|
|
1638
1608
|
i = J(i);
|
|
1639
1609
|
}
|
|
1640
1610
|
return n;
|
|
1641
1611
|
}
|
|
1642
|
-
let o =
|
|
1643
|
-
for (; o &&
|
|
1644
|
-
o =
|
|
1645
|
-
return o && ie(o) &&
|
|
1612
|
+
let o = Ct(e, t);
|
|
1613
|
+
for (; o && no(o) && Le(o); )
|
|
1614
|
+
o = Ct(o, t);
|
|
1615
|
+
return o && ie(o) && Le(o) && !qe(o) ? n : o || ao(e) || n;
|
|
1646
1616
|
}
|
|
1647
|
-
const
|
|
1648
|
-
const t = this.getOffsetParent ||
|
|
1617
|
+
const _o = async function(e) {
|
|
1618
|
+
const t = this.getOffsetParent || Jt, n = this.getDimensions, o = await n(e.floating);
|
|
1649
1619
|
return {
|
|
1650
|
-
reference:
|
|
1620
|
+
reference: bo(e.reference, await t(e.floating), e.strategy),
|
|
1651
1621
|
floating: {
|
|
1652
1622
|
x: 0,
|
|
1653
1623
|
y: 0,
|
|
@@ -1656,25 +1626,25 @@ const Eo = async function(e) {
|
|
|
1656
1626
|
}
|
|
1657
1627
|
};
|
|
1658
1628
|
};
|
|
1659
|
-
function
|
|
1660
|
-
return
|
|
1629
|
+
function Ao(e) {
|
|
1630
|
+
return W(e).direction === "rtl";
|
|
1661
1631
|
}
|
|
1662
|
-
const
|
|
1663
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1632
|
+
const Po = {
|
|
1633
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: fo,
|
|
1664
1634
|
getDocumentElement: Y,
|
|
1665
|
-
getClippingRect:
|
|
1666
|
-
getOffsetParent:
|
|
1667
|
-
getElementRects:
|
|
1668
|
-
getClientRects:
|
|
1669
|
-
getDimensions:
|
|
1635
|
+
getClippingRect: wo,
|
|
1636
|
+
getOffsetParent: Jt,
|
|
1637
|
+
getElementRects: _o,
|
|
1638
|
+
getClientRects: po,
|
|
1639
|
+
getDimensions: xo,
|
|
1670
1640
|
getScale: oe,
|
|
1671
|
-
isElement:
|
|
1672
|
-
isRTL:
|
|
1641
|
+
isElement: j,
|
|
1642
|
+
isRTL: Ao
|
|
1673
1643
|
};
|
|
1674
|
-
function
|
|
1644
|
+
function Qt(e, t) {
|
|
1675
1645
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1676
1646
|
}
|
|
1677
|
-
function
|
|
1647
|
+
function Co(e, t) {
|
|
1678
1648
|
let n = null, o;
|
|
1679
1649
|
const i = Y(e);
|
|
1680
1650
|
function r() {
|
|
@@ -1691,13 +1661,13 @@ function No(e, t) {
|
|
|
1691
1661
|
} = c;
|
|
1692
1662
|
if (a || t(), !h || !d)
|
|
1693
1663
|
return;
|
|
1694
|
-
const m =
|
|
1664
|
+
const m = ye(p), g = ye(i.clientWidth - (u + h)), v = ye(i.clientHeight - (p + d)), y = ye(u), P = {
|
|
1695
1665
|
rootMargin: -m + "px " + -g + "px " + -v + "px " + -y + "px",
|
|
1696
1666
|
threshold: I(0, K(1, l)) || 1
|
|
1697
1667
|
};
|
|
1698
1668
|
let b = !0;
|
|
1699
|
-
function A(
|
|
1700
|
-
const _ =
|
|
1669
|
+
function A(O) {
|
|
1670
|
+
const _ = O[0].intersectionRatio;
|
|
1701
1671
|
if (_ !== l) {
|
|
1702
1672
|
if (!b)
|
|
1703
1673
|
return s();
|
|
@@ -1705,22 +1675,22 @@ function No(e, t) {
|
|
|
1705
1675
|
s(!1, 1e-7);
|
|
1706
1676
|
}, 1e3);
|
|
1707
1677
|
}
|
|
1708
|
-
_ === 1 && !
|
|
1678
|
+
_ === 1 && !Qt(c, e.getBoundingClientRect()) && s(), b = !1;
|
|
1709
1679
|
}
|
|
1710
1680
|
try {
|
|
1711
1681
|
n = new IntersectionObserver(A, {
|
|
1712
|
-
...
|
|
1682
|
+
...P,
|
|
1713
1683
|
// Handle <iframe>s
|
|
1714
1684
|
root: i.ownerDocument
|
|
1715
1685
|
});
|
|
1716
1686
|
} catch {
|
|
1717
|
-
n = new IntersectionObserver(A,
|
|
1687
|
+
n = new IntersectionObserver(A, P);
|
|
1718
1688
|
}
|
|
1719
1689
|
n.observe(e);
|
|
1720
1690
|
}
|
|
1721
1691
|
return s(!0), r;
|
|
1722
1692
|
}
|
|
1723
|
-
function
|
|
1693
|
+
function Oo(e, t, n, o) {
|
|
1724
1694
|
o === void 0 && (o = {});
|
|
1725
1695
|
const {
|
|
1726
1696
|
ancestorScroll: i = !0,
|
|
@@ -1728,50 +1698,50 @@ function Do(e, t, n, o) {
|
|
|
1728
1698
|
elementResize: s = typeof ResizeObserver == "function",
|
|
1729
1699
|
layoutShift: a = typeof IntersectionObserver == "function",
|
|
1730
1700
|
animationFrame: l = !1
|
|
1731
|
-
} = o, c =
|
|
1701
|
+
} = o, c = Xe(e), u = i || r ? [...c ? he(c) : [], ...he(t)] : [];
|
|
1732
1702
|
u.forEach((y) => {
|
|
1733
1703
|
i && y.addEventListener("scroll", n, {
|
|
1734
1704
|
passive: !0
|
|
1735
1705
|
}), r && y.addEventListener("resize", n);
|
|
1736
1706
|
});
|
|
1737
|
-
const p = c && a ?
|
|
1707
|
+
const p = c && a ? Co(c, n) : null;
|
|
1738
1708
|
let h = -1, d = null;
|
|
1739
1709
|
s && (d = new ResizeObserver((y) => {
|
|
1740
1710
|
let [w] = y;
|
|
1741
1711
|
w && w.target === c && d && (d.unobserve(t), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
1742
|
-
var
|
|
1743
|
-
(
|
|
1712
|
+
var P;
|
|
1713
|
+
(P = d) == null || P.observe(t);
|
|
1744
1714
|
})), n();
|
|
1745
1715
|
}), c && !l && d.observe(c), d.observe(t));
|
|
1746
1716
|
let m, g = l ? te(e) : null;
|
|
1747
1717
|
l && v();
|
|
1748
1718
|
function v() {
|
|
1749
1719
|
const y = te(e);
|
|
1750
|
-
g && !
|
|
1720
|
+
g && !Qt(g, y) && n(), g = y, m = requestAnimationFrame(v);
|
|
1751
1721
|
}
|
|
1752
1722
|
return n(), () => {
|
|
1753
1723
|
var y;
|
|
1754
1724
|
u.forEach((w) => {
|
|
1755
1725
|
i && w.removeEventListener("scroll", n), r && w.removeEventListener("resize", n);
|
|
1756
|
-
}), p
|
|
1726
|
+
}), p?.(), (y = d) == null || y.disconnect(), d = null, l && cancelAnimationFrame(m);
|
|
1757
1727
|
};
|
|
1758
1728
|
}
|
|
1759
|
-
const
|
|
1729
|
+
const Eo = Zr, Ro = Kr, So = qr, To = Qr, No = Gr, Ot = Yr, Do = Jr, Lo = (e, t, n) => {
|
|
1760
1730
|
const o = /* @__PURE__ */ new Map(), i = {
|
|
1761
|
-
platform:
|
|
1731
|
+
platform: Po,
|
|
1762
1732
|
...n
|
|
1763
1733
|
}, r = {
|
|
1764
1734
|
...i.platform,
|
|
1765
1735
|
_c: o
|
|
1766
1736
|
};
|
|
1767
|
-
return
|
|
1737
|
+
return Ur(e, t, {
|
|
1768
1738
|
...i,
|
|
1769
1739
|
platform: r
|
|
1770
1740
|
});
|
|
1771
1741
|
};
|
|
1772
|
-
var
|
|
1773
|
-
},
|
|
1774
|
-
function
|
|
1742
|
+
var Mo = typeof document < "u", $o = function() {
|
|
1743
|
+
}, xe = Mo ? Mn : $o;
|
|
1744
|
+
function Ce(e, t) {
|
|
1775
1745
|
if (e === t)
|
|
1776
1746
|
return !0;
|
|
1777
1747
|
if (typeof e != typeof t)
|
|
@@ -1783,7 +1753,7 @@ function Oe(e, t) {
|
|
|
1783
1753
|
if (Array.isArray(e)) {
|
|
1784
1754
|
if (n = e.length, n !== t.length) return !1;
|
|
1785
1755
|
for (o = n; o-- !== 0; )
|
|
1786
|
-
if (!
|
|
1756
|
+
if (!Ce(e[o], t[o]))
|
|
1787
1757
|
return !1;
|
|
1788
1758
|
return !0;
|
|
1789
1759
|
}
|
|
@@ -1794,27 +1764,27 @@ function Oe(e, t) {
|
|
|
1794
1764
|
return !1;
|
|
1795
1765
|
for (o = n; o-- !== 0; ) {
|
|
1796
1766
|
const r = i[o];
|
|
1797
|
-
if (!(r === "_owner" && e.$$typeof) && !
|
|
1767
|
+
if (!(r === "_owner" && e.$$typeof) && !Ce(e[r], t[r]))
|
|
1798
1768
|
return !1;
|
|
1799
1769
|
}
|
|
1800
1770
|
return !0;
|
|
1801
1771
|
}
|
|
1802
1772
|
return e !== e && t !== t;
|
|
1803
1773
|
}
|
|
1804
|
-
function
|
|
1774
|
+
function en(e) {
|
|
1805
1775
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1806
1776
|
}
|
|
1807
|
-
function
|
|
1808
|
-
const n =
|
|
1777
|
+
function Et(e, t) {
|
|
1778
|
+
const n = en(e);
|
|
1809
1779
|
return Math.round(t * n) / n;
|
|
1810
1780
|
}
|
|
1811
|
-
function
|
|
1781
|
+
function Me(e) {
|
|
1812
1782
|
const t = f.useRef(e);
|
|
1813
|
-
return
|
|
1783
|
+
return xe(() => {
|
|
1814
1784
|
t.current = e;
|
|
1815
1785
|
}), t;
|
|
1816
1786
|
}
|
|
1817
|
-
function
|
|
1787
|
+
function ko(e) {
|
|
1818
1788
|
e === void 0 && (e = {});
|
|
1819
1789
|
const {
|
|
1820
1790
|
placement: t = "bottom",
|
|
@@ -1836,21 +1806,21 @@ function Ho(e) {
|
|
|
1836
1806
|
middlewareData: {},
|
|
1837
1807
|
isPositioned: !1
|
|
1838
1808
|
}), [h, d] = f.useState(o);
|
|
1839
|
-
|
|
1840
|
-
const [m, g] = f.useState(null), [v, y] = f.useState(null), w = f.useCallback((
|
|
1841
|
-
|
|
1842
|
-
}, []),
|
|
1843
|
-
|
|
1844
|
-
}, []), b = r || m, A = s || v,
|
|
1845
|
-
if (!
|
|
1809
|
+
Ce(h, o) || d(o);
|
|
1810
|
+
const [m, g] = f.useState(null), [v, y] = f.useState(null), w = f.useCallback((C) => {
|
|
1811
|
+
C !== O.current && (O.current = C, g(C));
|
|
1812
|
+
}, []), P = f.useCallback((C) => {
|
|
1813
|
+
C !== _.current && (_.current = C, y(C));
|
|
1814
|
+
}, []), b = r || m, A = s || v, O = f.useRef(null), _ = f.useRef(null), E = f.useRef(u), L = l != null, R = Me(l), $ = Me(i), k = Me(c), T = f.useCallback(() => {
|
|
1815
|
+
if (!O.current || !_.current)
|
|
1846
1816
|
return;
|
|
1847
|
-
const
|
|
1817
|
+
const C = {
|
|
1848
1818
|
placement: t,
|
|
1849
1819
|
strategy: n,
|
|
1850
1820
|
middleware: h
|
|
1851
1821
|
};
|
|
1852
|
-
$.current && (
|
|
1853
|
-
const
|
|
1822
|
+
$.current && (C.platform = $.current), Lo(O.current, _.current, C).then((M) => {
|
|
1823
|
+
const B = {
|
|
1854
1824
|
...M,
|
|
1855
1825
|
// The floating element's position may be recomputed while it's closed
|
|
1856
1826
|
// but still mounted (such as when transitioning out). To ensure
|
|
@@ -1858,54 +1828,54 @@ function Ho(e) {
|
|
|
1858
1828
|
// setting it to `true` when `open === false` (must be specified).
|
|
1859
1829
|
isPositioned: k.current !== !1
|
|
1860
1830
|
};
|
|
1861
|
-
S.current && !
|
|
1862
|
-
p(
|
|
1831
|
+
S.current && !Ce(E.current, B) && (E.current = B, Tt.flushSync(() => {
|
|
1832
|
+
p(B);
|
|
1863
1833
|
}));
|
|
1864
1834
|
});
|
|
1865
1835
|
}, [h, t, n, $, k]);
|
|
1866
|
-
|
|
1867
|
-
c === !1 &&
|
|
1868
|
-
...
|
|
1836
|
+
xe(() => {
|
|
1837
|
+
c === !1 && E.current.isPositioned && (E.current.isPositioned = !1, p((C) => ({
|
|
1838
|
+
...C,
|
|
1869
1839
|
isPositioned: !1
|
|
1870
1840
|
})));
|
|
1871
1841
|
}, [c]);
|
|
1872
1842
|
const S = f.useRef(!1);
|
|
1873
|
-
|
|
1843
|
+
xe(() => (S.current = !0, () => {
|
|
1874
1844
|
S.current = !1;
|
|
1875
|
-
}), []),
|
|
1876
|
-
if (b && (
|
|
1877
|
-
if (
|
|
1878
|
-
return
|
|
1845
|
+
}), []), xe(() => {
|
|
1846
|
+
if (b && (O.current = b), A && (_.current = A), b && A) {
|
|
1847
|
+
if (R.current)
|
|
1848
|
+
return R.current(b, A, T);
|
|
1879
1849
|
T();
|
|
1880
1850
|
}
|
|
1881
|
-
}, [b, A, T,
|
|
1851
|
+
}, [b, A, T, R, L]);
|
|
1882
1852
|
const F = f.useMemo(() => ({
|
|
1883
|
-
reference:
|
|
1853
|
+
reference: O,
|
|
1884
1854
|
floating: _,
|
|
1885
1855
|
setReference: w,
|
|
1886
|
-
setFloating:
|
|
1887
|
-
}), [w,
|
|
1856
|
+
setFloating: P
|
|
1857
|
+
}), [w, P]), N = f.useMemo(() => ({
|
|
1888
1858
|
reference: b,
|
|
1889
1859
|
floating: A
|
|
1890
1860
|
}), [b, A]), D = f.useMemo(() => {
|
|
1891
|
-
const
|
|
1861
|
+
const C = {
|
|
1892
1862
|
position: n,
|
|
1893
1863
|
left: 0,
|
|
1894
1864
|
top: 0
|
|
1895
1865
|
};
|
|
1896
1866
|
if (!N.floating)
|
|
1897
|
-
return
|
|
1898
|
-
const M =
|
|
1867
|
+
return C;
|
|
1868
|
+
const M = Et(N.floating, u.x), B = Et(N.floating, u.y);
|
|
1899
1869
|
return a ? {
|
|
1900
|
-
...
|
|
1901
|
-
transform: "translate(" + M + "px, " +
|
|
1902
|
-
...
|
|
1870
|
+
...C,
|
|
1871
|
+
transform: "translate(" + M + "px, " + B + "px)",
|
|
1872
|
+
...en(N.floating) >= 1.5 && {
|
|
1903
1873
|
willChange: "transform"
|
|
1904
1874
|
}
|
|
1905
1875
|
} : {
|
|
1906
1876
|
position: n,
|
|
1907
1877
|
left: M,
|
|
1908
|
-
top:
|
|
1878
|
+
top: B
|
|
1909
1879
|
};
|
|
1910
1880
|
}, [n, a, N.floating, u.x, u.y]);
|
|
1911
1881
|
return f.useMemo(() => ({
|
|
@@ -1916,7 +1886,7 @@ function Ho(e) {
|
|
|
1916
1886
|
floatingStyles: D
|
|
1917
1887
|
}), [u, T, F, N, D]);
|
|
1918
1888
|
}
|
|
1919
|
-
const
|
|
1889
|
+
const Fo = (e) => {
|
|
1920
1890
|
function t(n) {
|
|
1921
1891
|
return {}.hasOwnProperty.call(n, "current");
|
|
1922
1892
|
}
|
|
@@ -1928,38 +1898,38 @@ const zo = (e) => {
|
|
|
1928
1898
|
element: o,
|
|
1929
1899
|
padding: i
|
|
1930
1900
|
} = typeof e == "function" ? e(n) : e;
|
|
1931
|
-
return o && t(o) ? o.current != null ?
|
|
1901
|
+
return o && t(o) ? o.current != null ? Ot({
|
|
1932
1902
|
element: o.current,
|
|
1933
1903
|
padding: i
|
|
1934
|
-
}).fn(n) : {} : o ?
|
|
1904
|
+
}).fn(n) : {} : o ? Ot({
|
|
1935
1905
|
element: o,
|
|
1936
1906
|
padding: i
|
|
1937
1907
|
}).fn(n) : {};
|
|
1938
1908
|
}
|
|
1939
1909
|
};
|
|
1940
|
-
},
|
|
1941
|
-
...
|
|
1910
|
+
}, Io = (e, t) => ({
|
|
1911
|
+
...Eo(e),
|
|
1942
1912
|
options: [e, t]
|
|
1943
|
-
}),
|
|
1944
|
-
...
|
|
1913
|
+
}), Ho = (e, t) => ({
|
|
1914
|
+
...Ro(e),
|
|
1945
1915
|
options: [e, t]
|
|
1946
|
-
}),
|
|
1947
|
-
...
|
|
1916
|
+
}), jo = (e, t) => ({
|
|
1917
|
+
...Do(e),
|
|
1948
1918
|
options: [e, t]
|
|
1949
|
-
}),
|
|
1950
|
-
|
|
1919
|
+
}), Wo = (e, t) => ({
|
|
1920
|
+
...So(e),
|
|
1951
1921
|
options: [e, t]
|
|
1952
|
-
}),
|
|
1953
|
-
...
|
|
1922
|
+
}), Bo = (e, t) => ({
|
|
1923
|
+
...To(e),
|
|
1954
1924
|
options: [e, t]
|
|
1955
|
-
}),
|
|
1956
|
-
...
|
|
1925
|
+
}), zo = (e, t) => ({
|
|
1926
|
+
...No(e),
|
|
1957
1927
|
options: [e, t]
|
|
1958
|
-
}),
|
|
1959
|
-
...
|
|
1928
|
+
}), Vo = (e, t) => ({
|
|
1929
|
+
...Fo(e),
|
|
1960
1930
|
options: [e, t]
|
|
1961
1931
|
});
|
|
1962
|
-
var
|
|
1932
|
+
var Uo = "Arrow", tn = f.forwardRef((e, t) => {
|
|
1963
1933
|
const { children: n, width: o = 10, height: i = 5, ...r } = e;
|
|
1964
1934
|
return /* @__PURE__ */ x(
|
|
1965
1935
|
Q.svg,
|
|
@@ -1974,9 +1944,9 @@ var Ko = "Arrow", cn = f.forwardRef((e, t) => {
|
|
|
1974
1944
|
}
|
|
1975
1945
|
);
|
|
1976
1946
|
});
|
|
1977
|
-
|
|
1978
|
-
var
|
|
1979
|
-
function
|
|
1947
|
+
tn.displayName = Uo;
|
|
1948
|
+
var Yo = tn;
|
|
1949
|
+
function qo(e) {
|
|
1980
1950
|
const [t, n] = f.useState(void 0);
|
|
1981
1951
|
return ee(() => {
|
|
1982
1952
|
if (e) {
|
|
@@ -1998,23 +1968,22 @@ function Qo(e) {
|
|
|
1998
1968
|
n(void 0);
|
|
1999
1969
|
}, [e]), t;
|
|
2000
1970
|
}
|
|
2001
|
-
var
|
|
1971
|
+
var Ze = "Popper", [nn, rn] = It(Ze), [Go, on] = nn(Ze), sn = (e) => {
|
|
2002
1972
|
const { __scopePopper: t, children: n } = e, [o, i] = f.useState(null);
|
|
2003
|
-
return /* @__PURE__ */ x(
|
|
1973
|
+
return /* @__PURE__ */ x(Go, { scope: t, anchor: o, onAnchorChange: i, children: n });
|
|
2004
1974
|
};
|
|
2005
|
-
|
|
2006
|
-
var
|
|
1975
|
+
sn.displayName = Ze;
|
|
1976
|
+
var an = "PopperAnchor", cn = f.forwardRef(
|
|
2007
1977
|
(e, t) => {
|
|
2008
|
-
const { __scopePopper: n, virtualRef: o, ...i } = e, r =
|
|
1978
|
+
const { __scopePopper: n, virtualRef: o, ...i } = e, r = on(an, n), s = f.useRef(null), a = ne(t, s);
|
|
2009
1979
|
return f.useEffect(() => {
|
|
2010
|
-
r.onAnchorChange(
|
|
1980
|
+
r.onAnchorChange(o?.current || s.current);
|
|
2011
1981
|
}), o ? null : /* @__PURE__ */ x(Q.div, { ...i, ref: a });
|
|
2012
1982
|
}
|
|
2013
1983
|
);
|
|
2014
|
-
|
|
2015
|
-
var
|
|
1984
|
+
cn.displayName = an;
|
|
1985
|
+
var Ke = "PopperContent", [Xo, Zo] = nn(Ke), ln = f.forwardRef(
|
|
2016
1986
|
(e, t) => {
|
|
2017
|
-
var nt, rt, ot, it, st, at;
|
|
2018
1987
|
const {
|
|
2019
1988
|
__scopePopper: n,
|
|
2020
1989
|
side: o = "bottom",
|
|
@@ -2030,48 +1999,48 @@ var Je = "PopperContent", [ti, ni] = ln(Je), mn = f.forwardRef(
|
|
|
2030
1999
|
updatePositionStrategy: d = "optimized",
|
|
2031
2000
|
onPlaced: m,
|
|
2032
2001
|
...g
|
|
2033
|
-
} = e, v =
|
|
2034
|
-
padding:
|
|
2035
|
-
boundary: $.filter(
|
|
2002
|
+
} = e, v = on(Ke, n), [y, w] = f.useState(null), P = ne(t, (ue) => w(ue)), [b, A] = f.useState(null), O = qo(b), _ = O?.width ?? 0, E = O?.height ?? 0, L = o + (r !== "center" ? "-" + r : ""), R = typeof u == "number" ? u : { top: 0, right: 0, bottom: 0, left: 0, ...u }, $ = Array.isArray(c) ? c : [c], k = $.length > 0, T = {
|
|
2003
|
+
padding: R,
|
|
2004
|
+
boundary: $.filter(Jo),
|
|
2036
2005
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
2037
2006
|
altBoundary: k
|
|
2038
|
-
}, { refs: S, floatingStyles: F, placement: N, isPositioned: D, middlewareData:
|
|
2007
|
+
}, { refs: S, floatingStyles: F, placement: N, isPositioned: D, middlewareData: C } = ko({
|
|
2039
2008
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
2040
2009
|
strategy: "fixed",
|
|
2041
2010
|
placement: L,
|
|
2042
|
-
whileElementsMounted: (...ue) =>
|
|
2011
|
+
whileElementsMounted: (...ue) => Oo(...ue, {
|
|
2043
2012
|
animationFrame: d === "always"
|
|
2044
2013
|
}),
|
|
2045
2014
|
elements: {
|
|
2046
2015
|
reference: v.anchor
|
|
2047
2016
|
},
|
|
2048
2017
|
middleware: [
|
|
2049
|
-
|
|
2050
|
-
l &&
|
|
2018
|
+
Io({ mainAxis: i + E, alignmentAxis: s }),
|
|
2019
|
+
l && Ho({
|
|
2051
2020
|
mainAxis: !0,
|
|
2052
2021
|
crossAxis: !1,
|
|
2053
|
-
limiter: p === "partial" ?
|
|
2022
|
+
limiter: p === "partial" ? jo() : void 0,
|
|
2054
2023
|
...T
|
|
2055
2024
|
}),
|
|
2056
|
-
l &&
|
|
2057
|
-
|
|
2025
|
+
l && Wo({ ...T }),
|
|
2026
|
+
Bo({
|
|
2058
2027
|
...T,
|
|
2059
|
-
apply: ({ elements: ue, rects:
|
|
2060
|
-
const { width:
|
|
2061
|
-
|
|
2028
|
+
apply: ({ elements: ue, rects: nt, availableWidth: Sn, availableHeight: Tn }) => {
|
|
2029
|
+
const { width: Nn, height: Dn } = nt.reference, ve = ue.floating.style;
|
|
2030
|
+
ve.setProperty("--radix-popper-available-width", `${Sn}px`), ve.setProperty("--radix-popper-available-height", `${Tn}px`), ve.setProperty("--radix-popper-anchor-width", `${Nn}px`), ve.setProperty("--radix-popper-anchor-height", `${Dn}px`);
|
|
2062
2031
|
}
|
|
2063
2032
|
}),
|
|
2064
|
-
b &&
|
|
2065
|
-
|
|
2066
|
-
h &&
|
|
2033
|
+
b && Vo({ element: b, padding: a }),
|
|
2034
|
+
Qo({ arrowWidth: _, arrowHeight: E }),
|
|
2035
|
+
h && zo({ strategy: "referenceHidden", ...T })
|
|
2067
2036
|
]
|
|
2068
|
-
}), [M,
|
|
2037
|
+
}), [M, B] = pn(N), tt = ae(m);
|
|
2069
2038
|
ee(() => {
|
|
2070
|
-
D && (
|
|
2071
|
-
}, [D,
|
|
2072
|
-
const
|
|
2039
|
+
D && tt?.();
|
|
2040
|
+
}, [D, tt]);
|
|
2041
|
+
const Pn = C.arrow?.x, Cn = C.arrow?.y, On = C.arrow?.centerOffset !== 0, [En, Rn] = f.useState();
|
|
2073
2042
|
return ee(() => {
|
|
2074
|
-
y &&
|
|
2043
|
+
y && Rn(window.getComputedStyle(y).zIndex);
|
|
2075
2044
|
}, [y]), /* @__PURE__ */ x(
|
|
2076
2045
|
"div",
|
|
2077
2046
|
{
|
|
@@ -2082,36 +2051,36 @@ var Je = "PopperContent", [ti, ni] = ln(Je), mn = f.forwardRef(
|
|
|
2082
2051
|
transform: D ? F.transform : "translate(0, -200%)",
|
|
2083
2052
|
// keep off the page when measuring
|
|
2084
2053
|
minWidth: "max-content",
|
|
2085
|
-
zIndex:
|
|
2054
|
+
zIndex: En,
|
|
2086
2055
|
"--radix-popper-transform-origin": [
|
|
2087
|
-
|
|
2088
|
-
|
|
2056
|
+
C.transformOrigin?.x,
|
|
2057
|
+
C.transformOrigin?.y
|
|
2089
2058
|
].join(" "),
|
|
2090
2059
|
// hide the content if using the hide middleware and should be hidden
|
|
2091
2060
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
2092
2061
|
// as if the PopperContent isn't there at all
|
|
2093
|
-
...
|
|
2062
|
+
...C.hide?.referenceHidden && {
|
|
2094
2063
|
visibility: "hidden",
|
|
2095
2064
|
pointerEvents: "none"
|
|
2096
2065
|
}
|
|
2097
2066
|
},
|
|
2098
2067
|
dir: e.dir,
|
|
2099
2068
|
children: /* @__PURE__ */ x(
|
|
2100
|
-
|
|
2069
|
+
Xo,
|
|
2101
2070
|
{
|
|
2102
2071
|
scope: n,
|
|
2103
2072
|
placedSide: M,
|
|
2104
2073
|
onArrowChange: A,
|
|
2105
|
-
arrowX:
|
|
2106
|
-
arrowY:
|
|
2107
|
-
shouldHideArrow:
|
|
2074
|
+
arrowX: Pn,
|
|
2075
|
+
arrowY: Cn,
|
|
2076
|
+
shouldHideArrow: On,
|
|
2108
2077
|
children: /* @__PURE__ */ x(
|
|
2109
2078
|
Q.div,
|
|
2110
2079
|
{
|
|
2111
2080
|
"data-side": M,
|
|
2112
|
-
"data-align":
|
|
2081
|
+
"data-align": B,
|
|
2113
2082
|
...g,
|
|
2114
|
-
ref:
|
|
2083
|
+
ref: P,
|
|
2115
2084
|
style: {
|
|
2116
2085
|
...g.style,
|
|
2117
2086
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
@@ -2126,14 +2095,14 @@ var Je = "PopperContent", [ti, ni] = ln(Je), mn = f.forwardRef(
|
|
|
2126
2095
|
);
|
|
2127
2096
|
}
|
|
2128
2097
|
);
|
|
2129
|
-
|
|
2130
|
-
var
|
|
2098
|
+
ln.displayName = Ke;
|
|
2099
|
+
var un = "PopperArrow", Ko = {
|
|
2131
2100
|
top: "bottom",
|
|
2132
2101
|
right: "left",
|
|
2133
2102
|
bottom: "top",
|
|
2134
2103
|
left: "right"
|
|
2135
|
-
},
|
|
2136
|
-
const { __scopePopper: o, ...i } = t, r =
|
|
2104
|
+
}, fn = f.forwardRef(function(t, n) {
|
|
2105
|
+
const { __scopePopper: o, ...i } = t, r = Zo(un, o), s = Ko[r.placedSide];
|
|
2137
2106
|
return (
|
|
2138
2107
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
2139
2108
|
// doesn't report size as we'd expect on SVG elements.
|
|
@@ -2162,7 +2131,7 @@ var gn = "PopperArrow", ri = {
|
|
|
2162
2131
|
visibility: r.shouldHideArrow ? "hidden" : void 0
|
|
2163
2132
|
},
|
|
2164
2133
|
children: /* @__PURE__ */ x(
|
|
2165
|
-
|
|
2134
|
+
Yo,
|
|
2166
2135
|
{
|
|
2167
2136
|
...i,
|
|
2168
2137
|
ref: n,
|
|
@@ -2177,42 +2146,40 @@ var gn = "PopperArrow", ri = {
|
|
|
2177
2146
|
)
|
|
2178
2147
|
);
|
|
2179
2148
|
});
|
|
2180
|
-
|
|
2181
|
-
function
|
|
2149
|
+
fn.displayName = un;
|
|
2150
|
+
function Jo(e) {
|
|
2182
2151
|
return e !== null;
|
|
2183
2152
|
}
|
|
2184
|
-
var
|
|
2153
|
+
var Qo = (e) => ({
|
|
2185
2154
|
name: "transformOrigin",
|
|
2186
2155
|
options: e,
|
|
2187
2156
|
fn(t) {
|
|
2188
|
-
|
|
2189
|
-
const { placement: n, rects: o, middlewareData: i } = t, s = ((v = i.arrow) == null ? void 0 : v.centerOffset) !== 0, a = s ? 0 : e.arrowWidth, l = s ? 0 : e.arrowHeight, [c, u] = yn(n), p = { start: "0%", center: "50%", end: "100%" }[u], h = (((y = i.arrow) == null ? void 0 : y.x) ?? 0) + a / 2, d = (((w = i.arrow) == null ? void 0 : w.y) ?? 0) + l / 2;
|
|
2157
|
+
const { placement: n, rects: o, middlewareData: i } = t, s = i.arrow?.centerOffset !== 0, a = s ? 0 : e.arrowWidth, l = s ? 0 : e.arrowHeight, [c, u] = pn(n), p = { start: "0%", center: "50%", end: "100%" }[u], h = (i.arrow?.x ?? 0) + a / 2, d = (i.arrow?.y ?? 0) + l / 2;
|
|
2190
2158
|
let m = "", g = "";
|
|
2191
2159
|
return c === "bottom" ? (m = s ? p : `${h}px`, g = `${-l}px`) : c === "top" ? (m = s ? p : `${h}px`, g = `${o.floating.height + l}px`) : c === "right" ? (m = `${-l}px`, g = s ? p : `${d}px`) : c === "left" && (m = `${o.floating.width + l}px`, g = s ? p : `${d}px`), { data: { x: m, y: g } };
|
|
2192
2160
|
}
|
|
2193
2161
|
});
|
|
2194
|
-
function
|
|
2162
|
+
function pn(e) {
|
|
2195
2163
|
const [t, n = "center"] = e.split("-");
|
|
2196
2164
|
return [t, n];
|
|
2197
2165
|
}
|
|
2198
|
-
var
|
|
2199
|
-
var a;
|
|
2166
|
+
var ei = sn, ti = cn, ni = ln, ri = fn, oi = "Portal", dn = f.forwardRef((e, t) => {
|
|
2200
2167
|
const { container: n, ...o } = e, [i, r] = f.useState(!1);
|
|
2201
2168
|
ee(() => r(!0), []);
|
|
2202
|
-
const s = n || i &&
|
|
2203
|
-
return s ?
|
|
2169
|
+
const s = n || i && globalThis?.document?.body;
|
|
2170
|
+
return s ? Fn.createPortal(/* @__PURE__ */ x(Q.div, { ...o, ref: t }), s) : null;
|
|
2204
2171
|
});
|
|
2205
|
-
|
|
2206
|
-
function
|
|
2172
|
+
dn.displayName = oi;
|
|
2173
|
+
function ii(e, t) {
|
|
2207
2174
|
return f.useReducer((n, o) => t[n][o] ?? n, e);
|
|
2208
2175
|
}
|
|
2209
|
-
var
|
|
2210
|
-
const { present: t, children: n } = e, o =
|
|
2176
|
+
var Je = (e) => {
|
|
2177
|
+
const { present: t, children: n } = e, o = si(t), i = typeof n == "function" ? n({ present: o.isPresent }) : f.Children.only(n), r = ne(o.ref, ai(i));
|
|
2211
2178
|
return typeof n == "function" || o.isPresent ? f.cloneElement(i, { ref: r }) : null;
|
|
2212
2179
|
};
|
|
2213
|
-
|
|
2214
|
-
function
|
|
2215
|
-
const [t, n] = f.useState(), o = f.useRef({}), i = f.useRef(e), r = f.useRef("none"), s = e ? "mounted" : "unmounted", [a, l] =
|
|
2180
|
+
Je.displayName = "Presence";
|
|
2181
|
+
function si(e) {
|
|
2182
|
+
const [t, n] = f.useState(), o = f.useRef({}), i = f.useRef(e), r = f.useRef("none"), s = e ? "mounted" : "unmounted", [a, l] = ii(s, {
|
|
2216
2183
|
mounted: {
|
|
2217
2184
|
UNMOUNT: "unmounted",
|
|
2218
2185
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -2226,19 +2193,19 @@ function pi(e) {
|
|
|
2226
2193
|
}
|
|
2227
2194
|
});
|
|
2228
2195
|
return f.useEffect(() => {
|
|
2229
|
-
const c =
|
|
2196
|
+
const c = we(o.current);
|
|
2230
2197
|
r.current = a === "mounted" ? c : "none";
|
|
2231
2198
|
}, [a]), ee(() => {
|
|
2232
2199
|
const c = o.current, u = i.current;
|
|
2233
2200
|
if (u !== e) {
|
|
2234
|
-
const h = r.current, d =
|
|
2235
|
-
e ? l("MOUNT") : d === "none" ||
|
|
2201
|
+
const h = r.current, d = we(c);
|
|
2202
|
+
e ? l("MOUNT") : d === "none" || c?.display === "none" ? l("UNMOUNT") : l(u && h !== d ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
|
|
2236
2203
|
}
|
|
2237
2204
|
}, [e, l]), ee(() => {
|
|
2238
2205
|
if (t) {
|
|
2239
2206
|
let c;
|
|
2240
2207
|
const u = t.ownerDocument.defaultView ?? window, p = (d) => {
|
|
2241
|
-
const g =
|
|
2208
|
+
const g = we(o.current).includes(d.animationName);
|
|
2242
2209
|
if (d.target === t && g && (l("ANIMATION_END"), !i.current)) {
|
|
2243
2210
|
const v = t.style.animationFillMode;
|
|
2244
2211
|
t.style.animationFillMode = "forwards", c = u.setTimeout(() => {
|
|
@@ -2246,7 +2213,7 @@ function pi(e) {
|
|
|
2246
2213
|
});
|
|
2247
2214
|
}
|
|
2248
2215
|
}, h = (d) => {
|
|
2249
|
-
d.target === t && (r.current =
|
|
2216
|
+
d.target === t && (r.current = we(o.current));
|
|
2250
2217
|
};
|
|
2251
2218
|
return t.addEventListener("animationstart", h), t.addEventListener("animationcancel", p), t.addEventListener("animationend", p), () => {
|
|
2252
2219
|
u.clearTimeout(c), t.removeEventListener("animationstart", h), t.removeEventListener("animationcancel", p), t.removeEventListener("animationend", p);
|
|
@@ -2260,21 +2227,20 @@ function pi(e) {
|
|
|
2260
2227
|
}, [])
|
|
2261
2228
|
};
|
|
2262
2229
|
}
|
|
2263
|
-
function
|
|
2264
|
-
return
|
|
2230
|
+
function we(e) {
|
|
2231
|
+
return e?.animationName || "none";
|
|
2265
2232
|
}
|
|
2266
|
-
function
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
return n ? e.ref : (t = (i = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : i.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
2233
|
+
function ai(e) {
|
|
2234
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
2235
|
+
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
2270
2236
|
}
|
|
2271
|
-
function
|
|
2237
|
+
function ci({
|
|
2272
2238
|
prop: e,
|
|
2273
2239
|
defaultProp: t,
|
|
2274
2240
|
onChange: n = () => {
|
|
2275
2241
|
}
|
|
2276
2242
|
}) {
|
|
2277
|
-
const [o, i] =
|
|
2243
|
+
const [o, i] = li({ defaultProp: t, onChange: n }), r = e !== void 0, s = r ? e : o, a = ae(n), l = f.useCallback(
|
|
2278
2244
|
(c) => {
|
|
2279
2245
|
if (r) {
|
|
2280
2246
|
const p = typeof c == "function" ? c(e) : c;
|
|
@@ -2286,7 +2252,7 @@ function hi({
|
|
|
2286
2252
|
);
|
|
2287
2253
|
return [s, l];
|
|
2288
2254
|
}
|
|
2289
|
-
function
|
|
2255
|
+
function li({
|
|
2290
2256
|
defaultProp: e,
|
|
2291
2257
|
onChange: t
|
|
2292
2258
|
}) {
|
|
@@ -2295,7 +2261,7 @@ function mi({
|
|
|
2295
2261
|
i.current !== o && (r(o), i.current = o);
|
|
2296
2262
|
}, [o, i, r]), n;
|
|
2297
2263
|
}
|
|
2298
|
-
var
|
|
2264
|
+
var ui = "VisuallyHidden", hn = f.forwardRef(
|
|
2299
2265
|
(e, t) => /* @__PURE__ */ x(
|
|
2300
2266
|
Q.span,
|
|
2301
2267
|
{
|
|
@@ -2318,13 +2284,13 @@ var gi = "VisuallyHidden", xn = f.forwardRef(
|
|
|
2318
2284
|
}
|
|
2319
2285
|
)
|
|
2320
2286
|
);
|
|
2321
|
-
|
|
2322
|
-
var
|
|
2323
|
-
|
|
2324
|
-
]),
|
|
2287
|
+
hn.displayName = ui;
|
|
2288
|
+
var fi = hn, [Te] = It("Tooltip", [
|
|
2289
|
+
rn
|
|
2290
|
+
]), Ne = rn(), mn = "TooltipProvider", pi = 700, Be = "tooltip.open", [di, Qe] = Te(mn), gn = (e) => {
|
|
2325
2291
|
const {
|
|
2326
2292
|
__scopeTooltip: t,
|
|
2327
|
-
delayDuration: n =
|
|
2293
|
+
delayDuration: n = pi,
|
|
2328
2294
|
skipDelayDuration: o = 300,
|
|
2329
2295
|
disableHoverableContent: i = !1,
|
|
2330
2296
|
children: r
|
|
@@ -2333,7 +2299,7 @@ var vi = xn, [Ne] = Vt("Tooltip", [
|
|
|
2333
2299
|
const u = c.current;
|
|
2334
2300
|
return () => window.clearTimeout(u);
|
|
2335
2301
|
}, []), /* @__PURE__ */ x(
|
|
2336
|
-
|
|
2302
|
+
di,
|
|
2337
2303
|
{
|
|
2338
2304
|
scope: t,
|
|
2339
2305
|
isOpenDelayed: s,
|
|
@@ -2356,8 +2322,8 @@ var vi = xn, [Ne] = Vt("Tooltip", [
|
|
|
2356
2322
|
}
|
|
2357
2323
|
);
|
|
2358
2324
|
};
|
|
2359
|
-
|
|
2360
|
-
var
|
|
2325
|
+
gn.displayName = mn;
|
|
2326
|
+
var De = "Tooltip", [hi, ge] = Te(De), vn = (e) => {
|
|
2361
2327
|
const {
|
|
2362
2328
|
__scopeTooltip: t,
|
|
2363
2329
|
children: n,
|
|
@@ -2366,35 +2332,35 @@ var Le = "Tooltip", [xi, ge] = Ne(Le), An = (e) => {
|
|
|
2366
2332
|
onOpenChange: r,
|
|
2367
2333
|
disableHoverableContent: s,
|
|
2368
2334
|
delayDuration: a
|
|
2369
|
-
} = e, l =
|
|
2335
|
+
} = e, l = Qe(De, e.__scopeTooltip), c = Ne(t), [u, p] = f.useState(null), h = Lr(), d = f.useRef(0), m = s ?? l.disableHoverableContent, g = a ?? l.delayDuration, v = f.useRef(!1), [y = !1, w] = ci({
|
|
2370
2336
|
prop: o,
|
|
2371
2337
|
defaultProp: i,
|
|
2372
2338
|
onChange: (_) => {
|
|
2373
|
-
_ ? (l.onOpen(), document.dispatchEvent(new CustomEvent(
|
|
2339
|
+
_ ? (l.onOpen(), document.dispatchEvent(new CustomEvent(Be))) : l.onClose(), r?.(_);
|
|
2374
2340
|
}
|
|
2375
|
-
}),
|
|
2341
|
+
}), P = f.useMemo(() => y ? v.current ? "delayed-open" : "instant-open" : "closed", [y]), b = f.useCallback(() => {
|
|
2376
2342
|
window.clearTimeout(d.current), d.current = 0, v.current = !1, w(!0);
|
|
2377
2343
|
}, [w]), A = f.useCallback(() => {
|
|
2378
2344
|
window.clearTimeout(d.current), d.current = 0, w(!1);
|
|
2379
|
-
}, [w]),
|
|
2345
|
+
}, [w]), O = f.useCallback(() => {
|
|
2380
2346
|
window.clearTimeout(d.current), d.current = window.setTimeout(() => {
|
|
2381
2347
|
v.current = !0, w(!0), d.current = 0;
|
|
2382
2348
|
}, g);
|
|
2383
2349
|
}, [g, w]);
|
|
2384
2350
|
return f.useEffect(() => () => {
|
|
2385
2351
|
d.current && (window.clearTimeout(d.current), d.current = 0);
|
|
2386
|
-
}, []), /* @__PURE__ */ x(
|
|
2387
|
-
|
|
2352
|
+
}, []), /* @__PURE__ */ x(ei, { ...c, children: /* @__PURE__ */ x(
|
|
2353
|
+
hi,
|
|
2388
2354
|
{
|
|
2389
2355
|
scope: t,
|
|
2390
2356
|
contentId: h,
|
|
2391
2357
|
open: y,
|
|
2392
|
-
stateAttribute:
|
|
2358
|
+
stateAttribute: P,
|
|
2393
2359
|
trigger: u,
|
|
2394
2360
|
onTriggerChange: p,
|
|
2395
2361
|
onTriggerEnter: f.useCallback(() => {
|
|
2396
|
-
l.isOpenDelayed ?
|
|
2397
|
-
}, [l.isOpenDelayed,
|
|
2362
|
+
l.isOpenDelayed ? O() : b();
|
|
2363
|
+
}, [l.isOpenDelayed, O, b]),
|
|
2398
2364
|
onTriggerLeave: f.useCallback(() => {
|
|
2399
2365
|
m ? A() : (window.clearTimeout(d.current), d.current = 0);
|
|
2400
2366
|
}, [A, m]),
|
|
@@ -2405,11 +2371,11 @@ var Le = "Tooltip", [xi, ge] = Ne(Le), An = (e) => {
|
|
|
2405
2371
|
}
|
|
2406
2372
|
) });
|
|
2407
2373
|
};
|
|
2408
|
-
|
|
2409
|
-
var
|
|
2374
|
+
vn.displayName = De;
|
|
2375
|
+
var ze = "TooltipTrigger", yn = f.forwardRef(
|
|
2410
2376
|
(e, t) => {
|
|
2411
|
-
const { __scopeTooltip: n, ...o } = e, i = ge(
|
|
2412
|
-
return f.useEffect(() => () => document.removeEventListener("pointerup", p), [p]), /* @__PURE__ */ x(
|
|
2377
|
+
const { __scopeTooltip: n, ...o } = e, i = ge(ze, n), r = Qe(ze, n), s = Ne(n), a = f.useRef(null), l = ne(t, a, i.onTriggerChange), c = f.useRef(!1), u = f.useRef(!1), p = f.useCallback(() => c.current = !1, []);
|
|
2378
|
+
return f.useEffect(() => () => document.removeEventListener("pointerup", p), [p]), /* @__PURE__ */ x(ti, { asChild: !0, ...s, children: /* @__PURE__ */ x(
|
|
2413
2379
|
Q.button,
|
|
2414
2380
|
{
|
|
2415
2381
|
"aria-describedby": i.open ? i.contentId : void 0,
|
|
@@ -2434,25 +2400,25 @@ var Ve = "TooltipTrigger", Cn = f.forwardRef(
|
|
|
2434
2400
|
) });
|
|
2435
2401
|
}
|
|
2436
2402
|
);
|
|
2437
|
-
|
|
2438
|
-
var
|
|
2403
|
+
yn.displayName = ze;
|
|
2404
|
+
var et = "TooltipPortal", [mi, gi] = Te(et, {
|
|
2439
2405
|
forceMount: void 0
|
|
2440
|
-
}),
|
|
2441
|
-
const { __scopeTooltip: t, forceMount: n, children: o, container: i } = e, r = ge(
|
|
2442
|
-
return /* @__PURE__ */ x(
|
|
2406
|
+
}), wn = (e) => {
|
|
2407
|
+
const { __scopeTooltip: t, forceMount: n, children: o, container: i } = e, r = ge(et, t);
|
|
2408
|
+
return /* @__PURE__ */ x(mi, { scope: t, forceMount: n, children: /* @__PURE__ */ x(Je, { present: n || r.open, children: /* @__PURE__ */ x(dn, { asChild: !0, container: i, children: o }) }) });
|
|
2443
2409
|
};
|
|
2444
|
-
|
|
2445
|
-
var se = "TooltipContent",
|
|
2410
|
+
wn.displayName = et;
|
|
2411
|
+
var se = "TooltipContent", xn = f.forwardRef(
|
|
2446
2412
|
(e, t) => {
|
|
2447
|
-
const n =
|
|
2448
|
-
return /* @__PURE__ */ x(
|
|
2413
|
+
const n = gi(se, e.__scopeTooltip), { forceMount: o = n.forceMount, side: i = "top", ...r } = e, s = ge(se, e.__scopeTooltip);
|
|
2414
|
+
return /* @__PURE__ */ x(Je, { present: o || s.open, children: s.disableHoverableContent ? /* @__PURE__ */ x(bn, { side: i, ...r, ref: t }) : /* @__PURE__ */ x(vi, { side: i, ...r, ref: t }) });
|
|
2449
2415
|
}
|
|
2450
|
-
),
|
|
2451
|
-
const n = ge(se, e.__scopeTooltip), o =
|
|
2416
|
+
), vi = f.forwardRef((e, t) => {
|
|
2417
|
+
const n = ge(se, e.__scopeTooltip), o = Qe(se, e.__scopeTooltip), i = f.useRef(null), r = ne(t, i), [s, a] = f.useState(null), { trigger: l, onClose: c } = n, u = i.current, { onPointerInTransitChange: p } = o, h = f.useCallback(() => {
|
|
2452
2418
|
a(null), p(!1);
|
|
2453
2419
|
}, [p]), d = f.useCallback(
|
|
2454
2420
|
(m, g) => {
|
|
2455
|
-
const v = m.currentTarget, y = { x: m.clientX, y: m.clientY }, w =
|
|
2421
|
+
const v = m.currentTarget, y = { x: m.clientX, y: m.clientY }, w = xi(y, v.getBoundingClientRect()), P = bi(y, w), b = _i(g.getBoundingClientRect()), A = Pi([...P, ...b]);
|
|
2456
2422
|
a(A), p(!0);
|
|
2457
2423
|
},
|
|
2458
2424
|
[p]
|
|
@@ -2467,13 +2433,13 @@ var se = "TooltipContent", On = f.forwardRef(
|
|
|
2467
2433
|
}, [l, u, d, h]), f.useEffect(() => {
|
|
2468
2434
|
if (s) {
|
|
2469
2435
|
const m = (g) => {
|
|
2470
|
-
const v = g.target, y = { x: g.clientX, y: g.clientY }, w =
|
|
2471
|
-
w ? h() :
|
|
2436
|
+
const v = g.target, y = { x: g.clientX, y: g.clientY }, w = l?.contains(v) || u?.contains(v), P = !Ai(y, s);
|
|
2437
|
+
w ? h() : P && (h(), c());
|
|
2472
2438
|
};
|
|
2473
2439
|
return document.addEventListener("pointermove", m), () => document.removeEventListener("pointermove", m);
|
|
2474
2440
|
}
|
|
2475
|
-
}, [l, u, s, c, h]), /* @__PURE__ */ x(
|
|
2476
|
-
}), [
|
|
2441
|
+
}, [l, u, s, c, h]), /* @__PURE__ */ x(bn, { ...e, ref: r });
|
|
2442
|
+
}), [yi, wi] = Te(De, { isInside: !1 }), bn = f.forwardRef(
|
|
2477
2443
|
(e, t) => {
|
|
2478
2444
|
const {
|
|
2479
2445
|
__scopeTooltip: n,
|
|
@@ -2482,17 +2448,16 @@ var se = "TooltipContent", On = f.forwardRef(
|
|
|
2482
2448
|
onEscapeKeyDown: r,
|
|
2483
2449
|
onPointerDownOutside: s,
|
|
2484
2450
|
...a
|
|
2485
|
-
} = e, l = ge(se, n), c =
|
|
2486
|
-
return f.useEffect(() => (document.addEventListener(
|
|
2451
|
+
} = e, l = ge(se, n), c = Ne(n), { onClose: u } = l;
|
|
2452
|
+
return f.useEffect(() => (document.addEventListener(Be, u), () => document.removeEventListener(Be, u)), [u]), f.useEffect(() => {
|
|
2487
2453
|
if (l.trigger) {
|
|
2488
2454
|
const p = (h) => {
|
|
2489
|
-
|
|
2490
|
-
d != null && d.contains(l.trigger) && u();
|
|
2455
|
+
h.target?.contains(l.trigger) && u();
|
|
2491
2456
|
};
|
|
2492
2457
|
return window.addEventListener("scroll", p, { capture: !0 }), () => window.removeEventListener("scroll", p, { capture: !0 });
|
|
2493
2458
|
}
|
|
2494
2459
|
}, [l.trigger, u]), /* @__PURE__ */ x(
|
|
2495
|
-
|
|
2460
|
+
Bt,
|
|
2496
2461
|
{
|
|
2497
2462
|
asChild: !0,
|
|
2498
2463
|
disableOutsidePointerEvents: !1,
|
|
@@ -2500,8 +2465,8 @@ var se = "TooltipContent", On = f.forwardRef(
|
|
|
2500
2465
|
onPointerDownOutside: s,
|
|
2501
2466
|
onFocusOutside: (p) => p.preventDefault(),
|
|
2502
2467
|
onDismiss: u,
|
|
2503
|
-
children: /* @__PURE__ */
|
|
2504
|
-
|
|
2468
|
+
children: /* @__PURE__ */ be(
|
|
2469
|
+
ni,
|
|
2505
2470
|
{
|
|
2506
2471
|
"data-state": l.stateAttribute,
|
|
2507
2472
|
...c,
|
|
@@ -2516,8 +2481,8 @@ var se = "TooltipContent", On = f.forwardRef(
|
|
|
2516
2481
|
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
2517
2482
|
},
|
|
2518
2483
|
children: [
|
|
2519
|
-
/* @__PURE__ */ x(
|
|
2520
|
-
/* @__PURE__ */ x(
|
|
2484
|
+
/* @__PURE__ */ x(jt, { children: o }),
|
|
2485
|
+
/* @__PURE__ */ x(yi, { scope: n, isInside: !0, children: /* @__PURE__ */ x(fi, { id: l.contentId, role: "tooltip", children: i || o }) })
|
|
2521
2486
|
]
|
|
2522
2487
|
}
|
|
2523
2488
|
)
|
|
@@ -2525,18 +2490,18 @@ var se = "TooltipContent", On = f.forwardRef(
|
|
|
2525
2490
|
);
|
|
2526
2491
|
}
|
|
2527
2492
|
);
|
|
2528
|
-
|
|
2529
|
-
var
|
|
2493
|
+
xn.displayName = se;
|
|
2494
|
+
var _n = "TooltipArrow", An = f.forwardRef(
|
|
2530
2495
|
(e, t) => {
|
|
2531
|
-
const { __scopeTooltip: n, ...o } = e, i =
|
|
2532
|
-
return
|
|
2533
|
-
|
|
2496
|
+
const { __scopeTooltip: n, ...o } = e, i = Ne(n);
|
|
2497
|
+
return wi(
|
|
2498
|
+
_n,
|
|
2534
2499
|
n
|
|
2535
|
-
).isInside ? null : /* @__PURE__ */ x(
|
|
2500
|
+
).isInside ? null : /* @__PURE__ */ x(ri, { ...i, ...o, ref: t });
|
|
2536
2501
|
}
|
|
2537
2502
|
);
|
|
2538
|
-
|
|
2539
|
-
function
|
|
2503
|
+
An.displayName = _n;
|
|
2504
|
+
function xi(e, t) {
|
|
2540
2505
|
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);
|
|
2541
2506
|
switch (Math.min(n, o, i, r)) {
|
|
2542
2507
|
case r:
|
|
@@ -2551,7 +2516,7 @@ function Oi(e, t) {
|
|
|
2551
2516
|
throw new Error("unreachable");
|
|
2552
2517
|
}
|
|
2553
2518
|
}
|
|
2554
|
-
function
|
|
2519
|
+
function bi(e, t, n = 5) {
|
|
2555
2520
|
const o = [];
|
|
2556
2521
|
switch (t) {
|
|
2557
2522
|
case "top":
|
|
@@ -2581,7 +2546,7 @@ function Ri(e, t, n = 5) {
|
|
|
2581
2546
|
}
|
|
2582
2547
|
return o;
|
|
2583
2548
|
}
|
|
2584
|
-
function
|
|
2549
|
+
function _i(e) {
|
|
2585
2550
|
const { top: t, right: n, bottom: o, left: i } = e;
|
|
2586
2551
|
return [
|
|
2587
2552
|
{ x: i, y: t },
|
|
@@ -2590,7 +2555,7 @@ function Ei(e) {
|
|
|
2590
2555
|
{ x: i, y: o }
|
|
2591
2556
|
];
|
|
2592
2557
|
}
|
|
2593
|
-
function
|
|
2558
|
+
function Ai(e, t) {
|
|
2594
2559
|
const { x: n, y: o } = e;
|
|
2595
2560
|
let i = !1;
|
|
2596
2561
|
for (let r = 0, s = t.length - 1; r < t.length; s = r++) {
|
|
@@ -2599,11 +2564,11 @@ function Si(e, t) {
|
|
|
2599
2564
|
}
|
|
2600
2565
|
return i;
|
|
2601
2566
|
}
|
|
2602
|
-
function
|
|
2567
|
+
function Pi(e) {
|
|
2603
2568
|
const t = e.slice();
|
|
2604
|
-
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),
|
|
2569
|
+
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), Ci(t);
|
|
2605
2570
|
}
|
|
2606
|
-
function
|
|
2571
|
+
function Ci(e) {
|
|
2607
2572
|
if (e.length <= 1) return e.slice();
|
|
2608
2573
|
const t = [];
|
|
2609
2574
|
for (let o = 0; o < e.length; o++) {
|
|
@@ -2628,19 +2593,14 @@ function Ni(e) {
|
|
|
2628
2593
|
}
|
|
2629
2594
|
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);
|
|
2630
2595
|
}
|
|
2631
|
-
var
|
|
2632
|
-
function
|
|
2596
|
+
var Oi = gn, Ei = vn, Ri = yn, Si = wn, Ti = xn, Ni = An;
|
|
2597
|
+
function Di(e) {
|
|
2633
2598
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
2634
2599
|
}
|
|
2635
|
-
var
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
http://jedwatson.github.io/classnames
|
|
2640
|
-
*/
|
|
2641
|
-
var Mt;
|
|
2642
|
-
function ji() {
|
|
2643
|
-
return Mt || (Mt = 1, (function(e) {
|
|
2600
|
+
var $e = { exports: {} };
|
|
2601
|
+
var Rt;
|
|
2602
|
+
function Li() {
|
|
2603
|
+
return Rt || (Rt = 1, (function(e) {
|
|
2644
2604
|
(function() {
|
|
2645
2605
|
var t = {}.hasOwnProperty;
|
|
2646
2606
|
function n() {
|
|
@@ -2669,30 +2629,30 @@ function ji() {
|
|
|
2669
2629
|
}
|
|
2670
2630
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
2671
2631
|
})();
|
|
2672
|
-
})(
|
|
2632
|
+
})($e)), $e.exports;
|
|
2673
2633
|
}
|
|
2674
|
-
var
|
|
2675
|
-
const
|
|
2634
|
+
var Mi = Li();
|
|
2635
|
+
const $i = /* @__PURE__ */ Di(Mi), ki = "_slideDownAndFade_fkagk_1", Fi = "_slideLeftAndFade_fkagk_1", Ii = "_slideUpAndFade_fkagk_1", Hi = "_slideRightAndFade_fkagk_1", ji = {
|
|
2676
2636
|
"purpur-tooltip": "_purpur-tooltip_fkagk_1",
|
|
2677
2637
|
"purpur-tooltip__content": "_purpur-tooltip__content_fkagk_4",
|
|
2678
2638
|
"purpur-tooltip__content--primary": "_purpur-tooltip__content--primary_fkagk_14",
|
|
2679
2639
|
"purpur-tooltip__content--primary-negative": "_purpur-tooltip__content--primary-negative_fkagk_17",
|
|
2680
|
-
slideDownAndFade:
|
|
2681
|
-
slideLeftAndFade:
|
|
2682
|
-
slideUpAndFade:
|
|
2683
|
-
slideRightAndFade:
|
|
2640
|
+
slideDownAndFade: ki,
|
|
2641
|
+
slideLeftAndFade: Fi,
|
|
2642
|
+
slideUpAndFade: Ii,
|
|
2643
|
+
slideRightAndFade: Hi,
|
|
2684
2644
|
"purpur-tooltip__arrow--primary": "_purpur-tooltip__arrow--primary_fkagk_32",
|
|
2685
2645
|
"purpur-tooltip__arrow--primary-negative": "_purpur-tooltip__arrow--primary-negative_fkagk_35"
|
|
2686
|
-
},
|
|
2646
|
+
}, ke = $i.bind(ji), Wi = {
|
|
2687
2647
|
TOP: "top",
|
|
2688
2648
|
BOTTOM: "bottom",
|
|
2689
2649
|
LEFT: "left",
|
|
2690
2650
|
RIGHT: "right"
|
|
2691
|
-
},
|
|
2651
|
+
}, Bi = {
|
|
2692
2652
|
START: "start",
|
|
2693
2653
|
CENTER: "center",
|
|
2694
2654
|
END: "end"
|
|
2695
|
-
}, re = "purpur-tooltip",
|
|
2655
|
+
}, re = "purpur-tooltip", zi = St(
|
|
2696
2656
|
({
|
|
2697
2657
|
["data-testid"]: e,
|
|
2698
2658
|
buttonSize: t = "md",
|
|
@@ -2700,47 +2660,47 @@ const Bi = /* @__PURE__ */ Ii(Wi), Hi = "_slideDownAndFade_fkagk_1", zi = "_slid
|
|
|
2700
2660
|
className: o,
|
|
2701
2661
|
contentClassName: i,
|
|
2702
2662
|
negative: r = !1,
|
|
2703
|
-
position: s =
|
|
2704
|
-
align: a =
|
|
2663
|
+
position: s = Wi.TOP,
|
|
2664
|
+
align: a = Bi.CENTER,
|
|
2705
2665
|
triggerAriaLabel: l,
|
|
2706
2666
|
triggerElement: c,
|
|
2707
2667
|
...u
|
|
2708
2668
|
}, p) => {
|
|
2709
|
-
const [h, d] =
|
|
2669
|
+
const [h, d] = $n(!1), m = ke(
|
|
2710
2670
|
o,
|
|
2711
2671
|
re,
|
|
2712
2672
|
`${re}--primary${r ? "-negative" : ""}`
|
|
2713
2673
|
), g = /* @__PURE__ */ x(
|
|
2714
|
-
|
|
2674
|
+
Dt,
|
|
2715
2675
|
{
|
|
2716
2676
|
ref: p,
|
|
2717
2677
|
"aria-label": l,
|
|
2718
2678
|
"aria-expanded": h,
|
|
2719
|
-
variant:
|
|
2679
|
+
variant: Jn.TERTIARY_PURPLE,
|
|
2720
2680
|
negative: r,
|
|
2721
2681
|
iconOnly: !0,
|
|
2722
2682
|
"data-testid": `${e}-trigger-button`,
|
|
2723
2683
|
size: t,
|
|
2724
|
-
children: /* @__PURE__ */ x(
|
|
2684
|
+
children: /* @__PURE__ */ x(Mt, { size: "md" })
|
|
2725
2685
|
}
|
|
2726
2686
|
);
|
|
2727
|
-
return /* @__PURE__ */ x("div", { "data-testid": e, className: m, children: /* @__PURE__ */ x(
|
|
2687
|
+
return /* @__PURE__ */ x("div", { "data-testid": e, className: m, children: /* @__PURE__ */ x(Oi, { delayDuration: parseInt(gr), children: /* @__PURE__ */ be(Ei, { open: h, onOpenChange: d, ...u, children: [
|
|
2728
2688
|
/* @__PURE__ */ x(
|
|
2729
|
-
|
|
2689
|
+
Ri,
|
|
2730
2690
|
{
|
|
2731
2691
|
asChild: !0,
|
|
2732
2692
|
onClick: (v) => {
|
|
2733
2693
|
v.preventDefault(), d(!0);
|
|
2734
2694
|
},
|
|
2735
|
-
children:
|
|
2695
|
+
children: kn.count(c) === 0 ? g : c
|
|
2736
2696
|
}
|
|
2737
2697
|
),
|
|
2738
|
-
/* @__PURE__ */ x(
|
|
2739
|
-
|
|
2698
|
+
/* @__PURE__ */ x(Si, { children: /* @__PURE__ */ be(
|
|
2699
|
+
Ti,
|
|
2740
2700
|
{
|
|
2741
2701
|
side: s,
|
|
2742
2702
|
align: a,
|
|
2743
|
-
className:
|
|
2703
|
+
className: ke(
|
|
2744
2704
|
i,
|
|
2745
2705
|
`${re}__content`,
|
|
2746
2706
|
`${re}__content--primary${r ? "-negative" : ""}`
|
|
@@ -2749,18 +2709,18 @@ const Bi = /* @__PURE__ */ Ii(Wi), Hi = "_slideDownAndFade_fkagk_1", zi = "_slid
|
|
|
2749
2709
|
"data-testid": `${e}-content`,
|
|
2750
2710
|
children: [
|
|
2751
2711
|
typeof n == "string" ? /* @__PURE__ */ x(
|
|
2752
|
-
|
|
2712
|
+
kt,
|
|
2753
2713
|
{
|
|
2754
|
-
variant:
|
|
2714
|
+
variant: $t.PARAGRAPH100,
|
|
2755
2715
|
negative: !r,
|
|
2756
2716
|
"data-testid": `${e}-paragraph`,
|
|
2757
2717
|
children: n
|
|
2758
2718
|
}
|
|
2759
2719
|
) : n,
|
|
2760
2720
|
/* @__PURE__ */ x(
|
|
2761
|
-
|
|
2721
|
+
Ni,
|
|
2762
2722
|
{
|
|
2763
|
-
className:
|
|
2723
|
+
className: ke(
|
|
2764
2724
|
`${re}__arrow`,
|
|
2765
2725
|
`${re}__arrow--primary${r ? "-negative" : ""}`
|
|
2766
2726
|
)
|
|
@@ -2772,10 +2732,10 @@ const Bi = /* @__PURE__ */ Ii(Wi), Hi = "_slideDownAndFade_fkagk_1", zi = "_slid
|
|
|
2772
2732
|
] }) }) });
|
|
2773
2733
|
}
|
|
2774
2734
|
);
|
|
2775
|
-
|
|
2735
|
+
zi.displayName = "Tooltip";
|
|
2776
2736
|
export {
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2737
|
+
Bi as TOOLTIP_ALIGN,
|
|
2738
|
+
Wi as TOOLTIP_POSITION,
|
|
2739
|
+
zi as Tooltip
|
|
2780
2740
|
};
|
|
2781
2741
|
//# sourceMappingURL=tooltip.es.js.map
|