import { b as e, h as t } from "./chunk.BlbRoQQ3.js";
import { b as n } from "./jsx-runtime.DF4K5VCp.js";
import * as r from "react";
import i, { useCallback as a, useEffect as o, useLayoutEffect as s, useMemo as c, useRef as l, useState as u } from "react";
import * as d from "react-dom";
function f(e, t) {
	typeof e == "function" ? e(t) : e != null && (e.current = t);
}
function p(...e) {
	return (t) => e.forEach((e) => f(e, t));
}
function m(...e) {
	return r.useCallback(p(...e), e);
}
var h = /* @__PURE__ */ t(n(), 1), g = r.forwardRef((e, t) => {
	let { children: n,...i } = e, a = r.Children.toArray(n), o = a.find(y);
	if (o) {
		let e = o.props.children, n = a.map((t) => t === o ? r.Children.count(e) > 1 ? r.Children.only(null) : r.isValidElement(e) ? e.props.children : null : t);
		return /* @__PURE__ */ (0, h.jsx)(_, {
			...i,
			ref: t,
			children: r.isValidElement(e) ? r.cloneElement(e, void 0, n) : null
		});
	}
	return /* @__PURE__ */ (0, h.jsx)(_, {
		...i,
		ref: t,
		children: n
	});
});
g.displayName = "Slot";
var _ = r.forwardRef((e, t) => {
	let { children: n,...i } = e;
	if (r.isValidElement(n)) {
		let e = x(n);
		return r.cloneElement(n, {
			...b(i, n.props),
			ref: t ? p(t, e) : e
		});
	}
	return r.Children.count(n) > 1 ? r.Children.only(null) : null;
});
_.displayName = "SlotClone";
var v = ({ children: e }) => /* @__PURE__ */ (0, h.jsx)(h.Fragment, { children: e });
function y(e) {
	return r.isValidElement(e) && e.type === v;
}
function b(e, t) {
	let n = { ...t };
	for (let r in t) {
		let i = e[r], a = t[r], o = /^on[A-Z]/.test(r);
		o ? i && a ? n[r] = (...e) => {
			a(...e), i(...e);
		} : i && (n[r] = i) : r === "style" ? n[r] = {
			...i,
			...a
		} : r === "className" && (n[r] = [i, a].filter(Boolean).join(" "));
	}
	return {
		...e,
		...n
	};
}
function x(e) {
	let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
	return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
}
var S = [
	"a",
	"button",
	"div",
	"form",
	"h2",
	"h3",
	"img",
	"input",
	"label",
	"li",
	"nav",
	"ol",
	"p",
	"span",
	"svg",
	"ul"
], C = S.reduce((e, t) => {
	let n = r.forwardRef((e, n) => {
		let { asChild: r,...i } = e, a = r ? g : t;
		return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ (0, h.jsx)(a, {
			...i,
			ref: n
		});
	});
	return n.displayName = `Primitive.${t}`, {
		...e,
		[t]: n
	};
}, {});
function w(e, t) {
	e && d.flushSync(() => e.dispatchEvent(t));
}
var T = "VisuallyHidden", E = r.forwardRef((e, t) => /* @__PURE__ */ (0, h.jsx)(C.span, {
	...e,
	ref: t,
	style: {
		position: "absolute",
		border: 0,
		width: 1,
		height: 1,
		padding: 0,
		margin: -1,
		overflow: "hidden",
		clip: "rect(0, 0, 0, 0)",
		whiteSpace: "nowrap",
		wordWrap: "normal",
		...e.style
	}
}));
E.displayName = T;
var D = E, O = /* @__PURE__ */ e(((exports, t) => {
	/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
	*/
	(function() {
		var e = {}.hasOwnProperty;
		function n() {
			for (var t = [], r = 0; r < arguments.length; r++) {
				var i = arguments[r];
				if (i) {
					var a = typeof i;
					if (a === "string" || a === "number") t.push(i);
					else if (Array.isArray(i)) {
						if (i.length) {
							var o = n.apply(null, i);
							o && t.push(o);
						}
					} else if (a === "object") {
						if (i.toString !== Object.prototype.toString && !i.toString.toString().includes("[native code]")) {
							t.push(i.toString());
							continue;
						}
						for (var s in i) e.call(i, s) && i[s] && t.push(s);
					}
				}
			}
			return t.join(" ");
		}
		t !== void 0 && t.exports ? (n.default = n, t.exports = n) : typeof define == "function" && typeof define.amd == "object" && define.amd ? define("classnames", [], function() {
			return n;
		}) : window.classNames = n;
	})();
}));
function k(e, t) {
	let n = r.createContext(t);
	function i(e) {
		let { children: t,...i } = e, a = r.useMemo(() => i, Object.values(i));
		return /* @__PURE__ */ (0, h.jsx)(n.Provider, {
			value: a,
			children: t
		});
	}
	function a(i) {
		let a = r.useContext(n);
		if (a) return a;
		if (t !== void 0) return t;
		throw Error(`\`${i}\` must be used within \`${e}\``);
	}
	return i.displayName = e + "Provider", [i, a];
}
function A(e, t = []) {
	let n = [];
	function i(t, i) {
		let a = r.createContext(i), o = n.length;
		n = [...n, i];
		function s(t) {
			let { scope: n, children: i,...s } = t, c = n?.[e][o] || a, l = r.useMemo(() => s, Object.values(s));
			return /* @__PURE__ */ (0, h.jsx)(c.Provider, {
				value: l,
				children: i
			});
		}
		function c(n, s) {
			let c = s?.[e][o] || a, l = r.useContext(c);
			if (l) return l;
			if (i !== void 0) return i;
			throw Error(`\`${n}\` must be used within \`${t}\``);
		}
		return s.displayName = t + "Provider", [s, c];
	}
	let a = () => {
		let t = n.map((e) => r.createContext(e));
		return function(n) {
			let i = n?.[e] || t;
			return r.useMemo(() => ({ [`__scope${e}`]: {
				...n,
				[e]: i
			} }), [n, i]);
		};
	};
	return a.scopeName = e, [i, j(a, ...t)];
}
function j(...e) {
	let t = e[0];
	if (e.length === 1) return t;
	let n = () => {
		let n = e.map((e) => ({
			useScope: e(),
			scopeName: e.scopeName
		}));
		return function(e) {
			let i = n.reduce((t, { useScope: n, scopeName: r }) => {
				let i = n(e), a = i[`__scope${r}`];
				return {
					...t,
					...a
				};
			}, {});
			return r.useMemo(() => ({ [`__scope${t.scopeName}`]: i }), [i]);
		};
	};
	return n.scopeName = t.scopeName, n;
}
function M(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
	return function(r) {
		if (e?.(r), n === !1 || !r.defaultPrevented) return t?.(r);
	};
}
var N = globalThis?.document ? r.useLayoutEffect : () => {}, P = r.useId || (() => void 0), ee = 0;
function te(e) {
	let [t, n] = r.useState(P());
	return N(() => {
		e || n((e) => e ?? String(ee++));
	}, [e]), e || (t ? `radix-${t}` : "");
}
function ne(e) {
	let t = r.useRef(e);
	return r.useEffect(() => {
		t.current = e;
	}), r.useMemo(() => (...e) => t.current?.(...e), []);
}
function re({ prop: e, defaultProp: t, onChange: n = () => {} }) {
	let [i, a] = ie({
		defaultProp: t,
		onChange: n
	}), o = e !== void 0, s = o ? e : i, c = ne(n), l = r.useCallback((t) => {
		if (o) {
			let n = t, r = typeof t == "function" ? n(e) : t;
			r !== e && c(r);
		} else a(t);
	}, [
		o,
		e,
		a,
		c
	]);
	return [s, l];
}
function ie({ defaultProp: e, onChange: t }) {
	let n = r.useState(e), [i] = n, a = r.useRef(i), o = ne(t);
	return r.useEffect(() => {
		a.current !== i && (o(i), a.current = i);
	}, [
		i,
		a,
		o
	]), n;
}
const ae = { asChild: { type: "boolean" } }, oe = "gray.gold.bronze.brown.yellow.amber.orange.tomato.red.ruby.crimson.pink.plum.purple.violet.iris.indigo.blue.cyan.teal.jade.green.grass.lime.mint.sky".split("."), se = [
	"auto",
	"gray",
	"mauve",
	"slate",
	"sage",
	"olive",
	"sand"
], ce = { color: {
	type: "enum",
	values: oe,
	default: void 0
} }, le = { color: {
	type: "enum",
	values: oe,
	default: ""
} }, ue = [
	"top",
	"right",
	"bottom",
	"left"
], de = ["start", "end"], fe = /* @__PURE__ */ ue.reduce((e, t) => e.concat(t, t + "-" + de[0], t + "-" + de[1]), []), pe = Math.min, F = Math.max, me = Math.round, he = Math.floor, I = (e) => ({
	x: e,
	y: e
}), ge = {
	left: "right",
	right: "left",
	bottom: "top",
	top: "bottom"
}, _e = {
	start: "end",
	end: "start"
};
function ve(e, t, n) {
	return F(e, pe(t, n));
}
function ye(e, t) {
	return typeof e == "function" ? e(t) : e;
}
function be(e) {
	return e.split("-")[0];
}
function L(e) {
	return e.split("-")[1];
}
function xe(e) {
	return e === "x" ? "y" : "x";
}
function Se(e) {
	return e === "y" ? "height" : "width";
}
function Ce(e) {
	return ["top", "bottom"].includes(be(e)) ? "y" : "x";
}
function we(e) {
	return xe(Ce(e));
}
function Te(e, t, n) {
	n === void 0 && (n = !1);
	let r = L(e), i = we(e), a = Se(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
	return t.reference[a] > t.floating[a] && (o = Ae(o)), [o, Ae(o)];
}
function Ee(e) {
	let t = Ae(e);
	return [
		De(e),
		t,
		De(t)
	];
}
function De(e) {
	return e.replace(/start|end/g, (e) => _e[e]);
}
function Oe(e, t, n) {
	let r = ["left", "right"], i = ["right", "left"], a = ["top", "bottom"], o = ["bottom", "top"];
	switch (e) {
		case "top":
		case "bottom": return n ? t ? i : r : t ? r : i;
		case "left":
		case "right": return t ? a : o;
		default: return [];
	}
}
function ke(e, t, n, r) {
	let i = L(e), a = Oe(be(e), n === "start", r);
	return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(De)))), a;
}
function Ae(e) {
	return e.replace(/left|right|bottom|top/g, (e) => ge[e]);
}
function je(e) {
	return {
		top: 0,
		right: 0,
		bottom: 0,
		left: 0,
		...e
	};
}
function Me(e) {
	return typeof e == "number" ? {
		top: e,
		right: e,
		bottom: e,
		left: e
	} : je(e);
}
function Ne(e) {
	let { x: t, y: n, width: r, height: i } = e;
	return {
		width: r,
		height: i,
		top: n,
		left: t,
		right: t + r,
		bottom: n + i,
		x: t,
		y: n
	};
}
function Pe() {
	return typeof window < "u";
}
function Fe(e) {
	return Ie(e) ? (e.nodeName || "").toLowerCase() : "#document";
}
function R(e) {
	var t;
	return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
}
function z(e) {
	var t;
	return (t = (Ie(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
}
function Ie(e) {
	return Pe() ? e instanceof Node || e instanceof R(e).Node : !1;
}
function B(e) {
	return Pe() ? e instanceof Element || e instanceof R(e).Element : !1;
}
function V(e) {
	return Pe() ? e instanceof HTMLElement || e instanceof R(e).HTMLElement : !1;
}
function Le(e) {
	return !Pe() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof R(e).ShadowRoot;
}
function Re(e) {
	let { overflow: t, overflowX: n, overflowY: r, display: i } = H(e);
	return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(i);
}
function ze(e) {
	return [
		"table",
		"td",
		"th"
	].includes(Fe(e));
}
function Be(e) {
	return [":popover-open", ":modal"].some((t) => {
		try {
			return e.matches(t);
		} catch {
			return !1;
		}
	});
}
function Ve(e) {
	let t = Ue(), n = B(e) ? H(e) : e;
	return [
		"transform",
		"translate",
		"scale",
		"rotate",
		"perspective"
	].some((e) => n[e] ? n[e] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || [
		"transform",
		"translate",
		"scale",
		"rotate",
		"perspective",
		"filter"
	].some((e) => (n.willChange || "").includes(e)) || [
		"paint",
		"layout",
		"strict",
		"content"
	].some((e) => (n.contain || "").includes(e));
}
function He(e) {
	let t = U(e);
	for (; V(t) && !We(t);) {
		if (Ve(t)) return t;
		if (Be(t)) return null;
		t = U(t);
	}
	return null;
}
function Ue() {
	return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
}
function We(e) {
	return [
		"html",
		"body",
		"#document"
	].includes(Fe(e));
}
function H(e) {
	return R(e).getComputedStyle(e);
}
function Ge(e) {
	return B(e) ? {
		scrollLeft: e.scrollLeft,
		scrollTop: e.scrollTop
	} : {
		scrollLeft: e.scrollX,
		scrollTop: e.scrollY
	};
}
function U(e) {
	if (Fe(e) === "html") return e;
	let t = e.assignedSlot || e.parentNode || Le(e) && e.host || z(e);
	return Le(t) ? t.host : t;
}
function Ke(e) {
	let t = U(e);
	return We(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : V(t) && Re(t) ? t : Ke(t);
}
function qe(e, t, n) {
	var r;
	t === void 0 && (t = []), n === void 0 && (n = !0);
	let i = Ke(e), a = i === (r = e.ownerDocument)?.body, o = R(i);
	if (a) {
		let e = Je(o);
		return t.concat(o, o.visualViewport || [], Re(i) ? i : [], e && n ? qe(e) : []);
	}
	return t.concat(i, qe(i, [], n));
}
function Je(e) {
	return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
}
var Ye = r.createContext(void 0), Xe = (e) => {
	let { dir: t, children: n } = e;
	return /* @__PURE__ */ (0, h.jsx)(Ye.Provider, {
		value: t,
		children: n
	});
};
function Ze(e) {
	let t = r.useContext(Ye);
	return e || t || "ltr";
}
const Qe = [
	"none",
	"small",
	"medium",
	"large",
	"full"
], $e = { radius: {
	type: "enum",
	values: Qe,
	default: void 0
} };
function et(e) {
	let t = e + "CollectionProvider", [n, r] = A(t), [a, o] = n(t, {
		collectionRef: { current: null },
		itemMap: /* @__PURE__ */ new Map()
	}), s = (e) => {
		let { scope: t, children: n } = e, r = i.useRef(null), o = i.useRef(/* @__PURE__ */ new Map()).current;
		return /* @__PURE__ */ (0, h.jsx)(a, {
			scope: t,
			itemMap: o,
			collectionRef: r,
			children: n
		});
	};
	s.displayName = t;
	let c = e + "CollectionSlot", l = i.forwardRef((e, t) => {
		let { scope: n, children: r } = e, i = o(c, n), a = m(t, i.collectionRef);
		return /* @__PURE__ */ (0, h.jsx)(g, {
			ref: a,
			children: r
		});
	});
	l.displayName = c;
	let u = e + "CollectionItemSlot", d = "data-radix-collection-item", f = i.forwardRef((e, t) => {
		let { scope: n, children: r,...a } = e, s = i.useRef(null), c = m(t, s), l = o(u, n);
		return i.useEffect(() => (l.itemMap.set(s, {
			ref: s,
			...a
		}), () => void l.itemMap.delete(s))), /* @__PURE__ */ (0, h.jsx)(g, {
			[d]: "",
			ref: c,
			children: r
		});
	});
	f.displayName = u;
	function p(t) {
		let n = o(e + "CollectionConsumer", t), r = i.useCallback(() => {
			let e = n.collectionRef.current;
			if (!e) return [];
			let t = Array.from(e.querySelectorAll(`[${d}]`)), r = Array.from(n.itemMap.values()), i = r.sort((e, n) => t.indexOf(e.ref.current) - t.indexOf(n.ref.current));
			return i;
		}, [n.collectionRef, n.itemMap]);
		return r;
	}
	return [
		{
			Provider: s,
			Slot: l,
			ItemSlot: f
		},
		p,
		r
	];
}
var tt = "rovingFocusGroup.onEntryFocus", nt = {
	bubbles: !1,
	cancelable: !0
}, rt = "RovingFocusGroup", [it, at, ot] = et(rt), [st, ct] = A(rt, [ot]), [lt, ut] = st(rt), dt = r.forwardRef((e, t) => /* @__PURE__ */ (0, h.jsx)(it.Provider, {
	scope: e.__scopeRovingFocusGroup,
	children: /* @__PURE__ */ (0, h.jsx)(it.Slot, {
		scope: e.__scopeRovingFocusGroup,
		children: /* @__PURE__ */ (0, h.jsx)(ft, {
			...e,
			ref: t
		})
	})
}));
dt.displayName = rt;
var ft = r.forwardRef((e, t) => {
	let { __scopeRovingFocusGroup: n, orientation: i, loop: a = !1, dir: o, currentTabStopId: s, defaultCurrentTabStopId: c, onCurrentTabStopIdChange: l, onEntryFocus: u, preventScrollOnEntryFocus: d = !1,...f } = e, p = r.useRef(null), g = m(t, p), _ = Ze(o), [v = null, y] = re({
		prop: s,
		defaultProp: c,
		onChange: l
	}), [b, x] = r.useState(!1), S = ne(u), w = at(n), T = r.useRef(!1), [E, D] = r.useState(0);
	return r.useEffect(() => {
		let e = p.current;
		if (e) return e.addEventListener(tt, S), () => e.removeEventListener(tt, S);
	}, [S]), /* @__PURE__ */ (0, h.jsx)(lt, {
		scope: n,
		orientation: i,
		dir: _,
		loop: a,
		currentTabStopId: v,
		onItemFocus: r.useCallback((e) => y(e), [y]),
		onItemShiftTab: r.useCallback(() => x(!0), []),
		onFocusableItemAdd: r.useCallback(() => D((e) => e + 1), []),
		onFocusableItemRemove: r.useCallback(() => D((e) => e - 1), []),
		children: /* @__PURE__ */ (0, h.jsx)(C.div, {
			tabIndex: b || E === 0 ? -1 : 0,
			"data-orientation": i,
			...f,
			ref: g,
			style: {
				outline: "none",
				...e.style
			},
			onMouseDown: M(e.onMouseDown, () => {
				T.current = !0;
			}),
			onFocus: M(e.onFocus, (e) => {
				let t = !T.current;
				if (e.target === e.currentTarget && t && !b) {
					let t = new CustomEvent(tt, nt);
					if (e.currentTarget.dispatchEvent(t), !t.defaultPrevented) {
						let e = w().filter((e) => e.focusable), t = e.find((e) => e.active), n = e.find((e) => e.id === v), r = [
							t,
							n,
							...e
						].filter(Boolean), i = r.map((e) => e.ref.current);
						vt(i, d);
					}
				}
				T.current = !1;
			}),
			onBlur: M(e.onBlur, () => x(!1))
		})
	});
}), pt = "RovingFocusGroupItem", mt = r.forwardRef((e, t) => {
	let { __scopeRovingFocusGroup: n, focusable: i = !0, active: a = !1, tabStopId: o,...s } = e, c = te(), l = o || c, u = ut(pt, n), d = u.currentTabStopId === l, f = at(n), { onFocusableItemAdd: p, onFocusableItemRemove: m } = u;
	return r.useEffect(() => {
		if (i) return p(), () => m();
	}, [
		i,
		p,
		m
	]), /* @__PURE__ */ (0, h.jsx)(it.ItemSlot, {
		scope: n,
		id: l,
		focusable: i,
		active: a,
		children: /* @__PURE__ */ (0, h.jsx)(C.span, {
			tabIndex: d ? 0 : -1,
			"data-orientation": u.orientation,
			...s,
			ref: t,
			onMouseDown: M(e.onMouseDown, (e) => {
				i ? u.onItemFocus(l) : e.preventDefault();
			}),
			onFocus: M(e.onFocus, () => u.onItemFocus(l)),
			onKeyDown: M(e.onKeyDown, (e) => {
				if (e.key === "Tab" && e.shiftKey) {
					u.onItemShiftTab();
					return;
				}
				if (e.target !== e.currentTarget) return;
				let t = _t(e, u.orientation, u.dir);
				if (t !== void 0) {
					if (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) return;
					e.preventDefault();
					let n = f().filter((e) => e.focusable), r = n.map((e) => e.ref.current);
					if (t === "last") r.reverse();
					else if (t === "prev" || t === "next") {
						t === "prev" && r.reverse();
						let n = r.indexOf(e.currentTarget);
						r = u.loop ? yt(r, n + 1) : r.slice(n + 1);
					}
					setTimeout(() => vt(r));
				}
			})
		})
	});
});
mt.displayName = pt;
var ht = {
	ArrowLeft: "prev",
	ArrowUp: "prev",
	ArrowRight: "next",
	ArrowDown: "next",
	PageUp: "first",
	Home: "first",
	PageDown: "last",
	End: "last"
};
function gt(e, t) {
	return t === "rtl" ? e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e : e;
}
function _t(e, t, n) {
	let r = gt(e.key, n);
	if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r))) return ht[r];
}
function vt(e, t = !1) {
	let n = document.activeElement;
	for (let r of e) if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
}
function yt(e, t) {
	return e.map((n, r) => e[(t + r) % e.length]);
}
var bt = dt, xt = mt, St = "Toggle", Ct = r.forwardRef((e, t) => {
	let { pressed: n, defaultPressed: r = !1, onPressedChange: i,...a } = e, [o = !1, s] = re({
		prop: n,
		onChange: i,
		defaultProp: r
	});
	return /* @__PURE__ */ (0, h.jsx)(C.button, {
		type: "button",
		"aria-pressed": o,
		"data-state": o ? "on" : "off",
		"data-disabled": e.disabled ? "" : void 0,
		...a,
		ref: t,
		onClick: M(e.onClick, () => {
			e.disabled || s(!o);
		})
	});
});
Ct.displayName = St;
var wt = "ToggleGroup", [Tt, Et] = A(wt, [ct]), Dt = ct(), Ot = i.forwardRef((e, t) => {
	let { type: n,...r } = e;
	if (n === "single") {
		let e = r;
		return /* @__PURE__ */ (0, h.jsx)(jt, {
			...e,
			ref: t
		});
	}
	if (n === "multiple") {
		let e = r;
		return /* @__PURE__ */ (0, h.jsx)(Mt, {
			...e,
			ref: t
		});
	}
	throw Error(`Missing prop \`type\` expected on \`${wt}\``);
});
Ot.displayName = wt;
var [kt, At] = Tt(wt), jt = i.forwardRef((e, t) => {
	let { value: n, defaultValue: r, onValueChange: a = () => {},...o } = e, [s, c] = re({
		prop: n,
		defaultProp: r,
		onChange: a
	});
	return /* @__PURE__ */ (0, h.jsx)(kt, {
		scope: e.__scopeToggleGroup,
		type: "single",
		value: s ? [s] : [],
		onItemActivate: c,
		onItemDeactivate: i.useCallback(() => c(""), [c]),
		children: /* @__PURE__ */ (0, h.jsx)(Ft, {
			...o,
			ref: t
		})
	});
}), Mt = i.forwardRef((e, t) => {
	let { value: n, defaultValue: r, onValueChange: a = () => {},...o } = e, [s = [], c] = re({
		prop: n,
		defaultProp: r,
		onChange: a
	}), l = i.useCallback((e) => c((t = []) => [...t, e]), [c]), u = i.useCallback((e) => c((t = []) => t.filter((t) => t !== e)), [c]);
	return /* @__PURE__ */ (0, h.jsx)(kt, {
		scope: e.__scopeToggleGroup,
		type: "multiple",
		value: s,
		onItemActivate: l,
		onItemDeactivate: u,
		children: /* @__PURE__ */ (0, h.jsx)(Ft, {
			...o,
			ref: t
		})
	});
});
Ot.displayName = wt;
var [Nt, Pt] = Tt(wt), Ft = i.forwardRef((e, t) => {
	let { __scopeToggleGroup: n, disabled: r = !1, rovingFocus: i = !0, orientation: a, dir: o, loop: s = !0,...c } = e, l = Dt(n), u = Ze(o), d = {
		role: "group",
		dir: u,
		...c
	};
	return /* @__PURE__ */ (0, h.jsx)(Nt, {
		scope: n,
		rovingFocus: i,
		disabled: r,
		children: i ? /* @__PURE__ */ (0, h.jsx)(bt, {
			asChild: !0,
			...l,
			orientation: a,
			dir: u,
			loop: s,
			children: /* @__PURE__ */ (0, h.jsx)(C.div, {
				...d,
				ref: t
			})
		}) : /* @__PURE__ */ (0, h.jsx)(C.div, {
			...d,
			ref: t
		})
	});
}), It = "ToggleGroupItem", Lt = i.forwardRef((e, t) => {
	let n = At(It, e.__scopeToggleGroup), r = Pt(It, e.__scopeToggleGroup), a = Dt(e.__scopeToggleGroup), o = n.value.includes(e.value), s = r.disabled || e.disabled, c = {
		...e,
		pressed: o,
		disabled: s
	}, l = i.useRef(null);
	return r.rovingFocus ? /* @__PURE__ */ (0, h.jsx)(xt, {
		asChild: !0,
		...a,
		focusable: !s,
		active: o,
		ref: l,
		children: /* @__PURE__ */ (0, h.jsx)(Rt, {
			...c,
			ref: t
		})
	}) : /* @__PURE__ */ (0, h.jsx)(Rt, {
		...c,
		ref: t
	});
});
Lt.displayName = It;
var Rt = i.forwardRef((e, t) => {
	let { __scopeToggleGroup: n, value: r,...i } = e, a = At(It, n), o = {
		role: "radio",
		"aria-checked": e.pressed,
		"aria-pressed": void 0
	}, s = a.type === "single" ? o : void 0;
	return /* @__PURE__ */ (0, h.jsx)(Ct, {
		...s,
		...i,
		ref: t,
		onPressedChange: (e) => {
			e ? a.onItemActivate(r) : a.onItemDeactivate(r);
		}
	});
}), zt = Ot, Bt = Lt;
const Vt = /* @__PURE__ */ new Set(), W = /* @__PURE__ */ new WeakMap(), Ht = /* @__PURE__ */ new WeakMap(), Ut = /* @__PURE__ */ new WeakMap(), Wt = /* @__PURE__ */ new WeakMap(), Gt = /* @__PURE__ */ new WeakMap(), Kt = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakSet();
let G, Yt = 0, Xt = 0;
const K = "__aa_tgt", Zt = "__aa_del", Qt = "__aa_new", $t = (e) => {
	let t = un(e);
	t && t.forEach((e) => fn(e));
}, en = (e) => {
	e.forEach((e) => {
		e.target === G && rn(), W.has(e.target) && nn(e.target);
	});
};
function tn(e) {
	let t = Wt.get(e);
	t?.disconnect();
	let n = W.get(e), r = 0;
	n || (n = mn(e), W.set(e, n));
	let { offsetWidth: i, offsetHeight: a } = G, o = [
		n.top - 5,
		i - (n.left + 5 + n.width),
		a - (n.top + 5 + n.height),
		n.left - 5
	], s = o.map((e) => `${-1 * Math.floor(e)}px`).join(" "), c = new IntersectionObserver(() => {
		++r > 1 && nn(e);
	}, {
		root: G,
		threshold: 1,
		rootMargin: s
	});
	c.observe(e), Wt.set(e, c);
}
function nn(e) {
	clearTimeout(qt.get(e));
	let t = gn(e), n = xn(t) ? 500 : t.duration;
	qt.set(e, setTimeout(async () => {
		let t = Ut.get(e);
		try {
			await t?.finished, W.set(e, mn(e)), tn(e);
		} catch {}
	}, n));
}
function rn() {
	clearTimeout(qt.get(G)), qt.set(G, setTimeout(() => {
		Vt.forEach((e) => yn(e, (e) => on(() => nn(e))));
	}, 100));
}
function an(e) {
	setTimeout(() => {
		Gt.set(e, setInterval(() => on(nn.bind(null, e)), 2e3));
	}, Math.round(2e3 * Math.random()));
}
function on(e) {
	typeof requestIdleCallback == "function" ? requestIdleCallback(() => e()) : requestAnimationFrame(() => e());
}
let sn, cn;
const ln = typeof window < "u" && "ResizeObserver" in window;
ln && (G = document.documentElement, sn = new MutationObserver($t), cn = new ResizeObserver(en), window.addEventListener("scroll", () => {
	Xt = window.scrollY, Yt = window.scrollX;
}), cn.observe(G));
function un(e) {
	let t = e.reduce((e, t) => [
		...e,
		...Array.from(t.addedNodes),
		...Array.from(t.removedNodes)
	], []), n = t.every((e) => e.nodeName === "#comment");
	return n ? !1 : e.reduce((e, t) => {
		if (e === !1) return !1;
		if (t.target instanceof Element) {
			if (dn(t.target), !e.has(t.target)) {
				e.add(t.target);
				for (let n = 0; n < t.target.children.length; n++) {
					let r = t.target.children.item(n);
					if (r) {
						if (Zt in r) return !1;
						dn(t.target, r), e.add(r);
					}
				}
			}
			if (t.removedNodes.length) for (let n = 0; n < t.removedNodes.length; n++) {
				let r = t.removedNodes[n];
				if (Zt in r) return !1;
				r instanceof Element && (e.add(r), dn(t.target, r), Ht.set(r, [t.previousSibling, t.nextSibling]));
			}
		}
		return e;
	}, /* @__PURE__ */ new Set());
}
function dn(e, t) {
	!t && !(K in e) ? Object.defineProperty(e, K, { value: e }) : t && !(K in t) && Object.defineProperty(t, K, { value: e });
}
function fn(e) {
	var t;
	let n = e.isConnected, r = W.has(e);
	n && Ht.has(e) && Ht.delete(e), Ut.has(e) && ((t = Ut.get(e)) == null || t.cancel()), Qt in e ? Cn(e) : r && n ? Sn(e) : r && !n ? Tn(e) : Cn(e);
}
function q(e) {
	return Number(e.replace(/[^0-9.\-]/g, ""));
}
function pn(e) {
	let t = e.parentElement;
	for (; t;) {
		if (t.scrollLeft || t.scrollTop) return {
			x: t.scrollLeft,
			y: t.scrollTop
		};
		t = t.parentElement;
	}
	return {
		x: 0,
		y: 0
	};
}
function mn(e) {
	let t = e.getBoundingClientRect(), { x: n, y: r } = pn(e);
	return {
		top: t.top + r,
		left: t.left + n,
		width: t.width,
		height: t.height
	};
}
function hn(e, t, n) {
	let r = t.width, i = t.height, a = n.width, o = n.height, s = getComputedStyle(e), c = s.getPropertyValue("box-sizing");
	if (c === "content-box") {
		let e = q(s.paddingTop) + q(s.paddingBottom) + q(s.borderTopWidth) + q(s.borderBottomWidth), t = q(s.paddingLeft) + q(s.paddingRight) + q(s.borderRightWidth) + q(s.borderLeftWidth);
		r -= t, a -= t, i -= e, o -= e;
	}
	return [
		r,
		a,
		i,
		o
	].map(Math.round);
}
function gn(e) {
	return K in e && Kt.has(e[K]) ? Kt.get(e[K]) : {
		duration: 250,
		easing: "ease-in-out"
	};
}
function _n(e) {
	if (K in e) return e[K];
}
function vn(e) {
	let t = _n(e);
	return t ? Jt.has(t) : !1;
}
function yn(e, ...t) {
	t.forEach((t) => t(e, Kt.has(e)));
	for (let n = 0; n < e.children.length; n++) {
		let r = e.children.item(n);
		r && t.forEach((e) => e(r, Kt.has(r)));
	}
}
function bn(e) {
	return Array.isArray(e) ? e : [e];
}
function xn(e) {
	return typeof e == "function";
}
function Sn(e) {
	let t = W.get(e), n = mn(e);
	if (!vn(e)) return W.set(e, n);
	let r;
	if (!t) return;
	let i = gn(e);
	if (typeof i != "function") {
		let a = t.left - n.left, o = t.top - n.top, [s, c, l, u] = hn(e, t, n), d = { transform: `translate(${a}px, ${o}px)` }, f = { transform: "translate(0, 0)" };
		s !== c && (d.width = `${s}px`, f.width = `${c}px`), l !== u && (d.height = `${l}px`, f.height = `${u}px`), r = e.animate([d, f], {
			duration: i.duration,
			easing: i.easing
		});
	} else {
		let [a] = bn(i(e, "remain", t, n));
		r = new Animation(a), r.play();
	}
	Ut.set(e, r), W.set(e, n), r.addEventListener("finish", nn.bind(null, e));
}
function Cn(e) {
	Qt in e && delete e[Qt];
	let t = mn(e);
	W.set(e, t);
	let n = gn(e);
	if (!vn(e)) return;
	let r;
	if (typeof n != "function") r = e.animate([
		{
			transform: "scale(.98)",
			opacity: 0
		},
		{
			transform: "scale(0.98)",
			opacity: 0,
			offset: .5
		},
		{
			transform: "scale(1)",
			opacity: 1
		}
	], {
		duration: n.duration * 1.5,
		easing: "ease-in"
	});
	else {
		let [i] = bn(n(e, "add", t));
		r = new Animation(i), r.play();
	}
	Ut.set(e, r), r.addEventListener("finish", nn.bind(null, e));
}
function wn(e, t) {
	var n;
	e.remove(), W.delete(e), Ht.delete(e), Ut.delete(e), (n = Wt.get(e)) == null || n.disconnect(), setTimeout(() => {
		if (Zt in e && delete e[Zt], Object.defineProperty(e, Qt, {
			value: !0,
			configurable: !0
		}), t && e instanceof HTMLElement) for (let n in t) e.style[n] = "";
	}, 0);
}
function Tn(e) {
	var t;
	if (!Ht.has(e) || !W.has(e)) return;
	let [n, r] = Ht.get(e);
	Object.defineProperty(e, Zt, {
		value: !0,
		configurable: !0
	});
	let i = window.scrollX, a = window.scrollY;
	if (r && r.parentNode && r.parentNode instanceof Element ? r.parentNode.insertBefore(e, r) : n && n.parentNode ? n.parentNode.appendChild(e) : (t = _n(e)) == null || t.appendChild(e), !vn(e)) return wn(e);
	let [o, s, c, l] = Dn(e), u = gn(e), d = W.get(e);
	(i !== Yt || a !== Xt) && En(e, i, a, u);
	let f, p = {
		position: "absolute",
		top: `${o}px`,
		left: `${s}px`,
		width: `${c}px`,
		height: `${l}px`,
		margin: "0",
		pointerEvents: "none",
		transformOrigin: "center",
		zIndex: "100"
	};
	if (!xn(u)) Object.assign(e.style, p), f = e.animate([{
		transform: "scale(1)",
		opacity: 1
	}, {
		transform: "scale(.98)",
		opacity: 0
	}], {
		duration: u.duration,
		easing: "ease-out"
	});
	else {
		let [t, n] = bn(u(e, "remove", d));
		n?.styleReset !== !1 && (p = n?.styleReset || p, Object.assign(e.style, p)), f = new Animation(t), f.play();
	}
	Ut.set(e, f), f.addEventListener("finish", wn.bind(null, e, p));
}
function En(e, t, n, r) {
	let i = Yt - t, a = Xt - n, o = document.documentElement.style.scrollBehavior, s = getComputedStyle(G).scrollBehavior;
	if (s === "smooth" && (document.documentElement.style.scrollBehavior = "auto"), window.scrollTo(window.scrollX + i, window.scrollY + a), !e.parentElement) return;
	let c = e.parentElement, l = c.clientHeight, u = c.clientWidth, d = performance.now();
	function f() {
		requestAnimationFrame(() => {
			if (!xn(r)) {
				let e = l - c.clientHeight, t = u - c.clientWidth;
				d + r.duration > performance.now() ? (window.scrollTo({
					left: window.scrollX - t,
					top: window.scrollY - e
				}), l = c.clientHeight, u = c.clientWidth, f()) : document.documentElement.style.scrollBehavior = o;
			}
		});
	}
	f();
}
function Dn(e) {
	let t = W.get(e), [n, , r] = hn(e, t, mn(e)), i = e.parentElement;
	for (; i && (getComputedStyle(i).position === "static" || i instanceof HTMLBodyElement);) i = i.parentElement;
	i ||= document.body;
	let a = getComputedStyle(i), o = W.get(i) || mn(i), s = Math.round(t.top - o.top) - q(a.borderTopWidth), c = Math.round(t.left - o.left) - q(a.borderLeftWidth);
	return [
		s,
		c,
		n,
		r
	];
}
function On(e, t = {}) {
	if (sn && cn) {
		let n = window.matchMedia("(prefers-reduced-motion: reduce)"), r = n.matches && !xn(t) && !t.disrespectUserMotionPreference;
		r || (Jt.add(e), getComputedStyle(e).position === "static" && Object.assign(e.style, { position: "relative" }), yn(e, nn, an, (e) => cn?.observe(e)), xn(t) ? Kt.set(e, t) : Kt.set(e, {
			duration: 250,
			easing: "ease-in-out",
			...t
		}), sn.observe(e, { childList: !0 }), Vt.add(e));
	}
	return Object.freeze({
		parent: e,
		enable: () => {
			Jt.add(e);
		},
		disable: () => {
			Jt.delete(e);
		},
		isEnabled: () => Jt.has(e)
	});
}
function kn(e) {
	let [t, n] = u(), r = c(() => e, []), i = a((e) => {
		e instanceof HTMLElement ? n(On(e, r)) : n(void 0);
	}, [r]), o = a((e) => {
		t && (e ? t.enable() : t.disable());
	}, [t]);
	return [i, o];
}
function An(e) {
	let t = e.activeElement;
	for (; ((n = t) == null || (n = n.shadowRoot) == null ? void 0 : n.activeElement) != null;) {
		var n;
		t = t.shadowRoot.activeElement;
	}
	return t;
}
function jn(e, t) {
	if (!e || !t) return !1;
	let n = t.getRootNode == null ? void 0 : t.getRootNode();
	if (e.contains(t)) return !0;
	if (n && Le(n)) {
		let n = t;
		for (; n;) {
			if (e === n) return !0;
			n = n.parentNode || n.host;
		}
	}
	return !1;
}
function Mn() {
	return /apple/i.test(navigator.vendor);
}
function Nn(e, t) {
	let n = ["mouse", "pen"];
	return t || n.push("", void 0), n.includes(e);
}
function Pn(e) {
	return e?.ownerDocument || document;
}
function Fn(e) {
	return "composedPath" in e ? e.composedPath()[0] : e.target;
}
/*!
* tabbable 6.2.0
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*/
var In = [
	"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])"
], Ln = /* @__PURE__ */ In.join(","), Rn = typeof Element > "u", zn = Rn ? function() {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, Bn = !Rn && Element.prototype.getRootNode ? function(e) {
	var t;
	return e == null ? void 0 : (t = e.getRootNode)?.call(e);
} : function(e) {
	return e?.ownerDocument;
}, Vn = function e(t, n) {
	var r;
	n === void 0 && (n = !0);
	var i = t == null ? void 0 : (r = t.getAttribute)?.call(t, "inert"), a = i === "" || i === "true", o = a || n && t && e(t.parentNode);
	return o;
}, Hn = function(e) {
	var t, n = e == null ? void 0 : (t = e.getAttribute)?.call(e, "contenteditable");
	return n === "" || n === "true";
}, Un = function(e, t, n) {
	if (Vn(e)) return [];
	var r = Array.prototype.slice.apply(e.querySelectorAll(Ln));
	return t && zn.call(e, Ln) && r.unshift(e), r = r.filter(n), r;
}, Wn = function e(t, n, r) {
	for (var i = [], a = Array.from(t); a.length;) {
		var o = a.shift();
		if (!Vn(o, !1)) if (o.tagName === "SLOT") {
			var s = o.assignedElements(), c = s.length ? s : o.children, l = e(c, !0, r);
			r.flatten ? i.push.apply(i, l) : i.push({
				scopeParent: o,
				candidates: l
			});
		} else {
			var u = zn.call(o, Ln);
			u && r.filter(o) && (n || !t.includes(o)) && i.push(o);
			var d = o.shadowRoot || typeof r.getShadowRoot == "function" && r.getShadowRoot(o), f = !Vn(d, !1) && (!r.shadowRootFilter || r.shadowRootFilter(o));
			if (d && f) {
				var p = e(d === !0 ? o.children : d.children, !0, r);
				r.flatten ? i.push.apply(i, p) : i.push({
					scopeParent: o,
					candidates: p
				});
			} else a.unshift.apply(a, o.children);
		}
	}
	return i;
}, Gn = function(e) {
	return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
}, Kn = function(e) {
	if (!e) throw Error("No node provided");
	return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || Hn(e)) && !Gn(e) ? 0 : e.tabIndex;
}, qn = function(e, t) {
	var n = Kn(e);
	return n < 0 && t && !Gn(e) ? 0 : n;
}, Jn = function(e, t) {
	return e.tabIndex === t.tabIndex ? e.documentOrder - t.documentOrder : e.tabIndex - t.tabIndex;
}, Yn = function(e) {
	return e.tagName === "INPUT";
}, Xn = function(e) {
	return Yn(e) && e.type === "hidden";
}, Zn = function(e) {
	var t = e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(e) {
		return e.tagName === "SUMMARY";
	});
	return t;
}, Qn = function(e, t) {
	for (var n = 0; n < e.length; n++) if (e[n].checked && e[n].form === t) return e[n];
}, $n = function(e) {
	if (!e.name) return !0;
	var t = e.form || Bn(e), n = function(e) {
		return t.querySelectorAll("input[type=\"radio\"][name=\"" + e + "\"]");
	}, r;
	if (typeof window < "u" && window.CSS !== void 0 && typeof window.CSS.escape == "function") r = n(window.CSS.escape(e.name));
	else try {
		r = n(e.name);
	} catch (e) {
		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", e.message), !1;
	}
	var i = Qn(r, e.form);
	return !i || i === e;
}, er = function(e) {
	return Yn(e) && e.type === "radio";
}, tr = function(e) {
	return er(e) && !$n(e);
}, nr = function(e) {
	var t, n = e && Bn(e), r = (t = n)?.host, i = !1;
	if (n && n !== e) {
		var a, o, s;
		for (i = !!((a = r) != null && (o = a.ownerDocument) != null && o.contains(r) || e != null && (s = e.ownerDocument) != null && s.contains(e)); !i && r;) {
			var c, l, u;
			n = Bn(r), r = (c = n)?.host, i = !!((l = r) != null && (u = l.ownerDocument) != null && u.contains(r));
		}
	}
	return i;
}, rr = function(e) {
	var t = e.getBoundingClientRect(), n = t.width, r = t.height;
	return n === 0 && r === 0;
}, ir = function(e, t) {
	var n = t.displayCheck, r = t.getShadowRoot;
	if (getComputedStyle(e).visibility === "hidden") return !0;
	var i = zn.call(e, "details>summary:first-of-type"), a = i ? e.parentElement : e;
	if (zn.call(a, "details:not([open]) *")) return !0;
	if (!n || n === "full" || n === "legacy-full") {
		if (typeof r == "function") {
			for (var o = e; e;) {
				var s = e.parentElement, c = Bn(e);
				if (s && !s.shadowRoot && r(s) === !0) return rr(e);
				e = e.assignedSlot ? e.assignedSlot : !s && c !== e.ownerDocument ? c.host : s;
			}
			e = o;
		}
		if (nr(e)) return !e.getClientRects().length;
		if (n !== "legacy-full") return !0;
	} else if (n === "non-zero-area") return rr(e);
	return !1;
}, ar = function(e) {
	if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName)) for (var t = e.parentElement; t;) {
		if (t.tagName === "FIELDSET" && t.disabled) {
			for (var n = 0; n < t.children.length; n++) {
				var r = t.children.item(n);
				if (r.tagName === "LEGEND") return zn.call(t, "fieldset[disabled] *") ? !0 : !r.contains(e);
			}
			return !0;
		}
		t = t.parentElement;
	}
	return !1;
}, or = function(e, t) {
	return !(t.disabled || Vn(t) || Xn(t) || ir(t, e) || Zn(t) || ar(t));
}, sr = function(e, t) {
	return !(tr(t) || Kn(t) < 0 || !or(e, t));
}, cr = function(e) {
	var t = parseInt(e.getAttribute("tabindex"), 10);
	return !!(isNaN(t) || t >= 0);
}, lr = function e(t) {
	var n = [], r = [];
	return t.forEach(function(t, i) {
		var a = !!t.scopeParent, o = a ? t.scopeParent : t, s = qn(o, a), c = a ? e(t.candidates) : o;
		s === 0 ? a ? n.push.apply(n, c) : n.push(o) : r.push({
			documentOrder: i,
			tabIndex: s,
			item: t,
			isScope: a,
			content: c
		});
	}), r.sort(Jn).reduce(function(e, t) {
		return t.isScope ? e.push.apply(e, t.content) : e.push(t.content), e;
	}, []).concat(n);
}, ur = function(e, t) {
	t ||= {};
	var n;
	return n = t.getShadowRoot ? Wn([e], t.includeContainer, {
		filter: sr.bind(null, t),
		flatten: !1,
		getShadowRoot: t.getShadowRoot,
		shadowRootFilter: cr
	}) : Un(e, t.includeContainer, sr.bind(null, t)), lr(n);
};
function dr(e, t, n) {
	let { reference: r, floating: i } = e, a = Ce(t), o = we(t), s = Se(o), c = be(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
	switch (c) {
		case "top":
			p = {
				x: u,
				y: r.y - i.height
			};
			break;
		case "bottom":
			p = {
				x: u,
				y: r.y + r.height
			};
			break;
		case "right":
			p = {
				x: r.x + r.width,
				y: d
			};
			break;
		case "left":
			p = {
				x: r.x - i.width,
				y: d
			};
			break;
		default: p = {
			x: r.x,
			y: r.y
		};
	}
	switch (L(t)) {
		case "start":
			p[o] -= f * (n && l ? -1 : 1);
			break;
		case "end":
			p[o] += f * (n && l ? -1 : 1);
			break;
	}
	return p;
}
const fr = async (e, t, n) => {
	let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = a.filter(Boolean), c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
		reference: e,
		floating: t,
		strategy: i
	}), { x: u, y: d } = dr(l, r, c), f = r, p = {}, m = 0;
	for (let n = 0; n < s.length; n++) {
		let { name: a, fn: h } = s[n], { x: g, y: _, data: v, reset: y } = await h({
			x: u,
			y: d,
			initialPlacement: r,
			placement: f,
			strategy: i,
			middlewareData: p,
			rects: l,
			platform: o,
			elements: {
				reference: e,
				floating: t
			}
		});
		u = g ?? u, d = _ ?? d, p = {
			...p,
			[a]: {
				...p[a],
				...v
			}
		}, y && m <= 50 && (m++, typeof y == "object" && (y.placement && (f = y.placement), y.rects && (l = y.rects === !0 ? await o.getElementRects({
			reference: e,
			floating: t,
			strategy: i
		}) : y.rects), {x: u, y: d} = dr(l, f, c)), n = -1);
	}
	return {
		x: u,
		y: d,
		placement: f,
		strategy: i,
		middlewareData: p
	};
};
async function pr(e, t) {
	var n;
	t === void 0 && (t = {});
	let { x: r, y: i, platform: a, rects: o, elements: s, strategy: c } = e, { boundary: l = "clippingAncestors", rootBoundary: u = "viewport", elementContext: d = "floating", altBoundary: f = !1, padding: p = 0 } = ye(t, e), m = Me(p), h = d === "floating" ? "reference" : "floating", g = s[f ? h : d], _ = Ne(await a.getClippingRect({
		element: (n = await (a.isElement == null ? void 0 : a.isElement(g))) ?? !0 ? g : g.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(s.floating)),
		boundary: l,
		rootBoundary: u,
		strategy: c
	})), v = d === "floating" ? {
		x: r,
		y: i,
		width: o.floating.width,
		height: o.floating.height
	} : o.reference, y = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(s.floating)), b = await (a.isElement == null ? void 0 : a.isElement(y)) && await (a.getScale == null ? void 0 : a.getScale(y)) || {
		x: 1,
		y: 1
	}, x = Ne(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
		elements: s,
		rect: v,
		offsetParent: y,
		strategy: c
	}) : v);
	return {
		top: (_.top - x.top + m.top) / b.y,
		bottom: (x.bottom - _.bottom + m.bottom) / b.y,
		left: (_.left - x.left + m.left) / b.x,
		right: (x.right - _.right + m.right) / b.x
	};
}
function mr(e, t, n) {
	let r = e ? [...n.filter((t) => L(t) === e), ...n.filter((t) => L(t) !== e)] : n.filter((e) => be(e) === e);
	return r.filter((n) => e ? L(n) === e || (t ? De(n) !== n : !1) : !0);
}
const hr = function(e) {
	return e === void 0 && (e = {}), {
		name: "autoPlacement",
		options: e,
		async fn(t) {
			var n, r, i;
			let { rects: a, middlewareData: o, placement: s, platform: c, elements: l } = t, { crossAxis: u = !1, alignment: d, allowedPlacements: f = fe, autoAlignment: p = !0,...m } = ye(e, t), h = d !== void 0 || f === fe ? mr(d || null, p, f) : f, g = await pr(t, m), _ = (n = o.autoPlacement)?.index || 0, v = h[_];
			if (v == null) return {};
			let y = Te(v, a, await (c.isRTL == null ? void 0 : c.isRTL(l.floating)));
			if (s !== v) return { reset: { placement: h[0] } };
			let b = [
				g[be(v)],
				g[y[0]],
				g[y[1]]
			], x = [...(r = o.autoPlacement)?.overflows || [], {
				placement: v,
				overflows: b
			}], S = h[_ + 1];
			if (S) return {
				data: {
					index: _ + 1,
					overflows: x
				},
				reset: { placement: S }
			};
			let C = x.map((e) => {
				let t = L(e.placement);
				return [
					e.placement,
					t && u ? e.overflows.slice(0, 2).reduce((e, t) => e + t, 0) : e.overflows[0],
					e.overflows
				];
			}).sort((e, t) => e[1] - t[1]), w = C.filter((e) => e[2].slice(0, L(e[0]) ? 2 : 3).every((e) => e <= 0)), T = (i = w[0])?.[0] || C[0][0];
			return T === s ? {} : {
				data: {
					index: _ + 1,
					overflows: x
				},
				reset: { placement: T }
			};
		}
	};
};
async function gr(e, t) {
	let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = be(n), s = L(n), c = Ce(n) === "y", l = ["left", "top"].includes(o) ? -1 : 1, u = a && c ? -1 : 1, d = ye(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
		mainAxis: d,
		crossAxis: 0,
		alignmentAxis: null
	} : {
		mainAxis: d.mainAxis || 0,
		crossAxis: d.crossAxis || 0,
		alignmentAxis: d.alignmentAxis
	};
	return s && typeof m == "number" && (p = s === "end" ? m * -1 : m), c ? {
		x: p * u,
		y: f * l
	} : {
		x: f * l,
		y: p * u
	};
}
const _r = function(e) {
	return e === void 0 && (e = 0), {
		name: "offset",
		options: e,
		async fn(t) {
			var n, r;
			let { x: i, y: a, placement: o, middlewareData: s } = t, c = await gr(t, e);
			return o === (n = s.offset)?.placement && (r = s.arrow) != null && r.alignmentOffset ? {} : {
				x: i + c.x,
				y: a + c.y,
				data: {
					...c,
					placement: o
				}
			};
		}
	};
};
function vr(e) {
	let t = H(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = V(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = me(n) !== a || me(r) !== o;
	return s && (n = a, r = o), {
		width: n,
		height: r,
		$: s
	};
}
function yr(e) {
	return B(e) ? e : e.contextElement;
}
function br(e) {
	let t = yr(e);
	if (!V(t)) return I(1);
	let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = vr(t), o = (a ? me(n.width) : n.width) / r, s = (a ? me(n.height) : n.height) / i;
	return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
		x: o,
		y: s
	};
}
const xr = /* @__PURE__ */ I(0);
function Sr(e) {
	let t = R(e);
	return !Ue() || !t.visualViewport ? xr : {
		x: t.visualViewport.offsetLeft,
		y: t.visualViewport.offsetTop
	};
}
function Cr(e, t, n) {
	return t === void 0 && (t = !1), !n || t && n !== R(e) ? !1 : t;
}
function wr(e, t, n, r) {
	t === void 0 && (t = !1), n === void 0 && (n = !1);
	let i = e.getBoundingClientRect(), a = yr(e), o = I(1);
	t && (r ? B(r) && (o = br(r)) : o = br(e));
	let s = Cr(a, n, r) ? Sr(a) : I(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
	if (a) {
		let e = R(a), t = r && B(r) ? R(r) : r, n = e, i = Je(n);
		for (; i && r && t !== n;) {
			let e = br(i), t = i.getBoundingClientRect(), r = H(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
			c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = R(i), i = Je(n);
		}
	}
	return Ne({
		width: u,
		height: d,
		x: c,
		y: l
	});
}
function Tr(e, t) {
	let n = Ge(e).scrollLeft;
	return t ? t.left + n : wr(z(e)).left + n;
}
function Er(e, t, n) {
	n === void 0 && (n = !1);
	let r = e.getBoundingClientRect(), i = r.left + t.scrollLeft - (n ? 0 : Tr(e, r)), a = r.top + t.scrollTop;
	return {
		x: i,
		y: a
	};
}
function Dr(e) {
	let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = z(r), s = t ? Be(t.floating) : !1;
	if (r === o || s && a) return n;
	let c = {
		scrollLeft: 0,
		scrollTop: 0
	}, l = I(1), u = I(0), d = V(r);
	if ((d || !d && !a) && ((Fe(r) !== "body" || Re(o)) && (c = Ge(r)), V(r))) {
		let e = wr(r);
		l = br(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
	}
	let f = o && !d && !a ? Er(o, c, !0) : I(0);
	return {
		width: n.width * l.x,
		height: n.height * l.y,
		x: n.x * l.x - c.scrollLeft * l.x + u.x + f.x,
		y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
	};
}
function Or(e) {
	return Array.from(e.getClientRects());
}
function kr(e) {
	let t = z(e), n = Ge(e), r = e.ownerDocument.body, i = F(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = F(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + Tr(e), s = -n.scrollTop;
	return H(r).direction === "rtl" && (o += F(t.clientWidth, r.clientWidth) - i), {
		width: i,
		height: a,
		x: o,
		y: s
	};
}
function Ar(e, t) {
	let n = R(e), r = z(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
	if (i) {
		a = i.width, o = i.height;
		let e = Ue();
		(!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
	}
	return {
		width: a,
		height: o,
		x: s,
		y: c
	};
}
function jr(e, t) {
	let n = wr(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = V(e) ? br(e) : I(1), o = e.clientWidth * a.x, s = e.clientHeight * a.y, c = i * a.x, l = r * a.y;
	return {
		width: o,
		height: s,
		x: c,
		y: l
	};
}
function Mr(e, t, n) {
	let r;
	if (t === "viewport") r = Ar(e, n);
	else if (t === "document") r = kr(z(e));
	else if (B(t)) r = jr(t, n);
	else {
		let n = Sr(e);
		r = {
			x: t.x - n.x,
			y: t.y - n.y,
			width: t.width,
			height: t.height
		};
	}
	return Ne(r);
}
function Nr(e, t) {
	let n = U(e);
	return n === t || !B(n) || We(n) ? !1 : H(n).position === "fixed" || Nr(n, t);
}
function Pr(e, t) {
	let n = t.get(e);
	if (n) return n;
	let r = qe(e, [], !1).filter((e) => B(e) && Fe(e) !== "body"), i = null, a = H(e).position === "fixed", o = a ? U(e) : e;
	for (; B(o) && !We(o);) {
		let t = H(o), n = Ve(o);
		!n && t.position === "fixed" && (i = null);
		let s = a ? !n && !i : !n && t.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || Re(o) && !n && Nr(e, o);
		s ? r = r.filter((e) => e !== o) : i = t, o = U(o);
	}
	return t.set(e, r), r;
}
function Fr(e) {
	let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = n === "clippingAncestors" ? Be(t) ? [] : Pr(t, this._c) : [].concat(n), o = [...a, r], s = o[0], c = o.reduce((e, n) => {
		let r = Mr(t, n, i);
		return e.top = F(r.top, e.top), e.right = pe(r.right, e.right), e.bottom = pe(r.bottom, e.bottom), e.left = F(r.left, e.left), e;
	}, Mr(t, s, i));
	return {
		width: c.right - c.left,
		height: c.bottom - c.top,
		x: c.left,
		y: c.top
	};
}
function Ir(e) {
	let { width: t, height: n } = vr(e);
	return {
		width: t,
		height: n
	};
}
function Lr(e, t, n) {
	let r = V(t), i = z(t), a = n === "fixed", o = wr(e, !0, a, t), s = {
		scrollLeft: 0,
		scrollTop: 0
	}, c = I(0);
	if (r || !r && !a) if ((Fe(t) !== "body" || Re(i)) && (s = Ge(t)), r) {
		let e = wr(t, !0, a, t);
		c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
	} else i && (c.x = Tr(i));
	let l = i && !r && !a ? Er(i, s) : I(0), u = o.left + s.scrollLeft - c.x - l.x, d = o.top + s.scrollTop - c.y - l.y;
	return {
		x: u,
		y: d,
		width: o.width,
		height: o.height
	};
}
function Rr(e) {
	return H(e).position === "static";
}
function zr(e, t) {
	if (!V(e) || H(e).position === "fixed") return null;
	if (t) return t(e);
	let n = e.offsetParent;
	return z(e) === n && (n = n.ownerDocument.body), n;
}
function Br(e, t) {
	let n = R(e);
	if (Be(e)) return n;
	if (!V(e)) {
		let t = U(e);
		for (; t && !We(t);) {
			if (B(t) && !Rr(t)) return t;
			t = U(t);
		}
		return n;
	}
	let r = zr(e, t);
	for (; r && ze(r) && Rr(r);) r = zr(r, t);
	return r && We(r) && Rr(r) && !Ve(r) ? n : r || He(e) || n;
}
const Vr = async function(e) {
	let t = this.getOffsetParent || Br, n = this.getDimensions, r = await n(e.floating);
	return {
		reference: Lr(e.reference, await t(e.floating), e.strategy),
		floating: {
			x: 0,
			y: 0,
			width: r.width,
			height: r.height
		}
	};
};
function Hr(e) {
	return H(e).direction === "rtl";
}
const Ur = {
	convertOffsetParentRelativeRectToViewportRelativeRect: Dr,
	getDocumentElement: z,
	getClippingRect: Fr,
	getOffsetParent: Br,
	getElementRects: Vr,
	getClientRects: Or,
	getDimensions: Ir,
	getScale: br,
	isElement: B,
	isRTL: Hr
};
function Wr(e, t) {
	return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
}
function Gr(e, t) {
	let n = null, r, i = z(e);
	function a() {
		var e;
		clearTimeout(r), (e = n) == null || e.disconnect(), n = null;
	}
	function o(s, c) {
		s === void 0 && (s = !1), c === void 0 && (c = 1), a();
		let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
		if (s || t(), !f || !p) return;
		let m = he(d), h = he(i.clientWidth - (u + f)), g = he(i.clientHeight - (d + p)), _ = he(u), v = -m + "px " + -h + "px " + -g + "px " + -_ + "px", y = {
			rootMargin: v,
			threshold: F(0, pe(1, c)) || 1
		}, b = !0;
		function x(t) {
			let n = t[0].intersectionRatio;
			if (n !== c) {
				if (!b) return o();
				n ? o(!1, n) : r = setTimeout(() => {
					o(!1, 1e-7);
				}, 1e3);
			}
			n === 1 && !Wr(l, e.getBoundingClientRect()) && o(), b = !1;
		}
		try {
			n = new IntersectionObserver(x, {
				...y,
				root: i.ownerDocument
			});
		} catch {
			n = new IntersectionObserver(x, y);
		}
		n.observe(e);
	}
	return o(!0), a;
}
function Kr(e, t, n, r) {
	r === void 0 && (r = {});
	let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = yr(e), u = i || a ? [...l ? qe(l) : [], ...qe(t)] : [];
	u.forEach((e) => {
		i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
	});
	let d = l && s ? Gr(l, n) : null, f = -1, p = null;
	o && (p = new ResizeObserver((e) => {
		let [r] = e;
		r && r.target === l && p && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
			var e;
			(e = p) == null || e.observe(t);
		})), n();
	}), l && !c && p.observe(l), p.observe(t));
	let m, h = c ? wr(e) : null;
	c && g();
	function g() {
		let t = wr(e);
		h && !Wr(h, t) && n(), h = t, m = requestAnimationFrame(g);
	}
	return n(), () => {
		var e;
		u.forEach((e) => {
			i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n);
		}), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
	};
}
const qr = _r, Jr = hr, Yr = (e, t, n) => {
	let r = /* @__PURE__ */ new Map(), i = {
		platform: Ur,
		...n
	}, a = {
		...i.platform,
		_c: r
	};
	return fr(e, t, {
		...i,
		platform: a
	});
};
var Xr = typeof document < "u" ? s : o;
function Zr(e, t) {
	if (e === t) return !0;
	if (typeof e != typeof t) return !1;
	if (typeof e == "function" && e.toString() === t.toString()) return !0;
	let n, r, i;
	if (e && t && typeof e == "object") {
		if (Array.isArray(e)) {
			if (n = e.length, n !== t.length) return !1;
			for (r = n; r-- !== 0;) if (!Zr(e[r], t[r])) return !1;
			return !0;
		}
		if (i = Object.keys(e), n = i.length, n !== Object.keys(t).length) return !1;
		for (r = n; r-- !== 0;) if (!{}.hasOwnProperty.call(t, i[r])) return !1;
		for (r = n; r-- !== 0;) {
			let n = i[r];
			if (!(n === "_owner" && e.$$typeof) && !Zr(e[n], t[n])) return !1;
		}
		return !0;
	}
	return e !== e && t !== t;
}
function Qr(e) {
	if (typeof window > "u") return 1;
	let t = e.ownerDocument.defaultView || window;
	return t.devicePixelRatio || 1;
}
function $r(e, t) {
	let n = Qr(e);
	return Math.round(t * n) / n;
}
function ei(e) {
	let t = r.useRef(e);
	return Xr(() => {
		t.current = e;
	}), t;
}
function ti(e) {
	e === void 0 && (e = {});
	let { placement: t = "bottom", strategy: n = "absolute", middleware: i = [], platform: a, elements: { reference: o, floating: s } = {}, transform: c = !0, whileElementsMounted: l, open: u } = e, [f, p] = r.useState({
		x: 0,
		y: 0,
		strategy: n,
		placement: t,
		middlewareData: {},
		isPositioned: !1
	}), [m, h] = r.useState(i);
	Zr(m, i) || h(i);
	let [g, _] = r.useState(null), [v, y] = r.useState(null), b = r.useCallback((e) => {
		e !== w.current && (w.current = e, _(e));
	}, []), x = r.useCallback((e) => {
		e !== T.current && (T.current = e, y(e));
	}, []), S = o || g, C = s || v, w = r.useRef(null), T = r.useRef(null), E = r.useRef(f), D = l != null, O = ei(l), k = ei(a), A = ei(u), j = r.useCallback(() => {
		if (!w.current || !T.current) return;
		let e = {
			placement: t,
			strategy: n,
			middleware: m
		};
		k.current && (e.platform = k.current), Yr(w.current, T.current, e).then((e) => {
			let t = {
				...e,
				isPositioned: A.current !== !1
			};
			M.current && !Zr(E.current, t) && (E.current = t, d.flushSync(() => {
				p(t);
			}));
		});
	}, [
		m,
		t,
		n,
		k,
		A
	]);
	Xr(() => {
		u === !1 && E.current.isPositioned && (E.current.isPositioned = !1, p((e) => ({
			...e,
			isPositioned: !1
		})));
	}, [u]);
	let M = r.useRef(!1);
	Xr(() => (M.current = !0, () => {
		M.current = !1;
	}), []), Xr(() => {
		if (S && (w.current = S), C && (T.current = C), S && C) {
			if (O.current) return O.current(S, C, j);
			j();
		}
	}, [
		S,
		C,
		j,
		O,
		D
	]);
	let N = r.useMemo(() => ({
		reference: w,
		floating: T,
		setReference: b,
		setFloating: x
	}), [b, x]), P = r.useMemo(() => ({
		reference: S,
		floating: C
	}), [S, C]), ee = r.useMemo(() => {
		let e = {
			position: n,
			left: 0,
			top: 0
		};
		if (!P.floating) return e;
		let t = $r(P.floating, f.x), r = $r(P.floating, f.y);
		return c ? {
			...e,
			transform: "translate(" + t + "px, " + r + "px)",
			...Qr(P.floating) >= 1.5 && { willChange: "transform" }
		} : {
			position: n,
			left: t,
			top: r
		};
	}, [
		n,
		c,
		P.floating,
		f.x,
		f.y
	]);
	return r.useMemo(() => ({
		...f,
		update: j,
		refs: N,
		elements: P,
		floatingStyles: ee
	}), [
		f,
		j,
		N,
		P,
		ee
	]);
}
const ni = (e, t) => ({
	...qr(e),
	options: [e, t]
}), ri = (e, t) => ({
	...Jr(e),
	options: [e, t]
});
function ii(e) {
	let t = r.useRef(void 0), n = r.useCallback((t) => {
		let n = e.map((e) => {
			if (e != null) {
				if (typeof e == "function") {
					let n = e, r = n(t);
					return typeof r == "function" ? r : () => {
						n(null);
					};
				}
				return e.current = t, () => {
					e.current = null;
				};
			}
		});
		return () => {
			n.forEach((e) => e?.());
		};
	}, e);
	return r.useMemo(() => e.every((e) => e == null) ? null : (e) => {
		t.current &&= (t.current(), void 0), e != null && (t.current = n(e));
	}, e);
}
const ai = { ...r }, oi = ai.useInsertionEffect, si = oi || ((e) => e());
function ci(e) {
	let t = r.useRef(() => {
		if (process.env.NODE_ENV !== "production") throw Error("Cannot call an event handler while rendering.");
	});
	return si(() => {
		t.current = e;
	}), r.useCallback(function() {
		var e = [...arguments];
		return t.current == null ? void 0 : t.current(...e);
	}, []);
}
var J = typeof document < "u" ? s : o;
const li = ["ArrowLeft", "ArrowRight"], ui = ["ArrowUp", "ArrowDown"];
[...li, ...ui];
let di = !1, fi = 0;
const pi = () => "floating-ui-" + Math.random().toString(36).slice(2, 6) + fi++;
function mi() {
	let [e, t] = r.useState(() => di ? pi() : void 0);
	return J(() => {
		e ?? t(pi());
	}, []), r.useEffect(() => {
		di = !0;
	}, []), e;
}
const hi = ai.useId, gi = hi || mi;
let _i;
process.env.NODE_ENV !== "production" && (_i = /* @__PURE__ */ new Set());
function vi() {
	var e, t = [...arguments];
	let n = "Floating UI: " + t.join(" ");
	if (!((e = _i) != null && e.has(n))) {
		var r;
		(r = _i) == null || r.add(n), console.error(n);
	}
}
function yi() {
	let e = /* @__PURE__ */ new Map();
	return {
		emit(t, n) {
			var r;
			(r = e.get(t)) == null || r.forEach((e) => e(n));
		},
		on(t, n) {
			e.set(t, [...e.get(t) || [], n]);
		},
		off(t, n) {
			var r;
			e.set(t, (r = e.get(t))?.filter((e) => e !== n) || []);
		}
	};
}
const bi = /* @__PURE__ */ r.createContext(null), xi = /* @__PURE__ */ r.createContext(null), Si = () => {
	var e;
	return (e = r.useContext(bi))?.id || null;
}, Ci = () => r.useContext(xi);
function wi(e) {
	return "data-floating-ui-" + e;
}
function Y(e) {
	e.current !== -1 && (clearTimeout(e.current), e.current = -1);
}
function Ti(e) {
	let t = l(e);
	return J(() => {
		t.current = e;
	}), t;
}
const Ei = /* @__PURE__ */ wi("safe-polygon");
function Di(e, t, n) {
	return n && !Nn(n) ? 0 : typeof e == "number" ? e : e?.[t];
}
function Oi(e, t) {
	t === void 0 && (t = {});
	let { open: n, onOpenChange: i, dataRef: a, events: o, elements: s } = e, { enabled: c = !0, delay: l = 0, handleClose: u = null, mouseOnly: d = !1, restMs: f = 0, move: p = !0 } = t, m = Ci(), h = Si(), g = Ti(u), _ = Ti(l), v = Ti(n), y = r.useRef(), b = r.useRef(-1), x = r.useRef(), S = r.useRef(-1), C = r.useRef(!0), w = r.useRef(!1), T = r.useRef(() => {}), E = r.useRef(!1), D = r.useCallback(() => {
		var e;
		let t = (e = a.current.openEvent)?.type;
		return t?.includes("mouse") && t !== "mousedown";
	}, [a]);
	r.useEffect(() => {
		if (!c) return;
		function e(e) {
			let { open: t } = e;
			t || (Y(b), Y(S), C.current = !0, E.current = !1);
		}
		return o.on("openchange", e), () => {
			o.off("openchange", e);
		};
	}, [c, o]), r.useEffect(() => {
		if (!c || !g.current || !n) return;
		function e(e) {
			D() && i(!1, e, "hover");
		}
		let t = Pn(s.floating).documentElement;
		return t.addEventListener("mouseleave", e), () => {
			t.removeEventListener("mouseleave", e);
		};
	}, [
		s.floating,
		n,
		i,
		c,
		g,
		D
	]);
	let O = r.useCallback(function(e, t, n) {
		t === void 0 && (t = !0), n === void 0 && (n = "hover");
		let r = Di(_.current, "close", y.current);
		r && !x.current ? (Y(b), b.current = window.setTimeout(() => i(!1, e, n), r)) : t && (Y(b), i(!1, e, n));
	}, [_, i]), k = ci(() => {
		T.current(), x.current = void 0;
	}), A = ci(() => {
		if (w.current) {
			let e = Pn(s.floating).body;
			e.style.pointerEvents = "", e.removeAttribute(Ei), w.current = !1;
		}
	}), j = ci(() => a.current.openEvent ? ["click", "mousedown"].includes(a.current.openEvent.type) : !1);
	r.useEffect(() => {
		if (!c) return;
		function e(e) {
			if (Y(b), C.current = !1, d && !Nn(y.current) || f > 0 && !Di(_.current, "open")) return;
			let t = Di(_.current, "open", y.current);
			t ? b.current = window.setTimeout(() => {
				v.current || i(!0, e, "hover");
			}, t) : n || i(!0, e, "hover");
		}
		function t(e) {
			if (j()) return;
			T.current();
			let t = Pn(s.floating);
			if (Y(S), E.current = !1, g.current && a.current.floatingContext) {
				n || Y(b), x.current = g.current({
					...a.current.floatingContext,
					tree: m,
					x: e.clientX,
					y: e.clientY,
					onClose() {
						A(), k(), j() || O(e, !0, "safe-polygon");
					}
				});
				let r = x.current;
				t.addEventListener("mousemove", r), T.current = () => {
					t.removeEventListener("mousemove", r);
				};
				return;
			}
			let r = y.current === "touch" ? !jn(s.floating, e.relatedTarget) : !0;
			r && O(e);
		}
		function r(e) {
			j() || a.current.floatingContext && (g.current == null || g.current({
				...a.current.floatingContext,
				tree: m,
				x: e.clientX,
				y: e.clientY,
				onClose() {
					A(), k(), j() || O(e);
				}
			})(e));
		}
		if (B(s.domReference)) {
			var o;
			let i = s.domReference;
			return n && i.addEventListener("mouseleave", r), (o = s.floating) == null || o.addEventListener("mouseleave", r), p && i.addEventListener("mousemove", e, { once: !0 }), i.addEventListener("mouseenter", e), i.addEventListener("mouseleave", t), () => {
				var a;
				n && i.removeEventListener("mouseleave", r), (a = s.floating) == null || a.removeEventListener("mouseleave", r), p && i.removeEventListener("mousemove", e), i.removeEventListener("mouseenter", e), i.removeEventListener("mouseleave", t);
			};
		}
	}, [
		s,
		c,
		e,
		d,
		f,
		p,
		O,
		k,
		A,
		i,
		n,
		v,
		m,
		_,
		g,
		a,
		j
	]), J(() => {
		var e;
		if (c && n && (e = g.current) != null && e.__options.blockPointerEvents && D()) {
			w.current = !0;
			let e = s.floating;
			if (B(s.domReference) && e) {
				var t;
				let n = Pn(s.floating).body;
				n.setAttribute(Ei, "");
				let r = s.domReference, i = m == null || (t = m.nodesRef.current.find((e) => e.id === h)) == null || (t = t.context) == null ? void 0 : t.elements.floating;
				return i && (i.style.pointerEvents = ""), n.style.pointerEvents = "none", r.style.pointerEvents = "auto", e.style.pointerEvents = "auto", () => {
					n.style.pointerEvents = "", r.style.pointerEvents = "", e.style.pointerEvents = "";
				};
			}
		}
	}, [
		c,
		n,
		h,
		s,
		m,
		g,
		D
	]), J(() => {
		n || (y.current = void 0, E.current = !1, k(), A());
	}, [
		n,
		k,
		A
	]), r.useEffect(() => () => {
		k(), Y(b), Y(S), A();
	}, [
		c,
		s.domReference,
		k,
		A
	]);
	let M = r.useMemo(() => {
		function e(e) {
			y.current = e.pointerType;
		}
		return {
			onPointerDown: e,
			onPointerEnter: e,
			onMouseMove(e) {
				let { nativeEvent: t } = e;
				function r() {
					!C.current && !v.current && i(!0, t, "hover");
				}
				d && !Nn(y.current) || n || f === 0 || E.current && e.movementX ** 2 + e.movementY ** 2 < 2 || (Y(S), y.current === "touch" ? r() : (E.current = !0, S.current = window.setTimeout(r, f)));
			}
		};
	}, [
		d,
		i,
		n,
		v,
		f
	]), N = r.useMemo(() => ({
		onMouseEnter() {
			Y(b);
		},
		onMouseLeave(e) {
			j() || O(e.nativeEvent, !1);
		}
	}), [O, j]);
	return r.useMemo(() => c ? {
		reference: M,
		floating: N
	} : {}, [
		c,
		M,
		N
	]);
}
function ki(e, t) {
	let n = e.filter((e) => {
		var n;
		return e.parentId === t && (n = e.context)?.open;
	}), r = n;
	for (; r.length;) r = e.filter((e) => {
		var t;
		return (t = r)?.some((t) => {
			var n;
			return e.parentId === t.id && (n = e.context)?.open;
		});
	}), n = n.concat(r);
	return n;
}
const Ai = () => ({
	getShadowRoot: !0,
	displayCheck: typeof ResizeObserver == "function" && ResizeObserver.toString().includes("[native code]") ? "full" : "none"
});
function ji(e, t) {
	let n = ur(e, Ai());
	t === "prev" && n.reverse();
	let r = n.indexOf(An(Pn(e))), i = n.slice(r + 1);
	return i[0];
}
function Mi() {
	return ji(document.body, "next");
}
function Ni() {
	return ji(document.body, "prev");
}
function Pi(e, t) {
	let n = t || e.currentTarget, r = e.relatedTarget;
	return !r || !jn(n, r);
}
function Fi(e) {
	let t = ur(e, Ai());
	t.forEach((e) => {
		e.dataset.tabindex = e.getAttribute("tabindex") || "", e.setAttribute("tabindex", "-1");
	});
}
function Ii(e) {
	let t = e.querySelectorAll("[data-tabindex]");
	t.forEach((e) => {
		let t = e.dataset.tabindex;
		delete e.dataset.tabindex, t ? e.setAttribute("tabindex", t) : e.removeAttribute("tabindex");
	});
}
const Li = {
	border: 0,
	clip: "rect(0 0 0 0)",
	height: "1px",
	margin: "-1px",
	overflow: "hidden",
	padding: 0,
	position: "fixed",
	whiteSpace: "nowrap",
	width: "1px",
	top: 0,
	left: 0
}, Ri = /* @__PURE__ */ r.forwardRef(function(e, t) {
	let [n, i] = r.useState();
	J(() => {
		Mn() && i("button");
	}, []);
	let a = {
		ref: t,
		tabIndex: 0,
		role: n,
		"aria-hidden": n ? void 0 : !0,
		[wi("focus-guard")]: "",
		style: Li
	};
	return /* @__PURE__ */ (0, h.jsx)("span", {
		...e,
		...a
	});
}), zi = /* @__PURE__ */ r.createContext(null), Bi = /* @__PURE__ */ wi("portal");
function Vi(e) {
	e === void 0 && (e = {});
	let { id: t, root: n } = e, i = gi(), a = Ui(), [o, s] = r.useState(null), c = r.useRef(null);
	return J(() => () => {
		o?.remove(), queueMicrotask(() => {
			c.current = null;
		});
	}, [o]), J(() => {
		if (!i || c.current) return;
		let e = t ? document.getElementById(t) : null;
		if (!e) return;
		let n = document.createElement("div");
		n.id = i, n.setAttribute(Bi, ""), e.appendChild(n), c.current = n, s(n);
	}, [t, i]), J(() => {
		if (n === null || !i || c.current) return;
		let e = n || a?.portalNode;
		e && !B(e) && (e = e.current), e ||= document.body;
		let r = null;
		t && (r = document.createElement("div"), r.id = t, e.appendChild(r));
		let o = document.createElement("div");
		o.id = i, o.setAttribute(Bi, ""), e = r || e, e.appendChild(o), c.current = o, s(o);
	}, [
		t,
		n,
		i,
		a
	]), o;
}
function Hi(e) {
	let { children: t, id: n, root: i, preserveTabOrder: a = !0 } = e, o = Vi({
		id: n,
		root: i
	}), [s, c] = r.useState(null), l = r.useRef(null), u = r.useRef(null), f = r.useRef(null), p = r.useRef(null), m = s?.modal, g = s?.open, _ = !!s && !s.modal && s.open && a && !!(i || o);
	return r.useEffect(() => {
		if (!o || !a || m) return;
		function e(e) {
			if (o && Pi(e)) {
				let t = e.type === "focusin", n = t ? Ii : Fi;
				n(o);
			}
		}
		return o.addEventListener("focusin", e, !0), o.addEventListener("focusout", e, !0), () => {
			o.removeEventListener("focusin", e, !0), o.removeEventListener("focusout", e, !0);
		};
	}, [
		o,
		a,
		m
	]), r.useEffect(() => {
		o && (g || Ii(o));
	}, [g, o]), /* @__PURE__ */ (0, h.jsxs)(zi.Provider, {
		value: r.useMemo(() => ({
			preserveTabOrder: a,
			beforeOutsideRef: l,
			afterOutsideRef: u,
			beforeInsideRef: f,
			afterInsideRef: p,
			portalNode: o,
			setFocusManagerState: c
		}), [a, o]),
		children: [
			_ && o && /* @__PURE__ */ (0, h.jsx)(Ri, {
				"data-type": "outside",
				ref: l,
				onFocus: (e) => {
					if (Pi(e, o)) {
						var t;
						(t = f.current) == null || t.focus();
					} else {
						let e = Ni() || s?.domReference;
						e?.focus();
					}
				}
			}),
			_ && o && /* @__PURE__ */ (0, h.jsx)("span", {
				"aria-owns": o.id,
				style: Li
			}),
			o && /* @__PURE__ */ d.createPortal(t, o),
			_ && o && /* @__PURE__ */ (0, h.jsx)(Ri, {
				"data-type": "outside",
				ref: u,
				onFocus: (e) => {
					if (Pi(e, o)) {
						var t;
						(t = p.current) == null || t.focus();
					} else {
						let t = Mi() || s?.domReference;
						t?.focus(), s != null && s.closeOnFocusOut && s?.onOpenChange(!1, e.nativeEvent, "focus-out");
					}
				}
			})
		]
	});
}
const Ui = () => r.useContext(zi);
function Wi(e) {
	let { open: t = !1, onOpenChange: n, elements: i } = e, a = gi(), o = r.useRef({}), [s] = r.useState(() => yi()), c = Si() != null;
	if (process.env.NODE_ENV !== "production") {
		let e = i.reference;
		e && !B(e) && vi("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
	}
	let [l, u] = r.useState(i.reference), d = ci((e, t, r) => {
		o.current.openEvent = e ? t : void 0, s.emit("openchange", {
			open: e,
			event: t,
			reason: r,
			nested: c
		}), n?.(e, t, r);
	}), f = r.useMemo(() => ({ setPositionReference: u }), []), p = r.useMemo(() => ({
		reference: l || i.reference || null,
		floating: i.floating || null,
		domReference: i.reference
	}), [
		l,
		i.reference,
		i.floating
	]);
	return r.useMemo(() => ({
		dataRef: o,
		open: t,
		onOpenChange: d,
		elements: p,
		events: s,
		floatingId: a,
		refs: f
	}), [
		t,
		d,
		p,
		s,
		a,
		f
	]);
}
function Gi(e) {
	e === void 0 && (e = {});
	let { nodeId: t } = e, n = Wi({
		...e,
		elements: {
			reference: null,
			floating: null,
			...e.elements
		}
	}), i = e.rootContext || n, a = i.elements, [o, s] = r.useState(null), [c, l] = r.useState(null), u = a?.domReference, d = u || o, f = r.useRef(null), p = Ci();
	J(() => {
		d && (f.current = d);
	}, [d]);
	let m = ti({
		...e,
		elements: {
			...a,
			...c && { reference: c }
		}
	}), h = r.useCallback((e) => {
		let t = B(e) ? {
			getBoundingClientRect: () => e.getBoundingClientRect(),
			contextElement: e
		} : e;
		l(t), m.refs.setReference(t);
	}, [m.refs]), g = r.useCallback((e) => {
		(B(e) || e === null) && (f.current = e, s(e)), (B(m.refs.reference.current) || m.refs.reference.current === null || e !== null && !B(e)) && m.refs.setReference(e);
	}, [m.refs]), _ = r.useMemo(() => ({
		...m.refs,
		setReference: g,
		setPositionReference: h,
		domReference: f
	}), [
		m.refs,
		g,
		h
	]), v = r.useMemo(() => ({
		...m.elements,
		domReference: d
	}), [m.elements, d]), y = r.useMemo(() => ({
		...m,
		...i,
		refs: _,
		elements: v,
		nodeId: t
	}), [
		m,
		_,
		v,
		t,
		i
	]);
	return J(() => {
		i.dataRef.current.floatingContext = y;
		let e = p?.nodesRef.current.find((e) => e.id === t);
		e && (e.context = y);
	}), r.useMemo(() => ({
		...m,
		context: y,
		refs: _,
		elements: v
	}), [
		m,
		_,
		v,
		y
	]);
}
const Ki = "active", qi = "selected";
function Ji(e, t, n) {
	let r = /* @__PURE__ */ new Map(), i = n === "item", a = e;
	if (i && e) {
		let { [Ki]: t, [qi]: n,...r } = e;
		a = r;
	}
	return {
		...n === "floating" && {
			tabIndex: -1,
			"data-floating-ui-focusable": ""
		},
		...a,
		...t.map((t) => {
			let r = t ? t[n] : null;
			return typeof r == "function" ? e ? r(e) : null : r;
		}).concat(e).reduce((e, t) => (t && Object.entries(t).forEach((t) => {
			let [n, a] = t;
			if (!(i && [Ki, qi].includes(n))) if (n.indexOf("on") === 0) {
				if (r.has(n) || r.set(n, []), typeof a == "function") {
					var o;
					(o = r.get(n)) == null || o.push(a), e[n] = function() {
						var e, t = [...arguments];
						return (e = r.get(n))?.map((e) => e(...t)).find((e) => e !== void 0);
					};
				}
			} else e[n] = a;
		}), e), {})
	};
}
function Yi(e) {
	e === void 0 && (e = []);
	let t = e.map((e) => e?.reference), n = e.map((e) => e?.floating), i = e.map((e) => e?.item), a = r.useCallback((t) => Ji(t, e, "reference"), t), o = r.useCallback((t) => Ji(t, e, "floating"), n), s = r.useCallback((t) => Ji(t, e, "item"), i);
	return r.useMemo(() => ({
		getReferenceProps: a,
		getFloatingProps: o,
		getItemProps: s
	}), [
		a,
		o,
		s
	]);
}
function Xi(e, t) {
	let [n, r] = e, i = !1, a = t.length;
	for (let e = 0, o = a - 1; e < a; o = e++) {
		let [a, s] = t[e] || [0, 0], [c, l] = t[o] || [0, 0], u = s >= r != l >= r && n <= (c - a) * (r - s) / (l - s) + a;
		u && (i = !i);
	}
	return i;
}
function Zi(e, t) {
	return e[0] >= t.x && e[0] <= t.x + t.width && e[1] >= t.y && e[1] <= t.y + t.height;
}
function Qi(e) {
	e === void 0 && (e = {});
	let { buffer: t = .5, blockPointerEvents: n = !1, requireIntent: r = !0 } = e, i, a = !1, o = null, s = null, c = performance.now();
	function l(e, t) {
		let n = performance.now(), r = n - c;
		if (o === null || s === null || r === 0) return o = e, s = t, c = n, null;
		let i = e - o, a = t - s, l = Math.sqrt(i * i + a * a), u = l / r;
		return o = e, s = t, c = n, u;
	}
	let u = (e) => {
		let { x: n, y: o, placement: s, elements: c, onClose: u, nodeId: d, tree: f } = e;
		return function(e) {
			function p() {
				clearTimeout(i), u();
			}
			if (clearTimeout(i), !c.domReference || !c.floating || s == null || n == null || o == null) return;
			let { clientX: m, clientY: h } = e, g = [m, h], _ = Fn(e), v = e.type === "mouseleave", y = jn(c.floating, _), b = jn(c.domReference, _), x = c.domReference.getBoundingClientRect(), S = c.floating.getBoundingClientRect(), C = s.split("-")[0], w = n > S.right - S.width / 2, T = o > S.bottom - S.height / 2, E = Zi(g, x), D = S.width > x.width, O = S.height > x.height, k = (D ? x : S).left, A = (D ? x : S).right, j = (O ? x : S).top, M = (O ? x : S).bottom;
			if (y && (a = !0, !v)) return;
			if (b && (a = !1), b && !v) {
				a = !0;
				return;
			}
			if (v && B(e.relatedTarget) && jn(c.floating, e.relatedTarget) || f && ki(f.nodesRef.current, d).some((e) => {
				let { context: t } = e;
				return t?.open;
			})) return;
			if (C === "top" && o >= x.bottom - 1 || C === "bottom" && o <= x.top + 1 || C === "left" && n >= x.right - 1 || C === "right" && n <= x.left + 1) return p();
			let N = [];
			switch (C) {
				case "top":
					N = [
						[k, x.top + 1],
						[k, S.bottom - 1],
						[A, S.bottom - 1],
						[A, x.top + 1]
					];
					break;
				case "bottom":
					N = [
						[k, S.top + 1],
						[k, x.bottom - 1],
						[A, x.bottom - 1],
						[A, S.top + 1]
					];
					break;
				case "left":
					N = [
						[S.right - 1, M],
						[S.right - 1, j],
						[x.left + 1, j],
						[x.left + 1, M]
					];
					break;
				case "right":
					N = [
						[x.right - 1, M],
						[x.right - 1, j],
						[S.left + 1, j],
						[S.left + 1, M]
					];
					break;
			}
			function P(e) {
				let [n, r] = e;
				switch (C) {
					case "top": {
						let e = [D ? n + t / 2 : w ? n + t * 4 : n - t * 4, r + t + 1], i = [D ? n - t / 2 : w ? n + t * 4 : n - t * 4, r + t + 1], a = [[S.left, w || D ? S.bottom - t : S.top], [S.right, w ? D ? S.bottom - t : S.top : S.bottom - t]];
						return [
							e,
							i,
							...a
						];
					}
					case "bottom": {
						let e = [D ? n + t / 2 : w ? n + t * 4 : n - t * 4, r - t], i = [D ? n - t / 2 : w ? n + t * 4 : n - t * 4, r - t], a = [[S.left, w || D ? S.top + t : S.bottom], [S.right, w ? D ? S.top + t : S.bottom : S.top + t]];
						return [
							e,
							i,
							...a
						];
					}
					case "left": {
						let e = [n + t + 1, O ? r + t / 2 : T ? r + t * 4 : r - t * 4], i = [n + t + 1, O ? r - t / 2 : T ? r + t * 4 : r - t * 4], a = [[T || O ? S.right - t : S.left, S.top], [T ? O ? S.right - t : S.left : S.right - t, S.bottom]];
						return [
							...a,
							e,
							i
						];
					}
					case "right": {
						let e = [n - t, O ? r + t / 2 : T ? r + t * 4 : r - t * 4], i = [n - t, O ? r - t / 2 : T ? r + t * 4 : r - t * 4], a = [[T || O ? S.left + t : S.right, S.top], [T ? O ? S.left + t : S.right : S.left + t, S.bottom]];
						return [
							e,
							i,
							...a
						];
					}
				}
			}
			if (!Xi([m, h], N)) {
				if (a && !E) return p();
				if (!v && r) {
					let t = l(e.clientX, e.clientY);
					if (t !== null && t < .1) return p();
				}
				Xi([m, h], P([n, o])) ? !a && r && (i = window.setTimeout(p, 40)) : p();
			}
		};
	};
	return u.__options = { blockPointerEvents: n }, u;
}
let $i = { data: "" }, ea = (e) => typeof window == "object" ? ((e ? e.querySelector("#_goober") : window._goober) || Object.assign((e || document.head).appendChild(document.createElement("style")), {
	innerHTML: " ",
	id: "_goober"
})).firstChild : e || $i, ta = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, na = /\/\*[^]*?\*\/|  +/g, ra = /\n+/g, X = (e, t) => {
	let n = "", r = "", i = "";
	for (let a in e) {
		let o = e[a];
		a[0] == "@" ? a[1] == "i" ? n = a + " " + o + ";" : r += a[1] == "f" ? X(o, a) : a + "{" + X(o, a[1] == "k" ? "" : t) + "}" : typeof o == "object" ? r += X(o, t ? t.replace(/([^,])+/g, (e) => a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g, (t) => /&/.test(t) ? t.replace(/&/g, e) : e ? e + " " + t : t)) : a) : o != null && (a = /^--/.test(a) ? a : a.replace(/[A-Z]/g, "-$&").toLowerCase(), i += X.p ? X.p(a, o) : a + ":" + o + ";");
	}
	return n + (t && i ? t + "{" + i + "}" : i) + r;
}, Z = {}, ia = (e) => {
	if (typeof e == "object") {
		let t = "";
		for (let n in e) t += n + ia(e[n]);
		return t;
	}
	return e;
}, aa = (e, t, n, r, i) => {
	let a = ia(e), o = Z[a] || (Z[a] = ((e) => {
		let t = 0, n = 11;
		for (; t < e.length;) n = 101 * n + e.charCodeAt(t++) >>> 0;
		return "go" + n;
	})(a));
	if (!Z[o]) {
		let t = a === e ? ((e) => {
			let t, n, r = [{}];
			for (; t = ta.exec(e.replace(na, ""));) t[4] ? r.shift() : t[3] ? (n = t[3].replace(ra, " ").trim(), r.unshift(r[0][n] = r[0][n] || {})) : r[0][t[1]] = t[2].replace(ra, " ").trim();
			return r[0];
		})(e) : e;
		Z[o] = X(i ? { ["@keyframes " + o]: t } : t, n ? "" : "." + o);
	}
	let s = n && Z.g ? Z.g : null;
	return n && (Z.g = Z[o]), ((e, t, n, r) => {
		r ? t.data = t.data.replace(r, e) : t.data.indexOf(e) === -1 && (t.data = n ? e + t.data : t.data + e);
	})(Z[o], t, r, s), o;
}, oa = (e, t, n) => e.reduce((e, r, i) => {
	let a = t[i];
	if (a && a.call) {
		let e = a(n), t = e && e.props && e.props.className || /^go/.test(e) && e;
		a = t ? "." + t : e && typeof e == "object" ? e.props ? "" : X(e, "") : !1 === e ? "" : e;
	}
	return e + r + (a ?? "");
}, "");
function sa(e) {
	let t = this || {}, n = e.call ? e(t.p) : e;
	return aa(n.unshift ? n.raw ? oa(n, [].slice.call(arguments, 1), t.p) : n.reduce((e, n) => Object.assign(e, n && n.call ? n(t.p) : n), {}) : n, ea(t.target), t.g, t.o, t.k);
}
let ca, la, ua;
sa.bind({ g: 1 });
let Q = sa.bind({ k: 1 });
function da(e, t, n, r) {
	X.p = t, ca = e, la = n, ua = r;
}
function fa(e, t) {
	let n = this || {};
	return function() {
		let r = arguments;
		function i(a, o) {
			let s = Object.assign({}, a), c = s.className || i.className;
			n.p = Object.assign({ theme: la && la() }, s), n.o = / *go\d+/.test(c), s.className = sa.apply(n, r) + (c ? " " + c : ""), t && (s.ref = o);
			let l = e;
			return e[0] && (l = s.as || e, delete s.as), ua && l[0] && ua(s), ca(l, s);
		}
		return t ? t(i) : i;
	};
}
var pa = (e) => typeof e == "function", ma = (e, t) => pa(e) ? e(t) : e, ha = (() => {
	let e = 0;
	return () => (++e).toString();
})(), ga = (() => {
	let e;
	return () => {
		if (e === void 0 && typeof window < "u") {
			let t = matchMedia("(prefers-reduced-motion: reduce)");
			e = !t || t.matches;
		}
		return e;
	};
})(), _a = 20, va = (e, t) => {
	switch (t.type) {
		case 0: return {
			...e,
			toasts: [t.toast, ...e.toasts].slice(0, _a)
		};
		case 1: return {
			...e,
			toasts: e.toasts.map((e) => e.id === t.toast.id ? {
				...e,
				...t.toast
			} : e)
		};
		case 2:
			let { toast: n } = t;
			return va(e, {
				type: e.toasts.find((e) => e.id === n.id) ? 1 : 0,
				toast: n
			});
		case 3:
			let { toastId: r } = t;
			return {
				...e,
				toasts: e.toasts.map((e) => e.id === r || r === void 0 ? {
					...e,
					dismissed: !0,
					visible: !1
				} : e)
			};
		case 4: return t.toastId === void 0 ? {
			...e,
			toasts: []
		} : {
			...e,
			toasts: e.toasts.filter((e) => e.id !== t.toastId)
		};
		case 5: return {
			...e,
			pausedAt: t.time
		};
		case 6:
			let i = t.time - (e.pausedAt || 0);
			return {
				...e,
				pausedAt: void 0,
				toasts: e.toasts.map((e) => ({
					...e,
					pauseDuration: e.pauseDuration + i
				}))
			};
	}
}, ya = [], ba = {
	toasts: [],
	pausedAt: void 0
}, xa = (e) => {
	ba = va(ba, e), ya.forEach((e) => {
		e(ba);
	});
}, Sa = {
	blank: 4e3,
	error: 4e3,
	success: 2e3,
	loading: Infinity,
	custom: 4e3
}, Ca = (e = {}) => {
	let [t, n] = u(ba), r = l(ba);
	o(() => (r.current !== ba && n(ba), ya.push(n), () => {
		let e = ya.indexOf(n);
		e > -1 && ya.splice(e, 1);
	}), []);
	let i = t.toasts.map((t) => {
		var n, r, i;
		return {
			...e,
			...e[t.type],
			...t,
			removeDelay: t.removeDelay || (n = e[t.type])?.removeDelay || e?.removeDelay,
			duration: t.duration || (r = e[t.type])?.duration || e?.duration || Sa[t.type],
			style: {
				...e.style,
				...(i = e[t.type])?.style,
				...t.style
			}
		};
	});
	return {
		...t,
		toasts: i
	};
}, wa = (e, t = "blank", n) => ({
	createdAt: Date.now(),
	visible: !0,
	dismissed: !1,
	type: t,
	ariaProps: {
		role: "status",
		"aria-live": "polite"
	},
	message: e,
	pauseDuration: 0,
	...n,
	id: n?.id || ha()
}), Ta = (e) => (t, n) => {
	let r = wa(t, e, n);
	return xa({
		type: 2,
		toast: r
	}), r.id;
}, $ = (e, t) => Ta("blank")(e, t);
$.error = Ta("error"), $.success = Ta("success"), $.loading = Ta("loading"), $.custom = Ta("custom"), $.dismiss = (e) => {
	xa({
		type: 3,
		toastId: e
	});
}, $.remove = (e) => xa({
	type: 4,
	toastId: e
}), $.promise = (e, t, n) => {
	let r = $.loading(t.loading, {
		...n,
		...n?.loading
	});
	return typeof e == "function" && (e = e()), e.then((e) => {
		let i = t.success ? ma(t.success, e) : void 0;
		return i ? $.success(i, {
			id: r,
			...n,
			...n?.success
		}) : $.dismiss(r), e;
	}).catch((e) => {
		let i = t.error ? ma(t.error, e) : void 0;
		i ? $.error(i, {
			id: r,
			...n,
			...n?.error
		}) : $.dismiss(r);
	}), e;
};
var Ea = (e, t) => {
	xa({
		type: 1,
		toast: {
			id: e,
			height: t
		}
	});
}, Da = () => {
	xa({
		type: 5,
		time: Date.now()
	});
}, Oa = /* @__PURE__ */ new Map(), ka = 1e3, Aa = (e, t = ka) => {
	if (Oa.has(e)) return;
	let n = setTimeout(() => {
		Oa.delete(e), xa({
			type: 4,
			toastId: e
		});
	}, t);
	Oa.set(e, n);
}, ja = (e) => {
	let { toasts: t, pausedAt: n } = Ca(e);
	o(() => {
		if (n) return;
		let e = Date.now(), r = t.map((t) => {
			if (t.duration === Infinity) return;
			let n = (t.duration || 0) + t.pauseDuration - (e - t.createdAt);
			if (n < 0) {
				t.visible && $.dismiss(t.id);
				return;
			}
			return setTimeout(() => $.dismiss(t.id), n);
		});
		return () => {
			r.forEach((e) => e && clearTimeout(e));
		};
	}, [t, n]);
	let r = a(() => {
		n && xa({
			type: 6,
			time: Date.now()
		});
	}, [n]), i = a((e, n) => {
		let { reverseOrder: r = !1, gutter: i = 8, defaultPosition: a } = n || {}, o = t.filter((t) => (t.position || a) === (e.position || a) && t.height), s = o.findIndex((t) => t.id === e.id), c = o.filter((e, t) => t < s && e.visible).length;
		return o.filter((e) => e.visible).slice(...r ? [c + 1] : [0, c]).reduce((e, t) => e + (t.height || 0) + i, 0);
	}, [t]);
	return o(() => {
		t.forEach((e) => {
			if (e.dismissed) Aa(e.id, e.removeDelay);
			else {
				let t = Oa.get(e.id);
				t && (clearTimeout(t), Oa.delete(e.id));
			}
		});
	}, [t]), {
		toasts: t,
		handlers: {
			updateHeight: Ea,
			startPause: Da,
			endPause: r,
			calculateOffset: i
		}
	};
}, Ma = Q`
from {
  transform: scale(0) rotate(45deg);
	opacity: 0;
}
to {
 transform: scale(1) rotate(45deg);
  opacity: 1;
}`, Na = Q`
from {
  transform: scale(0);
  opacity: 0;
}
to {
  transform: scale(1);
  opacity: 1;
}`, Pa = Q`
from {
  transform: scale(0) rotate(90deg);
	opacity: 0;
}
to {
  transform: scale(1) rotate(90deg);
	opacity: 1;
}`, Fa = fa("div")`
  width: 20px;
  opacity: 0;
  height: 20px;
  border-radius: 10px;
  background: ${(e) => e.primary || "#ff4b4b"};
  position: relative;
  transform: rotate(45deg);

  animation: ${Ma} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
  animation-delay: 100ms;

  &:after,
  &:before {
    content: '';
    animation: ${Na} 0.15s ease-out forwards;
    animation-delay: 150ms;
    position: absolute;
    border-radius: 3px;
    opacity: 0;
    background: ${(e) => e.secondary || "#fff"};
    bottom: 9px;
    left: 4px;
    height: 2px;
    width: 12px;
  }

  &:before {
    animation: ${Pa} 0.15s ease-out forwards;
    animation-delay: 180ms;
    transform: rotate(90deg);
  }
`, Ia = Q`
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
`, La = fa("div")`
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  border: 2px solid;
  border-radius: 100%;
  border-color: ${(e) => e.secondary || "#e0e0e0"};
  border-right-color: ${(e) => e.primary || "#616161"};
  animation: ${Ia} 1s linear infinite;
`, Ra = Q`
from {
  transform: scale(0) rotate(45deg);
	opacity: 0;
}
to {
  transform: scale(1) rotate(45deg);
	opacity: 1;
}`, za = Q`
0% {
	height: 0;
	width: 0;
	opacity: 0;
}
40% {
  height: 0;
	width: 6px;
	opacity: 1;
}
100% {
  opacity: 1;
  height: 10px;
}`, Ba = fa("div")`
  width: 20px;
  opacity: 0;
  height: 20px;
  border-radius: 10px;
  background: ${(e) => e.primary || "#61d345"};
  position: relative;
  transform: rotate(45deg);

  animation: ${Ra} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
  animation-delay: 100ms;
  &:after {
    content: '';
    box-sizing: border-box;
    animation: ${za} 0.2s ease-out forwards;
    opacity: 0;
    animation-delay: 200ms;
    position: absolute;
    border-right: 2px solid;
    border-bottom: 2px solid;
    border-color: ${(e) => e.secondary || "#fff"};
    bottom: 6px;
    left: 6px;
    height: 10px;
    width: 6px;
  }
`, Va = fa("div")`
  position: absolute;
`, Ha = fa("div")`
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 20px;
  min-height: 20px;
`, Ua = Q`
from {
  transform: scale(0.6);
  opacity: 0.4;
}
to {
  transform: scale(1);
  opacity: 1;
}`, Wa = fa("div")`
  position: relative;
  transform: scale(0.6);
  opacity: 0.4;
  min-width: 20px;
  animation: ${Ua} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
`, Ga = ({ toast: e }) => {
	let { icon: t, type: n, iconTheme: i } = e;
	return t === void 0 ? n === "blank" ? null : r.createElement(Ha, null, r.createElement(La, { ...i }), n !== "loading" && r.createElement(Va, null, n === "error" ? r.createElement(Fa, { ...i }) : r.createElement(Ba, { ...i }))) : typeof t == "string" ? r.createElement(Wa, null, t) : t;
}, Ka = (e) => `
0% {transform: translate3d(0,${e * -200}%,0) scale(.6); opacity:.5;}
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
`, qa = (e) => `
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
100% {transform: translate3d(0,${e * -150}%,-1px) scale(.6); opacity:0;}
`, Ja = "0%{opacity:0;} 100%{opacity:1;}", Ya = "0%{opacity:1;} 100%{opacity:0;}", Xa = fa("div")`
  display: flex;
  align-items: center;
  background: #fff;
  color: #363636;
  line-height: 1.3;
  will-change: transform;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
  max-width: 350px;
  pointer-events: auto;
  padding: 8px 10px;
  border-radius: 8px;
`, Za = fa("div")`
  display: flex;
  justify-content: center;
  margin: 4px 10px;
  color: inherit;
  flex: 1 1 auto;
  white-space: pre-line;
`, Qa = (e, t) => {
	let n = e.includes("top") ? 1 : -1, [r, i] = ga() ? [Ja, Ya] : [Ka(n), qa(n)];
	return { animation: t ? `${Q(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards` : `${Q(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)` };
}, $a = r.memo(({ toast: e, position: t, style: n, children: i }) => {
	let a = e.height ? Qa(e.position || t || "top-center", e.visible) : { opacity: 0 }, o = r.createElement(Ga, { toast: e }), s = r.createElement(Za, { ...e.ariaProps }, ma(e.message, e));
	return r.createElement(Xa, {
		className: e.className,
		style: {
			...a,
			...n,
			...e.style
		}
	}, typeof i == "function" ? i({
		icon: o,
		message: s
	}) : r.createElement(r.Fragment, null, o, s));
});
da(r.createElement);
var eo = ({ id: e, className: t, style: n, onHeightUpdate: i, children: a }) => {
	let o = r.useCallback((t) => {
		if (t) {
			let n = () => {
				let n = t.getBoundingClientRect().height;
				i(e, n);
			};
			n(), new MutationObserver(n).observe(t, {
				subtree: !0,
				childList: !0,
				characterData: !0
			});
		}
	}, [e, i]);
	return r.createElement("div", {
		ref: o,
		className: t,
		style: n
	}, a);
}, to = (e, t) => {
	let n = e.includes("top"), r = n ? { top: 0 } : { bottom: 0 }, i = e.includes("center") ? { justifyContent: "center" } : e.includes("right") ? { justifyContent: "flex-end" } : {};
	return {
		left: 0,
		right: 0,
		display: "flex",
		position: "absolute",
		transition: ga() ? void 0 : "all 230ms cubic-bezier(.21,1.02,.73,1)",
		transform: `translateY(${t * (n ? 1 : -1)}px)`,
		...r,
		...i
	};
}, no = sa`
  z-index: 9999;
  > * {
    pointer-events: auto;
  }
`, ro = 16, io = ({ reverseOrder: e, position: t = "top-center", toastOptions: n, gutter: i, children: a, containerStyle: o, containerClassName: s }) => {
	let { toasts: c, handlers: l } = ja(n);
	return r.createElement("div", {
		id: "_rht_toaster",
		style: {
			position: "fixed",
			zIndex: 9999,
			top: ro,
			left: ro,
			right: ro,
			bottom: ro,
			pointerEvents: "none",
			...o
		},
		className: s,
		onMouseEnter: l.startPause,
		onMouseLeave: l.endPause
	}, c.map((n) => {
		let o = n.position || t, s = l.calculateOffset(n, {
			reverseOrder: e,
			gutter: i,
			defaultPosition: t
		}), c = to(o, s);
		return r.createElement(eo, {
			id: n.id,
			key: n.id,
			onHeightUpdate: l.updateHeight,
			className: n.visible ? no : "",
			style: c
		}, n.type === "custom" ? ma(n.message, n) : a ? a(n) : r.createElement($a, {
			toast: n,
			position: o
		}));
	}));
};
export { be as $, Je as A, Fe as B, Ge as C, qe as D, U as E, R as F, Ve as G, B as H, V as I, We as J, Re as K, ze as L, Be as M, Ue as N, ve as O, I as P, ye as Q, he as R, L as S, we as T, Te as U, Se as V, Ee as W, xe as X, ke as Y, Ae as Z, Me as _, Ce as a1, F as a2, pe as a3, Ne as a4, me as a5, ue as a6, se as a7, oe as a8, ce as a9, le as aa, ae as ab, re as ac, ne as ad, te as ae, N as af, M as ag, k as ah, A as ai, O as aj, D as ak, E as al, C as am, w as an, g as ao, v as ap, p as aq, m as ar, io as b, $ as c, Hi as d, Qi as e, Gi as f, Oi as g, Yi as h, ii as i, ri as j, ni as k, Kr as l, kn as m, Bt as n, zt as o, xt as p, bt as q, ct as r, et as s, Qe as t, $e as u, Xe as v, Ze as w, H as x, He as y, z };

//# sourceMappingURL=system.DbMQd1I1.js.map