import { n as e, t } from "./dist-CTlQcJNK.js";
import { a as n, i as r, o as i, t as a } from "./dist-koa_pEtu.js";
import { t as o } from "./dist-CpMqmV-i.js";
import { t as s } from "./dist-C0wG5dwG.js";
import { t as c } from "./dist-BBVMDH9A.js";
import { i as l, n as u, r as d, t as f } from "./es2015-Bv2aaatg.js";
import { t as p } from "./dist-DGayZ3ok2.js";
import { t as m } from "./dist-DxtM7vvP.js";
import * as h from "react";
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
//#region node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs
/* @__NO_SIDE_EFFECTS__ */
function y(e) {
	let t = /* @__PURE__ */ b(e), n = h.forwardRef((e, n) => {
		let { children: r, ...i } = e, a = h.Children.toArray(r), o = a.find(ee);
		if (o) {
			let e = o.props.children, r = a.map((t) => t === o ? h.Children.count(e) > 1 ? h.Children.only(null) : h.isValidElement(e) ? e.props.children : null : t);
			return /* @__PURE__ */ _(t, {
				...i,
				ref: n,
				children: h.isValidElement(e) ? h.cloneElement(e, void 0, r) : null
			});
		}
		return /* @__PURE__ */ _(t, {
			...i,
			ref: n,
			children: r
		});
	});
	return n.displayName = `${e}.Slot`, n;
}
/* @__NO_SIDE_EFFECTS__ */
function b(e) {
	let n = h.forwardRef((e, n) => {
		let { children: r, ...i } = e;
		if (h.isValidElement(r)) {
			let e = C(r), a = S(i, r.props);
			return r.type !== h.Fragment && (a.ref = n ? t(n, e) : e), h.cloneElement(r, a);
		}
		return h.Children.count(r) > 1 ? h.Children.only(null) : null;
	});
	return n.displayName = `${e}.SlotClone`, n;
}
var x = Symbol("radix.slottable");
function ee(e) {
	return h.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === x;
}
function S(e, t) {
	let n = { ...t };
	for (let r in t) {
		let i = e[r], a = t[r];
		/^on[A-Z]/.test(r) ? i && a ? n[r] = (...e) => {
			let t = a(...e);
			return i(...e), t;
		} : i && (n[r] = i) : r === "style" ? n[r] = {
			...i,
			...a
		} : r === "className" && (n[r] = [i, a].filter(Boolean).join(" "));
	}
	return {
		...e,
		...n
	};
}
function C(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);
}
//#endregion
//#region node_modules/@radix-ui/react-dialog/dist/index.mjs
var w = "Dialog", [T, E] = n(w), [D, O] = T(w), k = (e) => {
	let { __scopeDialog: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: c = !0 } = e, l = h.useRef(null), u = h.useRef(null), [d, f] = s({
		prop: r,
		defaultProp: i ?? !1,
		onChange: a,
		caller: w
	});
	return /* @__PURE__ */ _(D, {
		scope: t,
		triggerRef: l,
		contentRef: u,
		contentId: o(),
		titleId: o(),
		descriptionId: o(),
		open: d,
		onOpenChange: f,
		onOpenToggle: h.useCallback(() => f((e) => !e), [f]),
		modal: c,
		children: n
	});
};
k.displayName = w;
var A = "DialogTrigger", j = h.forwardRef((t, n) => {
	let { __scopeDialog: r, ...o } = t, s = O(A, r), c = e(n, s.triggerRef);
	return /* @__PURE__ */ _(a.button, {
		type: "button",
		"aria-haspopup": "dialog",
		"aria-expanded": s.open,
		"aria-controls": s.contentId,
		"data-state": X(s.open),
		...o,
		ref: c,
		onClick: i(t.onClick, s.onOpenToggle)
	});
});
j.displayName = A;
var M = "DialogPortal", [N, P] = T(M, { forceMount: void 0 }), F = (e) => {
	let { __scopeDialog: t, forceMount: n, children: r, container: i } = e, a = O(M, t);
	return /* @__PURE__ */ _(N, {
		scope: t,
		forceMount: n,
		children: h.Children.map(r, (e) => /* @__PURE__ */ _(m, {
			present: n || a.open,
			children: /* @__PURE__ */ _(p, {
				asChild: !0,
				container: i,
				children: e
			})
		}))
	});
};
F.displayName = M;
var I = "DialogOverlay", L = h.forwardRef((e, t) => {
	let n = P(I, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = O(I, e.__scopeDialog);
	return a.modal ? /* @__PURE__ */ _(m, {
		present: r || a.open,
		children: /* @__PURE__ */ _(z, {
			...i,
			ref: t
		})
	}) : null;
});
L.displayName = I;
var R = /* @__PURE__ */ y("DialogOverlay.RemoveScroll"), z = h.forwardRef((e, t) => {
	let { __scopeDialog: n, ...r } = e, i = O(I, n);
	return /* @__PURE__ */ _(u, {
		as: R,
		allowPinchZoom: !0,
		shards: [i.contentRef],
		children: /* @__PURE__ */ _(a.div, {
			"data-state": X(i.open),
			...r,
			ref: t,
			style: {
				pointerEvents: "auto",
				...r.style
			}
		})
	});
}), B = "DialogContent", V = h.forwardRef((e, t) => {
	let n = P(B, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = O(B, e.__scopeDialog);
	return /* @__PURE__ */ _(m, {
		present: r || a.open,
		children: a.modal ? /* @__PURE__ */ _(te, {
			...i,
			ref: t
		}) : /* @__PURE__ */ _(H, {
			...i,
			ref: t
		})
	});
});
V.displayName = B;
var te = h.forwardRef((t, n) => {
	let r = O(B, t.__scopeDialog), a = h.useRef(null), o = e(n, r.contentRef, a);
	return h.useEffect(() => {
		let e = a.current;
		if (e) return f(e);
	}, []), /* @__PURE__ */ _(U, {
		...t,
		ref: o,
		trapFocus: r.open,
		disableOutsidePointerEvents: !0,
		onCloseAutoFocus: i(t.onCloseAutoFocus, (e) => {
			e.preventDefault(), r.triggerRef.current?.focus();
		}),
		onPointerDownOutside: i(t.onPointerDownOutside, (e) => {
			let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0;
			(t.button === 2 || n) && e.preventDefault();
		}),
		onFocusOutside: i(t.onFocusOutside, (e) => e.preventDefault())
	});
}), H = h.forwardRef((e, t) => {
	let n = O(B, e.__scopeDialog), r = h.useRef(!1), i = h.useRef(!1);
	return /* @__PURE__ */ _(U, {
		...e,
		ref: t,
		trapFocus: !1,
		disableOutsidePointerEvents: !1,
		onCloseAutoFocus: (t) => {
			e.onCloseAutoFocus?.(t), t.defaultPrevented || (r.current || n.triggerRef.current?.focus(), t.preventDefault()), r.current = !1, i.current = !1;
		},
		onInteractOutside: (t) => {
			e.onInteractOutside?.(t), t.defaultPrevented || (r.current = !0, t.detail.originalEvent.type === "pointerdown" && (i.current = !0));
			let a = t.target;
			n.triggerRef.current?.contains(a) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && i.current && t.preventDefault();
		}
	});
}), U = h.forwardRef((t, n) => {
	let { __scopeDialog: r, trapFocus: i, onOpenAutoFocus: a, onCloseAutoFocus: o, ...s } = t, u = O(B, r), f = h.useRef(null), p = e(n, f);
	return d(), /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(l, {
		asChild: !0,
		loop: !0,
		trapped: i,
		onMountAutoFocus: a,
		onUnmountAutoFocus: o,
		children: /* @__PURE__ */ _(c, {
			role: "dialog",
			id: u.contentId,
			"aria-describedby": u.descriptionId,
			"aria-labelledby": u.titleId,
			"data-state": X(u.open),
			...s,
			ref: p,
			onDismiss: () => u.onOpenChange(!1)
		})
	}), /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(re, { titleId: u.titleId }), /* @__PURE__ */ _(ie, {
		contentRef: f,
		descriptionId: u.descriptionId
	})] })] });
}), W = "DialogTitle", G = h.forwardRef((e, t) => {
	let { __scopeDialog: n, ...r } = e, i = O(W, n);
	return /* @__PURE__ */ _(a.h2, {
		id: i.titleId,
		...r,
		ref: t
	});
});
G.displayName = W;
var K = "DialogDescription", q = h.forwardRef((e, t) => {
	let { __scopeDialog: n, ...r } = e, i = O(K, n);
	return /* @__PURE__ */ _(a.p, {
		id: i.descriptionId,
		...r,
		ref: t
	});
});
q.displayName = K;
var J = "DialogClose", Y = h.forwardRef((e, t) => {
	let { __scopeDialog: n, ...r } = e, o = O(J, n);
	return /* @__PURE__ */ _(a.button, {
		type: "button",
		...r,
		ref: t,
		onClick: i(e.onClick, () => o.onOpenChange(!1))
	});
});
Y.displayName = J;
function X(e) {
	return e ? "open" : "closed";
}
var Z = "DialogTitleWarning", [ne, Q] = r(Z, {
	contentName: B,
	titleName: W,
	docsSlug: "dialog"
}), re = ({ titleId: e }) => {
	let t = Q(Z), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
	return h.useEffect(() => {
		e && (document.getElementById(e) || console.error(n));
	}, [n, e]), null;
}, $ = "DialogDescriptionWarning", ie = ({ contentRef: e, descriptionId: t }) => {
	let n = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Q($).contentName}}.`;
	return h.useEffect(() => {
		let r = e.current?.getAttribute("aria-describedby");
		t && r && (document.getElementById(t) || console.warn(n));
	}, [
		n,
		e,
		t
	]), null;
}, ae = k, oe = j, se = F, ce = L, le = V, ue = G, de = q, fe = Y;
//#endregion
export { se as a, oe as c, ce as i, ne as l, le as n, ae as o, de as r, ue as s, fe as t, E as u };

//# sourceMappingURL=dist-D0hHNX_3.js.map