@weaverclub/render 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
14
14
  1. You might have mismatching versions of React and the renderer (such as React DOM)
15
15
  2. You might be breaking the Rules of Hooks
16
16
  3. You might have more than one copy of React in the same app
17
- See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),N}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var _={d:{f:J,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:J,C:J,L:J,m:J,X:J,S:J,M:J},p:0,findDOMNode:null},L=Symbol.for("react.portal"),F=cH.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map==="function"&&Map.prototype!=null&&typeof Map.prototype.forEach==="function"&&typeof Set==="function"&&Set.prototype!=null&&typeof Set.prototype.clear==="function"&&typeof Set.prototype.forEach==="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),FP.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_,FP.createPortal=function(N,V){var k=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!V||V.nodeType!==1&&V.nodeType!==9&&V.nodeType!==11)throw Error("Target container is not a DOM element.");return Y(N,V,null,k)},FP.flushSync=function(N){var V=F.T,k=_.p;try{if(F.T=null,_.p=2,N)return N()}finally{F.T=V,_.p=k,_.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},FP.preconnect=function(N,V){typeof N==="string"&&N?V!=null&&typeof V!=="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",U(V)):V!=null&&typeof V.crossOrigin!=="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",K(V.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",K(N)),typeof N==="string"&&(V?(V=V.crossOrigin,V=typeof V==="string"?V==="use-credentials"?V:"":void 0):V=null,_.d.C(N,V))},FP.prefetchDNS=function(N){if(typeof N!=="string"||!N)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",K(N));else if(1<arguments.length){var V=arguments[1];typeof V==="object"&&V.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",U(V)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",U(V))}typeof N==="string"&&_.d.D(N)},FP.preinit=function(N,V){if(typeof N==="string"&&N?V==null||typeof V!=="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",U(V)):V.as!=="style"&&V.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',U(V.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",K(N)),typeof N==="string"&&V&&typeof V.as==="string"){var k=V.as,A=W(k,V.crossOrigin),D=typeof V.integrity==="string"?V.integrity:void 0,M=typeof V.fetchPriority==="string"?V.fetchPriority:void 0;k==="style"?_.d.S(N,typeof V.precedence==="string"?V.precedence:void 0,{crossOrigin:A,integrity:D,fetchPriority:M}):k==="script"&&_.d.X(N,{crossOrigin:A,integrity:D,fetchPriority:M,nonce:typeof V.nonce==="string"?V.nonce:void 0})}},FP.preinitModule=function(N,V){var k="";if(typeof N==="string"&&N||(k+=" The `href` argument encountered was "+K(N)+"."),V!==void 0&&typeof V!=="object"?k+=" The `options` argument encountered was "+K(V)+".":V&&("as"in V)&&V.as!=="script"&&(k+=" The `as` option encountered was "+U(V.as)+"."),k)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",k);else switch(k=V&&typeof V.as==="string"?V.as:"script",k){case"script":break;default:k=U(k),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',k,N)}if(typeof N==="string")if(typeof V==="object"&&V!==null){if(V.as==null||V.as==="script")k=W(V.as,V.crossOrigin),_.d.M(N,{crossOrigin:k,integrity:typeof V.integrity==="string"?V.integrity:void 0,nonce:typeof V.nonce==="string"?V.nonce:void 0})}else V==null&&_.d.M(N)},FP.preload=function(N,V){var k="";if(typeof N==="string"&&N||(k+=" The `href` argument encountered was "+K(N)+"."),V==null||typeof V!=="object"?k+=" The `options` argument encountered was "+K(V)+".":typeof V.as==="string"&&V.as||(k+=" The `as` option encountered was "+K(V.as)+"."),k&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',k),typeof N==="string"&&typeof V==="object"&&V!==null&&typeof V.as==="string"){k=V.as;var A=W(k,V.crossOrigin);_.d.L(N,k,{crossOrigin:A,integrity:typeof V.integrity==="string"?V.integrity:void 0,nonce:typeof V.nonce==="string"?V.nonce:void 0,type:typeof V.type==="string"?V.type:void 0,fetchPriority:typeof V.fetchPriority==="string"?V.fetchPriority:void 0,referrerPolicy:typeof V.referrerPolicy==="string"?V.referrerPolicy:void 0,imageSrcSet:typeof V.imageSrcSet==="string"?V.imageSrcSet:void 0,imageSizes:typeof V.imageSizes==="string"?V.imageSizes:void 0,media:typeof V.media==="string"?V.media:void 0})}},FP.preloadModule=function(N,V){var k="";typeof N==="string"&&N||(k+=" The `href` argument encountered was "+K(N)+"."),V!==void 0&&typeof V!=="object"?k+=" The `options` argument encountered was "+K(V)+".":V&&("as"in V)&&typeof V.as!=="string"&&(k+=" The `as` option encountered was "+K(V.as)+"."),k&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',k),typeof N==="string"&&(V?(k=W(V.as,V.crossOrigin),_.d.m(N,{as:typeof V.as==="string"&&V.as!=="script"?V.as:void 0,crossOrigin:k,integrity:typeof V.integrity==="string"?V.integrity:void 0})):_.d.m(N))},FP.requestFormReset=function(N){_.d.r(N)},FP.unstable_batchedUpdates=function(N,V){return N(V)},FP.useFormState=function(N,V,k){return q().useFormState(N,V,k)},FP.useFormStatus=function(){return q().useHostTransitionStatus()},FP.version="19.2.3",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var m8=f8((kg,iA)=>{iA.exports=lA()});var rA=f8((NP)=>{var T1=c(cA()),Bz=c(G0()),lH=c(m8());(function(){function J(w,z){for(w=w.memoizedState;w!==null&&0<z;)w=w.next,z--;return w}function X(w,z,Z,$){if(Z>=z.length)return $;var G=z[Z],Q=Pw(w)?w.slice():H1({},w);return Q[G]=X(w[G],z,Z+1,$),Q}function Y(w,z,Z){if(z.length!==Z.length)console.warn("copyWithRename() expects paths of the same length");else{for(var $=0;$<Z.length-1;$++)if(z[$]!==Z[$]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return W(w,z,Z,0)}}function W(w,z,Z,$){var G=z[$],Q=Pw(w)?w.slice():H1({},w);return $+1===z.length?(Q[Z[$]]=Q[G],Pw(Q)?Q.splice(G,1):delete Q[G]):Q[G]=W(w[G],z,Z,$+1),Q}function K(w,z,Z){var $=z[Z],G=Pw(w)?w.slice():H1({},w);if(Z+1===z.length)return Pw(G)?G.splice($,1):delete G[$],G;return G[$]=K(w[$],z,Z+1),G}function U(){return!1}function q(){return null}function _(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function L(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function F(){}function N(){}function V(w){var z=[];return w.forEach(function(Z){z.push(Z)}),z.sort().join(", ")}function k(w,z,Z,$){return new zv(w,z,Z,$)}function A(w,z){w.context===Q4&&(WU(w.current,2,z,w,null,null),D9())}function D(w,z){if(_5!==null){var Z=z.staleFamilies;z=z.updatedFamilies,cZ(),oB(w.current,z,Z),D9()}}function M(w){_5=w}function h(w){return!(!w||w.nodeType!==1&&w.nodeType!==9&&w.nodeType!==11)}function v(w){var z=w,Z=w;if(w.alternate)for(;z.return;)z=z.return;else{w=z;do z=w,(z.flags&4098)!==0&&(Z=z.return),w=z.return;while(w)}return z.tag===3?Z:null}function x(w){if(w.tag===13){var z=w.memoizedState;if(z===null&&(w=w.alternate,w!==null&&(z=w.memoizedState)),z!==null)return z.dehydrated}return null}function I(w){if(w.tag===31){var z=w.memoizedState;if(z===null&&(w=w.alternate,w!==null&&(z=w.memoizedState)),z!==null)return z.dehydrated}return null}function b(w){if(v(w)!==w)throw Error("Unable to find node on an unmounted component.")}function E(w){var z=w.alternate;if(!z){if(z=v(w),z===null)throw Error("Unable to find node on an unmounted component.");return z!==w?null:w}for(var Z=w,$=z;;){var G=Z.return;if(G===null)break;var Q=G.alternate;if(Q===null){if($=G.return,$!==null){Z=$;continue}break}if(G.child===Q.child){for(Q=G.child;Q;){if(Q===Z)return b(G),w;if(Q===$)return b(G),z;Q=Q.sibling}throw Error("Unable to find node on an unmounted component.")}if(Z.return!==$.return)Z=G,$=Q;else{for(var H=!1,B=G.child;B;){if(B===Z){H=!0,Z=G,$=Q;break}if(B===$){H=!0,$=G,Z=Q;break}B=B.sibling}if(!H){for(B=Q.child;B;){if(B===Z){H=!0,Z=Q,$=G;break}if(B===$){H=!0,$=Q,Z=G;break}B=B.sibling}if(!H)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(Z.alternate!==$)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(Z.tag!==3)throw Error("Unable to find node on an unmounted component.");return Z.stateNode.current===Z?w:z}function m(w){var z=w.tag;if(z===5||z===26||z===27||z===6)return w;for(w=w.child;w!==null;){if(z=m(w),z!==null)return z;w=w.sibling}return null}function R(w){if(w===null||typeof w!=="object")return null;return w=JN&&w[JN]||w["@@iterator"],typeof w==="function"?w:null}function S(w){if(w==null)return null;if(typeof w==="function")return w.$$typeof===jh?null:w.displayName||w.name||null;if(typeof w==="string")return w;switch(w){case I9:return"Fragment";case BU:return"Profiler";case V3:return"StrictMode";case VU:return"Suspense";case FU:return"SuspenseList";case NU:return"Activity"}if(typeof w==="object")switch(typeof w.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),w.$$typeof){case P9:return"Portal";case v8:return w.displayName||"Context";case LU:return(w._context.displayName||"Context")+".Consumer";case wJ:var z=w.render;return w=w.displayName,w||(w=z.displayName||z.name||"",w=w!==""?"ForwardRef("+w+")":"ForwardRef"),w;case F3:return z=w.displayName||null,z!==null?z:S(w.type)||"Memo";case c2:z=w._payload,w=w._init;try{return S(w(z))}catch(Z){}}return null}function p(w){return typeof w.tag==="number"?d(w):typeof w.name==="string"?w.name:null}function d(w){var z=w.type;switch(w.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(z._context.displayName||"Context")+".Consumer";case 10:return z.displayName||"Context";case 18:return"DehydratedFragment";case 11:return w=z.render,w=w.displayName||w.name||"",z.displayName||(w!==""?"ForwardRef("+w+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return z;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return S(z);case 8:return z===V3?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof z==="function")return z.displayName||z.name||null;if(typeof z==="string")return z;break;case 29:if(z=w._debugInfo,z!=null){for(var Z=z.length-1;0<=Z;Z--)if(typeof z[Z].name==="string")return z[Z].name}if(w.return!==null)return d(w.return)}return null}function w0(w){return{current:w}}function t(w,z){0>G6?console.error("Unexpected pop."):(z!==AU[G6]&&console.error("Unexpected Fiber popped."),w.current=kU[G6],kU[G6]=null,AU[G6]=null,G6--)}function u(w,z,Z){G6++,kU[G6]=w.current,AU[G6]=Z,w.current=z}function Q0(w){return w===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),w}function r(w,z){u(Z4,z,w),u(zJ,w,w),u(z4,null,w);var Z=z.nodeType;switch(Z){case 9:case 11:Z=Z===9?"#document":"#fragment",z=(z=z.documentElement)?(z=z.namespaceURI)?xF(z):A6:A6;break;default:if(Z=z.tagName,z=z.namespaceURI)z=xF(z),z=vF(z,Z);else switch(Z){case"svg":z=Hz;break;case"math":z=LY;break;default:z=A6}}Z=Z.toLowerCase(),Z=AB(null,Z),Z={context:z,ancestorInfo:Z},t(z4,w),u(z4,Z,w)}function e(w){t(z4,w),t(zJ,w),t(Z4,w)}function o(){return Q0(z4.current)}function g(w){w.memoizedState!==null&&u(N3,w,w);var z=Q0(z4.current),Z=w.type,$=vF(z.context,Z);Z=AB(z.ancestorInfo,Z),$={context:$,ancestorInfo:Z},z!==$&&(u(zJ,w,w),u(z4,$,w))}function X0(w){zJ.current===w&&(t(z4,w),t(zJ,w)),N3.current===w&&(t(N3,w),iJ._currentValue=b7)}function P(){}function z0(){if(ZJ===0){XN=console.log,$N=console.info,YN=console.warn,GN=console.error,QN=console.group,WN=console.groupCollapsed,KN=console.groupEnd;var w={configurable:!0,enumerable:!0,value:P,writable:!0};Object.defineProperties(console,{info:w,log:w,warn:w,error:w,group:w,groupCollapsed:w,groupEnd:w})}ZJ++}function U0(){if(ZJ--,ZJ===0){var w={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H1({},w,{value:XN}),info:H1({},w,{value:$N}),warn:H1({},w,{value:YN}),error:H1({},w,{value:GN}),group:H1({},w,{value:QN}),groupCollapsed:H1({},w,{value:WN}),groupEnd:H1({},w,{value:KN})})}0>ZJ&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function J0(w){var z=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,w=w.stack,Error.prepareStackTrace=z,w.startsWith(`Error: react-stack-top-frame
17
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),N}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var _={d:{f:J,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:J,C:J,L:J,m:J,X:J,S:J,M:J},p:0,findDOMNode:null},L=Symbol.for("react.portal"),F=cH.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map==="function"&&Map.prototype!=null&&typeof Map.prototype.forEach==="function"&&typeof Set==="function"&&Set.prototype!=null&&typeof Set.prototype.clear==="function"&&typeof Set.prototype.forEach==="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),FP.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_,FP.createPortal=function(N,V){var k=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!V||V.nodeType!==1&&V.nodeType!==9&&V.nodeType!==11)throw Error("Target container is not a DOM element.");return Y(N,V,null,k)},FP.flushSync=function(N){var V=F.T,k=_.p;try{if(F.T=null,_.p=2,N)return N()}finally{F.T=V,_.p=k,_.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},FP.preconnect=function(N,V){typeof N==="string"&&N?V!=null&&typeof V!=="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",U(V)):V!=null&&typeof V.crossOrigin!=="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",K(V.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",K(N)),typeof N==="string"&&(V?(V=V.crossOrigin,V=typeof V==="string"?V==="use-credentials"?V:"":void 0):V=null,_.d.C(N,V))},FP.prefetchDNS=function(N){if(typeof N!=="string"||!N)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",K(N));else if(1<arguments.length){var V=arguments[1];typeof V==="object"&&V.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",U(V)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",U(V))}typeof N==="string"&&_.d.D(N)},FP.preinit=function(N,V){if(typeof N==="string"&&N?V==null||typeof V!=="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",U(V)):V.as!=="style"&&V.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',U(V.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",K(N)),typeof N==="string"&&V&&typeof V.as==="string"){var k=V.as,A=W(k,V.crossOrigin),D=typeof V.integrity==="string"?V.integrity:void 0,M=typeof V.fetchPriority==="string"?V.fetchPriority:void 0;k==="style"?_.d.S(N,typeof V.precedence==="string"?V.precedence:void 0,{crossOrigin:A,integrity:D,fetchPriority:M}):k==="script"&&_.d.X(N,{crossOrigin:A,integrity:D,fetchPriority:M,nonce:typeof V.nonce==="string"?V.nonce:void 0})}},FP.preinitModule=function(N,V){var k="";if(typeof N==="string"&&N||(k+=" The `href` argument encountered was "+K(N)+"."),V!==void 0&&typeof V!=="object"?k+=" The `options` argument encountered was "+K(V)+".":V&&("as"in V)&&V.as!=="script"&&(k+=" The `as` option encountered was "+U(V.as)+"."),k)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",k);else switch(k=V&&typeof V.as==="string"?V.as:"script",k){case"script":break;default:k=U(k),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',k,N)}if(typeof N==="string")if(typeof V==="object"&&V!==null){if(V.as==null||V.as==="script")k=W(V.as,V.crossOrigin),_.d.M(N,{crossOrigin:k,integrity:typeof V.integrity==="string"?V.integrity:void 0,nonce:typeof V.nonce==="string"?V.nonce:void 0})}else V==null&&_.d.M(N)},FP.preload=function(N,V){var k="";if(typeof N==="string"&&N||(k+=" The `href` argument encountered was "+K(N)+"."),V==null||typeof V!=="object"?k+=" The `options` argument encountered was "+K(V)+".":typeof V.as==="string"&&V.as||(k+=" The `as` option encountered was "+K(V.as)+"."),k&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',k),typeof N==="string"&&typeof V==="object"&&V!==null&&typeof V.as==="string"){k=V.as;var A=W(k,V.crossOrigin);_.d.L(N,k,{crossOrigin:A,integrity:typeof V.integrity==="string"?V.integrity:void 0,nonce:typeof V.nonce==="string"?V.nonce:void 0,type:typeof V.type==="string"?V.type:void 0,fetchPriority:typeof V.fetchPriority==="string"?V.fetchPriority:void 0,referrerPolicy:typeof V.referrerPolicy==="string"?V.referrerPolicy:void 0,imageSrcSet:typeof V.imageSrcSet==="string"?V.imageSrcSet:void 0,imageSizes:typeof V.imageSizes==="string"?V.imageSizes:void 0,media:typeof V.media==="string"?V.media:void 0})}},FP.preloadModule=function(N,V){var k="";typeof N==="string"&&N||(k+=" The `href` argument encountered was "+K(N)+"."),V!==void 0&&typeof V!=="object"?k+=" The `options` argument encountered was "+K(V)+".":V&&("as"in V)&&typeof V.as!=="string"&&(k+=" The `as` option encountered was "+K(V.as)+"."),k&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',k),typeof N==="string"&&(V?(k=W(V.as,V.crossOrigin),_.d.m(N,{as:typeof V.as==="string"&&V.as!=="script"?V.as:void 0,crossOrigin:k,integrity:typeof V.integrity==="string"?V.integrity:void 0})):_.d.m(N))},FP.requestFormReset=function(N){_.d.r(N)},FP.unstable_batchedUpdates=function(N,V){return N(V)},FP.useFormState=function(N,V,k){return q().useFormState(N,V,k)},FP.useFormStatus=function(){return q().useHostTransitionStatus()},FP.version="19.2.3",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var m8=f8((jg,iA)=>{var NP=c(lA());iA.exports=NP});var rA=f8((kP)=>{var T1=c(cA()),Bz=c(G0()),lH=c(m8());(function(){function J(w,z){for(w=w.memoizedState;w!==null&&0<z;)w=w.next,z--;return w}function X(w,z,Z,$){if(Z>=z.length)return $;var G=z[Z],Q=Pw(w)?w.slice():H1({},w);return Q[G]=X(w[G],z,Z+1,$),Q}function Y(w,z,Z){if(z.length!==Z.length)console.warn("copyWithRename() expects paths of the same length");else{for(var $=0;$<Z.length-1;$++)if(z[$]!==Z[$]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return W(w,z,Z,0)}}function W(w,z,Z,$){var G=z[$],Q=Pw(w)?w.slice():H1({},w);return $+1===z.length?(Q[Z[$]]=Q[G],Pw(Q)?Q.splice(G,1):delete Q[G]):Q[G]=W(w[G],z,Z,$+1),Q}function K(w,z,Z){var $=z[Z],G=Pw(w)?w.slice():H1({},w);if(Z+1===z.length)return Pw(G)?G.splice($,1):delete G[$],G;return G[$]=K(w[$],z,Z+1),G}function U(){return!1}function q(){return null}function _(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function L(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function F(){}function N(){}function V(w){var z=[];return w.forEach(function(Z){z.push(Z)}),z.sort().join(", ")}function k(w,z,Z,$){return new zv(w,z,Z,$)}function A(w,z){w.context===Q4&&(WU(w.current,2,z,w,null,null),D9())}function D(w,z){if(_5!==null){var Z=z.staleFamilies;z=z.updatedFamilies,cZ(),oB(w.current,z,Z),D9()}}function M(w){_5=w}function h(w){return!(!w||w.nodeType!==1&&w.nodeType!==9&&w.nodeType!==11)}function v(w){var z=w,Z=w;if(w.alternate)for(;z.return;)z=z.return;else{w=z;do z=w,(z.flags&4098)!==0&&(Z=z.return),w=z.return;while(w)}return z.tag===3?Z:null}function x(w){if(w.tag===13){var z=w.memoizedState;if(z===null&&(w=w.alternate,w!==null&&(z=w.memoizedState)),z!==null)return z.dehydrated}return null}function I(w){if(w.tag===31){var z=w.memoizedState;if(z===null&&(w=w.alternate,w!==null&&(z=w.memoizedState)),z!==null)return z.dehydrated}return null}function b(w){if(v(w)!==w)throw Error("Unable to find node on an unmounted component.")}function E(w){var z=w.alternate;if(!z){if(z=v(w),z===null)throw Error("Unable to find node on an unmounted component.");return z!==w?null:w}for(var Z=w,$=z;;){var G=Z.return;if(G===null)break;var Q=G.alternate;if(Q===null){if($=G.return,$!==null){Z=$;continue}break}if(G.child===Q.child){for(Q=G.child;Q;){if(Q===Z)return b(G),w;if(Q===$)return b(G),z;Q=Q.sibling}throw Error("Unable to find node on an unmounted component.")}if(Z.return!==$.return)Z=G,$=Q;else{for(var H=!1,B=G.child;B;){if(B===Z){H=!0,Z=G,$=Q;break}if(B===$){H=!0,$=G,Z=Q;break}B=B.sibling}if(!H){for(B=Q.child;B;){if(B===Z){H=!0,Z=Q,$=G;break}if(B===$){H=!0,$=Q,Z=G;break}B=B.sibling}if(!H)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(Z.alternate!==$)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(Z.tag!==3)throw Error("Unable to find node on an unmounted component.");return Z.stateNode.current===Z?w:z}function m(w){var z=w.tag;if(z===5||z===26||z===27||z===6)return w;for(w=w.child;w!==null;){if(z=m(w),z!==null)return z;w=w.sibling}return null}function R(w){if(w===null||typeof w!=="object")return null;return w=JN&&w[JN]||w["@@iterator"],typeof w==="function"?w:null}function S(w){if(w==null)return null;if(typeof w==="function")return w.$$typeof===jh?null:w.displayName||w.name||null;if(typeof w==="string")return w;switch(w){case I9:return"Fragment";case BU:return"Profiler";case V3:return"StrictMode";case VU:return"Suspense";case FU:return"SuspenseList";case NU:return"Activity"}if(typeof w==="object")switch(typeof w.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),w.$$typeof){case P9:return"Portal";case v8:return w.displayName||"Context";case LU:return(w._context.displayName||"Context")+".Consumer";case wJ:var z=w.render;return w=w.displayName,w||(w=z.displayName||z.name||"",w=w!==""?"ForwardRef("+w+")":"ForwardRef"),w;case F3:return z=w.displayName||null,z!==null?z:S(w.type)||"Memo";case c2:z=w._payload,w=w._init;try{return S(w(z))}catch(Z){}}return null}function p(w){return typeof w.tag==="number"?d(w):typeof w.name==="string"?w.name:null}function d(w){var z=w.type;switch(w.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(z._context.displayName||"Context")+".Consumer";case 10:return z.displayName||"Context";case 18:return"DehydratedFragment";case 11:return w=z.render,w=w.displayName||w.name||"",z.displayName||(w!==""?"ForwardRef("+w+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return z;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return S(z);case 8:return z===V3?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof z==="function")return z.displayName||z.name||null;if(typeof z==="string")return z;break;case 29:if(z=w._debugInfo,z!=null){for(var Z=z.length-1;0<=Z;Z--)if(typeof z[Z].name==="string")return z[Z].name}if(w.return!==null)return d(w.return)}return null}function w0(w){return{current:w}}function t(w,z){0>G6?console.error("Unexpected pop."):(z!==AU[G6]&&console.error("Unexpected Fiber popped."),w.current=kU[G6],kU[G6]=null,AU[G6]=null,G6--)}function u(w,z,Z){G6++,kU[G6]=w.current,AU[G6]=Z,w.current=z}function Q0(w){return w===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),w}function r(w,z){u(Z4,z,w),u(zJ,w,w),u(z4,null,w);var Z=z.nodeType;switch(Z){case 9:case 11:Z=Z===9?"#document":"#fragment",z=(z=z.documentElement)?(z=z.namespaceURI)?xF(z):A6:A6;break;default:if(Z=z.tagName,z=z.namespaceURI)z=xF(z),z=vF(z,Z);else switch(Z){case"svg":z=Hz;break;case"math":z=LY;break;default:z=A6}}Z=Z.toLowerCase(),Z=AB(null,Z),Z={context:z,ancestorInfo:Z},t(z4,w),u(z4,Z,w)}function e(w){t(z4,w),t(zJ,w),t(Z4,w)}function o(){return Q0(z4.current)}function g(w){w.memoizedState!==null&&u(N3,w,w);var z=Q0(z4.current),Z=w.type,$=vF(z.context,Z);Z=AB(z.ancestorInfo,Z),$={context:$,ancestorInfo:Z},z!==$&&(u(zJ,w,w),u(z4,$,w))}function X0(w){zJ.current===w&&(t(z4,w),t(zJ,w)),N3.current===w&&(t(N3,w),iJ._currentValue=b7)}function P(){}function z0(){if(ZJ===0){XN=console.log,$N=console.info,YN=console.warn,GN=console.error,QN=console.group,WN=console.groupCollapsed,KN=console.groupEnd;var w={configurable:!0,enumerable:!0,value:P,writable:!0};Object.defineProperties(console,{info:w,log:w,warn:w,error:w,group:w,groupCollapsed:w,groupEnd:w})}ZJ++}function U0(){if(ZJ--,ZJ===0){var w={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H1({},w,{value:XN}),info:H1({},w,{value:$N}),warn:H1({},w,{value:YN}),error:H1({},w,{value:GN}),group:H1({},w,{value:QN}),groupCollapsed:H1({},w,{value:WN}),groupEnd:H1({},w,{value:KN})})}0>ZJ&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function J0(w){var z=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,w=w.stack,Error.prepareStackTrace=z,w.startsWith(`Error: react-stack-top-frame
18
18
  `)&&(w=w.slice(29)),z=w.indexOf(`
19
19
  `),z!==-1&&(w=w.slice(z+1)),z=w.indexOf("react_stack_bottom_frame"),z!==-1&&(z=w.lastIndexOf(`
20
20
  `,z)),z!==-1)w=w.slice(0,z);else return"";return w}function L0(w){if(jU===void 0)try{throw Error()}catch(Z){var z=Z.stack.trim().match(/\n( *(at )?)/);jU=z&&z[1]||"",UN=-1<Z.stack.indexOf(`
@@ -224,31 +224,31 @@ Check the top-level render call using <`+$+">.");var H="";Z!=null&&w!==Z&&($=nul
224
224
  - react: `+(w+`
225
225
  - react-dom: 19.2.3
226
226
  Learn more: https://react.dev/warnings/version-mismatch`))}(),typeof Map==="function"&&Map.prototype!=null&&typeof Map.prototype.forEach==="function"&&typeof Set==="function"&&Set.prototype!=null&&typeof Set.prototype.clear==="function"&&typeof Set.prototype.forEach==="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"),I1.findDOMNode=function(w){var z=w._reactInternals;if(z===void 0){if(typeof w.render==="function")throw Error("Unable to find node on an unmounted component.");throw w=Object.keys(w).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+w)}return w=E(z),w=w!==null?m(w):null,w=w===null?null:w.stateNode,w},!function(){var w={bundleType:1,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:Y0,reconcilerVersion:"19.2.3"};return w.overrideHookState=bA,w.overrideHookStateDeletePath=SA,w.overrideHookStateRenamePath=CA,w.overrideProps=yA,w.overridePropsDeletePath=RA,w.overridePropsRenamePath=gA,w.scheduleUpdate=fA,w.scheduleRetry=mA,w.setErrorHandler=dA,w.setSuspenseHandler=uA,w.scheduleRefresh=D,w.scheduleRoot=A,w.setRefreshHandler=M,w.getCurrentFiber=Bh,c0(w)}()&&b8&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var pA=window.location.protocol;/^(https?|file):$/.test(pA)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(pA==="file:"?`
227
- You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}NP.createRoot=function(w,z){if(!h(w))throw Error("Target container is not a DOM element.");ZN(w);var Z=!1,$="",G=eL,Q=wV,H=zV;return z!==null&&z!==void 0&&(z.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof z==="object"&&z!==null&&z.$$typeof===x8&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
227
+ You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}kP.createRoot=function(w,z){if(!h(w))throw Error("Target container is not a DOM element.");ZN(w);var Z=!1,$="",G=eL,Q=wV,H=zV;return z!==null&&z!==void 0&&(z.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof z==="object"&&z!==null&&z.$$typeof===x8&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
228
228
 
229
229
  let root = createRoot(domContainer);
230
- root.render(<App />);`),z.unstable_strictMode===!0&&(Z=!0),z.identifierPrefix!==void 0&&($=z.identifierPrefix),z.onUncaughtError!==void 0&&(G=z.onUncaughtError),z.onCaughtError!==void 0&&(Q=z.onCaughtError),z.onRecoverableError!==void 0&&(H=z.onRecoverableError)),z=lF(w,1,!1,null,null,Z,$,null,G,Q,H,zN),w[X4]=z.current,sK(w),new qU(z)},NP.hydrateRoot=function(w,z,Z){if(!h(w))throw Error("Target container is not a DOM element.");ZN(w),z===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var $=!1,G="",Q=eL,H=wV,B=zV,j=null;return Z!==null&&Z!==void 0&&(Z.unstable_strictMode===!0&&($=!0),Z.identifierPrefix!==void 0&&(G=Z.identifierPrefix),Z.onUncaughtError!==void 0&&(Q=Z.onUncaughtError),Z.onCaughtError!==void 0&&(H=Z.onCaughtError),Z.onRecoverableError!==void 0&&(B=Z.onRecoverableError),Z.formState!==void 0&&(j=Z.formState)),z=lF(w,1,!0,z,Z!=null?Z:null,$,G,j,Q,H,B,zN),z.context=iF(null),Z=z.current,$=u2(Z),$=hw($),G=r6($),G.callback=null,a6(Z,G,$),q8($,"hydrateRoot()",null),Z=$,z.current.lanes=Z,W1(z,Z),D8(z),w[X4]=z.current,sK(w),new L3(z)},NP.version="19.2.3",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var sA=f8((vg,aA)=>{aA.exports=rA()});var x1=f8((OP)=>{var C7=c(G0());(function(){function J(P){if(P==null)return null;if(typeof P==="function")return P.$$typeof===d?null:P.displayName||P.name||null;if(typeof P==="string")return P;switch(P){case M:return"Fragment";case v:return"Profiler";case h:return"StrictMode";case E:return"Suspense";case m:return"SuspenseList";case p:return"Activity"}if(typeof P==="object")switch(typeof P.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),P.$$typeof){case D:return"Portal";case I:return P.displayName||"Context";case x:return(P._context.displayName||"Context")+".Consumer";case b:var z0=P.render;return P=P.displayName,P||(P=z0.displayName||z0.name||"",P=P!==""?"ForwardRef("+P+")":"ForwardRef"),P;case R:return z0=P.displayName||null,z0!==null?z0:J(P.type)||"Memo";case S:z0=P._payload,P=P._init;try{return J(P(z0))}catch(U0){}}return null}function X(P){return""+P}function Y(P){try{X(P);var z0=!1}catch(L0){z0=!0}if(z0){z0=console;var U0=z0.error,J0=typeof Symbol==="function"&&Symbol.toStringTag&&P[Symbol.toStringTag]||P.constructor.name||"Object";return U0.call(z0,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",J0),X(P)}}function W(P){if(P===M)return"<>";if(typeof P==="object"&&P!==null&&P.$$typeof===S)return"<...>";try{var z0=J(P);return z0?"<"+z0+">":"<...>"}catch(U0){return"<...>"}}function K(){var P=w0.A;return P===null?null:P.getOwner()}function U(){return Error("react-stack-top-frame")}function q(P){if(t.call(P,"key")){var z0=Object.getOwnPropertyDescriptor(P,"key").get;if(z0&&z0.isReactWarning)return!1}return P.key!==void 0}function _(P,z0){function U0(){r||(r=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",z0))}U0.isReactWarning=!0,Object.defineProperty(P,"key",{get:U0,configurable:!0})}function L(){var P=J(this.type);return e[P]||(e[P]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),P=this.props.ref,P!==void 0?P:null}function F(P,z0,U0,J0,L0,S0){var V0=U0.ref;return P={$$typeof:A,type:P,key:z0,props:U0,_owner:J0},(V0!==void 0?V0:null)!==null?Object.defineProperty(P,"ref",{enumerable:!1,get:L}):Object.defineProperty(P,"ref",{enumerable:!1,value:null}),P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(P,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(P,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:L0}),Object.defineProperty(P,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:S0}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P}function N(P,z0,U0,J0,L0,S0){var V0=z0.children;if(V0!==void 0)if(J0)if(u(V0)){for(J0=0;J0<V0.length;J0++)V(V0[J0]);Object.freeze&&Object.freeze(V0)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else V(V0);if(t.call(z0,"key")){V0=J(P);var H0=Object.keys(z0).filter(function(r0){return r0!=="key"});J0=0<H0.length?"{key: someKey, "+H0.join(": ..., ")+": ...}":"{key: someKey}",X0[V0+J0]||(H0=0<H0.length?"{"+H0.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
230
+ root.render(<App />);`),z.unstable_strictMode===!0&&(Z=!0),z.identifierPrefix!==void 0&&($=z.identifierPrefix),z.onUncaughtError!==void 0&&(G=z.onUncaughtError),z.onCaughtError!==void 0&&(Q=z.onCaughtError),z.onRecoverableError!==void 0&&(H=z.onRecoverableError)),z=lF(w,1,!1,null,null,Z,$,null,G,Q,H,zN),w[X4]=z.current,sK(w),new qU(z)},kP.hydrateRoot=function(w,z,Z){if(!h(w))throw Error("Target container is not a DOM element.");ZN(w),z===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var $=!1,G="",Q=eL,H=wV,B=zV,j=null;return Z!==null&&Z!==void 0&&(Z.unstable_strictMode===!0&&($=!0),Z.identifierPrefix!==void 0&&(G=Z.identifierPrefix),Z.onUncaughtError!==void 0&&(Q=Z.onUncaughtError),Z.onCaughtError!==void 0&&(H=Z.onCaughtError),Z.onRecoverableError!==void 0&&(B=Z.onRecoverableError),Z.formState!==void 0&&(j=Z.formState)),z=lF(w,1,!0,z,Z!=null?Z:null,$,G,j,Q,H,B,zN),z.context=iF(null),Z=z.current,$=u2(Z),$=hw($),G=r6($),G.callback=null,a6(Z,G,$),q8($,"hydrateRoot()",null),Z=$,z.current.lanes=Z,W1(z,Z),D8(z),w[X4]=z.current,sK(w),new L3(z)},kP.version="19.2.3",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var sA=f8((Eg,aA)=>{var AP=c(rA());aA.exports=AP});var x1=f8((TP)=>{var C7=c(G0());(function(){function J(P){if(P==null)return null;if(typeof P==="function")return P.$$typeof===d?null:P.displayName||P.name||null;if(typeof P==="string")return P;switch(P){case M:return"Fragment";case v:return"Profiler";case h:return"StrictMode";case E:return"Suspense";case m:return"SuspenseList";case p:return"Activity"}if(typeof P==="object")switch(typeof P.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),P.$$typeof){case D:return"Portal";case I:return P.displayName||"Context";case x:return(P._context.displayName||"Context")+".Consumer";case b:var z0=P.render;return P=P.displayName,P||(P=z0.displayName||z0.name||"",P=P!==""?"ForwardRef("+P+")":"ForwardRef"),P;case R:return z0=P.displayName||null,z0!==null?z0:J(P.type)||"Memo";case S:z0=P._payload,P=P._init;try{return J(P(z0))}catch(U0){}}return null}function X(P){return""+P}function Y(P){try{X(P);var z0=!1}catch(L0){z0=!0}if(z0){z0=console;var U0=z0.error,J0=typeof Symbol==="function"&&Symbol.toStringTag&&P[Symbol.toStringTag]||P.constructor.name||"Object";return U0.call(z0,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",J0),X(P)}}function W(P){if(P===M)return"<>";if(typeof P==="object"&&P!==null&&P.$$typeof===S)return"<...>";try{var z0=J(P);return z0?"<"+z0+">":"<...>"}catch(U0){return"<...>"}}function K(){var P=w0.A;return P===null?null:P.getOwner()}function U(){return Error("react-stack-top-frame")}function q(P){if(t.call(P,"key")){var z0=Object.getOwnPropertyDescriptor(P,"key").get;if(z0&&z0.isReactWarning)return!1}return P.key!==void 0}function _(P,z0){function U0(){r||(r=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",z0))}U0.isReactWarning=!0,Object.defineProperty(P,"key",{get:U0,configurable:!0})}function L(){var P=J(this.type);return e[P]||(e[P]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),P=this.props.ref,P!==void 0?P:null}function F(P,z0,U0,J0,L0,S0){var V0=U0.ref;return P={$$typeof:A,type:P,key:z0,props:U0,_owner:J0},(V0!==void 0?V0:null)!==null?Object.defineProperty(P,"ref",{enumerable:!1,get:L}):Object.defineProperty(P,"ref",{enumerable:!1,value:null}),P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(P,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(P,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:L0}),Object.defineProperty(P,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:S0}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P}function N(P,z0,U0,J0,L0,S0){var V0=z0.children;if(V0!==void 0)if(J0)if(u(V0)){for(J0=0;J0<V0.length;J0++)V(V0[J0]);Object.freeze&&Object.freeze(V0)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else V(V0);if(t.call(z0,"key")){V0=J(P);var H0=Object.keys(z0).filter(function(r0){return r0!=="key"});J0=0<H0.length?"{key: someKey, "+H0.join(": ..., ")+": ...}":"{key: someKey}",X0[V0+J0]||(H0=0<H0.length?"{"+H0.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
231
231
  let props = %s;
232
232
  <%s {...props} />
233
233
  React keys must be passed directly to JSX without using spread:
234
234
  let props = %s;
235
- <%s key={someKey} {...props} />`,J0,V0,H0,V0),X0[V0+J0]=!0)}if(V0=null,U0!==void 0&&(Y(U0),V0=""+U0),q(z0)&&(Y(z0.key),V0=""+z0.key),"key"in z0){U0={};for(var j0 in z0)j0!=="key"&&(U0[j0]=z0[j0])}else U0=z0;return V0&&_(U0,typeof P==="function"?P.displayName||P.name||"Unknown":P),F(P,V0,U0,K(),L0,S0)}function V(P){k(P)?P._store&&(P._store.validated=1):typeof P==="object"&&P!==null&&P.$$typeof===S&&(P._payload.status==="fulfilled"?k(P._payload.value)&&P._payload.value._store&&(P._payload.value._store.validated=1):P._store&&(P._store.validated=1))}function k(P){return typeof P==="object"&&P!==null&&P.$$typeof===A}var A=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),I=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),d=Symbol.for("react.client.reference"),w0=C7.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,t=Object.prototype.hasOwnProperty,u=Array.isArray,Q0=console.createTask?console.createTask:function(){return null};C7={react_stack_bottom_frame:function(P){return P()}};var r,e={},o=C7.react_stack_bottom_frame.bind(C7,U)(),g=Q0(W(U)),X0={};OP.Fragment=M,OP.jsx=function(P,z0,U0){var J0=1e4>w0.recentlyCreatedOwnerStacks++;return N(P,z0,U0,!1,J0?Error("react-stack-top-frame"):o,J0?Q0(W(P)):g)},OP.jsxs=function(P,z0,U0){var J0=1e4>w0.recentlyCreatedOwnerStacks++;return N(P,z0,U0,!0,J0?Error("react-stack-top-frame"):o,J0?Q0(W(P)):g)}})()});var u_=f8((WS)=>{var X5=c(G0());(function(){function J(k,A){return k===A&&(k!==0||1/k===1/A)||k!==k&&A!==A}function X(k,A){F||X5.startTransition===void 0||(F=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var D=A();if(!N){var M=A();K(D,M)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),N=!0)}M=U({inst:{value:D,getSnapshot:A}});var h=M[0].inst,v=M[1];return _(function(){h.value=D,h.getSnapshot=A,Y(h)&&v({inst:h})},[k,D,A]),q(function(){return Y(h)&&v({inst:h}),k(function(){Y(h)&&v({inst:h})})},[k]),L(D),D}function Y(k){var A=k.getSnapshot;k=k.value;try{var D=A();return!K(k,D)}catch(M){return!0}}function W(k,A){return A()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var K=typeof Object.is==="function"?Object.is:J,U=X5.useState,q=X5.useEffect,_=X5.useLayoutEffect,L=X5.useDebugValue,F=!1,N=!1,V=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?W:X;WS.useSyncExternalStore=X5.useSyncExternalStore!==void 0?X5.useSyncExternalStore:V,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var $O=f8((KS)=>{var h6=c(G0());(function(){function J(L,F){return L===F&&(L!==0||1/L===1/F)||L!==L&&F!==F}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var X=u_(),Y=typeof Object.is==="function"?Object.is:J,W=X.useSyncExternalStore,K=h6.useRef,U=h6.useEffect,q=h6.useMemo,_=h6.useDebugValue;KS.useSyncExternalStoreWithSelector=function(L,F,N,V,k){var A=K(null);if(A.current===null){var D={hasValue:!1,value:null};A.current=D}else D=A.current;A=q(function(){function h(E){if(!v){if(v=!0,x=E,E=V(E),k!==void 0&&D.hasValue){var m=D.value;if(k(m,E))return I=m}return I=E}if(m=I,Y(x,E))return m;var R=V(E);if(k!==void 0&&k(m,R))return x=E,m;return x=E,I=R}var v=!1,x,I,b=N===void 0?null:N;return[function(){return h(F())},b===null?void 0:function(){return h(b())}]},[F,N,V,k]);var M=W(L,A[0],A[1]);return U(function(){D.hasValue=!0,D.value=M},[M]),_(M),M},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var E1=f8((zy)=>{var Q9=c(G0());(function(){function J(P){if(P==null)return null;if(typeof P==="function")return P.$$typeof===d?null:P.displayName||P.name||null;if(typeof P==="string")return P;switch(P){case M:return"Fragment";case v:return"Profiler";case h:return"StrictMode";case E:return"Suspense";case m:return"SuspenseList";case p:return"Activity"}if(typeof P==="object")switch(typeof P.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),P.$$typeof){case D:return"Portal";case I:return P.displayName||"Context";case x:return(P._context.displayName||"Context")+".Consumer";case b:var z0=P.render;return P=P.displayName,P||(P=z0.displayName||z0.name||"",P=P!==""?"ForwardRef("+P+")":"ForwardRef"),P;case R:return z0=P.displayName||null,z0!==null?z0:J(P.type)||"Memo";case S:z0=P._payload,P=P._init;try{return J(P(z0))}catch(U0){}}return null}function X(P){return""+P}function Y(P){try{X(P);var z0=!1}catch(L0){z0=!0}if(z0){z0=console;var U0=z0.error,J0=typeof Symbol==="function"&&Symbol.toStringTag&&P[Symbol.toStringTag]||P.constructor.name||"Object";return U0.call(z0,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",J0),X(P)}}function W(P){if(P===M)return"<>";if(typeof P==="object"&&P!==null&&P.$$typeof===S)return"<...>";try{var z0=J(P);return z0?"<"+z0+">":"<...>"}catch(U0){return"<...>"}}function K(){var P=w0.A;return P===null?null:P.getOwner()}function U(){return Error("react-stack-top-frame")}function q(P){if(t.call(P,"key")){var z0=Object.getOwnPropertyDescriptor(P,"key").get;if(z0&&z0.isReactWarning)return!1}return P.key!==void 0}function _(P,z0){function U0(){r||(r=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",z0))}U0.isReactWarning=!0,Object.defineProperty(P,"key",{get:U0,configurable:!0})}function L(){var P=J(this.type);return e[P]||(e[P]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),P=this.props.ref,P!==void 0?P:null}function F(P,z0,U0,J0,L0,S0){var V0=U0.ref;return P={$$typeof:A,type:P,key:z0,props:U0,_owner:J0},(V0!==void 0?V0:null)!==null?Object.defineProperty(P,"ref",{enumerable:!1,get:L}):Object.defineProperty(P,"ref",{enumerable:!1,value:null}),P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(P,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(P,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:L0}),Object.defineProperty(P,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:S0}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P}function N(P,z0,U0,J0,L0,S0){var V0=z0.children;if(V0!==void 0)if(J0)if(u(V0)){for(J0=0;J0<V0.length;J0++)V(V0[J0]);Object.freeze&&Object.freeze(V0)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else V(V0);if(t.call(z0,"key")){V0=J(P);var H0=Object.keys(z0).filter(function(r0){return r0!=="key"});J0=0<H0.length?"{key: someKey, "+H0.join(": ..., ")+": ...}":"{key: someKey}",X0[V0+J0]||(H0=0<H0.length?"{"+H0.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
235
+ <%s key={someKey} {...props} />`,J0,V0,H0,V0),X0[V0+J0]=!0)}if(V0=null,U0!==void 0&&(Y(U0),V0=""+U0),q(z0)&&(Y(z0.key),V0=""+z0.key),"key"in z0){U0={};for(var j0 in z0)j0!=="key"&&(U0[j0]=z0[j0])}else U0=z0;return V0&&_(U0,typeof P==="function"?P.displayName||P.name||"Unknown":P),F(P,V0,U0,K(),L0,S0)}function V(P){k(P)?P._store&&(P._store.validated=1):typeof P==="object"&&P!==null&&P.$$typeof===S&&(P._payload.status==="fulfilled"?k(P._payload.value)&&P._payload.value._store&&(P._payload.value._store.validated=1):P._store&&(P._store.validated=1))}function k(P){return typeof P==="object"&&P!==null&&P.$$typeof===A}var A=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),I=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),d=Symbol.for("react.client.reference"),w0=C7.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,t=Object.prototype.hasOwnProperty,u=Array.isArray,Q0=console.createTask?console.createTask:function(){return null};C7={react_stack_bottom_frame:function(P){return P()}};var r,e={},o=C7.react_stack_bottom_frame.bind(C7,U)(),g=Q0(W(U)),X0={};TP.Fragment=M,TP.jsx=function(P,z0,U0){var J0=1e4>w0.recentlyCreatedOwnerStacks++;return N(P,z0,U0,!1,J0?Error("react-stack-top-frame"):o,J0?Q0(W(P)):g)},TP.jsxs=function(P,z0,U0){var J0=1e4>w0.recentlyCreatedOwnerStacks++;return N(P,z0,U0,!0,J0?Error("react-stack-top-frame"):o,J0?Q0(W(P)):g)}})()});var u_=f8((US)=>{var X5=c(G0());(function(){function J(k,A){return k===A&&(k!==0||1/k===1/A)||k!==k&&A!==A}function X(k,A){F||X5.startTransition===void 0||(F=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var D=A();if(!N){var M=A();K(D,M)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),N=!0)}M=U({inst:{value:D,getSnapshot:A}});var h=M[0].inst,v=M[1];return _(function(){h.value=D,h.getSnapshot=A,Y(h)&&v({inst:h})},[k,D,A]),q(function(){return Y(h)&&v({inst:h}),k(function(){Y(h)&&v({inst:h})})},[k]),L(D),D}function Y(k){var A=k.getSnapshot;k=k.value;try{var D=A();return!K(k,D)}catch(M){return!0}}function W(k,A){return A()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var K=typeof Object.is==="function"?Object.is:J,U=X5.useState,q=X5.useEffect,_=X5.useLayoutEffect,L=X5.useDebugValue,F=!1,N=!1,V=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?W:X;US.useSyncExternalStore=X5.useSyncExternalStore!==void 0?X5.useSyncExternalStore:V,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var $O=f8((HS)=>{var h6=c(G0());(function(){function J(L,F){return L===F&&(L!==0||1/L===1/F)||L!==L&&F!==F}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var X=u_(),Y=typeof Object.is==="function"?Object.is:J,W=X.useSyncExternalStore,K=h6.useRef,U=h6.useEffect,q=h6.useMemo,_=h6.useDebugValue;HS.useSyncExternalStoreWithSelector=function(L,F,N,V,k){var A=K(null);if(A.current===null){var D={hasValue:!1,value:null};A.current=D}else D=A.current;A=q(function(){function h(E){if(!v){if(v=!0,x=E,E=V(E),k!==void 0&&D.hasValue){var m=D.value;if(k(m,E))return I=m}return I=E}if(m=I,Y(x,E))return m;var R=V(E);if(k!==void 0&&k(m,R))return x=E,m;return x=E,I=R}var v=!1,x,I,b=N===void 0?null:N;return[function(){return h(F())},b===null?void 0:function(){return h(b())}]},[F,N,V,k]);var M=W(L,A[0],A[1]);return U(function(){D.hasValue=!0,D.value=M},[M]),_(M),M},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var E1=f8((Jy)=>{var Q9=c(G0());(function(){function J(P){if(P==null)return null;if(typeof P==="function")return P.$$typeof===d?null:P.displayName||P.name||null;if(typeof P==="string")return P;switch(P){case M:return"Fragment";case v:return"Profiler";case h:return"StrictMode";case E:return"Suspense";case m:return"SuspenseList";case p:return"Activity"}if(typeof P==="object")switch(typeof P.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),P.$$typeof){case D:return"Portal";case I:return P.displayName||"Context";case x:return(P._context.displayName||"Context")+".Consumer";case b:var z0=P.render;return P=P.displayName,P||(P=z0.displayName||z0.name||"",P=P!==""?"ForwardRef("+P+")":"ForwardRef"),P;case R:return z0=P.displayName||null,z0!==null?z0:J(P.type)||"Memo";case S:z0=P._payload,P=P._init;try{return J(P(z0))}catch(U0){}}return null}function X(P){return""+P}function Y(P){try{X(P);var z0=!1}catch(L0){z0=!0}if(z0){z0=console;var U0=z0.error,J0=typeof Symbol==="function"&&Symbol.toStringTag&&P[Symbol.toStringTag]||P.constructor.name||"Object";return U0.call(z0,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",J0),X(P)}}function W(P){if(P===M)return"<>";if(typeof P==="object"&&P!==null&&P.$$typeof===S)return"<...>";try{var z0=J(P);return z0?"<"+z0+">":"<...>"}catch(U0){return"<...>"}}function K(){var P=w0.A;return P===null?null:P.getOwner()}function U(){return Error("react-stack-top-frame")}function q(P){if(t.call(P,"key")){var z0=Object.getOwnPropertyDescriptor(P,"key").get;if(z0&&z0.isReactWarning)return!1}return P.key!==void 0}function _(P,z0){function U0(){r||(r=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",z0))}U0.isReactWarning=!0,Object.defineProperty(P,"key",{get:U0,configurable:!0})}function L(){var P=J(this.type);return e[P]||(e[P]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),P=this.props.ref,P!==void 0?P:null}function F(P,z0,U0,J0,L0,S0){var V0=U0.ref;return P={$$typeof:A,type:P,key:z0,props:U0,_owner:J0},(V0!==void 0?V0:null)!==null?Object.defineProperty(P,"ref",{enumerable:!1,get:L}):Object.defineProperty(P,"ref",{enumerable:!1,value:null}),P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(P,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(P,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:L0}),Object.defineProperty(P,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:S0}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P}function N(P,z0,U0,J0,L0,S0){var V0=z0.children;if(V0!==void 0)if(J0)if(u(V0)){for(J0=0;J0<V0.length;J0++)V(V0[J0]);Object.freeze&&Object.freeze(V0)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else V(V0);if(t.call(z0,"key")){V0=J(P);var H0=Object.keys(z0).filter(function(r0){return r0!=="key"});J0=0<H0.length?"{key: someKey, "+H0.join(": ..., ")+": ...}":"{key: someKey}",X0[V0+J0]||(H0=0<H0.length?"{"+H0.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
236
236
  let props = %s;
237
237
  <%s {...props} />
238
238
  React keys must be passed directly to JSX without using spread:
239
239
  let props = %s;
240
- <%s key={someKey} {...props} />`,J0,V0,H0,V0),X0[V0+J0]=!0)}if(V0=null,U0!==void 0&&(Y(U0),V0=""+U0),q(z0)&&(Y(z0.key),V0=""+z0.key),"key"in z0){U0={};for(var j0 in z0)j0!=="key"&&(U0[j0]=z0[j0])}else U0=z0;return V0&&_(U0,typeof P==="function"?P.displayName||P.name||"Unknown":P),F(P,V0,U0,K(),L0,S0)}function V(P){k(P)?P._store&&(P._store.validated=1):typeof P==="object"&&P!==null&&P.$$typeof===S&&(P._payload.status==="fulfilled"?k(P._payload.value)&&P._payload.value._store&&(P._payload.value._store.validated=1):P._store&&(P._store.validated=1))}function k(P){return typeof P==="object"&&P!==null&&P.$$typeof===A}var A=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),I=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),d=Symbol.for("react.client.reference"),w0=Q9.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,t=Object.prototype.hasOwnProperty,u=Array.isArray,Q0=console.createTask?console.createTask:function(){return null};Q9={react_stack_bottom_frame:function(P){return P()}};var r,e={},o=Q9.react_stack_bottom_frame.bind(Q9,U)(),g=Q0(W(U)),X0={};zy.Fragment=M,zy.jsxDEV=function(P,z0,U0,J0){var L0=1e4>w0.recentlyCreatedOwnerStacks++;return N(P,z0,U0,J0,L0?Error("react-stack-top-frame"):o,L0?Q0(W(P)):g)}})()});var Ex=c(sA(),1);var d8=c(G0(),1);function Lz({controlled:J,default:X,name:Y,state:W="value"}){let{current:K}=d8.useRef(J!==void 0),[U,q]=d8.useState(X),_=K?J:U;{d8.useEffect(()=>{if(K!==(J!==void 0))console.error([`Base UI: A component is changing the ${K?"":"un"}controlled ${W} state of ${Y} to be ${K?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${Y} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
240
+ <%s key={someKey} {...props} />`,J0,V0,H0,V0),X0[V0+J0]=!0)}if(V0=null,U0!==void 0&&(Y(U0),V0=""+U0),q(z0)&&(Y(z0.key),V0=""+z0.key),"key"in z0){U0={};for(var j0 in z0)j0!=="key"&&(U0[j0]=z0[j0])}else U0=z0;return V0&&_(U0,typeof P==="function"?P.displayName||P.name||"Unknown":P),F(P,V0,U0,K(),L0,S0)}function V(P){k(P)?P._store&&(P._store.validated=1):typeof P==="object"&&P!==null&&P.$$typeof===S&&(P._payload.status==="fulfilled"?k(P._payload.value)&&P._payload.value._store&&(P._payload.value._store.validated=1):P._store&&(P._store.validated=1))}function k(P){return typeof P==="object"&&P!==null&&P.$$typeof===A}var A=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),I=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),d=Symbol.for("react.client.reference"),w0=Q9.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,t=Object.prototype.hasOwnProperty,u=Array.isArray,Q0=console.createTask?console.createTask:function(){return null};Q9={react_stack_bottom_frame:function(P){return P()}};var r,e={},o=Q9.react_stack_bottom_frame.bind(Q9,U)(),g=Q0(W(U)),X0={};Jy.Fragment=M,Jy.jsxDEV=function(P,z0,U0,J0){var L0=1e4>w0.recentlyCreatedOwnerStacks++;return N(P,z0,U0,J0,L0?Error("react-stack-top-frame"):o,L0?Q0(W(P)):g)}})()});var Ex=c(sA(),1);var d8=c(G0(),1);function Lz({controlled:J,default:X,name:Y,state:W="value"}){let{current:K}=d8.useRef(J!==void 0),[U,q]=d8.useState(X),_=K?J:U;{d8.useEffect(()=>{if(K!==(J!==void 0))console.error([`Base UI: A component is changing the ${K?"":"un"}controlled ${W} state of ${Y} to be ${K?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${Y} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
241
241
  `))},[W,Y,J]);let{current:F}=d8.useRef(X);d8.useEffect(()=>{if(!K&&JSON.stringify(F)!==JSON.stringify(X))console.error([`Base UI: A component is changing the default ${W} state of an uncontrolled ${Y} after being initialized. To suppress this warning opt to use a controlled ${Y}.`].join(`
242
- `))},[JSON.stringify(X)])}let L=d8.useCallback((F)=>{if(!K)q(F)},[]);return[_,L]}var rH=c(G0(),1);var nA=c(G0(),1),oA={};function r1(J,X){let Y=nA.useRef(oA);if(Y.current===oA)Y.current=J(X);return Y}var iH=rH[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],kP=iH&&iH!==rH.useLayoutEffect?iH:(J)=>J();function F0(J){let X=r1(AP).current;return X.next=J,kP(X.effect),X.trampoline}function AP(){let J={next:void 0,callback:jP,trampoline:(...X)=>J.callback?.(...X),effect:()=>{J.callback=J.next}};return J}function jP(){throw Error("Base UI: Cannot call an event handler while rendering.")}var tA=c(G0(),1),MP=()=>{},k0=typeof document<"u"?tA.useLayoutEffect:MP;var h4=c(G0(),1);var OY=c(G0(),1),DY=OY.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>{return()=>{}},elementsRef:{current:[]},nextIndexRef:{current:0}});DY.displayName="CompositeListContext";function eA(){return OY.useContext(DY)}var wj=c(x1(),1);function Vz(J){let{children:X,elementsRef:Y,labelsRef:W,onMapChange:K}=J,U=F0(K),q=h4.useRef(0),_=r1(TP).current,L=r1(DP).current,[F,N]=h4.useState(0),V=h4.useRef(F),k=F0((v,x)=>{L.set(v,x??null),V.current+=1,N(V.current)}),A=F0((v)=>{L.delete(v),V.current+=1,N(V.current)}),D=h4.useMemo(()=>{vP(F);let v=new Map;return Array.from(L.keys()).filter((I)=>I.isConnected).sort(xP).forEach((I,b)=>{let E=L.get(I)??{};v.set(I,{...E,index:b})}),v},[L,F]);k0(()=>{if(typeof MutationObserver!=="function"||D.size===0)return;let v=new MutationObserver((x)=>{let I=new Set,b=(E)=>I.has(E)?I.delete(E):I.add(E);if(x.forEach((E)=>{E.removedNodes.forEach(b),E.addedNodes.forEach(b)}),I.size===0)V.current+=1,N(V.current)});return D.forEach((x,I)=>{if(I.parentElement)v.observe(I.parentElement,{childList:!0})}),()=>{v.disconnect()}},[D]),k0(()=>{if(V.current===F){if(Y.current.length!==D.size)Y.current.length=D.size;if(W&&W.current.length!==D.size)W.current.length=D.size;q.current=D.size}U(D)},[U,D,Y,W,F]),k0(()=>{return()=>{Y.current=[]}},[Y]),k0(()=>{return()=>{if(W)W.current=[]}},[W]);let M=F0((v)=>{return _.add(v),()=>{_.delete(v)}});k0(()=>{_.forEach((v)=>v(D))},[_,D]);let h=h4.useMemo(()=>({register:k,unregister:A,subscribeMapChange:M,elementsRef:Y,labelsRef:W,nextIndexRef:q}),[k,A,M,Y,W,q]);return wj.jsx(DY.Provider,{value:h,children:X})}function DP(){return new Map}function TP(){return new Set}function xP(J,X){let Y=J.compareDocumentPosition(X);if(Y&Node.DOCUMENT_POSITION_FOLLOWING||Y&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(Y&Node.DOCUMENT_POSITION_PRECEDING||Y&Node.DOCUMENT_POSITION_CONTAINS)return 1;return 0}function vP(J){}var TY=c(G0(),1),zj=TY.createContext(void 0);zj.displayName="DirectionContext";function M5(){return TY.useContext(zj)?.direction??"ltr"}var PY=c(G0(),1);function O5(J,X,Y,W){let K=r1(Jj).current;if(hP(K,J,X,Y,W))Xj(K,[J,X,Y,W]);return K.callback}function Zj(J){let X=r1(Jj).current;if(EP(X,J))Xj(X,J);return X.callback}function Jj(){return{callback:null,cleanup:null,refs:[]}}function hP(J,X,Y,W,K){return J.refs[0]!==X||J.refs[1]!==Y||J.refs[2]!==W||J.refs[3]!==K}function EP(J,X){return J.refs.length!==X.length||J.refs.some((Y,W)=>Y!==X[W])}function Xj(J,X){if(J.refs=X,X.every((Y)=>Y==null)){J.callback=null;return}J.callback=(Y)=>{if(J.cleanup)J.cleanup(),J.cleanup=null;if(Y!=null){let W=Array(X.length).fill(null);for(let K=0;K<X.length;K+=1){let U=X[K];if(U==null)continue;switch(typeof U){case"function":{let q=U(Y);if(typeof q==="function")W[K]=q;break}case"object":{U.current=Y;break}default:}}J.cleanup=()=>{for(let K=0;K<X.length;K+=1){let U=X[K];if(U==null)continue;switch(typeof U){case"function":{let q=W[K];if(typeof q==="function")q();else U(null);break}case"object":{U.current=null;break}default:}}}}}}var Yj=c(G0(),1);var $j=c(G0(),1),PP=parseInt($j.version,10);function Fz(J){return PP>=J}function aH(J){if(!Yj.isValidElement(J))return null;let X=J,Y=X.props;return(Fz(19)?Y?.ref:X.ref)??null}function sJ(J,X){if(J&&!X)return J;if(!J&&X)return X;if(J||X)return{...J,...X};return}function Gj(J,X){let Y={};for(let W in J){let K=J[W];if(X?.hasOwnProperty(W)){let U=X[W](K);if(U!=null)Object.assign(Y,U);continue}if(K===!0)Y[`data-${W.toLowerCase()}`]="";else if(K)Y[`data-${W.toLowerCase()}`]=K.toString()}return Y}function Qj(J,X){return typeof J==="function"?J(X):J}function Wj(J,X){return typeof J==="function"?J(X):J}var nJ={};function D5(J,X,Y,W,K){let U={...sH(J,nJ)};if(X)U=oJ(U,X);if(Y)U=oJ(U,Y);if(W)U=oJ(U,W);if(K)U=oJ(U,K);return U}function Kj(J){if(J.length===0)return nJ;if(J.length===1)return sH(J[0],nJ);let X={...sH(J[0],nJ)};for(let Y=1;Y<J.length;Y+=1)X=oJ(X,J[Y]);return X}function oJ(J,X){if(Uj(X))return X(J);return IP(J,X)}function IP(J,X){if(!X)return J;for(let Y in X){let W=X[Y];switch(Y){case"style":{J[Y]=sJ(J.style,W);break}case"className":{J[Y]=oH(J.className,W);break}default:if(bP(Y,W))J[Y]=SP(J[Y],W);else J[Y]=W}}return J}function bP(J,X){let Y=J.charCodeAt(0),W=J.charCodeAt(1),K=J.charCodeAt(2);return Y===111&&W===110&&K>=65&&K<=90&&(typeof X==="function"||typeof X>"u")}function Uj(J){return typeof J==="function"}function sH(J,X){if(Uj(J))return J(X);return J??nJ}function SP(J,X){if(!X)return J;if(!J)return X;return(Y)=>{if(CP(Y)){let K=Y;xY(K);let U=X(K);if(!K.baseUIHandlerPrevented)J?.(K);return U}let W=X(Y);return J?.(Y),W}}function xY(J){return J.preventBaseUIHandler=()=>{J.baseUIHandlerPrevented=!0},J}function oH(J,X){if(X){if(J)return X+" "+J;return X}return J}function CP(J){return J!=null&&typeof J==="object"&&"nativeEvent"in J}function vY(){}var t2=Object.freeze([]),v1=Object.freeze({});var Hj=500,_j=500,qj={style:{transition:"none"}},hY="data-base-ui-click-trigger",Bj={fallbackAxisSide:"none"},EY={fallbackAxisSide:"end"},Lj={clipPath:"inset(50%)",position:"fixed",top:0,left:0};var nH=c(G0(),1);function h0(J,X,Y={}){let W=X.render,K=yP(X,Y);if(Y.enabled===!1)return null;let U=Y.state??v1;return RP(J,W,K,U)}function yP(J,X={}){let{className:Y,style:W,render:K}=J,{state:U=v1,ref:q,props:_,stateAttributesMapping:L,enabled:F=!0}=X,N=F?Qj(Y,U):void 0,V=F?Wj(W,U):void 0,k=F?Gj(U,L):v1,A=F?sJ(k,Array.isArray(_)?Kj(_):_)??v1:v1;if(typeof document<"u")if(!F)O5(null,null);else if(Array.isArray(q))A.ref=Zj([A.ref,aH(K),...q]);else A.ref=O5(A.ref,aH(K),q);if(!F)return v1;if(N!==void 0)A.className=oH(A.className,N);if(V!==void 0)A.style=sJ(A.style,V);return A}function RP(J,X,Y,W){if(X){if(typeof X==="function")return X(Y,W);let K=D5(Y,X.props);return K.ref=Y.ref,PY.cloneElement(X,K)}if(J){if(typeof J==="string")return gP(J,Y)}throw Error("Base UI: Render element or function are not defined.")}function gP(J,X){if(J==="button")return nH.createElement("button",{type:"button",...X,key:X.key});if(J==="img")return nH.createElement("img",{alt:"",...X,key:X.key});return PY.createElement(J,X)}var B0={};qz(B0,{windowResize:()=>qI,wheel:()=>QI,triggerPress:()=>mP,triggerHover:()=>dP,triggerFocus:()=>uP,trackPress:()=>sP,siblingOpen:()=>UI,scrub:()=>WI,pointer:()=>YI,outsidePress:()=>pP,none:()=>fP,listNavigation:()=>XI,linkPress:()=>iP,keyboard:()=>$I,itemPress:()=>cP,inputPaste:()=>zI,inputClear:()=>eP,inputChange:()=>tP,inputBlur:()=>wI,incrementPress:()=>oP,imperativeAction:()=>_I,focusOut:()=>ZI,escapeKey:()=>JI,drag:()=>GI,disabled:()=>HI,decrementPress:()=>nP,closePress:()=>lP,clearPress:()=>rP,chipRemovePress:()=>aP,cancelOpen:()=>KI});var fP="none",mP="trigger-press",dP="trigger-hover",uP="trigger-focus",pP="outside-press",cP="item-press",lP="close-press",iP="link-press",rP="clear-press",aP="chip-remove-press",sP="track-press",oP="increment-press",nP="decrement-press",tP="input-change",eP="input-clear",wI="input-blur",zI="input-paste",ZI="focus-out",JI="escape-key",XI="list-navigation",$I="keyboard",YI="pointer",GI="drag",QI="wheel",WI="scrub",KI="cancel-open",UI="sibling-open",HI="disabled",_I="imperative-action",qI="window-resize";function P0(J,X,Y,W){let K=!1,U=!1,q=W??v1;return{reason:J,event:X??new Event("base-ui"),cancel(){K=!0},allowPropagation(){U=!0},get isCanceled(){return K},get isPropagationAllowed(){return U},trigger:Y,...q}}var IY=c(G0(),1);var BI=c(G0(),1),Vj={...BI};var Fj=0;function LI(J,X="mui"){let[Y,W]=IY.useState(J),K=J||Y;return IY.useEffect(()=>{if(Y==null)Fj+=1,W(`${X}-${Fj}`)},[Y,X]),K}var Nj=Vj.useId;function J2(J,X){if(Nj!==void 0){let Y=Nj();return J??(X?`${X}-${Y}`:Y)}return LI(J,X)}function ww(J){return J2(J,"base-ui")}var tH=c(m8(),1);var kj=c(G0(),1),VI=[];function Nz(J){kj.useEffect(J,VI)}var bY=null,vf=globalThis.requestAnimationFrame;class Aj{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=(J)=>{this.isScheduled=!1;let X=this.callbacks,Y=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,Y>0)for(let W=0;W<X.length;W+=1)X[W]?.(J)};request(J){let X=this.nextId;this.nextId+=1,this.callbacks.push(J),this.callbacksCount+=1;let Y=!1;if(!this.isScheduled||Y)requestAnimationFrame(this.tick),this.isScheduled=!0;return X}cancel(J){let X=J-this.startId;if(X<0||X>=this.callbacks.length)return;this.callbacks[X]=null,this.callbacksCount-=1}}var SY=new Aj;class T5{static create(){return new T5}static request(J){return SY.request(J)}static cancel(J){return SY.cancel(J)}currentId=bY;request(J){this.cancel(),this.currentId=SY.request(()=>{this.currentId=bY,J()})}cancel=()=>{if(this.currentId!==bY)SY.cancel(this.currentId),this.currentId=bY};disposeEffect=()=>{return this.cancel}}function x5(){let J=r1(T5.create).current;return Nz(J.disposeEffect),J}function O6(J){if(J==null)return J;return"current"in J?J.current:J}function kz(J,X=!1,Y=!0){let W=x5();return F0((K,U=null)=>{W.cancel();let q=O6(J);if(q==null)return;if(typeof q.getAnimations!=="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)K();else W.request(()=>{function _(){if(!q)return;Promise.all(q.getAnimations().map((L)=>L.finished)).then(()=>{if(U!=null&&U.aborted)return;tH.flushSync(K)}).catch(()=>{if(Y){if(U!=null&&U.aborted)return;tH.flushSync(K)}else if(q.getAnimations().length>0&&q.getAnimations().some((L)=>L.pending||L.playState!=="finished"))_()})}if(X)W.request(_);else _()})})}var tJ=c(G0(),1);function Az(J,X=!1,Y=!1){let[W,K]=tJ.useState(J&&X?"idle":void 0),[U,q]=tJ.useState(J);if(J&&!U)q(!0),K("starting");if(!J&&U&&W!=="ending"&&!Y)K("ending");if(!J&&!U&&W==="ending")K(void 0);return k0(()=>{if(!J&&U&&W!=="ending"&&Y){let _=T5.request(()=>{K("ending")});return()=>{T5.cancel(_)}}return},[J,U,W,Y]),k0(()=>{if(!J||X)return;let _=T5.request(()=>{K(void 0)});return()=>{T5.cancel(_)}},[X,J]),k0(()=>{if(!J||!X)return;if(J&&U&&W!=="idle")K("starting");let _=T5.request(()=>{K("idle")});return()=>{T5.cancel(_)}},[X,J,U,K,W]),tJ.useMemo(()=>({mounted:U,setMounted:q,transitionStatus:W}),[U,W])}var D6=c(G0(),1);var FI=function(J){return J[J.None=0]="None",J[J.GuessFromOrder=1]="GuessFromOrder",J}({});function v5(J={}){let{label:X,metadata:Y,textRef:W,indexGuessBehavior:K,index:U}=J,{register:q,unregister:_,subscribeMapChange:L,elementsRef:F,labelsRef:N,nextIndexRef:V}=eA(),k=D6.useRef(-1),[A,D]=D6.useState(U??(K===FI.GuessFromOrder?()=>{if(k.current===-1){let v=V.current;V.current+=1,k.current=v}return k.current}:-1)),M=D6.useRef(null),h=D6.useCallback((v)=>{if(M.current=v,A!==-1&&v!==null){if(F.current[A]=v,N){let x=X!==void 0;N.current[A]=x?X:W?.current?.textContent??v.textContent}}},[A,F,N,X,W]);return k0(()=>{if(U!=null)return;let v=M.current;if(v)return q(v,Y),()=>{_(v)};return},[U,q,_,Y]),k0(()=>{if(U!=null)return;return L((v)=>{let x=M.current?v.get(M.current)?.index:null;if(x!=null)D(x)})},[U,L,D]),D6.useMemo(()=>({ref:h,index:A}),[A,h])}var eJ=function(J){return J.startingStyle="data-starting-style",J.endingStyle="data-ending-style",J}({}),NI={[eJ.startingStyle]:""},kI={[eJ.endingStyle]:""},h2={transitionStatus(J){if(J==="starting")return NI;if(J==="ending")return kI;return null}};function jj(J){return J==null||J.hasAttribute("disabled")||J.getAttribute("aria-disabled")==="true"}var y7=c(G0(),1);function yY(){return typeof window<"u"}function o5(J){if(RY(J))return(J.nodeName||"").toLowerCase();return"#document"}function u1(J){var X;return(J==null||(X=J.ownerDocument)==null?void 0:X.defaultView)||window}function n5(J){var X;return(X=(RY(J)?J.ownerDocument:J.document)||window.document)==null?void 0:X.documentElement}function RY(J){if(!yY())return!1;return J instanceof Node||J instanceof u1(J).Node}function L1(J){if(!yY())return!1;return J instanceof Element||J instanceof u1(J).Element}function O1(J){if(!yY())return!1;return J instanceof HTMLElement||J instanceof u1(J).HTMLElement}function CY(J){if(!yY()||typeof ShadowRoot>"u")return!1;return J instanceof ShadowRoot||J instanceof u1(J).ShadowRoot}var AI=new Set(["inline","contents"]);function T6(J){let{overflow:X,overflowX:Y,overflowY:W,display:K}=uw(J);return/auto|scroll|overlay|hidden|clip/.test(X+W+Y)&&!AI.has(K)}var jI=new Set(["table","td","th"]);function Mj(J){return jI.has(o5(J))}var MI=[":popover-open",":modal"];function wX(J){return MI.some((X)=>{try{return J.matches(X)}catch(Y){return!1}})}var OI=["transform","translate","scale","rotate","perspective"],DI=["transform","translate","scale","rotate","perspective","filter"],TI=["paint","layout","strict","content"];function gY(J){let X=jz(),Y=L1(J)?uw(J):J;return OI.some((W)=>Y[W]?Y[W]!=="none":!1)||(Y.containerType?Y.containerType!=="normal":!1)||!X&&(Y.backdropFilter?Y.backdropFilter!=="none":!1)||!X&&(Y.filter?Y.filter!=="none":!1)||DI.some((W)=>(Y.willChange||"").includes(W))||TI.some((W)=>(Y.contain||"").includes(W))}function Oj(J){let X=e2(J);while(O1(X)&&!z5(X)){if(gY(X))return X;else if(wX(X))return null;X=e2(X)}return null}function jz(){if(typeof CSS>"u"||!CSS.supports)return!1;return CSS.supports("-webkit-backdrop-filter","none")}var xI=new Set(["html","body","#document"]);function z5(J){return xI.has(o5(J))}function uw(J){return u1(J).getComputedStyle(J)}function zX(J){if(L1(J))return{scrollLeft:J.scrollLeft,scrollTop:J.scrollTop};return{scrollLeft:J.scrollX,scrollTop:J.scrollY}}function e2(J){if(o5(J)==="html")return J;let X=J.assignedSlot||J.parentNode||CY(J)&&J.host||n5(J);return CY(X)?X.host:X}function Dj(J){let X=e2(J);if(z5(X))return J.ownerDocument?J.ownerDocument.body:J.body;if(O1(X)&&T6(X))return X;return Dj(X)}function w5(J,X,Y){var W;if(X===void 0)X=[];if(Y===void 0)Y=!0;let K=Dj(J),U=K===((W=J.ownerDocument)==null?void 0:W.body),q=u1(K);if(U){let _=fY(q);return X.concat(q,q.visualViewport||[],T6(K)?K:[],_&&Y?w5(_):[])}return X.concat(K,w5(K,[],Y))}function fY(J){return J.parent&&Object.getPrototypeOf(J.parent)?J.frameElement:null}var eH;eH=new Set;function w_(...J){{let X=J.join(" ");if(!eH.has(X))eH.add(X),console.error(`Base UI: ${X}`)}}var mY=c(G0(),1),dY=mY.createContext(void 0);dY.displayName="CompositeRootContext";function Mz(J=!1){let X=mY.useContext(dY);if(X===void 0&&!J)throw Error("Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.");return X}var Tj=c(G0(),1);function xj(J){let{focusableWhenDisabled:X,disabled:Y,composite:W=!1,tabIndex:K=0,isNativeButton:U}=J,q=W&&X!==!1,_=W&&X===!1;return{props:Tj.useMemo(()=>{let F={onKeyDown(N){if(Y&&X&&N.key!=="Tab")N.preventDefault()}};if(!W){if(F.tabIndex=K,!U&&Y)F.tabIndex=X?K:-1}if(U&&(X||q)||!U&&Y)F["aria-disabled"]=Y;if(U&&(!X||_))F.disabled=Y;return F},[W,Y,X,q,_,U,K])}}function Z5(J={}){let{disabled:X=!1,focusableWhenDisabled:Y,tabIndex:W=0,native:K=!0}=J,U=y7.useRef(null),q=Mz(!0)!==void 0,_=F0(()=>{let k=U.current;return Boolean(k?.tagName==="A"&&k?.href)}),{props:L}=xj({focusableWhenDisabled:Y,disabled:X,composite:q,tabIndex:W,isNativeButton:K});y7.useEffect(()=>{if(!U.current)return;let k=U.current.tagName==="BUTTON";if(K){if(!k)w_("A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`.")}else if(k)w_("A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.")},[K]);let F=y7.useCallback(()=>{let k=U.current;if(!vI(k))return;if(q&&X&&L.disabled===void 0&&k.disabled)k.disabled=!1},[X,L.disabled,q]);k0(F,[F]);let N=y7.useCallback((k={})=>{let{onClick:A,onMouseDown:D,onKeyUp:M,onKeyDown:h,onPointerDown:v,...x}=k;return D5({type:K?"button":void 0,onClick(b){if(X){b.preventDefault();return}A?.(b)},onMouseDown(b){if(!X)D?.(b)},onKeyDown(b){if(!X)xY(b),h?.(b);if(b.baseUIHandlerPrevented)return;let E=b.target===b.currentTarget&&!K&&!_()&&!X,m=b.key==="Enter",R=b.key===" ";if(E){if(R||m)b.preventDefault();if(m)A?.(b)}},onKeyUp(b){if(!X)xY(b),M?.(b);if(b.baseUIHandlerPrevented)return;if(b.target===b.currentTarget&&!K&&!X&&b.key===" ")A?.(b)},onPointerDown(b){if(X){b.preventDefault();return}v?.(b)}},!K?{role:"button"}:void 0,L,x)},[X,L,K,_]),V=F0((k)=>{U.current=k,F()});return{getButtonProps:N,buttonRef:V}}function vI(J){return O1(J)&&J.tagName==="BUTTON"}var E4=typeof navigator<"u",z_=hI(),vj=PI(),uY=EI(),hj=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),Ej=z_.platform==="MacIntel"&&z_.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(z_.platform),Xm=E4&&/firefox/i.test(uY),pY=E4&&/apple/i.test(navigator.vendor),$m=E4&&/Edg/i.test(uY),cY=E4&&/android/i.test(vj)||/android/i.test(uY),Pj=E4&&vj.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,lY=uY.includes("jsdom/");function hI(){if(!E4)return{platform:"",maxTouchPoints:-1};let J=navigator.userAgentData;if(J?.platform)return{platform:J.platform,maxTouchPoints:navigator.maxTouchPoints};return{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function EI(){if(!E4)return"";let J=navigator.userAgentData;if(J&&Array.isArray(J.brands))return J.brands.map(({brand:X,version:Y})=>`${X}/${Y}`).join(" ");return navigator.userAgent}function PI(){if(!E4)return"";let J=navigator.userAgentData;if(J?.platform)return J.platform;return navigator.platform??""}var ZX="data-base-ui-focusable",Z_="active",J_="selected",Oz="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",u8="ArrowLeft",p8="ArrowRight",JX="ArrowUp",R7="ArrowDown";function X2(J){let X=J.activeElement;while(X?.shadowRoot?.activeElement!=null)X=X.shadowRoot.activeElement;return X}function t0(J,X){if(!J||!X)return!1;let Y=X.getRootNode?.();if(J.contains(X))return!0;if(Y&&CY(Y)){let W=X;while(W){if(J===W)return!0;W=W.parentNode||W.host}}return!1}function f1(J){if("composedPath"in J)return J.composedPath()[0];return J.target}function h5(J,X){if(X==null)return!1;if("composedPath"in J)return J.composedPath().includes(X);let Y=J;return Y.target!=null&&X.contains(Y.target)}function Ij(J){return J.matches("html,body")}function C1(J){return J?.ownerDocument||document}function XX(J){return O1(J)&&J.matches(Oz)}function $X(J){if(!J)return!1;return J.getAttribute("role")==="combobox"&&XX(J)}function bj(J){if(!J||lY)return!0;try{return J.matches(":focus-visible")}catch(X){return!0}}function g7(J){if(!J)return null;return J.hasAttribute(ZX)?J:J.querySelector(`[${ZX}]`)||J}function c8(J,X,Y=!0){return J.filter((K)=>K.parentId===X&&(!Y||K.context?.open)).flatMap((K)=>[K,...c8(J,K.id,Y)])}function X_(J,X){let Y=[],W=J.find((K)=>K.id===X)?.parentId;while(W){let K=J.find((U)=>U.id===W);if(W=K?.parentId,K)Y=Y.concat(K)}return Y}function Xw(J){J.preventDefault(),J.stopPropagation()}function Sj(J){return"nativeEvent"in J}function iY(J){if(J.mozInputSource===0&&J.isTrusted)return!0;if(cY&&J.pointerType)return J.type==="click"&&J.buttons===1;return J.detail===0&&!J.pointerType}function rY(J){if(lY)return!1;return!cY&&J.width===0&&J.height===0||cY&&J.width===1&&J.height===1&&J.pressure===0&&J.detail===0&&J.pointerType==="mouse"||J.width<1&&J.height<1&&J.pressure===0&&J.detail===0&&J.pointerType==="touch"}function E5(J,X){let Y=["mouse","pen"];if(!X)Y.push("",void 0);return Y.includes(J)}function aY(J){let X=J.type;return X==="click"||X==="mousedown"||X==="keydown"||X==="keyup"}var Rj=["top","right","bottom","left"];var{min:P4,max:F2,round:I4,floor:b4}=Math,t5=(J)=>({x:J,y:J}),II={left:"right",right:"left",bottom:"top",top:"bottom"},bI={start:"end",end:"start"};function GX(J,X,Y){return F2(J,P4(X,Y))}function e5(J,X){return typeof J==="function"?J(X):J}function nw(J){return J.split("-")[0]}function w8(J){return J.split("-")[1]}function oY(J){return J==="x"?"y":"x"}function QX(J){return J==="y"?"height":"width"}var SI=new Set(["top","bottom"]);function E2(J){return SI.has(nw(J))?"y":"x"}function WX(J){return oY(E2(J))}function gj(J,X,Y){if(Y===void 0)Y=!1;let W=w8(J),K=WX(J),U=QX(K),q=K==="x"?W===(Y?"end":"start")?"right":"left":W==="start"?"bottom":"top";if(X.reference[U]>X.floating[U])q=YX(q);return[q,YX(q)]}function fj(J){let X=YX(J);return[sY(J),X,sY(X)]}function sY(J){return J.replace(/start|end/g,(X)=>bI[X])}var Cj=["left","right"],yj=["right","left"],CI=["top","bottom"],yI=["bottom","top"];function RI(J,X,Y){switch(J){case"top":case"bottom":if(Y)return X?yj:Cj;return X?Cj:yj;case"left":case"right":return X?CI:yI;default:return[]}}function mj(J,X,Y,W){let K=w8(J),U=RI(nw(J),Y==="start",W);if(K){if(U=U.map((q)=>q+"-"+K),X)U=U.concat(U.map(sY))}return U}function YX(J){return J.replace(/left|right|bottom|top/g,(X)=>II[X])}function gI(J){return{top:0,right:0,bottom:0,left:0,...J}}function nY(J){return typeof J!=="number"?gI(J):{top:J,right:J,bottom:J,left:J}}function f7(J){let{x:X,y:Y,width:W,height:K}=J;return{width:W,height:K,top:Y,left:X,right:X+W,bottom:Y+K,x:X,y:Y}}function tY(J,X,Y){return Math.floor(J/X)!==Y}function x6(J,X){return X<0||X>=J.current.length}function m7(J,X){return Ow(J,{disabledIndices:X})}function Dz(J,X){return Ow(J,{decrement:!0,startingIndex:J.current.length,disabledIndices:X})}function Ow(J,{startingIndex:X=-1,decrement:Y=!1,disabledIndices:W,amount:K=1}={}){let U=X;do U+=Y?-K:K;while(U>=0&&U<=J.current.length-1&&z8(J,U,W));return U}function KX(J,{event:X,orientation:Y,loopFocus:W,rtl:K,cols:U,disabledIndices:q,minIndex:_,maxIndex:L,prevIndex:F,stopEvent:N=!1}){let V=F,k=[],A={},D=!1;{let v=null,x=-1;J.current.forEach((I,b)=>{if(I==null)return;let E=I.closest('[role="row"]');if(E)D=!0;if(E!==v||x===-1)v=E,x+=1,k[x]=[];k[x].push(b),A[b]=x})}let M=D&&k.length>0&&k.some((v)=>v.length!==U);function h(v){if(!M||F===-1)return;let x=A[F];if(x==null)return;let I=k[x].indexOf(F),b=v==="up"?x-1:x+1;if(W){if(b<0)b=k.length-1;else if(b>=k.length)b=0}let E=new Set;while(b>=0&&b<k.length&&!E.has(b)){E.add(b);let m=k[b];if(m.length===0){b=v==="up"?b-1:b+1;continue}let R=Math.min(I,m.length-1);for(let S=R;S>=0;S-=1){let p=m[S];if(!z8(J,p,q))return p}if(b=v==="up"?b-1:b+1,W){if(b<0)b=k.length-1;else if(b>=k.length)b=0}}return}if(X.key===JX){let v=h("up");if(v!==void 0){if(N)Xw(X);V=v}else{if(N)Xw(X);if(F===-1)V=L;else if(V=Ow(J,{startingIndex:V,amount:U,decrement:!0,disabledIndices:q}),W&&(F-U<_||V<0)){let x=F%U,I=L%U,b=L-(I-x);if(I===x)V=L;else V=I>x?b:b-U}if(x6(J,V))V=F}}if(X.key===R7){let v=h("down");if(v!==void 0){if(N)Xw(X);V=v}else{if(N)Xw(X);if(F===-1)V=_;else if(V=Ow(J,{startingIndex:F,amount:U,disabledIndices:q}),W&&F+U>L)V=Ow(J,{startingIndex:F%U-U,amount:U,disabledIndices:q});if(x6(J,V))V=F}}if(Y==="both"){let v=b4(F/U);if(X.key===(K?u8:p8)){if(N)Xw(X);if(F%U!==U-1){if(V=Ow(J,{startingIndex:F,disabledIndices:q}),W&&tY(V,U,v))V=Ow(J,{startingIndex:F-F%U-1,disabledIndices:q})}else if(W)V=Ow(J,{startingIndex:F-F%U-1,disabledIndices:q});if(tY(V,U,v))V=F}if(X.key===(K?p8:u8)){if(N)Xw(X);if(F%U!==0){if(V=Ow(J,{startingIndex:F,decrement:!0,disabledIndices:q}),W&&tY(V,U,v))V=Ow(J,{startingIndex:F+(U-F%U),decrement:!0,disabledIndices:q})}else if(W)V=Ow(J,{startingIndex:F+(U-F%U),decrement:!0,disabledIndices:q});if(tY(V,U,v))V=F}let x=b4(L/U)===v;if(x6(J,V))if(W&&x)V=X.key===(K?p8:u8)?L:Ow(J,{startingIndex:F-F%U-1,disabledIndices:q});else V=F}return V}function UX(J,X,Y){let W=[],K=0;return J.forEach(({width:U,height:q},_)=>{if(U>X)throw Error(`[Floating UI]: Invalid grid - item width at index ${_} is greater than grid columns`);let L=!1;if(Y)K=0;while(!L){let F=[];for(let N=0;N<U;N+=1)for(let V=0;V<q;V+=1)F.push(K+N+V*X);if(K%X+U<=X&&F.every((N)=>W[N]==null))F.forEach((N)=>{W[N]=_}),L=!0;else K+=1}}),[...W]}function HX(J,X,Y,W,K){if(J===-1)return-1;let U=Y.indexOf(J),q=X[J];switch(K){case"tl":return U;case"tr":if(!q)return U;return U+q.width-1;case"bl":if(!q)return U;return U+(q.height-1)*W;case"br":return Y.lastIndexOf(J);default:return-1}}function _X(J,X){return X.flatMap((Y,W)=>J.includes(Y)?[W]:[])}function z8(J,X,Y){if(typeof Y==="function")return Y(X);if(Y)return Y.includes(X);let W=J.current[X];if(!W)return!1;return W.hasAttribute("disabled")||W.getAttribute("aria-disabled")==="true"}/*!
242
+ `))},[JSON.stringify(X)])}let L=d8.useCallback((F)=>{if(!K)q(F)},[]);return[_,L]}var rH=c(G0(),1);var nA=c(G0(),1),oA={};function r1(J,X){let Y=nA.useRef(oA);if(Y.current===oA)Y.current=J(X);return Y}var iH=rH[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],jP=iH&&iH!==rH.useLayoutEffect?iH:(J)=>J();function F0(J){let X=r1(MP).current;return X.next=J,jP(X.effect),X.trampoline}function MP(){let J={next:void 0,callback:OP,trampoline:(...X)=>J.callback?.(...X),effect:()=>{J.callback=J.next}};return J}function OP(){throw Error("Base UI: Cannot call an event handler while rendering.")}var tA=c(G0(),1),DP=()=>{},k0=typeof document<"u"?tA.useLayoutEffect:DP;var h4=c(G0(),1);var OY=c(G0(),1),DY=OY.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>{return()=>{}},elementsRef:{current:[]},nextIndexRef:{current:0}});DY.displayName="CompositeListContext";function eA(){return OY.useContext(DY)}var wj=c(x1(),1);function Vz(J){let{children:X,elementsRef:Y,labelsRef:W,onMapChange:K}=J,U=F0(K),q=h4.useRef(0),_=r1(vP).current,L=r1(xP).current,[F,N]=h4.useState(0),V=h4.useRef(F),k=F0((v,x)=>{L.set(v,x??null),V.current+=1,N(V.current)}),A=F0((v)=>{L.delete(v),V.current+=1,N(V.current)}),D=h4.useMemo(()=>{EP(F);let v=new Map;return Array.from(L.keys()).filter((I)=>I.isConnected).sort(hP).forEach((I,b)=>{let E=L.get(I)??{};v.set(I,{...E,index:b})}),v},[L,F]);k0(()=>{if(typeof MutationObserver!=="function"||D.size===0)return;let v=new MutationObserver((x)=>{let I=new Set,b=(E)=>I.has(E)?I.delete(E):I.add(E);if(x.forEach((E)=>{E.removedNodes.forEach(b),E.addedNodes.forEach(b)}),I.size===0)V.current+=1,N(V.current)});return D.forEach((x,I)=>{if(I.parentElement)v.observe(I.parentElement,{childList:!0})}),()=>{v.disconnect()}},[D]),k0(()=>{if(V.current===F){if(Y.current.length!==D.size)Y.current.length=D.size;if(W&&W.current.length!==D.size)W.current.length=D.size;q.current=D.size}U(D)},[U,D,Y,W,F]),k0(()=>{return()=>{Y.current=[]}},[Y]),k0(()=>{return()=>{if(W)W.current=[]}},[W]);let M=F0((v)=>{return _.add(v),()=>{_.delete(v)}});k0(()=>{_.forEach((v)=>v(D))},[_,D]);let h=h4.useMemo(()=>({register:k,unregister:A,subscribeMapChange:M,elementsRef:Y,labelsRef:W,nextIndexRef:q}),[k,A,M,Y,W,q]);return wj.jsx(DY.Provider,{value:h,children:X})}function xP(){return new Map}function vP(){return new Set}function hP(J,X){let Y=J.compareDocumentPosition(X);if(Y&Node.DOCUMENT_POSITION_FOLLOWING||Y&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(Y&Node.DOCUMENT_POSITION_PRECEDING||Y&Node.DOCUMENT_POSITION_CONTAINS)return 1;return 0}function EP(J){}var TY=c(G0(),1),zj=TY.createContext(void 0);zj.displayName="DirectionContext";function M5(){return TY.useContext(zj)?.direction??"ltr"}var PY=c(G0(),1);function O5(J,X,Y,W){let K=r1(Jj).current;if(PP(K,J,X,Y,W))Xj(K,[J,X,Y,W]);return K.callback}function Zj(J){let X=r1(Jj).current;if(IP(X,J))Xj(X,J);return X.callback}function Jj(){return{callback:null,cleanup:null,refs:[]}}function PP(J,X,Y,W,K){return J.refs[0]!==X||J.refs[1]!==Y||J.refs[2]!==W||J.refs[3]!==K}function IP(J,X){return J.refs.length!==X.length||J.refs.some((Y,W)=>Y!==X[W])}function Xj(J,X){if(J.refs=X,X.every((Y)=>Y==null)){J.callback=null;return}J.callback=(Y)=>{if(J.cleanup)J.cleanup(),J.cleanup=null;if(Y!=null){let W=Array(X.length).fill(null);for(let K=0;K<X.length;K+=1){let U=X[K];if(U==null)continue;switch(typeof U){case"function":{let q=U(Y);if(typeof q==="function")W[K]=q;break}case"object":{U.current=Y;break}default:}}J.cleanup=()=>{for(let K=0;K<X.length;K+=1){let U=X[K];if(U==null)continue;switch(typeof U){case"function":{let q=W[K];if(typeof q==="function")q();else U(null);break}case"object":{U.current=null;break}default:}}}}}}var Yj=c(G0(),1);var $j=c(G0(),1),bP=parseInt($j.version,10);function Fz(J){return bP>=J}function aH(J){if(!Yj.isValidElement(J))return null;let X=J,Y=X.props;return(Fz(19)?Y?.ref:X.ref)??null}function sJ(J,X){if(J&&!X)return J;if(!J&&X)return X;if(J||X)return{...J,...X};return}function Gj(J,X){let Y={};for(let W in J){let K=J[W];if(X?.hasOwnProperty(W)){let U=X[W](K);if(U!=null)Object.assign(Y,U);continue}if(K===!0)Y[`data-${W.toLowerCase()}`]="";else if(K)Y[`data-${W.toLowerCase()}`]=K.toString()}return Y}function Qj(J,X){return typeof J==="function"?J(X):J}function Wj(J,X){return typeof J==="function"?J(X):J}var nJ={};function D5(J,X,Y,W,K){let U={...sH(J,nJ)};if(X)U=oJ(U,X);if(Y)U=oJ(U,Y);if(W)U=oJ(U,W);if(K)U=oJ(U,K);return U}function Kj(J){if(J.length===0)return nJ;if(J.length===1)return sH(J[0],nJ);let X={...sH(J[0],nJ)};for(let Y=1;Y<J.length;Y+=1)X=oJ(X,J[Y]);return X}function oJ(J,X){if(Uj(X))return X(J);return SP(J,X)}function SP(J,X){if(!X)return J;for(let Y in X){let W=X[Y];switch(Y){case"style":{J[Y]=sJ(J.style,W);break}case"className":{J[Y]=oH(J.className,W);break}default:if(CP(Y,W))J[Y]=yP(J[Y],W);else J[Y]=W}}return J}function CP(J,X){let Y=J.charCodeAt(0),W=J.charCodeAt(1),K=J.charCodeAt(2);return Y===111&&W===110&&K>=65&&K<=90&&(typeof X==="function"||typeof X>"u")}function Uj(J){return typeof J==="function"}function sH(J,X){if(Uj(J))return J(X);return J??nJ}function yP(J,X){if(!X)return J;if(!J)return X;return(Y)=>{if(RP(Y)){let K=Y;xY(K);let U=X(K);if(!K.baseUIHandlerPrevented)J?.(K);return U}let W=X(Y);return J?.(Y),W}}function xY(J){return J.preventBaseUIHandler=()=>{J.baseUIHandlerPrevented=!0},J}function oH(J,X){if(X){if(J)return X+" "+J;return X}return J}function RP(J){return J!=null&&typeof J==="object"&&"nativeEvent"in J}function vY(){}var t2=Object.freeze([]),v1=Object.freeze({});var Hj=500,_j=500,qj={style:{transition:"none"}},hY="data-base-ui-click-trigger",Bj={fallbackAxisSide:"none"},EY={fallbackAxisSide:"end"},Lj={clipPath:"inset(50%)",position:"fixed",top:0,left:0};var nH=c(G0(),1);function h0(J,X,Y={}){let W=X.render,K=gP(X,Y);if(Y.enabled===!1)return null;let U=Y.state??v1;return fP(J,W,K,U)}function gP(J,X={}){let{className:Y,style:W,render:K}=J,{state:U=v1,ref:q,props:_,stateAttributesMapping:L,enabled:F=!0}=X,N=F?Qj(Y,U):void 0,V=F?Wj(W,U):void 0,k=F?Gj(U,L):v1,A=F?sJ(k,Array.isArray(_)?Kj(_):_)??v1:v1;if(typeof document<"u")if(!F)O5(null,null);else if(Array.isArray(q))A.ref=Zj([A.ref,aH(K),...q]);else A.ref=O5(A.ref,aH(K),q);if(!F)return v1;if(N!==void 0)A.className=oH(A.className,N);if(V!==void 0)A.style=sJ(A.style,V);return A}function fP(J,X,Y,W){if(X){if(typeof X==="function")return X(Y,W);let K=D5(Y,X.props);return K.ref=Y.ref,PY.cloneElement(X,K)}if(J){if(typeof J==="string")return mP(J,Y)}throw Error("Base UI: Render element or function are not defined.")}function mP(J,X){if(J==="button")return nH.createElement("button",{type:"button",...X,key:X.key});if(J==="img")return nH.createElement("img",{alt:"",...X,key:X.key});return PY.createElement(J,X)}var B0={};qz(B0,{windowResize:()=>LI,wheel:()=>KI,triggerPress:()=>uP,triggerHover:()=>pP,triggerFocus:()=>cP,trackPress:()=>nP,siblingOpen:()=>_I,scrub:()=>UI,pointer:()=>QI,outsidePress:()=>lP,none:()=>dP,listNavigation:()=>YI,linkPress:()=>aP,keyboard:()=>GI,itemPress:()=>iP,inputPaste:()=>JI,inputClear:()=>zI,inputChange:()=>wI,inputBlur:()=>ZI,incrementPress:()=>tP,imperativeAction:()=>BI,focusOut:()=>XI,escapeKey:()=>$I,drag:()=>WI,disabled:()=>qI,decrementPress:()=>eP,closePress:()=>rP,clearPress:()=>sP,chipRemovePress:()=>oP,cancelOpen:()=>HI});var dP="none",uP="trigger-press",pP="trigger-hover",cP="trigger-focus",lP="outside-press",iP="item-press",rP="close-press",aP="link-press",sP="clear-press",oP="chip-remove-press",nP="track-press",tP="increment-press",eP="decrement-press",wI="input-change",zI="input-clear",ZI="input-blur",JI="input-paste",XI="focus-out",$I="escape-key",YI="list-navigation",GI="keyboard",QI="pointer",WI="drag",KI="wheel",UI="scrub",HI="cancel-open",_I="sibling-open",qI="disabled",BI="imperative-action",LI="window-resize";function P0(J,X,Y,W){let K=!1,U=!1,q=W??v1;return{reason:J,event:X??new Event("base-ui"),cancel(){K=!0},allowPropagation(){U=!0},get isCanceled(){return K},get isPropagationAllowed(){return U},trigger:Y,...q}}var IY=c(G0(),1);var VI=c(G0(),1),Vj={...VI};var Fj=0;function FI(J,X="mui"){let[Y,W]=IY.useState(J),K=J||Y;return IY.useEffect(()=>{if(Y==null)Fj+=1,W(`${X}-${Fj}`)},[Y,X]),K}var Nj=Vj.useId;function J2(J,X){if(Nj!==void 0){let Y=Nj();return J??(X?`${X}-${Y}`:Y)}return FI(J,X)}function ww(J){return J2(J,"base-ui")}var tH=c(m8(),1);var kj=c(G0(),1),NI=[];function Nz(J){kj.useEffect(J,NI)}var bY=null,Ef=globalThis.requestAnimationFrame;class Aj{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=(J)=>{this.isScheduled=!1;let X=this.callbacks,Y=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,Y>0)for(let W=0;W<X.length;W+=1)X[W]?.(J)};request(J){let X=this.nextId;this.nextId+=1,this.callbacks.push(J),this.callbacksCount+=1;let Y=!1;if(!this.isScheduled||Y)requestAnimationFrame(this.tick),this.isScheduled=!0;return X}cancel(J){let X=J-this.startId;if(X<0||X>=this.callbacks.length)return;this.callbacks[X]=null,this.callbacksCount-=1}}var SY=new Aj;class T5{static create(){return new T5}static request(J){return SY.request(J)}static cancel(J){return SY.cancel(J)}currentId=bY;request(J){this.cancel(),this.currentId=SY.request(()=>{this.currentId=bY,J()})}cancel=()=>{if(this.currentId!==bY)SY.cancel(this.currentId),this.currentId=bY};disposeEffect=()=>{return this.cancel}}function x5(){let J=r1(T5.create).current;return Nz(J.disposeEffect),J}function O6(J){if(J==null)return J;return"current"in J?J.current:J}function kz(J,X=!1,Y=!0){let W=x5();return F0((K,U=null)=>{W.cancel();let q=O6(J);if(q==null)return;if(typeof q.getAnimations!=="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)K();else W.request(()=>{function _(){if(!q)return;Promise.all(q.getAnimations().map((L)=>L.finished)).then(()=>{if(U!=null&&U.aborted)return;tH.flushSync(K)}).catch(()=>{if(Y){if(U!=null&&U.aborted)return;tH.flushSync(K)}else if(q.getAnimations().length>0&&q.getAnimations().some((L)=>L.pending||L.playState!=="finished"))_()})}if(X)W.request(_);else _()})})}var tJ=c(G0(),1);function Az(J,X=!1,Y=!1){let[W,K]=tJ.useState(J&&X?"idle":void 0),[U,q]=tJ.useState(J);if(J&&!U)q(!0),K("starting");if(!J&&U&&W!=="ending"&&!Y)K("ending");if(!J&&!U&&W==="ending")K(void 0);return k0(()=>{if(!J&&U&&W!=="ending"&&Y){let _=T5.request(()=>{K("ending")});return()=>{T5.cancel(_)}}return},[J,U,W,Y]),k0(()=>{if(!J||X)return;let _=T5.request(()=>{K(void 0)});return()=>{T5.cancel(_)}},[X,J]),k0(()=>{if(!J||!X)return;if(J&&U&&W!=="idle")K("starting");let _=T5.request(()=>{K("idle")});return()=>{T5.cancel(_)}},[X,J,U,K,W]),tJ.useMemo(()=>({mounted:U,setMounted:q,transitionStatus:W}),[U,W])}var D6=c(G0(),1);var kI=function(J){return J[J.None=0]="None",J[J.GuessFromOrder=1]="GuessFromOrder",J}({});function v5(J={}){let{label:X,metadata:Y,textRef:W,indexGuessBehavior:K,index:U}=J,{register:q,unregister:_,subscribeMapChange:L,elementsRef:F,labelsRef:N,nextIndexRef:V}=eA(),k=D6.useRef(-1),[A,D]=D6.useState(U??(K===kI.GuessFromOrder?()=>{if(k.current===-1){let v=V.current;V.current+=1,k.current=v}return k.current}:-1)),M=D6.useRef(null),h=D6.useCallback((v)=>{if(M.current=v,A!==-1&&v!==null){if(F.current[A]=v,N){let x=X!==void 0;N.current[A]=x?X:W?.current?.textContent??v.textContent}}},[A,F,N,X,W]);return k0(()=>{if(U!=null)return;let v=M.current;if(v)return q(v,Y),()=>{_(v)};return},[U,q,_,Y]),k0(()=>{if(U!=null)return;return L((v)=>{let x=M.current?v.get(M.current)?.index:null;if(x!=null)D(x)})},[U,L,D]),D6.useMemo(()=>({ref:h,index:A}),[A,h])}var eJ=function(J){return J.startingStyle="data-starting-style",J.endingStyle="data-ending-style",J}({}),AI={[eJ.startingStyle]:""},jI={[eJ.endingStyle]:""},h2={transitionStatus(J){if(J==="starting")return AI;if(J==="ending")return jI;return null}};function jj(J){return J==null||J.hasAttribute("disabled")||J.getAttribute("aria-disabled")==="true"}var y7=c(G0(),1);function yY(){return typeof window<"u"}function o5(J){if(RY(J))return(J.nodeName||"").toLowerCase();return"#document"}function u1(J){var X;return(J==null||(X=J.ownerDocument)==null?void 0:X.defaultView)||window}function n5(J){var X;return(X=(RY(J)?J.ownerDocument:J.document)||window.document)==null?void 0:X.documentElement}function RY(J){if(!yY())return!1;return J instanceof Node||J instanceof u1(J).Node}function L1(J){if(!yY())return!1;return J instanceof Element||J instanceof u1(J).Element}function O1(J){if(!yY())return!1;return J instanceof HTMLElement||J instanceof u1(J).HTMLElement}function CY(J){if(!yY()||typeof ShadowRoot>"u")return!1;return J instanceof ShadowRoot||J instanceof u1(J).ShadowRoot}var MI=new Set(["inline","contents"]);function T6(J){let{overflow:X,overflowX:Y,overflowY:W,display:K}=uw(J);return/auto|scroll|overlay|hidden|clip/.test(X+W+Y)&&!MI.has(K)}var OI=new Set(["table","td","th"]);function Mj(J){return OI.has(o5(J))}var DI=[":popover-open",":modal"];function wX(J){return DI.some((X)=>{try{return J.matches(X)}catch(Y){return!1}})}var TI=["transform","translate","scale","rotate","perspective"],xI=["transform","translate","scale","rotate","perspective","filter"],vI=["paint","layout","strict","content"];function gY(J){let X=jz(),Y=L1(J)?uw(J):J;return TI.some((W)=>Y[W]?Y[W]!=="none":!1)||(Y.containerType?Y.containerType!=="normal":!1)||!X&&(Y.backdropFilter?Y.backdropFilter!=="none":!1)||!X&&(Y.filter?Y.filter!=="none":!1)||xI.some((W)=>(Y.willChange||"").includes(W))||vI.some((W)=>(Y.contain||"").includes(W))}function Oj(J){let X=e2(J);while(O1(X)&&!z5(X)){if(gY(X))return X;else if(wX(X))return null;X=e2(X)}return null}function jz(){if(typeof CSS>"u"||!CSS.supports)return!1;return CSS.supports("-webkit-backdrop-filter","none")}var hI=new Set(["html","body","#document"]);function z5(J){return hI.has(o5(J))}function uw(J){return u1(J).getComputedStyle(J)}function zX(J){if(L1(J))return{scrollLeft:J.scrollLeft,scrollTop:J.scrollTop};return{scrollLeft:J.scrollX,scrollTop:J.scrollY}}function e2(J){if(o5(J)==="html")return J;let X=J.assignedSlot||J.parentNode||CY(J)&&J.host||n5(J);return CY(X)?X.host:X}function Dj(J){let X=e2(J);if(z5(X))return J.ownerDocument?J.ownerDocument.body:J.body;if(O1(X)&&T6(X))return X;return Dj(X)}function w5(J,X,Y){var W;if(X===void 0)X=[];if(Y===void 0)Y=!0;let K=Dj(J),U=K===((W=J.ownerDocument)==null?void 0:W.body),q=u1(K);if(U){let _=fY(q);return X.concat(q,q.visualViewport||[],T6(K)?K:[],_&&Y?w5(_):[])}return X.concat(K,w5(K,[],Y))}function fY(J){return J.parent&&Object.getPrototypeOf(J.parent)?J.frameElement:null}var eH;eH=new Set;function w_(...J){{let X=J.join(" ");if(!eH.has(X))eH.add(X),console.error(`Base UI: ${X}`)}}var mY=c(G0(),1),dY=mY.createContext(void 0);dY.displayName="CompositeRootContext";function Mz(J=!1){let X=mY.useContext(dY);if(X===void 0&&!J)throw Error("Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.");return X}var Tj=c(G0(),1);function xj(J){let{focusableWhenDisabled:X,disabled:Y,composite:W=!1,tabIndex:K=0,isNativeButton:U}=J,q=W&&X!==!1,_=W&&X===!1;return{props:Tj.useMemo(()=>{let F={onKeyDown(N){if(Y&&X&&N.key!=="Tab")N.preventDefault()}};if(!W){if(F.tabIndex=K,!U&&Y)F.tabIndex=X?K:-1}if(U&&(X||q)||!U&&Y)F["aria-disabled"]=Y;if(U&&(!X||_))F.disabled=Y;return F},[W,Y,X,q,_,U,K])}}function Z5(J={}){let{disabled:X=!1,focusableWhenDisabled:Y,tabIndex:W=0,native:K=!0}=J,U=y7.useRef(null),q=Mz(!0)!==void 0,_=F0(()=>{let k=U.current;return Boolean(k?.tagName==="A"&&k?.href)}),{props:L}=xj({focusableWhenDisabled:Y,disabled:X,composite:q,tabIndex:W,isNativeButton:K});y7.useEffect(()=>{if(!U.current)return;let k=U.current.tagName==="BUTTON";if(K){if(!k)w_("A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`.")}else if(k)w_("A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.")},[K]);let F=y7.useCallback(()=>{let k=U.current;if(!EI(k))return;if(q&&X&&L.disabled===void 0&&k.disabled)k.disabled=!1},[X,L.disabled,q]);k0(F,[F]);let N=y7.useCallback((k={})=>{let{onClick:A,onMouseDown:D,onKeyUp:M,onKeyDown:h,onPointerDown:v,...x}=k;return D5({type:K?"button":void 0,onClick(b){if(X){b.preventDefault();return}A?.(b)},onMouseDown(b){if(!X)D?.(b)},onKeyDown(b){if(!X)xY(b),h?.(b);if(b.baseUIHandlerPrevented)return;let E=b.target===b.currentTarget&&!K&&!_()&&!X,m=b.key==="Enter",R=b.key===" ";if(E){if(R||m)b.preventDefault();if(m)A?.(b)}},onKeyUp(b){if(!X)xY(b),M?.(b);if(b.baseUIHandlerPrevented)return;if(b.target===b.currentTarget&&!K&&!X&&b.key===" ")A?.(b)},onPointerDown(b){if(X){b.preventDefault();return}v?.(b)}},!K?{role:"button"}:void 0,L,x)},[X,L,K,_]),V=F0((k)=>{U.current=k,F()});return{getButtonProps:N,buttonRef:V}}function EI(J){return O1(J)&&J.tagName==="BUTTON"}var E4=typeof navigator<"u",z_=PI(),vj=bI(),uY=II(),hj=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),Ej=z_.platform==="MacIntel"&&z_.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(z_.platform),Ym=E4&&/firefox/i.test(uY),pY=E4&&/apple/i.test(navigator.vendor),Gm=E4&&/Edg/i.test(uY),cY=E4&&/android/i.test(vj)||/android/i.test(uY),Pj=E4&&vj.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,lY=uY.includes("jsdom/");function PI(){if(!E4)return{platform:"",maxTouchPoints:-1};let J=navigator.userAgentData;if(J?.platform)return{platform:J.platform,maxTouchPoints:navigator.maxTouchPoints};return{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function II(){if(!E4)return"";let J=navigator.userAgentData;if(J&&Array.isArray(J.brands))return J.brands.map(({brand:X,version:Y})=>`${X}/${Y}`).join(" ");return navigator.userAgent}function bI(){if(!E4)return"";let J=navigator.userAgentData;if(J?.platform)return J.platform;return navigator.platform??""}var ZX="data-base-ui-focusable",Z_="active",J_="selected",Oz="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",u8="ArrowLeft",p8="ArrowRight",JX="ArrowUp",R7="ArrowDown";function X2(J){let X=J.activeElement;while(X?.shadowRoot?.activeElement!=null)X=X.shadowRoot.activeElement;return X}function t0(J,X){if(!J||!X)return!1;let Y=X.getRootNode?.();if(J.contains(X))return!0;if(Y&&CY(Y)){let W=X;while(W){if(J===W)return!0;W=W.parentNode||W.host}}return!1}function f1(J){if("composedPath"in J)return J.composedPath()[0];return J.target}function h5(J,X){if(X==null)return!1;if("composedPath"in J)return J.composedPath().includes(X);let Y=J;return Y.target!=null&&X.contains(Y.target)}function Ij(J){return J.matches("html,body")}function C1(J){return J?.ownerDocument||document}function XX(J){return O1(J)&&J.matches(Oz)}function $X(J){if(!J)return!1;return J.getAttribute("role")==="combobox"&&XX(J)}function bj(J){if(!J||lY)return!0;try{return J.matches(":focus-visible")}catch(X){return!0}}function g7(J){if(!J)return null;return J.hasAttribute(ZX)?J:J.querySelector(`[${ZX}]`)||J}function c8(J,X,Y=!0){return J.filter((K)=>K.parentId===X&&(!Y||K.context?.open)).flatMap((K)=>[K,...c8(J,K.id,Y)])}function X_(J,X){let Y=[],W=J.find((K)=>K.id===X)?.parentId;while(W){let K=J.find((U)=>U.id===W);if(W=K?.parentId,K)Y=Y.concat(K)}return Y}function Xw(J){J.preventDefault(),J.stopPropagation()}function Sj(J){return"nativeEvent"in J}function iY(J){if(J.mozInputSource===0&&J.isTrusted)return!0;if(cY&&J.pointerType)return J.type==="click"&&J.buttons===1;return J.detail===0&&!J.pointerType}function rY(J){if(lY)return!1;return!cY&&J.width===0&&J.height===0||cY&&J.width===1&&J.height===1&&J.pressure===0&&J.detail===0&&J.pointerType==="mouse"||J.width<1&&J.height<1&&J.pressure===0&&J.detail===0&&J.pointerType==="touch"}function E5(J,X){let Y=["mouse","pen"];if(!X)Y.push("",void 0);return Y.includes(J)}function aY(J){let X=J.type;return X==="click"||X==="mousedown"||X==="keydown"||X==="keyup"}var Rj=["top","right","bottom","left"];var{min:P4,max:F2,round:I4,floor:b4}=Math,t5=(J)=>({x:J,y:J}),SI={left:"right",right:"left",bottom:"top",top:"bottom"},CI={start:"end",end:"start"};function GX(J,X,Y){return F2(J,P4(X,Y))}function e5(J,X){return typeof J==="function"?J(X):J}function nw(J){return J.split("-")[0]}function w8(J){return J.split("-")[1]}function oY(J){return J==="x"?"y":"x"}function QX(J){return J==="y"?"height":"width"}var yI=new Set(["top","bottom"]);function E2(J){return yI.has(nw(J))?"y":"x"}function WX(J){return oY(E2(J))}function gj(J,X,Y){if(Y===void 0)Y=!1;let W=w8(J),K=WX(J),U=QX(K),q=K==="x"?W===(Y?"end":"start")?"right":"left":W==="start"?"bottom":"top";if(X.reference[U]>X.floating[U])q=YX(q);return[q,YX(q)]}function fj(J){let X=YX(J);return[sY(J),X,sY(X)]}function sY(J){return J.replace(/start|end/g,(X)=>CI[X])}var Cj=["left","right"],yj=["right","left"],RI=["top","bottom"],gI=["bottom","top"];function fI(J,X,Y){switch(J){case"top":case"bottom":if(Y)return X?yj:Cj;return X?Cj:yj;case"left":case"right":return X?RI:gI;default:return[]}}function mj(J,X,Y,W){let K=w8(J),U=fI(nw(J),Y==="start",W);if(K){if(U=U.map((q)=>q+"-"+K),X)U=U.concat(U.map(sY))}return U}function YX(J){return J.replace(/left|right|bottom|top/g,(X)=>SI[X])}function mI(J){return{top:0,right:0,bottom:0,left:0,...J}}function nY(J){return typeof J!=="number"?mI(J):{top:J,right:J,bottom:J,left:J}}function f7(J){let{x:X,y:Y,width:W,height:K}=J;return{width:W,height:K,top:Y,left:X,right:X+W,bottom:Y+K,x:X,y:Y}}function tY(J,X,Y){return Math.floor(J/X)!==Y}function x6(J,X){return X<0||X>=J.current.length}function m7(J,X){return Ow(J,{disabledIndices:X})}function Dz(J,X){return Ow(J,{decrement:!0,startingIndex:J.current.length,disabledIndices:X})}function Ow(J,{startingIndex:X=-1,decrement:Y=!1,disabledIndices:W,amount:K=1}={}){let U=X;do U+=Y?-K:K;while(U>=0&&U<=J.current.length-1&&z8(J,U,W));return U}function KX(J,{event:X,orientation:Y,loopFocus:W,rtl:K,cols:U,disabledIndices:q,minIndex:_,maxIndex:L,prevIndex:F,stopEvent:N=!1}){let V=F,k=[],A={},D=!1;{let v=null,x=-1;J.current.forEach((I,b)=>{if(I==null)return;let E=I.closest('[role="row"]');if(E)D=!0;if(E!==v||x===-1)v=E,x+=1,k[x]=[];k[x].push(b),A[b]=x})}let M=D&&k.length>0&&k.some((v)=>v.length!==U);function h(v){if(!M||F===-1)return;let x=A[F];if(x==null)return;let I=k[x].indexOf(F),b=v==="up"?x-1:x+1;if(W){if(b<0)b=k.length-1;else if(b>=k.length)b=0}let E=new Set;while(b>=0&&b<k.length&&!E.has(b)){E.add(b);let m=k[b];if(m.length===0){b=v==="up"?b-1:b+1;continue}let R=Math.min(I,m.length-1);for(let S=R;S>=0;S-=1){let p=m[S];if(!z8(J,p,q))return p}if(b=v==="up"?b-1:b+1,W){if(b<0)b=k.length-1;else if(b>=k.length)b=0}}return}if(X.key===JX){let v=h("up");if(v!==void 0){if(N)Xw(X);V=v}else{if(N)Xw(X);if(F===-1)V=L;else if(V=Ow(J,{startingIndex:V,amount:U,decrement:!0,disabledIndices:q}),W&&(F-U<_||V<0)){let x=F%U,I=L%U,b=L-(I-x);if(I===x)V=L;else V=I>x?b:b-U}if(x6(J,V))V=F}}if(X.key===R7){let v=h("down");if(v!==void 0){if(N)Xw(X);V=v}else{if(N)Xw(X);if(F===-1)V=_;else if(V=Ow(J,{startingIndex:F,amount:U,disabledIndices:q}),W&&F+U>L)V=Ow(J,{startingIndex:F%U-U,amount:U,disabledIndices:q});if(x6(J,V))V=F}}if(Y==="both"){let v=b4(F/U);if(X.key===(K?u8:p8)){if(N)Xw(X);if(F%U!==U-1){if(V=Ow(J,{startingIndex:F,disabledIndices:q}),W&&tY(V,U,v))V=Ow(J,{startingIndex:F-F%U-1,disabledIndices:q})}else if(W)V=Ow(J,{startingIndex:F-F%U-1,disabledIndices:q});if(tY(V,U,v))V=F}if(X.key===(K?p8:u8)){if(N)Xw(X);if(F%U!==0){if(V=Ow(J,{startingIndex:F,decrement:!0,disabledIndices:q}),W&&tY(V,U,v))V=Ow(J,{startingIndex:F+(U-F%U),decrement:!0,disabledIndices:q})}else if(W)V=Ow(J,{startingIndex:F+(U-F%U),decrement:!0,disabledIndices:q});if(tY(V,U,v))V=F}let x=b4(L/U)===v;if(x6(J,V))if(W&&x)V=X.key===(K?p8:u8)?L:Ow(J,{startingIndex:F-F%U-1,disabledIndices:q});else V=F}return V}function UX(J,X,Y){let W=[],K=0;return J.forEach(({width:U,height:q},_)=>{if(U>X)throw Error(`[Floating UI]: Invalid grid - item width at index ${_} is greater than grid columns`);let L=!1;if(Y)K=0;while(!L){let F=[];for(let N=0;N<U;N+=1)for(let V=0;V<q;V+=1)F.push(K+N+V*X);if(K%X+U<=X&&F.every((N)=>W[N]==null))F.forEach((N)=>{W[N]=_}),L=!0;else K+=1}}),[...W]}function HX(J,X,Y,W,K){if(J===-1)return-1;let U=Y.indexOf(J),q=X[J];switch(K){case"tl":return U;case"tr":if(!q)return U;return U+q.width-1;case"bl":if(!q)return U;return U+(q.height-1)*W;case"br":return Y.lastIndexOf(J);default:return-1}}function _X(J,X){return X.flatMap((Y,W)=>J.includes(Y)?[W]:[])}function z8(J,X,Y){if(typeof Y==="function")return Y(X);if(Y)return Y.includes(X);let W=J.current[X];if(!W)return!1;return W.hasAttribute("disabled")||W.getAttribute("aria-disabled")==="true"}/*!
243
243
  * tabbable 6.3.0
244
244
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
245
- */var fI=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],eY=fI.join(","),uj=typeof Element>"u",Tz=uj?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,wG=!uj&&Element.prototype.getRootNode?function(J){var X;return J===null||J===void 0?void 0:(X=J.getRootNode)===null||X===void 0?void 0:X.call(J)}:function(J){return J===null||J===void 0?void 0:J.ownerDocument},qX=function(X,Y){var W;if(Y===void 0)Y=!0;var K=X===null||X===void 0?void 0:(W=X.getAttribute)===null||W===void 0?void 0:W.call(X,"inert"),U=K===""||K==="true",q=U||Y&&X&&qX(X.parentNode);return q},mI=function(X){var Y,W=X===null||X===void 0?void 0:(Y=X.getAttribute)===null||Y===void 0?void 0:Y.call(X,"contenteditable");return W===""||W==="true"},pj=function(X,Y,W){if(qX(X))return[];var K=Array.prototype.slice.apply(X.querySelectorAll(eY));if(Y&&Tz.call(X,eY))K.unshift(X);return K=K.filter(W),K},zG=function(X,Y,W){var K=[],U=Array.from(X);while(U.length){var q=U.shift();if(qX(q,!1))continue;if(q.tagName==="SLOT"){var _=q.assignedElements(),L=_.length?_:q.children,F=zG(L,!0,W);if(W.flatten)K.push.apply(K,F);else K.push({scopeParent:q,candidates:F})}else{var N=Tz.call(q,eY);if(N&&W.filter(q)&&(Y||!X.includes(q)))K.push(q);var V=q.shadowRoot||typeof W.getShadowRoot==="function"&&W.getShadowRoot(q),k=!qX(V,!1)&&(!W.shadowRootFilter||W.shadowRootFilter(q));if(V&&k){var A=zG(V===!0?q.children:V.children,!0,W);if(W.flatten)K.push.apply(K,A);else K.push({scopeParent:q,candidates:A})}else U.unshift.apply(U,q.children)}}return K},cj=function(X){return!isNaN(parseInt(X.getAttribute("tabindex"),10))},lj=function(X){if(!X)throw Error("No node provided");if(X.tabIndex<0){if((/^(AUDIO|VIDEO|DETAILS)$/.test(X.tagName)||mI(X))&&!cj(X))return 0}return X.tabIndex},dI=function(X,Y){var W=lj(X);if(W<0&&Y&&!cj(X))return 0;return W},uI=function(X,Y){return X.tabIndex===Y.tabIndex?X.documentOrder-Y.documentOrder:X.tabIndex-Y.tabIndex},ij=function(X){return X.tagName==="INPUT"},pI=function(X){return ij(X)&&X.type==="hidden"},cI=function(X){var Y=X.tagName==="DETAILS"&&Array.prototype.slice.apply(X.children).some(function(W){return W.tagName==="SUMMARY"});return Y},lI=function(X,Y){for(var W=0;W<X.length;W++)if(X[W].checked&&X[W].form===Y)return X[W]},iI=function(X){if(!X.name)return!0;var Y=X.form||wG(X),W=function(_){return Y.querySelectorAll('input[type="radio"][name="'+_+'"]')},K;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape==="function")K=W(window.CSS.escape(X.name));else try{K=W(X.name)}catch(q){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",q.message),!1}var U=lI(K,X.form);return!U||U===X},rI=function(X){return ij(X)&&X.type==="radio"},aI=function(X){return rI(X)&&!iI(X)},sI=function(X){var Y,W=X&&wG(X),K=(Y=W)===null||Y===void 0?void 0:Y.host,U=!1;if(W&&W!==X){var q,_,L;U=!!((q=K)!==null&&q!==void 0&&(_=q.ownerDocument)!==null&&_!==void 0&&_.contains(K)||X!==null&&X!==void 0&&(L=X.ownerDocument)!==null&&L!==void 0&&L.contains(X));while(!U&&K){var F,N,V;W=wG(K),K=(F=W)===null||F===void 0?void 0:F.host,U=!!((N=K)!==null&&N!==void 0&&(V=N.ownerDocument)!==null&&V!==void 0&&V.contains(K))}}return U},dj=function(X){var Y=X.getBoundingClientRect(),W=Y.width,K=Y.height;return W===0&&K===0},oI=function(X,Y){var{displayCheck:W,getShadowRoot:K}=Y;if(W==="full-native"){if("checkVisibility"in X){var U=X.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!U}}if(getComputedStyle(X).visibility==="hidden")return!0;var q=Tz.call(X,"details>summary:first-of-type"),_=q?X.parentElement:X;if(Tz.call(_,"details:not([open]) *"))return!0;if(!W||W==="full"||W==="full-native"||W==="legacy-full"){if(typeof K==="function"){var L=X;while(X){var F=X.parentElement,N=wG(X);if(F&&!F.shadowRoot&&K(F)===!0)return dj(X);else if(X.assignedSlot)X=X.assignedSlot;else if(!F&&N!==X.ownerDocument)X=N.host;else X=F}X=L}if(sI(X))return!X.getClientRects().length;if(W!=="legacy-full")return!0}else if(W==="non-zero-area")return dj(X);return!1},nI=function(X){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(X.tagName)){var Y=X.parentElement;while(Y){if(Y.tagName==="FIELDSET"&&Y.disabled){for(var W=0;W<Y.children.length;W++){var K=Y.children.item(W);if(K.tagName==="LEGEND")return Tz.call(Y,"fieldset[disabled] *")?!0:!K.contains(X)}return!0}Y=Y.parentElement}}return!1},$_=function(X,Y){if(Y.disabled||qX(Y)||pI(Y)||oI(Y,X)||cI(Y)||nI(Y))return!1;return!0},Y_=function(X,Y){if(aI(Y)||lj(Y)<0||!$_(X,Y))return!1;return!0},tI=function(X){var Y=parseInt(X.getAttribute("tabindex"),10);if(isNaN(Y)||Y>=0)return!0;return!1},rj=function(X){var Y=[],W=[];return X.forEach(function(K,U){var q=!!K.scopeParent,_=q?K.scopeParent:K,L=dI(_,q),F=q?rj(K.candidates):_;if(L===0)q?Y.push.apply(Y,F):Y.push(_);else W.push({documentOrder:U,tabIndex:L,item:K,isScope:q,content:F})}),W.sort(uI).reduce(function(K,U){return U.isScope?K.push.apply(K,U.content):K.push(U.content),K},[]).concat(Y)},d7=function(X,Y){Y=Y||{};var W;if(Y.getShadowRoot)W=zG([X],Y.includeContainer,{filter:Y_.bind(null,Y),flatten:!1,getShadowRoot:Y.getShadowRoot,shadowRootFilter:tI});else W=pj(X,Y.includeContainer,Y_.bind(null,Y));return rj(W)},aj=function(X,Y){Y=Y||{};var W;if(Y.getShadowRoot)W=zG([X],Y.includeContainer,{filter:$_.bind(null,Y),flatten:!0,getShadowRoot:Y.getShadowRoot});else W=pj(X,Y.includeContainer,$_.bind(null,Y));return W},G_=function(X,Y){if(Y=Y||{},!X)throw Error("No node provided");if(Tz.call(X,eY)===!1)return!1;return Y_(Y,X)};var u7=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function sj(J,X){let Y=d7(J,u7()),W=Y.length;if(W===0)return;let K=X2(C1(J)),U=Y.indexOf(K),q=U===-1?X===1?0:W-1:U+X;return Y[q]}function xz(J){return sj(C1(J).body,1)||J}function ZG(J){return sj(C1(J).body,-1)||J}function oj(J,X){if(!J)return null;let Y=d7(C1(J).body,u7()),W=Y.length;if(W===0)return null;let K=Y.indexOf(J);if(K===-1)return null;let U=(K+X+W)%W;return Y[U]}function nj(J){return oj(J,1)}function tj(J){return oj(J,-1)}function v6(J,X){let Y=X||J.currentTarget,W=J.relatedTarget;return!W||!t0(Y,W)}function ej(J){d7(J,u7()).forEach((Y)=>{Y.dataset.tabindex=Y.getAttribute("tabindex")||"",Y.setAttribute("tabindex","-1")})}function Q_(J){J.querySelectorAll("[data-tabindex]").forEach((Y)=>{let W=Y.dataset.tabindex;if(delete Y.dataset.tabindex,W)Y.setAttribute("tabindex",W);else Y.removeAttribute("tabindex")})}var p7="ArrowUp",S4="ArrowDown",vz="ArrowLeft",c7="ArrowRight",hz="Home",Ez="End",W_=new Set([vz,c7]),zM=new Set([vz,c7,hz,Ez]),K_=new Set([p7,S4]),ZM=new Set([p7,S4,hz,Ez]),U_=new Set([...W_,...K_]),JM=new Set([...U_,hz,Ez]),XG=new Set([p7,S4,vz,c7,hz,Ez]),eI="Shift",wb="Control",zb="Alt",Zb="Meta",XM=new Set([eI,wb,zb,Zb]);function Jb(J){return O1(J)&&J.tagName==="INPUT"}function H_(J){if(Jb(J)&&J.selectionStart!=null)return!0;if(O1(J)&&J.tagName==="TEXTAREA")return!0;return!1}function __(J,X,Y,W){if(!J||!X||!X.scrollTo)return;let{scrollLeft:K,scrollTop:U}=J,q=J.clientWidth<J.scrollWidth,_=J.clientHeight<J.scrollHeight;if(q&&W!=="vertical"){let L=wM(J,X,"left"),F=JG(J),N=JG(X);if(Y==="ltr"){if(L+X.offsetWidth+N.scrollMarginRight>J.scrollLeft+J.clientWidth-F.scrollPaddingRight)K=L+X.offsetWidth+N.scrollMarginRight-J.clientWidth+F.scrollPaddingRight;else if(L-N.scrollMarginLeft<J.scrollLeft+F.scrollPaddingLeft)K=L-N.scrollMarginLeft-F.scrollPaddingLeft}if(Y==="rtl"){if(L-N.scrollMarginRight<J.scrollLeft+F.scrollPaddingLeft)K=L-N.scrollMarginLeft-F.scrollPaddingLeft;else if(L+X.offsetWidth+N.scrollMarginRight>J.scrollLeft+J.clientWidth-F.scrollPaddingRight)K=L+X.offsetWidth+N.scrollMarginRight-J.clientWidth+F.scrollPaddingRight}}if(_&&W!=="horizontal"){let L=wM(J,X,"top"),F=JG(J),N=JG(X);if(L-N.scrollMarginTop<J.scrollTop+F.scrollPaddingTop)U=L-N.scrollMarginTop-F.scrollPaddingTop;else if(L+X.offsetHeight+N.scrollMarginBottom>J.scrollTop+J.clientHeight-F.scrollPaddingBottom)U=L+X.offsetHeight+N.scrollMarginBottom-J.clientHeight+F.scrollPaddingBottom}J.scrollTo({left:K,top:U,behavior:"auto"})}function wM(J,X,Y){let W=Y==="left"?"offsetLeft":"offsetTop",K=0;while(X.offsetParent){if(K+=X[W],X.offsetParent===J)break;X=X.offsetParent}return K}function JG(J){let X=getComputedStyle(J);return{scrollMarginTop:parseFloat(X.scrollMarginTop)||0,scrollMarginRight:parseFloat(X.scrollMarginRight)||0,scrollMarginBottom:parseFloat(X.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(X.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(X.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(X.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(X.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(X.scrollPaddingLeft)||0}}var $M=c(G0(),1);function Kw(J){let X=r1(Xb,J).current;return X.next=J,k0(X.effect),X}function Xb(J){let X={current:J,next:J,effect:()=>{X.current=X.next}};return X}function P5(J){let{enabled:X=!0,open:Y,ref:W,onComplete:K}=J,U=Kw(Y),q=F0(K),_=kz(W,Y);$M.useEffect(()=>{if(!X)return;_(()=>{if(Y===U.current)q()})},[X,Y,q,_,U])}var S5=c(G0(),1);function Dw(J){return J?.ownerDocument||document}var BX=0;class I5{static create(){return new I5}currentId=BX;start(J,X){this.clear(),this.currentId=setTimeout(()=>{this.currentId=BX,X()},J)}isStarted(){return this.currentId!==BX}clear=()=>{if(this.currentId!==BX)clearTimeout(this.currentId),this.currentId=BX};disposeEffect=()=>{return this.clear}}function a1(){let J=r1(I5.create).current;return Nz(J.disposeEffect),J}var YM={},GM={},QM="";function $b(J){if(typeof document>"u")return!1;let X=Dw(J);return u1(X).innerWidth-X.documentElement.clientWidth>0}function Yb(J){let X=Dw(J),Y=X.documentElement,W=X.body,K=T6(Y)?Y:W,U=K.style.overflow;return K.style.overflow="hidden",()=>{K.style.overflow=U}}function Gb(J){let X=Dw(J),Y=X.documentElement,W=X.body,K=u1(Y),U=0,q=0,_=T5.create(),L=typeof CSS<"u"&&CSS.supports?.("scrollbar-gutter","stable");if(hj&&(K.visualViewport?.scale??1)!==1)return()=>{};function F(){let k=K.getComputedStyle(Y),A=K.getComputedStyle(W),h=(k.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";U=Y.scrollTop,q=Y.scrollLeft,YM={scrollbarGutter:Y.style.scrollbarGutter,overflowY:Y.style.overflowY,overflowX:Y.style.overflowX},QM=Y.style.scrollBehavior,GM={position:W.style.position,height:W.style.height,width:W.style.width,boxSizing:W.style.boxSizing,overflowY:W.style.overflowY,overflowX:W.style.overflowX,scrollBehavior:W.style.scrollBehavior};let v=Y.scrollHeight>Y.clientHeight,x=Y.scrollWidth>Y.clientWidth,I=k.overflowY==="scroll"||A.overflowY==="scroll",b=k.overflowX==="scroll"||A.overflowX==="scroll",E=Math.max(0,K.innerWidth-Y.clientWidth),m=Math.max(0,K.innerHeight-Y.clientHeight),R=parseFloat(A.marginTop)+parseFloat(A.marginBottom),S=parseFloat(A.marginLeft)+parseFloat(A.marginRight),p=T6(Y)?Y:W;if(L){Y.style.scrollbarGutter=h,p.style.overflowY="hidden",p.style.overflowX="hidden";return}if(Object.assign(Y.style,{scrollbarGutter:h,overflowY:"hidden",overflowX:"hidden"}),v||I)Y.style.overflowY="scroll";if(x||b)Y.style.overflowX="scroll";Object.assign(W.style,{position:"relative",height:R||m?`calc(100dvh - ${R+m}px)`:"100dvh",width:S||E?`calc(100vw - ${S+E}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),W.scrollTop=U,W.scrollLeft=q,Y.setAttribute("data-base-ui-scroll-locked",""),Y.style.scrollBehavior="unset"}function N(){if(Object.assign(Y.style,YM),Object.assign(W.style,GM),!L)Y.scrollTop=U,Y.scrollLeft=q,Y.removeAttribute("data-base-ui-scroll-locked"),Y.style.scrollBehavior=QM}function V(){N(),_.request(F)}return F(),K.addEventListener("resize",V),()=>{if(_.cancel(),N(),typeof K.removeEventListener==="function")K.removeEventListener("resize",V)}}class WM{lockCount=0;restore=null;timeoutLock=I5.create();timeoutUnlock=I5.create();acquire(J){if(this.lockCount+=1,this.lockCount===1&&this.restore===null)this.timeoutLock.start(0,()=>this.lock(J));return this.release}release=()=>{if(this.lockCount-=1,this.lockCount===0&&this.restore)this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{if(this.lockCount===0&&this.restore)this.restore?.(),this.restore=null};lock(J){if(this.lockCount===0||this.restore!==null)return;let Y=Dw(J).documentElement,W=u1(Y).getComputedStyle(Y).overflowY;if(W==="hidden"||W==="clip"){this.restore=vY;return}let K=Ej||!$b(J);this.restore=K?Yb(J):Gb(J)}}var Qb=new WM;function $G(J=!0,X=null){k0(()=>{if(!J)return;return Qb.acquire(X)},[J,X])}var P2=c(G0(),1);var GG=c(G0(),1);var C4=c(G0(),1);function YG(){let J=new Map;return{emit(X,Y){J.get(X)?.forEach((W)=>W(Y))},on(X,Y){if(!J.has(X))J.set(X,new Set);J.get(X).add(Y)},off(X,Y){J.get(X)?.delete(Y)}}}class l7{nodesRef={current:[]};events=YG();addNode(J){this.nodesRef.current.push(J)}removeNode(J){let X=this.nodesRef.current.findIndex((Y)=>Y===J);if(X!==-1)this.nodesRef.current.splice(X,1)}}var q_=c(x1(),1),B_=C4.createContext(null);B_.displayName="FloatingNodeContext";var L_=C4.createContext(null);L_.displayName="FloatingTreeContext";var tw=()=>C4.useContext(B_)?.id||null,$2=(J)=>{let X=C4.useContext(L_);return J??X};function LX(J){let X=J2(),Y=$2(J),W=tw();return k0(()=>{if(!X)return;let K={id:X,parentId:W};return Y?.addNode(K),()=>{Y?.removeNode(K)}},[Y,X,W]),X}function V_(J){let{children:X,id:Y}=J,W=tw();return q_.jsx(B_.Provider,{value:C4.useMemo(()=>({id:Y,parentId:W}),[Y,W]),children:X})}function F_(J){let{children:X,externalTree:Y}=J,W=r1(()=>Y??new l7).current;return q_.jsx(L_.Provider,{value:W,children:X})}function J5(J){return`data-base-ui-${J}`}var $d=J5("safe-polygon"),Yd=`button,[role="button"],select,[tabindex]:not([tabindex="-1"]),${Oz}`;function Pz(J,X,Y){if(Y&&!E5(Y))return 0;if(typeof J==="number")return J;if(typeof J==="function"){let W=J();if(typeof W==="number")return W;return W?.[X]}return J?.[X]}var KM=c(x1(),1),N_=P2.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new I5,currentIdRef:{current:null},currentContextRef:{current:null}});N_.displayName="FloatingDelayGroupContext";function k_(J){let{children:X,delay:Y,timeoutMs:W=0}=J,K=P2.useRef(Y),U=P2.useRef(Y),q=P2.useRef(null),_=P2.useRef(null),L=a1();return KM.jsx(N_.Provider,{value:P2.useMemo(()=>({hasProvider:!0,delayRef:K,initialDelayRef:U,currentIdRef:q,timeoutMs:W,currentContextRef:_,timeout:L}),[W,L]),children:X})}function A_(J,X={open:!1}){let Y="rootStore"in J?J.rootStore:J,W=Y.useState("floatingId"),{enabled:K=!0,open:U}=X,q=P2.useContext(N_),{currentIdRef:_,delayRef:L,timeoutMs:F,initialDelayRef:N,currentContextRef:V,hasProvider:k,timeout:A}=q,[D,M]=P2.useState(!1);return k0(()=>{function h(){M(!1),V.current?.setIsInstantPhase(!1),_.current=null,V.current=null,L.current=N.current}if(!K)return;if(!_.current)return;if(!U&&_.current===W){if(M(!1),F){let v=W;return A.start(F,()=>{if(Y.select("open")||_.current&&_.current!==v)return;h()}),()=>{A.clear()}}h()}return},[K,U,W,_,L,F,N,V,A,Y]),k0(()=>{if(!K)return;if(!U)return;let h=V.current,v=_.current;if(A.clear(),V.current={onOpenChange:Y.setOpen,setIsInstantPhase:M},_.current=W,L.current={open:0,close:Pz(N.current,"close")},v!==null&&v!==W)M(!0),h?.setIsInstantPhase(!0),h?.onOpenChange(!1,P0(B0.none));else M(!1),h?.setIsInstantPhase(!1)},[K,U,W,Y,_,L,F,N,V,A]),k0(()=>{return()=>{V.current=null}},[V]),P2.useMemo(()=>({hasProvider:k,delayRef:L,isInstantPhase:D}),[k,L,D])}var qw=c(G0(),1);var QG={clip:"rect(0 0 0 0)",overflow:"hidden",whiteSpace:"nowrap",position:"fixed",top:0,left:0,border:0,padding:0,width:1,height:1,margin:-1};var WG=c(G0(),1);var UM=c(x1(),1),l8=WG.forwardRef(function(X,Y){let[W,K]=WG.useState();return k0(()=>{if(pY)K("button")},[]),UM.jsx("span",{...X,ref:Y,style:QG,"aria-hidden":W?void 0:!0,...{tabIndex:0,role:W},"data-base-ui-focus-guard":""})});l8.displayName="FocusGuard";var HM=0;function Iz(J,X={}){let{preventScroll:Y=!1,cancelPrevious:W=!0,sync:K=!1}=X;if(W)cancelAnimationFrame(HM);let U=()=>J?.focus({preventScroll:Y});if(K)U();else HM=requestAnimationFrame(U)}var bz={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function _M(J){if(J==="inert")return bz.inert;if(J==="aria-hidden")return bz["aria-hidden"];return bz.none}var KG=new WeakSet,UG={},j_=0;var qM=(J)=>J&&(J.host||qM(J.parentNode)),Wb=(J,X)=>X.map((Y)=>{if(J.contains(Y))return Y;let W=qM(Y);if(J.contains(W))return W;return null}).filter((Y)=>Y!=null);function Kb(J,X,Y,W){let U=W?"inert":Y?"aria-hidden":null,q=Wb(X,J),_=new Set,L=new Set(q),F=[];if(!UG["data-base-ui-inert"])UG["data-base-ui-inert"]=new WeakMap;let N=UG["data-base-ui-inert"];q.forEach(V),k(X),_.clear();function V(A){if(!A||_.has(A))return;if(_.add(A),A.parentNode)V(A.parentNode)}function k(A){if(!A||L.has(A))return;[].forEach.call(A.children,(D)=>{if(o5(D)==="script")return;if(_.has(D))k(D);else{let M=U?D.getAttribute(U):null,h=M!==null&&M!=="false",v=_M(U),x=(v.get(D)||0)+1,I=(N.get(D)||0)+1;if(v.set(D,x),N.set(D,I),F.push(D),x===1&&h)KG.add(D);if(I===1)D.setAttribute("data-base-ui-inert","");if(!h&&U)D.setAttribute(U,U==="inert"?"":"true")}})}return j_+=1,()=>{if(F.forEach((A)=>{let D=_M(U),h=(D.get(A)||0)-1,v=(N.get(A)||0)-1;if(D.set(A,h),N.set(A,v),!h){if(!KG.has(A)&&U)A.removeAttribute(U);KG.delete(A)}if(!v)A.removeAttribute("data-base-ui-inert")}),j_-=1,!j_)bz.inert=new WeakMap,bz["aria-hidden"]=new WeakMap,bz.none=new WeakMap,KG=new WeakSet,UG={}}}function BM(J,X=!1,Y=!1){let W=C1(J[0]).body;return Kb(J.concat(Array.from(W.querySelectorAll("[aria-live]"))),W,X,Y)}var $w=c(G0(),1),M_=c(m8(),1);var i7=c(x1(),1),O_=$w.createContext(null);O_.displayName="PortalContext";var D_=()=>$w.useContext(O_),Ub=J5("portal");function HG(J={}){let{ref:X,container:Y,componentProps:W=v1,elementProps:K,elementState:U}=J,q=J2(),L=D_()?.portalNode,[F,N]=$w.useState(null),[V,k]=$w.useState(null),A=$w.useRef(null);k0(()=>{if(Y===null){if(A.current)A.current=null,k(null),N(null);return}if(q==null)return;let h=(Y&&(RY(Y)?Y:Y.current))??L??document.body;if(h==null){if(A.current)A.current=null,k(null),N(null);return}if(A.current!==h)A.current=h,k(null),N(h)},[Y,L,q]);let D=h0("div",W,{ref:[X,k],state:U,props:[{id:q,[Ub]:""},K]});return{portalNode:V,portalSubtree:F&&D?M_.createPortal(D,F):null}}var Sz=$w.forwardRef(function(X,Y){let{children:W,container:K,className:U,render:q,renderGuards:_,...L}=X,{portalNode:F,portalSubtree:N}=HG({container:K,ref:Y,componentProps:X,elementProps:L}),V=$w.useRef(null),k=$w.useRef(null),A=$w.useRef(null),D=$w.useRef(null),[M,h]=$w.useState(null),v=M?.modal,x=M?.open,I=typeof _==="boolean"?_:!!M&&!M.modal&&M.open&&!!F;$w.useEffect(()=>{if(!F||v)return;function E(m){if(F&&v6(m))(m.type==="focusin"?Q_:ej)(F)}return F.addEventListener("focusin",E,!0),F.addEventListener("focusout",E,!0),()=>{F.removeEventListener("focusin",E,!0),F.removeEventListener("focusout",E,!0)}},[F,v]),$w.useEffect(()=>{if(!F||x)return;Q_(F)},[x,F]);let b=$w.useMemo(()=>({beforeOutsideRef:V,afterOutsideRef:k,beforeInsideRef:A,afterInsideRef:D,portalNode:F,setFocusManagerState:h}),[F]);return i7.jsxs($w.Fragment,{children:[N,i7.jsxs(O_.Provider,{value:b,children:[I&&F&&i7.jsx(l8,{"data-type":"outside",ref:V,onFocus:(E)=>{if(v6(E,F))A.current?.focus();else{let m=M?M.domReference:null;ZG(m)?.focus()}}}),I&&F&&i7.jsx("span",{"aria-owns":F.id,style:Lj}),F&&M_.createPortal(W,F),I&&F&&i7.jsx(l8,{"data-type":"outside",ref:k,onFocus:(E)=>{if(v6(E,F))D.current?.focus();else{let m=M?M.domReference:null;if(xz(m)?.focus(),M?.closeOnFocusOut)M?.onOpenChange(!1,P0(B0.focusOut,E.nativeEvent))}}})]})]})});Sz.displayName="FloatingPortal";var VX=c(x1(),1);function Hb(J,X){let Y=u1(J.target);if(J instanceof Y.KeyboardEvent)return"keyboard";if(J instanceof Y.FocusEvent)return X||"keyboard";if("pointerType"in J)return J.pointerType||"keyboard";if("touches"in J)return"touch";if(J instanceof Y.MouseEvent)return X||(J.detail===0?"keyboard":"mouse");return""}var LM=20,y4=[];function x_(){y4=y4.filter((J)=>J.isConnected)}function _b(J){if(x_(),J&&o5(J)!=="body"){if(y4.push(J),y4.length>LM)y4=y4.slice(-LM)}}function T_(){return x_(),y4[y4.length-1]}function qb(J){if(!J)return null;let X=u7();if(G_(J,X))return J;return d7(J,X)[0]||J}function Bb(J){if(!J||!J.isConnected)return!1;if(typeof J.checkVisibility==="function")return J.checkVisibility();return uw(J).display!=="none"}function VM(J,X){if(!X.current.includes("floating")&&!J.getAttribute("role")?.includes("dialog"))return;let Y=u7(),K=aj(J,Y).filter((q)=>{let _=q.getAttribute("data-tabindex")||"";return G_(q,Y)||q.hasAttribute("data-tabindex")&&!_.startsWith("-")}),U=J.getAttribute("tabindex");if(X.current.includes("floating")||K.length===0){if(U!=="0")J.setAttribute("tabindex","0")}else if(U!=="-1"||J.hasAttribute("data-tabindex")&&J.getAttribute("data-tabindex")!=="-1")J.setAttribute("tabindex","-1"),J.setAttribute("data-tabindex","-1")}function FX(J){let{context:X,children:Y,disabled:W=!1,order:K=["content"],initialFocus:U=!0,returnFocus:q=!0,restoreFocus:_=!1,modal:L=!0,closeOnFocusOut:F=!0,openInteractionType:N="",getInsideElements:V=()=>[],nextFocusableElement:k,previousFocusableElement:A,beforeContentFocusGuardRef:D,externalTree:M}=J,h="rootStore"in X?X.rootStore:X,v=h.useState("open"),x=h.useState("domReferenceElement"),I=h.useState("floatingElement"),{events:b,dataRef:E}=h.context,m=F0(()=>E.current.floatingContext?.nodeId),R=F0(V),S=U===!1,p=$X(x)&&S,d=Kw(K),w0=Kw(U),t=Kw(q),u=Kw(N),Q0=$2(M),r=D_(),e=qw.useRef(null),o=qw.useRef(null),g=qw.useRef(!1),X0=qw.useRef(!1),P=qw.useRef(!1),z0=qw.useRef(-1),U0=qw.useRef(""),J0=qw.useRef(""),L0=a1(),S0=a1(),V0=x5(),H0=r!=null,j0=g7(I),r0=F0((_0=j0)=>{return _0?d7(_0,u7()):[]}),n0=F0((_0)=>{let O0=r0(_0);return d.current.map(()=>O0).filter(Boolean).flat()});qw.useEffect(()=>{if(W)return;if(!L)return;function _0(A0){if(A0.key==="Tab"){if(t0(j0,X2(C1(j0)))&&r0().length===0&&!p)Xw(A0)}}let O0=C1(j0);return O0.addEventListener("keydown",_0),()=>{O0.removeEventListener("keydown",_0)}},[W,x,j0,L,d,p,r0,n0]),qw.useEffect(()=>{if(W)return;if(!I)return;function _0(O0){let A0=f1(O0),C0=r0().indexOf(A0);if(C0!==-1)z0.current=C0}return I.addEventListener("focusin",_0),()=>{I.removeEventListener("focusin",_0)}},[W,I,r0]),qw.useEffect(()=>{if(W||!v)return;let _0=C1(j0);function O0(){P.current=!1}function A0(C0){let E0=f1(C0),o0=t0(I,E0)||t0(x,E0)||t0(r?.portalNode,E0);P.current=!o0,J0.current=C0.pointerType||"keyboard"}function c0(){J0.current="keyboard"}return _0.addEventListener("pointerdown",A0,!0),_0.addEventListener("pointerup",O0,!0),_0.addEventListener("pointercancel",O0,!0),_0.addEventListener("keydown",c0,!0),()=>{_0.removeEventListener("pointerdown",A0,!0),_0.removeEventListener("pointerup",O0,!0),_0.removeEventListener("pointercancel",O0,!0),_0.removeEventListener("keydown",c0,!0)}},[W,I,x,j0,v,r]),qw.useEffect(()=>{if(W)return;if(!F)return;function _0(){X0.current=!0,S0.start(0,()=>{X0.current=!1})}function O0(E0){let{relatedTarget:o0,currentTarget:x0}=E0,l0=f1(E0);queueMicrotask(()=>{let y0=m(),q1=h.context.triggerElements,D1=!(t0(x,o0)||t0(I,o0)||t0(o0,I)||t0(r?.portalNode,o0)||o0!=null&&q1.hasElement(o0)||q1.hasMatchingElement((W1)=>t0(W1,o0))||o0?.hasAttribute(J5("focus-guard"))||Q0&&(c8(Q0.nodesRef.current,y0).find((W1)=>t0(W1.context?.elements.floating,o0)||t0(W1.context?.elements.domReference,o0))||X_(Q0.nodesRef.current,y0).find((W1)=>[W1.context?.elements.floating,g7(W1.context?.elements.floating)].includes(o0)||W1.context?.elements.domReference===o0)));if(x0===x&&j0)VM(j0,d);if(_&&x0!==x&&!Bb(l0)&&X2(C1(j0))===C1(j0).body){if(O1(j0)){if(j0.focus(),_==="popup"){V0.request(()=>{j0.focus()});return}}let W1=z0.current,Gw=r0(),zw=Gw[W1]||Gw[Gw.length-1]||j0;if(O1(zw))zw.focus()}if(E.current.insideReactTree){E.current.insideReactTree=!1;return}if((p?!0:!L)&&o0&&D1&&!X0.current&&(p||o0!==T_()))g.current=!0,h.setOpen(!1,P0(B0.focusOut,E0))})}function A0(){if(P.current)return;E.current.insideReactTree=!0,L0.start(0,()=>{E.current.insideReactTree=!1})}let c0=O1(x)?x:null,C0=[];if(!I&&!c0)return;if(c0)c0.addEventListener("focusout",O0),c0.addEventListener("pointerdown",_0),C0.push(()=>{c0.removeEventListener("focusout",O0),c0.removeEventListener("pointerdown",_0)});if(I){if(I.addEventListener("focusout",O0),r)I.addEventListener("focusout",A0,!0),C0.push(()=>{I.removeEventListener("focusout",A0,!0)});C0.push(()=>{I.removeEventListener("focusout",O0)})}return()=>{C0.forEach((E0)=>{E0()})}},[W,x,I,j0,L,Q0,r,h,F,_,r0,p,m,d,E,L0,S0,V0]);let n=qw.useRef(null),R0=qw.useRef(null),I0=O5(n,D,r?.beforeInsideRef),j1=O5(R0,r?.afterInsideRef);qw.useEffect(()=>{if(W||!I||!v)return;let _0=Array.from(r?.portalNode?.querySelectorAll(`[${J5("portal")}]`)||[]),A0=(Q0?X_(Q0.nodesRef.current,m()):[]).find((E0)=>$X(E0.context?.elements.domReference||null))?.context?.elements.domReference,c0=[I,A0,..._0,...R(),e.current,o.current,n.current,R0.current,r?.beforeOutsideRef.current,r?.afterOutsideRef.current,O6(A),O6(k),p?x:null].filter((E0)=>E0!=null),C0=BM(c0,L||p);return()=>{C0()}},[v,W,x,I,L,d,r,p,Q0,m,R,k,A]),k0(()=>{if(!v||W||!O1(j0))return;let _0=C1(j0),O0=X2(_0);queueMicrotask(()=>{let A0=n0(j0),c0=w0.current,C0=typeof c0==="function"?c0(u.current||""):c0;if(C0===void 0||C0===!1)return;let E0;if(C0===!0||C0===null)E0=A0[0]||j0;else E0=O6(C0);if(E0=E0||A0[0]||j0,t0(j0,O0))return;Iz(E0,{preventScroll:E0===j0})})},[W,v,j0,S,n0,w0,u]),k0(()=>{if(W||!j0)return;let _0=C1(j0),O0=X2(_0);_b(O0);function A0(E0){if(!E0.open)U0.current=Hb(E0.nativeEvent,J0.current);if(E0.reason===B0.triggerHover&&E0.nativeEvent.type==="mouseleave")g.current=!0;if(E0.reason!==B0.outsidePress)return;if(E0.nested)g.current=!1;else if(iY(E0.nativeEvent)||rY(E0.nativeEvent))g.current=!1;else{let o0=!1;if(document.createElement("div").focus({get preventScroll(){return o0=!0,!1}}),o0)g.current=!1;else g.current=!0}}b.on("openchange",A0);let c0=_0.createElement("span");if(c0.setAttribute("tabindex","-1"),c0.setAttribute("aria-hidden","true"),Object.assign(c0.style,QG),H0&&x)x.insertAdjacentElement("afterend",c0);function C0(){let E0=t.current,o0=typeof E0==="function"?E0(U0.current):E0;if(o0===void 0||o0===!1)return null;if(o0===null)o0=!0;if(typeof o0==="boolean"){let l0=x||T_();return l0&&l0.isConnected?l0:c0}let x0=x||T_()||c0;return O6(o0)||x0}return()=>{b.off("openchange",A0);let E0=X2(_0),o0=t0(I,E0)||Q0&&c8(Q0.nodesRef.current,m(),!1).some((l0)=>t0(l0.context?.elements.floating,E0)),x0=C0();queueMicrotask(()=>{let l0=qb(x0),y0=typeof t.current!=="boolean";if(t.current&&!g.current&&O1(l0)&&(!y0&&l0!==E0&&E0!==_0.body?o0:!0))l0.focus({preventScroll:!0});c0.remove()})}},[W,I,j0,t,E,b,Q0,H0,x,m]),qw.useEffect(()=>{queueMicrotask(()=>{g.current=!1})},[W]),qw.useEffect(()=>{if(W||!v)return;function _0(A0){if(f1(A0)?.closest(`[${hY}]`))X0.current=!0}let O0=C1(j0);return O0.addEventListener("pointerdown",_0,!0),()=>{O0.removeEventListener("pointerdown",_0,!0)}},[W,v,j0]),k0(()=>{if(W)return;if(!r)return;return r.setFocusManagerState({modal:L,closeOnFocusOut:F,open:v,onOpenChange:h.setOpen,domReference:x}),()=>{r.setFocusManagerState(null)}},[W,r,L,v,h,F,x]),k0(()=>{if(W||!j0)return;return VM(j0,d),()=>{queueMicrotask(x_)}},[W,j0,d]);let b0=!W&&(L?!p:!0)&&(H0||L);return VX.jsxs(qw.Fragment,{children:[b0&&VX.jsx(l8,{"data-type":"inside",ref:I0,onFocus:(_0)=>{if(L){let O0=n0();Iz(O0[O0.length-1])}else if(r?.portalNode)if(g.current=!1,v6(_0,r.portalNode))xz(x)?.focus();else O6(A??r.beforeOutsideRef)?.focus()}}),Y,b0&&VX.jsx(l8,{"data-type":"inside",ref:j1,onFocus:(_0)=>{if(L)Iz(n0()[0]);else if(r?.portalNode){if(F)g.current=!0;if(v6(_0,r.portalNode))ZG(x)?.focus();else O6(k??r.afterOutsideRef)?.focus()}}})]})}var NX=c(G0(),1);function r7(J,X={}){let Y="rootStore"in J?J.rootStore:J,W=Y.context.dataRef,{enabled:K=!0,event:U="click",toggle:q=!0,ignoreMouse:_=!1,stickIfOpen:L=!0,touchOpenDelay:F=0}=X,N=NX.useRef(void 0),V=x5(),k=a1(),A=NX.useMemo(()=>({onPointerDown(D){N.current=D.pointerType},onMouseDown(D){let M=N.current,h=D.nativeEvent,v=Y.select("open");if(D.button!==0||U==="click"||E5(M,!0)&&_)return;let x=W.current.openEvent,I=x?.type,b=Y.select("domReferenceElement")!==D.currentTarget,E=v&&b||!(v&&q&&(x&&L?I==="click"||I==="mousedown":!0));if(XX(h.target)){let R=P0(B0.triggerPress,h,h.target);if(E&&M==="touch"&&F>0)k.start(F,()=>{Y.setOpen(!0,R)});else Y.setOpen(E,R);return}let m=D.currentTarget;V.request(()=>{let R=P0(B0.triggerPress,h,m);if(E&&M==="touch"&&F>0)k.start(F,()=>{Y.setOpen(!0,R)});else Y.setOpen(E,R)})},onClick(D){if(U==="mousedown-only")return;let M=N.current;if(U==="mousedown"&&M){N.current=void 0;return}if(E5(M,!0)&&_)return;let h=Y.select("open"),v=W.current.openEvent,x=Y.select("domReferenceElement")!==D.currentTarget,I=h&&x||!(h&&q&&(v&&L?aY(v):!0)),b=P0(B0.triggerPress,D.nativeEvent,D.currentTarget);if(I&&M==="touch"&&F>0)k.start(F,()=>{Y.setOpen(!0,b)});else Y.setOpen(I,b)},onKeyDown(){N.current=void 0}}),[W,U,_,Y,L,q,V,k,F]);return NX.useMemo(()=>K?{reference:A}:v1,[K,A])}var N2=c(G0(),1);function Lb(J,X){let Y=null,W=null,K=!1;return{contextElement:J||void 0,getBoundingClientRect(){let U=J?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},q=X.axis==="x"||X.axis==="both",_=X.axis==="y"||X.axis==="both",L=["mouseenter","mousemove"].includes(X.dataRef.current.openEvent?.type||"")&&X.pointerType!=="touch",F=U.width,N=U.height,V=U.x,k=U.y;if(Y==null&&X.x&&q)Y=U.x-X.x;if(W==null&&X.y&&_)W=U.y-X.y;if(V-=Y||0,k-=W||0,F=0,N=0,!K||L)F=X.axis==="y"?U.width:0,N=X.axis==="x"?U.height:0,V=q&&X.x!=null?X.x:V,k=_&&X.y!=null?X.y:k;else if(K&&!L)N=X.axis==="x"?U.height:N,F=X.axis==="y"?U.width:F;return K=!0,{width:F,height:N,x:V,y:k,top:k,right:V+F,bottom:k+N,left:V}}}}function FM(J){return J!=null&&J.clientX!=null}function v_(J,X={}){let Y="rootStore"in J?J.rootStore:J,W=Y.useState("open"),K=Y.useState("floatingElement"),U=Y.useState("domReferenceElement"),q=Y.context.dataRef,{enabled:_=!0,axis:L="both",x:F=null,y:N=null}=X,V=N2.useRef(!1),k=N2.useRef(null),[A,D]=N2.useState(),[M,h]=N2.useState([]),v=F0((m,R)=>{if(V.current)return;if(q.current.openEvent&&!FM(q.current.openEvent))return;Y.set("positionReference",Lb(U,{x:m,y:R,axis:L,dataRef:q,pointerType:A}))}),x=F0((m)=>{if(F!=null||N!=null)return;if(!W)v(m.clientX,m.clientY);else if(!k.current)h([])}),I=E5(A)?K:W,b=N2.useCallback(()=>{if(!I||!_||F!=null||N!=null)return;let m=u1(K);function R(S){let p=f1(S);if(!t0(K,p))v(S.clientX,S.clientY);else m.removeEventListener("mousemove",R),k.current=null}if(!q.current.openEvent||FM(q.current.openEvent)){m.addEventListener("mousemove",R);let S=()=>{m.removeEventListener("mousemove",R),k.current=null};return k.current=S,S}Y.set("positionReference",U);return},[I,_,F,N,K,q,U,Y,v]);N2.useEffect(()=>{return b()},[b,M]),N2.useEffect(()=>{if(_&&!K)V.current=!1},[_,K]),N2.useEffect(()=>{if(!_&&W)V.current=!0},[_,W]),k0(()=>{if(_&&(F!=null||N!=null))V.current=!1,v(F,N)},[_,F,N,v]);let E=N2.useMemo(()=>{function m(R){D(R.pointerType)}return{onPointerDown:m,onPointerEnter:m,onMouseMove:x,onMouseEnter:x}},[x]);return N2.useMemo(()=>_?{reference:E}:{},[_,E])}var b5=c(G0(),1);function NM(J,X,Y){let{reference:W,floating:K}=J,U=E2(X),q=WX(X),_=QX(q),L=nw(X),F=U==="y",N=W.x+W.width/2-K.width/2,V=W.y+W.height/2-K.height/2,k=W[_]/2-K[_]/2,A;switch(L){case"top":A={x:N,y:W.y-K.height};break;case"bottom":A={x:N,y:W.y+W.height};break;case"right":A={x:W.x+W.width,y:V};break;case"left":A={x:W.x-K.width,y:V};break;default:A={x:W.x,y:W.y}}switch(w8(X)){case"start":A[q]-=k*(Y&&F?-1:1);break;case"end":A[q]+=k*(Y&&F?-1:1);break}return A}var jM=async(J,X,Y)=>{let{placement:W="bottom",strategy:K="absolute",middleware:U=[],platform:q}=Y,_=U.filter(Boolean),L=await(q.isRTL==null?void 0:q.isRTL(X)),F=await q.getElementRects({reference:J,floating:X,strategy:K}),{x:N,y:V}=NM(F,W,L),k=W,A={},D=0;for(let M=0;M<_.length;M++){let{name:h,fn:v}=_[M],{x,y:I,data:b,reset:E}=await v({x:N,y:V,initialPlacement:W,placement:k,strategy:K,middlewareData:A,rects:F,platform:q,elements:{reference:J,floating:X}});if(N=x!=null?x:N,V=I!=null?I:V,A={...A,[h]:{...A[h],...b}},E&&D<=50){if(D++,typeof E==="object"){if(E.placement)k=E.placement;if(E.rects)F=E.rects===!0?await q.getElementRects({reference:J,floating:X,strategy:K}):E.rects;({x:N,y:V}=NM(F,k,L))}M=-1}}return{x:N,y:V,placement:k,strategy:K,middlewareData:A}};async function Cz(J,X){var Y;if(X===void 0)X={};let{x:W,y:K,platform:U,rects:q,elements:_,strategy:L}=J,{boundary:F="clippingAncestors",rootBoundary:N="viewport",elementContext:V="floating",altBoundary:k=!1,padding:A=0}=e5(X,J),D=nY(A),h=_[k?V==="floating"?"reference":"floating":V],v=f7(await U.getClippingRect({element:((Y=await(U.isElement==null?void 0:U.isElement(h)))!=null?Y:!0)?h:h.contextElement||await(U.getDocumentElement==null?void 0:U.getDocumentElement(_.floating)),boundary:F,rootBoundary:N,strategy:L})),x=V==="floating"?{x:W,y:K,width:q.floating.width,height:q.floating.height}:q.reference,I=await(U.getOffsetParent==null?void 0:U.getOffsetParent(_.floating)),b=await(U.isElement==null?void 0:U.isElement(I))?await(U.getScale==null?void 0:U.getScale(I))||{x:1,y:1}:{x:1,y:1},E=f7(U.convertOffsetParentRelativeRectToViewportRelativeRect?await U.convertOffsetParentRelativeRectToViewportRelativeRect({elements:_,rect:x,offsetParent:I,strategy:L}):x);return{top:(v.top-E.top+D.top)/b.y,bottom:(E.bottom-v.bottom+D.bottom)/b.y,left:(v.left-E.left+D.left)/b.x,right:(E.right-v.right+D.right)/b.x}}var MM=function(J){if(J===void 0)J={};return{name:"flip",options:J,async fn(X){var Y,W;let{placement:K,middlewareData:U,rects:q,initialPlacement:_,platform:L,elements:F}=X,{mainAxis:N=!0,crossAxis:V=!0,fallbackPlacements:k,fallbackStrategy:A="bestFit",fallbackAxisSideDirection:D="none",flipAlignment:M=!0,...h}=e5(J,X);if((Y=U.arrow)!=null&&Y.alignmentOffset)return{};let v=nw(K),x=E2(_),I=nw(_)===_,b=await(L.isRTL==null?void 0:L.isRTL(F.floating)),E=k||(I||!M?[YX(_)]:fj(_)),m=D!=="none";if(!k&&m)E.push(...mj(_,M,D,b));let R=[_,...E],S=await Cz(X,h),p=[],d=((W=U.flip)==null?void 0:W.overflows)||[];if(N)p.push(S[v]);if(V){let Q0=gj(K,q,b);p.push(S[Q0[0]],S[Q0[1]])}if(d=[...d,{placement:K,overflows:p}],!p.every((Q0)=>Q0<=0)){var w0,t;let Q0=(((w0=U.flip)==null?void 0:w0.index)||0)+1,r=R[Q0];if(r){if(!(V==="alignment"?x!==E2(r):!1)||d.every((g)=>E2(g.placement)===x?g.overflows[0]>0:!0))return{data:{index:Q0,overflows:d},reset:{placement:r}}}let e=(t=d.filter((o)=>o.overflows[0]<=0).sort((o,g)=>o.overflows[1]-g.overflows[1])[0])==null?void 0:t.placement;if(!e)switch(A){case"bestFit":{var u;let o=(u=d.filter((g)=>{if(m){let X0=E2(g.placement);return X0===x||X0==="y"}return!0}).map((g)=>[g.placement,g.overflows.filter((X0)=>X0>0).reduce((X0,P)=>X0+P,0)]).sort((g,X0)=>g[1]-X0[1])[0])==null?void 0:u[0];if(o)e=o;break}case"initialPlacement":e=_;break}if(K!==e)return{reset:{placement:e}}}return{}}}};function kM(J,X){return{top:J.top-X.height,right:J.right-X.width,bottom:J.bottom-X.height,left:J.left-X.width}}function AM(J){return Rj.some((X)=>J[X]>=0)}var OM=function(J){if(J===void 0)J={};return{name:"hide",options:J,async fn(X){let{rects:Y}=X,{strategy:W="referenceHidden",...K}=e5(J,X);switch(W){case"referenceHidden":{let U=await Cz(X,{...K,elementContext:"reference"}),q=kM(U,Y.reference);return{data:{referenceHiddenOffsets:q,referenceHidden:AM(q)}}}case"escaped":{let U=await Cz(X,{...K,altBoundary:!0}),q=kM(U,Y.floating);return{data:{escapedOffsets:q,escaped:AM(q)}}}default:return{}}}}};var DM=new Set(["left","top"]);async function Vb(J,X){let{placement:Y,platform:W,elements:K}=J,U=await(W.isRTL==null?void 0:W.isRTL(K.floating)),q=nw(Y),_=w8(Y),L=E2(Y)==="y",F=DM.has(q)?-1:1,N=U&&L?-1:1,V=e5(X,J),{mainAxis:k,crossAxis:A,alignmentAxis:D}=typeof V==="number"?{mainAxis:V,crossAxis:0,alignmentAxis:null}:{mainAxis:V.mainAxis||0,crossAxis:V.crossAxis||0,alignmentAxis:V.alignmentAxis};if(_&&typeof D==="number")A=_==="end"?D*-1:D;return L?{x:A*N,y:k*F}:{x:k*F,y:A*N}}var TM=function(J){if(J===void 0)J=0;return{name:"offset",options:J,async fn(X){var Y,W;let{x:K,y:U,placement:q,middlewareData:_}=X,L=await Vb(X,J);if(q===((Y=_.offset)==null?void 0:Y.placement)&&(W=_.arrow)!=null&&W.alignmentOffset)return{};return{x:K+L.x,y:U+L.y,data:{...L,placement:q}}}}},xM=function(J){if(J===void 0)J={};return{name:"shift",options:J,async fn(X){let{x:Y,y:W,placement:K}=X,{mainAxis:U=!0,crossAxis:q=!1,limiter:_={fn:(h)=>{let{x:v,y:x}=h;return{x:v,y:x}}},...L}=e5(J,X),F={x:Y,y:W},N=await Cz(X,L),V=E2(nw(K)),k=oY(V),A=F[k],D=F[V];if(U){let h=k==="y"?"top":"left",v=k==="y"?"bottom":"right",x=A+N[h],I=A-N[v];A=GX(x,A,I)}if(q){let h=V==="y"?"top":"left",v=V==="y"?"bottom":"right",x=D+N[h],I=D-N[v];D=GX(x,D,I)}let M=_.fn({...X,[k]:A,[V]:D});return{...M,data:{x:M.x-Y,y:M.y-W,enabled:{[k]:U,[V]:q}}}}}},vM=function(J){if(J===void 0)J={};return{options:J,fn(X){let{x:Y,y:W,placement:K,rects:U,middlewareData:q}=X,{offset:_=0,mainAxis:L=!0,crossAxis:F=!0}=e5(J,X),N={x:Y,y:W},V=E2(K),k=oY(V),A=N[k],D=N[V],M=e5(_,X),h=typeof M==="number"?{mainAxis:M,crossAxis:0}:{mainAxis:0,crossAxis:0,...M};if(L){let I=k==="y"?"height":"width",b=U.reference[k]-U.floating[I]+h.mainAxis,E=U.reference[k]+U.reference[I]-h.mainAxis;if(A<b)A=b;else if(A>E)A=E}if(F){var v,x;let I=k==="y"?"width":"height",b=DM.has(nw(K)),E=U.reference[V]-U.floating[I]+(b?((v=q.offset)==null?void 0:v[V])||0:0)+(b?0:h.crossAxis),m=U.reference[V]+U.reference[I]+(b?0:((x=q.offset)==null?void 0:x[V])||0)-(b?h.crossAxis:0);if(D<E)D=E;else if(D>m)D=m}return{[k]:A,[V]:D}}}},hM=function(J){if(J===void 0)J={};return{name:"size",options:J,async fn(X){var Y,W;let{placement:K,rects:U,platform:q,elements:_}=X,{apply:L=()=>{},...F}=e5(J,X),N=await Cz(X,F),V=nw(K),k=w8(K),A=E2(K)==="y",{width:D,height:M}=U.floating,h,v;if(V==="top"||V==="bottom")h=V,v=k===(await(q.isRTL==null?void 0:q.isRTL(_.floating))?"start":"end")?"left":"right";else v=V,h=k==="end"?"top":"bottom";let x=M-N.top-N.bottom,I=D-N.left-N.right,b=P4(M-N[h],x),E=P4(D-N[v],I),m=!X.middlewareData.shift,R=b,S=E;if((Y=X.middlewareData.shift)!=null&&Y.enabled.x)S=I;if((W=X.middlewareData.shift)!=null&&W.enabled.y)R=x;if(m&&!k){let d=F2(N.left,0),w0=F2(N.right,0),t=F2(N.top,0),u=F2(N.bottom,0);if(A)S=D-2*(d!==0||w0!==0?d+w0:F2(N.left,N.right));else R=M-2*(t!==0||u!==0?t+u:F2(N.top,N.bottom))}await L({...X,availableWidth:S,availableHeight:R});let p=await q.getDimensions(_.floating);if(D!==p.width||M!==p.height)return{reset:{rects:!0}};return{}}}};function bM(J){let X=uw(J),Y=parseFloat(X.width)||0,W=parseFloat(X.height)||0,K=O1(J),U=K?J.offsetWidth:Y,q=K?J.offsetHeight:W,_=I4(Y)!==U||I4(W)!==q;if(_)Y=U,W=q;return{width:Y,height:W,$:_}}function E_(J){return!L1(J)?J.contextElement:J}function yz(J){let X=E_(J);if(!O1(X))return t5(1);let Y=X.getBoundingClientRect(),{width:W,height:K,$:U}=bM(X),q=(U?I4(Y.width):Y.width)/W,_=(U?I4(Y.height):Y.height)/K;if(!q||!Number.isFinite(q))q=1;if(!_||!Number.isFinite(_))_=1;return{x:q,y:_}}var Fb=t5(0);function SM(J){let X=u1(J);if(!jz()||!X.visualViewport)return Fb;return{x:X.visualViewport.offsetLeft,y:X.visualViewport.offsetTop}}function Nb(J,X,Y){if(X===void 0)X=!1;if(!Y||X&&Y!==u1(J))return!1;return X}function a7(J,X,Y,W){if(X===void 0)X=!1;if(Y===void 0)Y=!1;let K=J.getBoundingClientRect(),U=E_(J),q=t5(1);if(X)if(W){if(L1(W))q=yz(W)}else q=yz(J);let _=Nb(U,Y,W)?SM(U):t5(0),L=(K.left+_.x)/q.x,F=(K.top+_.y)/q.y,N=K.width/q.x,V=K.height/q.y;if(U){let k=u1(U),A=W&&L1(W)?u1(W):W,D=k,M=fY(D);while(M&&W&&A!==D){let h=yz(M),v=M.getBoundingClientRect(),x=uw(M),I=v.left+(M.clientLeft+parseFloat(x.paddingLeft))*h.x,b=v.top+(M.clientTop+parseFloat(x.paddingTop))*h.y;L*=h.x,F*=h.y,N*=h.x,V*=h.y,L+=I,F+=b,D=u1(M),M=fY(D)}}return f7({width:N,height:V,x:L,y:F})}function _G(J,X){let Y=zX(J).scrollLeft;if(!X)return a7(n5(J)).left+Y;return X.left+Y}function CM(J,X){let Y=J.getBoundingClientRect(),W=Y.left+X.scrollLeft-_G(J,Y),K=Y.top+X.scrollTop;return{x:W,y:K}}function kb(J){let{elements:X,rect:Y,offsetParent:W,strategy:K}=J,U=K==="fixed",q=n5(W),_=X?wX(X.floating):!1;if(W===q||_&&U)return Y;let L={scrollLeft:0,scrollTop:0},F=t5(1),N=t5(0),V=O1(W);if(V||!V&&!U){if(o5(W)!=="body"||T6(q))L=zX(W);if(O1(W)){let A=a7(W);F=yz(W),N.x=A.x+W.clientLeft,N.y=A.y+W.clientTop}}let k=q&&!V&&!U?CM(q,L):t5(0);return{width:Y.width*F.x,height:Y.height*F.y,x:Y.x*F.x-L.scrollLeft*F.x+N.x+k.x,y:Y.y*F.y-L.scrollTop*F.y+N.y+k.y}}function Ab(J){return Array.from(J.getClientRects())}function jb(J){let X=n5(J),Y=zX(J),W=J.ownerDocument.body,K=F2(X.scrollWidth,X.clientWidth,W.scrollWidth,W.clientWidth),U=F2(X.scrollHeight,X.clientHeight,W.scrollHeight,W.clientHeight),q=-Y.scrollLeft+_G(J),_=-Y.scrollTop;if(uw(W).direction==="rtl")q+=F2(X.clientWidth,W.clientWidth)-K;return{width:K,height:U,x:q,y:_}}var EM=25;function Mb(J,X){let Y=u1(J),W=n5(J),K=Y.visualViewport,U=W.clientWidth,q=W.clientHeight,_=0,L=0;if(K){U=K.width,q=K.height;let N=jz();if(!N||N&&X==="fixed")_=K.offsetLeft,L=K.offsetTop}let F=_G(W);if(F<=0){let N=W.ownerDocument,V=N.body,k=getComputedStyle(V),A=N.compatMode==="CSS1Compat"?parseFloat(k.marginLeft)+parseFloat(k.marginRight)||0:0,D=Math.abs(W.clientWidth-V.clientWidth-A);if(D<=EM)U-=D}else if(F<=EM)U+=F;return{width:U,height:q,x:_,y:L}}var Ob=new Set(["absolute","fixed"]);function Db(J,X){let Y=a7(J,!0,X==="fixed"),W=Y.top+J.clientTop,K=Y.left+J.clientLeft,U=O1(J)?yz(J):t5(1),q=J.clientWidth*U.x,_=J.clientHeight*U.y,L=K*U.x,F=W*U.y;return{width:q,height:_,x:L,y:F}}function PM(J,X,Y){let W;if(X==="viewport")W=Mb(J,Y);else if(X==="document")W=jb(n5(J));else if(L1(X))W=Db(X,Y);else{let K=SM(J);W={x:X.x-K.x,y:X.y-K.y,width:X.width,height:X.height}}return f7(W)}function yM(J,X){let Y=e2(J);if(Y===X||!L1(Y)||z5(Y))return!1;return uw(Y).position==="fixed"||yM(Y,X)}function Tb(J,X){let Y=X.get(J);if(Y)return Y;let W=w5(J,[],!1).filter((_)=>L1(_)&&o5(_)!=="body"),K=null,U=uw(J).position==="fixed",q=U?e2(J):J;while(L1(q)&&!z5(q)){let _=uw(q),L=gY(q);if(!L&&_.position==="fixed")K=null;if(U?!L&&!K:!L&&_.position==="static"&&!!K&&Ob.has(K.position)||T6(q)&&!L&&yM(J,q))W=W.filter((N)=>N!==q);else K=_;q=e2(q)}return X.set(J,W),W}function xb(J){let{element:X,boundary:Y,rootBoundary:W,strategy:K}=J,q=[...Y==="clippingAncestors"?wX(X)?[]:Tb(X,this._c):[].concat(Y),W],_=q[0],L=q.reduce((F,N)=>{let V=PM(X,N,K);return F.top=F2(V.top,F.top),F.right=P4(V.right,F.right),F.bottom=P4(V.bottom,F.bottom),F.left=F2(V.left,F.left),F},PM(X,_,K));return{width:L.right-L.left,height:L.bottom-L.top,x:L.left,y:L.top}}function vb(J){let{width:X,height:Y}=bM(J);return{width:X,height:Y}}function hb(J,X,Y){let W=O1(X),K=n5(X),U=Y==="fixed",q=a7(J,!0,U,X),_={scrollLeft:0,scrollTop:0},L=t5(0);function F(){L.x=_G(K)}if(W||!W&&!U){if(o5(X)!=="body"||T6(K))_=zX(X);if(W){let A=a7(X,!0,U,X);L.x=A.x+X.clientLeft,L.y=A.y+X.clientTop}else if(K)F()}if(U&&!W&&K)F();let N=K&&!W&&!U?CM(K,_):t5(0),V=q.left+_.scrollLeft-L.x-N.x,k=q.top+_.scrollTop-L.y-N.y;return{x:V,y:k,width:q.width,height:q.height}}function h_(J){return uw(J).position==="static"}function IM(J,X){if(!O1(J)||uw(J).position==="fixed")return null;if(X)return X(J);let Y=J.offsetParent;if(n5(J)===Y)Y=Y.ownerDocument.body;return Y}function RM(J,X){let Y=u1(J);if(wX(J))return Y;if(!O1(J)){let K=e2(J);while(K&&!z5(K)){if(L1(K)&&!h_(K))return K;K=e2(K)}return Y}let W=IM(J,X);while(W&&Mj(W)&&h_(W))W=IM(W,X);if(W&&z5(W)&&h_(W)&&!gY(W))return Y;return W||Oj(J)||Y}var Eb=async function(J){let X=this.getOffsetParent||RM,Y=this.getDimensions,W=await Y(J.floating);return{reference:hb(J.reference,await X(J.floating),J.strategy),floating:{x:0,y:0,width:W.width,height:W.height}}};function Pb(J){return uw(J).direction==="rtl"}var P_={convertOffsetParentRelativeRectToViewportRelativeRect:kb,getDocumentElement:n5,getClippingRect:xb,getOffsetParent:RM,getElementRects:Eb,getClientRects:Ab,getDimensions:vb,getScale:yz,isElement:L1,isRTL:Pb};function gM(J,X){return J.x===X.x&&J.y===X.y&&J.width===X.width&&J.height===X.height}function Ib(J,X){let Y=null,W,K=n5(J);function U(){var _;clearTimeout(W),(_=Y)==null||_.disconnect(),Y=null}function q(_,L){if(_===void 0)_=!1;if(L===void 0)L=1;U();let F=J.getBoundingClientRect(),{left:N,top:V,width:k,height:A}=F;if(!_)X();if(!k||!A)return;let D=b4(V),M=b4(K.clientWidth-(N+k)),h=b4(K.clientHeight-(V+A)),v=b4(N),I={rootMargin:-D+"px "+-M+"px "+-h+"px "+-v+"px",threshold:F2(0,P4(1,L))||1},b=!0;function E(m){let R=m[0].intersectionRatio;if(R!==L){if(!b)return q();if(!R)W=setTimeout(()=>{q(!1,0.0000001)},1000);else q(!1,R)}if(R===1&&!gM(F,J.getBoundingClientRect()))q();b=!1}try{Y=new IntersectionObserver(E,{...I,root:K.ownerDocument})}catch(m){Y=new IntersectionObserver(E,I)}Y.observe(J)}return q(!0),U}function kX(J,X,Y,W){if(W===void 0)W={};let{ancestorScroll:K=!0,ancestorResize:U=!0,elementResize:q=typeof ResizeObserver==="function",layoutShift:_=typeof IntersectionObserver==="function",animationFrame:L=!1}=W,F=E_(J),N=K||U?[...F?w5(F):[],...w5(X)]:[];N.forEach((v)=>{K&&v.addEventListener("scroll",Y,{passive:!0}),U&&v.addEventListener("resize",Y)});let V=F&&_?Ib(F,Y):null,k=-1,A=null;if(q){if(A=new ResizeObserver((v)=>{let[x]=v;if(x&&x.target===F&&A)A.unobserve(X),cancelAnimationFrame(k),k=requestAnimationFrame(()=>{var I;(I=A)==null||I.observe(X)});Y()}),F&&!L)A.observe(F);A.observe(X)}let D,M=L?a7(J):null;if(L)h();function h(){let v=a7(J);if(M&&!gM(M,v))Y();M=v,D=requestAnimationFrame(h)}return Y(),()=>{var v;if(N.forEach((x)=>{K&&x.removeEventListener("scroll",Y),U&&x.removeEventListener("resize",Y)}),V==null||V(),(v=A)==null||v.disconnect(),A=null,L)cancelAnimationFrame(D)}}var fM=TM;var mM=xM,dM=MM,uM=hM,pM=OM;var cM=vM,qG=(J,X,Y)=>{let W=new Map,K={platform:P_,...Y},U={...K.platform,_c:W};return jM(J,X,{...K,platform:U})};var Tw=c(G0(),1),iM=c(G0(),1),rM=c(m8(),1),Sb=typeof document<"u",Cb=function(){},BG=Sb?iM.useLayoutEffect:Cb;function LG(J,X){if(J===X)return!0;if(typeof J!==typeof X)return!1;if(typeof J==="function"&&J.toString()===X.toString())return!0;let Y,W,K;if(J&&X&&typeof J==="object"){if(Array.isArray(J)){if(Y=J.length,Y!==X.length)return!1;for(W=Y;W--!==0;)if(!LG(J[W],X[W]))return!1;return!0}if(K=Object.keys(J),Y=K.length,Y!==Object.keys(X).length)return!1;for(W=Y;W--!==0;)if(!{}.hasOwnProperty.call(X,K[W]))return!1;for(W=Y;W--!==0;){let U=K[W];if(U==="_owner"&&J.$$typeof)continue;if(!LG(J[U],X[U]))return!1}return!0}return J!==J&&X!==X}function aM(J){if(typeof window>"u")return 1;return(J.ownerDocument.defaultView||window).devicePixelRatio||1}function lM(J,X){let Y=aM(J);return Math.round(X*Y)/Y}function I_(J){let X=Tw.useRef(J);return BG(()=>{X.current=J}),X}function sM(J){if(J===void 0)J={};let{placement:X="bottom",strategy:Y="absolute",middleware:W=[],platform:K,elements:{reference:U,floating:q}={},transform:_=!0,whileElementsMounted:L,open:F}=J,[N,V]=Tw.useState({x:0,y:0,strategy:Y,placement:X,middlewareData:{},isPositioned:!1}),[k,A]=Tw.useState(W);if(!LG(k,W))A(W);let[D,M]=Tw.useState(null),[h,v]=Tw.useState(null),x=Tw.useCallback((g)=>{if(g!==m.current)m.current=g,M(g)},[]),I=Tw.useCallback((g)=>{if(g!==R.current)R.current=g,v(g)},[]),b=U||D,E=q||h,m=Tw.useRef(null),R=Tw.useRef(null),S=Tw.useRef(N),p=L!=null,d=I_(L),w0=I_(K),t=I_(F),u=Tw.useCallback(()=>{if(!m.current||!R.current)return;let g={placement:X,strategy:Y,middleware:k};if(w0.current)g.platform=w0.current;qG(m.current,R.current,g).then((X0)=>{let P={...X0,isPositioned:t.current!==!1};if(Q0.current&&!LG(S.current,P))S.current=P,rM.flushSync(()=>{V(P)})})},[k,X,Y,w0,t]);BG(()=>{if(F===!1&&S.current.isPositioned)S.current.isPositioned=!1,V((g)=>({...g,isPositioned:!1}))},[F]);let Q0=Tw.useRef(!1);BG(()=>{return Q0.current=!0,()=>{Q0.current=!1}},[]),BG(()=>{if(b)m.current=b;if(E)R.current=E;if(b&&E){if(d.current)return d.current(b,E,u);u()}},[b,E,u,d,p]);let r=Tw.useMemo(()=>({reference:m,floating:R,setReference:x,setFloating:I}),[x,I]),e=Tw.useMemo(()=>({reference:b,floating:E}),[b,E]),o=Tw.useMemo(()=>{let g={position:Y,left:0,top:0};if(!e.floating)return g;let X0=lM(e.floating,N.x),P=lM(e.floating,N.y);if(_)return{...g,transform:"translate("+X0+"px, "+P+"px)",...aM(e.floating)>=1.5&&{willChange:"transform"}};return{position:Y,left:X0,top:P}},[Y,_,e.floating,N.x,N.y]);return Tw.useMemo(()=>({...N,update:u,refs:r,elements:e,floatingStyles:o}),[N,u,r,e,o])}var b_=(J,X)=>({...fM(J),options:[J,X]}),S_=(J,X)=>({...mM(J),options:[J,X]}),C_=(J,X)=>({...cM(J),options:[J,X]}),y_=(J,X)=>({...dM(J),options:[J,X]}),R_=(J,X)=>({...uM(J),options:[J,X]});var g_=(J,X)=>({...pM(J),options:[J,X]});var yb={intentional:"onClick",sloppy:"onPointerDown"};function Rb(J){return{escapeKey:typeof J==="boolean"?J:J?.escapeKey??!1,outsidePress:typeof J==="boolean"?J:J?.outsidePress??!0}}function s7(J,X={}){let Y="rootStore"in J?J.rootStore:J,W=Y.useState("open"),K=Y.useState("floatingElement"),U=Y.useState("referenceElement"),q=Y.useState("domReferenceElement"),{onOpenChange:_,dataRef:L}=Y.context,{enabled:F=!0,escapeKey:N=!0,outsidePress:V=!0,outsidePressEvent:k="sloppy",referencePress:A=!1,referencePressEvent:D="sloppy",ancestorScroll:M=!1,bubbles:h,externalTree:v}=X,x=$2(v),I=F0(typeof V==="function"?V:()=>!1),b=typeof V==="function"?I:V,E=b5.useRef(!1),{escapeKey:m,outsidePress:R}=Rb(h),S=b5.useRef(null),p=a1(),d=a1(),w0=F0(()=>{d.clear(),L.current.insideReactTree=!1}),t=b5.useRef(!1),u=b5.useRef(""),Q0=F0((n)=>{u.current=n.pointerType}),r=F0(()=>{let n=u.current,R0=n==="pen"||!n?"mouse":n,I0=typeof k==="function"?k():k;if(typeof I0==="string")return I0;return I0[R0]}),e=F0((n)=>{if(!W||!F||!N||n.key!=="Escape")return;if(t.current)return;let R0=L.current.floatingContext?.nodeId,I0=x?c8(x.nodesRef.current,R0):[];if(!m){if(I0.length>0){let _0=!0;if(I0.forEach((O0)=>{if(O0.context?.open&&!O0.context.dataRef.current.__escapeKeyBubbles)_0=!1}),!_0)return}}let j1=Sj(n)?n.nativeEvent:n,b0=P0(B0.escapeKey,j1);if(Y.setOpen(!1,b0),!m&&!b0.isPropagationAllowed)n.stopPropagation()}),o=F0((n)=>{let R0=r();return R0==="intentional"&&n.type!=="click"||R0==="sloppy"&&n.type==="click"}),g=F0(()=>{L.current.insideReactTree=!0,d.start(0,w0)}),X0=F0((n,R0=!1)=>{if(o(n)){w0();return}if(L.current.insideReactTree){w0();return}if(r()==="intentional"&&R0)return;if(typeof b==="function"&&!b(n))return;let I0=f1(n),j1=`[${J5("inert")}]`,b0=C1(Y.select("floatingElement")).querySelectorAll(j1),_0=Y.context.triggerElements;if(I0&&(_0.hasElement(I0)||_0.hasMatchingElement((E0)=>t0(E0,I0))))return;let O0=L1(I0)?I0:null;while(O0&&!z5(O0)){let E0=e2(O0);if(z5(E0)||!L1(E0))break;O0=E0}if(b0.length&&L1(I0)&&!Ij(I0)&&!t0(I0,Y.select("floatingElement"))&&Array.from(b0).every((E0)=>!t0(O0,E0)))return;if(O1(I0)&&!("touches"in n)){let E0=z5(I0),o0=uw(I0),x0=/auto|scroll/,l0=E0||x0.test(o0.overflowX),y0=E0||x0.test(o0.overflowY),q1=l0&&I0.clientWidth>0&&I0.scrollWidth>I0.clientWidth,D1=y0&&I0.clientHeight>0&&I0.scrollHeight>I0.clientHeight,W1=o0.direction==="rtl",Gw=D1&&(W1?n.offsetX<=I0.offsetWidth-I0.clientWidth:n.offsetX>I0.clientWidth),zw=q1&&n.offsetY>I0.clientHeight;if(Gw||zw)return}let A0=L.current.floatingContext?.nodeId,c0=x&&c8(x.nodesRef.current,A0).some((E0)=>h5(n,E0.context?.elements.floating));if(h5(n,Y.select("floatingElement"))||h5(n,Y.select("domReferenceElement"))||c0)return;let C0=x?c8(x.nodesRef.current,A0):[];if(C0.length>0){let E0=!0;if(C0.forEach((o0)=>{if(o0.context?.open&&!o0.context.dataRef.current.__outsidePressBubbles)E0=!1}),!E0)return}Y.setOpen(!1,P0(B0.outsidePress,n)),w0()}),P=F0((n)=>{if(r()!=="sloppy"||n.pointerType==="touch"||!Y.select("open")||!F||h5(n,Y.select("floatingElement"))||h5(n,Y.select("domReferenceElement")))return;X0(n)}),z0=F0((n)=>{if(r()!=="sloppy"||!Y.select("open")||!F||h5(n,Y.select("floatingElement"))||h5(n,Y.select("domReferenceElement")))return;let R0=n.touches[0];if(R0)S.current={startTime:Date.now(),startX:R0.clientX,startY:R0.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},p.start(1000,()=>{if(S.current)S.current.dismissOnTouchEnd=!1,S.current.dismissOnMouseDown=!1})}),U0=F0((n)=>{let R0=f1(n);function I0(){z0(n),R0?.removeEventListener(n.type,I0)}R0?.addEventListener(n.type,I0)}),J0=F0((n)=>{let R0=E.current;if(E.current=!1,p.clear(),n.type==="mousedown"&&S.current&&!S.current.dismissOnMouseDown)return;let I0=f1(n);function j1(){if(n.type==="pointerdown")P(n);else X0(n,R0);I0?.removeEventListener(n.type,j1)}I0?.addEventListener(n.type,j1)}),L0=F0((n)=>{if(r()!=="sloppy"||!S.current||h5(n,Y.select("floatingElement"))||h5(n,Y.select("domReferenceElement")))return;let R0=n.touches[0];if(!R0)return;let I0=Math.abs(R0.clientX-S.current.startX),j1=Math.abs(R0.clientY-S.current.startY),b0=Math.sqrt(I0*I0+j1*j1);if(b0>5)S.current.dismissOnTouchEnd=!0;if(b0>10)X0(n),p.clear(),S.current=null}),S0=F0((n)=>{let R0=f1(n);function I0(){L0(n),R0?.removeEventListener(n.type,I0)}R0?.addEventListener(n.type,I0)}),V0=F0((n)=>{if(r()!=="sloppy"||!S.current||h5(n,Y.select("floatingElement"))||h5(n,Y.select("domReferenceElement")))return;if(S.current.dismissOnTouchEnd)X0(n);p.clear(),S.current=null}),H0=F0((n)=>{let R0=f1(n);function I0(){V0(n),R0?.removeEventListener(n.type,I0)}R0?.addEventListener(n.type,I0)});b5.useEffect(()=>{if(!W||!F)return;L.current.__escapeKeyBubbles=m,L.current.__outsidePressBubbles=R;let n=new I5;function R0(O0){Y.setOpen(!1,P0(B0.none,O0))}function I0(){n.clear(),t.current=!0}function j1(){n.start(jz()?5:0,()=>{t.current=!1})}let b0=C1(K);if(b0.addEventListener("pointerdown",Q0,!0),N)b0.addEventListener("keydown",e),b0.addEventListener("compositionstart",I0),b0.addEventListener("compositionend",j1);if(b)b0.addEventListener("click",J0,!0),b0.addEventListener("pointerdown",J0,!0),b0.addEventListener("touchstart",U0,!0),b0.addEventListener("touchmove",S0,!0),b0.addEventListener("touchend",H0,!0),b0.addEventListener("mousedown",J0,!0);let _0=[];if(M){if(L1(q))_0=w5(q);if(L1(K))_0=_0.concat(w5(K));if(!L1(U)&&U&&U.contextElement)_0=_0.concat(w5(U.contextElement))}return _0=_0.filter((O0)=>O0!==b0.defaultView?.visualViewport),_0.forEach((O0)=>{O0.addEventListener("scroll",R0,{passive:!0})}),()=>{if(b0.removeEventListener("pointerdown",Q0,!0),N)b0.removeEventListener("keydown",e),b0.removeEventListener("compositionstart",I0),b0.removeEventListener("compositionend",j1);if(b)b0.removeEventListener("click",J0,!0),b0.removeEventListener("pointerdown",J0,!0),b0.removeEventListener("touchstart",U0,!0),b0.removeEventListener("touchmove",S0,!0),b0.removeEventListener("touchend",H0,!0),b0.removeEventListener("mousedown",J0,!0);_0.forEach((O0)=>{O0.removeEventListener("scroll",R0)}),n.clear()}},[L,K,U,q,N,b,W,_,M,F,m,R,e,X0,J0,P,U0,S0,H0,Q0,Y]),b5.useEffect(w0,[b,w0]);let j0=b5.useMemo(()=>({onKeyDown:e,...A&&{[yb[D]]:(n)=>{Y.setOpen(!1,P0(B0.triggerPress,n.nativeEvent))},...D!=="intentional"&&{onClick(n){Y.setOpen(!1,P0(B0.triggerPress,n.nativeEvent))}}}}),[e,Y,A,D]),r0=F0((n)=>{let R0=f1(n.nativeEvent);if(!t0(Y.select("floatingElement"),R0)||n.button!==0)return;E.current=!0}),n0=b5.useMemo(()=>({onKeyDown:e,onPointerDown:r0,onMouseDown:r0,onMouseUp:r0,onClickCapture:g,onMouseDownCapture:g,onPointerDownCapture:g,onMouseUpCapture:g,onTouchEndCapture:g,onTouchMoveCapture:g}),[e,r0,g]);return b5.useMemo(()=>F?{reference:j0,floating:n0,trigger:j0}:{},[F,j0,n0])}var k2=c(G0(),1);var gb=(J,X,Y)=>{if(X.length===1&&X[0]===Y){let W=!1;try{let K={};if(J(K)===K)W=!0}catch{}if(W){let K=void 0;try{throw Error()}catch(U){({stack:K}=U)}console.warn(`The result function returned its own inputs without modification. e.g
245
+ */var dI=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],eY=dI.join(","),uj=typeof Element>"u",Tz=uj?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,wG=!uj&&Element.prototype.getRootNode?function(J){var X;return J===null||J===void 0?void 0:(X=J.getRootNode)===null||X===void 0?void 0:X.call(J)}:function(J){return J===null||J===void 0?void 0:J.ownerDocument},qX=function(X,Y){var W;if(Y===void 0)Y=!0;var K=X===null||X===void 0?void 0:(W=X.getAttribute)===null||W===void 0?void 0:W.call(X,"inert"),U=K===""||K==="true",q=U||Y&&X&&qX(X.parentNode);return q},uI=function(X){var Y,W=X===null||X===void 0?void 0:(Y=X.getAttribute)===null||Y===void 0?void 0:Y.call(X,"contenteditable");return W===""||W==="true"},pj=function(X,Y,W){if(qX(X))return[];var K=Array.prototype.slice.apply(X.querySelectorAll(eY));if(Y&&Tz.call(X,eY))K.unshift(X);return K=K.filter(W),K},zG=function(X,Y,W){var K=[],U=Array.from(X);while(U.length){var q=U.shift();if(qX(q,!1))continue;if(q.tagName==="SLOT"){var _=q.assignedElements(),L=_.length?_:q.children,F=zG(L,!0,W);if(W.flatten)K.push.apply(K,F);else K.push({scopeParent:q,candidates:F})}else{var N=Tz.call(q,eY);if(N&&W.filter(q)&&(Y||!X.includes(q)))K.push(q);var V=q.shadowRoot||typeof W.getShadowRoot==="function"&&W.getShadowRoot(q),k=!qX(V,!1)&&(!W.shadowRootFilter||W.shadowRootFilter(q));if(V&&k){var A=zG(V===!0?q.children:V.children,!0,W);if(W.flatten)K.push.apply(K,A);else K.push({scopeParent:q,candidates:A})}else U.unshift.apply(U,q.children)}}return K},cj=function(X){return!isNaN(parseInt(X.getAttribute("tabindex"),10))},lj=function(X){if(!X)throw Error("No node provided");if(X.tabIndex<0){if((/^(AUDIO|VIDEO|DETAILS)$/.test(X.tagName)||uI(X))&&!cj(X))return 0}return X.tabIndex},pI=function(X,Y){var W=lj(X);if(W<0&&Y&&!cj(X))return 0;return W},cI=function(X,Y){return X.tabIndex===Y.tabIndex?X.documentOrder-Y.documentOrder:X.tabIndex-Y.tabIndex},ij=function(X){return X.tagName==="INPUT"},lI=function(X){return ij(X)&&X.type==="hidden"},iI=function(X){var Y=X.tagName==="DETAILS"&&Array.prototype.slice.apply(X.children).some(function(W){return W.tagName==="SUMMARY"});return Y},rI=function(X,Y){for(var W=0;W<X.length;W++)if(X[W].checked&&X[W].form===Y)return X[W]},aI=function(X){if(!X.name)return!0;var Y=X.form||wG(X),W=function(_){return Y.querySelectorAll('input[type="radio"][name="'+_+'"]')},K;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape==="function")K=W(window.CSS.escape(X.name));else try{K=W(X.name)}catch(q){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",q.message),!1}var U=rI(K,X.form);return!U||U===X},sI=function(X){return ij(X)&&X.type==="radio"},oI=function(X){return sI(X)&&!aI(X)},nI=function(X){var Y,W=X&&wG(X),K=(Y=W)===null||Y===void 0?void 0:Y.host,U=!1;if(W&&W!==X){var q,_,L;U=!!((q=K)!==null&&q!==void 0&&(_=q.ownerDocument)!==null&&_!==void 0&&_.contains(K)||X!==null&&X!==void 0&&(L=X.ownerDocument)!==null&&L!==void 0&&L.contains(X));while(!U&&K){var F,N,V;W=wG(K),K=(F=W)===null||F===void 0?void 0:F.host,U=!!((N=K)!==null&&N!==void 0&&(V=N.ownerDocument)!==null&&V!==void 0&&V.contains(K))}}return U},dj=function(X){var Y=X.getBoundingClientRect(),W=Y.width,K=Y.height;return W===0&&K===0},tI=function(X,Y){var{displayCheck:W,getShadowRoot:K}=Y;if(W==="full-native"){if("checkVisibility"in X){var U=X.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!U}}if(getComputedStyle(X).visibility==="hidden")return!0;var q=Tz.call(X,"details>summary:first-of-type"),_=q?X.parentElement:X;if(Tz.call(_,"details:not([open]) *"))return!0;if(!W||W==="full"||W==="full-native"||W==="legacy-full"){if(typeof K==="function"){var L=X;while(X){var F=X.parentElement,N=wG(X);if(F&&!F.shadowRoot&&K(F)===!0)return dj(X);else if(X.assignedSlot)X=X.assignedSlot;else if(!F&&N!==X.ownerDocument)X=N.host;else X=F}X=L}if(nI(X))return!X.getClientRects().length;if(W!=="legacy-full")return!0}else if(W==="non-zero-area")return dj(X);return!1},eI=function(X){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(X.tagName)){var Y=X.parentElement;while(Y){if(Y.tagName==="FIELDSET"&&Y.disabled){for(var W=0;W<Y.children.length;W++){var K=Y.children.item(W);if(K.tagName==="LEGEND")return Tz.call(Y,"fieldset[disabled] *")?!0:!K.contains(X)}return!0}Y=Y.parentElement}}return!1},$_=function(X,Y){if(Y.disabled||qX(Y)||lI(Y)||tI(Y,X)||iI(Y)||eI(Y))return!1;return!0},Y_=function(X,Y){if(oI(Y)||lj(Y)<0||!$_(X,Y))return!1;return!0},wb=function(X){var Y=parseInt(X.getAttribute("tabindex"),10);if(isNaN(Y)||Y>=0)return!0;return!1},rj=function(X){var Y=[],W=[];return X.forEach(function(K,U){var q=!!K.scopeParent,_=q?K.scopeParent:K,L=pI(_,q),F=q?rj(K.candidates):_;if(L===0)q?Y.push.apply(Y,F):Y.push(_);else W.push({documentOrder:U,tabIndex:L,item:K,isScope:q,content:F})}),W.sort(cI).reduce(function(K,U){return U.isScope?K.push.apply(K,U.content):K.push(U.content),K},[]).concat(Y)},d7=function(X,Y){Y=Y||{};var W;if(Y.getShadowRoot)W=zG([X],Y.includeContainer,{filter:Y_.bind(null,Y),flatten:!1,getShadowRoot:Y.getShadowRoot,shadowRootFilter:wb});else W=pj(X,Y.includeContainer,Y_.bind(null,Y));return rj(W)},aj=function(X,Y){Y=Y||{};var W;if(Y.getShadowRoot)W=zG([X],Y.includeContainer,{filter:$_.bind(null,Y),flatten:!0,getShadowRoot:Y.getShadowRoot});else W=pj(X,Y.includeContainer,$_.bind(null,Y));return W},G_=function(X,Y){if(Y=Y||{},!X)throw Error("No node provided");if(Tz.call(X,eY)===!1)return!1;return Y_(Y,X)};var u7=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function sj(J,X){let Y=d7(J,u7()),W=Y.length;if(W===0)return;let K=X2(C1(J)),U=Y.indexOf(K),q=U===-1?X===1?0:W-1:U+X;return Y[q]}function xz(J){return sj(C1(J).body,1)||J}function ZG(J){return sj(C1(J).body,-1)||J}function oj(J,X){if(!J)return null;let Y=d7(C1(J).body,u7()),W=Y.length;if(W===0)return null;let K=Y.indexOf(J);if(K===-1)return null;let U=(K+X+W)%W;return Y[U]}function nj(J){return oj(J,1)}function tj(J){return oj(J,-1)}function v6(J,X){let Y=X||J.currentTarget,W=J.relatedTarget;return!W||!t0(Y,W)}function ej(J){d7(J,u7()).forEach((Y)=>{Y.dataset.tabindex=Y.getAttribute("tabindex")||"",Y.setAttribute("tabindex","-1")})}function Q_(J){J.querySelectorAll("[data-tabindex]").forEach((Y)=>{let W=Y.dataset.tabindex;if(delete Y.dataset.tabindex,W)Y.setAttribute("tabindex",W);else Y.removeAttribute("tabindex")})}var p7="ArrowUp",S4="ArrowDown",vz="ArrowLeft",c7="ArrowRight",hz="Home",Ez="End",W_=new Set([vz,c7]),zM=new Set([vz,c7,hz,Ez]),K_=new Set([p7,S4]),ZM=new Set([p7,S4,hz,Ez]),U_=new Set([...W_,...K_]),JM=new Set([...U_,hz,Ez]),XG=new Set([p7,S4,vz,c7,hz,Ez]),zb="Shift",Zb="Control",Jb="Alt",Xb="Meta",XM=new Set([zb,Zb,Jb,Xb]);function $b(J){return O1(J)&&J.tagName==="INPUT"}function H_(J){if($b(J)&&J.selectionStart!=null)return!0;if(O1(J)&&J.tagName==="TEXTAREA")return!0;return!1}function __(J,X,Y,W){if(!J||!X||!X.scrollTo)return;let{scrollLeft:K,scrollTop:U}=J,q=J.clientWidth<J.scrollWidth,_=J.clientHeight<J.scrollHeight;if(q&&W!=="vertical"){let L=wM(J,X,"left"),F=JG(J),N=JG(X);if(Y==="ltr"){if(L+X.offsetWidth+N.scrollMarginRight>J.scrollLeft+J.clientWidth-F.scrollPaddingRight)K=L+X.offsetWidth+N.scrollMarginRight-J.clientWidth+F.scrollPaddingRight;else if(L-N.scrollMarginLeft<J.scrollLeft+F.scrollPaddingLeft)K=L-N.scrollMarginLeft-F.scrollPaddingLeft}if(Y==="rtl"){if(L-N.scrollMarginRight<J.scrollLeft+F.scrollPaddingLeft)K=L-N.scrollMarginLeft-F.scrollPaddingLeft;else if(L+X.offsetWidth+N.scrollMarginRight>J.scrollLeft+J.clientWidth-F.scrollPaddingRight)K=L+X.offsetWidth+N.scrollMarginRight-J.clientWidth+F.scrollPaddingRight}}if(_&&W!=="horizontal"){let L=wM(J,X,"top"),F=JG(J),N=JG(X);if(L-N.scrollMarginTop<J.scrollTop+F.scrollPaddingTop)U=L-N.scrollMarginTop-F.scrollPaddingTop;else if(L+X.offsetHeight+N.scrollMarginBottom>J.scrollTop+J.clientHeight-F.scrollPaddingBottom)U=L+X.offsetHeight+N.scrollMarginBottom-J.clientHeight+F.scrollPaddingBottom}J.scrollTo({left:K,top:U,behavior:"auto"})}function wM(J,X,Y){let W=Y==="left"?"offsetLeft":"offsetTop",K=0;while(X.offsetParent){if(K+=X[W],X.offsetParent===J)break;X=X.offsetParent}return K}function JG(J){let X=getComputedStyle(J);return{scrollMarginTop:parseFloat(X.scrollMarginTop)||0,scrollMarginRight:parseFloat(X.scrollMarginRight)||0,scrollMarginBottom:parseFloat(X.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(X.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(X.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(X.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(X.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(X.scrollPaddingLeft)||0}}var $M=c(G0(),1);function Kw(J){let X=r1(Yb,J).current;return X.next=J,k0(X.effect),X}function Yb(J){let X={current:J,next:J,effect:()=>{X.current=X.next}};return X}function P5(J){let{enabled:X=!0,open:Y,ref:W,onComplete:K}=J,U=Kw(Y),q=F0(K),_=kz(W,Y);$M.useEffect(()=>{if(!X)return;_(()=>{if(Y===U.current)q()})},[X,Y,q,_,U])}var S5=c(G0(),1);function Dw(J){return J?.ownerDocument||document}var BX=0;class I5{static create(){return new I5}currentId=BX;start(J,X){this.clear(),this.currentId=setTimeout(()=>{this.currentId=BX,X()},J)}isStarted(){return this.currentId!==BX}clear=()=>{if(this.currentId!==BX)clearTimeout(this.currentId),this.currentId=BX};disposeEffect=()=>{return this.clear}}function a1(){let J=r1(I5.create).current;return Nz(J.disposeEffect),J}var YM={},GM={},QM="";function Gb(J){if(typeof document>"u")return!1;let X=Dw(J);return u1(X).innerWidth-X.documentElement.clientWidth>0}function Qb(J){let X=Dw(J),Y=X.documentElement,W=X.body,K=T6(Y)?Y:W,U=K.style.overflow;return K.style.overflow="hidden",()=>{K.style.overflow=U}}function Wb(J){let X=Dw(J),Y=X.documentElement,W=X.body,K=u1(Y),U=0,q=0,_=T5.create(),L=typeof CSS<"u"&&CSS.supports?.("scrollbar-gutter","stable");if(hj&&(K.visualViewport?.scale??1)!==1)return()=>{};function F(){let k=K.getComputedStyle(Y),A=K.getComputedStyle(W),h=(k.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";U=Y.scrollTop,q=Y.scrollLeft,YM={scrollbarGutter:Y.style.scrollbarGutter,overflowY:Y.style.overflowY,overflowX:Y.style.overflowX},QM=Y.style.scrollBehavior,GM={position:W.style.position,height:W.style.height,width:W.style.width,boxSizing:W.style.boxSizing,overflowY:W.style.overflowY,overflowX:W.style.overflowX,scrollBehavior:W.style.scrollBehavior};let v=Y.scrollHeight>Y.clientHeight,x=Y.scrollWidth>Y.clientWidth,I=k.overflowY==="scroll"||A.overflowY==="scroll",b=k.overflowX==="scroll"||A.overflowX==="scroll",E=Math.max(0,K.innerWidth-Y.clientWidth),m=Math.max(0,K.innerHeight-Y.clientHeight),R=parseFloat(A.marginTop)+parseFloat(A.marginBottom),S=parseFloat(A.marginLeft)+parseFloat(A.marginRight),p=T6(Y)?Y:W;if(L){Y.style.scrollbarGutter=h,p.style.overflowY="hidden",p.style.overflowX="hidden";return}if(Object.assign(Y.style,{scrollbarGutter:h,overflowY:"hidden",overflowX:"hidden"}),v||I)Y.style.overflowY="scroll";if(x||b)Y.style.overflowX="scroll";Object.assign(W.style,{position:"relative",height:R||m?`calc(100dvh - ${R+m}px)`:"100dvh",width:S||E?`calc(100vw - ${S+E}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),W.scrollTop=U,W.scrollLeft=q,Y.setAttribute("data-base-ui-scroll-locked",""),Y.style.scrollBehavior="unset"}function N(){if(Object.assign(Y.style,YM),Object.assign(W.style,GM),!L)Y.scrollTop=U,Y.scrollLeft=q,Y.removeAttribute("data-base-ui-scroll-locked"),Y.style.scrollBehavior=QM}function V(){N(),_.request(F)}return F(),K.addEventListener("resize",V),()=>{if(_.cancel(),N(),typeof K.removeEventListener==="function")K.removeEventListener("resize",V)}}class WM{lockCount=0;restore=null;timeoutLock=I5.create();timeoutUnlock=I5.create();acquire(J){if(this.lockCount+=1,this.lockCount===1&&this.restore===null)this.timeoutLock.start(0,()=>this.lock(J));return this.release}release=()=>{if(this.lockCount-=1,this.lockCount===0&&this.restore)this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{if(this.lockCount===0&&this.restore)this.restore?.(),this.restore=null};lock(J){if(this.lockCount===0||this.restore!==null)return;let Y=Dw(J).documentElement,W=u1(Y).getComputedStyle(Y).overflowY;if(W==="hidden"||W==="clip"){this.restore=vY;return}let K=Ej||!Gb(J);this.restore=K?Qb(J):Wb(J)}}var Kb=new WM;function $G(J=!0,X=null){k0(()=>{if(!J)return;return Kb.acquire(X)},[J,X])}var P2=c(G0(),1);var GG=c(G0(),1);var C4=c(G0(),1);function YG(){let J=new Map;return{emit(X,Y){J.get(X)?.forEach((W)=>W(Y))},on(X,Y){if(!J.has(X))J.set(X,new Set);J.get(X).add(Y)},off(X,Y){J.get(X)?.delete(Y)}}}class l7{nodesRef={current:[]};events=YG();addNode(J){this.nodesRef.current.push(J)}removeNode(J){let X=this.nodesRef.current.findIndex((Y)=>Y===J);if(X!==-1)this.nodesRef.current.splice(X,1)}}var q_=c(x1(),1),B_=C4.createContext(null);B_.displayName="FloatingNodeContext";var L_=C4.createContext(null);L_.displayName="FloatingTreeContext";var tw=()=>C4.useContext(B_)?.id||null,$2=(J)=>{let X=C4.useContext(L_);return J??X};function LX(J){let X=J2(),Y=$2(J),W=tw();return k0(()=>{if(!X)return;let K={id:X,parentId:W};return Y?.addNode(K),()=>{Y?.removeNode(K)}},[Y,X,W]),X}function V_(J){let{children:X,id:Y}=J,W=tw();return q_.jsx(B_.Provider,{value:C4.useMemo(()=>({id:Y,parentId:W}),[Y,W]),children:X})}function F_(J){let{children:X,externalTree:Y}=J,W=r1(()=>Y??new l7).current;return q_.jsx(L_.Provider,{value:W,children:X})}function J5(J){return`data-base-ui-${J}`}var Gd=J5("safe-polygon"),Qd=`button,[role="button"],select,[tabindex]:not([tabindex="-1"]),${Oz}`;function Pz(J,X,Y){if(Y&&!E5(Y))return 0;if(typeof J==="number")return J;if(typeof J==="function"){let W=J();if(typeof W==="number")return W;return W?.[X]}return J?.[X]}var KM=c(x1(),1),N_=P2.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new I5,currentIdRef:{current:null},currentContextRef:{current:null}});N_.displayName="FloatingDelayGroupContext";function k_(J){let{children:X,delay:Y,timeoutMs:W=0}=J,K=P2.useRef(Y),U=P2.useRef(Y),q=P2.useRef(null),_=P2.useRef(null),L=a1();return KM.jsx(N_.Provider,{value:P2.useMemo(()=>({hasProvider:!0,delayRef:K,initialDelayRef:U,currentIdRef:q,timeoutMs:W,currentContextRef:_,timeout:L}),[W,L]),children:X})}function A_(J,X={open:!1}){let Y="rootStore"in J?J.rootStore:J,W=Y.useState("floatingId"),{enabled:K=!0,open:U}=X,q=P2.useContext(N_),{currentIdRef:_,delayRef:L,timeoutMs:F,initialDelayRef:N,currentContextRef:V,hasProvider:k,timeout:A}=q,[D,M]=P2.useState(!1);return k0(()=>{function h(){M(!1),V.current?.setIsInstantPhase(!1),_.current=null,V.current=null,L.current=N.current}if(!K)return;if(!_.current)return;if(!U&&_.current===W){if(M(!1),F){let v=W;return A.start(F,()=>{if(Y.select("open")||_.current&&_.current!==v)return;h()}),()=>{A.clear()}}h()}return},[K,U,W,_,L,F,N,V,A,Y]),k0(()=>{if(!K)return;if(!U)return;let h=V.current,v=_.current;if(A.clear(),V.current={onOpenChange:Y.setOpen,setIsInstantPhase:M},_.current=W,L.current={open:0,close:Pz(N.current,"close")},v!==null&&v!==W)M(!0),h?.setIsInstantPhase(!0),h?.onOpenChange(!1,P0(B0.none));else M(!1),h?.setIsInstantPhase(!1)},[K,U,W,Y,_,L,F,N,V,A]),k0(()=>{return()=>{V.current=null}},[V]),P2.useMemo(()=>({hasProvider:k,delayRef:L,isInstantPhase:D}),[k,L,D])}var qw=c(G0(),1);var QG={clip:"rect(0 0 0 0)",overflow:"hidden",whiteSpace:"nowrap",position:"fixed",top:0,left:0,border:0,padding:0,width:1,height:1,margin:-1};var WG=c(G0(),1);var UM=c(x1(),1),l8=WG.forwardRef(function(X,Y){let[W,K]=WG.useState();return k0(()=>{if(pY)K("button")},[]),UM.jsx("span",{...X,ref:Y,style:QG,"aria-hidden":W?void 0:!0,...{tabIndex:0,role:W},"data-base-ui-focus-guard":""})});l8.displayName="FocusGuard";var HM=0;function Iz(J,X={}){let{preventScroll:Y=!1,cancelPrevious:W=!0,sync:K=!1}=X;if(W)cancelAnimationFrame(HM);let U=()=>J?.focus({preventScroll:Y});if(K)U();else HM=requestAnimationFrame(U)}var bz={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function _M(J){if(J==="inert")return bz.inert;if(J==="aria-hidden")return bz["aria-hidden"];return bz.none}var KG=new WeakSet,UG={},j_=0;var qM=(J)=>J&&(J.host||qM(J.parentNode)),Ub=(J,X)=>X.map((Y)=>{if(J.contains(Y))return Y;let W=qM(Y);if(J.contains(W))return W;return null}).filter((Y)=>Y!=null);function Hb(J,X,Y,W){let U=W?"inert":Y?"aria-hidden":null,q=Ub(X,J),_=new Set,L=new Set(q),F=[];if(!UG["data-base-ui-inert"])UG["data-base-ui-inert"]=new WeakMap;let N=UG["data-base-ui-inert"];q.forEach(V),k(X),_.clear();function V(A){if(!A||_.has(A))return;if(_.add(A),A.parentNode)V(A.parentNode)}function k(A){if(!A||L.has(A))return;[].forEach.call(A.children,(D)=>{if(o5(D)==="script")return;if(_.has(D))k(D);else{let M=U?D.getAttribute(U):null,h=M!==null&&M!=="false",v=_M(U),x=(v.get(D)||0)+1,I=(N.get(D)||0)+1;if(v.set(D,x),N.set(D,I),F.push(D),x===1&&h)KG.add(D);if(I===1)D.setAttribute("data-base-ui-inert","");if(!h&&U)D.setAttribute(U,U==="inert"?"":"true")}})}return j_+=1,()=>{if(F.forEach((A)=>{let D=_M(U),h=(D.get(A)||0)-1,v=(N.get(A)||0)-1;if(D.set(A,h),N.set(A,v),!h){if(!KG.has(A)&&U)A.removeAttribute(U);KG.delete(A)}if(!v)A.removeAttribute("data-base-ui-inert")}),j_-=1,!j_)bz.inert=new WeakMap,bz["aria-hidden"]=new WeakMap,bz.none=new WeakMap,KG=new WeakSet,UG={}}}function BM(J,X=!1,Y=!1){let W=C1(J[0]).body;return Hb(J.concat(Array.from(W.querySelectorAll("[aria-live]"))),W,X,Y)}var $w=c(G0(),1),M_=c(m8(),1);var i7=c(x1(),1),O_=$w.createContext(null);O_.displayName="PortalContext";var D_=()=>$w.useContext(O_),_b=J5("portal");function HG(J={}){let{ref:X,container:Y,componentProps:W=v1,elementProps:K,elementState:U}=J,q=J2(),L=D_()?.portalNode,[F,N]=$w.useState(null),[V,k]=$w.useState(null),A=$w.useRef(null);k0(()=>{if(Y===null){if(A.current)A.current=null,k(null),N(null);return}if(q==null)return;let h=(Y&&(RY(Y)?Y:Y.current))??L??document.body;if(h==null){if(A.current)A.current=null,k(null),N(null);return}if(A.current!==h)A.current=h,k(null),N(h)},[Y,L,q]);let D=h0("div",W,{ref:[X,k],state:U,props:[{id:q,[_b]:""},K]});return{portalNode:V,portalSubtree:F&&D?M_.createPortal(D,F):null}}var Sz=$w.forwardRef(function(X,Y){let{children:W,container:K,className:U,render:q,renderGuards:_,...L}=X,{portalNode:F,portalSubtree:N}=HG({container:K,ref:Y,componentProps:X,elementProps:L}),V=$w.useRef(null),k=$w.useRef(null),A=$w.useRef(null),D=$w.useRef(null),[M,h]=$w.useState(null),v=M?.modal,x=M?.open,I=typeof _==="boolean"?_:!!M&&!M.modal&&M.open&&!!F;$w.useEffect(()=>{if(!F||v)return;function E(m){if(F&&v6(m))(m.type==="focusin"?Q_:ej)(F)}return F.addEventListener("focusin",E,!0),F.addEventListener("focusout",E,!0),()=>{F.removeEventListener("focusin",E,!0),F.removeEventListener("focusout",E,!0)}},[F,v]),$w.useEffect(()=>{if(!F||x)return;Q_(F)},[x,F]);let b=$w.useMemo(()=>({beforeOutsideRef:V,afterOutsideRef:k,beforeInsideRef:A,afterInsideRef:D,portalNode:F,setFocusManagerState:h}),[F]);return i7.jsxs($w.Fragment,{children:[N,i7.jsxs(O_.Provider,{value:b,children:[I&&F&&i7.jsx(l8,{"data-type":"outside",ref:V,onFocus:(E)=>{if(v6(E,F))A.current?.focus();else{let m=M?M.domReference:null;ZG(m)?.focus()}}}),I&&F&&i7.jsx("span",{"aria-owns":F.id,style:Lj}),F&&M_.createPortal(W,F),I&&F&&i7.jsx(l8,{"data-type":"outside",ref:k,onFocus:(E)=>{if(v6(E,F))D.current?.focus();else{let m=M?M.domReference:null;if(xz(m)?.focus(),M?.closeOnFocusOut)M?.onOpenChange(!1,P0(B0.focusOut,E.nativeEvent))}}})]})]})});Sz.displayName="FloatingPortal";var VX=c(x1(),1);function qb(J,X){let Y=u1(J.target);if(J instanceof Y.KeyboardEvent)return"keyboard";if(J instanceof Y.FocusEvent)return X||"keyboard";if("pointerType"in J)return J.pointerType||"keyboard";if("touches"in J)return"touch";if(J instanceof Y.MouseEvent)return X||(J.detail===0?"keyboard":"mouse");return""}var LM=20,y4=[];function x_(){y4=y4.filter((J)=>J.isConnected)}function Bb(J){if(x_(),J&&o5(J)!=="body"){if(y4.push(J),y4.length>LM)y4=y4.slice(-LM)}}function T_(){return x_(),y4[y4.length-1]}function Lb(J){if(!J)return null;let X=u7();if(G_(J,X))return J;return d7(J,X)[0]||J}function Vb(J){if(!J||!J.isConnected)return!1;if(typeof J.checkVisibility==="function")return J.checkVisibility();return uw(J).display!=="none"}function VM(J,X){if(!X.current.includes("floating")&&!J.getAttribute("role")?.includes("dialog"))return;let Y=u7(),K=aj(J,Y).filter((q)=>{let _=q.getAttribute("data-tabindex")||"";return G_(q,Y)||q.hasAttribute("data-tabindex")&&!_.startsWith("-")}),U=J.getAttribute("tabindex");if(X.current.includes("floating")||K.length===0){if(U!=="0")J.setAttribute("tabindex","0")}else if(U!=="-1"||J.hasAttribute("data-tabindex")&&J.getAttribute("data-tabindex")!=="-1")J.setAttribute("tabindex","-1"),J.setAttribute("data-tabindex","-1")}function FX(J){let{context:X,children:Y,disabled:W=!1,order:K=["content"],initialFocus:U=!0,returnFocus:q=!0,restoreFocus:_=!1,modal:L=!0,closeOnFocusOut:F=!0,openInteractionType:N="",getInsideElements:V=()=>[],nextFocusableElement:k,previousFocusableElement:A,beforeContentFocusGuardRef:D,externalTree:M}=J,h="rootStore"in X?X.rootStore:X,v=h.useState("open"),x=h.useState("domReferenceElement"),I=h.useState("floatingElement"),{events:b,dataRef:E}=h.context,m=F0(()=>E.current.floatingContext?.nodeId),R=F0(V),S=U===!1,p=$X(x)&&S,d=Kw(K),w0=Kw(U),t=Kw(q),u=Kw(N),Q0=$2(M),r=D_(),e=qw.useRef(null),o=qw.useRef(null),g=qw.useRef(!1),X0=qw.useRef(!1),P=qw.useRef(!1),z0=qw.useRef(-1),U0=qw.useRef(""),J0=qw.useRef(""),L0=a1(),S0=a1(),V0=x5(),H0=r!=null,j0=g7(I),r0=F0((_0=j0)=>{return _0?d7(_0,u7()):[]}),n0=F0((_0)=>{let O0=r0(_0);return d.current.map(()=>O0).filter(Boolean).flat()});qw.useEffect(()=>{if(W)return;if(!L)return;function _0(A0){if(A0.key==="Tab"){if(t0(j0,X2(C1(j0)))&&r0().length===0&&!p)Xw(A0)}}let O0=C1(j0);return O0.addEventListener("keydown",_0),()=>{O0.removeEventListener("keydown",_0)}},[W,x,j0,L,d,p,r0,n0]),qw.useEffect(()=>{if(W)return;if(!I)return;function _0(O0){let A0=f1(O0),C0=r0().indexOf(A0);if(C0!==-1)z0.current=C0}return I.addEventListener("focusin",_0),()=>{I.removeEventListener("focusin",_0)}},[W,I,r0]),qw.useEffect(()=>{if(W||!v)return;let _0=C1(j0);function O0(){P.current=!1}function A0(C0){let E0=f1(C0),o0=t0(I,E0)||t0(x,E0)||t0(r?.portalNode,E0);P.current=!o0,J0.current=C0.pointerType||"keyboard"}function c0(){J0.current="keyboard"}return _0.addEventListener("pointerdown",A0,!0),_0.addEventListener("pointerup",O0,!0),_0.addEventListener("pointercancel",O0,!0),_0.addEventListener("keydown",c0,!0),()=>{_0.removeEventListener("pointerdown",A0,!0),_0.removeEventListener("pointerup",O0,!0),_0.removeEventListener("pointercancel",O0,!0),_0.removeEventListener("keydown",c0,!0)}},[W,I,x,j0,v,r]),qw.useEffect(()=>{if(W)return;if(!F)return;function _0(){X0.current=!0,S0.start(0,()=>{X0.current=!1})}function O0(E0){let{relatedTarget:o0,currentTarget:x0}=E0,l0=f1(E0);queueMicrotask(()=>{let y0=m(),q1=h.context.triggerElements,D1=!(t0(x,o0)||t0(I,o0)||t0(o0,I)||t0(r?.portalNode,o0)||o0!=null&&q1.hasElement(o0)||q1.hasMatchingElement((W1)=>t0(W1,o0))||o0?.hasAttribute(J5("focus-guard"))||Q0&&(c8(Q0.nodesRef.current,y0).find((W1)=>t0(W1.context?.elements.floating,o0)||t0(W1.context?.elements.domReference,o0))||X_(Q0.nodesRef.current,y0).find((W1)=>[W1.context?.elements.floating,g7(W1.context?.elements.floating)].includes(o0)||W1.context?.elements.domReference===o0)));if(x0===x&&j0)VM(j0,d);if(_&&x0!==x&&!Vb(l0)&&X2(C1(j0))===C1(j0).body){if(O1(j0)){if(j0.focus(),_==="popup"){V0.request(()=>{j0.focus()});return}}let W1=z0.current,Gw=r0(),zw=Gw[W1]||Gw[Gw.length-1]||j0;if(O1(zw))zw.focus()}if(E.current.insideReactTree){E.current.insideReactTree=!1;return}if((p?!0:!L)&&o0&&D1&&!X0.current&&(p||o0!==T_()))g.current=!0,h.setOpen(!1,P0(B0.focusOut,E0))})}function A0(){if(P.current)return;E.current.insideReactTree=!0,L0.start(0,()=>{E.current.insideReactTree=!1})}let c0=O1(x)?x:null,C0=[];if(!I&&!c0)return;if(c0)c0.addEventListener("focusout",O0),c0.addEventListener("pointerdown",_0),C0.push(()=>{c0.removeEventListener("focusout",O0),c0.removeEventListener("pointerdown",_0)});if(I){if(I.addEventListener("focusout",O0),r)I.addEventListener("focusout",A0,!0),C0.push(()=>{I.removeEventListener("focusout",A0,!0)});C0.push(()=>{I.removeEventListener("focusout",O0)})}return()=>{C0.forEach((E0)=>{E0()})}},[W,x,I,j0,L,Q0,r,h,F,_,r0,p,m,d,E,L0,S0,V0]);let n=qw.useRef(null),R0=qw.useRef(null),I0=O5(n,D,r?.beforeInsideRef),j1=O5(R0,r?.afterInsideRef);qw.useEffect(()=>{if(W||!I||!v)return;let _0=Array.from(r?.portalNode?.querySelectorAll(`[${J5("portal")}]`)||[]),A0=(Q0?X_(Q0.nodesRef.current,m()):[]).find((E0)=>$X(E0.context?.elements.domReference||null))?.context?.elements.domReference,c0=[I,A0,..._0,...R(),e.current,o.current,n.current,R0.current,r?.beforeOutsideRef.current,r?.afterOutsideRef.current,O6(A),O6(k),p?x:null].filter((E0)=>E0!=null),C0=BM(c0,L||p);return()=>{C0()}},[v,W,x,I,L,d,r,p,Q0,m,R,k,A]),k0(()=>{if(!v||W||!O1(j0))return;let _0=C1(j0),O0=X2(_0);queueMicrotask(()=>{let A0=n0(j0),c0=w0.current,C0=typeof c0==="function"?c0(u.current||""):c0;if(C0===void 0||C0===!1)return;let E0;if(C0===!0||C0===null)E0=A0[0]||j0;else E0=O6(C0);if(E0=E0||A0[0]||j0,t0(j0,O0))return;Iz(E0,{preventScroll:E0===j0})})},[W,v,j0,S,n0,w0,u]),k0(()=>{if(W||!j0)return;let _0=C1(j0),O0=X2(_0);Bb(O0);function A0(E0){if(!E0.open)U0.current=qb(E0.nativeEvent,J0.current);if(E0.reason===B0.triggerHover&&E0.nativeEvent.type==="mouseleave")g.current=!0;if(E0.reason!==B0.outsidePress)return;if(E0.nested)g.current=!1;else if(iY(E0.nativeEvent)||rY(E0.nativeEvent))g.current=!1;else{let o0=!1;if(document.createElement("div").focus({get preventScroll(){return o0=!0,!1}}),o0)g.current=!1;else g.current=!0}}b.on("openchange",A0);let c0=_0.createElement("span");if(c0.setAttribute("tabindex","-1"),c0.setAttribute("aria-hidden","true"),Object.assign(c0.style,QG),H0&&x)x.insertAdjacentElement("afterend",c0);function C0(){let E0=t.current,o0=typeof E0==="function"?E0(U0.current):E0;if(o0===void 0||o0===!1)return null;if(o0===null)o0=!0;if(typeof o0==="boolean"){let l0=x||T_();return l0&&l0.isConnected?l0:c0}let x0=x||T_()||c0;return O6(o0)||x0}return()=>{b.off("openchange",A0);let E0=X2(_0),o0=t0(I,E0)||Q0&&c8(Q0.nodesRef.current,m(),!1).some((l0)=>t0(l0.context?.elements.floating,E0)),x0=C0();queueMicrotask(()=>{let l0=Lb(x0),y0=typeof t.current!=="boolean";if(t.current&&!g.current&&O1(l0)&&(!y0&&l0!==E0&&E0!==_0.body?o0:!0))l0.focus({preventScroll:!0});c0.remove()})}},[W,I,j0,t,E,b,Q0,H0,x,m]),qw.useEffect(()=>{queueMicrotask(()=>{g.current=!1})},[W]),qw.useEffect(()=>{if(W||!v)return;function _0(A0){if(f1(A0)?.closest(`[${hY}]`))X0.current=!0}let O0=C1(j0);return O0.addEventListener("pointerdown",_0,!0),()=>{O0.removeEventListener("pointerdown",_0,!0)}},[W,v,j0]),k0(()=>{if(W)return;if(!r)return;return r.setFocusManagerState({modal:L,closeOnFocusOut:F,open:v,onOpenChange:h.setOpen,domReference:x}),()=>{r.setFocusManagerState(null)}},[W,r,L,v,h,F,x]),k0(()=>{if(W||!j0)return;return VM(j0,d),()=>{queueMicrotask(x_)}},[W,j0,d]);let b0=!W&&(L?!p:!0)&&(H0||L);return VX.jsxs(qw.Fragment,{children:[b0&&VX.jsx(l8,{"data-type":"inside",ref:I0,onFocus:(_0)=>{if(L){let O0=n0();Iz(O0[O0.length-1])}else if(r?.portalNode)if(g.current=!1,v6(_0,r.portalNode))xz(x)?.focus();else O6(A??r.beforeOutsideRef)?.focus()}}),Y,b0&&VX.jsx(l8,{"data-type":"inside",ref:j1,onFocus:(_0)=>{if(L)Iz(n0()[0]);else if(r?.portalNode){if(F)g.current=!0;if(v6(_0,r.portalNode))ZG(x)?.focus();else O6(k??r.afterOutsideRef)?.focus()}}})]})}var NX=c(G0(),1);function r7(J,X={}){let Y="rootStore"in J?J.rootStore:J,W=Y.context.dataRef,{enabled:K=!0,event:U="click",toggle:q=!0,ignoreMouse:_=!1,stickIfOpen:L=!0,touchOpenDelay:F=0}=X,N=NX.useRef(void 0),V=x5(),k=a1(),A=NX.useMemo(()=>({onPointerDown(D){N.current=D.pointerType},onMouseDown(D){let M=N.current,h=D.nativeEvent,v=Y.select("open");if(D.button!==0||U==="click"||E5(M,!0)&&_)return;let x=W.current.openEvent,I=x?.type,b=Y.select("domReferenceElement")!==D.currentTarget,E=v&&b||!(v&&q&&(x&&L?I==="click"||I==="mousedown":!0));if(XX(h.target)){let R=P0(B0.triggerPress,h,h.target);if(E&&M==="touch"&&F>0)k.start(F,()=>{Y.setOpen(!0,R)});else Y.setOpen(E,R);return}let m=D.currentTarget;V.request(()=>{let R=P0(B0.triggerPress,h,m);if(E&&M==="touch"&&F>0)k.start(F,()=>{Y.setOpen(!0,R)});else Y.setOpen(E,R)})},onClick(D){if(U==="mousedown-only")return;let M=N.current;if(U==="mousedown"&&M){N.current=void 0;return}if(E5(M,!0)&&_)return;let h=Y.select("open"),v=W.current.openEvent,x=Y.select("domReferenceElement")!==D.currentTarget,I=h&&x||!(h&&q&&(v&&L?aY(v):!0)),b=P0(B0.triggerPress,D.nativeEvent,D.currentTarget);if(I&&M==="touch"&&F>0)k.start(F,()=>{Y.setOpen(!0,b)});else Y.setOpen(I,b)},onKeyDown(){N.current=void 0}}),[W,U,_,Y,L,q,V,k,F]);return NX.useMemo(()=>K?{reference:A}:v1,[K,A])}var N2=c(G0(),1);function Fb(J,X){let Y=null,W=null,K=!1;return{contextElement:J||void 0,getBoundingClientRect(){let U=J?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},q=X.axis==="x"||X.axis==="both",_=X.axis==="y"||X.axis==="both",L=["mouseenter","mousemove"].includes(X.dataRef.current.openEvent?.type||"")&&X.pointerType!=="touch",F=U.width,N=U.height,V=U.x,k=U.y;if(Y==null&&X.x&&q)Y=U.x-X.x;if(W==null&&X.y&&_)W=U.y-X.y;if(V-=Y||0,k-=W||0,F=0,N=0,!K||L)F=X.axis==="y"?U.width:0,N=X.axis==="x"?U.height:0,V=q&&X.x!=null?X.x:V,k=_&&X.y!=null?X.y:k;else if(K&&!L)N=X.axis==="x"?U.height:N,F=X.axis==="y"?U.width:F;return K=!0,{width:F,height:N,x:V,y:k,top:k,right:V+F,bottom:k+N,left:V}}}}function FM(J){return J!=null&&J.clientX!=null}function v_(J,X={}){let Y="rootStore"in J?J.rootStore:J,W=Y.useState("open"),K=Y.useState("floatingElement"),U=Y.useState("domReferenceElement"),q=Y.context.dataRef,{enabled:_=!0,axis:L="both",x:F=null,y:N=null}=X,V=N2.useRef(!1),k=N2.useRef(null),[A,D]=N2.useState(),[M,h]=N2.useState([]),v=F0((m,R)=>{if(V.current)return;if(q.current.openEvent&&!FM(q.current.openEvent))return;Y.set("positionReference",Fb(U,{x:m,y:R,axis:L,dataRef:q,pointerType:A}))}),x=F0((m)=>{if(F!=null||N!=null)return;if(!W)v(m.clientX,m.clientY);else if(!k.current)h([])}),I=E5(A)?K:W,b=N2.useCallback(()=>{if(!I||!_||F!=null||N!=null)return;let m=u1(K);function R(S){let p=f1(S);if(!t0(K,p))v(S.clientX,S.clientY);else m.removeEventListener("mousemove",R),k.current=null}if(!q.current.openEvent||FM(q.current.openEvent)){m.addEventListener("mousemove",R);let S=()=>{m.removeEventListener("mousemove",R),k.current=null};return k.current=S,S}Y.set("positionReference",U);return},[I,_,F,N,K,q,U,Y,v]);N2.useEffect(()=>{return b()},[b,M]),N2.useEffect(()=>{if(_&&!K)V.current=!1},[_,K]),N2.useEffect(()=>{if(!_&&W)V.current=!0},[_,W]),k0(()=>{if(_&&(F!=null||N!=null))V.current=!1,v(F,N)},[_,F,N,v]);let E=N2.useMemo(()=>{function m(R){D(R.pointerType)}return{onPointerDown:m,onPointerEnter:m,onMouseMove:x,onMouseEnter:x}},[x]);return N2.useMemo(()=>_?{reference:E}:{},[_,E])}var b5=c(G0(),1);function NM(J,X,Y){let{reference:W,floating:K}=J,U=E2(X),q=WX(X),_=QX(q),L=nw(X),F=U==="y",N=W.x+W.width/2-K.width/2,V=W.y+W.height/2-K.height/2,k=W[_]/2-K[_]/2,A;switch(L){case"top":A={x:N,y:W.y-K.height};break;case"bottom":A={x:N,y:W.y+W.height};break;case"right":A={x:W.x+W.width,y:V};break;case"left":A={x:W.x-K.width,y:V};break;default:A={x:W.x,y:W.y}}switch(w8(X)){case"start":A[q]-=k*(Y&&F?-1:1);break;case"end":A[q]+=k*(Y&&F?-1:1);break}return A}var jM=async(J,X,Y)=>{let{placement:W="bottom",strategy:K="absolute",middleware:U=[],platform:q}=Y,_=U.filter(Boolean),L=await(q.isRTL==null?void 0:q.isRTL(X)),F=await q.getElementRects({reference:J,floating:X,strategy:K}),{x:N,y:V}=NM(F,W,L),k=W,A={},D=0;for(let M=0;M<_.length;M++){let{name:h,fn:v}=_[M],{x,y:I,data:b,reset:E}=await v({x:N,y:V,initialPlacement:W,placement:k,strategy:K,middlewareData:A,rects:F,platform:q,elements:{reference:J,floating:X}});if(N=x!=null?x:N,V=I!=null?I:V,A={...A,[h]:{...A[h],...b}},E&&D<=50){if(D++,typeof E==="object"){if(E.placement)k=E.placement;if(E.rects)F=E.rects===!0?await q.getElementRects({reference:J,floating:X,strategy:K}):E.rects;({x:N,y:V}=NM(F,k,L))}M=-1}}return{x:N,y:V,placement:k,strategy:K,middlewareData:A}};async function Cz(J,X){var Y;if(X===void 0)X={};let{x:W,y:K,platform:U,rects:q,elements:_,strategy:L}=J,{boundary:F="clippingAncestors",rootBoundary:N="viewport",elementContext:V="floating",altBoundary:k=!1,padding:A=0}=e5(X,J),D=nY(A),h=_[k?V==="floating"?"reference":"floating":V],v=f7(await U.getClippingRect({element:((Y=await(U.isElement==null?void 0:U.isElement(h)))!=null?Y:!0)?h:h.contextElement||await(U.getDocumentElement==null?void 0:U.getDocumentElement(_.floating)),boundary:F,rootBoundary:N,strategy:L})),x=V==="floating"?{x:W,y:K,width:q.floating.width,height:q.floating.height}:q.reference,I=await(U.getOffsetParent==null?void 0:U.getOffsetParent(_.floating)),b=await(U.isElement==null?void 0:U.isElement(I))?await(U.getScale==null?void 0:U.getScale(I))||{x:1,y:1}:{x:1,y:1},E=f7(U.convertOffsetParentRelativeRectToViewportRelativeRect?await U.convertOffsetParentRelativeRectToViewportRelativeRect({elements:_,rect:x,offsetParent:I,strategy:L}):x);return{top:(v.top-E.top+D.top)/b.y,bottom:(E.bottom-v.bottom+D.bottom)/b.y,left:(v.left-E.left+D.left)/b.x,right:(E.right-v.right+D.right)/b.x}}var MM=function(J){if(J===void 0)J={};return{name:"flip",options:J,async fn(X){var Y,W;let{placement:K,middlewareData:U,rects:q,initialPlacement:_,platform:L,elements:F}=X,{mainAxis:N=!0,crossAxis:V=!0,fallbackPlacements:k,fallbackStrategy:A="bestFit",fallbackAxisSideDirection:D="none",flipAlignment:M=!0,...h}=e5(J,X);if((Y=U.arrow)!=null&&Y.alignmentOffset)return{};let v=nw(K),x=E2(_),I=nw(_)===_,b=await(L.isRTL==null?void 0:L.isRTL(F.floating)),E=k||(I||!M?[YX(_)]:fj(_)),m=D!=="none";if(!k&&m)E.push(...mj(_,M,D,b));let R=[_,...E],S=await Cz(X,h),p=[],d=((W=U.flip)==null?void 0:W.overflows)||[];if(N)p.push(S[v]);if(V){let Q0=gj(K,q,b);p.push(S[Q0[0]],S[Q0[1]])}if(d=[...d,{placement:K,overflows:p}],!p.every((Q0)=>Q0<=0)){var w0,t;let Q0=(((w0=U.flip)==null?void 0:w0.index)||0)+1,r=R[Q0];if(r){if(!(V==="alignment"?x!==E2(r):!1)||d.every((g)=>E2(g.placement)===x?g.overflows[0]>0:!0))return{data:{index:Q0,overflows:d},reset:{placement:r}}}let e=(t=d.filter((o)=>o.overflows[0]<=0).sort((o,g)=>o.overflows[1]-g.overflows[1])[0])==null?void 0:t.placement;if(!e)switch(A){case"bestFit":{var u;let o=(u=d.filter((g)=>{if(m){let X0=E2(g.placement);return X0===x||X0==="y"}return!0}).map((g)=>[g.placement,g.overflows.filter((X0)=>X0>0).reduce((X0,P)=>X0+P,0)]).sort((g,X0)=>g[1]-X0[1])[0])==null?void 0:u[0];if(o)e=o;break}case"initialPlacement":e=_;break}if(K!==e)return{reset:{placement:e}}}return{}}}};function kM(J,X){return{top:J.top-X.height,right:J.right-X.width,bottom:J.bottom-X.height,left:J.left-X.width}}function AM(J){return Rj.some((X)=>J[X]>=0)}var OM=function(J){if(J===void 0)J={};return{name:"hide",options:J,async fn(X){let{rects:Y}=X,{strategy:W="referenceHidden",...K}=e5(J,X);switch(W){case"referenceHidden":{let U=await Cz(X,{...K,elementContext:"reference"}),q=kM(U,Y.reference);return{data:{referenceHiddenOffsets:q,referenceHidden:AM(q)}}}case"escaped":{let U=await Cz(X,{...K,altBoundary:!0}),q=kM(U,Y.floating);return{data:{escapedOffsets:q,escaped:AM(q)}}}default:return{}}}}};var DM=new Set(["left","top"]);async function Nb(J,X){let{placement:Y,platform:W,elements:K}=J,U=await(W.isRTL==null?void 0:W.isRTL(K.floating)),q=nw(Y),_=w8(Y),L=E2(Y)==="y",F=DM.has(q)?-1:1,N=U&&L?-1:1,V=e5(X,J),{mainAxis:k,crossAxis:A,alignmentAxis:D}=typeof V==="number"?{mainAxis:V,crossAxis:0,alignmentAxis:null}:{mainAxis:V.mainAxis||0,crossAxis:V.crossAxis||0,alignmentAxis:V.alignmentAxis};if(_&&typeof D==="number")A=_==="end"?D*-1:D;return L?{x:A*N,y:k*F}:{x:k*F,y:A*N}}var TM=function(J){if(J===void 0)J=0;return{name:"offset",options:J,async fn(X){var Y,W;let{x:K,y:U,placement:q,middlewareData:_}=X,L=await Nb(X,J);if(q===((Y=_.offset)==null?void 0:Y.placement)&&(W=_.arrow)!=null&&W.alignmentOffset)return{};return{x:K+L.x,y:U+L.y,data:{...L,placement:q}}}}},xM=function(J){if(J===void 0)J={};return{name:"shift",options:J,async fn(X){let{x:Y,y:W,placement:K}=X,{mainAxis:U=!0,crossAxis:q=!1,limiter:_={fn:(h)=>{let{x:v,y:x}=h;return{x:v,y:x}}},...L}=e5(J,X),F={x:Y,y:W},N=await Cz(X,L),V=E2(nw(K)),k=oY(V),A=F[k],D=F[V];if(U){let h=k==="y"?"top":"left",v=k==="y"?"bottom":"right",x=A+N[h],I=A-N[v];A=GX(x,A,I)}if(q){let h=V==="y"?"top":"left",v=V==="y"?"bottom":"right",x=D+N[h],I=D-N[v];D=GX(x,D,I)}let M=_.fn({...X,[k]:A,[V]:D});return{...M,data:{x:M.x-Y,y:M.y-W,enabled:{[k]:U,[V]:q}}}}}},vM=function(J){if(J===void 0)J={};return{options:J,fn(X){let{x:Y,y:W,placement:K,rects:U,middlewareData:q}=X,{offset:_=0,mainAxis:L=!0,crossAxis:F=!0}=e5(J,X),N={x:Y,y:W},V=E2(K),k=oY(V),A=N[k],D=N[V],M=e5(_,X),h=typeof M==="number"?{mainAxis:M,crossAxis:0}:{mainAxis:0,crossAxis:0,...M};if(L){let I=k==="y"?"height":"width",b=U.reference[k]-U.floating[I]+h.mainAxis,E=U.reference[k]+U.reference[I]-h.mainAxis;if(A<b)A=b;else if(A>E)A=E}if(F){var v,x;let I=k==="y"?"width":"height",b=DM.has(nw(K)),E=U.reference[V]-U.floating[I]+(b?((v=q.offset)==null?void 0:v[V])||0:0)+(b?0:h.crossAxis),m=U.reference[V]+U.reference[I]+(b?0:((x=q.offset)==null?void 0:x[V])||0)-(b?h.crossAxis:0);if(D<E)D=E;else if(D>m)D=m}return{[k]:A,[V]:D}}}},hM=function(J){if(J===void 0)J={};return{name:"size",options:J,async fn(X){var Y,W;let{placement:K,rects:U,platform:q,elements:_}=X,{apply:L=()=>{},...F}=e5(J,X),N=await Cz(X,F),V=nw(K),k=w8(K),A=E2(K)==="y",{width:D,height:M}=U.floating,h,v;if(V==="top"||V==="bottom")h=V,v=k===(await(q.isRTL==null?void 0:q.isRTL(_.floating))?"start":"end")?"left":"right";else v=V,h=k==="end"?"top":"bottom";let x=M-N.top-N.bottom,I=D-N.left-N.right,b=P4(M-N[h],x),E=P4(D-N[v],I),m=!X.middlewareData.shift,R=b,S=E;if((Y=X.middlewareData.shift)!=null&&Y.enabled.x)S=I;if((W=X.middlewareData.shift)!=null&&W.enabled.y)R=x;if(m&&!k){let d=F2(N.left,0),w0=F2(N.right,0),t=F2(N.top,0),u=F2(N.bottom,0);if(A)S=D-2*(d!==0||w0!==0?d+w0:F2(N.left,N.right));else R=M-2*(t!==0||u!==0?t+u:F2(N.top,N.bottom))}await L({...X,availableWidth:S,availableHeight:R});let p=await q.getDimensions(_.floating);if(D!==p.width||M!==p.height)return{reset:{rects:!0}};return{}}}};function bM(J){let X=uw(J),Y=parseFloat(X.width)||0,W=parseFloat(X.height)||0,K=O1(J),U=K?J.offsetWidth:Y,q=K?J.offsetHeight:W,_=I4(Y)!==U||I4(W)!==q;if(_)Y=U,W=q;return{width:Y,height:W,$:_}}function E_(J){return!L1(J)?J.contextElement:J}function yz(J){let X=E_(J);if(!O1(X))return t5(1);let Y=X.getBoundingClientRect(),{width:W,height:K,$:U}=bM(X),q=(U?I4(Y.width):Y.width)/W,_=(U?I4(Y.height):Y.height)/K;if(!q||!Number.isFinite(q))q=1;if(!_||!Number.isFinite(_))_=1;return{x:q,y:_}}var kb=t5(0);function SM(J){let X=u1(J);if(!jz()||!X.visualViewport)return kb;return{x:X.visualViewport.offsetLeft,y:X.visualViewport.offsetTop}}function Ab(J,X,Y){if(X===void 0)X=!1;if(!Y||X&&Y!==u1(J))return!1;return X}function a7(J,X,Y,W){if(X===void 0)X=!1;if(Y===void 0)Y=!1;let K=J.getBoundingClientRect(),U=E_(J),q=t5(1);if(X)if(W){if(L1(W))q=yz(W)}else q=yz(J);let _=Ab(U,Y,W)?SM(U):t5(0),L=(K.left+_.x)/q.x,F=(K.top+_.y)/q.y,N=K.width/q.x,V=K.height/q.y;if(U){let k=u1(U),A=W&&L1(W)?u1(W):W,D=k,M=fY(D);while(M&&W&&A!==D){let h=yz(M),v=M.getBoundingClientRect(),x=uw(M),I=v.left+(M.clientLeft+parseFloat(x.paddingLeft))*h.x,b=v.top+(M.clientTop+parseFloat(x.paddingTop))*h.y;L*=h.x,F*=h.y,N*=h.x,V*=h.y,L+=I,F+=b,D=u1(M),M=fY(D)}}return f7({width:N,height:V,x:L,y:F})}function _G(J,X){let Y=zX(J).scrollLeft;if(!X)return a7(n5(J)).left+Y;return X.left+Y}function CM(J,X){let Y=J.getBoundingClientRect(),W=Y.left+X.scrollLeft-_G(J,Y),K=Y.top+X.scrollTop;return{x:W,y:K}}function jb(J){let{elements:X,rect:Y,offsetParent:W,strategy:K}=J,U=K==="fixed",q=n5(W),_=X?wX(X.floating):!1;if(W===q||_&&U)return Y;let L={scrollLeft:0,scrollTop:0},F=t5(1),N=t5(0),V=O1(W);if(V||!V&&!U){if(o5(W)!=="body"||T6(q))L=zX(W);if(O1(W)){let A=a7(W);F=yz(W),N.x=A.x+W.clientLeft,N.y=A.y+W.clientTop}}let k=q&&!V&&!U?CM(q,L):t5(0);return{width:Y.width*F.x,height:Y.height*F.y,x:Y.x*F.x-L.scrollLeft*F.x+N.x+k.x,y:Y.y*F.y-L.scrollTop*F.y+N.y+k.y}}function Mb(J){return Array.from(J.getClientRects())}function Ob(J){let X=n5(J),Y=zX(J),W=J.ownerDocument.body,K=F2(X.scrollWidth,X.clientWidth,W.scrollWidth,W.clientWidth),U=F2(X.scrollHeight,X.clientHeight,W.scrollHeight,W.clientHeight),q=-Y.scrollLeft+_G(J),_=-Y.scrollTop;if(uw(W).direction==="rtl")q+=F2(X.clientWidth,W.clientWidth)-K;return{width:K,height:U,x:q,y:_}}var EM=25;function Db(J,X){let Y=u1(J),W=n5(J),K=Y.visualViewport,U=W.clientWidth,q=W.clientHeight,_=0,L=0;if(K){U=K.width,q=K.height;let N=jz();if(!N||N&&X==="fixed")_=K.offsetLeft,L=K.offsetTop}let F=_G(W);if(F<=0){let N=W.ownerDocument,V=N.body,k=getComputedStyle(V),A=N.compatMode==="CSS1Compat"?parseFloat(k.marginLeft)+parseFloat(k.marginRight)||0:0,D=Math.abs(W.clientWidth-V.clientWidth-A);if(D<=EM)U-=D}else if(F<=EM)U+=F;return{width:U,height:q,x:_,y:L}}var Tb=new Set(["absolute","fixed"]);function xb(J,X){let Y=a7(J,!0,X==="fixed"),W=Y.top+J.clientTop,K=Y.left+J.clientLeft,U=O1(J)?yz(J):t5(1),q=J.clientWidth*U.x,_=J.clientHeight*U.y,L=K*U.x,F=W*U.y;return{width:q,height:_,x:L,y:F}}function PM(J,X,Y){let W;if(X==="viewport")W=Db(J,Y);else if(X==="document")W=Ob(n5(J));else if(L1(X))W=xb(X,Y);else{let K=SM(J);W={x:X.x-K.x,y:X.y-K.y,width:X.width,height:X.height}}return f7(W)}function yM(J,X){let Y=e2(J);if(Y===X||!L1(Y)||z5(Y))return!1;return uw(Y).position==="fixed"||yM(Y,X)}function vb(J,X){let Y=X.get(J);if(Y)return Y;let W=w5(J,[],!1).filter((_)=>L1(_)&&o5(_)!=="body"),K=null,U=uw(J).position==="fixed",q=U?e2(J):J;while(L1(q)&&!z5(q)){let _=uw(q),L=gY(q);if(!L&&_.position==="fixed")K=null;if(U?!L&&!K:!L&&_.position==="static"&&!!K&&Tb.has(K.position)||T6(q)&&!L&&yM(J,q))W=W.filter((N)=>N!==q);else K=_;q=e2(q)}return X.set(J,W),W}function hb(J){let{element:X,boundary:Y,rootBoundary:W,strategy:K}=J,q=[...Y==="clippingAncestors"?wX(X)?[]:vb(X,this._c):[].concat(Y),W],_=q[0],L=q.reduce((F,N)=>{let V=PM(X,N,K);return F.top=F2(V.top,F.top),F.right=P4(V.right,F.right),F.bottom=P4(V.bottom,F.bottom),F.left=F2(V.left,F.left),F},PM(X,_,K));return{width:L.right-L.left,height:L.bottom-L.top,x:L.left,y:L.top}}function Eb(J){let{width:X,height:Y}=bM(J);return{width:X,height:Y}}function Pb(J,X,Y){let W=O1(X),K=n5(X),U=Y==="fixed",q=a7(J,!0,U,X),_={scrollLeft:0,scrollTop:0},L=t5(0);function F(){L.x=_G(K)}if(W||!W&&!U){if(o5(X)!=="body"||T6(K))_=zX(X);if(W){let A=a7(X,!0,U,X);L.x=A.x+X.clientLeft,L.y=A.y+X.clientTop}else if(K)F()}if(U&&!W&&K)F();let N=K&&!W&&!U?CM(K,_):t5(0),V=q.left+_.scrollLeft-L.x-N.x,k=q.top+_.scrollTop-L.y-N.y;return{x:V,y:k,width:q.width,height:q.height}}function h_(J){return uw(J).position==="static"}function IM(J,X){if(!O1(J)||uw(J).position==="fixed")return null;if(X)return X(J);let Y=J.offsetParent;if(n5(J)===Y)Y=Y.ownerDocument.body;return Y}function RM(J,X){let Y=u1(J);if(wX(J))return Y;if(!O1(J)){let K=e2(J);while(K&&!z5(K)){if(L1(K)&&!h_(K))return K;K=e2(K)}return Y}let W=IM(J,X);while(W&&Mj(W)&&h_(W))W=IM(W,X);if(W&&z5(W)&&h_(W)&&!gY(W))return Y;return W||Oj(J)||Y}var Ib=async function(J){let X=this.getOffsetParent||RM,Y=this.getDimensions,W=await Y(J.floating);return{reference:Pb(J.reference,await X(J.floating),J.strategy),floating:{x:0,y:0,width:W.width,height:W.height}}};function bb(J){return uw(J).direction==="rtl"}var P_={convertOffsetParentRelativeRectToViewportRelativeRect:jb,getDocumentElement:n5,getClippingRect:hb,getOffsetParent:RM,getElementRects:Ib,getClientRects:Mb,getDimensions:Eb,getScale:yz,isElement:L1,isRTL:bb};function gM(J,X){return J.x===X.x&&J.y===X.y&&J.width===X.width&&J.height===X.height}function Sb(J,X){let Y=null,W,K=n5(J);function U(){var _;clearTimeout(W),(_=Y)==null||_.disconnect(),Y=null}function q(_,L){if(_===void 0)_=!1;if(L===void 0)L=1;U();let F=J.getBoundingClientRect(),{left:N,top:V,width:k,height:A}=F;if(!_)X();if(!k||!A)return;let D=b4(V),M=b4(K.clientWidth-(N+k)),h=b4(K.clientHeight-(V+A)),v=b4(N),I={rootMargin:-D+"px "+-M+"px "+-h+"px "+-v+"px",threshold:F2(0,P4(1,L))||1},b=!0;function E(m){let R=m[0].intersectionRatio;if(R!==L){if(!b)return q();if(!R)W=setTimeout(()=>{q(!1,0.0000001)},1000);else q(!1,R)}if(R===1&&!gM(F,J.getBoundingClientRect()))q();b=!1}try{Y=new IntersectionObserver(E,{...I,root:K.ownerDocument})}catch(m){Y=new IntersectionObserver(E,I)}Y.observe(J)}return q(!0),U}function kX(J,X,Y,W){if(W===void 0)W={};let{ancestorScroll:K=!0,ancestorResize:U=!0,elementResize:q=typeof ResizeObserver==="function",layoutShift:_=typeof IntersectionObserver==="function",animationFrame:L=!1}=W,F=E_(J),N=K||U?[...F?w5(F):[],...w5(X)]:[];N.forEach((v)=>{K&&v.addEventListener("scroll",Y,{passive:!0}),U&&v.addEventListener("resize",Y)});let V=F&&_?Sb(F,Y):null,k=-1,A=null;if(q){if(A=new ResizeObserver((v)=>{let[x]=v;if(x&&x.target===F&&A)A.unobserve(X),cancelAnimationFrame(k),k=requestAnimationFrame(()=>{var I;(I=A)==null||I.observe(X)});Y()}),F&&!L)A.observe(F);A.observe(X)}let D,M=L?a7(J):null;if(L)h();function h(){let v=a7(J);if(M&&!gM(M,v))Y();M=v,D=requestAnimationFrame(h)}return Y(),()=>{var v;if(N.forEach((x)=>{K&&x.removeEventListener("scroll",Y),U&&x.removeEventListener("resize",Y)}),V==null||V(),(v=A)==null||v.disconnect(),A=null,L)cancelAnimationFrame(D)}}var fM=TM;var mM=xM,dM=MM,uM=hM,pM=OM;var cM=vM,qG=(J,X,Y)=>{let W=new Map,K={platform:P_,...Y},U={...K.platform,_c:W};return jM(J,X,{...K,platform:U})};var Tw=c(G0(),1),iM=c(G0(),1),rM=c(m8(),1),yb=typeof document<"u",Rb=function(){},BG=yb?iM.useLayoutEffect:Rb;function LG(J,X){if(J===X)return!0;if(typeof J!==typeof X)return!1;if(typeof J==="function"&&J.toString()===X.toString())return!0;let Y,W,K;if(J&&X&&typeof J==="object"){if(Array.isArray(J)){if(Y=J.length,Y!==X.length)return!1;for(W=Y;W--!==0;)if(!LG(J[W],X[W]))return!1;return!0}if(K=Object.keys(J),Y=K.length,Y!==Object.keys(X).length)return!1;for(W=Y;W--!==0;)if(!{}.hasOwnProperty.call(X,K[W]))return!1;for(W=Y;W--!==0;){let U=K[W];if(U==="_owner"&&J.$$typeof)continue;if(!LG(J[U],X[U]))return!1}return!0}return J!==J&&X!==X}function aM(J){if(typeof window>"u")return 1;return(J.ownerDocument.defaultView||window).devicePixelRatio||1}function lM(J,X){let Y=aM(J);return Math.round(X*Y)/Y}function I_(J){let X=Tw.useRef(J);return BG(()=>{X.current=J}),X}function sM(J){if(J===void 0)J={};let{placement:X="bottom",strategy:Y="absolute",middleware:W=[],platform:K,elements:{reference:U,floating:q}={},transform:_=!0,whileElementsMounted:L,open:F}=J,[N,V]=Tw.useState({x:0,y:0,strategy:Y,placement:X,middlewareData:{},isPositioned:!1}),[k,A]=Tw.useState(W);if(!LG(k,W))A(W);let[D,M]=Tw.useState(null),[h,v]=Tw.useState(null),x=Tw.useCallback((g)=>{if(g!==m.current)m.current=g,M(g)},[]),I=Tw.useCallback((g)=>{if(g!==R.current)R.current=g,v(g)},[]),b=U||D,E=q||h,m=Tw.useRef(null),R=Tw.useRef(null),S=Tw.useRef(N),p=L!=null,d=I_(L),w0=I_(K),t=I_(F),u=Tw.useCallback(()=>{if(!m.current||!R.current)return;let g={placement:X,strategy:Y,middleware:k};if(w0.current)g.platform=w0.current;qG(m.current,R.current,g).then((X0)=>{let P={...X0,isPositioned:t.current!==!1};if(Q0.current&&!LG(S.current,P))S.current=P,rM.flushSync(()=>{V(P)})})},[k,X,Y,w0,t]);BG(()=>{if(F===!1&&S.current.isPositioned)S.current.isPositioned=!1,V((g)=>({...g,isPositioned:!1}))},[F]);let Q0=Tw.useRef(!1);BG(()=>{return Q0.current=!0,()=>{Q0.current=!1}},[]),BG(()=>{if(b)m.current=b;if(E)R.current=E;if(b&&E){if(d.current)return d.current(b,E,u);u()}},[b,E,u,d,p]);let r=Tw.useMemo(()=>({reference:m,floating:R,setReference:x,setFloating:I}),[x,I]),e=Tw.useMemo(()=>({reference:b,floating:E}),[b,E]),o=Tw.useMemo(()=>{let g={position:Y,left:0,top:0};if(!e.floating)return g;let X0=lM(e.floating,N.x),P=lM(e.floating,N.y);if(_)return{...g,transform:"translate("+X0+"px, "+P+"px)",...aM(e.floating)>=1.5&&{willChange:"transform"}};return{position:Y,left:X0,top:P}},[Y,_,e.floating,N.x,N.y]);return Tw.useMemo(()=>({...N,update:u,refs:r,elements:e,floatingStyles:o}),[N,u,r,e,o])}var b_=(J,X)=>({...fM(J),options:[J,X]}),S_=(J,X)=>({...mM(J),options:[J,X]}),C_=(J,X)=>({...cM(J),options:[J,X]}),y_=(J,X)=>({...dM(J),options:[J,X]}),R_=(J,X)=>({...uM(J),options:[J,X]});var g_=(J,X)=>({...pM(J),options:[J,X]});var gb={intentional:"onClick",sloppy:"onPointerDown"};function fb(J){return{escapeKey:typeof J==="boolean"?J:J?.escapeKey??!1,outsidePress:typeof J==="boolean"?J:J?.outsidePress??!0}}function s7(J,X={}){let Y="rootStore"in J?J.rootStore:J,W=Y.useState("open"),K=Y.useState("floatingElement"),U=Y.useState("referenceElement"),q=Y.useState("domReferenceElement"),{onOpenChange:_,dataRef:L}=Y.context,{enabled:F=!0,escapeKey:N=!0,outsidePress:V=!0,outsidePressEvent:k="sloppy",referencePress:A=!1,referencePressEvent:D="sloppy",ancestorScroll:M=!1,bubbles:h,externalTree:v}=X,x=$2(v),I=F0(typeof V==="function"?V:()=>!1),b=typeof V==="function"?I:V,E=b5.useRef(!1),{escapeKey:m,outsidePress:R}=fb(h),S=b5.useRef(null),p=a1(),d=a1(),w0=F0(()=>{d.clear(),L.current.insideReactTree=!1}),t=b5.useRef(!1),u=b5.useRef(""),Q0=F0((n)=>{u.current=n.pointerType}),r=F0(()=>{let n=u.current,R0=n==="pen"||!n?"mouse":n,I0=typeof k==="function"?k():k;if(typeof I0==="string")return I0;return I0[R0]}),e=F0((n)=>{if(!W||!F||!N||n.key!=="Escape")return;if(t.current)return;let R0=L.current.floatingContext?.nodeId,I0=x?c8(x.nodesRef.current,R0):[];if(!m){if(I0.length>0){let _0=!0;if(I0.forEach((O0)=>{if(O0.context?.open&&!O0.context.dataRef.current.__escapeKeyBubbles)_0=!1}),!_0)return}}let j1=Sj(n)?n.nativeEvent:n,b0=P0(B0.escapeKey,j1);if(Y.setOpen(!1,b0),!m&&!b0.isPropagationAllowed)n.stopPropagation()}),o=F0((n)=>{let R0=r();return R0==="intentional"&&n.type!=="click"||R0==="sloppy"&&n.type==="click"}),g=F0(()=>{L.current.insideReactTree=!0,d.start(0,w0)}),X0=F0((n,R0=!1)=>{if(o(n)){w0();return}if(L.current.insideReactTree){w0();return}if(r()==="intentional"&&R0)return;if(typeof b==="function"&&!b(n))return;let I0=f1(n),j1=`[${J5("inert")}]`,b0=C1(Y.select("floatingElement")).querySelectorAll(j1),_0=Y.context.triggerElements;if(I0&&(_0.hasElement(I0)||_0.hasMatchingElement((E0)=>t0(E0,I0))))return;let O0=L1(I0)?I0:null;while(O0&&!z5(O0)){let E0=e2(O0);if(z5(E0)||!L1(E0))break;O0=E0}if(b0.length&&L1(I0)&&!Ij(I0)&&!t0(I0,Y.select("floatingElement"))&&Array.from(b0).every((E0)=>!t0(O0,E0)))return;if(O1(I0)&&!("touches"in n)){let E0=z5(I0),o0=uw(I0),x0=/auto|scroll/,l0=E0||x0.test(o0.overflowX),y0=E0||x0.test(o0.overflowY),q1=l0&&I0.clientWidth>0&&I0.scrollWidth>I0.clientWidth,D1=y0&&I0.clientHeight>0&&I0.scrollHeight>I0.clientHeight,W1=o0.direction==="rtl",Gw=D1&&(W1?n.offsetX<=I0.offsetWidth-I0.clientWidth:n.offsetX>I0.clientWidth),zw=q1&&n.offsetY>I0.clientHeight;if(Gw||zw)return}let A0=L.current.floatingContext?.nodeId,c0=x&&c8(x.nodesRef.current,A0).some((E0)=>h5(n,E0.context?.elements.floating));if(h5(n,Y.select("floatingElement"))||h5(n,Y.select("domReferenceElement"))||c0)return;let C0=x?c8(x.nodesRef.current,A0):[];if(C0.length>0){let E0=!0;if(C0.forEach((o0)=>{if(o0.context?.open&&!o0.context.dataRef.current.__outsidePressBubbles)E0=!1}),!E0)return}Y.setOpen(!1,P0(B0.outsidePress,n)),w0()}),P=F0((n)=>{if(r()!=="sloppy"||n.pointerType==="touch"||!Y.select("open")||!F||h5(n,Y.select("floatingElement"))||h5(n,Y.select("domReferenceElement")))return;X0(n)}),z0=F0((n)=>{if(r()!=="sloppy"||!Y.select("open")||!F||h5(n,Y.select("floatingElement"))||h5(n,Y.select("domReferenceElement")))return;let R0=n.touches[0];if(R0)S.current={startTime:Date.now(),startX:R0.clientX,startY:R0.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},p.start(1000,()=>{if(S.current)S.current.dismissOnTouchEnd=!1,S.current.dismissOnMouseDown=!1})}),U0=F0((n)=>{let R0=f1(n);function I0(){z0(n),R0?.removeEventListener(n.type,I0)}R0?.addEventListener(n.type,I0)}),J0=F0((n)=>{let R0=E.current;if(E.current=!1,p.clear(),n.type==="mousedown"&&S.current&&!S.current.dismissOnMouseDown)return;let I0=f1(n);function j1(){if(n.type==="pointerdown")P(n);else X0(n,R0);I0?.removeEventListener(n.type,j1)}I0?.addEventListener(n.type,j1)}),L0=F0((n)=>{if(r()!=="sloppy"||!S.current||h5(n,Y.select("floatingElement"))||h5(n,Y.select("domReferenceElement")))return;let R0=n.touches[0];if(!R0)return;let I0=Math.abs(R0.clientX-S.current.startX),j1=Math.abs(R0.clientY-S.current.startY),b0=Math.sqrt(I0*I0+j1*j1);if(b0>5)S.current.dismissOnTouchEnd=!0;if(b0>10)X0(n),p.clear(),S.current=null}),S0=F0((n)=>{let R0=f1(n);function I0(){L0(n),R0?.removeEventListener(n.type,I0)}R0?.addEventListener(n.type,I0)}),V0=F0((n)=>{if(r()!=="sloppy"||!S.current||h5(n,Y.select("floatingElement"))||h5(n,Y.select("domReferenceElement")))return;if(S.current.dismissOnTouchEnd)X0(n);p.clear(),S.current=null}),H0=F0((n)=>{let R0=f1(n);function I0(){V0(n),R0?.removeEventListener(n.type,I0)}R0?.addEventListener(n.type,I0)});b5.useEffect(()=>{if(!W||!F)return;L.current.__escapeKeyBubbles=m,L.current.__outsidePressBubbles=R;let n=new I5;function R0(O0){Y.setOpen(!1,P0(B0.none,O0))}function I0(){n.clear(),t.current=!0}function j1(){n.start(jz()?5:0,()=>{t.current=!1})}let b0=C1(K);if(b0.addEventListener("pointerdown",Q0,!0),N)b0.addEventListener("keydown",e),b0.addEventListener("compositionstart",I0),b0.addEventListener("compositionend",j1);if(b)b0.addEventListener("click",J0,!0),b0.addEventListener("pointerdown",J0,!0),b0.addEventListener("touchstart",U0,!0),b0.addEventListener("touchmove",S0,!0),b0.addEventListener("touchend",H0,!0),b0.addEventListener("mousedown",J0,!0);let _0=[];if(M){if(L1(q))_0=w5(q);if(L1(K))_0=_0.concat(w5(K));if(!L1(U)&&U&&U.contextElement)_0=_0.concat(w5(U.contextElement))}return _0=_0.filter((O0)=>O0!==b0.defaultView?.visualViewport),_0.forEach((O0)=>{O0.addEventListener("scroll",R0,{passive:!0})}),()=>{if(b0.removeEventListener("pointerdown",Q0,!0),N)b0.removeEventListener("keydown",e),b0.removeEventListener("compositionstart",I0),b0.removeEventListener("compositionend",j1);if(b)b0.removeEventListener("click",J0,!0),b0.removeEventListener("pointerdown",J0,!0),b0.removeEventListener("touchstart",U0,!0),b0.removeEventListener("touchmove",S0,!0),b0.removeEventListener("touchend",H0,!0),b0.removeEventListener("mousedown",J0,!0);_0.forEach((O0)=>{O0.removeEventListener("scroll",R0)}),n.clear()}},[L,K,U,q,N,b,W,_,M,F,m,R,e,X0,J0,P,U0,S0,H0,Q0,Y]),b5.useEffect(w0,[b,w0]);let j0=b5.useMemo(()=>({onKeyDown:e,...A&&{[gb[D]]:(n)=>{Y.setOpen(!1,P0(B0.triggerPress,n.nativeEvent))},...D!=="intentional"&&{onClick(n){Y.setOpen(!1,P0(B0.triggerPress,n.nativeEvent))}}}}),[e,Y,A,D]),r0=F0((n)=>{let R0=f1(n.nativeEvent);if(!t0(Y.select("floatingElement"),R0)||n.button!==0)return;E.current=!0}),n0=b5.useMemo(()=>({onKeyDown:e,onPointerDown:r0,onMouseDown:r0,onMouseUp:r0,onClickCapture:g,onMouseDownCapture:g,onPointerDownCapture:g,onMouseUpCapture:g,onTouchEndCapture:g,onTouchMoveCapture:g}),[e,r0,g]);return b5.useMemo(()=>F?{reference:j0,floating:n0,trigger:j0}:{},[F,j0,n0])}var k2=c(G0(),1);var mb=(J,X,Y)=>{if(X.length===1&&X[0]===Y){let W=!1;try{let K={};if(J(K)===K)W=!0}catch{}if(W){let K=void 0;try{throw Error()}catch(U){({stack:K}=U)}console.warn(`The result function returned its own inputs without modification. e.g
246
246
  \`createSelector([state => state.todos], todos => todos)\`
247
247
  This could lead to inefficient memoization and unnecessary re-renders.
248
- Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:K})}}},fb=(J,X,Y)=>{let{memoize:W,memoizeOptions:K}=X,{inputSelectorResults:U,inputSelectorResultsCopy:q}=J,_=W(()=>({}),...K);if(_.apply(null,U)!==_.apply(null,q)){let F=void 0;try{throw Error()}catch(N){({stack:F}=N)}console.warn(`An input selector returned a different result when passed same arguments.
248
+ Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:K})}}},db=(J,X,Y)=>{let{memoize:W,memoizeOptions:K}=X,{inputSelectorResults:U,inputSelectorResultsCopy:q}=J,_=W(()=>({}),...K);if(_.apply(null,U)!==_.apply(null,q)){let F=void 0;try{throw Error()}catch(N){({stack:F}=N)}console.warn(`An input selector returned a different result when passed same arguments.
249
249
  This means your output selector will likely run more frequently than intended.
250
250
  Avoid returning a new reference inside your input selector, e.g.
251
- \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:Y,firstInputs:U,secondInputs:q,stack:F})}},mb={inputStabilityCheck:"once",identityFunctionCheck:"once"};var FG=Symbol("NOT_FOUND");function db(J,X=`expected a function, instead received ${typeof J}`){if(typeof J!=="function")throw TypeError(X)}function ub(J,X=`expected an object, instead received ${typeof J}`){if(typeof J!=="object")throw TypeError(X)}function pb(J,X="expected all items to be functions, instead received the following types: "){if(!J.every((Y)=>typeof Y==="function")){let Y=J.map((W)=>typeof W==="function"?`function ${W.name||"unnamed"}()`:typeof W).join(", ");throw TypeError(`${X}[${Y}]`)}}var oM=(J)=>{return Array.isArray(J)?J:[J]};function cb(J){let X=Array.isArray(J[0])?J[0]:J;return pb(X,"createSelector expects all input-selectors to be functions, but received the following types: "),X}function nM(J,X){let Y=[],{length:W}=J;for(let K=0;K<W;K++)Y.push(J[K].apply(null,X));return Y}var lb=(J,X)=>{let{identityFunctionCheck:Y,inputStabilityCheck:W}={...mb,...X};return{identityFunctionCheck:{shouldRun:Y==="always"||Y==="once"&&J,run:gb},inputStabilityCheck:{shouldRun:W==="always"||W==="once"&&J,run:fb}}},tM=0,ib=null,wO=class{revision=tM;_value;_lastValue;_isEqual=f_;constructor(J,X=f_){this._value=this._lastValue=J,this._isEqual=X}get value(){return ib?.add(this),this._value}set value(J){if(this.value===J)return;this._value=J,this.revision=++tM}};function f_(J,X){return J===X}function m_(J){if(!(J instanceof wO))console.warn("Not a valid cell! ",J);return J.value}function rb(J,X=f_){return new wO(J,X)}var ab=(J,X)=>!1;function NG(){return rb(null,ab)}var zO=(J)=>{let X=J.collectionTag;if(X===null)X=J.collectionTag=NG();m_(X)};var uu=Symbol(),ZO=0,sb=Object.getPrototypeOf({}),ob=class{constructor(J){this.value=J,this.value=J,this.tag.value=J}proxy=new Proxy(this,AX);tag=NG();tags={};children={};collectionTag=null;id=ZO++},AX={get(J,X){function Y(){let{value:K}=J,U=Reflect.get(K,X);if(typeof X==="symbol")return U;if(X in sb)return U;if(typeof U==="object"&&U!==null){let q=J.children[X];if(q===void 0)q=J.children[X]=eb(U);if(q.tag)m_(q.tag);return q.proxy}else{let q=J.tags[X];if(q===void 0)q=J.tags[X]=NG(),q.value=U;return m_(q),U}}return Y()},ownKeys(J){return zO(J),Reflect.ownKeys(J.value)},getOwnPropertyDescriptor(J,X){return Reflect.getOwnPropertyDescriptor(J.value,X)},has(J,X){return Reflect.has(J.value,X)}},nb=class{constructor(J){this.value=J,this.value=J,this.tag.value=J}proxy=new Proxy([this],tb);tag=NG();tags={};children={};collectionTag=null;id=ZO++},tb={get([J],X){if(X==="length")zO(J);return AX.get(J,X)},ownKeys([J]){return AX.ownKeys(J)},getOwnPropertyDescriptor([J],X){return AX.getOwnPropertyDescriptor(J,X)},has([J],X){return AX.has(J,X)}};function eb(J){if(Array.isArray(J))return new nb(J);return new ob(J)}function wS(J){let X;return{get(Y){if(X&&J(X.key,Y))return X.value;return FG},put(Y,W){X={key:Y,value:W}},getEntries(){return X?[X]:[]},clear(){X=void 0}}}function zS(J,X){let Y=[];function W(_){let L=Y.findIndex((F)=>X(_,F.key));if(L>-1){let F=Y[L];if(L>0)Y.splice(L,1),Y.unshift(F);return F.value}return FG}function K(_,L){if(W(_)===FG){if(Y.unshift({key:_,value:L}),Y.length>J)Y.pop()}}function U(){return Y}function q(){Y=[]}return{get:W,put:K,getEntries:U,clear:q}}var ZS=(J,X)=>J===X;function JS(J){return function(Y,W){if(Y===null||W===null||Y.length!==W.length)return!1;let{length:K}=Y;for(let U=0;U<K;U++)if(!J(Y[U],W[U]))return!1;return!0}}function JO(J,X){let Y=typeof X==="object"?X:{equalityCheck:X},{equalityCheck:W=ZS,maxSize:K=1,resultEqualityCheck:U}=Y,q=JS(W),_=0,L=K<=1?wS(q):zS(K,q);function F(){let N=L.get(arguments);if(N===FG){if(N=J.apply(null,arguments),_++,U){let k=L.getEntries().find((A)=>U(A.value,N));if(k)N=k.value,_!==0&&_--}L.put(arguments,N)}return N}return F.clearCache=()=>{L.clear(),F.resetResultsCount()},F.resultsCount=()=>_,F.resetResultsCount=()=>{_=0},F}var XS=class{constructor(J){this.value=J}deref(){return this.value}},$S=typeof WeakRef<"u"?WeakRef:XS,YS=0,eM=1;function VG(){return{s:YS,v:void 0,o:null,p:null}}function XO(J,X={}){let Y=VG(),{resultEqualityCheck:W}=X,K,U=0;function q(){let _=Y,{length:L}=arguments;for(let V=0,k=L;V<k;V++){let A=arguments[V];if(typeof A==="function"||typeof A==="object"&&A!==null){let D=_.o;if(D===null)_.o=D=new WeakMap;let M=D.get(A);if(M===void 0)_=VG(),D.set(A,_);else _=M}else{let D=_.p;if(D===null)_.p=D=new Map;let M=D.get(A);if(M===void 0)_=VG(),D.set(A,_);else _=M}}let F=_,N;if(_.s===eM)N=_.v;else if(N=J.apply(null,arguments),U++,W){let V=K?.deref?.()??K;if(V!=null&&W(V,N))N=V,U!==0&&U--;K=typeof N==="object"&&N!==null||typeof N==="function"?new $S(N):N}return F.s=eM,F.v=N,N}return q.clearCache=()=>{Y=VG(),q.resetResultsCount()},q.resultsCount=()=>U,q.resetResultsCount=()=>{U=0},q}function d_(J,...X){let Y=typeof J==="function"?{memoize:J,memoizeOptions:X}:J,W=(...K)=>{let U=0,q=0,_,L={},F=K.pop();if(typeof F==="object")L=F,F=K.pop();db(F,`createSelector expects an output function after the inputs, but received: [${typeof F}]`);let N={...Y,...L},{memoize:V,memoizeOptions:k=[],argsMemoize:A=XO,argsMemoizeOptions:D=[],devModeChecks:M={}}=N,h=oM(k),v=oM(D),x=cb(K),I=V(function(){return U++,F.apply(null,arguments)},...h),b=!0,E=A(function(){q++;let R=nM(x,arguments);_=I.apply(null,R);{let{identityFunctionCheck:S,inputStabilityCheck:p}=lb(b,M);if(S.shouldRun)S.run(F,R,_);if(p.shouldRun){let d=nM(x,arguments);p.run({inputSelectorResults:R,inputSelectorResultsCopy:d},{memoize:V,memoizeOptions:h},arguments)}if(b)b=!1}return _},...v);return Object.assign(E,{resultFunc:F,memoizedResultFunc:I,dependencies:x,dependencyRecomputations:()=>q,resetDependencyRecomputations:()=>{q=0},lastResult:()=>_,recomputations:()=>U,resetRecomputations:()=>{U=0},memoize:V,argsMemoize:A})};return Object.assign(W,{withTypes:()=>W}),W}var GS=d_(XO),QS=Object.assign((J,X=GS)=>{ub(J,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof J}`);let Y=Object.keys(J),W=Y.map((U)=>J[U]);return X(W,(...U)=>{return U.reduce((q,_,L)=>{return q[Y[L]]=_,q},{})})},{withTypes:()=>QS});var su=d_({memoize:JO,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),p0=(J,X,Y,W,K,U,...q)=>{if(q.length>0)throw Error("Unsupported number of selectors");let _;if(J&&X&&Y&&W&&K&&U)_=(L,F,N,V)=>{let k=J(L,F,N,V),A=X(L,F,N,V),D=Y(L,F,N,V),M=W(L,F,N,V),h=K(L,F,N,V);return U(k,A,D,M,h,F,N,V)};else if(J&&X&&Y&&W&&K)_=(L,F,N,V)=>{let k=J(L,F,N,V),A=X(L,F,N,V),D=Y(L,F,N,V),M=W(L,F,N,V);return K(k,A,D,M,F,N,V)};else if(J&&X&&Y&&W)_=(L,F,N,V)=>{let k=J(L,F,N,V),A=X(L,F,N,V),D=Y(L,F,N,V);return W(k,A,D,F,N,V)};else if(J&&X&&Y)_=(L,F,N,V)=>{let k=J(L,F,N,V),A=X(L,F,N,V);return Y(k,A,F,N,V)};else if(J&&X)_=(L,F,N,V)=>{let k=J(L,F,N,V);return X(k,F,N,V)};else if(J)_=J;else throw Error("Missing arguments");return _};var YO=c(G0(),1),GO=c(u_(),1),QO=c($O(),1);var US=Fz(19),HS=US?_S:qS;function WO(J,X,Y,W,K){return HS(J,X,Y,W,K)}function _S(J,X,Y,W,K){let U=YO.useCallback(()=>X(J.getSnapshot(),Y,W,K),[J,X,Y,W,K]);return GO.useSyncExternalStore(J.subscribe,U,U)}function qS(J,X,Y,W,K){return QO.useSyncExternalStoreWithSelector(J.subscribe,J.getSnapshot,J.getSnapshot,(U)=>X(U,Y,W,K))}class Rz{constructor(J){this.state=J,this.listeners=new Set,this.updateTick=0}subscribe=(J)=>{return this.listeners.add(J),()=>{this.listeners.delete(J)}};getSnapshot=()=>{return this.state};setState(J){if(this.state===J)return;this.state=J,this.updateTick+=1;let X=this.updateTick;for(let Y of this.listeners){if(X!==this.updateTick)return;Y(J)}}update(J){for(let X in J)if(!Object.is(this.state[X],J[X])){Rz.prototype.setState.call(this,{...this.state,...J});return}}set(J,X){if(!Object.is(this.state[J],X))Rz.prototype.setState.call(this,{...this.state,[J]:X})}notifyAll(){let J={...this.state};Rz.prototype.setState.call(this,J)}}var E6=c(G0(),1);class P6 extends Rz{constructor(J,X={},Y){super(J);this.context=X,this.selectors=Y}controlledValues=new Map;useSyncedValue(J,X){E6.useDebugValue(J),k0(()=>{if(this.state[J]!==X)this.set(J,X)},[J,X])}useSyncedValueWithCleanup(J,X){k0(()=>{if(this.state[J]!==X)this.set(J,X);return()=>{this.set(J,void 0)}},[J,X])}useSyncedValues(J){{E6.useDebugValue(J,(K)=>Object.keys(K));let Y=E6.useRef(Object.keys(J)).current,W=Object.keys(J);if(Y.length!==W.length||Y.some((K,U)=>K!==W[U]))console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}let X=Object.values(J);k0(()=>{this.update(J)},X)}useControlledProp(J,X,Y){E6.useDebugValue(J);let W=X!==void 0;{let K=this.controlledValues.get(J);if(K!==void 0&&K!==W)console.error(`A component is changing the ${W?"":"un"}controlled state of ${J.toString()} to be ${W?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}if(!this.controlledValues.has(J)){if(this.controlledValues.set(J,W),!W&&!Object.is(this.state[J],Y))super.setState({...this.state,[J]:Y})}k0(()=>{if(W&&!Object.is(this.state[J],X))super.setState({...this.state,[J]:X})},[J,X,Y,W])}set(J,X){if(this.controlledValues.get(J)===!0)return;super.set(J,X)}update(J){let X={...J};for(let Y in X){if(!Object.hasOwn(X,Y))continue;if(this.controlledValues.get(Y)===!0){delete X[Y];continue}}super.update(X)}setState(J){let X={...J};for(let Y in X){if(!Object.hasOwn(X,Y))continue;if(this.controlledValues.get(Y)===!0){delete X[Y];continue}}super.setState({...this.state,...X})}select=(J,X,Y,W)=>{let K=this.selectors[J];return K(this.state,X,Y,W)};useState=(J,X,Y,W)=>{E6.useDebugValue(J);let K=this.selectors[J];return WO(this,K,X,Y,W)};useContextCallback(J,X){E6.useDebugValue(J);let Y=F0(X??vY);this.context[J]=Y}useStateSetter(J){let X=E6.useRef(void 0);if(X.current===void 0)X.current=(Y)=>{this.set(J,Y)};return X.current}observe(J,X){let Y;if(typeof J==="function")Y=J;else Y=this.selectors[J];let W=Y(this.state);return X(W,W,this),this.subscribe((K)=>{let U=Y(K);if(!Object.is(W,U)){let q=W;W=U,X(U,q,this)}})}}var kG=c(G0(),1);function KO(){let[,J]=kG.useState({});return kG.useCallback(()=>{J({})},[])}var BS={open:p0((J)=>J.open),domReferenceElement:p0((J)=>J.domReferenceElement),referenceElement:p0((J)=>J.positionReference??J.referenceElement),floatingElement:p0((J)=>J.floatingElement),floatingId:p0((J)=>J.floatingId)};class o7 extends P6{constructor(J){let{nested:X,noEmit:Y,onOpenChange:W,triggerElements:K,...U}=J;super({...U,positionReference:U.referenceElement,domReferenceElement:U.referenceElement},{onOpenChange:W,dataRef:{current:{}},events:YG(),nested:X,noEmit:Y,triggerElements:K},BS)}setOpen=(J,X)=>{if(!J||!this.state.open||aY(X.event))this.context.dataRef.current.openEvent=J?X.event:void 0;if(!this.context.noEmit){let Y={open:J,reason:X.reason,nativeEvent:X.event,nested:this.context.nested,triggerElement:X.trigger};this.context.events.emit("openchange",Y)}this.context.onOpenChange?.(J,X)}}var AG=c(G0(),1);function p_(J,X){let Y=AG.useRef(null);return AG.useCallback((W)=>{if(J===void 0)return;if(Y.current!==null)X.context.triggerElements.delete(Y.current),Y.current=null;if(W!==null)Y.current=J,X.context.triggerElements.add(J,W)},[X,J])}function gz(J,X,Y,W){let K=Y.useState("isMountedByTrigger",J),U=p_(J,Y),q=F0((_)=>{if(U(_),_!==null&&Y.select("open")&&Y.select("activeTriggerId")==null)Y.update({activeTriggerId:J,activeTriggerElement:_,...W})});return k0(()=>{if(K)Y.update({activeTriggerElement:X.current,...W})},[K,Y,X,...Object.values(W)]),{registerTrigger:q,isMountedByThisTrigger:K}}function fz(J){let X=J.useState("open");k0(()=>{if(X&&!J.select("activeTriggerId")&&J.context.triggerElements.size===1){let Y=J.context.triggerElements.entries().next();if(!Y.done){let[W,K]=Y.value;J.update({activeTriggerId:W,activeTriggerElement:K})}}},[X,J])}function mz(J,X,Y){let{mounted:W,setMounted:K,transitionStatus:U}=Az(J);X.useSyncedValues({mounted:W,transitionStatus:U});let q=F0(()=>{K(!1),X.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),Y?.(),X.context.onOpenChangeComplete?.(!1)}),_=X.useState("preventUnmountingOnClose");return P5({enabled:!_,open:J,ref:X.context.popupRef,onComplete(){if(!J)q()}}),{forceUnmount:q,transitionStatus:U}}class Z8{constructor(){this.elements=new Set,this.idMap=new Map}add(J,X){let Y=this.idMap.get(J);if(Y===X)return;if(Y!==void 0)this.elements.delete(Y);if(this.elements.add(X),this.idMap.set(J,X),this.elements.size!==this.idMap.size)throw Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.")}delete(J){let X=this.idMap.get(J);if(X)this.elements.delete(X),this.idMap.delete(J)}hasElement(J){return this.elements.has(J)}hasMatchingElement(J){for(let X of this.elements)if(J(X))return!0;return!1}getById(J){return this.idMap.get(J)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function UO(){return new o7({open:!1,floatingElement:null,referenceElement:null,triggerElements:new Z8,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function dz(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:UO(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:v1,inactiveTriggerProps:v1,popupProps:v1}}var uz={open:p0((J)=>J.open),mounted:p0((J)=>J.mounted),transitionStatus:p0((J)=>J.transitionStatus),floatingRootContext:p0((J)=>J.floatingRootContext),preventUnmountingOnClose:p0((J)=>J.preventUnmountingOnClose),payload:p0((J)=>J.payload),activeTriggerId:p0((J)=>J.activeTriggerId),activeTriggerElement:p0((J)=>J.mounted?J.activeTriggerElement:null),isTriggerActive:p0((J,X)=>X!==void 0&&J.activeTriggerId===X),isOpenedByTrigger:p0((J,X)=>X!==void 0&&J.activeTriggerId===X&&J.open),isMountedByTrigger:p0((J,X)=>X!==void 0&&J.activeTriggerId===X&&J.mounted),triggerProps:p0((J,X)=>X?J.activeTriggerProps:J.inactiveTriggerProps),popupProps:p0((J)=>J.popupProps),popupElement:p0((J)=>J.popupElement),positionerElement:p0((J)=>J.positionerElement)};function HO(J){let{open:X=!1,onOpenChange:Y,elements:W={}}=J,K=J2(),U=tw()!=null;{let _=W.reference;if(_&&!L1(_))console.error("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `context.setPositionReference()`","instead.")}let q=r1(()=>new o7({open:X,onOpenChange:Y,referenceElement:W.reference??null,floatingElement:W.floating??null,triggerElements:W.triggers??new Z8,floatingId:K,nested:U,noEmit:J.noEmit||!1})).current;return k0(()=>{let _={open:X,floatingId:K};if(W.reference!==void 0)_.referenceElement=W.reference,_.domReferenceElement=L1(W.reference)?W.reference:null;if(W.floating!==void 0)_.floatingElement=W.floating;q.update(_)},[X,K,W.reference,W.floating,q]),q.context.onOpenChange=Y,q.context.nested=U,q.context.noEmit=J.noEmit||!1,q}function c_(J={}){let{nodeId:X,externalTree:Y}=J,W=HO(J),K=J.rootContext||W,U={reference:K.useState("referenceElement"),floating:K.useState("floatingElement"),domReference:K.useState("domReferenceElement")},[q,_]=k2.useState(null),L=k2.useRef(null),F=$2(Y);k0(()=>{if(U.domReference)L.current=U.domReference},[U.domReference]);let N=sM({...J,elements:{...U,...q&&{reference:q}}}),V=k2.useCallback((R)=>{let S=L1(R)?{getBoundingClientRect:()=>R.getBoundingClientRect(),getClientRects:()=>R.getClientRects(),contextElement:R}:R;_(S),N.refs.setReference(S)},[N.refs]),[k,A]=k2.useState(null),[D,M]=k2.useState(null);K.useSyncedValue("referenceElement",k),K.useSyncedValue("domReferenceElement",L1(k)?k:null),K.useSyncedValue("floatingElement",D);let h=k2.useCallback((R)=>{if(L1(R)||R===null)L.current=R,A(R);if(L1(N.refs.reference.current)||N.refs.reference.current===null||R!==null&&!L1(R))N.refs.setReference(R)},[N.refs,A]),v=k2.useCallback((R)=>{M(R),N.refs.setFloating(R)},[N.refs]),x=k2.useMemo(()=>({...N.refs,setReference:h,setFloating:v,setPositionReference:V,domReference:L}),[N.refs,h,v,V]),I=k2.useMemo(()=>({...N.elements,domReference:U.domReference}),[N.elements,U.domReference]),b=K.useState("open"),E=K.useState("floatingId"),m=k2.useMemo(()=>({...N,dataRef:K.context.dataRef,open:b,onOpenChange:K.setOpen,events:K.context.events,floatingId:E,refs:x,elements:I,nodeId:X,rootStore:K}),[N,x,I,X,K,b,E]);return k0(()=>{K.context.dataRef.current.floatingContext=m;let R=F?.nodesRef.current.find((S)=>S.id===X);if(R)R.context=m}),k2.useMemo(()=>({...N,context:m,refs:x,elements:I,rootStore:K}),[N,x,I,m,K])}function n7(J){let{popupStore:X,noEmit:Y=!1,treatPopupAsFloatingElement:W=!1,onOpenChange:K}=J,U=J2(),q=tw()!=null,_=X.useState("open"),L=X.useState("activeTriggerElement"),F=X.useState(W?"popupElement":"positionerElement"),N=X.context.triggerElements,V=r1(()=>new o7({open:_,referenceElement:L,floatingElement:F,triggerElements:N,onOpenChange:K,floatingId:U,nested:q,noEmit:Y})).current;return k0(()=>{let k={open:_,floatingId:U,referenceElement:L,floatingElement:F};if(L1(L))k.domReferenceElement=L;V.update(k)},[_,U,L,F,V]),V.context.onOpenChange=K,V.context.nested=q,V.context.noEmit=Y,V}var I6=c(G0(),1);var l_=Pj&&pY;function jX(J,X={}){let Y="rootStore"in J?J.rootStore:J,{events:W,dataRef:K}=Y.context,{enabled:U=!0,visibleOnly:q=!0}=X,_=I6.useRef(!1),L=a1(),F=I6.useRef(!0);I6.useEffect(()=>{let V=Y.select("domReferenceElement");if(!U)return;let k=u1(V);function A(){if(!Y.select("open")&&O1(V)&&V===X2(C1(V)))_.current=!0}function D(){F.current=!0}function M(){F.current=!1}if(k.addEventListener("blur",A),l_)k.addEventListener("keydown",D,!0),k.addEventListener("pointerdown",M,!0);return()=>{if(k.removeEventListener("blur",A),l_)k.removeEventListener("keydown",D,!0),k.removeEventListener("pointerdown",M,!0)}},[Y,U]),I6.useEffect(()=>{if(!U)return;function V(k){if(k.reason===B0.triggerPress||k.reason===B0.escapeKey)_.current=!0}return W.on("openchange",V),()=>{W.off("openchange",V)}},[W,U]);let N=I6.useMemo(()=>({onMouseLeave(){_.current=!1},onFocus(V){if(_.current)return;let k=f1(V.nativeEvent);if(q&&L1(k)){if(l_&&!V.relatedTarget){if(!F.current&&!XX(k))return}else if(!bj(k))return}Y.setOpen(!0,P0(B0.triggerFocus,V.nativeEvent,V.currentTarget))},onBlur(V){_.current=!1;let{relatedTarget:k,nativeEvent:A}=V,D=L1(k)&&k.hasAttribute(J5("focus-guard"))&&k.getAttribute("data-type")==="outside";L.start(0,()=>{let M=Y.select("domReferenceElement"),h=X2(M?M.ownerDocument:document);if(!k&&h===M)return;if(t0(K.current.floatingContext?.refs.floating.current,h)||t0(M,h)||D)return;if(Y.context.triggerElements.hasElement(V.relatedTarget))return;Y.setOpen(!1,P0(B0.triggerFocus,A))})}}),[K,Y,q,L]);return I6.useMemo(()=>U?{reference:N,trigger:N}:{},[U,N])}var pz=c(G0(),1);var J8=c(G0(),1);var MX=J5("safe-polygon"),LS=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${Oz}`;function _O(J){return J?Boolean(J.closest(LS)):!1}function jG(J){let X=J8.useRef(void 0),Y=J8.useRef(!1),W=J8.useRef(void 0),K=J8.useRef(!0),U=J8.useRef(!1),q=J8.useRef(()=>{}),_=J8.useRef(!1),L=a1(),F=a1(),N=J8.useRef(void 0);return J8.useMemo(()=>{let V=J.context.dataRef.current;if(!V.hoverInteractionState)V.hoverInteractionState={pointerTypeRef:X,interactedInsideRef:Y,handlerRef:W,blockMouseMoveRef:K,performedPointerEventsMutationRef:U,unbindMouseMoveRef:q,restTimeoutPendingRef:_,openChangeTimeout:L,restTimeout:F,handleCloseOptionsRef:N};return V.hoverInteractionState},[J,X,Y,W,K,U,q,_,L,F,N])}var VS=new Set(["click","mousedown"]);function OX(J,X={}){let Y="rootStore"in J?J.rootStore:J,W=Y.useState("open"),K=Y.useState("floatingElement"),U=Y.useState("domReferenceElement"),{dataRef:q}=Y.context,{enabled:_=!0,closeDelay:L=0,externalTree:F}=X,{pointerTypeRef:N,interactedInsideRef:V,handlerRef:k,performedPointerEventsMutationRef:A,unbindMouseMoveRef:D,restTimeoutPendingRef:M,openChangeTimeout:h,handleCloseOptionsRef:v}=jG(Y),x=$2(F),I=tw(),b=F0(()=>{if(V.current)return!0;return q.current.openEvent?VS.has(q.current.openEvent.type):!1}),E=F0(()=>{let d=q.current.openEvent?.type;return d?.includes("mouse")&&d!=="mousedown"}),m=pz.useCallback((d,w0=!0)=>{let t=FS(L,N.current);if(t&&!k.current)h.start(t,()=>Y.setOpen(!1,P0(B0.triggerHover,d)));else if(w0)h.clear(),Y.setOpen(!1,P0(B0.triggerHover,d))},[L,k,Y,N,h]),R=F0(()=>{D.current(),k.current=void 0}),S=F0(()=>{if(A.current){let d=C1(K).body;d.style.pointerEvents="",d.removeAttribute(MX),A.current=!1}}),p=F0((d)=>{let w0=f1(d);if(!_O(w0)){V.current=!1;return}V.current=!0});k0(()=>{if(!W)N.current=void 0,M.current=!1,V.current=!1,R(),S()},[W,N,M,V,R,S]),pz.useEffect(()=>{return()=>{R()}},[R]),pz.useEffect(()=>{return S},[S]),k0(()=>{if(!_)return;if(W&&v.current?.blockPointerEvents&&E()&&L1(U)&&K){A.current=!0;let d=C1(K).body;d.setAttribute(MX,"");let w0=U,t=K,u=x?.nodesRef.current.find((Q0)=>Q0.id===I)?.context?.elements.floating;if(u)u.style.pointerEvents="";return d.style.pointerEvents="none",w0.style.pointerEvents="auto",t.style.pointerEvents="auto",()=>{d.style.pointerEvents="",w0.style.pointerEvents="",t.style.pointerEvents=""}}return},[_,W,U,K,v,E,x,I,A]),pz.useEffect(()=>{if(!_)return;function d(Q0){if(b()||!q.current.floatingContext||!Y.select("open"))return;let r=Y.context.triggerElements;if(Q0.relatedTarget&&r.hasElement(Q0.relatedTarget))return;if(S(),R(),!b())m(Q0)}function w0(Q0){h.clear(),S(),k.current?.(Q0),R()}function t(Q0){if(!b())m(Q0,!1)}let u=K;if(u)u.addEventListener("mouseleave",d),u.addEventListener("mouseenter",w0),u.addEventListener("mouseleave",t),u.addEventListener("pointerdown",p,!0);return()=>{if(u)u.removeEventListener("mouseleave",d),u.removeEventListener("mouseenter",w0),u.removeEventListener("mouseleave",t),u.removeEventListener("pointerdown",p,!0)}})}function FS(J,X){if(X&&!E5(X))return 0;if(typeof J==="function")return J();return J}var t7=c(G0(),1),qO=c(m8(),1);function i_(J){if(typeof J==="function")return J();return J}var NS={current:null};function e7(J,X={}){let Y="rootStore"in J?J.rootStore:J,{dataRef:W,events:K}=Y.context,{enabled:U=!0,delay:q=0,handleClose:_=null,mouseOnly:L=!1,restMs:F=0,move:N=!0,triggerElementRef:V=NS,externalTree:k,isActiveTrigger:A=!0}=X,D=$2(k),{pointerTypeRef:M,interactedInsideRef:h,handlerRef:v,blockMouseMoveRef:x,performedPointerEventsMutationRef:I,unbindMouseMoveRef:b,restTimeoutPendingRef:E,openChangeTimeout:m,restTimeout:R,handleCloseOptionsRef:S}=jG(Y),p=Kw(_),d=Kw(q),w0=Kw(F);if(A)S.current=p.current?.__options;let t=F0(()=>{if(h.current)return!0;return W.current.openEvent?["click","mousedown"].includes(W.current.openEvent.type):!1}),u=t7.useCallback((o,g=!0)=>{let X0=Pz(d.current,"close",M.current);if(X0&&!v.current)m.start(X0,()=>Y.setOpen(!1,P0(B0.triggerHover,o)));else if(g)m.clear(),Y.setOpen(!1,P0(B0.triggerHover,o))},[d,v,Y,M,m]),Q0=F0(()=>{b.current(),v.current=void 0}),r=F0(()=>{if(I.current){let o=C1(Y.select("domReferenceElement")).body;o.style.pointerEvents="",o.removeAttribute(MX),I.current=!1}});t7.useEffect(()=>{if(!U)return;function o(g){if(!g.open)m.clear(),R.clear(),x.current=!0,E.current=!1}return K.on("openchange",o),()=>{K.off("openchange",o)}},[U,K,m,R,x,E]);let e=F0((o)=>{if(t())return;if(!W.current.floatingContext)return;let g=Y.context.triggerElements;if(o.relatedTarget&&g.hasElement(o.relatedTarget))return;let X0=V.current;p.current?.({...W.current.floatingContext,tree:D,x:o.clientX,y:o.clientY,onClose(){if(r(),Q0(),!t()&&X0===Y.select("domReferenceElement"))u(o)}})(o)});return t7.useEffect(()=>{if(!U)return;let o=V.current??(A?Y.select("domReferenceElement"):null);if(!L1(o))return;function g(z0){if(m.clear(),x.current=!1,L&&!E5(M.current))return;if(i_(w0.current)>0&&!Pz(d.current,"open"))return;let U0=Pz(d.current,"open",M.current),J0=Y.select("domReferenceElement"),L0=Y.context.triggerElements,S0=(L0.hasElement(z0.target)||L0.hasMatchingElement((j0)=>t0(j0,z0.target)))&&(!J0||!t0(J0,z0.target)),V0=z0.currentTarget??null,H0=!Y.select("open")||S0;if(U0)m.start(U0,()=>{if(H0)Y.setOpen(!0,P0(B0.triggerHover,z0,V0))});else if(H0)Y.setOpen(!0,P0(B0.triggerHover,z0,V0))}function X0(z0){if(t()){r();return}b.current();let U0=Y.select("domReferenceElement"),J0=C1(U0);R.clear(),E.current=!1;let L0=Y.context.triggerElements;if(z0.relatedTarget&&L0.hasElement(z0.relatedTarget))return;if(p.current&&W.current.floatingContext){if(!Y.select("open"))m.clear();let V0=V.current;v.current=p.current({...W.current.floatingContext,tree:D,x:z0.clientX,y:z0.clientY,onClose(){if(r(),Q0(),!t()&&V0===Y.select("domReferenceElement"))u(z0,!0)}});let H0=v.current;H0(z0),J0.addEventListener("mousemove",H0),b.current=()=>{J0.removeEventListener("mousemove",H0)};return}if(M.current==="touch"?!t0(Y.select("floatingElement"),z0.relatedTarget):!0)u(z0)}function P(z0){e(z0)}if(Y.select("open"))o.addEventListener("mouseleave",P);if(N)o.addEventListener("mousemove",g,{once:!0});return o.addEventListener("mouseenter",g),o.addEventListener("mouseleave",X0),()=>{if(o.removeEventListener("mouseleave",P),N)o.removeEventListener("mousemove",g);o.removeEventListener("mouseenter",g),o.removeEventListener("mouseleave",X0)}},[Q0,r,x,W,d,u,Y,U,p,e,A,t,L,N,M,w0,R,E,m,V,D,b,v]),t7.useMemo(()=>{function o(g){M.current=g.pointerType}return{onPointerDown:o,onPointerEnter:o,onMouseMove(g){let{nativeEvent:X0}=g,P=g.currentTarget,z0=Y.select("domReferenceElement"),U0=Y.context.triggerElements,J0=Y.select("open"),L0=(U0.hasElement(g.target)||U0.hasMatchingElement((V0)=>t0(V0,g.target)))&&(!z0||!t0(z0,g.target));if(L&&!E5(M.current))return;if(J0&&!L0||i_(w0.current)===0)return;if(!L0&&E.current&&g.movementX**2+g.movementY**2<2)return;R.clear();function S0(){if(!x.current&&(!J0||L0))Y.setOpen(!0,P0(B0.triggerHover,X0,P))}if(M.current==="touch")qO.flushSync(()=>{S0()});else if(L0&&J0)S0();else E.current=!0,R.start(i_(w0.current),S0)}}},[x,L,Y,M,w0,R,E])}var w9=c(G0(),1);function $5(J=[]){let X=J.map((F)=>F?.reference),Y=J.map((F)=>F?.floating),W=J.map((F)=>F?.item),K=J.map((F)=>F?.trigger),U=w9.useCallback((F)=>MG(F,J,"reference"),X),q=w9.useCallback((F)=>MG(F,J,"floating"),Y),_=w9.useCallback((F)=>MG(F,J,"item"),W),L=w9.useCallback((F)=>MG(F,J,"trigger"),K);return w9.useMemo(()=>({getReferenceProps:U,getFloatingProps:q,getItemProps:_,getTriggerProps:L}),[U,q,_,L])}function MG(J,X,Y){let W=new Map,K=Y==="item",U={};if(Y==="floating")U.tabIndex=-1,U[ZX]="";for(let q in J){if(K&&J){if(q===Z_||q===J_)continue}U[q]=J[q]}for(let q=0;q<X.length;q+=1){let _,L=X[q]?.[Y];if(typeof L==="function")_=J?L(J):null;else _=L;if(!_)continue;BO(U,_,K,W)}return BO(U,J,K,W),U}function BO(J,X,Y,W){for(let K in X){let U=X[K];if(Y&&(K===Z_||K===J_))continue;if(!K.startsWith("on"))J[K]=U;else{if(!W.has(K))W.set(K,[]);if(typeof U==="function")W.get(K)?.push(U),J[K]=(...q)=>{return W.get(K)?.map((_)=>_(...q)).find((_)=>_!==void 0)}}}}var Sw=c(G0(),1);var kS="Escape";function DG(J,X,Y){switch(J){case"vertical":return X;case"horizontal":return Y;default:return X||Y}}function OG(J,X){return DG(X,J===JX||J===R7,J===u8||J===p8)}function r_(J,X,Y){return DG(X,J===R7,Y?J===u8:J===p8)||J==="Enter"||J===" "||J===""}function AS(J,X,Y){return DG(X,Y?J===u8:J===p8,J===R7)}function jS(J,X,Y,W){let K=Y?J===p8:J===u8,U=J===JX;if(X==="both"||X==="horizontal"&&W&&W>1)return J===kS;return DG(X,K,U)}function a_(J,X){let Y="rootStore"in J?J.rootStore:J,W=Y.useState("open"),K=Y.useState("floatingElement"),U=Y.useState("domReferenceElement"),q=Y.context.dataRef,{listRef:_,activeIndex:L,onNavigate:F=()=>{},enabled:N=!0,selectedIndex:V=null,allowEscape:k=!1,loopFocus:A=!1,nested:D=!1,rtl:M=!1,virtual:h=!1,focusItemOnOpen:v="auto",focusItemOnHover:x=!0,openOnArrowKeyDown:I=!0,disabledIndices:b=void 0,orientation:E="vertical",parentOrientation:m,cols:R=1,scrollItemIntoView:S=!0,itemSizes:p,dense:d=!1,id:w0,resetOnPointerLeave:t=!0,externalTree:u}=X;if(k){if(!A)console.warn("`useListNavigation` looping must be enabled to allow escaping.");if(!h)console.warn("`useListNavigation` must be virtual to allow escaping.")}if(E==="vertical"&&R>1)console.warn("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".');let Q0=g7(K),r=Kw(Q0),e=tw(),o=$2(u);k0(()=>{q.current.orientation=E},[q,E]);let g=$X(U),X0=Sw.useRef(v),P=Sw.useRef(V??-1),z0=Sw.useRef(null),U0=Sw.useRef(!0),J0=F0((x0)=>{F(P.current===-1?null:P.current,x0)}),L0=Sw.useRef(J0),S0=Sw.useRef(!!K),V0=Sw.useRef(W),H0=Sw.useRef(!1),j0=Sw.useRef(!1),r0=Kw(b),n0=Kw(W),n=Kw(S),R0=Kw(V),I0=Kw(t),j1=F0(()=>{function x0(D1){if(h)o?.events.emit("virtualfocus",D1);else Iz(D1,{sync:H0.current,preventScroll:!0})}let l0=_.current[P.current],y0=j0.current;if(l0)x0(l0);(H0.current?(D1)=>D1():requestAnimationFrame)(()=>{let D1=_.current[P.current]||l0;if(!D1)return;if(!l0)x0(D1);let W1=n.current;if(W1&&_0&&(y0||!U0.current))D1.scrollIntoView?.(typeof W1==="boolean"?{block:"nearest",inline:"nearest"}:W1)})});k0(()=>{if(!N)return;if(W&&K){if(P.current=V??-1,X0.current&&V!=null)j0.current=!0,J0()}else if(S0.current)P.current=-1,L0.current()},[N,W,K,V,J0]),k0(()=>{if(!N)return;if(!W){H0.current=!1;return}if(!K)return;if(L==null){if(H0.current=!1,R0.current!=null)return;if(S0.current)P.current=-1,j1();if((!V0.current||!S0.current)&&X0.current&&(z0.current!=null||X0.current===!0&&z0.current==null)){let x0=0,l0=()=>{if(_.current[0]==null){if(x0<2)(x0?requestAnimationFrame:queueMicrotask)(l0);x0+=1}else P.current=z0.current==null||r_(z0.current,E,M)||D?m7(_):Dz(_),z0.current=null,J0()};l0()}}else if(!x6(_,L))P.current=L,j1(),j0.current=!1},[N,W,K,L,R0,D,_,E,M,J0,j1,r0]),k0(()=>{if(!N||K||!o||h||!S0.current)return;let x0=o.nodesRef.current,l0=x0.find((D1)=>D1.id===e)?.context?.elements.floating,y0=X2(C1(K)),q1=x0.some((D1)=>D1.context&&t0(D1.context.elements.floating,y0));if(l0&&!q1&&U0.current)l0.focus({preventScroll:!0})},[N,K,o,e,h]),k0(()=>{L0.current=J0,V0.current=W,S0.current=!!K}),k0(()=>{if(!W)z0.current=null,X0.current=v},[W,v]);let b0=L!=null,_0=Sw.useMemo(()=>{function x0(y0){if(!n0.current)return;let q1=_.current.indexOf(y0.currentTarget);if(q1!==-1&&P.current!==q1)P.current=q1,J0(y0)}return{onFocus(y0){H0.current=!0,x0(y0)},onClick:({currentTarget:y0})=>y0.focus({preventScroll:!0}),onMouseMove(y0){if(H0.current=!0,j0.current=!1,x)x0(y0)},onPointerLeave(y0){if(!n0.current||!U0.current||y0.pointerType==="touch")return;H0.current=!0;let q1=y0.relatedTarget;if(!x||_.current.includes(q1))return;if(!I0.current)return;if(P.current=-1,J0(y0),!h)r.current?.focus({preventScroll:!0})}}},[n0,r,x,_,J0,I0,h]),O0=Sw.useCallback(()=>{return m??o?.nodesRef.current.find((x0)=>x0.id===e)?.context?.dataRef?.current.orientation},[e,o,m]),A0=F0((x0)=>{if(U0.current=!1,H0.current=!0,x0.which===229)return;if(!n0.current&&x0.currentTarget===r.current)return;if(D&&jS(x0.key,E,M,R)){if(!OG(x0.key,O0()))Xw(x0);if(Y.setOpen(!1,P0(B0.listNavigation,x0.nativeEvent)),O1(U))if(h)o?.events.emit("virtualfocus",U);else U.focus();return}let l0=P.current,y0=m7(_,b),q1=Dz(_,b);if(!g){if(x0.key==="Home")Xw(x0),P.current=y0,J0(x0);if(x0.key==="End")Xw(x0),P.current=q1,J0(x0)}if(R>1){let D1=p||Array.from({length:_.current.length},()=>({width:1,height:1})),W1=UX(D1,R,d),Gw=W1.findIndex((Uw)=>Uw!=null&&!z8(_,Uw,b)),zw=W1.reduce((Uw,hw,J1)=>hw!=null&&!z8(_,hw,b)?J1:Uw,-1),Lw=W1[KX({current:W1.map((Uw)=>Uw!=null?_.current[Uw]:null)},{event:x0,orientation:E,loopFocus:A,rtl:M,cols:R,disabledIndices:_X([...(typeof b!=="function"?b:null)||_.current.map((Uw,hw)=>z8(_,hw,b)?hw:void 0),void 0],W1),minIndex:Gw,maxIndex:zw,prevIndex:HX(P.current>q1?y0:P.current,D1,W1,R,x0.key===R7?"bl":x0.key===(M?u8:p8)?"tr":"tl"),stopEvent:!0})];if(Lw!=null)P.current=Lw,J0(x0);if(E==="both")return}if(OG(x0.key,E)){if(Xw(x0),W&&!h&&X2(x0.currentTarget.ownerDocument)===x0.currentTarget){P.current=r_(x0.key,E,M)?y0:q1,J0(x0);return}if(r_(x0.key,E,M))if(A)if(l0>=q1)if(k&&l0!==_.current.length)P.current=-1;else H0.current=!1,P.current=y0;else P.current=Ow(_,{startingIndex:l0,disabledIndices:b});else P.current=Math.min(q1,Ow(_,{startingIndex:l0,disabledIndices:b}));else if(A)if(l0<=y0)if(k&&l0!==-1)P.current=_.current.length;else H0.current=!1,P.current=q1;else P.current=Ow(_,{startingIndex:l0,decrement:!0,disabledIndices:b});else P.current=Math.max(y0,Ow(_,{startingIndex:l0,decrement:!0,disabledIndices:b}));if(x6(_,P.current))P.current=-1;J0(x0)}}),c0=Sw.useMemo(()=>{return h&&W&&b0&&{"aria-activedescendant":`${w0}-${L}`}},[h,W,b0,w0,L]),C0=Sw.useMemo(()=>{return{"aria-orientation":E==="both"?void 0:E,...!g?c0:{},onKeyDown(x0){if(x0.key==="Tab"&&x0.shiftKey&&W&&!h){let l0=f1(x0.nativeEvent);if(l0&&!t0(r.current,l0))return;if(Xw(x0),Y.setOpen(!1,P0(B0.focusOut,x0.nativeEvent)),O1(U))U.focus();return}A0(x0)},onPointerMove(){U0.current=!0}}},[c0,A0,r,E,g,Y,W,h,U]),E0=Sw.useMemo(()=>{function x0(y0){if(v==="auto"&&iY(y0.nativeEvent))X0.current=!h}function l0(y0){if(X0.current=v,v==="auto"&&rY(y0.nativeEvent))X0.current=!0}return{onKeyDown(y0){let q1=Y.select("open");U0.current=!1;let D1=y0.key.startsWith("Arrow"),W1=AS(y0.key,O0(),M),Gw=OG(y0.key,E),zw=(D?W1:Gw)||y0.key==="Enter"||y0.key.trim()==="";if(h&&q1)return A0(y0);if(!q1&&!I&&D1)return;if(zw){let Lw=OG(y0.key,O0());z0.current=D&&Lw?null:y0.key}if(D){if(W1)if(Xw(y0),q1)P.current=m7(_,r0.current),J0(y0);else Y.setOpen(!0,P0(B0.listNavigation,y0.nativeEvent,y0.currentTarget));return}if(Gw){if(R0.current!=null)P.current=R0.current;if(Xw(y0),!q1&&I)Y.setOpen(!0,P0(B0.listNavigation,y0.nativeEvent,y0.currentTarget));else A0(y0);if(q1)J0(y0)}return},onFocus(y0){if(Y.select("open")&&!h)P.current=-1,J0(y0)},onPointerDown:l0,onPointerEnter:l0,onMouseDown:x0,onClick:x0}},[A0,r0,v,_,D,J0,Y,I,E,O0,M,R0,h]),o0=Sw.useMemo(()=>{return{...c0,...E0}},[c0,E0]);return Sw.useMemo(()=>N?{reference:o0,floating:C0,item:_0,trigger:E0}:{},[N,o0,C0,E0,_0])}var R4=c(G0(),1);var MS=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function DX(J,X={}){let Y="rootStore"in J?J.rootStore:J,W=Y.useState("open"),K=Y.useState("floatingId"),U=Y.useState("domReferenceElement"),q=Y.useState("floatingElement"),{enabled:_=!0,role:L="dialog"}=X,F=J2(),N=U?.id||F,V=R4.useMemo(()=>g7(q)?.id||K,[q,K]),k=MS.get(L)??L,D=tw()!=null,M=R4.useMemo(()=>{if(k==="tooltip"||L==="label")return v1;return{"aria-haspopup":k==="alertdialog"?"dialog":k,"aria-expanded":"false",...k==="listbox"&&{role:"combobox"},...k==="menu"&&D&&{role:"menuitem"},...L==="select"&&{"aria-autocomplete":"none"},...L==="combobox"&&{"aria-autocomplete":"list"}}},[k,D,L]),h=R4.useMemo(()=>{if(k==="tooltip"||L==="label")return{[`aria-${L==="label"?"labelledby":"describedby"}`]:W?V:void 0};return{...M,"aria-expanded":W?"true":"false","aria-controls":W?V:void 0,...k==="menu"&&{id:N}}},[k,V,W,N,L,M]),v=R4.useMemo(()=>{let I={id:V,...k&&{role:k}};if(k==="tooltip"||L==="label")return I;return{...I,...k==="menu"&&{"aria-labelledby":N}}},[k,V,N,L]),x=R4.useCallback(({active:I,selected:b})=>{let E={role:"option",...I&&{id:`${V}-fui-option`}};switch(L){case"select":case"combobox":return{...E,"aria-selected":b};default:}return{}},[V,L]);return R4.useMemo(()=>_?{reference:h,floating:v,item:x,trigger:M}:{},[_,h,v,M,x])}var g4=c(G0(),1);function s_(J,X){let Y="rootStore"in J?J.rootStore:J,W=Y.useState("open"),K=Y.context.dataRef,{listRef:U,activeIndex:q,onMatch:_,onTypingChange:L,enabled:F=!0,findMatch:N=null,resetMs:V=750,ignoreKeys:k=t2,selectedIndex:A=null}=X,D=a1(),M=g4.useRef(""),h=g4.useRef(A??q??-1),v=g4.useRef(null);k0(()=>{if(W)D.clear(),v.current=null,M.current=""},[W,D]),k0(()=>{if(W&&M.current==="")h.current=A??q??-1},[W,A,q]);let x=F0((m)=>{if(m){if(!K.current.typing)K.current.typing=m,L?.(m)}else if(K.current.typing)K.current.typing=m,L?.(m)}),I=F0((m)=>{function R(t,u,Q0){let r=N?N(u,Q0):u.find((e)=>e?.toLocaleLowerCase().indexOf(Q0.toLocaleLowerCase())===0);return r?t.indexOf(r):-1}let S=U.current;if(M.current.length>0&&M.current[0]!==" "){if(R(S,S,M.current)===-1)x(!1);else if(m.key===" ")Xw(m)}if(S==null||k.includes(m.key)||m.key.length!==1||m.ctrlKey||m.metaKey||m.altKey)return;if(W&&m.key!==" ")Xw(m),x(!0);if(S.every((t)=>t?t[0]?.toLocaleLowerCase()!==t[1]?.toLocaleLowerCase():!0)&&M.current===m.key)M.current="",h.current=v.current;M.current+=m.key,D.start(V,()=>{M.current="",h.current=v.current,x(!1)});let d=h.current,w0=R(S,[...S.slice((d||0)+1),...S.slice(0,(d||0)+1)],M.current);if(w0!==-1)_?.(w0),v.current=w0;else if(m.key!==" ")M.current="",x(!1)}),b=g4.useMemo(()=>({onKeyDown:I}),[I]),E=g4.useMemo(()=>{return{onKeyDown:I,onKeyUp(m){if(m.key===" ")x(!1)}}},[I,x]);return g4.useMemo(()=>F?{reference:b,floating:E}:{},[F,b,E])}function LO(J,X){let[Y,W]=J,K=!1,U=X.length;for(let q=0,_=U-1;q<U;_=q++){let[L,F]=X[q]||[0,0],[N,V]=X[_]||[0,0];if(F>=W!==V>=W&&Y<=(N-L)*(W-F)/(V-F)+L)K=!K}return K}function OS(J,X){return J[0]>=X.x&&J[0]<=X.x+X.width&&J[1]>=X.y&&J[1]<=X.y+X.height}function z9(J={}){let{buffer:X=0.5,blockPointerEvents:Y=!1,requireIntent:W=!0}=J,K=new I5,U=!1,q=null,_=null,L=typeof performance<"u"?performance.now():0;function F(V,k){let A=performance.now(),D=A-L;if(q===null||_===null||D===0)return q=V,_=k,L=A,null;let M=V-q,h=k-_,x=Math.sqrt(M*M+h*h)/D;return q=V,_=k,L=A,x}let N=({x:V,y:k,placement:A,elements:D,onClose:M,nodeId:h,tree:v})=>{return function(I){function b(){K.clear(),M()}if(K.clear(),!D.domReference||!D.floating||A==null||V==null||k==null)return;let{clientX:E,clientY:m}=I,R=[E,m],S=f1(I),p=I.type==="mouseleave",d=t0(D.floating,S),w0=t0(D.domReference,S),t=D.domReference.getBoundingClientRect(),u=D.floating.getBoundingClientRect(),Q0=A.split("-")[0],r=V>u.right-u.width/2,e=k>u.bottom-u.height/2,o=OS(R,t),g=u.width>t.width,X0=u.height>t.height,P=(g?t:u).left,z0=(g?t:u).right,U0=(X0?t:u).top,J0=(X0?t:u).bottom;if(d){if(U=!0,!p)return}if(w0)U=!1;if(w0&&!p){U=!0;return}if(p&&L1(I.relatedTarget)&&t0(D.floating,I.relatedTarget))return;if(v&&c8(v.nodesRef.current,h).some(({context:V0})=>V0?.open))return;if(Q0==="top"&&k>=t.bottom-1||Q0==="bottom"&&k<=t.top+1||Q0==="left"&&V>=t.right-1||Q0==="right"&&V<=t.left+1)return b();let L0=[];switch(Q0){case"top":L0=[[P,t.top+1],[P,u.bottom-1],[z0,u.bottom-1],[z0,t.top+1]];break;case"bottom":L0=[[P,u.top+1],[P,t.bottom-1],[z0,t.bottom-1],[z0,u.top+1]];break;case"left":L0=[[u.right-1,J0],[u.right-1,U0],[t.left+1,U0],[t.left+1,J0]];break;case"right":L0=[[t.right-1,J0],[t.right-1,U0],[u.left+1,U0],[u.left+1,J0]];break;default:}function S0([V0,H0]){switch(Q0){case"top":{let j0=[g?V0+X/2:r?V0+X*4:V0-X*4,H0+X+1],r0=[g?V0-X/2:r?V0+X*4:V0-X*4,H0+X+1],n0=[[u.left,r?u.bottom-X:g?u.bottom-X:u.top],[u.right,r?g?u.bottom-X:u.top:u.bottom-X]];return[j0,r0,...n0]}case"bottom":{let j0=[g?V0+X/2:r?V0+X*4:V0-X*4,H0-X],r0=[g?V0-X/2:r?V0+X*4:V0-X*4,H0-X],n0=[[u.left,r?u.top+X:g?u.top+X:u.bottom],[u.right,r?g?u.top+X:u.bottom:u.top+X]];return[j0,r0,...n0]}case"left":{let j0=[V0+X+1,X0?H0+X/2:e?H0+X*4:H0-X*4],r0=[V0+X+1,X0?H0-X/2:e?H0+X*4:H0-X*4];return[...[[e?u.right-X:X0?u.right-X:u.left,u.top],[e?X0?u.right-X:u.left:u.right-X,u.bottom]],j0,r0]}case"right":{let j0=[V0-X,X0?H0+X/2:e?H0+X*4:H0-X*4],r0=[V0-X,X0?H0-X/2:e?H0+X*4:H0-X*4],n0=[[e?u.left+X:X0?u.left+X:u.right,u.top],[e?X0?u.left+X:u.right:u.left+X,u.bottom]];return[j0,r0,...n0]}default:return[]}}if(LO([E,m],L0))return;if(U&&!o)return b();if(!p&&W){let V0=F(I.clientX,I.clientY),H0=0.1;if(V0!==null&&V0<0.1)return b()}if(!LO([E,m],S0([V,k])))b();else if(!U&&W)K.start(40,b);return}};return N.__options={blockPointerEvents:Y},N}var cz=c(G0(),1);var TX=c(G0(),1);function VO(J){let X=TX.useRef(""),Y=TX.useCallback((K)=>{if(K.defaultPrevented)return;X.current=K.pointerType,J(K,K.pointerType)},[J]);return{onClick:TX.useCallback((K)=>{if(K.detail===0){J(K,"keyboard");return}if("pointerType"in K)J(K,K.pointerType);J(K,X.current),X.current=""},[J]),onPointerDown:Y}}function TG(J){let[X,Y]=cz.useState(null),W=F0((_,L)=>{if(!J)Y(L)}),K=cz.useCallback(()=>{Y(null)},[]),{onClick:U,onPointerDown:q}=VO(W);return cz.useMemo(()=>({openMethod:X,reset:K,triggerProps:{onClick:U,onPointerDown:q}}),[X,K,U,q])}function FO(J){let{store:X,parentContext:Y,actionsRef:W}=J,K=X.useState("open"),U=X.useState("disablePointerDismissal"),q=X.useState("modal"),_=X.useState("popupElement"),{openMethod:L,triggerProps:F,reset:N}=TG(K);fz(X);let{forceUnmount:V}=mz(K,X,()=>{N()}),k=F0((d)=>{let w0=P0(d);return w0.preventUnmountOnClose=()=>{X.set("preventUnmountingOnClose",!0)},w0}),A=S5.useCallback(()=>{X.setOpen(!1,k(B0.imperativeAction))},[X,k]);S5.useImperativeHandle(W,()=>({unmount:V,close:A}),[V,A]);let D=n7({popupStore:X,onOpenChange:X.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[M,h]=S5.useState(0),v=M===0,x=DX(D),I=s7(D,{outsidePressEvent(){if(X.context.internalBackdropRef.current||X.context.backdropRef.current)return"intentional";return{mouse:q==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(d){if("button"in d&&d.button!==0)return!1;if("touches"in d&&d.touches.length!==1)return!1;let w0=f1(d);if(v&&!U){let t=w0;if(q)return X.context.internalBackdropRef.current||X.context.backdropRef.current?X.context.internalBackdropRef.current===t||X.context.backdropRef.current===t||t0(t,_)&&!t?.hasAttribute("data-base-ui-portal"):!0;return!0}return!1},escapeKey:v});$G(K&&q===!0,_);let{getReferenceProps:b,getFloatingProps:E,getTriggerProps:m}=$5([x,I]);X.useContextCallback("onNestedDialogOpen",(d)=>{h(d+1)}),X.useContextCallback("onNestedDialogClose",()=>{h(0)}),S5.useEffect(()=>{if(Y?.onNestedDialogOpen&&K)Y.onNestedDialogOpen(M);if(Y?.onNestedDialogClose&&!K)Y.onNestedDialogClose();return()=>{if(Y?.onNestedDialogClose&&K)Y.onNestedDialogClose()}},[K,Y,M]);let R=S5.useMemo(()=>b(F),[b,F]),S=S5.useMemo(()=>m(F),[m,F]),p=S5.useMemo(()=>E(),[E]);X.useSyncedValues({openMethod:L,activeTriggerProps:R,inactiveTriggerProps:S,popupProps:p,floatingRootContext:D,nestedOpenDialogCount:M})}var xG=c(G0(),1),vG=xG.createContext(void 0);vG.displayName="DialogRootContext";function pw(J){let X=xG.useContext(vG);if(J===!1&&X===void 0)throw Error("Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.");return X}var hG=c(G0(),1);var DS={...uz,modal:p0((J)=>J.modal),nested:p0((J)=>J.nested),nestedOpenDialogCount:p0((J)=>J.nestedOpenDialogCount),disablePointerDismissal:p0((J)=>J.disablePointerDismissal),openMethod:p0((J)=>J.openMethod),descriptionElementId:p0((J)=>J.descriptionElementId),titleElementId:p0((J)=>J.titleElementId),viewportElement:p0((J)=>J.viewportElement),role:p0((J)=>J.role)};class xX extends P6{constructor(J){super(TS(J),{popupRef:hG.createRef(),backdropRef:hG.createRef(),internalBackdropRef:hG.createRef(),triggerElements:new Z8,onOpenChange:void 0,onOpenChangeComplete:void 0},DS)}setOpen=(J,X)=>{if(X.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!J&&X.trigger==null&&this.state.activeTriggerId!=null)X.trigger=this.state.activeTriggerElement??void 0;if(this.context.onOpenChange?.(J,X),X.isCanceled)return;let Y={open:J,nativeEvent:X.event,reason:X.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",Y);let W={open:J},K=X.trigger?.id??null;if(K||J)W.activeTriggerId=K,W.activeTriggerElement=X.trigger??null;this.update(W)}}function TS(J={}){return{...dz(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...J}}var EG=c(G0(),1);var Y5=function(J){return J.open="data-open",J.closed="data-closed",J[J.startingStyle=eJ.startingStyle]="startingStyle",J[J.endingStyle=eJ.endingStyle]="endingStyle",J.anchorHidden="data-anchor-hidden",J}({}),o_=function(J){return J.popupOpen="data-popup-open",J.pressed="data-pressed",J}({}),xS={[o_.popupOpen]:""},vS={[o_.popupOpen]:"",[o_.pressed]:""},hS={[Y5.open]:""},ES={[Y5.closed]:""},PS={[Y5.anchorHidden]:""},lz={open(J){if(J)return xS;return null}},vX={open(J){if(J)return vS;return null}},xw={open(J){if(J)return hS;return ES},anchorHidden(J){if(J)return PS;return null}};var IS={...xw,...h2},n_=EG.forwardRef(function(X,Y){let{render:W,className:K,forceRender:U=!1,...q}=X,{store:_}=pw(),L=_.useState("open"),F=_.useState("nested"),N=_.useState("mounted"),V=_.useState("transitionStatus"),k=EG.useMemo(()=>({open:L,transitionStatus:V}),[L,V]);return h0("div",X,{state:k,ref:[_.context.backdropRef,Y],stateAttributesMapping:IS,props:[{role:"presentation",hidden:!N,style:{userSelect:"none",WebkitUserSelect:"none"}},q],enabled:U||!F})});n_.displayName="DialogBackdrop";var PG=c(G0(),1);var t_=PG.forwardRef(function(X,Y){let{render:W,className:K,disabled:U=!1,nativeButton:q=!0,..._}=X,{store:L}=pw(),F=L.useState("open");function N(D){if(F)L.setOpen(!1,P0(B0.closePress,D.nativeEvent))}let{getButtonProps:V,buttonRef:k}=Z5({disabled:U,native:q}),A=PG.useMemo(()=>({disabled:U}),[U]);return h0("button",X,{state:A,ref:[Y,k],props:[{onClick:N},_,V]})});t_.displayName="DialogClose";var NO=c(G0(),1);var e_=NO.forwardRef(function(X,Y){let{render:W,className:K,id:U,...q}=X,{store:_}=pw(),L=ww(U);return _.useSyncedValueWithCleanup("descriptionElementId",L),h0("p",X,{ref:Y,props:[{id:L},q]})});e_.displayName="DialogDescription";var CG=c(G0(),1);var kO=function(J){return J.nestedDialogs="--nested-dialogs",J}({});var AO=function(J){return J[J.open=Y5.open]="open",J[J.closed=Y5.closed]="closed",J[J.startingStyle=Y5.startingStyle]="startingStyle",J[J.endingStyle=Y5.endingStyle]="endingStyle",J.nested="data-nested",J.nestedDialogOpen="data-nested-dialog-open",J}({});var IG=c(G0(),1),bG=IG.createContext(void 0);bG.displayName="DialogPortalContext";function SG(){let J=IG.useContext(bG);if(J===void 0)throw Error("Base UI: <Dialog.Portal> is missing.");return J}var jO=c(x1(),1),bS={...xw,...h2,nestedDialogOpen(J){return J?{[AO.nestedDialogOpen]:""}:null}},wq=CG.forwardRef(function(X,Y){let{className:W,finalFocus:K,initialFocus:U,render:q,..._}=X,{store:L}=pw(),F=L.useState("descriptionElementId"),N=L.useState("disablePointerDismissal"),V=L.useState("floatingRootContext"),k=L.useState("popupProps"),A=L.useState("modal"),D=L.useState("mounted"),M=L.useState("nested"),h=L.useState("nestedOpenDialogCount"),v=L.useState("open"),x=L.useState("openMethod"),I=L.useState("titleElementId"),b=L.useState("transitionStatus"),E=L.useState("role");SG(),P5({open:v,ref:L.context.popupRef,onComplete(){if(v)L.context.onOpenChangeComplete?.(!0)}});function m(w0){if(w0==="touch")return L.context.popupRef.current;return!0}let R=U===void 0?m:U,S=h>0,p=CG.useMemo(()=>({open:v,nested:M,transitionStatus:b,nestedDialogOpen:S}),[v,M,b,S]),d=h0("div",X,{state:p,props:[k,{"aria-labelledby":I??void 0,"aria-describedby":F??void 0,role:E,tabIndex:-1,hidden:!D,onKeyDown(w0){if(XG.has(w0.key))w0.stopPropagation()},style:{[kO.nestedDialogs]:h}},_],ref:[Y,L.context.popupRef,L.useStateSetter("popupElement")],stateAttributesMapping:bS});return jO.jsx(FX,{context:V,openInteractionType:x,disabled:!D,closeOnFocusOut:!N,initialFocus:R,returnFocus:K,modal:A!==!1,restoreFocus:"popup",children:d})});wq.displayName="DialogPopup";var DO=c(G0(),1);function iz(J){if(Fz(19))return J;return J?"true":void 0}var MO=c(G0(),1),OO=c(x1(),1),hX=MO.forwardRef(function(X,Y){let{cutout:W,...K}=X,U;if(W){let q=W?.getBoundingClientRect();U=`polygon(
251
+ \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:Y,firstInputs:U,secondInputs:q,stack:F})}},ub={inputStabilityCheck:"once",identityFunctionCheck:"once"};var FG=Symbol("NOT_FOUND");function pb(J,X=`expected a function, instead received ${typeof J}`){if(typeof J!=="function")throw TypeError(X)}function cb(J,X=`expected an object, instead received ${typeof J}`){if(typeof J!=="object")throw TypeError(X)}function lb(J,X="expected all items to be functions, instead received the following types: "){if(!J.every((Y)=>typeof Y==="function")){let Y=J.map((W)=>typeof W==="function"?`function ${W.name||"unnamed"}()`:typeof W).join(", ");throw TypeError(`${X}[${Y}]`)}}var oM=(J)=>{return Array.isArray(J)?J:[J]};function ib(J){let X=Array.isArray(J[0])?J[0]:J;return lb(X,"createSelector expects all input-selectors to be functions, but received the following types: "),X}function nM(J,X){let Y=[],{length:W}=J;for(let K=0;K<W;K++)Y.push(J[K].apply(null,X));return Y}var rb=(J,X)=>{let{identityFunctionCheck:Y,inputStabilityCheck:W}={...ub,...X};return{identityFunctionCheck:{shouldRun:Y==="always"||Y==="once"&&J,run:mb},inputStabilityCheck:{shouldRun:W==="always"||W==="once"&&J,run:db}}},tM=0,ab=null,wO=class{revision=tM;_value;_lastValue;_isEqual=f_;constructor(J,X=f_){this._value=this._lastValue=J,this._isEqual=X}get value(){return ab?.add(this),this._value}set value(J){if(this.value===J)return;this._value=J,this.revision=++tM}};function f_(J,X){return J===X}function m_(J){if(!(J instanceof wO))console.warn("Not a valid cell! ",J);return J.value}function sb(J,X=f_){return new wO(J,X)}var ob=(J,X)=>!1;function NG(){return sb(null,ob)}var zO=(J)=>{let X=J.collectionTag;if(X===null)X=J.collectionTag=NG();m_(X)};var cu=Symbol(),ZO=0,nb=Object.getPrototypeOf({}),tb=class{constructor(J){this.value=J,this.value=J,this.tag.value=J}proxy=new Proxy(this,AX);tag=NG();tags={};children={};collectionTag=null;id=ZO++},AX={get(J,X){function Y(){let{value:K}=J,U=Reflect.get(K,X);if(typeof X==="symbol")return U;if(X in nb)return U;if(typeof U==="object"&&U!==null){let q=J.children[X];if(q===void 0)q=J.children[X]=zS(U);if(q.tag)m_(q.tag);return q.proxy}else{let q=J.tags[X];if(q===void 0)q=J.tags[X]=NG(),q.value=U;return m_(q),U}}return Y()},ownKeys(J){return zO(J),Reflect.ownKeys(J.value)},getOwnPropertyDescriptor(J,X){return Reflect.getOwnPropertyDescriptor(J.value,X)},has(J,X){return Reflect.has(J.value,X)}},eb=class{constructor(J){this.value=J,this.value=J,this.tag.value=J}proxy=new Proxy([this],wS);tag=NG();tags={};children={};collectionTag=null;id=ZO++},wS={get([J],X){if(X==="length")zO(J);return AX.get(J,X)},ownKeys([J]){return AX.ownKeys(J)},getOwnPropertyDescriptor([J],X){return AX.getOwnPropertyDescriptor(J,X)},has([J],X){return AX.has(J,X)}};function zS(J){if(Array.isArray(J))return new eb(J);return new tb(J)}function ZS(J){let X;return{get(Y){if(X&&J(X.key,Y))return X.value;return FG},put(Y,W){X={key:Y,value:W}},getEntries(){return X?[X]:[]},clear(){X=void 0}}}function JS(J,X){let Y=[];function W(_){let L=Y.findIndex((F)=>X(_,F.key));if(L>-1){let F=Y[L];if(L>0)Y.splice(L,1),Y.unshift(F);return F.value}return FG}function K(_,L){if(W(_)===FG){if(Y.unshift({key:_,value:L}),Y.length>J)Y.pop()}}function U(){return Y}function q(){Y=[]}return{get:W,put:K,getEntries:U,clear:q}}var XS=(J,X)=>J===X;function $S(J){return function(Y,W){if(Y===null||W===null||Y.length!==W.length)return!1;let{length:K}=Y;for(let U=0;U<K;U++)if(!J(Y[U],W[U]))return!1;return!0}}function JO(J,X){let Y=typeof X==="object"?X:{equalityCheck:X},{equalityCheck:W=XS,maxSize:K=1,resultEqualityCheck:U}=Y,q=$S(W),_=0,L=K<=1?ZS(q):JS(K,q);function F(){let N=L.get(arguments);if(N===FG){if(N=J.apply(null,arguments),_++,U){let k=L.getEntries().find((A)=>U(A.value,N));if(k)N=k.value,_!==0&&_--}L.put(arguments,N)}return N}return F.clearCache=()=>{L.clear(),F.resetResultsCount()},F.resultsCount=()=>_,F.resetResultsCount=()=>{_=0},F}var YS=class{constructor(J){this.value=J}deref(){return this.value}},GS=typeof WeakRef<"u"?WeakRef:YS,QS=0,eM=1;function VG(){return{s:QS,v:void 0,o:null,p:null}}function XO(J,X={}){let Y=VG(),{resultEqualityCheck:W}=X,K,U=0;function q(){let _=Y,{length:L}=arguments;for(let V=0,k=L;V<k;V++){let A=arguments[V];if(typeof A==="function"||typeof A==="object"&&A!==null){let D=_.o;if(D===null)_.o=D=new WeakMap;let M=D.get(A);if(M===void 0)_=VG(),D.set(A,_);else _=M}else{let D=_.p;if(D===null)_.p=D=new Map;let M=D.get(A);if(M===void 0)_=VG(),D.set(A,_);else _=M}}let F=_,N;if(_.s===eM)N=_.v;else if(N=J.apply(null,arguments),U++,W){let V=K?.deref?.()??K;if(V!=null&&W(V,N))N=V,U!==0&&U--;K=typeof N==="object"&&N!==null||typeof N==="function"?new GS(N):N}return F.s=eM,F.v=N,N}return q.clearCache=()=>{Y=VG(),q.resetResultsCount()},q.resultsCount=()=>U,q.resetResultsCount=()=>{U=0},q}function d_(J,...X){let Y=typeof J==="function"?{memoize:J,memoizeOptions:X}:J,W=(...K)=>{let U=0,q=0,_,L={},F=K.pop();if(typeof F==="object")L=F,F=K.pop();pb(F,`createSelector expects an output function after the inputs, but received: [${typeof F}]`);let N={...Y,...L},{memoize:V,memoizeOptions:k=[],argsMemoize:A=XO,argsMemoizeOptions:D=[],devModeChecks:M={}}=N,h=oM(k),v=oM(D),x=ib(K),I=V(function(){return U++,F.apply(null,arguments)},...h),b=!0,E=A(function(){q++;let R=nM(x,arguments);_=I.apply(null,R);{let{identityFunctionCheck:S,inputStabilityCheck:p}=rb(b,M);if(S.shouldRun)S.run(F,R,_);if(p.shouldRun){let d=nM(x,arguments);p.run({inputSelectorResults:R,inputSelectorResultsCopy:d},{memoize:V,memoizeOptions:h},arguments)}if(b)b=!1}return _},...v);return Object.assign(E,{resultFunc:F,memoizedResultFunc:I,dependencies:x,dependencyRecomputations:()=>q,resetDependencyRecomputations:()=>{q=0},lastResult:()=>_,recomputations:()=>U,resetRecomputations:()=>{U=0},memoize:V,argsMemoize:A})};return Object.assign(W,{withTypes:()=>W}),W}var WS=d_(XO),KS=Object.assign((J,X=WS)=>{cb(J,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof J}`);let Y=Object.keys(J),W=Y.map((U)=>J[U]);return X(W,(...U)=>{return U.reduce((q,_,L)=>{return q[Y[L]]=_,q},{})})},{withTypes:()=>KS});var nu=d_({memoize:JO,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),p0=(J,X,Y,W,K,U,...q)=>{if(q.length>0)throw Error("Unsupported number of selectors");let _;if(J&&X&&Y&&W&&K&&U)_=(L,F,N,V)=>{let k=J(L,F,N,V),A=X(L,F,N,V),D=Y(L,F,N,V),M=W(L,F,N,V),h=K(L,F,N,V);return U(k,A,D,M,h,F,N,V)};else if(J&&X&&Y&&W&&K)_=(L,F,N,V)=>{let k=J(L,F,N,V),A=X(L,F,N,V),D=Y(L,F,N,V),M=W(L,F,N,V);return K(k,A,D,M,F,N,V)};else if(J&&X&&Y&&W)_=(L,F,N,V)=>{let k=J(L,F,N,V),A=X(L,F,N,V),D=Y(L,F,N,V);return W(k,A,D,F,N,V)};else if(J&&X&&Y)_=(L,F,N,V)=>{let k=J(L,F,N,V),A=X(L,F,N,V);return Y(k,A,F,N,V)};else if(J&&X)_=(L,F,N,V)=>{let k=J(L,F,N,V);return X(k,F,N,V)};else if(J)_=J;else throw Error("Missing arguments");return _};var YO=c(G0(),1),GO=c(u_(),1),QO=c($O(),1);var _S=Fz(19),qS=_S?BS:LS;function WO(J,X,Y,W,K){return qS(J,X,Y,W,K)}function BS(J,X,Y,W,K){let U=YO.useCallback(()=>X(J.getSnapshot(),Y,W,K),[J,X,Y,W,K]);return GO.useSyncExternalStore(J.subscribe,U,U)}function LS(J,X,Y,W,K){return QO.useSyncExternalStoreWithSelector(J.subscribe,J.getSnapshot,J.getSnapshot,(U)=>X(U,Y,W,K))}class Rz{constructor(J){this.state=J,this.listeners=new Set,this.updateTick=0}subscribe=(J)=>{return this.listeners.add(J),()=>{this.listeners.delete(J)}};getSnapshot=()=>{return this.state};setState(J){if(this.state===J)return;this.state=J,this.updateTick+=1;let X=this.updateTick;for(let Y of this.listeners){if(X!==this.updateTick)return;Y(J)}}update(J){for(let X in J)if(!Object.is(this.state[X],J[X])){Rz.prototype.setState.call(this,{...this.state,...J});return}}set(J,X){if(!Object.is(this.state[J],X))Rz.prototype.setState.call(this,{...this.state,[J]:X})}notifyAll(){let J={...this.state};Rz.prototype.setState.call(this,J)}}var E6=c(G0(),1);class P6 extends Rz{constructor(J,X={},Y){super(J);this.context=X,this.selectors=Y}controlledValues=new Map;useSyncedValue(J,X){E6.useDebugValue(J),k0(()=>{if(this.state[J]!==X)this.set(J,X)},[J,X])}useSyncedValueWithCleanup(J,X){k0(()=>{if(this.state[J]!==X)this.set(J,X);return()=>{this.set(J,void 0)}},[J,X])}useSyncedValues(J){{E6.useDebugValue(J,(K)=>Object.keys(K));let Y=E6.useRef(Object.keys(J)).current,W=Object.keys(J);if(Y.length!==W.length||Y.some((K,U)=>K!==W[U]))console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}let X=Object.values(J);k0(()=>{this.update(J)},X)}useControlledProp(J,X,Y){E6.useDebugValue(J);let W=X!==void 0;{let K=this.controlledValues.get(J);if(K!==void 0&&K!==W)console.error(`A component is changing the ${W?"":"un"}controlled state of ${J.toString()} to be ${W?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}if(!this.controlledValues.has(J)){if(this.controlledValues.set(J,W),!W&&!Object.is(this.state[J],Y))super.setState({...this.state,[J]:Y})}k0(()=>{if(W&&!Object.is(this.state[J],X))super.setState({...this.state,[J]:X})},[J,X,Y,W])}set(J,X){if(this.controlledValues.get(J)===!0)return;super.set(J,X)}update(J){let X={...J};for(let Y in X){if(!Object.hasOwn(X,Y))continue;if(this.controlledValues.get(Y)===!0){delete X[Y];continue}}super.update(X)}setState(J){let X={...J};for(let Y in X){if(!Object.hasOwn(X,Y))continue;if(this.controlledValues.get(Y)===!0){delete X[Y];continue}}super.setState({...this.state,...X})}select=(J,X,Y,W)=>{let K=this.selectors[J];return K(this.state,X,Y,W)};useState=(J,X,Y,W)=>{E6.useDebugValue(J);let K=this.selectors[J];return WO(this,K,X,Y,W)};useContextCallback(J,X){E6.useDebugValue(J);let Y=F0(X??vY);this.context[J]=Y}useStateSetter(J){let X=E6.useRef(void 0);if(X.current===void 0)X.current=(Y)=>{this.set(J,Y)};return X.current}observe(J,X){let Y;if(typeof J==="function")Y=J;else Y=this.selectors[J];let W=Y(this.state);return X(W,W,this),this.subscribe((K)=>{let U=Y(K);if(!Object.is(W,U)){let q=W;W=U,X(U,q,this)}})}}var kG=c(G0(),1);function KO(){let[,J]=kG.useState({});return kG.useCallback(()=>{J({})},[])}var VS={open:p0((J)=>J.open),domReferenceElement:p0((J)=>J.domReferenceElement),referenceElement:p0((J)=>J.positionReference??J.referenceElement),floatingElement:p0((J)=>J.floatingElement),floatingId:p0((J)=>J.floatingId)};class o7 extends P6{constructor(J){let{nested:X,noEmit:Y,onOpenChange:W,triggerElements:K,...U}=J;super({...U,positionReference:U.referenceElement,domReferenceElement:U.referenceElement},{onOpenChange:W,dataRef:{current:{}},events:YG(),nested:X,noEmit:Y,triggerElements:K},VS)}setOpen=(J,X)=>{if(!J||!this.state.open||aY(X.event))this.context.dataRef.current.openEvent=J?X.event:void 0;if(!this.context.noEmit){let Y={open:J,reason:X.reason,nativeEvent:X.event,nested:this.context.nested,triggerElement:X.trigger};this.context.events.emit("openchange",Y)}this.context.onOpenChange?.(J,X)}}var AG=c(G0(),1);function p_(J,X){let Y=AG.useRef(null);return AG.useCallback((W)=>{if(J===void 0)return;if(Y.current!==null)X.context.triggerElements.delete(Y.current),Y.current=null;if(W!==null)Y.current=J,X.context.triggerElements.add(J,W)},[X,J])}function gz(J,X,Y,W){let K=Y.useState("isMountedByTrigger",J),U=p_(J,Y),q=F0((_)=>{if(U(_),_!==null&&Y.select("open")&&Y.select("activeTriggerId")==null)Y.update({activeTriggerId:J,activeTriggerElement:_,...W})});return k0(()=>{if(K)Y.update({activeTriggerElement:X.current,...W})},[K,Y,X,...Object.values(W)]),{registerTrigger:q,isMountedByThisTrigger:K}}function fz(J){let X=J.useState("open");k0(()=>{if(X&&!J.select("activeTriggerId")&&J.context.triggerElements.size===1){let Y=J.context.triggerElements.entries().next();if(!Y.done){let[W,K]=Y.value;J.update({activeTriggerId:W,activeTriggerElement:K})}}},[X,J])}function mz(J,X,Y){let{mounted:W,setMounted:K,transitionStatus:U}=Az(J);X.useSyncedValues({mounted:W,transitionStatus:U});let q=F0(()=>{K(!1),X.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),Y?.(),X.context.onOpenChangeComplete?.(!1)}),_=X.useState("preventUnmountingOnClose");return P5({enabled:!_,open:J,ref:X.context.popupRef,onComplete(){if(!J)q()}}),{forceUnmount:q,transitionStatus:U}}class Z8{constructor(){this.elements=new Set,this.idMap=new Map}add(J,X){let Y=this.idMap.get(J);if(Y===X)return;if(Y!==void 0)this.elements.delete(Y);if(this.elements.add(X),this.idMap.set(J,X),this.elements.size!==this.idMap.size)throw Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.")}delete(J){let X=this.idMap.get(J);if(X)this.elements.delete(X),this.idMap.delete(J)}hasElement(J){return this.elements.has(J)}hasMatchingElement(J){for(let X of this.elements)if(J(X))return!0;return!1}getById(J){return this.idMap.get(J)}entries(){return this.idMap.entries()}get size(){return this.idMap.size}}function UO(){return new o7({open:!1,floatingElement:null,referenceElement:null,triggerElements:new Z8,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function dz(){return{open:!1,mounted:!1,transitionStatus:"idle",floatingRootContext:UO(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,popupElement:null,positionerElement:null,activeTriggerProps:v1,inactiveTriggerProps:v1,popupProps:v1}}var uz={open:p0((J)=>J.open),mounted:p0((J)=>J.mounted),transitionStatus:p0((J)=>J.transitionStatus),floatingRootContext:p0((J)=>J.floatingRootContext),preventUnmountingOnClose:p0((J)=>J.preventUnmountingOnClose),payload:p0((J)=>J.payload),activeTriggerId:p0((J)=>J.activeTriggerId),activeTriggerElement:p0((J)=>J.mounted?J.activeTriggerElement:null),isTriggerActive:p0((J,X)=>X!==void 0&&J.activeTriggerId===X),isOpenedByTrigger:p0((J,X)=>X!==void 0&&J.activeTriggerId===X&&J.open),isMountedByTrigger:p0((J,X)=>X!==void 0&&J.activeTriggerId===X&&J.mounted),triggerProps:p0((J,X)=>X?J.activeTriggerProps:J.inactiveTriggerProps),popupProps:p0((J)=>J.popupProps),popupElement:p0((J)=>J.popupElement),positionerElement:p0((J)=>J.positionerElement)};function HO(J){let{open:X=!1,onOpenChange:Y,elements:W={}}=J,K=J2(),U=tw()!=null;{let _=W.reference;if(_&&!L1(_))console.error("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `context.setPositionReference()`","instead.")}let q=r1(()=>new o7({open:X,onOpenChange:Y,referenceElement:W.reference??null,floatingElement:W.floating??null,triggerElements:W.triggers??new Z8,floatingId:K,nested:U,noEmit:J.noEmit||!1})).current;return k0(()=>{let _={open:X,floatingId:K};if(W.reference!==void 0)_.referenceElement=W.reference,_.domReferenceElement=L1(W.reference)?W.reference:null;if(W.floating!==void 0)_.floatingElement=W.floating;q.update(_)},[X,K,W.reference,W.floating,q]),q.context.onOpenChange=Y,q.context.nested=U,q.context.noEmit=J.noEmit||!1,q}function c_(J={}){let{nodeId:X,externalTree:Y}=J,W=HO(J),K=J.rootContext||W,U={reference:K.useState("referenceElement"),floating:K.useState("floatingElement"),domReference:K.useState("domReferenceElement")},[q,_]=k2.useState(null),L=k2.useRef(null),F=$2(Y);k0(()=>{if(U.domReference)L.current=U.domReference},[U.domReference]);let N=sM({...J,elements:{...U,...q&&{reference:q}}}),V=k2.useCallback((R)=>{let S=L1(R)?{getBoundingClientRect:()=>R.getBoundingClientRect(),getClientRects:()=>R.getClientRects(),contextElement:R}:R;_(S),N.refs.setReference(S)},[N.refs]),[k,A]=k2.useState(null),[D,M]=k2.useState(null);K.useSyncedValue("referenceElement",k),K.useSyncedValue("domReferenceElement",L1(k)?k:null),K.useSyncedValue("floatingElement",D);let h=k2.useCallback((R)=>{if(L1(R)||R===null)L.current=R,A(R);if(L1(N.refs.reference.current)||N.refs.reference.current===null||R!==null&&!L1(R))N.refs.setReference(R)},[N.refs,A]),v=k2.useCallback((R)=>{M(R),N.refs.setFloating(R)},[N.refs]),x=k2.useMemo(()=>({...N.refs,setReference:h,setFloating:v,setPositionReference:V,domReference:L}),[N.refs,h,v,V]),I=k2.useMemo(()=>({...N.elements,domReference:U.domReference}),[N.elements,U.domReference]),b=K.useState("open"),E=K.useState("floatingId"),m=k2.useMemo(()=>({...N,dataRef:K.context.dataRef,open:b,onOpenChange:K.setOpen,events:K.context.events,floatingId:E,refs:x,elements:I,nodeId:X,rootStore:K}),[N,x,I,X,K,b,E]);return k0(()=>{K.context.dataRef.current.floatingContext=m;let R=F?.nodesRef.current.find((S)=>S.id===X);if(R)R.context=m}),k2.useMemo(()=>({...N,context:m,refs:x,elements:I,rootStore:K}),[N,x,I,m,K])}function n7(J){let{popupStore:X,noEmit:Y=!1,treatPopupAsFloatingElement:W=!1,onOpenChange:K}=J,U=J2(),q=tw()!=null,_=X.useState("open"),L=X.useState("activeTriggerElement"),F=X.useState(W?"popupElement":"positionerElement"),N=X.context.triggerElements,V=r1(()=>new o7({open:_,referenceElement:L,floatingElement:F,triggerElements:N,onOpenChange:K,floatingId:U,nested:q,noEmit:Y})).current;return k0(()=>{let k={open:_,floatingId:U,referenceElement:L,floatingElement:F};if(L1(L))k.domReferenceElement=L;V.update(k)},[_,U,L,F,V]),V.context.onOpenChange=K,V.context.nested=q,V.context.noEmit=Y,V}var I6=c(G0(),1);var l_=Pj&&pY;function jX(J,X={}){let Y="rootStore"in J?J.rootStore:J,{events:W,dataRef:K}=Y.context,{enabled:U=!0,visibleOnly:q=!0}=X,_=I6.useRef(!1),L=a1(),F=I6.useRef(!0);I6.useEffect(()=>{let V=Y.select("domReferenceElement");if(!U)return;let k=u1(V);function A(){if(!Y.select("open")&&O1(V)&&V===X2(C1(V)))_.current=!0}function D(){F.current=!0}function M(){F.current=!1}if(k.addEventListener("blur",A),l_)k.addEventListener("keydown",D,!0),k.addEventListener("pointerdown",M,!0);return()=>{if(k.removeEventListener("blur",A),l_)k.removeEventListener("keydown",D,!0),k.removeEventListener("pointerdown",M,!0)}},[Y,U]),I6.useEffect(()=>{if(!U)return;function V(k){if(k.reason===B0.triggerPress||k.reason===B0.escapeKey)_.current=!0}return W.on("openchange",V),()=>{W.off("openchange",V)}},[W,U]);let N=I6.useMemo(()=>({onMouseLeave(){_.current=!1},onFocus(V){if(_.current)return;let k=f1(V.nativeEvent);if(q&&L1(k)){if(l_&&!V.relatedTarget){if(!F.current&&!XX(k))return}else if(!bj(k))return}Y.setOpen(!0,P0(B0.triggerFocus,V.nativeEvent,V.currentTarget))},onBlur(V){_.current=!1;let{relatedTarget:k,nativeEvent:A}=V,D=L1(k)&&k.hasAttribute(J5("focus-guard"))&&k.getAttribute("data-type")==="outside";L.start(0,()=>{let M=Y.select("domReferenceElement"),h=X2(M?M.ownerDocument:document);if(!k&&h===M)return;if(t0(K.current.floatingContext?.refs.floating.current,h)||t0(M,h)||D)return;if(Y.context.triggerElements.hasElement(V.relatedTarget))return;Y.setOpen(!1,P0(B0.triggerFocus,A))})}}),[K,Y,q,L]);return I6.useMemo(()=>U?{reference:N,trigger:N}:{},[U,N])}var pz=c(G0(),1);var J8=c(G0(),1);var MX=J5("safe-polygon"),FS=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${Oz}`;function _O(J){return J?Boolean(J.closest(FS)):!1}function jG(J){let X=J8.useRef(void 0),Y=J8.useRef(!1),W=J8.useRef(void 0),K=J8.useRef(!0),U=J8.useRef(!1),q=J8.useRef(()=>{}),_=J8.useRef(!1),L=a1(),F=a1(),N=J8.useRef(void 0);return J8.useMemo(()=>{let V=J.context.dataRef.current;if(!V.hoverInteractionState)V.hoverInteractionState={pointerTypeRef:X,interactedInsideRef:Y,handlerRef:W,blockMouseMoveRef:K,performedPointerEventsMutationRef:U,unbindMouseMoveRef:q,restTimeoutPendingRef:_,openChangeTimeout:L,restTimeout:F,handleCloseOptionsRef:N};return V.hoverInteractionState},[J,X,Y,W,K,U,q,_,L,F,N])}var NS=new Set(["click","mousedown"]);function OX(J,X={}){let Y="rootStore"in J?J.rootStore:J,W=Y.useState("open"),K=Y.useState("floatingElement"),U=Y.useState("domReferenceElement"),{dataRef:q}=Y.context,{enabled:_=!0,closeDelay:L=0,externalTree:F}=X,{pointerTypeRef:N,interactedInsideRef:V,handlerRef:k,performedPointerEventsMutationRef:A,unbindMouseMoveRef:D,restTimeoutPendingRef:M,openChangeTimeout:h,handleCloseOptionsRef:v}=jG(Y),x=$2(F),I=tw(),b=F0(()=>{if(V.current)return!0;return q.current.openEvent?NS.has(q.current.openEvent.type):!1}),E=F0(()=>{let d=q.current.openEvent?.type;return d?.includes("mouse")&&d!=="mousedown"}),m=pz.useCallback((d,w0=!0)=>{let t=kS(L,N.current);if(t&&!k.current)h.start(t,()=>Y.setOpen(!1,P0(B0.triggerHover,d)));else if(w0)h.clear(),Y.setOpen(!1,P0(B0.triggerHover,d))},[L,k,Y,N,h]),R=F0(()=>{D.current(),k.current=void 0}),S=F0(()=>{if(A.current){let d=C1(K).body;d.style.pointerEvents="",d.removeAttribute(MX),A.current=!1}}),p=F0((d)=>{let w0=f1(d);if(!_O(w0)){V.current=!1;return}V.current=!0});k0(()=>{if(!W)N.current=void 0,M.current=!1,V.current=!1,R(),S()},[W,N,M,V,R,S]),pz.useEffect(()=>{return()=>{R()}},[R]),pz.useEffect(()=>{return S},[S]),k0(()=>{if(!_)return;if(W&&v.current?.blockPointerEvents&&E()&&L1(U)&&K){A.current=!0;let d=C1(K).body;d.setAttribute(MX,"");let w0=U,t=K,u=x?.nodesRef.current.find((Q0)=>Q0.id===I)?.context?.elements.floating;if(u)u.style.pointerEvents="";return d.style.pointerEvents="none",w0.style.pointerEvents="auto",t.style.pointerEvents="auto",()=>{d.style.pointerEvents="",w0.style.pointerEvents="",t.style.pointerEvents=""}}return},[_,W,U,K,v,E,x,I,A]),pz.useEffect(()=>{if(!_)return;function d(Q0){if(b()||!q.current.floatingContext||!Y.select("open"))return;let r=Y.context.triggerElements;if(Q0.relatedTarget&&r.hasElement(Q0.relatedTarget))return;if(S(),R(),!b())m(Q0)}function w0(Q0){h.clear(),S(),k.current?.(Q0),R()}function t(Q0){if(!b())m(Q0,!1)}let u=K;if(u)u.addEventListener("mouseleave",d),u.addEventListener("mouseenter",w0),u.addEventListener("mouseleave",t),u.addEventListener("pointerdown",p,!0);return()=>{if(u)u.removeEventListener("mouseleave",d),u.removeEventListener("mouseenter",w0),u.removeEventListener("mouseleave",t),u.removeEventListener("pointerdown",p,!0)}})}function kS(J,X){if(X&&!E5(X))return 0;if(typeof J==="function")return J();return J}var t7=c(G0(),1),qO=c(m8(),1);function i_(J){if(typeof J==="function")return J();return J}var AS={current:null};function e7(J,X={}){let Y="rootStore"in J?J.rootStore:J,{dataRef:W,events:K}=Y.context,{enabled:U=!0,delay:q=0,handleClose:_=null,mouseOnly:L=!1,restMs:F=0,move:N=!0,triggerElementRef:V=AS,externalTree:k,isActiveTrigger:A=!0}=X,D=$2(k),{pointerTypeRef:M,interactedInsideRef:h,handlerRef:v,blockMouseMoveRef:x,performedPointerEventsMutationRef:I,unbindMouseMoveRef:b,restTimeoutPendingRef:E,openChangeTimeout:m,restTimeout:R,handleCloseOptionsRef:S}=jG(Y),p=Kw(_),d=Kw(q),w0=Kw(F);if(A)S.current=p.current?.__options;let t=F0(()=>{if(h.current)return!0;return W.current.openEvent?["click","mousedown"].includes(W.current.openEvent.type):!1}),u=t7.useCallback((o,g=!0)=>{let X0=Pz(d.current,"close",M.current);if(X0&&!v.current)m.start(X0,()=>Y.setOpen(!1,P0(B0.triggerHover,o)));else if(g)m.clear(),Y.setOpen(!1,P0(B0.triggerHover,o))},[d,v,Y,M,m]),Q0=F0(()=>{b.current(),v.current=void 0}),r=F0(()=>{if(I.current){let o=C1(Y.select("domReferenceElement")).body;o.style.pointerEvents="",o.removeAttribute(MX),I.current=!1}});t7.useEffect(()=>{if(!U)return;function o(g){if(!g.open)m.clear(),R.clear(),x.current=!0,E.current=!1}return K.on("openchange",o),()=>{K.off("openchange",o)}},[U,K,m,R,x,E]);let e=F0((o)=>{if(t())return;if(!W.current.floatingContext)return;let g=Y.context.triggerElements;if(o.relatedTarget&&g.hasElement(o.relatedTarget))return;let X0=V.current;p.current?.({...W.current.floatingContext,tree:D,x:o.clientX,y:o.clientY,onClose(){if(r(),Q0(),!t()&&X0===Y.select("domReferenceElement"))u(o)}})(o)});return t7.useEffect(()=>{if(!U)return;let o=V.current??(A?Y.select("domReferenceElement"):null);if(!L1(o))return;function g(z0){if(m.clear(),x.current=!1,L&&!E5(M.current))return;if(i_(w0.current)>0&&!Pz(d.current,"open"))return;let U0=Pz(d.current,"open",M.current),J0=Y.select("domReferenceElement"),L0=Y.context.triggerElements,S0=(L0.hasElement(z0.target)||L0.hasMatchingElement((j0)=>t0(j0,z0.target)))&&(!J0||!t0(J0,z0.target)),V0=z0.currentTarget??null,H0=!Y.select("open")||S0;if(U0)m.start(U0,()=>{if(H0)Y.setOpen(!0,P0(B0.triggerHover,z0,V0))});else if(H0)Y.setOpen(!0,P0(B0.triggerHover,z0,V0))}function X0(z0){if(t()){r();return}b.current();let U0=Y.select("domReferenceElement"),J0=C1(U0);R.clear(),E.current=!1;let L0=Y.context.triggerElements;if(z0.relatedTarget&&L0.hasElement(z0.relatedTarget))return;if(p.current&&W.current.floatingContext){if(!Y.select("open"))m.clear();let V0=V.current;v.current=p.current({...W.current.floatingContext,tree:D,x:z0.clientX,y:z0.clientY,onClose(){if(r(),Q0(),!t()&&V0===Y.select("domReferenceElement"))u(z0,!0)}});let H0=v.current;H0(z0),J0.addEventListener("mousemove",H0),b.current=()=>{J0.removeEventListener("mousemove",H0)};return}if(M.current==="touch"?!t0(Y.select("floatingElement"),z0.relatedTarget):!0)u(z0)}function P(z0){e(z0)}if(Y.select("open"))o.addEventListener("mouseleave",P);if(N)o.addEventListener("mousemove",g,{once:!0});return o.addEventListener("mouseenter",g),o.addEventListener("mouseleave",X0),()=>{if(o.removeEventListener("mouseleave",P),N)o.removeEventListener("mousemove",g);o.removeEventListener("mouseenter",g),o.removeEventListener("mouseleave",X0)}},[Q0,r,x,W,d,u,Y,U,p,e,A,t,L,N,M,w0,R,E,m,V,D,b,v]),t7.useMemo(()=>{function o(g){M.current=g.pointerType}return{onPointerDown:o,onPointerEnter:o,onMouseMove(g){let{nativeEvent:X0}=g,P=g.currentTarget,z0=Y.select("domReferenceElement"),U0=Y.context.triggerElements,J0=Y.select("open"),L0=(U0.hasElement(g.target)||U0.hasMatchingElement((V0)=>t0(V0,g.target)))&&(!z0||!t0(z0,g.target));if(L&&!E5(M.current))return;if(J0&&!L0||i_(w0.current)===0)return;if(!L0&&E.current&&g.movementX**2+g.movementY**2<2)return;R.clear();function S0(){if(!x.current&&(!J0||L0))Y.setOpen(!0,P0(B0.triggerHover,X0,P))}if(M.current==="touch")qO.flushSync(()=>{S0()});else if(L0&&J0)S0();else E.current=!0,R.start(i_(w0.current),S0)}}},[x,L,Y,M,w0,R,E])}var w9=c(G0(),1);function $5(J=[]){let X=J.map((F)=>F?.reference),Y=J.map((F)=>F?.floating),W=J.map((F)=>F?.item),K=J.map((F)=>F?.trigger),U=w9.useCallback((F)=>MG(F,J,"reference"),X),q=w9.useCallback((F)=>MG(F,J,"floating"),Y),_=w9.useCallback((F)=>MG(F,J,"item"),W),L=w9.useCallback((F)=>MG(F,J,"trigger"),K);return w9.useMemo(()=>({getReferenceProps:U,getFloatingProps:q,getItemProps:_,getTriggerProps:L}),[U,q,_,L])}function MG(J,X,Y){let W=new Map,K=Y==="item",U={};if(Y==="floating")U.tabIndex=-1,U[ZX]="";for(let q in J){if(K&&J){if(q===Z_||q===J_)continue}U[q]=J[q]}for(let q=0;q<X.length;q+=1){let _,L=X[q]?.[Y];if(typeof L==="function")_=J?L(J):null;else _=L;if(!_)continue;BO(U,_,K,W)}return BO(U,J,K,W),U}function BO(J,X,Y,W){for(let K in X){let U=X[K];if(Y&&(K===Z_||K===J_))continue;if(!K.startsWith("on"))J[K]=U;else{if(!W.has(K))W.set(K,[]);if(typeof U==="function")W.get(K)?.push(U),J[K]=(...q)=>{return W.get(K)?.map((_)=>_(...q)).find((_)=>_!==void 0)}}}}var Sw=c(G0(),1);var jS="Escape";function DG(J,X,Y){switch(J){case"vertical":return X;case"horizontal":return Y;default:return X||Y}}function OG(J,X){return DG(X,J===JX||J===R7,J===u8||J===p8)}function r_(J,X,Y){return DG(X,J===R7,Y?J===u8:J===p8)||J==="Enter"||J===" "||J===""}function MS(J,X,Y){return DG(X,Y?J===u8:J===p8,J===R7)}function OS(J,X,Y,W){let K=Y?J===p8:J===u8,U=J===JX;if(X==="both"||X==="horizontal"&&W&&W>1)return J===jS;return DG(X,K,U)}function a_(J,X){let Y="rootStore"in J?J.rootStore:J,W=Y.useState("open"),K=Y.useState("floatingElement"),U=Y.useState("domReferenceElement"),q=Y.context.dataRef,{listRef:_,activeIndex:L,onNavigate:F=()=>{},enabled:N=!0,selectedIndex:V=null,allowEscape:k=!1,loopFocus:A=!1,nested:D=!1,rtl:M=!1,virtual:h=!1,focusItemOnOpen:v="auto",focusItemOnHover:x=!0,openOnArrowKeyDown:I=!0,disabledIndices:b=void 0,orientation:E="vertical",parentOrientation:m,cols:R=1,scrollItemIntoView:S=!0,itemSizes:p,dense:d=!1,id:w0,resetOnPointerLeave:t=!0,externalTree:u}=X;if(k){if(!A)console.warn("`useListNavigation` looping must be enabled to allow escaping.");if(!h)console.warn("`useListNavigation` must be virtual to allow escaping.")}if(E==="vertical"&&R>1)console.warn("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".');let Q0=g7(K),r=Kw(Q0),e=tw(),o=$2(u);k0(()=>{q.current.orientation=E},[q,E]);let g=$X(U),X0=Sw.useRef(v),P=Sw.useRef(V??-1),z0=Sw.useRef(null),U0=Sw.useRef(!0),J0=F0((x0)=>{F(P.current===-1?null:P.current,x0)}),L0=Sw.useRef(J0),S0=Sw.useRef(!!K),V0=Sw.useRef(W),H0=Sw.useRef(!1),j0=Sw.useRef(!1),r0=Kw(b),n0=Kw(W),n=Kw(S),R0=Kw(V),I0=Kw(t),j1=F0(()=>{function x0(D1){if(h)o?.events.emit("virtualfocus",D1);else Iz(D1,{sync:H0.current,preventScroll:!0})}let l0=_.current[P.current],y0=j0.current;if(l0)x0(l0);(H0.current?(D1)=>D1():requestAnimationFrame)(()=>{let D1=_.current[P.current]||l0;if(!D1)return;if(!l0)x0(D1);let W1=n.current;if(W1&&_0&&(y0||!U0.current))D1.scrollIntoView?.(typeof W1==="boolean"?{block:"nearest",inline:"nearest"}:W1)})});k0(()=>{if(!N)return;if(W&&K){if(P.current=V??-1,X0.current&&V!=null)j0.current=!0,J0()}else if(S0.current)P.current=-1,L0.current()},[N,W,K,V,J0]),k0(()=>{if(!N)return;if(!W){H0.current=!1;return}if(!K)return;if(L==null){if(H0.current=!1,R0.current!=null)return;if(S0.current)P.current=-1,j1();if((!V0.current||!S0.current)&&X0.current&&(z0.current!=null||X0.current===!0&&z0.current==null)){let x0=0,l0=()=>{if(_.current[0]==null){if(x0<2)(x0?requestAnimationFrame:queueMicrotask)(l0);x0+=1}else P.current=z0.current==null||r_(z0.current,E,M)||D?m7(_):Dz(_),z0.current=null,J0()};l0()}}else if(!x6(_,L))P.current=L,j1(),j0.current=!1},[N,W,K,L,R0,D,_,E,M,J0,j1,r0]),k0(()=>{if(!N||K||!o||h||!S0.current)return;let x0=o.nodesRef.current,l0=x0.find((D1)=>D1.id===e)?.context?.elements.floating,y0=X2(C1(K)),q1=x0.some((D1)=>D1.context&&t0(D1.context.elements.floating,y0));if(l0&&!q1&&U0.current)l0.focus({preventScroll:!0})},[N,K,o,e,h]),k0(()=>{L0.current=J0,V0.current=W,S0.current=!!K}),k0(()=>{if(!W)z0.current=null,X0.current=v},[W,v]);let b0=L!=null,_0=Sw.useMemo(()=>{function x0(y0){if(!n0.current)return;let q1=_.current.indexOf(y0.currentTarget);if(q1!==-1&&P.current!==q1)P.current=q1,J0(y0)}return{onFocus(y0){H0.current=!0,x0(y0)},onClick:({currentTarget:y0})=>y0.focus({preventScroll:!0}),onMouseMove(y0){if(H0.current=!0,j0.current=!1,x)x0(y0)},onPointerLeave(y0){if(!n0.current||!U0.current||y0.pointerType==="touch")return;H0.current=!0;let q1=y0.relatedTarget;if(!x||_.current.includes(q1))return;if(!I0.current)return;if(P.current=-1,J0(y0),!h)r.current?.focus({preventScroll:!0})}}},[n0,r,x,_,J0,I0,h]),O0=Sw.useCallback(()=>{return m??o?.nodesRef.current.find((x0)=>x0.id===e)?.context?.dataRef?.current.orientation},[e,o,m]),A0=F0((x0)=>{if(U0.current=!1,H0.current=!0,x0.which===229)return;if(!n0.current&&x0.currentTarget===r.current)return;if(D&&OS(x0.key,E,M,R)){if(!OG(x0.key,O0()))Xw(x0);if(Y.setOpen(!1,P0(B0.listNavigation,x0.nativeEvent)),O1(U))if(h)o?.events.emit("virtualfocus",U);else U.focus();return}let l0=P.current,y0=m7(_,b),q1=Dz(_,b);if(!g){if(x0.key==="Home")Xw(x0),P.current=y0,J0(x0);if(x0.key==="End")Xw(x0),P.current=q1,J0(x0)}if(R>1){let D1=p||Array.from({length:_.current.length},()=>({width:1,height:1})),W1=UX(D1,R,d),Gw=W1.findIndex((Uw)=>Uw!=null&&!z8(_,Uw,b)),zw=W1.reduce((Uw,hw,J1)=>hw!=null&&!z8(_,hw,b)?J1:Uw,-1),Lw=W1[KX({current:W1.map((Uw)=>Uw!=null?_.current[Uw]:null)},{event:x0,orientation:E,loopFocus:A,rtl:M,cols:R,disabledIndices:_X([...(typeof b!=="function"?b:null)||_.current.map((Uw,hw)=>z8(_,hw,b)?hw:void 0),void 0],W1),minIndex:Gw,maxIndex:zw,prevIndex:HX(P.current>q1?y0:P.current,D1,W1,R,x0.key===R7?"bl":x0.key===(M?u8:p8)?"tr":"tl"),stopEvent:!0})];if(Lw!=null)P.current=Lw,J0(x0);if(E==="both")return}if(OG(x0.key,E)){if(Xw(x0),W&&!h&&X2(x0.currentTarget.ownerDocument)===x0.currentTarget){P.current=r_(x0.key,E,M)?y0:q1,J0(x0);return}if(r_(x0.key,E,M))if(A)if(l0>=q1)if(k&&l0!==_.current.length)P.current=-1;else H0.current=!1,P.current=y0;else P.current=Ow(_,{startingIndex:l0,disabledIndices:b});else P.current=Math.min(q1,Ow(_,{startingIndex:l0,disabledIndices:b}));else if(A)if(l0<=y0)if(k&&l0!==-1)P.current=_.current.length;else H0.current=!1,P.current=q1;else P.current=Ow(_,{startingIndex:l0,decrement:!0,disabledIndices:b});else P.current=Math.max(y0,Ow(_,{startingIndex:l0,decrement:!0,disabledIndices:b}));if(x6(_,P.current))P.current=-1;J0(x0)}}),c0=Sw.useMemo(()=>{return h&&W&&b0&&{"aria-activedescendant":`${w0}-${L}`}},[h,W,b0,w0,L]),C0=Sw.useMemo(()=>{return{"aria-orientation":E==="both"?void 0:E,...!g?c0:{},onKeyDown(x0){if(x0.key==="Tab"&&x0.shiftKey&&W&&!h){let l0=f1(x0.nativeEvent);if(l0&&!t0(r.current,l0))return;if(Xw(x0),Y.setOpen(!1,P0(B0.focusOut,x0.nativeEvent)),O1(U))U.focus();return}A0(x0)},onPointerMove(){U0.current=!0}}},[c0,A0,r,E,g,Y,W,h,U]),E0=Sw.useMemo(()=>{function x0(y0){if(v==="auto"&&iY(y0.nativeEvent))X0.current=!h}function l0(y0){if(X0.current=v,v==="auto"&&rY(y0.nativeEvent))X0.current=!0}return{onKeyDown(y0){let q1=Y.select("open");U0.current=!1;let D1=y0.key.startsWith("Arrow"),W1=MS(y0.key,O0(),M),Gw=OG(y0.key,E),zw=(D?W1:Gw)||y0.key==="Enter"||y0.key.trim()==="";if(h&&q1)return A0(y0);if(!q1&&!I&&D1)return;if(zw){let Lw=OG(y0.key,O0());z0.current=D&&Lw?null:y0.key}if(D){if(W1)if(Xw(y0),q1)P.current=m7(_,r0.current),J0(y0);else Y.setOpen(!0,P0(B0.listNavigation,y0.nativeEvent,y0.currentTarget));return}if(Gw){if(R0.current!=null)P.current=R0.current;if(Xw(y0),!q1&&I)Y.setOpen(!0,P0(B0.listNavigation,y0.nativeEvent,y0.currentTarget));else A0(y0);if(q1)J0(y0)}return},onFocus(y0){if(Y.select("open")&&!h)P.current=-1,J0(y0)},onPointerDown:l0,onPointerEnter:l0,onMouseDown:x0,onClick:x0}},[A0,r0,v,_,D,J0,Y,I,E,O0,M,R0,h]),o0=Sw.useMemo(()=>{return{...c0,...E0}},[c0,E0]);return Sw.useMemo(()=>N?{reference:o0,floating:C0,item:_0,trigger:E0}:{},[N,o0,C0,E0,_0])}var R4=c(G0(),1);var DS=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function DX(J,X={}){let Y="rootStore"in J?J.rootStore:J,W=Y.useState("open"),K=Y.useState("floatingId"),U=Y.useState("domReferenceElement"),q=Y.useState("floatingElement"),{enabled:_=!0,role:L="dialog"}=X,F=J2(),N=U?.id||F,V=R4.useMemo(()=>g7(q)?.id||K,[q,K]),k=DS.get(L)??L,D=tw()!=null,M=R4.useMemo(()=>{if(k==="tooltip"||L==="label")return v1;return{"aria-haspopup":k==="alertdialog"?"dialog":k,"aria-expanded":"false",...k==="listbox"&&{role:"combobox"},...k==="menu"&&D&&{role:"menuitem"},...L==="select"&&{"aria-autocomplete":"none"},...L==="combobox"&&{"aria-autocomplete":"list"}}},[k,D,L]),h=R4.useMemo(()=>{if(k==="tooltip"||L==="label")return{[`aria-${L==="label"?"labelledby":"describedby"}`]:W?V:void 0};return{...M,"aria-expanded":W?"true":"false","aria-controls":W?V:void 0,...k==="menu"&&{id:N}}},[k,V,W,N,L,M]),v=R4.useMemo(()=>{let I={id:V,...k&&{role:k}};if(k==="tooltip"||L==="label")return I;return{...I,...k==="menu"&&{"aria-labelledby":N}}},[k,V,N,L]),x=R4.useCallback(({active:I,selected:b})=>{let E={role:"option",...I&&{id:`${V}-fui-option`}};switch(L){case"select":case"combobox":return{...E,"aria-selected":b};default:}return{}},[V,L]);return R4.useMemo(()=>_?{reference:h,floating:v,item:x,trigger:M}:{},[_,h,v,M,x])}var g4=c(G0(),1);function s_(J,X){let Y="rootStore"in J?J.rootStore:J,W=Y.useState("open"),K=Y.context.dataRef,{listRef:U,activeIndex:q,onMatch:_,onTypingChange:L,enabled:F=!0,findMatch:N=null,resetMs:V=750,ignoreKeys:k=t2,selectedIndex:A=null}=X,D=a1(),M=g4.useRef(""),h=g4.useRef(A??q??-1),v=g4.useRef(null);k0(()=>{if(W)D.clear(),v.current=null,M.current=""},[W,D]),k0(()=>{if(W&&M.current==="")h.current=A??q??-1},[W,A,q]);let x=F0((m)=>{if(m){if(!K.current.typing)K.current.typing=m,L?.(m)}else if(K.current.typing)K.current.typing=m,L?.(m)}),I=F0((m)=>{function R(t,u,Q0){let r=N?N(u,Q0):u.find((e)=>e?.toLocaleLowerCase().indexOf(Q0.toLocaleLowerCase())===0);return r?t.indexOf(r):-1}let S=U.current;if(M.current.length>0&&M.current[0]!==" "){if(R(S,S,M.current)===-1)x(!1);else if(m.key===" ")Xw(m)}if(S==null||k.includes(m.key)||m.key.length!==1||m.ctrlKey||m.metaKey||m.altKey)return;if(W&&m.key!==" ")Xw(m),x(!0);if(S.every((t)=>t?t[0]?.toLocaleLowerCase()!==t[1]?.toLocaleLowerCase():!0)&&M.current===m.key)M.current="",h.current=v.current;M.current+=m.key,D.start(V,()=>{M.current="",h.current=v.current,x(!1)});let d=h.current,w0=R(S,[...S.slice((d||0)+1),...S.slice(0,(d||0)+1)],M.current);if(w0!==-1)_?.(w0),v.current=w0;else if(m.key!==" ")M.current="",x(!1)}),b=g4.useMemo(()=>({onKeyDown:I}),[I]),E=g4.useMemo(()=>{return{onKeyDown:I,onKeyUp(m){if(m.key===" ")x(!1)}}},[I,x]);return g4.useMemo(()=>F?{reference:b,floating:E}:{},[F,b,E])}function LO(J,X){let[Y,W]=J,K=!1,U=X.length;for(let q=0,_=U-1;q<U;_=q++){let[L,F]=X[q]||[0,0],[N,V]=X[_]||[0,0];if(F>=W!==V>=W&&Y<=(N-L)*(W-F)/(V-F)+L)K=!K}return K}function TS(J,X){return J[0]>=X.x&&J[0]<=X.x+X.width&&J[1]>=X.y&&J[1]<=X.y+X.height}function z9(J={}){let{buffer:X=0.5,blockPointerEvents:Y=!1,requireIntent:W=!0}=J,K=new I5,U=!1,q=null,_=null,L=typeof performance<"u"?performance.now():0;function F(V,k){let A=performance.now(),D=A-L;if(q===null||_===null||D===0)return q=V,_=k,L=A,null;let M=V-q,h=k-_,x=Math.sqrt(M*M+h*h)/D;return q=V,_=k,L=A,x}let N=({x:V,y:k,placement:A,elements:D,onClose:M,nodeId:h,tree:v})=>{return function(I){function b(){K.clear(),M()}if(K.clear(),!D.domReference||!D.floating||A==null||V==null||k==null)return;let{clientX:E,clientY:m}=I,R=[E,m],S=f1(I),p=I.type==="mouseleave",d=t0(D.floating,S),w0=t0(D.domReference,S),t=D.domReference.getBoundingClientRect(),u=D.floating.getBoundingClientRect(),Q0=A.split("-")[0],r=V>u.right-u.width/2,e=k>u.bottom-u.height/2,o=TS(R,t),g=u.width>t.width,X0=u.height>t.height,P=(g?t:u).left,z0=(g?t:u).right,U0=(X0?t:u).top,J0=(X0?t:u).bottom;if(d){if(U=!0,!p)return}if(w0)U=!1;if(w0&&!p){U=!0;return}if(p&&L1(I.relatedTarget)&&t0(D.floating,I.relatedTarget))return;if(v&&c8(v.nodesRef.current,h).some(({context:V0})=>V0?.open))return;if(Q0==="top"&&k>=t.bottom-1||Q0==="bottom"&&k<=t.top+1||Q0==="left"&&V>=t.right-1||Q0==="right"&&V<=t.left+1)return b();let L0=[];switch(Q0){case"top":L0=[[P,t.top+1],[P,u.bottom-1],[z0,u.bottom-1],[z0,t.top+1]];break;case"bottom":L0=[[P,u.top+1],[P,t.bottom-1],[z0,t.bottom-1],[z0,u.top+1]];break;case"left":L0=[[u.right-1,J0],[u.right-1,U0],[t.left+1,U0],[t.left+1,J0]];break;case"right":L0=[[t.right-1,J0],[t.right-1,U0],[u.left+1,U0],[u.left+1,J0]];break;default:}function S0([V0,H0]){switch(Q0){case"top":{let j0=[g?V0+X/2:r?V0+X*4:V0-X*4,H0+X+1],r0=[g?V0-X/2:r?V0+X*4:V0-X*4,H0+X+1],n0=[[u.left,r?u.bottom-X:g?u.bottom-X:u.top],[u.right,r?g?u.bottom-X:u.top:u.bottom-X]];return[j0,r0,...n0]}case"bottom":{let j0=[g?V0+X/2:r?V0+X*4:V0-X*4,H0-X],r0=[g?V0-X/2:r?V0+X*4:V0-X*4,H0-X],n0=[[u.left,r?u.top+X:g?u.top+X:u.bottom],[u.right,r?g?u.top+X:u.bottom:u.top+X]];return[j0,r0,...n0]}case"left":{let j0=[V0+X+1,X0?H0+X/2:e?H0+X*4:H0-X*4],r0=[V0+X+1,X0?H0-X/2:e?H0+X*4:H0-X*4];return[...[[e?u.right-X:X0?u.right-X:u.left,u.top],[e?X0?u.right-X:u.left:u.right-X,u.bottom]],j0,r0]}case"right":{let j0=[V0-X,X0?H0+X/2:e?H0+X*4:H0-X*4],r0=[V0-X,X0?H0-X/2:e?H0+X*4:H0-X*4],n0=[[e?u.left+X:X0?u.left+X:u.right,u.top],[e?X0?u.left+X:u.right:u.left+X,u.bottom]];return[j0,r0,...n0]}default:return[]}}if(LO([E,m],L0))return;if(U&&!o)return b();if(!p&&W){let V0=F(I.clientX,I.clientY),H0=0.1;if(V0!==null&&V0<0.1)return b()}if(!LO([E,m],S0([V,k])))b();else if(!U&&W)K.start(40,b);return}};return N.__options={blockPointerEvents:Y},N}var cz=c(G0(),1);var TX=c(G0(),1);function VO(J){let X=TX.useRef(""),Y=TX.useCallback((K)=>{if(K.defaultPrevented)return;X.current=K.pointerType,J(K,K.pointerType)},[J]);return{onClick:TX.useCallback((K)=>{if(K.detail===0){J(K,"keyboard");return}if("pointerType"in K)J(K,K.pointerType);J(K,X.current),X.current=""},[J]),onPointerDown:Y}}function TG(J){let[X,Y]=cz.useState(null),W=F0((_,L)=>{if(!J)Y(L)}),K=cz.useCallback(()=>{Y(null)},[]),{onClick:U,onPointerDown:q}=VO(W);return cz.useMemo(()=>({openMethod:X,reset:K,triggerProps:{onClick:U,onPointerDown:q}}),[X,K,U,q])}function FO(J){let{store:X,parentContext:Y,actionsRef:W}=J,K=X.useState("open"),U=X.useState("disablePointerDismissal"),q=X.useState("modal"),_=X.useState("popupElement"),{openMethod:L,triggerProps:F,reset:N}=TG(K);fz(X);let{forceUnmount:V}=mz(K,X,()=>{N()}),k=F0((d)=>{let w0=P0(d);return w0.preventUnmountOnClose=()=>{X.set("preventUnmountingOnClose",!0)},w0}),A=S5.useCallback(()=>{X.setOpen(!1,k(B0.imperativeAction))},[X,k]);S5.useImperativeHandle(W,()=>({unmount:V,close:A}),[V,A]);let D=n7({popupStore:X,onOpenChange:X.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[M,h]=S5.useState(0),v=M===0,x=DX(D),I=s7(D,{outsidePressEvent(){if(X.context.internalBackdropRef.current||X.context.backdropRef.current)return"intentional";return{mouse:q==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(d){if("button"in d&&d.button!==0)return!1;if("touches"in d&&d.touches.length!==1)return!1;let w0=f1(d);if(v&&!U){let t=w0;if(q)return X.context.internalBackdropRef.current||X.context.backdropRef.current?X.context.internalBackdropRef.current===t||X.context.backdropRef.current===t||t0(t,_)&&!t?.hasAttribute("data-base-ui-portal"):!0;return!0}return!1},escapeKey:v});$G(K&&q===!0,_);let{getReferenceProps:b,getFloatingProps:E,getTriggerProps:m}=$5([x,I]);X.useContextCallback("onNestedDialogOpen",(d)=>{h(d+1)}),X.useContextCallback("onNestedDialogClose",()=>{h(0)}),S5.useEffect(()=>{if(Y?.onNestedDialogOpen&&K)Y.onNestedDialogOpen(M);if(Y?.onNestedDialogClose&&!K)Y.onNestedDialogClose();return()=>{if(Y?.onNestedDialogClose&&K)Y.onNestedDialogClose()}},[K,Y,M]);let R=S5.useMemo(()=>b(F),[b,F]),S=S5.useMemo(()=>m(F),[m,F]),p=S5.useMemo(()=>E(),[E]);X.useSyncedValues({openMethod:L,activeTriggerProps:R,inactiveTriggerProps:S,popupProps:p,floatingRootContext:D,nestedOpenDialogCount:M})}var xG=c(G0(),1),vG=xG.createContext(void 0);vG.displayName="DialogRootContext";function pw(J){let X=xG.useContext(vG);if(J===!1&&X===void 0)throw Error("Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.");return X}var hG=c(G0(),1);var xS={...uz,modal:p0((J)=>J.modal),nested:p0((J)=>J.nested),nestedOpenDialogCount:p0((J)=>J.nestedOpenDialogCount),disablePointerDismissal:p0((J)=>J.disablePointerDismissal),openMethod:p0((J)=>J.openMethod),descriptionElementId:p0((J)=>J.descriptionElementId),titleElementId:p0((J)=>J.titleElementId),viewportElement:p0((J)=>J.viewportElement),role:p0((J)=>J.role)};class xX extends P6{constructor(J){super(vS(J),{popupRef:hG.createRef(),backdropRef:hG.createRef(),internalBackdropRef:hG.createRef(),triggerElements:new Z8,onOpenChange:void 0,onOpenChangeComplete:void 0},xS)}setOpen=(J,X)=>{if(X.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!J&&X.trigger==null&&this.state.activeTriggerId!=null)X.trigger=this.state.activeTriggerElement??void 0;if(this.context.onOpenChange?.(J,X),X.isCanceled)return;let Y={open:J,nativeEvent:X.event,reason:X.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",Y);let W={open:J},K=X.trigger?.id??null;if(K||J)W.activeTriggerId=K,W.activeTriggerElement=X.trigger??null;this.update(W)}}function vS(J={}){return{...dz(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...J}}var EG=c(G0(),1);var Y5=function(J){return J.open="data-open",J.closed="data-closed",J[J.startingStyle=eJ.startingStyle]="startingStyle",J[J.endingStyle=eJ.endingStyle]="endingStyle",J.anchorHidden="data-anchor-hidden",J}({}),o_=function(J){return J.popupOpen="data-popup-open",J.pressed="data-pressed",J}({}),hS={[o_.popupOpen]:""},ES={[o_.popupOpen]:"",[o_.pressed]:""},PS={[Y5.open]:""},IS={[Y5.closed]:""},bS={[Y5.anchorHidden]:""},lz={open(J){if(J)return hS;return null}},vX={open(J){if(J)return ES;return null}},xw={open(J){if(J)return PS;return IS},anchorHidden(J){if(J)return bS;return null}};var SS={...xw,...h2},n_=EG.forwardRef(function(X,Y){let{render:W,className:K,forceRender:U=!1,...q}=X,{store:_}=pw(),L=_.useState("open"),F=_.useState("nested"),N=_.useState("mounted"),V=_.useState("transitionStatus"),k=EG.useMemo(()=>({open:L,transitionStatus:V}),[L,V]);return h0("div",X,{state:k,ref:[_.context.backdropRef,Y],stateAttributesMapping:SS,props:[{role:"presentation",hidden:!N,style:{userSelect:"none",WebkitUserSelect:"none"}},q],enabled:U||!F})});n_.displayName="DialogBackdrop";var PG=c(G0(),1);var t_=PG.forwardRef(function(X,Y){let{render:W,className:K,disabled:U=!1,nativeButton:q=!0,..._}=X,{store:L}=pw(),F=L.useState("open");function N(D){if(F)L.setOpen(!1,P0(B0.closePress,D.nativeEvent))}let{getButtonProps:V,buttonRef:k}=Z5({disabled:U,native:q}),A=PG.useMemo(()=>({disabled:U}),[U]);return h0("button",X,{state:A,ref:[Y,k],props:[{onClick:N},_,V]})});t_.displayName="DialogClose";var NO=c(G0(),1);var e_=NO.forwardRef(function(X,Y){let{render:W,className:K,id:U,...q}=X,{store:_}=pw(),L=ww(U);return _.useSyncedValueWithCleanup("descriptionElementId",L),h0("p",X,{ref:Y,props:[{id:L},q]})});e_.displayName="DialogDescription";var CG=c(G0(),1);var kO=function(J){return J.nestedDialogs="--nested-dialogs",J}({});var AO=function(J){return J[J.open=Y5.open]="open",J[J.closed=Y5.closed]="closed",J[J.startingStyle=Y5.startingStyle]="startingStyle",J[J.endingStyle=Y5.endingStyle]="endingStyle",J.nested="data-nested",J.nestedDialogOpen="data-nested-dialog-open",J}({});var IG=c(G0(),1),bG=IG.createContext(void 0);bG.displayName="DialogPortalContext";function SG(){let J=IG.useContext(bG);if(J===void 0)throw Error("Base UI: <Dialog.Portal> is missing.");return J}var jO=c(x1(),1),CS={...xw,...h2,nestedDialogOpen(J){return J?{[AO.nestedDialogOpen]:""}:null}},wq=CG.forwardRef(function(X,Y){let{className:W,finalFocus:K,initialFocus:U,render:q,..._}=X,{store:L}=pw(),F=L.useState("descriptionElementId"),N=L.useState("disablePointerDismissal"),V=L.useState("floatingRootContext"),k=L.useState("popupProps"),A=L.useState("modal"),D=L.useState("mounted"),M=L.useState("nested"),h=L.useState("nestedOpenDialogCount"),v=L.useState("open"),x=L.useState("openMethod"),I=L.useState("titleElementId"),b=L.useState("transitionStatus"),E=L.useState("role");SG(),P5({open:v,ref:L.context.popupRef,onComplete(){if(v)L.context.onOpenChangeComplete?.(!0)}});function m(w0){if(w0==="touch")return L.context.popupRef.current;return!0}let R=U===void 0?m:U,S=h>0,p=CG.useMemo(()=>({open:v,nested:M,transitionStatus:b,nestedDialogOpen:S}),[v,M,b,S]),d=h0("div",X,{state:p,props:[k,{"aria-labelledby":I??void 0,"aria-describedby":F??void 0,role:E,tabIndex:-1,hidden:!D,onKeyDown(w0){if(XG.has(w0.key))w0.stopPropagation()},style:{[kO.nestedDialogs]:h}},_],ref:[Y,L.context.popupRef,L.useStateSetter("popupElement")],stateAttributesMapping:CS});return jO.jsx(FX,{context:V,openInteractionType:x,disabled:!D,closeOnFocusOut:!N,initialFocus:R,returnFocus:K,modal:A!==!1,restoreFocus:"popup",children:d})});wq.displayName="DialogPopup";var DO=c(G0(),1);function iz(J){if(Fz(19))return J;return J?"true":void 0}var MO=c(G0(),1),OO=c(x1(),1),hX=MO.forwardRef(function(X,Y){let{cutout:W,...K}=X,U;if(W){let q=W?.getBoundingClientRect();U=`polygon(
252
252
  0% 0%,
253
253
  100% 0%,
254
254
  100% 100%,
@@ -259,7 +259,7 @@ Avoid returning a new reference inside your input selector, e.g.
259
259
  ${q.right}px ${q.bottom}px,
260
260
  ${q.right}px ${q.top}px,
261
261
  ${q.left}px ${q.top}px
262
- )`}return OO.jsx("div",{ref:Y,role:"presentation","data-base-ui-inert":"",...K,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:U}})});hX.displayName="InternalBackdrop";var EX=c(x1(),1),zq=DO.forwardRef(function(X,Y){let{keepMounted:W=!1,...K}=X,{store:U}=pw(),q=U.useState("mounted"),_=U.useState("modal");if(!(q||W))return null;return EX.jsx(bG.Provider,{value:W,children:EX.jsxs(Sz,{ref:Y,...K,children:[q&&_===!0&&EX.jsx(hX,{ref:U.context.internalBackdropRef,inert:iz(!open)}),X.children]})})});zq.displayName="DialogPortal";var TO=c(G0(),1);var Zq=TO.forwardRef(function(X,Y){let{render:W,className:K,id:U,...q}=X,{store:_}=pw(),L=ww(U);return _.useSyncedValueWithCleanup("titleElementId",L),h0("h2",X,{ref:Y,props:[{id:L},q]})});Zq.displayName="DialogTitle";var rz=c(G0(),1);var Jq=rz.forwardRef(function(X,Y){let{render:W,className:K,disabled:U=!1,nativeButton:q=!0,id:_,payload:L,handle:F,...N}=X,V=pw(!0),k=F?.store??V?.store;if(!k)throw Error("Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.");let A=ww(_),D=k.useState("floatingRootContext"),M=k.useState("isOpenedByTrigger",A),h=rz.useRef(null),{registerTrigger:v,isMountedByThisTrigger:x}=gz(A,h,k,{payload:L}),{getButtonProps:I,buttonRef:b}=Z5({disabled:U,native:q}),E=r7(D,{enabled:D!=null}),m=$5([E]),R=rz.useMemo(()=>({disabled:U,open:M}),[U,M]),S=k.useState("triggerProps",x);return h0("button",X,{state:R,ref:[b,Y,v,h],props:[m.getReferenceProps(),S,{[hY]:"",id:A},N,I],stateAttributesMapping:lz})});Jq.displayName="DialogTrigger";var yG=c(G0(),1);var Xq=function(J){return J[J.open=Y5.open]="open",J[J.closed=Y5.closed]="closed",J[J.startingStyle=Y5.startingStyle]="startingStyle",J[J.endingStyle=Y5.endingStyle]="endingStyle",J.nested="data-nested",J.nestedDialogOpen="data-nested-dialog-open",J}({});var SS={...xw,...h2,nested(J){return J?{[Xq.nested]:""}:null},nestedDialogOpen(J){return J?{[Xq.nestedDialogOpen]:""}:null}},$q=yG.forwardRef(function(X,Y){let{className:W,render:K,children:U,...q}=X,_=SG(),{store:L}=pw(),F=L.useState("open"),N=L.useState("nested"),V=L.useState("transitionStatus"),k=L.useState("nestedOpenDialogCount"),A=L.useState("mounted"),D=k>0,M=yG.useMemo(()=>({open:F,nested:N,transitionStatus:V,nestedDialogOpen:D}),[F,N,V,D]);return h0("div",X,{enabled:_||A,state:M,ref:[Y,L.useStateSetter("viewportElement")],stateAttributesMapping:SS,props:[{role:"presentation",hidden:!A,children:U},q]})});$q.displayName="DialogViewport";class RG{constructor(J){this.store=J??new xX}open(J){let X=J?this.store.context.triggerElements.getById(J):void 0;if(J&&!X)console.warn(`Base UI: DialogHandle.open: No trigger found with id "${J}". The dialog will open, but the trigger will not be associated with the dialog.`);this.store.setOpen(!0,P0(B0.imperativeAction,void 0,X))}openWithPayload(J){this.store.set("payload",J),this.store.setOpen(!0,P0(B0.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,P0(B0.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}function xO(){return new RG}function vO(J){let X=J.getBoundingClientRect(),Y=window.getComputedStyle(J,"::before"),W=window.getComputedStyle(J,"::after");if(!(Y.content!=="none"||W.content!=="none"))return X;let U=parseFloat(Y.width)||0,q=parseFloat(Y.height)||0,_=parseFloat(W.width)||0,L=parseFloat(W.height)||0,F=Math.max(X.width,U,_),N=Math.max(X.height,q,L),V=F-X.width,k=N-X.height;return{left:X.left-V/2,right:X.right+V/2,top:X.top-k/2,bottom:X.bottom+k/2}}var G5=c(G0(),1);var CS=(J)=>({name:"arrow",options:J,async fn(X){let{x:Y,y:W,placement:K,rects:U,platform:q,elements:_,middlewareData:L}=X,{element:F,padding:N=0,offsetParent:V="real"}=e5(J,X)||{};if(F==null)return{};let k=nY(N),A={x:Y,y:W},D=WX(K),M=QX(D),h=await q.getDimensions(F),v=D==="y",x=v?"top":"left",I=v?"bottom":"right",b=v?"clientHeight":"clientWidth",E=U.reference[M]+U.reference[D]-A[D]-U.floating[M],m=A[D]-U.reference[D],R=V==="real"?await q.getOffsetParent?.(F):_.floating,S=_.floating[b]||U.floating[M];if(!S||!await q.isElement?.(R))S=_.floating[b]||U.floating[M];let p=E/2-m/2,d=S/2-h[M]/2-1,w0=Math.min(k[x],d),t=Math.min(k[I],d),u=w0,Q0=S-h[M]-t,r=S/2-h[M]/2+p,e=GX(u,r,Q0),o=!L.arrow&&w8(K)!=null&&r!==e&&U.reference[M]/2-(r<u?w0:t)-h[M]/2<0,g=o?r<u?r-u:r-Q0:0;return{[D]:A[D]+g,data:{[D]:e,centerOffset:r-e-g,...o&&{alignmentOffset:g}},reset:o}}}),hO=(J,X)=>({...CS(J),options:[J,X]});var EO={name:"hide",async fn(J){let{width:X,height:Y,x:W,y:K}=J.rects.reference,U=X===0&&Y===0&&W===0&&K===0;return{data:{referenceHidden:(await g_().fn(J)).data?.referenceHidden||U}}}};var PX={sideX:"left",sideY:"top"},PO={name:"adaptiveOrigin",async fn(J){let{x:X,y:Y,rects:{floating:W},elements:{floating:K},platform:U,strategy:q,placement:_}=J,L=u1(K),F=L.getComputedStyle(K);if(!(F.transitionDuration!=="0s"&&F.transitionDuration!==""))return{x:X,y:Y,data:PX};let V=await U.getOffsetParent?.(K),k={width:0,height:0};if(q==="fixed"&&L?.visualViewport)k={width:L.visualViewport.width,height:L.visualViewport.height};else if(V===L){let x=Dw(K);k={width:x.documentElement.clientWidth,height:x.documentElement.clientHeight}}else if(await U.isElement?.(V))k=await U.getDimensions(V);let A=nw(_),D=X,M=Y;if(A==="left")D=k.width-(X+W.width);if(A==="top")M=k.height-(Y+W.height);let h=A==="left"?"right":PX.sideX,v=A==="top"?"bottom":PX.sideY;return{x:D,y:M,data:{sideX:h,sideY:v}}}};function SO(J,X,Y){let W=J==="inline-start"||J==="inline-end";return{top:"top",right:W?Y?"inline-start":"inline-end":"right",bottom:"bottom",left:W?Y?"inline-end":"inline-start":"left"}[X]}function IO(J,X,Y){let{rects:W,placement:K}=J;return{side:SO(X,nw(K),Y),align:w8(K)||"center",anchor:{width:W.reference.width,height:W.reference.height},positioner:{width:W.floating.width,height:W.floating.height}}}function gG(J){let{anchor:X,positionMethod:Y="absolute",side:W="bottom",sideOffset:K=0,align:U="center",alignOffset:q=0,collisionBoundary:_,collisionPadding:L=5,sticky:F=!1,arrowPadding:N=5,disableAnchorTracking:V=!1,keepMounted:k=!1,floatingRootContext:A,mounted:D,collisionAvoidance:M,shiftCrossAxis:h=!1,nodeId:v,adaptiveOrigin:x,lazyFlip:I=!1,externalTree:b}=J,[E,m]=G5.useState(null);if(!D&&E!==null)m(null);let R=M.side||"flip",S=M.align||"flip",p=M.fallbackAxisSide||"end",d=typeof X==="function"?X:void 0,w0=F0(d),t=d?w0:X,u=Kw(X),r=M5()==="rtl",e=E||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":r?"left":"right","inline-start":r?"right":"left"}[W],o=U==="center"?e:`${e}-${U}`,g=L,X0=1,P=W==="bottom"?X0:0,z0=W==="top"?X0:0,U0=W==="right"?X0:0,J0=W==="left"?X0:0;if(typeof g==="number")g={top:g+P,right:g+J0,bottom:g+z0,left:g+U0};else if(g)g={top:(g.top||0)+P,right:(g.right||0)+J0,bottom:(g.bottom||0)+z0,left:(g.left||0)+U0};let L0={boundary:_==="clipping-ancestors"?"clippingAncestors":_,padding:g},S0=G5.useRef(null),V0=Kw(K),H0=Kw(q),n0=[b_((s)=>{let K0=IO(s,W,r),N0=typeof V0.current==="function"?V0.current(K0):V0.current,T0=typeof H0.current==="function"?H0.current(K0):H0.current;return{mainAxis:N0,crossAxis:T0,alignmentAxis:T0}},[typeof K!=="function"?K:0,typeof q!=="function"?q:0,r,W])],n=S==="none"&&R!=="shift",R0=!n&&(F||h||R==="shift"),I0=R==="none"?null:y_({...L0,padding:{top:g.top+X0,right:g.right+X0,bottom:g.bottom+X0,left:g.left+X0},mainAxis:!h&&R==="flip",crossAxis:S==="flip"?"alignment":!1,fallbackAxisSideDirection:p}),j1=n?null:S_((s)=>{let K0=Dw(s.elements.floating).documentElement;return{...L0,rootBoundary:h?{x:0,y:0,width:K0.clientWidth,height:K0.clientHeight}:void 0,mainAxis:S!=="none",crossAxis:R0,limiter:F||h?void 0:C_((N0)=>{if(!S0.current)return{};let{width:T0,height:a0}=S0.current.getBoundingClientRect(),u0=E2(nw(N0.placement)),$1=u0==="y"?T0:a0,d0=u0==="y"?g.left+g.right:g.top+g.bottom;return{offset:$1/2+d0/2}})}},[L0,F,h,g,S]);if(R==="shift"||S==="shift"||U==="center")n0.push(j1,I0);else n0.push(I0,j1);n0.push(R_({...L0,apply({elements:{floating:s},rects:{reference:K0},availableWidth:N0,availableHeight:T0}){Object.entries({"--available-width":`${N0}px`,"--available-height":`${T0}px`,"--anchor-width":`${K0.width}px`,"--anchor-height":`${K0.height}px`}).forEach(([a0,u0])=>{s.style.setProperty(a0,u0)})}}),hO(()=>({element:S0.current||document.createElement("div"),padding:N,offsetParent:"floating"}),[N]),{name:"transformOrigin",fn(s){let{elements:K0,middlewareData:N0,placement:T0,rects:a0,y:u0}=s,$1=nw(T0),d0=E2($1),Ew=S0.current,Q2=N0.arrow?.x||0,K8=N0.arrow?.y||0,a4=Ew?.clientWidth||0,W$=Ew?.clientHeight||0,d6=Q2+a4/2,s4=K8+W$/2,g5=Math.abs(N0.shift?.y||0),A2=a0.reference.height/2,u6=typeof K==="function"?K(IO(s,W,r)):K,KW=g5>u6,FZ={top:`${d6}px calc(100% + ${u6}px)`,bottom:`${d6}px ${-u6}px`,left:`calc(100% + ${u6}px) ${s4}px`,right:`${-u6}px ${s4}px`}[$1],K$=`${d6}px ${a0.reference.y+A2-u0}px`;return K0.floating.style.setProperty("--transform-origin",R0&&d0==="y"&&KW?K$:FZ),{}}},EO,x),k0(()=>{if(!D&&A)A.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[D,A]);let b0=G5.useMemo(()=>({elementResize:!V&&typeof ResizeObserver<"u",layoutShift:!V&&typeof IntersectionObserver<"u"}),[V]),{refs:_0,elements:O0,x:A0,y:c0,middlewareData:C0,update:E0,placement:o0,context:x0,isPositioned:l0,floatingStyles:y0}=c_({rootContext:A,placement:o,middleware:n0,strategy:Y,whileElementsMounted:k?void 0:(...s)=>kX(...s,b0),nodeId:v,externalTree:b}),{sideX:q1,sideY:D1}=C0.adaptiveOrigin||PX,W1=l0?Y:"fixed",Gw=G5.useMemo(()=>x?{position:W1,[q1]:A0,[D1]:c0}:{position:W1,...y0},[x,W1,q1,A0,D1,c0,y0]),zw=G5.useRef(null);k0(()=>{if(!D)return;let s=u.current,K0=typeof s==="function"?s():s,T0=(bO(K0)?K0.current:K0)||null||null;if(T0!==zw.current)_0.setPositionReference(T0),zw.current=T0},[D,_0,t,u]),G5.useEffect(()=>{if(!D)return;let s=u.current;if(typeof s==="function")return;if(bO(s)&&s.current!==zw.current)_0.setPositionReference(s.current),zw.current=s.current},[D,_0,t,u]),G5.useEffect(()=>{if(k&&D&&O0.domReference&&O0.floating)return kX(O0.domReference,O0.floating,E0,b0);return},[k,D,O0,E0,b0]);let Lw=nw(o0),Uw=SO(W,Lw,r),hw=w8(o0)||"center",J1=Boolean(C0.hide?.referenceHidden);k0(()=>{if(I&&D&&l0)m(Lw)},[I,D,l0,Lw]);let N1=G5.useMemo(()=>({position:"absolute",top:C0.arrow?.y,left:C0.arrow?.x}),[C0.arrow]),T=C0.arrow?.centerOffset!==0;return G5.useMemo(()=>({positionerStyles:Gw,arrowStyles:N1,arrowRef:S0,arrowUncentered:T,side:Uw,align:hw,physicalSide:Lw,anchorHidden:J1,refs:_0,context:x0,isPositioned:l0,update:E0}),[Gw,N1,S0,T,Uw,hw,Lw,J1,_0,x0,l0,E0])}function bO(J){return J!=null&&"current"in J}function az(J){return J==="starting"?qj:v1}var fG=c(G0(),1);var IX=fG.forwardRef(function(X,Y){let{className:W,render:K,orientation:U="horizontal",...q}=X,_=fG.useMemo(()=>({orientation:U}),[U]);return h0("div",X,{state:_,ref:Y,props:[{role:"separator","aria-orientation":U},q]})});IX.displayName="Separator";var mG=c(G0(),1);var dG=mG.forwardRef(function(X,Y){let{render:W,className:K,disabled:U=!1,focusableWhenDisabled:q=!1,nativeButton:_=!0,...L}=X,F=Boolean(U),{getButtonProps:N,buttonRef:V}=Z5({disabled:F,focusableWhenDisabled:q,native:_}),k=mG.useMemo(()=>({disabled:F}),[F]);return h0("button",X,{state:k,ref:[Y,V],props:[L,N]})});dG.displayName="Button";var b6={};qz(b6,{Trigger:()=>Hq,SubmenuTrigger:()=>aX,SubmenuRoot:()=>BQ,Separator:()=>IX,Root:()=>zD,RadioItemIndicator:()=>lX,RadioItem:()=>cX,RadioGroup:()=>pX,Positioner:()=>uX,Portal:()=>dX,Popup:()=>mX,Item:()=>fX,GroupLabel:()=>gX,Group:()=>RX,CheckboxItemIndicator:()=>yX,CheckboxItem:()=>CX,Backdrop:()=>SX,Arrow:()=>bX});var $8=c(G0(),1);var uG=c(G0(),1),pG=uG.createContext(void 0);pG.displayName="ContextMenuRootContext";function C5(J=!0){let X=uG.useContext(pG);if(X===void 0&&!J)throw Error("Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>.");return X}var AQ={};qz(AQ,{createHandle:()=>wD,Trigger:()=>Uq,SubmenuTrigger:()=>aX,SubmenuRoot:()=>BQ,Separator:()=>IX,Root:()=>qQ,RadioItemIndicator:()=>lX,RadioItem:()=>cX,RadioGroup:()=>pX,Positioner:()=>uX,Portal:()=>dX,Popup:()=>mX,Item:()=>fX,Handle:()=>kQ,GroupLabel:()=>gX,Group:()=>RX,CheckboxItemIndicator:()=>yX,CheckboxItem:()=>CX,Backdrop:()=>SX,Arrow:()=>bX});var rG=c(G0(),1);var cG=c(G0(),1),lG=cG.createContext(void 0);lG.displayName="MenuPositionerContext";function y5(J){let X=cG.useContext(lG);if(X===void 0&&!J)throw Error("Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>.");return X}var iG=c(G0(),1),sz=iG.createContext(void 0);sz.displayName="MenuRootContext";function p1(J){let X=iG.useContext(sz);if(X===void 0&&!J)throw Error("Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>.");return X}var bX=rG.forwardRef(function(X,Y){let{className:W,render:K,...U}=X,{store:q}=p1(),{arrowRef:_,side:L,align:F,arrowUncentered:N,arrowStyles:V}=y5(),k=q.useState("open"),A=rG.useMemo(()=>({open:k,side:L,align:F,uncentered:N}),[k,L,F,N]);return h0("div",X,{ref:[_,Y],stateAttributesMapping:xw,state:A,props:{style:V,"aria-hidden":!0,...U}})});bX.displayName="MenuArrow";var aG=c(G0(),1);var yS={...xw,...h2},SX=aG.forwardRef(function(X,Y){let{className:W,render:K,...U}=X,{store:q}=p1(),_=q.useState("open"),L=q.useState("mounted"),F=q.useState("transitionStatus"),N=q.useState("lastOpenChangeReason"),V=C5(),k=aG.useMemo(()=>({open:_,transitionStatus:F}),[_,F]);return h0("div",X,{ref:V?.backdropRef?[Y,V.backdropRef]:Y,state:k,stateAttributesMapping:yS,props:[{role:"presentation",hidden:!L,style:{pointerEvents:N===B0.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},U]})});SX.displayName="MenuBackdrop";var nG=c(G0(),1);var sG=c(G0(),1),oG=sG.createContext(void 0);oG.displayName="MenuCheckboxItemContext";function CO(){let J=sG.useContext(oG);if(J===void 0)throw Error("Base UI: MenuCheckboxItemContext is missing. MenuCheckboxItem parts must be placed within <Menu.CheckboxItem>.");return J}var oz=c(G0(),1);var nz={type:"regular-item"};function f4(J){let{closeOnClick:X,disabled:Y=!1,highlighted:W,id:K,store:U,nativeButton:q,itemMetadata:_,nodeId:L}=J,F=oz.useRef(null),N=C5(!0),V=N!==void 0,{events:k}=U.useState("floatingTreeRoot"),{getButtonProps:A,buttonRef:D}=Z5({disabled:Y,focusableWhenDisabled:!0,native:q}),M=oz.useCallback((v)=>{return D5({id:K,role:"menuitem",tabIndex:W?0:-1,onMouseMove(x){if(!L)return;k.emit("itemhover",{nodeId:L,target:x.currentTarget})},onMouseEnter(){if(_.type!=="submenu-trigger")return;_.setActive()},onKeyUp(x){if(x.key===" "&&U.context.typingRef.current)x.preventBaseUIHandler()},onClick(x){if(X)k.emit("close",{domEvent:x,reason:B0.itemPress})},onMouseUp(x){if(N){let I=N.initialCursorPointRef.current;if(N.initialCursorPointRef.current=null,V&&I&&Math.abs(x.clientX-I.x)<=1&&Math.abs(x.clientY-I.y)<=1)return}if(F.current&&U.context.allowMouseUpTriggerRef.current&&(!V||x.button===2)){if(_.type==="regular-item")F.current.click()}}},v,A)},[K,W,A,X,k,U,V,N,_,L]),h=O5(F,D);return oz.useMemo(()=>({getItemProps:M,itemRef:h}),[M,h])}var Yq=function(J){return J.checked="data-checked",J.unchecked="data-unchecked",J.disabled="data-disabled",J.highlighted="data-highlighted",J}({});var m4={checked(J){if(J)return{[Yq.checked]:""};return{[Yq.unchecked]:""}},...h2};var yO=c(x1(),1),CX=nG.forwardRef(function(X,Y){let{render:W,className:K,id:U,label:q,nativeButton:_=!1,disabled:L=!1,closeOnClick:F=!1,checked:N,defaultChecked:V,onCheckedChange:k,...A}=X,D=v5({label:q}),M=y5(!0),h=ww(U),{store:v}=p1(),x=v.useState("isActive",D.index),I=v.useState("itemProps"),[b,E]=Lz({controlled:N,default:V??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:m,itemRef:R}=f4({closeOnClick:F,disabled:L,highlighted:x,id:h,store:v,nativeButton:_,nodeId:M?.nodeId,itemMetadata:nz}),S=nG.useMemo(()=>({disabled:L,highlighted:x,checked:b}),[L,x,b]),p=F0((w0)=>{let t={...P0(B0.itemPress,w0.nativeEvent),preventUnmountOnClose:()=>{}};if(k?.(!b,t),t.isCanceled)return;E((u)=>!u)}),d=h0("div",X,{state:S,stateAttributesMapping:m4,props:[I,{role:"menuitemcheckbox","aria-checked":b,onClick:p},A,m],ref:[R,Y,D.ref]});return yO.jsx(oG.Provider,{value:S,children:d})});CX.displayName="MenuCheckboxItem";var tz=c(G0(),1);var yX=tz.forwardRef(function(X,Y){let{render:W,className:K,keepMounted:U=!1,...q}=X,_=CO(),L=tz.useRef(null),{transitionStatus:F,setMounted:N}=Az(_.checked);P5({open:_.checked,ref:L,onComplete(){if(!_.checked)N(!1)}});let V=tz.useMemo(()=>({checked:_.checked,disabled:_.disabled,highlighted:_.highlighted,transitionStatus:F}),[_.checked,_.disabled,_.highlighted,F]);return h0("span",X,{state:V,ref:[Y,L],stateAttributesMapping:m4,props:{"aria-hidden":!0,...q},enabled:U||_.checked})});yX.displayName="MenuCheckboxItemIndicator";var ez=c(G0(),1);var tG=c(G0(),1),eG=tG.createContext(void 0);eG.displayName="MenuGroupContext";function RO(){let J=tG.useContext(eG);if(J===void 0)throw Error("Base UI: MenuGroupRootContext is missing. Menu group parts must be used within <Menu.Group>.");return J}var gO=c(x1(),1),RX=ez.forwardRef(function(X,Y){let{render:W,className:K,...U}=X,[q,_]=ez.useState(void 0),L=ez.useMemo(()=>({setLabelId:_}),[_]),F=h0("div",X,{ref:Y,props:{role:"group","aria-labelledby":q,...U}});return gO.jsx(eG.Provider,{value:L,children:F})});RX.displayName="MenuGroup";var fO=c(G0(),1);var gX=fO.forwardRef(function(X,Y){let{className:W,render:K,id:U,...q}=X,_=ww(U),{setLabelId:L}=RO();return k0(()=>{return L(_),()=>{L(void 0)}},[L,_]),h0("div",X,{ref:Y,props:{id:_,role:"presentation",...q}})});gX.displayName="MenuGroupLabel";var wQ=c(G0(),1);var fX=wQ.forwardRef(function(X,Y){let{render:W,className:K,id:U,label:q,nativeButton:_=!1,disabled:L=!1,closeOnClick:F=!0,...N}=X,V=v5({label:q}),k=y5(!0),A=ww(U),{store:D}=p1(),M=D.useState("isActive",V.index),h=D.useState("itemProps"),{getItemProps:v,itemRef:x}=f4({closeOnClick:F,disabled:L,highlighted:M,id:A,store:D,nativeButton:_,nodeId:k?.nodeId,itemMetadata:nz}),I=wQ.useMemo(()=>({disabled:L,highlighted:M}),[L,M]);return h0("div",X,{state:I,props:[h,N,v],ref:[x,Y,V.ref]})});fX.displayName="MenuItem";var wZ=c(G0(),1);var zQ=c(G0(),1),mO=zQ.createContext(void 0);mO.displayName="ToolbarRootContext";function dO(J){let X=zQ.useContext(mO);if(X===void 0&&!J)throw Error("Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.");return X}var uO=c(x1(),1),RS={...xw,...h2},mX=wZ.forwardRef(function(X,Y){let{render:W,className:K,finalFocus:U,...q}=X,{store:_}=p1(),{side:L,align:F}=y5(),N=dO(!0)!=null,V=_.useState("open"),k=_.useState("transitionStatus"),A=_.useState("popupProps"),D=_.useState("mounted"),M=_.useState("instantType"),h=_.useState("activeTriggerElement"),v=_.useState("parent"),x=_.useState("lastOpenChangeReason"),I=_.useState("rootId"),b=_.useState("floatingRootContext"),E=_.useState("floatingTreeRoot"),m=_.useState("closeDelay"),R=_.useState("activeTriggerElement");P5({open:V,ref:_.context.popupRef,onComplete(){if(V)_.context.onOpenChangeComplete?.(!0)}}),wZ.useEffect(()=>{function u(Q0){_.setOpen(!1,P0(Q0.reason,Q0.domEvent))}return E.events.on("close",u),()=>{E.events.off("close",u)}},[E.events,_]);let S=_.useState("hoverEnabled"),p=_.useState("disabled");OX(b,{enabled:S&&!p&&v.type!=="context-menu"&&v.type!=="menubar",closeDelay:m});let d=wZ.useMemo(()=>({transitionStatus:k,side:L,align:F,open:V,nested:v.type==="menu",instant:M}),[k,L,F,V,v.type,M]),w0=h0("div",X,{state:d,ref:[Y,_.context.popupRef],stateAttributesMapping:RS,props:[A,{onKeyDown(u){if(N&&XG.has(u.key))u.stopPropagation()}},az(k),q,{"data-rootownerid":I}]}),t=v.type===void 0||v.type==="context-menu";if(h||v.type==="menubar"&&x!==B0.outsidePress)t=!0;return uO.jsx(FX,{context:b,modal:!1,disabled:!D,returnFocus:U===void 0?t:U,initialFocus:v.type!=="menu",restoreFocus:!0,externalTree:v.type!=="menubar"?E:void 0,previousFocusableElement:R,nextFocusableElement:v.type===void 0?_.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:v.type===void 0?_.context.beforeContentFocusGuardRef:void 0,children:w0})});mX.displayName="MenuPopup";var cO=c(G0(),1);var ZQ=c(G0(),1),JQ=ZQ.createContext(void 0);JQ.displayName="MenuPortalContext";function pO(){let J=ZQ.useContext(JQ);if(J===void 0)throw Error("Base UI: <Menu.Portal> is missing.");return J}var Gq=c(x1(),1),dX=cO.forwardRef(function(X,Y){let{keepMounted:W=!1,...K}=X,{store:U}=p1();if(!(U.useState("mounted")||W))return null;return Gq.jsx(JQ.Provider,{value:W,children:Gq.jsx(Sz,{ref:Y,...K})})});dX.displayName="MenuPortal";var X8=c(G0(),1);var zZ=c(x1(),1),uX=X8.forwardRef(function(X,Y){let{anchor:W,positionMethod:K="absolute",className:U,render:q,side:_,align:L,sideOffset:F=0,alignOffset:N=0,collisionBoundary:V="clipping-ancestors",collisionPadding:k=5,arrowPadding:A=5,sticky:D=!1,disableAnchorTracking:M=!1,collisionAvoidance:h=Bj,...v}=X,{store:x}=p1(),I=pO(),b=C5(!0),E=x.useState("parent"),m=x.useState("floatingRootContext"),R=x.useState("floatingTreeRoot"),S=x.useState("mounted"),p=x.useState("open"),d=x.useState("modal"),w0=x.useState("activeTriggerElement"),t=x.useState("lastOpenChangeReason"),u=x.useState("floatingNodeId"),Q0=x.useState("floatingParentNodeId"),r=W,e=F,o=N,g=L,X0=h;if(E.type==="context-menu"){if(r=W??E.context?.anchor,g=g??"start",!_&&g!=="center")o=X.alignOffset??2,e=X.sideOffset??-5}let P=_,z0=g;if(E.type==="menu")P=P??"inline-end",z0=z0??"start",X0=X.collisionAvoidance??EY;else if(E.type==="menubar")P=P??"bottom",z0=z0??"start";let U0=E.type==="context-menu",J0=gG({anchor:r,floatingRootContext:m,positionMethod:b?"fixed":K,mounted:S,side:P,sideOffset:e,align:z0,alignOffset:o,arrowPadding:U0?0:A,collisionBoundary:V,collisionPadding:k,sticky:D,nodeId:u,keepMounted:I,disableAnchorTracking:M,collisionAvoidance:X0,shiftCrossAxis:U0,externalTree:R}),L0=X8.useMemo(()=>{let n0={};if(!p)n0.pointerEvents="none";return{role:"presentation",hidden:!S,style:{...J0.positionerStyles,...n0}}},[p,S,J0.positionerStyles]);X8.useEffect(()=>{function n0(n){if(n.open){if(n.parentNodeId===u)x.set("hoverEnabled",!1);if(n.nodeId!==u&&n.parentNodeId===x.select("floatingParentNodeId"))x.setOpen(!1,P0(B0.siblingOpen))}else if(n.parentNodeId===u){if(n.reason!==B0.siblingOpen)x.set("hoverEnabled",!0)}}return R.events.on("menuopenchange",n0),()=>{R.events.off("menuopenchange",n0)}},[x,R.events,u]),X8.useEffect(()=>{if(x.select("floatingParentNodeId")==null)return;function n0(n){if(n.open||n.nodeId!==x.select("floatingParentNodeId"))return;let R0=n.reason??B0.siblingOpen;x.setOpen(!1,P0(R0))}return R.events.on("menuopenchange",n0),()=>{R.events.off("menuopenchange",n0)}},[R.events,x]),X8.useEffect(()=>{function n0(n){if(!p||n.nodeId!==x.select("floatingParentNodeId"))return;if(n.target&&w0&&w0!==n.target)x.setOpen(!1,P0(B0.siblingOpen))}return R.events.on("itemhover",n0),()=>{R.events.off("itemhover",n0)}},[R.events,p,w0,x]),X8.useEffect(()=>{let n0={open:p,nodeId:u,parentNodeId:Q0,reason:x.select("lastOpenChangeReason")};R.events.emit("menuopenchange",n0)},[R.events,p,x,u,Q0]);let S0=X8.useMemo(()=>({open:p,side:J0.side,align:J0.align,anchorHidden:J0.anchorHidden,nested:E.type==="menu"}),[p,J0.side,J0.align,J0.anchorHidden,E.type]),V0=X8.useMemo(()=>({side:J0.side,align:J0.align,arrowRef:J0.arrowRef,arrowUncentered:J0.arrowUncentered,arrowStyles:J0.arrowStyles,nodeId:J0.context.nodeId}),[J0.side,J0.align,J0.arrowRef,J0.arrowUncentered,J0.arrowStyles,J0.context.nodeId]),H0=h0("div",X,{state:S0,stateAttributesMapping:xw,ref:[Y,x.useStateSetter("positionerElement")],props:[L0,v]}),j0=S&&E.type!=="menu"&&(E.type!=="menubar"&&d&&t!==B0.triggerHover||E.type==="menubar"&&E.context.modal),r0=null;if(E.type==="menubar")r0=E.context.contentElement;else if(E.type===void 0)r0=w0;return zZ.jsxs(lG.Provider,{value:V0,children:[j0&&zZ.jsx(hX,{ref:E.type==="context-menu"||E.type==="nested-context-menu"?E.context.internalBackdropRef:null,inert:iz(!p),cutout:r0}),zZ.jsx(V_,{id:u,children:zZ.jsx(Vz,{elementsRef:x.context.itemDomElements,labelsRef:x.context.itemLabels,children:H0})})]})});uX.displayName="MenuPositioner";var Z9=c(G0(),1);var XQ=c(G0(),1),$Q=XQ.createContext(void 0);$Q.displayName="MenuRadioGroupContext";function lO(){let J=XQ.useContext($Q);if(J===void 0)throw Error("Base UI: MenuRadioGroupContext is missing. MenuRadioGroup parts must be placed within <Menu.RadioGroup>.");return J}var iO=c(x1(),1),pX=Z9.memo(Z9.forwardRef(function(X,Y){let{render:W,className:K,value:U,defaultValue:q,onValueChange:_,disabled:L=!1,...F}=X,[N,V]=Lz({controlled:U,default:q,name:"MenuRadioGroup"}),k=F0(_),A=F0((v,x)=>{if(k?.(v,x),x.isCanceled)return;V(v)}),D=Z9.useMemo(()=>({disabled:L}),[L]),M=h0("div",X,{state:D,ref:Y,props:{role:"group","aria-disabled":L||void 0,...F}}),h=Z9.useMemo(()=>({value:N,setValue:A,disabled:L}),[N,A,L]);return iO.jsx($Q.Provider,{value:h,children:M})}));pX.displayName="MenuRadioGroup";var QQ=c(G0(),1);var YQ=c(G0(),1),GQ=YQ.createContext(void 0);GQ.displayName="MenuRadioItemContext";function rO(){let J=YQ.useContext(GQ);if(J===void 0)throw Error("Base UI: MenuRadioItemContext is missing. MenuRadioItem parts must be placed within <Menu.RadioItem>.");return J}var aO=c(x1(),1),cX=QQ.forwardRef(function(X,Y){let{render:W,className:K,id:U,label:q,nativeButton:_=!1,disabled:L=!1,closeOnClick:F=!1,value:N,...V}=X,k=v5({label:q}),A=y5(!0),D=ww(U),{store:M}=p1(),h=M.useState("isActive",k.index),v=M.useState("itemProps"),{value:x,setValue:I,disabled:b}=lO(),E=b||L,m=x===N,{getItemProps:R,itemRef:S}=f4({closeOnClick:F,disabled:E,highlighted:h,id:D,store:M,nativeButton:_,nodeId:A?.nodeId,itemMetadata:nz}),p=QQ.useMemo(()=>({disabled:E,highlighted:h,checked:m}),[E,h,m]),d=F0((t)=>{let u={...P0(B0.itemPress,t.nativeEvent),preventUnmountOnClose:()=>{}};I(N,u)}),w0=h0("div",X,{state:p,stateAttributesMapping:m4,props:[v,{role:"menuitemradio","aria-checked":m,onClick:d},V,R],ref:[S,Y,k.ref]});return aO.jsx(GQ.Provider,{value:p,children:w0})});cX.displayName="MenuRadioItem";var ZZ=c(G0(),1);var lX=ZZ.forwardRef(function(X,Y){let{render:W,className:K,keepMounted:U=!1,...q}=X,_=rO(),L=ZZ.useRef(null),{transitionStatus:F,setMounted:N}=Az(_.checked);P5({open:_.checked,ref:L,onComplete(){if(!_.checked)N(!1)}});let V=ZZ.useMemo(()=>({checked:_.checked,disabled:_.disabled,highlighted:_.highlighted,transitionStatus:F}),[_.checked,_.disabled,_.highlighted,F]);return h0("span",X,{state:V,stateAttributesMapping:m4,ref:[Y,L],props:{"aria-hidden":!0,...q},enabled:U||_.checked})});lX.displayName="MenuRadioItemIndicator";var Yw=c(G0(),1),oO=c(m8(),1);var WQ=c(G0(),1),sO=WQ.createContext(null);sO.displayName="MenubarContext";function KQ(J){let X=WQ.useContext(sO);if(X===null&&!J)throw Error("Base UI: MenubarContext is missing. Menubar parts must be placed within <Menubar>.");return X}var iX=c(G0(),1);var gS={...uz,disabled:p0((J)=>J.parent.type==="menubar"?J.parent.context.disabled||J.disabled:J.disabled),modal:p0((J)=>(J.parent.type===void 0||J.parent.type==="context-menu")&&(J.modal??!0)),allowMouseEnter:p0((J)=>J.parent.type==="menu"?J.parent.store.select("allowMouseEnter"):J.allowMouseEnter),stickIfOpen:p0((J)=>J.stickIfOpen),parent:p0((J)=>J.parent),rootId:p0((J)=>{if(J.parent.type==="menu")return J.parent.store.select("rootId");return J.parent.type!==void 0?J.parent.context.rootId:J.rootId}),activeIndex:p0((J)=>J.activeIndex),isActive:p0((J,X)=>J.activeIndex===X),hoverEnabled:p0((J)=>J.hoverEnabled),instantType:p0((J)=>J.instantType),lastOpenChangeReason:p0((J)=>J.openChangeReason),floatingTreeRoot:p0((J)=>{if(J.parent.type==="menu")return J.parent.store.select("floatingTreeRoot");return J.floatingTreeRoot}),floatingNodeId:p0((J)=>J.floatingNodeId),floatingParentNodeId:p0((J)=>J.floatingParentNodeId),itemProps:p0((J)=>J.itemProps),closeDelay:p0((J)=>J.closeDelay),keyboardEventRelay:p0((J)=>{if(J.keyboardEventRelay)return J.keyboardEventRelay;if(J.parent.type==="menu")return J.parent.store.select("keyboardEventRelay");return})};class JZ extends P6{constructor(J){super({...fS(),...J},{positionerRef:iX.createRef(),popupRef:iX.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:iX.createRef(),beforeContentFocusGuardRef:iX.createRef(),onOpenChangeComplete:void 0,triggerElements:new Z8},gS);this.observe(p0((X)=>X.allowMouseEnter),(X,Y)=>{if(this.state.parent.type==="menu"&&X!==Y)this.state.parent.store.set("allowMouseEnter",X)}),this.unsubscribeParentListener=this.observe("parent",(X)=>{if(this.unsubscribeParentListener?.(),X.type==="menu"){this.unsubscribeParentListener=X.store.subscribe(()=>{this.notifyAll()}),this.context.allowMouseUpTriggerRef=X.store.context.allowMouseUpTriggerRef;return}if(X.type!==void 0)this.context.allowMouseUpTriggerRef=X.context.allowMouseUpTriggerRef;this.unsubscribeParentListener=null})}setOpen(J,X){this.state.floatingRootContext.context.events.emit("setOpen",{open:J,eventDetails:X})}static useStore(J,X){return r1(()=>{return J??new JZ(X)}).current}unsubscribeParentListener=null}function fS(){return{...dz(),disabled:!1,modal:!0,allowMouseEnter:!0,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new l7,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:v1,keyboardEventRelay:void 0,closeDelay:0}}var UQ=c(G0(),1),HQ=UQ.createContext(void 0);HQ.displayName="MenuSubmenuRootContext";function _Q(){return UQ.useContext(HQ)}var Qq=c(x1(),1);function qQ(J){let{children:X,open:Y,onOpenChange:W,onOpenChangeComplete:K,defaultOpen:U=!1,disabled:q=!1,modal:_,loopFocus:L=!0,orientation:F="vertical",actionsRef:N,closeParentOnEsc:V=!1,handle:k,triggerId:A,defaultTriggerId:D=null,highlightItemOnHover:M=!0}=J,h=C5(!0),v=p1(!0),x=KQ(!0),I=_Q(),b=Yw.useMemo(()=>{if(I&&v)return{type:"menu",store:v.store};if(x)return{type:"menubar",context:x};if(h&&!v)return{type:"context-menu",context:h};return{type:void 0}},[h,v,x,I]),E=JZ.useStore(k?.store,{parent:b}),m=E.useState("floatingTreeRoot"),R=LX(m),S=tw();k0(()=>{if(h&&!v)E.update({parent:{type:"context-menu",context:h},floatingNodeId:R,floatingParentNodeId:S});else if(v)E.update({floatingNodeId:R,floatingParentNodeId:S})},[h,v,R,S,E]),E.useControlledProp("open",Y,U),E.useControlledProp("activeTriggerId",A,D),E.useContextCallback("onOpenChangeComplete",K);let p=E.useState("open"),d=E.useState("activeTriggerElement"),w0=E.useState("positionerElement"),t=E.useState("hoverEnabled"),u=E.useState("modal"),Q0=E.useState("disabled"),r=E.useState("lastOpenChangeReason"),e=E.useState("parent"),o=E.useState("activeIndex"),g=E.useState("payload"),X0=E.useState("floatingParentNodeId"),P=Yw.useRef(null),z0=X0!=null,U0;if(e.type!==void 0&&_!==void 0)console.warn("Base UI: The `modal` prop is not supported on nested menus. It will be ignored.");E.useSyncedValues({disabled:q,modal:e.type===void 0?_:void 0,rootId:J2()});let{openMethod:J0,triggerProps:L0,reset:S0}=TG(p);fz(E);let{forceUnmount:V0}=mz(p,E,()=>{E.update({allowMouseEnter:!1,stickIfOpen:!0}),S0()}),H0=Yw.useRef(e.type!=="context-menu"),j0=a1();Yw.useEffect(()=>{if(!p)P.current=null;if(e.type!=="context-menu")return;if(!p){j0.clear(),H0.current=!1;return}j0.start(500,()=>{H0.current=!0})},[j0,p,e.type]),$G(p&&u&&r!==B0.triggerHover&&J0!=="touch",w0),k0(()=>{if(!p&&!t)E.set("hoverEnabled",!0)},[p,t,E]);let r0=Yw.useRef(!0),n0=a1(),n=F0((J1,N1)=>{let T=N1.reason;if(p===J1&&N1.trigger===d)return;if(N1.preventUnmountOnClose=()=>{E.set("preventUnmountingOnClose",!0)},!J1&&N1.trigger==null)N1.trigger=d??void 0;if(W?.(J1,N1),N1.isCanceled)return;let s={open:J1,nativeEvent:N1.event,reason:N1.reason,nested:z0};U0?.emit("openchange",s);let K0=N1.event;if(J1===!1&&K0?.type==="click"&&K0.pointerType==="touch"&&!r0.current)return;if(!J1&&o!==null){let u0=E.context.itemDomElements.current[o];queueMicrotask(()=>{u0?.setAttribute("tabindex","-1")})}if(J1&&T===B0.triggerFocus)r0.current=!1,n0.start(300,()=>{r0.current=!0});else r0.current=!0,n0.clear();let N0=(T===B0.triggerPress||T===B0.itemPress)&&K0.detail===0&&K0?.isTrusted,T0=!J1&&(T===B0.escapeKey||T==null);function a0(){let u0={open:J1,openChangeReason:T};P.current=N1.event??null;let $1=N1.trigger?.id??null;if($1||J1)u0.activeTriggerId=$1,u0.activeTriggerElement=N1.trigger??null;E.update(u0)}if(T===B0.triggerHover)oO.flushSync(a0);else a0();if(e.type==="menubar"&&(T===B0.triggerFocus||T===B0.focusOut||T===B0.triggerHover||T===B0.listNavigation||T===B0.siblingOpen))E.set("instantType","group");else if(N0||T0)E.set("instantType",N0?"click":"dismiss");else E.set("instantType",void 0)}),R0=Yw.useCallback((J1)=>{let N1=P0(J1);return N1.preventUnmountOnClose=()=>{E.set("preventUnmountingOnClose",!0)},N1},[E]),I0=Yw.useCallback(()=>{E.setOpen(!1,R0(B0.imperativeAction))},[E,R0]);Yw.useImperativeHandle(N,()=>({unmount:V0,close:I0}),[V0,I0]);let j1;if(e.type==="context-menu")j1=e.context;Yw.useImperativeHandle(j1?.positionerRef,()=>w0,[w0]),Yw.useImperativeHandle(j1?.actionsRef,()=>({setOpen:n}),[n]);let b0=n7({popupStore:E,onOpenChange:n});U0=b0.context.events,Yw.useEffect(()=>{let J1=({open:N1,eventDetails:T})=>n(N1,T);return U0.on("setOpen",J1),()=>{U0?.off("setOpen",J1)}},[U0,n]);let _0=s7(b0,{enabled:!Q0,bubbles:V&&e.type==="menu",outsidePress(){if(e.type!=="context-menu"||P.current?.type==="contextmenu")return!0;return H0.current},externalTree:z0?m:void 0}),O0=DX(b0,{role:"menu"}),A0=M5(),c0=Yw.useCallback((J1)=>{if(E.select("activeIndex")===J1)return;E.set("activeIndex",J1)},[E]),C0=a_(b0,{enabled:!Q0,listRef:E.context.itemDomElements,activeIndex:o,nested:e.type!==void 0,loopFocus:L,orientation:F,parentOrientation:e.type==="menubar"?e.context.orientation:void 0,rtl:A0==="rtl",disabledIndices:t2,onNavigate:c0,openOnArrowKeyDown:e.type!=="context-menu",externalTree:z0?m:void 0,focusItemOnHover:M}),E0=Yw.useCallback((J1)=>{E.context.typingRef.current=J1},[E]),o0=s_(b0,{listRef:E.context.itemLabels,activeIndex:o,resetMs:Hj,onMatch:(J1)=>{if(p&&J1!==o)E.set("activeIndex",J1)},onTypingChange:E0}),{getReferenceProps:x0,getFloatingProps:l0,getItemProps:y0,getTriggerProps:q1}=$5([_0,O0,C0,o0]),D1=Yw.useMemo(()=>{let J1=D5(x0(),{onMouseEnter(){E.set("hoverEnabled",!0)},onMouseMove(){E.set("allowMouseEnter",!0)}},L0);return delete J1.role,J1},[x0,E,L0]),W1=Yw.useMemo(()=>{let J1=q1();if(!J1)return J1;let N1=D5(J1,L0);return delete N1.role,delete N1["aria-controls"],N1},[q1,L0]),Gw=x5(),zw=Yw.useMemo(()=>l0({onMouseEnter(){if(e.type==="menu")Gw.request(()=>E.set("hoverEnabled",!1))},onMouseMove(){E.set("allowMouseEnter",!0)},onClick(){if(E.select("hoverEnabled"))E.set("hoverEnabled",!1)},onKeyDown(J1){let N1=E.select("keyboardEventRelay");if(N1&&!J1.isPropagationStopped())N1(J1)}}),[l0,e.type,Gw,E]),Lw=Yw.useMemo(()=>y0(),[y0]);E.useSyncedValues({floatingRootContext:b0,activeTriggerProps:D1,inactiveTriggerProps:W1,popupProps:zw,itemProps:Lw});let Uw=Yw.useMemo(()=>({store:E,parent:b}),[E,b]),hw=Qq.jsx(sz.Provider,{value:Uw,children:typeof X==="function"?X({payload:g}):X});if(e.type===void 0||e.type==="context-menu")return Qq.jsx(F_,{externalTree:m,children:hw});return hw}var nO=c(G0(),1);var Wq=c(x1(),1);function BQ(J){let X=p1().store,Y=nO.useMemo(()=>({parentMenu:X}),[X]);return Wq.jsx(HQ.Provider,{value:Y,children:Wq.jsx(qQ,{...J})})}var Cw=c(G0(),1),Kq=c(m8(),1);var LQ=c(G0(),1);function VQ(J={}){let{highlightItemOnHover:X,highlightedIndex:Y,onHighlightedIndexChange:W}=Mz(),{ref:K,index:U}=v5(J),q=Y===U,_=LQ.useRef(null),L=O5(K,_);return{compositeProps:LQ.useMemo(()=>({tabIndex:q?0:-1,onFocus(){W(U)},onMouseMove(){let N=_.current;if(!X||!N)return;let V=N.hasAttribute("disabled")||N.ariaDisabled==="true";if(!q&&!V)N.focus()}}),[q,W,U,X]),compositeRef:L,index:U}}function tO(J){let{render:X,className:Y,state:W=v1,props:K=t2,refs:U=t2,metadata:q,stateAttributesMapping:_,tag:L="div",...F}=J,{compositeProps:N,compositeRef:V}=VQ({metadata:q});return h0(L,J,{state:W,ref:[...U,V],props:[N,...K,F],stateAttributesMapping:_})}function rX(J){if(O1(J)&&J.hasAttribute("data-rootownerid"))return J.getAttribute("data-rootownerid")??void 0;if(z5(J))return;return rX(e2(J))}var FQ=c(G0(),1);function eO(J){let{enabled:X=!0,mouseDownAction:Y,open:W}=J,K=FQ.useRef(!1);return FQ.useMemo(()=>{if(!X)return v1;return{onMouseDown:(U)=>{if(Y==="open"&&!W||Y==="close"&&W)K.current=!0,Dw(U.currentTarget).addEventListener("click",()=>{K.current=!1},{once:!0})},onClick:(U)=>{if(K.current)K.current=!1,U.preventBaseUIHandler()}}},[X,Y,W])}var d4=c(x1(),1),NQ=2,Uq=Cw.forwardRef(function(X,Y){let{render:W,className:K,disabled:U=!1,nativeButton:q=!0,id:_,openOnHover:L,delay:F=100,closeDelay:N=0,handle:V,payload:k,...A}=X,D=p1(!0),M=V?.store??D?.store;if(!M)throw Error("Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle.");let h=ww(_),v=M.useState("isTriggerActive",h),x=M.useState("floatingRootContext"),I=M.useState("isOpenedByTrigger",h),b=Cw.useRef(null),E=dS(),m=Mz(!0),R=$2(),S=Cw.useMemo(()=>{return R??new l7},[R]),p=LX(S),d=tw(),{registerTrigger:w0,isMountedByThisTrigger:t}=gz(h,b,M,{payload:k,closeDelay:N,parent:E,floatingTreeRoot:S,floatingNodeId:p,floatingParentNodeId:d,keyboardEventRelay:m?.relayKeyboardEvent}),u=M.useState("disabled"),Q0=U||u||E.type==="menubar"&&E.context.disabled,{getButtonProps:r,buttonRef:e}=Z5({disabled:Q0,native:q});Cw.useEffect(()=>{if(!I&&E.type===void 0)M.context.allowMouseUpTriggerRef.current=!1},[M,I,E.type]);let o=Cw.useRef(null),g=a1(),X0=F0((O0)=>{if(!o.current)return;g.clear(),M.context.allowMouseUpTriggerRef.current=!1;let A0=O0.target;if(t0(o.current,A0)||t0(M.select("positionerElement"),A0)||A0===o.current)return;if(A0!=null&&rX(A0)===M.select("rootId"))return;let c0=vO(o.current);if(O0.clientX>=c0.left-NQ&&O0.clientX<=c0.right+NQ&&O0.clientY>=c0.top-NQ&&O0.clientY<=c0.bottom+NQ)return;S.events.emit("close",{domEvent:O0,reason:B0.cancelOpen})});Cw.useEffect(()=>{if(I&&M.select("lastOpenChangeReason")===B0.triggerHover)Dw(o.current).addEventListener("mouseup",X0,{once:!0})},[I,X0,M]);let P=E.type==="menubar"&&E.context.hasSubmenuOpen,U0=e7(x,{enabled:(L??P??!1)&&!Q0&&E.type!=="context-menu"&&(E.type!=="menubar"||P&&!t),handleClose:z9({blockPointerEvents:E.type!=="menubar"}),mouseOnly:!0,move:!1,restMs:E.type===void 0?F:void 0,delay:{close:N},triggerElementRef:b,externalTree:S,isActiveTrigger:v}),J0=mS(I,M.select("lastOpenChangeReason")),L0=r7(x,{enabled:!Q0&&E.type!=="context-menu",event:I&&E.type==="menubar"?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:E.type===void 0?J0:!1}),S0=jX(x,{enabled:!Q0&&(E.type!=="menubar"&&I||P)}),V0=eO({open:I,enabled:E.type==="menubar",mouseDownAction:"open"}),H0=$5([L0,S0]),j0=E.type==="menubar",r0=Cw.useMemo(()=>({disabled:Q0,open:I}),[Q0,I]),n0=M.useState("triggerProps",t),n=[o,Y,e,w0,b],R0=[H0.getReferenceProps(),U0??v1,n0,{"aria-haspopup":"menu",id:h,onMouseDown:(O0)=>{if(M.select("open"))return;g.start(200,()=>{M.context.allowMouseUpTriggerRef.current=!0}),Dw(O0.currentTarget).addEventListener("mouseup",X0,{once:!0})}},j0?{role:"menuitem"}:{},V0,A,r],I0=Cw.useRef(null),j1=F0((O0)=>{Kq.flushSync(()=>{M.setOpen(!1,P0(B0.focusOut,O0.nativeEvent,O0.currentTarget))}),tj(I0.current)?.focus()}),b0=F0((O0)=>{let A0=M.select("positionerElement");if(A0&&v6(O0,A0))M.context.beforeContentFocusGuardRef.current?.focus();else{Kq.flushSync(()=>{M.setOpen(!1,P0(B0.focusOut,O0.nativeEvent,O0.currentTarget))});let c0=nj(b.current);while(c0!==null&&t0(A0,c0)||c0?.hasAttribute("aria-hidden")){let C0=c0;if(c0=xz(c0),c0===C0)break}c0?.focus()}}),_0=h0("button",X,{enabled:!j0,stateAttributesMapping:vX,state:r0,ref:n,props:R0});if(j0)return d4.jsx(tO,{tag:"button",render:W,className:K,state:r0,refs:n,props:R0,stateAttributesMapping:vX});if(I)return d4.jsxs(Cw.Fragment,{children:[d4.jsx(l8,{ref:I0,onFocus:j1},`${h}-pre-focus-guard`),d4.jsx(Cw.Fragment,{children:_0},h),d4.jsx(l8,{ref:M.context.triggerFocusTargetRef,onFocus:b0},`${h}-post-focus-guard`)]});return d4.jsx(Cw.Fragment,{children:_0},h)});Uq.displayName="MenuTrigger";function mS(J,X){let Y=a1(),[W,K]=Cw.useState(!1);return k0(()=>{if(J&&X==="trigger-hover")K(!0),Y.start(_j,()=>{K(!1)});else if(!J)Y.clear(),K(!1)},[J,X,Y]),W}function dS(){let J=C5(!0),X=p1(!0),Y=KQ(!0);return Cw.useMemo(()=>{if(Y)return{type:"menubar",context:Y};if(J&&!X)return{type:"context-menu",context:J};return{type:void 0}},[J,X,Y])}var i8=c(G0(),1);var aX=i8.forwardRef(function(X,Y){let{render:W,className:K,label:U,id:q,nativeButton:_=!1,openOnHover:L=!0,delay:F=100,closeDelay:N=0,disabled:V=!1,...k}=X,A=v5(),D=y5(),{store:M}=p1(),h=ww(q),v=M.useState("open"),x=M.useState("floatingRootContext"),I=M.useState("floatingTreeRoot"),b=p_(h,M),E=i8.useCallback((S0)=>{let V0=b(S0);if(S0!==null&&M.select("open")&&M.select("activeTriggerId")==null)M.update({activeTriggerId:h,activeTriggerElement:S0,closeDelay:N});return V0},[b,N,M,h]),m=i8.useRef(null),R=i8.useCallback((S0)=>{m.current=S0,M.set("activeTriggerElement",S0)},[M]),S=_Q();if(!S?.parentMenu)throw Error("Base UI: <Menu.SubmenuTrigger> must be placed in <Menu.SubmenuRoot>.");M.useSyncedValue("closeDelay",N);let p=S.parentMenu,d=p.useState("itemProps"),w0=p.useState("isActive",A.index),t=i8.useMemo(()=>({type:"submenu-trigger",setActive:()=>p.set("activeIndex",A.index)}),[p,A.index]),u=M.useState("disabled"),Q0=V||u,{getItemProps:r,itemRef:e}=f4({closeOnClick:!1,disabled:Q0,highlighted:w0,id:h,store:M,nativeButton:_,itemMetadata:t,nodeId:D?.nodeId}),o=M.useState("hoverEnabled"),g=M.useState("allowMouseEnter"),X0=e7(x,{enabled:o&&L&&!Q0&&g,handleClose:z9({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:F,delay:{open:F,close:N},triggerElementRef:m,externalTree:I}),P=r7(x,{enabled:!Q0,event:"mousedown",toggle:!L,ignoreMouse:L,stickIfOpen:!1}),z0=$5([P]),U0=M.useState("triggerProps",!0);delete U0.id;let J0=i8.useMemo(()=>({disabled:Q0,highlighted:w0,open:v}),[Q0,w0,v]);return h0("div",X,{state:J0,stateAttributesMapping:lz,props:[z0.getReferenceProps(),X0,U0,d,{tabIndex:v||w0?0:-1,onBlur(){if(w0)p.set("activeIndex",null)}},k,r],ref:[Y,A.ref,e,E,R]})});aX.displayName="MenuSubmenuTrigger";class kQ{constructor(){this.store=new JZ}open(J){let X=J?this.store.context.triggerElements.getById(J):void 0;if(J&&!X)throw Error(`Base UI: MenuHandle.open: No trigger found with id "${J}".`);this.store.setOpen(!0,P0("imperative-action",void 0,X))}close(){this.store.setOpen(!1,P0("imperative-action",void 0,void 0))}get isOpen(){return this.store.state.open}}function wD(){return new kQ}var jQ=c(x1(),1);function zD(J){let[X,Y]=$8.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),W=$8.useRef(null),K=$8.useRef(null),U=$8.useRef(null),q=$8.useRef(null),_=$8.useRef(!0),L=$8.useRef(null),F=J2(),N=$8.useMemo(()=>({anchor:X,setAnchor:Y,actionsRef:U,backdropRef:W,internalBackdropRef:K,positionerRef:q,allowMouseUpTriggerRef:_,initialCursorPointRef:L,rootId:F}),[X,F]);return jQ.jsx(pG.Provider,{value:N,children:jQ.jsx(sz.Provider,{value:void 0,children:jQ.jsx(AQ.Root,{...J})})})}var r8=c(G0(),1);var ZD=500,Hq=r8.forwardRef(function(X,Y){let{render:W,className:K,...U}=X,{setAnchor:q,actionsRef:_,internalBackdropRef:L,backdropRef:F,positionerRef:N,allowMouseUpTriggerRef:V,initialCursorPointRef:k,rootId:A}=C5(!1),{store:D}=p1(!1),M=D.useState("open"),h=r8.useRef(null),v=r8.useRef(null),x=a1(),I=a1(),b=r8.useRef(!1);function E(t,u,Q0){let r=Q0.type.startsWith("touch");k.current={x:t,y:u},q({getBoundingClientRect(){return DOMRect.fromRect({width:r?10:0,height:r?10:0,x:t,y:u})}}),b.current=!1,_.current?.setOpen(!0,P0(B0.triggerPress,Q0)),I.start(ZD,()=>{b.current=!0})}function m(t){V.current=!0,Xw(t),E(t.clientX,t.clientY,t.nativeEvent),Dw(h.current).addEventListener("mouseup",(Q0)=>{if(V.current=!1,!b.current)return;I.clear(),b.current=!1;let r=f1(Q0);if(t0(N.current,r))return;if(A&&r&&rX(r)===A)return;_.current?.setOpen(!1,P0(B0.cancelOpen,Q0))},{once:!0})}function R(t){if(V.current=!1,t.touches.length===1){t.stopPropagation();let u=t.touches[0];v.current={x:u.clientX,y:u.clientY},x.start(ZD,()=>{if(v.current)E(v.current.x,v.current.y,t.nativeEvent)})}}function S(t){if(x.isStarted()&&v.current&&t.touches.length===1){let u=t.touches[0],Q0=10,r=Math.abs(u.clientX-v.current.x),e=Math.abs(u.clientY-v.current.y);if(r>10||e>10)x.clear()}}function p(){x.clear(),v.current=null}r8.useEffect(()=>{function t(Q0){let e=f1(Q0);if(t0(h.current,e)||t0(L.current,e)||t0(F.current,e))Q0.preventDefault()}let u=Dw(h.current);return u.addEventListener("contextmenu",t),()=>{u.removeEventListener("contextmenu",t)}},[F,L]);let d=r8.useMemo(()=>({open:M}),[M]);return h0("div",X,{state:d,ref:[h,Y],props:[{onContextMenu:m,onTouchStart:R,onTouchMove:S,onTouchEnd:p,onTouchCancel:p,style:{WebkitTouchCallout:"none"}},U],stateAttributesMapping:vX})});Hq.displayName="ContextMenuTrigger";var a8={};qz(a8,{createHandle:()=>xO,Viewport:()=>$q,Trigger:()=>Jq,Title:()=>Zq,Root:()=>$D,Portal:()=>zq,Popup:()=>wq,Handle:()=>RG,Description:()=>e_,Close:()=>t_,Backdrop:()=>n_});var JD=c(G0(),1);var XD=c(x1(),1);function $D(J){let{children:X,open:Y,defaultOpen:W=!1,onOpenChange:K,onOpenChangeComplete:U,disablePointerDismissal:q=!1,modal:_=!0,actionsRef:L,handle:F,triggerId:N,defaultTriggerId:V=null}=J,k=pw(!0),A=Boolean(k),D=r1(()=>{return F?.store??new xX({open:Y??W,activeTriggerId:N!==void 0?N:V,modal:_,disablePointerDismissal:q,nested:A})}).current;D.useControlledProp("open",Y,W),D.useControlledProp("activeTriggerId",N,V),D.useSyncedValues({disablePointerDismissal:q,nested:A,modal:_}),D.useContextCallback("onOpenChange",K),D.useContextCallback("onOpenChangeComplete",U);let M=D.useState("payload");FO({store:D,actionsRef:L,parentContext:k?.store.context,onOpenChange:K,triggerIdProp:N});let h=JD.useMemo(()=>({store:D}),[D]);return XD.jsx(vG.Provider,{value:h,children:typeof X==="function"?X({payload:M}):X})}var GD=c(G0(),1);var S6=c(G0(),1);var MQ="data-composite-item-active";var uS=[];function YD(J){let{itemSizes:X,cols:Y=1,loopFocus:W=!0,dense:K=!1,orientation:U="both",direction:q,highlightedIndex:_,onHighlightedIndexChange:L,rootRef:F,enableHomeAndEndKeys:N=!1,stopEventPropagation:V=!1,disabledIndices:k,modifierKeys:A=uS}=J,[D,M]=S6.useState(0),h=Y>1,v=S6.useRef(null),x=O5(v,F),I=S6.useRef([]),b=S6.useRef(!1),E=_??D,m=F0((p,d=!1)=>{if((L??M)(p),d){let w0=I.current[p];__(v.current,w0,q,U)}}),R=F0((p)=>{if(p.size===0||b.current)return;b.current=!0;let d=Array.from(p.keys()),w0=d.find((u)=>u?.hasAttribute(MQ))??null,t=w0?d.indexOf(w0):-1;if(t!==-1)m(t);__(v.current,w0,q,U)}),S=S6.useMemo(()=>({"aria-orientation":U==="both"?void 0:U,ref:x,onFocus(p){if(!v.current||!H_(p.target))return;p.target.setSelectionRange(0,p.target.value.length??0)},onKeyDown(p){let d=N?JM:U_;if(!d.has(p.key))return;if(pS(p,A))return;if(!v.current)return;let t=q==="rtl",u=t?vz:c7,Q0={horizontal:u,vertical:S4,both:u}[U],r=t?c7:vz,e={horizontal:r,vertical:p7,both:r}[U];if(H_(p.target)&&!jj(p.target)){let J0=p.target.selectionStart,L0=p.target.selectionEnd,S0=p.target.value??"";if(J0==null||p.shiftKey||J0!==L0)return;if(p.key!==e&&J0<S0.length)return;if(p.key!==Q0&&J0>0)return}let o=E,g=m7(I,k),X0=Dz(I,k);if(h){let J0=X||Array.from({length:I.current.length},()=>({width:1,height:1})),L0=UX(J0,Y,K),S0=L0.findIndex((H0)=>H0!=null&&!z8(I,H0,k)),V0=L0.reduce((H0,j0,r0)=>j0!=null&&!z8(I,j0,k)?r0:H0,-1);o=L0[KX({current:L0.map((H0)=>H0?I.current[H0]:null)},{event:p,orientation:U,loopFocus:W,cols:Y,disabledIndices:_X([...k||I.current.map((H0,j0)=>z8(I,j0)?j0:void 0),void 0],L0),minIndex:S0,maxIndex:V0,prevIndex:HX(E>X0?g:E,J0,L0,Y,p.key===S4?"bl":p.key===c7?"tr":"tl"),rtl:t})]}let P={horizontal:[u],vertical:[S4],both:[u,S4]}[U],z0={horizontal:[r],vertical:[p7],both:[r,p7]}[U],U0=h?d:{horizontal:N?zM:W_,vertical:N?ZM:K_,both:d}[U];if(N){if(p.key===hz)o=g;else if(p.key===Ez)o=X0}if(o===E&&(P.includes(p.key)||z0.includes(p.key)))if(W&&o===X0&&P.includes(p.key))o=g;else if(W&&o===g&&z0.includes(p.key))o=X0;else o=Ow(I,{startingIndex:o,decrement:z0.includes(p.key),disabledIndices:k});if(o!==E&&!x6(I,o)){if(V)p.stopPropagation();if(U0.has(p.key))p.preventDefault();m(o,!0),queueMicrotask(()=>{I.current[o]?.focus()})}}}),[Y,K,q,k,I,N,E,h,X,W,x,A,m,U,V]);return S6.useMemo(()=>({props:S,highlightedIndex:E,onHighlightedIndexChange:m,elementsRef:I,disabledIndices:k,onMapChange:R,relayKeyboardEvent:S.onKeyDown}),[S,E,m,I,k,R])}function pS(J,X){for(let Y of XM.values()){if(X.includes(Y))continue;if(J.getModifierState(Y))return!0}return!1}var _q=c(x1(),1);function QD(J){let{render:X,className:Y,refs:W=t2,props:K=t2,state:U=v1,stateAttributesMapping:q,highlightedIndex:_,onHighlightedIndexChange:L,orientation:F,dense:N,itemSizes:V,loopFocus:k,cols:A,enableHomeAndEndKeys:D,onMapChange:M,stopEventPropagation:h=!0,rootRef:v,disabledIndices:x,modifierKeys:I,highlightItemOnHover:b=!1,tag:E="div",...m}=J,R=M5(),{props:S,highlightedIndex:p,onHighlightedIndexChange:d,elementsRef:w0,onMapChange:t,relayKeyboardEvent:u}=YD({itemSizes:V,cols:A,loopFocus:k,dense:N,orientation:F,highlightedIndex:_,onHighlightedIndexChange:L,rootRef:v,stopEventPropagation:h,enableHomeAndEndKeys:D,direction:R,disabledIndices:x,modifierKeys:I}),Q0=h0(E,J,{state:U,ref:W,props:[S,...K,m],stateAttributesMapping:q}),r=GD.useMemo(()=>({highlightedIndex:p,onHighlightedIndexChange:d,highlightItemOnHover:b,relayKeyboardEvent:u}),[p,d,b,u]);return _q.jsx(dY.Provider,{value:r,children:_q.jsx(Vz,{elementsRef:w0,onMapChange:(e)=>{M?.(e),t(e)},children:Q0})})}function XZ(J){let X=uw(J),Y=parseFloat(X.width)||0,W=parseFloat(X.height)||0,K=O1(J),U=K?J.offsetWidth:Y,q=K?J.offsetHeight:W;if(I4(Y)!==U||I4(W)!==q)Y=U,W=q;return{width:Y,height:W}}var oX=c(G0(),1);var cS=typeof ResizeObserver<"u",lS=()=>!0;function WD(J){let{popupElement:X,positionerElement:Y,content:W,mounted:K,enabled:U=lS,onMeasureLayout:q,onMeasureLayoutComplete:_,side:L,direction:F}=J,N=oX.useRef(!0),V=kz(X,!0,!1),k=x5(),A=oX.useRef(null),D=F0(q),M=F0(_),h=oX.useMemo(()=>{let v=L==="top",x=L==="left";if(F==="rtl")v=v||L==="inline-end",x=x||L==="inline-end";else v=v||L==="inline-start",x=x||L==="inline-start";return v?{position:"absolute",[L==="top"?"bottom":"top"]:"0",[x?"right":"left"]:"0"}:v1},[L,F]);k0(()=>{if(!K||!U()||!cS){N.current=!0,A.current=null;return}if(!X||!Y)return;Object.entries(h).forEach(([p,d])=>{X.style.setProperty(p,d)});let v=new ResizeObserver((p)=>{let d=p[0];if(d)if(A.current===null)A.current={width:Math.ceil(d.borderBoxSize[0].inlineSize),height:Math.ceil(d.borderBoxSize[0].blockSize)};else A.current.width=Math.ceil(d.borderBoxSize[0].inlineSize),A.current.height=Math.ceil(d.borderBoxSize[0].blockSize)});v.observe(X),X.style.setProperty("--popup-width","auto"),X.style.setProperty("--popup-height","auto");let x=sX(X,"position","static"),I=sX(X,"transform","none"),b=sX(X,"scale","1"),E=sX(Y,"--available-width","max-content"),m=sX(Y,"--available-height","max-content");if(D?.(),N.current||A.current===null){Y.style.setProperty("--positioner-width","max-content"),Y.style.setProperty("--positioner-height","max-content");let p=XZ(X);return Y.style.setProperty("--positioner-width",`${p.width}px`),Y.style.setProperty("--positioner-height",`${p.height}px`),x(),I(),b(),E(),m(),M?.(null,p),N.current=!1,()=>{v.disconnect()}}X.style.setProperty("--popup-width","auto"),X.style.setProperty("--popup-height","auto"),Y.style.setProperty("--positioner-width","max-content"),Y.style.setProperty("--positioner-height","max-content");let R=XZ(X);X.style.setProperty("--popup-width",`${A.current.width}px`),X.style.setProperty("--popup-height",`${A.current.height}px`),x(),I(),E(),m(),M?.(A.current,R),Y.style.setProperty("--positioner-width",`${R.width}px`),Y.style.setProperty("--positioner-height",`${R.height}px`);let S=new AbortController;return k.request(()=>{X.style.setProperty("--popup-width",`${R.width}px`),X.style.setProperty("--popup-height",`${R.height}px`),V(()=>{X.style.setProperty("--popup-width","auto"),X.style.setProperty("--popup-height","auto")},S.signal)}),()=>{v.disconnect(),S.abort(),k.cancel()}},[W,X,Y,V,k,U,K,D,M,h])}function sX(J,X,Y){let W=J.style.getPropertyValue(X);return J.style.setProperty(X,Y),()=>{J.style.setProperty(X,W)}}var KD=c(G0(),1);function UD(J){let[X,Y]=KD.useState({current:J,previous:null});if(J!==X.current)Y({current:J,previous:X.current});return X.previous}var OQ=c(G0(),1),HD=c(m8(),1);var _D=c(x1(),1),qq=OQ.forwardRef(function(X,Y){let{children:W,container:K,className:U,render:q,..._}=X,{portalNode:L,portalSubtree:F}=HG({container:K,ref:Y,componentProps:X,elementProps:_});if(!F&&!L)return null;return _D.jsxs(OQ.Fragment,{children:[F,L&&HD.createPortal(W,L)]})});qq.displayName="FloatingPortalLite";var R6={};qz(R6,{Tab:()=>Vq,Root:()=>Lq,Panel:()=>Nq,List:()=>Aq,Indicator:()=>Fq});var Y2=c(G0(),1);var DQ=c(G0(),1),TQ=DQ.createContext(void 0);TQ.displayName="TabsRootContext";function C6(){let J=DQ.useContext(TQ);if(J===void 0)throw Error("Base UI: TabsRootContext is missing. Tabs parts must be placed within <Tabs.Root>.");return J}var qD=function(J){return J.activationDirection="data-activation-direction",J.orientation="data-orientation",J}({});var u4={tabActivationDirection:(J)=>({[qD.activationDirection]:J})};var Bq=c(x1(),1),Lq=Y2.forwardRef(function(X,Y){let{className:W,defaultValue:K=0,onValueChange:U,orientation:q="horizontal",render:_,value:L,...F}=X,N=M5(),V=Object.hasOwn(X,"defaultValue"),k=Y2.useRef([]),[A,D]=Y2.useState(()=>new Map),[M,h]=Lz({controlled:L,default:K,name:"Tabs",state:"value"}),v=L!==void 0,[x,I]=Y2.useState(()=>new Map),[b,E]=Y2.useState("none"),m=F0((o,g)=>{if(U?.(o,g),g.isCanceled)return;h(o),E(g.activationDirection)}),R=F0((o,g)=>{D((X0)=>{if(X0.get(o)===g)return X0;let P=new Map(X0);return P.set(o,g),P})}),S=F0((o,g)=>{D((X0)=>{if(!X0.has(o)||X0.get(o)!==g)return X0;let P=new Map(X0);return P.delete(o),P})}),p=Y2.useCallback((o)=>{return A.get(o)},[A]),d=Y2.useCallback((o)=>{for(let g of x.values())if(o===g?.value)return g?.id;return},[x]),w0=Y2.useCallback((o)=>{if(o===void 0)return null;for(let[g,X0]of x.entries())if(X0!=null&&o===(X0.value??X0.index))return g;return null},[x]),t=Y2.useMemo(()=>({direction:N,getTabElementBySelectedValue:w0,getTabIdByPanelValue:d,getTabPanelIdByValue:p,onValueChange:m,orientation:q,registerMountedTabPanel:R,setTabMap:I,unregisterMountedTabPanel:S,tabActivationDirection:b,value:M}),[N,w0,d,p,m,q,R,I,S,b,M]),u=Y2.useMemo(()=>{for(let o of x.values())if(o!=null&&o.value===M)return o;return},[x,M]),Q0=Y2.useMemo(()=>{for(let o of x.values())if(o!=null&&!o.disabled)return o.value;return},[x]);k0(()=>{if(v||x.size===0)return;let o=u?.disabled,g=u==null&&M!==null;if(V&&o&&M===K)return;if(!o&&!g)return;let P=Q0??null;if(M===P)return;h(P),E("none")},[K,Q0,V,v,u,E,h,x,M]);let e=h0("div",X,{state:{orientation:q,tabActivationDirection:b},ref:Y,props:F,stateAttributesMapping:u4});return Bq.jsx(TQ.Provider,{value:t,children:Bq.jsx(Vz,{elementsRef:k,children:e})})});Lq.displayName="TabsRoot";var y6=c(G0(),1);var xQ=c(G0(),1),vQ=xQ.createContext(void 0);vQ.displayName="TabsListContext";function hQ(){let J=xQ.useContext(vQ);if(J===void 0)throw Error("Base UI: TabsListContext is missing. TabsList parts must be placed within <Tabs.List>.");return J}var Vq=y6.forwardRef(function(X,Y){let{className:W,disabled:K=!1,render:U,value:q,id:_,nativeButton:L=!0,...F}=X,{value:N,getTabPanelIdByValue:V,orientation:k}=C6(),{activateOnFocus:A,highlightedTabIndex:D,onTabActivation:M,setHighlightedTabIndex:h,tabsListElement:v}=hQ(),x=ww(_),I=y6.useMemo(()=>({disabled:K,id:x,value:q}),[K,x,q]),{compositeProps:b,compositeRef:E,index:m}=VQ({metadata:I}),R=q===N,S=y6.useRef(!1);k0(()=>{if(S.current){S.current=!1;return}if(!(R&&m>-1&&D!==m))return;let X0=v;if(X0!=null){let P=X2(Dw(X0));if(P&&t0(X0,P))return}if(!K)h(m)},[R,m,D,h,K,v]);let{getButtonProps:p,buttonRef:d}=Z5({disabled:K,native:L,focusableWhenDisabled:!0}),w0=V(q),t=y6.useRef(!1),u=y6.useRef(!1);function Q0(X0){if(R||K)return;M(q,P0(B0.none,X0.nativeEvent,void 0,{activationDirection:"none"}))}function r(X0){if(R)return;if(m>-1&&!K)h(m);if(K)return;if(A&&(!t.current||t.current&&u.current))M(q,P0(B0.none,X0.nativeEvent,void 0,{activationDirection:"none"}))}function e(X0){if(R||K)return;t.current=!0;function P(){t.current=!1,u.current=!1}if(!X0.button||X0.button===0)u.current=!0,Dw(X0.currentTarget).addEventListener("pointerup",P,{once:!0})}let o=y6.useMemo(()=>({disabled:K,active:R,orientation:k}),[K,R,k]);return h0("button",X,{state:o,ref:[Y,d,E],props:[b,{role:"tab","aria-controls":w0,"aria-selected":R,id:x,onClick:Q0,onFocus:r,onPointerDown:e,[MQ]:R?"":void 0,onKeyDownCapture(){S.current=!0}},F,p]})});Vq.displayName="TabsTab";var Q5=c(G0(),1);var BD='!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();';var J9=function(J){return J.activeTabLeft="--active-tab-left",J.activeTabRight="--active-tab-right",J.activeTabTop="--active-tab-top",J.activeTabBottom="--active-tab-bottom",J.activeTabWidth="--active-tab-width",J.activeTabHeight="--active-tab-height",J}({});var EQ=c(x1(),1),iS={...u4,activeTabPosition:()=>null,activeTabSize:()=>null},Fq=Q5.forwardRef(function(X,Y){let{className:W,render:K,renderBeforeHydration:U=!1,...q}=X,{getTabElementBySelectedValue:_,orientation:L,tabActivationDirection:F,value:N}=C6(),{tabsListElement:V}=hQ(),[k,A]=Q5.useState(!1),{value:D}=C6();Nz(()=>A(!0));let M=KO();Q5.useEffect(()=>{if(N!=null&&V!=null&&typeof ResizeObserver<"u"){let u=new ResizeObserver(M);return u.observe(V),()=>{u.disconnect()}}return},[N,V,M]);let h=0,v=0,x=0,I=0,b=0,E=0,m=!1;if(N!=null&&V!=null){let u=_(N);if(m=!0,u!=null){let{width:Q0,height:r}=XZ(u),{width:e,height:o}=XZ(V),g=u.getBoundingClientRect(),X0=V.getBoundingClientRect(),P=e>0?X0.width/e:1,z0=o>0?X0.height/o:1;if(Math.abs(P)>Number.EPSILON&&Math.abs(z0)>Number.EPSILON){let J0=g.left-X0.left,L0=g.top-X0.top;h=J0/P+V.scrollLeft-V.clientLeft,x=L0/z0+V.scrollTop-V.clientTop}else h=u.offsetLeft,x=u.offsetTop;b=Q0,E=r,v=V.scrollWidth-h-b,I=V.scrollHeight-x-E}}let R=Q5.useMemo(()=>m?{left:h,right:v,top:x,bottom:I}:null,[h,v,x,I,m]),S=Q5.useMemo(()=>m?{width:b,height:E}:null,[b,E,m]),p=Q5.useMemo(()=>{if(!m)return;return{[J9.activeTabLeft]:`${h}px`,[J9.activeTabRight]:`${v}px`,[J9.activeTabTop]:`${x}px`,[J9.activeTabBottom]:`${I}px`,[J9.activeTabWidth]:`${b}px`,[J9.activeTabHeight]:`${E}px`}},[h,v,x,I,b,E,m]),d=m&&b>0&&E>0,w0=Q5.useMemo(()=>({orientation:L,activeTabPosition:R,activeTabSize:S,tabActivationDirection:F}),[L,R,S,F]),t=h0("span",X,{state:w0,ref:Y,props:[{role:"presentation",style:p,hidden:!d},q,{suppressHydrationWarning:!0}],stateAttributesMapping:iS});if(D==null)return null;return EQ.jsxs(Q5.Fragment,{children:[t,!k&&U&&EQ.jsx("script",{dangerouslySetInnerHTML:{__html:BD},suppressHydrationWarning:!0})]})});Fq.displayName="TabsIndicator";var nX=c(G0(),1);var LD=function(J){return J.index="data-index",J.activationDirection="data-activation-direction",J.orientation="data-orientation",J.hidden="data-hidden",J}({});var Nq=nX.forwardRef(function(X,Y){let{className:W,value:K,render:U,keepMounted:q=!1,..._}=X,{value:L,getTabIdByPanelValue:F,orientation:N,tabActivationDirection:V,registerMountedTabPanel:k,unregisterMountedTabPanel:A}=C6(),D=ww(),M=nX.useMemo(()=>({id:D,value:K}),[D,K]),{ref:h,index:v}=v5({metadata:M}),x=K!==L,I=F(K),b=nX.useMemo(()=>({hidden:x,orientation:N,tabActivationDirection:V}),[x,N,V]),E=h0("div",X,{state:b,ref:[Y,h],props:[{"aria-labelledby":I,hidden:x,id:D??void 0,role:"tabpanel",tabIndex:x?-1:0,[LD.index]:v},_],stateAttributesMapping:u4});if(k0(()=>{if(x&&!q)return;if(D==null)return;return k(K,D),()=>{A(K,D)}},[x,q,K,D,k,A]),!(!x||q))return null;return E});Nq.displayName="TabsPanel";var Y8=c(G0(),1);var kq=c(x1(),1),Aq=Y8.forwardRef(function(X,Y){let{activateOnFocus:W=!1,className:K,loopFocus:U=!0,render:q,..._}=X,{getTabElementBySelectedValue:L,onValueChange:F,orientation:N,value:V,setTabMap:k,tabActivationDirection:A}=C6(),[D,M]=Y8.useState(0),[h,v]=Y8.useState(null),x=rS(V,N,h,L),I=F0((R,S)=>{if(R!==V){let p=x(R);S.activationDirection=p,F(R,S)}}),b=Y8.useMemo(()=>({orientation:N,tabActivationDirection:A}),[N,A]),E={"aria-orientation":N==="vertical"?"vertical":void 0,role:"tablist"},m=Y8.useMemo(()=>({activateOnFocus:W,highlightedTabIndex:D,onTabActivation:I,setHighlightedTabIndex:M,tabsListElement:h,value:V}),[W,D,I,M,h,V]);return kq.jsx(vQ.Provider,{value:m,children:kq.jsx(QD,{render:q,className:K,state:b,refs:[Y,v],props:[E,_],stateAttributesMapping:u4,highlightedIndex:D,enableHomeAndEndKeys:!0,loopFocus:U,orientation:N,onHighlightedIndexChange:M,onMapChange:k,disabledIndices:t2})})});Aq.displayName="TabsList";function VD(J,X){let{left:Y,top:W}=J.getBoundingClientRect(),{left:K,top:U}=X.getBoundingClientRect(),q=Y-K,_=W-U;return{left:q,top:_}}function rS(J,X,Y,W){let[K,U]=Y8.useState(null);return k0(()=>{if(J==null||Y==null){U(null);return}let q=W(J);if(q==null){U(null);return}let{left:_,top:L}=VD(q,Y);U(X==="horizontal"?_:L)},[X,W,Y,J]),Y8.useCallback((q)=>{if(q===J)return"none";if(q==null)return U(null),"none";if(q!=null&&Y!=null){let _=W(q);if(_!=null){let{left:L,top:F}=VD(_,Y);if(K==null)return U(X==="horizontal"?L:F),"none";if(X==="horizontal"){if(L<K)return U(L),"left";if(L>K)return U(L),"right"}else if(F<K)return U(F),"up";else if(F>K)return U(F),"down"}}return"none"},[W,X,K,Y,J])}var o8={};qz(o8,{createHandle:()=>vD,Viewport:()=>Iq,Trigger:()=>jq,Root:()=>AD,Provider:()=>Eq,Positioner:()=>Dq,Portal:()=>Oq,Popup:()=>Tq,Handle:()=>dQ,Arrow:()=>xq});var s8=c(G0(),1);var PQ=c(G0(),1),IQ=PQ.createContext(void 0);IQ.displayName="TooltipRootContext";function R5(J){let X=PQ.useContext(IQ);if(X===void 0&&!J)throw Error("Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.");return X}var FD=c(G0(),1),ND=c(m8(),1);var aS={...uz,disabled:p0((J)=>J.disabled),instantType:p0((J)=>J.instantType),isInstantPhase:p0((J)=>J.isInstantPhase),trackCursorAxis:p0((J)=>J.trackCursorAxis),disableHoverablePopup:p0((J)=>J.disableHoverablePopup),lastOpenChangeReason:p0((J)=>J.openChangeReason),closeDelay:p0((J)=>J.closeDelay)};class $Z extends P6{constructor(J){super({...sS(),...J},{popupRef:FD.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Z8},aS)}setOpen=(J,X)=>{let Y=X.reason,W=Y===B0.triggerHover,K=J&&Y===B0.triggerFocus,U=!J&&(Y===B0.triggerPress||Y===B0.escapeKey);if(X.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(J,X),X.isCanceled)return;let q=()=>{let _={open:J,openChangeReason:Y};if(K)_.instantType="focus";else if(U)_.instantType="dismiss";else if(Y===B0.triggerHover)_.instantType=void 0;let L=X.trigger?.id??null;if(L||J)_.activeTriggerId=L,_.activeTriggerElement=X.trigger??null;this.update(_)};if(W)ND.flushSync(q);else q()};static useStore(J,X){let Y=r1(()=>{return J??new $Z(X)}).current,W=n7({popupStore:Y,onOpenChange:Y.setOpen});return Y.state.floatingRootContext=W,Y}}function sS(){return{...dz(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeDelay:0}}var kD=c(x1(),1);function AD(J){let{disabled:X=!1,defaultOpen:Y=!1,open:W,disableHoverablePopup:K=!1,trackCursorAxis:U="none",actionsRef:q,onOpenChange:_,onOpenChangeComplete:L,handle:F,triggerId:N,defaultTriggerId:V=null,children:k}=J,A=$Z.useStore(F?.store,{open:W??Y,activeTriggerId:N!==void 0?N:V});A.useControlledProp("open",W,Y),A.useControlledProp("activeTriggerId",N,V),A.useContextCallback("onOpenChange",_),A.useContextCallback("onOpenChangeComplete",L);let D=A.useState("open"),M=A.useState("activeTriggerId"),h=A.useState("payload");A.useSyncedValues({trackCursorAxis:U,disableHoverablePopup:K});let v=!X&&D;k0(()=>{if(D&&X)A.setOpen(!1,P0(B0.disabled))},[D,X,A]),A.useSyncedValue("disabled",X),fz(A);let{forceUnmount:x,transitionStatus:I}=mz(v,A),b=A.useState("isInstantPhase"),E=A.useState("instantType"),m=A.useState("lastOpenChangeReason"),R=s8.useRef(null);k0(()=>{if(I==="ending"&&m===B0.none||I!=="ending"&&b){if(E!=="delay")R.current=E;A.set("instantType","delay")}else if(R.current!==null)A.set("instantType",R.current),R.current=null},[I,b,m,E,A]),k0(()=>{if(v){if(M==null)A.set("payload",void 0)}},[A,M,v]);let S=s8.useCallback(()=>{A.setOpen(!1,oS(A,B0.imperativeAction))},[A]);s8.useImperativeHandle(q,()=>({unmount:x,close:S}),[x,S]);let p=A.useState("floatingRootContext"),d=jX(p,{enabled:!X}),w0=s7(p,{enabled:!X,referencePress:!0}),t=v_(p,{enabled:!X&&U!=="none",axis:U==="none"?void 0:U}),{getReferenceProps:u,getFloatingProps:Q0,getTriggerProps:r}=$5([d,w0,t]),e=s8.useMemo(()=>u(),[u]),o=s8.useMemo(()=>r(),[r]),g=s8.useMemo(()=>Q0(),[Q0]);return A.useSyncedValues({floatingRootContext:p,activeTriggerProps:e,inactiveTriggerProps:o,popupProps:g}),kD.jsx(IQ.Provider,{value:A,children:typeof k==="function"?k({payload:h}):k})}function oS(J,X){let Y=P0(X);return Y.preventUnmountOnClose=()=>{J.set("preventUnmountingOnClose",!0)},Y}var YZ=c(G0(),1);var bQ=c(G0(),1),SQ=bQ.createContext(void 0);SQ.displayName="TooltipProviderContext";function jD(){return bQ.useContext(SQ)}var MD=600;var jq=YZ.forwardRef(function(X,Y){let{className:W,render:K,handle:U,payload:q,disabled:_,delay:L,closeDelay:F,id:N,...V}=X,k=R5(!0),A=U?.store??k;if(!A)throw Error("Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.");let D=ww(N),M=A.useState("isTriggerActive",D),h=A.useState("floatingRootContext"),v=A.useState("isOpenedByTrigger",D),x=YZ.useRef(null),I=L??MD,b=F??0,{registerTrigger:E,isMountedByThisTrigger:m}=gz(D,x,A,{payload:q,closeDelay:b}),R=jD(),{delayRef:S,isInstantPhase:p,hasProvider:d}=A_(h,{open:v});A.useSyncedValue("isInstantPhase",p);let w0=A.useState("disabled"),t=_??w0,u=A.useState("trackCursorAxis"),Q0=A.useState("disableHoverablePopup"),r=e7(h,{enabled:!t,mouseOnly:!0,move:!1,handleClose:!Q0&&u!=="both"?z9():null,restMs(){let X0=R?.delay,P=typeof S.current==="object"?S.current.open:void 0,z0=I;if(d)if(P!==0)z0=L??X0??I;else z0=0;return z0},delay(){let X0=typeof S.current==="object"?S.current.close:void 0,P=b;if(F==null&&d)P=X0;return{close:P}},triggerElementRef:x,isActiveTrigger:M}),e=YZ.useMemo(()=>({open:v}),[v]),o=A.useState("triggerProps",m);return h0("button",X,{state:e,ref:[Y,E,x],props:[r,o,{id:D},V],stateAttributesMapping:lz})});jq.displayName="TooltipTrigger";var DD=c(G0(),1);var CQ=c(G0(),1),yQ=CQ.createContext(void 0);yQ.displayName="TooltipPortalContext";function OD(){let J=CQ.useContext(yQ);if(J===void 0)throw Error("Base UI: <Tooltip.Portal> is missing.");return J}var Mq=c(x1(),1),Oq=DD.forwardRef(function(X,Y){let{keepMounted:W=!1,...K}=X;if(!(R5().useState("mounted")||W))return null;return Mq.jsx(yQ.Provider,{value:W,children:Mq.jsx(qq,{ref:Y,...K})})});Oq.displayName="TooltipPortal";var GZ=c(G0(),1);var RQ=c(G0(),1),gQ=RQ.createContext(void 0);gQ.displayName="TooltipPositionerContext";function fQ(){let J=RQ.useContext(gQ);if(J===void 0)throw Error("Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.");return J}var TD=c(x1(),1),Dq=GZ.forwardRef(function(X,Y){let{render:W,className:K,anchor:U,positionMethod:q="absolute",side:_="top",align:L="center",sideOffset:F=0,alignOffset:N=0,collisionBoundary:V="clipping-ancestors",collisionPadding:k=5,arrowPadding:A=5,sticky:D=!1,disableAnchorTracking:M=!1,collisionAvoidance:h=EY,...v}=X,x=R5(),I=OD(),b=x.useState("open"),E=x.useState("mounted"),m=x.useState("trackCursorAxis"),R=x.useState("disableHoverablePopup"),S=x.useState("floatingRootContext"),p=x.useState("instantType"),d=x.useState("transitionStatus"),w0=gG({anchor:U,positionMethod:q,floatingRootContext:S,mounted:E,side:_,sideOffset:F,align:L,alignOffset:N,collisionBoundary:V,collisionPadding:k,sticky:D,arrowPadding:A,disableAnchorTracking:M,keepMounted:I,collisionAvoidance:h,adaptiveOrigin:PO}),t=GZ.useMemo(()=>{let e={};if(!b||m==="both"||R)e.pointerEvents="none";return{role:"presentation",hidden:!E,style:{...w0.positionerStyles,...e}}},[b,m,R,E,w0.positionerStyles]),u=GZ.useMemo(()=>({open:b,side:w0.side,align:w0.align,anchorHidden:w0.anchorHidden,instant:m!=="none"?"tracking-cursor":p}),[b,w0.side,w0.align,w0.anchorHidden,m,p]),Q0=GZ.useMemo(()=>({...u,arrowRef:w0.arrowRef,arrowStyles:w0.arrowStyles,arrowUncentered:w0.arrowUncentered}),[u,w0.arrowRef,w0.arrowStyles,w0.arrowUncentered]),r=h0("div",X,{state:u,props:[t,az(d),v],ref:[Y,x.useStateSetter("positionerElement")],stateAttributesMapping:xw});return TD.jsx(gQ.Provider,{value:Q0,children:r})});Dq.displayName="TooltipPositioner";var QZ=c(G0(),1);var nS={...xw,...h2},Tq=QZ.forwardRef(function(X,Y){let{className:W,render:K,...U}=X,q=R5(),{side:_,align:L}=fQ(),F=q.useState("open"),N=q.useState("mounted"),V=q.useState("instantType"),k=q.useState("transitionStatus"),A=q.useState("popupProps"),D=q.useState("payload"),M=q.useState("popupElement"),h=q.useState("positionerElement"),v=q.useState("floatingRootContext"),x=M5();P5({open:F,ref:q.context.popupRef,onComplete(){if(F)q.context.onOpenChangeComplete?.(!0)}});function I(){v.context.events.emit("measure-layout")}function b(d,w0){v.context.events.emit("measure-layout-complete",{previousDimensions:d,nextDimensions:w0})}let E=QZ.useCallback(()=>q.context.triggerElements.size>1,[q]);WD({popupElement:M,positionerElement:h,mounted:N,content:D,enabled:E,onMeasureLayout:I,onMeasureLayoutComplete:b,side:_,direction:x});let m=q.useState("disabled"),R=q.useState("closeDelay");OX(v,{enabled:!m,closeDelay:R});let S=QZ.useMemo(()=>({open:F,side:_,align:L,instant:V,transitionStatus:k}),[F,_,L,V,k]);return h0("div",X,{state:S,ref:[Y,q.context.popupRef,q.useStateSetter("popupElement")],props:[A,az(k),U],stateAttributesMapping:nS})});Tq.displayName="TooltipPopup";var mQ=c(G0(),1);var xq=mQ.forwardRef(function(X,Y){let{className:W,render:K,...U}=X,_=R5().useState("instantType"),{open:L,arrowRef:F,side:N,align:V,arrowUncentered:k,arrowStyles:A}=fQ(),D=mQ.useMemo(()=>({open:L,side:N,align:V,uncentered:k,instant:_}),[L,N,V,k,_]);return h0("div",X,{state:D,ref:[Y,F],props:[{style:A,"aria-hidden":!0},U],stateAttributesMapping:xw})});xq.displayName="TooltipArrow";var vq=c(G0(),1);var hq=c(x1(),1),Eq=function(X){let{delay:Y,closeDelay:W,timeout:K=400}=X,U=vq.useMemo(()=>({delay:Y,closeDelay:W}),[Y,W]),q=vq.useMemo(()=>({open:Y,close:W}),[Y,W]);return hq.jsx(SQ.Provider,{value:U,children:hq.jsx(k_,{delay:q,timeoutMs:K,children:X.children})})};Eq.displayName="TooltipProvider";var cw=c(G0(),1);var Pq=function(J){return J.popupWidth="--popup-width",J.popupHeight="--popup-height",J}({});var WZ=c(x1(),1),tS={activationDirection:(J)=>J?{"data-activation-direction":J}:null},Iq=cw.forwardRef(function(X,Y){let{render:W,className:K,children:U,...q}=X,_=R5(),L=_.useState("activeTriggerElement"),F=_.useState("open"),N=_.useState("floatingRootContext"),V=_.useState("instantType"),k=UD(F?L:null),A=cw.useRef(null),[D,M]=cw.useState(null),[h,v]=cw.useState(null),x=cw.useRef(null),I=cw.useRef(null),b=kz(x,!0,!1),E=x5(),[m,R]=cw.useState(null),[S,p]=cw.useState(!1),d=F0(()=>{x.current?.style.setProperty("animation","none"),x.current?.style.setProperty("transition","none"),I.current?.style.setProperty("display","none")}),w0=F0((e)=>{if(x.current?.style.removeProperty("animation"),x.current?.style.removeProperty("transition"),I.current?.style.removeProperty("display"),!m)R(e.previousDimensions)});cw.useEffect(()=>{return N.context.events.on("measure-layout",d),N.context.events.on("measure-layout-complete",w0),()=>{N.context.events.off("measure-layout",d),N.context.events.off("measure-layout-complete",w0)}},[N,d,w0]);let t=cw.useRef(null);k0(()=>{if(L&&k&&L!==k&&t.current!==L&&A.current){M(A.current),p(!0);let e=wC(k,L);v(e),E.request(()=>{E.request(()=>{p(!1),b(()=>{M(null),R(null),A.current=null})})}),t.current=L}},[L,k,D,b,E]),k0(()=>{let e=x.current;if(!e)return;let o=document.createElement("div");for(let g of Array.from(e.childNodes))o.appendChild(g.cloneNode(!0));A.current=o});let u=D!=null,Q0;if(!u)Q0=WZ.jsx("div",{"data-current":!0,ref:x,children:U},"current");else Q0=WZ.jsxs(cw.Fragment,{children:[WZ.jsx("div",{"data-previous":!0,inert:iz(!0),ref:I,style:{[Pq.popupWidth]:`${m?.width}px`,[Pq.popupHeight]:`${m?.height}px`,position:"absolute"},"data-ending-style":S?void 0:""},"previous"),WZ.jsx("div",{"data-current":!0,ref:x,"data-starting-style":S?"":void 0,children:U},"current")]});k0(()=>{let e=I.current;if(!e||!D)return;e.replaceChildren(...Array.from(D.childNodes))},[D]);let r=cw.useMemo(()=>{return{activationDirection:eS(h),transitioning:u,instant:V}},[h,u,V]);return h0("div",X,{state:r,ref:Y,props:[q,{children:Q0}],stateAttributesMapping:tS})});Iq.displayName="TooltipViewport";function eS(J){if(!J)return;return`${xD(J.horizontal,5,"right","left")} ${xD(J.vertical,5,"down","up")}`}function xD(J,X,Y,W){if(J>X)return Y;if(J<-X)return W;return""}function wC(J,X){let Y=J.getBoundingClientRect(),W=X.getBoundingClientRect(),K={x:Y.left+Y.width/2,y:Y.top+Y.height/2},U={x:W.left+W.width/2,y:W.top+W.height/2};return{horizontal:U.x-K.x,vertical:U.y-K.y}}class dQ{constructor(){this.store=new $Z}open(J){let X=J?this.store.context.triggerElements.getById(J):void 0;if(J&&!X)throw Error(`Base UI: TooltipHandle.open: No trigger found with id "${J}".`);this.store.setOpen(!0,P0(B0.imperativeAction,void 0,X))}close(){this.store.setOpen(!1,P0(B0.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}function vD(){return new dQ}function bq(J){return h0(J.defaultTagName??"div",J,J)}var n8=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(J){return this.listeners.add(J),this.onSubscribe(),()=>{this.listeners.delete(J),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};var zC={setTimeout:(J,X)=>setTimeout(J,X),clearTimeout:(J)=>clearTimeout(J),setInterval:(J,X)=>setInterval(J,X),clearInterval:(J)=>clearInterval(J)},ZC=class{#w=zC;#z=!1;setTimeoutProvider(J){if(this.#z&&J!==this.#w)console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#w,provider:J});this.#w=J,this.#z=!1}setTimeout(J,X){return this.#z=!0,this.#w.setTimeout(J,X)}clearTimeout(J){this.#w.clearTimeout(J)}setInterval(J,X){return this.#z=!0,this.#w.setInterval(J,X)}clearInterval(J){this.#w.clearInterval(J)}},t8=new ZC;function hD(J){setTimeout(J,0)}var I2=typeof window>"u"||"Deno"in globalThis;function vw(){}function ID(J,X){return typeof J==="function"?J(X):J}function tX(J){return typeof J==="number"&&J>=0&&J!==1/0}function pQ(J,X){return Math.max(J+(X||0)-Date.now(),0)}function G8(J,X){return typeof J==="function"?J(X):J}function b2(J,X){return typeof J==="function"?J(X):J}function cQ(J,X){let{type:Y="all",exact:W,fetchStatus:K,predicate:U,queryKey:q,stale:_}=J;if(q){if(W){if(X.queryHash!==eX(q,X.options))return!1}else if(!Y9(X.queryKey,q))return!1}if(Y!=="all"){let L=X.isActive();if(Y==="active"&&!L)return!1;if(Y==="inactive"&&L)return!1}if(typeof _==="boolean"&&X.isStale()!==_)return!1;if(K&&K!==X.state.fetchStatus)return!1;if(U&&!U(X))return!1;return!0}function lQ(J,X){let{exact:Y,status:W,predicate:K,mutationKey:U}=J;if(U){if(!X.options.mutationKey)return!1;if(Y){if(X9(X.options.mutationKey)!==X9(U))return!1}else if(!Y9(X.options.mutationKey,U))return!1}if(W&&X.state.status!==W)return!1;if(K&&!K(X))return!1;return!0}function eX(J,X){return(X?.queryKeyHashFn||X9)(J)}function X9(J){return JSON.stringify(J,(X,Y)=>Sq(Y)?Object.keys(Y).sort().reduce((W,K)=>{return W[K]=Y[K],W},{}):Y)}function Y9(J,X){if(J===X)return!0;if(typeof J!==typeof X)return!1;if(J&&X&&typeof J==="object"&&typeof X==="object")return Object.keys(X).every((Y)=>Y9(J[Y],X[Y]));return!1}var JC=Object.prototype.hasOwnProperty;function uQ(J,X){if(J===X)return J;let Y=ED(J)&&ED(X);if(!Y&&!(Sq(J)&&Sq(X)))return X;let K=(Y?J:Object.keys(J)).length,U=Y?X:Object.keys(X),q=U.length,_=Y?Array(q):{},L=0;for(let F=0;F<q;F++){let N=Y?F:U[F],V=J[N],k=X[N];if(V===k){if(_[N]=V,Y?F<K:JC.call(J,N))L++;continue}if(V===null||k===null||typeof V!=="object"||typeof k!=="object"){_[N]=k;continue}let A=uQ(V,k);if(_[N]=A,A===V)L++}return K===q&&L===K?J:_}function iQ(J,X){if(!X||Object.keys(J).length!==Object.keys(X).length)return!1;for(let Y in J)if(J[Y]!==X[Y])return!1;return!0}function ED(J){return Array.isArray(J)&&J.length===Object.keys(J).length}function Sq(J){if(!PD(J))return!1;let X=J.constructor;if(X===void 0)return!0;let Y=X.prototype;if(!PD(Y))return!1;if(!Y.hasOwnProperty("isPrototypeOf"))return!1;if(Object.getPrototypeOf(J)!==Object.prototype)return!1;return!0}function PD(J){return Object.prototype.toString.call(J)==="[object Object]"}function bD(J){return new Promise((X)=>{t8.setTimeout(X,J)})}function w$(J,X,Y){if(typeof Y.structuralSharing==="function")return Y.structuralSharing(J,X);else if(Y.structuralSharing!==!1){try{return uQ(J,X)}catch(W){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${Y.queryHash}]: ${W}`),W}return uQ(J,X)}return X}function SD(J,X,Y=0){let W=[...J,X];return Y&&W.length>Y?W.slice(1):W}function CD(J,X,Y=0){let W=[X,...J];return Y&&W.length>Y?W.slice(0,-1):W}var $9=Symbol();function rQ(J,X){if(J.queryFn===$9)console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${J.queryHash}'`);if(!J.queryFn&&X?.initialPromise)return()=>X.initialPromise;if(!J.queryFn||J.queryFn===$9)return()=>Promise.reject(Error(`Missing queryFn: '${J.queryHash}'`));return J.queryFn}function Cq(J,X){if(typeof J==="function")return J(...X);return!!J}var XC=class extends n8{#w;#z;#Z;constructor(){super();this.#Z=(J)=>{if(!I2&&window.addEventListener){let X=()=>J();return window.addEventListener("visibilitychange",X,!1),()=>{window.removeEventListener("visibilitychange",X)}}return}}onSubscribe(){if(!this.#z)this.setEventListener(this.#Z)}onUnsubscribe(){if(!this.hasListeners())this.#z?.(),this.#z=void 0}setEventListener(J){this.#Z=J,this.#z?.(),this.#z=J((X)=>{if(typeof X==="boolean")this.setFocused(X);else this.onFocus()})}setFocused(J){if(this.#w!==J)this.#w=J,this.onFocus()}onFocus(){let J=this.isFocused();this.listeners.forEach((X)=>{X(J)})}isFocused(){if(typeof this.#w==="boolean")return this.#w;return globalThis.document?.visibilityState!=="hidden"}},KZ=new XC;function z$(){let J,X,Y=new Promise((K,U)=>{J=K,X=U});Y.status="pending",Y.catch(()=>{});function W(K){Object.assign(Y,K),delete Y.resolve,delete Y.reject}return Y.resolve=(K)=>{W({status:"fulfilled",value:K}),J(K)},Y.reject=(K)=>{W({status:"rejected",reason:K}),X(K)},Y}var yD=hD;function $C(){let J=[],X=0,Y=(_)=>{_()},W=(_)=>{_()},K=yD,U=(_)=>{if(X)J.push(_);else K(()=>{Y(_)})},q=()=>{let _=J;if(J=[],_.length)K(()=>{W(()=>{_.forEach((L)=>{Y(L)})})})};return{batch:(_)=>{let L;X++;try{L=_()}finally{if(X--,!X)q()}return L},batchCalls:(_)=>{return(...L)=>{U(()=>{_(...L)})}},schedule:U,setNotifyFunction:(_)=>{Y=_},setBatchNotifyFunction:(_)=>{W=_},setScheduler:(_)=>{K=_}}}var n1=$C();var YC=class extends n8{#w=!0;#z;#Z;constructor(){super();this.#Z=(J)=>{if(!I2&&window.addEventListener){let X=()=>J(!0),Y=()=>J(!1);return window.addEventListener("online",X,!1),window.addEventListener("offline",Y,!1),()=>{window.removeEventListener("online",X),window.removeEventListener("offline",Y)}}return}}onSubscribe(){if(!this.#z)this.setEventListener(this.#Z)}onUnsubscribe(){if(!this.hasListeners())this.#z?.(),this.#z=void 0}setEventListener(J){this.#Z=J,this.#z?.(),this.#z=J(this.setOnline.bind(this))}setOnline(J){if(this.#w!==J)this.#w=J,this.listeners.forEach((Y)=>{Y(J)})}isOnline(){return this.#w}},UZ=new YC;function GC(J){return Math.min(1000*2**J,30000)}function yq(J){return(J??"online")==="online"?UZ.isOnline():!0}var aQ=class extends Error{constructor(J){super("CancelledError");this.revert=J?.revert,this.silent=J?.silent}};function sQ(J){let X=!1,Y=0,W,K=z$(),U=()=>K.status!=="pending",q=(M)=>{if(!U()){let h=new aQ(M);k(h),J.onCancel?.(h)}},_=()=>{X=!0},L=()=>{X=!1},F=()=>KZ.isFocused()&&(J.networkMode==="always"||UZ.isOnline())&&J.canRun(),N=()=>yq(J.networkMode)&&J.canRun(),V=(M)=>{if(!U())W?.(),K.resolve(M)},k=(M)=>{if(!U())W?.(),K.reject(M)},A=()=>{return new Promise((M)=>{W=(h)=>{if(U()||F())M(h)},J.onPause?.()}).then(()=>{if(W=void 0,!U())J.onContinue?.()})},D=()=>{if(U())return;let M,h=Y===0?J.initialPromise:void 0;try{M=h??J.fn()}catch(v){M=Promise.reject(v)}Promise.resolve(M).then(V).catch((v)=>{if(U())return;let x=J.retry??(I2?0:3),I=J.retryDelay??GC,b=typeof I==="function"?I(Y,v):I,E=x===!0||typeof x==="number"&&Y<x||typeof x==="function"&&x(Y,v);if(X||!E){k(v);return}Y++,J.onFail?.(Y,v),bD(b).then(()=>{return F()?void 0:A()}).then(()=>{if(X)k(v);else D()})})};return{promise:K,status:()=>K.status,cancel:q,continue:()=>{return W?.(),K},cancelRetry:_,continueRetry:L,canStart:N,start:()=>{if(N())D();else A().then(D);return K}}}var oQ=class{#w;destroy(){this.clearGcTimeout()}scheduleGc(){if(this.clearGcTimeout(),tX(this.gcTime))this.#w=t8.setTimeout(()=>{this.optionalRemove()},this.gcTime)}updateGcTime(J){this.gcTime=Math.max(this.gcTime||0,J??(I2?1/0:300000))}clearGcTimeout(){if(this.#w)t8.clearTimeout(this.#w),this.#w=void 0}};var fD=class extends oQ{#w;#z;#Z;#X;#J;#G;#Y;constructor(J){super();this.#Y=!1,this.#G=J.defaultOptions,this.setOptions(J.options),this.observers=[],this.#X=J.client,this.#Z=this.#X.getQueryCache(),this.queryKey=J.queryKey,this.queryHash=J.queryHash,this.#w=gD(this.options),this.state=J.state??this.#w,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#J?.promise}setOptions(J){if(this.options={...this.#G,...J},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let X=gD(this.options);if(X.data!==void 0)this.setState(RD(X.data,X.dataUpdatedAt)),this.#w=X}}optionalRemove(){if(!this.observers.length&&this.state.fetchStatus==="idle")this.#Z.remove(this)}setData(J,X){let Y=w$(this.state.data,J,this.options);return this.#$({data:Y,type:"success",dataUpdatedAt:X?.updatedAt,manual:X?.manual}),Y}setState(J,X){this.#$({type:"setState",state:J,setStateOptions:X})}cancel(J){let X=this.#J?.promise;return this.#J?.cancel(J),X?X.then(vw).catch(vw):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#w)}isActive(){return this.observers.some((J)=>b2(J.options.enabled,this)!==!1)}isDisabled(){if(this.getObserversCount()>0)return!this.isActive();return this.options.queryFn===$9||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){if(this.getObserversCount()>0)return this.observers.some((J)=>G8(J.options.staleTime,this)==="static");return!1}isStale(){if(this.getObserversCount()>0)return this.observers.some((J)=>J.getCurrentResult().isStale);return this.state.data===void 0||this.state.isInvalidated}isStaleByTime(J=0){if(this.state.data===void 0)return!0;if(J==="static")return!1;if(this.state.isInvalidated)return!0;return!pQ(this.state.dataUpdatedAt,J)}onFocus(){this.observers.find((X)=>X.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#J?.continue()}onOnline(){this.observers.find((X)=>X.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#J?.continue()}addObserver(J){if(!this.observers.includes(J))this.observers.push(J),this.clearGcTimeout(),this.#Z.notify({type:"observerAdded",query:this,observer:J})}removeObserver(J){if(this.observers.includes(J)){if(this.observers=this.observers.filter((X)=>X!==J),!this.observers.length){if(this.#J)if(this.#Y)this.#J.cancel({revert:!0});else this.#J.cancelRetry();this.scheduleGc()}this.#Z.notify({type:"observerRemoved",query:this,observer:J})}}getObserversCount(){return this.observers.length}invalidate(){if(!this.state.isInvalidated)this.#$({type:"invalidate"})}async fetch(J,X){if(this.state.fetchStatus!=="idle"&&this.#J?.status()!=="rejected"){if(this.state.data!==void 0&&X?.cancelRefetch)this.cancel({silent:!0});else if(this.#J)return this.#J.continueRetry(),this.#J.promise}if(J)this.setOptions(J);if(!this.options.queryFn){let _=this.observers.find((L)=>L.options.queryFn);if(_)this.setOptions(_.options)}if(!Array.isArray(this.options.queryKey))console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']");let Y=new AbortController,W=(_)=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>{return this.#Y=!0,Y.signal}})},K=()=>{let _=rQ(this.options,X),F=(()=>{let N={client:this.#X,queryKey:this.queryKey,meta:this.meta};return W(N),N})();if(this.#Y=!1,this.options.persister)return this.options.persister(_,F,this);return _(F)},q=(()=>{let _={fetchOptions:X,options:this.options,queryKey:this.queryKey,client:this.#X,state:this.state,fetchFn:K};return W(_),_})();if(this.options.behavior?.onFetch(q,this),this.#z=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==q.fetchOptions?.meta)this.#$({type:"fetch",meta:q.fetchOptions?.meta});this.#J=sQ({initialPromise:X?.initialPromise,fn:q.fetchFn,onCancel:(_)=>{if(_ instanceof aQ&&_.revert)this.setState({...this.#z,fetchStatus:"idle"});Y.abort()},onFail:(_,L)=>{this.#$({type:"failed",failureCount:_,error:L})},onPause:()=>{this.#$({type:"pause"})},onContinue:()=>{this.#$({type:"continue"})},retry:q.options.retry,retryDelay:q.options.retryDelay,networkMode:q.options.networkMode,canRun:()=>!0});try{let _=await this.#J.start();if(_===void 0)throw console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),Error(`${this.queryHash} data is undefined`);return this.setData(_),this.#Z.config.onSuccess?.(_,this),this.#Z.config.onSettled?.(_,this.state.error,this),_}catch(_){if(_ instanceof aQ){if(_.silent)return this.#J.promise;else if(_.revert){if(this.state.data===void 0)throw _;return this.state.data}}throw this.#$({type:"error",error:_}),this.#Z.config.onError?.(_,this),this.#Z.config.onSettled?.(this.state.data,_,this),_}finally{this.scheduleGc()}}#$(J){let X=(Y)=>{switch(J.type){case"failed":return{...Y,fetchFailureCount:J.failureCount,fetchFailureReason:J.error};case"pause":return{...Y,fetchStatus:"paused"};case"continue":return{...Y,fetchStatus:"fetching"};case"fetch":return{...Y,...Rq(Y.data,this.options),fetchMeta:J.meta??null};case"success":let W={...Y,...RD(J.data,J.dataUpdatedAt),dataUpdateCount:Y.dataUpdateCount+1,...!J.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#z=J.manual?W:void 0,W;case"error":let K=J.error;return{...Y,error:K,errorUpdateCount:Y.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:Y.fetchFailureCount+1,fetchFailureReason:K,fetchStatus:"idle",status:"error"};case"invalidate":return{...Y,isInvalidated:!0};case"setState":return{...Y,...J.state}}};this.state=X(this.state),n1.batch(()=>{this.observers.forEach((Y)=>{Y.onQueryUpdate()}),this.#Z.notify({query:this,type:"updated",action:J})})}};function Rq(J,X){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:yq(X.networkMode)?"fetching":"paused",...J===void 0&&{error:null,status:"pending"}}}function RD(J,X){return{data:J,dataUpdatedAt:X??Date.now(),error:null,isInvalidated:!1,status:"success"}}function gD(J){let X=typeof J.initialData==="function"?J.initialData():J.initialData,Y=X!==void 0,W=Y?typeof J.initialDataUpdatedAt==="function"?J.initialDataUpdatedAt():J.initialDataUpdatedAt:0;return{data:X,dataUpdateCount:0,dataUpdatedAt:Y?W??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:Y?"success":"pending",fetchStatus:"idle"}}var fq=class extends n8{constructor(J,X){super();this.options=X,this.#w=J,this.#$=null,this.#Y=z$(),this.bindMethods(),this.setOptions(X)}#w;#z=void 0;#Z=void 0;#X=void 0;#J;#G;#Y;#$;#B;#H;#_;#W;#K;#Q;#q=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){if(this.listeners.size===1){if(this.#z.addObserver(this),mD(this.#z,this.options))this.#U();else this.updateResult();this.#N()}}onUnsubscribe(){if(!this.hasListeners())this.destroy()}shouldFetchOnReconnect(){return gq(this.#z,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return gq(this.#z,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#k(),this.#A(),this.#z.removeObserver(this)}setOptions(J){let X=this.options,Y=this.#z;if(this.options=this.#w.defaultQueryOptions(J),this.options.enabled!==void 0&&typeof this.options.enabled!=="boolean"&&typeof this.options.enabled!=="function"&&typeof b2(this.options.enabled,this.#z)!=="boolean")throw Error("Expected enabled to be a boolean or a callback that returns a boolean");if(this.#j(),this.#z.setOptions(this.options),X._defaulted&&!iQ(this.options,X))this.#w.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#z,observer:this});let W=this.hasListeners();if(W&&dD(this.#z,Y,this.options,X))this.#U();if(this.updateResult(),W&&(this.#z!==Y||b2(this.options.enabled,this.#z)!==b2(X.enabled,this.#z)||G8(this.options.staleTime,this.#z)!==G8(X.staleTime,this.#z)))this.#L();let K=this.#V();if(W&&(this.#z!==Y||b2(this.options.enabled,this.#z)!==b2(X.enabled,this.#z)||K!==this.#Q))this.#F(K)}getOptimisticResult(J){let X=this.#w.getQueryCache().build(this.#w,J),Y=this.createResult(X,J);if(WC(this,Y))this.#X=Y,this.#G=this.options,this.#J=this.#z.state;return Y}getCurrentResult(){return this.#X}trackResult(J,X){return new Proxy(J,{get:(Y,W)=>{if(this.trackProp(W),X?.(W),W==="promise"){if(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#Y.status==="pending")this.#Y.reject(Error("experimental_prefetchInRender feature flag is not enabled"))}return Reflect.get(Y,W)}})}trackProp(J){this.#q.add(J)}getCurrentQuery(){return this.#z}refetch({...J}={}){return this.fetch({...J})}fetchOptimistic(J){let X=this.#w.defaultQueryOptions(J),Y=this.#w.getQueryCache().build(this.#w,X);return Y.fetch().then(()=>this.createResult(Y,X))}fetch(J){return this.#U({...J,cancelRefetch:J.cancelRefetch??!0}).then(()=>{return this.updateResult(),this.#X})}#U(J){this.#j();let X=this.#z.fetch(this.options,J);if(!J?.throwOnError)X=X.catch(vw);return X}#L(){this.#k();let J=G8(this.options.staleTime,this.#z);if(I2||this.#X.isStale||!tX(J))return;let Y=pQ(this.#X.dataUpdatedAt,J)+1;this.#W=t8.setTimeout(()=>{if(!this.#X.isStale)this.updateResult()},Y)}#V(){return(typeof this.options.refetchInterval==="function"?this.options.refetchInterval(this.#z):this.options.refetchInterval)??!1}#F(J){if(this.#A(),this.#Q=J,I2||b2(this.options.enabled,this.#z)===!1||!tX(this.#Q)||this.#Q===0)return;this.#K=t8.setInterval(()=>{if(this.options.refetchIntervalInBackground||KZ.isFocused())this.#U()},this.#Q)}#N(){this.#L(),this.#F(this.#V())}#k(){if(this.#W)t8.clearTimeout(this.#W),this.#W=void 0}#A(){if(this.#K)t8.clearInterval(this.#K),this.#K=void 0}createResult(J,X){let Y=this.#z,W=this.options,K=this.#X,U=this.#J,q=this.#G,L=J!==Y?J.state:this.#Z,{state:F}=J,N={...F},V=!1,k;if(X._optimisticResults){let S=this.hasListeners(),p=!S&&mD(J,X),d=S&&dD(J,Y,X,W);if(p||d)N={...N,...Rq(F.data,J.options)};if(X._optimisticResults==="isRestoring")N.fetchStatus="idle"}let{error:A,errorUpdatedAt:D,status:M}=N;k=N.data;let h=!1;if(X.placeholderData!==void 0&&k===void 0&&M==="pending"){let S;if(K?.isPlaceholderData&&X.placeholderData===q?.placeholderData)S=K.data,h=!0;else S=typeof X.placeholderData==="function"?X.placeholderData(this.#_?.state.data,this.#_):X.placeholderData;if(S!==void 0)M="success",k=w$(K?.data,S,X),V=!0}if(X.select&&k!==void 0&&!h)if(K&&k===U?.data&&X.select===this.#B)k=this.#H;else try{this.#B=X.select,k=X.select(k),k=w$(K?.data,k,X),this.#H=k,this.#$=null}catch(S){this.#$=S}if(this.#$)A=this.#$,k=this.#H,D=Date.now(),M="error";let v=N.fetchStatus==="fetching",x=M==="pending",I=M==="error",b=x&&v,E=k!==void 0,R={status:M,fetchStatus:N.fetchStatus,isPending:x,isSuccess:M==="success",isError:I,isInitialLoading:b,isLoading:b,data:k,dataUpdatedAt:N.dataUpdatedAt,error:A,errorUpdatedAt:D,failureCount:N.fetchFailureCount,failureReason:N.fetchFailureReason,errorUpdateCount:N.errorUpdateCount,isFetched:N.dataUpdateCount>0||N.errorUpdateCount>0,isFetchedAfterMount:N.dataUpdateCount>L.dataUpdateCount||N.errorUpdateCount>L.errorUpdateCount,isFetching:v,isRefetching:v&&!x,isLoadingError:I&&!E,isPaused:N.fetchStatus==="paused",isPlaceholderData:V,isRefetchError:I&&E,isStale:mq(J,X),refetch:this.refetch,promise:this.#Y,isEnabled:b2(X.enabled,J)!==!1};if(this.options.experimental_prefetchInRender){let S=(w0)=>{if(R.status==="error")w0.reject(R.error);else if(R.data!==void 0)w0.resolve(R.data)},p=()=>{let w0=this.#Y=R.promise=z$();S(w0)},d=this.#Y;switch(d.status){case"pending":if(J.queryHash===Y.queryHash)S(d);break;case"fulfilled":if(R.status==="error"||R.data!==d.value)p();break;case"rejected":if(R.status!=="error"||R.error!==d.reason)p();break}}return R}updateResult(){let J=this.#X,X=this.createResult(this.#z,this.options);if(this.#J=this.#z.state,this.#G=this.options,this.#J.data!==void 0)this.#_=this.#z;if(iQ(X,J))return;this.#X=X;let Y=()=>{if(!J)return!0;let{notifyOnChangeProps:W}=this.options,K=typeof W==="function"?W():W;if(K==="all"||!K&&!this.#q.size)return!0;let U=new Set(K??this.#q);if(this.options.throwOnError)U.add("error");return Object.keys(this.#X).some((q)=>{let _=q;return this.#X[_]!==J[_]&&U.has(_)})};this.#M({listeners:Y()})}#j(){let J=this.#w.getQueryCache().build(this.#w,this.options);if(J===this.#z)return;let X=this.#z;if(this.#z=J,this.#Z=J.state,this.hasListeners())X?.removeObserver(this),J.addObserver(this)}onQueryUpdate(){if(this.updateResult(),this.hasListeners())this.#N()}#M(J){n1.batch(()=>{if(J.listeners)this.listeners.forEach((X)=>{X(this.#X)});this.#w.getQueryCache().notify({query:this.#z,type:"observerResultsUpdated"})})}};function QC(J,X){return b2(X.enabled,J)!==!1&&J.state.data===void 0&&!(J.state.status==="error"&&X.retryOnMount===!1)}function mD(J,X){return QC(J,X)||J.state.data!==void 0&&gq(J,X,X.refetchOnMount)}function gq(J,X,Y){if(b2(X.enabled,J)!==!1&&G8(X.staleTime,J)!=="static"){let W=typeof Y==="function"?Y(J):Y;return W==="always"||W!==!1&&mq(J,X)}return!1}function dD(J,X,Y,W){return(J!==X||b2(W.enabled,J)===!1)&&(!Y.suspense||J.state.status!=="error")&&mq(J,Y)}function mq(J,X){return b2(X.enabled,J)!==!1&&J.isStaleByTime(G8(X.staleTime,J))}function WC(J,X){if(!iQ(J.getCurrentResult(),X))return!0;return!1}function dq(J){return{onFetch:(X,Y)=>{let W=X.options,K=X.fetchOptions?.meta?.fetchMore?.direction,U=X.state.data?.pages||[],q=X.state.data?.pageParams||[],_={pages:[],pageParams:[]},L=0,F=async()=>{let N=!1,V=(D)=>{Object.defineProperty(D,"signal",{enumerable:!0,get:()=>{if(X.signal.aborted)N=!0;else X.signal.addEventListener("abort",()=>{N=!0});return X.signal}})},k=rQ(X.options,X.fetchOptions),A=async(D,M,h)=>{if(N)return Promise.reject();if(M==null&&D.pages.length)return Promise.resolve(D);let x=(()=>{let m={client:X.client,queryKey:X.queryKey,pageParam:M,direction:h?"backward":"forward",meta:X.options.meta};return V(m),m})(),I=await k(x),{maxPages:b}=X.options,E=h?CD:SD;return{pages:E(D.pages,I,b),pageParams:E(D.pageParams,M,b)}};if(K&&U.length){let D=K==="backward",M=D?KC:uD,h={pages:U,pageParams:q},v=M(W,h);_=await A(h,v,D)}else{let D=J??U.length;do{let M=L===0?q[0]??W.initialPageParam:uD(W,_);if(L>0&&M==null)break;_=await A(_,M),L++}while(L<D)}return _};if(X.options.persister)X.fetchFn=()=>{return X.options.persister?.(F,{client:X.client,queryKey:X.queryKey,meta:X.options.meta,signal:X.signal},Y)};else X.fetchFn=F}}}function uD(J,{pages:X,pageParams:Y}){let W=X.length-1;return X.length>0?J.getNextPageParam(X[W],X,Y[W],Y):void 0}function KC(J,{pages:X,pageParams:Y}){return X.length>0?J.getPreviousPageParam?.(X[0],X,Y[0],Y):void 0}var pD=class extends oQ{#w;#z;#Z;#X;constructor(J){super();this.#w=J.client,this.mutationId=J.mutationId,this.#Z=J.mutationCache,this.#z=[],this.state=J.state||UC(),this.setOptions(J.options),this.scheduleGc()}setOptions(J){this.options=J,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(J){if(!this.#z.includes(J))this.#z.push(J),this.clearGcTimeout(),this.#Z.notify({type:"observerAdded",mutation:this,observer:J})}removeObserver(J){this.#z=this.#z.filter((X)=>X!==J),this.scheduleGc(),this.#Z.notify({type:"observerRemoved",mutation:this,observer:J})}optionalRemove(){if(!this.#z.length)if(this.state.status==="pending")this.scheduleGc();else this.#Z.remove(this)}continue(){return this.#X?.continue()??this.execute(this.state.variables)}async execute(J){let X=()=>{this.#J({type:"continue"})},Y={client:this.#w,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#X=sQ({fn:()=>{if(!this.options.mutationFn)return Promise.reject(Error("No mutationFn found"));return this.options.mutationFn(J,Y)},onFail:(U,q)=>{this.#J({type:"failed",failureCount:U,error:q})},onPause:()=>{this.#J({type:"pause"})},onContinue:X,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#Z.canRun(this)});let W=this.state.status==="pending",K=!this.#X.canStart();try{if(W)X();else{this.#J({type:"pending",variables:J,isPaused:K}),await this.#Z.config.onMutate?.(J,this,Y);let q=await this.options.onMutate?.(J,Y);if(q!==this.state.context)this.#J({type:"pending",context:q,variables:J,isPaused:K})}let U=await this.#X.start();return await this.#Z.config.onSuccess?.(U,J,this.state.context,this,Y),await this.options.onSuccess?.(U,J,this.state.context,Y),await this.#Z.config.onSettled?.(U,null,this.state.variables,this.state.context,this,Y),await this.options.onSettled?.(U,null,J,this.state.context,Y),this.#J({type:"success",data:U}),U}catch(U){try{throw await this.#Z.config.onError?.(U,J,this.state.context,this,Y),await this.options.onError?.(U,J,this.state.context,Y),await this.#Z.config.onSettled?.(void 0,U,this.state.variables,this.state.context,this,Y),await this.options.onSettled?.(void 0,U,J,this.state.context,Y),U}finally{this.#J({type:"error",error:U})}}finally{this.#Z.runNext(this)}}#J(J){let X=(Y)=>{switch(J.type){case"failed":return{...Y,failureCount:J.failureCount,failureReason:J.error};case"pause":return{...Y,isPaused:!0};case"continue":return{...Y,isPaused:!1};case"pending":return{...Y,context:J.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:J.isPaused,status:"pending",variables:J.variables,submittedAt:Date.now()};case"success":return{...Y,data:J.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...Y,data:void 0,error:J.error,failureCount:Y.failureCount+1,failureReason:J.error,isPaused:!1,status:"error"}}};this.state=X(this.state),n1.batch(()=>{this.#z.forEach((Y)=>{Y.onMutationUpdate(J)}),this.#Z.notify({mutation:this,type:"updated",action:J})})}};function UC(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var cD=class extends n8{constructor(J={}){super();this.config=J,this.#w=new Set,this.#z=new Map,this.#Z=0}#w;#z;#Z;build(J,X,Y){let W=new pD({client:J,mutationCache:this,mutationId:++this.#Z,options:J.defaultMutationOptions(X),state:Y});return this.add(W),W}add(J){this.#w.add(J);let X=nQ(J);if(typeof X==="string"){let Y=this.#z.get(X);if(Y)Y.push(J);else this.#z.set(X,[J])}this.notify({type:"added",mutation:J})}remove(J){if(this.#w.delete(J)){let X=nQ(J);if(typeof X==="string"){let Y=this.#z.get(X);if(Y){if(Y.length>1){let W=Y.indexOf(J);if(W!==-1)Y.splice(W,1)}else if(Y[0]===J)this.#z.delete(X)}}}this.notify({type:"removed",mutation:J})}canRun(J){let X=nQ(J);if(typeof X==="string"){let W=this.#z.get(X)?.find((K)=>K.state.status==="pending");return!W||W===J}else return!0}runNext(J){let X=nQ(J);if(typeof X==="string")return this.#z.get(X)?.find((W)=>W!==J&&W.state.isPaused)?.continue()??Promise.resolve();else return Promise.resolve()}clear(){n1.batch(()=>{this.#w.forEach((J)=>{this.notify({type:"removed",mutation:J})}),this.#w.clear(),this.#z.clear()})}getAll(){return Array.from(this.#w)}find(J){let X={exact:!0,...J};return this.getAll().find((Y)=>lQ(X,Y))}findAll(J={}){return this.getAll().filter((X)=>lQ(J,X))}notify(J){n1.batch(()=>{this.listeners.forEach((X)=>{X(J)})})}resumePausedMutations(){let J=this.getAll().filter((X)=>X.state.isPaused);return n1.batch(()=>Promise.all(J.map((X)=>X.continue().catch(vw))))}};function nQ(J){return J.options.scope?.id}var lD=class extends n8{constructor(J={}){super();this.config=J,this.#w=new Map}#w;build(J,X,Y){let W=X.queryKey,K=X.queryHash??eX(W,X),U=this.get(K);if(!U)U=new fD({client:J,queryKey:W,queryHash:K,options:J.defaultQueryOptions(X),state:Y,defaultOptions:J.getQueryDefaults(W)}),this.add(U);return U}add(J){if(!this.#w.has(J.queryHash))this.#w.set(J.queryHash,J),this.notify({type:"added",query:J})}remove(J){let X=this.#w.get(J.queryHash);if(X){if(J.destroy(),X===J)this.#w.delete(J.queryHash);this.notify({type:"removed",query:J})}}clear(){n1.batch(()=>{this.getAll().forEach((J)=>{this.remove(J)})})}get(J){return this.#w.get(J)}getAll(){return[...this.#w.values()]}find(J){let X={exact:!0,...J};return this.getAll().find((Y)=>cQ(X,Y))}findAll(J={}){let X=this.getAll();return Object.keys(J).length>0?X.filter((Y)=>cQ(J,Y)):X}notify(J){n1.batch(()=>{this.listeners.forEach((X)=>{X(J)})})}onFocus(){n1.batch(()=>{this.getAll().forEach((J)=>{J.onFocus()})})}onOnline(){n1.batch(()=>{this.getAll().forEach((J)=>{J.onOnline()})})}};var uq=class{#w;#z;#Z;#X;#J;#G;#Y;#$;constructor(J={}){this.#w=J.queryCache||new lD,this.#z=J.mutationCache||new cD,this.#Z=J.defaultOptions||{},this.#X=new Map,this.#J=new Map,this.#G=0}mount(){if(this.#G++,this.#G!==1)return;this.#Y=KZ.subscribe(async(J)=>{if(J)await this.resumePausedMutations(),this.#w.onFocus()}),this.#$=UZ.subscribe(async(J)=>{if(J)await this.resumePausedMutations(),this.#w.onOnline()})}unmount(){if(this.#G--,this.#G!==0)return;this.#Y?.(),this.#Y=void 0,this.#$?.(),this.#$=void 0}isFetching(J){return this.#w.findAll({...J,fetchStatus:"fetching"}).length}isMutating(J){return this.#z.findAll({...J,status:"pending"}).length}getQueryData(J){let X=this.defaultQueryOptions({queryKey:J});return this.#w.get(X.queryHash)?.state.data}ensureQueryData(J){let X=this.defaultQueryOptions(J),Y=this.#w.build(this,X),W=Y.state.data;if(W===void 0)return this.fetchQuery(J);if(J.revalidateIfStale&&Y.isStaleByTime(G8(X.staleTime,Y)))this.prefetchQuery(X);return Promise.resolve(W)}getQueriesData(J){return this.#w.findAll(J).map(({queryKey:X,state:Y})=>{let W=Y.data;return[X,W]})}setQueryData(J,X,Y){let W=this.defaultQueryOptions({queryKey:J}),U=this.#w.get(W.queryHash)?.state.data,q=ID(X,U);if(q===void 0)return;return this.#w.build(this,W).setData(q,{...Y,manual:!0})}setQueriesData(J,X,Y){return n1.batch(()=>this.#w.findAll(J).map(({queryKey:W})=>[W,this.setQueryData(W,X,Y)]))}getQueryState(J){let X=this.defaultQueryOptions({queryKey:J});return this.#w.get(X.queryHash)?.state}removeQueries(J){let X=this.#w;n1.batch(()=>{X.findAll(J).forEach((Y)=>{X.remove(Y)})})}resetQueries(J,X){let Y=this.#w;return n1.batch(()=>{return Y.findAll(J).forEach((W)=>{W.reset()}),this.refetchQueries({type:"active",...J},X)})}cancelQueries(J,X={}){let Y={revert:!0,...X},W=n1.batch(()=>this.#w.findAll(J).map((K)=>K.cancel(Y)));return Promise.all(W).then(vw).catch(vw)}invalidateQueries(J,X={}){return n1.batch(()=>{if(this.#w.findAll(J).forEach((Y)=>{Y.invalidate()}),J?.refetchType==="none")return Promise.resolve();return this.refetchQueries({...J,type:J?.refetchType??J?.type??"active"},X)})}refetchQueries(J,X={}){let Y={...X,cancelRefetch:X.cancelRefetch??!0},W=n1.batch(()=>this.#w.findAll(J).filter((K)=>!K.isDisabled()&&!K.isStatic()).map((K)=>{let U=K.fetch(void 0,Y);if(!Y.throwOnError)U=U.catch(vw);return K.state.fetchStatus==="paused"?Promise.resolve():U}));return Promise.all(W).then(vw)}fetchQuery(J){let X=this.defaultQueryOptions(J);if(X.retry===void 0)X.retry=!1;let Y=this.#w.build(this,X);return Y.isStaleByTime(G8(X.staleTime,Y))?Y.fetch(X):Promise.resolve(Y.state.data)}prefetchQuery(J){return this.fetchQuery(J).then(vw).catch(vw)}fetchInfiniteQuery(J){return J.behavior=dq(J.pages),this.fetchQuery(J)}prefetchInfiniteQuery(J){return this.fetchInfiniteQuery(J).then(vw).catch(vw)}ensureInfiniteQueryData(J){return J.behavior=dq(J.pages),this.ensureQueryData(J)}resumePausedMutations(){if(UZ.isOnline())return this.#z.resumePausedMutations();return Promise.resolve()}getQueryCache(){return this.#w}getMutationCache(){return this.#z}getDefaultOptions(){return this.#Z}setDefaultOptions(J){this.#Z=J}setQueryDefaults(J,X){this.#X.set(X9(J),{queryKey:J,defaultOptions:X})}getQueryDefaults(J){let X=[...this.#X.values()],Y={};return X.forEach((W)=>{if(Y9(J,W.queryKey))Object.assign(Y,W.defaultOptions)}),Y}setMutationDefaults(J,X){this.#J.set(X9(J),{mutationKey:J,defaultOptions:X})}getMutationDefaults(J){let X=[...this.#J.values()],Y={};return X.forEach((W)=>{if(Y9(J,W.mutationKey))Object.assign(Y,W.defaultOptions)}),Y}defaultQueryOptions(J){if(J._defaulted)return J;let X={...this.#Z.queries,...this.getQueryDefaults(J.queryKey),...J,_defaulted:!0};if(!X.queryHash)X.queryHash=eX(X.queryKey,X);if(X.refetchOnReconnect===void 0)X.refetchOnReconnect=X.networkMode!=="always";if(X.throwOnError===void 0)X.throwOnError=!!X.suspense;if(!X.networkMode&&X.persister)X.networkMode="offlineFirst";if(X.queryFn===$9)X.enabled=!1;return X}defaultMutationOptions(J){if(J?._defaulted)return J;return{...this.#Z.mutations,...J?.mutationKey&&this.getMutationDefaults(J.mutationKey),...J,_defaulted:!0}}clear(){this.#w.clear(),this.#z.clear()}};var HZ=c(G0(),1),iD=c(x1(),1),pq=HZ.createContext(void 0),cq=(J)=>{let X=HZ.useContext(pq);if(J)return J;if(!X)throw Error("No QueryClient set, use QueryClientProvider to set one");return X},lq=({client:J,children:X})=>{return HZ.useEffect(()=>{return J.mount(),()=>{J.unmount()}},[J]),iD.jsx(pq.Provider,{value:J,children:X})};var tQ=c(G0(),1),rD=tQ.createContext(!1),aD=()=>tQ.useContext(rD),h20=rD.Provider;var Z$=c(G0(),1),HC=c(x1(),1);function _C(){let J=!1;return{clearReset:()=>{J=!1},reset:()=>{J=!0},isReset:()=>{return J}}}var qC=Z$.createContext(_C()),sD=()=>Z$.useContext(qC);var oD=c(G0(),1);var nD=(J,X)=>{if(J.suspense||J.throwOnError||J.experimental_prefetchInRender){if(!X.isReset())J.retryOnMount=!1}},tD=(J)=>{oD.useEffect(()=>{J.clearReset()},[J])},eD=({result:J,errorResetBoundary:X,throwOnError:Y,query:W,suspense:K})=>{return J.isError&&!X.isReset()&&!J.isFetching&&W&&(K&&J.data===void 0||Cq(Y,[J.error,W]))};var wT=(J)=>{if(J.suspense){let Y=(K)=>K==="static"?K:Math.max(K??1000,1000),W=J.staleTime;if(J.staleTime=typeof W==="function"?(...K)=>Y(W(...K)):Y(W),typeof J.gcTime==="number")J.gcTime=Math.max(J.gcTime,1000)}},zT=(J,X)=>J.isLoading&&J.isFetching&&!X,ZT=(J,X)=>J?.suspense&&X.isPending,iq=(J,X,Y)=>X.fetchOptimistic(J).catch(()=>{Y.clearReset()});var p4=c(G0(),1);function JT(J,X,Y){if(typeof J!=="object"||Array.isArray(J))throw Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');let W=aD(),K=sD(),U=cq(Y),q=U.defaultQueryOptions(J);if(U.getDefaultOptions().queries?._experimental_beforeQuery?.(q),!q.queryFn)console.error(`[${q.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`);q._optimisticResults=W?"isRestoring":"optimistic",wT(q),nD(q,K),tD(K);let _=!U.getQueryCache().get(q.queryHash),[L]=p4.useState(()=>new X(U,q)),F=L.getOptimisticResult(q),N=!W&&J.subscribed!==!1;if(p4.useSyncExternalStore(p4.useCallback((V)=>{let k=N?L.subscribe(n1.batchCalls(V)):vw;return L.updateResult(),k},[L,N]),()=>L.getCurrentResult(),()=>L.getCurrentResult()),p4.useEffect(()=>{L.setOptions(q)},[q,L]),ZT(q,F))throw iq(q,L,K);if(eD({result:F,errorResetBoundary:K,throwOnError:q.throwOnError,query:U.getQueryCache().get(q.queryHash),suspense:q.suspense}))throw F.error;if(U.getDefaultOptions().queries?._experimental_afterQuery?.(q,F),q.experimental_prefetchInRender&&!I2&&zT(F,W))(_?iq(q,L,K):U.getQueryCache().get(q.queryHash)?.promise)?.catch(vw).finally(()=>{L.updateResult()});return!q.notifyOnChangeProps?L.trackResult(F):F}function rq(J,X){return JT(J,fq,X)}var XT=new uq;async function $T(){return fetch("/api/stories").then((J)=>J.json())}function YT(J){var X,Y,W="";if(typeof J=="string"||typeof J=="number")W+=J;else if(typeof J=="object")if(Array.isArray(J)){var K=J.length;for(X=0;X<K;X++)J[X]&&(Y=YT(J[X]))&&(W&&(W+=" "),W+=Y)}else for(Y in J)J[Y]&&(W&&(W+=" "),W+=Y);return W}function eQ(){for(var J,X,Y=0,W="",K=arguments.length;Y<K;Y++)(J=arguments[Y])&&(X=YT(J))&&(W&&(W+=" "),W+=X);return W}var GT=(J)=>typeof J==="boolean"?`${J}`:J===0?"0":J,QT=eQ,wW=(J,X)=>(Y)=>{var W;if((X===null||X===void 0?void 0:X.variants)==null)return QT(J,Y===null||Y===void 0?void 0:Y.class,Y===null||Y===void 0?void 0:Y.className);let{variants:K,defaultVariants:U}=X,q=Object.keys(K).map((F)=>{let N=Y===null||Y===void 0?void 0:Y[F],V=U===null||U===void 0?void 0:U[F];if(N===null)return null;let k=GT(N)||GT(V);return K[F][k]}),_=Y&&Object.entries(Y).reduce((F,N)=>{let[V,k]=N;if(k===void 0)return F;return F[V]=k,F},{}),L=X===null||X===void 0?void 0:(W=X.compoundVariants)===null||W===void 0?void 0:W.reduce((F,N)=>{let{class:V,className:k,...A}=N;return Object.entries(A).every((D)=>{let[M,h]=D;return Array.isArray(h)?h.includes({...U,..._}[M]):{...U,..._}[M]===h})?[...F,V,k]:F},[]);return QT(J,q,L,Y===null||Y===void 0?void 0:Y.class,Y===null||Y===void 0?void 0:Y.className)};var BC=(J,X)=>{let Y=Array(J.length+X.length);for(let W=0;W<J.length;W++)Y[W]=J[W];for(let W=0;W<X.length;W++)Y[J.length+W]=X[W];return Y},LC=(J,X)=>({classGroupId:J,validator:X}),_T=(J=new Map,X=null,Y)=>({nextPart:J,validators:X,classGroupId:Y});var WT=[];var VC=(J)=>{let X=NC(J),{conflictingClassGroups:Y,conflictingClassGroupModifiers:W}=J;return{getClassGroupId:(q)=>{if(q.startsWith("[")&&q.endsWith("]"))return FC(q);let _=q.split("-"),L=_[0]===""&&_.length>1?1:0;return qT(_,L,X)},getConflictingClassGroupIds:(q,_)=>{if(_){let L=W[q],F=Y[q];if(L){if(F)return BC(F,L);return L}return F||WT}return Y[q]||WT}}},qT=(J,X,Y)=>{if(J.length-X===0)return Y.classGroupId;let K=J[X],U=Y.nextPart.get(K);if(U){let F=qT(J,X+1,U);if(F)return F}let q=Y.validators;if(q===null)return;let _=X===0?J.join("-"):J.slice(X).join("-"),L=q.length;for(let F=0;F<L;F++){let N=q[F];if(N.validator(_))return N.classGroupId}return},FC=(J)=>J.slice(1,-1).indexOf(":")===-1?void 0:(()=>{let X=J.slice(1,-1),Y=X.indexOf(":"),W=X.slice(0,Y);return W?"arbitrary.."+W:void 0})(),NC=(J)=>{let{theme:X,classGroups:Y}=J;return kC(Y,X)},kC=(J,X)=>{let Y=_T();for(let W in J){let K=J[W];oq(K,Y,W,X)}return Y},oq=(J,X,Y,W)=>{let K=J.length;for(let U=0;U<K;U++){let q=J[U];AC(q,X,Y,W)}},AC=(J,X,Y,W)=>{if(typeof J==="string"){jC(J,X,Y);return}if(typeof J==="function"){MC(J,X,Y,W);return}OC(J,X,Y,W)},jC=(J,X,Y)=>{let W=J===""?X:BT(X,J);W.classGroupId=Y},MC=(J,X,Y,W)=>{if(DC(J)){oq(J(W),X,Y,W);return}if(X.validators===null)X.validators=[];X.validators.push(LC(Y,J))},OC=(J,X,Y,W)=>{let K=Object.entries(J),U=K.length;for(let q=0;q<U;q++){let[_,L]=K[q];oq(L,BT(X,_),Y,W)}},BT=(J,X)=>{let Y=J,W=X.split("-"),K=W.length;for(let U=0;U<K;U++){let q=W[U],_=Y.nextPart.get(q);if(!_)_=_T(),Y.nextPart.set(q,_);Y=_}return Y},DC=(J)=>("isThemeGetter"in J)&&J.isThemeGetter===!0,TC=(J)=>{if(J<1)return{get:()=>{return},set:()=>{}};let X=0,Y=Object.create(null),W=Object.create(null),K=(U,q)=>{if(Y[U]=q,X++,X>J)X=0,W=Y,Y=Object.create(null)};return{get(U){let q=Y[U];if(q!==void 0)return q;if((q=W[U])!==void 0)return K(U,q),q},set(U,q){if(U in Y)Y[U]=q;else K(U,q)}}};var xC=[],KT=(J,X,Y,W,K)=>({modifiers:J,hasImportantModifier:X,baseClassName:Y,maybePostfixModifierPosition:W,isExternal:K}),vC=(J)=>{let{prefix:X,experimentalParseClassName:Y}=J,W=(K)=>{let U=[],q=0,_=0,L=0,F,N=K.length;for(let M=0;M<N;M++){let h=K[M];if(q===0&&_===0){if(h===":"){U.push(K.slice(L,M)),L=M+1;continue}if(h==="/"){F=M;continue}}if(h==="[")q++;else if(h==="]")q--;else if(h==="(")_++;else if(h===")")_--}let V=U.length===0?K:K.slice(L),k=V,A=!1;if(V.endsWith("!"))k=V.slice(0,-1),A=!0;else if(V.startsWith("!"))k=V.slice(1),A=!0;let D=F&&F>L?F-L:void 0;return KT(U,A,k,D)};if(X){let K=X+":",U=W;W=(q)=>q.startsWith(K)?U(q.slice(K.length)):KT(xC,!1,q,void 0,!0)}if(Y){let K=W;W=(U)=>Y({className:U,parseClassName:K})}return W},hC=(J)=>{let X=new Map;return J.orderSensitiveModifiers.forEach((Y,W)=>{X.set(Y,1e6+W)}),(Y)=>{let W=[],K=[];for(let U=0;U<Y.length;U++){let q=Y[U],_=q[0]==="[",L=X.has(q);if(_||L){if(K.length>0)K.sort(),W.push(...K),K=[];W.push(q)}else K.push(q)}if(K.length>0)K.sort(),W.push(...K);return W}},EC=(J)=>({cache:TC(J.cacheSize),parseClassName:vC(J),sortModifiers:hC(J),...VC(J)}),PC=/\s+/,IC=(J,X)=>{let{parseClassName:Y,getClassGroupId:W,getConflictingClassGroupIds:K,sortModifiers:U}=X,q=[],_=J.trim().split(PC),L="";for(let F=_.length-1;F>=0;F-=1){let N=_[F],{isExternal:V,modifiers:k,hasImportantModifier:A,baseClassName:D,maybePostfixModifierPosition:M}=Y(N);if(V){L=N+(L.length>0?" "+L:L);continue}let h=!!M,v=W(h?D.substring(0,M):D);if(!v){if(!h){L=N+(L.length>0?" "+L:L);continue}if(v=W(D),!v){L=N+(L.length>0?" "+L:L);continue}h=!1}let x=k.length===0?"":k.length===1?k[0]:U(k).join(":"),I=A?x+"!":x,b=I+v;if(q.indexOf(b)>-1)continue;q.push(b);let E=K(v,h);for(let m=0;m<E.length;++m){let R=E[m];q.push(I+R)}L=N+(L.length>0?" "+L:L)}return L},bC=(...J)=>{let X=0,Y,W,K="";while(X<J.length)if(Y=J[X++]){if(W=LT(Y))K&&(K+=" "),K+=W}return K},LT=(J)=>{if(typeof J==="string")return J;let X,Y="";for(let W=0;W<J.length;W++)if(J[W]){if(X=LT(J[W]))Y&&(Y+=" "),Y+=X}return Y},SC=(J,...X)=>{let Y,W,K,U,q=(L)=>{let F=X.reduce((N,V)=>V(N),J());return Y=EC(F),W=Y.cache.get,K=Y.cache.set,U=_,_(L)},_=(L)=>{let F=W(L);if(F)return F;let N=IC(L,Y);return K(L,N),N};return U=q,(...L)=>U(bC(...L))},CC=[],yw=(J)=>{let X=(Y)=>Y[J]||CC;return X.isThemeGetter=!0,X},VT=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,FT=/^\((?:(\w[\w-]*):)?(.+)\)$/i,yC=/^\d+\/\d+$/,RC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,fC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,mC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_Z=(J)=>yC.test(J),V1=(J)=>!!J&&!Number.isNaN(Number(J)),c4=(J)=>!!J&&Number.isInteger(Number(J)),aq=(J)=>J.endsWith("%")&&V1(J.slice(0,-1)),g6=(J)=>RC.test(J),uC=()=>!0,pC=(J)=>gC.test(J)&&!fC.test(J),NT=()=>!1,cC=(J)=>mC.test(J),lC=(J)=>dC.test(J),iC=(J)=>!g0(J)&&!f0(J),rC=(J)=>qZ(J,jT,NT),g0=(J)=>VT.test(J),G9=(J)=>qZ(J,MT,pC),sq=(J)=>qZ(J,tC,V1),UT=(J)=>qZ(J,kT,NT),aC=(J)=>qZ(J,AT,lC),zW=(J)=>qZ(J,OT,cC),f0=(J)=>FT.test(J),J$=(J)=>BZ(J,MT),sC=(J)=>BZ(J,eC),HT=(J)=>BZ(J,kT),oC=(J)=>BZ(J,jT),nC=(J)=>BZ(J,AT),ZW=(J)=>BZ(J,OT,!0),qZ=(J,X,Y)=>{let W=VT.exec(J);if(W){if(W[1])return X(W[1]);return Y(W[2])}return!1},BZ=(J,X,Y=!1)=>{let W=FT.exec(J);if(W){if(W[1])return X(W[1]);return Y}return!1},kT=(J)=>J==="position"||J==="percentage",AT=(J)=>J==="image"||J==="url",jT=(J)=>J==="length"||J==="size"||J==="bg-size",MT=(J)=>J==="length",tC=(J)=>J==="number",eC=(J)=>J==="family-name",OT=(J)=>J==="shadow";var wy=()=>{let J=yw("color"),X=yw("font"),Y=yw("text"),W=yw("font-weight"),K=yw("tracking"),U=yw("leading"),q=yw("breakpoint"),_=yw("container"),L=yw("spacing"),F=yw("radius"),N=yw("shadow"),V=yw("inset-shadow"),k=yw("text-shadow"),A=yw("drop-shadow"),D=yw("blur"),M=yw("perspective"),h=yw("aspect"),v=yw("ease"),x=yw("animate"),I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...b(),f0,g0],m=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],S=()=>[f0,g0,L],p=()=>[_Z,"full","auto",...S()],d=()=>[c4,"none","subgrid",f0,g0],w0=()=>["auto",{span:["full",c4,f0,g0]},c4,f0,g0],t=()=>[c4,"auto",f0,g0],u=()=>["auto","min","max","fr",f0,g0],Q0=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],r=()=>["start","end","center","stretch","center-safe","end-safe"],e=()=>["auto",...S()],o=()=>[_Z,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],g=()=>[J,f0,g0],X0=()=>[...b(),HT,UT,{position:[f0,g0]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z0=()=>["auto","cover","contain",oC,rC,{size:[f0,g0]}],U0=()=>[aq,J$,G9],J0=()=>["","none","full",F,f0,g0],L0=()=>["",V1,J$,G9],S0=()=>["solid","dashed","dotted","double"],V0=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H0=()=>[V1,aq,HT,UT],j0=()=>["","none",D,f0,g0],r0=()=>["none",V1,f0,g0],n0=()=>["none",V1,f0,g0],n=()=>[V1,f0,g0],R0=()=>[_Z,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[g6],breakpoint:[g6],color:[uC],container:[g6],"drop-shadow":[g6],ease:["in","out","in-out"],font:[iC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[g6],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[g6],shadow:[g6],spacing:["px",V1],text:[g6],"text-shadow":[g6],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_Z,g0,f0,h]}],container:["container"],columns:[{columns:[V1,g0,f0,_]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:m()}],"overflow-x":[{"overflow-x":m()}],"overflow-y":[{"overflow-y":m()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:p()}],"inset-x":[{"inset-x":p()}],"inset-y":[{"inset-y":p()}],start:[{start:p()}],end:[{end:p()}],top:[{top:p()}],right:[{right:p()}],bottom:[{bottom:p()}],left:[{left:p()}],visibility:["visible","invisible","collapse"],z:[{z:[c4,"auto",f0,g0]}],basis:[{basis:[_Z,"full","auto",_,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[V1,_Z,"auto","initial","none",g0]}],grow:[{grow:["",V1,f0,g0]}],shrink:[{shrink:["",V1,f0,g0]}],order:[{order:[c4,"first","last","none",f0,g0]}],"grid-cols":[{"grid-cols":d()}],"col-start-end":[{col:w0()}],"col-start":[{"col-start":t()}],"col-end":[{"col-end":t()}],"grid-rows":[{"grid-rows":d()}],"row-start-end":[{row:w0()}],"row-start":[{"row-start":t()}],"row-end":[{"row-end":t()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":u()}],"auto-rows":[{"auto-rows":u()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...Q0(),"normal"]}],"justify-items":[{"justify-items":[...r(),"normal"]}],"justify-self":[{"justify-self":["auto",...r()]}],"align-content":[{content:["normal",...Q0()]}],"align-items":[{items:[...r(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...r(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q0()}],"place-items":[{"place-items":[...r(),"baseline"]}],"place-self":[{"place-self":["auto",...r()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:e()}],mx:[{mx:e()}],my:[{my:e()}],ms:[{ms:e()}],me:[{me:e()}],mt:[{mt:e()}],mr:[{mr:e()}],mb:[{mb:e()}],ml:[{ml:e()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:o()}],w:[{w:[_,"screen",...o()]}],"min-w":[{"min-w":[_,"screen","none",...o()]}],"max-w":[{"max-w":[_,"screen","none","prose",{screen:[q]},...o()]}],h:[{h:["screen","lh",...o()]}],"min-h":[{"min-h":["screen","lh","none",...o()]}],"max-h":[{"max-h":["screen","lh",...o()]}],"font-size":[{text:["base",Y,J$,G9]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[W,f0,sq]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",aq,g0]}],"font-family":[{font:[sC,g0,X]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[K,f0,g0]}],"line-clamp":[{"line-clamp":[V1,"none",f0,sq]}],leading:[{leading:[U,...S()]}],"list-image":[{"list-image":["none",f0,g0]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",f0,g0]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:g()}],"text-color":[{text:g()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...S0(),"wavy"]}],"text-decoration-thickness":[{decoration:[V1,"from-font","auto",f0,G9]}],"text-decoration-color":[{decoration:g()}],"underline-offset":[{"underline-offset":[V1,"auto",f0,g0]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",f0,g0]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",f0,g0]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:X0()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:z0()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},c4,f0,g0],radial:["",f0,g0],conic:[c4,f0,g0]},nC,aC]}],"bg-color":[{bg:g()}],"gradient-from-pos":[{from:U0()}],"gradient-via-pos":[{via:U0()}],"gradient-to-pos":[{to:U0()}],"gradient-from":[{from:g()}],"gradient-via":[{via:g()}],"gradient-to":[{to:g()}],rounded:[{rounded:J0()}],"rounded-s":[{"rounded-s":J0()}],"rounded-e":[{"rounded-e":J0()}],"rounded-t":[{"rounded-t":J0()}],"rounded-r":[{"rounded-r":J0()}],"rounded-b":[{"rounded-b":J0()}],"rounded-l":[{"rounded-l":J0()}],"rounded-ss":[{"rounded-ss":J0()}],"rounded-se":[{"rounded-se":J0()}],"rounded-ee":[{"rounded-ee":J0()}],"rounded-es":[{"rounded-es":J0()}],"rounded-tl":[{"rounded-tl":J0()}],"rounded-tr":[{"rounded-tr":J0()}],"rounded-br":[{"rounded-br":J0()}],"rounded-bl":[{"rounded-bl":J0()}],"border-w":[{border:L0()}],"border-w-x":[{"border-x":L0()}],"border-w-y":[{"border-y":L0()}],"border-w-s":[{"border-s":L0()}],"border-w-e":[{"border-e":L0()}],"border-w-t":[{"border-t":L0()}],"border-w-r":[{"border-r":L0()}],"border-w-b":[{"border-b":L0()}],"border-w-l":[{"border-l":L0()}],"divide-x":[{"divide-x":L0()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":L0()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...S0(),"hidden","none"]}],"divide-style":[{divide:[...S0(),"hidden","none"]}],"border-color":[{border:g()}],"border-color-x":[{"border-x":g()}],"border-color-y":[{"border-y":g()}],"border-color-s":[{"border-s":g()}],"border-color-e":[{"border-e":g()}],"border-color-t":[{"border-t":g()}],"border-color-r":[{"border-r":g()}],"border-color-b":[{"border-b":g()}],"border-color-l":[{"border-l":g()}],"divide-color":[{divide:g()}],"outline-style":[{outline:[...S0(),"none","hidden"]}],"outline-offset":[{"outline-offset":[V1,f0,g0]}],"outline-w":[{outline:["",V1,J$,G9]}],"outline-color":[{outline:g()}],shadow:[{shadow:["","none",N,ZW,zW]}],"shadow-color":[{shadow:g()}],"inset-shadow":[{"inset-shadow":["none",V,ZW,zW]}],"inset-shadow-color":[{"inset-shadow":g()}],"ring-w":[{ring:L0()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:g()}],"ring-offset-w":[{"ring-offset":[V1,G9]}],"ring-offset-color":[{"ring-offset":g()}],"inset-ring-w":[{"inset-ring":L0()}],"inset-ring-color":[{"inset-ring":g()}],"text-shadow":[{"text-shadow":["none",k,ZW,zW]}],"text-shadow-color":[{"text-shadow":g()}],opacity:[{opacity:[V1,f0,g0]}],"mix-blend":[{"mix-blend":[...V0(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":V0()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[V1]}],"mask-image-linear-from-pos":[{"mask-linear-from":H0()}],"mask-image-linear-to-pos":[{"mask-linear-to":H0()}],"mask-image-linear-from-color":[{"mask-linear-from":g()}],"mask-image-linear-to-color":[{"mask-linear-to":g()}],"mask-image-t-from-pos":[{"mask-t-from":H0()}],"mask-image-t-to-pos":[{"mask-t-to":H0()}],"mask-image-t-from-color":[{"mask-t-from":g()}],"mask-image-t-to-color":[{"mask-t-to":g()}],"mask-image-r-from-pos":[{"mask-r-from":H0()}],"mask-image-r-to-pos":[{"mask-r-to":H0()}],"mask-image-r-from-color":[{"mask-r-from":g()}],"mask-image-r-to-color":[{"mask-r-to":g()}],"mask-image-b-from-pos":[{"mask-b-from":H0()}],"mask-image-b-to-pos":[{"mask-b-to":H0()}],"mask-image-b-from-color":[{"mask-b-from":g()}],"mask-image-b-to-color":[{"mask-b-to":g()}],"mask-image-l-from-pos":[{"mask-l-from":H0()}],"mask-image-l-to-pos":[{"mask-l-to":H0()}],"mask-image-l-from-color":[{"mask-l-from":g()}],"mask-image-l-to-color":[{"mask-l-to":g()}],"mask-image-x-from-pos":[{"mask-x-from":H0()}],"mask-image-x-to-pos":[{"mask-x-to":H0()}],"mask-image-x-from-color":[{"mask-x-from":g()}],"mask-image-x-to-color":[{"mask-x-to":g()}],"mask-image-y-from-pos":[{"mask-y-from":H0()}],"mask-image-y-to-pos":[{"mask-y-to":H0()}],"mask-image-y-from-color":[{"mask-y-from":g()}],"mask-image-y-to-color":[{"mask-y-to":g()}],"mask-image-radial":[{"mask-radial":[f0,g0]}],"mask-image-radial-from-pos":[{"mask-radial-from":H0()}],"mask-image-radial-to-pos":[{"mask-radial-to":H0()}],"mask-image-radial-from-color":[{"mask-radial-from":g()}],"mask-image-radial-to-color":[{"mask-radial-to":g()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[V1]}],"mask-image-conic-from-pos":[{"mask-conic-from":H0()}],"mask-image-conic-to-pos":[{"mask-conic-to":H0()}],"mask-image-conic-from-color":[{"mask-conic-from":g()}],"mask-image-conic-to-color":[{"mask-conic-to":g()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:X0()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:z0()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",f0,g0]}],filter:[{filter:["","none",f0,g0]}],blur:[{blur:j0()}],brightness:[{brightness:[V1,f0,g0]}],contrast:[{contrast:[V1,f0,g0]}],"drop-shadow":[{"drop-shadow":["","none",A,ZW,zW]}],"drop-shadow-color":[{"drop-shadow":g()}],grayscale:[{grayscale:["",V1,f0,g0]}],"hue-rotate":[{"hue-rotate":[V1,f0,g0]}],invert:[{invert:["",V1,f0,g0]}],saturate:[{saturate:[V1,f0,g0]}],sepia:[{sepia:["",V1,f0,g0]}],"backdrop-filter":[{"backdrop-filter":["","none",f0,g0]}],"backdrop-blur":[{"backdrop-blur":j0()}],"backdrop-brightness":[{"backdrop-brightness":[V1,f0,g0]}],"backdrop-contrast":[{"backdrop-contrast":[V1,f0,g0]}],"backdrop-grayscale":[{"backdrop-grayscale":["",V1,f0,g0]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[V1,f0,g0]}],"backdrop-invert":[{"backdrop-invert":["",V1,f0,g0]}],"backdrop-opacity":[{"backdrop-opacity":[V1,f0,g0]}],"backdrop-saturate":[{"backdrop-saturate":[V1,f0,g0]}],"backdrop-sepia":[{"backdrop-sepia":["",V1,f0,g0]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",f0,g0]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[V1,"initial",f0,g0]}],ease:[{ease:["linear","initial",v,f0,g0]}],delay:[{delay:[V1,f0,g0]}],animate:[{animate:["none",x,f0,g0]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[M,f0,g0]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:r0()}],"rotate-x":[{"rotate-x":r0()}],"rotate-y":[{"rotate-y":r0()}],"rotate-z":[{"rotate-z":r0()}],scale:[{scale:n0()}],"scale-x":[{"scale-x":n0()}],"scale-y":[{"scale-y":n0()}],"scale-z":[{"scale-z":n0()}],"scale-3d":["scale-3d"],skew:[{skew:n()}],"skew-x":[{"skew-x":n()}],"skew-y":[{"skew-y":n()}],transform:[{transform:[f0,g0,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:R0()}],"translate-x":[{"translate-x":R0()}],"translate-y":[{"translate-y":R0()}],"translate-z":[{"translate-z":R0()}],"translate-none":["translate-none"],accent:[{accent:g()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:g()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",f0,g0]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",f0,g0]}],fill:[{fill:["none",...g()]}],"stroke-w":[{stroke:[V1,J$,G9,sq]}],stroke:[{stroke:["none",...g()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}};var DT=SC(wy);function h1(...J){return DT(eQ(J))}var TT=c(E1(),1),Zy=wW("focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-xs/relaxed font-medium focus-visible:ring-2 aria-invalid:ring-2 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border dark:bg-input/20 dark:bg-input/30 hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",sm:"h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",lg:"h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",icon:"size-7 [&_svg:not([class*='size-'])]:size-3.5","icon-xs":"size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5","icon-sm":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-lg":"size-8 [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default",size:"default"}});function f6({className:J,variant:X="default",size:Y="default",...W}){return TT.jsxDEV(dG,{"data-slot":"button",className:h1(Zy({variant:X,size:Y,className:J})),...W},void 0,!1,void 0,this)}var vT=c(E1(),1);function xT({className:J,...X}){return vT.jsxDEV("kbd",{"data-slot":"kbd",className:h1("bg-muted text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-xs px-1 font-sans text-[0.625rem] font-medium [&_svg:not([class*='size-'])]:size-3 pointer-events-none inline-flex items-center justify-center select-none",J),...X},void 0,!1,void 0,this)}var XW=c(G0(),1);var hT=(J)=>J.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Jy=(J)=>J.replace(/^([A-Z])|[\s-_]+(\w)/g,(X,Y,W)=>W?W.toUpperCase():Y.toLowerCase()),nq=(J)=>{let X=Jy(J);return X.charAt(0).toUpperCase()+X.slice(1)},JW=(...J)=>J.filter((X,Y,W)=>{return Boolean(X)&&X.trim()!==""&&W.indexOf(X)===Y}).join(" ").trim(),ET=(J)=>{for(let X in J)if(X.startsWith("aria-")||X==="role"||X==="title")return!0};var X$=c(G0(),1);var PT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var IT=X$.forwardRef(({color:J="currentColor",size:X=24,strokeWidth:Y=2,absoluteStrokeWidth:W,className:K="",children:U,iconNode:q,..._},L)=>X$.createElement("svg",{ref:L,...PT,width:X,height:X,stroke:J,strokeWidth:W?Number(Y)*24/Number(X):Y,className:JW("lucide",K),...!U&&!ET(_)&&{"aria-hidden":"true"},..._},[...q.map(([F,N])=>X$.createElement(F,N)),...Array.isArray(U)?U:[U]]));var l4=(J,X)=>{let Y=XW.forwardRef(({className:W,...K},U)=>XW.createElement(IT,{ref:U,iconNode:X,className:JW(`lucide-${hT(nq(J))}`,`lucide-${J}`,W),...K}));return Y.displayName=nq(J),Y};var Xy=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],$$=l4("arrow-left",Xy);var $y=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Y$=l4("arrow-right",$y);var Yy=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],i4=l4("loader-circle",Yy);var Gy=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],W9=l4("x",Gy);var C2=c(G0(),1);var $W=c(G0(),1),tq=768;function bT(){let[J,X]=$W.useState(void 0);return $W.useEffect(()=>{let Y=window.matchMedia(`(max-width: ${tq-1}px)`),W=()=>{X(window.innerWidth<tq)};return Y.addEventListener("change",W),X(window.innerWidth<tq),()=>Y.removeEventListener("change",W)},[]),!!J}var Qy=c(E1(),1);var Wy=c(E1(),1);var S2=c(E1(),1);function ST({...J}){return S2.jsxDEV(a8.Root,{"data-slot":"sheet",...J},void 0,!1,void 0,this)}function Ky({...J}){return S2.jsxDEV(a8.Portal,{"data-slot":"sheet-portal",...J},void 0,!1,void 0,this)}function Uy({className:J,...X}){return S2.jsxDEV(a8.Backdrop,{"data-slot":"sheet-overlay",className:h1("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/80 duration-100 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-50",J),...X},void 0,!1,void 0,this)}function CT({className:J,children:X,side:Y="right",showCloseButton:W=!0,...K}){return S2.jsxDEV(Ky,{children:[S2.jsxDEV(Uy,{},void 0,!1,void 0,this),S2.jsxDEV(a8.Popup,{"data-slot":"sheet-content","data-side":Y,className:h1("bg-background data-open:animate-in data-closed:animate-out data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 fixed z-50 flex flex-col bg-clip-padding text-xs/relaxed shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",J),...K,children:[X,W&&S2.jsxDEV(a8.Close,{"data-slot":"sheet-close",render:S2.jsxDEV(f6,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"},void 0,!1,void 0,this),children:[S2.jsxDEV(W9,{},void 0,!1,void 0,this),S2.jsxDEV("span",{className:"sr-only",children:"Close"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function yT({className:J,...X}){return S2.jsxDEV("div",{"data-slot":"sheet-header",className:h1("gap-1.5 p-6 flex flex-col",J),...X},void 0,!1,void 0,this)}function RT({className:J,...X}){return S2.jsxDEV(a8.Title,{"data-slot":"sheet-title",className:h1("text-foreground text-sm font-medium",J),...X},void 0,!1,void 0,this)}function gT({className:J,...X}){return S2.jsxDEV(a8.Description,{"data-slot":"sheet-description",className:h1("text-muted-foreground text-xs/relaxed",J),...X},void 0,!1,void 0,this)}var Hy=c(E1(),1);var m6=c(E1(),1);function _y({delay:J=0,...X}){return m6.jsxDEV(o8.Provider,{"data-slot":"tooltip-provider",delay:J,...X},void 0,!1,void 0,this)}function fT({...J}){return m6.jsxDEV(_y,{children:m6.jsxDEV(o8.Root,{"data-slot":"tooltip",...J},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function mT({...J}){return m6.jsxDEV(o8.Trigger,{"data-slot":"tooltip-trigger",...J},void 0,!1,void 0,this)}function dT({className:J,side:X="top",sideOffset:Y=4,align:W="center",alignOffset:K=0,children:U,...q}){return m6.jsxDEV(o8.Portal,{children:m6.jsxDEV(o8.Positioner,{align:W,alignOffset:K,side:X,sideOffset:Y,className:"isolate z-50",children:m6.jsxDEV(o8.Popup,{"data-slot":"tooltip-content",className:h1("data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 rounded-md px-3 py-1.5 text-xs **:data-[slot=kbd]:rounded-md bg-foreground text-background z-50 w-fit max-w-xs origin-(--transform-origin)",J),...q,children:[U,m6.jsxDEV(o8.Arrow,{className:"size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground z-50 data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var Bw=c(E1(),1),qy="sidebar_state",By=604800,Ly="16rem",Vy="18rem",Fy="3rem",Ny="b",uT=C2.createContext(null);function pT(){let J=C2.useContext(uT);if(!J)throw Error("useSidebar must be used within a SidebarProvider.");return J}function cT({defaultOpen:J=!0,open:X,onOpenChange:Y,className:W,style:K,children:U,...q}){let _=bT(),[L,F]=C2.useState(!1),[N,V]=C2.useState(J),k=X??N,A=C2.useCallback((v)=>{let x=typeof v==="function"?v(k):v;if(Y)Y(x);else V(x);document.cookie=`${qy}=${x}; path=/; max-age=${By}`},[Y,k]),D=C2.useCallback(()=>{return _?F((v)=>!v):A((v)=>!v)},[_,A,F]);C2.useEffect(()=>{let v=(x)=>{if(x.key===Ny&&(x.metaKey||x.ctrlKey))x.preventDefault(),D()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[D]);let M=k?"expanded":"collapsed",h=C2.useMemo(()=>({state:M,open:k,setOpen:A,isMobile:_,openMobile:L,setOpenMobile:F,toggleSidebar:D}),[M,k,A,_,L,F,D]);return Bw.jsxDEV(uT.Provider,{value:h,children:Bw.jsxDEV("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Ly,"--sidebar-width-icon":Fy,...K},className:h1("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",W),...q,children:U},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function lT({side:J="left",variant:X="sidebar",collapsible:Y="offExamples",className:W,children:K,...U}){let{isMobile:q,state:_,openMobile:L,setOpenMobile:F}=pT();if(Y==="none")return Bw.jsxDEV("div",{"data-slot":"sidebar",className:h1("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",W),...U,children:K},void 0,!1,void 0,this);if(q)return Bw.jsxDEV(ST,{open:L,onOpenChange:F,...U,children:Bw.jsxDEV(CT,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":Vy},side:J,children:[Bw.jsxDEV(yT,{className:"sr-only",children:[Bw.jsxDEV(RT,{children:"Sidebar"},void 0,!1,void 0,this),Bw.jsxDEV(gT,{children:"Displays the mobile sidebar."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Bw.jsxDEV("div",{className:"flex h-full w-full flex-col",children:K},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);return Bw.jsxDEV("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":_,"data-collapsible":_==="collapsed"?Y:"","data-variant":X,"data-side":J,"data-slot":"sidebar",children:[Bw.jsxDEV("div",{"data-slot":"sidebar-gap",className:h1("transition-[width] duration-200 ease-linear relative w-(--sidebar-width) bg-transparent","group-data-[collapsible=offExamples]:w-0","group-data-[side=right]:rotate-180",X==="floating"||X==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")},void 0,!1,void 0,this),Bw.jsxDEV("div",{"data-slot":"sidebar-container",className:h1("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",J==="left"?"left-0 group-data-[collapsible=offExamples]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offExamples]:right-[calc(var(--sidebar-width)*-1)]",X==="floating"||X==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",W),...U,children:Bw.jsxDEV("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:ring-sidebar-border group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 flex size-full flex-col",children:K},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function iT({className:J,...X}){return Bw.jsxDEV("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:h1("gap-2 p-2 flex flex-col",J),...X},void 0,!1,void 0,this)}function rT({className:J,...X}){return Bw.jsxDEV("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:h1("no-scrollbar gap-0 flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden",J),...X},void 0,!1,void 0,this)}function aT({className:J,...X}){return Bw.jsxDEV("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:h1("px-2 py-1 relative flex w-full min-w-0 flex-col",J),...X},void 0,!1,void 0,this)}function sT({className:J,render:X,...Y}){return bq({defaultTagName:"div",props:D5({className:h1("text-sidebar-foreground/70 ring-sidebar-ring h-8 rounded-md px-2 text-xs transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0",J)},Y),render:X,state:{slot:"sidebar-group-label",sidebar:"group-label"}})}function oT({className:J,...X}){return Bw.jsxDEV("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:h1("text-xs w-full",J),...X},void 0,!1,void 0,this)}function nT({className:J,...X}){return Bw.jsxDEV("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:h1("gap-px flex w-full min-w-0 flex-col",J),...X},void 0,!1,void 0,this)}var ky=wW("ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-[calc(var(--radius-sm)+2px)] p-2 text-left text-xs transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-xs",sm:"h-7 text-xs",lg:"h-12 text-xs group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function tT({render:J,isActive:X=!1,variant:Y="default",size:W="default",tooltip:K,className:U,...q}){let{isMobile:_,state:L}=pT(),F=bq({defaultTagName:"button",props:D5({className:h1(ky({variant:Y,size:W}),U)},q),render:!K?J:mT,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:W,active:X}});if(!K)return F;if(typeof K==="string")K={children:K};return Bw.jsxDEV(fT,{children:[F,Bw.jsxDEV(dT,{side:"right",align:"center",hidden:L!=="collapsed"||_,...K},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var wx=c(E1(),1);function eT({className:J,...X}){return wx.jsxDEV(i4,{role:"status","aria-label":"Loading",className:h1("size-4 animate-spin",J),...X},void 0,!1,void 0,this)}function zx(J){let X=J.getLocation(),Y=new Set,W=(q)=>{X=J.getLocation(),Y.forEach((_)=>_({location:X,action:q}))},K=(q)=>{if(J.notifyOnIndexChange??!0)W(q);else X=J.getLocation()},U=async({task:q,navigateOpts:_,...L})=>{if(_?.ignoreBlocker??!1){q();return}let N=J.getBlockers?.()??[],V=L.type==="PUSH"||L.type==="REPLACE";if(typeof document<"u"&&N.length&&V)for(let k of N){let A=Zx(L.path,L.state);if(await k.blockerFn({currentLocation:X,nextLocation:A,action:L.type})){J.onBlocked?.();return}}q()};return{get location(){return X},get length(){return J.getLength()},subscribers:Y,subscribe:(q)=>{return Y.add(q),()=>{Y.delete(q)}},push:(q,_,L)=>{let F=X.state.__TSR_index;_=eq(F+1,_),U({task:()=>{J.pushState(q,_),W({type:"PUSH"})},navigateOpts:L,type:"PUSH",path:q,state:_})},replace:(q,_,L)=>{let F=X.state.__TSR_index;_=eq(F,_),U({task:()=>{J.replaceState(q,_),W({type:"REPLACE"})},navigateOpts:L,type:"REPLACE",path:q,state:_})},go:(q,_)=>{U({task:()=>{J.go(q),K({type:"GO",index:q})},navigateOpts:_,type:"GO"})},back:(q)=>{U({task:()=>{J.back(q?.ignoreBlocker??!1),K({type:"BACK"})},navigateOpts:q,type:"BACK"})},forward:(q)=>{U({task:()=>{J.forward(q?.ignoreBlocker??!1),K({type:"FORWARD"})},navigateOpts:q,type:"FORWARD"})},canGoBack:()=>X.state.__TSR_index!==0,createHref:(q)=>J.createHref(q),block:(q)=>{if(!J.setBlockers)return()=>{};let _=J.getBlockers?.()??[];return J.setBlockers([..._,q]),()=>{let L=J.getBlockers?.()??[];J.setBlockers?.(L.filter((F)=>F!==q))}},flush:()=>J.flush?.(),destroy:()=>J.destroy?.(),notify:W}}function eq(J,X){if(!X)X={};let Y=Jx();return{...X,key:Y,__TSR_key:Y,["__TSR_index"]:J}}function wB(J={initialEntries:["/"]}){let X=J.initialEntries,Y=J.initialIndex?Math.min(Math.max(J.initialIndex,0),X.length-1):X.length-1,W=X.map((U,q)=>eq(q,void 0));return zx({getLocation:()=>Zx(X[Y],W[Y]),getLength:()=>X.length,pushState:(U,q)=>{if(Y<X.length-1)X.splice(Y+1),W.splice(Y+1);W.push(q),X.push(U),Y=Math.max(X.length-1,0)},replaceState:(U,q)=>{W[Y]=q,X[Y]=U},back:()=>{Y=Math.max(Y-1,0)},forward:()=>{Y=Math.min(Y+1,X.length-1)},go:(U)=>{Y=Math.min(Math.max(Y+U,0),X.length-1)},createHref:(U)=>U})}function Zx(J,X){let Y=J.indexOf("#"),W=J.indexOf("?"),K=Jx();return{href:J,pathname:J.substring(0,Y>0?W>0?Math.min(Y,W):Y:W>0?W:J.length),hash:Y>-1?J.substring(Y):"",search:W>-1?J.slice(W,Y===-1?void 0:Y):"",state:X||{["__TSR_index"]:0,key:K,__TSR_key:K}}}function Jx(){return(Math.random()+1).toString(36).substring(7)}function $x(J){return"init"in J}function zB(J){return!!J.write}function Xx(J){return"v"in J||"e"in J}function YW(J){if("e"in J)throw J.e;if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!("v"in J))throw Error("[Bug] atom state is not initialized");return J.v}var GW=new WeakMap;function Yx(J){var X;return QW(J)&&!!((X=GW.get(J))==null?void 0:X[0])}function Ay(J){let X=GW.get(J);if(X==null?void 0:X[0])X[0]=!1,X[1].forEach((Y)=>Y())}function WW(J,X){let Y=GW.get(J);if(!Y){Y=[!0,new Set],GW.set(J,Y);let W=()=>{Y[0]=!1};J.then(W,W)}Y[1].add(X)}function QW(J){return typeof(J==null?void 0:J.then)==="function"}function Gx(J,X,Y){if(!Y.p.has(J)){Y.p.add(J);let W=()=>Y.p.delete(J);X.then(W,W)}}function Qx(J,X,Y){var W;let K=new Set;for(let U of((W=Y.get(J))==null?void 0:W.t)||[])K.add(U);for(let U of X.p)K.add(U);return K}var jy=(J,X,...Y)=>X.read(...Y),My=(J,X,...Y)=>X.write(...Y),Oy=(J,X)=>{if(X.INTERNAL_onInit)return X.INTERNAL_onInit(J);if(X.unstable_onInit)return console.warn("[DEPRECATED] atom.unstable_onInit is renamed to atom.INTERNAL_onInit."),X.unstable_onInit(J)},Dy=(J,X,Y)=>{var W;return(W=X.onMount)==null?void 0:W.call(X,Y)},Ty=(J,X)=>{var Y;let W=G2(J),K=W[0],U=W[6],q=W[9];if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!X)throw Error("Atom is undefined or null");let _=K.get(X);if(!_)_={d:new Map,p:new Set,n:0},K.set(X,_),(Y=U.i)==null||Y.call(U,X),q==null||q(J,X);return _},xy=(J)=>{let X=G2(J),Y=X[1],W=X[3],K=X[4],U=X[5],q=X[6],_=X[13],L=[],F=(N)=>{try{N()}catch(V){L.push(V)}};do{if(q.f)F(q.f);let N=new Set,V=N.add.bind(N);if(W.forEach((k)=>{var A;return(A=Y.get(k))==null?void 0:A.l.forEach(V)}),W.clear(),U.forEach(V),U.clear(),K.forEach(V),K.clear(),N.forEach(F),W.size)_(J)}while(W.size||U.size||K.size);if(L.length)throw AggregateError(L)},vy=(J)=>{let X=G2(J),Y=X[1],W=X[2],K=X[3],U=X[11],q=X[14],_=X[17],L=[],F=new WeakSet,N=new WeakSet,V=Array.from(K);while(V.length){let k=V[V.length-1],A=U(J,k);if(N.has(k)){V.pop();continue}if(F.has(k)){if(W.get(k)===A.n)L.push([k,A]);else if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&W.has(k))throw Error("[Bug] invalidated atom exists");N.add(k),V.pop();continue}F.add(k);for(let D of Qx(k,A,Y))if(!F.has(D))V.push(D)}for(let k=L.length-1;k>=0;--k){let[A,D]=L[k],M=!1;for(let h of D.d.keys())if(h!==A&&K.has(h)){M=!0;break}if(M)q(J,A),_(J,A);W.delete(A)}},ZB=new WeakSet,hy=(J,X)=>{var Y,W;let K=G2(J),U=K[1],q=K[2],_=K[3],L=K[6],F=K[7],N=K[11],V=K[12],k=K[13],A=K[14],D=K[16],M=K[17],h=K[20],v=N(J,X);if(Xx(v)){if(U.has(X)&&q.get(X)!==v.n)return v;let p=!1;for(let[d,w0]of v.d)if(A(J,d).n!==w0){p=!0;break}if(!p)return v}v.d.clear();let x=!0;function I(){if(U.has(X))M(J,X),k(J),V(J)}function b(p){var d;if(p===X){let t=N(J,p);if(!Xx(t))if($x(p))h(J,p,p.init);else throw Error("no atom init");return YW(t)}let w0=A(J,p);try{return YW(w0)}finally{if(v.d.set(p,w0.n),Yx(v.v))Gx(X,v.v,w0);if(U.has(X))(d=U.get(p))==null||d.t.add(X);if(!x)I()}}let E,m,R={get signal(){if(!E)E=new AbortController;return E.signal},get setSelf(){if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!zB(X))console.warn("setSelf function cannot be used with read-only atom");if(!m&&zB(X))m=(...p)=>{if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&x)console.warn("setSelf function cannot be called in sync");if(!x)try{return D(J,X,...p)}finally{k(J),V(J)}};return m}},S=v.n;try{if((import.meta.env?import.meta.env.MODE:void 0)!=="production")ZB.delete(J);let p=F(J,X,b,R);if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&ZB.has(J))console.warn("Detected store mutation during atom read. This is not supported.");if(h(J,X,p),QW(p))WW(p,()=>E==null?void 0:E.abort()),p.then(I,I);return(Y=L.r)==null||Y.call(L,X),v}catch(p){return delete v.v,v.e=p,++v.n,v}finally{if(x=!1,S!==v.n&&q.get(X)===S)q.set(X,v.n),_.add(X),(W=L.c)==null||W.call(L,X)}},Ey=(J,X)=>{let Y=G2(J),W=Y[1],K=Y[2],U=Y[11],q=[X];while(q.length){let _=q.pop(),L=U(J,_);for(let F of Qx(_,L,W)){let N=U(J,F);K.set(F,N.n),q.push(F)}}},Py=(J,X,...Y)=>{let W=G2(J),K=W[3],U=W[6],q=W[8],_=W[11],L=W[12],F=W[13],N=W[14],V=W[15],k=W[16],A=W[17],D=W[20],M=!0,h=(x)=>YW(N(J,x)),v=(x,...I)=>{var b;let E=_(J,x);try{if(x===X){if(!$x(x))throw Error("atom not writable");if((import.meta.env?import.meta.env.MODE:void 0)!=="production")ZB.add(J);let m=E.n,R=I[0];if(D(J,x,R),A(J,x),m!==E.n)K.add(x),V(J,x),(b=U.c)==null||b.call(U,x);return}else return k(J,x,...I)}finally{if(!M)F(J),L(J)}};try{return q(J,X,h,v,...Y)}finally{M=!1}},Iy=(J,X)=>{var Y;let W=G2(J),K=W[1],U=W[3],q=W[6],_=W[11],L=W[15],F=W[18],N=W[19],V=_(J,X),k=K.get(X);if(k&&!Yx(V.v)){for(let[A,D]of V.d)if(!k.d.has(A)){let M=_(J,A);if(F(J,A).t.add(X),k.d.add(A),D!==M.n)U.add(A),L(J,A),(Y=q.c)==null||Y.call(q,A)}for(let A of k.d)if(!V.d.has(A)){k.d.delete(A);let D=N(J,A);D==null||D.t.delete(X)}}},by=(J,X)=>{var Y;let W=G2(J),K=W[1],U=W[4],q=W[6],_=W[10],L=W[11],F=W[12],N=W[13],V=W[14],k=W[16],A=W[18],D=L(J,X),M=K.get(X);if(!M){V(J,X);for(let h of D.d.keys())A(J,h).t.add(X);if(M={l:new Set,d:new Set(D.d.keys()),t:new Set},K.set(X,M),zB(X)){let h=()=>{let v=!0,x=(...I)=>{try{return k(J,X,...I)}finally{if(!v)N(J),F(J)}};try{let I=_(J,X,x);if(I)M.u=()=>{v=!0;try{I()}finally{v=!1}}}finally{v=!1}};U.add(h)}(Y=q.m)==null||Y.call(q,X)}return M},Sy=(J,X)=>{var Y,W;let K=G2(J),U=K[1],q=K[5],_=K[6],L=K[11],F=K[19],N=L(J,X),V=U.get(X);if(!V||V.l.size)return V;let k=!1;for(let A of V.t)if((Y=U.get(A))==null?void 0:Y.d.has(X)){k=!0;break}if(!k){if(V.u)q.add(V.u);V=void 0,U.delete(X);for(let A of N.d.keys()){let D=F(J,A);D==null||D.t.delete(X)}(W=_.u)==null||W.call(_,X);return}return V},Cy=(J,X,Y)=>{let W=G2(J)[11],K=W(J,X),U="v"in K,q=K.v;if(QW(Y))for(let _ of K.d.keys())Gx(X,Y,W(J,_));if(K.v=Y,delete K.e,!U||!Object.is(q,K.v)){if(++K.n,QW(q))Ay(q)}},yy=(J,X)=>{let Y=G2(J)[14];return YW(Y(J,X))},Ry=(J,X,...Y)=>{let W=G2(J),K=W[12],U=W[13],q=W[16];try{return q(J,X,...Y)}finally{U(J),K(J)}},gy=(J,X,Y)=>{let W=G2(J),K=W[12],U=W[18],q=W[19],L=U(J,X).l;return L.add(Y),K(J),()=>{L.delete(Y),q(J,X),K(J)}},Wx=new WeakMap,G2=(J)=>{let X=Wx.get(J);if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!X)throw Error("Store must be created by buildStore to read its building blocks");return X};function Kx(...J){let X={get(W){let K=G2(X)[21];return K(X,W)},set(W,...K){let U=G2(X)[22];return U(X,W,...K)},sub(W,K){let U=G2(X)[23];return U(X,W,K)}},Y=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},jy,My,Oy,Dy,Ty,xy,vy,hy,Ey,Py,Iy,by,Sy,Cy,yy,Ry,gy,void 0].map((W,K)=>J[K]||W);return Wx.set(X,Object.freeze(Y)),X}var fy=0;function Q$(J,X){let Y=`atom${++fy}`,W={toString(){return(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&this.debugLabel?Y+":"+this.debugLabel:Y}};if(typeof J==="function")W.read=J;else W.init=J,W.read=my,W.write=dy;if(X)W.write=X;return W}function my(J){return J(this)}function dy(J,X,Y){return X(this,typeof Y==="function"?Y(J(this)):Y)}var Ux;function Hx(){if(Ux)return Ux();return Kx()}var G$;function _x(){if(!G$){if(G$=Hx(),(import.meta.env?import.meta.env.MODE:void 0)!=="production"){if(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=G$),globalThis.__JOTAI_DEFAULT_STORE__!==G$)console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044")}}return G$}var ew=c(G0(),1);var uy=ew.createContext(void 0);function Bx(J){let X=ew.useContext(uy);return(J==null?void 0:J.store)||X||_x()}var XB=(J)=>typeof(J==null?void 0:J.then)==="function",$B=(J)=>{if(!J.status)J.status="pending",J.then((X)=>{J.status="fulfilled",J.value=X},(X)=>{J.status="rejected",J.reason=X})},py=ew.default.use||((J)=>{if(J.status==="pending")throw J;else if(J.status==="fulfilled")return J.value;else if(J.status==="rejected")throw J.reason;else throw $B(J),J}),JB=new WeakMap,qx=(J,X)=>{let Y=JB.get(J);if(!Y)Y=new Promise((W,K)=>{let U=J,q=(F)=>(N)=>{if(U===F)W(N)},_=(F)=>(N)=>{if(U===F)K(N)},L=()=>{try{let F=X();if(XB(F))JB.set(F,Y),U=F,F.then(q(F),_(F)),WW(F,L);else W(F)}catch(F){K(F)}};J.then(q(J),_(J)),WW(J,L)}),JB.set(J,Y);return Y};function cy(J,X){let{delay:Y,unstable_promiseStatus:W=!ew.default.use}=X||{},K=Bx(X),[[U,q,_],L]=ew.useReducer((N)=>{let V=K.get(J);if(Object.is(N[0],V)&&N[1]===K&&N[2]===J)return N;return[V,K,J]},void 0,()=>[K.get(J),K,J]),F=U;if(q!==K||_!==J)L(),F=K.get(J);if(ew.useEffect(()=>{let N=K.sub(J,()=>{if(W)try{let V=K.get(J);if(XB(V))$B(qx(V,()=>K.get(J)))}catch(V){}if(typeof Y==="number"){setTimeout(L,Y);return}L()});return L(),N},[K,J,Y,W]),ew.useDebugValue(F),XB(F)){let N=qx(F,()=>K.get(J));if(W)$B(N);return py(N)}return F}function ly(J,X){let Y=Bx(X);return ew.useCallback((...K)=>{if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!("write"in J))throw Error("not writable atom");return Y.set(J,...K)},[Y,J])}function Q8(J,X){return[cy(J,X),ly(J,X)]}var iy=Symbol((import.meta.env?import.meta.env.MODE:void 0)!=="production"?"RESET":"");var Lx=(J)=>typeof(J==null?void 0:J.then)==="function";function ry(J=()=>{try{return window.localStorage}catch(Y){if((import.meta.env?import.meta.env.MODE:void 0)!=="production"){if(typeof window<"u")console.warn(Y)}return}},X){var Y;let W,K,U={getItem:(L,F)=>{var N,V;let k=(D)=>{if(D=D||"",W!==D){try{K=JSON.parse(D,X==null?void 0:X.reviver)}catch(M){return F}W=D}return K},A=(V=(N=J())==null?void 0:N.getItem(L))!=null?V:null;if(Lx(A))return A.then(k);return k(A)},setItem:(L,F)=>{var N;return(N=J())==null?void 0:N.setItem(L,JSON.stringify(F,X==null?void 0:X.replacer))},removeItem:(L)=>{var F;return(F=J())==null?void 0:F.removeItem(L)}},q=(L)=>(F,N,V)=>L(F,(k)=>{let A;try{A=JSON.parse(k||"")}catch(D){A=V}N(A)}),_;try{_=(Y=J())==null?void 0:Y.subscribe}catch(L){}if(!_&&typeof window<"u"&&typeof window.addEventListener==="function"&&window.Storage)_=(L,F)=>{if(!(J()instanceof window.Storage))return()=>{};let N=(V)=>{if(V.storageArea===J()&&V.key===L)F(V.newValue)};return window.addEventListener("storage",N),()=>{window.removeEventListener("storage",N)}};if(_)U.subscribe=q(_);return U}var ay=ry();function YB(J,X,Y=ay,W){let K=W==null?void 0:W.getOnInit,U=Q$(K?Y.getItem(J,X):X);if((import.meta.env?import.meta.env.MODE:void 0)!=="production")U.debugPrivate=!0;return U.onMount=(_)=>{_(Y.getItem(J,X));let L;if(Y.subscribe)L=Y.subscribe(J,_,X);return L},Q$((_)=>_(U),(_,L,F)=>{let N=typeof F==="function"?F(_(U)):F;if(N===iy)return L(U,X),Y.removeItem(J);if(Lx(N))return N.then((V)=>{return L(U,V),Y.setItem(J,V)});return L(U,N),Y.setItem(J,N)})}var GB=YB("activeTabId",null),K9=YB("tabs",[]),sy=Q$((J)=>J(K9).reduce((X,Y)=>{return X[Y.id]=wB({initialEntries:[Y.path]}),X},{}));function LZ(){return Q8(K9)}function Vx(){let[J]=Q8(K9),[X,Y]=Q8(GB),[W]=Q8(sy),K=J.find((q)=>q.id===X)??null,U=X?W[X]:null;return{activeTab:K,setActiveTab:Y,tabHistory:U}}function Fx(){let[,J]=Q8(K9),[,X]=Q8(GB);return(Y)=>{let W=crypto.randomUUID();return J((K)=>[...K,{...Y,id:W}]),X(W),W}}function Nx(){let[J,X]=Q8(K9);return(Y)=>{X(J.map((W)=>W.id===Y?{...W,temporary:!1}:W))}}function kx(){let[J,X]=Q8(K9),[Y,W]=Q8(GB);return(K)=>{if(X(J.filter((U)=>U.id!==K)),Y===K){let U=J.findIndex((_)=>_.id===K),q=J[U-1]||J[U+1]||null;W(q?q.id:null)}}}function Ax(){let[J,X]=Q8(K9);return(Y,W)=>{X(J.map((K)=>K.id===Y?{...W,id:Y}:K))}}var U9=c(E1(),1);function jx({...J}){return U9.jsxDEV(b6.Root,{"data-slot":"context-menu",...J},void 0,!1,void 0,this)}function Mx({className:J,...X}){return U9.jsxDEV(b6.Trigger,{"data-slot":"context-menu-trigger",className:h1("select-none",J),...X},void 0,!1,void 0,this)}function Ox({className:J,align:X="start",alignOffset:Y=4,side:W="right",sideOffset:K=0,...U}){return U9.jsxDEV(b6.Portal,{children:U9.jsxDEV(b6.Positioner,{className:"isolate z-50 outline-none",align:X,alignOffset:Y,side:W,sideOffset:K,children:U9.jsxDEV(b6.Popup,{"data-slot":"context-menu-content",className:h1("data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-lg p-1 shadow-md ring-1 duration-100 dark z-50 max-h-(--available-height) origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none",J),...U},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function QB({className:J,inset:X,variant:Y="default",...W}){return U9.jsxDEV(b6.Item,{"data-slot":"context-menu-item","data-inset":X,"data-variant":Y,className:h1("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5 group/context-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",J),...W},void 0,!1,void 0,this)}var H9=c(E1(),1);function Dx({story:J,...X}){let[Y]=LZ(),{activeTab:W,setActiveTab:K}=Vx(),U=Fx(),q=Ax();function _(F){return()=>{let N=Y.find((V)=>V.path===J.id);if(N)return K(N.id);if(W?.temporary)return q(W.id,{name:J.name,path:J.id,temporary:F==="temporary"});return U({name:J.name,path:J.id,temporary:F==="temporary"})}}function L(){return()=>{U({name:J.name,path:J.id,temporary:!1})}}return H9.jsxDEV(jx,{children:[H9.jsxDEV(Mx,{render:H9.jsxDEV(tT,{onClick:_("temporary"),onDoubleClick:_("permanent"),...X},void 0,!1,void 0,this)},void 0,!1,void 0,this),H9.jsxDEV(Ox,{children:[H9.jsxDEV(QB,{onSelect:_("permanent"),children:"Open"},void 0,!1,void 0,this),H9.jsxDEV(QB,{onSelect:L(),children:"Open in New Tab"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var lw=c(E1(),1);function Tx(){let{data:J,isLoading:X,error:Y}=rq({queryKey:["stories"],queryFn:$T});return lw.jsxDEV(lT,{children:[lw.jsxDEV(iT,{children:lw.jsxDEV(f6,{variant:"outline",size:"lg",className:"flex justify-between gap-1 w-full text-zinc-500 font-normal",children:[lw.jsxDEV("span",{children:"Search..."},void 0,!1,void 0,this),lw.jsxDEV(xT,{children:"⌘ K"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),lw.jsxDEV(rT,{children:[X&&lw.jsxDEV("div",{className:"w-full py-8 flex items-center justify-center",children:lw.jsxDEV(eT,{},void 0,!1,void 0,this)},void 0,!1,void 0,this),Y&&lw.jsxDEV("div",{className:"w-full py-8 flex flex-col items-center justify-center text-center gap-2",children:[lw.jsxDEV("p",{className:"text-xs text-destructive font-medium",children:"Failed to load stories."},void 0,!1,void 0,this),lw.jsxDEV("p",{className:"text-xs text-muted-foreground",children:"Check if your server is running and accessible."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J&&Object.keys(J).map((W)=>lw.jsxDEV(aT,{children:[lw.jsxDEV(sT,{children:W},void 0,!1,void 0,this),lw.jsxDEV(oT,{children:lw.jsxDEV(nT,{children:J[W]?.map((K)=>lw.jsxDEV(Dx,{story:{id:K.path,name:K.name},children:lw.jsxDEV("span",{children:K.name},void 0,!1,void 0,this)},K.path,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},W,!0,void 0,this))]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var VZ=c(E1(),1);function xx(){let[J]=LZ();return VZ.jsxDEV(VZ.Fragment,{children:J.map((X)=>VZ.jsxDEV(R6.Panel,{value:X.id,children:VZ.jsxDEV("iframe",{src:`/iframe/${X.path}`,className:"w-full h-full border-none bg-white",title:X.name},void 0,!1,void 0,this)},X.id,!1,void 0,this))},void 0,!1,void 0,this)}var W8=c(E1(),1);function vx(){let[J]=LZ(),X=Nx(),Y=kx();return W8.jsxDEV(R6.List,{className:"border-b h-8 bg-sidebar flex w-full",children:[J.length>0&&W8.jsxDEV("div",{className:"flex h-full items-center px-1.5 gap-0.5 border-r",children:[W8.jsxDEV(f6,{variant:"ghost",size:"icon-sm",children:W8.jsxDEV($$,{},void 0,!1,void 0,this)},void 0,!1,void 0,this),W8.jsxDEV(f6,{variant:"ghost",size:"icon-sm",children:W8.jsxDEV(Y$,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J.map((W)=>W8.jsxDEV(R6.Tab,{nativeButton:!1,render:W8.jsxDEV("div",{},void 0,!1,void 0,this),value:W.id,className:"px-6 h-8 border-r text-xs flex items-center justify-center relative group data-[temporary=true]:italic select-none","data-temporary":W.temporary,onClick:()=>{if(W.temporary)X(W.id)},children:[W.name,W8.jsxDEV(f6,{size:"icon-xs",variant:"ghost",className:"absolute right-1 invisible opacity-0 group-hover:visible group-hover:opacity-100 transition-opacity duration-200 p-0",onClick:(K)=>{K.stopPropagation(),Y(W.id)},children:W8.jsxDEV(W9,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},W.id,!0,void 0,this))]},void 0,!0,void 0,this)}var r4=c(E1(),1);function hx(){return r4.jsxDEV(lq,{client:XT,children:r4.jsxDEV(cT,{children:[r4.jsxDEV(Tx,{},void 0,!1,void 0,this),r4.jsxDEV("main",{className:"flex flex-col w-full",children:r4.jsxDEV(R6.Root,{children:[r4.jsxDEV(vx,{},void 0,!1,void 0,this),r4.jsxDEV(xx,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var Ix=c(E1(),1),Px=document.getElementById("root");if(!Px)throw Error("Root element not found");function oy(){let J=0,X=10;function Y(){let K=document.querySelectorAll("iframe");K.forEach((U)=>{let q=U.src,_=new URL(q);_.searchParams.set("_hmr",Date.now().toString()),U.src=_.toString()}),console.log(`[HMR] Refreshed ${K.length} iframe(s)`)}function W(){let K=new WebSocket(`ws://${location.host}/__hmr`);K.onopen=()=>{console.log("[HMR] Connected"),J=0},K.onmessage=(U)=>{if(JSON.parse(U.data).type==="reload")console.log("[HMR] Reloading iframes..."),Y()},K.onclose=()=>{if(console.log("[HMR] Disconnected"),J<X)J++,setTimeout(W,1000*Math.min(J,5))},K.onerror=()=>K.close()}W()}Ex.createRoot(Px).render(Ix.jsxDEV(hx,{},void 0,!1,void 0,this));oy();
262
+ )`}return OO.jsx("div",{ref:Y,role:"presentation","data-base-ui-inert":"",...K,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:U}})});hX.displayName="InternalBackdrop";var EX=c(x1(),1),zq=DO.forwardRef(function(X,Y){let{keepMounted:W=!1,...K}=X,{store:U}=pw(),q=U.useState("mounted"),_=U.useState("modal");if(!(q||W))return null;return EX.jsx(bG.Provider,{value:W,children:EX.jsxs(Sz,{ref:Y,...K,children:[q&&_===!0&&EX.jsx(hX,{ref:U.context.internalBackdropRef,inert:iz(!open)}),X.children]})})});zq.displayName="DialogPortal";var TO=c(G0(),1);var Zq=TO.forwardRef(function(X,Y){let{render:W,className:K,id:U,...q}=X,{store:_}=pw(),L=ww(U);return _.useSyncedValueWithCleanup("titleElementId",L),h0("h2",X,{ref:Y,props:[{id:L},q]})});Zq.displayName="DialogTitle";var rz=c(G0(),1);var Jq=rz.forwardRef(function(X,Y){let{render:W,className:K,disabled:U=!1,nativeButton:q=!0,id:_,payload:L,handle:F,...N}=X,V=pw(!0),k=F?.store??V?.store;if(!k)throw Error("Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.");let A=ww(_),D=k.useState("floatingRootContext"),M=k.useState("isOpenedByTrigger",A),h=rz.useRef(null),{registerTrigger:v,isMountedByThisTrigger:x}=gz(A,h,k,{payload:L}),{getButtonProps:I,buttonRef:b}=Z5({disabled:U,native:q}),E=r7(D,{enabled:D!=null}),m=$5([E]),R=rz.useMemo(()=>({disabled:U,open:M}),[U,M]),S=k.useState("triggerProps",x);return h0("button",X,{state:R,ref:[b,Y,v,h],props:[m.getReferenceProps(),S,{[hY]:"",id:A},N,I],stateAttributesMapping:lz})});Jq.displayName="DialogTrigger";var yG=c(G0(),1);var Xq=function(J){return J[J.open=Y5.open]="open",J[J.closed=Y5.closed]="closed",J[J.startingStyle=Y5.startingStyle]="startingStyle",J[J.endingStyle=Y5.endingStyle]="endingStyle",J.nested="data-nested",J.nestedDialogOpen="data-nested-dialog-open",J}({});var yS={...xw,...h2,nested(J){return J?{[Xq.nested]:""}:null},nestedDialogOpen(J){return J?{[Xq.nestedDialogOpen]:""}:null}},$q=yG.forwardRef(function(X,Y){let{className:W,render:K,children:U,...q}=X,_=SG(),{store:L}=pw(),F=L.useState("open"),N=L.useState("nested"),V=L.useState("transitionStatus"),k=L.useState("nestedOpenDialogCount"),A=L.useState("mounted"),D=k>0,M=yG.useMemo(()=>({open:F,nested:N,transitionStatus:V,nestedDialogOpen:D}),[F,N,V,D]);return h0("div",X,{enabled:_||A,state:M,ref:[Y,L.useStateSetter("viewportElement")],stateAttributesMapping:yS,props:[{role:"presentation",hidden:!A,children:U},q]})});$q.displayName="DialogViewport";class RG{constructor(J){this.store=J??new xX}open(J){let X=J?this.store.context.triggerElements.getById(J):void 0;if(J&&!X)console.warn(`Base UI: DialogHandle.open: No trigger found with id "${J}". The dialog will open, but the trigger will not be associated with the dialog.`);this.store.setOpen(!0,P0(B0.imperativeAction,void 0,X))}openWithPayload(J){this.store.set("payload",J),this.store.setOpen(!0,P0(B0.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,P0(B0.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}function xO(){return new RG}function vO(J){let X=J.getBoundingClientRect(),Y=window.getComputedStyle(J,"::before"),W=window.getComputedStyle(J,"::after");if(!(Y.content!=="none"||W.content!=="none"))return X;let U=parseFloat(Y.width)||0,q=parseFloat(Y.height)||0,_=parseFloat(W.width)||0,L=parseFloat(W.height)||0,F=Math.max(X.width,U,_),N=Math.max(X.height,q,L),V=F-X.width,k=N-X.height;return{left:X.left-V/2,right:X.right+V/2,top:X.top-k/2,bottom:X.bottom+k/2}}var G5=c(G0(),1);var RS=(J)=>({name:"arrow",options:J,async fn(X){let{x:Y,y:W,placement:K,rects:U,platform:q,elements:_,middlewareData:L}=X,{element:F,padding:N=0,offsetParent:V="real"}=e5(J,X)||{};if(F==null)return{};let k=nY(N),A={x:Y,y:W},D=WX(K),M=QX(D),h=await q.getDimensions(F),v=D==="y",x=v?"top":"left",I=v?"bottom":"right",b=v?"clientHeight":"clientWidth",E=U.reference[M]+U.reference[D]-A[D]-U.floating[M],m=A[D]-U.reference[D],R=V==="real"?await q.getOffsetParent?.(F):_.floating,S=_.floating[b]||U.floating[M];if(!S||!await q.isElement?.(R))S=_.floating[b]||U.floating[M];let p=E/2-m/2,d=S/2-h[M]/2-1,w0=Math.min(k[x],d),t=Math.min(k[I],d),u=w0,Q0=S-h[M]-t,r=S/2-h[M]/2+p,e=GX(u,r,Q0),o=!L.arrow&&w8(K)!=null&&r!==e&&U.reference[M]/2-(r<u?w0:t)-h[M]/2<0,g=o?r<u?r-u:r-Q0:0;return{[D]:A[D]+g,data:{[D]:e,centerOffset:r-e-g,...o&&{alignmentOffset:g}},reset:o}}}),hO=(J,X)=>({...RS(J),options:[J,X]});var EO={name:"hide",async fn(J){let{width:X,height:Y,x:W,y:K}=J.rects.reference,U=X===0&&Y===0&&W===0&&K===0;return{data:{referenceHidden:(await g_().fn(J)).data?.referenceHidden||U}}}};var PX={sideX:"left",sideY:"top"},PO={name:"adaptiveOrigin",async fn(J){let{x:X,y:Y,rects:{floating:W},elements:{floating:K},platform:U,strategy:q,placement:_}=J,L=u1(K),F=L.getComputedStyle(K);if(!(F.transitionDuration!=="0s"&&F.transitionDuration!==""))return{x:X,y:Y,data:PX};let V=await U.getOffsetParent?.(K),k={width:0,height:0};if(q==="fixed"&&L?.visualViewport)k={width:L.visualViewport.width,height:L.visualViewport.height};else if(V===L){let x=Dw(K);k={width:x.documentElement.clientWidth,height:x.documentElement.clientHeight}}else if(await U.isElement?.(V))k=await U.getDimensions(V);let A=nw(_),D=X,M=Y;if(A==="left")D=k.width-(X+W.width);if(A==="top")M=k.height-(Y+W.height);let h=A==="left"?"right":PX.sideX,v=A==="top"?"bottom":PX.sideY;return{x:D,y:M,data:{sideX:h,sideY:v}}}};function SO(J,X,Y){let W=J==="inline-start"||J==="inline-end";return{top:"top",right:W?Y?"inline-start":"inline-end":"right",bottom:"bottom",left:W?Y?"inline-end":"inline-start":"left"}[X]}function IO(J,X,Y){let{rects:W,placement:K}=J;return{side:SO(X,nw(K),Y),align:w8(K)||"center",anchor:{width:W.reference.width,height:W.reference.height},positioner:{width:W.floating.width,height:W.floating.height}}}function gG(J){let{anchor:X,positionMethod:Y="absolute",side:W="bottom",sideOffset:K=0,align:U="center",alignOffset:q=0,collisionBoundary:_,collisionPadding:L=5,sticky:F=!1,arrowPadding:N=5,disableAnchorTracking:V=!1,keepMounted:k=!1,floatingRootContext:A,mounted:D,collisionAvoidance:M,shiftCrossAxis:h=!1,nodeId:v,adaptiveOrigin:x,lazyFlip:I=!1,externalTree:b}=J,[E,m]=G5.useState(null);if(!D&&E!==null)m(null);let R=M.side||"flip",S=M.align||"flip",p=M.fallbackAxisSide||"end",d=typeof X==="function"?X:void 0,w0=F0(d),t=d?w0:X,u=Kw(X),r=M5()==="rtl",e=E||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":r?"left":"right","inline-start":r?"right":"left"}[W],o=U==="center"?e:`${e}-${U}`,g=L,X0=1,P=W==="bottom"?X0:0,z0=W==="top"?X0:0,U0=W==="right"?X0:0,J0=W==="left"?X0:0;if(typeof g==="number")g={top:g+P,right:g+J0,bottom:g+z0,left:g+U0};else if(g)g={top:(g.top||0)+P,right:(g.right||0)+J0,bottom:(g.bottom||0)+z0,left:(g.left||0)+U0};let L0={boundary:_==="clipping-ancestors"?"clippingAncestors":_,padding:g},S0=G5.useRef(null),V0=Kw(K),H0=Kw(q),n0=[b_((s)=>{let K0=IO(s,W,r),N0=typeof V0.current==="function"?V0.current(K0):V0.current,T0=typeof H0.current==="function"?H0.current(K0):H0.current;return{mainAxis:N0,crossAxis:T0,alignmentAxis:T0}},[typeof K!=="function"?K:0,typeof q!=="function"?q:0,r,W])],n=S==="none"&&R!=="shift",R0=!n&&(F||h||R==="shift"),I0=R==="none"?null:y_({...L0,padding:{top:g.top+X0,right:g.right+X0,bottom:g.bottom+X0,left:g.left+X0},mainAxis:!h&&R==="flip",crossAxis:S==="flip"?"alignment":!1,fallbackAxisSideDirection:p}),j1=n?null:S_((s)=>{let K0=Dw(s.elements.floating).documentElement;return{...L0,rootBoundary:h?{x:0,y:0,width:K0.clientWidth,height:K0.clientHeight}:void 0,mainAxis:S!=="none",crossAxis:R0,limiter:F||h?void 0:C_((N0)=>{if(!S0.current)return{};let{width:T0,height:a0}=S0.current.getBoundingClientRect(),u0=E2(nw(N0.placement)),$1=u0==="y"?T0:a0,d0=u0==="y"?g.left+g.right:g.top+g.bottom;return{offset:$1/2+d0/2}})}},[L0,F,h,g,S]);if(R==="shift"||S==="shift"||U==="center")n0.push(j1,I0);else n0.push(I0,j1);n0.push(R_({...L0,apply({elements:{floating:s},rects:{reference:K0},availableWidth:N0,availableHeight:T0}){Object.entries({"--available-width":`${N0}px`,"--available-height":`${T0}px`,"--anchor-width":`${K0.width}px`,"--anchor-height":`${K0.height}px`}).forEach(([a0,u0])=>{s.style.setProperty(a0,u0)})}}),hO(()=>({element:S0.current||document.createElement("div"),padding:N,offsetParent:"floating"}),[N]),{name:"transformOrigin",fn(s){let{elements:K0,middlewareData:N0,placement:T0,rects:a0,y:u0}=s,$1=nw(T0),d0=E2($1),Ew=S0.current,Q2=N0.arrow?.x||0,K8=N0.arrow?.y||0,a4=Ew?.clientWidth||0,W$=Ew?.clientHeight||0,d6=Q2+a4/2,s4=K8+W$/2,g5=Math.abs(N0.shift?.y||0),A2=a0.reference.height/2,u6=typeof K==="function"?K(IO(s,W,r)):K,KW=g5>u6,FZ={top:`${d6}px calc(100% + ${u6}px)`,bottom:`${d6}px ${-u6}px`,left:`calc(100% + ${u6}px) ${s4}px`,right:`${-u6}px ${s4}px`}[$1],K$=`${d6}px ${a0.reference.y+A2-u0}px`;return K0.floating.style.setProperty("--transform-origin",R0&&d0==="y"&&KW?K$:FZ),{}}},EO,x),k0(()=>{if(!D&&A)A.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[D,A]);let b0=G5.useMemo(()=>({elementResize:!V&&typeof ResizeObserver<"u",layoutShift:!V&&typeof IntersectionObserver<"u"}),[V]),{refs:_0,elements:O0,x:A0,y:c0,middlewareData:C0,update:E0,placement:o0,context:x0,isPositioned:l0,floatingStyles:y0}=c_({rootContext:A,placement:o,middleware:n0,strategy:Y,whileElementsMounted:k?void 0:(...s)=>kX(...s,b0),nodeId:v,externalTree:b}),{sideX:q1,sideY:D1}=C0.adaptiveOrigin||PX,W1=l0?Y:"fixed",Gw=G5.useMemo(()=>x?{position:W1,[q1]:A0,[D1]:c0}:{position:W1,...y0},[x,W1,q1,A0,D1,c0,y0]),zw=G5.useRef(null);k0(()=>{if(!D)return;let s=u.current,K0=typeof s==="function"?s():s,T0=(bO(K0)?K0.current:K0)||null||null;if(T0!==zw.current)_0.setPositionReference(T0),zw.current=T0},[D,_0,t,u]),G5.useEffect(()=>{if(!D)return;let s=u.current;if(typeof s==="function")return;if(bO(s)&&s.current!==zw.current)_0.setPositionReference(s.current),zw.current=s.current},[D,_0,t,u]),G5.useEffect(()=>{if(k&&D&&O0.domReference&&O0.floating)return kX(O0.domReference,O0.floating,E0,b0);return},[k,D,O0,E0,b0]);let Lw=nw(o0),Uw=SO(W,Lw,r),hw=w8(o0)||"center",J1=Boolean(C0.hide?.referenceHidden);k0(()=>{if(I&&D&&l0)m(Lw)},[I,D,l0,Lw]);let N1=G5.useMemo(()=>({position:"absolute",top:C0.arrow?.y,left:C0.arrow?.x}),[C0.arrow]),T=C0.arrow?.centerOffset!==0;return G5.useMemo(()=>({positionerStyles:Gw,arrowStyles:N1,arrowRef:S0,arrowUncentered:T,side:Uw,align:hw,physicalSide:Lw,anchorHidden:J1,refs:_0,context:x0,isPositioned:l0,update:E0}),[Gw,N1,S0,T,Uw,hw,Lw,J1,_0,x0,l0,E0])}function bO(J){return J!=null&&"current"in J}function az(J){return J==="starting"?qj:v1}var fG=c(G0(),1);var IX=fG.forwardRef(function(X,Y){let{className:W,render:K,orientation:U="horizontal",...q}=X,_=fG.useMemo(()=>({orientation:U}),[U]);return h0("div",X,{state:_,ref:Y,props:[{role:"separator","aria-orientation":U},q]})});IX.displayName="Separator";var mG=c(G0(),1);var dG=mG.forwardRef(function(X,Y){let{render:W,className:K,disabled:U=!1,focusableWhenDisabled:q=!1,nativeButton:_=!0,...L}=X,F=Boolean(U),{getButtonProps:N,buttonRef:V}=Z5({disabled:F,focusableWhenDisabled:q,native:_}),k=mG.useMemo(()=>({disabled:F}),[F]);return h0("button",X,{state:k,ref:[Y,V],props:[L,N]})});dG.displayName="Button";var b6={};qz(b6,{Trigger:()=>Hq,SubmenuTrigger:()=>aX,SubmenuRoot:()=>BQ,Separator:()=>IX,Root:()=>zD,RadioItemIndicator:()=>lX,RadioItem:()=>cX,RadioGroup:()=>pX,Positioner:()=>uX,Portal:()=>dX,Popup:()=>mX,Item:()=>fX,GroupLabel:()=>gX,Group:()=>RX,CheckboxItemIndicator:()=>yX,CheckboxItem:()=>CX,Backdrop:()=>SX,Arrow:()=>bX});var $8=c(G0(),1);var uG=c(G0(),1),pG=uG.createContext(void 0);pG.displayName="ContextMenuRootContext";function C5(J=!0){let X=uG.useContext(pG);if(X===void 0&&!J)throw Error("Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>.");return X}var AQ={};qz(AQ,{createHandle:()=>wD,Trigger:()=>Uq,SubmenuTrigger:()=>aX,SubmenuRoot:()=>BQ,Separator:()=>IX,Root:()=>qQ,RadioItemIndicator:()=>lX,RadioItem:()=>cX,RadioGroup:()=>pX,Positioner:()=>uX,Portal:()=>dX,Popup:()=>mX,Item:()=>fX,Handle:()=>kQ,GroupLabel:()=>gX,Group:()=>RX,CheckboxItemIndicator:()=>yX,CheckboxItem:()=>CX,Backdrop:()=>SX,Arrow:()=>bX});var rG=c(G0(),1);var cG=c(G0(),1),lG=cG.createContext(void 0);lG.displayName="MenuPositionerContext";function y5(J){let X=cG.useContext(lG);if(X===void 0&&!J)throw Error("Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>.");return X}var iG=c(G0(),1),sz=iG.createContext(void 0);sz.displayName="MenuRootContext";function p1(J){let X=iG.useContext(sz);if(X===void 0&&!J)throw Error("Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>.");return X}var bX=rG.forwardRef(function(X,Y){let{className:W,render:K,...U}=X,{store:q}=p1(),{arrowRef:_,side:L,align:F,arrowUncentered:N,arrowStyles:V}=y5(),k=q.useState("open"),A=rG.useMemo(()=>({open:k,side:L,align:F,uncentered:N}),[k,L,F,N]);return h0("div",X,{ref:[_,Y],stateAttributesMapping:xw,state:A,props:{style:V,"aria-hidden":!0,...U}})});bX.displayName="MenuArrow";var aG=c(G0(),1);var gS={...xw,...h2},SX=aG.forwardRef(function(X,Y){let{className:W,render:K,...U}=X,{store:q}=p1(),_=q.useState("open"),L=q.useState("mounted"),F=q.useState("transitionStatus"),N=q.useState("lastOpenChangeReason"),V=C5(),k=aG.useMemo(()=>({open:_,transitionStatus:F}),[_,F]);return h0("div",X,{ref:V?.backdropRef?[Y,V.backdropRef]:Y,state:k,stateAttributesMapping:gS,props:[{role:"presentation",hidden:!L,style:{pointerEvents:N===B0.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},U]})});SX.displayName="MenuBackdrop";var nG=c(G0(),1);var sG=c(G0(),1),oG=sG.createContext(void 0);oG.displayName="MenuCheckboxItemContext";function CO(){let J=sG.useContext(oG);if(J===void 0)throw Error("Base UI: MenuCheckboxItemContext is missing. MenuCheckboxItem parts must be placed within <Menu.CheckboxItem>.");return J}var oz=c(G0(),1);var nz={type:"regular-item"};function f4(J){let{closeOnClick:X,disabled:Y=!1,highlighted:W,id:K,store:U,nativeButton:q,itemMetadata:_,nodeId:L}=J,F=oz.useRef(null),N=C5(!0),V=N!==void 0,{events:k}=U.useState("floatingTreeRoot"),{getButtonProps:A,buttonRef:D}=Z5({disabled:Y,focusableWhenDisabled:!0,native:q}),M=oz.useCallback((v)=>{return D5({id:K,role:"menuitem",tabIndex:W?0:-1,onMouseMove(x){if(!L)return;k.emit("itemhover",{nodeId:L,target:x.currentTarget})},onMouseEnter(){if(_.type!=="submenu-trigger")return;_.setActive()},onKeyUp(x){if(x.key===" "&&U.context.typingRef.current)x.preventBaseUIHandler()},onClick(x){if(X)k.emit("close",{domEvent:x,reason:B0.itemPress})},onMouseUp(x){if(N){let I=N.initialCursorPointRef.current;if(N.initialCursorPointRef.current=null,V&&I&&Math.abs(x.clientX-I.x)<=1&&Math.abs(x.clientY-I.y)<=1)return}if(F.current&&U.context.allowMouseUpTriggerRef.current&&(!V||x.button===2)){if(_.type==="regular-item")F.current.click()}}},v,A)},[K,W,A,X,k,U,V,N,_,L]),h=O5(F,D);return oz.useMemo(()=>({getItemProps:M,itemRef:h}),[M,h])}var Yq=function(J){return J.checked="data-checked",J.unchecked="data-unchecked",J.disabled="data-disabled",J.highlighted="data-highlighted",J}({});var m4={checked(J){if(J)return{[Yq.checked]:""};return{[Yq.unchecked]:""}},...h2};var yO=c(x1(),1),CX=nG.forwardRef(function(X,Y){let{render:W,className:K,id:U,label:q,nativeButton:_=!1,disabled:L=!1,closeOnClick:F=!1,checked:N,defaultChecked:V,onCheckedChange:k,...A}=X,D=v5({label:q}),M=y5(!0),h=ww(U),{store:v}=p1(),x=v.useState("isActive",D.index),I=v.useState("itemProps"),[b,E]=Lz({controlled:N,default:V??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:m,itemRef:R}=f4({closeOnClick:F,disabled:L,highlighted:x,id:h,store:v,nativeButton:_,nodeId:M?.nodeId,itemMetadata:nz}),S=nG.useMemo(()=>({disabled:L,highlighted:x,checked:b}),[L,x,b]),p=F0((w0)=>{let t={...P0(B0.itemPress,w0.nativeEvent),preventUnmountOnClose:()=>{}};if(k?.(!b,t),t.isCanceled)return;E((u)=>!u)}),d=h0("div",X,{state:S,stateAttributesMapping:m4,props:[I,{role:"menuitemcheckbox","aria-checked":b,onClick:p},A,m],ref:[R,Y,D.ref]});return yO.jsx(oG.Provider,{value:S,children:d})});CX.displayName="MenuCheckboxItem";var tz=c(G0(),1);var yX=tz.forwardRef(function(X,Y){let{render:W,className:K,keepMounted:U=!1,...q}=X,_=CO(),L=tz.useRef(null),{transitionStatus:F,setMounted:N}=Az(_.checked);P5({open:_.checked,ref:L,onComplete(){if(!_.checked)N(!1)}});let V=tz.useMemo(()=>({checked:_.checked,disabled:_.disabled,highlighted:_.highlighted,transitionStatus:F}),[_.checked,_.disabled,_.highlighted,F]);return h0("span",X,{state:V,ref:[Y,L],stateAttributesMapping:m4,props:{"aria-hidden":!0,...q},enabled:U||_.checked})});yX.displayName="MenuCheckboxItemIndicator";var ez=c(G0(),1);var tG=c(G0(),1),eG=tG.createContext(void 0);eG.displayName="MenuGroupContext";function RO(){let J=tG.useContext(eG);if(J===void 0)throw Error("Base UI: MenuGroupRootContext is missing. Menu group parts must be used within <Menu.Group>.");return J}var gO=c(x1(),1),RX=ez.forwardRef(function(X,Y){let{render:W,className:K,...U}=X,[q,_]=ez.useState(void 0),L=ez.useMemo(()=>({setLabelId:_}),[_]),F=h0("div",X,{ref:Y,props:{role:"group","aria-labelledby":q,...U}});return gO.jsx(eG.Provider,{value:L,children:F})});RX.displayName="MenuGroup";var fO=c(G0(),1);var gX=fO.forwardRef(function(X,Y){let{className:W,render:K,id:U,...q}=X,_=ww(U),{setLabelId:L}=RO();return k0(()=>{return L(_),()=>{L(void 0)}},[L,_]),h0("div",X,{ref:Y,props:{id:_,role:"presentation",...q}})});gX.displayName="MenuGroupLabel";var wQ=c(G0(),1);var fX=wQ.forwardRef(function(X,Y){let{render:W,className:K,id:U,label:q,nativeButton:_=!1,disabled:L=!1,closeOnClick:F=!0,...N}=X,V=v5({label:q}),k=y5(!0),A=ww(U),{store:D}=p1(),M=D.useState("isActive",V.index),h=D.useState("itemProps"),{getItemProps:v,itemRef:x}=f4({closeOnClick:F,disabled:L,highlighted:M,id:A,store:D,nativeButton:_,nodeId:k?.nodeId,itemMetadata:nz}),I=wQ.useMemo(()=>({disabled:L,highlighted:M}),[L,M]);return h0("div",X,{state:I,props:[h,N,v],ref:[x,Y,V.ref]})});fX.displayName="MenuItem";var wZ=c(G0(),1);var zQ=c(G0(),1),mO=zQ.createContext(void 0);mO.displayName="ToolbarRootContext";function dO(J){let X=zQ.useContext(mO);if(X===void 0&&!J)throw Error("Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.");return X}var uO=c(x1(),1),fS={...xw,...h2},mX=wZ.forwardRef(function(X,Y){let{render:W,className:K,finalFocus:U,...q}=X,{store:_}=p1(),{side:L,align:F}=y5(),N=dO(!0)!=null,V=_.useState("open"),k=_.useState("transitionStatus"),A=_.useState("popupProps"),D=_.useState("mounted"),M=_.useState("instantType"),h=_.useState("activeTriggerElement"),v=_.useState("parent"),x=_.useState("lastOpenChangeReason"),I=_.useState("rootId"),b=_.useState("floatingRootContext"),E=_.useState("floatingTreeRoot"),m=_.useState("closeDelay"),R=_.useState("activeTriggerElement");P5({open:V,ref:_.context.popupRef,onComplete(){if(V)_.context.onOpenChangeComplete?.(!0)}}),wZ.useEffect(()=>{function u(Q0){_.setOpen(!1,P0(Q0.reason,Q0.domEvent))}return E.events.on("close",u),()=>{E.events.off("close",u)}},[E.events,_]);let S=_.useState("hoverEnabled"),p=_.useState("disabled");OX(b,{enabled:S&&!p&&v.type!=="context-menu"&&v.type!=="menubar",closeDelay:m});let d=wZ.useMemo(()=>({transitionStatus:k,side:L,align:F,open:V,nested:v.type==="menu",instant:M}),[k,L,F,V,v.type,M]),w0=h0("div",X,{state:d,ref:[Y,_.context.popupRef],stateAttributesMapping:fS,props:[A,{onKeyDown(u){if(N&&XG.has(u.key))u.stopPropagation()}},az(k),q,{"data-rootownerid":I}]}),t=v.type===void 0||v.type==="context-menu";if(h||v.type==="menubar"&&x!==B0.outsidePress)t=!0;return uO.jsx(FX,{context:b,modal:!1,disabled:!D,returnFocus:U===void 0?t:U,initialFocus:v.type!=="menu",restoreFocus:!0,externalTree:v.type!=="menubar"?E:void 0,previousFocusableElement:R,nextFocusableElement:v.type===void 0?_.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:v.type===void 0?_.context.beforeContentFocusGuardRef:void 0,children:w0})});mX.displayName="MenuPopup";var cO=c(G0(),1);var ZQ=c(G0(),1),JQ=ZQ.createContext(void 0);JQ.displayName="MenuPortalContext";function pO(){let J=ZQ.useContext(JQ);if(J===void 0)throw Error("Base UI: <Menu.Portal> is missing.");return J}var Gq=c(x1(),1),dX=cO.forwardRef(function(X,Y){let{keepMounted:W=!1,...K}=X,{store:U}=p1();if(!(U.useState("mounted")||W))return null;return Gq.jsx(JQ.Provider,{value:W,children:Gq.jsx(Sz,{ref:Y,...K})})});dX.displayName="MenuPortal";var X8=c(G0(),1);var zZ=c(x1(),1),uX=X8.forwardRef(function(X,Y){let{anchor:W,positionMethod:K="absolute",className:U,render:q,side:_,align:L,sideOffset:F=0,alignOffset:N=0,collisionBoundary:V="clipping-ancestors",collisionPadding:k=5,arrowPadding:A=5,sticky:D=!1,disableAnchorTracking:M=!1,collisionAvoidance:h=Bj,...v}=X,{store:x}=p1(),I=pO(),b=C5(!0),E=x.useState("parent"),m=x.useState("floatingRootContext"),R=x.useState("floatingTreeRoot"),S=x.useState("mounted"),p=x.useState("open"),d=x.useState("modal"),w0=x.useState("activeTriggerElement"),t=x.useState("lastOpenChangeReason"),u=x.useState("floatingNodeId"),Q0=x.useState("floatingParentNodeId"),r=W,e=F,o=N,g=L,X0=h;if(E.type==="context-menu"){if(r=W??E.context?.anchor,g=g??"start",!_&&g!=="center")o=X.alignOffset??2,e=X.sideOffset??-5}let P=_,z0=g;if(E.type==="menu")P=P??"inline-end",z0=z0??"start",X0=X.collisionAvoidance??EY;else if(E.type==="menubar")P=P??"bottom",z0=z0??"start";let U0=E.type==="context-menu",J0=gG({anchor:r,floatingRootContext:m,positionMethod:b?"fixed":K,mounted:S,side:P,sideOffset:e,align:z0,alignOffset:o,arrowPadding:U0?0:A,collisionBoundary:V,collisionPadding:k,sticky:D,nodeId:u,keepMounted:I,disableAnchorTracking:M,collisionAvoidance:X0,shiftCrossAxis:U0,externalTree:R}),L0=X8.useMemo(()=>{let n0={};if(!p)n0.pointerEvents="none";return{role:"presentation",hidden:!S,style:{...J0.positionerStyles,...n0}}},[p,S,J0.positionerStyles]);X8.useEffect(()=>{function n0(n){if(n.open){if(n.parentNodeId===u)x.set("hoverEnabled",!1);if(n.nodeId!==u&&n.parentNodeId===x.select("floatingParentNodeId"))x.setOpen(!1,P0(B0.siblingOpen))}else if(n.parentNodeId===u){if(n.reason!==B0.siblingOpen)x.set("hoverEnabled",!0)}}return R.events.on("menuopenchange",n0),()=>{R.events.off("menuopenchange",n0)}},[x,R.events,u]),X8.useEffect(()=>{if(x.select("floatingParentNodeId")==null)return;function n0(n){if(n.open||n.nodeId!==x.select("floatingParentNodeId"))return;let R0=n.reason??B0.siblingOpen;x.setOpen(!1,P0(R0))}return R.events.on("menuopenchange",n0),()=>{R.events.off("menuopenchange",n0)}},[R.events,x]),X8.useEffect(()=>{function n0(n){if(!p||n.nodeId!==x.select("floatingParentNodeId"))return;if(n.target&&w0&&w0!==n.target)x.setOpen(!1,P0(B0.siblingOpen))}return R.events.on("itemhover",n0),()=>{R.events.off("itemhover",n0)}},[R.events,p,w0,x]),X8.useEffect(()=>{let n0={open:p,nodeId:u,parentNodeId:Q0,reason:x.select("lastOpenChangeReason")};R.events.emit("menuopenchange",n0)},[R.events,p,x,u,Q0]);let S0=X8.useMemo(()=>({open:p,side:J0.side,align:J0.align,anchorHidden:J0.anchorHidden,nested:E.type==="menu"}),[p,J0.side,J0.align,J0.anchorHidden,E.type]),V0=X8.useMemo(()=>({side:J0.side,align:J0.align,arrowRef:J0.arrowRef,arrowUncentered:J0.arrowUncentered,arrowStyles:J0.arrowStyles,nodeId:J0.context.nodeId}),[J0.side,J0.align,J0.arrowRef,J0.arrowUncentered,J0.arrowStyles,J0.context.nodeId]),H0=h0("div",X,{state:S0,stateAttributesMapping:xw,ref:[Y,x.useStateSetter("positionerElement")],props:[L0,v]}),j0=S&&E.type!=="menu"&&(E.type!=="menubar"&&d&&t!==B0.triggerHover||E.type==="menubar"&&E.context.modal),r0=null;if(E.type==="menubar")r0=E.context.contentElement;else if(E.type===void 0)r0=w0;return zZ.jsxs(lG.Provider,{value:V0,children:[j0&&zZ.jsx(hX,{ref:E.type==="context-menu"||E.type==="nested-context-menu"?E.context.internalBackdropRef:null,inert:iz(!p),cutout:r0}),zZ.jsx(V_,{id:u,children:zZ.jsx(Vz,{elementsRef:x.context.itemDomElements,labelsRef:x.context.itemLabels,children:H0})})]})});uX.displayName="MenuPositioner";var Z9=c(G0(),1);var XQ=c(G0(),1),$Q=XQ.createContext(void 0);$Q.displayName="MenuRadioGroupContext";function lO(){let J=XQ.useContext($Q);if(J===void 0)throw Error("Base UI: MenuRadioGroupContext is missing. MenuRadioGroup parts must be placed within <Menu.RadioGroup>.");return J}var iO=c(x1(),1),pX=Z9.memo(Z9.forwardRef(function(X,Y){let{render:W,className:K,value:U,defaultValue:q,onValueChange:_,disabled:L=!1,...F}=X,[N,V]=Lz({controlled:U,default:q,name:"MenuRadioGroup"}),k=F0(_),A=F0((v,x)=>{if(k?.(v,x),x.isCanceled)return;V(v)}),D=Z9.useMemo(()=>({disabled:L}),[L]),M=h0("div",X,{state:D,ref:Y,props:{role:"group","aria-disabled":L||void 0,...F}}),h=Z9.useMemo(()=>({value:N,setValue:A,disabled:L}),[N,A,L]);return iO.jsx($Q.Provider,{value:h,children:M})}));pX.displayName="MenuRadioGroup";var QQ=c(G0(),1);var YQ=c(G0(),1),GQ=YQ.createContext(void 0);GQ.displayName="MenuRadioItemContext";function rO(){let J=YQ.useContext(GQ);if(J===void 0)throw Error("Base UI: MenuRadioItemContext is missing. MenuRadioItem parts must be placed within <Menu.RadioItem>.");return J}var aO=c(x1(),1),cX=QQ.forwardRef(function(X,Y){let{render:W,className:K,id:U,label:q,nativeButton:_=!1,disabled:L=!1,closeOnClick:F=!1,value:N,...V}=X,k=v5({label:q}),A=y5(!0),D=ww(U),{store:M}=p1(),h=M.useState("isActive",k.index),v=M.useState("itemProps"),{value:x,setValue:I,disabled:b}=lO(),E=b||L,m=x===N,{getItemProps:R,itemRef:S}=f4({closeOnClick:F,disabled:E,highlighted:h,id:D,store:M,nativeButton:_,nodeId:A?.nodeId,itemMetadata:nz}),p=QQ.useMemo(()=>({disabled:E,highlighted:h,checked:m}),[E,h,m]),d=F0((t)=>{let u={...P0(B0.itemPress,t.nativeEvent),preventUnmountOnClose:()=>{}};I(N,u)}),w0=h0("div",X,{state:p,stateAttributesMapping:m4,props:[v,{role:"menuitemradio","aria-checked":m,onClick:d},V,R],ref:[S,Y,k.ref]});return aO.jsx(GQ.Provider,{value:p,children:w0})});cX.displayName="MenuRadioItem";var ZZ=c(G0(),1);var lX=ZZ.forwardRef(function(X,Y){let{render:W,className:K,keepMounted:U=!1,...q}=X,_=rO(),L=ZZ.useRef(null),{transitionStatus:F,setMounted:N}=Az(_.checked);P5({open:_.checked,ref:L,onComplete(){if(!_.checked)N(!1)}});let V=ZZ.useMemo(()=>({checked:_.checked,disabled:_.disabled,highlighted:_.highlighted,transitionStatus:F}),[_.checked,_.disabled,_.highlighted,F]);return h0("span",X,{state:V,stateAttributesMapping:m4,ref:[Y,L],props:{"aria-hidden":!0,...q},enabled:U||_.checked})});lX.displayName="MenuRadioItemIndicator";var Yw=c(G0(),1),oO=c(m8(),1);var WQ=c(G0(),1),sO=WQ.createContext(null);sO.displayName="MenubarContext";function KQ(J){let X=WQ.useContext(sO);if(X===null&&!J)throw Error("Base UI: MenubarContext is missing. Menubar parts must be placed within <Menubar>.");return X}var iX=c(G0(),1);var mS={...uz,disabled:p0((J)=>J.parent.type==="menubar"?J.parent.context.disabled||J.disabled:J.disabled),modal:p0((J)=>(J.parent.type===void 0||J.parent.type==="context-menu")&&(J.modal??!0)),allowMouseEnter:p0((J)=>J.parent.type==="menu"?J.parent.store.select("allowMouseEnter"):J.allowMouseEnter),stickIfOpen:p0((J)=>J.stickIfOpen),parent:p0((J)=>J.parent),rootId:p0((J)=>{if(J.parent.type==="menu")return J.parent.store.select("rootId");return J.parent.type!==void 0?J.parent.context.rootId:J.rootId}),activeIndex:p0((J)=>J.activeIndex),isActive:p0((J,X)=>J.activeIndex===X),hoverEnabled:p0((J)=>J.hoverEnabled),instantType:p0((J)=>J.instantType),lastOpenChangeReason:p0((J)=>J.openChangeReason),floatingTreeRoot:p0((J)=>{if(J.parent.type==="menu")return J.parent.store.select("floatingTreeRoot");return J.floatingTreeRoot}),floatingNodeId:p0((J)=>J.floatingNodeId),floatingParentNodeId:p0((J)=>J.floatingParentNodeId),itemProps:p0((J)=>J.itemProps),closeDelay:p0((J)=>J.closeDelay),keyboardEventRelay:p0((J)=>{if(J.keyboardEventRelay)return J.keyboardEventRelay;if(J.parent.type==="menu")return J.parent.store.select("keyboardEventRelay");return})};class JZ extends P6{constructor(J){super({...dS(),...J},{positionerRef:iX.createRef(),popupRef:iX.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:iX.createRef(),beforeContentFocusGuardRef:iX.createRef(),onOpenChangeComplete:void 0,triggerElements:new Z8},mS);this.observe(p0((X)=>X.allowMouseEnter),(X,Y)=>{if(this.state.parent.type==="menu"&&X!==Y)this.state.parent.store.set("allowMouseEnter",X)}),this.unsubscribeParentListener=this.observe("parent",(X)=>{if(this.unsubscribeParentListener?.(),X.type==="menu"){this.unsubscribeParentListener=X.store.subscribe(()=>{this.notifyAll()}),this.context.allowMouseUpTriggerRef=X.store.context.allowMouseUpTriggerRef;return}if(X.type!==void 0)this.context.allowMouseUpTriggerRef=X.context.allowMouseUpTriggerRef;this.unsubscribeParentListener=null})}setOpen(J,X){this.state.floatingRootContext.context.events.emit("setOpen",{open:J,eventDetails:X})}static useStore(J,X){return r1(()=>{return J??new JZ(X)}).current}unsubscribeParentListener=null}function dS(){return{...dz(),disabled:!1,modal:!0,allowMouseEnter:!0,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new l7,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:v1,keyboardEventRelay:void 0,closeDelay:0}}var UQ=c(G0(),1),HQ=UQ.createContext(void 0);HQ.displayName="MenuSubmenuRootContext";function _Q(){return UQ.useContext(HQ)}var Qq=c(x1(),1);function qQ(J){let{children:X,open:Y,onOpenChange:W,onOpenChangeComplete:K,defaultOpen:U=!1,disabled:q=!1,modal:_,loopFocus:L=!0,orientation:F="vertical",actionsRef:N,closeParentOnEsc:V=!1,handle:k,triggerId:A,defaultTriggerId:D=null,highlightItemOnHover:M=!0}=J,h=C5(!0),v=p1(!0),x=KQ(!0),I=_Q(),b=Yw.useMemo(()=>{if(I&&v)return{type:"menu",store:v.store};if(x)return{type:"menubar",context:x};if(h&&!v)return{type:"context-menu",context:h};return{type:void 0}},[h,v,x,I]),E=JZ.useStore(k?.store,{parent:b}),m=E.useState("floatingTreeRoot"),R=LX(m),S=tw();k0(()=>{if(h&&!v)E.update({parent:{type:"context-menu",context:h},floatingNodeId:R,floatingParentNodeId:S});else if(v)E.update({floatingNodeId:R,floatingParentNodeId:S})},[h,v,R,S,E]),E.useControlledProp("open",Y,U),E.useControlledProp("activeTriggerId",A,D),E.useContextCallback("onOpenChangeComplete",K);let p=E.useState("open"),d=E.useState("activeTriggerElement"),w0=E.useState("positionerElement"),t=E.useState("hoverEnabled"),u=E.useState("modal"),Q0=E.useState("disabled"),r=E.useState("lastOpenChangeReason"),e=E.useState("parent"),o=E.useState("activeIndex"),g=E.useState("payload"),X0=E.useState("floatingParentNodeId"),P=Yw.useRef(null),z0=X0!=null,U0;if(e.type!==void 0&&_!==void 0)console.warn("Base UI: The `modal` prop is not supported on nested menus. It will be ignored.");E.useSyncedValues({disabled:q,modal:e.type===void 0?_:void 0,rootId:J2()});let{openMethod:J0,triggerProps:L0,reset:S0}=TG(p);fz(E);let{forceUnmount:V0}=mz(p,E,()=>{E.update({allowMouseEnter:!1,stickIfOpen:!0}),S0()}),H0=Yw.useRef(e.type!=="context-menu"),j0=a1();Yw.useEffect(()=>{if(!p)P.current=null;if(e.type!=="context-menu")return;if(!p){j0.clear(),H0.current=!1;return}j0.start(500,()=>{H0.current=!0})},[j0,p,e.type]),$G(p&&u&&r!==B0.triggerHover&&J0!=="touch",w0),k0(()=>{if(!p&&!t)E.set("hoverEnabled",!0)},[p,t,E]);let r0=Yw.useRef(!0),n0=a1(),n=F0((J1,N1)=>{let T=N1.reason;if(p===J1&&N1.trigger===d)return;if(N1.preventUnmountOnClose=()=>{E.set("preventUnmountingOnClose",!0)},!J1&&N1.trigger==null)N1.trigger=d??void 0;if(W?.(J1,N1),N1.isCanceled)return;let s={open:J1,nativeEvent:N1.event,reason:N1.reason,nested:z0};U0?.emit("openchange",s);let K0=N1.event;if(J1===!1&&K0?.type==="click"&&K0.pointerType==="touch"&&!r0.current)return;if(!J1&&o!==null){let u0=E.context.itemDomElements.current[o];queueMicrotask(()=>{u0?.setAttribute("tabindex","-1")})}if(J1&&T===B0.triggerFocus)r0.current=!1,n0.start(300,()=>{r0.current=!0});else r0.current=!0,n0.clear();let N0=(T===B0.triggerPress||T===B0.itemPress)&&K0.detail===0&&K0?.isTrusted,T0=!J1&&(T===B0.escapeKey||T==null);function a0(){let u0={open:J1,openChangeReason:T};P.current=N1.event??null;let $1=N1.trigger?.id??null;if($1||J1)u0.activeTriggerId=$1,u0.activeTriggerElement=N1.trigger??null;E.update(u0)}if(T===B0.triggerHover)oO.flushSync(a0);else a0();if(e.type==="menubar"&&(T===B0.triggerFocus||T===B0.focusOut||T===B0.triggerHover||T===B0.listNavigation||T===B0.siblingOpen))E.set("instantType","group");else if(N0||T0)E.set("instantType",N0?"click":"dismiss");else E.set("instantType",void 0)}),R0=Yw.useCallback((J1)=>{let N1=P0(J1);return N1.preventUnmountOnClose=()=>{E.set("preventUnmountingOnClose",!0)},N1},[E]),I0=Yw.useCallback(()=>{E.setOpen(!1,R0(B0.imperativeAction))},[E,R0]);Yw.useImperativeHandle(N,()=>({unmount:V0,close:I0}),[V0,I0]);let j1;if(e.type==="context-menu")j1=e.context;Yw.useImperativeHandle(j1?.positionerRef,()=>w0,[w0]),Yw.useImperativeHandle(j1?.actionsRef,()=>({setOpen:n}),[n]);let b0=n7({popupStore:E,onOpenChange:n});U0=b0.context.events,Yw.useEffect(()=>{let J1=({open:N1,eventDetails:T})=>n(N1,T);return U0.on("setOpen",J1),()=>{U0?.off("setOpen",J1)}},[U0,n]);let _0=s7(b0,{enabled:!Q0,bubbles:V&&e.type==="menu",outsidePress(){if(e.type!=="context-menu"||P.current?.type==="contextmenu")return!0;return H0.current},externalTree:z0?m:void 0}),O0=DX(b0,{role:"menu"}),A0=M5(),c0=Yw.useCallback((J1)=>{if(E.select("activeIndex")===J1)return;E.set("activeIndex",J1)},[E]),C0=a_(b0,{enabled:!Q0,listRef:E.context.itemDomElements,activeIndex:o,nested:e.type!==void 0,loopFocus:L,orientation:F,parentOrientation:e.type==="menubar"?e.context.orientation:void 0,rtl:A0==="rtl",disabledIndices:t2,onNavigate:c0,openOnArrowKeyDown:e.type!=="context-menu",externalTree:z0?m:void 0,focusItemOnHover:M}),E0=Yw.useCallback((J1)=>{E.context.typingRef.current=J1},[E]),o0=s_(b0,{listRef:E.context.itemLabels,activeIndex:o,resetMs:Hj,onMatch:(J1)=>{if(p&&J1!==o)E.set("activeIndex",J1)},onTypingChange:E0}),{getReferenceProps:x0,getFloatingProps:l0,getItemProps:y0,getTriggerProps:q1}=$5([_0,O0,C0,o0]),D1=Yw.useMemo(()=>{let J1=D5(x0(),{onMouseEnter(){E.set("hoverEnabled",!0)},onMouseMove(){E.set("allowMouseEnter",!0)}},L0);return delete J1.role,J1},[x0,E,L0]),W1=Yw.useMemo(()=>{let J1=q1();if(!J1)return J1;let N1=D5(J1,L0);return delete N1.role,delete N1["aria-controls"],N1},[q1,L0]),Gw=x5(),zw=Yw.useMemo(()=>l0({onMouseEnter(){if(e.type==="menu")Gw.request(()=>E.set("hoverEnabled",!1))},onMouseMove(){E.set("allowMouseEnter",!0)},onClick(){if(E.select("hoverEnabled"))E.set("hoverEnabled",!1)},onKeyDown(J1){let N1=E.select("keyboardEventRelay");if(N1&&!J1.isPropagationStopped())N1(J1)}}),[l0,e.type,Gw,E]),Lw=Yw.useMemo(()=>y0(),[y0]);E.useSyncedValues({floatingRootContext:b0,activeTriggerProps:D1,inactiveTriggerProps:W1,popupProps:zw,itemProps:Lw});let Uw=Yw.useMemo(()=>({store:E,parent:b}),[E,b]),hw=Qq.jsx(sz.Provider,{value:Uw,children:typeof X==="function"?X({payload:g}):X});if(e.type===void 0||e.type==="context-menu")return Qq.jsx(F_,{externalTree:m,children:hw});return hw}var nO=c(G0(),1);var Wq=c(x1(),1);function BQ(J){let X=p1().store,Y=nO.useMemo(()=>({parentMenu:X}),[X]);return Wq.jsx(HQ.Provider,{value:Y,children:Wq.jsx(qQ,{...J})})}var Cw=c(G0(),1),Kq=c(m8(),1);var LQ=c(G0(),1);function VQ(J={}){let{highlightItemOnHover:X,highlightedIndex:Y,onHighlightedIndexChange:W}=Mz(),{ref:K,index:U}=v5(J),q=Y===U,_=LQ.useRef(null),L=O5(K,_);return{compositeProps:LQ.useMemo(()=>({tabIndex:q?0:-1,onFocus(){W(U)},onMouseMove(){let N=_.current;if(!X||!N)return;let V=N.hasAttribute("disabled")||N.ariaDisabled==="true";if(!q&&!V)N.focus()}}),[q,W,U,X]),compositeRef:L,index:U}}function tO(J){let{render:X,className:Y,state:W=v1,props:K=t2,refs:U=t2,metadata:q,stateAttributesMapping:_,tag:L="div",...F}=J,{compositeProps:N,compositeRef:V}=VQ({metadata:q});return h0(L,J,{state:W,ref:[...U,V],props:[N,...K,F],stateAttributesMapping:_})}function rX(J){if(O1(J)&&J.hasAttribute("data-rootownerid"))return J.getAttribute("data-rootownerid")??void 0;if(z5(J))return;return rX(e2(J))}var FQ=c(G0(),1);function eO(J){let{enabled:X=!0,mouseDownAction:Y,open:W}=J,K=FQ.useRef(!1);return FQ.useMemo(()=>{if(!X)return v1;return{onMouseDown:(U)=>{if(Y==="open"&&!W||Y==="close"&&W)K.current=!0,Dw(U.currentTarget).addEventListener("click",()=>{K.current=!1},{once:!0})},onClick:(U)=>{if(K.current)K.current=!1,U.preventBaseUIHandler()}}},[X,Y,W])}var d4=c(x1(),1),NQ=2,Uq=Cw.forwardRef(function(X,Y){let{render:W,className:K,disabled:U=!1,nativeButton:q=!0,id:_,openOnHover:L,delay:F=100,closeDelay:N=0,handle:V,payload:k,...A}=X,D=p1(!0),M=V?.store??D?.store;if(!M)throw Error("Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle.");let h=ww(_),v=M.useState("isTriggerActive",h),x=M.useState("floatingRootContext"),I=M.useState("isOpenedByTrigger",h),b=Cw.useRef(null),E=pS(),m=Mz(!0),R=$2(),S=Cw.useMemo(()=>{return R??new l7},[R]),p=LX(S),d=tw(),{registerTrigger:w0,isMountedByThisTrigger:t}=gz(h,b,M,{payload:k,closeDelay:N,parent:E,floatingTreeRoot:S,floatingNodeId:p,floatingParentNodeId:d,keyboardEventRelay:m?.relayKeyboardEvent}),u=M.useState("disabled"),Q0=U||u||E.type==="menubar"&&E.context.disabled,{getButtonProps:r,buttonRef:e}=Z5({disabled:Q0,native:q});Cw.useEffect(()=>{if(!I&&E.type===void 0)M.context.allowMouseUpTriggerRef.current=!1},[M,I,E.type]);let o=Cw.useRef(null),g=a1(),X0=F0((O0)=>{if(!o.current)return;g.clear(),M.context.allowMouseUpTriggerRef.current=!1;let A0=O0.target;if(t0(o.current,A0)||t0(M.select("positionerElement"),A0)||A0===o.current)return;if(A0!=null&&rX(A0)===M.select("rootId"))return;let c0=vO(o.current);if(O0.clientX>=c0.left-NQ&&O0.clientX<=c0.right+NQ&&O0.clientY>=c0.top-NQ&&O0.clientY<=c0.bottom+NQ)return;S.events.emit("close",{domEvent:O0,reason:B0.cancelOpen})});Cw.useEffect(()=>{if(I&&M.select("lastOpenChangeReason")===B0.triggerHover)Dw(o.current).addEventListener("mouseup",X0,{once:!0})},[I,X0,M]);let P=E.type==="menubar"&&E.context.hasSubmenuOpen,U0=e7(x,{enabled:(L??P??!1)&&!Q0&&E.type!=="context-menu"&&(E.type!=="menubar"||P&&!t),handleClose:z9({blockPointerEvents:E.type!=="menubar"}),mouseOnly:!0,move:!1,restMs:E.type===void 0?F:void 0,delay:{close:N},triggerElementRef:b,externalTree:S,isActiveTrigger:v}),J0=uS(I,M.select("lastOpenChangeReason")),L0=r7(x,{enabled:!Q0&&E.type!=="context-menu",event:I&&E.type==="menubar"?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:E.type===void 0?J0:!1}),S0=jX(x,{enabled:!Q0&&(E.type!=="menubar"&&I||P)}),V0=eO({open:I,enabled:E.type==="menubar",mouseDownAction:"open"}),H0=$5([L0,S0]),j0=E.type==="menubar",r0=Cw.useMemo(()=>({disabled:Q0,open:I}),[Q0,I]),n0=M.useState("triggerProps",t),n=[o,Y,e,w0,b],R0=[H0.getReferenceProps(),U0??v1,n0,{"aria-haspopup":"menu",id:h,onMouseDown:(O0)=>{if(M.select("open"))return;g.start(200,()=>{M.context.allowMouseUpTriggerRef.current=!0}),Dw(O0.currentTarget).addEventListener("mouseup",X0,{once:!0})}},j0?{role:"menuitem"}:{},V0,A,r],I0=Cw.useRef(null),j1=F0((O0)=>{Kq.flushSync(()=>{M.setOpen(!1,P0(B0.focusOut,O0.nativeEvent,O0.currentTarget))}),tj(I0.current)?.focus()}),b0=F0((O0)=>{let A0=M.select("positionerElement");if(A0&&v6(O0,A0))M.context.beforeContentFocusGuardRef.current?.focus();else{Kq.flushSync(()=>{M.setOpen(!1,P0(B0.focusOut,O0.nativeEvent,O0.currentTarget))});let c0=nj(b.current);while(c0!==null&&t0(A0,c0)||c0?.hasAttribute("aria-hidden")){let C0=c0;if(c0=xz(c0),c0===C0)break}c0?.focus()}}),_0=h0("button",X,{enabled:!j0,stateAttributesMapping:vX,state:r0,ref:n,props:R0});if(j0)return d4.jsx(tO,{tag:"button",render:W,className:K,state:r0,refs:n,props:R0,stateAttributesMapping:vX});if(I)return d4.jsxs(Cw.Fragment,{children:[d4.jsx(l8,{ref:I0,onFocus:j1},`${h}-pre-focus-guard`),d4.jsx(Cw.Fragment,{children:_0},h),d4.jsx(l8,{ref:M.context.triggerFocusTargetRef,onFocus:b0},`${h}-post-focus-guard`)]});return d4.jsx(Cw.Fragment,{children:_0},h)});Uq.displayName="MenuTrigger";function uS(J,X){let Y=a1(),[W,K]=Cw.useState(!1);return k0(()=>{if(J&&X==="trigger-hover")K(!0),Y.start(_j,()=>{K(!1)});else if(!J)Y.clear(),K(!1)},[J,X,Y]),W}function pS(){let J=C5(!0),X=p1(!0),Y=KQ(!0);return Cw.useMemo(()=>{if(Y)return{type:"menubar",context:Y};if(J&&!X)return{type:"context-menu",context:J};return{type:void 0}},[J,X,Y])}var i8=c(G0(),1);var aX=i8.forwardRef(function(X,Y){let{render:W,className:K,label:U,id:q,nativeButton:_=!1,openOnHover:L=!0,delay:F=100,closeDelay:N=0,disabled:V=!1,...k}=X,A=v5(),D=y5(),{store:M}=p1(),h=ww(q),v=M.useState("open"),x=M.useState("floatingRootContext"),I=M.useState("floatingTreeRoot"),b=p_(h,M),E=i8.useCallback((S0)=>{let V0=b(S0);if(S0!==null&&M.select("open")&&M.select("activeTriggerId")==null)M.update({activeTriggerId:h,activeTriggerElement:S0,closeDelay:N});return V0},[b,N,M,h]),m=i8.useRef(null),R=i8.useCallback((S0)=>{m.current=S0,M.set("activeTriggerElement",S0)},[M]),S=_Q();if(!S?.parentMenu)throw Error("Base UI: <Menu.SubmenuTrigger> must be placed in <Menu.SubmenuRoot>.");M.useSyncedValue("closeDelay",N);let p=S.parentMenu,d=p.useState("itemProps"),w0=p.useState("isActive",A.index),t=i8.useMemo(()=>({type:"submenu-trigger",setActive:()=>p.set("activeIndex",A.index)}),[p,A.index]),u=M.useState("disabled"),Q0=V||u,{getItemProps:r,itemRef:e}=f4({closeOnClick:!1,disabled:Q0,highlighted:w0,id:h,store:M,nativeButton:_,itemMetadata:t,nodeId:D?.nodeId}),o=M.useState("hoverEnabled"),g=M.useState("allowMouseEnter"),X0=e7(x,{enabled:o&&L&&!Q0&&g,handleClose:z9({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:F,delay:{open:F,close:N},triggerElementRef:m,externalTree:I}),P=r7(x,{enabled:!Q0,event:"mousedown",toggle:!L,ignoreMouse:L,stickIfOpen:!1}),z0=$5([P]),U0=M.useState("triggerProps",!0);delete U0.id;let J0=i8.useMemo(()=>({disabled:Q0,highlighted:w0,open:v}),[Q0,w0,v]);return h0("div",X,{state:J0,stateAttributesMapping:lz,props:[z0.getReferenceProps(),X0,U0,d,{tabIndex:v||w0?0:-1,onBlur(){if(w0)p.set("activeIndex",null)}},k,r],ref:[Y,A.ref,e,E,R]})});aX.displayName="MenuSubmenuTrigger";class kQ{constructor(){this.store=new JZ}open(J){let X=J?this.store.context.triggerElements.getById(J):void 0;if(J&&!X)throw Error(`Base UI: MenuHandle.open: No trigger found with id "${J}".`);this.store.setOpen(!0,P0("imperative-action",void 0,X))}close(){this.store.setOpen(!1,P0("imperative-action",void 0,void 0))}get isOpen(){return this.store.state.open}}function wD(){return new kQ}var jQ=c(x1(),1);function zD(J){let[X,Y]=$8.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),W=$8.useRef(null),K=$8.useRef(null),U=$8.useRef(null),q=$8.useRef(null),_=$8.useRef(!0),L=$8.useRef(null),F=J2(),N=$8.useMemo(()=>({anchor:X,setAnchor:Y,actionsRef:U,backdropRef:W,internalBackdropRef:K,positionerRef:q,allowMouseUpTriggerRef:_,initialCursorPointRef:L,rootId:F}),[X,F]);return jQ.jsx(pG.Provider,{value:N,children:jQ.jsx(sz.Provider,{value:void 0,children:jQ.jsx(AQ.Root,{...J})})})}var r8=c(G0(),1);var ZD=500,Hq=r8.forwardRef(function(X,Y){let{render:W,className:K,...U}=X,{setAnchor:q,actionsRef:_,internalBackdropRef:L,backdropRef:F,positionerRef:N,allowMouseUpTriggerRef:V,initialCursorPointRef:k,rootId:A}=C5(!1),{store:D}=p1(!1),M=D.useState("open"),h=r8.useRef(null),v=r8.useRef(null),x=a1(),I=a1(),b=r8.useRef(!1);function E(t,u,Q0){let r=Q0.type.startsWith("touch");k.current={x:t,y:u},q({getBoundingClientRect(){return DOMRect.fromRect({width:r?10:0,height:r?10:0,x:t,y:u})}}),b.current=!1,_.current?.setOpen(!0,P0(B0.triggerPress,Q0)),I.start(ZD,()=>{b.current=!0})}function m(t){V.current=!0,Xw(t),E(t.clientX,t.clientY,t.nativeEvent),Dw(h.current).addEventListener("mouseup",(Q0)=>{if(V.current=!1,!b.current)return;I.clear(),b.current=!1;let r=f1(Q0);if(t0(N.current,r))return;if(A&&r&&rX(r)===A)return;_.current?.setOpen(!1,P0(B0.cancelOpen,Q0))},{once:!0})}function R(t){if(V.current=!1,t.touches.length===1){t.stopPropagation();let u=t.touches[0];v.current={x:u.clientX,y:u.clientY},x.start(ZD,()=>{if(v.current)E(v.current.x,v.current.y,t.nativeEvent)})}}function S(t){if(x.isStarted()&&v.current&&t.touches.length===1){let u=t.touches[0],Q0=10,r=Math.abs(u.clientX-v.current.x),e=Math.abs(u.clientY-v.current.y);if(r>10||e>10)x.clear()}}function p(){x.clear(),v.current=null}r8.useEffect(()=>{function t(Q0){let e=f1(Q0);if(t0(h.current,e)||t0(L.current,e)||t0(F.current,e))Q0.preventDefault()}let u=Dw(h.current);return u.addEventListener("contextmenu",t),()=>{u.removeEventListener("contextmenu",t)}},[F,L]);let d=r8.useMemo(()=>({open:M}),[M]);return h0("div",X,{state:d,ref:[h,Y],props:[{onContextMenu:m,onTouchStart:R,onTouchMove:S,onTouchEnd:p,onTouchCancel:p,style:{WebkitTouchCallout:"none"}},U],stateAttributesMapping:vX})});Hq.displayName="ContextMenuTrigger";var a8={};qz(a8,{createHandle:()=>xO,Viewport:()=>$q,Trigger:()=>Jq,Title:()=>Zq,Root:()=>$D,Portal:()=>zq,Popup:()=>wq,Handle:()=>RG,Description:()=>e_,Close:()=>t_,Backdrop:()=>n_});var JD=c(G0(),1);var XD=c(x1(),1);function $D(J){let{children:X,open:Y,defaultOpen:W=!1,onOpenChange:K,onOpenChangeComplete:U,disablePointerDismissal:q=!1,modal:_=!0,actionsRef:L,handle:F,triggerId:N,defaultTriggerId:V=null}=J,k=pw(!0),A=Boolean(k),D=r1(()=>{return F?.store??new xX({open:Y??W,activeTriggerId:N!==void 0?N:V,modal:_,disablePointerDismissal:q,nested:A})}).current;D.useControlledProp("open",Y,W),D.useControlledProp("activeTriggerId",N,V),D.useSyncedValues({disablePointerDismissal:q,nested:A,modal:_}),D.useContextCallback("onOpenChange",K),D.useContextCallback("onOpenChangeComplete",U);let M=D.useState("payload");FO({store:D,actionsRef:L,parentContext:k?.store.context,onOpenChange:K,triggerIdProp:N});let h=JD.useMemo(()=>({store:D}),[D]);return XD.jsx(vG.Provider,{value:h,children:typeof X==="function"?X({payload:M}):X})}var GD=c(G0(),1);var S6=c(G0(),1);var MQ="data-composite-item-active";var cS=[];function YD(J){let{itemSizes:X,cols:Y=1,loopFocus:W=!0,dense:K=!1,orientation:U="both",direction:q,highlightedIndex:_,onHighlightedIndexChange:L,rootRef:F,enableHomeAndEndKeys:N=!1,stopEventPropagation:V=!1,disabledIndices:k,modifierKeys:A=cS}=J,[D,M]=S6.useState(0),h=Y>1,v=S6.useRef(null),x=O5(v,F),I=S6.useRef([]),b=S6.useRef(!1),E=_??D,m=F0((p,d=!1)=>{if((L??M)(p),d){let w0=I.current[p];__(v.current,w0,q,U)}}),R=F0((p)=>{if(p.size===0||b.current)return;b.current=!0;let d=Array.from(p.keys()),w0=d.find((u)=>u?.hasAttribute(MQ))??null,t=w0?d.indexOf(w0):-1;if(t!==-1)m(t);__(v.current,w0,q,U)}),S=S6.useMemo(()=>({"aria-orientation":U==="both"?void 0:U,ref:x,onFocus(p){if(!v.current||!H_(p.target))return;p.target.setSelectionRange(0,p.target.value.length??0)},onKeyDown(p){let d=N?JM:U_;if(!d.has(p.key))return;if(lS(p,A))return;if(!v.current)return;let t=q==="rtl",u=t?vz:c7,Q0={horizontal:u,vertical:S4,both:u}[U],r=t?c7:vz,e={horizontal:r,vertical:p7,both:r}[U];if(H_(p.target)&&!jj(p.target)){let J0=p.target.selectionStart,L0=p.target.selectionEnd,S0=p.target.value??"";if(J0==null||p.shiftKey||J0!==L0)return;if(p.key!==e&&J0<S0.length)return;if(p.key!==Q0&&J0>0)return}let o=E,g=m7(I,k),X0=Dz(I,k);if(h){let J0=X||Array.from({length:I.current.length},()=>({width:1,height:1})),L0=UX(J0,Y,K),S0=L0.findIndex((H0)=>H0!=null&&!z8(I,H0,k)),V0=L0.reduce((H0,j0,r0)=>j0!=null&&!z8(I,j0,k)?r0:H0,-1);o=L0[KX({current:L0.map((H0)=>H0?I.current[H0]:null)},{event:p,orientation:U,loopFocus:W,cols:Y,disabledIndices:_X([...k||I.current.map((H0,j0)=>z8(I,j0)?j0:void 0),void 0],L0),minIndex:S0,maxIndex:V0,prevIndex:HX(E>X0?g:E,J0,L0,Y,p.key===S4?"bl":p.key===c7?"tr":"tl"),rtl:t})]}let P={horizontal:[u],vertical:[S4],both:[u,S4]}[U],z0={horizontal:[r],vertical:[p7],both:[r,p7]}[U],U0=h?d:{horizontal:N?zM:W_,vertical:N?ZM:K_,both:d}[U];if(N){if(p.key===hz)o=g;else if(p.key===Ez)o=X0}if(o===E&&(P.includes(p.key)||z0.includes(p.key)))if(W&&o===X0&&P.includes(p.key))o=g;else if(W&&o===g&&z0.includes(p.key))o=X0;else o=Ow(I,{startingIndex:o,decrement:z0.includes(p.key),disabledIndices:k});if(o!==E&&!x6(I,o)){if(V)p.stopPropagation();if(U0.has(p.key))p.preventDefault();m(o,!0),queueMicrotask(()=>{I.current[o]?.focus()})}}}),[Y,K,q,k,I,N,E,h,X,W,x,A,m,U,V]);return S6.useMemo(()=>({props:S,highlightedIndex:E,onHighlightedIndexChange:m,elementsRef:I,disabledIndices:k,onMapChange:R,relayKeyboardEvent:S.onKeyDown}),[S,E,m,I,k,R])}function lS(J,X){for(let Y of XM.values()){if(X.includes(Y))continue;if(J.getModifierState(Y))return!0}return!1}var _q=c(x1(),1);function QD(J){let{render:X,className:Y,refs:W=t2,props:K=t2,state:U=v1,stateAttributesMapping:q,highlightedIndex:_,onHighlightedIndexChange:L,orientation:F,dense:N,itemSizes:V,loopFocus:k,cols:A,enableHomeAndEndKeys:D,onMapChange:M,stopEventPropagation:h=!0,rootRef:v,disabledIndices:x,modifierKeys:I,highlightItemOnHover:b=!1,tag:E="div",...m}=J,R=M5(),{props:S,highlightedIndex:p,onHighlightedIndexChange:d,elementsRef:w0,onMapChange:t,relayKeyboardEvent:u}=YD({itemSizes:V,cols:A,loopFocus:k,dense:N,orientation:F,highlightedIndex:_,onHighlightedIndexChange:L,rootRef:v,stopEventPropagation:h,enableHomeAndEndKeys:D,direction:R,disabledIndices:x,modifierKeys:I}),Q0=h0(E,J,{state:U,ref:W,props:[S,...K,m],stateAttributesMapping:q}),r=GD.useMemo(()=>({highlightedIndex:p,onHighlightedIndexChange:d,highlightItemOnHover:b,relayKeyboardEvent:u}),[p,d,b,u]);return _q.jsx(dY.Provider,{value:r,children:_q.jsx(Vz,{elementsRef:w0,onMapChange:(e)=>{M?.(e),t(e)},children:Q0})})}function XZ(J){let X=uw(J),Y=parseFloat(X.width)||0,W=parseFloat(X.height)||0,K=O1(J),U=K?J.offsetWidth:Y,q=K?J.offsetHeight:W;if(I4(Y)!==U||I4(W)!==q)Y=U,W=q;return{width:Y,height:W}}var oX=c(G0(),1);var iS=typeof ResizeObserver<"u",rS=()=>!0;function WD(J){let{popupElement:X,positionerElement:Y,content:W,mounted:K,enabled:U=rS,onMeasureLayout:q,onMeasureLayoutComplete:_,side:L,direction:F}=J,N=oX.useRef(!0),V=kz(X,!0,!1),k=x5(),A=oX.useRef(null),D=F0(q),M=F0(_),h=oX.useMemo(()=>{let v=L==="top",x=L==="left";if(F==="rtl")v=v||L==="inline-end",x=x||L==="inline-end";else v=v||L==="inline-start",x=x||L==="inline-start";return v?{position:"absolute",[L==="top"?"bottom":"top"]:"0",[x?"right":"left"]:"0"}:v1},[L,F]);k0(()=>{if(!K||!U()||!iS){N.current=!0,A.current=null;return}if(!X||!Y)return;Object.entries(h).forEach(([p,d])=>{X.style.setProperty(p,d)});let v=new ResizeObserver((p)=>{let d=p[0];if(d)if(A.current===null)A.current={width:Math.ceil(d.borderBoxSize[0].inlineSize),height:Math.ceil(d.borderBoxSize[0].blockSize)};else A.current.width=Math.ceil(d.borderBoxSize[0].inlineSize),A.current.height=Math.ceil(d.borderBoxSize[0].blockSize)});v.observe(X),X.style.setProperty("--popup-width","auto"),X.style.setProperty("--popup-height","auto");let x=sX(X,"position","static"),I=sX(X,"transform","none"),b=sX(X,"scale","1"),E=sX(Y,"--available-width","max-content"),m=sX(Y,"--available-height","max-content");if(D?.(),N.current||A.current===null){Y.style.setProperty("--positioner-width","max-content"),Y.style.setProperty("--positioner-height","max-content");let p=XZ(X);return Y.style.setProperty("--positioner-width",`${p.width}px`),Y.style.setProperty("--positioner-height",`${p.height}px`),x(),I(),b(),E(),m(),M?.(null,p),N.current=!1,()=>{v.disconnect()}}X.style.setProperty("--popup-width","auto"),X.style.setProperty("--popup-height","auto"),Y.style.setProperty("--positioner-width","max-content"),Y.style.setProperty("--positioner-height","max-content");let R=XZ(X);X.style.setProperty("--popup-width",`${A.current.width}px`),X.style.setProperty("--popup-height",`${A.current.height}px`),x(),I(),E(),m(),M?.(A.current,R),Y.style.setProperty("--positioner-width",`${R.width}px`),Y.style.setProperty("--positioner-height",`${R.height}px`);let S=new AbortController;return k.request(()=>{X.style.setProperty("--popup-width",`${R.width}px`),X.style.setProperty("--popup-height",`${R.height}px`),V(()=>{X.style.setProperty("--popup-width","auto"),X.style.setProperty("--popup-height","auto")},S.signal)}),()=>{v.disconnect(),S.abort(),k.cancel()}},[W,X,Y,V,k,U,K,D,M,h])}function sX(J,X,Y){let W=J.style.getPropertyValue(X);return J.style.setProperty(X,Y),()=>{J.style.setProperty(X,W)}}var KD=c(G0(),1);function UD(J){let[X,Y]=KD.useState({current:J,previous:null});if(J!==X.current)Y({current:J,previous:X.current});return X.previous}var OQ=c(G0(),1),HD=c(m8(),1);var _D=c(x1(),1),qq=OQ.forwardRef(function(X,Y){let{children:W,container:K,className:U,render:q,..._}=X,{portalNode:L,portalSubtree:F}=HG({container:K,ref:Y,componentProps:X,elementProps:_});if(!F&&!L)return null;return _D.jsxs(OQ.Fragment,{children:[F,L&&HD.createPortal(W,L)]})});qq.displayName="FloatingPortalLite";var R6={};qz(R6,{Tab:()=>Vq,Root:()=>Lq,Panel:()=>Nq,List:()=>Aq,Indicator:()=>Fq});var Y2=c(G0(),1);var DQ=c(G0(),1),TQ=DQ.createContext(void 0);TQ.displayName="TabsRootContext";function C6(){let J=DQ.useContext(TQ);if(J===void 0)throw Error("Base UI: TabsRootContext is missing. Tabs parts must be placed within <Tabs.Root>.");return J}var qD=function(J){return J.activationDirection="data-activation-direction",J.orientation="data-orientation",J}({});var u4={tabActivationDirection:(J)=>({[qD.activationDirection]:J})};var Bq=c(x1(),1),Lq=Y2.forwardRef(function(X,Y){let{className:W,defaultValue:K=0,onValueChange:U,orientation:q="horizontal",render:_,value:L,...F}=X,N=M5(),V=Object.hasOwn(X,"defaultValue"),k=Y2.useRef([]),[A,D]=Y2.useState(()=>new Map),[M,h]=Lz({controlled:L,default:K,name:"Tabs",state:"value"}),v=L!==void 0,[x,I]=Y2.useState(()=>new Map),[b,E]=Y2.useState("none"),m=F0((o,g)=>{if(U?.(o,g),g.isCanceled)return;h(o),E(g.activationDirection)}),R=F0((o,g)=>{D((X0)=>{if(X0.get(o)===g)return X0;let P=new Map(X0);return P.set(o,g),P})}),S=F0((o,g)=>{D((X0)=>{if(!X0.has(o)||X0.get(o)!==g)return X0;let P=new Map(X0);return P.delete(o),P})}),p=Y2.useCallback((o)=>{return A.get(o)},[A]),d=Y2.useCallback((o)=>{for(let g of x.values())if(o===g?.value)return g?.id;return},[x]),w0=Y2.useCallback((o)=>{if(o===void 0)return null;for(let[g,X0]of x.entries())if(X0!=null&&o===(X0.value??X0.index))return g;return null},[x]),t=Y2.useMemo(()=>({direction:N,getTabElementBySelectedValue:w0,getTabIdByPanelValue:d,getTabPanelIdByValue:p,onValueChange:m,orientation:q,registerMountedTabPanel:R,setTabMap:I,unregisterMountedTabPanel:S,tabActivationDirection:b,value:M}),[N,w0,d,p,m,q,R,I,S,b,M]),u=Y2.useMemo(()=>{for(let o of x.values())if(o!=null&&o.value===M)return o;return},[x,M]),Q0=Y2.useMemo(()=>{for(let o of x.values())if(o!=null&&!o.disabled)return o.value;return},[x]);k0(()=>{if(v||x.size===0)return;let o=u?.disabled,g=u==null&&M!==null;if(V&&o&&M===K)return;if(!o&&!g)return;let P=Q0??null;if(M===P)return;h(P),E("none")},[K,Q0,V,v,u,E,h,x,M]);let e=h0("div",X,{state:{orientation:q,tabActivationDirection:b},ref:Y,props:F,stateAttributesMapping:u4});return Bq.jsx(TQ.Provider,{value:t,children:Bq.jsx(Vz,{elementsRef:k,children:e})})});Lq.displayName="TabsRoot";var y6=c(G0(),1);var xQ=c(G0(),1),vQ=xQ.createContext(void 0);vQ.displayName="TabsListContext";function hQ(){let J=xQ.useContext(vQ);if(J===void 0)throw Error("Base UI: TabsListContext is missing. TabsList parts must be placed within <Tabs.List>.");return J}var Vq=y6.forwardRef(function(X,Y){let{className:W,disabled:K=!1,render:U,value:q,id:_,nativeButton:L=!0,...F}=X,{value:N,getTabPanelIdByValue:V,orientation:k}=C6(),{activateOnFocus:A,highlightedTabIndex:D,onTabActivation:M,setHighlightedTabIndex:h,tabsListElement:v}=hQ(),x=ww(_),I=y6.useMemo(()=>({disabled:K,id:x,value:q}),[K,x,q]),{compositeProps:b,compositeRef:E,index:m}=VQ({metadata:I}),R=q===N,S=y6.useRef(!1);k0(()=>{if(S.current){S.current=!1;return}if(!(R&&m>-1&&D!==m))return;let X0=v;if(X0!=null){let P=X2(Dw(X0));if(P&&t0(X0,P))return}if(!K)h(m)},[R,m,D,h,K,v]);let{getButtonProps:p,buttonRef:d}=Z5({disabled:K,native:L,focusableWhenDisabled:!0}),w0=V(q),t=y6.useRef(!1),u=y6.useRef(!1);function Q0(X0){if(R||K)return;M(q,P0(B0.none,X0.nativeEvent,void 0,{activationDirection:"none"}))}function r(X0){if(R)return;if(m>-1&&!K)h(m);if(K)return;if(A&&(!t.current||t.current&&u.current))M(q,P0(B0.none,X0.nativeEvent,void 0,{activationDirection:"none"}))}function e(X0){if(R||K)return;t.current=!0;function P(){t.current=!1,u.current=!1}if(!X0.button||X0.button===0)u.current=!0,Dw(X0.currentTarget).addEventListener("pointerup",P,{once:!0})}let o=y6.useMemo(()=>({disabled:K,active:R,orientation:k}),[K,R,k]);return h0("button",X,{state:o,ref:[Y,d,E],props:[b,{role:"tab","aria-controls":w0,"aria-selected":R,id:x,onClick:Q0,onFocus:r,onPointerDown:e,[MQ]:R?"":void 0,onKeyDownCapture(){S.current=!0}},F,p]})});Vq.displayName="TabsTab";var Q5=c(G0(),1);var BD='!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();';var J9=function(J){return J.activeTabLeft="--active-tab-left",J.activeTabRight="--active-tab-right",J.activeTabTop="--active-tab-top",J.activeTabBottom="--active-tab-bottom",J.activeTabWidth="--active-tab-width",J.activeTabHeight="--active-tab-height",J}({});var EQ=c(x1(),1),aS={...u4,activeTabPosition:()=>null,activeTabSize:()=>null},Fq=Q5.forwardRef(function(X,Y){let{className:W,render:K,renderBeforeHydration:U=!1,...q}=X,{getTabElementBySelectedValue:_,orientation:L,tabActivationDirection:F,value:N}=C6(),{tabsListElement:V}=hQ(),[k,A]=Q5.useState(!1),{value:D}=C6();Nz(()=>A(!0));let M=KO();Q5.useEffect(()=>{if(N!=null&&V!=null&&typeof ResizeObserver<"u"){let u=new ResizeObserver(M);return u.observe(V),()=>{u.disconnect()}}return},[N,V,M]);let h=0,v=0,x=0,I=0,b=0,E=0,m=!1;if(N!=null&&V!=null){let u=_(N);if(m=!0,u!=null){let{width:Q0,height:r}=XZ(u),{width:e,height:o}=XZ(V),g=u.getBoundingClientRect(),X0=V.getBoundingClientRect(),P=e>0?X0.width/e:1,z0=o>0?X0.height/o:1;if(Math.abs(P)>Number.EPSILON&&Math.abs(z0)>Number.EPSILON){let J0=g.left-X0.left,L0=g.top-X0.top;h=J0/P+V.scrollLeft-V.clientLeft,x=L0/z0+V.scrollTop-V.clientTop}else h=u.offsetLeft,x=u.offsetTop;b=Q0,E=r,v=V.scrollWidth-h-b,I=V.scrollHeight-x-E}}let R=Q5.useMemo(()=>m?{left:h,right:v,top:x,bottom:I}:null,[h,v,x,I,m]),S=Q5.useMemo(()=>m?{width:b,height:E}:null,[b,E,m]),p=Q5.useMemo(()=>{if(!m)return;return{[J9.activeTabLeft]:`${h}px`,[J9.activeTabRight]:`${v}px`,[J9.activeTabTop]:`${x}px`,[J9.activeTabBottom]:`${I}px`,[J9.activeTabWidth]:`${b}px`,[J9.activeTabHeight]:`${E}px`}},[h,v,x,I,b,E,m]),d=m&&b>0&&E>0,w0=Q5.useMemo(()=>({orientation:L,activeTabPosition:R,activeTabSize:S,tabActivationDirection:F}),[L,R,S,F]),t=h0("span",X,{state:w0,ref:Y,props:[{role:"presentation",style:p,hidden:!d},q,{suppressHydrationWarning:!0}],stateAttributesMapping:aS});if(D==null)return null;return EQ.jsxs(Q5.Fragment,{children:[t,!k&&U&&EQ.jsx("script",{dangerouslySetInnerHTML:{__html:BD},suppressHydrationWarning:!0})]})});Fq.displayName="TabsIndicator";var nX=c(G0(),1);var LD=function(J){return J.index="data-index",J.activationDirection="data-activation-direction",J.orientation="data-orientation",J.hidden="data-hidden",J}({});var Nq=nX.forwardRef(function(X,Y){let{className:W,value:K,render:U,keepMounted:q=!1,..._}=X,{value:L,getTabIdByPanelValue:F,orientation:N,tabActivationDirection:V,registerMountedTabPanel:k,unregisterMountedTabPanel:A}=C6(),D=ww(),M=nX.useMemo(()=>({id:D,value:K}),[D,K]),{ref:h,index:v}=v5({metadata:M}),x=K!==L,I=F(K),b=nX.useMemo(()=>({hidden:x,orientation:N,tabActivationDirection:V}),[x,N,V]),E=h0("div",X,{state:b,ref:[Y,h],props:[{"aria-labelledby":I,hidden:x,id:D??void 0,role:"tabpanel",tabIndex:x?-1:0,[LD.index]:v},_],stateAttributesMapping:u4});if(k0(()=>{if(x&&!q)return;if(D==null)return;return k(K,D),()=>{A(K,D)}},[x,q,K,D,k,A]),!(!x||q))return null;return E});Nq.displayName="TabsPanel";var Y8=c(G0(),1);var kq=c(x1(),1),Aq=Y8.forwardRef(function(X,Y){let{activateOnFocus:W=!1,className:K,loopFocus:U=!0,render:q,..._}=X,{getTabElementBySelectedValue:L,onValueChange:F,orientation:N,value:V,setTabMap:k,tabActivationDirection:A}=C6(),[D,M]=Y8.useState(0),[h,v]=Y8.useState(null),x=sS(V,N,h,L),I=F0((R,S)=>{if(R!==V){let p=x(R);S.activationDirection=p,F(R,S)}}),b=Y8.useMemo(()=>({orientation:N,tabActivationDirection:A}),[N,A]),E={"aria-orientation":N==="vertical"?"vertical":void 0,role:"tablist"},m=Y8.useMemo(()=>({activateOnFocus:W,highlightedTabIndex:D,onTabActivation:I,setHighlightedTabIndex:M,tabsListElement:h,value:V}),[W,D,I,M,h,V]);return kq.jsx(vQ.Provider,{value:m,children:kq.jsx(QD,{render:q,className:K,state:b,refs:[Y,v],props:[E,_],stateAttributesMapping:u4,highlightedIndex:D,enableHomeAndEndKeys:!0,loopFocus:U,orientation:N,onHighlightedIndexChange:M,onMapChange:k,disabledIndices:t2})})});Aq.displayName="TabsList";function VD(J,X){let{left:Y,top:W}=J.getBoundingClientRect(),{left:K,top:U}=X.getBoundingClientRect(),q=Y-K,_=W-U;return{left:q,top:_}}function sS(J,X,Y,W){let[K,U]=Y8.useState(null);return k0(()=>{if(J==null||Y==null){U(null);return}let q=W(J);if(q==null){U(null);return}let{left:_,top:L}=VD(q,Y);U(X==="horizontal"?_:L)},[X,W,Y,J]),Y8.useCallback((q)=>{if(q===J)return"none";if(q==null)return U(null),"none";if(q!=null&&Y!=null){let _=W(q);if(_!=null){let{left:L,top:F}=VD(_,Y);if(K==null)return U(X==="horizontal"?L:F),"none";if(X==="horizontal"){if(L<K)return U(L),"left";if(L>K)return U(L),"right"}else if(F<K)return U(F),"up";else if(F>K)return U(F),"down"}}return"none"},[W,X,K,Y,J])}var o8={};qz(o8,{createHandle:()=>vD,Viewport:()=>Iq,Trigger:()=>jq,Root:()=>AD,Provider:()=>Eq,Positioner:()=>Dq,Portal:()=>Oq,Popup:()=>Tq,Handle:()=>dQ,Arrow:()=>xq});var s8=c(G0(),1);var PQ=c(G0(),1),IQ=PQ.createContext(void 0);IQ.displayName="TooltipRootContext";function R5(J){let X=PQ.useContext(IQ);if(X===void 0&&!J)throw Error("Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.");return X}var FD=c(G0(),1),ND=c(m8(),1);var oS={...uz,disabled:p0((J)=>J.disabled),instantType:p0((J)=>J.instantType),isInstantPhase:p0((J)=>J.isInstantPhase),trackCursorAxis:p0((J)=>J.trackCursorAxis),disableHoverablePopup:p0((J)=>J.disableHoverablePopup),lastOpenChangeReason:p0((J)=>J.openChangeReason),closeDelay:p0((J)=>J.closeDelay)};class $Z extends P6{constructor(J){super({...nS(),...J},{popupRef:FD.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Z8},oS)}setOpen=(J,X)=>{let Y=X.reason,W=Y===B0.triggerHover,K=J&&Y===B0.triggerFocus,U=!J&&(Y===B0.triggerPress||Y===B0.escapeKey);if(X.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(J,X),X.isCanceled)return;let q=()=>{let _={open:J,openChangeReason:Y};if(K)_.instantType="focus";else if(U)_.instantType="dismiss";else if(Y===B0.triggerHover)_.instantType=void 0;let L=X.trigger?.id??null;if(L||J)_.activeTriggerId=L,_.activeTriggerElement=X.trigger??null;this.update(_)};if(W)ND.flushSync(q);else q()};static useStore(J,X){let Y=r1(()=>{return J??new $Z(X)}).current,W=n7({popupStore:Y,onOpenChange:Y.setOpen});return Y.state.floatingRootContext=W,Y}}function nS(){return{...dz(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeDelay:0}}var kD=c(x1(),1);function AD(J){let{disabled:X=!1,defaultOpen:Y=!1,open:W,disableHoverablePopup:K=!1,trackCursorAxis:U="none",actionsRef:q,onOpenChange:_,onOpenChangeComplete:L,handle:F,triggerId:N,defaultTriggerId:V=null,children:k}=J,A=$Z.useStore(F?.store,{open:W??Y,activeTriggerId:N!==void 0?N:V});A.useControlledProp("open",W,Y),A.useControlledProp("activeTriggerId",N,V),A.useContextCallback("onOpenChange",_),A.useContextCallback("onOpenChangeComplete",L);let D=A.useState("open"),M=A.useState("activeTriggerId"),h=A.useState("payload");A.useSyncedValues({trackCursorAxis:U,disableHoverablePopup:K});let v=!X&&D;k0(()=>{if(D&&X)A.setOpen(!1,P0(B0.disabled))},[D,X,A]),A.useSyncedValue("disabled",X),fz(A);let{forceUnmount:x,transitionStatus:I}=mz(v,A),b=A.useState("isInstantPhase"),E=A.useState("instantType"),m=A.useState("lastOpenChangeReason"),R=s8.useRef(null);k0(()=>{if(I==="ending"&&m===B0.none||I!=="ending"&&b){if(E!=="delay")R.current=E;A.set("instantType","delay")}else if(R.current!==null)A.set("instantType",R.current),R.current=null},[I,b,m,E,A]),k0(()=>{if(v){if(M==null)A.set("payload",void 0)}},[A,M,v]);let S=s8.useCallback(()=>{A.setOpen(!1,tS(A,B0.imperativeAction))},[A]);s8.useImperativeHandle(q,()=>({unmount:x,close:S}),[x,S]);let p=A.useState("floatingRootContext"),d=jX(p,{enabled:!X}),w0=s7(p,{enabled:!X,referencePress:!0}),t=v_(p,{enabled:!X&&U!=="none",axis:U==="none"?void 0:U}),{getReferenceProps:u,getFloatingProps:Q0,getTriggerProps:r}=$5([d,w0,t]),e=s8.useMemo(()=>u(),[u]),o=s8.useMemo(()=>r(),[r]),g=s8.useMemo(()=>Q0(),[Q0]);return A.useSyncedValues({floatingRootContext:p,activeTriggerProps:e,inactiveTriggerProps:o,popupProps:g}),kD.jsx(IQ.Provider,{value:A,children:typeof k==="function"?k({payload:h}):k})}function tS(J,X){let Y=P0(X);return Y.preventUnmountOnClose=()=>{J.set("preventUnmountingOnClose",!0)},Y}var YZ=c(G0(),1);var bQ=c(G0(),1),SQ=bQ.createContext(void 0);SQ.displayName="TooltipProviderContext";function jD(){return bQ.useContext(SQ)}var MD=600;var jq=YZ.forwardRef(function(X,Y){let{className:W,render:K,handle:U,payload:q,disabled:_,delay:L,closeDelay:F,id:N,...V}=X,k=R5(!0),A=U?.store??k;if(!A)throw Error("Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.");let D=ww(N),M=A.useState("isTriggerActive",D),h=A.useState("floatingRootContext"),v=A.useState("isOpenedByTrigger",D),x=YZ.useRef(null),I=L??MD,b=F??0,{registerTrigger:E,isMountedByThisTrigger:m}=gz(D,x,A,{payload:q,closeDelay:b}),R=jD(),{delayRef:S,isInstantPhase:p,hasProvider:d}=A_(h,{open:v});A.useSyncedValue("isInstantPhase",p);let w0=A.useState("disabled"),t=_??w0,u=A.useState("trackCursorAxis"),Q0=A.useState("disableHoverablePopup"),r=e7(h,{enabled:!t,mouseOnly:!0,move:!1,handleClose:!Q0&&u!=="both"?z9():null,restMs(){let X0=R?.delay,P=typeof S.current==="object"?S.current.open:void 0,z0=I;if(d)if(P!==0)z0=L??X0??I;else z0=0;return z0},delay(){let X0=typeof S.current==="object"?S.current.close:void 0,P=b;if(F==null&&d)P=X0;return{close:P}},triggerElementRef:x,isActiveTrigger:M}),e=YZ.useMemo(()=>({open:v}),[v]),o=A.useState("triggerProps",m);return h0("button",X,{state:e,ref:[Y,E,x],props:[r,o,{id:D},V],stateAttributesMapping:lz})});jq.displayName="TooltipTrigger";var DD=c(G0(),1);var CQ=c(G0(),1),yQ=CQ.createContext(void 0);yQ.displayName="TooltipPortalContext";function OD(){let J=CQ.useContext(yQ);if(J===void 0)throw Error("Base UI: <Tooltip.Portal> is missing.");return J}var Mq=c(x1(),1),Oq=DD.forwardRef(function(X,Y){let{keepMounted:W=!1,...K}=X;if(!(R5().useState("mounted")||W))return null;return Mq.jsx(yQ.Provider,{value:W,children:Mq.jsx(qq,{ref:Y,...K})})});Oq.displayName="TooltipPortal";var GZ=c(G0(),1);var RQ=c(G0(),1),gQ=RQ.createContext(void 0);gQ.displayName="TooltipPositionerContext";function fQ(){let J=RQ.useContext(gQ);if(J===void 0)throw Error("Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.");return J}var TD=c(x1(),1),Dq=GZ.forwardRef(function(X,Y){let{render:W,className:K,anchor:U,positionMethod:q="absolute",side:_="top",align:L="center",sideOffset:F=0,alignOffset:N=0,collisionBoundary:V="clipping-ancestors",collisionPadding:k=5,arrowPadding:A=5,sticky:D=!1,disableAnchorTracking:M=!1,collisionAvoidance:h=EY,...v}=X,x=R5(),I=OD(),b=x.useState("open"),E=x.useState("mounted"),m=x.useState("trackCursorAxis"),R=x.useState("disableHoverablePopup"),S=x.useState("floatingRootContext"),p=x.useState("instantType"),d=x.useState("transitionStatus"),w0=gG({anchor:U,positionMethod:q,floatingRootContext:S,mounted:E,side:_,sideOffset:F,align:L,alignOffset:N,collisionBoundary:V,collisionPadding:k,sticky:D,arrowPadding:A,disableAnchorTracking:M,keepMounted:I,collisionAvoidance:h,adaptiveOrigin:PO}),t=GZ.useMemo(()=>{let e={};if(!b||m==="both"||R)e.pointerEvents="none";return{role:"presentation",hidden:!E,style:{...w0.positionerStyles,...e}}},[b,m,R,E,w0.positionerStyles]),u=GZ.useMemo(()=>({open:b,side:w0.side,align:w0.align,anchorHidden:w0.anchorHidden,instant:m!=="none"?"tracking-cursor":p}),[b,w0.side,w0.align,w0.anchorHidden,m,p]),Q0=GZ.useMemo(()=>({...u,arrowRef:w0.arrowRef,arrowStyles:w0.arrowStyles,arrowUncentered:w0.arrowUncentered}),[u,w0.arrowRef,w0.arrowStyles,w0.arrowUncentered]),r=h0("div",X,{state:u,props:[t,az(d),v],ref:[Y,x.useStateSetter("positionerElement")],stateAttributesMapping:xw});return TD.jsx(gQ.Provider,{value:Q0,children:r})});Dq.displayName="TooltipPositioner";var QZ=c(G0(),1);var eS={...xw,...h2},Tq=QZ.forwardRef(function(X,Y){let{className:W,render:K,...U}=X,q=R5(),{side:_,align:L}=fQ(),F=q.useState("open"),N=q.useState("mounted"),V=q.useState("instantType"),k=q.useState("transitionStatus"),A=q.useState("popupProps"),D=q.useState("payload"),M=q.useState("popupElement"),h=q.useState("positionerElement"),v=q.useState("floatingRootContext"),x=M5();P5({open:F,ref:q.context.popupRef,onComplete(){if(F)q.context.onOpenChangeComplete?.(!0)}});function I(){v.context.events.emit("measure-layout")}function b(d,w0){v.context.events.emit("measure-layout-complete",{previousDimensions:d,nextDimensions:w0})}let E=QZ.useCallback(()=>q.context.triggerElements.size>1,[q]);WD({popupElement:M,positionerElement:h,mounted:N,content:D,enabled:E,onMeasureLayout:I,onMeasureLayoutComplete:b,side:_,direction:x});let m=q.useState("disabled"),R=q.useState("closeDelay");OX(v,{enabled:!m,closeDelay:R});let S=QZ.useMemo(()=>({open:F,side:_,align:L,instant:V,transitionStatus:k}),[F,_,L,V,k]);return h0("div",X,{state:S,ref:[Y,q.context.popupRef,q.useStateSetter("popupElement")],props:[A,az(k),U],stateAttributesMapping:eS})});Tq.displayName="TooltipPopup";var mQ=c(G0(),1);var xq=mQ.forwardRef(function(X,Y){let{className:W,render:K,...U}=X,_=R5().useState("instantType"),{open:L,arrowRef:F,side:N,align:V,arrowUncentered:k,arrowStyles:A}=fQ(),D=mQ.useMemo(()=>({open:L,side:N,align:V,uncentered:k,instant:_}),[L,N,V,k,_]);return h0("div",X,{state:D,ref:[Y,F],props:[{style:A,"aria-hidden":!0},U],stateAttributesMapping:xw})});xq.displayName="TooltipArrow";var vq=c(G0(),1);var hq=c(x1(),1),Eq=function(X){let{delay:Y,closeDelay:W,timeout:K=400}=X,U=vq.useMemo(()=>({delay:Y,closeDelay:W}),[Y,W]),q=vq.useMemo(()=>({open:Y,close:W}),[Y,W]);return hq.jsx(SQ.Provider,{value:U,children:hq.jsx(k_,{delay:q,timeoutMs:K,children:X.children})})};Eq.displayName="TooltipProvider";var cw=c(G0(),1);var Pq=function(J){return J.popupWidth="--popup-width",J.popupHeight="--popup-height",J}({});var WZ=c(x1(),1),wC={activationDirection:(J)=>J?{"data-activation-direction":J}:null},Iq=cw.forwardRef(function(X,Y){let{render:W,className:K,children:U,...q}=X,_=R5(),L=_.useState("activeTriggerElement"),F=_.useState("open"),N=_.useState("floatingRootContext"),V=_.useState("instantType"),k=UD(F?L:null),A=cw.useRef(null),[D,M]=cw.useState(null),[h,v]=cw.useState(null),x=cw.useRef(null),I=cw.useRef(null),b=kz(x,!0,!1),E=x5(),[m,R]=cw.useState(null),[S,p]=cw.useState(!1),d=F0(()=>{x.current?.style.setProperty("animation","none"),x.current?.style.setProperty("transition","none"),I.current?.style.setProperty("display","none")}),w0=F0((e)=>{if(x.current?.style.removeProperty("animation"),x.current?.style.removeProperty("transition"),I.current?.style.removeProperty("display"),!m)R(e.previousDimensions)});cw.useEffect(()=>{return N.context.events.on("measure-layout",d),N.context.events.on("measure-layout-complete",w0),()=>{N.context.events.off("measure-layout",d),N.context.events.off("measure-layout-complete",w0)}},[N,d,w0]);let t=cw.useRef(null);k0(()=>{if(L&&k&&L!==k&&t.current!==L&&A.current){M(A.current),p(!0);let e=ZC(k,L);v(e),E.request(()=>{E.request(()=>{p(!1),b(()=>{M(null),R(null),A.current=null})})}),t.current=L}},[L,k,D,b,E]),k0(()=>{let e=x.current;if(!e)return;let o=document.createElement("div");for(let g of Array.from(e.childNodes))o.appendChild(g.cloneNode(!0));A.current=o});let u=D!=null,Q0;if(!u)Q0=WZ.jsx("div",{"data-current":!0,ref:x,children:U},"current");else Q0=WZ.jsxs(cw.Fragment,{children:[WZ.jsx("div",{"data-previous":!0,inert:iz(!0),ref:I,style:{[Pq.popupWidth]:`${m?.width}px`,[Pq.popupHeight]:`${m?.height}px`,position:"absolute"},"data-ending-style":S?void 0:""},"previous"),WZ.jsx("div",{"data-current":!0,ref:x,"data-starting-style":S?"":void 0,children:U},"current")]});k0(()=>{let e=I.current;if(!e||!D)return;e.replaceChildren(...Array.from(D.childNodes))},[D]);let r=cw.useMemo(()=>{return{activationDirection:zC(h),transitioning:u,instant:V}},[h,u,V]);return h0("div",X,{state:r,ref:Y,props:[q,{children:Q0}],stateAttributesMapping:wC})});Iq.displayName="TooltipViewport";function zC(J){if(!J)return;return`${xD(J.horizontal,5,"right","left")} ${xD(J.vertical,5,"down","up")}`}function xD(J,X,Y,W){if(J>X)return Y;if(J<-X)return W;return""}function ZC(J,X){let Y=J.getBoundingClientRect(),W=X.getBoundingClientRect(),K={x:Y.left+Y.width/2,y:Y.top+Y.height/2},U={x:W.left+W.width/2,y:W.top+W.height/2};return{horizontal:U.x-K.x,vertical:U.y-K.y}}class dQ{constructor(){this.store=new $Z}open(J){let X=J?this.store.context.triggerElements.getById(J):void 0;if(J&&!X)throw Error(`Base UI: TooltipHandle.open: No trigger found with id "${J}".`);this.store.setOpen(!0,P0(B0.imperativeAction,void 0,X))}close(){this.store.setOpen(!1,P0(B0.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}function vD(){return new dQ}function bq(J){return h0(J.defaultTagName??"div",J,J)}var n8=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(J){return this.listeners.add(J),this.onSubscribe(),()=>{this.listeners.delete(J),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};var JC={setTimeout:(J,X)=>setTimeout(J,X),clearTimeout:(J)=>clearTimeout(J),setInterval:(J,X)=>setInterval(J,X),clearInterval:(J)=>clearInterval(J)},XC=class{#w=JC;#z=!1;setTimeoutProvider(J){if(this.#z&&J!==this.#w)console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#w,provider:J});this.#w=J,this.#z=!1}setTimeout(J,X){return this.#z=!0,this.#w.setTimeout(J,X)}clearTimeout(J){this.#w.clearTimeout(J)}setInterval(J,X){return this.#z=!0,this.#w.setInterval(J,X)}clearInterval(J){this.#w.clearInterval(J)}},t8=new XC;function hD(J){setTimeout(J,0)}var I2=typeof window>"u"||"Deno"in globalThis;function vw(){}function ID(J,X){return typeof J==="function"?J(X):J}function tX(J){return typeof J==="number"&&J>=0&&J!==1/0}function pQ(J,X){return Math.max(J+(X||0)-Date.now(),0)}function G8(J,X){return typeof J==="function"?J(X):J}function b2(J,X){return typeof J==="function"?J(X):J}function cQ(J,X){let{type:Y="all",exact:W,fetchStatus:K,predicate:U,queryKey:q,stale:_}=J;if(q){if(W){if(X.queryHash!==eX(q,X.options))return!1}else if(!Y9(X.queryKey,q))return!1}if(Y!=="all"){let L=X.isActive();if(Y==="active"&&!L)return!1;if(Y==="inactive"&&L)return!1}if(typeof _==="boolean"&&X.isStale()!==_)return!1;if(K&&K!==X.state.fetchStatus)return!1;if(U&&!U(X))return!1;return!0}function lQ(J,X){let{exact:Y,status:W,predicate:K,mutationKey:U}=J;if(U){if(!X.options.mutationKey)return!1;if(Y){if(X9(X.options.mutationKey)!==X9(U))return!1}else if(!Y9(X.options.mutationKey,U))return!1}if(W&&X.state.status!==W)return!1;if(K&&!K(X))return!1;return!0}function eX(J,X){return(X?.queryKeyHashFn||X9)(J)}function X9(J){return JSON.stringify(J,(X,Y)=>Sq(Y)?Object.keys(Y).sort().reduce((W,K)=>{return W[K]=Y[K],W},{}):Y)}function Y9(J,X){if(J===X)return!0;if(typeof J!==typeof X)return!1;if(J&&X&&typeof J==="object"&&typeof X==="object")return Object.keys(X).every((Y)=>Y9(J[Y],X[Y]));return!1}var $C=Object.prototype.hasOwnProperty;function uQ(J,X){if(J===X)return J;let Y=ED(J)&&ED(X);if(!Y&&!(Sq(J)&&Sq(X)))return X;let K=(Y?J:Object.keys(J)).length,U=Y?X:Object.keys(X),q=U.length,_=Y?Array(q):{},L=0;for(let F=0;F<q;F++){let N=Y?F:U[F],V=J[N],k=X[N];if(V===k){if(_[N]=V,Y?F<K:$C.call(J,N))L++;continue}if(V===null||k===null||typeof V!=="object"||typeof k!=="object"){_[N]=k;continue}let A=uQ(V,k);if(_[N]=A,A===V)L++}return K===q&&L===K?J:_}function iQ(J,X){if(!X||Object.keys(J).length!==Object.keys(X).length)return!1;for(let Y in J)if(J[Y]!==X[Y])return!1;return!0}function ED(J){return Array.isArray(J)&&J.length===Object.keys(J).length}function Sq(J){if(!PD(J))return!1;let X=J.constructor;if(X===void 0)return!0;let Y=X.prototype;if(!PD(Y))return!1;if(!Y.hasOwnProperty("isPrototypeOf"))return!1;if(Object.getPrototypeOf(J)!==Object.prototype)return!1;return!0}function PD(J){return Object.prototype.toString.call(J)==="[object Object]"}function bD(J){return new Promise((X)=>{t8.setTimeout(X,J)})}function w$(J,X,Y){if(typeof Y.structuralSharing==="function")return Y.structuralSharing(J,X);else if(Y.structuralSharing!==!1){try{return uQ(J,X)}catch(W){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${Y.queryHash}]: ${W}`),W}return uQ(J,X)}return X}function SD(J,X,Y=0){let W=[...J,X];return Y&&W.length>Y?W.slice(1):W}function CD(J,X,Y=0){let W=[X,...J];return Y&&W.length>Y?W.slice(0,-1):W}var $9=Symbol();function rQ(J,X){if(J.queryFn===$9)console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${J.queryHash}'`);if(!J.queryFn&&X?.initialPromise)return()=>X.initialPromise;if(!J.queryFn||J.queryFn===$9)return()=>Promise.reject(Error(`Missing queryFn: '${J.queryHash}'`));return J.queryFn}function Cq(J,X){if(typeof J==="function")return J(...X);return!!J}var YC=class extends n8{#w;#z;#Z;constructor(){super();this.#Z=(J)=>{if(!I2&&window.addEventListener){let X=()=>J();return window.addEventListener("visibilitychange",X,!1),()=>{window.removeEventListener("visibilitychange",X)}}return}}onSubscribe(){if(!this.#z)this.setEventListener(this.#Z)}onUnsubscribe(){if(!this.hasListeners())this.#z?.(),this.#z=void 0}setEventListener(J){this.#Z=J,this.#z?.(),this.#z=J((X)=>{if(typeof X==="boolean")this.setFocused(X);else this.onFocus()})}setFocused(J){if(this.#w!==J)this.#w=J,this.onFocus()}onFocus(){let J=this.isFocused();this.listeners.forEach((X)=>{X(J)})}isFocused(){if(typeof this.#w==="boolean")return this.#w;return globalThis.document?.visibilityState!=="hidden"}},KZ=new YC;function z$(){let J,X,Y=new Promise((K,U)=>{J=K,X=U});Y.status="pending",Y.catch(()=>{});function W(K){Object.assign(Y,K),delete Y.resolve,delete Y.reject}return Y.resolve=(K)=>{W({status:"fulfilled",value:K}),J(K)},Y.reject=(K)=>{W({status:"rejected",reason:K}),X(K)},Y}var yD=hD;function GC(){let J=[],X=0,Y=(_)=>{_()},W=(_)=>{_()},K=yD,U=(_)=>{if(X)J.push(_);else K(()=>{Y(_)})},q=()=>{let _=J;if(J=[],_.length)K(()=>{W(()=>{_.forEach((L)=>{Y(L)})})})};return{batch:(_)=>{let L;X++;try{L=_()}finally{if(X--,!X)q()}return L},batchCalls:(_)=>{return(...L)=>{U(()=>{_(...L)})}},schedule:U,setNotifyFunction:(_)=>{Y=_},setBatchNotifyFunction:(_)=>{W=_},setScheduler:(_)=>{K=_}}}var n1=GC();var QC=class extends n8{#w=!0;#z;#Z;constructor(){super();this.#Z=(J)=>{if(!I2&&window.addEventListener){let X=()=>J(!0),Y=()=>J(!1);return window.addEventListener("online",X,!1),window.addEventListener("offline",Y,!1),()=>{window.removeEventListener("online",X),window.removeEventListener("offline",Y)}}return}}onSubscribe(){if(!this.#z)this.setEventListener(this.#Z)}onUnsubscribe(){if(!this.hasListeners())this.#z?.(),this.#z=void 0}setEventListener(J){this.#Z=J,this.#z?.(),this.#z=J(this.setOnline.bind(this))}setOnline(J){if(this.#w!==J)this.#w=J,this.listeners.forEach((Y)=>{Y(J)})}isOnline(){return this.#w}},UZ=new QC;function WC(J){return Math.min(1000*2**J,30000)}function yq(J){return(J??"online")==="online"?UZ.isOnline():!0}var aQ=class extends Error{constructor(J){super("CancelledError");this.revert=J?.revert,this.silent=J?.silent}};function sQ(J){let X=!1,Y=0,W,K=z$(),U=()=>K.status!=="pending",q=(M)=>{if(!U()){let h=new aQ(M);k(h),J.onCancel?.(h)}},_=()=>{X=!0},L=()=>{X=!1},F=()=>KZ.isFocused()&&(J.networkMode==="always"||UZ.isOnline())&&J.canRun(),N=()=>yq(J.networkMode)&&J.canRun(),V=(M)=>{if(!U())W?.(),K.resolve(M)},k=(M)=>{if(!U())W?.(),K.reject(M)},A=()=>{return new Promise((M)=>{W=(h)=>{if(U()||F())M(h)},J.onPause?.()}).then(()=>{if(W=void 0,!U())J.onContinue?.()})},D=()=>{if(U())return;let M,h=Y===0?J.initialPromise:void 0;try{M=h??J.fn()}catch(v){M=Promise.reject(v)}Promise.resolve(M).then(V).catch((v)=>{if(U())return;let x=J.retry??(I2?0:3),I=J.retryDelay??WC,b=typeof I==="function"?I(Y,v):I,E=x===!0||typeof x==="number"&&Y<x||typeof x==="function"&&x(Y,v);if(X||!E){k(v);return}Y++,J.onFail?.(Y,v),bD(b).then(()=>{return F()?void 0:A()}).then(()=>{if(X)k(v);else D()})})};return{promise:K,status:()=>K.status,cancel:q,continue:()=>{return W?.(),K},cancelRetry:_,continueRetry:L,canStart:N,start:()=>{if(N())D();else A().then(D);return K}}}var oQ=class{#w;destroy(){this.clearGcTimeout()}scheduleGc(){if(this.clearGcTimeout(),tX(this.gcTime))this.#w=t8.setTimeout(()=>{this.optionalRemove()},this.gcTime)}updateGcTime(J){this.gcTime=Math.max(this.gcTime||0,J??(I2?1/0:300000))}clearGcTimeout(){if(this.#w)t8.clearTimeout(this.#w),this.#w=void 0}};var fD=class extends oQ{#w;#z;#Z;#X;#J;#G;#Y;constructor(J){super();this.#Y=!1,this.#G=J.defaultOptions,this.setOptions(J.options),this.observers=[],this.#X=J.client,this.#Z=this.#X.getQueryCache(),this.queryKey=J.queryKey,this.queryHash=J.queryHash,this.#w=gD(this.options),this.state=J.state??this.#w,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#J?.promise}setOptions(J){if(this.options={...this.#G,...J},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let X=gD(this.options);if(X.data!==void 0)this.setState(RD(X.data,X.dataUpdatedAt)),this.#w=X}}optionalRemove(){if(!this.observers.length&&this.state.fetchStatus==="idle")this.#Z.remove(this)}setData(J,X){let Y=w$(this.state.data,J,this.options);return this.#$({data:Y,type:"success",dataUpdatedAt:X?.updatedAt,manual:X?.manual}),Y}setState(J,X){this.#$({type:"setState",state:J,setStateOptions:X})}cancel(J){let X=this.#J?.promise;return this.#J?.cancel(J),X?X.then(vw).catch(vw):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#w)}isActive(){return this.observers.some((J)=>b2(J.options.enabled,this)!==!1)}isDisabled(){if(this.getObserversCount()>0)return!this.isActive();return this.options.queryFn===$9||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){if(this.getObserversCount()>0)return this.observers.some((J)=>G8(J.options.staleTime,this)==="static");return!1}isStale(){if(this.getObserversCount()>0)return this.observers.some((J)=>J.getCurrentResult().isStale);return this.state.data===void 0||this.state.isInvalidated}isStaleByTime(J=0){if(this.state.data===void 0)return!0;if(J==="static")return!1;if(this.state.isInvalidated)return!0;return!pQ(this.state.dataUpdatedAt,J)}onFocus(){this.observers.find((X)=>X.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#J?.continue()}onOnline(){this.observers.find((X)=>X.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#J?.continue()}addObserver(J){if(!this.observers.includes(J))this.observers.push(J),this.clearGcTimeout(),this.#Z.notify({type:"observerAdded",query:this,observer:J})}removeObserver(J){if(this.observers.includes(J)){if(this.observers=this.observers.filter((X)=>X!==J),!this.observers.length){if(this.#J)if(this.#Y)this.#J.cancel({revert:!0});else this.#J.cancelRetry();this.scheduleGc()}this.#Z.notify({type:"observerRemoved",query:this,observer:J})}}getObserversCount(){return this.observers.length}invalidate(){if(!this.state.isInvalidated)this.#$({type:"invalidate"})}async fetch(J,X){if(this.state.fetchStatus!=="idle"&&this.#J?.status()!=="rejected"){if(this.state.data!==void 0&&X?.cancelRefetch)this.cancel({silent:!0});else if(this.#J)return this.#J.continueRetry(),this.#J.promise}if(J)this.setOptions(J);if(!this.options.queryFn){let _=this.observers.find((L)=>L.options.queryFn);if(_)this.setOptions(_.options)}if(!Array.isArray(this.options.queryKey))console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']");let Y=new AbortController,W=(_)=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>{return this.#Y=!0,Y.signal}})},K=()=>{let _=rQ(this.options,X),F=(()=>{let N={client:this.#X,queryKey:this.queryKey,meta:this.meta};return W(N),N})();if(this.#Y=!1,this.options.persister)return this.options.persister(_,F,this);return _(F)},q=(()=>{let _={fetchOptions:X,options:this.options,queryKey:this.queryKey,client:this.#X,state:this.state,fetchFn:K};return W(_),_})();if(this.options.behavior?.onFetch(q,this),this.#z=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==q.fetchOptions?.meta)this.#$({type:"fetch",meta:q.fetchOptions?.meta});this.#J=sQ({initialPromise:X?.initialPromise,fn:q.fetchFn,onCancel:(_)=>{if(_ instanceof aQ&&_.revert)this.setState({...this.#z,fetchStatus:"idle"});Y.abort()},onFail:(_,L)=>{this.#$({type:"failed",failureCount:_,error:L})},onPause:()=>{this.#$({type:"pause"})},onContinue:()=>{this.#$({type:"continue"})},retry:q.options.retry,retryDelay:q.options.retryDelay,networkMode:q.options.networkMode,canRun:()=>!0});try{let _=await this.#J.start();if(_===void 0)throw console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),Error(`${this.queryHash} data is undefined`);return this.setData(_),this.#Z.config.onSuccess?.(_,this),this.#Z.config.onSettled?.(_,this.state.error,this),_}catch(_){if(_ instanceof aQ){if(_.silent)return this.#J.promise;else if(_.revert){if(this.state.data===void 0)throw _;return this.state.data}}throw this.#$({type:"error",error:_}),this.#Z.config.onError?.(_,this),this.#Z.config.onSettled?.(this.state.data,_,this),_}finally{this.scheduleGc()}}#$(J){let X=(Y)=>{switch(J.type){case"failed":return{...Y,fetchFailureCount:J.failureCount,fetchFailureReason:J.error};case"pause":return{...Y,fetchStatus:"paused"};case"continue":return{...Y,fetchStatus:"fetching"};case"fetch":return{...Y,...Rq(Y.data,this.options),fetchMeta:J.meta??null};case"success":let W={...Y,...RD(J.data,J.dataUpdatedAt),dataUpdateCount:Y.dataUpdateCount+1,...!J.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#z=J.manual?W:void 0,W;case"error":let K=J.error;return{...Y,error:K,errorUpdateCount:Y.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:Y.fetchFailureCount+1,fetchFailureReason:K,fetchStatus:"idle",status:"error"};case"invalidate":return{...Y,isInvalidated:!0};case"setState":return{...Y,...J.state}}};this.state=X(this.state),n1.batch(()=>{this.observers.forEach((Y)=>{Y.onQueryUpdate()}),this.#Z.notify({query:this,type:"updated",action:J})})}};function Rq(J,X){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:yq(X.networkMode)?"fetching":"paused",...J===void 0&&{error:null,status:"pending"}}}function RD(J,X){return{data:J,dataUpdatedAt:X??Date.now(),error:null,isInvalidated:!1,status:"success"}}function gD(J){let X=typeof J.initialData==="function"?J.initialData():J.initialData,Y=X!==void 0,W=Y?typeof J.initialDataUpdatedAt==="function"?J.initialDataUpdatedAt():J.initialDataUpdatedAt:0;return{data:X,dataUpdateCount:0,dataUpdatedAt:Y?W??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:Y?"success":"pending",fetchStatus:"idle"}}var fq=class extends n8{constructor(J,X){super();this.options=X,this.#w=J,this.#$=null,this.#Y=z$(),this.bindMethods(),this.setOptions(X)}#w;#z=void 0;#Z=void 0;#X=void 0;#J;#G;#Y;#$;#B;#H;#_;#W;#K;#Q;#q=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){if(this.listeners.size===1){if(this.#z.addObserver(this),mD(this.#z,this.options))this.#U();else this.updateResult();this.#N()}}onUnsubscribe(){if(!this.hasListeners())this.destroy()}shouldFetchOnReconnect(){return gq(this.#z,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return gq(this.#z,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#k(),this.#A(),this.#z.removeObserver(this)}setOptions(J){let X=this.options,Y=this.#z;if(this.options=this.#w.defaultQueryOptions(J),this.options.enabled!==void 0&&typeof this.options.enabled!=="boolean"&&typeof this.options.enabled!=="function"&&typeof b2(this.options.enabled,this.#z)!=="boolean")throw Error("Expected enabled to be a boolean or a callback that returns a boolean");if(this.#j(),this.#z.setOptions(this.options),X._defaulted&&!iQ(this.options,X))this.#w.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#z,observer:this});let W=this.hasListeners();if(W&&dD(this.#z,Y,this.options,X))this.#U();if(this.updateResult(),W&&(this.#z!==Y||b2(this.options.enabled,this.#z)!==b2(X.enabled,this.#z)||G8(this.options.staleTime,this.#z)!==G8(X.staleTime,this.#z)))this.#L();let K=this.#V();if(W&&(this.#z!==Y||b2(this.options.enabled,this.#z)!==b2(X.enabled,this.#z)||K!==this.#Q))this.#F(K)}getOptimisticResult(J){let X=this.#w.getQueryCache().build(this.#w,J),Y=this.createResult(X,J);if(UC(this,Y))this.#X=Y,this.#G=this.options,this.#J=this.#z.state;return Y}getCurrentResult(){return this.#X}trackResult(J,X){return new Proxy(J,{get:(Y,W)=>{if(this.trackProp(W),X?.(W),W==="promise"){if(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#Y.status==="pending")this.#Y.reject(Error("experimental_prefetchInRender feature flag is not enabled"))}return Reflect.get(Y,W)}})}trackProp(J){this.#q.add(J)}getCurrentQuery(){return this.#z}refetch({...J}={}){return this.fetch({...J})}fetchOptimistic(J){let X=this.#w.defaultQueryOptions(J),Y=this.#w.getQueryCache().build(this.#w,X);return Y.fetch().then(()=>this.createResult(Y,X))}fetch(J){return this.#U({...J,cancelRefetch:J.cancelRefetch??!0}).then(()=>{return this.updateResult(),this.#X})}#U(J){this.#j();let X=this.#z.fetch(this.options,J);if(!J?.throwOnError)X=X.catch(vw);return X}#L(){this.#k();let J=G8(this.options.staleTime,this.#z);if(I2||this.#X.isStale||!tX(J))return;let Y=pQ(this.#X.dataUpdatedAt,J)+1;this.#W=t8.setTimeout(()=>{if(!this.#X.isStale)this.updateResult()},Y)}#V(){return(typeof this.options.refetchInterval==="function"?this.options.refetchInterval(this.#z):this.options.refetchInterval)??!1}#F(J){if(this.#A(),this.#Q=J,I2||b2(this.options.enabled,this.#z)===!1||!tX(this.#Q)||this.#Q===0)return;this.#K=t8.setInterval(()=>{if(this.options.refetchIntervalInBackground||KZ.isFocused())this.#U()},this.#Q)}#N(){this.#L(),this.#F(this.#V())}#k(){if(this.#W)t8.clearTimeout(this.#W),this.#W=void 0}#A(){if(this.#K)t8.clearInterval(this.#K),this.#K=void 0}createResult(J,X){let Y=this.#z,W=this.options,K=this.#X,U=this.#J,q=this.#G,L=J!==Y?J.state:this.#Z,{state:F}=J,N={...F},V=!1,k;if(X._optimisticResults){let S=this.hasListeners(),p=!S&&mD(J,X),d=S&&dD(J,Y,X,W);if(p||d)N={...N,...Rq(F.data,J.options)};if(X._optimisticResults==="isRestoring")N.fetchStatus="idle"}let{error:A,errorUpdatedAt:D,status:M}=N;k=N.data;let h=!1;if(X.placeholderData!==void 0&&k===void 0&&M==="pending"){let S;if(K?.isPlaceholderData&&X.placeholderData===q?.placeholderData)S=K.data,h=!0;else S=typeof X.placeholderData==="function"?X.placeholderData(this.#_?.state.data,this.#_):X.placeholderData;if(S!==void 0)M="success",k=w$(K?.data,S,X),V=!0}if(X.select&&k!==void 0&&!h)if(K&&k===U?.data&&X.select===this.#B)k=this.#H;else try{this.#B=X.select,k=X.select(k),k=w$(K?.data,k,X),this.#H=k,this.#$=null}catch(S){this.#$=S}if(this.#$)A=this.#$,k=this.#H,D=Date.now(),M="error";let v=N.fetchStatus==="fetching",x=M==="pending",I=M==="error",b=x&&v,E=k!==void 0,R={status:M,fetchStatus:N.fetchStatus,isPending:x,isSuccess:M==="success",isError:I,isInitialLoading:b,isLoading:b,data:k,dataUpdatedAt:N.dataUpdatedAt,error:A,errorUpdatedAt:D,failureCount:N.fetchFailureCount,failureReason:N.fetchFailureReason,errorUpdateCount:N.errorUpdateCount,isFetched:N.dataUpdateCount>0||N.errorUpdateCount>0,isFetchedAfterMount:N.dataUpdateCount>L.dataUpdateCount||N.errorUpdateCount>L.errorUpdateCount,isFetching:v,isRefetching:v&&!x,isLoadingError:I&&!E,isPaused:N.fetchStatus==="paused",isPlaceholderData:V,isRefetchError:I&&E,isStale:mq(J,X),refetch:this.refetch,promise:this.#Y,isEnabled:b2(X.enabled,J)!==!1};if(this.options.experimental_prefetchInRender){let S=(w0)=>{if(R.status==="error")w0.reject(R.error);else if(R.data!==void 0)w0.resolve(R.data)},p=()=>{let w0=this.#Y=R.promise=z$();S(w0)},d=this.#Y;switch(d.status){case"pending":if(J.queryHash===Y.queryHash)S(d);break;case"fulfilled":if(R.status==="error"||R.data!==d.value)p();break;case"rejected":if(R.status!=="error"||R.error!==d.reason)p();break}}return R}updateResult(){let J=this.#X,X=this.createResult(this.#z,this.options);if(this.#J=this.#z.state,this.#G=this.options,this.#J.data!==void 0)this.#_=this.#z;if(iQ(X,J))return;this.#X=X;let Y=()=>{if(!J)return!0;let{notifyOnChangeProps:W}=this.options,K=typeof W==="function"?W():W;if(K==="all"||!K&&!this.#q.size)return!0;let U=new Set(K??this.#q);if(this.options.throwOnError)U.add("error");return Object.keys(this.#X).some((q)=>{let _=q;return this.#X[_]!==J[_]&&U.has(_)})};this.#M({listeners:Y()})}#j(){let J=this.#w.getQueryCache().build(this.#w,this.options);if(J===this.#z)return;let X=this.#z;if(this.#z=J,this.#Z=J.state,this.hasListeners())X?.removeObserver(this),J.addObserver(this)}onQueryUpdate(){if(this.updateResult(),this.hasListeners())this.#N()}#M(J){n1.batch(()=>{if(J.listeners)this.listeners.forEach((X)=>{X(this.#X)});this.#w.getQueryCache().notify({query:this.#z,type:"observerResultsUpdated"})})}};function KC(J,X){return b2(X.enabled,J)!==!1&&J.state.data===void 0&&!(J.state.status==="error"&&X.retryOnMount===!1)}function mD(J,X){return KC(J,X)||J.state.data!==void 0&&gq(J,X,X.refetchOnMount)}function gq(J,X,Y){if(b2(X.enabled,J)!==!1&&G8(X.staleTime,J)!=="static"){let W=typeof Y==="function"?Y(J):Y;return W==="always"||W!==!1&&mq(J,X)}return!1}function dD(J,X,Y,W){return(J!==X||b2(W.enabled,J)===!1)&&(!Y.suspense||J.state.status!=="error")&&mq(J,Y)}function mq(J,X){return b2(X.enabled,J)!==!1&&J.isStaleByTime(G8(X.staleTime,J))}function UC(J,X){if(!iQ(J.getCurrentResult(),X))return!0;return!1}function dq(J){return{onFetch:(X,Y)=>{let W=X.options,K=X.fetchOptions?.meta?.fetchMore?.direction,U=X.state.data?.pages||[],q=X.state.data?.pageParams||[],_={pages:[],pageParams:[]},L=0,F=async()=>{let N=!1,V=(D)=>{Object.defineProperty(D,"signal",{enumerable:!0,get:()=>{if(X.signal.aborted)N=!0;else X.signal.addEventListener("abort",()=>{N=!0});return X.signal}})},k=rQ(X.options,X.fetchOptions),A=async(D,M,h)=>{if(N)return Promise.reject();if(M==null&&D.pages.length)return Promise.resolve(D);let x=(()=>{let m={client:X.client,queryKey:X.queryKey,pageParam:M,direction:h?"backward":"forward",meta:X.options.meta};return V(m),m})(),I=await k(x),{maxPages:b}=X.options,E=h?CD:SD;return{pages:E(D.pages,I,b),pageParams:E(D.pageParams,M,b)}};if(K&&U.length){let D=K==="backward",M=D?HC:uD,h={pages:U,pageParams:q},v=M(W,h);_=await A(h,v,D)}else{let D=J??U.length;do{let M=L===0?q[0]??W.initialPageParam:uD(W,_);if(L>0&&M==null)break;_=await A(_,M),L++}while(L<D)}return _};if(X.options.persister)X.fetchFn=()=>{return X.options.persister?.(F,{client:X.client,queryKey:X.queryKey,meta:X.options.meta,signal:X.signal},Y)};else X.fetchFn=F}}}function uD(J,{pages:X,pageParams:Y}){let W=X.length-1;return X.length>0?J.getNextPageParam(X[W],X,Y[W],Y):void 0}function HC(J,{pages:X,pageParams:Y}){return X.length>0?J.getPreviousPageParam?.(X[0],X,Y[0],Y):void 0}var pD=class extends oQ{#w;#z;#Z;#X;constructor(J){super();this.#w=J.client,this.mutationId=J.mutationId,this.#Z=J.mutationCache,this.#z=[],this.state=J.state||_C(),this.setOptions(J.options),this.scheduleGc()}setOptions(J){this.options=J,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(J){if(!this.#z.includes(J))this.#z.push(J),this.clearGcTimeout(),this.#Z.notify({type:"observerAdded",mutation:this,observer:J})}removeObserver(J){this.#z=this.#z.filter((X)=>X!==J),this.scheduleGc(),this.#Z.notify({type:"observerRemoved",mutation:this,observer:J})}optionalRemove(){if(!this.#z.length)if(this.state.status==="pending")this.scheduleGc();else this.#Z.remove(this)}continue(){return this.#X?.continue()??this.execute(this.state.variables)}async execute(J){let X=()=>{this.#J({type:"continue"})},Y={client:this.#w,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#X=sQ({fn:()=>{if(!this.options.mutationFn)return Promise.reject(Error("No mutationFn found"));return this.options.mutationFn(J,Y)},onFail:(U,q)=>{this.#J({type:"failed",failureCount:U,error:q})},onPause:()=>{this.#J({type:"pause"})},onContinue:X,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#Z.canRun(this)});let W=this.state.status==="pending",K=!this.#X.canStart();try{if(W)X();else{this.#J({type:"pending",variables:J,isPaused:K}),await this.#Z.config.onMutate?.(J,this,Y);let q=await this.options.onMutate?.(J,Y);if(q!==this.state.context)this.#J({type:"pending",context:q,variables:J,isPaused:K})}let U=await this.#X.start();return await this.#Z.config.onSuccess?.(U,J,this.state.context,this,Y),await this.options.onSuccess?.(U,J,this.state.context,Y),await this.#Z.config.onSettled?.(U,null,this.state.variables,this.state.context,this,Y),await this.options.onSettled?.(U,null,J,this.state.context,Y),this.#J({type:"success",data:U}),U}catch(U){try{throw await this.#Z.config.onError?.(U,J,this.state.context,this,Y),await this.options.onError?.(U,J,this.state.context,Y),await this.#Z.config.onSettled?.(void 0,U,this.state.variables,this.state.context,this,Y),await this.options.onSettled?.(void 0,U,J,this.state.context,Y),U}finally{this.#J({type:"error",error:U})}}finally{this.#Z.runNext(this)}}#J(J){let X=(Y)=>{switch(J.type){case"failed":return{...Y,failureCount:J.failureCount,failureReason:J.error};case"pause":return{...Y,isPaused:!0};case"continue":return{...Y,isPaused:!1};case"pending":return{...Y,context:J.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:J.isPaused,status:"pending",variables:J.variables,submittedAt:Date.now()};case"success":return{...Y,data:J.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...Y,data:void 0,error:J.error,failureCount:Y.failureCount+1,failureReason:J.error,isPaused:!1,status:"error"}}};this.state=X(this.state),n1.batch(()=>{this.#z.forEach((Y)=>{Y.onMutationUpdate(J)}),this.#Z.notify({mutation:this,type:"updated",action:J})})}};function _C(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var cD=class extends n8{constructor(J={}){super();this.config=J,this.#w=new Set,this.#z=new Map,this.#Z=0}#w;#z;#Z;build(J,X,Y){let W=new pD({client:J,mutationCache:this,mutationId:++this.#Z,options:J.defaultMutationOptions(X),state:Y});return this.add(W),W}add(J){this.#w.add(J);let X=nQ(J);if(typeof X==="string"){let Y=this.#z.get(X);if(Y)Y.push(J);else this.#z.set(X,[J])}this.notify({type:"added",mutation:J})}remove(J){if(this.#w.delete(J)){let X=nQ(J);if(typeof X==="string"){let Y=this.#z.get(X);if(Y){if(Y.length>1){let W=Y.indexOf(J);if(W!==-1)Y.splice(W,1)}else if(Y[0]===J)this.#z.delete(X)}}}this.notify({type:"removed",mutation:J})}canRun(J){let X=nQ(J);if(typeof X==="string"){let W=this.#z.get(X)?.find((K)=>K.state.status==="pending");return!W||W===J}else return!0}runNext(J){let X=nQ(J);if(typeof X==="string")return this.#z.get(X)?.find((W)=>W!==J&&W.state.isPaused)?.continue()??Promise.resolve();else return Promise.resolve()}clear(){n1.batch(()=>{this.#w.forEach((J)=>{this.notify({type:"removed",mutation:J})}),this.#w.clear(),this.#z.clear()})}getAll(){return Array.from(this.#w)}find(J){let X={exact:!0,...J};return this.getAll().find((Y)=>lQ(X,Y))}findAll(J={}){return this.getAll().filter((X)=>lQ(J,X))}notify(J){n1.batch(()=>{this.listeners.forEach((X)=>{X(J)})})}resumePausedMutations(){let J=this.getAll().filter((X)=>X.state.isPaused);return n1.batch(()=>Promise.all(J.map((X)=>X.continue().catch(vw))))}};function nQ(J){return J.options.scope?.id}var lD=class extends n8{constructor(J={}){super();this.config=J,this.#w=new Map}#w;build(J,X,Y){let W=X.queryKey,K=X.queryHash??eX(W,X),U=this.get(K);if(!U)U=new fD({client:J,queryKey:W,queryHash:K,options:J.defaultQueryOptions(X),state:Y,defaultOptions:J.getQueryDefaults(W)}),this.add(U);return U}add(J){if(!this.#w.has(J.queryHash))this.#w.set(J.queryHash,J),this.notify({type:"added",query:J})}remove(J){let X=this.#w.get(J.queryHash);if(X){if(J.destroy(),X===J)this.#w.delete(J.queryHash);this.notify({type:"removed",query:J})}}clear(){n1.batch(()=>{this.getAll().forEach((J)=>{this.remove(J)})})}get(J){return this.#w.get(J)}getAll(){return[...this.#w.values()]}find(J){let X={exact:!0,...J};return this.getAll().find((Y)=>cQ(X,Y))}findAll(J={}){let X=this.getAll();return Object.keys(J).length>0?X.filter((Y)=>cQ(J,Y)):X}notify(J){n1.batch(()=>{this.listeners.forEach((X)=>{X(J)})})}onFocus(){n1.batch(()=>{this.getAll().forEach((J)=>{J.onFocus()})})}onOnline(){n1.batch(()=>{this.getAll().forEach((J)=>{J.onOnline()})})}};var uq=class{#w;#z;#Z;#X;#J;#G;#Y;#$;constructor(J={}){this.#w=J.queryCache||new lD,this.#z=J.mutationCache||new cD,this.#Z=J.defaultOptions||{},this.#X=new Map,this.#J=new Map,this.#G=0}mount(){if(this.#G++,this.#G!==1)return;this.#Y=KZ.subscribe(async(J)=>{if(J)await this.resumePausedMutations(),this.#w.onFocus()}),this.#$=UZ.subscribe(async(J)=>{if(J)await this.resumePausedMutations(),this.#w.onOnline()})}unmount(){if(this.#G--,this.#G!==0)return;this.#Y?.(),this.#Y=void 0,this.#$?.(),this.#$=void 0}isFetching(J){return this.#w.findAll({...J,fetchStatus:"fetching"}).length}isMutating(J){return this.#z.findAll({...J,status:"pending"}).length}getQueryData(J){let X=this.defaultQueryOptions({queryKey:J});return this.#w.get(X.queryHash)?.state.data}ensureQueryData(J){let X=this.defaultQueryOptions(J),Y=this.#w.build(this,X),W=Y.state.data;if(W===void 0)return this.fetchQuery(J);if(J.revalidateIfStale&&Y.isStaleByTime(G8(X.staleTime,Y)))this.prefetchQuery(X);return Promise.resolve(W)}getQueriesData(J){return this.#w.findAll(J).map(({queryKey:X,state:Y})=>{let W=Y.data;return[X,W]})}setQueryData(J,X,Y){let W=this.defaultQueryOptions({queryKey:J}),U=this.#w.get(W.queryHash)?.state.data,q=ID(X,U);if(q===void 0)return;return this.#w.build(this,W).setData(q,{...Y,manual:!0})}setQueriesData(J,X,Y){return n1.batch(()=>this.#w.findAll(J).map(({queryKey:W})=>[W,this.setQueryData(W,X,Y)]))}getQueryState(J){let X=this.defaultQueryOptions({queryKey:J});return this.#w.get(X.queryHash)?.state}removeQueries(J){let X=this.#w;n1.batch(()=>{X.findAll(J).forEach((Y)=>{X.remove(Y)})})}resetQueries(J,X){let Y=this.#w;return n1.batch(()=>{return Y.findAll(J).forEach((W)=>{W.reset()}),this.refetchQueries({type:"active",...J},X)})}cancelQueries(J,X={}){let Y={revert:!0,...X},W=n1.batch(()=>this.#w.findAll(J).map((K)=>K.cancel(Y)));return Promise.all(W).then(vw).catch(vw)}invalidateQueries(J,X={}){return n1.batch(()=>{if(this.#w.findAll(J).forEach((Y)=>{Y.invalidate()}),J?.refetchType==="none")return Promise.resolve();return this.refetchQueries({...J,type:J?.refetchType??J?.type??"active"},X)})}refetchQueries(J,X={}){let Y={...X,cancelRefetch:X.cancelRefetch??!0},W=n1.batch(()=>this.#w.findAll(J).filter((K)=>!K.isDisabled()&&!K.isStatic()).map((K)=>{let U=K.fetch(void 0,Y);if(!Y.throwOnError)U=U.catch(vw);return K.state.fetchStatus==="paused"?Promise.resolve():U}));return Promise.all(W).then(vw)}fetchQuery(J){let X=this.defaultQueryOptions(J);if(X.retry===void 0)X.retry=!1;let Y=this.#w.build(this,X);return Y.isStaleByTime(G8(X.staleTime,Y))?Y.fetch(X):Promise.resolve(Y.state.data)}prefetchQuery(J){return this.fetchQuery(J).then(vw).catch(vw)}fetchInfiniteQuery(J){return J.behavior=dq(J.pages),this.fetchQuery(J)}prefetchInfiniteQuery(J){return this.fetchInfiniteQuery(J).then(vw).catch(vw)}ensureInfiniteQueryData(J){return J.behavior=dq(J.pages),this.ensureQueryData(J)}resumePausedMutations(){if(UZ.isOnline())return this.#z.resumePausedMutations();return Promise.resolve()}getQueryCache(){return this.#w}getMutationCache(){return this.#z}getDefaultOptions(){return this.#Z}setDefaultOptions(J){this.#Z=J}setQueryDefaults(J,X){this.#X.set(X9(J),{queryKey:J,defaultOptions:X})}getQueryDefaults(J){let X=[...this.#X.values()],Y={};return X.forEach((W)=>{if(Y9(J,W.queryKey))Object.assign(Y,W.defaultOptions)}),Y}setMutationDefaults(J,X){this.#J.set(X9(J),{mutationKey:J,defaultOptions:X})}getMutationDefaults(J){let X=[...this.#J.values()],Y={};return X.forEach((W)=>{if(Y9(J,W.mutationKey))Object.assign(Y,W.defaultOptions)}),Y}defaultQueryOptions(J){if(J._defaulted)return J;let X={...this.#Z.queries,...this.getQueryDefaults(J.queryKey),...J,_defaulted:!0};if(!X.queryHash)X.queryHash=eX(X.queryKey,X);if(X.refetchOnReconnect===void 0)X.refetchOnReconnect=X.networkMode!=="always";if(X.throwOnError===void 0)X.throwOnError=!!X.suspense;if(!X.networkMode&&X.persister)X.networkMode="offlineFirst";if(X.queryFn===$9)X.enabled=!1;return X}defaultMutationOptions(J){if(J?._defaulted)return J;return{...this.#Z.mutations,...J?.mutationKey&&this.getMutationDefaults(J.mutationKey),...J,_defaulted:!0}}clear(){this.#w.clear(),this.#z.clear()}};var HZ=c(G0(),1),iD=c(x1(),1),pq=HZ.createContext(void 0),cq=(J)=>{let X=HZ.useContext(pq);if(J)return J;if(!X)throw Error("No QueryClient set, use QueryClientProvider to set one");return X},lq=({client:J,children:X})=>{return HZ.useEffect(()=>{return J.mount(),()=>{J.unmount()}},[J]),iD.jsx(pq.Provider,{value:J,children:X})};var tQ=c(G0(),1),rD=tQ.createContext(!1),aD=()=>tQ.useContext(rD),P20=rD.Provider;var Z$=c(G0(),1),qC=c(x1(),1);function BC(){let J=!1;return{clearReset:()=>{J=!1},reset:()=>{J=!0},isReset:()=>{return J}}}var LC=Z$.createContext(BC()),sD=()=>Z$.useContext(LC);var oD=c(G0(),1);var nD=(J,X)=>{if(J.suspense||J.throwOnError||J.experimental_prefetchInRender){if(!X.isReset())J.retryOnMount=!1}},tD=(J)=>{oD.useEffect(()=>{J.clearReset()},[J])},eD=({result:J,errorResetBoundary:X,throwOnError:Y,query:W,suspense:K})=>{return J.isError&&!X.isReset()&&!J.isFetching&&W&&(K&&J.data===void 0||Cq(Y,[J.error,W]))};var wT=(J)=>{if(J.suspense){let Y=(K)=>K==="static"?K:Math.max(K??1000,1000),W=J.staleTime;if(J.staleTime=typeof W==="function"?(...K)=>Y(W(...K)):Y(W),typeof J.gcTime==="number")J.gcTime=Math.max(J.gcTime,1000)}},zT=(J,X)=>J.isLoading&&J.isFetching&&!X,ZT=(J,X)=>J?.suspense&&X.isPending,iq=(J,X,Y)=>X.fetchOptimistic(J).catch(()=>{Y.clearReset()});var p4=c(G0(),1);function JT(J,X,Y){if(typeof J!=="object"||Array.isArray(J))throw Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');let W=aD(),K=sD(),U=cq(Y),q=U.defaultQueryOptions(J);if(U.getDefaultOptions().queries?._experimental_beforeQuery?.(q),!q.queryFn)console.error(`[${q.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`);q._optimisticResults=W?"isRestoring":"optimistic",wT(q),nD(q,K),tD(K);let _=!U.getQueryCache().get(q.queryHash),[L]=p4.useState(()=>new X(U,q)),F=L.getOptimisticResult(q),N=!W&&J.subscribed!==!1;if(p4.useSyncExternalStore(p4.useCallback((V)=>{let k=N?L.subscribe(n1.batchCalls(V)):vw;return L.updateResult(),k},[L,N]),()=>L.getCurrentResult(),()=>L.getCurrentResult()),p4.useEffect(()=>{L.setOptions(q)},[q,L]),ZT(q,F))throw iq(q,L,K);if(eD({result:F,errorResetBoundary:K,throwOnError:q.throwOnError,query:U.getQueryCache().get(q.queryHash),suspense:q.suspense}))throw F.error;if(U.getDefaultOptions().queries?._experimental_afterQuery?.(q,F),q.experimental_prefetchInRender&&!I2&&zT(F,W))(_?iq(q,L,K):U.getQueryCache().get(q.queryHash)?.promise)?.catch(vw).finally(()=>{L.updateResult()});return!q.notifyOnChangeProps?L.trackResult(F):F}function rq(J,X){return JT(J,fq,X)}var XT=new uq;async function $T(){return fetch("/api/stories").then((J)=>J.json())}function YT(J){var X,Y,W="";if(typeof J=="string"||typeof J=="number")W+=J;else if(typeof J=="object")if(Array.isArray(J)){var K=J.length;for(X=0;X<K;X++)J[X]&&(Y=YT(J[X]))&&(W&&(W+=" "),W+=Y)}else for(Y in J)J[Y]&&(W&&(W+=" "),W+=Y);return W}function eQ(){for(var J,X,Y=0,W="",K=arguments.length;Y<K;Y++)(J=arguments[Y])&&(X=YT(J))&&(W&&(W+=" "),W+=X);return W}var GT=(J)=>typeof J==="boolean"?`${J}`:J===0?"0":J,QT=eQ,wW=(J,X)=>(Y)=>{var W;if((X===null||X===void 0?void 0:X.variants)==null)return QT(J,Y===null||Y===void 0?void 0:Y.class,Y===null||Y===void 0?void 0:Y.className);let{variants:K,defaultVariants:U}=X,q=Object.keys(K).map((F)=>{let N=Y===null||Y===void 0?void 0:Y[F],V=U===null||U===void 0?void 0:U[F];if(N===null)return null;let k=GT(N)||GT(V);return K[F][k]}),_=Y&&Object.entries(Y).reduce((F,N)=>{let[V,k]=N;if(k===void 0)return F;return F[V]=k,F},{}),L=X===null||X===void 0?void 0:(W=X.compoundVariants)===null||W===void 0?void 0:W.reduce((F,N)=>{let{class:V,className:k,...A}=N;return Object.entries(A).every((D)=>{let[M,h]=D;return Array.isArray(h)?h.includes({...U,..._}[M]):{...U,..._}[M]===h})?[...F,V,k]:F},[]);return QT(J,q,L,Y===null||Y===void 0?void 0:Y.class,Y===null||Y===void 0?void 0:Y.className)};var VC=(J,X)=>{let Y=Array(J.length+X.length);for(let W=0;W<J.length;W++)Y[W]=J[W];for(let W=0;W<X.length;W++)Y[J.length+W]=X[W];return Y},FC=(J,X)=>({classGroupId:J,validator:X}),_T=(J=new Map,X=null,Y)=>({nextPart:J,validators:X,classGroupId:Y});var WT=[];var NC=(J)=>{let X=AC(J),{conflictingClassGroups:Y,conflictingClassGroupModifiers:W}=J;return{getClassGroupId:(q)=>{if(q.startsWith("[")&&q.endsWith("]"))return kC(q);let _=q.split("-"),L=_[0]===""&&_.length>1?1:0;return qT(_,L,X)},getConflictingClassGroupIds:(q,_)=>{if(_){let L=W[q],F=Y[q];if(L){if(F)return VC(F,L);return L}return F||WT}return Y[q]||WT}}},qT=(J,X,Y)=>{if(J.length-X===0)return Y.classGroupId;let K=J[X],U=Y.nextPart.get(K);if(U){let F=qT(J,X+1,U);if(F)return F}let q=Y.validators;if(q===null)return;let _=X===0?J.join("-"):J.slice(X).join("-"),L=q.length;for(let F=0;F<L;F++){let N=q[F];if(N.validator(_))return N.classGroupId}return},kC=(J)=>J.slice(1,-1).indexOf(":")===-1?void 0:(()=>{let X=J.slice(1,-1),Y=X.indexOf(":"),W=X.slice(0,Y);return W?"arbitrary.."+W:void 0})(),AC=(J)=>{let{theme:X,classGroups:Y}=J;return jC(Y,X)},jC=(J,X)=>{let Y=_T();for(let W in J){let K=J[W];oq(K,Y,W,X)}return Y},oq=(J,X,Y,W)=>{let K=J.length;for(let U=0;U<K;U++){let q=J[U];MC(q,X,Y,W)}},MC=(J,X,Y,W)=>{if(typeof J==="string"){OC(J,X,Y);return}if(typeof J==="function"){DC(J,X,Y,W);return}TC(J,X,Y,W)},OC=(J,X,Y)=>{let W=J===""?X:BT(X,J);W.classGroupId=Y},DC=(J,X,Y,W)=>{if(xC(J)){oq(J(W),X,Y,W);return}if(X.validators===null)X.validators=[];X.validators.push(FC(Y,J))},TC=(J,X,Y,W)=>{let K=Object.entries(J),U=K.length;for(let q=0;q<U;q++){let[_,L]=K[q];oq(L,BT(X,_),Y,W)}},BT=(J,X)=>{let Y=J,W=X.split("-"),K=W.length;for(let U=0;U<K;U++){let q=W[U],_=Y.nextPart.get(q);if(!_)_=_T(),Y.nextPart.set(q,_);Y=_}return Y},xC=(J)=>("isThemeGetter"in J)&&J.isThemeGetter===!0,vC=(J)=>{if(J<1)return{get:()=>{return},set:()=>{}};let X=0,Y=Object.create(null),W=Object.create(null),K=(U,q)=>{if(Y[U]=q,X++,X>J)X=0,W=Y,Y=Object.create(null)};return{get(U){let q=Y[U];if(q!==void 0)return q;if((q=W[U])!==void 0)return K(U,q),q},set(U,q){if(U in Y)Y[U]=q;else K(U,q)}}};var hC=[],KT=(J,X,Y,W,K)=>({modifiers:J,hasImportantModifier:X,baseClassName:Y,maybePostfixModifierPosition:W,isExternal:K}),EC=(J)=>{let{prefix:X,experimentalParseClassName:Y}=J,W=(K)=>{let U=[],q=0,_=0,L=0,F,N=K.length;for(let M=0;M<N;M++){let h=K[M];if(q===0&&_===0){if(h===":"){U.push(K.slice(L,M)),L=M+1;continue}if(h==="/"){F=M;continue}}if(h==="[")q++;else if(h==="]")q--;else if(h==="(")_++;else if(h===")")_--}let V=U.length===0?K:K.slice(L),k=V,A=!1;if(V.endsWith("!"))k=V.slice(0,-1),A=!0;else if(V.startsWith("!"))k=V.slice(1),A=!0;let D=F&&F>L?F-L:void 0;return KT(U,A,k,D)};if(X){let K=X+":",U=W;W=(q)=>q.startsWith(K)?U(q.slice(K.length)):KT(hC,!1,q,void 0,!0)}if(Y){let K=W;W=(U)=>Y({className:U,parseClassName:K})}return W},PC=(J)=>{let X=new Map;return J.orderSensitiveModifiers.forEach((Y,W)=>{X.set(Y,1e6+W)}),(Y)=>{let W=[],K=[];for(let U=0;U<Y.length;U++){let q=Y[U],_=q[0]==="[",L=X.has(q);if(_||L){if(K.length>0)K.sort(),W.push(...K),K=[];W.push(q)}else K.push(q)}if(K.length>0)K.sort(),W.push(...K);return W}},IC=(J)=>({cache:vC(J.cacheSize),parseClassName:EC(J),sortModifiers:PC(J),...NC(J)}),bC=/\s+/,SC=(J,X)=>{let{parseClassName:Y,getClassGroupId:W,getConflictingClassGroupIds:K,sortModifiers:U}=X,q=[],_=J.trim().split(bC),L="";for(let F=_.length-1;F>=0;F-=1){let N=_[F],{isExternal:V,modifiers:k,hasImportantModifier:A,baseClassName:D,maybePostfixModifierPosition:M}=Y(N);if(V){L=N+(L.length>0?" "+L:L);continue}let h=!!M,v=W(h?D.substring(0,M):D);if(!v){if(!h){L=N+(L.length>0?" "+L:L);continue}if(v=W(D),!v){L=N+(L.length>0?" "+L:L);continue}h=!1}let x=k.length===0?"":k.length===1?k[0]:U(k).join(":"),I=A?x+"!":x,b=I+v;if(q.indexOf(b)>-1)continue;q.push(b);let E=K(v,h);for(let m=0;m<E.length;++m){let R=E[m];q.push(I+R)}L=N+(L.length>0?" "+L:L)}return L},CC=(...J)=>{let X=0,Y,W,K="";while(X<J.length)if(Y=J[X++]){if(W=LT(Y))K&&(K+=" "),K+=W}return K},LT=(J)=>{if(typeof J==="string")return J;let X,Y="";for(let W=0;W<J.length;W++)if(J[W]){if(X=LT(J[W]))Y&&(Y+=" "),Y+=X}return Y},yC=(J,...X)=>{let Y,W,K,U,q=(L)=>{let F=X.reduce((N,V)=>V(N),J());return Y=IC(F),W=Y.cache.get,K=Y.cache.set,U=_,_(L)},_=(L)=>{let F=W(L);if(F)return F;let N=SC(L,Y);return K(L,N),N};return U=q,(...L)=>U(CC(...L))},RC=[],yw=(J)=>{let X=(Y)=>Y[J]||RC;return X.isThemeGetter=!0,X},VT=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,FT=/^\((?:(\w[\w-]*):)?(.+)\)$/i,gC=/^\d+\/\d+$/,fC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,mC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,dC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,uC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_Z=(J)=>gC.test(J),V1=(J)=>!!J&&!Number.isNaN(Number(J)),c4=(J)=>!!J&&Number.isInteger(Number(J)),aq=(J)=>J.endsWith("%")&&V1(J.slice(0,-1)),g6=(J)=>fC.test(J),cC=()=>!0,lC=(J)=>mC.test(J)&&!dC.test(J),NT=()=>!1,iC=(J)=>uC.test(J),rC=(J)=>pC.test(J),aC=(J)=>!g0(J)&&!f0(J),sC=(J)=>qZ(J,jT,NT),g0=(J)=>VT.test(J),G9=(J)=>qZ(J,MT,lC),sq=(J)=>qZ(J,wy,V1),UT=(J)=>qZ(J,kT,NT),oC=(J)=>qZ(J,AT,rC),zW=(J)=>qZ(J,OT,iC),f0=(J)=>FT.test(J),J$=(J)=>BZ(J,MT),nC=(J)=>BZ(J,zy),HT=(J)=>BZ(J,kT),tC=(J)=>BZ(J,jT),eC=(J)=>BZ(J,AT),ZW=(J)=>BZ(J,OT,!0),qZ=(J,X,Y)=>{let W=VT.exec(J);if(W){if(W[1])return X(W[1]);return Y(W[2])}return!1},BZ=(J,X,Y=!1)=>{let W=FT.exec(J);if(W){if(W[1])return X(W[1]);return Y}return!1},kT=(J)=>J==="position"||J==="percentage",AT=(J)=>J==="image"||J==="url",jT=(J)=>J==="length"||J==="size"||J==="bg-size",MT=(J)=>J==="length",wy=(J)=>J==="number",zy=(J)=>J==="family-name",OT=(J)=>J==="shadow";var Zy=()=>{let J=yw("color"),X=yw("font"),Y=yw("text"),W=yw("font-weight"),K=yw("tracking"),U=yw("leading"),q=yw("breakpoint"),_=yw("container"),L=yw("spacing"),F=yw("radius"),N=yw("shadow"),V=yw("inset-shadow"),k=yw("text-shadow"),A=yw("drop-shadow"),D=yw("blur"),M=yw("perspective"),h=yw("aspect"),v=yw("ease"),x=yw("animate"),I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...b(),f0,g0],m=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],S=()=>[f0,g0,L],p=()=>[_Z,"full","auto",...S()],d=()=>[c4,"none","subgrid",f0,g0],w0=()=>["auto",{span:["full",c4,f0,g0]},c4,f0,g0],t=()=>[c4,"auto",f0,g0],u=()=>["auto","min","max","fr",f0,g0],Q0=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],r=()=>["start","end","center","stretch","center-safe","end-safe"],e=()=>["auto",...S()],o=()=>[_Z,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],g=()=>[J,f0,g0],X0=()=>[...b(),HT,UT,{position:[f0,g0]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z0=()=>["auto","cover","contain",tC,sC,{size:[f0,g0]}],U0=()=>[aq,J$,G9],J0=()=>["","none","full",F,f0,g0],L0=()=>["",V1,J$,G9],S0=()=>["solid","dashed","dotted","double"],V0=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H0=()=>[V1,aq,HT,UT],j0=()=>["","none",D,f0,g0],r0=()=>["none",V1,f0,g0],n0=()=>["none",V1,f0,g0],n=()=>[V1,f0,g0],R0=()=>[_Z,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[g6],breakpoint:[g6],color:[cC],container:[g6],"drop-shadow":[g6],ease:["in","out","in-out"],font:[aC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[g6],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[g6],shadow:[g6],spacing:["px",V1],text:[g6],"text-shadow":[g6],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_Z,g0,f0,h]}],container:["container"],columns:[{columns:[V1,g0,f0,_]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:m()}],"overflow-x":[{"overflow-x":m()}],"overflow-y":[{"overflow-y":m()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:p()}],"inset-x":[{"inset-x":p()}],"inset-y":[{"inset-y":p()}],start:[{start:p()}],end:[{end:p()}],top:[{top:p()}],right:[{right:p()}],bottom:[{bottom:p()}],left:[{left:p()}],visibility:["visible","invisible","collapse"],z:[{z:[c4,"auto",f0,g0]}],basis:[{basis:[_Z,"full","auto",_,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[V1,_Z,"auto","initial","none",g0]}],grow:[{grow:["",V1,f0,g0]}],shrink:[{shrink:["",V1,f0,g0]}],order:[{order:[c4,"first","last","none",f0,g0]}],"grid-cols":[{"grid-cols":d()}],"col-start-end":[{col:w0()}],"col-start":[{"col-start":t()}],"col-end":[{"col-end":t()}],"grid-rows":[{"grid-rows":d()}],"row-start-end":[{row:w0()}],"row-start":[{"row-start":t()}],"row-end":[{"row-end":t()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":u()}],"auto-rows":[{"auto-rows":u()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...Q0(),"normal"]}],"justify-items":[{"justify-items":[...r(),"normal"]}],"justify-self":[{"justify-self":["auto",...r()]}],"align-content":[{content:["normal",...Q0()]}],"align-items":[{items:[...r(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...r(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q0()}],"place-items":[{"place-items":[...r(),"baseline"]}],"place-self":[{"place-self":["auto",...r()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:e()}],mx:[{mx:e()}],my:[{my:e()}],ms:[{ms:e()}],me:[{me:e()}],mt:[{mt:e()}],mr:[{mr:e()}],mb:[{mb:e()}],ml:[{ml:e()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:o()}],w:[{w:[_,"screen",...o()]}],"min-w":[{"min-w":[_,"screen","none",...o()]}],"max-w":[{"max-w":[_,"screen","none","prose",{screen:[q]},...o()]}],h:[{h:["screen","lh",...o()]}],"min-h":[{"min-h":["screen","lh","none",...o()]}],"max-h":[{"max-h":["screen","lh",...o()]}],"font-size":[{text:["base",Y,J$,G9]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[W,f0,sq]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",aq,g0]}],"font-family":[{font:[nC,g0,X]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[K,f0,g0]}],"line-clamp":[{"line-clamp":[V1,"none",f0,sq]}],leading:[{leading:[U,...S()]}],"list-image":[{"list-image":["none",f0,g0]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",f0,g0]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:g()}],"text-color":[{text:g()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...S0(),"wavy"]}],"text-decoration-thickness":[{decoration:[V1,"from-font","auto",f0,G9]}],"text-decoration-color":[{decoration:g()}],"underline-offset":[{"underline-offset":[V1,"auto",f0,g0]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",f0,g0]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",f0,g0]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:X0()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:z0()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},c4,f0,g0],radial:["",f0,g0],conic:[c4,f0,g0]},eC,oC]}],"bg-color":[{bg:g()}],"gradient-from-pos":[{from:U0()}],"gradient-via-pos":[{via:U0()}],"gradient-to-pos":[{to:U0()}],"gradient-from":[{from:g()}],"gradient-via":[{via:g()}],"gradient-to":[{to:g()}],rounded:[{rounded:J0()}],"rounded-s":[{"rounded-s":J0()}],"rounded-e":[{"rounded-e":J0()}],"rounded-t":[{"rounded-t":J0()}],"rounded-r":[{"rounded-r":J0()}],"rounded-b":[{"rounded-b":J0()}],"rounded-l":[{"rounded-l":J0()}],"rounded-ss":[{"rounded-ss":J0()}],"rounded-se":[{"rounded-se":J0()}],"rounded-ee":[{"rounded-ee":J0()}],"rounded-es":[{"rounded-es":J0()}],"rounded-tl":[{"rounded-tl":J0()}],"rounded-tr":[{"rounded-tr":J0()}],"rounded-br":[{"rounded-br":J0()}],"rounded-bl":[{"rounded-bl":J0()}],"border-w":[{border:L0()}],"border-w-x":[{"border-x":L0()}],"border-w-y":[{"border-y":L0()}],"border-w-s":[{"border-s":L0()}],"border-w-e":[{"border-e":L0()}],"border-w-t":[{"border-t":L0()}],"border-w-r":[{"border-r":L0()}],"border-w-b":[{"border-b":L0()}],"border-w-l":[{"border-l":L0()}],"divide-x":[{"divide-x":L0()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":L0()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...S0(),"hidden","none"]}],"divide-style":[{divide:[...S0(),"hidden","none"]}],"border-color":[{border:g()}],"border-color-x":[{"border-x":g()}],"border-color-y":[{"border-y":g()}],"border-color-s":[{"border-s":g()}],"border-color-e":[{"border-e":g()}],"border-color-t":[{"border-t":g()}],"border-color-r":[{"border-r":g()}],"border-color-b":[{"border-b":g()}],"border-color-l":[{"border-l":g()}],"divide-color":[{divide:g()}],"outline-style":[{outline:[...S0(),"none","hidden"]}],"outline-offset":[{"outline-offset":[V1,f0,g0]}],"outline-w":[{outline:["",V1,J$,G9]}],"outline-color":[{outline:g()}],shadow:[{shadow:["","none",N,ZW,zW]}],"shadow-color":[{shadow:g()}],"inset-shadow":[{"inset-shadow":["none",V,ZW,zW]}],"inset-shadow-color":[{"inset-shadow":g()}],"ring-w":[{ring:L0()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:g()}],"ring-offset-w":[{"ring-offset":[V1,G9]}],"ring-offset-color":[{"ring-offset":g()}],"inset-ring-w":[{"inset-ring":L0()}],"inset-ring-color":[{"inset-ring":g()}],"text-shadow":[{"text-shadow":["none",k,ZW,zW]}],"text-shadow-color":[{"text-shadow":g()}],opacity:[{opacity:[V1,f0,g0]}],"mix-blend":[{"mix-blend":[...V0(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":V0()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[V1]}],"mask-image-linear-from-pos":[{"mask-linear-from":H0()}],"mask-image-linear-to-pos":[{"mask-linear-to":H0()}],"mask-image-linear-from-color":[{"mask-linear-from":g()}],"mask-image-linear-to-color":[{"mask-linear-to":g()}],"mask-image-t-from-pos":[{"mask-t-from":H0()}],"mask-image-t-to-pos":[{"mask-t-to":H0()}],"mask-image-t-from-color":[{"mask-t-from":g()}],"mask-image-t-to-color":[{"mask-t-to":g()}],"mask-image-r-from-pos":[{"mask-r-from":H0()}],"mask-image-r-to-pos":[{"mask-r-to":H0()}],"mask-image-r-from-color":[{"mask-r-from":g()}],"mask-image-r-to-color":[{"mask-r-to":g()}],"mask-image-b-from-pos":[{"mask-b-from":H0()}],"mask-image-b-to-pos":[{"mask-b-to":H0()}],"mask-image-b-from-color":[{"mask-b-from":g()}],"mask-image-b-to-color":[{"mask-b-to":g()}],"mask-image-l-from-pos":[{"mask-l-from":H0()}],"mask-image-l-to-pos":[{"mask-l-to":H0()}],"mask-image-l-from-color":[{"mask-l-from":g()}],"mask-image-l-to-color":[{"mask-l-to":g()}],"mask-image-x-from-pos":[{"mask-x-from":H0()}],"mask-image-x-to-pos":[{"mask-x-to":H0()}],"mask-image-x-from-color":[{"mask-x-from":g()}],"mask-image-x-to-color":[{"mask-x-to":g()}],"mask-image-y-from-pos":[{"mask-y-from":H0()}],"mask-image-y-to-pos":[{"mask-y-to":H0()}],"mask-image-y-from-color":[{"mask-y-from":g()}],"mask-image-y-to-color":[{"mask-y-to":g()}],"mask-image-radial":[{"mask-radial":[f0,g0]}],"mask-image-radial-from-pos":[{"mask-radial-from":H0()}],"mask-image-radial-to-pos":[{"mask-radial-to":H0()}],"mask-image-radial-from-color":[{"mask-radial-from":g()}],"mask-image-radial-to-color":[{"mask-radial-to":g()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[V1]}],"mask-image-conic-from-pos":[{"mask-conic-from":H0()}],"mask-image-conic-to-pos":[{"mask-conic-to":H0()}],"mask-image-conic-from-color":[{"mask-conic-from":g()}],"mask-image-conic-to-color":[{"mask-conic-to":g()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:X0()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:z0()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",f0,g0]}],filter:[{filter:["","none",f0,g0]}],blur:[{blur:j0()}],brightness:[{brightness:[V1,f0,g0]}],contrast:[{contrast:[V1,f0,g0]}],"drop-shadow":[{"drop-shadow":["","none",A,ZW,zW]}],"drop-shadow-color":[{"drop-shadow":g()}],grayscale:[{grayscale:["",V1,f0,g0]}],"hue-rotate":[{"hue-rotate":[V1,f0,g0]}],invert:[{invert:["",V1,f0,g0]}],saturate:[{saturate:[V1,f0,g0]}],sepia:[{sepia:["",V1,f0,g0]}],"backdrop-filter":[{"backdrop-filter":["","none",f0,g0]}],"backdrop-blur":[{"backdrop-blur":j0()}],"backdrop-brightness":[{"backdrop-brightness":[V1,f0,g0]}],"backdrop-contrast":[{"backdrop-contrast":[V1,f0,g0]}],"backdrop-grayscale":[{"backdrop-grayscale":["",V1,f0,g0]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[V1,f0,g0]}],"backdrop-invert":[{"backdrop-invert":["",V1,f0,g0]}],"backdrop-opacity":[{"backdrop-opacity":[V1,f0,g0]}],"backdrop-saturate":[{"backdrop-saturate":[V1,f0,g0]}],"backdrop-sepia":[{"backdrop-sepia":["",V1,f0,g0]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",f0,g0]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[V1,"initial",f0,g0]}],ease:[{ease:["linear","initial",v,f0,g0]}],delay:[{delay:[V1,f0,g0]}],animate:[{animate:["none",x,f0,g0]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[M,f0,g0]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:r0()}],"rotate-x":[{"rotate-x":r0()}],"rotate-y":[{"rotate-y":r0()}],"rotate-z":[{"rotate-z":r0()}],scale:[{scale:n0()}],"scale-x":[{"scale-x":n0()}],"scale-y":[{"scale-y":n0()}],"scale-z":[{"scale-z":n0()}],"scale-3d":["scale-3d"],skew:[{skew:n()}],"skew-x":[{"skew-x":n()}],"skew-y":[{"skew-y":n()}],transform:[{transform:[f0,g0,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:R0()}],"translate-x":[{"translate-x":R0()}],"translate-y":[{"translate-y":R0()}],"translate-z":[{"translate-z":R0()}],"translate-none":["translate-none"],accent:[{accent:g()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:g()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",f0,g0]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",f0,g0]}],fill:[{fill:["none",...g()]}],"stroke-w":[{stroke:[V1,J$,G9,sq]}],stroke:[{stroke:["none",...g()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}};var DT=yC(Zy);function h1(...J){return DT(eQ(J))}var TT=c(E1(),1),Xy=wW("focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-xs/relaxed font-medium focus-visible:ring-2 aria-invalid:ring-2 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border dark:bg-input/20 dark:bg-input/30 hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",sm:"h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",lg:"h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",icon:"size-7 [&_svg:not([class*='size-'])]:size-3.5","icon-xs":"size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5","icon-sm":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-lg":"size-8 [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default",size:"default"}});function f6({className:J,variant:X="default",size:Y="default",...W}){return TT.jsxDEV(dG,{"data-slot":"button",className:h1(Xy({variant:X,size:Y,className:J})),...W},void 0,!1,void 0,this)}var vT=c(E1(),1);function xT({className:J,...X}){return vT.jsxDEV("kbd",{"data-slot":"kbd",className:h1("bg-muted text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-xs px-1 font-sans text-[0.625rem] font-medium [&_svg:not([class*='size-'])]:size-3 pointer-events-none inline-flex items-center justify-center select-none",J),...X},void 0,!1,void 0,this)}var XW=c(G0(),1);var hT=(J)=>J.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$y=(J)=>J.replace(/^([A-Z])|[\s-_]+(\w)/g,(X,Y,W)=>W?W.toUpperCase():Y.toLowerCase()),nq=(J)=>{let X=$y(J);return X.charAt(0).toUpperCase()+X.slice(1)},JW=(...J)=>J.filter((X,Y,W)=>{return Boolean(X)&&X.trim()!==""&&W.indexOf(X)===Y}).join(" ").trim(),ET=(J)=>{for(let X in J)if(X.startsWith("aria-")||X==="role"||X==="title")return!0};var X$=c(G0(),1);var PT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var IT=X$.forwardRef(({color:J="currentColor",size:X=24,strokeWidth:Y=2,absoluteStrokeWidth:W,className:K="",children:U,iconNode:q,..._},L)=>X$.createElement("svg",{ref:L,...PT,width:X,height:X,stroke:J,strokeWidth:W?Number(Y)*24/Number(X):Y,className:JW("lucide",K),...!U&&!ET(_)&&{"aria-hidden":"true"},..._},[...q.map(([F,N])=>X$.createElement(F,N)),...Array.isArray(U)?U:[U]]));var l4=(J,X)=>{let Y=XW.forwardRef(({className:W,...K},U)=>XW.createElement(IT,{ref:U,iconNode:X,className:JW(`lucide-${hT(nq(J))}`,`lucide-${J}`,W),...K}));return Y.displayName=nq(J),Y};var Yy=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],$$=l4("arrow-left",Yy);var Gy=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Y$=l4("arrow-right",Gy);var Qy=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],i4=l4("loader-circle",Qy);var Wy=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],W9=l4("x",Wy);var C2=c(G0(),1);var $W=c(G0(),1),tq=768;function bT(){let[J,X]=$W.useState(void 0);return $W.useEffect(()=>{let Y=window.matchMedia(`(max-width: ${tq-1}px)`),W=()=>{X(window.innerWidth<tq)};return Y.addEventListener("change",W),X(window.innerWidth<tq),()=>Y.removeEventListener("change",W)},[]),!!J}var Ky=c(E1(),1);var Uy=c(E1(),1);var S2=c(E1(),1);function ST({...J}){return S2.jsxDEV(a8.Root,{"data-slot":"sheet",...J},void 0,!1,void 0,this)}function Hy({...J}){return S2.jsxDEV(a8.Portal,{"data-slot":"sheet-portal",...J},void 0,!1,void 0,this)}function _y({className:J,...X}){return S2.jsxDEV(a8.Backdrop,{"data-slot":"sheet-overlay",className:h1("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/80 duration-100 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-50",J),...X},void 0,!1,void 0,this)}function CT({className:J,children:X,side:Y="right",showCloseButton:W=!0,...K}){return S2.jsxDEV(Hy,{children:[S2.jsxDEV(_y,{},void 0,!1,void 0,this),S2.jsxDEV(a8.Popup,{"data-slot":"sheet-content","data-side":Y,className:h1("bg-background data-open:animate-in data-closed:animate-out data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 fixed z-50 flex flex-col bg-clip-padding text-xs/relaxed shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",J),...K,children:[X,W&&S2.jsxDEV(a8.Close,{"data-slot":"sheet-close",render:S2.jsxDEV(f6,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"},void 0,!1,void 0,this),children:[S2.jsxDEV(W9,{},void 0,!1,void 0,this),S2.jsxDEV("span",{className:"sr-only",children:"Close"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function yT({className:J,...X}){return S2.jsxDEV("div",{"data-slot":"sheet-header",className:h1("gap-1.5 p-6 flex flex-col",J),...X},void 0,!1,void 0,this)}function RT({className:J,...X}){return S2.jsxDEV(a8.Title,{"data-slot":"sheet-title",className:h1("text-foreground text-sm font-medium",J),...X},void 0,!1,void 0,this)}function gT({className:J,...X}){return S2.jsxDEV(a8.Description,{"data-slot":"sheet-description",className:h1("text-muted-foreground text-xs/relaxed",J),...X},void 0,!1,void 0,this)}var qy=c(E1(),1);var m6=c(E1(),1);function By({delay:J=0,...X}){return m6.jsxDEV(o8.Provider,{"data-slot":"tooltip-provider",delay:J,...X},void 0,!1,void 0,this)}function fT({...J}){return m6.jsxDEV(By,{children:m6.jsxDEV(o8.Root,{"data-slot":"tooltip",...J},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function mT({...J}){return m6.jsxDEV(o8.Trigger,{"data-slot":"tooltip-trigger",...J},void 0,!1,void 0,this)}function dT({className:J,side:X="top",sideOffset:Y=4,align:W="center",alignOffset:K=0,children:U,...q}){return m6.jsxDEV(o8.Portal,{children:m6.jsxDEV(o8.Positioner,{align:W,alignOffset:K,side:X,sideOffset:Y,className:"isolate z-50",children:m6.jsxDEV(o8.Popup,{"data-slot":"tooltip-content",className:h1("data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 rounded-md px-3 py-1.5 text-xs **:data-[slot=kbd]:rounded-md bg-foreground text-background z-50 w-fit max-w-xs origin-(--transform-origin)",J),...q,children:[U,m6.jsxDEV(o8.Arrow,{className:"size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground z-50 data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var Bw=c(E1(),1),Ly="sidebar_state",Vy=604800,Fy="16rem",Ny="18rem",ky="3rem",Ay="b",uT=C2.createContext(null);function pT(){let J=C2.useContext(uT);if(!J)throw Error("useSidebar must be used within a SidebarProvider.");return J}function cT({defaultOpen:J=!0,open:X,onOpenChange:Y,className:W,style:K,children:U,...q}){let _=bT(),[L,F]=C2.useState(!1),[N,V]=C2.useState(J),k=X??N,A=C2.useCallback((v)=>{let x=typeof v==="function"?v(k):v;if(Y)Y(x);else V(x);document.cookie=`${Ly}=${x}; path=/; max-age=${Vy}`},[Y,k]),D=C2.useCallback(()=>{return _?F((v)=>!v):A((v)=>!v)},[_,A,F]);C2.useEffect(()=>{let v=(x)=>{if(x.key===Ay&&(x.metaKey||x.ctrlKey))x.preventDefault(),D()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[D]);let M=k?"expanded":"collapsed",h=C2.useMemo(()=>({state:M,open:k,setOpen:A,isMobile:_,openMobile:L,setOpenMobile:F,toggleSidebar:D}),[M,k,A,_,L,F,D]);return Bw.jsxDEV(uT.Provider,{value:h,children:Bw.jsxDEV("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Fy,"--sidebar-width-icon":ky,...K},className:h1("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",W),...q,children:U},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function lT({side:J="left",variant:X="sidebar",collapsible:Y="offExamples",className:W,children:K,...U}){let{isMobile:q,state:_,openMobile:L,setOpenMobile:F}=pT();if(Y==="none")return Bw.jsxDEV("div",{"data-slot":"sidebar",className:h1("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",W),...U,children:K},void 0,!1,void 0,this);if(q)return Bw.jsxDEV(ST,{open:L,onOpenChange:F,...U,children:Bw.jsxDEV(CT,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":Ny},side:J,children:[Bw.jsxDEV(yT,{className:"sr-only",children:[Bw.jsxDEV(RT,{children:"Sidebar"},void 0,!1,void 0,this),Bw.jsxDEV(gT,{children:"Displays the mobile sidebar."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Bw.jsxDEV("div",{className:"flex h-full w-full flex-col",children:K},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);return Bw.jsxDEV("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":_,"data-collapsible":_==="collapsed"?Y:"","data-variant":X,"data-side":J,"data-slot":"sidebar",children:[Bw.jsxDEV("div",{"data-slot":"sidebar-gap",className:h1("transition-[width] duration-200 ease-linear relative w-(--sidebar-width) bg-transparent","group-data-[collapsible=offExamples]:w-0","group-data-[side=right]:rotate-180",X==="floating"||X==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")},void 0,!1,void 0,this),Bw.jsxDEV("div",{"data-slot":"sidebar-container",className:h1("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",J==="left"?"left-0 group-data-[collapsible=offExamples]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offExamples]:right-[calc(var(--sidebar-width)*-1)]",X==="floating"||X==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",W),...U,children:Bw.jsxDEV("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:ring-sidebar-border group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 flex size-full flex-col",children:K},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function iT({className:J,...X}){return Bw.jsxDEV("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:h1("gap-2 p-2 flex flex-col",J),...X},void 0,!1,void 0,this)}function rT({className:J,...X}){return Bw.jsxDEV("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:h1("no-scrollbar gap-0 flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden",J),...X},void 0,!1,void 0,this)}function aT({className:J,...X}){return Bw.jsxDEV("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:h1("px-2 py-1 relative flex w-full min-w-0 flex-col",J),...X},void 0,!1,void 0,this)}function sT({className:J,render:X,...Y}){return bq({defaultTagName:"div",props:D5({className:h1("text-sidebar-foreground/70 ring-sidebar-ring h-8 rounded-md px-2 text-xs transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0",J)},Y),render:X,state:{slot:"sidebar-group-label",sidebar:"group-label"}})}function oT({className:J,...X}){return Bw.jsxDEV("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:h1("text-xs w-full",J),...X},void 0,!1,void 0,this)}function nT({className:J,...X}){return Bw.jsxDEV("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:h1("gap-px flex w-full min-w-0 flex-col",J),...X},void 0,!1,void 0,this)}var jy=wW("ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-[calc(var(--radius-sm)+2px)] p-2 text-left text-xs transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-xs",sm:"h-7 text-xs",lg:"h-12 text-xs group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function tT({render:J,isActive:X=!1,variant:Y="default",size:W="default",tooltip:K,className:U,...q}){let{isMobile:_,state:L}=pT(),F=bq({defaultTagName:"button",props:D5({className:h1(jy({variant:Y,size:W}),U)},q),render:!K?J:mT,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:W,active:X}});if(!K)return F;if(typeof K==="string")K={children:K};return Bw.jsxDEV(fT,{children:[F,Bw.jsxDEV(dT,{side:"right",align:"center",hidden:L!=="collapsed"||_,...K},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var wx=c(E1(),1);function eT({className:J,...X}){return wx.jsxDEV(i4,{role:"status","aria-label":"Loading",className:h1("size-4 animate-spin",J),...X},void 0,!1,void 0,this)}function zx(J){let X=J.getLocation(),Y=new Set,W=(q)=>{X=J.getLocation(),Y.forEach((_)=>_({location:X,action:q}))},K=(q)=>{if(J.notifyOnIndexChange??!0)W(q);else X=J.getLocation()},U=async({task:q,navigateOpts:_,...L})=>{if(_?.ignoreBlocker??!1){q();return}let N=J.getBlockers?.()??[],V=L.type==="PUSH"||L.type==="REPLACE";if(typeof document<"u"&&N.length&&V)for(let k of N){let A=Zx(L.path,L.state);if(await k.blockerFn({currentLocation:X,nextLocation:A,action:L.type})){J.onBlocked?.();return}}q()};return{get location(){return X},get length(){return J.getLength()},subscribers:Y,subscribe:(q)=>{return Y.add(q),()=>{Y.delete(q)}},push:(q,_,L)=>{let F=X.state.__TSR_index;_=eq(F+1,_),U({task:()=>{J.pushState(q,_),W({type:"PUSH"})},navigateOpts:L,type:"PUSH",path:q,state:_})},replace:(q,_,L)=>{let F=X.state.__TSR_index;_=eq(F,_),U({task:()=>{J.replaceState(q,_),W({type:"REPLACE"})},navigateOpts:L,type:"REPLACE",path:q,state:_})},go:(q,_)=>{U({task:()=>{J.go(q),K({type:"GO",index:q})},navigateOpts:_,type:"GO"})},back:(q)=>{U({task:()=>{J.back(q?.ignoreBlocker??!1),K({type:"BACK"})},navigateOpts:q,type:"BACK"})},forward:(q)=>{U({task:()=>{J.forward(q?.ignoreBlocker??!1),K({type:"FORWARD"})},navigateOpts:q,type:"FORWARD"})},canGoBack:()=>X.state.__TSR_index!==0,createHref:(q)=>J.createHref(q),block:(q)=>{if(!J.setBlockers)return()=>{};let _=J.getBlockers?.()??[];return J.setBlockers([..._,q]),()=>{let L=J.getBlockers?.()??[];J.setBlockers?.(L.filter((F)=>F!==q))}},flush:()=>J.flush?.(),destroy:()=>J.destroy?.(),notify:W}}function eq(J,X){if(!X)X={};let Y=Jx();return{...X,key:Y,__TSR_key:Y,["__TSR_index"]:J}}function wB(J={initialEntries:["/"]}){let X=J.initialEntries,Y=J.initialIndex?Math.min(Math.max(J.initialIndex,0),X.length-1):X.length-1,W=X.map((U,q)=>eq(q,void 0));return zx({getLocation:()=>Zx(X[Y],W[Y]),getLength:()=>X.length,pushState:(U,q)=>{if(Y<X.length-1)X.splice(Y+1),W.splice(Y+1);W.push(q),X.push(U),Y=Math.max(X.length-1,0)},replaceState:(U,q)=>{W[Y]=q,X[Y]=U},back:()=>{Y=Math.max(Y-1,0)},forward:()=>{Y=Math.min(Y+1,X.length-1)},go:(U)=>{Y=Math.min(Math.max(Y+U,0),X.length-1)},createHref:(U)=>U})}function Zx(J,X){let Y=J.indexOf("#"),W=J.indexOf("?"),K=Jx();return{href:J,pathname:J.substring(0,Y>0?W>0?Math.min(Y,W):Y:W>0?W:J.length),hash:Y>-1?J.substring(Y):"",search:W>-1?J.slice(W,Y===-1?void 0:Y):"",state:X||{["__TSR_index"]:0,key:K,__TSR_key:K}}}function Jx(){return(Math.random()+1).toString(36).substring(7)}function $x(J){return"init"in J}function zB(J){return!!J.write}function Xx(J){return"v"in J||"e"in J}function YW(J){if("e"in J)throw J.e;if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!("v"in J))throw Error("[Bug] atom state is not initialized");return J.v}var GW=new WeakMap;function Yx(J){var X;return QW(J)&&!!((X=GW.get(J))==null?void 0:X[0])}function My(J){let X=GW.get(J);if(X==null?void 0:X[0])X[0]=!1,X[1].forEach((Y)=>Y())}function WW(J,X){let Y=GW.get(J);if(!Y){Y=[!0,new Set],GW.set(J,Y);let W=()=>{Y[0]=!1};J.then(W,W)}Y[1].add(X)}function QW(J){return typeof(J==null?void 0:J.then)==="function"}function Gx(J,X,Y){if(!Y.p.has(J)){Y.p.add(J);let W=()=>Y.p.delete(J);X.then(W,W)}}function Qx(J,X,Y){var W;let K=new Set;for(let U of((W=Y.get(J))==null?void 0:W.t)||[])K.add(U);for(let U of X.p)K.add(U);return K}var Oy=(J,X,...Y)=>X.read(...Y),Dy=(J,X,...Y)=>X.write(...Y),Ty=(J,X)=>{if(X.INTERNAL_onInit)return X.INTERNAL_onInit(J);if(X.unstable_onInit)return console.warn("[DEPRECATED] atom.unstable_onInit is renamed to atom.INTERNAL_onInit."),X.unstable_onInit(J)},xy=(J,X,Y)=>{var W;return(W=X.onMount)==null?void 0:W.call(X,Y)},vy=(J,X)=>{var Y;let W=G2(J),K=W[0],U=W[6],q=W[9];if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!X)throw Error("Atom is undefined or null");let _=K.get(X);if(!_)_={d:new Map,p:new Set,n:0},K.set(X,_),(Y=U.i)==null||Y.call(U,X),q==null||q(J,X);return _},hy=(J)=>{let X=G2(J),Y=X[1],W=X[3],K=X[4],U=X[5],q=X[6],_=X[13],L=[],F=(N)=>{try{N()}catch(V){L.push(V)}};do{if(q.f)F(q.f);let N=new Set,V=N.add.bind(N);if(W.forEach((k)=>{var A;return(A=Y.get(k))==null?void 0:A.l.forEach(V)}),W.clear(),U.forEach(V),U.clear(),K.forEach(V),K.clear(),N.forEach(F),W.size)_(J)}while(W.size||U.size||K.size);if(L.length)throw AggregateError(L)},Ey=(J)=>{let X=G2(J),Y=X[1],W=X[2],K=X[3],U=X[11],q=X[14],_=X[17],L=[],F=new WeakSet,N=new WeakSet,V=Array.from(K);while(V.length){let k=V[V.length-1],A=U(J,k);if(N.has(k)){V.pop();continue}if(F.has(k)){if(W.get(k)===A.n)L.push([k,A]);else if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&W.has(k))throw Error("[Bug] invalidated atom exists");N.add(k),V.pop();continue}F.add(k);for(let D of Qx(k,A,Y))if(!F.has(D))V.push(D)}for(let k=L.length-1;k>=0;--k){let[A,D]=L[k],M=!1;for(let h of D.d.keys())if(h!==A&&K.has(h)){M=!0;break}if(M)q(J,A),_(J,A);W.delete(A)}},ZB=new WeakSet,Py=(J,X)=>{var Y,W;let K=G2(J),U=K[1],q=K[2],_=K[3],L=K[6],F=K[7],N=K[11],V=K[12],k=K[13],A=K[14],D=K[16],M=K[17],h=K[20],v=N(J,X);if(Xx(v)){if(U.has(X)&&q.get(X)!==v.n)return v;let p=!1;for(let[d,w0]of v.d)if(A(J,d).n!==w0){p=!0;break}if(!p)return v}v.d.clear();let x=!0;function I(){if(U.has(X))M(J,X),k(J),V(J)}function b(p){var d;if(p===X){let t=N(J,p);if(!Xx(t))if($x(p))h(J,p,p.init);else throw Error("no atom init");return YW(t)}let w0=A(J,p);try{return YW(w0)}finally{if(v.d.set(p,w0.n),Yx(v.v))Gx(X,v.v,w0);if(U.has(X))(d=U.get(p))==null||d.t.add(X);if(!x)I()}}let E,m,R={get signal(){if(!E)E=new AbortController;return E.signal},get setSelf(){if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!zB(X))console.warn("setSelf function cannot be used with read-only atom");if(!m&&zB(X))m=(...p)=>{if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&x)console.warn("setSelf function cannot be called in sync");if(!x)try{return D(J,X,...p)}finally{k(J),V(J)}};return m}},S=v.n;try{if((import.meta.env?import.meta.env.MODE:void 0)!=="production")ZB.delete(J);let p=F(J,X,b,R);if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&ZB.has(J))console.warn("Detected store mutation during atom read. This is not supported.");if(h(J,X,p),QW(p))WW(p,()=>E==null?void 0:E.abort()),p.then(I,I);return(Y=L.r)==null||Y.call(L,X),v}catch(p){return delete v.v,v.e=p,++v.n,v}finally{if(x=!1,S!==v.n&&q.get(X)===S)q.set(X,v.n),_.add(X),(W=L.c)==null||W.call(L,X)}},Iy=(J,X)=>{let Y=G2(J),W=Y[1],K=Y[2],U=Y[11],q=[X];while(q.length){let _=q.pop(),L=U(J,_);for(let F of Qx(_,L,W)){let N=U(J,F);K.set(F,N.n),q.push(F)}}},by=(J,X,...Y)=>{let W=G2(J),K=W[3],U=W[6],q=W[8],_=W[11],L=W[12],F=W[13],N=W[14],V=W[15],k=W[16],A=W[17],D=W[20],M=!0,h=(x)=>YW(N(J,x)),v=(x,...I)=>{var b;let E=_(J,x);try{if(x===X){if(!$x(x))throw Error("atom not writable");if((import.meta.env?import.meta.env.MODE:void 0)!=="production")ZB.add(J);let m=E.n,R=I[0];if(D(J,x,R),A(J,x),m!==E.n)K.add(x),V(J,x),(b=U.c)==null||b.call(U,x);return}else return k(J,x,...I)}finally{if(!M)F(J),L(J)}};try{return q(J,X,h,v,...Y)}finally{M=!1}},Sy=(J,X)=>{var Y;let W=G2(J),K=W[1],U=W[3],q=W[6],_=W[11],L=W[15],F=W[18],N=W[19],V=_(J,X),k=K.get(X);if(k&&!Yx(V.v)){for(let[A,D]of V.d)if(!k.d.has(A)){let M=_(J,A);if(F(J,A).t.add(X),k.d.add(A),D!==M.n)U.add(A),L(J,A),(Y=q.c)==null||Y.call(q,A)}for(let A of k.d)if(!V.d.has(A)){k.d.delete(A);let D=N(J,A);D==null||D.t.delete(X)}}},Cy=(J,X)=>{var Y;let W=G2(J),K=W[1],U=W[4],q=W[6],_=W[10],L=W[11],F=W[12],N=W[13],V=W[14],k=W[16],A=W[18],D=L(J,X),M=K.get(X);if(!M){V(J,X);for(let h of D.d.keys())A(J,h).t.add(X);if(M={l:new Set,d:new Set(D.d.keys()),t:new Set},K.set(X,M),zB(X)){let h=()=>{let v=!0,x=(...I)=>{try{return k(J,X,...I)}finally{if(!v)N(J),F(J)}};try{let I=_(J,X,x);if(I)M.u=()=>{v=!0;try{I()}finally{v=!1}}}finally{v=!1}};U.add(h)}(Y=q.m)==null||Y.call(q,X)}return M},yy=(J,X)=>{var Y,W;let K=G2(J),U=K[1],q=K[5],_=K[6],L=K[11],F=K[19],N=L(J,X),V=U.get(X);if(!V||V.l.size)return V;let k=!1;for(let A of V.t)if((Y=U.get(A))==null?void 0:Y.d.has(X)){k=!0;break}if(!k){if(V.u)q.add(V.u);V=void 0,U.delete(X);for(let A of N.d.keys()){let D=F(J,A);D==null||D.t.delete(X)}(W=_.u)==null||W.call(_,X);return}return V},Ry=(J,X,Y)=>{let W=G2(J)[11],K=W(J,X),U="v"in K,q=K.v;if(QW(Y))for(let _ of K.d.keys())Gx(X,Y,W(J,_));if(K.v=Y,delete K.e,!U||!Object.is(q,K.v)){if(++K.n,QW(q))My(q)}},gy=(J,X)=>{let Y=G2(J)[14];return YW(Y(J,X))},fy=(J,X,...Y)=>{let W=G2(J),K=W[12],U=W[13],q=W[16];try{return q(J,X,...Y)}finally{U(J),K(J)}},my=(J,X,Y)=>{let W=G2(J),K=W[12],U=W[18],q=W[19],L=U(J,X).l;return L.add(Y),K(J),()=>{L.delete(Y),q(J,X),K(J)}},Wx=new WeakMap,G2=(J)=>{let X=Wx.get(J);if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!X)throw Error("Store must be created by buildStore to read its building blocks");return X};function Kx(...J){let X={get(W){let K=G2(X)[21];return K(X,W)},set(W,...K){let U=G2(X)[22];return U(X,W,...K)},sub(W,K){let U=G2(X)[23];return U(X,W,K)}},Y=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},Oy,Dy,Ty,xy,vy,hy,Ey,Py,Iy,by,Sy,Cy,yy,Ry,gy,fy,my,void 0].map((W,K)=>J[K]||W);return Wx.set(X,Object.freeze(Y)),X}var dy=0;function Q$(J,X){let Y=`atom${++dy}`,W={toString(){return(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&this.debugLabel?Y+":"+this.debugLabel:Y}};if(typeof J==="function")W.read=J;else W.init=J,W.read=uy,W.write=py;if(X)W.write=X;return W}function uy(J){return J(this)}function py(J,X,Y){return X(this,typeof Y==="function"?Y(J(this)):Y)}var Ux;function Hx(){if(Ux)return Ux();return Kx()}var G$;function _x(){if(!G$){if(G$=Hx(),(import.meta.env?import.meta.env.MODE:void 0)!=="production"){if(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=G$),globalThis.__JOTAI_DEFAULT_STORE__!==G$)console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044")}}return G$}var ew=c(G0(),1);var cy=ew.createContext(void 0);function Bx(J){let X=ew.useContext(cy);return(J==null?void 0:J.store)||X||_x()}var XB=(J)=>typeof(J==null?void 0:J.then)==="function",$B=(J)=>{if(!J.status)J.status="pending",J.then((X)=>{J.status="fulfilled",J.value=X},(X)=>{J.status="rejected",J.reason=X})},ly=ew.default.use||((J)=>{if(J.status==="pending")throw J;else if(J.status==="fulfilled")return J.value;else if(J.status==="rejected")throw J.reason;else throw $B(J),J}),JB=new WeakMap,qx=(J,X)=>{let Y=JB.get(J);if(!Y)Y=new Promise((W,K)=>{let U=J,q=(F)=>(N)=>{if(U===F)W(N)},_=(F)=>(N)=>{if(U===F)K(N)},L=()=>{try{let F=X();if(XB(F))JB.set(F,Y),U=F,F.then(q(F),_(F)),WW(F,L);else W(F)}catch(F){K(F)}};J.then(q(J),_(J)),WW(J,L)}),JB.set(J,Y);return Y};function iy(J,X){let{delay:Y,unstable_promiseStatus:W=!ew.default.use}=X||{},K=Bx(X),[[U,q,_],L]=ew.useReducer((N)=>{let V=K.get(J);if(Object.is(N[0],V)&&N[1]===K&&N[2]===J)return N;return[V,K,J]},void 0,()=>[K.get(J),K,J]),F=U;if(q!==K||_!==J)L(),F=K.get(J);if(ew.useEffect(()=>{let N=K.sub(J,()=>{if(W)try{let V=K.get(J);if(XB(V))$B(qx(V,()=>K.get(J)))}catch(V){}if(typeof Y==="number"){setTimeout(L,Y);return}L()});return L(),N},[K,J,Y,W]),ew.useDebugValue(F),XB(F)){let N=qx(F,()=>K.get(J));if(W)$B(N);return ly(N)}return F}function ry(J,X){let Y=Bx(X);return ew.useCallback((...K)=>{if((import.meta.env?import.meta.env.MODE:void 0)!=="production"&&!("write"in J))throw Error("not writable atom");return Y.set(J,...K)},[Y,J])}function Q8(J,X){return[iy(J,X),ry(J,X)]}var ay=Symbol((import.meta.env?import.meta.env.MODE:void 0)!=="production"?"RESET":"");var Lx=(J)=>typeof(J==null?void 0:J.then)==="function";function sy(J=()=>{try{return window.localStorage}catch(Y){if((import.meta.env?import.meta.env.MODE:void 0)!=="production"){if(typeof window<"u")console.warn(Y)}return}},X){var Y;let W,K,U={getItem:(L,F)=>{var N,V;let k=(D)=>{if(D=D||"",W!==D){try{K=JSON.parse(D,X==null?void 0:X.reviver)}catch(M){return F}W=D}return K},A=(V=(N=J())==null?void 0:N.getItem(L))!=null?V:null;if(Lx(A))return A.then(k);return k(A)},setItem:(L,F)=>{var N;return(N=J())==null?void 0:N.setItem(L,JSON.stringify(F,X==null?void 0:X.replacer))},removeItem:(L)=>{var F;return(F=J())==null?void 0:F.removeItem(L)}},q=(L)=>(F,N,V)=>L(F,(k)=>{let A;try{A=JSON.parse(k||"")}catch(D){A=V}N(A)}),_;try{_=(Y=J())==null?void 0:Y.subscribe}catch(L){}if(!_&&typeof window<"u"&&typeof window.addEventListener==="function"&&window.Storage)_=(L,F)=>{if(!(J()instanceof window.Storage))return()=>{};let N=(V)=>{if(V.storageArea===J()&&V.key===L)F(V.newValue)};return window.addEventListener("storage",N),()=>{window.removeEventListener("storage",N)}};if(_)U.subscribe=q(_);return U}var oy=sy();function YB(J,X,Y=oy,W){let K=W==null?void 0:W.getOnInit,U=Q$(K?Y.getItem(J,X):X);if((import.meta.env?import.meta.env.MODE:void 0)!=="production")U.debugPrivate=!0;return U.onMount=(_)=>{_(Y.getItem(J,X));let L;if(Y.subscribe)L=Y.subscribe(J,_,X);return L},Q$((_)=>_(U),(_,L,F)=>{let N=typeof F==="function"?F(_(U)):F;if(N===ay)return L(U,X),Y.removeItem(J);if(Lx(N))return N.then((V)=>{return L(U,V),Y.setItem(J,V)});return L(U,N),Y.setItem(J,N)})}var GB=YB("activeTabId",null),K9=YB("tabs",[]),ny=Q$((J)=>J(K9).reduce((X,Y)=>{return X[Y.id]=wB({initialEntries:[Y.path]}),X},{}));function LZ(){return Q8(K9)}function Vx(){let[J]=Q8(K9),[X,Y]=Q8(GB),[W]=Q8(ny),K=J.find((q)=>q.id===X)??null,U=X?W[X]:null;return{activeTab:K,setActiveTab:Y,tabHistory:U}}function Fx(){let[,J]=Q8(K9),[,X]=Q8(GB);return(Y)=>{let W=crypto.randomUUID();return J((K)=>[...K,{...Y,id:W}]),X(W),W}}function Nx(){let[J,X]=Q8(K9);return(Y)=>{X(J.map((W)=>W.id===Y?{...W,temporary:!1}:W))}}function kx(){let[J,X]=Q8(K9),[Y,W]=Q8(GB);return(K)=>{if(X(J.filter((U)=>U.id!==K)),Y===K){let U=J.findIndex((_)=>_.id===K),q=J[U-1]||J[U+1]||null;W(q?q.id:null)}}}function Ax(){let[J,X]=Q8(K9);return(Y,W)=>{X(J.map((K)=>K.id===Y?{...W,id:Y}:K))}}var U9=c(E1(),1);function jx({...J}){return U9.jsxDEV(b6.Root,{"data-slot":"context-menu",...J},void 0,!1,void 0,this)}function Mx({className:J,...X}){return U9.jsxDEV(b6.Trigger,{"data-slot":"context-menu-trigger",className:h1("select-none",J),...X},void 0,!1,void 0,this)}function Ox({className:J,align:X="start",alignOffset:Y=4,side:W="right",sideOffset:K=0,...U}){return U9.jsxDEV(b6.Portal,{children:U9.jsxDEV(b6.Positioner,{className:"isolate z-50 outline-none",align:X,alignOffset:Y,side:W,sideOffset:K,children:U9.jsxDEV(b6.Popup,{"data-slot":"context-menu-content",className:h1("data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-lg p-1 shadow-md ring-1 duration-100 dark z-50 max-h-(--available-height) origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none",J),...U},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function QB({className:J,inset:X,variant:Y="default",...W}){return U9.jsxDEV(b6.Item,{"data-slot":"context-menu-item","data-inset":X,"data-variant":Y,className:h1("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5 group/context-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",J),...W},void 0,!1,void 0,this)}var H9=c(E1(),1);function Dx({story:J,...X}){let[Y]=LZ(),{activeTab:W,setActiveTab:K}=Vx(),U=Fx(),q=Ax();function _(F){return()=>{let N=Y.find((V)=>V.path===J.id);if(N)return K(N.id);if(W?.temporary)return q(W.id,{name:J.name,path:J.id,temporary:F==="temporary"});return U({name:J.name,path:J.id,temporary:F==="temporary"})}}function L(){return()=>{U({name:J.name,path:J.id,temporary:!1})}}return H9.jsxDEV(jx,{children:[H9.jsxDEV(Mx,{render:H9.jsxDEV(tT,{onClick:_("temporary"),onDoubleClick:_("permanent"),...X},void 0,!1,void 0,this)},void 0,!1,void 0,this),H9.jsxDEV(Ox,{children:[H9.jsxDEV(QB,{onSelect:_("permanent"),children:"Open"},void 0,!1,void 0,this),H9.jsxDEV(QB,{onSelect:L(),children:"Open in New Tab"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var lw=c(E1(),1);function Tx(){let{data:J,isLoading:X,error:Y}=rq({queryKey:["stories"],queryFn:$T});return lw.jsxDEV(lT,{children:[lw.jsxDEV(iT,{children:lw.jsxDEV(f6,{variant:"outline",size:"lg",className:"flex justify-between gap-1 w-full text-zinc-500 font-normal",children:[lw.jsxDEV("span",{children:"Search..."},void 0,!1,void 0,this),lw.jsxDEV(xT,{children:"⌘ K"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),lw.jsxDEV(rT,{children:[X&&lw.jsxDEV("div",{className:"w-full py-8 flex items-center justify-center",children:lw.jsxDEV(eT,{},void 0,!1,void 0,this)},void 0,!1,void 0,this),Y&&lw.jsxDEV("div",{className:"w-full py-8 flex flex-col items-center justify-center text-center gap-2",children:[lw.jsxDEV("p",{className:"text-xs text-destructive font-medium",children:"Failed to load stories."},void 0,!1,void 0,this),lw.jsxDEV("p",{className:"text-xs text-muted-foreground",children:"Check if your server is running and accessible."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J&&Object.keys(J).map((W)=>lw.jsxDEV(aT,{children:[lw.jsxDEV(sT,{children:W},void 0,!1,void 0,this),lw.jsxDEV(oT,{children:lw.jsxDEV(nT,{children:J[W]?.map((K)=>lw.jsxDEV(Dx,{story:{id:K.path,name:K.name},children:lw.jsxDEV("span",{children:K.name},void 0,!1,void 0,this)},K.path,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},W,!0,void 0,this))]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var VZ=c(E1(),1);function xx(){let[J]=LZ();return VZ.jsxDEV(VZ.Fragment,{children:J.map((X)=>VZ.jsxDEV(R6.Panel,{value:X.id,children:VZ.jsxDEV("iframe",{src:`/iframe/${X.path}`,className:"w-full h-full border-none bg-white",title:X.name},void 0,!1,void 0,this)},X.id,!1,void 0,this))},void 0,!1,void 0,this)}var W8=c(E1(),1);function vx(){let[J]=LZ(),X=Nx(),Y=kx();return W8.jsxDEV(R6.List,{className:"border-b h-8 bg-sidebar flex w-full",children:[J.length>0&&W8.jsxDEV("div",{className:"flex h-full items-center px-1.5 gap-0.5 border-r",children:[W8.jsxDEV(f6,{variant:"ghost",size:"icon-sm",children:W8.jsxDEV($$,{},void 0,!1,void 0,this)},void 0,!1,void 0,this),W8.jsxDEV(f6,{variant:"ghost",size:"icon-sm",children:W8.jsxDEV(Y$,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J.map((W)=>W8.jsxDEV(R6.Tab,{nativeButton:!1,render:W8.jsxDEV("div",{},void 0,!1,void 0,this),value:W.id,className:"px-6 h-8 border-r text-xs flex items-center justify-center relative group data-[temporary=true]:italic select-none","data-temporary":W.temporary,onClick:()=>{if(W.temporary)X(W.id)},children:[W.name,W8.jsxDEV(f6,{size:"icon-xs",variant:"ghost",className:"absolute right-1 invisible opacity-0 group-hover:visible group-hover:opacity-100 transition-opacity duration-200 p-0",onClick:(K)=>{K.stopPropagation(),Y(W.id)},children:W8.jsxDEV(W9,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},W.id,!0,void 0,this))]},void 0,!0,void 0,this)}var r4=c(E1(),1);function hx(){return r4.jsxDEV(lq,{client:XT,children:r4.jsxDEV(cT,{children:[r4.jsxDEV(Tx,{},void 0,!1,void 0,this),r4.jsxDEV("main",{className:"flex flex-col w-full",children:r4.jsxDEV(R6.Root,{children:[r4.jsxDEV(vx,{},void 0,!1,void 0,this),r4.jsxDEV(xx,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var Ix=c(E1(),1),Px=document.getElementById("root");if(!Px)throw Error("Root element not found");function ty(){let J=0,X=10;function Y(){let K=document.querySelectorAll("iframe");K.forEach((U)=>{let q=U.src,_=new URL(q);_.searchParams.set("_hmr",Date.now().toString()),U.src=_.toString()}),console.log(`[HMR] Refreshed ${K.length} iframe(s)`)}function W(){let K=new WebSocket(`ws://${location.host}/__hmr`);K.onopen=()=>{console.log("[HMR] Connected"),J=0},K.onmessage=(U)=>{if(JSON.parse(U.data).type==="reload")console.log("[HMR] Reloading iframes..."),Y()},K.onclose=()=>{if(console.log("[HMR] Disconnected"),J<X)J++,setTimeout(W,1000*Math.min(J,5))},K.onerror=()=>K.close()}W()}Ex.createRoot(Px).render(Ix.jsxDEV(hx,{},void 0,!1,void 0,this));ty();
263
263
 
264
- //# debugId=463C182A1C3F634464756E2164756E21
265
- //# sourceMappingURL=chunk-9bkatxct.js.map
264
+ //# debugId=E09F3EEED45195F764756E2164756E21
265
+ //# sourceMappingURL=chunk-gsqpbqa6.js.map