"use client";
import { t as e } from "./useIsoLayoutEffect-CKOv1bV_.js";
import { l as t, o as n, s as r } from "./useRenderElement-CmuWsiNa.js";
import { t as i } from "./useStableCallback-CqEVb76s.js";
import { S as a, c as o, t as s } from "./createBaseUIEventDetails-ChcQXp54.js";
import { n as c, t as l } from "./useAnimationFrame-xwbX87TY.js";
import { r as u } from "./useOpenChangeComplete-DjMFUwhi.js";
import { a as d, f, g as p, h as m, l as h } from "./floating-ui.utils.dom-5U5b4xPf.js";
import { n as g, o as _ } from "./detectBrowser-FBYSu3xM.js";
import { n as v, r as y, t as b } from "./shadowDom-C-4Ejp9R.js";
import { c as ee, l as te, r as ne } from "./shim-ieZ_MRlN.js";
import { B as re, H as ie, J as ae, N as oe, R as se, U as ce, W as le, X as ue, Y as de, Z as fe, k as pe, q as me, z as he } from "./popupStateMapping-PdIQcWEz.js";
import { a as ge, i as _e, n as x, o as ve } from "./event-DWcDp5kt.js";
import { c as ye } from "./composite-HOje5ugx.js";
import { t as S } from "./owner-BrzQrszh.js";
import { t as C } from "./addEventListener-B4Gs94GY.js";
import { t as be } from "./useValueAsRef-CCU3eUYq.js";
import { n as xe, t as w } from "./useTimeout-B1x6NSZb.js";
import { t as Se } from "./useValueChanged-j5e75XB6.js";
import * as T from "react";
import { jsx as Ce, jsxs as we } from "react/jsx-runtime";
//#region ../../node_modules/.bun/@base-ui+utils@0.2.9+f7941a290aa3d619/node_modules/@base-ui/utils/esm/useScrollLock.js
var Te = {}, E = {}, D = "";
function O(e) {
	if (typeof document > "u") return !1;
	let t = S(e);
	return h(t).innerWidth - t.documentElement.clientWidth > 0;
}
function k(e) {
	if (!(typeof CSS < "u" && CSS.supports && CSS.supports("scrollbar-gutter", "stable")) || typeof document > "u") return !1;
	let t = S(e), n = t.documentElement, r = t.body, i = m(n) ? n : r, a = i.style.overflowY, o = n.style.scrollbarGutter;
	n.style.scrollbarGutter = "stable", i.style.overflowY = "scroll";
	let s = i.offsetWidth;
	i.style.overflowY = "hidden";
	let c = i.offsetWidth;
	return i.style.overflowY = a, n.style.scrollbarGutter = o, s === c;
}
function A(e) {
	let t = S(e), n = t.documentElement, r = t.body, i = m(n) ? n : r, a = {
		overflowY: i.style.overflowY,
		overflowX: i.style.overflowX
	};
	return Object.assign(i.style, {
		overflowY: "hidden",
		overflowX: "hidden"
	}), () => {
		Object.assign(i.style, a);
	};
}
function j(e) {
	let t = S(e), n = t.documentElement, r = t.body, i = h(n), a = 0, o = 0, s = !1, c = l.create();
	if (_ && (i.visualViewport?.scale ?? 1) !== 1) return () => {};
	function u() {
		let t = i.getComputedStyle(n), c = i.getComputedStyle(r), l = (t.scrollbarGutter || "").includes("both-edges") ? "stable both-edges" : "stable";
		a = n.scrollTop, o = n.scrollLeft, Te = {
			scrollbarGutter: n.style.scrollbarGutter,
			overflowY: n.style.overflowY,
			overflowX: n.style.overflowX
		}, D = n.style.scrollBehavior, E = {
			position: r.style.position,
			height: r.style.height,
			width: r.style.width,
			boxSizing: r.style.boxSizing,
			overflowY: r.style.overflowY,
			overflowX: r.style.overflowX,
			scrollBehavior: r.style.scrollBehavior
		};
		let u = n.scrollHeight > n.clientHeight, d = n.scrollWidth > n.clientWidth, f = t.overflowY === "scroll" || c.overflowY === "scroll", p = t.overflowX === "scroll" || c.overflowX === "scroll", h = Math.max(0, i.innerWidth - r.clientWidth), g = Math.max(0, i.innerHeight - r.clientHeight), _ = parseFloat(c.marginTop) + parseFloat(c.marginBottom), v = parseFloat(c.marginLeft) + parseFloat(c.marginRight), y = m(n) ? n : r;
		if (s = k(e), s) {
			n.style.scrollbarGutter = l, y.style.overflowY = "hidden", y.style.overflowX = "hidden";
			return;
		}
		Object.assign(n.style, {
			scrollbarGutter: l,
			overflowY: "hidden",
			overflowX: "hidden"
		}), (u || f) && (n.style.overflowY = "scroll"), (d || p) && (n.style.overflowX = "scroll"), Object.assign(r.style, {
			position: "relative",
			height: _ || g ? `calc(100dvh - ${_ + g}px)` : "100dvh",
			width: v || h ? `calc(100vw - ${v + h}px)` : "100vw",
			boxSizing: "border-box",
			overflow: "hidden",
			scrollBehavior: "unset"
		}), r.scrollTop = a, r.scrollLeft = o, n.setAttribute("data-base-ui-scroll-locked", ""), n.style.scrollBehavior = "unset";
	}
	function d() {
		Object.assign(n.style, Te), Object.assign(r.style, E), s || (n.scrollTop = a, n.scrollLeft = o, n.removeAttribute("data-base-ui-scroll-locked"), n.style.scrollBehavior = D);
	}
	function f() {
		d(), c.request(u);
	}
	u();
	let p = C(i, "resize", f);
	return () => {
		c.cancel(), d(), typeof i.removeEventListener == "function" && p();
	};
}
var M = new class {
	lockCount = 0;
	restore = null;
	timeoutLock = w.create();
	timeoutUnlock = w.create();
	acquire(e) {
		return this.lockCount += 1, this.lockCount === 1 && this.restore === null && this.timeoutLock.start(0, () => this.lock(e)), this.release;
	}
	release = () => {
		--this.lockCount, this.lockCount === 0 && this.restore && this.timeoutUnlock.start(0, this.unlock);
	};
	unlock = () => {
		this.lockCount === 0 && this.restore && (this.restore?.(), this.restore = null);
	};
	lock(e) {
		if (this.lockCount === 0 || this.restore !== null) return;
		let t = S(e).documentElement, n = h(t).getComputedStyle(t).overflowY;
		if (n === "hidden" || n === "clip") {
			this.restore = r;
			return;
		}
		let i = g || !O(e);
		this.restore = i ? A(e) : j(e);
	}
}();
function N(t = !0, n = null) {
	e(() => {
		if (t) return M.acquire(n);
	}, [t, n]);
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/floating-ui-react/utils/enqueueFocus.js
var P = 0;
function F(e, t = {}) {
	let { preventScroll: n = !1, sync: i = !1, shouldFocus: a } = t;
	cancelAnimationFrame(P);
	function o() {
		a && !a() || e?.focus({ preventScroll: n });
	}
	if (i) return o(), r;
	let s = requestAnimationFrame(o);
	return P = s, () => {
		P === s && (cancelAnimationFrame(s), P = 0);
	};
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/floating-ui-react/utils/markOthers.js
var I = {
	inert: /* @__PURE__ */ new WeakMap(),
	"aria-hidden": /* @__PURE__ */ new WeakMap()
}, L = "data-base-ui-inert", R = {
	inert: /* @__PURE__ */ new WeakSet(),
	"aria-hidden": /* @__PURE__ */ new WeakSet()
}, z = /* @__PURE__ */ new WeakMap(), B = 0;
function V(e) {
	return R[e];
}
function H(e) {
	return e ? p(e) ? e.host : H(e.parentNode) : null;
}
var U = (e, t) => t.map((t) => {
	if (e.contains(t)) return t;
	let n = H(t);
	return e.contains(n) ? n : null;
}).filter((e) => e != null), W = (e) => {
	let t = /* @__PURE__ */ new Set();
	return e.forEach((e) => {
		let n = e;
		for (; n && !t.has(n);) t.add(n), n = n.parentNode;
	}), t;
}, G = (e, t, n) => {
	let r = [], i = (e) => {
		!e || n.has(e) || Array.from(e.children).forEach((e) => {
			d(e) !== "script" && (t.has(e) ? i(e) : r.push(e));
		});
	};
	return i(e), r;
};
function Ee(e, t, n, r, { mark: i = !0, markerIgnoreElements: a = [] }) {
	let o = r ? "inert" : n ? "aria-hidden" : null, s = null, c = null, l = U(t, e), u = i ? U(t, a) : [], d = new Set(u), f = i ? G(t, W(l), new Set(l)).filter((e) => !d.has(e)) : [], p = [], m = [];
	if (o) {
		let e = I[o], n = V(o);
		c = n, s = e;
		let r = U(t, Array.from(t.querySelectorAll("[aria-live]"))), i = l.concat(r);
		G(t, W(i), new Set(i)).forEach((t) => {
			let r = t.getAttribute(o), i = r !== null && r !== "false", a = (e.get(t) || 0) + 1;
			e.set(t, a), p.push(t), a === 1 && i && n.add(t), i || t.setAttribute(o, o === "inert" ? "" : "true");
		});
	}
	return i && f.forEach((e) => {
		let t = (z.get(e) || 0) + 1;
		z.set(e, t), m.push(e), t === 1 && e.setAttribute(L, "");
	}), B += 1, () => {
		s && p.forEach((e) => {
			let t = (s.get(e) || 0) - 1;
			s.set(e, t), t || (!c?.has(e) && o && e.removeAttribute(o), c?.delete(e));
		}), i && m.forEach((e) => {
			let t = (z.get(e) || 0) - 1;
			z.set(e, t), t || e.removeAttribute(L);
		}), --B, B || (I.inert = /* @__PURE__ */ new WeakMap(), I["aria-hidden"] = /* @__PURE__ */ new WeakMap(), R.inert = /* @__PURE__ */ new WeakSet(), R["aria-hidden"] = /* @__PURE__ */ new WeakSet(), z = /* @__PURE__ */ new WeakMap());
	};
}
function De(e, t = {}) {
	let { ariaHidden: n = !1, inert: r = !1, mark: i = !0, markerIgnoreElements: a = [] } = t, o = S(e[0]).body;
	return Ee(e, o, n, r, {
		mark: i,
		markerIgnoreElements: a
	});
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingFocusManager.js
function Oe(e, t) {
	let n = h(y(e));
	return e instanceof n.KeyboardEvent ? "keyboard" : e instanceof n.FocusEvent ? t || "keyboard" : "pointerType" in e ? e.pointerType || "keyboard" : "touches" in e ? "touch" : e instanceof n.MouseEvent ? t || (e.detail === 0 ? "keyboard" : "mouse") : "";
}
var ke = 20, K = [];
function q() {
	K = K.filter((e) => e.deref()?.isConnected);
}
function Ae(e) {
	q(), e && d(e) !== "body" && (K.push(new WeakRef(e)), K.length > ke && (K = K.slice(-20)));
}
function je() {
	return q(), K[K.length - 1]?.deref();
}
function Me(e) {
	return e ? ae(e) ? e : de(e)[0] || e : null;
}
function Ne(e, t) {
	if (e.hasAttribute("tabindex") && !e.hasAttribute("data-tabindex") || !t.current.includes("floating") && !e.getAttribute("role")?.includes("dialog")) return;
	let n = ie(e).filter((e) => {
		let t = e.getAttribute("data-tabindex") || "";
		return ae(e) || e.hasAttribute("data-tabindex") && !t.startsWith("-");
	}), r = e.getAttribute("tabindex");
	t.current.includes("floating") || n.length === 0 ? r !== "0" && e.setAttribute("tabindex", "0") : (r !== "-1" || e.hasAttribute("data-tabindex") && e.getAttribute("data-tabindex") !== "-1") && (e.setAttribute("tabindex", "-1"), e.setAttribute("data-tabindex", "-1"));
}
function J(n) {
	let { context: r, children: a, disabled: l = !1, initialFocus: d = !0, returnFocus: p = !0, restoreFocus: m = !1, modal: h = !0, closeOnFocusOut: g = !0, openInteractionType: ie = "", nextFocusableElement: x, previousFocusableElement: w, beforeContentFocusGuardRef: Se, externalTree: Te, getInsideElements: E } = n, D = "rootStore" in r ? r.rootStore : r, O = D.useState("open"), k = D.useState("domReferenceElement"), A = D.useState("floatingElement"), { events: j, dataRef: M } = D.context, N = i(() => M.current.floatingContext?.nodeId), P = d === !1, I = ee(k) && P, L = T.useRef(["content"]), R = be(d), z = be(p), B = be(ie), V = pe(Te), H = oe(), U = T.useRef(!1), W = T.useRef(!1), G = T.useRef(!1), Ee = T.useRef(null), ke = T.useRef(""), K = T.useRef(""), J = T.useRef(null), Y = T.useRef(null), Pe = t(J, Se, H?.beforeInsideRef), Fe = t(Y, H?.afterInsideRef), X = xe(), Ie = xe(), Le = c(), Re = H != null, Z = ne(A), Q = i((e = Z) => e ? de(e) : []), $ = i(() => E?.().filter((e) => e != null) ?? []);
	T.useEffect(() => {
		if (l || !h) return;
		function e(e) {
			e.key === "Tab" && v(Z, b(S(Z))) && Q().length === 0 && !I && ve(e);
		}
		return C(S(Z), "keydown", e);
	}, [
		l,
		Z,
		h,
		I,
		Q
	]), T.useEffect(() => {
		if (l || !O) return;
		let e = S(Z);
		function t() {
			G.current = !1;
		}
		function n(e) {
			let t = y(e), n = $();
			G.current = !(v(A, t) || v(k, t) || v(H?.portalNode, t) || n.some((e) => e === t || v(e, t))), K.current = e.pointerType || "keyboard", t?.closest("[data-base-ui-click-trigger]") && (W.current = !0);
		}
		function r() {
			K.current = "keyboard";
		}
		return re(C(e, "pointerdown", n, !0), C(e, "pointerup", t, !0), C(e, "pointercancel", t, !0), C(e, "keydown", r, !0));
	}, [
		l,
		A,
		k,
		Z,
		O,
		H,
		$
	]), T.useEffect(() => {
		if (l || !g) return;
		let e = S(Z);
		function t() {
			W.current = !0, Ie.start(0, () => {
				W.current = !1;
			});
		}
		function n(e) {
			let t = y(e);
			ae(t) && (Ee.current = t);
		}
		function r(t) {
			let n = t.relatedTarget, r = t.currentTarget, i = y(t);
			queueMicrotask(() => {
				let a = N(), c = D.context.triggerElements, l = $(), d = n?.hasAttribute(se("focus-guard")) && [
					J.current,
					Y.current,
					H?.beforeInsideRef.current,
					H?.afterInsideRef.current,
					H?.beforeOutsideRef.current,
					H?.afterOutsideRef.current,
					u(w),
					u(x)
				].includes(n), p = !(v(k, n) || v(A, n) || v(n, A) || v(H?.portalNode, n) || l.some((e) => e === n || v(e, n)) || n != null && c.hasElement(n) || c.hasMatchingElement((e) => v(e, n)) || d || V && (fe(V.nodesRef.current, a).find((e) => v(e.context?.elements.floating, n) || v(e.context?.elements.domReference, n)) || ue(V.nodesRef.current, a).find((e) => [e.context?.elements.floating, ne(e.context?.elements.floating)].includes(n) || e.context?.elements.domReference === n)));
				if (r === k && Z && Ne(Z, L), m && r !== k && !ye(i) && b(e) === e.body) {
					if (f(Z) && (Z.focus(), m === "popup")) {
						Le.request(() => {
							Z.focus();
						});
						return;
					}
					let e = Q(), t = Ee.current, n = (t && e.includes(t) ? t : null) || e[e.length - 1] || Z;
					f(n) && n.focus();
				}
				if (M.current.insideReactTree) {
					M.current.insideReactTree = !1;
					return;
				}
				(I || !h) && n && p && !W.current && (I || n !== je()) && (U.current = !0, D.setOpen(!1, s(o, t)));
			});
		}
		function i() {
			G.current || (M.current.insideReactTree = !0, X.start(0, () => {
				M.current.insideReactTree = !1;
			}));
		}
		let a = f(k) ? k : null;
		if (!(!A && !a)) return re(a && C(a, "focusout", r), a && C(a, "pointerdown", t), A && C(A, "focusin", n), A && C(A, "focusout", r), A && H && C(A, "focusout", i, !0));
	}, [
		l,
		k,
		A,
		Z,
		h,
		V,
		H,
		D,
		g,
		m,
		Q,
		I,
		N,
		L,
		M,
		X,
		Ie,
		Le,
		x,
		w,
		$
	]), T.useEffect(() => {
		if (l || !A || !O) return;
		let e = Array.from(H?.portalNode?.querySelectorAll(`[${se("portal")}]`) || []), t = (V ? ue(V.nodesRef.current, N()) : []).find((e) => ee(e.context?.elements.domReference || null))?.context?.elements.domReference, n = De([
			A,
			...e,
			J.current,
			Y.current,
			H?.beforeOutsideRef.current,
			H?.afterOutsideRef.current,
			...$(),
			t,
			u(w),
			u(x),
			I ? k : null
		].filter((e) => e != null), {
			ariaHidden: h || I,
			mark: !1
		}), r = De([A, ...e].filter((e) => e != null));
		return () => {
			r(), n();
		};
	}, [
		O,
		l,
		k,
		A,
		h,
		H,
		I,
		V,
		N,
		x,
		w,
		$
	]), e(() => {
		if (!O || l || !f(Z)) return;
		let e = S(Z), t = b(e);
		queueMicrotask(() => {
			let n = R.current, r = typeof n == "function" ? n(B.current || "") : n;
			if (r === void 0 || r === !1 || v(Z, t)) return;
			let i = null, a = () => (i ??= Q(Z), i[0] || Z), o;
			o = r === !0 || r === null ? a() : u(r), o ||= a();
			let s = v(Z, b(e));
			F(o, {
				preventScroll: o === Z,
				shouldFocus() {
					if (s) return !0;
					let t = b(e);
					return !(t !== o && v(Z, t));
				}
			});
		});
	}, [
		l,
		O,
		Z,
		Q,
		R,
		B
	]), e(() => {
		if (l || !Z) return;
		let e = S(Z);
		Ae(b(e));
		function t(e) {
			if (e.open || (ke.current = Oe(e.nativeEvent, K.current)), e.reason === "trigger-hover" && e.nativeEvent.type === "mouseleave" && (U.current = !0), e.reason === "outside-press") if (e.nested) U.current = !1;
			else if (_e(e.nativeEvent) || ge(e.nativeEvent)) U.current = !1;
			else {
				let e = !1;
				S(Z).createElement("div").focus({ get preventScroll() {
					return e = !0, !1;
				} }), e ? U.current = !1 : U.current = !0;
			}
		}
		j.on("openchange", t);
		function n() {
			let e = z.current, t = typeof e == "function" ? e(ke.current) : e;
			if (t === void 0 || t === !1) return null;
			if (t === null && (t = !0), typeof t == "boolean") return k?.isConnected ? k : je() || null;
			let n = k?.isConnected ? k : je();
			return u(t) || n || null;
		}
		return () => {
			j.off("openchange", t);
			let r = b(e), i = $(), a = v(A, r) || i.some((e) => e === r || v(e, r)) || V && fe(V.nodesRef.current, N(), !1).some((e) => v(e.context?.elements.floating, r)), o = z.current, s = n();
			queueMicrotask(() => {
				let t = Me(s), n = typeof o != "boolean";
				o && !U.current && f(t) && (!(!n && t !== r && r !== e.body) || a) && t.focus({ preventScroll: !0 }), U.current = !1;
			});
		};
	}, [
		l,
		A,
		Z,
		z,
		j,
		V,
		k,
		N,
		$
	]), e(() => {
		if (!_ || O || !A) return;
		let e = b(S(A));
		!f(e) || !te(e) || v(A, e) && e.blur();
	}, [O, A]), e(() => {
		if (!(l || !H)) return H.setFocusManagerState({
			modal: h,
			closeOnFocusOut: g,
			open: O,
			onOpenChange: D.setOpen,
			domReference: k
		}), () => {
			H.setFocusManagerState(null);
		};
	}, [
		l,
		H,
		h,
		O,
		D,
		g,
		k
	]), e(() => {
		if (!(l || !Z)) return Ne(Z, L), () => {
			queueMicrotask(q);
		};
	}, [
		l,
		Z,
		L
	]);
	let ze = !l && (h ? !I : !0) && (Re || h);
	return /*#__PURE__*/ we(T.Fragment, { children: [
		ze && /*#__PURE__*/ Ce(he, {
			"data-type": "inside",
			ref: Pe,
			onFocus: (e) => {
				if (h) {
					let e = Q();
					F(e[e.length - 1]);
				} else H?.portalNode && (U.current = !1, me(e, H.portalNode) ? ce(k)?.focus() : u(w ?? H.beforeOutsideRef)?.focus());
			}
		}),
		a,
		ze && /*#__PURE__*/ Ce(he, {
			"data-type": "inside",
			ref: Fe,
			onFocus: (e) => {
				h ? F(Q()[0]) : H?.portalNode && (g && (U.current = !0), me(e, H.portalNode) ? le(k)?.focus() : u(x ?? H.afterOutsideRef)?.focus());
			}
		})
	] });
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useClick.js
function Y(e, t = {}) {
	let { enabled: r = !0, event: i = "click", toggle: o = !0, ignoreMouse: l = !1, stickIfOpen: u = !0, touchOpenDelay: d = 0, reason: f = a } = t, p = "rootStore" in e ? e.rootStore : e, m = p.context.dataRef, h = T.useRef(void 0), g = c(), _ = xe(), v = T.useMemo(() => {
		function e(e, t, n, r) {
			let i = s(f, t, n);
			e && r === "touch" && d > 0 ? _.start(d, () => {
				p.setOpen(!0, i);
			}) : p.setOpen(e, i);
		}
		function t(e, t, n) {
			let r = m.current.openEvent, i = p.select("domReferenceElement") !== t;
			return e && i || !e || !o ? !0 : r && u ? !n(r.type) : !1;
		}
		return {
			onPointerDown(e) {
				h.current = e.pointerType;
			},
			onMouseDown(n) {
				let r = h.current, a = n.nativeEvent, o = p.select("open");
				if (n.button !== 0 || i === "click" || x(r, !0) && l) return;
				let s = t(o, n.currentTarget, (e) => e === "click" || e === "mousedown"), c = y(a);
				if (te(c)) {
					e(s, a, c, r);
					return;
				}
				let u = n.currentTarget;
				g.request(() => {
					e(s, a, u, r);
				});
			},
			onClick(n) {
				if (i === "mousedown-only") return;
				let r = h.current;
				if (i === "mousedown" && r) {
					h.current = void 0;
					return;
				}
				x(r, !0) && l || e(t(p.select("open"), n.currentTarget, (e) => e === "click" || e === "mousedown" || e === "keydown" || e === "keyup"), n.nativeEvent, n.currentTarget, r);
			},
			onKeyDown() {
				h.current = void 0;
			}
		};
	}, [
		m,
		i,
		l,
		f,
		p,
		u,
		o,
		g,
		_,
		d
	]);
	return T.useMemo(() => r ? { reference: v } : n, [r, v]);
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/utils/InternalBackdrop.js
var Pe = /*#__PURE__*/ T.forwardRef(function(e, t) {
	let { cutout: n, ...r } = e, i;
	if (n) {
		let e = n.getBoundingClientRect();
		i = `polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`;
	}
	return /*#__PURE__*/ Ce("div", {
		ref: t,
		role: "presentation",
		"data-base-ui-inert": "",
		...r,
		style: {
			position: "fixed",
			inset: 0,
			userSelect: "none",
			WebkitUserSelect: "none",
			clipPath: i
		}
	});
});
process.env.NODE_ENV !== "production" && (Pe.displayName = "InternalBackdrop");
//#endregion
//#region ../../node_modules/.bun/@base-ui+utils@0.2.9+f7941a290aa3d619/node_modules/@base-ui/utils/esm/useEnhancedClickHandler.js
function Fe(e) {
	let t = T.useRef(""), n = T.useCallback((n) => {
		n.defaultPrevented || (t.current = n.pointerType, e(n, n.pointerType));
	}, [e]);
	return {
		onClick: T.useCallback((n) => {
			if (n.detail === 0) {
				e(n, "keyboard");
				return;
			}
			"pointerType" in n ? e(n, n.pointerType) : e(n, t.current), t.current = "";
		}, [e]),
		onPointerDown: n
	};
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/utils/useOpenInteractionType.js
function X(e, t) {
	let { onClick: n, onPointerDown: r } = Fe(i((n, r) => {
		(typeof e == "function" ? e() : e) || t(r || (g ? "touch" : ""));
	}));
	return T.useMemo(() => ({
		onClick: n,
		onPointerDown: r
	}), [n, r]);
}
function Ie(e) {
	let [t, n] = T.useState(null), r = X(e, n);
	return Se(e, (t) => {
		t && !e && n(null);
	}), T.useMemo(() => ({
		openMethod: t,
		triggerProps: r
	}), [t, r]);
}
//#endregion
export { J as a, Y as i, X as n, F as o, Pe as r, N as s, Ie as t };
