@arkitektbedriftene/fe-lib 0.3.16 → 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.
@@ -0,0 +1,3463 @@
1
+ import { jsx as z, jsxs as Ze, Fragment as En } from "react/jsx-runtime";
2
+ import * as y from "react";
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
+ import * as An from "react-dom";
5
+ import { createPortal as Bn } from "react-dom";
6
+ import * as Le from "@radix-ui/react-toolbar";
7
+ import { f as On, g as Dn } from "./index.esm-d078f232.js";
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
+ const e = /* @__PURE__ */ Object.create(null);
11
+ return (t, n, ...r) => {
12
+ const o = ((i) => JSON.stringify(i, Ln))(t);
13
+ return o in e ? e[o] : e[o] = n(t, ...r);
14
+ };
15
+ }, me = Symbol.for("sxs.internal"), mt = (e, t) => Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)), Rt = (e) => {
16
+ for (const t in e)
17
+ return !0;
18
+ return !1;
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
+ let i, s, l;
21
+ const a = (c, m, d) => {
22
+ let f, u;
23
+ const g = (p) => {
24
+ for (f in p) {
25
+ const x = f.charCodeAt(0) === 64, P = x && Array.isArray(p[f]) ? p[f] : [p[f]];
26
+ for (u of P) {
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
+ continue;
33
+ }
34
+ } else if (S in Et) {
35
+ const C = Et[S];
36
+ if (C !== l) {
37
+ l = C, g(C(u)), l = null;
38
+ continue;
39
+ }
40
+ }
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
+ } else
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
+ }
50
+ }
51
+ var w, h;
52
+ };
53
+ g(c), i !== void 0 && o(Ct(...i)), i = void 0;
54
+ };
55
+ a(e, t, n);
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
+ let n, r = "";
58
+ for (n = Math.abs(t); n > 52; n = n / 52 | 0)
59
+ r = kt(n % 52) + r;
60
+ return kt(n % 52) + r;
61
+ })(((t, n) => {
62
+ let r = n.length;
63
+ for (; r; )
64
+ t = 33 * t ^ n.charCodeAt(--r);
65
+ return t;
66
+ })(5381, JSON.stringify(e)) >>> 0), De = ["themed", "global", "styled", "onevar", "resonevar", "allvar", "inline"], Yn = (e) => {
67
+ if (e.href && !e.href.startsWith(location.origin))
68
+ return !1;
69
+ try {
70
+ return !!e.cssRules;
71
+ } catch {
72
+ return !1;
73
+ }
74
+ }, Kn = (e) => {
75
+ let t;
76
+ const n = () => {
77
+ const { cssRules: o } = t.sheet;
78
+ return [].map.call(o, (i, s) => {
79
+ const { cssText: l } = i;
80
+ let a = "";
81
+ if (l.startsWith("--sxs"))
82
+ return "";
83
+ if (o[s - 1] && (a = o[s - 1].cssText).startsWith("--sxs")) {
84
+ if (!i.cssRules.length)
85
+ return "";
86
+ for (const c in t.rules)
87
+ if (t.rules[c].group === i)
88
+ return `--sxs{--sxs:${[...t.rules[c].cache].join(" ")}}${l}`;
89
+ return i.cssRules.length ? `${a}${l}` : "";
90
+ }
91
+ return l;
92
+ }).join("");
93
+ }, r = () => {
94
+ if (t) {
95
+ const { rules: l, sheet: a } = t;
96
+ if (!a.deleteRule) {
97
+ for (; Object(Object(a.cssRules)[0]).type === 3; )
98
+ a.cssRules.splice(0, 1);
99
+ a.cssRules = [];
100
+ }
101
+ for (const c in l)
102
+ delete l[c];
103
+ }
104
+ const o = Object(e).styleSheets || [];
105
+ for (const l of o)
106
+ if (Yn(l)) {
107
+ for (let a = 0, c = l.cssRules; c[a]; ++a) {
108
+ const m = Object(c[a]);
109
+ if (m.type !== 1)
110
+ continue;
111
+ const d = Object(c[a + 1]);
112
+ if (d.type !== 4)
113
+ continue;
114
+ ++a;
115
+ const { cssText: f } = m;
116
+ if (!f.startsWith("--sxs"))
117
+ continue;
118
+ const u = f.slice(14, -3).trim().split(/\s+/), g = De[u[0]];
119
+ g && (t || (t = { sheet: l, reset: r, rules: {}, toString: n }), t.rules[g] = { group: d, index: a, cache: new Set(u) });
120
+ }
121
+ if (t)
122
+ break;
123
+ }
124
+ if (!t) {
125
+ const l = (a, c) => ({ type: c, cssRules: [], insertRule(m, d) {
126
+ this.cssRules.splice(d, 0, l(m, { import: 3, undefined: 1 }[(m.toLowerCase().match(/^@([a-z]+)/) || [])[1]] || 4));
127
+ }, get cssText() {
128
+ return a === "@media{}" ? `@media{${[].map.call(this.cssRules, (m) => m.cssText).join("")}}` : a;
129
+ } });
130
+ t = { sheet: e ? (e.head || e).appendChild(document.createElement("style")).sheet : l("", "text/css"), rules: {}, reset: r, toString: n };
131
+ }
132
+ const { sheet: i, rules: s } = t;
133
+ for (let l = De.length - 1; l >= 0; --l) {
134
+ const a = De[l];
135
+ if (!s[a]) {
136
+ const c = De[l + 1], m = s[c] ? s[c].index : i.cssRules.length;
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
+ }
139
+ Xn(s[a]);
140
+ }
141
+ };
142
+ return r(), t;
143
+ }, Xn = (e) => {
144
+ const t = e.group;
145
+ let n = t.cssRules.length;
146
+ e.apply = (r) => {
147
+ try {
148
+ t.insertRule(r, n), ++n;
149
+ } catch {
150
+ }
151
+ };
152
+ }, Oe = Symbol(), Gn = Ae(), Tt = (e, t) => Gn(e, () => (...n) => {
153
+ let r = { type: null, composers: /* @__PURE__ */ new Set() };
154
+ for (const o of n)
155
+ if (o != null)
156
+ if (o[me]) {
157
+ r.type == null && (r.type = o[me].type);
158
+ for (const i of o[me].composers)
159
+ r.composers.add(i);
160
+ } else
161
+ o.constructor !== Object || o.$$typeof ? r.type == null && (r.type = o) : r.composers.add(Un(o, e));
162
+ return r.type == null && (r.type = "span"), r.composers.size || r.composers.add(["PJLV", {}, [], [], {}, []]), qn(e, r, t);
163
+ }), Un = ({ variants: e, compoundVariants: t, defaultVariants: n, ...r }, o) => {
164
+ const i = `${te(o.prefix)}c-${ge(r)}`, s = [], l = [], a = /* @__PURE__ */ Object.create(null), c = [];
165
+ for (const f in n)
166
+ a[f] = String(n[f]);
167
+ if (typeof e == "object" && e)
168
+ for (const f in e) {
169
+ m = a, d = f, Fn.call(m, d) || (a[f] = "undefined");
170
+ const u = e[f];
171
+ for (const g in u) {
172
+ const p = { [f]: String(g) };
173
+ String(g) === "undefined" && c.push(f);
174
+ const w = u[g], h = [p, w, !Rt(w)];
175
+ s.push(h);
176
+ }
177
+ }
178
+ var m, d;
179
+ if (typeof t == "object" && t)
180
+ for (const f of t) {
181
+ let { css: u, ...g } = f;
182
+ u = typeof u == "object" && u || {};
183
+ for (const w in g)
184
+ g[w] = String(g[w]);
185
+ const p = [g, u, !Rt(u)];
186
+ l.push(p);
187
+ }
188
+ return [i, r, s, l, a, c];
189
+ }, qn = (e, t, n) => {
190
+ const [r, o, i, s] = Zn(t.composers), l = typeof t.type == "function" || t.type.$$typeof ? ((d) => {
191
+ function f() {
192
+ for (let u = 0; u < f[Oe].length; u++) {
193
+ const [g, p] = f[Oe][u];
194
+ d.rules[g].apply(p);
195
+ }
196
+ return f[Oe] = [], null;
197
+ }
198
+ return f[Oe] = [], f.rules = {}, De.forEach((u) => f.rules[u] = { apply: (g) => f[Oe].push([u, g]) }), f;
199
+ })(n) : null, a = (l || n).rules, c = `.${r}${o.length > 1 ? `:where(.${o.slice(1).join(".")})` : ""}`, m = (d) => {
200
+ d = typeof d == "object" && d || Jn;
201
+ const { css: f, ...u } = d, g = {};
202
+ for (const h in i)
203
+ if (delete u[h], h in d) {
204
+ let x = d[h];
205
+ typeof x == "object" && x ? g[h] = { "@initial": i[h], ...x } : (x = String(x), g[h] = x !== "undefined" || s.has(h) ? x : i[h]);
206
+ } else
207
+ g[h] = i[h];
208
+ const p = /* @__PURE__ */ new Set([...o]);
209
+ for (const [h, x, P, S] of t.composers) {
210
+ n.rules.styled.cache.has(h) || (n.rules.styled.cache.add(h), Ee(x, [`.${h}`], [], e, (A) => {
211
+ a.styled.apply(A);
212
+ }));
213
+ const k = It(P, g, e.media), C = It(S, g, e.media, !0);
214
+ for (const A of k)
215
+ if (A !== void 0)
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
+ }));
223
+ }
224
+ for (const A of C)
225
+ if (A !== void 0)
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
+ }));
231
+ }
232
+ }
233
+ if (typeof f == "object" && f) {
234
+ const h = `${r}-i${ge(f)}-css`;
235
+ p.add(h), n.rules.inline.cache.has(h) || (n.rules.inline.cache.add(h), Ee(f, [`.${h}`], [], e, (x) => {
236
+ a.inline.apply(x);
237
+ }));
238
+ }
239
+ for (const h of String(d.className || "").trim().split(/\s+/))
240
+ h && p.add(h);
241
+ const w = u.className = [...p].join(" ");
242
+ return { type: t.type, className: w, selector: c, props: u, toString: () => w, deferredInjector: l };
243
+ };
244
+ return mt(m, { className: r, selector: c, [me]: t, toString: () => (n.rules.styled.cache.has(r) || m(), r) });
245
+ }, Zn = (e) => {
246
+ let t = "";
247
+ const n = [], r = {}, o = [];
248
+ for (const [i, , , , s, l] of e) {
249
+ t === "" && (t = i), n.push(i), o.push(...l);
250
+ for (const a in s) {
251
+ const c = s[a];
252
+ (r[a] === void 0 || c !== "undefined" || l.includes(c)) && (r[a] = c);
253
+ }
254
+ }
255
+ return [t, n, r, new Set(o)];
256
+ }, It = (e, t, n, r) => {
257
+ const o = [];
258
+ e:
259
+ for (let [i, s, l] of e) {
260
+ if (l)
261
+ continue;
262
+ let a, c = 0, m = !1;
263
+ for (a in i) {
264
+ const d = i[a];
265
+ let f = t[a];
266
+ if (f !== d) {
267
+ if (typeof f != "object" || !f)
268
+ continue e;
269
+ {
270
+ let u, g, p = 0;
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
+ }
277
+ c += p, u = !0;
278
+ }
279
+ ++p;
280
+ }
281
+ if (g && g.length && (s = { ["@media " + g.join(", ")]: s }), !u)
282
+ continue e;
283
+ }
284
+ }
285
+ }
286
+ (o[c] = o[c] || []).push([r ? "cv" : `${a}-${i[a]}`, s, m]);
287
+ }
288
+ return o;
289
+ }, Jn = {}, Qn = Ae(), er = (e, t) => Qn(e, () => (...n) => {
290
+ const r = () => {
291
+ for (let o of n) {
292
+ o = typeof o == "object" && o || {};
293
+ let i = ge(o);
294
+ if (!t.rules.global.cache.has(i)) {
295
+ if (t.rules.global.cache.add(i), "@import" in o) {
296
+ let s = [].indexOf.call(t.sheet.cssRules, t.rules.themed.group) - 1;
297
+ for (let l of [].concat(o["@import"]))
298
+ l = l.includes('"') || l.includes("'") ? l : `"${l}"`, t.sheet.insertRule(`@import ${l};`, s++);
299
+ delete o["@import"];
300
+ }
301
+ Ee(o, [], [], e, (s) => {
302
+ t.rules.global.apply(s);
303
+ });
304
+ }
305
+ }
306
+ return "";
307
+ };
308
+ return mt(r, { toString: r });
309
+ }), tr = Ae(), nr = (e, t) => tr(e, () => (n) => {
310
+ const r = `${te(e.prefix)}k-${ge(n)}`, o = () => {
311
+ if (!t.rules.global.cache.has(r)) {
312
+ t.rules.global.cache.add(r);
313
+ const i = [];
314
+ Ee(n, [], [], e, (l) => i.push(l));
315
+ const s = `@keyframes ${r}{${i.join("")}}`;
316
+ t.rules.global.apply(s);
317
+ }
318
+ return r;
319
+ };
320
+ return mt(o, { get name() {
321
+ return o();
322
+ }, toString: o });
323
+ }), rr = class {
324
+ constructor(e, t, n, r) {
325
+ this.token = e == null ? "" : String(e), this.value = t == null ? "" : String(t), this.scale = n == null ? "" : String(n), this.prefix = r == null ? "" : String(r);
326
+ }
327
+ get computedValue() {
328
+ return "var(" + this.variable + ")";
329
+ }
330
+ get variable() {
331
+ return "--" + te(this.prefix) + te(this.scale) + this.token;
332
+ }
333
+ toString() {
334
+ return this.computedValue;
335
+ }
336
+ }, or = Ae(), ir = (e, t) => or(e, () => (n, r) => {
337
+ r = typeof n == "object" && n || Object(r);
338
+ const o = `.${n = (n = typeof n == "string" ? n : "") || `${te(e.prefix)}t-${ge(r)}`}`, i = {}, s = [];
339
+ for (const a in r) {
340
+ i[a] = {};
341
+ for (const c in r[a]) {
342
+ const m = `--${te(e.prefix)}${a}-${c}`, d = en(String(r[a][c]), e.prefix, a);
343
+ i[a][c] = new rr(c, d, a, e.prefix), s.push(`${m}:${d}`);
344
+ }
345
+ }
346
+ const l = () => {
347
+ if (s.length && !t.rules.themed.cache.has(n)) {
348
+ t.rules.themed.cache.add(n);
349
+ const a = `${r === e.theme ? ":root," : ""}.${n}{${s.join(";")}}`;
350
+ t.rules.themed.apply(a);
351
+ }
352
+ return n;
353
+ };
354
+ return { ...i, get className() {
355
+ return l();
356
+ }, selector: o, toString: l };
357
+ }), sr = Ae(), lr = Ae(), ar = (e) => {
358
+ const t = ((n) => {
359
+ let r = !1;
360
+ const o = sr(n, (i) => {
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: Tt(m, d), globalCss: er(m, d), keyframes: nr(m, d), createTheme: ir(m, d), reset() {
363
+ d.reset(), f.theme.toString();
364
+ }, theme: {}, sheet: d, config: m, prefix: s, getCssText: d.toString, toString: d.toString };
365
+ return String(f.theme = f.createTheme(c)), f;
366
+ });
367
+ return r || o.reset(), o;
368
+ })(e);
369
+ return t.styled = (({ config: n, sheet: r }) => lr(n, () => {
370
+ const o = Tt(n, r);
371
+ return (...i) => {
372
+ const s = o(...i), l = s[me].type, a = xe.forwardRef((c, m) => {
373
+ const d = c && c.as || l, { props: f, deferredInjector: u } = s(c);
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
+ });
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
+ };
378
+ }))(t), t;
379
+ };
380
+ let Pt = 9999;
381
+ const tt = () => (Pt--, Pt), { styled: V, css: gt, keyframes: Be, globalCss: hi } = ar({
382
+ theme: {
383
+ colors: {
384
+ gray50: "#F9FAFA",
385
+ gray100: "#EBEEEE",
386
+ gray200: "#CFD6D7",
387
+ gray300: "#B3BEC0",
388
+ gray400: "#97A6A8",
389
+ gray500: "#7C8E91",
390
+ gray600: "#627578",
391
+ gray700: "#4F5F61",
392
+ gray800: "#414D4F",
393
+ gray900: "#2C3435",
394
+ blue50: "#F7FBFB",
395
+ blue100: "#E3F0F2",
396
+ blue200: "#BADADF",
397
+ blue300: "#92C5CC",
398
+ blue400: "#67AEB8",
399
+ blue500: "#3C97A3",
400
+ blue600: "#1F7D8A",
401
+ blue700: "#19656F",
402
+ blue800: "#14525B",
403
+ blue900: "#0E383E",
404
+ yellow50: "#FDFAEF",
405
+ yellow100: "#F9EDCA",
406
+ yellow200: "#EFD27A",
407
+ yellow300: "#E5B626",
408
+ yellow400: "#C89E1C",
409
+ yellow500: "#AA8618",
410
+ yellow600: "#8C6E14",
411
+ yellow700: "#715910",
412
+ yellow800: "#5C490D",
413
+ yellow900: "#3E3109",
414
+ orange500: "#D1721C",
415
+ red50: "#FDF9F9",
416
+ red100: "#F7EBEB",
417
+ red200: "#EBCECD",
418
+ red300: "#DFB1B0",
419
+ red400: "#D39392",
420
+ red500: "#C67473",
421
+ red600: "#B85250",
422
+ red700: "#A92F2D",
423
+ red800: "#901F1E",
424
+ red900: "#631614",
425
+ green50: "#F8FAF9",
426
+ green100: "#E7F0EA",
427
+ green200: "#C5D9CB",
428
+ green300: "#A4C4AD",
429
+ green400: "#82AD8D",
430
+ green500: "#60976F",
431
+ green600: "#3C7F4E",
432
+ green700: "#296839",
433
+ green800: "#21552F",
434
+ green900: "#163920",
435
+ // Primary
436
+ primaryTextOnLightBg: "#194b58",
437
+ primaryBg: "$blue600",
438
+ primaryBgHover: "$blue700",
439
+ primaryTextOnWhite: "$blue600",
440
+ bodyGray: "$gray100",
441
+ hoverDarker: "hsla(214deg, 25%, 21%, 0.06)",
442
+ borderDarker: "hsla(214deg, 25%, 21%, 0.1)",
443
+ selectedDarker: "hsla(214deg, 25%, 21%, 0.06)",
444
+ selectedOnBodyGray: "hsl(214deg, 35%, 80%)",
445
+ darkGrayBg: "#1f2937",
446
+ border: "hsl(214deg, 25%, 80%)",
447
+ text: "#1f2937",
448
+ secondaryText: "$gray500",
449
+ focusRing: "hsla(214deg, 15%, 10%, 0.6)"
450
+ },
451
+ fontSizes: {
452
+ xs: "0.75rem",
453
+ // 12px
454
+ sm: "0.875rem",
455
+ // 14px
456
+ md: "1rem",
457
+ // 16px
458
+ lg: "1.125rem",
459
+ // 18px
460
+ xl: "1.25rem",
461
+ // 20px
462
+ "2xl": "1.5rem",
463
+ // 24px
464
+ "3xl": "1.875rem"
465
+ // 30px
466
+ },
467
+ fontWeights: {
468
+ normal: "var(--ui-font-weight-normal)",
469
+ medium: "var(--ui-font-weight-semibold)",
470
+ bold: "var(--ui-font-weight-bold)"
471
+ },
472
+ space: {
473
+ 1: "0.25rem",
474
+ 2: "0.5rem",
475
+ 3: "0.75rem",
476
+ 4: "1rem",
477
+ 6: "1.5rem",
478
+ 8: "2rem"
479
+ },
480
+ shadows: {
481
+ xs: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
482
+ sm: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
483
+ md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
484
+ lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
485
+ overlayCard: "0 5px 50px 0px rgb(0 0 0 / 0.15), 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"
486
+ },
487
+ radii: {
488
+ xs: "0.125rem",
489
+ sm: "0.25rem",
490
+ md: "0.5rem",
491
+ mdmd: "calc(0.5rem - 0.125rem)",
492
+ full: "9999px"
493
+ },
494
+ zIndices: {
495
+ /**
496
+ * By using createLayerBelow() we can order the list of layers.
497
+ * Layers higher up will be on top of layers lower down.
498
+ */
499
+ toast: tt(),
500
+ overlayCard: tt(),
501
+ modal: tt()
502
+ }
503
+ },
504
+ media: {
505
+ lg: "(min-width: 1200px)",
506
+ print: "print"
507
+ }
508
+ }), cr = Be({
509
+ "0%": {
510
+ transform: "rotate(0)"
511
+ },
512
+ "100%": {
513
+ transform: "rotate(360deg)"
514
+ }
515
+ }), ur = Be({
516
+ "0%": {
517
+ strokeDashoffset: 600
518
+ },
519
+ "100%": {
520
+ strokeDashoffset: 0
521
+ }
522
+ }), dr = V("svg", {
523
+ animation: `${cr} 2s linear infinite`
524
+ }), fr = V("circle", {
525
+ animation: `${ur} 1.6s cubic-bezier(0.4, 0.15, 0.6, 0.85) infinite`,
526
+ fill: "transparent",
527
+ stroke: "currentColor",
528
+ strokeDasharray: 300,
529
+ strokeDashoffset: 600,
530
+ strokeLinecap: "round",
531
+ strokeMiterlimit: 10,
532
+ strokeWidth: 12
533
+ }), mr = V("div", {
534
+ lineHeight: 0,
535
+ flexShrink: 0,
536
+ variants: {
537
+ size: {
538
+ xs: {
539
+ width: "1rem",
540
+ height: "1rem"
541
+ },
542
+ sm: {
543
+ width: "1.25rem",
544
+ height: "1.25rem"
545
+ },
546
+ md: {
547
+ width: "1.75rem",
548
+ height: "1.75rem"
549
+ },
550
+ lg: {
551
+ width: "2.25rem",
552
+ height: "2.25rem"
553
+ }
554
+ },
555
+ color: {
556
+ light: {
557
+ color: "$gray200"
558
+ },
559
+ dark: {
560
+ color: "$gray800"
561
+ },
562
+ inherit: {
563
+ color: "inherit"
564
+ }
565
+ }
566
+ },
567
+ defaultVariants: {
568
+ size: "sm",
569
+ color: "dark"
570
+ }
571
+ }), gr = Pe(
572
+ (e, t) => /* @__PURE__ */ z(
573
+ mr,
574
+ {
575
+ ref: t,
576
+ ...e,
577
+ children: /* @__PURE__ */ z(
578
+ dr,
579
+ {
580
+ x: "0px",
581
+ y: "0px",
582
+ viewBox: "0 0 150 150",
583
+ children: /* @__PURE__ */ z(
584
+ fr,
585
+ {
586
+ cx: "75",
587
+ cy: "75",
588
+ r: "60"
589
+ }
590
+ )
591
+ }
592
+ )
593
+ }
594
+ )
595
+ ), pr = V("button", {
596
+ appearance: "none",
597
+ margin: 0,
598
+ padding: 0,
599
+ border: "none",
600
+ background: "none",
601
+ cursor: "pointer",
602
+ fontFamily: "inherit",
603
+ textAlign: "left",
604
+ textDecoration: "none",
605
+ textIndent: 0,
606
+ lineHeight: 1.25,
607
+ display: "inline-flex",
608
+ justifyContent: "center",
609
+ alignItems: "center",
610
+ gap: "$2",
611
+ position: "relative",
612
+ fontWeight: "$medium",
613
+ borderRadius: "$sm",
614
+ whiteSpace: "nowrap",
615
+ transition: "background 0.2s ease-in-out",
616
+ "&:focus, &:focus-visible": {
617
+ outline: "none"
618
+ },
619
+ "&:focus-visible": {
620
+ boxShadow: "0 0 0 2px white, 0 0 0 4px $colors$focusRing"
621
+ },
622
+ "&:disabled": {
623
+ cursor: "not-allowed"
624
+ },
625
+ variants: {
626
+ color: {
627
+ primary: {
628
+ $$solid: "$colors$blue600",
629
+ $$solidHover: "$colors$blue700",
630
+ $$outline: "$colors$blue600",
631
+ $$outlineHover: "$colors$blue100",
632
+ $$outlineText: "$colors$blue600",
633
+ $$disabled: "$colors$blue200"
634
+ },
635
+ secondary: {
636
+ $$solid: "$colors$gray600",
637
+ $$solidHover: "$colors$gray700",
638
+ $$outline: "$colors$gray400",
639
+ $$outlineHover: "$colors$gray100",
640
+ $$outlineText: "$colors$gray600",
641
+ $$disabled: "$colors$gray200"
642
+ },
643
+ success: {
644
+ $$solid: "$colors$green600",
645
+ $$solidHover: "$colors$green700",
646
+ $$outline: "$colors$green600",
647
+ $$outlineHover: "$colors$green100",
648
+ $$outlineText: "$colors$green600",
649
+ $$disabled: "$colors$green200"
650
+ },
651
+ danger: {
652
+ $$solid: "$colors$red600",
653
+ $$solidHover: "$colors$red700",
654
+ $$outline: "$colors$red600",
655
+ $$outlineHover: "$colors$red100",
656
+ $$outlineText: "$colors$red600",
657
+ $$disabled: "$colors$red200"
658
+ },
659
+ warning: {
660
+ $$solid: "$colors$yellow600",
661
+ $$solidHover: "$colors$yellow700",
662
+ $$outline: "$colors$yellow400",
663
+ $$outlineHover: "$colors$yellow50",
664
+ $$outlineText: "$colors$yellow600",
665
+ $$disabled: "$colors$yellow100"
666
+ }
667
+ },
668
+ size: {
669
+ md: {
670
+ fontSize: "$sm",
671
+ padding: "$2 $4",
672
+ height: "2.25rem"
673
+ },
674
+ lg: {
675
+ fontSize: "$md",
676
+ padding: "$3 $6",
677
+ height: "2.75rem"
678
+ }
679
+ },
680
+ variant: {
681
+ primary: {
682
+ background: "$$solid",
683
+ color: "white",
684
+ "&:hover:not(:disabled)": {
685
+ backgroundColor: "$$solidHover"
686
+ },
687
+ "&:disabled": {
688
+ backgroundColor: "$$disabled"
689
+ }
690
+ },
691
+ outline: {
692
+ boxShadow: "inset 0 0 0 1px $$outline",
693
+ color: "$$outlineText",
694
+ "&:hover:not(:disabled)": {
695
+ backgroundColor: "$$outlineHover"
696
+ },
697
+ "&:disabled": {
698
+ boxShadow: "inset 0 0 0 1px $$disabled",
699
+ color: "$$disabled"
700
+ }
701
+ },
702
+ transparent: {
703
+ backgroundColor: "transparent",
704
+ color: "$$outlineText",
705
+ "&:hover:not(:disabled)": {
706
+ backgroundColor: "$$outlineHover"
707
+ },
708
+ "&:disabled": {
709
+ color: "$$disabled"
710
+ }
711
+ }
712
+ },
713
+ icon: {
714
+ true: {}
715
+ }
716
+ },
717
+ compoundVariants: [
718
+ {
719
+ icon: !0,
720
+ size: "md",
721
+ css: {
722
+ padding: "$2",
723
+ width: "2.25rem"
724
+ }
725
+ },
726
+ {
727
+ icon: !0,
728
+ size: "lg",
729
+ css: {
730
+ padding: "$2",
731
+ width: "2.75rem"
732
+ }
733
+ }
734
+ ],
735
+ defaultVariants: {
736
+ variant: "outline",
737
+ color: "secondary",
738
+ size: "md"
739
+ }
740
+ }), hr = Pe(
741
+ ({ children: e, disabled: t, isLoading: n, variant: r, color: o, ...i }, s) => (!o && r === "primary" && (o = "primary"), /* @__PURE__ */ Ze(
742
+ pr,
743
+ {
744
+ ref: s,
745
+ type: "button",
746
+ role: "button",
747
+ disabled: t || n,
748
+ variant: r,
749
+ color: o,
750
+ ...i,
751
+ children: [
752
+ e,
753
+ n && /* @__PURE__ */ z(gr, { color: "inherit" })
754
+ ]
755
+ }
756
+ ))
757
+ ), br = V("div", {
758
+ padding: "$3",
759
+ borderRadius: "$md",
760
+ variants: {
761
+ color: {
762
+ warning: {
763
+ background: "$yellow200",
764
+ border: "1px solid $yellow400",
765
+ color: "$yellow900"
766
+ },
767
+ danger: {
768
+ background: "$red200",
769
+ border: "1px solid $red400",
770
+ color: "$red900"
771
+ },
772
+ info: {
773
+ background: "$blue200",
774
+ border: "1px solid $blue400",
775
+ color: "$blue900"
776
+ },
777
+ success: {
778
+ background: "$green200",
779
+ border: "1px solid $green400",
780
+ color: "$green900"
781
+ }
782
+ },
783
+ size: {
784
+ sm: {
785
+ fontSize: "$sm"
786
+ },
787
+ md: {
788
+ fontSize: "$md"
789
+ }
790
+ }
791
+ },
792
+ defaultVariants: {
793
+ color: "info",
794
+ size: "md"
795
+ }
796
+ }), bi = Pe(
797
+ ({ children: e, ...t }, n) => /* @__PURE__ */ z(
798
+ br,
799
+ {
800
+ ref: n,
801
+ role: "alert",
802
+ ...t,
803
+ children: e
804
+ }
805
+ )
806
+ ), yr = Be({
807
+ "0%": { opacity: 0, transform: "translateY(0.5rem)" },
808
+ "100%": { opacity: 1, transform: "translateY(0)" }
809
+ }), vr = Be({
810
+ "0%": { opacity: 0, transform: "translateX(-0.5rem)" },
811
+ "100%": { opacity: 1, transform: "translateX(0)" }
812
+ }), xr = Be({
813
+ "0%": { opacity: 0, transform: "translateY(-0.5rem)" },
814
+ "100%": { opacity: 1, transform: "translateY(0)" }
815
+ }), wr = Be({
816
+ "0%": { opacity: 0, transform: "translateX(0.5rem)" },
817
+ "100%": { opacity: 1, transform: "translateX(0)" }
818
+ }), $r = gt({
819
+ backgroundColor: "white",
820
+ boxShadow: "$overlayCard",
821
+ borderRadius: "$sm",
822
+ overflow: "hidden",
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"
828
+ }), Sr = gt({
829
+ animationDuration: "400ms",
830
+ animationTimingFunction: "cubic-bezier(0.16, 1, 0.3, 1)",
831
+ willChange: "transform, opacity",
832
+ '&[data-state="open"]': {
833
+ '&[data-side="top"]': { animationName: xr },
834
+ '&[data-side="right"]': { animationName: wr },
835
+ '&[data-side="bottom"]': { animationName: yr },
836
+ '&[data-side="left"]': { animationName: vr }
837
+ }
838
+ }), tn = V(
839
+ "div",
840
+ $r,
841
+ Sr
842
+ );
843
+ function oe(e) {
844
+ return nn(e) ? (e.nodeName || "").toLowerCase() : "#document";
845
+ }
846
+ function q(e) {
847
+ var t;
848
+ return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
849
+ }
850
+ function ne(e) {
851
+ var t;
852
+ return (t = (nn(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
853
+ }
854
+ function nn(e) {
855
+ return e instanceof Node || e instanceof q(e).Node;
856
+ }
857
+ function N(e) {
858
+ return e instanceof Element || e instanceof q(e).Element;
859
+ }
860
+ function Z(e) {
861
+ return e instanceof HTMLElement || e instanceof q(e).HTMLElement;
862
+ }
863
+ function at(e) {
864
+ return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof q(e).ShadowRoot;
865
+ }
866
+ function Fe(e) {
867
+ const {
868
+ overflow: t,
869
+ overflowX: n,
870
+ overflowY: r,
871
+ display: o
872
+ } = J(e);
873
+ return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
874
+ }
875
+ function Rr(e) {
876
+ return ["table", "td", "th"].includes(oe(e));
877
+ }
878
+ function pt(e) {
879
+ const t = ht(), n = J(e);
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));
881
+ }
882
+ function Er(e) {
883
+ let t = he(e);
884
+ for (; Z(t) && !Te(t); ) {
885
+ if (pt(t))
886
+ return t;
887
+ t = he(t);
888
+ }
889
+ return null;
890
+ }
891
+ function ht() {
892
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
893
+ }
894
+ function Te(e) {
895
+ return ["html", "body", "#document"].includes(oe(e));
896
+ }
897
+ function J(e) {
898
+ return q(e).getComputedStyle(e);
899
+ }
900
+ function Je(e) {
901
+ return N(e) ? {
902
+ scrollLeft: e.scrollLeft,
903
+ scrollTop: e.scrollTop
904
+ } : {
905
+ scrollLeft: e.pageXOffset,
906
+ scrollTop: e.pageYOffset
907
+ };
908
+ }
909
+ function he(e) {
910
+ if (oe(e) === "html")
911
+ return e;
912
+ const t = (
913
+ // Step into the shadow DOM of the parent of a slotted node.
914
+ e.assignedSlot || // DOM Element detected.
915
+ e.parentNode || // ShadowRoot detected.
916
+ at(e) && e.host || // Fallback.
917
+ ne(e)
918
+ );
919
+ return at(t) ? t.host : t;
920
+ }
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);
924
+ }
925
+ function re(e, t, n) {
926
+ var r;
927
+ t === void 0 && (t = []), n === void 0 && (n = !0);
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));
930
+ }
931
+ function Cr(e) {
932
+ let t = e.activeElement;
933
+ for (; ((n = t) == null || (n = n.shadowRoot) == null ? void 0 : n.activeElement) != null; ) {
934
+ var n;
935
+ t = t.shadowRoot.activeElement;
936
+ }
937
+ return t;
938
+ }
939
+ function pe(e, t) {
940
+ if (!e || !t)
941
+ return !1;
942
+ const n = t.getRootNode == null ? void 0 : t.getRootNode();
943
+ if (e.contains(t))
944
+ return !0;
945
+ if (n && at(n)) {
946
+ let r = t;
947
+ for (; r; ) {
948
+ if (e === r)
949
+ return !0;
950
+ r = r.parentNode || r.host;
951
+ }
952
+ }
953
+ return !1;
954
+ }
955
+ function kr() {
956
+ return /apple/i.test(navigator.vendor);
957
+ }
958
+ function _e(e, t) {
959
+ const n = ["mouse", "pen"];
960
+ return t || n.push("", void 0), n.includes(e);
961
+ }
962
+ function Tr(e) {
963
+ return "nativeEvent" in e;
964
+ }
965
+ function Ir(e) {
966
+ return e.matches("html,body");
967
+ }
968
+ function fe(e) {
969
+ return (e == null ? void 0 : e.ownerDocument) || document;
970
+ }
971
+ function nt(e, t) {
972
+ if (t == null)
973
+ return !1;
974
+ if ("composedPath" in e)
975
+ return e.composedPath().includes(t);
976
+ const n = e;
977
+ return n.target != null && t.contains(n.target);
978
+ }
979
+ function Se(e) {
980
+ return "composedPath" in e ? e.composedPath()[0] : e.target;
981
+ }
982
+ const Pr = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
983
+ function Ar(e) {
984
+ return Z(e) && e.matches(Pr);
985
+ }
986
+ const Ie = Math.min, U = Math.max, Ye = Math.round, je = Math.floor, ie = (e) => ({
987
+ x: e,
988
+ y: e
989
+ }), Br = {
990
+ left: "right",
991
+ right: "left",
992
+ bottom: "top",
993
+ top: "bottom"
994
+ }, Or = {
995
+ start: "end",
996
+ end: "start"
997
+ };
998
+ function At(e, t, n) {
999
+ return U(e, Ie(t, n));
1000
+ }
1001
+ function We(e, t) {
1002
+ return typeof e == "function" ? e(t) : e;
1003
+ }
1004
+ function se(e) {
1005
+ return e.split("-")[0];
1006
+ }
1007
+ function Ne(e) {
1008
+ return e.split("-")[1];
1009
+ }
1010
+ function on(e) {
1011
+ return e === "x" ? "y" : "x";
1012
+ }
1013
+ function sn(e) {
1014
+ return e === "y" ? "height" : "width";
1015
+ }
1016
+ function ze(e) {
1017
+ return ["top", "bottom"].includes(se(e)) ? "y" : "x";
1018
+ }
1019
+ function ln(e) {
1020
+ return on(ze(e));
1021
+ }
1022
+ function Dr(e, t, n) {
1023
+ n === void 0 && (n = !1);
1024
+ const r = Ne(e), o = ln(e), i = sn(o);
1025
+ let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
1026
+ return t.reference[i] > t.floating[i] && (s = Ke(s)), [s, Ke(s)];
1027
+ }
1028
+ function Mr(e) {
1029
+ const t = Ke(e);
1030
+ return [ct(e), t, ct(t)];
1031
+ }
1032
+ function ct(e) {
1033
+ return e.replace(/start|end/g, (t) => Or[t]);
1034
+ }
1035
+ function Lr(e, t, n) {
1036
+ const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
1037
+ switch (e) {
1038
+ case "top":
1039
+ case "bottom":
1040
+ return n ? t ? o : r : t ? r : o;
1041
+ case "left":
1042
+ case "right":
1043
+ return t ? i : s;
1044
+ default:
1045
+ return [];
1046
+ }
1047
+ }
1048
+ function Fr(e, t, n, r) {
1049
+ const o = Ne(e);
1050
+ let i = Lr(se(e), n === "start", r);
1051
+ return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(ct)))), i;
1052
+ }
1053
+ function Ke(e) {
1054
+ return e.replace(/left|right|bottom|top/g, (t) => Br[t]);
1055
+ }
1056
+ function Wr(e) {
1057
+ return {
1058
+ top: 0,
1059
+ right: 0,
1060
+ bottom: 0,
1061
+ left: 0,
1062
+ ...e
1063
+ };
1064
+ }
1065
+ function Nr(e) {
1066
+ return typeof e != "number" ? Wr(e) : {
1067
+ top: e,
1068
+ right: e,
1069
+ bottom: e,
1070
+ left: e
1071
+ };
1072
+ }
1073
+ function Xe(e) {
1074
+ return {
1075
+ ...e,
1076
+ top: e.y,
1077
+ left: e.x,
1078
+ right: e.x + e.width,
1079
+ bottom: e.y + e.height
1080
+ };
1081
+ }
1082
+ function Bt(e, t, n) {
1083
+ let {
1084
+ reference: r,
1085
+ floating: o
1086
+ } = e;
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;
1088
+ let u;
1089
+ switch (a) {
1090
+ case "top":
1091
+ u = {
1092
+ x: m,
1093
+ y: r.y - o.height
1094
+ };
1095
+ break;
1096
+ case "bottom":
1097
+ u = {
1098
+ x: m,
1099
+ y: r.y + r.height
1100
+ };
1101
+ break;
1102
+ case "right":
1103
+ u = {
1104
+ x: r.x + r.width,
1105
+ y: d
1106
+ };
1107
+ break;
1108
+ case "left":
1109
+ u = {
1110
+ x: r.x - o.width,
1111
+ y: d
1112
+ };
1113
+ break;
1114
+ default:
1115
+ u = {
1116
+ x: r.x,
1117
+ y: r.y
1118
+ };
1119
+ }
1120
+ switch (Ne(t)) {
1121
+ case "start":
1122
+ u[s] -= f * (n && c ? -1 : 1);
1123
+ break;
1124
+ case "end":
1125
+ u[s] += f * (n && c ? -1 : 1);
1126
+ break;
1127
+ }
1128
+ return u;
1129
+ }
1130
+ const zr = async (e, t, n) => {
1131
+ const {
1132
+ placement: r = "bottom",
1133
+ strategy: o = "absolute",
1134
+ middleware: i = [],
1135
+ platform: s
1136
+ } = n, l = i.filter(Boolean), a = await (s.isRTL == null ? void 0 : s.isRTL(t));
1137
+ let c = await s.getElementRects({
1138
+ reference: e,
1139
+ floating: t,
1140
+ strategy: o
1141
+ }), {
1142
+ x: m,
1143
+ y: d
1144
+ } = Bt(c, r, a), f = r, u = {}, g = 0;
1145
+ for (let p = 0; p < l.length; p++) {
1146
+ const {
1147
+ name: w,
1148
+ fn: h
1149
+ } = l[p], {
1150
+ x,
1151
+ y: P,
1152
+ data: S,
1153
+ reset: k
1154
+ } = await h({
1155
+ x: m,
1156
+ y: d,
1157
+ initialPlacement: r,
1158
+ placement: f,
1159
+ strategy: o,
1160
+ middlewareData: u,
1161
+ rects: c,
1162
+ platform: s,
1163
+ elements: {
1164
+ reference: e,
1165
+ floating: t
1166
+ }
1167
+ });
1168
+ m = x ?? m, d = P ?? d, u = {
1169
+ ...u,
1170
+ [w]: {
1171
+ ...u[w],
1172
+ ...S
1173
+ }
1174
+ }, k && g <= 50 && (g++, typeof k == "object" && (k.placement && (f = k.placement), k.rects && (c = k.rects === !0 ? await s.getElementRects({
1175
+ reference: e,
1176
+ floating: t,
1177
+ strategy: o
1178
+ }) : k.rects), {
1179
+ x: m,
1180
+ y: d
1181
+ } = Bt(c, f, a)), p = -1);
1182
+ }
1183
+ return {
1184
+ x: m,
1185
+ y: d,
1186
+ placement: f,
1187
+ strategy: o,
1188
+ middlewareData: u
1189
+ };
1190
+ };
1191
+ async function bt(e, t) {
1192
+ var n;
1193
+ t === void 0 && (t = {});
1194
+ const {
1195
+ x: r,
1196
+ y: o,
1197
+ platform: i,
1198
+ rects: s,
1199
+ elements: l,
1200
+ strategy: a
1201
+ } = e, {
1202
+ boundary: c = "clippingAncestors",
1203
+ rootBoundary: m = "viewport",
1204
+ elementContext: d = "floating",
1205
+ altBoundary: f = !1,
1206
+ padding: u = 0
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)),
1209
+ boundary: c,
1210
+ rootBoundary: m,
1211
+ strategy: a
1212
+ })), x = d === "floating" ? {
1213
+ ...s.floating,
1214
+ x: r,
1215
+ y: o
1216
+ } : s.reference, P = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l.floating)), S = await (i.isElement == null ? void 0 : i.isElement(P)) ? await (i.getScale == null ? void 0 : i.getScale(P)) || {
1217
+ x: 1,
1218
+ y: 1
1219
+ } : {
1220
+ x: 1,
1221
+ y: 1
1222
+ }, k = Xe(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
1223
+ elements: l,
1224
+ rect: x,
1225
+ offsetParent: P,
1226
+ strategy: a
1227
+ }) : x);
1228
+ return {
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
1233
+ };
1234
+ }
1235
+ const jr = function(e) {
1236
+ return e === void 0 && (e = {}), {
1237
+ name: "flip",
1238
+ options: e,
1239
+ async fn(t) {
1240
+ var n, r;
1241
+ const {
1242
+ placement: o,
1243
+ middlewareData: i,
1244
+ rects: s,
1245
+ initialPlacement: l,
1246
+ platform: a,
1247
+ elements: c
1248
+ } = t, {
1249
+ mainAxis: m = !0,
1250
+ crossAxis: d = !0,
1251
+ fallbackPlacements: f,
1252
+ fallbackStrategy: u = "bestFit",
1253
+ fallbackAxisSideDirection: g = "none",
1254
+ flipAlignment: p = !0,
1255
+ ...w
1256
+ } = We(e, t);
1257
+ if ((n = i.arrow) != null && n.alignmentOffset)
1258
+ return {};
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) {
1264
+ const M = Dr(o, s, P);
1265
+ A.push(C[M[0]], C[M[1]]);
1266
+ }
1267
+ if (T = [...T, {
1268
+ placement: o,
1269
+ overflows: A
1270
+ }], !A.every((M) => M <= 0)) {
1271
+ var B, D;
1272
+ const M = (((B = i.flip) == null ? void 0 : B.index) || 0) + 1, O = k[M];
1273
+ if (O)
1274
+ return {
1275
+ data: {
1276
+ index: M,
1277
+ overflows: T
1278
+ },
1279
+ reset: {
1280
+ placement: O
1281
+ }
1282
+ };
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;
1284
+ if (!b)
1285
+ switch (u) {
1286
+ case "bestFit": {
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];
1289
+ v && (b = v);
1290
+ break;
1291
+ }
1292
+ case "initialPlacement":
1293
+ b = l;
1294
+ break;
1295
+ }
1296
+ if (o !== b)
1297
+ return {
1298
+ reset: {
1299
+ placement: b
1300
+ }
1301
+ };
1302
+ }
1303
+ return {};
1304
+ }
1305
+ };
1306
+ };
1307
+ async function Hr(e, t) {
1308
+ const {
1309
+ placement: n,
1310
+ platform: r,
1311
+ elements: o
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);
1313
+ let {
1314
+ mainAxis: f,
1315
+ crossAxis: u,
1316
+ alignmentAxis: g
1317
+ } = typeof d == "number" ? {
1318
+ mainAxis: d,
1319
+ crossAxis: 0,
1320
+ alignmentAxis: null
1321
+ } : {
1322
+ mainAxis: 0,
1323
+ crossAxis: 0,
1324
+ alignmentAxis: null,
1325
+ ...d
1326
+ };
1327
+ return l && typeof g == "number" && (u = l === "end" ? g * -1 : g), a ? {
1328
+ x: u * m,
1329
+ y: f * c
1330
+ } : {
1331
+ x: f * c,
1332
+ y: u * m
1333
+ };
1334
+ }
1335
+ const Vr = function(e) {
1336
+ return e === void 0 && (e = 0), {
1337
+ name: "offset",
1338
+ options: e,
1339
+ async fn(t) {
1340
+ var n, r;
1341
+ const {
1342
+ x: o,
1343
+ y: i,
1344
+ placement: s,
1345
+ middlewareData: l
1346
+ } = t, a = await Hr(t, e);
1347
+ return s === ((n = l.offset) == null ? void 0 : n.placement) && (r = l.arrow) != null && r.alignmentOffset ? {} : {
1348
+ x: o + a.x,
1349
+ y: i + a.y,
1350
+ data: {
1351
+ ...a,
1352
+ placement: s
1353
+ }
1354
+ };
1355
+ }
1356
+ };
1357
+ }, _r = function(e) {
1358
+ return e === void 0 && (e = {}), {
1359
+ name: "shift",
1360
+ options: e,
1361
+ async fn(t) {
1362
+ const {
1363
+ x: n,
1364
+ y: r,
1365
+ placement: o
1366
+ } = t, {
1367
+ mainAxis: i = !0,
1368
+ crossAxis: s = !1,
1369
+ limiter: l = {
1370
+ fn: (w) => {
1371
+ let {
1372
+ x: h,
1373
+ y: x
1374
+ } = w;
1375
+ return {
1376
+ x: h,
1377
+ y: x
1378
+ };
1379
+ }
1380
+ },
1381
+ ...a
1382
+ } = We(e, t), c = {
1383
+ x: n,
1384
+ y: r
1385
+ }, m = await bt(t, a), d = ze(se(o)), f = on(d);
1386
+ let u = c[f], g = c[d];
1387
+ if (i) {
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);
1390
+ }
1391
+ if (s) {
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);
1394
+ }
1395
+ const p = l.fn({
1396
+ ...t,
1397
+ [f]: u,
1398
+ [d]: g
1399
+ });
1400
+ return {
1401
+ ...p,
1402
+ data: {
1403
+ x: p.x - n,
1404
+ y: p.y - r
1405
+ }
1406
+ };
1407
+ }
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
+ };
1455
+ };
1456
+ function an(e) {
1457
+ const t = J(e);
1458
+ let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
1459
+ const o = Z(e), i = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, l = Ye(n) !== i || Ye(r) !== s;
1460
+ return l && (n = i, r = s), {
1461
+ width: n,
1462
+ height: r,
1463
+ $: l
1464
+ };
1465
+ }
1466
+ function yt(e) {
1467
+ return N(e) ? e : e.contextElement;
1468
+ }
1469
+ function ke(e) {
1470
+ const t = yt(e);
1471
+ if (!Z(t))
1472
+ return ie(1);
1473
+ const n = t.getBoundingClientRect(), {
1474
+ width: r,
1475
+ height: o,
1476
+ $: i
1477
+ } = an(t);
1478
+ let s = (i ? Ye(n.width) : n.width) / r, l = (i ? Ye(n.height) : n.height) / o;
1479
+ return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
1480
+ x: s,
1481
+ y: l
1482
+ };
1483
+ }
1484
+ const Kr = /* @__PURE__ */ ie(0);
1485
+ function cn(e) {
1486
+ const t = q(e);
1487
+ return !ht() || !t.visualViewport ? Kr : {
1488
+ x: t.visualViewport.offsetLeft,
1489
+ y: t.visualViewport.offsetTop
1490
+ };
1491
+ }
1492
+ function Xr(e, t, n) {
1493
+ return t === void 0 && (t = !1), !n || t && n !== q(e) ? !1 : t;
1494
+ }
1495
+ function be(e, t, n, r) {
1496
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
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);
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;
1502
+ if (i) {
1503
+ const f = q(i), u = r && N(r) ? q(r) : r;
1504
+ let g = f, p = g.frameElement;
1505
+ for (; p && r && u !== g; ) {
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;
1508
+ }
1509
+ }
1510
+ return Xe({
1511
+ width: m,
1512
+ height: d,
1513
+ x: a,
1514
+ y: c
1515
+ });
1516
+ }
1517
+ const Gr = [":popover-open", ":modal"];
1518
+ function un(e) {
1519
+ return Gr.some((t) => {
1520
+ try {
1521
+ return e.matches(t);
1522
+ } catch {
1523
+ return !1;
1524
+ }
1525
+ });
1526
+ }
1527
+ function Ur(e) {
1528
+ let {
1529
+ elements: t,
1530
+ rect: n,
1531
+ offsetParent: r,
1532
+ strategy: o
1533
+ } = e;
1534
+ const i = o === "fixed", s = ne(r), l = t ? un(t.floating) : !1;
1535
+ if (r === s || l && i)
1536
+ return n;
1537
+ let a = {
1538
+ scrollLeft: 0,
1539
+ scrollTop: 0
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))) {
1543
+ const f = be(r);
1544
+ c = ke(r), m.x = f.x + r.clientLeft, m.y = f.y + r.clientTop;
1545
+ }
1546
+ return {
1547
+ width: n.width * c.x,
1548
+ height: n.height * c.y,
1549
+ x: n.x * c.x - a.scrollLeft * c.x + m.x,
1550
+ y: n.y * c.y - a.scrollTop * c.y + m.y
1551
+ };
1552
+ }
1553
+ function qr(e) {
1554
+ return Array.from(e.getClientRects());
1555
+ }
1556
+ function dn(e) {
1557
+ return be(ne(e)).left + Je(e).scrollLeft;
1558
+ }
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);
1561
+ let s = -n.scrollLeft + dn(e);
1562
+ const l = -n.scrollTop;
1563
+ return J(r).direction === "rtl" && (s += U(t.clientWidth, r.clientWidth) - o), {
1564
+ width: o,
1565
+ height: i,
1566
+ x: s,
1567
+ y: l
1568
+ };
1569
+ }
1570
+ function Jr(e, t) {
1571
+ const n = q(e), r = ne(e), o = n.visualViewport;
1572
+ let i = r.clientWidth, s = r.clientHeight, l = 0, a = 0;
1573
+ if (o) {
1574
+ i = o.width, s = o.height;
1575
+ const c = ht();
1576
+ (!c || c && t === "fixed") && (l = o.offsetLeft, a = o.offsetTop);
1577
+ }
1578
+ return {
1579
+ width: i,
1580
+ height: s,
1581
+ x: l,
1582
+ y: a
1583
+ };
1584
+ }
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;
1587
+ return {
1588
+ width: s,
1589
+ height: l,
1590
+ x: a,
1591
+ y: c
1592
+ };
1593
+ }
1594
+ function Ot(e, t, n) {
1595
+ let r;
1596
+ if (t === "viewport")
1597
+ r = Jr(e, n);
1598
+ else if (t === "document")
1599
+ r = Zr(ne(e));
1600
+ else if (N(t))
1601
+ r = Qr(t, n);
1602
+ else {
1603
+ const o = cn(e);
1604
+ r = {
1605
+ ...t,
1606
+ x: t.x - o.x,
1607
+ y: t.y - o.y
1608
+ };
1609
+ }
1610
+ return Xe(r);
1611
+ }
1612
+ function fn(e, t) {
1613
+ const n = he(e);
1614
+ return n === t || !N(n) || Te(n) ? !1 : J(n).position === "fixed" || fn(n, t);
1615
+ }
1616
+ function eo(e, t) {
1617
+ const n = t.get(e);
1618
+ if (n)
1619
+ return n;
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);
1626
+ }
1627
+ return t.set(e, r), r;
1628
+ }
1629
+ function to(e) {
1630
+ let {
1631
+ element: t,
1632
+ boundary: n,
1633
+ rootBoundary: r,
1634
+ strategy: o
1635
+ } = e;
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));
1640
+ return {
1641
+ width: a.right - a.left,
1642
+ height: a.bottom - a.top,
1643
+ x: a.left,
1644
+ y: a.top
1645
+ };
1646
+ }
1647
+ function no(e) {
1648
+ const {
1649
+ width: t,
1650
+ height: n
1651
+ } = an(e);
1652
+ return {
1653
+ width: t,
1654
+ height: n
1655
+ };
1656
+ }
1657
+ function ro(e, t, n) {
1658
+ const r = Z(t), o = ne(t), i = n === "fixed", s = be(e, !0, i, t);
1659
+ let l = {
1660
+ scrollLeft: 0,
1661
+ scrollTop: 0
1662
+ };
1663
+ const a = ie(0);
1664
+ if (r || !r && !i)
1665
+ if ((oe(t) !== "body" || Fe(o)) && (l = Je(t)), r) {
1666
+ const d = be(t, !0, i, t);
1667
+ a.x = d.x + t.clientLeft, a.y = d.y + t.clientTop;
1668
+ } else
1669
+ o && (a.x = dn(o));
1670
+ const c = s.left + l.scrollLeft - a.x, m = s.top + l.scrollTop - a.y;
1671
+ return {
1672
+ x: c,
1673
+ y: m,
1674
+ width: s.width,
1675
+ height: s.height
1676
+ };
1677
+ }
1678
+ function Dt(e, t) {
1679
+ return !Z(e) || J(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
1680
+ }
1681
+ function mn(e, t) {
1682
+ const n = q(e);
1683
+ if (!Z(e) || un(e))
1684
+ return n;
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;
1689
+ }
1690
+ const oo = async function(e) {
1691
+ const t = this.getOffsetParent || mn, n = this.getDimensions;
1692
+ return {
1693
+ reference: ro(e.reference, await t(e.floating), e.strategy),
1694
+ floating: {
1695
+ x: 0,
1696
+ y: 0,
1697
+ ...await n(e.floating)
1698
+ }
1699
+ };
1700
+ };
1701
+ function io(e) {
1702
+ return J(e).direction === "rtl";
1703
+ }
1704
+ const so = {
1705
+ convertOffsetParentRelativeRectToViewportRelativeRect: Ur,
1706
+ getDocumentElement: ne,
1707
+ getClippingRect: to,
1708
+ getOffsetParent: mn,
1709
+ getElementRects: oo,
1710
+ getClientRects: qr,
1711
+ getDimensions: no,
1712
+ getScale: ke,
1713
+ isElement: N,
1714
+ isRTL: io
1715
+ };
1716
+ function lo(e, t) {
1717
+ let n = null, r;
1718
+ const o = ne(e);
1719
+ function i() {
1720
+ var l;
1721
+ clearTimeout(r), (l = n) == null || l.disconnect(), n = null;
1722
+ }
1723
+ function s(l, a) {
1724
+ l === void 0 && (l = !1), a === void 0 && (a = 1), i();
1725
+ const {
1726
+ left: c,
1727
+ top: m,
1728
+ width: d,
1729
+ height: f
1730
+ } = e.getBoundingClientRect();
1731
+ if (l || t(), !d || !f)
1732
+ return;
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
1736
+ };
1737
+ let P = !0;
1738
+ function S(k) {
1739
+ const C = k[0].intersectionRatio;
1740
+ if (C !== a) {
1741
+ if (!P)
1742
+ return s();
1743
+ C ? s(!1, C) : r = setTimeout(() => {
1744
+ s(!1, 1e-7);
1745
+ }, 100);
1746
+ }
1747
+ P = !1;
1748
+ }
1749
+ try {
1750
+ n = new IntersectionObserver(S, {
1751
+ ...x,
1752
+ // Handle <iframe>s
1753
+ root: o.ownerDocument
1754
+ });
1755
+ } catch {
1756
+ n = new IntersectionObserver(S, x);
1757
+ }
1758
+ n.observe(e);
1759
+ }
1760
+ return s(!0), i;
1761
+ }
1762
+ function ao(e, t, n, r) {
1763
+ r === void 0 && (r = {});
1764
+ const {
1765
+ ancestorScroll: o = !0,
1766
+ ancestorResize: i = !0,
1767
+ elementResize: s = typeof ResizeObserver == "function",
1768
+ layoutShift: l = typeof IntersectionObserver == "function",
1769
+ animationFrame: a = !1
1770
+ } = r, c = yt(e), m = o || i ? [...c ? re(c) : [], ...re(t)] : [];
1771
+ m.forEach((h) => {
1772
+ o && h.addEventListener("scroll", n, {
1773
+ passive: !0
1774
+ }), i && h.addEventListener("resize", n);
1775
+ });
1776
+ const d = c && l ? lo(c, n) : null;
1777
+ let f = -1, u = null;
1778
+ s && (u = new ResizeObserver((h) => {
1779
+ let [x] = h;
1780
+ x && x.target === c && u && (u.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
1781
+ var P;
1782
+ (P = u) == null || P.observe(t);
1783
+ })), n();
1784
+ }), c && !a && u.observe(c), u.observe(t));
1785
+ let g, p = a ? be(e) : null;
1786
+ a && w();
1787
+ function w() {
1788
+ const h = be(e);
1789
+ p && (h.x !== p.x || h.y !== p.y || h.width !== p.width || h.height !== p.height) && n(), p = h, g = requestAnimationFrame(w);
1790
+ }
1791
+ return n(), () => {
1792
+ var h;
1793
+ m.forEach((x) => {
1794
+ o && x.removeEventListener("scroll", n), i && x.removeEventListener("resize", n);
1795
+ }), d == null || d(), (h = u) == null || h.disconnect(), u = null, a && cancelAnimationFrame(g);
1796
+ };
1797
+ }
1798
+ const co = _r, uo = jr, yi = Yr, fo = (e, t, n) => {
1799
+ const r = /* @__PURE__ */ new Map(), o = {
1800
+ platform: so,
1801
+ ...n
1802
+ }, i = {
1803
+ ...o.platform,
1804
+ _c: r
1805
+ };
1806
+ return zr(e, t, {
1807
+ ...o,
1808
+ platform: i
1809
+ });
1810
+ };
1811
+ var He = typeof document < "u" ? Zt : Jt;
1812
+ function Ge(e, t) {
1813
+ if (e === t)
1814
+ return !0;
1815
+ if (typeof e != typeof t)
1816
+ return !1;
1817
+ if (typeof e == "function" && e.toString() === t.toString())
1818
+ return !0;
1819
+ let n, r, o;
1820
+ if (e && t && typeof e == "object") {
1821
+ if (Array.isArray(e)) {
1822
+ if (n = e.length, n !== t.length)
1823
+ return !1;
1824
+ for (r = n; r-- !== 0; )
1825
+ if (!Ge(e[r], t[r]))
1826
+ return !1;
1827
+ return !0;
1828
+ }
1829
+ if (o = Object.keys(e), n = o.length, n !== Object.keys(t).length)
1830
+ return !1;
1831
+ for (r = n; r-- !== 0; )
1832
+ if (!{}.hasOwnProperty.call(t, o[r]))
1833
+ return !1;
1834
+ for (r = n; r-- !== 0; ) {
1835
+ const i = o[r];
1836
+ if (!(i === "_owner" && e.$$typeof) && !Ge(e[i], t[i]))
1837
+ return !1;
1838
+ }
1839
+ return !0;
1840
+ }
1841
+ return e !== e && t !== t;
1842
+ }
1843
+ function gn(e) {
1844
+ return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
1845
+ }
1846
+ function Mt(e, t) {
1847
+ const n = gn(e);
1848
+ return Math.round(t * n) / n;
1849
+ }
1850
+ function Lt(e) {
1851
+ const t = y.useRef(e);
1852
+ return He(() => {
1853
+ t.current = e;
1854
+ }), t;
1855
+ }
1856
+ function mo(e) {
1857
+ e === void 0 && (e = {});
1858
+ const {
1859
+ placement: t = "bottom",
1860
+ strategy: n = "absolute",
1861
+ middleware: r = [],
1862
+ platform: o,
1863
+ elements: {
1864
+ reference: i,
1865
+ floating: s
1866
+ } = {},
1867
+ transform: l = !0,
1868
+ whileElementsMounted: a,
1869
+ open: c
1870
+ } = e, [m, d] = y.useState({
1871
+ x: 0,
1872
+ y: 0,
1873
+ strategy: n,
1874
+ placement: t,
1875
+ middlewareData: {},
1876
+ isPositioned: !1
1877
+ }), [f, u] = y.useState(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));
1881
+ }, []), P = y.useCallback((R) => {
1882
+ R !== A.current && (A.current = R, h(R));
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)
1885
+ return;
1886
+ const R = {
1887
+ placement: t,
1888
+ strategy: n,
1889
+ middleware: f
1890
+ };
1891
+ L.current && (R.platform = L.current), fo(C.current, A.current, R).then(($) => {
1892
+ const F = {
1893
+ ...$,
1894
+ isPositioned: !0
1895
+ };
1896
+ O.current && !Ge(T.current, F) && (T.current = F, An.flushSync(() => {
1897
+ d(F);
1898
+ }));
1899
+ });
1900
+ }, [f, t, n, L]);
1901
+ He(() => {
1902
+ c === !1 && T.current.isPositioned && (T.current.isPositioned = !1, d((R) => ({
1903
+ ...R,
1904
+ isPositioned: !1
1905
+ })));
1906
+ }, [c]);
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) {
1912
+ if (D.current)
1913
+ return D.current(S, k, M);
1914
+ M();
1915
+ }
1916
+ }, [S, k, M, D, B]);
1917
+ const b = y.useMemo(() => ({
1918
+ reference: C,
1919
+ floating: A,
1920
+ setReference: x,
1921
+ setFloating: P
1922
+ }), [x, P]), v = y.useMemo(() => ({
1923
+ reference: S,
1924
+ floating: k
1925
+ }), [S, k]), I = y.useMemo(() => {
1926
+ const R = {
1927
+ position: n,
1928
+ left: 0,
1929
+ top: 0
1930
+ };
1931
+ if (!v.floating)
1932
+ return R;
1933
+ const $ = Mt(v.floating, m.x), F = Mt(v.floating, m.y);
1934
+ return l ? {
1935
+ ...R,
1936
+ transform: "translate(" + $ + "px, " + F + "px)",
1937
+ ...gn(v.floating) >= 1.5 && {
1938
+ willChange: "transform"
1939
+ }
1940
+ } : {
1941
+ position: n,
1942
+ left: $,
1943
+ top: F
1944
+ };
1945
+ }, [n, l, v.floating, m.x, m.y]);
1946
+ return y.useMemo(() => ({
1947
+ ...m,
1948
+ update: M,
1949
+ refs: b,
1950
+ elements: v,
1951
+ floatingStyles: I
1952
+ }), [m, M, b, v, I]);
1953
+ }
1954
+ /*!
1955
+ * tabbable 6.2.0
1956
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
1957
+ */
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) {
1960
+ var t;
1961
+ return e == null || (t = e.getRootNode) === null || t === void 0 ? void 0 : t.call(e);
1962
+ } : function(e) {
1963
+ return e == null ? void 0 : e.ownerDocument;
1964
+ }, qe = function e(t, n) {
1965
+ var r;
1966
+ n === void 0 && (n = !0);
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);
1968
+ return s;
1969
+ }, po = function(t) {
1970
+ var n, r = t == null || (n = t.getAttribute) === null || n === void 0 ? void 0 : n.call(t, "contenteditable");
1971
+ return r === "" || r === "true";
1972
+ }, ho = function(t, n, r) {
1973
+ if (qe(t))
1974
+ return [];
1975
+ var o = Array.prototype.slice.apply(t.querySelectorAll(ut));
1976
+ return n && Me.call(t, ut) && o.unshift(t), o = o.filter(r), o;
1977
+ }, bo = function e(t, n, r) {
1978
+ for (var o = [], i = Array.from(t); i.length; ) {
1979
+ var s = i.shift();
1980
+ if (!qe(s, !1))
1981
+ if (s.tagName === "SLOT") {
1982
+ var l = s.assignedElements(), a = l.length ? l : s.children, c = e(a, !0, r);
1983
+ r.flatten ? o.push.apply(o, c) : o.push({
1984
+ scopeParent: s,
1985
+ candidates: c
1986
+ });
1987
+ } else {
1988
+ var m = Me.call(s, ut);
1989
+ m && r.filter(s) && (n || !t.includes(s)) && o.push(s);
1990
+ var d = s.shadowRoot || // check for an undisclosed shadow
1991
+ typeof r.getShadowRoot == "function" && r.getShadowRoot(s), f = !qe(d, !1) && (!r.shadowRootFilter || r.shadowRootFilter(s));
1992
+ if (d && f) {
1993
+ var u = e(d === !0 ? s.children : d.children, !0, r);
1994
+ r.flatten ? o.push.apply(o, u) : o.push({
1995
+ scopeParent: s,
1996
+ candidates: u
1997
+ });
1998
+ } else
1999
+ i.unshift.apply(i, s.children);
2000
+ }
2001
+ }
2002
+ return o;
2003
+ }, hn = function(t) {
2004
+ return !isNaN(parseInt(t.getAttribute("tabindex"), 10));
2005
+ }, bn = function(t) {
2006
+ if (!t)
2007
+ throw new Error("No node provided");
2008
+ return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || po(t)) && !hn(t) ? 0 : t.tabIndex;
2009
+ }, yo = function(t, n) {
2010
+ var r = bn(t);
2011
+ return r < 0 && n && !hn(t) ? 0 : r;
2012
+ }, vo = function(t, n) {
2013
+ return t.tabIndex === n.tabIndex ? t.documentOrder - n.documentOrder : t.tabIndex - n.tabIndex;
2014
+ }, yn = function(t) {
2015
+ return t.tagName === "INPUT";
2016
+ }, xo = function(t) {
2017
+ return yn(t) && t.type === "hidden";
2018
+ }, wo = function(t) {
2019
+ var n = t.tagName === "DETAILS" && Array.prototype.slice.apply(t.children).some(function(r) {
2020
+ return r.tagName === "SUMMARY";
2021
+ });
2022
+ return n;
2023
+ }, $o = function(t, n) {
2024
+ for (var r = 0; r < t.length; r++)
2025
+ if (t[r].checked && t[r].form === n)
2026
+ return t[r];
2027
+ }, So = function(t) {
2028
+ if (!t.name)
2029
+ return !0;
2030
+ var n = t.form || Ue(t), r = function(l) {
2031
+ return n.querySelectorAll('input[type="radio"][name="' + l + '"]');
2032
+ }, o;
2033
+ if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
2034
+ o = r(window.CSS.escape(t.name));
2035
+ else
2036
+ try {
2037
+ o = r(t.name);
2038
+ } catch (s) {
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;
2040
+ }
2041
+ var i = $o(o, t.form);
2042
+ return !i || i === t;
2043
+ }, Ro = function(t) {
2044
+ return yn(t) && t.type === "radio";
2045
+ }, Eo = function(t) {
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;
2049
+ if (r && r !== t) {
2050
+ var s, l, a;
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; ) {
2052
+ var c, m, d;
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));
2054
+ }
2055
+ }
2056
+ return i;
2057
+ }, Ft = function(t) {
2058
+ var n = t.getBoundingClientRect(), r = n.width, o = n.height;
2059
+ return r === 0 && o === 0;
2060
+ }, ko = function(t, n) {
2061
+ var r = n.displayCheck, o = n.getShadowRoot;
2062
+ if (getComputedStyle(t).visibility === "hidden")
2063
+ return !0;
2064
+ var i = Me.call(t, "details>summary:first-of-type"), s = i ? t.parentElement : t;
2065
+ if (Me.call(s, "details:not([open]) *"))
2066
+ return !0;
2067
+ if (!r || r === "full" || r === "legacy-full") {
2068
+ if (typeof o == "function") {
2069
+ for (var l = t; t; ) {
2070
+ var a = t.parentElement, c = Ue(t);
2071
+ if (a && !a.shadowRoot && o(a) === !0)
2072
+ return Ft(t);
2073
+ t.assignedSlot ? t = t.assignedSlot : !a && c !== t.ownerDocument ? t = c.host : t = a;
2074
+ }
2075
+ t = l;
2076
+ }
2077
+ if (Co(t))
2078
+ return !t.getClientRects().length;
2079
+ if (r !== "legacy-full")
2080
+ return !0;
2081
+ } else if (r === "non-zero-area")
2082
+ return Ft(t);
2083
+ return !1;
2084
+ }, To = function(t) {
2085
+ if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))
2086
+ for (var n = t.parentElement; n; ) {
2087
+ if (n.tagName === "FIELDSET" && n.disabled) {
2088
+ for (var r = 0; r < n.children.length; r++) {
2089
+ var o = n.children.item(r);
2090
+ if (o.tagName === "LEGEND")
2091
+ return Me.call(n, "fieldset[disabled] *") ? !0 : !o.contains(t);
2092
+ }
2093
+ return !0;
2094
+ }
2095
+ n = n.parentElement;
2096
+ }
2097
+ return !1;
2098
+ }, Io = function(t, n) {
2099
+ return !(n.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
2100
+ // because we're limited in the type of selectors we can use in JSDom (see related
2101
+ // note related to `candidateSelectors`)
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) {
2107
+ var n = parseInt(t.getAttribute("tabindex"), 10);
2108
+ return !!(isNaN(n) || n >= 0);
2109
+ }, Ao = function e(t) {
2110
+ var n = [], r = [];
2111
+ return t.forEach(function(o, i) {
2112
+ var s = !!o.scopeParent, l = s ? o.scopeParent : o, a = yo(l, s), c = s ? e(o.candidates) : l;
2113
+ a === 0 ? s ? n.push.apply(n, c) : n.push(l) : r.push({
2114
+ documentOrder: i,
2115
+ tabIndex: a,
2116
+ item: o,
2117
+ isScope: s,
2118
+ content: c
2119
+ });
2120
+ }), r.sort(vo).reduce(function(o, i) {
2121
+ return i.isScope ? o.push.apply(o, i.content) : o.push(i.content), o;
2122
+ }, []).concat(n);
2123
+ }, vn = function(t, n) {
2124
+ n = n || {};
2125
+ var r;
2126
+ return n.getShadowRoot ? r = bo([t], n.includeContainer, {
2127
+ filter: Wt.bind(null, n),
2128
+ flatten: !1,
2129
+ getShadowRoot: n.getShadowRoot,
2130
+ shadowRootFilter: Po
2131
+ }) : r = ho(t, n.includeContainer, Wt.bind(null, n)), Ao(r);
2132
+ };
2133
+ const Bo = y[/* @__PURE__ */ "useInsertionEffect".toString()], Oo = Bo || ((e) => e());
2134
+ function Re(e) {
2135
+ const t = y.useRef(() => {
2136
+ if (process.env.NODE_ENV !== "production")
2137
+ throw new Error("Cannot call an event handler while rendering.");
2138
+ });
2139
+ return Oo(() => {
2140
+ t.current = e;
2141
+ }), y.useCallback(function() {
2142
+ for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
2143
+ r[o] = arguments[o];
2144
+ return t.current == null ? void 0 : t.current(...r);
2145
+ }, []);
2146
+ }
2147
+ var Q = typeof document < "u" ? Zt : Jt;
2148
+ function dt() {
2149
+ return dt = Object.assign ? Object.assign.bind() : function(e) {
2150
+ for (var t = 1; t < arguments.length; t++) {
2151
+ var n = arguments[t];
2152
+ for (var r in n)
2153
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
2154
+ }
2155
+ return e;
2156
+ }, dt.apply(this, arguments);
2157
+ }
2158
+ let rt = !1, Do = 0;
2159
+ const Nt = () => "floating-ui-" + Do++;
2160
+ function Mo() {
2161
+ const [e, t] = y.useState(() => rt ? Nt() : void 0);
2162
+ return Q(() => {
2163
+ e == null && t(Nt());
2164
+ }, []), y.useEffect(() => {
2165
+ rt || (rt = !0);
2166
+ }, []), e;
2167
+ }
2168
+ const Lo = y[/* @__PURE__ */ "useId".toString()], vt = Lo || Mo;
2169
+ function Fo() {
2170
+ const e = /* @__PURE__ */ new Map();
2171
+ return {
2172
+ emit(t, n) {
2173
+ var r;
2174
+ (r = e.get(t)) == null || r.forEach((o) => o(n));
2175
+ },
2176
+ on(t, n) {
2177
+ e.set(t, [...e.get(t) || [], n]);
2178
+ },
2179
+ off(t, n) {
2180
+ var r;
2181
+ e.set(t, ((r = e.get(t)) == null ? void 0 : r.filter((o) => o !== n)) || []);
2182
+ }
2183
+ };
2184
+ }
2185
+ const Wo = /* @__PURE__ */ y.createContext(null), No = /* @__PURE__ */ y.createContext(null), xt = () => {
2186
+ var e;
2187
+ return ((e = y.useContext(Wo)) == null ? void 0 : e.id) || null;
2188
+ }, wt = () => y.useContext(No);
2189
+ function Qe(e) {
2190
+ return "data-floating-ui-" + e;
2191
+ }
2192
+ function Ce(e) {
2193
+ const t = Cn(e);
2194
+ return Q(() => {
2195
+ t.current = e;
2196
+ }), t;
2197
+ }
2198
+ const zt = /* @__PURE__ */ Qe("safe-polygon");
2199
+ function ot(e, t, n) {
2200
+ return n && !_e(n) ? 0 : typeof e == "number" ? e : e == null ? void 0 : e[t];
2201
+ }
2202
+ function zo(e, t) {
2203
+ t === void 0 && (t = {});
2204
+ const {
2205
+ open: n,
2206
+ onOpenChange: r,
2207
+ dataRef: o,
2208
+ events: i,
2209
+ elements: {
2210
+ domReference: s,
2211
+ floating: l
2212
+ },
2213
+ refs: a
2214
+ } = e, {
2215
+ enabled: c = !0,
2216
+ delay: m = 0,
2217
+ handleClose: d = null,
2218
+ mouseOnly: f = !1,
2219
+ restMs: u = 0,
2220
+ move: g = !0
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(() => {
2222
+ }), D = y.useCallback(() => {
2223
+ var b;
2224
+ const v = (b = o.current.openEvent) == null ? void 0 : b.type;
2225
+ return (v == null ? void 0 : v.includes("mouse")) && v !== "mousedown";
2226
+ }, [o]);
2227
+ y.useEffect(() => {
2228
+ if (!c)
2229
+ return;
2230
+ function b(v) {
2231
+ let {
2232
+ open: I
2233
+ } = v;
2234
+ I || (clearTimeout(S.current), clearTimeout(C.current), A.current = !0);
2235
+ }
2236
+ return i.on("openchange", b), () => {
2237
+ i.off("openchange", b);
2238
+ };
2239
+ }, [c, i]), y.useEffect(() => {
2240
+ if (!c || !h.current || !n)
2241
+ return;
2242
+ function b(I) {
2243
+ D() && r(!1, I, "hover");
2244
+ }
2245
+ const v = fe(l).documentElement;
2246
+ return v.addEventListener("mouseleave", b), () => {
2247
+ v.removeEventListener("mouseleave", b);
2248
+ };
2249
+ }, [l, n, r, c, h, D]);
2250
+ const L = y.useCallback(function(b, v, I) {
2251
+ v === void 0 && (v = !0), I === void 0 && (I = "hover");
2252
+ const R = ot(x.current, "close", P.current);
2253
+ R && !k.current ? (clearTimeout(S.current), S.current = setTimeout(() => r(!1, b, I), R)) : v && (clearTimeout(S.current), r(!1, b, I));
2254
+ }, [x, r]), M = y.useCallback(() => {
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;
2260
+ }
2261
+ }, [a]);
2262
+ return y.useEffect(() => {
2263
+ if (!c)
2264
+ return;
2265
+ function b() {
2266
+ return o.current.openEvent ? ["click", "mousedown"].includes(o.current.openEvent.type) : !1;
2267
+ }
2268
+ function v($) {
2269
+ if (clearTimeout(S.current), A.current = !1, f && !_e(P.current) || u > 0 && ot(x.current, "open") === 0)
2270
+ return;
2271
+ const F = ot(x.current, "open", P.current);
2272
+ F ? S.current = setTimeout(() => {
2273
+ r(!0, $, "hover");
2274
+ }, F) : r(!0, $, "hover");
2275
+ }
2276
+ function I($) {
2277
+ if (b())
2278
+ return;
2279
+ B.current();
2280
+ const F = fe(l);
2281
+ if (clearTimeout(C.current), h.current) {
2282
+ n || clearTimeout(S.current), k.current = h.current({
2283
+ ...e,
2284
+ tree: p,
2285
+ x: $.clientX,
2286
+ y: $.clientY,
2287
+ onClose() {
2288
+ O(), M(), L($, !0, "safe-polygon");
2289
+ }
2290
+ });
2291
+ const G = k.current;
2292
+ F.addEventListener("mousemove", G), B.current = () => {
2293
+ F.removeEventListener("mousemove", G);
2294
+ };
2295
+ return;
2296
+ }
2297
+ (P.current === "touch" ? !pe(l, $.relatedTarget) : !0) && L($);
2298
+ }
2299
+ function R($) {
2300
+ b() || h.current == null || h.current({
2301
+ ...e,
2302
+ tree: p,
2303
+ x: $.clientX,
2304
+ y: $.clientY,
2305
+ onClose() {
2306
+ O(), M(), L($);
2307
+ }
2308
+ })($);
2309
+ }
2310
+ if (N(s)) {
2311
+ const $ = s;
2312
+ return n && $.addEventListener("mouseleave", R), l == null || l.addEventListener("mouseleave", R), g && $.addEventListener("mousemove", v, {
2313
+ once: !0
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);
2316
+ };
2317
+ }
2318
+ }, [s, l, c, e, f, u, g, L, M, O, r, n, p, x, h, o]), Q(() => {
2319
+ var b;
2320
+ if (c && n && (b = h.current) != null && b.__options.blockPointerEvents && D()) {
2321
+ const I = fe(l).body;
2322
+ if (I.setAttribute(zt, ""), I.style.pointerEvents = "none", T.current = !0, N(s) && l) {
2323
+ var v;
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", () => {
2326
+ R.style.pointerEvents = "", l.style.pointerEvents = "";
2327
+ };
2328
+ }
2329
+ }
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(() => {
2335
+ if (!c)
2336
+ return {};
2337
+ function b(v) {
2338
+ P.current = v.pointerType;
2339
+ }
2340
+ return {
2341
+ reference: {
2342
+ onPointerDown: b,
2343
+ onPointerEnter: b,
2344
+ onMouseMove(v) {
2345
+ n || u === 0 || (clearTimeout(C.current), C.current = setTimeout(() => {
2346
+ A.current || r(!0, v.nativeEvent, "hover");
2347
+ }, u));
2348
+ }
2349
+ },
2350
+ floating: {
2351
+ onMouseEnter() {
2352
+ clearTimeout(S.current);
2353
+ },
2354
+ onMouseLeave(v) {
2355
+ L(v.nativeEvent, !1);
2356
+ }
2357
+ }
2358
+ };
2359
+ }, [c, u, n, r, L]);
2360
+ }
2361
+ function Ve(e, t) {
2362
+ let n = e.filter((o) => {
2363
+ var i;
2364
+ return o.parentId === t && ((i = o.context) == null ? void 0 : i.open);
2365
+ }), r = n;
2366
+ for (; r.length; )
2367
+ r = e.filter((o) => {
2368
+ var i;
2369
+ return (i = r) == null ? void 0 : i.some((s) => {
2370
+ var l;
2371
+ return o.parentId === s.id && ((l = o.context) == null ? void 0 : l.open);
2372
+ });
2373
+ }), n = n.concat(r);
2374
+ return n;
2375
+ }
2376
+ const xn = () => ({
2377
+ getShadowRoot: !0,
2378
+ displayCheck: (
2379
+ // JSDOM does not support the `tabbable` library. To solve this we can
2380
+ // check if `ResizeObserver` is a real function (not polyfilled), which
2381
+ // determines if the current environment is JSDOM-like.
2382
+ typeof ResizeObserver == "function" && ResizeObserver.toString().includes("[native code]") ? "full" : "none"
2383
+ )
2384
+ });
2385
+ function wn(e, t) {
2386
+ const n = vn(e, xn());
2387
+ t === "prev" && n.reverse();
2388
+ const r = n.indexOf(Cr(fe(e)));
2389
+ return n.slice(r + 1)[0];
2390
+ }
2391
+ function jo() {
2392
+ return wn(document.body, "next");
2393
+ }
2394
+ function Ho() {
2395
+ return wn(document.body, "prev");
2396
+ }
2397
+ function it(e, t) {
2398
+ const n = t || e.currentTarget, r = e.relatedTarget;
2399
+ return !r || !pe(n, r);
2400
+ }
2401
+ function Vo(e) {
2402
+ vn(e, xn()).forEach((n) => {
2403
+ n.dataset.tabindex = n.getAttribute("tabindex") || "", n.setAttribute("tabindex", "-1");
2404
+ });
2405
+ }
2406
+ function _o(e) {
2407
+ e.querySelectorAll("[data-tabindex]").forEach((n) => {
2408
+ const r = n.dataset.tabindex;
2409
+ delete n.dataset.tabindex, r ? n.setAttribute("tabindex", r) : n.removeAttribute("tabindex");
2410
+ });
2411
+ }
2412
+ const $n = {
2413
+ border: 0,
2414
+ clip: "rect(0 0 0 0)",
2415
+ height: "1px",
2416
+ margin: "-1px",
2417
+ overflow: "hidden",
2418
+ padding: 0,
2419
+ position: "fixed",
2420
+ whiteSpace: "nowrap",
2421
+ width: "1px",
2422
+ top: 0,
2423
+ left: 0
2424
+ };
2425
+ let Yo;
2426
+ function jt(e) {
2427
+ e.key === "Tab" && (e.target, clearTimeout(Yo));
2428
+ }
2429
+ const Ht = /* @__PURE__ */ y.forwardRef(function(t, n) {
2430
+ const [r, o] = y.useState();
2431
+ Q(() => (kr() && o("button"), document.addEventListener("keydown", jt), () => {
2432
+ document.removeEventListener("keydown", jt);
2433
+ }), []);
2434
+ const i = {
2435
+ ref: n,
2436
+ tabIndex: 0,
2437
+ // Role is only for VoiceOver
2438
+ role: r,
2439
+ "aria-hidden": r ? void 0 : !0,
2440
+ [Qe("focus-guard")]: "",
2441
+ style: $n
2442
+ };
2443
+ return /* @__PURE__ */ y.createElement("span", dt({}, t, i));
2444
+ }), Sn = /* @__PURE__ */ y.createContext(null), Vt = /* @__PURE__ */ Qe("portal");
2445
+ function Ko(e) {
2446
+ let {
2447
+ id: t,
2448
+ root: n
2449
+ } = e === void 0 ? {} : e;
2450
+ const [r, o] = y.useState(null), i = vt(), s = Go(), l = y.useRef(null);
2451
+ return Q(() => () => {
2452
+ r == null || r.remove(), queueMicrotask(() => {
2453
+ l.current = null;
2454
+ });
2455
+ }, [r]), Q(() => {
2456
+ if (l.current)
2457
+ return;
2458
+ const a = t ? document.getElementById(t) : null;
2459
+ if (!a)
2460
+ return;
2461
+ const c = document.createElement("div");
2462
+ c.id = i, c.setAttribute(Vt, ""), a.appendChild(c), l.current = c, o(c);
2463
+ }, [t, i]), Q(() => {
2464
+ if (l.current)
2465
+ return;
2466
+ let a = n || (s == null ? void 0 : s.portalNode);
2467
+ a && !N(a) && (a = a.current), a = a || document.body;
2468
+ let c = null;
2469
+ t && (c = document.createElement("div"), c.id = t, a.appendChild(c));
2470
+ const m = document.createElement("div");
2471
+ m.id = i, m.setAttribute(Vt, ""), a = c || a, a.appendChild(m), l.current = m, o(m);
2472
+ }, [t, n, i, s]), r;
2473
+ }
2474
+ function Xo(e) {
2475
+ let {
2476
+ children: t,
2477
+ id: n,
2478
+ root: r = null,
2479
+ preserveTabOrder: o = !0
2480
+ } = e;
2481
+ const i = Ko({
2482
+ id: n,
2483
+ root: r
2484
+ }), [s, l] = y.useState(null), a = y.useRef(null), c = y.useRef(null), m = y.useRef(null), d = y.useRef(null), f = (
2485
+ // The FocusManager and therefore floating element are currently open/
2486
+ // rendered.
2487
+ !!s && // Guards are only for non-modal focus management.
2488
+ !s.modal && // Don't render if unmount is transitioning.
2489
+ s.open && o && !!(r || i)
2490
+ );
2491
+ return y.useEffect(() => {
2492
+ if (!i || !o || s != null && s.modal)
2493
+ return;
2494
+ function u(g) {
2495
+ i && it(g) && (g.type === "focusin" ? _o : Vo)(i);
2496
+ }
2497
+ return i.addEventListener("focusin", u, !0), i.addEventListener("focusout", u, !0), () => {
2498
+ i.removeEventListener("focusin", u, !0), i.removeEventListener("focusout", u, !0);
2499
+ };
2500
+ }, [i, o, s == null ? void 0 : s.modal]), /* @__PURE__ */ y.createElement(Sn.Provider, {
2501
+ value: y.useMemo(() => ({
2502
+ preserveTabOrder: o,
2503
+ beforeOutsideRef: a,
2504
+ afterOutsideRef: c,
2505
+ beforeInsideRef: m,
2506
+ afterInsideRef: d,
2507
+ portalNode: i,
2508
+ setFocusManagerState: l
2509
+ }), [o, i])
2510
+ }, f && i && /* @__PURE__ */ y.createElement(Ht, {
2511
+ "data-type": "outside",
2512
+ ref: a,
2513
+ onFocus: (u) => {
2514
+ if (it(u, i)) {
2515
+ var g;
2516
+ (g = m.current) == null || g.focus();
2517
+ } else {
2518
+ const p = Ho() || (s == null ? void 0 : s.refs.domReference.current);
2519
+ p == null || p.focus();
2520
+ }
2521
+ }
2522
+ }), f && i && /* @__PURE__ */ y.createElement("span", {
2523
+ "aria-owns": i.id,
2524
+ style: $n
2525
+ }), i && /* @__PURE__ */ Bn(t, i), f && i && /* @__PURE__ */ y.createElement(Ht, {
2526
+ "data-type": "outside",
2527
+ ref: c,
2528
+ onFocus: (u) => {
2529
+ if (it(u, i)) {
2530
+ var g;
2531
+ (g = d.current) == null || g.focus();
2532
+ } else {
2533
+ const p = jo() || (s == null ? void 0 : s.refs.domReference.current);
2534
+ p == null || p.focus(), s != null && s.closeOnFocusOut && (s == null || s.onOpenChange(!1, u.nativeEvent));
2535
+ }
2536
+ }
2537
+ }));
2538
+ }
2539
+ const Go = () => y.useContext(Sn);
2540
+ function _t(e) {
2541
+ return Z(e.target) && e.target.tagName === "BUTTON";
2542
+ }
2543
+ function Yt(e) {
2544
+ return Ar(e);
2545
+ }
2546
+ function Uo(e, t) {
2547
+ t === void 0 && (t = {});
2548
+ const {
2549
+ open: n,
2550
+ onOpenChange: r,
2551
+ dataRef: o,
2552
+ elements: {
2553
+ domReference: i
2554
+ }
2555
+ } = e, {
2556
+ enabled: s = !0,
2557
+ event: l = "click",
2558
+ toggle: a = !0,
2559
+ ignoreMouse: c = !1,
2560
+ keyboardHandlers: m = !0
2561
+ } = t, d = y.useRef(), f = y.useRef(!1);
2562
+ return y.useMemo(() => s ? {
2563
+ reference: {
2564
+ onPointerDown(u) {
2565
+ d.current = u.pointerType;
2566
+ },
2567
+ onMouseDown(u) {
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"))));
2569
+ },
2570
+ onClick(u) {
2571
+ if (l === "mousedown" && d.current) {
2572
+ d.current = void 0;
2573
+ return;
2574
+ }
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"));
2576
+ },
2577
+ onKeyDown(u) {
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"));
2579
+ },
2580
+ onKeyUp(u) {
2581
+ u.defaultPrevented || !m || _t(u) || Yt(i) || u.key === " " && f.current && (f.current = !1, r(!(n && a), u.nativeEvent, "click"));
2582
+ }
2583
+ }
2584
+ } : {}, [s, o, l, c, m, i, a, n, r]);
2585
+ }
2586
+ const qo = {
2587
+ pointerdown: "onPointerDown",
2588
+ mousedown: "onMouseDown",
2589
+ click: "onClick"
2590
+ }, Zo = {
2591
+ pointerdown: "onPointerDownCapture",
2592
+ mousedown: "onMouseDownCapture",
2593
+ click: "onClickCapture"
2594
+ }, Kt = (e) => {
2595
+ var t, n;
2596
+ return {
2597
+ escapeKey: typeof e == "boolean" ? e : (t = e == null ? void 0 : e.escapeKey) != null ? t : !1,
2598
+ outsidePress: typeof e == "boolean" ? e : (n = e == null ? void 0 : e.outsidePress) != null ? n : !0
2599
+ };
2600
+ };
2601
+ function Jo(e, t) {
2602
+ t === void 0 && (t = {});
2603
+ const {
2604
+ open: n,
2605
+ onOpenChange: r,
2606
+ nodeId: o,
2607
+ elements: {
2608
+ reference: i,
2609
+ domReference: s,
2610
+ floating: l
2611
+ },
2612
+ dataRef: a
2613
+ } = e, {
2614
+ enabled: c = !0,
2615
+ escapeKey: m = !0,
2616
+ outsidePress: d = !0,
2617
+ outsidePressEvent: f = "pointerdown",
2618
+ referencePress: u = !1,
2619
+ referencePressEvent: g = "pointerdown",
2620
+ ancestorScroll: p = !1,
2621
+ bubbles: w,
2622
+ capture: h
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), {
2624
+ escapeKey: A,
2625
+ outsidePress: T
2626
+ } = Kt(w), {
2627
+ escapeKey: B,
2628
+ outsidePress: D
2629
+ } = Kt(h), L = Re((v) => {
2630
+ if (!n || !c || !m || v.key !== "Escape")
2631
+ return;
2632
+ const I = x ? Ve(x.nodesRef.current, o) : [];
2633
+ if (!A && (v.stopPropagation(), I.length > 0)) {
2634
+ let R = !0;
2635
+ if (I.forEach(($) => {
2636
+ var F;
2637
+ if ((F = $.context) != null && F.open && !$.context.dataRef.current.__escapeKeyBubbles) {
2638
+ R = !1;
2639
+ return;
2640
+ }
2641
+ }), !R)
2642
+ return;
2643
+ }
2644
+ r(!1, Tr(v) ? v.nativeEvent : v, "escape-key");
2645
+ }), M = Re((v) => {
2646
+ var I;
2647
+ const R = () => {
2648
+ var $;
2649
+ L(v), ($ = Se(v)) == null || $.removeEventListener("keydown", R);
2650
+ };
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))
2657
+ return;
2658
+ const $ = Se(v), F = "[" + Qe("inert") + "]", K = fe(l).querySelectorAll(F);
2659
+ let G = N($) ? $ : null;
2660
+ for (; G && !Te(G); ) {
2661
+ const H = he(G);
2662
+ if (Te(H) || !N(H))
2663
+ break;
2664
+ G = H;
2665
+ }
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
2668
+ // element was injected after the floating element rendered.
2669
+ Array.from(K).every((H) => !pe(G, H)))
2670
+ return;
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)
2675
+ return;
2676
+ }
2677
+ const ye = x && Ve(x.nodesRef.current, o).some((H) => {
2678
+ var X;
2679
+ return nt(v, (X = H.context) == null ? void 0 : X.elements.floating);
2680
+ });
2681
+ if (nt(v, l) || nt(v, s) || ye)
2682
+ return;
2683
+ const le = x ? Ve(x.nodesRef.current, o) : [];
2684
+ if (le.length > 0) {
2685
+ let H = !0;
2686
+ if (le.forEach((X) => {
2687
+ var ae;
2688
+ if ((ae = X.context) != null && ae.open && !X.context.dataRef.current.__outsidePressBubbles) {
2689
+ H = !1;
2690
+ return;
2691
+ }
2692
+ }), !H)
2693
+ return;
2694
+ }
2695
+ r(!1, v, "outside-press");
2696
+ }), b = Re((v) => {
2697
+ var I;
2698
+ const R = () => {
2699
+ var $;
2700
+ O(v), ($ = Se(v)) == null || $.removeEventListener(f, R);
2701
+ };
2702
+ (I = Se(v)) == null || I.addEventListener(f, R);
2703
+ });
2704
+ return y.useEffect(() => {
2705
+ if (!n || !c)
2706
+ return;
2707
+ a.current.__escapeKeyBubbles = A, a.current.__outsidePressBubbles = T;
2708
+ function v($) {
2709
+ r(!1, $, "ancestor-scroll");
2710
+ }
2711
+ const I = fe(l);
2712
+ m && I.addEventListener("keydown", B ? M : L, B), S && I.addEventListener(f, D ? b : O, D);
2713
+ let R = [];
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, {
2719
+ passive: !0
2720
+ });
2721
+ }), () => {
2722
+ m && I.removeEventListener("keydown", B ? M : L, B), S && I.removeEventListener(f, D ? b : O, D), R.forEach(($) => {
2723
+ $.removeEventListener("scroll", v);
2724
+ });
2725
+ };
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;
2728
+ }, [S, f]), y.useMemo(() => c ? {
2729
+ reference: {
2730
+ onKeyDown: L,
2731
+ [qo[g]]: (v) => {
2732
+ u && r(!1, v.nativeEvent, "reference-press");
2733
+ }
2734
+ },
2735
+ floating: {
2736
+ onKeyDown: L,
2737
+ onMouseDown() {
2738
+ C.current = !0;
2739
+ },
2740
+ onMouseUp() {
2741
+ C.current = !0;
2742
+ },
2743
+ [Zo[f]]: () => {
2744
+ k.current = !0;
2745
+ }
2746
+ }
2747
+ } : {}, [c, u, f, g, r, L]);
2748
+ }
2749
+ let ft;
2750
+ process.env.NODE_ENV !== "production" && (ft = /* @__PURE__ */ new Set());
2751
+ function Qo(e) {
2752
+ var t;
2753
+ e === void 0 && (e = {});
2754
+ const {
2755
+ open: n = !1,
2756
+ onOpenChange: r,
2757
+ nodeId: o
2758
+ } = e;
2759
+ if (process.env.NODE_ENV !== "production") {
2760
+ var i;
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)) {
2763
+ var s;
2764
+ if (!((s = ft) != null && s.has(T))) {
2765
+ var l;
2766
+ (l = ft) == null || l.add(T), console.error(T);
2767
+ }
2768
+ }
2769
+ }
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,
2774
+ reason: D,
2775
+ nested: u
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
2785
+ // `null` to support `positionReference` + an unstable `reference`
2786
+ // callback ref.
2787
+ T !== null && !N(T)) && d.refs.setReference(T);
2788
+ }, [d.refs]), k = y.useMemo(() => ({
2789
+ ...d.refs,
2790
+ setReference: S,
2791
+ setPositionReference: P,
2792
+ domReference: p
2793
+ }), [d.refs, S, P]), C = y.useMemo(() => ({
2794
+ ...d.elements,
2795
+ domReference: m
2796
+ }), [d.elements, m]), A = y.useMemo(() => ({
2797
+ ...d,
2798
+ refs: k,
2799
+ elements: C,
2800
+ dataRef: w,
2801
+ nodeId: o,
2802
+ floatingId: x,
2803
+ events: h,
2804
+ open: n,
2805
+ onOpenChange: g
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);
2810
+ }), y.useMemo(() => ({
2811
+ ...d,
2812
+ context: A,
2813
+ refs: k,
2814
+ elements: C
2815
+ }), [d, k, C, A]);
2816
+ }
2817
+ const Xt = "active", Gt = "selected";
2818
+ function st(e, t, n) {
2819
+ const r = /* @__PURE__ */ new Map(), o = n === "item";
2820
+ let i = e;
2821
+ if (o && e) {
2822
+ const {
2823
+ [Xt]: s,
2824
+ [Gt]: l,
2825
+ ...a
2826
+ } = e;
2827
+ i = a;
2828
+ }
2829
+ return {
2830
+ ...n === "floating" && {
2831
+ tabIndex: -1
2832
+ },
2833
+ ...i,
2834
+ ...t.map((s) => {
2835
+ const l = s ? s[n] : null;
2836
+ return typeof l == "function" ? e ? l(e) : null : l;
2837
+ }).concat(e).reduce((s, l) => (l && Object.entries(l).forEach((a) => {
2838
+ let [c, m] = a;
2839
+ if (!(o && [Xt, Gt].includes(c)))
2840
+ if (c.indexOf("on") === 0) {
2841
+ if (r.has(c) || r.set(c, []), typeof m == "function") {
2842
+ var d;
2843
+ (d = r.get(c)) == null || d.push(m), s[c] = function() {
2844
+ for (var f, u = arguments.length, g = new Array(u), p = 0; p < u; p++)
2845
+ g[p] = arguments[p];
2846
+ return (f = r.get(c)) == null ? void 0 : f.map((w) => w(...g)).find((w) => w !== void 0);
2847
+ };
2848
+ }
2849
+ } else
2850
+ s[c] = m;
2851
+ }), s), {})
2852
+ };
2853
+ }
2854
+ function ei(e) {
2855
+ e === void 0 && (e = []);
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(
2857
+ (i) => st(i, e, "item"),
2858
+ // Granularly check for `item` changes, because the `getItemProps` getter
2859
+ // should be as referentially stable as possible since it may be passed as
2860
+ // a prop to many components. All `item` key values must therefore be
2861
+ // memoized.
2862
+ e.map((i) => i == null ? void 0 : i.item)
2863
+ );
2864
+ return y.useMemo(() => ({
2865
+ getReferenceProps: n,
2866
+ getFloatingProps: r,
2867
+ getItemProps: o
2868
+ }), [n, r, o]);
2869
+ }
2870
+ const ti = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
2871
+ function ni(e, t) {
2872
+ var n;
2873
+ t === void 0 && (t = {});
2874
+ const {
2875
+ open: r,
2876
+ floatingId: o
2877
+ } = e, {
2878
+ enabled: i = !0,
2879
+ role: s = "dialog"
2880
+ } = t, l = (n = ti.get(s)) != null ? n : s, a = vt(), m = xt() != null;
2881
+ return y.useMemo(() => {
2882
+ if (!i)
2883
+ return {};
2884
+ const d = {
2885
+ id: o,
2886
+ ...l && {
2887
+ role: l
2888
+ }
2889
+ };
2890
+ return l === "tooltip" || s === "label" ? {
2891
+ reference: {
2892
+ ["aria-" + (s === "label" ? "labelledby" : "describedby")]: r ? o : void 0
2893
+ },
2894
+ floating: d
2895
+ } : {
2896
+ reference: {
2897
+ "aria-expanded": r ? "true" : "false",
2898
+ "aria-haspopup": l === "alertdialog" ? "dialog" : l,
2899
+ "aria-controls": r ? o : void 0,
2900
+ ...l === "listbox" && {
2901
+ role: "combobox"
2902
+ },
2903
+ ...l === "menu" && {
2904
+ id: a
2905
+ },
2906
+ ...l === "menu" && m && {
2907
+ role: "menuitem"
2908
+ },
2909
+ ...s === "select" && {
2910
+ "aria-autocomplete": "none"
2911
+ },
2912
+ ...s === "combobox" && {
2913
+ "aria-autocomplete": "list"
2914
+ }
2915
+ },
2916
+ floating: {
2917
+ ...d,
2918
+ ...l === "menu" && {
2919
+ "aria-labelledby": a
2920
+ }
2921
+ },
2922
+ item(f) {
2923
+ let {
2924
+ active: u,
2925
+ selected: g
2926
+ } = f;
2927
+ const p = {
2928
+ role: "option",
2929
+ ...u && {
2930
+ id: o + "-option"
2931
+ }
2932
+ };
2933
+ switch (s) {
2934
+ case "select":
2935
+ return {
2936
+ ...p,
2937
+ "aria-selected": u && g
2938
+ };
2939
+ case "combobox":
2940
+ return {
2941
+ ...p,
2942
+ ...u && {
2943
+ "aria-selected": !0
2944
+ }
2945
+ };
2946
+ }
2947
+ return {};
2948
+ }
2949
+ };
2950
+ }, [i, s, l, r, o, a, m]);
2951
+ }
2952
+ const Ut = (e) => e.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (t, n) => (n ? "-" : "") + t.toLowerCase());
2953
+ function $e(e, t) {
2954
+ return typeof e == "function" ? e(t) : e;
2955
+ }
2956
+ function ri(e, t) {
2957
+ const [n, r] = y.useState(e);
2958
+ return e && !n && r(!0), y.useEffect(() => {
2959
+ if (!e) {
2960
+ const o = setTimeout(() => r(!1), t);
2961
+ return () => clearTimeout(o);
2962
+ }
2963
+ }, [e, t]), n;
2964
+ }
2965
+ function oi(e, t) {
2966
+ t === void 0 && (t = {});
2967
+ const {
2968
+ open: n,
2969
+ elements: {
2970
+ floating: r
2971
+ }
2972
+ } = e, {
2973
+ duration: o = 250
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(() => {
2976
+ l && !d && m("unmounted");
2977
+ }, [l, d]), Q(() => {
2978
+ if (r) {
2979
+ if (n) {
2980
+ m("initial");
2981
+ const f = requestAnimationFrame(() => {
2982
+ m("open");
2983
+ });
2984
+ return () => {
2985
+ cancelAnimationFrame(f);
2986
+ };
2987
+ }
2988
+ a(!0), m("close");
2989
+ }
2990
+ }, [n, r]), {
2991
+ isMounted: d,
2992
+ status: c
2993
+ };
2994
+ }
2995
+ function ii(e, t) {
2996
+ t === void 0 && (t = {});
2997
+ const {
2998
+ initial: n = {
2999
+ opacity: 0
3000
+ },
3001
+ open: r,
3002
+ close: o,
3003
+ common: i,
3004
+ duration: s = 250
3005
+ } = t, l = e.placement, a = l.split("-")[0], c = y.useMemo(() => ({
3006
+ side: a,
3007
+ placement: l
3008
+ }), [a, l]), m = typeof s == "number", d = (m ? s : s.open) || 0, f = (m ? s : s.close) || 0, [u, g] = y.useState(() => ({
3009
+ ...$e(i, c),
3010
+ ...$e(n, c)
3011
+ })), {
3012
+ isMounted: p,
3013
+ status: w
3014
+ } = oi(e, {
3015
+ duration: s
3016
+ }), h = Ce(n), x = Ce(r), P = Ce(o), S = Ce(i);
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,
3021
+ ...A,
3022
+ ...k
3023
+ })), w === "open" && g({
3024
+ transitionProperty: Object.keys(T).map(Ut).join(","),
3025
+ transitionDuration: d + "ms",
3026
+ ...A,
3027
+ ...T
3028
+ }), w === "close") {
3029
+ const B = C || k;
3030
+ g({
3031
+ transitionProperty: Object.keys(B).map(Ut).join(","),
3032
+ transitionDuration: f + "ms",
3033
+ ...A,
3034
+ ...B
3035
+ });
3036
+ }
3037
+ }, [f, P, h, x, S, d, w, c]), {
3038
+ isMounted: p,
3039
+ styles: u
3040
+ };
3041
+ }
3042
+ function qt(e, t) {
3043
+ const [n, r] = e;
3044
+ let o = !1;
3045
+ const i = t.length;
3046
+ for (let s = 0, l = i - 1; s < i; l = s++) {
3047
+ const [a, c] = t[s] || [0, 0], [m, d] = t[l] || [0, 0];
3048
+ c >= r != d >= r && n <= (m - a) * (r - c) / (d - c) + a && (o = !o);
3049
+ }
3050
+ return o;
3051
+ }
3052
+ function si(e, t) {
3053
+ return e[0] >= t.x && e[0] <= t.x + t.width && e[1] >= t.y && e[1] <= t.y + t.height;
3054
+ }
3055
+ function li(e) {
3056
+ e === void 0 && (e = {});
3057
+ const {
3058
+ buffer: t = 0.5,
3059
+ blockPointerEvents: n = !1,
3060
+ requireIntent: r = !0
3061
+ } = e;
3062
+ let o, i = !1, s = null, l = null, a = performance.now();
3063
+ function c(d, f) {
3064
+ const u = performance.now(), g = u - a;
3065
+ if (s === null || l === null || g === 0)
3066
+ return s = d, l = f, a = u, null;
3067
+ const p = d - s, w = f - l, x = Math.sqrt(p * p + w * w) / g;
3068
+ return s = d, l = f, a = u, x;
3069
+ }
3070
+ const m = (d) => {
3071
+ let {
3072
+ x: f,
3073
+ y: u,
3074
+ placement: g,
3075
+ elements: p,
3076
+ onClose: w,
3077
+ nodeId: h,
3078
+ tree: x
3079
+ } = d;
3080
+ return function(S) {
3081
+ function k() {
3082
+ clearTimeout(o), w();
3083
+ }
3084
+ if (clearTimeout(o), !p.domReference || !p.floating || g == null || f == null || u == null)
3085
+ return;
3086
+ const {
3087
+ clientX: C,
3088
+ clientY: A
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))
3091
+ return;
3092
+ if (M && (i = !1), M && !D) {
3093
+ i = !0;
3094
+ return;
3095
+ }
3096
+ if (D && N(S.relatedTarget) && pe(p.floating, S.relatedTarget) || x && Ve(x.nodesRef.current, h).some((ce) => {
3097
+ let {
3098
+ context: j
3099
+ } = ce;
3100
+ return j == null ? void 0 : j.open;
3101
+ }))
3102
+ 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();
3105
+ let X = [];
3106
+ switch (v) {
3107
+ case "top":
3108
+ X = [[G, O.top + 1], [G, b.bottom - 1], [ye, b.bottom - 1], [ye, O.top + 1]];
3109
+ break;
3110
+ case "bottom":
3111
+ X = [[G, b.top + 1], [G, O.bottom - 1], [ye, O.bottom - 1], [ye, b.top + 1]];
3112
+ break;
3113
+ case "left":
3114
+ X = [[b.right - 1, H], [b.right - 1, le], [O.left + 1, le], [O.left + 1, H]];
3115
+ break;
3116
+ case "right":
3117
+ X = [[O.right - 1, H], [O.right - 1, le], [b.left + 1, le], [b.left + 1, H]];
3118
+ break;
3119
+ }
3120
+ function ae(ce) {
3121
+ let [j, _] = ce;
3122
+ switch (v) {
3123
+ case "top": {
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];
3126
+ }
3127
+ case "bottom": {
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];
3130
+ }
3131
+ case "left": {
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];
3134
+ }
3135
+ case "right": {
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];
3138
+ }
3139
+ }
3140
+ }
3141
+ if (!qt([C, A], X)) {
3142
+ if (i && !$)
3143
+ return k();
3144
+ if (!D && r) {
3145
+ const ce = c(S.clientX, S.clientY);
3146
+ if (ce !== null && ce < 0.1)
3147
+ return k();
3148
+ }
3149
+ qt([C, A], ae([f, u])) ? !i && r && (o = window.setTimeout(k, 40)) : k();
3150
+ }
3151
+ };
3152
+ };
3153
+ return m.__options = {
3154
+ blockPointerEvents: n
3155
+ }, m;
3156
+ }
3157
+ const ai = V("div"), $t = kn(
3158
+ {}
3159
+ ), vi = ({
3160
+ children: e,
3161
+ offset: t,
3162
+ open: n,
3163
+ onOpenChange: r,
3164
+ trigger: o = "click",
3165
+ hoverDelay: i,
3166
+ placement: s = "bottom",
3167
+ role: l = "dialog"
3168
+ }) => {
3169
+ const { refs: a, floatingStyles: c, context: m } = Qo({
3170
+ open: n,
3171
+ onOpenChange: r,
3172
+ placement: s,
3173
+ whileElementsMounted: ao,
3174
+ middleware: [Vr(t), uo(), co()]
3175
+ }), { isMounted: d, styles: f } = ii(m, {
3176
+ initial: ({ side: S }) => ({
3177
+ opacity: 0,
3178
+ transform: {
3179
+ top: "translateY(-0.5rem)",
3180
+ right: "translateX(0.5rem)",
3181
+ bottom: "translateY(0.5rem)",
3182
+ left: "translateX(-0.5rem)"
3183
+ }[S]
3184
+ })
3185
+ }), u = Uo(m, { enabled: o === "click" }), g = zo(m, {
3186
+ enabled: o === "hover",
3187
+ delay: i,
3188
+ handleClose: li()
3189
+ }), p = Jo(m), w = ni(m, { role: l }), { getFloatingProps: h, getReferenceProps: x } = ei([
3190
+ u,
3191
+ g,
3192
+ p,
3193
+ w
3194
+ ]), P = Tn(
3195
+ () => ({
3196
+ getFloatingProps: h,
3197
+ getReferenceProps: x,
3198
+ floatingStyles: c,
3199
+ refs: a,
3200
+ isMounted: d,
3201
+ transitionStyles: f
3202
+ }),
3203
+ [
3204
+ h,
3205
+ x,
3206
+ d,
3207
+ a,
3208
+ c,
3209
+ f
3210
+ ]
3211
+ );
3212
+ return /* @__PURE__ */ z($t.Provider, { value: P, children: e });
3213
+ }, xi = ({ children: e }) => {
3214
+ const { getReferenceProps: t, refs: n } = Qt($t);
3215
+ return /* @__PURE__ */ z(En, { children: In(e) && Pn(e, {
3216
+ ref: n.setReference,
3217
+ ...t()
3218
+ }) });
3219
+ }, wi = ({ children: e, overlayCardProps: t }) => {
3220
+ const {
3221
+ getFloatingProps: n,
3222
+ isMounted: r,
3223
+ refs: o,
3224
+ floatingStyles: i,
3225
+ transitionStyles: s
3226
+ } = Qt($t);
3227
+ return r ? /* @__PURE__ */ z(Xo, { children: /* @__PURE__ */ z(
3228
+ ai,
3229
+ {
3230
+ ref: o.setFloating,
3231
+ style: i,
3232
+ ...n(),
3233
+ css: {
3234
+ zIndex: "$overlayCard"
3235
+ },
3236
+ children: /* @__PURE__ */ z(tn, { ...t, style: s, children: e })
3237
+ }
3238
+ ) }) : null;
3239
+ }, $i = V("span", {
3240
+ flex: "0 0 auto",
3241
+ display: "inline-flex",
3242
+ padding: "$1 $2",
3243
+ fontSize: "$xs",
3244
+ fontWeight: "$medium",
3245
+ lineHeight: "1",
3246
+ whiteSpace: "nowrap",
3247
+ borderRadius: "$sm",
3248
+ overflow: "hidden",
3249
+ variants: {
3250
+ color: {
3251
+ success: {
3252
+ backgroundColor: "$green200",
3253
+ color: "$green800"
3254
+ },
3255
+ warning: {
3256
+ backgroundColor: "$yellow100",
3257
+ color: "$yellow700"
3258
+ },
3259
+ danger: {
3260
+ backgroundColor: "$red200",
3261
+ color: "$red800"
3262
+ },
3263
+ primary: {
3264
+ backgroundColor: "$blue200",
3265
+ color: "$blue800"
3266
+ },
3267
+ secondary: {
3268
+ backgroundColor: "$gray200",
3269
+ color: "$gray800"
3270
+ }
3271
+ }
3272
+ },
3273
+ defaultVariants: {
3274
+ color: "primary"
3275
+ }
3276
+ }), Si = V(Le.Root, {
3277
+ backgroundColor: "$gray50",
3278
+ display: "flex",
3279
+ alignItems: "center",
3280
+ padding: "$1",
3281
+ gap: "$1"
3282
+ }), Ri = V(Le.ToggleGroup, {
3283
+ display: "flex",
3284
+ gap: "$1",
3285
+ alignItems: "center"
3286
+ }), Ei = V(Le.Separator, {
3287
+ width: "1px",
3288
+ height: "1.5rem",
3289
+ my: "$1",
3290
+ mx: "$1",
3291
+ backgroundColor: "$border"
3292
+ }), Rn = Pe(({ css: e, ...t }, n) => /* @__PURE__ */ z(
3293
+ hr,
3294
+ {
3295
+ ref: n,
3296
+ icon: !0,
3297
+ css: {
3298
+ width: "auto",
3299
+ "&[data-state='on']": {
3300
+ backgroundColor: "$blue200",
3301
+ color: "$blue800"
3302
+ },
3303
+ ...e
3304
+ },
3305
+ ...t
3306
+ }
3307
+ )), Ci = Pe(
3308
+ ({ children: e, dropdown: t, ...n }, r) => /* @__PURE__ */ z(
3309
+ Le.Button,
3310
+ {
3311
+ asChild: !0,
3312
+ ref: r,
3313
+ children: /* @__PURE__ */ Ze(
3314
+ Rn,
3315
+ {
3316
+ variant: "transparent",
3317
+ color: "primary",
3318
+ ...n,
3319
+ children: [
3320
+ e,
3321
+ t && /* @__PURE__ */ z(On, {})
3322
+ ]
3323
+ }
3324
+ )
3325
+ }
3326
+ )
3327
+ ), ki = Pe(({
3328
+ children: e,
3329
+ value: t,
3330
+ ...n
3331
+ }, r) => /* @__PURE__ */ z(
3332
+ Le.ToggleItem,
3333
+ {
3334
+ value: t,
3335
+ asChild: !0,
3336
+ ref: r,
3337
+ children: /* @__PURE__ */ z(
3338
+ Rn,
3339
+ {
3340
+ variant: "transparent",
3341
+ color: "primary",
3342
+ icon: !0,
3343
+ ...n,
3344
+ children: e
3345
+ }
3346
+ )
3347
+ }
3348
+ )), ci = V(tn, {
3349
+ minWidth: "max(var(--radix-popper-anchor-width), 12rem)",
3350
+ padding: "$1"
3351
+ }), St = gt({
3352
+ padding: "$2 $2 $2 1.5rem",
3353
+ fontSize: "$sm",
3354
+ lineHeight: "1.25",
3355
+ cursor: "pointer",
3356
+ borderRadius: "$sm",
3357
+ position: "relative",
3358
+ color: "$primaryTextOnWhite",
3359
+ display: "flex",
3360
+ alignItems: "center",
3361
+ ":focus-visisble": {
3362
+ outline: "none"
3363
+ },
3364
+ "&[data-highlighted], &:hover": {
3365
+ outline: "none",
3366
+ backgroundColor: "$hoverDarker"
3367
+ },
3368
+ "&[data-disabled]": {
3369
+ color: "$gray500",
3370
+ "&:hover": {
3371
+ backgroundColor: "transparent"
3372
+ }
3373
+ }
3374
+ }), Ti = ({
3375
+ side: e = "bottom",
3376
+ align: t = "center",
3377
+ trigger: n,
3378
+ children: r,
3379
+ sideOffset: o,
3380
+ modal: i
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,
3385
+ {
3386
+ asChild: !0,
3387
+ side: e,
3388
+ align: t,
3389
+ collisionPadding: 10,
3390
+ sideOffset: o,
3391
+ children: /* @__PURE__ */ z(ci, { children: r })
3392
+ }
3393
+ ) })
3394
+ ] }), ui = V(ee.ItemIndicator, {
3395
+ position: "absolute",
3396
+ left: 0,
3397
+ top: 0,
3398
+ bottom: 0,
3399
+ width: "1.5rem",
3400
+ display: "flex",
3401
+ justifyContent: "center",
3402
+ alignItems: "center"
3403
+ }), Ii = V(ee.Separator, {
3404
+ height: 1,
3405
+ backgroundColor: "$gray200",
3406
+ margin: 1
3407
+ }), Pi = V(ee.Item, St), Ai = V(ee.Item, St, {
3408
+ padding: "$2",
3409
+ display: "flex",
3410
+ alignItems: "center",
3411
+ gap: "$2"
3412
+ }), di = V(ee.CheckboxItem, St), Bi = ({
3413
+ value: e,
3414
+ onChange: t,
3415
+ children: n
3416
+ }) => /* @__PURE__ */ Ze(
3417
+ di,
3418
+ {
3419
+ checked: e,
3420
+ onCheckedChange: t,
3421
+ children: [
3422
+ /* @__PURE__ */ z(ui, { children: /* @__PURE__ */ z(Dn, { size: "0.75rem" }) }),
3423
+ n
3424
+ ]
3425
+ }
3426
+ );
3427
+ export {
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,
3435
+ gr as S,
3436
+ Ci as T,
3437
+ Ai as a,
3438
+ Ri as b,
3439
+ gt as c,
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,
3448
+ Ei as l,
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
3463
+ };