// muse-ui v4.0.0-alpha.1
// © 2024 kjxbyz. All Rights Reserved.
"use client";
function _array_like_to_array(arr, len) {
    if (len == null || len > arr.length) len = arr.length;
    for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
    return arr2;
}
function _array_with_holes(arr) {
    if (Array.isArray(arr)) return arr;
}
function _array_without_holes(arr) {
    if (Array.isArray(arr)) return _array_like_to_array(arr);
}
function _define_property(obj, key, value) {
    if (key in obj) {
        Object.defineProperty(obj, key, {
            value: value,
            enumerable: true,
            configurable: true,
            writable: true
        });
    } else {
        obj[key] = value;
    }
    return obj;
}
function _iterable_to_array(iter) {
    if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
}
function _iterable_to_array_limit(arr, i) {
    var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
    if (_i == null) return;
    var _arr = [];
    var _n = true;
    var _d = false;
    var _s, _e;
    try {
        for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
            _arr.push(_s.value);
            if (i && _arr.length === i) break;
        }
    } catch (err) {
        _d = true;
        _e = err;
    } finally{
        try {
            if (!_n && _i["return"] != null) _i["return"]();
        } finally{
            if (_d) throw _e;
        }
    }
    return _arr;
}
function _non_iterable_rest() {
    throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _non_iterable_spread() {
    throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _object_spread(target) {
    for(var i = 1; i < arguments.length; i++){
        var source = arguments[i] != null ? arguments[i] : {};
        var ownKeys = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
            ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
                return Object.getOwnPropertyDescriptor(source, sym).enumerable;
            }));
        }
        ownKeys.forEach(function(key) {
            _define_property(target, key, source[key]);
        });
    }
    return target;
}
function ownKeys(object, enumerableOnly) {
    var keys = Object.keys(object);
    if (Object.getOwnPropertySymbols) {
        var symbols = Object.getOwnPropertySymbols(object);
        if (enumerableOnly) {
            symbols = symbols.filter(function(sym) {
                return Object.getOwnPropertyDescriptor(object, sym).enumerable;
            });
        }
        keys.push.apply(keys, symbols);
    }
    return keys;
}
function _object_spread_props(target, source) {
    source = source != null ? source : {};
    if (Object.getOwnPropertyDescriptors) {
        Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
    } else {
        ownKeys(Object(source)).forEach(function(key) {
            Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
        });
    }
    return target;
}
function _object_without_properties(source, excluded) {
    if (source == null) return {};
    var target = _object_without_properties_loose(source, excluded);
    var key, i;
    if (Object.getOwnPropertySymbols) {
        var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
        for(i = 0; i < sourceSymbolKeys.length; i++){
            key = sourceSymbolKeys[i];
            if (excluded.indexOf(key) >= 0) continue;
            if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
            target[key] = source[key];
        }
    }
    return target;
}
function _object_without_properties_loose(source, excluded) {
    if (source == null) return {};
    var target = {};
    var sourceKeys = Object.keys(source);
    var key, i;
    for(i = 0; i < sourceKeys.length; i++){
        key = sourceKeys[i];
        if (excluded.indexOf(key) >= 0) continue;
        target[key] = source[key];
    }
    return target;
}
function _sliced_to_array(arr, i) {
    return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
}
function _to_consumable_array(arr) {
    return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
}
function _unsupported_iterable_to_array(o, minLen) {
    if (!o) return;
    if (typeof o === "string") return _array_like_to_array(o, minLen);
    var n = Object.prototype.toString.call(o).slice(8, -1);
    if (n === "Object" && o.constructor) n = o.constructor.name;
    if (n === "Map" || n === "Set") return Array.from(n);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
}
// registry/default/ui/radio-group.tsx
import * as React from "react";
// ../../node_modules/.pnpm/@babel+runtime@7.22.3/node_modules/@babel/runtime/helpers/esm/extends.js
function _extends() {
    _extends = Object.assign ? Object.assign.bind() : function _extends(target) {
        for(var i = 1; i < arguments.length; i++){
            var source = arguments[i];
            for(var key in source){
                if (Object.prototype.hasOwnProperty.call(source, key)) {
                    target[key] = source[key];
                }
            }
        }
        return target;
    };
    return _extends.apply(this, arguments);
}
// ../../node_modules/.pnpm/@radix-ui+react-radio-group@1.1.3_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-radio-group/dist/index.mjs
import { forwardRef as $8Wolv$forwardRef, createElement as $8Wolv$createElement, useRef as $8Wolv$useRef, useEffect as $8Wolv$useEffect, useState as $8Wolv$useState } from "react";
// ../../node_modules/.pnpm/@radix-ui+primitive@1.0.1/node_modules/@radix-ui/primitive/dist/index.mjs
function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler) {
    var _ref = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, _ref_checkForDefaultPrevented = _ref.checkForDefaultPrevented, checkForDefaultPrevented = _ref_checkForDefaultPrevented === void 0 ? true : _ref_checkForDefaultPrevented;
    return function handleEvent(event) {
        originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event);
        if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event);
    };
}
// ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.0.1_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
import { useCallback as $3vqmr$useCallback } from "react";
function $6ed0406888f73fc4$var$setRef(ref, value) {
    if (typeof ref === "function") ref(value);
    else if (ref !== null && ref !== void 0) ref.current = value;
}
function $6ed0406888f73fc4$export$43e446d32b3d21af() {
    for(var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++){
        refs[_key] = arguments[_key];
    }
    return function(node) {
        return refs.forEach(function(ref) {
            return $6ed0406888f73fc4$var$setRef(ref, node);
        });
    };
}
function $6ed0406888f73fc4$export$c7b2cbe3552a0d05() {
    for(var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++){
        refs[_key] = arguments[_key];
    }
    return $3vqmr$useCallback($6ed0406888f73fc4$export$43e446d32b3d21af.apply(void 0, _to_consumable_array(refs)), refs);
}
// ../../node_modules/.pnpm/@radix-ui+react-context@1.0.1_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.mjs
import { createContext as $3bkAK$createContext, useMemo as $3bkAK$useMemo, createElement as $3bkAK$createElement, useContext as $3bkAK$useContext } from "react";
function $c512c27ab02ef895$export$50c7b4e9d9f19c1(scopeName) {
    var createContextScopeDeps = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
    var defaultContexts = [];
    function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultContext) {
        var BaseContext = /* @__PURE__ */ $3bkAK$createContext(defaultContext);
        var index = defaultContexts.length;
        defaultContexts = _to_consumable_array(defaultContexts).concat([
            defaultContext
        ]);
        function Provider(props) {
            var scope = props.scope, children = props.children, context = _object_without_properties(props, [
                "scope",
                "children"
            ]);
            var Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext;
            var value = $3bkAK$useMemo(function() {
                return context;
            }, Object.values(context));
            return /* @__PURE__ */ $3bkAK$createElement(Context.Provider, {
                value: value
            }, children);
        }
        function useContext(consumerName, scope) {
            var Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext;
            var context = $3bkAK$useContext(Context);
            if (context) return context;
            if (defaultContext !== void 0) return defaultContext;
            throw new Error("`".concat(consumerName, "` must be used within `").concat(rootComponentName, "`"));
        }
        Provider.displayName = rootComponentName + "Provider";
        return [
            Provider,
            useContext
        ];
    }
    var createScope = function() {
        var scopeContexts = defaultContexts.map(function(defaultContext) {
            return /* @__PURE__ */ $3bkAK$createContext(defaultContext);
        });
        return function useScope(scope) {
            var contexts = (scope === null || scope === void 0 ? void 0 : scope[scopeName]) || scopeContexts;
            return $3bkAK$useMemo(function() {
                return _define_property({}, "__scope".concat(scopeName), _object_spread_props(_object_spread({}, scope), _define_property({}, scopeName, contexts)));
            }, [
                scope,
                contexts
            ]);
        };
    };
    createScope.scopeName = scopeName;
    return [
        $c512c27ab02ef895$export$fd42f52fd3ae1109,
        $c512c27ab02ef895$var$composeContextScopes.apply(void 0, [
            createScope
        ].concat(_to_consumable_array(createContextScopeDeps)))
    ];
}
function $c512c27ab02ef895$var$composeContextScopes() {
    for(var _len = arguments.length, scopes = new Array(_len), _key = 0; _key < _len; _key++){
        scopes[_key] = arguments[_key];
    }
    var baseScope = scopes[0];
    if (scopes.length === 1) return baseScope;
    var createScope1 = function() {
        var scopeHooks = scopes.map(function(createScope) {
            return {
                useScope: createScope(),
                scopeName: createScope.scopeName
            };
        });
        return function useComposedScopes(overrideScopes) {
            var nextScopes1 = scopeHooks.reduce(function(nextScopes, param) {
                var useScope = param.useScope, scopeName = param.scopeName;
                var scopeProps = useScope(overrideScopes);
                var currentScope = scopeProps["__scope".concat(scopeName)];
                return _object_spread({}, nextScopes, currentScope);
            }, {});
            return $3bkAK$useMemo(function() {
                return _define_property({}, "__scope".concat(baseScope.scopeName), nextScopes1);
            }, [
                nextScopes1
            ]);
        };
    };
    createScope1.scopeName = baseScope.scopeName;
    return createScope1;
}
// ../../node_modules/.pnpm/@babel+runtime@7.22.6/node_modules/@babel/runtime/helpers/esm/extends.js
function _extends2() {
    _extends2 = Object.assign ? Object.assign.bind() : function _extends2(target) {
        for(var i = 1; i < arguments.length; i++){
            var source = arguments[i];
            for(var key in source){
                if (Object.prototype.hasOwnProperty.call(source, key)) {
                    target[key] = source[key];
                }
            }
        }
        return target;
    };
    return _extends2.apply(this, arguments);
}
// ../../node_modules/.pnpm/@radix-ui+react-primitive@1.0.3_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.mjs
import { forwardRef as $4q5Fq$forwardRef, useEffect as $4q5Fq$useEffect, createElement as $4q5Fq$createElement } from "react";
import { flushSync as $4q5Fq$flushSync } from "react-dom";
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.0.2_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.mjs
import { forwardRef as $9IrjX$forwardRef, Children as $9IrjX$Children, isValidElement as $9IrjX$isValidElement, createElement as $9IrjX$createElement, cloneElement as $9IrjX$cloneElement, Fragment as $9IrjX$Fragment } from "react";
var $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /* @__PURE__ */ $9IrjX$forwardRef(function(props, forwardedRef) {
    var children = props.children, slotProps = _object_without_properties(props, [
        "children"
    ]);
    var childrenArray = $9IrjX$Children.toArray(children);
    var slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
    if (slottable) {
        var newElement = slottable.props.children;
        var newChildren = childrenArray.map(function(child) {
            if (child === slottable) {
                if ($9IrjX$Children.count(newElement) > 1) return $9IrjX$Children.only(null);
                return /* @__PURE__ */ $9IrjX$isValidElement(newElement) ? newElement.props.children : null;
            } else return child;
        });
        return /* @__PURE__ */ $9IrjX$createElement($5e63c961fc1ce211$var$SlotClone, _extends2({}, slotProps, {
            ref: forwardedRef
        }), /* @__PURE__ */ $9IrjX$isValidElement(newElement) ? /* @__PURE__ */ $9IrjX$cloneElement(newElement, void 0, newChildren) : null);
    }
    return /* @__PURE__ */ $9IrjX$createElement($5e63c961fc1ce211$var$SlotClone, _extends2({}, slotProps, {
        ref: forwardedRef
    }), children);
});
$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = "Slot";
var $5e63c961fc1ce211$var$SlotClone = /* @__PURE__ */ $9IrjX$forwardRef(function(props, forwardedRef) {
    var children = props.children, slotProps = _object_without_properties(props, [
        "children"
    ]);
    if (/* @__PURE__ */ $9IrjX$isValidElement(children)) return /* @__PURE__ */ $9IrjX$cloneElement(children, _object_spread_props(_object_spread({}, $5e63c961fc1ce211$var$mergeProps(slotProps, children.props)), {
        ref: forwardedRef ? $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref) : children.ref
    }));
    return $9IrjX$Children.count(children) > 1 ? $9IrjX$Children.only(null) : null;
});
$5e63c961fc1ce211$var$SlotClone.displayName = "SlotClone";
var $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = function(param) {
    var children = param.children;
    return /* @__PURE__ */ $9IrjX$createElement($9IrjX$Fragment, null, children);
};
function $5e63c961fc1ce211$var$isSlottable(child) {
    return /* @__PURE__ */ $9IrjX$isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
}
function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
    var _loop = function(propName) {
        var slotPropValue = slotProps[propName];
        var childPropValue = childProps[propName];
        var isHandler = /^on[A-Z]/.test(propName);
        if (isHandler) {
            if (slotPropValue && childPropValue) overrideProps[propName] = function() {
                for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
                    args[_key] = arguments[_key];
                }
                childPropValue.apply(void 0, _to_consumable_array(args));
                slotPropValue.apply(void 0, _to_consumable_array(args));
            };
            else if (slotPropValue) overrideProps[propName] = slotPropValue;
        } else if (propName === "style") overrideProps[propName] = _object_spread({}, slotPropValue, childPropValue);
        else if (propName === "className") overrideProps[propName] = [
            slotPropValue,
            childPropValue
        ].filter(Boolean).join(" ");
    };
    var overrideProps = _object_spread({}, childProps);
    for(var propName in childProps)_loop(propName);
    return _object_spread({}, slotProps, overrideProps);
}
// ../../node_modules/.pnpm/@radix-ui+react-primitive@1.0.3_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.mjs
var $8927f6f2acc4f386$var$NODES = [
    "a",
    "button",
    "div",
    "form",
    "h2",
    "h3",
    "img",
    "input",
    "label",
    "li",
    "nav",
    "ol",
    "p",
    "span",
    "svg",
    "ul"
];
var $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce(function(primitive, node) {
    var Node = /* @__PURE__ */ $4q5Fq$forwardRef(function(props, forwardedRef) {
        var asChild = props.asChild, primitiveProps = _object_without_properties(props, [
            "asChild"
        ]);
        var Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
        $4q5Fq$useEffect(function() {
            window[Symbol.for("radix-ui")] = true;
        }, []);
        return /* @__PURE__ */ $4q5Fq$createElement(Comp, _extends2({}, primitiveProps, {
            ref: forwardedRef
        }));
    });
    Node.displayName = "Primitive.".concat(node);
    return _object_spread_props(_object_spread({}, primitive), _define_property({}, node, Node));
}, {});
// ../../node_modules/.pnpm/@radix-ui+react-roving-focus@1.0.4_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-roving-focus/dist/index.mjs
import { forwardRef as $98Iye$forwardRef, createElement as $98Iye$createElement, useRef as $98Iye$useRef, useState as $98Iye$useState, useEffect as $98Iye$useEffect, useCallback as $98Iye$useCallback } from "react";
// ../../node_modules/.pnpm/@radix-ui+react-collection@1.0.3_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-collection/dist/index.mjs
import $6vYhU$react from "react";
function $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {
    var PROVIDER_NAME = name + "CollectionProvider";
    var _$c512c27ab02ef895$export$50c7b4e9d9f19c1 = _sliced_to_array($c512c27ab02ef895$export$50c7b4e9d9f19c1(PROVIDER_NAME), 2), createCollectionContext = _$c512c27ab02ef895$export$50c7b4e9d9f19c1[0], createCollectionScope = _$c512c27ab02ef895$export$50c7b4e9d9f19c1[1];
    var _createCollectionContext = _sliced_to_array(createCollectionContext(PROVIDER_NAME, {
        collectionRef: {
            current: null
        },
        itemMap: /* @__PURE__ */ new Map()
    }), 2), CollectionProviderImpl = _createCollectionContext[0], useCollectionContext = _createCollectionContext[1];
    var CollectionProvider = function(props) {
        var scope = props.scope, children = props.children;
        var ref = $6vYhU$react.useRef(null);
        var itemMap = $6vYhU$react.useRef(/* @__PURE__ */ new Map()).current;
        return /* @__PURE__ */ $6vYhU$react.createElement(CollectionProviderImpl, {
            scope: scope,
            itemMap: itemMap,
            collectionRef: ref
        }, children);
    };
    /* @__PURE__ */ Object.assign(CollectionProvider, {
        displayName: PROVIDER_NAME
    });
    var COLLECTION_SLOT_NAME = name + "CollectionSlot";
    var CollectionSlot = /* @__PURE__ */ $6vYhU$react.forwardRef(function(props, forwardedRef) {
        var scope = props.scope, children = props.children;
        var context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
        var composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.collectionRef);
        return /* @__PURE__ */ $6vYhU$react.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360, {
            ref: composedRefs
        }, children);
    });
    /* @__PURE__ */ Object.assign(CollectionSlot, {
        displayName: COLLECTION_SLOT_NAME
    });
    var ITEM_SLOT_NAME = name + "CollectionItemSlot";
    var ITEM_DATA_ATTR = "data-radix-collection-item";
    var CollectionItemSlot = /* @__PURE__ */ $6vYhU$react.forwardRef(function(props, forwardedRef) {
        var scope = props.scope, children = props.children, itemData = _object_without_properties(props, [
            "scope",
            "children"
        ]);
        var ref = $6vYhU$react.useRef(null);
        var composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
        var context = useCollectionContext(ITEM_SLOT_NAME, scope);
        $6vYhU$react.useEffect(function() {
            context.itemMap.set(ref, _object_spread({
                ref: ref
            }, itemData));
            return function() {
                return void context.itemMap.delete(ref);
            };
        });
        var _obj;
        return /* @__PURE__ */ $6vYhU$react.createElement($5e63c961fc1ce211$export$8c6ed5c666ac1360, (_obj = {}, _define_property(_obj, ITEM_DATA_ATTR, ""), _define_property(_obj, "ref", composedRefs), _obj), children);
    });
    /* @__PURE__ */ Object.assign(CollectionItemSlot, {
        displayName: ITEM_SLOT_NAME
    });
    function useCollection(scope) {
        var context = useCollectionContext(name + "CollectionConsumer", scope);
        var getItems = $6vYhU$react.useCallback(function() {
            var collectionNode = context.collectionRef.current;
            if (!collectionNode) return [];
            var orderedNodes = Array.from(collectionNode.querySelectorAll("[".concat(ITEM_DATA_ATTR, "]")));
            var items = Array.from(context.itemMap.values());
            var orderedItems = items.sort(function(a, b) {
                return orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current);
            });
            return orderedItems;
        }, [
            context.collectionRef,
            context.itemMap
        ]);
        return getItems;
    }
    return [
        {
            Provider: CollectionProvider,
            Slot: CollectionSlot,
            ItemSlot: CollectionItemSlot
        },
        useCollection,
        createCollectionScope
    ];
}
// ../../node_modules/.pnpm/@radix-ui+react-id@1.0.1_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.mjs
import * as $2AODx$react from "react";
// ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.0.1_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
import { useLayoutEffect as $dxlwH$useLayoutEffect } from "react";
var $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? $dxlwH$useLayoutEffect : function() {};
// ../../node_modules/.pnpm/@radix-ui+react-id@1.0.1_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.mjs
var $1746a345f3d73bb7$var$useReactId = $2AODx$react["useId".toString()] || function() {
    return void 0;
};
var $1746a345f3d73bb7$var$count = 0;
function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
    var _$2AODx$react_useState = _sliced_to_array($2AODx$react.useState($1746a345f3d73bb7$var$useReactId()), 2), id = _$2AODx$react_useState[0], setId = _$2AODx$react_useState[1];
    $9f79659886946c16$export$e5c5a5f917a5871c(function() {
        if (!deterministicId) setId(function(reactId) {
            return reactId !== null && reactId !== void 0 ? reactId : String($1746a345f3d73bb7$var$count++);
        });
    }, [
        deterministicId
    ]);
    return deterministicId || (id ? "radix-".concat(id) : "");
}
// ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.0.1_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
import { useRef as $lwiWj$useRef, useEffect as $lwiWj$useEffect, useMemo as $lwiWj$useMemo } from "react";
function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
    var callbackRef = $lwiWj$useRef(callback);
    $lwiWj$useEffect(function() {
        callbackRef.current = callback;
    });
    return $lwiWj$useMemo(function() {
        return function() {
            for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
                args[_key] = arguments[_key];
            }
            var _callbackRef$current;
            var _callbackRef$current1;
            return (_callbackRef$current1 = callbackRef.current) === null || _callbackRef$current1 === void 0 ? void 0 : (_callbackRef$current = _callbackRef$current1).call.apply(_callbackRef$current, [
                callbackRef
            ].concat(_to_consumable_array(args)));
        };
    }, []);
}
// ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.0.1_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
import { useCallback as $bnPw9$useCallback, useState as $bnPw9$useState, useRef as $bnPw9$useRef, useEffect as $bnPw9$useEffect } from "react";
function $71cd76cc60e0454e$export$6f32135080cb4c3(param) {
    var prop = param.prop, defaultProp = param.defaultProp, _param_onChange = param.onChange, onChange = _param_onChange === void 0 ? function() {} : _param_onChange;
    var _$71cd76cc60e0454e$var$useUncontrolledState = _sliced_to_array($71cd76cc60e0454e$var$useUncontrolledState({
        defaultProp: defaultProp,
        onChange: onChange
    }), 2), uncontrolledProp = _$71cd76cc60e0454e$var$useUncontrolledState[0], setUncontrolledProp = _$71cd76cc60e0454e$var$useUncontrolledState[1];
    var isControlled = prop !== void 0;
    var value1 = isControlled ? prop : uncontrolledProp;
    var handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
    var setValue = $bnPw9$useCallback(function(nextValue) {
        if (isControlled) {
            var setter = nextValue;
            var value = typeof nextValue === "function" ? setter(prop) : nextValue;
            if (value !== prop) handleChange(value);
        } else setUncontrolledProp(nextValue);
    }, [
        isControlled,
        prop,
        setUncontrolledProp,
        handleChange
    ]);
    return [
        value1,
        setValue
    ];
}
function $71cd76cc60e0454e$var$useUncontrolledState(param) {
    var defaultProp = param.defaultProp, onChange = param.onChange;
    var uncontrolledState = $bnPw9$useState(defaultProp);
    var _uncontrolledState = _sliced_to_array(uncontrolledState, 1), value = _uncontrolledState[0];
    var prevValueRef = $bnPw9$useRef(value);
    var handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
    $bnPw9$useEffect(function() {
        if (prevValueRef.current !== value) {
            handleChange(value);
            prevValueRef.current = value;
        }
    }, [
        value,
        prevValueRef,
        handleChange
    ]);
    return uncontrolledState;
}
// ../../node_modules/.pnpm/@radix-ui+react-direction@1.0.1_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-direction/dist/index.mjs
import { createContext as $7Gjcd$createContext, createElement as $7Gjcd$createElement, useContext as $7Gjcd$useContext } from "react";
var $f631663db3294ace$var$DirectionContext = /* @__PURE__ */ $7Gjcd$createContext(void 0);
function $f631663db3294ace$export$b39126d51d94e6f3(localDir) {
    var globalDir = $7Gjcd$useContext($f631663db3294ace$var$DirectionContext);
    return localDir || globalDir || "ltr";
}
// ../../node_modules/.pnpm/@radix-ui+react-roving-focus@1.0.4_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-roving-focus/dist/index.mjs
var $d7bdfb9eb0fdf311$var$ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
var $d7bdfb9eb0fdf311$var$EVENT_OPTIONS = {
    bubbles: false,
    cancelable: true
};
var $d7bdfb9eb0fdf311$var$GROUP_NAME = "RovingFocusGroup";
var _$e02a7d9cb1dc128c$export$c74125a8e3af6bb2 = _sliced_to_array($e02a7d9cb1dc128c$export$c74125a8e3af6bb2($d7bdfb9eb0fdf311$var$GROUP_NAME), 3), $d7bdfb9eb0fdf311$var$Collection = _$e02a7d9cb1dc128c$export$c74125a8e3af6bb2[0], $d7bdfb9eb0fdf311$var$useCollection = _$e02a7d9cb1dc128c$export$c74125a8e3af6bb2[1], $d7bdfb9eb0fdf311$var$createCollectionScope = _$e02a7d9cb1dc128c$export$c74125a8e3af6bb2[2];
var _$c512c27ab02ef895$export$50c7b4e9d9f19c1 = _sliced_to_array($c512c27ab02ef895$export$50c7b4e9d9f19c1($d7bdfb9eb0fdf311$var$GROUP_NAME, [
    $d7bdfb9eb0fdf311$var$createCollectionScope
]), 2), $d7bdfb9eb0fdf311$var$createRovingFocusGroupContext = _$c512c27ab02ef895$export$50c7b4e9d9f19c1[0], $d7bdfb9eb0fdf311$export$c7109489551a4f4 = _$c512c27ab02ef895$export$50c7b4e9d9f19c1[1];
var _$d7bdfb9eb0fdf311$var$createRovingFocusGroupContext = _sliced_to_array($d7bdfb9eb0fdf311$var$createRovingFocusGroupContext($d7bdfb9eb0fdf311$var$GROUP_NAME), 2), $d7bdfb9eb0fdf311$var$RovingFocusProvider = _$d7bdfb9eb0fdf311$var$createRovingFocusGroupContext[0], $d7bdfb9eb0fdf311$var$useRovingFocusContext = _$d7bdfb9eb0fdf311$var$createRovingFocusGroupContext[1];
var $d7bdfb9eb0fdf311$export$8699f7c8af148338 = /* @__PURE__ */ $98Iye$forwardRef(function(props, forwardedRef) {
    return /* @__PURE__ */ $98Iye$createElement($d7bdfb9eb0fdf311$var$Collection.Provider, {
        scope: props.__scopeRovingFocusGroup
    }, /* @__PURE__ */ $98Iye$createElement($d7bdfb9eb0fdf311$var$Collection.Slot, {
        scope: props.__scopeRovingFocusGroup
    }, /* @__PURE__ */ $98Iye$createElement($d7bdfb9eb0fdf311$var$RovingFocusGroupImpl, _extends({}, props, {
        ref: forwardedRef
    }))));
});
var $d7bdfb9eb0fdf311$var$RovingFocusGroupImpl = /* @__PURE__ */ $98Iye$forwardRef(function(props, forwardedRef) {
    var __scopeRovingFocusGroup = props.__scopeRovingFocusGroup, orientation = props.orientation, _props_loop = props.loop, loop = _props_loop === void 0 ? false : _props_loop, dir = props.dir, currentTabStopIdProp = props.currentTabStopId, defaultCurrentTabStopId = props.defaultCurrentTabStopId, onCurrentTabStopIdChange = props.onCurrentTabStopIdChange, onEntryFocus = props.onEntryFocus, groupProps = _object_without_properties(props, [
        "__scopeRovingFocusGroup",
        "orientation",
        "loop",
        "dir",
        "currentTabStopId",
        "defaultCurrentTabStopId",
        "onCurrentTabStopIdChange",
        "onEntryFocus"
    ]);
    var ref = $98Iye$useRef(null);
    var composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
    var direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
    var _$71cd76cc60e0454e$export$6f32135080cb4c3 = _sliced_to_array($71cd76cc60e0454e$export$6f32135080cb4c3({
        prop: currentTabStopIdProp,
        defaultProp: defaultCurrentTabStopId,
        onChange: onCurrentTabStopIdChange
    }), 2), tmp = _$71cd76cc60e0454e$export$6f32135080cb4c3[0], currentTabStopId = tmp === void 0 ? null : tmp, setCurrentTabStopId = _$71cd76cc60e0454e$export$6f32135080cb4c3[1];
    var _$98Iye$useState = _sliced_to_array($98Iye$useState(false), 2), isTabbingBackOut = _$98Iye$useState[0], setIsTabbingBackOut = _$98Iye$useState[1];
    var handleEntryFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEntryFocus);
    var getItems = $d7bdfb9eb0fdf311$var$useCollection(__scopeRovingFocusGroup);
    var isClickFocusRef = $98Iye$useRef(false);
    var _$98Iye$useState1 = _sliced_to_array($98Iye$useState(0), 2), focusableItemsCount = _$98Iye$useState1[0], setFocusableItemsCount = _$98Iye$useState1[1];
    $98Iye$useEffect(function() {
        var node = ref.current;
        if (node) {
            node.addEventListener($d7bdfb9eb0fdf311$var$ENTRY_FOCUS, handleEntryFocus);
            return function() {
                return node.removeEventListener($d7bdfb9eb0fdf311$var$ENTRY_FOCUS, handleEntryFocus);
            };
        }
    }, [
        handleEntryFocus
    ]);
    return /* @__PURE__ */ $98Iye$createElement($d7bdfb9eb0fdf311$var$RovingFocusProvider, {
        scope: __scopeRovingFocusGroup,
        orientation: orientation,
        dir: direction,
        loop: loop,
        currentTabStopId: currentTabStopId,
        onItemFocus: $98Iye$useCallback(function(tabStopId) {
            return setCurrentTabStopId(tabStopId);
        }, [
            setCurrentTabStopId
        ]),
        onItemShiftTab: $98Iye$useCallback(function() {
            return setIsTabbingBackOut(true);
        }, []),
        onFocusableItemAdd: $98Iye$useCallback(function() {
            return setFocusableItemsCount(function(prevCount) {
                return prevCount + 1;
            });
        }, []),
        onFocusableItemRemove: $98Iye$useCallback(function() {
            return setFocusableItemsCount(function(prevCount) {
                return prevCount - 1;
            });
        }, [])
    }, /* @__PURE__ */ $98Iye$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
        tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
        "data-orientation": orientation
    }, groupProps, {
        ref: composedRefs,
        style: _object_spread({
            outline: "none"
        }, props.style),
        onMouseDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onMouseDown, function() {
            isClickFocusRef.current = true;
        }),
        onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocus, function(event) {
            var isKeyboardFocus = !isClickFocusRef.current;
            if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
                var entryFocusEvent = new CustomEvent($d7bdfb9eb0fdf311$var$ENTRY_FOCUS, $d7bdfb9eb0fdf311$var$EVENT_OPTIONS);
                event.currentTarget.dispatchEvent(entryFocusEvent);
                if (!entryFocusEvent.defaultPrevented) {
                    var items = getItems().filter(function(item) {
                        return item.focusable;
                    });
                    var activeItem = items.find(function(item) {
                        return item.active;
                    });
                    var currentItem = items.find(function(item) {
                        return item.id === currentTabStopId;
                    });
                    var candidateItems = [
                        activeItem,
                        currentItem
                    ].concat(_to_consumable_array(items)).filter(Boolean);
                    var candidateNodes = candidateItems.map(function(item) {
                        return item.ref.current;
                    });
                    $d7bdfb9eb0fdf311$var$focusFirst(candidateNodes);
                }
            }
            isClickFocusRef.current = false;
        }),
        onBlur: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlur, function() {
            return setIsTabbingBackOut(false);
        })
    })));
});
var $d7bdfb9eb0fdf311$var$ITEM_NAME = "RovingFocusGroupItem";
var $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 = /* @__PURE__ */ $98Iye$forwardRef(function(props, forwardedRef) {
    var __scopeRovingFocusGroup = props.__scopeRovingFocusGroup, _props_focusable = props.focusable, focusable = _props_focusable === void 0 ? true : _props_focusable, _props_active = props.active, active = _props_active === void 0 ? false : _props_active, tabStopId = props.tabStopId, itemProps = _object_without_properties(props, [
        "__scopeRovingFocusGroup",
        "focusable",
        "active",
        "tabStopId"
    ]);
    var autoId = $1746a345f3d73bb7$export$f680877a34711e37();
    var id = tabStopId || autoId;
    var context = $d7bdfb9eb0fdf311$var$useRovingFocusContext($d7bdfb9eb0fdf311$var$ITEM_NAME, __scopeRovingFocusGroup);
    var isCurrentTabStop = context.currentTabStopId === id;
    var getItems = $d7bdfb9eb0fdf311$var$useCollection(__scopeRovingFocusGroup);
    var onFocusableItemAdd = context.onFocusableItemAdd, onFocusableItemRemove = context.onFocusableItemRemove;
    $98Iye$useEffect(function() {
        if (focusable) {
            onFocusableItemAdd();
            return function() {
                return onFocusableItemRemove();
            };
        }
    }, [
        focusable,
        onFocusableItemAdd,
        onFocusableItemRemove
    ]);
    return /* @__PURE__ */ $98Iye$createElement($d7bdfb9eb0fdf311$var$Collection.ItemSlot, {
        scope: __scopeRovingFocusGroup,
        id: id,
        focusable: focusable,
        active: active
    }, /* @__PURE__ */ $98Iye$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
        tabIndex: isCurrentTabStop ? 0 : -1,
        "data-orientation": context.orientation
    }, itemProps, {
        ref: forwardedRef,
        onMouseDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onMouseDown, function(event) {
            if (!focusable) event.preventDefault();
            else context.onItemFocus(id);
        }),
        onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocus, function() {
            return context.onItemFocus(id);
        }),
        onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, function(event) {
            if (event.key === "Tab" && event.shiftKey) {
                context.onItemShiftTab();
                return;
            }
            if (event.target !== event.currentTarget) return;
            var focusIntent = $d7bdfb9eb0fdf311$var$getFocusIntent(event, context.orientation, context.dir);
            if (focusIntent !== void 0) {
                event.preventDefault();
                var items = getItems().filter(function(item) {
                    return item.focusable;
                });
                var candidateNodes = items.map(function(item) {
                    return item.ref.current;
                });
                if (focusIntent === "last") candidateNodes.reverse();
                else if (focusIntent === "prev" || focusIntent === "next") {
                    if (focusIntent === "prev") candidateNodes.reverse();
                    var currentIndex = candidateNodes.indexOf(event.currentTarget);
                    candidateNodes = context.loop ? $d7bdfb9eb0fdf311$var$wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
                }
                setTimeout(function() {
                    return $d7bdfb9eb0fdf311$var$focusFirst(candidateNodes);
                });
            }
        })
    })));
});
var $d7bdfb9eb0fdf311$var$MAP_KEY_TO_FOCUS_INTENT = {
    ArrowLeft: "prev",
    ArrowUp: "prev",
    ArrowRight: "next",
    ArrowDown: "next",
    PageUp: "first",
    Home: "first",
    PageDown: "last",
    End: "last"
};
function $d7bdfb9eb0fdf311$var$getDirectionAwareKey(key, dir) {
    if (dir !== "rtl") return key;
    return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
}
function $d7bdfb9eb0fdf311$var$getFocusIntent(event, orientation, dir) {
    var key = $d7bdfb9eb0fdf311$var$getDirectionAwareKey(event.key, dir);
    if (orientation === "vertical" && [
        "ArrowLeft",
        "ArrowRight"
    ].includes(key)) return void 0;
    if (orientation === "horizontal" && [
        "ArrowUp",
        "ArrowDown"
    ].includes(key)) return void 0;
    return $d7bdfb9eb0fdf311$var$MAP_KEY_TO_FOCUS_INTENT[key];
}
function $d7bdfb9eb0fdf311$var$focusFirst(candidates) {
    var PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
    var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
    try {
        for(var _iterator = candidates[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
            var candidate = _step.value;
            if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
            candidate.focus();
            if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
        }
    } catch (err) {
        _didIteratorError = true;
        _iteratorError = err;
    } finally{
        try {
            if (!_iteratorNormalCompletion && _iterator.return != null) {
                _iterator.return();
            }
        } finally{
            if (_didIteratorError) {
                throw _iteratorError;
            }
        }
    }
}
function $d7bdfb9eb0fdf311$var$wrapArray(array, startIndex) {
    return array.map(function(_, index) {
        return array[(startIndex + index) % array.length];
    });
}
var $d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9 = $d7bdfb9eb0fdf311$export$8699f7c8af148338;
var $d7bdfb9eb0fdf311$export$6d08773d2e66f8f2 = $d7bdfb9eb0fdf311$export$ab9df7c53fe8454;
// ../../node_modules/.pnpm/@radix-ui+react-use-size@1.0.1_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-use-size/dist/index.mjs
import { useState as $9gyGR$useState } from "react";
function $db6c3485150b8e66$export$1ab7ae714698c4b8(element) {
    var _$9gyGR$useState = _sliced_to_array($9gyGR$useState(void 0), 2), size = _$9gyGR$useState[0], setSize = _$9gyGR$useState[1];
    $9f79659886946c16$export$e5c5a5f917a5871c(function() {
        if (element) {
            setSize({
                width: element.offsetWidth,
                height: element.offsetHeight
            });
            var resizeObserver = new ResizeObserver(function(entries) {
                if (!Array.isArray(entries)) return;
                if (!entries.length) return;
                var entry = entries[0];
                var width;
                var height;
                if ("borderBoxSize" in entry) {
                    var borderSizeEntry = entry["borderBoxSize"];
                    var borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
                    width = borderSize["inlineSize"];
                    height = borderSize["blockSize"];
                } else {
                    width = element.offsetWidth;
                    height = element.offsetHeight;
                }
                setSize({
                    width: width,
                    height: height
                });
            });
            resizeObserver.observe(element, {
                box: "border-box"
            });
            return function() {
                return resizeObserver.unobserve(element);
            };
        } else setSize(void 0);
    }, [
        element
    ]);
    return size;
}
// ../../node_modules/.pnpm/@radix-ui+react-use-previous@1.0.1_@types+react@18.2.65_react@18.2.0/node_modules/@radix-ui/react-use-previous/dist/index.mjs
import { useRef as $8LvvK$useRef, useMemo as $8LvvK$useMemo } from "react";
function $010c2913dbd2fe3d$export$5cae361ad82dce8b(value) {
    var ref = $8LvvK$useRef({
        value: value,
        previous: value
    });
    return $8LvvK$useMemo(function() {
        if (ref.current.value !== value) {
            ref.current.previous = ref.current.value;
            ref.current.value = value;
        }
        return ref.current.previous;
    }, [
        value
    ]);
}
// ../../node_modules/.pnpm/@radix-ui+react-presence@1.0.1_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.mjs
import { Children as $iqq3r$Children, cloneElement as $iqq3r$cloneElement, useState as $iqq3r$useState, useRef as $iqq3r$useRef, useEffect as $iqq3r$useEffect, useCallback as $iqq3r$useCallback, useReducer as $iqq3r$useReducer } from "react";
import { flushSync as $iqq3r$flushSync } from "react-dom";
function $fe963b355347cc68$export$3e6543de14f8614f(initialState, machine) {
    return $iqq3r$useReducer(function(state, event) {
        var nextState = machine[state][event];
        return nextState !== null && nextState !== void 0 ? nextState : state;
    }, initialState);
}
var $921a889cee6df7e8$export$99c2b779aa4e8b8b = function(props) {
    var present = props.present, children = props.children;
    var presence = $921a889cee6df7e8$var$usePresence(present);
    var child = typeof children === "function" ? children({
        present: presence.isPresent
    }) : $iqq3r$Children.only(children);
    var ref = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(presence.ref, child.ref);
    var forceMount = typeof children === "function";
    return forceMount || presence.isPresent ? /* @__PURE__ */ $iqq3r$cloneElement(child, {
        ref: ref
    }) : null;
};
$921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = "Presence";
function $921a889cee6df7e8$var$usePresence(present) {
    var _$iqq3r$useState = _sliced_to_array($iqq3r$useState(), 2), node1 = _$iqq3r$useState[0], setNode = _$iqq3r$useState[1];
    var stylesRef = $iqq3r$useRef({});
    var prevPresentRef = $iqq3r$useRef(present);
    var prevAnimationNameRef = $iqq3r$useRef("none");
    var initialState = present ? "mounted" : "unmounted";
    var _$fe963b355347cc68$export$3e6543de14f8614f = _sliced_to_array($fe963b355347cc68$export$3e6543de14f8614f(initialState, {
        mounted: {
            UNMOUNT: "unmounted",
            ANIMATION_OUT: "unmountSuspended"
        },
        unmountSuspended: {
            MOUNT: "mounted",
            ANIMATION_END: "unmounted"
        },
        unmounted: {
            MOUNT: "mounted"
        }
    }), 2), state = _$fe963b355347cc68$export$3e6543de14f8614f[0], send = _$fe963b355347cc68$export$3e6543de14f8614f[1];
    $iqq3r$useEffect(function() {
        var currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
        prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
    }, [
        state
    ]);
    $9f79659886946c16$export$e5c5a5f917a5871c(function() {
        var styles = stylesRef.current;
        var wasPresent = prevPresentRef.current;
        var hasPresentChanged = wasPresent !== present;
        if (hasPresentChanged) {
            var prevAnimationName = prevAnimationNameRef.current;
            var currentAnimationName = $921a889cee6df7e8$var$getAnimationName(styles);
            if (present) send("MOUNT");
            else if (currentAnimationName === "none" || (styles === null || styles === void 0 ? void 0 : styles.display) === "none") send("UNMOUNT");
            else {
                var isAnimating = prevAnimationName !== currentAnimationName;
                if (wasPresent && isAnimating) send("ANIMATION_OUT");
                else send("UNMOUNT");
            }
            prevPresentRef.current = present;
        }
    }, [
        present,
        send
    ]);
    $9f79659886946c16$export$e5c5a5f917a5871c(function() {
        if (node1) {
            var handleAnimationEnd = function(event) {
                var currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
                var isCurrentAnimation = currentAnimationName.includes(event.animationName);
                if (event.target === node1 && isCurrentAnimation) $iqq3r$flushSync(function() {
                    return send("ANIMATION_END");
                });
            };
            var handleAnimationStart = function(event) {
                if (event.target === node1) prevAnimationNameRef.current = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);
            };
            node1.addEventListener("animationstart", handleAnimationStart);
            node1.addEventListener("animationcancel", handleAnimationEnd);
            node1.addEventListener("animationend", handleAnimationEnd);
            return function() {
                node1.removeEventListener("animationstart", handleAnimationStart);
                node1.removeEventListener("animationcancel", handleAnimationEnd);
                node1.removeEventListener("animationend", handleAnimationEnd);
            };
        } else send("ANIMATION_END");
    }, [
        node1,
        send
    ]);
    return {
        isPresent: [
            "mounted",
            "unmountSuspended"
        ].includes(state),
        ref: $iqq3r$useCallback(function(node) {
            if (node) stylesRef.current = getComputedStyle(node);
            setNode(node);
        }, [])
    };
}
function $921a889cee6df7e8$var$getAnimationName(styles) {
    return (styles === null || styles === void 0 ? void 0 : styles.animationName) || "none";
}
// ../../node_modules/.pnpm/@radix-ui+react-radio-group@1.1.3_@types+react-dom@18.2.22_@types+react@18.2.65_react-dom@18.2.0_react@18.2.0/node_modules/@radix-ui/react-radio-group/dist/index.mjs
var $ce77a8961b41be9e$var$RADIO_NAME = "Radio";
var _$c512c27ab02ef895$export$50c7b4e9d9f19c11 = _sliced_to_array($c512c27ab02ef895$export$50c7b4e9d9f19c1($ce77a8961b41be9e$var$RADIO_NAME), 2), $ce77a8961b41be9e$var$createRadioContext = _$c512c27ab02ef895$export$50c7b4e9d9f19c11[0], $ce77a8961b41be9e$export$67d2296460f1b002 = _$c512c27ab02ef895$export$50c7b4e9d9f19c11[1];
var _$ce77a8961b41be9e$var$createRadioContext = _sliced_to_array($ce77a8961b41be9e$var$createRadioContext($ce77a8961b41be9e$var$RADIO_NAME), 2), $ce77a8961b41be9e$var$RadioProvider = _$ce77a8961b41be9e$var$createRadioContext[0], $ce77a8961b41be9e$var$useRadioContext = _$ce77a8961b41be9e$var$createRadioContext[1];
var $ce77a8961b41be9e$export$d7b12c4107be0d61 = /* @__PURE__ */ $8Wolv$forwardRef(function(props, forwardedRef) {
    var __scopeRadio = props.__scopeRadio, name = props.name, _props_checked = props.checked, checked = _props_checked === void 0 ? false : _props_checked, required = props.required, disabled = props.disabled, _props_value = props.value, value = _props_value === void 0 ? "on" : _props_value, onCheck = props.onCheck, radioProps = _object_without_properties(props, [
        "__scopeRadio",
        "name",
        "checked",
        "required",
        "disabled",
        "value",
        "onCheck"
    ]);
    var _$8Wolv$useState = _sliced_to_array($8Wolv$useState(null), 2), button = _$8Wolv$useState[0], setButton = _$8Wolv$useState[1];
    var composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, function(node) {
        return setButton(node);
    });
    var hasConsumerStoppedPropagationRef = $8Wolv$useRef(false);
    var isFormControl = button ? Boolean(button.closest("form")) : true;
    return /* @__PURE__ */ $8Wolv$createElement($ce77a8961b41be9e$var$RadioProvider, {
        scope: __scopeRadio,
        checked: checked,
        disabled: disabled
    }, /* @__PURE__ */ $8Wolv$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
        type: "button",
        role: "radio",
        "aria-checked": checked,
        "data-state": $ce77a8961b41be9e$var$getState(checked),
        "data-disabled": disabled ? "" : void 0,
        disabled: disabled,
        value: value
    }, radioProps, {
        ref: composedRefs,
        onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, function(event) {
            if (!checked) onCheck === null || onCheck === void 0 || onCheck();
            if (isFormControl) {
                hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
                if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
            }
        })
    })), isFormControl && /* @__PURE__ */ $8Wolv$createElement($ce77a8961b41be9e$var$BubbleInput, {
        control: button,
        bubbles: !hasConsumerStoppedPropagationRef.current,
        name: name,
        value: value,
        checked: checked,
        required: required,
        disabled: disabled,
        style: {
            transform: "translateX(-100%)"
        }
    }));
});
var $ce77a8961b41be9e$var$INDICATOR_NAME = "RadioIndicator";
var $ce77a8961b41be9e$export$d35a9ffa9a04f9e7 = /* @__PURE__ */ $8Wolv$forwardRef(function(props, forwardedRef) {
    var __scopeRadio = props.__scopeRadio, forceMount = props.forceMount, indicatorProps = _object_without_properties(props, [
        "__scopeRadio",
        "forceMount"
    ]);
    var context = $ce77a8961b41be9e$var$useRadioContext($ce77a8961b41be9e$var$INDICATOR_NAME, __scopeRadio);
    return /* @__PURE__ */ $8Wolv$createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
        present: forceMount || context.checked
    }, /* @__PURE__ */ $8Wolv$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
        "data-state": $ce77a8961b41be9e$var$getState(context.checked),
        "data-disabled": context.disabled ? "" : void 0
    }, indicatorProps, {
        ref: forwardedRef
    })));
});
var $ce77a8961b41be9e$var$BubbleInput = function(props) {
    var control = props.control, checked = props.checked, _props_bubbles = props.bubbles, bubbles = _props_bubbles === void 0 ? true : _props_bubbles, inputProps = _object_without_properties(props, [
        "control",
        "checked",
        "bubbles"
    ]);
    var ref = $8Wolv$useRef(null);
    var prevChecked = $010c2913dbd2fe3d$export$5cae361ad82dce8b(checked);
    var controlSize = $db6c3485150b8e66$export$1ab7ae714698c4b8(control);
    $8Wolv$useEffect(function() {
        var input = ref.current;
        var inputProto = window.HTMLInputElement.prototype;
        var descriptor = Object.getOwnPropertyDescriptor(inputProto, "checked");
        var setChecked = descriptor.set;
        if (prevChecked !== checked && setChecked) {
            var event = new Event("click", {
                bubbles: bubbles
            });
            setChecked.call(input, checked);
            input.dispatchEvent(event);
        }
    }, [
        prevChecked,
        checked,
        bubbles
    ]);
    return /* @__PURE__ */ $8Wolv$createElement("input", _extends({
        type: "radio",
        "aria-hidden": true,
        defaultChecked: checked
    }, inputProps, {
        tabIndex: -1,
        ref: ref,
        style: _object_spread_props(_object_spread({}, props.style, controlSize), {
            position: "absolute",
            pointerEvents: "none",
            opacity: 0,
            margin: 0
        })
    }));
};
function $ce77a8961b41be9e$var$getState(checked) {
    return checked ? "checked" : "unchecked";
}
var $f99a8c78507165f7$var$ARROW_KEYS = [
    "ArrowUp",
    "ArrowDown",
    "ArrowLeft",
    "ArrowRight"
];
var $f99a8c78507165f7$var$RADIO_GROUP_NAME = "RadioGroup";
var _$c512c27ab02ef895$export$50c7b4e9d9f19c12 = _sliced_to_array($c512c27ab02ef895$export$50c7b4e9d9f19c1($f99a8c78507165f7$var$RADIO_GROUP_NAME, [
    $d7bdfb9eb0fdf311$export$c7109489551a4f4,
    $ce77a8961b41be9e$export$67d2296460f1b002
]), 2), $f99a8c78507165f7$var$createRadioGroupContext = _$c512c27ab02ef895$export$50c7b4e9d9f19c12[0], $f99a8c78507165f7$export$c547093f11b76da2 = _$c512c27ab02ef895$export$50c7b4e9d9f19c12[1];
var $f99a8c78507165f7$var$useRovingFocusGroupScope = $d7bdfb9eb0fdf311$export$c7109489551a4f4();
var $f99a8c78507165f7$var$useRadioScope = $ce77a8961b41be9e$export$67d2296460f1b002();
var _$f99a8c78507165f7$var$createRadioGroupContext = _sliced_to_array($f99a8c78507165f7$var$createRadioGroupContext($f99a8c78507165f7$var$RADIO_GROUP_NAME), 2), $f99a8c78507165f7$var$RadioGroupProvider = _$f99a8c78507165f7$var$createRadioGroupContext[0], $f99a8c78507165f7$var$useRadioGroupContext = _$f99a8c78507165f7$var$createRadioGroupContext[1];
var $f99a8c78507165f7$export$a98f0dcb43a68a25 = /* @__PURE__ */ $8Wolv$forwardRef(function(props, forwardedRef) {
    var __scopeRadioGroup = props.__scopeRadioGroup, name = props.name, defaultValue = props.defaultValue, valueProp = props.value, _props_required = props.required, required = _props_required === void 0 ? false : _props_required, _props_disabled = props.disabled, disabled = _props_disabled === void 0 ? false : _props_disabled, orientation = props.orientation, dir = props.dir, _props_loop = props.loop, loop = _props_loop === void 0 ? true : _props_loop, onValueChange = props.onValueChange, groupProps = _object_without_properties(props, [
        "__scopeRadioGroup",
        "name",
        "defaultValue",
        "value",
        "required",
        "disabled",
        "orientation",
        "dir",
        "loop",
        "onValueChange"
    ]);
    var rovingFocusGroupScope = $f99a8c78507165f7$var$useRovingFocusGroupScope(__scopeRadioGroup);
    var direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
    var _$71cd76cc60e0454e$export$6f32135080cb4c3 = _sliced_to_array($71cd76cc60e0454e$export$6f32135080cb4c3({
        prop: valueProp,
        defaultProp: defaultValue,
        onChange: onValueChange
    }), 2), value = _$71cd76cc60e0454e$export$6f32135080cb4c3[0], setValue = _$71cd76cc60e0454e$export$6f32135080cb4c3[1];
    return /* @__PURE__ */ $8Wolv$createElement($f99a8c78507165f7$var$RadioGroupProvider, {
        scope: __scopeRadioGroup,
        name: name,
        required: required,
        disabled: disabled,
        value: value,
        onValueChange: setValue
    }, /* @__PURE__ */ $8Wolv$createElement($d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9, _extends({
        asChild: true
    }, rovingFocusGroupScope, {
        orientation: orientation,
        dir: direction,
        loop: loop
    }), /* @__PURE__ */ $8Wolv$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
        role: "radiogroup",
        "aria-required": required,
        "aria-orientation": orientation,
        "data-disabled": disabled ? "" : void 0,
        dir: direction
    }, groupProps, {
        ref: forwardedRef
    }))));
});
var $f99a8c78507165f7$var$ITEM_NAME = "RadioGroupItem";
var $f99a8c78507165f7$export$9f866c100ef519e4 = /* @__PURE__ */ $8Wolv$forwardRef(function(props, forwardedRef) {
    var __scopeRadioGroup = props.__scopeRadioGroup, disabled = props.disabled, itemProps = _object_without_properties(props, [
        "__scopeRadioGroup",
        "disabled"
    ]);
    var context = $f99a8c78507165f7$var$useRadioGroupContext($f99a8c78507165f7$var$ITEM_NAME, __scopeRadioGroup);
    var isDisabled = context.disabled || disabled;
    var rovingFocusGroupScope = $f99a8c78507165f7$var$useRovingFocusGroupScope(__scopeRadioGroup);
    var radioScope = $f99a8c78507165f7$var$useRadioScope(__scopeRadioGroup);
    var ref = $8Wolv$useRef(null);
    var composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
    var checked = context.value === itemProps.value;
    var isArrowKeyPressedRef = $8Wolv$useRef(false);
    $8Wolv$useEffect(function() {
        var handleKeyDown = function(event) {
            if ($f99a8c78507165f7$var$ARROW_KEYS.includes(event.key)) isArrowKeyPressedRef.current = true;
        };
        var handleKeyUp = function() {
            return isArrowKeyPressedRef.current = false;
        };
        document.addEventListener("keydown", handleKeyDown);
        document.addEventListener("keyup", handleKeyUp);
        return function() {
            document.removeEventListener("keydown", handleKeyDown);
            document.removeEventListener("keyup", handleKeyUp);
        };
    }, []);
    return /* @__PURE__ */ $8Wolv$createElement($d7bdfb9eb0fdf311$export$6d08773d2e66f8f2, _extends({
        asChild: true
    }, rovingFocusGroupScope, {
        focusable: !isDisabled,
        active: checked
    }), /* @__PURE__ */ $8Wolv$createElement($ce77a8961b41be9e$export$d7b12c4107be0d61, _extends({
        disabled: isDisabled,
        required: context.required,
        checked: checked
    }, radioScope, itemProps, {
        name: context.name,
        ref: composedRefs,
        onCheck: function() {
            return context.onValueChange(itemProps.value);
        },
        onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(function(event) {
            if (event.key === "Enter") event.preventDefault();
        }),
        onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(itemProps.onFocus, function() {
            var _ref$current;
            if (isArrowKeyPressedRef.current) (_ref$current = ref.current) === null || _ref$current === void 0 || _ref$current.click();
        })
    })));
});
var $f99a8c78507165f7$export$5fb54c671a65c88 = /* @__PURE__ */ $8Wolv$forwardRef(function(props, forwardedRef) {
    var __scopeRadioGroup = props.__scopeRadioGroup, indicatorProps = _object_without_properties(props, [
        "__scopeRadioGroup"
    ]);
    var radioScope = $f99a8c78507165f7$var$useRadioScope(__scopeRadioGroup);
    return /* @__PURE__ */ $8Wolv$createElement($ce77a8961b41be9e$export$d35a9ffa9a04f9e7, _extends({}, radioScope, indicatorProps, {
        ref: forwardedRef
    }));
});
var $f99a8c78507165f7$export$be92b6f5f03c0fe9 = $f99a8c78507165f7$export$a98f0dcb43a68a25;
var $f99a8c78507165f7$export$6d08773d2e66f8f2 = $f99a8c78507165f7$export$9f866c100ef519e4;
var $f99a8c78507165f7$export$adb584737d712b70 = $f99a8c78507165f7$export$5fb54c671a65c88;
// registry/default/ui/radio-group.tsx
import { Circle } from "lucide-react";
// lib/utils.ts
import { clsx } from "clsx";
import { twMerge } from "tailwind-merge";
function cn() {
    for(var _len = arguments.length, inputs = new Array(_len), _key = 0; _key < _len; _key++){
        inputs[_key] = arguments[_key];
    }
    return twMerge(clsx(inputs));
}
// registry/default/ui/radio-group.tsx
import { jsx } from "react/jsx-runtime";
var RadioGroup = React.forwardRef(function(_param, ref) {
    var className = _param.className, props = _object_without_properties(_param, [
        "className"
    ]);
    return /* @__PURE__ */ jsx($f99a8c78507165f7$export$be92b6f5f03c0fe9, _object_spread_props(_object_spread({
        className: cn("grid gap-2", className)
    }, props), {
        ref: ref
    }));
});
RadioGroup.displayName = $f99a8c78507165f7$export$be92b6f5f03c0fe9.displayName;
var RadioGroupItem = React.forwardRef(function(_param, ref) {
    var className = _param.className, props = _object_without_properties(_param, [
        "className"
    ]);
    return /* @__PURE__ */ jsx($f99a8c78507165f7$export$6d08773d2e66f8f2, _object_spread_props(_object_spread({
        ref: ref,
        className: cn("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className)
    }, props), {
        children: /* @__PURE__ */ jsx($f99a8c78507165f7$export$adb584737d712b70, {
            className: "flex items-center justify-center",
            children: /* @__PURE__ */ jsx(Circle, {
                className: "h-2.5 w-2.5 fill-current text-current"
            })
        })
    }));
});
RadioGroupItem.displayName = $f99a8c78507165f7$export$6d08773d2e66f8f2.displayName;
export { RadioGroup, RadioGroupItem };
//# sourceMappingURL=radio-group.mjs.map