"use client";
import { t as e } from "./useControlled-ZBScq72P.js";
import { t } from "./useIsoLayoutEffect-CKOv1bV_.js";
import { a as n, f as r, l as i, o as a, r as o, t as s, u as c } from "./useRenderElement-CmuWsiNa.js";
import { t as l } from "./useStableCallback-CqEVb76s.js";
import { n as u, t as d } from "./useCompositeListItem-xM6vOR9-.js";
import { t as f } from "./CompositeList-DJUJLDbx.js";
import { t as p } from "./DirectionContext-B4CbbM--.js";
import { C as m, f as h, g, r as _, t as v } from "./createBaseUIEventDetails-ChcQXp54.js";
import { t as y } from "./useBaseUiId-DOm5ACje.js";
import { n as b } from "./useAnimationFrame-xwbX87TY.js";
import { a as x, o as S, t as ee } from "./useOpenChangeComplete-DjMFUwhi.js";
import { l as C } from "./floating-ui.utils.dom-5U5b4xPf.js";
import { t as w } from "./useButton-AXffhTAZ.js";
import { o as T } from "./detectBrowser-FBYSu3xM.js";
import { n as E } from "./shadowDom-C-4Ejp9R.js";
import { r as te } from "./shim-ieZ_MRlN.js";
import { C as D, I as O, V as ne, a as k, b as A, i as j, j as M, r as N, s as P, w as F, y as I } from "./popupStateMapping-PdIQcWEz.js";
import { i as L } from "./event-DWcDp5kt.js";
import { O as re } from "./composite-HOje5ugx.js";
import { t as ie } from "./owner-BrzQrszh.js";
import { o as ae } from "./composite-BlDfbDkL.js";
import { t as oe } from "./addEventListener-B4Gs94GY.js";
import { t as se } from "./useValueAsRef-CCU3eUYq.js";
import { cn as R } from "./lib/utils.js";
import { n as z } from "./useTimeout-B1x6NSZb.js";
import { a as ce, i as B, r as le, t as V } from "./useOpenInteractionType-D-ymktmc.js";
import { n as H, t as U } from "./visuallyHidden-CEAV1xeA.js";
import { a as ue, n as de, o as W, r as G, t as fe } from "./usePositioner-D65mUNMo.js";
import { n as pe, r as me, t as K } from "./getPseudoElementBounds-DarjR4tH.js";
import { t as he } from "./inertValue-C36grUTu.js";
import { t as ge } from "./useValueChanged-j5e75XB6.js";
import { n as _e, t as q } from "./ToolbarRootContext-Dubw_915.js";
import { i as ve, n as ye, r as be, t as J } from "./LabelableContext-Q1Z-xUI9.js";
import { t as xe } from "./FormContext-4NSsO4w6.js";
import { t as Se } from "./Separator-CgntgfMd.js";
import { t as Ce } from "./useLabelableId-Dgoo7-Ly.js";
import { t as we } from "./serializeValue-kHY7UUsW.js";
import { n as Te, r as Ee, t as De } from "./scrollEdges-VoRBF4DB.js";
import { n as Oe, t as ke } from "./clamp-DQAQAGkj.js";
import { n as Ae } from "./resolveAriaLabelledBy-DR9UHvi-.js";
import * as Y from "react";
import { jsx as X, jsxs as je } from "react/jsx-runtime";
import { CheckIcon as Me, ChevronDownIcon as Ne, ChevronUpIcon as Pe } from "lucide-react";
//#region ../../node_modules/.bun/@base-ui+utils@0.2.9+f7941a290aa3d619/node_modules/@base-ui/utils/esm/usePreviousValue.js
function Fe(e) {
	let [t, n] = Y.useState({
		current: e,
		previous: null
	});
	return e !== t.current && n({
		current: e,
		previous: t.current
	}), t.previous;
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/root/SelectRootContext.js
var Ie = /*#__PURE__*/ Y.createContext(null);
process.env.NODE_ENV !== "production" && (Ie.displayName = "SelectRootContext");
var Le = /*#__PURE__*/ Y.createContext(null);
process.env.NODE_ENV !== "production" && (Le.displayName = "SelectFloatingContext");
function Z() {
	let e = Y.useContext(Ie);
	if (e === null) throw Error(process.env.NODE_ENV === "production" ? c(60) : "Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.");
	return e;
}
function Re() {
	let e = Y.useContext(Le);
	if (e === null) throw Error(process.env.NODE_ENV === "production" ? c(61) : "Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.");
	return e;
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/internals/itemEquality.js
var ze = (e, t) => Object.is(e, t);
function Be(e, t, n) {
	return e == null || t == null ? Object.is(e, t) : n(e, t);
}
function Ve(e, t, n) {
	return !e || e.length === 0 ? !1 : e.some((e) => e === void 0 ? !1 : Be(t, e, n));
}
function He(e, t, n) {
	return !e || e.length === 0 ? -1 : e.findIndex((e) => e === void 0 ? !1 : Be(e, t, n));
}
function Ue(e, t, n) {
	return e.filter((e) => !Be(t, e, n));
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/internals/resolveValueLabel.js
function We(e) {
	return e != null && e.length > 0 && typeof e[0] == "object" && e[0] != null && "items" in e[0];
}
function Ge(e) {
	if (!Array.isArray(e)) return e != null && "null" in e;
	let t = e;
	if (We(t)) {
		for (let e of t) for (let t of e.items) if (t && t.value == null && t.label != null) return !0;
		return !1;
	}
	for (let e of t) if (e && e.value == null && e.label != null) return !0;
	return !1;
}
function Ke(e, t) {
	if (t && e != null) return t(e) ?? "";
	if (e && typeof e == "object") {
		if ("label" in e && e.label != null) return String(e.label);
		if ("value" in e) return String(e.value);
	}
	return we(e);
}
function qe(e, t) {
	return t && e != null ? t(e) ?? "" : e && typeof e == "object" && "value" in e && "label" in e ? we(e.value) : we(e);
}
function Je(e, t, n) {
	function r() {
		return Ke(e, n);
	}
	if (n && e != null) return n(e);
	if (e && typeof e == "object" && "label" in e && e.label != null) return e.label;
	if (t && !Array.isArray(t)) return t[e] ?? r();
	if (Array.isArray(t)) {
		let n = t, i = We(n) ? n.flatMap((e) => e.items) : n;
		if (typeof e != "object" || !e) {
			let t = i.find((t) => t.value === e);
			return t && t.label != null ? t.label : r();
		}
		if ("value" in e) {
			let t = i.find((t) => t && t.value === e.value);
			if (t && t.label != null) return t.label;
		}
	}
	return r();
}
function Ye(e, t, n) {
	return e.reduce((e, r, i) => (i > 0 && e.push(", "), e.push(/*#__PURE__*/ X(Y.Fragment, { children: Je(r, t, n) }, i)), e), []);
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/store.js
var Q = {
	id: D((e) => e.id),
	labelId: D((e) => e.labelId),
	modal: D((e) => e.modal),
	multiple: D((e) => e.multiple),
	items: D((e) => e.items),
	itemToStringLabel: D((e) => e.itemToStringLabel),
	itemToStringValue: D((e) => e.itemToStringValue),
	isItemEqualToValue: D((e) => e.isItemEqualToValue),
	value: D((e) => e.value),
	hasSelectedValue: D((e) => {
		let { value: t, multiple: n, itemToStringValue: r } = e;
		return t == null ? !1 : n && Array.isArray(t) ? t.length > 0 : qe(t, r) !== "";
	}),
	hasNullItemLabel: D((e, t) => t ? Ge(e.items) : !1),
	open: D((e) => e.open),
	mounted: D((e) => e.mounted),
	forceMount: D((e) => e.forceMount),
	transitionStatus: D((e) => e.transitionStatus),
	openMethod: D((e) => e.openMethod),
	activeIndex: D((e) => e.activeIndex),
	selectedIndex: D((e) => e.selectedIndex),
	isActive: D((e, t) => e.activeIndex === t),
	isSelected: D((e, t, n) => {
		let r = e.isItemEqualToValue, i = e.value;
		return e.multiple ? Array.isArray(i) && i.some((e) => Be(n, e, r)) : e.selectedIndex === t && e.selectedIndex !== null ? !0 : Be(n, i, r);
	}),
	isSelectedByFocus: D((e, t) => e.selectedIndex === t),
	popupProps: D((e) => e.popupProps),
	triggerProps: D((e) => e.triggerProps),
	triggerElement: D((e) => e.triggerElement),
	positionerElement: D((e) => e.positionerElement),
	listElement: D((e) => e.listElement),
	popupSide: D((e) => e.popupSide),
	scrollUpArrowVisible: D((e) => e.scrollUpArrowVisible),
	scrollDownArrowVisible: D((e) => e.scrollDownArrowVisible),
	hasScrollArrows: D((e) => e.hasScrollArrows)
};
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/root/SelectRoot.js
function Xe(s) {
	let { id: c, value: u, defaultValue: d = null, onValueChange: f, open: p, defaultOpen: m = !1, onOpenChange: h, name: _, form: y, autoComplete: b, disabled: x = !1, readOnly: C = !1, required: w = !1, modal: T = !0, actionsRef: E, inputRef: te, onOpenChangeComplete: D, items: O, multiple: k = !1, itemToStringLabel: j, itemToStringValue: M, isItemEqualToValue: N = ze, highlightItemOnHover: L = !0, children: re } = s, { clearErrors: ie } = xe(), { setDirty: ae, setTouched: oe, setFocused: R, shouldValidateOnChange: z, validityData: ce, setFilled: le, name: de, disabled: W, validation: G, validationMode: fe } = be(), K = Ce({ id: c }), he = W || x, _e = de ?? _, [q, ve] = e({
		controlled: u,
		default: k ? d ?? n : d,
		name: "Select",
		state: "value"
	}), [J, Se] = e({
		controlled: p,
		default: m,
		name: "Select",
		state: "open"
	}), we = Y.useRef([]), Ee = Y.useRef([]), Oe = Y.useRef(null), ke = Y.useRef(null), Ae = Y.useRef(0), Me = Y.useRef(null), Ne = Y.useRef([]), Pe = Y.useRef(!1), Z = Y.useRef(!1), Re = Y.useRef(null), Be = Y.useRef(null), Ve = Y.useRef({
		allowSelectedMouseUp: !1,
		allowUnselectedMouseUp: !1,
		dragY: 0
	}), Ue = Y.useRef(!1), { mounted: We, setMounted: Ge, transitionStatus: Je } = S(J), { openMethod: Ye, triggerProps: Xe } = V(J), $ = r(() => new I({
		id: K,
		labelId: void 0,
		modal: T,
		multiple: k,
		itemToStringLabel: j,
		itemToStringValue: M,
		isItemEqualToValue: N,
		value: q,
		open: J,
		mounted: We,
		transitionStatus: Je,
		items: O,
		forceMount: !1,
		openMethod: null,
		activeIndex: null,
		selectedIndex: null,
		popupProps: {},
		triggerProps: {},
		triggerElement: null,
		positionerElement: null,
		listElement: null,
		popupSide: null,
		scrollUpArrowVisible: !1,
		scrollDownArrowVisible: !1,
		hasScrollArrows: !1
	})).current, Ze = A($, Q.activeIndex), Qe = A($, Q.selectedIndex), $e = A($, Q.triggerElement), et = A($, Q.positionerElement), tt = Fe(Ye), nt = Ye ?? tt, rt = Y.useMemo(() => k && Array.isArray(q) && q.length === 0 ? "" : qe(q, M), [
		k,
		q,
		M
	]), it = Y.useMemo(() => k && Array.isArray(q) ? q.map((e) => qe(e, M)) : qe(q, M), [
		k,
		q,
		M
	]);
	ye(se($.state.triggerElement), K, q, l(() => it));
	let at = Y.useRef(q), ot = k ? Array.isArray(q) && q.length > 0 : q != null;
	t(() => {
		q !== at.current && $.set("forceMount", !0);
	}, [$, q]), t(() => {
		le(ot);
	}, [ot, le]), t(function() {
		let e = Ne.current, t;
		if (k) {
			let n = Array.isArray(q) ? q : [];
			if (n.length === 0) t = null;
			else {
				let r = n[n.length - 1], i = He(e, r, N);
				t = i === -1 ? null : i;
			}
		} else {
			let n = He(e, q, N);
			t = n === -1 ? null : n;
		}
		t === null && (Be.current = null), !J && $.set("selectedIndex", t);
	}, [
		ot,
		k,
		J,
		q,
		Ne,
		N,
		$,
		Be
	]), ge(q, () => {
		ie(_e), ae(q !== ce.initialValue), z() ? G.commit(q) : G.commit(q, !0);
	});
	let st = l((e, t) => {
		if (h?.(e, t), !t.isCanceled && (Se(e), !e && (t.reason === "focus-out" || t.reason === "outside-press") && (oe(!0), R(!1), fe === "onBlur" && G.commit(q)), !e && $.state.activeIndex !== null)) {
			let e = we.current[$.state.activeIndex];
			queueMicrotask(() => {
				e?.setAttribute("tabindex", "-1");
			});
		}
	}), ct = l(() => {
		Ge(!1), $.update({
			activeIndex: null,
			openMethod: null
		}), D?.(!1);
	});
	ee({
		enabled: !E,
		open: J,
		ref: Oe,
		onComplete() {
			J || ct();
		}
	}), Y.useImperativeHandle(E, () => ({ unmount: ct }), [ct]);
	let lt = l((e, t) => {
		f?.(e, t), !t.isCanceled && ve(e);
	}), ut = l(() => {
		let e = $.state.listElement || Oe.current;
		if (!e) return;
		let t = De(e.scrollHeight, e.clientHeight), n = Te(e.scrollTop, t), r = n > 0, i = n < t;
		$.state.scrollUpArrowVisible !== r && $.set("scrollUpArrowVisible", r), $.state.scrollDownArrowVisible !== i && $.set("scrollDownArrowVisible", i);
	}), dt = ue({
		open: J,
		onOpenChange: st,
		elements: {
			reference: $e,
			floating: et
		}
	}), ft = B(dt, {
		enabled: !C && !he,
		event: "mousedown"
	}), pt = F(dt), mt = me(dt, {
		enabled: !C && !he,
		listRef: we,
		activeIndex: Ze,
		selectedIndex: Qe,
		disabledIndices: n,
		onNavigate(e) {
			e === null && !J || $.set("activeIndex", e);
		},
		focusItemOnHover: L
	}), ht = pe(dt, {
		enabled: !C && !he && (J || !k),
		listRef: Ee,
		activeIndex: Ze,
		selectedIndex: Qe,
		onMatch(e) {
			J ? $.set("activeIndex", e) : lt(Ne.current[e], v("none"));
		},
		onTyping(e) {
			Pe.current = e;
		}
	}), gt = Y.useMemo(() => {
		let e = o(ht.reference, mt.reference, pt.reference, ft.reference, Xe);
		return K && (e.id = K), e;
	}, [
		ft.reference,
		ht.reference,
		mt.reference,
		pt.reference,
		Xe,
		K
	]), _t = Y.useMemo(() => o(P, ht.floating, mt.floating, pt.floating), [
		ht.floating,
		mt.floating,
		pt.floating
	]), vt = mt.item ?? a;
	ne(() => {
		$.update({
			popupProps: _t,
			triggerProps: gt
		});
	}), t(() => {
		$.update({
			id: K,
			modal: T,
			multiple: k,
			value: q,
			open: J,
			mounted: We,
			transitionStatus: Je,
			popupProps: _t,
			triggerProps: gt,
			items: O,
			itemToStringLabel: j,
			itemToStringValue: M,
			isItemEqualToValue: N,
			openMethod: nt
		});
	}, [
		$,
		K,
		T,
		k,
		q,
		J,
		We,
		Je,
		_t,
		gt,
		O,
		j,
		M,
		N,
		nt
	]);
	let yt = Y.useMemo(() => ({
		store: $,
		name: _e,
		required: w,
		disabled: he,
		readOnly: C,
		multiple: k,
		highlightItemOnHover: L,
		setValue: lt,
		setOpen: st,
		listRef: we,
		popupRef: Oe,
		scrollHandlerRef: ke,
		handleScrollArrowVisibility: ut,
		scrollArrowsMountedCountRef: Ae,
		itemProps: vt,
		events: dt.context.events,
		valueRef: Me,
		valuesRef: Ne,
		labelsRef: Ee,
		typingRef: Pe,
		selectionRef: Ve,
		firstItemTextRef: Re,
		selectedItemTextRef: Be,
		validation: G,
		onOpenChangeComplete: D,
		keyboardActiveRef: Z,
		alignItemWithTriggerActiveRef: Ue,
		initialValueRef: at
	}), [
		$,
		_e,
		w,
		he,
		C,
		k,
		L,
		lt,
		st,
		vt,
		dt.context.events,
		G,
		D,
		ut
	]), bt = i(te, G.inputRef), xt = k && Array.isArray(q) && q.length > 0, St = k ? void 0 : _e, Ct = Y.useMemo(() => !k || !Array.isArray(q) || !_e ? null : q.map((e) => {
		let t = qe(e, M);
		return /*#__PURE__*/ X("input", {
			type: "hidden",
			form: y,
			name: _e,
			value: t
		}, t);
	}), [
		k,
		q,
		y,
		_e,
		M
	]);
	return /*#__PURE__*/ X(Ie.Provider, {
		value: yt,
		children: /*#__PURE__*/ je(Le.Provider, {
			value: dt,
			children: [
				re,
				/*#__PURE__*/ X("input", {
					...G.getInputValidationProps({
						onFocus() {
							$.state.triggerElement?.focus({ focusVisible: !0 });
						},
						onChange(e) {
							if (e.nativeEvent.defaultPrevented || he || C) {
								e.preventBaseUIHandler?.();
								return;
							}
							let t = e.currentTarget.value, n = v(g, e.nativeEvent);
							function r() {
								if (k) return;
								let e = Ne.current.find((e) => qe(e, M).toLowerCase() === t.toLowerCase() || Ke(e, j).toLowerCase() === t.toLowerCase());
								e != null && (ae(e !== ce.initialValue), lt(e, n), z() && G.commit(e));
							}
							$.set("forceMount", !0), queueMicrotask(r);
						}
					}),
					id: K && St == null ? `${K}-hidden-input` : void 0,
					form: y,
					name: St,
					autoComplete: b,
					value: rt,
					disabled: he,
					required: w && !xt,
					readOnly: C,
					ref: bt,
					style: _e ? H : U,
					tabIndex: -1,
					"aria-hidden": !0,
					suppressHydrationWarning: !0
				}),
				Ct
			]
		})
	});
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/trigger/SelectTrigger.js
var $ = 2, Ze = 400, Qe = {
	...j,
	...ve,
	popupSide: (e) => e ? { "data-popup-side": e } : null,
	value: () => null
}, $e = /*#__PURE__*/ Y.forwardRef(function(e, t) {
	let { render: n, className: r, id: a, disabled: c = !1, nativeButton: u = !0, style: d, ...f } = e, { setTouched: p, setFocused: m, validationMode: h, state: y, disabled: b } = be(), { labelId: x } = J(), { store: S, setOpen: ee, selectionRef: C, validation: T, readOnly: D, required: O, alignItemWithTriggerActiveRef: ne, disabled: k, keyboardActiveRef: j } = Z(), M = b || k || c, N = A(S, Q.open), P = A(S, Q.mounted), F = A(S, Q.value), I = A(S, Q.triggerProps), L = A(S, Q.positionerElement), re = A(S, Q.listElement), ae = A(S, Q.popupSide), oe = A(S, Q.id), R = A(S, Q.labelId), ce = A(S, Q.hasSelectedValue), B = P && L ? ae : null, le = a ?? oe, V = Ae(x, R);
	Ce({ id: le });
	let H = se(L), U = Y.useRef(null), { getButtonProps: ue, buttonRef: de } = w({
		disabled: M,
		native: u
	}), W = i(t, U, de, l((e) => {
		S.set("triggerElement", e);
	})), G = z(), fe = z(), pe = z();
	Y.useEffect(() => {
		if (N) return pe.start(Ze, () => {
			C.current.allowUnselectedMouseUp = !0, C.current.allowSelectedMouseUp = !0;
		}), () => {
			pe.clear();
		};
		C.current = {
			allowSelectedMouseUp: !1,
			allowUnselectedMouseUp: !1,
			dragY: 0
		}, fe.clear();
	}, [
		N,
		C,
		fe,
		pe
	]);
	let me = o(I, {
		id: le,
		role: "combobox",
		"aria-expanded": N ? "true" : "false",
		"aria-haspopup": "listbox",
		"aria-controls": N ? re?.id ?? te(L)?.id : void 0,
		"aria-labelledby": V,
		"aria-readonly": D || void 0,
		"aria-required": O || void 0,
		tabIndex: M ? -1 : 0,
		ref: W,
		onFocus(e) {
			m(!0), N && ne.current && ee(!1, v(g, e.nativeEvent)), G.start(0, () => {
				S.set("forceMount", !0);
			});
		},
		onBlur(e) {
			E(L, e.relatedTarget) || (p(!0), m(!1), h === "onBlur" && T.commit(F));
		},
		onPointerMove() {
			j.current = !1;
		},
		onKeyDown() {
			j.current = !0;
		},
		onMouseDown(e) {
			if (N) return;
			let t = ie(e.currentTarget);
			function n(e) {
				if (!U.current) return;
				let t = e.target;
				if (E(U.current, t) || E(H.current, t) || t === U.current) return;
				let n = K(U.current);
				e.clientX >= n.left - $ && e.clientX <= n.right + $ && e.clientY >= n.top - $ && e.clientY <= n.bottom + $ || ee(!1, v(_, e));
			}
			fe.start(0, () => {
				t.addEventListener("mouseup", n, { once: !0 });
			});
		}
	}, T.getValidationProps, f, ue);
	me.role = "combobox";
	let he = {
		...y,
		open: N,
		disabled: M,
		value: F,
		readOnly: D,
		popupSide: B,
		placeholder: !ce
	};
	return s("button", e, {
		ref: [t, U],
		state: he,
		stateAttributesMapping: Qe,
		props: me
	});
});
process.env.NODE_ENV !== "production" && ($e.displayName = "SelectTrigger");
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/value/SelectValue.js
var et = { value: () => null }, tt = /*#__PURE__*/ Y.forwardRef(function(e, t) {
	let { className: n, render: r, children: i, placeholder: a, style: o, ...c } = e, { store: l, valueRef: u } = Z(), d = A(l, Q.value), f = A(l, Q.items), p = A(l, Q.itemToStringLabel), m = A(l, Q.hasSelectedValue), h = !m && a != null && i == null, g = A(l, Q.hasNullItemLabel, h), _ = {
		value: d,
		placeholder: !m
	}, v = null;
	return v = typeof i == "function" ? i(d) : i ?? (!m && a != null && !g ? a : Array.isArray(d) ? Ye(d, f, p) : Je(d, f, p)), s("span", e, {
		state: _,
		ref: [t, u],
		props: [{ children: v }, c],
		stateAttributesMapping: et
	});
});
process.env.NODE_ENV !== "production" && (tt.displayName = "SelectValue");
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/icon/SelectIcon.js
var nt = /*#__PURE__*/ Y.forwardRef(function(e, t) {
	let { render: n, className: r, style: i, ...a } = e, { store: o } = Z();
	return s("span", e, {
		state: { open: A(o, Q.open) },
		ref: t,
		props: [{
			"aria-hidden": !0,
			children: "▼"
		}, a],
		stateAttributesMapping: k
	});
});
process.env.NODE_ENV !== "production" && (nt.displayName = "SelectIcon");
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/portal/SelectPortalContext.js
var rt = /*#__PURE__*/ Y.createContext(void 0);
process.env.NODE_ENV !== "production" && (rt.displayName = "SelectPortalContext");
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/portal/SelectPortal.js
var it = /*#__PURE__*/ Y.forwardRef(function(e, t) {
	let { store: n } = Z(), r = A(n, Q.mounted), i = A(n, Q.forceMount);
	return r || i ? /*#__PURE__*/ X(rt.Provider, {
		value: !0,
		children: /*#__PURE__*/ X(M, {
			ref: t,
			...e
		})
	}) : null;
});
process.env.NODE_ENV !== "production" && (it.displayName = "SelectPortal");
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/positioner/SelectPositionerContext.js
var at = /*#__PURE__*/ Y.createContext(void 0);
process.env.NODE_ENV !== "production" && (at.displayName = "SelectPositionerContext");
function ot() {
	let e = Y.useContext(at);
	if (!e) throw Error(process.env.NODE_ENV === "production" ? c(59) : "Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.");
	return e;
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/popup/utils.js
function st(e, t) {
	e && Object.assign(e.style, t);
}
var ct = {
	position: "relative",
	maxHeight: "100%",
	overflowX: "hidden",
	overflowY: "auto"
}, lt = { position: "fixed" }, ut = /*#__PURE__*/ Y.forwardRef(function(e, n) {
	let { anchor: r, positionMethod: i = "absolute", className: a, render: o, side: s = "bottom", align: c = "center", sideOffset: u = 0, alignOffset: d = 0, collisionBoundary: p = "clipping-ancestors", collisionPadding: m, arrowPadding: h = 5, sticky: _ = !1, disableAnchorTracking: y, alignItemWithTrigger: b = !0, collisionAvoidance: x = O, style: S, ...ee } = e, { store: C, listRef: w, labelsRef: T, alignItemWithTriggerActiveRef: E, selectedItemTextRef: te, valuesRef: D, initialValueRef: ne, popupRef: k, setValue: j } = Z(), M = Re(), N = A(C, Q.open), P = A(C, Q.mounted), F = A(C, Q.modal), I = A(C, Q.value), L = A(C, Q.openMethod), re = A(C, Q.positionerElement), ie = A(C, Q.triggerElement), ae = A(C, Q.isItemEqualToValue), oe = A(C, Q.transitionStatus), se = Y.useRef(null), R = Y.useRef(null), [z, ce] = Y.useState(b), B = P && z && L !== "touch";
	!P && z !== b && ce(b), t(() => {
		P || (Q.scrollUpArrowVisible(C.state) && C.set("scrollUpArrowVisible", !1), Q.scrollDownArrowVisible(C.state) && C.set("scrollDownArrowVisible", !1));
	}, [C, P]), Y.useImperativeHandle(E, () => B), _e((B || F) && N, L === "touch", re, ie);
	let V = G({
		anchor: r,
		floatingRootContext: M,
		positionMethod: i,
		mounted: P,
		side: s,
		sideOffset: u,
		align: c,
		alignOffset: d,
		arrowPadding: h,
		collisionBoundary: p,
		collisionPadding: m,
		sticky: _,
		disableAnchorTracking: y ?? B,
		collisionAvoidance: x,
		keepMounted: !0
	}), H = B ? "none" : V.side, U = B ? lt : V.positionerStyles, ue = {
		open: N,
		side: H,
		align: V.align,
		anchorHidden: V.anchorHidden
	};
	t(() => {
		C.set("popupSide", V.side);
	}, [C, V.side]);
	let de = fe(e, ue, {
		styles: U,
		transitionStatus: oe,
		props: ee,
		refs: [n, l((e) => {
			C.set("positionerElement", e);
		})],
		hidden: !P,
		inert: !N
	}), W = Y.useRef(0), pe = l((e) => {
		if (e.size === 0 && W.current === 0 || D.current.length === 0) return;
		let t = W.current;
		if (W.current = e.size, e.size === t) return;
		let n = v(g);
		if (t !== 0 && !C.state.multiple && I !== null && He(D.current, I, ae) === -1) {
			let e = ne.current, t = e != null && He(D.current, e, ae) !== -1 ? e : null;
			j(t, n), t === null && (C.set("selectedIndex", null), te.current = null);
		}
		if (t !== 0 && C.state.multiple && Array.isArray(I)) {
			let e = (e) => He(D.current, e, ae) !== -1, t = I.filter((t) => e(t));
			(t.length !== I.length || t.some((e) => !Ve(I, e, ae))) && (j(t, n), t.length === 0 && (C.set("selectedIndex", null), te.current = null));
		}
		if (N && B) {
			C.update({
				scrollUpArrowVisible: !1,
				scrollDownArrowVisible: !1
			});
			let e = { height: "" };
			st(re, e), st(k.current, e);
		}
	}), me = Y.useMemo(() => ({
		...V,
		side: H,
		alignItemWithTriggerActive: B,
		setControlledAlignItemWithTrigger: ce,
		scrollUpArrowRef: se,
		scrollDownArrowRef: R
	}), [
		V,
		H,
		B,
		ce
	]);
	return /*#__PURE__*/ X(f, {
		elementsRef: w,
		labelsRef: T,
		onMapChange: pe,
		children: /*#__PURE__*/ je(at.Provider, {
			value: me,
			children: [P && F && /*#__PURE__*/ X(le, {
				inert: he(!N),
				cutout: ie
			}), de]
		})
	});
});
process.env.NODE_ENV !== "production" && (ut.displayName = "SelectPositioner");
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/popup/SelectPopup.js
var dt = {
	...N,
	...x
}, ft = /*#__PURE__*/ Y.forwardRef(function(e, n) {
	let { render: r, className: i, style: a, finalFocus: o, ...c } = e, { store: u, popupRef: d, onOpenChangeComplete: f, setOpen: h, valueRef: g, firstItemTextRef: _, selectedItemTextRef: y, keyboardActiveRef: x, multiple: S, handleScrollArrowVisibility: w, scrollHandlerRef: E, listRef: te, highlightItemOnHover: D } = Z(), { side: O, align: ne, alignItemWithTriggerActive: k, isPositioned: j, setControlledAlignItemWithTrigger: M, scrollDownArrowRef: N, scrollUpArrowRef: P } = ot(), F = q(!0) != null, I = Re(), L = p(), { nonce: re, disableStyleElements: se } = Oe(), R = A(u, Q.id), z = A(u, Q.open), B = A(u, Q.mounted), le = A(u, Q.popupProps), V = A(u, Q.transitionStatus), H = A(u, Q.triggerElement), U = A(u, Q.positionerElement), ue = A(u, Q.listElement), W = Y.useRef(!1), G = Y.useRef(!1), fe = Y.useRef({}), pe = b(), me = l((e) => {
		if (!U || !d.current || !G.current) return;
		if (W.current || !k) {
			w();
			return;
		}
		let t = U.style.top === "0px", n = U.style.bottom === "0px";
		if (!t && !n) {
			w();
			return;
		}
		let r = ht(U), i = gt(U.getBoundingClientRect().height, "y", r), a = ie(U), o = getComputedStyle(U), s = parseFloat(o.marginTop), c = parseFloat(o.marginBottom), l = pt(getComputedStyle(d.current)), u = Math.min(a.documentElement.clientHeight - s - c, l), f = e.scrollTop, p = mt(e), m = 0, h = null, g = !1, _ = !1, v = (e) => {
			U.style.height = `${e}px`;
		}, y = (t, n) => {
			let r = ke(t, 0, u - i);
			r > 0 && v(i + r), e.scrollTop = n, u - (i + r) <= 1 && (W.current = !0), w();
		}, b = t ? p - f : f, x = Math.min(i + b, u);
		if (m = x, b <= 1) {
			y(b, t ? p : 0);
			return;
		}
		if (u - x > 1 ? t ? _ = !0 : h = 0 : (g = !0, n && f < p && (h = f - (b - (i + b - u)))), m = Math.ceil(m), m !== 0 && v(m), _ || h != null) {
			let t = mt(e), n = _ ? t : ke(h, 0, t);
			Math.abs(e.scrollTop - n) > 1 && (e.scrollTop = n);
		}
		(g || m >= u - 1) && (W.current = !0), w();
	});
	Y.useImperativeHandle(E, () => me, [me]), ee({
		open: z,
		ref: d,
		onComplete() {
			z && f?.(!0);
		}
	});
	let K = {
		open: z,
		transitionStatus: V,
		side: O,
		align: ne
	};
	t(() => {
		!U || !d.current || Object.keys(fe.current).length || (fe.current = {
			top: U.style.top || "0",
			left: U.style.left || "0",
			right: U.style.right,
			height: U.style.height,
			bottom: U.style.bottom,
			minHeight: U.style.minHeight,
			maxHeight: U.style.maxHeight,
			marginTop: U.style.marginTop,
			marginBottom: U.style.marginBottom
		});
	}, [d, U]), t(() => {
		z || k || (G.current = !1, W.current = !1, st(U, fe.current));
	}, [
		z,
		k,
		U,
		d
	]), t(() => {
		let e = d.current;
		if (!z || !H || !U || !e || k && !j || u.state.transitionStatus === "ending") return;
		if (!k) {
			G.current = !0, pe.request(w), e.style.removeProperty("--transform-origin");
			return;
		}
		let t = yt(e);
		e.style.removeProperty("--transform-origin");
		try {
			let t = y.current;
			t?.isConnected || (t = !Q.hasSelectedValue(u.state) && _.current?.isConnected ? _.current : null);
			let n = g.current, r = getComputedStyle(U), i = getComputedStyle(e), a = ie(H), o = C(U), s = ht(H), c = _t(H.getBoundingClientRect(), s), l = _t(U.getBoundingClientRect(), s), d = c.height, f = ue || e, p = f.scrollHeight, m = parseFloat(i.borderBottomWidth), h = parseFloat(r.marginTop) || 10, v = parseFloat(r.marginBottom) || 10, b = parseFloat(r.minHeight) || 100, x = pt(i), S = a.documentElement.clientHeight - h - v, ee = a.documentElement.clientWidth, E = S - c.bottom + d, O, ne = L === "rtl" ? c.right - l.width : c.left, k = 0;
			if (t && n) {
				let e = _t(n.getBoundingClientRect(), s);
				O = _t(t.getBoundingClientRect(), s), ne = l.left + (L === "rtl" ? e.right - O.right : e.left - O.left);
				let r = e.top - c.top + e.height / 2;
				k = O.top - l.top + O.height / 2 - r;
			}
			let A = E + k + v + m, j = Math.min(S, A), N = S - h - v, P = A - j, F = ee - 5;
			U.style.left = `${ke(ne, 5, F - l.width)}px`, U.style.height = `${j}px`, U.style.maxHeight = "auto", U.style.marginTop = `${h}px`, U.style.marginBottom = `${v}px`, e.style.height = "100%";
			let I = mt(f), re = P >= I - 1;
			re && (j = Math.min(S, l.height) - (P - I));
			let ae = c.top < 20 || c.bottom > S - 20 || Math.ceil(j) + 1 < Math.min(p, b), oe = (o.visualViewport?.scale ?? 1) !== 1 && T;
			if (ae || oe) {
				G.current = !0, st(U, fe.current), M(!1);
				return;
			}
			let se = Math.max(b, j);
			if (re) {
				let e = Math.max(0, S - A);
				U.style.top = l.height >= N ? "0" : `${e}px`, U.style.height = `${j}px`, f.scrollTop = mt(f);
			} else U.style.bottom = "0", f.scrollTop = P;
			if (O) {
				let t = l.top, n = l.height, r = O.top + O.height / 2, i = ke(n > 0 ? (r - t) / n * 100 : 50, 0, 100);
				e.style.setProperty("--transform-origin", `50% ${i}%`);
			}
			(se === S || j >= x) && (W.current = !0), w(), D && u.state.selectedIndex === null && u.state.activeIndex === null && te.current[0] != null && u.set("activeIndex", 0), G.current = !0;
		} finally {
			t();
		}
	}, [
		u,
		z,
		U,
		H,
		g,
		_,
		y,
		d,
		w,
		k,
		M,
		pe,
		N,
		P,
		ue,
		te,
		D,
		L,
		j
	]), Y.useEffect(() => {
		if (!k || !U || !z) return;
		let e = C(U);
		function t(e) {
			h(!1, v(m, e));
		}
		return oe(e, "resize", t);
	}, [
		h,
		k,
		U,
		z
	]);
	let he = {
		...ue ? {
			role: "presentation",
			"aria-orientation": void 0
		} : {
			role: "listbox",
			"aria-multiselectable": S || void 0,
			id: `${R}-list`
		},
		onKeyDown(e) {
			x.current = !0, F && ae.has(e.key) && e.stopPropagation();
		},
		onMouseMove() {
			x.current = !1;
		},
		onScroll(e) {
			ue || me(e.currentTarget);
		},
		...k && { style: ue ? { height: "100%" } : ct }
	}, ge = s("div", e, {
		ref: [n, d],
		state: K,
		stateAttributesMapping: dt,
		props: [
			le,
			he,
			de(V),
			{ className: !ue && k ? Ee.className : void 0 },
			c
		]
	});
	return /*#__PURE__*/ je(Y.Fragment, { children: [!se && Ee.getElement(re), /*#__PURE__*/ X(ce, {
		context: I,
		modal: !1,
		disabled: !B,
		returnFocus: o,
		restoreFocus: !0,
		children: ge
	})] });
});
process.env.NODE_ENV !== "production" && (ft.displayName = "SelectPopup");
function pt(e) {
	let t = e.maxHeight || "";
	return t.endsWith("px") && parseFloat(t) || Infinity;
}
function mt(e) {
	return De(e.scrollHeight, e.clientHeight);
}
function ht(e) {
	return W.getScale(e);
}
function gt(e, t, n) {
	return e / n[t];
}
function _t(e, t) {
	return re({
		x: gt(e.x, "x", t),
		y: gt(e.y, "y", t),
		width: gt(e.width, "x", t),
		height: gt(e.height, "y", t)
	});
}
var vt = [
	["transform", "none"],
	["scale", "1"],
	["translate", "0 0"]
];
function yt(e) {
	let { style: t } = e, n = {};
	for (let [e, r] of vt) n[e] = t.getPropertyValue(e), t.setProperty(e, r, "important");
	return () => {
		for (let [e] of vt) {
			let r = n[e];
			r ? t.setProperty(e, r) : t.removeProperty(e);
		}
	};
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/list/SelectList.js
var bt = /*#__PURE__*/ Y.forwardRef(function(e, t) {
	let { render: n, className: r, style: i, ...a } = e, { store: o, scrollHandlerRef: c } = Z(), { alignItemWithTriggerActive: u } = ot(), d = A(o, Q.hasScrollArrows), f = A(o, Q.openMethod), p = A(o, Q.multiple), m = {
		id: `${A(o, Q.id)}-list`,
		role: "listbox",
		"aria-multiselectable": p || void 0,
		onScroll(e) {
			c.current?.(e.currentTarget);
		},
		...u && { style: ct },
		className: d && f !== "touch" ? Ee.className : void 0
	};
	return s("div", e, {
		ref: [t, l((e) => {
			o.set("listElement", e);
		})],
		props: [m, a]
	});
});
process.env.NODE_ENV !== "production" && (bt.displayName = "SelectList");
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/item/SelectItemContext.js
var xt = /*#__PURE__*/ Y.createContext(void 0);
process.env.NODE_ENV !== "production" && (xt.displayName = "SelectItemContext");
function St() {
	let e = Y.useContext(xt);
	if (!e) throw Error(process.env.NODE_ENV === "production" ? c(57) : "Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.");
	return e;
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/item/SelectItem.js
var Ct = /*#__PURE__*/ Y.memo(/*#__PURE__*/ Y.forwardRef(function(e, n) {
	let { render: r, className: i, style: a, value: o = null, label: c, disabled: l = !1, nativeButton: f = !1, ...p } = e, m = Y.useRef(null), g = u({
		label: c,
		textRef: m,
		indexGuessBehavior: d.GuessFromOrder
	}), { store: _, itemProps: y, setOpen: b, setValue: x, selectionRef: S, typingRef: ee, valuesRef: C, multiple: T, selectedItemTextRef: E } = Z(), te = A(_, Q.isActive, g.index), D = A(_, Q.isSelected, g.index, o), O = A(_, Q.isSelectedByFocus, g.index), ne = A(_, Q.isItemEqualToValue), k = g.index, j = k !== -1, M = Y.useRef(null);
	t(() => {
		if (!j) return;
		let e = C.current;
		return e[k] = o, () => {
			delete e[k];
		};
	}, [
		j,
		k,
		o,
		C
	]), t(() => {
		if (!j) return;
		let e = _.state.value, t = e;
		T && Array.isArray(e) && e.length > 0 && (t = e[e.length - 1]), t !== void 0 && Be(o, t, ne) && (_.set("selectedIndex", k), m.current && (E.current = m.current));
	}, [
		j,
		k,
		T,
		ne,
		_,
		o,
		E
	]);
	let N = Y.useRef(null), P = Y.useRef("mouse"), F = Y.useRef(!1), { getButtonProps: I, buttonRef: re } = w({
		disabled: l,
		focusableWhenDisabled: !0,
		native: f,
		composite: !0
	}), ie = {
		disabled: l,
		selected: D,
		highlighted: te
	};
	function ae(e) {
		let t = _.state.value;
		if (T) {
			let n = Array.isArray(t) ? t : [];
			x(D ? Ue(n, o, ne) : [...n, o], v(h, e));
		} else x(o, v(h, e)), b(!1, v(h, e));
	}
	function oe() {
		S.current.dragY = 0;
	}
	let se = {
		role: "option",
		"aria-selected": D,
		tabIndex: te ? 0 : -1,
		onKeyDown(e) {
			N.current = e.key, _.set("activeIndex", k), e.key === " " && ee.current && e.preventDefault();
		},
		onClick(e) {
			let t = e.type === "click" && P.current !== "touch", n = e.nativeEvent.pointerType, r = t && L(e.nativeEvent) && (n !== void 0 || te), i = t && !r && !F.current;
			F.current = !1, !(e.type === "keydown" && N.current === null) && (l || e.type === "keydown" && N.current === " " && ee.current || i || (N.current = null, ae(e.nativeEvent)));
		},
		onPointerEnter(e) {
			P.current = e.pointerType;
		},
		onPointerMove(e) {
			if (e.pointerType === "mouse" && e.buttons === 1) {
				let t = S.current;
				t.dragY += e.movementY, t.dragY ** 2 >= 64 && (t.allowUnselectedMouseUp = !0);
			}
		},
		onPointerDown(e) {
			P.current = e.pointerType, F.current = !0, oe();
		},
		onMouseUp() {
			if (oe(), l || P.current === "touch" || F.current) return;
			let e = !S.current.allowSelectedMouseUp && D, t = !S.current.allowUnselectedMouseUp && !D;
			e || t || (F.current = !0, M.current?.click(), F.current = !1);
		}
	}, R = s("div", e, {
		ref: [
			re,
			n,
			g.ref,
			M
		],
		state: ie,
		props: [
			y,
			se,
			p,
			I
		]
	}), z = Y.useMemo(() => ({
		selected: D,
		index: k,
		textRef: m,
		selectedByFocus: O,
		hasRegistered: j
	}), [
		D,
		k,
		m,
		O,
		j
	]);
	return /*#__PURE__*/ X(xt.Provider, {
		value: z,
		children: R
	});
}));
process.env.NODE_ENV !== "production" && (Ct.displayName = "SelectItem");
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/item-indicator/SelectItemIndicator.js
var wt = /*#__PURE__*/ Y.forwardRef(function(e, t) {
	let n = e.keepMounted ?? !1, { selected: r } = St();
	return n || r ? /*#__PURE__*/ X(Tt, {
		...e,
		ref: t
	}) : null;
});
process.env.NODE_ENV !== "production" && (wt.displayName = "SelectItemIndicator");
var Tt = /*#__PURE__*/ Y.memo(/*#__PURE__*/ Y.forwardRef((e, t) => {
	let { render: n, className: r, style: i, keepMounted: a, ...o } = e, { selected: c } = St(), l = Y.useRef(null), { transitionStatus: u, setMounted: d } = S(c), f = s("span", e, {
		ref: [t, l],
		state: {
			selected: c,
			transitionStatus: u
		},
		props: [{
			"aria-hidden": !0,
			children: "✔️"
		}, o],
		stateAttributesMapping: x
	});
	return ee({
		open: c,
		ref: l,
		onComplete() {
			c || d(!1);
		}
	}), f;
}));
process.env.NODE_ENV !== "production" && (Tt.displayName = "Inner");
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/item-text/SelectItemText.js
var Et = /*#__PURE__*/ Y.memo(/*#__PURE__*/ Y.forwardRef(function(e, t) {
	let { index: n, textRef: r, selectedByFocus: i, hasRegistered: a } = St(), { firstItemTextRef: o, selectedItemTextRef: c } = Z(), { render: l, className: u, style: d, ...f } = e;
	return s("div", e, {
		ref: [
			Y.useCallback((e) => {
				e && (a && n === 0 && (o.current = e), a && i && (c.current = e));
			}, [
				o,
				c,
				n,
				i,
				a
			]),
			t,
			r
		],
		props: f
	});
}));
process.env.NODE_ENV !== "production" && (Et.displayName = "SelectItemText");
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/scroll-arrow/SelectScrollArrow.js
var Dt = /*#__PURE__*/ Y.forwardRef(function(e, n) {
	let { render: r, className: i, style: a, direction: o, keepMounted: c = !1, ...l } = e, u = o === "up", { store: d, popupRef: f, listRef: p, handleScrollArrowVisibility: m, scrollArrowsMountedCountRef: h } = Z(), { side: g, scrollDownArrowRef: _, scrollUpArrowRef: v } = ot(), y = A(d, u ? Q.scrollUpArrowVisible : Q.scrollDownArrowVisible), b = A(d, Q.openMethod), x = y && b !== "touch", C = z(), w = u ? v : _, { transitionStatus: T, setMounted: E } = S(x);
	t(() => (h.current += 1, d.state.hasScrollArrows || d.set("hasScrollArrows", !0), () => {
		h.current = Math.max(0, h.current - 1), h.current === 0 && d.state.hasScrollArrows && d.set("hasScrollArrows", !1);
	}), [d, h]), ee({
		open: x,
		ref: w,
		onComplete() {
			x || E(!1);
		}
	});
	let te = s("div", e, {
		ref: [n, w],
		state: {
			direction: o,
			visible: x,
			side: g,
			transitionStatus: T
		},
		props: [{
			"aria-hidden": !0,
			children: u ? "▲" : "▼",
			style: { position: "absolute" },
			onMouseMove(e) {
				if (e.movementX === 0 && e.movementY === 0 || C.isStarted()) return;
				d.set("activeIndex", null);
				function t() {
					let e = d.state.listElement ?? f.current;
					if (!e) return;
					d.set("activeIndex", null), m();
					let n = De(e.scrollHeight, e.clientHeight), r = Te(e.scrollTop, n), i = r === (u ? 0 : n), a = p.current;
					if (r !== e.scrollTop && (e.scrollTop = r), a.length === 0 && d.set(u ? "scrollUpArrowVisible" : "scrollDownArrowVisible", !i), i) {
						C.clear();
						return;
					}
					if (a.length > 0) {
						let t = w.current?.offsetHeight || 0;
						e.scrollTop = Ot(a, u, r, e.clientHeight, t, n);
					}
					C.start(40, t);
				}
				C.start(40, t);
			},
			onMouseLeave() {
				C.clear();
			}
		}, l]
	});
	return x || c ? te : null;
});
process.env.NODE_ENV !== "production" && (Dt.displayName = "SelectScrollArrow");
function Ot(e, t, n, r, i, a) {
	if (t) {
		let t = 0, r = n + i - 1;
		for (let n = 0; n < e.length; n += 1) {
			let i = e[n];
			if (i && i.offsetTop >= r) {
				t = n;
				break;
			}
		}
		let o = Math.max(0, t - 1), s = e[o];
		return o < t && s ? Te(s.offsetTop - i, a) : 0;
	}
	let o = e.length - 1, s = n + r - i + 1;
	for (let t = 0; t < e.length; t += 1) {
		let n = e[t];
		if (n && n.offsetTop + n.offsetHeight > s) {
			o = Math.max(0, t - 1);
			break;
		}
	}
	let c = Math.min(e.length - 1, o + 1), l = e[c];
	return c > o && l ? Te(l.offsetTop + l.offsetHeight - r + i, a) : a;
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/scroll-down-arrow/SelectScrollDownArrow.js
var kt = /*#__PURE__*/ Y.forwardRef(function(e, t) {
	return /*#__PURE__*/ X(Dt, {
		...e,
		ref: t,
		direction: "down"
	});
});
process.env.NODE_ENV !== "production" && (kt.displayName = "SelectScrollDownArrow");
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/scroll-up-arrow/SelectScrollUpArrow.js
var At = /*#__PURE__*/ Y.forwardRef(function(e, t) {
	return /*#__PURE__*/ X(Dt, {
		...e,
		ref: t,
		direction: "up"
	});
});
process.env.NODE_ENV !== "production" && (At.displayName = "SelectScrollUpArrow");
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/group/SelectGroupContext.js
var jt = /*#__PURE__*/ Y.createContext(void 0);
process.env.NODE_ENV !== "production" && (jt.displayName = "SelectGroupContext");
function Mt() {
	let e = Y.useContext(jt);
	if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? c(56) : "Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>.");
	return e;
}
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/group/SelectGroup.js
var Nt = /*#__PURE__*/ Y.forwardRef(function(e, t) {
	let { render: n, className: r, style: i, ...a } = e, [o, c] = Y.useState(), l = Y.useMemo(() => ({
		labelId: o,
		setLabelId: c
	}), [o, c]), u = s("div", e, {
		ref: t,
		props: [{
			role: "group",
			"aria-labelledby": o
		}, a]
	});
	return /*#__PURE__*/ X(jt.Provider, {
		value: l,
		children: u
	});
});
process.env.NODE_ENV !== "production" && (Nt.displayName = "SelectGroup");
//#endregion
//#region ../../node_modules/.bun/@base-ui+react@1.5.0+f4ada88178b00e6f/node_modules/@base-ui/react/esm/select/group-label/SelectGroupLabel.js
var Pt = /*#__PURE__*/ Y.forwardRef(function(e, n) {
	let { render: r, className: i, style: a, id: o, ...c } = e, { setLabelId: l } = Mt(), u = y(o);
	return t(() => {
		l(u);
	}, [u, l]), s("div", e, {
		ref: n,
		props: [{ id: u }, c]
	});
});
process.env.NODE_ENV !== "production" && (Pt.displayName = "SelectGroupLabel");
//#endregion
//#region lib/components/ui/atoms/select.tsx
var Ft = Xe;
function It({ className: e, ...t }) {
	return /* @__PURE__ */ X(Nt, {
		className: R("scroll-my-1 p-1", e),
		"data-slot": "select-group",
		...t
	});
}
function Lt({ className: e, ...t }) {
	return /* @__PURE__ */ X(tt, {
		className: R("flex flex-1 text-left", e),
		"data-slot": "select-value",
		...t
	});
}
function Rt({ className: e, size: t = "default", children: n, ...r }) {
	return /* @__PURE__ */ je($e, {
		className: R("flex w-fit items-center justify-between gap-1.5 whitespace-nowrap rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm shadow-xs outline-none transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-9 data-[size=sm]:h-8 data-placeholder:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", e),
		"data-size": t,
		"data-slot": "select-trigger",
		...r,
		children: [n, /* @__PURE__ */ X(nt, { render: /* @__PURE__ */ X(Ne, { className: "pointer-events-none size-4 text-muted-foreground" }) })]
	});
}
function zt({ className: e, children: t, side: n = "bottom", sideOffset: r = 4, align: i = "center", alignOffset: a = 0, alignItemWithTrigger: o = !1, ...s }) {
	return /* @__PURE__ */ X(it, { children: /* @__PURE__ */ X(ut, {
		align: i,
		alignItemWithTrigger: o,
		alignOffset: a,
		className: "isolate z-50",
		side: n,
		sideOffset: r,
		children: /* @__PURE__ */ je(ft, {
			className: R("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-open:fade-in-0 data-open:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-95 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-y-auto overflow-x-hidden rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-closed:animate-out data-open:animate-in", e),
			"data-align-trigger": o,
			"data-slot": "select-content",
			...s,
			children: [
				/* @__PURE__ */ X(Ut, {}),
				/* @__PURE__ */ X(bt, { children: t }),
				/* @__PURE__ */ X(Wt, {})
			]
		})
	}) });
}
function Bt({ className: e, ...t }) {
	return /* @__PURE__ */ X(Pt, {
		className: R("px-2 py-1.5 text-muted-foreground text-xs", e),
		"data-slot": "select-label",
		...t
	});
}
function Vt({ className: e, children: t, ...n }) {
	return /* @__PURE__ */ je(Ct, {
		className: R("relative flex w-full cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", e),
		"data-slot": "select-item",
		...n,
		children: [/* @__PURE__ */ X(Et, {
			className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap",
			children: t
		}), /* @__PURE__ */ X(wt, {
			render: /* @__PURE__ */ X("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
			children: /* @__PURE__ */ X(Me, { className: "pointer-events-none" })
		})]
	});
}
function Ht({ className: e, ...t }) {
	return /* @__PURE__ */ X(Se, {
		className: R("pointer-events-none -mx-1 my-1 h-px bg-border", e),
		"data-slot": "select-separator",
		...t
	});
}
function Ut({ className: e, ...t }) {
	return /* @__PURE__ */ X(At, {
		className: R("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", e),
		"data-slot": "select-scroll-up-button",
		...t,
		children: /* @__PURE__ */ X(Pe, {})
	});
}
function Wt({ className: e, ...t }) {
	return /* @__PURE__ */ X(kt, {
		className: R("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", e),
		"data-slot": "select-scroll-down-button",
		...t,
		children: /* @__PURE__ */ X(Ne, {})
	});
}
//#endregion
export { Bt as a, Ht as c, Vt as i, Rt as l, zt as n, Wt as o, It as r, Ut as s, Ft as t, Lt as u };
