//#region ../../node_modules/.bun/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
function e() {
	return typeof window < "u";
}
function t(e) {
	return i(e) ? (e.nodeName || "").toLowerCase() : "#document";
}
function n(e) {
	var t;
	return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
}
function r(e) {
	return ((i(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
}
function i(t) {
	return e() ? t instanceof Node || t instanceof n(t).Node : !1;
}
function a(t) {
	return e() ? t instanceof Element || t instanceof n(t).Element : !1;
}
function o(t) {
	return e() ? t instanceof HTMLElement || t instanceof n(t).HTMLElement : !1;
}
function s(t) {
	return !e() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof n(t).ShadowRoot;
}
function c(e) {
	let { overflow: t, overflowX: n, overflowY: r, display: i } = y(e);
	return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
}
function l(e) {
	return /^(table|td|th)$/.test(t(e));
}
function u(e) {
	try {
		if (e.matches(":popover-open")) return !0;
	} catch {}
	try {
		return e.matches(":modal");
	} catch {
		return !1;
	}
}
var d = /transform|translate|scale|rotate|perspective|filter/, f = /paint|layout|strict|content/, p = (e) => !!e && e !== "none", m;
function h(e) {
	let t = a(e) ? y(e) : e;
	return p(t.transform) || p(t.translate) || p(t.scale) || p(t.rotate) || p(t.perspective) || !_() && (p(t.backdropFilter) || p(t.filter)) || d.test(t.willChange || "") || f.test(t.contain || "");
}
function g(e) {
	let t = x(e);
	for (; o(t) && !v(t);) {
		if (h(t)) return t;
		if (u(t)) return null;
		t = x(t);
	}
	return null;
}
function _() {
	return m ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), m;
}
function v(e) {
	return /^(html|body|#document)$/.test(t(e));
}
function y(e) {
	return n(e).getComputedStyle(e);
}
function b(e) {
	return a(e) ? {
		scrollLeft: e.scrollLeft,
		scrollTop: e.scrollTop
	} : {
		scrollLeft: e.scrollX,
		scrollTop: e.scrollY
	};
}
function x(e) {
	if (t(e) === "html") return e;
	let n = e.assignedSlot || e.parentNode || s(e) && e.host || r(e);
	return s(n) ? n.host : n;
}
function S(e) {
	let t = x(e);
	return v(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : o(t) && c(t) ? t : S(t);
}
function C(e, t, r) {
	t === void 0 && (t = []), r === void 0 && (r = !0);
	let i = S(e), a = i === e.ownerDocument?.body, o = n(i);
	if (a) {
		let e = w(o);
		return t.concat(o, o.visualViewport || [], c(i) ? i : [], e && r ? C(e) : []);
	} else return t.concat(i, C(i, [], r));
}
function w(e) {
	return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
}
//#endregion
export { l as _, t as a, x as c, a as d, o as f, s as g, c as h, w as i, n as l, i as m, g as n, b as o, v as p, r, C as s, y as t, h as u, u as v, _ as y };
