@arkitektbedriftene/fe-lib 0.3.17 → 0.3.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DropdownMenu-c57acb78.js → DropdownMenu-cae60146.js} +782 -723
- package/dist/rich-text/Editor.d.ts +2 -2
- package/dist/rich-text/Toolbar/BlockTypeSelector.d.ts +2 -0
- package/dist/rich-text/Toolbar/TextFormatToggleGroup.d.ts +2 -0
- package/dist/rich-text/Toolbar/Toolbar.d.ts +6 -0
- package/dist/rich-text.es.js +445 -133
- package/dist/ui/components/Alert.d.ts +1 -1
- package/dist/ui/components/Badge.d.ts +1 -1
- package/dist/ui/components/Button.d.ts +1 -1
- package/dist/ui/components/Toolbar.d.ts +1 -1
- package/dist/ui.es.js +14 -14
- package/package.json +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsx as z, jsxs as
|
|
1
|
+
import { jsx as z, jsxs as Ze, Fragment as En } from "react/jsx-runtime";
|
|
2
2
|
import * as y from "react";
|
|
3
|
-
import xe, { forwardRef as
|
|
3
|
+
import xe, { forwardRef as Pe, useLayoutEffect as Zt, useEffect as Jt, useRef as Cn, createContext as kn, useMemo as Tn, useContext as Qt, isValidElement as In, cloneElement as Pn } from "react";
|
|
4
4
|
import * as An from "react-dom";
|
|
5
5
|
import { createPortal as Bn } from "react-dom";
|
|
6
|
-
import * as
|
|
6
|
+
import * as Le from "@radix-ui/react-toolbar";
|
|
7
7
|
import { f as On, g as Dn } from "./index.esm-d078f232.js";
|
|
8
|
-
import * as
|
|
9
|
-
var
|
|
8
|
+
import * as ee from "@radix-ui/react-dropdown-menu";
|
|
9
|
+
var W = "colors", Y = "sizes", E = "space", Mn = { gap: E, gridGap: E, columnGap: E, gridColumnGap: E, rowGap: E, gridRowGap: E, inset: E, insetBlock: E, insetBlockEnd: E, insetBlockStart: E, insetInline: E, insetInlineEnd: E, insetInlineStart: E, margin: E, marginTop: E, marginRight: E, marginBottom: E, marginLeft: E, marginBlock: E, marginBlockEnd: E, marginBlockStart: E, marginInline: E, marginInlineEnd: E, marginInlineStart: E, padding: E, paddingTop: E, paddingRight: E, paddingBottom: E, paddingLeft: E, paddingBlock: E, paddingBlockEnd: E, paddingBlockStart: E, paddingInline: E, paddingInlineEnd: E, paddingInlineStart: E, top: E, right: E, bottom: E, left: E, scrollMargin: E, scrollMarginTop: E, scrollMarginRight: E, scrollMarginBottom: E, scrollMarginLeft: E, scrollMarginX: E, scrollMarginY: E, scrollMarginBlock: E, scrollMarginBlockEnd: E, scrollMarginBlockStart: E, scrollMarginInline: E, scrollMarginInlineEnd: E, scrollMarginInlineStart: E, scrollPadding: E, scrollPaddingTop: E, scrollPaddingRight: E, scrollPaddingBottom: E, scrollPaddingLeft: E, scrollPaddingX: E, scrollPaddingY: E, scrollPaddingBlock: E, scrollPaddingBlockEnd: E, scrollPaddingBlockStart: E, scrollPaddingInline: E, scrollPaddingInlineEnd: E, scrollPaddingInlineStart: E, fontSize: "fontSizes", background: W, backgroundColor: W, backgroundImage: W, borderImage: W, border: W, borderBlock: W, borderBlockEnd: W, borderBlockStart: W, borderBottom: W, borderBottomColor: W, borderColor: W, borderInline: W, borderInlineEnd: W, borderInlineStart: W, borderLeft: W, borderLeftColor: W, borderRight: W, borderRightColor: W, borderTop: W, borderTopColor: W, caretColor: W, color: W, columnRuleColor: W, fill: W, outline: W, outlineColor: W, stroke: W, textDecorationColor: W, fontFamily: "fonts", fontWeight: "fontWeights", lineHeight: "lineHeights", letterSpacing: "letterSpacings", blockSize: Y, minBlockSize: Y, maxBlockSize: Y, inlineSize: Y, minInlineSize: Y, maxInlineSize: Y, width: Y, minWidth: Y, maxWidth: Y, height: Y, minHeight: Y, maxHeight: Y, flexBasis: Y, gridTemplateColumns: Y, gridTemplateRows: Y, borderWidth: "borderWidths", borderTopWidth: "borderWidths", borderRightWidth: "borderWidths", borderBottomWidth: "borderWidths", borderLeftWidth: "borderWidths", borderStyle: "borderStyles", borderTopStyle: "borderStyles", borderRightStyle: "borderStyles", borderBottomStyle: "borderStyles", borderLeftStyle: "borderStyles", borderRadius: "radii", borderTopLeftRadius: "radii", borderTopRightRadius: "radii", borderBottomRightRadius: "radii", borderBottomLeftRadius: "radii", boxShadow: "shadows", textShadow: "shadows", transition: "transitions", zIndex: "zIndices" }, Ln = (e, t) => typeof t == "function" ? { "()": Function.prototype.toString.call(t) } : t, Ae = () => {
|
|
10
10
|
const e = /* @__PURE__ */ Object.create(null);
|
|
11
11
|
return (t, n, ...r) => {
|
|
12
|
-
const o = ((i) => JSON.stringify(i,
|
|
12
|
+
const o = ((i) => JSON.stringify(i, Ln))(t);
|
|
13
13
|
return o in e ? e[o] : e[o] = n(t, ...r);
|
|
14
14
|
};
|
|
15
|
-
},
|
|
15
|
+
}, me = Symbol.for("sxs.internal"), mt = (e, t) => Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)), Rt = (e) => {
|
|
16
16
|
for (const t in e)
|
|
17
17
|
return !0;
|
|
18
18
|
return !1;
|
|
19
|
-
}, { hasOwnProperty:
|
|
19
|
+
}, { hasOwnProperty: Fn } = Object.prototype, lt = (e) => e.includes("-") ? e : e.replace(/[A-Z]/g, (t) => "-" + t.toLowerCase()), Wn = /\s+(?![^()]*\))/, we = (e) => (t) => e(...typeof t == "string" ? String(t).split(Wn) : [t]), Et = { appearance: (e) => ({ WebkitAppearance: e, appearance: e }), backfaceVisibility: (e) => ({ WebkitBackfaceVisibility: e, backfaceVisibility: e }), backdropFilter: (e) => ({ WebkitBackdropFilter: e, backdropFilter: e }), backgroundClip: (e) => ({ WebkitBackgroundClip: e, backgroundClip: e }), boxDecorationBreak: (e) => ({ WebkitBoxDecorationBreak: e, boxDecorationBreak: e }), clipPath: (e) => ({ WebkitClipPath: e, clipPath: e }), content: (e) => ({ content: e.includes('"') || e.includes("'") || /^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(e) ? e : `"${e}"` }), hyphens: (e) => ({ WebkitHyphens: e, hyphens: e }), maskImage: (e) => ({ WebkitMaskImage: e, maskImage: e }), maskSize: (e) => ({ WebkitMaskSize: e, maskSize: e }), tabSize: (e) => ({ MozTabSize: e, tabSize: e }), textSizeAdjust: (e) => ({ WebkitTextSizeAdjust: e, textSizeAdjust: e }), userSelect: (e) => ({ WebkitUserSelect: e, userSelect: e }), marginBlock: we((e, t) => ({ marginBlockStart: e, marginBlockEnd: t || e })), marginInline: we((e, t) => ({ marginInlineStart: e, marginInlineEnd: t || e })), maxSize: we((e, t) => ({ maxBlockSize: e, maxInlineSize: t || e })), minSize: we((e, t) => ({ minBlockSize: e, minInlineSize: t || e })), paddingBlock: we((e, t) => ({ paddingBlockStart: e, paddingBlockEnd: t || e })), paddingInline: we((e, t) => ({ paddingInlineStart: e, paddingInlineEnd: t || e })) }, et = /([\d.]+)([^]*)/, Nn = (e, t) => e.length ? e.reduce((n, r) => (n.push(...t.map((o) => o.includes("&") ? o.replace(/&/g, /[ +>|~]/.test(r) && /&.*&/.test(o) ? `:is(${r})` : r) : r + " " + o)), n), []) : t, zn = (e, t) => e in jn && typeof t == "string" ? t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/, (n, r, o, i) => r + (o === "stretch" ? `-moz-available${i};${lt(e)}:${r}-webkit-fill-available` : `-moz-fit-content${i};${lt(e)}:${r}fit-content`) + i) : String(t), jn = { blockSize: 1, height: 1, inlineSize: 1, maxBlockSize: 1, maxHeight: 1, maxInlineSize: 1, maxWidth: 1, minBlockSize: 1, minHeight: 1, minInlineSize: 1, minWidth: 1, width: 1 }, te = (e) => e ? e + "-" : "", en = (e, t, n) => e.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g, (r, o, i, s, l) => s == "$" == !!i ? r : (o || s == "--" ? "calc(" : "") + "var(--" + (s === "$" ? te(t) + (l.includes("$") ? "" : te(n)) + l.replace(/\$/g, "-") : l) + ")" + (o || s == "--" ? "*" + (o || "") + (i || "1") + ")" : "")), Hn = /\s*,\s*(?![^()]*\))/, Vn = Object.prototype.toString, Ee = (e, t, n, r, o) => {
|
|
20
20
|
let i, s, l;
|
|
21
21
|
const a = (c, m, d) => {
|
|
22
22
|
let f, u;
|
|
@@ -24,46 +24,46 @@ var N = "colors", Y = "sizes", E = "space", Mn = { gap: E, gridGap: E, columnGap
|
|
|
24
24
|
for (f in p) {
|
|
25
25
|
const x = f.charCodeAt(0) === 64, P = x && Array.isArray(p[f]) ? p[f] : [p[f]];
|
|
26
26
|
for (u of P) {
|
|
27
|
-
const S = /[A-Z]/.test(h = f) ? h : h.replace(/-[^]/g, (
|
|
28
|
-
if (S in r.utils && !
|
|
29
|
-
const
|
|
30
|
-
if (
|
|
31
|
-
s =
|
|
27
|
+
const S = /[A-Z]/.test(h = f) ? h : h.replace(/-[^]/g, (C) => C[1].toUpperCase()), k = typeof u == "object" && u && u.toString === Vn && (!r.utils[S] || !m.length);
|
|
28
|
+
if (S in r.utils && !k) {
|
|
29
|
+
const C = r.utils[S];
|
|
30
|
+
if (C !== s) {
|
|
31
|
+
s = C, g(C(u)), s = null;
|
|
32
32
|
continue;
|
|
33
33
|
}
|
|
34
|
-
} else if (S in
|
|
35
|
-
const
|
|
36
|
-
if (
|
|
37
|
-
l =
|
|
34
|
+
} else if (S in Et) {
|
|
35
|
+
const C = Et[S];
|
|
36
|
+
if (C !== l) {
|
|
37
|
+
l = C, g(C(u)), l = null;
|
|
38
38
|
continue;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
if (x && (
|
|
42
|
-
const M = et.test(A),
|
|
43
|
-
return "(" + (
|
|
44
|
-
})),
|
|
45
|
-
const
|
|
46
|
-
i !== void 0 && o(
|
|
41
|
+
if (x && (w = f.slice(1) in r.media ? "@media " + r.media[f.slice(1)] : f, f = w.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g, (C, A, T, B, D, L) => {
|
|
42
|
+
const M = et.test(A), O = 0.0625 * (M ? -1 : 1), [b, v] = M ? [B, A] : [A, B];
|
|
43
|
+
return "(" + (T[0] === "=" ? "" : T[0] === ">" === M ? "max-" : "min-") + b + ":" + (T[0] !== "=" && T.length === 1 ? v.replace(et, (I, R, $) => Number(R) + O * (T === ">" ? 1 : -1) + $) : v) + (D ? ") and (" + (D[0] === ">" ? "min-" : "max-") + b + ":" + (D.length === 1 ? L.replace(et, (I, R, $) => Number(R) + O * (D === ">" ? -1 : 1) + $) : L) : "") + ")";
|
|
44
|
+
})), k) {
|
|
45
|
+
const C = x ? d.concat(f) : [...d], A = x ? [...m] : Nn(m, f.split(Hn));
|
|
46
|
+
i !== void 0 && o(Ct(...i)), i = void 0, a(u, A, C);
|
|
47
47
|
} else
|
|
48
|
-
i === void 0 && (i = [[], m, d]), f = x || f.charCodeAt(0) !== 36 ? f : `--${
|
|
48
|
+
i === void 0 && (i = [[], m, d]), f = x || f.charCodeAt(0) !== 36 ? f : `--${te(r.prefix)}${f.slice(1).replace(/\$/g, "-")}`, u = k ? u : typeof u == "number" ? u && S in _n ? String(u) + "px" : String(u) : en(zn(S, u ?? ""), r.prefix, r.themeMap[S]), i[0].push(`${x ? `${f} ` : `${lt(f)}:`}${u}`);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
var
|
|
51
|
+
var w, h;
|
|
52
52
|
};
|
|
53
|
-
g(c), i !== void 0 && o(
|
|
53
|
+
g(c), i !== void 0 && o(Ct(...i)), i = void 0;
|
|
54
54
|
};
|
|
55
55
|
a(e, t, n);
|
|
56
|
-
},
|
|
56
|
+
}, Ct = (e, t, n) => `${n.map((r) => `${r}{`).join("")}${t.length ? `${t.join(",")}{` : ""}${e.join(";")}${t.length ? "}" : ""}${Array(n.length ? n.length + 1 : 0).join("}")}`, _n = { animationDelay: 1, animationDuration: 1, backgroundSize: 1, blockSize: 1, border: 1, borderBlock: 1, borderBlockEnd: 1, borderBlockEndWidth: 1, borderBlockStart: 1, borderBlockStartWidth: 1, borderBlockWidth: 1, borderBottom: 1, borderBottomLeftRadius: 1, borderBottomRightRadius: 1, borderBottomWidth: 1, borderEndEndRadius: 1, borderEndStartRadius: 1, borderInlineEnd: 1, borderInlineEndWidth: 1, borderInlineStart: 1, borderInlineStartWidth: 1, borderInlineWidth: 1, borderLeft: 1, borderLeftWidth: 1, borderRadius: 1, borderRight: 1, borderRightWidth: 1, borderSpacing: 1, borderStartEndRadius: 1, borderStartStartRadius: 1, borderTop: 1, borderTopLeftRadius: 1, borderTopRightRadius: 1, borderTopWidth: 1, borderWidth: 1, bottom: 1, columnGap: 1, columnRule: 1, columnRuleWidth: 1, columnWidth: 1, containIntrinsicSize: 1, flexBasis: 1, fontSize: 1, gap: 1, gridAutoColumns: 1, gridAutoRows: 1, gridTemplateColumns: 1, gridTemplateRows: 1, height: 1, inlineSize: 1, inset: 1, insetBlock: 1, insetBlockEnd: 1, insetBlockStart: 1, insetInline: 1, insetInlineEnd: 1, insetInlineStart: 1, left: 1, letterSpacing: 1, margin: 1, marginBlock: 1, marginBlockEnd: 1, marginBlockStart: 1, marginBottom: 1, marginInline: 1, marginInlineEnd: 1, marginInlineStart: 1, marginLeft: 1, marginRight: 1, marginTop: 1, maxBlockSize: 1, maxHeight: 1, maxInlineSize: 1, maxWidth: 1, minBlockSize: 1, minHeight: 1, minInlineSize: 1, minWidth: 1, offsetDistance: 1, offsetRotate: 1, outline: 1, outlineOffset: 1, outlineWidth: 1, overflowClipMargin: 1, padding: 1, paddingBlock: 1, paddingBlockEnd: 1, paddingBlockStart: 1, paddingBottom: 1, paddingInline: 1, paddingInlineEnd: 1, paddingInlineStart: 1, paddingLeft: 1, paddingRight: 1, paddingTop: 1, perspective: 1, right: 1, rowGap: 1, scrollMargin: 1, scrollMarginBlock: 1, scrollMarginBlockEnd: 1, scrollMarginBlockStart: 1, scrollMarginBottom: 1, scrollMarginInline: 1, scrollMarginInlineEnd: 1, scrollMarginInlineStart: 1, scrollMarginLeft: 1, scrollMarginRight: 1, scrollMarginTop: 1, scrollPadding: 1, scrollPaddingBlock: 1, scrollPaddingBlockEnd: 1, scrollPaddingBlockStart: 1, scrollPaddingBottom: 1, scrollPaddingInline: 1, scrollPaddingInlineEnd: 1, scrollPaddingInlineStart: 1, scrollPaddingLeft: 1, scrollPaddingRight: 1, scrollPaddingTop: 1, shapeMargin: 1, textDecoration: 1, textDecorationThickness: 1, textIndent: 1, textUnderlineOffset: 1, top: 1, transitionDelay: 1, transitionDuration: 1, verticalAlign: 1, width: 1, wordSpacing: 1 }, kt = (e) => String.fromCharCode(e + (e > 25 ? 39 : 97)), ge = (e) => ((t) => {
|
|
57
57
|
let n, r = "";
|
|
58
58
|
for (n = Math.abs(t); n > 52; n = n / 52 | 0)
|
|
59
|
-
r =
|
|
60
|
-
return
|
|
59
|
+
r = kt(n % 52) + r;
|
|
60
|
+
return kt(n % 52) + r;
|
|
61
61
|
})(((t, n) => {
|
|
62
62
|
let r = n.length;
|
|
63
63
|
for (; r; )
|
|
64
64
|
t = 33 * t ^ n.charCodeAt(--r);
|
|
65
65
|
return t;
|
|
66
|
-
})(5381, JSON.stringify(e)) >>> 0),
|
|
66
|
+
})(5381, JSON.stringify(e)) >>> 0), De = ["themed", "global", "styled", "onevar", "resonevar", "allvar", "inline"], Yn = (e) => {
|
|
67
67
|
if (e.href && !e.href.startsWith(location.origin))
|
|
68
68
|
return !1;
|
|
69
69
|
try {
|
|
@@ -115,7 +115,7 @@ var N = "colors", Y = "sizes", E = "space", Mn = { gap: E, gridGap: E, columnGap
|
|
|
115
115
|
const { cssText: f } = m;
|
|
116
116
|
if (!f.startsWith("--sxs"))
|
|
117
117
|
continue;
|
|
118
|
-
const u = f.slice(14, -3).trim().split(/\s+/), g =
|
|
118
|
+
const u = f.slice(14, -3).trim().split(/\s+/), g = De[u[0]];
|
|
119
119
|
g && (t || (t = { sheet: l, reset: r, rules: {}, toString: n }), t.rules[g] = { group: d, index: a, cache: new Set(u) });
|
|
120
120
|
}
|
|
121
121
|
if (t)
|
|
@@ -130,10 +130,10 @@ var N = "colors", Y = "sizes", E = "space", Mn = { gap: E, gridGap: E, columnGap
|
|
|
130
130
|
t = { sheet: e ? (e.head || e).appendChild(document.createElement("style")).sheet : l("", "text/css"), rules: {}, reset: r, toString: n };
|
|
131
131
|
}
|
|
132
132
|
const { sheet: i, rules: s } = t;
|
|
133
|
-
for (let l =
|
|
134
|
-
const a =
|
|
133
|
+
for (let l = De.length - 1; l >= 0; --l) {
|
|
134
|
+
const a = De[l];
|
|
135
135
|
if (!s[a]) {
|
|
136
|
-
const c =
|
|
136
|
+
const c = De[l + 1], m = s[c] ? s[c].index : i.cssRules.length;
|
|
137
137
|
i.insertRule("@media{}", m), i.insertRule(`--sxs{--sxs:${l}}`, m), s[a] = { group: i.cssRules[m + 1], index: m, cache: /* @__PURE__ */ new Set([l]) };
|
|
138
138
|
}
|
|
139
139
|
Xn(s[a]);
|
|
@@ -149,29 +149,29 @@ var N = "colors", Y = "sizes", E = "space", Mn = { gap: E, gridGap: E, columnGap
|
|
|
149
149
|
} catch {
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
|
-
},
|
|
152
|
+
}, Oe = Symbol(), Gn = Ae(), Tt = (e, t) => Gn(e, () => (...n) => {
|
|
153
153
|
let r = { type: null, composers: /* @__PURE__ */ new Set() };
|
|
154
154
|
for (const o of n)
|
|
155
155
|
if (o != null)
|
|
156
|
-
if (o[
|
|
157
|
-
r.type == null && (r.type = o[
|
|
158
|
-
for (const i of o[
|
|
156
|
+
if (o[me]) {
|
|
157
|
+
r.type == null && (r.type = o[me].type);
|
|
158
|
+
for (const i of o[me].composers)
|
|
159
159
|
r.composers.add(i);
|
|
160
160
|
} else
|
|
161
161
|
o.constructor !== Object || o.$$typeof ? r.type == null && (r.type = o) : r.composers.add(Un(o, e));
|
|
162
162
|
return r.type == null && (r.type = "span"), r.composers.size || r.composers.add(["PJLV", {}, [], [], {}, []]), qn(e, r, t);
|
|
163
163
|
}), Un = ({ variants: e, compoundVariants: t, defaultVariants: n, ...r }, o) => {
|
|
164
|
-
const i = `${
|
|
164
|
+
const i = `${te(o.prefix)}c-${ge(r)}`, s = [], l = [], a = /* @__PURE__ */ Object.create(null), c = [];
|
|
165
165
|
for (const f in n)
|
|
166
166
|
a[f] = String(n[f]);
|
|
167
167
|
if (typeof e == "object" && e)
|
|
168
168
|
for (const f in e) {
|
|
169
|
-
m = a, d = f,
|
|
169
|
+
m = a, d = f, Fn.call(m, d) || (a[f] = "undefined");
|
|
170
170
|
const u = e[f];
|
|
171
171
|
for (const g in u) {
|
|
172
172
|
const p = { [f]: String(g) };
|
|
173
173
|
String(g) === "undefined" && c.push(f);
|
|
174
|
-
const
|
|
174
|
+
const w = u[g], h = [p, w, !Rt(w)];
|
|
175
175
|
s.push(h);
|
|
176
176
|
}
|
|
177
177
|
}
|
|
@@ -180,22 +180,22 @@ var N = "colors", Y = "sizes", E = "space", Mn = { gap: E, gridGap: E, columnGap
|
|
|
180
180
|
for (const f of t) {
|
|
181
181
|
let { css: u, ...g } = f;
|
|
182
182
|
u = typeof u == "object" && u || {};
|
|
183
|
-
for (const
|
|
184
|
-
g[
|
|
185
|
-
const p = [g, u, !
|
|
183
|
+
for (const w in g)
|
|
184
|
+
g[w] = String(g[w]);
|
|
185
|
+
const p = [g, u, !Rt(u)];
|
|
186
186
|
l.push(p);
|
|
187
187
|
}
|
|
188
188
|
return [i, r, s, l, a, c];
|
|
189
189
|
}, qn = (e, t, n) => {
|
|
190
190
|
const [r, o, i, s] = Zn(t.composers), l = typeof t.type == "function" || t.type.$$typeof ? ((d) => {
|
|
191
191
|
function f() {
|
|
192
|
-
for (let u = 0; u < f[
|
|
193
|
-
const [g, p] = f[
|
|
192
|
+
for (let u = 0; u < f[Oe].length; u++) {
|
|
193
|
+
const [g, p] = f[Oe][u];
|
|
194
194
|
d.rules[g].apply(p);
|
|
195
195
|
}
|
|
196
|
-
return f[
|
|
196
|
+
return f[Oe] = [], null;
|
|
197
197
|
}
|
|
198
|
-
return f[
|
|
198
|
+
return f[Oe] = [], f.rules = {}, De.forEach((u) => f.rules[u] = { apply: (g) => f[Oe].push([u, g]) }), f;
|
|
199
199
|
})(n) : null, a = (l || n).rules, c = `.${r}${o.length > 1 ? `:where(.${o.slice(1).join(".")})` : ""}`, m = (d) => {
|
|
200
200
|
d = typeof d == "object" && d || Jn;
|
|
201
201
|
const { css: f, ...u } = d, g = {};
|
|
@@ -210,38 +210,38 @@ var N = "colors", Y = "sizes", E = "space", Mn = { gap: E, gridGap: E, columnGap
|
|
|
210
210
|
n.rules.styled.cache.has(h) || (n.rules.styled.cache.add(h), Ee(x, [`.${h}`], [], e, (A) => {
|
|
211
211
|
a.styled.apply(A);
|
|
212
212
|
}));
|
|
213
|
-
const
|
|
214
|
-
for (const A of
|
|
213
|
+
const k = It(P, g, e.media), C = It(S, g, e.media, !0);
|
|
214
|
+
for (const A of k)
|
|
215
215
|
if (A !== void 0)
|
|
216
|
-
for (const [
|
|
217
|
-
const
|
|
218
|
-
p.add(
|
|
219
|
-
const M = (D ? n.rules.resonevar : n.rules.onevar).cache,
|
|
220
|
-
M.has(
|
|
221
|
-
|
|
216
|
+
for (const [T, B, D] of A) {
|
|
217
|
+
const L = `${h}-${ge(B)}-${T}`;
|
|
218
|
+
p.add(L);
|
|
219
|
+
const M = (D ? n.rules.resonevar : n.rules.onevar).cache, O = D ? a.resonevar : a.onevar;
|
|
220
|
+
M.has(L) || (M.add(L), Ee(B, [`.${L}`], [], e, (b) => {
|
|
221
|
+
O.apply(b);
|
|
222
222
|
}));
|
|
223
223
|
}
|
|
224
|
-
for (const A of
|
|
224
|
+
for (const A of C)
|
|
225
225
|
if (A !== void 0)
|
|
226
|
-
for (const [
|
|
227
|
-
const D = `${h}-${
|
|
228
|
-
p.add(D), n.rules.allvar.cache.has(D) || (n.rules.allvar.cache.add(D), Ee(
|
|
229
|
-
a.allvar.apply(
|
|
226
|
+
for (const [T, B] of A) {
|
|
227
|
+
const D = `${h}-${ge(B)}-${T}`;
|
|
228
|
+
p.add(D), n.rules.allvar.cache.has(D) || (n.rules.allvar.cache.add(D), Ee(B, [`.${D}`], [], e, (L) => {
|
|
229
|
+
a.allvar.apply(L);
|
|
230
230
|
}));
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
if (typeof f == "object" && f) {
|
|
234
|
-
const h = `${r}-i${
|
|
234
|
+
const h = `${r}-i${ge(f)}-css`;
|
|
235
235
|
p.add(h), n.rules.inline.cache.has(h) || (n.rules.inline.cache.add(h), Ee(f, [`.${h}`], [], e, (x) => {
|
|
236
236
|
a.inline.apply(x);
|
|
237
237
|
}));
|
|
238
238
|
}
|
|
239
239
|
for (const h of String(d.className || "").trim().split(/\s+/))
|
|
240
240
|
h && p.add(h);
|
|
241
|
-
const
|
|
242
|
-
return { type: t.type, className:
|
|
241
|
+
const w = u.className = [...p].join(" ");
|
|
242
|
+
return { type: t.type, className: w, selector: c, props: u, toString: () => w, deferredInjector: l };
|
|
243
243
|
};
|
|
244
|
-
return mt(m, { className: r, selector: c, [
|
|
244
|
+
return mt(m, { className: r, selector: c, [me]: t, toString: () => (n.rules.styled.cache.has(r) || m(), r) });
|
|
245
245
|
}, Zn = (e) => {
|
|
246
246
|
let t = "";
|
|
247
247
|
const n = [], r = {}, o = [];
|
|
@@ -253,7 +253,7 @@ var N = "colors", Y = "sizes", E = "space", Mn = { gap: E, gridGap: E, columnGap
|
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
return [t, n, r, new Set(o)];
|
|
256
|
-
},
|
|
256
|
+
}, It = (e, t, n, r) => {
|
|
257
257
|
const o = [];
|
|
258
258
|
e:
|
|
259
259
|
for (let [i, s, l] of e) {
|
|
@@ -268,11 +268,11 @@ var N = "colors", Y = "sizes", E = "space", Mn = { gap: E, gridGap: E, columnGap
|
|
|
268
268
|
continue e;
|
|
269
269
|
{
|
|
270
270
|
let u, g, p = 0;
|
|
271
|
-
for (const
|
|
272
|
-
if (d === String(f[
|
|
273
|
-
if (
|
|
274
|
-
const h =
|
|
275
|
-
(g = g || []).push(h in n ? n[h] :
|
|
271
|
+
for (const w in f) {
|
|
272
|
+
if (d === String(f[w])) {
|
|
273
|
+
if (w !== "@initial") {
|
|
274
|
+
const h = w.slice(1);
|
|
275
|
+
(g = g || []).push(h in n ? n[h] : w.replace(/^@media ?/, "")), m = !0;
|
|
276
276
|
}
|
|
277
277
|
c += p, u = !0;
|
|
278
278
|
}
|
|
@@ -286,11 +286,11 @@ var N = "colors", Y = "sizes", E = "space", Mn = { gap: E, gridGap: E, columnGap
|
|
|
286
286
|
(o[c] = o[c] || []).push([r ? "cv" : `${a}-${i[a]}`, s, m]);
|
|
287
287
|
}
|
|
288
288
|
return o;
|
|
289
|
-
}, Jn = {}, Qn =
|
|
289
|
+
}, Jn = {}, Qn = Ae(), er = (e, t) => Qn(e, () => (...n) => {
|
|
290
290
|
const r = () => {
|
|
291
291
|
for (let o of n) {
|
|
292
292
|
o = typeof o == "object" && o || {};
|
|
293
|
-
let i =
|
|
293
|
+
let i = ge(o);
|
|
294
294
|
if (!t.rules.global.cache.has(i)) {
|
|
295
295
|
if (t.rules.global.cache.add(i), "@import" in o) {
|
|
296
296
|
let s = [].indexOf.call(t.sheet.cssRules, t.rules.themed.group) - 1;
|
|
@@ -306,8 +306,8 @@ var N = "colors", Y = "sizes", E = "space", Mn = { gap: E, gridGap: E, columnGap
|
|
|
306
306
|
return "";
|
|
307
307
|
};
|
|
308
308
|
return mt(r, { toString: r });
|
|
309
|
-
}), tr =
|
|
310
|
-
const r = `${
|
|
309
|
+
}), tr = Ae(), nr = (e, t) => tr(e, () => (n) => {
|
|
310
|
+
const r = `${te(e.prefix)}k-${ge(n)}`, o = () => {
|
|
311
311
|
if (!t.rules.global.cache.has(r)) {
|
|
312
312
|
t.rules.global.cache.add(r);
|
|
313
313
|
const i = [];
|
|
@@ -328,18 +328,18 @@ var N = "colors", Y = "sizes", E = "space", Mn = { gap: E, gridGap: E, columnGap
|
|
|
328
328
|
return "var(" + this.variable + ")";
|
|
329
329
|
}
|
|
330
330
|
get variable() {
|
|
331
|
-
return "--" +
|
|
331
|
+
return "--" + te(this.prefix) + te(this.scale) + this.token;
|
|
332
332
|
}
|
|
333
333
|
toString() {
|
|
334
334
|
return this.computedValue;
|
|
335
335
|
}
|
|
336
|
-
}, or =
|
|
336
|
+
}, or = Ae(), ir = (e, t) => or(e, () => (n, r) => {
|
|
337
337
|
r = typeof n == "object" && n || Object(r);
|
|
338
|
-
const o = `.${n = (n = typeof n == "string" ? n : "") || `${
|
|
338
|
+
const o = `.${n = (n = typeof n == "string" ? n : "") || `${te(e.prefix)}t-${ge(r)}`}`, i = {}, s = [];
|
|
339
339
|
for (const a in r) {
|
|
340
340
|
i[a] = {};
|
|
341
341
|
for (const c in r[a]) {
|
|
342
|
-
const m = `--${
|
|
342
|
+
const m = `--${te(e.prefix)}${a}-${c}`, d = en(String(r[a][c]), e.prefix, a);
|
|
343
343
|
i[a][c] = new rr(c, d, a, e.prefix), s.push(`${m}:${d}`);
|
|
344
344
|
}
|
|
345
345
|
}
|
|
@@ -354,12 +354,12 @@ var N = "colors", Y = "sizes", E = "space", Mn = { gap: E, gridGap: E, columnGap
|
|
|
354
354
|
return { ...i, get className() {
|
|
355
355
|
return l();
|
|
356
356
|
}, selector: o, toString: l };
|
|
357
|
-
}), sr =
|
|
357
|
+
}), sr = Ae(), lr = Ae(), ar = (e) => {
|
|
358
358
|
const t = ((n) => {
|
|
359
359
|
let r = !1;
|
|
360
360
|
const o = sr(n, (i) => {
|
|
361
361
|
r = !0;
|
|
362
|
-
const s = "prefix" in (i = typeof i == "object" && i || {}) ? String(i.prefix) : "", l = typeof i.media == "object" && i.media || {}, a = typeof i.root == "object" ? i.root || null : globalThis.document || null, c = typeof i.theme == "object" && i.theme || {}, m = { prefix: s, media: l, theme: c, themeMap: typeof i.themeMap == "object" && i.themeMap || { ...Mn }, utils: typeof i.utils == "object" && i.utils || {} }, d = Kn(a), f = { css:
|
|
362
|
+
const s = "prefix" in (i = typeof i == "object" && i || {}) ? String(i.prefix) : "", l = typeof i.media == "object" && i.media || {}, a = typeof i.root == "object" ? i.root || null : globalThis.document || null, c = typeof i.theme == "object" && i.theme || {}, m = { prefix: s, media: l, theme: c, themeMap: typeof i.themeMap == "object" && i.themeMap || { ...Mn }, utils: typeof i.utils == "object" && i.utils || {} }, d = Kn(a), f = { css: Tt(m, d), globalCss: er(m, d), keyframes: nr(m, d), createTheme: ir(m, d), reset() {
|
|
363
363
|
d.reset(), f.theme.toString();
|
|
364
364
|
}, theme: {}, sheet: d, config: m, prefix: s, getCssText: d.toString, toString: d.toString };
|
|
365
365
|
return String(f.theme = f.createTheme(c)), f;
|
|
@@ -367,18 +367,18 @@ var N = "colors", Y = "sizes", E = "space", Mn = { gap: E, gridGap: E, columnGap
|
|
|
367
367
|
return r || o.reset(), o;
|
|
368
368
|
})(e);
|
|
369
369
|
return t.styled = (({ config: n, sheet: r }) => lr(n, () => {
|
|
370
|
-
const o =
|
|
370
|
+
const o = Tt(n, r);
|
|
371
371
|
return (...i) => {
|
|
372
|
-
const s = o(...i), l = s[
|
|
372
|
+
const s = o(...i), l = s[me].type, a = xe.forwardRef((c, m) => {
|
|
373
373
|
const d = c && c.as || l, { props: f, deferredInjector: u } = s(c);
|
|
374
374
|
return delete f.as, f.ref = m, u ? xe.createElement(xe.Fragment, null, xe.createElement(d, f), xe.createElement(u, null)) : xe.createElement(d, f);
|
|
375
375
|
});
|
|
376
|
-
return a.className = s.className, a.displayName = `Styled.${l.displayName || l.name || l}`, a.selector = s.selector, a.toString = () => s.selector, a[
|
|
376
|
+
return a.className = s.className, a.displayName = `Styled.${l.displayName || l.name || l}`, a.selector = s.selector, a.toString = () => s.selector, a[me] = s[me], a;
|
|
377
377
|
};
|
|
378
378
|
}))(t), t;
|
|
379
379
|
};
|
|
380
|
-
let
|
|
381
|
-
const tt = () => (
|
|
380
|
+
let Pt = 9999;
|
|
381
|
+
const tt = () => (Pt--, Pt), { styled: V, css: gt, keyframes: Be, globalCss: hi } = ar({
|
|
382
382
|
theme: {
|
|
383
383
|
colors: {
|
|
384
384
|
gray50: "#F9FAFA",
|
|
@@ -505,14 +505,14 @@ const tt = () => (It--, It), { styled: V, css: gt, keyframes: Ae, globalCss: pi
|
|
|
505
505
|
lg: "(min-width: 1200px)",
|
|
506
506
|
print: "print"
|
|
507
507
|
}
|
|
508
|
-
}), cr =
|
|
508
|
+
}), cr = Be({
|
|
509
509
|
"0%": {
|
|
510
510
|
transform: "rotate(0)"
|
|
511
511
|
},
|
|
512
512
|
"100%": {
|
|
513
513
|
transform: "rotate(360deg)"
|
|
514
514
|
}
|
|
515
|
-
}), ur =
|
|
515
|
+
}), ur = Be({
|
|
516
516
|
"0%": {
|
|
517
517
|
strokeDashoffset: 600
|
|
518
518
|
},
|
|
@@ -568,7 +568,7 @@ const tt = () => (It--, It), { styled: V, css: gt, keyframes: Ae, globalCss: pi
|
|
|
568
568
|
size: "sm",
|
|
569
569
|
color: "dark"
|
|
570
570
|
}
|
|
571
|
-
}), gr =
|
|
571
|
+
}), gr = Pe(
|
|
572
572
|
(e, t) => /* @__PURE__ */ z(
|
|
573
573
|
mr,
|
|
574
574
|
{
|
|
@@ -737,8 +737,8 @@ const tt = () => (It--, It), { styled: V, css: gt, keyframes: Ae, globalCss: pi
|
|
|
737
737
|
color: "secondary",
|
|
738
738
|
size: "md"
|
|
739
739
|
}
|
|
740
|
-
}), hr =
|
|
741
|
-
({ children: e, disabled: t, isLoading: n, variant: r, color: o, ...i }, s) => (!o && r === "primary" && (o = "primary"), /* @__PURE__ */
|
|
740
|
+
}), hr = Pe(
|
|
741
|
+
({ children: e, disabled: t, isLoading: n, variant: r, color: o, ...i }, s) => (!o && r === "primary" && (o = "primary"), /* @__PURE__ */ Ze(
|
|
742
742
|
pr,
|
|
743
743
|
{
|
|
744
744
|
ref: s,
|
|
@@ -793,7 +793,7 @@ const tt = () => (It--, It), { styled: V, css: gt, keyframes: Ae, globalCss: pi
|
|
|
793
793
|
color: "info",
|
|
794
794
|
size: "md"
|
|
795
795
|
}
|
|
796
|
-
}),
|
|
796
|
+
}), bi = Pe(
|
|
797
797
|
({ children: e, ...t }, n) => /* @__PURE__ */ z(
|
|
798
798
|
br,
|
|
799
799
|
{
|
|
@@ -803,16 +803,16 @@ const tt = () => (It--, It), { styled: V, css: gt, keyframes: Ae, globalCss: pi
|
|
|
803
803
|
children: e
|
|
804
804
|
}
|
|
805
805
|
)
|
|
806
|
-
), yr =
|
|
806
|
+
), yr = Be({
|
|
807
807
|
"0%": { opacity: 0, transform: "translateY(0.5rem)" },
|
|
808
808
|
"100%": { opacity: 1, transform: "translateY(0)" }
|
|
809
|
-
}), vr =
|
|
809
|
+
}), vr = Be({
|
|
810
810
|
"0%": { opacity: 0, transform: "translateX(-0.5rem)" },
|
|
811
811
|
"100%": { opacity: 1, transform: "translateX(0)" }
|
|
812
|
-
}), xr =
|
|
812
|
+
}), xr = Be({
|
|
813
813
|
"0%": { opacity: 0, transform: "translateY(-0.5rem)" },
|
|
814
814
|
"100%": { opacity: 1, transform: "translateY(0)" }
|
|
815
|
-
}), wr =
|
|
815
|
+
}), wr = Be({
|
|
816
816
|
"0%": { opacity: 0, transform: "translateX(0.5rem)" },
|
|
817
817
|
"100%": { opacity: 1, transform: "translateX(0)" }
|
|
818
818
|
}), $r = gt({
|
|
@@ -820,7 +820,11 @@ const tt = () => (It--, It), { styled: V, css: gt, keyframes: Ae, globalCss: pi
|
|
|
820
820
|
boxShadow: "$overlayCard",
|
|
821
821
|
borderRadius: "$sm",
|
|
822
822
|
overflow: "hidden",
|
|
823
|
-
zIndex: "$overlayCard"
|
|
823
|
+
zIndex: "$overlayCard",
|
|
824
|
+
// radix dialogs sets `pointer-events: none;` on body,
|
|
825
|
+
// so for other popups that uses `OverlayCard` to work
|
|
826
|
+
// we need to explicitly set this.
|
|
827
|
+
pointerEvents: "auto"
|
|
824
828
|
}), Sr = gt({
|
|
825
829
|
animationDuration: "400ms",
|
|
826
830
|
animationTimingFunction: "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
@@ -831,33 +835,33 @@ const tt = () => (It--, It), { styled: V, css: gt, keyframes: Ae, globalCss: pi
|
|
|
831
835
|
'&[data-side="bottom"]': { animationName: yr },
|
|
832
836
|
'&[data-side="left"]': { animationName: vr }
|
|
833
837
|
}
|
|
834
|
-
}),
|
|
838
|
+
}), tn = V(
|
|
835
839
|
"div",
|
|
836
840
|
$r,
|
|
837
841
|
Sr
|
|
838
842
|
);
|
|
839
|
-
function
|
|
840
|
-
return
|
|
843
|
+
function oe(e) {
|
|
844
|
+
return nn(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
841
845
|
}
|
|
842
|
-
function
|
|
846
|
+
function q(e) {
|
|
843
847
|
var t;
|
|
844
848
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
845
849
|
}
|
|
846
|
-
function
|
|
850
|
+
function ne(e) {
|
|
847
851
|
var t;
|
|
848
|
-
return (t = (
|
|
852
|
+
return (t = (nn(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
849
853
|
}
|
|
850
|
-
function
|
|
851
|
-
return e instanceof Node || e instanceof
|
|
854
|
+
function nn(e) {
|
|
855
|
+
return e instanceof Node || e instanceof q(e).Node;
|
|
852
856
|
}
|
|
853
|
-
function
|
|
854
|
-
return e instanceof Element || e instanceof
|
|
857
|
+
function N(e) {
|
|
858
|
+
return e instanceof Element || e instanceof q(e).Element;
|
|
855
859
|
}
|
|
856
|
-
function
|
|
857
|
-
return e instanceof HTMLElement || e instanceof
|
|
860
|
+
function Z(e) {
|
|
861
|
+
return e instanceof HTMLElement || e instanceof q(e).HTMLElement;
|
|
858
862
|
}
|
|
859
863
|
function at(e) {
|
|
860
|
-
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof
|
|
864
|
+
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof q(e).ShadowRoot;
|
|
861
865
|
}
|
|
862
866
|
function Fe(e) {
|
|
863
867
|
const {
|
|
@@ -865,22 +869,22 @@ function Fe(e) {
|
|
|
865
869
|
overflowX: n,
|
|
866
870
|
overflowY: r,
|
|
867
871
|
display: o
|
|
868
|
-
} =
|
|
872
|
+
} = J(e);
|
|
869
873
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
|
|
870
874
|
}
|
|
871
875
|
function Rr(e) {
|
|
872
|
-
return ["table", "td", "th"].includes(
|
|
876
|
+
return ["table", "td", "th"].includes(oe(e));
|
|
873
877
|
}
|
|
874
878
|
function pt(e) {
|
|
875
|
-
const t = ht(), n =
|
|
879
|
+
const t = ht(), n = J(e);
|
|
876
880
|
return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
|
|
877
881
|
}
|
|
878
882
|
function Er(e) {
|
|
879
|
-
let t =
|
|
880
|
-
for (;
|
|
883
|
+
let t = he(e);
|
|
884
|
+
for (; Z(t) && !Te(t); ) {
|
|
881
885
|
if (pt(t))
|
|
882
886
|
return t;
|
|
883
|
-
t =
|
|
887
|
+
t = he(t);
|
|
884
888
|
}
|
|
885
889
|
return null;
|
|
886
890
|
}
|
|
@@ -888,13 +892,13 @@ function ht() {
|
|
|
888
892
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
889
893
|
}
|
|
890
894
|
function Te(e) {
|
|
891
|
-
return ["html", "body", "#document"].includes(
|
|
895
|
+
return ["html", "body", "#document"].includes(oe(e));
|
|
892
896
|
}
|
|
893
|
-
function
|
|
894
|
-
return
|
|
897
|
+
function J(e) {
|
|
898
|
+
return q(e).getComputedStyle(e);
|
|
895
899
|
}
|
|
896
|
-
function
|
|
897
|
-
return
|
|
900
|
+
function Je(e) {
|
|
901
|
+
return N(e) ? {
|
|
898
902
|
scrollLeft: e.scrollLeft,
|
|
899
903
|
scrollTop: e.scrollTop
|
|
900
904
|
} : {
|
|
@@ -902,27 +906,27 @@ function Ue(e) {
|
|
|
902
906
|
scrollTop: e.pageYOffset
|
|
903
907
|
};
|
|
904
908
|
}
|
|
905
|
-
function
|
|
906
|
-
if (
|
|
909
|
+
function he(e) {
|
|
910
|
+
if (oe(e) === "html")
|
|
907
911
|
return e;
|
|
908
912
|
const t = (
|
|
909
913
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
910
914
|
e.assignedSlot || // DOM Element detected.
|
|
911
915
|
e.parentNode || // ShadowRoot detected.
|
|
912
916
|
at(e) && e.host || // Fallback.
|
|
913
|
-
|
|
917
|
+
ne(e)
|
|
914
918
|
);
|
|
915
919
|
return at(t) ? t.host : t;
|
|
916
920
|
}
|
|
917
|
-
function
|
|
918
|
-
const t =
|
|
919
|
-
return Te(t) ? e.ownerDocument ? e.ownerDocument.body : e.body :
|
|
921
|
+
function rn(e) {
|
|
922
|
+
const t = he(e);
|
|
923
|
+
return Te(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Z(t) && Fe(t) ? t : rn(t);
|
|
920
924
|
}
|
|
921
|
-
function
|
|
925
|
+
function re(e, t, n) {
|
|
922
926
|
var r;
|
|
923
927
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
924
|
-
const o =
|
|
925
|
-
return i ? t.concat(s, s.visualViewport || [], Fe(o) ? o : [], s.frameElement && n ?
|
|
928
|
+
const o = rn(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), s = q(o);
|
|
929
|
+
return i ? t.concat(s, s.visualViewport || [], Fe(o) ? o : [], s.frameElement && n ? re(s.frameElement) : []) : t.concat(o, re(o, [], n));
|
|
926
930
|
}
|
|
927
931
|
function Cr(e) {
|
|
928
932
|
let t = e.activeElement;
|
|
@@ -932,7 +936,7 @@ function Cr(e) {
|
|
|
932
936
|
}
|
|
933
937
|
return t;
|
|
934
938
|
}
|
|
935
|
-
function
|
|
939
|
+
function pe(e, t) {
|
|
936
940
|
if (!e || !t)
|
|
937
941
|
return !1;
|
|
938
942
|
const n = t.getRootNode == null ? void 0 : t.getRootNode();
|
|
@@ -951,7 +955,7 @@ function me(e, t) {
|
|
|
951
955
|
function kr() {
|
|
952
956
|
return /apple/i.test(navigator.vendor);
|
|
953
957
|
}
|
|
954
|
-
function
|
|
958
|
+
function _e(e, t) {
|
|
955
959
|
const n = ["mouse", "pen"];
|
|
956
960
|
return t || n.push("", void 0), n.includes(e);
|
|
957
961
|
}
|
|
@@ -961,7 +965,7 @@ function Tr(e) {
|
|
|
961
965
|
function Ir(e) {
|
|
962
966
|
return e.matches("html,body");
|
|
963
967
|
}
|
|
964
|
-
function
|
|
968
|
+
function fe(e) {
|
|
965
969
|
return (e == null ? void 0 : e.ownerDocument) || document;
|
|
966
970
|
}
|
|
967
971
|
function nt(e, t) {
|
|
@@ -977,9 +981,9 @@ function Se(e) {
|
|
|
977
981
|
}
|
|
978
982
|
const Pr = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
|
|
979
983
|
function Ar(e) {
|
|
980
|
-
return
|
|
984
|
+
return Z(e) && e.matches(Pr);
|
|
981
985
|
}
|
|
982
|
-
const
|
|
986
|
+
const Ie = Math.min, U = Math.max, Ye = Math.round, je = Math.floor, ie = (e) => ({
|
|
983
987
|
x: e,
|
|
984
988
|
y: e
|
|
985
989
|
}), Br = {
|
|
@@ -991,44 +995,44 @@ const je = Math.min, ge = Math.max, He = Math.round, Le = Math.floor, oe = (e) =
|
|
|
991
995
|
start: "end",
|
|
992
996
|
end: "start"
|
|
993
997
|
};
|
|
994
|
-
function
|
|
995
|
-
return
|
|
998
|
+
function At(e, t, n) {
|
|
999
|
+
return U(e, Ie(t, n));
|
|
996
1000
|
}
|
|
997
|
-
function
|
|
1001
|
+
function We(e, t) {
|
|
998
1002
|
return typeof e == "function" ? e(t) : e;
|
|
999
1003
|
}
|
|
1000
|
-
function
|
|
1004
|
+
function se(e) {
|
|
1001
1005
|
return e.split("-")[0];
|
|
1002
1006
|
}
|
|
1003
|
-
function
|
|
1007
|
+
function Ne(e) {
|
|
1004
1008
|
return e.split("-")[1];
|
|
1005
1009
|
}
|
|
1006
|
-
function
|
|
1010
|
+
function on(e) {
|
|
1007
1011
|
return e === "x" ? "y" : "x";
|
|
1008
1012
|
}
|
|
1009
|
-
function
|
|
1013
|
+
function sn(e) {
|
|
1010
1014
|
return e === "y" ? "height" : "width";
|
|
1011
1015
|
}
|
|
1012
|
-
function
|
|
1013
|
-
return ["top", "bottom"].includes(
|
|
1016
|
+
function ze(e) {
|
|
1017
|
+
return ["top", "bottom"].includes(se(e)) ? "y" : "x";
|
|
1014
1018
|
}
|
|
1015
|
-
function
|
|
1016
|
-
return
|
|
1019
|
+
function ln(e) {
|
|
1020
|
+
return on(ze(e));
|
|
1017
1021
|
}
|
|
1018
1022
|
function Dr(e, t, n) {
|
|
1019
1023
|
n === void 0 && (n = !1);
|
|
1020
|
-
const r =
|
|
1024
|
+
const r = Ne(e), o = ln(e), i = sn(o);
|
|
1021
1025
|
let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
1022
|
-
return t.reference[i] > t.floating[i] && (s =
|
|
1026
|
+
return t.reference[i] > t.floating[i] && (s = Ke(s)), [s, Ke(s)];
|
|
1023
1027
|
}
|
|
1024
1028
|
function Mr(e) {
|
|
1025
|
-
const t =
|
|
1029
|
+
const t = Ke(e);
|
|
1026
1030
|
return [ct(e), t, ct(t)];
|
|
1027
1031
|
}
|
|
1028
1032
|
function ct(e) {
|
|
1029
1033
|
return e.replace(/start|end/g, (t) => Or[t]);
|
|
1030
1034
|
}
|
|
1031
|
-
function
|
|
1035
|
+
function Lr(e, t, n) {
|
|
1032
1036
|
const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
|
|
1033
1037
|
switch (e) {
|
|
1034
1038
|
case "top":
|
|
@@ -1041,15 +1045,15 @@ function Fr(e, t, n) {
|
|
|
1041
1045
|
return [];
|
|
1042
1046
|
}
|
|
1043
1047
|
}
|
|
1044
|
-
function
|
|
1045
|
-
const o =
|
|
1046
|
-
let i =
|
|
1048
|
+
function Fr(e, t, n, r) {
|
|
1049
|
+
const o = Ne(e);
|
|
1050
|
+
let i = Lr(se(e), n === "start", r);
|
|
1047
1051
|
return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(ct)))), i;
|
|
1048
1052
|
}
|
|
1049
|
-
function
|
|
1053
|
+
function Ke(e) {
|
|
1050
1054
|
return e.replace(/left|right|bottom|top/g, (t) => Br[t]);
|
|
1051
1055
|
}
|
|
1052
|
-
function
|
|
1056
|
+
function Wr(e) {
|
|
1053
1057
|
return {
|
|
1054
1058
|
top: 0,
|
|
1055
1059
|
right: 0,
|
|
@@ -1058,15 +1062,15 @@ function Nr(e) {
|
|
|
1058
1062
|
...e
|
|
1059
1063
|
};
|
|
1060
1064
|
}
|
|
1061
|
-
function
|
|
1062
|
-
return typeof e != "number" ?
|
|
1065
|
+
function Nr(e) {
|
|
1066
|
+
return typeof e != "number" ? Wr(e) : {
|
|
1063
1067
|
top: e,
|
|
1064
1068
|
right: e,
|
|
1065
1069
|
bottom: e,
|
|
1066
1070
|
left: e
|
|
1067
1071
|
};
|
|
1068
1072
|
}
|
|
1069
|
-
function
|
|
1073
|
+
function Xe(e) {
|
|
1070
1074
|
return {
|
|
1071
1075
|
...e,
|
|
1072
1076
|
top: e.y,
|
|
@@ -1075,12 +1079,12 @@ function _e(e) {
|
|
|
1075
1079
|
bottom: e.y + e.height
|
|
1076
1080
|
};
|
|
1077
1081
|
}
|
|
1078
|
-
function
|
|
1082
|
+
function Bt(e, t, n) {
|
|
1079
1083
|
let {
|
|
1080
1084
|
reference: r,
|
|
1081
1085
|
floating: o
|
|
1082
1086
|
} = e;
|
|
1083
|
-
const i =
|
|
1087
|
+
const i = ze(t), s = ln(t), l = sn(s), a = se(t), c = i === "y", m = r.x + r.width / 2 - o.width / 2, d = r.y + r.height / 2 - o.height / 2, f = r[l] / 2 - o[l] / 2;
|
|
1084
1088
|
let u;
|
|
1085
1089
|
switch (a) {
|
|
1086
1090
|
case "top":
|
|
@@ -1113,7 +1117,7 @@ function At(e, t, n) {
|
|
|
1113
1117
|
y: r.y
|
|
1114
1118
|
};
|
|
1115
1119
|
}
|
|
1116
|
-
switch (
|
|
1120
|
+
switch (Ne(t)) {
|
|
1117
1121
|
case "start":
|
|
1118
1122
|
u[s] -= f * (n && c ? -1 : 1);
|
|
1119
1123
|
break;
|
|
@@ -1137,16 +1141,16 @@ const zr = async (e, t, n) => {
|
|
|
1137
1141
|
}), {
|
|
1138
1142
|
x: m,
|
|
1139
1143
|
y: d
|
|
1140
|
-
} =
|
|
1144
|
+
} = Bt(c, r, a), f = r, u = {}, g = 0;
|
|
1141
1145
|
for (let p = 0; p < l.length; p++) {
|
|
1142
1146
|
const {
|
|
1143
|
-
name:
|
|
1147
|
+
name: w,
|
|
1144
1148
|
fn: h
|
|
1145
1149
|
} = l[p], {
|
|
1146
1150
|
x,
|
|
1147
1151
|
y: P,
|
|
1148
1152
|
data: S,
|
|
1149
|
-
reset:
|
|
1153
|
+
reset: k
|
|
1150
1154
|
} = await h({
|
|
1151
1155
|
x: m,
|
|
1152
1156
|
y: d,
|
|
@@ -1163,18 +1167,18 @@ const zr = async (e, t, n) => {
|
|
|
1163
1167
|
});
|
|
1164
1168
|
m = x ?? m, d = P ?? d, u = {
|
|
1165
1169
|
...u,
|
|
1166
|
-
[
|
|
1167
|
-
...u[
|
|
1170
|
+
[w]: {
|
|
1171
|
+
...u[w],
|
|
1168
1172
|
...S
|
|
1169
1173
|
}
|
|
1170
|
-
},
|
|
1174
|
+
}, k && g <= 50 && (g++, typeof k == "object" && (k.placement && (f = k.placement), k.rects && (c = k.rects === !0 ? await s.getElementRects({
|
|
1171
1175
|
reference: e,
|
|
1172
1176
|
floating: t,
|
|
1173
1177
|
strategy: o
|
|
1174
|
-
}) :
|
|
1178
|
+
}) : k.rects), {
|
|
1175
1179
|
x: m,
|
|
1176
1180
|
y: d
|
|
1177
|
-
} =
|
|
1181
|
+
} = Bt(c, f, a)), p = -1);
|
|
1178
1182
|
}
|
|
1179
1183
|
return {
|
|
1180
1184
|
x: m,
|
|
@@ -1184,7 +1188,7 @@ const zr = async (e, t, n) => {
|
|
|
1184
1188
|
middlewareData: u
|
|
1185
1189
|
};
|
|
1186
1190
|
};
|
|
1187
|
-
async function
|
|
1191
|
+
async function bt(e, t) {
|
|
1188
1192
|
var n;
|
|
1189
1193
|
t === void 0 && (t = {});
|
|
1190
1194
|
const {
|
|
@@ -1200,8 +1204,8 @@ async function ln(e, t) {
|
|
|
1200
1204
|
elementContext: d = "floating",
|
|
1201
1205
|
altBoundary: f = !1,
|
|
1202
1206
|
padding: u = 0
|
|
1203
|
-
} =
|
|
1204
|
-
element: (n = await (i.isElement == null ? void 0 : i.isElement(
|
|
1207
|
+
} = We(t, e), g = Nr(u), w = l[f ? d === "floating" ? "reference" : "floating" : d], h = Xe(await i.getClippingRect({
|
|
1208
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(w))) == null || n ? w : w.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(l.floating)),
|
|
1205
1209
|
boundary: c,
|
|
1206
1210
|
rootBoundary: m,
|
|
1207
1211
|
strategy: a
|
|
@@ -1215,17 +1219,17 @@ async function ln(e, t) {
|
|
|
1215
1219
|
} : {
|
|
1216
1220
|
x: 1,
|
|
1217
1221
|
y: 1
|
|
1218
|
-
},
|
|
1222
|
+
}, k = Xe(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1219
1223
|
elements: l,
|
|
1220
1224
|
rect: x,
|
|
1221
1225
|
offsetParent: P,
|
|
1222
1226
|
strategy: a
|
|
1223
1227
|
}) : x);
|
|
1224
1228
|
return {
|
|
1225
|
-
top: (h.top -
|
|
1226
|
-
bottom: (
|
|
1227
|
-
left: (h.left -
|
|
1228
|
-
right: (
|
|
1229
|
+
top: (h.top - k.top + g.top) / S.y,
|
|
1230
|
+
bottom: (k.bottom - h.bottom + g.bottom) / S.y,
|
|
1231
|
+
left: (h.left - k.left + g.left) / S.x,
|
|
1232
|
+
right: (k.right - h.right + g.right) / S.x
|
|
1229
1233
|
};
|
|
1230
1234
|
}
|
|
1231
1235
|
const jr = function(e) {
|
|
@@ -1248,40 +1252,40 @@ const jr = function(e) {
|
|
|
1248
1252
|
fallbackStrategy: u = "bestFit",
|
|
1249
1253
|
fallbackAxisSideDirection: g = "none",
|
|
1250
1254
|
flipAlignment: p = !0,
|
|
1251
|
-
|
|
1252
|
-
} =
|
|
1255
|
+
...w
|
|
1256
|
+
} = We(e, t);
|
|
1253
1257
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
1254
1258
|
return {};
|
|
1255
|
-
const h =
|
|
1256
|
-
!f && g !== "none" && S.push(...
|
|
1257
|
-
const
|
|
1258
|
-
let
|
|
1259
|
-
if (m && A.push(
|
|
1259
|
+
const h = se(o), x = se(l) === l, P = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), S = f || (x || !p ? [Ke(l)] : Mr(l));
|
|
1260
|
+
!f && g !== "none" && S.push(...Fr(l, p, g, P));
|
|
1261
|
+
const k = [l, ...S], C = await bt(t, w), A = [];
|
|
1262
|
+
let T = ((r = i.flip) == null ? void 0 : r.overflows) || [];
|
|
1263
|
+
if (m && A.push(C[h]), d) {
|
|
1260
1264
|
const M = Dr(o, s, P);
|
|
1261
|
-
A.push(
|
|
1265
|
+
A.push(C[M[0]], C[M[1]]);
|
|
1262
1266
|
}
|
|
1263
|
-
if (
|
|
1267
|
+
if (T = [...T, {
|
|
1264
1268
|
placement: o,
|
|
1265
1269
|
overflows: A
|
|
1266
1270
|
}], !A.every((M) => M <= 0)) {
|
|
1267
|
-
var
|
|
1268
|
-
const M = (((
|
|
1269
|
-
if (
|
|
1271
|
+
var B, D;
|
|
1272
|
+
const M = (((B = i.flip) == null ? void 0 : B.index) || 0) + 1, O = k[M];
|
|
1273
|
+
if (O)
|
|
1270
1274
|
return {
|
|
1271
1275
|
data: {
|
|
1272
1276
|
index: M,
|
|
1273
|
-
overflows:
|
|
1277
|
+
overflows: T
|
|
1274
1278
|
},
|
|
1275
1279
|
reset: {
|
|
1276
|
-
placement:
|
|
1280
|
+
placement: O
|
|
1277
1281
|
}
|
|
1278
1282
|
};
|
|
1279
|
-
let b = (D =
|
|
1283
|
+
let b = (D = T.filter((v) => v.overflows[0] <= 0).sort((v, I) => v.overflows[1] - I.overflows[1])[0]) == null ? void 0 : D.placement;
|
|
1280
1284
|
if (!b)
|
|
1281
1285
|
switch (u) {
|
|
1282
1286
|
case "bestFit": {
|
|
1283
|
-
var
|
|
1284
|
-
const v = (
|
|
1287
|
+
var L;
|
|
1288
|
+
const v = (L = T.map((I) => [I.placement, I.overflows.filter((R) => R > 0).reduce((R, $) => R + $, 0)]).sort((I, R) => I[1] - R[1])[0]) == null ? void 0 : L[0];
|
|
1285
1289
|
v && (b = v);
|
|
1286
1290
|
break;
|
|
1287
1291
|
}
|
|
@@ -1305,7 +1309,7 @@ async function Hr(e, t) {
|
|
|
1305
1309
|
placement: n,
|
|
1306
1310
|
platform: r,
|
|
1307
1311
|
elements: o
|
|
1308
|
-
} = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s =
|
|
1312
|
+
} = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = se(n), l = Ne(n), a = ze(n) === "y", c = ["left", "top"].includes(s) ? -1 : 1, m = i && a ? -1 : 1, d = We(t, e);
|
|
1309
1313
|
let {
|
|
1310
1314
|
mainAxis: f,
|
|
1311
1315
|
crossAxis: u,
|
|
@@ -1363,11 +1367,11 @@ const Vr = function(e) {
|
|
|
1363
1367
|
mainAxis: i = !0,
|
|
1364
1368
|
crossAxis: s = !1,
|
|
1365
1369
|
limiter: l = {
|
|
1366
|
-
fn: (
|
|
1370
|
+
fn: (w) => {
|
|
1367
1371
|
let {
|
|
1368
1372
|
x: h,
|
|
1369
1373
|
y: x
|
|
1370
|
-
} =
|
|
1374
|
+
} = w;
|
|
1371
1375
|
return {
|
|
1372
1376
|
x: h,
|
|
1373
1377
|
y: x
|
|
@@ -1375,18 +1379,18 @@ const Vr = function(e) {
|
|
|
1375
1379
|
}
|
|
1376
1380
|
},
|
|
1377
1381
|
...a
|
|
1378
|
-
} =
|
|
1382
|
+
} = We(e, t), c = {
|
|
1379
1383
|
x: n,
|
|
1380
1384
|
y: r
|
|
1381
|
-
}, m = await
|
|
1385
|
+
}, m = await bt(t, a), d = ze(se(o)), f = on(d);
|
|
1382
1386
|
let u = c[f], g = c[d];
|
|
1383
1387
|
if (i) {
|
|
1384
|
-
const
|
|
1385
|
-
u =
|
|
1388
|
+
const w = f === "y" ? "top" : "left", h = f === "y" ? "bottom" : "right", x = u + m[w], P = u - m[h];
|
|
1389
|
+
u = At(x, u, P);
|
|
1386
1390
|
}
|
|
1387
1391
|
if (s) {
|
|
1388
|
-
const
|
|
1389
|
-
g =
|
|
1392
|
+
const w = d === "y" ? "top" : "left", h = d === "y" ? "bottom" : "right", x = g + m[w], P = g - m[h];
|
|
1393
|
+
g = At(x, g, P);
|
|
1390
1394
|
}
|
|
1391
1395
|
const p = l.fn({
|
|
1392
1396
|
...t,
|
|
@@ -1402,71 +1406,117 @@ const Vr = function(e) {
|
|
|
1402
1406
|
};
|
|
1403
1407
|
}
|
|
1404
1408
|
};
|
|
1409
|
+
}, Yr = function(e) {
|
|
1410
|
+
return e === void 0 && (e = {}), {
|
|
1411
|
+
name: "size",
|
|
1412
|
+
options: e,
|
|
1413
|
+
async fn(t) {
|
|
1414
|
+
const {
|
|
1415
|
+
placement: n,
|
|
1416
|
+
rects: r,
|
|
1417
|
+
platform: o,
|
|
1418
|
+
elements: i
|
|
1419
|
+
} = t, {
|
|
1420
|
+
apply: s = () => {
|
|
1421
|
+
},
|
|
1422
|
+
...l
|
|
1423
|
+
} = We(e, t), a = await bt(t, l), c = se(n), m = Ne(n), d = ze(n) === "y", {
|
|
1424
|
+
width: f,
|
|
1425
|
+
height: u
|
|
1426
|
+
} = r.floating;
|
|
1427
|
+
let g, p;
|
|
1428
|
+
c === "top" || c === "bottom" ? (g = c, p = m === (await (o.isRTL == null ? void 0 : o.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (p = c, g = m === "end" ? "top" : "bottom");
|
|
1429
|
+
const w = u - a[g], h = f - a[p], x = !t.middlewareData.shift;
|
|
1430
|
+
let P = w, S = h;
|
|
1431
|
+
if (d) {
|
|
1432
|
+
const C = f - a.left - a.right;
|
|
1433
|
+
S = m || x ? Ie(h, C) : C;
|
|
1434
|
+
} else {
|
|
1435
|
+
const C = u - a.top - a.bottom;
|
|
1436
|
+
P = m || x ? Ie(w, C) : C;
|
|
1437
|
+
}
|
|
1438
|
+
if (x && !m) {
|
|
1439
|
+
const C = U(a.left, 0), A = U(a.right, 0), T = U(a.top, 0), B = U(a.bottom, 0);
|
|
1440
|
+
d ? S = f - 2 * (C !== 0 || A !== 0 ? C + A : U(a.left, a.right)) : P = u - 2 * (T !== 0 || B !== 0 ? T + B : U(a.top, a.bottom));
|
|
1441
|
+
}
|
|
1442
|
+
await s({
|
|
1443
|
+
...t,
|
|
1444
|
+
availableWidth: S,
|
|
1445
|
+
availableHeight: P
|
|
1446
|
+
});
|
|
1447
|
+
const k = await o.getDimensions(i.floating);
|
|
1448
|
+
return f !== k.width || u !== k.height ? {
|
|
1449
|
+
reset: {
|
|
1450
|
+
rects: !0
|
|
1451
|
+
}
|
|
1452
|
+
} : {};
|
|
1453
|
+
}
|
|
1454
|
+
};
|
|
1405
1455
|
};
|
|
1406
1456
|
function an(e) {
|
|
1407
|
-
const t =
|
|
1457
|
+
const t = J(e);
|
|
1408
1458
|
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
1409
|
-
const o =
|
|
1459
|
+
const o = Z(e), i = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, l = Ye(n) !== i || Ye(r) !== s;
|
|
1410
1460
|
return l && (n = i, r = s), {
|
|
1411
1461
|
width: n,
|
|
1412
1462
|
height: r,
|
|
1413
1463
|
$: l
|
|
1414
1464
|
};
|
|
1415
1465
|
}
|
|
1416
|
-
function
|
|
1417
|
-
return
|
|
1466
|
+
function yt(e) {
|
|
1467
|
+
return N(e) ? e : e.contextElement;
|
|
1418
1468
|
}
|
|
1419
1469
|
function ke(e) {
|
|
1420
|
-
const t =
|
|
1421
|
-
if (!
|
|
1422
|
-
return
|
|
1470
|
+
const t = yt(e);
|
|
1471
|
+
if (!Z(t))
|
|
1472
|
+
return ie(1);
|
|
1423
1473
|
const n = t.getBoundingClientRect(), {
|
|
1424
1474
|
width: r,
|
|
1425
1475
|
height: o,
|
|
1426
1476
|
$: i
|
|
1427
1477
|
} = an(t);
|
|
1428
|
-
let s = (i ?
|
|
1478
|
+
let s = (i ? Ye(n.width) : n.width) / r, l = (i ? Ye(n.height) : n.height) / o;
|
|
1429
1479
|
return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
1430
1480
|
x: s,
|
|
1431
1481
|
y: l
|
|
1432
1482
|
};
|
|
1433
1483
|
}
|
|
1434
|
-
const
|
|
1484
|
+
const Kr = /* @__PURE__ */ ie(0);
|
|
1435
1485
|
function cn(e) {
|
|
1436
|
-
const t =
|
|
1437
|
-
return !ht() || !t.visualViewport ?
|
|
1486
|
+
const t = q(e);
|
|
1487
|
+
return !ht() || !t.visualViewport ? Kr : {
|
|
1438
1488
|
x: t.visualViewport.offsetLeft,
|
|
1439
1489
|
y: t.visualViewport.offsetTop
|
|
1440
1490
|
};
|
|
1441
1491
|
}
|
|
1442
|
-
function
|
|
1443
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
1492
|
+
function Xr(e, t, n) {
|
|
1493
|
+
return t === void 0 && (t = !1), !n || t && n !== q(e) ? !1 : t;
|
|
1444
1494
|
}
|
|
1445
1495
|
function be(e, t, n, r) {
|
|
1446
1496
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1447
|
-
const o = e.getBoundingClientRect(), i =
|
|
1448
|
-
let s =
|
|
1449
|
-
t && (r ?
|
|
1450
|
-
const l =
|
|
1497
|
+
const o = e.getBoundingClientRect(), i = yt(e);
|
|
1498
|
+
let s = ie(1);
|
|
1499
|
+
t && (r ? N(r) && (s = ke(r)) : s = ke(e));
|
|
1500
|
+
const l = Xr(i, n, r) ? cn(i) : ie(0);
|
|
1451
1501
|
let a = (o.left + l.x) / s.x, c = (o.top + l.y) / s.y, m = o.width / s.x, d = o.height / s.y;
|
|
1452
1502
|
if (i) {
|
|
1453
|
-
const f =
|
|
1503
|
+
const f = q(i), u = r && N(r) ? q(r) : r;
|
|
1454
1504
|
let g = f, p = g.frameElement;
|
|
1455
1505
|
for (; p && r && u !== g; ) {
|
|
1456
|
-
const
|
|
1457
|
-
a *=
|
|
1506
|
+
const w = ke(p), h = p.getBoundingClientRect(), x = J(p), P = h.left + (p.clientLeft + parseFloat(x.paddingLeft)) * w.x, S = h.top + (p.clientTop + parseFloat(x.paddingTop)) * w.y;
|
|
1507
|
+
a *= w.x, c *= w.y, m *= w.x, d *= w.y, a += P, c += S, g = q(p), p = g.frameElement;
|
|
1458
1508
|
}
|
|
1459
1509
|
}
|
|
1460
|
-
return
|
|
1510
|
+
return Xe({
|
|
1461
1511
|
width: m,
|
|
1462
1512
|
height: d,
|
|
1463
1513
|
x: a,
|
|
1464
1514
|
y: c
|
|
1465
1515
|
});
|
|
1466
1516
|
}
|
|
1467
|
-
const
|
|
1517
|
+
const Gr = [":popover-open", ":modal"];
|
|
1468
1518
|
function un(e) {
|
|
1469
|
-
return
|
|
1519
|
+
return Gr.some((t) => {
|
|
1470
1520
|
try {
|
|
1471
1521
|
return e.matches(t);
|
|
1472
1522
|
} catch {
|
|
@@ -1474,22 +1524,22 @@ function un(e) {
|
|
|
1474
1524
|
}
|
|
1475
1525
|
});
|
|
1476
1526
|
}
|
|
1477
|
-
function
|
|
1527
|
+
function Ur(e) {
|
|
1478
1528
|
let {
|
|
1479
1529
|
elements: t,
|
|
1480
1530
|
rect: n,
|
|
1481
1531
|
offsetParent: r,
|
|
1482
1532
|
strategy: o
|
|
1483
1533
|
} = e;
|
|
1484
|
-
const i = o === "fixed", s =
|
|
1534
|
+
const i = o === "fixed", s = ne(r), l = t ? un(t.floating) : !1;
|
|
1485
1535
|
if (r === s || l && i)
|
|
1486
1536
|
return n;
|
|
1487
1537
|
let a = {
|
|
1488
1538
|
scrollLeft: 0,
|
|
1489
1539
|
scrollTop: 0
|
|
1490
|
-
}, c =
|
|
1491
|
-
const m =
|
|
1492
|
-
if ((d || !d && !i) && ((
|
|
1540
|
+
}, c = ie(1);
|
|
1541
|
+
const m = ie(0), d = Z(r);
|
|
1542
|
+
if ((d || !d && !i) && ((oe(r) !== "body" || Fe(s)) && (a = Je(r)), Z(r))) {
|
|
1493
1543
|
const f = be(r);
|
|
1494
1544
|
c = ke(r), m.x = f.x + r.clientLeft, m.y = f.y + r.clientTop;
|
|
1495
1545
|
}
|
|
@@ -1500,25 +1550,25 @@ function Gr(e) {
|
|
|
1500
1550
|
y: n.y * c.y - a.scrollTop * c.y + m.y
|
|
1501
1551
|
};
|
|
1502
1552
|
}
|
|
1503
|
-
function
|
|
1553
|
+
function qr(e) {
|
|
1504
1554
|
return Array.from(e.getClientRects());
|
|
1505
1555
|
}
|
|
1506
1556
|
function dn(e) {
|
|
1507
|
-
return be(
|
|
1557
|
+
return be(ne(e)).left + Je(e).scrollLeft;
|
|
1508
1558
|
}
|
|
1509
|
-
function
|
|
1510
|
-
const t =
|
|
1559
|
+
function Zr(e) {
|
|
1560
|
+
const t = ne(e), n = Je(e), r = e.ownerDocument.body, o = U(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = U(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
1511
1561
|
let s = -n.scrollLeft + dn(e);
|
|
1512
1562
|
const l = -n.scrollTop;
|
|
1513
|
-
return
|
|
1563
|
+
return J(r).direction === "rtl" && (s += U(t.clientWidth, r.clientWidth) - o), {
|
|
1514
1564
|
width: o,
|
|
1515
1565
|
height: i,
|
|
1516
1566
|
x: s,
|
|
1517
1567
|
y: l
|
|
1518
1568
|
};
|
|
1519
1569
|
}
|
|
1520
|
-
function
|
|
1521
|
-
const n =
|
|
1570
|
+
function Jr(e, t) {
|
|
1571
|
+
const n = q(e), r = ne(e), o = n.visualViewport;
|
|
1522
1572
|
let i = r.clientWidth, s = r.clientHeight, l = 0, a = 0;
|
|
1523
1573
|
if (o) {
|
|
1524
1574
|
i = o.width, s = o.height;
|
|
@@ -1532,8 +1582,8 @@ function Zr(e, t) {
|
|
|
1532
1582
|
y: a
|
|
1533
1583
|
};
|
|
1534
1584
|
}
|
|
1535
|
-
function
|
|
1536
|
-
const n = be(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i =
|
|
1585
|
+
function Qr(e, t) {
|
|
1586
|
+
const n = be(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = Z(e) ? ke(e) : ie(1), s = e.clientWidth * i.x, l = e.clientHeight * i.y, a = o * i.x, c = r * i.y;
|
|
1537
1587
|
return {
|
|
1538
1588
|
width: s,
|
|
1539
1589
|
height: l,
|
|
@@ -1541,14 +1591,14 @@ function Jr(e, t) {
|
|
|
1541
1591
|
y: c
|
|
1542
1592
|
};
|
|
1543
1593
|
}
|
|
1544
|
-
function
|
|
1594
|
+
function Ot(e, t, n) {
|
|
1545
1595
|
let r;
|
|
1546
1596
|
if (t === "viewport")
|
|
1547
|
-
r =
|
|
1597
|
+
r = Jr(e, n);
|
|
1548
1598
|
else if (t === "document")
|
|
1549
|
-
r =
|
|
1550
|
-
else if (
|
|
1551
|
-
r =
|
|
1599
|
+
r = Zr(ne(e));
|
|
1600
|
+
else if (N(t))
|
|
1601
|
+
r = Qr(t, n);
|
|
1552
1602
|
else {
|
|
1553
1603
|
const o = cn(e);
|
|
1554
1604
|
r = {
|
|
@@ -1557,36 +1607,36 @@ function Bt(e, t, n) {
|
|
|
1557
1607
|
y: t.y - o.y
|
|
1558
1608
|
};
|
|
1559
1609
|
}
|
|
1560
|
-
return
|
|
1610
|
+
return Xe(r);
|
|
1561
1611
|
}
|
|
1562
1612
|
function fn(e, t) {
|
|
1563
|
-
const n =
|
|
1564
|
-
return n === t || !
|
|
1613
|
+
const n = he(e);
|
|
1614
|
+
return n === t || !N(n) || Te(n) ? !1 : J(n).position === "fixed" || fn(n, t);
|
|
1565
1615
|
}
|
|
1566
|
-
function
|
|
1616
|
+
function eo(e, t) {
|
|
1567
1617
|
const n = t.get(e);
|
|
1568
1618
|
if (n)
|
|
1569
1619
|
return n;
|
|
1570
|
-
let r =
|
|
1571
|
-
const i =
|
|
1572
|
-
let s = i ?
|
|
1573
|
-
for (;
|
|
1574
|
-
const l =
|
|
1575
|
-
!a && l.position === "fixed" && (o = null), (i ? !a && !o : !a && l.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || Fe(s) && !a && fn(e, s)) ? r = r.filter((m) => m !== s) : o = l, s =
|
|
1620
|
+
let r = re(e, [], !1).filter((l) => N(l) && oe(l) !== "body"), o = null;
|
|
1621
|
+
const i = J(e).position === "fixed";
|
|
1622
|
+
let s = i ? he(e) : e;
|
|
1623
|
+
for (; N(s) && !Te(s); ) {
|
|
1624
|
+
const l = J(s), a = pt(s);
|
|
1625
|
+
!a && l.position === "fixed" && (o = null), (i ? !a && !o : !a && l.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || Fe(s) && !a && fn(e, s)) ? r = r.filter((m) => m !== s) : o = l, s = he(s);
|
|
1576
1626
|
}
|
|
1577
1627
|
return t.set(e, r), r;
|
|
1578
1628
|
}
|
|
1579
|
-
function
|
|
1629
|
+
function to(e) {
|
|
1580
1630
|
let {
|
|
1581
1631
|
element: t,
|
|
1582
1632
|
boundary: n,
|
|
1583
1633
|
rootBoundary: r,
|
|
1584
1634
|
strategy: o
|
|
1585
1635
|
} = e;
|
|
1586
|
-
const s = [...n === "clippingAncestors" ?
|
|
1587
|
-
const d =
|
|
1588
|
-
return c.top =
|
|
1589
|
-
},
|
|
1636
|
+
const s = [...n === "clippingAncestors" ? eo(t, this._c) : [].concat(n), r], l = s[0], a = s.reduce((c, m) => {
|
|
1637
|
+
const d = Ot(t, m, o);
|
|
1638
|
+
return c.top = U(d.top, c.top), c.right = Ie(d.right, c.right), c.bottom = Ie(d.bottom, c.bottom), c.left = U(d.left, c.left), c;
|
|
1639
|
+
}, Ot(t, l, o));
|
|
1590
1640
|
return {
|
|
1591
1641
|
width: a.right - a.left,
|
|
1592
1642
|
height: a.bottom - a.top,
|
|
@@ -1594,7 +1644,7 @@ function eo(e) {
|
|
|
1594
1644
|
y: a.top
|
|
1595
1645
|
};
|
|
1596
1646
|
}
|
|
1597
|
-
function
|
|
1647
|
+
function no(e) {
|
|
1598
1648
|
const {
|
|
1599
1649
|
width: t,
|
|
1600
1650
|
height: n
|
|
@@ -1604,15 +1654,15 @@ function to(e) {
|
|
|
1604
1654
|
height: n
|
|
1605
1655
|
};
|
|
1606
1656
|
}
|
|
1607
|
-
function
|
|
1608
|
-
const r =
|
|
1657
|
+
function ro(e, t, n) {
|
|
1658
|
+
const r = Z(t), o = ne(t), i = n === "fixed", s = be(e, !0, i, t);
|
|
1609
1659
|
let l = {
|
|
1610
1660
|
scrollLeft: 0,
|
|
1611
1661
|
scrollTop: 0
|
|
1612
1662
|
};
|
|
1613
|
-
const a =
|
|
1663
|
+
const a = ie(0);
|
|
1614
1664
|
if (r || !r && !i)
|
|
1615
|
-
if ((
|
|
1665
|
+
if ((oe(t) !== "body" || Fe(o)) && (l = Je(t)), r) {
|
|
1616
1666
|
const d = be(t, !0, i, t);
|
|
1617
1667
|
a.x = d.x + t.clientLeft, a.y = d.y + t.clientTop;
|
|
1618
1668
|
} else
|
|
@@ -1625,22 +1675,22 @@ function no(e, t, n) {
|
|
|
1625
1675
|
height: s.height
|
|
1626
1676
|
};
|
|
1627
1677
|
}
|
|
1628
|
-
function
|
|
1629
|
-
return !
|
|
1678
|
+
function Dt(e, t) {
|
|
1679
|
+
return !Z(e) || J(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
|
|
1630
1680
|
}
|
|
1631
1681
|
function mn(e, t) {
|
|
1632
|
-
const n =
|
|
1633
|
-
if (!
|
|
1682
|
+
const n = q(e);
|
|
1683
|
+
if (!Z(e) || un(e))
|
|
1634
1684
|
return n;
|
|
1635
|
-
let r =
|
|
1636
|
-
for (; r && Rr(r) &&
|
|
1637
|
-
r =
|
|
1638
|
-
return r && (
|
|
1685
|
+
let r = Dt(e, t);
|
|
1686
|
+
for (; r && Rr(r) && J(r).position === "static"; )
|
|
1687
|
+
r = Dt(r, t);
|
|
1688
|
+
return r && (oe(r) === "html" || oe(r) === "body" && J(r).position === "static" && !pt(r)) ? n : r || Er(e) || n;
|
|
1639
1689
|
}
|
|
1640
|
-
const
|
|
1690
|
+
const oo = async function(e) {
|
|
1641
1691
|
const t = this.getOffsetParent || mn, n = this.getDimensions;
|
|
1642
1692
|
return {
|
|
1643
|
-
reference:
|
|
1693
|
+
reference: ro(e.reference, await t(e.floating), e.strategy),
|
|
1644
1694
|
floating: {
|
|
1645
1695
|
x: 0,
|
|
1646
1696
|
y: 0,
|
|
@@ -1648,24 +1698,24 @@ const ro = async function(e) {
|
|
|
1648
1698
|
}
|
|
1649
1699
|
};
|
|
1650
1700
|
};
|
|
1651
|
-
function
|
|
1652
|
-
return
|
|
1701
|
+
function io(e) {
|
|
1702
|
+
return J(e).direction === "rtl";
|
|
1653
1703
|
}
|
|
1654
|
-
const
|
|
1655
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1656
|
-
getDocumentElement:
|
|
1657
|
-
getClippingRect:
|
|
1704
|
+
const so = {
|
|
1705
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Ur,
|
|
1706
|
+
getDocumentElement: ne,
|
|
1707
|
+
getClippingRect: to,
|
|
1658
1708
|
getOffsetParent: mn,
|
|
1659
|
-
getElementRects:
|
|
1660
|
-
getClientRects:
|
|
1661
|
-
getDimensions:
|
|
1709
|
+
getElementRects: oo,
|
|
1710
|
+
getClientRects: qr,
|
|
1711
|
+
getDimensions: no,
|
|
1662
1712
|
getScale: ke,
|
|
1663
|
-
isElement:
|
|
1664
|
-
isRTL:
|
|
1713
|
+
isElement: N,
|
|
1714
|
+
isRTL: io
|
|
1665
1715
|
};
|
|
1666
|
-
function
|
|
1716
|
+
function lo(e, t) {
|
|
1667
1717
|
let n = null, r;
|
|
1668
|
-
const o =
|
|
1718
|
+
const o = ne(e);
|
|
1669
1719
|
function i() {
|
|
1670
1720
|
var l;
|
|
1671
1721
|
clearTimeout(r), (l = n) == null || l.disconnect(), n = null;
|
|
@@ -1680,17 +1730,17 @@ function so(e, t) {
|
|
|
1680
1730
|
} = e.getBoundingClientRect();
|
|
1681
1731
|
if (l || t(), !d || !f)
|
|
1682
1732
|
return;
|
|
1683
|
-
const u =
|
|
1684
|
-
rootMargin: -u + "px " + -g + "px " + -p + "px " +
|
|
1685
|
-
threshold:
|
|
1733
|
+
const u = je(m), g = je(o.clientWidth - (c + d)), p = je(o.clientHeight - (m + f)), w = je(c), x = {
|
|
1734
|
+
rootMargin: -u + "px " + -g + "px " + -p + "px " + -w + "px",
|
|
1735
|
+
threshold: U(0, Ie(1, a)) || 1
|
|
1686
1736
|
};
|
|
1687
1737
|
let P = !0;
|
|
1688
|
-
function S(
|
|
1689
|
-
const
|
|
1690
|
-
if (
|
|
1738
|
+
function S(k) {
|
|
1739
|
+
const C = k[0].intersectionRatio;
|
|
1740
|
+
if (C !== a) {
|
|
1691
1741
|
if (!P)
|
|
1692
1742
|
return s();
|
|
1693
|
-
|
|
1743
|
+
C ? s(!1, C) : r = setTimeout(() => {
|
|
1694
1744
|
s(!1, 1e-7);
|
|
1695
1745
|
}, 100);
|
|
1696
1746
|
}
|
|
@@ -1709,7 +1759,7 @@ function so(e, t) {
|
|
|
1709
1759
|
}
|
|
1710
1760
|
return s(!0), i;
|
|
1711
1761
|
}
|
|
1712
|
-
function
|
|
1762
|
+
function ao(e, t, n, r) {
|
|
1713
1763
|
r === void 0 && (r = {});
|
|
1714
1764
|
const {
|
|
1715
1765
|
ancestorScroll: o = !0,
|
|
@@ -1717,13 +1767,13 @@ function lo(e, t, n, r) {
|
|
|
1717
1767
|
elementResize: s = typeof ResizeObserver == "function",
|
|
1718
1768
|
layoutShift: l = typeof IntersectionObserver == "function",
|
|
1719
1769
|
animationFrame: a = !1
|
|
1720
|
-
} = r, c =
|
|
1770
|
+
} = r, c = yt(e), m = o || i ? [...c ? re(c) : [], ...re(t)] : [];
|
|
1721
1771
|
m.forEach((h) => {
|
|
1722
1772
|
o && h.addEventListener("scroll", n, {
|
|
1723
1773
|
passive: !0
|
|
1724
1774
|
}), i && h.addEventListener("resize", n);
|
|
1725
1775
|
});
|
|
1726
|
-
const d = c && l ?
|
|
1776
|
+
const d = c && l ? lo(c, n) : null;
|
|
1727
1777
|
let f = -1, u = null;
|
|
1728
1778
|
s && (u = new ResizeObserver((h) => {
|
|
1729
1779
|
let [x] = h;
|
|
@@ -1733,10 +1783,10 @@ function lo(e, t, n, r) {
|
|
|
1733
1783
|
})), n();
|
|
1734
1784
|
}), c && !a && u.observe(c), u.observe(t));
|
|
1735
1785
|
let g, p = a ? be(e) : null;
|
|
1736
|
-
a &&
|
|
1737
|
-
function
|
|
1786
|
+
a && w();
|
|
1787
|
+
function w() {
|
|
1738
1788
|
const h = be(e);
|
|
1739
|
-
p && (h.x !== p.x || h.y !== p.y || h.width !== p.width || h.height !== p.height) && n(), p = h, g = requestAnimationFrame(
|
|
1789
|
+
p && (h.x !== p.x || h.y !== p.y || h.width !== p.width || h.height !== p.height) && n(), p = h, g = requestAnimationFrame(w);
|
|
1740
1790
|
}
|
|
1741
1791
|
return n(), () => {
|
|
1742
1792
|
var h;
|
|
@@ -1745,9 +1795,9 @@ function lo(e, t, n, r) {
|
|
|
1745
1795
|
}), d == null || d(), (h = u) == null || h.disconnect(), u = null, a && cancelAnimationFrame(g);
|
|
1746
1796
|
};
|
|
1747
1797
|
}
|
|
1748
|
-
const
|
|
1798
|
+
const co = _r, uo = jr, yi = Yr, fo = (e, t, n) => {
|
|
1749
1799
|
const r = /* @__PURE__ */ new Map(), o = {
|
|
1750
|
-
platform:
|
|
1800
|
+
platform: so,
|
|
1751
1801
|
...n
|
|
1752
1802
|
}, i = {
|
|
1753
1803
|
...o.platform,
|
|
@@ -1758,8 +1808,8 @@ const ao = _r, co = jr, uo = (e, t, n) => {
|
|
|
1758
1808
|
platform: i
|
|
1759
1809
|
});
|
|
1760
1810
|
};
|
|
1761
|
-
var
|
|
1762
|
-
function
|
|
1811
|
+
var He = typeof document < "u" ? Zt : Jt;
|
|
1812
|
+
function Ge(e, t) {
|
|
1763
1813
|
if (e === t)
|
|
1764
1814
|
return !0;
|
|
1765
1815
|
if (typeof e != typeof t)
|
|
@@ -1772,7 +1822,7 @@ function Ye(e, t) {
|
|
|
1772
1822
|
if (n = e.length, n !== t.length)
|
|
1773
1823
|
return !1;
|
|
1774
1824
|
for (r = n; r-- !== 0; )
|
|
1775
|
-
if (!
|
|
1825
|
+
if (!Ge(e[r], t[r]))
|
|
1776
1826
|
return !1;
|
|
1777
1827
|
return !0;
|
|
1778
1828
|
}
|
|
@@ -1783,7 +1833,7 @@ function Ye(e, t) {
|
|
|
1783
1833
|
return !1;
|
|
1784
1834
|
for (r = n; r-- !== 0; ) {
|
|
1785
1835
|
const i = o[r];
|
|
1786
|
-
if (!(i === "_owner" && e.$$typeof) && !
|
|
1836
|
+
if (!(i === "_owner" && e.$$typeof) && !Ge(e[i], t[i]))
|
|
1787
1837
|
return !1;
|
|
1788
1838
|
}
|
|
1789
1839
|
return !0;
|
|
@@ -1793,17 +1843,17 @@ function Ye(e, t) {
|
|
|
1793
1843
|
function gn(e) {
|
|
1794
1844
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1795
1845
|
}
|
|
1796
|
-
function
|
|
1846
|
+
function Mt(e, t) {
|
|
1797
1847
|
const n = gn(e);
|
|
1798
1848
|
return Math.round(t * n) / n;
|
|
1799
1849
|
}
|
|
1800
|
-
function
|
|
1850
|
+
function Lt(e) {
|
|
1801
1851
|
const t = y.useRef(e);
|
|
1802
|
-
return
|
|
1852
|
+
return He(() => {
|
|
1803
1853
|
t.current = e;
|
|
1804
1854
|
}), t;
|
|
1805
1855
|
}
|
|
1806
|
-
function
|
|
1856
|
+
function mo(e) {
|
|
1807
1857
|
e === void 0 && (e = {});
|
|
1808
1858
|
const {
|
|
1809
1859
|
placement: t = "bottom",
|
|
@@ -1825,54 +1875,54 @@ function fo(e) {
|
|
|
1825
1875
|
middlewareData: {},
|
|
1826
1876
|
isPositioned: !1
|
|
1827
1877
|
}), [f, u] = y.useState(r);
|
|
1828
|
-
|
|
1829
|
-
const [g, p] = y.useState(null), [
|
|
1830
|
-
R !==
|
|
1878
|
+
Ge(f, r) || u(r);
|
|
1879
|
+
const [g, p] = y.useState(null), [w, h] = y.useState(null), x = y.useCallback((R) => {
|
|
1880
|
+
R !== C.current && (C.current = R, p(R));
|
|
1831
1881
|
}, []), P = y.useCallback((R) => {
|
|
1832
1882
|
R !== A.current && (A.current = R, h(R));
|
|
1833
|
-
}, []), S = i || g,
|
|
1834
|
-
if (!
|
|
1883
|
+
}, []), S = i || g, k = s || w, C = y.useRef(null), A = y.useRef(null), T = y.useRef(m), B = a != null, D = Lt(a), L = Lt(o), M = y.useCallback(() => {
|
|
1884
|
+
if (!C.current || !A.current)
|
|
1835
1885
|
return;
|
|
1836
1886
|
const R = {
|
|
1837
1887
|
placement: t,
|
|
1838
1888
|
strategy: n,
|
|
1839
1889
|
middleware: f
|
|
1840
1890
|
};
|
|
1841
|
-
|
|
1842
|
-
const
|
|
1843
|
-
|
|
1891
|
+
L.current && (R.platform = L.current), fo(C.current, A.current, R).then(($) => {
|
|
1892
|
+
const F = {
|
|
1893
|
+
...$,
|
|
1844
1894
|
isPositioned: !0
|
|
1845
1895
|
};
|
|
1846
|
-
|
|
1847
|
-
d(
|
|
1896
|
+
O.current && !Ge(T.current, F) && (T.current = F, An.flushSync(() => {
|
|
1897
|
+
d(F);
|
|
1848
1898
|
}));
|
|
1849
1899
|
});
|
|
1850
|
-
}, [f, t, n,
|
|
1851
|
-
|
|
1852
|
-
c === !1 &&
|
|
1900
|
+
}, [f, t, n, L]);
|
|
1901
|
+
He(() => {
|
|
1902
|
+
c === !1 && T.current.isPositioned && (T.current.isPositioned = !1, d((R) => ({
|
|
1853
1903
|
...R,
|
|
1854
1904
|
isPositioned: !1
|
|
1855
1905
|
})));
|
|
1856
1906
|
}, [c]);
|
|
1857
|
-
const
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
}), []),
|
|
1861
|
-
if (S && (
|
|
1907
|
+
const O = y.useRef(!1);
|
|
1908
|
+
He(() => (O.current = !0, () => {
|
|
1909
|
+
O.current = !1;
|
|
1910
|
+
}), []), He(() => {
|
|
1911
|
+
if (S && (C.current = S), k && (A.current = k), S && k) {
|
|
1862
1912
|
if (D.current)
|
|
1863
|
-
return D.current(S,
|
|
1913
|
+
return D.current(S, k, M);
|
|
1864
1914
|
M();
|
|
1865
1915
|
}
|
|
1866
|
-
}, [S,
|
|
1916
|
+
}, [S, k, M, D, B]);
|
|
1867
1917
|
const b = y.useMemo(() => ({
|
|
1868
|
-
reference:
|
|
1918
|
+
reference: C,
|
|
1869
1919
|
floating: A,
|
|
1870
1920
|
setReference: x,
|
|
1871
1921
|
setFloating: P
|
|
1872
1922
|
}), [x, P]), v = y.useMemo(() => ({
|
|
1873
1923
|
reference: S,
|
|
1874
|
-
floating:
|
|
1875
|
-
}), [S,
|
|
1924
|
+
floating: k
|
|
1925
|
+
}), [S, k]), I = y.useMemo(() => {
|
|
1876
1926
|
const R = {
|
|
1877
1927
|
position: n,
|
|
1878
1928
|
left: 0,
|
|
@@ -1880,17 +1930,17 @@ function fo(e) {
|
|
|
1880
1930
|
};
|
|
1881
1931
|
if (!v.floating)
|
|
1882
1932
|
return R;
|
|
1883
|
-
const
|
|
1933
|
+
const $ = Mt(v.floating, m.x), F = Mt(v.floating, m.y);
|
|
1884
1934
|
return l ? {
|
|
1885
1935
|
...R,
|
|
1886
|
-
transform: "translate(" +
|
|
1936
|
+
transform: "translate(" + $ + "px, " + F + "px)",
|
|
1887
1937
|
...gn(v.floating) >= 1.5 && {
|
|
1888
1938
|
willChange: "transform"
|
|
1889
1939
|
}
|
|
1890
1940
|
} : {
|
|
1891
1941
|
position: n,
|
|
1892
|
-
left:
|
|
1893
|
-
top:
|
|
1942
|
+
left: $,
|
|
1943
|
+
top: F
|
|
1894
1944
|
};
|
|
1895
1945
|
}, [n, l, v.floating, m.x, m.y]);
|
|
1896
1946
|
return y.useMemo(() => ({
|
|
@@ -1898,36 +1948,36 @@ function fo(e) {
|
|
|
1898
1948
|
update: M,
|
|
1899
1949
|
refs: b,
|
|
1900
1950
|
elements: v,
|
|
1901
|
-
floatingStyles:
|
|
1902
|
-
}), [m, M, b, v,
|
|
1951
|
+
floatingStyles: I
|
|
1952
|
+
}), [m, M, b, v, I]);
|
|
1903
1953
|
}
|
|
1904
1954
|
/*!
|
|
1905
1955
|
* tabbable 6.2.0
|
|
1906
1956
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
1907
1957
|
*/
|
|
1908
|
-
var
|
|
1909
|
-
} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector,
|
|
1958
|
+
var go = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], ut = /* @__PURE__ */ go.join(","), pn = typeof Element > "u", Me = pn ? function() {
|
|
1959
|
+
} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, Ue = !pn && Element.prototype.getRootNode ? function(e) {
|
|
1910
1960
|
var t;
|
|
1911
1961
|
return e == null || (t = e.getRootNode) === null || t === void 0 ? void 0 : t.call(e);
|
|
1912
1962
|
} : function(e) {
|
|
1913
1963
|
return e == null ? void 0 : e.ownerDocument;
|
|
1914
|
-
},
|
|
1964
|
+
}, qe = function e(t, n) {
|
|
1915
1965
|
var r;
|
|
1916
1966
|
n === void 0 && (n = !0);
|
|
1917
1967
|
var o = t == null || (r = t.getAttribute) === null || r === void 0 ? void 0 : r.call(t, "inert"), i = o === "" || o === "true", s = i || n && t && e(t.parentNode);
|
|
1918
1968
|
return s;
|
|
1919
|
-
},
|
|
1969
|
+
}, po = function(t) {
|
|
1920
1970
|
var n, r = t == null || (n = t.getAttribute) === null || n === void 0 ? void 0 : n.call(t, "contenteditable");
|
|
1921
1971
|
return r === "" || r === "true";
|
|
1922
|
-
},
|
|
1923
|
-
if (
|
|
1972
|
+
}, ho = function(t, n, r) {
|
|
1973
|
+
if (qe(t))
|
|
1924
1974
|
return [];
|
|
1925
1975
|
var o = Array.prototype.slice.apply(t.querySelectorAll(ut));
|
|
1926
|
-
return n &&
|
|
1927
|
-
},
|
|
1976
|
+
return n && Me.call(t, ut) && o.unshift(t), o = o.filter(r), o;
|
|
1977
|
+
}, bo = function e(t, n, r) {
|
|
1928
1978
|
for (var o = [], i = Array.from(t); i.length; ) {
|
|
1929
1979
|
var s = i.shift();
|
|
1930
|
-
if (!
|
|
1980
|
+
if (!qe(s, !1))
|
|
1931
1981
|
if (s.tagName === "SLOT") {
|
|
1932
1982
|
var l = s.assignedElements(), a = l.length ? l : s.children, c = e(a, !0, r);
|
|
1933
1983
|
r.flatten ? o.push.apply(o, c) : o.push({
|
|
@@ -1935,10 +1985,10 @@ var mo = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1935
1985
|
candidates: c
|
|
1936
1986
|
});
|
|
1937
1987
|
} else {
|
|
1938
|
-
var m =
|
|
1988
|
+
var m = Me.call(s, ut);
|
|
1939
1989
|
m && r.filter(s) && (n || !t.includes(s)) && o.push(s);
|
|
1940
1990
|
var d = s.shadowRoot || // check for an undisclosed shadow
|
|
1941
|
-
typeof r.getShadowRoot == "function" && r.getShadowRoot(s), f = !
|
|
1991
|
+
typeof r.getShadowRoot == "function" && r.getShadowRoot(s), f = !qe(d, !1) && (!r.shadowRootFilter || r.shadowRootFilter(s));
|
|
1942
1992
|
if (d && f) {
|
|
1943
1993
|
var u = e(d === !0 ? s.children : d.children, !0, r);
|
|
1944
1994
|
r.flatten ? o.push.apply(o, u) : o.push({
|
|
@@ -1955,29 +2005,29 @@ var mo = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1955
2005
|
}, bn = function(t) {
|
|
1956
2006
|
if (!t)
|
|
1957
2007
|
throw new Error("No node provided");
|
|
1958
|
-
return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) ||
|
|
1959
|
-
},
|
|
2008
|
+
return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || po(t)) && !hn(t) ? 0 : t.tabIndex;
|
|
2009
|
+
}, yo = function(t, n) {
|
|
1960
2010
|
var r = bn(t);
|
|
1961
2011
|
return r < 0 && n && !hn(t) ? 0 : r;
|
|
1962
|
-
},
|
|
2012
|
+
}, vo = function(t, n) {
|
|
1963
2013
|
return t.tabIndex === n.tabIndex ? t.documentOrder - n.documentOrder : t.tabIndex - n.tabIndex;
|
|
1964
2014
|
}, yn = function(t) {
|
|
1965
2015
|
return t.tagName === "INPUT";
|
|
1966
|
-
}, vo = function(t) {
|
|
1967
|
-
return yn(t) && t.type === "hidden";
|
|
1968
2016
|
}, xo = function(t) {
|
|
2017
|
+
return yn(t) && t.type === "hidden";
|
|
2018
|
+
}, wo = function(t) {
|
|
1969
2019
|
var n = t.tagName === "DETAILS" && Array.prototype.slice.apply(t.children).some(function(r) {
|
|
1970
2020
|
return r.tagName === "SUMMARY";
|
|
1971
2021
|
});
|
|
1972
2022
|
return n;
|
|
1973
|
-
},
|
|
2023
|
+
}, $o = function(t, n) {
|
|
1974
2024
|
for (var r = 0; r < t.length; r++)
|
|
1975
2025
|
if (t[r].checked && t[r].form === n)
|
|
1976
2026
|
return t[r];
|
|
1977
|
-
},
|
|
2027
|
+
}, So = function(t) {
|
|
1978
2028
|
if (!t.name)
|
|
1979
2029
|
return !0;
|
|
1980
|
-
var n = t.form ||
|
|
2030
|
+
var n = t.form || Ue(t), r = function(l) {
|
|
1981
2031
|
return n.querySelectorAll('input[type="radio"][name="' + l + '"]');
|
|
1982
2032
|
}, o;
|
|
1983
2033
|
if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
|
|
@@ -1988,78 +2038,78 @@ var mo = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
1988
2038
|
} catch (s) {
|
|
1989
2039
|
return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", s.message), !1;
|
|
1990
2040
|
}
|
|
1991
|
-
var i =
|
|
2041
|
+
var i = $o(o, t.form);
|
|
1992
2042
|
return !i || i === t;
|
|
1993
|
-
}, So = function(t) {
|
|
1994
|
-
return yn(t) && t.type === "radio";
|
|
1995
2043
|
}, Ro = function(t) {
|
|
1996
|
-
return
|
|
2044
|
+
return yn(t) && t.type === "radio";
|
|
1997
2045
|
}, Eo = function(t) {
|
|
1998
|
-
|
|
2046
|
+
return Ro(t) && !So(t);
|
|
2047
|
+
}, Co = function(t) {
|
|
2048
|
+
var n, r = t && Ue(t), o = (n = r) === null || n === void 0 ? void 0 : n.host, i = !1;
|
|
1999
2049
|
if (r && r !== t) {
|
|
2000
2050
|
var s, l, a;
|
|
2001
2051
|
for (i = !!((s = o) !== null && s !== void 0 && (l = s.ownerDocument) !== null && l !== void 0 && l.contains(o) || t != null && (a = t.ownerDocument) !== null && a !== void 0 && a.contains(t)); !i && o; ) {
|
|
2002
2052
|
var c, m, d;
|
|
2003
|
-
r =
|
|
2053
|
+
r = Ue(o), o = (c = r) === null || c === void 0 ? void 0 : c.host, i = !!((m = o) !== null && m !== void 0 && (d = m.ownerDocument) !== null && d !== void 0 && d.contains(o));
|
|
2004
2054
|
}
|
|
2005
2055
|
}
|
|
2006
2056
|
return i;
|
|
2007
2057
|
}, Ft = function(t) {
|
|
2008
2058
|
var n = t.getBoundingClientRect(), r = n.width, o = n.height;
|
|
2009
2059
|
return r === 0 && o === 0;
|
|
2010
|
-
},
|
|
2060
|
+
}, ko = function(t, n) {
|
|
2011
2061
|
var r = n.displayCheck, o = n.getShadowRoot;
|
|
2012
2062
|
if (getComputedStyle(t).visibility === "hidden")
|
|
2013
2063
|
return !0;
|
|
2014
|
-
var i =
|
|
2015
|
-
if (
|
|
2064
|
+
var i = Me.call(t, "details>summary:first-of-type"), s = i ? t.parentElement : t;
|
|
2065
|
+
if (Me.call(s, "details:not([open]) *"))
|
|
2016
2066
|
return !0;
|
|
2017
2067
|
if (!r || r === "full" || r === "legacy-full") {
|
|
2018
2068
|
if (typeof o == "function") {
|
|
2019
2069
|
for (var l = t; t; ) {
|
|
2020
|
-
var a = t.parentElement, c =
|
|
2070
|
+
var a = t.parentElement, c = Ue(t);
|
|
2021
2071
|
if (a && !a.shadowRoot && o(a) === !0)
|
|
2022
2072
|
return Ft(t);
|
|
2023
2073
|
t.assignedSlot ? t = t.assignedSlot : !a && c !== t.ownerDocument ? t = c.host : t = a;
|
|
2024
2074
|
}
|
|
2025
2075
|
t = l;
|
|
2026
2076
|
}
|
|
2027
|
-
if (
|
|
2077
|
+
if (Co(t))
|
|
2028
2078
|
return !t.getClientRects().length;
|
|
2029
2079
|
if (r !== "legacy-full")
|
|
2030
2080
|
return !0;
|
|
2031
2081
|
} else if (r === "non-zero-area")
|
|
2032
2082
|
return Ft(t);
|
|
2033
2083
|
return !1;
|
|
2034
|
-
},
|
|
2084
|
+
}, To = function(t) {
|
|
2035
2085
|
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))
|
|
2036
2086
|
for (var n = t.parentElement; n; ) {
|
|
2037
2087
|
if (n.tagName === "FIELDSET" && n.disabled) {
|
|
2038
2088
|
for (var r = 0; r < n.children.length; r++) {
|
|
2039
2089
|
var o = n.children.item(r);
|
|
2040
2090
|
if (o.tagName === "LEGEND")
|
|
2041
|
-
return
|
|
2091
|
+
return Me.call(n, "fieldset[disabled] *") ? !0 : !o.contains(t);
|
|
2042
2092
|
}
|
|
2043
2093
|
return !0;
|
|
2044
2094
|
}
|
|
2045
2095
|
n = n.parentElement;
|
|
2046
2096
|
}
|
|
2047
2097
|
return !1;
|
|
2048
|
-
},
|
|
2098
|
+
}, Io = function(t, n) {
|
|
2049
2099
|
return !(n.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
|
|
2050
2100
|
// because we're limited in the type of selectors we can use in JSDom (see related
|
|
2051
2101
|
// note related to `candidateSelectors`)
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
},
|
|
2055
|
-
return !(
|
|
2056
|
-
},
|
|
2102
|
+
qe(n) || xo(n) || ko(n, t) || // For a details element with a summary, the summary element gets the focus
|
|
2103
|
+
wo(n) || To(n));
|
|
2104
|
+
}, Wt = function(t, n) {
|
|
2105
|
+
return !(Eo(n) || bn(n) < 0 || !Io(t, n));
|
|
2106
|
+
}, Po = function(t) {
|
|
2057
2107
|
var n = parseInt(t.getAttribute("tabindex"), 10);
|
|
2058
2108
|
return !!(isNaN(n) || n >= 0);
|
|
2059
|
-
},
|
|
2109
|
+
}, Ao = function e(t) {
|
|
2060
2110
|
var n = [], r = [];
|
|
2061
2111
|
return t.forEach(function(o, i) {
|
|
2062
|
-
var s = !!o.scopeParent, l = s ? o.scopeParent : o, a =
|
|
2112
|
+
var s = !!o.scopeParent, l = s ? o.scopeParent : o, a = yo(l, s), c = s ? e(o.candidates) : l;
|
|
2063
2113
|
a === 0 ? s ? n.push.apply(n, c) : n.push(l) : r.push({
|
|
2064
2114
|
documentOrder: i,
|
|
2065
2115
|
tabIndex: a,
|
|
@@ -2067,26 +2117,26 @@ var mo = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
2067
2117
|
isScope: s,
|
|
2068
2118
|
content: c
|
|
2069
2119
|
});
|
|
2070
|
-
}), r.sort(
|
|
2120
|
+
}), r.sort(vo).reduce(function(o, i) {
|
|
2071
2121
|
return i.isScope ? o.push.apply(o, i.content) : o.push(i.content), o;
|
|
2072
2122
|
}, []).concat(n);
|
|
2073
2123
|
}, vn = function(t, n) {
|
|
2074
2124
|
n = n || {};
|
|
2075
2125
|
var r;
|
|
2076
|
-
return n.getShadowRoot ? r =
|
|
2077
|
-
filter:
|
|
2126
|
+
return n.getShadowRoot ? r = bo([t], n.includeContainer, {
|
|
2127
|
+
filter: Wt.bind(null, n),
|
|
2078
2128
|
flatten: !1,
|
|
2079
2129
|
getShadowRoot: n.getShadowRoot,
|
|
2080
|
-
shadowRootFilter:
|
|
2081
|
-
}) : r =
|
|
2130
|
+
shadowRootFilter: Po
|
|
2131
|
+
}) : r = ho(t, n.includeContainer, Wt.bind(null, n)), Ao(r);
|
|
2082
2132
|
};
|
|
2083
|
-
const
|
|
2133
|
+
const Bo = y[/* @__PURE__ */ "useInsertionEffect".toString()], Oo = Bo || ((e) => e());
|
|
2084
2134
|
function Re(e) {
|
|
2085
2135
|
const t = y.useRef(() => {
|
|
2086
2136
|
if (process.env.NODE_ENV !== "production")
|
|
2087
2137
|
throw new Error("Cannot call an event handler while rendering.");
|
|
2088
2138
|
});
|
|
2089
|
-
return
|
|
2139
|
+
return Oo(() => {
|
|
2090
2140
|
t.current = e;
|
|
2091
2141
|
}), y.useCallback(function() {
|
|
2092
2142
|
for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
|
|
@@ -2094,7 +2144,7 @@ function Re(e) {
|
|
|
2094
2144
|
return t.current == null ? void 0 : t.current(...r);
|
|
2095
2145
|
}, []);
|
|
2096
2146
|
}
|
|
2097
|
-
var
|
|
2147
|
+
var Q = typeof document < "u" ? Zt : Jt;
|
|
2098
2148
|
function dt() {
|
|
2099
2149
|
return dt = Object.assign ? Object.assign.bind() : function(e) {
|
|
2100
2150
|
for (var t = 1; t < arguments.length; t++) {
|
|
@@ -2105,17 +2155,17 @@ function dt() {
|
|
|
2105
2155
|
return e;
|
|
2106
2156
|
}, dt.apply(this, arguments);
|
|
2107
2157
|
}
|
|
2108
|
-
let rt = !1,
|
|
2109
|
-
const Nt = () => "floating-ui-" +
|
|
2110
|
-
function
|
|
2158
|
+
let rt = !1, Do = 0;
|
|
2159
|
+
const Nt = () => "floating-ui-" + Do++;
|
|
2160
|
+
function Mo() {
|
|
2111
2161
|
const [e, t] = y.useState(() => rt ? Nt() : void 0);
|
|
2112
|
-
return
|
|
2162
|
+
return Q(() => {
|
|
2113
2163
|
e == null && t(Nt());
|
|
2114
2164
|
}, []), y.useEffect(() => {
|
|
2115
2165
|
rt || (rt = !0);
|
|
2116
2166
|
}, []), e;
|
|
2117
2167
|
}
|
|
2118
|
-
const
|
|
2168
|
+
const Lo = y[/* @__PURE__ */ "useId".toString()], vt = Lo || Mo;
|
|
2119
2169
|
function Fo() {
|
|
2120
2170
|
const e = /* @__PURE__ */ new Map();
|
|
2121
2171
|
return {
|
|
@@ -2132,24 +2182,24 @@ function Fo() {
|
|
|
2132
2182
|
}
|
|
2133
2183
|
};
|
|
2134
2184
|
}
|
|
2135
|
-
const
|
|
2185
|
+
const Wo = /* @__PURE__ */ y.createContext(null), No = /* @__PURE__ */ y.createContext(null), xt = () => {
|
|
2136
2186
|
var e;
|
|
2137
|
-
return ((e = y.useContext(
|
|
2138
|
-
},
|
|
2187
|
+
return ((e = y.useContext(Wo)) == null ? void 0 : e.id) || null;
|
|
2188
|
+
}, wt = () => y.useContext(No);
|
|
2139
2189
|
function Qe(e) {
|
|
2140
2190
|
return "data-floating-ui-" + e;
|
|
2141
2191
|
}
|
|
2142
2192
|
function Ce(e) {
|
|
2143
2193
|
const t = Cn(e);
|
|
2144
|
-
return
|
|
2194
|
+
return Q(() => {
|
|
2145
2195
|
t.current = e;
|
|
2146
2196
|
}), t;
|
|
2147
2197
|
}
|
|
2148
|
-
const
|
|
2198
|
+
const zt = /* @__PURE__ */ Qe("safe-polygon");
|
|
2149
2199
|
function ot(e, t, n) {
|
|
2150
|
-
return n && !
|
|
2200
|
+
return n && !_e(n) ? 0 : typeof e == "number" ? e : e == null ? void 0 : e[t];
|
|
2151
2201
|
}
|
|
2152
|
-
function
|
|
2202
|
+
function zo(e, t) {
|
|
2153
2203
|
t === void 0 && (t = {});
|
|
2154
2204
|
const {
|
|
2155
2205
|
open: n,
|
|
@@ -2168,7 +2218,7 @@ function Wo(e, t) {
|
|
|
2168
2218
|
mouseOnly: f = !1,
|
|
2169
2219
|
restMs: u = 0,
|
|
2170
2220
|
move: g = !0
|
|
2171
|
-
} = t, p =
|
|
2221
|
+
} = t, p = wt(), w = xt(), h = Ce(d), x = Ce(m), P = y.useRef(), S = y.useRef(), k = y.useRef(), C = y.useRef(), A = y.useRef(!0), T = y.useRef(!1), B = y.useRef(() => {
|
|
2172
2222
|
}), D = y.useCallback(() => {
|
|
2173
2223
|
var b;
|
|
2174
2224
|
const v = (b = o.current.openEvent) == null ? void 0 : b.type;
|
|
@@ -2179,9 +2229,9 @@ function Wo(e, t) {
|
|
|
2179
2229
|
return;
|
|
2180
2230
|
function b(v) {
|
|
2181
2231
|
let {
|
|
2182
|
-
open:
|
|
2232
|
+
open: I
|
|
2183
2233
|
} = v;
|
|
2184
|
-
|
|
2234
|
+
I || (clearTimeout(S.current), clearTimeout(C.current), A.current = !0);
|
|
2185
2235
|
}
|
|
2186
2236
|
return i.on("openchange", b), () => {
|
|
2187
2237
|
i.off("openchange", b);
|
|
@@ -2189,24 +2239,24 @@ function Wo(e, t) {
|
|
|
2189
2239
|
}, [c, i]), y.useEffect(() => {
|
|
2190
2240
|
if (!c || !h.current || !n)
|
|
2191
2241
|
return;
|
|
2192
|
-
function b(
|
|
2193
|
-
D() && r(!1,
|
|
2242
|
+
function b(I) {
|
|
2243
|
+
D() && r(!1, I, "hover");
|
|
2194
2244
|
}
|
|
2195
|
-
const v =
|
|
2245
|
+
const v = fe(l).documentElement;
|
|
2196
2246
|
return v.addEventListener("mouseleave", b), () => {
|
|
2197
2247
|
v.removeEventListener("mouseleave", b);
|
|
2198
2248
|
};
|
|
2199
2249
|
}, [l, n, r, c, h, D]);
|
|
2200
|
-
const
|
|
2201
|
-
v === void 0 && (v = !0),
|
|
2250
|
+
const L = y.useCallback(function(b, v, I) {
|
|
2251
|
+
v === void 0 && (v = !0), I === void 0 && (I = "hover");
|
|
2202
2252
|
const R = ot(x.current, "close", P.current);
|
|
2203
|
-
R && !
|
|
2253
|
+
R && !k.current ? (clearTimeout(S.current), S.current = setTimeout(() => r(!1, b, I), R)) : v && (clearTimeout(S.current), r(!1, b, I));
|
|
2204
2254
|
}, [x, r]), M = y.useCallback(() => {
|
|
2205
|
-
|
|
2206
|
-
}, []),
|
|
2207
|
-
if (
|
|
2208
|
-
const b =
|
|
2209
|
-
b.style.pointerEvents = "", b.removeAttribute(
|
|
2255
|
+
B.current(), k.current = void 0;
|
|
2256
|
+
}, []), O = y.useCallback(() => {
|
|
2257
|
+
if (T.current) {
|
|
2258
|
+
const b = fe(a.floating.current).body;
|
|
2259
|
+
b.style.pointerEvents = "", b.removeAttribute(zt), T.current = !1;
|
|
2210
2260
|
}
|
|
2211
2261
|
}, [a]);
|
|
2212
2262
|
return y.useEffect(() => {
|
|
@@ -2215,73 +2265,73 @@ function Wo(e, t) {
|
|
|
2215
2265
|
function b() {
|
|
2216
2266
|
return o.current.openEvent ? ["click", "mousedown"].includes(o.current.openEvent.type) : !1;
|
|
2217
2267
|
}
|
|
2218
|
-
function v(
|
|
2219
|
-
if (clearTimeout(S.current), A.current = !1, f && !
|
|
2268
|
+
function v($) {
|
|
2269
|
+
if (clearTimeout(S.current), A.current = !1, f && !_e(P.current) || u > 0 && ot(x.current, "open") === 0)
|
|
2220
2270
|
return;
|
|
2221
|
-
const
|
|
2222
|
-
|
|
2223
|
-
r(!0,
|
|
2224
|
-
},
|
|
2271
|
+
const F = ot(x.current, "open", P.current);
|
|
2272
|
+
F ? S.current = setTimeout(() => {
|
|
2273
|
+
r(!0, $, "hover");
|
|
2274
|
+
}, F) : r(!0, $, "hover");
|
|
2225
2275
|
}
|
|
2226
|
-
function
|
|
2276
|
+
function I($) {
|
|
2227
2277
|
if (b())
|
|
2228
2278
|
return;
|
|
2229
|
-
|
|
2230
|
-
const
|
|
2231
|
-
if (clearTimeout(
|
|
2232
|
-
n || clearTimeout(S.current),
|
|
2279
|
+
B.current();
|
|
2280
|
+
const F = fe(l);
|
|
2281
|
+
if (clearTimeout(C.current), h.current) {
|
|
2282
|
+
n || clearTimeout(S.current), k.current = h.current({
|
|
2233
2283
|
...e,
|
|
2234
2284
|
tree: p,
|
|
2235
|
-
x:
|
|
2236
|
-
y:
|
|
2285
|
+
x: $.clientX,
|
|
2286
|
+
y: $.clientY,
|
|
2237
2287
|
onClose() {
|
|
2238
|
-
|
|
2288
|
+
O(), M(), L($, !0, "safe-polygon");
|
|
2239
2289
|
}
|
|
2240
2290
|
});
|
|
2241
|
-
const G =
|
|
2242
|
-
|
|
2243
|
-
|
|
2291
|
+
const G = k.current;
|
|
2292
|
+
F.addEventListener("mousemove", G), B.current = () => {
|
|
2293
|
+
F.removeEventListener("mousemove", G);
|
|
2244
2294
|
};
|
|
2245
2295
|
return;
|
|
2246
2296
|
}
|
|
2247
|
-
(P.current === "touch" ? !
|
|
2297
|
+
(P.current === "touch" ? !pe(l, $.relatedTarget) : !0) && L($);
|
|
2248
2298
|
}
|
|
2249
|
-
function R(
|
|
2299
|
+
function R($) {
|
|
2250
2300
|
b() || h.current == null || h.current({
|
|
2251
2301
|
...e,
|
|
2252
2302
|
tree: p,
|
|
2253
|
-
x:
|
|
2254
|
-
y:
|
|
2303
|
+
x: $.clientX,
|
|
2304
|
+
y: $.clientY,
|
|
2255
2305
|
onClose() {
|
|
2256
|
-
|
|
2306
|
+
O(), M(), L($);
|
|
2257
2307
|
}
|
|
2258
|
-
})(
|
|
2308
|
+
})($);
|
|
2259
2309
|
}
|
|
2260
|
-
if (
|
|
2261
|
-
const
|
|
2262
|
-
return n &&
|
|
2310
|
+
if (N(s)) {
|
|
2311
|
+
const $ = s;
|
|
2312
|
+
return n && $.addEventListener("mouseleave", R), l == null || l.addEventListener("mouseleave", R), g && $.addEventListener("mousemove", v, {
|
|
2263
2313
|
once: !0
|
|
2264
|
-
}),
|
|
2265
|
-
n &&
|
|
2314
|
+
}), $.addEventListener("mouseenter", v), $.addEventListener("mouseleave", I), () => {
|
|
2315
|
+
n && $.removeEventListener("mouseleave", R), l == null || l.removeEventListener("mouseleave", R), g && $.removeEventListener("mousemove", v), $.removeEventListener("mouseenter", v), $.removeEventListener("mouseleave", I);
|
|
2266
2316
|
};
|
|
2267
2317
|
}
|
|
2268
|
-
}, [s, l, c, e, f, u, g,
|
|
2318
|
+
}, [s, l, c, e, f, u, g, L, M, O, r, n, p, x, h, o]), Q(() => {
|
|
2269
2319
|
var b;
|
|
2270
2320
|
if (c && n && (b = h.current) != null && b.__options.blockPointerEvents && D()) {
|
|
2271
|
-
const
|
|
2272
|
-
if (
|
|
2321
|
+
const I = fe(l).body;
|
|
2322
|
+
if (I.setAttribute(zt, ""), I.style.pointerEvents = "none", T.current = !0, N(s) && l) {
|
|
2273
2323
|
var v;
|
|
2274
|
-
const R = s,
|
|
2275
|
-
return
|
|
2324
|
+
const R = s, $ = p == null || (v = p.nodesRef.current.find((F) => F.id === w)) == null || (v = v.context) == null ? void 0 : v.elements.floating;
|
|
2325
|
+
return $ && ($.style.pointerEvents = ""), R.style.pointerEvents = "auto", l.style.pointerEvents = "auto", () => {
|
|
2276
2326
|
R.style.pointerEvents = "", l.style.pointerEvents = "";
|
|
2277
2327
|
};
|
|
2278
2328
|
}
|
|
2279
2329
|
}
|
|
2280
|
-
}, [c, n,
|
|
2281
|
-
n || (P.current = void 0, M(),
|
|
2282
|
-
}, [n, M,
|
|
2283
|
-
M(), clearTimeout(S.current), clearTimeout(
|
|
2284
|
-
}, [c, s, M,
|
|
2330
|
+
}, [c, n, w, l, s, p, h, D]), Q(() => {
|
|
2331
|
+
n || (P.current = void 0, M(), O());
|
|
2332
|
+
}, [n, M, O]), y.useEffect(() => () => {
|
|
2333
|
+
M(), clearTimeout(S.current), clearTimeout(C.current), O();
|
|
2334
|
+
}, [c, s, M, O]), y.useMemo(() => {
|
|
2285
2335
|
if (!c)
|
|
2286
2336
|
return {};
|
|
2287
2337
|
function b(v) {
|
|
@@ -2292,7 +2342,7 @@ function Wo(e, t) {
|
|
|
2292
2342
|
onPointerDown: b,
|
|
2293
2343
|
onPointerEnter: b,
|
|
2294
2344
|
onMouseMove(v) {
|
|
2295
|
-
n || u === 0 || (clearTimeout(
|
|
2345
|
+
n || u === 0 || (clearTimeout(C.current), C.current = setTimeout(() => {
|
|
2296
2346
|
A.current || r(!0, v.nativeEvent, "hover");
|
|
2297
2347
|
}, u));
|
|
2298
2348
|
}
|
|
@@ -2302,13 +2352,13 @@ function Wo(e, t) {
|
|
|
2302
2352
|
clearTimeout(S.current);
|
|
2303
2353
|
},
|
|
2304
2354
|
onMouseLeave(v) {
|
|
2305
|
-
|
|
2355
|
+
L(v.nativeEvent, !1);
|
|
2306
2356
|
}
|
|
2307
2357
|
}
|
|
2308
2358
|
};
|
|
2309
|
-
}, [c, u, n, r,
|
|
2359
|
+
}, [c, u, n, r, L]);
|
|
2310
2360
|
}
|
|
2311
|
-
function
|
|
2361
|
+
function Ve(e, t) {
|
|
2312
2362
|
let n = e.filter((o) => {
|
|
2313
2363
|
var i;
|
|
2314
2364
|
return o.parentId === t && ((i = o.context) == null ? void 0 : i.open);
|
|
@@ -2335,25 +2385,25 @@ const xn = () => ({
|
|
|
2335
2385
|
function wn(e, t) {
|
|
2336
2386
|
const n = vn(e, xn());
|
|
2337
2387
|
t === "prev" && n.reverse();
|
|
2338
|
-
const r = n.indexOf(Cr(
|
|
2388
|
+
const r = n.indexOf(Cr(fe(e)));
|
|
2339
2389
|
return n.slice(r + 1)[0];
|
|
2340
2390
|
}
|
|
2341
|
-
function
|
|
2391
|
+
function jo() {
|
|
2342
2392
|
return wn(document.body, "next");
|
|
2343
2393
|
}
|
|
2344
|
-
function
|
|
2394
|
+
function Ho() {
|
|
2345
2395
|
return wn(document.body, "prev");
|
|
2346
2396
|
}
|
|
2347
2397
|
function it(e, t) {
|
|
2348
2398
|
const n = t || e.currentTarget, r = e.relatedTarget;
|
|
2349
|
-
return !r || !
|
|
2399
|
+
return !r || !pe(n, r);
|
|
2350
2400
|
}
|
|
2351
|
-
function
|
|
2401
|
+
function Vo(e) {
|
|
2352
2402
|
vn(e, xn()).forEach((n) => {
|
|
2353
2403
|
n.dataset.tabindex = n.getAttribute("tabindex") || "", n.setAttribute("tabindex", "-1");
|
|
2354
2404
|
});
|
|
2355
2405
|
}
|
|
2356
|
-
function
|
|
2406
|
+
function _o(e) {
|
|
2357
2407
|
e.querySelectorAll("[data-tabindex]").forEach((n) => {
|
|
2358
2408
|
const r = n.dataset.tabindex;
|
|
2359
2409
|
delete n.dataset.tabindex, r ? n.setAttribute("tabindex", r) : n.removeAttribute("tabindex");
|
|
@@ -2372,14 +2422,14 @@ const $n = {
|
|
|
2372
2422
|
top: 0,
|
|
2373
2423
|
left: 0
|
|
2374
2424
|
};
|
|
2375
|
-
let
|
|
2376
|
-
function
|
|
2377
|
-
e.key === "Tab" && (e.target, clearTimeout(
|
|
2425
|
+
let Yo;
|
|
2426
|
+
function jt(e) {
|
|
2427
|
+
e.key === "Tab" && (e.target, clearTimeout(Yo));
|
|
2378
2428
|
}
|
|
2379
|
-
const
|
|
2429
|
+
const Ht = /* @__PURE__ */ y.forwardRef(function(t, n) {
|
|
2380
2430
|
const [r, o] = y.useState();
|
|
2381
|
-
|
|
2382
|
-
document.removeEventListener("keydown",
|
|
2431
|
+
Q(() => (kr() && o("button"), document.addEventListener("keydown", jt), () => {
|
|
2432
|
+
document.removeEventListener("keydown", jt);
|
|
2383
2433
|
}), []);
|
|
2384
2434
|
const i = {
|
|
2385
2435
|
ref: n,
|
|
@@ -2391,44 +2441,44 @@ const jt = /* @__PURE__ */ y.forwardRef(function(t, n) {
|
|
|
2391
2441
|
style: $n
|
|
2392
2442
|
};
|
|
2393
2443
|
return /* @__PURE__ */ y.createElement("span", dt({}, t, i));
|
|
2394
|
-
}), Sn = /* @__PURE__ */ y.createContext(null),
|
|
2395
|
-
function
|
|
2444
|
+
}), Sn = /* @__PURE__ */ y.createContext(null), Vt = /* @__PURE__ */ Qe("portal");
|
|
2445
|
+
function Ko(e) {
|
|
2396
2446
|
let {
|
|
2397
2447
|
id: t,
|
|
2398
2448
|
root: n
|
|
2399
2449
|
} = e === void 0 ? {} : e;
|
|
2400
|
-
const [r, o] = y.useState(null), i =
|
|
2401
|
-
return
|
|
2450
|
+
const [r, o] = y.useState(null), i = vt(), s = Go(), l = y.useRef(null);
|
|
2451
|
+
return Q(() => () => {
|
|
2402
2452
|
r == null || r.remove(), queueMicrotask(() => {
|
|
2403
2453
|
l.current = null;
|
|
2404
2454
|
});
|
|
2405
|
-
}, [r]),
|
|
2455
|
+
}, [r]), Q(() => {
|
|
2406
2456
|
if (l.current)
|
|
2407
2457
|
return;
|
|
2408
2458
|
const a = t ? document.getElementById(t) : null;
|
|
2409
2459
|
if (!a)
|
|
2410
2460
|
return;
|
|
2411
2461
|
const c = document.createElement("div");
|
|
2412
|
-
c.id = i, c.setAttribute(
|
|
2413
|
-
}, [t, i]),
|
|
2462
|
+
c.id = i, c.setAttribute(Vt, ""), a.appendChild(c), l.current = c, o(c);
|
|
2463
|
+
}, [t, i]), Q(() => {
|
|
2414
2464
|
if (l.current)
|
|
2415
2465
|
return;
|
|
2416
2466
|
let a = n || (s == null ? void 0 : s.portalNode);
|
|
2417
|
-
a && !
|
|
2467
|
+
a && !N(a) && (a = a.current), a = a || document.body;
|
|
2418
2468
|
let c = null;
|
|
2419
2469
|
t && (c = document.createElement("div"), c.id = t, a.appendChild(c));
|
|
2420
2470
|
const m = document.createElement("div");
|
|
2421
|
-
m.id = i, m.setAttribute(
|
|
2471
|
+
m.id = i, m.setAttribute(Vt, ""), a = c || a, a.appendChild(m), l.current = m, o(m);
|
|
2422
2472
|
}, [t, n, i, s]), r;
|
|
2423
2473
|
}
|
|
2424
|
-
function
|
|
2474
|
+
function Xo(e) {
|
|
2425
2475
|
let {
|
|
2426
2476
|
children: t,
|
|
2427
2477
|
id: n,
|
|
2428
2478
|
root: r = null,
|
|
2429
2479
|
preserveTabOrder: o = !0
|
|
2430
2480
|
} = e;
|
|
2431
|
-
const i =
|
|
2481
|
+
const i = Ko({
|
|
2432
2482
|
id: n,
|
|
2433
2483
|
root: r
|
|
2434
2484
|
}), [s, l] = y.useState(null), a = y.useRef(null), c = y.useRef(null), m = y.useRef(null), d = y.useRef(null), f = (
|
|
@@ -2442,7 +2492,7 @@ function Ko(e) {
|
|
|
2442
2492
|
if (!i || !o || s != null && s.modal)
|
|
2443
2493
|
return;
|
|
2444
2494
|
function u(g) {
|
|
2445
|
-
i && it(g) && (g.type === "focusin" ?
|
|
2495
|
+
i && it(g) && (g.type === "focusin" ? _o : Vo)(i);
|
|
2446
2496
|
}
|
|
2447
2497
|
return i.addEventListener("focusin", u, !0), i.addEventListener("focusout", u, !0), () => {
|
|
2448
2498
|
i.removeEventListener("focusin", u, !0), i.removeEventListener("focusout", u, !0);
|
|
@@ -2457,7 +2507,7 @@ function Ko(e) {
|
|
|
2457
2507
|
portalNode: i,
|
|
2458
2508
|
setFocusManagerState: l
|
|
2459
2509
|
}), [o, i])
|
|
2460
|
-
}, f && i && /* @__PURE__ */ y.createElement(
|
|
2510
|
+
}, f && i && /* @__PURE__ */ y.createElement(Ht, {
|
|
2461
2511
|
"data-type": "outside",
|
|
2462
2512
|
ref: a,
|
|
2463
2513
|
onFocus: (u) => {
|
|
@@ -2465,14 +2515,14 @@ function Ko(e) {
|
|
|
2465
2515
|
var g;
|
|
2466
2516
|
(g = m.current) == null || g.focus();
|
|
2467
2517
|
} else {
|
|
2468
|
-
const p =
|
|
2518
|
+
const p = Ho() || (s == null ? void 0 : s.refs.domReference.current);
|
|
2469
2519
|
p == null || p.focus();
|
|
2470
2520
|
}
|
|
2471
2521
|
}
|
|
2472
2522
|
}), f && i && /* @__PURE__ */ y.createElement("span", {
|
|
2473
2523
|
"aria-owns": i.id,
|
|
2474
2524
|
style: $n
|
|
2475
|
-
}), i && /* @__PURE__ */ Bn(t, i), f && i && /* @__PURE__ */ y.createElement(
|
|
2525
|
+
}), i && /* @__PURE__ */ Bn(t, i), f && i && /* @__PURE__ */ y.createElement(Ht, {
|
|
2476
2526
|
"data-type": "outside",
|
|
2477
2527
|
ref: c,
|
|
2478
2528
|
onFocus: (u) => {
|
|
@@ -2480,20 +2530,20 @@ function Ko(e) {
|
|
|
2480
2530
|
var g;
|
|
2481
2531
|
(g = d.current) == null || g.focus();
|
|
2482
2532
|
} else {
|
|
2483
|
-
const p =
|
|
2533
|
+
const p = jo() || (s == null ? void 0 : s.refs.domReference.current);
|
|
2484
2534
|
p == null || p.focus(), s != null && s.closeOnFocusOut && (s == null || s.onOpenChange(!1, u.nativeEvent));
|
|
2485
2535
|
}
|
|
2486
2536
|
}
|
|
2487
2537
|
}));
|
|
2488
2538
|
}
|
|
2489
|
-
const
|
|
2490
|
-
function Vt(e) {
|
|
2491
|
-
return q(e.target) && e.target.tagName === "BUTTON";
|
|
2492
|
-
}
|
|
2539
|
+
const Go = () => y.useContext(Sn);
|
|
2493
2540
|
function _t(e) {
|
|
2541
|
+
return Z(e.target) && e.target.tagName === "BUTTON";
|
|
2542
|
+
}
|
|
2543
|
+
function Yt(e) {
|
|
2494
2544
|
return Ar(e);
|
|
2495
2545
|
}
|
|
2496
|
-
function
|
|
2546
|
+
function Uo(e, t) {
|
|
2497
2547
|
t === void 0 && (t = {});
|
|
2498
2548
|
const {
|
|
2499
2549
|
open: n,
|
|
@@ -2515,40 +2565,40 @@ function Go(e, t) {
|
|
|
2515
2565
|
d.current = u.pointerType;
|
|
2516
2566
|
},
|
|
2517
2567
|
onMouseDown(u) {
|
|
2518
|
-
u.button === 0 && (
|
|
2568
|
+
u.button === 0 && (_e(d.current, !0) && c || l !== "click" && (n && a && (!o.current.openEvent || o.current.openEvent.type === "mousedown") ? r(!1, u.nativeEvent, "click") : (u.preventDefault(), r(!0, u.nativeEvent, "click"))));
|
|
2519
2569
|
},
|
|
2520
2570
|
onClick(u) {
|
|
2521
2571
|
if (l === "mousedown" && d.current) {
|
|
2522
2572
|
d.current = void 0;
|
|
2523
2573
|
return;
|
|
2524
2574
|
}
|
|
2525
|
-
|
|
2575
|
+
_e(d.current, !0) && c || (n && a && (!o.current.openEvent || o.current.openEvent.type === "click") ? r(!1, u.nativeEvent, "click") : r(!0, u.nativeEvent, "click"));
|
|
2526
2576
|
},
|
|
2527
2577
|
onKeyDown(u) {
|
|
2528
|
-
d.current = void 0, !(u.defaultPrevented || !m ||
|
|
2578
|
+
d.current = void 0, !(u.defaultPrevented || !m || _t(u)) && (u.key === " " && !Yt(i) && (u.preventDefault(), f.current = !0), u.key === "Enter" && r(!(n && a), u.nativeEvent, "click"));
|
|
2529
2579
|
},
|
|
2530
2580
|
onKeyUp(u) {
|
|
2531
|
-
u.defaultPrevented || !m ||
|
|
2581
|
+
u.defaultPrevented || !m || _t(u) || Yt(i) || u.key === " " && f.current && (f.current = !1, r(!(n && a), u.nativeEvent, "click"));
|
|
2532
2582
|
}
|
|
2533
2583
|
}
|
|
2534
2584
|
} : {}, [s, o, l, c, m, i, a, n, r]);
|
|
2535
2585
|
}
|
|
2536
|
-
const
|
|
2586
|
+
const qo = {
|
|
2537
2587
|
pointerdown: "onPointerDown",
|
|
2538
2588
|
mousedown: "onMouseDown",
|
|
2539
2589
|
click: "onClick"
|
|
2540
|
-
},
|
|
2590
|
+
}, Zo = {
|
|
2541
2591
|
pointerdown: "onPointerDownCapture",
|
|
2542
2592
|
mousedown: "onMouseDownCapture",
|
|
2543
2593
|
click: "onClickCapture"
|
|
2544
|
-
},
|
|
2594
|
+
}, Kt = (e) => {
|
|
2545
2595
|
var t, n;
|
|
2546
2596
|
return {
|
|
2547
2597
|
escapeKey: typeof e == "boolean" ? e : (t = e == null ? void 0 : e.escapeKey) != null ? t : !1,
|
|
2548
2598
|
outsidePress: typeof e == "boolean" ? e : (n = e == null ? void 0 : e.outsidePress) != null ? n : !0
|
|
2549
2599
|
};
|
|
2550
2600
|
};
|
|
2551
|
-
function
|
|
2601
|
+
function Jo(e, t) {
|
|
2552
2602
|
t === void 0 && (t = {});
|
|
2553
2603
|
const {
|
|
2554
2604
|
open: n,
|
|
@@ -2568,23 +2618,23 @@ function Zo(e, t) {
|
|
|
2568
2618
|
referencePress: u = !1,
|
|
2569
2619
|
referencePressEvent: g = "pointerdown",
|
|
2570
2620
|
ancestorScroll: p = !1,
|
|
2571
|
-
bubbles:
|
|
2621
|
+
bubbles: w,
|
|
2572
2622
|
capture: h
|
|
2573
|
-
} = t, x =
|
|
2623
|
+
} = t, x = wt(), P = Re(typeof d == "function" ? d : () => !1), S = typeof d == "function" ? P : d, k = y.useRef(!1), C = y.useRef(!1), {
|
|
2574
2624
|
escapeKey: A,
|
|
2575
|
-
outsidePress:
|
|
2576
|
-
} =
|
|
2577
|
-
escapeKey:
|
|
2625
|
+
outsidePress: T
|
|
2626
|
+
} = Kt(w), {
|
|
2627
|
+
escapeKey: B,
|
|
2578
2628
|
outsidePress: D
|
|
2579
|
-
} =
|
|
2629
|
+
} = Kt(h), L = Re((v) => {
|
|
2580
2630
|
if (!n || !c || !m || v.key !== "Escape")
|
|
2581
2631
|
return;
|
|
2582
|
-
const
|
|
2583
|
-
if (!A && (v.stopPropagation(),
|
|
2632
|
+
const I = x ? Ve(x.nodesRef.current, o) : [];
|
|
2633
|
+
if (!A && (v.stopPropagation(), I.length > 0)) {
|
|
2584
2634
|
let R = !0;
|
|
2585
|
-
if (
|
|
2586
|
-
var
|
|
2587
|
-
if ((
|
|
2635
|
+
if (I.forEach(($) => {
|
|
2636
|
+
var F;
|
|
2637
|
+
if ((F = $.context) != null && F.open && !$.context.dataRef.current.__escapeKeyBubbles) {
|
|
2588
2638
|
R = !1;
|
|
2589
2639
|
return;
|
|
2590
2640
|
}
|
|
@@ -2593,49 +2643,49 @@ function Zo(e, t) {
|
|
|
2593
2643
|
}
|
|
2594
2644
|
r(!1, Tr(v) ? v.nativeEvent : v, "escape-key");
|
|
2595
2645
|
}), M = Re((v) => {
|
|
2596
|
-
var
|
|
2646
|
+
var I;
|
|
2597
2647
|
const R = () => {
|
|
2598
|
-
var
|
|
2599
|
-
|
|
2648
|
+
var $;
|
|
2649
|
+
L(v), ($ = Se(v)) == null || $.removeEventListener("keydown", R);
|
|
2600
2650
|
};
|
|
2601
|
-
(
|
|
2602
|
-
}),
|
|
2603
|
-
const
|
|
2604
|
-
|
|
2605
|
-
const R =
|
|
2606
|
-
if (
|
|
2651
|
+
(I = Se(v)) == null || I.addEventListener("keydown", R);
|
|
2652
|
+
}), O = Re((v) => {
|
|
2653
|
+
const I = k.current;
|
|
2654
|
+
k.current = !1;
|
|
2655
|
+
const R = C.current;
|
|
2656
|
+
if (C.current = !1, f === "click" && R || I || typeof S == "function" && !S(v))
|
|
2607
2657
|
return;
|
|
2608
|
-
const
|
|
2609
|
-
let G =
|
|
2658
|
+
const $ = Se(v), F = "[" + Qe("inert") + "]", K = fe(l).querySelectorAll(F);
|
|
2659
|
+
let G = N($) ? $ : null;
|
|
2610
2660
|
for (; G && !Te(G); ) {
|
|
2611
|
-
const H =
|
|
2612
|
-
if (Te(H) || !
|
|
2661
|
+
const H = he(G);
|
|
2662
|
+
if (Te(H) || !N(H))
|
|
2613
2663
|
break;
|
|
2614
2664
|
G = H;
|
|
2615
2665
|
}
|
|
2616
|
-
if (K.length &&
|
|
2617
|
-
!
|
|
2666
|
+
if (K.length && N($) && !Ir($) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
|
|
2667
|
+
!pe($, l) && // If the target root element contains none of the markers, then the
|
|
2618
2668
|
// element was injected after the floating element rendered.
|
|
2619
|
-
Array.from(K).every((H) => !
|
|
2669
|
+
Array.from(K).every((H) => !pe(G, H)))
|
|
2620
2670
|
return;
|
|
2621
|
-
if (
|
|
2622
|
-
const H =
|
|
2623
|
-
let
|
|
2624
|
-
if (X &&
|
|
2671
|
+
if (Z($) && l) {
|
|
2672
|
+
const H = $.clientWidth > 0 && $.scrollWidth > $.clientWidth, X = $.clientHeight > 0 && $.scrollHeight > $.clientHeight;
|
|
2673
|
+
let ae = X && v.offsetX > $.clientWidth;
|
|
2674
|
+
if (X && J($).direction === "rtl" && (ae = v.offsetX <= $.offsetWidth - $.clientWidth), ae || H && v.offsetY > $.clientHeight)
|
|
2625
2675
|
return;
|
|
2626
2676
|
}
|
|
2627
|
-
const ye = x &&
|
|
2677
|
+
const ye = x && Ve(x.nodesRef.current, o).some((H) => {
|
|
2628
2678
|
var X;
|
|
2629
2679
|
return nt(v, (X = H.context) == null ? void 0 : X.elements.floating);
|
|
2630
2680
|
});
|
|
2631
2681
|
if (nt(v, l) || nt(v, s) || ye)
|
|
2632
2682
|
return;
|
|
2633
|
-
const
|
|
2634
|
-
if (
|
|
2683
|
+
const le = x ? Ve(x.nodesRef.current, o) : [];
|
|
2684
|
+
if (le.length > 0) {
|
|
2635
2685
|
let H = !0;
|
|
2636
|
-
if (
|
|
2637
|
-
var
|
|
2638
|
-
if ((
|
|
2686
|
+
if (le.forEach((X) => {
|
|
2687
|
+
var ae;
|
|
2688
|
+
if ((ae = X.context) != null && ae.open && !X.context.dataRef.current.__outsidePressBubbles) {
|
|
2639
2689
|
H = !1;
|
|
2640
2690
|
return;
|
|
2641
2691
|
}
|
|
@@ -2644,61 +2694,61 @@ function Zo(e, t) {
|
|
|
2644
2694
|
}
|
|
2645
2695
|
r(!1, v, "outside-press");
|
|
2646
2696
|
}), b = Re((v) => {
|
|
2647
|
-
var
|
|
2697
|
+
var I;
|
|
2648
2698
|
const R = () => {
|
|
2649
|
-
var
|
|
2650
|
-
|
|
2699
|
+
var $;
|
|
2700
|
+
O(v), ($ = Se(v)) == null || $.removeEventListener(f, R);
|
|
2651
2701
|
};
|
|
2652
|
-
(
|
|
2702
|
+
(I = Se(v)) == null || I.addEventListener(f, R);
|
|
2653
2703
|
});
|
|
2654
2704
|
return y.useEffect(() => {
|
|
2655
2705
|
if (!n || !c)
|
|
2656
2706
|
return;
|
|
2657
|
-
a.current.__escapeKeyBubbles = A, a.current.__outsidePressBubbles =
|
|
2658
|
-
function v(
|
|
2659
|
-
r(!1,
|
|
2707
|
+
a.current.__escapeKeyBubbles = A, a.current.__outsidePressBubbles = T;
|
|
2708
|
+
function v($) {
|
|
2709
|
+
r(!1, $, "ancestor-scroll");
|
|
2660
2710
|
}
|
|
2661
|
-
const
|
|
2662
|
-
m &&
|
|
2711
|
+
const I = fe(l);
|
|
2712
|
+
m && I.addEventListener("keydown", B ? M : L, B), S && I.addEventListener(f, D ? b : O, D);
|
|
2663
2713
|
let R = [];
|
|
2664
|
-
return p && (
|
|
2665
|
-
var
|
|
2666
|
-
return
|
|
2667
|
-
}), R.forEach((
|
|
2668
|
-
|
|
2714
|
+
return p && (N(s) && (R = re(s)), N(l) && (R = R.concat(re(l))), !N(i) && i && i.contextElement && (R = R.concat(re(i.contextElement)))), R = R.filter(($) => {
|
|
2715
|
+
var F;
|
|
2716
|
+
return $ !== ((F = I.defaultView) == null ? void 0 : F.visualViewport);
|
|
2717
|
+
}), R.forEach(($) => {
|
|
2718
|
+
$.addEventListener("scroll", v, {
|
|
2669
2719
|
passive: !0
|
|
2670
2720
|
});
|
|
2671
2721
|
}), () => {
|
|
2672
|
-
m &&
|
|
2673
|
-
|
|
2722
|
+
m && I.removeEventListener("keydown", B ? M : L, B), S && I.removeEventListener(f, D ? b : O, D), R.forEach(($) => {
|
|
2723
|
+
$.removeEventListener("scroll", v);
|
|
2674
2724
|
});
|
|
2675
2725
|
};
|
|
2676
|
-
}, [a, l, s, i, m, S, f, n, r, p, c, A,
|
|
2677
|
-
|
|
2726
|
+
}, [a, l, s, i, m, S, f, n, r, p, c, A, T, L, B, M, O, D, b]), y.useEffect(() => {
|
|
2727
|
+
k.current = !1;
|
|
2678
2728
|
}, [S, f]), y.useMemo(() => c ? {
|
|
2679
2729
|
reference: {
|
|
2680
|
-
onKeyDown:
|
|
2681
|
-
[
|
|
2730
|
+
onKeyDown: L,
|
|
2731
|
+
[qo[g]]: (v) => {
|
|
2682
2732
|
u && r(!1, v.nativeEvent, "reference-press");
|
|
2683
2733
|
}
|
|
2684
2734
|
},
|
|
2685
2735
|
floating: {
|
|
2686
|
-
onKeyDown:
|
|
2736
|
+
onKeyDown: L,
|
|
2687
2737
|
onMouseDown() {
|
|
2688
|
-
|
|
2738
|
+
C.current = !0;
|
|
2689
2739
|
},
|
|
2690
2740
|
onMouseUp() {
|
|
2691
|
-
I.current = !0;
|
|
2692
|
-
},
|
|
2693
|
-
[qo[f]]: () => {
|
|
2694
2741
|
C.current = !0;
|
|
2742
|
+
},
|
|
2743
|
+
[Zo[f]]: () => {
|
|
2744
|
+
k.current = !0;
|
|
2695
2745
|
}
|
|
2696
2746
|
}
|
|
2697
|
-
} : {}, [c, u, f, g, r,
|
|
2747
|
+
} : {}, [c, u, f, g, r, L]);
|
|
2698
2748
|
}
|
|
2699
2749
|
let ft;
|
|
2700
2750
|
process.env.NODE_ENV !== "production" && (ft = /* @__PURE__ */ new Set());
|
|
2701
|
-
function
|
|
2751
|
+
function Qo(e) {
|
|
2702
2752
|
var t;
|
|
2703
2753
|
e === void 0 && (e = {});
|
|
2704
2754
|
const {
|
|
@@ -2708,70 +2758,70 @@ function Jo(e) {
|
|
|
2708
2758
|
} = e;
|
|
2709
2759
|
if (process.env.NODE_ENV !== "production") {
|
|
2710
2760
|
var i;
|
|
2711
|
-
const
|
|
2712
|
-
if ((i = e.elements) != null && i.reference && !
|
|
2761
|
+
const T = "Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";
|
|
2762
|
+
if ((i = e.elements) != null && i.reference && !N(e.elements.reference)) {
|
|
2713
2763
|
var s;
|
|
2714
|
-
if (!((s = ft) != null && s.has(
|
|
2764
|
+
if (!((s = ft) != null && s.has(T))) {
|
|
2715
2765
|
var l;
|
|
2716
|
-
(l = ft) == null || l.add(
|
|
2766
|
+
(l = ft) == null || l.add(T), console.error(T);
|
|
2717
2767
|
}
|
|
2718
2768
|
}
|
|
2719
2769
|
}
|
|
2720
|
-
const [a, c] = y.useState(null), m = ((t = e.elements) == null ? void 0 : t.reference) || a, d =
|
|
2721
|
-
|
|
2722
|
-
open:
|
|
2723
|
-
event:
|
|
2770
|
+
const [a, c] = y.useState(null), m = ((t = e.elements) == null ? void 0 : t.reference) || a, d = mo(e), f = wt(), u = xt() != null, g = Re((T, B, D) => {
|
|
2771
|
+
T && (w.current.openEvent = B), h.emit("openchange", {
|
|
2772
|
+
open: T,
|
|
2773
|
+
event: B,
|
|
2724
2774
|
reason: D,
|
|
2725
2775
|
nested: u
|
|
2726
|
-
}), r == null || r(
|
|
2727
|
-
}), p = y.useRef(null),
|
|
2728
|
-
const
|
|
2729
|
-
getBoundingClientRect: () =>
|
|
2730
|
-
contextElement:
|
|
2731
|
-
} :
|
|
2732
|
-
d.refs.setReference(
|
|
2733
|
-
}, [d.refs]), S = y.useCallback((
|
|
2734
|
-
(
|
|
2776
|
+
}), r == null || r(T, B, D);
|
|
2777
|
+
}), p = y.useRef(null), w = y.useRef({}), h = y.useState(() => Fo())[0], x = vt(), P = y.useCallback((T) => {
|
|
2778
|
+
const B = N(T) ? {
|
|
2779
|
+
getBoundingClientRect: () => T.getBoundingClientRect(),
|
|
2780
|
+
contextElement: T
|
|
2781
|
+
} : T;
|
|
2782
|
+
d.refs.setReference(B);
|
|
2783
|
+
}, [d.refs]), S = y.useCallback((T) => {
|
|
2784
|
+
(N(T) || T === null) && (p.current = T, c(T)), (N(d.refs.reference.current) || d.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
|
|
2735
2785
|
// `null` to support `positionReference` + an unstable `reference`
|
|
2736
2786
|
// callback ref.
|
|
2737
|
-
|
|
2738
|
-
}, [d.refs]),
|
|
2787
|
+
T !== null && !N(T)) && d.refs.setReference(T);
|
|
2788
|
+
}, [d.refs]), k = y.useMemo(() => ({
|
|
2739
2789
|
...d.refs,
|
|
2740
2790
|
setReference: S,
|
|
2741
2791
|
setPositionReference: P,
|
|
2742
2792
|
domReference: p
|
|
2743
|
-
}), [d.refs, S, P]),
|
|
2793
|
+
}), [d.refs, S, P]), C = y.useMemo(() => ({
|
|
2744
2794
|
...d.elements,
|
|
2745
2795
|
domReference: m
|
|
2746
2796
|
}), [d.elements, m]), A = y.useMemo(() => ({
|
|
2747
2797
|
...d,
|
|
2748
|
-
refs:
|
|
2749
|
-
elements:
|
|
2750
|
-
dataRef:
|
|
2798
|
+
refs: k,
|
|
2799
|
+
elements: C,
|
|
2800
|
+
dataRef: w,
|
|
2751
2801
|
nodeId: o,
|
|
2752
2802
|
floatingId: x,
|
|
2753
2803
|
events: h,
|
|
2754
2804
|
open: n,
|
|
2755
2805
|
onOpenChange: g
|
|
2756
|
-
}), [d, o, x, h, n, g,
|
|
2757
|
-
return
|
|
2758
|
-
const
|
|
2759
|
-
|
|
2806
|
+
}), [d, o, x, h, n, g, k, C]);
|
|
2807
|
+
return Q(() => {
|
|
2808
|
+
const T = f == null ? void 0 : f.nodesRef.current.find((B) => B.id === o);
|
|
2809
|
+
T && (T.context = A);
|
|
2760
2810
|
}), y.useMemo(() => ({
|
|
2761
2811
|
...d,
|
|
2762
2812
|
context: A,
|
|
2763
|
-
refs:
|
|
2764
|
-
elements:
|
|
2765
|
-
}), [d,
|
|
2813
|
+
refs: k,
|
|
2814
|
+
elements: C
|
|
2815
|
+
}), [d, k, C, A]);
|
|
2766
2816
|
}
|
|
2767
|
-
const
|
|
2817
|
+
const Xt = "active", Gt = "selected";
|
|
2768
2818
|
function st(e, t, n) {
|
|
2769
2819
|
const r = /* @__PURE__ */ new Map(), o = n === "item";
|
|
2770
2820
|
let i = e;
|
|
2771
2821
|
if (o && e) {
|
|
2772
2822
|
const {
|
|
2773
|
-
[
|
|
2774
|
-
[
|
|
2823
|
+
[Xt]: s,
|
|
2824
|
+
[Gt]: l,
|
|
2775
2825
|
...a
|
|
2776
2826
|
} = e;
|
|
2777
2827
|
i = a;
|
|
@@ -2786,14 +2836,14 @@ function st(e, t, n) {
|
|
|
2786
2836
|
return typeof l == "function" ? e ? l(e) : null : l;
|
|
2787
2837
|
}).concat(e).reduce((s, l) => (l && Object.entries(l).forEach((a) => {
|
|
2788
2838
|
let [c, m] = a;
|
|
2789
|
-
if (!(o && [
|
|
2839
|
+
if (!(o && [Xt, Gt].includes(c)))
|
|
2790
2840
|
if (c.indexOf("on") === 0) {
|
|
2791
2841
|
if (r.has(c) || r.set(c, []), typeof m == "function") {
|
|
2792
2842
|
var d;
|
|
2793
2843
|
(d = r.get(c)) == null || d.push(m), s[c] = function() {
|
|
2794
2844
|
for (var f, u = arguments.length, g = new Array(u), p = 0; p < u; p++)
|
|
2795
2845
|
g[p] = arguments[p];
|
|
2796
|
-
return (f = r.get(c)) == null ? void 0 : f.map((
|
|
2846
|
+
return (f = r.get(c)) == null ? void 0 : f.map((w) => w(...g)).find((w) => w !== void 0);
|
|
2797
2847
|
};
|
|
2798
2848
|
}
|
|
2799
2849
|
} else
|
|
@@ -2801,7 +2851,7 @@ function st(e, t, n) {
|
|
|
2801
2851
|
}), s), {})
|
|
2802
2852
|
};
|
|
2803
2853
|
}
|
|
2804
|
-
function
|
|
2854
|
+
function ei(e) {
|
|
2805
2855
|
e === void 0 && (e = []);
|
|
2806
2856
|
const t = e, n = y.useCallback((i) => st(i, e, "reference"), t), r = y.useCallback((i) => st(i, e, "floating"), t), o = y.useCallback(
|
|
2807
2857
|
(i) => st(i, e, "item"),
|
|
@@ -2817,8 +2867,8 @@ function Qo(e) {
|
|
|
2817
2867
|
getItemProps: o
|
|
2818
2868
|
}), [n, r, o]);
|
|
2819
2869
|
}
|
|
2820
|
-
const
|
|
2821
|
-
function
|
|
2870
|
+
const ti = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
|
|
2871
|
+
function ni(e, t) {
|
|
2822
2872
|
var n;
|
|
2823
2873
|
t === void 0 && (t = {});
|
|
2824
2874
|
const {
|
|
@@ -2827,7 +2877,7 @@ function ti(e, t) {
|
|
|
2827
2877
|
} = e, {
|
|
2828
2878
|
enabled: i = !0,
|
|
2829
2879
|
role: s = "dialog"
|
|
2830
|
-
} = t, l = (n =
|
|
2880
|
+
} = t, l = (n = ti.get(s)) != null ? n : s, a = vt(), m = xt() != null;
|
|
2831
2881
|
return y.useMemo(() => {
|
|
2832
2882
|
if (!i)
|
|
2833
2883
|
return {};
|
|
@@ -2899,11 +2949,11 @@ function ti(e, t) {
|
|
|
2899
2949
|
};
|
|
2900
2950
|
}, [i, s, l, r, o, a, m]);
|
|
2901
2951
|
}
|
|
2902
|
-
const
|
|
2952
|
+
const Ut = (e) => e.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (t, n) => (n ? "-" : "") + t.toLowerCase());
|
|
2903
2953
|
function $e(e, t) {
|
|
2904
2954
|
return typeof e == "function" ? e(t) : e;
|
|
2905
2955
|
}
|
|
2906
|
-
function
|
|
2956
|
+
function ri(e, t) {
|
|
2907
2957
|
const [n, r] = y.useState(e);
|
|
2908
2958
|
return e && !n && r(!0), y.useEffect(() => {
|
|
2909
2959
|
if (!e) {
|
|
@@ -2912,7 +2962,7 @@ function ni(e, t) {
|
|
|
2912
2962
|
}
|
|
2913
2963
|
}, [e, t]), n;
|
|
2914
2964
|
}
|
|
2915
|
-
function
|
|
2965
|
+
function oi(e, t) {
|
|
2916
2966
|
t === void 0 && (t = {});
|
|
2917
2967
|
const {
|
|
2918
2968
|
open: n,
|
|
@@ -2921,10 +2971,10 @@ function ri(e, t) {
|
|
|
2921
2971
|
}
|
|
2922
2972
|
} = e, {
|
|
2923
2973
|
duration: o = 250
|
|
2924
|
-
} = t, s = (typeof o == "number" ? o : o.close) || 0, [l, a] = y.useState(!1), [c, m] = y.useState("unmounted"), d =
|
|
2925
|
-
return
|
|
2974
|
+
} = t, s = (typeof o == "number" ? o : o.close) || 0, [l, a] = y.useState(!1), [c, m] = y.useState("unmounted"), d = ri(n, s);
|
|
2975
|
+
return Q(() => {
|
|
2926
2976
|
l && !d && m("unmounted");
|
|
2927
|
-
}, [l, d]),
|
|
2977
|
+
}, [l, d]), Q(() => {
|
|
2928
2978
|
if (r) {
|
|
2929
2979
|
if (n) {
|
|
2930
2980
|
m("initial");
|
|
@@ -2942,7 +2992,7 @@ function ri(e, t) {
|
|
|
2942
2992
|
status: c
|
|
2943
2993
|
};
|
|
2944
2994
|
}
|
|
2945
|
-
function
|
|
2995
|
+
function ii(e, t) {
|
|
2946
2996
|
t === void 0 && (t = {});
|
|
2947
2997
|
const {
|
|
2948
2998
|
initial: n = {
|
|
@@ -2960,36 +3010,36 @@ function oi(e, t) {
|
|
|
2960
3010
|
...$e(n, c)
|
|
2961
3011
|
})), {
|
|
2962
3012
|
isMounted: p,
|
|
2963
|
-
status:
|
|
2964
|
-
} =
|
|
3013
|
+
status: w
|
|
3014
|
+
} = oi(e, {
|
|
2965
3015
|
duration: s
|
|
2966
3016
|
}), h = Ce(n), x = Ce(r), P = Ce(o), S = Ce(i);
|
|
2967
|
-
return
|
|
2968
|
-
const
|
|
2969
|
-
if (
|
|
2970
|
-
transitionProperty:
|
|
3017
|
+
return Q(() => {
|
|
3018
|
+
const k = $e(h.current, c), C = $e(P.current, c), A = $e(S.current, c), T = $e(x.current, c) || Object.keys(k).reduce((B, D) => (B[D] = "", B), {});
|
|
3019
|
+
if (w === "initial" && g((B) => ({
|
|
3020
|
+
transitionProperty: B.transitionProperty,
|
|
2971
3021
|
...A,
|
|
2972
|
-
...
|
|
2973
|
-
})),
|
|
2974
|
-
transitionProperty: Object.keys(
|
|
3022
|
+
...k
|
|
3023
|
+
})), w === "open" && g({
|
|
3024
|
+
transitionProperty: Object.keys(T).map(Ut).join(","),
|
|
2975
3025
|
transitionDuration: d + "ms",
|
|
2976
3026
|
...A,
|
|
2977
|
-
...
|
|
2978
|
-
}),
|
|
2979
|
-
const
|
|
3027
|
+
...T
|
|
3028
|
+
}), w === "close") {
|
|
3029
|
+
const B = C || k;
|
|
2980
3030
|
g({
|
|
2981
|
-
transitionProperty: Object.keys(
|
|
3031
|
+
transitionProperty: Object.keys(B).map(Ut).join(","),
|
|
2982
3032
|
transitionDuration: f + "ms",
|
|
2983
3033
|
...A,
|
|
2984
|
-
...
|
|
3034
|
+
...B
|
|
2985
3035
|
});
|
|
2986
3036
|
}
|
|
2987
|
-
}, [f, P, h, x, S, d,
|
|
3037
|
+
}, [f, P, h, x, S, d, w, c]), {
|
|
2988
3038
|
isMounted: p,
|
|
2989
3039
|
styles: u
|
|
2990
3040
|
};
|
|
2991
3041
|
}
|
|
2992
|
-
function
|
|
3042
|
+
function qt(e, t) {
|
|
2993
3043
|
const [n, r] = e;
|
|
2994
3044
|
let o = !1;
|
|
2995
3045
|
const i = t.length;
|
|
@@ -2999,10 +3049,10 @@ function Ut(e, t) {
|
|
|
2999
3049
|
}
|
|
3000
3050
|
return o;
|
|
3001
3051
|
}
|
|
3002
|
-
function
|
|
3052
|
+
function si(e, t) {
|
|
3003
3053
|
return e[0] >= t.x && e[0] <= t.x + t.width && e[1] >= t.y && e[1] <= t.y + t.height;
|
|
3004
3054
|
}
|
|
3005
|
-
function
|
|
3055
|
+
function li(e) {
|
|
3006
3056
|
e === void 0 && (e = {});
|
|
3007
3057
|
const {
|
|
3008
3058
|
buffer: t = 0.5,
|
|
@@ -3014,7 +3064,7 @@ function si(e) {
|
|
|
3014
3064
|
const u = performance.now(), g = u - a;
|
|
3015
3065
|
if (s === null || l === null || g === 0)
|
|
3016
3066
|
return s = d, l = f, a = u, null;
|
|
3017
|
-
const p = d - s,
|
|
3067
|
+
const p = d - s, w = f - l, x = Math.sqrt(p * p + w * w) / g;
|
|
3018
3068
|
return s = d, l = f, a = u, x;
|
|
3019
3069
|
}
|
|
3020
3070
|
const m = (d) => {
|
|
@@ -3023,80 +3073,80 @@ function si(e) {
|
|
|
3023
3073
|
y: u,
|
|
3024
3074
|
placement: g,
|
|
3025
3075
|
elements: p,
|
|
3026
|
-
onClose:
|
|
3076
|
+
onClose: w,
|
|
3027
3077
|
nodeId: h,
|
|
3028
3078
|
tree: x
|
|
3029
3079
|
} = d;
|
|
3030
3080
|
return function(S) {
|
|
3031
|
-
function
|
|
3032
|
-
clearTimeout(o),
|
|
3081
|
+
function k() {
|
|
3082
|
+
clearTimeout(o), w();
|
|
3033
3083
|
}
|
|
3034
3084
|
if (clearTimeout(o), !p.domReference || !p.floating || g == null || f == null || u == null)
|
|
3035
3085
|
return;
|
|
3036
3086
|
const {
|
|
3037
|
-
clientX:
|
|
3087
|
+
clientX: C,
|
|
3038
3088
|
clientY: A
|
|
3039
|
-
} = S,
|
|
3040
|
-
if (
|
|
3089
|
+
} = S, T = [C, A], B = Se(S), D = S.type === "mouseleave", L = pe(p.floating, B), M = pe(p.domReference, B), O = p.domReference.getBoundingClientRect(), b = p.floating.getBoundingClientRect(), v = g.split("-")[0], I = f > b.right - b.width / 2, R = u > b.bottom - b.height / 2, $ = si(T, O), F = b.width > O.width, K = b.height > O.height, G = (F ? O : b).left, ye = (F ? O : b).right, le = (K ? O : b).top, H = (K ? O : b).bottom;
|
|
3090
|
+
if (L && (i = !0, !D))
|
|
3041
3091
|
return;
|
|
3042
3092
|
if (M && (i = !1), M && !D) {
|
|
3043
3093
|
i = !0;
|
|
3044
3094
|
return;
|
|
3045
3095
|
}
|
|
3046
|
-
if (D &&
|
|
3096
|
+
if (D && N(S.relatedTarget) && pe(p.floating, S.relatedTarget) || x && Ve(x.nodesRef.current, h).some((ce) => {
|
|
3047
3097
|
let {
|
|
3048
3098
|
context: j
|
|
3049
|
-
} =
|
|
3099
|
+
} = ce;
|
|
3050
3100
|
return j == null ? void 0 : j.open;
|
|
3051
3101
|
}))
|
|
3052
3102
|
return;
|
|
3053
|
-
if (v === "top" && u >=
|
|
3054
|
-
return
|
|
3103
|
+
if (v === "top" && u >= O.bottom - 1 || v === "bottom" && u <= O.top + 1 || v === "left" && f >= O.right - 1 || v === "right" && f <= O.left + 1)
|
|
3104
|
+
return k();
|
|
3055
3105
|
let X = [];
|
|
3056
3106
|
switch (v) {
|
|
3057
3107
|
case "top":
|
|
3058
|
-
X = [[G,
|
|
3108
|
+
X = [[G, O.top + 1], [G, b.bottom - 1], [ye, b.bottom - 1], [ye, O.top + 1]];
|
|
3059
3109
|
break;
|
|
3060
3110
|
case "bottom":
|
|
3061
|
-
X = [[G, b.top + 1], [G,
|
|
3111
|
+
X = [[G, b.top + 1], [G, O.bottom - 1], [ye, O.bottom - 1], [ye, b.top + 1]];
|
|
3062
3112
|
break;
|
|
3063
3113
|
case "left":
|
|
3064
|
-
X = [[b.right - 1, H], [b.right - 1,
|
|
3114
|
+
X = [[b.right - 1, H], [b.right - 1, le], [O.left + 1, le], [O.left + 1, H]];
|
|
3065
3115
|
break;
|
|
3066
3116
|
case "right":
|
|
3067
|
-
X = [[
|
|
3117
|
+
X = [[O.right - 1, H], [O.right - 1, le], [b.left + 1, le], [b.left + 1, H]];
|
|
3068
3118
|
break;
|
|
3069
3119
|
}
|
|
3070
|
-
function
|
|
3071
|
-
let [j, _] =
|
|
3120
|
+
function ae(ce) {
|
|
3121
|
+
let [j, _] = ce;
|
|
3072
3122
|
switch (v) {
|
|
3073
3123
|
case "top": {
|
|
3074
|
-
const
|
|
3075
|
-
return [
|
|
3124
|
+
const ue = [F ? j + t / 2 : I ? j + t * 4 : j - t * 4, _ + t + 1], de = [F ? j - t / 2 : I ? j + t * 4 : j - t * 4, _ + t + 1], ve = [[b.left, I || F ? b.bottom - t : b.top], [b.right, I ? F ? b.bottom - t : b.top : b.bottom - t]];
|
|
3125
|
+
return [ue, de, ...ve];
|
|
3076
3126
|
}
|
|
3077
3127
|
case "bottom": {
|
|
3078
|
-
const
|
|
3079
|
-
return [
|
|
3128
|
+
const ue = [F ? j + t / 2 : I ? j + t * 4 : j - t * 4, _ - t], de = [F ? j - t / 2 : I ? j + t * 4 : j - t * 4, _ - t], ve = [[b.left, I || F ? b.top + t : b.bottom], [b.right, I ? F ? b.top + t : b.bottom : b.top + t]];
|
|
3129
|
+
return [ue, de, ...ve];
|
|
3080
3130
|
}
|
|
3081
3131
|
case "left": {
|
|
3082
|
-
const
|
|
3083
|
-
return [...[[R || K ? b.right - t : b.left, b.top], [R ? K ? b.right - t : b.left : b.right - t, b.bottom]],
|
|
3132
|
+
const ue = [j + t + 1, K ? _ + t / 2 : R ? _ + t * 4 : _ - t * 4], de = [j + t + 1, K ? _ - t / 2 : R ? _ + t * 4 : _ - t * 4];
|
|
3133
|
+
return [...[[R || K ? b.right - t : b.left, b.top], [R ? K ? b.right - t : b.left : b.right - t, b.bottom]], ue, de];
|
|
3084
3134
|
}
|
|
3085
3135
|
case "right": {
|
|
3086
|
-
const
|
|
3087
|
-
return [
|
|
3136
|
+
const ue = [j - t, K ? _ + t / 2 : R ? _ + t * 4 : _ - t * 4], de = [j - t, K ? _ - t / 2 : R ? _ + t * 4 : _ - t * 4], ve = [[R || K ? b.left + t : b.right, b.top], [R ? K ? b.left + t : b.right : b.left + t, b.bottom]];
|
|
3137
|
+
return [ue, de, ...ve];
|
|
3088
3138
|
}
|
|
3089
3139
|
}
|
|
3090
3140
|
}
|
|
3091
|
-
if (!
|
|
3092
|
-
if (i &&
|
|
3093
|
-
return
|
|
3141
|
+
if (!qt([C, A], X)) {
|
|
3142
|
+
if (i && !$)
|
|
3143
|
+
return k();
|
|
3094
3144
|
if (!D && r) {
|
|
3095
|
-
const
|
|
3096
|
-
if (
|
|
3097
|
-
return
|
|
3145
|
+
const ce = c(S.clientX, S.clientY);
|
|
3146
|
+
if (ce !== null && ce < 0.1)
|
|
3147
|
+
return k();
|
|
3098
3148
|
}
|
|
3099
|
-
|
|
3149
|
+
qt([C, A], ae([f, u])) ? !i && r && (o = window.setTimeout(k, 40)) : k();
|
|
3100
3150
|
}
|
|
3101
3151
|
};
|
|
3102
3152
|
};
|
|
@@ -3104,9 +3154,9 @@ function si(e) {
|
|
|
3104
3154
|
blockPointerEvents: n
|
|
3105
3155
|
}, m;
|
|
3106
3156
|
}
|
|
3107
|
-
const
|
|
3157
|
+
const ai = V("div"), $t = kn(
|
|
3108
3158
|
{}
|
|
3109
|
-
),
|
|
3159
|
+
), vi = ({
|
|
3110
3160
|
children: e,
|
|
3111
3161
|
offset: t,
|
|
3112
3162
|
open: n,
|
|
@@ -3116,13 +3166,13 @@ const li = V("div"), wt = kn(
|
|
|
3116
3166
|
placement: s = "bottom",
|
|
3117
3167
|
role: l = "dialog"
|
|
3118
3168
|
}) => {
|
|
3119
|
-
const { refs: a, floatingStyles: c, context: m } =
|
|
3169
|
+
const { refs: a, floatingStyles: c, context: m } = Qo({
|
|
3120
3170
|
open: n,
|
|
3121
3171
|
onOpenChange: r,
|
|
3122
3172
|
placement: s,
|
|
3123
|
-
whileElementsMounted:
|
|
3124
|
-
middleware: [Vr(t),
|
|
3125
|
-
}), { isMounted: d, styles: f } =
|
|
3173
|
+
whileElementsMounted: ao,
|
|
3174
|
+
middleware: [Vr(t), uo(), co()]
|
|
3175
|
+
}), { isMounted: d, styles: f } = ii(m, {
|
|
3126
3176
|
initial: ({ side: S }) => ({
|
|
3127
3177
|
opacity: 0,
|
|
3128
3178
|
transform: {
|
|
@@ -3132,15 +3182,15 @@ const li = V("div"), wt = kn(
|
|
|
3132
3182
|
left: "translateX(-0.5rem)"
|
|
3133
3183
|
}[S]
|
|
3134
3184
|
})
|
|
3135
|
-
}), u =
|
|
3185
|
+
}), u = Uo(m, { enabled: o === "click" }), g = zo(m, {
|
|
3136
3186
|
enabled: o === "hover",
|
|
3137
3187
|
delay: i,
|
|
3138
|
-
handleClose:
|
|
3139
|
-
}), p =
|
|
3188
|
+
handleClose: li()
|
|
3189
|
+
}), p = Jo(m), w = ni(m, { role: l }), { getFloatingProps: h, getReferenceProps: x } = ei([
|
|
3140
3190
|
u,
|
|
3141
3191
|
g,
|
|
3142
3192
|
p,
|
|
3143
|
-
|
|
3193
|
+
w
|
|
3144
3194
|
]), P = Tn(
|
|
3145
3195
|
() => ({
|
|
3146
3196
|
getFloatingProps: h,
|
|
@@ -3159,23 +3209,23 @@ const li = V("div"), wt = kn(
|
|
|
3159
3209
|
f
|
|
3160
3210
|
]
|
|
3161
3211
|
);
|
|
3162
|
-
return /* @__PURE__ */ z(
|
|
3163
|
-
},
|
|
3164
|
-
const { getReferenceProps: t, refs: n } =
|
|
3212
|
+
return /* @__PURE__ */ z($t.Provider, { value: P, children: e });
|
|
3213
|
+
}, xi = ({ children: e }) => {
|
|
3214
|
+
const { getReferenceProps: t, refs: n } = Qt($t);
|
|
3165
3215
|
return /* @__PURE__ */ z(En, { children: In(e) && Pn(e, {
|
|
3166
3216
|
ref: n.setReference,
|
|
3167
3217
|
...t()
|
|
3168
3218
|
}) });
|
|
3169
|
-
},
|
|
3219
|
+
}, wi = ({ children: e, overlayCardProps: t }) => {
|
|
3170
3220
|
const {
|
|
3171
3221
|
getFloatingProps: n,
|
|
3172
3222
|
isMounted: r,
|
|
3173
3223
|
refs: o,
|
|
3174
3224
|
floatingStyles: i,
|
|
3175
3225
|
transitionStyles: s
|
|
3176
|
-
} =
|
|
3177
|
-
return r ? /* @__PURE__ */ z(
|
|
3178
|
-
|
|
3226
|
+
} = Qt($t);
|
|
3227
|
+
return r ? /* @__PURE__ */ z(Xo, { children: /* @__PURE__ */ z(
|
|
3228
|
+
ai,
|
|
3179
3229
|
{
|
|
3180
3230
|
ref: o.setFloating,
|
|
3181
3231
|
style: i,
|
|
@@ -3183,10 +3233,10 @@ const li = V("div"), wt = kn(
|
|
|
3183
3233
|
css: {
|
|
3184
3234
|
zIndex: "$overlayCard"
|
|
3185
3235
|
},
|
|
3186
|
-
children: /* @__PURE__ */ z(
|
|
3236
|
+
children: /* @__PURE__ */ z(tn, { ...t, style: s, children: e })
|
|
3187
3237
|
}
|
|
3188
3238
|
) }) : null;
|
|
3189
|
-
},
|
|
3239
|
+
}, $i = V("span", {
|
|
3190
3240
|
flex: "0 0 auto",
|
|
3191
3241
|
display: "inline-flex",
|
|
3192
3242
|
padding: "$1 $2",
|
|
@@ -3223,23 +3273,23 @@ const li = V("div"), wt = kn(
|
|
|
3223
3273
|
defaultVariants: {
|
|
3224
3274
|
color: "primary"
|
|
3225
3275
|
}
|
|
3226
|
-
}),
|
|
3276
|
+
}), Si = V(Le.Root, {
|
|
3227
3277
|
backgroundColor: "$gray50",
|
|
3228
3278
|
display: "flex",
|
|
3229
3279
|
alignItems: "center",
|
|
3230
3280
|
padding: "$1",
|
|
3231
3281
|
gap: "$1"
|
|
3232
|
-
}),
|
|
3282
|
+
}), Ri = V(Le.ToggleGroup, {
|
|
3233
3283
|
display: "flex",
|
|
3234
3284
|
gap: "$1",
|
|
3235
3285
|
alignItems: "center"
|
|
3236
|
-
}),
|
|
3286
|
+
}), Ei = V(Le.Separator, {
|
|
3237
3287
|
width: "1px",
|
|
3238
3288
|
height: "1.5rem",
|
|
3239
3289
|
my: "$1",
|
|
3240
3290
|
mx: "$1",
|
|
3241
3291
|
backgroundColor: "$border"
|
|
3242
|
-
}), Rn =
|
|
3292
|
+
}), Rn = Pe(({ css: e, ...t }, n) => /* @__PURE__ */ z(
|
|
3243
3293
|
hr,
|
|
3244
3294
|
{
|
|
3245
3295
|
ref: n,
|
|
@@ -3254,13 +3304,13 @@ const li = V("div"), wt = kn(
|
|
|
3254
3304
|
},
|
|
3255
3305
|
...t
|
|
3256
3306
|
}
|
|
3257
|
-
)),
|
|
3307
|
+
)), Ci = Pe(
|
|
3258
3308
|
({ children: e, dropdown: t, ...n }, r) => /* @__PURE__ */ z(
|
|
3259
|
-
|
|
3309
|
+
Le.Button,
|
|
3260
3310
|
{
|
|
3261
3311
|
asChild: !0,
|
|
3262
3312
|
ref: r,
|
|
3263
|
-
children: /* @__PURE__ */
|
|
3313
|
+
children: /* @__PURE__ */ Ze(
|
|
3264
3314
|
Rn,
|
|
3265
3315
|
{
|
|
3266
3316
|
variant: "transparent",
|
|
@@ -3274,12 +3324,12 @@ const li = V("div"), wt = kn(
|
|
|
3274
3324
|
)
|
|
3275
3325
|
}
|
|
3276
3326
|
)
|
|
3277
|
-
),
|
|
3327
|
+
), ki = Pe(({
|
|
3278
3328
|
children: e,
|
|
3279
3329
|
value: t,
|
|
3280
3330
|
...n
|
|
3281
3331
|
}, r) => /* @__PURE__ */ z(
|
|
3282
|
-
|
|
3332
|
+
Le.ToggleItem,
|
|
3283
3333
|
{
|
|
3284
3334
|
value: t,
|
|
3285
3335
|
asChild: !0,
|
|
@@ -3295,10 +3345,10 @@ const li = V("div"), wt = kn(
|
|
|
3295
3345
|
}
|
|
3296
3346
|
)
|
|
3297
3347
|
}
|
|
3298
|
-
)),
|
|
3348
|
+
)), ci = V(tn, {
|
|
3299
3349
|
minWidth: "max(var(--radix-popper-anchor-width), 12rem)",
|
|
3300
3350
|
padding: "$1"
|
|
3301
|
-
}),
|
|
3351
|
+
}), St = gt({
|
|
3302
3352
|
padding: "$2 $2 $2 1.5rem",
|
|
3303
3353
|
fontSize: "$sm",
|
|
3304
3354
|
lineHeight: "1.25",
|
|
@@ -3321,27 +3371,27 @@ const li = V("div"), wt = kn(
|
|
|
3321
3371
|
backgroundColor: "transparent"
|
|
3322
3372
|
}
|
|
3323
3373
|
}
|
|
3324
|
-
}),
|
|
3374
|
+
}), Ti = ({
|
|
3325
3375
|
side: e = "bottom",
|
|
3326
3376
|
align: t = "center",
|
|
3327
3377
|
trigger: n,
|
|
3328
3378
|
children: r,
|
|
3329
3379
|
sideOffset: o,
|
|
3330
3380
|
modal: i
|
|
3331
|
-
}) => /* @__PURE__ */
|
|
3332
|
-
/* @__PURE__ */ z(
|
|
3333
|
-
/* @__PURE__ */ z(
|
|
3334
|
-
|
|
3381
|
+
}) => /* @__PURE__ */ Ze(ee.Root, { modal: i, children: [
|
|
3382
|
+
/* @__PURE__ */ z(ee.Trigger, { asChild: !0, children: n }),
|
|
3383
|
+
/* @__PURE__ */ z(ee.Portal, { children: /* @__PURE__ */ z(
|
|
3384
|
+
ee.Content,
|
|
3335
3385
|
{
|
|
3336
3386
|
asChild: !0,
|
|
3337
3387
|
side: e,
|
|
3338
3388
|
align: t,
|
|
3339
3389
|
collisionPadding: 10,
|
|
3340
3390
|
sideOffset: o,
|
|
3341
|
-
children: /* @__PURE__ */ z(
|
|
3391
|
+
children: /* @__PURE__ */ z(ci, { children: r })
|
|
3342
3392
|
}
|
|
3343
3393
|
) })
|
|
3344
|
-
] }),
|
|
3394
|
+
] }), ui = V(ee.ItemIndicator, {
|
|
3345
3395
|
position: "absolute",
|
|
3346
3396
|
left: 0,
|
|
3347
3397
|
top: 0,
|
|
@@ -3350,55 +3400,64 @@ const li = V("div"), wt = kn(
|
|
|
3350
3400
|
display: "flex",
|
|
3351
3401
|
justifyContent: "center",
|
|
3352
3402
|
alignItems: "center"
|
|
3353
|
-
}),
|
|
3403
|
+
}), Ii = V(ee.Separator, {
|
|
3354
3404
|
height: 1,
|
|
3355
3405
|
backgroundColor: "$gray200",
|
|
3356
3406
|
margin: 1
|
|
3357
|
-
}),
|
|
3407
|
+
}), Pi = V(ee.Item, St), Ai = V(ee.Item, St, {
|
|
3358
3408
|
padding: "$2",
|
|
3359
3409
|
display: "flex",
|
|
3360
3410
|
alignItems: "center",
|
|
3361
3411
|
gap: "$2"
|
|
3362
|
-
}),
|
|
3412
|
+
}), di = V(ee.CheckboxItem, St), Bi = ({
|
|
3363
3413
|
value: e,
|
|
3364
3414
|
onChange: t,
|
|
3365
3415
|
children: n
|
|
3366
|
-
}) => /* @__PURE__ */
|
|
3367
|
-
|
|
3416
|
+
}) => /* @__PURE__ */ Ze(
|
|
3417
|
+
di,
|
|
3368
3418
|
{
|
|
3369
3419
|
checked: e,
|
|
3370
3420
|
onCheckedChange: t,
|
|
3371
3421
|
children: [
|
|
3372
|
-
/* @__PURE__ */ z(
|
|
3422
|
+
/* @__PURE__ */ z(ui, { children: /* @__PURE__ */ z(Dn, { size: "0.75rem" }) }),
|
|
3373
3423
|
n
|
|
3374
3424
|
]
|
|
3375
3425
|
}
|
|
3376
3426
|
);
|
|
3377
3427
|
export {
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3428
|
+
bi as A,
|
|
3429
|
+
ai as B,
|
|
3430
|
+
Ti as D,
|
|
3431
|
+
Xo as F,
|
|
3432
|
+
ci as M,
|
|
3433
|
+
tn as O,
|
|
3434
|
+
vi as P,
|
|
3384
3435
|
gr as S,
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3436
|
+
Ci as T,
|
|
3437
|
+
Ai as a,
|
|
3438
|
+
Ri as b,
|
|
3388
3439
|
gt as c,
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3440
|
+
ki as d,
|
|
3441
|
+
ao as e,
|
|
3442
|
+
yi as f,
|
|
3443
|
+
uo as g,
|
|
3444
|
+
co as h,
|
|
3445
|
+
ei as i,
|
|
3446
|
+
ni as j,
|
|
3447
|
+
Si as k,
|
|
3397
3448
|
Ei as l,
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3449
|
+
xi as m,
|
|
3450
|
+
wi as n,
|
|
3451
|
+
Vr as o,
|
|
3452
|
+
Be as p,
|
|
3453
|
+
hi as q,
|
|
3454
|
+
hr as r,
|
|
3455
|
+
V as s,
|
|
3456
|
+
$i as t,
|
|
3457
|
+
Qo as u,
|
|
3458
|
+
Rn as v,
|
|
3459
|
+
St as w,
|
|
3460
|
+
Ii as x,
|
|
3461
|
+
Pi as y,
|
|
3462
|
+
Bi as z
|
|
3404
3463
|
};
|