next
Version:
The React Framework
5 lines • 412 kB
JavaScript
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,15819,(__turbopack_context__,module,exports)=>{"use strict";var React=__turbopack_context__.r(66626);function is(x,y){return x===y&&(0!==x||1/x==1/y)||x!=x&&y!=y}var objectIs="function"==typeof Object.is?Object.is:is,useState=React.useState,useEffect=React.useEffect,useLayoutEffect=React.useLayoutEffect,useDebugValue=React.useDebugValue;function useSyncExternalStore$2(subscribe,getSnapshot){var value1=getSnapshot(),_useState=useState({inst:{value:value1,getSnapshot:getSnapshot}}),inst=_useState[0].inst,forceUpdate=_useState[1];return useLayoutEffect(function(){inst.value=value1,inst.getSnapshot=getSnapshot,checkIfSnapshotChanged(inst)&&forceUpdate({inst:inst})},[subscribe,value1,getSnapshot]),useEffect(function(){return checkIfSnapshotChanged(inst)&&forceUpdate({inst:inst}),subscribe(function(){checkIfSnapshotChanged(inst)&&forceUpdate({inst:inst})})},[subscribe]),useDebugValue(value1),value1}function checkIfSnapshotChanged(inst){var latestGetSnapshot=inst.getSnapshot;inst=inst.value;try{var nextValue=latestGetSnapshot();return!objectIs(inst,nextValue)}catch(error){return!0}}function useSyncExternalStore$1(subscribe,getSnapshot){return getSnapshot()}var shim="u"<typeof window||void 0===window.document||void 0===window.document.createElement?useSyncExternalStore$1:useSyncExternalStore$2;exports.useSyncExternalStore=void 0!==React.useSyncExternalStore?React.useSyncExternalStore:shim},41144,(__turbopack_context__,module,exports)=>{"use strict";module.exports=__turbopack_context__.r(15819)},79331,__turbopack_context__=>{"use strict";let hook;var options,medium,SpecialModule,SizeMode,Environment,originalBodyPointerEvents,currentNonce,originalBodyPointerEvents1,originalBodyPointerEvents2,__TURBOPACK__imported__module__2710__=__turbopack_context__.i(2710),__TURBOPACK__imported__module__66626__=__turbopack_context__.i(66626),__TURBOPACK__imported__module__41144__=__turbopack_context__.i(41144);let noop=()=>{},UNDEFINED=noop(),OBJECT=Object,isUndefined=v=>v===UNDEFINED,mergeObjects=(a,b)=>({...a,...b}),table=new WeakMap,counter=0,stableHash=arg=>{let result,index,type=typeof arg,constructor=arg&&arg.constructor,isDate=constructor==Date;if(OBJECT(arg)!==arg||isDate||constructor==RegExp)result=isDate?arg.toJSON():"symbol"==type?arg.toString():"string"==type?JSON.stringify(arg):""+arg;else{if(result=table.get(arg))return result;if(result=++counter+"~",table.set(arg,result),constructor==Array){for(index=0,result="@";index<arg.length;index++)result+=stableHash(arg[index])+",";table.set(arg,result)}if(constructor==OBJECT){result="#";let keys=OBJECT.keys(arg).sort();for(;!isUndefined(index=keys.pop());)isUndefined(arg[index])||(result+=index+":"+stableHash(arg[index])+",");table.set(arg,result)}}return result},SWRGlobalState=new WeakMap,EMPTY_CACHE={},INITIAL_CACHE={},STR_UNDEFINED="undefined",isWindowDefined=typeof window!=STR_UNDEFINED,isDocumentDefined=typeof document!=STR_UNDEFINED,createCacheHelper=(cache,key)=>{let state=SWRGlobalState.get(cache);return[()=>!isUndefined(key)&&cache.get(key)||EMPTY_CACHE,info=>{if(!isUndefined(key)){let prev=cache.get(key);key in INITIAL_CACHE||(INITIAL_CACHE[key]=prev),state[5](key,mergeObjects(prev,info),prev||EMPTY_CACHE)}},state[6],()=>!isUndefined(key)&&key in INITIAL_CACHE?INITIAL_CACHE[key]:!isUndefined(key)&&cache.get(key)||EMPTY_CACHE]},online=!0,[onWindowEvent,offWindowEvent]=isWindowDefined&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[noop,noop],defaultConfigOptions={initFocus:callback=>(isDocumentDefined&&document.addEventListener("visibilitychange",callback),onWindowEvent("focus",callback),()=>{isDocumentDefined&&document.removeEventListener("visibilitychange",callback),offWindowEvent("focus",callback)}),initReconnect:callback=>{let onOnline=()=>{online=!0,callback()},onOffline=()=>{online=!1};return onWindowEvent("online",onOnline),onWindowEvent("offline",onOffline),()=>{offWindowEvent("online",onOnline),offWindowEvent("offline",onOffline)}}},IS_REACT_LEGACY=!__TURBOPACK__imported__module__66626__.default.useId,IS_SERVER=!isWindowDefined||"Deno"in window,useIsomorphicLayoutEffect=IS_SERVER?__TURBOPACK__imported__module__66626__.useEffect:__TURBOPACK__imported__module__66626__.useLayoutEffect,navigatorConnection="u">typeof navigator&&navigator.connection,slowConnection=!IS_SERVER&&navigatorConnection&&(["slow-2g","2g"].includes(navigatorConnection.effectiveType)||navigatorConnection.saveData),serialize=key=>{if("function"==typeof key)try{key=key()}catch(err){key=""}let args=key;return[key="string"==typeof key?key:(Array.isArray(key)?key.length:key)?stableHash(key):"",args]},__timestamp=0,getTimestamp=()=>++__timestamp;async function internalMutate(...args){let[cache,_key,_data,_opts]=args,options=mergeObjects({populateCache:!0,throwOnError:!0},"boolean"==typeof _opts?{revalidate:_opts}:_opts||{}),populateCache=options.populateCache,rollbackOnErrorOption=options.rollbackOnError,optimisticData=options.optimisticData,revalidate=!1!==options.revalidate,throwOnError=options.throwOnError;if("function"==typeof _key){let matchedKeys=[];for(let key of cache.keys())!/^\$(inf|sub)\$/.test(key)&&_key(cache.get(key)._k)&&matchedKeys.push(key);return Promise.all(matchedKeys.map(mutateByKey))}return mutateByKey(_key);async function mutateByKey(_k){let error,[key]=serialize(_k);if(!key)return;let[get,set]=createCacheHelper(cache,key),[EVENT_REVALIDATORS,MUTATION,FETCH,PRELOAD]=SWRGlobalState.get(cache),startRevalidate=()=>{let revalidators=EVENT_REVALIDATORS[key];return revalidate&&(delete FETCH[key],delete PRELOAD[key],revalidators&&revalidators[0])?revalidators[0](2).then(()=>get().data):get().data};if(args.length<3)return startRevalidate();let data=_data,beforeMutationTs=getTimestamp();MUTATION[key]=[beforeMutationTs,0];let hasOptimisticData=!isUndefined(optimisticData),state=get(),displayedData=state.data,currentData=state._c,committedData=isUndefined(currentData)?displayedData:currentData;if(hasOptimisticData&&set({data:optimisticData="function"==typeof optimisticData?optimisticData(committedData,displayedData):optimisticData,_c:committedData}),"function"==typeof data)try{data=data(committedData)}catch(err){error=err}if(data&&"function"==typeof data.then){let error1;if(data=await data.catch(err=>{error=err}),beforeMutationTs!==MUTATION[key][0]){if(error)throw error;return data}error&&hasOptimisticData&&(error1=error,"function"==typeof rollbackOnErrorOption?rollbackOnErrorOption(error1):!1!==rollbackOnErrorOption)&&(populateCache=!0,set({data:committedData,_c:UNDEFINED}))}if(populateCache&&!error&&("function"==typeof populateCache?set({data:populateCache(data,committedData),error:UNDEFINED,_c:UNDEFINED}):set({data,error:UNDEFINED,_c:UNDEFINED})),MUTATION[key][1]=getTimestamp(),Promise.resolve(startRevalidate()).then(()=>{set({_c:UNDEFINED})}),error){if(throwOnError)throw error;return}return data}}let revalidateAllKeys=(revalidators,type)=>{for(let key in revalidators)revalidators[key][0]&&revalidators[key][0](type)},initCache=(provider,options)=>{if(!SWRGlobalState.has(provider)){let opts=mergeObjects(defaultConfigOptions,options),EVENT_REVALIDATORS={},mutate=internalMutate.bind(UNDEFINED,provider),unmount=noop,subscriptions={},subscribe=(key,callback)=>{let subs=subscriptions[key]||[];return subscriptions[key]=subs,subs.push(callback),()=>subs.splice(subs.indexOf(callback),1)},setter=(key,value1,prev)=>{provider.set(key,value1);let subs=subscriptions[key];if(subs)for(let fn of subs)fn(value1,prev)},initProvider=()=>{if(!SWRGlobalState.has(provider)&&(SWRGlobalState.set(provider,[EVENT_REVALIDATORS,{},{},{},mutate,setter,subscribe]),!IS_SERVER)){let releaseFocus=opts.initFocus(setTimeout.bind(UNDEFINED,revalidateAllKeys.bind(UNDEFINED,EVENT_REVALIDATORS,0))),releaseReconnect=opts.initReconnect(setTimeout.bind(UNDEFINED,revalidateAllKeys.bind(UNDEFINED,EVENT_REVALIDATORS,1)));unmount=()=>{releaseFocus&&releaseFocus(),releaseReconnect&&releaseReconnect(),SWRGlobalState.delete(provider)}}};return initProvider(),[provider,mutate,initProvider,unmount]}return[provider,SWRGlobalState.get(provider)[4]]},[cache,mutate]=initCache(new Map),defaultConfig=mergeObjects({onLoadingSlow:noop,onSuccess:noop,onError:noop,onErrorRetry:(_,__,config,revalidate,opts)=>{let maxRetryCount=config.errorRetryCount,currentRetryCount=opts.retryCount,timeout=~~((Math.random()+.5)*(1<<(currentRetryCount<8?currentRetryCount:8)))*config.errorRetryInterval;(isUndefined(maxRetryCount)||!(currentRetryCount>maxRetryCount))&&setTimeout(revalidate,timeout,opts)},onDiscarded:noop,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:slowConnection?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:slowConnection?5e3:3e3,compare:(currentData,newData)=>stableHash(currentData)==stableHash(newData),isPaused:()=>!1,cache,mutate,fallback:{}},{isOnline:()=>online,isVisible:()=>{let visibilityState=isDocumentDefined&&document.visibilityState;return isUndefined(visibilityState)||"hidden"!==visibilityState}}),mergeConfigs=(a,b)=>{let v=mergeObjects(a,b);if(b){let{use:u1,fallback:f1}=a,{use:u2,fallback:f2}=b;u1&&u2&&(v.use=u1.concat(u2)),f1&&f2&&(v.fallback=mergeObjects(f1,f2))}return v},SWRConfigContext=(0,__TURBOPACK__imported__module__66626__.createContext)({}),enableDevtools=isWindowDefined&&window.__SWR_DEVTOOLS_USE__,BUILT_IN_MIDDLEWARE=(enableDevtools?window.__SWR_DEVTOOLS_USE__:[]).concat(useSWRNext=>(key_,fetcher_,config)=>{let fetcher=fetcher_&&((...args)=>{let[key]=serialize(key_),[,,,PRELOAD]=SWRGlobalState.get(cache);if(key.startsWith("$inf$"))return fetcher_(...args);let req=PRELOAD[key];return isUndefined(req)?fetcher_(...args):(delete PRELOAD[key],req)});return useSWRNext(key_,fetcher,config)});enableDevtools&&(window.__SWR_DEVTOOLS_REACT__=__TURBOPACK__imported__module__66626__.default);let use1=__TURBOPACK__imported__module__66626__.default.use||(promise=>{if("pending"===promise.status)throw promise;if("fulfilled"===promise.status)return promise.value;if("rejected"===promise.status)throw promise.reason;throw promise.status="pending",promise.then(v=>{promise.status="fulfilled",promise.value=v},e=>{promise.status="rejected",promise.reason=e}),promise}),WITH_DEDUPE={dedupe:!0};OBJECT.defineProperty(props=>{let{value:value1}=props,parentConfig=(0,__TURBOPACK__imported__module__66626__.useContext)(SWRConfigContext),isFunctionalConfig="function"==typeof value1,config=(0,__TURBOPACK__imported__module__66626__.useMemo)(()=>isFunctionalConfig?value1(parentConfig):value1,[isFunctionalConfig,parentConfig,value1]),extendedConfig=(0,__TURBOPACK__imported__module__66626__.useMemo)(()=>isFunctionalConfig?config:mergeConfigs(parentConfig,config),[isFunctionalConfig,parentConfig,config]),provider=config&&config.provider,cacheContextRef=(0,__TURBOPACK__imported__module__66626__.useRef)(UNDEFINED);provider&&!cacheContextRef.current&&(cacheContextRef.current=initCache(provider(extendedConfig.cache||cache),config));let cacheContext=cacheContextRef.current;return cacheContext&&(extendedConfig.cache=cacheContext[0],extendedConfig.mutate=cacheContext[1]),useIsomorphicLayoutEffect(()=>{if(cacheContext)return cacheContext[2]&&cacheContext[2](),cacheContext[3]},[]),(0,__TURBOPACK__imported__module__66626__.createElement)(SWRConfigContext.Provider,mergeObjects(props,{value:extendedConfig}))},"defaultValue",{value:defaultConfig});let useSWR=(hook=(_key,fetcher,config)=>{let{cache,compare,suspense,fallbackData,revalidateOnMount,revalidateIfStale,refreshInterval,refreshWhenHidden,refreshWhenOffline,keepPreviousData}=config,[EVENT_REVALIDATORS,MUTATION,FETCH,PRELOAD]=SWRGlobalState.get(cache),[key,fnArg]=serialize(_key),initialMountedRef=(0,__TURBOPACK__imported__module__66626__.useRef)(!1),unmountedRef=(0,__TURBOPACK__imported__module__66626__.useRef)(!1),keyRef=(0,__TURBOPACK__imported__module__66626__.useRef)(key),fetcherRef=(0,__TURBOPACK__imported__module__66626__.useRef)(fetcher),configRef=(0,__TURBOPACK__imported__module__66626__.useRef)(config),isActive=()=>configRef.current.isVisible()&&configRef.current.isOnline(),[getCache,setCache,subscribeCache,getInitialCache]=createCacheHelper(cache,key),stateDependencies=(0,__TURBOPACK__imported__module__66626__.useRef)({}).current,fallback=isUndefined(fallbackData)?config.fallback[key]:fallbackData,isEqual=(prev,current)=>{for(let _ in stateDependencies)if("data"===_){if(!compare(prev[_],current[_])&&(!isUndefined(prev[_])||!compare(returnedData,current[_])))return!1}else if(current[_]!==prev[_])return!1;return!0},getSnapshot=(0,__TURBOPACK__imported__module__66626__.useMemo)(()=>{let shouldStartRequest=!!key&&!!fetcher&&(isUndefined(revalidateOnMount)?!configRef.current.isPaused()&&!suspense&&(!!isUndefined(revalidateIfStale)||revalidateIfStale):revalidateOnMount),getSelectedCache=state=>{let snapshot=mergeObjects(state);return(delete snapshot._k,shouldStartRequest)?{isValidating:!0,isLoading:!0,...snapshot}:snapshot},cachedData=getCache(),initialData=getInitialCache(),clientSnapshot=getSelectedCache(cachedData),serverSnapshot=cachedData===initialData?clientSnapshot:getSelectedCache(initialData),memorizedSnapshot=clientSnapshot;return[()=>{let newSnapshot=getSelectedCache(getCache());return isEqual(newSnapshot,memorizedSnapshot)?(memorizedSnapshot.data=newSnapshot.data,memorizedSnapshot.isLoading=newSnapshot.isLoading,memorizedSnapshot.isValidating=newSnapshot.isValidating,memorizedSnapshot.error=newSnapshot.error,memorizedSnapshot):(memorizedSnapshot=newSnapshot,newSnapshot)},()=>serverSnapshot]},[cache,key]),cached=(0,__TURBOPACK__imported__module__41144__.useSyncExternalStore)((0,__TURBOPACK__imported__module__66626__.useCallback)(callback=>subscribeCache(key,(current,prev)=>{isEqual(prev,current)||callback()}),[cache,key]),getSnapshot[0],getSnapshot[1]),isInitialMount=!initialMountedRef.current,hasRevalidator=EVENT_REVALIDATORS[key]&&EVENT_REVALIDATORS[key].length>0,cachedData=cached.data,data=isUndefined(cachedData)?fallback:cachedData,error=cached.error,laggyDataRef=(0,__TURBOPACK__imported__module__66626__.useRef)(data),returnedData=keepPreviousData?isUndefined(cachedData)?laggyDataRef.current:cachedData:data,shouldDoInitialRevalidation=(!hasRevalidator||!!isUndefined(error))&&(isInitialMount&&!isUndefined(revalidateOnMount)?revalidateOnMount:!configRef.current.isPaused()&&(suspense?!isUndefined(data)&&revalidateIfStale:isUndefined(data)||revalidateIfStale)),defaultValidatingState=!!(key&&fetcher&&isInitialMount&&shouldDoInitialRevalidation),isValidating=isUndefined(cached.isValidating)?defaultValidatingState:cached.isValidating,isLoading=isUndefined(cached.isLoading)?defaultValidatingState:cached.isLoading,revalidate=(0,__TURBOPACK__imported__module__66626__.useCallback)(async revalidateOpts=>{let newData,startAt,currentFetcher=fetcherRef.current;if(!key||!currentFetcher||unmountedRef.current||configRef.current.isPaused())return!1;let loading=!0,opts=revalidateOpts||{},shouldStartNewRequest=!FETCH[key]||!opts.dedupe,callbackSafeguard=()=>IS_REACT_LEGACY?!unmountedRef.current&&key===keyRef.current&&initialMountedRef.current:key===keyRef.current,finalState={isValidating:!1,isLoading:!1},finishRequestAndUpdateState=()=>{setCache(finalState)},cleanupState=()=>{let requestInfo=FETCH[key];requestInfo&&requestInfo[1]===startAt&&delete FETCH[key]},initialState={isValidating:!0};isUndefined(getCache().data)&&(initialState.isLoading=!0);try{if(shouldStartNewRequest&&(setCache(initialState),config.loadingTimeout&&isUndefined(getCache().data)&&setTimeout(()=>{loading&&callbackSafeguard()&&configRef.current.onLoadingSlow(key,config)},config.loadingTimeout),FETCH[key]=[currentFetcher(fnArg),getTimestamp()]),[newData,startAt]=FETCH[key],newData=await newData,shouldStartNewRequest&&setTimeout(cleanupState,config.dedupingInterval),!FETCH[key]||FETCH[key][1]!==startAt)return shouldStartNewRequest&&callbackSafeguard()&&configRef.current.onDiscarded(key),!1;finalState.error=UNDEFINED;let mutationInfo=MUTATION[key];if(!isUndefined(mutationInfo)&&(startAt<=mutationInfo[0]||startAt<=mutationInfo[1]||0===mutationInfo[1]))return finishRequestAndUpdateState(),shouldStartNewRequest&&callbackSafeguard()&&configRef.current.onDiscarded(key),!1;let cacheData=getCache().data;finalState.data=compare(cacheData,newData)?cacheData:newData,shouldStartNewRequest&&callbackSafeguard()&&configRef.current.onSuccess(newData,key,config)}catch(err){cleanupState();let currentConfig=configRef.current,{shouldRetryOnError}=currentConfig;!currentConfig.isPaused()&&(finalState.error=err,shouldStartNewRequest&&callbackSafeguard())&&(currentConfig.onError(err,key,currentConfig),(!0===shouldRetryOnError||"function"==typeof shouldRetryOnError&&shouldRetryOnError(err))&&isActive()&¤tConfig.onErrorRetry(err,key,currentConfig,_opts=>{let revalidators=EVENT_REVALIDATORS[key];revalidators&&revalidators[0]&&revalidators[0](3,_opts)},{retryCount:(opts.retryCount||0)+1,dedupe:!0}))}return loading=!1,finishRequestAndUpdateState(),!0},[key,cache]),boundMutate=(0,__TURBOPACK__imported__module__66626__.useCallback)((...args)=>internalMutate(cache,keyRef.current,...args),[]);if(useIsomorphicLayoutEffect(()=>{fetcherRef.current=fetcher,configRef.current=config,isUndefined(cachedData)||(laggyDataRef.current=cachedData)}),useIsomorphicLayoutEffect(()=>{var callback;let keyedRevalidators;if(!key)return;let softRevalidate=revalidate.bind(UNDEFINED,WITH_DEDUPE),nextFocusRevalidatedAt=0,unsubEvents=(callback=(type,opts={})=>{if(0==type){let now=Date.now();configRef.current.revalidateOnFocus&&now>nextFocusRevalidatedAt&&isActive()&&(nextFocusRevalidatedAt=now+configRef.current.focusThrottleInterval,softRevalidate())}else if(1==type)configRef.current.revalidateOnReconnect&&isActive()&&softRevalidate();else if(2==type)return revalidate();else if(3==type)return revalidate(opts)},(keyedRevalidators=EVENT_REVALIDATORS[key]||(EVENT_REVALIDATORS[key]=[])).push(callback),()=>{let index=keyedRevalidators.indexOf(callback);index>=0&&(keyedRevalidators[index]=keyedRevalidators[keyedRevalidators.length-1],keyedRevalidators.pop())});if(unmountedRef.current=!1,keyRef.current=key,initialMountedRef.current=!0,setCache({_k:fnArg}),shouldDoInitialRevalidation)if(isUndefined(data)||IS_SERVER)softRevalidate();else isWindowDefined&&typeof window.requestAnimationFrame!=STR_UNDEFINED?window.requestAnimationFrame(softRevalidate):setTimeout(softRevalidate,1);return()=>{unmountedRef.current=!0,unsubEvents()}},[key]),useIsomorphicLayoutEffect(()=>{let timer;function next(){let interval="function"==typeof refreshInterval?refreshInterval(getCache().data):refreshInterval;interval&&-1!==timer&&(timer=setTimeout(execute,interval))}function execute(){!getCache().error&&(refreshWhenHidden||configRef.current.isVisible())&&(refreshWhenOffline||configRef.current.isOnline())?revalidate(WITH_DEDUPE).then(next):next()}return next(),()=>{timer&&(clearTimeout(timer),timer=-1)}},[refreshInterval,refreshWhenHidden,refreshWhenOffline,key]),(0,__TURBOPACK__imported__module__66626__.useDebugValue)(returnedData),suspense&&isUndefined(data)&&key){if(!IS_REACT_LEGACY&&IS_SERVER)throw Error("Fallback data is required when using suspense in SSR.");fetcherRef.current=fetcher,configRef.current=config,unmountedRef.current=!1;let req=PRELOAD[key];if(isUndefined(req)||use1(boundMutate(req)),isUndefined(error)){let promise=revalidate(WITH_DEDUPE);isUndefined(returnedData)||(promise.status="fulfilled",promise.value=!0),use1(promise)}else throw error}return{mutate:boundMutate,get data(){return stateDependencies.data=!0,returnedData},get error(){return stateDependencies.error=!0,error},get isValidating(){return stateDependencies.isValidating=!0,isValidating},get isLoading(){return stateDependencies.isLoading=!0,isLoading}}},function useSWRArgs(...args){let fallbackConfig=mergeObjects(defaultConfig,(0,__TURBOPACK__imported__module__66626__.useContext)(SWRConfigContext)),[key,fn,_config]="function"==typeof args[1]?[args[0],args[1],args[2]||{}]:[args[0],null,(null===args[1]?args[2]:args[1])||{}],config=mergeConfigs(fallbackConfig,_config),next=hook,{use}=config,middleware=(use||[]).concat(BUILT_IN_MIDDLEWARE);for(let i=middleware.length;i--;)next=middleware[i](next);return next(key,fn||config.fetcher||null,config)}),toPascalCase=string=>{let camelCase=string.replace(/^([A-Z])|[\s-_]+(\w)/g,(match,p1,p2)=>p2?p2.toUpperCase():p1.toLowerCase());return camelCase.charAt(0).toUpperCase()+camelCase.slice(1)},mergeClasses=(...classes)=>classes.filter((className,index,array)=>!!className&&""!==className.trim()&&array.indexOf(className)===index).join(" ").trim();var defaultAttributes={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"};let Icon=(0,__TURBOPACK__imported__module__66626__.forwardRef)(({color="currentColor",size=24,strokeWidth=2,absoluteStrokeWidth,className="",children,iconNode,...rest},ref)=>(0,__TURBOPACK__imported__module__66626__.createElement)("svg",{ref,...defaultAttributes,width:size,height:size,stroke:color,strokeWidth:absoluteStrokeWidth?24*Number(strokeWidth)/Number(size):strokeWidth,className:mergeClasses("lucide",className),...!children&&!(props=>{for(let prop in props)if(prop.startsWith("aria-")||"role"===prop||"title"===prop)return!0})(rest)&&{"aria-hidden":"true"},...rest},[...iconNode.map(([tag,attrs])=>(0,__TURBOPACK__imported__module__66626__.createElement)(tag,attrs)),...Array.isArray(children)?children:[children]])),createLucideIcon=(iconName,iconNode)=>{let Component=(0,__TURBOPACK__imported__module__66626__.forwardRef)(({className,...props},ref)=>(0,__TURBOPACK__imported__module__66626__.createElement)(Icon,{ref,iconNode,className:mergeClasses(`lucide-${toPascalCase(iconName).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${iconName}`,className),...props}));return Component.displayName=toPascalCase(iconName),Component},RefreshCw=createLucideIcon("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),TriangleAlert=createLucideIcon("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);class NetworkError extends Error{constructor(message,options){super(message),this.name="NetworkError",options&&"cause"in options&&(this.cause=options.cause)}}function ErrorState({error}){let isNetwork=error instanceof NetworkError,message=isNetwork?"Unable to connect to the bundle analyzer server. Please ensure the server is running and try again.":error?.message??"An unexpected error occurred.";return(0,__TURBOPACK__imported__module__2710__.jsx)("div",{className:"flex-1 flex items-center justify-center",children:(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"text-center space-y-4 max-w-md px-6",children:[(0,__TURBOPACK__imported__module__2710__.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-destructive/10 text-destructive mb-2",children:(0,__TURBOPACK__imported__module__2710__.jsx)(TriangleAlert,{className:"w-8 h-8"})}),(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{children:[(0,__TURBOPACK__imported__module__2710__.jsx)("h3",{className:"text-lg font-semibold text-foreground mb-2",children:isNetwork?"Server Connection Lost":"Error"}),(0,__TURBOPACK__imported__module__2710__.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:message}),(0,__TURBOPACK__imported__module__2710__.jsxs)("button",{onClick:()=>{window.location.reload()},className:"inline-flex items-center gap-2 px-4 py-2 rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors text-sm font-medium",children:[(0,__TURBOPACK__imported__module__2710__.jsx)(RefreshCw,{className:"w-4 h-4"}),"Retry Connection"]})]})]})})}function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}let __TURBOPACK__default__export__=clsx,getGroupRecursive=(classParts,classPartObject)=>{if(0===classParts.length)return classPartObject.classGroupId;let currentClassPart=classParts[0],nextClassPartObject=classPartObject.nextPart.get(currentClassPart),classGroupFromNextClassPart=nextClassPartObject?getGroupRecursive(classParts.slice(1),nextClassPartObject):void 0;if(classGroupFromNextClassPart)return classGroupFromNextClassPart;if(0===classPartObject.validators.length)return;let classRest=classParts.join("-");return classPartObject.validators.find(({validator})=>validator(classRest))?.classGroupId},arbitraryPropertyRegex=/^\[(.+)\]$/,processClassesRecursively=(classGroup,classPartObject,classGroupId,theme)=>{classGroup.forEach(classDefinition=>{if("string"==typeof classDefinition){(""===classDefinition?classPartObject:getPart(classPartObject,classDefinition)).classGroupId=classGroupId;return}"function"==typeof classDefinition?isThemeGetter(classDefinition)?processClassesRecursively(classDefinition(theme),classPartObject,classGroupId,theme):classPartObject.validators.push({validator:classDefinition,classGroupId}):Object.entries(classDefinition).forEach(([key,classGroup])=>{processClassesRecursively(classGroup,getPart(classPartObject,key),classGroupId,theme)})})},getPart=(classPartObject,path)=>{let currentClassPartObject=classPartObject;return path.split("-").forEach(pathPart=>{currentClassPartObject.nextPart.has(pathPart)||currentClassPartObject.nextPart.set(pathPart,{nextPart:new Map,validators:[]}),currentClassPartObject=currentClassPartObject.nextPart.get(pathPart)}),currentClassPartObject},isThemeGetter=func=>func.isThemeGetter,getPrefixedClassGroupEntries=(classGroupEntries,prefix)=>prefix?classGroupEntries.map(([classGroupId,classGroup])=>[classGroupId,classGroup.map(classDefinition=>"string"==typeof classDefinition?prefix+classDefinition:"object"==typeof classDefinition?Object.fromEntries(Object.entries(classDefinition).map(([key,value1])=>[prefix+key,value1])):classDefinition)]):classGroupEntries,sortModifiers=modifiers=>{if(modifiers.length<=1)return modifiers;let sortedModifiers=[],unsortedModifiers=[];return modifiers.forEach(modifier=>{"["===modifier[0]?(sortedModifiers.push(...unsortedModifiers.sort(),modifier),unsortedModifiers=[]):unsortedModifiers.push(modifier)}),sortedModifiers.push(...unsortedModifiers.sort()),sortedModifiers},SPLIT_CLASSES_REGEX=/\s+/;function twJoin(){let argument,resolvedValue,index=0,string="";for(;index<arguments.length;)(argument=arguments[index++])&&(resolvedValue=toValue(argument))&&(string&&(string+=" "),string+=resolvedValue);return string}let toValue=mix=>{let resolvedValue;if("string"==typeof mix)return mix;let string="";for(let k=0;k<mix.length;k++)mix[k]&&(resolvedValue=toValue(mix[k]))&&(string&&(string+=" "),string+=resolvedValue);return string};function createTailwindMerge(createConfigFirst,...createConfigRest){let configUtils,cacheGet,cacheSet,functionToCall=initTailwindMerge;function initTailwindMerge(classList){let config;return cacheGet=(configUtils={cache:(maxCacheSize=>{if(maxCacheSize<1)return{get:()=>void 0,set:()=>{}};let cacheSize=0,cache=new Map,previousCache=new Map,update=(key,value1)=>{cache.set(key,value1),++cacheSize>maxCacheSize&&(cacheSize=0,previousCache=cache,cache=new Map)};return{get(key){let value1=cache.get(key);return void 0!==value1?value1:void 0!==(value1=previousCache.get(key))?(update(key,value1),value1):void 0},set(key,value1){cache.has(key)?cache.set(key,value1):update(key,value1)}}})((config=createConfigRest.reduce((previousConfig,createConfigCurrent)=>createConfigCurrent(previousConfig),createConfigFirst())).cacheSize),parseClassName:(config=>{let{separator,experimentalParseClassName}=config,isSeparatorSingleCharacter=1===separator.length,firstSeparatorCharacter=separator[0],separatorLength=separator.length,parseClassName=className=>{let postfixModifierPosition,modifiers=[],bracketDepth=0,modifierStart=0;for(let index=0;index<className.length;index++){let currentCharacter=className[index];if(0===bracketDepth){if(currentCharacter===firstSeparatorCharacter&&(isSeparatorSingleCharacter||className.slice(index,index+separatorLength)===separator)){modifiers.push(className.slice(modifierStart,index)),modifierStart=index+separatorLength;continue}if("/"===currentCharacter){postfixModifierPosition=index;continue}}"["===currentCharacter?bracketDepth++:"]"===currentCharacter&&bracketDepth--}let baseClassNameWithImportantModifier=0===modifiers.length?className:className.substring(modifierStart),hasImportantModifier=baseClassNameWithImportantModifier.startsWith("!"),baseClassName=hasImportantModifier?baseClassNameWithImportantModifier.substring(1):baseClassNameWithImportantModifier;return{modifiers,hasImportantModifier,baseClassName,maybePostfixModifierPosition:postfixModifierPosition&&postfixModifierPosition>modifierStart?postfixModifierPosition-modifierStart:void 0}};return experimentalParseClassName?className=>experimentalParseClassName({className,parseClassName}):parseClassName})(config),...(config=>{let classMap=(config=>{let{theme,prefix}=config,classMap={nextPart:new Map,validators:[]};return getPrefixedClassGroupEntries(Object.entries(config.classGroups),prefix).forEach(([classGroupId,classGroup])=>{processClassesRecursively(classGroup,classMap,classGroupId,theme)}),classMap})(config),{conflictingClassGroups,conflictingClassGroupModifiers}=config;return{getClassGroupId:className=>{let classParts=className.split("-");return""===classParts[0]&&1!==classParts.length&&classParts.shift(),getGroupRecursive(classParts,classMap)||(className=>{if(arbitraryPropertyRegex.test(className)){let arbitraryPropertyClassName=arbitraryPropertyRegex.exec(className)[1],property=arbitraryPropertyClassName?.substring(0,arbitraryPropertyClassName.indexOf(":"));if(property)return"arbitrary.."+property}})(className)},getConflictingClassGroupIds:(classGroupId,hasPostfixModifier)=>{let conflicts=conflictingClassGroups[classGroupId]||[];return hasPostfixModifier&&conflictingClassGroupModifiers[classGroupId]?[...conflicts,...conflictingClassGroupModifiers[classGroupId]]:conflicts}}})(config)}).cache.get,cacheSet=configUtils.cache.set,functionToCall=tailwindMerge,tailwindMerge(classList)}function tailwindMerge(classList){let cachedResult=cacheGet(classList);if(cachedResult)return cachedResult;let result=((classList,configUtils)=>{let{parseClassName,getClassGroupId,getConflictingClassGroupIds}=configUtils,classGroupsInConflict=[],classNames=classList.trim().split(SPLIT_CLASSES_REGEX),result="";for(let index=classNames.length-1;index>=0;index-=1){let originalClassName=classNames[index],{modifiers,hasImportantModifier,baseClassName,maybePostfixModifierPosition}=parseClassName(originalClassName),hasPostfixModifier=!!maybePostfixModifierPosition,classGroupId=getClassGroupId(hasPostfixModifier?baseClassName.substring(0,maybePostfixModifierPosition):baseClassName);if(!classGroupId){if(!hasPostfixModifier||!(classGroupId=getClassGroupId(baseClassName))){result=originalClassName+(result.length>0?" "+result:result);continue}hasPostfixModifier=!1}let variantModifier=sortModifiers(modifiers).join(":"),modifierId=hasImportantModifier?variantModifier+"!":variantModifier,classId=modifierId+classGroupId;if(classGroupsInConflict.includes(classId))continue;classGroupsInConflict.push(classId);let conflictGroups=getConflictingClassGroupIds(classGroupId,hasPostfixModifier);for(let i=0;i<conflictGroups.length;++i){let group=conflictGroups[i];classGroupsInConflict.push(modifierId+group)}result=originalClassName+(result.length>0?" "+result:result)}return result})(classList,configUtils);return cacheSet(classList,result),result}return function callTailwindMerge(){return functionToCall(twJoin.apply(null,arguments))}}let fromTheme=key=>{let themeGetter=theme=>theme[key]||[];return themeGetter.isThemeGetter=!0,themeGetter},arbitraryValueRegex=/^\[(?:([a-z-]+):)?(.+)\]$/i,fractionRegex=/^\d+\/\d+$/,stringLengths=new Set(["px","full","screen"]),tshirtUnitRegex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lengthUnitRegex=/\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$/,colorFunctionRegex=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,shadowRegex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,imageRegex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,isLength=value1=>isNumber(value1)||stringLengths.has(value1)||fractionRegex.test(value1),isArbitraryLength=value1=>getIsArbitraryValue(value1,"length",isLengthOnly),isNumber=value1=>!!value1&&!Number.isNaN(Number(value1)),isArbitraryNumber=value1=>getIsArbitraryValue(value1,"number",isNumber),isInteger=value1=>!!value1&&Number.isInteger(Number(value1)),isPercent=value1=>value1.endsWith("%")&&isNumber(value1.slice(0,-1)),isArbitraryValue=value1=>arbitraryValueRegex.test(value1),isTshirtSize=value1=>tshirtUnitRegex.test(value1),sizeLabels=new Set(["length","size","percentage"]),isArbitrarySize=value1=>getIsArbitraryValue(value1,sizeLabels,isNever),isArbitraryPosition=value1=>getIsArbitraryValue(value1,"position",isNever),imageLabels=new Set(["image","url"]),isArbitraryImage=value1=>getIsArbitraryValue(value1,imageLabels,isImage),isArbitraryShadow=value1=>getIsArbitraryValue(value1,"",isShadow),isAny=()=>!0,getIsArbitraryValue=(value1,label,testValue)=>{let result=arbitraryValueRegex.exec(value1);return!!result&&(result[1]?"string"==typeof label?result[1]===label:label.has(result[1]):testValue(result[2]))},isLengthOnly=value1=>lengthUnitRegex.test(value1)&&!colorFunctionRegex.test(value1),isNever=()=>!1,isShadow=value1=>shadowRegex.test(value1),isImage=value1=>imageRegex.test(value1),twMerge=createTailwindMerge(()=>{let colors=fromTheme("colors"),spacing=fromTheme("spacing"),blur=fromTheme("blur"),brightness=fromTheme("brightness"),borderColor=fromTheme("borderColor"),borderRadius=fromTheme("borderRadius"),borderSpacing=fromTheme("borderSpacing"),borderWidth=fromTheme("borderWidth"),contrast=fromTheme("contrast"),grayscale=fromTheme("grayscale"),hueRotate=fromTheme("hueRotate"),invert=fromTheme("invert"),gap=fromTheme("gap"),gradientColorStops=fromTheme("gradientColorStops"),gradientColorStopPositions=fromTheme("gradientColorStopPositions"),inset=fromTheme("inset"),margin=fromTheme("margin"),opacity=fromTheme("opacity"),padding=fromTheme("padding"),saturate=fromTheme("saturate"),scale=fromTheme("scale"),sepia=fromTheme("sepia"),skew=fromTheme("skew"),space=fromTheme("space"),translate=fromTheme("translate"),getOverscroll=()=>["auto","contain","none"],getOverflow=()=>["auto","hidden","clip","visible","scroll"],getSpacingWithAutoAndArbitrary=()=>["auto",isArbitraryValue,spacing],getSpacingWithArbitrary=()=>[isArbitraryValue,spacing],getLengthWithEmptyAndArbitrary=()=>["",isLength,isArbitraryLength],getNumberWithAutoAndArbitrary=()=>["auto",isNumber,isArbitraryValue],getPositions=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],getLineStyles=()=>["solid","dashed","dotted","double","none"],getBlendModes=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],getAlign=()=>["start","end","center","between","around","evenly","stretch"],getZeroAndEmpty=()=>["","0",isArbitraryValue],getBreaks=()=>["auto","avoid","all","avoid-page","page","left","right","column"],getNumberAndArbitrary=()=>[isNumber,isArbitraryValue];return{cacheSize:500,separator:":",theme:{colors:[isAny],spacing:[isLength,isArbitraryLength],blur:["none","",isTshirtSize,isArbitraryValue],brightness:getNumberAndArbitrary(),borderColor:[colors],borderRadius:["none","","full",isTshirtSize,isArbitraryValue],borderSpacing:getSpacingWithArbitrary(),borderWidth:getLengthWithEmptyAndArbitrary(),contrast:getNumberAndArbitrary(),grayscale:getZeroAndEmpty(),hueRotate:getNumberAndArbitrary(),invert:getZeroAndEmpty(),gap:getSpacingWithArbitrary(),gradientColorStops:[colors],gradientColorStopPositions:[isPercent,isArbitraryLength],inset:getSpacingWithAutoAndArbitrary(),margin:getSpacingWithAutoAndArbitrary(),opacity:getNumberAndArbitrary(),padding:getSpacingWithArbitrary(),saturate:getNumberAndArbitrary(),scale:getNumberAndArbitrary(),sepia:getZeroAndEmpty(),skew:getNumberAndArbitrary(),space:getSpacingWithArbitrary(),translate:getSpacingWithArbitrary()},classGroups:{aspect:[{aspect:["auto","square","video",isArbitraryValue]}],container:["container"],columns:[{columns:[isTshirtSize]}],"break-after":[{"break-after":getBreaks()}],"break-before":[{"break-before":getBreaks()}],"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"],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:[...getPositions(),isArbitraryValue]}],overflow:[{overflow:getOverflow()}],"overflow-x":[{"overflow-x":getOverflow()}],"overflow-y":[{"overflow-y":getOverflow()}],overscroll:[{overscroll:getOverscroll()}],"overscroll-x":[{"overscroll-x":getOverscroll()}],"overscroll-y":[{"overscroll-y":getOverscroll()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[inset]}],"inset-x":[{"inset-x":[inset]}],"inset-y":[{"inset-y":[inset]}],start:[{start:[inset]}],end:[{end:[inset]}],top:[{top:[inset]}],right:[{right:[inset]}],bottom:[{bottom:[inset]}],left:[{left:[inset]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",isInteger,isArbitraryValue]}],basis:[{basis:getSpacingWithAutoAndArbitrary()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",isArbitraryValue]}],grow:[{grow:getZeroAndEmpty()}],shrink:[{shrink:getZeroAndEmpty()}],order:[{order:["first","last","none",isInteger,isArbitraryValue]}],"grid-cols":[{"grid-cols":[isAny]}],"col-start-end":[{col:["auto",{span:["full",isInteger,isArbitraryValue]},isArbitraryValue]}],"col-start":[{"col-start":getNumberWithAutoAndArbitrary()}],"col-end":[{"col-end":getNumberWithAutoAndArbitrary()}],"grid-rows":[{"grid-rows":[isAny]}],"row-start-end":[{row:["auto",{span:[isInteger,isArbitraryValue]},isArbitraryValue]}],"row-start":[{"row-start":getNumberWithAutoAndArbitrary()}],"row-end":[{"row-end":getNumberWithAutoAndArbitrary()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",isArbitraryValue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",isArbitraryValue]}],gap:[{gap:[gap]}],"gap-x":[{"gap-x":[gap]}],"gap-y":[{"gap-y":[gap]}],"justify-content":[{justify:["normal",...getAlign()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...getAlign(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...getAlign(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[padding]}],px:[{px:[padding]}],py:[{py:[padding]}],ps:[{ps:[padding]}],pe:[{pe:[padding]}],pt:[{pt:[padding]}],pr:[{pr:[padding]}],pb:[{pb:[padding]}],pl:[{pl:[padding]}],m:[{m:[margin]}],mx:[{mx:[margin]}],my:[{my:[margin]}],ms:[{ms:[margin]}],me:[{me:[margin]}],mt:[{mt:[margin]}],mr:[{mr:[margin]}],mb:[{mb:[margin]}],ml:[{ml:[margin]}],"space-x":[{"space-x":[space]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[space]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",isArbitraryValue,spacing]}],"min-w":[{"min-w":[isArbitraryValue,spacing,"min","max","fit"]}],"max-w":[{"max-w":[isArbitraryValue,spacing,"none","full","min","max","fit","prose",{screen:[isTshirtSize]},isTshirtSize]}],h:[{h:[isArbitraryValue,spacing,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[isArbitraryValue,spacing,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[isArbitraryValue,spacing,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[isArbitraryValue,spacing,"auto","min","max","fit"]}],"font-size":[{text:["base",isTshirtSize,isArbitraryLength]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",isArbitraryNumber]}],"font-family":[{font:[isAny]}],"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:["tighter","tight","normal","wide","wider","widest",isArbitraryValue]}],"line-clamp":[{"line-clamp":["none",isNumber,isArbitraryNumber]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",isLength,isArbitraryValue]}],"list-image":[{"list-image":["none",isArbitraryValue]}],"list-style-type":[{list:["none","disc","decimal",isArbitraryValue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[colors]}],"placeholder-opacity":[{"placeholder-opacity":[opacity]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[colors]}],"text-opacity":[{"text-opacity":[opacity]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...getLineStyles(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",isLength,isArbitraryLength]}],"underline-offset":[{"underline-offset":["auto",isLength,isArbitraryValue]}],"text-decoration-color":[{decoration:[colors]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:getSpacingWithArbitrary()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",isArbitraryValue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",isArbitraryValue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[opacity]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...getPositions(),isArbitraryPosition]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",isArbitrarySize]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},isArbitraryImage]}],"bg-color":[{bg:[colors]}],"gradient-from-pos":[{from:[gradientColorStopPositions]}],"gradient-via-pos":[{via:[gradientColorStopPositions]}],"gradient-to-pos":[{to:[gradientColorStopPositions]}],"gradient-from":[{from:[gradientColorStops]}],"gradient-via":[{via:[gradientColorStops]}],"gradient-to":[{to:[gradientColorStops]}],rounded:[{rounded:[borderRadius]}],"rounded-s":[{"rounded-s":[borderRadius]}],"rounded-e":[{"rounded-e":[borderRadius]}],"rounded-t":[{"rounded-t":[borderRadius]}],"rounded-r":[{"rounded-r":[borderRadius]}],"rounded-b":[{"rounded-b":[borderRadius]}],"rounded-l":[{"rounded-l":[borderRadius]}],"rounded-ss":[{"rounded-ss":[borderRadius]}],"rounded-se":[{"rounded-se":[borderRadius]}],"rounded-ee":[{"rounded-ee":[borderRadius]}],"rounded-es":[{"rounded-es":[borderRadius]}],"rounded-tl":[{"rounded-tl":[borderRadius]}],"rounded-tr":[{"rounded-tr":[borderRadius]}],"rounded-br":[{"rounded-br":[borderRadius]}],"rounded-bl":[{"rounded-bl":[borderRadius]}],"border-w":[{border:[borderWidth]}],"border-w-x":[{"border-x":[borderWidth]}],"border-w-y":[{"border-y":[borderWidth]}],"border-w-s":[{"border-s":[borderWidth]}],"border-w-e":[{"border-e":[borderWidth]}],"border-w-t":[{"border-t":[borderWidth]}],"border-w-r":[{"border-r":[borderWidth]}],"border-w-b":[{"border-b":[borderWidth]}],"border-w-l":[{"border-l":[borderWidth]}],"border-opacity":[{"border-opacity":[opacity]}],"border-style":[{border:[...getLineStyles(),"hidden"]}],"divide-x":[{"divide-x":[borderWidth]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[borderWidth]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[opacity]}],"divide-style":[{divide:getLineStyles()}],"border-color":[{border:[borderColor]}],"border-color-x":[{"border-x":[borderColor]}],"border-color-y":[{"border-y":[borderColor]}],"border-color-s":[{"border-s":[borderColor]}],"border-color-e":[{"border-e":[borderColor]}],"border-color-t":[{"border-t":[borderColor]}],"border-color-r":[{"border-r":[borderColor]}],"border-color-b":[{"border-b":[borderColor]}],"border-color-l":[{"border-l":[borderColor]}],"divide-color":[{divide:[borderColor]}],"outline-style":[{outline:["",...getLineStyles()]}],"outline-offset":[{"outline-offset":[isLength,isArbitraryValue]}],"outline-w":[{outline:[isLength,isArbitraryLength]}],"outline-color":[{outline:[colors]}],"ring-w":[{ring:getLengthWithEmptyAndArbitrary()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[colors]}],"ring-opacity":[{"ring-opacity":[opacity]}],"ring-offset-w":[{"ring-offset":[isLength,isArbitraryLength]}],"ring-offset-color":[{"ring-offset":[colors]}],shadow:[{shadow:["","inner","none",isTshirtSize,isArbitraryShadow]}],"shadow-color":[{shadow:[isAny]}],opacity:[{opacity:[opacity]}],"mix-blend":[{"mix-blend":[...getBlendModes(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":getBlendModes()}],filter:[{filter:["","none"]}],blur:[{blur:[blur]}],brightness:[{brightness:[brightness]}],contrast:[{contrast:[contrast]}],"drop-shadow":[{"drop-shadow":["","none",isTshirtSize,isArbitraryValue]}],grayscale:[{grayscale:[grayscale]}],"hue-rotate":[{"hue-rotate":[hueRotate]}],invert:[{invert:[invert]}],saturate:[{saturate:[saturate]}],sepia:[{sepia:[sepia]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[blur]}],"backdrop-brightness":[{"backdrop-brightness":[brightness]}],"backdrop-contrast":[{"backdrop-contrast":[contrast]}],"backdrop-grayscale":[{"backdrop-grayscale":[grayscale]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[hueRotate]}],"backdrop-invert":[{"backdrop-invert":[invert]}],"backdrop-opacity":[{"backdrop-opacity":[opacity]}],"backdrop-saturate":[{"backdrop-saturate":[saturate]}],"backdrop-sepia":[{"backdrop-sepia":[sepia]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[borderSpacing]}],"border-spacing-x":[{"border-spacing-x":[borderSpacing]}],"border-spacing-y":[{"border-spacing-y":[borderSpacing]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",isArbitraryValue]}],duration:[{duration:getNumberAndArbitrary()}],ease:[{ease:["linear","in","out","in-out",isArbitraryValue]}],delay:[{delay:getNumberAndArbitrary()}],animate:[{animate:["none","spin","ping","pulse","bounce",isArbitraryValue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[scale]}],"scale-x":[{"scale-x":[scale]}],"scale-y":[{"scale-y":[scale]}],rotate:[{rotate:[isInteger,isArbitraryValue]}],"translate-x":[{"translate-x":[translate]}],"translate-y":[{"translate-y":[translate]}],"skew-x":[{"skew-x":[skew]}],"skew-y":[{"skew-y":[skew]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",isArbitraryValue]}],accent:[{accent:["auto",colors]}],appearance:[{appearance:["none","auto"]}],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",isArbitraryValue]}],"caret-color":[{caret:[colors]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":getSpacingWithArbitrary()}],"scroll-mx":[{"scroll-mx":getSpacingWithArbitrary()}],"scroll-my":[{"scroll-my":getSpacingWithArbitrary()}],"scroll-ms":[{"scroll-ms":getSpacingWithArbitrary()}],"scroll-me":[{"scroll-me":getSpacingWithArbitrary()}],"scroll-mt":[{"scroll-mt":getSpacingWithArbitrary()}],"scroll-mr":[{"scroll-mr":getSpacingWithArbitrary()}],"scroll-mb":[{"scroll-mb":getSpacingWithArbitrary()}],"scroll-ml":[{"scroll-ml":getSpacingWithArbitrary()}],"scroll-p":[{"scroll-p":getSpacingWithArbitrary()}],"scroll-px":[{"scroll-px":getSpacingWithArbitrary()}],"scroll-py":[{"scroll-py":getSpacingWithArbitrary()}],"scroll-ps":[{"scroll-ps":getSpacingWithArbitrary()}],"scroll-pe":[{"scroll-pe":getSpacingWithArbitrary()}],"scroll-pt":[{"scroll-pt":getSpacingWithArbitrary()}],"scroll-pr":[{"scroll-pr":getSpacingWithArbitrary()}],"scroll-pb":[{"scroll-pb":getSpacingWithArbitrary()}],"scroll-pl":[{"scroll-pl":getSpacingWithArbitrary()}],"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",isArbitraryValue]}],fill:[{fill:[colors,"none"]}],"stroke-w":[{stroke:[isLength,isArbitraryLength,isArbitraryNumber]}],stroke:[{stroke:[colors,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}});var SpecialModule1=((SpecialModule={})[SpecialModule.POLYFILL_MODULE=0]="POLYFILL_MODULE",SpecialModule[SpecialModule.POLYFILL_NOMODULE=1]="POLYFILL_NOMODULE",SpecialModule);function cn(...inputs){return twMerge(clsx(inputs))}async function fetchStrict(url){let res;try{res=await fetch(url)}catch(err){throw new NetworkError(`Failed to fetch ${url}`,{cause:err})}if(!res.ok)throw Error(`Failed to fetch ${url}: ${res.status} ${res.statusText}`);return res}async function jsonFetcher(url){return(await fetchStrict(url)).json()}function getSpecialModuleType(analyzeData,sourceIndex){if(!analyzeData||null==sourceIndex)return null;let path=analyzeData.source(sourceIndex)?.path||"";return path.endsWith("polyfill-module.js")?SpecialModule1.POLYFILL_MODULE:path.endsWith("polyfill-nomodule.js")?SpecialModule1.POLYFILL_NOMODULE:null}function formatBytes(bytes){return 0===bytes?"0 B":bytes<1024?`${bytes} B`:bytes<1048576?`${(bytes/1024).toFixed(2)} KB`:bytes<0x40000000?`${(bytes/1048576).toFixed(2)} MB`:`${(bytes/0x40000000).toFixed(2)} GB`}let IDENT_ATTRIBUTES_REGEXP=/^(.+?)(?: \{(.*)\})?(?: \[(.*)\])?(?: \((.*?)\))?(?: <(.*?)>)?$/;function splitIdent(ident){let[match,fullPath,templateArgs,layer,moduleType,treeShaking]=IDENT_ATTRIBUTES_REGEXP.exec(ident)||[""];return ident=ident.substring(0,ident.length-match.length),{fullPath,templateArgs,layer,moduleType,treeShaking}}let Input=__TURBOPACK__imported__module__66626__.forwardRef(({className,type,...props},ref)=>(0,__TURBOPACK__imported__module__2710__.jsx)("input",{type:type,className:cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",className),ref:ref,...props}));function Kbd({className,...props}){return(0,__TURBOPACK__imported__module__2710__.jsx)("kbd",{"data-slot":"kbd",className:cn("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none","[&_svg:not([class*='size-'])]:size-3","[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",className),...props})}function FileSearch({value:value1,onChange}){let[focused,setFocused]=(0,__TURBOPACK__imported__module__66626__.useState)(!1),inputRef=(0,__TURBOPACK__imported__module__66626__.useRef)(null);return(0,__TURBOPACK__imported__module__66626__.useEffect)(()=>{let handleKeyDown=e=>{"/"!==e.key||["INPUT","TEXTAREA"].includes(e.target.tagName)?"Escape"===e.key&&document.activeElement===inputRef.current&&(e.preventDefault(),onChange(""),inputRef.current?.blur()):(e.preventDefault(),inputRef.current?.focus())};return window.addEventListener("keydown",handleKeyDown),()=>window.removeEventListener("keydown",handleKeyDown)},[onChange]),(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"relative",children:[(0,__TURBOPACK__imported__module__2710__.jsx)(Input,{ref:inputRef,type:"search",value:value1,onChange:e=>onChange(e.target.value),onFocus:()=>{setFocused(!0)},onBlur:()=>{setFocused(!1)},placeholder:"Search files...",className:"w-48 focus:w-80 transition-all duration-200 pr-8"}),!value1&&!focused&&(0,__TURBOPACK__imported__module__2710__.jsx)(Kbd,{className:"absolute right-2 top-1/2 -translate-y-1/2",children:"/"})]})}Input.displayName="Input";let Check=createLucideIcon("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),ChevronsUpDown=createLucideIcon("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),Loader=createLucideIcon("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]),Route=createLucideIcon("route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);function setRef(ref,value1){if("function"==typeof ref)return ref(value1);null!=ref&&(ref.current=value1)}function composeRefs(...refs){return node=>{let hasCleanup=!1,cleanups=refs.map(ref=>{let cleanup=setRef(ref,node);return hasCleanup||"function"!=typeof cleanup||(hasCleanup=!0),cleanup});if(hasCleanup)return()=>{for(let i=0;i<cleanups.length;i++){let cleanup=cleanups[i];"function"==typeof cleanup?cleanup():setRef(refs[i],null)}}}}function useComposedRefs(...refs){return __TURBOPACK__imported__module__66626__.useCallback(composeRefs(...refs),refs)}var Slot=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{children,...slotProps}=props,childrenArray=__TURBOPACK__imported__module__66626__.Children.toArray(children),slottable=childrenArray.find(isSlottable);if(slottable){let newElement=slottable.props.children,newChildren=childrenArray.map(child=>child!==slottable?child:__TURBOPACK__imported__module__66626__.Children.count(newElement)>1?__TURBOPACK__imported__module__66626__.Children.only(null):__TURBOPACK__imported__module__66626__.isValidElement(newElement)?newElement.props.children:null);return(0,__TURBOPACK__imported__module__2710__.jsx)(SlotClone,{...slotProps,ref:forwardedRef,children:__TURBOPACK__imported__module__66626__.isValidElement(newElement)?__TURBOPACK__imported__module__66626__.cloneElement(newElement,void 0,newChildren):null})}return(0,__TURBOPACK__imported__module__2710__.jsx)(SlotClone,{...slotProps,ref:forwardedRef,children})});Slot.displayName="Slot";var SlotClone=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{children,...slotProps}=props;if(__TURBOPACK__imported__module__66626__.isValidElement(children)){let childrenRef=getElementRef(children);return __TURBOPACK__imported__module__66626__.cloneElement(children,{...mergeProps(slotProps,children.props),ref:forwardedRef?composeRefs(forwardedRef,childrenRef):childrenRef})}return __TURBOPACK__imported__module__66626__.Children.count(children)>1?__TURBOPACK__imported__module__66626__.Children.only(null):null});SlotClone.displayName="SlotClone";var Slottable=({children})=>(0,__TURBOPACK__imported__module__2710__.jsx)(__TURBOPACK__imported__module__2710__.Fragment,{children});function isSlottable(child){return __TURBOPACK__imported__module__66626__.isValidElement(child)&&child.type===Slottable}function mergeProps(slotProps,childProps){let overrideProps={...childProps};for(let propName in childProps){let slotPropValue=slotProps[propName],childPropValue=childProps[propName];/^on[A-Z]/.test(propName)?slotPropValue&&childPropValue?overrideProps[propName]=(...args)=>{childPropValue(...args),slotPropValue(...args)}:slotPropValue&&(overrideProps[propName]=slotPropValue):"style"===propName?overrideProps[propName]={...slotPropValue,...childPropValue}:"className"===propName&&(overrideProps[propName]=[slotPropValue,childPropValue].filter(Boolean).join(" "))}return{...slotProps,...overrideProps}}function getElementRef(element){let getter=Object.getOwnPropertyDescriptor(element.props,"ref")?.get,mayWarn=getter&&"isReactWarning"in getter&&getter.isReactWarning;return mayWarn?element.ref:(mayWarn=(getter=Object.getOwnPropertyDescriptor(element,"ref")?.get)&&"isReactWarning"in getter&&getter.isReactWarning)?element.props.ref:element.props.ref||element.ref}let falsyToString=value1=>"boolean"==typeof value1?`${value1}`:0===value1?"0":value1,cx=clsx,cva=(base,config)=>props=>{var _config_compoundVariants;if((null==config?void 0:config.variants)==null)return cx(base,null==props?void 0:props.class,null==props?void 0:props.className);let{variants,defaultVariants}=config,getVariantClassNames=Object.keys(variants).map(variant=>{let variantProp=null==props?void 0:props[variant],defaultVariantProp=null==defaultVariants?void 0:defaultVariants[variant];if(null===variantProp)return null;let variantKey=falsyToString(variantProp)||falsyToString(defaultVariantProp);return variants[variant][variantKey]}),propsWithoutUndefined=props&&Object.entries(props).reduce((acc,param)=>{let[key,value1]=param;return void 0===value1||(acc[key]=value1),acc},{});return cx(base,getVariantClassNames,null==config||null==(_config_compoundVariants=config.compoundVariants)?void 0:_config_compoundVariants.reduce((acc,param)=>{let{class:cvClass,className:cvClassName,...compoundVariantOptions}=param;return Object.entries(compoundVariantOptions).every(param=>{let[key,value1]=param;return Array.isArray(value1)?value1.includes({...defaultVariants,...propsWithoutUndefined}[key]):({...defaultVariants,...propsWithoutUndefined})[key]===value1})?[...acc,cvClass,cvClassName]:acc},[]),null==props?void 0:props.class,null==props?void 0:props.className)},buttonVariants=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Button=__TURBOPACK__imported__module__66626__.forwardRef(({className,variant,size,asChild=!1,...props},ref)=>{let Comp=asChild?Slot:"button";return(0,__TURBOPACK__imported__module__2710__.jsx)(Comp,{className:cn(buttonVariants({variant,size,className})),ref:ref,...props})});Button.displayName="Button";var m=/[\\\/_+.#"@\[\(\{&]/,B=/[\\\/_+.#"@\[\(\{&]/g,K=/[\s-]/,X=/[\s-]/g;function G(_,C,h,P,A,f,O){if(f===C.length)return A===_.length?1:.99;var T=`${A},${f}`;if(void 0!==O[T])return O[T];for(var E,N,R,M,L=P.charAt(f),c=h.indexOf(L,A),S=0;c>=0;)(E=G(_,C,h,P,c+1,f+1,O))>S&&(c===A?E*=1:m.test(_.charAt(c-1))?(E*=.8,(R=_.slice(A,c-1).match(B))&&A>0&&(E*=Math.pow(.999,R.length))):K.test(_.charAt(c-1))?(E*=.9,(M=_.slice(A,c-1).match(X))&&A>0&&(E*=Math.pow(.999,M.length))):(E*=.17,A>0&&(E*=Math.pow(.999,c-A))),_.charAt(c)!==C.charAt(f)&&(E*=.9999)),(E<.1&&h.charAt(c-1)===P.charAt(f+1)||P.charAt(f+1)===P.charAt(f)&&h.charAt(c-1)!==P.charAt(f))&&.1*(N=G(_,C,h,P,c+1,f+2,O))>E&&(E=.1*N),E>S&&(S=E),c=h.indexOf(L,c+1);return O[T]=S,S}function D(_){return _.toLowerCase().replace(X," ")}function W(_,C,h){return G(_=h&&h.length>0?`${_+" "+h.join(" ")}`:_,C,D(_),D(C),0,0,{})}function composeEventHandlers(originalEventHandler,ourEventHandler,{checkForDefaultPrevented=!0}={}){return function handleEvent(event){if(originalEventHandler?.(event),!1===checkForDefaultPrevented||!event.defaultPrevented)return ourEventHandler?.(event)}}function createContext2(rootComponentName,defaultContext){let Context=__TURBOPACK__imported__module__66626__.createContext(defaultContext),Provider=props=>{let{children,...context}=props,value1=__TURBOPACK__imported__module__66626__.useMemo(()=>context,Object.values(context));return(0,__TURBOPACK__imported__module__2710__.jsx)(Context.Provider,{value:value1,children})};return Provider.displayName=rootComponentName+"Provider",[Provider,function useContext2(consumerName){let context=__TURBOPACK__imported__module__66626__.useContext(Context);if(context)return context;if(void 0!==defaultContext)return defaultContext;throw Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``)}]}function createContextScope(scopeName,createContextScopeDeps=[]){let defaultContexts=[];function createContext3(rootComponentName,defaultContext){let BaseContext=__TURBOPACK__imported__module__66626__.createContext(defaultContext),index=defaultContexts.length;defaultContexts=[...defaultContexts,defaultContext];let Provider=props=>{let{scope,children,...context}=props,Context=scope?.[scopeName]?.[index]||BaseContext,value1=__TURBOPACK__imported__module__66626__.useMemo(()=>context,Object.values(context));return(0,__TURBOPACK__imported__module__2710__.jsx)(Context.Provider,{value:value1,children})};return Provider.displayName=rootComponentName+"Provider",[Provider,function useContext2(consumerName,scope){let Context=scope?.[scopeName]?.[index]||BaseContext,context=__TURBOPACK__imported__module__66626__.useContext(Context);if(context)return context;if(void 0!==defaultContext)return defaultContext;throw Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``)}]}let createScope=()=>{let scopeContexts=defaultContexts.map(defaultContext=>__TURBOPACK__imported__module__66626__.createContext(defaultContext));return function useScope(scope){let contexts=scope?.[scopeName]||scopeContexts;return __TURBOPACK__imported__module__66626__.useMemo(()=>({[`__scope${scopeName}`]:{...scope,[scopeName]:contexts}}),[scope,contexts])}};return createScope.scopeName=scopeName,[createContext3,composeContextScopes(createScope,...createContextScopeDeps)]}function composeContextScopes(...scopes){let baseScope=scopes[0];if(1===scopes.length)return baseScope;let createScope=()=>{let scopeHooks=scopes.map(createScope2=>({useScope:createScope2(),scopeName:createScope2.scopeName}));return function useComposedScopes(overrideScopes){let nextScopes=scopeHooks.reduce((nextScopes2,{useScope,scopeName})=>{let currentScope=useScope(overrideScopes)[`__scope${scopeName}`];return{...nextScopes2,...currentScope}},{});return __TURBOPACK__imported__module__66626__.useMemo(()=>({[`__scope${baseScope.scopeName}`]:nextScopes}),[nextScopes])}};return createScope.scopeName=baseScope.scopeName,createScope}var useLayoutEffect2=globalThis?.document?__TURBOPACK__imported__module__66626__.useLayoutEffect:()=>{},useReactId=__TURBOPACK__imported__module__66626__["useId".toString()]||(()=>void 0),count=0;function useId(deterministicId){let[id,setId]=__TURBOPACK__imported__module__66626__.useState(useReactId());return useLayoutEffect2(()=>{deterministicId||setId(reactId=>reactId??String(count++))},[deterministicId]),deterministicId||(id?`radix-${id}`:"")}function useCallbackRef(callback){let callbackRef=__TURBOPACK__imported__module__66626__.useRef(callback);return __TURBOPACK__imported__module__66626__.useEffect(()=>{callbackRef.current=callback}),__TURBOPACK__imported__module__66626__.useMemo(()=>(...args)=>callbackRef.current?.(...args),[])}function useControllableState({prop,defaultProp,onChange=()=>{}}){let[uncontrolledProp,setUncontrolledProp]=useUncontrolledState({defaultProp,onChange}),isControlled=void 0!==prop,value1=isControlled?prop:uncontrolledProp,handleChange=useCallbackRef(onChange);return[value1,__TURBOPACK__imported__module__66626__.useCallback(nextValue=>{if(isControlled){let value2="function"==typeof nextValue?nextValue(prop):nextValue;value2!==prop&&handleChange(value2)}else setUncontrolledProp(nextValue)},[isControlled,prop,setUncontrolledProp,handleChange])]}function useUncontrolledState({defaultProp,onChange}){let uncontrolledState=__TURBOPACK__imported__module__66626__.useState(defaultProp),[value1]=uncontrolledState,prevValueRef=__TURBOPACK__imported__module__66626__.useRef(value1),handleChange=useCallbackRef(onChange);return __TURBOPACK__imported__module__66626__.useEffect(()=>{prevValueRef.current!==value1&&(handleChange(value1),prevValueRef.current=value1)},[value1,prevValueRef,handleChange]),uncontrolledState}var __TURBOPACK__imported__module__79892__=__turbopack_context__.i(79892),Primitive=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((primitive,node)=>{let Node1=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{asChild,...primitiveProps}=props,Comp=asChild?Slot:node;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,__TURBOPACK__imported__module__2710__.jsx)(Comp,{...primitiveProps,ref:forwardedRef})});return Node1.displayName=`Primitive.${node}`,{...primitive,[node]:Node1}},{});function dispatchDiscreteCustomEvent(target,event){target&&__TURBOPACK__imported__module__79892__.flushSync(()=>target.dispatchEvent(event))}function useEscapeKeydown(onEscapeKeyDownProp,ownerDocument=globalThis?.document){let onEscapeKeyDown=useCallbackRef(onEscapeKeyDownProp);__TURBOPACK__imported__module__66626__.useEffect(()=>{let handleKeyDown=event=>{"Escape"===event.key&&onEscapeKeyDown(event)};return ownerDocument.addEventListener("keydown",handleKeyDown,{capture:!0}),()=>ownerDocument.removeEventListener("keydown",handleKeyDown,{capture:!0})},[onEscapeKeyDown,ownerDocument])}var CONTEXT_UPDATE="dismissableLayer.update",DismissableLayerContext=__TURBOPACK__imported__module__66626__.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),DismissableLayer=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{disableOutsidePointerEvents=!1,onEscapeKeyDown,onPointerDownOutside,onFocusOutside,onInteractOutside,onDismiss,...layerProps}=props,context=__TURBOPACK__imported__module__66626__.useContext(DismissableLayerContext),[node,setNode]=__TURBOPACK__imported__module__66626__.useState(null),ownerDocument=node?.ownerDocument??globalThis?.document,[,force]=__TURBOPACK__imported__module__66626__.useState({}),composedRefs=useComposedRefs(forwardedRef,node2=>setNode(node2)),layers=Array.from(context.layers),[highestLayerWithOutsidePointerEventsDisabled]=[...context.layersWithOutsidePointerEventsDisabled].slice(-1),highestLayerWithOutsidePointerEventsDisabledIndex=layers.indexOf(highestLayerWithOutsidePointerEventsDisabled),index=node?layers.indexOf(node):-1,isBodyPointerEventsDisabled=context.layersWithOutsidePointerEventsDisabled.size>0,isPointerEventsEnabled=index>=highestLayerWithOutsidePointerEventsDisabledIndex,pointerDownOutside=usePointerDownOutside(event=>{let target=event.target,isPointerDownOnBranch=[...context.branches].some(branch=>branch.contains(target));isPointerEventsEnabled&&!isPointerDownOnBranch&&(onPointerDownOutside?.(event),onInteractOutside?.(event),event.defaultPrevented||onDismiss?.())},ownerDocument),focusOutside=useFocusOutside(event=>{let target=event.target;![...context.branches].some(branch=>branch.contains(target))&&(onFocusOutside?.(event),onInteractOutside?.(event),event.defaultPrevented||onDismiss?.())},ownerDocument);return useEscapeKeydown(event=>{index===context.layers.size-1&&(onEscapeKeyDown?.(event),!event.defaultPrevented&&onDismiss&&(event.preventDefault(),onDismiss()))},ownerDocument),__TURBOPACK__imported__module__66626__.useEffect(()=>{if(node)return disableOutsidePointerEvents&&(0===context.layersWithOutsidePointerEventsDisabled.size&&(originalBodyPointerEvents=ownerDocument.body.style.pointerEvents,ownerDocument.body.style.pointerEvents="none"),context.layersWithOutsidePointerEventsDisabled.add(node)),context.layers.add(node),dispatchUpdate(),()=>{disableOutsidePointerEvents&&1===context.layersWithOutsidePointerEventsDisabled.size&&(ownerDocument.body.style.pointerEvents=originalBodyPointerEvents)}},[node,ownerDocument,disableOutsidePointerEvents,context]),__TURBOPACK__imported__module__66626__.useEffect(()=>()=>{node&&(context.layers.delete(node),context.layersWithOutsidePointerEventsDisabled.delete(node),dispatchUpdate())},[node,context]),__TURBOPACK__imported__module__66626__.useEffect(()=>{let handleUpdate=()=>force({});return document.addEventListener(CONTEXT_UPDATE,handleUpdate),()=>document.removeEventListener(CONTEXT_UPDATE,handleUpdate)},[]),(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive.div,{...layerProps,ref:composedRefs,style:{pointerEvents:isBodyPointerEventsDisabled?isPointerEventsEnabled?"auto":"none":void 0,...props.style},onFocusCapture:composeEventHandlers(props.onFocusCapture,focusOutside.onFocusCapture),onBlurCapture:composeEventHandlers(props.onBlurCapture,focusOutside.onBlurCapture),onPointerDownCapture:composeEventHandlers(props.onPointerDownCapture,pointerDownOutside.onPointerDownCapture)})});function usePointerDownOutside(onPointerDownOutside,ownerDocument=globalThis?.document){let handlePointerDownOutside=useCallbackRef(onPointerDownOutside),isPointerInsideReactTreeRef=__TURBOPACK__imported__module__66626__.useRef(!1),handleClickRef=__TURBOPACK__imported__module__66626__.useRef(()=>{});return __TURBOPACK__imported__module__66626__.useEffect(()=>{let handlePointerDown=event=>{if(event.target&&!isPointerInsideReactTreeRef.current){let handleAndDispatchPointerDownOutsideEvent2=function(){handleAndDispatchCustomEvent("dismissableLayer.pointerDownOutside",handlePointerDownOutside,eventDetail,{discrete:!0})},eventDetail={originalEvent:event};"touch"===event.pointerType?(ownerDocument.removeEventListener("click",handleClickRef.current),handleClickRef.current=handleAndDispatchPointerDownOutsideEvent2,ownerDocument.addEventListener("click",handleClickRef.current,{once:!0})):handleAndDispatchPointerDownOutsideEvent2()}else ownerDocument.removeEventListener("click",handleClickRef.current);isPointerInsideReactTreeRef.current=!1},timerId=window.setTimeout(()=>{ownerDocument.addEventListener("pointerdown",handlePointerDown)},0);return()=>{window.clearTimeout(timerId),ownerDocument.removeEventListener("pointerdown",handlePointerDown),ownerDocument.removeEventListener("click",handleClickRef.current)}},[ownerDocument,handlePointerDownOutside]),{onPointerDownCapture:()=>isPointerInsideReactTreeRef.current=!0}}function useFocusOutside(onFocusOutside,ownerDocument=globalThis?.document){let handleFocusOutside=useCallbackRef(onFocusOutside),isFocusInsideReactTreeRef=__TURBOPACK__imported__module__66626__.useRef(!1);return __TURBOPACK__imported__module__66626__.useEffect(()=>{let handleFocus=event=>{event.target&&!isFocusInsideReactTreeRef.current&&handleAndDispatchCustomEvent("dismissableLayer.focusOutside",handleFocusOutside,{originalEvent:event},{discrete:!1})};return ownerDocument.addEventListener("focusin",handleFocus),()=>ownerDocument.removeEventListener("focusin",handleFocus)},[ownerDocument,handleFocusOutside]),{onFocusCapture:()=>isFocusInsideReactTreeRef.current=!0,onBlurCapture:()=>isFocusInsideReactTreeRef.current=!1}}function dispatchUpdate(){let event=new CustomEvent(CONTEXT_UPDATE);document.dispatchEvent(event)}function handleAndDispatchCustomEvent(name,handler,detail,{discrete}){let target=detail.originalEvent.target,event=new CustomEvent(name,{bubbles:!1,cancelable:!0,detail});handler&&target.addEventListener(name,handler,{once:!0}),discrete?dispatchDiscreteCustomEvent(target,event):target.dispatchEvent(event)}DismissableLayer.displayName="DismissableLayer",__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let context=__TURBOPACK__imported__module__66626__.useContext(DismissableLayerContext),ref=__TURBOPACK__imported__module__66626__.useRef(null),composedRefs=useComposedRefs(forwardedRef,ref);return __TURBOPACK__imported__module__66626__.useEffect(()=>{let node=ref.current;if(node)return context.branches.add(node),()=>{context.branches.delete(node)}},[context.branches]),(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive.div,{...props,ref:composedRefs})}).displayName="DismissableLayerBranch";var AUTOFOCUS_ON_MOUNT="focusScope.autoFocusOnMount",AUTOFOCUS_ON_UNMOUNT="focusScope.autoFocusOnUnmount",EVENT_OPTIONS={bubbles:!1,cancelable:!0},FocusScope=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{loop=!1,trapped=!1,onMountAutoFocus:onMountAutoFocusProp,onUnmountAutoFocus:onUnmountAutoFocusProp,...scopeProps}=props,[container,setContainer]=__TURBOPACK__imported__module__66626__.useState(null),onMountAutoFocus=useCallbackRef(onMountAutoFocusProp),onUnmountAutoFocus=useCallbackRef(onUnmountAutoFocusProp),lastFocusedElementRef=__TURBOPACK__imported__module__66626__.useRef(null),composedRefs=useComposedRefs(forwardedRef,node=>setContainer(node)),focusScope=__TURBOPACK__imported__module__66626__.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;__TURBOPACK__imported__module__66626__.useEffect(()=>{if(trapped){let handleFocusIn2=function(event){if(focusScope.paused||!container)return;let target=event.target;container.contains(target)?lastFocusedElementRef.current=target:focus(lastFocusedElementRef.current,{select:!0})},handleFocusOut2=function(event){if(focusScope.paused||!container)return;let relatedTarget=event.relatedTarget;null!==relatedTarget&&(container.contains(relatedTarget)||focus(lastFocusedElementRef.current,{select:!0}))};document.addEventListener("focusin",handleFocusIn2),document.addEventListener("focusout",handleFocusOut2);let mutationObserver=new MutationObserver(function(mutations){if(document.activeElement===document.body)for(let mutation of mutations)mutation.removedNodes.length>0&&focus(container)});return container&&mutationObserver.observe(container,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",handleFocusIn2),document.removeEventListener("focusout",handleFocusOut2),mutationObserver.disconnect()}}},[trapped,container,focusScope.paused]),__TURBOPACK__imported__module__66626__.useEffect(()=>{if(container){focusScopesStack.add(focusScope);let previouslyFocusedElement=document.activeElement;if(!container.contains(previouslyFocusedElement)){let mountEvent=new CustomEvent(AUTOFOCUS_ON_MOUNT,EVENT_OPTIONS);container.addEventListener(AUTOFOCUS_ON_MOUNT,onMountAutoFocus),container.dispatchEvent(mountEvent),mountEvent.defaultPrevented||(focusFirst(removeLinks(getTabbableCandidates(container)),{select:!0}),document.activeElement===previouslyFocusedElement&&focus(container))}return()=>{container.removeEventListener(AUTOFOCUS_ON_MOUNT,onMountAutoFocus),setTimeout(()=>{let unmountEvent=new CustomEvent(AUTOFOCUS_ON_UNMOUNT,EVENT_OPTIONS);container.addEventListener(AUTOFOCUS_ON_UNMOUNT,onUnmountAutoFocus),container.dispatchEvent(unmountEvent),unmountEvent.defaultPrevented||focus(previouslyFocusedElement??document.body,{select:!0}),container.removeEventListener(AUTOFOCUS_ON_UNMOUNT,onUnmountAutoFocus),focusScopesStack.remove(focusScope)},0)}}},[container,onMountAutoFocus,onUnmountAutoFocus,focusScope]);let handleKeyDown=__TURBOPACK__imported__module__66626__.useCallback(event=>{if(!loop&&!trapped||focusScope.paused)return;let isTabKey="Tab"===event.key&&!event.altKey&&!event.ctrlKey&&!event.metaKey,focusedElement=document.activeElement;if(isTabKey&&focusedElement){let container2=event.currentTarget,[first,last]=getTabbableEdges(container2);first&&last?event.shiftKey||focusedElement!==last?event.shiftKey&&focusedElement===first&&(event.preventDefault(),loop&&focus(last,{select:!0})):(event.preventDefault(),loop&&focus(first,{select:!0})):focusedElement===container2&&event.preventDefault()}},[loop,trapped,focusScope.paused]);return(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive.div,{tabIndex:-1,...scopeProps,ref:composedRefs,onKeyDown:handleKeyDown})});function focusFirst(candidates,{select=!1}={}){let previouslyFocusedElement=document.activeElement;for(let candidate of candidates)if(focus(candidate,{select}),document.activeElement!==previouslyFocusedElement)return}function getTabbableEdges(container){let candidates=getTabbableCandidates(container);return[findVisible(candidates,container),findVisible(candidates.reverse(),container)]}function getTabbableCandidates(container){let nodes=[],walker=document.createTreeWalker(container,NodeFilter.SHOW_ELEMENT,{acceptNode:node=>{let isHiddenInput="INPUT"===node.tagName&&"hidden"===node.type;return node.disabled||node.hidden||isHiddenInput?NodeFilter.FILTER_SKIP:node.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;walker.nextNode();)nodes.push(walker.currentNode);return nodes}function findVisible(elements,container){for(let element of elements)if(!isHidden(element,{upTo:container}))return element}function isHidden(node,{upTo}){if("hidden"===getComputedStyle(node).visibility)return!0;for(;node&&(void 0===upTo||node!==upTo);){if("none"===getComputedStyle(node).display)return!0;node=node.parentElement}return!1}function isSelectableInput(element){return element instanceof HTMLInputElement&&"select"in element}function focus(element,{select=!1}={}){if(element&&element.focus){let previouslyFocusedElement=document.activeElement;element.focus({preventScroll:!0}),element!==previouslyFocusedElement&&isSelectableInput(element)&&select&&element.select()}}FocusScope.displayName="FocusScope";var focusScopesStack=createFocusScopesStack();function createFocusScopesStack(){let stack=[];return{add(focusScope){let activeFocusScope=stack[0];focusScope!==activeFocusScope&&activeFocusScope?.pause(),(stack=arrayRemove(stack,focusScope)).unshift(focusScope)},remove(focusScope){stack=arrayRemove(stack,focusScope),stack[0]?.resume()}}}function arrayRemove(array,item){let updatedArray=[...array],index=updatedArray.indexOf(item);return -1!==index&&updatedArray.splice(index,1),updatedArray}function removeLinks(items){return items.filter(item=>"A"!==item.tagName)}var Portal=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{container:containerProp,...portalProps}=props,[mounted,setMounted]=__TURBOPACK__imported__module__66626__.useState(!1);useLayoutEffect2(()=>setMounted(!0),[]);let container=containerProp||mounted&&globalThis?.document?.body;return container?__TURBOPACK__imported__module__79892__.default.createPortal((0,__TURBOPACK__imported__module__2710__.jsx)(Primitive.div,{...portalProps,ref:forwardedRef}),container):null});function useStateMachine(initialState,machine){return __TURBOPACK__imported__module__66626__.useReducer((state,event)=>machine[state][event]??state,initialState)}Portal.displayName="Portal";var Presence=props=>{let{present,children}=props,presence=usePresence(present),child="function"==typeof children?children({present:presence.isPresent}):__TURBOPACK__imported__module__66626__.Children.only(children),ref=useComposedRefs(presence.ref,getElementRef1(child));return"function"==typeof children||presence.isPresent?__TURBOPACK__imported__module__66626__.cloneElement(child,{ref}):null};function usePresence(present){let[node,setNode]=__TURBOPACK__imported__module__66626__.useState(),stylesRef=__TURBOPACK__imported__module__66626__.useRef({}),prevPresentRef=__TURBOPACK__imported__module__66626__.useRef(present),prevAnimationNameRef=__TURBOPACK__imported__module__66626__.useRef("none"),[state,send]=useStateMachine(present?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return __TURBOPACK__imported__module__66626__.useEffect(()=>{let currentAnimationName=getAnimationName(stylesRef.current);prevAnimationNameRef.current="mounted"===state?currentAnimationName:"none"},[state]),useLayoutEffect2(()=>{let styles=stylesRef.current,wasPresent=prevPresentRef.current;if(wasPresent!==present){let prevAnimationName=prevAnimationNameRef.current,currentAnimationName=getAnimationName(styles);present?send("MOUNT"):"none"===currentAnimationName||styles?.display==="none"?send("UNMOUNT"):wasPresent&&prevAnimationName!==currentAnimationName?send("ANIMATION_OUT"):send("UNMOUNT"),prevPresentRef.current=present}},[present,send]),useLayoutEffect2(()=>{if(node){let timeoutId,ownerWindow=node.ownerDocument.defaultView??window,handleAnimationEnd=event=>{let isCurrentAnimation=getAnimationName(stylesRef.current).includes(event.animationName);if(event.target===node&&isCurrentAnimation&&(send("ANIMATION_END"),!prevPresentRef.current)){let currentFillMode=node.style.animationFillMode;node.style.animationFillMode="forwards",timeoutId=ownerWindow.setTimeout(()=>{"forwards"===node.style.animationFillMode&&(node.style.animationFillMode=currentFillMode)})}},handleAnimationStart=event=>{event.target===node&&(prevAnimationNameRef.current=getAnimationName(stylesRef.current))};return node.addEventListener("animationstart",handleAnimationStart),node.addEventListener("animationcancel",handleAnimationEnd),node.addEventListener("animationend",handleAnimationEnd),()=>{ownerWindow.clearTimeout(timeoutId),node.removeEventListener("animationstart",handleAnimationStart),node.removeEventListener("animationcancel",handleAnimationEnd),node.removeEventListener("animationend",handleAnimationEnd)}}send("ANIMATION_END")},[node,send]),{isPresent:["mounted","unmountSuspended"].includes(state),ref:__TURBOPACK__imported__module__66626__.useCallback(node2=>{node2&&(stylesRef.current=getComputedStyle(node2)),setNode(node2)},[])}}function getAnimationName(styles){return styles?.animationName||"none"}function getElementRef1(element){let getter=Object.getOwnPropertyDescriptor(element.props,"ref")?.get,mayWarn=getter&&"isReactWarning"in getter&&getter.isReactWarning;return mayWarn?element.ref:(mayWarn=(getter=Object.getOwnPropertyDescriptor(element,"ref")?.get)&&"isReactWarning"in getter&&getter.isReactWarning)?element.props.ref:element.props.ref||element.ref}Presence.displayName="Presence";var count1=0;function useFocusGuards(){__TURBOPACK__imported__module__66626__.useEffect(()=>{let edgeGuards=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",edgeGuards[0]??createFocusGuard()),document.body.insertAdjacentElement("beforeend",edgeGuards[1]??createFocusGuard()),count1++,()=>{1===count1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(node=>node.remove()),count1--}},[])}function createFocusGuard(){let element=document.createElement("span");return element.setAttribute("data-radix-focus-guard",""),element.tabIndex=0,element.style.outline="none",element.style.opacity="0",element.style.position="fixed",element.style.pointerEvents="none",element}var __assign=function(){return(__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p]);return t}).apply(this,arguments)};function __rest(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&0>e.indexOf(p)&&(t[p]=s[p]);if(null!=s&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)0>e.indexOf(p[i])&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t}function __spreadArray(to,from,pack){if(pack||2==arguments.length)for(var ar,i=0,l=from.length;i<l;i++)!ar&&i in from||(ar||(ar=Array.prototype.slice.call(from,0,i)),ar[i]=from[i]);return to.concat(ar||Array.prototype.slice.call(from))}var zeroRightClassName=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),fullWidthClassName="width-before-scroll-bar";function assignRef(ref,value1){return"function"==typeof ref?ref(value1):ref&&(ref.current=value1),ref}function useCallbackRef1(initialValue,callback){var ref=(0,__TURBOPACK__imported__module__66626__.useState)(function(){return{value:initialValue,callback:callback,facade:{get current(){return ref.value},set current(value){var last=ref.value;last!==value&&(ref.value=value,ref.callback(value,last))}}}})[0];return ref.callback=callback,ref.facade}var useIsomorphicLayoutEffect1="u">typeof window?__TURBOPACK__imported__module__66626__.useLayoutEffect:__TURBOPACK__imported__module__66626__.useEffect,currentValues=new WeakMap;function useMergeRefs(refs,defaultValue){var callbackRef=useCallbackRef1(defaultValue||null,function(newValue){return refs.forEach(function(ref){return assignRef(ref,newValue)})});return useIsomorphicLayoutEffect1(function(){var oldValue=currentValues.get(callbackRef);if(oldValue){var prevRefs_1=new Set(oldValue),nextRefs_1=new Set(refs),current_1=callbackRef.current;prevRefs_1.forEach(function(ref){nextRefs_1.has(ref)||assignRef(ref,null)}),nextRefs_1.forEach(function(ref){prevRefs_1.has(ref)||assignRef(ref,current_1)})}currentValues.set(callbackRef,refs)},[refs]),callbackRef}function ItoI(a){return a}function innerCreateMedium(defaults,middleware){void 0===middleware&&(middleware=ItoI);var buffer=[],assigned=!1;return{read:function(){if(assigned)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return buffer.length?buffer[buffer.length-1]:defaults},useMedium:function(data){var item=middleware(data,assigned);return buffer.push(item),function(){buffer=buffer.filter(function(x){return x!==item})}},assignSyncMedium:function(cb){for(assigned=!0;buffer.length;){var cbs=buffer;buffer=[],cbs.forEach(cb)}buffer={push:function(x){return cb(x)},filter:function(){return buffer}}},assignMedium:function(cb){assigned=!0;var pendingQueue=[];if(buffer.length){var cbs=buffer;buffer=[],cbs.forEach(cb),pendingQueue=buffer}var executeQueue=function(){var cbs=pendingQueue;pendingQueue=[],cbs.forEach(cb)},cycle=function(){return Promise.resolve().then(executeQueue)};cycle(),buffer={push:function(x){pendingQueue.push(x),cycle()},filter:function(filter){return pendingQueue=pendingQueue.filter(filter),buffer}}}}}var effectCar=(void 0===options&&(options={}),(medium=innerCreateMedium(null)).options=__assign({async:!0,ssr:!1},options),medium),nothing=function(){},RemoveScroll=__TURBOPACK__imported__module__66626__.forwardRef(function(props,parentRef){var ref=__TURBOPACK__imported__module__66626__.useRef(null),_a=__TURBOPACK__imported__module__66626__.useState({onScrollCapture:nothing,onWheelCapture:nothing,onTouchMoveCapture:nothing}),callbacks=_a[0],setCallbacks=_a[1],forwardProps=props.forwardProps,children=props.children,className=props.className,removeScrollBar=props.removeScrollBar,enabled=props.enabled,shards=props.shards,sideCar=props.sideCar,noRelative=props.noRelative,noIsolation=props.noIsolation,inert=props.inert,allowPinchZoom=props.allowPinchZoom,_b=props.as,gapMode=props.gapMode,rest=__rest(props,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),containerRef=useMergeRefs([ref,parentRef]),containerProps=__assign(__assign({},rest),callbacks);return __TURBOPACK__imported__module__66626__.createElement(__TURBOPACK__imported__module__66626__.Fragment,null,enabled&&__TURBOPACK__imported__module__66626__.createElement(sideCar,{sideCar:effectCar,removeScrollBar:removeScrollBar,shards:shards,noRelative:noRelative,noIsolation:noIsolation,inert:inert,setCallbacks:setCallbacks,allowPinchZoom:!!allowPinchZoom,lockRef:ref,gapMode:gapMode}),forwardProps?__TURBOPACK__imported__module__66626__.cloneElement(__TURBOPACK__imported__module__66626__.Children.only(children),__assign(__assign({},containerProps),{ref:containerRef})):__TURBOPACK__imported__module__66626__.createElement(void 0===_b?"div":_b,__assign({},containerProps,{className:className,ref:containerRef}),children))});RemoveScroll.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},RemoveScroll.classNames={fullWidth:fullWidthClassName,zeroRight:zeroRightClassName};var SideCar=function(_a){var sideCar=_a.sideCar,rest=__rest(_a,["sideCar"]);if(!sideCar)throw Error("Sidecar: please provide `sideCar` property to import the right car");var Target=sideCar.read();if(!Target)throw Error("Sidecar medium not found");return __TURBOPACK__imported__module__66626__.createElement(Target,__assign({},rest))};function exportSidecar(medium,exported){return medium.useMedium(exported),SideCar}function makeStyleTag(){if(!document)return null;var tag=document.createElement("style");tag.type="text/css";var nonce=currentNonce||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return nonce&&tag.setAttribute("nonce",nonce),tag}function injectStyles(tag,css){tag.styleSheet?tag.styleSheet.cssText=css:tag.appendChild(document.createTextNode(css))}function insertStyleTag(tag){(document.head||document.getElementsByTagName("head")[0]).appendChild(tag)}SideCar.isSideCarExport=!0;var stylesheetSingleton=function(){var counter=0,stylesheet=null;return{add:function(style){0==counter&&(stylesheet=makeStyleTag())&&(injectStyles(stylesheet,style),insertStyleTag(stylesheet)),counter++},remove:function(){--counter||!stylesheet||(stylesheet.parentNode&&stylesheet.parentNode.removeChild(stylesheet),stylesheet=null)}}},styleHookSingleton=function(){var sheet=stylesheetSingleton();return function(styles,isDynamic){__TURBOPACK__imported__module__66626__.useEffect(function(){return sheet.add(styles),function(){sheet.remove()}},[styles&&isDynamic])}},styleSingleton=function(){var useStyle=styleHookSingleton();return function(_a){return useStyle(_a.styles,_a.dynamic),null}},zeroGap={left:0,top:0,right:0,gap:0},parse=function(x){return parseInt(x||"",10)||0},getOffset=function(gapMode){var cs=window.getComputedStyle(document.body),left=cs["padding"===gapMode?"paddingLeft":"marginLeft"],top=cs["padding"===gapMode?"paddingTop":"marginTop"],right=cs["padding"===gapMode?"paddingRight":"marginRight"];return[parse(left),parse(top),parse(right)]},getGapWidth=function(gapMode){if(void 0===gapMode&&(gapMode="margin"),"u"<typeof window)return zeroGap;var offsets=getOffset(gapMode),documentWidth=document.documentElement.clientWidth,windowWidth=window.innerWidth;return{left:offsets[0],top:offsets[1],right:offsets[2],gap:Math.max(0,windowWidth-documentWidth+offsets[2]-offsets[0])}},Style=styleSingleton(),lockAttribute="data-scroll-locked",getStyles=function(_a,allowRelative,gapMode,important){var left=_a.left,top=_a.top,right=_a.right,gap=_a.gap;return void 0===gapMode&&(gapMode="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(important,";\n padding-right: ").concat(gap,"px ").concat(important,";\n }\n body[").concat(lockAttribute,"] {\n overflow: hidden ").concat(important,";\n overscroll-behavior: contain;\n ").concat([allowRelative&&"position: relative ".concat(important,";"),"margin"===gapMode&&"\n padding-left: ".concat(left,"px;\n padding-top: ").concat(top,"px;\n padding-right: ").concat(right,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap,"px ").concat(important,";\n "),"padding"===gapMode&&"padding-right: ".concat(gap,"px ").concat(important,";")].filter(Boolean).join(""),"\n }\n \n .").concat(zeroRightClassName," {\n right: ").concat(gap,"px ").concat(important,";\n }\n \n .").concat(fullWidthClassName," {\n margin-right: ").concat(gap,"px ").concat(important,";\n }\n \n .").concat(zeroRightClassName," .").concat(zeroRightClassName," {\n right: 0 ").concat(important,";\n }\n \n .").concat(fullWidthClassName," .").concat(fullWidthClassName," {\n margin-right: 0 ").concat(important,";\n }\n \n body[").concat(lockAttribute,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(gap,"px;\n }\n")},getCurrentUseCounter=function(){var counter=parseInt(document.body.getAttribute(lockAttribute)||"0",10);return isFinite(counter)?counter:0},useLockAttribute=function(){__TURBOPACK__imported__module__66626__.useEffect(function(){return document.body.setAttribute(lockAttribute,(getCurrentUseCounter()+1).toString()),function(){var newCounter=getCurrentUseCounter()-1;newCounter<=0?document.body.removeAttribute(lockAttribute):document.body.setAttribute(lockAttribute,newCounter.toString())}},[])},RemoveScrollBar=function(_a){var noRelative=_a.noRelative,noImportant=_a.noImportant,_b=_a.gapMode,gapMode=void 0===_b?"margin":_b;useLockAttribute();var gap=__TURBOPACK__imported__module__66626__.useMemo(function(){return getGapWidth(gapMode)},[gapMode]);return __TURBOPACK__imported__module__66626__.createElement(Style,{styles:getStyles(gap,!noRelative,gapMode,noImportant?"":"!important")})},passiveSupported=!1;if("u">typeof window)try{var options1=Object.defineProperty({},"passive",{get:function(){return passiveSupported=!0,!0}});window.addEventListener("test",options1,options1),window.removeEventListener("test",options1,options1)}catch(err){passiveSupported=!1}var nonPassive=!!passiveSupported&&{passive:!1},elementCanBeScrolled=function(node,overflow){if(!(node instanceof Element))return!1;var styles=window.getComputedStyle(node);return"hidden"!==styles[overflow]&&(styles.overflowY!==styles.overflowX||"TEXTAREA"===node.tagName||"visible"!==styles[overflow])},locationCouldBeScrolled=function(axis,node){var ownerDocument=node.ownerDocument,current=node;do{if("u">typeof ShadowRoot&¤t instanceof ShadowRoot&&(current=current.host),elementCouldBeScrolled(axis,current)){var _a=getScrollVariables(axis,current);if(_a[1]>_a[2])return!0}current=current.parentNode}while(current&¤t!==ownerDocument.body)return!1},elementCouldBeScrolled=function(axis,node){return"v"===axis?elementCanBeScrolled(node,"overflowY"):elementCanBeScrolled(node,"overflowX")},getScrollVariables=function(axis,node){return"v"===axis?[node.scrollTop,node.scrollHeight,node.clientHeight]:[node.scrollLeft,node.scrollWidth,node.clientWidth]},handleScroll=function(axis,endTarget,event,sourceDelta,noOverscroll){var direction,directionFactor=(direction=window.getComputedStyle(endTarget).direction,"h"===axis&&"rtl"===direction?-1:1),delta=directionFactor*sourceDelta,target=event.target,targetInLock=endTarget.contains(target),shouldCancelScroll=!1,isDeltaPositive=delta>0,availableScroll=0,availableScrollTop=0;do{if(!target)break;var _a=getScrollVariables(axis,target),position=_a[0],elementScroll=_a[1]-_a[2]-directionFactor*position;(position||elementScroll)&&elementCouldBeScrolled(axis,target)&&(availableScroll+=elementScroll,availableScrollTop+=position);var parent_1=target.parentNode;target=parent_1&&parent_1.nodeType===Node.DOCUMENT_FRAGMENT_NODE?parent_1.host:parent_1}while(!targetInLock&&target!==document.body||targetInLock&&(endTarget.contains(target)||endTarget===target))return isDeltaPositive&&(noOverscroll&&1>Math.abs(availableScroll)||!noOverscroll&&delta>availableScroll)?shouldCancelScroll=!0:!isDeltaPositive&&(noOverscroll&&1>Math.abs(availableScrollTop)||!noOverscroll&&-delta>availableScrollTop)&&(shouldCancelScroll=!0),shouldCancelScroll},getTouchXY=function(event){return"changedTouches"in event?[event.changedTouches[0].clientX,event.changedTouches[0].clientY]:[0,0]},getDeltaXY=function(event){return[event.deltaX,event.deltaY]},extractRef=function(ref){return ref&&"current"in ref?ref.current:ref},idCounter=0,lockStack=[];function getOutermostShadowParent(node){for(var shadowParent=null;null!==node;)node instanceof ShadowRoot&&(shadowParent=node.host,node=node.host),node=node.parentNode;return shadowParent}let __TURBOPACK__default__export__2=exportSidecar(effectCar,function RemoveScrollSideCar(props){var shouldPreventQueue=__TURBOPACK__imported__module__66626__.useRef([]),touchStartRef=__TURBOPACK__imported__module__66626__.useRef([0,0]),activeAxis=__TURBOPACK__imported__module__66626__.useRef(),id=__TURBOPACK__imported__module__66626__.useState(idCounter++)[0],Style=__TURBOPACK__imported__module__66626__.useState(styleSingleton)[0],lastProps=__TURBOPACK__imported__module__66626__.useRef(props);__TURBOPACK__imported__module__66626__.useEffect(function(){lastProps.current=props},[props]),__TURBOPACK__imported__module__66626__.useEffect(function(){if(props.inert){document.body.classList.add("block-interactivity-".concat(id));var allow_1=__spreadArray([props.lockRef.current],(props.shards||[]).map(extractRef),!0).filter(Boolean);return allow_1.forEach(function(el){return el.classList.add("allow-interactivity-".concat(id))}),function(){document.body.classList.remove("block-interactivity-".concat(id)),allow_1.forEach(function(el){return el.classList.remove("allow-interactivity-".concat(id))})}}},[props.inert,props.lockRef.current,props.shards]);var shouldCancelEvent=__TURBOPACK__imported__module__66626__.useCallback(function(event,parent){if("touches"in event&&2===event.touches.length||"wheel"===event.type&&event.ctrlKey)return!lastProps.current.allowPinchZoom;var currentAxis,touch=getTouchXY(event),touchStart=touchStartRef.current,deltaX="deltaX"in event?event.deltaX:touchStart[0]-touch[0],deltaY="deltaY"in event?event.deltaY:touchStart[1]-touch[1],target=event.target,moveDirection=Math.abs(deltaX)>Math.abs(deltaY)?"h":"v";if("touches"in event&&"h"===moveDirection&&"range"===target.type)return!1;var canBeScrolledInMainDirection=locationCouldBeScrolled(moveDirection,target);if(!canBeScrolledInMainDirection)return!0;if(canBeScrolledInMainDirection?currentAxis=moveDirection:(currentAxis="v"===moveDirection?"h":"v",canBeScrolledInMainDirection=locationCouldBeScrolled(moveDirection,target)),!canBeScrolledInMainDirection)return!1;if(!activeAxis.current&&"changedTouches"in event&&(deltaX||deltaY)&&(activeAxis.current=currentAxis),!currentAxis)return!0;var cancelingAxis=activeAxis.current||currentAxis;return handleScroll(cancelingAxis,parent,event,"h"===cancelingAxis?deltaX:deltaY,!0)},[]),shouldPrevent=__TURBOPACK__imported__module__66626__.useCallback(function(_event){if(lockStack.length&&lockStack[lockStack.length-1]===Style){var delta="deltaY"in _event?getDeltaXY(_event):getTouchXY(_event),sourceEvent=shouldPreventQueue.current.filter(function(e){var x;return e.name===_event.type&&(e.target===_event.target||_event.target===e.shadowParent)&&(x=e.delta,x[0]===delta[0]&&x[1]===delta[1])})[0];if(sourceEvent&&sourceEvent.should){_event.cancelable&&_event.preventDefault();return}if(!sourceEvent){var shardNodes=(lastProps.current.shards||[]).map(extractRef).filter(Boolean).filter(function(node){return node.contains(_event.target)});(shardNodes.length>0?shouldCancelEvent(_event,shardNodes[0]):!lastProps.current.noIsolation)&&_event.cancelable&&_event.preventDefault()}}},[]),shouldCancel=__TURBOPACK__imported__module__66626__.useCallback(function(name,delta,target,should){var event={name:name,delta:delta,target:target,should:should,shadowParent:getOutermostShadowParent(target)};shouldPreventQueue.current.push(event),setTimeout(function(){shouldPreventQueue.current=shouldPreventQueue.current.filter(function(e){return e!==event})},1)},[]),scrollTouchStart=__TURBOPACK__imported__module__66626__.useCallback(function(event){touchStartRef.current=getTouchXY(event),activeAxis.current=void 0},[]),scrollWheel=__TURBOPACK__imported__module__66626__.useCallback(function(event){shouldCancel(event.type,getDeltaXY(event),event.target,shouldCancelEvent(event,props.lockRef.current))},[]),scrollTouchMove=__TURBOPACK__imported__module__66626__.useCallback(function(event){shouldCancel(event.type,getTouchXY(event),event.target,shouldCancelEvent(event,props.lockRef.current))},[]);__TURBOPACK__imported__module__66626__.useEffect(function(){return lockStack.push(Style),props.setCallbacks({onScrollCapture:scrollWheel,onWheelCapture:scrollWheel,onTouchMoveCapture:scrollTouchMove}),document.addEventListener("wheel",shouldPrevent,nonPassive),document.addEventListener("touchmove",shouldPrevent,nonPassive),document.addEventListener("touchstart",scrollTouchStart,nonPassive),function(){lockStack=lockStack.filter(function(inst){return inst!==Style}),document.removeEventListener("wheel",shouldPrevent,nonPassive),document.removeEventListener("touchmove",shouldPrevent,nonPassive),document.removeEventListener("touchstart",scrollTouchStart,nonPassive)}},[]);var removeScrollBar=props.removeScrollBar,inert=props.inert;return __TURBOPACK__imported__module__66626__.createElement(__TURBOPACK__imported__module__66626__.Fragment,null,inert?__TURBOPACK__imported__module__66626__.createElement(Style,{styles:"\n .block-interactivity-".concat(id," {pointer-events: none;}\n .allow-interactivity-").concat(id," {pointer-events: all;}\n")}):null,removeScrollBar?__TURBOPACK__imported__module__66626__.createElement(RemoveScrollBar,{noRelative:props.noRelative,gapMode:props.gapMode}):null)});var ReactRemoveScroll=__TURBOPACK__imported__module__66626__.forwardRef(function(props,ref){return __TURBOPACK__imported__module__66626__.createElement(RemoveScroll,__assign({},props,{ref:ref,sideCar:__TURBOPACK__default__export__2}))});ReactRemoveScroll.classNames=RemoveScroll.classNames;var counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={},lockCount=0,unwrapHost=function(node){return node&&(node.host||unwrapHost(node.parentNode))},applyAttributeToOthers=function(originalTarget,parentNode,markerName,controlAttribute){var targets=(Array.isArray(originalTarget)?originalTarget:[originalTarget]).map(function(target){if(parentNode.contains(target))return target;var correctedTarget=unwrapHost(target);return correctedTarget&&parentNode.contains(correctedTarget)?correctedTarget:(console.error("aria-hidden",target,"in not contained inside",parentNode,". Doing nothing"),null)}).filter(function(x){return!!x});markerMap[markerName]||(markerMap[markerName]=new WeakMap);var markerCounter=markerMap[markerName],hiddenNodes=[],elementsToKeep=new Set,elementsToStop=new Set(targets),keep=function(el){!el||elementsToKeep.has(el)||(elementsToKeep.add(el),keep(el.parentNode))};targets.forEach(keep);var deep=function(parent){!parent||elementsToStop.has(parent)||Array.prototype.forEach.call(parent.children,function(node){if(elementsToKeep.has(node))deep(node);else try{var attr=node.getAttribute(controlAttribute),alreadyHidden=null!==attr&&"false"!==attr,counterValue=(counterMap.get(node)||0)+1,markerValue=(markerCounter.get(node)||0)+1;counterMap.set(node,counterValue),markerCounter.set(node,markerValue),hiddenNodes.push(node),1===counterValue&&alreadyHidden&&uncontrolledNodes.set(node,!0),1===markerValue&&node.setAttribute(markerName,"true"),alreadyHidden||node.setAttribute(controlAttribute,"true")}catch(e){console.error("aria-hidden: cannot operate on ",node,e)}})};return deep(parentNode),elementsToKeep.clear(),lockCount++,function(){hiddenNodes.forEach(function(node){var counterValue=counterMap.get(node)-1,markerValue=markerCounter.get(node)-1;counterMap.set(node,counterValue),markerCounter.set(node,markerValue),counterValue||(uncontrolledNodes.has(node)||node.removeAttribute(controlAttribute),uncontrolledNodes.delete(node)),markerValue||node.removeAttribute(markerName)}),--lockCount||(counterMap=new WeakMap,counterMap=new WeakMap,uncontrolledNodes=new WeakMap,markerMap={})}},hideOthers=function(originalTarget,parentNode,markerName){void 0===markerName&&(markerName="data-aria-hidden");var targets=Array.from(Array.isArray(originalTarget)?originalTarget:[originalTarget]),activeParentNode=parentNode||("u"<typeof document?null:(Array.isArray(originalTarget)?originalTarget[0]:originalTarget).ownerDocument.body);return activeParentNode?(targets.push.apply(targets,Array.from(activeParentNode.querySelectorAll("[aria-live], script"))),applyAttributeToOthers(targets,activeParentNode,markerName,"aria-hidden")):function(){return null}},DIALOG_NAME="Dialog",[createDialogContext,createDialogScope]=createContextScope(DIALOG_NAME),[DialogProvider,useDialogContext]=createDialogContext(DIALOG_NAME),Dialog=props=>{let{__scopeDialog,children,open:openProp,defaultOpen,onOpenChange,modal=!0}=props,triggerRef=__TURBOPACK__imported__module__66626__.useRef(null),contentRef=__TURBOPACK__imported__module__66626__.useRef(null),[open=!1,setOpen]=useControllableState({prop:openProp,defaultProp:defaultOpen,onChange:onOpenChange});return(0,__TURBOPACK__imported__module__2710__.jsx)(DialogProvider,{scope:__scopeDialog,triggerRef,contentRef,contentId:useId(),titleId:useId(),descriptionId:useId(),open,onOpenChange:setOpen,onOpenToggle:__TURBOPACK__imported__module__66626__.useCallback(()=>setOpen(prevOpen=>!prevOpen),[setOpen]),modal,children})};Dialog.displayName=DIALOG_NAME;var TRIGGER_NAME="DialogTrigger";__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeDialog,...triggerProps}=props,context=useDialogContext(TRIGGER_NAME,__scopeDialog),composedTriggerRef=useComposedRefs(forwardedRef,context.triggerRef);return(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":context.open,"aria-controls":context.contentId,"data-state":getState(context.open),...triggerProps,ref:composedTriggerRef,onClick:composeEventHandlers(props.onClick,context.onOpenToggle)})}).displayName=TRIGGER_NAME;var PORTAL_NAME1="DialogPortal",[PortalProvider,usePortalContext]=createDialogContext(PORTAL_NAME1,{forceMount:void 0}),DialogPortal=props=>{let{__scopeDialog,forceMount,children,container}=props,context=useDialogContext(PORTAL_NAME1,__scopeDialog);return(0,__TURBOPACK__imported__module__2710__.jsx)(PortalProvider,{scope:__scopeDialog,forceMount,children:__TURBOPACK__imported__module__66626__.Children.map(children,child=>(0,__TURBOPACK__imported__module__2710__.jsx)(Presence,{present:forceMount||context.open,children:(0,__TURBOPACK__imported__module__2710__.jsx)(Portal,{asChild:!0,container,children:child})}))})};DialogPortal.displayName=PORTAL_NAME1;var OVERLAY_NAME="DialogOverlay",DialogOverlay=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let portalContext=usePortalContext(OVERLAY_NAME,props.__scopeDialog),{forceMount=portalContext.forceMount,...overlayProps}=props,context=useDialogContext(OVERLAY_NAME,props.__scopeDialog);return context.modal?(0,__TURBOPACK__imported__module__2710__.jsx)(Presence,{present:forceMount||context.open,children:(0,__TURBOPACK__imported__module__2710__.jsx)(DialogOverlayImpl,{...overlayProps,ref:forwardedRef})}):null});DialogOverlay.displayName=OVERLAY_NAME;var DialogOverlayImpl=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeDialog,...overlayProps}=props,context=useDialogContext(OVERLAY_NAME,__scopeDialog);return(0,__TURBOPACK__imported__module__2710__.jsx)(ReactRemoveScroll,{as:Slot,allowPinchZoom:!0,shards:[context.contentRef],children:(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive.div,{"data-state":getState(context.open),...overlayProps,ref:forwardedRef,style:{pointerEvents:"auto",...overlayProps.style}})})}),CONTENT_NAME="DialogContent",DialogContent=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let portalContext=usePortalContext(CONTENT_NAME,props.__scopeDialog),{forceMount=portalContext.forceMount,...contentProps}=props,context=useDialogContext(CONTENT_NAME,props.__scopeDialog);return(0,__TURBOPACK__imported__module__2710__.jsx)(Presence,{present:forceMount||context.open,children:context.modal?(0,__TURBOPACK__imported__module__2710__.jsx)(DialogContentModal,{...contentProps,ref:forwardedRef}):(0,__TURBOPACK__imported__module__2710__.jsx)(DialogContentNonModal,{...contentProps,ref:forwardedRef})})});DialogContent.displayName=CONTENT_NAME;var DialogContentModal=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let context=useDialogContext(CONTENT_NAME,props.__scopeDialog),contentRef=__TURBOPACK__imported__module__66626__.useRef(null),composedRefs=useComposedRefs(forwardedRef,context.contentRef,contentRef);return __TURBOPACK__imported__module__66626__.useEffect(()=>{let content=contentRef.current;if(content)return hideOthers(content)},[]),(0,__TURBOPACK__imported__module__2710__.jsx)(DialogContentImpl,{...props,ref:composedRefs,trapFocus:context.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:composeEventHandlers(props.onCloseAutoFocus,event=>{event.preventDefault(),context.triggerRef.current?.focus()}),onPointerDownOutside:composeEventHandlers(props.onPointerDownOutside,event=>{let originalEvent=event.detail.originalEvent,ctrlLeftClick=0===originalEvent.button&&!0===originalEvent.ctrlKey;(2===originalEvent.button||ctrlLeftClick)&&event.preventDefault()}),onFocusOutside:composeEventHandlers(props.onFocusOutside,event=>event.preventDefault())})}),DialogContentNonModal=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let context=useDialogContext(CONTENT_NAME,props.__scopeDialog),hasInteractedOutsideRef=__TURBOPACK__imported__module__66626__.useRef(!1),hasPointerDownOutsideRef=__TURBOPACK__imported__module__66626__.useRef(!1);return(0,__TURBOPACK__imported__module__2710__.jsx)(DialogContentImpl,{...props,ref:forwardedRef,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:event=>{props.onCloseAutoFocus?.(event),event.defaultPrevented||(hasInteractedOutsideRef.current||context.triggerRef.current?.focus(),event.preventDefault()),hasInteractedOutsideRef.current=!1,hasPointerDownOutsideRef.current=!1},onInteractOutside:event=>{props.onInteractOutside?.(event),event.defaultPrevented||(hasInteractedOutsideRef.current=!0,"pointerdown"===event.detail.originalEvent.type&&(hasPointerDownOutsideRef.current=!0));let target=event.target;context.triggerRef.current?.contains(target)&&event.preventDefault(),"focusin"===event.detail.originalEvent.type&&hasPointerDownOutsideRef.current&&event.preventDefault()}})}),DialogContentImpl=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeDialog,trapFocus,onOpenAutoFocus,onCloseAutoFocus,...contentProps}=props,context=useDialogContext(CONTENT_NAME,__scopeDialog),contentRef=__TURBOPACK__imported__module__66626__.useRef(null),composedRefs=useComposedRefs(forwardedRef,contentRef);return useFocusGuards(),(0,__TURBOPACK__imported__module__2710__.jsxs)(__TURBOPACK__imported__module__2710__.Fragment,{children:[(0,__TURBOPACK__imported__module__2710__.jsx)(FocusScope,{asChild:!0,loop:!0,trapped:trapFocus,onMountAutoFocus:onOpenAutoFocus,onUnmountAutoFocus:onCloseAutoFocus,children:(0,__TURBOPACK__imported__module__2710__.jsx)(DismissableLayer,{role:"dialog",id:context.contentId,"aria-describedby":context.descriptionId,"aria-labelledby":context.titleId,"data-state":getState(context.open),...contentProps,ref:composedRefs,onDismiss:()=>context.onOpenChange(!1)})}),(0,__TURBOPACK__imported__module__2710__.jsxs)(__TURBOPACK__imported__module__2710__.Fragment,{children:[(0,__TURBOPACK__imported__module__2710__.jsx)(TitleWarning,{titleId:context.titleId}),(0,__TURBOPACK__imported__module__2710__.jsx)(DescriptionWarning,{contentRef,descriptionId:context.descriptionId})]})]})}),TITLE_NAME="DialogTitle";__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeDialog,...titleProps}=props,context=useDialogContext(TITLE_NAME,__scopeDialog);return(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive.h2,{id:context.titleId,...titleProps,ref:forwardedRef})}).displayName=TITLE_NAME;var DESCRIPTION_NAME="DialogDescription";__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeDialog,...descriptionProps}=props,context=useDialogContext(DESCRIPTION_NAME,__scopeDialog);return(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive.p,{id:context.descriptionId,...descriptionProps,ref:forwardedRef})}).displayName=DESCRIPTION_NAME;var CLOSE_NAME="DialogClose";function getState(open){return open?"open":"closed"}__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeDialog,...closeProps}=props,context=useDialogContext(CLOSE_NAME,__scopeDialog);return(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive.button,{type:"button",...closeProps,ref:forwardedRef,onClick:composeEventHandlers(props.onClick,()=>context.onOpenChange(!1))})}).displayName=CLOSE_NAME;var TITLE_WARNING_NAME="DialogTitleWarning",[WarningProvider,useWarningContext]=createContext2(TITLE_WARNING_NAME,{contentName:CONTENT_NAME,titleName:TITLE_NAME,docsSlug:"dialog"}),TitleWarning=({titleId})=>{let titleWarningContext=useWarningContext(TITLE_WARNING_NAME),MESSAGE=`\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;return __TURBOPACK__imported__module__66626__.useEffect(()=>{titleId&&(document.getElementById(titleId)||console.error(MESSAGE))},[MESSAGE,titleId]),null},DescriptionWarning=({contentRef,descriptionId})=>{let descriptionWarningContext=useWarningContext("DialogDescriptionWarning"),MESSAGE=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;return __TURBOPACK__imported__module__66626__.useEffect(()=>{let describedById=contentRef.current?.getAttribute("aria-describedby");descriptionId&&describedById&&(document.getElementById(descriptionId)||console.warn(MESSAGE))},[MESSAGE,contentRef,descriptionId]),null};function setRef1(ref,value1){if("function"==typeof ref)return ref(value1);null!=ref&&(ref.current=value1)}function composeRefs1(...refs){return node=>{let hasCleanup=!1,cleanups=refs.map(ref=>{let cleanup=setRef1(ref,node);return hasCleanup||"function"!=typeof cleanup||(hasCleanup=!0),cleanup});if(hasCleanup)return()=>{for(let i=0;i<cleanups.length;i++){let cleanup=cleanups[i];"function"==typeof cleanup?cleanup():setRef1(refs[i],null)}}}}function useComposedRefs1(...refs){return __TURBOPACK__imported__module__66626__.useCallback(composeRefs1(...refs),refs)}function createSlot(ownerName){let SlotClone=createSlotClone(ownerName),Slot2=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{children,...slotProps}=props,childrenArray=__TURBOPACK__imported__module__66626__.Children.toArray(children),slottable=childrenArray.find(isSlottable1);if(slottable){let newElement=slottable.props.children,newChildren=childrenArray.map(child=>child!==slottable?child:__TURBOPACK__imported__module__66626__.Children.count(newElement)>1?__TURBOPACK__imported__module__66626__.Children.only(null):__TURBOPACK__imported__module__66626__.isValidElement(newElement)?newElement.props.children:null);return(0,__TURBOPACK__imported__module__2710__.jsx)(SlotClone,{...slotProps,ref:forwardedRef,children:__TURBOPACK__imported__module__66626__.isValidElement(newElement)?__TURBOPACK__imported__module__66626__.cloneElement(newElement,void 0,newChildren):null})}return(0,__TURBOPACK__imported__module__2710__.jsx)(SlotClone,{...slotProps,ref:forwardedRef,children})});return Slot2.displayName=`${ownerName}.Slot`,Slot2}function createSlotClone(ownerName){let SlotClone=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{children,...slotProps}=props;if(__TURBOPACK__imported__module__66626__.isValidElement(children)){let childrenRef=getElementRef2(children),props2=mergeProps1(slotProps,children.props);return children.type!==__TURBOPACK__imported__module__66626__.Fragment&&(props2.ref=forwardedRef?composeRefs1(forwardedRef,childrenRef):childrenRef),__TURBOPACK__imported__module__66626__.cloneElement(children,props2)}return __TURBOPACK__imported__module__66626__.Children.count(children)>1?__TURBOPACK__imported__module__66626__.Children.only(null):null});return SlotClone.displayName=`${ownerName}.SlotClone`,SlotClone}var SLOTTABLE_IDENTIFIER=Symbol("radix.slottable");function isSlottable1(child){return __TURBOPACK__imported__module__66626__.isValidElement(child)&&"function"==typeof child.type&&"__radixId"in child.type&&child.type.__radixId===SLOTTABLE_IDENTIFIER}function mergeProps1(slotProps,childProps){let overrideProps={...childProps};for(let propName in childProps){let slotPropValue=slotProps[propName],childPropValue=childProps[propName];/^on[A-Z]/.test(propName)?slotPropValue&&childPropValue?overrideProps[propName]=(...args)=>{let result=childPropValue(...args);return slotPropValue(...args),result}:slotPropValue&&(overrideProps[propName]=slotPropValue):"style"===propName?overrideProps[propName]={...slotPropValue,...childPropValue}:"className"===propName&&(overrideProps[propName]=[slotPropValue,childPropValue].filter(Boolean).join(" "))}return{...slotProps,...overrideProps}}function getElementRef2(element){let getter=Object.getOwnPropertyDescriptor(element.props,"ref")?.get,mayWarn=getter&&"isReactWarning"in getter&&getter.isReactWarning;return mayWarn?element.ref:(mayWarn=(getter=Object.getOwnPropertyDescriptor(element,"ref")?.get)&&"isReactWarning"in getter&&getter.isReactWarning)?element.props.ref:element.props.ref||element.ref}var Primitive1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((primitive,node)=>{let Slot=createSlot(`Primitive.${node}`),Node1=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{asChild,...primitiveProps}=props;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,__TURBOPACK__imported__module__2710__.jsx)(asChild?Slot:node,{...primitiveProps,ref:forwardedRef})});return Node1.displayName=`Primitive.${node}`,{...primitive,[node]:Node1}},{});function dispatchDiscreteCustomEvent1(target,event){target&&__TURBOPACK__imported__module__79892__.flushSync(()=>target.dispatchEvent(event))}var useLayoutEffect21=globalThis?.document?__TURBOPACK__imported__module__66626__.useLayoutEffect:()=>{},useReactId1=__TURBOPACK__imported__module__66626__[" useId ".trim().toString()]||(()=>void 0),count2=0;function useId1(deterministicId){let[id,setId]=__TURBOPACK__imported__module__66626__.useState(useReactId1());return useLayoutEffect21(()=>{deterministicId||setId(reactId=>reactId??String(count2++))},[deterministicId]),deterministicId||(id?`radix-${id}`:"")}var N='[cmdk-group=""]',Q='[cmdk-group-items=""]',Z='[cmdk-item=""]',le=`${Z}:not([aria-disabled="true"])`,Y1="cmdk-item-select",I="data-value",he=(r,o,t)=>W(r,o,t),ue=__TURBOPACK__imported__module__66626__.createContext(void 0),de=__TURBOPACK__imported__module__66626__.createContext(void 0),fe=__TURBOPACK__imported__module__66626__.createContext(void 0),me=__TURBOPACK__imported__module__66626__.forwardRef((r,o)=>{let t=k1(()=>{var e,s;return{search:"",value:null!=(s=null!=(e=r.value)?e:r.defaultValue)?s:"",filtered:{count:0,items:new Map,groups:new Set}}}),u=k1(()=>new Set),c=k1(()=>new Map),d=k1(()=>new Map),f=k1(()=>new Set),p=pe(r),{label:v,children:b,value:l,onValueChange:y,filter:E,shouldFilter:C,loop:H,disablePointerSelection:ge=!1,vimBindings:$=!0,...O}=r,te=useId1(),B=useId1(),F=useId1(),x=__TURBOPACK__imported__module__66626__.useRef(null),R=Te();M(()=>{if(void 0!==l){let e=l.trim();t.current.value=e,h.emit()}},[l]),M(()=>{R(6,re)},[]);let h=__TURBOPACK__imported__module__66626__.useMemo(()=>({subscribe:e=>(f.current.add(e),()=>f.current.delete(e)),snapshot:()=>t.current,setState:(e,s,i)=>{var a1,m,g;if(!Object.is(t.current[e],s)){if(t.current[e]=s,"search"===e)W(),U(),R(1,z);else if("value"===e&&(i||R(5,re),(null==(a1=p.current)?void 0:a1.value)!==void 0)){null==(g=(m=p.current).onValueChange)||g.call(m,null!=s?s:"");return}h.emit()}},emit:()=>{f.current.forEach(e=>e())}}),[]),q=__TURBOPACK__imported__module__66626__.useMemo(()=>({value:(e,s,i)=>{var a1;s!==(null==(a1=d.current.get(e))?void 0:a1.value)&&(d.current.set(e,{value:s,keywords:i}),t.current.filtered.items.set(e,ne(s,i)),R(2,()=>{U(),h.emit()}))},item:(e,s)=>(u.current.add(e),s&&(c.current.has(s)?c.current.get(s).add(e):c.current.set(s,new Set([e]))),R(3,()=>{W(),U(),t.current.value||z(),h.emit()}),()=>{d.current.delete(e),u.current.delete(e),t.current.filtered.items.delete(e);let i=A();R(4,()=>{W(),(null==i?void 0:i.getAttribute("id"))===e&&z(),h.emit()})}),group:e=>(c.current.has(e)||c.current.set(e,new Set),()=>{d.current.delete(e),c.current.delete(e)}),filter:()=>p.current.shouldFilter,label:v||r["aria-label"],getDisablePointerSelection:()=>p.current.disablePointerSelection,listId:te,inputId:F,labelId:B,listInnerRef:x}),[]);function ne(e,s){var a1,m;let i=null!=(m=null==(a1=p.current)?void 0:a1.filter)?m:he;return e?i(e,t.current.search,s):0}function U(){if(!t.current.search||!1===p.current.shouldFilter)return;let e=t.current.filtered.items,s=[];t.current.filtered.groups.forEach(a1=>{let m=c.current.get(a1),g=0;m.forEach(S=>{g=Math.max(e.get(S),g)}),s.push([a1,g])});let i=x.current;_().sort((a1,m)=>{var P,V;let g=a1.getAttribute("id"),S=m.getAttribute("id");return(null!=(P=e.get(S))?P:0)-(null!=(V=e.get(g))?V:0)}).forEach(a1=>{let m=a1.closest(Q);m?m.appendChild(a1.parentElement===m?a1:a1.closest(`${Q} > *`)):i.appendChild(a1.parentElement===i?a1:a1.closest(`${Q} > *`))}),s.sort((a1,m)=>m[1]-a1[1]).forEach(a1=>{var g;let m=null==(g=x.current)?void 0:g.querySelector(`${N}[${I}="${encodeURIComponent(a1[0])}"]`);null==m||m.parentElement.appendChild(m)})}function z(){let e=_().find(i=>"true"!==i.getAttribute("aria-disabled")),s=null==e?void 0:e.getAttribute(I);h.setState("value",s||void 0)}function W(){var s,i,a1,m;if(!t.current.search||!1===p.current.shouldFilter){t.current.filtered.count=u.current.size;return}t.current.filtered.groups=new Set;let e=0;for(let g of u.current){let V=ne(null!=(i=null==(s=d.current.get(g))?void 0:s.value)?i:"",null!=(m=null==(a1=d.current.get(g))?void 0:a1.keywords)?m:[]);t.current.filtered.items.set(g,V),V>0&&e++}for(let[g,S]of c.current)for(let P of S)if(t.current.filtered.items.get(P)>0){t.current.filtered.groups.add(g);break}t.current.filtered.count=e}function re(){var s,i,a1;let e=A();e&&((null==(s=e.parentElement)?void 0:s.firstChild)===e&&(null==(a1=null==(i=e.closest(N))?void 0:i.querySelector('[cmdk-group-heading=""]'))||a1.scrollIntoView({block:"nearest"})),e.scrollIntoView({block:"nearest"}))}function A(){var e;return null==(e=x.current)?void 0:e.querySelector(`${Z}[aria-selected="true"]`)}function _(){var e;return Array.from((null==(e=x.current)?void 0:e.querySelectorAll(le))||[])}function J(e){let i=_()[e];i&&h.setState("value",i.getAttribute(I))}function X(e){var g;let s=A(),i=_(),a1=i.findIndex(S=>S===s),m=i[a1+e];null!=(g=p.current)&&g.loop&&(m=a1+e<0?i[i.length-1]:a1+e===i.length?i[0]:i[a1+e]),m&&h.setState("value",m.getAttribute(I))}function oe(e){let s=A(),i=null==s?void 0:s.closest(N),a1;for(;i&&!a1;)a1=null==(i=e>0?Ie(i,N):Me(i,N))?void 0:i.querySelector(le);a1?h.setState("value",a1.getAttribute(I)):X(e)}let ie=()=>J(_().length-1),ae=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?oe(1):X(1)},se=e=>{e.preventDefault(),e.metaKey?J(0):e.altKey?oe(-1):X(-1)};return __TURBOPACK__imported__module__66626__.createElement(Primitive1.div,{ref:o,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var s;if(null==(s=O.onKeyDown)||s.call(O,e),!e.defaultPrevented)switch(e.key){case"n":case"j":$&&e.ctrlKey&&ae(e);break;case"ArrowDown":ae(e);break;case"p":case"k":$&&e.ctrlKey&&se(e);break;case"ArrowUp":se(e);break;case"Home":e.preventDefault(),J(0);break;case"End":e.preventDefault(),ie();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let i=A();if(i){let a1=new Event(Y1);i.dispatchEvent(a1)}}}}},__TURBOPACK__imported__module__66626__.createElement("label",{"cmdk-label":"",htmlFor:q.inputId,id:q.labelId,style:Le},v),j(r,e=>__TURBOPACK__imported__module__66626__.createElement(de.Provider,{value:h},__TURBOPACK__imported__module__66626__.createElement(ue.Provider,{value:q},e))))}),ye=__TURBOPACK__imported__module__66626__.forwardRef((r,o)=>{var F,x;let t=useId1(),u=__TURBOPACK__imported__module__66626__.useRef(null),c=__TURBOPACK__imported__module__66626__.useContext(fe),d=__TURBOPACK__imported__module__66626__.useContext(ue),f=pe(r),p=null!=(x=null==(F=f.current)?void 0:F.forceMount)?x:null==c?void 0:c.forceMount;M(()=>{if(!p)return d.item(t,null==c?void 0:c.id)},[p]);let v=ve(t,u,[r.value,r.children,u],r.keywords),b=__TURBOPACK__imported__module__66626__.useContext(de),l=T(R=>R.value&&R.value===v.current),y=T(R=>!!p||!1===d.filter()||!R.search||R.filtered.items.get(t)>0);function E(){var R,h;C(),null==(h=(R=f.current).onSelect)||h.call(R,v.current)}function C(){b.setState("value",v.current,!0)}if(__TURBOPACK__imported__module__66626__.useEffect(()=>{let R=u.current;if(!(!R||r.disabled))return R.addEventListener(Y1,E),()=>R.removeEventListener(Y1,E)},[y,r.onSelect,r.disabled]),!y)return null;let{disabled:H,value:ge,onSelect:$,forceMount:O,keywords:te,...B}=r;return __TURBOPACK__imported__module__66626__.createElement(Primitive1.div,{ref:G1([u,o]),...B,id:t,"cmdk-item":"",role:"option","aria-disabled":!!H,"aria-selected":!!l,"data-disabled":!!H,"data-selected":!!l,onPointerMove:H||d.getDisablePointerSelection()?void 0:C,onClick:H?void 0:E},r.children)}),Se=__TURBOPACK__imported__module__66626__.forwardRef((r,o)=>{let{heading:t,children:u,forceMount:c,...d}=r,f=useId1(),p=__TURBOPACK__imported__module__66626__.useRef(null),v=__TURBOPACK__imported__module__66626__.useRef(null),b=useId1(),l=__TURBOPACK__imported__module__66626__.useContext(ue),y=T(C=>!!c||!1===l.filter()||!C.search||C.filtered.groups.has(f));M(()=>l.group(f),[]),ve(f,p,[r.value,r.heading,v]);let E=__TURBOPACK__imported__module__66626__.useMemo(()=>({id:f,forceMount:c}),[c]);return __TURBOPACK__imported__module__66626__.createElement(Primitive1.div,{ref:G1([p,o]),...d,"cmdk-group":"",role:"presentation",hidden:!y||void 0},t&&__TURBOPACK__imported__module__66626__.createElement("div",{ref:v,"cmdk-group-heading":"","aria-hidden":!0,id:b},t),j(r,C=>__TURBOPACK__imported__module__66626__.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":t?b:void 0},__TURBOPACK__imported__module__66626__.createElement(fe.Provider,{value:E},C))))}),Ee=__TURBOPACK__imported__module__66626__.forwardRef((r,o)=>{let{alwaysRender:t,...u}=r,c=__TURBOPACK__imported__module__66626__.useRef(null),d=T(f=>!f.search);return t||d?__TURBOPACK__imported__module__66626__.createElement(Primitive1.div,{ref:G1([c,o]),...u,"cmdk-separator":"",role:"separator"}):null}),Ce=__TURBOPACK__imported__module__66626__.forwardRef((r,o)=>{let{onValueChange:t,...u}=r,c=null!=r.value,d=__TURBOPACK__imported__module__66626__.useContext(de),f=T(l=>l.search),p=T(l=>l.value),v=__TURBOPACK__imported__module__66626__.useContext(ue),b=__TURBOPACK__imported__module__66626__.useMemo(()=>{var y;let l=null==(y=v.listInnerRef.current)?void 0:y.querySelector(`${Z}[${I}="${encodeURIComponent(p)}"]`);return null==l?void 0:l.getAttribute("id")},[]);return __TURBOPACK__imported__module__66626__.useEffect(()=>{null!=r.value&&d.setState("search",r.value)},[r.value]),__TURBOPACK__imported__module__66626__.createElement(Primitive1.input,{ref:o,...u,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":v.listId,"aria-labelledby":v.labelId,"aria-activedescendant":b,id:v.inputId,type:"text",value:c?r.value:f,onChange:l=>{c||d.setState("search",l.target.value),null==t||t(l.target.value)}})}),xe=__TURBOPACK__imported__module__66626__.forwardRef((r,o)=>{let{children:t,label:u="Suggestions",...c}=r,d=__TURBOPACK__imported__module__66626__.useRef(null),f=__TURBOPACK__imported__module__66626__.useRef(null),p=__TURBOPACK__imported__module__66626__.useContext(ue);return __TURBOPACK__imported__module__66626__.useEffect(()=>{if(f.current&&d.current){let v=f.current,b=d.current,l,y=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{let E=v.offsetHeight;b.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return y.observe(v),()=>{cancelAnimationFrame(l),y.unobserve(v)}}},[]),__TURBOPACK__imported__module__66626__.createElement(Primitive1.div,{ref:G1([d,o]),...c,"cmdk-list":"",role:"listbox","aria-label":u,id:p.listId},j(r,v=>__TURBOPACK__imported__module__66626__.createElement("div",{ref:G1([f,p.listInnerRef]),"cmdk-list-sizer":""},v)))}),Pe=__TURBOPACK__imported__module__66626__.forwardRef((r,o)=>{let{open:t,onOpenChange:u,overlayClassName:c,contentClassName:d,container:f,...p}=r;return __TURBOPACK__imported__module__66626__.createElement(Dialog,{open:t,onOpenChange:u},__TURBOPACK__imported__module__66626__.createElement(DialogPortal,{container:f},__TURBOPACK__imported__module__66626__.createElement(DialogOverlay,{"cmdk-overlay":"",className:c}),__TURBOPACK__imported__module__66626__.createElement(DialogContent,{"aria-label":r.label,"cmdk-dialog":"",className:d},__TURBOPACK__imported__module__66626__.createElement(me,{ref:o,...p}))))}),Ve=Object.assign(me,{List:xe,Item:ye,Input:Ce,Group:Se,Separator:Ee,Dialog:Pe,Empty:__TURBOPACK__imported__module__66626__.forwardRef((r,o)=>T(u=>0===u.filtered.count)?__TURBOPACK__imported__module__66626__.createElement(Primitive1.div,{ref:o,...r,"cmdk-empty":"",role:"presentation"}):null),Loading:__TURBOPACK__imported__module__66626__.forwardRef((r,o)=>{let{progress:t,children:u,label:c="Loading...",...d}=r;return __TURBOPACK__imported__module__66626__.createElement(Primitive1.div,{ref:o,...d,"cmdk-loading":"",role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":100,"aria-label":c},j(r,f=>__TURBOPACK__imported__module__66626__.createElement("div",{"aria-hidden":!0},f)))})});function Ie(r,o){let t=r.nextElementSibling;for(;t;){if(t.matches(o))return t;t=t.nextElementSibling}}function Me(r,o){let t=r.previousElementSibling;for(;t;){if(t.matches(o))return t;t=t.previousElementSibling}}function pe(r){let o=__TURBOPACK__imported__module__66626__.useRef(r);return M(()=>{o.current=r}),o}var M="u"<typeof window?__TURBOPACK__imported__module__66626__.useEffect:__TURBOPACK__imported__module__66626__.useLayoutEffect;function k1(r){let o=__TURBOPACK__imported__module__66626__.useRef();return void 0===o.current&&(o.current=r()),o}function G1(r){return o=>{r.forEach(t=>{"function"==typeof t?t(o):null!=t&&(t.current=o)})}}function T(r){let o=__TURBOPACK__imported__module__66626__.useContext(de),t=()=>r(o.snapshot());return(0,__TURBOPACK__imported__module__41144__.useSyncExternalStore)(o.subscribe,t,t)}function ve(r,o,t,u=[]){let c=__TURBOPACK__imported__module__66626__.useRef(),d=__TURBOPACK__imported__module__66626__.useContext(ue);return M(()=>{var v;let f=(()=>{var b;for(let l of t){if("string"==typeof l)return l.trim();if("object"==typeof l&&"current"in l)return l.current?null==(b=l.current.textContent)?void 0:b.trim():c.current}})(),p=u.map(b=>b.trim());d.value(r,f,p),null==(v=o.current)||v.setAttribute(I,f),c.current=f}),c}var Te=()=>{let[r,o]=__TURBOPACK__imported__module__66626__.useState(),t=k1(()=>new Map);return M(()=>{t.current.forEach(u=>u()),t.current=new Map},[r]),(u,c)=>{t.current.set(u,c),o({})}};function ke(r){let o=r.type;return"function"==typeof o?o(r.props):"render"in o?o.render(r.props):r}function j({asChild:r,children:o},t){return r&&__TURBOPACK__imported__module__66626__.isValidElement(o)?__TURBOPACK__imported__module__66626__.cloneElement(ke(o),{ref:o.ref},t(o.props.children)):t(o)}var Le={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};let Search=createLucideIcon("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);function Command({className,...props}){return(0,__TURBOPACK__imported__module__2710__.jsx)(Ve,{"data-slot":"command",className:cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",className),...props})}function CommandInput({className,...props}){return(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[(0,__TURBOPACK__imported__module__2710__.jsx)(Search,{className:"size-4 shrink-0 opacity-50"}),(0,__TURBOPACK__imported__module__2710__.jsx)(Ve.Input,{"data-slot":"command-input",className:cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",className),...props})]})}function CommandList({className,...props}){return(0,__TURBOPACK__imported__module__2710__.jsx)(Ve.List,{"data-slot":"command-list",className:cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",className),...props})}function CommandEmpty({...props}){return(0,__TURBOPACK__imported__module__2710__.jsx)(Ve.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...props})}function CommandGroup({className,...props}){return(0,__TURBOPACK__imported__module__2710__.jsx)(Ve.Group,{"data-slot":"command-group",className:cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",className),...props})}function CommandItem({className,...props}){return(0,__TURBOPACK__imported__module__2710__.jsx)(Ve.Item,{"data-slot":"command-item",className:cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",className),...props})}createLucideIcon("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);let sides=["top","right","bottom","left"],min=Math.min,max=Math.max,round=Math.round,floor=Math.floor,createCoords=v=>({x:v,y:v}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function evaluate(value1,param){return"function"==typeof value1?value1(param):value1}function getSide(placement){return placement.split("-")[0]}function getAlignment(placement){return placement.split("-")[1]}function getOppositeAxis(axis){return"x"===axis?"y":"x"}function getAxisLength(axis){return"y"===axis?"height":"width"}let yAxisSides=new Set(["top","bottom"]);function getSideAxis(placement){return yAxisSides.has(getSide(placement))?"y":"x"}function getAlignmentSides(placement,rects,rtl){void 0===rtl&&(rtl=!1);let alignment=getAlignment(placement),alignmentAxis=getOppositeAxis(getSideAxis(placement)),length=getAxisLength(alignmentAxis),mainAlignmentSide="x"===alignmentAxis?alignment===(rtl?"end":"start")?"right":"left":"start"===alignment?"bottom":"top";return rects.reference[length]>rects.floating[length]&&(mainAlignmentSide=getOppositePlacement(mainAlignmentSide)),[mainAlignmentSide,getOppositePlacement(mainAlignmentSide)]}function getExpandedPlacements(placement){let oppositePlacement=getOppositePlacement(placement);return[getOppositeAlignmentPlacement(placement),oppositePlacement,getOppositeAlignmentPlacement(oppositePlacement)]}function getOppositeAlignmentPlacement(placement){return placement.replace(/start|end/g,alignment=>oppositeAlignmentMap[alignment])}let lrPlacement=["left","right"],rlPlacement=["right","left"],tbPlacement=["top","bottom"],btPlacement=["bottom","top"];function getSideList(side,isStart,rtl){switch(side){case"top":case"bottom":if(rtl)return isStart?rlPlacement:lrPlacement;return isStart?lrPlacement:rlPlacement;case"left":case"right":return isStart?tbPlacement:btPlacement;default:return[]}}function getOppositeAxisPlacements(placement,flipAlignment,direction,rtl){let alignment=getAlignment(placement),list=getSideList(getSide(placement),"start"===direction,rtl);return alignment&&(list=list.map(side=>side+"-"+alignment),flipAlignment&&(list=list.concat(list.map(getOppositeAlignmentPlacement)))),list}function getOppositePlacement(placement){return placement.replace(/left|right|bottom|top/g,side=>oppositeSideMap[side])}function expandPaddingObject(padding){return{top:0,right:0,bottom:0,left:0,...padding}}function getPaddingObject(padding){return"number"!=typeof padding?expandPaddingObject(padding):{top:padding,right:padding,bottom:padding,left:padding}}function rectToClientRect(rect){let{x,y,width,height}=rect;return{width,height,top:y,left:x,right:x+width,bottom:y+height,x,y}}function computeCoordsFromPlacement(_ref,placement,rtl){let coords,{reference,floating}=_ref,sideAxis=getSideAxis(placement),alignmentAxis=getOppositeAxis(getSideAxis(placement)),alignLength=getAxisLength(alignmentAxis),side=getSide(placement),isVertical="y"===sideAxis,commonX=reference.x+reference.width/2-floating.width/2,commonY=reference.y+reference.height/2-floating.height/2,commonAlign=reference[alignLength]/2-floating[alignLength]/2;switch(side){case"top":coords={x:commonX,y:reference.y-floating.height};break;case"bottom":coords={x:commonX,y:reference.y+reference.height};break;case"right":coords={x:reference.x+reference.width,y:commonY};break;case"left":coords={x:reference.x-floating.width,y:commonY};break;default:coords={x:reference.x,y:reference.y}}switch(getAlignment(placement)){case"start":coords[alignmentAxis]-=commonAlign*(rtl&&isVertical?-1:1);break;case"end":coords[alignmentAxis]+=commonAlign*(rtl&&isVertical?-1:1)}return coords}let computePosition=async(reference,floating,config)=>{let{placement="bottom",strategy="absolute",middleware=[],platform}=config,validMiddleware=middleware.filter(Boolean),rtl=await (null==platform.isRTL?void 0:platform.isRTL(floating)),rects=await platform.getElementRects({reference,floating,strategy}),{x,y}=computeCoordsFromPlacement(rects,placement,rtl),statefulPlacement=placement,middlewareData={},resetCount=0;for(let i=0;i<validMiddleware.length;i++){let{name,fn}=validMiddleware[i],{x:nextX,y:nextY,data,reset}=await fn({x,y,initialPlacement:placement,placement:statefulPlacement,strategy,middlewareData,rects,platform,elements:{reference,floating}});x=null!=nextX?nextX:x,y=null!=nextY?nextY:y,middlewareData={...middlewareData,[name]:{...middlewareData[name],...data}},reset&&resetCount<=50&&(resetCount++,"object"==typeof reset&&(reset.placement&&(statefulPlacement=reset.placement),reset.rects&&(rects=!0===reset.rects?await platform.getElementRects({reference,floating,strategy}):reset.rects),{x,y}=computeCoordsFromPlacement(rects,statefulPlacement,rtl)),i=-1)}return{x,y,placement:statefulPlacement,strategy,middlewareData}};async function detectOverflow(state,options){var _await$platform$isEle;void 0===options&&(options={});let{x,y,platform,rects,elements,strategy}=state,{boundary="clippingAncestors",rootBoundary="viewport",elementContext="floating",altBoundary=!1,padding=0}=evaluate(options,state),paddingObject=getPaddingObject(padding),element=elements[altBoundary?"floating"===elementContext?"reference":"floating":elementContext],clippingClientRect=rectToClientRect(await platform.getClippingRect({element:null==(_await$platform$isEle=await (null==platform.isElement?void 0:platform.isElement(element)))||_await$platform$isEle?element:element.contextElement||await (null==platform.getDocumentElement?void 0:platform.getDocumentElement(elements.floating)),boundary,rootBoundary,strategy})),rect="floating"===elementContext?{x,y,width:rects.floating.width,height:rects.floating.height}:rects.reference,offsetParent=await (null==platform.getOffsetParent?void 0:platform.getOffsetParent(elements.floating)),offsetScale=await (null==platform.isElement?void 0:platform.isElement(offsetParent))&&await (null==platform.getScale?void 0:platform.getScale(offsetParent))||{x:1,y:1},elementClientRect=rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect?await platform.convertOffsetParentRelativeRectToViewportRelativeRect({elements,rect,offsetParent,strategy}):rect);return{top:(clippingClientRect.top-elementClientRect.top+paddingObject.top)/offsetScale.y,bottom:(elementClientRect.bottom-clippingClientRect.bottom+paddingObject.bottom)/offsetScale.y,left:(clippingClientRect.left-elementClientRect.left+paddingObject.left)/offsetScale.x,right:(elementClientRect.right-clippingClientRect.right+paddingObject.right)/offsetScale.x}}function getSideOffsets(overflow,rect){return{top:overflow.top-rect.height,right:overflow.right-rect.width,bottom:overflow.bottom-rect.height,left:overflow.left-rect.width}}function isAnySideFullyClipped(overflow){return sides.some(side=>overflow[side]>=0)}let originSides=new Set(["left","top"]);async function convertValueToCoords(state,options){let{placement,platform,elements}=state,rtl=await (null==platform.isRTL?void 0:platform.isRTL(elements.floating)),side=getSide(placement),alignment=getAlignment(placement),isVertical="y"===getSideAxis(placement),mainAxisMulti=originSides.has(side)?-1:1,crossAxisMulti=rtl&&isVertical?-1:1,rawValue=evaluate(options,state),{mainAxis,crossAxis,alignmentAxis}="number"==typeof rawValue?{mainAxis:rawValue,crossAxis:0,alignmentAxis:null}:{mainAxis:rawValue.mainAxis||0,crossAxis:rawValue.crossAxis||0,alignmentAxis:rawValue.alignmentAxis};return alignment&&"number"==typeof alignmentAxis&&(crossAxis="end"===alignment?-1*alignmentAxis:alignmentAxis),isVertical?{x:crossAxis*crossAxisMulti,y:mainAxis*mainAxisMulti}:{x:mainAxis*mainAxisMulti,y:crossAxis*crossAxisMulti}}function hasWindow(){return"u">typeof window}function getNodeName(node){return isNode(node)?(node.nodeName||"").toLowerCase():"#document"}function getWindow(node){var _node$ownerDocument;return(null==node||null==(_node$ownerDocument=node.ownerDocument)?void 0:_node$ownerDocument.defaultView)||window}function getDocumentElement(node){var _ref;return null==(_ref=(isNode(node)?node.ownerDocument:node.document)||window.document)?void 0:_ref.documentElement}function isNode(value1){return!!hasWindow()&&(value1 instanceof Node||value1 instanceof getWindow(value1).Node)}function isElement(value1){return!!hasWindow()&&(value1 instanceof Element||value1 instanceof getWindow(value1).Element)}function isHTMLElement(value1){return!!hasWindow()&&(value1 instanceof HTMLElement||value1 instanceof getWindow(value1).HTMLElement)}function isShadowRoot(value1){return!(!hasWindow()||"u"<typeof ShadowRoot)&&(value1 instanceof ShadowRoot||value1 instanceof getWindow(value1).ShadowRoot)}let invalidOverflowDisplayValues=new Set(["inline","contents"]);function isOverflowElement(element){let{overflow,overflowX,overflowY,display}=getComputedStyle1(element);return/auto|scroll|overlay|hidden|clip/.test(overflow+overflowY+overflowX)&&!invalidOverflowDisplayValues.has(display)}let tableElements=new Set(["table","td","th"]);function isTableElement(element){return tableElements.has(getNodeName(element))}let topLayerSelectors=[":popover-open",":modal"];function isTopLayer(element){return topLayerSelectors.some(selector=>{try{return element.matches(selector)}catch(_e){return!1}})}let transformProperties=["transform","translate","scale","rotate","perspective"],willChangeValues=["transform","translate","scale","rotate","perspective","filter"],containValues=["paint","layout","strict","content"];function isContainingBlock(elementOrCss){let webkit=isWebKit(),css=isElement(elementOrCss)?getComputedStyle1(elementOrCss):elementOrCss;return transformProperties.some(value1=>!!css[value1]&&"none"!==css[value1])||!!css.containerType&&"normal"!==css.containerType||!webkit&&!!css.backdropFilter&&"none"!==css.backdropFilter||!webkit&&!!css.filter&&"none"!==css.filter||willChangeValues.some(value1=>(css.willChange||"").includes(value1))||containValues.some(value1=>(css.contain||"").includes(value1))}function getContainingBlock(element){let currentNode=getParentNode(element);for(;isHTMLElement(currentNode)&&!isLastTraversableNode(currentNode);){if(isContainingBlock(currentNode))return currentNode;if(isTopLayer(currentNode))break;currentNode=getParentNode(currentNode)}return null}function isWebKit(){return!("u"<typeof CSS)&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let lastTraversableNodeNames=new Set(["html","body","#document"]);function isLastTraversableNode(node){return lastTraversableNodeNames.has(getNodeName(node))}function getComputedStyle1(element){return getWindow(element).getComputedStyle(element)}function getNodeScroll(element){return isElement(element)?{scrollLeft:element.scrollLeft,scrollTop:element.scrollTop}:{scrollLeft:element.scrollX,scrollTop:element.scrollY}}function getParentNode(node){if("html"===getNodeName(node))return node;let result=node.assignedSlot||node.parentNode||isShadowRoot(node)&&node.host||getDocumentElement(node);return isShadowRoot(result)?result.host:result}function getNearestOverflowAncestor(node){let parentNode=getParentNode(node);return isLastTraversableNode(parentNode)?node.ownerDocument?node.ownerDocument.body:node.body:isHTMLElement(parentNode)&&isOverflowElement(parentNode)?parentNode:getNearestOverflowAncestor(parentNode)}function getOverflowAncestors(node,list,traverseIframes){var _node$ownerDocument2;void 0===list&&(list=[]),void 0===traverseIframes&&(traverseIframes=!0);let scrollableAncestor=getNearestOverflowAncestor(node),isBody=scrollableAncestor===(null==(_node$ownerDocument2=node.ownerDocument)?void 0:_node$ownerDocument2.body),win=getWindow(scrollableAncestor);if(isBody){let frameElement=getFrameElement(win);return list.concat(win,win.visualViewport||[],isOverflowElement(scrollableAncestor)?scrollableAncestor:[],frameElement&&traverseIframes?getOverflowAncestors(frameElement):[])}return list.concat(scrollableAncestor,getOverflowAncestors(scrollableAncestor,[],traverseIframes))}function getFrameElement(win){return win.parent&&Object.getPrototypeOf(win.parent)?win.frameElement:null}function getCssDimensions(element){let css=getComputedStyle1(element),width=parseFloat(css.width)||0,height=parseFloat(css.height)||0,hasOffset=isHTMLElement(element),offsetWidth=hasOffset?element.offsetWidth:width,offsetHeight=hasOffset?element.offsetHeight:height,shouldFallback=round(width)!==offsetWidth||round(height)!==offsetHeight;return shouldFallback&&(width=offsetWidth,height=offsetHeight),{width,height,$:shouldFallback}}function unwrapElement(element){return isElement(element)?element:element.contextElement}function getScale(element){let domElement=unwrapElement(element);if(!isHTMLElement(domElement))return createCoords(1);let rect=domElement.getBoundingClientRect(),{width,height,$}=getCssDimensions(domElement),x=($?round(rect.width):rect.width)/width,y=($?round(rect.height):rect.height)/height;return x&&Number.isFinite(x)||(x=1),y&&Number.isFinite(y)||(y=1),{x,y}}let noOffsets=createCoords(0);function getVisualOffsets(element){let win=getWindow(element);return isWebKit()&&win.visualViewport?{x:win.visualViewport.offsetLeft,y:win.visualViewport.offsetTop}:noOffsets}function shouldAddVisualOffsets(element,isFixed,floatingOffsetParent){return void 0===isFixed&&(isFixed=!1),!!floatingOffsetParent&&(!isFixed||floatingOffsetParent===getWindow(element))&&isFixed}function getBoundingClientRect(element,includeScale,isFixedStrategy,offsetParent){void 0===includeScale&&(includeScale=!1),void 0===isFixedStrategy&&(isFixedStrategy=!1);let clientRect=element.getBoundingClientRect(),domElement=unwrapElement(element),scale=createCoords(1);includeScale&&(offsetParent?isElement(offsetParent)&&(scale=getScale(offsetParent)):scale=getScale(element));let visualOffsets=shouldAddVisualOffsets(domElement,isFixedStrategy,offsetParent)?getVisualOffsets(domElement):createCoords(0),x=(clientRect.left+visualOffsets.x)/scale.x,y=(clientRect.top+visualOffsets.y)/scale.y,width=clientRect.width/scale.x,height=clientRect.height/scale.y;if(domElement){let win=getWindow(domElement),offsetWin=offsetParent&&isElement(offsetParent)?getWindow(offsetParent):offsetParent,currentWin=win,currentIFrame=getFrameElement(currentWin);for(;currentIFrame&&offsetParent&&offsetWin!==currentWin;){let iframeScale=getScale(currentIFrame),iframeRect=currentIFrame.getBoundingClientRect(),css=getComputedStyle1(currentIFrame),left=iframeRect.left+(currentIFrame.clientLeft+parseFloat(css.paddingLeft))*iframeScale.x,top=iframeRect.top+(currentIFrame.clientTop+parseFloat(css.paddingTop))*iframeScale.y;x*=iframeScale.x,y*=iframeScale.y,width*=iframeScale.x,height*=iframeScale.y,x+=left,y+=top,currentIFrame=getFrameElement(currentWin=getWindow(currentIFrame))}}return rectToClientRect({width,height,x,y})}function getWindowScrollBarX(element,rect){let leftScroll=getNodeScroll(element).scrollLeft;return rect?rect.left+leftScroll:getBoundingClientRect(getDocumentElement(element)).left+leftScroll}function getHTMLOffset(documentElement,scroll,ignoreScrollbarX){void 0===ignoreScrollbarX&&(ignoreScrollbarX=!1);let htmlRect=documentElement.getBoundingClientRect();return{x:htmlRect.left+scroll.scrollLeft-(ignoreScrollbarX?0:getWindowScrollBarX(documentElement,htmlRect)),y:htmlRect.top+scroll.scrollTop}}function convertOffsetParentRelativeRectToViewportRelativeRect(_ref){let{elements,rect,offsetParent,strategy}=_ref,isFixed="fixed"===strategy,documentElement=getDocumentElement(offsetParent),topLayer=!!elements&&isTopLayer(elements.floating);if(offsetParent===documentElement||topLayer&&isFixed)return rect;let scroll={scrollLeft:0,scrollTop:0},scale=createCoords(1),offsets=createCoords(0),isOffsetParentAnElement=isHTMLElement(offsetParent);if((isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed)&&(("body"!==getNodeName(offsetParent)||isOverflowElement(documentElement))&&(scroll=getNodeScroll(offsetParent)),isHTMLElement(offsetParent))){let offsetRect=getBoundingClientRect(offsetParent);scale=getScale(offsetParent),offsets.x=offsetRect.x+offsetParent.clientLeft,offsets.y=offsetRect.y+offsetParent.clientTop}let htmlOffset=!documentElement||isOffsetParentAnElement||isFixed?createCoords(0):getHTMLOffset(documentElement,scroll,!0);return{width:rect.width*scale.x,height:rect.height*scale.y,x:rect.x*scale.x-scroll.scrollLeft*scale.x+offsets.x+htmlOffset.x,y:rect.y*scale.y-scroll.scrollTop*scale.y+offsets.y+htmlOffset.y}}function getClientRects(element){return Array.from(element.getClientRects())}function getDocumentRect(element){let html=getDocumentElement(element),scroll=getNodeScroll(element),body=element.ownerDocument.body,width=max(html.scrollWidth,html.clientWidth,body.scrollWidth,body.clientWidth),height=max(html.scrollHeight,html.clientHeight,body.scrollHeight,body.clientHeight),x=-scroll.scrollLeft+getWindowScrollBarX(element),y=-scroll.scrollTop;return"rtl"===getComputedStyle1(body).direction&&(x+=max(html.clientWidth,body.clientWidth)-width),{width,height,x,y}}function getViewportRect(element,strategy){let win=getWindow(element),html=getDocumentElement(element),visualViewport=win.visualViewport,width=html.clientWidth,height=html.clientHeight,x=0,y=0;if(visualViewport){width=visualViewport.width,height=visualViewport.height;let visualViewportBased=isWebKit();(!visualViewportBased||visualViewportBased&&"fixed"===strategy)&&(x=visualViewport.offsetLeft,y=visualViewport.offsetTop)}return{width,height,x,y}}let absoluteOrFixed=new Set(["absolute","fixed"]);function getInnerBoundingClientRect(element,strategy){let clientRect=getBoundingClientRect(element,!0,"fixed"===strategy),top=clientRect.top+element.clientTop,left=clientRect.left+element.clientLeft,scale=isHTMLElement(element)?getScale(element):createCoords(1),width=element.clientWidth*scale.x,height=element.clientHeight*scale.y;return{width,height,x:left*scale.x,y:top*scale.y}}function getClientRectFromClippingAncestor(element,clippingAncestor,strategy){let rect;if("viewport"===clippingAncestor)rect=getViewportRect(element,strategy);else if("document"===clippingAncestor)rect=getDocumentRect(getDocumentElement(element));else if(isElement(clippingAncestor))rect=getInnerBoundingClientRect(clippingAncestor,strategy);else{let visualOffsets=getVisualOffsets(element);rect={x:clippingAncestor.x-visualOffsets.x,y:clippingAncestor.y-visualOffsets.y,width:clippingAncestor.width,height:clippingAncestor.height}}return rectToClientRect(rect)}function hasFixedPositionAncestor(element,stopNode){let parentNode=getParentNode(element);return!(parentNode===stopNode||!isElement(parentNode)||isLastTraversableNode(parentNode))&&("fixed"===getComputedStyle1(parentNode).position||hasFixedPositionAncestor(parentNode,stopNode))}function getClippingElementAncestors(element,cache){let cachedResult=cache.get(element);if(cachedResult)return cachedResult;let result=getOverflowAncestors(element,[],!1).filter(el=>isElement(el)&&"body"!==getNodeName(el)),currentContainingBlockComputedStyle=null,elementIsFixed="fixed"===getComputedStyle1(element).position,currentNode=elementIsFixed?getParentNode(element):element;for(;isElement(currentNode)&&!isLastTraversableNode(currentNode);){let computedStyle=getComputedStyle1(currentNode),currentNodeIsContaining=isContainingBlock(currentNode);currentNodeIsContaining||"fixed"!==computedStyle.position||(currentContainingBlockComputedStyle=null),(elementIsFixed?!currentNodeIsContaining&&!currentContainingBlockComputedStyle:!currentNodeIsContaining&&"static"===computedStyle.position&&!!currentContainingBlockComputedStyle&&absoluteOrFixed.has(currentContainingBlockComputedStyle.position)||isOverflowElement(currentNode)&&!currentNodeIsContaining&&hasFixedPositionAncestor(element,currentNode))?result=result.filter(ancestor=>ancestor!==currentNode):currentContainingBlockComputedStyle=computedStyle,currentNode=getParentNode(currentNode)}return cache.set(element,result),result}function getRectRelativeToOffsetParent(element,offsetParent,strategy){let isOffsetParentAnElement=isHTMLElement(offsetParent),documentElement=getDocumentElement(offsetParent),isFixed="fixed"===strategy,rect=getBoundingClientRect(element,!0,isFixed,offsetParent),scroll={scrollLeft:0,scrollTop:0},offsets=createCoords(0);if(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed)if(("body"!==getNodeName(offsetParent)||isOverflowElement(documentElement))&&(scroll=getNodeScroll(offsetParent)),isOffsetParentAnElement){let offsetRect=getBoundingClientRect(offsetParent,!0,isFixed,offsetParent);offsets.x=offsetRect.x+offsetParent.clientLeft,offsets.y=offsetRect.y+offsetParent.clientTop}else documentElement&&(offsets.x=getWindowScrollBarX(documentElement));isFixed&&!isOffsetParentAnElement&&documentElement&&(offsets.x=getWindowScrollBarX(documentElement));let htmlOffset=!documentElement||isOffsetParentAnElement||isFixed?createCoords(0):getHTMLOffset(documentElement,scroll);return{x:rect.left+scroll.scrollLeft-offsets.x-htmlOffset.x,y:rect.top+scroll.scrollTop-offsets.y-htmlOffset.y,width:rect.width,height:rect.height}}function isStaticPositioned(element){return"static"===getComputedStyle1(element).position}function getTrueOffsetParent(element,polyfill){if(!isHTMLElement(element)||"fixed"===getComputedStyle1(element).position)return null;if(polyfill)return polyfill(element);let rawOffsetParent=element.offsetParent;return getDocumentElement(element)===rawOffsetParent&&(rawOffsetParent=rawOffsetParent.ownerDocument.body),rawOffsetParent}function getOffsetParent(element,polyfill){let win=getWindow(element);if(isTopLayer(element))return win;if(!isHTMLElement(element)){let svgOffsetParent=getParentNode(element);for(;svgOffsetParent&&!isLastTraversableNode(svgOffsetParent);){if(isElement(svgOffsetParent)&&!isStaticPositioned(svgOffsetParent))return svgOffsetParent;svgOffsetParent=getParentNode(svgOffsetParent)}return win}let offsetParent=getTrueOffsetParent(element,polyfill);for(;offsetParent&&isTableElement(offsetParent)&&isStaticPositioned(offsetParent);)offsetParent=getTrueOffsetParent(offsetParent,polyfill);return offsetParent&&isLastTraversableNode(offsetParent)&&isStaticPositioned(offsetParent)&&!isContainingBlock(offsetParent)?win:offsetParent||getContainingBlock(element)||win}let getElementRects=async function(data){let getOffsetParentFn=this.getOffsetParent||getOffsetParent,getDimensionsFn=this.getDimensions,floatingDimensions=await getDimensionsFn(data.floating);return{reference:getRectRelativeToOffsetParent(data.reference,await getOffsetParentFn(data.floating),data.strategy),floating:{x:0,y:0,width:floatingDimensions.width,height:floatingDimensions.height}}},platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement:getDocumentElement,getClippingRect:function getClippingRect(_ref){let{element,boundary,rootBoundary,strategy}=_ref,clippingAncestors=[..."clippingAncestors"===boundary?isTopLayer(element)?[]:getClippingElementAncestors(element,this._c):[].concat(boundary),rootBoundary],firstClippingAncestor=clippingAncestors[0],clippingRect=clippingAncestors.reduce((accRect,clippingAncestor)=>{let rect=getClientRectFromClippingAncestor(element,clippingAncestor,strategy);return accRect.top=max(rect.top,accRect.top),accRect.right=min(rect.right,accRect.right),accRect.bottom=min(rect.bottom,accRect.bottom),accRect.left=max(rect.left,accRect.left),accRect},getClientRectFromClippingAncestor(element,firstClippingAncestor,strategy));return{width:clippingRect.right-clippingRect.left,height:clippingRect.bottom-clippingRect.top,x:clippingRect.left,y:clippingRect.top}},getOffsetParent,getElementRects,getClientRects,getDimensions:function getDimensions(element){let{width,height}=getCssDimensions(element);return{width,height}},getScale,isElement:isElement,isRTL:function isRTL(element){return"rtl"===getComputedStyle1(element).direction}};function rectsAreEqual(a,b){return a.x===b.x&&a.y===b.y&&a.width===b.width&&a.height===b.height}function observeMove(element,onMove){let timeoutId,io=null,root=getDocumentElement(element);function cleanup(){var _io;clearTimeout(timeoutId),null==(_io=io)||_io.disconnect(),io=null}function refresh(skip,threshold){void 0===skip&&(skip=!1),void 0===threshold&&(threshold=1),cleanup();let elementRectForRootMargin=element.getBoundingClientRect(),{left,top,width,height}=elementRectForRootMargin;if(skip||onMove(),!width||!height)return;let options={rootMargin:-floor(top)+"px "+-floor(root.clientWidth-(left+width))+"px "+-floor(root.clientHeight-(top+height))+"px "+-floor(left)+"px",threshold:max(0,min(1,threshold))||1},isFirstUpdate=!0;function handleObserve(entries){let ratio=entries[0].intersectionRatio;if(ratio!==threshold){if(!isFirstUpdate)return refresh();ratio?refresh(!1,ratio):timeoutId=setTimeout(()=>{refresh(!1,1e-7)},1e3)}1!==ratio||rectsAreEqual(elementRectForRootMargin,element.getBoundingClientRect())||refresh(),isFirstUpdate=!1}try{io=new IntersectionObserver(handleObserve,{...options,root:root.ownerDocument})}catch(_e){io=new IntersectionObserver(handleObserve,options)}io.observe(element)}return refresh(!0),cleanup}function autoUpdate(reference,floating,update,options){let frameId;void 0===options&&(options={});let{ancestorScroll=!0,ancestorResize=!0,elementResize="function"==typeof ResizeObserver,layoutShift="function"==typeof IntersectionObserver,animationFrame=!1}=options,referenceEl=unwrapElement(reference),ancestors=ancestorScroll||ancestorResize?[...referenceEl?getOverflowAncestors(referenceEl):[],...getOverflowAncestors(floating)]:[];ancestors.forEach(ancestor=>{ancestorScroll&&ancestor.addEventListener("scroll",update,{passive:!0}),ancestorResize&&ancestor.addEventListener("resize",update)});let cleanupIo=referenceEl&&layoutShift?observeMove(referenceEl,update):null,reobserveFrame=-1,resizeObserver=null;elementResize&&(resizeObserver=new ResizeObserver(_ref=>{let[firstEntry]=_ref;firstEntry&&firstEntry.target===referenceEl&&resizeObserver&&(resizeObserver.unobserve(floating),cancelAnimationFrame(reobserveFrame),reobserveFrame=requestAnimationFrame(()=>{var _resizeObserver;null==(_resizeObserver=resizeObserver)||_resizeObserver.observe(floating)})),update()}),referenceEl&&!animationFrame&&resizeObserver.observe(referenceEl),resizeObserver.observe(floating));let prevRefRect=animationFrame?getBoundingClientRect(reference):null;function frameLoop(){let nextRefRect=getBoundingClientRect(reference);prevRefRect&&!rectsAreEqual(prevRefRect,nextRefRect)&&update(),prevRefRect=nextRefRect,frameId=requestAnimationFrame(frameLoop)}return animationFrame&&frameLoop(),update(),()=>{var _resizeObserver2;ancestors.forEach(ancestor=>{ancestorScroll&&ancestor.removeEventListener("scroll",update),ancestorResize&&ancestor.removeEventListener("resize",update)}),null==cleanupIo||cleanupIo(),null==(_resizeObserver2=resizeObserver)||_resizeObserver2.disconnect(),resizeObserver=null,animationFrame&&cancelAnimationFrame(frameId)}}let arrow1=options=>({name:"arrow",options,async fn(state){let{x,y,placement,rects,platform,elements,middlewareData}=state,{element,padding=0}=evaluate(options,state)||{};if(null==element)return{};let paddingObject=getPaddingObject(padding),coords={x,y},axis=getOppositeAxis(getSideAxis(placement)),length=getAxisLength(axis),arrowDimensions=await platform.getDimensions(element),isYAxis="y"===axis,clientProp=isYAxis?"clientHeight":"clientWidth",endDiff=rects.reference[length]+rects.reference[axis]-coords[axis]-rects.floating[length],startDiff=coords[axis]-rects.reference[axis],arrowOffsetParent=await (null==platform.getOffsetParent?void 0:platform.getOffsetParent(element)),clientSize=arrowOffsetParent?arrowOffsetParent[clientProp]:0;clientSize&&await (null==platform.isElement?void 0:platform.isElement(arrowOffsetParent))||(clientSize=elements.floating[clientProp]||rects.floating[length]);let largestPossiblePadding=clientSize/2-arrowDimensions[length]/2-1,minPadding=min(paddingObject[isYAxis?"top":"left"],largestPossiblePadding),maxPadding=min(paddingObject[isYAxis?"bottom":"right"],largestPossiblePadding),max1=clientSize-arrowDimensions[length]-maxPadding,center=clientSize/2-arrowDimensions[length]/2+(endDiff/2-startDiff/2),offset=max(minPadding,min(center,max1)),shouldAddOffset=!middlewareData.arrow&&null!=getAlignment(placement)&¢er!==offset&&rects.reference[length]/2-(center<minPadding?minPadding:maxPadding)-arrowDimensions[length]/2<0,alignmentOffset=shouldAddOffset?center<minPadding?center-minPadding:center-max1:0;return{[axis]:coords[axis]+alignmentOffset,data:{[axis]:offset,centerOffset:center-offset-alignmentOffset,...shouldAddOffset&&{alignmentOffset}},reset:shouldAddOffset}}});var index="u">typeof document?__TURBOPACK__imported__module__66626__.useLayoutEffect:function noop(){};function deepEqual(a,b){let length,i,keys;if(a===b)return!0;if(typeof a!=typeof b)return!1;if("function"==typeof a&&a.toString()===b.toString())return!0;if(a&&b&&"object"==typeof a){if(Array.isArray(a)){if((length=a.length)!==b.length)return!1;for(i=length;0!=i--;)if(!deepEqual(a[i],b[i]))return!1;return!0}if((length=(keys=Object.keys(a)).length)!==Object.keys(b).length)return!1;for(i=length;0!=i--;)if(!({}).hasOwnProperty.call(b,keys[i]))return!1;for(i=length;0!=i--;){let key=keys[i];if(("_owner"!==key||!a.$$typeof)&&!deepEqual(a[key],b[key]))return!1}return!0}return a!=a&&b!=b}function getDPR(element){return"u"<typeof window?1:(element.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(element,value1){let dpr=getDPR(element);return Math.round(value1*dpr)/dpr}function useLatestRef(value1){let ref=__TURBOPACK__imported__module__66626__.useRef(value1);return index(()=>{ref.current=value1}),ref}function useFloating(options){void 0===options&&(options={});let{placement="bottom",strategy="absolute",middleware=[],platform:platform1,elements:{reference:externalReference,floating:externalFloating}={},transform=!0,whileElementsMounted,open}=options,[data,setData]=__TURBOPACK__imported__module__66626__.useState({x:0,y:0,strategy,placement,middlewareData:{},isPositioned:!1}),[latestMiddleware,setLatestMiddleware]=__TURBOPACK__imported__module__66626__.useState(middleware);deepEqual(latestMiddleware,middleware)||setLatestMiddleware(middleware);let[_reference,_setReference]=__TURBOPACK__imported__module__66626__.useState(null),[_floating,_setFloating]=__TURBOPACK__imported__module__66626__.useState(null),setReference=__TURBOPACK__imported__module__66626__.useCallback(node=>{node!==referenceRef.current&&(referenceRef.current=node,_setReference(node))},[]),setFloating=__TURBOPACK__imported__module__66626__.useCallback(node=>{node!==floatingRef.current&&(floatingRef.current=node,_setFloating(node))},[]),referenceEl=externalReference||_reference,floatingEl=externalFloating||_floating,referenceRef=__TURBOPACK__imported__module__66626__.useRef(null),floatingRef=__TURBOPACK__imported__module__66626__.useRef(null),dataRef=__TURBOPACK__imported__module__66626__.useRef(data),hasWhileElementsMounted=null!=whileElementsMounted,whileElementsMountedRef=useLatestRef(whileElementsMounted),platformRef=useLatestRef(platform1),openRef=useLatestRef(open),update=__TURBOPACK__imported__module__66626__.useCallback(()=>{var reference,floating;let cache,mergedOptions,platformWithCache;if(!referenceRef.current||!floatingRef.current)return;let config={placement,strategy,middleware:latestMiddleware};platformRef.current&&(config.platform=platformRef.current),(reference=referenceRef.current,floating=floatingRef.current,cache=new Map,platformWithCache={...(mergedOptions={platform,...config}).platform,_c:cache},computePosition(reference,floating,{...mergedOptions,platform:platformWithCache})).then(data=>{let fullData={...data,isPositioned:!1!==openRef.current};isMountedRef.current&&!deepEqual(dataRef.current,fullData)&&(dataRef.current=fullData,__TURBOPACK__imported__module__79892__.flushSync(()=>{setData(fullData)}))})},[latestMiddleware,placement,strategy,platformRef,openRef]);index(()=>{!1===open&&dataRef.current.isPositioned&&(dataRef.current.isPositioned=!1,setData(data=>({...data,isPositioned:!1})))},[open]);let isMountedRef=__TURBOPACK__imported__module__66626__.useRef(!1);index(()=>(isMountedRef.current=!0,()=>{isMountedRef.current=!1}),[]),index(()=>{if(referenceEl&&(referenceRef.current=referenceEl),floatingEl&&(floatingRef.current=floatingEl),referenceEl&&floatingEl){if(whileElementsMountedRef.current)return whileElementsMountedRef.current(referenceEl,floatingEl,update);update()}},[referenceEl,floatingEl,update,whileElementsMountedRef,hasWhileElementsMounted]);let refs=__TURBOPACK__imported__module__66626__.useMemo(()=>({reference:referenceRef,floating:floatingRef,setReference,setFloating}),[setReference,setFloating]),elements=__TURBOPACK__imported__module__66626__.useMemo(()=>({reference:referenceEl,floating:floatingEl}),[referenceEl,floatingEl]),floatingStyles=__TURBOPACK__imported__module__66626__.useMemo(()=>{let initialStyles={position:strategy,left:0,top:0};if(!elements.floating)return initialStyles;let x=roundByDPR(elements.floating,data.x),y=roundByDPR(elements.floating,data.y);return transform?{...initialStyles,transform:"translate("+x+"px, "+y+"px)",...getDPR(elements.floating)>=1.5&&{willChange:"transform"}}:{position:strategy,left:x,top:y}},[strategy,transform,elements.floating,data.x,data.y]);return __TURBOPACK__imported__module__66626__.useMemo(()=>({...data,update,refs,elements,floatingStyles}),[data,update,refs,elements,floatingStyles])}let offset2=(options,deps)=>{var options1;return{...(void 0===(options1=options)&&(options1=0),{name:"offset",options:options1,async fn(state){var _middlewareData$offse,_middlewareData$arrow;let{x,y,placement,middlewareData}=state,diffCoords=await convertValueToCoords(state,options1);return placement===(null==(_middlewareData$offse=middlewareData.offset)?void 0:_middlewareData$offse.placement)&&null!=(_middlewareData$arrow=middlewareData.arrow)&&_middlewareData$arrow.alignmentOffset?{}:{x:x+diffCoords.x,y:y+diffCoords.y,data:{...diffCoords,placement}}}}),options:[options,deps]}},shift2=(options,deps)=>{var options1;return{...(void 0===(options1=options)&&(options1={}),{name:"shift",options:options1,async fn(state){let{x,y,placement}=state,{mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!1,limiter={fn:_ref=>{let{x,y}=_ref;return{x,y}}},...detectOverflowOptions}=evaluate(options1,state),coords={x,y},overflow=await detectOverflow(state,detectOverflowOptions),crossAxis=getSideAxis(getSide(placement)),mainAxis=getOppositeAxis(crossAxis),mainAxisCoord=coords[mainAxis],crossAxisCoord=coords[crossAxis];if(checkMainAxis){let minSide="y"===mainAxis?"top":"left",maxSide="y"===mainAxis?"bottom":"right",min1=mainAxisCoord+overflow[minSide],max1=mainAxisCoord-overflow[maxSide];mainAxisCoord=max(min1,min(mainAxisCoord,max1))}if(checkCrossAxis){let minSide="y"===crossAxis?"top":"left",maxSide="y"===crossAxis?"bottom":"right",min1=crossAxisCoord+overflow[minSide],max1=crossAxisCoord-overflow[maxSide];crossAxisCoord=max(min1,min(crossAxisCoord,max1))}let limitedCoords=limiter.fn({...state,[mainAxis]:mainAxisCoord,[crossAxis]:crossAxisCoord});return{...limitedCoords,data:{x:limitedCoords.x-x,y:limitedCoords.y-y,enabled:{[mainAxis]:checkMainAxis,[crossAxis]:checkCrossAxis}}}}}),options:[options,deps]}},limitShift2=(options,deps)=>{var options1;return{...(void 0===(options1=options)&&(options1={}),{options:options1,fn(state){let{x,y,placement,rects,middlewareData}=state,{offset=0,mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!0}=evaluate(options1,state),coords={x,y},crossAxis=getSideAxis(placement),mainAxis=getOppositeAxis(crossAxis),mainAxisCoord=coords[mainAxis],crossAxisCoord=coords[crossAxis],rawOffset=evaluate(offset,state),computedOffset="number"==typeof rawOffset?{mainAxis:rawOffset,crossAxis:0}:{mainAxis:0,crossAxis:0,...rawOffset};if(checkMainAxis){let len="y"===mainAxis?"height":"width",limitMin=rects.reference[mainAxis]-rects.floating[len]+computedOffset.mainAxis,limitMax=rects.reference[mainAxis]+rects.reference[len]-computedOffset.mainAxis;mainAxisCoord<limitMin?mainAxisCoord=limitMin:mainAxisCoord>limitMax&&(mainAxisCoord=limitMax)}if(checkCrossAxis){var _middlewareData$offse,_middlewareData$offse2;let len="y"===mainAxis?"width":"height",isOriginSide=originSides.has(getSide(placement)),limitMin=rects.reference[crossAxis]-rects.floating[len]+(isOriginSide&&(null==(_middlewareData$offse=middlewareData.offset)?void 0:_middlewareData$offse[crossAxis])||0)+(isOriginSide?0:computedOffset.crossAxis),limitMax=rects.reference[crossAxis]+rects.reference[len]+(isOriginSide?0:(null==(_middlewareData$offse2=middlewareData.offset)?void 0:_middlewareData$offse2[crossAxis])||0)-(isOriginSide?computedOffset.crossAxis:0);crossAxisCoord<limitMin?crossAxisCoord=limitMin:crossAxisCoord>limitMax&&(crossAxisCoord=limitMax)}return{[mainAxis]:mainAxisCoord,[crossAxis]:crossAxisCoord}}}),options:[options,deps]}},flip2=(options,deps)=>{var options1;return{...(void 0===(options1=options)&&(options1={}),{name:"flip",options:options1,async fn(state){var _middlewareData$arrow,_middlewareData$flip,_middlewareData$flip2,_overflowsData$filter,_overflowsData$filter2;let{placement,middlewareData,rects,initialPlacement,platform,elements}=state,{mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!0,fallbackPlacements:specifiedFallbackPlacements,fallbackStrategy="bestFit",fallbackAxisSideDirection="none",flipAlignment=!0,...detectOverflowOptions}=evaluate(options1,state);if(null!=(_middlewareData$arrow=middlewareData.arrow)&&_middlewareData$arrow.alignmentOffset)return{};let side=getSide(placement),initialSideAxis=getSideAxis(initialPlacement),isBasePlacement=getSide(initialPlacement)===initialPlacement,rtl=await (null==platform.isRTL?void 0:platform.isRTL(elements.floating)),fallbackPlacements=specifiedFallbackPlacements||(isBasePlacement||!flipAlignment?[getOppositePlacement(initialPlacement)]:getExpandedPlacements(initialPlacement)),hasFallbackAxisSideDirection="none"!==fallbackAxisSideDirection;!specifiedFallbackPlacements&&hasFallbackAxisSideDirection&&fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement,flipAlignment,fallbackAxisSideDirection,rtl));let placements1=[initialPlacement,...fallbackPlacements],overflow=await detectOverflow(state,detectOverflowOptions),overflows=[],overflowsData=(null==(_middlewareData$flip=middlewareData.flip)?void 0:_middlewareData$flip.overflows)||[];if(checkMainAxis&&overflows.push(overflow[side]),checkCrossAxis){let sides1=getAlignmentSides(placement,rects,rtl);overflows.push(overflow[sides1[0]],overflow[sides1[1]])}if(overflowsData=[...overflowsData,{placement,overflows}],!overflows.every(side=>side<=0)){let nextIndex=((null==(_middlewareData$flip2=middlewareData.flip)?void 0:_middlewareData$flip2.index)||0)+1,nextPlacement=placements1[nextIndex];if(nextPlacement&&("alignment"!==checkCrossAxis||initialSideAxis===getSideAxis(nextPlacement)||overflowsData.every(d=>getSideAxis(d.placement)!==initialSideAxis||d.overflows[0]>0)))return{data:{index:nextIndex,overflows:overflowsData},reset:{placement:nextPlacement}};let resetPlacement=null==(_overflowsData$filter=overflowsData.filter(d=>d.overflows[0]<=0).sort((a,b)=>a.overflows[1]-b.overflows[1])[0])?void 0:_overflowsData$filter.placement;if(!resetPlacement)switch(fallbackStrategy){case"bestFit":{let placement=null==(_overflowsData$filter2=overflowsData.filter(d=>{if(hasFallbackAxisSideDirection){let currentSideAxis=getSideAxis(d.placement);return currentSideAxis===initialSideAxis||"y"===currentSideAxis}return!0}).map(d=>[d.placement,d.overflows.filter(overflow=>overflow>0).reduce((acc,overflow)=>acc+overflow,0)]).sort((a,b)=>a[1]-b[1])[0])?void 0:_overflowsData$filter2[0];placement&&(resetPlacement=placement);break}case"initialPlacement":resetPlacement=initialPlacement}if(placement!==resetPlacement)return{reset:{placement:resetPlacement}}}return{}}}),options:[options,deps]}},size2=(options,deps)=>{var options1;return{...(void 0===(options1=options)&&(options1={}),{name:"size",options:options1,async fn(state){var _state$middlewareData,_state$middlewareData2;let heightSide,widthSide,{placement,rects,platform,elements}=state,{apply=()=>{},...detectOverflowOptions}=evaluate(options1,state),overflow=await detectOverflow(state,detectOverflowOptions),side=getSide(placement),alignment=getAlignment(placement),isYAxis="y"===getSideAxis(placement),{width,height}=rects.floating;"top"===side||"bottom"===side?(heightSide=side,widthSide=alignment===(await (null==platform.isRTL?void 0:platform.isRTL(elements.floating))?"start":"end")?"left":"right"):(widthSide=side,heightSide="end"===alignment?"top":"bottom");let maximumClippingHeight=height-overflow.top-overflow.bottom,maximumClippingWidth=width-overflow.left-overflow.right,overflowAvailableHeight=min(height-overflow[heightSide],maximumClippingHeight),overflowAvailableWidth=min(width-overflow[widthSide],maximumClippingWidth),noShift=!state.middlewareData.shift,availableHeight=overflowAvailableHeight,availableWidth=overflowAvailableWidth;if(null!=(_state$middlewareData=state.middlewareData.shift)&&_state$middlewareData.enabled.x&&(availableWidth=maximumClippingWidth),null!=(_state$middlewareData2=state.middlewareData.shift)&&_state$middlewareData2.enabled.y&&(availableHeight=maximumClippingHeight),noShift&&!alignment){let xMin=max(overflow.left,0),xMax=max(overflow.right,0),yMin=max(overflow.top,0),yMax=max(overflow.bottom,0);isYAxis?availableWidth=width-2*(0!==xMin||0!==xMax?xMin+xMax:max(overflow.left,overflow.right)):availableHeight=height-2*(0!==yMin||0!==yMax?yMin+yMax:max(overflow.top,overflow.bottom))}await apply({...state,availableWidth,availableHeight});let nextDimensions=await platform.getDimensions(elements.floating);return width!==nextDimensions.width||height!==nextDimensions.height?{reset:{rects:!0}}:{}}}),options:[options,deps]}},hide2=(options,deps)=>{var options1;return{...(void 0===(options1=options)&&(options1={}),{name:"hide",options:options1,async fn(state){let{rects}=state,{strategy="referenceHidden",...detectOverflowOptions}=evaluate(options1,state);switch(strategy){case"referenceHidden":{let offsets=getSideOffsets(await detectOverflow(state,{...detectOverflowOptions,elementContext:"reference"}),rects.reference);return{data:{referenceHiddenOffsets:offsets,referenceHidden:isAnySideFullyClipped(offsets)}}}case"escaped":{let offsets=getSideOffsets(await detectOverflow(state,{...detectOverflowOptions,altBoundary:!0}),rects.floating);return{data:{escapedOffsets:offsets,escaped:isAnySideFullyClipped(offsets)}}}default:return{}}}}),options:[options,deps]}},arrow2=(options,deps)=>({...(options=>{function isRef(value1){return({}).hasOwnProperty.call(value1,"current")}return{name:"arrow",options,fn(state){let{element,padding}="function"==typeof options?options(state):options;return element&&isRef(element)?null!=element.current?arrow1({element:element.current,padding}).fn(state):{}:element?arrow1({element,padding}).fn(state):{}}}})(options),options:[options,deps]});var Arrow=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{children,width=10,height=5,...arrowProps}=props;return(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive.svg,{...arrowProps,ref:forwardedRef,width,height,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:props.asChild?children:(0,__TURBOPACK__imported__module__2710__.jsx)("polygon",{points:"0,0 30,0 15,10"})})});function useSize(element){let[size,setSize]=__TURBOPACK__imported__module__66626__.useState(void 0);return useLayoutEffect2(()=>{if(element){setSize({width:element.offsetWidth,height:element.offsetHeight});let resizeObserver=new ResizeObserver(entries=>{let width,height;if(!Array.isArray(entries)||!entries.length)return;let entry=entries[0];if("borderBoxSize"in entry){let borderSizeEntry=entry.borderBoxSize,borderSize=Array.isArray(borderSizeEntry)?borderSizeEntry[0]:borderSizeEntry;width=borderSize.inlineSize,height=borderSize.blockSize}else width=element.offsetWidth,height=element.offsetHeight;setSize({width,height})});return resizeObserver.observe(element,{box:"border-box"}),()=>resizeObserver.unobserve(element)}setSize(void 0)},[element]),size}Arrow.displayName="Arrow";var POPPER_NAME="Popper",[createPopperContext,createPopperScope]=createContextScope(POPPER_NAME),[PopperProvider,usePopperContext]=createPopperContext(POPPER_NAME),Popper=props=>{let{__scopePopper,children}=props,[anchor,setAnchor]=__TURBOPACK__imported__module__66626__.useState(null);return(0,__TURBOPACK__imported__module__2710__.jsx)(PopperProvider,{scope:__scopePopper,anchor,onAnchorChange:setAnchor,children})};Popper.displayName=POPPER_NAME;var ANCHOR_NAME="PopperAnchor",PopperAnchor=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopePopper,virtualRef,...anchorProps}=props,context=usePopperContext(ANCHOR_NAME,__scopePopper),ref=__TURBOPACK__imported__module__66626__.useRef(null),composedRefs=useComposedRefs(forwardedRef,ref);return __TURBOPACK__imported__module__66626__.useEffect(()=>{context.onAnchorChange(virtualRef?.current||ref.current)}),virtualRef?null:(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive.div,{...anchorProps,ref:composedRefs})});PopperAnchor.displayName=ANCHOR_NAME;var CONTENT_NAME1="PopperContent",[PopperContentProvider,useContentContext]=createPopperContext(CONTENT_NAME1),PopperContent=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopePopper,side="bottom",sideOffset=0,align="center",alignOffset=0,arrowPadding=0,avoidCollisions=!0,collisionBoundary=[],collisionPadding:collisionPaddingProp=0,sticky="partial",hideWhenDetached=!1,updatePositionStrategy="optimized",onPlaced,...contentProps}=props,context=usePopperContext(CONTENT_NAME1,__scopePopper),[content,setContent]=__TURBOPACK__imported__module__66626__.useState(null),composedRefs=useComposedRefs(forwardedRef,node=>setContent(node)),[arrow1,setArrow]=__TURBOPACK__imported__module__66626__.useState(null),arrowSize=useSize(arrow1),arrowWidth=arrowSize?.width??0,arrowHeight=arrowSize?.height??0,collisionPadding="number"==typeof collisionPaddingProp?collisionPaddingProp:{top:0,right:0,bottom:0,left:0,...collisionPaddingProp},boundary=Array.isArray(collisionBoundary)?collisionBoundary:[collisionBoundary],hasExplicitBoundaries=boundary.length>0,detectOverflowOptions={padding:collisionPadding,boundary:boundary.filter(isNotNull),altBoundary:hasExplicitBoundaries},{refs,floatingStyles,placement,isPositioned,middlewareData}=useFloating({strategy:"fixed",placement:side+("center"!==align?"-"+align:""),whileElementsMounted:(...args)=>autoUpdate(...args,{animationFrame:"always"===updatePositionStrategy}),elements:{reference:context.anchor},middleware:[offset2({mainAxis:sideOffset+arrowHeight,alignmentAxis:alignOffset}),avoidCollisions&&shift2({mainAxis:!0,crossAxis:!1,limiter:"partial"===sticky?limitShift2():void 0,...detectOverflowOptions}),avoidCollisions&&flip2({...detectOverflowOptions}),size2({...detectOverflowOptions,apply:({elements,rects,availableWidth,availableHeight})=>{let{width:anchorWidth,height:anchorHeight}=rects.reference,contentStyle=elements.floating.style;contentStyle.setProperty("--radix-popper-available-width",`${availableWidth}px`),contentStyle.setProperty("--radix-popper-available-height",`${availableHeight}px`),contentStyle.setProperty("--radix-popper-anchor-width",`${anchorWidth}px`),contentStyle.setProperty("--radix-popper-anchor-height",`${anchorHeight}px`)}}),arrow1&&arrow2({element:arrow1,padding:arrowPadding}),transformOrigin({arrowWidth,arrowHeight}),hideWhenDetached&&hide2({strategy:"referenceHidden",...detectOverflowOptions})]}),[placedSide,placedAlign]=getSideAndAlignFromPlacement(placement),handlePlaced=useCallbackRef(onPlaced);useLayoutEffect2(()=>{isPositioned&&handlePlaced?.()},[isPositioned,handlePlaced]);let arrowX=middlewareData.arrow?.x,arrowY=middlewareData.arrow?.y,cannotCenterArrow=middlewareData.arrow?.centerOffset!==0,[contentZIndex,setContentZIndex]=__TURBOPACK__imported__module__66626__.useState();return useLayoutEffect2(()=>{content&&setContentZIndex(window.getComputedStyle(content).zIndex)},[content]),(0,__TURBOPACK__imported__module__2710__.jsx)("div",{ref:refs.setFloating,"data-radix-popper-content-wrapper":"",style:{...floatingStyles,transform:isPositioned?floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:contentZIndex,"--radix-popper-transform-origin":[middlewareData.transformOrigin?.x,middlewareData.transformOrigin?.y].join(" "),...middlewareData.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:props.dir,children:(0,__TURBOPACK__imported__module__2710__.jsx)(PopperContentProvider,{scope:__scopePopper,placedSide,onArrowChange:setArrow,arrowX,arrowY,shouldHideArrow:cannotCenterArrow,children:(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive.div,{"data-side":placedSide,"data-align":placedAlign,...contentProps,ref:composedRefs,style:{...contentProps.style,animation:isPositioned?void 0:"none"}})})})});PopperContent.displayName=CONTENT_NAME1;var ARROW_NAME="PopperArrow",OPPOSITE_SIDE={top:"bottom",right:"left",bottom:"top",left:"right"},PopperArrow=__TURBOPACK__imported__module__66626__.forwardRef(function PopperArrow2(props,forwardedRef){let{__scopePopper,...arrowProps}=props,contentContext=useContentContext(ARROW_NAME,__scopePopper),baseSide=OPPOSITE_SIDE[contentContext.placedSide];return(0,__TURBOPACK__imported__module__2710__.jsx)("span",{ref:contentContext.onArrowChange,style:{position:"absolute",left:contentContext.arrowX,top:contentContext.arrowY,[baseSide]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[contentContext.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[contentContext.placedSide],visibility:contentContext.shouldHideArrow?"hidden":void 0},children:(0,__TURBOPACK__imported__module__2710__.jsx)(Arrow,{...arrowProps,ref:forwardedRef,style:{...arrowProps.style,display:"block"}})})});function isNotNull(value1){return null!==value1}PopperArrow.displayName=ARROW_NAME;var transformOrigin=options=>({name:"transformOrigin",options,fn(data){let{placement,rects,middlewareData}=data,cannotCenterArrow=middlewareData.arrow?.centerOffset!==0,arrowWidth=cannotCenterArrow?0:options.arrowWidth,arrowHeight=cannotCenterArrow?0:options.arrowHeight,[placedSide,placedAlign]=getSideAndAlignFromPlacement(placement),noArrowAlign={start:"0%",center:"50%",end:"100%"}[placedAlign],arrowXCenter=(middlewareData.arrow?.x??0)+arrowWidth/2,arrowYCenter=(middlewareData.arrow?.y??0)+arrowHeight/2,x="",y="";return"bottom"===placedSide?(x=cannotCenterArrow?noArrowAlign:`${arrowXCenter}px`,y=`${-arrowHeight}px`):"top"===placedSide?(x=cannotCenterArrow?noArrowAlign:`${arrowXCenter}px`,y=`${rects.floating.height+arrowHeight}px`):"right"===placedSide?(x=`${-arrowHeight}px`,y=cannotCenterArrow?noArrowAlign:`${arrowYCenter}px`):"left"===placedSide&&(x=`${rects.floating.width+arrowHeight}px`,y=cannotCenterArrow?noArrowAlign:`${arrowYCenter}px`),{data:{x,y}}}});function getSideAndAlignFromPlacement(placement){let[side,align="center"]=placement.split("-");return[side,align]}var POPOVER_NAME="Popover",[createPopoverContext,createPopoverScope]=createContextScope(POPOVER_NAME,[createPopperScope]),usePopperScope=createPopperScope(),[PopoverProvider,usePopoverContext]=createPopoverContext(POPOVER_NAME),Popover=props=>{let{__scopePopover,children,open:openProp,defaultOpen,onOpenChange,modal=!1}=props,popperScope=usePopperScope(__scopePopover),triggerRef=__TURBOPACK__imported__module__66626__.useRef(null),[hasCustomAnchor,setHasCustomAnchor]=__TURBOPACK__imported__module__66626__.useState(!1),[open=!1,setOpen]=useControllableState({prop:openProp,defaultProp:defaultOpen,onChange:onOpenChange});return(0,__TURBOPACK__imported__module__2710__.jsx)(Popper,{...popperScope,children:(0,__TURBOPACK__imported__module__2710__.jsx)(PopoverProvider,{scope:__scopePopover,contentId:useId(),triggerRef,open,onOpenChange:setOpen,onOpenToggle:__TURBOPACK__imported__module__66626__.useCallback(()=>setOpen(prevOpen=>!prevOpen),[setOpen]),hasCustomAnchor,onCustomAnchorAdd:__TURBOPACK__imported__module__66626__.useCallback(()=>setHasCustomAnchor(!0),[]),onCustomAnchorRemove:__TURBOPACK__imported__module__66626__.useCallback(()=>setHasCustomAnchor(!1),[]),modal,children})})};Popover.displayName=POPOVER_NAME;var ANCHOR_NAME1="PopoverAnchor";__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopePopover,...anchorProps}=props,context=usePopoverContext(ANCHOR_NAME1,__scopePopover),popperScope=usePopperScope(__scopePopover),{onCustomAnchorAdd,onCustomAnchorRemove}=context;return __TURBOPACK__imported__module__66626__.useEffect(()=>(onCustomAnchorAdd(),()=>onCustomAnchorRemove()),[onCustomAnchorAdd,onCustomAnchorRemove]),(0,__TURBOPACK__imported__module__2710__.jsx)(PopperAnchor,{...popperScope,...anchorProps,ref:forwardedRef})}).displayName=ANCHOR_NAME1;var TRIGGER_NAME1="PopoverTrigger",PopoverTrigger=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopePopover,...triggerProps}=props,context=usePopoverContext(TRIGGER_NAME1,__scopePopover),popperScope=usePopperScope(__scopePopover),composedTriggerRef=useComposedRefs(forwardedRef,context.triggerRef),trigger=(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":context.open,"aria-controls":context.contentId,"data-state":getState1(context.open),...triggerProps,ref:composedTriggerRef,onClick:composeEventHandlers(props.onClick,context.onOpenToggle)});return context.hasCustomAnchor?trigger:(0,__TURBOPACK__imported__module__2710__.jsx)(PopperAnchor,{asChild:!0,...popperScope,children:trigger})});PopoverTrigger.displayName=TRIGGER_NAME1;var PORTAL_NAME2="PopoverPortal",[PortalProvider1,usePortalContext1]=createPopoverContext(PORTAL_NAME2,{forceMount:void 0}),PopoverPortal=props=>{let{__scopePopover,forceMount,children,container}=props,context=usePopoverContext(PORTAL_NAME2,__scopePopover);return(0,__TURBOPACK__imported__module__2710__.jsx)(PortalProvider1,{scope:__scopePopover,forceMount,children:(0,__TURBOPACK__imported__module__2710__.jsx)(Presence,{present:forceMount||context.open,children:(0,__TURBOPACK__imported__module__2710__.jsx)(Portal,{asChild:!0,container,children})})})};PopoverPortal.displayName=PORTAL_NAME2;var CONTENT_NAME2="PopoverContent",PopoverContent=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let portalContext=usePortalContext1(CONTENT_NAME2,props.__scopePopover),{forceMount=portalContext.forceMount,...contentProps}=props,context=usePopoverContext(CONTENT_NAME2,props.__scopePopover);return(0,__TURBOPACK__imported__module__2710__.jsx)(Presence,{present:forceMount||context.open,children:context.modal?(0,__TURBOPACK__imported__module__2710__.jsx)(PopoverContentModal,{...contentProps,ref:forwardedRef}):(0,__TURBOPACK__imported__module__2710__.jsx)(PopoverContentNonModal,{...contentProps,ref:forwardedRef})})});PopoverContent.displayName=CONTENT_NAME2;var PopoverContentModal=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let context=usePopoverContext(CONTENT_NAME2,props.__scopePopover),contentRef=__TURBOPACK__imported__module__66626__.useRef(null),composedRefs=useComposedRefs(forwardedRef,contentRef),isRightClickOutsideRef=__TURBOPACK__imported__module__66626__.useRef(!1);return __TURBOPACK__imported__module__66626__.useEffect(()=>{let content=contentRef.current;if(content)return hideOthers(content)},[]),(0,__TURBOPACK__imported__module__2710__.jsx)(ReactRemoveScroll,{as:Slot,allowPinchZoom:!0,children:(0,__TURBOPACK__imported__module__2710__.jsx)(PopoverContentImpl,{...props,ref:composedRefs,trapFocus:context.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:composeEventHandlers(props.onCloseAutoFocus,event=>{event.preventDefault(),isRightClickOutsideRef.current||context.triggerRef.current?.focus()}),onPointerDownOutside:composeEventHandlers(props.onPointerDownOutside,event=>{let originalEvent=event.detail.originalEvent,ctrlLeftClick=0===originalEvent.button&&!0===originalEvent.ctrlKey;isRightClickOutsideRef.current=2===originalEvent.button||ctrlLeftClick},{checkForDefaultPrevented:!1}),onFocusOutside:composeEventHandlers(props.onFocusOutside,event=>event.preventDefault(),{checkForDefaultPrevented:!1})})})}),PopoverContentNonModal=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let context=usePopoverContext(CONTENT_NAME2,props.__scopePopover),hasInteractedOutsideRef=__TURBOPACK__imported__module__66626__.useRef(!1),hasPointerDownOutsideRef=__TURBOPACK__imported__module__66626__.useRef(!1);return(0,__TURBOPACK__imported__module__2710__.jsx)(PopoverContentImpl,{...props,ref:forwardedRef,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:event=>{props.onCloseAutoFocus?.(event),event.defaultPrevented||(hasInteractedOutsideRef.current||context.triggerRef.current?.focus(),event.preventDefault()),hasInteractedOutsideRef.current=!1,hasPointerDownOutsideRef.current=!1},onInteractOutside:event=>{props.onInteractOutside?.(event),event.defaultPrevented||(hasInteractedOutsideRef.current=!0,"pointerdown"===event.detail.originalEvent.type&&(hasPointerDownOutsideRef.current=!0));let target=event.target;context.triggerRef.current?.contains(target)&&event.preventDefault(),"focusin"===event.detail.originalEvent.type&&hasPointerDownOutsideRef.current&&event.preventDefault()}})}),PopoverContentImpl=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopePopover,trapFocus,onOpenAutoFocus,onCloseAutoFocus,disableOutsidePointerEvents,onEscapeKeyDown,onPointerDownOutside,onFocusOutside,onInteractOutside,...contentProps}=props,context=usePopoverContext(CONTENT_NAME2,__scopePopover),popperScope=usePopperScope(__scopePopover);return useFocusGuards(),(0,__TURBOPACK__imported__module__2710__.jsx)(FocusScope,{asChild:!0,loop:!0,trapped:trapFocus,onMountAutoFocus:onOpenAutoFocus,onUnmountAutoFocus:onCloseAutoFocus,children:(0,__TURBOPACK__imported__module__2710__.jsx)(DismissableLayer,{asChild:!0,disableOutsidePointerEvents,onInteractOutside,onEscapeKeyDown,onPointerDownOutside,onFocusOutside,onDismiss:()=>context.onOpenChange(!1),children:(0,__TURBOPACK__imported__module__2710__.jsx)(PopperContent,{"data-state":getState1(context.open),role:"dialog",id:context.contentId,...popperScope,...contentProps,ref:forwardedRef,style:{...contentProps.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),CLOSE_NAME1="PopoverClose";function getState1(open){return open?"open":"closed"}__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopePopover,...closeProps}=props,context=usePopoverContext(CLOSE_NAME1,__scopePopover);return(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive.button,{type:"button",...closeProps,ref:forwardedRef,onClick:composeEventHandlers(props.onClick,()=>context.onOpenChange(!1))})}).displayName=CLOSE_NAME1,__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopePopover,...arrowProps}=props,popperScope=usePopperScope(__scopePopover);return(0,__TURBOPACK__imported__module__2710__.jsx)(PopperArrow,{...popperScope,...arrowProps,ref:forwardedRef})}).displayName="PopoverArrow";let PopoverContent1=__TURBOPACK__imported__module__66626__.forwardRef(({className,align="center",sideOffset=4,...props},ref)=>(0,__TURBOPACK__imported__module__2710__.jsx)(PopoverPortal,{children:(0,__TURBOPACK__imported__module__2710__.jsx)(PopoverContent,{ref:ref,align:align,sideOffset:sideOffset,className:cn("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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",className),...props})}));function RouteTypeahead({selectedRoute,onRouteSelected}){let ctaText,[open,setOpen]=(0,__TURBOPACK__imported__module__66626__.useState)(!1),[shortcutLabel,setShortcutLabel]=(0,__TURBOPACK__imported__module__66626__.useState)(null);(0,__TURBOPACK__imported__module__66626__.useEffect)(()=>{let isAppleDevice=/Mac|iPhone|iPad|iPod/.test(navigator.userAgent);setShortcutLabel(isAppleDevice?"⌘K":"Ctrl+K");let handleKeyDown=e=>{let activeElement=document.activeElement;activeElement&&["INPUT","TEXTAREA"].includes(activeElement.tagName)||(isAppleDevice?e.metaKey&&"k"===e.key:e.ctrlKey&&"k"===e.key)&&(e.preventDefault(),setOpen(!0))};return window.addEventListener("keydown",handleKeyDown),()=>window.removeEventListener("keydown",handleKeyDown)},[]);let{data:routes,isLoading,error}=useSWR("data/routes.json",jsonFetcher,{onSuccess:routeNames=>{routeNames.length>0&&null==selectedRoute&&onRouteSelected(routeNames[0])}});return error?(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-md bg-destructive/10 border border-destructive/20 text-destructive text-sm max-w-full",children:[(0,__TURBOPACK__imported__module__2710__.jsx)("span",{className:"font-medium",children:"⚠"}),(0,__TURBOPACK__imported__module__2710__.jsx)("span",{className:"truncate",children:error instanceof NetworkError?"Unable to connect to server":error.message})]}):(ctaText=isLoading?"Loading routes...":null!=selectedRoute?selectedRoute:"Select route...",(0,__TURBOPACK__imported__module__2710__.jsx)("div",{className:"flex items-center gap-2 min-w-64 max-w-full",children:(0,__TURBOPACK__imported__module__2710__.jsxs)(Popover,{open:open,onOpenChange:setOpen,children:[(0,__TURBOPACK__imported__module__2710__.jsx)(PopoverTrigger,{asChild:!0,children:(0,__TURBOPACK__imported__module__2710__.jsxs)(Button,{variant:"outline",role:"combobox","aria-expanded":open,disabled:isLoading,className:"flex-grow-1 w-full justify-between font-mono text-sm",children:[(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"flex items-center",children:[isLoading?(0,__TURBOPACK__imported__module__2710__.jsx)(Loader,{className:"mr-2 inline animate-spin"}):(0,__TURBOPACK__imported__module__2710__.jsx)(Route,{className:"inline mr-2"}),ctaText]}),(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"flex items-center gap-2",children:[shortcutLabel&&(0,__TURBOPACK__imported__module__2710__.jsx)(Kbd,{children:shortcutLabel}),(0,__TURBOPACK__imported__module__2710__.jsx)(ChevronsUpDown,{className:"h-4 w-4 shrink-0 opacity-50"})]})]})}),(0,__TURBOPACK__imported__module__2710__.jsx)(PopoverContent1,{className:"w-96 p-0",children:(0,__TURBOPACK__imported__module__2710__.jsxs)(Command,{children:[(0,__TURBOPACK__imported__module__2710__.jsx)(CommandInput,{placeholder:"Search routes...",className:"h-9"}),(0,__TURBOPACK__imported__module__2710__.jsxs)(CommandList,{children:[(0,__TURBOPACK__imported__module__2710__.jsx)(CommandEmpty,{children:"No route found."}),(0,__TURBOPACK__imported__module__2710__.jsx)(CommandGroup,{children:(routes||[]).map(route=>(0,__TURBOPACK__imported__module__2710__.jsxs)(CommandItem,{value:route,onSelect:()=>{onRouteSelected(route),setOpen(!1)},className:"font-mono",children:[(0,__TURBOPACK__imported__module__2710__.jsx)(Check,{className:cn("mr-2 h-4 w-4",selectedRoute===route?"opacity-100":"opacity-0")}),route]},route))})]})]})})]})}))}PopoverContent1.displayName=PopoverContent.displayName;let CircleQuestionMark=createLucideIcon("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);function composeEventHandlers1(originalEventHandler,ourEventHandler,{checkForDefaultPrevented=!0}={}){return function handleEvent(event){if(originalEventHandler?.(event),!1===checkForDefaultPrevented||!event.defaultPrevented)return ourEventHandler?.(event)}}function setRef2(ref,value1){"function"==typeof ref?ref(value1):null!=ref&&(ref.current=value1)}function composeRefs2(...refs){return node=>refs.forEach(ref=>setRef2(ref,node))}function useComposedRefs2(...refs){return __TURBOPACK__imported__module__66626__.useCallback(composeRefs2(...refs),refs)}var Slot2=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{children,...slotProps}=props,childrenArray=__TURBOPACK__imported__module__66626__.Children.toArray(children),slottable=childrenArray.find(isSlottable2);if(slottable){let newElement=slottable.props.children,newChildren=childrenArray.map(child=>child!==slottable?child:__TURBOPACK__imported__module__66626__.Children.count(newElement)>1?__TURBOPACK__imported__module__66626__.Children.only(null):__TURBOPACK__imported__module__66626__.isValidElement(newElement)?newElement.props.children:null);return(0,__TURBOPACK__imported__module__2710__.jsx)(SlotClone1,{...slotProps,ref:forwardedRef,children:__TURBOPACK__imported__module__66626__.isValidElement(newElement)?__TURBOPACK__imported__module__66626__.cloneElement(newElement,void 0,newChildren):null})}return(0,__TURBOPACK__imported__module__2710__.jsx)(SlotClone1,{...slotProps,ref:forwardedRef,children})});Slot2.displayName="Slot";var SlotClone1=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{children,...slotProps}=props;if(__TURBOPACK__imported__module__66626__.isValidElement(children)){let childrenRef=getElementRef3(children);return __TURBOPACK__imported__module__66626__.cloneElement(children,{...mergeProps2(slotProps,children.props),ref:forwardedRef?composeRefs2(forwardedRef,childrenRef):childrenRef})}return __TURBOPACK__imported__module__66626__.Children.count(children)>1?__TURBOPACK__imported__module__66626__.Children.only(null):null});SlotClone1.displayName="SlotClone";var Slottable2=({children})=>(0,__TURBOPACK__imported__module__2710__.jsx)(__TURBOPACK__imported__module__2710__.Fragment,{children});function isSlottable2(child){return __TURBOPACK__imported__module__66626__.isValidElement(child)&&child.type===Slottable2}function mergeProps2(slotProps,childProps){let overrideProps={...childProps};for(let propName in childProps){let slotPropValue=slotProps[propName],childPropValue=childProps[propName];/^on[A-Z]/.test(propName)?slotPropValue&&childPropValue?overrideProps[propName]=(...args)=>{childPropValue(...args),slotPropValue(...args)}:slotPropValue&&(overrideProps[propName]=slotPropValue):"style"===propName?overrideProps[propName]={...slotPropValue,...childPropValue}:"className"===propName&&(overrideProps[propName]=[slotPropValue,childPropValue].filter(Boolean).join(" "))}return{...slotProps,...overrideProps}}function getElementRef3(element){let getter=Object.getOwnPropertyDescriptor(element.props,"ref")?.get,mayWarn=getter&&"isReactWarning"in getter&&getter.isReactWarning;return mayWarn?element.ref:(mayWarn=(getter=Object.getOwnPropertyDescriptor(element,"ref")?.get)&&"isReactWarning"in getter&&getter.isReactWarning)?element.props.ref:element.props.ref||element.ref}var Primitive2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((primitive,node)=>{let Node1=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{asChild,...primitiveProps}=props,Comp=asChild?Slot2:node;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,__TURBOPACK__imported__module__2710__.jsx)(Comp,{...primitiveProps,ref:forwardedRef})});return Node1.displayName=`Primitive.${node}`,{...primitive,[node]:Node1}},{});function dispatchDiscreteCustomEvent2(target,event){target&&__TURBOPACK__imported__module__79892__.flushSync(()=>target.dispatchEvent(event))}var CONTEXT_UPDATE1="dismissableLayer.update",DismissableLayerContext1=__TURBOPACK__imported__module__66626__.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),DismissableLayer1=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{disableOutsidePointerEvents=!1,onEscapeKeyDown,onPointerDownOutside,onFocusOutside,onInteractOutside,onDismiss,...layerProps}=props,context=__TURBOPACK__imported__module__66626__.useContext(DismissableLayerContext1),[node,setNode]=__TURBOPACK__imported__module__66626__.useState(null),ownerDocument=node?.ownerDocument??globalThis?.document,[,force]=__TURBOPACK__imported__module__66626__.useState({}),composedRefs=useComposedRefs2(forwardedRef,node2=>setNode(node2)),layers=Array.from(context.layers),[highestLayerWithOutsidePointerEventsDisabled]=[...context.layersWithOutsidePointerEventsDisabled].slice(-1),highestLayerWithOutsidePointerEventsDisabledIndex=layers.indexOf(highestLayerWithOutsidePointerEventsDisabled),index=node?layers.indexOf(node):-1,isBodyPointerEventsDisabled=context.layersWithOutsidePointerEventsDisabled.size>0,isPointerEventsEnabled=index>=highestLayerWithOutsidePointerEventsDisabledIndex,pointerDownOutside=usePointerDownOutside1(event=>{let target=event.target,isPointerDownOnBranch=[...context.branches].some(branch=>branch.contains(target));isPointerEventsEnabled&&!isPointerDownOnBranch&&(onPointerDownOutside?.(event),onInteractOutside?.(event),event.defaultPrevented||onDismiss?.())},ownerDocument),focusOutside=useFocusOutside1(event=>{let target=event.target;![...context.branches].some(branch=>branch.contains(target))&&(onFocusOutside?.(event),onInteractOutside?.(event),event.defaultPrevented||onDismiss?.())},ownerDocument);return useEscapeKeydown(event=>{index===context.layers.size-1&&(onEscapeKeyDown?.(event),!event.defaultPrevented&&onDismiss&&(event.preventDefault(),onDismiss()))},ownerDocument),__TURBOPACK__imported__module__66626__.useEffect(()=>{if(node)return disableOutsidePointerEvents&&(0===context.layersWithOutsidePointerEventsDisabled.size&&(originalBodyPointerEvents1=ownerDocument.body.style.pointerEvents,ownerDocument.body.style.pointerEvents="none"),context.layersWithOutsidePointerEventsDisabled.add(node)),context.layers.add(node),dispatchUpdate1(),()=>{disableOutsidePointerEvents&&1===context.layersWithOutsidePointerEventsDisabled.size&&(ownerDocument.body.style.pointerEvents=originalBodyPointerEvents1)}},[node,ownerDocument,disableOutsidePointerEvents,context]),__TURBOPACK__imported__module__66626__.useEffect(()=>()=>{node&&(context.layers.delete(node),context.layersWithOutsidePointerEventsDisabled.delete(node),dispatchUpdate1())},[node,context]),__TURBOPACK__imported__module__66626__.useEffect(()=>{let handleUpdate=()=>force({});return document.addEventListener(CONTEXT_UPDATE1,handleUpdate),()=>document.removeEventListener(CONTEXT_UPDATE1,handleUpdate)},[]),(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive2.div,{...layerProps,ref:composedRefs,style:{pointerEvents:isBodyPointerEventsDisabled?isPointerEventsEnabled?"auto":"none":void 0,...props.style},onFocusCapture:composeEventHandlers1(props.onFocusCapture,focusOutside.onFocusCapture),onBlurCapture:composeEventHandlers1(props.onBlurCapture,focusOutside.onBlurCapture),onPointerDownCapture:composeEventHandlers1(props.onPointerDownCapture,pointerDownOutside.onPointerDownCapture)})});function usePointerDownOutside1(onPointerDownOutside,ownerDocument=globalThis?.document){let handlePointerDownOutside=useCallbackRef(onPointerDownOutside),isPointerInsideReactTreeRef=__TURBOPACK__imported__module__66626__.useRef(!1),handleClickRef=__TURBOPACK__imported__module__66626__.useRef(()=>{});return __TURBOPACK__imported__module__66626__.useEffect(()=>{let handlePointerDown=event=>{if(event.target&&!isPointerInsideReactTreeRef.current){let handleAndDispatchPointerDownOutsideEvent2=function(){handleAndDispatchCustomEvent1("dismissableLayer.pointerDownOutside",handlePointerDownOutside,eventDetail,{discrete:!0})},eventDetail={originalEvent:event};"touch"===event.pointerType?(ownerDocument.removeEventListener("click",handleClickRef.current),handleClickRef.current=handleAndDispatchPointerDownOutsideEvent2,ownerDocument.addEventListener("click",handleClickRef.current,{once:!0})):handleAndDispatchPointerDownOutsideEvent2()}else ownerDocument.removeEventListener("click",handleClickRef.current);isPointerInsideReactTreeRef.current=!1},timerId=window.setTimeout(()=>{ownerDocument.addEventListener("pointerdown",handlePointerDown)},0);return()=>{window.clearTimeout(timerId),ownerDocument.removeEventListener("pointerdown",handlePointerDown),ownerDocument.removeEventListener("click",handleClickRef.current)}},[ownerDocument,handlePointerDownOutside]),{onPointerDownCapture:()=>isPointerInsideReactTreeRef.current=!0}}function useFocusOutside1(onFocusOutside,ownerDocument=globalThis?.document){let handleFocusOutside=useCallbackRef(onFocusOutside),isFocusInsideReactTreeRef=__TURBOPACK__imported__module__66626__.useRef(!1);return __TURBOPACK__imported__module__66626__.useEffect(()=>{let handleFocus=event=>{event.target&&!isFocusInsideReactTreeRef.current&&handleAndDispatchCustomEvent1("dismissableLayer.focusOutside",handleFocusOutside,{originalEvent:event},{discrete:!1})};return ownerDocument.addEventListener("focusin",handleFocus),()=>ownerDocument.removeEventListener("focusin",handleFocus)},[ownerDocument,handleFocusOutside]),{onFocusCapture:()=>isFocusInsideReactTreeRef.current=!0,onBlurCapture:()=>isFocusInsideReactTreeRef.current=!1}}function dispatchUpdate1(){let event=new CustomEvent(CONTEXT_UPDATE1);document.dispatchEvent(event)}function handleAndDispatchCustomEvent1(name,handler,detail,{discrete}){let target=detail.originalEvent.target,event=new CustomEvent(name,{bubbles:!1,cancelable:!0,detail});handler&&target.addEventListener(name,handler,{once:!0}),discrete?dispatchDiscreteCustomEvent2(target,event):target.dispatchEvent(event)}DismissableLayer1.displayName="DismissableLayer",__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let context=__TURBOPACK__imported__module__66626__.useContext(DismissableLayerContext1),ref=__TURBOPACK__imported__module__66626__.useRef(null),composedRefs=useComposedRefs2(forwardedRef,ref);return __TURBOPACK__imported__module__66626__.useEffect(()=>{let node=ref.current;if(node)return context.branches.add(node),()=>{context.branches.delete(node)}},[context.branches]),(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive2.div,{...props,ref:composedRefs})}).displayName="DismissableLayerBranch";var Arrow3=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{children,width=10,height=5,...arrowProps}=props;return(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive2.svg,{...arrowProps,ref:forwardedRef,width,height,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:props.asChild?children:(0,__TURBOPACK__imported__module__2710__.jsx)("polygon",{points:"0,0 30,0 15,10"})})});function composeContextScopes1(...scopes){let baseScope=scopes[0];if(1===scopes.length)return baseScope;let createScope=()=>{let scopeHooks=scopes.map(createScope2=>({useScope:createScope2(),scopeName:createScope2.scopeName}));return function useComposedScopes(overrideScopes){let nextScopes=scopeHooks.reduce((nextScopes2,{useScope,scopeName})=>{let currentScope=useScope(overrideScopes)[`__scope${scopeName}`];return{...nextScopes2,...currentScope}},{});return __TURBOPACK__imported__module__66626__.useMemo(()=>({[`__scope${baseScope.scopeName}`]:nextScopes}),[nextScopes])}};return createScope.scopeName=baseScope.scopeName,createScope}Arrow3.displayName="Arrow";var POPPER_NAME1="Popper",[createPopperContext1,createPopperScope1]=function createContextScope1(scopeName,createContextScopeDeps=[]){let defaultContexts=[];function createContext3(rootComponentName,defaultContext){let BaseContext=__TURBOPACK__imported__module__66626__.createContext(defaultContext),index=defaultContexts.length;function Provider(props){let{scope,children,...context}=props,Context=scope?.[scopeName][index]||BaseContext,value1=__TURBOPACK__imported__module__66626__.useMemo(()=>context,Object.values(context));return(0,__TURBOPACK__imported__module__2710__.jsx)(Context.Provider,{value:value1,children})}function useContext2(consumerName,scope){let Context=scope?.[scopeName][index]||BaseContext,context=__TURBOPACK__imported__module__66626__.useContext(Context);if(context)return context;if(void 0!==defaultContext)return defaultContext;throw Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``)}return defaultContexts=[...defaultContexts,defaultContext],Provider.displayName=rootComponentName+"Provider",[Provider,useContext2]}let createScope=()=>{let scopeContexts=defaultContexts.map(defaultContext=>__TURBOPACK__imported__module__66626__.createContext(defaultContext));return function useScope(scope){let contexts=scope?.[scopeName]||scopeContexts;return __TURBOPACK__imported__module__66626__.useMemo(()=>({[`__scope${scopeName}`]:{...scope,[scopeName]:contexts}}),[scope,contexts])}};return createScope.scopeName=scopeName,[createContext3,composeContextScopes1(createScope,...createContextScopeDeps)]}(POPPER_NAME1),[PopperProvider1,usePopperContext1]=createPopperContext1(POPPER_NAME1),Popper1=props=>{let{__scopePopper,children}=props,[anchor,setAnchor]=__TURBOPACK__imported__module__66626__.useState(null);return(0,__TURBOPACK__imported__module__2710__.jsx)(PopperProvider1,{scope:__scopePopper,anchor,onAnchorChange:setAnchor,children})};Popper1.displayName=POPPER_NAME1;var ANCHOR_NAME2="PopperAnchor",PopperAnchor1=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopePopper,virtualRef,...anchorProps}=props,context=usePopperContext1(ANCHOR_NAME2,__scopePopper),ref=__TURBOPACK__imported__module__66626__.useRef(null),composedRefs=useComposedRefs2(forwardedRef,ref);return __TURBOPACK__imported__module__66626__.useEffect(()=>{context.onAnchorChange(virtualRef?.current||ref.current)}),virtualRef?null:(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive2.div,{...anchorProps,ref:composedRefs})});PopperAnchor1.displayName=ANCHOR_NAME2;var CONTENT_NAME3="PopperContent",[PopperContentProvider1,useContentContext1]=createPopperContext1(CONTENT_NAME3),PopperContent1=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopePopper,side="bottom",sideOffset=0,align="center",alignOffset=0,arrowPadding=0,avoidCollisions=!0,collisionBoundary=[],collisionPadding:collisionPaddingProp=0,sticky="partial",hideWhenDetached=!1,updatePositionStrategy="optimized",onPlaced,...contentProps}=props,context=usePopperContext1(CONTENT_NAME3,__scopePopper),[content,setContent]=__TURBOPACK__imported__module__66626__.useState(null),composedRefs=useComposedRefs2(forwardedRef,node=>setContent(node)),[arrow1,setArrow]=__TURBOPACK__imported__module__66626__.useState(null),arrowSize=useSize(arrow1),arrowWidth=arrowSize?.width??0,arrowHeight=arrowSize?.height??0,collisionPadding="number"==typeof collisionPaddingProp?collisionPaddingProp:{top:0,right:0,bottom:0,left:0,...collisionPaddingProp},boundary=Array.isArray(collisionBoundary)?collisionBoundary:[collisionBoundary],hasExplicitBoundaries=boundary.length>0,detectOverflowOptions={padding:collisionPadding,boundary:boundary.filter(isNotNull1),altBoundary:hasExplicitBoundaries},{refs,floatingStyles,placement,isPositioned,middlewareData}=useFloating({strategy:"fixed",placement:side+("center"!==align?"-"+align:""),whileElementsMounted:(...args)=>autoUpdate(...args,{animationFrame:"always"===updatePositionStrategy}),elements:{reference:context.anchor},middleware:[offset2({mainAxis:sideOffset+arrowHeight,alignmentAxis:alignOffset}),avoidCollisions&&shift2({mainAxis:!0,crossAxis:!1,limiter:"partial"===sticky?limitShift2():void 0,...detectOverflowOptions}),avoidCollisions&&flip2({...detectOverflowOptions}),size2({...detectOverflowOptions,apply:({elements,rects,availableWidth,availableHeight})=>{let{width:anchorWidth,height:anchorHeight}=rects.reference,contentStyle=elements.floating.style;contentStyle.setProperty("--radix-popper-available-width",`${availableWidth}px`),contentStyle.setProperty("--radix-popper-available-height",`${availableHeight}px`),contentStyle.setProperty("--radix-popper-anchor-width",`${anchorWidth}px`),contentStyle.setProperty("--radix-popper-anchor-height",`${anchorHeight}px`)}}),arrow1&&arrow2({element:arrow1,padding:arrowPadding}),transformOrigin1({arrowWidth,arrowHeight}),hideWhenDetached&&hide2({strategy:"referenceHidden",...detectOverflowOptions})]}),[placedSide,placedAlign]=getSideAndAlignFromPlacement1(placement),handlePlaced=useCallbackRef(onPlaced);useLayoutEffect2(()=>{isPositioned&&handlePlaced?.()},[isPositioned,handlePlaced]);let arrowX=middlewareData.arrow?.x,arrowY=middlewareData.arrow?.y,cannotCenterArrow=middlewareData.arrow?.centerOffset!==0,[contentZIndex,setContentZIndex]=__TURBOPACK__imported__module__66626__.useState();return useLayoutEffect2(()=>{content&&setContentZIndex(window.getComputedStyle(content).zIndex)},[content]),(0,__TURBOPACK__imported__module__2710__.jsx)("div",{ref:refs.setFloating,"data-radix-popper-content-wrapper":"",style:{...floatingStyles,transform:isPositioned?floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:contentZIndex,"--radix-popper-transform-origin":[middlewareData.transformOrigin?.x,middlewareData.transformOrigin?.y].join(" "),...middlewareData.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:props.dir,children:(0,__TURBOPACK__imported__module__2710__.jsx)(PopperContentProvider1,{scope:__scopePopper,placedSide,onArrowChange:setArrow,arrowX,arrowY,shouldHideArrow:cannotCenterArrow,children:(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive2.div,{"data-side":placedSide,"data-align":placedAlign,...contentProps,ref:composedRefs,style:{...contentProps.style,animation:isPositioned?void 0:"none"}})})})});PopperContent1.displayName=CONTENT_NAME3;var ARROW_NAME2="PopperArrow",OPPOSITE_SIDE1={top:"bottom",right:"left",bottom:"top",left:"right"},PopperArrow1=__TURBOPACK__imported__module__66626__.forwardRef(function PopperArrow2(props,forwardedRef){let{__scopePopper,...arrowProps}=props,contentContext=useContentContext1(ARROW_NAME2,__scopePopper),baseSide=OPPOSITE_SIDE1[contentContext.placedSide];return(0,__TURBOPACK__imported__module__2710__.jsx)("span",{ref:contentContext.onArrowChange,style:{position:"absolute",left:contentContext.arrowX,top:contentContext.arrowY,[baseSide]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[contentContext.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[contentContext.placedSide],visibility:contentContext.shouldHideArrow?"hidden":void 0},children:(0,__TURBOPACK__imported__module__2710__.jsx)(Arrow3,{...arrowProps,ref:forwardedRef,style:{...arrowProps.style,display:"block"}})})});function isNotNull1(value1){return null!==value1}PopperArrow1.displayName=ARROW_NAME2;var transformOrigin1=options=>({name:"transformOrigin",options,fn(data){let{placement,rects,middlewareData}=data,cannotCenterArrow=middlewareData.arrow?.centerOffset!==0,arrowWidth=cannotCenterArrow?0:options.arrowWidth,arrowHeight=cannotCenterArrow?0:options.arrowHeight,[placedSide,placedAlign]=getSideAndAlignFromPlacement1(placement),noArrowAlign={start:"0%",center:"50%",end:"100%"}[placedAlign],arrowXCenter=(middlewareData.arrow?.x??0)+arrowWidth/2,arrowYCenter=(middlewareData.arrow?.y??0)+arrowHeight/2,x="",y="";return"bottom"===placedSide?(x=cannotCenterArrow?noArrowAlign:`${arrowXCenter}px`,y=`${-arrowHeight}px`):"top"===placedSide?(x=cannotCenterArrow?noArrowAlign:`${arrowXCenter}px`,y=`${rects.floating.height+arrowHeight}px`):"right"===placedSide?(x=`${-arrowHeight}px`,y=cannotCenterArrow?noArrowAlign:`${arrowYCenter}px`):"left"===placedSide&&(x=`${rects.floating.width+arrowHeight}px`,y=cannotCenterArrow?noArrowAlign:`${arrowYCenter}px`),{data:{x,y}}}});function getSideAndAlignFromPlacement1(placement){let[side,align="center"]=placement.split("-");return[side,align]}var Portal3=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{container:containerProp,...portalProps}=props,[mounted,setMounted]=__TURBOPACK__imported__module__66626__.useState(!1);useLayoutEffect2(()=>setMounted(!0),[]);let container=containerProp||mounted&&globalThis?.document?.body;return container?__TURBOPACK__imported__module__79892__.default.createPortal((0,__TURBOPACK__imported__module__2710__.jsx)(Primitive2.div,{...portalProps,ref:forwardedRef}),container):null});function useStateMachine1(initialState,machine){return __TURBOPACK__imported__module__66626__.useReducer((state,event)=>machine[state][event]??state,initialState)}Portal3.displayName="Portal";var Presence1=props=>{let{present,children}=props,presence=usePresence1(present),child="function"==typeof children?children({present:presence.isPresent}):__TURBOPACK__imported__module__66626__.Children.only(children),ref=useComposedRefs2(presence.ref,getElementRef4(child));return"function"==typeof children||presence.isPresent?__TURBOPACK__imported__module__66626__.cloneElement(child,{ref}):null};function usePresence1(present){let[node,setNode]=__TURBOPACK__imported__module__66626__.useState(),stylesRef=__TURBOPACK__imported__module__66626__.useRef({}),prevPresentRef=__TURBOPACK__imported__module__66626__.useRef(present),prevAnimationNameRef=__TURBOPACK__imported__module__66626__.useRef("none"),[state,send]=useStateMachine1(present?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return __TURBOPACK__imported__module__66626__.useEffect(()=>{let currentAnimationName=getAnimationName1(stylesRef.current);prevAnimationNameRef.current="mounted"===state?currentAnimationName:"none"},[state]),useLayoutEffect2(()=>{let styles=stylesRef.current,wasPresent=prevPresentRef.current;if(wasPresent!==present){let prevAnimationName=prevAnimationNameRef.current,currentAnimationName=getAnimationName1(styles);present?send("MOUNT"):"none"===currentAnimationName||styles?.display==="none"?send("UNMOUNT"):wasPresent&&prevAnimationName!==currentAnimationName?send("ANIMATION_OUT"):send("UNMOUNT"),prevPresentRef.current=present}},[present,send]),useLayoutEffect2(()=>{if(node){let timeoutId,ownerWindow=node.ownerDocument.defaultView??window,handleAnimationEnd=event=>{let isCurrentAnimation=getAnimationName1(stylesRef.current).includes(event.animationName);if(event.target===node&&isCurrentAnimation&&(send("ANIMATION_END"),!prevPresentRef.current)){let currentFillMode=node.style.animationFillMode;node.style.animationFillMode="forwards",timeoutId=ownerWindow.setTimeout(()=>{"forwards"===node.style.animationFillMode&&(node.style.animationFillMode=currentFillMode)})}},handleAnimationStart=event=>{event.target===node&&(prevAnimationNameRef.current=getAnimationName1(stylesRef.current))};return node.addEventListener("animationstart",handleAnimationStart),node.addEventListener("animationcancel",handleAnimationEnd),node.addEventListener("animationend",handleAnimationEnd),()=>{ownerWindow.clearTimeout(timeoutId),node.removeEventListener("animationstart",handleAnimationStart),node.removeEventListener("animationcancel",handleAnimationEnd),node.removeEventListener("animationend",handleAnimationEnd)}}send("ANIMATION_END")},[node,send]),{isPresent:["mounted","unmountSuspended"].includes(state),ref:__TURBOPACK__imported__module__66626__.useCallback(node2=>{node2&&(stylesRef.current=getComputedStyle(node2)),setNode(node2)},[])}}function getAnimationName1(styles){return styles?.animationName||"none"}function getElementRef4(element){let getter=Object.getOwnPropertyDescriptor(element.props,"ref")?.get,mayWarn=getter&&"isReactWarning"in getter&&getter.isReactWarning;return mayWarn?element.ref:(mayWarn=(getter=Object.getOwnPropertyDescriptor(element,"ref")?.get)&&"isReactWarning"in getter&&getter.isReactWarning)?element.props.ref:element.props.ref||element.ref}Presence1.displayName="Presence";var VisuallyHidden=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive2.span,{...props,ref:forwardedRef,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...props.style}}));VisuallyHidden.displayName="VisuallyHidden";var[createTooltipContext,createTooltipScope]=createContextScope("Tooltip",[createPopperScope1]),usePopperScope1=createPopperScope1(),PROVIDER_NAME="TooltipProvider",TOOLTIP_OPEN="tooltip.open",[TooltipProviderContextProvider,useTooltipProviderContext]=createTooltipContext(PROVIDER_NAME),TooltipProvider=props=>{let{__scopeTooltip,delayDuration=700,skipDelayDuration=300,disableHoverableContent=!1,children}=props,[isOpenDelayed,setIsOpenDelayed]=__TURBOPACK__imported__module__66626__.useState(!0),isPointerInTransitRef=__TURBOPACK__imported__module__66626__.useRef(!1),skipDelayTimerRef=__TURBOPACK__imported__module__66626__.useRef(0);return __TURBOPACK__imported__module__66626__.useEffect(()=>{let skipDelayTimer=skipDelayTimerRef.current;return()=>window.clearTimeout(skipDelayTimer)},[]),(0,__TURBOPACK__imported__module__2710__.jsx)(TooltipProviderContextProvider,{scope:__scopeTooltip,isOpenDelayed,delayDuration,onOpen:__TURBOPACK__imported__module__66626__.useCallback(()=>{window.clearTimeout(skipDelayTimerRef.current),setIsOpenDelayed(!1)},[]),onClose:__TURBOPACK__imported__module__66626__.useCallback(()=>{window.clearTimeout(skipDelayTimerRef.current),skipDelayTimerRef.current=window.setTimeout(()=>setIsOpenDelayed(!0),skipDelayDuration)},[skipDelayDuration]),isPointerInTransitRef,onPointerInTransitChange:__TURBOPACK__imported__module__66626__.useCallback(inTransit=>{isPointerInTransitRef.current=inTransit},[]),disableHoverableContent,children})};TooltipProvider.displayName=PROVIDER_NAME;var TOOLTIP_NAME="Tooltip",[TooltipContextProvider,useTooltipContext]=createTooltipContext(TOOLTIP_NAME),Tooltip=props=>{let{__scopeTooltip,children,open:openProp,defaultOpen=!1,onOpenChange,disableHoverableContent:disableHoverableContentProp,delayDuration:delayDurationProp}=props,providerContext=useTooltipProviderContext(TOOLTIP_NAME,props.__scopeTooltip),popperScope=usePopperScope1(__scopeTooltip),[trigger,setTrigger]=__TURBOPACK__imported__module__66626__.useState(null),contentId=useId(),openTimerRef=__TURBOPACK__imported__module__66626__.useRef(0),disableHoverableContent=disableHoverableContentProp??providerContext.disableHoverableContent,delayDuration=delayDurationProp??providerContext.delayDuration,wasOpenDelayedRef=__TURBOPACK__imported__module__66626__.useRef(!1),[open=!1,setOpen]=useControllableState({prop:openProp,defaultProp:defaultOpen,onChange:open2=>{open2?(providerContext.onOpen(),document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN))):providerContext.onClose(),onOpenChange?.(open2)}}),stateAttribute=__TURBOPACK__imported__module__66626__.useMemo(()=>open?wasOpenDelayedRef.current?"delayed-open":"instant-open":"closed",[open]),handleOpen=__TURBOPACK__imported__module__66626__.useCallback(()=>{window.clearTimeout(openTimerRef.current),openTimerRef.current=0,wasOpenDelayedRef.current=!1,setOpen(!0)},[setOpen]),handleClose=__TURBOPACK__imported__module__66626__.useCallback(()=>{window.clearTimeout(openTimerRef.current),openTimerRef.current=0,setOpen(!1)},[setOpen]),handleDelayedOpen=__TURBOPACK__imported__module__66626__.useCallback(()=>{window.clearTimeout(openTimerRef.current),openTimerRef.current=window.setTimeout(()=>{wasOpenDelayedRef.current=!0,setOpen(!0),openTimerRef.current=0},delayDuration)},[delayDuration,setOpen]);return __TURBOPACK__imported__module__66626__.useEffect(()=>()=>{openTimerRef.current&&(window.clearTimeout(openTimerRef.current),openTimerRef.current=0)},[]),(0,__TURBOPACK__imported__module__2710__.jsx)(Popper1,{...popperScope,children:(0,__TURBOPACK__imported__module__2710__.jsx)(TooltipContextProvider,{scope:__scopeTooltip,contentId,open,stateAttribute,trigger,onTriggerChange:setTrigger,onTriggerEnter:__TURBOPACK__imported__module__66626__.useCallback(()=>{providerContext.isOpenDelayed?handleDelayedOpen():handleOpen()},[providerContext.isOpenDelayed,handleDelayedOpen,handleOpen]),onTriggerLeave:__TURBOPACK__imported__module__66626__.useCallback(()=>{disableHoverableContent?handleClose():(window.clearTimeout(openTimerRef.current),openTimerRef.current=0)},[handleClose,disableHoverableContent]),onOpen:handleOpen,onClose:handleClose,disableHoverableContent,children})})};Tooltip.displayName=TOOLTIP_NAME;var TRIGGER_NAME2="TooltipTrigger",TooltipTrigger=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeTooltip,...triggerProps}=props,context=useTooltipContext(TRIGGER_NAME2,__scopeTooltip),providerContext=useTooltipProviderContext(TRIGGER_NAME2,__scopeTooltip),popperScope=usePopperScope1(__scopeTooltip),composedRefs=useComposedRefs2(forwardedRef,__TURBOPACK__imported__module__66626__.useRef(null),context.onTriggerChange),isPointerDownRef=__TURBOPACK__imported__module__66626__.useRef(!1),hasPointerMoveOpenedRef=__TURBOPACK__imported__module__66626__.useRef(!1),handlePointerUp=__TURBOPACK__imported__module__66626__.useCallback(()=>isPointerDownRef.current=!1,[]);return __TURBOPACK__imported__module__66626__.useEffect(()=>()=>document.removeEventListener("pointerup",handlePointerUp),[handlePointerUp]),(0,__TURBOPACK__imported__module__2710__.jsx)(PopperAnchor1,{asChild:!0,...popperScope,children:(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive2.button,{"aria-describedby":context.open?context.contentId:void 0,"data-state":context.stateAttribute,...triggerProps,ref:composedRefs,onPointerMove:composeEventHandlers1(props.onPointerMove,event=>{"touch"!==event.pointerType&&(hasPointerMoveOpenedRef.current||providerContext.isPointerInTransitRef.current||(context.onTriggerEnter(),hasPointerMoveOpenedRef.current=!0))}),onPointerLeave:composeEventHandlers1(props.onPointerLeave,()=>{context.onTriggerLeave(),hasPointerMoveOpenedRef.current=!1}),onPointerDown:composeEventHandlers1(props.onPointerDown,()=>{isPointerDownRef.current=!0,document.addEventListener("pointerup",handlePointerUp,{once:!0})}),onFocus:composeEventHandlers1(props.onFocus,()=>{isPointerDownRef.current||context.onOpen()}),onBlur:composeEventHandlers1(props.onBlur,context.onClose),onClick:composeEventHandlers1(props.onClick,context.onClose)})})});TooltipTrigger.displayName=TRIGGER_NAME2;var PORTAL_NAME4="TooltipPortal",[PortalProvider2,usePortalContext2]=createTooltipContext(PORTAL_NAME4,{forceMount:void 0}),TooltipPortal=props=>{let{__scopeTooltip,forceMount,children,container}=props,context=useTooltipContext(PORTAL_NAME4,__scopeTooltip);return(0,__TURBOPACK__imported__module__2710__.jsx)(PortalProvider2,{scope:__scopeTooltip,forceMount,children:(0,__TURBOPACK__imported__module__2710__.jsx)(Presence1,{present:forceMount||context.open,children:(0,__TURBOPACK__imported__module__2710__.jsx)(Portal3,{asChild:!0,container,children})})})};TooltipPortal.displayName=PORTAL_NAME4;var CONTENT_NAME4="TooltipContent",TooltipContent=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let portalContext=usePortalContext2(CONTENT_NAME4,props.__scopeTooltip),{forceMount=portalContext.forceMount,side="top",...contentProps}=props,context=useTooltipContext(CONTENT_NAME4,props.__scopeTooltip);return(0,__TURBOPACK__imported__module__2710__.jsx)(Presence1,{present:forceMount||context.open,children:context.disableHoverableContent?(0,__TURBOPACK__imported__module__2710__.jsx)(TooltipContentImpl,{side,...contentProps,ref:forwardedRef}):(0,__TURBOPACK__imported__module__2710__.jsx)(TooltipContentHoverable,{side,...contentProps,ref:forwardedRef})})}),TooltipContentHoverable=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let context=useTooltipContext(CONTENT_NAME4,props.__scopeTooltip),providerContext=useTooltipProviderContext(CONTENT_NAME4,props.__scopeTooltip),ref=__TURBOPACK__imported__module__66626__.useRef(null),composedRefs=useComposedRefs2(forwardedRef,ref),[pointerGraceArea,setPointerGraceArea]=__TURBOPACK__imported__module__66626__.useState(null),{trigger,onClose}=context,content=ref.current,{onPointerInTransitChange}=providerContext,handleRemoveGraceArea=__TURBOPACK__imported__module__66626__.useCallback(()=>{setPointerGraceArea(null),onPointerInTransitChange(!1)},[onPointerInTransitChange]),handleCreateGraceArea=__TURBOPACK__imported__module__66626__.useCallback((event,hoverTarget)=>{let currentTarget=event.currentTarget,exitPoint={x:event.clientX,y:event.clientY},exitSide=getExitSideFromRect(exitPoint,currentTarget.getBoundingClientRect());setPointerGraceArea(getHull([...getPaddedExitPoints(exitPoint,exitSide),...getPointsFromRect(hoverTarget.getBoundingClientRect())])),onPointerInTransitChange(!0)},[onPointerInTransitChange]);return __TURBOPACK__imported__module__66626__.useEffect(()=>()=>handleRemoveGraceArea(),[handleRemoveGraceArea]),__TURBOPACK__imported__module__66626__.useEffect(()=>{if(trigger&&content){let handleTriggerLeave=event=>handleCreateGraceArea(event,content),handleContentLeave=event=>handleCreateGraceArea(event,trigger);return trigger.addEventListener("pointerleave",handleTriggerLeave),content.addEventListener("pointerleave",handleContentLeave),()=>{trigger.removeEventListener("pointerleave",handleTriggerLeave),content.removeEventListener("pointerleave",handleContentLeave)}}},[trigger,content,handleCreateGraceArea,handleRemoveGraceArea]),__TURBOPACK__imported__module__66626__.useEffect(()=>{if(pointerGraceArea){let handleTrackPointerGrace=event=>{let target=event.target,pointerPosition={x:event.clientX,y:event.clientY},hasEnteredTarget=trigger?.contains(target)||content?.contains(target),isPointerOutsideGraceArea=!isPointInPolygon(pointerPosition,pointerGraceArea);hasEnteredTarget?handleRemoveGraceArea():isPointerOutsideGraceArea&&(handleRemoveGraceArea(),onClose())};return document.addEventListener("pointermove",handleTrackPointerGrace),()=>document.removeEventListener("pointermove",handleTrackPointerGrace)}},[trigger,content,pointerGraceArea,onClose,handleRemoveGraceArea]),(0,__TURBOPACK__imported__module__2710__.jsx)(TooltipContentImpl,{...props,ref:composedRefs})}),[VisuallyHiddenContentContextProvider,useVisuallyHiddenContentContext]=createTooltipContext(TOOLTIP_NAME,{isInside:!1}),TooltipContentImpl=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeTooltip,children,"aria-label":ariaLabel,onEscapeKeyDown,onPointerDownOutside,...contentProps}=props,context=useTooltipContext(CONTENT_NAME4,__scopeTooltip),popperScope=usePopperScope1(__scopeTooltip),{onClose}=context;return __TURBOPACK__imported__module__66626__.useEffect(()=>(document.addEventListener(TOOLTIP_OPEN,onClose),()=>document.removeEventListener(TOOLTIP_OPEN,onClose)),[onClose]),__TURBOPACK__imported__module__66626__.useEffect(()=>{if(context.trigger){let handleScroll=event=>{let target=event.target;target?.contains(context.trigger)&&onClose()};return window.addEventListener("scroll",handleScroll,{capture:!0}),()=>window.removeEventListener("scroll",handleScroll,{capture:!0})}},[context.trigger,onClose]),(0,__TURBOPACK__imported__module__2710__.jsx)(DismissableLayer1,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown,onPointerDownOutside,onFocusOutside:event=>event.preventDefault(),onDismiss:onClose,children:(0,__TURBOPACK__imported__module__2710__.jsxs)(PopperContent1,{"data-state":context.stateAttribute,...popperScope,...contentProps,ref:forwardedRef,style:{...contentProps.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,__TURBOPACK__imported__module__2710__.jsx)(Slottable2,{children}),(0,__TURBOPACK__imported__module__2710__.jsx)(VisuallyHiddenContentContextProvider,{scope:__scopeTooltip,isInside:!0,children:(0,__TURBOPACK__imported__module__2710__.jsx)(VisuallyHidden,{id:context.contentId,role:"tooltip",children:ariaLabel||children})})]})})});TooltipContent.displayName=CONTENT_NAME4;var ARROW_NAME3="TooltipArrow";function getExitSideFromRect(point,rect){let top=Math.abs(rect.top-point.y),bottom=Math.abs(rect.bottom-point.y),right=Math.abs(rect.right-point.x),left=Math.abs(rect.left-point.x);switch(Math.min(top,bottom,right,left)){case left:return"left";case right:return"right";case top:return"top";case bottom:return"bottom";default:throw Error("unreachable")}}function getPaddedExitPoints(exitPoint,exitSide,padding=5){let paddedExitPoints=[];switch(exitSide){case"top":paddedExitPoints.push({x:exitPoint.x-padding,y:exitPoint.y+padding},{x:exitPoint.x+padding,y:exitPoint.y+padding});break;case"bottom":paddedExitPoints.push({x:exitPoint.x-padding,y:exitPoint.y-padding},{x:exitPoint.x+padding,y:exitPoint.y-padding});break;case"left":paddedExitPoints.push({x:exitPoint.x+padding,y:exitPoint.y-padding},{x:exitPoint.x+padding,y:exitPoint.y+padding});break;case"right":paddedExitPoints.push({x:exitPoint.x-padding,y:exitPoint.y-padding},{x:exitPoint.x-padding,y:exitPoint.y+padding})}return paddedExitPoints}function getPointsFromRect(rect){let{top,right,bottom,left}=rect;return[{x:left,y:top},{x:right,y:top},{x:right,y:bottom},{x:left,y:bottom}]}function isPointInPolygon(point,polygon){let{x,y}=point,inside=!1;for(let i=0,j=polygon.length-1;i<polygon.length;j=i++){let xi=polygon[i].x,yi=polygon[i].y,xj=polygon[j].x,yj=polygon[j].y;yi>y!=yj>y&&x<(xj-xi)*(y-yi)/(yj-yi)+xi&&(inside=!inside)}return inside}function getHull(points){let newPoints=points.slice();return newPoints.sort((a,b)=>a.x<b.x?-1:a.x>b.x?1:a.y<b.y?-1:1*!!(a.y>b.y)),getHullPresorted(newPoints)}function getHullPresorted(points){if(points.length<=1)return points.slice();let upperHull=[];for(let i=0;i<points.length;i++){let p=points[i];for(;upperHull.length>=2;){let q=upperHull[upperHull.length-1],r=upperHull[upperHull.length-2];if((q.x-r.x)*(p.y-r.y)>=(q.y-r.y)*(p.x-r.x))upperHull.pop();else break}upperHull.push(p)}upperHull.pop();let lowerHull=[];for(let i=points.length-1;i>=0;i--){let p=points[i];for(;lowerHull.length>=2;){let q=lowerHull[lowerHull.length-1],r=lowerHull[lowerHull.length-2];if((q.x-r.x)*(p.y-r.y)>=(q.y-r.y)*(p.x-r.x))lowerHull.pop();else break}lowerHull.push(p)}return(lowerHull.pop(),1===upperHull.length&&1===lowerHull.length&&upperHull[0].x===lowerHull[0].x&&upperHull[0].y===lowerHull[0].y)?upperHull:upperHull.concat(lowerHull)}__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeTooltip,...arrowProps}=props,popperScope=usePopperScope1(__scopeTooltip);return useVisuallyHiddenContentContext(ARROW_NAME3,__scopeTooltip).isInside?null:(0,__TURBOPACK__imported__module__2710__.jsx)(PopperArrow1,{...popperScope,...arrowProps,ref:forwardedRef})}).displayName=ARROW_NAME3;let TooltipContent1=__TURBOPACK__imported__module__66626__.forwardRef(({className,sideOffset=4,...props},ref)=>(0,__TURBOPACK__imported__module__2710__.jsx)(TooltipPortal,{children:(0,__TURBOPACK__imported__module__2710__.jsx)(TooltipContent,{ref:ref,sideOffset:sideOffset,className:cn("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-md outline-none data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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",className),...props})}));TooltipContent1.displayName=TooltipContent.displayName;let ArrowUp=createLucideIcon("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),ChevronLeft=createLucideIcon("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),ChevronRight=createLucideIcon("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Box=createLucideIcon("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]),File=createLucideIcon("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]),PanelTop=createLucideIcon("panel-top",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}]]),SquareFunction=createLucideIcon("square-function",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3",key:"m1af9g"}],["path",{d:"M9 11.2h5.7",key:"3zgcl2"}]]),Server=createLucideIcon("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]),Globe=createLucideIcon("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),MessageCircleQuestionMark=createLucideIcon("message-circle-question-mark",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),Package=createLucideIcon("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);function spitPathSegments(path){return Array.from(path.matchAll(/(.+?(?:\/|$))/g)).map(([i])=>i)}function getPathParts(currentPath,previousPath){let currentSegments=spitPathSegments(currentPath),commonCount=0;if(previousPath){let previousSegments=spitPathSegments(previousPath),minLength=Math.min(currentSegments.length,previousSegments.length);for(let i=0;i<minLength;i++)if(currentSegments[i]===previousSegments[i])commonCount++;else break}let infrastructureCount=0,packageNameCount=0,nodeModulesIndex=currentSegments.lastIndexOf("node_modules/");return -1===nodeModulesIndex?nodeModulesIndex=currentSegments.length:(infrastructureCount=nodeModulesIndex+1,packageNameCount=currentSegments[nodeModulesIndex+1]?.startsWith("@")?2:1),currentSegments.map((segment,i)=>({segment,isCommon:i<commonCount,isLastCommon:i===commonCount-1,isInfrastructure:i<infrastructureCount,isPackageName:i>=infrastructureCount&&i<infrastructureCount+packageNameCount}))}function getTitle(level){let parts=[];return level.fullPath?parts.push(`Full Path: ${level.fullPath}`):parts.push(`Path: ${level.path}`),level.layer&&parts.push(`Layer: ${level.layer}`),level.moduleType&&parts.push(`Module Type: ${level.moduleType}`),level.treeShaking&&parts.push(`Tree Shaking: ${level.treeShaking}`),level.templateArgs&&parts.push(`Template Args: ${level.templateArgs}`),parts.join("\n")}function ImportChain({startFileId,analyzeData,modulesData,depthMap,environmentFilter}){let[currentRouteOnly,setCurrentRouteOnly]=(0,__TURBOPACK__imported__module__66626__.useState)(!0),[selectedIndices,setSelectedIndices]=(0,__TURBOPACK__imported__module__66626__.useState)([]),getSourceIndexFromModuleIndex=moduleIndex=>{let module=modulesData.module(moduleIndex);if(!module)return;let modulePath=module.path;for(let i=0;i<analyzeData.sourceCount();i++)if(analyzeData.getFullSourcePath(i)===modulePath)return i},chain=(0,__TURBOPACK__imported__module__66626__.useMemo)(()=>{let path,result=[],visitedModules=new Set,startPath=analyzeData.getFullSourcePath(startFileId);if(!startPath)return result;let startModuleIndices=(path=analyzeData.getFullSourcePath(startFileId),modulesData.getModuleIndiciesFromPath(path)).filter(moduleIndex=>{if(currentRouteOnly&&!depthMap.has(moduleIndex))return!1;let module=modulesData.module(moduleIndex),layer=splitIdent(module?.ident||"").layer;return!(layer&&("client"===environmentFilter&&/ssr|rsc|route|api/.test(layer)||"server"===environmentFilter&&/client/.test(layer)))&&!0});if(0===startModuleIndices.length)return result;let actualStartIdx=Math.min(selectedIndices[0]??0,startModuleIndices.length-1),startModuleIndex=startModuleIndices[actualStartIdx],startIdent=modulesData.module(startModuleIndex)?.ident??"";result.push({moduleIndex:startModuleIndex,sourceIndex:startFileId,path:startPath,...splitIdent(startIdent),depth:depthMap.get(startModuleIndex)??1/0,selectedIndex:actualStartIdx,totalCount:startModuleIndices.length}),visitedModules.add(startModuleIndex);let levelIndex=1,currentModuleIndex=startModuleIndex;for(;;){let validDependents=[...modulesData.moduleDependents(currentModuleIndex).map(index=>({index,async:!1,traced:!1,depth:depthMap.get(index)??1/0})),...modulesData.asyncModuleDependents(currentModuleIndex).map(index=>({index,async:!0,traced:!1,depth:depthMap.get(index)??1/0})),...modulesData.tracedModuleDependents(currentModuleIndex).map(index=>({index,async:!1,traced:!0,depth:depthMap.get(index)??1/0}))].filter(({index,depth})=>!visitedModules.has(index)&&(isFinite(depth)||!currentRouteOnly));if(0===validDependents.length)break;let dependentsInfo=validDependents.map(({index:moduleIndex,async:isAsync,traced:isTraced,depth})=>{let sourceIndex=getSourceIndexFromModuleIndex(moduleIndex),ident=modulesData.module(moduleIndex)?.ident||"";return{moduleIndex,sourceIndex,ident,isAsync,isTraced,depth}});dependentsInfo.sort((a,b)=>a.depth!==b.depth?a.depth-b.depth:a.ident.length!==b.ident.length?a.ident.length-b.ident.length:a.ident.localeCompare(b.ident));let actualIdx=Math.min(selectedIndices[levelIndex]??0,dependentsInfo.length-1),selectedDepInfo=dependentsInfo[actualIdx],selectedDepModule=modulesData.module(selectedDepInfo.moduleIndex);if(!selectedDepModule||null==selectedDepModule.ident||(result.push({moduleIndex:selectedDepInfo.moduleIndex,sourceIndex:selectedDepInfo.sourceIndex,path:selectedDepModule.path,depth:depthMap.get(selectedDepInfo.moduleIndex)??1/0,...splitIdent(selectedDepModule.ident),selectedIndex:actualIdx,totalCount:dependentsInfo.length,info:selectedDepInfo}),visitedModules.add(selectedDepInfo.moduleIndex),currentModuleIndex=selectedDepInfo.moduleIndex,++levelIndex>100))break}return result},[startFileId,analyzeData,modulesData,selectedIndices,currentRouteOnly,depthMap,environmentFilter]);return analyzeData.getFullSourcePath(startFileId)?(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"space-y-2",children:[(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,__TURBOPACK__imported__module__2710__.jsx)("h3",{className:"text-xs font-semibold text-foreground flex-1",children:"Import Chain"}),(0,__TURBOPACK__imported__module__2710__.jsxs)("label",{className:"inline-flex items-center space-x-2 text-xs cursor-pointer",title:"Only include dependent modules that are part of the current route's bundle",children:[(0,__TURBOPACK__imported__module__2710__.jsx)("span",{children:"Current route only"}),(0,__TURBOPACK__imported__module__2710__.jsx)("input",{type:"checkbox",className:"form-checkbox h-4 w-4 text-primary",checked:currentRouteOnly,onChange:()=>setCurrentRouteOnly(prev=>!prev)})]})]}),(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"space-y-0",children:[chain.map((level,index)=>{let previousPath=index>0?chain[index-1].path:null,parts=getPathParts(level.path,previousPath),flags=void 0!==level.sourceIndex?analyzeData.getSourceFlags(level.sourceIndex):void 0,currentItemInfo=level.info;return(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{children:[currentItemInfo?.isAsync&&(0,__TURBOPACK__imported__module__2710__.jsx)("div",{className:"h-8"}),(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"flex items-center justify-center gap-2 py-1",children:[currentItemInfo?.isAsync&&(0,__TURBOPACK__imported__module__2710__.jsx)("span",{className:"text-xs text-muted-foreground italic",children:"(async)"}),currentItemInfo?.isTraced&&(0,__TURBOPACK__imported__module__2710__.jsx)("span",{className:"text-xs text-muted-foreground italic",children:"(traced)"}),index>0?(0,__TURBOPACK__imported__module__2710__.jsx)(ArrowUp,{className:"w-4 h-4 text-muted-foreground"}):void 0,level.totalCount>1&&(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"flex items-center gap-1 flex-none",children:[(0,__TURBOPACK__imported__module__2710__.jsx)("button",{type:"button",onClick:()=>{setSelectedIndices(prev=>{let newIndices=[...prev],currentIdx=newIndices[index]??0,level=chain[index];return newIndices[index]=currentIdx>0?currentIdx-1:level.totalCount-1,newIndices.slice(0,index+1)})},className:"p-0.5 hover:bg-accent rounded transition-colors cursor-pointer",title:"Previous dependent",children:(0,__TURBOPACK__imported__module__2710__.jsx)(ChevronLeft,{className:"w-3 h-3"})}),(0,__TURBOPACK__imported__module__2710__.jsxs)("span",{className:"text-muted-foreground text-xs min-w-[3ch] text-center",children:[level.selectedIndex+1,"/",level.totalCount]}),(0,__TURBOPACK__imported__module__2710__.jsx)("button",{type:"button",onClick:()=>{setSelectedIndices(prev=>{let newIndices=[...prev],currentIdx=newIndices[index]??0,level=chain[index];return newIndices[index]=currentIdx<level.totalCount-1?currentIdx+1:0,newIndices.slice(0,index+1)})},className:"p-0.5 hover:bg-accent rounded transition-colors cursor-pointer",title:"Next dependent",children:(0,__TURBOPACK__imported__module__2710__.jsx)(ChevronRight,{className:"w-3 h-3"})})]})]}),currentItemInfo?.isAsync&&(0,__TURBOPACK__imported__module__2710__.jsx)("div",{className:"h-8"}),(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"flex items-center gap-2",children:[(0,__TURBOPACK__imported__module__2710__.jsx)("div",{className:"flex flex-col gap-1 items-center",children:(0,__TURBOPACK__imported__module__2710__.jsx)(LayerIcon,{layer:level.layer})}),(0,__TURBOPACK__imported__module__2710__.jsx)("div",{className:"flex-1 border border-border rounded px-2 py-1 bg-background",children:(0,__TURBOPACK__imported__module__2710__.jsx)("span",{className:"font-mono text-xs text-foreground text-center block break-words",title:getTitle(level),children:parts.map(({segment,isCommon,isLastCommon,isInfrastructure,isPackageName},i)=>(0,__TURBOPACK__imported__module__2710__.jsxs)("span",{className:__TURBOPACK__default__export__(segment.length>20&&"break-all",isCommon&&!isLastCommon&&!isPackageName&&!isInfrastructure&&"text-muted-foreground/80",!isCommon&&!isInfrastructure&&"font-bold",isInfrastructure&&"text-muted-foreground/50",isPackageName&&"text-orange-500"),children:[segment,(0,__TURBOPACK__imported__module__2710__.jsx)("wbr",{})]},i))})}),(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"flex flex-col gap-1 items-center",children:[/client/.test(level.layer||"")&&(flags?.client?(0,__TURBOPACK__imported__module__2710__.jsx)("div",{title:"Included on client-side of this route",children:(0,__TURBOPACK__imported__module__2710__.jsx)(PanelTop,{className:"w-3 h-3 text-green-500"})}):(0,__TURBOPACK__imported__module__2710__.jsx)("div",{title:"On client layer, but not included on client-side of this route (might be optimized away)",children:(0,__TURBOPACK__imported__module__2710__.jsx)(PanelTop,{className:"w-3 h-3 text-gray-500"})})),/ssr/.test(level.layer||"")&&(flags?.server?(0,__TURBOPACK__imported__module__2710__.jsx)("div",{title:"Included on server-side of this route for server-side rendering",children:(0,__TURBOPACK__imported__module__2710__.jsx)(Globe,{className:"w-3 h-3 text-blue-500"})}):(0,__TURBOPACK__imported__module__2710__.jsx)("div",{title:"On server-side rendering layer, but not included on server-side of this route (might be optimized away)",children:(0,__TURBOPACK__imported__module__2710__.jsx)(Globe,{className:"w-3 h-3 text-gray-500"})})),/rsc/.test(level.layer||"")&&(flags?.server?(0,__TURBOPACK__imported__module__2710__.jsx)("div",{title:"Included on server-side of this route as Server Component",children:(0,__TURBOPACK__imported__module__2710__.jsx)(Server,{className:"w-3 h-3 text-orange-500"})}):(0,__TURBOPACK__imported__module__2710__.jsx)("div",{title:"On Server Component layer, but not included on server-side of this route (might be optimized away)",children:(0,__TURBOPACK__imported__module__2710__.jsx)(Server,{className:"w-3 h-3 text-gray-500"})})),/route|api/.test(level.layer||"")&&(flags?.server?(0,__TURBOPACK__imported__module__2710__.jsx)("div",{title:"Included on server-side of this route for API routes",children:(0,__TURBOPACK__imported__module__2710__.jsx)(SquareFunction,{className:"w-3 h-3 text-red-500"})}):(0,__TURBOPACK__imported__module__2710__.jsx)("div",{title:"On API route layer, but not included on server-side of this route (might be optimized away)",children:(0,__TURBOPACK__imported__module__2710__.jsx)(SquareFunction,{className:"w-3 h-3 text-gray-500"})}))]})]}),(0,__TURBOPACK__imported__module__2710__.jsx)("div",{className:"block text-center",children:level.treeShaking&&(0,__TURBOPACK__imported__module__2710__.jsx)("div",{className:"text-xs text-foreground text-center",children:"locals"===level.treeShaking?"(local declarations only)":"module evaluation"===level.treeShaking?"(only the module evaluation part of the module)":`(${level.treeShaking})`})})]},`${level.path}-${index}`)}),0===chain.length&&(0,__TURBOPACK__imported__module__2710__.jsxs)("p",{className:"text-muted-foreground italic text-xs",children:["No dependents found."," ",currentRouteOnly?(0,__TURBOPACK__imported__module__2710__.jsx)(Button,{variant:"link",className:"inline p-0 text-xs h-auto",onClick:()=>setCurrentRouteOnly(!1),children:"Show all routes."}):null]})]})]}):null}function LayerIcon({layer}){return layer&&"external"!==layer?layer.includes("app")?(0,__TURBOPACK__imported__module__2710__.jsx)("div",{title:`App Router (${layer})`,children:(0,__TURBOPACK__imported__module__2710__.jsx)(Box,{className:"w-3 h-3 text-green-500"})}):"externals-tracing"===layer?(0,__TURBOPACK__imported__module__2710__.jsx)("div",{title:"External Asset",children:(0,__TURBOPACK__imported__module__2710__.jsx)(Package,{className:"w-3 h-3"})}):(0,__TURBOPACK__imported__module__2710__.jsx)("div",{title:`Pages Router (${layer})`,children:(0,__TURBOPACK__imported__module__2710__.jsx)(File,{className:"w-3 h-3 text-purple-500"})}):(0,__TURBOPACK__imported__module__2710__.jsx)("div",{title:"Unknown",children:(0,__TURBOPACK__imported__module__2710__.jsx)(MessageCircleQuestionMark,{className:"w-3 h-3 text-gray-500"})})}function Skeleton({className,...props}){return(0,__TURBOPACK__imported__module__2710__.jsx)("div",{className:cn("animate-pulse rounded-md bg-muted",className),...props})}function TreemapSkeleton(){return(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"h-full w-full grid grid-cols-12 grid-rows-8 gap-2",children:[(0,__TURBOPACK__imported__module__2710__.jsx)(Skeleton,{className:"col-span-5 row-span-4"}),(0,__TURBOPACK__imported__module__2710__.jsx)(Skeleton,{className:"col-span-4 row-span-3"}),(0,__TURBOPACK__imported__module__2710__.jsx)(Skeleton,{className:"col-span-3 row-span-3"}),(0,__TURBOPACK__imported__module__2710__.jsx)(Skeleton,{className:"col-span-4 row-span-1"}),(0,__TURBOPACK__imported__module__2710__.jsx)(Skeleton,{className:"col-span-3 row-span-2"}),(0,__TURBOPACK__imported__module__2710__.jsx)(Skeleton,{className:"col-span-3 row-span-4"}),(0,__TURBOPACK__imported__module__2710__.jsx)(Skeleton,{className:"col-span-2 row-span-2"}),(0,__TURBOPACK__imported__module__2710__.jsx)(Skeleton,{className:"col-span-2 row-span-2"}),(0,__TURBOPACK__imported__module__2710__.jsx)(Skeleton,{className:"col-span-3 row-span-2"}),(0,__TURBOPACK__imported__module__2710__.jsx)(Skeleton,{className:"col-span-4 row-span-2"}),(0,__TURBOPACK__imported__module__2710__.jsx)(Skeleton,{className:"col-span-2 row-span-2"}),(0,__TURBOPACK__imported__module__2710__.jsx)(Skeleton,{className:"col-span-3 row-span-2"})]})}let badgeVariants=cva("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",client:"border-transparent bg-blue-50 dark:bg-blue-950 text-blue-700 dark:text-blue-300 ring-1 ring-inset ring-blue-700/10 dark:ring-blue-300/20",server:"border-transparent bg-purple-50 dark:bg-purple-950 text-purple-700 dark:text-purple-300 ring-1 ring-inset ring-purple-700/10 dark:ring-purple-300/20",traced:"border-transparent bg-grey-50 dark:bg-grey-950 text-grey-700 dark:text-grey-300 ring-1 ring-inset ring-grey-700/10 dark:ring-grey-300/20",polyfill:"border-transparent bg-polyfill/10 dark:bg-polyfill/30 text-polyfill dark:text-polyfill-foreground ring-1 ring-inset ring-polyfill/20"}},defaultVariants:{variant:"default"}});function Badge({className,variant,...props}){return(0,__TURBOPACK__imported__module__2710__.jsx)("span",{className:cn(badgeVariants({variant}),className),...props})}function formatBytes1(bytes){return 0===bytes?"0 B":bytes<1024?`${bytes} B`:bytes<1048576?`${(bytes/1024).toFixed(2)} KB`:bytes<0x40000000?`${(bytes/1048576).toFixed(2)} MB`:`${(bytes/0x40000000).toFixed(2)} GB`}function Sidebar({sidebarWidth,analyzeData,modulesData,selectedSourceIndex,moduleDepthMap,environmentFilter,filterSource,isLoading=!1}){return(filterSource=filterSource??(()=>!0),isLoading||!analyzeData)?(0,__TURBOPACK__imported__module__2710__.jsx)("div",{className:"flex-none bg-muted border-l border-border overflow-y-auto",style:{width:`${sidebarWidth}%`},children:(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"flex-1 p-3 space-y-4 overflow-y-auto",children:[(0,__TURBOPACK__imported__module__2710__.jsx)(Skeleton,{className:"h-4 w-3/4"}),(0,__TURBOPACK__imported__module__2710__.jsx)(Skeleton,{className:"h-4 w-full"}),(0,__TURBOPACK__imported__module__2710__.jsx)(Skeleton,{className:"h-4 w-5/6"}),(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,__TURBOPACK__imported__module__2710__.jsx)(Skeleton,{className:"h-3 w-full"}),(0,__TURBOPACK__imported__module__2710__.jsx)(Skeleton,{className:"h-3 w-full"}),(0,__TURBOPACK__imported__module__2710__.jsx)(Skeleton,{className:"h-3 w-4/5"})]})]})}):(0,__TURBOPACK__imported__module__2710__.jsx)("div",{className:"flex-none bg-muted border-l border-border overflow-y-auto",style:{width:`${sidebarWidth}%`},children:null!=selectedSourceIndex?(0,__TURBOPACK__imported__module__2710__.jsx)(SelectionDetails,{analyzeData:analyzeData,modulesData:modulesData,selectedSourceIndex:selectedSourceIndex,filterSource:filterSource,moduleDepthMap:moduleDepthMap,environmentFilter:environmentFilter}):null})}function SelectionDetails({analyzeData,modulesData,selectedSourceIndex,filterSource,moduleDepthMap,environmentFilter}){let specialModuleType=getSpecialModuleType(analyzeData,selectedSourceIndex),selectedSource=null!=selectedSourceIndex?analyzeData.source(selectedSourceIndex):void 0,hasChildModules=null!=selectedSourceIndex&&analyzeData.sourceChildren(selectedSourceIndex).length>0,childModuleCount=hasChildModules&&null!=selectedSourceIndex?analyzeData.getRecursiveModuleCount(selectedSourceIndex,filterSource):null,{size,compressedSize}=analyzeData.getRecursiveSizes(selectedSourceIndex,filterSource),chunks=null!=selectedSourceIndex?analyzeData.sourceChunks(selectedSourceIndex):[];return(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"flex-1 p-3 space-y-8 overflow-y-auto",children:[(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"space-y-2",children:[(0,__TURBOPACK__imported__module__2710__.jsx)("h2",{className:"text-s font-semibold mb-1 text-foreground truncate",children:selectedSource?.path||"All Route Modules"}),null!=selectedSourceIndex&&analyzeData.source(selectedSourceIndex)?(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"text-xs",children:[(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{children:[(0,__TURBOPACK__imported__module__2710__.jsx)("span",{children:formatBytes1(compressedSize)}),(0,__TURBOPACK__imported__module__2710__.jsx)("span",{className:"text-muted-foreground ml-1",children:"compressed (estimated)"}),(0,__TURBOPACK__imported__module__2710__.jsx)(InlineHelpTooltip,{children:"Estimated compressed size. Modules are compressed in isolation which may differ from their size in the final chunk."})]}),(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{children:[(0,__TURBOPACK__imported__module__2710__.jsx)("span",{children:formatBytes1(size)})," ",(0,__TURBOPACK__imported__module__2710__.jsx)("span",{className:"text-muted-foreground",children:"uncompressed"}),(0,__TURBOPACK__imported__module__2710__.jsx)(InlineHelpTooltip,{children:"Uncompressed modules may still be minified, tree-shaken, and dead-code eliminated. They just don't account for general compression like gzip."})]}),hasChildModules&&null!=childModuleCount?(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{children:[(0,__TURBOPACK__imported__module__2710__.jsxs)("span",{children:[childModuleCount," "]}),(0,__TURBOPACK__imported__module__2710__.jsx)("span",{className:"text-muted-foreground",children:1===childModuleCount?"module":"modules"})]}):null]}):null]}),null!=selectedSourceIndex&&analyzeData.source(selectedSourceIndex)&&(specialModuleType===SpecialModule1.POLYFILL_MODULE||specialModuleType===SpecialModule1.POLYFILL_NOMODULE)&&(0,__TURBOPACK__imported__module__2710__.jsxs)("dl",{className:"flex items-center gap-2",children:[(0,__TURBOPACK__imported__module__2710__.jsx)("dt",{className:"inline-flex items-center",children:(0,__TURBOPACK__imported__module__2710__.jsx)(Badge,{variant:"polyfill",children:"Polyfill"})}),(0,__TURBOPACK__imported__module__2710__.jsx)("dd",{className:"text-xs text-muted-foreground",children:"Next.js built-in polyfills"})]}),null!=selectedSourceIndex&&analyzeData.source(selectedSourceIndex)&&!hasChildModules&&(0,__TURBOPACK__imported__module__2710__.jsxs)(__TURBOPACK__imported__module__2710__.Fragment,{children:[modulesData&&(0,__TURBOPACK__imported__module__2710__.jsx)(ImportChain,{startFileId:selectedSourceIndex,analyzeData:analyzeData,modulesData:modulesData,depthMap:moduleDepthMap,environmentFilter:environmentFilter}),chunks.length>0?(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"mt-2",children:[(0,__TURBOPACK__imported__module__2710__.jsx)("p",{className:"text-xs font-semibold text-foreground",children:"Output Chunks"}),(0,__TURBOPACK__imported__module__2710__.jsx)("ul",{className:"text-xs text-muted-foreground font-mono mt-1 space-y-1",children:chunks.map(chunk=>(0,__TURBOPACK__imported__module__2710__.jsx)("li",{className:"break-all",children:chunk},chunk))})]}):null]})]})}function InlineHelpTooltip({children}){return(0,__TURBOPACK__imported__module__2710__.jsx)(TooltipProvider,{children:(0,__TURBOPACK__imported__module__2710__.jsxs)(Tooltip,{children:[(0,__TURBOPACK__imported__module__2710__.jsx)(TooltipTrigger,{asChild:!0,children:(0,__TURBOPACK__imported__module__2710__.jsx)(CircleQuestionMark,{size:14,className:"inline-block ml-1 text-muted-foreground","aria-hidden":"true"})}),(0,__TURBOPACK__imported__module__2710__.jsx)(TooltipContent1,{className:"max-w-xs",side:"top",align:"center",children:children})]})})}function _extends(){return(_extends=Object.assign.bind()).apply(null,arguments)}function _assertThisInitialized(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function _inheritsLoose(t,o){t.prototype=Object.create(o.prototype),t.prototype.constructor=t,_setPrototypeOf(t,o)}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _isNativeFunction(t){try{return -1!==Function.toString.call(t).indexOf("[native code]")}catch(n){return"function"==typeof t}}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t})()}function _construct(t,e,r){if(_isNativeReflectConstruct())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,e);var p=new(t.bind.apply(t,o));return r&&_setPrototypeOf(p,r.prototype),p}function _wrapNativeSuper(t){var r="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function _wrapNativeSuper(t){if(null===t||!_isNativeFunction(t))return t;if("function"!=typeof t)throw TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,Wrapper)}function Wrapper(){return _construct(t,arguments,_getPrototypeOf(this).constructor)}return Wrapper.prototype=Object.create(t.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(Wrapper,t)})(t)}__turbopack_context__.i(522);var PolishedError=function(_Error){function PolishedError(code){return _assertThisInitialized(_Error.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+code+" for more information.")||this)}return _inheritsLoose(PolishedError,_Error),PolishedError}(_wrapNativeSuper(Error));function endsWith(string,suffix){return string.substr(-suffix.length)===suffix}var cssRegex$1=/^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/;function stripUnit(value1){return"string"!=typeof value1?value1:value1.match(cssRegex$1)?parseFloat(value1):value1}var pixelsto=function pxtoFactory(to){return function(pxval,base){void 0===base&&(base="16px");var newPxval=pxval,newBase=base;if("string"==typeof pxval){if(!endsWith(pxval,"px"))throw new PolishedError(69,to,pxval);newPxval=stripUnit(pxval)}if("string"==typeof base){if(!endsWith(base,"px"))throw new PolishedError(70,to,base);newBase=stripUnit(base)}if("string"==typeof newPxval)throw new PolishedError(71,pxval,to);if("string"==typeof newBase)throw new PolishedError(72,base,to);return""+newPxval/newBase+to}};function colorToInt(color){return Math.round(255*color)}function convertToInt(red,green,blue){return colorToInt(red)+","+colorToInt(green)+","+colorToInt(blue)}function hslToRgb(hue,saturation,lightness,convert){if(void 0===convert&&(convert=convertToInt),0===saturation)return convert(lightness,lightness,lightness);var huePrime=(hue%360+360)%360/60,chroma=(1-Math.abs(2*lightness-1))*saturation,secondComponent=chroma*(1-Math.abs(huePrime%2-1)),red=0,green=0,blue=0;huePrime>=0&&huePrime<1?(red=chroma,green=secondComponent):huePrime>=1&&huePrime<2?(red=secondComponent,green=chroma):huePrime>=2&&huePrime<3?(green=chroma,blue=secondComponent):huePrime>=3&&huePrime<4?(green=secondComponent,blue=chroma):huePrime>=4&&huePrime<5?(red=secondComponent,blue=chroma):huePrime>=5&&huePrime<6&&(red=chroma,blue=secondComponent);var lightnessModification=lightness-chroma/2;return convert(red+lightnessModification,green+lightnessModification,blue+lightnessModification)}pixelsto("em"),pixelsto("rem");var namedColorMap={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function nameToHex(color){if("string"!=typeof color)return color;var normalizedColorName=color.toLowerCase();return namedColorMap[normalizedColorName]?"#"+namedColorMap[normalizedColorName]:color}var hexRegex=/^#[a-fA-F0-9]{6}$/,hexRgbaRegex=/^#[a-fA-F0-9]{8}$/,reducedHexRegex=/^#[a-fA-F0-9]{3}$/,reducedRgbaHexRegex=/^#[a-fA-F0-9]{4}$/,rgbRegex=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,rgbaRegex=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,hslRegex=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,hslaRegex=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function parseToRgb(color){if("string"!=typeof color)throw new PolishedError(3);var normalizedColor=nameToHex(color);if(normalizedColor.match(hexRegex))return{red:parseInt(""+normalizedColor[1]+normalizedColor[2],16),green:parseInt(""+normalizedColor[3]+normalizedColor[4],16),blue:parseInt(""+normalizedColor[5]+normalizedColor[6],16)};if(normalizedColor.match(hexRgbaRegex)){var alpha=parseFloat((parseInt(""+normalizedColor[7]+normalizedColor[8],16)/255).toFixed(2));return{red:parseInt(""+normalizedColor[1]+normalizedColor[2],16),green:parseInt(""+normalizedColor[3]+normalizedColor[4],16),blue:parseInt(""+normalizedColor[5]+normalizedColor[6],16),alpha:alpha}}if(normalizedColor.match(reducedHexRegex))return{red:parseInt(""+normalizedColor[1]+normalizedColor[1],16),green:parseInt(""+normalizedColor[2]+normalizedColor[2],16),blue:parseInt(""+normalizedColor[3]+normalizedColor[3],16)};if(normalizedColor.match(reducedRgbaHexRegex)){var _alpha=parseFloat((parseInt(""+normalizedColor[4]+normalizedColor[4],16)/255).toFixed(2));return{red:parseInt(""+normalizedColor[1]+normalizedColor[1],16),green:parseInt(""+normalizedColor[2]+normalizedColor[2],16),blue:parseInt(""+normalizedColor[3]+normalizedColor[3],16),alpha:_alpha}}var rgbMatched=rgbRegex.exec(normalizedColor);if(rgbMatched)return{red:parseInt(""+rgbMatched[1],10),green:parseInt(""+rgbMatched[2],10),blue:parseInt(""+rgbMatched[3],10)};var rgbaMatched=rgbaRegex.exec(normalizedColor.substring(0,50));if(rgbaMatched)return{red:parseInt(""+rgbaMatched[1],10),green:parseInt(""+rgbaMatched[2],10),blue:parseInt(""+rgbaMatched[3],10),alpha:parseFloat(""+rgbaMatched[4])>1?parseFloat(""+rgbaMatched[4])/100:parseFloat(""+rgbaMatched[4])};var hslMatched=hslRegex.exec(normalizedColor);if(hslMatched){var rgbColorString="rgb("+hslToRgb(parseInt(""+hslMatched[1],10),parseInt(""+hslMatched[2],10)/100,parseInt(""+hslMatched[3],10)/100)+")",hslRgbMatched=rgbRegex.exec(rgbColorString);if(!hslRgbMatched)throw new PolishedError(4,normalizedColor,rgbColorString);return{red:parseInt(""+hslRgbMatched[1],10),green:parseInt(""+hslRgbMatched[2],10),blue:parseInt(""+hslRgbMatched[3],10)}}var hslaMatched=hslaRegex.exec(normalizedColor.substring(0,50));if(hslaMatched){var _rgbColorString="rgb("+hslToRgb(parseInt(""+hslaMatched[1],10),parseInt(""+hslaMatched[2],10)/100,parseInt(""+hslaMatched[3],10)/100)+")",_hslRgbMatched=rgbRegex.exec(_rgbColorString);if(!_hslRgbMatched)throw new PolishedError(4,normalizedColor,_rgbColorString);return{red:parseInt(""+_hslRgbMatched[1],10),green:parseInt(""+_hslRgbMatched[2],10),blue:parseInt(""+_hslRgbMatched[3],10),alpha:parseFloat(""+hslaMatched[4])>1?parseFloat(""+hslaMatched[4])/100:parseFloat(""+hslaMatched[4])}}throw new PolishedError(5)}function rgbToHsl(color){var hue,red=color.red/255,green=color.green/255,blue=color.blue/255,max=Math.max(red,green,blue),min=Math.min(red,green,blue),lightness=(max+min)/2;if(max===min)if(void 0!==color.alpha)return{hue:0,saturation:0,lightness:lightness,alpha:color.alpha};else return{hue:0,saturation:0,lightness:lightness};var delta=max-min,saturation=lightness>.5?delta/(2-max-min):delta/(max+min);switch(max){case red:hue=(green-blue)/delta+6*(green<blue);break;case green:hue=(blue-red)/delta+2;break;default:hue=(red-green)/delta+4}return(hue*=60,void 0!==color.alpha)?{hue:hue,saturation:saturation,lightness:lightness,alpha:color.alpha}:{hue:hue,saturation:saturation,lightness:lightness}}function parseToHsl(color){return rgbToHsl(parseToRgb(color))}var reduceHexValue$1=function reduceHexValue(value1){return 7===value1.length&&value1[1]===value1[2]&&value1[3]===value1[4]&&value1[5]===value1[6]?"#"+value1[1]+value1[3]+value1[5]:value1};function numberToHex(value1){var hex=value1.toString(16);return 1===hex.length?"0"+hex:hex}function colorToHex(color){return numberToHex(Math.round(255*color))}function convertToHex(red,green,blue){return reduceHexValue$1("#"+colorToHex(red)+colorToHex(green)+colorToHex(blue))}function hsl(value1,saturation,lightness){if("number"==typeof value1&&"number"==typeof saturation&&"number"==typeof lightness)return hslToRgb(value1,saturation,lightness,convertToHex);if("object"==typeof value1&&void 0===saturation&&void 0===lightness){var hue;return hue=value1.hue,hslToRgb(hue,value1.saturation,value1.lightness,convertToHex)}throw new PolishedError(1)}function hsla(value1,saturation,lightness,alpha){if("number"==typeof value1&&"number"==typeof saturation&&"number"==typeof lightness&&"number"==typeof alpha)return alpha>=1?hslToRgb(value1,saturation,lightness,convertToHex):"rgba("+hslToRgb(value1,saturation,lightness)+","+alpha+")";if("object"==typeof value1&&void 0===saturation&&void 0===lightness&&void 0===alpha){var hue;return value1.alpha>=1?(hue=value1.hue,hslToRgb(hue,value1.saturation,value1.lightness,convertToHex)):"rgba("+hslToRgb(value1.hue,value1.saturation,value1.lightness)+","+value1.alpha+")"}throw new PolishedError(2)}function rgb(value1,green,blue){if("number"==typeof value1&&"number"==typeof green&&"number"==typeof blue)return reduceHexValue$1("#"+numberToHex(value1)+numberToHex(green)+numberToHex(blue));if("object"==typeof value1&&void 0===green&&void 0===blue)return reduceHexValue$1("#"+numberToHex(value1.red)+numberToHex(value1.green)+numberToHex(value1.blue));throw new PolishedError(6)}function rgba(firstValue,secondValue,thirdValue,fourthValue){if("string"==typeof firstValue&&"number"==typeof secondValue){var rgbValue=parseToRgb(firstValue);return"rgba("+rgbValue.red+","+rgbValue.green+","+rgbValue.blue+","+secondValue+")"}if("number"==typeof firstValue&&"number"==typeof secondValue&&"number"==typeof thirdValue&&"number"==typeof fourthValue)return fourthValue>=1?rgb(firstValue,secondValue,thirdValue):"rgba("+firstValue+","+secondValue+","+thirdValue+","+fourthValue+")";if("object"==typeof firstValue&&void 0===secondValue&&void 0===thirdValue&&void 0===fourthValue)return firstValue.alpha>=1?rgb(firstValue.red,firstValue.green,firstValue.blue):"rgba("+firstValue.red+","+firstValue.green+","+firstValue.blue+","+firstValue.alpha+")";throw new PolishedError(7)}function toColorString(color){if("object"!=typeof color)throw new PolishedError(8);if("number"==typeof color.red&&"number"==typeof color.green&&"number"==typeof color.blue&&"number"==typeof color.alpha)return rgba(color);if("number"==typeof color.red&&"number"==typeof color.green&&"number"==typeof color.blue&&("number"!=typeof color.alpha||void 0===color.alpha))return rgb(color);if("number"==typeof color.hue&&"number"==typeof color.saturation&&"number"==typeof color.lightness&&"number"==typeof color.alpha)return hsla(color);if("number"==typeof color.hue&&"number"==typeof color.saturation&&"number"==typeof color.lightness&&("number"!=typeof color.alpha||void 0===color.alpha))return hsl(color);throw new PolishedError(8)}function curried(f,length,acc){return function fn(){var combined=acc.concat(Array.prototype.slice.call(arguments));return combined.length>=length?f.apply(this,combined):curried(f,length,combined)}}function curry(f){return curried(f,f.length,[])}function guard(lowerBoundary,upperBoundary,value1){return Math.max(lowerBoundary,Math.min(upperBoundary,value1))}curry(function adjustHue(degree,color){if("transparent"===color)return color;var hslColor=parseToHsl(color);return toColorString(_extends({},hslColor,{hue:hslColor.hue+parseFloat(degree)}))});var curriedDarken=curry(function darken(amount,color){if("transparent"===color)return color;var hslColor=parseToHsl(color);return toColorString(_extends({},hslColor,{lightness:guard(0,1,hslColor.lightness-parseFloat(amount))}))});function getLuminance(color){if("transparent"===color)return 0;var rgbColor=parseToRgb(color),_Object$keys$map=Object.keys(rgbColor).map(function(key){var channel=rgbColor[key]/255;return channel<=.03928?channel/12.92:Math.pow((channel+.055)/1.055,2.4)});return parseFloat((.2126*_Object$keys$map[0]+.7152*_Object$keys$map[1]+.0722*_Object$keys$map[2]).toFixed(3))}function getContrast(color1,color2){var luminance1=getLuminance(color1),luminance2=getLuminance(color2);return parseFloat((luminance1>luminance2?(luminance1+.05)/(luminance2+.05):(luminance2+.05)/(luminance1+.05)).toFixed(2))}curry(function desaturate(amount,color){if("transparent"===color)return color;var hslColor=parseToHsl(color);return toColorString(_extends({},hslColor,{saturation:guard(0,1,hslColor.saturation-parseFloat(amount))}))});var curriedLighten=curry(function lighten(amount,color){if("transparent"===color)return color;var hslColor=parseToHsl(color);return toColorString(_extends({},hslColor,{lightness:guard(0,1,hslColor.lightness+parseFloat(amount))}))}),curriedMix=curry(function mix(weight,color,otherColor){if("transparent"===color)return otherColor;if("transparent"===otherColor)return color;if(0===weight)return otherColor;var parsedColor1=parseToRgb(color),color1=_extends({},parsedColor1,{alpha:"number"==typeof parsedColor1.alpha?parsedColor1.alpha:1}),parsedColor2=parseToRgb(otherColor),color2=_extends({},parsedColor2,{alpha:"number"==typeof parsedColor2.alpha?parsedColor2.alpha:1}),alphaDelta=color1.alpha-color2.alpha,x=2*parseFloat(weight)-1,weight1=((x*alphaDelta==-1?x:x+alphaDelta)/(1+x*alphaDelta)+1)/2,weight2=1-weight1;return rgba({red:Math.floor(color1.red*weight1+color2.red*weight2),green:Math.floor(color1.green*weight1+color2.green*weight2),blue:Math.floor(color1.blue*weight1+color2.blue*weight2),alpha:color1.alpha*parseFloat(weight)+color2.alpha*(1-parseFloat(weight))})});curry(function opacify(amount,color){if("transparent"===color)return color;var parsedColor=parseToRgb(color),alpha="number"==typeof parsedColor.alpha?parsedColor.alpha:1;return rgba(_extends({},parsedColor,{alpha:guard(0,1,(100*alpha+100*parseFloat(amount))/100)}))});var defaultReturnIfLightColor="#000",defaultReturnIfDarkColor="#fff";function readableColor(color,returnIfLightColor,returnIfDarkColor,strict){void 0===returnIfLightColor&&(returnIfLightColor=defaultReturnIfLightColor),void 0===returnIfDarkColor&&(returnIfDarkColor=defaultReturnIfDarkColor),void 0===strict&&(strict=!0);var isColorLight=getLuminance(color)>.179,preferredReturnColor=isColorLight?returnIfLightColor:returnIfDarkColor;return!strict||getContrast(color,preferredReturnColor)>=4.5?preferredReturnColor:isColorLight?defaultReturnIfLightColor:defaultReturnIfDarkColor}function layoutTreemap(sizes,rect){if(0===sizes.length)return[];if(1===sizes.length)return[rect];let totalSize=sizes.reduce((a,b)=>a+b,0),normalizedSizes=sizes.map(s=>s/totalSize*rect.width*rect.height),result=[],remaining=[...normalizedSizes],currentRect={...rect},totalRemaining=remaining.reduce((a,b)=>a+b,0);for(;remaining.length>1;){let vertical=currentRect.width>=currentRect.height,picked=[],sum=0;for(let size of remaining)if(picked.push(size),sum+=size,vertical){if(currentRect.width*sum/totalRemaining>currentRect.height/picked.length*.9)break}else if(currentRect.height*sum/totalRemaining>currentRect.width/picked.length*.9)break;0===picked.length&&(picked.push(remaining[0]),sum=remaining[0]);let spaceRatio=sum/totalRemaining;if(totalRemaining-=sum,vertical){let rowWidth=Math.round(spaceRatio*currentRect.width),offsetY=0;for(let i=0;i<picked.length;i++){let size=picked[i],itemHeight=i===picked.length-1?Math.round(currentRect.height-offsetY):Math.round(size/sum*currentRect.height);result.push({x:Math.round(currentRect.x),y:Math.round(currentRect.y+offsetY),width:rowWidth,height:itemHeight}),offsetY+=itemHeight}currentRect={x:Math.round(currentRect.x+rowWidth),y:Math.round(currentRect.y),width:Math.round(currentRect.width-rowWidth),height:Math.round(currentRect.height)}}else{let rowHeight=Math.round(spaceRatio*currentRect.height),offsetX=0;for(let i=0;i<picked.length;i++){let size=picked[i],itemWidth=i===picked.length-1?Math.round(currentRect.width-offsetX):Math.round(size/sum*currentRect.width);result.push({x:Math.round(currentRect.x+offsetX),y:Math.round(currentRect.y),width:itemWidth,height:rowHeight}),offsetX+=itemWidth}currentRect={x:Math.round(currentRect.x),y:Math.round(currentRect.y+rowHeight),width:Math.round(currentRect.width),height:Math.round(currentRect.height-rowHeight)}}remaining=remaining.slice(picked.length)}return 1===remaining.length&&result.push(currentRect),result}curry(function saturate(amount,color){if("transparent"===color)return color;var hslColor=parseToHsl(color);return toColorString(_extends({},hslColor,{saturation:guard(0,1,hslColor.saturation+parseFloat(amount))}))}),curry(function setHue(hue,color){return"transparent"===color?color:toColorString(_extends({},parseToHsl(color),{hue:parseFloat(hue)}))}),curry(function setLightness(lightness,color){return"transparent"===color?color:toColorString(_extends({},parseToHsl(color),{lightness:parseFloat(lightness)}))}),curry(function setSaturation(saturation,color){return"transparent"===color?color:toColorString(_extends({},parseToHsl(color),{saturation:parseFloat(saturation)}))}),curry(function shade(percentage,color){return"transparent"===color?color:curriedMix(parseFloat(percentage),"rgb(0, 0, 0)",color)}),curry(function tint(percentage,color){return"transparent"===color?color:curriedMix(parseFloat(percentage),"rgb(255, 255, 255)",color)}),curry(function transparentize(amount,color){if("transparent"===color)return color;var parsedColor=parseToRgb(color),alpha="number"==typeof parsedColor.alpha?parsedColor.alpha:1;return rgba(_extends({},parsedColor,{alpha:guard(0,1,(100*alpha-100*parseFloat(amount)).toFixed(2)/100)}))});var SizeMode1=((SizeMode={}).Compressed="compressed",SizeMode.Uncompressed="uncompressed",SizeMode);function precomputeSourceMetadata(analyzeData,filterSource){let sourceCount=analyzeData.sourceCount(),metadata=Array(sourceCount);for(let i=sourceCount-1;i>=0;i--){let children=analyzeData.sourceChildren(i),ownSize=analyzeData.getOwnSizes(i);0===children.length?metadata[i]={size:ownSize.size,compressedSize:ownSize.compressedSize,filtered:!!filterSource&&!filterSource(i)}:metadata[i]={filtered:!0,size:ownSize.size,compressedSize:ownSize.compressedSize}}function processDirectory(idx){let children=analyzeData.sourceChildren(idx);if(0===children.length)return;let totalUncompressedSize=metadata[idx].size,totalCompressedSize=metadata[idx].compressedSize,hasVisibleChild=!1;for(let childIdx of children)processDirectory(childIdx),metadata[childIdx].filtered||(totalUncompressedSize+=metadata[childIdx].size,totalCompressedSize+=metadata[childIdx].compressedSize,hasVisibleChild=!0);metadata[idx].size=totalUncompressedSize,metadata[idx].compressedSize=totalCompressedSize,metadata[idx].filtered=!hasVisibleChild}for(let rootIdx of analyzeData.sourceRoots())processDirectory(rootIdx);return metadata}function computeTreemapLayoutFromAnalyzeInternal(analyzeData,sourceIndex,foldedPath,rect,metadata,sizeMode){let source=analyzeData.source(sourceIndex);if(!source)throw Error(`Source at index ${sourceIndex} not found`);let isDirectory=source.path.endsWith("/")||!source.path,childrenIndices=analyzeData.sourceChildren(sourceIndex);if(1===childrenIndices.length&&isDirectory&&(foldedPath+source.path).length<=40){let childIndex=childrenIndices[0],child=analyzeData.source(childIndex);if(child?.path.endsWith("/"))return computeTreemapLayoutFromAnalyzeInternal(analyzeData,childIndex,foldedPath+source.path,rect,metadata,sizeMode)}let totalSize="compressed"===sizeMode?metadata[sourceIndex].compressedSize:metadata[sourceIndex].size;if(!isDirectory||0===childrenIndices.length)return{name:source.path,size:totalSize,type:"file",rect,sourceIndex,specialModuleType:getSpecialModuleType(analyzeData,sourceIndex),...analyzeData.getSourceFlags(sourceIndex)};let directoryName=foldedPath+source.path||"All Route Modules",titleBarHeight=Math.round(Math.max(12,Math.min(24,.1*rect.height))),isCollapsed=rect.height<30,contentRect={x:Math.round(rect.x),y:Math.round(rect.y+titleBarHeight),width:Math.max(0,Math.round(rect.width-2)),height:Math.max(0,Math.round(rect.height-titleBarHeight-2))};if(isCollapsed){function countDescendants(idx){let children=analyzeData.sourceChildren(idx);return 0===children.length?1:children.reduce((sum,childIdx)=>sum+countDescendants(childIdx),0)}return{name:directoryName,size:totalSize,type:"collapsed-directory",rect,titleBarHeight,itemCount:countDescendants(sourceIndex),children:[],sourceIndex,specialModuleType:null}}let childrenData=[];for(let childIndex of childrenIndices){if(!analyzeData.source(childIndex)||metadata[childIndex].filtered)continue;let childSize="compressed"===sizeMode?metadata[childIndex].compressedSize:metadata[childIndex].size;childrenData.push({index:childIndex,size:childSize||1})}if(0===childrenData.length)return{name:directoryName,size:totalSize,type:"directory",rect,titleBarHeight,children:[],sourceIndex,specialModuleType:null};childrenData.sort((a,b)=>b.size-a.size);let childRects=layoutTreemap(childrenData.map(c=>c.size),contentRect);return{name:directoryName,size:totalSize,type:"directory",rect,titleBarHeight,children:childrenData.map((child,i)=>computeTreemapLayoutFromAnalyzeInternal(analyzeData,child.index,"",childRects[i],metadata,sizeMode)),sourceIndex,specialModuleType:null}}function computeTreemapLayoutFromAnalyze(analyzeData,sourceIndex,rect,filterSource,sizeMode="compressed"){let metadata=precomputeSourceMetadata(analyzeData,filterSource);return computeTreemapLayoutFromAnalyzeInternal(analyzeData,sourceIndex,"",rect,metadata,sizeMode)}let UI_FONT="system-ui, sans-serif";function getFileColor(node){let{js,css,json,asset,client,traced,specialModuleType}=node;if(isPolyfill(specialModuleType))return"#5f707f";let color="#9ca3af";return js&&(color="#4682b4"),css&&(color="#8b7d9e"),json&&(color="#297a3a"),asset&&(color="#da2f35"),!client&&(color=curriedDarken(.3,color),traced&&(color=curriedLighten(.15,color))),color}function isPolyfill(specialModuleType){return specialModuleType===SpecialModule1.POLYFILL_MODULE||specialModuleType===SpecialModule1.POLYFILL_NOMODULE}function calculateTitleFontSizes(titleBarHeight){let titleFontSize=Math.min(10,.5*titleBarHeight),sizeFontSize=Math.min(9,titleFontSize-2);return{titleFontSize,sizeFontSize}}let textWidthCache=new Map;function measureTextCached(ctx,text){let cacheKey=`${ctx.font}|${text}`,width=textWidthCache.get(cacheKey);if(void 0!==width)return textWidthCache.delete(cacheKey),textWidthCache.set(cacheKey,width),width;if(width=ctx.measureText(text).width,textWidthCache.size>=3e4){let firstKey=textWidthCache.keys().next().value;void 0!==firstKey&&textWidthCache.delete(firstKey)}return textWidthCache.set(cacheKey,width),width}function truncateTextWithEllipsisIfNeeded(ctx,text,maxWidth){let ellipsisWidth=measureTextCached(ctx,"...");if(measureTextCached(ctx,text)<=maxWidth)return text;let left=0,right=text.length,bestLength=0;for(;left<=right;){let mid=Math.floor((left+right)/2),truncated=text.slice(0,mid);ctx.measureText(truncated).width+ellipsisWidth<=maxWidth?(bestLength=mid,left=mid+1):right=mid-1}return bestLength>0?`${text.slice(0,bestLength)}...`:"..."}function findNodeAtPosition(node,x,y){let{rect}=node;if(x<rect.x||x>rect.x+rect.width||y<rect.y||y>rect.y+rect.height)return null;if("collapsed-directory"===node.type)return node;if("directory"===node.type){let titleBarHeight=node.titleBarHeight||0;if(y>=rect.y&&y<=rect.y+titleBarHeight)return node}if(node.children)for(let child of node.children){let found=findNodeAtPosition(child,x,y);if(found)return found}return node}function searchOriginalTreeForMatch(node,currentPath,searchQuery){let path=[...currentPath,node.name],fullPath=path.join("/").toLowerCase(),query=searchQuery.toLowerCase();if(fullPath.includes(query))return!0;if(node.children){for(let child of node.children)if(searchOriginalTreeForMatch(child,path,searchQuery))return!0}return!1}function nodeOrDescendantsMatchSearch(node,currentPath,searchQuery,originalData){let path=[...currentPath,node.name],fullPath=path.join("/").toLowerCase(),query=searchQuery.toLowerCase();if(fullPath.includes(query))return!0;if("collapsed-directory"===node.type){let originalNode=originalData;for(let i=1;i<path.length;i++){if(!originalNode.children)return!1;let found=originalNode.children.find(child=>child.name===path[i]);if(!found)return!1;originalNode=found}if(originalNode.children){for(let child of originalNode.children)if(searchOriginalTreeForMatch(child,path,searchQuery))return!0}return!1}if(node.children){for(let child of node.children)if(nodeOrDescendantsMatchSearch(child,path,searchQuery,originalData))return!0}return!1}function drawTreemap(ctx,node,hoveredAncestorChain,selectedAncestorChain,useSelectionFade,focusedAncestorChain,searchQuery,originalData,immediateHoveredSourceIndex,currentPath=[],parentFadedOut=!1,insideActiveSubtree=!1){let{rect,name,type,titleBarHeight,children,sourceIndex}=node,path=[...currentPath,name],focusedSourceIndex=focusedAncestorChain[focusedAncestorChain.length-1];if(focusedAncestorChain.length>1&&void 0!==sourceIndex){let isOnFocusPath=focusedAncestorChain.includes(sourceIndex),isFocusedNode=sourceIndex===focusedSourceIndex;if(isOnFocusPath&&!isFocusedNode&&"directory"===type){let colors=getThemeColors();if(titleBarHeight&&rect.height>20){ctx.fillStyle=colors.dirTitleBg,ctx.globalAlpha=1,ctx.fillRect(rect.x,rect.y,rect.width,titleBarHeight),ctx.strokeStyle=colors.dirTitleBorder,ctx.beginPath(),ctx.moveTo(rect.x,rect.y+titleBarHeight),ctx.lineTo(rect.x+rect.width,rect.y+titleBarHeight),ctx.stroke();let{titleFontSize}=calculateTitleFontSizes(titleBarHeight);ctx.fillStyle=colors.text,ctx.font=`600 ${titleFontSize}px ${UI_FONT}`,ctx.textAlign="left",ctx.textBaseline="middle",ctx.fillText(name,rect.x+8,rect.y+titleBarHeight/2,rect.width-16)}if(children)for(let child of children)drawTreemap(ctx,child,hoveredAncestorChain,selectedAncestorChain,useSelectionFade,focusedAncestorChain,searchQuery,originalData,immediateHoveredSourceIndex,path,parentFadedOut,insideActiveSubtree);return}}let fadeOut=!1;if(searchQuery&&""!==searchQuery.trim())if("directory"===type||"collapsed-directory"===type)nodeOrDescendantsMatchSearch(node,currentPath,searchQuery,originalData)||(fadeOut=!0);else{let fullPath=path.join("/").toLowerCase(),query=searchQuery.toLowerCase();fullPath.includes(query)||(fadeOut=!0)}else if(void 0!==sourceIndex){let activeAncestorChain=hoveredAncestorChain??(useSelectionFade?selectedAncestorChain:[]);if(activeAncestorChain.length>0){let isActiveNode=sourceIndex===activeAncestorChain[activeAncestorChain.length-1];activeAncestorChain.includes(sourceIndex)||isActiveNode||insideActiveSubtree||(fadeOut=!0)}}let opacity=fadeOut?.3:1,colors=getThemeColors(),isImmediateHovered=void 0!==sourceIndex&&sourceIndex===immediateHoveredSourceIndex;if("file"===type){let color=getFileColor(node);if(isImmediateHovered&&(color=curriedLighten(.15,color)),ctx.fillStyle=color,ctx.globalAlpha=opacity,ctx.fillRect(rect.x,rect.y,rect.width,rect.height),ctx.strokeStyle=colors.border,ctx.lineWidth=1,ctx.strokeRect(rect.x,rect.y,rect.width,rect.height),rect.width>60&&rect.height>30){ctx.fillStyle=readableColor(color),ctx.textAlign="center",ctx.textBaseline="middle";let maxWidth=rect.width-8,sizeText=formatBytes(node.size);ctx.font=`12px ${UI_FONT}`;let displayName=truncateTextWithEllipsisIfNeeded(ctx,name,maxWidth);rect.height>50?(ctx.fillText(displayName,rect.x+rect.width/2,rect.y+rect.height/2-7),ctx.globalAlpha=.75*opacity,ctx.font=`10px ${UI_FONT}`,ctx.fillText(sizeText,rect.x+rect.width/2,rect.y+rect.height/2+7),ctx.globalAlpha=opacity):ctx.fillText(displayName,rect.x+rect.width/2,rect.y+rect.height/2)}ctx.globalAlpha=1}else if("collapsed-directory"===type){let bgColor=colors.collapsedBg;if(isImmediateHovered&&(bgColor=curriedLighten(.15,bgColor)),ctx.fillStyle=bgColor,ctx.globalAlpha=opacity,ctx.fillRect(rect.x,rect.y,rect.width,rect.height),ctx.strokeStyle=colors.dirBorder,ctx.lineWidth=1,ctx.strokeRect(rect.x,rect.y,rect.width,rect.height),titleBarHeight){let titleBgColor=colors.dirTitleBg;isImmediateHovered&&(titleBgColor=curriedLighten(.15,titleBgColor)),ctx.fillStyle=titleBgColor,ctx.fillRect(rect.x,rect.y,rect.width,titleBarHeight),ctx.strokeStyle=colors.dirTitleBorder,ctx.beginPath(),ctx.moveTo(rect.x,rect.y+titleBarHeight),ctx.lineTo(rect.x+rect.width,rect.y+titleBarHeight),ctx.stroke();let{titleFontSize,sizeFontSize}=calculateTitleFontSizes(titleBarHeight),sizeText=formatBytes(node.size),centerY=rect.y+titleBarHeight/2;ctx.textBaseline="middle",ctx.font=`${sizeFontSize}px ${UI_FONT}`;let sizeWidth=measureTextCached(ctx,sizeText),nameX=rect.x+8,availableNameWidth=Math.max(0,rect.width-16-sizeWidth-6);ctx.font=`600 ${titleFontSize}px ${UI_FONT}`;let displayName=truncateTextWithEllipsisIfNeeded(ctx,name,availableNameWidth);ctx.fillStyle=colors.text,ctx.textAlign="left",ctx.fillText(displayName,nameX,centerY,availableNameWidth);let sizeX=nameX+measureTextCached(ctx,displayName)+6;sizeX+sizeWidth<=rect.x+rect.width-8&&(ctx.font=`${sizeFontSize}px ${UI_FONT}`,ctx.fillStyle=colors.textMuted,ctx.fillText(sizeText,sizeX,centerY))}ctx.globalAlpha=1}else{let dirBgColor=colors.dirBg;if(isImmediateHovered&&(dirBgColor=curriedLighten(.15,dirBgColor)),ctx.fillStyle=dirBgColor,ctx.globalAlpha=opacity,ctx.fillRect(rect.x,rect.y,rect.width,rect.height),ctx.strokeStyle=colors.dirBorder,ctx.lineWidth=1,ctx.strokeRect(rect.x,rect.y,rect.width,rect.height),titleBarHeight&&rect.height>20){let dirTitleBgColor=colors.dirTitleBg;isImmediateHovered&&(dirTitleBgColor=curriedLighten(.15,dirTitleBgColor)),ctx.fillStyle=dirTitleBgColor,ctx.fillRect(rect.x,rect.y,rect.width,titleBarHeight),ctx.strokeStyle=colors.dirTitleBorder,ctx.beginPath(),ctx.moveTo(rect.x,rect.y+titleBarHeight),ctx.lineTo(rect.x+rect.width,rect.y+titleBarHeight),ctx.stroke();let{titleFontSize,sizeFontSize}=calculateTitleFontSizes(titleBarHeight),sizeText=formatBytes(node.size),centerY=rect.y+titleBarHeight/2;ctx.textBaseline="middle",ctx.font=`${sizeFontSize}px ${UI_FONT}`;let sizeWidth=measureTextCached(ctx,sizeText),nameX=rect.x+8,availableNameWidth=Math.max(0,rect.width-16-sizeWidth-6);ctx.font=`600 ${titleFontSize}px ${UI_FONT}`;let displayName=truncateTextWithEllipsisIfNeeded(ctx,name,availableNameWidth);ctx.fillStyle=colors.text,ctx.textAlign="left",ctx.fillText(displayName,nameX,centerY,availableNameWidth);let sizeX=nameX+measureTextCached(ctx,displayName)+6;sizeX+sizeWidth<=rect.x+rect.width-8&&(ctx.font=`${sizeFontSize}px ${UI_FONT}`,ctx.fillStyle=colors.textMuted,ctx.fillText(sizeText,sizeX,centerY))}if(ctx.globalAlpha=1,children)for(let child of children){let childFadeOut=(!searchQuery||""===searchQuery.trim())&&fadeOut,activeAncestorChain=hoveredAncestorChain??(useSelectionFade?selectedAncestorChain:[]),activeSourceIndex=activeAncestorChain[activeAncestorChain.length-1];drawTreemap(ctx,child,hoveredAncestorChain,selectedAncestorChain,useSelectionFade,focusedAncestorChain,searchQuery,originalData,immediateHoveredSourceIndex,path,childFadeOut,insideActiveSubtree||sourceIndex===activeSourceIndex)}}}function wrapLayoutWithAncestorsUsingIndices(focusedLayout,focusedAncestorChain,analyzeData,fullWidth,fullHeight,minTitleBarHeight=12){if(focusedAncestorChain.length<=1)return focusedLayout;let currentNode=focusedLayout,cumulativeY=focusedLayout.rect.y;for(let i=focusedAncestorChain.length-2;i>=1;i--){let ancestorIndex=focusedAncestorChain[i],ancestorSource=analyzeData.source(ancestorIndex);ancestorSource&&(cumulativeY-=minTitleBarHeight,currentNode={name:ancestorSource.path,type:"directory",size:currentNode.size,rect:{x:0,y:cumulativeY,width:fullWidth,height:fullHeight-cumulativeY},titleBarHeight:minTitleBarHeight,children:[currentNode],sourceIndex:ancestorIndex,specialModuleType:null})}cumulativeY-=minTitleBarHeight;let rootIndex=focusedAncestorChain[0],rootSource=analyzeData.source(rootIndex);return{name:rootSource?.path||"",type:"directory",size:currentNode.size,rect:{x:0,y:cumulativeY,width:fullWidth,height:fullHeight-cumulativeY},titleBarHeight:minTitleBarHeight,children:[currentNode],sourceIndex:rootIndex,specialModuleType:null}}function TreemapVisualizer({analyzeData,sourceIndex,selectedSourceIndex=sourceIndex,onSelectSourceIndex=()=>{},focusedSourceIndex=sourceIndex,onFocusSourceIndex=()=>{},isMouseInTreemap=!1,onHoveredNodeChange,onHoveredNodeChangeDelayed,searchQuery="",filterSource,sizeMode=SizeMode1.Compressed}){let canvasRef=(0,__TURBOPACK__imported__module__66626__.useRef)(null),containerRef=(0,__TURBOPACK__imported__module__66626__.useRef)(null),[hoveredNode,setHoveredNode]=(0,__TURBOPACK__imported__module__66626__.useState)(null),[shouldDimOthers,setShouldDimOthers]=(0,__TURBOPACK__imported__module__66626__.useState)(!1),hoverTimeoutRef=(0,__TURBOPACK__imported__module__66626__.useRef)(null),[dimensions,setDimensions]=(0,__TURBOPACK__imported__module__66626__.useState)({cssWidth:1200,cssHeight:800,canvasWidth:1200,canvasHeight:800}),[,_setTheme]=(0,__TURBOPACK__imported__module__66626__.useState)("light"),focusedAncestorChain=(0,__TURBOPACK__imported__module__66626__.useMemo)(()=>{let chain=[],currentIndex=focusedSourceIndex;for(;null!=currentIndex;){chain.unshift(currentIndex);let source=analyzeData.source(currentIndex);if(!source||null===source.parent_source_index)break;currentIndex=source.parent_source_index}return chain},[analyzeData,focusedSourceIndex]),selectedAncestorChain=(0,__TURBOPACK__imported__module__66626__.useMemo)(()=>{let chain=[],currentIndex=selectedSourceIndex;for(;null!=currentIndex;){chain.unshift(currentIndex);let source=analyzeData.source(currentIndex);if(!source||null===source.parent_source_index)break;currentIndex=source.parent_source_index}return chain},[analyzeData,selectedSourceIndex]),hoveredAncestorChain=(0,__TURBOPACK__imported__module__66626__.useMemo)(()=>{if(!shouldDimOthers||!hoveredNode||void 0===hoveredNode.sourceIndex)return null;let chain=[],currentIndex=hoveredNode.sourceIndex;for(;null!=currentIndex;){chain.unshift(currentIndex);let source=analyzeData.source(currentIndex);if(!source||null===source.parent_source_index)break;currentIndex=source.parent_source_index}return chain},[analyzeData,hoveredNode,shouldDimOthers]);(0,__TURBOPACK__imported__module__66626__.useEffect)(()=>{let container=containerRef.current;if(!container)return;let updateSize=()=>{let dpr=window.devicePixelRatio||1;setDimensions(dimensions=>{let rect=container.getBoundingClientRect();return dimensions.cssWidth===Math.floor(rect.width)&&dimensions.cssHeight===Math.floor(rect.height)?dimensions:{cssWidth:Math.floor(rect.width),cssHeight:Math.floor(rect.height),canvasWidth:Math.floor(rect.width*dpr),canvasHeight:Math.floor(rect.height*dpr)}})};updateSize();let resizeObserver=new ResizeObserver(updateSize);return resizeObserver.observe(container),()=>resizeObserver.disconnect()},[]);let layout=(0,__TURBOPACK__imported__module__66626__.useMemo)(()=>{let focusedLayout=computeTreemapLayoutFromAnalyze(analyzeData,focusedSourceIndex,{x:0,y:12*focusedAncestorChain.length,width:dimensions.cssWidth,height:dimensions.cssHeight},filterSource,sizeMode);return focusedAncestorChain.length>1?wrapLayoutWithAncestorsUsingIndices(focusedLayout,focusedAncestorChain,analyzeData,dimensions.cssWidth,dimensions.cssHeight,12):focusedLayout},[analyzeData,focusedSourceIndex,focusedAncestorChain,dimensions.cssWidth,dimensions.cssHeight,filterSource,sizeMode]);return(0,__TURBOPACK__imported__module__66626__.useLayoutEffect)(()=>{let canvas=canvasRef.current;if(!canvas)return;let ctx=canvas.getContext("2d");if(!ctx)return;let dpr=window.devicePixelRatio||1;ctx.setTransform(1,0,0,1,0,0),ctx.scale(dpr,dpr),ctx.clearRect(0,0,dimensions.cssWidth,dimensions.cssHeight),drawTreemap(ctx,layout,hoveredAncestorChain,selectedAncestorChain,!isMouseInTreemap,focusedAncestorChain,searchQuery,layout,hoveredNode?.sourceIndex)},[layout,hoveredAncestorChain,selectedAncestorChain,dimensions.cssWidth,dimensions.cssHeight,isMouseInTreemap,focusedAncestorChain,searchQuery,hoveredNode]),(0,__TURBOPACK__imported__module__2710__.jsx)("div",{ref:containerRef,className:"w-full h-full bg-background border border-border rounded-lg overflow-hidden",children:(0,__TURBOPACK__imported__module__2710__.jsx)("canvas",{ref:canvasRef,width:dimensions.canvasWidth,height:dimensions.canvasHeight,onMouseMove:e=>{let canvas=canvasRef.current;if(!canvas)return;let rect=canvas.getBoundingClientRect(),x=e.clientX-rect.left,y=e.clientY-rect.top,node=findNodeAtPosition(layout,x,y);if(hoverTimeoutRef.current&&(clearTimeout(hoverTimeoutRef.current),hoverTimeoutRef.current=null),node){let nodeInfo={name:node.name,size:node.size,server:node.server,client:node.client,traced:node.traced};if("directory"===node.type){let titleBarHeight=node.titleBarHeight||0;if(y>=node.rect.y&&y<=node.rect.y+titleBarHeight){canvas.style.cursor="pointer",setHoveredNode(node),setShouldDimOthers(!1),onHoveredNodeChange?.(nodeInfo),hoverTimeoutRef.current=setTimeout(()=>{setShouldDimOthers(!0),onHoveredNodeChangeDelayed?.(nodeInfo)},1e3);return}}else{canvas.style.cursor="pointer",setHoveredNode(node),setShouldDimOthers(!1),onHoveredNodeChange?.(nodeInfo),hoverTimeoutRef.current=setTimeout(()=>{setShouldDimOthers(!0),onHoveredNodeChangeDelayed?.(nodeInfo)},1e3);return}}setHoveredNode(null),setShouldDimOthers(!1),onHoveredNodeChange?.(null),onHoveredNodeChangeDelayed?.(null),canvasRef.current&&(canvasRef.current.style.cursor="default")},onMouseLeave:()=>{hoverTimeoutRef.current&&(clearTimeout(hoverTimeoutRef.current),hoverTimeoutRef.current=null),setHoveredNode(null),setShouldDimOthers(!1),onHoveredNodeChange?.(null),onHoveredNodeChangeDelayed?.(null),canvasRef.current&&(canvasRef.current.style.cursor="default")},onClick:e=>{let canvas=canvasRef.current;if(!canvas)return;let rect=canvas.getBoundingClientRect(),node=findNodeAtPosition(layout,e.clientX-rect.left,e.clientY-rect.top);node&&void 0!==node.sourceIndex&&(node.sourceIndex===selectedSourceIndex?onSelectSourceIndex(sourceIndex):onSelectSourceIndex(node.sourceIndex))},onDoubleClick:e=>{let canvas=canvasRef.current;if(!canvas)return;let rect=canvas.getBoundingClientRect(),node=findNodeAtPosition(layout,e.clientX-rect.left,e.clientY-rect.top);node&&void 0!==node.sourceIndex&&("directory"===node.type||"collapsed-directory"===node.type)&&(onFocusSourceIndex(node.sourceIndex),onSelectSourceIndex(node.sourceIndex))},className:"block w-full h-full"})})}function isDarkMode(){return document.documentElement.classList.contains("dark")}function getThemeColors(){let dark=isDarkMode();return{text:dark?"#ffffff":"#000000",textMuted:dark?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.6)",border:dark?"rgba(255, 255, 255, 0.4)":"rgba(180, 180, 180, 0.5)",dirBg:dark?"rgba(255, 255, 255, 0.05)":"rgba(230, 230, 230, 0.1)",dirBorder:dark?"rgba(255, 255, 255, 0.5)":"rgba(180, 180, 180, 0.6)",dirTitleBg:dark?"rgba(255, 255, 255, 0.08)":"rgba(230, 230, 230, 0.1)",dirTitleBorder:dark?"rgba(255, 255, 255, 0.4)":"rgba(180, 180, 180, 0.5)",collapsedBg:dark?"rgba(128, 128, 128, 0.15)":"rgba(230, 230, 230, 0.2)",collapsedText:dark?"rgba(255, 255, 255, 0.5)":"rgba(128, 128, 128, 0.6)"}}function clamp1(value1,[min,max]){return Math.min(max,Math.max(min,value1))}function composeEventHandlers2(originalEventHandler,ourEventHandler,{checkForDefaultPrevented=!0}={}){return function handleEvent(event){if(originalEventHandler?.(event),!1===checkForDefaultPrevented||!event.defaultPrevented)return ourEventHandler?.(event)}}function createContextScope2(scopeName,createContextScopeDeps=[]){let defaultContexts=[];function createContext3(rootComponentName,defaultContext){let BaseContext=__TURBOPACK__imported__module__66626__.createContext(defaultContext),index=defaultContexts.length;defaultContexts=[...defaultContexts,defaultContext];let Provider=props=>{let{scope,children,...context}=props,Context=scope?.[scopeName]?.[index]||BaseContext,value1=__TURBOPACK__imported__module__66626__.useMemo(()=>context,Object.values(context));return(0,__TURBOPACK__imported__module__2710__.jsx)(Context.Provider,{value:value1,children})};return Provider.displayName=rootComponentName+"Provider",[Provider,function useContext2(consumerName,scope){let Context=scope?.[scopeName]?.[index]||BaseContext,context=__TURBOPACK__imported__module__66626__.useContext(Context);if(context)return context;if(void 0!==defaultContext)return defaultContext;throw Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``)}]}let createScope=()=>{let scopeContexts=defaultContexts.map(defaultContext=>__TURBOPACK__imported__module__66626__.createContext(defaultContext));return function useScope(scope){let contexts=scope?.[scopeName]||scopeContexts;return __TURBOPACK__imported__module__66626__.useMemo(()=>({[`__scope${scopeName}`]:{...scope,[scopeName]:contexts}}),[scope,contexts])}};return createScope.scopeName=scopeName,[createContext3,composeContextScopes2(createScope,...createContextScopeDeps)]}function composeContextScopes2(...scopes){let baseScope=scopes[0];if(1===scopes.length)return baseScope;let createScope=()=>{let scopeHooks=scopes.map(createScope2=>({useScope:createScope2(),scopeName:createScope2.scopeName}));return function useComposedScopes(overrideScopes){let nextScopes=scopeHooks.reduce((nextScopes2,{useScope,scopeName})=>{let currentScope=useScope(overrideScopes)[`__scope${scopeName}`];return{...nextScopes2,...currentScope}},{});return __TURBOPACK__imported__module__66626__.useMemo(()=>({[`__scope${baseScope.scopeName}`]:nextScopes}),[nextScopes])}};return createScope.scopeName=baseScope.scopeName,createScope}function createCollection(name){let PROVIDER_NAME=name+"CollectionProvider",[createCollectionContext,createCollectionScope]=createContextScope2(PROVIDER_NAME),[CollectionProviderImpl,useCollectionContext]=createCollectionContext(PROVIDER_NAME,{collectionRef:{current:null},itemMap:new Map}),CollectionProvider=props=>{let{scope,children}=props,ref=__TURBOPACK__imported__module__66626__.default.useRef(null),itemMap=__TURBOPACK__imported__module__66626__.default.useRef(new Map).current;return(0,__TURBOPACK__imported__module__2710__.jsx)(CollectionProviderImpl,{scope,itemMap,collectionRef:ref,children})};CollectionProvider.displayName=PROVIDER_NAME;let COLLECTION_SLOT_NAME=name+"CollectionSlot",CollectionSlotImpl=createSlot(COLLECTION_SLOT_NAME),CollectionSlot=__TURBOPACK__imported__module__66626__.default.forwardRef((props,forwardedRef)=>{let{scope,children}=props,composedRefs=useComposedRefs1(forwardedRef,useCollectionContext(COLLECTION_SLOT_NAME,scope).collectionRef);return(0,__TURBOPACK__imported__module__2710__.jsx)(CollectionSlotImpl,{ref:composedRefs,children})});CollectionSlot.displayName=COLLECTION_SLOT_NAME;let ITEM_SLOT_NAME=name+"CollectionItemSlot",ITEM_DATA_ATTR="data-radix-collection-item",CollectionItemSlotImpl=createSlot(ITEM_SLOT_NAME),CollectionItemSlot=__TURBOPACK__imported__module__66626__.default.forwardRef((props,forwardedRef)=>{let{scope,children,...itemData}=props,ref=__TURBOPACK__imported__module__66626__.default.useRef(null),composedRefs=useComposedRefs1(forwardedRef,ref),context=useCollectionContext(ITEM_SLOT_NAME,scope);return __TURBOPACK__imported__module__66626__.default.useEffect(()=>(context.itemMap.set(ref,{ref,...itemData}),()=>void context.itemMap.delete(ref))),(0,__TURBOPACK__imported__module__2710__.jsx)(CollectionItemSlotImpl,{...{[ITEM_DATA_ATTR]:""},ref:composedRefs,children})});return CollectionItemSlot.displayName=ITEM_SLOT_NAME,[{Provider:CollectionProvider,Slot:CollectionSlot,ItemSlot:CollectionItemSlot},function useCollection(scope){let context=useCollectionContext(name+"CollectionConsumer",scope);return __TURBOPACK__imported__module__66626__.default.useCallback(()=>{let collectionNode=context.collectionRef.current;if(!collectionNode)return[];let orderedNodes=Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));return Array.from(context.itemMap.values()).sort((a,b)=>orderedNodes.indexOf(a.ref.current)-orderedNodes.indexOf(b.ref.current))},[context.collectionRef,context.itemMap])},createCollectionScope]}"u">typeof window&&window.document&&window.document.createElement;var __instanciated=new WeakMap;function at(array,index){if("at"in Array.prototype)return Array.prototype.at.call(array,index);let actualIndex=toSafeIndex(array,index);return -1===actualIndex?void 0:array[actualIndex]}function toSafeIndex(array,index){let length=array.length,relativeIndex=toSafeInteger(index),actualIndex=relativeIndex>=0?relativeIndex:length+relativeIndex;return actualIndex<0||actualIndex>=length?-1:actualIndex}function toSafeInteger(number){return number!=number||0===number?0:Math.trunc(number)}(class _OrderedDict extends Map{#keys;constructor(entries){super(entries),this.#keys=[...super.keys()],__instanciated.set(this,!0)}set(key,value1){return __instanciated.get(this)&&(this.has(key)?this.#keys[this.#keys.indexOf(key)]=key:this.#keys.push(key)),super.set(key,value1),this}insert(index,key,value1){let nextValue,has=this.has(key),length=this.#keys.length,relativeIndex=toSafeInteger(index),actualIndex=relativeIndex>=0?relativeIndex:length+relativeIndex,safeIndex=actualIndex<0||actualIndex>=length?-1:actualIndex;if(safeIndex===this.size||has&&safeIndex===this.size-1||-1===safeIndex)return this.set(key,value1),this;let size=this.size+ +!has;relativeIndex<0&&actualIndex++;let keys=[...this.#keys],shouldSkip=!1;for(let i=actualIndex;i<size;i++)if(actualIndex===i){let nextKey=keys[i];keys[i]===key&&(nextKey=keys[i+1]),has&&this.delete(key),nextValue=this.get(nextKey),this.set(key,value1)}else{shouldSkip||keys[i-1]!==key||(shouldSkip=!0);let currentKey=keys[shouldSkip?i:i-1],currentValue=nextValue;nextValue=this.get(currentKey),this.delete(currentKey),this.set(currentKey,currentValue)}return this}with(index,key,value1){let copy=new _OrderedDict(this);return copy.insert(index,key,value1),copy}before(key){let index=this.#keys.indexOf(key)-1;if(!(index<0))return this.entryAt(index)}setBefore(key,newKey,value1){let index=this.#keys.indexOf(key);return -1===index?this:this.insert(index,newKey,value1)}after(key){let index=this.#keys.indexOf(key);if(-1!==(index=-1===index||index===this.size-1?-1:index+1))return this.entryAt(index)}setAfter(key,newKey,value1){let index=this.#keys.indexOf(key);return -1===index?this:this.insert(index+1,newKey,value1)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#keys=[],super.clear()}delete(key){let deleted=super.delete(key);return deleted&&this.#keys.splice(this.#keys.indexOf(key),1),deleted}deleteAt(index){let key=this.keyAt(index);return void 0!==key&&this.delete(key)}at(index){let key=at(this.#keys,index);if(void 0!==key)return this.get(key)}entryAt(index){let key=at(this.#keys,index);if(void 0!==key)return[key,this.get(key)]}indexOf(key){return this.#keys.indexOf(key)}keyAt(index){return at(this.#keys,index)}from(key,offset){let index=this.indexOf(key);if(-1===index)return;let dest=index+offset;return dest<0&&(dest=0),dest>=this.size&&(dest=this.size-1),this.at(dest)}keyFrom(key,offset){let index=this.indexOf(key);if(-1===index)return;let dest=index+offset;return dest<0&&(dest=0),dest>=this.size&&(dest=this.size-1),this.keyAt(dest)}find(predicate,thisArg){let index=0;for(let entry of this){if(Reflect.apply(predicate,thisArg,[entry,index,this]))return entry;index++}}findIndex(predicate,thisArg){let index=0;for(let entry of this){if(Reflect.apply(predicate,thisArg,[entry,index,this]))return index;index++}return -1}filter(predicate,thisArg){let entries=[],index=0;for(let entry of this)Reflect.apply(predicate,thisArg,[entry,index,this])&&entries.push(entry),index++;return new _OrderedDict(entries)}map(callbackfn,thisArg){let entries=[],index=0;for(let entry of this)entries.push([entry[0],Reflect.apply(callbackfn,thisArg,[entry,index,this])]),index++;return new _OrderedDict(entries)}reduce(...args){let[callbackfn,initialValue]=args,index=0,accumulator=initialValue??this.at(0);for(let entry of this)accumulator=0===index&&1===args.length?entry:Reflect.apply(callbackfn,this,[accumulator,entry,index,this]),index++;return accumulator}reduceRight(...args){let[callbackfn,initialValue]=args,accumulator=initialValue??this.at(-1);for(let index=this.size-1;index>=0;index--){let entry=this.at(index);accumulator=index===this.size-1&&1===args.length?entry:Reflect.apply(callbackfn,this,[accumulator,entry,index,this])}return accumulator}toSorted(compareFn){return new _OrderedDict([...this.entries()].sort(compareFn))}toReversed(){let reversed=new _OrderedDict;for(let index=this.size-1;index>=0;index--){let key=this.keyAt(index),element=this.get(key);reversed.set(key,element)}return reversed}toSpliced(...args){let entries=[...this.entries()];return entries.splice(...args),new _OrderedDict(entries)}slice(start,end){let result=new _OrderedDict,stop=this.size-1;if(void 0===start)return result;start<0&&(start+=this.size),void 0!==end&&end>0&&(stop=end-1);for(let index=start;index<=stop;index++){let key=this.keyAt(index),element=this.get(key);result.set(key,element)}return result}every(predicate,thisArg){let index=0;for(let entry of this){if(!Reflect.apply(predicate,thisArg,[entry,index,this]))return!1;index++}return!0}some(predicate,thisArg){let index=0;for(let entry of this){if(Reflect.apply(predicate,thisArg,[entry,index,this]))return!0;index++}return!1}});var DirectionContext=__TURBOPACK__imported__module__66626__.createContext(void 0);function useDirection(localDir){let globalDir=__TURBOPACK__imported__module__66626__.useContext(DirectionContext);return localDir||globalDir||"ltr"}function useCallbackRef2(callback){let callbackRef=__TURBOPACK__imported__module__66626__.useRef(callback);return __TURBOPACK__imported__module__66626__.useEffect(()=>{callbackRef.current=callback}),__TURBOPACK__imported__module__66626__.useMemo(()=>(...args)=>callbackRef.current?.(...args),[])}function useEscapeKeydown1(onEscapeKeyDownProp,ownerDocument=globalThis?.document){let onEscapeKeyDown=useCallbackRef2(onEscapeKeyDownProp);__TURBOPACK__imported__module__66626__.useEffect(()=>{let handleKeyDown=event=>{"Escape"===event.key&&onEscapeKeyDown(event)};return ownerDocument.addEventListener("keydown",handleKeyDown,{capture:!0}),()=>ownerDocument.removeEventListener("keydown",handleKeyDown,{capture:!0})},[onEscapeKeyDown,ownerDocument])}var CONTEXT_UPDATE2="dismissableLayer.update",DismissableLayerContext2=__TURBOPACK__imported__module__66626__.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),DismissableLayer2=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{disableOutsidePointerEvents=!1,onEscapeKeyDown,onPointerDownOutside,onFocusOutside,onInteractOutside,onDismiss,...layerProps}=props,context=__TURBOPACK__imported__module__66626__.useContext(DismissableLayerContext2),[node,setNode]=__TURBOPACK__imported__module__66626__.useState(null),ownerDocument=node?.ownerDocument??globalThis?.document,[,force]=__TURBOPACK__imported__module__66626__.useState({}),composedRefs=useComposedRefs1(forwardedRef,node2=>setNode(node2)),layers=Array.from(context.layers),[highestLayerWithOutsidePointerEventsDisabled]=[...context.layersWithOutsidePointerEventsDisabled].slice(-1),highestLayerWithOutsidePointerEventsDisabledIndex=layers.indexOf(highestLayerWithOutsidePointerEventsDisabled),index=node?layers.indexOf(node):-1,isBodyPointerEventsDisabled=context.layersWithOutsidePointerEventsDisabled.size>0,isPointerEventsEnabled=index>=highestLayerWithOutsidePointerEventsDisabledIndex,pointerDownOutside=usePointerDownOutside2(event=>{let target=event.target,isPointerDownOnBranch=[...context.branches].some(branch=>branch.contains(target));isPointerEventsEnabled&&!isPointerDownOnBranch&&(onPointerDownOutside?.(event),onInteractOutside?.(event),event.defaultPrevented||onDismiss?.())},ownerDocument),focusOutside=useFocusOutside2(event=>{let target=event.target;![...context.branches].some(branch=>branch.contains(target))&&(onFocusOutside?.(event),onInteractOutside?.(event),event.defaultPrevented||onDismiss?.())},ownerDocument);return useEscapeKeydown1(event=>{index===context.layers.size-1&&(onEscapeKeyDown?.(event),!event.defaultPrevented&&onDismiss&&(event.preventDefault(),onDismiss()))},ownerDocument),__TURBOPACK__imported__module__66626__.useEffect(()=>{if(node)return disableOutsidePointerEvents&&(0===context.layersWithOutsidePointerEventsDisabled.size&&(originalBodyPointerEvents2=ownerDocument.body.style.pointerEvents,ownerDocument.body.style.pointerEvents="none"),context.layersWithOutsidePointerEventsDisabled.add(node)),context.layers.add(node),dispatchUpdate2(),()=>{disableOutsidePointerEvents&&1===context.layersWithOutsidePointerEventsDisabled.size&&(ownerDocument.body.style.pointerEvents=originalBodyPointerEvents2)}},[node,ownerDocument,disableOutsidePointerEvents,context]),__TURBOPACK__imported__module__66626__.useEffect(()=>()=>{node&&(context.layers.delete(node),context.layersWithOutsidePointerEventsDisabled.delete(node),dispatchUpdate2())},[node,context]),__TURBOPACK__imported__module__66626__.useEffect(()=>{let handleUpdate=()=>force({});return document.addEventListener(CONTEXT_UPDATE2,handleUpdate),()=>document.removeEventListener(CONTEXT_UPDATE2,handleUpdate)},[]),(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive1.div,{...layerProps,ref:composedRefs,style:{pointerEvents:isBodyPointerEventsDisabled?isPointerEventsEnabled?"auto":"none":void 0,...props.style},onFocusCapture:composeEventHandlers2(props.onFocusCapture,focusOutside.onFocusCapture),onBlurCapture:composeEventHandlers2(props.onBlurCapture,focusOutside.onBlurCapture),onPointerDownCapture:composeEventHandlers2(props.onPointerDownCapture,pointerDownOutside.onPointerDownCapture)})});function usePointerDownOutside2(onPointerDownOutside,ownerDocument=globalThis?.document){let handlePointerDownOutside=useCallbackRef2(onPointerDownOutside),isPointerInsideReactTreeRef=__TURBOPACK__imported__module__66626__.useRef(!1),handleClickRef=__TURBOPACK__imported__module__66626__.useRef(()=>{});return __TURBOPACK__imported__module__66626__.useEffect(()=>{let handlePointerDown=event=>{if(event.target&&!isPointerInsideReactTreeRef.current){let handleAndDispatchPointerDownOutsideEvent2=function(){handleAndDispatchCustomEvent2("dismissableLayer.pointerDownOutside",handlePointerDownOutside,eventDetail,{discrete:!0})},eventDetail={originalEvent:event};"touch"===event.pointerType?(ownerDocument.removeEventListener("click",handleClickRef.current),handleClickRef.current=handleAndDispatchPointerDownOutsideEvent2,ownerDocument.addEventListener("click",handleClickRef.current,{once:!0})):handleAndDispatchPointerDownOutsideEvent2()}else ownerDocument.removeEventListener("click",handleClickRef.current);isPointerInsideReactTreeRef.current=!1},timerId=window.setTimeout(()=>{ownerDocument.addEventListener("pointerdown",handlePointerDown)},0);return()=>{window.clearTimeout(timerId),ownerDocument.removeEventListener("pointerdown",handlePointerDown),ownerDocument.removeEventListener("click",handleClickRef.current)}},[ownerDocument,handlePointerDownOutside]),{onPointerDownCapture:()=>isPointerInsideReactTreeRef.current=!0}}function useFocusOutside2(onFocusOutside,ownerDocument=globalThis?.document){let handleFocusOutside=useCallbackRef2(onFocusOutside),isFocusInsideReactTreeRef=__TURBOPACK__imported__module__66626__.useRef(!1);return __TURBOPACK__imported__module__66626__.useEffect(()=>{let handleFocus=event=>{event.target&&!isFocusInsideReactTreeRef.current&&handleAndDispatchCustomEvent2("dismissableLayer.focusOutside",handleFocusOutside,{originalEvent:event},{discrete:!1})};return ownerDocument.addEventListener("focusin",handleFocus),()=>ownerDocument.removeEventListener("focusin",handleFocus)},[ownerDocument,handleFocusOutside]),{onFocusCapture:()=>isFocusInsideReactTreeRef.current=!0,onBlurCapture:()=>isFocusInsideReactTreeRef.current=!1}}function dispatchUpdate2(){let event=new CustomEvent(CONTEXT_UPDATE2);document.dispatchEvent(event)}function handleAndDispatchCustomEvent2(name,handler,detail,{discrete}){let target=detail.originalEvent.target,event=new CustomEvent(name,{bubbles:!1,cancelable:!0,detail});handler&&target.addEventListener(name,handler,{once:!0}),discrete?dispatchDiscreteCustomEvent1(target,event):target.dispatchEvent(event)}DismissableLayer2.displayName="DismissableLayer",__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let context=__TURBOPACK__imported__module__66626__.useContext(DismissableLayerContext2),ref=__TURBOPACK__imported__module__66626__.useRef(null),composedRefs=useComposedRefs1(forwardedRef,ref);return __TURBOPACK__imported__module__66626__.useEffect(()=>{let node=ref.current;if(node)return context.branches.add(node),()=>{context.branches.delete(node)}},[context.branches]),(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive1.div,{...props,ref:composedRefs})}).displayName="DismissableLayerBranch";var count3=0;function useFocusGuards1(){__TURBOPACK__imported__module__66626__.useEffect(()=>{let edgeGuards=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",edgeGuards[0]??createFocusGuard1()),document.body.insertAdjacentElement("beforeend",edgeGuards[1]??createFocusGuard1()),count3++,()=>{1===count3&&document.querySelectorAll("[data-radix-focus-guard]").forEach(node=>node.remove()),count3--}},[])}function createFocusGuard1(){let element=document.createElement("span");return element.setAttribute("data-radix-focus-guard",""),element.tabIndex=0,element.style.outline="none",element.style.opacity="0",element.style.position="fixed",element.style.pointerEvents="none",element}var AUTOFOCUS_ON_MOUNT1="focusScope.autoFocusOnMount",AUTOFOCUS_ON_UNMOUNT1="focusScope.autoFocusOnUnmount",EVENT_OPTIONS1={bubbles:!1,cancelable:!0},FocusScope1=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{loop=!1,trapped=!1,onMountAutoFocus:onMountAutoFocusProp,onUnmountAutoFocus:onUnmountAutoFocusProp,...scopeProps}=props,[container,setContainer]=__TURBOPACK__imported__module__66626__.useState(null),onMountAutoFocus=useCallbackRef2(onMountAutoFocusProp),onUnmountAutoFocus=useCallbackRef2(onUnmountAutoFocusProp),lastFocusedElementRef=__TURBOPACK__imported__module__66626__.useRef(null),composedRefs=useComposedRefs1(forwardedRef,node=>setContainer(node)),focusScope=__TURBOPACK__imported__module__66626__.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;__TURBOPACK__imported__module__66626__.useEffect(()=>{if(trapped){let handleFocusIn2=function(event){if(focusScope.paused||!container)return;let target=event.target;container.contains(target)?lastFocusedElementRef.current=target:focus1(lastFocusedElementRef.current,{select:!0})},handleFocusOut2=function(event){if(focusScope.paused||!container)return;let relatedTarget=event.relatedTarget;null!==relatedTarget&&(container.contains(relatedTarget)||focus1(lastFocusedElementRef.current,{select:!0}))};document.addEventListener("focusin",handleFocusIn2),document.addEventListener("focusout",handleFocusOut2);let mutationObserver=new MutationObserver(function(mutations){if(document.activeElement===document.body)for(let mutation of mutations)mutation.removedNodes.length>0&&focus1(container)});return container&&mutationObserver.observe(container,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",handleFocusIn2),document.removeEventListener("focusout",handleFocusOut2),mutationObserver.disconnect()}}},[trapped,container,focusScope.paused]),__TURBOPACK__imported__module__66626__.useEffect(()=>{if(container){focusScopesStack1.add(focusScope);let previouslyFocusedElement=document.activeElement;if(!container.contains(previouslyFocusedElement)){let mountEvent=new CustomEvent(AUTOFOCUS_ON_MOUNT1,EVENT_OPTIONS1);container.addEventListener(AUTOFOCUS_ON_MOUNT1,onMountAutoFocus),container.dispatchEvent(mountEvent),mountEvent.defaultPrevented||(focusFirst1(removeLinks1(getTabbableCandidates1(container)),{select:!0}),document.activeElement===previouslyFocusedElement&&focus1(container))}return()=>{container.removeEventListener(AUTOFOCUS_ON_MOUNT1,onMountAutoFocus),setTimeout(()=>{let unmountEvent=new CustomEvent(AUTOFOCUS_ON_UNMOUNT1,EVENT_OPTIONS1);container.addEventListener(AUTOFOCUS_ON_UNMOUNT1,onUnmountAutoFocus),container.dispatchEvent(unmountEvent),unmountEvent.defaultPrevented||focus1(previouslyFocusedElement??document.body,{select:!0}),container.removeEventListener(AUTOFOCUS_ON_UNMOUNT1,onUnmountAutoFocus),focusScopesStack1.remove(focusScope)},0)}}},[container,onMountAutoFocus,onUnmountAutoFocus,focusScope]);let handleKeyDown=__TURBOPACK__imported__module__66626__.useCallback(event=>{if(!loop&&!trapped||focusScope.paused)return;let isTabKey="Tab"===event.key&&!event.altKey&&!event.ctrlKey&&!event.metaKey,focusedElement=document.activeElement;if(isTabKey&&focusedElement){let container2=event.currentTarget,[first,last]=getTabbableEdges1(container2);first&&last?event.shiftKey||focusedElement!==last?event.shiftKey&&focusedElement===first&&(event.preventDefault(),loop&&focus1(last,{select:!0})):(event.preventDefault(),loop&&focus1(first,{select:!0})):focusedElement===container2&&event.preventDefault()}},[loop,trapped,focusScope.paused]);return(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive1.div,{tabIndex:-1,...scopeProps,ref:composedRefs,onKeyDown:handleKeyDown})});function focusFirst1(candidates,{select=!1}={}){let previouslyFocusedElement=document.activeElement;for(let candidate of candidates)if(focus1(candidate,{select}),document.activeElement!==previouslyFocusedElement)return}function getTabbableEdges1(container){let candidates=getTabbableCandidates1(container);return[findVisible1(candidates,container),findVisible1(candidates.reverse(),container)]}function getTabbableCandidates1(container){let nodes=[],walker=document.createTreeWalker(container,NodeFilter.SHOW_ELEMENT,{acceptNode:node=>{let isHiddenInput="INPUT"===node.tagName&&"hidden"===node.type;return node.disabled||node.hidden||isHiddenInput?NodeFilter.FILTER_SKIP:node.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;walker.nextNode();)nodes.push(walker.currentNode);return nodes}function findVisible1(elements,container){for(let element of elements)if(!isHidden1(element,{upTo:container}))return element}function isHidden1(node,{upTo}){if("hidden"===getComputedStyle(node).visibility)return!0;for(;node&&(void 0===upTo||node!==upTo);){if("none"===getComputedStyle(node).display)return!0;node=node.parentElement}return!1}function isSelectableInput1(element){return element instanceof HTMLInputElement&&"select"in element}function focus1(element,{select=!1}={}){if(element&&element.focus){let previouslyFocusedElement=document.activeElement;element.focus({preventScroll:!0}),element!==previouslyFocusedElement&&isSelectableInput1(element)&&select&&element.select()}}FocusScope1.displayName="FocusScope";var focusScopesStack1=createFocusScopesStack1();function createFocusScopesStack1(){let stack=[];return{add(focusScope){let activeFocusScope=stack[0];focusScope!==activeFocusScope&&activeFocusScope?.pause(),(stack=arrayRemove1(stack,focusScope)).unshift(focusScope)},remove(focusScope){stack=arrayRemove1(stack,focusScope),stack[0]?.resume()}}}function arrayRemove1(array,item){let updatedArray=[...array],index=updatedArray.indexOf(item);return -1!==index&&updatedArray.splice(index,1),updatedArray}function removeLinks1(items){return items.filter(item=>"A"!==item.tagName)}var Arrow5=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{children,width=10,height=5,...arrowProps}=props;return(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive1.svg,{...arrowProps,ref:forwardedRef,width,height,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:props.asChild?children:(0,__TURBOPACK__imported__module__2710__.jsx)("polygon",{points:"0,0 30,0 15,10"})})});function useSize1(element){let[size,setSize]=__TURBOPACK__imported__module__66626__.useState(void 0);return useLayoutEffect21(()=>{if(element){setSize({width:element.offsetWidth,height:element.offsetHeight});let resizeObserver=new ResizeObserver(entries=>{let width,height;if(!Array.isArray(entries)||!entries.length)return;let entry=entries[0];if("borderBoxSize"in entry){let borderSizeEntry=entry.borderBoxSize,borderSize=Array.isArray(borderSizeEntry)?borderSizeEntry[0]:borderSizeEntry;width=borderSize.inlineSize,height=borderSize.blockSize}else width=element.offsetWidth,height=element.offsetHeight;setSize({width,height})});return resizeObserver.observe(element,{box:"border-box"}),()=>resizeObserver.unobserve(element)}setSize(void 0)},[element]),size}Arrow5.displayName="Arrow";var POPPER_NAME2="Popper",[createPopperContext2,createPopperScope2]=createContextScope2(POPPER_NAME2),[PopperProvider2,usePopperContext2]=createPopperContext2(POPPER_NAME2),Popper2=props=>{let{__scopePopper,children}=props,[anchor,setAnchor]=__TURBOPACK__imported__module__66626__.useState(null);return(0,__TURBOPACK__imported__module__2710__.jsx)(PopperProvider2,{scope:__scopePopper,anchor,onAnchorChange:setAnchor,children})};Popper2.displayName=POPPER_NAME2;var ANCHOR_NAME3="PopperAnchor",PopperAnchor2=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopePopper,virtualRef,...anchorProps}=props,context=usePopperContext2(ANCHOR_NAME3,__scopePopper),ref=__TURBOPACK__imported__module__66626__.useRef(null),composedRefs=useComposedRefs1(forwardedRef,ref),anchorRef=__TURBOPACK__imported__module__66626__.useRef(null);return __TURBOPACK__imported__module__66626__.useEffect(()=>{let previousAnchor=anchorRef.current;anchorRef.current=virtualRef?.current||ref.current,previousAnchor!==anchorRef.current&&context.onAnchorChange(anchorRef.current)}),virtualRef?null:(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive1.div,{...anchorProps,ref:composedRefs})});PopperAnchor2.displayName=ANCHOR_NAME3;var CONTENT_NAME5="PopperContent",[PopperContentProvider2,useContentContext2]=createPopperContext2(CONTENT_NAME5),PopperContent2=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopePopper,side="bottom",sideOffset=0,align="center",alignOffset=0,arrowPadding=0,avoidCollisions=!0,collisionBoundary=[],collisionPadding:collisionPaddingProp=0,sticky="partial",hideWhenDetached=!1,updatePositionStrategy="optimized",onPlaced,...contentProps}=props,context=usePopperContext2(CONTENT_NAME5,__scopePopper),[content,setContent]=__TURBOPACK__imported__module__66626__.useState(null),composedRefs=useComposedRefs1(forwardedRef,node=>setContent(node)),[arrow1,setArrow]=__TURBOPACK__imported__module__66626__.useState(null),arrowSize=useSize1(arrow1),arrowWidth=arrowSize?.width??0,arrowHeight=arrowSize?.height??0,collisionPadding="number"==typeof collisionPaddingProp?collisionPaddingProp:{top:0,right:0,bottom:0,left:0,...collisionPaddingProp},boundary=Array.isArray(collisionBoundary)?collisionBoundary:[collisionBoundary],hasExplicitBoundaries=boundary.length>0,detectOverflowOptions={padding:collisionPadding,boundary:boundary.filter(isNotNull2),altBoundary:hasExplicitBoundaries},{refs,floatingStyles,placement,isPositioned,middlewareData}=useFloating({strategy:"fixed",placement:side+("center"!==align?"-"+align:""),whileElementsMounted:(...args)=>autoUpdate(...args,{animationFrame:"always"===updatePositionStrategy}),elements:{reference:context.anchor},middleware:[offset2({mainAxis:sideOffset+arrowHeight,alignmentAxis:alignOffset}),avoidCollisions&&shift2({mainAxis:!0,crossAxis:!1,limiter:"partial"===sticky?limitShift2():void 0,...detectOverflowOptions}),avoidCollisions&&flip2({...detectOverflowOptions}),size2({...detectOverflowOptions,apply:({elements,rects,availableWidth,availableHeight})=>{let{width:anchorWidth,height:anchorHeight}=rects.reference,contentStyle=elements.floating.style;contentStyle.setProperty("--radix-popper-available-width",`${availableWidth}px`),contentStyle.setProperty("--radix-popper-available-height",`${availableHeight}px`),contentStyle.setProperty("--radix-popper-anchor-width",`${anchorWidth}px`),contentStyle.setProperty("--radix-popper-anchor-height",`${anchorHeight}px`)}}),arrow1&&arrow2({element:arrow1,padding:arrowPadding}),transformOrigin2({arrowWidth,arrowHeight}),hideWhenDetached&&hide2({strategy:"referenceHidden",...detectOverflowOptions})]}),[placedSide,placedAlign]=getSideAndAlignFromPlacement2(placement),handlePlaced=useCallbackRef2(onPlaced);useLayoutEffect21(()=>{isPositioned&&handlePlaced?.()},[isPositioned,handlePlaced]);let arrowX=middlewareData.arrow?.x,arrowY=middlewareData.arrow?.y,cannotCenterArrow=middlewareData.arrow?.centerOffset!==0,[contentZIndex,setContentZIndex]=__TURBOPACK__imported__module__66626__.useState();return useLayoutEffect21(()=>{content&&setContentZIndex(window.getComputedStyle(content).zIndex)},[content]),(0,__TURBOPACK__imported__module__2710__.jsx)("div",{ref:refs.setFloating,"data-radix-popper-content-wrapper":"",style:{...floatingStyles,transform:isPositioned?floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:contentZIndex,"--radix-popper-transform-origin":[middlewareData.transformOrigin?.x,middlewareData.transformOrigin?.y].join(" "),...middlewareData.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:props.dir,children:(0,__TURBOPACK__imported__module__2710__.jsx)(PopperContentProvider2,{scope:__scopePopper,placedSide,onArrowChange:setArrow,arrowX,arrowY,shouldHideArrow:cannotCenterArrow,children:(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive1.div,{"data-side":placedSide,"data-align":placedAlign,...contentProps,ref:composedRefs,style:{...contentProps.style,animation:isPositioned?void 0:"none"}})})})});PopperContent2.displayName=CONTENT_NAME5;var ARROW_NAME4="PopperArrow",OPPOSITE_SIDE2={top:"bottom",right:"left",bottom:"top",left:"right"},PopperArrow2=__TURBOPACK__imported__module__66626__.forwardRef(function PopperArrow2(props,forwardedRef){let{__scopePopper,...arrowProps}=props,contentContext=useContentContext2(ARROW_NAME4,__scopePopper),baseSide=OPPOSITE_SIDE2[contentContext.placedSide];return(0,__TURBOPACK__imported__module__2710__.jsx)("span",{ref:contentContext.onArrowChange,style:{position:"absolute",left:contentContext.arrowX,top:contentContext.arrowY,[baseSide]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[contentContext.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[contentContext.placedSide],visibility:contentContext.shouldHideArrow?"hidden":void 0},children:(0,__TURBOPACK__imported__module__2710__.jsx)(Arrow5,{...arrowProps,ref:forwardedRef,style:{...arrowProps.style,display:"block"}})})});function isNotNull2(value1){return null!==value1}PopperArrow2.displayName=ARROW_NAME4;var transformOrigin2=options=>({name:"transformOrigin",options,fn(data){let{placement,rects,middlewareData}=data,cannotCenterArrow=middlewareData.arrow?.centerOffset!==0,arrowWidth=cannotCenterArrow?0:options.arrowWidth,arrowHeight=cannotCenterArrow?0:options.arrowHeight,[placedSide,placedAlign]=getSideAndAlignFromPlacement2(placement),noArrowAlign={start:"0%",center:"50%",end:"100%"}[placedAlign],arrowXCenter=(middlewareData.arrow?.x??0)+arrowWidth/2,arrowYCenter=(middlewareData.arrow?.y??0)+arrowHeight/2,x="",y="";return"bottom"===placedSide?(x=cannotCenterArrow?noArrowAlign:`${arrowXCenter}px`,y=`${-arrowHeight}px`):"top"===placedSide?(x=cannotCenterArrow?noArrowAlign:`${arrowXCenter}px`,y=`${rects.floating.height+arrowHeight}px`):"right"===placedSide?(x=`${-arrowHeight}px`,y=cannotCenterArrow?noArrowAlign:`${arrowYCenter}px`):"left"===placedSide&&(x=`${rects.floating.width+arrowHeight}px`,y=cannotCenterArrow?noArrowAlign:`${arrowYCenter}px`),{data:{x,y}}}});function getSideAndAlignFromPlacement2(placement){let[side,align="center"]=placement.split("-");return[side,align]}var Portal5=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{container:containerProp,...portalProps}=props,[mounted,setMounted]=__TURBOPACK__imported__module__66626__.useState(!1);useLayoutEffect21(()=>setMounted(!0),[]);let container=containerProp||mounted&&globalThis?.document?.body;return container?__TURBOPACK__imported__module__79892__.default.createPortal((0,__TURBOPACK__imported__module__2710__.jsx)(Primitive1.div,{...portalProps,ref:forwardedRef}),container):null});Portal5.displayName="Portal",__TURBOPACK__imported__module__66626__[" useEffectEvent ".trim().toString()],__TURBOPACK__imported__module__66626__[" useInsertionEffect ".trim().toString()];var useInsertionEffect=__TURBOPACK__imported__module__66626__[" useInsertionEffect ".trim().toString()]||useLayoutEffect21;function useControllableState1({prop,defaultProp,onChange=()=>{},caller}){let[uncontrolledProp,setUncontrolledProp,onChangeRef]=useUncontrolledState1({defaultProp,onChange}),isControlled=void 0!==prop,value1=isControlled?prop:uncontrolledProp;{let isControlledRef=__TURBOPACK__imported__module__66626__.useRef(void 0!==prop);__TURBOPACK__imported__module__66626__.useEffect(()=>{let wasControlled=isControlledRef.current;if(wasControlled!==isControlled){let to=isControlled?"controlled":"uncontrolled";console.warn(`${caller} is changing from ${wasControlled?"controlled":"uncontrolled"} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}isControlledRef.current=isControlled},[isControlled,caller])}return[value1,__TURBOPACK__imported__module__66626__.useCallback(nextValue=>{if(isControlled){let value2=isFunction1(nextValue)?nextValue(prop):nextValue;value2!==prop&&onChangeRef.current?.(value2)}else setUncontrolledProp(nextValue)},[isControlled,prop,setUncontrolledProp,onChangeRef])]}function useUncontrolledState1({defaultProp,onChange}){let[value1,setValue]=__TURBOPACK__imported__module__66626__.useState(defaultProp),prevValueRef=__TURBOPACK__imported__module__66626__.useRef(value1),onChangeRef=__TURBOPACK__imported__module__66626__.useRef(onChange);return useInsertionEffect(()=>{onChangeRef.current=onChange},[onChange]),__TURBOPACK__imported__module__66626__.useEffect(()=>{prevValueRef.current!==value1&&(onChangeRef.current?.(value1),prevValueRef.current=value1)},[value1,prevValueRef]),[value1,setValue,onChangeRef]}function isFunction1(value1){return"function"==typeof value1}function usePrevious(value1){let ref=__TURBOPACK__imported__module__66626__.useRef({value:value1,previous:value1});return __TURBOPACK__imported__module__66626__.useMemo(()=>(ref.current.value!==value1&&(ref.current.previous=ref.current.value,ref.current.value=value1),ref.current.previous),[value1])}Symbol("RADIX:SYNC_STATE");var VISUALLY_HIDDEN_STYLES=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive1.span,{...props,ref:forwardedRef,style:{...VISUALLY_HIDDEN_STYLES,...props.style}})).displayName="VisuallyHidden";var OPEN_KEYS=[" ","Enter","ArrowUp","ArrowDown"],SELECTION_KEYS=[" ","Enter"],SELECT_NAME="Select",[Collection,useCollection,createCollectionScope]=createCollection(SELECT_NAME),[createSelectContext,createSelectScope]=createContextScope2(SELECT_NAME,[createCollectionScope,createPopperScope2]),usePopperScope2=createPopperScope2(),[SelectProvider,useSelectContext]=createSelectContext(SELECT_NAME),[SelectNativeOptionsProvider,useSelectNativeOptionsContext]=createSelectContext(SELECT_NAME),Select=props=>{let{__scopeSelect,children,open:openProp,defaultOpen,onOpenChange,value:valueProp,defaultValue,onValueChange,dir,name,autoComplete,disabled,required,form}=props,popperScope=usePopperScope2(__scopeSelect),[trigger,setTrigger]=__TURBOPACK__imported__module__66626__.useState(null),[valueNode,setValueNode]=__TURBOPACK__imported__module__66626__.useState(null),[valueNodeHasChildren,setValueNodeHasChildren]=__TURBOPACK__imported__module__66626__.useState(!1),direction=useDirection(dir),[open,setOpen]=useControllableState1({prop:openProp,defaultProp:defaultOpen??!1,onChange:onOpenChange,caller:SELECT_NAME}),[value1,setValue]=useControllableState1({prop:valueProp,defaultProp:defaultValue,onChange:onValueChange,caller:SELECT_NAME}),triggerPointerDownPosRef=__TURBOPACK__imported__module__66626__.useRef(null),isFormControl=!trigger||form||!!trigger.closest("form"),[nativeOptionsSet,setNativeOptionsSet]=__TURBOPACK__imported__module__66626__.useState(new Set),nativeSelectKey=Array.from(nativeOptionsSet).map(option=>option.props.value).join(";");return(0,__TURBOPACK__imported__module__2710__.jsx)(Popper2,{...popperScope,children:(0,__TURBOPACK__imported__module__2710__.jsxs)(SelectProvider,{required,scope:__scopeSelect,trigger,onTriggerChange:setTrigger,valueNode,onValueNodeChange:setValueNode,valueNodeHasChildren,onValueNodeHasChildrenChange:setValueNodeHasChildren,contentId:useId1(),value:value1,onValueChange:setValue,open,onOpenChange:setOpen,dir:direction,triggerPointerDownPosRef,disabled,children:[(0,__TURBOPACK__imported__module__2710__.jsx)(Collection.Provider,{scope:__scopeSelect,children:(0,__TURBOPACK__imported__module__2710__.jsx)(SelectNativeOptionsProvider,{scope:props.__scopeSelect,onNativeOptionAdd:__TURBOPACK__imported__module__66626__.useCallback(option=>{setNativeOptionsSet(prev=>new Set(prev).add(option))},[]),onNativeOptionRemove:__TURBOPACK__imported__module__66626__.useCallback(option=>{setNativeOptionsSet(prev=>{let optionsSet=new Set(prev);return optionsSet.delete(option),optionsSet})},[]),children})}),isFormControl?(0,__TURBOPACK__imported__module__2710__.jsxs)(SelectBubbleInput,{"aria-hidden":!0,required,tabIndex:-1,name,autoComplete,value:value1,onChange:event=>setValue(event.target.value),disabled,form,children:[void 0===value1?(0,__TURBOPACK__imported__module__2710__.jsx)("option",{value:""}):null,Array.from(nativeOptionsSet)]},nativeSelectKey):null]})})};Select.displayName=SELECT_NAME;var TRIGGER_NAME3="SelectTrigger",SelectTrigger=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeSelect,disabled=!1,...triggerProps}=props,popperScope=usePopperScope2(__scopeSelect),context=useSelectContext(TRIGGER_NAME3,__scopeSelect),isDisabled=context.disabled||disabled,composedRefs=useComposedRefs1(forwardedRef,context.onTriggerChange),getItems=useCollection(__scopeSelect),pointerTypeRef=__TURBOPACK__imported__module__66626__.useRef("touch"),[searchRef,handleTypeaheadSearch,resetTypeahead]=useTypeaheadSearch(search=>{let enabledItems=getItems().filter(item=>!item.disabled),currentItem=enabledItems.find(item=>item.value===context.value),nextItem=findNextItem(enabledItems,search,currentItem);void 0!==nextItem&&context.onValueChange(nextItem.value)}),handleOpen=pointerEvent=>{isDisabled||(context.onOpenChange(!0),resetTypeahead()),pointerEvent&&(context.triggerPointerDownPosRef.current={x:Math.round(pointerEvent.pageX),y:Math.round(pointerEvent.pageY)})};return(0,__TURBOPACK__imported__module__2710__.jsx)(PopperAnchor2,{asChild:!0,...popperScope,children:(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive1.button,{type:"button",role:"combobox","aria-controls":context.contentId,"aria-expanded":context.open,"aria-required":context.required,"aria-autocomplete":"none",dir:context.dir,"data-state":context.open?"open":"closed",disabled:isDisabled,"data-disabled":isDisabled?"":void 0,"data-placeholder":shouldShowPlaceholder(context.value)?"":void 0,...triggerProps,ref:composedRefs,onClick:composeEventHandlers2(triggerProps.onClick,event=>{event.currentTarget.focus(),"mouse"!==pointerTypeRef.current&&handleOpen(event)}),onPointerDown:composeEventHandlers2(triggerProps.onPointerDown,event=>{pointerTypeRef.current=event.pointerType;let target=event.target;target.hasPointerCapture(event.pointerId)&&target.releasePointerCapture(event.pointerId),0===event.button&&!1===event.ctrlKey&&"mouse"===event.pointerType&&(handleOpen(event),event.preventDefault())}),onKeyDown:composeEventHandlers2(triggerProps.onKeyDown,event=>{let isTypingAhead=""!==searchRef.current;event.ctrlKey||event.altKey||event.metaKey||1!==event.key.length||handleTypeaheadSearch(event.key),(!isTypingAhead||" "!==event.key)&&OPEN_KEYS.includes(event.key)&&(handleOpen(),event.preventDefault())})})})});SelectTrigger.displayName=TRIGGER_NAME3;var VALUE_NAME="SelectValue",SelectValue=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeSelect,className,style,children,placeholder="",...valueProps}=props,context=useSelectContext(VALUE_NAME,__scopeSelect),{onValueNodeHasChildrenChange}=context,hasChildren=void 0!==children,composedRefs=useComposedRefs1(forwardedRef,context.onValueNodeChange);return useLayoutEffect21(()=>{onValueNodeHasChildrenChange(hasChildren)},[onValueNodeHasChildrenChange,hasChildren]),(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive1.span,{...valueProps,ref:composedRefs,style:{pointerEvents:"none"},children:shouldShowPlaceholder(context.value)?(0,__TURBOPACK__imported__module__2710__.jsx)(__TURBOPACK__imported__module__2710__.Fragment,{children:placeholder}):children})});SelectValue.displayName=VALUE_NAME;var SelectIcon=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeSelect,children,...iconProps}=props;return(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive1.span,{"aria-hidden":!0,...iconProps,ref:forwardedRef,children:children||"▼"})});SelectIcon.displayName="SelectIcon";var SelectPortal=props=>(0,__TURBOPACK__imported__module__2710__.jsx)(Portal5,{asChild:!0,...props});SelectPortal.displayName="SelectPortal";var CONTENT_NAME6="SelectContent",SelectContent=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let context=useSelectContext(CONTENT_NAME6,props.__scopeSelect),[fragment,setFragment]=__TURBOPACK__imported__module__66626__.useState();return(useLayoutEffect21(()=>{setFragment(new DocumentFragment)},[]),context.open)?(0,__TURBOPACK__imported__module__2710__.jsx)(SelectContentImpl,{...props,ref:forwardedRef}):fragment?__TURBOPACK__imported__module__79892__.createPortal((0,__TURBOPACK__imported__module__2710__.jsx)(SelectContentProvider,{scope:props.__scopeSelect,children:(0,__TURBOPACK__imported__module__2710__.jsx)(Collection.Slot,{scope:props.__scopeSelect,children:(0,__TURBOPACK__imported__module__2710__.jsx)("div",{children:props.children})})}),fragment):null});SelectContent.displayName=CONTENT_NAME6;var[SelectContentProvider,useSelectContentContext]=createSelectContext(CONTENT_NAME6),Slot3=createSlot("SelectContent.RemoveScroll"),SelectContentImpl=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeSelect,position="item-aligned",onCloseAutoFocus,onEscapeKeyDown,onPointerDownOutside,side,sideOffset,align,alignOffset,arrowPadding,collisionBoundary,collisionPadding,sticky,hideWhenDetached,avoidCollisions,...contentProps}=props,context=useSelectContext(CONTENT_NAME6,__scopeSelect),[content,setContent]=__TURBOPACK__imported__module__66626__.useState(null),[viewport,setViewport]=__TURBOPACK__imported__module__66626__.useState(null),composedRefs=useComposedRefs1(forwardedRef,node=>setContent(node)),[selectedItem,setSelectedItem]=__TURBOPACK__imported__module__66626__.useState(null),[selectedItemText,setSelectedItemText]=__TURBOPACK__imported__module__66626__.useState(null),getItems=useCollection(__scopeSelect),[isPositioned,setIsPositioned]=__TURBOPACK__imported__module__66626__.useState(!1),firstValidItemFoundRef=__TURBOPACK__imported__module__66626__.useRef(!1);__TURBOPACK__imported__module__66626__.useEffect(()=>{if(content)return hideOthers(content)},[content]),useFocusGuards1();let focusFirst=__TURBOPACK__imported__module__66626__.useCallback(candidates=>{let[firstItem,...restItems]=getItems().map(item=>item.ref.current),[lastItem]=restItems.slice(-1),PREVIOUSLY_FOCUSED_ELEMENT=document.activeElement;for(let candidate of candidates)if(candidate===PREVIOUSLY_FOCUSED_ELEMENT||(candidate?.scrollIntoView({block:"nearest"}),candidate===firstItem&&viewport&&(viewport.scrollTop=0),candidate===lastItem&&viewport&&(viewport.scrollTop=viewport.scrollHeight),candidate?.focus(),document.activeElement!==PREVIOUSLY_FOCUSED_ELEMENT))return},[getItems,viewport]),focusSelectedItem=__TURBOPACK__imported__module__66626__.useCallback(()=>focusFirst([selectedItem,content]),[focusFirst,selectedItem,content]);__TURBOPACK__imported__module__66626__.useEffect(()=>{isPositioned&&focusSelectedItem()},[isPositioned,focusSelectedItem]);let{onOpenChange,triggerPointerDownPosRef}=context;__TURBOPACK__imported__module__66626__.useEffect(()=>{if(content){let pointerMoveDelta={x:0,y:0},handlePointerMove=event=>{pointerMoveDelta={x:Math.abs(Math.round(event.pageX)-(triggerPointerDownPosRef.current?.x??0)),y:Math.abs(Math.round(event.pageY)-(triggerPointerDownPosRef.current?.y??0))}},handlePointerUp=event=>{pointerMoveDelta.x<=10&&pointerMoveDelta.y<=10?event.preventDefault():content.contains(event.target)||onOpenChange(!1),document.removeEventListener("pointermove",handlePointerMove),triggerPointerDownPosRef.current=null};return null!==triggerPointerDownPosRef.current&&(document.addEventListener("pointermove",handlePointerMove),document.addEventListener("pointerup",handlePointerUp,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",handlePointerMove),document.removeEventListener("pointerup",handlePointerUp,{capture:!0})}}},[content,onOpenChange,triggerPointerDownPosRef]),__TURBOPACK__imported__module__66626__.useEffect(()=>{let close=()=>onOpenChange(!1);return window.addEventListener("blur",close),window.addEventListener("resize",close),()=>{window.removeEventListener("blur",close),window.removeEventListener("resize",close)}},[onOpenChange]);let[searchRef,handleTypeaheadSearch]=useTypeaheadSearch(search=>{let enabledItems=getItems().filter(item=>!item.disabled),currentItem=enabledItems.find(item=>item.ref.current===document.activeElement),nextItem=findNextItem(enabledItems,search,currentItem);nextItem&&setTimeout(()=>nextItem.ref.current.focus())}),itemRefCallback=__TURBOPACK__imported__module__66626__.useCallback((node,value1,disabled)=>{let isFirstValidItem=!firstValidItemFoundRef.current&&!disabled;(void 0!==context.value&&context.value===value1||isFirstValidItem)&&(setSelectedItem(node),isFirstValidItem&&(firstValidItemFoundRef.current=!0))},[context.value]),handleItemLeave=__TURBOPACK__imported__module__66626__.useCallback(()=>content?.focus(),[content]),itemTextRefCallback=__TURBOPACK__imported__module__66626__.useCallback((node,value1,disabled)=>{let isFirstValidItem=!firstValidItemFoundRef.current&&!disabled;(void 0!==context.value&&context.value===value1||isFirstValidItem)&&setSelectedItemText(node)},[context.value]),SelectPosition="popper"===position?SelectPopperPosition:SelectItemAlignedPosition,popperContentProps=SelectPosition===SelectPopperPosition?{side,sideOffset,align,alignOffset,arrowPadding,collisionBoundary,collisionPadding,sticky,hideWhenDetached,avoidCollisions}:{};return(0,__TURBOPACK__imported__module__2710__.jsx)(SelectContentProvider,{scope:__scopeSelect,content,viewport,onViewportChange:setViewport,itemRefCallback,selectedItem,onItemLeave:handleItemLeave,itemTextRefCallback,focusSelectedItem,selectedItemText,position,isPositioned,searchRef,children:(0,__TURBOPACK__imported__module__2710__.jsx)(ReactRemoveScroll,{as:Slot3,allowPinchZoom:!0,children:(0,__TURBOPACK__imported__module__2710__.jsx)(FocusScope1,{asChild:!0,trapped:context.open,onMountAutoFocus:event=>{event.preventDefault()},onUnmountAutoFocus:composeEventHandlers2(onCloseAutoFocus,event=>{context.trigger?.focus({preventScroll:!0}),event.preventDefault()}),children:(0,__TURBOPACK__imported__module__2710__.jsx)(DismissableLayer2,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown,onPointerDownOutside,onFocusOutside:event=>event.preventDefault(),onDismiss:()=>context.onOpenChange(!1),children:(0,__TURBOPACK__imported__module__2710__.jsx)(SelectPosition,{role:"listbox",id:context.contentId,"data-state":context.open?"open":"closed",dir:context.dir,onContextMenu:event=>event.preventDefault(),...contentProps,...popperContentProps,onPlaced:()=>setIsPositioned(!0),ref:composedRefs,style:{display:"flex",flexDirection:"column",outline:"none",...contentProps.style},onKeyDown:composeEventHandlers2(contentProps.onKeyDown,event=>{let isModifierKey=event.ctrlKey||event.altKey||event.metaKey;if("Tab"===event.key&&event.preventDefault(),isModifierKey||1!==event.key.length||handleTypeaheadSearch(event.key),["ArrowUp","ArrowDown","Home","End"].includes(event.key)){let candidateNodes=getItems().filter(item=>!item.disabled).map(item=>item.ref.current);if(["ArrowUp","End"].includes(event.key)&&(candidateNodes=candidateNodes.slice().reverse()),["ArrowUp","ArrowDown"].includes(event.key)){let currentElement=event.target,currentIndex=candidateNodes.indexOf(currentElement);candidateNodes=candidateNodes.slice(currentIndex+1)}setTimeout(()=>focusFirst(candidateNodes)),event.preventDefault()}})})})})})})});SelectContentImpl.displayName="SelectContentImpl";var SelectItemAlignedPosition=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeSelect,onPlaced,...popperProps}=props,context=useSelectContext(CONTENT_NAME6,__scopeSelect),contentContext=useSelectContentContext(CONTENT_NAME6,__scopeSelect),[contentWrapper,setContentWrapper]=__TURBOPACK__imported__module__66626__.useState(null),[content,setContent]=__TURBOPACK__imported__module__66626__.useState(null),composedRefs=useComposedRefs1(forwardedRef,node=>setContent(node)),getItems=useCollection(__scopeSelect),shouldExpandOnScrollRef=__TURBOPACK__imported__module__66626__.useRef(!1),shouldRepositionRef=__TURBOPACK__imported__module__66626__.useRef(!0),{viewport,selectedItem,selectedItemText,focusSelectedItem}=contentContext,position=__TURBOPACK__imported__module__66626__.useCallback(()=>{if(context.trigger&&context.valueNode&&contentWrapper&&content&&viewport&&selectedItem&&selectedItemText){let triggerRect=context.trigger.getBoundingClientRect(),contentRect=content.getBoundingClientRect(),valueNodeRect=context.valueNode.getBoundingClientRect(),itemTextRect=selectedItemText.getBoundingClientRect();if("rtl"!==context.dir){let itemTextOffset=itemTextRect.left-contentRect.left,left=valueNodeRect.left-itemTextOffset,leftDelta=triggerRect.left-left,minContentWidth=triggerRect.width+leftDelta,contentWidth=Math.max(minContentWidth,contentRect.width),clampedLeft=clamp1(left,[10,Math.max(10,window.innerWidth-10-contentWidth)]);contentWrapper.style.minWidth=minContentWidth+"px",contentWrapper.style.left=clampedLeft+"px"}else{let itemTextOffset=contentRect.right-itemTextRect.right,right=window.innerWidth-valueNodeRect.right-itemTextOffset,rightDelta=window.innerWidth-triggerRect.right-right,minContentWidth=triggerRect.width+rightDelta,contentWidth=Math.max(minContentWidth,contentRect.width),clampedRight=clamp1(right,[10,Math.max(10,window.innerWidth-10-contentWidth)]);contentWrapper.style.minWidth=minContentWidth+"px",contentWrapper.style.right=clampedRight+"px"}let items=getItems(),availableHeight=window.innerHeight-20,itemsHeight=viewport.scrollHeight,contentStyles=window.getComputedStyle(content),contentBorderTopWidth=parseInt(contentStyles.borderTopWidth,10),contentPaddingTop=parseInt(contentStyles.paddingTop,10),contentBorderBottomWidth=parseInt(contentStyles.borderBottomWidth,10),fullContentHeight=contentBorderTopWidth+contentPaddingTop+itemsHeight+parseInt(contentStyles.paddingBottom,10)+contentBorderBottomWidth,minContentHeight=Math.min(5*selectedItem.offsetHeight,fullContentHeight),viewportStyles=window.getComputedStyle(viewport),viewportPaddingTop=parseInt(viewportStyles.paddingTop,10),viewportPaddingBottom=parseInt(viewportStyles.paddingBottom,10),topEdgeToTriggerMiddle=triggerRect.top+triggerRect.height/2-10,selectedItemHalfHeight=selectedItem.offsetHeight/2,contentTopToItemMiddle=contentBorderTopWidth+contentPaddingTop+(selectedItem.offsetTop+selectedItemHalfHeight);if(contentTopToItemMiddle<=topEdgeToTriggerMiddle){let isLastItem=items.length>0&&selectedItem===items[items.length-1].ref.current;contentWrapper.style.bottom="0px";let clampedTriggerMiddleToBottomEdge=Math.max(availableHeight-topEdgeToTriggerMiddle,selectedItemHalfHeight+(isLastItem?viewportPaddingBottom:0)+(content.clientHeight-viewport.offsetTop-viewport.offsetHeight)+contentBorderBottomWidth);contentWrapper.style.height=contentTopToItemMiddle+clampedTriggerMiddleToBottomEdge+"px"}else{let isFirstItem=items.length>0&&selectedItem===items[0].ref.current;contentWrapper.style.top="0px";let clampedTopEdgeToTriggerMiddle=Math.max(topEdgeToTriggerMiddle,contentBorderTopWidth+viewport.offsetTop+(isFirstItem?viewportPaddingTop:0)+selectedItemHalfHeight);contentWrapper.style.height=clampedTopEdgeToTriggerMiddle+(fullContentHeight-contentTopToItemMiddle)+"px",viewport.scrollTop=contentTopToItemMiddle-topEdgeToTriggerMiddle+viewport.offsetTop}contentWrapper.style.margin="10px 0",contentWrapper.style.minHeight=minContentHeight+"px",contentWrapper.style.maxHeight=availableHeight+"px",onPlaced?.(),requestAnimationFrame(()=>shouldExpandOnScrollRef.current=!0)}},[getItems,context.trigger,context.valueNode,contentWrapper,content,viewport,selectedItem,selectedItemText,context.dir,onPlaced]);useLayoutEffect21(()=>position(),[position]);let[contentZIndex,setContentZIndex]=__TURBOPACK__imported__module__66626__.useState();useLayoutEffect21(()=>{content&&setContentZIndex(window.getComputedStyle(content).zIndex)},[content]);let handleScrollButtonChange=__TURBOPACK__imported__module__66626__.useCallback(node=>{node&&!0===shouldRepositionRef.current&&(position(),focusSelectedItem?.(),shouldRepositionRef.current=!1)},[position,focusSelectedItem]);return(0,__TURBOPACK__imported__module__2710__.jsx)(SelectViewportProvider,{scope:__scopeSelect,contentWrapper,shouldExpandOnScrollRef,onScrollButtonChange:handleScrollButtonChange,children:(0,__TURBOPACK__imported__module__2710__.jsx)("div",{ref:setContentWrapper,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:contentZIndex},children:(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive1.div,{...popperProps,ref:composedRefs,style:{boxSizing:"border-box",maxHeight:"100%",...popperProps.style}})})})});SelectItemAlignedPosition.displayName="SelectItemAlignedPosition";var SelectPopperPosition=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeSelect,align="start",collisionPadding=10,...popperProps}=props,popperScope=usePopperScope2(__scopeSelect);return(0,__TURBOPACK__imported__module__2710__.jsx)(PopperContent2,{...popperScope,...popperProps,ref:forwardedRef,align,collisionPadding,style:{boxSizing:"border-box",...popperProps.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});SelectPopperPosition.displayName="SelectPopperPosition";var[SelectViewportProvider,useSelectViewportContext]=createSelectContext(CONTENT_NAME6,{}),VIEWPORT_NAME="SelectViewport",SelectViewport=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeSelect,nonce,...viewportProps}=props,contentContext=useSelectContentContext(VIEWPORT_NAME,__scopeSelect),viewportContext=useSelectViewportContext(VIEWPORT_NAME,__scopeSelect),composedRefs=useComposedRefs1(forwardedRef,contentContext.onViewportChange),prevScrollTopRef=__TURBOPACK__imported__module__66626__.useRef(0);return(0,__TURBOPACK__imported__module__2710__.jsxs)(__TURBOPACK__imported__module__2710__.Fragment,{children:[(0,__TURBOPACK__imported__module__2710__.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce}),(0,__TURBOPACK__imported__module__2710__.jsx)(Collection.Slot,{scope:__scopeSelect,children:(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive1.div,{"data-radix-select-viewport":"",role:"presentation",...viewportProps,ref:composedRefs,style:{position:"relative",flex:1,overflow:"hidden auto",...viewportProps.style},onScroll:composeEventHandlers2(viewportProps.onScroll,event=>{let viewport=event.currentTarget,{contentWrapper,shouldExpandOnScrollRef}=viewportContext;if(shouldExpandOnScrollRef?.current&&contentWrapper){let scrolledBy=Math.abs(prevScrollTopRef.current-viewport.scrollTop);if(scrolledBy>0){let availableHeight=window.innerHeight-20,prevHeight=Math.max(parseFloat(contentWrapper.style.minHeight),parseFloat(contentWrapper.style.height));if(prevHeight<availableHeight){let nextHeight=prevHeight+scrolledBy,clampedNextHeight=Math.min(availableHeight,nextHeight),heightDiff=nextHeight-clampedNextHeight;contentWrapper.style.height=clampedNextHeight+"px","0px"===contentWrapper.style.bottom&&(viewport.scrollTop=heightDiff>0?heightDiff:0,contentWrapper.style.justifyContent="flex-end")}}}prevScrollTopRef.current=viewport.scrollTop})})})]})});SelectViewport.displayName=VIEWPORT_NAME;var GROUP_NAME="SelectGroup",[SelectGroupContextProvider,useSelectGroupContext]=createSelectContext(GROUP_NAME);__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeSelect,...groupProps}=props,groupId=useId1();return(0,__TURBOPACK__imported__module__2710__.jsx)(SelectGroupContextProvider,{scope:__scopeSelect,id:groupId,children:(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive1.div,{role:"group","aria-labelledby":groupId,...groupProps,ref:forwardedRef})})}).displayName=GROUP_NAME;var LABEL_NAME="SelectLabel";__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeSelect,...labelProps}=props,groupContext=useSelectGroupContext(LABEL_NAME,__scopeSelect);return(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive1.div,{id:groupContext.id,...labelProps,ref:forwardedRef})}).displayName=LABEL_NAME;var ITEM_NAME="SelectItem",[SelectItemContextProvider,useSelectItemContext]=createSelectContext(ITEM_NAME),SelectItem=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeSelect,value:value1,disabled=!1,textValue:textValueProp,...itemProps}=props,context=useSelectContext(ITEM_NAME,__scopeSelect),contentContext=useSelectContentContext(ITEM_NAME,__scopeSelect),isSelected=context.value===value1,[textValue,setTextValue]=__TURBOPACK__imported__module__66626__.useState(textValueProp??""),[isFocused,setIsFocused]=__TURBOPACK__imported__module__66626__.useState(!1),composedRefs=useComposedRefs1(forwardedRef,node=>contentContext.itemRefCallback?.(node,value1,disabled)),textId=useId1(),pointerTypeRef=__TURBOPACK__imported__module__66626__.useRef("touch"),handleSelect=()=>{disabled||(context.onValueChange(value1),context.onOpenChange(!1))};if(""===value1)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,__TURBOPACK__imported__module__2710__.jsx)(SelectItemContextProvider,{scope:__scopeSelect,value:value1,disabled,textId,isSelected,onItemTextChange:__TURBOPACK__imported__module__66626__.useCallback(node=>{setTextValue(prevTextValue=>prevTextValue||(node?.textContent??"").trim())},[]),children:(0,__TURBOPACK__imported__module__2710__.jsx)(Collection.ItemSlot,{scope:__scopeSelect,value:value1,disabled,textValue,children:(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive1.div,{role:"option","aria-labelledby":textId,"data-highlighted":isFocused?"":void 0,"aria-selected":isSelected&&isFocused,"data-state":isSelected?"checked":"unchecked","aria-disabled":disabled||void 0,"data-disabled":disabled?"":void 0,tabIndex:disabled?void 0:-1,...itemProps,ref:composedRefs,onFocus:composeEventHandlers2(itemProps.onFocus,()=>setIsFocused(!0)),onBlur:composeEventHandlers2(itemProps.onBlur,()=>setIsFocused(!1)),onClick:composeEventHandlers2(itemProps.onClick,()=>{"mouse"!==pointerTypeRef.current&&handleSelect()}),onPointerUp:composeEventHandlers2(itemProps.onPointerUp,()=>{"mouse"===pointerTypeRef.current&&handleSelect()}),onPointerDown:composeEventHandlers2(itemProps.onPointerDown,event=>{pointerTypeRef.current=event.pointerType}),onPointerMove:composeEventHandlers2(itemProps.onPointerMove,event=>{pointerTypeRef.current=event.pointerType,disabled?contentContext.onItemLeave?.():"mouse"===pointerTypeRef.current&&event.currentTarget.focus({preventScroll:!0})}),onPointerLeave:composeEventHandlers2(itemProps.onPointerLeave,event=>{event.currentTarget===document.activeElement&&contentContext.onItemLeave?.()}),onKeyDown:composeEventHandlers2(itemProps.onKeyDown,event=>{(contentContext.searchRef?.current===""||" "!==event.key)&&(SELECTION_KEYS.includes(event.key)&&handleSelect()," "===event.key&&event.preventDefault())})})})})});SelectItem.displayName=ITEM_NAME;var ITEM_TEXT_NAME="SelectItemText",SelectItemText=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeSelect,className,style,...itemTextProps}=props,context=useSelectContext(ITEM_TEXT_NAME,__scopeSelect),contentContext=useSelectContentContext(ITEM_TEXT_NAME,__scopeSelect),itemContext=useSelectItemContext(ITEM_TEXT_NAME,__scopeSelect),nativeOptionsContext=useSelectNativeOptionsContext(ITEM_TEXT_NAME,__scopeSelect),[itemTextNode,setItemTextNode]=__TURBOPACK__imported__module__66626__.useState(null),composedRefs=useComposedRefs1(forwardedRef,node=>setItemTextNode(node),itemContext.onItemTextChange,node=>contentContext.itemTextRefCallback?.(node,itemContext.value,itemContext.disabled)),textContent=itemTextNode?.textContent,nativeOption=__TURBOPACK__imported__module__66626__.useMemo(()=>(0,__TURBOPACK__imported__module__2710__.jsx)("option",{value:itemContext.value,disabled:itemContext.disabled,children:textContent},itemContext.value),[itemContext.disabled,itemContext.value,textContent]),{onNativeOptionAdd,onNativeOptionRemove}=nativeOptionsContext;return useLayoutEffect21(()=>(onNativeOptionAdd(nativeOption),()=>onNativeOptionRemove(nativeOption)),[onNativeOptionAdd,onNativeOptionRemove,nativeOption]),(0,__TURBOPACK__imported__module__2710__.jsxs)(__TURBOPACK__imported__module__2710__.Fragment,{children:[(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive1.span,{id:itemContext.textId,...itemTextProps,ref:composedRefs}),itemContext.isSelected&&context.valueNode&&!context.valueNodeHasChildren?__TURBOPACK__imported__module__79892__.createPortal(itemTextProps.children,context.valueNode):null]})});SelectItemText.displayName=ITEM_TEXT_NAME;var ITEM_INDICATOR_NAME="SelectItemIndicator",SelectItemIndicator=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeSelect,...itemIndicatorProps}=props;return useSelectItemContext(ITEM_INDICATOR_NAME,__scopeSelect).isSelected?(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive1.span,{"aria-hidden":!0,...itemIndicatorProps,ref:forwardedRef}):null});SelectItemIndicator.displayName=ITEM_INDICATOR_NAME;var SCROLL_UP_BUTTON_NAME="SelectScrollUpButton",SelectScrollUpButton=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let contentContext=useSelectContentContext(SCROLL_UP_BUTTON_NAME,props.__scopeSelect),viewportContext=useSelectViewportContext(SCROLL_UP_BUTTON_NAME,props.__scopeSelect),[canScrollUp,setCanScrollUp]=__TURBOPACK__imported__module__66626__.useState(!1),composedRefs=useComposedRefs1(forwardedRef,viewportContext.onScrollButtonChange);return useLayoutEffect21(()=>{if(contentContext.viewport&&contentContext.isPositioned){let handleScroll2=function(){setCanScrollUp(viewport.scrollTop>0)},viewport=contentContext.viewport;return handleScroll2(),viewport.addEventListener("scroll",handleScroll2),()=>viewport.removeEventListener("scroll",handleScroll2)}},[contentContext.viewport,contentContext.isPositioned]),canScrollUp?(0,__TURBOPACK__imported__module__2710__.jsx)(SelectScrollButtonImpl,{...props,ref:composedRefs,onAutoScroll:()=>{let{viewport,selectedItem}=contentContext;viewport&&selectedItem&&(viewport.scrollTop=viewport.scrollTop-selectedItem.offsetHeight)}}):null});SelectScrollUpButton.displayName=SCROLL_UP_BUTTON_NAME;var SCROLL_DOWN_BUTTON_NAME="SelectScrollDownButton",SelectScrollDownButton=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let contentContext=useSelectContentContext(SCROLL_DOWN_BUTTON_NAME,props.__scopeSelect),viewportContext=useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME,props.__scopeSelect),[canScrollDown,setCanScrollDown]=__TURBOPACK__imported__module__66626__.useState(!1),composedRefs=useComposedRefs1(forwardedRef,viewportContext.onScrollButtonChange);return useLayoutEffect21(()=>{if(contentContext.viewport&&contentContext.isPositioned){let handleScroll2=function(){let maxScroll=viewport.scrollHeight-viewport.clientHeight;setCanScrollDown(Math.ceil(viewport.scrollTop)<maxScroll)},viewport=contentContext.viewport;return handleScroll2(),viewport.addEventListener("scroll",handleScroll2),()=>viewport.removeEventListener("scroll",handleScroll2)}},[contentContext.viewport,contentContext.isPositioned]),canScrollDown?(0,__TURBOPACK__imported__module__2710__.jsx)(SelectScrollButtonImpl,{...props,ref:composedRefs,onAutoScroll:()=>{let{viewport,selectedItem}=contentContext;viewport&&selectedItem&&(viewport.scrollTop=viewport.scrollTop+selectedItem.offsetHeight)}}):null});SelectScrollDownButton.displayName=SCROLL_DOWN_BUTTON_NAME;var SelectScrollButtonImpl=__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeSelect,onAutoScroll,...scrollIndicatorProps}=props,contentContext=useSelectContentContext("SelectScrollButton",__scopeSelect),autoScrollTimerRef=__TURBOPACK__imported__module__66626__.useRef(null),getItems=useCollection(__scopeSelect),clearAutoScrollTimer=__TURBOPACK__imported__module__66626__.useCallback(()=>{null!==autoScrollTimerRef.current&&(window.clearInterval(autoScrollTimerRef.current),autoScrollTimerRef.current=null)},[]);return __TURBOPACK__imported__module__66626__.useEffect(()=>()=>clearAutoScrollTimer(),[clearAutoScrollTimer]),useLayoutEffect21(()=>{let activeItem=getItems().find(item=>item.ref.current===document.activeElement);activeItem?.ref.current?.scrollIntoView({block:"nearest"})},[getItems]),(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive1.div,{"aria-hidden":!0,...scrollIndicatorProps,ref:forwardedRef,style:{flexShrink:0,...scrollIndicatorProps.style},onPointerDown:composeEventHandlers2(scrollIndicatorProps.onPointerDown,()=>{null===autoScrollTimerRef.current&&(autoScrollTimerRef.current=window.setInterval(onAutoScroll,50))}),onPointerMove:composeEventHandlers2(scrollIndicatorProps.onPointerMove,()=>{contentContext.onItemLeave?.(),null===autoScrollTimerRef.current&&(autoScrollTimerRef.current=window.setInterval(onAutoScroll,50))}),onPointerLeave:composeEventHandlers2(scrollIndicatorProps.onPointerLeave,()=>{clearAutoScrollTimer()})})});__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeSelect,...separatorProps}=props;return(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive1.div,{"aria-hidden":!0,...separatorProps,ref:forwardedRef})}).displayName="SelectSeparator";var ARROW_NAME5="SelectArrow";__TURBOPACK__imported__module__66626__.forwardRef((props,forwardedRef)=>{let{__scopeSelect,...arrowProps}=props,popperScope=usePopperScope2(__scopeSelect),context=useSelectContext(ARROW_NAME5,__scopeSelect),contentContext=useSelectContentContext(ARROW_NAME5,__scopeSelect);return context.open&&"popper"===contentContext.position?(0,__TURBOPACK__imported__module__2710__.jsx)(PopperArrow2,{...popperScope,...arrowProps,ref:forwardedRef}):null}).displayName=ARROW_NAME5;var SelectBubbleInput=__TURBOPACK__imported__module__66626__.forwardRef(({__scopeSelect,value:value1,...props},forwardedRef)=>{let ref=__TURBOPACK__imported__module__66626__.useRef(null),composedRefs=useComposedRefs1(forwardedRef,ref),prevValue=usePrevious(value1);return __TURBOPACK__imported__module__66626__.useEffect(()=>{let select=ref.current;if(!select)return;let setValue=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(prevValue!==value1&&setValue){let event=new Event("change",{bubbles:!0});setValue.call(select,value1),select.dispatchEvent(event)}},[prevValue,value1]),(0,__TURBOPACK__imported__module__2710__.jsx)(Primitive1.select,{...props,style:{...VISUALLY_HIDDEN_STYLES,...props.style},ref:composedRefs,defaultValue:value1})});function shouldShowPlaceholder(value1){return""===value1||void 0===value1}function useTypeaheadSearch(onSearchChange){let handleSearchChange=useCallbackRef2(onSearchChange),searchRef=__TURBOPACK__imported__module__66626__.useRef(""),timerRef=__TURBOPACK__imported__module__66626__.useRef(0),handleTypeaheadSearch=__TURBOPACK__imported__module__66626__.useCallback(key=>{let search=searchRef.current+key;handleSearchChange(search),function updateSearch(value1){searchRef.current=value1,window.clearTimeout(timerRef.current),""!==value1&&(timerRef.current=window.setTimeout(()=>updateSearch(""),1e3))}(search)},[handleSearchChange]),resetTypeahead=__TURBOPACK__imported__module__66626__.useCallback(()=>{searchRef.current="",window.clearTimeout(timerRef.current)},[]);return __TURBOPACK__imported__module__66626__.useEffect(()=>()=>window.clearTimeout(timerRef.current),[]),[searchRef,handleTypeaheadSearch,resetTypeahead]}function findNextItem(items,search,currentItem){let normalizedSearch=search.length>1&&Array.from(search).every(char=>char===search[0])?search[0]:search,currentItemIndex=currentItem?items.indexOf(currentItem):-1,wrappedItems=wrapArray(items,Math.max(currentItemIndex,0));1===normalizedSearch.length&&(wrappedItems=wrappedItems.filter(v=>v!==currentItem));let nextItem=wrappedItems.find(item=>item.textValue.toLowerCase().startsWith(normalizedSearch.toLowerCase()));return nextItem!==currentItem?nextItem:void 0}function wrapArray(array,startIndex){return array.map((_,index)=>array[(startIndex+index)%array.length])}SelectBubbleInput.displayName="SelectBubbleInput";let ChevronDown=createLucideIcon("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),ChevronUp=createLucideIcon("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);function Select1({...props}){return(0,__TURBOPACK__imported__module__2710__.jsx)(Select,{"data-slot":"select",...props})}function SelectValue1({...props}){return(0,__TURBOPACK__imported__module__2710__.jsx)(SelectValue,{"data-slot":"select-value",...props})}function SelectTrigger1({className,size="default",children,...props}){return(0,__TURBOPACK__imported__module__2710__.jsxs)(SelectTrigger,{"data-slot":"select-trigger","data-size":size,className:cn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",className),...props,children:[children,(0,__TURBOPACK__imported__module__2710__.jsx)(SelectIcon,{asChild:!0,children:(0,__TURBOPACK__imported__module__2710__.jsx)(ChevronDown,{className:"size-4 opacity-50"})})]})}function SelectContent1({className,children,position="item-aligned",align="center",...props}){return(0,__TURBOPACK__imported__module__2710__.jsx)(SelectPortal,{children:(0,__TURBOPACK__imported__module__2710__.jsxs)(SelectContent,{"data-slot":"select-content",className:cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===position&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",className),position:position,align:align,...props,children:[(0,__TURBOPACK__imported__module__2710__.jsx)(SelectScrollUpButton1,{}),(0,__TURBOPACK__imported__module__2710__.jsx)(SelectViewport,{className:cn("p-1","popper"===position&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:children}),(0,__TURBOPACK__imported__module__2710__.jsx)(SelectScrollDownButton1,{})]})})}function SelectItem1({className,children,...props}){return(0,__TURBOPACK__imported__module__2710__.jsxs)(SelectItem,{"data-slot":"select-item",className:cn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",className),...props,children:[(0,__TURBOPACK__imported__module__2710__.jsx)("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,__TURBOPACK__imported__module__2710__.jsx)(SelectItemIndicator,{children:(0,__TURBOPACK__imported__module__2710__.jsx)(Check,{className:"size-4"})})}),(0,__TURBOPACK__imported__module__2710__.jsx)(SelectItemText,{children:children})]})}function SelectScrollUpButton1({className,...props}){return(0,__TURBOPACK__imported__module__2710__.jsx)(SelectScrollUpButton,{"data-slot":"select-scroll-up-button",className:cn("flex cursor-default items-center justify-center py-1",className),...props,children:(0,__TURBOPACK__imported__module__2710__.jsx)(ChevronUp,{className:"size-4"})})}function SelectScrollDownButton1({className,...props}){return(0,__TURBOPACK__imported__module__2710__.jsx)(SelectScrollDownButton,{"data-slot":"select-scroll-down-button",className:cn("flex cursor-default items-center justify-center py-1",className),...props,children:(0,__TURBOPACK__imported__module__2710__.jsx)(ChevronDown,{className:"size-4"})})}function MultiSelect({options,value:value1,onValueChange,placeholder="Select items...",selectionName={singular:"item",plural:"items"},className,triggerClassName,triggerIcon,"aria-label":ariaLabel}){let displayText,[open,setOpen]=__TURBOPACK__imported__module__66626__.useState(!1);function handleToggle(optionValue,checked){let newValue=checked?[...value1,optionValue]:value1.filter(v=>v!==optionValue);newValue.length>0&&onValueChange(newValue)}return displayText=value1.length===options.length?`All ${selectionName.plural}`:0===value1.length?placeholder:`${value1.length} ${1===value1.length?selectionName.singular:selectionName.plural}`,(0,__TURBOPACK__imported__module__2710__.jsxs)(Popover,{open:open,onOpenChange:setOpen,children:[(0,__TURBOPACK__imported__module__2710__.jsx)(PopoverTrigger,{asChild:!0,children:(0,__TURBOPACK__imported__module__2710__.jsxs)(Button,{variant:"outline",className:cn("justify-between border focus-visible:ring-[3px] focus-visible:ring-ring/50 font-normal px-3 py-2 h-9 text-xs",triggerClassName),role:"combobox","aria-expanded":open,"aria-haspopup":"dialog","aria-label":ariaLabel,onKeyDown:e=>{"ArrowDown"!==e.key&&"ArrowUp"!==e.key||open||(e.preventDefault(),setOpen(!0))},children:[(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"flex items-center gap-1",children:[triggerIcon&&(0,__TURBOPACK__imported__module__2710__.jsx)("span",{className:"shrink-0 text-muted-foreground","aria-hidden":"true",children:triggerIcon}),(0,__TURBOPACK__imported__module__2710__.jsx)("span",{children:displayText})]}),(0,__TURBOPACK__imported__module__2710__.jsx)(ChevronDown,{className:"h-3.5 w-3.5 opacity-50","aria-hidden":"true"})]})}),(0,__TURBOPACK__imported__module__2710__.jsx)(PopoverContent1,{className:cn("w-48 p-2",className),align:"end",onKeyDown:e=>{if("Escape"===e.key){e.preventDefault(),setOpen(!1);return}let checkboxes=Array.from(e.currentTarget.querySelectorAll('input[type="checkbox"]')),currentIndex=checkboxes.indexOf(document.activeElement);if("ArrowDown"===e.key||"ArrowUp"===e.key)if(e.preventDefault(),-1===currentIndex)checkboxes[0]?.focus();else{let nextIndex="ArrowDown"===e.key?(currentIndex+1)%checkboxes.length:(currentIndex-1+checkboxes.length)%checkboxes.length;checkboxes[nextIndex]?.focus()}},children:(0,__TURBOPACK__imported__module__2710__.jsxs)("fieldset",{className:"space-y-2",children:[(0,__TURBOPACK__imported__module__2710__.jsx)("legend",{className:"sr-only",children:ariaLabel||placeholder}),options.map(option=>(0,__TURBOPACK__imported__module__2710__.jsx)(MultiSelectOption,{label:option.label,icon:option.icon,checked:value1.includes(option.value),onChange:checked=>handleToggle(option.value,checked)},option.value))]})})]})}function MultiSelectOption({label,icon,checked,onChange}){return(0,__TURBOPACK__imported__module__2710__.jsxs)("label",{className:cn("text-xs hover:bg-accent hover:text-accent-foreground has-[input:focus-visible]:bg-accent has-[input:focus-visible]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 select-none outline-hidden [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"),children:[(0,__TURBOPACK__imported__module__2710__.jsx)("input",{type:"checkbox",checked:checked,onChange:e=>onChange(e.target.checked),className:"sr-only peer focus:outline-hidden focus-visible:outline-2","aria-label":label}),icon&&(0,__TURBOPACK__imported__module__2710__.jsx)("span",{className:"shrink-0","aria-hidden":"true",children:icon}),(0,__TURBOPACK__imported__module__2710__.jsx)("span",{className:"flex items-center gap-2",children:label}),(0,__TURBOPACK__imported__module__2710__.jsx)("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:checked&&(0,__TURBOPACK__imported__module__2710__.jsx)(Check,{className:"size-4"})})]})}class ModulesData{modulesHeader;modulesBinaryData;pathToModuleIndex;constructor(modulesArrayBuffer){const modulesJsonLength=new DataView(modulesArrayBuffer).getUint32(0,!1),modulesJsonBytes=new Uint8Array(modulesArrayBuffer,4,modulesJsonLength),modulesJsonString=new TextDecoder("utf-8").decode(modulesJsonBytes);this.modulesHeader=JSON.parse(modulesJsonString);this.modulesBinaryData=new DataView(modulesArrayBuffer,4+modulesJsonLength),this.pathToModuleIndex=new Map;for(let i=0;i<this.modulesHeader.modules.length;i++){const module=this.modulesHeader.modules[i],existing=this.pathToModuleIndex.get(module.path);existing?existing.push(i):this.pathToModuleIndex.set(module.path,[i])}}module(index){return this.modulesHeader.modules[index]}moduleCount(){return this.modulesHeader.modules.length}getModuleIndiciesFromPath(path){return this.pathToModuleIndex.get(path)??[]}readEdgesDataAtIndex(reference,index){let{offset,length}=reference;if(0===length)return[];let numOffsets=this.modulesBinaryData.getUint32(offset,!1);if(index<0||index>=numOffsets)return[];let offsetsStart=offset+4,prevOffset=0===index?0:this.modulesBinaryData.getUint32(offsetsStart+(index-1)*4,!1),edgeCount=this.modulesBinaryData.getUint32(offsetsStart+4*index,!1)-prevOffset;if(0===edgeCount)return[];let dataStart=offset+4+4*numOffsets,edges=[];for(let j=0;j<edgeCount;j++){let edgeValue=this.modulesBinaryData.getUint32(dataStart+(prevOffset+j)*4,!1);edges.push(edgeValue)}return edges}moduleDependents(index){return this.readEdgesDataAtIndex(this.modulesHeader.module_dependents,index)}asyncModuleDependents(index){return this.readEdgesDataAtIndex(this.modulesHeader.async_module_dependents,index)}tracedModuleDependents(index){return this.readEdgesDataAtIndex(this.modulesHeader.traced_module_dependents,index)}moduleDependencies(index){return this.readEdgesDataAtIndex(this.modulesHeader.module_dependencies,index)}asyncModuleDependencies(index){return this.readEdgesDataAtIndex(this.modulesHeader.async_module_dependencies,index)}tracedModuleDependencies(index){return this.readEdgesDataAtIndex(this.modulesHeader.traced_module_dependencies,index)}getRawModulesHeader(){return this.modulesHeader}}class AnalyzeData{analyzeHeader;analyzeBinaryData;pathToSourceIndex;constructor(analyzeArrayBuffer){const analyzeJsonLength=new DataView(analyzeArrayBuffer).getUint32(0,!1),analyzeJsonBytes=new Uint8Array(analyzeArrayBuffer,4,analyzeJsonLength),analyzeJsonString=new TextDecoder("utf-8").decode(analyzeJsonBytes);this.analyzeHeader=JSON.parse(analyzeJsonString);this.analyzeBinaryData=new DataView(analyzeArrayBuffer,4+analyzeJsonLength),this.pathToSourceIndex=new Map;for(let i=0;i<this.analyzeHeader.sources.length;i++){const fullPath=this.getFullSourcePath(i);this.pathToSourceIndex.set(fullPath,i)}}source(index){return this.analyzeHeader.sources[index]}sourceCount(){return this.analyzeHeader.sources.length}getSourceIndexFromPath(path){return this.pathToSourceIndex.get(path)}chunkPart(index){return this.analyzeHeader.chunk_parts[index]}chunkPartCount(){return this.analyzeHeader.chunk_parts.length}outputFile(index){return this.analyzeHeader.output_files[index]}outputFileCount(){return this.analyzeHeader.output_files.length}sourceRoots(){return this.analyzeHeader.source_roots}readEdgesDataAtIndex(reference,index){let{offset,length}=reference;if(0===length)return[];let numOffsets=this.analyzeBinaryData.getUint32(offset,!1);if(index<0||index>=numOffsets)return[];let offsetsStart=offset+4,prevOffset=0===index?0:this.analyzeBinaryData.getUint32(offsetsStart+(index-1)*4,!1),edgeCount=this.analyzeBinaryData.getUint32(offsetsStart+4*index,!1)-prevOffset;if(0===edgeCount)return[];let dataStart=offset+4+4*numOffsets,edges=[];for(let j=0;j<edgeCount;j++){let edgeValue=this.analyzeBinaryData.getUint32(dataStart+(prevOffset+j)*4,!1);edges.push(edgeValue)}return edges}outputFileChunkParts(index){return this.readEdgesDataAtIndex(this.analyzeHeader.output_file_chunk_parts,index)}sourceChunkParts(index){return this.readEdgesDataAtIndex(this.analyzeHeader.source_chunk_parts,index)}sourceChildren(index){return this.readEdgesDataAtIndex(this.analyzeHeader.source_children,index)}getFullSourcePath(index){let source=this.source(index);return source?null===source.parent_source_index?source.path:this.getFullSourcePath(source.parent_source_index)+source.path:""}getOwnSizes(index){let chunkParts=this.sourceChunkParts(index),size=0,compressedSize=0;for(let chunkPartIndex of chunkParts){let chunkPart=this.chunkPart(chunkPartIndex);chunkPart&&(size+=chunkPart.size,compressedSize+=chunkPart.compressed_size)}return{size,compressedSize}}getRecursiveModuleCount(index,filterSource){let selfCount=filterSource(index)&&this.sourceChunkParts(index).length>0?1:0,children=this.sourceChildren(index);if(0===children.length)return selfCount;let totalCount=selfCount;for(let childIndex of children)totalCount+=this.getRecursiveModuleCount(childIndex,filterSource);return totalCount}sourceChunks(index){let chunkParts=this.sourceChunkParts(index),uniqueChunks=new Set;for(let chunkPartIndex of chunkParts){let chunkPart=this.chunkPart(chunkPartIndex);if(chunkPart){let outputFile=this.outputFile(chunkPart.output_file_index);outputFile&&uniqueChunks.add(outputFile.filename)}}return Array.from(uniqueChunks).sort()}getRecursiveSizes(index,filterSource){let size=0,compressedSize=0;if(filterSource(index)){let{size:ownUncompressedSize,compressedSize:ownCompressedSize}=this.getOwnSizes(index);size+=ownUncompressedSize,compressedSize+=ownCompressedSize}for(let childIndex of this.sourceChildren(index)){let{size:childUncompressedSize,compressedSize:childCompressedSize}=this.getRecursiveSizes(childIndex,filterSource);size+=childUncompressedSize,compressedSize+=childCompressedSize}return{size,compressedSize}}getSourceFlags(index){let client=!1,server=!1,traced=!1,js=!1,css=!1,json=!1,asset=!1;for(let chunkPartIndex of this.sourceChunkParts(index)){let chunkPart=this.chunkPart(chunkPartIndex);if(!chunkPart)continue;let outputFile=this.outputFile(chunkPart.output_file_index);outputFile&&(outputFile.filename.startsWith("[client-fs]/")?client=!0:(outputFile.filename.startsWith("[project]/")&&(traced=!0),server=!0),outputFile.filename.endsWith(".js")||outputFile.filename.endsWith(".mjs")||outputFile.filename.endsWith(".cjs")?js=!0:outputFile.filename.endsWith(".css")?css=!0:outputFile.filename.endsWith(".json")?json=!0:asset=!0)}return{client,server,traced,js,css,json,asset}}isPolyfillModule(index){return this.getFullSourcePath(index).endsWith("node_modules/next/dist/build/polyfills/polyfill-module.js")}isPolyfillNoModule(index){return this.getFullSourcePath(index).endsWith("node_modules/next/dist/build/polyfills/polyfill-nomodule.js")}}function computeActiveEntries(modulesData,analyzeData){let potentialEntryDependents=["next/dist/esm/build/templates/pages.js","next/dist/esm/build/templates/pages-api.js","next/dist/esm/build/templates/pages-edge-api.js","next/dist/esm/build/templates/edge-ssr.js","next/dist/esm/build/templates/app-route.js","next/dist/esm/build/templates/edge-app-route.js","next/dist/esm/build/templates/app-page.js","next/dist/esm/build/templates/edge-ssr-app.js","next/dist/esm/build/templates/middleware.js","[next]/entry/page-loader.ts"],potentialEntries=["next/dist/client/app-next-turbopack.js","next/dist/client/next-turbopack.js"],activeEntries=new Set;for(let moduleIndex=0;moduleIndex<modulesData.moduleCount();moduleIndex++){let ident=modulesData.module(moduleIndex)?.ident;if(null!=ident){if(potentialEntryDependents.some(entryIdent=>ident.includes(entryIdent)))for(let dep of modulesData.moduleDependencies(moduleIndex)){let path=modulesData.module(dep).path;path.includes("next/dist/")||void 0!==analyzeData.getSourceIndexFromPath(path)&&activeEntries.add(dep)}potentialEntries.some(entryIdent=>ident.includes(entryIdent))&&activeEntries.add(moduleIndex)}}return Array.from(activeEntries)}function computeModuleDepthMap(modulesData,activeEntries){let depthMap=new Map,delayedModules=[];for(let moduleIndex of activeEntries)depthMap.set(moduleIndex,0);let i=0;for(let[moduleIndex,depth]of depthMap){let newDepth=depth+1;for(let depIndex of modulesData.moduleDependencies(moduleIndex))depthMap.has(depIndex)||depthMap.set(depIndex,newDepth);for(let depIndex of modulesData.asyncModuleDependencies(moduleIndex))if(!depthMap.has(depIndex)){let newDepth=depth+1e3,delayedQueue=delayedModules.find(dq=>dq.depth===newDepth);delayedQueue||(delayedQueue={depth:newDepth,queue:[]},delayedModules.push(delayedQueue),delayedModules.sort((a,b)=>b.depth-a.depth)),delayedQueue.queue.push(depIndex)}for(let depIndex of modulesData.tracedModuleDependencies(moduleIndex))depthMap.has(depIndex)||depthMap.set(depIndex,newDepth);for(i++;delayedModules.length>0&&(i===depthMap.size||newDepth===delayedModules[delayedModules.length-1].depth);){let{depth,queue}=delayedModules.pop();for(let depIndex of queue)depthMap.has(depIndex)||depthMap.set(depIndex,depth)}}if(delayedModules.length>0)throw Error("Internal error: delayed modules remain after BFS processing");return depthMap}let Monitor=createLucideIcon("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]),FileCode=createLucideIcon("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]),FileBraces=createLucideIcon("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]),Palette=createLucideIcon("palette",[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]);var Environment1=((Environment=Environment1||{}).Client="client",Environment.Server="server",Environment);function Home(){let[selectedRoute,setSelectedRoute]=(0,__TURBOPACK__imported__module__66626__.useState)(null),[environmentFilter,setEnvironmentFilter]=(0,__TURBOPACK__imported__module__66626__.useState)("client"),[typeFilter,setTypeFilter]=(0,__TURBOPACK__imported__module__66626__.useState)(["js","css","json"]),[selectedSourceIndex,setSelectedSourceIndex]=(0,__TURBOPACK__imported__module__66626__.useState)(null),[focusedSourceIndex,setFocusedSourceIndex]=(0,__TURBOPACK__imported__module__66626__.useState)(null),{data:modulesData,isLoading:isModulesLoading,error:modulesError}=useSWR("data/modules.data",fetchModulesData),{data:analyzeData,isLoading:isAnalyzeLoading,error:analyzeError}=useSWR(selectedRoute&&"/"===selectedRoute?"data/analyze.data":selectedRoute?`data/${selectedRoute.replace(/^\//,"")}/analyze.data`:null,fetchAnalyzeData,{revalidateOnFocus:!1,revalidateOnReconnect:!1,onSuccess:newData=>{let newRootSourceIndex=getRootSourceIndex(newData);setSelectedSourceIndex(newRootSourceIndex),setFocusedSourceIndex(newRootSourceIndex)}}),[sidebarWidth,setSidebarWidth]=(0,__TURBOPACK__imported__module__66626__.useState)(20),[isResizing,setIsResizing]=(0,__TURBOPACK__imported__module__66626__.useState)(!1),[isMouseInTreemap,setIsMouseInTreemap]=(0,__TURBOPACK__imported__module__66626__.useState)(!1),[hoveredNodeInfo,setHoveredNodeInfo]=(0,__TURBOPACK__imported__module__66626__.useState)(null),[searchQuery,setSearchQuery]=(0,__TURBOPACK__imported__module__66626__.useState)("");(0,__TURBOPACK__imported__module__66626__.useEffect)(()=>{let handleKeyDown=e=>{if("Escape"===e.key){let activeElement=document.activeElement;if(!(activeElement&&["INPUT","TEXTAREA"].includes(activeElement.tagName))){e.preventDefault();let rootSourceIndex=getRootSourceIndex(analyzeData);setSelectedSourceIndex(rootSourceIndex),setFocusedSourceIndex(rootSourceIndex)}}};return window.addEventListener("keydown",handleKeyDown),()=>window.removeEventListener("keydown",handleKeyDown)},[analyzeData]);let moduleDepthMap=(0,__TURBOPACK__imported__module__66626__.useMemo)(()=>{if(!modulesData||!analyzeData)return new Map;let activeEntries=computeActiveEntries(modulesData,analyzeData);return computeModuleDepthMap(modulesData,activeEntries)},[modulesData,analyzeData]),filterSource=(0,__TURBOPACK__imported__module__66626__.useMemo)(()=>analyzeData?sourceIndex=>{let flags=analyzeData.getSourceFlags(sourceIndex),hasEnvironment="client"===environmentFilter&&flags.client||"server"===environmentFilter&&flags.server,hasType=typeFilter.includes("js")&&flags.js||typeFilter.includes("css")&&flags.css||typeFilter.includes("json")&&flags.json||typeFilter.includes("asset")&&flags.asset;return hasEnvironment&&hasType}:()=>!0,[analyzeData,environmentFilter,typeFilter]),error=analyzeError||modulesError,rootSourceIndex=getRootSourceIndex(analyzeData);return(0,__TURBOPACK__imported__module__2710__.jsxs)("main",{className:"h-screen flex flex-col bg-background",onMouseMove:e=>{isResizing&&setSidebarWidth(Math.max(10,Math.min(50,(window.innerWidth-e.clientX)/window.innerWidth*100)))},onMouseUp:()=>{setIsResizing(!1)},children:[(0,__TURBOPACK__imported__module__2710__.jsx)(TopBar,{analyzeData:analyzeData,selectedRoute:selectedRoute,setSelectedRoute:setSelectedRoute,environmentFilter:environmentFilter,setEnvironmentFilter:setEnvironmentFilter,setSelectedSourceIndex:setSelectedSourceIndex,setFocusedSourceIndex:setFocusedSourceIndex,typeFilter:typeFilter,setTypeFilter:setTypeFilter,searchQuery:searchQuery,setSearchQuery:setSearchQuery}),(0,__TURBOPACK__imported__module__2710__.jsx)("div",{className:"flex-1 flex min-h-0",children:error&&!analyzeData?(0,__TURBOPACK__imported__module__2710__.jsx)(ErrorState,{error:error}):isAnalyzeLoading||isModulesLoading?(0,__TURBOPACK__imported__module__2710__.jsxs)(__TURBOPACK__imported__module__2710__.Fragment,{children:[(0,__TURBOPACK__imported__module__2710__.jsx)("div",{className:"flex-1 min-w-0 p-4 bg-background",children:(0,__TURBOPACK__imported__module__2710__.jsx)(TreemapSkeleton,{})}),(0,__TURBOPACK__imported__module__2710__.jsx)("button",{type:"button",className:"flex-none w-1 bg-border cursor-col-resize transition-colors",disabled:!0,"aria-label":"Resize sidebar"}),(0,__TURBOPACK__imported__module__2710__.jsx)(Sidebar,{sidebarWidth:sidebarWidth,analyzeData:null,modulesData:null,selectedSourceIndex:null,moduleDepthMap:new Map,environmentFilter:environmentFilter,isLoading:!0})]}):analyzeData?(0,__TURBOPACK__imported__module__2710__.jsxs)(__TURBOPACK__imported__module__2710__.Fragment,{children:[(0,__TURBOPACK__imported__module__2710__.jsx)("div",{className:"flex-1 min-w-0",children:(0,__TURBOPACK__imported__module__2710__.jsx)(TreemapVisualizer,{analyzeData:analyzeData,sourceIndex:rootSourceIndex,selectedSourceIndex:selectedSourceIndex??rootSourceIndex,onSelectSourceIndex:setSelectedSourceIndex,focusedSourceIndex:focusedSourceIndex??rootSourceIndex,onFocusSourceIndex:setFocusedSourceIndex,isMouseInTreemap:isMouseInTreemap,onMouseInTreemapChange:setIsMouseInTreemap,onHoveredNodeChange:setHoveredNodeInfo,searchQuery:searchQuery,filterSource:filterSource,sizeMode:SizeMode1.Compressed})}),(0,__TURBOPACK__imported__module__2710__.jsx)("button",{type:"button",className:"flex-none w-1 bg-border hover:bg-primary cursor-col-resize transition-colors",onMouseDown:()=>{setIsResizing(!0)},"aria-label":"Resize sidebar"}),(0,__TURBOPACK__imported__module__2710__.jsx)(Sidebar,{sidebarWidth:sidebarWidth,analyzeData:analyzeData??null,modulesData:modulesData??null,selectedSourceIndex:selectedSourceIndex,moduleDepthMap:moduleDepthMap,environmentFilter:environmentFilter,filterSource:filterSource})]}):null}),analyzeData&&(0,__TURBOPACK__imported__module__2710__.jsx)("div",{className:"flex-none border-t border-border bg-background px-4 py-2 h-10",children:(0,__TURBOPACK__imported__module__2710__.jsx)("div",{className:"text-sm text-muted-foreground",children:hoveredNodeInfo?(0,__TURBOPACK__imported__module__2710__.jsxs)(__TURBOPACK__imported__module__2710__.Fragment,{children:[(0,__TURBOPACK__imported__module__2710__.jsx)("span",{className:"font-medium text-foreground",children:hoveredNodeInfo.name}),(0,__TURBOPACK__imported__module__2710__.jsx)("span",{className:"ml-2 text-muted-foreground",children:`${formatBytes(hoveredNodeInfo.size)} compressed`}),(hoveredNodeInfo.server||hoveredNodeInfo.client)&&(0,__TURBOPACK__imported__module__2710__.jsxs)("span",{className:"ml-2 inline-flex gap-1",children:[hoveredNodeInfo.client&&(0,__TURBOPACK__imported__module__2710__.jsx)(Badge,{variant:"client",children:"client"}),hoveredNodeInfo.server&&(0,__TURBOPACK__imported__module__2710__.jsx)(Badge,{variant:"server",children:"server"}),hoveredNodeInfo.traced&&(0,__TURBOPACK__imported__module__2710__.jsx)(Badge,{variant:"traced",children:"traced"})]})]}):"Hover over a file to see details"})})]})}let typeFilterOptions=[{value:"js",label:"JavaScript",icon:(0,__TURBOPACK__imported__module__2710__.jsx)(FileCode,{className:"h-3.5 w-3.5"})},{value:"css",label:"CSS",icon:(0,__TURBOPACK__imported__module__2710__.jsx)(Palette,{className:"h-3.5 w-3.5"})},{value:"json",label:"JSON",icon:(0,__TURBOPACK__imported__module__2710__.jsx)(FileBraces,{className:"h-3.5 w-3.5"})},{value:"asset",label:"Asset",icon:(0,__TURBOPACK__imported__module__2710__.jsx)(Package,{className:"h-3.5 w-3.5"})}];function TopBar({analyzeData,selectedRoute,setSelectedRoute,environmentFilter,setEnvironmentFilter,setSelectedSourceIndex,setFocusedSourceIndex,typeFilter,setTypeFilter,searchQuery,setSearchQuery}){return(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"flex-none px-4 py-2 border-b border-border flex items-center gap-3",children:[(0,__TURBOPACK__imported__module__2710__.jsx)("div",{className:"flex-1 flex",children:(0,__TURBOPACK__imported__module__2710__.jsx)(RouteTypeahead,{selectedRoute:selectedRoute,onRouteSelected:route=>{setSelectedRoute(route),setSelectedSourceIndex(null),setFocusedSourceIndex(null)}})}),(0,__TURBOPACK__imported__module__2710__.jsx)("div",{className:"flex items-center gap-2",children:analyzeData&&(0,__TURBOPACK__imported__module__2710__.jsxs)(__TURBOPACK__imported__module__2710__.Fragment,{children:[(0,__TURBOPACK__imported__module__2710__.jsxs)(Select1,{value:environmentFilter,onValueChange:value1=>setEnvironmentFilter(value1),children:[(0,__TURBOPACK__imported__module__2710__.jsx)(SelectTrigger1,{className:"w-28",children:(0,__TURBOPACK__imported__module__2710__.jsx)(SelectValue1,{})}),(0,__TURBOPACK__imported__module__2710__.jsxs)(SelectContent1,{children:[(0,__TURBOPACK__imported__module__2710__.jsx)(SelectItem1,{value:"client",children:(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,__TURBOPACK__imported__module__2710__.jsx)(Monitor,{className:"h-3.5 w-3.5"}),(0,__TURBOPACK__imported__module__2710__.jsx)("span",{className:"text-xs",children:"Client"})]})}),(0,__TURBOPACK__imported__module__2710__.jsx)(SelectItem1,{value:"server",children:(0,__TURBOPACK__imported__module__2710__.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,__TURBOPACK__imported__module__2710__.jsx)(Server,{className:"h-3.5 w-3.5"}),(0,__TURBOPACK__imported__module__2710__.jsx)("span",{className:"text-xs",children:"Server"})]})})]})]}),(0,__TURBOPACK__imported__module__2710__.jsx)(MultiSelect,{options:typeFilterOptions,value:typeFilter,onValueChange:setTypeFilter,selectionName:{singular:"file type",plural:"file types"},triggerIcon:(0,__TURBOPACK__imported__module__2710__.jsx)(FileCode,{className:"h-3.5 w-3.5"}),triggerClassName:"w-36","aria-label":"Filter by file type"}),(0,__TURBOPACK__imported__module__2710__.jsx)(ControlDivider,{}),(0,__TURBOPACK__imported__module__2710__.jsx)(FileSearch,{value:searchQuery,onChange:setSearchQuery})]})})]})}function ControlDivider(){return(0,__TURBOPACK__imported__module__2710__.jsx)("span",{className:"h-6 w-px bg-muted-foreground/30"})}function getRootSourceIndex(analyzeData){if(!analyzeData)return 0;let sourceRoots=analyzeData.sourceRoots();return sourceRoots.length>0?sourceRoots[0]:0}async function fetchAnalyzeData(url){let resp=await fetchStrict(url);return new AnalyzeData(await resp.arrayBuffer())}async function fetchModulesData(url){let resp=await fetchStrict(url);return new ModulesData(await resp.arrayBuffer())}__turbopack_context__.s(["default",0,Home],79331)}]);