var Hn = Object.defineProperty; var zn = (e, t, o) => t in e ? Hn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o; var De = (e, t, o) => (zn(e, typeof t != "symbol" ? t + "" : t, o), o); import { unref as v, computed as w, ref as W, shallowRef as ua, watch as ue, getCurrentScope as el, onScopeDispose as tl, shallowReadonly as Tt, effectScope as al, isRef as ol, toRef as E, readonly as Xe, customRef as Rn, getCurrentInstance as Ht, onMounted as st, nextTick as Ne, reactive as da, watchEffect as Xt, toValue as it, onActivated as xn, defineComponent as q, onBeforeUnmount as Wa, openBlock as m, createElementBlock as N, Fragment as ge, createElementVNode as ee, renderSlot as A, createBlock as x, Teleport as zt, mergeProps as Q, normalizeClass as j, normalizeStyle as ze, createTextVNode as ne, toDisplayString as Z, createCommentVNode as J, createApp as Mn, h as Le, provide as at, resolveDynamicComponent as se, withCtx as R, useAttrs as Kt, inject as Ge, createVNode as ye, Transition as Dn, normalizeProps as Se, guardReactiveProps as Ee, useSlots as Me, renderList as Te, TransitionGroup as jn, withDirectives as ht, vShow as ha, withModifiers as Bt, vModelCheckbox as qn, vModelRadio as Gn, vModelSelect as Wn, createSlots as Ua, onUnmounted as Un, withKeys as Qt } from "vue"; class dt { constructor(t, o = {}) { De(this, "cancelable", !0); De(this, "componentId", null); De(this, "_defaultPrevented", !1); De(this, "eventType", ""); De(this, "nativeEvent", null); De(this, "_preventDefault"); De(this, "relatedTarget", null); De(this, "target", null); if (!t) throw new TypeError( `Failed to construct '${this.constructor.name}'. 1 argument required, ${arguments.length} given.` ); Object.assign(this, dt.Defaults, o, { eventType: t }), this._preventDefault = function() { this.cancelable && (this.defaultPrevented = !0); }; } // Readable by everyone, // But only overwritten by inherrited constructors get defaultPrevented() { return this._defaultPrevented; } set defaultPrevented(t) { this._defaultPrevented = t; } // I think this is right // We want to be able to have it callable to everyone, // But only overwritten by inherrited constructors get preventDefault() { return this._preventDefault; } // This may not be correct, because it doesn't get correct type inferences in children // Ex overwrite this.preventDefault = () => true is valid. Could be a TS issue set preventDefault(t) { this._preventDefault = t; } static get Defaults() { return { cancelable: !0, componentId: null, eventType: "", nativeEvent: null, relatedTarget: null, target: null }; } } class Rt extends dt { constructor(o, a = {}) { super(o, a); De(this, "trigger", null); Object.assign(this, dt.Defaults, a, { eventType: o }); } static get Defaults() { return { ...super.Defaults, trigger: null }; } } class ll extends dt { constructor(o, a) { super(o, a); De(this, "from"); De(this, "to"); De(this, "direction"); Object.assign(this, dt.Defaults, a, { eventType: o }); const { from: l, direction: n, to: i } = a; this.from = l, this.to = i, this.direction = n; } static get Defaults() { return { ...super.Defaults }; } } const nl = /_/g, sl = /([a-z])([A-Z])/g, Xn = /(\s|^)(\w)/g, Kn = /(\s|^)(\w)/, sa = /\s+/, Yn = /^#/, Zn = /^#[A-Za-z]+[\w\-:.]*$/, Jn = /-u-.+/, Qn = /[-/\\^$*+?.()|[\]{}]/g, es = /[\s\uFEFF\xA0]+/g, ca = (e, t = 2) => typeof e == "string" ? e : e == null ? "" : Array.isArray(e) || Object.prototype.toString.call(e) === "[object Object]" && e.toString === Object.prototype.toString ? JSON.stringify(e, null, t) : String(e), _a = (e) => e.replace(nl, " ").replace(sl, (t, o, a) => `${o} ${a}`).replace(Kn, (t, o, a) => o + a.toUpperCase()), bo = (e) => e.replace(nl, " ").replace(sl, (t, o, a) => `${o} ${a}`).replace(Xn, (t, o, a) => o + a.toUpperCase()), ts = (e) => { const t = e.trim(); return t.charAt(0).toUpperCase() + t.slice(1); }, as = (e) => e.replace(Qn, "\\$&"), os = (e) => as(e).replace(es, "\\s"), Va = (e) => `\\${e}`, ls = (e) => { const t = ca(e), { length: o } = t, a = t.charCodeAt(0); return t.split("").reduce((l, n, i) => { const s = t.charCodeAt(i); return s === 0 ? `${l}�` : ( // ... is U+007F OR s === 127 || // ... is in the range [\1-\1F] (U+0001 to U+001F) OR ... s >= 1 && s <= 31 || // ... is the first character and is in the range [0-9] (U+0030 to U+0039) OR ... i === 0 && s >= 48 && s <= 57 || // ... is the second character and is in the range [0-9] (U+0030 to U+0039) // and the first character is a `-` (U+002D) ... i === 1 && s >= 48 && s <= 57 && a === 45 ? l + Va(`${s.toString(16)} `) : ( // ... is the first character AND ... i === 0 && // ... is a `-` (U+002D) AND ... s === 45 && // ... there is no second character ... o === 1 ? l + Va(n) : ( // ... is greater than or equal to U+0080 OR ... s >= 128 || // ... is `-` (U+002D) OR ... s === 45 || // ... is `_` (U+005F) OR ... s === 95 || // ... is in the range [0-9] (U+0030 to U+0039) OR ... s >= 48 && s <= 57 || // ... is in the range [A-Z] (U+0041 to U+005A) OR ... s >= 65 && s <= 90 || // ... is in the range [a-z] (U+0061 to U+007A) ... s >= 97 && s <= 122 ? l + n : l + Va(n) ) ) ); }, ""); }, il = typeof window < "u", rl = typeof document < "u", ns = typeof Element < "u", ss = typeof navigator < "u", is = il && rl && ss, _t = il ? window : {}, Xa = rl ? document : {}; (() => { let e = !1; if (!is) return e; try { const t = { // This function will be called when the browser // attempts to access the passive property get passive() { return e = !0, e; } }; "addEventListener" in _t && typeof _t.addEventListener == "function" && _t.addEventListener("test", t, t), "removeEventListener" in _t && typeof _t.removeEventListener == "function" && _t.removeEventListener("test", t, t); } catch { e = !1; } })(); const ul = typeof window < "u", rs = typeof document < "u", us = typeof navigator < "u", Ka = ul && rs && us, yo = ul ? window : {}, ds = (() => { let e = !1; if (Ka) try { const t = { // This function will be called when the browser // attempts to access the passive property get passive() { e = !0; } }; yo.addEventListener("test", t, t), yo.removeEventListener("test", t, t); } catch { e = !1; } return e; })(), Aa = ns ? Element.prototype : void 0, ot = (e) => !!(e && typeof e == "object" && "nodeType" in e && e.nodeType === Node.ELEMENT_NODE), cs = (e) => ot(e) ? e.getBoundingClientRect() : null, fs = (e = []) => { const { activeElement: t } = document; return t && !e.some((o) => o === t) ? t : null; }, vs = (e) => ot(e) && e === fs(), ps = (e, t = {}) => { try { e.focus(t); } catch (o) { console.error(o); } return vs(e); }, ms = (e, t) => t && ot(e) && e.getAttribute(t) || null, gs = (e) => { if (ms(e, "display") === "none") return !1; const t = cs(e); return !!(t && t.height > 0 && t.width > 0); }, Ie = (e) => ((e == null ? void 0 : e()) ?? []).length === 0, dl = (e, t) => (ot(t) ? t : Xa).querySelector(e) || null, bs = (e, t) => Array.from([(ot(t) ? t : Xa).querySelectorAll(e)]), Ya = (e, t) => t && ot(e) ? e.getAttribute(t) : null, ys = (e) => Xa.getElementById(/^#/.test(e) ? e.slice(1) : e) || null, hs = (e, t, o) => { t && ot(e) && e.setAttribute(t, o); }, Bs = (e, t) => { t && ot(e) && e.removeAttribute(t); }, Ss = (e, t) => ca(e).toLowerCase() === ca(t).toLowerCase(), Cs = (e, t) => ot(e) ? e.matches(t) : !1, ws = (Aa == null ? void 0 : Aa.closest) || function(e) { let t = this; if (!t) return null; do { if (ot(t) && t.matches(e)) return t; t = t.parentElement || t.parentNode; } while (t !== null && t.nodeType === Node.ELEMENT_NODE); return null; }, ho = (e, t, o = !1) => { if (!ot(t)) return null; const a = ws.call(t, e); return o ? a : a === t ? null : a; }, La = (e) => { const t = window.getComputedStyle(e), o = t.transitionDelay.split(",")[0] || "", a = t.transitionDuration.split(",")[0] || "", l = Number(o.slice(0, -1)) * 1e3, n = Number(a.slice(0, -1)) * 1e3; return l + n; }, ks = ["TD", "TH", "TR"], $s = [ "a", "a *", // Include content inside links "button", "button *", // Include content inside buttons "input:not(.disabled):not([disabled])", "select:not(.disabled):not([disabled])", "textarea:not(.disabled):not([disabled])", '[role="link"]', '[role="link"] *', '[role="button"]', '[role="button"] *', "[tabindex]:not(.disabled):not([disabled])" ].join(","), ea = (e) => { if (!e || !e.target) return !1; const t = e.target; if ("disabled" in t && t.disabled || ks.indexOf(t.tagName) !== -1) return !1; if (ho(".dropdown-menu", t)) return !0; const o = t.tagName === "LABEL" ? t : ho("label", t); if (o) { const a = Ya(o, "for"), l = a ? ys(a) : dl("input, select, textarea", o); if (l && !l.disabled) return !0; } return Cs(t, $s); }, cl = ["top", "right", "bottom", "left"], Bo = ["start", "end"], So = /* @__PURE__ */ cl.reduce((e, t) => e.concat(t, t + "-" + Bo[0], t + "-" + Bo[1]), []), et = Math.min, Fe = Math.max, fa = Math.round, ta = Math.floor, mt = (e) => ({ x: e, y: e }), Ts = { left: "right", right: "left", bottom: "top", top: "bottom" }, _s = { start: "end", end: "start" }; function Fa(e, t, o) { return Fe(e, et(t, o)); } function ft(e, t) { return typeof e == "function" ? e(t) : e; } function Ye(e) { return e.split("-")[0]; } function Je(e) { return e.split("-")[1]; } function fl(e) { return e === "x" ? "y" : "x"; } function Za(e) { return e === "y" ? "height" : "width"; } function xt(e) { return ["top", "bottom"].includes(Ye(e)) ? "y" : "x"; } function Ja(e) { return fl(xt(e)); } function vl(e, t, o) { o === void 0 && (o = !1); const a = Je(e), l = Ja(e), n = Za(l); let i = l === "x" ? a === (o ? "end" : "start") ? "right" : "left" : a === "start" ? "bottom" : "top"; return t.reference[n] > t.floating[n] && (i = pa(i)), [i, pa(i)]; } function Vs(e) { const t = pa(e); return [va(e), t, va(t)]; } function va(e) { return e.replace(/start|end/g, (t) => _s[t]); } function As(e, t, o) { const a = ["left", "right"], l = ["right", "left"], n = ["top", "bottom"], i = ["bottom", "top"]; switch (e) { case "top": case "bottom": return o ? t ? l : a : t ? a : l; case "left": case "right": return t ? n : i; default: return []; } } function Os(e, t, o, a) { const l = Je(e); let n = As(Ye(e), o === "start", a); return l && (n = n.map((i) => i + "-" + l), t && (n = n.concat(n.map(va)))), n; } function pa(e) { return e.replace(/left|right|bottom|top/g, (t) => Ts[t]); } function Es(e) { return { top: 0, right: 0, bottom: 0, left: 0, ...e }; } function Qa(e) { return typeof e != "number" ? Es(e) : { top: e, right: e, bottom: e, left: e }; } function It(e) { return { ...e, top: e.y, left: e.x, right: e.x + e.width, bottom: e.y + e.height }; } function Co(e, t, o) { let { reference: a, floating: l } = e; const n = xt(t), i = Ja(t), s = Za(i), u = Ye(t), d = n === "y", f = a.x + a.width / 2 - l.width / 2, g = a.y + a.height / 2 - l.height / 2, p = a[s] / 2 - l[s] / 2; let y; switch (u) { case "top": y = { x: f, y: a.y - l.height }; break; case "bottom": y = { x: f, y: a.y + a.height }; break; case "right": y = { x: a.x + a.width, y: g }; break; case "left": y = { x: a.x - l.width, y: g }; break; default: y = { x: a.x, y: a.y }; } switch (Je(t)) { case "start": y[i] -= p * (o && d ? -1 : 1); break; case "end": y[i] += p * (o && d ? -1 : 1); break; } return y; } const Ps = async (e, t, o) => { const { placement: a = "bottom", strategy: l = "absolute", middleware: n = [], platform: i } = o, s = n.filter(Boolean), u = await (i.isRTL == null ? void 0 : i.isRTL(t)); let d = await i.getElementRects({ reference: e, floating: t, strategy: l }), { x: f, y: g } = Co(d, a, u), p = a, y = {}, b = 0; for (let V = 0; V < s.length; V++) { const { name: C, fn: c } = s[V], { x: h, y: B, data: _, reset: k } = await c({ x: f, y: g, initialPlacement: a, placement: p, strategy: l, middlewareData: y, rects: d, platform: i, elements: { reference: e, floating: t } }); if (f = h ?? f, g = B ?? g, y = { ...y, [C]: { ...y[C], ..._ } }, k && b <= 50) { b++, typeof k == "object" && (k.placement && (p = k.placement), k.rects && (d = k.rects === !0 ? await i.getElementRects({ reference: e, floating: t, strategy: l }) : k.rects), { x: f, y: g } = Co(d, p, u)), V = -1; continue; } } return { x: f, y: g, placement: p, strategy: l, middlewareData: y }; }; async function Lt(e, t) { var o; t === void 0 && (t = {}); const { x: a, y: l, platform: n, rects: i, elements: s, strategy: u } = e, { boundary: d = "clippingAncestors", rootBoundary: f = "viewport", elementContext: g = "floating", altBoundary: p = !1, padding: y = 0 } = ft(t, e), b = Qa(y), C = s[p ? g === "floating" ? "reference" : "floating" : g], c = It(await n.getClippingRect({ element: (o = await (n.isElement == null ? void 0 : n.isElement(C))) == null || o ? C : C.contextElement || await (n.getDocumentElement == null ? void 0 : n.getDocumentElement(s.floating)), boundary: d, rootBoundary: f, strategy: u })), h = g === "floating" ? { ...i.floating, x: a, y: l } : i.reference, B = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(s.floating)), _ = await (n.isElement == null ? void 0 : n.isElement(B)) ? await (n.getScale == null ? void 0 : n.getScale(B)) || { x: 1, y: 1 } : { x: 1, y: 1 }, k = It(n.convertOffsetParentRelativeRectToViewportRelativeRect ? await n.convertOffsetParentRelativeRectToViewportRelativeRect({ rect: h, offsetParent: B, strategy: u }) : h); return { top: (c.top - k.top + b.top) / _.y, bottom: (k.bottom - c.bottom + b.bottom) / _.y, left: (c.left - k.left + b.left) / _.x, right: (k.right - c.right + b.right) / _.x }; } const Ns = (e) => ({ name: "arrow", options: e, async fn(t) { const { x: o, y: a, placement: l, rects: n, platform: i, elements: s, middlewareData: u } = t, { element: d, padding: f = 0 } = ft(e, t) || {}; if (d == null) return {}; const g = Qa(f), p = { x: o, y: a }, y = Ja(l), b = Za(y), V = await i.getDimensions(d), C = y === "y", c = C ? "top" : "left", h = C ? "bottom" : "right", B = C ? "clientHeight" : "clientWidth", _ = n.reference[b] + n.reference[y] - p[y] - n.floating[b], k = p[y] - n.reference[y], S = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(d)); let $ = S ? S[B] : 0; (!$ || !await (i.isElement == null ? void 0 : i.isElement(S))) && ($ = s.floating[B] || n.floating[b]); const I = _ / 2 - k / 2, T = $ / 2 - V[b] / 2 - 1, O = et(g[c], T), F = et(g[h], T), K = O, z = $ - V[b] - F, P = $ / 2 - V[b] / 2 + I, D = Fa(K, P, z), ae = !u.arrow && Je(l) != null && P != D && n.reference[b] / 2 - (P < K ? O : F) - V[b] / 2 < 0, le = ae ? P < K ? P - K : P - z : 0; return { [y]: p[y] + le, data: { [y]: D, centerOffset: P - D - le, ...ae && { alignmentOffset: le } }, reset: ae }; } }); function Is(e, t, o) { return (e ? [...o.filter((l) => Je(l) === e), ...o.filter((l) => Je(l) !== e)] : o.filter((l) => Ye(l) === l)).filter((l) => e ? Je(l) === e || (t ? va(l) !== l : !1) : !0); } const Ls = function(e) { return e === void 0 && (e = {}), { name: "autoPlacement", options: e, async fn(t) { var o, a, l; const { rects: n, middlewareData: i, placement: s, platform: u, elements: d } = t, { crossAxis: f = !1, alignment: g, allowedPlacements: p = So, autoAlignment: y = !0, ...b } = ft(e, t), V = g !== void 0 || p === So ? Is(g || null, y, p) : p, C = await Lt(t, b), c = ((o = i.autoPlacement) == null ? void 0 : o.index) || 0, h = V[c]; if (h == null) return {}; const B = vl(h, n, await (u.isRTL == null ? void 0 : u.isRTL(d.floating))); if (s !== h) return { reset: { placement: V[0] } }; const _ = [C[Ye(h)], C[B[0]], C[B[1]]], k = [...((a = i.autoPlacement) == null ? void 0 : a.overflows) || [], { placement: h, overflows: _ }], S = V[c + 1]; if (S) return { data: { index: c + 1, overflows: k }, reset: { placement: S } }; const $ = k.map((O) => { const F = Je(O.placement); return [O.placement, F && f ? ( // Check along the mainAxis and main crossAxis side. O.overflows.slice(0, 2).reduce((K, z) => K + z, 0) ) : ( // Check only the mainAxis. O.overflows[0] ), O.overflows]; }).sort((O, F) => O[1] - F[1]), T = ((l = $.filter((O) => O[2].slice( 0, // Aligned placements should not check their opposite crossAxis // side. Je(O[0]) ? 2 : 3 ).every((F) => F <= 0))[0]) == null ? void 0 : l[0]) || $[0][0]; return T !== s ? { data: { index: c + 1, overflows: k }, reset: { placement: T } } : {}; } }; }, pl = function(e) { return e === void 0 && (e = {}), { name: "flip", options: e, async fn(t) { var o, a; const { placement: l, middlewareData: n, rects: i, initialPlacement: s, platform: u, elements: d } = t, { mainAxis: f = !0, crossAxis: g = !0, fallbackPlacements: p, fallbackStrategy: y = "bestFit", fallbackAxisSideDirection: b = "none", flipAlignment: V = !0, ...C } = ft(e, t); if ((o = n.arrow) != null && o.alignmentOffset) return {}; const c = Ye(l), h = Ye(s) === s, B = await (u.isRTL == null ? void 0 : u.isRTL(d.floating)), _ = p || (h || !V ? [pa(s)] : Vs(s)); !p && b !== "none" && _.push(...Os(s, V, b, B)); const k = [s, ..._], S = await Lt(t, C), $ = []; let I = ((a = n.flip) == null ? void 0 : a.overflows) || []; if (f && $.push(S[c]), g) { const K = vl(l, i, B); $.push(S[K[0]], S[K[1]]); } if (I = [...I, { placement: l, overflows: $ }], !$.every((K) => K <= 0)) { var T, O; const K = (((T = n.flip) == null ? void 0 : T.index) || 0) + 1, z = k[K]; if (z) return { data: { index: K, overflows: I }, reset: { placement: z } }; let P = (O = I.filter((D) => D.overflows[0] <= 0).sort((D, ae) => D.overflows[1] - ae.overflows[1])[0]) == null ? void 0 : O.placement; if (!P) switch (y) { case "bestFit": { var F; const D = (F = I.map((ae) => [ae.placement, ae.overflows.filter((le) => le > 0).reduce((le, ve) => le + ve, 0)]).sort((ae, le) => ae[1] - le[1])[0]) == null ? void 0 : F[0]; D && (P = D); break; } case "initialPlacement": P = s; break; } if (l !== P) return { reset: { placement: P } }; } return {}; } }; }; function wo(e, t) { return { top: e.top - t.height, right: e.right - t.width, bottom: e.bottom - t.height, left: e.left - t.width }; } function ko(e) { return cl.some((t) => e[t] >= 0); } const Fs = function(e) { return e === void 0 && (e = {}), { name: "hide", options: e, async fn(t) { const { rects: o } = t, { strategy: a = "referenceHidden", ...l } = ft(e, t); switch (a) { case "referenceHidden": { const n = await Lt(t, { ...l, elementContext: "reference" }), i = wo(n, o.reference); return { data: { referenceHiddenOffsets: i, referenceHidden: ko(i) } }; } case "escaped": { const n = await Lt(t, { ...l, altBoundary: !0 }), i = wo(n, o.floating); return { data: { escapedOffsets: i, escaped: ko(i) } }; } default: return {}; } } }; }; function ml(e) { const t = et(...e.map((n) => n.left)), o = et(...e.map((n) => n.top)), a = Fe(...e.map((n) => n.right)), l = Fe(...e.map((n) => n.bottom)); return { x: t, y: o, width: a - t, height: l - o }; } function Hs(e) { const t = e.slice().sort((l, n) => l.y - n.y), o = []; let a = null; for (let l = 0; l < t.length; l++) { const n = t[l]; !a || n.y - a.y > a.height / 2 ? o.push([n]) : o[o.length - 1].push(n), a = n; } return o.map((l) => It(ml(l))); } const zs = function(e) { return e === void 0 && (e = {}), { name: "inline", options: e, async fn(t) { const { placement: o, elements: a, rects: l, platform: n, strategy: i } = t, { padding: s = 2, x: u, y: d } = ft(e, t), f = Array.from(await (n.getClientRects == null ? void 0 : n.getClientRects(a.reference)) || []), g = Hs(f), p = It(ml(f)), y = Qa(s); function b() { if (g.length === 2 && g[0].left > g[1].right && u != null && d != null) return g.find((C) => u > C.left - y.left && u < C.right + y.right && d > C.top - y.top && d < C.bottom + y.bottom) || p; if (g.length >= 2) { if (xt(o) === "y") { const O = g[0], F = g[g.length - 1], K = Ye(o) === "top", z = O.top, P = F.bottom, D = K ? O.left : F.left, ae = K ? O.right : F.right, le = ae - D, ve = P - z; return { top: z, bottom: P, left: D, right: ae, width: le, height: ve, x: D, y: z }; } const C = Ye(o) === "left", c = Fe(...g.map((O) => O.right)), h = et(...g.map((O) => O.left)), B = g.filter((O) => C ? O.left === h : O.right === c), _ = B[0].top, k = B[B.length - 1].bottom, S = h, $ = c, I = $ - S, T = k - _; return { top: _, bottom: k, left: S, right: $, width: I, height: T, x: S, y: _ }; } return p; } const V = await n.getElementRects({ reference: { getBoundingClientRect: b }, floating: a.floating, strategy: i }); return l.reference.x !== V.reference.x || l.reference.y !== V.reference.y || l.reference.width !== V.reference.width || l.reference.height !== V.reference.height ? { reset: { rects: V } } : {}; } }; }; async function Rs(e, t) { const { placement: o, platform: a, elements: l } = e, n = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), i = Ye(o), s = Je(o), u = xt(o) === "y", d = ["left", "top"].includes(i) ? -1 : 1, f = n && u ? -1 : 1, g = ft(t, e); let { mainAxis: p, crossAxis: y, alignmentAxis: b } = typeof g == "number" ? { mainAxis: g, crossAxis: 0, alignmentAxis: null } : { mainAxis: 0, crossAxis: 0, alignmentAxis: null, ...g }; return s && typeof b == "number" && (y = s === "end" ? b * -1 : b), u ? { x: y * f, y: p * d } : { x: p * d, y: y * f }; } const gl = function(e) { return e === void 0 && (e = 0), { name: "offset", options: e, async fn(t) { const { x: o, y: a } = t, l = await Rs(t, e); return { x: o + l.x, y: a + l.y, data: l }; } }; }, bl = function(e) { return e === void 0 && (e = {}), { name: "shift", options: e, async fn(t) { const { x: o, y: a, placement: l } = t, { mainAxis: n = !0, crossAxis: i = !1, limiter: s = { fn: (C) => { let { x: c, y: h } = C; return { x: c, y: h }; } }, ...u } = ft(e, t), d = { x: o, y: a }, f = await Lt(t, u), g = xt(Ye(l)), p = fl(g); let y = d[p], b = d[g]; if (n) { const C = p === "y" ? "top" : "left", c = p === "y" ? "bottom" : "right", h = y + f[C], B = y - f[c]; y = Fa(h, y, B); } if (i) { const C = g === "y" ? "top" : "left", c = g === "y" ? "bottom" : "right", h = b + f[C], B = b - f[c]; b = Fa(h, b, B); } const V = s.fn({ ...t, [p]: y, [g]: b }); return { ...V, data: { x: V.x - o, y: V.y - a } }; } }; }, yl = function(e) { return e === void 0 && (e = {}), { name: "size", options: e, async fn(t) { const { placement: o, rects: a, platform: l, elements: n } = t, { apply: i = () => { }, ...s } = ft(e, t), u = await Lt(t, s), d = Ye(o), f = Je(o), g = xt(o) === "y", { width: p, height: y } = a.floating; let b, V; d === "top" || d === "bottom" ? (b = d, V = f === (await (l.isRTL == null ? void 0 : l.isRTL(n.floating)) ? "start" : "end") ? "left" : "right") : (V = d, b = f === "end" ? "top" : "bottom"); const C = y - u[b], c = p - u[V], h = !t.middlewareData.shift; let B = C, _ = c; if (g) { const S = p - u.left - u.right; _ = f || h ? et(c, S) : S; } else { const S = y - u.top - u.bottom; B = f || h ? et(C, S) : S; } if (h && !f) { const S = Fe(u.left, 0), $ = Fe(u.right, 0), I = Fe(u.top, 0), T = Fe(u.bottom, 0); g ? _ = p - 2 * (S !== 0 || $ !== 0 ? S + $ : Fe(u.left, u.right)) : B = y - 2 * (I !== 0 || T !== 0 ? I + T : Fe(u.top, u.bottom)); } await i({ ...t, availableWidth: _, availableHeight: B }); const k = await l.getDimensions(n.floating); return p !== k.width || y !== k.height ? { reset: { rects: !0 } } : {}; } }; }; function gt(e) { return hl(e) ? (e.nodeName || "").toLowerCase() : "#document"; } function We(e) { var t; return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window; } function vt(e) { var t; return (t = (hl(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement; } function hl(e) { return e instanceof Node || e instanceof We(e).Node; } function ct(e) { return e instanceof Element || e instanceof We(e).Element; } function nt(e) { return e instanceof HTMLElement || e instanceof We(e).HTMLElement; } function $o(e) { return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof We(e).ShadowRoot; } function Yt(e) { const { overflow: t, overflowX: o, overflowY: a, display: l } = Ze(e); return /auto|scroll|overlay|hidden|clip/.test(t + a + o) && !["inline", "contents"].includes(l); } function xs(e) { return ["table", "td", "th"].includes(gt(e)); } function eo(e) { const t = to(), o = Ze(e); return o.transform !== "none" || o.perspective !== "none" || (o.containerType ? o.containerType !== "normal" : !1) || !t && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !t && (o.filter ? o.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((a) => (o.willChange || "").includes(a)) || ["paint", "layout", "strict", "content"].some((a) => (o.contain || "").includes(a)); } function Ms(e) { let t = Ft(e); for (; nt(t) && !Ba(t); ) { if (eo(t)) return t; t = Ft(t); } return null; } function to() { return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none"); } function Ba(e) { return ["html", "body", "#document"].includes(gt(e)); } function Ze(e) { return We(e).getComputedStyle(e); } function Sa(e) { return ct(e) ? { scrollLeft: e.scrollLeft, scrollTop: e.scrollTop } : { scrollLeft: e.pageXOffset, scrollTop: e.pageYOffset }; } function Ft(e) { if (gt(e) === "html") return e; const t = ( // Step into the shadow DOM of the parent of a slotted node. e.assignedSlot || // DOM Element detected. e.parentNode || // ShadowRoot detected. $o(e) && e.host || // Fallback. vt(e) ); return $o(t) ? t.host : t; } function Bl(e) { const t = Ft(e); return Ba(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : nt(t) && Yt(t) ? t : Bl(t); } function Wt(e, t, o) { var a; t === void 0 && (t = []), o === void 0 && (o = !0); const l = Bl(e), n = l === ((a = e.ownerDocument) == null ? void 0 : a.body), i = We(l); return n ? t.concat(i, i.visualViewport || [], Yt(l) ? l : [], i.frameElement && o ? Wt(i.frameElement) : []) : t.concat(l, Wt(l, [], o)); } function Sl(e) { const t = Ze(e); let o = parseFloat(t.width) || 0, a = parseFloat(t.height) || 0; const l = nt(e), n = l ? e.offsetWidth : o, i = l ? e.offsetHeight : a, s = fa(o) !== n || fa(a) !== i; return s && (o = n, a = i), { width: o, height: a, $: s }; } function ao(e) { return ct(e) ? e : e.contextElement; } function Pt(e) { const t = ao(e); if (!nt(t)) return mt(1); const o = t.getBoundingClientRect(), { width: a, height: l, $: n } = Sl(t); let i = (n ? fa(o.width) : o.width) / a, s = (n ? fa(o.height) : o.height) / l; return (!i || !Number.isFinite(i)) && (i = 1), (!s || !Number.isFinite(s)) && (s = 1), { x: i, y: s }; } const Ds = /* @__PURE__ */ mt(0); function Cl(e) { const t = We(e); return !to() || !t.visualViewport ? Ds : { x: t.visualViewport.offsetLeft, y: t.visualViewport.offsetTop }; } function js(e, t, o) { return t === void 0 && (t = !1), !o || t && o !== We(e) ? !1 : t; } function St(e, t, o, a) { t === void 0 && (t = !1), o === void 0 && (o = !1); const l = e.getBoundingClientRect(), n = ao(e); let i = mt(1); t && (a ? ct(a) && (i = Pt(a)) : i = Pt(e)); const s = js(n, o, a) ? Cl(n) : mt(0); let u = (l.left + s.x) / i.x, d = (l.top + s.y) / i.y, f = l.width / i.x, g = l.height / i.y; if (n) { const p = We(n), y = a && ct(a) ? We(a) : a; let b = p.frameElement; for (; b && a && y !== p; ) { const V = Pt(b), C = b.getBoundingClientRect(), c = Ze(b), h = C.left + (b.clientLeft + parseFloat(c.paddingLeft)) * V.x, B = C.top + (b.clientTop + parseFloat(c.paddingTop)) * V.y; u *= V.x, d *= V.y, f *= V.x, g *= V.y, u += h, d += B, b = We(b).frameElement; } } return It({ width: f, height: g, x: u, y: d }); } function qs(e) { let { rect: t, offsetParent: o, strategy: a } = e; const l = nt(o), n = vt(o); if (o === n) return t; let i = { scrollLeft: 0, scrollTop: 0 }, s = mt(1); const u = mt(0); if ((l || !l && a !== "fixed") && ((gt(o) !== "body" || Yt(n)) && (i = Sa(o)), nt(o))) { const d = St(o); s = Pt(o), u.x = d.x + o.clientLeft, u.y = d.y + o.clientTop; } return { width: t.width * s.x, height: t.height * s.y, x: t.x * s.x - i.scrollLeft * s.x + u.x, y: t.y * s.y - i.scrollTop * s.y + u.y }; } function Gs(e) { return Array.from(e.getClientRects()); } function wl(e) { return St(vt(e)).left + Sa(e).scrollLeft; } function Ws(e) { const t = vt(e), o = Sa(e), a = e.ownerDocument.body, l = Fe(t.scrollWidth, t.clientWidth, a.scrollWidth, a.clientWidth), n = Fe(t.scrollHeight, t.clientHeight, a.scrollHeight, a.clientHeight); let i = -o.scrollLeft + wl(e); const s = -o.scrollTop; return Ze(a).direction === "rtl" && (i += Fe(t.clientWidth, a.clientWidth) - l), { width: l, height: n, x: i, y: s }; } function Us(e, t) { const o = We(e), a = vt(e), l = o.visualViewport; let n = a.clientWidth, i = a.clientHeight, s = 0, u = 0; if (l) { n = l.width, i = l.height; const d = to(); (!d || d && t === "fixed") && (s = l.offsetLeft, u = l.offsetTop); } return { width: n, height: i, x: s, y: u }; } function Xs(e, t) { const o = St(e, !0, t === "fixed"), a = o.top + e.clientTop, l = o.left + e.clientLeft, n = nt(e) ? Pt(e) : mt(1), i = e.clientWidth * n.x, s = e.clientHeight * n.y, u = l * n.x, d = a * n.y; return { width: i, height: s, x: u, y: d }; } function To(e, t, o) { let a; if (t === "viewport") a = Us(e, o); else if (t === "document") a = Ws(vt(e)); else if (ct(t)) a = Xs(t, o); else { const l = Cl(e); a = { ...t, x: t.x - l.x, y: t.y - l.y }; } return It(a); } function kl(e, t) { const o = Ft(e); return o === t || !ct(o) || Ba(o) ? !1 : Ze(o).position === "fixed" || kl(o, t); } function Ks(e, t) { const o = t.get(e); if (o) return o; let a = Wt(e, [], !1).filter((s) => ct(s) && gt(s) !== "body"), l = null; const n = Ze(e).position === "fixed"; let i = n ? Ft(e) : e; for (; ct(i) && !Ba(i); ) { const s = Ze(i), u = eo(i); !u && s.position === "fixed" && (l = null), (n ? !u && !l : !u && s.position === "static" && !!l && ["absolute", "fixed"].includes(l.position) || Yt(i) && !u && kl(e, i)) ? a = a.filter((f) => f !== i) : l = s, i = Ft(i); } return t.set(e, a), a; } function Ys(e) { let { element: t, boundary: o, rootBoundary: a, strategy: l } = e; const i = [...o === "clippingAncestors" ? Ks(t, this._c) : [].concat(o), a], s = i[0], u = i.reduce((d, f) => { const g = To(t, f, l); return d.top = Fe(g.top, d.top), d.right = et(g.right, d.right), d.bottom = et(g.bottom, d.bottom), d.left = Fe(g.left, d.left), d; }, To(t, s, l)); return { width: u.right - u.left, height: u.bottom - u.top, x: u.left, y: u.top }; } function Zs(e) { return Sl(e); } function Js(e, t, o) { const a = nt(t), l = vt(t), n = o === "fixed", i = St(e, !0, n, t); let s = { scrollLeft: 0, scrollTop: 0 }; const u = mt(0); if (a || !a && !n) if ((gt(t) !== "body" || Yt(l)) && (s = Sa(t)), a) { const d = St(t, !0, n, t); u.x = d.x + t.clientLeft, u.y = d.y + t.clientTop; } else l && (u.x = wl(l)); return { x: i.left + s.scrollLeft - u.x, y: i.top + s.scrollTop - u.y, width: i.width, height: i.height }; } function _o(e, t) { return !nt(e) || Ze(e).position === "fixed" ? null : t ? t(e) : e.offsetParent; } function $l(e, t) { const o = We(e); if (!nt(e)) return o; let a = _o(e, t); for (; a && xs(a) && Ze(a).position === "static"; ) a = _o(a, t); return a && (gt(a) === "html" || gt(a) === "body" && Ze(a).position === "static" && !eo(a)) ? o : a || Ms(e) || o; } const Qs = async function(e) { let { reference: t, floating: o, strategy: a } = e; const l = this.getOffsetParent || $l, n = this.getDimensions; return { reference: Js(t, await l(o), a), floating: { x: 0, y: 0, ...await n(o) } }; }; function ei(e) { return Ze(e).direction === "rtl"; } const ti = { convertOffsetParentRelativeRectToViewportRelativeRect: qs, getDocumentElement: vt, getClippingRect: Ys, getOffsetParent: $l, getElementRects: Qs, getClientRects: Gs, getDimensions: Zs, getScale: Pt, isElement: ct, isRTL: ei }; function ai(e, t) { let o = null, a; const l = vt(e); function n() { clearTimeout(a), o && o.disconnect(), o = null; } function i(s, u) { s === void 0 && (s = !1), u === void 0 && (u = 1), n(); const { left: d, top: f, width: g, height: p } = e.getBoundingClientRect(); if (s || t(), !g || !p) return; const y = ta(f), b = ta(l.clientWidth - (d + g)), V = ta(l.clientHeight - (f + p)), C = ta(d), h = { rootMargin: -y + "px " + -b + "px " + -V + "px " + -C + "px", threshold: Fe(0, et(1, u)) || 1 }; let B = !0; function _(k) { const S = k[0].intersectionRatio; if (S !== u) { if (!B) return i(); S ? i(!1, S) : a = setTimeout(() => { i(!1, 1e-7); }, 100); } B = !1; } try { o = new IntersectionObserver(_, { ...h, // Handle