@arkitektbedriftene/fe-lib 0.3.16 → 0.3.17

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,3404 @@
1
+ import { jsx as z, jsxs as Ge, Fragment as En } from "react/jsx-runtime";
2
+ import * as y from "react";
3
+ import xe, { forwardRef as Ie, useLayoutEffect as qt, useEffect as Zt, useRef as Cn, createContext as kn, useMemo as Tn, useContext as Jt, 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 Me from "@radix-ui/react-toolbar";
7
+ import { f as On, g as Dn } from "./index.esm-d078f232.js";
8
+ import * as Q from "@radix-ui/react-dropdown-menu";
9
+ var N = "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: N, backgroundColor: N, backgroundImage: N, borderImage: N, border: N, borderBlock: N, borderBlockEnd: N, borderBlockStart: N, borderBottom: N, borderBottomColor: N, borderColor: N, borderInline: N, borderInlineEnd: N, borderInlineStart: N, borderLeft: N, borderLeftColor: N, borderRight: N, borderRightColor: N, borderTop: N, borderTopColor: N, caretColor: N, color: N, columnRuleColor: N, fill: N, outline: N, outlineColor: N, stroke: N, textDecorationColor: N, 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" }, Fn = (e, t) => typeof t == "function" ? { "()": Function.prototype.toString.call(t) } : t, Pe = () => {
10
+ const e = /* @__PURE__ */ Object.create(null);
11
+ return (t, n, ...r) => {
12
+ const o = ((i) => JSON.stringify(i, Fn))(t);
13
+ return o in e ? e[o] : e[o] = n(t, ...r);
14
+ };
15
+ }, de = Symbol.for("sxs.internal"), mt = (e, t) => Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)), St = (e) => {
16
+ for (const t in e)
17
+ return !0;
18
+ return !1;
19
+ }, { hasOwnProperty: Ln } = Object.prototype, lt = (e) => e.includes("-") ? e : e.replace(/[A-Z]/g, (t) => "-" + t.toLowerCase()), Nn = /\s+(?![^()]*\))/, we = (e) => (t) => e(...typeof t == "string" ? String(t).split(Nn) : [t]), Rt = { 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.]+)([^]*)/, Wn = (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 }, ee = (e) => e ? e + "-" : "", Qt = (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 === "$" ? ee(t) + (l.includes("$") ? "" : ee(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, (I) => I[1].toUpperCase()), C = typeof u == "object" && u && u.toString === Vn && (!r.utils[S] || !m.length);
28
+ if (S in r.utils && !C) {
29
+ const I = r.utils[S];
30
+ if (I !== s) {
31
+ s = I, g(I(u)), s = null;
32
+ continue;
33
+ }
34
+ } else if (S in Rt) {
35
+ const I = Rt[S];
36
+ if (I !== l) {
37
+ l = I, g(I(u)), l = null;
38
+ continue;
39
+ }
40
+ }
41
+ if (x && ($ = f.slice(1) in r.media ? "@media " + r.media[f.slice(1)] : f, f = $.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g, (I, A, k, O, D, F) => {
42
+ const M = et.test(A), B = 0.0625 * (M ? -1 : 1), [b, v] = M ? [O, A] : [A, O];
43
+ return "(" + (k[0] === "=" ? "" : k[0] === ">" === M ? "max-" : "min-") + b + ":" + (k[0] !== "=" && k.length === 1 ? v.replace(et, (T, R, w) => Number(R) + B * (k === ">" ? 1 : -1) + w) : v) + (D ? ") and (" + (D[0] === ">" ? "min-" : "max-") + b + ":" + (D.length === 1 ? F.replace(et, (T, R, w) => Number(R) + B * (D === ">" ? -1 : 1) + w) : F) : "") + ")";
44
+ })), C) {
45
+ const I = x ? d.concat(f) : [...d], A = x ? [...m] : Wn(m, f.split(Hn));
46
+ i !== void 0 && o(Et(...i)), i = void 0, a(u, A, I);
47
+ } else
48
+ i === void 0 && (i = [[], m, d]), f = x || f.charCodeAt(0) !== 36 ? f : `--${ee(r.prefix)}${f.slice(1).replace(/\$/g, "-")}`, u = C ? u : typeof u == "number" ? u && S in _n ? String(u) + "px" : String(u) : Qt(zn(S, u ?? ""), r.prefix, r.themeMap[S]), i[0].push(`${x ? `${f} ` : `${lt(f)}:`}${u}`);
49
+ }
50
+ }
51
+ var $, h;
52
+ };
53
+ g(c), i !== void 0 && o(Et(...i)), i = void 0;
54
+ };
55
+ a(e, t, n);
56
+ }, Et = (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 }, Ct = (e) => String.fromCharCode(e + (e > 25 ? 39 : 97)), fe = (e) => ((t) => {
57
+ let n, r = "";
58
+ for (n = Math.abs(t); n > 52; n = n / 52 | 0)
59
+ r = Ct(n % 52) + r;
60
+ return Ct(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), Oe = ["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 = Oe[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 = Oe.length - 1; l >= 0; --l) {
134
+ const a = Oe[l];
135
+ if (!s[a]) {
136
+ const c = Oe[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
+ }, Be = Symbol(), Gn = Pe(), kt = (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[de]) {
157
+ r.type == null && (r.type = o[de].type);
158
+ for (const i of o[de].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 = `${ee(o.prefix)}c-${fe(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, Ln.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 $ = u[g], h = [p, $, !St($)];
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 $ in g)
184
+ g[$] = String(g[$]);
185
+ const p = [g, u, !St(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[Be].length; u++) {
193
+ const [g, p] = f[Be][u];
194
+ d.rules[g].apply(p);
195
+ }
196
+ return f[Be] = [], null;
197
+ }
198
+ return f[Be] = [], f.rules = {}, Oe.forEach((u) => f.rules[u] = { apply: (g) => f[Be].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 C = Tt(P, g, e.media), I = Tt(S, g, e.media, !0);
214
+ for (const A of C)
215
+ if (A !== void 0)
216
+ for (const [k, O, D] of A) {
217
+ const F = `${h}-${fe(O)}-${k}`;
218
+ p.add(F);
219
+ const M = (D ? n.rules.resonevar : n.rules.onevar).cache, B = D ? a.resonevar : a.onevar;
220
+ M.has(F) || (M.add(F), Ee(O, [`.${F}`], [], e, (b) => {
221
+ B.apply(b);
222
+ }));
223
+ }
224
+ for (const A of I)
225
+ if (A !== void 0)
226
+ for (const [k, O] of A) {
227
+ const D = `${h}-${fe(O)}-${k}`;
228
+ p.add(D), n.rules.allvar.cache.has(D) || (n.rules.allvar.cache.add(D), Ee(O, [`.${D}`], [], e, (F) => {
229
+ a.allvar.apply(F);
230
+ }));
231
+ }
232
+ }
233
+ if (typeof f == "object" && f) {
234
+ const h = `${r}-i${fe(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 $ = u.className = [...p].join(" ");
242
+ return { type: t.type, className: $, selector: c, props: u, toString: () => $, deferredInjector: l };
243
+ };
244
+ return mt(m, { className: r, selector: c, [de]: 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
+ }, Tt = (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 $ in f) {
272
+ if (d === String(f[$])) {
273
+ if ($ !== "@initial") {
274
+ const h = $.slice(1);
275
+ (g = g || []).push(h in n ? n[h] : $.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 = Pe(), er = (e, t) => Qn(e, () => (...n) => {
290
+ const r = () => {
291
+ for (let o of n) {
292
+ o = typeof o == "object" && o || {};
293
+ let i = fe(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 = Pe(), nr = (e, t) => tr(e, () => (n) => {
310
+ const r = `${ee(e.prefix)}k-${fe(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 "--" + ee(this.prefix) + ee(this.scale) + this.token;
332
+ }
333
+ toString() {
334
+ return this.computedValue;
335
+ }
336
+ }, or = Pe(), ir = (e, t) => or(e, () => (n, r) => {
337
+ r = typeof n == "object" && n || Object(r);
338
+ const o = `.${n = (n = typeof n == "string" ? n : "") || `${ee(e.prefix)}t-${fe(r)}`}`, i = {}, s = [];
339
+ for (const a in r) {
340
+ i[a] = {};
341
+ for (const c in r[a]) {
342
+ const m = `--${ee(e.prefix)}${a}-${c}`, d = Qt(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 = Pe(), lr = Pe(), 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: kt(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 = kt(n, r);
371
+ return (...i) => {
372
+ const s = o(...i), l = s[de].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[de] = s[de], a;
377
+ };
378
+ }))(t), t;
379
+ };
380
+ let It = 9999;
381
+ const tt = () => (It--, It), { styled: V, css: gt, keyframes: Ae, globalCss: pi } = 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 = Ae({
509
+ "0%": {
510
+ transform: "rotate(0)"
511
+ },
512
+ "100%": {
513
+ transform: "rotate(360deg)"
514
+ }
515
+ }), ur = Ae({
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 = Ie(
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 = Ie(
741
+ ({ children: e, disabled: t, isLoading: n, variant: r, color: o, ...i }, s) => (!o && r === "primary" && (o = "primary"), /* @__PURE__ */ Ge(
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
+ }), hi = Ie(
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 = Ae({
807
+ "0%": { opacity: 0, transform: "translateY(0.5rem)" },
808
+ "100%": { opacity: 1, transform: "translateY(0)" }
809
+ }), vr = Ae({
810
+ "0%": { opacity: 0, transform: "translateX(-0.5rem)" },
811
+ "100%": { opacity: 1, transform: "translateX(0)" }
812
+ }), xr = Ae({
813
+ "0%": { opacity: 0, transform: "translateY(-0.5rem)" },
814
+ "100%": { opacity: 1, transform: "translateY(0)" }
815
+ }), wr = Ae({
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
+ }), Sr = gt({
825
+ animationDuration: "400ms",
826
+ animationTimingFunction: "cubic-bezier(0.16, 1, 0.3, 1)",
827
+ willChange: "transform, opacity",
828
+ '&[data-state="open"]': {
829
+ '&[data-side="top"]': { animationName: xr },
830
+ '&[data-side="right"]': { animationName: wr },
831
+ '&[data-side="bottom"]': { animationName: yr },
832
+ '&[data-side="left"]': { animationName: vr }
833
+ }
834
+ }), en = V(
835
+ "div",
836
+ $r,
837
+ Sr
838
+ );
839
+ function re(e) {
840
+ return tn(e) ? (e.nodeName || "").toLowerCase() : "#document";
841
+ }
842
+ function U(e) {
843
+ var t;
844
+ return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
845
+ }
846
+ function te(e) {
847
+ var t;
848
+ return (t = (tn(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
849
+ }
850
+ function tn(e) {
851
+ return e instanceof Node || e instanceof U(e).Node;
852
+ }
853
+ function W(e) {
854
+ return e instanceof Element || e instanceof U(e).Element;
855
+ }
856
+ function q(e) {
857
+ return e instanceof HTMLElement || e instanceof U(e).HTMLElement;
858
+ }
859
+ function at(e) {
860
+ return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof U(e).ShadowRoot;
861
+ }
862
+ function Fe(e) {
863
+ const {
864
+ overflow: t,
865
+ overflowX: n,
866
+ overflowY: r,
867
+ display: o
868
+ } = Z(e);
869
+ return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
870
+ }
871
+ function Rr(e) {
872
+ return ["table", "td", "th"].includes(re(e));
873
+ }
874
+ function pt(e) {
875
+ const t = ht(), n = Z(e);
876
+ return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
877
+ }
878
+ function Er(e) {
879
+ let t = pe(e);
880
+ for (; q(t) && !Te(t); ) {
881
+ if (pt(t))
882
+ return t;
883
+ t = pe(t);
884
+ }
885
+ return null;
886
+ }
887
+ function ht() {
888
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
889
+ }
890
+ function Te(e) {
891
+ return ["html", "body", "#document"].includes(re(e));
892
+ }
893
+ function Z(e) {
894
+ return U(e).getComputedStyle(e);
895
+ }
896
+ function Ue(e) {
897
+ return W(e) ? {
898
+ scrollLeft: e.scrollLeft,
899
+ scrollTop: e.scrollTop
900
+ } : {
901
+ scrollLeft: e.pageXOffset,
902
+ scrollTop: e.pageYOffset
903
+ };
904
+ }
905
+ function pe(e) {
906
+ if (re(e) === "html")
907
+ return e;
908
+ const t = (
909
+ // Step into the shadow DOM of the parent of a slotted node.
910
+ e.assignedSlot || // DOM Element detected.
911
+ e.parentNode || // ShadowRoot detected.
912
+ at(e) && e.host || // Fallback.
913
+ te(e)
914
+ );
915
+ return at(t) ? t.host : t;
916
+ }
917
+ function nn(e) {
918
+ const t = pe(e);
919
+ return Te(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : q(t) && Fe(t) ? t : nn(t);
920
+ }
921
+ function ne(e, t, n) {
922
+ var r;
923
+ t === void 0 && (t = []), n === void 0 && (n = !0);
924
+ const o = nn(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), s = U(o);
925
+ return i ? t.concat(s, s.visualViewport || [], Fe(o) ? o : [], s.frameElement && n ? ne(s.frameElement) : []) : t.concat(o, ne(o, [], n));
926
+ }
927
+ function Cr(e) {
928
+ let t = e.activeElement;
929
+ for (; ((n = t) == null || (n = n.shadowRoot) == null ? void 0 : n.activeElement) != null; ) {
930
+ var n;
931
+ t = t.shadowRoot.activeElement;
932
+ }
933
+ return t;
934
+ }
935
+ function me(e, t) {
936
+ if (!e || !t)
937
+ return !1;
938
+ const n = t.getRootNode == null ? void 0 : t.getRootNode();
939
+ if (e.contains(t))
940
+ return !0;
941
+ if (n && at(n)) {
942
+ let r = t;
943
+ for (; r; ) {
944
+ if (e === r)
945
+ return !0;
946
+ r = r.parentNode || r.host;
947
+ }
948
+ }
949
+ return !1;
950
+ }
951
+ function kr() {
952
+ return /apple/i.test(navigator.vendor);
953
+ }
954
+ function ze(e, t) {
955
+ const n = ["mouse", "pen"];
956
+ return t || n.push("", void 0), n.includes(e);
957
+ }
958
+ function Tr(e) {
959
+ return "nativeEvent" in e;
960
+ }
961
+ function Ir(e) {
962
+ return e.matches("html,body");
963
+ }
964
+ function ue(e) {
965
+ return (e == null ? void 0 : e.ownerDocument) || document;
966
+ }
967
+ function nt(e, t) {
968
+ if (t == null)
969
+ return !1;
970
+ if ("composedPath" in e)
971
+ return e.composedPath().includes(t);
972
+ const n = e;
973
+ return n.target != null && t.contains(n.target);
974
+ }
975
+ function Se(e) {
976
+ return "composedPath" in e ? e.composedPath()[0] : e.target;
977
+ }
978
+ const Pr = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
979
+ function Ar(e) {
980
+ return q(e) && e.matches(Pr);
981
+ }
982
+ const je = Math.min, ge = Math.max, He = Math.round, Le = Math.floor, oe = (e) => ({
983
+ x: e,
984
+ y: e
985
+ }), Br = {
986
+ left: "right",
987
+ right: "left",
988
+ bottom: "top",
989
+ top: "bottom"
990
+ }, Or = {
991
+ start: "end",
992
+ end: "start"
993
+ };
994
+ function Pt(e, t, n) {
995
+ return ge(e, je(t, n));
996
+ }
997
+ function qe(e, t) {
998
+ return typeof e == "function" ? e(t) : e;
999
+ }
1000
+ function he(e) {
1001
+ return e.split("-")[0];
1002
+ }
1003
+ function Ze(e) {
1004
+ return e.split("-")[1];
1005
+ }
1006
+ function rn(e) {
1007
+ return e === "x" ? "y" : "x";
1008
+ }
1009
+ function on(e) {
1010
+ return e === "y" ? "height" : "width";
1011
+ }
1012
+ function Je(e) {
1013
+ return ["top", "bottom"].includes(he(e)) ? "y" : "x";
1014
+ }
1015
+ function sn(e) {
1016
+ return rn(Je(e));
1017
+ }
1018
+ function Dr(e, t, n) {
1019
+ n === void 0 && (n = !1);
1020
+ const r = Ze(e), o = sn(e), i = on(o);
1021
+ let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
1022
+ return t.reference[i] > t.floating[i] && (s = Ve(s)), [s, Ve(s)];
1023
+ }
1024
+ function Mr(e) {
1025
+ const t = Ve(e);
1026
+ return [ct(e), t, ct(t)];
1027
+ }
1028
+ function ct(e) {
1029
+ return e.replace(/start|end/g, (t) => Or[t]);
1030
+ }
1031
+ function Fr(e, t, n) {
1032
+ const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
1033
+ switch (e) {
1034
+ case "top":
1035
+ case "bottom":
1036
+ return n ? t ? o : r : t ? r : o;
1037
+ case "left":
1038
+ case "right":
1039
+ return t ? i : s;
1040
+ default:
1041
+ return [];
1042
+ }
1043
+ }
1044
+ function Lr(e, t, n, r) {
1045
+ const o = Ze(e);
1046
+ let i = Fr(he(e), n === "start", r);
1047
+ return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(ct)))), i;
1048
+ }
1049
+ function Ve(e) {
1050
+ return e.replace(/left|right|bottom|top/g, (t) => Br[t]);
1051
+ }
1052
+ function Nr(e) {
1053
+ return {
1054
+ top: 0,
1055
+ right: 0,
1056
+ bottom: 0,
1057
+ left: 0,
1058
+ ...e
1059
+ };
1060
+ }
1061
+ function Wr(e) {
1062
+ return typeof e != "number" ? Nr(e) : {
1063
+ top: e,
1064
+ right: e,
1065
+ bottom: e,
1066
+ left: e
1067
+ };
1068
+ }
1069
+ function _e(e) {
1070
+ return {
1071
+ ...e,
1072
+ top: e.y,
1073
+ left: e.x,
1074
+ right: e.x + e.width,
1075
+ bottom: e.y + e.height
1076
+ };
1077
+ }
1078
+ function At(e, t, n) {
1079
+ let {
1080
+ reference: r,
1081
+ floating: o
1082
+ } = e;
1083
+ const i = Je(t), s = sn(t), l = on(s), a = he(t), c = i === "y", m = r.x + r.width / 2 - o.width / 2, d = r.y + r.height / 2 - o.height / 2, f = r[l] / 2 - o[l] / 2;
1084
+ let u;
1085
+ switch (a) {
1086
+ case "top":
1087
+ u = {
1088
+ x: m,
1089
+ y: r.y - o.height
1090
+ };
1091
+ break;
1092
+ case "bottom":
1093
+ u = {
1094
+ x: m,
1095
+ y: r.y + r.height
1096
+ };
1097
+ break;
1098
+ case "right":
1099
+ u = {
1100
+ x: r.x + r.width,
1101
+ y: d
1102
+ };
1103
+ break;
1104
+ case "left":
1105
+ u = {
1106
+ x: r.x - o.width,
1107
+ y: d
1108
+ };
1109
+ break;
1110
+ default:
1111
+ u = {
1112
+ x: r.x,
1113
+ y: r.y
1114
+ };
1115
+ }
1116
+ switch (Ze(t)) {
1117
+ case "start":
1118
+ u[s] -= f * (n && c ? -1 : 1);
1119
+ break;
1120
+ case "end":
1121
+ u[s] += f * (n && c ? -1 : 1);
1122
+ break;
1123
+ }
1124
+ return u;
1125
+ }
1126
+ const zr = async (e, t, n) => {
1127
+ const {
1128
+ placement: r = "bottom",
1129
+ strategy: o = "absolute",
1130
+ middleware: i = [],
1131
+ platform: s
1132
+ } = n, l = i.filter(Boolean), a = await (s.isRTL == null ? void 0 : s.isRTL(t));
1133
+ let c = await s.getElementRects({
1134
+ reference: e,
1135
+ floating: t,
1136
+ strategy: o
1137
+ }), {
1138
+ x: m,
1139
+ y: d
1140
+ } = At(c, r, a), f = r, u = {}, g = 0;
1141
+ for (let p = 0; p < l.length; p++) {
1142
+ const {
1143
+ name: $,
1144
+ fn: h
1145
+ } = l[p], {
1146
+ x,
1147
+ y: P,
1148
+ data: S,
1149
+ reset: C
1150
+ } = await h({
1151
+ x: m,
1152
+ y: d,
1153
+ initialPlacement: r,
1154
+ placement: f,
1155
+ strategy: o,
1156
+ middlewareData: u,
1157
+ rects: c,
1158
+ platform: s,
1159
+ elements: {
1160
+ reference: e,
1161
+ floating: t
1162
+ }
1163
+ });
1164
+ m = x ?? m, d = P ?? d, u = {
1165
+ ...u,
1166
+ [$]: {
1167
+ ...u[$],
1168
+ ...S
1169
+ }
1170
+ }, C && g <= 50 && (g++, typeof C == "object" && (C.placement && (f = C.placement), C.rects && (c = C.rects === !0 ? await s.getElementRects({
1171
+ reference: e,
1172
+ floating: t,
1173
+ strategy: o
1174
+ }) : C.rects), {
1175
+ x: m,
1176
+ y: d
1177
+ } = At(c, f, a)), p = -1);
1178
+ }
1179
+ return {
1180
+ x: m,
1181
+ y: d,
1182
+ placement: f,
1183
+ strategy: o,
1184
+ middlewareData: u
1185
+ };
1186
+ };
1187
+ async function ln(e, t) {
1188
+ var n;
1189
+ t === void 0 && (t = {});
1190
+ const {
1191
+ x: r,
1192
+ y: o,
1193
+ platform: i,
1194
+ rects: s,
1195
+ elements: l,
1196
+ strategy: a
1197
+ } = e, {
1198
+ boundary: c = "clippingAncestors",
1199
+ rootBoundary: m = "viewport",
1200
+ elementContext: d = "floating",
1201
+ altBoundary: f = !1,
1202
+ padding: u = 0
1203
+ } = qe(t, e), g = Wr(u), $ = l[f ? d === "floating" ? "reference" : "floating" : d], h = _e(await i.getClippingRect({
1204
+ element: (n = await (i.isElement == null ? void 0 : i.isElement($))) == null || n ? $ : $.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(l.floating)),
1205
+ boundary: c,
1206
+ rootBoundary: m,
1207
+ strategy: a
1208
+ })), x = d === "floating" ? {
1209
+ ...s.floating,
1210
+ x: r,
1211
+ y: o
1212
+ } : 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)) || {
1213
+ x: 1,
1214
+ y: 1
1215
+ } : {
1216
+ x: 1,
1217
+ y: 1
1218
+ }, C = _e(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
1219
+ elements: l,
1220
+ rect: x,
1221
+ offsetParent: P,
1222
+ strategy: a
1223
+ }) : x);
1224
+ return {
1225
+ top: (h.top - C.top + g.top) / S.y,
1226
+ bottom: (C.bottom - h.bottom + g.bottom) / S.y,
1227
+ left: (h.left - C.left + g.left) / S.x,
1228
+ right: (C.right - h.right + g.right) / S.x
1229
+ };
1230
+ }
1231
+ const jr = function(e) {
1232
+ return e === void 0 && (e = {}), {
1233
+ name: "flip",
1234
+ options: e,
1235
+ async fn(t) {
1236
+ var n, r;
1237
+ const {
1238
+ placement: o,
1239
+ middlewareData: i,
1240
+ rects: s,
1241
+ initialPlacement: l,
1242
+ platform: a,
1243
+ elements: c
1244
+ } = t, {
1245
+ mainAxis: m = !0,
1246
+ crossAxis: d = !0,
1247
+ fallbackPlacements: f,
1248
+ fallbackStrategy: u = "bestFit",
1249
+ fallbackAxisSideDirection: g = "none",
1250
+ flipAlignment: p = !0,
1251
+ ...$
1252
+ } = qe(e, t);
1253
+ if ((n = i.arrow) != null && n.alignmentOffset)
1254
+ return {};
1255
+ const h = he(o), x = he(l) === l, P = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), S = f || (x || !p ? [Ve(l)] : Mr(l));
1256
+ !f && g !== "none" && S.push(...Lr(l, p, g, P));
1257
+ const C = [l, ...S], I = await ln(t, $), A = [];
1258
+ let k = ((r = i.flip) == null ? void 0 : r.overflows) || [];
1259
+ if (m && A.push(I[h]), d) {
1260
+ const M = Dr(o, s, P);
1261
+ A.push(I[M[0]], I[M[1]]);
1262
+ }
1263
+ if (k = [...k, {
1264
+ placement: o,
1265
+ overflows: A
1266
+ }], !A.every((M) => M <= 0)) {
1267
+ var O, D;
1268
+ const M = (((O = i.flip) == null ? void 0 : O.index) || 0) + 1, B = C[M];
1269
+ if (B)
1270
+ return {
1271
+ data: {
1272
+ index: M,
1273
+ overflows: k
1274
+ },
1275
+ reset: {
1276
+ placement: B
1277
+ }
1278
+ };
1279
+ let b = (D = k.filter((v) => v.overflows[0] <= 0).sort((v, T) => v.overflows[1] - T.overflows[1])[0]) == null ? void 0 : D.placement;
1280
+ if (!b)
1281
+ switch (u) {
1282
+ case "bestFit": {
1283
+ var F;
1284
+ const v = (F = k.map((T) => [T.placement, T.overflows.filter((R) => R > 0).reduce((R, w) => R + w, 0)]).sort((T, R) => T[1] - R[1])[0]) == null ? void 0 : F[0];
1285
+ v && (b = v);
1286
+ break;
1287
+ }
1288
+ case "initialPlacement":
1289
+ b = l;
1290
+ break;
1291
+ }
1292
+ if (o !== b)
1293
+ return {
1294
+ reset: {
1295
+ placement: b
1296
+ }
1297
+ };
1298
+ }
1299
+ return {};
1300
+ }
1301
+ };
1302
+ };
1303
+ async function Hr(e, t) {
1304
+ const {
1305
+ placement: n,
1306
+ platform: r,
1307
+ elements: o
1308
+ } = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = he(n), l = Ze(n), a = Je(n) === "y", c = ["left", "top"].includes(s) ? -1 : 1, m = i && a ? -1 : 1, d = qe(t, e);
1309
+ let {
1310
+ mainAxis: f,
1311
+ crossAxis: u,
1312
+ alignmentAxis: g
1313
+ } = typeof d == "number" ? {
1314
+ mainAxis: d,
1315
+ crossAxis: 0,
1316
+ alignmentAxis: null
1317
+ } : {
1318
+ mainAxis: 0,
1319
+ crossAxis: 0,
1320
+ alignmentAxis: null,
1321
+ ...d
1322
+ };
1323
+ return l && typeof g == "number" && (u = l === "end" ? g * -1 : g), a ? {
1324
+ x: u * m,
1325
+ y: f * c
1326
+ } : {
1327
+ x: f * c,
1328
+ y: u * m
1329
+ };
1330
+ }
1331
+ const Vr = function(e) {
1332
+ return e === void 0 && (e = 0), {
1333
+ name: "offset",
1334
+ options: e,
1335
+ async fn(t) {
1336
+ var n, r;
1337
+ const {
1338
+ x: o,
1339
+ y: i,
1340
+ placement: s,
1341
+ middlewareData: l
1342
+ } = t, a = await Hr(t, e);
1343
+ return s === ((n = l.offset) == null ? void 0 : n.placement) && (r = l.arrow) != null && r.alignmentOffset ? {} : {
1344
+ x: o + a.x,
1345
+ y: i + a.y,
1346
+ data: {
1347
+ ...a,
1348
+ placement: s
1349
+ }
1350
+ };
1351
+ }
1352
+ };
1353
+ }, _r = function(e) {
1354
+ return e === void 0 && (e = {}), {
1355
+ name: "shift",
1356
+ options: e,
1357
+ async fn(t) {
1358
+ const {
1359
+ x: n,
1360
+ y: r,
1361
+ placement: o
1362
+ } = t, {
1363
+ mainAxis: i = !0,
1364
+ crossAxis: s = !1,
1365
+ limiter: l = {
1366
+ fn: ($) => {
1367
+ let {
1368
+ x: h,
1369
+ y: x
1370
+ } = $;
1371
+ return {
1372
+ x: h,
1373
+ y: x
1374
+ };
1375
+ }
1376
+ },
1377
+ ...a
1378
+ } = qe(e, t), c = {
1379
+ x: n,
1380
+ y: r
1381
+ }, m = await ln(t, a), d = Je(he(o)), f = rn(d);
1382
+ let u = c[f], g = c[d];
1383
+ if (i) {
1384
+ const $ = f === "y" ? "top" : "left", h = f === "y" ? "bottom" : "right", x = u + m[$], P = u - m[h];
1385
+ u = Pt(x, u, P);
1386
+ }
1387
+ if (s) {
1388
+ const $ = d === "y" ? "top" : "left", h = d === "y" ? "bottom" : "right", x = g + m[$], P = g - m[h];
1389
+ g = Pt(x, g, P);
1390
+ }
1391
+ const p = l.fn({
1392
+ ...t,
1393
+ [f]: u,
1394
+ [d]: g
1395
+ });
1396
+ return {
1397
+ ...p,
1398
+ data: {
1399
+ x: p.x - n,
1400
+ y: p.y - r
1401
+ }
1402
+ };
1403
+ }
1404
+ };
1405
+ };
1406
+ function an(e) {
1407
+ const t = Z(e);
1408
+ let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
1409
+ const o = q(e), i = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, l = He(n) !== i || He(r) !== s;
1410
+ return l && (n = i, r = s), {
1411
+ width: n,
1412
+ height: r,
1413
+ $: l
1414
+ };
1415
+ }
1416
+ function bt(e) {
1417
+ return W(e) ? e : e.contextElement;
1418
+ }
1419
+ function ke(e) {
1420
+ const t = bt(e);
1421
+ if (!q(t))
1422
+ return oe(1);
1423
+ const n = t.getBoundingClientRect(), {
1424
+ width: r,
1425
+ height: o,
1426
+ $: i
1427
+ } = an(t);
1428
+ let s = (i ? He(n.width) : n.width) / r, l = (i ? He(n.height) : n.height) / o;
1429
+ return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
1430
+ x: s,
1431
+ y: l
1432
+ };
1433
+ }
1434
+ const Yr = /* @__PURE__ */ oe(0);
1435
+ function cn(e) {
1436
+ const t = U(e);
1437
+ return !ht() || !t.visualViewport ? Yr : {
1438
+ x: t.visualViewport.offsetLeft,
1439
+ y: t.visualViewport.offsetTop
1440
+ };
1441
+ }
1442
+ function Kr(e, t, n) {
1443
+ return t === void 0 && (t = !1), !n || t && n !== U(e) ? !1 : t;
1444
+ }
1445
+ function be(e, t, n, r) {
1446
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
1447
+ const o = e.getBoundingClientRect(), i = bt(e);
1448
+ let s = oe(1);
1449
+ t && (r ? W(r) && (s = ke(r)) : s = ke(e));
1450
+ const l = Kr(i, n, r) ? cn(i) : oe(0);
1451
+ let a = (o.left + l.x) / s.x, c = (o.top + l.y) / s.y, m = o.width / s.x, d = o.height / s.y;
1452
+ if (i) {
1453
+ const f = U(i), u = r && W(r) ? U(r) : r;
1454
+ let g = f, p = g.frameElement;
1455
+ for (; p && r && u !== g; ) {
1456
+ const $ = ke(p), h = p.getBoundingClientRect(), x = Z(p), P = h.left + (p.clientLeft + parseFloat(x.paddingLeft)) * $.x, S = h.top + (p.clientTop + parseFloat(x.paddingTop)) * $.y;
1457
+ a *= $.x, c *= $.y, m *= $.x, d *= $.y, a += P, c += S, g = U(p), p = g.frameElement;
1458
+ }
1459
+ }
1460
+ return _e({
1461
+ width: m,
1462
+ height: d,
1463
+ x: a,
1464
+ y: c
1465
+ });
1466
+ }
1467
+ const Xr = [":popover-open", ":modal"];
1468
+ function un(e) {
1469
+ return Xr.some((t) => {
1470
+ try {
1471
+ return e.matches(t);
1472
+ } catch {
1473
+ return !1;
1474
+ }
1475
+ });
1476
+ }
1477
+ function Gr(e) {
1478
+ let {
1479
+ elements: t,
1480
+ rect: n,
1481
+ offsetParent: r,
1482
+ strategy: o
1483
+ } = e;
1484
+ const i = o === "fixed", s = te(r), l = t ? un(t.floating) : !1;
1485
+ if (r === s || l && i)
1486
+ return n;
1487
+ let a = {
1488
+ scrollLeft: 0,
1489
+ scrollTop: 0
1490
+ }, c = oe(1);
1491
+ const m = oe(0), d = q(r);
1492
+ if ((d || !d && !i) && ((re(r) !== "body" || Fe(s)) && (a = Ue(r)), q(r))) {
1493
+ const f = be(r);
1494
+ c = ke(r), m.x = f.x + r.clientLeft, m.y = f.y + r.clientTop;
1495
+ }
1496
+ return {
1497
+ width: n.width * c.x,
1498
+ height: n.height * c.y,
1499
+ x: n.x * c.x - a.scrollLeft * c.x + m.x,
1500
+ y: n.y * c.y - a.scrollTop * c.y + m.y
1501
+ };
1502
+ }
1503
+ function Ur(e) {
1504
+ return Array.from(e.getClientRects());
1505
+ }
1506
+ function dn(e) {
1507
+ return be(te(e)).left + Ue(e).scrollLeft;
1508
+ }
1509
+ function qr(e) {
1510
+ const t = te(e), n = Ue(e), r = e.ownerDocument.body, o = ge(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = ge(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
1511
+ let s = -n.scrollLeft + dn(e);
1512
+ const l = -n.scrollTop;
1513
+ return Z(r).direction === "rtl" && (s += ge(t.clientWidth, r.clientWidth) - o), {
1514
+ width: o,
1515
+ height: i,
1516
+ x: s,
1517
+ y: l
1518
+ };
1519
+ }
1520
+ function Zr(e, t) {
1521
+ const n = U(e), r = te(e), o = n.visualViewport;
1522
+ let i = r.clientWidth, s = r.clientHeight, l = 0, a = 0;
1523
+ if (o) {
1524
+ i = o.width, s = o.height;
1525
+ const c = ht();
1526
+ (!c || c && t === "fixed") && (l = o.offsetLeft, a = o.offsetTop);
1527
+ }
1528
+ return {
1529
+ width: i,
1530
+ height: s,
1531
+ x: l,
1532
+ y: a
1533
+ };
1534
+ }
1535
+ function Jr(e, t) {
1536
+ const n = be(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = q(e) ? ke(e) : oe(1), s = e.clientWidth * i.x, l = e.clientHeight * i.y, a = o * i.x, c = r * i.y;
1537
+ return {
1538
+ width: s,
1539
+ height: l,
1540
+ x: a,
1541
+ y: c
1542
+ };
1543
+ }
1544
+ function Bt(e, t, n) {
1545
+ let r;
1546
+ if (t === "viewport")
1547
+ r = Zr(e, n);
1548
+ else if (t === "document")
1549
+ r = qr(te(e));
1550
+ else if (W(t))
1551
+ r = Jr(t, n);
1552
+ else {
1553
+ const o = cn(e);
1554
+ r = {
1555
+ ...t,
1556
+ x: t.x - o.x,
1557
+ y: t.y - o.y
1558
+ };
1559
+ }
1560
+ return _e(r);
1561
+ }
1562
+ function fn(e, t) {
1563
+ const n = pe(e);
1564
+ return n === t || !W(n) || Te(n) ? !1 : Z(n).position === "fixed" || fn(n, t);
1565
+ }
1566
+ function Qr(e, t) {
1567
+ const n = t.get(e);
1568
+ if (n)
1569
+ return n;
1570
+ let r = ne(e, [], !1).filter((l) => W(l) && re(l) !== "body"), o = null;
1571
+ const i = Z(e).position === "fixed";
1572
+ let s = i ? pe(e) : e;
1573
+ for (; W(s) && !Te(s); ) {
1574
+ const l = Z(s), a = pt(s);
1575
+ !a && l.position === "fixed" && (o = null), (i ? !a && !o : !a && l.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || Fe(s) && !a && fn(e, s)) ? r = r.filter((m) => m !== s) : o = l, s = pe(s);
1576
+ }
1577
+ return t.set(e, r), r;
1578
+ }
1579
+ function eo(e) {
1580
+ let {
1581
+ element: t,
1582
+ boundary: n,
1583
+ rootBoundary: r,
1584
+ strategy: o
1585
+ } = e;
1586
+ const s = [...n === "clippingAncestors" ? Qr(t, this._c) : [].concat(n), r], l = s[0], a = s.reduce((c, m) => {
1587
+ const d = Bt(t, m, o);
1588
+ return c.top = ge(d.top, c.top), c.right = je(d.right, c.right), c.bottom = je(d.bottom, c.bottom), c.left = ge(d.left, c.left), c;
1589
+ }, Bt(t, l, o));
1590
+ return {
1591
+ width: a.right - a.left,
1592
+ height: a.bottom - a.top,
1593
+ x: a.left,
1594
+ y: a.top
1595
+ };
1596
+ }
1597
+ function to(e) {
1598
+ const {
1599
+ width: t,
1600
+ height: n
1601
+ } = an(e);
1602
+ return {
1603
+ width: t,
1604
+ height: n
1605
+ };
1606
+ }
1607
+ function no(e, t, n) {
1608
+ const r = q(t), o = te(t), i = n === "fixed", s = be(e, !0, i, t);
1609
+ let l = {
1610
+ scrollLeft: 0,
1611
+ scrollTop: 0
1612
+ };
1613
+ const a = oe(0);
1614
+ if (r || !r && !i)
1615
+ if ((re(t) !== "body" || Fe(o)) && (l = Ue(t)), r) {
1616
+ const d = be(t, !0, i, t);
1617
+ a.x = d.x + t.clientLeft, a.y = d.y + t.clientTop;
1618
+ } else
1619
+ o && (a.x = dn(o));
1620
+ const c = s.left + l.scrollLeft - a.x, m = s.top + l.scrollTop - a.y;
1621
+ return {
1622
+ x: c,
1623
+ y: m,
1624
+ width: s.width,
1625
+ height: s.height
1626
+ };
1627
+ }
1628
+ function Ot(e, t) {
1629
+ return !q(e) || Z(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
1630
+ }
1631
+ function mn(e, t) {
1632
+ const n = U(e);
1633
+ if (!q(e) || un(e))
1634
+ return n;
1635
+ let r = Ot(e, t);
1636
+ for (; r && Rr(r) && Z(r).position === "static"; )
1637
+ r = Ot(r, t);
1638
+ return r && (re(r) === "html" || re(r) === "body" && Z(r).position === "static" && !pt(r)) ? n : r || Er(e) || n;
1639
+ }
1640
+ const ro = async function(e) {
1641
+ const t = this.getOffsetParent || mn, n = this.getDimensions;
1642
+ return {
1643
+ reference: no(e.reference, await t(e.floating), e.strategy),
1644
+ floating: {
1645
+ x: 0,
1646
+ y: 0,
1647
+ ...await n(e.floating)
1648
+ }
1649
+ };
1650
+ };
1651
+ function oo(e) {
1652
+ return Z(e).direction === "rtl";
1653
+ }
1654
+ const io = {
1655
+ convertOffsetParentRelativeRectToViewportRelativeRect: Gr,
1656
+ getDocumentElement: te,
1657
+ getClippingRect: eo,
1658
+ getOffsetParent: mn,
1659
+ getElementRects: ro,
1660
+ getClientRects: Ur,
1661
+ getDimensions: to,
1662
+ getScale: ke,
1663
+ isElement: W,
1664
+ isRTL: oo
1665
+ };
1666
+ function so(e, t) {
1667
+ let n = null, r;
1668
+ const o = te(e);
1669
+ function i() {
1670
+ var l;
1671
+ clearTimeout(r), (l = n) == null || l.disconnect(), n = null;
1672
+ }
1673
+ function s(l, a) {
1674
+ l === void 0 && (l = !1), a === void 0 && (a = 1), i();
1675
+ const {
1676
+ left: c,
1677
+ top: m,
1678
+ width: d,
1679
+ height: f
1680
+ } = e.getBoundingClientRect();
1681
+ if (l || t(), !d || !f)
1682
+ return;
1683
+ const u = Le(m), g = Le(o.clientWidth - (c + d)), p = Le(o.clientHeight - (m + f)), $ = Le(c), x = {
1684
+ rootMargin: -u + "px " + -g + "px " + -p + "px " + -$ + "px",
1685
+ threshold: ge(0, je(1, a)) || 1
1686
+ };
1687
+ let P = !0;
1688
+ function S(C) {
1689
+ const I = C[0].intersectionRatio;
1690
+ if (I !== a) {
1691
+ if (!P)
1692
+ return s();
1693
+ I ? s(!1, I) : r = setTimeout(() => {
1694
+ s(!1, 1e-7);
1695
+ }, 100);
1696
+ }
1697
+ P = !1;
1698
+ }
1699
+ try {
1700
+ n = new IntersectionObserver(S, {
1701
+ ...x,
1702
+ // Handle <iframe>s
1703
+ root: o.ownerDocument
1704
+ });
1705
+ } catch {
1706
+ n = new IntersectionObserver(S, x);
1707
+ }
1708
+ n.observe(e);
1709
+ }
1710
+ return s(!0), i;
1711
+ }
1712
+ function lo(e, t, n, r) {
1713
+ r === void 0 && (r = {});
1714
+ const {
1715
+ ancestorScroll: o = !0,
1716
+ ancestorResize: i = !0,
1717
+ elementResize: s = typeof ResizeObserver == "function",
1718
+ layoutShift: l = typeof IntersectionObserver == "function",
1719
+ animationFrame: a = !1
1720
+ } = r, c = bt(e), m = o || i ? [...c ? ne(c) : [], ...ne(t)] : [];
1721
+ m.forEach((h) => {
1722
+ o && h.addEventListener("scroll", n, {
1723
+ passive: !0
1724
+ }), i && h.addEventListener("resize", n);
1725
+ });
1726
+ const d = c && l ? so(c, n) : null;
1727
+ let f = -1, u = null;
1728
+ s && (u = new ResizeObserver((h) => {
1729
+ let [x] = h;
1730
+ x && x.target === c && u && (u.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
1731
+ var P;
1732
+ (P = u) == null || P.observe(t);
1733
+ })), n();
1734
+ }), c && !a && u.observe(c), u.observe(t));
1735
+ let g, p = a ? be(e) : null;
1736
+ a && $();
1737
+ function $() {
1738
+ const h = be(e);
1739
+ p && (h.x !== p.x || h.y !== p.y || h.width !== p.width || h.height !== p.height) && n(), p = h, g = requestAnimationFrame($);
1740
+ }
1741
+ return n(), () => {
1742
+ var h;
1743
+ m.forEach((x) => {
1744
+ o && x.removeEventListener("scroll", n), i && x.removeEventListener("resize", n);
1745
+ }), d == null || d(), (h = u) == null || h.disconnect(), u = null, a && cancelAnimationFrame(g);
1746
+ };
1747
+ }
1748
+ const ao = _r, co = jr, uo = (e, t, n) => {
1749
+ const r = /* @__PURE__ */ new Map(), o = {
1750
+ platform: io,
1751
+ ...n
1752
+ }, i = {
1753
+ ...o.platform,
1754
+ _c: r
1755
+ };
1756
+ return zr(e, t, {
1757
+ ...o,
1758
+ platform: i
1759
+ });
1760
+ };
1761
+ var Ne = typeof document < "u" ? qt : Zt;
1762
+ function Ye(e, t) {
1763
+ if (e === t)
1764
+ return !0;
1765
+ if (typeof e != typeof t)
1766
+ return !1;
1767
+ if (typeof e == "function" && e.toString() === t.toString())
1768
+ return !0;
1769
+ let n, r, o;
1770
+ if (e && t && typeof e == "object") {
1771
+ if (Array.isArray(e)) {
1772
+ if (n = e.length, n !== t.length)
1773
+ return !1;
1774
+ for (r = n; r-- !== 0; )
1775
+ if (!Ye(e[r], t[r]))
1776
+ return !1;
1777
+ return !0;
1778
+ }
1779
+ if (o = Object.keys(e), n = o.length, n !== Object.keys(t).length)
1780
+ return !1;
1781
+ for (r = n; r-- !== 0; )
1782
+ if (!{}.hasOwnProperty.call(t, o[r]))
1783
+ return !1;
1784
+ for (r = n; r-- !== 0; ) {
1785
+ const i = o[r];
1786
+ if (!(i === "_owner" && e.$$typeof) && !Ye(e[i], t[i]))
1787
+ return !1;
1788
+ }
1789
+ return !0;
1790
+ }
1791
+ return e !== e && t !== t;
1792
+ }
1793
+ function gn(e) {
1794
+ return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
1795
+ }
1796
+ function Dt(e, t) {
1797
+ const n = gn(e);
1798
+ return Math.round(t * n) / n;
1799
+ }
1800
+ function Mt(e) {
1801
+ const t = y.useRef(e);
1802
+ return Ne(() => {
1803
+ t.current = e;
1804
+ }), t;
1805
+ }
1806
+ function fo(e) {
1807
+ e === void 0 && (e = {});
1808
+ const {
1809
+ placement: t = "bottom",
1810
+ strategy: n = "absolute",
1811
+ middleware: r = [],
1812
+ platform: o,
1813
+ elements: {
1814
+ reference: i,
1815
+ floating: s
1816
+ } = {},
1817
+ transform: l = !0,
1818
+ whileElementsMounted: a,
1819
+ open: c
1820
+ } = e, [m, d] = y.useState({
1821
+ x: 0,
1822
+ y: 0,
1823
+ strategy: n,
1824
+ placement: t,
1825
+ middlewareData: {},
1826
+ isPositioned: !1
1827
+ }), [f, u] = y.useState(r);
1828
+ Ye(f, r) || u(r);
1829
+ const [g, p] = y.useState(null), [$, h] = y.useState(null), x = y.useCallback((R) => {
1830
+ R !== I.current && (I.current = R, p(R));
1831
+ }, []), P = y.useCallback((R) => {
1832
+ R !== A.current && (A.current = R, h(R));
1833
+ }, []), S = i || g, C = s || $, I = y.useRef(null), A = y.useRef(null), k = y.useRef(m), O = a != null, D = Mt(a), F = Mt(o), M = y.useCallback(() => {
1834
+ if (!I.current || !A.current)
1835
+ return;
1836
+ const R = {
1837
+ placement: t,
1838
+ strategy: n,
1839
+ middleware: f
1840
+ };
1841
+ F.current && (R.platform = F.current), uo(I.current, A.current, R).then((w) => {
1842
+ const L = {
1843
+ ...w,
1844
+ isPositioned: !0
1845
+ };
1846
+ B.current && !Ye(k.current, L) && (k.current = L, An.flushSync(() => {
1847
+ d(L);
1848
+ }));
1849
+ });
1850
+ }, [f, t, n, F]);
1851
+ Ne(() => {
1852
+ c === !1 && k.current.isPositioned && (k.current.isPositioned = !1, d((R) => ({
1853
+ ...R,
1854
+ isPositioned: !1
1855
+ })));
1856
+ }, [c]);
1857
+ const B = y.useRef(!1);
1858
+ Ne(() => (B.current = !0, () => {
1859
+ B.current = !1;
1860
+ }), []), Ne(() => {
1861
+ if (S && (I.current = S), C && (A.current = C), S && C) {
1862
+ if (D.current)
1863
+ return D.current(S, C, M);
1864
+ M();
1865
+ }
1866
+ }, [S, C, M, D, O]);
1867
+ const b = y.useMemo(() => ({
1868
+ reference: I,
1869
+ floating: A,
1870
+ setReference: x,
1871
+ setFloating: P
1872
+ }), [x, P]), v = y.useMemo(() => ({
1873
+ reference: S,
1874
+ floating: C
1875
+ }), [S, C]), T = y.useMemo(() => {
1876
+ const R = {
1877
+ position: n,
1878
+ left: 0,
1879
+ top: 0
1880
+ };
1881
+ if (!v.floating)
1882
+ return R;
1883
+ const w = Dt(v.floating, m.x), L = Dt(v.floating, m.y);
1884
+ return l ? {
1885
+ ...R,
1886
+ transform: "translate(" + w + "px, " + L + "px)",
1887
+ ...gn(v.floating) >= 1.5 && {
1888
+ willChange: "transform"
1889
+ }
1890
+ } : {
1891
+ position: n,
1892
+ left: w,
1893
+ top: L
1894
+ };
1895
+ }, [n, l, v.floating, m.x, m.y]);
1896
+ return y.useMemo(() => ({
1897
+ ...m,
1898
+ update: M,
1899
+ refs: b,
1900
+ elements: v,
1901
+ floatingStyles: T
1902
+ }), [m, M, b, v, T]);
1903
+ }
1904
+ /*!
1905
+ * tabbable 6.2.0
1906
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
1907
+ */
1908
+ var mo = ["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__ */ mo.join(","), pn = typeof Element > "u", De = pn ? function() {
1909
+ } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, Ke = !pn && Element.prototype.getRootNode ? function(e) {
1910
+ var t;
1911
+ return e == null || (t = e.getRootNode) === null || t === void 0 ? void 0 : t.call(e);
1912
+ } : function(e) {
1913
+ return e == null ? void 0 : e.ownerDocument;
1914
+ }, Xe = function e(t, n) {
1915
+ var r;
1916
+ n === void 0 && (n = !0);
1917
+ var o = t == null || (r = t.getAttribute) === null || r === void 0 ? void 0 : r.call(t, "inert"), i = o === "" || o === "true", s = i || n && t && e(t.parentNode);
1918
+ return s;
1919
+ }, go = function(t) {
1920
+ var n, r = t == null || (n = t.getAttribute) === null || n === void 0 ? void 0 : n.call(t, "contenteditable");
1921
+ return r === "" || r === "true";
1922
+ }, po = function(t, n, r) {
1923
+ if (Xe(t))
1924
+ return [];
1925
+ var o = Array.prototype.slice.apply(t.querySelectorAll(ut));
1926
+ return n && De.call(t, ut) && o.unshift(t), o = o.filter(r), o;
1927
+ }, ho = function e(t, n, r) {
1928
+ for (var o = [], i = Array.from(t); i.length; ) {
1929
+ var s = i.shift();
1930
+ if (!Xe(s, !1))
1931
+ if (s.tagName === "SLOT") {
1932
+ var l = s.assignedElements(), a = l.length ? l : s.children, c = e(a, !0, r);
1933
+ r.flatten ? o.push.apply(o, c) : o.push({
1934
+ scopeParent: s,
1935
+ candidates: c
1936
+ });
1937
+ } else {
1938
+ var m = De.call(s, ut);
1939
+ m && r.filter(s) && (n || !t.includes(s)) && o.push(s);
1940
+ var d = s.shadowRoot || // check for an undisclosed shadow
1941
+ typeof r.getShadowRoot == "function" && r.getShadowRoot(s), f = !Xe(d, !1) && (!r.shadowRootFilter || r.shadowRootFilter(s));
1942
+ if (d && f) {
1943
+ var u = e(d === !0 ? s.children : d.children, !0, r);
1944
+ r.flatten ? o.push.apply(o, u) : o.push({
1945
+ scopeParent: s,
1946
+ candidates: u
1947
+ });
1948
+ } else
1949
+ i.unshift.apply(i, s.children);
1950
+ }
1951
+ }
1952
+ return o;
1953
+ }, hn = function(t) {
1954
+ return !isNaN(parseInt(t.getAttribute("tabindex"), 10));
1955
+ }, bn = function(t) {
1956
+ if (!t)
1957
+ throw new Error("No node provided");
1958
+ return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || go(t)) && !hn(t) ? 0 : t.tabIndex;
1959
+ }, bo = function(t, n) {
1960
+ var r = bn(t);
1961
+ return r < 0 && n && !hn(t) ? 0 : r;
1962
+ }, yo = function(t, n) {
1963
+ return t.tabIndex === n.tabIndex ? t.documentOrder - n.documentOrder : t.tabIndex - n.tabIndex;
1964
+ }, yn = function(t) {
1965
+ return t.tagName === "INPUT";
1966
+ }, vo = function(t) {
1967
+ return yn(t) && t.type === "hidden";
1968
+ }, xo = function(t) {
1969
+ var n = t.tagName === "DETAILS" && Array.prototype.slice.apply(t.children).some(function(r) {
1970
+ return r.tagName === "SUMMARY";
1971
+ });
1972
+ return n;
1973
+ }, wo = function(t, n) {
1974
+ for (var r = 0; r < t.length; r++)
1975
+ if (t[r].checked && t[r].form === n)
1976
+ return t[r];
1977
+ }, $o = function(t) {
1978
+ if (!t.name)
1979
+ return !0;
1980
+ var n = t.form || Ke(t), r = function(l) {
1981
+ return n.querySelectorAll('input[type="radio"][name="' + l + '"]');
1982
+ }, o;
1983
+ if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
1984
+ o = r(window.CSS.escape(t.name));
1985
+ else
1986
+ try {
1987
+ o = r(t.name);
1988
+ } catch (s) {
1989
+ return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", s.message), !1;
1990
+ }
1991
+ var i = wo(o, t.form);
1992
+ return !i || i === t;
1993
+ }, So = function(t) {
1994
+ return yn(t) && t.type === "radio";
1995
+ }, Ro = function(t) {
1996
+ return So(t) && !$o(t);
1997
+ }, Eo = function(t) {
1998
+ var n, r = t && Ke(t), o = (n = r) === null || n === void 0 ? void 0 : n.host, i = !1;
1999
+ if (r && r !== t) {
2000
+ var s, l, a;
2001
+ for (i = !!((s = o) !== null && s !== void 0 && (l = s.ownerDocument) !== null && l !== void 0 && l.contains(o) || t != null && (a = t.ownerDocument) !== null && a !== void 0 && a.contains(t)); !i && o; ) {
2002
+ var c, m, d;
2003
+ r = Ke(o), o = (c = r) === null || c === void 0 ? void 0 : c.host, i = !!((m = o) !== null && m !== void 0 && (d = m.ownerDocument) !== null && d !== void 0 && d.contains(o));
2004
+ }
2005
+ }
2006
+ return i;
2007
+ }, Ft = function(t) {
2008
+ var n = t.getBoundingClientRect(), r = n.width, o = n.height;
2009
+ return r === 0 && o === 0;
2010
+ }, Co = function(t, n) {
2011
+ var r = n.displayCheck, o = n.getShadowRoot;
2012
+ if (getComputedStyle(t).visibility === "hidden")
2013
+ return !0;
2014
+ var i = De.call(t, "details>summary:first-of-type"), s = i ? t.parentElement : t;
2015
+ if (De.call(s, "details:not([open]) *"))
2016
+ return !0;
2017
+ if (!r || r === "full" || r === "legacy-full") {
2018
+ if (typeof o == "function") {
2019
+ for (var l = t; t; ) {
2020
+ var a = t.parentElement, c = Ke(t);
2021
+ if (a && !a.shadowRoot && o(a) === !0)
2022
+ return Ft(t);
2023
+ t.assignedSlot ? t = t.assignedSlot : !a && c !== t.ownerDocument ? t = c.host : t = a;
2024
+ }
2025
+ t = l;
2026
+ }
2027
+ if (Eo(t))
2028
+ return !t.getClientRects().length;
2029
+ if (r !== "legacy-full")
2030
+ return !0;
2031
+ } else if (r === "non-zero-area")
2032
+ return Ft(t);
2033
+ return !1;
2034
+ }, ko = function(t) {
2035
+ if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))
2036
+ for (var n = t.parentElement; n; ) {
2037
+ if (n.tagName === "FIELDSET" && n.disabled) {
2038
+ for (var r = 0; r < n.children.length; r++) {
2039
+ var o = n.children.item(r);
2040
+ if (o.tagName === "LEGEND")
2041
+ return De.call(n, "fieldset[disabled] *") ? !0 : !o.contains(t);
2042
+ }
2043
+ return !0;
2044
+ }
2045
+ n = n.parentElement;
2046
+ }
2047
+ return !1;
2048
+ }, To = function(t, n) {
2049
+ return !(n.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
2050
+ // because we're limited in the type of selectors we can use in JSDom (see related
2051
+ // note related to `candidateSelectors`)
2052
+ Xe(n) || vo(n) || Co(n, t) || // For a details element with a summary, the summary element gets the focus
2053
+ xo(n) || ko(n));
2054
+ }, Lt = function(t, n) {
2055
+ return !(Ro(n) || bn(n) < 0 || !To(t, n));
2056
+ }, Io = function(t) {
2057
+ var n = parseInt(t.getAttribute("tabindex"), 10);
2058
+ return !!(isNaN(n) || n >= 0);
2059
+ }, Po = function e(t) {
2060
+ var n = [], r = [];
2061
+ return t.forEach(function(o, i) {
2062
+ var s = !!o.scopeParent, l = s ? o.scopeParent : o, a = bo(l, s), c = s ? e(o.candidates) : l;
2063
+ a === 0 ? s ? n.push.apply(n, c) : n.push(l) : r.push({
2064
+ documentOrder: i,
2065
+ tabIndex: a,
2066
+ item: o,
2067
+ isScope: s,
2068
+ content: c
2069
+ });
2070
+ }), r.sort(yo).reduce(function(o, i) {
2071
+ return i.isScope ? o.push.apply(o, i.content) : o.push(i.content), o;
2072
+ }, []).concat(n);
2073
+ }, vn = function(t, n) {
2074
+ n = n || {};
2075
+ var r;
2076
+ return n.getShadowRoot ? r = ho([t], n.includeContainer, {
2077
+ filter: Lt.bind(null, n),
2078
+ flatten: !1,
2079
+ getShadowRoot: n.getShadowRoot,
2080
+ shadowRootFilter: Io
2081
+ }) : r = po(t, n.includeContainer, Lt.bind(null, n)), Po(r);
2082
+ };
2083
+ const Ao = y[/* @__PURE__ */ "useInsertionEffect".toString()], Bo = Ao || ((e) => e());
2084
+ function Re(e) {
2085
+ const t = y.useRef(() => {
2086
+ if (process.env.NODE_ENV !== "production")
2087
+ throw new Error("Cannot call an event handler while rendering.");
2088
+ });
2089
+ return Bo(() => {
2090
+ t.current = e;
2091
+ }), y.useCallback(function() {
2092
+ for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
2093
+ r[o] = arguments[o];
2094
+ return t.current == null ? void 0 : t.current(...r);
2095
+ }, []);
2096
+ }
2097
+ var J = typeof document < "u" ? qt : Zt;
2098
+ function dt() {
2099
+ return dt = Object.assign ? Object.assign.bind() : function(e) {
2100
+ for (var t = 1; t < arguments.length; t++) {
2101
+ var n = arguments[t];
2102
+ for (var r in n)
2103
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
2104
+ }
2105
+ return e;
2106
+ }, dt.apply(this, arguments);
2107
+ }
2108
+ let rt = !1, Oo = 0;
2109
+ const Nt = () => "floating-ui-" + Oo++;
2110
+ function Do() {
2111
+ const [e, t] = y.useState(() => rt ? Nt() : void 0);
2112
+ return J(() => {
2113
+ e == null && t(Nt());
2114
+ }, []), y.useEffect(() => {
2115
+ rt || (rt = !0);
2116
+ }, []), e;
2117
+ }
2118
+ const Mo = y[/* @__PURE__ */ "useId".toString()], yt = Mo || Do;
2119
+ function Fo() {
2120
+ const e = /* @__PURE__ */ new Map();
2121
+ return {
2122
+ emit(t, n) {
2123
+ var r;
2124
+ (r = e.get(t)) == null || r.forEach((o) => o(n));
2125
+ },
2126
+ on(t, n) {
2127
+ e.set(t, [...e.get(t) || [], n]);
2128
+ },
2129
+ off(t, n) {
2130
+ var r;
2131
+ e.set(t, ((r = e.get(t)) == null ? void 0 : r.filter((o) => o !== n)) || []);
2132
+ }
2133
+ };
2134
+ }
2135
+ const Lo = /* @__PURE__ */ y.createContext(null), No = /* @__PURE__ */ y.createContext(null), vt = () => {
2136
+ var e;
2137
+ return ((e = y.useContext(Lo)) == null ? void 0 : e.id) || null;
2138
+ }, xt = () => y.useContext(No);
2139
+ function Qe(e) {
2140
+ return "data-floating-ui-" + e;
2141
+ }
2142
+ function Ce(e) {
2143
+ const t = Cn(e);
2144
+ return J(() => {
2145
+ t.current = e;
2146
+ }), t;
2147
+ }
2148
+ const Wt = /* @__PURE__ */ Qe("safe-polygon");
2149
+ function ot(e, t, n) {
2150
+ return n && !ze(n) ? 0 : typeof e == "number" ? e : e == null ? void 0 : e[t];
2151
+ }
2152
+ function Wo(e, t) {
2153
+ t === void 0 && (t = {});
2154
+ const {
2155
+ open: n,
2156
+ onOpenChange: r,
2157
+ dataRef: o,
2158
+ events: i,
2159
+ elements: {
2160
+ domReference: s,
2161
+ floating: l
2162
+ },
2163
+ refs: a
2164
+ } = e, {
2165
+ enabled: c = !0,
2166
+ delay: m = 0,
2167
+ handleClose: d = null,
2168
+ mouseOnly: f = !1,
2169
+ restMs: u = 0,
2170
+ move: g = !0
2171
+ } = t, p = xt(), $ = vt(), h = Ce(d), x = Ce(m), P = y.useRef(), S = y.useRef(), C = y.useRef(), I = y.useRef(), A = y.useRef(!0), k = y.useRef(!1), O = y.useRef(() => {
2172
+ }), D = y.useCallback(() => {
2173
+ var b;
2174
+ const v = (b = o.current.openEvent) == null ? void 0 : b.type;
2175
+ return (v == null ? void 0 : v.includes("mouse")) && v !== "mousedown";
2176
+ }, [o]);
2177
+ y.useEffect(() => {
2178
+ if (!c)
2179
+ return;
2180
+ function b(v) {
2181
+ let {
2182
+ open: T
2183
+ } = v;
2184
+ T || (clearTimeout(S.current), clearTimeout(I.current), A.current = !0);
2185
+ }
2186
+ return i.on("openchange", b), () => {
2187
+ i.off("openchange", b);
2188
+ };
2189
+ }, [c, i]), y.useEffect(() => {
2190
+ if (!c || !h.current || !n)
2191
+ return;
2192
+ function b(T) {
2193
+ D() && r(!1, T, "hover");
2194
+ }
2195
+ const v = ue(l).documentElement;
2196
+ return v.addEventListener("mouseleave", b), () => {
2197
+ v.removeEventListener("mouseleave", b);
2198
+ };
2199
+ }, [l, n, r, c, h, D]);
2200
+ const F = y.useCallback(function(b, v, T) {
2201
+ v === void 0 && (v = !0), T === void 0 && (T = "hover");
2202
+ const R = ot(x.current, "close", P.current);
2203
+ R && !C.current ? (clearTimeout(S.current), S.current = setTimeout(() => r(!1, b, T), R)) : v && (clearTimeout(S.current), r(!1, b, T));
2204
+ }, [x, r]), M = y.useCallback(() => {
2205
+ O.current(), C.current = void 0;
2206
+ }, []), B = y.useCallback(() => {
2207
+ if (k.current) {
2208
+ const b = ue(a.floating.current).body;
2209
+ b.style.pointerEvents = "", b.removeAttribute(Wt), k.current = !1;
2210
+ }
2211
+ }, [a]);
2212
+ return y.useEffect(() => {
2213
+ if (!c)
2214
+ return;
2215
+ function b() {
2216
+ return o.current.openEvent ? ["click", "mousedown"].includes(o.current.openEvent.type) : !1;
2217
+ }
2218
+ function v(w) {
2219
+ if (clearTimeout(S.current), A.current = !1, f && !ze(P.current) || u > 0 && ot(x.current, "open") === 0)
2220
+ return;
2221
+ const L = ot(x.current, "open", P.current);
2222
+ L ? S.current = setTimeout(() => {
2223
+ r(!0, w, "hover");
2224
+ }, L) : r(!0, w, "hover");
2225
+ }
2226
+ function T(w) {
2227
+ if (b())
2228
+ return;
2229
+ O.current();
2230
+ const L = ue(l);
2231
+ if (clearTimeout(I.current), h.current) {
2232
+ n || clearTimeout(S.current), C.current = h.current({
2233
+ ...e,
2234
+ tree: p,
2235
+ x: w.clientX,
2236
+ y: w.clientY,
2237
+ onClose() {
2238
+ B(), M(), F(w, !0, "safe-polygon");
2239
+ }
2240
+ });
2241
+ const G = C.current;
2242
+ L.addEventListener("mousemove", G), O.current = () => {
2243
+ L.removeEventListener("mousemove", G);
2244
+ };
2245
+ return;
2246
+ }
2247
+ (P.current === "touch" ? !me(l, w.relatedTarget) : !0) && F(w);
2248
+ }
2249
+ function R(w) {
2250
+ b() || h.current == null || h.current({
2251
+ ...e,
2252
+ tree: p,
2253
+ x: w.clientX,
2254
+ y: w.clientY,
2255
+ onClose() {
2256
+ B(), M(), F(w);
2257
+ }
2258
+ })(w);
2259
+ }
2260
+ if (W(s)) {
2261
+ const w = s;
2262
+ return n && w.addEventListener("mouseleave", R), l == null || l.addEventListener("mouseleave", R), g && w.addEventListener("mousemove", v, {
2263
+ once: !0
2264
+ }), w.addEventListener("mouseenter", v), w.addEventListener("mouseleave", T), () => {
2265
+ n && w.removeEventListener("mouseleave", R), l == null || l.removeEventListener("mouseleave", R), g && w.removeEventListener("mousemove", v), w.removeEventListener("mouseenter", v), w.removeEventListener("mouseleave", T);
2266
+ };
2267
+ }
2268
+ }, [s, l, c, e, f, u, g, F, M, B, r, n, p, x, h, o]), J(() => {
2269
+ var b;
2270
+ if (c && n && (b = h.current) != null && b.__options.blockPointerEvents && D()) {
2271
+ const T = ue(l).body;
2272
+ if (T.setAttribute(Wt, ""), T.style.pointerEvents = "none", k.current = !0, W(s) && l) {
2273
+ var v;
2274
+ const R = s, w = p == null || (v = p.nodesRef.current.find((L) => L.id === $)) == null || (v = v.context) == null ? void 0 : v.elements.floating;
2275
+ return w && (w.style.pointerEvents = ""), R.style.pointerEvents = "auto", l.style.pointerEvents = "auto", () => {
2276
+ R.style.pointerEvents = "", l.style.pointerEvents = "";
2277
+ };
2278
+ }
2279
+ }
2280
+ }, [c, n, $, l, s, p, h, D]), J(() => {
2281
+ n || (P.current = void 0, M(), B());
2282
+ }, [n, M, B]), y.useEffect(() => () => {
2283
+ M(), clearTimeout(S.current), clearTimeout(I.current), B();
2284
+ }, [c, s, M, B]), y.useMemo(() => {
2285
+ if (!c)
2286
+ return {};
2287
+ function b(v) {
2288
+ P.current = v.pointerType;
2289
+ }
2290
+ return {
2291
+ reference: {
2292
+ onPointerDown: b,
2293
+ onPointerEnter: b,
2294
+ onMouseMove(v) {
2295
+ n || u === 0 || (clearTimeout(I.current), I.current = setTimeout(() => {
2296
+ A.current || r(!0, v.nativeEvent, "hover");
2297
+ }, u));
2298
+ }
2299
+ },
2300
+ floating: {
2301
+ onMouseEnter() {
2302
+ clearTimeout(S.current);
2303
+ },
2304
+ onMouseLeave(v) {
2305
+ F(v.nativeEvent, !1);
2306
+ }
2307
+ }
2308
+ };
2309
+ }, [c, u, n, r, F]);
2310
+ }
2311
+ function We(e, t) {
2312
+ let n = e.filter((o) => {
2313
+ var i;
2314
+ return o.parentId === t && ((i = o.context) == null ? void 0 : i.open);
2315
+ }), r = n;
2316
+ for (; r.length; )
2317
+ r = e.filter((o) => {
2318
+ var i;
2319
+ return (i = r) == null ? void 0 : i.some((s) => {
2320
+ var l;
2321
+ return o.parentId === s.id && ((l = o.context) == null ? void 0 : l.open);
2322
+ });
2323
+ }), n = n.concat(r);
2324
+ return n;
2325
+ }
2326
+ const xn = () => ({
2327
+ getShadowRoot: !0,
2328
+ displayCheck: (
2329
+ // JSDOM does not support the `tabbable` library. To solve this we can
2330
+ // check if `ResizeObserver` is a real function (not polyfilled), which
2331
+ // determines if the current environment is JSDOM-like.
2332
+ typeof ResizeObserver == "function" && ResizeObserver.toString().includes("[native code]") ? "full" : "none"
2333
+ )
2334
+ });
2335
+ function wn(e, t) {
2336
+ const n = vn(e, xn());
2337
+ t === "prev" && n.reverse();
2338
+ const r = n.indexOf(Cr(ue(e)));
2339
+ return n.slice(r + 1)[0];
2340
+ }
2341
+ function zo() {
2342
+ return wn(document.body, "next");
2343
+ }
2344
+ function jo() {
2345
+ return wn(document.body, "prev");
2346
+ }
2347
+ function it(e, t) {
2348
+ const n = t || e.currentTarget, r = e.relatedTarget;
2349
+ return !r || !me(n, r);
2350
+ }
2351
+ function Ho(e) {
2352
+ vn(e, xn()).forEach((n) => {
2353
+ n.dataset.tabindex = n.getAttribute("tabindex") || "", n.setAttribute("tabindex", "-1");
2354
+ });
2355
+ }
2356
+ function Vo(e) {
2357
+ e.querySelectorAll("[data-tabindex]").forEach((n) => {
2358
+ const r = n.dataset.tabindex;
2359
+ delete n.dataset.tabindex, r ? n.setAttribute("tabindex", r) : n.removeAttribute("tabindex");
2360
+ });
2361
+ }
2362
+ const $n = {
2363
+ border: 0,
2364
+ clip: "rect(0 0 0 0)",
2365
+ height: "1px",
2366
+ margin: "-1px",
2367
+ overflow: "hidden",
2368
+ padding: 0,
2369
+ position: "fixed",
2370
+ whiteSpace: "nowrap",
2371
+ width: "1px",
2372
+ top: 0,
2373
+ left: 0
2374
+ };
2375
+ let _o;
2376
+ function zt(e) {
2377
+ e.key === "Tab" && (e.target, clearTimeout(_o));
2378
+ }
2379
+ const jt = /* @__PURE__ */ y.forwardRef(function(t, n) {
2380
+ const [r, o] = y.useState();
2381
+ J(() => (kr() && o("button"), document.addEventListener("keydown", zt), () => {
2382
+ document.removeEventListener("keydown", zt);
2383
+ }), []);
2384
+ const i = {
2385
+ ref: n,
2386
+ tabIndex: 0,
2387
+ // Role is only for VoiceOver
2388
+ role: r,
2389
+ "aria-hidden": r ? void 0 : !0,
2390
+ [Qe("focus-guard")]: "",
2391
+ style: $n
2392
+ };
2393
+ return /* @__PURE__ */ y.createElement("span", dt({}, t, i));
2394
+ }), Sn = /* @__PURE__ */ y.createContext(null), Ht = /* @__PURE__ */ Qe("portal");
2395
+ function Yo(e) {
2396
+ let {
2397
+ id: t,
2398
+ root: n
2399
+ } = e === void 0 ? {} : e;
2400
+ const [r, o] = y.useState(null), i = yt(), s = Xo(), l = y.useRef(null);
2401
+ return J(() => () => {
2402
+ r == null || r.remove(), queueMicrotask(() => {
2403
+ l.current = null;
2404
+ });
2405
+ }, [r]), J(() => {
2406
+ if (l.current)
2407
+ return;
2408
+ const a = t ? document.getElementById(t) : null;
2409
+ if (!a)
2410
+ return;
2411
+ const c = document.createElement("div");
2412
+ c.id = i, c.setAttribute(Ht, ""), a.appendChild(c), l.current = c, o(c);
2413
+ }, [t, i]), J(() => {
2414
+ if (l.current)
2415
+ return;
2416
+ let a = n || (s == null ? void 0 : s.portalNode);
2417
+ a && !W(a) && (a = a.current), a = a || document.body;
2418
+ let c = null;
2419
+ t && (c = document.createElement("div"), c.id = t, a.appendChild(c));
2420
+ const m = document.createElement("div");
2421
+ m.id = i, m.setAttribute(Ht, ""), a = c || a, a.appendChild(m), l.current = m, o(m);
2422
+ }, [t, n, i, s]), r;
2423
+ }
2424
+ function Ko(e) {
2425
+ let {
2426
+ children: t,
2427
+ id: n,
2428
+ root: r = null,
2429
+ preserveTabOrder: o = !0
2430
+ } = e;
2431
+ const i = Yo({
2432
+ id: n,
2433
+ root: r
2434
+ }), [s, l] = y.useState(null), a = y.useRef(null), c = y.useRef(null), m = y.useRef(null), d = y.useRef(null), f = (
2435
+ // The FocusManager and therefore floating element are currently open/
2436
+ // rendered.
2437
+ !!s && // Guards are only for non-modal focus management.
2438
+ !s.modal && // Don't render if unmount is transitioning.
2439
+ s.open && o && !!(r || i)
2440
+ );
2441
+ return y.useEffect(() => {
2442
+ if (!i || !o || s != null && s.modal)
2443
+ return;
2444
+ function u(g) {
2445
+ i && it(g) && (g.type === "focusin" ? Vo : Ho)(i);
2446
+ }
2447
+ return i.addEventListener("focusin", u, !0), i.addEventListener("focusout", u, !0), () => {
2448
+ i.removeEventListener("focusin", u, !0), i.removeEventListener("focusout", u, !0);
2449
+ };
2450
+ }, [i, o, s == null ? void 0 : s.modal]), /* @__PURE__ */ y.createElement(Sn.Provider, {
2451
+ value: y.useMemo(() => ({
2452
+ preserveTabOrder: o,
2453
+ beforeOutsideRef: a,
2454
+ afterOutsideRef: c,
2455
+ beforeInsideRef: m,
2456
+ afterInsideRef: d,
2457
+ portalNode: i,
2458
+ setFocusManagerState: l
2459
+ }), [o, i])
2460
+ }, f && i && /* @__PURE__ */ y.createElement(jt, {
2461
+ "data-type": "outside",
2462
+ ref: a,
2463
+ onFocus: (u) => {
2464
+ if (it(u, i)) {
2465
+ var g;
2466
+ (g = m.current) == null || g.focus();
2467
+ } else {
2468
+ const p = jo() || (s == null ? void 0 : s.refs.domReference.current);
2469
+ p == null || p.focus();
2470
+ }
2471
+ }
2472
+ }), f && i && /* @__PURE__ */ y.createElement("span", {
2473
+ "aria-owns": i.id,
2474
+ style: $n
2475
+ }), i && /* @__PURE__ */ Bn(t, i), f && i && /* @__PURE__ */ y.createElement(jt, {
2476
+ "data-type": "outside",
2477
+ ref: c,
2478
+ onFocus: (u) => {
2479
+ if (it(u, i)) {
2480
+ var g;
2481
+ (g = d.current) == null || g.focus();
2482
+ } else {
2483
+ const p = zo() || (s == null ? void 0 : s.refs.domReference.current);
2484
+ p == null || p.focus(), s != null && s.closeOnFocusOut && (s == null || s.onOpenChange(!1, u.nativeEvent));
2485
+ }
2486
+ }
2487
+ }));
2488
+ }
2489
+ const Xo = () => y.useContext(Sn);
2490
+ function Vt(e) {
2491
+ return q(e.target) && e.target.tagName === "BUTTON";
2492
+ }
2493
+ function _t(e) {
2494
+ return Ar(e);
2495
+ }
2496
+ function Go(e, t) {
2497
+ t === void 0 && (t = {});
2498
+ const {
2499
+ open: n,
2500
+ onOpenChange: r,
2501
+ dataRef: o,
2502
+ elements: {
2503
+ domReference: i
2504
+ }
2505
+ } = e, {
2506
+ enabled: s = !0,
2507
+ event: l = "click",
2508
+ toggle: a = !0,
2509
+ ignoreMouse: c = !1,
2510
+ keyboardHandlers: m = !0
2511
+ } = t, d = y.useRef(), f = y.useRef(!1);
2512
+ return y.useMemo(() => s ? {
2513
+ reference: {
2514
+ onPointerDown(u) {
2515
+ d.current = u.pointerType;
2516
+ },
2517
+ onMouseDown(u) {
2518
+ u.button === 0 && (ze(d.current, !0) && c || l !== "click" && (n && a && (!o.current.openEvent || o.current.openEvent.type === "mousedown") ? r(!1, u.nativeEvent, "click") : (u.preventDefault(), r(!0, u.nativeEvent, "click"))));
2519
+ },
2520
+ onClick(u) {
2521
+ if (l === "mousedown" && d.current) {
2522
+ d.current = void 0;
2523
+ return;
2524
+ }
2525
+ ze(d.current, !0) && c || (n && a && (!o.current.openEvent || o.current.openEvent.type === "click") ? r(!1, u.nativeEvent, "click") : r(!0, u.nativeEvent, "click"));
2526
+ },
2527
+ onKeyDown(u) {
2528
+ d.current = void 0, !(u.defaultPrevented || !m || Vt(u)) && (u.key === " " && !_t(i) && (u.preventDefault(), f.current = !0), u.key === "Enter" && r(!(n && a), u.nativeEvent, "click"));
2529
+ },
2530
+ onKeyUp(u) {
2531
+ u.defaultPrevented || !m || Vt(u) || _t(i) || u.key === " " && f.current && (f.current = !1, r(!(n && a), u.nativeEvent, "click"));
2532
+ }
2533
+ }
2534
+ } : {}, [s, o, l, c, m, i, a, n, r]);
2535
+ }
2536
+ const Uo = {
2537
+ pointerdown: "onPointerDown",
2538
+ mousedown: "onMouseDown",
2539
+ click: "onClick"
2540
+ }, qo = {
2541
+ pointerdown: "onPointerDownCapture",
2542
+ mousedown: "onMouseDownCapture",
2543
+ click: "onClickCapture"
2544
+ }, Yt = (e) => {
2545
+ var t, n;
2546
+ return {
2547
+ escapeKey: typeof e == "boolean" ? e : (t = e == null ? void 0 : e.escapeKey) != null ? t : !1,
2548
+ outsidePress: typeof e == "boolean" ? e : (n = e == null ? void 0 : e.outsidePress) != null ? n : !0
2549
+ };
2550
+ };
2551
+ function Zo(e, t) {
2552
+ t === void 0 && (t = {});
2553
+ const {
2554
+ open: n,
2555
+ onOpenChange: r,
2556
+ nodeId: o,
2557
+ elements: {
2558
+ reference: i,
2559
+ domReference: s,
2560
+ floating: l
2561
+ },
2562
+ dataRef: a
2563
+ } = e, {
2564
+ enabled: c = !0,
2565
+ escapeKey: m = !0,
2566
+ outsidePress: d = !0,
2567
+ outsidePressEvent: f = "pointerdown",
2568
+ referencePress: u = !1,
2569
+ referencePressEvent: g = "pointerdown",
2570
+ ancestorScroll: p = !1,
2571
+ bubbles: $,
2572
+ capture: h
2573
+ } = t, x = xt(), P = Re(typeof d == "function" ? d : () => !1), S = typeof d == "function" ? P : d, C = y.useRef(!1), I = y.useRef(!1), {
2574
+ escapeKey: A,
2575
+ outsidePress: k
2576
+ } = Yt($), {
2577
+ escapeKey: O,
2578
+ outsidePress: D
2579
+ } = Yt(h), F = Re((v) => {
2580
+ if (!n || !c || !m || v.key !== "Escape")
2581
+ return;
2582
+ const T = x ? We(x.nodesRef.current, o) : [];
2583
+ if (!A && (v.stopPropagation(), T.length > 0)) {
2584
+ let R = !0;
2585
+ if (T.forEach((w) => {
2586
+ var L;
2587
+ if ((L = w.context) != null && L.open && !w.context.dataRef.current.__escapeKeyBubbles) {
2588
+ R = !1;
2589
+ return;
2590
+ }
2591
+ }), !R)
2592
+ return;
2593
+ }
2594
+ r(!1, Tr(v) ? v.nativeEvent : v, "escape-key");
2595
+ }), M = Re((v) => {
2596
+ var T;
2597
+ const R = () => {
2598
+ var w;
2599
+ F(v), (w = Se(v)) == null || w.removeEventListener("keydown", R);
2600
+ };
2601
+ (T = Se(v)) == null || T.addEventListener("keydown", R);
2602
+ }), B = Re((v) => {
2603
+ const T = C.current;
2604
+ C.current = !1;
2605
+ const R = I.current;
2606
+ if (I.current = !1, f === "click" && R || T || typeof S == "function" && !S(v))
2607
+ return;
2608
+ const w = Se(v), L = "[" + Qe("inert") + "]", K = ue(l).querySelectorAll(L);
2609
+ let G = W(w) ? w : null;
2610
+ for (; G && !Te(G); ) {
2611
+ const H = pe(G);
2612
+ if (Te(H) || !W(H))
2613
+ break;
2614
+ G = H;
2615
+ }
2616
+ if (K.length && W(w) && !Ir(w) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
2617
+ !me(w, l) && // If the target root element contains none of the markers, then the
2618
+ // element was injected after the floating element rendered.
2619
+ Array.from(K).every((H) => !me(G, H)))
2620
+ return;
2621
+ if (q(w) && l) {
2622
+ const H = w.clientWidth > 0 && w.scrollWidth > w.clientWidth, X = w.clientHeight > 0 && w.scrollHeight > w.clientHeight;
2623
+ let se = X && v.offsetX > w.clientWidth;
2624
+ if (X && Z(w).direction === "rtl" && (se = v.offsetX <= w.offsetWidth - w.clientWidth), se || H && v.offsetY > w.clientHeight)
2625
+ return;
2626
+ }
2627
+ const ye = x && We(x.nodesRef.current, o).some((H) => {
2628
+ var X;
2629
+ return nt(v, (X = H.context) == null ? void 0 : X.elements.floating);
2630
+ });
2631
+ if (nt(v, l) || nt(v, s) || ye)
2632
+ return;
2633
+ const ie = x ? We(x.nodesRef.current, o) : [];
2634
+ if (ie.length > 0) {
2635
+ let H = !0;
2636
+ if (ie.forEach((X) => {
2637
+ var se;
2638
+ if ((se = X.context) != null && se.open && !X.context.dataRef.current.__outsidePressBubbles) {
2639
+ H = !1;
2640
+ return;
2641
+ }
2642
+ }), !H)
2643
+ return;
2644
+ }
2645
+ r(!1, v, "outside-press");
2646
+ }), b = Re((v) => {
2647
+ var T;
2648
+ const R = () => {
2649
+ var w;
2650
+ B(v), (w = Se(v)) == null || w.removeEventListener(f, R);
2651
+ };
2652
+ (T = Se(v)) == null || T.addEventListener(f, R);
2653
+ });
2654
+ return y.useEffect(() => {
2655
+ if (!n || !c)
2656
+ return;
2657
+ a.current.__escapeKeyBubbles = A, a.current.__outsidePressBubbles = k;
2658
+ function v(w) {
2659
+ r(!1, w, "ancestor-scroll");
2660
+ }
2661
+ const T = ue(l);
2662
+ m && T.addEventListener("keydown", O ? M : F, O), S && T.addEventListener(f, D ? b : B, D);
2663
+ let R = [];
2664
+ return p && (W(s) && (R = ne(s)), W(l) && (R = R.concat(ne(l))), !W(i) && i && i.contextElement && (R = R.concat(ne(i.contextElement)))), R = R.filter((w) => {
2665
+ var L;
2666
+ return w !== ((L = T.defaultView) == null ? void 0 : L.visualViewport);
2667
+ }), R.forEach((w) => {
2668
+ w.addEventListener("scroll", v, {
2669
+ passive: !0
2670
+ });
2671
+ }), () => {
2672
+ m && T.removeEventListener("keydown", O ? M : F, O), S && T.removeEventListener(f, D ? b : B, D), R.forEach((w) => {
2673
+ w.removeEventListener("scroll", v);
2674
+ });
2675
+ };
2676
+ }, [a, l, s, i, m, S, f, n, r, p, c, A, k, F, O, M, B, D, b]), y.useEffect(() => {
2677
+ C.current = !1;
2678
+ }, [S, f]), y.useMemo(() => c ? {
2679
+ reference: {
2680
+ onKeyDown: F,
2681
+ [Uo[g]]: (v) => {
2682
+ u && r(!1, v.nativeEvent, "reference-press");
2683
+ }
2684
+ },
2685
+ floating: {
2686
+ onKeyDown: F,
2687
+ onMouseDown() {
2688
+ I.current = !0;
2689
+ },
2690
+ onMouseUp() {
2691
+ I.current = !0;
2692
+ },
2693
+ [qo[f]]: () => {
2694
+ C.current = !0;
2695
+ }
2696
+ }
2697
+ } : {}, [c, u, f, g, r, F]);
2698
+ }
2699
+ let ft;
2700
+ process.env.NODE_ENV !== "production" && (ft = /* @__PURE__ */ new Set());
2701
+ function Jo(e) {
2702
+ var t;
2703
+ e === void 0 && (e = {});
2704
+ const {
2705
+ open: n = !1,
2706
+ onOpenChange: r,
2707
+ nodeId: o
2708
+ } = e;
2709
+ if (process.env.NODE_ENV !== "production") {
2710
+ var i;
2711
+ const k = "Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";
2712
+ if ((i = e.elements) != null && i.reference && !W(e.elements.reference)) {
2713
+ var s;
2714
+ if (!((s = ft) != null && s.has(k))) {
2715
+ var l;
2716
+ (l = ft) == null || l.add(k), console.error(k);
2717
+ }
2718
+ }
2719
+ }
2720
+ const [a, c] = y.useState(null), m = ((t = e.elements) == null ? void 0 : t.reference) || a, d = fo(e), f = xt(), u = vt() != null, g = Re((k, O, D) => {
2721
+ k && ($.current.openEvent = O), h.emit("openchange", {
2722
+ open: k,
2723
+ event: O,
2724
+ reason: D,
2725
+ nested: u
2726
+ }), r == null || r(k, O, D);
2727
+ }), p = y.useRef(null), $ = y.useRef({}), h = y.useState(() => Fo())[0], x = yt(), P = y.useCallback((k) => {
2728
+ const O = W(k) ? {
2729
+ getBoundingClientRect: () => k.getBoundingClientRect(),
2730
+ contextElement: k
2731
+ } : k;
2732
+ d.refs.setReference(O);
2733
+ }, [d.refs]), S = y.useCallback((k) => {
2734
+ (W(k) || k === null) && (p.current = k, c(k)), (W(d.refs.reference.current) || d.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
2735
+ // `null` to support `positionReference` + an unstable `reference`
2736
+ // callback ref.
2737
+ k !== null && !W(k)) && d.refs.setReference(k);
2738
+ }, [d.refs]), C = y.useMemo(() => ({
2739
+ ...d.refs,
2740
+ setReference: S,
2741
+ setPositionReference: P,
2742
+ domReference: p
2743
+ }), [d.refs, S, P]), I = y.useMemo(() => ({
2744
+ ...d.elements,
2745
+ domReference: m
2746
+ }), [d.elements, m]), A = y.useMemo(() => ({
2747
+ ...d,
2748
+ refs: C,
2749
+ elements: I,
2750
+ dataRef: $,
2751
+ nodeId: o,
2752
+ floatingId: x,
2753
+ events: h,
2754
+ open: n,
2755
+ onOpenChange: g
2756
+ }), [d, o, x, h, n, g, C, I]);
2757
+ return J(() => {
2758
+ const k = f == null ? void 0 : f.nodesRef.current.find((O) => O.id === o);
2759
+ k && (k.context = A);
2760
+ }), y.useMemo(() => ({
2761
+ ...d,
2762
+ context: A,
2763
+ refs: C,
2764
+ elements: I
2765
+ }), [d, C, I, A]);
2766
+ }
2767
+ const Kt = "active", Xt = "selected";
2768
+ function st(e, t, n) {
2769
+ const r = /* @__PURE__ */ new Map(), o = n === "item";
2770
+ let i = e;
2771
+ if (o && e) {
2772
+ const {
2773
+ [Kt]: s,
2774
+ [Xt]: l,
2775
+ ...a
2776
+ } = e;
2777
+ i = a;
2778
+ }
2779
+ return {
2780
+ ...n === "floating" && {
2781
+ tabIndex: -1
2782
+ },
2783
+ ...i,
2784
+ ...t.map((s) => {
2785
+ const l = s ? s[n] : null;
2786
+ return typeof l == "function" ? e ? l(e) : null : l;
2787
+ }).concat(e).reduce((s, l) => (l && Object.entries(l).forEach((a) => {
2788
+ let [c, m] = a;
2789
+ if (!(o && [Kt, Xt].includes(c)))
2790
+ if (c.indexOf("on") === 0) {
2791
+ if (r.has(c) || r.set(c, []), typeof m == "function") {
2792
+ var d;
2793
+ (d = r.get(c)) == null || d.push(m), s[c] = function() {
2794
+ for (var f, u = arguments.length, g = new Array(u), p = 0; p < u; p++)
2795
+ g[p] = arguments[p];
2796
+ return (f = r.get(c)) == null ? void 0 : f.map(($) => $(...g)).find(($) => $ !== void 0);
2797
+ };
2798
+ }
2799
+ } else
2800
+ s[c] = m;
2801
+ }), s), {})
2802
+ };
2803
+ }
2804
+ function Qo(e) {
2805
+ e === void 0 && (e = []);
2806
+ const t = e, n = y.useCallback((i) => st(i, e, "reference"), t), r = y.useCallback((i) => st(i, e, "floating"), t), o = y.useCallback(
2807
+ (i) => st(i, e, "item"),
2808
+ // Granularly check for `item` changes, because the `getItemProps` getter
2809
+ // should be as referentially stable as possible since it may be passed as
2810
+ // a prop to many components. All `item` key values must therefore be
2811
+ // memoized.
2812
+ e.map((i) => i == null ? void 0 : i.item)
2813
+ );
2814
+ return y.useMemo(() => ({
2815
+ getReferenceProps: n,
2816
+ getFloatingProps: r,
2817
+ getItemProps: o
2818
+ }), [n, r, o]);
2819
+ }
2820
+ const ei = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
2821
+ function ti(e, t) {
2822
+ var n;
2823
+ t === void 0 && (t = {});
2824
+ const {
2825
+ open: r,
2826
+ floatingId: o
2827
+ } = e, {
2828
+ enabled: i = !0,
2829
+ role: s = "dialog"
2830
+ } = t, l = (n = ei.get(s)) != null ? n : s, a = yt(), m = vt() != null;
2831
+ return y.useMemo(() => {
2832
+ if (!i)
2833
+ return {};
2834
+ const d = {
2835
+ id: o,
2836
+ ...l && {
2837
+ role: l
2838
+ }
2839
+ };
2840
+ return l === "tooltip" || s === "label" ? {
2841
+ reference: {
2842
+ ["aria-" + (s === "label" ? "labelledby" : "describedby")]: r ? o : void 0
2843
+ },
2844
+ floating: d
2845
+ } : {
2846
+ reference: {
2847
+ "aria-expanded": r ? "true" : "false",
2848
+ "aria-haspopup": l === "alertdialog" ? "dialog" : l,
2849
+ "aria-controls": r ? o : void 0,
2850
+ ...l === "listbox" && {
2851
+ role: "combobox"
2852
+ },
2853
+ ...l === "menu" && {
2854
+ id: a
2855
+ },
2856
+ ...l === "menu" && m && {
2857
+ role: "menuitem"
2858
+ },
2859
+ ...s === "select" && {
2860
+ "aria-autocomplete": "none"
2861
+ },
2862
+ ...s === "combobox" && {
2863
+ "aria-autocomplete": "list"
2864
+ }
2865
+ },
2866
+ floating: {
2867
+ ...d,
2868
+ ...l === "menu" && {
2869
+ "aria-labelledby": a
2870
+ }
2871
+ },
2872
+ item(f) {
2873
+ let {
2874
+ active: u,
2875
+ selected: g
2876
+ } = f;
2877
+ const p = {
2878
+ role: "option",
2879
+ ...u && {
2880
+ id: o + "-option"
2881
+ }
2882
+ };
2883
+ switch (s) {
2884
+ case "select":
2885
+ return {
2886
+ ...p,
2887
+ "aria-selected": u && g
2888
+ };
2889
+ case "combobox":
2890
+ return {
2891
+ ...p,
2892
+ ...u && {
2893
+ "aria-selected": !0
2894
+ }
2895
+ };
2896
+ }
2897
+ return {};
2898
+ }
2899
+ };
2900
+ }, [i, s, l, r, o, a, m]);
2901
+ }
2902
+ const Gt = (e) => e.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (t, n) => (n ? "-" : "") + t.toLowerCase());
2903
+ function $e(e, t) {
2904
+ return typeof e == "function" ? e(t) : e;
2905
+ }
2906
+ function ni(e, t) {
2907
+ const [n, r] = y.useState(e);
2908
+ return e && !n && r(!0), y.useEffect(() => {
2909
+ if (!e) {
2910
+ const o = setTimeout(() => r(!1), t);
2911
+ return () => clearTimeout(o);
2912
+ }
2913
+ }, [e, t]), n;
2914
+ }
2915
+ function ri(e, t) {
2916
+ t === void 0 && (t = {});
2917
+ const {
2918
+ open: n,
2919
+ elements: {
2920
+ floating: r
2921
+ }
2922
+ } = e, {
2923
+ duration: o = 250
2924
+ } = t, s = (typeof o == "number" ? o : o.close) || 0, [l, a] = y.useState(!1), [c, m] = y.useState("unmounted"), d = ni(n, s);
2925
+ return J(() => {
2926
+ l && !d && m("unmounted");
2927
+ }, [l, d]), J(() => {
2928
+ if (r) {
2929
+ if (n) {
2930
+ m("initial");
2931
+ const f = requestAnimationFrame(() => {
2932
+ m("open");
2933
+ });
2934
+ return () => {
2935
+ cancelAnimationFrame(f);
2936
+ };
2937
+ }
2938
+ a(!0), m("close");
2939
+ }
2940
+ }, [n, r]), {
2941
+ isMounted: d,
2942
+ status: c
2943
+ };
2944
+ }
2945
+ function oi(e, t) {
2946
+ t === void 0 && (t = {});
2947
+ const {
2948
+ initial: n = {
2949
+ opacity: 0
2950
+ },
2951
+ open: r,
2952
+ close: o,
2953
+ common: i,
2954
+ duration: s = 250
2955
+ } = t, l = e.placement, a = l.split("-")[0], c = y.useMemo(() => ({
2956
+ side: a,
2957
+ placement: l
2958
+ }), [a, l]), m = typeof s == "number", d = (m ? s : s.open) || 0, f = (m ? s : s.close) || 0, [u, g] = y.useState(() => ({
2959
+ ...$e(i, c),
2960
+ ...$e(n, c)
2961
+ })), {
2962
+ isMounted: p,
2963
+ status: $
2964
+ } = ri(e, {
2965
+ duration: s
2966
+ }), h = Ce(n), x = Ce(r), P = Ce(o), S = Ce(i);
2967
+ return J(() => {
2968
+ const C = $e(h.current, c), I = $e(P.current, c), A = $e(S.current, c), k = $e(x.current, c) || Object.keys(C).reduce((O, D) => (O[D] = "", O), {});
2969
+ if ($ === "initial" && g((O) => ({
2970
+ transitionProperty: O.transitionProperty,
2971
+ ...A,
2972
+ ...C
2973
+ })), $ === "open" && g({
2974
+ transitionProperty: Object.keys(k).map(Gt).join(","),
2975
+ transitionDuration: d + "ms",
2976
+ ...A,
2977
+ ...k
2978
+ }), $ === "close") {
2979
+ const O = I || C;
2980
+ g({
2981
+ transitionProperty: Object.keys(O).map(Gt).join(","),
2982
+ transitionDuration: f + "ms",
2983
+ ...A,
2984
+ ...O
2985
+ });
2986
+ }
2987
+ }, [f, P, h, x, S, d, $, c]), {
2988
+ isMounted: p,
2989
+ styles: u
2990
+ };
2991
+ }
2992
+ function Ut(e, t) {
2993
+ const [n, r] = e;
2994
+ let o = !1;
2995
+ const i = t.length;
2996
+ for (let s = 0, l = i - 1; s < i; l = s++) {
2997
+ const [a, c] = t[s] || [0, 0], [m, d] = t[l] || [0, 0];
2998
+ c >= r != d >= r && n <= (m - a) * (r - c) / (d - c) + a && (o = !o);
2999
+ }
3000
+ return o;
3001
+ }
3002
+ function ii(e, t) {
3003
+ return e[0] >= t.x && e[0] <= t.x + t.width && e[1] >= t.y && e[1] <= t.y + t.height;
3004
+ }
3005
+ function si(e) {
3006
+ e === void 0 && (e = {});
3007
+ const {
3008
+ buffer: t = 0.5,
3009
+ blockPointerEvents: n = !1,
3010
+ requireIntent: r = !0
3011
+ } = e;
3012
+ let o, i = !1, s = null, l = null, a = performance.now();
3013
+ function c(d, f) {
3014
+ const u = performance.now(), g = u - a;
3015
+ if (s === null || l === null || g === 0)
3016
+ return s = d, l = f, a = u, null;
3017
+ const p = d - s, $ = f - l, x = Math.sqrt(p * p + $ * $) / g;
3018
+ return s = d, l = f, a = u, x;
3019
+ }
3020
+ const m = (d) => {
3021
+ let {
3022
+ x: f,
3023
+ y: u,
3024
+ placement: g,
3025
+ elements: p,
3026
+ onClose: $,
3027
+ nodeId: h,
3028
+ tree: x
3029
+ } = d;
3030
+ return function(S) {
3031
+ function C() {
3032
+ clearTimeout(o), $();
3033
+ }
3034
+ if (clearTimeout(o), !p.domReference || !p.floating || g == null || f == null || u == null)
3035
+ return;
3036
+ const {
3037
+ clientX: I,
3038
+ clientY: A
3039
+ } = S, k = [I, A], O = Se(S), D = S.type === "mouseleave", F = me(p.floating, O), M = me(p.domReference, O), B = p.domReference.getBoundingClientRect(), b = p.floating.getBoundingClientRect(), v = g.split("-")[0], T = f > b.right - b.width / 2, R = u > b.bottom - b.height / 2, w = ii(k, B), L = b.width > B.width, K = b.height > B.height, G = (L ? B : b).left, ye = (L ? B : b).right, ie = (K ? B : b).top, H = (K ? B : b).bottom;
3040
+ if (F && (i = !0, !D))
3041
+ return;
3042
+ if (M && (i = !1), M && !D) {
3043
+ i = !0;
3044
+ return;
3045
+ }
3046
+ if (D && W(S.relatedTarget) && me(p.floating, S.relatedTarget) || x && We(x.nodesRef.current, h).some((le) => {
3047
+ let {
3048
+ context: j
3049
+ } = le;
3050
+ return j == null ? void 0 : j.open;
3051
+ }))
3052
+ return;
3053
+ if (v === "top" && u >= B.bottom - 1 || v === "bottom" && u <= B.top + 1 || v === "left" && f >= B.right - 1 || v === "right" && f <= B.left + 1)
3054
+ return C();
3055
+ let X = [];
3056
+ switch (v) {
3057
+ case "top":
3058
+ X = [[G, B.top + 1], [G, b.bottom - 1], [ye, b.bottom - 1], [ye, B.top + 1]];
3059
+ break;
3060
+ case "bottom":
3061
+ X = [[G, b.top + 1], [G, B.bottom - 1], [ye, B.bottom - 1], [ye, b.top + 1]];
3062
+ break;
3063
+ case "left":
3064
+ X = [[b.right - 1, H], [b.right - 1, ie], [B.left + 1, ie], [B.left + 1, H]];
3065
+ break;
3066
+ case "right":
3067
+ X = [[B.right - 1, H], [B.right - 1, ie], [b.left + 1, ie], [b.left + 1, H]];
3068
+ break;
3069
+ }
3070
+ function se(le) {
3071
+ let [j, _] = le;
3072
+ switch (v) {
3073
+ case "top": {
3074
+ const ae = [L ? j + t / 2 : T ? j + t * 4 : j - t * 4, _ + t + 1], ce = [L ? j - t / 2 : T ? j + t * 4 : j - t * 4, _ + t + 1], ve = [[b.left, T || L ? b.bottom - t : b.top], [b.right, T ? L ? b.bottom - t : b.top : b.bottom - t]];
3075
+ return [ae, ce, ...ve];
3076
+ }
3077
+ case "bottom": {
3078
+ const ae = [L ? j + t / 2 : T ? j + t * 4 : j - t * 4, _ - t], ce = [L ? j - t / 2 : T ? j + t * 4 : j - t * 4, _ - t], ve = [[b.left, T || L ? b.top + t : b.bottom], [b.right, T ? L ? b.top + t : b.bottom : b.top + t]];
3079
+ return [ae, ce, ...ve];
3080
+ }
3081
+ case "left": {
3082
+ const ae = [j + t + 1, K ? _ + t / 2 : R ? _ + t * 4 : _ - t * 4], ce = [j + t + 1, K ? _ - t / 2 : R ? _ + t * 4 : _ - t * 4];
3083
+ return [...[[R || K ? b.right - t : b.left, b.top], [R ? K ? b.right - t : b.left : b.right - t, b.bottom]], ae, ce];
3084
+ }
3085
+ case "right": {
3086
+ const ae = [j - t, K ? _ + t / 2 : R ? _ + t * 4 : _ - t * 4], ce = [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]];
3087
+ return [ae, ce, ...ve];
3088
+ }
3089
+ }
3090
+ }
3091
+ if (!Ut([I, A], X)) {
3092
+ if (i && !w)
3093
+ return C();
3094
+ if (!D && r) {
3095
+ const le = c(S.clientX, S.clientY);
3096
+ if (le !== null && le < 0.1)
3097
+ return C();
3098
+ }
3099
+ Ut([I, A], se([f, u])) ? !i && r && (o = window.setTimeout(C, 40)) : C();
3100
+ }
3101
+ };
3102
+ };
3103
+ return m.__options = {
3104
+ blockPointerEvents: n
3105
+ }, m;
3106
+ }
3107
+ const li = V("div"), wt = kn(
3108
+ {}
3109
+ ), bi = ({
3110
+ children: e,
3111
+ offset: t,
3112
+ open: n,
3113
+ onOpenChange: r,
3114
+ trigger: o = "click",
3115
+ hoverDelay: i,
3116
+ placement: s = "bottom",
3117
+ role: l = "dialog"
3118
+ }) => {
3119
+ const { refs: a, floatingStyles: c, context: m } = Jo({
3120
+ open: n,
3121
+ onOpenChange: r,
3122
+ placement: s,
3123
+ whileElementsMounted: lo,
3124
+ middleware: [Vr(t), co(), ao()]
3125
+ }), { isMounted: d, styles: f } = oi(m, {
3126
+ initial: ({ side: S }) => ({
3127
+ opacity: 0,
3128
+ transform: {
3129
+ top: "translateY(-0.5rem)",
3130
+ right: "translateX(0.5rem)",
3131
+ bottom: "translateY(0.5rem)",
3132
+ left: "translateX(-0.5rem)"
3133
+ }[S]
3134
+ })
3135
+ }), u = Go(m, { enabled: o === "click" }), g = Wo(m, {
3136
+ enabled: o === "hover",
3137
+ delay: i,
3138
+ handleClose: si()
3139
+ }), p = Zo(m), $ = ti(m, { role: l }), { getFloatingProps: h, getReferenceProps: x } = Qo([
3140
+ u,
3141
+ g,
3142
+ p,
3143
+ $
3144
+ ]), P = Tn(
3145
+ () => ({
3146
+ getFloatingProps: h,
3147
+ getReferenceProps: x,
3148
+ floatingStyles: c,
3149
+ refs: a,
3150
+ isMounted: d,
3151
+ transitionStyles: f
3152
+ }),
3153
+ [
3154
+ h,
3155
+ x,
3156
+ d,
3157
+ a,
3158
+ c,
3159
+ f
3160
+ ]
3161
+ );
3162
+ return /* @__PURE__ */ z(wt.Provider, { value: P, children: e });
3163
+ }, yi = ({ children: e }) => {
3164
+ const { getReferenceProps: t, refs: n } = Jt(wt);
3165
+ return /* @__PURE__ */ z(En, { children: In(e) && Pn(e, {
3166
+ ref: n.setReference,
3167
+ ...t()
3168
+ }) });
3169
+ }, vi = ({ children: e, overlayCardProps: t }) => {
3170
+ const {
3171
+ getFloatingProps: n,
3172
+ isMounted: r,
3173
+ refs: o,
3174
+ floatingStyles: i,
3175
+ transitionStyles: s
3176
+ } = Jt(wt);
3177
+ return r ? /* @__PURE__ */ z(Ko, { children: /* @__PURE__ */ z(
3178
+ li,
3179
+ {
3180
+ ref: o.setFloating,
3181
+ style: i,
3182
+ ...n(),
3183
+ css: {
3184
+ zIndex: "$overlayCard"
3185
+ },
3186
+ children: /* @__PURE__ */ z(en, { ...t, style: s, children: e })
3187
+ }
3188
+ ) }) : null;
3189
+ }, xi = V("span", {
3190
+ flex: "0 0 auto",
3191
+ display: "inline-flex",
3192
+ padding: "$1 $2",
3193
+ fontSize: "$xs",
3194
+ fontWeight: "$medium",
3195
+ lineHeight: "1",
3196
+ whiteSpace: "nowrap",
3197
+ borderRadius: "$sm",
3198
+ overflow: "hidden",
3199
+ variants: {
3200
+ color: {
3201
+ success: {
3202
+ backgroundColor: "$green200",
3203
+ color: "$green800"
3204
+ },
3205
+ warning: {
3206
+ backgroundColor: "$yellow100",
3207
+ color: "$yellow700"
3208
+ },
3209
+ danger: {
3210
+ backgroundColor: "$red200",
3211
+ color: "$red800"
3212
+ },
3213
+ primary: {
3214
+ backgroundColor: "$blue200",
3215
+ color: "$blue800"
3216
+ },
3217
+ secondary: {
3218
+ backgroundColor: "$gray200",
3219
+ color: "$gray800"
3220
+ }
3221
+ }
3222
+ },
3223
+ defaultVariants: {
3224
+ color: "primary"
3225
+ }
3226
+ }), wi = V(Me.Root, {
3227
+ backgroundColor: "$gray50",
3228
+ display: "flex",
3229
+ alignItems: "center",
3230
+ padding: "$1",
3231
+ gap: "$1"
3232
+ }), $i = V(Me.ToggleGroup, {
3233
+ display: "flex",
3234
+ gap: "$1",
3235
+ alignItems: "center"
3236
+ }), Si = V(Me.Separator, {
3237
+ width: "1px",
3238
+ height: "1.5rem",
3239
+ my: "$1",
3240
+ mx: "$1",
3241
+ backgroundColor: "$border"
3242
+ }), Rn = Ie(({ css: e, ...t }, n) => /* @__PURE__ */ z(
3243
+ hr,
3244
+ {
3245
+ ref: n,
3246
+ icon: !0,
3247
+ css: {
3248
+ width: "auto",
3249
+ "&[data-state='on']": {
3250
+ backgroundColor: "$blue200",
3251
+ color: "$blue800"
3252
+ },
3253
+ ...e
3254
+ },
3255
+ ...t
3256
+ }
3257
+ )), Ri = Ie(
3258
+ ({ children: e, dropdown: t, ...n }, r) => /* @__PURE__ */ z(
3259
+ Me.Button,
3260
+ {
3261
+ asChild: !0,
3262
+ ref: r,
3263
+ children: /* @__PURE__ */ Ge(
3264
+ Rn,
3265
+ {
3266
+ variant: "transparent",
3267
+ color: "primary",
3268
+ ...n,
3269
+ children: [
3270
+ e,
3271
+ t && /* @__PURE__ */ z(On, {})
3272
+ ]
3273
+ }
3274
+ )
3275
+ }
3276
+ )
3277
+ ), Ei = Ie(({
3278
+ children: e,
3279
+ value: t,
3280
+ ...n
3281
+ }, r) => /* @__PURE__ */ z(
3282
+ Me.ToggleItem,
3283
+ {
3284
+ value: t,
3285
+ asChild: !0,
3286
+ ref: r,
3287
+ children: /* @__PURE__ */ z(
3288
+ Rn,
3289
+ {
3290
+ variant: "transparent",
3291
+ color: "primary",
3292
+ icon: !0,
3293
+ ...n,
3294
+ children: e
3295
+ }
3296
+ )
3297
+ }
3298
+ )), ai = V(en, {
3299
+ minWidth: "max(var(--radix-popper-anchor-width), 12rem)",
3300
+ padding: "$1"
3301
+ }), $t = gt({
3302
+ padding: "$2 $2 $2 1.5rem",
3303
+ fontSize: "$sm",
3304
+ lineHeight: "1.25",
3305
+ cursor: "pointer",
3306
+ borderRadius: "$sm",
3307
+ position: "relative",
3308
+ color: "$primaryTextOnWhite",
3309
+ display: "flex",
3310
+ alignItems: "center",
3311
+ ":focus-visisble": {
3312
+ outline: "none"
3313
+ },
3314
+ "&[data-highlighted], &:hover": {
3315
+ outline: "none",
3316
+ backgroundColor: "$hoverDarker"
3317
+ },
3318
+ "&[data-disabled]": {
3319
+ color: "$gray500",
3320
+ "&:hover": {
3321
+ backgroundColor: "transparent"
3322
+ }
3323
+ }
3324
+ }), Ci = ({
3325
+ side: e = "bottom",
3326
+ align: t = "center",
3327
+ trigger: n,
3328
+ children: r,
3329
+ sideOffset: o,
3330
+ modal: i
3331
+ }) => /* @__PURE__ */ Ge(Q.Root, { modal: i, children: [
3332
+ /* @__PURE__ */ z(Q.Trigger, { asChild: !0, children: n }),
3333
+ /* @__PURE__ */ z(Q.Portal, { children: /* @__PURE__ */ z(
3334
+ Q.Content,
3335
+ {
3336
+ asChild: !0,
3337
+ side: e,
3338
+ align: t,
3339
+ collisionPadding: 10,
3340
+ sideOffset: o,
3341
+ children: /* @__PURE__ */ z(ai, { children: r })
3342
+ }
3343
+ ) })
3344
+ ] }), ci = V(Q.ItemIndicator, {
3345
+ position: "absolute",
3346
+ left: 0,
3347
+ top: 0,
3348
+ bottom: 0,
3349
+ width: "1.5rem",
3350
+ display: "flex",
3351
+ justifyContent: "center",
3352
+ alignItems: "center"
3353
+ }), ki = V(Q.Separator, {
3354
+ height: 1,
3355
+ backgroundColor: "$gray200",
3356
+ margin: 1
3357
+ }), Ti = V(Q.Item, $t), Ii = V(Q.Item, $t, {
3358
+ padding: "$2",
3359
+ display: "flex",
3360
+ alignItems: "center",
3361
+ gap: "$2"
3362
+ }), ui = V(Q.CheckboxItem, $t), Pi = ({
3363
+ value: e,
3364
+ onChange: t,
3365
+ children: n
3366
+ }) => /* @__PURE__ */ Ge(
3367
+ ui,
3368
+ {
3369
+ checked: e,
3370
+ onCheckedChange: t,
3371
+ children: [
3372
+ /* @__PURE__ */ z(ci, { children: /* @__PURE__ */ z(Dn, { size: "0.75rem" }) }),
3373
+ n
3374
+ ]
3375
+ }
3376
+ );
3377
+ export {
3378
+ hi as A,
3379
+ li as B,
3380
+ Ci as D,
3381
+ ai as M,
3382
+ en as O,
3383
+ bi as P,
3384
+ gr as S,
3385
+ wi as T,
3386
+ yi as a,
3387
+ vi as b,
3388
+ gt as c,
3389
+ hr as d,
3390
+ xi as e,
3391
+ $i as f,
3392
+ pi as g,
3393
+ Si as h,
3394
+ Rn as i,
3395
+ Ri as j,
3396
+ Ae as k,
3397
+ Ei as l,
3398
+ $t as m,
3399
+ ki as n,
3400
+ Ti as o,
3401
+ Ii as p,
3402
+ Pi as q,
3403
+ V as s
3404
+ };