jukebox-media-server 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,58 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Watch-DE2orFm6.js","assets/Watch-BIOwxQGH.css"])))=>i.map(i=>d[i]);
2
+ function nE(n,r){for(var o=0;o<r.length;o++){const l=r[o];if(typeof l!="string"&&!Array.isArray(l)){for(const s in l)if(s!=="default"&&!(s in n)){const c=Object.getOwnPropertyDescriptor(l,s);c&&Object.defineProperty(n,s,c.get?c:{enumerable:!0,get:()=>l[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))l(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).observe(document,{childList:!0,subtree:!0});function o(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function l(s){if(s.ep)return;s.ep=!0;const c=o(s);fetch(s.href,c)}})();const aE="modulepreload",rE=function(n){return"/"+n},Iv={},db=function(r,o,l){let s=Promise.resolve();if(o&&o.length>0){let y=function(g){return Promise.all(g.map(b=>Promise.resolve(b).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),m=d?.nonce||d?.getAttribute("nonce");s=y(o.map(g=>{if(g=rE(g),g in Iv)return;Iv[g]=!0;const b=g.endsWith(".css"),p=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${g}"]${p}`))return;const w=document.createElement("link");if(w.rel=b?"stylesheet":aE,b||(w.as="script"),w.crossOrigin="",w.href=g,m&&w.setAttribute("nonce",m),document.head.appendChild(w),b)return new Promise((C,R)=>{w.addEventListener("load",C),w.addEventListener("error",()=>R(new Error(`Unable to preload CSS for ${g}`)))})}))}function c(d){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=d,window.dispatchEvent(m),!m.defaultPrevented)throw d}return s.then(d=>{for(const m of d||[])m.status==="rejected"&&c(m.reason);return r().catch(c)})};var r4=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hu(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function o4(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var r=n.default;if(typeof r=="function"){var o=function l(){var s=!1;try{s=this instanceof l}catch{}return s?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};o.prototype=r.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(n).forEach(function(l){var s=Object.getOwnPropertyDescriptor(n,l);Object.defineProperty(o,l,s.get?s:{enumerable:!0,get:function(){return n[l]}})}),o}var td={exports:{}},Gi={};var Qv;function oE(){if(Qv)return Gi;Qv=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(l,s,c){var d=null;if(c!==void 0&&(d=""+c),s.key!==void 0&&(d=""+s.key),"key"in s){c={};for(var m in s)m!=="key"&&(c[m]=s[m])}else c=s;return s=c.ref,{$$typeof:n,type:l,key:d,ref:s!==void 0?s:null,props:c}}return Gi.Fragment=r,Gi.jsx=o,Gi.jsxs=o,Gi}var Kv;function iE(){return Kv||(Kv=1,td.exports=oE()),td.exports}var h=iE(),nd={exports:{}},Ee={};var Xv;function lE(){if(Xv)return Ee;Xv=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),w=Symbol.iterator;function C(M){return M===null||typeof M!="object"?null:(M=w&&M[w]||M["@@iterator"],typeof M=="function"?M:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,N={};function j(M,A,L){this.props=M,this.context=A,this.refs=N,this.updater=L||R}j.prototype.isReactComponent={},j.prototype.setState=function(M,A){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,A,"setState")},j.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function O(){}O.prototype=j.prototype;function k(M,A,L){this.props=M,this.context=A,this.refs=N,this.updater=L||R}var Q=k.prototype=new O;Q.constructor=k,S(Q,j.prototype),Q.isPureReactComponent=!0;var I=Array.isArray;function Z(){}var B={H:null,A:null,T:null,S:null},G=Object.prototype.hasOwnProperty;function ue(M,A,L){var P=L.ref;return{$$typeof:n,type:M,key:A,ref:P!==void 0?P:null,props:L}}function ie(M,A){return ue(M.type,A,M.props)}function oe(M){return typeof M=="object"&&M!==null&&M.$$typeof===n}function fe(M){var A={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(L){return A[L]})}var ge=/\/+/g;function ae(M,A){return typeof M=="object"&&M!==null&&M.key!=null?fe(""+M.key):A.toString(36)}function W(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(Z,Z):(M.status="pending",M.then(function(A){M.status==="pending"&&(M.status="fulfilled",M.value=A)},function(A){M.status==="pending"&&(M.status="rejected",M.reason=A)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function T(M,A,L,P,K){var re=typeof M;(re==="undefined"||re==="boolean")&&(M=null);var Y=!1;if(M===null)Y=!0;else switch(re){case"bigint":case"string":case"number":Y=!0;break;case"object":switch(M.$$typeof){case n:case r:Y=!0;break;case b:return Y=M._init,T(Y(M._payload),A,L,P,K)}}if(Y)return K=K(M),Y=P===""?"."+ae(M,0):P,I(K)?(L="",Y!=null&&(L=Y.replace(ge,"$&/")+"/"),T(K,A,L,"",function(ve){return ve})):K!=null&&(oe(K)&&(K=ie(K,L+(K.key==null||M&&M.key===K.key?"":(""+K.key).replace(ge,"$&/")+"/")+Y)),A.push(K)),1;Y=0;var le=P===""?".":P+":";if(I(M))for(var ce=0;ce<M.length;ce++)P=M[ce],re=le+ae(P,ce),Y+=T(P,A,L,re,K);else if(ce=C(M),typeof ce=="function")for(M=ce.call(M),ce=0;!(P=M.next()).done;)P=P.value,re=le+ae(P,ce++),Y+=T(P,A,L,re,K);else if(re==="object"){if(typeof M.then=="function")return T(W(M),A,L,P,K);throw A=String(M),Error("Objects are not valid as a React child (found: "+(A==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":A)+"). If you meant to render a collection of children, use an array instead.")}return Y}function U(M,A,L){if(M==null)return M;var P=[],K=0;return T(M,P,"","",function(re){return A.call(L,re,K++)}),P}function _(M){if(M._status===-1){var A=M._result;A=A(),A.then(function(L){(M._status===0||M._status===-1)&&(M._status=1,M._result=L)},function(L){(M._status===0||M._status===-1)&&(M._status=2,M._result=L)}),M._status===-1&&(M._status=0,M._result=A)}if(M._status===1)return M._result.default;throw M._result}var F=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var A=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(A))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},ne={map:U,forEach:function(M,A,L){U(M,function(){A.apply(this,arguments)},L)},count:function(M){var A=0;return U(M,function(){A++}),A},toArray:function(M){return U(M,function(A){return A})||[]},only:function(M){if(!oe(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return Ee.Activity=p,Ee.Children=ne,Ee.Component=j,Ee.Fragment=o,Ee.Profiler=s,Ee.PureComponent=k,Ee.StrictMode=l,Ee.Suspense=y,Ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,Ee.__COMPILER_RUNTIME={__proto__:null,c:function(M){return B.H.useMemoCache(M)}},Ee.cache=function(M){return function(){return M.apply(null,arguments)}},Ee.cacheSignal=function(){return null},Ee.cloneElement=function(M,A,L){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var P=S({},M.props),K=M.key;if(A!=null)for(re in A.key!==void 0&&(K=""+A.key),A)!G.call(A,re)||re==="key"||re==="__self"||re==="__source"||re==="ref"&&A.ref===void 0||(P[re]=A[re]);var re=arguments.length-2;if(re===1)P.children=L;else if(1<re){for(var Y=Array(re),le=0;le<re;le++)Y[le]=arguments[le+2];P.children=Y}return ue(M.type,K,P)},Ee.createContext=function(M){return M={$$typeof:d,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:c,_context:M},M},Ee.createElement=function(M,A,L){var P,K={},re=null;if(A!=null)for(P in A.key!==void 0&&(re=""+A.key),A)G.call(A,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(K[P]=A[P]);var Y=arguments.length-2;if(Y===1)K.children=L;else if(1<Y){for(var le=Array(Y),ce=0;ce<Y;ce++)le[ce]=arguments[ce+2];K.children=le}if(M&&M.defaultProps)for(P in Y=M.defaultProps,Y)K[P]===void 0&&(K[P]=Y[P]);return ue(M,re,K)},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(M){return{$$typeof:m,render:M}},Ee.isValidElement=oe,Ee.lazy=function(M){return{$$typeof:b,_payload:{_status:-1,_result:M},_init:_}},Ee.memo=function(M,A){return{$$typeof:g,type:M,compare:A===void 0?null:A}},Ee.startTransition=function(M){var A=B.T,L={};B.T=L;try{var P=M(),K=B.S;K!==null&&K(L,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(Z,F)}catch(re){F(re)}finally{A!==null&&L.types!==null&&(A.types=L.types),B.T=A}},Ee.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},Ee.use=function(M){return B.H.use(M)},Ee.useActionState=function(M,A,L){return B.H.useActionState(M,A,L)},Ee.useCallback=function(M,A){return B.H.useCallback(M,A)},Ee.useContext=function(M){return B.H.useContext(M)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(M,A){return B.H.useDeferredValue(M,A)},Ee.useEffect=function(M,A){return B.H.useEffect(M,A)},Ee.useEffectEvent=function(M){return B.H.useEffectEvent(M)},Ee.useId=function(){return B.H.useId()},Ee.useImperativeHandle=function(M,A,L){return B.H.useImperativeHandle(M,A,L)},Ee.useInsertionEffect=function(M,A){return B.H.useInsertionEffect(M,A)},Ee.useLayoutEffect=function(M,A){return B.H.useLayoutEffect(M,A)},Ee.useMemo=function(M,A){return B.H.useMemo(M,A)},Ee.useOptimistic=function(M,A){return B.H.useOptimistic(M,A)},Ee.useReducer=function(M,A,L){return B.H.useReducer(M,A,L)},Ee.useRef=function(M){return B.H.useRef(M)},Ee.useState=function(M){return B.H.useState(M)},Ee.useSyncExternalStore=function(M,A,L){return B.H.useSyncExternalStore(M,A,L)},Ee.useTransition=function(){return B.H.useTransition()},Ee.version="19.2.3",Ee}var Zv;function Wd(){return Zv||(Zv=1,nd.exports=lE()),nd.exports}var v=Wd();const se=hu(v),eh=nE({__proto__:null,default:se},[v]);var ad={exports:{}},Yi={},rd={exports:{}},od={};var Jv;function sE(){return Jv||(Jv=1,(function(n){function r(T,U){var _=T.length;T.push(U);e:for(;0<_;){var F=_-1>>>1,ne=T[F];if(0<s(ne,U))T[F]=U,T[_]=ne,_=F;else break e}}function o(T){return T.length===0?null:T[0]}function l(T){if(T.length===0)return null;var U=T[0],_=T.pop();if(_!==U){T[0]=_;e:for(var F=0,ne=T.length,M=ne>>>1;F<M;){var A=2*(F+1)-1,L=T[A],P=A+1,K=T[P];if(0>s(L,_))P<ne&&0>s(K,L)?(T[F]=K,T[P]=_,F=P):(T[F]=L,T[A]=_,F=A);else if(P<ne&&0>s(K,_))T[F]=K,T[P]=_,F=P;else break e}}return U}function s(T,U){var _=T.sortIndex-U.sortIndex;return _!==0?_:T.id-U.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var y=[],g=[],b=1,p=null,w=3,C=!1,R=!1,S=!1,N=!1,j=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function Q(T){for(var U=o(g);U!==null;){if(U.callback===null)l(g);else if(U.startTime<=T)l(g),U.sortIndex=U.expirationTime,r(y,U);else break;U=o(g)}}function I(T){if(S=!1,Q(T),!R)if(o(y)!==null)R=!0,Z||(Z=!0,fe());else{var U=o(g);U!==null&&W(I,U.startTime-T)}}var Z=!1,B=-1,G=5,ue=-1;function ie(){return N?!0:!(n.unstable_now()-ue<G)}function oe(){if(N=!1,Z){var T=n.unstable_now();ue=T;var U=!0;try{e:{R=!1,S&&(S=!1,O(B),B=-1),C=!0;var _=w;try{t:{for(Q(T),p=o(y);p!==null&&!(p.expirationTime>T&&ie());){var F=p.callback;if(typeof F=="function"){p.callback=null,w=p.priorityLevel;var ne=F(p.expirationTime<=T);if(T=n.unstable_now(),typeof ne=="function"){p.callback=ne,Q(T),U=!0;break t}p===o(y)&&l(y),Q(T)}else l(y);p=o(y)}if(p!==null)U=!0;else{var M=o(g);M!==null&&W(I,M.startTime-T),U=!1}}break e}finally{p=null,w=_,C=!1}U=void 0}}finally{U?fe():Z=!1}}}var fe;if(typeof k=="function")fe=function(){k(oe)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,ae=ge.port2;ge.port1.onmessage=oe,fe=function(){ae.postMessage(null)}}else fe=function(){j(oe,0)};function W(T,U){B=j(function(){T(n.unstable_now())},U)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(T){T.callback=null},n.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<T?Math.floor(1e3/T):5},n.unstable_getCurrentPriorityLevel=function(){return w},n.unstable_next=function(T){switch(w){case 1:case 2:case 3:var U=3;break;default:U=w}var _=w;w=U;try{return T()}finally{w=_}},n.unstable_requestPaint=function(){N=!0},n.unstable_runWithPriority=function(T,U){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var _=w;w=T;try{return U()}finally{w=_}},n.unstable_scheduleCallback=function(T,U,_){var F=n.unstable_now();switch(typeof _=="object"&&_!==null?(_=_.delay,_=typeof _=="number"&&0<_?F+_:F):_=F,T){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=_+ne,T={id:b++,callback:U,priorityLevel:T,startTime:_,expirationTime:ne,sortIndex:-1},_>F?(T.sortIndex=_,r(g,T),o(y)===null&&T===o(g)&&(S?(O(B),B=-1):S=!0,W(I,_-F))):(T.sortIndex=ne,r(y,T),R||C||(R=!0,Z||(Z=!0,fe()))),T},n.unstable_shouldYield=ie,n.unstable_wrapCallback=function(T){var U=w;return function(){var _=w;w=U;try{return T.apply(this,arguments)}finally{w=_}}}})(od)),od}var Wv;function uE(){return Wv||(Wv=1,rd.exports=sE()),rd.exports}var id={exports:{}},Rt={};var ey;function cE(){if(ey)return Rt;ey=1;var n=Wd();function r(y){var g="https://react.dev/errors/"+y;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)g+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+y+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var l={d:{f:o,r:function(){throw Error(r(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},s=Symbol.for("react.portal");function c(y,g,b){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:p==null?null:""+p,children:y,containerInfo:g,implementation:b}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(y,g){if(y==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Rt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,Rt.createPortal=function(y,g){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(r(299));return c(y,g,null,b)},Rt.flushSync=function(y){var g=d.T,b=l.p;try{if(d.T=null,l.p=2,y)return y()}finally{d.T=g,l.p=b,l.d.f()}},Rt.preconnect=function(y,g){typeof y=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,l.d.C(y,g))},Rt.prefetchDNS=function(y){typeof y=="string"&&l.d.D(y)},Rt.preinit=function(y,g){if(typeof y=="string"&&g&&typeof g.as=="string"){var b=g.as,p=m(b,g.crossOrigin),w=typeof g.integrity=="string"?g.integrity:void 0,C=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?l.d.S(y,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:p,integrity:w,fetchPriority:C}):b==="script"&&l.d.X(y,{crossOrigin:p,integrity:w,fetchPriority:C,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Rt.preinitModule=function(y,g){if(typeof y=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=m(g.as,g.crossOrigin);l.d.M(y,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&l.d.M(y)},Rt.preload=function(y,g){if(typeof y=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,p=m(b,g.crossOrigin);l.d.L(y,b,{crossOrigin:p,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},Rt.preloadModule=function(y,g){if(typeof y=="string")if(g){var b=m(g.as,g.crossOrigin);l.d.m(y,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else l.d.m(y)},Rt.requestFormReset=function(y){l.d.r(y)},Rt.unstable_batchedUpdates=function(y,g){return y(g)},Rt.useFormState=function(y,g,b){return d.H.useFormState(y,g,b)},Rt.useFormStatus=function(){return d.H.useHostTransitionStatus()},Rt.version="19.2.3",Rt}var ty;function hb(){if(ty)return id.exports;ty=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),id.exports=cE(),id.exports}var ny;function fE(){if(ny)return Yi;ny=1;var n=uE(),r=Wd(),o=hb();function l(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(c(e)!==e)throw Error(l(188))}function g(e){var t=e.alternate;if(!t){if(t=c(e),t===null)throw Error(l(188));return t!==e?null:e}for(var a=e,i=t;;){var u=a.return;if(u===null)break;var f=u.alternate;if(f===null){if(i=u.return,i!==null){a=i;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===a)return y(u),e;if(f===i)return y(u),t;f=f.sibling}throw Error(l(188))}if(a.return!==i.return)a=u,i=f;else{for(var x=!1,E=u.child;E;){if(E===a){x=!0,a=u,i=f;break}if(E===i){x=!0,i=u,a=f;break}E=E.sibling}if(!x){for(E=f.child;E;){if(E===a){x=!0,a=f,i=u;break}if(E===i){x=!0,i=f,a=u;break}E=E.sibling}if(!x)throw Error(l(189))}}if(a.alternate!==i)throw Error(l(190))}if(a.tag!==3)throw Error(l(188));return a.stateNode.current===a?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,w=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),k=Symbol.for("react.context"),Q=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),ue=Symbol.for("react.activity"),ie=Symbol.for("react.memo_cache_sentinel"),oe=Symbol.iterator;function fe(e){return e===null||typeof e!="object"?null:(e=oe&&e[oe]||e["@@iterator"],typeof e=="function"?e:null)}var ge=Symbol.for("react.client.reference");function ae(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case S:return"Fragment";case j:return"Profiler";case N:return"StrictMode";case I:return"Suspense";case Z:return"SuspenseList";case ue:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case k:return e.displayName||"Context";case O:return(e._context.displayName||"Context")+".Consumer";case Q:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case B:return t=e.displayName||null,t!==null?t:ae(e.type)||"Memo";case G:t=e._payload,e=e._init;try{return ae(e(t))}catch{}}return null}var W=Array.isArray,T=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_={pending:!1,data:null,method:null,action:null},F=[],ne=-1;function M(e){return{current:e}}function A(e){0>ne||(e.current=F[ne],F[ne]=null,ne--)}function L(e,t){ne++,F[ne]=e.current,e.current=t}var P=M(null),K=M(null),re=M(null),Y=M(null);function le(e,t){switch(L(re,t),L(K,e),L(P,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?gv(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=gv(t),e=vv(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}A(P),L(P,e)}function ce(){A(P),A(K),A(re)}function ve(e){e.memoizedState!==null&&L(Y,e);var t=P.current,a=vv(t,e.type);t!==a&&(L(K,e),L(P,a))}function we(e){K.current===e&&(A(P),A(K)),Y.current===e&&(A(Y),qi._currentValue=_)}var Ce,et;function ut(e){if(Ce===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ce=t&&t[1]||"",et=-1<a.stack.indexOf(`
3
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
4
+ `+Ce+e+et}var Qn=!1;function Dn(e,t){if(!e||Qn)return"";Qn=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var te=function(){throw Error()};if(Object.defineProperty(te.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(te,[])}catch(X){var V=X}Reflect.construct(e,[],te)}else{try{te.call()}catch(X){V=X}e.call(te.prototype)}}else{try{throw Error()}catch(X){V=X}(te=e())&&typeof te.catch=="function"&&te.catch(function(){})}}catch(X){if(X&&V&&typeof X.stack=="string")return[X.stack,V.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=i.DetermineComponentFrameRoot(),x=f[0],E=f[1];if(x&&E){var D=x.split(`
5
+ `),$=E.split(`
6
+ `);for(u=i=0;i<D.length&&!D[i].includes("DetermineComponentFrameRoot");)i++;for(;u<$.length&&!$[u].includes("DetermineComponentFrameRoot");)u++;if(i===D.length||u===$.length)for(i=D.length-1,u=$.length-1;1<=i&&0<=u&&D[i]!==$[u];)u--;for(;1<=i&&0<=u;i--,u--)if(D[i]!==$[u]){if(i!==1||u!==1)do if(i--,u--,0>u||D[i]!==$[u]){var J=`
7
+ `+D[i].replace(" at new "," at ");return e.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",e.displayName)),J}while(1<=i&&0<=u);break}}}finally{Qn=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ut(a):""}function En(e,t){switch(e.tag){case 26:case 27:case 5:return ut(e.type);case 16:return ut("Lazy");case 13:return e.child!==t&&t!==null?ut("Suspense Fallback"):ut("Suspense");case 19:return ut("SuspenseList");case 0:case 15:return Dn(e.type,!1);case 11:return Dn(e.type.render,!1);case 1:return Dn(e.type,!0);case 31:return ut("Activity");default:return""}}function Zo(e){try{var t="",a=null;do t+=En(e,a),a=e,e=e.return;while(e);return t}catch(i){return`
8
+ Error generating stack: `+i.message+`
9
+ `+i.stack}}var Qt=Object.prototype.hasOwnProperty,Jo=n.unstable_scheduleCallback,Wo=n.unstable_cancelCallback,Tt=n.unstable_shouldYield,wa=n.unstable_requestPaint,jt=n.unstable_now,$u=n.unstable_getCurrentPriorityLevel,ir=n.unstable_ImmediatePriority,vl=n.unstable_UserBlockingPriority,lr=n.unstable_NormalPriority,ei=n.unstable_LowPriority,Kn=n.unstable_IdlePriority,yl=n.log,Sa=n.unstable_setDisableYieldValue,sr=null,Mt=null;function Cn(e){if(typeof yl=="function"&&Sa(e),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(sr,e)}catch{}}var Et=Math.clz32?Math.clz32:zn,Vu=Math.log,ti=Math.LN2;function zn(e){return e>>>=0,e===0?32:31-(Vu(e)/ti|0)|0}var Pr=256,qr=262144,ur=4194304;function kn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Se(e,t,a){var i=e.pendingLanes;if(i===0)return 0;var u=0,f=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var E=i&134217727;return E!==0?(i=E&~f,i!==0?u=kn(i):(x&=E,x!==0?u=kn(x):a||(a=E&~e,a!==0&&(u=kn(a))))):(E=i&~f,E!==0?u=kn(E):x!==0?u=kn(x):a||(a=i&~e,a!==0&&(u=kn(a)))),u===0?0:t!==0&&t!==u&&(t&f)===0&&(f=u&-u,a=t&-t,f>=a||f===32&&(a&4194048)!==0)?t:u}function Ke(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ht(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ct(){var e=ur;return ur<<=1,(ur&62914560)===0&&(ur=4194304),e}function Ea(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function We(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function kt(e,t,a,i,u,f){var x=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var E=e.entanglements,D=e.expirationTimes,$=e.hiddenUpdates;for(a=x&~a;0<a;){var J=31-Et(a),te=1<<J;E[J]=0,D[J]=-1;var V=$[J];if(V!==null)for($[J]=null,J=0;J<V.length;J++){var X=V[J];X!==null&&(X.lane&=-536870913)}a&=~te}i!==0&&cr(e,i,0),f!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=f&~(x&~t))}function cr(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-Et(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|a&261930}function Lt(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var i=31-Et(a),u=1<<i;u&t|e[i]&t&&(e[i]|=t),a&=~u}}function Ut(e,t){var a=t&-t;return a=(a&42)!==0?1:$r(a),(a&(e.suspendedLanes|t))!==0?0:a}function $r(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Rn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Fu(){var e=U.p;return e!==0?e:(e=window.event,e===void 0?32:Pv(e.type))}function nm(e,t){var a=U.p;try{return U.p=e,t()}finally{U.p=a}}var Ca=Math.random().toString(36).slice(2),gt="__reactFiber$"+Ca,Ht="__reactProps$"+Ca,Vr="__reactContainer$"+Ca,Gu="__reactEvents$"+Ca,Gw="__reactListeners$"+Ca,Yw="__reactHandles$"+Ca,am="__reactResources$"+Ca,ni="__reactMarker$"+Ca;function Yu(e){delete e[gt],delete e[Ht],delete e[Gu],delete e[Gw],delete e[Yw]}function Fr(e){var t=e[gt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Vr]||a[gt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Cv(e);e!==null;){if(a=e[gt])return a;e=Cv(e)}return t}e=a,a=e.parentNode}return null}function Gr(e){if(e=e[gt]||e[Vr]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ai(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(l(33))}function Yr(e){var t=e[am];return t||(t=e[am]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function mt(e){e[ni]=!0}var rm=new Set,om={};function fr(e,t){Ir(e,t),Ir(e+"Capture",t)}function Ir(e,t){for(om[e]=t,e=0;e<t.length;e++)rm.add(t[e])}var Iw=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),im={},lm={};function Qw(e){return Qt.call(lm,e)?!0:Qt.call(im,e)?!1:Iw.test(e)?lm[e]=!0:(im[e]=!0,!1)}function bl(e,t,a){if(Qw(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function xl(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Xn(e,t,a,i){if(i===null)e.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+i)}}function ln(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Kw(e,t,a){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var u=i.get,f=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(x){a=""+x,f.call(this,x)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return a},setValue:function(x){a=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Iu(e){if(!e._valueTracker){var t=sm(e)?"checked":"value";e._valueTracker=Kw(e,t,""+e[t])}}function um(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),i="";return e&&(i=sm(e)?e.checked?"true":"false":e.value),e=i,e!==a?(t.setValue(e),!0):!1}function wl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Xw=/[\n"\\]/g;function sn(e){return e.replace(Xw,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Qu(e,t,a,i,u,f,x,E){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+ln(t)):e.value!==""+ln(t)&&(e.value=""+ln(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?Ku(e,x,ln(t)):a!=null?Ku(e,x,ln(a)):i!=null&&e.removeAttribute("value"),u==null&&f!=null&&(e.defaultChecked=!!f),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+ln(E):e.removeAttribute("name")}function cm(e,t,a,i,u,f,x,E){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){Iu(e);return}a=a!=null?""+ln(a):"",t=t!=null?""+ln(t):a,E||t===e.value||(e.value=t),e.defaultValue=t}i=i??u,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=E?e.checked:!!i,e.defaultChecked=!!i,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),Iu(e)}function Ku(e,t,a){t==="number"&&wl(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Qr(e,t,a,i){if(e=e.options,t){t={};for(var u=0;u<a.length;u++)t["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=t.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&i&&(e[a].defaultSelected=!0)}else{for(a=""+ln(a),t=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,i&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function fm(e,t,a){if(t!=null&&(t=""+ln(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+ln(a):""}function dm(e,t,a,i){if(t==null){if(i!=null){if(a!=null)throw Error(l(92));if(W(i)){if(1<i.length)throw Error(l(93));i=i[0]}a=i}a==null&&(a=""),t=a}a=ln(t),e.defaultValue=a,i=e.textContent,i===a&&i!==""&&i!==null&&(e.value=i),Iu(e)}function Kr(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Zw=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function hm(e,t,a){var i=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,a):typeof a!="number"||a===0||Zw.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function mm(e,t,a){if(t!=null&&typeof t!="object")throw Error(l(62));if(e=e.style,a!=null){for(var i in a)!a.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var u in t)i=t[u],t.hasOwnProperty(u)&&a[u]!==i&&hm(e,u,i)}else for(var f in t)t.hasOwnProperty(f)&&hm(e,f,t[f])}function Xu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Jw=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Ww=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Sl(e){return Ww.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zn(){}var Zu=null;function Ju(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xr=null,Zr=null;function pm(e){var t=Gr(e);if(t&&(e=t.stateNode)){var a=e[Ht]||null;e:switch(e=t.stateNode,t.type){case"input":if(Qu(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+sn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var i=a[t];if(i!==e&&i.form===e.form){var u=i[Ht]||null;if(!u)throw Error(l(90));Qu(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<a.length;t++)i=a[t],i.form===e.form&&um(i)}break e;case"textarea":fm(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Qr(e,!!a.multiple,t,!1)}}}var Wu=!1;function gm(e,t,a){if(Wu)return e(t,a);Wu=!0;try{var i=e(t);return i}finally{if(Wu=!1,(Xr!==null||Zr!==null)&&(us(),Xr&&(t=Xr,e=Zr,Zr=Xr=null,pm(t),e)))for(t=0;t<e.length;t++)pm(e[t])}}function ri(e,t){var a=e.stateNode;if(a===null)return null;var i=a[Ht]||null;if(i===null)return null;a=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(l(231,t,typeof a));return a}var Jn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ec=!1;if(Jn)try{var oi={};Object.defineProperty(oi,"passive",{get:function(){ec=!0}}),window.addEventListener("test",oi,oi),window.removeEventListener("test",oi,oi)}catch{ec=!1}var Ra=null,tc=null,El=null;function vm(){if(El)return El;var e,t=tc,a=t.length,i,u="value"in Ra?Ra.value:Ra.textContent,f=u.length;for(e=0;e<a&&t[e]===u[e];e++);var x=a-e;for(i=1;i<=x&&t[a-i]===u[f-i];i++);return El=u.slice(e,1<i?1-i:void 0)}function Cl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Rl(){return!0}function ym(){return!1}function Bt(e){function t(a,i,u,f,x){this._reactName=a,this._targetInst=u,this.type=i,this.nativeEvent=f,this.target=x,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(a=e[E],this[E]=a?a(f):f[E]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Rl:ym,this.isPropagationStopped=ym,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Rl)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Rl)},persist:function(){},isPersistent:Rl}),t}var dr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nl=Bt(dr),ii=p({},dr,{view:0,detail:0}),eS=Bt(ii),nc,ac,li,Tl=p({},ii,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:oc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==li&&(li&&e.type==="mousemove"?(nc=e.screenX-li.screenX,ac=e.screenY-li.screenY):ac=nc=0,li=e),nc)},movementY:function(e){return"movementY"in e?e.movementY:ac}}),bm=Bt(Tl),tS=p({},Tl,{dataTransfer:0}),nS=Bt(tS),aS=p({},ii,{relatedTarget:0}),rc=Bt(aS),rS=p({},dr,{animationName:0,elapsedTime:0,pseudoElement:0}),oS=Bt(rS),iS=p({},dr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),lS=Bt(iS),sS=p({},dr,{data:0}),xm=Bt(sS),uS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cS={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},fS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=fS[e])?!!t[e]:!1}function oc(){return dS}var hS=p({},ii,{key:function(e){if(e.key){var t=uS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Cl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?cS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:oc,charCode:function(e){return e.type==="keypress"?Cl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Cl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),mS=Bt(hS),pS=p({},Tl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wm=Bt(pS),gS=p({},ii,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:oc}),vS=Bt(gS),yS=p({},dr,{propertyName:0,elapsedTime:0,pseudoElement:0}),bS=Bt(yS),xS=p({},Tl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),wS=Bt(xS),SS=p({},dr,{newState:0,oldState:0}),ES=Bt(SS),CS=[9,13,27,32],ic=Jn&&"CompositionEvent"in window,si=null;Jn&&"documentMode"in document&&(si=document.documentMode);var RS=Jn&&"TextEvent"in window&&!si,Sm=Jn&&(!ic||si&&8<si&&11>=si),Em=" ",Cm=!1;function Rm(e,t){switch(e){case"keyup":return CS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Jr=!1;function NS(e,t){switch(e){case"compositionend":return Nm(t);case"keypress":return t.which!==32?null:(Cm=!0,Em);case"textInput":return e=t.data,e===Em&&Cm?null:e;default:return null}}function TS(e,t){if(Jr)return e==="compositionend"||!ic&&Rm(e,t)?(e=vm(),El=tc=Ra=null,Jr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Sm&&t.locale!=="ko"?null:t.data;default:return null}}var jS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Tm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!jS[e.type]:t==="textarea"}function jm(e,t,a,i){Xr?Zr?Zr.push(i):Zr=[i]:Xr=i,t=gs(t,"onChange"),0<t.length&&(a=new Nl("onChange","change",null,a,i),e.push({event:a,listeners:t}))}var ui=null,ci=null;function MS(e){cv(e,0)}function jl(e){var t=ai(e);if(um(t))return e}function Mm(e,t){if(e==="change")return t}var Am=!1;if(Jn){var lc;if(Jn){var sc="oninput"in document;if(!sc){var Om=document.createElement("div");Om.setAttribute("oninput","return;"),sc=typeof Om.oninput=="function"}lc=sc}else lc=!1;Am=lc&&(!document.documentMode||9<document.documentMode)}function _m(){ui&&(ui.detachEvent("onpropertychange",Dm),ci=ui=null)}function Dm(e){if(e.propertyName==="value"&&jl(ci)){var t=[];jm(t,ci,e,Ju(e)),gm(MS,t)}}function AS(e,t,a){e==="focusin"?(_m(),ui=t,ci=a,ui.attachEvent("onpropertychange",Dm)):e==="focusout"&&_m()}function OS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return jl(ci)}function _S(e,t){if(e==="click")return jl(t)}function DS(e,t){if(e==="input"||e==="change")return jl(t)}function zS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Kt=typeof Object.is=="function"?Object.is:zS;function fi(e,t){if(Kt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(i=0;i<a.length;i++){var u=a[i];if(!Qt.call(t,u)||!Kt(e[u],t[u]))return!1}return!0}function zm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function km(e,t){var a=zm(e);e=0;for(var i;a;){if(a.nodeType===3){if(i=e+a.textContent.length,e<=t&&i>=t)return{node:a,offset:t-e};e=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=zm(a)}}function Lm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Lm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Um(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=wl(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=wl(e.document)}return t}function uc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var kS=Jn&&"documentMode"in document&&11>=document.documentMode,Wr=null,cc=null,di=null,fc=!1;function Hm(e,t,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;fc||Wr==null||Wr!==wl(i)||(i=Wr,"selectionStart"in i&&uc(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),di&&fi(di,i)||(di=i,i=gs(cc,"onSelect"),0<i.length&&(t=new Nl("onSelect","select",null,t,a),e.push({event:t,listeners:i}),t.target=Wr)))}function hr(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var eo={animationend:hr("Animation","AnimationEnd"),animationiteration:hr("Animation","AnimationIteration"),animationstart:hr("Animation","AnimationStart"),transitionrun:hr("Transition","TransitionRun"),transitionstart:hr("Transition","TransitionStart"),transitioncancel:hr("Transition","TransitionCancel"),transitionend:hr("Transition","TransitionEnd")},dc={},Bm={};Jn&&(Bm=document.createElement("div").style,"AnimationEvent"in window||(delete eo.animationend.animation,delete eo.animationiteration.animation,delete eo.animationstart.animation),"TransitionEvent"in window||delete eo.transitionend.transition);function mr(e){if(dc[e])return dc[e];if(!eo[e])return e;var t=eo[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Bm)return dc[e]=t[a];return e}var Pm=mr("animationend"),qm=mr("animationiteration"),$m=mr("animationstart"),LS=mr("transitionrun"),US=mr("transitionstart"),HS=mr("transitioncancel"),Vm=mr("transitionend"),Fm=new Map,hc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");hc.push("scrollEnd");function Nn(e,t){Fm.set(e,t),fr(t,[e])}var Ml=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},un=[],to=0,mc=0;function Al(){for(var e=to,t=mc=to=0;t<e;){var a=un[t];un[t++]=null;var i=un[t];un[t++]=null;var u=un[t];un[t++]=null;var f=un[t];if(un[t++]=null,i!==null&&u!==null){var x=i.pending;x===null?u.next=u:(u.next=x.next,x.next=u),i.pending=u}f!==0&&Gm(a,u,f)}}function Ol(e,t,a,i){un[to++]=e,un[to++]=t,un[to++]=a,un[to++]=i,mc|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function pc(e,t,a,i){return Ol(e,t,a,i),_l(e)}function pr(e,t){return Ol(e,null,null,t),_l(e)}function Gm(e,t,a){e.lanes|=a;var i=e.alternate;i!==null&&(i.lanes|=a);for(var u=!1,f=e.return;f!==null;)f.childLanes|=a,i=f.alternate,i!==null&&(i.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(u=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,u&&t!==null&&(u=31-Et(a),e=f.hiddenUpdates,i=e[u],i===null?e[u]=[t]:i.push(t),t.lane=a|536870912),f):null}function _l(e){if(50<zi)throw zi=0,Rf=null,Error(l(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var no={};function BS(e,t,a,i){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xt(e,t,a,i){return new BS(e,t,a,i)}function gc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wn(e,t){var a=e.alternate;return a===null?(a=Xt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Ym(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Dl(e,t,a,i,u,f){var x=0;if(i=e,typeof e=="function")gc(e)&&(x=1);else if(typeof e=="string")x=F1(e,a,P.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ue:return e=Xt(31,a,t,u),e.elementType=ue,e.lanes=f,e;case S:return gr(a.children,u,f,t);case N:x=8,u|=24;break;case j:return e=Xt(12,a,t,u|2),e.elementType=j,e.lanes=f,e;case I:return e=Xt(13,a,t,u),e.elementType=I,e.lanes=f,e;case Z:return e=Xt(19,a,t,u),e.elementType=Z,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case k:x=10;break e;case O:x=9;break e;case Q:x=11;break e;case B:x=14;break e;case G:x=16,i=null;break e}x=29,a=Error(l(130,e===null?"null":typeof e,"")),i=null}return t=Xt(x,a,t,u),t.elementType=e,t.type=i,t.lanes=f,t}function gr(e,t,a,i){return e=Xt(7,e,i,t),e.lanes=a,e}function vc(e,t,a){return e=Xt(6,e,null,t),e.lanes=a,e}function Im(e){var t=Xt(18,null,null,0);return t.stateNode=e,t}function yc(e,t,a){return t=Xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Qm=new WeakMap;function cn(e,t){if(typeof e=="object"&&e!==null){var a=Qm.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Zo(t)},Qm.set(e,t),t)}return{value:e,source:t,stack:Zo(t)}}var ao=[],ro=0,zl=null,hi=0,fn=[],dn=0,Na=null,Ln=1,Un="";function ea(e,t){ao[ro++]=hi,ao[ro++]=zl,zl=e,hi=t}function Km(e,t,a){fn[dn++]=Ln,fn[dn++]=Un,fn[dn++]=Na,Na=e;var i=Ln;e=Un;var u=32-Et(i)-1;i&=~(1<<u),a+=1;var f=32-Et(t)+u;if(30<f){var x=u-u%5;f=(i&(1<<x)-1).toString(32),i>>=x,u-=x,Ln=1<<32-Et(t)+u|a<<u|i,Un=f+e}else Ln=1<<f|a<<u|i,Un=e}function bc(e){e.return!==null&&(ea(e,1),Km(e,1,0))}function xc(e){for(;e===zl;)zl=ao[--ro],ao[ro]=null,hi=ao[--ro],ao[ro]=null;for(;e===Na;)Na=fn[--dn],fn[dn]=null,Un=fn[--dn],fn[dn]=null,Ln=fn[--dn],fn[dn]=null}function Xm(e,t){fn[dn++]=Ln,fn[dn++]=Un,fn[dn++]=Na,Ln=t.id,Un=t.overflow,Na=e}var vt=null,Ge=null,_e=!1,Ta=null,hn=!1,wc=Error(l(519));function ja(e){var t=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw mi(cn(t,e)),wc}function Zm(e){var t=e.stateNode,a=e.type,i=e.memoizedProps;switch(t[gt]=e,t[Ht]=i,a){case"dialog":Me("cancel",t),Me("close",t);break;case"iframe":case"object":case"embed":Me("load",t);break;case"video":case"audio":for(a=0;a<Li.length;a++)Me(Li[a],t);break;case"source":Me("error",t);break;case"img":case"image":case"link":Me("error",t),Me("load",t);break;case"details":Me("toggle",t);break;case"input":Me("invalid",t),cm(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Me("invalid",t);break;case"textarea":Me("invalid",t),dm(t,i.value,i.defaultValue,i.children)}a=i.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||i.suppressHydrationWarning===!0||mv(t.textContent,a)?(i.popover!=null&&(Me("beforetoggle",t),Me("toggle",t)),i.onScroll!=null&&Me("scroll",t),i.onScrollEnd!=null&&Me("scrollend",t),i.onClick!=null&&(t.onclick=Zn),t=!0):t=!1,t||ja(e,!0)}function Jm(e){for(vt=e.return;vt;)switch(vt.tag){case 5:case 31:case 13:hn=!1;return;case 27:case 3:hn=!0;return;default:vt=vt.return}}function oo(e){if(e!==vt)return!1;if(!_e)return Jm(e),_e=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Pf(e.type,e.memoizedProps)),a=!a),a&&Ge&&ja(e),Jm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Ge=Ev(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Ge=Ev(e)}else t===27?(t=Ge,$a(e.type)?(e=Gf,Gf=null,Ge=e):Ge=t):Ge=vt?pn(e.stateNode.nextSibling):null;return!0}function vr(){Ge=vt=null,_e=!1}function Sc(){var e=Ta;return e!==null&&(Vt===null?Vt=e:Vt.push.apply(Vt,e),Ta=null),e}function mi(e){Ta===null?Ta=[e]:Ta.push(e)}var Ec=M(null),yr=null,ta=null;function Ma(e,t,a){L(Ec,t._currentValue),t._currentValue=a}function na(e){e._currentValue=Ec.current,A(Ec)}function Cc(e,t,a){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===a)break;e=e.return}}function Rc(e,t,a,i){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var f=u.dependencies;if(f!==null){var x=u.child;f=f.firstContext;e:for(;f!==null;){var E=f;f=u;for(var D=0;D<t.length;D++)if(E.context===t[D]){f.lanes|=a,E=f.alternate,E!==null&&(E.lanes|=a),Cc(f.return,a,e),i||(x=null);break e}f=E.next}}else if(u.tag===18){if(x=u.return,x===null)throw Error(l(341));x.lanes|=a,f=x.alternate,f!==null&&(f.lanes|=a),Cc(x,a,e),x=null}else x=u.child;if(x!==null)x.return=u;else for(x=u;x!==null;){if(x===e){x=null;break}if(u=x.sibling,u!==null){u.return=x.return,x=u;break}x=x.return}u=x}}function io(e,t,a,i){e=null;for(var u=t,f=!1;u!==null;){if(!f){if((u.flags&524288)!==0)f=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var x=u.alternate;if(x===null)throw Error(l(387));if(x=x.memoizedProps,x!==null){var E=u.type;Kt(u.pendingProps.value,x.value)||(e!==null?e.push(E):e=[E])}}else if(u===Y.current){if(x=u.alternate,x===null)throw Error(l(387));x.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(qi):e=[qi])}u=u.return}e!==null&&Rc(t,e,a,i),t.flags|=262144}function kl(e){for(e=e.firstContext;e!==null;){if(!Kt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function br(e){yr=e,ta=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function yt(e){return Wm(yr,e)}function Ll(e,t){return yr===null&&br(e),Wm(e,t)}function Wm(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},ta===null){if(e===null)throw Error(l(308));ta=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ta=ta.next=t;return a}var PS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},qS=n.unstable_scheduleCallback,$S=n.unstable_NormalPriority,ot={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Nc(){return{controller:new PS,data:new Map,refCount:0}}function pi(e){e.refCount--,e.refCount===0&&qS($S,function(){e.controller.abort()})}var gi=null,Tc=0,lo=0,so=null;function VS(e,t){if(gi===null){var a=gi=[];Tc=0,lo=Of(),so={status:"pending",value:void 0,then:function(i){a.push(i)}}}return Tc++,t.then(ep,ep),t}function ep(){if(--Tc===0&&gi!==null){so!==null&&(so.status="fulfilled");var e=gi;gi=null,lo=0,so=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function FS(e,t){var a=[],i={status:"pending",value:null,reason:null,then:function(u){a.push(u)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var u=0;u<a.length;u++)(0,a[u])(t)},function(u){for(i.status="rejected",i.reason=u,u=0;u<a.length;u++)(0,a[u])(void 0)}),i}var tp=T.S;T.S=function(e,t){Hg=jt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&VS(e,t),tp!==null&&tp(e,t)};var xr=M(null);function jc(){var e=xr.current;return e!==null?e:Ve.pooledCache}function Ul(e,t){t===null?L(xr,xr.current):L(xr,t.pool)}function np(){var e=jc();return e===null?null:{parent:ot._currentValue,pool:e}}var uo=Error(l(460)),Mc=Error(l(474)),Hl=Error(l(542)),Bl={then:function(){}};function ap(e){return e=e.status,e==="fulfilled"||e==="rejected"}function rp(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Zn,Zn),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ip(e),e;default:if(typeof t.status=="string")t.then(Zn,Zn);else{if(e=Ve,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=i}},function(i){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ip(e),e}throw Sr=t,uo}}function wr(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Sr=a,uo):a}}var Sr=null;function op(){if(Sr===null)throw Error(l(459));var e=Sr;return Sr=null,e}function ip(e){if(e===uo||e===Hl)throw Error(l(483))}var co=null,vi=0;function Pl(e){var t=vi;return vi+=1,co===null&&(co=[]),rp(co,e,t)}function yi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ql(e,t){throw t.$$typeof===w?Error(l(525)):(e=Object.prototype.toString.call(t),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function lp(e){function t(H,z){if(e){var q=H.deletions;q===null?(H.deletions=[z],H.flags|=16):q.push(z)}}function a(H,z){if(!e)return null;for(;z!==null;)t(H,z),z=z.sibling;return null}function i(H){for(var z=new Map;H!==null;)H.key!==null?z.set(H.key,H):z.set(H.index,H),H=H.sibling;return z}function u(H,z){return H=Wn(H,z),H.index=0,H.sibling=null,H}function f(H,z,q){return H.index=q,e?(q=H.alternate,q!==null?(q=q.index,q<z?(H.flags|=67108866,z):q):(H.flags|=67108866,z)):(H.flags|=1048576,z)}function x(H){return e&&H.alternate===null&&(H.flags|=67108866),H}function E(H,z,q,ee){return z===null||z.tag!==6?(z=vc(q,H.mode,ee),z.return=H,z):(z=u(z,q),z.return=H,z)}function D(H,z,q,ee){var be=q.type;return be===S?J(H,z,q.props.children,ee,q.key):z!==null&&(z.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===G&&wr(be)===z.type)?(z=u(z,q.props),yi(z,q),z.return=H,z):(z=Dl(q.type,q.key,q.props,null,H.mode,ee),yi(z,q),z.return=H,z)}function $(H,z,q,ee){return z===null||z.tag!==4||z.stateNode.containerInfo!==q.containerInfo||z.stateNode.implementation!==q.implementation?(z=yc(q,H.mode,ee),z.return=H,z):(z=u(z,q.children||[]),z.return=H,z)}function J(H,z,q,ee,be){return z===null||z.tag!==7?(z=gr(q,H.mode,ee,be),z.return=H,z):(z=u(z,q),z.return=H,z)}function te(H,z,q){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=vc(""+z,H.mode,q),z.return=H,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case C:return q=Dl(z.type,z.key,z.props,null,H.mode,q),yi(q,z),q.return=H,q;case R:return z=yc(z,H.mode,q),z.return=H,z;case G:return z=wr(z),te(H,z,q)}if(W(z)||fe(z))return z=gr(z,H.mode,q,null),z.return=H,z;if(typeof z.then=="function")return te(H,Pl(z),q);if(z.$$typeof===k)return te(H,Ll(H,z),q);ql(H,z)}return null}function V(H,z,q,ee){var be=z!==null?z.key:null;if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return be!==null?null:E(H,z,""+q,ee);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case C:return q.key===be?D(H,z,q,ee):null;case R:return q.key===be?$(H,z,q,ee):null;case G:return q=wr(q),V(H,z,q,ee)}if(W(q)||fe(q))return be!==null?null:J(H,z,q,ee,null);if(typeof q.then=="function")return V(H,z,Pl(q),ee);if(q.$$typeof===k)return V(H,z,Ll(H,q),ee);ql(H,q)}return null}function X(H,z,q,ee,be){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return H=H.get(q)||null,E(z,H,""+ee,be);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case C:return H=H.get(ee.key===null?q:ee.key)||null,D(z,H,ee,be);case R:return H=H.get(ee.key===null?q:ee.key)||null,$(z,H,ee,be);case G:return ee=wr(ee),X(H,z,q,ee,be)}if(W(ee)||fe(ee))return H=H.get(q)||null,J(z,H,ee,be,null);if(typeof ee.then=="function")return X(H,z,q,Pl(ee),be);if(ee.$$typeof===k)return X(H,z,q,Ll(z,ee),be);ql(z,ee)}return null}function de(H,z,q,ee){for(var be=null,ze=null,ye=z,Ne=z=0,Oe=null;ye!==null&&Ne<q.length;Ne++){ye.index>Ne?(Oe=ye,ye=null):Oe=ye.sibling;var ke=V(H,ye,q[Ne],ee);if(ke===null){ye===null&&(ye=Oe);break}e&&ye&&ke.alternate===null&&t(H,ye),z=f(ke,z,Ne),ze===null?be=ke:ze.sibling=ke,ze=ke,ye=Oe}if(Ne===q.length)return a(H,ye),_e&&ea(H,Ne),be;if(ye===null){for(;Ne<q.length;Ne++)ye=te(H,q[Ne],ee),ye!==null&&(z=f(ye,z,Ne),ze===null?be=ye:ze.sibling=ye,ze=ye);return _e&&ea(H,Ne),be}for(ye=i(ye);Ne<q.length;Ne++)Oe=X(ye,H,Ne,q[Ne],ee),Oe!==null&&(e&&Oe.alternate!==null&&ye.delete(Oe.key===null?Ne:Oe.key),z=f(Oe,z,Ne),ze===null?be=Oe:ze.sibling=Oe,ze=Oe);return e&&ye.forEach(function(Ia){return t(H,Ia)}),_e&&ea(H,Ne),be}function xe(H,z,q,ee){if(q==null)throw Error(l(151));for(var be=null,ze=null,ye=z,Ne=z=0,Oe=null,ke=q.next();ye!==null&&!ke.done;Ne++,ke=q.next()){ye.index>Ne?(Oe=ye,ye=null):Oe=ye.sibling;var Ia=V(H,ye,ke.value,ee);if(Ia===null){ye===null&&(ye=Oe);break}e&&ye&&Ia.alternate===null&&t(H,ye),z=f(Ia,z,Ne),ze===null?be=Ia:ze.sibling=Ia,ze=Ia,ye=Oe}if(ke.done)return a(H,ye),_e&&ea(H,Ne),be;if(ye===null){for(;!ke.done;Ne++,ke=q.next())ke=te(H,ke.value,ee),ke!==null&&(z=f(ke,z,Ne),ze===null?be=ke:ze.sibling=ke,ze=ke);return _e&&ea(H,Ne),be}for(ye=i(ye);!ke.done;Ne++,ke=q.next())ke=X(ye,H,Ne,ke.value,ee),ke!==null&&(e&&ke.alternate!==null&&ye.delete(ke.key===null?Ne:ke.key),z=f(ke,z,Ne),ze===null?be=ke:ze.sibling=ke,ze=ke);return e&&ye.forEach(function(tE){return t(H,tE)}),_e&&ea(H,Ne),be}function qe(H,z,q,ee){if(typeof q=="object"&&q!==null&&q.type===S&&q.key===null&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case C:e:{for(var be=q.key;z!==null;){if(z.key===be){if(be=q.type,be===S){if(z.tag===7){a(H,z.sibling),ee=u(z,q.props.children),ee.return=H,H=ee;break e}}else if(z.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===G&&wr(be)===z.type){a(H,z.sibling),ee=u(z,q.props),yi(ee,q),ee.return=H,H=ee;break e}a(H,z);break}else t(H,z);z=z.sibling}q.type===S?(ee=gr(q.props.children,H.mode,ee,q.key),ee.return=H,H=ee):(ee=Dl(q.type,q.key,q.props,null,H.mode,ee),yi(ee,q),ee.return=H,H=ee)}return x(H);case R:e:{for(be=q.key;z!==null;){if(z.key===be)if(z.tag===4&&z.stateNode.containerInfo===q.containerInfo&&z.stateNode.implementation===q.implementation){a(H,z.sibling),ee=u(z,q.children||[]),ee.return=H,H=ee;break e}else{a(H,z);break}else t(H,z);z=z.sibling}ee=yc(q,H.mode,ee),ee.return=H,H=ee}return x(H);case G:return q=wr(q),qe(H,z,q,ee)}if(W(q))return de(H,z,q,ee);if(fe(q)){if(be=fe(q),typeof be!="function")throw Error(l(150));return q=be.call(q),xe(H,z,q,ee)}if(typeof q.then=="function")return qe(H,z,Pl(q),ee);if(q.$$typeof===k)return qe(H,z,Ll(H,q),ee);ql(H,q)}return typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint"?(q=""+q,z!==null&&z.tag===6?(a(H,z.sibling),ee=u(z,q),ee.return=H,H=ee):(a(H,z),ee=vc(q,H.mode,ee),ee.return=H,H=ee),x(H)):a(H,z)}return function(H,z,q,ee){try{vi=0;var be=qe(H,z,q,ee);return co=null,be}catch(ye){if(ye===uo||ye===Hl)throw ye;var ze=Xt(29,ye,null,H.mode);return ze.lanes=ee,ze.return=H,ze}}}var Er=lp(!0),sp=lp(!1),Aa=!1;function Ac(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Oc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Oa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _a(e,t,a){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Le&2)!==0){var u=i.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),i.pending=t,t=_l(e),Gm(e,null,a),t}return Ol(e,i,t,a),_l(e)}function bi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,Lt(e,a)}}function _c(e,t){var a=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,a===i)){var u=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var x={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?u=f=x:f=f.next=x,a=a.next}while(a!==null);f===null?u=f=t:f=f.next=t}else u=f=t;a={baseState:i.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:i.shared,callbacks:i.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Dc=!1;function xi(){if(Dc){var e=so;if(e!==null)throw e}}function wi(e,t,a,i){Dc=!1;var u=e.updateQueue;Aa=!1;var f=u.firstBaseUpdate,x=u.lastBaseUpdate,E=u.shared.pending;if(E!==null){u.shared.pending=null;var D=E,$=D.next;D.next=null,x===null?f=$:x.next=$,x=D;var J=e.alternate;J!==null&&(J=J.updateQueue,E=J.lastBaseUpdate,E!==x&&(E===null?J.firstBaseUpdate=$:E.next=$,J.lastBaseUpdate=D))}if(f!==null){var te=u.baseState;x=0,J=$=D=null,E=f;do{var V=E.lane&-536870913,X=V!==E.lane;if(X?(Ae&V)===V:(i&V)===V){V!==0&&V===lo&&(Dc=!0),J!==null&&(J=J.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var de=e,xe=E;V=t;var qe=a;switch(xe.tag){case 1:if(de=xe.payload,typeof de=="function"){te=de.call(qe,te,V);break e}te=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=xe.payload,V=typeof de=="function"?de.call(qe,te,V):de,V==null)break e;te=p({},te,V);break e;case 2:Aa=!0}}V=E.callback,V!==null&&(e.flags|=64,X&&(e.flags|=8192),X=u.callbacks,X===null?u.callbacks=[V]:X.push(V))}else X={lane:V,tag:E.tag,payload:E.payload,callback:E.callback,next:null},J===null?($=J=X,D=te):J=J.next=X,x|=V;if(E=E.next,E===null){if(E=u.shared.pending,E===null)break;X=E,E=X.next,X.next=null,u.lastBaseUpdate=X,u.shared.pending=null}}while(!0);J===null&&(D=te),u.baseState=D,u.firstBaseUpdate=$,u.lastBaseUpdate=J,f===null&&(u.shared.lanes=0),Ua|=x,e.lanes=x,e.memoizedState=te}}function up(e,t){if(typeof e!="function")throw Error(l(191,e));e.call(t)}function cp(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)up(a[e],t)}var fo=M(null),$l=M(0);function fp(e,t){e=fa,L($l,e),L(fo,t),fa=e|t.baseLanes}function zc(){L($l,fa),L(fo,fo.current)}function kc(){fa=$l.current,A(fo),A($l)}var Zt=M(null),mn=null;function Da(e){var t=e.alternate;L(at,at.current&1),L(Zt,e),mn===null&&(t===null||fo.current!==null||t.memoizedState!==null)&&(mn=e)}function Lc(e){L(at,at.current),L(Zt,e),mn===null&&(mn=e)}function dp(e){e.tag===22?(L(at,at.current),L(Zt,e),mn===null&&(mn=e)):za()}function za(){L(at,at.current),L(Zt,Zt.current)}function Jt(e){A(Zt),mn===e&&(mn=null),A(at)}var at=M(0);function Vl(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Vf(a)||Ff(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var aa=0,Re=null,Be=null,it=null,Fl=!1,ho=!1,Cr=!1,Gl=0,Si=0,mo=null,GS=0;function tt(){throw Error(l(321))}function Uc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Kt(e[a],t[a]))return!1;return!0}function Hc(e,t,a,i,u,f){return aa=f,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=e===null||e.memoizedState===null?Kp:Wc,Cr=!1,f=a(i,u),Cr=!1,ho&&(f=mp(t,a,i,u)),hp(e),f}function hp(e){T.H=Ri;var t=Be!==null&&Be.next!==null;if(aa=0,it=Be=Re=null,Fl=!1,Si=0,mo=null,t)throw Error(l(300));e===null||lt||(e=e.dependencies,e!==null&&kl(e)&&(lt=!0))}function mp(e,t,a,i){Re=e;var u=0;do{if(ho&&(mo=null),Si=0,ho=!1,25<=u)throw Error(l(301));if(u+=1,it=Be=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}T.H=Xp,f=t(a,i)}while(ho);return f}function YS(){var e=T.H,t=e.useState()[0];return t=typeof t.then=="function"?Ei(t):t,e=e.useState()[0],(Be!==null?Be.memoizedState:null)!==e&&(Re.flags|=1024),t}function Bc(){var e=Gl!==0;return Gl=0,e}function Pc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function qc(e){if(Fl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Fl=!1}aa=0,it=Be=Re=null,ho=!1,Si=Gl=0,mo=null}function At(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return it===null?Re.memoizedState=it=e:it=it.next=e,it}function rt(){if(Be===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=Be.next;var t=it===null?Re.memoizedState:it.next;if(t!==null)it=t,Be=e;else{if(e===null)throw Re.alternate===null?Error(l(467)):Error(l(310));Be=e,e={memoizedState:Be.memoizedState,baseState:Be.baseState,baseQueue:Be.baseQueue,queue:Be.queue,next:null},it===null?Re.memoizedState=it=e:it=it.next=e}return it}function Yl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ei(e){var t=Si;return Si+=1,mo===null&&(mo=[]),e=rp(mo,e,t),t=Re,(it===null?t.memoizedState:it.next)===null&&(t=t.alternate,T.H=t===null||t.memoizedState===null?Kp:Wc),e}function Il(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ei(e);if(e.$$typeof===k)return yt(e)}throw Error(l(438,String(e)))}function $c(e){var t=null,a=Re.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var i=Re.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Yl(),Re.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),i=0;i<e;i++)a[i]=ie;return t.index++,a}function ra(e,t){return typeof t=="function"?t(e):t}function Ql(e){var t=rt();return Vc(t,Be,e)}function Vc(e,t,a){var i=e.queue;if(i===null)throw Error(l(311));i.lastRenderedReducer=a;var u=e.baseQueue,f=i.pending;if(f!==null){if(u!==null){var x=u.next;u.next=f.next,f.next=x}t.baseQueue=u=f,i.pending=null}if(f=e.baseState,u===null)e.memoizedState=f;else{t=u.next;var E=x=null,D=null,$=t,J=!1;do{var te=$.lane&-536870913;if(te!==$.lane?(Ae&te)===te:(aa&te)===te){var V=$.revertLane;if(V===0)D!==null&&(D=D.next={lane:0,revertLane:0,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),te===lo&&(J=!0);else if((aa&V)===V){$=$.next,V===lo&&(J=!0);continue}else te={lane:0,revertLane:$.revertLane,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},D===null?(E=D=te,x=f):D=D.next=te,Re.lanes|=V,Ua|=V;te=$.action,Cr&&a(f,te),f=$.hasEagerState?$.eagerState:a(f,te)}else V={lane:te,revertLane:$.revertLane,gesture:$.gesture,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},D===null?(E=D=V,x=f):D=D.next=V,Re.lanes|=te,Ua|=te;$=$.next}while($!==null&&$!==t);if(D===null?x=f:D.next=E,!Kt(f,e.memoizedState)&&(lt=!0,J&&(a=so,a!==null)))throw a;e.memoizedState=f,e.baseState=x,e.baseQueue=D,i.lastRenderedState=f}return u===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function Fc(e){var t=rt(),a=t.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=e;var i=a.dispatch,u=a.pending,f=t.memoizedState;if(u!==null){a.pending=null;var x=u=u.next;do f=e(f,x.action),x=x.next;while(x!==u);Kt(f,t.memoizedState)||(lt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,i]}function pp(e,t,a){var i=Re,u=rt(),f=_e;if(f){if(a===void 0)throw Error(l(407));a=a()}else a=t();var x=!Kt((Be||u).memoizedState,a);if(x&&(u.memoizedState=a,lt=!0),u=u.queue,Ic(yp.bind(null,i,u,e),[e]),u.getSnapshot!==t||x||it!==null&&it.memoizedState.tag&1){if(i.flags|=2048,po(9,{destroy:void 0},vp.bind(null,i,u,a,t),null),Ve===null)throw Error(l(349));f||(aa&127)!==0||gp(i,t,a)}return a}function gp(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Re.updateQueue,t===null?(t=Yl(),Re.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function vp(e,t,a,i){t.value=a,t.getSnapshot=i,bp(t)&&xp(e)}function yp(e,t,a){return a(function(){bp(t)&&xp(e)})}function bp(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Kt(e,a)}catch{return!0}}function xp(e){var t=pr(e,2);t!==null&&Ft(t,e,2)}function Gc(e){var t=At();if(typeof e=="function"){var a=e;if(e=a(),Cr){Cn(!0);try{a()}finally{Cn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:e},t}function wp(e,t,a,i){return e.baseState=a,Vc(e,Be,typeof i=="function"?i:ra)}function IS(e,t,a,i,u){if(Zl(e))throw Error(l(485));if(e=t.action,e!==null){var f={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){f.listeners.push(x)}};T.T!==null?a(!0):f.isTransition=!1,i(f),a=t.pending,a===null?(f.next=t.pending=f,Sp(t,f)):(f.next=a.next,t.pending=a.next=f)}}function Sp(e,t){var a=t.action,i=t.payload,u=e.state;if(t.isTransition){var f=T.T,x={};T.T=x;try{var E=a(u,i),D=T.S;D!==null&&D(x,E),Ep(e,t,E)}catch($){Yc(e,t,$)}finally{f!==null&&x.types!==null&&(f.types=x.types),T.T=f}}else try{f=a(u,i),Ep(e,t,f)}catch($){Yc(e,t,$)}}function Ep(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(i){Cp(e,t,i)},function(i){return Yc(e,t,i)}):Cp(e,t,a)}function Cp(e,t,a){t.status="fulfilled",t.value=a,Rp(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Sp(e,a)))}function Yc(e,t,a){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=a,Rp(t),t=t.next;while(t!==i)}e.action=null}function Rp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Np(e,t){return t}function Tp(e,t){if(_e){var a=Ve.formState;if(a!==null){e:{var i=Re;if(_e){if(Ge){t:{for(var u=Ge,f=hn;u.nodeType!==8;){if(!f){u=null;break t}if(u=pn(u.nextSibling),u===null){u=null;break t}}f=u.data,u=f==="F!"||f==="F"?u:null}if(u){Ge=pn(u.nextSibling),i=u.data==="F!";break e}}ja(i)}i=!1}i&&(t=a[0])}}return a=At(),a.memoizedState=a.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Np,lastRenderedState:t},a.queue=i,a=Yp.bind(null,Re,i),i.dispatch=a,i=Gc(!1),f=Jc.bind(null,Re,!1,i.queue),i=At(),u={state:t,dispatch:null,action:e,pending:null},i.queue=u,a=IS.bind(null,Re,u,f,a),u.dispatch=a,i.memoizedState=e,[t,a,!1]}function jp(e){var t=rt();return Mp(t,Be,e)}function Mp(e,t,a){if(t=Vc(e,t,Np)[0],e=Ql(ra)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=Ei(t)}catch(x){throw x===uo?Hl:x}else i=t;t=rt();var u=t.queue,f=u.dispatch;return a!==t.memoizedState&&(Re.flags|=2048,po(9,{destroy:void 0},QS.bind(null,u,a),null)),[i,f,e]}function QS(e,t){e.action=t}function Ap(e){var t=rt(),a=Be;if(a!==null)return Mp(t,a,e);rt(),t=t.memoizedState,a=rt();var i=a.queue.dispatch;return a.memoizedState=e,[t,i,!1]}function po(e,t,a,i){return e={tag:e,create:a,deps:i,inst:t,next:null},t=Re.updateQueue,t===null&&(t=Yl(),Re.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(i=a.next,a.next=e,e.next=i,t.lastEffect=e),e}function Op(){return rt().memoizedState}function Kl(e,t,a,i){var u=At();Re.flags|=e,u.memoizedState=po(1|t,{destroy:void 0},a,i===void 0?null:i)}function Xl(e,t,a,i){var u=rt();i=i===void 0?null:i;var f=u.memoizedState.inst;Be!==null&&i!==null&&Uc(i,Be.memoizedState.deps)?u.memoizedState=po(t,f,a,i):(Re.flags|=e,u.memoizedState=po(1|t,f,a,i))}function _p(e,t){Kl(8390656,8,e,t)}function Ic(e,t){Xl(2048,8,e,t)}function KS(e){Re.flags|=4;var t=Re.updateQueue;if(t===null)t=Yl(),Re.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Dp(e){var t=rt().memoizedState;return KS({ref:t,nextImpl:e}),function(){if((Le&2)!==0)throw Error(l(440));return t.impl.apply(void 0,arguments)}}function zp(e,t){return Xl(4,2,e,t)}function kp(e,t){return Xl(4,4,e,t)}function Lp(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Up(e,t,a){a=a!=null?a.concat([e]):null,Xl(4,4,Lp.bind(null,t,e),a)}function Qc(){}function Hp(e,t){var a=rt();t=t===void 0?null:t;var i=a.memoizedState;return t!==null&&Uc(t,i[1])?i[0]:(a.memoizedState=[e,t],e)}function Bp(e,t){var a=rt();t=t===void 0?null:t;var i=a.memoizedState;if(t!==null&&Uc(t,i[1]))return i[0];if(i=e(),Cr){Cn(!0);try{e()}finally{Cn(!1)}}return a.memoizedState=[i,t],i}function Kc(e,t,a){return a===void 0||(aa&1073741824)!==0&&(Ae&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Pg(),Re.lanes|=e,Ua|=e,a)}function Pp(e,t,a,i){return Kt(a,t)?a:fo.current!==null?(e=Kc(e,a,i),Kt(e,t)||(lt=!0),e):(aa&42)===0||(aa&1073741824)!==0&&(Ae&261930)===0?(lt=!0,e.memoizedState=a):(e=Pg(),Re.lanes|=e,Ua|=e,t)}function qp(e,t,a,i,u){var f=U.p;U.p=f!==0&&8>f?f:8;var x=T.T,E={};T.T=E,Jc(e,!1,t,a);try{var D=u(),$=T.S;if($!==null&&$(E,D),D!==null&&typeof D=="object"&&typeof D.then=="function"){var J=FS(D,i);Ci(e,t,J,tn(e))}else Ci(e,t,i,tn(e))}catch(te){Ci(e,t,{then:function(){},status:"rejected",reason:te},tn())}finally{U.p=f,x!==null&&E.types!==null&&(x.types=E.types),T.T=x}}function XS(){}function Xc(e,t,a,i){if(e.tag!==5)throw Error(l(476));var u=$p(e).queue;qp(e,u,t,_,a===null?XS:function(){return Vp(e),a(i)})}function $p(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:_,baseState:_,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:_},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Vp(e){var t=$p(e);t.next===null&&(t=e.alternate.memoizedState),Ci(e,t.next.queue,{},tn())}function Zc(){return yt(qi)}function Fp(){return rt().memoizedState}function Gp(){return rt().memoizedState}function ZS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=tn();e=Oa(a);var i=_a(t,e,a);i!==null&&(Ft(i,t,a),bi(i,t,a)),t={cache:Nc()},e.payload=t;return}t=t.return}}function JS(e,t,a){var i=tn();a={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Zl(e)?Ip(t,a):(a=pc(e,t,a,i),a!==null&&(Ft(a,e,i),Qp(a,t,i)))}function Yp(e,t,a){var i=tn();Ci(e,t,a,i)}function Ci(e,t,a,i){var u={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Zl(e))Ip(t,u);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var x=t.lastRenderedState,E=f(x,a);if(u.hasEagerState=!0,u.eagerState=E,Kt(E,x))return Ol(e,t,u,0),Ve===null&&Al(),!1}catch{}if(a=pc(e,t,u,i),a!==null)return Ft(a,e,i),Qp(a,t,i),!0}return!1}function Jc(e,t,a,i){if(i={lane:2,revertLane:Of(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Zl(e)){if(t)throw Error(l(479))}else t=pc(e,a,i,2),t!==null&&Ft(t,e,2)}function Zl(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function Ip(e,t){ho=Fl=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Qp(e,t,a){if((a&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,Lt(e,a)}}var Ri={readContext:yt,use:Il,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};Ri.useEffectEvent=tt;var Kp={readContext:yt,use:Il,useCallback:function(e,t){return At().memoizedState=[e,t===void 0?null:t],e},useContext:yt,useEffect:_p,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Kl(4194308,4,Lp.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Kl(4194308,4,e,t)},useInsertionEffect:function(e,t){Kl(4,2,e,t)},useMemo:function(e,t){var a=At();t=t===void 0?null:t;var i=e();if(Cr){Cn(!0);try{e()}finally{Cn(!1)}}return a.memoizedState=[i,t],i},useReducer:function(e,t,a){var i=At();if(a!==void 0){var u=a(t);if(Cr){Cn(!0);try{a(t)}finally{Cn(!1)}}}else u=t;return i.memoizedState=i.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},i.queue=e,e=e.dispatch=JS.bind(null,Re,e),[i.memoizedState,e]},useRef:function(e){var t=At();return e={current:e},t.memoizedState=e},useState:function(e){e=Gc(e);var t=e.queue,a=Yp.bind(null,Re,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Qc,useDeferredValue:function(e,t){var a=At();return Kc(a,e,t)},useTransition:function(){var e=Gc(!1);return e=qp.bind(null,Re,e.queue,!0,!1),At().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var i=Re,u=At();if(_e){if(a===void 0)throw Error(l(407));a=a()}else{if(a=t(),Ve===null)throw Error(l(349));(Ae&127)!==0||gp(i,t,a)}u.memoizedState=a;var f={value:a,getSnapshot:t};return u.queue=f,_p(yp.bind(null,i,f,e),[e]),i.flags|=2048,po(9,{destroy:void 0},vp.bind(null,i,f,a,t),null),a},useId:function(){var e=At(),t=Ve.identifierPrefix;if(_e){var a=Un,i=Ln;a=(i&~(1<<32-Et(i)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Gl++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=GS++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Zc,useFormState:Tp,useActionState:Tp,useOptimistic:function(e){var t=At();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Jc.bind(null,Re,!0,a),a.dispatch=t,[e,t]},useMemoCache:$c,useCacheRefresh:function(){return At().memoizedState=ZS.bind(null,Re)},useEffectEvent:function(e){var t=At(),a={impl:e};return t.memoizedState=a,function(){if((Le&2)!==0)throw Error(l(440));return a.impl.apply(void 0,arguments)}}},Wc={readContext:yt,use:Il,useCallback:Hp,useContext:yt,useEffect:Ic,useImperativeHandle:Up,useInsertionEffect:zp,useLayoutEffect:kp,useMemo:Bp,useReducer:Ql,useRef:Op,useState:function(){return Ql(ra)},useDebugValue:Qc,useDeferredValue:function(e,t){var a=rt();return Pp(a,Be.memoizedState,e,t)},useTransition:function(){var e=Ql(ra)[0],t=rt().memoizedState;return[typeof e=="boolean"?e:Ei(e),t]},useSyncExternalStore:pp,useId:Fp,useHostTransitionStatus:Zc,useFormState:jp,useActionState:jp,useOptimistic:function(e,t){var a=rt();return wp(a,Be,e,t)},useMemoCache:$c,useCacheRefresh:Gp};Wc.useEffectEvent=Dp;var Xp={readContext:yt,use:Il,useCallback:Hp,useContext:yt,useEffect:Ic,useImperativeHandle:Up,useInsertionEffect:zp,useLayoutEffect:kp,useMemo:Bp,useReducer:Fc,useRef:Op,useState:function(){return Fc(ra)},useDebugValue:Qc,useDeferredValue:function(e,t){var a=rt();return Be===null?Kc(a,e,t):Pp(a,Be.memoizedState,e,t)},useTransition:function(){var e=Fc(ra)[0],t=rt().memoizedState;return[typeof e=="boolean"?e:Ei(e),t]},useSyncExternalStore:pp,useId:Fp,useHostTransitionStatus:Zc,useFormState:Ap,useActionState:Ap,useOptimistic:function(e,t){var a=rt();return Be!==null?wp(a,Be,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:$c,useCacheRefresh:Gp};Xp.useEffectEvent=Dp;function ef(e,t,a,i){t=e.memoizedState,a=a(i,t),a=a==null?t:p({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var tf={enqueueSetState:function(e,t,a){e=e._reactInternals;var i=tn(),u=Oa(i);u.payload=t,a!=null&&(u.callback=a),t=_a(e,u,i),t!==null&&(Ft(t,e,i),bi(t,e,i))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var i=tn(),u=Oa(i);u.tag=1,u.payload=t,a!=null&&(u.callback=a),t=_a(e,u,i),t!==null&&(Ft(t,e,i),bi(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=tn(),i=Oa(a);i.tag=2,t!=null&&(i.callback=t),t=_a(e,i,a),t!==null&&(Ft(t,e,a),bi(t,e,a))}};function Zp(e,t,a,i,u,f,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,f,x):t.prototype&&t.prototype.isPureReactComponent?!fi(a,i)||!fi(u,f):!0}function Jp(e,t,a,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,i),t.state!==e&&tf.enqueueReplaceState(t,t.state,null)}function Rr(e,t){var a=t;if("ref"in t){a={};for(var i in t)i!=="ref"&&(a[i]=t[i])}if(e=e.defaultProps){a===t&&(a=p({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}function Wp(e){Ml(e)}function eg(e){console.error(e)}function tg(e){Ml(e)}function Jl(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function ng(e,t,a){try{var i=e.onCaughtError;i(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function nf(e,t,a){return a=Oa(a),a.tag=3,a.payload={element:null},a.callback=function(){Jl(e,t)},a}function ag(e){return e=Oa(e),e.tag=3,e}function rg(e,t,a,i){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var f=i.value;e.payload=function(){return u(f)},e.callback=function(){ng(t,a,i)}}var x=a.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){ng(t,a,i),typeof u!="function"&&(Ha===null?Ha=new Set([this]):Ha.add(this));var E=i.stack;this.componentDidCatch(i.value,{componentStack:E!==null?E:""})})}function WS(e,t,a,i,u){if(a.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=a.alternate,t!==null&&io(t,a,u,!0),a=Zt.current,a!==null){switch(a.tag){case 31:case 13:return mn===null?cs():a.alternate===null&&nt===0&&(nt=3),a.flags&=-257,a.flags|=65536,a.lanes=u,i===Bl?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([i]):t.add(i),jf(e,i,u)),!1;case 22:return a.flags|=65536,i===Bl?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([i]):a.add(i)),jf(e,i,u)),!1}throw Error(l(435,a.tag))}return jf(e,i,u),cs(),!1}if(_e)return t=Zt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,i!==wc&&(e=Error(l(422),{cause:i}),mi(cn(e,a)))):(i!==wc&&(t=Error(l(423),{cause:i}),mi(cn(t,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,i=cn(i,a),u=nf(e.stateNode,i,u),_c(e,u),nt!==4&&(nt=2)),!1;var f=Error(l(520),{cause:i});if(f=cn(f,a),Di===null?Di=[f]:Di.push(f),nt!==4&&(nt=2),t===null)return!0;i=cn(i,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=nf(a.stateNode,i,e),_c(a,e),!1;case 1:if(t=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Ha===null||!Ha.has(f))))return a.flags|=65536,u&=-u,a.lanes|=u,u=ag(u),rg(u,e,a,i),_c(a,u),!1}a=a.return}while(a!==null);return!1}var af=Error(l(461)),lt=!1;function bt(e,t,a,i){t.child=e===null?sp(t,null,a,i):Er(t,e.child,a,i)}function og(e,t,a,i,u){a=a.render;var f=t.ref;if("ref"in i){var x={};for(var E in i)E!=="ref"&&(x[E]=i[E])}else x=i;return br(t),i=Hc(e,t,a,x,f,u),E=Bc(),e!==null&&!lt?(Pc(e,t,u),oa(e,t,u)):(_e&&E&&bc(t),t.flags|=1,bt(e,t,i,u),t.child)}function ig(e,t,a,i,u){if(e===null){var f=a.type;return typeof f=="function"&&!gc(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,lg(e,t,f,i,u)):(e=Dl(a.type,null,i,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!df(e,u)){var x=f.memoizedProps;if(a=a.compare,a=a!==null?a:fi,a(x,i)&&e.ref===t.ref)return oa(e,t,u)}return t.flags|=1,e=Wn(f,i),e.ref=t.ref,e.return=t,t.child=e}function lg(e,t,a,i,u){if(e!==null){var f=e.memoizedProps;if(fi(f,i)&&e.ref===t.ref)if(lt=!1,t.pendingProps=i=f,df(e,u))(e.flags&131072)!==0&&(lt=!0);else return t.lanes=e.lanes,oa(e,t,u)}return rf(e,t,a,i,u)}function sg(e,t,a,i){var u=i.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,e!==null){for(i=t.child=e.child,u=0;i!==null;)u=u|i.lanes|i.childLanes,i=i.sibling;i=u&~f}else i=0,t.child=null;return ug(e,t,f,a,i)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ul(t,f!==null?f.cachePool:null),f!==null?fp(t,f):zc(),dp(t);else return i=t.lanes=536870912,ug(e,t,f!==null?f.baseLanes|a:a,a,i)}else f!==null?(Ul(t,f.cachePool),fp(t,f),za(),t.memoizedState=null):(e!==null&&Ul(t,null),zc(),za());return bt(e,t,u,a),t.child}function Ni(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ug(e,t,a,i,u){var f=jc();return f=f===null?null:{parent:ot._currentValue,pool:f},t.memoizedState={baseLanes:a,cachePool:f},e!==null&&Ul(t,null),zc(),dp(t),e!==null&&io(e,t,i,!0),t.childLanes=u,null}function Wl(e,t){return t=ts({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function cg(e,t,a){return Er(t,e.child,null,a),e=Wl(t,t.pendingProps),e.flags|=2,Jt(t),t.memoizedState=null,e}function e1(e,t,a){var i=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(_e){if(i.mode==="hidden")return e=Wl(t,i),t.lanes=536870912,Ni(null,e);if(Lc(t),(e=Ge)?(e=Sv(e,hn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Na!==null?{id:Ln,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},a=Im(e),a.return=t,t.child=a,vt=t,Ge=null)):e=null,e===null)throw ja(t);return t.lanes=536870912,null}return Wl(t,i)}var f=e.memoizedState;if(f!==null){var x=f.dehydrated;if(Lc(t),u)if(t.flags&256)t.flags&=-257,t=cg(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(l(558));else if(lt||io(e,t,a,!1),u=(a&e.childLanes)!==0,lt||u){if(i=Ve,i!==null&&(x=Ut(i,a),x!==0&&x!==f.retryLane))throw f.retryLane=x,pr(e,x),Ft(i,e,x),af;cs(),t=cg(e,t,a)}else e=f.treeContext,Ge=pn(x.nextSibling),vt=t,_e=!0,Ta=null,hn=!1,e!==null&&Xm(t,e),t=Wl(t,i),t.flags|=4096;return t}return e=Wn(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function es(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(l(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function rf(e,t,a,i,u){return br(t),a=Hc(e,t,a,i,void 0,u),i=Bc(),e!==null&&!lt?(Pc(e,t,u),oa(e,t,u)):(_e&&i&&bc(t),t.flags|=1,bt(e,t,a,u),t.child)}function fg(e,t,a,i,u,f){return br(t),t.updateQueue=null,a=mp(t,i,a,u),hp(e),i=Bc(),e!==null&&!lt?(Pc(e,t,f),oa(e,t,f)):(_e&&i&&bc(t),t.flags|=1,bt(e,t,a,f),t.child)}function dg(e,t,a,i,u){if(br(t),t.stateNode===null){var f=no,x=a.contextType;typeof x=="object"&&x!==null&&(f=yt(x)),f=new a(i,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=tf,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=i,f.state=t.memoizedState,f.refs={},Ac(t),x=a.contextType,f.context=typeof x=="object"&&x!==null?yt(x):no,f.state=t.memoizedState,x=a.getDerivedStateFromProps,typeof x=="function"&&(ef(t,a,x,i),f.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(x=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),x!==f.state&&tf.enqueueReplaceState(f,f.state,null),wi(t,i,f,u),xi(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){f=t.stateNode;var E=t.memoizedProps,D=Rr(a,E);f.props=D;var $=f.context,J=a.contextType;x=no,typeof J=="object"&&J!==null&&(x=yt(J));var te=a.getDerivedStateFromProps;J=typeof te=="function"||typeof f.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,J||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(E||$!==x)&&Jp(t,f,i,x),Aa=!1;var V=t.memoizedState;f.state=V,wi(t,i,f,u),xi(),$=t.memoizedState,E||V!==$||Aa?(typeof te=="function"&&(ef(t,a,te,i),$=t.memoizedState),(D=Aa||Zp(t,a,D,i,V,$,x))?(J||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=$),f.props=i,f.state=$,f.context=x,i=D):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{f=t.stateNode,Oc(e,t),x=t.memoizedProps,J=Rr(a,x),f.props=J,te=t.pendingProps,V=f.context,$=a.contextType,D=no,typeof $=="object"&&$!==null&&(D=yt($)),E=a.getDerivedStateFromProps,($=typeof E=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(x!==te||V!==D)&&Jp(t,f,i,D),Aa=!1,V=t.memoizedState,f.state=V,wi(t,i,f,u),xi();var X=t.memoizedState;x!==te||V!==X||Aa||e!==null&&e.dependencies!==null&&kl(e.dependencies)?(typeof E=="function"&&(ef(t,a,E,i),X=t.memoizedState),(J=Aa||Zp(t,a,J,i,V,X,D)||e!==null&&e.dependencies!==null&&kl(e.dependencies))?($||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(i,X,D),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(i,X,D)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||x===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=X),f.props=i,f.state=X,f.context=D,i=J):(typeof f.componentDidUpdate!="function"||x===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),i=!1)}return f=i,es(e,t),i=(t.flags&128)!==0,f||i?(f=t.stateNode,a=i&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&i?(t.child=Er(t,e.child,null,u),t.child=Er(t,null,a,u)):bt(e,t,a,u),t.memoizedState=f.state,e=t.child):e=oa(e,t,u),e}function hg(e,t,a,i){return vr(),t.flags|=256,bt(e,t,a,i),t.child}var of={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function lf(e){return{baseLanes:e,cachePool:np()}}function sf(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=en),e}function mg(e,t,a){var i=t.pendingProps,u=!1,f=(t.flags&128)!==0,x;if((x=f)||(x=e!==null&&e.memoizedState===null?!1:(at.current&2)!==0),x&&(u=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(_e){if(u?Da(t):za(),(e=Ge)?(e=Sv(e,hn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Na!==null?{id:Ln,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},a=Im(e),a.return=t,t.child=a,vt=t,Ge=null)):e=null,e===null)throw ja(t);return Ff(e)?t.lanes=32:t.lanes=536870912,null}var E=i.children;return i=i.fallback,u?(za(),u=t.mode,E=ts({mode:"hidden",children:E},u),i=gr(i,u,a,null),E.return=t,i.return=t,E.sibling=i,t.child=E,i=t.child,i.memoizedState=lf(a),i.childLanes=sf(e,x,a),t.memoizedState=of,Ni(null,i)):(Da(t),uf(t,E))}var D=e.memoizedState;if(D!==null&&(E=D.dehydrated,E!==null)){if(f)t.flags&256?(Da(t),t.flags&=-257,t=cf(e,t,a)):t.memoizedState!==null?(za(),t.child=e.child,t.flags|=128,t=null):(za(),E=i.fallback,u=t.mode,i=ts({mode:"visible",children:i.children},u),E=gr(E,u,a,null),E.flags|=2,i.return=t,E.return=t,i.sibling=E,t.child=i,Er(t,e.child,null,a),i=t.child,i.memoizedState=lf(a),i.childLanes=sf(e,x,a),t.memoizedState=of,t=Ni(null,i));else if(Da(t),Ff(E)){if(x=E.nextSibling&&E.nextSibling.dataset,x)var $=x.dgst;x=$,i=Error(l(419)),i.stack="",i.digest=x,mi({value:i,source:null,stack:null}),t=cf(e,t,a)}else if(lt||io(e,t,a,!1),x=(a&e.childLanes)!==0,lt||x){if(x=Ve,x!==null&&(i=Ut(x,a),i!==0&&i!==D.retryLane))throw D.retryLane=i,pr(e,i),Ft(x,e,i),af;Vf(E)||cs(),t=cf(e,t,a)}else Vf(E)?(t.flags|=192,t.child=e.child,t=null):(e=D.treeContext,Ge=pn(E.nextSibling),vt=t,_e=!0,Ta=null,hn=!1,e!==null&&Xm(t,e),t=uf(t,i.children),t.flags|=4096);return t}return u?(za(),E=i.fallback,u=t.mode,D=e.child,$=D.sibling,i=Wn(D,{mode:"hidden",children:i.children}),i.subtreeFlags=D.subtreeFlags&65011712,$!==null?E=Wn($,E):(E=gr(E,u,a,null),E.flags|=2),E.return=t,i.return=t,i.sibling=E,t.child=i,Ni(null,i),i=t.child,E=e.child.memoizedState,E===null?E=lf(a):(u=E.cachePool,u!==null?(D=ot._currentValue,u=u.parent!==D?{parent:D,pool:D}:u):u=np(),E={baseLanes:E.baseLanes|a,cachePool:u}),i.memoizedState=E,i.childLanes=sf(e,x,a),t.memoizedState=of,Ni(e.child,i)):(Da(t),a=e.child,e=a.sibling,a=Wn(a,{mode:"visible",children:i.children}),a.return=t,a.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=a,t.memoizedState=null,a)}function uf(e,t){return t=ts({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ts(e,t){return e=Xt(22,e,null,t),e.lanes=0,e}function cf(e,t,a){return Er(t,e.child,null,a),e=uf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function pg(e,t,a){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Cc(e.return,t,a)}function ff(e,t,a,i,u,f){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:u,treeForkCount:f}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=i,x.tail=a,x.tailMode=u,x.treeForkCount=f)}function gg(e,t,a){var i=t.pendingProps,u=i.revealOrder,f=i.tail;i=i.children;var x=at.current,E=(x&2)!==0;if(E?(x=x&1|2,t.flags|=128):x&=1,L(at,x),bt(e,t,i,a),i=_e?hi:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&pg(e,a,t);else if(e.tag===19)pg(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(u){case"forwards":for(a=t.child,u=null;a!==null;)e=a.alternate,e!==null&&Vl(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=t.child,t.child=null):(u=a.sibling,a.sibling=null),ff(t,!1,u,a,f,i);break;case"backwards":case"unstable_legacy-backwards":for(a=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&Vl(e)===null){t.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}ff(t,!0,a,null,f,i);break;case"together":ff(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function oa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ua|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(io(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(l(153));if(t.child!==null){for(e=t.child,a=Wn(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Wn(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function df(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&kl(e)))}function t1(e,t,a){switch(t.tag){case 3:le(t,t.stateNode.containerInfo),Ma(t,ot,e.memoizedState.cache),vr();break;case 27:case 5:ve(t);break;case 4:le(t,t.stateNode.containerInfo);break;case 10:Ma(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Lc(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Da(t),t.flags|=128,null):(a&t.child.childLanes)!==0?mg(e,t,a):(Da(t),e=oa(e,t,a),e!==null?e.sibling:null);Da(t);break;case 19:var u=(e.flags&128)!==0;if(i=(a&t.childLanes)!==0,i||(io(e,t,a,!1),i=(a&t.childLanes)!==0),u){if(i)return gg(e,t,a);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),L(at,at.current),i)break;return null;case 22:return t.lanes=0,sg(e,t,a,t.pendingProps);case 24:Ma(t,ot,e.memoizedState.cache)}return oa(e,t,a)}function vg(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)lt=!0;else{if(!df(e,a)&&(t.flags&128)===0)return lt=!1,t1(e,t,a);lt=(e.flags&131072)!==0}else lt=!1,_e&&(t.flags&1048576)!==0&&Km(t,hi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=wr(t.elementType),t.type=e,typeof e=="function")gc(e)?(i=Rr(e,i),t.tag=1,t=dg(null,t,e,i,a)):(t.tag=0,t=rf(null,t,e,i,a));else{if(e!=null){var u=e.$$typeof;if(u===Q){t.tag=11,t=og(null,t,e,i,a);break e}else if(u===B){t.tag=14,t=ig(null,t,e,i,a);break e}}throw t=ae(e)||e,Error(l(306,t,""))}}return t;case 0:return rf(e,t,t.type,t.pendingProps,a);case 1:return i=t.type,u=Rr(i,t.pendingProps),dg(e,t,i,u,a);case 3:e:{if(le(t,t.stateNode.containerInfo),e===null)throw Error(l(387));i=t.pendingProps;var f=t.memoizedState;u=f.element,Oc(e,t),wi(t,i,null,a);var x=t.memoizedState;if(i=x.cache,Ma(t,ot,i),i!==f.cache&&Rc(t,[ot],a,!0),xi(),i=x.element,f.isDehydrated)if(f={element:i,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=hg(e,t,i,a);break e}else if(i!==u){u=cn(Error(l(424)),t),mi(u),t=hg(e,t,i,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ge=pn(e.firstChild),vt=t,_e=!0,Ta=null,hn=!0,a=sp(t,null,i,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(vr(),i===u){t=oa(e,t,a);break e}bt(e,t,i,a)}t=t.child}return t;case 26:return es(e,t),e===null?(a=jv(t.type,null,t.pendingProps,null))?t.memoizedState=a:_e||(a=t.type,e=t.pendingProps,i=vs(re.current).createElement(a),i[gt]=t,i[Ht]=e,xt(i,a,e),mt(i),t.stateNode=i):t.memoizedState=jv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ve(t),e===null&&_e&&(i=t.stateNode=Rv(t.type,t.pendingProps,re.current),vt=t,hn=!0,u=Ge,$a(t.type)?(Gf=u,Ge=pn(i.firstChild)):Ge=u),bt(e,t,t.pendingProps.children,a),es(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&_e&&((u=i=Ge)&&(i=O1(i,t.type,t.pendingProps,hn),i!==null?(t.stateNode=i,vt=t,Ge=pn(i.firstChild),hn=!1,u=!0):u=!1),u||ja(t)),ve(t),u=t.type,f=t.pendingProps,x=e!==null?e.memoizedProps:null,i=f.children,Pf(u,f)?i=null:x!==null&&Pf(u,x)&&(t.flags|=32),t.memoizedState!==null&&(u=Hc(e,t,YS,null,null,a),qi._currentValue=u),es(e,t),bt(e,t,i,a),t.child;case 6:return e===null&&_e&&((e=a=Ge)&&(a=_1(a,t.pendingProps,hn),a!==null?(t.stateNode=a,vt=t,Ge=null,e=!0):e=!1),e||ja(t)),null;case 13:return mg(e,t,a);case 4:return le(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Er(t,null,i,a):bt(e,t,i,a),t.child;case 11:return og(e,t,t.type,t.pendingProps,a);case 7:return bt(e,t,t.pendingProps,a),t.child;case 8:return bt(e,t,t.pendingProps.children,a),t.child;case 12:return bt(e,t,t.pendingProps.children,a),t.child;case 10:return i=t.pendingProps,Ma(t,t.type,i.value),bt(e,t,i.children,a),t.child;case 9:return u=t.type._context,i=t.pendingProps.children,br(t),u=yt(u),i=i(u),t.flags|=1,bt(e,t,i,a),t.child;case 14:return ig(e,t,t.type,t.pendingProps,a);case 15:return lg(e,t,t.type,t.pendingProps,a);case 19:return gg(e,t,a);case 31:return e1(e,t,a);case 22:return sg(e,t,a,t.pendingProps);case 24:return br(t),i=yt(ot),e===null?(u=jc(),u===null&&(u=Ve,f=Nc(),u.pooledCache=f,f.refCount++,f!==null&&(u.pooledCacheLanes|=a),u=f),t.memoizedState={parent:i,cache:u},Ac(t),Ma(t,ot,u)):((e.lanes&a)!==0&&(Oc(e,t),wi(t,null,null,a),xi()),u=e.memoizedState,f=t.memoizedState,u.parent!==i?(u={parent:i,cache:i},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),Ma(t,ot,i)):(i=f.cache,Ma(t,ot,i),i!==u.cache&&Rc(t,[ot],a,!0))),bt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(l(156,t.tag))}function ia(e){e.flags|=4}function hf(e,t,a,i,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(Fg())e.flags|=8192;else throw Sr=Bl,Mc}else e.flags&=-16777217}function yg(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Dv(t))if(Fg())e.flags|=8192;else throw Sr=Bl,Mc}function ns(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ct():536870912,e.lanes|=t,bo|=t)}function Ti(e,t){if(!_e)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Ye(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,i=0;if(t)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,i|=u.subtreeFlags&65011712,i|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,i|=u.subtreeFlags,i|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=i,e.childLanes=a,t}function n1(e,t,a){var i=t.pendingProps;switch(xc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(t),null;case 1:return Ye(t),null;case 3:return a=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),na(ot),ce(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(oo(t)?ia(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Sc())),Ye(t),null;case 26:var u=t.type,f=t.memoizedState;return e===null?(ia(t),f!==null?(Ye(t),yg(t,f)):(Ye(t),hf(t,u,null,i,a))):f?f!==e.memoizedState?(ia(t),Ye(t),yg(t,f)):(Ye(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&ia(t),Ye(t),hf(t,u,e,i,a)),null;case 27:if(we(t),a=re.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&ia(t);else{if(!i){if(t.stateNode===null)throw Error(l(166));return Ye(t),null}e=P.current,oo(t)?Zm(t):(e=Rv(u,i,a),t.stateNode=e,ia(t))}return Ye(t),null;case 5:if(we(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&ia(t);else{if(!i){if(t.stateNode===null)throw Error(l(166));return Ye(t),null}if(f=P.current,oo(t))Zm(t);else{var x=vs(re.current);switch(f){case 1:f=x.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:f=x.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":f=x.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":f=x.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":f=x.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof i.is=="string"?x.createElement("select",{is:i.is}):x.createElement("select"),i.multiple?f.multiple=!0:i.size&&(f.size=i.size);break;default:f=typeof i.is=="string"?x.createElement(u,{is:i.is}):x.createElement(u)}}f[gt]=t,f[Ht]=i;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)f.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===t)break e;for(;x.sibling===null;){if(x.return===null||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}t.stateNode=f;e:switch(xt(f,u,i),u){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&ia(t)}}return Ye(t),hf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&ia(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(l(166));if(e=re.current,oo(t)){if(e=t.stateNode,a=t.memoizedProps,i=null,u=vt,u!==null)switch(u.tag){case 27:case 5:i=u.memoizedProps}e[gt]=t,e=!!(e.nodeValue===a||i!==null&&i.suppressHydrationWarning===!0||mv(e.nodeValue,a)),e||ja(t,!0)}else e=vs(e).createTextNode(i),e[gt]=t,t.stateNode=e}return Ye(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(i=oo(t),a!==null){if(e===null){if(!i)throw Error(l(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[gt]=t}else vr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),e=!1}else a=Sc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Jt(t),t):(Jt(t),null);if((t.flags&128)!==0)throw Error(l(558))}return Ye(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=oo(t),i!==null&&i.dehydrated!==null){if(e===null){if(!u)throw Error(l(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(l(317));u[gt]=t}else vr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),u=!1}else u=Sc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(Jt(t),t):(Jt(t),null)}return Jt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=i!==null,e=e!==null&&e.memoizedState!==null,a&&(i=t.child,u=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(u=i.alternate.memoizedState.cachePool.pool),f=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),f!==u&&(i.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),ns(t,t.updateQueue),Ye(t),null);case 4:return ce(),e===null&&kf(t.stateNode.containerInfo),Ye(t),null;case 10:return na(t.type),Ye(t),null;case 19:if(A(at),i=t.memoizedState,i===null)return Ye(t),null;if(u=(t.flags&128)!==0,f=i.rendering,f===null)if(u)Ti(i,!1);else{if(nt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Vl(e),f!==null){for(t.flags|=128,Ti(i,!1),e=f.updateQueue,t.updateQueue=e,ns(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Ym(a,e),a=a.sibling;return L(at,at.current&1|2),_e&&ea(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&jt()>ls&&(t.flags|=128,u=!0,Ti(i,!1),t.lanes=4194304)}else{if(!u)if(e=Vl(f),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,ns(t,e),Ti(i,!0),i.tail===null&&i.tailMode==="hidden"&&!f.alternate&&!_e)return Ye(t),null}else 2*jt()-i.renderingStartTime>ls&&a!==536870912&&(t.flags|=128,u=!0,Ti(i,!1),t.lanes=4194304);i.isBackwards?(f.sibling=t.child,t.child=f):(e=i.last,e!==null?e.sibling=f:t.child=f,i.last=f)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=jt(),e.sibling=null,a=at.current,L(at,u?a&1|2:a&1),_e&&ea(t,i.treeForkCount),e):(Ye(t),null);case 22:case 23:return Jt(t),kc(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(a&536870912)!==0&&(t.flags&128)===0&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),a=t.updateQueue,a!==null&&ns(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==a&&(t.flags|=2048),e!==null&&A(xr),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),na(ot),Ye(t),null;case 25:return null;case 30:return null}throw Error(l(156,t.tag))}function a1(e,t){switch(xc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return na(ot),ce(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return we(t),null;case 31:if(t.memoizedState!==null){if(Jt(t),t.alternate===null)throw Error(l(340));vr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Jt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(l(340));vr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return A(at),null;case 4:return ce(),null;case 10:return na(t.type),null;case 22:case 23:return Jt(t),kc(),e!==null&&A(xr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return na(ot),null;case 25:return null;default:return null}}function bg(e,t){switch(xc(t),t.tag){case 3:na(ot),ce();break;case 26:case 27:case 5:we(t);break;case 4:ce();break;case 31:t.memoizedState!==null&&Jt(t);break;case 13:Jt(t);break;case 19:A(at);break;case 10:na(t.type);break;case 22:case 23:Jt(t),kc(),e!==null&&A(xr);break;case 24:na(ot)}}function ji(e,t){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var u=i.next;a=u;do{if((a.tag&e)===e){i=void 0;var f=a.create,x=a.inst;i=f(),x.destroy=i}a=a.next}while(a!==u)}}catch(E){He(t,t.return,E)}}function ka(e,t,a){try{var i=t.updateQueue,u=i!==null?i.lastEffect:null;if(u!==null){var f=u.next;i=f;do{if((i.tag&e)===e){var x=i.inst,E=x.destroy;if(E!==void 0){x.destroy=void 0,u=t;var D=a,$=E;try{$()}catch(J){He(u,D,J)}}}i=i.next}while(i!==f)}}catch(J){He(t,t.return,J)}}function xg(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{cp(t,a)}catch(i){He(e,e.return,i)}}}function wg(e,t,a){a.props=Rr(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(i){He(e,t,i)}}function Mi(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof a=="function"?e.refCleanup=a(i):a.current=i}}catch(u){He(e,t,u)}}function Hn(e,t){var a=e.ref,i=e.refCleanup;if(a!==null)if(typeof i=="function")try{i()}catch(u){He(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){He(e,t,u)}else a.current=null}function Sg(e){var t=e.type,a=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&i.focus();break e;case"img":a.src?i.src=a.src:a.srcSet&&(i.srcset=a.srcSet)}}catch(u){He(e,e.return,u)}}function mf(e,t,a){try{var i=e.stateNode;R1(i,e.type,a,t),i[Ht]=t}catch(u){He(e,e.return,u)}}function Eg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$a(e.type)||e.tag===4}function pf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Eg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&$a(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function gf(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Zn));else if(i!==4&&(i===27&&$a(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(gf(e,t,a),e=e.sibling;e!==null;)gf(e,t,a),e=e.sibling}function as(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(i!==4&&(i===27&&$a(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(as(e,t,a),e=e.sibling;e!==null;)as(e,t,a),e=e.sibling}function Cg(e){var t=e.stateNode,a=e.memoizedProps;try{for(var i=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);xt(t,i,a),t[gt]=e,t[Ht]=a}catch(f){He(e,e.return,f)}}var la=!1,st=!1,vf=!1,Rg=typeof WeakSet=="function"?WeakSet:Set,pt=null;function r1(e,t){if(e=e.containerInfo,Hf=Cs,e=Um(e),uc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var i=a.getSelection&&a.getSelection();if(i&&i.rangeCount!==0){a=i.anchorNode;var u=i.anchorOffset,f=i.focusNode;i=i.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var x=0,E=-1,D=-1,$=0,J=0,te=e,V=null;t:for(;;){for(var X;te!==a||u!==0&&te.nodeType!==3||(E=x+u),te!==f||i!==0&&te.nodeType!==3||(D=x+i),te.nodeType===3&&(x+=te.nodeValue.length),(X=te.firstChild)!==null;)V=te,te=X;for(;;){if(te===e)break t;if(V===a&&++$===u&&(E=x),V===f&&++J===i&&(D=x),(X=te.nextSibling)!==null)break;te=V,V=te.parentNode}te=X}a=E===-1||D===-1?null:{start:E,end:D}}else a=null}a=a||{start:0,end:0}}else a=null;for(Bf={focusedElem:e,selectionRange:a},Cs=!1,pt=t;pt!==null;)if(t=pt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pt=e;else for(;pt!==null;){switch(t=pt,f=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)u=e[a],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,a=t,u=f.memoizedProps,f=f.memoizedState,i=a.stateNode;try{var de=Rr(a.type,u);e=i.getSnapshotBeforeUpdate(de,f),i.__reactInternalSnapshotBeforeUpdate=e}catch(xe){He(a,a.return,xe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)$f(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":$f(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(l(163))}if(e=t.sibling,e!==null){e.return=t.return,pt=e;break}pt=t.return}}function Ng(e,t,a){var i=a.flags;switch(a.tag){case 0:case 11:case 15:ua(e,a),i&4&&ji(5,a);break;case 1:if(ua(e,a),i&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(x){He(a,a.return,x)}else{var u=Rr(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){He(a,a.return,x)}}i&64&&xg(a),i&512&&Mi(a,a.return);break;case 3:if(ua(e,a),i&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{cp(e,t)}catch(x){He(a,a.return,x)}}break;case 27:t===null&&i&4&&Cg(a);case 26:case 5:ua(e,a),t===null&&i&4&&Sg(a),i&512&&Mi(a,a.return);break;case 12:ua(e,a);break;case 31:ua(e,a),i&4&&Mg(e,a);break;case 13:ua(e,a),i&4&&Ag(e,a),i&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=h1.bind(null,a),D1(e,a))));break;case 22:if(i=a.memoizedState!==null||la,!i){t=t!==null&&t.memoizedState!==null||st,u=la;var f=st;la=i,(st=t)&&!f?ca(e,a,(a.subtreeFlags&8772)!==0):ua(e,a),la=u,st=f}break;case 30:break;default:ua(e,a)}}function Tg(e){var t=e.alternate;t!==null&&(e.alternate=null,Tg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Yu(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Xe=null,Pt=!1;function sa(e,t,a){for(a=a.child;a!==null;)jg(e,t,a),a=a.sibling}function jg(e,t,a){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(sr,a)}catch{}switch(a.tag){case 26:st||Hn(a,t),sa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:st||Hn(a,t);var i=Xe,u=Pt;$a(a.type)&&(Xe=a.stateNode,Pt=!1),sa(e,t,a),Hi(a.stateNode),Xe=i,Pt=u;break;case 5:st||Hn(a,t);case 6:if(i=Xe,u=Pt,Xe=null,sa(e,t,a),Xe=i,Pt=u,Xe!==null)if(Pt)try{(Xe.nodeType===9?Xe.body:Xe.nodeName==="HTML"?Xe.ownerDocument.body:Xe).removeChild(a.stateNode)}catch(f){He(a,t,f)}else try{Xe.removeChild(a.stateNode)}catch(f){He(a,t,f)}break;case 18:Xe!==null&&(Pt?(e=Xe,xv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),To(e)):xv(Xe,a.stateNode));break;case 4:i=Xe,u=Pt,Xe=a.stateNode.containerInfo,Pt=!0,sa(e,t,a),Xe=i,Pt=u;break;case 0:case 11:case 14:case 15:ka(2,a,t),st||ka(4,a,t),sa(e,t,a);break;case 1:st||(Hn(a,t),i=a.stateNode,typeof i.componentWillUnmount=="function"&&wg(a,t,i)),sa(e,t,a);break;case 21:sa(e,t,a);break;case 22:st=(i=st)||a.memoizedState!==null,sa(e,t,a),st=i;break;default:sa(e,t,a)}}function Mg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{To(e)}catch(a){He(t,t.return,a)}}}function Ag(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{To(e)}catch(a){He(t,t.return,a)}}function o1(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Rg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Rg),t;default:throw Error(l(435,e.tag))}}function rs(e,t){var a=o1(e);t.forEach(function(i){if(!a.has(i)){a.add(i);var u=m1.bind(null,e,i);i.then(u,u)}})}function qt(e,t){var a=t.deletions;if(a!==null)for(var i=0;i<a.length;i++){var u=a[i],f=e,x=t,E=x;e:for(;E!==null;){switch(E.tag){case 27:if($a(E.type)){Xe=E.stateNode,Pt=!1;break e}break;case 5:Xe=E.stateNode,Pt=!1;break e;case 3:case 4:Xe=E.stateNode.containerInfo,Pt=!0;break e}E=E.return}if(Xe===null)throw Error(l(160));jg(f,x,u),Xe=null,Pt=!1,f=u.alternate,f!==null&&(f.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Og(t,e),t=t.sibling}var Tn=null;function Og(e,t){var a=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:qt(t,e),$t(e),i&4&&(ka(3,e,e.return),ji(3,e),ka(5,e,e.return));break;case 1:qt(t,e),$t(e),i&512&&(st||a===null||Hn(a,a.return)),i&64&&la&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?i:a.concat(i))));break;case 26:var u=Tn;if(qt(t,e),$t(e),i&512&&(st||a===null||Hn(a,a.return)),i&4){var f=a!==null?a.memoizedState:null;if(i=e.memoizedState,a===null)if(i===null)if(e.stateNode===null){e:{i=e.type,a=e.memoizedProps,u=u.ownerDocument||u;t:switch(i){case"title":f=u.getElementsByTagName("title")[0],(!f||f[ni]||f[gt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=u.createElement(i),u.head.insertBefore(f,u.querySelector("head > title"))),xt(f,i,a),f[gt]=e,mt(f),i=f;break e;case"link":var x=Ov("link","href",u).get(i+(a.href||""));if(x){for(var E=0;E<x.length;E++)if(f=x[E],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){x.splice(E,1);break t}}f=u.createElement(i),xt(f,i,a),u.head.appendChild(f);break;case"meta":if(x=Ov("meta","content",u).get(i+(a.content||""))){for(E=0;E<x.length;E++)if(f=x[E],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){x.splice(E,1);break t}}f=u.createElement(i),xt(f,i,a),u.head.appendChild(f);break;default:throw Error(l(468,i))}f[gt]=e,mt(f),i=f}e.stateNode=i}else _v(u,e.type,e.stateNode);else e.stateNode=Av(u,i,e.memoizedProps);else f!==i?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,i===null?_v(u,e.type,e.stateNode):Av(u,i,e.memoizedProps)):i===null&&e.stateNode!==null&&mf(e,e.memoizedProps,a.memoizedProps)}break;case 27:qt(t,e),$t(e),i&512&&(st||a===null||Hn(a,a.return)),a!==null&&i&4&&mf(e,e.memoizedProps,a.memoizedProps);break;case 5:if(qt(t,e),$t(e),i&512&&(st||a===null||Hn(a,a.return)),e.flags&32){u=e.stateNode;try{Kr(u,"")}catch(de){He(e,e.return,de)}}i&4&&e.stateNode!=null&&(u=e.memoizedProps,mf(e,u,a!==null?a.memoizedProps:u)),i&1024&&(vf=!0);break;case 6:if(qt(t,e),$t(e),i&4){if(e.stateNode===null)throw Error(l(162));i=e.memoizedProps,a=e.stateNode;try{a.nodeValue=i}catch(de){He(e,e.return,de)}}break;case 3:if(xs=null,u=Tn,Tn=ys(t.containerInfo),qt(t,e),Tn=u,$t(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{To(t.containerInfo)}catch(de){He(e,e.return,de)}vf&&(vf=!1,_g(e));break;case 4:i=Tn,Tn=ys(e.stateNode.containerInfo),qt(t,e),$t(e),Tn=i;break;case 12:qt(t,e),$t(e);break;case 31:qt(t,e),$t(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,rs(e,i)));break;case 13:qt(t,e),$t(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(is=jt()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,rs(e,i)));break;case 22:u=e.memoizedState!==null;var D=a!==null&&a.memoizedState!==null,$=la,J=st;if(la=$||u,st=J||D,qt(t,e),st=J,la=$,$t(e),i&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(a===null||D||la||st||Nr(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){D=a=t;try{if(f=D.stateNode,u)x=f.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{E=D.stateNode;var te=D.memoizedProps.style,V=te!=null&&te.hasOwnProperty("display")?te.display:null;E.style.display=V==null||typeof V=="boolean"?"":(""+V).trim()}}catch(de){He(D,D.return,de)}}}else if(t.tag===6){if(a===null){D=t;try{D.stateNode.nodeValue=u?"":D.memoizedProps}catch(de){He(D,D.return,de)}}}else if(t.tag===18){if(a===null){D=t;try{var X=D.stateNode;u?wv(X,!0):wv(D.stateNode,!1)}catch(de){He(D,D.return,de)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(a=i.retryQueue,a!==null&&(i.retryQueue=null,rs(e,a))));break;case 19:qt(t,e),$t(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,rs(e,i)));break;case 30:break;case 21:break;default:qt(t,e),$t(e)}}function $t(e){var t=e.flags;if(t&2){try{for(var a,i=e.return;i!==null;){if(Eg(i)){a=i;break}i=i.return}if(a==null)throw Error(l(160));switch(a.tag){case 27:var u=a.stateNode,f=pf(e);as(e,f,u);break;case 5:var x=a.stateNode;a.flags&32&&(Kr(x,""),a.flags&=-33);var E=pf(e);as(e,E,x);break;case 3:case 4:var D=a.stateNode.containerInfo,$=pf(e);gf(e,$,D);break;default:throw Error(l(161))}}catch(J){He(e,e.return,J)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _g(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_g(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ua(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Ng(e,t.alternate,t),t=t.sibling}function Nr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ka(4,t,t.return),Nr(t);break;case 1:Hn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&wg(t,t.return,a),Nr(t);break;case 27:Hi(t.stateNode);case 26:case 5:Hn(t,t.return),Nr(t);break;case 22:t.memoizedState===null&&Nr(t);break;case 30:Nr(t);break;default:Nr(t)}e=e.sibling}}function ca(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,u=e,f=t,x=f.flags;switch(f.tag){case 0:case 11:case 15:ca(u,f,a),ji(4,f);break;case 1:if(ca(u,f,a),i=f,u=i.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch($){He(i,i.return,$)}if(i=f,u=i.updateQueue,u!==null){var E=i.stateNode;try{var D=u.shared.hiddenCallbacks;if(D!==null)for(u.shared.hiddenCallbacks=null,u=0;u<D.length;u++)up(D[u],E)}catch($){He(i,i.return,$)}}a&&x&64&&xg(f),Mi(f,f.return);break;case 27:Cg(f);case 26:case 5:ca(u,f,a),a&&i===null&&x&4&&Sg(f),Mi(f,f.return);break;case 12:ca(u,f,a);break;case 31:ca(u,f,a),a&&x&4&&Mg(u,f);break;case 13:ca(u,f,a),a&&x&4&&Ag(u,f);break;case 22:f.memoizedState===null&&ca(u,f,a),Mi(f,f.return);break;case 30:break;default:ca(u,f,a)}t=t.sibling}}function yf(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&pi(a))}function bf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&pi(e))}function jn(e,t,a,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Dg(e,t,a,i),t=t.sibling}function Dg(e,t,a,i){var u=t.flags;switch(t.tag){case 0:case 11:case 15:jn(e,t,a,i),u&2048&&ji(9,t);break;case 1:jn(e,t,a,i);break;case 3:jn(e,t,a,i),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&pi(e)));break;case 12:if(u&2048){jn(e,t,a,i),e=t.stateNode;try{var f=t.memoizedProps,x=f.id,E=f.onPostCommit;typeof E=="function"&&E(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(D){He(t,t.return,D)}}else jn(e,t,a,i);break;case 31:jn(e,t,a,i);break;case 13:jn(e,t,a,i);break;case 23:break;case 22:f=t.stateNode,x=t.alternate,t.memoizedState!==null?f._visibility&2?jn(e,t,a,i):Ai(e,t):f._visibility&2?jn(e,t,a,i):(f._visibility|=2,go(e,t,a,i,(t.subtreeFlags&10256)!==0||!1)),u&2048&&yf(x,t);break;case 24:jn(e,t,a,i),u&2048&&bf(t.alternate,t);break;default:jn(e,t,a,i)}}function go(e,t,a,i,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,x=t,E=a,D=i,$=x.flags;switch(x.tag){case 0:case 11:case 15:go(f,x,E,D,u),ji(8,x);break;case 23:break;case 22:var J=x.stateNode;x.memoizedState!==null?J._visibility&2?go(f,x,E,D,u):Ai(f,x):(J._visibility|=2,go(f,x,E,D,u)),u&&$&2048&&yf(x.alternate,x);break;case 24:go(f,x,E,D,u),u&&$&2048&&bf(x.alternate,x);break;default:go(f,x,E,D,u)}t=t.sibling}}function Ai(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,i=t,u=i.flags;switch(i.tag){case 22:Ai(a,i),u&2048&&yf(i.alternate,i);break;case 24:Ai(a,i),u&2048&&bf(i.alternate,i);break;default:Ai(a,i)}t=t.sibling}}var Oi=8192;function vo(e,t,a){if(e.subtreeFlags&Oi)for(e=e.child;e!==null;)zg(e,t,a),e=e.sibling}function zg(e,t,a){switch(e.tag){case 26:vo(e,t,a),e.flags&Oi&&e.memoizedState!==null&&G1(a,Tn,e.memoizedState,e.memoizedProps);break;case 5:vo(e,t,a);break;case 3:case 4:var i=Tn;Tn=ys(e.stateNode.containerInfo),vo(e,t,a),Tn=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=Oi,Oi=16777216,vo(e,t,a),Oi=i):vo(e,t,a));break;default:vo(e,t,a)}}function kg(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function _i(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];pt=i,Ug(i,e)}kg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Lg(e),e=e.sibling}function Lg(e){switch(e.tag){case 0:case 11:case 15:_i(e),e.flags&2048&&ka(9,e,e.return);break;case 3:_i(e);break;case 12:_i(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,os(e)):_i(e);break;default:_i(e)}}function os(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];pt=i,Ug(i,e)}kg(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ka(8,t,t.return),os(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,os(t));break;default:os(t)}e=e.sibling}}function Ug(e,t){for(;pt!==null;){var a=pt;switch(a.tag){case 0:case 11:case 15:ka(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var i=a.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:pi(a.memoizedState.cache)}if(i=a.child,i!==null)i.return=a,pt=i;else e:for(a=e;pt!==null;){i=pt;var u=i.sibling,f=i.return;if(Tg(i),i===a){pt=null;break e}if(u!==null){u.return=f,pt=u;break e}pt=f}}}var i1={getCacheForType:function(e){var t=yt(ot),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return yt(ot).controller.signal}},l1=typeof WeakMap=="function"?WeakMap:Map,Le=0,Ve=null,je=null,Ae=0,Ue=0,Wt=null,La=!1,yo=!1,xf=!1,fa=0,nt=0,Ua=0,Tr=0,wf=0,en=0,bo=0,Di=null,Vt=null,Sf=!1,is=0,Hg=0,ls=1/0,ss=null,Ha=null,ct=0,Ba=null,xo=null,da=0,Ef=0,Cf=null,Bg=null,zi=0,Rf=null;function tn(){return(Le&2)!==0&&Ae!==0?Ae&-Ae:T.T!==null?Of():Fu()}function Pg(){if(en===0)if((Ae&536870912)===0||_e){var e=qr;qr<<=1,(qr&3932160)===0&&(qr=262144),en=e}else en=536870912;return e=Zt.current,e!==null&&(e.flags|=32),en}function Ft(e,t,a){(e===Ve&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)&&(wo(e,0),Pa(e,Ae,en,!1)),We(e,a),((Le&2)===0||e!==Ve)&&(e===Ve&&((Le&2)===0&&(Tr|=a),nt===4&&Pa(e,Ae,en,!1)),Bn(e))}function qg(e,t,a){if((Le&6)!==0)throw Error(l(327));var i=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Ke(e,t),u=i?c1(e,t):Tf(e,t,!0),f=i;do{if(u===0){yo&&!i&&Pa(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!s1(a)){u=Tf(e,t,!1),f=!1;continue}if(u===2){if(f=t,e.errorRecoveryDisabledLanes&f)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var E=e;u=Di;var D=E.current.memoizedState.isDehydrated;if(D&&(wo(E,x).flags|=256),x=Tf(E,x,!1),x!==2){if(xf&&!D){E.errorRecoveryDisabledLanes|=f,Tr|=f,u=4;break e}f=Vt,Vt=u,f!==null&&(Vt===null?Vt=f:Vt.push.apply(Vt,f))}u=x}if(f=!1,u!==2)continue}}if(u===1){wo(e,0),Pa(e,t,0,!0);break}e:{switch(i=e,f=u,f){case 0:case 1:throw Error(l(345));case 4:if((t&4194048)!==t)break;case 6:Pa(i,t,en,!La);break e;case 2:Vt=null;break;case 3:case 5:break;default:throw Error(l(329))}if((t&62914560)===t&&(u=is+300-jt(),10<u)){if(Pa(i,t,en,!La),Se(i,0,!0)!==0)break e;da=t,i.timeoutHandle=yv($g.bind(null,i,a,Vt,ss,Sf,t,en,Tr,bo,La,f,"Throttled",-0,0),u);break e}$g(i,a,Vt,ss,Sf,t,en,Tr,bo,La,f,null,-0,0)}}break}while(!0);Bn(e)}function $g(e,t,a,i,u,f,x,E,D,$,J,te,V,X){if(e.timeoutHandle=-1,te=t.subtreeFlags,te&8192||(te&16785408)===16785408){te={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zn},zg(t,f,te);var de=(f&62914560)===f?is-jt():(f&4194048)===f?Hg-jt():0;if(de=Y1(te,de),de!==null){da=f,e.cancelPendingCommit=de(Xg.bind(null,e,t,f,a,i,u,x,E,D,J,te,null,V,X)),Pa(e,f,x,!$);return}}Xg(e,t,f,a,i,u,x,E,D)}function s1(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var i=0;i<a.length;i++){var u=a[i],f=u.getSnapshot;u=u.value;try{if(!Kt(f(),u))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Pa(e,t,a,i){t&=~wf,t&=~Tr,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var u=t;0<u;){var f=31-Et(u),x=1<<f;i[f]=-1,u&=~x}a!==0&&cr(e,a,t)}function us(){return(Le&6)===0?(ki(0),!1):!0}function Nf(){if(je!==null){if(Ue===0)var e=je.return;else e=je,ta=yr=null,qc(e),co=null,vi=0,e=je;for(;e!==null;)bg(e.alternate,e),e=e.return;je=null}}function wo(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,j1(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),da=0,Nf(),Ve=e,je=a=Wn(e.current,null),Ae=t,Ue=0,Wt=null,La=!1,yo=Ke(e,t),xf=!1,bo=en=wf=Tr=Ua=nt=0,Vt=Di=null,Sf=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var u=31-Et(i),f=1<<u;t|=e[u],i&=~f}return fa=t,Al(),a}function Vg(e,t){Re=null,T.H=Ri,t===uo||t===Hl?(t=op(),Ue=3):t===Mc?(t=op(),Ue=4):Ue=t===af?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Wt=t,je===null&&(nt=1,Jl(e,cn(t,e.current)))}function Fg(){var e=Zt.current;return e===null?!0:(Ae&4194048)===Ae?mn===null:(Ae&62914560)===Ae||(Ae&536870912)!==0?e===mn:!1}function Gg(){var e=T.H;return T.H=Ri,e===null?Ri:e}function Yg(){var e=T.A;return T.A=i1,e}function cs(){nt=4,La||(Ae&4194048)!==Ae&&Zt.current!==null||(yo=!0),(Ua&134217727)===0&&(Tr&134217727)===0||Ve===null||Pa(Ve,Ae,en,!1)}function Tf(e,t,a){var i=Le;Le|=2;var u=Gg(),f=Yg();(Ve!==e||Ae!==t)&&(ss=null,wo(e,t)),t=!1;var x=nt;e:do try{if(Ue!==0&&je!==null){var E=je,D=Wt;switch(Ue){case 8:Nf(),x=6;break e;case 3:case 2:case 9:case 6:Zt.current===null&&(t=!0);var $=Ue;if(Ue=0,Wt=null,So(e,E,D,$),a&&yo){x=0;break e}break;default:$=Ue,Ue=0,Wt=null,So(e,E,D,$)}}u1(),x=nt;break}catch(J){Vg(e,J)}while(!0);return t&&e.shellSuspendCounter++,ta=yr=null,Le=i,T.H=u,T.A=f,je===null&&(Ve=null,Ae=0,Al()),x}function u1(){for(;je!==null;)Ig(je)}function c1(e,t){var a=Le;Le|=2;var i=Gg(),u=Yg();Ve!==e||Ae!==t?(ss=null,ls=jt()+500,wo(e,t)):yo=Ke(e,t);e:do try{if(Ue!==0&&je!==null){t=je;var f=Wt;t:switch(Ue){case 1:Ue=0,Wt=null,So(e,t,f,1);break;case 2:case 9:if(ap(f)){Ue=0,Wt=null,Qg(t);break}t=function(){Ue!==2&&Ue!==9||Ve!==e||(Ue=7),Bn(e)},f.then(t,t);break e;case 3:Ue=7;break e;case 4:Ue=5;break e;case 7:ap(f)?(Ue=0,Wt=null,Qg(t)):(Ue=0,Wt=null,So(e,t,f,7));break;case 5:var x=null;switch(je.tag){case 26:x=je.memoizedState;case 5:case 27:var E=je;if(x?Dv(x):E.stateNode.complete){Ue=0,Wt=null;var D=E.sibling;if(D!==null)je=D;else{var $=E.return;$!==null?(je=$,fs($)):je=null}break t}}Ue=0,Wt=null,So(e,t,f,5);break;case 6:Ue=0,Wt=null,So(e,t,f,6);break;case 8:Nf(),nt=6;break e;default:throw Error(l(462))}}f1();break}catch(J){Vg(e,J)}while(!0);return ta=yr=null,T.H=i,T.A=u,Le=a,je!==null?0:(Ve=null,Ae=0,Al(),nt)}function f1(){for(;je!==null&&!Tt();)Ig(je)}function Ig(e){var t=vg(e.alternate,e,fa);e.memoizedProps=e.pendingProps,t===null?fs(e):je=t}function Qg(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=fg(a,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=fg(a,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:qc(t);default:bg(a,t),t=je=Ym(t,fa),t=vg(a,t,fa)}e.memoizedProps=e.pendingProps,t===null?fs(e):je=t}function So(e,t,a,i){ta=yr=null,qc(t),co=null,vi=0;var u=t.return;try{if(WS(e,u,t,a,Ae)){nt=1,Jl(e,cn(a,e.current)),je=null;return}}catch(f){if(u!==null)throw je=u,f;nt=1,Jl(e,cn(a,e.current)),je=null;return}t.flags&32768?(_e||i===1?e=!0:yo||(Ae&536870912)!==0?e=!1:(La=e=!0,(i===2||i===9||i===3||i===6)&&(i=Zt.current,i!==null&&i.tag===13&&(i.flags|=16384))),Kg(t,e)):fs(t)}function fs(e){var t=e;do{if((t.flags&32768)!==0){Kg(t,La);return}e=t.return;var a=n1(t.alternate,t,fa);if(a!==null){je=a;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);nt===0&&(nt=5)}function Kg(e,t){do{var a=a1(e.alternate,e);if(a!==null){a.flags&=32767,je=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){je=e;return}je=e=a}while(e!==null);nt=6,je=null}function Xg(e,t,a,i,u,f,x,E,D){e.cancelPendingCommit=null;do ds();while(ct!==0);if((Le&6)!==0)throw Error(l(327));if(t!==null){if(t===e.current)throw Error(l(177));if(f=t.lanes|t.childLanes,f|=mc,kt(e,a,f,x,E,D),e===Ve&&(je=Ve=null,Ae=0),xo=t,Ba=e,da=a,Ef=f,Cf=u,Bg=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,p1(lr,function(){return tv(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=T.T,T.T=null,u=U.p,U.p=2,x=Le,Le|=4;try{r1(e,t,a)}finally{Le=x,U.p=u,T.T=i}}ct=1,Zg(),Jg(),Wg()}}function Zg(){if(ct===1){ct=0;var e=Ba,t=xo,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=T.T,T.T=null;var i=U.p;U.p=2;var u=Le;Le|=4;try{Og(t,e);var f=Bf,x=Um(e.containerInfo),E=f.focusedElem,D=f.selectionRange;if(x!==E&&E&&E.ownerDocument&&Lm(E.ownerDocument.documentElement,E)){if(D!==null&&uc(E)){var $=D.start,J=D.end;if(J===void 0&&(J=$),"selectionStart"in E)E.selectionStart=$,E.selectionEnd=Math.min(J,E.value.length);else{var te=E.ownerDocument||document,V=te&&te.defaultView||window;if(V.getSelection){var X=V.getSelection(),de=E.textContent.length,xe=Math.min(D.start,de),qe=D.end===void 0?xe:Math.min(D.end,de);!X.extend&&xe>qe&&(x=qe,qe=xe,xe=x);var H=km(E,xe),z=km(E,qe);if(H&&z&&(X.rangeCount!==1||X.anchorNode!==H.node||X.anchorOffset!==H.offset||X.focusNode!==z.node||X.focusOffset!==z.offset)){var q=te.createRange();q.setStart(H.node,H.offset),X.removeAllRanges(),xe>qe?(X.addRange(q),X.extend(z.node,z.offset)):(q.setEnd(z.node,z.offset),X.addRange(q))}}}}for(te=[],X=E;X=X.parentNode;)X.nodeType===1&&te.push({element:X,left:X.scrollLeft,top:X.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<te.length;E++){var ee=te[E];ee.element.scrollLeft=ee.left,ee.element.scrollTop=ee.top}}Cs=!!Hf,Bf=Hf=null}finally{Le=u,U.p=i,T.T=a}}e.current=t,ct=2}}function Jg(){if(ct===2){ct=0;var e=Ba,t=xo,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=T.T,T.T=null;var i=U.p;U.p=2;var u=Le;Le|=4;try{Ng(e,t.alternate,t)}finally{Le=u,U.p=i,T.T=a}}ct=3}}function Wg(){if(ct===4||ct===3){ct=0,wa();var e=Ba,t=xo,a=da,i=Bg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ct=5:(ct=0,xo=Ba=null,ev(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Ha=null),Rn(a),t=t.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(sr,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=T.T,u=U.p,U.p=2,T.T=null;try{for(var f=e.onRecoverableError,x=0;x<i.length;x++){var E=i[x];f(E.value,{componentStack:E.stack})}}finally{T.T=t,U.p=u}}(da&3)!==0&&ds(),Bn(e),u=e.pendingLanes,(a&261930)!==0&&(u&42)!==0?e===Rf?zi++:(zi=0,Rf=e):zi=0,ki(0)}}function ev(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,pi(t)))}function ds(){return Zg(),Jg(),Wg(),tv()}function tv(){if(ct!==5)return!1;var e=Ba,t=Ef;Ef=0;var a=Rn(da),i=T.T,u=U.p;try{U.p=32>a?32:a,T.T=null,a=Cf,Cf=null;var f=Ba,x=da;if(ct=0,xo=Ba=null,da=0,(Le&6)!==0)throw Error(l(331));var E=Le;if(Le|=4,Lg(f.current),Dg(f,f.current,x,a),Le=E,ki(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(sr,f)}catch{}return!0}finally{U.p=u,T.T=i,ev(e,t)}}function nv(e,t,a){t=cn(a,t),t=nf(e.stateNode,t,2),e=_a(e,t,2),e!==null&&(We(e,2),Bn(e))}function He(e,t,a){if(e.tag===3)nv(e,e,a);else for(;t!==null;){if(t.tag===3){nv(t,e,a);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Ha===null||!Ha.has(i))){e=cn(a,e),a=ag(2),i=_a(t,a,2),i!==null&&(rg(a,i,t,e),We(i,2),Bn(i));break}}t=t.return}}function jf(e,t,a){var i=e.pingCache;if(i===null){i=e.pingCache=new l1;var u=new Set;i.set(t,u)}else u=i.get(t),u===void 0&&(u=new Set,i.set(t,u));u.has(a)||(xf=!0,u.add(a),e=d1.bind(null,e,t,a),t.then(e,e))}function d1(e,t,a){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ve===e&&(Ae&a)===a&&(nt===4||nt===3&&(Ae&62914560)===Ae&&300>jt()-is?(Le&2)===0&&wo(e,0):wf|=a,bo===Ae&&(bo=0)),Bn(e)}function av(e,t){t===0&&(t=Ct()),e=pr(e,t),e!==null&&(We(e,t),Bn(e))}function h1(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),av(e,a)}function m1(e,t){var a=0;switch(e.tag){case 31:case 13:var i=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(l(314))}i!==null&&i.delete(t),av(e,a)}function p1(e,t){return Jo(e,t)}var hs=null,Eo=null,Mf=!1,ms=!1,Af=!1,qa=0;function Bn(e){e!==Eo&&e.next===null&&(Eo===null?hs=Eo=e:Eo=Eo.next=e),ms=!0,Mf||(Mf=!0,v1())}function ki(e,t){if(!Af&&ms){Af=!0;do for(var a=!1,i=hs;i!==null;){if(e!==0){var u=i.pendingLanes;if(u===0)var f=0;else{var x=i.suspendedLanes,E=i.pingedLanes;f=(1<<31-Et(42|e)+1)-1,f&=u&~(x&~E),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,lv(i,f))}else f=Ae,f=Se(i,i===Ve?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(f&3)===0||Ke(i,f)||(a=!0,lv(i,f));i=i.next}while(a);Af=!1}}function g1(){rv()}function rv(){ms=Mf=!1;var e=0;qa!==0&&T1()&&(e=qa);for(var t=jt(),a=null,i=hs;i!==null;){var u=i.next,f=ov(i,t);f===0?(i.next=null,a===null?hs=u:a.next=u,u===null&&(Eo=a)):(a=i,(e!==0||(f&3)!==0)&&(ms=!0)),i=u}ct!==0&&ct!==5||ki(e),qa!==0&&(qa=0)}function ov(e,t){for(var a=e.suspendedLanes,i=e.pingedLanes,u=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var x=31-Et(f),E=1<<x,D=u[x];D===-1?((E&a)===0||(E&i)!==0)&&(u[x]=ht(E,t)):D<=t&&(e.expiredLanes|=E),f&=~E}if(t=Ve,a=Ae,a=Se(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,a===0||e===t&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&Wo(i),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Ke(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(i!==null&&Wo(i),Rn(a)){case 2:case 8:a=vl;break;case 32:a=lr;break;case 268435456:a=Kn;break;default:a=lr}return i=iv.bind(null,e),a=Jo(a,i),e.callbackPriority=t,e.callbackNode=a,t}return i!==null&&i!==null&&Wo(i),e.callbackPriority=2,e.callbackNode=null,2}function iv(e,t){if(ct!==0&&ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(ds()&&e.callbackNode!==a)return null;var i=Ae;return i=Se(e,e===Ve?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(qg(e,i,t),ov(e,jt()),e.callbackNode!=null&&e.callbackNode===a?iv.bind(null,e):null)}function lv(e,t){if(ds())return null;qg(e,t,!0)}function v1(){M1(function(){(Le&6)!==0?Jo(ir,g1):rv()})}function Of(){if(qa===0){var e=lo;e===0&&(e=Pr,Pr<<=1,(Pr&261888)===0&&(Pr=256)),qa=e}return qa}function sv(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Sl(""+e)}function uv(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function y1(e,t,a,i,u){if(t==="submit"&&a&&a.stateNode===u){var f=sv((u[Ht]||null).action),x=i.submitter;x&&(t=(t=x[Ht]||null)?sv(t.formAction):x.getAttribute("formAction"),t!==null&&(f=t,x=null));var E=new Nl("action","action",null,i,u);e.push({event:E,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(qa!==0){var D=x?uv(u,x):new FormData(u);Xc(a,{pending:!0,data:D,method:u.method,action:f},null,D)}}else typeof f=="function"&&(E.preventDefault(),D=x?uv(u,x):new FormData(u),Xc(a,{pending:!0,data:D,method:u.method,action:f},f,D))},currentTarget:u}]})}}for(var _f=0;_f<hc.length;_f++){var Df=hc[_f],b1=Df.toLowerCase(),x1=Df[0].toUpperCase()+Df.slice(1);Nn(b1,"on"+x1)}Nn(Pm,"onAnimationEnd"),Nn(qm,"onAnimationIteration"),Nn($m,"onAnimationStart"),Nn("dblclick","onDoubleClick"),Nn("focusin","onFocus"),Nn("focusout","onBlur"),Nn(LS,"onTransitionRun"),Nn(US,"onTransitionStart"),Nn(HS,"onTransitionCancel"),Nn(Vm,"onTransitionEnd"),Ir("onMouseEnter",["mouseout","mouseover"]),Ir("onMouseLeave",["mouseout","mouseover"]),Ir("onPointerEnter",["pointerout","pointerover"]),Ir("onPointerLeave",["pointerout","pointerover"]),fr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fr("onBeforeInput",["compositionend","keypress","textInput","paste"]),fr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Li="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),w1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Li));function cv(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var i=e[a],u=i.event;i=i.listeners;e:{var f=void 0;if(t)for(var x=i.length-1;0<=x;x--){var E=i[x],D=E.instance,$=E.currentTarget;if(E=E.listener,D!==f&&u.isPropagationStopped())break e;f=E,u.currentTarget=$;try{f(u)}catch(J){Ml(J)}u.currentTarget=null,f=D}else for(x=0;x<i.length;x++){if(E=i[x],D=E.instance,$=E.currentTarget,E=E.listener,D!==f&&u.isPropagationStopped())break e;f=E,u.currentTarget=$;try{f(u)}catch(J){Ml(J)}u.currentTarget=null,f=D}}}}function Me(e,t){var a=t[Gu];a===void 0&&(a=t[Gu]=new Set);var i=e+"__bubble";a.has(i)||(fv(t,e,2,!1),a.add(i))}function zf(e,t,a){var i=0;t&&(i|=4),fv(a,e,i,t)}var ps="_reactListening"+Math.random().toString(36).slice(2);function kf(e){if(!e[ps]){e[ps]=!0,rm.forEach(function(a){a!=="selectionchange"&&(w1.has(a)||zf(a,!1,e),zf(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ps]||(t[ps]=!0,zf("selectionchange",!1,t))}}function fv(e,t,a,i){switch(Pv(t)){case 2:var u=K1;break;case 8:u=X1;break;default:u=Xf}a=u.bind(null,t,a,e),u=void 0,!ec||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),i?u!==void 0?e.addEventListener(t,a,{capture:!0,passive:u}):e.addEventListener(t,a,!0):u!==void 0?e.addEventListener(t,a,{passive:u}):e.addEventListener(t,a,!1)}function Lf(e,t,a,i,u){var f=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var x=i.tag;if(x===3||x===4){var E=i.stateNode.containerInfo;if(E===u)break;if(x===4)for(x=i.return;x!==null;){var D=x.tag;if((D===3||D===4)&&x.stateNode.containerInfo===u)return;x=x.return}for(;E!==null;){if(x=Fr(E),x===null)return;if(D=x.tag,D===5||D===6||D===26||D===27){i=f=x;continue e}E=E.parentNode}}i=i.return}gm(function(){var $=f,J=Ju(a),te=[];e:{var V=Fm.get(e);if(V!==void 0){var X=Nl,de=e;switch(e){case"keypress":if(Cl(a)===0)break e;case"keydown":case"keyup":X=mS;break;case"focusin":de="focus",X=rc;break;case"focusout":de="blur",X=rc;break;case"beforeblur":case"afterblur":X=rc;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":X=bm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=nS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=vS;break;case Pm:case qm:case $m:X=oS;break;case Vm:X=bS;break;case"scroll":case"scrollend":X=eS;break;case"wheel":X=wS;break;case"copy":case"cut":case"paste":X=lS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=wm;break;case"toggle":case"beforetoggle":X=ES}var xe=(t&4)!==0,qe=!xe&&(e==="scroll"||e==="scrollend"),H=xe?V!==null?V+"Capture":null:V;xe=[];for(var z=$,q;z!==null;){var ee=z;if(q=ee.stateNode,ee=ee.tag,ee!==5&&ee!==26&&ee!==27||q===null||H===null||(ee=ri(z,H),ee!=null&&xe.push(Ui(z,ee,q))),qe)break;z=z.return}0<xe.length&&(V=new X(V,de,null,a,J),te.push({event:V,listeners:xe}))}}if((t&7)===0){e:{if(V=e==="mouseover"||e==="pointerover",X=e==="mouseout"||e==="pointerout",V&&a!==Zu&&(de=a.relatedTarget||a.fromElement)&&(Fr(de)||de[Vr]))break e;if((X||V)&&(V=J.window===J?J:(V=J.ownerDocument)?V.defaultView||V.parentWindow:window,X?(de=a.relatedTarget||a.toElement,X=$,de=de?Fr(de):null,de!==null&&(qe=c(de),xe=de.tag,de!==qe||xe!==5&&xe!==27&&xe!==6)&&(de=null)):(X=null,de=$),X!==de)){if(xe=bm,ee="onMouseLeave",H="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(xe=wm,ee="onPointerLeave",H="onPointerEnter",z="pointer"),qe=X==null?V:ai(X),q=de==null?V:ai(de),V=new xe(ee,z+"leave",X,a,J),V.target=qe,V.relatedTarget=q,ee=null,Fr(J)===$&&(xe=new xe(H,z+"enter",de,a,J),xe.target=q,xe.relatedTarget=qe,ee=xe),qe=ee,X&&de)t:{for(xe=S1,H=X,z=de,q=0,ee=H;ee;ee=xe(ee))q++;ee=0;for(var be=z;be;be=xe(be))ee++;for(;0<q-ee;)H=xe(H),q--;for(;0<ee-q;)z=xe(z),ee--;for(;q--;){if(H===z||z!==null&&H===z.alternate){xe=H;break t}H=xe(H),z=xe(z)}xe=null}else xe=null;X!==null&&dv(te,V,X,xe,!1),de!==null&&qe!==null&&dv(te,qe,de,xe,!0)}}e:{if(V=$?ai($):window,X=V.nodeName&&V.nodeName.toLowerCase(),X==="select"||X==="input"&&V.type==="file")var ze=Mm;else if(Tm(V))if(Am)ze=DS;else{ze=OS;var ye=AS}else X=V.nodeName,!X||X.toLowerCase()!=="input"||V.type!=="checkbox"&&V.type!=="radio"?$&&Xu($.elementType)&&(ze=Mm):ze=_S;if(ze&&(ze=ze(e,$))){jm(te,ze,a,J);break e}ye&&ye(e,V,$),e==="focusout"&&$&&V.type==="number"&&$.memoizedProps.value!=null&&Ku(V,"number",V.value)}switch(ye=$?ai($):window,e){case"focusin":(Tm(ye)||ye.contentEditable==="true")&&(Wr=ye,cc=$,di=null);break;case"focusout":di=cc=Wr=null;break;case"mousedown":fc=!0;break;case"contextmenu":case"mouseup":case"dragend":fc=!1,Hm(te,a,J);break;case"selectionchange":if(kS)break;case"keydown":case"keyup":Hm(te,a,J)}var Ne;if(ic)e:{switch(e){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else Jr?Rm(e,a)&&(Oe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Oe="onCompositionStart");Oe&&(Sm&&a.locale!=="ko"&&(Jr||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&Jr&&(Ne=vm()):(Ra=J,tc="value"in Ra?Ra.value:Ra.textContent,Jr=!0)),ye=gs($,Oe),0<ye.length&&(Oe=new xm(Oe,e,null,a,J),te.push({event:Oe,listeners:ye}),Ne?Oe.data=Ne:(Ne=Nm(a),Ne!==null&&(Oe.data=Ne)))),(Ne=RS?NS(e,a):TS(e,a))&&(Oe=gs($,"onBeforeInput"),0<Oe.length&&(ye=new xm("onBeforeInput","beforeinput",null,a,J),te.push({event:ye,listeners:Oe}),ye.data=Ne)),y1(te,e,$,a,J)}cv(te,t)})}function Ui(e,t,a){return{instance:e,listener:t,currentTarget:a}}function gs(e,t){for(var a=t+"Capture",i=[];e!==null;){var u=e,f=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||f===null||(u=ri(e,a),u!=null&&i.unshift(Ui(e,u,f)),u=ri(e,t),u!=null&&i.push(Ui(e,u,f))),e.tag===3)return i;e=e.return}return[]}function S1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function dv(e,t,a,i,u){for(var f=t._reactName,x=[];a!==null&&a!==i;){var E=a,D=E.alternate,$=E.stateNode;if(E=E.tag,D!==null&&D===i)break;E!==5&&E!==26&&E!==27||$===null||(D=$,u?($=ri(a,f),$!=null&&x.unshift(Ui(a,$,D))):u||($=ri(a,f),$!=null&&x.push(Ui(a,$,D)))),a=a.return}x.length!==0&&e.push({event:t,listeners:x})}var E1=/\r\n?/g,C1=/\u0000|\uFFFD/g;function hv(e){return(typeof e=="string"?e:""+e).replace(E1,`
10
+ `).replace(C1,"")}function mv(e,t){return t=hv(t),hv(e)===t}function Pe(e,t,a,i,u,f){switch(a){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||Kr(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&Kr(e,""+i);break;case"className":xl(e,"class",i);break;case"tabIndex":xl(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":xl(e,a,i);break;case"style":mm(e,i,f);break;case"data":if(t!=="object"){xl(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=Sl(""+i),e.setAttribute(a,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(a==="formAction"?(t!=="input"&&Pe(e,t,"name",u.name,u,null),Pe(e,t,"formEncType",u.formEncType,u,null),Pe(e,t,"formMethod",u.formMethod,u,null),Pe(e,t,"formTarget",u.formTarget,u,null)):(Pe(e,t,"encType",u.encType,u,null),Pe(e,t,"method",u.method,u,null),Pe(e,t,"target",u.target,u,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=Sl(""+i),e.setAttribute(a,i);break;case"onClick":i!=null&&(e.onclick=Zn);break;case"onScroll":i!=null&&Me("scroll",e);break;case"onScrollEnd":i!=null&&Me("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(l(61));if(a=i.__html,a!=null){if(u.children!=null)throw Error(l(60));e.innerHTML=a}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}a=Sl(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""+i):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":i===!0?e.setAttribute(a,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,i):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(a,i):e.removeAttribute(a);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(a):e.setAttribute(a,i);break;case"popover":Me("beforetoggle",e),Me("toggle",e),bl(e,"popover",i);break;case"xlinkActuate":Xn(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":Xn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":Xn(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":Xn(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":Xn(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":Xn(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":bl(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Jw.get(a)||a,bl(e,a,i))}}function Uf(e,t,a,i,u,f){switch(a){case"style":mm(e,i,f);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(l(61));if(a=i.__html,a!=null){if(u.children!=null)throw Error(l(60));e.innerHTML=a}}break;case"children":typeof i=="string"?Kr(e,i):(typeof i=="number"||typeof i=="bigint")&&Kr(e,""+i);break;case"onScroll":i!=null&&Me("scroll",e);break;case"onScrollEnd":i!=null&&Me("scrollend",e);break;case"onClick":i!=null&&(e.onclick=Zn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!om.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),t=a.slice(2,u?a.length-7:void 0),f=e[Ht]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(t,f,u),typeof i=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,i,u);break e}a in e?e[a]=i:i===!0?e.setAttribute(a,""):bl(e,a,i)}}}function xt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",e),Me("load",e);var i=!1,u=!1,f;for(f in a)if(a.hasOwnProperty(f)){var x=a[f];if(x!=null)switch(f){case"src":i=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:Pe(e,t,f,x,a,null)}}u&&Pe(e,t,"srcSet",a.srcSet,a,null),i&&Pe(e,t,"src",a.src,a,null);return;case"input":Me("invalid",e);var E=f=x=u=null,D=null,$=null;for(i in a)if(a.hasOwnProperty(i)){var J=a[i];if(J!=null)switch(i){case"name":u=J;break;case"type":x=J;break;case"checked":D=J;break;case"defaultChecked":$=J;break;case"value":f=J;break;case"defaultValue":E=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(l(137,t));break;default:Pe(e,t,i,J,a,null)}}cm(e,f,E,D,$,x,u,!1);return;case"select":Me("invalid",e),i=x=f=null;for(u in a)if(a.hasOwnProperty(u)&&(E=a[u],E!=null))switch(u){case"value":f=E;break;case"defaultValue":x=E;break;case"multiple":i=E;default:Pe(e,t,u,E,a,null)}t=f,a=x,e.multiple=!!i,t!=null?Qr(e,!!i,t,!1):a!=null&&Qr(e,!!i,a,!0);return;case"textarea":Me("invalid",e),f=u=i=null;for(x in a)if(a.hasOwnProperty(x)&&(E=a[x],E!=null))switch(x){case"value":i=E;break;case"defaultValue":u=E;break;case"children":f=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(l(91));break;default:Pe(e,t,x,E,a,null)}dm(e,i,u,f);return;case"option":for(D in a)a.hasOwnProperty(D)&&(i=a[D],i!=null)&&(D==="selected"?e.selected=i&&typeof i!="function"&&typeof i!="symbol":Pe(e,t,D,i,a,null));return;case"dialog":Me("beforetoggle",e),Me("toggle",e),Me("cancel",e),Me("close",e);break;case"iframe":case"object":Me("load",e);break;case"video":case"audio":for(i=0;i<Li.length;i++)Me(Li[i],e);break;case"image":Me("error",e),Me("load",e);break;case"details":Me("toggle",e);break;case"embed":case"source":case"link":Me("error",e),Me("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for($ in a)if(a.hasOwnProperty($)&&(i=a[$],i!=null))switch($){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:Pe(e,t,$,i,a,null)}return;default:if(Xu(t)){for(J in a)a.hasOwnProperty(J)&&(i=a[J],i!==void 0&&Uf(e,t,J,i,a,void 0));return}}for(E in a)a.hasOwnProperty(E)&&(i=a[E],i!=null&&Pe(e,t,E,i,a,null))}function R1(e,t,a,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,f=null,x=null,E=null,D=null,$=null,J=null;for(X in a){var te=a[X];if(a.hasOwnProperty(X)&&te!=null)switch(X){case"checked":break;case"value":break;case"defaultValue":D=te;default:i.hasOwnProperty(X)||Pe(e,t,X,null,i,te)}}for(var V in i){var X=i[V];if(te=a[V],i.hasOwnProperty(V)&&(X!=null||te!=null))switch(V){case"type":f=X;break;case"name":u=X;break;case"checked":$=X;break;case"defaultChecked":J=X;break;case"value":x=X;break;case"defaultValue":E=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(l(137,t));break;default:X!==te&&Pe(e,t,V,X,i,te)}}Qu(e,x,E,D,$,J,f,u);return;case"select":X=x=E=V=null;for(f in a)if(D=a[f],a.hasOwnProperty(f)&&D!=null)switch(f){case"value":break;case"multiple":X=D;default:i.hasOwnProperty(f)||Pe(e,t,f,null,i,D)}for(u in i)if(f=i[u],D=a[u],i.hasOwnProperty(u)&&(f!=null||D!=null))switch(u){case"value":V=f;break;case"defaultValue":E=f;break;case"multiple":x=f;default:f!==D&&Pe(e,t,u,f,i,D)}t=E,a=x,i=X,V!=null?Qr(e,!!a,V,!1):!!i!=!!a&&(t!=null?Qr(e,!!a,t,!0):Qr(e,!!a,a?[]:"",!1));return;case"textarea":X=V=null;for(E in a)if(u=a[E],a.hasOwnProperty(E)&&u!=null&&!i.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:Pe(e,t,E,null,i,u)}for(x in i)if(u=i[x],f=a[x],i.hasOwnProperty(x)&&(u!=null||f!=null))switch(x){case"value":V=u;break;case"defaultValue":X=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(l(91));break;default:u!==f&&Pe(e,t,x,u,i,f)}fm(e,V,X);return;case"option":for(var de in a)V=a[de],a.hasOwnProperty(de)&&V!=null&&!i.hasOwnProperty(de)&&(de==="selected"?e.selected=!1:Pe(e,t,de,null,i,V));for(D in i)V=i[D],X=a[D],i.hasOwnProperty(D)&&V!==X&&(V!=null||X!=null)&&(D==="selected"?e.selected=V&&typeof V!="function"&&typeof V!="symbol":Pe(e,t,D,V,i,X));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var xe in a)V=a[xe],a.hasOwnProperty(xe)&&V!=null&&!i.hasOwnProperty(xe)&&Pe(e,t,xe,null,i,V);for($ in i)if(V=i[$],X=a[$],i.hasOwnProperty($)&&V!==X&&(V!=null||X!=null))switch($){case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(l(137,t));break;default:Pe(e,t,$,V,i,X)}return;default:if(Xu(t)){for(var qe in a)V=a[qe],a.hasOwnProperty(qe)&&V!==void 0&&!i.hasOwnProperty(qe)&&Uf(e,t,qe,void 0,i,V);for(J in i)V=i[J],X=a[J],!i.hasOwnProperty(J)||V===X||V===void 0&&X===void 0||Uf(e,t,J,V,i,X);return}}for(var H in a)V=a[H],a.hasOwnProperty(H)&&V!=null&&!i.hasOwnProperty(H)&&Pe(e,t,H,null,i,V);for(te in i)V=i[te],X=a[te],!i.hasOwnProperty(te)||V===X||V==null&&X==null||Pe(e,t,te,V,i,X)}function pv(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function N1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),i=0;i<a.length;i++){var u=a[i],f=u.transferSize,x=u.initiatorType,E=u.duration;if(f&&E&&pv(x)){for(x=0,E=u.responseEnd,i+=1;i<a.length;i++){var D=a[i],$=D.startTime;if($>E)break;var J=D.transferSize,te=D.initiatorType;J&&pv(te)&&(D=D.responseEnd,x+=J*(D<E?1:(E-$)/(D-$)))}if(--i,t+=8*(f+x)/(u.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Hf=null,Bf=null;function vs(e){return e.nodeType===9?e:e.ownerDocument}function gv(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function vv(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Pf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var qf=null;function T1(){var e=window.event;return e&&e.type==="popstate"?e===qf?!1:(qf=e,!0):(qf=null,!1)}var yv=typeof setTimeout=="function"?setTimeout:void 0,j1=typeof clearTimeout=="function"?clearTimeout:void 0,bv=typeof Promise=="function"?Promise:void 0,M1=typeof queueMicrotask=="function"?queueMicrotask:typeof bv<"u"?function(e){return bv.resolve(null).then(e).catch(A1)}:yv;function A1(e){setTimeout(function(){throw e})}function $a(e){return e==="head"}function xv(e,t){var a=t,i=0;do{var u=a.nextSibling;if(e.removeChild(a),u&&u.nodeType===8)if(a=u.data,a==="/$"||a==="/&"){if(i===0){e.removeChild(u),To(t);return}i--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")i++;else if(a==="html")Hi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Hi(a);for(var f=a.firstChild;f;){var x=f.nextSibling,E=f.nodeName;f[ni]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=x}}else a==="body"&&Hi(e.ownerDocument.body);a=u}while(a);To(t)}function wv(e,t){var a=e;e=0;do{var i=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),i&&i.nodeType===8)if(a=i.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=i}while(a)}function $f(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":$f(a),Yu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function O1(e,t,a,i){for(;e.nodeType===1;){var u=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[ni])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=pn(e.nextSibling),e===null)break}return null}function _1(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=pn(e.nextSibling),e===null))return null;return e}function Sv(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=pn(e.nextSibling),e===null))return null;return e}function Vf(e){return e.data==="$?"||e.data==="$~"}function Ff(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function D1(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var i=function(){t(),a.removeEventListener("DOMContentLoaded",i)};a.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function pn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Gf=null;function Ev(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return pn(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Cv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Rv(e,t,a){switch(t=vs(a),e){case"html":if(e=t.documentElement,!e)throw Error(l(452));return e;case"head":if(e=t.head,!e)throw Error(l(453));return e;case"body":if(e=t.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function Hi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Yu(e)}var gn=new Map,Nv=new Set;function ys(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ha=U.d;U.d={f:z1,r:k1,D:L1,C:U1,L:H1,m:B1,X:q1,S:P1,M:$1};function z1(){var e=ha.f(),t=us();return e||t}function k1(e){var t=Gr(e);t!==null&&t.tag===5&&t.type==="form"?Vp(t):ha.r(e)}var Co=typeof document>"u"?null:document;function Tv(e,t,a){var i=Co;if(i&&typeof t=="string"&&t){var u=sn(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),Nv.has(u)||(Nv.add(u),e={rel:e,crossOrigin:a,href:t},i.querySelector(u)===null&&(t=i.createElement("link"),xt(t,"link",e),mt(t),i.head.appendChild(t)))}}function L1(e){ha.D(e),Tv("dns-prefetch",e,null)}function U1(e,t){ha.C(e,t),Tv("preconnect",e,t)}function H1(e,t,a){ha.L(e,t,a);var i=Co;if(i&&e&&t){var u='link[rel="preload"][as="'+sn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+sn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+sn(a.imageSizes)+'"]')):u+='[href="'+sn(e)+'"]';var f=u;switch(t){case"style":f=Ro(e);break;case"script":f=No(e)}gn.has(f)||(e=p({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),gn.set(f,e),i.querySelector(u)!==null||t==="style"&&i.querySelector(Bi(f))||t==="script"&&i.querySelector(Pi(f))||(t=i.createElement("link"),xt(t,"link",e),mt(t),i.head.appendChild(t)))}}function B1(e,t){ha.m(e,t);var a=Co;if(a&&e){var i=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+sn(i)+'"][href="'+sn(e)+'"]',f=u;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=No(e)}if(!gn.has(f)&&(e=p({rel:"modulepreload",href:e},t),gn.set(f,e),a.querySelector(u)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Pi(f)))return}i=a.createElement("link"),xt(i,"link",e),mt(i),a.head.appendChild(i)}}}function P1(e,t,a){ha.S(e,t,a);var i=Co;if(i&&e){var u=Yr(i).hoistableStyles,f=Ro(e);t=t||"default";var x=u.get(f);if(!x){var E={loading:0,preload:null};if(x=i.querySelector(Bi(f)))E.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":t},a),(a=gn.get(f))&&Yf(e,a);var D=x=i.createElement("link");mt(D),xt(D,"link",e),D._p=new Promise(function($,J){D.onload=$,D.onerror=J}),D.addEventListener("load",function(){E.loading|=1}),D.addEventListener("error",function(){E.loading|=2}),E.loading|=4,bs(x,t,i)}x={type:"stylesheet",instance:x,count:1,state:E},u.set(f,x)}}}function q1(e,t){ha.X(e,t);var a=Co;if(a&&e){var i=Yr(a).hoistableScripts,u=No(e),f=i.get(u);f||(f=a.querySelector(Pi(u)),f||(e=p({src:e,async:!0},t),(t=gn.get(u))&&If(e,t),f=a.createElement("script"),mt(f),xt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},i.set(u,f))}}function $1(e,t){ha.M(e,t);var a=Co;if(a&&e){var i=Yr(a).hoistableScripts,u=No(e),f=i.get(u);f||(f=a.querySelector(Pi(u)),f||(e=p({src:e,async:!0,type:"module"},t),(t=gn.get(u))&&If(e,t),f=a.createElement("script"),mt(f),xt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},i.set(u,f))}}function jv(e,t,a,i){var u=(u=re.current)?ys(u):null;if(!u)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Ro(a.href),a=Yr(u).hoistableStyles,i=a.get(t),i||(i={type:"style",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ro(a.href);var f=Yr(u).hoistableStyles,x=f.get(e);if(x||(u=u.ownerDocument||u,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,x),(f=u.querySelector(Bi(e)))&&!f._p&&(x.instance=f,x.state.loading=5),gn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},gn.set(e,a),f||V1(u,e,a,x.state))),t&&i===null)throw Error(l(528,""));return x}if(t&&i!==null)throw Error(l(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=No(a),a=Yr(u).hoistableScripts,i=a.get(t),i||(i={type:"script",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function Ro(e){return'href="'+sn(e)+'"'}function Bi(e){return'link[rel="stylesheet"]['+e+"]"}function Mv(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function V1(e,t,a,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),xt(t,"link",a),mt(t),e.head.appendChild(t))}function No(e){return'[src="'+sn(e)+'"]'}function Pi(e){return"script[async]"+e}function Av(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+sn(a.href)+'"]');if(i)return t.instance=i,mt(i),i;var u=p({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),mt(i),xt(i,"style",u),bs(i,a.precedence,e),t.instance=i;case"stylesheet":u=Ro(a.href);var f=e.querySelector(Bi(u));if(f)return t.state.loading|=4,t.instance=f,mt(f),f;i=Mv(a),(u=gn.get(u))&&Yf(i,u),f=(e.ownerDocument||e).createElement("link"),mt(f);var x=f;return x._p=new Promise(function(E,D){x.onload=E,x.onerror=D}),xt(f,"link",i),t.state.loading|=4,bs(f,a.precedence,e),t.instance=f;case"script":return f=No(a.src),(u=e.querySelector(Pi(f)))?(t.instance=u,mt(u),u):(i=a,(u=gn.get(f))&&(i=p({},a),If(i,u)),e=e.ownerDocument||e,u=e.createElement("script"),mt(u),xt(u,"link",i),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(l(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,bs(i,a.precedence,e));return t.instance}function bs(e,t,a){for(var i=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=i.length?i[i.length-1]:null,f=u,x=0;x<i.length;x++){var E=i[x];if(E.dataset.precedence===t)f=E;else if(f!==u)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Yf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function If(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var xs=null;function Ov(e,t,a){if(xs===null){var i=new Map,u=xs=new Map;u.set(a,i)}else u=xs,i=u.get(a),i||(i=new Map,u.set(a,i));if(i.has(e))return i;for(i.set(e,null),a=a.getElementsByTagName(e),u=0;u<a.length;u++){var f=a[u];if(!(f[ni]||f[gt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var x=f.getAttribute(t)||"";x=e+x;var E=i.get(x);E?E.push(f):i.set(x,[f])}}return i}function _v(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function F1(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Dv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function G1(e,t,a,i){if(a.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=Ro(i.href),f=t.querySelector(Bi(u));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ws.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=f,mt(f);return}f=t.ownerDocument||t,i=Mv(i),(u=gn.get(u))&&Yf(i,u),f=f.createElement("link"),mt(f);var x=f;x._p=new Promise(function(E,D){x.onload=E,x.onerror=D}),xt(f,"link",i),a.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=ws.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Qf=0;function Y1(e,t){return e.stylesheets&&e.count===0&&Es(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var i=setTimeout(function(){if(e.stylesheets&&Es(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&Qf===0&&(Qf=62500*N1());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Es(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Qf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(u)}}:null}function ws(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Es(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ss=null;function Es(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ss=new Map,t.forEach(I1,e),Ss=null,ws.call(e))}function I1(e,t){if(!(t.state.loading&4)){var a=Ss.get(e);if(a)var i=a.get(null);else{a=new Map,Ss.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<u.length;f++){var x=u[f];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(a.set(x.dataset.precedence,x),i=x)}i&&a.set(null,i)}u=t.instance,x=u.getAttribute("data-precedence"),f=a.get(x)||i,f===i&&a.set(null,u),a.set(x,u),this.count++,i=ws.bind(this),u.addEventListener("load",i),u.addEventListener("error",i),f?f.parentNode.insertBefore(u,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var qi={$$typeof:k,Provider:null,Consumer:null,_currentValue:_,_currentValue2:_,_threadCount:0};function Q1(e,t,a,i,u,f,x,E,D){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ea(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ea(0),this.hiddenUpdates=Ea(null),this.identifierPrefix=i,this.onUncaughtError=u,this.onCaughtError=f,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=D,this.incompleteTransitions=new Map}function zv(e,t,a,i,u,f,x,E,D,$,J,te){return e=new Q1(e,t,a,x,D,$,J,te,E),t=1,f===!0&&(t|=24),f=Xt(3,null,null,t),e.current=f,f.stateNode=e,t=Nc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:i,isDehydrated:a,cache:t},Ac(f),e}function kv(e){return e?(e=no,e):no}function Lv(e,t,a,i,u,f){u=kv(u),i.context===null?i.context=u:i.pendingContext=u,i=Oa(t),i.payload={element:a},f=f===void 0?null:f,f!==null&&(i.callback=f),a=_a(e,i,t),a!==null&&(Ft(a,e,t),bi(a,e,t))}function Uv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Kf(e,t){Uv(e,t),(e=e.alternate)&&Uv(e,t)}function Hv(e){if(e.tag===13||e.tag===31){var t=pr(e,67108864);t!==null&&Ft(t,e,67108864),Kf(e,67108864)}}function Bv(e){if(e.tag===13||e.tag===31){var t=tn();t=$r(t);var a=pr(e,t);a!==null&&Ft(a,e,t),Kf(e,t)}}var Cs=!0;function K1(e,t,a,i){var u=T.T;T.T=null;var f=U.p;try{U.p=2,Xf(e,t,a,i)}finally{U.p=f,T.T=u}}function X1(e,t,a,i){var u=T.T;T.T=null;var f=U.p;try{U.p=8,Xf(e,t,a,i)}finally{U.p=f,T.T=u}}function Xf(e,t,a,i){if(Cs){var u=Zf(i);if(u===null)Lf(e,t,i,Rs,a),qv(e,i);else if(J1(u,e,t,a,i))i.stopPropagation();else if(qv(e,i),t&4&&-1<Z1.indexOf(e)){for(;u!==null;){var f=Gr(u);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var x=kn(f.pendingLanes);if(x!==0){var E=f;for(E.pendingLanes|=2,E.entangledLanes|=2;x;){var D=1<<31-Et(x);E.entanglements[1]|=D,x&=~D}Bn(f),(Le&6)===0&&(ls=jt()+500,ki(0))}}break;case 31:case 13:E=pr(f,2),E!==null&&Ft(E,f,2),us(),Kf(f,2)}if(f=Zf(i),f===null&&Lf(e,t,i,Rs,a),f===u)break;u=f}u!==null&&i.stopPropagation()}else Lf(e,t,i,null,a)}}function Zf(e){return e=Ju(e),Jf(e)}var Rs=null;function Jf(e){if(Rs=null,e=Fr(e),e!==null){var t=c(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=d(t),e!==null)return e;e=null}else if(a===31){if(e=m(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Rs=e,null}function Pv(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch($u()){case ir:return 2;case vl:return 8;case lr:case ei:return 32;case Kn:return 268435456;default:return 32}default:return 32}}var Wf=!1,Va=null,Fa=null,Ga=null,$i=new Map,Vi=new Map,Ya=[],Z1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function qv(e,t){switch(e){case"focusin":case"focusout":Va=null;break;case"dragenter":case"dragleave":Fa=null;break;case"mouseover":case"mouseout":Ga=null;break;case"pointerover":case"pointerout":$i.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vi.delete(t.pointerId)}}function Fi(e,t,a,i,u,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:a,eventSystemFlags:i,nativeEvent:f,targetContainers:[u]},t!==null&&(t=Gr(t),t!==null&&Hv(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function J1(e,t,a,i,u){switch(t){case"focusin":return Va=Fi(Va,e,t,a,i,u),!0;case"dragenter":return Fa=Fi(Fa,e,t,a,i,u),!0;case"mouseover":return Ga=Fi(Ga,e,t,a,i,u),!0;case"pointerover":var f=u.pointerId;return $i.set(f,Fi($i.get(f)||null,e,t,a,i,u)),!0;case"gotpointercapture":return f=u.pointerId,Vi.set(f,Fi(Vi.get(f)||null,e,t,a,i,u)),!0}return!1}function $v(e){var t=Fr(e.target);if(t!==null){var a=c(t);if(a!==null){if(t=a.tag,t===13){if(t=d(a),t!==null){e.blockedOn=t,nm(e.priority,function(){Bv(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,nm(e.priority,function(){Bv(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ns(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Zf(e.nativeEvent);if(a===null){a=e.nativeEvent;var i=new a.constructor(a.type,a);Zu=i,a.target.dispatchEvent(i),Zu=null}else return t=Gr(a),t!==null&&Hv(t),e.blockedOn=a,!1;t.shift()}return!0}function Vv(e,t,a){Ns(e)&&a.delete(t)}function W1(){Wf=!1,Va!==null&&Ns(Va)&&(Va=null),Fa!==null&&Ns(Fa)&&(Fa=null),Ga!==null&&Ns(Ga)&&(Ga=null),$i.forEach(Vv),Vi.forEach(Vv)}function Ts(e,t){e.blockedOn===t&&(e.blockedOn=null,Wf||(Wf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,W1)))}var js=null;function Fv(e){js!==e&&(js=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){js===e&&(js=null);for(var t=0;t<e.length;t+=3){var a=e[t],i=e[t+1],u=e[t+2];if(typeof i!="function"){if(Jf(i||a)===null)continue;break}var f=Gr(a);f!==null&&(e.splice(t,3),t-=3,Xc(f,{pending:!0,data:u,method:a.method,action:i},i,u))}}))}function To(e){function t(D){return Ts(D,e)}Va!==null&&Ts(Va,e),Fa!==null&&Ts(Fa,e),Ga!==null&&Ts(Ga,e),$i.forEach(t),Vi.forEach(t);for(var a=0;a<Ya.length;a++){var i=Ya[a];i.blockedOn===e&&(i.blockedOn=null)}for(;0<Ya.length&&(a=Ya[0],a.blockedOn===null);)$v(a),a.blockedOn===null&&Ya.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(i=0;i<a.length;i+=3){var u=a[i],f=a[i+1],x=u[Ht]||null;if(typeof f=="function")x||Fv(a);else if(x){var E=null;if(f&&f.hasAttribute("formAction")){if(u=f,x=f[Ht]||null)E=x.formAction;else if(Jf(u)!==null)continue}else E=x.action;typeof E=="function"?a[i+1]=E:(a.splice(i,3),i-=3),Fv(a)}}}function Gv(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(x){return u=x})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),i||setTimeout(a,20)}function a(){if(!i&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function ed(e){this._internalRoot=e}Ms.prototype.render=ed.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(l(409));var a=t.current,i=tn();Lv(a,i,e,t,null,null)},Ms.prototype.unmount=ed.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Lv(e.current,2,null,e,null,null),us(),t[Vr]=null}};function Ms(e){this._internalRoot=e}Ms.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fu();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ya.length&&t!==0&&t<Ya[a].priority;a++);Ya.splice(a,0,e),a===0&&$v(e)}};var Yv=r.version;if(Yv!=="19.2.3")throw Error(l(527,Yv,"19.2.3"));U.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=g(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var eE={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var As=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!As.isDisabled&&As.supportsFiber)try{sr=As.inject(eE),Mt=As}catch{}}return Yi.createRoot=function(e,t){if(!s(e))throw Error(l(299));var a=!1,i="",u=Wp,f=eg,x=tg;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=zv(e,1,!1,null,null,a,i,null,u,f,x,Gv),e[Vr]=t.current,kf(e),new ed(t)},Yi.hydrateRoot=function(e,t,a){if(!s(e))throw Error(l(299));var i=!1,u="",f=Wp,x=eg,E=tg,D=null;return a!=null&&(a.unstable_strictMode===!0&&(i=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(E=a.onRecoverableError),a.formState!==void 0&&(D=a.formState)),t=zv(e,1,!0,t,a??null,i,u,D,f,x,E,Gv),t.context=kv(null),a=t.current,i=tn(),i=$r(i),u=Oa(i),u.callback=null,_a(a,u,i),a=i,t.current.lanes=a,We(t,a),Bn(t),e[Vr]=t.current,kf(e),new Ms(t)},Yi.version="19.2.3",Yi}var ay;function dE(){if(ay)return ad.exports;ay=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),ad.exports=fE(),ad.exports}var hE=dE(),Bo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},mE={setTimeout:(n,r)=>setTimeout(n,r),clearTimeout:n=>clearTimeout(n),setInterval:(n,r)=>setInterval(n,r),clearInterval:n=>clearInterval(n)},pE=class{#e=mE;#t=!1;setTimeoutProvider(n){this.#e=n}setTimeout(n,r){return this.#e.setTimeout(n,r)}clearTimeout(n){this.#e.clearTimeout(n)}setInterval(n,r){return this.#e.setInterval(n,r)}clearInterval(n){this.#e.clearInterval(n)}},Mr=new pE;function gE(n){setTimeout(n,0)}var Ar=typeof window>"u"||"Deno"in globalThis;function Ot(){}function vE(n,r){return typeof n=="function"?n(r):n}function Md(n){return typeof n=="number"&&n>=0&&n!==1/0}function mb(n,r){return Math.max(n+(r||0)-Date.now(),0)}function Xa(n,r){return typeof n=="function"?n(r):n}function vn(n,r){return typeof n=="function"?n(r):n}function ry(n,r){const{type:o="all",exact:l,fetchStatus:s,predicate:c,queryKey:d,stale:m}=n;if(d){if(l){if(r.queryHash!==th(d,r.options))return!1}else if(!Ji(r.queryKey,d))return!1}if(o!=="all"){const y=r.isActive();if(o==="active"&&!y||o==="inactive"&&y)return!1}return!(typeof m=="boolean"&&r.isStale()!==m||s&&s!==r.state.fetchStatus||c&&!c(r))}function oy(n,r){const{exact:o,status:l,predicate:s,mutationKey:c}=n;if(c){if(!r.options.mutationKey)return!1;if(o){if(Or(r.options.mutationKey)!==Or(c))return!1}else if(!Ji(r.options.mutationKey,c))return!1}return!(l&&r.state.status!==l||s&&!s(r))}function th(n,r){return(r?.queryKeyHashFn||Or)(n)}function Or(n){return JSON.stringify(n,(r,o)=>Ad(o)?Object.keys(o).sort().reduce((l,s)=>(l[s]=o[s],l),{}):o)}function Ji(n,r){return n===r?!0:typeof n!=typeof r?!1:n&&r&&typeof n=="object"&&typeof r=="object"?Object.keys(r).every(o=>Ji(n[o],r[o])):!1}var yE=Object.prototype.hasOwnProperty;function pb(n,r){if(n===r)return n;const o=iy(n)&&iy(r);if(!o&&!(Ad(n)&&Ad(r)))return r;const s=(o?n:Object.keys(n)).length,c=o?r:Object.keys(r),d=c.length,m=o?new Array(d):{};let y=0;for(let g=0;g<d;g++){const b=o?g:c[g],p=n[b],w=r[b];if(p===w){m[b]=p,(o?g<s:yE.call(n,b))&&y++;continue}if(p===null||w===null||typeof p!="object"||typeof w!="object"){m[b]=w;continue}const C=pb(p,w);m[b]=C,C===p&&y++}return s===d&&y===s?n:m}function Xs(n,r){if(!r||Object.keys(n).length!==Object.keys(r).length)return!1;for(const o in n)if(n[o]!==r[o])return!1;return!0}function iy(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Ad(n){if(!ly(n))return!1;const r=n.constructor;if(r===void 0)return!0;const o=r.prototype;return!(!ly(o)||!o.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function ly(n){return Object.prototype.toString.call(n)==="[object Object]"}function bE(n){return new Promise(r=>{Mr.setTimeout(r,n)})}function Od(n,r,o){return typeof o.structuralSharing=="function"?o.structuralSharing(n,r):o.structuralSharing!==!1?pb(n,r):r}function i4(n){return n}function xE(n,r,o=0){const l=[...n,r];return o&&l.length>o?l.slice(1):l}function wE(n,r,o=0){const l=[r,...n];return o&&l.length>o?l.slice(0,-1):l}var nh=Symbol();function gb(n,r){return!n.queryFn&&r?.initialPromise?()=>r.initialPromise:!n.queryFn||n.queryFn===nh?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function vb(n,r){return typeof n=="function"?n(...r):!!n}function SE(n,r,o){let l=!1,s;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(s??=r(),l||(l=!0,s.aborted?o():s.addEventListener("abort",o,{once:!0})),s)}),n}var EE=class extends Bo{#e;#t;#n;constructor(){super(),this.#n=n=>{if(!Ar&&window.addEventListener){const r=()=>n();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#n=n,this.#t?.(),this.#t=n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(n){this.#e!==n&&(this.#e=n,this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(r=>{r(n)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},ah=new EE;function _d(){let n,r;const o=new Promise((s,c)=>{n=s,r=c});o.status="pending",o.catch(()=>{});function l(s){Object.assign(o,s),delete o.resolve,delete o.reject}return o.resolve=s=>{l({status:"fulfilled",value:s}),n(s)},o.reject=s=>{l({status:"rejected",reason:s}),r(s)},o}var CE=gE;function RE(){let n=[],r=0,o=m=>{m()},l=m=>{m()},s=CE;const c=m=>{r?n.push(m):s(()=>{o(m)})},d=()=>{const m=n;n=[],m.length&&s(()=>{l(()=>{m.forEach(y=>{o(y)})})})};return{batch:m=>{let y;r++;try{y=m()}finally{r--,r||d()}return y},batchCalls:m=>(...y)=>{c(()=>{m(...y)})},schedule:c,setNotifyFunction:m=>{o=m},setBatchNotifyFunction:m=>{l=m},setScheduler:m=>{s=m}}}var dt=RE(),NE=class extends Bo{#e=!0;#t;#n;constructor(){super(),this.#n=n=>{if(!Ar&&window.addEventListener){const r=()=>n(!0),o=()=>n(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",o)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#n=n,this.#t?.(),this.#t=n(this.setOnline.bind(this))}setOnline(n){this.#e!==n&&(this.#e=n,this.listeners.forEach(o=>{o(n)}))}isOnline(){return this.#e}},Zs=new NE;function TE(n){return Math.min(1e3*2**n,3e4)}function yb(n){return(n??"online")==="online"?Zs.isOnline():!0}var Dd=class extends Error{constructor(n){super("CancelledError"),this.revert=n?.revert,this.silent=n?.silent}};function bb(n){let r=!1,o=0,l;const s=_d(),c=()=>s.status!=="pending",d=S=>{if(!c()){const N=new Dd(S);w(N),n.onCancel?.(N)}},m=()=>{r=!0},y=()=>{r=!1},g=()=>ah.isFocused()&&(n.networkMode==="always"||Zs.isOnline())&&n.canRun(),b=()=>yb(n.networkMode)&&n.canRun(),p=S=>{c()||(l?.(),s.resolve(S))},w=S=>{c()||(l?.(),s.reject(S))},C=()=>new Promise(S=>{l=N=>{(c()||g())&&S(N)},n.onPause?.()}).then(()=>{l=void 0,c()||n.onContinue?.()}),R=()=>{if(c())return;let S;const N=o===0?n.initialPromise:void 0;try{S=N??n.fn()}catch(j){S=Promise.reject(j)}Promise.resolve(S).then(p).catch(j=>{if(c())return;const O=n.retry??(Ar?0:3),k=n.retryDelay??TE,Q=typeof k=="function"?k(o,j):k,I=O===!0||typeof O=="number"&&o<O||typeof O=="function"&&O(o,j);if(r||!I){w(j);return}o++,n.onFail?.(o,j),bE(Q).then(()=>g()?void 0:C()).then(()=>{r?w(j):R()})})};return{promise:s,status:()=>s.status,cancel:d,continue:()=>(l?.(),s),cancelRetry:m,continueRetry:y,canStart:b,start:()=>(b()?R():C().then(R),s)}}var xb=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Md(this.gcTime)&&(this.#e=Mr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Ar?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Mr.clearTimeout(this.#e),this.#e=void 0)}},jE=class extends xb{#e;#t;#n;#r;#a;#i;#l;constructor(n){super(),this.#l=!1,this.#i=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.#r=n.client,this.#n=this.#r.getQueryCache(),this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.#e=uy(this.options),this.state=n.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(n){if(this.options={...this.#i,...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=uy(this.options);r.data!==void 0&&(this.setState(sy(r.data,r.dataUpdatedAt)),this.#e=r)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(n,r){const o=Od(this.state.data,n,this.options);return this.#o({data:o,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),o}setState(n,r){this.#o({type:"setState",state:n,setStateOptions:r})}cancel(n){const r=this.#a?.promise;return this.#a?.cancel(n),r?r.then(Ot).catch(Ot):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(n=>vn(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===nh||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Xa(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!mb(this.state.dataUpdatedAt,n)}onFocus(){this.observers.find(r=>r.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(r=>r.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(r=>r!==n),this.observers.length||(this.#a&&(this.#l?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(n,r){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(n&&this.setOptions(n),!this.options.queryFn){const m=this.observers.find(y=>y.options.queryFn);m&&this.setOptions(m.options)}const o=new AbortController,l=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(this.#l=!0,o.signal)})},s=()=>{const m=gb(this.options,r),g=(()=>{const b={client:this.#r,queryKey:this.queryKey,meta:this.meta};return l(b),b})();return this.#l=!1,this.options.persister?this.options.persister(m,g,this):m(g)},d=(()=>{const m={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:s};return l(m),m})();this.options.behavior?.onFetch(d,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==d.fetchOptions?.meta)&&this.#o({type:"fetch",meta:d.fetchOptions?.meta}),this.#a=bb({initialPromise:r?.initialPromise,fn:d.fetchFn,onCancel:m=>{m instanceof Dd&&m.revert&&this.setState({...this.#t,fetchStatus:"idle"}),o.abort()},onFail:(m,y)=>{this.#o({type:"failed",failureCount:m,error:y})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0});try{const m=await this.#a.start();if(m===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(m),this.#n.config.onSuccess?.(m,this),this.#n.config.onSettled?.(m,this.state.error,this),m}catch(m){if(m instanceof Dd){if(m.silent)return this.#a.promise;if(m.revert){if(this.state.data===void 0)throw m;return this.state.data}}throw this.#o({type:"error",error:m}),this.#n.config.onError?.(m,this),this.#n.config.onSettled?.(this.state.data,m,this),m}finally{this.scheduleGc()}}#o(n){const r=o=>{switch(n.type){case"failed":return{...o,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...wb(o.data,this.options),fetchMeta:n.meta??null};case"success":const l={...o,...sy(n.data,n.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=n.manual?l:void 0,l;case"error":const s=n.error;return{...o,error:s,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...n.state}}};this.state=r(this.state),dt.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:n})})}};function wb(n,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:yb(r.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function sy(n,r){return{data:n,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function uy(n){const r=typeof n.initialData=="function"?n.initialData():n.initialData,o=r!==void 0,l=o?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:o?l??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:o?"success":"pending",fetchStatus:"idle"}}var ME=class extends Bo{constructor(n,r){super(),this.options=r,this.#e=n,this.#o=null,this.#l=_d(),this.bindMethods(),this.setOptions(r)}#e;#t=void 0;#n=void 0;#r=void 0;#a;#i;#l;#o;#p;#d;#h;#u;#c;#s;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),cy(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zd(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zd(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#w(),this.#t.removeObserver(this)}setOptions(n){const r=this.options,o=this.#t;if(this.options=this.#e.defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof vn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),r._defaulted&&!Xs(this.options,r)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const l=this.hasListeners();l&&fy(this.#t,o,this.options,r)&&this.#f(),this.updateResult(),l&&(this.#t!==o||vn(this.options.enabled,this.#t)!==vn(r.enabled,this.#t)||Xa(this.options.staleTime,this.#t)!==Xa(r.staleTime,this.#t))&&this.#g();const s=this.#v();l&&(this.#t!==o||vn(this.options.enabled,this.#t)!==vn(r.enabled,this.#t)||s!==this.#s)&&this.#y(s)}getOptimisticResult(n){const r=this.#e.getQueryCache().build(this.#e,n),o=this.createResult(r,n);return OE(this,o)&&(this.#r=o,this.#i=this.options,this.#a=this.#t.state),o}getCurrentResult(){return this.#r}trackResult(n,r){return new Proxy(n,{get:(o,l)=>(this.trackProp(l),r?.(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#l.status==="pending"&&this.#l.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(o,l))})}trackProp(n){this.#m.add(n)}getCurrentQuery(){return this.#t}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const r=this.#e.defaultQueryOptions(n),o=this.#e.getQueryCache().build(this.#e,r);return o.fetch().then(()=>this.createResult(o,r))}fetch(n){return this.#f({...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#f(n){this.#S();let r=this.#t.fetch(this.options,n);return n?.throwOnError||(r=r.catch(Ot)),r}#g(){this.#x();const n=Xa(this.options.staleTime,this.#t);if(Ar||this.#r.isStale||!Md(n))return;const o=mb(this.#r.dataUpdatedAt,n)+1;this.#u=Mr.setTimeout(()=>{this.#r.isStale||this.updateResult()},o)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(n){this.#w(),this.#s=n,!(Ar||vn(this.options.enabled,this.#t)===!1||!Md(this.#s)||this.#s===0)&&(this.#c=Mr.setInterval(()=>{(this.options.refetchIntervalInBackground||ah.isFocused())&&this.#f()},this.#s))}#b(){this.#g(),this.#y(this.#v())}#x(){this.#u&&(Mr.clearTimeout(this.#u),this.#u=void 0)}#w(){this.#c&&(Mr.clearInterval(this.#c),this.#c=void 0)}createResult(n,r){const o=this.#t,l=this.options,s=this.#r,c=this.#a,d=this.#i,y=n!==o?n.state:this.#n,{state:g}=n;let b={...g},p=!1,w;if(r._optimisticResults){const G=this.hasListeners(),ue=!G&&cy(n,r),ie=G&&fy(n,o,r,l);(ue||ie)&&(b={...b,...wb(g.data,n.options)}),r._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:C,errorUpdatedAt:R,status:S}=b;w=b.data;let N=!1;if(r.placeholderData!==void 0&&w===void 0&&S==="pending"){let G;s?.isPlaceholderData&&r.placeholderData===d?.placeholderData?(G=s.data,N=!0):G=typeof r.placeholderData=="function"?r.placeholderData(this.#h?.state.data,this.#h):r.placeholderData,G!==void 0&&(S="success",w=Od(s?.data,G,r),p=!0)}if(r.select&&w!==void 0&&!N)if(s&&w===c?.data&&r.select===this.#p)w=this.#d;else try{this.#p=r.select,w=r.select(w),w=Od(s?.data,w,r),this.#d=w,this.#o=null}catch(G){this.#o=G}this.#o&&(C=this.#o,w=this.#d,R=Date.now(),S="error");const j=b.fetchStatus==="fetching",O=S==="pending",k=S==="error",Q=O&&j,I=w!==void 0,B={status:S,fetchStatus:b.fetchStatus,isPending:O,isSuccess:S==="success",isError:k,isInitialLoading:Q,isLoading:Q,data:w,dataUpdatedAt:b.dataUpdatedAt,error:C,errorUpdatedAt:R,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:b.dataUpdateCount>0||b.errorUpdateCount>0,isFetchedAfterMount:b.dataUpdateCount>y.dataUpdateCount||b.errorUpdateCount>y.errorUpdateCount,isFetching:j,isRefetching:j&&!O,isLoadingError:k&&!I,isPaused:b.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:k&&I,isStale:rh(n,r),refetch:this.refetch,promise:this.#l,isEnabled:vn(r.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const G=oe=>{B.status==="error"?oe.reject(B.error):B.data!==void 0&&oe.resolve(B.data)},ue=()=>{const oe=this.#l=B.promise=_d();G(oe)},ie=this.#l;switch(ie.status){case"pending":n.queryHash===o.queryHash&&G(ie);break;case"fulfilled":(B.status==="error"||B.data!==ie.value)&&ue();break;case"rejected":(B.status!=="error"||B.error!==ie.reason)&&ue();break}}return B}updateResult(){const n=this.#r,r=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#i=this.options,this.#a.data!==void 0&&(this.#h=this.#t),Xs(r,n))return;this.#r=r;const o=()=>{if(!n)return!0;const{notifyOnChangeProps:l}=this.options,s=typeof l=="function"?l():l;if(s==="all"||!s&&!this.#m.size)return!0;const c=new Set(s??this.#m);return this.options.throwOnError&&c.add("error"),Object.keys(this.#r).some(d=>{const m=d;return this.#r[m]!==n[m]&&c.has(m)})};this.#E({listeners:o()})}#S(){const n=this.#e.getQueryCache().build(this.#e,this.options);if(n===this.#t)return;const r=this.#t;this.#t=n,this.#n=n.state,this.hasListeners()&&(r?.removeObserver(this),n.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#E(n){dt.batch(()=>{n.listeners&&this.listeners.forEach(r=>{r(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function AE(n,r){return vn(r.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&r.retryOnMount===!1)}function cy(n,r){return AE(n,r)||n.state.data!==void 0&&zd(n,r,r.refetchOnMount)}function zd(n,r,o){if(vn(r.enabled,n)!==!1&&Xa(r.staleTime,n)!=="static"){const l=typeof o=="function"?o(n):o;return l==="always"||l!==!1&&rh(n,r)}return!1}function fy(n,r,o,l){return(n!==r||vn(l.enabled,n)===!1)&&(!o.suspense||n.state.status!=="error")&&rh(n,o)}function rh(n,r){return vn(r.enabled,n)!==!1&&n.isStaleByTime(Xa(r.staleTime,n))}function OE(n,r){return!Xs(n.getCurrentResult(),r)}function dy(n){return{onFetch:(r,o)=>{const l=r.options,s=r.fetchOptions?.meta?.fetchMore?.direction,c=r.state.data?.pages||[],d=r.state.data?.pageParams||[];let m={pages:[],pageParams:[]},y=0;const g=async()=>{let b=!1;const p=R=>{SE(R,()=>r.signal,()=>b=!0)},w=gb(r.options,r.fetchOptions),C=async(R,S,N)=>{if(b)return Promise.reject();if(S==null&&R.pages.length)return Promise.resolve(R);const O=(()=>{const Z={client:r.client,queryKey:r.queryKey,pageParam:S,direction:N?"backward":"forward",meta:r.options.meta};return p(Z),Z})(),k=await w(O),{maxPages:Q}=r.options,I=N?wE:xE;return{pages:I(R.pages,k,Q),pageParams:I(R.pageParams,S,Q)}};if(s&&c.length){const R=s==="backward",S=R?_E:hy,N={pages:c,pageParams:d},j=S(l,N);m=await C(N,j,R)}else{const R=n??c.length;do{const S=y===0?d[0]??l.initialPageParam:hy(l,m);if(y>0&&S==null)break;m=await C(m,S),y++}while(y<R)}return m};r.options.persister?r.fetchFn=()=>r.options.persister?.(g,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},o):r.fetchFn=g}}}function hy(n,{pages:r,pageParams:o}){const l=r.length-1;return r.length>0?n.getNextPageParam(r[l],r,o[l],o):void 0}function _E(n,{pages:r,pageParams:o}){return r.length>0?n.getPreviousPageParam?.(r[0],r,o[0],o):void 0}var DE=class extends xb{#e;#t;#n;#r;constructor(n){super(),this.#e=n.client,this.mutationId=n.mutationId,this.#n=n.mutationCache,this.#t=[],this.state=n.state||Sb(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){this.#t.includes(n)||(this.#t.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){this.#t=this.#t.filter(r=>r!==n),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(n){const r=()=>{this.#a({type:"continue"})},o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=bb({fn:()=>this.options.mutationFn?this.options.mutationFn(n,o):Promise.reject(new Error("No mutationFn found")),onFail:(c,d)=>{this.#a({type:"failed",failureCount:c,error:d})},onPause:()=>{this.#a({type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const l=this.state.status==="pending",s=!this.#r.canStart();try{if(l)r();else{this.#a({type:"pending",variables:n,isPaused:s}),await this.#n.config.onMutate?.(n,this,o);const d=await this.options.onMutate?.(n,o);d!==this.state.context&&this.#a({type:"pending",context:d,variables:n,isPaused:s})}const c=await this.#r.start();return await this.#n.config.onSuccess?.(c,n,this.state.context,this,o),await this.options.onSuccess?.(c,n,this.state.context,o),await this.#n.config.onSettled?.(c,null,this.state.variables,this.state.context,this,o),await this.options.onSettled?.(c,null,n,this.state.context,o),this.#a({type:"success",data:c}),c}catch(c){try{await this.#n.config.onError?.(c,n,this.state.context,this,o)}catch(d){Promise.reject(d)}try{await this.options.onError?.(c,n,this.state.context,o)}catch(d){Promise.reject(d)}try{await this.#n.config.onSettled?.(void 0,c,this.state.variables,this.state.context,this,o)}catch(d){Promise.reject(d)}try{await this.options.onSettled?.(void 0,c,n,this.state.context,o)}catch(d){Promise.reject(d)}throw this.#a({type:"error",error:c}),c}finally{this.#n.runNext(this)}}#a(n){const r=o=>{switch(n.type){case"failed":return{...o,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...o,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:n.error,failureCount:o.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=r(this.state),dt.batch(()=>{this.#t.forEach(o=>{o.onMutationUpdate(n)}),this.#n.notify({mutation:this,type:"updated",action:n})})}};function Sb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var zE=class extends Bo{constructor(n={}){super(),this.config=n,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(n,r,o){const l=new DE({client:n,mutationCache:this,mutationId:++this.#n,options:n.defaultMutationOptions(r),state:o});return this.add(l),l}add(n){this.#e.add(n);const r=Os(n);if(typeof r=="string"){const o=this.#t.get(r);o?o.push(n):this.#t.set(r,[n])}this.notify({type:"added",mutation:n})}remove(n){if(this.#e.delete(n)){const r=Os(n);if(typeof r=="string"){const o=this.#t.get(r);if(o)if(o.length>1){const l=o.indexOf(n);l!==-1&&o.splice(l,1)}else o[0]===n&&this.#t.delete(r)}}this.notify({type:"removed",mutation:n})}canRun(n){const r=Os(n);if(typeof r=="string"){const l=this.#t.get(r)?.find(s=>s.state.status==="pending");return!l||l===n}else return!0}runNext(n){const r=Os(n);return typeof r=="string"?this.#t.get(r)?.find(l=>l!==n&&l.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){dt.batch(()=>{this.#e.forEach(n=>{this.notify({type:"removed",mutation:n})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(n){const r={exact:!0,...n};return this.getAll().find(o=>oy(r,o))}findAll(n={}){return this.getAll().filter(r=>oy(n,r))}notify(n){dt.batch(()=>{this.listeners.forEach(r=>{r(n)})})}resumePausedMutations(){const n=this.getAll().filter(r=>r.state.isPaused);return dt.batch(()=>Promise.all(n.map(r=>r.continue().catch(Ot))))}};function Os(n){return n.options.scope?.id}var kE=class extends Bo{#e;#t=void 0;#n;#r;constructor(r,o){super(),this.#e=r,this.setOptions(o),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){const o=this.options;this.options=this.#e.defaultMutationOptions(r),Xs(this.options,o)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),o?.mutationKey&&this.options.mutationKey&&Or(o.mutationKey)!==Or(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(r){this.#a(),this.#i(r)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#a(),this.#i()}mutate(r,o){return this.#r=o,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(r)}#a(){const r=this.#n?.state??Sb();this.#t={...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset}}#i(r){dt.batch(()=>{if(this.#r&&this.hasListeners()){const o=this.#t.variables,l=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(r?.type==="success"){try{this.#r.onSuccess?.(r.data,o,l,s)}catch(c){Promise.reject(c)}try{this.#r.onSettled?.(r.data,null,o,l,s)}catch(c){Promise.reject(c)}}else if(r?.type==="error"){try{this.#r.onError?.(r.error,o,l,s)}catch(c){Promise.reject(c)}try{this.#r.onSettled?.(void 0,r.error,o,l,s)}catch(c){Promise.reject(c)}}}this.listeners.forEach(o=>{o(this.#t)})})}},LE=class extends Bo{constructor(n={}){super(),this.config=n,this.#e=new Map}#e;build(n,r,o){const l=r.queryKey,s=r.queryHash??th(l,r);let c=this.get(s);return c||(c=new jE({client:n,queryKey:l,queryHash:s,options:n.defaultQueryOptions(r),state:o,defaultOptions:n.getQueryDefaults(l)}),this.add(c)),c}add(n){this.#e.has(n.queryHash)||(this.#e.set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const r=this.#e.get(n.queryHash);r&&(n.destroy(),r===n&&this.#e.delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){dt.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return this.#e.get(n)}getAll(){return[...this.#e.values()]}find(n){const r={exact:!0,...n};return this.getAll().find(o=>ry(r,o))}findAll(n={}){const r=this.getAll();return Object.keys(n).length>0?r.filter(o=>ry(n,o)):r}notify(n){dt.batch(()=>{this.listeners.forEach(r=>{r(n)})})}onFocus(){dt.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){dt.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},UE=class{#e;#t;#n;#r;#a;#i;#l;#o;constructor(n={}){this.#e=n.queryCache||new LE,this.#t=n.mutationCache||new zE,this.#n=n.defaultOptions||{},this.#r=new Map,this.#a=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#l=ah.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=Zs.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#l?.(),this.#l=void 0,this.#o?.(),this.#o=void 0)}isFetching(n){return this.#e.findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return this.#t.findAll({...n,status:"pending"}).length}getQueryData(n){const r=this.defaultQueryOptions({queryKey:n});return this.#e.get(r.queryHash)?.state.data}ensureQueryData(n){const r=this.defaultQueryOptions(n),o=this.#e.build(this,r),l=o.state.data;return l===void 0?this.fetchQuery(n):(n.revalidateIfStale&&o.isStaleByTime(Xa(r.staleTime,o))&&this.prefetchQuery(r),Promise.resolve(l))}getQueriesData(n){return this.#e.findAll(n).map(({queryKey:r,state:o})=>{const l=o.data;return[r,l]})}setQueryData(n,r,o){const l=this.defaultQueryOptions({queryKey:n}),c=this.#e.get(l.queryHash)?.state.data,d=vE(r,c);if(d!==void 0)return this.#e.build(this,l).setData(d,{...o,manual:!0})}setQueriesData(n,r,o){return dt.batch(()=>this.#e.findAll(n).map(({queryKey:l})=>[l,this.setQueryData(l,r,o)]))}getQueryState(n){const r=this.defaultQueryOptions({queryKey:n});return this.#e.get(r.queryHash)?.state}removeQueries(n){const r=this.#e;dt.batch(()=>{r.findAll(n).forEach(o=>{r.remove(o)})})}resetQueries(n,r){const o=this.#e;return dt.batch(()=>(o.findAll(n).forEach(l=>{l.reset()}),this.refetchQueries({type:"active",...n},r)))}cancelQueries(n,r={}){const o={revert:!0,...r},l=dt.batch(()=>this.#e.findAll(n).map(s=>s.cancel(o)));return Promise.all(l).then(Ot).catch(Ot)}invalidateQueries(n,r={}){return dt.batch(()=>(this.#e.findAll(n).forEach(o=>{o.invalidate()}),n?.refetchType==="none"?Promise.resolve():this.refetchQueries({...n,type:n?.refetchType??n?.type??"active"},r)))}refetchQueries(n,r={}){const o={...r,cancelRefetch:r.cancelRefetch??!0},l=dt.batch(()=>this.#e.findAll(n).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let c=s.fetch(void 0,o);return o.throwOnError||(c=c.catch(Ot)),s.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(l).then(Ot)}fetchQuery(n){const r=this.defaultQueryOptions(n);r.retry===void 0&&(r.retry=!1);const o=this.#e.build(this,r);return o.isStaleByTime(Xa(r.staleTime,o))?o.fetch(r):Promise.resolve(o.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Ot).catch(Ot)}fetchInfiniteQuery(n){return n.behavior=dy(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Ot).catch(Ot)}ensureInfiniteQueryData(n){return n.behavior=dy(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Zs.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(n){this.#n=n}setQueryDefaults(n,r){this.#r.set(Or(n),{queryKey:n,defaultOptions:r})}getQueryDefaults(n){const r=[...this.#r.values()],o={};return r.forEach(l=>{Ji(n,l.queryKey)&&Object.assign(o,l.defaultOptions)}),o}setMutationDefaults(n,r){this.#a.set(Or(n),{mutationKey:n,defaultOptions:r})}getMutationDefaults(n){const r=[...this.#a.values()],o={};return r.forEach(l=>{Ji(n,l.mutationKey)&&Object.assign(o,l.defaultOptions)}),o}defaultQueryOptions(n){if(n._defaulted)return n;const r={...this.#n.queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return r.queryHash||(r.queryHash=th(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===nh&&(r.enabled=!1),r}defaultMutationOptions(n){return n?._defaulted?n:{...this.#n.mutations,...n?.mutationKey&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Eb=v.createContext(void 0),Dt=n=>{const r=v.useContext(Eb);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},HE=({client:n,children:r})=>(v.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),h.jsx(Eb.Provider,{value:n,children:r})),Cb=v.createContext(!1),BE=()=>v.useContext(Cb);Cb.Provider;function PE(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var qE=v.createContext(PE()),$E=()=>v.useContext(qE),VE=(n,r)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(r.isReset()||(n.retryOnMount=!1))},FE=n=>{v.useEffect(()=>{n.clearReset()},[n])},GE=({result:n,errorResetBoundary:r,throwOnError:o,query:l,suspense:s})=>n.isError&&!r.isReset()&&!n.isFetching&&l&&(s&&n.data===void 0||vb(o,[n.error,l])),YE=n=>{if(n.suspense){const o=s=>s==="static"?s:Math.max(s??1e3,1e3),l=n.staleTime;n.staleTime=typeof l=="function"?(...s)=>o(l(...s)):o(l),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},IE=(n,r)=>n.isLoading&&n.isFetching&&!r,QE=(n,r)=>n?.suspense&&r.isPending,my=(n,r,o)=>r.fetchOptimistic(n).catch(()=>{o.clearReset()});function KE(n,r,o){const l=BE(),s=$E(),c=Dt(),d=c.defaultQueryOptions(n);c.getDefaultOptions().queries?._experimental_beforeQuery?.(d),d._optimisticResults=l?"isRestoring":"optimistic",YE(d),VE(d,s),FE(s);const m=!c.getQueryCache().get(d.queryHash),[y]=v.useState(()=>new r(c,d)),g=y.getOptimisticResult(d),b=!l&&n.subscribed!==!1;if(v.useSyncExternalStore(v.useCallback(p=>{const w=b?y.subscribe(dt.batchCalls(p)):Ot;return y.updateResult(),w},[y,b]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),v.useEffect(()=>{y.setOptions(d)},[d,y]),QE(d,g))throw my(d,y,s);if(GE({result:g,errorResetBoundary:s,throwOnError:d.throwOnError,query:c.getQueryCache().get(d.queryHash),suspense:d.suspense}))throw g.error;return c.getDefaultOptions().queries?._experimental_afterQuery?.(d,g),d.experimental_prefetchInRender&&!Ar&&IE(g,l)&&(m?my(d,y,s):c.getQueryCache().get(d.queryHash)?.promise)?.catch(Ot).finally(()=>{y.updateResult()}),d.notifyOnChangeProps?g:y.trackResult(g)}function St(n,r){return KE(n,ME)}function wn(n,r){const o=Dt(),[l]=v.useState(()=>new kE(o,n));v.useEffect(()=>{l.setOptions(n)},[l,n]);const s=v.useSyncExternalStore(v.useCallback(d=>l.subscribe(dt.batchCalls(d)),[l]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),c=v.useCallback((d,m)=>{l.mutate(d,m).catch(Ot)},[l]);if(s.error&&vb(l.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:c,mutateAsync:s.mutate}}var py="popstate";function XE(n={}){function r(l,s){let{pathname:c,search:d,hash:m}=l.location;return kd("",{pathname:c,search:d,hash:m},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function o(l,s){return typeof s=="string"?s:Wi(s)}return JE(r,o,null,n)}function Je(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function bn(n,r){if(!n){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function ZE(){return Math.random().toString(36).substring(2,10)}function gy(n,r){return{usr:n.state,key:n.key,idx:r}}function kd(n,r,o=null,l){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof r=="string"?Po(r):r,state:o,key:r&&r.key||l||ZE()}}function Wi({pathname:n="/",search:r="",hash:o=""}){return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),o&&o!=="#"&&(n+=o.charAt(0)==="#"?o:"#"+o),n}function Po(n){let r={};if(n){let o=n.indexOf("#");o>=0&&(r.hash=n.substring(o),n=n.substring(0,o));let l=n.indexOf("?");l>=0&&(r.search=n.substring(l),n=n.substring(0,l)),n&&(r.pathname=n)}return r}function JE(n,r,o,l={}){let{window:s=document.defaultView,v5Compat:c=!1}=l,d=s.history,m="POP",y=null,g=b();g==null&&(g=0,d.replaceState({...d.state,idx:g},""));function b(){return(d.state||{idx:null}).idx}function p(){m="POP";let N=b(),j=N==null?null:N-g;g=N,y&&y({action:m,location:S.location,delta:j})}function w(N,j){m="PUSH";let O=kd(S.location,N,j);g=b()+1;let k=gy(O,g),Q=S.createHref(O);try{d.pushState(k,"",Q)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;s.location.assign(Q)}c&&y&&y({action:m,location:S.location,delta:1})}function C(N,j){m="REPLACE";let O=kd(S.location,N,j);g=b();let k=gy(O,g),Q=S.createHref(O);d.replaceState(k,"",Q),c&&y&&y({action:m,location:S.location,delta:0})}function R(N){return WE(N)}let S={get action(){return m},get location(){return n(s,d)},listen(N){if(y)throw new Error("A history only accepts one active listener");return s.addEventListener(py,p),y=N,()=>{s.removeEventListener(py,p),y=null}},createHref(N){return r(s,N)},createURL:R,encodeLocation(N){let j=R(N);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:w,replace:C,go(N){return d.go(N)}};return S}function WE(n,r=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),Je(o,"No window.location.(origin|href) available to create URL");let l=typeof n=="string"?n:Wi(n);return l=l.replace(/ $/,"%20"),!r&&l.startsWith("//")&&(l=o+l),new URL(l,o)}function Rb(n,r,o="/"){return eC(n,r,o,!1)}function eC(n,r,o,l){let s=typeof r=="string"?Po(r):r,c=ya(s.pathname||"/",o);if(c==null)return null;let d=Nb(n);tC(d);let m=null;for(let y=0;m==null&&y<d.length;++y){let g=dC(c);m=cC(d[y],g,l)}return m}function Nb(n,r=[],o=[],l="",s=!1){let c=(d,m,y=s,g)=>{let b={relativePath:g===void 0?d.path||"":g,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(l)&&y)return;Je(b.relativePath.startsWith(l),`Absolute route path "${b.relativePath}" nested under path "${l}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(l.length)}let p=ga([l,b.relativePath]),w=o.concat(b);d.children&&d.children.length>0&&(Je(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),Nb(d.children,r,w,p,y)),!(d.path==null&&!d.index)&&r.push({path:p,score:sC(p,d.index),routesMeta:w})};return n.forEach((d,m)=>{if(d.path===""||!d.path?.includes("?"))c(d,m);else for(let y of Tb(d.path))c(d,m,!0,y)}),r}function Tb(n){let r=n.split("/");if(r.length===0)return[];let[o,...l]=r,s=o.endsWith("?"),c=o.replace(/\?$/,"");if(l.length===0)return s?[c,""]:[c];let d=Tb(l.join("/")),m=[];return m.push(...d.map(y=>y===""?c:[c,y].join("/"))),s&&m.push(...d),m.map(y=>n.startsWith("/")&&y===""?"/":y)}function tC(n){n.sort((r,o)=>r.score!==o.score?o.score-r.score:uC(r.routesMeta.map(l=>l.childrenIndex),o.routesMeta.map(l=>l.childrenIndex)))}var nC=/^:[\w-]+$/,aC=3,rC=2,oC=1,iC=10,lC=-2,vy=n=>n==="*";function sC(n,r){let o=n.split("/"),l=o.length;return o.some(vy)&&(l+=lC),r&&(l+=rC),o.filter(s=>!vy(s)).reduce((s,c)=>s+(nC.test(c)?aC:c===""?oC:iC),l)}function uC(n,r){return n.length===r.length&&n.slice(0,-1).every((l,s)=>l===r[s])?n[n.length-1]-r[r.length-1]:0}function cC(n,r,o=!1){let{routesMeta:l}=n,s={},c="/",d=[];for(let m=0;m<l.length;++m){let y=l[m],g=m===l.length-1,b=c==="/"?r:r.slice(c.length)||"/",p=Js({path:y.relativePath,caseSensitive:y.caseSensitive,end:g},b),w=y.route;if(!p&&g&&o&&!l[l.length-1].route.index&&(p=Js({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},b)),!p)return null;Object.assign(s,p.params),d.push({params:s,pathname:ga([c,p.pathname]),pathnameBase:gC(ga([c,p.pathnameBase])),route:w}),p.pathnameBase!=="/"&&(c=ga([c,p.pathnameBase]))}return d}function Js(n,r){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[o,l]=fC(n.path,n.caseSensitive,n.end),s=r.match(o);if(!s)return null;let c=s[0],d=c.replace(/(.)\/+$/,"$1"),m=s.slice(1);return{params:l.reduce((g,{paramName:b,isOptional:p},w)=>{if(b==="*"){let R=m[w]||"";d=c.slice(0,c.length-R.length).replace(/(.)\/+$/,"$1")}const C=m[w];return p&&!C?g[b]=void 0:g[b]=(C||"").replace(/%2F/g,"/"),g},{}),pathname:c,pathnameBase:d,pattern:n}}function fC(n,r=!1,o=!0){bn(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let l=[],s="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,y)=>(l.push({paramName:m,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(l.push({paramName:"*"}),s+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?s+="\\/*$":n!==""&&n!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,r?void 0:"i"),l]}function dC(n){try{return n.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return bn(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),n}}function ya(n,r){if(r==="/")return n;if(!n.toLowerCase().startsWith(r.toLowerCase()))return null;let o=r.endsWith("/")?r.length-1:r.length,l=n.charAt(o);return l&&l!=="/"?null:n.slice(o)||"/"}var jb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hC=n=>jb.test(n);function mC(n,r="/"){let{pathname:o,search:l="",hash:s=""}=typeof n=="string"?Po(n):n,c;if(o)if(hC(o))c=o;else{if(o.includes("//")){let d=o;o=o.replace(/\/\/+/g,"/"),bn(!1,`Pathnames cannot have embedded double slashes - normalizing ${d} -> ${o}`)}o.startsWith("/")?c=yy(o.substring(1),"/"):c=yy(o,r)}else c=r;return{pathname:c,search:vC(l),hash:yC(s)}}function yy(n,r){let o=r.replace(/\/+$/,"").split("/");return n.split("/").forEach(s=>{s===".."?o.length>1&&o.pop():s!=="."&&o.push(s)}),o.length>1?o.join("/"):"/"}function ld(n,r,o,l){return`Cannot include a '${n}' character in a manually specified \`to.${r}\` field [${JSON.stringify(l)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function pC(n){return n.filter((r,o)=>o===0||r.route.path&&r.route.path.length>0)}function oh(n){let r=pC(n);return r.map((o,l)=>l===r.length-1?o.pathname:o.pathnameBase)}function ih(n,r,o,l=!1){let s;typeof n=="string"?s=Po(n):(s={...n},Je(!s.pathname||!s.pathname.includes("?"),ld("?","pathname","search",s)),Je(!s.pathname||!s.pathname.includes("#"),ld("#","pathname","hash",s)),Je(!s.search||!s.search.includes("#"),ld("#","search","hash",s)));let c=n===""||s.pathname==="",d=c?"/":s.pathname,m;if(d==null)m=o;else{let p=r.length-1;if(!l&&d.startsWith("..")){let w=d.split("/");for(;w[0]==="..";)w.shift(),p-=1;s.pathname=w.join("/")}m=p>=0?r[p]:"/"}let y=mC(s,m),g=d&&d!=="/"&&d.endsWith("/"),b=(c||d===".")&&o.endsWith("/");return!y.pathname.endsWith("/")&&(g||b)&&(y.pathname+="/"),y}var ga=n=>n.join("/").replace(/\/\/+/g,"/"),gC=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),vC=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,yC=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,bC=class{constructor(n,r,o,l=!1){this.status=n,this.statusText=r||"",this.internal=l,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function xC(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function wC(n){return n.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Mb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ab(n,r){let o=n;if(typeof o!="string"||!jb.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let l=o,s=!1;if(Mb)try{let c=new URL(window.location.href),d=o.startsWith("//")?new URL(c.protocol+o):new URL(o),m=ya(d.pathname,r);d.origin===c.origin&&m!=null?o=m+d.search+d.hash:s=!0}catch{bn(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:l,isExternal:s,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ob=["POST","PUT","PATCH","DELETE"];new Set(Ob);var SC=["GET",...Ob];new Set(SC);var qo=v.createContext(null);qo.displayName="DataRouter";var mu=v.createContext(null);mu.displayName="DataRouterState";var EC=v.createContext(!1),_b=v.createContext({isTransitioning:!1});_b.displayName="ViewTransition";var CC=v.createContext(new Map);CC.displayName="Fetchers";var RC=v.createContext(null);RC.displayName="Await";var on=v.createContext(null);on.displayName="Navigation";var il=v.createContext(null);il.displayName="Location";var Sn=v.createContext({outlet:null,matches:[],isDataRoute:!1});Sn.displayName="Route";var lh=v.createContext(null);lh.displayName="RouteError";var Db="REACT_ROUTER_ERROR",NC="REDIRECT",TC="ROUTE_ERROR_RESPONSE";function jC(n){if(n.startsWith(`${Db}:${NC}:{`))try{let r=JSON.parse(n.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function MC(n){if(n.startsWith(`${Db}:${TC}:{`))try{let r=JSON.parse(n.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new bC(r.status,r.statusText,r.data)}catch{}}function AC(n,{relative:r}={}){Je($o(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:l}=v.useContext(on),{hash:s,pathname:c,search:d}=ll(n,{relative:r}),m=c;return o!=="/"&&(m=c==="/"?o:ga([o,c])),l.createHref({pathname:m,search:d,hash:s})}function $o(){return v.useContext(il)!=null}function tr(){return Je($o(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(il).location}var zb="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function kb(n){v.useContext(on).static||v.useLayoutEffect(n)}function Vo(){let{isDataRoute:n}=v.useContext(Sn);return n?YC():OC()}function OC(){Je($o(),"useNavigate() may be used only in the context of a <Router> component.");let n=v.useContext(qo),{basename:r,navigator:o}=v.useContext(on),{matches:l}=v.useContext(Sn),{pathname:s}=tr(),c=JSON.stringify(oh(l)),d=v.useRef(!1);return kb(()=>{d.current=!0}),v.useCallback((y,g={})=>{if(bn(d.current,zb),!d.current)return;if(typeof y=="number"){o.go(y);return}let b=ih(y,JSON.parse(c),s,g.relative==="path");n==null&&r!=="/"&&(b.pathname=b.pathname==="/"?r:ga([r,b.pathname])),(g.replace?o.replace:o.push)(b,g.state,g)},[r,o,c,s,n])}var _C=v.createContext(null);function DC(n){let r=v.useContext(Sn).outlet;return v.useMemo(()=>r&&v.createElement(_C.Provider,{value:n},r),[r,n])}function zC(){let{matches:n}=v.useContext(Sn),r=n[n.length-1];return r?r.params:{}}function ll(n,{relative:r}={}){let{matches:o}=v.useContext(Sn),{pathname:l}=tr(),s=JSON.stringify(oh(o));return v.useMemo(()=>ih(n,JSON.parse(s),l,r==="path"),[n,s,l,r])}function kC(n,r){return Lb(n,r)}function Lb(n,r,o,l,s){Je($o(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:c}=v.useContext(on),{matches:d}=v.useContext(Sn),m=d[d.length-1],y=m?m.params:{},g=m?m.pathname:"/",b=m?m.pathnameBase:"/",p=m&&m.route;{let O=p&&p.path||"";Hb(g,!p||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${O}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
11
+
12
+ Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let w=tr(),C;if(r){let O=typeof r=="string"?Po(r):r;Je(b==="/"||O.pathname?.startsWith(b),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${b}" but pathname "${O.pathname}" was given in the \`location\` prop.`),C=O}else C=w;let R=C.pathname||"/",S=R;if(b!=="/"){let O=b.replace(/^\//,"").split("/");S="/"+R.replace(/^\//,"").split("/").slice(O.length).join("/")}let N=Rb(n,{pathname:S});bn(p||N!=null,`No routes matched location "${C.pathname}${C.search}${C.hash}" `),bn(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${C.pathname}${C.search}${C.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let j=PC(N&&N.map(O=>Object.assign({},O,{params:Object.assign({},y,O.params),pathname:ga([b,c.encodeLocation?c.encodeLocation(O.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?b:ga([b,c.encodeLocation?c.encodeLocation(O.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathnameBase])})),d,o,l,s);return r&&j?v.createElement(il.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...C},navigationType:"POP"}},j):j}function LC(){let n=GC(),r=xC(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),o=n instanceof Error?n.stack:null,l="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:l},c={padding:"2px 4px",backgroundColor:l},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:c},"ErrorBoundary")," or"," ",v.createElement("code",{style:c},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},r),o?v.createElement("pre",{style:s},o):null,d)}var UC=v.createElement(LC,null),Ub=class extends v.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,r){return r.location!==n.location||r.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:r.error,location:r.location,revalidation:n.revalidation||r.revalidation}}componentDidCatch(n,r){this.props.onError?this.props.onError(n,r):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const o=MC(n.digest);o&&(n=o)}let r=n!==void 0?v.createElement(Sn.Provider,{value:this.props.routeContext},v.createElement(lh.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?v.createElement(HC,{error:n},r):r}};Ub.contextType=EC;var sd=new WeakMap;function HC({children:n,error:r}){let{basename:o}=v.useContext(on);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let l=jC(r.digest);if(l){let s=sd.get(r);if(s)throw s;let c=Ab(l.location,o);if(Mb&&!sd.get(r))if(c.isExternal||l.reloadDocument)window.location.href=c.absoluteURL||c.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:l.replace}));throw sd.set(r,d),d}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return n}function BC({routeContext:n,match:r,children:o}){let l=v.useContext(qo);return l&&l.static&&l.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=r.route.id),v.createElement(Sn.Provider,{value:n},o)}function PC(n,r=[],o=null,l=null,s=null){if(n==null){if(!o)return null;if(o.errors)n=o.matches;else if(r.length===0&&!o.initialized&&o.matches.length>0)n=o.matches;else return null}let c=n,d=o?.errors;if(d!=null){let b=c.findIndex(p=>p.route.id&&d?.[p.route.id]!==void 0);Je(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),c=c.slice(0,Math.min(c.length,b+1))}let m=!1,y=-1;if(o)for(let b=0;b<c.length;b++){let p=c[b];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(y=b),p.route.id){let{loaderData:w,errors:C}=o,R=p.route.loader&&!w.hasOwnProperty(p.route.id)&&(!C||C[p.route.id]===void 0);if(p.route.lazy||R){m=!0,y>=0?c=c.slice(0,y+1):c=[c[0]];break}}}let g=o&&l?(b,p)=>{l(b,{location:o.location,params:o.matches?.[0]?.params??{},unstable_pattern:wC(o.matches),errorInfo:p})}:void 0;return c.reduceRight((b,p,w)=>{let C,R=!1,S=null,N=null;o&&(C=d&&p.route.id?d[p.route.id]:void 0,S=p.route.errorElement||UC,m&&(y<0&&w===0?(Hb("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,N=null):y===w&&(R=!0,N=p.route.hydrateFallbackElement||null)));let j=r.concat(c.slice(0,w+1)),O=()=>{let k;return C?k=S:R?k=N:p.route.Component?k=v.createElement(p.route.Component,null):p.route.element?k=p.route.element:k=b,v.createElement(BC,{match:p,routeContext:{outlet:b,matches:j,isDataRoute:o!=null},children:k})};return o&&(p.route.ErrorBoundary||p.route.errorElement||w===0)?v.createElement(Ub,{location:o.location,revalidation:o.revalidation,component:S,error:C,children:O(),routeContext:{outlet:null,matches:j,isDataRoute:!0},onError:g}):O()},null)}function sh(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qC(n){let r=v.useContext(qo);return Je(r,sh(n)),r}function $C(n){let r=v.useContext(mu);return Je(r,sh(n)),r}function VC(n){let r=v.useContext(Sn);return Je(r,sh(n)),r}function uh(n){let r=VC(n),o=r.matches[r.matches.length-1];return Je(o.route.id,`${n} can only be used on routes that contain a unique "id"`),o.route.id}function FC(){return uh("useRouteId")}function GC(){let n=v.useContext(lh),r=$C("useRouteError"),o=uh("useRouteError");return n!==void 0?n:r.errors?.[o]}function YC(){let{router:n}=qC("useNavigate"),r=uh("useNavigate"),o=v.useRef(!1);return kb(()=>{o.current=!0}),v.useCallback(async(s,c={})=>{bn(o.current,zb),o.current&&(typeof s=="number"?await n.navigate(s):await n.navigate(s,{fromRouteId:r,...c}))},[n,r])}var by={};function Hb(n,r,o){!r&&!by[n]&&(by[n]=!0,bn(!1,o))}v.memo(IC);function IC({routes:n,future:r,state:o,onError:l}){return Lb(n,void 0,o,l,r)}function pu({to:n,replace:r,state:o,relative:l}){Je($o(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=v.useContext(on);bn(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:c}=v.useContext(Sn),{pathname:d}=tr(),m=Vo(),y=ih(n,oh(c),d,l==="path"),g=JSON.stringify(y);return v.useEffect(()=>{m(JSON.parse(g),{replace:r,state:o,relative:l})},[m,g,l,r,o]),null}function Bb(n){return DC(n.context)}function wt(n){Je(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function QC({basename:n="/",children:r=null,location:o,navigationType:l="POP",navigator:s,static:c=!1,unstable_useTransitions:d}){Je(!$o(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=n.replace(/^\/*/,"/"),y=v.useMemo(()=>({basename:m,navigator:s,static:c,unstable_useTransitions:d,future:{}}),[m,s,c,d]);typeof o=="string"&&(o=Po(o));let{pathname:g="/",search:b="",hash:p="",state:w=null,key:C="default"}=o,R=v.useMemo(()=>{let S=ya(g,m);return S==null?null:{location:{pathname:S,search:b,hash:p,state:w,key:C},navigationType:l}},[m,g,b,p,w,C,l]);return bn(R!=null,`<Router basename="${m}"> is not able to match the URL "${g}${b}${p}" because it does not start with the basename, so the <Router> won't render anything.`),R==null?null:v.createElement(on.Provider,{value:y},v.createElement(il.Provider,{children:r,value:R}))}function KC({children:n,location:r}){return kC(Ld(n),r)}function Ld(n,r=[]){let o=[];return v.Children.forEach(n,(l,s)=>{if(!v.isValidElement(l))return;let c=[...r,s];if(l.type===v.Fragment){o.push.apply(o,Ld(l.props.children,c));return}Je(l.type===wt,`[${typeof l.type=="string"?l.type:l.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Je(!l.props.index||!l.props.children,"An index route cannot have child routes.");let d={id:l.props.id||c.join("-"),caseSensitive:l.props.caseSensitive,element:l.props.element,Component:l.props.Component,index:l.props.index,path:l.props.path,middleware:l.props.middleware,loader:l.props.loader,action:l.props.action,hydrateFallbackElement:l.props.hydrateFallbackElement,HydrateFallback:l.props.HydrateFallback,errorElement:l.props.errorElement,ErrorBoundary:l.props.ErrorBoundary,hasErrorBoundary:l.props.hasErrorBoundary===!0||l.props.ErrorBoundary!=null||l.props.errorElement!=null,shouldRevalidate:l.props.shouldRevalidate,handle:l.props.handle,lazy:l.props.lazy};l.props.children&&(d.children=Ld(l.props.children,c)),o.push(d)}),o}var Vs="get",Fs="application/x-www-form-urlencoded";function gu(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function XC(n){return gu(n)&&n.tagName.toLowerCase()==="button"}function ZC(n){return gu(n)&&n.tagName.toLowerCase()==="form"}function JC(n){return gu(n)&&n.tagName.toLowerCase()==="input"}function WC(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function e2(n,r){return n.button===0&&(!r||r==="_self")&&!WC(n)}var _s=null;function t2(){if(_s===null)try{new FormData(document.createElement("form"),0),_s=!1}catch{_s=!0}return _s}var n2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ud(n){return n!=null&&!n2.has(n)?(bn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Fs}"`),null):n}function a2(n,r){let o,l,s,c,d;if(ZC(n)){let m=n.getAttribute("action");l=m?ya(m,r):null,o=n.getAttribute("method")||Vs,s=ud(n.getAttribute("enctype"))||Fs,c=new FormData(n)}else if(XC(n)||JC(n)&&(n.type==="submit"||n.type==="image")){let m=n.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=n.getAttribute("formaction")||m.getAttribute("action");if(l=y?ya(y,r):null,o=n.getAttribute("formmethod")||m.getAttribute("method")||Vs,s=ud(n.getAttribute("formenctype"))||ud(m.getAttribute("enctype"))||Fs,c=new FormData(m,n),!t2()){let{name:g,type:b,value:p}=n;if(b==="image"){let w=g?`${g}.`:"";c.append(`${w}x`,"0"),c.append(`${w}y`,"0")}else g&&c.append(g,p)}}else{if(gu(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=Vs,l=null,s=Fs,d=n}return c&&s==="text/plain"&&(d=c,c=void 0),{action:l,method:o.toLowerCase(),encType:s,formData:c,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ch(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function r2(n,r,o){let l=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return l.pathname==="/"?l.pathname=`_root.${o}`:r&&ya(l.pathname,r)==="/"?l.pathname=`${r.replace(/\/$/,"")}/_root.${o}`:l.pathname=`${l.pathname.replace(/\/$/,"")}.${o}`,l}async function o2(n,r){if(n.id in r)return r[n.id];try{let o=await import(n.module);return r[n.id]=o,o}catch(o){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function i2(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function l2(n,r,o){let l=await Promise.all(n.map(async s=>{let c=r.routes[s.route.id];if(c){let d=await o2(c,o);return d.links?d.links():[]}return[]}));return f2(l.flat(1).filter(i2).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function xy(n,r,o,l,s,c){let d=(y,g)=>o[g]?y.route.id!==o[g].route.id:!0,m=(y,g)=>o[g].pathname!==y.pathname||o[g].route.path?.endsWith("*")&&o[g].params["*"]!==y.params["*"];return c==="assets"?r.filter((y,g)=>d(y,g)||m(y,g)):c==="data"?r.filter((y,g)=>{let b=l.routes[y.route.id];if(!b||!b.hasLoader)return!1;if(d(y,g)||m(y,g))return!0;if(y.route.shouldRevalidate){let p=y.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:o[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function s2(n,r,{includeHydrateFallback:o}={}){return u2(n.map(l=>{let s=r.routes[l.route.id];if(!s)return[];let c=[s.module];return s.clientActionModule&&(c=c.concat(s.clientActionModule)),s.clientLoaderModule&&(c=c.concat(s.clientLoaderModule)),o&&s.hydrateFallbackModule&&(c=c.concat(s.hydrateFallbackModule)),s.imports&&(c=c.concat(s.imports)),c}).flat(1))}function u2(n){return[...new Set(n)]}function c2(n){let r={},o=Object.keys(n).sort();for(let l of o)r[l]=n[l];return r}function f2(n,r){let o=new Set;return new Set(r),n.reduce((l,s)=>{let c=JSON.stringify(c2(s));return o.has(c)||(o.add(c),l.push({key:c,link:s})),l},[])}function Pb(){let n=v.useContext(qo);return ch(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function d2(){let n=v.useContext(mu);return ch(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var fh=v.createContext(void 0);fh.displayName="FrameworkContext";function qb(){let n=v.useContext(fh);return ch(n,"You must render this element inside a <HydratedRouter> element"),n}function h2(n,r){let o=v.useContext(fh),[l,s]=v.useState(!1),[c,d]=v.useState(!1),{onFocus:m,onBlur:y,onMouseEnter:g,onMouseLeave:b,onTouchStart:p}=r,w=v.useRef(null);v.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let S=j=>{j.forEach(O=>{d(O.isIntersecting)})},N=new IntersectionObserver(S,{threshold:.5});return w.current&&N.observe(w.current),()=>{N.disconnect()}}},[n]),v.useEffect(()=>{if(l){let S=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(S)}}},[l]);let C=()=>{s(!0)},R=()=>{s(!1),d(!1)};return o?n!=="intent"?[c,w,{}]:[c,w,{onFocus:Ii(m,C),onBlur:Ii(y,R),onMouseEnter:Ii(g,C),onMouseLeave:Ii(b,R),onTouchStart:Ii(p,C)}]:[!1,w,{}]}function Ii(n,r){return o=>{n&&n(o),o.defaultPrevented||r(o)}}function m2({page:n,...r}){let{router:o}=Pb(),l=v.useMemo(()=>Rb(o.routes,n,o.basename),[o.routes,n,o.basename]);return l?v.createElement(g2,{page:n,matches:l,...r}):null}function p2(n){let{manifest:r,routeModules:o}=qb(),[l,s]=v.useState([]);return v.useEffect(()=>{let c=!1;return l2(n,r,o).then(d=>{c||s(d)}),()=>{c=!0}},[n,r,o]),l}function g2({page:n,matches:r,...o}){let l=tr(),{manifest:s,routeModules:c}=qb(),{basename:d}=Pb(),{loaderData:m,matches:y}=d2(),g=v.useMemo(()=>xy(n,r,y,s,l,"data"),[n,r,y,s,l]),b=v.useMemo(()=>xy(n,r,y,s,l,"assets"),[n,r,y,s,l]),p=v.useMemo(()=>{if(n===l.pathname+l.search+l.hash)return[];let R=new Set,S=!1;if(r.forEach(j=>{let O=s.routes[j.route.id];!O||!O.hasLoader||(!g.some(k=>k.route.id===j.route.id)&&j.route.id in m&&c[j.route.id]?.shouldRevalidate||O.hasClientLoader?S=!0:R.add(j.route.id))}),R.size===0)return[];let N=r2(n,d,"data");return S&&R.size>0&&N.searchParams.set("_routes",r.filter(j=>R.has(j.route.id)).map(j=>j.route.id).join(",")),[N.pathname+N.search]},[d,m,l,s,g,r,n,c]),w=v.useMemo(()=>s2(b,s),[b,s]),C=p2(b);return v.createElement(v.Fragment,null,p.map(R=>v.createElement("link",{key:R,rel:"prefetch",as:"fetch",href:R,...o})),w.map(R=>v.createElement("link",{key:R,rel:"modulepreload",href:R,...o})),C.map(({key:R,link:S})=>v.createElement("link",{key:R,nonce:o.nonce,...S})))}function v2(...n){return r=>{n.forEach(o=>{typeof o=="function"?o(r):o!=null&&(o.current=r)})}}var y2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{y2&&(window.__reactRouterVersion="7.11.0")}catch{}function b2({basename:n,children:r,unstable_useTransitions:o,window:l}){let s=v.useRef();s.current==null&&(s.current=XE({window:l,v5Compat:!0}));let c=s.current,[d,m]=v.useState({action:c.action,location:c.location}),y=v.useCallback(g=>{o===!1?m(g):v.startTransition(()=>m(g))},[o]);return v.useLayoutEffect(()=>c.listen(y),[c,y]),v.createElement(QC,{basename:n,children:r,location:d.location,navigationType:d.action,navigator:c,unstable_useTransitions:o})}var $b=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xn=v.forwardRef(function({onClick:r,discover:o="render",prefetch:l="none",relative:s,reloadDocument:c,replace:d,state:m,target:y,to:g,preventScrollReset:b,viewTransition:p,unstable_defaultShouldRevalidate:w,...C},R){let{basename:S,unstable_useTransitions:N}=v.useContext(on),j=typeof g=="string"&&$b.test(g),O=Ab(g,S);g=O.to;let k=AC(g,{relative:s}),[Q,I,Z]=h2(l,C),B=S2(g,{replace:d,state:m,target:y,preventScrollReset:b,relative:s,viewTransition:p,unstable_defaultShouldRevalidate:w,unstable_useTransitions:N});function G(ie){r&&r(ie),ie.defaultPrevented||B(ie)}let ue=v.createElement("a",{...C,...Z,href:O.absoluteURL||k,onClick:O.isExternal||c?r:G,ref:v2(R,I),target:y,"data-discover":!j&&o==="render"?"true":void 0});return Q&&!j?v.createElement(v.Fragment,null,ue,v.createElement(m2,{page:k})):ue});xn.displayName="Link";var Ws=v.forwardRef(function({"aria-current":r="page",caseSensitive:o=!1,className:l="",end:s=!1,style:c,to:d,viewTransition:m,children:y,...g},b){let p=ll(d,{relative:g.relative}),w=tr(),C=v.useContext(mu),{navigator:R,basename:S}=v.useContext(on),N=C!=null&&T2(p)&&m===!0,j=R.encodeLocation?R.encodeLocation(p).pathname:p.pathname,O=w.pathname,k=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;o||(O=O.toLowerCase(),k=k?k.toLowerCase():null,j=j.toLowerCase()),k&&S&&(k=ya(k,S)||k);const Q=j!=="/"&&j.endsWith("/")?j.length-1:j.length;let I=O===j||!s&&O.startsWith(j)&&O.charAt(Q)==="/",Z=k!=null&&(k===j||!s&&k.startsWith(j)&&k.charAt(j.length)==="/"),B={isActive:I,isPending:Z,isTransitioning:N},G=I?r:void 0,ue;typeof l=="function"?ue=l(B):ue=[l,I?"active":null,Z?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let ie=typeof c=="function"?c(B):c;return v.createElement(xn,{...g,"aria-current":G,className:ue,ref:b,style:ie,to:d,viewTransition:m},typeof y=="function"?y(B):y)});Ws.displayName="NavLink";var x2=v.forwardRef(({discover:n="render",fetcherKey:r,navigate:o,reloadDocument:l,replace:s,state:c,method:d=Vs,action:m,onSubmit:y,relative:g,preventScrollReset:b,viewTransition:p,unstable_defaultShouldRevalidate:w,...C},R)=>{let{unstable_useTransitions:S}=v.useContext(on),N=R2(),j=N2(m,{relative:g}),O=d.toLowerCase()==="get"?"get":"post",k=typeof m=="string"&&$b.test(m),Q=I=>{if(y&&y(I),I.defaultPrevented)return;I.preventDefault();let Z=I.nativeEvent.submitter,B=Z?.getAttribute("formmethod")||d,G=()=>N(Z||I.currentTarget,{fetcherKey:r,method:B,navigate:o,replace:s,state:c,relative:g,preventScrollReset:b,viewTransition:p,unstable_defaultShouldRevalidate:w});S&&o!==!1?v.startTransition(()=>G()):G()};return v.createElement("form",{ref:R,method:O,action:j,onSubmit:l?y:Q,...C,"data-discover":!k&&n==="render"?"true":void 0})});x2.displayName="Form";function w2(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Vb(n){let r=v.useContext(qo);return Je(r,w2(n)),r}function S2(n,{target:r,replace:o,state:l,preventScrollReset:s,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:m,unstable_useTransitions:y}={}){let g=Vo(),b=tr(),p=ll(n,{relative:c});return v.useCallback(w=>{if(e2(w,r)){w.preventDefault();let C=o!==void 0?o:Wi(b)===Wi(p),R=()=>g(n,{replace:C,state:l,preventScrollReset:s,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:m});y?v.startTransition(()=>R()):R()}},[b,g,p,o,l,r,n,s,c,d,m,y])}var E2=0,C2=()=>`__${String(++E2)}__`;function R2(){let{router:n}=Vb("useSubmit"),{basename:r}=v.useContext(on),o=FC(),l=n.fetch,s=n.navigate;return v.useCallback(async(c,d={})=>{let{action:m,method:y,encType:g,formData:b,body:p}=a2(c,r);if(d.navigate===!1){let w=d.fetcherKey||C2();await l(w,o,d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:b,body:p,formMethod:d.method||y,formEncType:d.encType||g,flushSync:d.flushSync})}else await s(d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:b,body:p,formMethod:d.method||y,formEncType:d.encType||g,replace:d.replace,state:d.state,fromRouteId:o,flushSync:d.flushSync,viewTransition:d.viewTransition})},[l,s,r,o])}function N2(n,{relative:r}={}){let{basename:o}=v.useContext(on),l=v.useContext(Sn);Je(l,"useFormAction must be used inside a RouteContext");let[s]=l.matches.slice(-1),c={...ll(n||".",{relative:r})},d=tr();if(n==null){c.search=d.search;let m=new URLSearchParams(c.search),y=m.getAll("index");if(y.some(b=>b==="")){m.delete("index"),y.filter(p=>p).forEach(p=>m.append("index",p));let b=m.toString();c.search=b?`?${b}`:""}}return(!n||n===".")&&s.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(c.pathname=c.pathname==="/"?o:ga([o,c.pathname])),Wi(c)}function T2(n,{relative:r}={}){let o=v.useContext(_b);Je(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:l}=Vb("useViewTransitionState"),s=ll(n,{relative:r});if(!o.isTransitioning)return!1;let c=ya(o.currentLocation.pathname,l)||o.currentLocation.pathname,d=ya(o.nextLocation.pathname,l)||o.nextLocation.pathname;return Js(s.pathname,d)!=null||Js(s.pathname,c)!=null}var sl=hb();const Fb=hu(sl);function j2(n){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",r.appendChild(o),o.styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n))}const M2=n=>{switch(n){case"success":return _2;case"info":return z2;case"warning":return D2;case"error":return k2;default:return null}},A2=Array(12).fill(0),O2=({visible:n,className:r})=>se.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":n},se.createElement("div",{className:"sonner-spinner"},A2.map((o,l)=>se.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${l}`})))),_2=se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},se.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),D2=se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},se.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),z2=se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},se.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),k2=se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},se.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),L2=se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},se.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),se.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),U2=()=>{const[n,r]=se.useState(document.hidden);return se.useEffect(()=>{const o=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),n};let Ud=1;class H2{constructor(){this.subscribe=r=>(this.subscribers.push(r),()=>{const o=this.subscribers.indexOf(r);this.subscribers.splice(o,1)}),this.publish=r=>{this.subscribers.forEach(o=>o(r))},this.addToast=r=>{this.publish(r),this.toasts=[...this.toasts,r]},this.create=r=>{var o;const{message:l,...s}=r,c=typeof r?.id=="number"||((o=r.id)==null?void 0:o.length)>0?r.id:Ud++,d=this.toasts.find(y=>y.id===c),m=r.dismissible===void 0?!0:r.dismissible;return this.dismissedToasts.has(c)&&this.dismissedToasts.delete(c),d?this.toasts=this.toasts.map(y=>y.id===c?(this.publish({...y,...r,id:c,title:l}),{...y,...r,id:c,dismissible:m,title:l}):y):this.addToast({title:l,...s,dismissible:m,id:c}),c},this.dismiss=r=>(r?(this.dismissedToasts.add(r),requestAnimationFrame(()=>this.subscribers.forEach(o=>o({id:r,dismiss:!0})))):this.toasts.forEach(o=>{this.subscribers.forEach(l=>l({id:o.id,dismiss:!0}))}),r),this.message=(r,o)=>this.create({...o,message:r}),this.error=(r,o)=>this.create({...o,message:r,type:"error"}),this.success=(r,o)=>this.create({...o,type:"success",message:r}),this.info=(r,o)=>this.create({...o,type:"info",message:r}),this.warning=(r,o)=>this.create({...o,type:"warning",message:r}),this.loading=(r,o)=>this.create({...o,type:"loading",message:r}),this.promise=(r,o)=>{if(!o)return;let l;o.loading!==void 0&&(l=this.create({...o,promise:r,type:"loading",message:o.loading,description:typeof o.description!="function"?o.description:void 0}));const s=Promise.resolve(r instanceof Function?r():r);let c=l!==void 0,d;const m=s.then(async g=>{if(d=["resolve",g],se.isValidElement(g))c=!1,this.create({id:l,type:"default",message:g});else if(P2(g)&&!g.ok){c=!1;const p=typeof o.error=="function"?await o.error(`HTTP error! status: ${g.status}`):o.error,w=typeof o.description=="function"?await o.description(`HTTP error! status: ${g.status}`):o.description,R=typeof p=="object"&&!se.isValidElement(p)?p:{message:p};this.create({id:l,type:"error",description:w,...R})}else if(g instanceof Error){c=!1;const p=typeof o.error=="function"?await o.error(g):o.error,w=typeof o.description=="function"?await o.description(g):o.description,R=typeof p=="object"&&!se.isValidElement(p)?p:{message:p};this.create({id:l,type:"error",description:w,...R})}else if(o.success!==void 0){c=!1;const p=typeof o.success=="function"?await o.success(g):o.success,w=typeof o.description=="function"?await o.description(g):o.description,R=typeof p=="object"&&!se.isValidElement(p)?p:{message:p};this.create({id:l,type:"success",description:w,...R})}}).catch(async g=>{if(d=["reject",g],o.error!==void 0){c=!1;const b=typeof o.error=="function"?await o.error(g):o.error,p=typeof o.description=="function"?await o.description(g):o.description,C=typeof b=="object"&&!se.isValidElement(b)?b:{message:b};this.create({id:l,type:"error",description:p,...C})}}).finally(()=>{c&&(this.dismiss(l),l=void 0),o.finally==null||o.finally.call(o)}),y=()=>new Promise((g,b)=>m.then(()=>d[0]==="reject"?b(d[1]):g(d[1])).catch(b));return typeof l!="string"&&typeof l!="number"?{unwrap:y}:Object.assign(l,{unwrap:y})},this.custom=(r,o)=>{const l=o?.id||Ud++;return this.create({jsx:r(l),id:l,...o}),l},this.getActiveToasts=()=>this.toasts.filter(r=>!this.dismissedToasts.has(r.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Gt=new H2,B2=(n,r)=>{const o=r?.id||Ud++;return Gt.addToast({title:n,...r,id:o}),o},P2=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",q2=B2,$2=()=>Gt.toasts,V2=()=>Gt.getActiveToasts(),Ze=Object.assign(q2,{success:Gt.success,info:Gt.info,warning:Gt.warning,error:Gt.error,custom:Gt.custom,message:Gt.message,promise:Gt.promise,dismiss:Gt.dismiss,loading:Gt.loading},{getHistory:$2,getToasts:V2});j2("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Ds(n){return n.label!==void 0}const F2=3,G2="24px",Y2="16px",wy=4e3,I2=356,Q2=14,K2=45,X2=200;function Pn(...n){return n.filter(Boolean).join(" ")}function Z2(n){const[r,o]=n.split("-"),l=[];return r&&l.push(r),o&&l.push(o),l}const J2=n=>{var r,o,l,s,c,d,m,y,g;const{invert:b,toast:p,unstyled:w,interacting:C,setHeights:R,visibleToasts:S,heights:N,index:j,toasts:O,expanded:k,removeToast:Q,defaultRichColors:I,closeButton:Z,style:B,cancelButtonStyle:G,actionButtonStyle:ue,className:ie="",descriptionClassName:oe="",duration:fe,position:ge,gap:ae,expandByDefault:W,classNames:T,icons:U,closeButtonAriaLabel:_="Close toast"}=n,[F,ne]=se.useState(null),[M,A]=se.useState(null),[L,P]=se.useState(!1),[K,re]=se.useState(!1),[Y,le]=se.useState(!1),[ce,ve]=se.useState(!1),[we,Ce]=se.useState(!1),[et,ut]=se.useState(0),[Qn,Dn]=se.useState(0),En=se.useRef(p.duration||fe||wy),Zo=se.useRef(null),Qt=se.useRef(null),Jo=j===0,Wo=j+1<=S,Tt=p.type,wa=p.dismissible!==!1,jt=p.className||"",$u=p.descriptionClassName||"",ir=se.useMemo(()=>N.findIndex(Se=>Se.toastId===p.id)||0,[N,p.id]),vl=se.useMemo(()=>{var Se;return(Se=p.closeButton)!=null?Se:Z},[p.closeButton,Z]),lr=se.useMemo(()=>p.duration||fe||wy,[p.duration,fe]),ei=se.useRef(0),Kn=se.useRef(0),yl=se.useRef(0),Sa=se.useRef(null),[sr,Mt]=ge.split("-"),Cn=se.useMemo(()=>N.reduce((Se,Ke,ht)=>ht>=ir?Se:Se+Ke.height,0),[N,ir]),Et=U2(),Vu=p.invert||b,ti=Tt==="loading";Kn.current=se.useMemo(()=>ir*ae+Cn,[ir,Cn]),se.useEffect(()=>{En.current=lr},[lr]),se.useEffect(()=>{P(!0)},[]),se.useEffect(()=>{const Se=Qt.current;if(Se){const Ke=Se.getBoundingClientRect().height;return Dn(Ke),R(ht=>[{toastId:p.id,height:Ke,position:p.position},...ht]),()=>R(ht=>ht.filter(Ct=>Ct.toastId!==p.id))}},[R,p.id]),se.useLayoutEffect(()=>{if(!L)return;const Se=Qt.current,Ke=Se.style.height;Se.style.height="auto";const ht=Se.getBoundingClientRect().height;Se.style.height=Ke,Dn(ht),R(Ct=>Ct.find(We=>We.toastId===p.id)?Ct.map(We=>We.toastId===p.id?{...We,height:ht}:We):[{toastId:p.id,height:ht,position:p.position},...Ct])},[L,p.title,p.description,R,p.id,p.jsx,p.action,p.cancel]);const zn=se.useCallback(()=>{re(!0),ut(Kn.current),R(Se=>Se.filter(Ke=>Ke.toastId!==p.id)),setTimeout(()=>{Q(p)},X2)},[p,Q,R,Kn]);se.useEffect(()=>{if(p.promise&&Tt==="loading"||p.duration===1/0||p.type==="loading")return;let Se;return k||C||Et?(()=>{if(yl.current<ei.current){const Ct=new Date().getTime()-ei.current;En.current=En.current-Ct}yl.current=new Date().getTime()})():En.current!==1/0&&(ei.current=new Date().getTime(),Se=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),zn()},En.current)),()=>clearTimeout(Se)},[k,C,p,Tt,Et,zn]),se.useEffect(()=>{p.delete&&(zn(),p.onDismiss==null||p.onDismiss.call(p,p))},[zn,p.delete]);function Pr(){var Se;if(U?.loading){var Ke;return se.createElement("div",{className:Pn(T?.loader,p==null||(Ke=p.classNames)==null?void 0:Ke.loader,"sonner-loader"),"data-visible":Tt==="loading"},U.loading)}return se.createElement(O2,{className:Pn(T?.loader,p==null||(Se=p.classNames)==null?void 0:Se.loader),visible:Tt==="loading"})}const qr=p.icon||U?.[Tt]||M2(Tt);var ur,kn;return se.createElement("li",{tabIndex:0,ref:Qt,className:Pn(ie,jt,T?.toast,p==null||(r=p.classNames)==null?void 0:r.toast,T?.default,T?.[Tt],p==null||(o=p.classNames)==null?void 0:o[Tt]),"data-sonner-toast":"","data-rich-colors":(ur=p.richColors)!=null?ur:I,"data-styled":!(p.jsx||p.unstyled||w),"data-mounted":L,"data-promise":!!p.promise,"data-swiped":we,"data-removed":K,"data-visible":Wo,"data-y-position":sr,"data-x-position":Mt,"data-index":j,"data-front":Jo,"data-swiping":Y,"data-dismissible":wa,"data-type":Tt,"data-invert":Vu,"data-swipe-out":ce,"data-swipe-direction":M,"data-expanded":!!(k||W&&L),"data-testid":p.testId,style:{"--index":j,"--toasts-before":j,"--z-index":O.length-j,"--offset":`${K?et:Kn.current}px`,"--initial-height":W?"auto":`${Qn}px`,...B,...p.style},onDragEnd:()=>{le(!1),ne(null),Sa.current=null},onPointerDown:Se=>{Se.button!==2&&(ti||!wa||(Zo.current=new Date,ut(Kn.current),Se.target.setPointerCapture(Se.pointerId),Se.target.tagName!=="BUTTON"&&(le(!0),Sa.current={x:Se.clientX,y:Se.clientY})))},onPointerUp:()=>{var Se,Ke,ht;if(ce||!wa)return;Sa.current=null;const Ct=Number(((Se=Qt.current)==null?void 0:Se.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ea=Number(((Ke=Qt.current)==null?void 0:Ke.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),We=new Date().getTime()-((ht=Zo.current)==null?void 0:ht.getTime()),kt=F==="x"?Ct:Ea,cr=Math.abs(kt)/We;if(Math.abs(kt)>=K2||cr>.11){ut(Kn.current),p.onDismiss==null||p.onDismiss.call(p,p),A(F==="x"?Ct>0?"right":"left":Ea>0?"down":"up"),zn(),ve(!0);return}else{var Lt,Ut;(Lt=Qt.current)==null||Lt.style.setProperty("--swipe-amount-x","0px"),(Ut=Qt.current)==null||Ut.style.setProperty("--swipe-amount-y","0px")}Ce(!1),le(!1),ne(null)},onPointerMove:Se=>{var Ke,ht,Ct;if(!Sa.current||!wa||((Ke=window.getSelection())==null?void 0:Ke.toString().length)>0)return;const We=Se.clientY-Sa.current.y,kt=Se.clientX-Sa.current.x;var cr;const Lt=(cr=n.swipeDirections)!=null?cr:Z2(ge);!F&&(Math.abs(kt)>1||Math.abs(We)>1)&&ne(Math.abs(kt)>Math.abs(We)?"x":"y");let Ut={x:0,y:0};const $r=Rn=>1/(1.5+Math.abs(Rn)/20);if(F==="y"){if(Lt.includes("top")||Lt.includes("bottom"))if(Lt.includes("top")&&We<0||Lt.includes("bottom")&&We>0)Ut.y=We;else{const Rn=We*$r(We);Ut.y=Math.abs(Rn)<Math.abs(We)?Rn:We}}else if(F==="x"&&(Lt.includes("left")||Lt.includes("right")))if(Lt.includes("left")&&kt<0||Lt.includes("right")&&kt>0)Ut.x=kt;else{const Rn=kt*$r(kt);Ut.x=Math.abs(Rn)<Math.abs(kt)?Rn:kt}(Math.abs(Ut.x)>0||Math.abs(Ut.y)>0)&&Ce(!0),(ht=Qt.current)==null||ht.style.setProperty("--swipe-amount-x",`${Ut.x}px`),(Ct=Qt.current)==null||Ct.style.setProperty("--swipe-amount-y",`${Ut.y}px`)}},vl&&!p.jsx&&Tt!=="loading"?se.createElement("button",{"aria-label":_,"data-disabled":ti,"data-close-button":!0,onClick:ti||!wa?()=>{}:()=>{zn(),p.onDismiss==null||p.onDismiss.call(p,p)},className:Pn(T?.closeButton,p==null||(l=p.classNames)==null?void 0:l.closeButton)},(kn=U?.close)!=null?kn:L2):null,(Tt||p.icon||p.promise)&&p.icon!==null&&(U?.[Tt]!==null||p.icon)?se.createElement("div",{"data-icon":"",className:Pn(T?.icon,p==null||(s=p.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Pr():null,p.type!=="loading"?qr:null):null,se.createElement("div",{"data-content":"",className:Pn(T?.content,p==null||(c=p.classNames)==null?void 0:c.content)},se.createElement("div",{"data-title":"",className:Pn(T?.title,p==null||(d=p.classNames)==null?void 0:d.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?se.createElement("div",{"data-description":"",className:Pn(oe,$u,T?.description,p==null||(m=p.classNames)==null?void 0:m.description)},typeof p.description=="function"?p.description():p.description):null),se.isValidElement(p.cancel)?p.cancel:p.cancel&&Ds(p.cancel)?se.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||G,onClick:Se=>{Ds(p.cancel)&&wa&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Se),zn())},className:Pn(T?.cancelButton,p==null||(y=p.classNames)==null?void 0:y.cancelButton)},p.cancel.label):null,se.isValidElement(p.action)?p.action:p.action&&Ds(p.action)?se.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||ue,onClick:Se=>{Ds(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Se),!Se.defaultPrevented&&zn())},className:Pn(T?.actionButton,p==null||(g=p.classNames)==null?void 0:g.actionButton)},p.action.label):null)};function Sy(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function W2(n,r){const o={};return[n,r].forEach((l,s)=>{const c=s===1,d=c?"--mobile-offset":"--offset",m=c?Y2:G2;function y(g){["top","right","bottom","left"].forEach(b=>{o[`${d}-${b}`]=typeof g=="number"?`${g}px`:g})}typeof l=="number"||typeof l=="string"?y(l):typeof l=="object"?["top","right","bottom","left"].forEach(g=>{l[g]===void 0?o[`${d}-${g}`]=m:o[`${d}-${g}`]=typeof l[g]=="number"?`${l[g]}px`:l[g]}):y(m)}),o}const eR=se.forwardRef(function(r,o){const{id:l,invert:s,position:c="bottom-right",hotkey:d=["altKey","KeyT"],expand:m,closeButton:y,className:g,offset:b,mobileOffset:p,theme:w="light",richColors:C,duration:R,style:S,visibleToasts:N=F2,toastOptions:j,dir:O=Sy(),gap:k=Q2,icons:Q,containerAriaLabel:I="Notifications"}=r,[Z,B]=se.useState([]),G=se.useMemo(()=>l?Z.filter(L=>L.toasterId===l):Z.filter(L=>!L.toasterId),[Z,l]),ue=se.useMemo(()=>Array.from(new Set([c].concat(G.filter(L=>L.position).map(L=>L.position)))),[G,c]),[ie,oe]=se.useState([]),[fe,ge]=se.useState(!1),[ae,W]=se.useState(!1),[T,U]=se.useState(w!=="system"?w:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),_=se.useRef(null),F=d.join("+").replace(/Key/g,"").replace(/Digit/g,""),ne=se.useRef(null),M=se.useRef(!1),A=se.useCallback(L=>{B(P=>{var K;return(K=P.find(re=>re.id===L.id))!=null&&K.delete||Gt.dismiss(L.id),P.filter(({id:re})=>re!==L.id)})},[]);return se.useEffect(()=>Gt.subscribe(L=>{if(L.dismiss){requestAnimationFrame(()=>{B(P=>P.map(K=>K.id===L.id?{...K,delete:!0}:K))});return}setTimeout(()=>{Fb.flushSync(()=>{B(P=>{const K=P.findIndex(re=>re.id===L.id);return K!==-1?[...P.slice(0,K),{...P[K],...L},...P.slice(K+1)]:[L,...P]})})})}),[Z]),se.useEffect(()=>{if(w!=="system"){U(w);return}if(w==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;const L=window.matchMedia("(prefers-color-scheme: dark)");try{L.addEventListener("change",({matches:P})=>{U(P?"dark":"light")})}catch{L.addListener(({matches:K})=>{try{U(K?"dark":"light")}catch(re){console.error(re)}})}},[w]),se.useEffect(()=>{Z.length<=1&&ge(!1)},[Z]),se.useEffect(()=>{const L=P=>{var K;if(d.every(le=>P[le]||P.code===le)){var Y;ge(!0),(Y=_.current)==null||Y.focus()}P.code==="Escape"&&(document.activeElement===_.current||(K=_.current)!=null&&K.contains(document.activeElement))&&ge(!1)};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},[d]),se.useEffect(()=>{if(_.current)return()=>{ne.current&&(ne.current.focus({preventScroll:!0}),ne.current=null,M.current=!1)}},[_.current]),se.createElement("section",{ref:o,"aria-label":`${I} ${F}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},ue.map((L,P)=>{var K;const[re,Y]=L.split("-");return G.length?se.createElement("ol",{key:L,dir:O==="auto"?Sy():O,tabIndex:-1,ref:_,className:g,"data-sonner-toaster":!0,"data-sonner-theme":T,"data-y-position":re,"data-x-position":Y,style:{"--front-toast-height":`${((K=ie[0])==null?void 0:K.height)||0}px`,"--width":`${I2}px`,"--gap":`${k}px`,...S,...W2(b,p)},onBlur:le=>{M.current&&!le.currentTarget.contains(le.relatedTarget)&&(M.current=!1,ne.current&&(ne.current.focus({preventScroll:!0}),ne.current=null))},onFocus:le=>{le.target instanceof HTMLElement&&le.target.dataset.dismissible==="false"||M.current||(M.current=!0,ne.current=le.relatedTarget)},onMouseEnter:()=>ge(!0),onMouseMove:()=>ge(!0),onMouseLeave:()=>{ae||ge(!1)},onDragEnd:()=>ge(!1),onPointerDown:le=>{le.target instanceof HTMLElement&&le.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},G.filter(le=>!le.position&&P===0||le.position===L).map((le,ce)=>{var ve,we;return se.createElement(J2,{key:le.id,icons:Q,index:ce,toast:le,defaultRichColors:C,duration:(ve=j?.duration)!=null?ve:R,className:j?.className,descriptionClassName:j?.descriptionClassName,invert:s,visibleToasts:N,closeButton:(we=j?.closeButton)!=null?we:y,interacting:ae,position:L,style:j?.style,unstyled:j?.unstyled,classNames:j?.classNames,cancelButtonStyle:j?.cancelButtonStyle,actionButtonStyle:j?.actionButtonStyle,closeButtonAriaLabel:j?.closeButtonAriaLabel,removeToast:A,toasts:G.filter(Ce=>Ce.position==le.position),heights:ie.filter(Ce=>Ce.position==le.position),setHeights:oe,expandByDefault:m,gap:k,expanded:fe,swipeDirections:r.swipeDirections})})):null}))});function tR(n={}){const{immediate:r=!1,onNeedRefresh:o,onOfflineReady:l,onRegistered:s,onRegisteredSW:c,onRegisterError:d}=n;let m,y;const g=async(p=!0)=>{await y};async function b(){if("serviceWorker"in navigator){if(m=await db(async()=>{const{Workbox:p}=await import("./workbox-window.prod.es5-BIl4cyR9.js");return{Workbox:p}},[]).then(({Workbox:p})=>new p("/sw.js",{scope:"/",type:"classic"})).catch(p=>{d?.(p)}),!m)return;m.addEventListener("activated",p=>{(p.isUpdate||p.isExternal)&&window.location.reload()}),m.addEventListener("installed",p=>{p.isUpdate||l?.()}),m.register({immediate:r}).then(p=>{c?c("/sw.js",p):s?.(p)}).catch(p=>{d?.(p)})}}return y=b(),g}function he(n,r,{checkForDefaultPrevented:o=!0}={}){return function(s){if(n?.(s),o===!1||!s.defaultPrevented)return r?.(s)}}function Ey(n,r){if(typeof n=="function")return n(r);n!=null&&(n.current=r)}function It(...n){return r=>{let o=!1;const l=n.map(s=>{const c=Ey(s,r);return!o&&typeof c=="function"&&(o=!0),c});if(o)return()=>{for(let s=0;s<l.length;s++){const c=l[s];typeof c=="function"?c():Ey(n[s],null)}}}}function $e(...n){return v.useCallback(It(...n),n)}function nR(n,r){const o=v.createContext(r),l=c=>{const{children:d,...m}=c,y=v.useMemo(()=>m,Object.values(m));return h.jsx(o.Provider,{value:y,children:d})};l.displayName=n+"Provider";function s(c){const d=v.useContext(o);if(d)return d;if(r!==void 0)return r;throw new Error(`\`${c}\` must be used within \`${n}\``)}return[l,s]}function nr(n,r=[]){let o=[];function l(c,d){const m=v.createContext(d),y=o.length;o=[...o,d];const g=p=>{const{scope:w,children:C,...R}=p,S=w?.[n]?.[y]||m,N=v.useMemo(()=>R,Object.values(R));return h.jsx(S.Provider,{value:N,children:C})};g.displayName=c+"Provider";function b(p,w){const C=w?.[n]?.[y]||m,R=v.useContext(C);if(R)return R;if(d!==void 0)return d;throw new Error(`\`${p}\` must be used within \`${c}\``)}return[g,b]}const s=()=>{const c=o.map(d=>v.createContext(d));return function(m){const y=m?.[n]||c;return v.useMemo(()=>({[`__scope${n}`]:{...m,[n]:y}}),[m,y])}};return s.scopeName=n,[l,aR(s,...r)]}function aR(...n){const r=n[0];if(n.length===1)return r;const o=()=>{const l=n.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(c){const d=l.reduce((m,{useScope:y,scopeName:g})=>{const p=y(c)[`__scope${g}`];return{...m,...p}},{});return v.useMemo(()=>({[`__scope${r.scopeName}`]:d}),[d])}};return o.scopeName=r.scopeName,o}var Nt=globalThis?.document?v.useLayoutEffect:()=>{},rR=eh[" useId ".trim().toString()]||(()=>{}),oR=0;function _t(n){const[r,o]=v.useState(rR());return Nt(()=>{o(l=>l??String(oR++))},[n]),n||(r?`radix-${r}`:"")}var iR=eh[" useInsertionEffect ".trim().toString()]||Nt;function Lo({prop:n,defaultProp:r,onChange:o=()=>{},caller:l}){const[s,c,d]=lR({defaultProp:r,onChange:o}),m=n!==void 0,y=m?n:s;{const b=v.useRef(n!==void 0);v.useEffect(()=>{const p=b.current;p!==m&&console.warn(`${l} is changing from ${p?"controlled":"uncontrolled"} to ${m?"controlled":"uncontrolled"}. 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.`),b.current=m},[m,l])}const g=v.useCallback(b=>{if(m){const p=sR(b)?b(n):b;p!==n&&d.current?.(p)}else c(b)},[m,n,c,d]);return[y,g]}function lR({defaultProp:n,onChange:r}){const[o,l]=v.useState(n),s=v.useRef(o),c=v.useRef(r);return iR(()=>{c.current=r},[r]),v.useEffect(()=>{s.current!==o&&(c.current?.(o),s.current=o)},[o,s]),[o,l,c]}function sR(n){return typeof n=="function"}function uR(n){const r=cR(n),o=v.forwardRef((l,s)=>{const{children:c,...d}=l,m=v.Children.toArray(c),y=m.find(dR);if(y){const g=y.props.children,b=m.map(p=>p===y?v.Children.count(g)>1?v.Children.only(null):v.isValidElement(g)?g.props.children:null:p);return h.jsx(r,{...d,ref:s,children:v.isValidElement(g)?v.cloneElement(g,void 0,b):null})}return h.jsx(r,{...d,ref:s,children:c})});return o.displayName=`${n}.Slot`,o}function cR(n){const r=v.forwardRef((o,l)=>{const{children:s,...c}=o;if(v.isValidElement(s)){const d=mR(s),m=hR(c,s.props);return s.type!==v.Fragment&&(m.ref=l?It(l,d):d),v.cloneElement(s,m)}return v.Children.count(s)>1?v.Children.only(null):null});return r.displayName=`${n}.SlotClone`,r}var fR=Symbol("radix.slottable");function dR(n){return v.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===fR}function hR(n,r){const o={...r};for(const l in r){const s=n[l],c=r[l];/^on[A-Z]/.test(l)?s&&c?o[l]=(...m)=>{const y=c(...m);return s(...m),y}:s&&(o[l]=s):l==="style"?o[l]={...s,...c}:l==="className"&&(o[l]=[s,c].filter(Boolean).join(" "))}return{...n,...o}}function mR(n){let r=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?n.ref:(r=Object.getOwnPropertyDescriptor(n,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}var pR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],De=pR.reduce((n,r)=>{const o=uR(`Primitive.${r}`),l=v.forwardRef((s,c)=>{const{asChild:d,...m}=s,y=d?o:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(y,{...m,ref:c})});return l.displayName=`Primitive.${r}`,{...n,[r]:l}},{});function Gb(n,r){n&&sl.flushSync(()=>n.dispatchEvent(r))}function Fn(n){const r=v.useRef(n);return v.useEffect(()=>{r.current=n}),v.useMemo(()=>(...o)=>r.current?.(...o),[])}function gR(n,r=globalThis?.document){const o=Fn(n);v.useEffect(()=>{const l=s=>{s.key==="Escape"&&o(s)};return r.addEventListener("keydown",l,{capture:!0}),()=>r.removeEventListener("keydown",l,{capture:!0})},[o,r])}var vR="DismissableLayer",Hd="dismissableLayer.update",yR="dismissableLayer.pointerDownOutside",bR="dismissableLayer.focusOutside",Cy,Yb=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ul=v.forwardRef((n,r)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:d,onDismiss:m,...y}=n,g=v.useContext(Yb),[b,p]=v.useState(null),w=b?.ownerDocument??globalThis?.document,[,C]=v.useState({}),R=$e(r,B=>p(B)),S=Array.from(g.layers),[N]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),j=S.indexOf(N),O=b?S.indexOf(b):-1,k=g.layersWithOutsidePointerEventsDisabled.size>0,Q=O>=j,I=SR(B=>{const G=B.target,ue=[...g.branches].some(ie=>ie.contains(G));!Q||ue||(s?.(B),d?.(B),B.defaultPrevented||m?.())},w),Z=ER(B=>{const G=B.target;[...g.branches].some(ie=>ie.contains(G))||(c?.(B),d?.(B),B.defaultPrevented||m?.())},w);return gR(B=>{O===g.layers.size-1&&(l?.(B),!B.defaultPrevented&&m&&(B.preventDefault(),m()))},w),v.useEffect(()=>{if(b)return o&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(Cy=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(b)),g.layers.add(b),Ry(),()=>{o&&g.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=Cy)}},[b,w,o,g]),v.useEffect(()=>()=>{b&&(g.layers.delete(b),g.layersWithOutsidePointerEventsDisabled.delete(b),Ry())},[b,g]),v.useEffect(()=>{const B=()=>C({});return document.addEventListener(Hd,B),()=>document.removeEventListener(Hd,B)},[]),h.jsx(De.div,{...y,ref:R,style:{pointerEvents:k?Q?"auto":"none":void 0,...n.style},onFocusCapture:he(n.onFocusCapture,Z.onFocusCapture),onBlurCapture:he(n.onBlurCapture,Z.onBlurCapture),onPointerDownCapture:he(n.onPointerDownCapture,I.onPointerDownCapture)})});ul.displayName=vR;var xR="DismissableLayerBranch",wR=v.forwardRef((n,r)=>{const o=v.useContext(Yb),l=v.useRef(null),s=$e(r,l);return v.useEffect(()=>{const c=l.current;if(c)return o.branches.add(c),()=>{o.branches.delete(c)}},[o.branches]),h.jsx(De.div,{...n,ref:s})});wR.displayName=xR;function SR(n,r=globalThis?.document){const o=Fn(n),l=v.useRef(!1),s=v.useRef(()=>{});return v.useEffect(()=>{const c=m=>{if(m.target&&!l.current){let y=function(){Ib(yR,o,g,{discrete:!0})};const g={originalEvent:m};m.pointerType==="touch"?(r.removeEventListener("click",s.current),s.current=y,r.addEventListener("click",s.current,{once:!0})):y()}else r.removeEventListener("click",s.current);l.current=!1},d=window.setTimeout(()=>{r.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(d),r.removeEventListener("pointerdown",c),r.removeEventListener("click",s.current)}},[r,o]),{onPointerDownCapture:()=>l.current=!0}}function ER(n,r=globalThis?.document){const o=Fn(n),l=v.useRef(!1);return v.useEffect(()=>{const s=c=>{c.target&&!l.current&&Ib(bR,o,{originalEvent:c},{discrete:!1})};return r.addEventListener("focusin",s),()=>r.removeEventListener("focusin",s)},[r,o]),{onFocusCapture:()=>l.current=!0,onBlurCapture:()=>l.current=!1}}function Ry(){const n=new CustomEvent(Hd);document.dispatchEvent(n)}function Ib(n,r,o,{discrete:l}){const s=o.originalEvent.target,c=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:o});r&&s.addEventListener(n,r,{once:!0}),l?Gb(s,c):s.dispatchEvent(c)}var cd="focusScope.autoFocusOnMount",fd="focusScope.autoFocusOnUnmount",Ny={bubbles:!1,cancelable:!0},CR="FocusScope",vu=v.forwardRef((n,r)=>{const{loop:o=!1,trapped:l=!1,onMountAutoFocus:s,onUnmountAutoFocus:c,...d}=n,[m,y]=v.useState(null),g=Fn(s),b=Fn(c),p=v.useRef(null),w=$e(r,S=>y(S)),C=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(l){let S=function(k){if(C.paused||!m)return;const Q=k.target;m.contains(Q)?p.current=Q:Ka(p.current,{select:!0})},N=function(k){if(C.paused||!m)return;const Q=k.relatedTarget;Q!==null&&(m.contains(Q)||Ka(p.current,{select:!0}))},j=function(k){if(document.activeElement===document.body)for(const I of k)I.removedNodes.length>0&&Ka(m)};document.addEventListener("focusin",S),document.addEventListener("focusout",N);const O=new MutationObserver(j);return m&&O.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",N),O.disconnect()}}},[l,m,C.paused]),v.useEffect(()=>{if(m){jy.add(C);const S=document.activeElement;if(!m.contains(S)){const j=new CustomEvent(cd,Ny);m.addEventListener(cd,g),m.dispatchEvent(j),j.defaultPrevented||(RR(AR(Qb(m)),{select:!0}),document.activeElement===S&&Ka(m))}return()=>{m.removeEventListener(cd,g),setTimeout(()=>{const j=new CustomEvent(fd,Ny);m.addEventListener(fd,b),m.dispatchEvent(j),j.defaultPrevented||Ka(S??document.body,{select:!0}),m.removeEventListener(fd,b),jy.remove(C)},0)}}},[m,g,b,C]);const R=v.useCallback(S=>{if(!o&&!l||C.paused)return;const N=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,j=document.activeElement;if(N&&j){const O=S.currentTarget,[k,Q]=NR(O);k&&Q?!S.shiftKey&&j===Q?(S.preventDefault(),o&&Ka(k,{select:!0})):S.shiftKey&&j===k&&(S.preventDefault(),o&&Ka(Q,{select:!0})):j===O&&S.preventDefault()}},[o,l,C.paused]);return h.jsx(De.div,{tabIndex:-1,...d,ref:w,onKeyDown:R})});vu.displayName=CR;function RR(n,{select:r=!1}={}){const o=document.activeElement;for(const l of n)if(Ka(l,{select:r}),document.activeElement!==o)return}function NR(n){const r=Qb(n),o=Ty(r,n),l=Ty(r.reverse(),n);return[o,l]}function Qb(n){const r=[],o=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:l=>{const s=l.tagName==="INPUT"&&l.type==="hidden";return l.disabled||l.hidden||s?NodeFilter.FILTER_SKIP:l.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)r.push(o.currentNode);return r}function Ty(n,r){for(const o of n)if(!TR(o,{upTo:r}))return o}function TR(n,{upTo:r}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(r!==void 0&&n===r)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function jR(n){return n instanceof HTMLInputElement&&"select"in n}function Ka(n,{select:r=!1}={}){if(n&&n.focus){const o=document.activeElement;n.focus({preventScroll:!0}),n!==o&&jR(n)&&r&&n.select()}}var jy=MR();function MR(){let n=[];return{add(r){const o=n[0];r!==o&&o?.pause(),n=My(n,r),n.unshift(r)},remove(r){n=My(n,r),n[0]?.resume()}}}function My(n,r){const o=[...n],l=o.indexOf(r);return l!==-1&&o.splice(l,1),o}function AR(n){return n.filter(r=>r.tagName!=="A")}var OR="Portal",cl=v.forwardRef((n,r)=>{const{container:o,...l}=n,[s,c]=v.useState(!1);Nt(()=>c(!0),[]);const d=o||s&&globalThis?.document?.body;return d?Fb.createPortal(h.jsx(De.div,{...l,ref:r}),d):null});cl.displayName=OR;function _R(n,r){return v.useReducer((o,l)=>r[o][l]??o,n)}var Yn=n=>{const{present:r,children:o}=n,l=DR(r),s=typeof o=="function"?o({present:l.isPresent}):v.Children.only(o),c=$e(l.ref,zR(s));return typeof o=="function"||l.isPresent?v.cloneElement(s,{ref:c}):null};Yn.displayName="Presence";function DR(n){const[r,o]=v.useState(),l=v.useRef(null),s=v.useRef(n),c=v.useRef("none"),d=n?"mounted":"unmounted",[m,y]=_R(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const g=zs(l.current);c.current=m==="mounted"?g:"none"},[m]),Nt(()=>{const g=l.current,b=s.current;if(b!==n){const w=c.current,C=zs(g);n?y("MOUNT"):C==="none"||g?.display==="none"?y("UNMOUNT"):y(b&&w!==C?"ANIMATION_OUT":"UNMOUNT"),s.current=n}},[n,y]),Nt(()=>{if(r){let g;const b=r.ownerDocument.defaultView??window,p=C=>{const S=zs(l.current).includes(CSS.escape(C.animationName));if(C.target===r&&S&&(y("ANIMATION_END"),!s.current)){const N=r.style.animationFillMode;r.style.animationFillMode="forwards",g=b.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=N)})}},w=C=>{C.target===r&&(c.current=zs(l.current))};return r.addEventListener("animationstart",w),r.addEventListener("animationcancel",p),r.addEventListener("animationend",p),()=>{b.clearTimeout(g),r.removeEventListener("animationstart",w),r.removeEventListener("animationcancel",p),r.removeEventListener("animationend",p)}}else y("ANIMATION_END")},[r,y]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:v.useCallback(g=>{l.current=g?getComputedStyle(g):null,o(g)},[])}}function zs(n){return n?.animationName||"none"}function zR(n){let r=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?n.ref:(r=Object.getOwnPropertyDescriptor(n,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}var dd=0;function dh(){v.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??Ay()),document.body.insertAdjacentElement("beforeend",n[1]??Ay()),dd++,()=>{dd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),dd--}},[])}function Ay(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var qn=function(){return qn=Object.assign||function(r){for(var o,l=1,s=arguments.length;l<s;l++){o=arguments[l];for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(r[c]=o[c])}return r},qn.apply(this,arguments)};function Kb(n,r){var o={};for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&r.indexOf(l)<0&&(o[l]=n[l]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,l=Object.getOwnPropertySymbols(n);s<l.length;s++)r.indexOf(l[s])<0&&Object.prototype.propertyIsEnumerable.call(n,l[s])&&(o[l[s]]=n[l[s]]);return o}function kR(n,r,o){if(o||arguments.length===2)for(var l=0,s=r.length,c;l<s;l++)(c||!(l in r))&&(c||(c=Array.prototype.slice.call(r,0,l)),c[l]=r[l]);return n.concat(c||Array.prototype.slice.call(r))}var Gs="right-scroll-bar-position",Ys="width-before-scroll-bar",LR="with-scroll-bars-hidden",UR="--removed-body-scroll-bar-size";function hd(n,r){return typeof n=="function"?n(r):n&&(n.current=r),n}function HR(n,r){var o=v.useState(function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(l){var s=o.value;s!==l&&(o.value=l,o.callback(l,s))}}}})[0];return o.callback=r,o.facade}var BR=typeof window<"u"?v.useLayoutEffect:v.useEffect,Oy=new WeakMap;function PR(n,r){var o=HR(null,function(l){return n.forEach(function(s){return hd(s,l)})});return BR(function(){var l=Oy.get(o);if(l){var s=new Set(l),c=new Set(n),d=o.current;s.forEach(function(m){c.has(m)||hd(m,null)}),c.forEach(function(m){s.has(m)||hd(m,d)})}Oy.set(o,n)},[n]),o}function qR(n){return n}function $R(n,r){r===void 0&&(r=qR);var o=[],l=!1,s={read:function(){if(l)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:n},useMedium:function(c){var d=r(c,l);return o.push(d),function(){o=o.filter(function(m){return m!==d})}},assignSyncMedium:function(c){for(l=!0;o.length;){var d=o;o=[],d.forEach(c)}o={push:function(m){return c(m)},filter:function(){return o}}},assignMedium:function(c){l=!0;var d=[];if(o.length){var m=o;o=[],m.forEach(c),d=o}var y=function(){var b=d;d=[],b.forEach(c)},g=function(){return Promise.resolve().then(y)};g(),o={push:function(b){d.push(b),g()},filter:function(b){return d=d.filter(b),o}}}};return s}function VR(n){n===void 0&&(n={});var r=$R(null);return r.options=qn({async:!0,ssr:!1},n),r}var Xb=function(n){var r=n.sideCar,o=Kb(n,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var l=r.read();if(!l)throw new Error("Sidecar medium not found");return v.createElement(l,qn({},o))};Xb.isSideCarExport=!0;function FR(n,r){return n.useMedium(r),Xb}var Zb=VR(),md=function(){},yu=v.forwardRef(function(n,r){var o=v.useRef(null),l=v.useState({onScrollCapture:md,onWheelCapture:md,onTouchMoveCapture:md}),s=l[0],c=l[1],d=n.forwardProps,m=n.children,y=n.className,g=n.removeScrollBar,b=n.enabled,p=n.shards,w=n.sideCar,C=n.noRelative,R=n.noIsolation,S=n.inert,N=n.allowPinchZoom,j=n.as,O=j===void 0?"div":j,k=n.gapMode,Q=Kb(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=w,Z=PR([o,r]),B=qn(qn({},Q),s);return v.createElement(v.Fragment,null,b&&v.createElement(I,{sideCar:Zb,removeScrollBar:g,shards:p,noRelative:C,noIsolation:R,inert:S,setCallbacks:c,allowPinchZoom:!!N,lockRef:o,gapMode:k}),d?v.cloneElement(v.Children.only(m),qn(qn({},B),{ref:Z})):v.createElement(O,qn({},B,{className:y,ref:Z}),m))});yu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yu.classNames={fullWidth:Ys,zeroRight:Gs};var GR=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function YR(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var r=GR();return r&&n.setAttribute("nonce",r),n}function IR(n,r){n.styleSheet?n.styleSheet.cssText=r:n.appendChild(document.createTextNode(r))}function QR(n){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(n)}var KR=function(){var n=0,r=null;return{add:function(o){n==0&&(r=YR())&&(IR(r,o),QR(r)),n++},remove:function(){n--,!n&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},XR=function(){var n=KR();return function(r,o){v.useEffect(function(){return n.add(r),function(){n.remove()}},[r&&o])}},Jb=function(){var n=XR(),r=function(o){var l=o.styles,s=o.dynamic;return n(l,s),null};return r},ZR={left:0,top:0,right:0,gap:0},pd=function(n){return parseInt(n||"",10)||0},JR=function(n){var r=window.getComputedStyle(document.body),o=r[n==="padding"?"paddingLeft":"marginLeft"],l=r[n==="padding"?"paddingTop":"marginTop"],s=r[n==="padding"?"paddingRight":"marginRight"];return[pd(o),pd(l),pd(s)]},WR=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return ZR;var r=JR(n),o=document.documentElement.clientWidth,l=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,l-o+r[2]-r[0])}},eN=Jb(),zo="data-scroll-locked",tN=function(n,r,o,l){var s=n.left,c=n.top,d=n.right,m=n.gap;return o===void 0&&(o="margin"),`
13
+ .`.concat(LR,` {
14
+ overflow: hidden `).concat(l,`;
15
+ padding-right: `).concat(m,"px ").concat(l,`;
16
+ }
17
+ body[`).concat(zo,`] {
18
+ overflow: hidden `).concat(l,`;
19
+ overscroll-behavior: contain;
20
+ `).concat([r&&"position: relative ".concat(l,";"),o==="margin"&&`
21
+ padding-left: `.concat(s,`px;
22
+ padding-top: `).concat(c,`px;
23
+ padding-right: `).concat(d,`px;
24
+ margin-left:0;
25
+ margin-top:0;
26
+ margin-right: `).concat(m,"px ").concat(l,`;
27
+ `),o==="padding"&&"padding-right: ".concat(m,"px ").concat(l,";")].filter(Boolean).join(""),`
28
+ }
29
+
30
+ .`).concat(Gs,` {
31
+ right: `).concat(m,"px ").concat(l,`;
32
+ }
33
+
34
+ .`).concat(Ys,` {
35
+ margin-right: `).concat(m,"px ").concat(l,`;
36
+ }
37
+
38
+ .`).concat(Gs," .").concat(Gs,` {
39
+ right: 0 `).concat(l,`;
40
+ }
41
+
42
+ .`).concat(Ys," .").concat(Ys,` {
43
+ margin-right: 0 `).concat(l,`;
44
+ }
45
+
46
+ body[`).concat(zo,`] {
47
+ `).concat(UR,": ").concat(m,`px;
48
+ }
49
+ `)},_y=function(){var n=parseInt(document.body.getAttribute(zo)||"0",10);return isFinite(n)?n:0},nN=function(){v.useEffect(function(){return document.body.setAttribute(zo,(_y()+1).toString()),function(){var n=_y()-1;n<=0?document.body.removeAttribute(zo):document.body.setAttribute(zo,n.toString())}},[])},aN=function(n){var r=n.noRelative,o=n.noImportant,l=n.gapMode,s=l===void 0?"margin":l;nN();var c=v.useMemo(function(){return WR(s)},[s]);return v.createElement(eN,{styles:tN(c,!r,s,o?"":"!important")})},Bd=!1;if(typeof window<"u")try{var ks=Object.defineProperty({},"passive",{get:function(){return Bd=!0,!0}});window.addEventListener("test",ks,ks),window.removeEventListener("test",ks,ks)}catch{Bd=!1}var jo=Bd?{passive:!1}:!1,rN=function(n){return n.tagName==="TEXTAREA"},Wb=function(n,r){if(!(n instanceof Element))return!1;var o=window.getComputedStyle(n);return o[r]!=="hidden"&&!(o.overflowY===o.overflowX&&!rN(n)&&o[r]==="visible")},oN=function(n){return Wb(n,"overflowY")},iN=function(n){return Wb(n,"overflowX")},Dy=function(n,r){var o=r.ownerDocument,l=r;do{typeof ShadowRoot<"u"&&l instanceof ShadowRoot&&(l=l.host);var s=e0(n,l);if(s){var c=t0(n,l),d=c[1],m=c[2];if(d>m)return!0}l=l.parentNode}while(l&&l!==o.body);return!1},lN=function(n){var r=n.scrollTop,o=n.scrollHeight,l=n.clientHeight;return[r,o,l]},sN=function(n){var r=n.scrollLeft,o=n.scrollWidth,l=n.clientWidth;return[r,o,l]},e0=function(n,r){return n==="v"?oN(r):iN(r)},t0=function(n,r){return n==="v"?lN(r):sN(r)},uN=function(n,r){return n==="h"&&r==="rtl"?-1:1},cN=function(n,r,o,l,s){var c=uN(n,window.getComputedStyle(r).direction),d=c*l,m=o.target,y=r.contains(m),g=!1,b=d>0,p=0,w=0;do{if(!m)break;var C=t0(n,m),R=C[0],S=C[1],N=C[2],j=S-N-c*R;(R||j)&&e0(n,m)&&(p+=j,w+=R);var O=m.parentNode;m=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!y&&m!==document.body||y&&(r.contains(m)||r===m));return(b&&Math.abs(p)<1||!b&&Math.abs(w)<1)&&(g=!0),g},Ls=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},zy=function(n){return[n.deltaX,n.deltaY]},ky=function(n){return n&&"current"in n?n.current:n},fN=function(n,r){return n[0]===r[0]&&n[1]===r[1]},dN=function(n){return`
50
+ .block-interactivity-`.concat(n,` {pointer-events: none;}
51
+ .allow-interactivity-`).concat(n,` {pointer-events: all;}
52
+ `)},hN=0,Mo=[];function mN(n){var r=v.useRef([]),o=v.useRef([0,0]),l=v.useRef(),s=v.useState(hN++)[0],c=v.useState(Jb)[0],d=v.useRef(n);v.useEffect(function(){d.current=n},[n]),v.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(s));var S=kR([n.lockRef.current],(n.shards||[]).map(ky),!0).filter(Boolean);return S.forEach(function(N){return N.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),S.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(s))})}}},[n.inert,n.lockRef.current,n.shards]);var m=v.useCallback(function(S,N){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!d.current.allowPinchZoom;var j=Ls(S),O=o.current,k="deltaX"in S?S.deltaX:O[0]-j[0],Q="deltaY"in S?S.deltaY:O[1]-j[1],I,Z=S.target,B=Math.abs(k)>Math.abs(Q)?"h":"v";if("touches"in S&&B==="h"&&Z.type==="range")return!1;var G=window.getSelection(),ue=G&&G.anchorNode,ie=ue?ue===Z||ue.contains(Z):!1;if(ie)return!1;var oe=Dy(B,Z);if(!oe)return!0;if(oe?I=B:(I=B==="v"?"h":"v",oe=Dy(B,Z)),!oe)return!1;if(!l.current&&"changedTouches"in S&&(k||Q)&&(l.current=I),!I)return!0;var fe=l.current||I;return cN(fe,N,S,fe==="h"?k:Q)},[]),y=v.useCallback(function(S){var N=S;if(!(!Mo.length||Mo[Mo.length-1]!==c)){var j="deltaY"in N?zy(N):Ls(N),O=r.current.filter(function(I){return I.name===N.type&&(I.target===N.target||N.target===I.shadowParent)&&fN(I.delta,j)})[0];if(O&&O.should){N.cancelable&&N.preventDefault();return}if(!O){var k=(d.current.shards||[]).map(ky).filter(Boolean).filter(function(I){return I.contains(N.target)}),Q=k.length>0?m(N,k[0]):!d.current.noIsolation;Q&&N.cancelable&&N.preventDefault()}}},[]),g=v.useCallback(function(S,N,j,O){var k={name:S,delta:N,target:j,should:O,shadowParent:pN(j)};r.current.push(k),setTimeout(function(){r.current=r.current.filter(function(Q){return Q!==k})},1)},[]),b=v.useCallback(function(S){o.current=Ls(S),l.current=void 0},[]),p=v.useCallback(function(S){g(S.type,zy(S),S.target,m(S,n.lockRef.current))},[]),w=v.useCallback(function(S){g(S.type,Ls(S),S.target,m(S,n.lockRef.current))},[]);v.useEffect(function(){return Mo.push(c),n.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:w}),document.addEventListener("wheel",y,jo),document.addEventListener("touchmove",y,jo),document.addEventListener("touchstart",b,jo),function(){Mo=Mo.filter(function(S){return S!==c}),document.removeEventListener("wheel",y,jo),document.removeEventListener("touchmove",y,jo),document.removeEventListener("touchstart",b,jo)}},[]);var C=n.removeScrollBar,R=n.inert;return v.createElement(v.Fragment,null,R?v.createElement(c,{styles:dN(s)}):null,C?v.createElement(aN,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function pN(n){for(var r=null;n!==null;)n instanceof ShadowRoot&&(r=n.host,n=n.host),n=n.parentNode;return r}const gN=FR(Zb,mN);var bu=v.forwardRef(function(n,r){return v.createElement(yu,qn({},n,{ref:r,sideCar:gN}))});bu.classNames=yu.classNames;var vN=function(n){if(typeof document>"u")return null;var r=Array.isArray(n)?n[0]:n;return r.ownerDocument.body},Ao=new WeakMap,Us=new WeakMap,Hs={},gd=0,n0=function(n){return n&&(n.host||n0(n.parentNode))},yN=function(n,r){return r.map(function(o){if(n.contains(o))return o;var l=n0(o);return l&&n.contains(l)?l:(console.error("aria-hidden",o,"in not contained inside",n,". Doing nothing"),null)}).filter(function(o){return!!o})},bN=function(n,r,o,l){var s=yN(r,Array.isArray(n)?n:[n]);Hs[o]||(Hs[o]=new WeakMap);var c=Hs[o],d=[],m=new Set,y=new Set(s),g=function(p){!p||m.has(p)||(m.add(p),g(p.parentNode))};s.forEach(g);var b=function(p){!p||y.has(p)||Array.prototype.forEach.call(p.children,function(w){if(m.has(w))b(w);else try{var C=w.getAttribute(l),R=C!==null&&C!=="false",S=(Ao.get(w)||0)+1,N=(c.get(w)||0)+1;Ao.set(w,S),c.set(w,N),d.push(w),S===1&&R&&Us.set(w,!0),N===1&&w.setAttribute(o,"true"),R||w.setAttribute(l,"true")}catch(j){console.error("aria-hidden: cannot operate on ",w,j)}})};return b(r),m.clear(),gd++,function(){d.forEach(function(p){var w=Ao.get(p)-1,C=c.get(p)-1;Ao.set(p,w),c.set(p,C),w||(Us.has(p)||p.removeAttribute(l),Us.delete(p)),C||p.removeAttribute(o)}),gd--,gd||(Ao=new WeakMap,Ao=new WeakMap,Us=new WeakMap,Hs={})}},hh=function(n,r,o){o===void 0&&(o="data-aria-hidden");var l=Array.from(Array.isArray(n)?n:[n]),s=vN(n);return s?(l.push.apply(l,Array.from(s.querySelectorAll("[aria-live], script"))),bN(l,s,o,"aria-hidden")):function(){return null}};function xN(n){const r=wN(n),o=v.forwardRef((l,s)=>{const{children:c,...d}=l,m=v.Children.toArray(c),y=m.find(EN);if(y){const g=y.props.children,b=m.map(p=>p===y?v.Children.count(g)>1?v.Children.only(null):v.isValidElement(g)?g.props.children:null:p);return h.jsx(r,{...d,ref:s,children:v.isValidElement(g)?v.cloneElement(g,void 0,b):null})}return h.jsx(r,{...d,ref:s,children:c})});return o.displayName=`${n}.Slot`,o}function wN(n){const r=v.forwardRef((o,l)=>{const{children:s,...c}=o;if(v.isValidElement(s)){const d=RN(s),m=CN(c,s.props);return s.type!==v.Fragment&&(m.ref=l?It(l,d):d),v.cloneElement(s,m)}return v.Children.count(s)>1?v.Children.only(null):null});return r.displayName=`${n}.SlotClone`,r}var SN=Symbol("radix.slottable");function EN(n){return v.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===SN}function CN(n,r){const o={...r};for(const l in r){const s=n[l],c=r[l];/^on[A-Z]/.test(l)?s&&c?o[l]=(...m)=>{const y=c(...m);return s(...m),y}:s&&(o[l]=s):l==="style"?o[l]={...s,...c}:l==="className"&&(o[l]=[s,c].filter(Boolean).join(" "))}return{...n,...o}}function RN(n){let r=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?n.ref:(r=Object.getOwnPropertyDescriptor(n,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}var xu="Dialog",[a0]=nr(xu),[NN,_n]=a0(xu),r0=n=>{const{__scopeDialog:r,children:o,open:l,defaultOpen:s,onOpenChange:c,modal:d=!0}=n,m=v.useRef(null),y=v.useRef(null),[g,b]=Lo({prop:l,defaultProp:s??!1,onChange:c,caller:xu});return h.jsx(NN,{scope:r,triggerRef:m,contentRef:y,contentId:_t(),titleId:_t(),descriptionId:_t(),open:g,onOpenChange:b,onOpenToggle:v.useCallback(()=>b(p=>!p),[b]),modal:d,children:o})};r0.displayName=xu;var o0="DialogTrigger",TN=v.forwardRef((n,r)=>{const{__scopeDialog:o,...l}=n,s=_n(o0,o),c=$e(r,s.triggerRef);return h.jsx(De.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":gh(s.open),...l,ref:c,onClick:he(n.onClick,s.onOpenToggle)})});TN.displayName=o0;var mh="DialogPortal",[jN,i0]=a0(mh,{forceMount:void 0}),l0=n=>{const{__scopeDialog:r,forceMount:o,children:l,container:s}=n,c=_n(mh,r);return h.jsx(jN,{scope:r,forceMount:o,children:v.Children.map(l,d=>h.jsx(Yn,{present:o||c.open,children:h.jsx(cl,{asChild:!0,container:s,children:d})}))})};l0.displayName=mh;var eu="DialogOverlay",s0=v.forwardRef((n,r)=>{const o=i0(eu,n.__scopeDialog),{forceMount:l=o.forceMount,...s}=n,c=_n(eu,n.__scopeDialog);return c.modal?h.jsx(Yn,{present:l||c.open,children:h.jsx(AN,{...s,ref:r})}):null});s0.displayName=eu;var MN=xN("DialogOverlay.RemoveScroll"),AN=v.forwardRef((n,r)=>{const{__scopeDialog:o,...l}=n,s=_n(eu,o);return h.jsx(bu,{as:MN,allowPinchZoom:!0,shards:[s.contentRef],children:h.jsx(De.div,{"data-state":gh(s.open),...l,ref:r,style:{pointerEvents:"auto",...l.style}})})}),_r="DialogContent",u0=v.forwardRef((n,r)=>{const o=i0(_r,n.__scopeDialog),{forceMount:l=o.forceMount,...s}=n,c=_n(_r,n.__scopeDialog);return h.jsx(Yn,{present:l||c.open,children:c.modal?h.jsx(ON,{...s,ref:r}):h.jsx(_N,{...s,ref:r})})});u0.displayName=_r;var ON=v.forwardRef((n,r)=>{const o=_n(_r,n.__scopeDialog),l=v.useRef(null),s=$e(r,o.contentRef,l);return v.useEffect(()=>{const c=l.current;if(c)return hh(c)},[]),h.jsx(c0,{...n,ref:s,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:he(n.onCloseAutoFocus,c=>{c.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:he(n.onPointerDownOutside,c=>{const d=c.detail.originalEvent,m=d.button===0&&d.ctrlKey===!0;(d.button===2||m)&&c.preventDefault()}),onFocusOutside:he(n.onFocusOutside,c=>c.preventDefault())})}),_N=v.forwardRef((n,r)=>{const o=_n(_r,n.__scopeDialog),l=v.useRef(!1),s=v.useRef(!1);return h.jsx(c0,{...n,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{n.onCloseAutoFocus?.(c),c.defaultPrevented||(l.current||o.triggerRef.current?.focus(),c.preventDefault()),l.current=!1,s.current=!1},onInteractOutside:c=>{n.onInteractOutside?.(c),c.defaultPrevented||(l.current=!0,c.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const d=c.target;o.triggerRef.current?.contains(d)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&s.current&&c.preventDefault()}})}),c0=v.forwardRef((n,r)=>{const{__scopeDialog:o,trapFocus:l,onOpenAutoFocus:s,onCloseAutoFocus:c,...d}=n,m=_n(_r,o),y=v.useRef(null),g=$e(r,y);return dh(),h.jsxs(h.Fragment,{children:[h.jsx(vu,{asChild:!0,loop:!0,trapped:l,onMountAutoFocus:s,onUnmountAutoFocus:c,children:h.jsx(ul,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":gh(m.open),...d,ref:g,onDismiss:()=>m.onOpenChange(!1)})}),h.jsxs(h.Fragment,{children:[h.jsx(DN,{titleId:m.titleId}),h.jsx(kN,{contentRef:y,descriptionId:m.descriptionId})]})]})}),ph="DialogTitle",f0=v.forwardRef((n,r)=>{const{__scopeDialog:o,...l}=n,s=_n(ph,o);return h.jsx(De.h2,{id:s.titleId,...l,ref:r})});f0.displayName=ph;var d0="DialogDescription",h0=v.forwardRef((n,r)=>{const{__scopeDialog:o,...l}=n,s=_n(d0,o);return h.jsx(De.p,{id:s.descriptionId,...l,ref:r})});h0.displayName=d0;var m0="DialogClose",p0=v.forwardRef((n,r)=>{const{__scopeDialog:o,...l}=n,s=_n(m0,o);return h.jsx(De.button,{type:"button",...l,ref:r,onClick:he(n.onClick,()=>s.onOpenChange(!1))})});p0.displayName=m0;function gh(n){return n?"open":"closed"}var g0="DialogTitleWarning",[s4,v0]=nR(g0,{contentName:_r,titleName:ph,docsSlug:"dialog"}),DN=({titleId:n})=>{const r=v0(g0),o=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
53
+
54
+ If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
55
+
56
+ For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return v.useEffect(()=>{n&&(document.getElementById(n)||console.error(o))},[o,n]),null},zN="DialogDescriptionWarning",kN=({contentRef:n,descriptionId:r})=>{const l=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${v0(zN).contentName}}.`;return v.useEffect(()=>{const s=n.current?.getAttribute("aria-describedby");r&&s&&(document.getElementById(r)||console.warn(l))},[l,n,r]),null},wu=r0,Su=l0,Eu=s0,Cu=u0,vh=f0,LN=h0,y0=p0,Ly=1,UN=.9,HN=.8,BN=.17,vd=.1,yd=.999,PN=.9999,qN=.99,$N=/[\\\/_+.#"@\[\(\{&]/,VN=/[\\\/_+.#"@\[\(\{&]/g,FN=/[\s-]/,b0=/[\s-]/g;function Pd(n,r,o,l,s,c,d){if(c===r.length)return s===n.length?Ly:qN;var m=`${s},${c}`;if(d[m]!==void 0)return d[m];for(var y=l.charAt(c),g=o.indexOf(y,s),b=0,p,w,C,R;g>=0;)p=Pd(n,r,o,l,g+1,c+1,d),p>b&&(g===s?p*=Ly:$N.test(n.charAt(g-1))?(p*=HN,C=n.slice(s,g-1).match(VN),C&&s>0&&(p*=Math.pow(yd,C.length))):FN.test(n.charAt(g-1))?(p*=UN,R=n.slice(s,g-1).match(b0),R&&s>0&&(p*=Math.pow(yd,R.length))):(p*=BN,s>0&&(p*=Math.pow(yd,g-s))),n.charAt(g)!==r.charAt(c)&&(p*=PN)),(p<vd&&o.charAt(g-1)===l.charAt(c+1)||l.charAt(c+1)===l.charAt(c)&&o.charAt(g-1)!==l.charAt(c))&&(w=Pd(n,r,o,l,g+1,c+2,d),w*vd>p&&(p=w*vd)),p>b&&(b=p),g=o.indexOf(y,g+1);return d[m]=b,b}function Uy(n){return n.toLowerCase().replace(b0," ")}function GN(n,r,o){return n=o&&o.length>0?`${n+" "+o.join(" ")}`:n,Pd(n,r,Uy(n),Uy(r),0,0,{})}var YN=Symbol.for("react.lazy"),tu=eh[" use ".trim().toString()];function IN(n){return typeof n=="object"&&n!==null&&"then"in n}function x0(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===YN&&"_payload"in n&&IN(n._payload)}function yh(n){const r=KN(n),o=v.forwardRef((l,s)=>{let{children:c,...d}=l;x0(c)&&typeof tu=="function"&&(c=tu(c._payload));const m=v.Children.toArray(c),y=m.find(ZN);if(y){const g=y.props.children,b=m.map(p=>p===y?v.Children.count(g)>1?v.Children.only(null):v.isValidElement(g)?g.props.children:null:p);return h.jsx(r,{...d,ref:s,children:v.isValidElement(g)?v.cloneElement(g,void 0,b):null})}return h.jsx(r,{...d,ref:s,children:c})});return o.displayName=`${n}.Slot`,o}var QN=yh("Slot");function KN(n){const r=v.forwardRef((o,l)=>{let{children:s,...c}=o;if(x0(s)&&typeof tu=="function"&&(s=tu(s._payload)),v.isValidElement(s)){const d=WN(s),m=JN(c,s.props);return s.type!==v.Fragment&&(m.ref=l?It(l,d):d),v.cloneElement(s,m)}return v.Children.count(s)>1?v.Children.only(null):null});return r.displayName=`${n}.SlotClone`,r}var XN=Symbol("radix.slottable");function ZN(n){return v.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===XN}function JN(n,r){const o={...r};for(const l in r){const s=n[l],c=r[l];/^on[A-Z]/.test(l)?s&&c?o[l]=(...m)=>{const y=c(...m);return s(...m),y}:s&&(o[l]=s):l==="style"?o[l]={...s,...c}:l==="className"&&(o[l]=[s,c].filter(Boolean).join(" "))}return{...n,...o}}function WN(n){let r=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?n.ref:(r=Object.getOwnPropertyDescriptor(n,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}var eT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ar=eT.reduce((n,r)=>{const o=yh(`Primitive.${r}`),l=v.forwardRef((s,c)=>{const{asChild:d,...m}=s,y=d?o:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(y,{...m,ref:c})});return l.displayName=`Primitive.${r}`,{...n,[r]:l}},{}),Qi='[cmdk-group=""]',bd='[cmdk-group-items=""]',tT='[cmdk-group-heading=""]',w0='[cmdk-item=""]',Hy=`${w0}:not([aria-disabled="true"])`,qd="cmdk-item-select",_o="data-value",nT=(n,r,o)=>GN(n,r,o),S0=v.createContext(void 0),fl=()=>v.useContext(S0),E0=v.createContext(void 0),bh=()=>v.useContext(E0),C0=v.createContext(void 0),R0=v.forwardRef((n,r)=>{let o=Do(()=>{var A,L;return{search:"",value:(L=(A=n.value)!=null?A:n.defaultValue)!=null?L:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),l=Do(()=>new Set),s=Do(()=>new Map),c=Do(()=>new Map),d=Do(()=>new Set),m=N0(n),{label:y,children:g,value:b,onValueChange:p,filter:w,shouldFilter:C,loop:R,disablePointerSelection:S=!1,vimBindings:N=!0,...j}=n,O=_t(),k=_t(),Q=_t(),I=v.useRef(null),Z=hT();Dr(()=>{if(b!==void 0){let A=b.trim();o.current.value=A,B.emit()}},[b]),Dr(()=>{Z(6,ge)},[]);let B=v.useMemo(()=>({subscribe:A=>(d.current.add(A),()=>d.current.delete(A)),snapshot:()=>o.current,setState:(A,L,P)=>{var K,re,Y,le;if(!Object.is(o.current[A],L)){if(o.current[A]=L,A==="search")fe(),ie(),Z(1,oe);else if(A==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ce=document.getElementById(Q);ce?ce.focus():(K=document.getElementById(O))==null||K.focus()}if(Z(7,()=>{var ce;o.current.selectedItemId=(ce=ae())==null?void 0:ce.id,B.emit()}),P||Z(5,ge),((re=m.current)==null?void 0:re.value)!==void 0){let ce=L??"";(le=(Y=m.current).onValueChange)==null||le.call(Y,ce);return}}B.emit()}},emit:()=>{d.current.forEach(A=>A())}}),[]),G=v.useMemo(()=>({value:(A,L,P)=>{var K;L!==((K=c.current.get(A))==null?void 0:K.value)&&(c.current.set(A,{value:L,keywords:P}),o.current.filtered.items.set(A,ue(L,P)),Z(2,()=>{ie(),B.emit()}))},item:(A,L)=>(l.current.add(A),L&&(s.current.has(L)?s.current.get(L).add(A):s.current.set(L,new Set([A]))),Z(3,()=>{fe(),ie(),o.current.value||oe(),B.emit()}),()=>{c.current.delete(A),l.current.delete(A),o.current.filtered.items.delete(A);let P=ae();Z(4,()=>{fe(),P?.getAttribute("id")===A&&oe(),B.emit()})}),group:A=>(s.current.has(A)||s.current.set(A,new Set),()=>{c.current.delete(A),s.current.delete(A)}),filter:()=>m.current.shouldFilter,label:y||n["aria-label"],getDisablePointerSelection:()=>m.current.disablePointerSelection,listId:O,inputId:Q,labelId:k,listInnerRef:I}),[]);function ue(A,L){var P,K;let re=(K=(P=m.current)==null?void 0:P.filter)!=null?K:nT;return A?re(A,o.current.search,L):0}function ie(){if(!o.current.search||m.current.shouldFilter===!1)return;let A=o.current.filtered.items,L=[];o.current.filtered.groups.forEach(K=>{let re=s.current.get(K),Y=0;re.forEach(le=>{let ce=A.get(le);Y=Math.max(ce,Y)}),L.push([K,Y])});let P=I.current;W().sort((K,re)=>{var Y,le;let ce=K.getAttribute("id"),ve=re.getAttribute("id");return((Y=A.get(ve))!=null?Y:0)-((le=A.get(ce))!=null?le:0)}).forEach(K=>{let re=K.closest(bd);re?re.appendChild(K.parentElement===re?K:K.closest(`${bd} > *`)):P.appendChild(K.parentElement===P?K:K.closest(`${bd} > *`))}),L.sort((K,re)=>re[1]-K[1]).forEach(K=>{var re;let Y=(re=I.current)==null?void 0:re.querySelector(`${Qi}[${_o}="${encodeURIComponent(K[0])}"]`);Y?.parentElement.appendChild(Y)})}function oe(){let A=W().find(P=>P.getAttribute("aria-disabled")!=="true"),L=A?.getAttribute(_o);B.setState("value",L||void 0)}function fe(){var A,L,P,K;if(!o.current.search||m.current.shouldFilter===!1){o.current.filtered.count=l.current.size;return}o.current.filtered.groups=new Set;let re=0;for(let Y of l.current){let le=(L=(A=c.current.get(Y))==null?void 0:A.value)!=null?L:"",ce=(K=(P=c.current.get(Y))==null?void 0:P.keywords)!=null?K:[],ve=ue(le,ce);o.current.filtered.items.set(Y,ve),ve>0&&re++}for(let[Y,le]of s.current)for(let ce of le)if(o.current.filtered.items.get(ce)>0){o.current.filtered.groups.add(Y);break}o.current.filtered.count=re}function ge(){var A,L,P;let K=ae();K&&(((A=K.parentElement)==null?void 0:A.firstChild)===K&&((P=(L=K.closest(Qi))==null?void 0:L.querySelector(tT))==null||P.scrollIntoView({block:"nearest"})),K.scrollIntoView({block:"nearest"}))}function ae(){var A;return(A=I.current)==null?void 0:A.querySelector(`${w0}[aria-selected="true"]`)}function W(){var A;return Array.from(((A=I.current)==null?void 0:A.querySelectorAll(Hy))||[])}function T(A){let L=W()[A];L&&B.setState("value",L.getAttribute(_o))}function U(A){var L;let P=ae(),K=W(),re=K.findIndex(le=>le===P),Y=K[re+A];(L=m.current)!=null&&L.loop&&(Y=re+A<0?K[K.length-1]:re+A===K.length?K[0]:K[re+A]),Y&&B.setState("value",Y.getAttribute(_o))}function _(A){let L=ae(),P=L?.closest(Qi),K;for(;P&&!K;)P=A>0?fT(P,Qi):dT(P,Qi),K=P?.querySelector(Hy);K?B.setState("value",K.getAttribute(_o)):U(A)}let F=()=>T(W().length-1),ne=A=>{A.preventDefault(),A.metaKey?F():A.altKey?_(1):U(1)},M=A=>{A.preventDefault(),A.metaKey?T(0):A.altKey?_(-1):U(-1)};return v.createElement(ar.div,{ref:r,tabIndex:-1,...j,"cmdk-root":"",onKeyDown:A=>{var L;(L=j.onKeyDown)==null||L.call(j,A);let P=A.nativeEvent.isComposing||A.keyCode===229;if(!(A.defaultPrevented||P))switch(A.key){case"n":case"j":{N&&A.ctrlKey&&ne(A);break}case"ArrowDown":{ne(A);break}case"p":case"k":{N&&A.ctrlKey&&M(A);break}case"ArrowUp":{M(A);break}case"Home":{A.preventDefault(),T(0);break}case"End":{A.preventDefault(),F();break}case"Enter":{A.preventDefault();let K=ae();if(K){let re=new Event(qd);K.dispatchEvent(re)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:G.inputId,id:G.labelId,style:pT},y),Ru(n,A=>v.createElement(E0.Provider,{value:B},v.createElement(S0.Provider,{value:G},A))))}),aT=v.forwardRef((n,r)=>{var o,l;let s=_t(),c=v.useRef(null),d=v.useContext(C0),m=fl(),y=N0(n),g=(l=(o=y.current)==null?void 0:o.forceMount)!=null?l:d?.forceMount;Dr(()=>{if(!g)return m.item(s,d?.id)},[g]);let b=T0(s,c,[n.value,n.children,c],n.keywords),p=bh(),w=Ja(Z=>Z.value&&Z.value===b.current),C=Ja(Z=>g||m.filter()===!1?!0:Z.search?Z.filtered.items.get(s)>0:!0);v.useEffect(()=>{let Z=c.current;if(!(!Z||n.disabled))return Z.addEventListener(qd,R),()=>Z.removeEventListener(qd,R)},[C,n.onSelect,n.disabled]);function R(){var Z,B;S(),(B=(Z=y.current).onSelect)==null||B.call(Z,b.current)}function S(){p.setState("value",b.current,!0)}if(!C)return null;let{disabled:N,value:j,onSelect:O,forceMount:k,keywords:Q,...I}=n;return v.createElement(ar.div,{ref:It(c,r),...I,id:s,"cmdk-item":"",role:"option","aria-disabled":!!N,"aria-selected":!!w,"data-disabled":!!N,"data-selected":!!w,onPointerMove:N||m.getDisablePointerSelection()?void 0:S,onClick:N?void 0:R},n.children)}),rT=v.forwardRef((n,r)=>{let{heading:o,children:l,forceMount:s,...c}=n,d=_t(),m=v.useRef(null),y=v.useRef(null),g=_t(),b=fl(),p=Ja(C=>s||b.filter()===!1?!0:C.search?C.filtered.groups.has(d):!0);Dr(()=>b.group(d),[]),T0(d,m,[n.value,n.heading,y]);let w=v.useMemo(()=>({id:d,forceMount:s}),[s]);return v.createElement(ar.div,{ref:It(m,r),...c,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},o&&v.createElement("div",{ref:y,"cmdk-group-heading":"","aria-hidden":!0,id:g},o),Ru(n,C=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":o?g:void 0},v.createElement(C0.Provider,{value:w},C))))}),oT=v.forwardRef((n,r)=>{let{alwaysRender:o,...l}=n,s=v.useRef(null),c=Ja(d=>!d.search);return!o&&!c?null:v.createElement(ar.div,{ref:It(s,r),...l,"cmdk-separator":"",role:"separator"})}),iT=v.forwardRef((n,r)=>{let{onValueChange:o,...l}=n,s=n.value!=null,c=bh(),d=Ja(g=>g.search),m=Ja(g=>g.selectedItemId),y=fl();return v.useEffect(()=>{n.value!=null&&c.setState("search",n.value)},[n.value]),v.createElement(ar.input,{ref:r,...l,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":y.listId,"aria-labelledby":y.labelId,"aria-activedescendant":m,id:y.inputId,type:"text",value:s?n.value:d,onChange:g=>{s||c.setState("search",g.target.value),o?.(g.target.value)}})}),lT=v.forwardRef((n,r)=>{let{children:o,label:l="Suggestions",...s}=n,c=v.useRef(null),d=v.useRef(null),m=Ja(g=>g.selectedItemId),y=fl();return v.useEffect(()=>{if(d.current&&c.current){let g=d.current,b=c.current,p,w=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let C=g.offsetHeight;b.style.setProperty("--cmdk-list-height",C.toFixed(1)+"px")})});return w.observe(g),()=>{cancelAnimationFrame(p),w.unobserve(g)}}},[]),v.createElement(ar.div,{ref:It(c,r),...s,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":m,"aria-label":l,id:y.listId},Ru(n,g=>v.createElement("div",{ref:It(d,y.listInnerRef),"cmdk-list-sizer":""},g)))}),sT=v.forwardRef((n,r)=>{let{open:o,onOpenChange:l,overlayClassName:s,contentClassName:c,container:d,...m}=n;return v.createElement(wu,{open:o,onOpenChange:l},v.createElement(Su,{container:d},v.createElement(Eu,{"cmdk-overlay":"",className:s}),v.createElement(Cu,{"aria-label":n.label,"cmdk-dialog":"",className:c},v.createElement(R0,{ref:r,...m}))))}),uT=v.forwardRef((n,r)=>Ja(o=>o.filtered.count===0)?v.createElement(ar.div,{ref:r,...n,"cmdk-empty":"",role:"presentation"}):null),cT=v.forwardRef((n,r)=>{let{progress:o,children:l,label:s="Loading...",...c}=n;return v.createElement(ar.div,{ref:r,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},Ru(n,d=>v.createElement("div",{"aria-hidden":!0},d)))}),pa=Object.assign(R0,{List:lT,Item:aT,Input:iT,Group:rT,Separator:oT,Dialog:sT,Empty:uT,Loading:cT});function fT(n,r){let o=n.nextElementSibling;for(;o;){if(o.matches(r))return o;o=o.nextElementSibling}}function dT(n,r){let o=n.previousElementSibling;for(;o;){if(o.matches(r))return o;o=o.previousElementSibling}}function N0(n){let r=v.useRef(n);return Dr(()=>{r.current=n}),r}var Dr=typeof window>"u"?v.useEffect:v.useLayoutEffect;function Do(n){let r=v.useRef();return r.current===void 0&&(r.current=n()),r}function Ja(n){let r=bh(),o=()=>n(r.snapshot());return v.useSyncExternalStore(r.subscribe,o,o)}function T0(n,r,o,l=[]){let s=v.useRef(),c=fl();return Dr(()=>{var d;let m=(()=>{var g;for(let b of o){if(typeof b=="string")return b.trim();if(typeof b=="object"&&"current"in b)return b.current?(g=b.current.textContent)==null?void 0:g.trim():s.current}})(),y=l.map(g=>g.trim());c.value(n,m,y),(d=r.current)==null||d.setAttribute(_o,m),s.current=m}),s}var hT=()=>{let[n,r]=v.useState(),o=Do(()=>new Map);return Dr(()=>{o.current.forEach(l=>l()),o.current=new Map},[n]),(l,s)=>{o.current.set(l,s),r({})}};function mT(n){let r=n.type;return typeof r=="function"?r(n.props):"render"in r?r.render(n.props):n}function Ru({asChild:n,children:r},o){return n&&v.isValidElement(r)?v.cloneElement(mT(r),{ref:r.ref},o(r.props.children)):o(r)}var pT={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const gT=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),vT=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,l)=>l?l.toUpperCase():o.toLowerCase()),By=n=>{const r=vT(n);return r.charAt(0).toUpperCase()+r.slice(1)},j0=(...n)=>n.filter((r,o,l)=>!!r&&r.trim()!==""&&l.indexOf(r)===o).join(" ").trim(),yT=n=>{for(const r in n)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};var bT={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"};const xT=v.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:l,className:s="",children:c,iconNode:d,...m},y)=>v.createElement("svg",{ref:y,...bT,width:r,height:r,stroke:n,strokeWidth:l?Number(o)*24/Number(r):o,className:j0("lucide",s),...!c&&!yT(m)&&{"aria-hidden":"true"},...m},[...d.map(([g,b])=>v.createElement(g,b)),...Array.isArray(c)?c:[c]]));const Qe=(n,r)=>{const o=v.forwardRef(({className:l,...s},c)=>v.createElement(xT,{ref:c,iconNode:r,className:j0(`lucide-${gT(By(n))}`,`lucide-${n}`,l),...s}));return o.displayName=By(n),o};const wT=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ST=Qe("arrow-left",wT);const ET=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],CT=Qe("arrow-up",ET);const RT=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],M0=Qe("check",RT);const NT=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],A0=Qe("chevron-down",NT);const TT=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],jT=Qe("chevron-up",TT);const MT=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],AT=Qe("circle-check-big",MT);const OT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],_T=Qe("circle-x",OT);const DT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],zT=Qe("circle",DT);const kT=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],LT=Qe("clock",kT);const UT=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]],Nu=Qe("film",UT);const HT=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],O0=Qe("folder-open",HT);const BT=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],PT=Qe("folder",BT);const qT=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],$T=Qe("heart",qT);const VT=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Tu=Qe("loader-circle",VT);const FT=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],GT=Qe("pencil",FT);const YT=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],IT=Qe("play",YT);const QT=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],nu=Qe("plus",QT);const KT=[["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"}]],XT=Qe("refresh-cw",KT);const ZT=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 12h10",key:"b7w52i"}]],JT=Qe("scan-line",ZT);const WT=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],_0=Qe("search",WT);const ej=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],tj=Qe("settings",ej);const nj=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],xh=Qe("trash-2",nj);const aj=[["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"}]],rj=Qe("triangle-alert",aj);const oj=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],ij=Qe("users",oj);const lj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],D0=Qe("x",lj);function z0(n){var r,o,l="";if(typeof n=="string"||typeof n=="number")l+=n;else if(typeof n=="object")if(Array.isArray(n)){var s=n.length;for(r=0;r<s;r++)n[r]&&(o=z0(n[r]))&&(l&&(l+=" "),l+=o)}else for(o in n)n[o]&&(l&&(l+=" "),l+=o);return l}function k0(){for(var n,r,o=0,l="",s=arguments.length;o<s;o++)(n=arguments[o])&&(r=z0(n))&&(l&&(l+=" "),l+=r);return l}const sj=(n,r)=>{const o=new Array(n.length+r.length);for(let l=0;l<n.length;l++)o[l]=n[l];for(let l=0;l<r.length;l++)o[n.length+l]=r[l];return o},uj=(n,r)=>({classGroupId:n,validator:r}),L0=(n=new Map,r=null,o)=>({nextPart:n,validators:r,classGroupId:o}),au="-",Py=[],cj="arbitrary..",fj=n=>{const r=hj(n),{conflictingClassGroups:o,conflictingClassGroupModifiers:l}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return dj(d);const m=d.split(au),y=m[0]===""&&m.length>1?1:0;return U0(m,y,r)},getConflictingClassGroupIds:(d,m)=>{if(m){const y=l[d],g=o[d];return y?g?sj(g,y):y:g||Py}return o[d]||Py}}},U0=(n,r,o)=>{if(n.length-r===0)return o.classGroupId;const s=n[r],c=o.nextPart.get(s);if(c){const g=U0(n,r+1,c);if(g)return g}const d=o.validators;if(d===null)return;const m=r===0?n.join(au):n.slice(r).join(au),y=d.length;for(let g=0;g<y;g++){const b=d[g];if(b.validator(m))return b.classGroupId}},dj=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=n.slice(1,-1),o=r.indexOf(":"),l=r.slice(0,o);return l?cj+l:void 0})(),hj=n=>{const{theme:r,classGroups:o}=n;return mj(o,r)},mj=(n,r)=>{const o=L0();for(const l in n){const s=n[l];wh(s,o,l,r)}return o},wh=(n,r,o,l)=>{const s=n.length;for(let c=0;c<s;c++){const d=n[c];pj(d,r,o,l)}},pj=(n,r,o,l)=>{if(typeof n=="string"){gj(n,r,o);return}if(typeof n=="function"){vj(n,r,o,l);return}yj(n,r,o,l)},gj=(n,r,o)=>{const l=n===""?r:H0(r,n);l.classGroupId=o},vj=(n,r,o,l)=>{if(bj(n)){wh(n(l),r,o,l);return}r.validators===null&&(r.validators=[]),r.validators.push(uj(o,n))},yj=(n,r,o,l)=>{const s=Object.entries(n),c=s.length;for(let d=0;d<c;d++){const[m,y]=s[d];wh(y,H0(r,m),o,l)}},H0=(n,r)=>{let o=n;const l=r.split(au),s=l.length;for(let c=0;c<s;c++){const d=l[c];let m=o.nextPart.get(d);m||(m=L0(),o.nextPart.set(d,m)),o=m}return o},bj=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,xj=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,o=Object.create(null),l=Object.create(null);const s=(c,d)=>{o[c]=d,r++,r>n&&(r=0,l=o,o=Object.create(null))};return{get(c){let d=o[c];if(d!==void 0)return d;if((d=l[c])!==void 0)return s(c,d),d},set(c,d){c in o?o[c]=d:s(c,d)}}},$d="!",qy=":",wj=[],$y=(n,r,o,l,s)=>({modifiers:n,hasImportantModifier:r,baseClassName:o,maybePostfixModifierPosition:l,isExternal:s}),Sj=n=>{const{prefix:r,experimentalParseClassName:o}=n;let l=s=>{const c=[];let d=0,m=0,y=0,g;const b=s.length;for(let S=0;S<b;S++){const N=s[S];if(d===0&&m===0){if(N===qy){c.push(s.slice(y,S)),y=S+1;continue}if(N==="/"){g=S;continue}}N==="["?d++:N==="]"?d--:N==="("?m++:N===")"&&m--}const p=c.length===0?s:s.slice(y);let w=p,C=!1;p.endsWith($d)?(w=p.slice(0,-1),C=!0):p.startsWith($d)&&(w=p.slice(1),C=!0);const R=g&&g>y?g-y:void 0;return $y(c,C,w,R)};if(r){const s=r+qy,c=l;l=d=>d.startsWith(s)?c(d.slice(s.length)):$y(wj,!1,d,void 0,!0)}if(o){const s=l;l=c=>o({className:c,parseClassName:s})}return l},Ej=n=>{const r=new Map;return n.orderSensitiveModifiers.forEach((o,l)=>{r.set(o,1e6+l)}),o=>{const l=[];let s=[];for(let c=0;c<o.length;c++){const d=o[c],m=d[0]==="[",y=r.has(d);m||y?(s.length>0&&(s.sort(),l.push(...s),s=[]),l.push(d)):s.push(d)}return s.length>0&&(s.sort(),l.push(...s)),l}},Cj=n=>({cache:xj(n.cacheSize),parseClassName:Sj(n),sortModifiers:Ej(n),...fj(n)}),Rj=/\s+/,Nj=(n,r)=>{const{parseClassName:o,getClassGroupId:l,getConflictingClassGroupIds:s,sortModifiers:c}=r,d=[],m=n.trim().split(Rj);let y="";for(let g=m.length-1;g>=0;g-=1){const b=m[g],{isExternal:p,modifiers:w,hasImportantModifier:C,baseClassName:R,maybePostfixModifierPosition:S}=o(b);if(p){y=b+(y.length>0?" "+y:y);continue}let N=!!S,j=l(N?R.substring(0,S):R);if(!j){if(!N){y=b+(y.length>0?" "+y:y);continue}if(j=l(R),!j){y=b+(y.length>0?" "+y:y);continue}N=!1}const O=w.length===0?"":w.length===1?w[0]:c(w).join(":"),k=C?O+$d:O,Q=k+j;if(d.indexOf(Q)>-1)continue;d.push(Q);const I=s(j,N);for(let Z=0;Z<I.length;++Z){const B=I[Z];d.push(k+B)}y=b+(y.length>0?" "+y:y)}return y},Tj=(...n)=>{let r=0,o,l,s="";for(;r<n.length;)(o=n[r++])&&(l=B0(o))&&(s&&(s+=" "),s+=l);return s},B0=n=>{if(typeof n=="string")return n;let r,o="";for(let l=0;l<n.length;l++)n[l]&&(r=B0(n[l]))&&(o&&(o+=" "),o+=r);return o},jj=(n,...r)=>{let o,l,s,c;const d=y=>{const g=r.reduce((b,p)=>p(b),n());return o=Cj(g),l=o.cache.get,s=o.cache.set,c=m,m(y)},m=y=>{const g=l(y);if(g)return g;const b=Nj(y,o);return s(y,b),b};return c=d,(...y)=>c(Tj(...y))},Mj=[],ft=n=>{const r=o=>o[n]||Mj;return r.isThemeGetter=!0,r},P0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,q0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Aj=/^\d+\/\d+$/,Oj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_j=/\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$/,Dj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,kj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Oo=n=>Aj.test(n),Te=n=>!!n&&!Number.isNaN(Number(n)),Qa=n=>!!n&&Number.isInteger(Number(n)),xd=n=>n.endsWith("%")&&Te(n.slice(0,-1)),ma=n=>Oj.test(n),Lj=()=>!0,Uj=n=>_j.test(n)&&!Dj.test(n),$0=()=>!1,Hj=n=>zj.test(n),Bj=n=>kj.test(n),Pj=n=>!me(n)&&!pe(n),qj=n=>Fo(n,G0,$0),me=n=>P0.test(n),jr=n=>Fo(n,Y0,Uj),wd=n=>Fo(n,Yj,Te),Vy=n=>Fo(n,V0,$0),$j=n=>Fo(n,F0,Bj),Bs=n=>Fo(n,I0,Hj),pe=n=>q0.test(n),Ki=n=>Go(n,Y0),Vj=n=>Go(n,Ij),Fy=n=>Go(n,V0),Fj=n=>Go(n,G0),Gj=n=>Go(n,F0),Ps=n=>Go(n,I0,!0),Fo=(n,r,o)=>{const l=P0.exec(n);return l?l[1]?r(l[1]):o(l[2]):!1},Go=(n,r,o=!1)=>{const l=q0.exec(n);return l?l[1]?r(l[1]):o:!1},V0=n=>n==="position"||n==="percentage",F0=n=>n==="image"||n==="url",G0=n=>n==="length"||n==="size"||n==="bg-size",Y0=n=>n==="length",Yj=n=>n==="number",Ij=n=>n==="family-name",I0=n=>n==="shadow",Qj=()=>{const n=ft("color"),r=ft("font"),o=ft("text"),l=ft("font-weight"),s=ft("tracking"),c=ft("leading"),d=ft("breakpoint"),m=ft("container"),y=ft("spacing"),g=ft("radius"),b=ft("shadow"),p=ft("inset-shadow"),w=ft("text-shadow"),C=ft("drop-shadow"),R=ft("blur"),S=ft("perspective"),N=ft("aspect"),j=ft("ease"),O=ft("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Q=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...Q(),pe,me],Z=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],G=()=>[pe,me,y],ue=()=>[Oo,"full","auto",...G()],ie=()=>[Qa,"none","subgrid",pe,me],oe=()=>["auto",{span:["full",Qa,pe,me]},Qa,pe,me],fe=()=>[Qa,"auto",pe,me],ge=()=>["auto","min","max","fr",pe,me],ae=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],T=()=>["auto",...G()],U=()=>[Oo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...G()],_=()=>[n,pe,me],F=()=>[...Q(),Fy,Vy,{position:[pe,me]}],ne=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",Fj,qj,{size:[pe,me]}],A=()=>[xd,Ki,jr],L=()=>["","none","full",g,pe,me],P=()=>["",Te,Ki,jr],K=()=>["solid","dashed","dotted","double"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>[Te,xd,Fy,Vy],le=()=>["","none",R,pe,me],ce=()=>["none",Te,pe,me],ve=()=>["none",Te,pe,me],we=()=>[Te,pe,me],Ce=()=>[Oo,"full",...G()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ma],breakpoint:[ma],color:[Lj],container:[ma],"drop-shadow":[ma],ease:["in","out","in-out"],font:[Pj],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ma],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ma],shadow:[ma],spacing:["px",Te],text:[ma],"text-shadow":[ma],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Oo,me,pe,N]}],container:["container"],columns:[{columns:[Te,me,pe,m]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:I()}],overflow:[{overflow:Z()}],"overflow-x":[{"overflow-x":Z()}],"overflow-y":[{"overflow-y":Z()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ue()}],"inset-x":[{"inset-x":ue()}],"inset-y":[{"inset-y":ue()}],start:[{start:ue()}],end:[{end:ue()}],top:[{top:ue()}],right:[{right:ue()}],bottom:[{bottom:ue()}],left:[{left:ue()}],visibility:["visible","invisible","collapse"],z:[{z:[Qa,"auto",pe,me]}],basis:[{basis:[Oo,"full","auto",m,...G()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Te,Oo,"auto","initial","none",me]}],grow:[{grow:["",Te,pe,me]}],shrink:[{shrink:["",Te,pe,me]}],order:[{order:[Qa,"first","last","none",pe,me]}],"grid-cols":[{"grid-cols":ie()}],"col-start-end":[{col:oe()}],"col-start":[{"col-start":fe()}],"col-end":[{"col-end":fe()}],"grid-rows":[{"grid-rows":ie()}],"row-start-end":[{row:oe()}],"row-start":[{"row-start":fe()}],"row-end":[{"row-end":fe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ge()}],"auto-rows":[{"auto-rows":ge()}],gap:[{gap:G()}],"gap-x":[{"gap-x":G()}],"gap-y":[{"gap-y":G()}],"justify-content":[{justify:[...ae(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...ae()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":ae()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:G()}],px:[{px:G()}],py:[{py:G()}],ps:[{ps:G()}],pe:[{pe:G()}],pt:[{pt:G()}],pr:[{pr:G()}],pb:[{pb:G()}],pl:[{pl:G()}],m:[{m:T()}],mx:[{mx:T()}],my:[{my:T()}],ms:[{ms:T()}],me:[{me:T()}],mt:[{mt:T()}],mr:[{mr:T()}],mb:[{mb:T()}],ml:[{ml:T()}],"space-x":[{"space-x":G()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":G()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[m,"screen",...U()]}],"min-w":[{"min-w":[m,"screen","none",...U()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[d]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",o,Ki,jr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[l,pe,wd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",xd,me]}],"font-family":[{font:[Vj,me,r]}],"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:[s,pe,me]}],"line-clamp":[{"line-clamp":[Te,"none",pe,wd]}],leading:[{leading:[c,...G()]}],"list-image":[{"list-image":["none",pe,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",pe,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:_()}],"text-color":[{text:_()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[Te,"from-font","auto",pe,jr]}],"text-decoration-color":[{decoration:_()}],"underline-offset":[{"underline-offset":[Te,"auto",pe,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:G()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",pe,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Qa,pe,me],radial:["",pe,me],conic:[Qa,pe,me]},Gj,$j]}],"bg-color":[{bg:_()}],"gradient-from-pos":[{from:A()}],"gradient-via-pos":[{via:A()}],"gradient-to-pos":[{to:A()}],"gradient-from":[{from:_()}],"gradient-via":[{via:_()}],"gradient-to":[{to:_()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:P()}],"border-w-x":[{"border-x":P()}],"border-w-y":[{"border-y":P()}],"border-w-s":[{"border-s":P()}],"border-w-e":[{"border-e":P()}],"border-w-t":[{"border-t":P()}],"border-w-r":[{"border-r":P()}],"border-w-b":[{"border-b":P()}],"border-w-l":[{"border-l":P()}],"divide-x":[{"divide-x":P()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":P()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...K(),"hidden","none"]}],"divide-style":[{divide:[...K(),"hidden","none"]}],"border-color":[{border:_()}],"border-color-x":[{"border-x":_()}],"border-color-y":[{"border-y":_()}],"border-color-s":[{"border-s":_()}],"border-color-e":[{"border-e":_()}],"border-color-t":[{"border-t":_()}],"border-color-r":[{"border-r":_()}],"border-color-b":[{"border-b":_()}],"border-color-l":[{"border-l":_()}],"divide-color":[{divide:_()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Te,pe,me]}],"outline-w":[{outline:["",Te,Ki,jr]}],"outline-color":[{outline:_()}],shadow:[{shadow:["","none",b,Ps,Bs]}],"shadow-color":[{shadow:_()}],"inset-shadow":[{"inset-shadow":["none",p,Ps,Bs]}],"inset-shadow-color":[{"inset-shadow":_()}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:_()}],"ring-offset-w":[{"ring-offset":[Te,jr]}],"ring-offset-color":[{"ring-offset":_()}],"inset-ring-w":[{"inset-ring":P()}],"inset-ring-color":[{"inset-ring":_()}],"text-shadow":[{"text-shadow":["none",w,Ps,Bs]}],"text-shadow-color":[{"text-shadow":_()}],opacity:[{opacity:[Te,pe,me]}],"mix-blend":[{"mix-blend":[...re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Te]}],"mask-image-linear-from-pos":[{"mask-linear-from":Y()}],"mask-image-linear-to-pos":[{"mask-linear-to":Y()}],"mask-image-linear-from-color":[{"mask-linear-from":_()}],"mask-image-linear-to-color":[{"mask-linear-to":_()}],"mask-image-t-from-pos":[{"mask-t-from":Y()}],"mask-image-t-to-pos":[{"mask-t-to":Y()}],"mask-image-t-from-color":[{"mask-t-from":_()}],"mask-image-t-to-color":[{"mask-t-to":_()}],"mask-image-r-from-pos":[{"mask-r-from":Y()}],"mask-image-r-to-pos":[{"mask-r-to":Y()}],"mask-image-r-from-color":[{"mask-r-from":_()}],"mask-image-r-to-color":[{"mask-r-to":_()}],"mask-image-b-from-pos":[{"mask-b-from":Y()}],"mask-image-b-to-pos":[{"mask-b-to":Y()}],"mask-image-b-from-color":[{"mask-b-from":_()}],"mask-image-b-to-color":[{"mask-b-to":_()}],"mask-image-l-from-pos":[{"mask-l-from":Y()}],"mask-image-l-to-pos":[{"mask-l-to":Y()}],"mask-image-l-from-color":[{"mask-l-from":_()}],"mask-image-l-to-color":[{"mask-l-to":_()}],"mask-image-x-from-pos":[{"mask-x-from":Y()}],"mask-image-x-to-pos":[{"mask-x-to":Y()}],"mask-image-x-from-color":[{"mask-x-from":_()}],"mask-image-x-to-color":[{"mask-x-to":_()}],"mask-image-y-from-pos":[{"mask-y-from":Y()}],"mask-image-y-to-pos":[{"mask-y-to":Y()}],"mask-image-y-from-color":[{"mask-y-from":_()}],"mask-image-y-to-color":[{"mask-y-to":_()}],"mask-image-radial":[{"mask-radial":[pe,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":Y()}],"mask-image-radial-to-pos":[{"mask-radial-to":Y()}],"mask-image-radial-from-color":[{"mask-radial-from":_()}],"mask-image-radial-to-color":[{"mask-radial-to":_()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":Q()}],"mask-image-conic-pos":[{"mask-conic":[Te]}],"mask-image-conic-from-pos":[{"mask-conic-from":Y()}],"mask-image-conic-to-pos":[{"mask-conic-to":Y()}],"mask-image-conic-from-color":[{"mask-conic-from":_()}],"mask-image-conic-to-color":[{"mask-conic-to":_()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",pe,me]}],filter:[{filter:["","none",pe,me]}],blur:[{blur:le()}],brightness:[{brightness:[Te,pe,me]}],contrast:[{contrast:[Te,pe,me]}],"drop-shadow":[{"drop-shadow":["","none",C,Ps,Bs]}],"drop-shadow-color":[{"drop-shadow":_()}],grayscale:[{grayscale:["",Te,pe,me]}],"hue-rotate":[{"hue-rotate":[Te,pe,me]}],invert:[{invert:["",Te,pe,me]}],saturate:[{saturate:[Te,pe,me]}],sepia:[{sepia:["",Te,pe,me]}],"backdrop-filter":[{"backdrop-filter":["","none",pe,me]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Te,pe,me]}],"backdrop-contrast":[{"backdrop-contrast":[Te,pe,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Te,pe,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Te,pe,me]}],"backdrop-invert":[{"backdrop-invert":["",Te,pe,me]}],"backdrop-opacity":[{"backdrop-opacity":[Te,pe,me]}],"backdrop-saturate":[{"backdrop-saturate":[Te,pe,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Te,pe,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":G()}],"border-spacing-x":[{"border-spacing-x":G()}],"border-spacing-y":[{"border-spacing-y":G()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",pe,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Te,"initial",pe,me]}],ease:[{ease:["linear","initial",j,pe,me]}],delay:[{delay:[Te,pe,me]}],animate:[{animate:["none",O,pe,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,pe,me]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:ve()}],"scale-x":[{"scale-x":ve()}],"scale-y":[{"scale-y":ve()}],"scale-z":[{"scale-z":ve()}],"scale-3d":["scale-3d"],skew:[{skew:we()}],"skew-x":[{"skew-x":we()}],"skew-y":[{"skew-y":we()}],transform:[{transform:[pe,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ce()}],"translate-x":[{"translate-x":Ce()}],"translate-y":[{"translate-y":Ce()}],"translate-z":[{"translate-z":Ce()}],"translate-none":["translate-none"],accent:[{accent:_()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:_()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",pe,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"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",pe,me]}],fill:[{fill:["none",..._()]}],"stroke-w":[{stroke:[Te,Ki,jr,wd]}],stroke:[{stroke:["none",..._()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Kj=jj(Qj);function Fe(...n){return Kj(k0(n))}function Xj(n,r){const[o,l]=v.useState(n);return v.useEffect(()=>{const s=window.setTimeout(()=>{l(n)},r);return()=>{window.clearTimeout(s)}},[r,n]),o}async function Zj(n){try{return(await n.json()).error?.message??n.statusText}catch{return n.statusText}}async function Jj(n){const r=new URLSearchParams({q:n}),o=await fetch(`/api/search?${r.toString()}`);if(!o.ok)throw new Error(await Zj(o));return await o.json()}function Wj(n){return St({enabled:n.trim().length>0,queryKey:["search",n],queryFn:()=>Jj(n),staleTime:3e4})}function dl({url:n,alt:r,title:o,className:l}){return n?h.jsx("img",{alt:r,className:l,loading:"lazy",src:n}):h.jsxs("div",{className:Fe("bg-zinc-800 flex flex-col items-center justify-center aspect-[2/3] p-4 gap-3",l),children:[h.jsx(Nu,{className:"size-12 text-zinc-600"}),h.jsx("span",{className:"text-zinc-400 text-sm text-center line-clamp-3",children:o})]})}function eM({onOpenChange:n,open:r}){const[o,l]=v.useState(""),s=Xj(o,200),c=Vo(),d=s.trim(),{data:m,error:y,isFetching:g}=Wj(s);v.useEffect(function(){r||l("")},[r]);function b(){n(!1)}function p(N){b(),c(N)}const w=d.length>0,C=(m?.movies.length??0)+(m?.shows.length??0)+(m?.episodes.length??0),R=w&&!g&&!y&&(m?.indexEmpty??!1),S=w&&!g&&!y&&C===0&&!R;return h.jsx(wu,{onOpenChange:n,open:r,children:h.jsxs(Su,{children:[h.jsx(Eu,{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),h.jsxs(Cu,{"aria-describedby":void 0,className:"fixed left-1/2 top-[12vh] z-50 w-[92vw] max-w-2xl -translate-x-1/2 overflow-hidden rounded-lg border bg-background shadow-2xl",children:[h.jsx(vh,{className:"sr-only",children:"Search your library"}),h.jsxs(pa,{label:"Search your library",shouldFilter:!1,children:[h.jsxs("div",{className:"flex items-center gap-2 border-b px-3",children:[h.jsx(_0,{"aria-hidden":!0,className:"size-4 text-muted-foreground"}),h.jsx(pa.Input,{autoFocus:!0,className:"flex h-12 w-full bg-transparent text-base outline-none placeholder:text-muted-foreground",onValueChange:l,placeholder:"Search movies, shows, episodes…",value:o}),g?h.jsx(Tu,{"aria-label":"Searching",className:"size-4 animate-spin text-muted-foreground"}):null]}),h.jsxs(pa.List,{className:"max-h-[60vh] overflow-y-auto p-2",children:[w?null:h.jsx(qs,{children:"Start typing to search your library."}),y?h.jsx(qs,{tone:"error",children:y.message}):null,R?h.jsx(qs,{children:"Search index isn’t ready yet. Try again after the next scan completes."}):null,S?h.jsxs(qs,{children:["No matches for “",d,"”. Try a shorter term or check your library."]}):null,m&&m.movies.length>0?h.jsx(pa.Group,{className:"px-1 py-1 text-xs uppercase tracking-wide text-muted-foreground",heading:"Movies",children:m.movies.map(N=>h.jsx(tM,{movie:N,onSelect:()=>p(`/watch/${N.id}`)},N.id))}):null,m&&m.shows.length>0?h.jsx(pa.Group,{className:"px-1 py-1 text-xs uppercase tracking-wide text-muted-foreground",heading:"Shows",children:m.shows.map(N=>h.jsx(nM,{onSelect:()=>p(`/shows/${N.id}`),show:N},N.id))}):null,m&&m.episodes.length>0?h.jsx(pa.Group,{className:"px-1 py-1 text-xs uppercase tracking-wide text-muted-foreground",heading:"Episodes",children:m.episodes.map(N=>h.jsx(aM,{episode:N,onSelect:()=>p(`/watch/episode/${N.id}`)},N.id))}):null]})]})]})]})})}function qs({children:n,tone:r="default"}){return h.jsx("p",{className:Fe("px-3 py-6 text-center text-sm",r==="error"?"text-destructive":"text-muted-foreground"),children:n})}function tM({movie:n,onSelect:r}){return h.jsxs(pa.Item,{className:"flex cursor-pointer items-center gap-3 rounded-md px-2 py-2 text-sm text-foreground data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground",onSelect:r,value:`movie-${n.id}-${n.title}`,children:[h.jsx(Sh,{url:n.posterUrl,title:n.title}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsxs("div",{className:"flex items-baseline gap-2",children:[h.jsx("span",{className:"truncate font-medium",children:n.title}),n.year!==null?h.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:n.year}):null]}),n.overview?h.jsx("p",{className:"truncate text-xs text-muted-foreground",children:n.overview}):null]})]})}function nM({onSelect:n,show:r}){return h.jsxs(pa.Item,{className:"flex cursor-pointer items-center gap-3 rounded-md px-2 py-2 text-sm text-foreground data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground",onSelect:n,value:`show-${r.id}-${r.title}`,children:[h.jsx(Sh,{url:r.posterUrl,title:r.title}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsxs("div",{className:"flex items-baseline gap-2",children:[h.jsx("span",{className:"truncate font-medium",children:r.title}),r.year!==null?h.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:r.year}):null]}),r.overview?h.jsx("p",{className:"truncate text-xs text-muted-foreground",children:r.overview}):null]})]})}function aM({episode:n,onSelect:r}){const o=`S${String(n.seasonNumber).padStart(2,"0")}E${String(n.episodeNumber).padStart(2,"0")}`;return h.jsxs(pa.Item,{className:"flex cursor-pointer items-center gap-3 rounded-md px-2 py-2 text-sm text-foreground data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground",onSelect:r,value:`episode-${n.id}-${n.title}`,children:[h.jsx(Sh,{url:n.stillUrl,title:n.title}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsxs("div",{className:"flex items-baseline gap-2",children:[h.jsx("span",{className:"truncate font-medium",children:n.title}),h.jsxs("span",{className:"shrink-0 text-xs text-muted-foreground",children:[n.showTitle," · ",o]})]}),n.overview?h.jsx("p",{className:"truncate text-xs text-muted-foreground",children:n.overview}):null]})]})}function Sh({url:n,title:r}){return h.jsx("div",{className:"h-12 w-9 shrink-0 overflow-hidden rounded",children:h.jsx(dl,{alt:"",className:"h-12 w-9 object-cover",url:n,title:r})})}const Q0=v.createContext(null);function rM({children:n}){const[r,o]=v.useState(!1),l=v.useCallback(()=>o(!0),[]),s=v.useCallback(()=>o(!1),[]),c=v.useCallback(()=>o(m=>!m),[]);v.useEffect(function(){function y(g){g.isComposing||g.keyCode===229||g.key==="/"&&(iM(g.target)||g.metaKey||g.ctrlKey||g.altKey||(g.preventDefault(),o(!0)))}return window.addEventListener("keydown",y),()=>{window.removeEventListener("keydown",y)}},[]);const d=v.useMemo(()=>({close:s,isOpen:r,open:l,toggle:c}),[s,r,l,c]);return h.jsxs(Q0.Provider,{value:d,children:[n,h.jsx(eM,{onOpenChange:o,open:r})]})}function oM(){const n=v.useContext(Q0);if(n===null)throw new Error("useSearchPalette must be used inside a <SearchPaletteProvider>.");return n}function iM(n){if(!(n instanceof HTMLElement))return!1;if(n.isContentEditable)return!0;const r=n.tagName;return r==="INPUT"||r==="TEXTAREA"||r==="SELECT"}async function ju(n){try{return(await n.json()).error?.message??n.statusText}catch{return n.statusText}}async function lM(){try{const n=await fetch("/api/auth/status");if(!n.ok)throw new Error(await ju(n));return await n.json()}catch{throw new Error("Couldn't reach server. Check your connection.")}}function Eh(){return St({queryKey:["auth-status"],queryFn:lM,staleTime:3e4})}function sM(){const n=Dt();return wn({mutationFn:async r=>{let o;try{o=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:r})})}catch{throw new Error("Couldn't reach server. Check your connection.")}if(!o.ok)throw new Error(await ju(o))},onSuccess:()=>{n.invalidateQueries({queryKey:["auth-status"]})}})}function uM(){const n=Dt();return wn({mutationFn:async()=>{let r;try{r=await fetch("/api/auth/logout",{method:"POST"})}catch{throw new Error("Couldn't reach server. Check your connection.")}if(!r.ok)throw new Error(await ju(r))},onSuccess:()=>{n.invalidateQueries({queryKey:["auth-status"]})}})}function cM(){const n=Dt();return wn({mutationFn:async r=>{let o;try{o=await fetch("/api/auth/password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})}catch{throw new Error("Couldn't reach server. Check your connection.")}if(!o.ok)throw new Error(await ju(o));return await o.json()},onSuccess:()=>{n.invalidateQueries({queryKey:["auth-status"]})}})}async function fM(){const n=await fetch("/api/setup");if(!n.ok)throw new Error("Failed to check setup status");return await n.json()}function dM(){return St({queryKey:["setupStatus"],queryFn:fM})}const Gy=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Yy=k0,hM=(n,r)=>o=>{var l;if(r?.variants==null)return Yy(n,o?.class,o?.className);const{variants:s,defaultVariants:c}=r,d=Object.keys(s).map(g=>{const b=o?.[g],p=c?.[g];if(b===null)return null;const w=Gy(b)||Gy(p);return s[g][w]}),m=o&&Object.entries(o).reduce((g,b)=>{let[p,w]=b;return w===void 0||(g[p]=w),g},{}),y=r==null||(l=r.compoundVariants)===null||l===void 0?void 0:l.reduce((g,b)=>{let{class:p,className:w,...C}=b;return Object.entries(C).every(R=>{let[S,N]=R;return Array.isArray(N)?N.includes({...c,...m}[S]):{...c,...m}[S]===N})?[...g,p,w]:g},[]);return Yy(n,d,y,o?.class,o?.className)},mM=hM("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Ie({className:n,variant:r,size:o,asChild:l=!1,...s}){const c=l?QN:"button";return h.jsx(c,{"data-slot":"button",className:Fe(mM({variant:r,size:o,className:n})),...s})}function pM({items:n}){return n.length===0?null:h.jsxs("section",{className:"px-4 py-4 sm:px-6",children:[h.jsx("h2",{className:"text-lg font-semibold text-foreground mb-3",children:"Continue Watching"}),h.jsx("div",{className:"flex gap-2 overflow-x-auto scroll-smooth pb-2 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",children:n.map(r=>{const o=r.type==="movie",l=o?`movie-${r.movie.id}`:`episode-${r.episode.id}`,s=o?`/watch/${r.movie.id}`:`/watch/episode/${r.episode.id}`,c=o?r.movie.title:r.show.title,d=o?null:`S${r.episode.seasonNumber} E${r.episode.episodeNumber}`,m=o?r.movie.posterUrl:r.show.posterUrl,y=r.duration?Math.min(r.currentTime/r.duration*100,100):0;return h.jsxs(xn,{className:"flex-shrink-0 w-32 md:w-40 group",to:s,children:[h.jsxs("div",{className:"relative w-full overflow-hidden rounded-sm",children:[h.jsx(dl,{alt:c,className:"w-full transition-transform duration-200 group-hover:scale-105",url:m,title:c}),h.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-1 bg-muted/50",children:h.jsx("div",{className:"h-full bg-red-600 transition-all",style:{width:`${y}%`}})})]}),h.jsx("p",{className:"text-xs text-muted-foreground truncate mt-1.5 px-0.5",children:c}),d&&h.jsx("p",{className:"text-xs text-muted-foreground/70 truncate px-0.5",children:d})]},l)})})]})}async function Ch(n){try{return(await n.json()).error?.message??n.statusText}catch{return n.statusText}}async function gM(){const n=await fetch("/api/favorites");if(!n.ok)throw new Error(await Ch(n));return await n.json()}function vM(){return St({queryKey:["favorites"],queryFn:gM})}function yM(n){return n.kind==="movie"?`/api/favorites/status?movieId=${n.movieId}`:`/api/favorites/status?showId=${n.showId}`}function K0(n){return n.kind==="movie"?["favorite-status","movie",n.movieId]:["favorite-status","show",n.showId]}function bM(n){return St({queryKey:K0(n),queryFn:async()=>{const r=await fetch(yM(n));if(!r.ok)throw new Error(await Ch(r));return(await r.json()).favorite}})}function xM(){const n=Dt();return wn({mutationFn:async r=>{const o=r.target.kind==="movie"?{movieId:r.target.movieId}:{showId:r.target.showId},l=await fetch("/api/favorites",{method:r.favorite?"POST":"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(!l.ok)throw new Error(await Ch(l))},onSuccess:(r,o)=>{n.invalidateQueries({queryKey:K0(o.target)}),n.invalidateQueries({queryKey:["favorites"]})}})}function wM({className:n,target:r}){const{data:o}=bM(r),l=xM();function s(d){d.preventDefault(),d.stopPropagation(),l.mutate({target:r,favorite:!o},{onError:m=>{Ze.error(m instanceof Error?m.message:"Failed to update favorite")}})}const c=!!o;return h.jsx("button",{"aria-label":c?"Remove from favorites":"Add to favorites","aria-pressed":c,className:Fe("flex size-8 items-center justify-center rounded-full bg-black/50 text-white opacity-0 transition-opacity hover:bg-black/70 group-hover:opacity-100 focus:opacity-100",c&&"opacity-100",n),onClick:s,type:"button",children:h.jsx($T,{className:Fe("size-4 transition-colors",c?"fill-red-500 stroke-red-500":"stroke-white")})})}function el({items:n,title:r}){return n.length===0?null:h.jsxs("section",{className:"px-4 py-4 sm:px-6",children:[h.jsx("h2",{className:"text-lg font-semibold text-foreground mb-3",children:r}),h.jsx("div",{className:"flex gap-2 overflow-x-auto scroll-smooth pb-2 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",children:n.map(o=>{const l=o.type==="movie"?`movie-${o.item.id}`:`show-${o.item.id}`,s=o.type==="movie"?`/watch/${o.item.id}`:`/shows/${o.item.id}`;return h.jsxs(xn,{className:"flex-shrink-0 w-32 md:w-40 group",to:s,children:[h.jsxs("div",{className:"relative w-full overflow-hidden rounded-sm",children:[h.jsx(dl,{alt:o.item.title,className:"w-full transition-transform duration-200 group-hover:scale-105",url:o.item.posterUrl,title:o.item.title}),h.jsx(wM,{className:"absolute right-2 top-2",target:o.type==="movie"?{kind:"movie",movieId:o.item.id}:{kind:"show",showId:o.item.id}})]}),h.jsx("p",{className:"text-xs text-muted-foreground truncate mt-1.5 px-0.5",children:o.item.title})]},l)})})]})}function SM(){const{data:n}=vM(),r=v.useMemo(()=>n?n.map(o=>o.type==="movie"?{type:"movie",item:o.movie}:{type:"show",item:o.show}):[],[n]);return r.length===0?null:h.jsx(el,{items:r,title:"Favorites"})}function Iy(n){const r=EM(n),o=v.forwardRef((l,s)=>{const{children:c,...d}=l,m=v.Children.toArray(c),y=m.find(RM);if(y){const g=y.props.children,b=m.map(p=>p===y?v.Children.count(g)>1?v.Children.only(null):v.isValidElement(g)?g.props.children:null:p);return h.jsx(r,{...d,ref:s,children:v.isValidElement(g)?v.cloneElement(g,void 0,b):null})}return h.jsx(r,{...d,ref:s,children:c})});return o.displayName=`${n}.Slot`,o}function EM(n){const r=v.forwardRef((o,l)=>{const{children:s,...c}=o;if(v.isValidElement(s)){const d=TM(s),m=NM(c,s.props);return s.type!==v.Fragment&&(m.ref=l?It(l,d):d),v.cloneElement(s,m)}return v.Children.count(s)>1?v.Children.only(null):null});return r.displayName=`${n}.SlotClone`,r}var CM=Symbol("radix.slottable");function RM(n){return v.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===CM}function NM(n,r){const o={...r};for(const l in r){const s=n[l],c=r[l];/^on[A-Z]/.test(l)?s&&c?o[l]=(...m)=>{const y=c(...m);return s(...m),y}:s&&(o[l]=s):l==="style"?o[l]={...s,...c}:l==="className"&&(o[l]=[s,c].filter(Boolean).join(" "))}return{...n,...o}}function TM(n){let r=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?n.ref:(r=Object.getOwnPropertyDescriptor(n,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}function Rh(n){const r=n+"CollectionProvider",[o,l]=nr(r),[s,c]=o(r,{collectionRef:{current:null},itemMap:new Map}),d=S=>{const{scope:N,children:j}=S,O=se.useRef(null),k=se.useRef(new Map).current;return h.jsx(s,{scope:N,itemMap:k,collectionRef:O,children:j})};d.displayName=r;const m=n+"CollectionSlot",y=Iy(m),g=se.forwardRef((S,N)=>{const{scope:j,children:O}=S,k=c(m,j),Q=$e(N,k.collectionRef);return h.jsx(y,{ref:Q,children:O})});g.displayName=m;const b=n+"CollectionItemSlot",p="data-radix-collection-item",w=Iy(b),C=se.forwardRef((S,N)=>{const{scope:j,children:O,...k}=S,Q=se.useRef(null),I=$e(N,Q),Z=c(b,j);return se.useEffect(()=>(Z.itemMap.set(Q,{ref:Q,...k}),()=>{Z.itemMap.delete(Q)})),h.jsx(w,{[p]:"",ref:I,children:O})});C.displayName=b;function R(S){const N=c(n+"CollectionConsumer",S);return se.useCallback(()=>{const O=N.collectionRef.current;if(!O)return[];const k=Array.from(O.querySelectorAll(`[${p}]`));return Array.from(N.itemMap.values()).sort((Z,B)=>k.indexOf(Z.ref.current)-k.indexOf(B.ref.current))},[N.collectionRef,N.itemMap])}return[{Provider:d,Slot:g,ItemSlot:C},R,l]}var jM=v.createContext(void 0);function Nh(n){const r=v.useContext(jM);return n||r||"ltr"}const MM=["top","right","bottom","left"],Wa=Math.min,nn=Math.max,ru=Math.round,$s=Math.floor,Vn=n=>({x:n,y:n}),AM={left:"right",right:"left",bottom:"top",top:"bottom"},OM={start:"end",end:"start"};function Vd(n,r,o){return nn(n,Wa(r,o))}function ba(n,r){return typeof n=="function"?n(r):n}function xa(n){return n.split("-")[0]}function Yo(n){return n.split("-")[1]}function Th(n){return n==="x"?"y":"x"}function jh(n){return n==="y"?"height":"width"}const _M=new Set(["top","bottom"]);function $n(n){return _M.has(xa(n))?"y":"x"}function Mh(n){return Th($n(n))}function DM(n,r,o){o===void 0&&(o=!1);const l=Yo(n),s=Mh(n),c=jh(s);let d=s==="x"?l===(o?"end":"start")?"right":"left":l==="start"?"bottom":"top";return r.reference[c]>r.floating[c]&&(d=ou(d)),[d,ou(d)]}function zM(n){const r=ou(n);return[Fd(n),r,Fd(r)]}function Fd(n){return n.replace(/start|end/g,r=>OM[r])}const Qy=["left","right"],Ky=["right","left"],kM=["top","bottom"],LM=["bottom","top"];function UM(n,r,o){switch(n){case"top":case"bottom":return o?r?Ky:Qy:r?Qy:Ky;case"left":case"right":return r?kM:LM;default:return[]}}function HM(n,r,o,l){const s=Yo(n);let c=UM(xa(n),o==="start",l);return s&&(c=c.map(d=>d+"-"+s),r&&(c=c.concat(c.map(Fd)))),c}function ou(n){return n.replace(/left|right|bottom|top/g,r=>AM[r])}function BM(n){return{top:0,right:0,bottom:0,left:0,...n}}function X0(n){return typeof n!="number"?BM(n):{top:n,right:n,bottom:n,left:n}}function iu(n){const{x:r,y:o,width:l,height:s}=n;return{width:l,height:s,top:o,left:r,right:r+l,bottom:o+s,x:r,y:o}}function Xy(n,r,o){let{reference:l,floating:s}=n;const c=$n(r),d=Mh(r),m=jh(d),y=xa(r),g=c==="y",b=l.x+l.width/2-s.width/2,p=l.y+l.height/2-s.height/2,w=l[m]/2-s[m]/2;let C;switch(y){case"top":C={x:b,y:l.y-s.height};break;case"bottom":C={x:b,y:l.y+l.height};break;case"right":C={x:l.x+l.width,y:p};break;case"left":C={x:l.x-s.width,y:p};break;default:C={x:l.x,y:l.y}}switch(Yo(r)){case"start":C[d]-=w*(o&&g?-1:1);break;case"end":C[d]+=w*(o&&g?-1:1);break}return C}const PM=async(n,r,o)=>{const{placement:l="bottom",strategy:s="absolute",middleware:c=[],platform:d}=o,m=c.filter(Boolean),y=await(d.isRTL==null?void 0:d.isRTL(r));let g=await d.getElementRects({reference:n,floating:r,strategy:s}),{x:b,y:p}=Xy(g,l,y),w=l,C={},R=0;for(let S=0;S<m.length;S++){const{name:N,fn:j}=m[S],{x:O,y:k,data:Q,reset:I}=await j({x:b,y:p,initialPlacement:l,placement:w,strategy:s,middlewareData:C,rects:g,platform:d,elements:{reference:n,floating:r}});b=O??b,p=k??p,C={...C,[N]:{...C[N],...Q}},I&&R<=50&&(R++,typeof I=="object"&&(I.placement&&(w=I.placement),I.rects&&(g=I.rects===!0?await d.getElementRects({reference:n,floating:r,strategy:s}):I.rects),{x:b,y:p}=Xy(g,w,y)),S=-1)}return{x:b,y:p,placement:w,strategy:s,middlewareData:C}};async function tl(n,r){var o;r===void 0&&(r={});const{x:l,y:s,platform:c,rects:d,elements:m,strategy:y}=n,{boundary:g="clippingAncestors",rootBoundary:b="viewport",elementContext:p="floating",altBoundary:w=!1,padding:C=0}=ba(r,n),R=X0(C),N=m[w?p==="floating"?"reference":"floating":p],j=iu(await c.getClippingRect({element:(o=await(c.isElement==null?void 0:c.isElement(N)))==null||o?N:N.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(m.floating)),boundary:g,rootBoundary:b,strategy:y})),O=p==="floating"?{x:l,y:s,width:d.floating.width,height:d.floating.height}:d.reference,k=await(c.getOffsetParent==null?void 0:c.getOffsetParent(m.floating)),Q=await(c.isElement==null?void 0:c.isElement(k))?await(c.getScale==null?void 0:c.getScale(k))||{x:1,y:1}:{x:1,y:1},I=iu(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:O,offsetParent:k,strategy:y}):O);return{top:(j.top-I.top+R.top)/Q.y,bottom:(I.bottom-j.bottom+R.bottom)/Q.y,left:(j.left-I.left+R.left)/Q.x,right:(I.right-j.right+R.right)/Q.x}}const qM=n=>({name:"arrow",options:n,async fn(r){const{x:o,y:l,placement:s,rects:c,platform:d,elements:m,middlewareData:y}=r,{element:g,padding:b=0}=ba(n,r)||{};if(g==null)return{};const p=X0(b),w={x:o,y:l},C=Mh(s),R=jh(C),S=await d.getDimensions(g),N=C==="y",j=N?"top":"left",O=N?"bottom":"right",k=N?"clientHeight":"clientWidth",Q=c.reference[R]+c.reference[C]-w[C]-c.floating[R],I=w[C]-c.reference[C],Z=await(d.getOffsetParent==null?void 0:d.getOffsetParent(g));let B=Z?Z[k]:0;(!B||!await(d.isElement==null?void 0:d.isElement(Z)))&&(B=m.floating[k]||c.floating[R]);const G=Q/2-I/2,ue=B/2-S[R]/2-1,ie=Wa(p[j],ue),oe=Wa(p[O],ue),fe=ie,ge=B-S[R]-oe,ae=B/2-S[R]/2+G,W=Vd(fe,ae,ge),T=!y.arrow&&Yo(s)!=null&&ae!==W&&c.reference[R]/2-(ae<fe?ie:oe)-S[R]/2<0,U=T?ae<fe?ae-fe:ae-ge:0;return{[C]:w[C]+U,data:{[C]:W,centerOffset:ae-W-U,...T&&{alignmentOffset:U}},reset:T}}}),$M=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(r){var o,l;const{placement:s,middlewareData:c,rects:d,initialPlacement:m,platform:y,elements:g}=r,{mainAxis:b=!0,crossAxis:p=!0,fallbackPlacements:w,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:R="none",flipAlignment:S=!0,...N}=ba(n,r);if((o=c.arrow)!=null&&o.alignmentOffset)return{};const j=xa(s),O=$n(m),k=xa(m)===m,Q=await(y.isRTL==null?void 0:y.isRTL(g.floating)),I=w||(k||!S?[ou(m)]:zM(m)),Z=R!=="none";!w&&Z&&I.push(...HM(m,S,R,Q));const B=[m,...I],G=await tl(r,N),ue=[];let ie=((l=c.flip)==null?void 0:l.overflows)||[];if(b&&ue.push(G[j]),p){const ae=DM(s,d,Q);ue.push(G[ae[0]],G[ae[1]])}if(ie=[...ie,{placement:s,overflows:ue}],!ue.every(ae=>ae<=0)){var oe,fe;const ae=(((oe=c.flip)==null?void 0:oe.index)||0)+1,W=B[ae];if(W&&(!(p==="alignment"?O!==$n(W):!1)||ie.every(_=>$n(_.placement)===O?_.overflows[0]>0:!0)))return{data:{index:ae,overflows:ie},reset:{placement:W}};let T=(fe=ie.filter(U=>U.overflows[0]<=0).sort((U,_)=>U.overflows[1]-_.overflows[1])[0])==null?void 0:fe.placement;if(!T)switch(C){case"bestFit":{var ge;const U=(ge=ie.filter(_=>{if(Z){const F=$n(_.placement);return F===O||F==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(F=>F>0).reduce((F,ne)=>F+ne,0)]).sort((_,F)=>_[1]-F[1])[0])==null?void 0:ge[0];U&&(T=U);break}case"initialPlacement":T=m;break}if(s!==T)return{reset:{placement:T}}}return{}}}};function Zy(n,r){return{top:n.top-r.height,right:n.right-r.width,bottom:n.bottom-r.height,left:n.left-r.width}}function Jy(n){return MM.some(r=>n[r]>=0)}const VM=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(r){const{rects:o}=r,{strategy:l="referenceHidden",...s}=ba(n,r);switch(l){case"referenceHidden":{const c=await tl(r,{...s,elementContext:"reference"}),d=Zy(c,o.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:Jy(d)}}}case"escaped":{const c=await tl(r,{...s,altBoundary:!0}),d=Zy(c,o.floating);return{data:{escapedOffsets:d,escaped:Jy(d)}}}default:return{}}}}},Z0=new Set(["left","top"]);async function FM(n,r){const{placement:o,platform:l,elements:s}=n,c=await(l.isRTL==null?void 0:l.isRTL(s.floating)),d=xa(o),m=Yo(o),y=$n(o)==="y",g=Z0.has(d)?-1:1,b=c&&y?-1:1,p=ba(r,n);let{mainAxis:w,crossAxis:C,alignmentAxis:R}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return m&&typeof R=="number"&&(C=m==="end"?R*-1:R),y?{x:C*b,y:w*g}:{x:w*g,y:C*b}}const GM=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(r){var o,l;const{x:s,y:c,placement:d,middlewareData:m}=r,y=await FM(r,n);return d===((o=m.offset)==null?void 0:o.placement)&&(l=m.arrow)!=null&&l.alignmentOffset?{}:{x:s+y.x,y:c+y.y,data:{...y,placement:d}}}}},YM=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(r){const{x:o,y:l,placement:s}=r,{mainAxis:c=!0,crossAxis:d=!1,limiter:m={fn:N=>{let{x:j,y:O}=N;return{x:j,y:O}}},...y}=ba(n,r),g={x:o,y:l},b=await tl(r,y),p=$n(xa(s)),w=Th(p);let C=g[w],R=g[p];if(c){const N=w==="y"?"top":"left",j=w==="y"?"bottom":"right",O=C+b[N],k=C-b[j];C=Vd(O,C,k)}if(d){const N=p==="y"?"top":"left",j=p==="y"?"bottom":"right",O=R+b[N],k=R-b[j];R=Vd(O,R,k)}const S=m.fn({...r,[w]:C,[p]:R});return{...S,data:{x:S.x-o,y:S.y-l,enabled:{[w]:c,[p]:d}}}}}},IM=function(n){return n===void 0&&(n={}),{options:n,fn(r){const{x:o,y:l,placement:s,rects:c,middlewareData:d}=r,{offset:m=0,mainAxis:y=!0,crossAxis:g=!0}=ba(n,r),b={x:o,y:l},p=$n(s),w=Th(p);let C=b[w],R=b[p];const S=ba(m,r),N=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(y){const k=w==="y"?"height":"width",Q=c.reference[w]-c.floating[k]+N.mainAxis,I=c.reference[w]+c.reference[k]-N.mainAxis;C<Q?C=Q:C>I&&(C=I)}if(g){var j,O;const k=w==="y"?"width":"height",Q=Z0.has(xa(s)),I=c.reference[p]-c.floating[k]+(Q&&((j=d.offset)==null?void 0:j[p])||0)+(Q?0:N.crossAxis),Z=c.reference[p]+c.reference[k]+(Q?0:((O=d.offset)==null?void 0:O[p])||0)-(Q?N.crossAxis:0);R<I?R=I:R>Z&&(R=Z)}return{[w]:C,[p]:R}}}},QM=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(r){var o,l;const{placement:s,rects:c,platform:d,elements:m}=r,{apply:y=()=>{},...g}=ba(n,r),b=await tl(r,g),p=xa(s),w=Yo(s),C=$n(s)==="y",{width:R,height:S}=c.floating;let N,j;p==="top"||p==="bottom"?(N=p,j=w===(await(d.isRTL==null?void 0:d.isRTL(m.floating))?"start":"end")?"left":"right"):(j=p,N=w==="end"?"top":"bottom");const O=S-b.top-b.bottom,k=R-b.left-b.right,Q=Wa(S-b[N],O),I=Wa(R-b[j],k),Z=!r.middlewareData.shift;let B=Q,G=I;if((o=r.middlewareData.shift)!=null&&o.enabled.x&&(G=k),(l=r.middlewareData.shift)!=null&&l.enabled.y&&(B=O),Z&&!w){const ie=nn(b.left,0),oe=nn(b.right,0),fe=nn(b.top,0),ge=nn(b.bottom,0);C?G=R-2*(ie!==0||oe!==0?ie+oe:nn(b.left,b.right)):B=S-2*(fe!==0||ge!==0?fe+ge:nn(b.top,b.bottom))}await y({...r,availableWidth:G,availableHeight:B});const ue=await d.getDimensions(m.floating);return R!==ue.width||S!==ue.height?{reset:{rects:!0}}:{}}}};function Mu(){return typeof window<"u"}function Io(n){return J0(n)?(n.nodeName||"").toLowerCase():"#document"}function an(n){var r;return(n==null||(r=n.ownerDocument)==null?void 0:r.defaultView)||window}function In(n){var r;return(r=(J0(n)?n.ownerDocument:n.document)||window.document)==null?void 0:r.documentElement}function J0(n){return Mu()?n instanceof Node||n instanceof an(n).Node:!1}function An(n){return Mu()?n instanceof Element||n instanceof an(n).Element:!1}function Gn(n){return Mu()?n instanceof HTMLElement||n instanceof an(n).HTMLElement:!1}function Wy(n){return!Mu()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof an(n).ShadowRoot}const KM=new Set(["inline","contents"]);function hl(n){const{overflow:r,overflowX:o,overflowY:l,display:s}=On(n);return/auto|scroll|overlay|hidden|clip/.test(r+l+o)&&!KM.has(s)}const XM=new Set(["table","td","th"]);function ZM(n){return XM.has(Io(n))}const JM=[":popover-open",":modal"];function Au(n){return JM.some(r=>{try{return n.matches(r)}catch{return!1}})}const WM=["transform","translate","scale","rotate","perspective"],eA=["transform","translate","scale","rotate","perspective","filter"],tA=["paint","layout","strict","content"];function Ah(n){const r=Oh(),o=An(n)?On(n):n;return WM.some(l=>o[l]?o[l]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!r&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!r&&(o.filter?o.filter!=="none":!1)||eA.some(l=>(o.willChange||"").includes(l))||tA.some(l=>(o.contain||"").includes(l))}function nA(n){let r=er(n);for(;Gn(r)&&!Uo(r);){if(Ah(r))return r;if(Au(r))return null;r=er(r)}return null}function Oh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const aA=new Set(["html","body","#document"]);function Uo(n){return aA.has(Io(n))}function On(n){return an(n).getComputedStyle(n)}function Ou(n){return An(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function er(n){if(Io(n)==="html")return n;const r=n.assignedSlot||n.parentNode||Wy(n)&&n.host||In(n);return Wy(r)?r.host:r}function W0(n){const r=er(n);return Uo(r)?n.ownerDocument?n.ownerDocument.body:n.body:Gn(r)&&hl(r)?r:W0(r)}function nl(n,r,o){var l;r===void 0&&(r=[]),o===void 0&&(o=!0);const s=W0(n),c=s===((l=n.ownerDocument)==null?void 0:l.body),d=an(s);if(c){const m=Gd(d);return r.concat(d,d.visualViewport||[],hl(s)?s:[],m&&o?nl(m):[])}return r.concat(s,nl(s,[],o))}function Gd(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function ex(n){const r=On(n);let o=parseFloat(r.width)||0,l=parseFloat(r.height)||0;const s=Gn(n),c=s?n.offsetWidth:o,d=s?n.offsetHeight:l,m=ru(o)!==c||ru(l)!==d;return m&&(o=c,l=d),{width:o,height:l,$:m}}function _h(n){return An(n)?n:n.contextElement}function ko(n){const r=_h(n);if(!Gn(r))return Vn(1);const o=r.getBoundingClientRect(),{width:l,height:s,$:c}=ex(r);let d=(c?ru(o.width):o.width)/l,m=(c?ru(o.height):o.height)/s;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}const rA=Vn(0);function tx(n){const r=an(n);return!Oh()||!r.visualViewport?rA:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function oA(n,r,o){return r===void 0&&(r=!1),!o||r&&o!==an(n)?!1:r}function zr(n,r,o,l){r===void 0&&(r=!1),o===void 0&&(o=!1);const s=n.getBoundingClientRect(),c=_h(n);let d=Vn(1);r&&(l?An(l)&&(d=ko(l)):d=ko(n));const m=oA(c,o,l)?tx(c):Vn(0);let y=(s.left+m.x)/d.x,g=(s.top+m.y)/d.y,b=s.width/d.x,p=s.height/d.y;if(c){const w=an(c),C=l&&An(l)?an(l):l;let R=w,S=Gd(R);for(;S&&l&&C!==R;){const N=ko(S),j=S.getBoundingClientRect(),O=On(S),k=j.left+(S.clientLeft+parseFloat(O.paddingLeft))*N.x,Q=j.top+(S.clientTop+parseFloat(O.paddingTop))*N.y;y*=N.x,g*=N.y,b*=N.x,p*=N.y,y+=k,g+=Q,R=an(S),S=Gd(R)}}return iu({width:b,height:p,x:y,y:g})}function _u(n,r){const o=Ou(n).scrollLeft;return r?r.left+o:zr(In(n)).left+o}function nx(n,r){const o=n.getBoundingClientRect(),l=o.left+r.scrollLeft-_u(n,o),s=o.top+r.scrollTop;return{x:l,y:s}}function iA(n){let{elements:r,rect:o,offsetParent:l,strategy:s}=n;const c=s==="fixed",d=In(l),m=r?Au(r.floating):!1;if(l===d||m&&c)return o;let y={scrollLeft:0,scrollTop:0},g=Vn(1);const b=Vn(0),p=Gn(l);if((p||!p&&!c)&&((Io(l)!=="body"||hl(d))&&(y=Ou(l)),Gn(l))){const C=zr(l);g=ko(l),b.x=C.x+l.clientLeft,b.y=C.y+l.clientTop}const w=d&&!p&&!c?nx(d,y):Vn(0);return{width:o.width*g.x,height:o.height*g.y,x:o.x*g.x-y.scrollLeft*g.x+b.x+w.x,y:o.y*g.y-y.scrollTop*g.y+b.y+w.y}}function lA(n){return Array.from(n.getClientRects())}function sA(n){const r=In(n),o=Ou(n),l=n.ownerDocument.body,s=nn(r.scrollWidth,r.clientWidth,l.scrollWidth,l.clientWidth),c=nn(r.scrollHeight,r.clientHeight,l.scrollHeight,l.clientHeight);let d=-o.scrollLeft+_u(n);const m=-o.scrollTop;return On(l).direction==="rtl"&&(d+=nn(r.clientWidth,l.clientWidth)-s),{width:s,height:c,x:d,y:m}}const eb=25;function uA(n,r){const o=an(n),l=In(n),s=o.visualViewport;let c=l.clientWidth,d=l.clientHeight,m=0,y=0;if(s){c=s.width,d=s.height;const b=Oh();(!b||b&&r==="fixed")&&(m=s.offsetLeft,y=s.offsetTop)}const g=_u(l);if(g<=0){const b=l.ownerDocument,p=b.body,w=getComputedStyle(p),C=b.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,R=Math.abs(l.clientWidth-p.clientWidth-C);R<=eb&&(c-=R)}else g<=eb&&(c+=g);return{width:c,height:d,x:m,y}}const cA=new Set(["absolute","fixed"]);function fA(n,r){const o=zr(n,!0,r==="fixed"),l=o.top+n.clientTop,s=o.left+n.clientLeft,c=Gn(n)?ko(n):Vn(1),d=n.clientWidth*c.x,m=n.clientHeight*c.y,y=s*c.x,g=l*c.y;return{width:d,height:m,x:y,y:g}}function tb(n,r,o){let l;if(r==="viewport")l=uA(n,o);else if(r==="document")l=sA(In(n));else if(An(r))l=fA(r,o);else{const s=tx(n);l={x:r.x-s.x,y:r.y-s.y,width:r.width,height:r.height}}return iu(l)}function ax(n,r){const o=er(n);return o===r||!An(o)||Uo(o)?!1:On(o).position==="fixed"||ax(o,r)}function dA(n,r){const o=r.get(n);if(o)return o;let l=nl(n,[],!1).filter(m=>An(m)&&Io(m)!=="body"),s=null;const c=On(n).position==="fixed";let d=c?er(n):n;for(;An(d)&&!Uo(d);){const m=On(d),y=Ah(d);!y&&m.position==="fixed"&&(s=null),(c?!y&&!s:!y&&m.position==="static"&&!!s&&cA.has(s.position)||hl(d)&&!y&&ax(n,d))?l=l.filter(b=>b!==d):s=m,d=er(d)}return r.set(n,l),l}function hA(n){let{element:r,boundary:o,rootBoundary:l,strategy:s}=n;const d=[...o==="clippingAncestors"?Au(r)?[]:dA(r,this._c):[].concat(o),l],m=d[0],y=d.reduce((g,b)=>{const p=tb(r,b,s);return g.top=nn(p.top,g.top),g.right=Wa(p.right,g.right),g.bottom=Wa(p.bottom,g.bottom),g.left=nn(p.left,g.left),g},tb(r,m,s));return{width:y.right-y.left,height:y.bottom-y.top,x:y.left,y:y.top}}function mA(n){const{width:r,height:o}=ex(n);return{width:r,height:o}}function pA(n,r,o){const l=Gn(r),s=In(r),c=o==="fixed",d=zr(n,!0,c,r);let m={scrollLeft:0,scrollTop:0};const y=Vn(0);function g(){y.x=_u(s)}if(l||!l&&!c)if((Io(r)!=="body"||hl(s))&&(m=Ou(r)),l){const C=zr(r,!0,c,r);y.x=C.x+r.clientLeft,y.y=C.y+r.clientTop}else s&&g();c&&!l&&s&&g();const b=s&&!l&&!c?nx(s,m):Vn(0),p=d.left+m.scrollLeft-y.x-b.x,w=d.top+m.scrollTop-y.y-b.y;return{x:p,y:w,width:d.width,height:d.height}}function Sd(n){return On(n).position==="static"}function nb(n,r){if(!Gn(n)||On(n).position==="fixed")return null;if(r)return r(n);let o=n.offsetParent;return In(n)===o&&(o=o.ownerDocument.body),o}function rx(n,r){const o=an(n);if(Au(n))return o;if(!Gn(n)){let s=er(n);for(;s&&!Uo(s);){if(An(s)&&!Sd(s))return s;s=er(s)}return o}let l=nb(n,r);for(;l&&ZM(l)&&Sd(l);)l=nb(l,r);return l&&Uo(l)&&Sd(l)&&!Ah(l)?o:l||nA(n)||o}const gA=async function(n){const r=this.getOffsetParent||rx,o=this.getDimensions,l=await o(n.floating);return{reference:pA(n.reference,await r(n.floating),n.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function vA(n){return On(n).direction==="rtl"}const yA={convertOffsetParentRelativeRectToViewportRelativeRect:iA,getDocumentElement:In,getClippingRect:hA,getOffsetParent:rx,getElementRects:gA,getClientRects:lA,getDimensions:mA,getScale:ko,isElement:An,isRTL:vA};function ox(n,r){return n.x===r.x&&n.y===r.y&&n.width===r.width&&n.height===r.height}function bA(n,r){let o=null,l;const s=In(n);function c(){var m;clearTimeout(l),(m=o)==null||m.disconnect(),o=null}function d(m,y){m===void 0&&(m=!1),y===void 0&&(y=1),c();const g=n.getBoundingClientRect(),{left:b,top:p,width:w,height:C}=g;if(m||r(),!w||!C)return;const R=$s(p),S=$s(s.clientWidth-(b+w)),N=$s(s.clientHeight-(p+C)),j=$s(b),k={rootMargin:-R+"px "+-S+"px "+-N+"px "+-j+"px",threshold:nn(0,Wa(1,y))||1};let Q=!0;function I(Z){const B=Z[0].intersectionRatio;if(B!==y){if(!Q)return d();B?d(!1,B):l=setTimeout(()=>{d(!1,1e-7)},1e3)}B===1&&!ox(g,n.getBoundingClientRect())&&d(),Q=!1}try{o=new IntersectionObserver(I,{...k,root:s.ownerDocument})}catch{o=new IntersectionObserver(I,k)}o.observe(n)}return d(!0),c}function xA(n,r,o,l){l===void 0&&(l={});const{ancestorScroll:s=!0,ancestorResize:c=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:y=!1}=l,g=_h(n),b=s||c?[...g?nl(g):[],...nl(r)]:[];b.forEach(j=>{s&&j.addEventListener("scroll",o,{passive:!0}),c&&j.addEventListener("resize",o)});const p=g&&m?bA(g,o):null;let w=-1,C=null;d&&(C=new ResizeObserver(j=>{let[O]=j;O&&O.target===g&&C&&(C.unobserve(r),cancelAnimationFrame(w),w=requestAnimationFrame(()=>{var k;(k=C)==null||k.observe(r)})),o()}),g&&!y&&C.observe(g),C.observe(r));let R,S=y?zr(n):null;y&&N();function N(){const j=zr(n);S&&!ox(S,j)&&o(),S=j,R=requestAnimationFrame(N)}return o(),()=>{var j;b.forEach(O=>{s&&O.removeEventListener("scroll",o),c&&O.removeEventListener("resize",o)}),p?.(),(j=C)==null||j.disconnect(),C=null,y&&cancelAnimationFrame(R)}}const wA=GM,SA=YM,EA=$M,CA=QM,RA=VM,ab=qM,NA=IM,TA=(n,r,o)=>{const l=new Map,s={platform:yA,...o},c={...s.platform,_c:l};return PM(n,r,{...s,platform:c})};var jA=typeof document<"u",MA=function(){},Is=jA?v.useLayoutEffect:MA;function lu(n,r){if(n===r)return!0;if(typeof n!=typeof r)return!1;if(typeof n=="function"&&n.toString()===r.toString())return!0;let o,l,s;if(n&&r&&typeof n=="object"){if(Array.isArray(n)){if(o=n.length,o!==r.length)return!1;for(l=o;l--!==0;)if(!lu(n[l],r[l]))return!1;return!0}if(s=Object.keys(n),o=s.length,o!==Object.keys(r).length)return!1;for(l=o;l--!==0;)if(!{}.hasOwnProperty.call(r,s[l]))return!1;for(l=o;l--!==0;){const c=s[l];if(!(c==="_owner"&&n.$$typeof)&&!lu(n[c],r[c]))return!1}return!0}return n!==n&&r!==r}function ix(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function rb(n,r){const o=ix(n);return Math.round(r*o)/o}function Ed(n){const r=v.useRef(n);return Is(()=>{r.current=n}),r}function AA(n){n===void 0&&(n={});const{placement:r="bottom",strategy:o="absolute",middleware:l=[],platform:s,elements:{reference:c,floating:d}={},transform:m=!0,whileElementsMounted:y,open:g}=n,[b,p]=v.useState({x:0,y:0,strategy:o,placement:r,middlewareData:{},isPositioned:!1}),[w,C]=v.useState(l);lu(w,l)||C(l);const[R,S]=v.useState(null),[N,j]=v.useState(null),O=v.useCallback(_=>{_!==Z.current&&(Z.current=_,S(_))},[]),k=v.useCallback(_=>{_!==B.current&&(B.current=_,j(_))},[]),Q=c||R,I=d||N,Z=v.useRef(null),B=v.useRef(null),G=v.useRef(b),ue=y!=null,ie=Ed(y),oe=Ed(s),fe=Ed(g),ge=v.useCallback(()=>{if(!Z.current||!B.current)return;const _={placement:r,strategy:o,middleware:w};oe.current&&(_.platform=oe.current),TA(Z.current,B.current,_).then(F=>{const ne={...F,isPositioned:fe.current!==!1};ae.current&&!lu(G.current,ne)&&(G.current=ne,sl.flushSync(()=>{p(ne)}))})},[w,r,o,oe,fe]);Is(()=>{g===!1&&G.current.isPositioned&&(G.current.isPositioned=!1,p(_=>({..._,isPositioned:!1})))},[g]);const ae=v.useRef(!1);Is(()=>(ae.current=!0,()=>{ae.current=!1}),[]),Is(()=>{if(Q&&(Z.current=Q),I&&(B.current=I),Q&&I){if(ie.current)return ie.current(Q,I,ge);ge()}},[Q,I,ge,ie,ue]);const W=v.useMemo(()=>({reference:Z,floating:B,setReference:O,setFloating:k}),[O,k]),T=v.useMemo(()=>({reference:Q,floating:I}),[Q,I]),U=v.useMemo(()=>{const _={position:o,left:0,top:0};if(!T.floating)return _;const F=rb(T.floating,b.x),ne=rb(T.floating,b.y);return m?{..._,transform:"translate("+F+"px, "+ne+"px)",...ix(T.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:F,top:ne}},[o,m,T.floating,b.x,b.y]);return v.useMemo(()=>({...b,update:ge,refs:W,elements:T,floatingStyles:U}),[b,ge,W,T,U])}const OA=n=>{function r(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:n,fn(o){const{element:l,padding:s}=typeof n=="function"?n(o):n;return l&&r(l)?l.current!=null?ab({element:l.current,padding:s}).fn(o):{}:l?ab({element:l,padding:s}).fn(o):{}}}},_A=(n,r)=>({...wA(n),options:[n,r]}),DA=(n,r)=>({...SA(n),options:[n,r]}),zA=(n,r)=>({...NA(n),options:[n,r]}),kA=(n,r)=>({...EA(n),options:[n,r]}),LA=(n,r)=>({...CA(n),options:[n,r]}),UA=(n,r)=>({...RA(n),options:[n,r]}),HA=(n,r)=>({...OA(n),options:[n,r]});var BA="Arrow",lx=v.forwardRef((n,r)=>{const{children:o,width:l=10,height:s=5,...c}=n;return h.jsx(De.svg,{...c,ref:r,width:l,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?o:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});lx.displayName=BA;var PA=lx;function qA(n){const[r,o]=v.useState(void 0);return Nt(()=>{if(n){o({width:n.offsetWidth,height:n.offsetHeight});const l=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const c=s[0];let d,m;if("borderBoxSize"in c){const y=c.borderBoxSize,g=Array.isArray(y)?y[0]:y;d=g.inlineSize,m=g.blockSize}else d=n.offsetWidth,m=n.offsetHeight;o({width:d,height:m})});return l.observe(n,{box:"border-box"}),()=>l.unobserve(n)}else o(void 0)},[n]),r}var Dh="Popper",[sx,Qo]=nr(Dh),[$A,ux]=sx(Dh),cx=n=>{const{__scopePopper:r,children:o}=n,[l,s]=v.useState(null);return h.jsx($A,{scope:r,anchor:l,onAnchorChange:s,children:o})};cx.displayName=Dh;var fx="PopperAnchor",dx=v.forwardRef((n,r)=>{const{__scopePopper:o,virtualRef:l,...s}=n,c=ux(fx,o),d=v.useRef(null),m=$e(r,d),y=v.useRef(null);return v.useEffect(()=>{const g=y.current;y.current=l?.current||d.current,g!==y.current&&c.onAnchorChange(y.current)}),l?null:h.jsx(De.div,{...s,ref:m})});dx.displayName=fx;var zh="PopperContent",[VA,FA]=sx(zh),hx=v.forwardRef((n,r)=>{const{__scopePopper:o,side:l="bottom",sideOffset:s=0,align:c="center",alignOffset:d=0,arrowPadding:m=0,avoidCollisions:y=!0,collisionBoundary:g=[],collisionPadding:b=0,sticky:p="partial",hideWhenDetached:w=!1,updatePositionStrategy:C="optimized",onPlaced:R,...S}=n,N=ux(zh,o),[j,O]=v.useState(null),k=$e(r,Y=>O(Y)),[Q,I]=v.useState(null),Z=qA(Q),B=Z?.width??0,G=Z?.height??0,ue=l+(c!=="center"?"-"+c:""),ie=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},oe=Array.isArray(g)?g:[g],fe=oe.length>0,ge={padding:ie,boundary:oe.filter(YA),altBoundary:fe},{refs:ae,floatingStyles:W,placement:T,isPositioned:U,middlewareData:_}=AA({strategy:"fixed",placement:ue,whileElementsMounted:(...Y)=>xA(...Y,{animationFrame:C==="always"}),elements:{reference:N.anchor},middleware:[_A({mainAxis:s+G,alignmentAxis:d}),y&&DA({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?zA():void 0,...ge}),y&&kA({...ge}),LA({...ge,apply:({elements:Y,rects:le,availableWidth:ce,availableHeight:ve})=>{const{width:we,height:Ce}=le.reference,et=Y.floating.style;et.setProperty("--radix-popper-available-width",`${ce}px`),et.setProperty("--radix-popper-available-height",`${ve}px`),et.setProperty("--radix-popper-anchor-width",`${we}px`),et.setProperty("--radix-popper-anchor-height",`${Ce}px`)}}),Q&&HA({element:Q,padding:m}),IA({arrowWidth:B,arrowHeight:G}),w&&UA({strategy:"referenceHidden",...ge})]}),[F,ne]=gx(T),M=Fn(R);Nt(()=>{U&&M?.()},[U,M]);const A=_.arrow?.x,L=_.arrow?.y,P=_.arrow?.centerOffset!==0,[K,re]=v.useState();return Nt(()=>{j&&re(window.getComputedStyle(j).zIndex)},[j]),h.jsx("div",{ref:ae.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:U?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[_.transformOrigin?.x,_.transformOrigin?.y].join(" "),..._.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:h.jsx(VA,{scope:o,placedSide:F,onArrowChange:I,arrowX:A,arrowY:L,shouldHideArrow:P,children:h.jsx(De.div,{"data-side":F,"data-align":ne,...S,ref:k,style:{...S.style,animation:U?void 0:"none"}})})})});hx.displayName=zh;var mx="PopperArrow",GA={top:"bottom",right:"left",bottom:"top",left:"right"},px=v.forwardRef(function(r,o){const{__scopePopper:l,...s}=r,c=FA(mx,l),d=GA[c.placedSide];return h.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:h.jsx(PA,{...s,ref:o,style:{...s.style,display:"block"}})})});px.displayName=mx;function YA(n){return n!==null}var IA=n=>({name:"transformOrigin",options:n,fn(r){const{placement:o,rects:l,middlewareData:s}=r,d=s.arrow?.centerOffset!==0,m=d?0:n.arrowWidth,y=d?0:n.arrowHeight,[g,b]=gx(o),p={start:"0%",center:"50%",end:"100%"}[b],w=(s.arrow?.x??0)+m/2,C=(s.arrow?.y??0)+y/2;let R="",S="";return g==="bottom"?(R=d?p:`${w}px`,S=`${-y}px`):g==="top"?(R=d?p:`${w}px`,S=`${l.floating.height+y}px`):g==="right"?(R=`${-y}px`,S=d?p:`${C}px`):g==="left"&&(R=`${l.floating.width+y}px`,S=d?p:`${C}px`),{data:{x:R,y:S}}}});function gx(n){const[r,o="center"]=n.split("-");return[r,o]}var kh=cx,Lh=dx,Uh=hx,Hh=px,Cd="rovingFocusGroup.onEntryFocus",QA={bubbles:!1,cancelable:!0},ml="RovingFocusGroup",[Yd,vx,KA]=Rh(ml),[XA,yx]=nr(ml,[KA]),[ZA,JA]=XA(ml),bx=v.forwardRef((n,r)=>h.jsx(Yd.Provider,{scope:n.__scopeRovingFocusGroup,children:h.jsx(Yd.Slot,{scope:n.__scopeRovingFocusGroup,children:h.jsx(WA,{...n,ref:r})})}));bx.displayName=ml;var WA=v.forwardRef((n,r)=>{const{__scopeRovingFocusGroup:o,orientation:l,loop:s=!1,dir:c,currentTabStopId:d,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:y,onEntryFocus:g,preventScrollOnEntryFocus:b=!1,...p}=n,w=v.useRef(null),C=$e(r,w),R=Nh(c),[S,N]=Lo({prop:d,defaultProp:m??null,onChange:y,caller:ml}),[j,O]=v.useState(!1),k=Fn(g),Q=vx(o),I=v.useRef(!1),[Z,B]=v.useState(0);return v.useEffect(()=>{const G=w.current;if(G)return G.addEventListener(Cd,k),()=>G.removeEventListener(Cd,k)},[k]),h.jsx(ZA,{scope:o,orientation:l,dir:R,loop:s,currentTabStopId:S,onItemFocus:v.useCallback(G=>N(G),[N]),onItemShiftTab:v.useCallback(()=>O(!0),[]),onFocusableItemAdd:v.useCallback(()=>B(G=>G+1),[]),onFocusableItemRemove:v.useCallback(()=>B(G=>G-1),[]),children:h.jsx(De.div,{tabIndex:j||Z===0?-1:0,"data-orientation":l,...p,ref:C,style:{outline:"none",...n.style},onMouseDown:he(n.onMouseDown,()=>{I.current=!0}),onFocus:he(n.onFocus,G=>{const ue=!I.current;if(G.target===G.currentTarget&&ue&&!j){const ie=new CustomEvent(Cd,QA);if(G.currentTarget.dispatchEvent(ie),!ie.defaultPrevented){const oe=Q().filter(T=>T.focusable),fe=oe.find(T=>T.active),ge=oe.find(T=>T.id===S),W=[fe,ge,...oe].filter(Boolean).map(T=>T.ref.current);Sx(W,b)}}I.current=!1}),onBlur:he(n.onBlur,()=>O(!1))})})}),xx="RovingFocusGroupItem",wx=v.forwardRef((n,r)=>{const{__scopeRovingFocusGroup:o,focusable:l=!0,active:s=!1,tabStopId:c,children:d,...m}=n,y=_t(),g=c||y,b=JA(xx,o),p=b.currentTabStopId===g,w=vx(o),{onFocusableItemAdd:C,onFocusableItemRemove:R,currentTabStopId:S}=b;return v.useEffect(()=>{if(l)return C(),()=>R()},[l,C,R]),h.jsx(Yd.ItemSlot,{scope:o,id:g,focusable:l,active:s,children:h.jsx(De.span,{tabIndex:p?0:-1,"data-orientation":b.orientation,...m,ref:r,onMouseDown:he(n.onMouseDown,N=>{l?b.onItemFocus(g):N.preventDefault()}),onFocus:he(n.onFocus,()=>b.onItemFocus(g)),onKeyDown:he(n.onKeyDown,N=>{if(N.key==="Tab"&&N.shiftKey){b.onItemShiftTab();return}if(N.target!==N.currentTarget)return;const j=nO(N,b.orientation,b.dir);if(j!==void 0){if(N.metaKey||N.ctrlKey||N.altKey||N.shiftKey)return;N.preventDefault();let k=w().filter(Q=>Q.focusable).map(Q=>Q.ref.current);if(j==="last")k.reverse();else if(j==="prev"||j==="next"){j==="prev"&&k.reverse();const Q=k.indexOf(N.currentTarget);k=b.loop?aO(k,Q+1):k.slice(Q+1)}setTimeout(()=>Sx(k))}}),children:typeof d=="function"?d({isCurrentTabStop:p,hasTabStop:S!=null}):d})})});wx.displayName=xx;var eO={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function tO(n,r){return r!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function nO(n,r,o){const l=tO(n.key,o);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(l))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(l)))return eO[l]}function Sx(n,r=!1){const o=document.activeElement;for(const l of n)if(l===o||(l.focus({preventScroll:r}),document.activeElement!==o))return}function aO(n,r){return n.map((o,l)=>n[(r+l)%n.length])}var rO=bx,oO=wx;function iO(n){const r=lO(n),o=v.forwardRef((l,s)=>{const{children:c,...d}=l,m=v.Children.toArray(c),y=m.find(uO);if(y){const g=y.props.children,b=m.map(p=>p===y?v.Children.count(g)>1?v.Children.only(null):v.isValidElement(g)?g.props.children:null:p);return h.jsx(r,{...d,ref:s,children:v.isValidElement(g)?v.cloneElement(g,void 0,b):null})}return h.jsx(r,{...d,ref:s,children:c})});return o.displayName=`${n}.Slot`,o}function lO(n){const r=v.forwardRef((o,l)=>{const{children:s,...c}=o;if(v.isValidElement(s)){const d=fO(s),m=cO(c,s.props);return s.type!==v.Fragment&&(m.ref=l?It(l,d):d),v.cloneElement(s,m)}return v.Children.count(s)>1?v.Children.only(null):null});return r.displayName=`${n}.SlotClone`,r}var sO=Symbol("radix.slottable");function uO(n){return v.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===sO}function cO(n,r){const o={...r};for(const l in r){const s=n[l],c=r[l];/^on[A-Z]/.test(l)?s&&c?o[l]=(...m)=>{const y=c(...m);return s(...m),y}:s&&(o[l]=s):l==="style"?o[l]={...s,...c}:l==="className"&&(o[l]=[s,c].filter(Boolean).join(" "))}return{...n,...o}}function fO(n){let r=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?n.ref:(r=Object.getOwnPropertyDescriptor(n,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}var Id=["Enter"," "],dO=["ArrowDown","PageUp","Home"],Ex=["ArrowUp","PageDown","End"],hO=[...dO,...Ex],mO={ltr:[...Id,"ArrowRight"],rtl:[...Id,"ArrowLeft"]},pO={ltr:["ArrowLeft"],rtl:["ArrowRight"]},pl="Menu",[al,gO,vO]=Rh(pl),[Hr,Cx]=nr(pl,[vO,Qo,yx]),Du=Qo(),Rx=yx(),[yO,Br]=Hr(pl),[bO,gl]=Hr(pl),Nx=n=>{const{__scopeMenu:r,open:o=!1,children:l,dir:s,onOpenChange:c,modal:d=!0}=n,m=Du(r),[y,g]=v.useState(null),b=v.useRef(!1),p=Fn(c),w=Nh(s);return v.useEffect(()=>{const C=()=>{b.current=!0,document.addEventListener("pointerdown",R,{capture:!0,once:!0}),document.addEventListener("pointermove",R,{capture:!0,once:!0})},R=()=>b.current=!1;return document.addEventListener("keydown",C,{capture:!0}),()=>{document.removeEventListener("keydown",C,{capture:!0}),document.removeEventListener("pointerdown",R,{capture:!0}),document.removeEventListener("pointermove",R,{capture:!0})}},[]),h.jsx(kh,{...m,children:h.jsx(yO,{scope:r,open:o,onOpenChange:p,content:y,onContentChange:g,children:h.jsx(bO,{scope:r,onClose:v.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:b,dir:w,modal:d,children:l})})})};Nx.displayName=pl;var xO="MenuAnchor",Bh=v.forwardRef((n,r)=>{const{__scopeMenu:o,...l}=n,s=Du(o);return h.jsx(Lh,{...s,...l,ref:r})});Bh.displayName=xO;var Ph="MenuPortal",[wO,Tx]=Hr(Ph,{forceMount:void 0}),jx=n=>{const{__scopeMenu:r,forceMount:o,children:l,container:s}=n,c=Br(Ph,r);return h.jsx(wO,{scope:r,forceMount:o,children:h.jsx(Yn,{present:o||c.open,children:h.jsx(cl,{asChild:!0,container:s,children:l})})})};jx.displayName=Ph;var yn="MenuContent",[SO,qh]=Hr(yn),Mx=v.forwardRef((n,r)=>{const o=Tx(yn,n.__scopeMenu),{forceMount:l=o.forceMount,...s}=n,c=Br(yn,n.__scopeMenu),d=gl(yn,n.__scopeMenu);return h.jsx(al.Provider,{scope:n.__scopeMenu,children:h.jsx(Yn,{present:l||c.open,children:h.jsx(al.Slot,{scope:n.__scopeMenu,children:d.modal?h.jsx(EO,{...s,ref:r}):h.jsx(CO,{...s,ref:r})})})})}),EO=v.forwardRef((n,r)=>{const o=Br(yn,n.__scopeMenu),l=v.useRef(null),s=$e(r,l);return v.useEffect(()=>{const c=l.current;if(c)return hh(c)},[]),h.jsx($h,{...n,ref:s,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:he(n.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),CO=v.forwardRef((n,r)=>{const o=Br(yn,n.__scopeMenu);return h.jsx($h,{...n,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),RO=iO("MenuContent.ScrollLock"),$h=v.forwardRef((n,r)=>{const{__scopeMenu:o,loop:l=!1,trapFocus:s,onOpenAutoFocus:c,onCloseAutoFocus:d,disableOutsidePointerEvents:m,onEntryFocus:y,onEscapeKeyDown:g,onPointerDownOutside:b,onFocusOutside:p,onInteractOutside:w,onDismiss:C,disableOutsideScroll:R,...S}=n,N=Br(yn,o),j=gl(yn,o),O=Du(o),k=Rx(o),Q=gO(o),[I,Z]=v.useState(null),B=v.useRef(null),G=$e(r,B,N.onContentChange),ue=v.useRef(0),ie=v.useRef(""),oe=v.useRef(0),fe=v.useRef(null),ge=v.useRef("right"),ae=v.useRef(0),W=R?bu:v.Fragment,T=R?{as:RO,allowPinchZoom:!0}:void 0,U=F=>{const ne=ie.current+F,M=Q().filter(Y=>!Y.disabled),A=document.activeElement,L=M.find(Y=>Y.ref.current===A)?.textValue,P=M.map(Y=>Y.textValue),K=UO(P,ne,L),re=M.find(Y=>Y.textValue===K)?.ref.current;(function Y(le){ie.current=le,window.clearTimeout(ue.current),le!==""&&(ue.current=window.setTimeout(()=>Y(""),1e3))})(ne),re&&setTimeout(()=>re.focus())};v.useEffect(()=>()=>window.clearTimeout(ue.current),[]),dh();const _=v.useCallback(F=>ge.current===fe.current?.side&&BO(F,fe.current?.area),[]);return h.jsx(SO,{scope:o,searchRef:ie,onItemEnter:v.useCallback(F=>{_(F)&&F.preventDefault()},[_]),onItemLeave:v.useCallback(F=>{_(F)||(B.current?.focus(),Z(null))},[_]),onTriggerLeave:v.useCallback(F=>{_(F)&&F.preventDefault()},[_]),pointerGraceTimerRef:oe,onPointerGraceIntentChange:v.useCallback(F=>{fe.current=F},[]),children:h.jsx(W,{...T,children:h.jsx(vu,{asChild:!0,trapped:s,onMountAutoFocus:he(c,F=>{F.preventDefault(),B.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:h.jsx(ul,{asChild:!0,disableOutsidePointerEvents:m,onEscapeKeyDown:g,onPointerDownOutside:b,onFocusOutside:p,onInteractOutside:w,onDismiss:C,children:h.jsx(rO,{asChild:!0,...k,dir:j.dir,orientation:"vertical",loop:l,currentTabStopId:I,onCurrentTabStopIdChange:Z,onEntryFocus:he(y,F=>{j.isUsingKeyboardRef.current||F.preventDefault()}),preventScrollOnEntryFocus:!0,children:h.jsx(Uh,{role:"menu","aria-orientation":"vertical","data-state":Gx(N.open),"data-radix-menu-content":"",dir:j.dir,...O,...S,ref:G,style:{outline:"none",...S.style},onKeyDown:he(S.onKeyDown,F=>{const M=F.target.closest("[data-radix-menu-content]")===F.currentTarget,A=F.ctrlKey||F.altKey||F.metaKey,L=F.key.length===1;M&&(F.key==="Tab"&&F.preventDefault(),!A&&L&&U(F.key));const P=B.current;if(F.target!==P||!hO.includes(F.key))return;F.preventDefault();const re=Q().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);Ex.includes(F.key)&&re.reverse(),kO(re)}),onBlur:he(n.onBlur,F=>{F.currentTarget.contains(F.target)||(window.clearTimeout(ue.current),ie.current="")}),onPointerMove:he(n.onPointerMove,rl(F=>{const ne=F.target,M=ae.current!==F.clientX;if(F.currentTarget.contains(ne)&&M){const A=F.clientX>ae.current?"right":"left";ge.current=A,ae.current=F.clientX}}))})})})})})})});Mx.displayName=yn;var NO="MenuGroup",Vh=v.forwardRef((n,r)=>{const{__scopeMenu:o,...l}=n;return h.jsx(De.div,{role:"group",...l,ref:r})});Vh.displayName=NO;var TO="MenuLabel",Ax=v.forwardRef((n,r)=>{const{__scopeMenu:o,...l}=n;return h.jsx(De.div,{...l,ref:r})});Ax.displayName=TO;var su="MenuItem",ob="menu.itemSelect",zu=v.forwardRef((n,r)=>{const{disabled:o=!1,onSelect:l,...s}=n,c=v.useRef(null),d=gl(su,n.__scopeMenu),m=qh(su,n.__scopeMenu),y=$e(r,c),g=v.useRef(!1),b=()=>{const p=c.current;if(!o&&p){const w=new CustomEvent(ob,{bubbles:!0,cancelable:!0});p.addEventListener(ob,C=>l?.(C),{once:!0}),Gb(p,w),w.defaultPrevented?g.current=!1:d.onClose()}};return h.jsx(Ox,{...s,ref:y,disabled:o,onClick:he(n.onClick,b),onPointerDown:p=>{n.onPointerDown?.(p),g.current=!0},onPointerUp:he(n.onPointerUp,p=>{g.current||p.currentTarget?.click()}),onKeyDown:he(n.onKeyDown,p=>{const w=m.searchRef.current!=="";o||w&&p.key===" "||Id.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});zu.displayName=su;var Ox=v.forwardRef((n,r)=>{const{__scopeMenu:o,disabled:l=!1,textValue:s,...c}=n,d=qh(su,o),m=Rx(o),y=v.useRef(null),g=$e(r,y),[b,p]=v.useState(!1),[w,C]=v.useState("");return v.useEffect(()=>{const R=y.current;R&&C((R.textContent??"").trim())},[c.children]),h.jsx(al.ItemSlot,{scope:o,disabled:l,textValue:s??w,children:h.jsx(oO,{asChild:!0,...m,focusable:!l,children:h.jsx(De.div,{role:"menuitem","data-highlighted":b?"":void 0,"aria-disabled":l||void 0,"data-disabled":l?"":void 0,...c,ref:g,onPointerMove:he(n.onPointerMove,rl(R=>{l?d.onItemLeave(R):(d.onItemEnter(R),R.defaultPrevented||R.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:he(n.onPointerLeave,rl(R=>d.onItemLeave(R))),onFocus:he(n.onFocus,()=>p(!0)),onBlur:he(n.onBlur,()=>p(!1))})})})}),jO="MenuCheckboxItem",_x=v.forwardRef((n,r)=>{const{checked:o=!1,onCheckedChange:l,...s}=n;return h.jsx(Ux,{scope:n.__scopeMenu,checked:o,children:h.jsx(zu,{role:"menuitemcheckbox","aria-checked":uu(o)?"mixed":o,...s,ref:r,"data-state":Gh(o),onSelect:he(s.onSelect,()=>l?.(uu(o)?!0:!o),{checkForDefaultPrevented:!1})})})});_x.displayName=jO;var Dx="MenuRadioGroup",[MO,AO]=Hr(Dx,{value:void 0,onValueChange:()=>{}}),zx=v.forwardRef((n,r)=>{const{value:o,onValueChange:l,...s}=n,c=Fn(l);return h.jsx(MO,{scope:n.__scopeMenu,value:o,onValueChange:c,children:h.jsx(Vh,{...s,ref:r})})});zx.displayName=Dx;var kx="MenuRadioItem",Lx=v.forwardRef((n,r)=>{const{value:o,...l}=n,s=AO(kx,n.__scopeMenu),c=o===s.value;return h.jsx(Ux,{scope:n.__scopeMenu,checked:c,children:h.jsx(zu,{role:"menuitemradio","aria-checked":c,...l,ref:r,"data-state":Gh(c),onSelect:he(l.onSelect,()=>s.onValueChange?.(o),{checkForDefaultPrevented:!1})})})});Lx.displayName=kx;var Fh="MenuItemIndicator",[Ux,OO]=Hr(Fh,{checked:!1}),Hx=v.forwardRef((n,r)=>{const{__scopeMenu:o,forceMount:l,...s}=n,c=OO(Fh,o);return h.jsx(Yn,{present:l||uu(c.checked)||c.checked===!0,children:h.jsx(De.span,{...s,ref:r,"data-state":Gh(c.checked)})})});Hx.displayName=Fh;var _O="MenuSeparator",Bx=v.forwardRef((n,r)=>{const{__scopeMenu:o,...l}=n;return h.jsx(De.div,{role:"separator","aria-orientation":"horizontal",...l,ref:r})});Bx.displayName=_O;var DO="MenuArrow",Px=v.forwardRef((n,r)=>{const{__scopeMenu:o,...l}=n,s=Du(o);return h.jsx(Hh,{...s,...l,ref:r})});Px.displayName=DO;var zO="MenuSub",[u4,qx]=Hr(zO),Xi="MenuSubTrigger",$x=v.forwardRef((n,r)=>{const o=Br(Xi,n.__scopeMenu),l=gl(Xi,n.__scopeMenu),s=qx(Xi,n.__scopeMenu),c=qh(Xi,n.__scopeMenu),d=v.useRef(null),{pointerGraceTimerRef:m,onPointerGraceIntentChange:y}=c,g={__scopeMenu:n.__scopeMenu},b=v.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return v.useEffect(()=>b,[b]),v.useEffect(()=>{const p=m.current;return()=>{window.clearTimeout(p),y(null)}},[m,y]),h.jsx(Bh,{asChild:!0,...g,children:h.jsx(Ox,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":s.contentId,"data-state":Gx(o.open),...n,ref:It(r,s.onTriggerChange),onClick:p=>{n.onClick?.(p),!(n.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:he(n.onPointerMove,rl(p=>{c.onItemEnter(p),!p.defaultPrevented&&!n.disabled&&!o.open&&!d.current&&(c.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{o.onOpenChange(!0),b()},100))})),onPointerLeave:he(n.onPointerLeave,rl(p=>{b();const w=o.content?.getBoundingClientRect();if(w){const C=o.content?.dataset.side,R=C==="right",S=R?-5:5,N=w[R?"left":"right"],j=w[R?"right":"left"];c.onPointerGraceIntentChange({area:[{x:p.clientX+S,y:p.clientY},{x:N,y:w.top},{x:j,y:w.top},{x:j,y:w.bottom},{x:N,y:w.bottom}],side:C}),window.clearTimeout(m.current),m.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(p),p.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:he(n.onKeyDown,p=>{const w=c.searchRef.current!=="";n.disabled||w&&p.key===" "||mO[l.dir].includes(p.key)&&(o.onOpenChange(!0),o.content?.focus(),p.preventDefault())})})})});$x.displayName=Xi;var Vx="MenuSubContent",Fx=v.forwardRef((n,r)=>{const o=Tx(yn,n.__scopeMenu),{forceMount:l=o.forceMount,...s}=n,c=Br(yn,n.__scopeMenu),d=gl(yn,n.__scopeMenu),m=qx(Vx,n.__scopeMenu),y=v.useRef(null),g=$e(r,y);return h.jsx(al.Provider,{scope:n.__scopeMenu,children:h.jsx(Yn,{present:l||c.open,children:h.jsx(al.Slot,{scope:n.__scopeMenu,children:h.jsx($h,{id:m.contentId,"aria-labelledby":m.triggerId,...s,ref:g,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:b=>{d.isUsingKeyboardRef.current&&y.current?.focus(),b.preventDefault()},onCloseAutoFocus:b=>b.preventDefault(),onFocusOutside:he(n.onFocusOutside,b=>{b.target!==m.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:he(n.onEscapeKeyDown,b=>{d.onClose(),b.preventDefault()}),onKeyDown:he(n.onKeyDown,b=>{const p=b.currentTarget.contains(b.target),w=pO[d.dir].includes(b.key);p&&w&&(c.onOpenChange(!1),m.trigger?.focus(),b.preventDefault())})})})})})});Fx.displayName=Vx;function Gx(n){return n?"open":"closed"}function uu(n){return n==="indeterminate"}function Gh(n){return uu(n)?"indeterminate":n?"checked":"unchecked"}function kO(n){const r=document.activeElement;for(const o of n)if(o===r||(o.focus(),document.activeElement!==r))return}function LO(n,r){return n.map((o,l)=>n[(r+l)%n.length])}function UO(n,r,o){const s=r.length>1&&Array.from(r).every(g=>g===r[0])?r[0]:r,c=o?n.indexOf(o):-1;let d=LO(n,Math.max(c,0));s.length===1&&(d=d.filter(g=>g!==o));const y=d.find(g=>g.toLowerCase().startsWith(s.toLowerCase()));return y!==o?y:void 0}function HO(n,r){const{x:o,y:l}=n;let s=!1;for(let c=0,d=r.length-1;c<r.length;d=c++){const m=r[c],y=r[d],g=m.x,b=m.y,p=y.x,w=y.y;b>l!=w>l&&o<(p-g)*(l-b)/(w-b)+g&&(s=!s)}return s}function BO(n,r){if(!r)return!1;const o={x:n.clientX,y:n.clientY};return HO(o,r)}function rl(n){return r=>r.pointerType==="mouse"?n(r):void 0}var PO=Nx,qO=Bh,$O=jx,VO=Mx,FO=Vh,GO=Ax,YO=zu,IO=_x,QO=zx,KO=Lx,XO=Hx,ZO=Bx,JO=Px,WO=$x,e_=Fx,ku="DropdownMenu",[t_]=nr(ku,[Cx]),zt=Cx(),[n_,Yx]=t_(ku),Ix=n=>{const{__scopeDropdownMenu:r,children:o,dir:l,open:s,defaultOpen:c,onOpenChange:d,modal:m=!0}=n,y=zt(r),g=v.useRef(null),[b,p]=Lo({prop:s,defaultProp:c??!1,onChange:d,caller:ku});return h.jsx(n_,{scope:r,triggerId:_t(),triggerRef:g,contentId:_t(),open:b,onOpenChange:p,onOpenToggle:v.useCallback(()=>p(w=>!w),[p]),modal:m,children:h.jsx(PO,{...y,open:b,onOpenChange:p,dir:l,modal:m,children:o})})};Ix.displayName=ku;var Qx="DropdownMenuTrigger",Kx=v.forwardRef((n,r)=>{const{__scopeDropdownMenu:o,disabled:l=!1,...s}=n,c=Yx(Qx,o),d=zt(o);return h.jsx(qO,{asChild:!0,...d,children:h.jsx(De.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":l?"":void 0,disabled:l,...s,ref:It(r,c.triggerRef),onPointerDown:he(n.onPointerDown,m=>{!l&&m.button===0&&m.ctrlKey===!1&&(c.onOpenToggle(),c.open||m.preventDefault())}),onKeyDown:he(n.onKeyDown,m=>{l||(["Enter"," "].includes(m.key)&&c.onOpenToggle(),m.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(m.key)&&m.preventDefault())})})})});Kx.displayName=Qx;var a_="DropdownMenuPortal",Xx=n=>{const{__scopeDropdownMenu:r,...o}=n,l=zt(r);return h.jsx($O,{...l,...o})};Xx.displayName=a_;var Zx="DropdownMenuContent",Jx=v.forwardRef((n,r)=>{const{__scopeDropdownMenu:o,...l}=n,s=Yx(Zx,o),c=zt(o),d=v.useRef(!1);return h.jsx(VO,{id:s.contentId,"aria-labelledby":s.triggerId,...c,...l,ref:r,onCloseAutoFocus:he(n.onCloseAutoFocus,m=>{d.current||s.triggerRef.current?.focus(),d.current=!1,m.preventDefault()}),onInteractOutside:he(n.onInteractOutside,m=>{const y=m.detail.originalEvent,g=y.button===0&&y.ctrlKey===!0,b=y.button===2||g;(!s.modal||b)&&(d.current=!0)}),style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Jx.displayName=Zx;var r_="DropdownMenuGroup",o_=v.forwardRef((n,r)=>{const{__scopeDropdownMenu:o,...l}=n,s=zt(o);return h.jsx(FO,{...s,...l,ref:r})});o_.displayName=r_;var i_="DropdownMenuLabel",l_=v.forwardRef((n,r)=>{const{__scopeDropdownMenu:o,...l}=n,s=zt(o);return h.jsx(GO,{...s,...l,ref:r})});l_.displayName=i_;var s_="DropdownMenuItem",Wx=v.forwardRef((n,r)=>{const{__scopeDropdownMenu:o,...l}=n,s=zt(o);return h.jsx(YO,{...s,...l,ref:r})});Wx.displayName=s_;var u_="DropdownMenuCheckboxItem",c_=v.forwardRef((n,r)=>{const{__scopeDropdownMenu:o,...l}=n,s=zt(o);return h.jsx(IO,{...s,...l,ref:r})});c_.displayName=u_;var f_="DropdownMenuRadioGroup",d_=v.forwardRef((n,r)=>{const{__scopeDropdownMenu:o,...l}=n,s=zt(o);return h.jsx(QO,{...s,...l,ref:r})});d_.displayName=f_;var h_="DropdownMenuRadioItem",m_=v.forwardRef((n,r)=>{const{__scopeDropdownMenu:o,...l}=n,s=zt(o);return h.jsx(KO,{...s,...l,ref:r})});m_.displayName=h_;var p_="DropdownMenuItemIndicator",g_=v.forwardRef((n,r)=>{const{__scopeDropdownMenu:o,...l}=n,s=zt(o);return h.jsx(XO,{...s,...l,ref:r})});g_.displayName=p_;var v_="DropdownMenuSeparator",ew=v.forwardRef((n,r)=>{const{__scopeDropdownMenu:o,...l}=n,s=zt(o);return h.jsx(ZO,{...s,...l,ref:r})});ew.displayName=v_;var y_="DropdownMenuArrow",b_=v.forwardRef((n,r)=>{const{__scopeDropdownMenu:o,...l}=n,s=zt(o);return h.jsx(JO,{...s,...l,ref:r})});b_.displayName=y_;var x_="DropdownMenuSubTrigger",w_=v.forwardRef((n,r)=>{const{__scopeDropdownMenu:o,...l}=n,s=zt(o);return h.jsx(WO,{...s,...l,ref:r})});w_.displayName=x_;var S_="DropdownMenuSubContent",E_=v.forwardRef((n,r)=>{const{__scopeDropdownMenu:o,...l}=n,s=zt(o);return h.jsx(e_,{...s,...l,ref:r,style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});E_.displayName=S_;var C_=Ix,R_=Kx,N_=Xx,T_=Jx,Rd=Wx,j_=ew;async function Ko(n){try{return(await n.json()).error?.message??n.statusText}catch{return n.statusText}}async function M_(){const n=await fetch("/api/profiles");if(!n.ok)throw new Error(await Ko(n));return await n.json()}async function A_(){const n=await fetch("/api/profiles/active");if(!n.ok)throw new Error(await Ko(n));return await n.json()}function tw(){return St({queryKey:["profiles"],queryFn:M_})}function O_(){return St({queryKey:["active-profile"],queryFn:A_})}function nw(n){n.invalidateQueries({queryKey:["profiles"]}),n.invalidateQueries({queryKey:["active-profile"]}),n.invalidateQueries({queryKey:["continue-watching"]}),n.invalidateQueries({queryKey:["favorites"]}),n.invalidateQueries({queryKey:["favorite-status"]}),n.invalidateQueries({queryKey:["progress"]}),n.invalidateQueries({queryKey:["episode-progress"]})}function __(){const n=Dt();return wn({mutationFn:async r=>{const o=await fetch("/api/profiles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok)throw new Error(await Ko(o));return await o.json()},onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]})}})}function D_(){const n=Dt();return wn({mutationFn:async r=>{const{id:o,...l}=r,s=await fetch(`/api/profiles/${o}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(!s.ok)throw new Error(await Ko(s));return await s.json()},onSuccess:()=>{n.invalidateQueries({queryKey:["profiles"]}),n.invalidateQueries({queryKey:["active-profile"]})}})}function z_(){const n=Dt();return wn({mutationFn:async r=>{const o=await fetch(`/api/profiles/${r}`,{method:"DELETE"});if(!o.ok)throw new Error(await Ko(o))},onSuccess:()=>{nw(n)}})}function k_(){const n=Dt();return wn({mutationFn:async r=>{const o=await fetch(`/api/profiles/${r}/activate`,{method:"POST"});if(!o.ok)throw new Error(await Ko(o));return await o.json()},onSuccess:()=>{nw(n)}})}function L_(){const{data:n}=O_(),{data:r}=tw(),o=k_();return n?h.jsxs(C_,{children:[h.jsx(R_,{asChild:!0,children:h.jsx("button",{"aria-label":`Switch profile, current: ${n.name}`,className:"flex size-9 items-center justify-center rounded-full bg-muted text-lg transition-transform hover:scale-105 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary",type:"button",children:h.jsx("span",{"aria-hidden":!0,children:n.emoji})})}),h.jsx(N_,{children:h.jsxs(T_,{align:"end",className:"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",sideOffset:8,children:[r?.map(l=>{const s=l.id===n.id;return h.jsxs(Rd,{className:Fe("flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground",s&&"font-medium"),onSelect:c=>{s||(c.preventDefault(),o.mutate(l.id,{onError:d=>{Ze.error(d instanceof Error?d.message:"Failed to switch profile")}}))},children:[h.jsx("span",{"aria-hidden":!0,className:"text-base",children:l.emoji}),h.jsx("span",{className:"flex-1 truncate",children:l.name}),s?h.jsx(M0,{className:"size-4 text-muted-foreground"}):null]},l.id)}),h.jsx(j_,{className:"my-1 h-px bg-border"}),h.jsx(Rd,{asChild:!0,children:h.jsxs(xn,{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground",to:"/settings/profiles",children:[h.jsx(ij,{className:"size-4"}),"Manage profiles"]})}),h.jsx(Rd,{asChild:!0,children:h.jsxs(xn,{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground",to:"/settings",children:[h.jsx(tj,{className:"size-4"}),"Settings"]})})]})})]}):null}var Qs={exports:{}},U_=Qs.exports,ib;function H_(){return ib||(ib=1,(function(n,r){(function(o,l){n.exports=l()})(U_,(function(){var o=1e3,l=6e4,s=36e5,c="millisecond",d="second",m="minute",y="hour",g="day",b="week",p="month",w="quarter",C="year",R="date",S="Invalid Date",N=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,j=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,O={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(ae){var W=["th","st","nd","rd"],T=ae%100;return"["+ae+(W[(T-20)%10]||W[T]||W[0])+"]"}},k=function(ae,W,T){var U=String(ae);return!U||U.length>=W?ae:""+Array(W+1-U.length).join(T)+ae},Q={s:k,z:function(ae){var W=-ae.utcOffset(),T=Math.abs(W),U=Math.floor(T/60),_=T%60;return(W<=0?"+":"-")+k(U,2,"0")+":"+k(_,2,"0")},m:function ae(W,T){if(W.date()<T.date())return-ae(T,W);var U=12*(T.year()-W.year())+(T.month()-W.month()),_=W.clone().add(U,p),F=T-_<0,ne=W.clone().add(U+(F?-1:1),p);return+(-(U+(T-_)/(F?_-ne:ne-_))||0)},a:function(ae){return ae<0?Math.ceil(ae)||0:Math.floor(ae)},p:function(ae){return{M:p,y:C,w:b,d:g,D:R,h:y,m,s:d,ms:c,Q:w}[ae]||String(ae||"").toLowerCase().replace(/s$/,"")},u:function(ae){return ae===void 0}},I="en",Z={};Z[I]=O;var B="$isDayjsObject",G=function(ae){return ae instanceof fe||!(!ae||!ae[B])},ue=function ae(W,T,U){var _;if(!W)return I;if(typeof W=="string"){var F=W.toLowerCase();Z[F]&&(_=F),T&&(Z[F]=T,_=F);var ne=W.split("-");if(!_&&ne.length>1)return ae(ne[0])}else{var M=W.name;Z[M]=W,_=M}return!U&&_&&(I=_),_||!U&&I},ie=function(ae,W){if(G(ae))return ae.clone();var T=typeof W=="object"?W:{};return T.date=ae,T.args=arguments,new fe(T)},oe=Q;oe.l=ue,oe.i=G,oe.w=function(ae,W){return ie(ae,{locale:W.$L,utc:W.$u,x:W.$x,$offset:W.$offset})};var fe=(function(){function ae(T){this.$L=ue(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[B]=!0}var W=ae.prototype;return W.parse=function(T){this.$d=(function(U){var _=U.date,F=U.utc;if(_===null)return new Date(NaN);if(oe.u(_))return new Date;if(_ instanceof Date)return new Date(_);if(typeof _=="string"&&!/Z$/i.test(_)){var ne=_.match(N);if(ne){var M=ne[2]-1||0,A=(ne[7]||"0").substring(0,3);return F?new Date(Date.UTC(ne[1],M,ne[3]||1,ne[4]||0,ne[5]||0,ne[6]||0,A)):new Date(ne[1],M,ne[3]||1,ne[4]||0,ne[5]||0,ne[6]||0,A)}}return new Date(_)})(T),this.init()},W.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},W.$utils=function(){return oe},W.isValid=function(){return this.$d.toString()!==S},W.isSame=function(T,U){var _=ie(T);return this.startOf(U)<=_&&_<=this.endOf(U)},W.isAfter=function(T,U){return ie(T)<this.startOf(U)},W.isBefore=function(T,U){return this.endOf(U)<ie(T)},W.$g=function(T,U,_){return oe.u(T)?this[U]:this.set(_,T)},W.unix=function(){return Math.floor(this.valueOf()/1e3)},W.valueOf=function(){return this.$d.getTime()},W.startOf=function(T,U){var _=this,F=!!oe.u(U)||U,ne=oe.p(T),M=function(ce,ve){var we=oe.w(_.$u?Date.UTC(_.$y,ve,ce):new Date(_.$y,ve,ce),_);return F?we:we.endOf(g)},A=function(ce,ve){return oe.w(_.toDate()[ce].apply(_.toDate("s"),(F?[0,0,0,0]:[23,59,59,999]).slice(ve)),_)},L=this.$W,P=this.$M,K=this.$D,re="set"+(this.$u?"UTC":"");switch(ne){case C:return F?M(1,0):M(31,11);case p:return F?M(1,P):M(0,P+1);case b:var Y=this.$locale().weekStart||0,le=(L<Y?L+7:L)-Y;return M(F?K-le:K+(6-le),P);case g:case R:return A(re+"Hours",0);case y:return A(re+"Minutes",1);case m:return A(re+"Seconds",2);case d:return A(re+"Milliseconds",3);default:return this.clone()}},W.endOf=function(T){return this.startOf(T,!1)},W.$set=function(T,U){var _,F=oe.p(T),ne="set"+(this.$u?"UTC":""),M=(_={},_[g]=ne+"Date",_[R]=ne+"Date",_[p]=ne+"Month",_[C]=ne+"FullYear",_[y]=ne+"Hours",_[m]=ne+"Minutes",_[d]=ne+"Seconds",_[c]=ne+"Milliseconds",_)[F],A=F===g?this.$D+(U-this.$W):U;if(F===p||F===C){var L=this.clone().set(R,1);L.$d[M](A),L.init(),this.$d=L.set(R,Math.min(this.$D,L.daysInMonth())).$d}else M&&this.$d[M](A);return this.init(),this},W.set=function(T,U){return this.clone().$set(T,U)},W.get=function(T){return this[oe.p(T)]()},W.add=function(T,U){var _,F=this;T=Number(T);var ne=oe.p(U),M=function(P){var K=ie(F);return oe.w(K.date(K.date()+Math.round(P*T)),F)};if(ne===p)return this.set(p,this.$M+T);if(ne===C)return this.set(C,this.$y+T);if(ne===g)return M(1);if(ne===b)return M(7);var A=(_={},_[m]=l,_[y]=s,_[d]=o,_)[ne]||1,L=this.$d.getTime()+T*A;return oe.w(L,this)},W.subtract=function(T,U){return this.add(-1*T,U)},W.format=function(T){var U=this,_=this.$locale();if(!this.isValid())return _.invalidDate||S;var F=T||"YYYY-MM-DDTHH:mm:ssZ",ne=oe.z(this),M=this.$H,A=this.$m,L=this.$M,P=_.weekdays,K=_.months,re=_.meridiem,Y=function(ve,we,Ce,et){return ve&&(ve[we]||ve(U,F))||Ce[we].slice(0,et)},le=function(ve){return oe.s(M%12||12,ve,"0")},ce=re||function(ve,we,Ce){var et=ve<12?"AM":"PM";return Ce?et.toLowerCase():et};return F.replace(j,(function(ve,we){return we||(function(Ce){switch(Ce){case"YY":return String(U.$y).slice(-2);case"YYYY":return oe.s(U.$y,4,"0");case"M":return L+1;case"MM":return oe.s(L+1,2,"0");case"MMM":return Y(_.monthsShort,L,K,3);case"MMMM":return Y(K,L);case"D":return U.$D;case"DD":return oe.s(U.$D,2,"0");case"d":return String(U.$W);case"dd":return Y(_.weekdaysMin,U.$W,P,2);case"ddd":return Y(_.weekdaysShort,U.$W,P,3);case"dddd":return P[U.$W];case"H":return String(M);case"HH":return oe.s(M,2,"0");case"h":return le(1);case"hh":return le(2);case"a":return ce(M,A,!0);case"A":return ce(M,A,!1);case"m":return String(A);case"mm":return oe.s(A,2,"0");case"s":return String(U.$s);case"ss":return oe.s(U.$s,2,"0");case"SSS":return oe.s(U.$ms,3,"0");case"Z":return ne}return null})(ve)||ne.replace(":","")}))},W.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},W.diff=function(T,U,_){var F,ne=this,M=oe.p(U),A=ie(T),L=(A.utcOffset()-this.utcOffset())*l,P=this-A,K=function(){return oe.m(ne,A)};switch(M){case C:F=K()/12;break;case p:F=K();break;case w:F=K()/3;break;case b:F=(P-L)/6048e5;break;case g:F=(P-L)/864e5;break;case y:F=P/s;break;case m:F=P/l;break;case d:F=P/o;break;default:F=P}return _?F:oe.a(F)},W.daysInMonth=function(){return this.endOf(p).$D},W.$locale=function(){return Z[this.$L]},W.locale=function(T,U){if(!T)return this.$L;var _=this.clone(),F=ue(T,U,!0);return F&&(_.$L=F),_},W.clone=function(){return oe.w(this.$d,this)},W.toDate=function(){return new Date(this.valueOf())},W.toJSON=function(){return this.isValid()?this.toISOString():null},W.toISOString=function(){return this.$d.toISOString()},W.toString=function(){return this.$d.toUTCString()},ae})(),ge=fe.prototype;return ie.prototype=ge,[["$ms",c],["$s",d],["$m",m],["$H",y],["$W",g],["$M",p],["$y",C],["$D",R]].forEach((function(ae){ge[ae[1]]=function(W){return this.$g(W,ae[0],ae[1])}})),ie.extend=function(ae,W){return ae.$i||(ae(W,fe,ie),ae.$i=!0),ie},ie.locale=ue,ie.isDayjs=G,ie.unix=function(ae){return ie(1e3*ae)},ie.en=Z[I],ie.Ls=Z,ie.p={},ie}))})(Qs)),Qs.exports}var B_=H_();const kr=hu(B_);var Ks={exports:{}},P_=Ks.exports,lb;function q_(){return lb||(lb=1,(function(n,r){(function(o,l){n.exports=l()})(P_,(function(){return function(o,l,s){o=o||{};var c=l.prototype,d={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function m(g,b,p,w){return c.fromToBase(g,b,p,w)}s.en.relativeTime=d,c.fromToBase=function(g,b,p,w,C){for(var R,S,N,j=p.$locale().relativeTime||d,O=o.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],k=O.length,Q=0;Q<k;Q+=1){var I=O[Q];I.d&&(R=w?s(g).diff(p,I.d,!0):p.diff(g,I.d,!0));var Z=(o.rounding||Math.round)(Math.abs(R));if(N=R>0,Z<=I.r||!I.r){Z<=1&&Q>0&&(I=O[Q-1]);var B=j[I.l];C&&(Z=C(""+Z)),S=typeof B=="string"?B.replace("%d",Z):B(Z,b,I.l,N);break}}if(b)return S;var G=N?j.future:j.past;return typeof G=="function"?G(S):G.replace("%s",S)},c.to=function(g,b){return m(g,b,this,!0)},c.from=function(g,b){return m(g,b,this)};var y=function(g){return g.$u?s.utc():s()};c.toNow=function(g){return this.to(y(this),g)},c.fromNow=function(g){return this.from(y(this),g)}}}))})(Ks)),Ks.exports}var $_=q_();const Yh=hu($_);var Nd,Lu="HoverCard",[aw]=nr(Lu,[Qo]),Uu=Qo(),[V_,Hu]=aw(Lu),rw=n=>{const{__scopeHoverCard:r,children:o,open:l,defaultOpen:s,onOpenChange:c,openDelay:d=700,closeDelay:m=300}=n,y=Uu(r),g=v.useRef(0),b=v.useRef(0),p=v.useRef(!1),w=v.useRef(!1),[C,R]=Lo({prop:l,defaultProp:s??!1,onChange:c,caller:Lu}),S=v.useCallback(()=>{clearTimeout(b.current),g.current=window.setTimeout(()=>R(!0),d)},[d,R]),N=v.useCallback(()=>{clearTimeout(g.current),!p.current&&!w.current&&(b.current=window.setTimeout(()=>R(!1),m))},[m,R]),j=v.useCallback(()=>R(!1),[R]);return v.useEffect(()=>()=>{clearTimeout(g.current),clearTimeout(b.current)},[]),h.jsx(V_,{scope:r,open:C,onOpenChange:R,onOpen:S,onClose:N,onDismiss:j,hasSelectionRef:p,isPointerDownOnContentRef:w,children:h.jsx(kh,{...y,children:o})})};rw.displayName=Lu;var ow="HoverCardTrigger",iw=v.forwardRef((n,r)=>{const{__scopeHoverCard:o,...l}=n,s=Hu(ow,o),c=Uu(o);return h.jsx(Lh,{asChild:!0,...c,children:h.jsx(De.a,{"data-state":s.open?"open":"closed",...l,ref:r,onPointerEnter:he(n.onPointerEnter,fu(s.onOpen)),onPointerLeave:he(n.onPointerLeave,fu(s.onClose)),onFocus:he(n.onFocus,s.onOpen),onBlur:he(n.onBlur,s.onClose),onTouchStart:he(n.onTouchStart,d=>d.preventDefault())})})});iw.displayName=ow;var Ih="HoverCardPortal",[F_,G_]=aw(Ih,{forceMount:void 0}),lw=n=>{const{__scopeHoverCard:r,forceMount:o,children:l,container:s}=n,c=Hu(Ih,r);return h.jsx(F_,{scope:r,forceMount:o,children:h.jsx(Yn,{present:o||c.open,children:h.jsx(cl,{asChild:!0,container:s,children:l})})})};lw.displayName=Ih;var cu="HoverCardContent",sw=v.forwardRef((n,r)=>{const o=G_(cu,n.__scopeHoverCard),{forceMount:l=o.forceMount,...s}=n,c=Hu(cu,n.__scopeHoverCard);return h.jsx(Yn,{present:l||c.open,children:h.jsx(Y_,{"data-state":c.open?"open":"closed",...s,onPointerEnter:he(n.onPointerEnter,fu(c.onOpen)),onPointerLeave:he(n.onPointerLeave,fu(c.onClose)),ref:r})})});sw.displayName=cu;var Y_=v.forwardRef((n,r)=>{const{__scopeHoverCard:o,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:d,...m}=n,y=Hu(cu,o),g=Uu(o),b=v.useRef(null),p=$e(r,b),[w,C]=v.useState(!1);return v.useEffect(()=>{if(w){const R=document.body;return Nd=R.style.userSelect||R.style.webkitUserSelect,R.style.userSelect="none",R.style.webkitUserSelect="none",()=>{R.style.userSelect=Nd,R.style.webkitUserSelect=Nd}}},[w]),v.useEffect(()=>{if(b.current){const R=()=>{C(!1),y.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(y.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",R),()=>{document.removeEventListener("pointerup",R),y.hasSelectionRef.current=!1,y.isPointerDownOnContentRef.current=!1}}},[y.isPointerDownOnContentRef,y.hasSelectionRef]),v.useEffect(()=>{b.current&&K_(b.current).forEach(S=>S.setAttribute("tabindex","-1"))}),h.jsx(ul,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside:he(c,R=>{R.preventDefault()}),onDismiss:y.onDismiss,children:h.jsx(Uh,{...g,...m,onPointerDown:he(m.onPointerDown,R=>{R.currentTarget.contains(R.target)&&C(!0),y.hasSelectionRef.current=!1,y.isPointerDownOnContentRef.current=!0}),ref:p,style:{...m.style,userSelect:w?"text":void 0,WebkitUserSelect:w?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),I_="HoverCardArrow",Q_=v.forwardRef((n,r)=>{const{__scopeHoverCard:o,...l}=n,s=Uu(o);return h.jsx(Hh,{...s,...l,ref:r})});Q_.displayName=I_;function fu(n){return r=>r.pointerType==="touch"?void 0:n()}function K_(n){const r=[],o=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:l=>l.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;o.nextNode();)r.push(o.currentNode);return r}var X_=rw,Z_=iw,J_=lw,W_=sw;function eD({...n}){return h.jsx(X_,{"data-slot":"hover-card",...n})}function tD({...n}){return h.jsx(Z_,{"data-slot":"hover-card-trigger",...n})}function nD({className:n,align:r="center",sideOffset:o=4,...l}){return h.jsx(J_,{"data-slot":"hover-card-portal",children:h.jsx(W_,{"data-slot":"hover-card-content",align:r,sideOffset:o,className:Fe("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 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",n),...l})})}async function uw(n){try{return(await n.json()).error?.message??n.statusText}catch{return n.statusText}}async function aD(n){const r=await fetch(n);if(!r.ok)throw new Error(await uw(r));return await r.json()}const Qh=["scan","status"];function cw(){return St({queryKey:Qh,queryFn:()=>aD("/api/scan/status")})}function rD(){const n=Dt();return wn({mutationFn:async()=>{const r=await fetch("/api/scan/start",{method:"POST"});if(!r.ok)throw new Error(await uw(r));return await r.json()},onSuccess:()=>{n.invalidateQueries({queryKey:Qh})}})}function oD(){const n=Dt();v.useEffect(()=>{const r=new EventSource("/api/scan/stream");function o(){n.invalidateQueries({queryKey:Qh})}function l(){n.invalidateQueries({queryKey:["search"]})}const s=["library-start","file-scanned","library-complete","library-error","scan-complete"];for(const c of s)r.addEventListener(c,o);return r.addEventListener("scan-complete",l),()=>{for(const c of s)r.removeEventListener(c,o);r.removeEventListener("scan-complete",l),r.close()}},[n])}kr.extend(Yh);function fw(n){return kr(n).fromNow()}function iD({job:n}){const r=n.total>0?`Scanning ${n.added+n.updated}/${n.total}`:"Scanning…";return h.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[h.jsx(Tu,{className:"size-4 animate-spin","aria-hidden":"true"}),h.jsx("span",{className:"hidden text-xs sm:inline",children:r})]})}function lD({job:n}){if(!n)return h.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[h.jsx(JT,{className:"size-4","aria-hidden":"true"}),h.jsx("span",{className:"hidden text-xs sm:inline",children:"No scans yet"})]});const r=n.endedAt??n.startedAt;return h.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[h.jsx(LT,{className:"size-4","aria-hidden":"true"}),h.jsxs("span",{className:"hidden text-xs sm:inline",children:["Scanned ",fw(r)]})]})}function sD(){return h.jsxs("span",{className:"inline-flex items-center gap-1.5 text-destructive",children:[h.jsx(rj,{className:"size-4","aria-hidden":"true"}),h.jsx("span",{className:"hidden text-xs sm:inline",children:"Last scan failed"})]})}function uD(){oD();const{data:n,isLoading:r}=cw();if(r)return null;const o=n??{currentJob:null,isRunning:!1,lastJob:null},l=(()=>{if(o.isRunning&&o.currentJob){const c=o.currentJob,d=c.added+c.updated;return h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"text-sm font-medium",children:"Scanning"}),h.jsx("p",{className:"text-xs text-muted-foreground",children:c.total>0?`${d} of ${c.total} files processed`:"Discovering files…"}),h.jsx("p",{className:"mt-2 text-xs",children:"Click for live progress."})]})}if(o.lastJob?.status==="error")return h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"text-sm font-medium text-destructive",children:"Last scan failed"}),h.jsx("p",{className:"text-xs text-muted-foreground",children:o.lastJob.errorMessage??"Unknown error."}),h.jsx("p",{className:"mt-2 text-xs",children:"Click to retry."})]});if(o.lastJob){const c=o.lastJob.endedAt??o.lastJob.startedAt;return h.jsxs(h.Fragment,{children:[h.jsxs("p",{className:"text-sm font-medium",children:["Scanned ",fw(c)]}),h.jsxs("p",{className:"text-xs text-muted-foreground",children:[o.lastJob.added," new, ",o.lastJob.updated," updated,"," ",o.lastJob.total," total"]}),h.jsx("p",{className:"mt-2 text-xs",children:"Click to run a scan."})]})}return h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"text-sm font-medium",children:"No scans yet"}),h.jsx("p",{className:"text-xs text-muted-foreground",children:"Run your first scan to see your library."})]})})(),s=o.isRunning&&o.currentJob?h.jsx(iD,{job:o.currentJob}):o.lastJob?.status==="error"?h.jsx(sD,{}):h.jsx(lD,{job:o.lastJob});return h.jsxs(eD,{children:[h.jsx(tD,{asChild:!0,children:h.jsx(xn,{to:"/scan",className:Fe("inline-flex h-11 items-center gap-1 rounded-md px-2 text-sm transition-colors hover:text-foreground",o.isRunning||o.lastJob?.status==="error"?"text-foreground":"text-muted-foreground"),"aria-label":"Scan status",children:s})}),h.jsx(nD,{align:"end",className:"w-64",children:l})]})}function rn(){const[n,r]=v.useState(0),o=oM();v.useEffect(function(){function c(){r(window.scrollY)}return c(),window.addEventListener("scroll",c),()=>{window.removeEventListener("scroll",c)}},[]);const l=n>=16;return h.jsx("header",{className:Fe("sticky top-0 z-10 w-full transition-all duration-300",l?"bg-background/80 backdrop-blur-md shadow-sm":"bg-transparent"),children:h.jsxs("nav",{className:"flex items-center gap-3 px-4 py-2 sm:gap-6 sm:px-6 sm:py-4",children:[h.jsxs(xn,{className:"flex min-h-11 items-center gap-2 text-lg font-bold tracking-tight text-primary sm:text-xl",tabIndex:-1,to:"/",children:[h.jsx("img",{alt:"",className:"size-7",src:"/images/jukebox-icon-28.png"}),h.jsx("span",{className:"hidden xs:inline sm:inline",children:"Jukebox"})]}),h.jsxs("div",{className:"flex items-center gap-0.5 text-sm sm:gap-1",children:[h.jsx(Ws,{className:({isActive:s})=>Fe("flex min-h-11 items-center rounded-md px-3 transition-colors",s?"text-foreground":"text-muted-foreground hover:text-foreground"),to:"/movies",children:"Movies"}),h.jsxs(Ws,{className:({isActive:s})=>Fe("flex min-h-11 items-center rounded-md px-3 transition-colors",s?"text-foreground":"text-muted-foreground hover:text-foreground"),to:"/shows",children:[h.jsx("span",{className:"hidden sm:inline",children:"TV Shows"}),h.jsx("span",{className:"sm:hidden",children:"Shows"})]})]}),h.jsxs("div",{className:"ml-auto flex items-center gap-1 sm:gap-2",children:[h.jsxs("button",{"aria-label":"Search (press / to focus)",className:"inline-flex h-11 items-center gap-2 rounded-md px-2 text-sm text-muted-foreground transition-colors hover:text-foreground",onClick:()=>o.open(),type:"button",children:[h.jsx(_0,{"aria-hidden":!0,className:"size-4"}),h.jsx("kbd",{className:"hidden rounded border border-border bg-muted/40 px-1.5 py-0.5 font-mono text-xs text-muted-foreground sm:inline",children:"/"})]}),h.jsx(uD,{}),h.jsx(L_,{})]})]})})}function Yt(){const n=Array.from({length:8},(r,o)=>o);return h.jsxs("div",{className:"px-6 py-4",children:[h.jsx("div",{className:"h-5 w-32 bg-muted rounded animate-pulse mb-3"}),h.jsx("div",{className:"flex gap-2 overflow-hidden",children:n.map(r=>h.jsxs("div",{className:"flex-shrink-0 w-32 md:w-40",children:[h.jsx("div",{className:"w-full aspect-[2/3] bg-muted rounded-sm animate-pulse"}),h.jsx("div",{className:"h-3 w-3/4 bg-muted rounded animate-pulse mt-1.5"})]},r))})]})}function cD({items:n}){return n.length===0?null:h.jsxs("section",{className:"px-6 py-4",children:[h.jsx("h2",{className:"text-lg font-semibold text-foreground mb-3",children:"Up Next"}),h.jsx("div",{className:"flex gap-2 overflow-x-auto scroll-smooth pb-2 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",children:n.map(r=>{const o=`Next: S${r.episode.seasonNumber} E${r.episode.episodeNumber} — ${r.episode.title}`;return h.jsxs(xn,{className:"flex-shrink-0 w-32 md:w-40 group",to:`/watch/episode/${r.episode.id}`,children:[h.jsx("div",{className:"relative w-full overflow-hidden rounded-sm",children:h.jsx(dl,{alt:r.show.title,className:"w-full transition-transform duration-200 group-hover:scale-105",url:r.show.posterUrl,title:r.show.title})}),h.jsx("p",{className:"text-xs text-muted-foreground truncate mt-1.5 px-0.5",children:r.show.title}),h.jsx("p",{className:"text-xs text-muted-foreground/70 truncate px-0.5",children:o})]},`up-next-${r.show.id}-${r.episode.id}`)})})]})}async function fD(){const n=await fetch("/api/progress/continue-watching");if(!n.ok)throw new Error("Failed to fetch continue watching");return await n.json()}function dD(){return St({queryKey:["continue-watching"],queryFn:fD})}async function hD(){const n=await fetch("/api/library/movies");if(!n.ok)throw new Error("Failed to fetch movies");return await n.json()}function dw(){return St({queryKey:["movies"],queryFn:hD})}async function mD(){const n=await fetch("/api/library/shows");if(!n.ok)throw new Error("Failed to fetch shows");return await n.json()}function hw(){return St({queryKey:["shows"],queryFn:mD})}async function pD(){const n=await fetch("/api/library/up-next");if(!n.ok)throw new Error("Failed to fetch Up Next");return await n.json()}function gD(){return St({queryKey:["up-next"],queryFn:pD})}function Kh(n,r,o=2){const l=new Map;for(const c of n){const d=vD(c);for(const m of d){const y=l.get(m)??[];y.push(c),l.set(m,y)}}const s=Array.from(l.entries()).filter(([,c])=>c.length>=o).sort((c,d)=>d[1].length-c[1].length).map(([c,d])=>({genre:c,items:d}));return r?s.slice(0,r):s}function vD(n){const r=n.item.genres;return yD(r)}function yD(n){if(!n)return[];try{const r=JSON.parse(n);return Array.isArray(r)?r.filter(o=>typeof o=="string"):[]}catch{return[]}}function bD(n,r){return[...n.map(l=>({type:"movie",item:l})),...r.map(l=>({type:"show",item:l}))]}const xD=6,wD=20;function SD(){const{data:n,isLoading:r}=dw(),{data:o,isLoading:l}=hw(),{data:s,isLoading:c}=dD(),{data:d,isLoading:m}=gD(),y=r||l||c||m,g=v.useMemo(()=>bD(n??[],o??[]),[n,o]),b=v.useMemo(()=>g.length===0?[]:Kh(g,xD),[g]),p=v.useMemo(()=>g.length===0?[]:[...g].sort((w,C)=>new Date(C.item.createdAt).getTime()-new Date(w.item.createdAt).getTime()).slice(0,wD),[g]);return y?h.jsxs(h.Fragment,{children:[h.jsx(rn,{}),h.jsxs("div",{className:"pt-4",children:[h.jsx(Yt,{}),h.jsx(Yt,{}),h.jsx(Yt,{}),h.jsx(Yt,{})]})]}):g.length===0?h.jsxs(h.Fragment,{children:[h.jsx(rn,{}),h.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[60vh] gap-4 text-center px-6",children:[h.jsx(Nu,{className:"size-16 text-muted-foreground"}),h.jsx("h2",{className:"text-xl font-semibold text-foreground",children:"No media in your library"}),h.jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:"Your libraries are configured but no media was found. Check that your library paths are correct, or run a scan."}),h.jsx(Ie,{asChild:!0,variant:"outline",children:h.jsx(xn,{to:"/setup",children:"Go to Setup"})})]})]}):h.jsxs(h.Fragment,{children:[h.jsx(rn,{}),h.jsxs("div",{className:"pt-2 pb-8",children:[s&&s.length>0&&h.jsx(pM,{items:s}),d&&d.length>0&&h.jsx(cD,{items:d}),h.jsx(SM,{}),b.map(({genre:w,items:C})=>h.jsx(el,{items:C,title:w},w)),h.jsx(el,{items:p,title:"Recently Added"})]})]})}function va({className:n,type:r,...o}){return h.jsx("input",{type:r,"data-slot":"input",className:Fe("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",n),...o})}var ED=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],CD=ED.reduce((n,r)=>{const o=yh(`Primitive.${r}`),l=v.forwardRef((s,c)=>{const{asChild:d,...m}=s,y=d?o:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(y,{...m,ref:c})});return l.displayName=`Primitive.${r}`,{...n,[r]:l}},{}),RD="Label",mw=v.forwardRef((n,r)=>h.jsx(CD.label,{...n,ref:r,onMouseDown:o=>{o.target.closest("button, input, select, textarea")||(n.onMouseDown?.(o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}}));mw.displayName=RD;var ND=mw;function Za({className:n,...r}){return h.jsx(ND,{"data-slot":"label",className:Fe("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",n),...r})}function TD(){const n=Vo(),{data:r,isLoading:o}=Eh(),l=sM(),[s,c]=v.useState(""),[d,m]=v.useState(null);if(o)return h.jsx("div",{className:"flex min-h-screen items-center justify-center text-muted-foreground",children:"Loading…"});if(r&&(!r.enabled||r.authenticated))return h.jsx(pu,{to:"/",replace:!0});async function y(g){g.preventDefault(),m(null);try{await l.mutateAsync(s),n("/",{replace:!0})}catch(b){m(b instanceof Error?b.message:"Something went wrong. Please try again.")}}return h.jsx("div",{className:"flex min-h-screen items-center justify-center px-6",children:h.jsxs("form",{className:"w-full max-w-sm rounded-lg border bg-card p-6 shadow-sm",onSubmit:g=>{y(g)},children:[h.jsx("h1",{className:"text-xl font-semibold",children:"Sign in to Jukebox"}),h.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Enter the shared password to continue."}),h.jsxs("div",{className:"mt-6 grid gap-2",children:[h.jsx(Za,{htmlFor:"password",children:"Password"}),h.jsx(va,{autoComplete:"current-password",autoFocus:!0,id:"password",onChange:g=>c(g.target.value),required:!0,type:"password",value:s})]}),d?h.jsx("p",{className:"mt-3 text-sm text-destructive",role:"alert",children:d}):null,h.jsx(Ie,{className:"mt-6 w-full",disabled:l.isPending||s.length===0,type:"submit",children:l.isPending?"Signing in…":"Sign in"})]})})}function jD(){const{data:n,isLoading:r}=dw(),o=v.useMemo(()=>n?n.map(s=>({type:"movie",item:s})):[],[n]),l=v.useMemo(()=>o.length===0?[]:Kh(o),[o]);return r?h.jsxs(h.Fragment,{children:[h.jsx(rn,{}),h.jsxs("div",{className:"pt-4",children:[h.jsx(Yt,{}),h.jsx(Yt,{}),h.jsx(Yt,{}),h.jsx(Yt,{}),h.jsx(Yt,{})]})]}):o.length===0?h.jsxs(h.Fragment,{children:[h.jsx(rn,{}),h.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[60vh] gap-4 text-center px-6",children:[h.jsx(Nu,{className:"size-16 text-muted-foreground"}),h.jsx("h2",{className:"text-xl font-semibold text-foreground",children:"No movies in your library"}),h.jsxs("p",{className:"text-sm text-muted-foreground max-w-md",children:["Run"," ",h.jsx("code",{className:"bg-muted px-2 py-1 rounded text-xs font-mono",children:"bun run scan /path/to/movies"})," ","to add your collection."]})]})]}):h.jsxs(h.Fragment,{children:[h.jsx(rn,{}),h.jsx("div",{className:"pt-2 pb-8",children:l.map(({genre:s,items:c})=>h.jsx(el,{items:c,title:s},s))})]})}function Td({className:n,...r}){return h.jsx("div",{"data-slot":"skeleton",className:Fe("bg-muted animate-pulse rounded-md",n),...r})}kr.extend(Yh);async function MD(){const n=await fetch("/api/scan/libraries");if(!n.ok)throw new Error("Failed to fetch libraries");return await n.json()}function AD(n){return{id:n.id,name:n.name,progress:{added:0,total:0,updated:0},status:"pending",type:n.type}}function OD(n){return n.reduce((r,o)=>({added:r.added+o.progress.added,found:r.found+o.progress.total,updated:r.updated+o.progress.updated}),{added:0,found:0,updated:0})}function _D(){const{data:n}=cw(),r=rD(),[o,l]=v.useState(null),[s,c]=v.useState(!1),d=v.useRef(!1),m=v.useMemo(()=>o?OD(o):{added:0,found:0,updated:0},[o]),y=v.useCallback(async()=>{const p=await MD();l(p.map(AD))},[]);v.useEffect(()=>{d.current||(d.current=!0,y())},[y]),v.useEffect(()=>{const p=new EventSource("/api/scan/stream");return p.addEventListener("library-start",w=>{const C=JSON.parse(w.data);c(!0),l(R=>R?.map(S=>S.id===C.libraryId?{...S,status:"scanning"}:S)??null)}),p.addEventListener("file-scanned",w=>{const C=JSON.parse(w.data);l(R=>R?.map(S=>S.id===C.libraryId?{...S,progress:{added:C.added,total:C.total,updated:C.updated}}:S)??null)}),p.addEventListener("library-complete",w=>{const C=JSON.parse(w.data);l(R=>R?.map(S=>S.id===C.libraryId?{...S,progress:{added:C.added,total:C.total,updated:C.updated},status:"complete"}:S)??null)}),p.addEventListener("library-error",w=>{const C=JSON.parse(w.data);l(R=>R?.map(S=>S.id===C.libraryId?{...S,error:C.error,status:"error"}:S)??null)}),p.addEventListener("scan-complete",()=>{c(!1)}),()=>{p.close()}},[]);const g=s||(n?.isRunning??!1);async function b(){try{if((await r.mutateAsync()).status==="already-running"){Ze.info("A scan is already running.");return}l(w=>w?.map(C=>({...C,progress:{added:0,total:0,updated:0},status:"pending",error:void 0}))??null)}catch(p){const w=p instanceof Error?p.message:"Couldn't start the scan.";Ze.error(w)}}return h.jsxs("div",{className:"mx-auto flex min-h-screen max-w-2xl flex-col px-6 py-16",children:[h.jsx("div",{className:"mb-6 animate-fade-up",children:h.jsxs(xn,{className:"inline-flex items-center gap-1.5 text-sm text-muted-foreground transition-colors hover:text-foreground",to:"/",children:[h.jsx(ST,{className:"size-4"}),"Back"]})}),h.jsxs("div",{className:"mb-8 animate-fade-up",children:[h.jsx("h1",{className:"text-3xl font-bold tracking-tight text-foreground",children:g?"Scanning your libraries…":"Library scan"}),h.jsx(DD,{status:n,totals:m,isRunning:g})]}),h.jsx("div",{className:"animate-fade-up animate-delay-1",children:o===null?h.jsx("div",{className:"space-y-4",children:[1,2].map(p=>h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(Td,{className:"size-4 rounded-full"}),h.jsxs("div",{className:"flex-1 space-y-1.5",children:[h.jsx(Td,{className:"h-3.5 w-32"}),h.jsx(Td,{className:"h-3 w-20"})]})]},p))}):o.length===0?h.jsx("p",{className:"text-sm text-muted-foreground",children:"No libraries configured. Add one from Settings before running a scan."}):h.jsx("div",{className:"space-y-4",children:o.map(p=>h.jsxs("div",{className:"flex items-center gap-3",children:[p.status==="pending"&&h.jsx(zT,{className:"size-4 shrink-0 text-muted-foreground/20"}),p.status==="scanning"&&h.jsx(Tu,{className:"size-4 shrink-0 animate-spin text-foreground"}),p.status==="complete"&&h.jsx(AT,{className:"size-4 shrink-0 text-foreground"}),p.status==="error"&&h.jsx(_T,{className:"size-4 shrink-0 text-destructive"}),h.jsxs("div",{className:"flex-1",children:[h.jsx("p",{className:"text-sm text-foreground",children:p.name}),p.status==="pending"&&h.jsx("p",{className:"text-xs text-muted-foreground/50",children:"Waiting"}),(p.status==="scanning"||p.status==="complete")&&h.jsx("p",{className:"text-xs text-muted-foreground",children:p.progress.total>0?h.jsxs(h.Fragment,{children:[p.progress.total," files",p.progress.added>0&&` · ${p.progress.added} new`,p.progress.updated>0&&` · ${p.progress.updated} updated`]}):"Scanning…"}),p.status==="error"&&h.jsx("p",{className:"text-xs text-destructive",children:p.error})]})]},p.id))})}),h.jsx("div",{className:"mt-12 animate-fade-up animate-delay-2",children:h.jsx(Ie,{disabled:g||r.isPending,onClick:()=>{b()},size:"lg",type:"button",children:g?"Scan in progress…":r.isPending?"Starting…":"Start manual scan"})})]})}function DD({isRunning:n,status:r,totals:o}){if(n)return h.jsx("p",{className:"mt-2 text-muted-foreground",children:o.found>0?`${o.found} files scanned so far.`:"Discovering files…"});if(r?.lastJob){const l=r.lastJob,s=l.endedAt??l.startedAt;return l.status==="error"?h.jsxs("p",{className:"mt-2 text-destructive",children:["Last scan failed"," ",kr(s).fromNow()," — ",l.errorMessage??"Unknown error."]}):h.jsxs("p",{className:"mt-2 text-muted-foreground",children:["Scanned ",kr(s).fromNow()," · ",l.added," new, ",l.updated," ","updated, ",l.total," total."]})}return h.jsx("p",{className:"mt-2 text-muted-foreground",children:"No scans have run yet. Start one below."})}const zD=[{to:"/settings/profiles",label:"Profiles"},{to:"/settings/libraries",label:"Libraries"},{to:"/settings/scan-schedule",label:"Scan schedule"},{to:"/settings/auth",label:"Auth"}];function Ho({children:n}){return h.jsxs(h.Fragment,{children:[h.jsx(rn,{}),h.jsxs("div",{className:"mx-auto grid w-full max-w-5xl gap-8 px-6 py-8 md:grid-cols-[12rem_1fr]",children:[h.jsxs("aside",{children:[h.jsx("h1",{className:"mb-4 text-lg font-semibold",children:"Settings"}),h.jsx("nav",{className:"flex flex-col gap-1 text-sm",children:zD.map(r=>h.jsx(Ws,{className:({isActive:o})=>Fe("rounded-md px-3 py-2 transition-colors",o?"bg-accent text-accent-foreground":"text-muted-foreground hover:text-foreground"),to:r.to,children:r.label},r.to))})]}),h.jsx("main",{children:n})]})]})}function kD(){const{data:n,isLoading:r}=Eh(),o=cM(),l=uM(),[s,c]=v.useState(""),[d,m]=v.useState(""),[y,g]=v.useState(""),[b,p]=v.useState(null),w=n?.enabled??!1;async function C(N){if(N.preventDefault(),p(null),d!==y){p("Passwords do not match.");return}if(d.length<8){p("Choose a password of at least 8 characters.");return}try{const j=await o.mutateAsync({currentPassword:w?s:void 0,newPassword:d});Ze.success(j.enabled?"Password updated.":"Password disabled."),c(""),m(""),g("")}catch(j){p(j instanceof Error?j.message:"Something went wrong. Please try again.")}}async function R(){if(window.confirm("Disable the shared password? Anyone on your network will be able to use Jukebox.")){p(null);try{await o.mutateAsync({currentPassword:s,newPassword:""}),Ze.success("Password disabled."),c("")}catch(j){p(j instanceof Error?j.message:"Something went wrong. Please try again.")}}}async function S(){try{await l.mutateAsync(),Ze.success("Signed out.")}catch(N){Ze.error(N instanceof Error?N.message:"Failed to sign out.")}}return r?h.jsx(Ho,{children:h.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading…"})}):h.jsxs(Ho,{children:[h.jsxs("div",{children:[h.jsx("h2",{className:"text-xl font-semibold",children:"Authentication"}),h.jsx("p",{className:"text-sm text-muted-foreground",children:"Protect Jukebox with a shared password. Everyone uses the same password to sign in."})]}),h.jsxs("div",{className:"mt-6 rounded-lg border bg-card p-4",children:[h.jsx("p",{className:"text-sm font-medium",children:w?"Auth is on":"Auth is off"}),h.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:w?"Visitors must sign in with the shared password.":"Anyone who can reach this server can use it."})]}),h.jsxs("form",{className:"mt-6 grid max-w-md gap-4",onSubmit:N=>{C(N)},children:[w?h.jsxs("div",{className:"grid gap-2",children:[h.jsx(Za,{htmlFor:"current-password",children:"Current password"}),h.jsx(va,{autoComplete:"current-password",id:"current-password",onChange:N=>c(N.target.value),required:!0,type:"password",value:s})]}):null,h.jsxs("div",{className:"grid gap-2",children:[h.jsx(Za,{htmlFor:"new-password",children:w?"New password":"Password"}),h.jsx(va,{autoComplete:"new-password",id:"new-password",minLength:8,onChange:N=>m(N.target.value),required:!0,type:"password",value:d}),h.jsx("p",{className:"text-xs text-muted-foreground",children:"At least 8 characters."})]}),h.jsxs("div",{className:"grid gap-2",children:[h.jsx(Za,{htmlFor:"confirm-password",children:"Confirm password"}),h.jsx(va,{autoComplete:"new-password",id:"confirm-password",minLength:8,onChange:N=>g(N.target.value),required:!0,type:"password",value:y})]}),b?h.jsx("p",{className:"text-sm text-destructive",role:"alert",children:b}):null,h.jsxs("div",{className:"flex flex-wrap gap-2",children:[h.jsx(Ie,{disabled:o.isPending,type:"submit",children:w?"Change password":"Enable and set password"}),w?h.jsxs(h.Fragment,{children:[h.jsx(Ie,{disabled:o.isPending||s.length===0,onClick:()=>{R()},type:"button",variant:"destructive",children:"Disable"}),h.jsx(Ie,{disabled:l.isPending,onClick:()=>{S()},type:"button",variant:"outline",children:"Sign out"})]}):null]})]})]})}function sb(n,[r,o]){return Math.min(o,Math.max(r,n))}function LD(n){const r=UD(n),o=v.forwardRef((l,s)=>{const{children:c,...d}=l,m=v.Children.toArray(c),y=m.find(BD);if(y){const g=y.props.children,b=m.map(p=>p===y?v.Children.count(g)>1?v.Children.only(null):v.isValidElement(g)?g.props.children:null:p);return h.jsx(r,{...d,ref:s,children:v.isValidElement(g)?v.cloneElement(g,void 0,b):null})}return h.jsx(r,{...d,ref:s,children:c})});return o.displayName=`${n}.Slot`,o}function UD(n){const r=v.forwardRef((o,l)=>{const{children:s,...c}=o;if(v.isValidElement(s)){const d=qD(s),m=PD(c,s.props);return s.type!==v.Fragment&&(m.ref=l?It(l,d):d),v.cloneElement(s,m)}return v.Children.count(s)>1?v.Children.only(null):null});return r.displayName=`${n}.SlotClone`,r}var HD=Symbol("radix.slottable");function BD(n){return v.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===HD}function PD(n,r){const o={...r};for(const l in r){const s=n[l],c=r[l];/^on[A-Z]/.test(l)?s&&c?o[l]=(...m)=>{const y=c(...m);return s(...m),y}:s&&(o[l]=s):l==="style"?o[l]={...s,...c}:l==="className"&&(o[l]=[s,c].filter(Boolean).join(" "))}return{...n,...o}}function qD(n){let r=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?n.ref:(r=Object.getOwnPropertyDescriptor(n,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}function $D(n){const r=v.useRef({value:n,previous:n});return v.useMemo(()=>(r.current.value!==n&&(r.current.previous=r.current.value,r.current.value=n),r.current.previous),[n])}var pw=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"}),VD="VisuallyHidden",FD=v.forwardRef((n,r)=>h.jsx(De.span,{...n,ref:r,style:{...pw,...n.style}}));FD.displayName=VD;var GD=[" ","Enter","ArrowUp","ArrowDown"],YD=[" ","Enter"],Lr="Select",[Bu,Pu,ID]=Rh(Lr),[Xo]=nr(Lr,[ID,Qo]),qu=Qo(),[QD,rr]=Xo(Lr),[KD,XD]=Xo(Lr),gw=n=>{const{__scopeSelect:r,children:o,open:l,defaultOpen:s,onOpenChange:c,value:d,defaultValue:m,onValueChange:y,dir:g,name:b,autoComplete:p,disabled:w,required:C,form:R}=n,S=qu(r),[N,j]=v.useState(null),[O,k]=v.useState(null),[Q,I]=v.useState(!1),Z=Nh(g),[B,G]=Lo({prop:l,defaultProp:s??!1,onChange:c,caller:Lr}),[ue,ie]=Lo({prop:d,defaultProp:m,onChange:y,caller:Lr}),oe=v.useRef(null),fe=N?R||!!N.closest("form"):!0,[ge,ae]=v.useState(new Set),W=Array.from(ge).map(T=>T.props.value).join(";");return h.jsx(kh,{...S,children:h.jsxs(QD,{required:C,scope:r,trigger:N,onTriggerChange:j,valueNode:O,onValueNodeChange:k,valueNodeHasChildren:Q,onValueNodeHasChildrenChange:I,contentId:_t(),value:ue,onValueChange:ie,open:B,onOpenChange:G,dir:Z,triggerPointerDownPosRef:oe,disabled:w,children:[h.jsx(Bu.Provider,{scope:r,children:h.jsx(KD,{scope:n.__scopeSelect,onNativeOptionAdd:v.useCallback(T=>{ae(U=>new Set(U).add(T))},[]),onNativeOptionRemove:v.useCallback(T=>{ae(U=>{const _=new Set(U);return _.delete(T),_})},[]),children:o})}),fe?h.jsxs(Hw,{"aria-hidden":!0,required:C,tabIndex:-1,name:b,autoComplete:p,value:ue,onChange:T=>ie(T.target.value),disabled:w,form:R,children:[ue===void 0?h.jsx("option",{value:""}):null,Array.from(ge)]},W):null]})})};gw.displayName=Lr;var vw="SelectTrigger",yw=v.forwardRef((n,r)=>{const{__scopeSelect:o,disabled:l=!1,...s}=n,c=qu(o),d=rr(vw,o),m=d.disabled||l,y=$e(r,d.onTriggerChange),g=Pu(o),b=v.useRef("touch"),[p,w,C]=Pw(S=>{const N=g().filter(k=>!k.disabled),j=N.find(k=>k.value===d.value),O=qw(N,S,j);O!==void 0&&d.onValueChange(O.value)}),R=S=>{m||(d.onOpenChange(!0),C()),S&&(d.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return h.jsx(Lh,{asChild:!0,...c,children:h.jsx(De.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":Bw(d.value)?"":void 0,...s,ref:y,onClick:he(s.onClick,S=>{S.currentTarget.focus(),b.current!=="mouse"&&R(S)}),onPointerDown:he(s.onPointerDown,S=>{b.current=S.pointerType;const N=S.target;N.hasPointerCapture(S.pointerId)&&N.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(R(S),S.preventDefault())}),onKeyDown:he(s.onKeyDown,S=>{const N=p.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&w(S.key),!(N&&S.key===" ")&&GD.includes(S.key)&&(R(),S.preventDefault())})})})});yw.displayName=vw;var bw="SelectValue",xw=v.forwardRef((n,r)=>{const{__scopeSelect:o,className:l,style:s,children:c,placeholder:d="",...m}=n,y=rr(bw,o),{onValueNodeHasChildrenChange:g}=y,b=c!==void 0,p=$e(r,y.onValueNodeChange);return Nt(()=>{g(b)},[g,b]),h.jsx(De.span,{...m,ref:p,style:{pointerEvents:"none"},children:Bw(y.value)?h.jsx(h.Fragment,{children:d}):c})});xw.displayName=bw;var ZD="SelectIcon",ww=v.forwardRef((n,r)=>{const{__scopeSelect:o,children:l,...s}=n;return h.jsx(De.span,{"aria-hidden":!0,...s,ref:r,children:l||"▼"})});ww.displayName=ZD;var JD="SelectPortal",Sw=n=>h.jsx(cl,{asChild:!0,...n});Sw.displayName=JD;var Ur="SelectContent",Ew=v.forwardRef((n,r)=>{const o=rr(Ur,n.__scopeSelect),[l,s]=v.useState();if(Nt(()=>{s(new DocumentFragment)},[]),!o.open){const c=l;return c?sl.createPortal(h.jsx(Cw,{scope:n.__scopeSelect,children:h.jsx(Bu.Slot,{scope:n.__scopeSelect,children:h.jsx("div",{children:n.children})})}),c):null}return h.jsx(Rw,{...n,ref:r})});Ew.displayName=Ur;var Mn=10,[Cw,or]=Xo(Ur),WD="SelectContentImpl",e3=LD("SelectContent.RemoveScroll"),Rw=v.forwardRef((n,r)=>{const{__scopeSelect:o,position:l="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:c,onPointerDownOutside:d,side:m,sideOffset:y,align:g,alignOffset:b,arrowPadding:p,collisionBoundary:w,collisionPadding:C,sticky:R,hideWhenDetached:S,avoidCollisions:N,...j}=n,O=rr(Ur,o),[k,Q]=v.useState(null),[I,Z]=v.useState(null),B=$e(r,Y=>Q(Y)),[G,ue]=v.useState(null),[ie,oe]=v.useState(null),fe=Pu(o),[ge,ae]=v.useState(!1),W=v.useRef(!1);v.useEffect(()=>{if(k)return hh(k)},[k]),dh();const T=v.useCallback(Y=>{const[le,...ce]=fe().map(Ce=>Ce.ref.current),[ve]=ce.slice(-1),we=document.activeElement;for(const Ce of Y)if(Ce===we||(Ce?.scrollIntoView({block:"nearest"}),Ce===le&&I&&(I.scrollTop=0),Ce===ve&&I&&(I.scrollTop=I.scrollHeight),Ce?.focus(),document.activeElement!==we))return},[fe,I]),U=v.useCallback(()=>T([G,k]),[T,G,k]);v.useEffect(()=>{ge&&U()},[ge,U]);const{onOpenChange:_,triggerPointerDownPosRef:F}=O;v.useEffect(()=>{if(k){let Y={x:0,y:0};const le=ve=>{Y={x:Math.abs(Math.round(ve.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(ve.pageY)-(F.current?.y??0))}},ce=ve=>{Y.x<=10&&Y.y<=10?ve.preventDefault():k.contains(ve.target)||_(!1),document.removeEventListener("pointermove",le),F.current=null};return F.current!==null&&(document.addEventListener("pointermove",le),document.addEventListener("pointerup",ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",le),document.removeEventListener("pointerup",ce,{capture:!0})}}},[k,_,F]),v.useEffect(()=>{const Y=()=>_(!1);return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[_]);const[ne,M]=Pw(Y=>{const le=fe().filter(we=>!we.disabled),ce=le.find(we=>we.ref.current===document.activeElement),ve=qw(le,Y,ce);ve&&setTimeout(()=>ve.ref.current.focus())}),A=v.useCallback((Y,le,ce)=>{const ve=!W.current&&!ce;(O.value!==void 0&&O.value===le||ve)&&(ue(Y),ve&&(W.current=!0))},[O.value]),L=v.useCallback(()=>k?.focus(),[k]),P=v.useCallback((Y,le,ce)=>{const ve=!W.current&&!ce;(O.value!==void 0&&O.value===le||ve)&&oe(Y)},[O.value]),K=l==="popper"?Qd:Nw,re=K===Qd?{side:m,sideOffset:y,align:g,alignOffset:b,arrowPadding:p,collisionBoundary:w,collisionPadding:C,sticky:R,hideWhenDetached:S,avoidCollisions:N}:{};return h.jsx(Cw,{scope:o,content:k,viewport:I,onViewportChange:Z,itemRefCallback:A,selectedItem:G,onItemLeave:L,itemTextRefCallback:P,focusSelectedItem:U,selectedItemText:ie,position:l,isPositioned:ge,searchRef:ne,children:h.jsx(bu,{as:e3,allowPinchZoom:!0,children:h.jsx(vu,{asChild:!0,trapped:O.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:he(s,Y=>{O.trigger?.focus({preventScroll:!0}),Y.preventDefault()}),children:h.jsx(ul,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>O.onOpenChange(!1),children:h.jsx(K,{role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:Y=>Y.preventDefault(),...j,...re,onPlaced:()=>ae(!0),ref:B,style:{display:"flex",flexDirection:"column",outline:"none",...j.style},onKeyDown:he(j.onKeyDown,Y=>{const le=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!le&&Y.key.length===1&&M(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let ve=fe().filter(we=>!we.disabled).map(we=>we.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(ve=ve.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const we=Y.target,Ce=ve.indexOf(we);ve=ve.slice(Ce+1)}setTimeout(()=>T(ve)),Y.preventDefault()}})})})})})})});Rw.displayName=WD;var t3="SelectItemAlignedPosition",Nw=v.forwardRef((n,r)=>{const{__scopeSelect:o,onPlaced:l,...s}=n,c=rr(Ur,o),d=or(Ur,o),[m,y]=v.useState(null),[g,b]=v.useState(null),p=$e(r,B=>b(B)),w=Pu(o),C=v.useRef(!1),R=v.useRef(!0),{viewport:S,selectedItem:N,selectedItemText:j,focusSelectedItem:O}=d,k=v.useCallback(()=>{if(c.trigger&&c.valueNode&&m&&g&&S&&N&&j){const B=c.trigger.getBoundingClientRect(),G=g.getBoundingClientRect(),ue=c.valueNode.getBoundingClientRect(),ie=j.getBoundingClientRect();if(c.dir!=="rtl"){const we=ie.left-G.left,Ce=ue.left-we,et=B.left-Ce,ut=B.width+et,Qn=Math.max(ut,G.width),Dn=window.innerWidth-Mn,En=sb(Ce,[Mn,Math.max(Mn,Dn-Qn)]);m.style.minWidth=ut+"px",m.style.left=En+"px"}else{const we=G.right-ie.right,Ce=window.innerWidth-ue.right-we,et=window.innerWidth-B.right-Ce,ut=B.width+et,Qn=Math.max(ut,G.width),Dn=window.innerWidth-Mn,En=sb(Ce,[Mn,Math.max(Mn,Dn-Qn)]);m.style.minWidth=ut+"px",m.style.right=En+"px"}const oe=w(),fe=window.innerHeight-Mn*2,ge=S.scrollHeight,ae=window.getComputedStyle(g),W=parseInt(ae.borderTopWidth,10),T=parseInt(ae.paddingTop,10),U=parseInt(ae.borderBottomWidth,10),_=parseInt(ae.paddingBottom,10),F=W+T+ge+_+U,ne=Math.min(N.offsetHeight*5,F),M=window.getComputedStyle(S),A=parseInt(M.paddingTop,10),L=parseInt(M.paddingBottom,10),P=B.top+B.height/2-Mn,K=fe-P,re=N.offsetHeight/2,Y=N.offsetTop+re,le=W+T+Y,ce=F-le;if(le<=P){const we=oe.length>0&&N===oe[oe.length-1].ref.current;m.style.bottom="0px";const Ce=g.clientHeight-S.offsetTop-S.offsetHeight,et=Math.max(K,re+(we?L:0)+Ce+U),ut=le+et;m.style.height=ut+"px"}else{const we=oe.length>0&&N===oe[0].ref.current;m.style.top="0px";const et=Math.max(P,W+S.offsetTop+(we?A:0)+re)+ce;m.style.height=et+"px",S.scrollTop=le-P+S.offsetTop}m.style.margin=`${Mn}px 0`,m.style.minHeight=ne+"px",m.style.maxHeight=fe+"px",l?.(),requestAnimationFrame(()=>C.current=!0)}},[w,c.trigger,c.valueNode,m,g,S,N,j,c.dir,l]);Nt(()=>k(),[k]);const[Q,I]=v.useState();Nt(()=>{g&&I(window.getComputedStyle(g).zIndex)},[g]);const Z=v.useCallback(B=>{B&&R.current===!0&&(k(),O?.(),R.current=!1)},[k,O]);return h.jsx(a3,{scope:o,contentWrapper:m,shouldExpandOnScrollRef:C,onScrollButtonChange:Z,children:h.jsx("div",{ref:y,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:Q},children:h.jsx(De.div,{...s,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});Nw.displayName=t3;var n3="SelectPopperPosition",Qd=v.forwardRef((n,r)=>{const{__scopeSelect:o,align:l="start",collisionPadding:s=Mn,...c}=n,d=qu(o);return h.jsx(Uh,{...d,...c,ref:r,align:l,collisionPadding:s,style:{boxSizing:"border-box",...c.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)"}})});Qd.displayName=n3;var[a3,Xh]=Xo(Ur,{}),Kd="SelectViewport",Tw=v.forwardRef((n,r)=>{const{__scopeSelect:o,nonce:l,...s}=n,c=or(Kd,o),d=Xh(Kd,o),m=$e(r,c.onViewportChange),y=v.useRef(0);return h.jsxs(h.Fragment,{children:[h.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:l}),h.jsx(Bu.Slot,{scope:o,children:h.jsx(De.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:he(s.onScroll,g=>{const b=g.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:w}=d;if(w?.current&&p){const C=Math.abs(y.current-b.scrollTop);if(C>0){const R=window.innerHeight-Mn*2,S=parseFloat(p.style.minHeight),N=parseFloat(p.style.height),j=Math.max(S,N);if(j<R){const O=j+C,k=Math.min(R,O),Q=O-k;p.style.height=k+"px",p.style.bottom==="0px"&&(b.scrollTop=Q>0?Q:0,p.style.justifyContent="flex-end")}}}y.current=b.scrollTop})})})]})});Tw.displayName=Kd;var jw="SelectGroup",[r3,o3]=Xo(jw),i3=v.forwardRef((n,r)=>{const{__scopeSelect:o,...l}=n,s=_t();return h.jsx(r3,{scope:o,id:s,children:h.jsx(De.div,{role:"group","aria-labelledby":s,...l,ref:r})})});i3.displayName=jw;var Mw="SelectLabel",l3=v.forwardRef((n,r)=>{const{__scopeSelect:o,...l}=n,s=o3(Mw,o);return h.jsx(De.div,{id:s.id,...l,ref:r})});l3.displayName=Mw;var du="SelectItem",[s3,Aw]=Xo(du),Ow=v.forwardRef((n,r)=>{const{__scopeSelect:o,value:l,disabled:s=!1,textValue:c,...d}=n,m=rr(du,o),y=or(du,o),g=m.value===l,[b,p]=v.useState(c??""),[w,C]=v.useState(!1),R=$e(r,O=>y.itemRefCallback?.(O,l,s)),S=_t(),N=v.useRef("touch"),j=()=>{s||(m.onValueChange(l),m.onOpenChange(!1))};if(l==="")throw new 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 h.jsx(s3,{scope:o,value:l,disabled:s,textId:S,isSelected:g,onItemTextChange:v.useCallback(O=>{p(k=>k||(O?.textContent??"").trim())},[]),children:h.jsx(Bu.ItemSlot,{scope:o,value:l,disabled:s,textValue:b,children:h.jsx(De.div,{role:"option","aria-labelledby":S,"data-highlighted":w?"":void 0,"aria-selected":g&&w,"data-state":g?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...d,ref:R,onFocus:he(d.onFocus,()=>C(!0)),onBlur:he(d.onBlur,()=>C(!1)),onClick:he(d.onClick,()=>{N.current!=="mouse"&&j()}),onPointerUp:he(d.onPointerUp,()=>{N.current==="mouse"&&j()}),onPointerDown:he(d.onPointerDown,O=>{N.current=O.pointerType}),onPointerMove:he(d.onPointerMove,O=>{N.current=O.pointerType,s?y.onItemLeave?.():N.current==="mouse"&&O.currentTarget.focus({preventScroll:!0})}),onPointerLeave:he(d.onPointerLeave,O=>{O.currentTarget===document.activeElement&&y.onItemLeave?.()}),onKeyDown:he(d.onKeyDown,O=>{y.searchRef?.current!==""&&O.key===" "||(YD.includes(O.key)&&j(),O.key===" "&&O.preventDefault())})})})})});Ow.displayName=du;var Zi="SelectItemText",_w=v.forwardRef((n,r)=>{const{__scopeSelect:o,className:l,style:s,...c}=n,d=rr(Zi,o),m=or(Zi,o),y=Aw(Zi,o),g=XD(Zi,o),[b,p]=v.useState(null),w=$e(r,j=>p(j),y.onItemTextChange,j=>m.itemTextRefCallback?.(j,y.value,y.disabled)),C=b?.textContent,R=v.useMemo(()=>h.jsx("option",{value:y.value,disabled:y.disabled,children:C},y.value),[y.disabled,y.value,C]),{onNativeOptionAdd:S,onNativeOptionRemove:N}=g;return Nt(()=>(S(R),()=>N(R)),[S,N,R]),h.jsxs(h.Fragment,{children:[h.jsx(De.span,{id:y.textId,...c,ref:w}),y.isSelected&&d.valueNode&&!d.valueNodeHasChildren?sl.createPortal(c.children,d.valueNode):null]})});_w.displayName=Zi;var Dw="SelectItemIndicator",zw=v.forwardRef((n,r)=>{const{__scopeSelect:o,...l}=n;return Aw(Dw,o).isSelected?h.jsx(De.span,{"aria-hidden":!0,...l,ref:r}):null});zw.displayName=Dw;var Xd="SelectScrollUpButton",kw=v.forwardRef((n,r)=>{const o=or(Xd,n.__scopeSelect),l=Xh(Xd,n.__scopeSelect),[s,c]=v.useState(!1),d=$e(r,l.onScrollButtonChange);return Nt(()=>{if(o.viewport&&o.isPositioned){let m=function(){const g=y.scrollTop>0;c(g)};const y=o.viewport;return m(),y.addEventListener("scroll",m),()=>y.removeEventListener("scroll",m)}},[o.viewport,o.isPositioned]),s?h.jsx(Uw,{...n,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:y}=o;m&&y&&(m.scrollTop=m.scrollTop-y.offsetHeight)}}):null});kw.displayName=Xd;var Zd="SelectScrollDownButton",Lw=v.forwardRef((n,r)=>{const o=or(Zd,n.__scopeSelect),l=Xh(Zd,n.__scopeSelect),[s,c]=v.useState(!1),d=$e(r,l.onScrollButtonChange);return Nt(()=>{if(o.viewport&&o.isPositioned){let m=function(){const g=y.scrollHeight-y.clientHeight,b=Math.ceil(y.scrollTop)<g;c(b)};const y=o.viewport;return m(),y.addEventListener("scroll",m),()=>y.removeEventListener("scroll",m)}},[o.viewport,o.isPositioned]),s?h.jsx(Uw,{...n,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:y}=o;m&&y&&(m.scrollTop=m.scrollTop+y.offsetHeight)}}):null});Lw.displayName=Zd;var Uw=v.forwardRef((n,r)=>{const{__scopeSelect:o,onAutoScroll:l,...s}=n,c=or("SelectScrollButton",o),d=v.useRef(null),m=Pu(o),y=v.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return v.useEffect(()=>()=>y(),[y]),Nt(()=>{m().find(b=>b.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[m]),h.jsx(De.div,{"aria-hidden":!0,...s,ref:r,style:{flexShrink:0,...s.style},onPointerDown:he(s.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(l,50))}),onPointerMove:he(s.onPointerMove,()=>{c.onItemLeave?.(),d.current===null&&(d.current=window.setInterval(l,50))}),onPointerLeave:he(s.onPointerLeave,()=>{y()})})}),u3="SelectSeparator",c3=v.forwardRef((n,r)=>{const{__scopeSelect:o,...l}=n;return h.jsx(De.div,{"aria-hidden":!0,...l,ref:r})});c3.displayName=u3;var Jd="SelectArrow",f3=v.forwardRef((n,r)=>{const{__scopeSelect:o,...l}=n,s=qu(o),c=rr(Jd,o),d=or(Jd,o);return c.open&&d.position==="popper"?h.jsx(Hh,{...s,...l,ref:r}):null});f3.displayName=Jd;var d3="SelectBubbleInput",Hw=v.forwardRef(({__scopeSelect:n,value:r,...o},l)=>{const s=v.useRef(null),c=$e(l,s),d=$D(r);return v.useEffect(()=>{const m=s.current;if(!m)return;const y=window.HTMLSelectElement.prototype,b=Object.getOwnPropertyDescriptor(y,"value").set;if(d!==r&&b){const p=new Event("change",{bubbles:!0});b.call(m,r),m.dispatchEvent(p)}},[d,r]),h.jsx(De.select,{...o,style:{...pw,...o.style},ref:c,defaultValue:r})});Hw.displayName=d3;function Bw(n){return n===""||n===void 0}function Pw(n){const r=Fn(n),o=v.useRef(""),l=v.useRef(0),s=v.useCallback(d=>{const m=o.current+d;r(m),(function y(g){o.current=g,window.clearTimeout(l.current),g!==""&&(l.current=window.setTimeout(()=>y(""),1e3))})(m)},[r]),c=v.useCallback(()=>{o.current="",window.clearTimeout(l.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(l.current),[]),[o,s,c]}function qw(n,r,o){const s=r.length>1&&Array.from(r).every(g=>g===r[0])?r[0]:r,c=o?n.indexOf(o):-1;let d=h3(n,Math.max(c,0));s.length===1&&(d=d.filter(g=>g!==o));const y=d.find(g=>g.textValue.toLowerCase().startsWith(s.toLowerCase()));return y!==o?y:void 0}function h3(n,r){return n.map((o,l)=>n[(r+l)%n.length])}var m3=gw,p3=yw,g3=xw,v3=ww,y3=Sw,b3=Ew,x3=Tw,w3=Ow,S3=_w,E3=zw,C3=kw,R3=Lw;function Zh({...n}){return h.jsx(m3,{"data-slot":"select",...n})}function Jh({...n}){return h.jsx(g3,{"data-slot":"select-value",...n})}function Wh({className:n,size:r="default",children:o,...l}){return h.jsxs(p3,{"data-slot":"select-trigger","data-size":r,className:Fe("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",n),...l,children:[o,h.jsx(v3,{asChild:!0,children:h.jsx(A0,{className:"size-4 opacity-50"})})]})}function em({className:n,children:r,position:o="popper",align:l="center",...s}){return h.jsx(y3,{children:h.jsxs(b3,{"data-slot":"select-content",className:Fe("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",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:o,align:l,...s,children:[h.jsx(N3,{}),h.jsx(x3,{className:Fe("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:r}),h.jsx(T3,{})]})})}function ol({className:n,children:r,...o}){return h.jsxs(w3,{"data-slot":"select-item",className:Fe("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",n),...o,children:[h.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:h.jsx(E3,{children:h.jsx(M0,{className:"size-4"})})}),h.jsx(S3,{children:r})]})}function N3({className:n,...r}){return h.jsx(C3,{"data-slot":"select-scroll-up-button",className:Fe("flex cursor-default items-center justify-center py-1",n),...r,children:h.jsx(jT,{className:"size-4"})})}function T3({className:n,...r}){return h.jsx(R3,{"data-slot":"select-scroll-down-button",className:Fe("flex cursor-default items-center justify-center py-1",n),...r,children:h.jsx(A0,{className:"size-4"})})}function j3({...n}){return h.jsx(wu,{"data-slot":"sheet",...n})}function M3({...n}){return h.jsx(Su,{"data-slot":"sheet-portal",...n})}function A3({className:n,...r}){return h.jsx(Eu,{className:Fe("fixed inset-0 z-50 bg-black/60 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n),"data-slot":"sheet-overlay",...r})}function O3({children:n,className:r,hideCloseButton:o,overlayClassName:l,side:s="right",...c}){const d={bottom:"inset-x-0 bottom-0 h-auto max-h-[90vh] border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom rounded-t-xl",left:"inset-y-0 left-0 h-full w-3/4 max-w-sm border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left",right:"inset-y-0 right-0 h-full w-3/4 max-w-sm border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right",top:"inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top"};return h.jsxs(M3,{children:[h.jsx(A3,{className:l}),h.jsxs(Cu,{className:Fe("fixed z-50 flex flex-col bg-background shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-200 data-[state=open]:duration-300",d[s],r),"data-slot":"sheet-content",...c,children:[n,!o&&h.jsx(y0,{"aria-label":"Close",className:"absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none min-h-11 min-w-11 flex items-center justify-center",children:h.jsx(D0,{className:"size-5"})})]})]})}function _3({className:n,...r}){return h.jsx(vh,{className:Fe("text-base font-semibold",n),"data-slot":"sheet-title",...r})}function D3({className:n,...r}){return h.jsx(LN,{className:Fe("text-sm text-muted-foreground",n),"data-slot":"sheet-description",...r})}async function z3(n){const r=n.length>0?`?path=${encodeURIComponent(n)}`:"",o=await fetch(`/api/filesystem/browse${r}`);if(!o.ok){let l=o.statusText;try{const s=await o.json();s.error?.message&&(l=s.error.message)}catch{}throw new Error(l)}return await o.json()}function $w({initialPath:n,onOpenChange:r,onSelect:o,open:l}){const[s,c]=v.useState(n??""),[d,m]=v.useState(n??"");v.useEffect(function(){if(l){const k=n??"";c(k),m(k)}},[n,l]);const{data:y,error:g,isLoading:b,isFetching:p,refetch:w}=St({enabled:l,queryKey:["filesystem","browse",s],queryFn:()=>z3(s)});v.useEffect(function(){y&&m(y.path)},[y]);function C(O){c(O),m(O)}function R(){s.length!==0&&(o(s),r(!1))}const S=!!(y&&y.parent!==null),N=s.length===0,j=g instanceof Error?g.message:g?String(g):null;return h.jsx(j3,{onOpenChange:r,open:l,children:h.jsxs(O3,{className:"flex w-full max-w-lg flex-col gap-0 p-0",side:"right",children:[h.jsxs("div",{className:"border-b p-4",children:[h.jsx(_3,{children:"Browse folders"}),h.jsx(D3,{children:"Pick a folder on the Jukebox server."})]}),h.jsxs("div",{className:"flex items-center gap-2 border-b p-4",children:[h.jsx(Ie,{"aria-label":"Go up one folder",disabled:!S,onClick:()=>{y?.parent?C(y.parent):N||C("")},size:"icon-sm",type:"button",variant:"outline",children:h.jsx(CT,{className:"size-4"})}),h.jsx(va,{className:"flex-1 font-mono text-sm",onChange:O=>m(O.target.value),onKeyDown:O=>{O.key==="Enter"&&(O.preventDefault(),C(d.trim()))},placeholder:"Type a path and press Enter, or pick a root below",spellCheck:!1,value:d}),h.jsx(Ie,{"aria-label":"Refresh",onClick:()=>{w()},size:"icon-sm",type:"button",variant:"ghost",children:h.jsx(XT,{className:`size-4 ${p?"animate-spin":""}`})})]}),h.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto p-2",children:b?h.jsx("p",{className:"p-3 text-sm text-muted-foreground",children:"Loading…"}):j?h.jsxs("div",{className:"flex flex-col items-start gap-2 p-3",children:[h.jsx("p",{className:"text-sm text-destructive",children:j}),h.jsx(Ie,{onClick:()=>{w()},size:"sm",type:"button",variant:"outline",children:"Try again"})]}):y&&y.entries.length===0?h.jsx("p",{className:"p-3 text-sm text-muted-foreground",children:"No subfolders here."}):h.jsx("ul",{className:"space-y-0.5",children:y?.entries.map(O=>h.jsx("li",{children:h.jsxs("button",{className:"flex w-full items-center gap-3 rounded-md px-3 py-2 text-left text-sm hover:bg-accent",onClick:()=>C(O.path),type:"button",children:[h.jsx(PT,{className:"size-4 shrink-0 text-muted-foreground"}),h.jsx("span",{className:"truncate",children:O.name})]})},O.path))})}),h.jsxs("div",{className:"flex items-center justify-end gap-2 border-t p-4",children:[h.jsx(Ie,{onClick:()=>r(!1),type:"button",variant:"ghost",children:"Cancel"}),h.jsx(Ie,{disabled:N,onClick:R,type:"button",children:"Select this folder"})]})]})})}async function tm(n){try{return(await n.json()).error?.message??n.statusText}catch{return n.statusText}}async function Vw(n){const r=await fetch(n);if(!r.ok)throw new Error(await tm(r));return await r.json()}function k3(){return St({queryKey:["settings","libraries"],queryFn:()=>Vw("/api/settings/libraries")})}function L3(){const n=Dt();return wn({mutationFn:async r=>{const o=await fetch("/api/settings/libraries",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok)throw new Error(await tm(o));return await o.json()},onSuccess:()=>{n.invalidateQueries({queryKey:["settings","libraries"]})}})}function U3(){const n=Dt();return wn({mutationFn:async r=>{const o=r.force===!0?"?force=true":"",l=await fetch(`/api/settings/libraries/${r.id}${o}`,{method:"DELETE"});if(!l.ok){let s,c=l.statusText;try{const m=await l.json();c=m.error?.message??c,s=m.error?.referenceCount}catch{}throw Object.assign(new Error(c),{referenceCount:s,status:l.status})}},onSuccess:()=>{n.invalidateQueries({queryKey:["settings","libraries"]})}})}function H3(){return St({queryKey:["settings","scan-schedule"],queryFn:()=>Vw("/api/settings/scan-schedule")})}function B3(){const n=Dt();return wn({mutationFn:async r=>{const o=await fetch("/api/settings/scan-schedule",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({schedule:r})});if(!o.ok)throw new Error(await tm(o));return await o.json()},onSuccess:()=>{n.invalidateQueries({queryKey:["settings","scan-schedule"]})}})}const ub={name:"",path:"",type:"movies"};function P3(){const{data:n,isLoading:r}=k3(),o=L3(),l=U3(),[s,c]=v.useState(ub),[d,m]=v.useState(!1);async function y(){const b=s.path.trim();if(b.length===0){Ze.error("Enter a folder path before adding a library.");return}const p={name:s.name.trim(),path:b,type:s.type};try{await o.mutateAsync(p),c(ub),Ze.success("Library added.")}catch(w){Ze.error(w instanceof Error?w.message:"Couldn't add library.")}}async function g(b){if(window.confirm(`Remove library "${b.name}" (${b.path})? Scanned items in this folder will be kept until you run a scan.`))try{await l.mutateAsync({id:b.id}),Ze.success(`Removed ${b.name}.`)}catch(w){const C=w;if(C.status===409){if(!window.confirm(`${C.message}
57
+
58
+ Force remove will also delete all scanned items in this folder from Jukebox (files on disk are not touched). Continue?`))return;try{await l.mutateAsync({id:b.id,force:!0}),Ze.success(`Removed ${b.name} and its scanned items.`)}catch(S){Ze.error(S instanceof Error?S.message:"Couldn't force remove library.")}return}Ze.error(w instanceof Error?w.message:"Couldn't remove library.")}}return h.jsxs(Ho,{children:[h.jsxs("div",{children:[h.jsx("h2",{className:"text-xl font-semibold",children:"Libraries"}),h.jsx("p",{className:"text-sm text-muted-foreground",children:"Folders Jukebox scans for movies and TV shows."})]}),h.jsx("div",{className:"mt-6 space-y-2",children:r?h.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading…"}):n&&n.length>0?n.map(b=>h.jsxs("div",{className:"flex items-center gap-3 rounded-lg border bg-card p-4",children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"truncate font-medium",children:b.name}),h.jsx("p",{className:"truncate text-sm text-muted-foreground",children:b.path})]}),h.jsx("span",{className:"rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground",children:b.type==="movies"?"Movies":"Shows"}),h.jsx(Ie,{"aria-label":`Remove ${b.name}`,disabled:l.isPending,onClick:()=>{g(b)},size:"icon-sm",type:"button",variant:"ghost",children:h.jsx(xh,{className:"size-4"})})]},b.id)):h.jsx("p",{className:"text-sm text-muted-foreground",children:"No libraries yet. Add one below to start scanning."})}),h.jsxs("div",{className:"mt-8 rounded-lg border bg-card p-4",children:[h.jsx("h3",{className:"text-sm font-semibold",children:"Add a library"}),h.jsxs("div",{className:"mt-4 grid gap-3",children:[h.jsxs("div",{className:"grid gap-2",children:[h.jsx(Za,{htmlFor:"new-library-path",children:"Folder path"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(va,{className:"flex-1",id:"new-library-path",onChange:b=>c(p=>({...p,path:b.target.value})),placeholder:"/mnt/media/movies",spellCheck:!1,value:s.path}),h.jsxs(Ie,{onClick:()=>m(!0),type:"button",variant:"outline",children:[h.jsx(O0,{className:"size-4"}),"Browse"]})]})]}),h.jsxs("div",{className:"grid gap-2",children:[h.jsxs(Za,{htmlFor:"new-library-name",children:["Name"," ",h.jsx("span",{className:"text-xs text-muted-foreground",children:"(optional)"})]}),h.jsx(va,{id:"new-library-name",onChange:b=>c(p=>({...p,name:b.target.value})),placeholder:"Leave blank to use the folder name",value:s.name})]}),h.jsxs("div",{className:"grid gap-2",children:[h.jsx(Za,{htmlFor:"new-library-type",children:"Type"}),h.jsxs(Zh,{onValueChange:b=>c(p=>({...p,type:b==="shows"?"shows":"movies"})),value:s.type,children:[h.jsx(Wh,{className:"w-40",id:"new-library-type",children:h.jsx(Jh,{})}),h.jsxs(em,{children:[h.jsx(ol,{value:"movies",children:"Movies"}),h.jsx(ol,{value:"shows",children:"Shows"})]})]})]}),h.jsx("div",{children:h.jsxs(Ie,{disabled:o.isPending||s.path.trim().length===0,onClick:()=>{y()},type:"button",children:[h.jsx(nu,{className:"size-4"}),o.isPending?"Adding…":"Add library"]})})]})]}),d&&h.jsx($w,{initialPath:s.path.trim()||void 0,onOpenChange:m,onSelect:b=>c(p=>({...p,path:b})),open:d})]})}const jd=["🍿","🎬","🎥","📺","🎞️","🎭","🚀","🌟","🌈","🔥","🌙","🌊","🐱","🐶","🦊","🦁","🐼","🐧","🦄","🐙","🍕","🍣","🍩","🍔","🎮","🎸","⚽","🏀","⛺","🏝️"];function q3({initialValues:n,onOpenChange:r,onSubmit:o,open:l,submitting:s,title:c}){const[d,m]=v.useState(n?.name??""),[y,g]=v.useState(n?.emoji??jd[0]);v.useEffect(function(){l&&(m(n?.name??""),g(n?.emoji??jd[0]))},[n?.emoji,n?.name,l]);function b(p){p.preventDefault();const w=d.trim();w&&Promise.resolve(o({name:w,emoji:y}))}return h.jsx(wu,{onOpenChange:r,open:l,children:h.jsxs(Su,{children:[h.jsx(Eu,{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),h.jsxs(Cu,{className:"fixed left-[50%] top-[50%] z-50 grid w-full max-w-md translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg",children:[h.jsxs("div",{className:"flex items-start justify-between",children:[h.jsx(vh,{className:"text-lg font-semibold",children:c}),h.jsx(y0,{"aria-label":"Close",className:"rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none",children:h.jsx(D0,{className:"size-4"})})]}),h.jsxs("form",{className:"grid gap-4",onSubmit:b,children:[h.jsxs("div",{className:"grid gap-2",children:[h.jsx("label",{className:"text-sm font-medium",htmlFor:"profile-name",children:"Name"}),h.jsx(va,{autoFocus:!0,id:"profile-name",maxLength:40,onChange:p=>m(p.target.value),placeholder:"e.g. Ada",value:d})]}),h.jsxs("div",{className:"grid gap-2",children:[h.jsx("span",{className:"text-sm font-medium",children:"Emoji"}),h.jsx("div",{className:"grid grid-cols-6 gap-2",children:jd.map(p=>{const w=p===y;return h.jsx("button",{"aria-pressed":w,className:Fe("flex size-10 items-center justify-center rounded-md border text-xl transition-colors",w?"border-primary bg-primary/10":"border-border hover:bg-accent"),onClick:()=>g(p),type:"button",children:h.jsx("span",{"aria-hidden":!0,children:p})},p)})})]}),h.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[h.jsx(Ie,{onClick:()=>r(!1),type:"button",variant:"ghost",children:"Cancel"}),h.jsx(Ie,{disabled:(s??!1)||!d.trim(),type:"submit",children:"Save"})]})]})]})]})})}function $3(){const{data:n,isLoading:r}=tw(),o=__(),l=D_(),s=z_(),[c,d]=v.useState({kind:"closed"});function m(){d({kind:"closed"})}async function y(p){try{c.kind==="create"?(await o.mutateAsync(p),Ze.success(`Created ${p.name}`)):c.kind==="edit"&&(await l.mutateAsync({id:c.profile.id,...p}),Ze.success(`Updated ${p.name}`)),m()}catch(w){Ze.error(w instanceof Error?w.message:"Failed to save")}}async function g(p){if(window.confirm(`Delete profile "${p.name}"? Their watch progress and favorites will be removed.`))try{await s.mutateAsync(p.id),Ze.success(`Deleted ${p.name}`)}catch(C){Ze.error(C instanceof Error?C.message:"Failed to delete")}}const b=(n?.length??0)>1;return h.jsxs(Ho,{children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("h2",{className:"text-xl font-semibold",children:"Profiles"}),h.jsx("p",{className:"text-sm text-muted-foreground",children:"Each profile has its own watch progress and favorites."})]}),h.jsxs(Ie,{onClick:()=>d({kind:"create"}),type:"button",children:[h.jsx(nu,{className:"size-4"}),"Add profile"]})]}),h.jsx("div",{className:"mt-6 grid gap-3 sm:grid-cols-2",children:r?h.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading…"}):n?.map(p=>h.jsxs("div",{className:"flex items-center gap-3 rounded-lg border bg-card p-4",children:[h.jsx("span",{"aria-hidden":!0,className:"flex size-12 items-center justify-center rounded-full bg-muted text-2xl",children:p.emoji}),h.jsx("div",{className:"flex-1 truncate",children:h.jsx("p",{className:"truncate font-medium",children:p.name})}),h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx(Ie,{"aria-label":`Edit ${p.name}`,onClick:()=>d({kind:"edit",profile:p}),size:"icon",type:"button",variant:"ghost",children:h.jsx(GT,{className:"size-4"})}),h.jsx(Ie,{"aria-label":`Delete ${p.name}`,disabled:!b,onClick:()=>{g(p)},size:"icon",type:"button",variant:"ghost",children:h.jsx(xh,{className:"size-4"})})]})]},p.id))}),h.jsx(q3,{initialValues:c.kind==="edit"?{name:c.profile.name,emoji:c.profile.emoji}:void 0,onOpenChange:p=>{p||m()},onSubmit:y,open:c.kind!=="closed",submitting:o.isPending||l.isPending,title:c.kind==="edit"?"Edit profile":"New profile"})]})}kr.extend(Yh);const cb={off:"Off","6h":"Every 6 hours","12h":"Every 12 hours","24h":"Daily"};function V3(){const{data:n,isLoading:r}=H3(),o=B3(),[l,s]=v.useState("off"),[c,d]=v.useState(!1);v.useEffect(function(){!c&&n&&(s(n.schedule),d(!0))},[n,c]);async function m(){try{await o.mutateAsync(l),Ze.success("Scan schedule saved.")}catch(y){Ze.error(y instanceof Error?y.message:"Couldn't save scan schedule.")}}return r?h.jsx(Ho,{children:h.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading…"})}):h.jsxs(Ho,{children:[h.jsxs("div",{children:[h.jsx("h2",{className:"text-xl font-semibold",children:"Scan schedule"}),h.jsx("p",{className:"text-sm text-muted-foreground",children:"How often Jukebox should automatically scan your libraries for new files."})]}),h.jsxs("div",{className:"mt-6 grid max-w-md gap-4",children:[h.jsxs("div",{className:"grid gap-2",children:[h.jsx(Za,{htmlFor:"scan-schedule",children:"Frequency"}),h.jsxs(Zh,{onValueChange:y=>s(y),value:l,children:[h.jsx(Wh,{className:"w-full",id:"scan-schedule",children:h.jsx(Jh,{})}),h.jsx(em,{children:Object.keys(cb).map(y=>h.jsx(ol,{value:y,children:cb[y]},y))})]})]}),h.jsx("p",{className:"text-xs text-muted-foreground",children:l==="off"?"Automatic scans are off. Trigger scans manually from the Scan page.":n?.nextRunAt?`Next scheduled scan ${kr(n.nextRunAt).fromNow()}.`:"Schedule will start on the next server boot."}),h.jsx("div",{children:h.jsx(Ie,{disabled:o.isPending,onClick:()=>{m()},type:"button",children:o.isPending?"Saving…":"Save schedule"})})]})]})}function F3({addButtonLabel:n,emptyButtonLabel:r,onChange:o,value:l}){const[s,c]=v.useState(null),[d,m]=v.useState(null),y=v.useRef(null);v.useEffect(function(){s!==null&&y.current?.focus()},[s]);function g(){const C=l.length;o([...l,{name:"",path:"",type:"movies"}]),c(C)}function b(C){o(l.filter((R,S)=>S!==C)),s===C&&c(null)}function p(C,R,S){o(l.map((N,j)=>j===C?{...N,[R]:S}:N))}function w(C){const R=l[C];R&&R.path.trim()===""&&b(C),c(null)}return l.length===0?h.jsxs("button",{className:"flex w-full items-center justify-center rounded-lg border border-dashed border-border py-10 text-sm text-muted-foreground transition-colors hover:border-foreground/20 hover:text-foreground",onClick:g,type:"button",children:[h.jsx(nu,{className:"mr-2 size-4"}),r??"Add a folder"]}):h.jsxs("div",{className:"space-y-2",children:[l.map((C,R)=>h.jsxs("div",{className:"flex items-center gap-3",children:[s===R?h.jsx(va,{ref:y,className:"flex-[2]",onBlur:()=>w(R),onChange:S=>p(R,"path",S.target.value),onKeyDown:S=>{S.key==="Enter"&&(S.preventDefault(),y.current?.blur())},placeholder:"/mnt/media/movies",value:C.path}):h.jsx("button",{className:"flex-[2] cursor-pointer truncate rounded-md px-3 py-2 text-left text-sm text-foreground hover:bg-accent",onClick:()=>c(R),type:"button",children:C.path||h.jsx("span",{className:"text-muted-foreground",children:"/mnt/media/movies"})}),h.jsx(Ie,{"aria-label":"Browse folders",onClick:()=>m(R),size:"icon-sm",type:"button",variant:"ghost",children:h.jsx(O0,{className:"size-4"})}),h.jsxs(Zh,{onValueChange:S=>p(R,"type",S),value:C.type,children:[h.jsx(Wh,{className:"w-28",children:h.jsx(Jh,{})}),h.jsxs(em,{children:[h.jsx(ol,{value:"movies",children:"Movies"}),h.jsx(ol,{value:"shows",children:"Shows"})]})]}),h.jsx(Ie,{"aria-label":"Remove library",onClick:()=>b(R),size:"icon-sm",type:"button",variant:"ghost",children:h.jsx(xh,{className:"size-4"})})]},R)),h.jsxs(Ie,{className:"mt-1",onClick:g,size:"sm",type:"button",variant:"ghost",children:[h.jsx(nu,{className:"size-4"}),n??"Add another"]}),d!==null&&h.jsx($w,{initialPath:l[d]?.path,onOpenChange:C=>{C||m(null)},onSelect:C=>{p(d,"path",C)},open:d!==null})]})}function G3(){const n=Vo(),[r,o]=v.useState([]),[l,s]=v.useState(!1),[c,d]=v.useState(!1);v.useEffect(()=>{m()},[]);async function m(){try{const g=await fetch("/api/setup");if(!g.ok)return;const b=await g.json();b.libraries.length>0&&o(b.libraries.map(p=>({name:p.name,path:p.path,type:p.type})))}finally{s(!0)}}async function y(g){g.preventDefault();const b=r.filter(p=>p.path.trim()!=="");if(b.length===0){Ze.error("Please add at least one library.");return}d(!0);try{const p=b.map(C=>({name:C.name.trim()||(C.path.split(/[\\/]/).pop()??C.type),path:C.path.trim(),type:C.type})),w=await fetch("/api/setup/complete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({libraries:p})});if(!w.ok){const C=await w.json();throw new Error(C.error?.message??"Setup failed")}n("/scan")}catch(p){Ze.error(p instanceof Error?p.message:"Setup failed")}finally{d(!1)}}return l?h.jsx("div",{className:"flex min-h-screen items-start justify-center px-6 pt-[15vh] pb-16",children:h.jsxs("div",{className:"w-full max-w-lg",children:[h.jsxs("div",{className:"mb-16 animate-fade-up",children:[h.jsx("h1",{className:"text-4xl font-bold tracking-tight text-foreground",children:"Set up your library"}),h.jsx("p",{className:"mt-3 text-muted-foreground",children:"Add your media folders and we'll take care of the rest."})]}),h.jsx("form",{onSubmit:g=>{y(g)},children:h.jsxs("div",{className:"space-y-16",children:[h.jsxs("section",{className:"animate-fade-up animate-delay-1",children:[h.jsx("h2",{className:"text-sm font-medium uppercase tracking-widest text-muted-foreground",children:"Libraries"}),h.jsx("div",{className:"mt-6",children:h.jsx(F3,{onChange:o,value:r})})]}),h.jsx("div",{className:"animate-fade-up animate-delay-2",children:h.jsx("div",{className:"flex justify-end",children:h.jsx(Ie,{disabled:c,size:"lg",type:"submit",children:c?"Setting up...":"Complete Setup"})})})]})})]})}):null}async function Y3(n){const r=await fetch(`/api/library/shows/${n}`);if(!r.ok)throw new Error("Failed to fetch show");return await r.json()}function I3(n){return St({queryKey:["show",n],queryFn:()=>Y3(n??""),enabled:!!n})}async function Q3(n){const r=await fetch(`/api/progress/episode/show/${n}`);if(!r.ok)throw new Error("Failed to fetch show progress");return await r.json()}function K3(n){if(n===null)return"";if(n<60)return`${n}m`;const r=Math.floor(n/60),o=n%60;return o>0?`${r}h ${o}m`:`${r}h`}function X3(n){return!n||!n.duration?0:Math.min(n.currentTime/n.duration*100,100)}function Z3(n){return!n||!n.duration?!1:n.currentTime>=n.duration*.9}function J3(){const{id:n}=zC(),r=Vo(),{data:o,isLoading:l,error:s}=I3(n),c=o?.id,{data:d}=St({queryKey:["show-progress",c],queryFn:()=>Q3(c??0),enabled:!!c}),m=v.useMemo(()=>{if(!d||!o)return null;let R=null,S="";for(const[N,j]of Object.entries(d)){const O=parseInt(N,10);j.duration&&j.currentTime<j.duration*.9&&(!S||j.updatedAt>S)&&(S=j.updatedAt,R=O)}if(R===null)return null;for(const N of o.seasons)for(const j of N.episodes)if(j.id===R)return N.seasonNumber;return null},[d,o]),[y,g]=v.useState(null);v.useEffect(()=>{if(y!==null||!o)return;if(m!==null){g(m);return}const R=o.seasons[0]?.seasonNumber??1;g(R)},[o,m,y]);function b(R){r(`/watch/episode/${R.id}`)}if(l)return h.jsxs(h.Fragment,{children:[h.jsx(rn,{}),h.jsx("div",{className:"flex items-center justify-center min-h-[60vh]",children:h.jsx(Tu,{className:"size-8 animate-spin text-muted-foreground"})})]});if(s||!o)return h.jsxs(h.Fragment,{children:[h.jsx(rn,{}),h.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[60vh] gap-4",children:[h.jsx("p",{className:"text-foreground",children:"Show not found"}),h.jsx(Ie,{asChild:!0,variant:"outline",children:h.jsx(xn,{to:"/shows",children:"Back to Shows"})})]})]});const p=o.seasons.find(R=>R.seasonNumber===y)??o.seasons[0],w=o.genres?o.genres.split(",").map(R=>R.trim()):[],C=o.seasons.length;return h.jsxs(h.Fragment,{children:[h.jsx(rn,{}),h.jsxs("div",{className:"px-4 pt-4 pb-12 sm:px-6 sm:pt-6",children:[h.jsxs("div",{className:"flex flex-col gap-4 mb-8 sm:flex-row sm:gap-6",children:[h.jsx("div",{className:"flex-shrink-0 w-28 sm:w-40",children:h.jsx(dl,{alt:o.title,className:"w-full rounded-lg",url:o.posterUrl,title:o.title})}),h.jsxs("div",{className:"flex flex-col gap-3 min-w-0",children:[h.jsx("h1",{className:"text-xl font-bold text-foreground sm:text-2xl",children:o.title}),h.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm text-muted-foreground",children:[o.year&&h.jsx("span",{children:o.year}),o.rating&&h.jsxs("span",{children:[o.rating.toFixed(1)," rating"]}),h.jsxs("span",{children:[C," ",C===1?"season":"seasons"]}),w.length>0&&h.jsx("span",{children:w.join(", ")})]}),o.overview&&h.jsx("p",{className:"text-sm text-muted-foreground max-w-2xl leading-relaxed",children:o.overview})]})]}),h.jsx("div",{className:"flex flex-wrap gap-2 mb-6",children:o.seasons.map(R=>h.jsx("button",{className:`cursor-pointer rounded-md px-4 min-h-11 text-sm font-medium transition-colors ${R.seasonNumber===y?"bg-foreground text-background":"bg-muted text-muted-foreground hover:text-foreground"}`,onClick:()=>g(R.seasonNumber),type:"button",children:R.name??`Season ${R.seasonNumber}`},R.id))}),p&&h.jsx("div",{className:"flex flex-col gap-1",children:p.episodes.map(R=>{const S=K3(R.runtime),N=d?.[R.id],j=X3(N),O=Z3(N),k=j>0&&!O;return h.jsxs("div",{className:"group flex items-start gap-4 rounded-lg px-3 py-3 cursor-pointer hover:bg-muted transition-colors",onClick:()=>b(R),children:[h.jsx("div",{className:"flex-shrink-0 w-10 text-right text-sm text-muted-foreground pt-0.5",children:R.episodeNumber}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:`font-medium ${O?"text-muted-foreground":"text-foreground"}`,children:R.title}),S&&h.jsx("span",{className:"text-xs text-muted-foreground",children:S}),O&&h.jsx("span",{className:"text-xs text-muted-foreground/60",children:"Watched"})]}),R.overview&&h.jsx("p",{className:"text-sm text-muted-foreground mt-1 line-clamp-2",children:R.overview}),k&&h.jsx("div",{className:"mt-2 h-1 w-full max-w-xs rounded-full bg-muted",children:h.jsx("div",{className:"h-full rounded-full bg-red-600 transition-all",style:{width:`${j}%`}})})]}),h.jsx("div",{className:"flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity pt-0.5",children:h.jsx(IT,{className:"size-4 text-foreground"})})]},R.id)})})]})]})}function W3(){const{data:n,isLoading:r}=hw(),o=v.useMemo(()=>n?n.map(s=>({type:"show",item:s})):[],[n]),l=v.useMemo(()=>o.length===0?[]:Kh(o),[o]);return r?h.jsxs(h.Fragment,{children:[h.jsx(rn,{}),h.jsxs("div",{className:"pt-4",children:[h.jsx(Yt,{}),h.jsx(Yt,{}),h.jsx(Yt,{}),h.jsx(Yt,{}),h.jsx(Yt,{})]})]}):o.length===0?h.jsxs(h.Fragment,{children:[h.jsx(rn,{}),h.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[60vh] gap-4 text-center px-6",children:[h.jsx(Nu,{className:"size-16 text-muted-foreground"}),h.jsx("h2",{className:"text-xl font-semibold text-foreground",children:"No shows in your library"}),h.jsxs("p",{className:"text-sm text-muted-foreground max-w-md",children:["Run"," ",h.jsx("code",{className:"bg-muted px-2 py-1 rounded text-xs font-mono",children:"bun run scan --shows /path/to/shows"})," ","to add your collection."]})]})]}):h.jsxs(h.Fragment,{children:[h.jsx(rn,{}),h.jsx("div",{className:"pt-2 pb-8",children:l.map(({genre:s,items:c})=>h.jsx(el,{items:c,title:s},s))})]})}const fb=v.lazy(()=>db(()=>import("./Watch-DE2orFm6.js"),__vite__mapDeps([0,1])).then(n=>({default:n.WatchPage}))),e4=new UE;tR({immediate:!0});function t4(){const{data:n,isLoading:r}=Eh();return r?null:n?.enabled&&!n.authenticated?h.jsx(pu,{to:"/login",replace:!0}):h.jsx(rM,{children:h.jsx(Bb,{})})}function n4(){const{data:n,isLoading:r}=dM();return r?null:n?.needsSetup?h.jsx(pu,{to:"/setup",replace:!0}):h.jsx(Bb,{})}const Fw=document.getElementById("root");if(!Fw)throw new Error("Root element not found");const a4=h.jsx(v.StrictMode,{children:h.jsxs(HE,{client:e4,children:[h.jsx(b2,{children:h.jsxs(KC,{children:[h.jsx(wt,{path:"/login",element:h.jsx(TD,{})}),h.jsxs(wt,{element:h.jsx(t4,{}),children:[h.jsx(wt,{path:"/scan",element:h.jsx(_D,{})}),h.jsx(wt,{path:"/setup",element:h.jsx(G3,{})}),h.jsxs(wt,{element:h.jsx(n4,{}),children:[h.jsx(wt,{path:"/",element:h.jsx(SD,{})}),h.jsx(wt,{path:"/movies",element:h.jsx(jD,{})}),h.jsx(wt,{path:"/shows",element:h.jsx(W3,{})}),h.jsx(wt,{path:"/shows/:id",element:h.jsx(J3,{})}),h.jsx(wt,{path:"/settings",element:h.jsx(pu,{to:"/settings/profiles",replace:!0})}),h.jsx(wt,{path:"/settings/profiles",element:h.jsx($3,{})}),h.jsx(wt,{path:"/settings/libraries",element:h.jsx(P3,{})}),h.jsx(wt,{path:"/settings/scan-schedule",element:h.jsx(V3,{})}),h.jsx(wt,{path:"/settings/auth",element:h.jsx(kD,{})}),h.jsx(wt,{path:"/watch/:id",element:h.jsx(v.Suspense,{children:h.jsx(fb,{})})}),h.jsx(wt,{path:"/watch/episode/:id",element:h.jsx(v.Suspense,{children:h.jsx(fb,{})})})]})]})]})}),h.jsx(eR,{position:"bottom-right",theme:"dark"})]})});hE.createRoot(Fw).render(a4);export{ST as A,Ie as B,T_ as C,Rd as I,Tu as L,IT as P,C_ as R,j3 as S,R_ as T,D0 as X,r4 as a,o4 as b,Qe as c,N_ as d,Fe as e,M0 as f,hu as g,dl as h,zC as i,h as j,tr as k,Vo as l,xn as m,O3 as n,_3 as o,i4 as p,v as r,Ze as t,St as u};