// 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/new-york/ui/accordion.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-accordion@1.1.2_@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-accordion/dist/index.mjs
import $3DjNB$react from "react";
// ../../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/@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";
// ../../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/@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-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-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
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+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-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";
// ../../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
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-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";
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-collapsible@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-collapsible/dist/index.mjs
import { forwardRef as $73KQ4$forwardRef, createElement as $73KQ4$createElement, useCallback as $73KQ4$useCallback, useState as $73KQ4$useState, useRef as $73KQ4$useRef, useEffect as $73KQ4$useEffect } 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-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-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";
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-collapsible@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-collapsible/dist/index.mjs
var $409067139f391064$var$COLLAPSIBLE_NAME = "Collapsible";
var _$c512c27ab02ef895$export$50c7b4e9d9f19c1 = _sliced_to_array($c512c27ab02ef895$export$50c7b4e9d9f19c1($409067139f391064$var$COLLAPSIBLE_NAME), 2), $409067139f391064$var$createCollapsibleContext = _$c512c27ab02ef895$export$50c7b4e9d9f19c1[0], $409067139f391064$export$952b32dcbe73087a = _$c512c27ab02ef895$export$50c7b4e9d9f19c1[1];
var _$409067139f391064$var$createCollapsibleContext = _sliced_to_array($409067139f391064$var$createCollapsibleContext($409067139f391064$var$COLLAPSIBLE_NAME), 2), $409067139f391064$var$CollapsibleProvider = _$409067139f391064$var$createCollapsibleContext[0], $409067139f391064$var$useCollapsibleContext = _$409067139f391064$var$createCollapsibleContext[1];
var $409067139f391064$export$6eb0f7ddcda6131f = /* @__PURE__ */ $73KQ4$forwardRef(function(props, forwardedRef) {
    var __scopeCollapsible = props.__scopeCollapsible, openProp = props.open, defaultOpen = props.defaultOpen, disabled = props.disabled, onOpenChange = props.onOpenChange, collapsibleProps = _object_without_properties(props, [
        "__scopeCollapsible",
        "open",
        "defaultOpen",
        "disabled",
        "onOpenChange"
    ]);
    var _$71cd76cc60e0454e$export$6f32135080cb4c3 = _sliced_to_array($71cd76cc60e0454e$export$6f32135080cb4c3({
        prop: openProp,
        defaultProp: defaultOpen,
        onChange: onOpenChange
    }), 2), tmp = _$71cd76cc60e0454e$export$6f32135080cb4c3[0], open = tmp === void 0 ? false : tmp, setOpen = _$71cd76cc60e0454e$export$6f32135080cb4c3[1];
    return /* @__PURE__ */ $73KQ4$createElement($409067139f391064$var$CollapsibleProvider, {
        scope: __scopeCollapsible,
        disabled: disabled,
        contentId: $1746a345f3d73bb7$export$f680877a34711e37(),
        open: open,
        onOpenToggle: $73KQ4$useCallback(function() {
            return setOpen(function(prevOpen) {
                return !prevOpen;
            });
        }, [
            setOpen
        ])
    }, /* @__PURE__ */ $73KQ4$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
        "data-state": $409067139f391064$var$getState(open),
        "data-disabled": disabled ? "" : void 0
    }, collapsibleProps, {
        ref: forwardedRef
    })));
});
var $409067139f391064$var$TRIGGER_NAME = "CollapsibleTrigger";
var $409067139f391064$export$c135dce7b15bbbdc = /* @__PURE__ */ $73KQ4$forwardRef(function(props, forwardedRef) {
    var __scopeCollapsible = props.__scopeCollapsible, triggerProps = _object_without_properties(props, [
        "__scopeCollapsible"
    ]);
    var context = $409067139f391064$var$useCollapsibleContext($409067139f391064$var$TRIGGER_NAME, __scopeCollapsible);
    return /* @__PURE__ */ $73KQ4$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
        type: "button",
        "aria-controls": context.contentId,
        "aria-expanded": context.open || false,
        "data-state": $409067139f391064$var$getState(context.open),
        "data-disabled": context.disabled ? "" : void 0,
        disabled: context.disabled
    }, triggerProps, {
        ref: forwardedRef,
        onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, context.onOpenToggle)
    }));
});
var $409067139f391064$var$CONTENT_NAME = "CollapsibleContent";
var $409067139f391064$export$aadde00976f34151 = /* @__PURE__ */ $73KQ4$forwardRef(function(props, forwardedRef) {
    var forceMount = props.forceMount, contentProps = _object_without_properties(props, [
        "forceMount"
    ]);
    var context = $409067139f391064$var$useCollapsibleContext($409067139f391064$var$CONTENT_NAME, props.__scopeCollapsible);
    return /* @__PURE__ */ $73KQ4$createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
        present: forceMount || context.open
    }, function(param) {
        var present = param.present;
        return /* @__PURE__ */ $73KQ4$createElement($409067139f391064$var$CollapsibleContentImpl, _extends({}, contentProps, {
            ref: forwardedRef,
            present: present
        }));
    });
});
var $409067139f391064$var$CollapsibleContentImpl = /* @__PURE__ */ $73KQ4$forwardRef(function(props, forwardedRef) {
    var __scopeCollapsible = props.__scopeCollapsible, present = props.present, children = props.children, contentProps = _object_without_properties(props, [
        "__scopeCollapsible",
        "present",
        "children"
    ]);
    var context = $409067139f391064$var$useCollapsibleContext($409067139f391064$var$CONTENT_NAME, __scopeCollapsible);
    var _$73KQ4$useState = _sliced_to_array($73KQ4$useState(present), 2), isPresent = _$73KQ4$useState[0], setIsPresent = _$73KQ4$useState[1];
    var ref = $73KQ4$useRef(null);
    var composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
    var heightRef = $73KQ4$useRef(0);
    var height = heightRef.current;
    var widthRef = $73KQ4$useRef(0);
    var width = widthRef.current;
    var isOpen = context.open || isPresent;
    var isMountAnimationPreventedRef = $73KQ4$useRef(isOpen);
    var originalStylesRef = $73KQ4$useRef();
    $73KQ4$useEffect(function() {
        var rAF = requestAnimationFrame(function() {
            return isMountAnimationPreventedRef.current = false;
        });
        return function() {
            return cancelAnimationFrame(rAF);
        };
    }, []);
    $9f79659886946c16$export$e5c5a5f917a5871c(function() {
        var node = ref.current;
        if (node) {
            originalStylesRef.current = originalStylesRef.current || {
                transitionDuration: node.style.transitionDuration,
                animationName: node.style.animationName
            };
            node.style.transitionDuration = "0s";
            node.style.animationName = "none";
            var rect = node.getBoundingClientRect();
            heightRef.current = rect.height;
            widthRef.current = rect.width;
            if (!isMountAnimationPreventedRef.current) {
                node.style.transitionDuration = originalStylesRef.current.transitionDuration;
                node.style.animationName = originalStylesRef.current.animationName;
            }
            setIsPresent(present);
        }
    }, [
        context.open,
        present
    ]);
    var _obj;
    return /* @__PURE__ */ $73KQ4$createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
        "data-state": $409067139f391064$var$getState(context.open),
        "data-disabled": context.disabled ? "" : void 0,
        id: context.contentId,
        hidden: !isOpen
    }, contentProps, {
        ref: composedRefs,
        style: _object_spread((_obj = {}, _define_property(_obj, "--radix-collapsible-content-height", height ? "".concat(height, "px") : void 0), _define_property(_obj, "--radix-collapsible-content-width", width ? "".concat(width, "px") : void 0), _obj), props.style)
    }), isOpen && children);
});
function $409067139f391064$var$getState(open) {
    return open ? "open" : "closed";
}
var $409067139f391064$export$be92b6f5f03c0fe9 = $409067139f391064$export$6eb0f7ddcda6131f;
var $409067139f391064$export$41fb9f06171c75f4 = $409067139f391064$export$c135dce7b15bbbdc;
var $409067139f391064$export$7c6e2c02157bb7d2 = $409067139f391064$export$aadde00976f34151;
// ../../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-accordion@1.1.2_@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-accordion/dist/index.mjs
var $1bf158f521e1b1b4$var$ACCORDION_NAME = "Accordion";
var $1bf158f521e1b1b4$var$ACCORDION_KEYS = [
    "Home",
    "End",
    "ArrowDown",
    "ArrowUp",
    "ArrowLeft",
    "ArrowRight"
];
var _$e02a7d9cb1dc128c$export$c74125a8e3af6bb2 = _sliced_to_array($e02a7d9cb1dc128c$export$c74125a8e3af6bb2($1bf158f521e1b1b4$var$ACCORDION_NAME), 3), $1bf158f521e1b1b4$var$Collection = _$e02a7d9cb1dc128c$export$c74125a8e3af6bb2[0], $1bf158f521e1b1b4$var$useCollection = _$e02a7d9cb1dc128c$export$c74125a8e3af6bb2[1], $1bf158f521e1b1b4$var$createCollectionScope = _$e02a7d9cb1dc128c$export$c74125a8e3af6bb2[2];
var _$c512c27ab02ef895$export$50c7b4e9d9f19c11 = _sliced_to_array($c512c27ab02ef895$export$50c7b4e9d9f19c1($1bf158f521e1b1b4$var$ACCORDION_NAME, [
    $1bf158f521e1b1b4$var$createCollectionScope,
    $409067139f391064$export$952b32dcbe73087a
]), 2), $1bf158f521e1b1b4$var$createAccordionContext = _$c512c27ab02ef895$export$50c7b4e9d9f19c11[0], $1bf158f521e1b1b4$export$9748edc328a73be1 = _$c512c27ab02ef895$export$50c7b4e9d9f19c11[1];
var $1bf158f521e1b1b4$var$useCollapsibleScope = $409067139f391064$export$952b32dcbe73087a();
var $1bf158f521e1b1b4$export$a766cd26d0d69044 = /* @__PURE__ */ $3DjNB$react.forwardRef(function(props, forwardedRef) {
    var type = props.type, accordionProps = _object_without_properties(props, [
        "type"
    ]);
    var singleProps = accordionProps;
    var multipleProps = accordionProps;
    return /* @__PURE__ */ $3DjNB$react.createElement($1bf158f521e1b1b4$var$Collection.Provider, {
        scope: props.__scopeAccordion
    }, type === "multiple" ? /* @__PURE__ */ $3DjNB$react.createElement($1bf158f521e1b1b4$var$AccordionImplMultiple, _extends({}, multipleProps, {
        ref: forwardedRef
    })) : /* @__PURE__ */ $3DjNB$react.createElement($1bf158f521e1b1b4$var$AccordionImplSingle, _extends({}, singleProps, {
        ref: forwardedRef
    })));
});
$1bf158f521e1b1b4$export$a766cd26d0d69044.propTypes = {
    type: function type(props) {
        var value = props.value || props.defaultValue;
        if (props.type && ![
            "single",
            "multiple"
        ].includes(props.type)) return new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`.");
        if (props.type === "multiple" && typeof value === "string") return new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`.");
        if (props.type === "single" && Array.isArray(value)) return new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`.");
        return null;
    }
};
var _$1bf158f521e1b1b4$var$createAccordionContext = _sliced_to_array($1bf158f521e1b1b4$var$createAccordionContext($1bf158f521e1b1b4$var$ACCORDION_NAME), 2), $1bf158f521e1b1b4$var$AccordionValueProvider = _$1bf158f521e1b1b4$var$createAccordionContext[0], $1bf158f521e1b1b4$var$useAccordionValueContext = _$1bf158f521e1b1b4$var$createAccordionContext[1];
var _$1bf158f521e1b1b4$var$createAccordionContext1 = _sliced_to_array($1bf158f521e1b1b4$var$createAccordionContext($1bf158f521e1b1b4$var$ACCORDION_NAME, {
    collapsible: false
}), 2), $1bf158f521e1b1b4$var$AccordionCollapsibleProvider = _$1bf158f521e1b1b4$var$createAccordionContext1[0], $1bf158f521e1b1b4$var$useAccordionCollapsibleContext = _$1bf158f521e1b1b4$var$createAccordionContext1[1];
var $1bf158f521e1b1b4$var$AccordionImplSingle = /* @__PURE__ */ $3DjNB$react.forwardRef(function(props, forwardedRef) {
    var valueProp = props.value, defaultValue = props.defaultValue, _props_onValueChange = props.onValueChange, onValueChange = _props_onValueChange === void 0 ? function() {} : _props_onValueChange, _props_collapsible = props.collapsible, collapsible = _props_collapsible === void 0 ? false : _props_collapsible, accordionSingleProps = _object_without_properties(props, [
        "value",
        "defaultValue",
        "onValueChange",
        "collapsible"
    ]);
    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__ */ $3DjNB$react.createElement($1bf158f521e1b1b4$var$AccordionValueProvider, {
        scope: props.__scopeAccordion,
        value: value ? [
            value
        ] : [],
        onItemOpen: setValue,
        onItemClose: $3DjNB$react.useCallback(function() {
            return collapsible && setValue("");
        }, [
            collapsible,
            setValue
        ])
    }, /* @__PURE__ */ $3DjNB$react.createElement($1bf158f521e1b1b4$var$AccordionCollapsibleProvider, {
        scope: props.__scopeAccordion,
        collapsible: collapsible
    }, /* @__PURE__ */ $3DjNB$react.createElement($1bf158f521e1b1b4$var$AccordionImpl, _extends({}, accordionSingleProps, {
        ref: forwardedRef
    }))));
});
var $1bf158f521e1b1b4$var$AccordionImplMultiple = /* @__PURE__ */ $3DjNB$react.forwardRef(function(props, forwardedRef) {
    var valueProp = props.value, defaultValue = props.defaultValue, _props_onValueChange = props.onValueChange, onValueChange = _props_onValueChange === void 0 ? function() {} : _props_onValueChange, accordionMultipleProps = _object_without_properties(props, [
        "value",
        "defaultValue",
        "onValueChange"
    ]);
    var _$71cd76cc60e0454e$export$6f32135080cb4c3 = _sliced_to_array($71cd76cc60e0454e$export$6f32135080cb4c3({
        prop: valueProp,
        defaultProp: defaultValue,
        onChange: onValueChange
    }), 2), tmp = _$71cd76cc60e0454e$export$6f32135080cb4c3[0], value1 = tmp === void 0 ? [] : tmp, setValue = _$71cd76cc60e0454e$export$6f32135080cb4c3[1];
    var handleItemOpen = $3DjNB$react.useCallback(function(itemValue) {
        return setValue(function() {
            var prevValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
            return _to_consumable_array(prevValue).concat([
                itemValue
            ]);
        });
    }, [
        setValue
    ]);
    var handleItemClose = $3DjNB$react.useCallback(function(itemValue) {
        return setValue(function() {
            var prevValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
            return prevValue.filter(function(value) {
                return value !== itemValue;
            });
        });
    }, [
        setValue
    ]);
    return /* @__PURE__ */ $3DjNB$react.createElement($1bf158f521e1b1b4$var$AccordionValueProvider, {
        scope: props.__scopeAccordion,
        value: value1,
        onItemOpen: handleItemOpen,
        onItemClose: handleItemClose
    }, /* @__PURE__ */ $3DjNB$react.createElement($1bf158f521e1b1b4$var$AccordionCollapsibleProvider, {
        scope: props.__scopeAccordion,
        collapsible: true
    }, /* @__PURE__ */ $3DjNB$react.createElement($1bf158f521e1b1b4$var$AccordionImpl, _extends({}, accordionMultipleProps, {
        ref: forwardedRef
    }))));
});
var _$1bf158f521e1b1b4$var$createAccordionContext2 = _sliced_to_array($1bf158f521e1b1b4$var$createAccordionContext($1bf158f521e1b1b4$var$ACCORDION_NAME), 2), $1bf158f521e1b1b4$var$AccordionImplProvider = _$1bf158f521e1b1b4$var$createAccordionContext2[0], $1bf158f521e1b1b4$var$useAccordionContext = _$1bf158f521e1b1b4$var$createAccordionContext2[1];
var $1bf158f521e1b1b4$var$AccordionImpl = /* @__PURE__ */ $3DjNB$react.forwardRef(function(props, forwardedRef) {
    var __scopeAccordion = props.__scopeAccordion, disabled = props.disabled, dir = props.dir, _props_orientation = props.orientation, orientation = _props_orientation === void 0 ? "vertical" : _props_orientation, accordionProps = _object_without_properties(props, [
        "__scopeAccordion",
        "disabled",
        "dir",
        "orientation"
    ]);
    var accordionRef = $3DjNB$react.useRef(null);
    var composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(accordionRef, forwardedRef);
    var getItems = $1bf158f521e1b1b4$var$useCollection(__scopeAccordion);
    var direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
    var isDirectionLTR = direction === "ltr";
    var handleKeyDown = $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, function(event) {
        var _triggerCollection$cl;
        if (!$1bf158f521e1b1b4$var$ACCORDION_KEYS.includes(event.key)) return;
        var target = event.target;
        var triggerCollection = getItems().filter(function(item) {
            var _item$ref$current;
            return !((_item$ref$current = item.ref.current) !== null && _item$ref$current !== void 0 && _item$ref$current.disabled);
        });
        var triggerIndex = triggerCollection.findIndex(function(item) {
            return item.ref.current === target;
        });
        var triggerCount = triggerCollection.length;
        if (triggerIndex === -1) return;
        event.preventDefault();
        var nextIndex = triggerIndex;
        var homeIndex = 0;
        var endIndex = triggerCount - 1;
        var moveNext = function() {
            nextIndex = triggerIndex + 1;
            if (nextIndex > endIndex) nextIndex = homeIndex;
        };
        var movePrev = function() {
            nextIndex = triggerIndex - 1;
            if (nextIndex < homeIndex) nextIndex = endIndex;
        };
        switch(event.key){
            case "Home":
                nextIndex = homeIndex;
                break;
            case "End":
                nextIndex = endIndex;
                break;
            case "ArrowRight":
                if (orientation === "horizontal") {
                    if (isDirectionLTR) moveNext();
                    else movePrev();
                }
                break;
            case "ArrowDown":
                if (orientation === "vertical") moveNext();
                break;
            case "ArrowLeft":
                if (orientation === "horizontal") {
                    if (isDirectionLTR) movePrev();
                    else moveNext();
                }
                break;
            case "ArrowUp":
                if (orientation === "vertical") movePrev();
                break;
        }
        var clampedIndex = nextIndex % triggerCount;
        (_triggerCollection$cl = triggerCollection[clampedIndex].ref.current) === null || _triggerCollection$cl === void 0 || _triggerCollection$cl.focus();
    });
    return /* @__PURE__ */ $3DjNB$react.createElement($1bf158f521e1b1b4$var$AccordionImplProvider, {
        scope: __scopeAccordion,
        disabled: disabled,
        direction: dir,
        orientation: orientation
    }, /* @__PURE__ */ $3DjNB$react.createElement($1bf158f521e1b1b4$var$Collection.Slot, {
        scope: __scopeAccordion
    }, /* @__PURE__ */ $3DjNB$react.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({}, accordionProps, {
        "data-orientation": orientation,
        ref: composedRefs,
        onKeyDown: disabled ? void 0 : handleKeyDown
    }))));
});
var $1bf158f521e1b1b4$var$ITEM_NAME = "AccordionItem";
var _$1bf158f521e1b1b4$var$createAccordionContext3 = _sliced_to_array($1bf158f521e1b1b4$var$createAccordionContext($1bf158f521e1b1b4$var$ITEM_NAME), 2), $1bf158f521e1b1b4$var$AccordionItemProvider = _$1bf158f521e1b1b4$var$createAccordionContext3[0], $1bf158f521e1b1b4$var$useAccordionItemContext = _$1bf158f521e1b1b4$var$createAccordionContext3[1];
var $1bf158f521e1b1b4$export$d99097c13d4dac9f = /* @__PURE__ */ $3DjNB$react.forwardRef(function(props, forwardedRef) {
    var __scopeAccordion = props.__scopeAccordion, value = props.value, accordionItemProps = _object_without_properties(props, [
        "__scopeAccordion",
        "value"
    ]);
    var accordionContext = $1bf158f521e1b1b4$var$useAccordionContext($1bf158f521e1b1b4$var$ITEM_NAME, __scopeAccordion);
    var valueContext = $1bf158f521e1b1b4$var$useAccordionValueContext($1bf158f521e1b1b4$var$ITEM_NAME, __scopeAccordion);
    var collapsibleScope = $1bf158f521e1b1b4$var$useCollapsibleScope(__scopeAccordion);
    var triggerId = $1746a345f3d73bb7$export$f680877a34711e37();
    var open1 = value && valueContext.value.includes(value) || false;
    var disabled = accordionContext.disabled || props.disabled;
    return /* @__PURE__ */ $3DjNB$react.createElement($1bf158f521e1b1b4$var$AccordionItemProvider, {
        scope: __scopeAccordion,
        open: open1,
        disabled: disabled,
        triggerId: triggerId
    }, /* @__PURE__ */ $3DjNB$react.createElement($409067139f391064$export$be92b6f5f03c0fe9, _extends({
        "data-orientation": accordionContext.orientation,
        "data-state": $1bf158f521e1b1b4$var$getState(open1)
    }, collapsibleScope, accordionItemProps, {
        ref: forwardedRef,
        disabled: disabled,
        open: open1,
        onOpenChange: function(open) {
            if (open) valueContext.onItemOpen(value);
            else valueContext.onItemClose(value);
        }
    })));
});
var $1bf158f521e1b1b4$var$HEADER_NAME = "AccordionHeader";
var $1bf158f521e1b1b4$export$5e3e5deaaf81ee41 = /* @__PURE__ */ $3DjNB$react.forwardRef(function(props, forwardedRef) {
    var __scopeAccordion = props.__scopeAccordion, headerProps = _object_without_properties(props, [
        "__scopeAccordion"
    ]);
    var accordionContext = $1bf158f521e1b1b4$var$useAccordionContext($1bf158f521e1b1b4$var$ACCORDION_NAME, __scopeAccordion);
    var itemContext = $1bf158f521e1b1b4$var$useAccordionItemContext($1bf158f521e1b1b4$var$HEADER_NAME, __scopeAccordion);
    return /* @__PURE__ */ $3DjNB$react.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.h3, _extends({
        "data-orientation": accordionContext.orientation,
        "data-state": $1bf158f521e1b1b4$var$getState(itemContext.open),
        "data-disabled": itemContext.disabled ? "" : void 0
    }, headerProps, {
        ref: forwardedRef
    }));
});
var $1bf158f521e1b1b4$var$TRIGGER_NAME = "AccordionTrigger";
var $1bf158f521e1b1b4$export$94e939b1f85bdd73 = /* @__PURE__ */ $3DjNB$react.forwardRef(function(props, forwardedRef) {
    var __scopeAccordion = props.__scopeAccordion, triggerProps = _object_without_properties(props, [
        "__scopeAccordion"
    ]);
    var accordionContext = $1bf158f521e1b1b4$var$useAccordionContext($1bf158f521e1b1b4$var$ACCORDION_NAME, __scopeAccordion);
    var itemContext = $1bf158f521e1b1b4$var$useAccordionItemContext($1bf158f521e1b1b4$var$TRIGGER_NAME, __scopeAccordion);
    var collapsibleContext = $1bf158f521e1b1b4$var$useAccordionCollapsibleContext($1bf158f521e1b1b4$var$TRIGGER_NAME, __scopeAccordion);
    var collapsibleScope = $1bf158f521e1b1b4$var$useCollapsibleScope(__scopeAccordion);
    return /* @__PURE__ */ $3DjNB$react.createElement($1bf158f521e1b1b4$var$Collection.ItemSlot, {
        scope: __scopeAccordion
    }, /* @__PURE__ */ $3DjNB$react.createElement($409067139f391064$export$41fb9f06171c75f4, _extends({
        "aria-disabled": itemContext.open && !collapsibleContext.collapsible || void 0,
        "data-orientation": accordionContext.orientation,
        id: itemContext.triggerId
    }, collapsibleScope, triggerProps, {
        ref: forwardedRef
    })));
});
var $1bf158f521e1b1b4$var$CONTENT_NAME = "AccordionContent";
var $1bf158f521e1b1b4$export$985b9a77379b54a0 = /* @__PURE__ */ $3DjNB$react.forwardRef(function(props, forwardedRef) {
    var __scopeAccordion = props.__scopeAccordion, contentProps = _object_without_properties(props, [
        "__scopeAccordion"
    ]);
    var accordionContext = $1bf158f521e1b1b4$var$useAccordionContext($1bf158f521e1b1b4$var$ACCORDION_NAME, __scopeAccordion);
    var itemContext = $1bf158f521e1b1b4$var$useAccordionItemContext($1bf158f521e1b1b4$var$CONTENT_NAME, __scopeAccordion);
    var collapsibleScope = $1bf158f521e1b1b4$var$useCollapsibleScope(__scopeAccordion);
    var _obj;
    return /* @__PURE__ */ $3DjNB$react.createElement($409067139f391064$export$7c6e2c02157bb7d2, _extends({
        role: "region",
        "aria-labelledby": itemContext.triggerId,
        "data-orientation": accordionContext.orientation
    }, collapsibleScope, contentProps, {
        ref: forwardedRef,
        style: _object_spread((_obj = {}, _define_property(_obj, "--radix-accordion-content-height", "var(--radix-collapsible-content-height)"), _define_property(_obj, "--radix-accordion-content-width", "var(--radix-collapsible-content-width)"), _obj), props.style)
    }));
});
function $1bf158f521e1b1b4$var$getState(open) {
    return open ? "open" : "closed";
}
var $1bf158f521e1b1b4$export$be92b6f5f03c0fe9 = $1bf158f521e1b1b4$export$a766cd26d0d69044;
var $1bf158f521e1b1b4$export$6d08773d2e66f8f2 = $1bf158f521e1b1b4$export$d99097c13d4dac9f;
var $1bf158f521e1b1b4$export$8b251419efc915eb = $1bf158f521e1b1b4$export$5e3e5deaaf81ee41;
var $1bf158f521e1b1b4$export$41fb9f06171c75f4 = $1bf158f521e1b1b4$export$94e939b1f85bdd73;
var $1bf158f521e1b1b4$export$7c6e2c02157bb7d2 = $1bf158f521e1b1b4$export$985b9a77379b54a0;
// ../../node_modules/.pnpm/@radix-ui+react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js
import { forwardRef, createElement } from "react";
function _objectWithoutPropertiesLoose(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;
}
var _excluded$W = [
    "color"
];
var ChevronDownIcon = /* @__PURE__ */ forwardRef(function(_ref, forwardedRef) {
    var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, props = _objectWithoutPropertiesLoose(_ref, _excluded$W);
    return createElement("svg", Object.assign({
        width: "15",
        height: "15",
        viewBox: "0 0 15 15",
        fill: "none",
        xmlns: "http://www.w3.org/2000/svg"
    }, props, {
        ref: forwardedRef
    }), createElement("path", {
        d: "M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",
        fill: color,
        fillRule: "evenodd",
        clipRule: "evenodd"
    }));
});
// 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/new-york/ui/accordion.tsx
import { jsx, jsxs } from "react/jsx-runtime";
var Accordion = $1bf158f521e1b1b4$export$be92b6f5f03c0fe9;
var AccordionItem = React.forwardRef(function(_param, ref) {
    var className = _param.className, props = _object_without_properties(_param, [
        "className"
    ]);
    return /* @__PURE__ */ jsx($1bf158f521e1b1b4$export$6d08773d2e66f8f2, _object_spread({
        ref: ref,
        className: cn("border-b", className)
    }, props));
});
AccordionItem.displayName = "AccordionItem";
var AccordionTrigger = React.forwardRef(function(_param, ref) {
    var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
        "className",
        "children"
    ]);
    return /* @__PURE__ */ jsx($1bf158f521e1b1b4$export$8b251419efc915eb, {
        className: "flex",
        children: /* @__PURE__ */ jsxs($1bf158f521e1b1b4$export$41fb9f06171c75f4, _object_spread_props(_object_spread({
            ref: ref,
            className: cn("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", className)
        }, props), {
            children: [
                children,
                /* @__PURE__ */ jsx(ChevronDownIcon, {
                    className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"
                })
            ]
        }))
    });
});
AccordionTrigger.displayName = $1bf158f521e1b1b4$export$41fb9f06171c75f4.displayName;
var AccordionContent = React.forwardRef(function(_param, ref) {
    var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
        "className",
        "children"
    ]);
    return /* @__PURE__ */ jsx($1bf158f521e1b1b4$export$7c6e2c02157bb7d2, _object_spread_props(_object_spread({
        ref: ref,
        className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
    }, props), {
        children: /* @__PURE__ */ jsx("div", {
            className: cn("pb-4 pt-0", className),
            children: children
        })
    }));
});
AccordionContent.displayName = $1bf158f521e1b1b4$export$7c6e2c02157bb7d2.displayName;
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
//# sourceMappingURL=accordion.mjs.map