"use client";
import { t as e } from "./useIsoLayoutEffect-CKOv1bV_.js";
import { r as t, t as n, u as r } from "./useRenderElement-CmuWsiNa.js";
import { t as i } from "./useStableCallback-CqEVb76s.js";
import { S as a, a as o, g as s, l as c, t as l, x as u } from "./createBaseUIEventDetails-ChcQXp54.js";
import { t as d } from "./useBaseUiId-DOm5ACje.js";
import { a as f, t as p } from "./useOpenChangeComplete-DjMFUwhi.js";
import { d as m, l as h } from "./floating-ui.utils.dom-5U5b4xPf.js";
import { n as g, r as _ } from "./shadowDom-C-4Ejp9R.js";
import { C as v, L as y, S as b, V as x, a as S, c as C, d as w, l as T, m as E, n as D, o as O, p as k, r as A, s as j, u as ee, v as M, w as te, x as N } from "./popupStateMapping-PdIQcWEz.js";
import { n as ne } from "./event-DWcDp5kt.js";
import { t as P } from "./addEventListener-B4Gs94GY.js";
import { t as re } from "./useValueAsRef-CCU3eUYq.js";
import { cn as ie } from "./lib/utils.js";
import { n as ae, t as F } from "./useTimeout-B1x6NSZb.js";
import { a as I, i as oe, n as se, r as L, t as ce } from "./safePolygon-CscU2iWL.js";
import { i as le, n as R, r as z, t as B } from "./usePositioner-D65mUNMo.js";
import { n as V, r as H, t as U } from "./store-Bdrhndby.js";
import { t as ue } from "./useFocus-DzHCrvH6.js";
import { t as W } from "./FloatingPortalLite-B1JyBlt0.js";
import * as G from "react";
import { jsx as K, jsxs as q } from "react/jsx-runtime";
import * as de from "react-dom";
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingDelayGroup.js
var J = /*#__PURE__*/ G.createContext({
	hasProvider: !1,
	timeoutMs: 0,
	delayRef: { current: 0 },
	initialDelayRef: { current: 0 },
	timeout: new F(),
	currentIdRef: { current: null },
	currentContextRef: { current: null }
});
process.env.NODE_ENV !== "production" && (J.displayName = "FloatingDelayGroupContext");
function fe(e) {
	let { children: t, delay: n, timeoutMs: r = 0 } = e, i = G.useRef(n), a = G.useRef(n), o = G.useRef(null), s = G.useRef(null), c = ae();
	return /*#__PURE__*/ K(J.Provider, {
		value: G.useMemo(() => ({
			hasProvider: !0,
			delayRef: i,
			initialDelayRef: a,
			currentIdRef: o,
			timeoutMs: r,
			currentContextRef: s,
			timeout: c
		}), [r, c]),
		children: t
	});
}
function pe(t, n = { open: !1 }) {
	let { open: r } = n, i = "rootStore" in t ? t.rootStore : t, a = i.useState("floatingId"), { currentIdRef: o, delayRef: c, timeoutMs: u, initialDelayRef: d, currentContextRef: f, hasProvider: p, timeout: m } = G.useContext(J), [h, g] = G.useState(!1);
	return e(() => {
		function e() {
			g(!1), f.current?.setIsInstantPhase(!1), o.current = null, f.current = null, c.current = d.current;
		}
		if (o.current && !r && o.current === a) {
			if (g(!1), u) {
				let t = a;
				return m.start(u, () => {
					i.select("open") || o.current && o.current !== t || e();
				}), () => {
					m.clear();
				};
			}
			e();
		}
	}, [
		r,
		a,
		o,
		c,
		u,
		d,
		f,
		m,
		i
	]), e(() => {
		if (!r) return;
		let e = f.current, t = o.current;
		m.clear(), f.current = {
			onOpenChange: i.setOpen,
			setIsInstantPhase: g
		}, o.current = a, c.current = {
			open: 0,
			close: I(d.current, "close")
		}, t !== null && t !== a ? (g(!0), e?.setIsInstantPhase(!0), e?.onOpenChange(!1, l(s))) : (g(!1), e?.setIsInstantPhase(!1));
	}, [
		r,
		a,
		i,
		o,
		c,
		d,
		f,
		m
	]), e(() => () => {
		f.current = null;
	}, [f]), G.useMemo(() => ({
		hasProvider: p,
		delayRef: c,
		isInstantPhase: h
	}), [
		p,
		c,
		h
	]);
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useClientPoint.js
function me(e, t) {
	let n = null, r = null, i = !1;
	return {
		contextElement: e || void 0,
		getBoundingClientRect() {
			let a = e?.getBoundingClientRect() || {
				width: 0,
				height: 0,
				x: 0,
				y: 0
			}, o = t.axis === "x" || t.axis === "both", s = t.axis === "y" || t.axis === "both", c = ["mouseenter", "mousemove"].includes(t.dataRef.current.openEvent?.type || "") && t.pointerType !== "touch", l = a.width, u = a.height, d = a.x, f = a.y;
			return n == null && t.x && o && (n = a.x - t.x), r == null && t.y && s && (r = a.y - t.y), d -= n || 0, f -= r || 0, l = 0, u = 0, !i || c ? (l = t.axis === "y" ? a.width : 0, u = t.axis === "x" ? a.height : 0, d = o && t.x != null ? t.x : d, f = s && t.y != null ? t.y : f) : i && !c && (u = t.axis === "x" ? a.height : u, l = t.axis === "y" ? a.width : l), i = !0, {
				width: l,
				height: u,
				x: d,
				y: f,
				top: f,
				right: d + l,
				bottom: f + u,
				left: d
			};
		}
	};
}
function he(e) {
	return e != null && e.clientX != null;
}
function ge(e, t = {}) {
	let { enabled: n = !0, axis: r = "both" } = t, a = "rootStore" in e ? e.rootStore : e, o = a.useState("open"), s = a.useState("floatingElement"), c = a.useState("domReferenceElement"), l = a.context.dataRef, u = G.useRef(!1), d = G.useRef(null), [f, p] = G.useState(), [m, v] = G.useState([]), y = i((e) => {
		a.set("positionReference", e);
	}), b = i((e, t, n) => {
		u.current || l.current.openEvent && !he(l.current.openEvent) || a.set("positionReference", me(n ?? c, {
			x: e,
			y: t,
			axis: r,
			dataRef: l,
			pointerType: f
		}));
	}), x = i((e) => {
		o ? d.current || (b(e.clientX, e.clientY, e.currentTarget), v([])) : b(e.clientX, e.clientY, e.currentTarget);
	}), S = ne(f) ? s : o;
	G.useEffect(() => {
		if (!n) {
			y(c);
			return;
		}
		if (!S) return;
		function e() {
			d.current?.(), d.current = null;
		}
		let t = h(s);
		function r(t) {
			g(s, _(t)) ? e() : b(t.clientX, t.clientY);
		}
		return !l.current.openEvent || he(l.current.openEvent) ? d.current = P(t, "mousemove", r) : y(c), e;
	}, [
		S,
		n,
		s,
		l,
		c,
		a,
		b,
		y,
		m
	]), G.useEffect(() => () => {
		a.set("positionReference", null);
	}, [a]), G.useEffect(() => {
		n && !s && (u.current = !1);
	}, [n, s]), G.useEffect(() => {
		!n && o && (u.current = !0);
	}, [n, o]);
	let C = G.useMemo(() => {
		function e(e) {
			p(e.pointerType);
		}
		return {
			onPointerDown: e,
			onPointerEnter: e,
			onMouseMove: x,
			onMouseEnter: x
		};
	}, [x]);
	return G.useMemo(() => n ? {
		reference: C,
		trigger: C
	} : {}, [n, C]);
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/tooltip/root/TooltipRootContext.js
var Y = /*#__PURE__*/ G.createContext(void 0);
process.env.NODE_ENV !== "production" && (Y.displayName = "TooltipRootContext");
function X(e) {
	let t = G.useContext(Y);
	if (t === void 0 && !e) throw Error(process.env.NODE_ENV === "production" ? r(72) : "Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.");
	return t;
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/tooltip/store/TooltipStore.js
var _e = {
	...H,
	disabled: v((e) => e.disabled),
	instantType: v((e) => e.instantType),
	isInstantPhase: v((e) => e.isInstantPhase),
	trackCursorAxis: v((e) => e.trackCursorAxis),
	disableHoverablePopup: v((e) => e.disableHoverablePopup),
	lastOpenChangeReason: v((e) => e.openChangeReason),
	closeOnClick: v((e) => e.closeOnClick),
	closeDelay: v((e) => e.closeDelay),
	hasViewport: v((e) => e.hasViewport)
}, ve = class e extends M {
	constructor(e, t, n = !1) {
		let r = new O(), i = {
			...ye(),
			...e
		};
		i.floatingRootContext = V(r, t, n), super(i, {
			popupRef: /*#__PURE__*/ G.createRef(),
			onOpenChange: void 0,
			onOpenChangeComplete: void 0,
			triggerElements: r
		}, _e);
	}
	setOpen = (e, t) => {
		let n = t.reason, r = n === u, i = e && n === "trigger-focus", a = !e && (n === "trigger-press" || n === "escape-key");
		if (t.preventUnmountOnClose = () => {
			this.set("preventUnmountingOnClose", !0);
		}, this.context.onOpenChange?.(e, t), t.isCanceled) return;
		this.state.floatingRootContext.dispatchOpenChange(e, t);
		let o = () => {
			let r = {
				open: e,
				openChangeReason: n
			};
			i ? r.instantType = "focus" : a ? r.instantType = "dismiss" : n === "trigger-hover" && (r.instantType = void 0), C(r, e, t.trigger), this.update(r);
		};
		r ? de.flushSync(o) : o();
	};
	cancelPendingOpen(e) {
		this.state.floatingRootContext.dispatchOpenChange(!1, l(a, e));
	}
	static useStore(t, n) {
		return k(t, (t, r) => new e(n, t, r)).store;
	}
};
function ye() {
	return {
		...U(),
		disabled: !1,
		instantType: void 0,
		isInstantPhase: !1,
		trackCursorAxis: "none",
		disableHoverablePopup: !1,
		openChangeReason: null,
		closeOnClick: !0,
		closeDelay: 0,
		hasViewport: !1
	};
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/tooltip/root/TooltipRoot.js
var be = N(function(t) {
	let { disabled: n = !1, defaultOpen: r = !1, open: i, disableHoverablePopup: a = !1, trackCursorAxis: s = "none", actionsRef: u, onOpenChange: d, onOpenChangeComplete: f, handle: p, triggerId: m, defaultTriggerId: h = null, children: g } = t, _ = ve.useStore(p?.store, {
		open: r,
		openProp: i,
		activeTriggerId: h,
		triggerIdProp: m
	});
	x(() => {
		i === void 0 && _.state.open === !1 && r === !0 && _.update({
			open: !0,
			activeTriggerId: h
		});
	}), _.useControlledProp("openProp", i), _.useControlledProp("triggerIdProp", m), _.useContextCallback("onOpenChange", d), _.useContextCallback("onOpenChangeComplete", f);
	let v = _.useState("open"), y = !n && v, b = _.useState("activeTriggerId"), S = _.useState("mounted"), C = _.useState("payload");
	_.useSyncedValues({
		trackCursorAxis: s,
		disableHoverablePopup: a
	}), _.useSyncedValue("disabled", n), T(_);
	let { forceUnmount: w, transitionStatus: E } = ee(y, _), D = _.useState("isInstantPhase"), O = _.useState("instantType"), k = _.useState("lastOpenChangeReason"), A = G.useRef(null);
	e(() => {
		v && n && _.setOpen(!1, l(o));
	}, [
		v,
		n,
		_
	]), e(() => {
		E === "ending" && k === "none" || E !== "ending" && D ? (O !== "delay" && (A.current = O), _.set("instantType", "delay")) : A.current !== null && (_.set("instantType", A.current), A.current = null);
	}, [
		E,
		D,
		k,
		O,
		_
	]), e(() => {
		y && (b ?? _.set("payload", void 0));
	}, [
		_,
		b,
		y
	]);
	let j = G.useCallback(() => {
		_.setOpen(!1, l(c));
	}, [_]);
	G.useImperativeHandle(u, () => ({
		unmount: w,
		close: j
	}), [w, j]);
	let M = y || S || !n && s !== "none";
	return /*#__PURE__*/ q(Y.Provider, {
		value: _,
		children: [M && /*#__PURE__*/ K(xe, {
			store: _,
			disabled: n,
			trackCursorAxis: s
		}), typeof g == "function" ? g({ payload: C }) : g]
	});
});
process.env.NODE_ENV !== "production" && (be.displayName = "TooltipRoot");
function xe({ store: e, disabled: n, trackCursorAxis: r }) {
	let i = e.useState("floatingRootContext"), a = te(i, {
		enabled: !n,
		referencePress: () => e.select("closeOnClick")
	}), o = ge(i, {
		enabled: !n && r !== "none",
		axis: r === "none" ? void 0 : r
	});
	return w(e, {
		activeTriggerProps: G.useMemo(() => t(o.reference, a.reference), [o.reference, a.reference]),
		inactiveTriggerProps: G.useMemo(() => t(o.trigger, a.trigger), [o.trigger, a.trigger]),
		popupProps: G.useMemo(() => t(j, o.floating, a.floating), [o.floating, a.floating])
	}), null;
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/tooltip/provider/TooltipProviderContext.js
var Z = /*#__PURE__*/ G.createContext(void 0);
process.env.NODE_ENV !== "production" && (Z.displayName = "TooltipProviderContext");
function Se() {
	return G.useContext(Z);
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/tooltip/trigger/TooltipTriggerDataAttributes.js
var Ce = function(e) {
	return e[e.popupOpen = D.popupOpen] = "popupOpen", e.triggerDisabled = "data-trigger-disabled", e;
}({}), we = "data-base-ui-tooltip-trigger";
function Te(e) {
	if ("composedPath" in e) {
		let t = e.composedPath();
		for (let e = 0; e < t.length; e += 1) {
			let n = t[e];
			if (m(n)) return n;
		}
	}
	let t = e.target;
	return m(t) ? t : null;
}
function Ee(e) {
	let t = e;
	for (; t;) {
		if (t.hasAttribute(we)) return t;
		let e = t.parentElement;
		if (e) {
			t = e;
			continue;
		}
		let n = t.getRootNode();
		t = "host" in n && m(n.host) ? n.host : null;
	}
	return null;
}
var De = b(function(e, t) {
	let { render: i, className: a, style: o, handle: s, payload: c, disabled: f, delay: p, closeOnClick: m = !0, closeDelay: h, id: _, ...v } = e, y = X(!0), b = s?.store ?? y;
	if (!b) throw Error(process.env.NODE_ENV === "production" ? r(82) : "Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.");
	let x = d(_), C = b.useState("isTriggerActive", x), w = b.useState("isOpenedByTrigger", x), T = b.useState("floatingRootContext"), D = G.useRef(null), O = p ?? 600, k = h ?? 0, { registerTrigger: A, isMountedByThisTrigger: j } = E(x, D, b, {
		payload: c,
		closeOnClick: m,
		closeDelay: k
	}), ee = Se(), { delayRef: M, isInstantPhase: te, hasProvider: N } = pe(T, { open: w }), P = oe(T);
	b.useSyncedValue("isInstantPhase", te);
	let ie = b.useState("disabled"), F = f ?? ie, I = re(F), L = b.useState("trackCursorAxis"), le = b.useState("disableHoverablePopup"), R = G.useRef(!1), z = ae(), B = G.useRef(void 0);
	function V() {
		let e = ee?.delay, t = typeof M.current == "object" ? M.current.open : void 0, n = O;
		return N && (n = t === 0 ? 0 : p ?? e ?? O), n;
	}
	function H(e) {
		let t = D.current;
		if (!t || !e) return !1;
		let n = Ee(e);
		return n !== null && n !== t && g(t, n);
	}
	function U(e) {
		let t = H(e);
		return R.current = t, t && (P.openChangeTimeout.clear(), P.restTimeout.clear(), P.restTimeoutPending = !1, z.clear()), t;
	}
	let W = se(T, {
		enabled: !F,
		mouseOnly: !0,
		move: !1,
		handleClose: !le && L !== "both" ? ce() : null,
		restMs: V,
		delay() {
			let e = typeof M.current == "object" ? M.current.close : void 0, t = k;
			return h == null && N && (t = e), { close: t };
		},
		triggerElementRef: D,
		isActiveTrigger: C,
		isClosing: () => b.select("transitionStatus") === "ending",
		shouldOpen() {
			return !R.current;
		}
	}), K = ue(T, { enabled: !F }).reference, q = (e) => {
		let t = R.current, n = Te(e), r = U(n), i = D.current, a = i && n && g(i, n);
		if (r && b.select("open") && b.select("lastOpenChangeReason") === "trigger-hover") {
			b.setOpen(!1, l(u, e));
			return;
		}
		if (t && !r && a && !I.current && !b.select("open") && i && ne(B.current)) {
			let t = () => {
				!R.current && !I.current && !b.select("open") && b.setOpen(!0, l(u, e, i));
			}, n = V();
			n === 0 ? (z.clear(), t()) : z.start(n, t);
		}
	}, de = b.useState("triggerProps", j);
	return n("button", e, {
		state: { open: w },
		ref: [
			t,
			A,
			D
		],
		props: [
			W,
			K,
			j || L !== "none" ? de : void 0,
			{
				onMouseOver(e) {
					q(e.nativeEvent);
				},
				onFocus(e) {
					H(Te(e.nativeEvent)) && e.preventBaseUIHandler();
				},
				onMouseLeave() {
					R.current = !1, z.clear(), B.current = void 0;
				},
				onPointerEnter(e) {
					B.current = e.pointerType;
				},
				onPointerDown(e) {
					B.current = e.pointerType, b.set("closeOnClick", m), m && !b.select("open") && b.cancelPendingOpen(e.nativeEvent);
				},
				onClick(e) {
					m && !b.select("open") && b.cancelPendingOpen(e.nativeEvent);
				},
				id: x,
				[Ce.triggerDisabled]: F ? "" : void 0,
				[we]: F ? void 0 : ""
			},
			v
		],
		stateAttributesMapping: S
	});
});
process.env.NODE_ENV !== "production" && (De.displayName = "TooltipTrigger");
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/tooltip/portal/TooltipPortalContext.js
var Q = /*#__PURE__*/ G.createContext(void 0);
process.env.NODE_ENV !== "production" && (Q.displayName = "TooltipPortalContext");
function Oe() {
	let e = G.useContext(Q);
	if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? r(70) : "Base UI: <Tooltip.Portal> is missing.");
	return e;
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/tooltip/portal/TooltipPortal.js
var ke = /*#__PURE__*/ G.forwardRef(function(e, t) {
	let { keepMounted: n = !1, ...r } = e;
	return X().useState("mounted") || n ? /*#__PURE__*/ K(Q.Provider, {
		value: n,
		children: /*#__PURE__*/ K(W, {
			ref: t,
			...r
		})
	}) : null;
});
process.env.NODE_ENV !== "production" && (ke.displayName = "TooltipPortal");
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/tooltip/positioner/TooltipPositionerContext.js
var $ = /*#__PURE__*/ G.createContext(void 0);
process.env.NODE_ENV !== "production" && ($.displayName = "TooltipPositionerContext");
function Ae() {
	let e = G.useContext($);
	if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? r(71) : "Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.");
	return e;
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/tooltip/positioner/TooltipPositioner.js
var je = /*#__PURE__*/ G.forwardRef(function(e, t) {
	let { render: n, className: r, anchor: i, positionMethod: a = "absolute", side: o = "top", align: s = "center", sideOffset: c = 0, alignOffset: l = 0, collisionBoundary: u = "clipping-ancestors", collisionPadding: d = 5, arrowPadding: f = 5, sticky: p = !1, disableAnchorTracking: m = !1, collisionAvoidance: h = y, style: g, ..._ } = e, v = X(), b = Oe(), x = v.useState("open"), S = v.useState("mounted"), C = v.useState("trackCursorAxis"), w = v.useState("disableHoverablePopup"), T = v.useState("floatingRootContext"), E = v.useState("instantType"), D = v.useState("transitionStatus"), O = z({
		anchor: i,
		positionMethod: a,
		floatingRootContext: T,
		mounted: S,
		side: o,
		sideOffset: c,
		align: s,
		alignOffset: l,
		collisionBoundary: u,
		collisionPadding: d,
		sticky: p,
		arrowPadding: f,
		disableAnchorTracking: m,
		keepMounted: b,
		collisionAvoidance: h,
		adaptiveOrigin: v.useState("hasViewport") ? le : void 0
	}), k = B(e, G.useMemo(() => ({
		open: x,
		side: O.side,
		align: O.align,
		anchorHidden: O.anchorHidden,
		instant: C === "none" ? E : "tracking-cursor"
	}), [
		x,
		O.side,
		O.align,
		O.anchorHidden,
		C,
		E
	]), {
		styles: O.positionerStyles,
		transitionStatus: D,
		props: _,
		refs: [t, v.useStateSetter("positionerElement")],
		hidden: !S,
		inert: !x || C === "both" || w
	});
	return /*#__PURE__*/ K($.Provider, {
		value: O,
		children: k
	});
});
process.env.NODE_ENV !== "production" && (je.displayName = "TooltipPositioner");
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/tooltip/popup/TooltipPopup.js
var Me = {
	...A,
	...f
}, Ne = /*#__PURE__*/ G.forwardRef(function(e, t) {
	let { render: r, className: i, style: a, ...o } = e, s = X(), { side: c, align: l } = Ae(), u = s.useState("open"), d = s.useState("instantType"), f = s.useState("transitionStatus"), m = s.useState("popupProps"), h = s.useState("floatingRootContext"), g = s.useState("disabled"), _ = s.useState("closeDelay");
	p({
		open: u,
		ref: s.context.popupRef,
		onComplete() {
			u && s.context.onOpenChangeComplete?.(!0);
		}
	}), L(h, {
		enabled: !g,
		closeDelay: _
	});
	let v = s.useStateSetter("popupElement");
	return n("div", e, {
		state: {
			open: u,
			side: c,
			align: l,
			instant: d,
			transitionStatus: f
		},
		ref: [
			t,
			s.context.popupRef,
			v
		],
		props: [
			m,
			R(f),
			o
		],
		stateAttributesMapping: Me
	});
});
process.env.NODE_ENV !== "production" && (Ne.displayName = "TooltipPopup");
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/tooltip/arrow/TooltipArrow.js
var Pe = /*#__PURE__*/ G.forwardRef(function(e, t) {
	let { render: r, className: i, style: a, ...o } = e, s = X(), { arrowRef: c, side: l, align: u, arrowUncentered: d, arrowStyles: f } = Ae();
	return n("div", e, {
		state: {
			open: s.useState("open"),
			side: l,
			align: u,
			uncentered: d,
			instant: s.useState("instantType")
		},
		ref: [t, c],
		props: [{
			style: f,
			"aria-hidden": !0
		}, o],
		stateAttributesMapping: A
	});
});
process.env.NODE_ENV !== "production" && (Pe.displayName = "TooltipArrow");
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/tooltip/provider/TooltipProvider.js
var Fe = function(e) {
	let { delay: t, closeDelay: n, timeout: r = 400 } = e, i = G.useMemo(() => ({
		delay: t,
		closeDelay: n
	}), [t, n]), a = G.useMemo(() => ({
		open: t,
		close: n
	}), [t, n]);
	return /*#__PURE__*/ K(Z.Provider, {
		value: i,
		children: /*#__PURE__*/ K(fe, {
			delay: a,
			timeoutMs: r,
			children: e.children
		})
	});
};
process.env.NODE_ENV !== "production" && (Fe.displayName = "TooltipProvider");
//#endregion
//#region lib/components/ui/atoms/tooltip.tsx
function Ie({ delay: e = 0, ...t }) {
	return /* @__PURE__ */ K(Fe, {
		"data-slot": "tooltip-provider",
		delay: e,
		...t
	});
}
function Le({ ...e }) {
	return /* @__PURE__ */ K(be, {
		"data-slot": "tooltip",
		...e
	});
}
function Re({ ...e }) {
	return /* @__PURE__ */ K(De, {
		"data-slot": "tooltip-trigger",
		...e
	});
}
function ze({ className: e, side: t = "top", sideOffset: n = 4, align: r = "center", alignOffset: i = 0, children: a, ...o }) {
	return /* @__PURE__ */ K(ke, { children: /* @__PURE__ */ K(je, {
		align: r,
		alignOffset: i,
		className: "isolate z-50",
		side: t,
		sideOffset: n,
		children: /* @__PURE__ */ q(Ne, {
			className: ie("data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:fade-in-0 data-open:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-95 z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 overflow-visible rounded-md border border-foreground/10 bg-background px-3 py-1.5 text-foreground text-xs shadow-md has-data-[slot=kbd]:pr-1.5 data-[state=delayed-open]:animate-in data-closed:animate-out data-open:animate-in **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm dark:border-border", e),
			"data-slot": "tooltip-content",
			...o,
			children: [a, /* @__PURE__ */ K(Pe, { className: "z-50 size-2.5 translate-y-[calc(-50%-1px)] rotate-45 rounded-[2px] border-foreground/10 bg-background fill-background data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-start]:top-1/2! data-[side=left]:top-1/2! data-[side=right]:top-1/2! data-[side=inline-start]:-right-1 data-[side=left]:-right-1 data-[side=top]:-bottom-2.5 data-[side=inline-end]:-left-1 data-[side=right]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:-translate-y-1/2 data-[side=right]:-translate-y-1/2 data-[side=bottom]:border-t data-[side=left]:border-t data-[side=left]:border-r data-[side=top]:border-r data-[side=right]:border-b data-[side=top]:border-b data-[side=bottom]:border-l data-[side=right]:border-l dark:border-border dark:bg-background dark:fill-background" })]
		})
	}) });
}
//#endregion
export { Re as i, ze as n, Ie as r, Le as t };
