mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
12 lines
304 KiB
JavaScript
12 lines
304 KiB
JavaScript
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const h of f)if(h.type==="childList")for(const m of h.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&r(m)}).observe(document,{childList:!0,subtree:!0});function c(f){const h={};return f.integrity&&(h.integrity=f.integrity),f.referrerPolicy&&(h.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?h.credentials="include":f.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function r(f){if(f.ep)return;f.ep=!0;const h=c(f);fetch(f.href,h)}})();var lr={exports:{}},Ga={};var Zd;function M0(){if(Zd)return Ga;Zd=1;var u=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function c(r,f,h){var m=null;if(h!==void 0&&(m=""+h),f.key!==void 0&&(m=""+f.key),"key"in f){h={};for(var b in f)b!=="key"&&(h[b]=f[b])}else h=f;return f=h.ref,{$$typeof:u,type:r,key:m,ref:f!==void 0?f:null,props:h}}return Ga.Fragment=i,Ga.jsx=c,Ga.jsxs=c,Ga}var Kd;function D0(){return Kd||(Kd=1,lr.exports=M0()),lr.exports}var p=D0(),ar={exports:{}},I={};var Jd;function j0(){if(Jd)return I;Jd=1;var u=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),m=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),C=Symbol.iterator;function z(_){return _===null||typeof _!="object"?null:(_=C&&_[C]||_["@@iterator"],typeof _=="function"?_:null)}var H={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,Y={};function L(_,B,G){this.props=_,this.context=B,this.refs=Y,this.updater=G||H}L.prototype.isReactComponent={},L.prototype.setState=function(_,B){if(typeof _!="object"&&typeof _!="function"&&_!=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,_,B,"setState")},L.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function q(){}q.prototype=L.prototype;function Q(_,B,G){this.props=_,this.context=B,this.refs=Y,this.updater=G||H}var P=Q.prototype=new q;P.constructor=Q,k(P,L.prototype),P.isPureReactComponent=!0;var ye=Array.isArray;function Re(){}var $={H:null,A:null,T:null,S:null},Te=Object.prototype.hasOwnProperty;function xe(_,B,G){var Z=G.ref;return{$$typeof:u,type:_,key:B,ref:Z!==void 0?Z:null,props:G}}function Ue(_,B){return xe(_.type,B,_.props)}function Xe(_){return typeof _=="object"&&_!==null&&_.$$typeof===u}function We(_){var B={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(G){return B[G]})}var Hn=/\/+/g;function kt(_,B){return typeof _=="object"&&_!==null&&_.key!=null?We(""+_.key):B.toString(36)}function Nt(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(Re,Re):(_.status="pending",_.then(function(B){_.status==="pending"&&(_.status="fulfilled",_.value=B)},function(B){_.status==="pending"&&(_.status="rejected",_.reason=B)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function j(_,B,G,Z,ee){var le=typeof _;(le==="undefined"||le==="boolean")&&(_=null);var de=!1;if(_===null)de=!0;else switch(le){case"bigint":case"string":case"number":de=!0;break;case"object":switch(_.$$typeof){case u:case i:de=!0;break;case T:return de=_._init,j(de(_._payload),B,G,Z,ee)}}if(de)return ee=ee(_),de=Z===""?"."+kt(_,0):Z,ye(ee)?(G="",de!=null&&(G=de.replace(Hn,"$&/")+"/"),j(ee,B,G,"",function(Wl){return Wl})):ee!=null&&(Xe(ee)&&(ee=Ue(ee,G+(ee.key==null||_&&_.key===ee.key?"":(""+ee.key).replace(Hn,"$&/")+"/")+de)),B.push(ee)),1;de=0;var Pe=Z===""?".":Z+":";if(ye(_))for(var De=0;De<_.length;De++)Z=_[De],le=Pe+kt(Z,De),de+=j(Z,B,G,le,ee);else if(De=z(_),typeof De=="function")for(_=De.call(_),De=0;!(Z=_.next()).done;)Z=Z.value,le=Pe+kt(Z,De++),de+=j(Z,B,G,le,ee);else if(le==="object"){if(typeof _.then=="function")return j(Nt(_),B,G,Z,ee);throw B=String(_),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return de}function X(_,B,G){if(_==null)return _;var Z=[],ee=0;return j(_,Z,"","",function(le){return B.call(G,le,ee++)}),Z}function F(_){if(_._status===-1){var B=_._result;B=B(),B.then(function(G){(_._status===0||_._status===-1)&&(_._status=1,_._result=G)},function(G){(_._status===0||_._status===-1)&&(_._status=2,_._result=G)}),_._status===-1&&(_._status=0,_._result=B)}if(_._status===1)return _._result.default;throw _._result}var ve=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},_e={map:X,forEach:function(_,B,G){X(_,function(){B.apply(this,arguments)},G)},count:function(_){var B=0;return X(_,function(){B++}),B},toArray:function(_){return X(_,function(B){return B})||[]},only:function(_){if(!Xe(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return I.Activity=S,I.Children=_e,I.Component=L,I.Fragment=c,I.Profiler=f,I.PureComponent=Q,I.StrictMode=r,I.Suspense=y,I.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,I.__COMPILER_RUNTIME={__proto__:null,c:function(_){return $.H.useMemoCache(_)}},I.cache=function(_){return function(){return _.apply(null,arguments)}},I.cacheSignal=function(){return null},I.cloneElement=function(_,B,G){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var Z=k({},_.props),ee=_.key;if(B!=null)for(le in B.key!==void 0&&(ee=""+B.key),B)!Te.call(B,le)||le==="key"||le==="__self"||le==="__source"||le==="ref"&&B.ref===void 0||(Z[le]=B[le]);var le=arguments.length-2;if(le===1)Z.children=G;else if(1<le){for(var de=Array(le),Pe=0;Pe<le;Pe++)de[Pe]=arguments[Pe+2];Z.children=de}return xe(_.type,ee,Z)},I.createContext=function(_){return _={$$typeof:m,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:h,_context:_},_},I.createElement=function(_,B,G){var Z,ee={},le=null;if(B!=null)for(Z in B.key!==void 0&&(le=""+B.key),B)Te.call(B,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(ee[Z]=B[Z]);var de=arguments.length-2;if(de===1)ee.children=G;else if(1<de){for(var Pe=Array(de),De=0;De<de;De++)Pe[De]=arguments[De+2];ee.children=Pe}if(_&&_.defaultProps)for(Z in de=_.defaultProps,de)ee[Z]===void 0&&(ee[Z]=de[Z]);return xe(_,le,ee)},I.createRef=function(){return{current:null}},I.forwardRef=function(_){return{$$typeof:b,render:_}},I.isValidElement=Xe,I.lazy=function(_){return{$$typeof:T,_payload:{_status:-1,_result:_},_init:F}},I.memo=function(_,B){return{$$typeof:v,type:_,compare:B===void 0?null:B}},I.startTransition=function(_){var B=$.T,G={};$.T=G;try{var Z=_(),ee=$.S;ee!==null&&ee(G,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(Re,ve)}catch(le){ve(le)}finally{B!==null&&G.types!==null&&(B.types=G.types),$.T=B}},I.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},I.use=function(_){return $.H.use(_)},I.useActionState=function(_,B,G){return $.H.useActionState(_,B,G)},I.useCallback=function(_,B){return $.H.useCallback(_,B)},I.useContext=function(_){return $.H.useContext(_)},I.useDebugValue=function(){},I.useDeferredValue=function(_,B){return $.H.useDeferredValue(_,B)},I.useEffect=function(_,B){return $.H.useEffect(_,B)},I.useEffectEvent=function(_){return $.H.useEffectEvent(_)},I.useId=function(){return $.H.useId()},I.useImperativeHandle=function(_,B,G){return $.H.useImperativeHandle(_,B,G)},I.useInsertionEffect=function(_,B){return $.H.useInsertionEffect(_,B)},I.useLayoutEffect=function(_,B){return $.H.useLayoutEffect(_,B)},I.useMemo=function(_,B){return $.H.useMemo(_,B)},I.useOptimistic=function(_,B){return $.H.useOptimistic(_,B)},I.useReducer=function(_,B,G){return $.H.useReducer(_,B,G)},I.useRef=function(_){return $.H.useRef(_)},I.useState=function(_){return $.H.useState(_)},I.useSyncExternalStore=function(_,B,G){return $.H.useSyncExternalStore(_,B,G)},I.useTransition=function(){return $.H.useTransition()},I.version="19.2.0",I}var $d;function Mu(){return $d||($d=1,ar.exports=j0()),ar.exports}var E=Mu(),ir={exports:{}},Va={},ur={exports:{}},sr={};var Wd;function w0(){return Wd||(Wd=1,(function(u){function i(j,X){var F=j.length;j.push(X);e:for(;0<F;){var ve=F-1>>>1,_e=j[ve];if(0<f(_e,X))j[ve]=X,j[F]=_e,F=ve;else break e}}function c(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var X=j[0],F=j.pop();if(F!==X){j[0]=F;e:for(var ve=0,_e=j.length,_=_e>>>1;ve<_;){var B=2*(ve+1)-1,G=j[B],Z=B+1,ee=j[Z];if(0>f(G,F))Z<_e&&0>f(ee,G)?(j[ve]=ee,j[Z]=F,ve=Z):(j[ve]=G,j[B]=F,ve=B);else if(Z<_e&&0>f(ee,F))j[ve]=ee,j[Z]=F,ve=Z;else break e}}return X}function f(j,X){var F=j.sortIndex-X.sortIndex;return F!==0?F:j.id-X.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;u.unstable_now=function(){return h.now()}}else{var m=Date,b=m.now();u.unstable_now=function(){return m.now()-b}}var y=[],v=[],T=1,S=null,C=3,z=!1,H=!1,k=!1,Y=!1,L=typeof setTimeout=="function"?setTimeout:null,q=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function P(j){for(var X=c(v);X!==null;){if(X.callback===null)r(v);else if(X.startTime<=j)r(v),X.sortIndex=X.expirationTime,i(y,X);else break;X=c(v)}}function ye(j){if(k=!1,P(j),!H)if(c(y)!==null)H=!0,Re||(Re=!0,We());else{var X=c(v);X!==null&&Nt(ye,X.startTime-j)}}var Re=!1,$=-1,Te=5,xe=-1;function Ue(){return Y?!0:!(u.unstable_now()-xe<Te)}function Xe(){if(Y=!1,Re){var j=u.unstable_now();xe=j;var X=!0;try{e:{H=!1,k&&(k=!1,q($),$=-1),z=!0;var F=C;try{t:{for(P(j),S=c(y);S!==null&&!(S.expirationTime>j&&Ue());){var ve=S.callback;if(typeof ve=="function"){S.callback=null,C=S.priorityLevel;var _e=ve(S.expirationTime<=j);if(j=u.unstable_now(),typeof _e=="function"){S.callback=_e,P(j),X=!0;break t}S===c(y)&&r(y),P(j)}else r(y);S=c(y)}if(S!==null)X=!0;else{var _=c(v);_!==null&&Nt(ye,_.startTime-j),X=!1}}break e}finally{S=null,C=F,z=!1}X=void 0}}finally{X?We():Re=!1}}}var We;if(typeof Q=="function")We=function(){Q(Xe)};else if(typeof MessageChannel<"u"){var Hn=new MessageChannel,kt=Hn.port2;Hn.port1.onmessage=Xe,We=function(){kt.postMessage(null)}}else We=function(){L(Xe,0)};function Nt(j,X){$=L(function(){j(u.unstable_now())},X)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(j){j.callback=null},u.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Te=0<j?Math.floor(1e3/j):5},u.unstable_getCurrentPriorityLevel=function(){return C},u.unstable_next=function(j){switch(C){case 1:case 2:case 3:var X=3;break;default:X=C}var F=C;C=X;try{return j()}finally{C=F}},u.unstable_requestPaint=function(){Y=!0},u.unstable_runWithPriority=function(j,X){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var F=C;C=j;try{return X()}finally{C=F}},u.unstable_scheduleCallback=function(j,X,F){var ve=u.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?ve+F:ve):F=ve,j){case 1:var _e=-1;break;case 2:_e=250;break;case 5:_e=1073741823;break;case 4:_e=1e4;break;default:_e=5e3}return _e=F+_e,j={id:T++,callback:X,priorityLevel:j,startTime:F,expirationTime:_e,sortIndex:-1},F>ve?(j.sortIndex=F,i(v,j),c(y)===null&&j===c(v)&&(k?(q($),$=-1):k=!0,Nt(ye,F-ve))):(j.sortIndex=_e,i(y,j),H||z||(H=!0,Re||(Re=!0,We()))),j},u.unstable_shouldYield=Ue,u.unstable_wrapCallback=function(j){var X=C;return function(){var F=C;C=X;try{return j.apply(this,arguments)}finally{C=F}}}})(sr)),sr}var Fd;function U0(){return Fd||(Fd=1,ur.exports=w0()),ur.exports}var cr={exports:{}},Fe={};var Pd;function B0(){if(Pd)return Fe;Pd=1;var u=Mu();function i(y){var v="https://react.dev/errors/"+y;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var T=2;T<arguments.length;T++)v+="&args[]="+encodeURIComponent(arguments[T])}return"Minified React error #"+y+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var r={d:{f:c,r:function(){throw Error(i(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},f=Symbol.for("react.portal");function h(y,v,T){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:S==null?null:""+S,children:y,containerInfo:v,implementation:T}}var m=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function b(y,v){if(y==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return Fe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Fe.createPortal=function(y,v){var T=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(i(299));return h(y,v,null,T)},Fe.flushSync=function(y){var v=m.T,T=r.p;try{if(m.T=null,r.p=2,y)return y()}finally{m.T=v,r.p=T,r.d.f()}},Fe.preconnect=function(y,v){typeof y=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,r.d.C(y,v))},Fe.prefetchDNS=function(y){typeof y=="string"&&r.d.D(y)},Fe.preinit=function(y,v){if(typeof y=="string"&&v&&typeof v.as=="string"){var T=v.as,S=b(T,v.crossOrigin),C=typeof v.integrity=="string"?v.integrity:void 0,z=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;T==="style"?r.d.S(y,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:S,integrity:C,fetchPriority:z}):T==="script"&&r.d.X(y,{crossOrigin:S,integrity:C,fetchPriority:z,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},Fe.preinitModule=function(y,v){if(typeof y=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var T=b(v.as,v.crossOrigin);r.d.M(y,{crossOrigin:T,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&r.d.M(y)},Fe.preload=function(y,v){if(typeof y=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var T=v.as,S=b(T,v.crossOrigin);r.d.L(y,T,{crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},Fe.preloadModule=function(y,v){if(typeof y=="string")if(v){var T=b(v.as,v.crossOrigin);r.d.m(y,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:T,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else r.d.m(y)},Fe.requestFormReset=function(y){r.d.r(y)},Fe.unstable_batchedUpdates=function(y,v){return y(v)},Fe.useFormState=function(y,v,T){return m.H.useFormState(y,v,T)},Fe.useFormStatus=function(){return m.H.useHostTransitionStatus()},Fe.version="19.2.0",Fe}var Id;function L0(){if(Id)return cr.exports;Id=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(i){console.error(i)}}return u(),cr.exports=B0(),cr.exports}var em;function H0(){if(em)return Va;em=1;var u=U0(),i=Mu(),c=L0();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}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 f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function m(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 b(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(h(e)!==e)throw Error(r(188))}function v(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(r(188));return t!==e?null:e}for(var n=e,l=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(l=a.return,l!==null){n=l;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return y(a),e;if(s===l)return y(a),t;s=s.sibling}throw Error(r(188))}if(n.return!==l.return)n=a,l=s;else{for(var o=!1,d=a.child;d;){if(d===n){o=!0,n=a,l=s;break}if(d===l){o=!0,l=a,n=s;break}d=d.sibling}if(!o){for(d=s.child;d;){if(d===n){o=!0,n=s,l=a;break}if(d===l){o=!0,l=s,n=a;break}d=d.sibling}if(!o)throw Error(r(189))}}if(n.alternate!==l)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function T(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=T(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,C=Symbol.for("react.element"),z=Symbol.for("react.transitional.element"),H=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),q=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),ye=Symbol.for("react.suspense"),Re=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),Te=Symbol.for("react.lazy"),xe=Symbol.for("react.activity"),Ue=Symbol.for("react.memo_cache_sentinel"),Xe=Symbol.iterator;function We(e){return e===null||typeof e!="object"?null:(e=Xe&&e[Xe]||e["@@iterator"],typeof e=="function"?e:null)}var Hn=Symbol.for("react.client.reference");function kt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Hn?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case k:return"Fragment";case L:return"Profiler";case Y:return"StrictMode";case ye:return"Suspense";case Re:return"SuspenseList";case xe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case H:return"Portal";case Q:return e.displayName||"Context";case q:return(e._context.displayName||"Context")+".Consumer";case P:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $:return t=e.displayName||null,t!==null?t:kt(e.type)||"Memo";case Te:t=e._payload,e=e._init;try{return kt(e(t))}catch{}}return null}var Nt=Array.isArray,j=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},ve=[],_e=-1;function _(e){return{current:e}}function B(e){0>_e||(e.current=ve[_e],ve[_e]=null,_e--)}function G(e,t){_e++,ve[_e]=e.current,e.current=t}var Z=_(null),ee=_(null),le=_(null),de=_(null);function Pe(e,t){switch(G(le,t),G(ee,e),G(Z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?pd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=pd(t),e=yd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(Z),G(Z,e)}function De(){B(Z),B(ee),B(le)}function Wl(e){e.memoizedState!==null&&G(de,e);var t=Z.current,n=yd(t,e.type);t!==n&&(G(ee,e),G(Z,n))}function ti(e){ee.current===e&&(B(Z),B(ee)),de.current===e&&(B(de),qa._currentValue=F)}var qu,Gr;function qn(e){if(qu===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);qu=t&&t[1]||"",Gr=-1<n.stack.indexOf(`
|
||
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||
`+qu+e+Gr}var Yu=!1;function ku(e,t){if(!e||Yu)return"";Yu=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var U=function(){throw Error()};if(Object.defineProperty(U.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(U,[])}catch(M){var O=M}Reflect.construct(e,[],U)}else{try{U.call()}catch(M){O=M}e.call(U.prototype)}}else{try{throw Error()}catch(M){O=M}(U=e())&&typeof U.catch=="function"&&U.catch(function(){})}}catch(M){if(M&&O&&typeof M.stack=="string")return[M.stack,O.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=l.DetermineComponentFrameRoot(),o=s[0],d=s[1];if(o&&d){var g=o.split(`
|
||
`),N=d.split(`
|
||
`);for(a=l=0;l<g.length&&!g[l].includes("DetermineComponentFrameRoot");)l++;for(;a<N.length&&!N[a].includes("DetermineComponentFrameRoot");)a++;if(l===g.length||a===N.length)for(l=g.length-1,a=N.length-1;1<=l&&0<=a&&g[l]!==N[a];)a--;for(;1<=l&&0<=a;l--,a--)if(g[l]!==N[a]){if(l!==1||a!==1)do if(l--,a--,0>a||g[l]!==N[a]){var D=`
|
||
`+g[l].replace(" at new "," at ");return e.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",e.displayName)),D}while(1<=l&&0<=a);break}}}finally{Yu=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?qn(n):""}function cp(e,t){switch(e.tag){case 26:case 27:case 5:return qn(e.type);case 16:return qn("Lazy");case 13:return e.child!==t&&t!==null?qn("Suspense Fallback"):qn("Suspense");case 19:return qn("SuspenseList");case 0:case 15:return ku(e.type,!1);case 11:return ku(e.type.render,!1);case 1:return ku(e.type,!0);case 31:return qn("Activity");default:return""}}function Vr(e){try{var t="",n=null;do t+=cp(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
|
||
Error generating stack: `+l.message+`
|
||
`+l.stack}}var Xu=Object.prototype.hasOwnProperty,Gu=u.unstable_scheduleCallback,Vu=u.unstable_cancelCallback,rp=u.unstable_shouldYield,op=u.unstable_requestPaint,st=u.unstable_now,fp=u.unstable_getCurrentPriorityLevel,Qr=u.unstable_ImmediatePriority,Zr=u.unstable_UserBlockingPriority,ni=u.unstable_NormalPriority,hp=u.unstable_LowPriority,Kr=u.unstable_IdlePriority,dp=u.log,mp=u.unstable_setDisableYieldValue,Fl=null,ct=null;function hn(e){if(typeof dp=="function"&&mp(e),ct&&typeof ct.setStrictMode=="function")try{ct.setStrictMode(Fl,e)}catch{}}var rt=Math.clz32?Math.clz32:vp,pp=Math.log,yp=Math.LN2;function vp(e){return e>>>=0,e===0?32:31-(pp(e)/yp|0)|0}var li=256,ai=262144,ii=4194304;function Yn(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 ui(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var a=0,s=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var d=l&134217727;return d!==0?(l=d&~s,l!==0?a=Yn(l):(o&=d,o!==0?a=Yn(o):n||(n=d&~e,n!==0&&(a=Yn(n))))):(d=l&~s,d!==0?a=Yn(d):o!==0?a=Yn(o):n||(n=l&~e,n!==0&&(a=Yn(n)))),a===0?0:t!==0&&t!==a&&(t&s)===0&&(s=a&-a,n=t&-t,s>=n||s===32&&(n&4194048)!==0)?t:a}function Pl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function gp(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 Jr(){var e=ii;return ii<<=1,(ii&62914560)===0&&(ii=4194304),e}function Qu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Il(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function bp(e,t,n,l,a,s){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var d=e.entanglements,g=e.expirationTimes,N=e.hiddenUpdates;for(n=o&~n;0<n;){var D=31-rt(n),U=1<<D;d[D]=0,g[D]=-1;var O=N[D];if(O!==null)for(N[D]=null,D=0;D<O.length;D++){var M=O[D];M!==null&&(M.lane&=-536870913)}n&=~U}l!==0&&$r(e,l,0),s!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=s&~(o&~t))}function $r(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-rt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function Wr(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-rt(n),a=1<<l;a&t|e[l]&t&&(e[l]|=t),n&=~a}}function Fr(e,t){var n=t&-t;return n=(n&42)!==0?1:Zu(n),(n&(e.suspendedLanes|t))!==0?0:n}function Zu(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 Ku(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Pr(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:qd(e.type))}function Ir(e,t){var n=X.p;try{return X.p=e,t()}finally{X.p=n}}var dn=Math.random().toString(36).slice(2),Qe="__reactFiber$"+dn,et="__reactProps$"+dn,cl="__reactContainer$"+dn,Ju="__reactEvents$"+dn,Sp="__reactListeners$"+dn,xp="__reactHandles$"+dn,eo="__reactResources$"+dn,ea="__reactMarker$"+dn;function $u(e){delete e[Qe],delete e[et],delete e[Ju],delete e[Sp],delete e[xp]}function rl(e){var t=e[Qe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[cl]||n[Qe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ed(e);e!==null;){if(n=e[Qe])return n;e=Ed(e)}return t}e=n,n=e.parentNode}return null}function ol(e){if(e=e[Qe]||e[cl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ta(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function fl(e){var t=e[eo];return t||(t=e[eo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ge(e){e[ea]=!0}var to=new Set,no={};function kn(e,t){hl(e,t),hl(e+"Capture",t)}function hl(e,t){for(no[e]=t,e=0;e<t.length;e++)to.add(t[e])}var _p=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]*$"),lo={},ao={};function Ep(e){return Xu.call(ao,e)?!0:Xu.call(lo,e)?!1:_p.test(e)?ao[e]=!0:(lo[e]=!0,!1)}function si(e,t,n){if(Ep(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function ci(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Xt(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}function vt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function io(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Tp(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var a=l.get,s=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wu(e){if(!e._valueTracker){var t=io(e)?"checked":"value";e._valueTracker=Tp(e,t,""+e[t])}}function uo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=io(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function ri(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 Ap=/[\n"\\]/g;function gt(e){return e.replace(Ap,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Fu(e,t,n,l,a,s,o,d){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+vt(t)):e.value!==""+vt(t)&&(e.value=""+vt(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?Pu(e,o,vt(t)):n!=null?Pu(e,o,vt(n)):l!=null&&e.removeAttribute("value"),a==null&&s!=null&&(e.defaultChecked=!!s),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.name=""+vt(d):e.removeAttribute("name")}function so(e,t,n,l,a,s,o,d){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||n!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){Wu(e);return}n=n!=null?""+vt(n):"",t=t!=null?""+vt(t):n,d||t===e.value||(e.value=t),e.defaultValue=t}l=l??a,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=d?e.checked:!!l,e.defaultChecked=!!l,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),Wu(e)}function Pu(e,t,n){t==="number"&&ri(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function dl(e,t,n,l){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&l&&(e[n].defaultSelected=!0)}else{for(n=""+vt(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,l&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function co(e,t,n){if(t!=null&&(t=""+vt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+vt(n):""}function ro(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(r(92));if(Nt(l)){if(1<l.length)throw Error(r(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=vt(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),Wu(e)}function ml(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Cp=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 oo(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||Cp.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function fo(e,t,n){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var a in t)l=t[a],t.hasOwnProperty(a)&&n[a]!==l&&oo(e,a,l)}else for(var s in t)t.hasOwnProperty(s)&&oo(e,s,t[s])}function Iu(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 Rp=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"]]),Np=/^[\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 oi(e){return Np.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Gt(){}var es=null;function ts(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var pl=null,yl=null;function ho(e){var t=ol(e);if(t&&(e=t.stateNode)){var n=e[et]||null;e:switch(e=t.stateNode,t.type){case"input":if(Fu(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+gt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var a=l[et]||null;if(!a)throw Error(r(90));Fu(l,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&uo(l)}break e;case"textarea":co(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&dl(e,!!n.multiple,t,!1)}}}var ns=!1;function mo(e,t,n){if(ns)return e(t,n);ns=!0;try{var l=e(t);return l}finally{if(ns=!1,(pl!==null||yl!==null)&&(Fi(),pl&&(t=pl,e=yl,yl=pl=null,ho(t),e)))for(t=0;t<e.length;t++)ho(e[t])}}function na(e,t){var n=e.stateNode;if(n===null)return null;var l=n[et]||null;if(l===null)return null;n=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(r(231,t,typeof n));return n}var Vt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ls=!1;if(Vt)try{var la={};Object.defineProperty(la,"passive",{get:function(){ls=!0}}),window.addEventListener("test",la,la),window.removeEventListener("test",la,la)}catch{ls=!1}var mn=null,as=null,fi=null;function po(){if(fi)return fi;var e,t=as,n=t.length,l,a="value"in mn?mn.value:mn.textContent,s=a.length;for(e=0;e<n&&t[e]===a[e];e++);var o=n-e;for(l=1;l<=o&&t[n-l]===a[s-l];l++);return fi=a.slice(e,1<l?1-l:void 0)}function hi(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 di(){return!0}function yo(){return!1}function tt(e){function t(n,l,a,s,o){this._reactName=n,this._targetInst=a,this.type=l,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var d in e)e.hasOwnProperty(d)&&(n=e[d],this[d]=n?n(s):s[d]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?di:yo,this.isPropagationStopped=yo,this}return S(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=di)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=di)},persist:function(){},isPersistent:di}),t}var Xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mi=tt(Xn),aa=S({},Xn,{view:0,detail:0}),Op=tt(aa),is,us,ia,pi=S({},aa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cs,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!==ia&&(ia&&e.type==="mousemove"?(is=e.screenX-ia.screenX,us=e.screenY-ia.screenY):us=is=0,ia=e),is)},movementY:function(e){return"movementY"in e?e.movementY:us}}),vo=tt(pi),zp=S({},pi,{dataTransfer:0}),Mp=tt(zp),Dp=S({},aa,{relatedTarget:0}),ss=tt(Dp),jp=S({},Xn,{animationName:0,elapsedTime:0,pseudoElement:0}),wp=tt(jp),Up=S({},Xn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Bp=tt(Up),Lp=S({},Xn,{data:0}),go=tt(Lp),Hp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qp={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"},Yp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Yp[e])?!!t[e]:!1}function cs(){return kp}var Xp=S({},aa,{key:function(e){if(e.key){var t=Hp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=hi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?qp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cs,charCode:function(e){return e.type==="keypress"?hi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?hi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Gp=tt(Xp),Vp=S({},pi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bo=tt(Vp),Qp=S({},aa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cs}),Zp=tt(Qp),Kp=S({},Xn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Jp=tt(Kp),$p=S({},pi,{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}),Wp=tt($p),Fp=S({},Xn,{newState:0,oldState:0}),Pp=tt(Fp),Ip=[9,13,27,32],rs=Vt&&"CompositionEvent"in window,ua=null;Vt&&"documentMode"in document&&(ua=document.documentMode);var ey=Vt&&"TextEvent"in window&&!ua,So=Vt&&(!rs||ua&&8<ua&&11>=ua),xo=" ",_o=!1;function Eo(e,t){switch(e){case"keyup":return Ip.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function To(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var vl=!1;function ty(e,t){switch(e){case"compositionend":return To(t);case"keypress":return t.which!==32?null:(_o=!0,xo);case"textInput":return e=t.data,e===xo&&_o?null:e;default:return null}}function ny(e,t){if(vl)return e==="compositionend"||!rs&&Eo(e,t)?(e=po(),fi=as=mn=null,vl=!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 So&&t.locale!=="ko"?null:t.data;default:return null}}var ly={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 Ao(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ly[e.type]:t==="textarea"}function Co(e,t,n,l){pl?yl?yl.push(l):yl=[l]:pl=l,t=au(t,"onChange"),0<t.length&&(n=new mi("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var sa=null,ca=null;function ay(e){rd(e,0)}function yi(e){var t=ta(e);if(uo(t))return e}function Ro(e,t){if(e==="change")return t}var No=!1;if(Vt){var os;if(Vt){var fs="oninput"in document;if(!fs){var Oo=document.createElement("div");Oo.setAttribute("oninput","return;"),fs=typeof Oo.oninput=="function"}os=fs}else os=!1;No=os&&(!document.documentMode||9<document.documentMode)}function zo(){sa&&(sa.detachEvent("onpropertychange",Mo),ca=sa=null)}function Mo(e){if(e.propertyName==="value"&&yi(ca)){var t=[];Co(t,ca,e,ts(e)),mo(ay,t)}}function iy(e,t,n){e==="focusin"?(zo(),sa=t,ca=n,sa.attachEvent("onpropertychange",Mo)):e==="focusout"&&zo()}function uy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yi(ca)}function sy(e,t){if(e==="click")return yi(t)}function cy(e,t){if(e==="input"||e==="change")return yi(t)}function ry(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ot=typeof Object.is=="function"?Object.is:ry;function ra(e,t){if(ot(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var a=n[l];if(!Xu.call(t,a)||!ot(e[a],t[a]))return!1}return!0}function Do(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jo(e,t){var n=Do(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Do(n)}}function wo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Uo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ri(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ri(e.document)}return t}function hs(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 oy=Vt&&"documentMode"in document&&11>=document.documentMode,gl=null,ds=null,oa=null,ms=!1;function Bo(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ms||gl==null||gl!==ri(l)||(l=gl,"selectionStart"in l&&hs(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),oa&&ra(oa,l)||(oa=l,l=au(ds,"onSelect"),0<l.length&&(t=new mi("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=gl)))}function Gn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var bl={animationend:Gn("Animation","AnimationEnd"),animationiteration:Gn("Animation","AnimationIteration"),animationstart:Gn("Animation","AnimationStart"),transitionrun:Gn("Transition","TransitionRun"),transitionstart:Gn("Transition","TransitionStart"),transitioncancel:Gn("Transition","TransitionCancel"),transitionend:Gn("Transition","TransitionEnd")},ps={},Lo={};Vt&&(Lo=document.createElement("div").style,"AnimationEvent"in window||(delete bl.animationend.animation,delete bl.animationiteration.animation,delete bl.animationstart.animation),"TransitionEvent"in window||delete bl.transitionend.transition);function Vn(e){if(ps[e])return ps[e];if(!bl[e])return e;var t=bl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Lo)return ps[e]=t[n];return e}var Ho=Vn("animationend"),qo=Vn("animationiteration"),Yo=Vn("animationstart"),fy=Vn("transitionrun"),hy=Vn("transitionstart"),dy=Vn("transitioncancel"),ko=Vn("transitionend"),Xo=new Map,ys="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(" ");ys.push("scrollEnd");function Ot(e,t){Xo.set(e,t),kn(t,[e])}var vi=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)},bt=[],Sl=0,vs=0;function gi(){for(var e=Sl,t=vs=Sl=0;t<e;){var n=bt[t];bt[t++]=null;var l=bt[t];bt[t++]=null;var a=bt[t];bt[t++]=null;var s=bt[t];if(bt[t++]=null,l!==null&&a!==null){var o=l.pending;o===null?a.next=a:(a.next=o.next,o.next=a),l.pending=a}s!==0&&Go(n,a,s)}}function bi(e,t,n,l){bt[Sl++]=e,bt[Sl++]=t,bt[Sl++]=n,bt[Sl++]=l,vs|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function gs(e,t,n,l){return bi(e,t,n,l),Si(e)}function Qn(e,t){return bi(e,null,null,t),Si(e)}function Go(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var a=!1,s=e.return;s!==null;)s.childLanes|=n,l=s.alternate,l!==null&&(l.childLanes|=n),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(a=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,a&&t!==null&&(a=31-rt(n),e=s.hiddenUpdates,l=e[a],l===null?e[a]=[t]:l.push(t),t.lane=n|536870912),s):null}function Si(e){if(50<Da)throw Da=0,Rc=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var xl={};function my(e,t,n,l){this.tag=e,this.key=n,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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ft(e,t,n,l){return new my(e,t,n,l)}function bs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Qt(e,t){var n=e.alternate;return n===null?(n=ft(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Vo(e,t){e.flags&=65011714;var n=e.alternate;return n===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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function xi(e,t,n,l,a,s){var o=0;if(l=e,typeof e=="function")bs(e)&&(o=1);else if(typeof e=="string")o=b0(e,n,Z.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case xe:return e=ft(31,n,t,a),e.elementType=xe,e.lanes=s,e;case k:return Zn(n.children,a,s,t);case Y:o=8,a|=24;break;case L:return e=ft(12,n,t,a|2),e.elementType=L,e.lanes=s,e;case ye:return e=ft(13,n,t,a),e.elementType=ye,e.lanes=s,e;case Re:return e=ft(19,n,t,a),e.elementType=Re,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q:o=10;break e;case q:o=9;break e;case P:o=11;break e;case $:o=14;break e;case Te:o=16,l=null;break e}o=29,n=Error(r(130,e===null?"null":typeof e,"")),l=null}return t=ft(o,n,t,a),t.elementType=e,t.type=l,t.lanes=s,t}function Zn(e,t,n,l){return e=ft(7,e,l,t),e.lanes=n,e}function Ss(e,t,n){return e=ft(6,e,null,t),e.lanes=n,e}function Qo(e){var t=ft(18,null,null,0);return t.stateNode=e,t}function xs(e,t,n){return t=ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Zo=new WeakMap;function St(e,t){if(typeof e=="object"&&e!==null){var n=Zo.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Vr(t)},Zo.set(e,t),t)}return{value:e,source:t,stack:Vr(t)}}var _l=[],El=0,_i=null,fa=0,xt=[],_t=0,pn=null,wt=1,Ut="";function Zt(e,t){_l[El++]=fa,_l[El++]=_i,_i=e,fa=t}function Ko(e,t,n){xt[_t++]=wt,xt[_t++]=Ut,xt[_t++]=pn,pn=e;var l=wt;e=Ut;var a=32-rt(l)-1;l&=~(1<<a),n+=1;var s=32-rt(t)+a;if(30<s){var o=a-a%5;s=(l&(1<<o)-1).toString(32),l>>=o,a-=o,wt=1<<32-rt(t)+a|n<<a|l,Ut=s+e}else wt=1<<s|n<<a|l,Ut=e}function _s(e){e.return!==null&&(Zt(e,1),Ko(e,1,0))}function Es(e){for(;e===_i;)_i=_l[--El],_l[El]=null,fa=_l[--El],_l[El]=null;for(;e===pn;)pn=xt[--_t],xt[_t]=null,Ut=xt[--_t],xt[_t]=null,wt=xt[--_t],xt[_t]=null}function Jo(e,t){xt[_t++]=wt,xt[_t++]=Ut,xt[_t++]=pn,wt=t.id,Ut=t.overflow,pn=e}var Ze=null,Ae=null,ce=!1,yn=null,Et=!1,Ts=Error(r(519));function vn(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ha(St(t,e)),Ts}function $o(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[Qe]=e,t[et]=l,n){case"dialog":ie("cancel",t),ie("close",t);break;case"iframe":case"object":case"embed":ie("load",t);break;case"video":case"audio":for(n=0;n<wa.length;n++)ie(wa[n],t);break;case"source":ie("error",t);break;case"img":case"image":case"link":ie("error",t),ie("load",t);break;case"details":ie("toggle",t);break;case"input":ie("invalid",t),so(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":ie("invalid",t);break;case"textarea":ie("invalid",t),ro(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||dd(t.textContent,n)?(l.popover!=null&&(ie("beforetoggle",t),ie("toggle",t)),l.onScroll!=null&&ie("scroll",t),l.onScrollEnd!=null&&ie("scrollend",t),l.onClick!=null&&(t.onclick=Gt),t=!0):t=!1,t||vn(e,!0)}function Wo(e){for(Ze=e.return;Ze;)switch(Ze.tag){case 5:case 31:case 13:Et=!1;return;case 27:case 3:Et=!0;return;default:Ze=Ze.return}}function Tl(e){if(e!==Ze)return!1;if(!ce)return Wo(e),ce=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Xc(e.type,e.memoizedProps)),n=!n),n&&Ae&&vn(e),Wo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ae=_d(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ae=_d(e)}else t===27?(t=Ae,Mn(e.type)?(e=Kc,Kc=null,Ae=e):Ae=t):Ae=Ze?At(e.stateNode.nextSibling):null;return!0}function Kn(){Ae=Ze=null,ce=!1}function As(){var e=yn;return e!==null&&(it===null?it=e:it.push.apply(it,e),yn=null),e}function ha(e){yn===null?yn=[e]:yn.push(e)}var Cs=_(null),Jn=null,Kt=null;function gn(e,t,n){G(Cs,t._currentValue),t._currentValue=n}function Jt(e){e._currentValue=Cs.current,B(Cs)}function Rs(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function Ns(e,t,n,l){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var s=a.dependencies;if(s!==null){var o=a.child;s=s.firstContext;e:for(;s!==null;){var d=s;s=a;for(var g=0;g<t.length;g++)if(d.context===t[g]){s.lanes|=n,d=s.alternate,d!==null&&(d.lanes|=n),Rs(s.return,n,e),l||(o=null);break e}s=d.next}}else if(a.tag===18){if(o=a.return,o===null)throw Error(r(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Rs(o,n,e),o=null}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===e){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}}function Al(e,t,n,l){e=null;for(var a=t,s=!1;a!==null;){if(!s){if((a.flags&524288)!==0)s=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var o=a.alternate;if(o===null)throw Error(r(387));if(o=o.memoizedProps,o!==null){var d=a.type;ot(a.pendingProps.value,o.value)||(e!==null?e.push(d):e=[d])}}else if(a===de.current){if(o=a.alternate,o===null)throw Error(r(387));o.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(qa):e=[qa])}a=a.return}e!==null&&Ns(t,e,n,l),t.flags|=262144}function Ei(e){for(e=e.firstContext;e!==null;){if(!ot(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $n(e){Jn=e,Kt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ke(e){return Fo(Jn,e)}function Ti(e,t){return Jn===null&&$n(e),Fo(e,t)}function Fo(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Kt===null){if(e===null)throw Error(r(308));Kt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Kt=Kt.next=t;return n}var py=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},yy=u.unstable_scheduleCallback,vy=u.unstable_NormalPriority,Be={$$typeof:Q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Os(){return{controller:new py,data:new Map,refCount:0}}function da(e){e.refCount--,e.refCount===0&&yy(vy,function(){e.controller.abort()})}var ma=null,zs=0,Cl=0,Rl=null;function gy(e,t){if(ma===null){var n=ma=[];zs=0,Cl=jc(),Rl={status:"pending",value:void 0,then:function(l){n.push(l)}}}return zs++,t.then(Po,Po),t}function Po(){if(--zs===0&&ma!==null){Rl!==null&&(Rl.status="fulfilled");var e=ma;ma=null,Cl=0,Rl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function by(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(l.status="rejected",l.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),l}var Io=j.S;j.S=function(e,t){Lh=st(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&gy(e,t),Io!==null&&Io(e,t)};var Wn=_(null);function Ms(){var e=Wn.current;return e!==null?e:Ee.pooledCache}function Ai(e,t){t===null?G(Wn,Wn.current):G(Wn,t.pool)}function ef(){var e=Ms();return e===null?null:{parent:Be._currentValue,pool:e}}var Nl=Error(r(460)),Ds=Error(r(474)),Ci=Error(r(542)),Ri={then:function(){}};function tf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function nf(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Gt,Gt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,af(e),e;default:if(typeof t.status=="string")t.then(Gt,Gt);else{if(e=Ee,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=l}},function(l){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,af(e),e}throw Pn=t,Nl}}function Fn(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Pn=n,Nl):n}}var Pn=null;function lf(){if(Pn===null)throw Error(r(459));var e=Pn;return Pn=null,e}function af(e){if(e===Nl||e===Ci)throw Error(r(483))}var Ol=null,pa=0;function Ni(e){var t=pa;return pa+=1,Ol===null&&(Ol=[]),nf(Ol,e,t)}function ya(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Oi(e,t){throw t.$$typeof===C?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function uf(e){function t(A,x){if(e){var R=A.deletions;R===null?(A.deletions=[x],A.flags|=16):R.push(x)}}function n(A,x){if(!e)return null;for(;x!==null;)t(A,x),x=x.sibling;return null}function l(A){for(var x=new Map;A!==null;)A.key!==null?x.set(A.key,A):x.set(A.index,A),A=A.sibling;return x}function a(A,x){return A=Qt(A,x),A.index=0,A.sibling=null,A}function s(A,x,R){return A.index=R,e?(R=A.alternate,R!==null?(R=R.index,R<x?(A.flags|=67108866,x):R):(A.flags|=67108866,x)):(A.flags|=1048576,x)}function o(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function d(A,x,R,w){return x===null||x.tag!==6?(x=Ss(R,A.mode,w),x.return=A,x):(x=a(x,R),x.return=A,x)}function g(A,x,R,w){var J=R.type;return J===k?D(A,x,R.props.children,w,R.key):x!==null&&(x.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===Te&&Fn(J)===x.type)?(x=a(x,R.props),ya(x,R),x.return=A,x):(x=xi(R.type,R.key,R.props,null,A.mode,w),ya(x,R),x.return=A,x)}function N(A,x,R,w){return x===null||x.tag!==4||x.stateNode.containerInfo!==R.containerInfo||x.stateNode.implementation!==R.implementation?(x=xs(R,A.mode,w),x.return=A,x):(x=a(x,R.children||[]),x.return=A,x)}function D(A,x,R,w,J){return x===null||x.tag!==7?(x=Zn(R,A.mode,w,J),x.return=A,x):(x=a(x,R),x.return=A,x)}function U(A,x,R){if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return x=Ss(""+x,A.mode,R),x.return=A,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case z:return R=xi(x.type,x.key,x.props,null,A.mode,R),ya(R,x),R.return=A,R;case H:return x=xs(x,A.mode,R),x.return=A,x;case Te:return x=Fn(x),U(A,x,R)}if(Nt(x)||We(x))return x=Zn(x,A.mode,R,null),x.return=A,x;if(typeof x.then=="function")return U(A,Ni(x),R);if(x.$$typeof===Q)return U(A,Ti(A,x),R);Oi(A,x)}return null}function O(A,x,R,w){var J=x!==null?x.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return J!==null?null:d(A,x,""+R,w);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case z:return R.key===J?g(A,x,R,w):null;case H:return R.key===J?N(A,x,R,w):null;case Te:return R=Fn(R),O(A,x,R,w)}if(Nt(R)||We(R))return J!==null?null:D(A,x,R,w,null);if(typeof R.then=="function")return O(A,x,Ni(R),w);if(R.$$typeof===Q)return O(A,x,Ti(A,R),w);Oi(A,R)}return null}function M(A,x,R,w,J){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return A=A.get(R)||null,d(x,A,""+w,J);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case z:return A=A.get(w.key===null?R:w.key)||null,g(x,A,w,J);case H:return A=A.get(w.key===null?R:w.key)||null,N(x,A,w,J);case Te:return w=Fn(w),M(A,x,R,w,J)}if(Nt(w)||We(w))return A=A.get(R)||null,D(x,A,w,J,null);if(typeof w.then=="function")return M(A,x,R,Ni(w),J);if(w.$$typeof===Q)return M(A,x,R,Ti(x,w),J);Oi(x,w)}return null}function V(A,x,R,w){for(var J=null,oe=null,K=x,ne=x=0,se=null;K!==null&&ne<R.length;ne++){K.index>ne?(se=K,K=null):se=K.sibling;var fe=O(A,K,R[ne],w);if(fe===null){K===null&&(K=se);break}e&&K&&fe.alternate===null&&t(A,K),x=s(fe,x,ne),oe===null?J=fe:oe.sibling=fe,oe=fe,K=se}if(ne===R.length)return n(A,K),ce&&Zt(A,ne),J;if(K===null){for(;ne<R.length;ne++)K=U(A,R[ne],w),K!==null&&(x=s(K,x,ne),oe===null?J=K:oe.sibling=K,oe=K);return ce&&Zt(A,ne),J}for(K=l(K);ne<R.length;ne++)se=M(K,A,ne,R[ne],w),se!==null&&(e&&se.alternate!==null&&K.delete(se.key===null?ne:se.key),x=s(se,x,ne),oe===null?J=se:oe.sibling=se,oe=se);return e&&K.forEach(function(Bn){return t(A,Bn)}),ce&&Zt(A,ne),J}function W(A,x,R,w){if(R==null)throw Error(r(151));for(var J=null,oe=null,K=x,ne=x=0,se=null,fe=R.next();K!==null&&!fe.done;ne++,fe=R.next()){K.index>ne?(se=K,K=null):se=K.sibling;var Bn=O(A,K,fe.value,w);if(Bn===null){K===null&&(K=se);break}e&&K&&Bn.alternate===null&&t(A,K),x=s(Bn,x,ne),oe===null?J=Bn:oe.sibling=Bn,oe=Bn,K=se}if(fe.done)return n(A,K),ce&&Zt(A,ne),J;if(K===null){for(;!fe.done;ne++,fe=R.next())fe=U(A,fe.value,w),fe!==null&&(x=s(fe,x,ne),oe===null?J=fe:oe.sibling=fe,oe=fe);return ce&&Zt(A,ne),J}for(K=l(K);!fe.done;ne++,fe=R.next())fe=M(K,A,ne,fe.value,w),fe!==null&&(e&&fe.alternate!==null&&K.delete(fe.key===null?ne:fe.key),x=s(fe,x,ne),oe===null?J=fe:oe.sibling=fe,oe=fe);return e&&K.forEach(function(z0){return t(A,z0)}),ce&&Zt(A,ne),J}function Se(A,x,R,w){if(typeof R=="object"&&R!==null&&R.type===k&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case z:e:{for(var J=R.key;x!==null;){if(x.key===J){if(J=R.type,J===k){if(x.tag===7){n(A,x.sibling),w=a(x,R.props.children),w.return=A,A=w;break e}}else if(x.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===Te&&Fn(J)===x.type){n(A,x.sibling),w=a(x,R.props),ya(w,R),w.return=A,A=w;break e}n(A,x);break}else t(A,x);x=x.sibling}R.type===k?(w=Zn(R.props.children,A.mode,w,R.key),w.return=A,A=w):(w=xi(R.type,R.key,R.props,null,A.mode,w),ya(w,R),w.return=A,A=w)}return o(A);case H:e:{for(J=R.key;x!==null;){if(x.key===J)if(x.tag===4&&x.stateNode.containerInfo===R.containerInfo&&x.stateNode.implementation===R.implementation){n(A,x.sibling),w=a(x,R.children||[]),w.return=A,A=w;break e}else{n(A,x);break}else t(A,x);x=x.sibling}w=xs(R,A.mode,w),w.return=A,A=w}return o(A);case Te:return R=Fn(R),Se(A,x,R,w)}if(Nt(R))return V(A,x,R,w);if(We(R)){if(J=We(R),typeof J!="function")throw Error(r(150));return R=J.call(R),W(A,x,R,w)}if(typeof R.then=="function")return Se(A,x,Ni(R),w);if(R.$$typeof===Q)return Se(A,x,Ti(A,R),w);Oi(A,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,x!==null&&x.tag===6?(n(A,x.sibling),w=a(x,R),w.return=A,A=w):(n(A,x),w=Ss(R,A.mode,w),w.return=A,A=w),o(A)):n(A,x)}return function(A,x,R,w){try{pa=0;var J=Se(A,x,R,w);return Ol=null,J}catch(K){if(K===Nl||K===Ci)throw K;var oe=ft(29,K,null,A.mode);return oe.lanes=w,oe.return=A,oe}finally{}}}var In=uf(!0),sf=uf(!1),bn=!1;function js(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ws(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 Sn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xn(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(he&2)!==0){var a=l.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),l.pending=t,t=Si(e),Go(e,null,n),t}return bi(e,l,t,n),Si(e)}function va(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Wr(e,n)}}function Us(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var a=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};s===null?a=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?a=s=t:s=s.next=t}else a=s=t;n={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:s,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Bs=!1;function ga(){if(Bs){var e=Rl;if(e!==null)throw e}}function ba(e,t,n,l){Bs=!1;var a=e.updateQueue;bn=!1;var s=a.firstBaseUpdate,o=a.lastBaseUpdate,d=a.shared.pending;if(d!==null){a.shared.pending=null;var g=d,N=g.next;g.next=null,o===null?s=N:o.next=N,o=g;var D=e.alternate;D!==null&&(D=D.updateQueue,d=D.lastBaseUpdate,d!==o&&(d===null?D.firstBaseUpdate=N:d.next=N,D.lastBaseUpdate=g))}if(s!==null){var U=a.baseState;o=0,D=N=g=null,d=s;do{var O=d.lane&-536870913,M=O!==d.lane;if(M?(ue&O)===O:(l&O)===O){O!==0&&O===Cl&&(Bs=!0),D!==null&&(D=D.next={lane:0,tag:d.tag,payload:d.payload,callback:null,next:null});e:{var V=e,W=d;O=t;var Se=n;switch(W.tag){case 1:if(V=W.payload,typeof V=="function"){U=V.call(Se,U,O);break e}U=V;break e;case 3:V.flags=V.flags&-65537|128;case 0:if(V=W.payload,O=typeof V=="function"?V.call(Se,U,O):V,O==null)break e;U=S({},U,O);break e;case 2:bn=!0}}O=d.callback,O!==null&&(e.flags|=64,M&&(e.flags|=8192),M=a.callbacks,M===null?a.callbacks=[O]:M.push(O))}else M={lane:O,tag:d.tag,payload:d.payload,callback:d.callback,next:null},D===null?(N=D=M,g=U):D=D.next=M,o|=O;if(d=d.next,d===null){if(d=a.shared.pending,d===null)break;M=d,d=M.next,M.next=null,a.lastBaseUpdate=M,a.shared.pending=null}}while(!0);D===null&&(g=U),a.baseState=g,a.firstBaseUpdate=N,a.lastBaseUpdate=D,s===null&&(a.shared.lanes=0),Cn|=o,e.lanes=o,e.memoizedState=U}}function cf(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function rf(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)cf(n[e],t)}var zl=_(null),zi=_(0);function of(e,t){e=ln,G(zi,e),G(zl,t),ln=e|t.baseLanes}function Ls(){G(zi,ln),G(zl,zl.current)}function Hs(){ln=zi.current,B(zl),B(zi)}var ht=_(null),Tt=null;function _n(e){var t=e.alternate;G(je,je.current&1),G(ht,e),Tt===null&&(t===null||zl.current!==null||t.memoizedState!==null)&&(Tt=e)}function qs(e){G(je,je.current),G(ht,e),Tt===null&&(Tt=e)}function ff(e){e.tag===22?(G(je,je.current),G(ht,e),Tt===null&&(Tt=e)):En()}function En(){G(je,je.current),G(ht,ht.current)}function dt(e){B(ht),Tt===e&&(Tt=null),B(je)}var je=_(0);function Mi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Qc(n)||Zc(n)))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 $t=0,te=null,ge=null,Le=null,Di=!1,Ml=!1,el=!1,ji=0,Sa=0,Dl=null,Sy=0;function ze(){throw Error(r(321))}function Ys(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ot(e[n],t[n]))return!1;return!0}function ks(e,t,n,l,a,s){return $t=s,te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?Jf:nc,el=!1,s=n(l,a),el=!1,Ml&&(s=df(t,n,l,a)),hf(e),s}function hf(e){j.H=Ea;var t=ge!==null&&ge.next!==null;if($t=0,Le=ge=te=null,Di=!1,Sa=0,Dl=null,t)throw Error(r(300));e===null||He||(e=e.dependencies,e!==null&&Ei(e)&&(He=!0))}function df(e,t,n,l){te=e;var a=0;do{if(Ml&&(Dl=null),Sa=0,Ml=!1,25<=a)throw Error(r(301));if(a+=1,Le=ge=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}j.H=$f,s=t(n,l)}while(Ml);return s}function xy(){var e=j.H,t=e.useState()[0];return t=typeof t.then=="function"?xa(t):t,e=e.useState()[0],(ge!==null?ge.memoizedState:null)!==e&&(te.flags|=1024),t}function Xs(){var e=ji!==0;return ji=0,e}function Gs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Vs(e){if(Di){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Di=!1}$t=0,Le=ge=te=null,Ml=!1,Sa=ji=0,Dl=null}function Ie(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Le===null?te.memoizedState=Le=e:Le=Le.next=e,Le}function we(){if(ge===null){var e=te.alternate;e=e!==null?e.memoizedState:null}else e=ge.next;var t=Le===null?te.memoizedState:Le.next;if(t!==null)Le=t,ge=e;else{if(e===null)throw te.alternate===null?Error(r(467)):Error(r(310));ge=e,e={memoizedState:ge.memoizedState,baseState:ge.baseState,baseQueue:ge.baseQueue,queue:ge.queue,next:null},Le===null?te.memoizedState=Le=e:Le=Le.next=e}return Le}function wi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xa(e){var t=Sa;return Sa+=1,Dl===null&&(Dl=[]),e=nf(Dl,e,t),t=te,(Le===null?t.memoizedState:Le.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?Jf:nc),e}function Ui(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return xa(e);if(e.$$typeof===Q)return Ke(e)}throw Error(r(438,String(e)))}function Qs(e){var t=null,n=te.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=te.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=wi(),te.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=Ue;return t.index++,n}function Wt(e,t){return typeof t=="function"?t(e):t}function Bi(e){var t=we();return Zs(t,ge,e)}function Zs(e,t,n){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=n;var a=e.baseQueue,s=l.pending;if(s!==null){if(a!==null){var o=a.next;a.next=s.next,s.next=o}t.baseQueue=a=s,l.pending=null}if(s=e.baseState,a===null)e.memoizedState=s;else{t=a.next;var d=o=null,g=null,N=t,D=!1;do{var U=N.lane&-536870913;if(U!==N.lane?(ue&U)===U:($t&U)===U){var O=N.revertLane;if(O===0)g!==null&&(g=g.next={lane:0,revertLane:0,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),U===Cl&&(D=!0);else if(($t&O)===O){N=N.next,O===Cl&&(D=!0);continue}else U={lane:0,revertLane:N.revertLane,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},g===null?(d=g=U,o=s):g=g.next=U,te.lanes|=O,Cn|=O;U=N.action,el&&n(s,U),s=N.hasEagerState?N.eagerState:n(s,U)}else O={lane:U,revertLane:N.revertLane,gesture:N.gesture,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},g===null?(d=g=O,o=s):g=g.next=O,te.lanes|=U,Cn|=U;N=N.next}while(N!==null&&N!==t);if(g===null?o=s:g.next=d,!ot(s,e.memoizedState)&&(He=!0,D&&(n=Rl,n!==null)))throw n;e.memoizedState=s,e.baseState=o,e.baseQueue=g,l.lastRenderedState=s}return a===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Ks(e){var t=we(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var l=n.dispatch,a=n.pending,s=t.memoizedState;if(a!==null){n.pending=null;var o=a=a.next;do s=e(s,o.action),o=o.next;while(o!==a);ot(s,t.memoizedState)||(He=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,l]}function mf(e,t,n){var l=te,a=we(),s=ce;if(s){if(n===void 0)throw Error(r(407));n=n()}else n=t();var o=!ot((ge||a).memoizedState,n);if(o&&(a.memoizedState=n,He=!0),a=a.queue,Ws(vf.bind(null,l,a,e),[e]),a.getSnapshot!==t||o||Le!==null&&Le.memoizedState.tag&1){if(l.flags|=2048,jl(9,{destroy:void 0},yf.bind(null,l,a,n,t),null),Ee===null)throw Error(r(349));s||($t&127)!==0||pf(l,t,n)}return n}function pf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=te.updateQueue,t===null?(t=wi(),te.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function yf(e,t,n,l){t.value=n,t.getSnapshot=l,gf(t)&&bf(e)}function vf(e,t,n){return n(function(){gf(t)&&bf(e)})}function gf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ot(e,n)}catch{return!0}}function bf(e){var t=Qn(e,2);t!==null&&ut(t,e,2)}function Js(e){var t=Ie();if(typeof e=="function"){var n=e;if(e=n(),el){hn(!0);try{n()}finally{hn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wt,lastRenderedState:e},t}function Sf(e,t,n,l){return e.baseState=n,Zs(e,ge,typeof l=="function"?l:Wt)}function _y(e,t,n,l,a){if(qi(e))throw Error(r(485));if(e=t.action,e!==null){var s={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){s.listeners.push(o)}};j.T!==null?n(!0):s.isTransition=!1,l(s),n=t.pending,n===null?(s.next=t.pending=s,xf(t,s)):(s.next=n.next,t.pending=n.next=s)}}function xf(e,t){var n=t.action,l=t.payload,a=e.state;if(t.isTransition){var s=j.T,o={};j.T=o;try{var d=n(a,l),g=j.S;g!==null&&g(o,d),_f(e,t,d)}catch(N){$s(e,t,N)}finally{s!==null&&o.types!==null&&(s.types=o.types),j.T=s}}else try{s=n(a,l),_f(e,t,s)}catch(N){$s(e,t,N)}}function _f(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){Ef(e,t,l)},function(l){return $s(e,t,l)}):Ef(e,t,n)}function Ef(e,t,n){t.status="fulfilled",t.value=n,Tf(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,xf(e,n)))}function $s(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,Tf(t),t=t.next;while(t!==l)}e.action=null}function Tf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Af(e,t){return t}function Cf(e,t){if(ce){var n=Ee.formState;if(n!==null){e:{var l=te;if(ce){if(Ae){t:{for(var a=Ae,s=Et;a.nodeType!==8;){if(!s){a=null;break t}if(a=At(a.nextSibling),a===null){a=null;break t}}s=a.data,a=s==="F!"||s==="F"?a:null}if(a){Ae=At(a.nextSibling),l=a.data==="F!";break e}}vn(l)}l=!1}l&&(t=n[0])}}return n=Ie(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Af,lastRenderedState:t},n.queue=l,n=Qf.bind(null,te,l),l.dispatch=n,l=Js(!1),s=tc.bind(null,te,!1,l.queue),l=Ie(),a={state:t,dispatch:null,action:e,pending:null},l.queue=a,n=_y.bind(null,te,a,s,n),a.dispatch=n,l.memoizedState=e,[t,n,!1]}function Rf(e){var t=we();return Nf(t,ge,e)}function Nf(e,t,n){if(t=Zs(e,t,Af)[0],e=Bi(Wt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=xa(t)}catch(o){throw o===Nl?Ci:o}else l=t;t=we();var a=t.queue,s=a.dispatch;return n!==t.memoizedState&&(te.flags|=2048,jl(9,{destroy:void 0},Ey.bind(null,a,n),null)),[l,s,e]}function Ey(e,t){e.action=t}function Of(e){var t=we(),n=ge;if(n!==null)return Nf(t,n,e);we(),t=t.memoizedState,n=we();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function jl(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=te.updateQueue,t===null&&(t=wi(),te.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function zf(){return we().memoizedState}function Li(e,t,n,l){var a=Ie();te.flags|=e,a.memoizedState=jl(1|t,{destroy:void 0},n,l===void 0?null:l)}function Hi(e,t,n,l){var a=we();l=l===void 0?null:l;var s=a.memoizedState.inst;ge!==null&&l!==null&&Ys(l,ge.memoizedState.deps)?a.memoizedState=jl(t,s,n,l):(te.flags|=e,a.memoizedState=jl(1|t,s,n,l))}function Mf(e,t){Li(8390656,8,e,t)}function Ws(e,t){Hi(2048,8,e,t)}function Ty(e){te.flags|=4;var t=te.updateQueue;if(t===null)t=wi(),te.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Df(e){var t=we().memoizedState;return Ty({ref:t,nextImpl:e}),function(){if((he&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function jf(e,t){return Hi(4,2,e,t)}function wf(e,t){return Hi(4,4,e,t)}function Uf(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Bf(e,t,n){n=n!=null?n.concat([e]):null,Hi(4,4,Uf.bind(null,t,e),n)}function Fs(){}function Lf(e,t){var n=we();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&Ys(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function Hf(e,t){var n=we();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&Ys(t,l[1]))return l[0];if(l=e(),el){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[l,t],l}function Ps(e,t,n){return n===void 0||($t&1073741824)!==0&&(ue&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=qh(),te.lanes|=e,Cn|=e,n)}function qf(e,t,n,l){return ot(n,t)?n:zl.current!==null?(e=Ps(e,n,l),ot(e,t)||(He=!0),e):($t&42)===0||($t&1073741824)!==0&&(ue&261930)===0?(He=!0,e.memoizedState=n):(e=qh(),te.lanes|=e,Cn|=e,t)}function Yf(e,t,n,l,a){var s=X.p;X.p=s!==0&&8>s?s:8;var o=j.T,d={};j.T=d,tc(e,!1,t,n);try{var g=a(),N=j.S;if(N!==null&&N(d,g),g!==null&&typeof g=="object"&&typeof g.then=="function"){var D=by(g,l);_a(e,t,D,yt(e))}else _a(e,t,l,yt(e))}catch(U){_a(e,t,{then:function(){},status:"rejected",reason:U},yt())}finally{X.p=s,o!==null&&d.types!==null&&(o.types=d.types),j.T=o}}function Ay(){}function Is(e,t,n,l){if(e.tag!==5)throw Error(r(476));var a=kf(e).queue;Yf(e,a,t,F,n===null?Ay:function(){return Xf(e),n(l)})}function kf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wt,lastRenderedState:F},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wt,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Xf(e){var t=kf(e);t.next===null&&(t=e.alternate.memoizedState),_a(e,t.next.queue,{},yt())}function ec(){return Ke(qa)}function Gf(){return we().memoizedState}function Vf(){return we().memoizedState}function Cy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=yt();e=Sn(n);var l=xn(t,e,n);l!==null&&(ut(l,t,n),va(l,t,n)),t={cache:Os()},e.payload=t;return}t=t.return}}function Ry(e,t,n){var l=yt();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},qi(e)?Zf(t,n):(n=gs(e,t,n,l),n!==null&&(ut(n,e,l),Kf(n,t,l)))}function Qf(e,t,n){var l=yt();_a(e,t,n,l)}function _a(e,t,n,l){var a={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(qi(e))Zf(t,a);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,d=s(o,n);if(a.hasEagerState=!0,a.eagerState=d,ot(d,o))return bi(e,t,a,0),Ee===null&&gi(),!1}catch{}finally{}if(n=gs(e,t,a,l),n!==null)return ut(n,e,l),Kf(n,t,l),!0}return!1}function tc(e,t,n,l){if(l={lane:2,revertLane:jc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},qi(e)){if(t)throw Error(r(479))}else t=gs(e,n,l,2),t!==null&&ut(t,e,2)}function qi(e){var t=e.alternate;return e===te||t!==null&&t===te}function Zf(e,t){Ml=Di=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Kf(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Wr(e,n)}}var Ea={readContext:Ke,use:Ui,useCallback:ze,useContext:ze,useEffect:ze,useImperativeHandle:ze,useLayoutEffect:ze,useInsertionEffect:ze,useMemo:ze,useReducer:ze,useRef:ze,useState:ze,useDebugValue:ze,useDeferredValue:ze,useTransition:ze,useSyncExternalStore:ze,useId:ze,useHostTransitionStatus:ze,useFormState:ze,useActionState:ze,useOptimistic:ze,useMemoCache:ze,useCacheRefresh:ze};Ea.useEffectEvent=ze;var Jf={readContext:Ke,use:Ui,useCallback:function(e,t){return Ie().memoizedState=[e,t===void 0?null:t],e},useContext:Ke,useEffect:Mf,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Li(4194308,4,Uf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Li(4194308,4,e,t)},useInsertionEffect:function(e,t){Li(4,2,e,t)},useMemo:function(e,t){var n=Ie();t=t===void 0?null:t;var l=e();if(el){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Ie();if(n!==void 0){var a=n(t);if(el){hn(!0);try{n(t)}finally{hn(!1)}}}else a=t;return l.memoizedState=l.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},l.queue=e,e=e.dispatch=Ry.bind(null,te,e),[l.memoizedState,e]},useRef:function(e){var t=Ie();return e={current:e},t.memoizedState=e},useState:function(e){e=Js(e);var t=e.queue,n=Qf.bind(null,te,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Fs,useDeferredValue:function(e,t){var n=Ie();return Ps(n,e,t)},useTransition:function(){var e=Js(!1);return e=Yf.bind(null,te,e.queue,!0,!1),Ie().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=te,a=Ie();if(ce){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Ee===null)throw Error(r(349));(ue&127)!==0||pf(l,t,n)}a.memoizedState=n;var s={value:n,getSnapshot:t};return a.queue=s,Mf(vf.bind(null,l,s,e),[e]),l.flags|=2048,jl(9,{destroy:void 0},yf.bind(null,l,s,n,t),null),n},useId:function(){var e=Ie(),t=Ee.identifierPrefix;if(ce){var n=Ut,l=wt;n=(l&~(1<<32-rt(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=ji++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Sy++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ec,useFormState:Cf,useActionState:Cf,useOptimistic:function(e){var t=Ie();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=tc.bind(null,te,!0,n),n.dispatch=t,[e,t]},useMemoCache:Qs,useCacheRefresh:function(){return Ie().memoizedState=Cy.bind(null,te)},useEffectEvent:function(e){var t=Ie(),n={impl:e};return t.memoizedState=n,function(){if((he&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},nc={readContext:Ke,use:Ui,useCallback:Lf,useContext:Ke,useEffect:Ws,useImperativeHandle:Bf,useInsertionEffect:jf,useLayoutEffect:wf,useMemo:Hf,useReducer:Bi,useRef:zf,useState:function(){return Bi(Wt)},useDebugValue:Fs,useDeferredValue:function(e,t){var n=we();return qf(n,ge.memoizedState,e,t)},useTransition:function(){var e=Bi(Wt)[0],t=we().memoizedState;return[typeof e=="boolean"?e:xa(e),t]},useSyncExternalStore:mf,useId:Gf,useHostTransitionStatus:ec,useFormState:Rf,useActionState:Rf,useOptimistic:function(e,t){var n=we();return Sf(n,ge,e,t)},useMemoCache:Qs,useCacheRefresh:Vf};nc.useEffectEvent=Df;var $f={readContext:Ke,use:Ui,useCallback:Lf,useContext:Ke,useEffect:Ws,useImperativeHandle:Bf,useInsertionEffect:jf,useLayoutEffect:wf,useMemo:Hf,useReducer:Ks,useRef:zf,useState:function(){return Ks(Wt)},useDebugValue:Fs,useDeferredValue:function(e,t){var n=we();return ge===null?Ps(n,e,t):qf(n,ge.memoizedState,e,t)},useTransition:function(){var e=Ks(Wt)[0],t=we().memoizedState;return[typeof e=="boolean"?e:xa(e),t]},useSyncExternalStore:mf,useId:Gf,useHostTransitionStatus:ec,useFormState:Of,useActionState:Of,useOptimistic:function(e,t){var n=we();return ge!==null?Sf(n,ge,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Qs,useCacheRefresh:Vf};$f.useEffectEvent=Df;function lc(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:S({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ac={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=yt(),a=Sn(l);a.payload=t,n!=null&&(a.callback=n),t=xn(e,a,l),t!==null&&(ut(t,e,l),va(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=yt(),a=Sn(l);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=xn(e,a,l),t!==null&&(ut(t,e,l),va(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=yt(),l=Sn(n);l.tag=2,t!=null&&(l.callback=t),t=xn(e,l,n),t!==null&&(ut(t,e,n),va(t,e,n))}};function Wf(e,t,n,l,a,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,s,o):t.prototype&&t.prototype.isPureReactComponent?!ra(n,l)||!ra(a,s):!0}function Ff(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&ac.enqueueReplaceState(t,t.state,null)}function tl(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=S({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function Pf(e){vi(e)}function If(e){console.error(e)}function eh(e){vi(e)}function Yi(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function th(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function ic(e,t,n){return n=Sn(n),n.tag=3,n.payload={element:null},n.callback=function(){Yi(e,t)},n}function nh(e){return e=Sn(e),e.tag=3,e}function lh(e,t,n,l){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var s=l.value;e.payload=function(){return a(s)},e.callback=function(){th(t,n,l)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){th(t,n,l),typeof a!="function"&&(Rn===null?Rn=new Set([this]):Rn.add(this));var d=l.stack;this.componentDidCatch(l.value,{componentStack:d!==null?d:""})})}function Ny(e,t,n,l,a){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&Al(t,n,a,!0),n=ht.current,n!==null){switch(n.tag){case 31:case 13:return Tt===null?Pi():n.alternate===null&&Me===0&&(Me=3),n.flags&=-257,n.flags|=65536,n.lanes=a,l===Ri?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),zc(e,l,a)),!1;case 22:return n.flags|=65536,l===Ri?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),zc(e,l,a)),!1}throw Error(r(435,n.tag))}return zc(e,l,a),Pi(),!1}if(ce)return t=ht.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,l!==Ts&&(e=Error(r(422),{cause:l}),ha(St(e,n)))):(l!==Ts&&(t=Error(r(423),{cause:l}),ha(St(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,l=St(l,n),a=ic(e.stateNode,l,a),Us(e,a),Me!==4&&(Me=2)),!1;var s=Error(r(520),{cause:l});if(s=St(s,n),Ma===null?Ma=[s]:Ma.push(s),Me!==4&&(Me=2),t===null)return!0;l=St(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=ic(n.stateNode,l,e),Us(n,e),!1;case 1:if(t=n.type,s=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(Rn===null||!Rn.has(s))))return n.flags|=65536,a&=-a,n.lanes|=a,a=nh(a),lh(a,e,n,l),Us(n,a),!1}n=n.return}while(n!==null);return!1}var uc=Error(r(461)),He=!1;function Je(e,t,n,l){t.child=e===null?sf(t,null,n,l):In(t,e.child,n,l)}function ah(e,t,n,l,a){n=n.render;var s=t.ref;if("ref"in l){var o={};for(var d in l)d!=="ref"&&(o[d]=l[d])}else o=l;return $n(t),l=ks(e,t,n,o,s,a),d=Xs(),e!==null&&!He?(Gs(e,t,a),Ft(e,t,a)):(ce&&d&&_s(t),t.flags|=1,Je(e,t,l,a),t.child)}function ih(e,t,n,l,a){if(e===null){var s=n.type;return typeof s=="function"&&!bs(s)&&s.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=s,uh(e,t,s,l,a)):(e=xi(n.type,null,l,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!mc(e,a)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:ra,n(o,l)&&e.ref===t.ref)return Ft(e,t,a)}return t.flags|=1,e=Qt(s,l),e.ref=t.ref,e.return=t,t.child=e}function uh(e,t,n,l,a){if(e!==null){var s=e.memoizedProps;if(ra(s,l)&&e.ref===t.ref)if(He=!1,t.pendingProps=l=s,mc(e,a))(e.flags&131072)!==0&&(He=!0);else return t.lanes=e.lanes,Ft(e,t,a)}return sc(e,t,n,l,a)}function sh(e,t,n,l){var a=l.children,s=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(s=s!==null?s.baseLanes|n:n,e!==null){for(l=t.child=e.child,a=0;l!==null;)a=a|l.lanes|l.childLanes,l=l.sibling;l=a&~s}else l=0,t.child=null;return ch(e,t,s,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ai(t,s!==null?s.cachePool:null),s!==null?of(t,s):Ls(),ff(t);else return l=t.lanes=536870912,ch(e,t,s!==null?s.baseLanes|n:n,n,l)}else s!==null?(Ai(t,s.cachePool),of(t,s),En(),t.memoizedState=null):(e!==null&&Ai(t,null),Ls(),En());return Je(e,t,a,n),t.child}function Ta(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ch(e,t,n,l,a){var s=Ms();return s=s===null?null:{parent:Be._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},e!==null&&Ai(t,null),Ls(),ff(t),e!==null&&Al(e,t,l,!0),t.childLanes=a,null}function ki(e,t){return t=Gi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function rh(e,t,n){return In(t,e.child,null,n),e=ki(t,t.pendingProps),e.flags|=2,dt(t),t.memoizedState=null,e}function Oy(e,t,n){var l=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ce){if(l.mode==="hidden")return e=ki(t,l),t.lanes=536870912,Ta(null,e);if(qs(t),(e=Ae)?(e=xd(e,Et),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pn!==null?{id:wt,overflow:Ut}:null,retryLane:536870912,hydrationErrors:null},n=Qo(e),n.return=t,t.child=n,Ze=t,Ae=null)):e=null,e===null)throw vn(t);return t.lanes=536870912,null}return ki(t,l)}var s=e.memoizedState;if(s!==null){var o=s.dehydrated;if(qs(t),a)if(t.flags&256)t.flags&=-257,t=rh(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(He||Al(e,t,n,!1),a=(n&e.childLanes)!==0,He||a){if(l=Ee,l!==null&&(o=Fr(l,n),o!==0&&o!==s.retryLane))throw s.retryLane=o,Qn(e,o),ut(l,e,o),uc;Pi(),t=rh(e,t,n)}else e=s.treeContext,Ae=At(o.nextSibling),Ze=t,ce=!0,yn=null,Et=!1,e!==null&&Jo(t,e),t=ki(t,l),t.flags|=4096;return t}return e=Qt(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Xi(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(r(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function sc(e,t,n,l,a){return $n(t),n=ks(e,t,n,l,void 0,a),l=Xs(),e!==null&&!He?(Gs(e,t,a),Ft(e,t,a)):(ce&&l&&_s(t),t.flags|=1,Je(e,t,n,a),t.child)}function oh(e,t,n,l,a,s){return $n(t),t.updateQueue=null,n=df(t,l,n,a),hf(e),l=Xs(),e!==null&&!He?(Gs(e,t,s),Ft(e,t,s)):(ce&&l&&_s(t),t.flags|=1,Je(e,t,n,s),t.child)}function fh(e,t,n,l,a){if($n(t),t.stateNode===null){var s=xl,o=n.contextType;typeof o=="object"&&o!==null&&(s=Ke(o)),s=new n(l,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=ac,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=l,s.state=t.memoizedState,s.refs={},js(t),o=n.contextType,s.context=typeof o=="object"&&o!==null?Ke(o):xl,s.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o=="function"&&(lc(t,n,o,l),s.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(o=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),o!==s.state&&ac.enqueueReplaceState(s,s.state,null),ba(t,l,s,a),ga(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){s=t.stateNode;var d=t.memoizedProps,g=tl(n,d);s.props=g;var N=s.context,D=n.contextType;o=xl,typeof D=="object"&&D!==null&&(o=Ke(D));var U=n.getDerivedStateFromProps;D=typeof U=="function"||typeof s.getSnapshotBeforeUpdate=="function",d=t.pendingProps!==d,D||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(d||N!==o)&&Ff(t,s,l,o),bn=!1;var O=t.memoizedState;s.state=O,ba(t,l,s,a),ga(),N=t.memoizedState,d||O!==N||bn?(typeof U=="function"&&(lc(t,n,U,l),N=t.memoizedState),(g=bn||Wf(t,n,g,l,O,N,o))?(D||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=N),s.props=l,s.state=N,s.context=o,l=g):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{s=t.stateNode,ws(e,t),o=t.memoizedProps,D=tl(n,o),s.props=D,U=t.pendingProps,O=s.context,N=n.contextType,g=xl,typeof N=="object"&&N!==null&&(g=Ke(N)),d=n.getDerivedStateFromProps,(N=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==U||O!==g)&&Ff(t,s,l,g),bn=!1,O=t.memoizedState,s.state=O,ba(t,l,s,a),ga();var M=t.memoizedState;o!==U||O!==M||bn||e!==null&&e.dependencies!==null&&Ei(e.dependencies)?(typeof d=="function"&&(lc(t,n,d,l),M=t.memoizedState),(D=bn||Wf(t,n,D,l,O,M,g)||e!==null&&e.dependencies!==null&&Ei(e.dependencies))?(N||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(l,M,g),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(l,M,g)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=M),s.props=l,s.state=M,s.context=g,l=D):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),l=!1)}return s=l,Xi(e,t),l=(t.flags&128)!==0,s||l?(s=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&l?(t.child=In(t,e.child,null,a),t.child=In(t,null,n,a)):Je(e,t,n,a),t.memoizedState=s.state,e=t.child):e=Ft(e,t,a),e}function hh(e,t,n,l){return Kn(),t.flags|=256,Je(e,t,n,l),t.child}var cc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rc(e){return{baseLanes:e,cachePool:ef()}}function oc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=pt),e}function dh(e,t,n){var l=t.pendingProps,a=!1,s=(t.flags&128)!==0,o;if((o=s)||(o=e!==null&&e.memoizedState===null?!1:(je.current&2)!==0),o&&(a=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(ce){if(a?_n(t):En(),(e=Ae)?(e=xd(e,Et),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pn!==null?{id:wt,overflow:Ut}:null,retryLane:536870912,hydrationErrors:null},n=Qo(e),n.return=t,t.child=n,Ze=t,Ae=null)):e=null,e===null)throw vn(t);return Zc(e)?t.lanes=32:t.lanes=536870912,null}var d=l.children;return l=l.fallback,a?(En(),a=t.mode,d=Gi({mode:"hidden",children:d},a),l=Zn(l,a,n,null),d.return=t,l.return=t,d.sibling=l,t.child=d,l=t.child,l.memoizedState=rc(n),l.childLanes=oc(e,o,n),t.memoizedState=cc,Ta(null,l)):(_n(t),fc(t,d))}var g=e.memoizedState;if(g!==null&&(d=g.dehydrated,d!==null)){if(s)t.flags&256?(_n(t),t.flags&=-257,t=hc(e,t,n)):t.memoizedState!==null?(En(),t.child=e.child,t.flags|=128,t=null):(En(),d=l.fallback,a=t.mode,l=Gi({mode:"visible",children:l.children},a),d=Zn(d,a,n,null),d.flags|=2,l.return=t,d.return=t,l.sibling=d,t.child=l,In(t,e.child,null,n),l=t.child,l.memoizedState=rc(n),l.childLanes=oc(e,o,n),t.memoizedState=cc,t=Ta(null,l));else if(_n(t),Zc(d)){if(o=d.nextSibling&&d.nextSibling.dataset,o)var N=o.dgst;o=N,l=Error(r(419)),l.stack="",l.digest=o,ha({value:l,source:null,stack:null}),t=hc(e,t,n)}else if(He||Al(e,t,n,!1),o=(n&e.childLanes)!==0,He||o){if(o=Ee,o!==null&&(l=Fr(o,n),l!==0&&l!==g.retryLane))throw g.retryLane=l,Qn(e,l),ut(o,e,l),uc;Qc(d)||Pi(),t=hc(e,t,n)}else Qc(d)?(t.flags|=192,t.child=e.child,t=null):(e=g.treeContext,Ae=At(d.nextSibling),Ze=t,ce=!0,yn=null,Et=!1,e!==null&&Jo(t,e),t=fc(t,l.children),t.flags|=4096);return t}return a?(En(),d=l.fallback,a=t.mode,g=e.child,N=g.sibling,l=Qt(g,{mode:"hidden",children:l.children}),l.subtreeFlags=g.subtreeFlags&65011712,N!==null?d=Qt(N,d):(d=Zn(d,a,n,null),d.flags|=2),d.return=t,l.return=t,l.sibling=d,t.child=l,Ta(null,l),l=t.child,d=e.child.memoizedState,d===null?d=rc(n):(a=d.cachePool,a!==null?(g=Be._currentValue,a=a.parent!==g?{parent:g,pool:g}:a):a=ef(),d={baseLanes:d.baseLanes|n,cachePool:a}),l.memoizedState=d,l.childLanes=oc(e,o,n),t.memoizedState=cc,Ta(e.child,l)):(_n(t),n=e.child,e=n.sibling,n=Qt(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function fc(e,t){return t=Gi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Gi(e,t){return e=ft(22,e,null,t),e.lanes=0,e}function hc(e,t,n){return In(t,e.child,null,n),e=fc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function mh(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Rs(e.return,t,n)}function dc(e,t,n,l,a,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:a,treeForkCount:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=l,o.tail=n,o.tailMode=a,o.treeForkCount=s)}function ph(e,t,n){var l=t.pendingProps,a=l.revealOrder,s=l.tail;l=l.children;var o=je.current,d=(o&2)!==0;if(d?(o=o&1|2,t.flags|=128):o&=1,G(je,o),Je(e,t,l,n),l=ce?fa:0,!d&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&mh(e,n,t);else if(e.tag===19)mh(e,n,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(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&Mi(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),dc(t,!1,a,n,s,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Mi(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}dc(t,!0,n,null,s,l);break;case"together":dc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Ft(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Cn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Al(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=Qt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function mc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ei(e)))}function zy(e,t,n){switch(t.tag){case 3:Pe(t,t.stateNode.containerInfo),gn(t,Be,e.memoizedState.cache),Kn();break;case 27:case 5:Wl(t);break;case 4:Pe(t,t.stateNode.containerInfo);break;case 10:gn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,qs(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(_n(t),t.flags|=128,null):(n&t.child.childLanes)!==0?dh(e,t,n):(_n(t),e=Ft(e,t,n),e!==null?e.sibling:null);_n(t);break;case 19:var a=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(Al(e,t,n,!1),l=(n&t.childLanes)!==0),a){if(l)return ph(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),G(je,je.current),l)break;return null;case 22:return t.lanes=0,sh(e,t,n,t.pendingProps);case 24:gn(t,Be,e.memoizedState.cache)}return Ft(e,t,n)}function yh(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)He=!0;else{if(!mc(e,n)&&(t.flags&128)===0)return He=!1,zy(e,t,n);He=(e.flags&131072)!==0}else He=!1,ce&&(t.flags&1048576)!==0&&Ko(t,fa,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Fn(t.elementType),t.type=e,typeof e=="function")bs(e)?(l=tl(e,l),t.tag=1,t=fh(null,t,e,l,n)):(t.tag=0,t=sc(null,t,e,l,n));else{if(e!=null){var a=e.$$typeof;if(a===P){t.tag=11,t=ah(null,t,e,l,n);break e}else if(a===$){t.tag=14,t=ih(null,t,e,l,n);break e}}throw t=kt(e)||e,Error(r(306,t,""))}}return t;case 0:return sc(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,a=tl(l,t.pendingProps),fh(e,t,l,a,n);case 3:e:{if(Pe(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var s=t.memoizedState;a=s.element,ws(e,t),ba(t,l,null,n);var o=t.memoizedState;if(l=o.cache,gn(t,Be,l),l!==s.cache&&Ns(t,[Be],n,!0),ga(),l=o.element,s.isDehydrated)if(s={element:l,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=hh(e,t,l,n);break e}else if(l!==a){a=St(Error(r(424)),t),ha(a),t=hh(e,t,l,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ae=At(e.firstChild),Ze=t,ce=!0,yn=null,Et=!0,n=sf(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Kn(),l===a){t=Ft(e,t,n);break e}Je(e,t,l,n)}t=t.child}return t;case 26:return Xi(e,t),e===null?(n=Rd(t.type,null,t.pendingProps,null))?t.memoizedState=n:ce||(n=t.type,e=t.pendingProps,l=iu(le.current).createElement(n),l[Qe]=t,l[et]=e,$e(l,n,e),Ge(l),t.stateNode=l):t.memoizedState=Rd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Wl(t),e===null&&ce&&(l=t.stateNode=Td(t.type,t.pendingProps,le.current),Ze=t,Et=!0,a=Ae,Mn(t.type)?(Kc=a,Ae=At(l.firstChild)):Ae=a),Je(e,t,t.pendingProps.children,n),Xi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ce&&((a=l=Ae)&&(l=u0(l,t.type,t.pendingProps,Et),l!==null?(t.stateNode=l,Ze=t,Ae=At(l.firstChild),Et=!1,a=!0):a=!1),a||vn(t)),Wl(t),a=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,l=s.children,Xc(a,s)?l=null:o!==null&&Xc(a,o)&&(t.flags|=32),t.memoizedState!==null&&(a=ks(e,t,xy,null,null,n),qa._currentValue=a),Xi(e,t),Je(e,t,l,n),t.child;case 6:return e===null&&ce&&((e=n=Ae)&&(n=s0(n,t.pendingProps,Et),n!==null?(t.stateNode=n,Ze=t,Ae=null,e=!0):e=!1),e||vn(t)),null;case 13:return dh(e,t,n);case 4:return Pe(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=In(t,null,l,n):Je(e,t,l,n),t.child;case 11:return ah(e,t,t.type,t.pendingProps,n);case 7:return Je(e,t,t.pendingProps,n),t.child;case 8:return Je(e,t,t.pendingProps.children,n),t.child;case 12:return Je(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,gn(t,t.type,l.value),Je(e,t,l.children,n),t.child;case 9:return a=t.type._context,l=t.pendingProps.children,$n(t),a=Ke(a),l=l(a),t.flags|=1,Je(e,t,l,n),t.child;case 14:return ih(e,t,t.type,t.pendingProps,n);case 15:return uh(e,t,t.type,t.pendingProps,n);case 19:return ph(e,t,n);case 31:return Oy(e,t,n);case 22:return sh(e,t,n,t.pendingProps);case 24:return $n(t),l=Ke(Be),e===null?(a=Ms(),a===null&&(a=Ee,s=Os(),a.pooledCache=s,s.refCount++,s!==null&&(a.pooledCacheLanes|=n),a=s),t.memoizedState={parent:l,cache:a},js(t),gn(t,Be,a)):((e.lanes&n)!==0&&(ws(e,t),ba(t,null,null,n),ga()),a=e.memoizedState,s=t.memoizedState,a.parent!==l?(a={parent:l,cache:l},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),gn(t,Be,l)):(l=s.cache,gn(t,Be,l),l!==a.cache&&Ns(t,[Be],n,!0))),Je(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Pt(e){e.flags|=4}function pc(e,t,n,l,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(Gh())e.flags|=8192;else throw Pn=Ri,Ds}else e.flags&=-16777217}function vh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Dd(t))if(Gh())e.flags|=8192;else throw Pn=Ri,Ds}function Vi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Jr():536870912,e.lanes|=t,Ll|=t)}function Aa(e,t){if(!ce)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Ce(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags&65011712,l|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags,l|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function My(e,t,n){var l=t.pendingProps;switch(Es(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ce(t),null;case 1:return Ce(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Jt(Be),De(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Tl(t)?Pt(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,As())),Ce(t),null;case 26:var a=t.type,s=t.memoizedState;return e===null?(Pt(t),s!==null?(Ce(t),vh(t,s)):(Ce(t),pc(t,a,null,l,n))):s?s!==e.memoizedState?(Pt(t),Ce(t),vh(t,s)):(Ce(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Pt(t),Ce(t),pc(t,a,e,l,n)),null;case 27:if(ti(t),n=le.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Pt(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Ce(t),null}e=Z.current,Tl(t)?$o(t):(e=Td(a,l,n),t.stateNode=e,Pt(t))}return Ce(t),null;case 5:if(ti(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Pt(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Ce(t),null}if(s=Z.current,Tl(t))$o(t);else{var o=iu(le.current);switch(s){case 1:s=o.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:s=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":s=o.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":s=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":s=o.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof l.is=="string"?o.createElement("select",{is:l.is}):o.createElement("select"),l.multiple?s.multiple=!0:l.size&&(s.size=l.size);break;default:s=typeof l.is=="string"?o.createElement(a,{is:l.is}):o.createElement(a)}}s[Qe]=t,s[et]=l;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)s.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=s;e:switch($e(s,a,l),a){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Pt(t)}}return Ce(t),pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Pt(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=le.current,Tl(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,a=Ze,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}e[Qe]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||dd(e.nodeValue,n)),e||vn(t,!0)}else e=iu(e).createTextNode(l),e[Qe]=t,t.stateNode=e}return Ce(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=Tl(t),n!==null){if(e===null){if(!l)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Qe]=t}else Kn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ce(t),e=!1}else n=As(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(dt(t),t):(dt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ce(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Tl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!a)throw Error(r(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));a[Qe]=t}else Kn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ce(t),a=!1}else a=As(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(dt(t),t):(dt(t),null)}return dt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,a=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(a=l.alternate.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==a&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Vi(t,t.updateQueue),Ce(t),null);case 4:return De(),e===null&&Lc(t.stateNode.containerInfo),Ce(t),null;case 10:return Jt(t.type),Ce(t),null;case 19:if(B(je),l=t.memoizedState,l===null)return Ce(t),null;if(a=(t.flags&128)!==0,s=l.rendering,s===null)if(a)Aa(l,!1);else{if(Me!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=Mi(e),s!==null){for(t.flags|=128,Aa(l,!1),e=s.updateQueue,t.updateQueue=e,Vi(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Vo(n,e),n=n.sibling;return G(je,je.current&1|2),ce&&Zt(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&st()>$i&&(t.flags|=128,a=!0,Aa(l,!1),t.lanes=4194304)}else{if(!a)if(e=Mi(s),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Vi(t,e),Aa(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!ce)return Ce(t),null}else 2*st()-l.renderingStartTime>$i&&n!==536870912&&(t.flags|=128,a=!0,Aa(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(e=l.last,e!==null?e.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=st(),e.sibling=null,n=je.current,G(je,a?n&1|2:n&1),ce&&Zt(t,l.treeForkCount),e):(Ce(t),null);case 22:case 23:return dt(t),Hs(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(Ce(t),t.subtreeFlags&6&&(t.flags|=8192)):Ce(t),n=t.updateQueue,n!==null&&Vi(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&B(Wn),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Jt(Be),Ce(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Dy(e,t){switch(Es(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jt(Be),De(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ti(t),null;case 31:if(t.memoizedState!==null){if(dt(t),t.alternate===null)throw Error(r(340));Kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(dt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(je),null;case 4:return De(),null;case 10:return Jt(t.type),null;case 22:case 23:return dt(t),Hs(),e!==null&&B(Wn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Jt(Be),null;case 25:return null;default:return null}}function gh(e,t){switch(Es(t),t.tag){case 3:Jt(Be),De();break;case 26:case 27:case 5:ti(t);break;case 4:De();break;case 31:t.memoizedState!==null&&dt(t);break;case 13:dt(t);break;case 19:B(je);break;case 10:Jt(t.type);break;case 22:case 23:dt(t),Hs(),e!==null&&B(Wn);break;case 24:Jt(Be)}}function Ca(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var a=l.next;n=a;do{if((n.tag&e)===e){l=void 0;var s=n.create,o=n.inst;l=s(),o.destroy=l}n=n.next}while(n!==a)}}catch(d){pe(t,t.return,d)}}function Tn(e,t,n){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var s=a.next;l=s;do{if((l.tag&e)===e){var o=l.inst,d=o.destroy;if(d!==void 0){o.destroy=void 0,a=t;var g=n,N=d;try{N()}catch(D){pe(a,g,D)}}}l=l.next}while(l!==s)}}catch(D){pe(t,t.return,D)}}function bh(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{rf(t,n)}catch(l){pe(e,e.return,l)}}}function Sh(e,t,n){n.props=tl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){pe(e,t,l)}}function Ra(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(a){pe(e,t,a)}}function Bt(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(a){pe(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){pe(e,t,a)}else n.current=null}function xh(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(a){pe(e,e.return,a)}}function yc(e,t,n){try{var l=e.stateNode;e0(l,e.type,n,t),l[et]=t}catch(a){pe(e,e.return,a)}}function _h(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Mn(e.type)||e.tag===4}function vc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_h(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&&Mn(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 gc(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gt));else if(l!==4&&(l===27&&Mn(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(gc(e,t,n),e=e.sibling;e!==null;)gc(e,t,n),e=e.sibling}function Qi(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&Mn(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Qi(e,t,n),e=e.sibling;e!==null;)Qi(e,t,n),e=e.sibling}function Eh(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);$e(t,l,n),t[Qe]=e,t[et]=n}catch(s){pe(e,e.return,s)}}var It=!1,qe=!1,bc=!1,Th=typeof WeakSet=="function"?WeakSet:Set,Ve=null;function jy(e,t){if(e=e.containerInfo,Yc=hu,e=Uo(e),hs(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var a=l.anchorOffset,s=l.focusNode;l=l.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,d=-1,g=-1,N=0,D=0,U=e,O=null;t:for(;;){for(var M;U!==n||a!==0&&U.nodeType!==3||(d=o+a),U!==s||l!==0&&U.nodeType!==3||(g=o+l),U.nodeType===3&&(o+=U.nodeValue.length),(M=U.firstChild)!==null;)O=U,U=M;for(;;){if(U===e)break t;if(O===n&&++N===a&&(d=o),O===s&&++D===l&&(g=o),(M=U.nextSibling)!==null)break;U=O,O=U.parentNode}U=M}n=d===-1||g===-1?null:{start:d,end:g}}else n=null}n=n||{start:0,end:0}}else n=null;for(kc={focusedElem:e,selectionRange:n},hu=!1,Ve=t;Ve!==null;)if(t=Ve,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ve=e;else for(;Ve!==null;){switch(t=Ve,s=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(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&s!==null){e=void 0,n=t,a=s.memoizedProps,s=s.memoizedState,l=n.stateNode;try{var V=tl(n.type,a);e=l.getSnapshotBeforeUpdate(V,s),l.__reactInternalSnapshotBeforeUpdate=e}catch(W){pe(n,n.return,W)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Vc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Vc(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(r(163))}if(e=t.sibling,e!==null){e.return=t.return,Ve=e;break}Ve=t.return}}function Ah(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:tn(e,n),l&4&&Ca(5,n);break;case 1:if(tn(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(o){pe(n,n.return,o)}else{var a=tl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){pe(n,n.return,o)}}l&64&&bh(n),l&512&&Ra(n,n.return);break;case 3:if(tn(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{rf(e,t)}catch(o){pe(n,n.return,o)}}break;case 27:t===null&&l&4&&Eh(n);case 26:case 5:tn(e,n),t===null&&l&4&&xh(n),l&512&&Ra(n,n.return);break;case 12:tn(e,n);break;case 31:tn(e,n),l&4&&Nh(e,n);break;case 13:tn(e,n),l&4&&Oh(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Xy.bind(null,n),c0(e,n))));break;case 22:if(l=n.memoizedState!==null||It,!l){t=t!==null&&t.memoizedState!==null||qe,a=It;var s=qe;It=l,(qe=t)&&!s?nn(e,n,(n.subtreeFlags&8772)!==0):tn(e,n),It=a,qe=s}break;case 30:break;default:tn(e,n)}}function Ch(e){var t=e.alternate;t!==null&&(e.alternate=null,Ch(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&$u(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 Ne=null,nt=!1;function en(e,t,n){for(n=n.child;n!==null;)Rh(e,t,n),n=n.sibling}function Rh(e,t,n){if(ct&&typeof ct.onCommitFiberUnmount=="function")try{ct.onCommitFiberUnmount(Fl,n)}catch{}switch(n.tag){case 26:qe||Bt(n,t),en(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:qe||Bt(n,t);var l=Ne,a=nt;Mn(n.type)&&(Ne=n.stateNode,nt=!1),en(e,t,n),Ba(n.stateNode),Ne=l,nt=a;break;case 5:qe||Bt(n,t);case 6:if(l=Ne,a=nt,Ne=null,en(e,t,n),Ne=l,nt=a,Ne!==null)if(nt)try{(Ne.nodeType===9?Ne.body:Ne.nodeName==="HTML"?Ne.ownerDocument.body:Ne).removeChild(n.stateNode)}catch(s){pe(n,t,s)}else try{Ne.removeChild(n.stateNode)}catch(s){pe(n,t,s)}break;case 18:Ne!==null&&(nt?(e=Ne,bd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Ql(e)):bd(Ne,n.stateNode));break;case 4:l=Ne,a=nt,Ne=n.stateNode.containerInfo,nt=!0,en(e,t,n),Ne=l,nt=a;break;case 0:case 11:case 14:case 15:Tn(2,n,t),qe||Tn(4,n,t),en(e,t,n);break;case 1:qe||(Bt(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&Sh(n,t,l)),en(e,t,n);break;case 21:en(e,t,n);break;case 22:qe=(l=qe)||n.memoizedState!==null,en(e,t,n),qe=l;break;default:en(e,t,n)}}function Nh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ql(e)}catch(n){pe(t,t.return,n)}}}function Oh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ql(e)}catch(n){pe(t,t.return,n)}}function wy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Th),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Th),t;default:throw Error(r(435,e.tag))}}function Zi(e,t){var n=wy(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var a=Gy.bind(null,e,l);l.then(a,a)}})}function lt(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var a=n[l],s=e,o=t,d=o;e:for(;d!==null;){switch(d.tag){case 27:if(Mn(d.type)){Ne=d.stateNode,nt=!1;break e}break;case 5:Ne=d.stateNode,nt=!1;break e;case 3:case 4:Ne=d.stateNode.containerInfo,nt=!0;break e}d=d.return}if(Ne===null)throw Error(r(160));Rh(s,o,a),Ne=null,nt=!1,s=a.alternate,s!==null&&(s.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)zh(t,e),t=t.sibling}var zt=null;function zh(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:lt(t,e),at(e),l&4&&(Tn(3,e,e.return),Ca(3,e),Tn(5,e,e.return));break;case 1:lt(t,e),at(e),l&512&&(qe||n===null||Bt(n,n.return)),l&64&&It&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var a=zt;if(lt(t,e),at(e),l&512&&(qe||n===null||Bt(n,n.return)),l&4){var s=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(l){case"title":s=a.getElementsByTagName("title")[0],(!s||s[ea]||s[Qe]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=a.createElement(l),a.head.insertBefore(s,a.querySelector("head > title"))),$e(s,l,n),s[Qe]=e,Ge(s),l=s;break e;case"link":var o=zd("link","href",a).get(l+(n.href||""));if(o){for(var d=0;d<o.length;d++)if(s=o[d],s.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&s.getAttribute("rel")===(n.rel==null?null:n.rel)&&s.getAttribute("title")===(n.title==null?null:n.title)&&s.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(d,1);break t}}s=a.createElement(l),$e(s,l,n),a.head.appendChild(s);break;case"meta":if(o=zd("meta","content",a).get(l+(n.content||""))){for(d=0;d<o.length;d++)if(s=o[d],s.getAttribute("content")===(n.content==null?null:""+n.content)&&s.getAttribute("name")===(n.name==null?null:n.name)&&s.getAttribute("property")===(n.property==null?null:n.property)&&s.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&s.getAttribute("charset")===(n.charSet==null?null:n.charSet)){o.splice(d,1);break t}}s=a.createElement(l),$e(s,l,n),a.head.appendChild(s);break;default:throw Error(r(468,l))}s[Qe]=e,Ge(s),l=s}e.stateNode=l}else Md(a,e.type,e.stateNode);else e.stateNode=Od(a,l,e.memoizedProps);else s!==l?(s===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):s.count--,l===null?Md(a,e.type,e.stateNode):Od(a,l,e.memoizedProps)):l===null&&e.stateNode!==null&&yc(e,e.memoizedProps,n.memoizedProps)}break;case 27:lt(t,e),at(e),l&512&&(qe||n===null||Bt(n,n.return)),n!==null&&l&4&&yc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(lt(t,e),at(e),l&512&&(qe||n===null||Bt(n,n.return)),e.flags&32){a=e.stateNode;try{ml(a,"")}catch(V){pe(e,e.return,V)}}l&4&&e.stateNode!=null&&(a=e.memoizedProps,yc(e,a,n!==null?n.memoizedProps:a)),l&1024&&(bc=!0);break;case 6:if(lt(t,e),at(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(V){pe(e,e.return,V)}}break;case 3:if(cu=null,a=zt,zt=uu(t.containerInfo),lt(t,e),zt=a,at(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Ql(t.containerInfo)}catch(V){pe(e,e.return,V)}bc&&(bc=!1,Mh(e));break;case 4:l=zt,zt=uu(e.stateNode.containerInfo),lt(t,e),at(e),zt=l;break;case 12:lt(t,e),at(e);break;case 31:lt(t,e),at(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Zi(e,l)));break;case 13:lt(t,e),at(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ji=st()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Zi(e,l)));break;case 22:a=e.memoizedState!==null;var g=n!==null&&n.memoizedState!==null,N=It,D=qe;if(It=N||a,qe=D||g,lt(t,e),qe=D,It=N,at(e),l&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||g||It||qe||nl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){g=n=t;try{if(s=g.stateNode,a)o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{d=g.stateNode;var U=g.memoizedProps.style,O=U!=null&&U.hasOwnProperty("display")?U.display:null;d.style.display=O==null||typeof O=="boolean"?"":(""+O).trim()}}catch(V){pe(g,g.return,V)}}}else if(t.tag===6){if(n===null){g=t;try{g.stateNode.nodeValue=a?"":g.memoizedProps}catch(V){pe(g,g.return,V)}}}else if(t.tag===18){if(n===null){g=t;try{var M=g.stateNode;a?Sd(M,!0):Sd(g.stateNode,!1)}catch(V){pe(g,g.return,V)}}}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;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,Zi(e,n))));break;case 19:lt(t,e),at(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Zi(e,l)));break;case 30:break;case 21:break;default:lt(t,e),at(e)}}function at(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(_h(l)){n=l;break}l=l.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var a=n.stateNode,s=vc(e);Qi(e,s,a);break;case 5:var o=n.stateNode;n.flags&32&&(ml(o,""),n.flags&=-33);var d=vc(e);Qi(e,d,o);break;case 3:case 4:var g=n.stateNode.containerInfo,N=vc(e);gc(e,N,g);break;default:throw Error(r(161))}}catch(D){pe(e,e.return,D)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Mh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function tn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Ah(e,t.alternate,t),t=t.sibling}function nl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Tn(4,t,t.return),nl(t);break;case 1:Bt(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Sh(t,t.return,n),nl(t);break;case 27:Ba(t.stateNode);case 26:case 5:Bt(t,t.return),nl(t);break;case 22:t.memoizedState===null&&nl(t);break;case 30:nl(t);break;default:nl(t)}e=e.sibling}}function nn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,a=e,s=t,o=s.flags;switch(s.tag){case 0:case 11:case 15:nn(a,s,n),Ca(4,s);break;case 1:if(nn(a,s,n),l=s,a=l.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(N){pe(l,l.return,N)}if(l=s,a=l.updateQueue,a!==null){var d=l.stateNode;try{var g=a.shared.hiddenCallbacks;if(g!==null)for(a.shared.hiddenCallbacks=null,a=0;a<g.length;a++)cf(g[a],d)}catch(N){pe(l,l.return,N)}}n&&o&64&&bh(s),Ra(s,s.return);break;case 27:Eh(s);case 26:case 5:nn(a,s,n),n&&l===null&&o&4&&xh(s),Ra(s,s.return);break;case 12:nn(a,s,n);break;case 31:nn(a,s,n),n&&o&4&&Nh(a,s);break;case 13:nn(a,s,n),n&&o&4&&Oh(a,s);break;case 22:s.memoizedState===null&&nn(a,s,n),Ra(s,s.return);break;case 30:break;default:nn(a,s,n)}t=t.sibling}}function Sc(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&da(n))}function xc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&da(e))}function Mt(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Dh(e,t,n,l),t=t.sibling}function Dh(e,t,n,l){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Mt(e,t,n,l),a&2048&&Ca(9,t);break;case 1:Mt(e,t,n,l);break;case 3:Mt(e,t,n,l),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&da(e)));break;case 12:if(a&2048){Mt(e,t,n,l),e=t.stateNode;try{var s=t.memoizedProps,o=s.id,d=s.onPostCommit;typeof d=="function"&&d(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(g){pe(t,t.return,g)}}else Mt(e,t,n,l);break;case 31:Mt(e,t,n,l);break;case 13:Mt(e,t,n,l);break;case 23:break;case 22:s=t.stateNode,o=t.alternate,t.memoizedState!==null?s._visibility&2?Mt(e,t,n,l):Na(e,t):s._visibility&2?Mt(e,t,n,l):(s._visibility|=2,wl(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),a&2048&&Sc(o,t);break;case 24:Mt(e,t,n,l),a&2048&&xc(t.alternate,t);break;default:Mt(e,t,n,l)}}function wl(e,t,n,l,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,o=t,d=n,g=l,N=o.flags;switch(o.tag){case 0:case 11:case 15:wl(s,o,d,g,a),Ca(8,o);break;case 23:break;case 22:var D=o.stateNode;o.memoizedState!==null?D._visibility&2?wl(s,o,d,g,a):Na(s,o):(D._visibility|=2,wl(s,o,d,g,a)),a&&N&2048&&Sc(o.alternate,o);break;case 24:wl(s,o,d,g,a),a&&N&2048&&xc(o.alternate,o);break;default:wl(s,o,d,g,a)}t=t.sibling}}function Na(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,a=l.flags;switch(l.tag){case 22:Na(n,l),a&2048&&Sc(l.alternate,l);break;case 24:Na(n,l),a&2048&&xc(l.alternate,l);break;default:Na(n,l)}t=t.sibling}}var Oa=8192;function Ul(e,t,n){if(e.subtreeFlags&Oa)for(e=e.child;e!==null;)jh(e,t,n),e=e.sibling}function jh(e,t,n){switch(e.tag){case 26:Ul(e,t,n),e.flags&Oa&&e.memoizedState!==null&&S0(n,zt,e.memoizedState,e.memoizedProps);break;case 5:Ul(e,t,n);break;case 3:case 4:var l=zt;zt=uu(e.stateNode.containerInfo),Ul(e,t,n),zt=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Oa,Oa=16777216,Ul(e,t,n),Oa=l):Ul(e,t,n));break;default:Ul(e,t,n)}}function wh(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 za(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Ve=l,Bh(l,e)}wh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Uh(e),e=e.sibling}function Uh(e){switch(e.tag){case 0:case 11:case 15:za(e),e.flags&2048&&Tn(9,e,e.return);break;case 3:za(e);break;case 12:za(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ki(e)):za(e);break;default:za(e)}}function Ki(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Ve=l,Bh(l,e)}wh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Tn(8,t,t.return),Ki(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ki(t));break;default:Ki(t)}e=e.sibling}}function Bh(e,t){for(;Ve!==null;){var n=Ve;switch(n.tag){case 0:case 11:case 15:Tn(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:da(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,Ve=l;else e:for(n=e;Ve!==null;){l=Ve;var a=l.sibling,s=l.return;if(Ch(l),l===n){Ve=null;break e}if(a!==null){a.return=s,Ve=a;break e}Ve=s}}}var Uy={getCacheForType:function(e){var t=Ke(Be),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ke(Be).controller.signal}},By=typeof WeakMap=="function"?WeakMap:Map,he=0,Ee=null,ae=null,ue=0,me=0,mt=null,An=!1,Bl=!1,_c=!1,ln=0,Me=0,Cn=0,ll=0,Ec=0,pt=0,Ll=0,Ma=null,it=null,Tc=!1,Ji=0,Lh=0,$i=1/0,Wi=null,Rn=null,ke=0,Nn=null,Hl=null,an=0,Ac=0,Cc=null,Hh=null,Da=0,Rc=null;function yt(){return(he&2)!==0&&ue!==0?ue&-ue:j.T!==null?jc():Pr()}function qh(){if(pt===0)if((ue&536870912)===0||ce){var e=ai;ai<<=1,(ai&3932160)===0&&(ai=262144),pt=e}else pt=536870912;return e=ht.current,e!==null&&(e.flags|=32),pt}function ut(e,t,n){(e===Ee&&(me===2||me===9)||e.cancelPendingCommit!==null)&&(ql(e,0),On(e,ue,pt,!1)),Il(e,n),((he&2)===0||e!==Ee)&&(e===Ee&&((he&2)===0&&(ll|=n),Me===4&&On(e,ue,pt,!1)),Lt(e))}function Yh(e,t,n){if((he&6)!==0)throw Error(r(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Pl(e,t),a=l?qy(e,t):Oc(e,t,!0),s=l;do{if(a===0){Bl&&!l&&On(e,t,0,!1);break}else{if(n=e.current.alternate,s&&!Ly(n)){a=Oc(e,t,!1),s=!1;continue}if(a===2){if(s=t,e.errorRecoveryDisabledLanes&s)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var d=e;a=Ma;var g=d.current.memoizedState.isDehydrated;if(g&&(ql(d,o).flags|=256),o=Oc(d,o,!1),o!==2){if(_c&&!g){d.errorRecoveryDisabledLanes|=s,ll|=s,a=4;break e}s=it,it=a,s!==null&&(it===null?it=s:it.push.apply(it,s))}a=o}if(s=!1,a!==2)continue}}if(a===1){ql(e,0),On(e,t,0,!0);break}e:{switch(l=e,s=a,s){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:On(l,t,pt,!An);break e;case 2:it=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(a=Ji+300-st(),10<a)){if(On(l,t,pt,!An),ui(l,0,!0)!==0)break e;an=t,l.timeoutHandle=vd(kh.bind(null,l,n,it,Wi,Tc,t,pt,ll,Ll,An,s,"Throttled",-0,0),a);break e}kh(l,n,it,Wi,Tc,t,pt,ll,Ll,An,s,null,-0,0)}}break}while(!0);Lt(e)}function kh(e,t,n,l,a,s,o,d,g,N,D,U,O,M){if(e.timeoutHandle=-1,U=t.subtreeFlags,U&8192||(U&16785408)===16785408){U={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Gt},jh(t,s,U);var V=(s&62914560)===s?Ji-st():(s&4194048)===s?Lh-st():0;if(V=x0(U,V),V!==null){an=s,e.cancelPendingCommit=V($h.bind(null,e,t,s,n,l,a,o,d,g,D,U,null,O,M)),On(e,s,o,!N);return}}$h(e,t,s,n,l,a,o,d,g)}function Ly(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var a=n[l],s=a.getSnapshot;a=a.value;try{if(!ot(s(),a))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 On(e,t,n,l){t&=~Ec,t&=~ll,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var a=t;0<a;){var s=31-rt(a),o=1<<s;l[s]=-1,a&=~o}n!==0&&$r(e,n,t)}function Fi(){return(he&6)===0?(ja(0),!1):!0}function Nc(){if(ae!==null){if(me===0)var e=ae.return;else e=ae,Kt=Jn=null,Vs(e),Ol=null,pa=0,e=ae;for(;e!==null;)gh(e.alternate,e),e=e.return;ae=null}}function ql(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,l0(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),an=0,Nc(),Ee=e,ae=n=Qt(e.current,null),ue=t,me=0,mt=null,An=!1,Bl=Pl(e,t),_c=!1,Ll=pt=Ec=ll=Cn=Me=0,it=Ma=null,Tc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var a=31-rt(l),s=1<<a;t|=e[a],l&=~s}return ln=t,gi(),n}function Xh(e,t){te=null,j.H=Ea,t===Nl||t===Ci?(t=lf(),me=3):t===Ds?(t=lf(),me=4):me=t===uc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,mt=t,ae===null&&(Me=1,Yi(e,St(t,e.current)))}function Gh(){var e=ht.current;return e===null?!0:(ue&4194048)===ue?Tt===null:(ue&62914560)===ue||(ue&536870912)!==0?e===Tt:!1}function Vh(){var e=j.H;return j.H=Ea,e===null?Ea:e}function Qh(){var e=j.A;return j.A=Uy,e}function Pi(){Me=4,An||(ue&4194048)!==ue&&ht.current!==null||(Bl=!0),(Cn&134217727)===0&&(ll&134217727)===0||Ee===null||On(Ee,ue,pt,!1)}function Oc(e,t,n){var l=he;he|=2;var a=Vh(),s=Qh();(Ee!==e||ue!==t)&&(Wi=null,ql(e,t)),t=!1;var o=Me;e:do try{if(me!==0&&ae!==null){var d=ae,g=mt;switch(me){case 8:Nc(),o=6;break e;case 3:case 2:case 9:case 6:ht.current===null&&(t=!0);var N=me;if(me=0,mt=null,Yl(e,d,g,N),n&&Bl){o=0;break e}break;default:N=me,me=0,mt=null,Yl(e,d,g,N)}}Hy(),o=Me;break}catch(D){Xh(e,D)}while(!0);return t&&e.shellSuspendCounter++,Kt=Jn=null,he=l,j.H=a,j.A=s,ae===null&&(Ee=null,ue=0,gi()),o}function Hy(){for(;ae!==null;)Zh(ae)}function qy(e,t){var n=he;he|=2;var l=Vh(),a=Qh();Ee!==e||ue!==t?(Wi=null,$i=st()+500,ql(e,t)):Bl=Pl(e,t);e:do try{if(me!==0&&ae!==null){t=ae;var s=mt;t:switch(me){case 1:me=0,mt=null,Yl(e,t,s,1);break;case 2:case 9:if(tf(s)){me=0,mt=null,Kh(t);break}t=function(){me!==2&&me!==9||Ee!==e||(me=7),Lt(e)},s.then(t,t);break e;case 3:me=7;break e;case 4:me=5;break e;case 7:tf(s)?(me=0,mt=null,Kh(t)):(me=0,mt=null,Yl(e,t,s,7));break;case 5:var o=null;switch(ae.tag){case 26:o=ae.memoizedState;case 5:case 27:var d=ae;if(o?Dd(o):d.stateNode.complete){me=0,mt=null;var g=d.sibling;if(g!==null)ae=g;else{var N=d.return;N!==null?(ae=N,Ii(N)):ae=null}break t}}me=0,mt=null,Yl(e,t,s,5);break;case 6:me=0,mt=null,Yl(e,t,s,6);break;case 8:Nc(),Me=6;break e;default:throw Error(r(462))}}Yy();break}catch(D){Xh(e,D)}while(!0);return Kt=Jn=null,j.H=l,j.A=a,he=n,ae!==null?0:(Ee=null,ue=0,gi(),Me)}function Yy(){for(;ae!==null&&!rp();)Zh(ae)}function Zh(e){var t=yh(e.alternate,e,ln);e.memoizedProps=e.pendingProps,t===null?Ii(e):ae=t}function Kh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=oh(n,t,t.pendingProps,t.type,void 0,ue);break;case 11:t=oh(n,t,t.pendingProps,t.type.render,t.ref,ue);break;case 5:Vs(t);default:gh(n,t),t=ae=Vo(t,ln),t=yh(n,t,ln)}e.memoizedProps=e.pendingProps,t===null?Ii(e):ae=t}function Yl(e,t,n,l){Kt=Jn=null,Vs(t),Ol=null,pa=0;var a=t.return;try{if(Ny(e,a,t,n,ue)){Me=1,Yi(e,St(n,e.current)),ae=null;return}}catch(s){if(a!==null)throw ae=a,s;Me=1,Yi(e,St(n,e.current)),ae=null;return}t.flags&32768?(ce||l===1?e=!0:Bl||(ue&536870912)!==0?e=!1:(An=e=!0,(l===2||l===9||l===3||l===6)&&(l=ht.current,l!==null&&l.tag===13&&(l.flags|=16384))),Jh(t,e)):Ii(t)}function Ii(e){var t=e;do{if((t.flags&32768)!==0){Jh(t,An);return}e=t.return;var n=My(t.alternate,t,ln);if(n!==null){ae=n;return}if(t=t.sibling,t!==null){ae=t;return}ae=t=e}while(t!==null);Me===0&&(Me=5)}function Jh(e,t){do{var n=Dy(e.alternate,e);if(n!==null){n.flags&=32767,ae=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ae=e;return}ae=e=n}while(e!==null);Me=6,ae=null}function $h(e,t,n,l,a,s,o,d,g){e.cancelPendingCommit=null;do eu();while(ke!==0);if((he&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(s=t.lanes|t.childLanes,s|=vs,bp(e,n,s,o,d,g),e===Ee&&(ae=Ee=null,ue=0),Hl=t,Nn=e,an=n,Ac=s,Cc=a,Hh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Vy(ni,function(){return ed(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=j.T,j.T=null,a=X.p,X.p=2,o=he,he|=4;try{jy(e,t,n)}finally{he=o,X.p=a,j.T=l}}ke=1,Wh(),Fh(),Ph()}}function Wh(){if(ke===1){ke=0;var e=Nn,t=Hl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=j.T,j.T=null;var l=X.p;X.p=2;var a=he;he|=4;try{zh(t,e);var s=kc,o=Uo(e.containerInfo),d=s.focusedElem,g=s.selectionRange;if(o!==d&&d&&d.ownerDocument&&wo(d.ownerDocument.documentElement,d)){if(g!==null&&hs(d)){var N=g.start,D=g.end;if(D===void 0&&(D=N),"selectionStart"in d)d.selectionStart=N,d.selectionEnd=Math.min(D,d.value.length);else{var U=d.ownerDocument||document,O=U&&U.defaultView||window;if(O.getSelection){var M=O.getSelection(),V=d.textContent.length,W=Math.min(g.start,V),Se=g.end===void 0?W:Math.min(g.end,V);!M.extend&&W>Se&&(o=Se,Se=W,W=o);var A=jo(d,W),x=jo(d,Se);if(A&&x&&(M.rangeCount!==1||M.anchorNode!==A.node||M.anchorOffset!==A.offset||M.focusNode!==x.node||M.focusOffset!==x.offset)){var R=U.createRange();R.setStart(A.node,A.offset),M.removeAllRanges(),W>Se?(M.addRange(R),M.extend(x.node,x.offset)):(R.setEnd(x.node,x.offset),M.addRange(R))}}}}for(U=[],M=d;M=M.parentNode;)M.nodeType===1&&U.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<U.length;d++){var w=U[d];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}hu=!!Yc,kc=Yc=null}finally{he=a,X.p=l,j.T=n}}e.current=t,ke=2}}function Fh(){if(ke===2){ke=0;var e=Nn,t=Hl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=j.T,j.T=null;var l=X.p;X.p=2;var a=he;he|=4;try{Ah(e,t.alternate,t)}finally{he=a,X.p=l,j.T=n}}ke=3}}function Ph(){if(ke===4||ke===3){ke=0,op();var e=Nn,t=Hl,n=an,l=Hh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ke=5:(ke=0,Hl=Nn=null,Ih(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(Rn=null),Ku(n),t=t.stateNode,ct&&typeof ct.onCommitFiberRoot=="function")try{ct.onCommitFiberRoot(Fl,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=j.T,a=X.p,X.p=2,j.T=null;try{for(var s=e.onRecoverableError,o=0;o<l.length;o++){var d=l[o];s(d.value,{componentStack:d.stack})}}finally{j.T=t,X.p=a}}(an&3)!==0&&eu(),Lt(e),a=e.pendingLanes,(n&261930)!==0&&(a&42)!==0?e===Rc?Da++:(Da=0,Rc=e):Da=0,ja(0)}}function Ih(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,da(t)))}function eu(){return Wh(),Fh(),Ph(),ed()}function ed(){if(ke!==5)return!1;var e=Nn,t=Ac;Ac=0;var n=Ku(an),l=j.T,a=X.p;try{X.p=32>n?32:n,j.T=null,n=Cc,Cc=null;var s=Nn,o=an;if(ke=0,Hl=Nn=null,an=0,(he&6)!==0)throw Error(r(331));var d=he;if(he|=4,Uh(s.current),Dh(s,s.current,o,n),he=d,ja(0,!1),ct&&typeof ct.onPostCommitFiberRoot=="function")try{ct.onPostCommitFiberRoot(Fl,s)}catch{}return!0}finally{X.p=a,j.T=l,Ih(e,t)}}function td(e,t,n){t=St(n,t),t=ic(e.stateNode,t,2),e=xn(e,t,2),e!==null&&(Il(e,2),Lt(e))}function pe(e,t,n){if(e.tag===3)td(e,e,n);else for(;t!==null;){if(t.tag===3){td(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Rn===null||!Rn.has(l))){e=St(n,e),n=nh(2),l=xn(t,n,2),l!==null&&(lh(n,l,t,e),Il(l,2),Lt(l));break}}t=t.return}}function zc(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new By;var a=new Set;l.set(t,a)}else a=l.get(t),a===void 0&&(a=new Set,l.set(t,a));a.has(n)||(_c=!0,a.add(n),e=ky.bind(null,e,t,n),t.then(e,e))}function ky(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ee===e&&(ue&n)===n&&(Me===4||Me===3&&(ue&62914560)===ue&&300>st()-Ji?(he&2)===0&&ql(e,0):Ec|=n,Ll===ue&&(Ll=0)),Lt(e)}function nd(e,t){t===0&&(t=Jr()),e=Qn(e,t),e!==null&&(Il(e,t),Lt(e))}function Xy(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),nd(e,n)}function Gy(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),nd(e,n)}function Vy(e,t){return Gu(e,t)}var tu=null,kl=null,Mc=!1,nu=!1,Dc=!1,zn=0;function Lt(e){e!==kl&&e.next===null&&(kl===null?tu=kl=e:kl=kl.next=e),nu=!0,Mc||(Mc=!0,Zy())}function ja(e,t){if(!Dc&&nu){Dc=!0;do for(var n=!1,l=tu;l!==null;){if(e!==0){var a=l.pendingLanes;if(a===0)var s=0;else{var o=l.suspendedLanes,d=l.pingedLanes;s=(1<<31-rt(42|e)+1)-1,s&=a&~(o&~d),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(n=!0,ud(l,s))}else s=ue,s=ui(l,l===Ee?s:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(s&3)===0||Pl(l,s)||(n=!0,ud(l,s));l=l.next}while(n);Dc=!1}}function Qy(){ld()}function ld(){nu=Mc=!1;var e=0;zn!==0&&n0()&&(e=zn);for(var t=st(),n=null,l=tu;l!==null;){var a=l.next,s=ad(l,t);s===0?(l.next=null,n===null?tu=a:n.next=a,a===null&&(kl=n)):(n=l,(e!==0||(s&3)!==0)&&(nu=!0)),l=a}ke!==0&&ke!==5||ja(e),zn!==0&&(zn=0)}function ad(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,a=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var o=31-rt(s),d=1<<o,g=a[o];g===-1?((d&n)===0||(d&l)!==0)&&(a[o]=gp(d,t)):g<=t&&(e.expiredLanes|=d),s&=~d}if(t=Ee,n=ue,n=ui(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(me===2||me===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Vu(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Pl(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&Vu(l),Ku(n)){case 2:case 8:n=Zr;break;case 32:n=ni;break;case 268435456:n=Kr;break;default:n=ni}return l=id.bind(null,e),n=Gu(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&Vu(l),e.callbackPriority=2,e.callbackNode=null,2}function id(e,t){if(ke!==0&&ke!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(eu()&&e.callbackNode!==n)return null;var l=ue;return l=ui(e,e===Ee?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Yh(e,l,t),ad(e,st()),e.callbackNode!=null&&e.callbackNode===n?id.bind(null,e):null)}function ud(e,t){if(eu())return null;Yh(e,t,!0)}function Zy(){a0(function(){(he&6)!==0?Gu(Qr,Qy):ld()})}function jc(){if(zn===0){var e=Cl;e===0&&(e=li,li<<=1,(li&261888)===0&&(li=256)),zn=e}return zn}function sd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:oi(""+e)}function cd(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Ky(e,t,n,l,a){if(t==="submit"&&n&&n.stateNode===a){var s=sd((a[et]||null).action),o=l.submitter;o&&(t=(t=o[et]||null)?sd(t.formAction):o.getAttribute("formAction"),t!==null&&(s=t,o=null));var d=new mi("action","action",null,l,a);e.push({event:d,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(zn!==0){var g=o?cd(a,o):new FormData(a);Is(n,{pending:!0,data:g,method:a.method,action:s},null,g)}}else typeof s=="function"&&(d.preventDefault(),g=o?cd(a,o):new FormData(a),Is(n,{pending:!0,data:g,method:a.method,action:s},s,g))},currentTarget:a}]})}}for(var wc=0;wc<ys.length;wc++){var Uc=ys[wc],Jy=Uc.toLowerCase(),$y=Uc[0].toUpperCase()+Uc.slice(1);Ot(Jy,"on"+$y)}Ot(Ho,"onAnimationEnd"),Ot(qo,"onAnimationIteration"),Ot(Yo,"onAnimationStart"),Ot("dblclick","onDoubleClick"),Ot("focusin","onFocus"),Ot("focusout","onBlur"),Ot(fy,"onTransitionRun"),Ot(hy,"onTransitionStart"),Ot(dy,"onTransitionCancel"),Ot(ko,"onTransitionEnd"),hl("onMouseEnter",["mouseout","mouseover"]),hl("onMouseLeave",["mouseout","mouseover"]),hl("onPointerEnter",["pointerout","pointerover"]),hl("onPointerLeave",["pointerout","pointerover"]),kn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),kn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),kn("onBeforeInput",["compositionend","keypress","textInput","paste"]),kn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),kn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),kn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wa="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(" "),Wy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(wa));function rd(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],a=l.event;l=l.listeners;e:{var s=void 0;if(t)for(var o=l.length-1;0<=o;o--){var d=l[o],g=d.instance,N=d.currentTarget;if(d=d.listener,g!==s&&a.isPropagationStopped())break e;s=d,a.currentTarget=N;try{s(a)}catch(D){vi(D)}a.currentTarget=null,s=g}else for(o=0;o<l.length;o++){if(d=l[o],g=d.instance,N=d.currentTarget,d=d.listener,g!==s&&a.isPropagationStopped())break e;s=d,a.currentTarget=N;try{s(a)}catch(D){vi(D)}a.currentTarget=null,s=g}}}}function ie(e,t){var n=t[Ju];n===void 0&&(n=t[Ju]=new Set);var l=e+"__bubble";n.has(l)||(od(t,e,2,!1),n.add(l))}function Bc(e,t,n){var l=0;t&&(l|=4),od(n,e,l,t)}var lu="_reactListening"+Math.random().toString(36).slice(2);function Lc(e){if(!e[lu]){e[lu]=!0,to.forEach(function(n){n!=="selectionchange"&&(Wy.has(n)||Bc(n,!1,e),Bc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[lu]||(t[lu]=!0,Bc("selectionchange",!1,t))}}function od(e,t,n,l){switch(qd(t)){case 2:var a=T0;break;case 8:a=A0;break;default:a=Pc}n=a.bind(null,t,n,e),a=void 0,!ls||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),l?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function Hc(e,t,n,l,a){var s=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var o=l.tag;if(o===3||o===4){var d=l.stateNode.containerInfo;if(d===a)break;if(o===4)for(o=l.return;o!==null;){var g=o.tag;if((g===3||g===4)&&o.stateNode.containerInfo===a)return;o=o.return}for(;d!==null;){if(o=rl(d),o===null)return;if(g=o.tag,g===5||g===6||g===26||g===27){l=s=o;continue e}d=d.parentNode}}l=l.return}mo(function(){var N=s,D=ts(n),U=[];e:{var O=Xo.get(e);if(O!==void 0){var M=mi,V=e;switch(e){case"keypress":if(hi(n)===0)break e;case"keydown":case"keyup":M=Gp;break;case"focusin":V="focus",M=ss;break;case"focusout":V="blur",M=ss;break;case"beforeblur":case"afterblur":M=ss;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":M=vo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=Mp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=Zp;break;case Ho:case qo:case Yo:M=wp;break;case ko:M=Jp;break;case"scroll":case"scrollend":M=Op;break;case"wheel":M=Wp;break;case"copy":case"cut":case"paste":M=Bp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=bo;break;case"toggle":case"beforetoggle":M=Pp}var W=(t&4)!==0,Se=!W&&(e==="scroll"||e==="scrollend"),A=W?O!==null?O+"Capture":null:O;W=[];for(var x=N,R;x!==null;){var w=x;if(R=w.stateNode,w=w.tag,w!==5&&w!==26&&w!==27||R===null||A===null||(w=na(x,A),w!=null&&W.push(Ua(x,w,R))),Se)break;x=x.return}0<W.length&&(O=new M(O,V,null,n,D),U.push({event:O,listeners:W}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",M=e==="mouseout"||e==="pointerout",O&&n!==es&&(V=n.relatedTarget||n.fromElement)&&(rl(V)||V[cl]))break e;if((M||O)&&(O=D.window===D?D:(O=D.ownerDocument)?O.defaultView||O.parentWindow:window,M?(V=n.relatedTarget||n.toElement,M=N,V=V?rl(V):null,V!==null&&(Se=h(V),W=V.tag,V!==Se||W!==5&&W!==27&&W!==6)&&(V=null)):(M=null,V=N),M!==V)){if(W=vo,w="onMouseLeave",A="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(W=bo,w="onPointerLeave",A="onPointerEnter",x="pointer"),Se=M==null?O:ta(M),R=V==null?O:ta(V),O=new W(w,x+"leave",M,n,D),O.target=Se,O.relatedTarget=R,w=null,rl(D)===N&&(W=new W(A,x+"enter",V,n,D),W.target=R,W.relatedTarget=Se,w=W),Se=w,M&&V)t:{for(W=Fy,A=M,x=V,R=0,w=A;w;w=W(w))R++;w=0;for(var J=x;J;J=W(J))w++;for(;0<R-w;)A=W(A),R--;for(;0<w-R;)x=W(x),w--;for(;R--;){if(A===x||x!==null&&A===x.alternate){W=A;break t}A=W(A),x=W(x)}W=null}else W=null;M!==null&&fd(U,O,M,W,!1),V!==null&&Se!==null&&fd(U,Se,V,W,!0)}}e:{if(O=N?ta(N):window,M=O.nodeName&&O.nodeName.toLowerCase(),M==="select"||M==="input"&&O.type==="file")var oe=Ro;else if(Ao(O))if(No)oe=cy;else{oe=uy;var K=iy}else M=O.nodeName,!M||M.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?N&&Iu(N.elementType)&&(oe=Ro):oe=sy;if(oe&&(oe=oe(e,N))){Co(U,oe,n,D);break e}K&&K(e,O,N),e==="focusout"&&N&&O.type==="number"&&N.memoizedProps.value!=null&&Pu(O,"number",O.value)}switch(K=N?ta(N):window,e){case"focusin":(Ao(K)||K.contentEditable==="true")&&(gl=K,ds=N,oa=null);break;case"focusout":oa=ds=gl=null;break;case"mousedown":ms=!0;break;case"contextmenu":case"mouseup":case"dragend":ms=!1,Bo(U,n,D);break;case"selectionchange":if(oy)break;case"keydown":case"keyup":Bo(U,n,D)}var ne;if(rs)e:{switch(e){case"compositionstart":var se="onCompositionStart";break e;case"compositionend":se="onCompositionEnd";break e;case"compositionupdate":se="onCompositionUpdate";break e}se=void 0}else vl?Eo(e,n)&&(se="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(se="onCompositionStart");se&&(So&&n.locale!=="ko"&&(vl||se!=="onCompositionStart"?se==="onCompositionEnd"&&vl&&(ne=po()):(mn=D,as="value"in mn?mn.value:mn.textContent,vl=!0)),K=au(N,se),0<K.length&&(se=new go(se,e,null,n,D),U.push({event:se,listeners:K}),ne?se.data=ne:(ne=To(n),ne!==null&&(se.data=ne)))),(ne=ey?ty(e,n):ny(e,n))&&(se=au(N,"onBeforeInput"),0<se.length&&(K=new go("onBeforeInput","beforeinput",null,n,D),U.push({event:K,listeners:se}),K.data=ne)),Ky(U,e,N,n,D)}rd(U,t)})}function Ua(e,t,n){return{instance:e,listener:t,currentTarget:n}}function au(e,t){for(var n=t+"Capture",l=[];e!==null;){var a=e,s=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||s===null||(a=na(e,n),a!=null&&l.unshift(Ua(e,a,s)),a=na(e,t),a!=null&&l.push(Ua(e,a,s))),e.tag===3)return l;e=e.return}return[]}function Fy(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function fd(e,t,n,l,a){for(var s=t._reactName,o=[];n!==null&&n!==l;){var d=n,g=d.alternate,N=d.stateNode;if(d=d.tag,g!==null&&g===l)break;d!==5&&d!==26&&d!==27||N===null||(g=N,a?(N=na(n,s),N!=null&&o.unshift(Ua(n,N,g))):a||(N=na(n,s),N!=null&&o.push(Ua(n,N,g)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Py=/\r\n?/g,Iy=/\u0000|\uFFFD/g;function hd(e){return(typeof e=="string"?e:""+e).replace(Py,`
|
||
`).replace(Iy,"")}function dd(e,t){return t=hd(t),hd(e)===t}function be(e,t,n,l,a,s){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||ml(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&ml(e,""+l);break;case"className":ci(e,"class",l);break;case"tabIndex":ci(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ci(e,n,l);break;case"style":fo(e,l,s);break;case"data":if(t!=="object"){ci(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=oi(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"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 s=="function"&&(n==="formAction"?(t!=="input"&&be(e,t,"name",a.name,a,null),be(e,t,"formEncType",a.formEncType,a,null),be(e,t,"formMethod",a.formMethod,a,null),be(e,t,"formTarget",a.formTarget,a,null)):(be(e,t,"encType",a.encType,a,null),be(e,t,"method",a.method,a,null),be(e,t,"target",a.target,a,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=oi(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Gt);break;case"onScroll":l!=null&&ie("scroll",e);break;case"onScrollEnd":l!=null&&ie("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=oi(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):e.removeAttribute(n);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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":ie("beforetoggle",e),ie("toggle",e),si(e,"popover",l);break;case"xlinkActuate":Xt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Xt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Xt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Xt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Xt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Xt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":si(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Rp.get(n)||n,si(e,n,l))}}function qc(e,t,n,l,a,s){switch(n){case"style":fo(e,l,s);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"children":typeof l=="string"?ml(e,l):(typeof l=="number"||typeof l=="bigint")&&ml(e,""+l);break;case"onScroll":l!=null&&ie("scroll",e);break;case"onScrollEnd":l!=null&&ie("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Gt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!no.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),s=e[et]||null,s=s!=null?s[n]:null,typeof s=="function"&&e.removeEventListener(t,s,a),typeof l=="function")){typeof s!="function"&&s!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,a);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):si(e,n,l)}}}function $e(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ie("error",e),ie("load",e);var l=!1,a=!1,s;for(s in n)if(n.hasOwnProperty(s)){var o=n[s];if(o!=null)switch(s){case"src":l=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:be(e,t,s,o,n,null)}}a&&be(e,t,"srcSet",n.srcSet,n,null),l&&be(e,t,"src",n.src,n,null);return;case"input":ie("invalid",e);var d=s=o=a=null,g=null,N=null;for(l in n)if(n.hasOwnProperty(l)){var D=n[l];if(D!=null)switch(l){case"name":a=D;break;case"type":o=D;break;case"checked":g=D;break;case"defaultChecked":N=D;break;case"value":s=D;break;case"defaultValue":d=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(r(137,t));break;default:be(e,t,l,D,n,null)}}so(e,s,d,g,N,o,a,!1);return;case"select":ie("invalid",e),l=o=s=null;for(a in n)if(n.hasOwnProperty(a)&&(d=n[a],d!=null))switch(a){case"value":s=d;break;case"defaultValue":o=d;break;case"multiple":l=d;default:be(e,t,a,d,n,null)}t=s,n=o,e.multiple=!!l,t!=null?dl(e,!!l,t,!1):n!=null&&dl(e,!!l,n,!0);return;case"textarea":ie("invalid",e),s=a=l=null;for(o in n)if(n.hasOwnProperty(o)&&(d=n[o],d!=null))switch(o){case"value":l=d;break;case"defaultValue":a=d;break;case"children":s=d;break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(r(91));break;default:be(e,t,o,d,n,null)}ro(e,l,a,s);return;case"option":for(g in n)if(n.hasOwnProperty(g)&&(l=n[g],l!=null))switch(g){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:be(e,t,g,l,n,null)}return;case"dialog":ie("beforetoggle",e),ie("toggle",e),ie("cancel",e),ie("close",e);break;case"iframe":case"object":ie("load",e);break;case"video":case"audio":for(l=0;l<wa.length;l++)ie(wa[l],e);break;case"image":ie("error",e),ie("load",e);break;case"details":ie("toggle",e);break;case"embed":case"source":case"link":ie("error",e),ie("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(N in n)if(n.hasOwnProperty(N)&&(l=n[N],l!=null))switch(N){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:be(e,t,N,l,n,null)}return;default:if(Iu(t)){for(D in n)n.hasOwnProperty(D)&&(l=n[D],l!==void 0&&qc(e,t,D,l,n,void 0));return}}for(d in n)n.hasOwnProperty(d)&&(l=n[d],l!=null&&be(e,t,d,l,n,null))}function e0(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,s=null,o=null,d=null,g=null,N=null,D=null;for(M in n){var U=n[M];if(n.hasOwnProperty(M)&&U!=null)switch(M){case"checked":break;case"value":break;case"defaultValue":g=U;default:l.hasOwnProperty(M)||be(e,t,M,null,l,U)}}for(var O in l){var M=l[O];if(U=n[O],l.hasOwnProperty(O)&&(M!=null||U!=null))switch(O){case"type":s=M;break;case"name":a=M;break;case"checked":N=M;break;case"defaultChecked":D=M;break;case"value":o=M;break;case"defaultValue":d=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(137,t));break;default:M!==U&&be(e,t,O,M,l,U)}}Fu(e,o,d,g,N,D,s,a);return;case"select":M=o=d=O=null;for(s in n)if(g=n[s],n.hasOwnProperty(s)&&g!=null)switch(s){case"value":break;case"multiple":M=g;default:l.hasOwnProperty(s)||be(e,t,s,null,l,g)}for(a in l)if(s=l[a],g=n[a],l.hasOwnProperty(a)&&(s!=null||g!=null))switch(a){case"value":O=s;break;case"defaultValue":d=s;break;case"multiple":o=s;default:s!==g&&be(e,t,a,s,l,g)}t=d,n=o,l=M,O!=null?dl(e,!!n,O,!1):!!l!=!!n&&(t!=null?dl(e,!!n,t,!0):dl(e,!!n,n?[]:"",!1));return;case"textarea":M=O=null;for(d in n)if(a=n[d],n.hasOwnProperty(d)&&a!=null&&!l.hasOwnProperty(d))switch(d){case"value":break;case"children":break;default:be(e,t,d,null,l,a)}for(o in l)if(a=l[o],s=n[o],l.hasOwnProperty(o)&&(a!=null||s!=null))switch(o){case"value":O=a;break;case"defaultValue":M=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(r(91));break;default:a!==s&&be(e,t,o,a,l,s)}co(e,O,M);return;case"option":for(var V in n)if(O=n[V],n.hasOwnProperty(V)&&O!=null&&!l.hasOwnProperty(V))switch(V){case"selected":e.selected=!1;break;default:be(e,t,V,null,l,O)}for(g in l)if(O=l[g],M=n[g],l.hasOwnProperty(g)&&O!==M&&(O!=null||M!=null))switch(g){case"selected":e.selected=O&&typeof O!="function"&&typeof O!="symbol";break;default:be(e,t,g,O,l,M)}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 W in n)O=n[W],n.hasOwnProperty(W)&&O!=null&&!l.hasOwnProperty(W)&&be(e,t,W,null,l,O);for(N in l)if(O=l[N],M=n[N],l.hasOwnProperty(N)&&O!==M&&(O!=null||M!=null))switch(N){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:be(e,t,N,O,l,M)}return;default:if(Iu(t)){for(var Se in n)O=n[Se],n.hasOwnProperty(Se)&&O!==void 0&&!l.hasOwnProperty(Se)&&qc(e,t,Se,void 0,l,O);for(D in l)O=l[D],M=n[D],!l.hasOwnProperty(D)||O===M||O===void 0&&M===void 0||qc(e,t,D,O,l,M);return}}for(var A in n)O=n[A],n.hasOwnProperty(A)&&O!=null&&!l.hasOwnProperty(A)&&be(e,t,A,null,l,O);for(U in l)O=l[U],M=n[U],!l.hasOwnProperty(U)||O===M||O==null&&M==null||be(e,t,U,O,l,M)}function md(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function t0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var a=n[l],s=a.transferSize,o=a.initiatorType,d=a.duration;if(s&&d&&md(o)){for(o=0,d=a.responseEnd,l+=1;l<n.length;l++){var g=n[l],N=g.startTime;if(N>d)break;var D=g.transferSize,U=g.initiatorType;D&&md(U)&&(g=g.responseEnd,o+=D*(g<d?1:(d-N)/(g-N)))}if(--l,t+=8*(s+o)/(a.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 Yc=null,kc=null;function iu(e){return e.nodeType===9?e:e.ownerDocument}function pd(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 yd(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 Xc(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 Gc=null;function n0(){var e=window.event;return e&&e.type==="popstate"?e===Gc?!1:(Gc=e,!0):(Gc=null,!1)}var vd=typeof setTimeout=="function"?setTimeout:void 0,l0=typeof clearTimeout=="function"?clearTimeout:void 0,gd=typeof Promise=="function"?Promise:void 0,a0=typeof queueMicrotask=="function"?queueMicrotask:typeof gd<"u"?function(e){return gd.resolve(null).then(e).catch(i0)}:vd;function i0(e){setTimeout(function(){throw e})}function Mn(e){return e==="head"}function bd(e,t){var n=t,l=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(a),Ql(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")Ba(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Ba(n);for(var s=n.firstChild;s;){var o=s.nextSibling,d=s.nodeName;s[ea]||d==="SCRIPT"||d==="STYLE"||d==="LINK"&&s.rel.toLowerCase()==="stylesheet"||n.removeChild(s),s=o}}else n==="body"&&Ba(e.ownerDocument.body);n=a}while(n);Ql(t)}function Sd(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function Vc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Vc(n),$u(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function u0(e,t,n,l){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ea])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=At(e.nextSibling),e===null)break}return null}function s0(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=At(e.nextSibling),e===null))return null;return e}function xd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=At(e.nextSibling),e===null))return null;return e}function Qc(e){return e.data==="$?"||e.data==="$~"}function Zc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function c0(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function At(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 Kc=null;function _d(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return At(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Ed(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Td(e,t,n){switch(t=iu(n),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Ba(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);$u(e)}var Ct=new Map,Ad=new Set;function uu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var un=X.d;X.d={f:r0,r:o0,D:f0,C:h0,L:d0,m:m0,X:y0,S:p0,M:v0};function r0(){var e=un.f(),t=Fi();return e||t}function o0(e){var t=ol(e);t!==null&&t.tag===5&&t.type==="form"?Xf(t):un.r(e)}var Xl=typeof document>"u"?null:document;function Cd(e,t,n){var l=Xl;if(l&&typeof t=="string"&&t){var a=gt(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),Ad.has(a)||(Ad.add(a),e={rel:e,crossOrigin:n,href:t},l.querySelector(a)===null&&(t=l.createElement("link"),$e(t,"link",e),Ge(t),l.head.appendChild(t)))}}function f0(e){un.D(e),Cd("dns-prefetch",e,null)}function h0(e,t){un.C(e,t),Cd("preconnect",e,t)}function d0(e,t,n){un.L(e,t,n);var l=Xl;if(l&&e&&t){var a='link[rel="preload"][as="'+gt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+gt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+gt(n.imageSizes)+'"]')):a+='[href="'+gt(e)+'"]';var s=a;switch(t){case"style":s=Gl(e);break;case"script":s=Vl(e)}Ct.has(s)||(e=S({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Ct.set(s,e),l.querySelector(a)!==null||t==="style"&&l.querySelector(La(s))||t==="script"&&l.querySelector(Ha(s))||(t=l.createElement("link"),$e(t,"link",e),Ge(t),l.head.appendChild(t)))}}function m0(e,t){un.m(e,t);var n=Xl;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+gt(l)+'"][href="'+gt(e)+'"]',s=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Vl(e)}if(!Ct.has(s)&&(e=S({rel:"modulepreload",href:e},t),Ct.set(s,e),n.querySelector(a)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ha(s)))return}l=n.createElement("link"),$e(l,"link",e),Ge(l),n.head.appendChild(l)}}}function p0(e,t,n){un.S(e,t,n);var l=Xl;if(l&&e){var a=fl(l).hoistableStyles,s=Gl(e);t=t||"default";var o=a.get(s);if(!o){var d={loading:0,preload:null};if(o=l.querySelector(La(s)))d.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Ct.get(s))&&Jc(e,n);var g=o=l.createElement("link");Ge(g),$e(g,"link",e),g._p=new Promise(function(N,D){g.onload=N,g.onerror=D}),g.addEventListener("load",function(){d.loading|=1}),g.addEventListener("error",function(){d.loading|=2}),d.loading|=4,su(o,t,l)}o={type:"stylesheet",instance:o,count:1,state:d},a.set(s,o)}}}function y0(e,t){un.X(e,t);var n=Xl;if(n&&e){var l=fl(n).hoistableScripts,a=Vl(e),s=l.get(a);s||(s=n.querySelector(Ha(a)),s||(e=S({src:e,async:!0},t),(t=Ct.get(a))&&$c(e,t),s=n.createElement("script"),Ge(s),$e(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(a,s))}}function v0(e,t){un.M(e,t);var n=Xl;if(n&&e){var l=fl(n).hoistableScripts,a=Vl(e),s=l.get(a);s||(s=n.querySelector(Ha(a)),s||(e=S({src:e,async:!0,type:"module"},t),(t=Ct.get(a))&&$c(e,t),s=n.createElement("script"),Ge(s),$e(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(a,s))}}function Rd(e,t,n,l){var a=(a=le.current)?uu(a):null;if(!a)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Gl(n.href),n=fl(a).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Gl(n.href);var s=fl(a).hoistableStyles,o=s.get(e);if(o||(a=a.ownerDocument||a,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,o),(s=a.querySelector(La(e)))&&!s._p&&(o.instance=s,o.state.loading=5),Ct.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ct.set(e,n),s||g0(a,e,n,o.state))),t&&l===null)throw Error(r(528,""));return o}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Vl(n),n=fl(a).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Gl(e){return'href="'+gt(e)+'"'}function La(e){return'link[rel="stylesheet"]['+e+"]"}function Nd(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function g0(e,t,n,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),$e(t,"link",n),Ge(t),e.head.appendChild(t))}function Vl(e){return'[src="'+gt(e)+'"]'}function Ha(e){return"script[async]"+e}function Od(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+gt(n.href)+'"]');if(l)return t.instance=l,Ge(l),l;var a=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ge(l),$e(l,"style",a),su(l,n.precedence,e),t.instance=l;case"stylesheet":a=Gl(n.href);var s=e.querySelector(La(a));if(s)return t.state.loading|=4,t.instance=s,Ge(s),s;l=Nd(n),(a=Ct.get(a))&&Jc(l,a),s=(e.ownerDocument||e).createElement("link"),Ge(s);var o=s;return o._p=new Promise(function(d,g){o.onload=d,o.onerror=g}),$e(s,"link",l),t.state.loading|=4,su(s,n.precedence,e),t.instance=s;case"script":return s=Vl(n.src),(a=e.querySelector(Ha(s)))?(t.instance=a,Ge(a),a):(l=n,(a=Ct.get(s))&&(l=S({},n),$c(l,a)),e=e.ownerDocument||e,a=e.createElement("script"),Ge(a),$e(a,"link",l),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,su(l,n.precedence,e));return t.instance}function su(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=l.length?l[l.length-1]:null,s=a,o=0;o<l.length;o++){var d=l[o];if(d.dataset.precedence===t)s=d;else if(s!==a)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Jc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function $c(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var cu=null;function zd(e,t,n){if(cu===null){var l=new Map,a=cu=new Map;a.set(n,l)}else a=cu,l=a.get(n),l||(l=new Map,a.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var s=n[a];if(!(s[ea]||s[Qe]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var o=s.getAttribute(t)||"";o=e+o;var d=l.get(o);d?d.push(s):l.set(o,[s])}}return l}function Md(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function b0(e,t,n){if(n===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;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!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 Dd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function S0(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var a=Gl(l.href),s=t.querySelector(La(a));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ru.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=s,Ge(s);return}s=t.ownerDocument||t,l=Nd(l),(a=Ct.get(a))&&Jc(l,a),s=s.createElement("link"),Ge(s);var o=s;o._p=new Promise(function(d,g){o.onload=d,o.onerror=g}),$e(s,"link",l),n.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=ru.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Wc=0;function x0(e,t){return e.stylesheets&&e.count===0&&fu(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&fu(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&Wc===0&&(Wc=62500*t0());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&fu(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>Wc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(a)}}:null}function ru(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)fu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ou=null;function fu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ou=new Map,t.forEach(_0,e),ou=null,ru.call(e))}function _0(e,t){if(!(t.state.loading&4)){var n=ou.get(e);if(n)var l=n.get(null);else{n=new Map,ou.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<a.length;s++){var o=a[s];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(n.set(o.dataset.precedence,o),l=o)}l&&n.set(null,l)}a=t.instance,o=a.getAttribute("data-precedence"),s=n.get(o)||l,s===l&&n.set(null,a),n.set(o,a),this.count++,l=ru.bind(this),a.addEventListener("load",l),a.addEventListener("error",l),s?s.parentNode.insertBefore(a,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var qa={$$typeof:Q,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function E0(e,t,n,l,a,s,o,d,g){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=Qu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qu(0),this.hiddenUpdates=Qu(null),this.identifierPrefix=l,this.onUncaughtError=a,this.onCaughtError=s,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=g,this.incompleteTransitions=new Map}function jd(e,t,n,l,a,s,o,d,g,N,D,U){return e=new E0(e,t,n,o,g,N,D,U,d),t=1,s===!0&&(t|=24),s=ft(3,null,null,t),e.current=s,s.stateNode=e,t=Os(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:l,isDehydrated:n,cache:t},js(s),e}function wd(e){return e?(e=xl,e):xl}function Ud(e,t,n,l,a,s){a=wd(a),l.context===null?l.context=a:l.pendingContext=a,l=Sn(t),l.payload={element:n},s=s===void 0?null:s,s!==null&&(l.callback=s),n=xn(e,l,t),n!==null&&(ut(n,e,t),va(n,e,t))}function Bd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Fc(e,t){Bd(e,t),(e=e.alternate)&&Bd(e,t)}function Ld(e){if(e.tag===13||e.tag===31){var t=Qn(e,67108864);t!==null&&ut(t,e,67108864),Fc(e,67108864)}}function Hd(e){if(e.tag===13||e.tag===31){var t=yt();t=Zu(t);var n=Qn(e,t);n!==null&&ut(n,e,t),Fc(e,t)}}var hu=!0;function T0(e,t,n,l){var a=j.T;j.T=null;var s=X.p;try{X.p=2,Pc(e,t,n,l)}finally{X.p=s,j.T=a}}function A0(e,t,n,l){var a=j.T;j.T=null;var s=X.p;try{X.p=8,Pc(e,t,n,l)}finally{X.p=s,j.T=a}}function Pc(e,t,n,l){if(hu){var a=Ic(l);if(a===null)Hc(e,t,l,du,n),Yd(e,l);else if(R0(a,e,t,n,l))l.stopPropagation();else if(Yd(e,l),t&4&&-1<C0.indexOf(e)){for(;a!==null;){var s=ol(a);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var o=Yn(s.pendingLanes);if(o!==0){var d=s;for(d.pendingLanes|=2,d.entangledLanes|=2;o;){var g=1<<31-rt(o);d.entanglements[1]|=g,o&=~g}Lt(s),(he&6)===0&&($i=st()+500,ja(0))}}break;case 31:case 13:d=Qn(s,2),d!==null&&ut(d,s,2),Fi(),Fc(s,2)}if(s=Ic(l),s===null&&Hc(e,t,l,du,n),s===a)break;a=s}a!==null&&l.stopPropagation()}else Hc(e,t,l,null,n)}}function Ic(e){return e=ts(e),er(e)}var du=null;function er(e){if(du=null,e=rl(e),e!==null){var t=h(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=m(t),e!==null)return e;e=null}else if(n===31){if(e=b(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return du=e,null}function qd(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(fp()){case Qr:return 2;case Zr:return 8;case ni:case hp:return 32;case Kr:return 268435456;default:return 32}default:return 32}}var tr=!1,Dn=null,jn=null,wn=null,Ya=new Map,ka=new Map,Un=[],C0="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 Yd(e,t){switch(e){case"focusin":case"focusout":Dn=null;break;case"dragenter":case"dragleave":jn=null;break;case"mouseover":case"mouseout":wn=null;break;case"pointerover":case"pointerout":Ya.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ka.delete(t.pointerId)}}function Xa(e,t,n,l,a,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:s,targetContainers:[a]},t!==null&&(t=ol(t),t!==null&&Ld(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function R0(e,t,n,l,a){switch(t){case"focusin":return Dn=Xa(Dn,e,t,n,l,a),!0;case"dragenter":return jn=Xa(jn,e,t,n,l,a),!0;case"mouseover":return wn=Xa(wn,e,t,n,l,a),!0;case"pointerover":var s=a.pointerId;return Ya.set(s,Xa(Ya.get(s)||null,e,t,n,l,a)),!0;case"gotpointercapture":return s=a.pointerId,ka.set(s,Xa(ka.get(s)||null,e,t,n,l,a)),!0}return!1}function kd(e){var t=rl(e.target);if(t!==null){var n=h(t);if(n!==null){if(t=n.tag,t===13){if(t=m(n),t!==null){e.blockedOn=t,Ir(e.priority,function(){Hd(n)});return}}else if(t===31){if(t=b(n),t!==null){e.blockedOn=t,Ir(e.priority,function(){Hd(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function mu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ic(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);es=l,n.target.dispatchEvent(l),es=null}else return t=ol(n),t!==null&&Ld(t),e.blockedOn=n,!1;t.shift()}return!0}function Xd(e,t,n){mu(e)&&n.delete(t)}function N0(){tr=!1,Dn!==null&&mu(Dn)&&(Dn=null),jn!==null&&mu(jn)&&(jn=null),wn!==null&&mu(wn)&&(wn=null),Ya.forEach(Xd),ka.forEach(Xd)}function pu(e,t){e.blockedOn===t&&(e.blockedOn=null,tr||(tr=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,N0)))}var yu=null;function Gd(e){yu!==e&&(yu=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){yu===e&&(yu=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],a=e[t+2];if(typeof l!="function"){if(er(l||n)===null)continue;break}var s=ol(n);s!==null&&(e.splice(t,3),t-=3,Is(s,{pending:!0,data:a,method:n.method,action:l},l,a))}}))}function Ql(e){function t(g){return pu(g,e)}Dn!==null&&pu(Dn,e),jn!==null&&pu(jn,e),wn!==null&&pu(wn,e),Ya.forEach(t),ka.forEach(t);for(var n=0;n<Un.length;n++){var l=Un[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Un.length&&(n=Un[0],n.blockedOn===null);)kd(n),n.blockedOn===null&&Un.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var a=n[l],s=n[l+1],o=a[et]||null;if(typeof s=="function")o||Gd(n);else if(o){var d=null;if(s&&s.hasAttribute("formAction")){if(a=s,o=s[et]||null)d=o.formAction;else if(er(a)!==null)continue}else d=o.action;typeof d=="function"?n[l+1]=d:(n.splice(l,3),l-=3),Gd(n)}}}function Vd(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(o){return a=o})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function nr(e){this._internalRoot=e}vu.prototype.render=nr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var n=t.current,l=yt();Ud(n,l,e,t,null,null)},vu.prototype.unmount=nr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ud(e.current,2,null,e,null,null),Fi(),t[cl]=null}};function vu(e){this._internalRoot=e}vu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Pr();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Un.length&&t!==0&&t<Un[n].priority;n++);Un.splice(n,0,e),n===0&&kd(e)}};var Qd=i.version;if(Qd!=="19.2.0")throw Error(r(527,Qd,"19.2.0"));X.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=v(t),e=e!==null?T(e):null,e=e===null?null:e.stateNode,e};var O0={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gu.isDisabled&&gu.supportsFiber)try{Fl=gu.inject(O0),ct=gu}catch{}}return Va.createRoot=function(e,t){if(!f(e))throw Error(r(299));var n=!1,l="",a=Pf,s=If,o=eh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=jd(e,1,!1,null,null,n,l,null,a,s,o,Vd),e[cl]=t.current,Lc(e),new nr(t)},Va.hydrateRoot=function(e,t,n){if(!f(e))throw Error(r(299));var l=!1,a="",s=Pf,o=If,d=eh,g=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(o=n.onCaughtError),n.onRecoverableError!==void 0&&(d=n.onRecoverableError),n.formState!==void 0&&(g=n.formState)),t=jd(e,1,!0,t,n??null,l,a,g,s,o,d,Vd),t.context=wd(null),n=t.current,l=yt(),l=Zu(l),a=Sn(l),a.callback=null,xn(n,a,l),n=l,t.current.lanes=n,Il(t,n),Lt(t),e[cl]=t.current,Lc(e),new vu(t)},Va.version="19.2.0",Va}var tm;function q0(){if(tm)return ir.exports;tm=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(i){console.error(i)}}return u(),ir.exports=H0(),ir.exports}var Y0=q0();var nm="popstate";function k0(u={}){function i(r,f){let{pathname:h,search:m,hash:b}=r.location;return yr("",{pathname:h,search:m,hash:b},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function c(r,f){return typeof f=="string"?f:Wa(f)}return G0(i,c,null,u)}function Oe(u,i){if(u===!1||u===null||typeof u>"u")throw new Error(i)}function jt(u,i){if(!u){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function X0(){return Math.random().toString(36).substring(2,10)}function lm(u,i){return{usr:u.state,key:u.key,idx:i}}function yr(u,i,c=null,r){return{pathname:typeof u=="string"?u:u.pathname,search:"",hash:"",...typeof i=="string"?Kl(i):i,state:c,key:i&&i.key||r||X0()}}function Wa({pathname:u="/",search:i="",hash:c=""}){return i&&i!=="?"&&(u+=i.charAt(0)==="?"?i:"?"+i),c&&c!=="#"&&(u+=c.charAt(0)==="#"?c:"#"+c),u}function Kl(u){let i={};if(u){let c=u.indexOf("#");c>=0&&(i.hash=u.substring(c),u=u.substring(0,c));let r=u.indexOf("?");r>=0&&(i.search=u.substring(r),u=u.substring(0,r)),u&&(i.pathname=u)}return i}function G0(u,i,c,r={}){let{window:f=document.defaultView,v5Compat:h=!1}=r,m=f.history,b="POP",y=null,v=T();v==null&&(v=0,m.replaceState({...m.state,idx:v},""));function T(){return(m.state||{idx:null}).idx}function S(){b="POP";let Y=T(),L=Y==null?null:Y-v;v=Y,y&&y({action:b,location:k.location,delta:L})}function C(Y,L){b="PUSH";let q=yr(k.location,Y,L);v=T()+1;let Q=lm(q,v),P=k.createHref(q);try{m.pushState(Q,"",P)}catch(ye){if(ye instanceof DOMException&&ye.name==="DataCloneError")throw ye;f.location.assign(P)}h&&y&&y({action:b,location:k.location,delta:1})}function z(Y,L){b="REPLACE";let q=yr(k.location,Y,L);v=T();let Q=lm(q,v),P=k.createHref(q);m.replaceState(Q,"",P),h&&y&&y({action:b,location:k.location,delta:0})}function H(Y){return V0(Y)}let k={get action(){return b},get location(){return u(f,m)},listen(Y){if(y)throw new Error("A history only accepts one active listener");return f.addEventListener(nm,S),y=Y,()=>{f.removeEventListener(nm,S),y=null}},createHref(Y){return i(f,Y)},createURL:H,encodeLocation(Y){let L=H(Y);return{pathname:L.pathname,search:L.search,hash:L.hash}},push:C,replace:z,go(Y){return m.go(Y)}};return k}function V0(u,i=!1){let c="http://localhost";typeof window<"u"&&(c=window.location.origin!=="null"?window.location.origin:window.location.href),Oe(c,"No window.location.(origin|href) available to create URL");let r=typeof u=="string"?u:Wa(u);return r=r.replace(/ $/,"%20"),!i&&r.startsWith("//")&&(r=c+r),new URL(r,c)}function _m(u,i,c="/"){return Q0(u,i,c,!1)}function Q0(u,i,c,r){let f=typeof i=="string"?Kl(i):i,h=rn(f.pathname||"/",c);if(h==null)return null;let m=Em(u);Z0(m);let b=null;for(let y=0;b==null&&y<m.length;++y){let v=lv(h);b=tv(m[y],v,r)}return b}function Em(u,i=[],c=[],r="",f=!1){let h=(m,b,y=f,v)=>{let T={relativePath:v===void 0?m.path||"":v,caseSensitive:m.caseSensitive===!0,childrenIndex:b,route:m};if(T.relativePath.startsWith("/")){if(!T.relativePath.startsWith(r)&&y)return;Oe(T.relativePath.startsWith(r),`Absolute route path "${T.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),T.relativePath=T.relativePath.slice(r.length)}let S=cn([r,T.relativePath]),C=c.concat(T);m.children&&m.children.length>0&&(Oe(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${S}".`),Em(m.children,i,C,S,y)),!(m.path==null&&!m.index)&&i.push({path:S,score:I0(S,m.index),routesMeta:C})};return u.forEach((m,b)=>{if(m.path===""||!m.path?.includes("?"))h(m,b);else for(let y of Tm(m.path))h(m,b,!0,y)}),i}function Tm(u){let i=u.split("/");if(i.length===0)return[];let[c,...r]=i,f=c.endsWith("?"),h=c.replace(/\?$/,"");if(r.length===0)return f?[h,""]:[h];let m=Tm(r.join("/")),b=[];return b.push(...m.map(y=>y===""?h:[h,y].join("/"))),f&&b.push(...m),b.map(y=>u.startsWith("/")&&y===""?"/":y)}function Z0(u){u.sort((i,c)=>i.score!==c.score?c.score-i.score:ev(i.routesMeta.map(r=>r.childrenIndex),c.routesMeta.map(r=>r.childrenIndex)))}var K0=/^:[\w-]+$/,J0=3,$0=2,W0=1,F0=10,P0=-2,am=u=>u==="*";function I0(u,i){let c=u.split("/"),r=c.length;return c.some(am)&&(r+=P0),i&&(r+=$0),c.filter(f=>!am(f)).reduce((f,h)=>f+(K0.test(h)?J0:h===""?W0:F0),r)}function ev(u,i){return u.length===i.length&&u.slice(0,-1).every((r,f)=>r===i[f])?u[u.length-1]-i[i.length-1]:0}function tv(u,i,c=!1){let{routesMeta:r}=u,f={},h="/",m=[];for(let b=0;b<r.length;++b){let y=r[b],v=b===r.length-1,T=h==="/"?i:i.slice(h.length)||"/",S=zu({path:y.relativePath,caseSensitive:y.caseSensitive,end:v},T),C=y.route;if(!S&&v&&c&&!r[r.length-1].route.index&&(S=zu({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},T)),!S)return null;Object.assign(f,S.params),m.push({params:f,pathname:cn([h,S.pathname]),pathnameBase:cv(cn([h,S.pathnameBase])),route:C}),S.pathnameBase!=="/"&&(h=cn([h,S.pathnameBase]))}return m}function zu(u,i){typeof u=="string"&&(u={path:u,caseSensitive:!1,end:!0});let[c,r]=nv(u.path,u.caseSensitive,u.end),f=i.match(c);if(!f)return null;let h=f[0],m=h.replace(/(.)\/+$/,"$1"),b=f.slice(1);return{params:r.reduce((v,{paramName:T,isOptional:S},C)=>{if(T==="*"){let H=b[C]||"";m=h.slice(0,h.length-H.length).replace(/(.)\/+$/,"$1")}const z=b[C];return S&&!z?v[T]=void 0:v[T]=(z||"").replace(/%2F/g,"/"),v},{}),pathname:h,pathnameBase:m,pattern:u}}function nv(u,i=!1,c=!0){jt(u==="*"||!u.endsWith("*")||u.endsWith("/*"),`Route path "${u}" will be treated as if it were "${u.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${u.replace(/\*$/,"/*")}".`);let r=[],f="^"+u.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,b,y)=>(r.push({paramName:b,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return u.endsWith("*")?(r.push({paramName:"*"}),f+=u==="*"||u==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):c?f+="\\/*$":u!==""&&u!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,i?void 0:"i"),r]}function lv(u){try{return u.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return jt(!1,`The URL path "${u}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),u}}function rn(u,i){if(i==="/")return u;if(!u.toLowerCase().startsWith(i.toLowerCase()))return null;let c=i.endsWith("/")?i.length-1:i.length,r=u.charAt(c);return r&&r!=="/"?null:u.slice(c)||"/"}var av=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,iv=u=>av.test(u);function uv(u,i="/"){let{pathname:c,search:r="",hash:f=""}=typeof u=="string"?Kl(u):u,h;if(c)if(iv(c))h=c;else{if(c.includes("//")){let m=c;c=c.replace(/\/\/+/g,"/"),jt(!1,`Pathnames cannot have embedded double slashes - normalizing ${m} -> ${c}`)}c.startsWith("/")?h=im(c.substring(1),"/"):h=im(c,i)}else h=i;return{pathname:h,search:rv(r),hash:ov(f)}}function im(u,i){let c=i.replace(/\/+$/,"").split("/");return u.split("/").forEach(f=>{f===".."?c.length>1&&c.pop():f!=="."&&c.push(f)}),c.length>1?c.join("/"):"/"}function rr(u,i,c,r){return`Cannot include a '${u}' character in a manually specified \`to.${i}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${c}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function sv(u){return u.filter((i,c)=>c===0||i.route.path&&i.route.path.length>0)}function Am(u){let i=sv(u);return i.map((c,r)=>r===i.length-1?c.pathname:c.pathnameBase)}function Cm(u,i,c,r=!1){let f;typeof u=="string"?f=Kl(u):(f={...u},Oe(!f.pathname||!f.pathname.includes("?"),rr("?","pathname","search",f)),Oe(!f.pathname||!f.pathname.includes("#"),rr("#","pathname","hash",f)),Oe(!f.search||!f.search.includes("#"),rr("#","search","hash",f)));let h=u===""||f.pathname==="",m=h?"/":f.pathname,b;if(m==null)b=c;else{let S=i.length-1;if(!r&&m.startsWith("..")){let C=m.split("/");for(;C[0]==="..";)C.shift(),S-=1;f.pathname=C.join("/")}b=S>=0?i[S]:"/"}let y=uv(f,b),v=m&&m!=="/"&&m.endsWith("/"),T=(h||m===".")&&c.endsWith("/");return!y.pathname.endsWith("/")&&(v||T)&&(y.pathname+="/"),y}var cn=u=>u.join("/").replace(/\/\/+/g,"/"),cv=u=>u.replace(/\/+$/,"").replace(/^\/*/,"/"),rv=u=>!u||u==="?"?"":u.startsWith("?")?u:"?"+u,ov=u=>!u||u==="#"?"":u.startsWith("#")?u:"#"+u;function fv(u){return u!=null&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.internal=="boolean"&&"data"in u}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Rm=["POST","PUT","PATCH","DELETE"];new Set(Rm);var hv=["GET",...Rm];new Set(hv);var Jl=E.createContext(null);Jl.displayName="DataRouter";var Du=E.createContext(null);Du.displayName="DataRouterState";E.createContext(!1);var Nm=E.createContext({isTransitioning:!1});Nm.displayName="ViewTransition";var dv=E.createContext(new Map);dv.displayName="Fetchers";var mv=E.createContext(null);mv.displayName="Await";var Yt=E.createContext(null);Yt.displayName="Navigation";var Fa=E.createContext(null);Fa.displayName="Location";var on=E.createContext({outlet:null,matches:[],isDataRoute:!1});on.displayName="Route";var Ar=E.createContext(null);Ar.displayName="RouteError";function pv(u,{relative:i}={}){Oe(Pa(),"useHref() may be used only in the context of a <Router> component.");let{basename:c,navigator:r}=E.useContext(Yt),{hash:f,pathname:h,search:m}=Ia(u,{relative:i}),b=h;return c!=="/"&&(b=h==="/"?c:cn([c,h])),r.createHref({pathname:b,search:m,hash:f})}function Pa(){return E.useContext(Fa)!=null}function sl(){return Oe(Pa(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(Fa).location}var Om="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function zm(u){E.useContext(Yt).static||E.useLayoutEffect(u)}function yv(){let{isDataRoute:u}=E.useContext(on);return u?Ov():vv()}function vv(){Oe(Pa(),"useNavigate() may be used only in the context of a <Router> component.");let u=E.useContext(Jl),{basename:i,navigator:c}=E.useContext(Yt),{matches:r}=E.useContext(on),{pathname:f}=sl(),h=JSON.stringify(Am(r)),m=E.useRef(!1);return zm(()=>{m.current=!0}),E.useCallback((y,v={})=>{if(jt(m.current,Om),!m.current)return;if(typeof y=="number"){c.go(y);return}let T=Cm(y,JSON.parse(h),f,v.relative==="path");u==null&&i!=="/"&&(T.pathname=T.pathname==="/"?i:cn([i,T.pathname])),(v.replace?c.replace:c.push)(T,v.state,v)},[i,c,h,f,u])}E.createContext(null);function Ia(u,{relative:i}={}){let{matches:c}=E.useContext(on),{pathname:r}=sl(),f=JSON.stringify(Am(c));return E.useMemo(()=>Cm(u,JSON.parse(f),r,i==="path"),[u,f,r,i])}function gv(u,i){return Mm(u,i)}function Mm(u,i,c,r,f){Oe(Pa(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:h}=E.useContext(Yt),{matches:m}=E.useContext(on),b=m[m.length-1],y=b?b.params:{},v=b?b.pathname:"/",T=b?b.pathnameBase:"/",S=b&&b.route;{let q=S&&S.path||"";Dm(v,!S||q.endsWith("*")||q.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${v}" (under <Route path="${q}">) 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.
|
||
|
||
Please change the parent <Route path="${q}"> to <Route path="${q==="/"?"*":`${q}/*`}">.`)}let C=sl(),z;if(i){let q=typeof i=="string"?Kl(i):i;Oe(T==="/"||q.pathname?.startsWith(T),`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 "${T}" but pathname "${q.pathname}" was given in the \`location\` prop.`),z=q}else z=C;let H=z.pathname||"/",k=H;if(T!=="/"){let q=T.replace(/^\//,"").split("/");k="/"+H.replace(/^\//,"").split("/").slice(q.length).join("/")}let Y=_m(u,{pathname:k});jt(S||Y!=null,`No routes matched location "${z.pathname}${z.search}${z.hash}" `),jt(Y==null||Y[Y.length-1].route.element!==void 0||Y[Y.length-1].route.Component!==void 0||Y[Y.length-1].route.lazy!==void 0,`Matched leaf route at location "${z.pathname}${z.search}${z.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 L=Ev(Y&&Y.map(q=>Object.assign({},q,{params:Object.assign({},y,q.params),pathname:cn([T,h.encodeLocation?h.encodeLocation(q.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:q.pathname]),pathnameBase:q.pathnameBase==="/"?T:cn([T,h.encodeLocation?h.encodeLocation(q.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:q.pathnameBase])})),m,c,r,f);return i&&L?E.createElement(Fa.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...z},navigationType:"POP"}},L):L}function bv(){let u=Nv(),i=fv(u)?`${u.status} ${u.statusText}`:u instanceof Error?u.message:JSON.stringify(u),c=u instanceof Error?u.stack:null,r="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:r},h={padding:"2px 4px",backgroundColor:r},m=null;return console.error("Error handled by React Router default ErrorBoundary:",u),m=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:h},"ErrorBoundary")," or"," ",E.createElement("code",{style:h},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},i),c?E.createElement("pre",{style:f},c):null,m)}var Sv=E.createElement(bv,null),xv=class extends E.Component{constructor(u){super(u),this.state={location:u.location,revalidation:u.revalidation,error:u.error}}static getDerivedStateFromError(u){return{error:u}}static getDerivedStateFromProps(u,i){return i.location!==u.location||i.revalidation!=="idle"&&u.revalidation==="idle"?{error:u.error,location:u.location,revalidation:u.revalidation}:{error:u.error!==void 0?u.error:i.error,location:i.location,revalidation:u.revalidation||i.revalidation}}componentDidCatch(u,i){this.props.onError?this.props.onError(u,i):console.error("React Router caught the following error during render",u)}render(){return this.state.error!==void 0?E.createElement(on.Provider,{value:this.props.routeContext},E.createElement(Ar.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function _v({routeContext:u,match:i,children:c}){let r=E.useContext(Jl);return r&&r.static&&r.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=i.route.id),E.createElement(on.Provider,{value:u},c)}function Ev(u,i=[],c=null,r=null,f=null){if(u==null){if(!c)return null;if(c.errors)u=c.matches;else if(i.length===0&&!c.initialized&&c.matches.length>0)u=c.matches;else return null}let h=u,m=c?.errors;if(m!=null){let T=h.findIndex(S=>S.route.id&&m?.[S.route.id]!==void 0);Oe(T>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),h=h.slice(0,Math.min(h.length,T+1))}let b=!1,y=-1;if(c)for(let T=0;T<h.length;T++){let S=h[T];if((S.route.HydrateFallback||S.route.hydrateFallbackElement)&&(y=T),S.route.id){let{loaderData:C,errors:z}=c,H=S.route.loader&&!C.hasOwnProperty(S.route.id)&&(!z||z[S.route.id]===void 0);if(S.route.lazy||H){b=!0,y>=0?h=h.slice(0,y+1):h=[h[0]];break}}}let v=c&&r?(T,S)=>{r(T,{location:c.location,params:c.matches?.[0]?.params??{},errorInfo:S})}:void 0;return h.reduceRight((T,S,C)=>{let z,H=!1,k=null,Y=null;c&&(z=m&&S.route.id?m[S.route.id]:void 0,k=S.route.errorElement||Sv,b&&(y<0&&C===0?(Dm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),H=!0,Y=null):y===C&&(H=!0,Y=S.route.hydrateFallbackElement||null)));let L=i.concat(h.slice(0,C+1)),q=()=>{let Q;return z?Q=k:H?Q=Y:S.route.Component?Q=E.createElement(S.route.Component,null):S.route.element?Q=S.route.element:Q=T,E.createElement(_v,{match:S,routeContext:{outlet:T,matches:L,isDataRoute:c!=null},children:Q})};return c&&(S.route.ErrorBoundary||S.route.errorElement||C===0)?E.createElement(xv,{location:c.location,revalidation:c.revalidation,component:k,error:z,children:q(),routeContext:{outlet:null,matches:L,isDataRoute:!0},onError:v}):q()},null)}function Cr(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Tv(u){let i=E.useContext(Jl);return Oe(i,Cr(u)),i}function Av(u){let i=E.useContext(Du);return Oe(i,Cr(u)),i}function Cv(u){let i=E.useContext(on);return Oe(i,Cr(u)),i}function Rr(u){let i=Cv(u),c=i.matches[i.matches.length-1];return Oe(c.route.id,`${u} can only be used on routes that contain a unique "id"`),c.route.id}function Rv(){return Rr("useRouteId")}function Nv(){let u=E.useContext(Ar),i=Av("useRouteError"),c=Rr("useRouteError");return u!==void 0?u:i.errors?.[c]}function Ov(){let{router:u}=Tv("useNavigate"),i=Rr("useNavigate"),c=E.useRef(!1);return zm(()=>{c.current=!0}),E.useCallback(async(f,h={})=>{jt(c.current,Om),c.current&&(typeof f=="number"?u.navigate(f):await u.navigate(f,{fromRouteId:i,...h}))},[u,i])}var um={};function Dm(u,i,c){!i&&!um[u]&&(um[u]=!0,jt(!1,c))}E.memo(zv);function zv({routes:u,future:i,state:c,unstable_onError:r}){return Mm(u,void 0,c,r,i)}function vr(u){Oe(!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 Mv({basename:u="/",children:i=null,location:c,navigationType:r="POP",navigator:f,static:h=!1}){Oe(!Pa(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=u.replace(/^\/*/,"/"),b=E.useMemo(()=>({basename:m,navigator:f,static:h,future:{}}),[m,f,h]);typeof c=="string"&&(c=Kl(c));let{pathname:y="/",search:v="",hash:T="",state:S=null,key:C="default"}=c,z=E.useMemo(()=>{let H=rn(y,m);return H==null?null:{location:{pathname:H,search:v,hash:T,state:S,key:C},navigationType:r}},[m,y,v,T,S,C,r]);return jt(z!=null,`<Router basename="${m}"> is not able to match the URL "${y}${v}${T}" because it does not start with the basename, so the <Router> won't render anything.`),z==null?null:E.createElement(Yt.Provider,{value:b},E.createElement(Fa.Provider,{children:i,value:z}))}function Dv({children:u,location:i}){return gv(gr(u),i)}function gr(u,i=[]){let c=[];return E.Children.forEach(u,(r,f)=>{if(!E.isValidElement(r))return;let h=[...i,f];if(r.type===E.Fragment){c.push.apply(c,gr(r.props.children,h));return}Oe(r.type===vr,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Oe(!r.props.index||!r.props.children,"An index route cannot have child routes.");let m={id:r.props.id||h.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(m.children=gr(r.props.children,h)),c.push(m)}),c}var Tu="get",Au="application/x-www-form-urlencoded";function ju(u){return u!=null&&typeof u.tagName=="string"}function jv(u){return ju(u)&&u.tagName.toLowerCase()==="button"}function wv(u){return ju(u)&&u.tagName.toLowerCase()==="form"}function Uv(u){return ju(u)&&u.tagName.toLowerCase()==="input"}function Bv(u){return!!(u.metaKey||u.altKey||u.ctrlKey||u.shiftKey)}function Lv(u,i){return u.button===0&&(!i||i==="_self")&&!Bv(u)}var bu=null;function Hv(){if(bu===null)try{new FormData(document.createElement("form"),0),bu=!1}catch{bu=!0}return bu}var qv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function or(u){return u!=null&&!qv.has(u)?(jt(!1,`"${u}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Au}"`),null):u}function Yv(u,i){let c,r,f,h,m;if(wv(u)){let b=u.getAttribute("action");r=b?rn(b,i):null,c=u.getAttribute("method")||Tu,f=or(u.getAttribute("enctype"))||Au,h=new FormData(u)}else if(jv(u)||Uv(u)&&(u.type==="submit"||u.type==="image")){let b=u.form;if(b==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=u.getAttribute("formaction")||b.getAttribute("action");if(r=y?rn(y,i):null,c=u.getAttribute("formmethod")||b.getAttribute("method")||Tu,f=or(u.getAttribute("formenctype"))||or(b.getAttribute("enctype"))||Au,h=new FormData(b,u),!Hv()){let{name:v,type:T,value:S}=u;if(T==="image"){let C=v?`${v}.`:"";h.append(`${C}x`,"0"),h.append(`${C}y`,"0")}else v&&h.append(v,S)}}else{if(ju(u))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');c=Tu,r=null,f=Au,m=u}return h&&f==="text/plain"&&(m=h,h=void 0),{action:r,method:c.toLowerCase(),encType:f,formData:h,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Nr(u,i){if(u===!1||u===null||typeof u>"u")throw new Error(i)}function kv(u,i,c){let r=typeof u=="string"?new URL(u,typeof window>"u"?"server://singlefetch/":window.location.origin):u;return r.pathname==="/"?r.pathname=`_root.${c}`:i&&rn(r.pathname,i)==="/"?r.pathname=`${i.replace(/\/$/,"")}/_root.${c}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${c}`,r}async function Xv(u,i){if(u.id in i)return i[u.id];try{let c=await import(u.module);return i[u.id]=c,c}catch(c){return console.error(`Error loading route module \`${u.module}\`, reloading page...`),console.error(c),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Gv(u){return u==null?!1:u.href==null?u.rel==="preload"&&typeof u.imageSrcSet=="string"&&typeof u.imageSizes=="string":typeof u.rel=="string"&&typeof u.href=="string"}async function Vv(u,i,c){let r=await Promise.all(u.map(async f=>{let h=i.routes[f.route.id];if(h){let m=await Xv(h,c);return m.links?m.links():[]}return[]}));return Jv(r.flat(1).filter(Gv).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function sm(u,i,c,r,f,h){let m=(y,v)=>c[v]?y.route.id!==c[v].route.id:!0,b=(y,v)=>c[v].pathname!==y.pathname||c[v].route.path?.endsWith("*")&&c[v].params["*"]!==y.params["*"];return h==="assets"?i.filter((y,v)=>m(y,v)||b(y,v)):h==="data"?i.filter((y,v)=>{let T=r.routes[y.route.id];if(!T||!T.hasLoader)return!1;if(m(y,v)||b(y,v))return!0;if(y.route.shouldRevalidate){let S=y.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:c[0]?.params||{},nextUrl:new URL(u,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof S=="boolean")return S}return!0}):[]}function Qv(u,i,{includeHydrateFallback:c}={}){return Zv(u.map(r=>{let f=i.routes[r.route.id];if(!f)return[];let h=[f.module];return f.clientActionModule&&(h=h.concat(f.clientActionModule)),f.clientLoaderModule&&(h=h.concat(f.clientLoaderModule)),c&&f.hydrateFallbackModule&&(h=h.concat(f.hydrateFallbackModule)),f.imports&&(h=h.concat(f.imports)),h}).flat(1))}function Zv(u){return[...new Set(u)]}function Kv(u){let i={},c=Object.keys(u).sort();for(let r of c)i[r]=u[r];return i}function Jv(u,i){let c=new Set;return new Set(i),u.reduce((r,f)=>{let h=JSON.stringify(Kv(f));return c.has(h)||(c.add(h),r.push({key:h,link:f})),r},[])}function jm(){let u=E.useContext(Jl);return Nr(u,"You must render this element inside a <DataRouterContext.Provider> element"),u}function $v(){let u=E.useContext(Du);return Nr(u,"You must render this element inside a <DataRouterStateContext.Provider> element"),u}var Or=E.createContext(void 0);Or.displayName="FrameworkContext";function wm(){let u=E.useContext(Or);return Nr(u,"You must render this element inside a <HydratedRouter> element"),u}function Wv(u,i){let c=E.useContext(Or),[r,f]=E.useState(!1),[h,m]=E.useState(!1),{onFocus:b,onBlur:y,onMouseEnter:v,onMouseLeave:T,onTouchStart:S}=i,C=E.useRef(null);E.useEffect(()=>{if(u==="render"&&m(!0),u==="viewport"){let k=L=>{L.forEach(q=>{m(q.isIntersecting)})},Y=new IntersectionObserver(k,{threshold:.5});return C.current&&Y.observe(C.current),()=>{Y.disconnect()}}},[u]),E.useEffect(()=>{if(r){let k=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(k)}}},[r]);let z=()=>{f(!0)},H=()=>{f(!1),m(!1)};return c?u!=="intent"?[h,C,{}]:[h,C,{onFocus:Qa(b,z),onBlur:Qa(y,H),onMouseEnter:Qa(v,z),onMouseLeave:Qa(T,H),onTouchStart:Qa(S,z)}]:[!1,C,{}]}function Qa(u,i){return c=>{u&&u(c),c.defaultPrevented||i(c)}}function Fv({page:u,...i}){let{router:c}=jm(),r=E.useMemo(()=>_m(c.routes,u,c.basename),[c.routes,u,c.basename]);return r?E.createElement(Iv,{page:u,matches:r,...i}):null}function Pv(u){let{manifest:i,routeModules:c}=wm(),[r,f]=E.useState([]);return E.useEffect(()=>{let h=!1;return Vv(u,i,c).then(m=>{h||f(m)}),()=>{h=!0}},[u,i,c]),r}function Iv({page:u,matches:i,...c}){let r=sl(),{manifest:f,routeModules:h}=wm(),{basename:m}=jm(),{loaderData:b,matches:y}=$v(),v=E.useMemo(()=>sm(u,i,y,f,r,"data"),[u,i,y,f,r]),T=E.useMemo(()=>sm(u,i,y,f,r,"assets"),[u,i,y,f,r]),S=E.useMemo(()=>{if(u===r.pathname+r.search+r.hash)return[];let H=new Set,k=!1;if(i.forEach(L=>{let q=f.routes[L.route.id];!q||!q.hasLoader||(!v.some(Q=>Q.route.id===L.route.id)&&L.route.id in b&&h[L.route.id]?.shouldRevalidate||q.hasClientLoader?k=!0:H.add(L.route.id))}),H.size===0)return[];let Y=kv(u,m,"data");return k&&H.size>0&&Y.searchParams.set("_routes",i.filter(L=>H.has(L.route.id)).map(L=>L.route.id).join(",")),[Y.pathname+Y.search]},[m,b,r,f,v,i,u,h]),C=E.useMemo(()=>Qv(T,f),[T,f]),z=Pv(T);return E.createElement(E.Fragment,null,S.map(H=>E.createElement("link",{key:H,rel:"prefetch",as:"fetch",href:H,...c})),C.map(H=>E.createElement("link",{key:H,rel:"modulepreload",href:H,...c})),z.map(({key:H,link:k})=>E.createElement("link",{key:H,nonce:c.nonce,...k})))}function eg(...u){return i=>{u.forEach(c=>{typeof c=="function"?c(i):c!=null&&(c.current=i)})}}var Um=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Um&&(window.__reactRouterVersion="7.9.6")}catch{}function tg({basename:u,children:i,window:c}){let r=E.useRef();r.current==null&&(r.current=k0({window:c,v5Compat:!0}));let f=r.current,[h,m]=E.useState({action:f.action,location:f.location}),b=E.useCallback(y=>{E.startTransition(()=>m(y))},[m]);return E.useLayoutEffect(()=>f.listen(b),[f,b]),E.createElement(Mv,{basename:u,children:i,location:h.location,navigationType:h.action,navigator:f})}var Bm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Lm=E.forwardRef(function({onClick:i,discover:c="render",prefetch:r="none",relative:f,reloadDocument:h,replace:m,state:b,target:y,to:v,preventScrollReset:T,viewTransition:S,...C},z){let{basename:H}=E.useContext(Yt),k=typeof v=="string"&&Bm.test(v),Y,L=!1;if(typeof v=="string"&&k&&(Y=v,Um))try{let xe=new URL(window.location.href),Ue=v.startsWith("//")?new URL(xe.protocol+v):new URL(v),Xe=rn(Ue.pathname,H);Ue.origin===xe.origin&&Xe!=null?v=Xe+Ue.search+Ue.hash:L=!0}catch{jt(!1,`<Link to="${v}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let q=pv(v,{relative:f}),[Q,P,ye]=Wv(r,C),Re=ig(v,{replace:m,state:b,target:y,preventScrollReset:T,relative:f,viewTransition:S});function $(xe){i&&i(xe),xe.defaultPrevented||Re(xe)}let Te=E.createElement("a",{...C,...ye,href:Y||q,onClick:L||h?i:$,ref:eg(z,P),target:y,"data-discover":!k&&c==="render"?"true":void 0});return Q&&!k?E.createElement(E.Fragment,null,Te,E.createElement(Fv,{page:q})):Te});Lm.displayName="Link";var ng=E.forwardRef(function({"aria-current":i="page",caseSensitive:c=!1,className:r="",end:f=!1,style:h,to:m,viewTransition:b,children:y,...v},T){let S=Ia(m,{relative:v.relative}),C=sl(),z=E.useContext(Du),{navigator:H,basename:k}=E.useContext(Yt),Y=z!=null&&og(S)&&b===!0,L=H.encodeLocation?H.encodeLocation(S).pathname:S.pathname,q=C.pathname,Q=z&&z.navigation&&z.navigation.location?z.navigation.location.pathname:null;c||(q=q.toLowerCase(),Q=Q?Q.toLowerCase():null,L=L.toLowerCase()),Q&&k&&(Q=rn(Q,k)||Q);const P=L!=="/"&&L.endsWith("/")?L.length-1:L.length;let ye=q===L||!f&&q.startsWith(L)&&q.charAt(P)==="/",Re=Q!=null&&(Q===L||!f&&Q.startsWith(L)&&Q.charAt(L.length)==="/"),$={isActive:ye,isPending:Re,isTransitioning:Y},Te=ye?i:void 0,xe;typeof r=="function"?xe=r($):xe=[r,ye?"active":null,Re?"pending":null,Y?"transitioning":null].filter(Boolean).join(" ");let Ue=typeof h=="function"?h($):h;return E.createElement(Lm,{...v,"aria-current":Te,className:xe,ref:T,style:Ue,to:m,viewTransition:b},typeof y=="function"?y($):y)});ng.displayName="NavLink";var lg=E.forwardRef(({discover:u="render",fetcherKey:i,navigate:c,reloadDocument:r,replace:f,state:h,method:m=Tu,action:b,onSubmit:y,relative:v,preventScrollReset:T,viewTransition:S,...C},z)=>{let H=cg(),k=rg(b,{relative:v}),Y=m.toLowerCase()==="get"?"get":"post",L=typeof b=="string"&&Bm.test(b),q=Q=>{if(y&&y(Q),Q.defaultPrevented)return;Q.preventDefault();let P=Q.nativeEvent.submitter,ye=P?.getAttribute("formmethod")||m;H(P||Q.currentTarget,{fetcherKey:i,method:ye,navigate:c,replace:f,state:h,relative:v,preventScrollReset:T,viewTransition:S})};return E.createElement("form",{ref:z,method:Y,action:k,onSubmit:r?y:q,...C,"data-discover":!L&&u==="render"?"true":void 0})});lg.displayName="Form";function ag(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Hm(u){let i=E.useContext(Jl);return Oe(i,ag(u)),i}function ig(u,{target:i,replace:c,state:r,preventScrollReset:f,relative:h,viewTransition:m}={}){let b=yv(),y=sl(),v=Ia(u,{relative:h});return E.useCallback(T=>{if(Lv(T,i)){T.preventDefault();let S=c!==void 0?c:Wa(y)===Wa(v);b(u,{replace:S,state:r,preventScrollReset:f,relative:h,viewTransition:m})}},[y,b,v,c,r,i,u,f,h,m])}var ug=0,sg=()=>`__${String(++ug)}__`;function cg(){let{router:u}=Hm("useSubmit"),{basename:i}=E.useContext(Yt),c=Rv();return E.useCallback(async(r,f={})=>{let{action:h,method:m,encType:b,formData:y,body:v}=Yv(r,i);if(f.navigate===!1){let T=f.fetcherKey||sg();await u.fetch(T,c,f.action||h,{preventScrollReset:f.preventScrollReset,formData:y,body:v,formMethod:f.method||m,formEncType:f.encType||b,flushSync:f.flushSync})}else await u.navigate(f.action||h,{preventScrollReset:f.preventScrollReset,formData:y,body:v,formMethod:f.method||m,formEncType:f.encType||b,replace:f.replace,state:f.state,fromRouteId:c,flushSync:f.flushSync,viewTransition:f.viewTransition})},[u,i,c])}function rg(u,{relative:i}={}){let{basename:c}=E.useContext(Yt),r=E.useContext(on);Oe(r,"useFormAction must be used inside a RouteContext");let[f]=r.matches.slice(-1),h={...Ia(u||".",{relative:i})},m=sl();if(u==null){h.search=m.search;let b=new URLSearchParams(h.search),y=b.getAll("index");if(y.some(T=>T==="")){b.delete("index"),y.filter(S=>S).forEach(S=>b.append("index",S));let T=b.toString();h.search=T?`?${T}`:""}}return(!u||u===".")&&f.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),c!=="/"&&(h.pathname=h.pathname==="/"?c:cn([c,h.pathname])),Wa(h)}function og(u,{relative:i}={}){let c=E.useContext(Nm);Oe(c!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Hm("useViewTransitionState"),f=Ia(u,{relative:i});if(!c.isTransitioning)return!1;let h=rn(c.currentLocation.pathname,r)||c.currentLocation.pathname,m=rn(c.nextLocation.pathname,r)||c.nextLocation.pathname;return zu(f.pathname,m)!=null||zu(f.pathname,h)!=null}const qt=Object.create(null);qt.open="0";qt.close="1";qt.ping="2";qt.pong="3";qt.message="4";qt.upgrade="5";qt.noop="6";const Cu=Object.create(null);Object.keys(qt).forEach(u=>{Cu[qt[u]]=u});const br={type:"error",data:"parser error"},qm=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ym=typeof ArrayBuffer=="function",km=u=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(u):u&&u.buffer instanceof ArrayBuffer,zr=({type:u,data:i},c,r)=>qm&&i instanceof Blob?c?r(i):cm(i,r):Ym&&(i instanceof ArrayBuffer||km(i))?c?r(i):cm(new Blob([i]),r):r(qt[u]+(i||"")),cm=(u,i)=>{const c=new FileReader;return c.onload=function(){const r=c.result.split(",")[1];i("b"+(r||""))},c.readAsDataURL(u)};function rm(u){return u instanceof Uint8Array?u:u instanceof ArrayBuffer?new Uint8Array(u):new Uint8Array(u.buffer,u.byteOffset,u.byteLength)}let fr;function fg(u,i){if(qm&&u.data instanceof Blob)return u.data.arrayBuffer().then(rm).then(i);if(Ym&&(u.data instanceof ArrayBuffer||km(u.data)))return i(rm(u.data));zr(u,!1,c=>{fr||(fr=new TextEncoder),i(fr.encode(c))})}const om="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$a=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let u=0;u<om.length;u++)$a[om.charCodeAt(u)]=u;const hg=u=>{let i=u.length*.75,c=u.length,r,f=0,h,m,b,y;u[u.length-1]==="="&&(i--,u[u.length-2]==="="&&i--);const v=new ArrayBuffer(i),T=new Uint8Array(v);for(r=0;r<c;r+=4)h=$a[u.charCodeAt(r)],m=$a[u.charCodeAt(r+1)],b=$a[u.charCodeAt(r+2)],y=$a[u.charCodeAt(r+3)],T[f++]=h<<2|m>>4,T[f++]=(m&15)<<4|b>>2,T[f++]=(b&3)<<6|y&63;return v},dg=typeof ArrayBuffer=="function",Mr=(u,i)=>{if(typeof u!="string")return{type:"message",data:Xm(u,i)};const c=u.charAt(0);return c==="b"?{type:"message",data:mg(u.substring(1),i)}:Cu[c]?u.length>1?{type:Cu[c],data:u.substring(1)}:{type:Cu[c]}:br},mg=(u,i)=>{if(dg){const c=hg(u);return Xm(c,i)}else return{base64:!0,data:u}},Xm=(u,i)=>{switch(i){case"blob":return u instanceof Blob?u:new Blob([u]);case"arraybuffer":default:return u instanceof ArrayBuffer?u:u.buffer}},Gm="",pg=(u,i)=>{const c=u.length,r=new Array(c);let f=0;u.forEach((h,m)=>{zr(h,!1,b=>{r[m]=b,++f===c&&i(r.join(Gm))})})},yg=(u,i)=>{const c=u.split(Gm),r=[];for(let f=0;f<c.length;f++){const h=Mr(c[f],i);if(r.push(h),h.type==="error")break}return r};function vg(){return new TransformStream({transform(u,i){fg(u,c=>{const r=c.length;let f;if(r<126)f=new Uint8Array(1),new DataView(f.buffer).setUint8(0,r);else if(r<65536){f=new Uint8Array(3);const h=new DataView(f.buffer);h.setUint8(0,126),h.setUint16(1,r)}else{f=new Uint8Array(9);const h=new DataView(f.buffer);h.setUint8(0,127),h.setBigUint64(1,BigInt(r))}u.data&&typeof u.data!="string"&&(f[0]|=128),i.enqueue(f),i.enqueue(c)})}})}let hr;function Su(u){return u.reduce((i,c)=>i+c.length,0)}function xu(u,i){if(u[0].length===i)return u.shift();const c=new Uint8Array(i);let r=0;for(let f=0;f<i;f++)c[f]=u[0][r++],r===u[0].length&&(u.shift(),r=0);return u.length&&r<u[0].length&&(u[0]=u[0].slice(r)),c}function gg(u,i){hr||(hr=new TextDecoder);const c=[];let r=0,f=-1,h=!1;return new TransformStream({transform(m,b){for(c.push(m);;){if(r===0){if(Su(c)<1)break;const y=xu(c,1);h=(y[0]&128)===128,f=y[0]&127,f<126?r=3:f===126?r=1:r=2}else if(r===1){if(Su(c)<2)break;const y=xu(c,2);f=new DataView(y.buffer,y.byteOffset,y.length).getUint16(0),r=3}else if(r===2){if(Su(c)<8)break;const y=xu(c,8),v=new DataView(y.buffer,y.byteOffset,y.length),T=v.getUint32(0);if(T>Math.pow(2,21)-1){b.enqueue(br);break}f=T*Math.pow(2,32)+v.getUint32(4),r=3}else{if(Su(c)<f)break;const y=xu(c,f);b.enqueue(Mr(h?y:hr.decode(y),i)),r=0}if(f===0||f>u){b.enqueue(br);break}}}})}const Vm=4;function Ye(u){if(u)return bg(u)}function bg(u){for(var i in Ye.prototype)u[i]=Ye.prototype[i];return u}Ye.prototype.on=Ye.prototype.addEventListener=function(u,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+u]=this._callbacks["$"+u]||[]).push(i),this};Ye.prototype.once=function(u,i){function c(){this.off(u,c),i.apply(this,arguments)}return c.fn=i,this.on(u,c),this};Ye.prototype.off=Ye.prototype.removeListener=Ye.prototype.removeAllListeners=Ye.prototype.removeEventListener=function(u,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var c=this._callbacks["$"+u];if(!c)return this;if(arguments.length==1)return delete this._callbacks["$"+u],this;for(var r,f=0;f<c.length;f++)if(r=c[f],r===i||r.fn===i){c.splice(f,1);break}return c.length===0&&delete this._callbacks["$"+u],this};Ye.prototype.emit=function(u){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),c=this._callbacks["$"+u],r=1;r<arguments.length;r++)i[r-1]=arguments[r];if(c){c=c.slice(0);for(var r=0,f=c.length;r<f;++r)c[r].apply(this,i)}return this};Ye.prototype.emitReserved=Ye.prototype.emit;Ye.prototype.listeners=function(u){return this._callbacks=this._callbacks||{},this._callbacks["$"+u]||[]};Ye.prototype.hasListeners=function(u){return!!this.listeners(u).length};const wu=typeof Promise=="function"&&typeof Promise.resolve=="function"?i=>Promise.resolve().then(i):(i,c)=>c(i,0),Rt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Sg="arraybuffer";function Qm(u,...i){return i.reduce((c,r)=>(u.hasOwnProperty(r)&&(c[r]=u[r]),c),{})}const xg=Rt.setTimeout,_g=Rt.clearTimeout;function Uu(u,i){i.useNativeTimers?(u.setTimeoutFn=xg.bind(Rt),u.clearTimeoutFn=_g.bind(Rt)):(u.setTimeoutFn=Rt.setTimeout.bind(Rt),u.clearTimeoutFn=Rt.clearTimeout.bind(Rt))}const Eg=1.33;function Tg(u){return typeof u=="string"?Ag(u):Math.ceil((u.byteLength||u.size)*Eg)}function Ag(u){let i=0,c=0;for(let r=0,f=u.length;r<f;r++)i=u.charCodeAt(r),i<128?c+=1:i<2048?c+=2:i<55296||i>=57344?c+=3:(r++,c+=4);return c}function Zm(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Cg(u){let i="";for(let c in u)u.hasOwnProperty(c)&&(i.length&&(i+="&"),i+=encodeURIComponent(c)+"="+encodeURIComponent(u[c]));return i}function Rg(u){let i={},c=u.split("&");for(let r=0,f=c.length;r<f;r++){let h=c[r].split("=");i[decodeURIComponent(h[0])]=decodeURIComponent(h[1])}return i}class Ng extends Error{constructor(i,c,r){super(i),this.description=c,this.context=r,this.type="TransportError"}}class Dr extends Ye{constructor(i){super(),this.writable=!1,Uu(this,i),this.opts=i,this.query=i.query,this.socket=i.socket,this.supportsBinary=!i.forceBase64}onError(i,c,r){return super.emitReserved("error",new Ng(i,c,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(i){this.readyState==="open"&&this.write(i)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(i){const c=Mr(i,this.socket.binaryType);this.onPacket(c)}onPacket(i){super.emitReserved("packet",i)}onClose(i){this.readyState="closed",super.emitReserved("close",i)}pause(i){}createUri(i,c={}){return i+"://"+this._hostname()+this._port()+this.opts.path+this._query(c)}_hostname(){const i=this.opts.hostname;return i.indexOf(":")===-1?i:"["+i+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(i){const c=Cg(i);return c.length?"?"+c:""}}class Og extends Dr{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(i){this.readyState="pausing";const c=()=>{this.readyState="paused",i()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||c()})),this.writable||(r++,this.once("drain",function(){--r||c()}))}else c()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(i){const c=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};yg(i,this.socket.binaryType).forEach(c),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const i=()=>{this.write([{type:"close"}])};this.readyState==="open"?i():this.once("open",i)}write(i){this.writable=!1,pg(i,c=>{this.doWrite(c,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const i=this.opts.secure?"https":"http",c=this.query||{};return this.opts.timestampRequests!==!1&&(c[this.opts.timestampParam]=Zm()),!this.supportsBinary&&!c.sid&&(c.b64=1),this.createUri(i,c)}}let Km=!1;try{Km=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const zg=Km;function Mg(){}class Dg extends Og{constructor(i){if(super(i),typeof location<"u"){const c=location.protocol==="https:";let r=location.port;r||(r=c?"443":"80"),this.xd=typeof location<"u"&&i.hostname!==location.hostname||r!==i.port}}doWrite(i,c){const r=this.request({method:"POST",data:i});r.on("success",c),r.on("error",(f,h)=>{this.onError("xhr post error",f,h)})}doPoll(){const i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(c,r)=>{this.onError("xhr poll error",c,r)}),this.pollXhr=i}}class Ht extends Ye{constructor(i,c,r){super(),this.createRequest=i,Uu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=c,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var i;const c=Qm(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");c.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(c);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let f in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(f)&&r.setRequestHeader(f,this._opts.extraHeaders[f])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(i=this._opts.cookieJar)===null||i===void 0||i.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var f;r.readyState===3&&((f=this._opts.cookieJar)===null||f===void 0||f.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(f){this.setTimeoutFn(()=>{this._onError(f)},0);return}typeof document<"u"&&(this._index=Ht.requestsCount++,Ht.requests[this._index]=this)}_onError(i){this.emitReserved("error",i,this._xhr),this._cleanup(!0)}_cleanup(i){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Mg,i)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Ht.requests[this._index],this._xhr=null}}_onLoad(){const i=this._xhr.responseText;i!==null&&(this.emitReserved("data",i),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Ht.requestsCount=0;Ht.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",fm);else if(typeof addEventListener=="function"){const u="onpagehide"in Rt?"pagehide":"unload";addEventListener(u,fm,!1)}}function fm(){for(let u in Ht.requests)Ht.requests.hasOwnProperty(u)&&Ht.requests[u].abort()}const jg=(function(){const u=Jm({xdomain:!1});return u&&u.responseType!==null})();class wg extends Dg{constructor(i){super(i);const c=i&&i.forceBase64;this.supportsBinary=jg&&!c}request(i={}){return Object.assign(i,{xd:this.xd},this.opts),new Ht(Jm,this.uri(),i)}}function Jm(u){const i=u.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||zg))return new XMLHttpRequest}catch{}if(!i)try{return new Rt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const $m=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Ug extends Dr{get name(){return"websocket"}doOpen(){const i=this.uri(),c=this.opts.protocols,r=$m?{}:Qm(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(i,c,r)}catch(f){return this.emitReserved("error",f)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=i=>this.onClose({description:"websocket connection closed",context:i}),this.ws.onmessage=i=>this.onData(i.data),this.ws.onerror=i=>this.onError("websocket error",i)}write(i){this.writable=!1;for(let c=0;c<i.length;c++){const r=i[c],f=c===i.length-1;zr(r,this.supportsBinary,h=>{try{this.doWrite(r,h)}catch{}f&&wu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const i=this.opts.secure?"wss":"ws",c=this.query||{};return this.opts.timestampRequests&&(c[this.opts.timestampParam]=Zm()),this.supportsBinary||(c.b64=1),this.createUri(i,c)}}const dr=Rt.WebSocket||Rt.MozWebSocket;class Bg extends Ug{createSocket(i,c,r){return $m?new dr(i,c,r):c?new dr(i,c):new dr(i)}doWrite(i,c){this.ws.send(c)}}class Lg extends Dr{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(i){return this.emitReserved("error",i)}this._transport.closed.then(()=>{this.onClose()}).catch(i=>{this.onError("webtransport error",i)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(i=>{const c=gg(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=i.readable.pipeThrough(c).getReader(),f=vg();f.readable.pipeTo(i.writable),this._writer=f.writable.getWriter();const h=()=>{r.read().then(({done:b,value:y})=>{b||(this.onPacket(y),h())}).catch(b=>{})};h();const m={type:"open"};this.query.sid&&(m.data=`{"sid":"${this.query.sid}"}`),this._writer.write(m).then(()=>this.onOpen())})})}write(i){this.writable=!1;for(let c=0;c<i.length;c++){const r=i[c],f=c===i.length-1;this._writer.write(r).then(()=>{f&&wu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this._transport)===null||i===void 0||i.close()}}const Hg={websocket:Bg,webtransport:Lg,polling:wg},qg=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Yg=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Sr(u){if(u.length>8e3)throw"URI too long";const i=u,c=u.indexOf("["),r=u.indexOf("]");c!=-1&&r!=-1&&(u=u.substring(0,c)+u.substring(c,r).replace(/:/g,";")+u.substring(r,u.length));let f=qg.exec(u||""),h={},m=14;for(;m--;)h[Yg[m]]=f[m]||"";return c!=-1&&r!=-1&&(h.source=i,h.host=h.host.substring(1,h.host.length-1).replace(/;/g,":"),h.authority=h.authority.replace("[","").replace("]","").replace(/;/g,":"),h.ipv6uri=!0),h.pathNames=kg(h,h.path),h.queryKey=Xg(h,h.query),h}function kg(u,i){const c=/\/{2,9}/g,r=i.replace(c,"/").split("/");return(i.slice(0,1)=="/"||i.length===0)&&r.splice(0,1),i.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Xg(u,i){const c={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,f,h){f&&(c[f]=h)}),c}const xr=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ru=[];xr&&addEventListener("offline",()=>{Ru.forEach(u=>u())},!1);class Ln extends Ye{constructor(i,c){if(super(),this.binaryType=Sg,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,i&&typeof i=="object"&&(c=i,i=null),i){const r=Sr(i);c.hostname=r.host,c.secure=r.protocol==="https"||r.protocol==="wss",c.port=r.port,r.query&&(c.query=r.query)}else c.host&&(c.hostname=Sr(c.host).host);Uu(this,c),this.secure=c.secure!=null?c.secure:typeof location<"u"&&location.protocol==="https:",c.hostname&&!c.port&&(c.port=this.secure?"443":"80"),this.hostname=c.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=c.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},c.transports.forEach(r=>{const f=r.prototype.name;this.transports.push(f),this._transportsByName[f]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},c),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Rg(this.opts.query)),xr&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ru.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(i){const c=Object.assign({},this.opts.query);c.EIO=Vm,c.transport=i,this.id&&(c.sid=this.id);const r=Object.assign({},this.opts,{query:c,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[i]);return new this._transportsByName[i](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const i=this.opts.rememberUpgrade&&Ln.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const c=this.createTransport(i);c.open(),this.setTransport(c)}setTransport(i){this.transport&&this.transport.removeAllListeners(),this.transport=i,i.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",c=>this._onClose("transport close",c))}onOpen(){this.readyState="open",Ln.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",i),this.emitReserved("heartbeat"),i.type){case"open":this.onHandshake(JSON.parse(i.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const c=new Error("server error");c.code=i.data,this._onError(c);break;case"message":this.emitReserved("data",i.data),this.emitReserved("message",i.data);break}}onHandshake(i){this.emitReserved("handshake",i),this.id=i.sid,this.transport.query.sid=i.sid,this._pingInterval=i.pingInterval,this._pingTimeout=i.pingTimeout,this._maxPayload=i.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const i=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+i,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},i),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const i=this._getWritablePackets();this.transport.send(i),this._prevBufferLen=i.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let c=1;for(let r=0;r<this.writeBuffer.length;r++){const f=this.writeBuffer[r].data;if(f&&(c+=Tg(f)),r>0&&c>this._maxPayload)return this.writeBuffer.slice(0,r);c+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const i=Date.now()>this._pingTimeoutTime;return i&&(this._pingTimeoutTime=0,wu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),i}write(i,c,r){return this._sendPacket("message",i,c,r),this}send(i,c,r){return this._sendPacket("message",i,c,r),this}_sendPacket(i,c,r,f){if(typeof c=="function"&&(f=c,c=void 0),typeof r=="function"&&(f=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const h={type:i,data:c,options:r};this.emitReserved("packetCreate",h),this.writeBuffer.push(h),f&&this.once("flush",f),this.flush()}close(){const i=()=>{this._onClose("forced close"),this.transport.close()},c=()=>{this.off("upgrade",c),this.off("upgradeError",c),i()},r=()=>{this.once("upgrade",c),this.once("upgradeError",c)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():i()}):this.upgrading?r():i()),this}_onError(i){if(Ln.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",i),this._onClose("transport error",i)}_onClose(i,c){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),xr&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Ru.indexOf(this._offlineEventListener);r!==-1&&Ru.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",i,c),this.writeBuffer=[],this._prevBufferLen=0}}}Ln.protocol=Vm;class Gg extends Ln{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let i=0;i<this._upgrades.length;i++)this._probe(this._upgrades[i])}_probe(i){let c=this.createTransport(i),r=!1;Ln.priorWebsocketSuccess=!1;const f=()=>{r||(c.send([{type:"ping",data:"probe"}]),c.once("packet",S=>{if(!r)if(S.type==="pong"&&S.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",c),!c)return;Ln.priorWebsocketSuccess=c.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(T(),this.setTransport(c),c.send([{type:"upgrade"}]),this.emitReserved("upgrade",c),c=null,this.upgrading=!1,this.flush())})}else{const C=new Error("probe error");C.transport=c.name,this.emitReserved("upgradeError",C)}}))};function h(){r||(r=!0,T(),c.close(),c=null)}const m=S=>{const C=new Error("probe error: "+S);C.transport=c.name,h(),this.emitReserved("upgradeError",C)};function b(){m("transport closed")}function y(){m("socket closed")}function v(S){c&&S.name!==c.name&&h()}const T=()=>{c.removeListener("open",f),c.removeListener("error",m),c.removeListener("close",b),this.off("close",y),this.off("upgrading",v)};c.once("open",f),c.once("error",m),c.once("close",b),this.once("close",y),this.once("upgrading",v),this._upgrades.indexOf("webtransport")!==-1&&i!=="webtransport"?this.setTimeoutFn(()=>{r||c.open()},200):c.open()}onHandshake(i){this._upgrades=this._filterUpgrades(i.upgrades),super.onHandshake(i)}_filterUpgrades(i){const c=[];for(let r=0;r<i.length;r++)~this.transports.indexOf(i[r])&&c.push(i[r]);return c}}let Vg=class extends Gg{constructor(i,c={}){const r=typeof i=="object"?i:c;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(f=>Hg[f]).filter(f=>!!f)),super(i,r)}};function Qg(u,i="",c){let r=u;c=c||typeof location<"u"&&location,u==null&&(u=c.protocol+"//"+c.host),typeof u=="string"&&(u.charAt(0)==="/"&&(u.charAt(1)==="/"?u=c.protocol+u:u=c.host+u),/^(https?|wss?):\/\//.test(u)||(typeof c<"u"?u=c.protocol+"//"+u:u="https://"+u),r=Sr(u)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const h=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+h+":"+r.port+i,r.href=r.protocol+"://"+h+(c&&c.port===r.port?"":":"+r.port),r}const Zg=typeof ArrayBuffer=="function",Kg=u=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(u):u.buffer instanceof ArrayBuffer,Wm=Object.prototype.toString,Jg=typeof Blob=="function"||typeof Blob<"u"&&Wm.call(Blob)==="[object BlobConstructor]",$g=typeof File=="function"||typeof File<"u"&&Wm.call(File)==="[object FileConstructor]";function jr(u){return Zg&&(u instanceof ArrayBuffer||Kg(u))||Jg&&u instanceof Blob||$g&&u instanceof File}function Nu(u,i){if(!u||typeof u!="object")return!1;if(Array.isArray(u)){for(let c=0,r=u.length;c<r;c++)if(Nu(u[c]))return!0;return!1}if(jr(u))return!0;if(u.toJSON&&typeof u.toJSON=="function"&&arguments.length===1)return Nu(u.toJSON(),!0);for(const c in u)if(Object.prototype.hasOwnProperty.call(u,c)&&Nu(u[c]))return!0;return!1}function Wg(u){const i=[],c=u.data,r=u;return r.data=_r(c,i),r.attachments=i.length,{packet:r,buffers:i}}function _r(u,i){if(!u)return u;if(jr(u)){const c={_placeholder:!0,num:i.length};return i.push(u),c}else if(Array.isArray(u)){const c=new Array(u.length);for(let r=0;r<u.length;r++)c[r]=_r(u[r],i);return c}else if(typeof u=="object"&&!(u instanceof Date)){const c={};for(const r in u)Object.prototype.hasOwnProperty.call(u,r)&&(c[r]=_r(u[r],i));return c}return u}function Fg(u,i){return u.data=Er(u.data,i),delete u.attachments,u}function Er(u,i){if(!u)return u;if(u&&u._placeholder===!0){if(typeof u.num=="number"&&u.num>=0&&u.num<i.length)return i[u.num];throw new Error("illegal attachments")}else if(Array.isArray(u))for(let c=0;c<u.length;c++)u[c]=Er(u[c],i);else if(typeof u=="object")for(const c in u)Object.prototype.hasOwnProperty.call(u,c)&&(u[c]=Er(u[c],i));return u}const Pg=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Ig=5;var re;(function(u){u[u.CONNECT=0]="CONNECT",u[u.DISCONNECT=1]="DISCONNECT",u[u.EVENT=2]="EVENT",u[u.ACK=3]="ACK",u[u.CONNECT_ERROR=4]="CONNECT_ERROR",u[u.BINARY_EVENT=5]="BINARY_EVENT",u[u.BINARY_ACK=6]="BINARY_ACK"})(re||(re={}));class e1{constructor(i){this.replacer=i}encode(i){return(i.type===re.EVENT||i.type===re.ACK)&&Nu(i)?this.encodeAsBinary({type:i.type===re.EVENT?re.BINARY_EVENT:re.BINARY_ACK,nsp:i.nsp,data:i.data,id:i.id}):[this.encodeAsString(i)]}encodeAsString(i){let c=""+i.type;return(i.type===re.BINARY_EVENT||i.type===re.BINARY_ACK)&&(c+=i.attachments+"-"),i.nsp&&i.nsp!=="/"&&(c+=i.nsp+","),i.id!=null&&(c+=i.id),i.data!=null&&(c+=JSON.stringify(i.data,this.replacer)),c}encodeAsBinary(i){const c=Wg(i),r=this.encodeAsString(c.packet),f=c.buffers;return f.unshift(r),f}}function hm(u){return Object.prototype.toString.call(u)==="[object Object]"}class wr extends Ye{constructor(i){super(),this.reviver=i}add(i){let c;if(typeof i=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");c=this.decodeString(i);const r=c.type===re.BINARY_EVENT;r||c.type===re.BINARY_ACK?(c.type=r?re.EVENT:re.ACK,this.reconstructor=new t1(c),c.attachments===0&&super.emitReserved("decoded",c)):super.emitReserved("decoded",c)}else if(jr(i)||i.base64)if(this.reconstructor)c=this.reconstructor.takeBinaryData(i),c&&(this.reconstructor=null,super.emitReserved("decoded",c));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+i)}decodeString(i){let c=0;const r={type:Number(i.charAt(0))};if(re[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===re.BINARY_EVENT||r.type===re.BINARY_ACK){const h=c+1;for(;i.charAt(++c)!=="-"&&c!=i.length;);const m=i.substring(h,c);if(m!=Number(m)||i.charAt(c)!=="-")throw new Error("Illegal attachments");r.attachments=Number(m)}if(i.charAt(c+1)==="/"){const h=c+1;for(;++c&&!(i.charAt(c)===","||c===i.length););r.nsp=i.substring(h,c)}else r.nsp="/";const f=i.charAt(c+1);if(f!==""&&Number(f)==f){const h=c+1;for(;++c;){const m=i.charAt(c);if(m==null||Number(m)!=m){--c;break}if(c===i.length)break}r.id=Number(i.substring(h,c+1))}if(i.charAt(++c)){const h=this.tryParse(i.substr(c));if(wr.isPayloadValid(r.type,h))r.data=h;else throw new Error("invalid payload")}return r}tryParse(i){try{return JSON.parse(i,this.reviver)}catch{return!1}}static isPayloadValid(i,c){switch(i){case re.CONNECT:return hm(c);case re.DISCONNECT:return c===void 0;case re.CONNECT_ERROR:return typeof c=="string"||hm(c);case re.EVENT:case re.BINARY_EVENT:return Array.isArray(c)&&(typeof c[0]=="number"||typeof c[0]=="string"&&Pg.indexOf(c[0])===-1);case re.ACK:case re.BINARY_ACK:return Array.isArray(c)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class t1{constructor(i){this.packet=i,this.buffers=[],this.reconPack=i}takeBinaryData(i){if(this.buffers.push(i),this.buffers.length===this.reconPack.attachments){const c=Fg(this.reconPack,this.buffers);return this.finishedReconstruction(),c}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const n1=Object.freeze(Object.defineProperty({__proto__:null,Decoder:wr,Encoder:e1,get PacketType(){return re},protocol:Ig},Symbol.toStringTag,{value:"Module"}));function Dt(u,i,c){return u.on(i,c),function(){u.off(i,c)}}const l1=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Fm extends Ye{constructor(i,c,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=i,this.nsp=c,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const i=this.io;this.subs=[Dt(i,"open",this.onopen.bind(this)),Dt(i,"packet",this.onpacket.bind(this)),Dt(i,"error",this.onerror.bind(this)),Dt(i,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...i){return i.unshift("message"),this.emit.apply(this,i),this}emit(i,...c){var r,f,h;if(l1.hasOwnProperty(i))throw new Error('"'+i.toString()+'" is a reserved event name');if(c.unshift(i),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(c),this;const m={type:re.EVENT,data:c};if(m.options={},m.options.compress=this.flags.compress!==!1,typeof c[c.length-1]=="function"){const T=this.ids++,S=c.pop();this._registerAckCallback(T,S),m.id=T}const b=(f=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||f===void 0?void 0:f.writable,y=this.connected&&!(!((h=this.io.engine)===null||h===void 0)&&h._hasPingExpired());return this.flags.volatile&&!b||(y?(this.notifyOutgoingListeners(m),this.packet(m)):this.sendBuffer.push(m)),this.flags={},this}_registerAckCallback(i,c){var r;const f=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(f===void 0){this.acks[i]=c;return}const h=this.io.setTimeoutFn(()=>{delete this.acks[i];for(let b=0;b<this.sendBuffer.length;b++)this.sendBuffer[b].id===i&&this.sendBuffer.splice(b,1);c.call(this,new Error("operation has timed out"))},f),m=(...b)=>{this.io.clearTimeoutFn(h),c.apply(this,b)};m.withError=!0,this.acks[i]=m}emitWithAck(i,...c){return new Promise((r,f)=>{const h=(m,b)=>m?f(m):r(b);h.withError=!0,c.push(h),this.emit(i,...c)})}_addToQueue(i){let c;typeof i[i.length-1]=="function"&&(c=i.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:i,flags:Object.assign({fromQueue:!0},this.flags)};i.push((f,...h)=>r!==this._queue[0]?void 0:(f!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),c&&c(f)):(this._queue.shift(),c&&c(null,...h)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(i=!1){if(!this.connected||this._queue.length===0)return;const c=this._queue[0];c.pending&&!i||(c.pending=!0,c.tryCount++,this.flags=c.flags,this.emit.apply(this,c.args))}packet(i){i.nsp=this.nsp,this.io._packet(i)}onopen(){typeof this.auth=="function"?this.auth(i=>{this._sendConnectPacket(i)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(i){this.packet({type:re.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},i):i})}onerror(i){this.connected||this.emitReserved("connect_error",i)}onclose(i,c){this.connected=!1,delete this.id,this.emitReserved("disconnect",i,c),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(i=>{if(!this.sendBuffer.some(r=>String(r.id)===i)){const r=this.acks[i];delete this.acks[i],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(i){if(i.nsp===this.nsp)switch(i.type){case re.CONNECT:i.data&&i.data.sid?this.onconnect(i.data.sid,i.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case re.EVENT:case re.BINARY_EVENT:this.onevent(i);break;case re.ACK:case re.BINARY_ACK:this.onack(i);break;case re.DISCONNECT:this.ondisconnect();break;case re.CONNECT_ERROR:this.destroy();const r=new Error(i.data.message);r.data=i.data.data,this.emitReserved("connect_error",r);break}}onevent(i){const c=i.data||[];i.id!=null&&c.push(this.ack(i.id)),this.connected?this.emitEvent(c):this.receiveBuffer.push(Object.freeze(c))}emitEvent(i){if(this._anyListeners&&this._anyListeners.length){const c=this._anyListeners.slice();for(const r of c)r.apply(this,i)}super.emit.apply(this,i),this._pid&&i.length&&typeof i[i.length-1]=="string"&&(this._lastOffset=i[i.length-1])}ack(i){const c=this;let r=!1;return function(...f){r||(r=!0,c.packet({type:re.ACK,id:i,data:f}))}}onack(i){const c=this.acks[i.id];typeof c=="function"&&(delete this.acks[i.id],c.withError&&i.data.unshift(null),c.apply(this,i.data))}onconnect(i,c){this.id=i,this.recovered=c&&this._pid===c,this._pid=c,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(i=>this.emitEvent(i)),this.receiveBuffer=[],this.sendBuffer.forEach(i=>{this.notifyOutgoingListeners(i),this.packet(i)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(i=>i()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:re.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(i){return this.flags.compress=i,this}get volatile(){return this.flags.volatile=!0,this}timeout(i){return this.flags.timeout=i,this}onAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(i),this}prependAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(i),this}offAny(i){if(!this._anyListeners)return this;if(i){const c=this._anyListeners;for(let r=0;r<c.length;r++)if(i===c[r])return c.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(i),this}prependAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(i),this}offAnyOutgoing(i){if(!this._anyOutgoingListeners)return this;if(i){const c=this._anyOutgoingListeners;for(let r=0;r<c.length;r++)if(i===c[r])return c.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(i){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const c=this._anyOutgoingListeners.slice();for(const r of c)r.apply(this,i.data)}}}function $l(u){u=u||{},this.ms=u.min||100,this.max=u.max||1e4,this.factor=u.factor||2,this.jitter=u.jitter>0&&u.jitter<=1?u.jitter:0,this.attempts=0}$l.prototype.duration=function(){var u=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),c=Math.floor(i*this.jitter*u);u=(Math.floor(i*10)&1)==0?u-c:u+c}return Math.min(u,this.max)|0};$l.prototype.reset=function(){this.attempts=0};$l.prototype.setMin=function(u){this.ms=u};$l.prototype.setMax=function(u){this.max=u};$l.prototype.setJitter=function(u){this.jitter=u};class Tr extends Ye{constructor(i,c){var r;super(),this.nsps={},this.subs=[],i&&typeof i=="object"&&(c=i,i=void 0),c=c||{},c.path=c.path||"/socket.io",this.opts=c,Uu(this,c),this.reconnection(c.reconnection!==!1),this.reconnectionAttempts(c.reconnectionAttempts||1/0),this.reconnectionDelay(c.reconnectionDelay||1e3),this.reconnectionDelayMax(c.reconnectionDelayMax||5e3),this.randomizationFactor((r=c.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new $l({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(c.timeout==null?2e4:c.timeout),this._readyState="closed",this.uri=i;const f=c.parser||n1;this.encoder=new f.Encoder,this.decoder=new f.Decoder,this._autoConnect=c.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(i){return arguments.length?(this._reconnection=!!i,i||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(i){return i===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=i,this)}reconnectionDelay(i){var c;return i===void 0?this._reconnectionDelay:(this._reconnectionDelay=i,(c=this.backoff)===null||c===void 0||c.setMin(i),this)}randomizationFactor(i){var c;return i===void 0?this._randomizationFactor:(this._randomizationFactor=i,(c=this.backoff)===null||c===void 0||c.setJitter(i),this)}reconnectionDelayMax(i){var c;return i===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=i,(c=this.backoff)===null||c===void 0||c.setMax(i),this)}timeout(i){return arguments.length?(this._timeout=i,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(i){if(~this._readyState.indexOf("open"))return this;this.engine=new Vg(this.uri,this.opts);const c=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const f=Dt(c,"open",function(){r.onopen(),i&&i()}),h=b=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",b),i?i(b):this.maybeReconnectOnOpen()},m=Dt(c,"error",h);if(this._timeout!==!1){const b=this._timeout,y=this.setTimeoutFn(()=>{f(),h(new Error("timeout")),c.close()},b);this.opts.autoUnref&&y.unref(),this.subs.push(()=>{this.clearTimeoutFn(y)})}return this.subs.push(f),this.subs.push(m),this}connect(i){return this.open(i)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const i=this.engine;this.subs.push(Dt(i,"ping",this.onping.bind(this)),Dt(i,"data",this.ondata.bind(this)),Dt(i,"error",this.onerror.bind(this)),Dt(i,"close",this.onclose.bind(this)),Dt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(i){try{this.decoder.add(i)}catch(c){this.onclose("parse error",c)}}ondecoded(i){wu(()=>{this.emitReserved("packet",i)},this.setTimeoutFn)}onerror(i){this.emitReserved("error",i)}socket(i,c){let r=this.nsps[i];return r?this._autoConnect&&!r.active&&r.connect():(r=new Fm(this,i,c),this.nsps[i]=r),r}_destroy(i){const c=Object.keys(this.nsps);for(const r of c)if(this.nsps[r].active)return;this._close()}_packet(i){const c=this.encoder.encode(i);for(let r=0;r<c.length;r++)this.engine.write(c[r],i.options)}cleanup(){this.subs.forEach(i=>i()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(i,c){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",i,c),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const i=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const c=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{i.skipReconnect||(this.emitReserved("reconnect_attempt",i.backoff.attempts),!i.skipReconnect&&i.open(f=>{f?(i._reconnecting=!1,i.reconnect(),this.emitReserved("reconnect_error",f)):i.onreconnect()}))},c);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const i=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",i)}}const Za={};function Ou(u,i){typeof u=="object"&&(i=u,u=void 0),i=i||{};const c=Qg(u,i.path||"/socket.io"),r=c.source,f=c.id,h=c.path,m=Za[f]&&h in Za[f].nsps,b=i.forceNew||i["force new connection"]||i.multiplex===!1||m;let y;return b?y=new Tr(r,i):(Za[f]||(Za[f]=new Tr(r,i)),y=Za[f]),c.query&&!i.query&&(i.query=c.queryKey),y.socket(c.path,i)}Object.assign(Ou,{Manager:Tr,Socket:Fm,io:Ou,connect:Ou});const Pm=window.location.origin;console.info("[socket] connecting to",Pm);const Ur=Ou(Pm,{transports:["polling","websocket"],timeout:15e3});Ur.on("connect_error",u=>console.error("connect_error",u.code,u.message,u.data));const Im=E.createContext(Ur),a1=({children:u})=>p.jsx(Im.Provider,{value:Ur,children:u}),ei=()=>E.useContext(Im),ep=E.createContext({connected:!1,session:null,logs:[],login:async()=>{},setRole:async()=>{},requestControl:async()=>{},releaseControl:async()=>{},subscribeAll:async()=>{}});function i1(u){return E.useCallback((i,c={})=>new Promise((r,f)=>{u.emit(i,c,(h={})=>{h.error?f(new Error(h.error)):r(h)})}),[u])}function u1({children:u}){const i=ei(),c=i1(i),[r,f]=E.useState(null),[h,m]=E.useState([]),[b,y]=E.useState([]),[v,T]=E.useState(i.connected);E.useEffect(()=>{const z=()=>T(!0),H=()=>T(!1);return i.on("connect",z),i.on("disconnect",H),()=>{i.off("connect",z),i.off("disconnect",H)}},[i]),E.useEffect(()=>{function z(Y){f(Y)}function H(Y=[]){m(Y)}function k(Y){m(L=>[...L.slice(-199),Y])}return i.on("session:sync",z),i.on("log:init",H),i.on("log:entry",k),i.on("alert:new",(Y={})=>{y(L=>[...L.slice(-49),{...Y,receivedAt:Date.now()}])}),()=>{i.off("session:sync",z),i.off("log:init",H),i.off("log:entry",k),i.off("alert:new")}},[i]);const S=E.useMemo(()=>({login:(z,H)=>c("auth:login",{username:z,password:H}),setRole:z=>c("session:setRole",{role:z}),requestControl:(z,H={})=>c("session:requestControl",{roverId:z,...H}),releaseControl:z=>c("session:releaseControl",{roverId:z}),subscribeAll:()=>c("session:subscribeAll"),lockRover:(z,H)=>c("session:lockRover",{roverId:z,locked:H}),setMode:z=>c("setMode",{mode:z})}),[c]),C=E.useMemo(()=>({connected:v,session:r,logs:h,alerts:b,...S}),[S,b,v,h,r]);return p.jsx(ep.Provider,{value:C,children:u})}function fn(){return E.useContext(ep)}const tp=E.createContext({frames:{}});function s1({children:u}){const i=ei(),[c,r]=E.useState({});E.useEffect(()=>{function h({roverId:m,sensors:b={},frame:y={}}){m&&r(v=>({...v,[m]:{roverId:m,sensors:b,raw:y?.data||null,receivedAt:Date.now()}}))}return i.on("sensorFrame",h),()=>{i.off("sensorFrame",h)}},[i]);const f=E.useMemo(()=>({frames:c}),[c]);return p.jsx(tp.Provider,{value:f,children:u})}function np(){return E.useContext(tp).frames}function Br(u){const i=np();return u?i[u]??null:null}function al(u,i="--"){return u==null||u===""?i:u}function Lr(){const{connected:u,session:i,requestControl:c}=fn(),r=i?.assignment?.roverId,f=Br(r),h=f?.sensors||{},m=h.voltageMv!=null?`${(h.voltageMv/1e3).toFixed(2)} V`:null,b=h.currentMa!=null?`${h.currentMa} mA`:null,y=h.batteryChargeMah,v=h.batteryCapacityMah,T=f?.receivedAt?new Date(f.receivedAt).toLocaleTimeString():null,S=f?.raw?f.raw:null,C=i?.roster??[],z=E.useMemo(()=>i?.role==="admin"||i?.role==="lockdown"||i?.role==="lockdown-admin",[i?.role]),[H,k]=E.useState({});async function Y(L){if(L){k(q=>({...q,[L]:!0}));try{await c(L)}catch(q){alert(q.message)}finally{k(q=>({...q,[L]:!1}))}}}return p.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[p.jsxs("div",{className:"text-sm text-slate-400",children:[p.jsx("span",{children:u?"online":"offline"}),p.jsxs("span",{children:[" · role ",i?.role||"unknown"]}),p.jsxs("span",{children:[" · mode ",i?.mode||"--"]}),T&&p.jsxs("span",{children:[" · sensors ",T]})]}),r?f?p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"flex gap-0.5 flex-wrap",children:[p.jsx(il,{label:"Charge",value:al(y!=null&&v!=null?`${y}/${v}`:null)}),p.jsx(il,{label:"Charging",value:al(h.chargingState?.label)}),p.jsx(il,{label:"OI mode",value:al(h.oiMode?.label)}),p.jsx(il,{label:"Voltage",value:al(m)}),p.jsx(il,{label:"Current",value:al(b)}),p.jsx(il,{label:"Left Encoder",value:al(h.encoderCountsLeft)}),p.jsx(il,{label:"Right Encoder",value:al(h.encoderCountsRight)})]}),p.jsxs("div",{className:"flex gap-0.5 mt-1",children:[p.jsx(_u,{value:h.cliffLeftSignal}),p.jsx(_u,{value:h.cliffFrontLeftSignal}),p.jsx(_u,{value:h.cliffFrontRightSignal}),p.jsx(_u,{value:h.cliffRightSignal})]})]}):p.jsx("p",{className:"mt-1 text-[0.75rem] text-slate-400",children:"Waiting for sensor frames…"}):p.jsx("p",{className:"mt-1 text-[0.75rem] text-slate-400",children:"Assign a rover to view sensors."}),S&&p.jsx("pre",{className:"mt-1 text-wrap p-1 text-xs text-lime-300",children:S}),p.jsxs("div",{className:"mt-1",children:[p.jsx("p",{className:"text-sm text-slate-400",children:"Rovers"}),C.length===0?p.jsx("p",{className:"text-sm text-slate-500",children:"No roster data."}):p.jsx("ul",{className:"mt-1 space-y-1 text-sm",children:C.map(L=>p.jsxs("li",{className:"flex items-center justify-between gap-1",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-slate-200",children:L.name}),p.jsxs("p",{className:"text-xs text-slate-500",children:[L.locked?"locked":"free"," · ",L.lastSeen?"seen":"unknown"]})]}),z&&p.jsx("button",{type:"button",onClick:()=>Y(L.id),disabled:H[L.id],className:"rounded-sm bg-black/40 px-1 py-0.5 text-xs text-slate-200 disabled:opacity-40",children:H[L.id]?"...":"request"})]},L.id))})]})]})}function _u({value:u}){const c=`${u==null?0:Math.max(0,Math.min(100,u/4095*100))}%`;return p.jsx("div",{className:"w-1/4 h-6 bg-gray-700 rounded-sm overflow-hidden",children:p.jsx("div",{className:"w-full bg-lime-400",style:{height:c}})})}function il({label:u,value:i}){return p.jsxs("div",{className:"bg-gray-700 rounded-sm p-0.5 text-sm",children:[u,": ",i]})}const c1={start:[128],safe:[131],full:[132],passive:[128],dock:[143]},Zl={main:[-127,127],side:[-127,127],vacuum:[0,127]},r1=200,o1=u=>new Promise(i=>setTimeout(i,u));function ul(u,i,c){return Math.max(i,Math.min(c,u))}function f1(u){const i=u.has("w"),c=u.has("s"),r=u.has("a"),f=u.has("d"),m=u.has("shift")?300:150;let b=0,y=0;return i&&!c?(b+=m,y+=m):c&&!i&&(b-=m,y-=m),r&&!f?(b-=m,y+=m):f&&!r&&(b+=m,y-=m),!i&&!c&&(r||f)&&(b=r?-m:m,y=r?m:-m),{left:ul(b,-500,500),right:ul(y,-500,500)}}function dm(u){return typeof u!="number"||Number.isNaN(u)?0:Math.max(-1,Math.min(1,u))}function h1(u){const i=u.target;if(!i)return!1;const c=i.tagName;return c==="INPUT"||c==="TEXTAREA"||i.isContentEditable||c==="SELECT"&&["w","a","s","d","Shift"].includes(u.key)}function d1(u){const i=String.fromCharCode(...u);if(typeof btoa=="function")return btoa(i);if(typeof Buffer<"u")return Buffer.from(u).toString("base64");throw new Error("No base64 encoder available")}function m1(){const u=ei(),{session:i}=fn(),c=i?.assignment?.roverId,r=E.useRef(new Set),f=E.useRef({left:0,right:0}),[h,m]=E.useState(()=>({left:0,right:0})),b=E.useCallback((L,q)=>{c&&u.emit("command",{roverId:c,...L},q)},[u,c]),y=E.useCallback(()=>{c&&b({type:"sensorStream",data:{sensorStream:{enable:!0}}})},[b,c]),v=E.useCallback(()=>{if(!c)return;const L=f1(r.current),q=f.current;L.left===q.left&&L.right===q.right||(f.current=L,m(L),b({type:"drive",data:{driveDirect:L}}))},[b,c]),T=E.useCallback(({x:L=0,y:q=0,boost:Q=!1}={})=>{if(!c)return;const P=Q?400:250,ye=dm(q)*P,Re=dm(L)*P,$={left:ul(Math.round(ye+Re),-500,500),right:ul(Math.round(ye-Re),-500,500)};f.current=$,m($),b({type:"drive",data:{driveDirect:$}})},[b,c]),S=E.useCallback(({main:L=0,side:q=0,vacuum:Q=0}={})=>{if(!c)return;const P={main:ul(L,Zl.main[0],Zl.main[1]),side:ul(q,Zl.side[0],Zl.side[1]),vacuum:ul(Q,Zl.vacuum[0],Zl.vacuum[1])};b({type:"motors",data:{motorPwm:P}})},[b,c]),C=E.useCallback(()=>{c&&(r.current.clear(),f.current={left:0,right:0},m(f.current),S({main:0,side:0,vacuum:0}))},[c,S]),z=E.useCallback(L=>{if(!c)return;const q=c1[L];q&&(b({type:"raw",data:{raw:d1(q)}}),y())},[b,y,c]),H=E.useCallback(async()=>{if(c)for(const L of["start","dock","full"])z(L),await o1(r1)},[c,z]),k=E.useCallback(()=>{z("dock")},[z]),Y=E.useCallback(L=>{c&&S(L)},[c,S]);return E.useEffect(()=>{if(!c){r.current.clear(),f.current={left:0,right:0},m(f.current);return}function L(Q){if(h1(Q))return;const P=Q.key.toLowerCase();["w","a","s","d","shift"].includes(P)&&(r.current.has(P)||(r.current.add(P),v()))}function q(Q){const P=Q.key.toLowerCase();r.current.has(P)&&(r.current.delete(P),v())}return window.addEventListener("keydown",L),window.addEventListener("keyup",q),y(),()=>{window.removeEventListener("keydown",L),window.removeEventListener("keyup",q)}},[c,v,y]),{roverId:c,speeds:h,stopMotors:C,sendOiCommand:z,runStartDockFull:H,seekDock:k,setAuxMotors:Y,driveWithVector:T}}const lp=E.createContext(null);function p1({children:u}){const i=m1();return p.jsx(lp.Provider,{value:i,children:u})}function Bu(){const u=E.useContext(lp);if(!u)throw new Error("useDriveControl must be used within DriveControlProvider");return u}function Hr(){const{roverId:u,runStartDockFull:i,seekDock:c}=Bu(),f=Br(u)?.sensors||{},h=(f.oiMode?.label||"").toLowerCase()==="full",m=!!f.chargingSources?.homeBase,b=!!(f.chargingState?.label&&f.chargingState.label.toLowerCase()!=="not charging");return p.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[p.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-300",children:[p.jsx("span",{children:"Drive control"}),p.jsx("span",{children:u?`Rover ${u}`:"unassigned"})]}),p.jsxs("div",{className:"mt-1 space-y-1",children:[p.jsx(mm,{title:"Start Driving",description:"Press to enable driving mode, then start moving. The headlamps should illuminate.",statuses:[{label:h?"Ready!":"Not Ready!",active:h}],tone:"emerald",onClick:i,disabled:!u}),p.jsx(mm,{title:"Dock and Charge",description:"Line the rover up about a foot from the dock, then trigger an automatic approach.",statuses:[{label:m?"Docked!":"Not Docked!",active:m},{label:b?"Charging!":"Not Charging!",active:b}],tone:"indigo",onClick:c,disabled:!u})]})]})}function mm({title:u,description:i,statuses:c,tone:r,onClick:f,disabled:h,footnote:m}){const b=r==="indigo"?"bg-indigo-600":"bg-emerald-600";return p.jsxs("button",{type:"button",onClick:f,disabled:h,className:`w-full rounded-lg ${b} px-1 py-1 text-left text-white disabled:opacity-40`,children:[p.jsx("p",{className:"text-base font-semibold",children:u}),p.jsx("p",{className:"text-sm text-white/90",children:i}),p.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:c.map(y=>p.jsx("span",{className:`rounded-full px-1 py-0.5 text-xs font-semibold ${y.active?"bg-lime-300 text-emerald-900":"bg-emerald-900 text-emerald-100"}`,children:y.label},y.label))}),m&&p.jsx("p",{className:"mt-1 text-xs text-emerald-50/80",children:m})]})}const y1=5e3;function v1(u){return u.id?u.id:u.timestamp?`${u.timestamp}-${u.message}`:`${u.title||"alert"}-${u.message}`}function g1(){const{alerts:u}=fn(),[i,c]=E.useState(()=>Date.now()),r=E.useMemo(()=>u.slice(-5).map(h=>({alert:h,key:v1(h)})),[u]);E.useEffect(()=>{if(!r.length)return;const h=setInterval(()=>c(Date.now()),200);return()=>clearInterval(h)},[r.length]);const f=r.map(h=>({...h,age:i-(h.alert.receivedAt??h.alert.timestamp??0)})).filter(h=>h.age<=y1);return f.length?p.jsx("div",{className:"pointer-events-none fixed top-1 left-1/2 z-50 flex -translate-x-1/2 flex-col gap-1",children:f.map(h=>p.jsx(b1,{alert:h.alert},h.key))}):null}function b1({alert:u}){const i=u.color==="error"?"bg-red-500/30 text-red-100":u.color==="warn"?"bg-amber-500/30 text-amber-100":"bg-emerald-500/30 text-emerald-100";return p.jsxs("div",{className:`pointer-events-auto rounded-sm px-1 py-1 text-[0.75rem] shadow-lg shadow-black/60 ${i}`,children:[p.jsx("p",{className:"text-[0.65rem] text-slate-300",children:u.title||"Alert"}),p.jsx("p",{className:"text-sm text-white",children:u.message})]})}const S1=[{key:"open",label:"Open"},{key:"turns",label:"Turns"},{key:"admin",label:"Admin"},{key:"lockdown",label:"Lockdown"}];function Lu(){const{session:u,lockRover:i,setMode:c,requestControl:r}=fn(),f=E.useMemo(()=>u?.roster??[],[u?.roster]),[h,m]=E.useState({}),b=u?.role==="admin"||u?.role==="lockdown"||u?.role==="lockdown-admin",y=u?.mode??"open",v=async(z,H)=>{try{await i(z,H),m(k=>({...k,[z]:H}))}catch(k){alert(k.message)}},T=async z=>{const H=z.target.value;try{await c(H)}catch(k){alert(k.message)}},S=async z=>{try{await r(z,{force:!0})}catch(H){alert(H.message)}},C=E.useMemo(()=>{const z={};return f.forEach(H=>{z[H.id]=h[H.id]??H.locked}),z},[f,h]);return b?p.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[p.jsxs("div",{className:"flex items-center justify-between gap-1 text-sm",children:[p.jsx("span",{children:"Admin controls"}),p.jsx("select",{value:y,onChange:T,className:"rounded-sm bg-black/40 px-1 py-1 text-sm text-slate-100",children:S1.map(z=>p.jsx("option",{value:z.key,children:z.label},z.key))})]}),p.jsx("div",{className:"mt-1 space-y-1 text-sm",children:f.map(z=>p.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-1 rounded-sm bg-black/30 px-1 py-1",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-slate-100",children:z.name}),p.jsx("p",{className:"text-xs text-slate-400",children:C[z.id]?"locked":"unlocked"})]}),p.jsxs("div",{className:"flex flex-wrap gap-1 text-xs",children:[p.jsx("button",{type:"button",onClick:()=>v(z.id,!C[z.id]),className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",children:C[z.id]?"Unlock":"Lock"}),p.jsx("button",{type:"button",onClick:()=>S(z.id),className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",children:"Force"})]})]},z.id))})]}):null}var mr={},sn={},pr={},pm;function Hu(){return pm||(pm=1,(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.JoystickShape=void 0,(function(i){i.Circle="circle",i.Square="square",i.AxisY="axisY",i.AxisX="axisX"})(u.JoystickShape||(u.JoystickShape={}))})(pr)),pr}var Ka={},ym;function x1(){if(ym)return Ka;ym=1,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.shapeFactory=void 0;var u=Hu(),i=function(c,r){switch(c){case u.JoystickShape.Square:return{borderRadius:Math.sqrt(r)};case u.JoystickShape.Circle:default:return{borderRadius:r}}};return Ka.shapeFactory=i,Ka}var Ja={},vm;function _1(){if(vm)return Ja;vm=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.shapeBoundsFactory=void 0;var u=Hu(),i=function(r,f,h,m,b,y,v,T,S){switch(r){case u.JoystickShape.Square:return m=c(f-S.left-T/2,T),b=c(h-S.top-T/2,T),{relativeX:m,relativeY:b};case u.JoystickShape.AxisX:return m=c(f-S.left-T/2,T),b=0,{relativeX:m,relativeY:b};case u.JoystickShape.AxisY:return m=0,b=c(h-S.top-T/2,T),{relativeX:m,relativeY:b};default:return y>v&&(m*=v/y,b*=v/y),{relativeX:m,relativeY:b}}};Ja.shapeBoundsFactory=i;var c=function(r,f){var h=f/2;return r>h?h:r<-h?h*-1:r};return Ja}var gm;function E1(){if(gm)return sn;gm=1;var u=sn&&sn.__extends||(function(){var v=function(T,S){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,z){C.__proto__=z}||function(C,z){for(var H in z)Object.prototype.hasOwnProperty.call(z,H)&&(C[H]=z[H])},v(T,S)};return function(T,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");v(T,S);function C(){this.constructor=T}T.prototype=S===null?Object.create(S):(C.prototype=S.prototype,new C)}})(),i=sn&&sn.__assign||function(){return i=Object.assign||function(v){for(var T,S=1,C=arguments.length;S<C;S++){T=arguments[S];for(var z in T)Object.prototype.hasOwnProperty.call(T,z)&&(v[z]=T[z])}return v},i.apply(this,arguments)};Object.defineProperty(sn,"__esModule",{value:!0}),sn.Joystick=void 0;var c=Mu(),r=Hu(),f=x1(),h=_1(),m;(function(v){v.PointerDown="pointerdown",v.PointerMove="pointermove",v.PointerUp="pointerup"})(m||(m={}));var b;(function(v){v[v.TopRight=2.35619449]="TopRight",v[v.TopLeft=-2.35619449]="TopLeft",v[v.BottomRight=.785398163]="BottomRight",v[v.BottomLeft=-.785398163]="BottomLeft"})(b||(b={}));var y=(function(v){u(T,v);function T(S){var C=v.call(this,S)||this;return C._stickRef=c.createRef(),C._baseRef=c.createRef(),C.frameId=null,C._pointerId=null,C._mounted=!1,C._pointerMove=function(z){if(z.preventDefault(),C.state.dragging){if(!C.props.followCursor&&z.pointerId!==C._pointerId)return;var H=z.clientX,k=z.clientY,Y=H-C._parentRect.left-C._radius,L=k-C._parentRect.top-C._radius,q=C._distance(Y,L),Q=(0,h.shapeBoundsFactory)(C.props.controlPlaneShape||C.props.baseShape,H,k,Y,L,q,C._radius,C._baseSize,C._parentRect);Y=Q.relativeX,L=Q.relativeY;var P=Math.atan2(Y,L);C._updatePos({relativeX:Y,relativeY:L,distance:C._distanceToPercentile(q),direction:C._getDirection(P),axisX:H-C._parentRect.left,axisY:k-C._parentRect.top})}},C._pointerUp=function(z){if(z.pointerId===C._pointerId){var H={dragging:!1};C.props.sticky||(H.coordinates=void 0),C.frameId=window.requestAnimationFrame(function(){C._mounted&&C.setState(H)}),window.removeEventListener(m.PointerUp,C._pointerUp),window.removeEventListener(m.PointerMove,C._pointerMove),C._pointerId=null,C.props.stop&&C.props.stop({type:"stop",x:C.props.sticky?C.state.coordinates.relativeX*2/C._baseSize:null,y:C.props.sticky?C.state.coordinates.relativeY*2/C._baseSize:null,direction:C.props.sticky?C.state.coordinates.direction:null,distance:C.props.sticky?C.state.coordinates.distance:null})}},C.state={dragging:!1},C._throttleMoveCallback=(function(){var z=0;return function(H){var k=new Date().getTime(),Y=C.props.throttle||0;if(!(k-z<Y)&&(z=k,C.props.move))return C.props.move(H)}})(),C}return T.prototype.componentWillUnmount=function(){var S=this;this._mounted=!1,this.props.followCursor&&window.removeEventListener(m.PointerMove,function(C){return S._pointerMove(C)}),this.frameId!==null&&window.cancelAnimationFrame(this.frameId)},T.prototype.componentDidMount=function(){var S=this;this._mounted=!0,this.props.followCursor&&(this._parentRect=this._baseRef.current.getBoundingClientRect(),this.setState({dragging:!0}),window.addEventListener(m.PointerMove,function(C){return S._pointerMove(C)}),this.props.start&&this.props.start({type:"start",x:null,y:null,distance:null,direction:null}))},T.prototype._updatePos=function(S){var C=this;this.frameId=window.requestAnimationFrame(function(){C._mounted&&C.setState({coordinates:S})}),!(typeof this.props.minDistance=="number"&&S.distance<this.props.minDistance)&&this._throttleMoveCallback({type:"move",x:S.relativeX*2/this._baseSize,y:-(S.relativeY*2/this._baseSize),direction:S.direction,distance:S.distance})},T.prototype._pointerDown=function(S){this.props.disabled||this.props.followCursor||(this._parentRect=this._baseRef.current.getBoundingClientRect(),this.setState({dragging:!0}),window.addEventListener(m.PointerUp,this._pointerUp),window.addEventListener(m.PointerMove,this._pointerMove),this._pointerId=S.pointerId,this._stickRef.current.setPointerCapture(S.pointerId),this.props.start&&this.props.start({type:"start",x:null,y:null,distance:null,direction:null}))},T.prototype._getDirection=function(S){return S>b.TopRight||S<b.TopLeft?"FORWARD":S<b.TopRight&&S>b.BottomRight?"RIGHT":S<b.BottomLeft?"LEFT":"BACKWARD"},T.prototype._distance=function(S,C){return Math.hypot(S,C)},T.prototype._distanceToPercentile=function(S){var C=S/(this._baseSize/2)*100;return C>100?100:C},T.prototype.getBaseShapeStyle=function(){var S=this.props.baseShape||r.JoystickShape.Circle;return(0,f.shapeFactory)(S,this._baseSize)},T.prototype.getStickShapeStyle=function(){var S=this.props.stickShape||r.JoystickShape.Circle;return(0,f.shapeFactory)(S,this._baseSize)},T.prototype._getBaseStyle=function(){var S=this.props.baseColor!==void 0?this.props.baseColor:"#000033",C="".concat(this._baseSize,"px"),z=i(i({},this.getBaseShapeStyle()),{height:C,width:C,background:S,display:"flex",justifyContent:"center",alignItems:"center"});return this.props.baseImage&&(z.background="url(".concat(this.props.baseImage,")"),z.backgroundSize="100%"),z},T.prototype._getStickStyle=function(){var S=this.props.stickColor!==void 0?this.props.stickColor:"#3D59AB",C=this._stickSize?"".concat(this._stickSize,"px"):"".concat(this._baseSize/1.5,"px"),z=i(i({},this.getStickShapeStyle()),{background:S,cursor:"move",height:C,width:C,border:"none",flexShrink:0,touchAction:"none"});return this.props.stickImage&&(z.background="url(".concat(this.props.stickImage,")"),z.backgroundSize="100%"),this.props.pos&&(z=Object.assign({},z,{position:"absolute",transform:"translate3d(".concat(this.props.pos.x*this._baseSize/2,"px, ").concat(-(this.props.pos.y*this._baseSize)/2,"px, 0)")})),this.state.coordinates!==void 0&&(z=Object.assign({},z,{position:"absolute",transform:"translate3d(".concat(this.state.coordinates.relativeX,"px, ").concat(this.state.coordinates.relativeY,"px, 0)")})),z},T.prototype.render=function(){var S=this;this._baseSize=this.props.size||100,this._stickSize=this.props.stickSize,this._radius=this._baseSize/2;var C=this._getBaseStyle(),z=this._getStickStyle();return c.createElement("div",{"data-testid":"joystick-base",className:this.props.disabled?"joystick-base-disabled":"",ref:this._baseRef,style:C},c.createElement("button",{ref:this._stickRef,disabled:this.props.disabled,onPointerDown:function(H){return S._pointerDown(H)},className:this.props.disabled?"joystick-disabled":"",style:z}))},T})(c.Component);return sn.Joystick=y,sn}var bm;function T1(){return bm||(bm=1,(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.JoystickShape=u.Joystick=void 0;var i=E1();Object.defineProperty(u,"Joystick",{enumerable:!0,get:function(){return i.Joystick}});var c=Hu();Object.defineProperty(u,"JoystickShape",{enumerable:!0,get:function(){return c.JoystickShape}})})(mr)),mr}var A1=T1();function Sm(u=0){return typeof u!="number"||Number.isNaN(u)?0:Math.max(-1,Math.min(1,u))}function ap(){const{roverId:u,driveWithVector:i,stopMotors:c}=Bu(),r=!u,f=E.useCallback((m={})=>{if(r)return;const b=Sm(m.x??0),y=Sm(m.y??0);i({x:b,y})},[r,i]),h=E.useCallback(()=>{r||i({x:0,y:0})},[r,i]);return p.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[p.jsx("div",{className:"text-xs text-slate-400",children:"Joystick"}),p.jsx("div",{className:"mt-1 flex items-center justify-center",children:p.jsx(A1.Joystick,{size:120,baseColor:"#0f172a",stickColor:"#38bdf8",throttle:75,move:f,stop:h,disabled:r})}),p.jsx("p",{className:"mt-1 text-xs text-slate-400",children:"Drag to drive. Release to stop sending drive commands."}),p.jsx("button",{type:"button",onClick:c,disabled:r,className:"mt-1 w-full rounded-sm bg-black/40 px-1 py-1 text-xs text-slate-200 disabled:opacity-40",children:"Panic Stop"})]})}function ip(){const{roverId:u,setAuxMotors:i}=Bu(),c=!u,r=()=>{c||i({main:127,side:127,vacuum:127})},f=()=>{c||i({main:0,side:0,vacuum:0})},h=[{label:"Main +",values:{main:127}},{label:"Main -",values:{main:-127}},{label:"Side +",values:{side:127}},{label:"Side -",values:{side:-127}},{label:"Vacuum Max",values:{vacuum:127}},{label:"Vacuum Off",values:{vacuum:0}}];return p.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[p.jsx("div",{className:"text-xs text-slate-400",children:"Aux motors"}),p.jsxs("div",{className:"mt-1 flex flex-wrap gap-1",children:[p.jsx("button",{type:"button",onClick:r,disabled:c,className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-xs text-slate-200 disabled:opacity-40",children:"All forward"}),p.jsx("button",{type:"button",onClick:f,disabled:c,className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-xs text-slate-200 disabled:opacity-40",children:"Stop all"})]}),p.jsx("div",{className:"mt-1 grid grid-cols-2 gap-1 text-[0.75rem]",children:h.map(m=>p.jsx("button",{type:"button",onClick:()=>!c&&i(m.values),disabled:c,className:"rounded-sm bg-black/30 px-1 py-1 text-slate-200 disabled:opacity-30",children:m.label},m.label))})]})}function C1(){return p.jsxs("div",{className:"flex flex-col gap-1 sm:flex-row",children:[p.jsx("div",{className:"flex-1",children:p.jsx(ap,{})}),p.jsx("div",{className:"flex-1",children:p.jsx(ip,{})})]})}function qr(){return p.jsxs("div",{className:"min-h-[8rem] rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[p.jsx("p",{className:"text-center text-sm text-slate-400",children:"Room camera"}),p.jsx("p",{className:"mt-1 text-center",children:"Feed placeholder. Wire upcoming room cam here."})]})}function Yr(){const{logs:u}=fn();return p.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[p.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-400",children:[p.jsx("span",{children:"Server logs"}),p.jsx("span",{children:u.length})]}),p.jsx("div",{className:"mt-1 h-48 overflow-y-auto rounded-sm bg-black/40 p-1 font-mono text-xs",children:u.length===0?p.jsx("p",{children:"No logs yet."}):u.slice().reverse().map(i=>p.jsxs("div",{className:"mb-1",children:[p.jsx("span",{className:"text-amber-400",children:i.timestamp})," ",p.jsxs("span",{className:"text-lime-400",children:["[",i.level,"]"]})," ",i.label&&p.jsxs("span",{className:"text-teal-400",children:["[",i.label,"]"]})," ",p.jsx("span",{children:i.message})]},i.id))})]})}function kr(){const{login:u,setRole:i}=fn(),[c,r]=E.useState(""),[f,h]=E.useState(""),[m,b]=E.useState(!1);async function y(v){v.preventDefault(),b(!0);try{await u(c,f),r(""),h("")}catch(T){alert(T.message)}finally{b(!1)}}return p.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[p.jsx("p",{className:"text-sm text-slate-400",children:"Admin login"}),p.jsxs("form",{className:"mt-1 flex flex-col gap-1",onSubmit:y,children:[p.jsx("input",{className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",placeholder:"Username",value:c,onChange:v=>r(v.target.value)}),p.jsx("input",{className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",placeholder:"Password",type:"password",value:f,onChange:v=>h(v.target.value)}),p.jsx("button",{type:"submit",disabled:m,className:"rounded-sm bg-slate-200 px-1 py-1 text-sm font-semibold text-black disabled:opacity-50",children:m?"Logging in…":"Login"})]}),p.jsxs("div",{className:"mt-1 flex gap-1 text-sm",children:[p.jsx("button",{type:"button",onClick:()=>i("user"),className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-slate-200",children:"Driver"}),p.jsx("button",{type:"button",onClick:()=>i("spectator"),className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-slate-200",children:"Spectator"})]})]})}function up(u=[]){const i=ei(),[c,r]=E.useState({}),f=Array.isArray(u)?u.filter(Boolean).join("|"):"";return E.useEffect(()=>{if(!f)return;const m=f.split("|");let b=!1;return m.forEach(y=>{i.emit("video:request",{roverId:y},(v={})=>{b||r(T=>({...T,[y]:v}))})}),()=>{b=!0}},[i,f]),E.useMemo(()=>{if(!f)return{};const m=f.split("|"),b={};return m.forEach(y=>{c[y]&&(b[y]=c[y])}),b},[f,c])}const R1={iceServers:[{urls:"stun:stun.l.google.com:19302"},{urls:"turn:your.turn.server:3478",username:"user",credential:"pass"}],bundlePolicy:"max-bundle",rtcpMuxPolicy:"require"};function N1(u){if(typeof btoa=="function")return btoa(u);if(typeof Buffer<"u")return Buffer.from(u).toString("base64");throw new Error("No base64 encoder available")}function O1(u){if(!u)return{};const i=`${u}:${u}`;return{Authorization:`Basic ${N1(i)}`}}class z1{constructor({url:i,token:c,video:r,onStatus:f}){this.url=i,this.token=c,this.video=r,this.pc=null,this.abortController=null,this.onStatus=f}notify(i,c){typeof this.onStatus=="function"&&this.onStatus(i,c)}configureVideoElement(){this.video&&(this.video.playsInline=!0,this.video.autoplay=!0,this.video.disableRemotePlayback=!0,"latencyHint"in HTMLMediaElement.prototype&&(this.video.latencyHint="interactive"))}async start(){if(!this.url||!this.video)throw new Error("Video target missing");this.stop(),this.notify("connecting"),this.configureVideoElement(),this.abortController=new AbortController;const i=new RTCPeerConnection(R1);this.pc=i;const c=new MediaStream;i.ontrack=r=>{r.streams[0]?.getTracks().forEach(f=>c.addTrack(f)),this.video.srcObject=c,r.track?.kind==="video"&&"playoutDelayHint"in r.receiver&&(r.receiver.playoutDelayHint=0)},i.addTransceiver("video",{direction:"recvonly"}),i.addTransceiver("audio",{direction:"recvonly"}),i.onconnectionstatechange=()=>{const r=i.connectionState;this.notify(r)},i.oniceconnectionstatechange=()=>{const r=i.iceConnectionState;(r==="failed"||r==="disconnected")&&this.notify(r)};try{const r=await i.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});await i.setLocalDescription(r);const f=await fetch(this.url,{method:"POST",headers:{"Content-Type":"application/sdp",...O1(this.token)},body:r.sdp,signal:this.abortController.signal});if(!f.ok)throw new Error(`WHEP request failed: ${f.status}`);const h=await f.text();await i.setRemoteDescription({type:"answer",sdp:h}),i.getReceivers().forEach(m=>{"playoutDelayHint"in m&&(m.playoutDelayHint=0)}),await this.video.play().catch(()=>{}),this.notify("playing")}catch(r){throw this.notify("error",r.message),this.stop(),r}}stop(){this.abortController&&(this.abortController.abort(),this.abortController=null),this.pc&&(this.pc.getSenders().forEach(i=>i.track?.stop()),this.pc.getReceivers().forEach(i=>i.track?.stop()),this.pc.close(),this.pc=null),this.video&&(this.video.srcObject=null),this.notify("stopped")}}const M1=2e3,D1=3e3;function sp({sessionInfo:u,label:i,forceMute:c=!1,telemetryFrame:r,batteryConfig:f}){const h=E.useRef(null),m=E.useRef(null),b=E.useRef(null),[y,v]=E.useState("idle"),[T,S]=E.useState(null),[C,z]=E.useState(0),[H,k]=E.useState(!0),Y=r?.sensors,L=Y?.batteryChargeMah??null,q=Y?.wheelOvercurrents||null,Q=!!(q&&Object.values(q).some($=>!!$)),P=E.useCallback(()=>{clearTimeout(m.current),m.current=setTimeout(()=>z(Date.now()),M1)},[]),ye=E.useCallback(($=0)=>{if(c)return;clearTimeout(b.current);const Te=()=>{clearTimeout(b.current),b.current=setTimeout(()=>{c||xe()},D1)},xe=async()=>{const Ue=h.current;if(Ue)try{Ue.muted=!1,await Ue.play(),k(!1)}catch{Ue.muted=!0,k(!0),Te()}};b.current=setTimeout(xe,$)},[c]);E.useEffect(()=>()=>{clearTimeout(m.current),clearTimeout(b.current)},[]),E.useEffect(()=>{y==="playing"&&ye(0)},[y,ye]),E.useEffect(()=>{if(!u?.url||!h.current)return;let $=!0,Te;const xe=setTimeout(()=>k(!0),0),Ue=(Xe,We)=>{$&&(v(Xe),S(We||null),["error","failed","disconnected","closed"].includes(Xe)&&P())};return Te=new z1({url:u.url,token:u.token,video:h.current,onStatus:Ue}),Te.start().catch(Xe=>{$&&(v("error"),S(Xe.message),P())}),()=>{$=!1,clearTimeout(xe),Te?.stop()}},[u?.url,u?.token,C,P]),E.useEffect(()=>{y==="stopped"&&u?.url&&P()},[y,u?.url,P]);const Re=u?.url?y==="error"?`Error: ${T||"unknown"}`:T?`${y} (${T})`:y:"waiting";return p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsxs("div",{className:"relative w-full overflow-hidden rounded-sm bg-black aspect-video",children:[p.jsx("video",{ref:h,muted:c||H,playsInline:!0,autoPlay:!0,controls:!1,className:"h-full w-full object-contain"}),p.jsx(w1,{frame:r}),p.jsx(U1,{active:Q})]}),p.jsx(j1,{charge:L,config:f,label:i,status:Re})]})}function j1({charge:u,config:i,label:c,status:r}){const f=i?.Full,h=i?.Warn,m=i?.Urgent??null;if(u==null||f==null||h==null)return p.jsxs("div",{className:"rounded-sm bg-[#1e1e1e] px-1 py-1 text-sm text-slate-200",children:[p.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400",children:[p.jsx("span",{children:c}),p.jsx("span",{children:r})]}),p.jsx("p",{className:"mt-1 text-xs text-slate-400",children:"Battery telemetry unavailable"})]});const b=f-h;if(b<=0)return null;const y=(u-h)/b,v=Math.min(1,Math.max(0,y)),T=Math.round(v*100),S=`${T}%`,C=y<=0,z=m!=null&&u<=m,H=C?"bg-red-500 animate-pulse":z?"bg-amber-400":"bg-emerald-500";return p.jsxs("div",{className:"space-y-2 rounded-sm bg-[#1e1e1e] px-1 py-1 text-sm text-slate-200",children:[p.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400",children:[p.jsx("span",{children:c}),p.jsx("span",{children:r})]}),p.jsxs("div",{className:"relative h-4 w-full rounded-full bg-slate-800",children:[p.jsx("div",{className:`h-full rounded-full transition-[width] ${H}`,style:{width:`${T}%`}}),p.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-semibold text-black/80",children:S})]})]})}function w1({frame:u}){const c=u?.sensors?.bumpsAndWheelDrops||{},[r,f]=E.useState(()=>Date.now());E.useEffect(()=>{const y=setInterval(()=>f(Date.now()),150);return()=>clearInterval(y)},[]);const h=u?.receivedAt?r-u.receivedAt<200:!1,m=[{label:"B-L",active:c.bumpLeft},{label:"B-R",active:c.bumpRight}],b=[{label:"Drop L",active:c.wheelDropLeft},{label:"Drop R",active:c.wheelDropRight}];return p.jsxs("div",{className:"pointer-events-none absolute inset-0 flex flex-col justify-between p-1 text-[0.65rem] text-slate-200",children:[p.jsxs("div",{className:"flex items-center justify-between gap-1",children:[p.jsxs("div",{className:"flex items-center gap-1 text-[0.55rem] text-slate-400",children:[p.jsx("span",{className:`h-2 w-2 rounded-full ${h?"bg-emerald-300 shadow-[0_0_4px_rgba(16,185,129,0.8)]":"bg-slate-700"}`}),p.jsx("span",{children:"sensor"})]}),p.jsx("div",{className:"flex gap-1",children:m.map(y=>p.jsx(xm,{label:y.label,active:y.active},y.label))})]}),p.jsx("div",{className:"flex justify-end gap-1",children:b.map(y=>p.jsx(xm,{label:y.label,active:y.active},y.label))})]})}function xm({label:u,active:i}){return p.jsx("span",{className:`rounded-sm px-1 py-0.5 text-[0.55rem] ${i?"bg-emerald-500/30 text-emerald-100":"bg-black/40 text-slate-500"}`,children:u})}function U1({active:u}){return u?p.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-red-900/60",children:p.jsx("div",{className:"text-center text-sm font-semibold text-red-100 animate-pulse",children:"Overcurrent"})}):null}function Xr(){const{session:u}=fn(),i=u?.assignment?.roverId,c=up(i?[i]:[]),r=i?c[i]:null,f=Br(i),m=(i&&u?.roster?u.roster.find(b=>String(b.id)===String(i)):null)?.battery??null;return p.jsx("section",{className:"rounded-sm bg-[#242a32] p-1",children:i?p.jsx("div",{className:"w-full",children:p.jsx(sp,{sessionInfo:r,label:i,muted:!1,telemetryFrame:f,batteryConfig:m})}):p.jsx("p",{className:"text-sm text-slate-400",children:"Assign a rover to view the video feed."})})}const B1=[{key:"start",label:"Start OI"},{key:"safe",label:"Safe"},{key:"full",label:"Full"},{key:"passive",label:"Passive"},{key:"dock",label:"Dock"}];function L1(){const{roverId:u,sendOiCommand:i}=Bu(),c=ei(),r=!!u,f=E.useMemo(()=>[{key:"start",label:"Enable stream",enable:!0},{key:"stop",label:"Disable stream",enable:!1}],[]),h=m=>{u&&c.emit("command",{roverId:u,type:"sensorStream",data:{sensorStream:{enable:m}}})};return p.jsxs("div",{className:"space-y-1",children:[p.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[p.jsx("p",{className:"text-xs text-slate-400",children:"Manual OI commands"}),p.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:B1.map(m=>p.jsx("button",{type:"button",onClick:()=>i(m.key),disabled:!r,className:"rounded-sm bg-black/40 px-1 py-0.5 text-xs text-slate-200 disabled:opacity-30",children:m.label},m.key))})]}),p.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[p.jsx("p",{className:"text-xs text-slate-400",children:"Sensor stream"}),p.jsx("div",{className:"mt-1 flex gap-1",children:f.map(m=>p.jsx("button",{type:"button",onClick:()=>h(m.enable),disabled:!r,className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-xs text-slate-200 disabled:opacity-30",children:m.label},m.key))}),!r&&p.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"Assign a rover to toggle streams."})]}),p.jsx(kr,{}),p.jsx(Lu,{})]})}function H1({layout:u}){const i={desktop:["Use WASD + Shift to drive. Video must stay focused.","Macros on the left prep the rover before moving.","Switch tabs on the right for telemetry, room, and advanced tools."],"mobile-portrait":["Keep joystick centered when not driving.","Auxiliary buttons sit beside the joystick – use them carefully.","Scroll to access drive/telemetry if screen space is limited."],"mobile-landscape":["Joystick and video are side by side for game-style control.","Rotate back to portrait if you need admin controls quickly.","Tabs are desktop-only; mobile shows sections stacked."]},c=i[u]||i.desktop;return p.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[p.jsx("p",{className:"text-sm text-slate-400",children:"Help"}),p.jsx("ul",{className:"mt-1 space-y-1 text-sm",children:c.map(r=>p.jsx("li",{className:"rounded-sm bg-black/30 px-1 py-1 text-slate-200",children:r},r))})]})}function Eu({active:u,onClick:i,children:c}){return p.jsx("button",{type:"button",onClick:i,className:`flex-1 rounded-sm px-1 py-1 text-xs font-semibold ${u?"bg-slate-100 text-slate-900":"bg-black/30 text-slate-300"}`,children:c})}function q1(){return p.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[p.jsx("p",{className:"text-xs text-slate-400",children:"Room controls"}),p.jsx("p",{className:"text-sm text-slate-200",children:"Coming soon: lighting, docks, and environmental toggles."})]})}function Y1({layout:u}){const[i,c]=E.useState("telemetry");return p.jsxs("section",{className:"rounded-sm bg-[#1a1d23] p-1 text-base text-slate-100",children:[p.jsxs("div",{className:"flex gap-1",children:[p.jsx(Eu,{active:i==="telemetry",onClick:()=>c("telemetry"),children:"Rover Controls"}),p.jsx(Eu,{active:i==="room",onClick:()=>c("room"),children:"Room Controls"}),p.jsx(Eu,{active:i==="advanced",onClick:()=>c("advanced"),children:"Advanced"}),p.jsx(Eu,{active:i==="help",onClick:()=>c("help"),children:"Help"})]}),p.jsxs("div",{className:"mt-1 space-y-1",children:[i==="telemetry"&&p.jsxs("div",{className:"space-y-1",children:[p.jsx(Hr,{}),p.jsx(Lr,{})]}),i==="room"&&p.jsxs("div",{className:"space-y-1",children:[p.jsx(qr,{}),p.jsx(q1,{})]}),i==="advanced"&&p.jsx(L1,{}),i==="help"&&p.jsx(H1,{layout:u})]})]})}function k1(){const[u,i]=E.useState(()=>typeof window>"u"||window.innerWidth>=1024?"desktop":window.innerWidth>window.innerHeight?"mobile-landscape":"mobile-portrait");return E.useEffect(()=>{function c(){if(typeof window>"u")return;const{innerWidth:r,innerHeight:f}=window;r>=1024?i("desktop"):r>f?i("mobile-landscape"):i("mobile-portrait")}return c(),window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]),u}function X1({layout:u}){return p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsxs("section",{className:"grid grid-cols-[minmax(0,1.8fr)_minmax(0,1fr)] gap-1",children:[p.jsx(Xr,{}),p.jsx(Y1,{layout:u})]}),p.jsxs("section",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-1",children:[p.jsx(Lu,{}),p.jsx(Yr,{})]})]})}function G1(){return p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsx(Xr,{}),p.jsx(C1,{}),p.jsx(Hr,{}),p.jsx(Lr,{}),p.jsx(kr,{}),p.jsx(Lu,{}),p.jsx(qr,{}),p.jsx(Yr,{})]})}function V1(){return p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsxs("section",{className:"grid grid-cols-[minmax(0,0.7fr)_minmax(0,2.1fr)_minmax(0,0.7fr)] gap-1",children:[p.jsx("div",{className:"flex flex-col gap-1",children:p.jsx(ip,{})}),p.jsx(Xr,{}),p.jsx("div",{className:"flex flex-col gap-1",children:p.jsx(ap,{})})]}),p.jsx(qr,{}),p.jsx(Hr,{}),p.jsxs("section",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-1",children:[p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsx(kr,{}),p.jsx(Lu,{})]}),p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsx(Yr,{}),p.jsx(Lr,{})]})]})]})}function Q1(){const u=k1(),i=u==="desktop"?p.jsx(X1,{layout:u}):u==="mobile-landscape"?p.jsx(V1,{}):p.jsx(G1,{});return p.jsx("div",{className:"min-h-screen bg-black text-slate-50",children:p.jsxs(p1,{children:[p.jsx("main",{className:"flex w-full flex-col gap-1 px-1 py-1 text-base",children:i}),p.jsx(g1,{})]})})}function Z1(){const{session:u,setRole:i,subscribeAll:c}=fn(),[r,f]=E.useState(!1);return E.useEffect(()=>{let h=!1;async function m(){try{u?.role!=="spectator"&&await i("spectator"),await c(),h||f(!0)}catch(b){console.error("Failed to enter spectator mode",b)}}return m(),()=>{h=!0}},[u?.role,i,c]),r}function K1({connected:u,ready:i,rosterCount:c}){return p.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[p.jsx("span",{className:`rounded-full px-3 py-1 font-semibold ${u?"bg-emerald-500/20 text-emerald-200":"bg-red-500/20 text-red-200"}`,children:u?"Connected":"Disconnected"}),p.jsxs("span",{className:`rounded-full px-3 py-1 ${i?"bg-blue-600/40 text-blue-100":"bg-slate-700 text-slate-200"}`,children:["Spectator mode ",i?"active":"pending…"]}),p.jsxs("span",{className:"rounded-full bg-slate-800 px-3 py-1 text-slate-200",children:["Rovers: ",c]})]})}function J1({logs:u}){return p.jsxs("section",{className:"rounded-3xl border border-slate-800 bg-slate-900/70 p-4",children:[p.jsxs("header",{className:"mb-3 flex items-center justify-between",children:[p.jsx("h2",{className:"text-lg font-semibold text-white",children:"Server logs"}),p.jsxs("span",{className:"text-xs uppercase tracking-[0.3em] text-slate-500",children:["latest ",u.length]})]}),p.jsx("div",{className:"h-60 overflow-y-auto rounded-2xl bg-slate-950/40 p-3 text-xs font-mono text-slate-300",children:u.length===0?p.jsx("p",{children:"No log entries yet."}):u.slice().reverse().map(i=>p.jsxs("div",{className:"mb-2",children:[p.jsx("span",{className:"text-slate-500",children:i.timestamp})," ",p.jsxs("span",{className:"text-cyan-300",children:["[",i.level,"]"]})," ",i.label&&p.jsxs("span",{className:"text-pink-300",children:["[",i.label,"]"]})," ",p.jsx("span",{children:i.message})]},i.id))})]})}function $1(u={}){return Object.entries(u).map(([i,c])=>({key:i,value:typeof c=="object"?JSON.stringify(c):c}))}function W1({rover:u,frame:i,videoInfo:c}){const r=$1(i?.sensors);return p.jsxs("article",{className:"space-y-4 rounded-3xl border border-slate-800 bg-slate-900/70 p-5",children:[p.jsxs("header",{className:"flex flex-col gap-1",children:[p.jsx("h3",{className:"text-2xl font-semibold text-white",children:u.name}),p.jsx("p",{className:"text-sm text-slate-400",children:i?.receivedAt?`Updated ${new Date(i.receivedAt).toLocaleTimeString()}`:"Waiting for telemetry…"})]}),p.jsx(sp,{sessionInfo:c,label:u.name,forceMute:!0}),p.jsxs("section",{className:"rounded-2xl border border-slate-800/80 bg-slate-950/50 p-4",children:[p.jsx("p",{className:"text-xs uppercase tracking-[0.3em] text-slate-500",children:"Telemetry"}),r.length===0?p.jsx("p",{className:"mt-3 text-sm text-slate-400",children:"No sensor data yet."}):p.jsx("dl",{className:"mt-3 grid gap-2 text-sm text-slate-200",children:r.map(({key:f,value:h})=>p.jsxs("div",{className:"flex justify-between gap-4",children:[p.jsx("dt",{className:"text-slate-500",children:f}),p.jsx("dd",{className:"text-right font-semibold text-white",children:h})]},f))})]})]})}function F1(){const{connected:u,session:i,logs:c}=fn(),r=Z1(),f=np(),h=i?.roster??[],m=up(h.map(y=>y.id)),b=E.useMemo(()=>({connected:u,ready:r,rosterCount:h.length}),[u,r,h.length]);return p.jsx("div",{className:"min-h-screen bg-slate-950 text-slate-50",children:p.jsxs("main",{className:"mx-auto flex max-w-7xl flex-col gap-6 px-6 py-10",children:[p.jsxs("header",{className:"space-y-3",children:[p.jsx("h1",{className:"text-4xl font-semibold text-white",children:"Spectator Console"}),p.jsx("p",{className:"text-slate-400",children:"Live rover telemetry & logs. This view is read-only."}),p.jsx(K1,{...b})]}),p.jsx("section",{className:"grid gap-6 lg:grid-cols-3",children:h.length===0?p.jsx("p",{className:"col-span-full text-slate-400",children:"No rovers registered."}):h.map(y=>p.jsx(W1,{rover:y,frame:f[y.id],videoInfo:m[y.id]},y.id))}),p.jsx(J1,{logs:c})]})})}Y0.createRoot(document.getElementById("root")).render(p.jsx(E.StrictMode,{children:p.jsx(a1,{children:p.jsx(u1,{children:p.jsx(s1,{children:p.jsx(tg,{children:p.jsxs(Dv,{children:[p.jsx(vr,{path:"/",element:p.jsx(Q1,{})}),p.jsx(vr,{path:"/spectate",element:p.jsx(F1,{})})]})})})})})}));
|