mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
12 lines
315 KiB
JavaScript
12 lines
315 KiB
JavaScript
(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const y of d.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&r(y)}).observe(document,{childList:!0,subtree:!0});function s(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function r(f){if(f.ep)return;f.ep=!0;const d=s(f);fetch(f.href,d)}})();var ar={exports:{}},Ga={};var nm;function Y0(){if(nm)return Ga;nm=1;var i=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function s(r,f,d){var y=null;if(d!==void 0&&(y=""+d),f.key!==void 0&&(y=""+f.key),"key"in f){d={};for(var b in f)b!=="key"&&(d[b]=f[b])}else d=f;return f=d.ref,{$$typeof:i,type:r,key:y,ref:f!==void 0?f:null,props:d}}return Ga.Fragment=a,Ga.jsx=s,Ga.jsxs=s,Ga}var lm;function k0(){return lm||(lm=1,ar.exports=Y0()),ar.exports}var m=k0(),ir={exports:{}},te={};var am;function V0(){if(am)return te;am=1;var i=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),y=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),D=Symbol.iterator;function R(E){return E===null||typeof E!="object"?null:(E=D&&E[D]||E["@@iterator"],typeof E=="function"?E:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},V=Object.assign,Y={};function k(E,H,G){this.props=E,this.context=H,this.refs=Y,this.updater=G||M}k.prototype.isReactComponent={},k.prototype.setState=function(E,H){if(typeof E!="object"&&typeof E!="function"&&E!=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,E,H,"setState")},k.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function B(){}B.prototype=k.prototype;function q(E,H,G){this.props=E,this.context=H,this.refs=Y,this.updater=G||M}var Z=q.prototype=new B;Z.constructor=q,V(Z,k.prototype),Z.isPureReactComponent=!0;var I=Array.isArray;function ae(){}var Q={H:null,A:null,T:null,S:null},ue=Object.prototype.hasOwnProperty;function ee(E,H,G){var J=G.ref;return{$$typeof:i,type:E,key:H,ref:J!==void 0?J:null,props:G}}function Me(E,H){return ee(E.type,H,E.props)}function Ve(E){return typeof E=="object"&&E!==null&&E.$$typeof===i}function Fe(E){var H={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(G){return H[G]})}var kn=/\/+/g;function Xt(E,H){return typeof E=="object"&&E!==null&&E.key!=null?Fe(""+E.key):H.toString(36)}function Ot(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(ae,ae):(E.status="pending",E.then(function(H){E.status==="pending"&&(E.status="fulfilled",E.value=H)},function(H){E.status==="pending"&&(E.status="rejected",E.reason=H)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function j(E,H,G,J,ne){var se=typeof E;(se==="undefined"||se==="boolean")&&(E=null);var ve=!1;if(E===null)ve=!0;else switch(se){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(E.$$typeof){case i:case a:ve=!0;break;case A:return ve=E._init,j(ve(E._payload),H,G,J,ne)}}if(ve)return ne=ne(E),ve=J===""?"."+Xt(E,0):J,I(ne)?(G="",ve!=null&&(G=ve.replace(kn,"$&/")+"/"),j(ne,H,G,"",function(Wl){return Wl})):ne!=null&&(Ve(ne)&&(ne=Me(ne,G+(ne.key==null||E&&E.key===ne.key?"":(""+ne.key).replace(kn,"$&/")+"/")+ve)),H.push(ne)),1;ve=0;var Ie=J===""?".":J+":";if(I(E))for(var we=0;we<E.length;we++)J=E[we],se=Ie+Xt(J,we),ve+=j(J,H,G,se,ne);else if(we=R(E),typeof we=="function")for(E=we.call(E),we=0;!(J=E.next()).done;)J=J.value,se=Ie+Xt(J,we++),ve+=j(J,H,G,se,ne);else if(se==="object"){if(typeof E.then=="function")return j(Ot(E),H,G,J,ne);throw H=String(E),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return ve}function X(E,H,G){if(E==null)return E;var J=[],ne=0;return j(E,J,"","",function(se){return H.call(G,se,ne++)}),J}function P(E){if(E._status===-1){var H=E._result;H=H(),H.then(function(G){(E._status===0||E._status===-1)&&(E._status=1,E._result=G)},function(G){(E._status===0||E._status===-1)&&(E._status=2,E._result=G)}),E._status===-1&&(E._status=0,E._result=H)}if(E._status===1)return E._result.default;throw E._result}var xe=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=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(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)},Ae={map:X,forEach:function(E,H,G){X(E,function(){H.apply(this,arguments)},G)},count:function(E){var H=0;return X(E,function(){H++}),H},toArray:function(E){return X(E,function(H){return H})||[]},only:function(E){if(!Ve(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return te.Activity=T,te.Children=Ae,te.Component=k,te.Fragment=s,te.Profiler=f,te.PureComponent=q,te.StrictMode=r,te.Suspense=p,te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Q,te.__COMPILER_RUNTIME={__proto__:null,c:function(E){return Q.H.useMemoCache(E)}},te.cache=function(E){return function(){return E.apply(null,arguments)}},te.cacheSignal=function(){return null},te.cloneElement=function(E,H,G){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var J=V({},E.props),ne=E.key;if(H!=null)for(se in H.key!==void 0&&(ne=""+H.key),H)!ue.call(H,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&H.ref===void 0||(J[se]=H[se]);var se=arguments.length-2;if(se===1)J.children=G;else if(1<se){for(var ve=Array(se),Ie=0;Ie<se;Ie++)ve[Ie]=arguments[Ie+2];J.children=ve}return ee(E.type,ne,J)},te.createContext=function(E){return E={$$typeof:y,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:d,_context:E},E},te.createElement=function(E,H,G){var J,ne={},se=null;if(H!=null)for(J in H.key!==void 0&&(se=""+H.key),H)ue.call(H,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(ne[J]=H[J]);var ve=arguments.length-2;if(ve===1)ne.children=G;else if(1<ve){for(var Ie=Array(ve),we=0;we<ve;we++)Ie[we]=arguments[we+2];ne.children=Ie}if(E&&E.defaultProps)for(J in ve=E.defaultProps,ve)ne[J]===void 0&&(ne[J]=ve[J]);return ee(E,se,ne)},te.createRef=function(){return{current:null}},te.forwardRef=function(E){return{$$typeof:b,render:E}},te.isValidElement=Ve,te.lazy=function(E){return{$$typeof:A,_payload:{_status:-1,_result:E},_init:P}},te.memo=function(E,H){return{$$typeof:v,type:E,compare:H===void 0?null:H}},te.startTransition=function(E){var H=Q.T,G={};Q.T=G;try{var J=E(),ne=Q.S;ne!==null&&ne(G,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(ae,xe)}catch(se){xe(se)}finally{H!==null&&G.types!==null&&(H.types=G.types),Q.T=H}},te.unstable_useCacheRefresh=function(){return Q.H.useCacheRefresh()},te.use=function(E){return Q.H.use(E)},te.useActionState=function(E,H,G){return Q.H.useActionState(E,H,G)},te.useCallback=function(E,H){return Q.H.useCallback(E,H)},te.useContext=function(E){return Q.H.useContext(E)},te.useDebugValue=function(){},te.useDeferredValue=function(E,H){return Q.H.useDeferredValue(E,H)},te.useEffect=function(E,H){return Q.H.useEffect(E,H)},te.useEffectEvent=function(E){return Q.H.useEffectEvent(E)},te.useId=function(){return Q.H.useId()},te.useImperativeHandle=function(E,H,G){return Q.H.useImperativeHandle(E,H,G)},te.useInsertionEffect=function(E,H){return Q.H.useInsertionEffect(E,H)},te.useLayoutEffect=function(E,H){return Q.H.useLayoutEffect(E,H)},te.useMemo=function(E,H){return Q.H.useMemo(E,H)},te.useOptimistic=function(E,H){return Q.H.useOptimistic(E,H)},te.useReducer=function(E,H,G){return Q.H.useReducer(E,H,G)},te.useRef=function(E){return Q.H.useRef(E)},te.useState=function(E){return Q.H.useState(E)},te.useSyncExternalStore=function(E,H,G){return Q.H.useSyncExternalStore(E,H,G)},te.useTransition=function(){return Q.H.useTransition()},te.version="19.2.0",te}var im;function jr(){return im||(im=1,ir.exports=V0()),ir.exports}var g=jr(),ur={exports:{}},Qa={},sr={exports:{}},cr={};var um;function X0(){return um||(um=1,(function(i){function a(j,X){var P=j.length;j.push(X);e:for(;0<P;){var xe=P-1>>>1,Ae=j[xe];if(0<f(Ae,X))j[xe]=X,j[P]=Ae,P=xe;else break e}}function s(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var X=j[0],P=j.pop();if(P!==X){j[0]=P;e:for(var xe=0,Ae=j.length,E=Ae>>>1;xe<E;){var H=2*(xe+1)-1,G=j[H],J=H+1,ne=j[J];if(0>f(G,P))J<Ae&&0>f(ne,G)?(j[xe]=ne,j[J]=P,xe=J):(j[xe]=G,j[H]=P,xe=H);else if(J<Ae&&0>f(ne,P))j[xe]=ne,j[J]=P,xe=J;else break e}}return X}function f(j,X){var P=j.sortIndex-X.sortIndex;return P!==0?P:j.id-X.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;i.unstable_now=function(){return d.now()}}else{var y=Date,b=y.now();i.unstable_now=function(){return y.now()-b}}var p=[],v=[],A=1,T=null,D=3,R=!1,M=!1,V=!1,Y=!1,k=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;function Z(j){for(var X=s(v);X!==null;){if(X.callback===null)r(v);else if(X.startTime<=j)r(v),X.sortIndex=X.expirationTime,a(p,X);else break;X=s(v)}}function I(j){if(V=!1,Z(j),!M)if(s(p)!==null)M=!0,ae||(ae=!0,Fe());else{var X=s(v);X!==null&&Ot(I,X.startTime-j)}}var ae=!1,Q=-1,ue=5,ee=-1;function Me(){return Y?!0:!(i.unstable_now()-ee<ue)}function Ve(){if(Y=!1,ae){var j=i.unstable_now();ee=j;var X=!0;try{e:{M=!1,V&&(V=!1,B(Q),Q=-1),R=!0;var P=D;try{t:{for(Z(j),T=s(p);T!==null&&!(T.expirationTime>j&&Me());){var xe=T.callback;if(typeof xe=="function"){T.callback=null,D=T.priorityLevel;var Ae=xe(T.expirationTime<=j);if(j=i.unstable_now(),typeof Ae=="function"){T.callback=Ae,Z(j),X=!0;break t}T===s(p)&&r(p),Z(j)}else r(p);T=s(p)}if(T!==null)X=!0;else{var E=s(v);E!==null&&Ot(I,E.startTime-j),X=!1}}break e}finally{T=null,D=P,R=!1}X=void 0}}finally{X?Fe():ae=!1}}}var Fe;if(typeof q=="function")Fe=function(){q(Ve)};else if(typeof MessageChannel<"u"){var kn=new MessageChannel,Xt=kn.port2;kn.port1.onmessage=Ve,Fe=function(){Xt.postMessage(null)}}else Fe=function(){k(Ve,0)};function Ot(j,X){Q=k(function(){j(i.unstable_now())},X)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(j){j.callback=null},i.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"):ue=0<j?Math.floor(1e3/j):5},i.unstable_getCurrentPriorityLevel=function(){return D},i.unstable_next=function(j){switch(D){case 1:case 2:case 3:var X=3;break;default:X=D}var P=D;D=X;try{return j()}finally{D=P}},i.unstable_requestPaint=function(){Y=!0},i.unstable_runWithPriority=function(j,X){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var P=D;D=j;try{return X()}finally{D=P}},i.unstable_scheduleCallback=function(j,X,P){var xe=i.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?xe+P:xe):P=xe,j){case 1:var Ae=-1;break;case 2:Ae=250;break;case 5:Ae=1073741823;break;case 4:Ae=1e4;break;default:Ae=5e3}return Ae=P+Ae,j={id:A++,callback:X,priorityLevel:j,startTime:P,expirationTime:Ae,sortIndex:-1},P>xe?(j.sortIndex=P,a(v,j),s(p)===null&&j===s(v)&&(V?(B(Q),Q=-1):V=!0,Ot(I,P-xe))):(j.sortIndex=Ae,a(p,j),M||R||(M=!0,ae||(ae=!0,Fe()))),j},i.unstable_shouldYield=Me,i.unstable_wrapCallback=function(j){var X=D;return function(){var P=D;D=X;try{return j.apply(this,arguments)}finally{D=P}}}})(cr)),cr}var sm;function G0(){return sm||(sm=1,sr.exports=X0()),sr.exports}var rr={exports:{}},We={};var cm;function Q0(){if(cm)return We;cm=1;var i=jr();function a(p){var v="https://react.dev/errors/"+p;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var A=2;A<arguments.length;A++)v+="&args[]="+encodeURIComponent(arguments[A])}return"Minified React error #"+p+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var r={d:{f:s,r:function(){throw Error(a(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},f=Symbol.for("react.portal");function d(p,v,A){var T=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:T==null?null:""+T,children:p,containerInfo:v,implementation:A}}var y=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function b(p,v){if(p==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return We.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,We.createPortal=function(p,v){var A=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(a(299));return d(p,v,null,A)},We.flushSync=function(p){var v=y.T,A=r.p;try{if(y.T=null,r.p=2,p)return p()}finally{y.T=v,r.p=A,r.d.f()}},We.preconnect=function(p,v){typeof p=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,r.d.C(p,v))},We.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},We.preinit=function(p,v){if(typeof p=="string"&&v&&typeof v.as=="string"){var A=v.as,T=b(A,v.crossOrigin),D=typeof v.integrity=="string"?v.integrity:void 0,R=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;A==="style"?r.d.S(p,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:T,integrity:D,fetchPriority:R}):A==="script"&&r.d.X(p,{crossOrigin:T,integrity:D,fetchPriority:R,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},We.preinitModule=function(p,v){if(typeof p=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var A=b(v.as,v.crossOrigin);r.d.M(p,{crossOrigin:A,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&r.d.M(p)},We.preload=function(p,v){if(typeof p=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var A=v.as,T=b(A,v.crossOrigin);r.d.L(p,A,{crossOrigin:T,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})}},We.preloadModule=function(p,v){if(typeof p=="string")if(v){var A=b(v.as,v.crossOrigin);r.d.m(p,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:A,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else r.d.m(p)},We.requestFormReset=function(p){r.d.r(p)},We.unstable_batchedUpdates=function(p,v){return p(v)},We.useFormState=function(p,v,A){return y.H.useFormState(p,v,A)},We.useFormStatus=function(){return y.H.useHostTransitionStatus()},We.version="19.2.0",We}var rm;function Z0(){if(rm)return rr.exports;rm=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(a){console.error(a)}}return i(),rr.exports=Q0(),rr.exports}var om;function K0(){if(om)return Qa;om=1;var i=G0(),a=jr(),s=Z0();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 d(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 y(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 p(e){if(d(e)!==e)throw Error(r(188))}function v(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(r(188));return t!==e?null:e}for(var n=e,l=t;;){var u=n.return;if(u===null)break;var c=u.alternate;if(c===null){if(l=u.return,l!==null){n=l;continue}break}if(u.child===c.child){for(c=u.child;c;){if(c===n)return p(u),e;if(c===l)return p(u),t;c=c.sibling}throw Error(r(188))}if(n.return!==l.return)n=u,l=c;else{for(var o=!1,h=u.child;h;){if(h===n){o=!0,n=u,l=c;break}if(h===l){o=!0,l=u,n=c;break}h=h.sibling}if(!o){for(h=c.child;h;){if(h===n){o=!0,n=c,l=u;break}if(h===l){o=!0,l=c,n=u;break}h=h.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 A(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=A(e),t!==null)return t;e=e.sibling}return null}var T=Object.assign,D=Symbol.for("react.element"),R=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),q=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),ue=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),Me=Symbol.for("react.memo_cache_sentinel"),Ve=Symbol.iterator;function Fe(e){return e===null||typeof e!="object"?null:(e=Ve&&e[Ve]||e["@@iterator"],typeof e=="function"?e:null)}var kn=Symbol.for("react.client.reference");function Xt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===kn?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case V:return"Fragment";case k:return"Profiler";case Y:return"StrictMode";case I:return"Suspense";case ae:return"SuspenseList";case ee:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case M:return"Portal";case q:return e.displayName||"Context";case B:return(e._context.displayName||"Context")+".Consumer";case Z:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Q:return t=e.displayName||null,t!==null?t:Xt(e.type)||"Memo";case ue:t=e._payload,e=e._init;try{return Xt(e(t))}catch{}}return null}var Ot=Array.isArray,j=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},xe=[],Ae=-1;function E(e){return{current:e}}function H(e){0>Ae||(e.current=xe[Ae],xe[Ae]=null,Ae--)}function G(e,t){Ae++,xe[Ae]=e.current,e.current=t}var J=E(null),ne=E(null),se=E(null),ve=E(null);function Ie(e,t){switch(G(se,t),G(ne,e),G(J,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Th(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Th(t),e=Ch(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(J),G(J,e)}function we(){H(J),H(ne),H(se)}function Wl(e){e.memoizedState!==null&&G(ve,e);var t=J.current,n=Ch(t,e.type);t!==n&&(G(ne,e),G(J,n))}function ti(e){ne.current===e&&(H(J),H(ne)),ve.current===e&&(H(ve),Ya._currentValue=P)}var Yu,Pr;function Vn(e){if(Yu===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Yu=t&&t[1]||"",Pr=-1<n.stack.indexOf(`
|
||
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||
`+Yu+e+Pr}var ku=!1;function Vu(e,t){if(!e||ku)return"";ku=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var L=function(){throw Error()};if(Object.defineProperty(L.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(L,[])}catch(z){var O=z}Reflect.construct(e,[],L)}else{try{L.call()}catch(z){O=z}e.call(L.prototype)}}else{try{throw Error()}catch(z){O=z}(L=e())&&typeof L.catch=="function"&&L.catch(function(){})}}catch(z){if(z&&O&&typeof z.stack=="string")return[z.stack,O.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=l.DetermineComponentFrameRoot(),o=c[0],h=c[1];if(o&&h){var x=o.split(`
|
||
`),N=h.split(`
|
||
`);for(u=l=0;l<x.length&&!x[l].includes("DetermineComponentFrameRoot");)l++;for(;u<N.length&&!N[u].includes("DetermineComponentFrameRoot");)u++;if(l===x.length||u===N.length)for(l=x.length-1,u=N.length-1;1<=l&&0<=u&&x[l]!==N[u];)u--;for(;1<=l&&0<=u;l--,u--)if(x[l]!==N[u]){if(l!==1||u!==1)do if(l--,u--,0>u||x[l]!==N[u]){var w=`
|
||
`+x[l].replace(" at new "," at ");return e.displayName&&w.includes("<anonymous>")&&(w=w.replace("<anonymous>",e.displayName)),w}while(1<=l&&0<=u);break}}}finally{ku=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Vn(n):""}function vp(e,t){switch(e.tag){case 26:case 27:case 5:return Vn(e.type);case 16:return Vn("Lazy");case 13:return e.child!==t&&t!==null?Vn("Suspense Fallback"):Vn("Suspense");case 19:return Vn("SuspenseList");case 0:case 15:return Vu(e.type,!1);case 11:return Vu(e.type.render,!1);case 1:return Vu(e.type,!0);case 31:return Vn("Activity");default:return""}}function eo(e){try{var t="",n=null;do t+=vp(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=i.unstable_scheduleCallback,Qu=i.unstable_cancelCallback,gp=i.unstable_shouldYield,bp=i.unstable_requestPaint,st=i.unstable_now,xp=i.unstable_getCurrentPriorityLevel,to=i.unstable_ImmediatePriority,no=i.unstable_UserBlockingPriority,ni=i.unstable_NormalPriority,Sp=i.unstable_LowPriority,lo=i.unstable_IdlePriority,Ep=i.log,_p=i.unstable_setDisableYieldValue,Il=null,ct=null;function hn(e){if(typeof Ep=="function"&&_p(e),ct&&typeof ct.setStrictMode=="function")try{ct.setStrictMode(Il,e)}catch{}}var rt=Math.clz32?Math.clz32:Cp,Ap=Math.log,Tp=Math.LN2;function Cp(e){return e>>>=0,e===0?32:31-(Ap(e)/Tp|0)|0}var li=256,ai=262144,ii=4194304;function Xn(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 u=0,c=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var h=l&134217727;return h!==0?(l=h&~c,l!==0?u=Xn(l):(o&=h,o!==0?u=Xn(o):n||(n=h&~e,n!==0&&(u=Xn(n))))):(h=l&~c,h!==0?u=Xn(h):o!==0?u=Xn(o):n||(n=l&~e,n!==0&&(u=Xn(n)))),u===0?0:t!==0&&t!==u&&(t&c)===0&&(c=u&-u,n=t&-t,c>=n||c===32&&(n&4194048)!==0)?t:u}function Pl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Np(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 ao(){var e=ii;return ii<<=1,(ii&62914560)===0&&(ii=4194304),e}function Zu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ea(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Rp(e,t,n,l,u,c){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 h=e.entanglements,x=e.expirationTimes,N=e.hiddenUpdates;for(n=o&~n;0<n;){var w=31-rt(n),L=1<<w;h[w]=0,x[w]=-1;var O=N[w];if(O!==null)for(N[w]=null,w=0;w<O.length;w++){var z=O[w];z!==null&&(z.lane&=-536870913)}n&=~L}l!==0&&io(e,l,0),c!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=c&~(o&~t))}function io(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 uo(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-rt(n),u=1<<l;u&t|e[l]&t&&(e[l]|=t),n&=~u}}function so(e,t){var n=t&-t;return n=(n&42)!==0?1:Ku(n),(n&(e.suspendedLanes|t))!==0?0:n}function Ku(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 Ju(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function co(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:$h(e.type))}function ro(e,t){var n=X.p;try{return X.p=e,t()}finally{X.p=n}}var mn=Math.random().toString(36).slice(2),Qe="__reactFiber$"+mn,et="__reactProps$"+mn,ol="__reactContainer$"+mn,$u="__reactEvents$"+mn,Op="__reactListeners$"+mn,Mp="__reactHandles$"+mn,oo="__reactResources$"+mn,ta="__reactMarker$"+mn;function Fu(e){delete e[Qe],delete e[et],delete e[$u],delete e[Op],delete e[Mp]}function fl(e){var t=e[Qe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ol]||n[Qe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=wh(e);e!==null;){if(n=e[Qe])return n;e=wh(e)}return t}e=n,n=e.parentNode}return null}function dl(e){if(e=e[Qe]||e[ol]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function na(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function hl(e){var t=e[oo];return t||(t=e[oo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Xe(e){e[ta]=!0}var fo=new Set,ho={};function Gn(e,t){ml(e,t),ml(e+"Capture",t)}function ml(e,t){for(ho[e]=t,e=0;e<t.length;e++)fo.add(t[e])}var zp=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]*$"),mo={},po={};function Dp(e){return Xu.call(po,e)?!0:Xu.call(mo,e)?!1:zp.test(e)?po[e]=!0:(mo[e]=!0,!1)}function si(e,t,n){if(Dp(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 Gt(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 gt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function wp(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 u=l.get,c=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(o){n=""+o,c.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=yo(e)?"checked":"value";e._valueTracker=wp(e,t,""+e[t])}}function vo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=yo(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 jp=/[\n"\\]/g;function bt(e){return e.replace(jp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Iu(e,t,n,l,u,c,o,h){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=""+gt(t)):e.value!==""+gt(t)&&(e.value=""+gt(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?Pu(e,o,gt(t)):n!=null?Pu(e,o,gt(n)):l!=null&&e.removeAttribute("value"),u==null&&c!=null&&(e.defaultChecked=!!c),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+gt(h):e.removeAttribute("name")}function go(e,t,n,l,u,c,o,h){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Wu(e);return}n=n!=null?""+gt(n):"",t=t!=null?""+gt(t):n,h||t===e.value||(e.value=t),e.defaultValue=t}l=l??u,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=h?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 pl(e,t,n,l){if(e=e.options,t){t={};for(var u=0;u<n.length;u++)t["$"+n[u]]=!0;for(n=0;n<e.length;n++)u=t.hasOwnProperty("$"+e[n].value),e[n].selected!==u&&(e[n].selected=u),u&&l&&(e[n].defaultSelected=!0)}else{for(n=""+gt(n),t=null,u=0;u<e.length;u++){if(e[u].value===n){e[u].selected=!0,l&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function bo(e,t,n){if(t!=null&&(t=""+gt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+gt(n):""}function xo(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(r(92));if(Ot(l)){if(1<l.length)throw Error(r(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=gt(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),Wu(e)}function yl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Up=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 So(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||Up.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Eo(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 u in t)l=t[u],t.hasOwnProperty(u)&&n[u]!==l&&So(e,u,l)}else for(var c in t)t.hasOwnProperty(c)&&So(e,c,t[c])}function es(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 Bp=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"]]),Lp=/^[\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 Lp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Qt(){}var ts=null;function ns(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vl=null,gl=null;function _o(e){var t=dl(e);if(t&&(e=t.stateNode)){var n=e[et]||null;e:switch(e=t.stateNode,t.type){case"input":if(Iu(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="'+bt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var u=l[et]||null;if(!u)throw Error(r(90));Iu(l,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&vo(l)}break e;case"textarea":bo(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&pl(e,!!n.multiple,t,!1)}}}var ls=!1;function Ao(e,t,n){if(ls)return e(t,n);ls=!0;try{var l=e(t);return l}finally{if(ls=!1,(vl!==null||gl!==null)&&(Wi(),vl&&(t=vl,e=gl,gl=vl=null,_o(t),e)))for(t=0;t<e.length;t++)_o(e[t])}}function la(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 Zt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),as=!1;if(Zt)try{var aa={};Object.defineProperty(aa,"passive",{get:function(){as=!0}}),window.addEventListener("test",aa,aa),window.removeEventListener("test",aa,aa)}catch{as=!1}var pn=null,is=null,fi=null;function To(){if(fi)return fi;var e,t=is,n=t.length,l,u="value"in pn?pn.value:pn.textContent,c=u.length;for(e=0;e<n&&t[e]===u[e];e++);var o=n-e;for(l=1;l<=o&&t[n-l]===u[c-l];l++);return fi=u.slice(e,1<l?1-l:void 0)}function di(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 hi(){return!0}function Co(){return!1}function tt(e){function t(n,l,u,c,o){this._reactName=n,this._targetInst=u,this.type=l,this.nativeEvent=c,this.target=o,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(n=e[h],this[h]=n?n(c):c[h]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?hi:Co,this.isPropagationStopped=Co,this}return T(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=hi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=hi)},persist:function(){},isPersistent:hi}),t}var Qn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mi=tt(Qn),ia=T({},Qn,{view:0,detail:0}),Hp=tt(ia),us,ss,ua,pi=T({},ia,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rs,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!==ua&&(ua&&e.type==="mousemove"?(us=e.screenX-ua.screenX,ss=e.screenY-ua.screenY):ss=us=0,ua=e),us)},movementY:function(e){return"movementY"in e?e.movementY:ss}}),No=tt(pi),qp=T({},pi,{dataTransfer:0}),Yp=tt(qp),kp=T({},ia,{relatedTarget:0}),cs=tt(kp),Vp=T({},Qn,{animationName:0,elapsedTime:0,pseudoElement:0}),Xp=tt(Vp),Gp=T({},Qn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Qp=tt(Gp),Zp=T({},Qn,{data:0}),Ro=tt(Zp),Kp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Jp={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"},$p={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Fp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$p[e])?!!t[e]:!1}function rs(){return Fp}var Wp=T({},ia,{key:function(e){if(e.key){var t=Kp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=di(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Jp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rs,charCode:function(e){return e.type==="keypress"?di(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?di(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ip=tt(Wp),Pp=T({},pi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Oo=tt(Pp),ey=T({},ia,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rs}),ty=tt(ey),ny=T({},Qn,{propertyName:0,elapsedTime:0,pseudoElement:0}),ly=tt(ny),ay=T({},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}),iy=tt(ay),uy=T({},Qn,{newState:0,oldState:0}),sy=tt(uy),cy=[9,13,27,32],os=Zt&&"CompositionEvent"in window,sa=null;Zt&&"documentMode"in document&&(sa=document.documentMode);var ry=Zt&&"TextEvent"in window&&!sa,Mo=Zt&&(!os||sa&&8<sa&&11>=sa),zo=" ",Do=!1;function wo(e,t){switch(e){case"keyup":return cy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bl=!1;function oy(e,t){switch(e){case"compositionend":return jo(t);case"keypress":return t.which!==32?null:(Do=!0,zo);case"textInput":return e=t.data,e===zo&&Do?null:e;default:return null}}function fy(e,t){if(bl)return e==="compositionend"||!os&&wo(e,t)?(e=To(),fi=is=pn=null,bl=!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 Mo&&t.locale!=="ko"?null:t.data;default:return null}}var dy={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 Uo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!dy[e.type]:t==="textarea"}function Bo(e,t,n,l){vl?gl?gl.push(l):gl=[l]:vl=l,t=au(t,"onChange"),0<t.length&&(n=new mi("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var ca=null,ra=null;function hy(e){bh(e,0)}function yi(e){var t=na(e);if(vo(t))return e}function Lo(e,t){if(e==="change")return t}var Ho=!1;if(Zt){var fs;if(Zt){var ds="oninput"in document;if(!ds){var qo=document.createElement("div");qo.setAttribute("oninput","return;"),ds=typeof qo.oninput=="function"}fs=ds}else fs=!1;Ho=fs&&(!document.documentMode||9<document.documentMode)}function Yo(){ca&&(ca.detachEvent("onpropertychange",ko),ra=ca=null)}function ko(e){if(e.propertyName==="value"&&yi(ra)){var t=[];Bo(t,ra,e,ns(e)),Ao(hy,t)}}function my(e,t,n){e==="focusin"?(Yo(),ca=t,ra=n,ca.attachEvent("onpropertychange",ko)):e==="focusout"&&Yo()}function py(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yi(ra)}function yy(e,t){if(e==="click")return yi(t)}function vy(e,t){if(e==="input"||e==="change")return yi(t)}function gy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ot=typeof Object.is=="function"?Object.is:gy;function oa(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 u=n[l];if(!Xu.call(t,u)||!ot(e[u],t[u]))return!1}return!0}function Vo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xo(e,t){var n=Vo(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=Vo(n)}}function Go(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Go(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Qo(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 by=Zt&&"documentMode"in document&&11>=document.documentMode,xl=null,ms=null,fa=null,ps=!1;function Zo(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ps||xl==null||xl!==ri(l)||(l=xl,"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}),fa&&oa(fa,l)||(fa=l,l=au(ms,"onSelect"),0<l.length&&(t=new mi("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=xl)))}function Zn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sl={animationend:Zn("Animation","AnimationEnd"),animationiteration:Zn("Animation","AnimationIteration"),animationstart:Zn("Animation","AnimationStart"),transitionrun:Zn("Transition","TransitionRun"),transitionstart:Zn("Transition","TransitionStart"),transitioncancel:Zn("Transition","TransitionCancel"),transitionend:Zn("Transition","TransitionEnd")},ys={},Ko={};Zt&&(Ko=document.createElement("div").style,"AnimationEvent"in window||(delete Sl.animationend.animation,delete Sl.animationiteration.animation,delete Sl.animationstart.animation),"TransitionEvent"in window||delete Sl.transitionend.transition);function Kn(e){if(ys[e])return ys[e];if(!Sl[e])return e;var t=Sl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ko)return ys[e]=t[n];return e}var Jo=Kn("animationend"),$o=Kn("animationiteration"),Fo=Kn("animationstart"),xy=Kn("transitionrun"),Sy=Kn("transitionstart"),Ey=Kn("transitioncancel"),Wo=Kn("transitionend"),Io=new Map,vs="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(" ");vs.push("scrollEnd");function Mt(e,t){Io.set(e,t),Gn(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)},xt=[],El=0,gs=0;function gi(){for(var e=El,t=gs=El=0;t<e;){var n=xt[t];xt[t++]=null;var l=xt[t];xt[t++]=null;var u=xt[t];xt[t++]=null;var c=xt[t];if(xt[t++]=null,l!==null&&u!==null){var o=l.pending;o===null?u.next=u:(u.next=o.next,o.next=u),l.pending=u}c!==0&&Po(n,u,c)}}function bi(e,t,n,l){xt[El++]=e,xt[El++]=t,xt[El++]=n,xt[El++]=l,gs|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function bs(e,t,n,l){return bi(e,t,n,l),xi(e)}function Jn(e,t){return bi(e,null,null,t),xi(e)}function Po(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var u=!1,c=e.return;c!==null;)c.childLanes|=n,l=c.alternate,l!==null&&(l.childLanes|=n),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(u=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,u&&t!==null&&(u=31-rt(n),e=c.hiddenUpdates,l=e[u],l===null?e[u]=[t]:l.push(t),t.lane=n|536870912),c):null}function xi(e){if(50<wa)throw wa=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 _l={};function _y(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 _y(e,t,n,l)}function xs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kt(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 ef(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 Si(e,t,n,l,u,c){var o=0;if(l=e,typeof e=="function")xs(e)&&(o=1);else if(typeof e=="string")o=R0(e,n,J.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ee:return e=ft(31,n,t,u),e.elementType=ee,e.lanes=c,e;case V:return $n(n.children,u,c,t);case Y:o=8,u|=24;break;case k:return e=ft(12,n,t,u|2),e.elementType=k,e.lanes=c,e;case I:return e=ft(13,n,t,u),e.elementType=I,e.lanes=c,e;case ae:return e=ft(19,n,t,u),e.elementType=ae,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case q:o=10;break e;case B:o=9;break e;case Z:o=11;break e;case Q:o=14;break e;case ue: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,u),t.elementType=e,t.type=l,t.lanes=c,t}function $n(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 tf(e){var t=ft(18,null,null,0);return t.stateNode=e,t}function Es(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 nf=new WeakMap;function St(e,t){if(typeof e=="object"&&e!==null){var n=nf.get(e);return n!==void 0?n:(t={value:e,source:t,stack:eo(t)},nf.set(e,t),t)}return{value:e,source:t,stack:eo(t)}}var Al=[],Tl=0,Ei=null,da=0,Et=[],_t=0,yn=null,Bt=1,Lt="";function Jt(e,t){Al[Tl++]=da,Al[Tl++]=Ei,Ei=e,da=t}function lf(e,t,n){Et[_t++]=Bt,Et[_t++]=Lt,Et[_t++]=yn,yn=e;var l=Bt;e=Lt;var u=32-rt(l)-1;l&=~(1<<u),n+=1;var c=32-rt(t)+u;if(30<c){var o=u-u%5;c=(l&(1<<o)-1).toString(32),l>>=o,u-=o,Bt=1<<32-rt(t)+u|n<<u|l,Lt=c+e}else Bt=1<<c|n<<u|l,Lt=e}function _s(e){e.return!==null&&(Jt(e,1),lf(e,1,0))}function As(e){for(;e===Ei;)Ei=Al[--Tl],Al[Tl]=null,da=Al[--Tl],Al[Tl]=null;for(;e===yn;)yn=Et[--_t],Et[_t]=null,Lt=Et[--_t],Et[_t]=null,Bt=Et[--_t],Et[_t]=null}function af(e,t){Et[_t++]=Bt,Et[_t++]=Lt,Et[_t++]=yn,Bt=t.id,Lt=t.overflow,yn=e}var Ze=null,Ce=null,de=!1,vn=null,At=!1,Ts=Error(r(519));function gn(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ha(St(t,e)),Ts}function uf(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[Qe]=e,t[et]=l,n){case"dialog":re("cancel",t),re("close",t);break;case"iframe":case"object":case"embed":re("load",t);break;case"video":case"audio":for(n=0;n<Ua.length;n++)re(Ua[n],t);break;case"source":re("error",t);break;case"img":case"image":case"link":re("error",t),re("load",t);break;case"details":re("toggle",t);break;case"input":re("invalid",t),go(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":re("invalid",t);break;case"textarea":re("invalid",t),xo(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||_h(t.textContent,n)?(l.popover!=null&&(re("beforetoggle",t),re("toggle",t)),l.onScroll!=null&&re("scroll",t),l.onScrollEnd!=null&&re("scrollend",t),l.onClick!=null&&(t.onclick=Qt),t=!0):t=!1,t||gn(e,!0)}function sf(e){for(Ze=e.return;Ze;)switch(Ze.tag){case 5:case 31:case 13:At=!1;return;case 27:case 3:At=!0;return;default:Ze=Ze.return}}function Cl(e){if(e!==Ze)return!1;if(!de)return sf(e),de=!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&&Ce&&gn(e),sf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ce=Dh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ce=Dh(e)}else t===27?(t=Ce,Dn(e.type)?(e=Jc,Jc=null,Ce=e):Ce=t):Ce=Ze?Ct(e.stateNode.nextSibling):null;return!0}function Fn(){Ce=Ze=null,de=!1}function Cs(){var e=vn;return e!==null&&(it===null?it=e:it.push.apply(it,e),vn=null),e}function ha(e){vn===null?vn=[e]:vn.push(e)}var Ns=E(null),Wn=null,$t=null;function bn(e,t,n){G(Ns,t._currentValue),t._currentValue=n}function Ft(e){e._currentValue=Ns.current,H(Ns)}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 Os(e,t,n,l){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var c=u.dependencies;if(c!==null){var o=u.child;c=c.firstContext;e:for(;c!==null;){var h=c;c=u;for(var x=0;x<t.length;x++)if(h.context===t[x]){c.lanes|=n,h=c.alternate,h!==null&&(h.lanes|=n),Rs(c.return,n,e),l||(o=null);break e}c=h.next}}else if(u.tag===18){if(o=u.return,o===null)throw Error(r(341));o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Rs(o,n,e),o=null}else o=u.child;if(o!==null)o.return=u;else for(o=u;o!==null;){if(o===e){o=null;break}if(u=o.sibling,u!==null){u.return=o.return,o=u;break}o=o.return}u=o}}function Nl(e,t,n,l){e=null;for(var u=t,c=!1;u!==null;){if(!c){if((u.flags&524288)!==0)c=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var o=u.alternate;if(o===null)throw Error(r(387));if(o=o.memoizedProps,o!==null){var h=u.type;ot(u.pendingProps.value,o.value)||(e!==null?e.push(h):e=[h])}}else if(u===ve.current){if(o=u.alternate,o===null)throw Error(r(387));o.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(Ya):e=[Ya])}u=u.return}e!==null&&Os(t,e,n,l),t.flags|=262144}function _i(e){for(e=e.firstContext;e!==null;){if(!ot(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function In(e){Wn=e,$t=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ke(e){return cf(Wn,e)}function Ai(e,t){return Wn===null&&In(e),cf(e,t)}function cf(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},$t===null){if(e===null)throw Error(r(308));$t=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else $t=$t.next=t;return n}var Ay=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()})}},Ty=i.unstable_scheduleCallback,Cy=i.unstable_NormalPriority,Be={$$typeof:q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ms(){return{controller:new Ay,data:new Map,refCount:0}}function ma(e){e.refCount--,e.refCount===0&&Ty(Cy,function(){e.controller.abort()})}var pa=null,zs=0,Rl=0,Ol=null;function Ny(e,t){if(pa===null){var n=pa=[];zs=0,Rl=jc(),Ol={status:"pending",value:void 0,then:function(l){n.push(l)}}}return zs++,t.then(rf,rf),t}function rf(){if(--zs===0&&pa!==null){Ol!==null&&(Ol.status="fulfilled");var e=pa;pa=null,Rl=0,Ol=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ry(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(u){n.push(u)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var u=0;u<n.length;u++)(0,n[u])(t)},function(u){for(l.status="rejected",l.reason=u,u=0;u<n.length;u++)(0,n[u])(void 0)}),l}var of=j.S;j.S=function(e,t){Kd=st(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ny(e,t),of!==null&&of(e,t)};var Pn=E(null);function Ds(){var e=Pn.current;return e!==null?e:Te.pooledCache}function Ti(e,t){t===null?G(Pn,Pn.current):G(Pn,t.pool)}function ff(){var e=Ds();return e===null?null:{parent:Be._currentValue,pool:e}}var Ml=Error(r(460)),ws=Error(r(474)),Ci=Error(r(542)),Ni={then:function(){}};function df(e){return e=e.status,e==="fulfilled"||e==="rejected"}function hf(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Qt,Qt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,pf(e),e;default:if(typeof t.status=="string")t.then(Qt,Qt);else{if(e=Te,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=l}},function(l){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,pf(e),e}throw tl=t,Ml}}function el(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(tl=n,Ml):n}}var tl=null;function mf(){if(tl===null)throw Error(r(459));var e=tl;return tl=null,e}function pf(e){if(e===Ml||e===Ci)throw Error(r(483))}var zl=null,ya=0;function Ri(e){var t=ya;return ya+=1,zl===null&&(zl=[]),hf(zl,e,t)}function va(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Oi(e,t){throw t.$$typeof===D?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function yf(e){function t(_,S){if(e){var C=_.deletions;C===null?(_.deletions=[S],_.flags|=16):C.push(S)}}function n(_,S){if(!e)return null;for(;S!==null;)t(_,S),S=S.sibling;return null}function l(_){for(var S=new Map;_!==null;)_.key!==null?S.set(_.key,_):S.set(_.index,_),_=_.sibling;return S}function u(_,S){return _=Kt(_,S),_.index=0,_.sibling=null,_}function c(_,S,C){return _.index=C,e?(C=_.alternate,C!==null?(C=C.index,C<S?(_.flags|=67108866,S):C):(_.flags|=67108866,S)):(_.flags|=1048576,S)}function o(_){return e&&_.alternate===null&&(_.flags|=67108866),_}function h(_,S,C,U){return S===null||S.tag!==6?(S=Ss(C,_.mode,U),S.return=_,S):(S=u(S,C),S.return=_,S)}function x(_,S,C,U){var F=C.type;return F===V?w(_,S,C.props.children,U,C.key):S!==null&&(S.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===ue&&el(F)===S.type)?(S=u(S,C.props),va(S,C),S.return=_,S):(S=Si(C.type,C.key,C.props,null,_.mode,U),va(S,C),S.return=_,S)}function N(_,S,C,U){return S===null||S.tag!==4||S.stateNode.containerInfo!==C.containerInfo||S.stateNode.implementation!==C.implementation?(S=Es(C,_.mode,U),S.return=_,S):(S=u(S,C.children||[]),S.return=_,S)}function w(_,S,C,U,F){return S===null||S.tag!==7?(S=$n(C,_.mode,U,F),S.return=_,S):(S=u(S,C),S.return=_,S)}function L(_,S,C){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=Ss(""+S,_.mode,C),S.return=_,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case R:return C=Si(S.type,S.key,S.props,null,_.mode,C),va(C,S),C.return=_,C;case M:return S=Es(S,_.mode,C),S.return=_,S;case ue:return S=el(S),L(_,S,C)}if(Ot(S)||Fe(S))return S=$n(S,_.mode,C,null),S.return=_,S;if(typeof S.then=="function")return L(_,Ri(S),C);if(S.$$typeof===q)return L(_,Ai(_,S),C);Oi(_,S)}return null}function O(_,S,C,U){var F=S!==null?S.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return F!==null?null:h(_,S,""+C,U);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case R:return C.key===F?x(_,S,C,U):null;case M:return C.key===F?N(_,S,C,U):null;case ue:return C=el(C),O(_,S,C,U)}if(Ot(C)||Fe(C))return F!==null?null:w(_,S,C,U,null);if(typeof C.then=="function")return O(_,S,Ri(C),U);if(C.$$typeof===q)return O(_,S,Ai(_,C),U);Oi(_,C)}return null}function z(_,S,C,U,F){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return _=_.get(C)||null,h(S,_,""+U,F);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case R:return _=_.get(U.key===null?C:U.key)||null,x(S,_,U,F);case M:return _=_.get(U.key===null?C:U.key)||null,N(S,_,U,F);case ue:return U=el(U),z(_,S,C,U,F)}if(Ot(U)||Fe(U))return _=_.get(C)||null,w(S,_,U,F,null);if(typeof U.then=="function")return z(_,S,C,Ri(U),F);if(U.$$typeof===q)return z(_,S,C,Ai(S,U),F);Oi(S,U)}return null}function K(_,S,C,U){for(var F=null,me=null,$=S,ie=S=0,fe=null;$!==null&&ie<C.length;ie++){$.index>ie?(fe=$,$=null):fe=$.sibling;var pe=O(_,$,C[ie],U);if(pe===null){$===null&&($=fe);break}e&&$&&pe.alternate===null&&t(_,$),S=c(pe,S,ie),me===null?F=pe:me.sibling=pe,me=pe,$=fe}if(ie===C.length)return n(_,$),de&&Jt(_,ie),F;if($===null){for(;ie<C.length;ie++)$=L(_,C[ie],U),$!==null&&(S=c($,S,ie),me===null?F=$:me.sibling=$,me=$);return de&&Jt(_,ie),F}for($=l($);ie<C.length;ie++)fe=z($,_,ie,C[ie],U),fe!==null&&(e&&fe.alternate!==null&&$.delete(fe.key===null?ie:fe.key),S=c(fe,S,ie),me===null?F=fe:me.sibling=fe,me=fe);return e&&$.forEach(function(Ln){return t(_,Ln)}),de&&Jt(_,ie),F}function W(_,S,C,U){if(C==null)throw Error(r(151));for(var F=null,me=null,$=S,ie=S=0,fe=null,pe=C.next();$!==null&&!pe.done;ie++,pe=C.next()){$.index>ie?(fe=$,$=null):fe=$.sibling;var Ln=O(_,$,pe.value,U);if(Ln===null){$===null&&($=fe);break}e&&$&&Ln.alternate===null&&t(_,$),S=c(Ln,S,ie),me===null?F=Ln:me.sibling=Ln,me=Ln,$=fe}if(pe.done)return n(_,$),de&&Jt(_,ie),F;if($===null){for(;!pe.done;ie++,pe=C.next())pe=L(_,pe.value,U),pe!==null&&(S=c(pe,S,ie),me===null?F=pe:me.sibling=pe,me=pe);return de&&Jt(_,ie),F}for($=l($);!pe.done;ie++,pe=C.next())pe=z($,_,ie,pe.value,U),pe!==null&&(e&&pe.alternate!==null&&$.delete(pe.key===null?ie:pe.key),S=c(pe,S,ie),me===null?F=pe:me.sibling=pe,me=pe);return e&&$.forEach(function(q0){return t(_,q0)}),de&&Jt(_,ie),F}function _e(_,S,C,U){if(typeof C=="object"&&C!==null&&C.type===V&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case R:e:{for(var F=C.key;S!==null;){if(S.key===F){if(F=C.type,F===V){if(S.tag===7){n(_,S.sibling),U=u(S,C.props.children),U.return=_,_=U;break e}}else if(S.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===ue&&el(F)===S.type){n(_,S.sibling),U=u(S,C.props),va(U,C),U.return=_,_=U;break e}n(_,S);break}else t(_,S);S=S.sibling}C.type===V?(U=$n(C.props.children,_.mode,U,C.key),U.return=_,_=U):(U=Si(C.type,C.key,C.props,null,_.mode,U),va(U,C),U.return=_,_=U)}return o(_);case M:e:{for(F=C.key;S!==null;){if(S.key===F)if(S.tag===4&&S.stateNode.containerInfo===C.containerInfo&&S.stateNode.implementation===C.implementation){n(_,S.sibling),U=u(S,C.children||[]),U.return=_,_=U;break e}else{n(_,S);break}else t(_,S);S=S.sibling}U=Es(C,_.mode,U),U.return=_,_=U}return o(_);case ue:return C=el(C),_e(_,S,C,U)}if(Ot(C))return K(_,S,C,U);if(Fe(C)){if(F=Fe(C),typeof F!="function")throw Error(r(150));return C=F.call(C),W(_,S,C,U)}if(typeof C.then=="function")return _e(_,S,Ri(C),U);if(C.$$typeof===q)return _e(_,S,Ai(_,C),U);Oi(_,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,S!==null&&S.tag===6?(n(_,S.sibling),U=u(S,C),U.return=_,_=U):(n(_,S),U=Ss(C,_.mode,U),U.return=_,_=U),o(_)):n(_,S)}return function(_,S,C,U){try{ya=0;var F=_e(_,S,C,U);return zl=null,F}catch($){if($===Ml||$===Ci)throw $;var me=ft(29,$,null,_.mode);return me.lanes=U,me.return=_,me}finally{}}}var nl=yf(!0),vf=yf(!1),xn=!1;function js(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Us(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 En(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(ye&2)!==0){var u=l.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),l.pending=t,t=xi(e),Po(e,null,n),t}return bi(e,l,t,n),xi(e)}function ga(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,uo(e,n)}}function Bs(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var u=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?u=c=o:c=c.next=o,n=n.next}while(n!==null);c===null?u=c=t:c=c.next=t}else u=c=t;n={baseState:l.baseState,firstBaseUpdate:u,lastBaseUpdate:c,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 Ls=!1;function ba(){if(Ls){var e=Ol;if(e!==null)throw e}}function xa(e,t,n,l){Ls=!1;var u=e.updateQueue;xn=!1;var c=u.firstBaseUpdate,o=u.lastBaseUpdate,h=u.shared.pending;if(h!==null){u.shared.pending=null;var x=h,N=x.next;x.next=null,o===null?c=N:o.next=N,o=x;var w=e.alternate;w!==null&&(w=w.updateQueue,h=w.lastBaseUpdate,h!==o&&(h===null?w.firstBaseUpdate=N:h.next=N,w.lastBaseUpdate=x))}if(c!==null){var L=u.baseState;o=0,w=N=x=null,h=c;do{var O=h.lane&-536870913,z=O!==h.lane;if(z?(oe&O)===O:(l&O)===O){O!==0&&O===Rl&&(Ls=!0),w!==null&&(w=w.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var K=e,W=h;O=t;var _e=n;switch(W.tag){case 1:if(K=W.payload,typeof K=="function"){L=K.call(_e,L,O);break e}L=K;break e;case 3:K.flags=K.flags&-65537|128;case 0:if(K=W.payload,O=typeof K=="function"?K.call(_e,L,O):K,O==null)break e;L=T({},L,O);break e;case 2:xn=!0}}O=h.callback,O!==null&&(e.flags|=64,z&&(e.flags|=8192),z=u.callbacks,z===null?u.callbacks=[O]:z.push(O))}else z={lane:O,tag:h.tag,payload:h.payload,callback:h.callback,next:null},w===null?(N=w=z,x=L):w=w.next=z,o|=O;if(h=h.next,h===null){if(h=u.shared.pending,h===null)break;z=h,h=z.next,z.next=null,u.lastBaseUpdate=z,u.shared.pending=null}}while(!0);w===null&&(x=L),u.baseState=x,u.firstBaseUpdate=N,u.lastBaseUpdate=w,c===null&&(u.shared.lanes=0),Nn|=o,e.lanes=o,e.memoizedState=L}}function gf(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function bf(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)gf(n[e],t)}var Dl=E(null),Mi=E(0);function xf(e,t){e=un,G(Mi,e),G(Dl,t),un=e|t.baseLanes}function Hs(){G(Mi,un),G(Dl,Dl.current)}function qs(){un=Mi.current,H(Dl),H(Mi)}var dt=E(null),Tt=null;function _n(e){var t=e.alternate;G(je,je.current&1),G(dt,e),Tt===null&&(t===null||Dl.current!==null||t.memoizedState!==null)&&(Tt=e)}function Ys(e){G(je,je.current),G(dt,e),Tt===null&&(Tt=e)}function Sf(e){e.tag===22?(G(je,je.current),G(dt,e),Tt===null&&(Tt=e)):An()}function An(){G(je,je.current),G(dt,dt.current)}function ht(e){H(dt),Tt===e&&(Tt=null),H(je)}var je=E(0);function zi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Zc(n)||Kc(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 Wt=0,le=null,Se=null,Le=null,Di=!1,wl=!1,ll=!1,wi=0,Sa=0,jl=null,Oy=0;function ze(){throw Error(r(321))}function ks(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 Vs(e,t,n,l,u,c){return Wt=c,le=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?ad:lc,ll=!1,c=n(l,u),ll=!1,wl&&(c=_f(t,n,l,u)),Ef(e),c}function Ef(e){j.H=Aa;var t=Se!==null&&Se.next!==null;if(Wt=0,Le=Se=le=null,Di=!1,Sa=0,jl=null,t)throw Error(r(300));e===null||He||(e=e.dependencies,e!==null&&_i(e)&&(He=!0))}function _f(e,t,n,l){le=e;var u=0;do{if(wl&&(jl=null),Sa=0,wl=!1,25<=u)throw Error(r(301));if(u+=1,Le=Se=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}j.H=id,c=t(n,l)}while(wl);return c}function My(){var e=j.H,t=e.useState()[0];return t=typeof t.then=="function"?Ea(t):t,e=e.useState()[0],(Se!==null?Se.memoizedState:null)!==e&&(le.flags|=1024),t}function Xs(){var e=wi!==0;return wi=0,e}function Gs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Qs(e){if(Di){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Di=!1}Wt=0,Le=Se=le=null,wl=!1,Sa=wi=0,jl=null}function Pe(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Le===null?le.memoizedState=Le=e:Le=Le.next=e,Le}function Ue(){if(Se===null){var e=le.alternate;e=e!==null?e.memoizedState:null}else e=Se.next;var t=Le===null?le.memoizedState:Le.next;if(t!==null)Le=t,Se=e;else{if(e===null)throw le.alternate===null?Error(r(467)):Error(r(310));Se=e,e={memoizedState:Se.memoizedState,baseState:Se.baseState,baseQueue:Se.baseQueue,queue:Se.queue,next:null},Le===null?le.memoizedState=Le=e:Le=Le.next=e}return Le}function ji(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ea(e){var t=Sa;return Sa+=1,jl===null&&(jl=[]),e=hf(jl,e,t),t=le,(Le===null?t.memoizedState:Le.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?ad:lc),e}function Ui(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ea(e);if(e.$$typeof===q)return Ke(e)}throw Error(r(438,String(e)))}function Zs(e){var t=null,n=le.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=le.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=ji(),le.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]=Me;return t.index++,n}function It(e,t){return typeof t=="function"?t(e):t}function Bi(e){var t=Ue();return Ks(t,Se,e)}function Ks(e,t,n){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=n;var u=e.baseQueue,c=l.pending;if(c!==null){if(u!==null){var o=u.next;u.next=c.next,c.next=o}t.baseQueue=u=c,l.pending=null}if(c=e.baseState,u===null)e.memoizedState=c;else{t=u.next;var h=o=null,x=null,N=t,w=!1;do{var L=N.lane&-536870913;if(L!==N.lane?(oe&L)===L:(Wt&L)===L){var O=N.revertLane;if(O===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),L===Rl&&(w=!0);else if((Wt&O)===O){N=N.next,O===Rl&&(w=!0);continue}else L={lane:0,revertLane:N.revertLane,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},x===null?(h=x=L,o=c):x=x.next=L,le.lanes|=O,Nn|=O;L=N.action,ll&&n(c,L),c=N.hasEagerState?N.eagerState:n(c,L)}else O={lane:L,revertLane:N.revertLane,gesture:N.gesture,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},x===null?(h=x=O,o=c):x=x.next=O,le.lanes|=L,Nn|=L;N=N.next}while(N!==null&&N!==t);if(x===null?o=c:x.next=h,!ot(c,e.memoizedState)&&(He=!0,w&&(n=Ol,n!==null)))throw n;e.memoizedState=c,e.baseState=o,e.baseQueue=x,l.lastRenderedState=c}return u===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Js(e){var t=Ue(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var l=n.dispatch,u=n.pending,c=t.memoizedState;if(u!==null){n.pending=null;var o=u=u.next;do c=e(c,o.action),o=o.next;while(o!==u);ot(c,t.memoizedState)||(He=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),n.lastRenderedState=c}return[c,l]}function Af(e,t,n){var l=le,u=Ue(),c=de;if(c){if(n===void 0)throw Error(r(407));n=n()}else n=t();var o=!ot((Se||u).memoizedState,n);if(o&&(u.memoizedState=n,He=!0),u=u.queue,Ws(Nf.bind(null,l,u,e),[e]),u.getSnapshot!==t||o||Le!==null&&Le.memoizedState.tag&1){if(l.flags|=2048,Ul(9,{destroy:void 0},Cf.bind(null,l,u,n,t),null),Te===null)throw Error(r(349));c||(Wt&127)!==0||Tf(l,t,n)}return n}function Tf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=le.updateQueue,t===null?(t=ji(),le.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Cf(e,t,n,l){t.value=n,t.getSnapshot=l,Rf(t)&&Of(e)}function Nf(e,t,n){return n(function(){Rf(t)&&Of(e)})}function Rf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ot(e,n)}catch{return!0}}function Of(e){var t=Jn(e,2);t!==null&&ut(t,e,2)}function $s(e){var t=Pe();if(typeof e=="function"){var n=e;if(e=n(),ll){hn(!0);try{n()}finally{hn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:It,lastRenderedState:e},t}function Mf(e,t,n,l){return e.baseState=n,Ks(e,Se,typeof l=="function"?l:It)}function zy(e,t,n,l,u){if(qi(e))throw Error(r(485));if(e=t.action,e!==null){var c={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){c.listeners.push(o)}};j.T!==null?n(!0):c.isTransition=!1,l(c),n=t.pending,n===null?(c.next=t.pending=c,zf(t,c)):(c.next=n.next,t.pending=n.next=c)}}function zf(e,t){var n=t.action,l=t.payload,u=e.state;if(t.isTransition){var c=j.T,o={};j.T=o;try{var h=n(u,l),x=j.S;x!==null&&x(o,h),Df(e,t,h)}catch(N){Fs(e,t,N)}finally{c!==null&&o.types!==null&&(c.types=o.types),j.T=c}}else try{c=n(u,l),Df(e,t,c)}catch(N){Fs(e,t,N)}}function Df(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){wf(e,t,l)},function(l){return Fs(e,t,l)}):wf(e,t,n)}function wf(e,t,n){t.status="fulfilled",t.value=n,jf(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,zf(e,n)))}function Fs(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,jf(t),t=t.next;while(t!==l)}e.action=null}function jf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Uf(e,t){return t}function Bf(e,t){if(de){var n=Te.formState;if(n!==null){e:{var l=le;if(de){if(Ce){t:{for(var u=Ce,c=At;u.nodeType!==8;){if(!c){u=null;break t}if(u=Ct(u.nextSibling),u===null){u=null;break t}}c=u.data,u=c==="F!"||c==="F"?u:null}if(u){Ce=Ct(u.nextSibling),l=u.data==="F!";break e}}gn(l)}l=!1}l&&(t=n[0])}}return n=Pe(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Uf,lastRenderedState:t},n.queue=l,n=td.bind(null,le,l),l.dispatch=n,l=$s(!1),c=nc.bind(null,le,!1,l.queue),l=Pe(),u={state:t,dispatch:null,action:e,pending:null},l.queue=u,n=zy.bind(null,le,u,c,n),u.dispatch=n,l.memoizedState=e,[t,n,!1]}function Lf(e){var t=Ue();return Hf(t,Se,e)}function Hf(e,t,n){if(t=Ks(e,t,Uf)[0],e=Bi(It)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Ea(t)}catch(o){throw o===Ml?Ci:o}else l=t;t=Ue();var u=t.queue,c=u.dispatch;return n!==t.memoizedState&&(le.flags|=2048,Ul(9,{destroy:void 0},Dy.bind(null,u,n),null)),[l,c,e]}function Dy(e,t){e.action=t}function qf(e){var t=Ue(),n=Se;if(n!==null)return Hf(t,n,e);Ue(),t=t.memoizedState,n=Ue();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function Ul(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=le.updateQueue,t===null&&(t=ji(),le.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 Yf(){return Ue().memoizedState}function Li(e,t,n,l){var u=Pe();le.flags|=e,u.memoizedState=Ul(1|t,{destroy:void 0},n,l===void 0?null:l)}function Hi(e,t,n,l){var u=Ue();l=l===void 0?null:l;var c=u.memoizedState.inst;Se!==null&&l!==null&&ks(l,Se.memoizedState.deps)?u.memoizedState=Ul(t,c,n,l):(le.flags|=e,u.memoizedState=Ul(1|t,c,n,l))}function kf(e,t){Li(8390656,8,e,t)}function Ws(e,t){Hi(2048,8,e,t)}function wy(e){le.flags|=4;var t=le.updateQueue;if(t===null)t=ji(),le.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Vf(e){var t=Ue().memoizedState;return wy({ref:t,nextImpl:e}),function(){if((ye&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Xf(e,t){return Hi(4,2,e,t)}function Gf(e,t){return Hi(4,4,e,t)}function Qf(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 Zf(e,t,n){n=n!=null?n.concat([e]):null,Hi(4,4,Qf.bind(null,t,e),n)}function Is(){}function Kf(e,t){var n=Ue();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&ks(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function Jf(e,t){var n=Ue();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&ks(t,l[1]))return l[0];if(l=e(),ll){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[l,t],l}function Ps(e,t,n){return n===void 0||(Wt&1073741824)!==0&&(oe&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=$d(),le.lanes|=e,Nn|=e,n)}function $f(e,t,n,l){return ot(n,t)?n:Dl.current!==null?(e=Ps(e,n,l),ot(e,t)||(He=!0),e):(Wt&42)===0||(Wt&1073741824)!==0&&(oe&261930)===0?(He=!0,e.memoizedState=n):(e=$d(),le.lanes|=e,Nn|=e,t)}function Ff(e,t,n,l,u){var c=X.p;X.p=c!==0&&8>c?c:8;var o=j.T,h={};j.T=h,nc(e,!1,t,n);try{var x=u(),N=j.S;if(N!==null&&N(h,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var w=Ry(x,l);_a(e,t,w,yt(e))}else _a(e,t,l,yt(e))}catch(L){_a(e,t,{then:function(){},status:"rejected",reason:L},yt())}finally{X.p=c,o!==null&&h.types!==null&&(o.types=h.types),j.T=o}}function jy(){}function ec(e,t,n,l){if(e.tag!==5)throw Error(r(476));var u=Wf(e).queue;Ff(e,u,t,P,n===null?jy:function(){return If(e),n(l)})}function Wf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:It,lastRenderedState:P},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:It,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function If(e){var t=Wf(e);t.next===null&&(t=e.alternate.memoizedState),_a(e,t.next.queue,{},yt())}function tc(){return Ke(Ya)}function Pf(){return Ue().memoizedState}function ed(){return Ue().memoizedState}function Uy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=yt();e=Sn(n);var l=En(t,e,n);l!==null&&(ut(l,t,n),ga(l,t,n)),t={cache:Ms()},e.payload=t;return}t=t.return}}function By(e,t,n){var l=yt();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},qi(e)?nd(t,n):(n=bs(e,t,n,l),n!==null&&(ut(n,e,l),ld(n,t,l)))}function td(e,t,n){var l=yt();_a(e,t,n,l)}function _a(e,t,n,l){var u={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(qi(e))nd(t,u);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var o=t.lastRenderedState,h=c(o,n);if(u.hasEagerState=!0,u.eagerState=h,ot(h,o))return bi(e,t,u,0),Te===null&&gi(),!1}catch{}finally{}if(n=bs(e,t,u,l),n!==null)return ut(n,e,l),ld(n,t,l),!0}return!1}function nc(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=bs(e,n,l,2),t!==null&&ut(t,e,2)}function qi(e){var t=e.alternate;return e===le||t!==null&&t===le}function nd(e,t){wl=Di=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ld(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,uo(e,n)}}var Aa={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};Aa.useEffectEvent=ze;var ad={readContext:Ke,use:Ui,useCallback:function(e,t){return Pe().memoizedState=[e,t===void 0?null:t],e},useContext:Ke,useEffect:kf,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Li(4194308,4,Qf.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=Pe();t=t===void 0?null:t;var l=e();if(ll){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Pe();if(n!==void 0){var u=n(t);if(ll){hn(!0);try{n(t)}finally{hn(!1)}}}else u=t;return l.memoizedState=l.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},l.queue=e,e=e.dispatch=By.bind(null,le,e),[l.memoizedState,e]},useRef:function(e){var t=Pe();return e={current:e},t.memoizedState=e},useState:function(e){e=$s(e);var t=e.queue,n=td.bind(null,le,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Is,useDeferredValue:function(e,t){var n=Pe();return Ps(n,e,t)},useTransition:function(){var e=$s(!1);return e=Ff.bind(null,le,e.queue,!0,!1),Pe().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=le,u=Pe();if(de){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Te===null)throw Error(r(349));(oe&127)!==0||Tf(l,t,n)}u.memoizedState=n;var c={value:n,getSnapshot:t};return u.queue=c,kf(Nf.bind(null,l,c,e),[e]),l.flags|=2048,Ul(9,{destroy:void 0},Cf.bind(null,l,c,n,t),null),n},useId:function(){var e=Pe(),t=Te.identifierPrefix;if(de){var n=Lt,l=Bt;n=(l&~(1<<32-rt(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=wi++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Oy++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:tc,useFormState:Bf,useActionState:Bf,useOptimistic:function(e){var t=Pe();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=nc.bind(null,le,!0,n),n.dispatch=t,[e,t]},useMemoCache:Zs,useCacheRefresh:function(){return Pe().memoizedState=Uy.bind(null,le)},useEffectEvent:function(e){var t=Pe(),n={impl:e};return t.memoizedState=n,function(){if((ye&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},lc={readContext:Ke,use:Ui,useCallback:Kf,useContext:Ke,useEffect:Ws,useImperativeHandle:Zf,useInsertionEffect:Xf,useLayoutEffect:Gf,useMemo:Jf,useReducer:Bi,useRef:Yf,useState:function(){return Bi(It)},useDebugValue:Is,useDeferredValue:function(e,t){var n=Ue();return $f(n,Se.memoizedState,e,t)},useTransition:function(){var e=Bi(It)[0],t=Ue().memoizedState;return[typeof e=="boolean"?e:Ea(e),t]},useSyncExternalStore:Af,useId:Pf,useHostTransitionStatus:tc,useFormState:Lf,useActionState:Lf,useOptimistic:function(e,t){var n=Ue();return Mf(n,Se,e,t)},useMemoCache:Zs,useCacheRefresh:ed};lc.useEffectEvent=Vf;var id={readContext:Ke,use:Ui,useCallback:Kf,useContext:Ke,useEffect:Ws,useImperativeHandle:Zf,useInsertionEffect:Xf,useLayoutEffect:Gf,useMemo:Jf,useReducer:Js,useRef:Yf,useState:function(){return Js(It)},useDebugValue:Is,useDeferredValue:function(e,t){var n=Ue();return Se===null?Ps(n,e,t):$f(n,Se.memoizedState,e,t)},useTransition:function(){var e=Js(It)[0],t=Ue().memoizedState;return[typeof e=="boolean"?e:Ea(e),t]},useSyncExternalStore:Af,useId:Pf,useHostTransitionStatus:tc,useFormState:qf,useActionState:qf,useOptimistic:function(e,t){var n=Ue();return Se!==null?Mf(n,Se,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Zs,useCacheRefresh:ed};id.useEffectEvent=Vf;function ac(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ic={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=yt(),u=Sn(l);u.payload=t,n!=null&&(u.callback=n),t=En(e,u,l),t!==null&&(ut(t,e,l),ga(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=yt(),u=Sn(l);u.tag=1,u.payload=t,n!=null&&(u.callback=n),t=En(e,u,l),t!==null&&(ut(t,e,l),ga(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=En(e,l,n),t!==null&&(ut(t,e,n),ga(t,e,n))}};function ud(e,t,n,l,u,c,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,c,o):t.prototype&&t.prototype.isPureReactComponent?!oa(n,l)||!oa(u,c):!0}function sd(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&&ic.enqueueReplaceState(t,t.state,null)}function al(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=T({},n));for(var u in e)n[u]===void 0&&(n[u]=e[u])}return n}function cd(e){vi(e)}function rd(e){console.error(e)}function od(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 fd(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function uc(e,t,n){return n=Sn(n),n.tag=3,n.payload={element:null},n.callback=function(){Yi(e,t)},n}function dd(e){return e=Sn(e),e.tag=3,e}function hd(e,t,n,l){var u=n.type.getDerivedStateFromError;if(typeof u=="function"){var c=l.value;e.payload=function(){return u(c)},e.callback=function(){fd(t,n,l)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){fd(t,n,l),typeof u!="function"&&(Rn===null?Rn=new Set([this]):Rn.add(this));var h=l.stack;this.componentDidCatch(l.value,{componentStack:h!==null?h:""})})}function Ly(e,t,n,l,u){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&Nl(t,n,u,!0),n=dt.current,n!==null){switch(n.tag){case 31:case 13:return Tt===null?Ii():n.alternate===null&&De===0&&(De=3),n.flags&=-257,n.flags|=65536,n.lanes=u,l===Ni?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),zc(e,l,u)),!1;case 22:return n.flags|=65536,l===Ni?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,u)),!1}throw Error(r(435,n.tag))}return zc(e,l,u),Ii(),!1}if(de)return t=dt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,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,u&=-u,e.lanes|=u,l=St(l,n),u=uc(e.stateNode,l,u),Bs(e,u),De!==4&&(De=2)),!1;var c=Error(r(520),{cause:l});if(c=St(c,n),Da===null?Da=[c]:Da.push(c),De!==4&&(De=2),t===null)return!0;l=St(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=u&-u,n.lanes|=e,e=uc(n.stateNode,l,e),Bs(n,e),!1;case 1:if(t=n.type,c=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Rn===null||!Rn.has(c))))return n.flags|=65536,u&=-u,n.lanes|=u,u=dd(u),hd(u,e,n,l),Bs(n,u),!1}n=n.return}while(n!==null);return!1}var sc=Error(r(461)),He=!1;function Je(e,t,n,l){t.child=e===null?vf(t,null,n,l):nl(t,e.child,n,l)}function md(e,t,n,l,u){n=n.render;var c=t.ref;if("ref"in l){var o={};for(var h in l)h!=="ref"&&(o[h]=l[h])}else o=l;return In(t),l=Vs(e,t,n,o,c,u),h=Xs(),e!==null&&!He?(Gs(e,t,u),Pt(e,t,u)):(de&&h&&_s(t),t.flags|=1,Je(e,t,l,u),t.child)}function pd(e,t,n,l,u){if(e===null){var c=n.type;return typeof c=="function"&&!xs(c)&&c.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=c,yd(e,t,c,l,u)):(e=Si(n.type,null,l,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!pc(e,u)){var o=c.memoizedProps;if(n=n.compare,n=n!==null?n:oa,n(o,l)&&e.ref===t.ref)return Pt(e,t,u)}return t.flags|=1,e=Kt(c,l),e.ref=t.ref,e.return=t,t.child=e}function yd(e,t,n,l,u){if(e!==null){var c=e.memoizedProps;if(oa(c,l)&&e.ref===t.ref)if(He=!1,t.pendingProps=l=c,pc(e,u))(e.flags&131072)!==0&&(He=!0);else return t.lanes=e.lanes,Pt(e,t,u)}return cc(e,t,n,l,u)}function vd(e,t,n,l){var u=l.children,c=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(c=c!==null?c.baseLanes|n:n,e!==null){for(l=t.child=e.child,u=0;l!==null;)u=u|l.lanes|l.childLanes,l=l.sibling;l=u&~c}else l=0,t.child=null;return gd(e,t,c,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ti(t,c!==null?c.cachePool:null),c!==null?xf(t,c):Hs(),Sf(t);else return l=t.lanes=536870912,gd(e,t,c!==null?c.baseLanes|n:n,n,l)}else c!==null?(Ti(t,c.cachePool),xf(t,c),An(),t.memoizedState=null):(e!==null&&Ti(t,null),Hs(),An());return Je(e,t,u,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 gd(e,t,n,l,u){var c=Ds();return c=c===null?null:{parent:Be._currentValue,pool:c},t.memoizedState={baseLanes:n,cachePool:c},e!==null&&Ti(t,null),Hs(),Sf(t),e!==null&&Nl(e,t,l,!0),t.childLanes=u,null}function ki(e,t){return t=Xi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function bd(e,t,n){return nl(t,e.child,null,n),e=ki(t,t.pendingProps),e.flags|=2,ht(t),t.memoizedState=null,e}function Hy(e,t,n){var l=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(de){if(l.mode==="hidden")return e=ki(t,l),t.lanes=536870912,Ta(null,e);if(Ys(t),(e=Ce)?(e=zh(e,At),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yn!==null?{id:Bt,overflow:Lt}:null,retryLane:536870912,hydrationErrors:null},n=tf(e),n.return=t,t.child=n,Ze=t,Ce=null)):e=null,e===null)throw gn(t);return t.lanes=536870912,null}return ki(t,l)}var c=e.memoizedState;if(c!==null){var o=c.dehydrated;if(Ys(t),u)if(t.flags&256)t.flags&=-257,t=bd(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||Nl(e,t,n,!1),u=(n&e.childLanes)!==0,He||u){if(l=Te,l!==null&&(o=so(l,n),o!==0&&o!==c.retryLane))throw c.retryLane=o,Jn(e,o),ut(l,e,o),sc;Ii(),t=bd(e,t,n)}else e=c.treeContext,Ce=Ct(o.nextSibling),Ze=t,de=!0,vn=null,At=!1,e!==null&&af(t,e),t=ki(t,l),t.flags|=4096;return t}return e=Kt(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Vi(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 cc(e,t,n,l,u){return In(t),n=Vs(e,t,n,l,void 0,u),l=Xs(),e!==null&&!He?(Gs(e,t,u),Pt(e,t,u)):(de&&l&&_s(t),t.flags|=1,Je(e,t,n,u),t.child)}function xd(e,t,n,l,u,c){return In(t),t.updateQueue=null,n=_f(t,l,n,u),Ef(e),l=Xs(),e!==null&&!He?(Gs(e,t,c),Pt(e,t,c)):(de&&l&&_s(t),t.flags|=1,Je(e,t,n,c),t.child)}function Sd(e,t,n,l,u){if(In(t),t.stateNode===null){var c=_l,o=n.contextType;typeof o=="object"&&o!==null&&(c=Ke(o)),c=new n(l,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=ic,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=l,c.state=t.memoizedState,c.refs={},js(t),o=n.contextType,c.context=typeof o=="object"&&o!==null?Ke(o):_l,c.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o=="function"&&(ac(t,n,o,l),c.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(o=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),o!==c.state&&ic.enqueueReplaceState(c,c.state,null),xa(t,l,c,u),ba(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){c=t.stateNode;var h=t.memoizedProps,x=al(n,h);c.props=x;var N=c.context,w=n.contextType;o=_l,typeof w=="object"&&w!==null&&(o=Ke(w));var L=n.getDerivedStateFromProps;w=typeof L=="function"||typeof c.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,w||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(h||N!==o)&&sd(t,c,l,o),xn=!1;var O=t.memoizedState;c.state=O,xa(t,l,c,u),ba(),N=t.memoizedState,h||O!==N||xn?(typeof L=="function"&&(ac(t,n,L,l),N=t.memoizedState),(x=xn||ud(t,n,x,l,O,N,o))?(w||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=N),c.props=l,c.state=N,c.context=o,l=x):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{c=t.stateNode,Us(e,t),o=t.memoizedProps,w=al(n,o),c.props=w,L=t.pendingProps,O=c.context,N=n.contextType,x=_l,typeof N=="object"&&N!==null&&(x=Ke(N)),h=n.getDerivedStateFromProps,(N=typeof h=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(o!==L||O!==x)&&sd(t,c,l,x),xn=!1,O=t.memoizedState,c.state=O,xa(t,l,c,u),ba();var z=t.memoizedState;o!==L||O!==z||xn||e!==null&&e.dependencies!==null&&_i(e.dependencies)?(typeof h=="function"&&(ac(t,n,h,l),z=t.memoizedState),(w=xn||ud(t,n,w,l,O,z,x)||e!==null&&e.dependencies!==null&&_i(e.dependencies))?(N||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(l,z,x),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(l,z,x)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||o===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=z),c.props=l,c.state=z,c.context=x,l=w):(typeof c.componentDidUpdate!="function"||o===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),l=!1)}return c=l,Vi(e,t),l=(t.flags&128)!==0,c||l?(c=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&l?(t.child=nl(t,e.child,null,u),t.child=nl(t,null,n,u)):Je(e,t,n,u),t.memoizedState=c.state,e=t.child):e=Pt(e,t,u),e}function Ed(e,t,n,l){return Fn(),t.flags|=256,Je(e,t,n,l),t.child}var rc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function oc(e){return{baseLanes:e,cachePool:ff()}}function fc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=pt),e}function _d(e,t,n){var l=t.pendingProps,u=!1,c=(t.flags&128)!==0,o;if((o=c)||(o=e!==null&&e.memoizedState===null?!1:(je.current&2)!==0),o&&(u=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(de){if(u?_n(t):An(),(e=Ce)?(e=zh(e,At),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yn!==null?{id:Bt,overflow:Lt}:null,retryLane:536870912,hydrationErrors:null},n=tf(e),n.return=t,t.child=n,Ze=t,Ce=null)):e=null,e===null)throw gn(t);return Kc(e)?t.lanes=32:t.lanes=536870912,null}var h=l.children;return l=l.fallback,u?(An(),u=t.mode,h=Xi({mode:"hidden",children:h},u),l=$n(l,u,n,null),h.return=t,l.return=t,h.sibling=l,t.child=h,l=t.child,l.memoizedState=oc(n),l.childLanes=fc(e,o,n),t.memoizedState=rc,Ta(null,l)):(_n(t),dc(t,h))}var x=e.memoizedState;if(x!==null&&(h=x.dehydrated,h!==null)){if(c)t.flags&256?(_n(t),t.flags&=-257,t=hc(e,t,n)):t.memoizedState!==null?(An(),t.child=e.child,t.flags|=128,t=null):(An(),h=l.fallback,u=t.mode,l=Xi({mode:"visible",children:l.children},u),h=$n(h,u,n,null),h.flags|=2,l.return=t,h.return=t,l.sibling=h,t.child=l,nl(t,e.child,null,n),l=t.child,l.memoizedState=oc(n),l.childLanes=fc(e,o,n),t.memoizedState=rc,t=Ta(null,l));else if(_n(t),Kc(h)){if(o=h.nextSibling&&h.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||Nl(e,t,n,!1),o=(n&e.childLanes)!==0,He||o){if(o=Te,o!==null&&(l=so(o,n),l!==0&&l!==x.retryLane))throw x.retryLane=l,Jn(e,l),ut(o,e,l),sc;Zc(h)||Ii(),t=hc(e,t,n)}else Zc(h)?(t.flags|=192,t.child=e.child,t=null):(e=x.treeContext,Ce=Ct(h.nextSibling),Ze=t,de=!0,vn=null,At=!1,e!==null&&af(t,e),t=dc(t,l.children),t.flags|=4096);return t}return u?(An(),h=l.fallback,u=t.mode,x=e.child,N=x.sibling,l=Kt(x,{mode:"hidden",children:l.children}),l.subtreeFlags=x.subtreeFlags&65011712,N!==null?h=Kt(N,h):(h=$n(h,u,n,null),h.flags|=2),h.return=t,l.return=t,l.sibling=h,t.child=l,Ta(null,l),l=t.child,h=e.child.memoizedState,h===null?h=oc(n):(u=h.cachePool,u!==null?(x=Be._currentValue,u=u.parent!==x?{parent:x,pool:x}:u):u=ff(),h={baseLanes:h.baseLanes|n,cachePool:u}),l.memoizedState=h,l.childLanes=fc(e,o,n),t.memoizedState=rc,Ta(e.child,l)):(_n(t),n=e.child,e=n.sibling,n=Kt(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 dc(e,t){return t=Xi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Xi(e,t){return e=ft(22,e,null,t),e.lanes=0,e}function hc(e,t,n){return nl(t,e.child,null,n),e=dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ad(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Rs(e.return,t,n)}function mc(e,t,n,l,u,c){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:u,treeForkCount:c}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=l,o.tail=n,o.tailMode=u,o.treeForkCount=c)}function Td(e,t,n){var l=t.pendingProps,u=l.revealOrder,c=l.tail;l=l.children;var o=je.current,h=(o&2)!==0;if(h?(o=o&1|2,t.flags|=128):o&=1,G(je,o),Je(e,t,l,n),l=de?da:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ad(e,n,t);else if(e.tag===19)Ad(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(u){case"forwards":for(n=t.child,u=null;n!==null;)e=n.alternate,e!==null&&zi(e)===null&&(u=n),n=n.sibling;n=u,n===null?(u=t.child,t.child=null):(u=n.sibling,n.sibling=null),mc(t,!1,u,n,c,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&zi(e)===null){t.child=u;break}e=u.sibling,u.sibling=n,n=u,u=e}mc(t,!0,n,null,c,l);break;case"together":mc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Pt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Nn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Nl(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=Kt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Kt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function pc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&_i(e)))}function qy(e,t,n){switch(t.tag){case 3:Ie(t,t.stateNode.containerInfo),bn(t,Be,e.memoizedState.cache),Fn();break;case 27:case 5:Wl(t);break;case 4:Ie(t,t.stateNode.containerInfo);break;case 10:bn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ys(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?_d(e,t,n):(_n(t),e=Pt(e,t,n),e!==null?e.sibling:null);_n(t);break;case 19:var u=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(Nl(e,t,n,!1),l=(n&t.childLanes)!==0),u){if(l)return Td(e,t,n);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),G(je,je.current),l)break;return null;case 22:return t.lanes=0,vd(e,t,n,t.pendingProps);case 24:bn(t,Be,e.memoizedState.cache)}return Pt(e,t,n)}function Cd(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)He=!0;else{if(!pc(e,n)&&(t.flags&128)===0)return He=!1,qy(e,t,n);He=(e.flags&131072)!==0}else He=!1,de&&(t.flags&1048576)!==0&&lf(t,da,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=el(t.elementType),t.type=e,typeof e=="function")xs(e)?(l=al(e,l),t.tag=1,t=Sd(null,t,e,l,n)):(t.tag=0,t=cc(null,t,e,l,n));else{if(e!=null){var u=e.$$typeof;if(u===Z){t.tag=11,t=md(null,t,e,l,n);break e}else if(u===Q){t.tag=14,t=pd(null,t,e,l,n);break e}}throw t=Xt(e)||e,Error(r(306,t,""))}}return t;case 0:return cc(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,u=al(l,t.pendingProps),Sd(e,t,l,u,n);case 3:e:{if(Ie(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var c=t.memoizedState;u=c.element,Us(e,t),xa(t,l,null,n);var o=t.memoizedState;if(l=o.cache,bn(t,Be,l),l!==c.cache&&Os(t,[Be],n,!0),ba(),l=o.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Ed(e,t,l,n);break e}else if(l!==u){u=St(Error(r(424)),t),ha(u),t=Ed(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(Ce=Ct(e.firstChild),Ze=t,de=!0,vn=null,At=!0,n=vf(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Fn(),l===u){t=Pt(e,t,n);break e}Je(e,t,l,n)}t=t.child}return t;case 26:return Vi(e,t),e===null?(n=Lh(t.type,null,t.pendingProps,null))?t.memoizedState=n:de||(n=t.type,e=t.pendingProps,l=iu(se.current).createElement(n),l[Qe]=t,l[et]=e,$e(l,n,e),Xe(l),t.stateNode=l):t.memoizedState=Lh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Wl(t),e===null&&de&&(l=t.stateNode=jh(t.type,t.pendingProps,se.current),Ze=t,At=!0,u=Ce,Dn(t.type)?(Jc=u,Ce=Ct(l.firstChild)):Ce=u),Je(e,t,t.pendingProps.children,n),Vi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&de&&((u=l=Ce)&&(l=p0(l,t.type,t.pendingProps,At),l!==null?(t.stateNode=l,Ze=t,Ce=Ct(l.firstChild),At=!1,u=!0):u=!1),u||gn(t)),Wl(t),u=t.type,c=t.pendingProps,o=e!==null?e.memoizedProps:null,l=c.children,Xc(u,c)?l=null:o!==null&&Xc(u,o)&&(t.flags|=32),t.memoizedState!==null&&(u=Vs(e,t,My,null,null,n),Ya._currentValue=u),Vi(e,t),Je(e,t,l,n),t.child;case 6:return e===null&&de&&((e=n=Ce)&&(n=y0(n,t.pendingProps,At),n!==null?(t.stateNode=n,Ze=t,Ce=null,e=!0):e=!1),e||gn(t)),null;case 13:return _d(e,t,n);case 4:return Ie(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=nl(t,null,l,n):Je(e,t,l,n),t.child;case 11:return md(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,bn(t,t.type,l.value),Je(e,t,l.children,n),t.child;case 9:return u=t.type._context,l=t.pendingProps.children,In(t),u=Ke(u),l=l(u),t.flags|=1,Je(e,t,l,n),t.child;case 14:return pd(e,t,t.type,t.pendingProps,n);case 15:return yd(e,t,t.type,t.pendingProps,n);case 19:return Td(e,t,n);case 31:return Hy(e,t,n);case 22:return vd(e,t,n,t.pendingProps);case 24:return In(t),l=Ke(Be),e===null?(u=Ds(),u===null&&(u=Te,c=Ms(),u.pooledCache=c,c.refCount++,c!==null&&(u.pooledCacheLanes|=n),u=c),t.memoizedState={parent:l,cache:u},js(t),bn(t,Be,u)):((e.lanes&n)!==0&&(Us(e,t),xa(t,null,null,n),ba()),u=e.memoizedState,c=t.memoizedState,u.parent!==l?(u={parent:l,cache:l},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),bn(t,Be,l)):(l=c.cache,bn(t,Be,l),l!==u.cache&&Os(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 en(e){e.flags|=4}function yc(e,t,n,l,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(Pd())e.flags|=8192;else throw tl=Ni,ws}else e.flags&=-16777217}function Nd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Vh(t))if(Pd())e.flags|=8192;else throw tl=Ni,ws}function Gi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ao():536870912,e.lanes|=t,ql|=t)}function Ca(e,t){if(!de)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 Ne(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var u=e.child;u!==null;)n|=u.lanes|u.childLanes,l|=u.subtreeFlags&65011712,l|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)n|=u.lanes|u.childLanes,l|=u.subtreeFlags,l|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function Yy(e,t,n){var l=t.pendingProps;switch(As(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ne(t),null;case 1:return Ne(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Ft(Be),we(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Cl(t)?en(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Cs())),Ne(t),null;case 26:var u=t.type,c=t.memoizedState;return e===null?(en(t),c!==null?(Ne(t),Nd(t,c)):(Ne(t),yc(t,u,null,l,n))):c?c!==e.memoizedState?(en(t),Ne(t),Nd(t,c)):(Ne(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&en(t),Ne(t),yc(t,u,e,l,n)),null;case 27:if(ti(t),n=se.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&en(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Ne(t),null}e=J.current,Cl(t)?uf(t):(e=jh(u,l,n),t.stateNode=e,en(t))}return Ne(t),null;case 5:if(ti(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&en(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Ne(t),null}if(c=J.current,Cl(t))uf(t);else{var o=iu(se.current);switch(c){case 1:c=o.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:c=o.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":c=o.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":c=o.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":c=o.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof l.is=="string"?o.createElement("select",{is:l.is}):o.createElement("select"),l.multiple?c.multiple=!0:l.size&&(c.size=l.size);break;default:c=typeof l.is=="string"?o.createElement(u,{is:l.is}):o.createElement(u)}}c[Qe]=t,c[et]=l;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)c.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=c;e:switch($e(c,u,l),u){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&en(t)}}return Ne(t),yc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&en(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=se.current,Cl(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,u=Ze,u!==null)switch(u.tag){case 27:case 5:l=u.memoizedProps}e[Qe]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||_h(e.nodeValue,n)),e||gn(t,!0)}else e=iu(e).createTextNode(l),e[Qe]=t,t.stateNode=e}return Ne(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=Cl(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 Fn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ne(t),e=!1}else n=Cs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ht(t),t):(ht(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ne(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Cl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!u)throw Error(r(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[Qe]=t}else Fn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ne(t),u=!1}else u=Cs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(ht(t),t):(ht(t),null)}return ht(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,u=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(u=l.alternate.memoizedState.cachePool.pool),c=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(c=l.memoizedState.cachePool.pool),c!==u&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Gi(t,t.updateQueue),Ne(t),null);case 4:return we(),e===null&&Hc(t.stateNode.containerInfo),Ne(t),null;case 10:return Ft(t.type),Ne(t),null;case 19:if(H(je),l=t.memoizedState,l===null)return Ne(t),null;if(u=(t.flags&128)!==0,c=l.rendering,c===null)if(u)Ca(l,!1);else{if(De!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=zi(e),c!==null){for(t.flags|=128,Ca(l,!1),e=c.updateQueue,t.updateQueue=e,Gi(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ef(n,e),n=n.sibling;return G(je,je.current&1|2),de&&Jt(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&st()>$i&&(t.flags|=128,u=!0,Ca(l,!1),t.lanes=4194304)}else{if(!u)if(e=zi(c),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,Gi(t,e),Ca(l,!0),l.tail===null&&l.tailMode==="hidden"&&!c.alternate&&!de)return Ne(t),null}else 2*st()-l.renderingStartTime>$i&&n!==536870912&&(t.flags|=128,u=!0,Ca(l,!1),t.lanes=4194304);l.isBackwards?(c.sibling=t.child,t.child=c):(e=l.last,e!==null?e.sibling=c:t.child=c,l.last=c)}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,u?n&1|2:n&1),de&&Jt(t,l.treeForkCount),e):(Ne(t),null);case 22:case 23:return ht(t),qs(),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&&(Ne(t),t.subtreeFlags&6&&(t.flags|=8192)):Ne(t),n=t.updateQueue,n!==null&&Gi(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&&H(Pn),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ft(Be),Ne(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function ky(e,t){switch(As(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ft(Be),we(),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(ht(t),t.alternate===null)throw Error(r(340));Fn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ht(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Fn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(je),null;case 4:return we(),null;case 10:return Ft(t.type),null;case 22:case 23:return ht(t),qs(),e!==null&&H(Pn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ft(Be),null;case 25:return null;default:return null}}function Rd(e,t){switch(As(t),t.tag){case 3:Ft(Be),we();break;case 26:case 27:case 5:ti(t);break;case 4:we();break;case 31:t.memoizedState!==null&&ht(t);break;case 13:ht(t);break;case 19:H(je);break;case 10:Ft(t.type);break;case 22:case 23:ht(t),qs(),e!==null&&H(Pn);break;case 24:Ft(Be)}}function Na(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var u=l.next;n=u;do{if((n.tag&e)===e){l=void 0;var c=n.create,o=n.inst;l=c(),o.destroy=l}n=n.next}while(n!==u)}}catch(h){be(t,t.return,h)}}function Tn(e,t,n){try{var l=t.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var c=u.next;l=c;do{if((l.tag&e)===e){var o=l.inst,h=o.destroy;if(h!==void 0){o.destroy=void 0,u=t;var x=n,N=h;try{N()}catch(w){be(u,x,w)}}}l=l.next}while(l!==c)}}catch(w){be(t,t.return,w)}}function Od(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{bf(t,n)}catch(l){be(e,e.return,l)}}}function Md(e,t,n){n.props=al(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){be(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(u){be(e,t,u)}}function Ht(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(u){be(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(u){be(e,t,u)}else n.current=null}function zd(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(u){be(e,e.return,u)}}function vc(e,t,n){try{var l=e.stateNode;r0(l,e.type,n,t),l[et]=t}catch(u){be(e,e.return,u)}}function Dd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Dn(e.type)||e.tag===4}function gc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Dd(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&&Dn(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 bc(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=Qt));else if(l!==4&&(l===27&&Dn(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(bc(e,t,n),e=e.sibling;e!==null;)bc(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&&Dn(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 wd(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);$e(t,l,n),t[Qe]=e,t[et]=n}catch(c){be(e,e.return,c)}}var tn=!1,qe=!1,xc=!1,jd=typeof WeakSet=="function"?WeakSet:Set,Ge=null;function Vy(e,t){if(e=e.containerInfo,kc=du,e=Qo(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 u=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var o=0,h=-1,x=-1,N=0,w=0,L=e,O=null;t:for(;;){for(var z;L!==n||u!==0&&L.nodeType!==3||(h=o+u),L!==c||l!==0&&L.nodeType!==3||(x=o+l),L.nodeType===3&&(o+=L.nodeValue.length),(z=L.firstChild)!==null;)O=L,L=z;for(;;){if(L===e)break t;if(O===n&&++N===u&&(h=o),O===c&&++w===l&&(x=o),(z=L.nextSibling)!==null)break;L=O,O=L.parentNode}L=z}n=h===-1||x===-1?null:{start:h,end:x}}else n=null}n=n||{start:0,end:0}}else n=null;for(Vc={focusedElem:e,selectionRange:n},du=!1,Ge=t;Ge!==null;)if(t=Ge,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ge=e;else for(;Ge!==null;){switch(t=Ge,c=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++)u=e[n],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,n=t,u=c.memoizedProps,c=c.memoizedState,l=n.stateNode;try{var K=al(n.type,u);e=l.getSnapshotBeforeUpdate(K,c),l.__reactInternalSnapshotBeforeUpdate=e}catch(W){be(n,n.return,W)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Qc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qc(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,Ge=e;break}Ge=t.return}}function Ud(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:ln(e,n),l&4&&Na(5,n);break;case 1:if(ln(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(o){be(n,n.return,o)}else{var u=al(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){be(n,n.return,o)}}l&64&&Od(n),l&512&&Ra(n,n.return);break;case 3:if(ln(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{bf(e,t)}catch(o){be(n,n.return,o)}}break;case 27:t===null&&l&4&&wd(n);case 26:case 5:ln(e,n),t===null&&l&4&&zd(n),l&512&&Ra(n,n.return);break;case 12:ln(e,n);break;case 31:ln(e,n),l&4&&Hd(e,n);break;case 13:ln(e,n),l&4&&qd(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Wy.bind(null,n),v0(e,n))));break;case 22:if(l=n.memoizedState!==null||tn,!l){t=t!==null&&t.memoizedState!==null||qe,u=tn;var c=qe;tn=l,(qe=t)&&!c?an(e,n,(n.subtreeFlags&8772)!==0):ln(e,n),tn=u,qe=c}break;case 30:break;default:ln(e,n)}}function Bd(e){var t=e.alternate;t!==null&&(e.alternate=null,Bd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Fu(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 Re=null,nt=!1;function nn(e,t,n){for(n=n.child;n!==null;)Ld(e,t,n),n=n.sibling}function Ld(e,t,n){if(ct&&typeof ct.onCommitFiberUnmount=="function")try{ct.onCommitFiberUnmount(Il,n)}catch{}switch(n.tag){case 26:qe||Ht(n,t),nn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:qe||Ht(n,t);var l=Re,u=nt;Dn(n.type)&&(Re=n.stateNode,nt=!1),nn(e,t,n),La(n.stateNode),Re=l,nt=u;break;case 5:qe||Ht(n,t);case 6:if(l=Re,u=nt,Re=null,nn(e,t,n),Re=l,nt=u,Re!==null)if(nt)try{(Re.nodeType===9?Re.body:Re.nodeName==="HTML"?Re.ownerDocument.body:Re).removeChild(n.stateNode)}catch(c){be(n,t,c)}else try{Re.removeChild(n.stateNode)}catch(c){be(n,t,c)}break;case 18:Re!==null&&(nt?(e=Re,Oh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Kl(e)):Oh(Re,n.stateNode));break;case 4:l=Re,u=nt,Re=n.stateNode.containerInfo,nt=!0,nn(e,t,n),Re=l,nt=u;break;case 0:case 11:case 14:case 15:Tn(2,n,t),qe||Tn(4,n,t),nn(e,t,n);break;case 1:qe||(Ht(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&Md(n,t,l)),nn(e,t,n);break;case 21:nn(e,t,n);break;case 22:qe=(l=qe)||n.memoizedState!==null,nn(e,t,n),qe=l;break;default:nn(e,t,n)}}function Hd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Kl(e)}catch(n){be(t,t.return,n)}}}function qd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kl(e)}catch(n){be(t,t.return,n)}}function Xy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new jd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new jd),t;default:throw Error(r(435,e.tag))}}function Zi(e,t){var n=Xy(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var u=Iy.bind(null,e,l);l.then(u,u)}})}function lt(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var u=n[l],c=e,o=t,h=o;e:for(;h!==null;){switch(h.tag){case 27:if(Dn(h.type)){Re=h.stateNode,nt=!1;break e}break;case 5:Re=h.stateNode,nt=!1;break e;case 3:case 4:Re=h.stateNode.containerInfo,nt=!0;break e}h=h.return}if(Re===null)throw Error(r(160));Ld(c,o,u),Re=null,nt=!1,c=u.alternate,c!==null&&(c.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Yd(t,e),t=t.sibling}var zt=null;function Yd(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),Na(3,e),Tn(5,e,e.return));break;case 1:lt(t,e),at(e),l&512&&(qe||n===null||Ht(n,n.return)),l&64&&tn&&(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 u=zt;if(lt(t,e),at(e),l&512&&(qe||n===null||Ht(n,n.return)),l&4){var c=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,u=u.ownerDocument||u;t:switch(l){case"title":c=u.getElementsByTagName("title")[0],(!c||c[ta]||c[Qe]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=u.createElement(l),u.head.insertBefore(c,u.querySelector("head > title"))),$e(c,l,n),c[Qe]=e,Xe(c),l=c;break e;case"link":var o=Yh("link","href",u).get(l+(n.href||""));if(o){for(var h=0;h<o.length;h++)if(c=o[h],c.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&c.getAttribute("rel")===(n.rel==null?null:n.rel)&&c.getAttribute("title")===(n.title==null?null:n.title)&&c.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(h,1);break t}}c=u.createElement(l),$e(c,l,n),u.head.appendChild(c);break;case"meta":if(o=Yh("meta","content",u).get(l+(n.content||""))){for(h=0;h<o.length;h++)if(c=o[h],c.getAttribute("content")===(n.content==null?null:""+n.content)&&c.getAttribute("name")===(n.name==null?null:n.name)&&c.getAttribute("property")===(n.property==null?null:n.property)&&c.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&c.getAttribute("charset")===(n.charSet==null?null:n.charSet)){o.splice(h,1);break t}}c=u.createElement(l),$e(c,l,n),u.head.appendChild(c);break;default:throw Error(r(468,l))}c[Qe]=e,Xe(c),l=c}e.stateNode=l}else kh(u,e.type,e.stateNode);else e.stateNode=qh(u,l,e.memoizedProps);else c!==l?(c===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):c.count--,l===null?kh(u,e.type,e.stateNode):qh(u,l,e.memoizedProps)):l===null&&e.stateNode!==null&&vc(e,e.memoizedProps,n.memoizedProps)}break;case 27:lt(t,e),at(e),l&512&&(qe||n===null||Ht(n,n.return)),n!==null&&l&4&&vc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(lt(t,e),at(e),l&512&&(qe||n===null||Ht(n,n.return)),e.flags&32){u=e.stateNode;try{yl(u,"")}catch(K){be(e,e.return,K)}}l&4&&e.stateNode!=null&&(u=e.memoizedProps,vc(e,u,n!==null?n.memoizedProps:u)),l&1024&&(xc=!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(K){be(e,e.return,K)}}break;case 3:if(cu=null,u=zt,zt=uu(t.containerInfo),lt(t,e),zt=u,at(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Kl(t.containerInfo)}catch(K){be(e,e.return,K)}xc&&(xc=!1,kd(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:u=e.memoizedState!==null;var x=n!==null&&n.memoizedState!==null,N=tn,w=qe;if(tn=N||u,qe=w||x,lt(t,e),qe=w,tn=N,at(e),l&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(n===null||x||tn||qe||il(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){x=n=t;try{if(c=x.stateNode,u)o=c.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{h=x.stateNode;var L=x.memoizedProps.style,O=L!=null&&L.hasOwnProperty("display")?L.display:null;h.style.display=O==null||typeof O=="boolean"?"":(""+O).trim()}}catch(K){be(x,x.return,K)}}}else if(t.tag===6){if(n===null){x=t;try{x.stateNode.nodeValue=u?"":x.memoizedProps}catch(K){be(x,x.return,K)}}}else if(t.tag===18){if(n===null){x=t;try{var z=x.stateNode;u?Mh(z,!0):Mh(x.stateNode,!1)}catch(K){be(x,x.return,K)}}}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(Dd(l)){n=l;break}l=l.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var u=n.stateNode,c=gc(e);Qi(e,c,u);break;case 5:var o=n.stateNode;n.flags&32&&(yl(o,""),n.flags&=-33);var h=gc(e);Qi(e,h,o);break;case 3:case 4:var x=n.stateNode.containerInfo,N=gc(e);bc(e,N,x);break;default:throw Error(r(161))}}catch(w){be(e,e.return,w)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function kd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;kd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ln(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Ud(e,t.alternate,t),t=t.sibling}function il(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),il(t);break;case 1:Ht(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Md(t,t.return,n),il(t);break;case 27:La(t.stateNode);case 26:case 5:Ht(t,t.return),il(t);break;case 22:t.memoizedState===null&&il(t);break;case 30:il(t);break;default:il(t)}e=e.sibling}}function an(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,u=e,c=t,o=c.flags;switch(c.tag){case 0:case 11:case 15:an(u,c,n),Na(4,c);break;case 1:if(an(u,c,n),l=c,u=l.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(N){be(l,l.return,N)}if(l=c,u=l.updateQueue,u!==null){var h=l.stateNode;try{var x=u.shared.hiddenCallbacks;if(x!==null)for(u.shared.hiddenCallbacks=null,u=0;u<x.length;u++)gf(x[u],h)}catch(N){be(l,l.return,N)}}n&&o&64&&Od(c),Ra(c,c.return);break;case 27:wd(c);case 26:case 5:an(u,c,n),n&&l===null&&o&4&&zd(c),Ra(c,c.return);break;case 12:an(u,c,n);break;case 31:an(u,c,n),n&&o&4&&Hd(u,c);break;case 13:an(u,c,n),n&&o&4&&qd(u,c);break;case 22:c.memoizedState===null&&an(u,c,n),Ra(c,c.return);break;case 30:break;default:an(u,c,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&&ma(n))}function Ec(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ma(e))}function Dt(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Vd(e,t,n,l),t=t.sibling}function Vd(e,t,n,l){var u=t.flags;switch(t.tag){case 0:case 11:case 15:Dt(e,t,n,l),u&2048&&Na(9,t);break;case 1:Dt(e,t,n,l);break;case 3:Dt(e,t,n,l),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ma(e)));break;case 12:if(u&2048){Dt(e,t,n,l),e=t.stateNode;try{var c=t.memoizedProps,o=c.id,h=c.onPostCommit;typeof h=="function"&&h(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(x){be(t,t.return,x)}}else Dt(e,t,n,l);break;case 31:Dt(e,t,n,l);break;case 13:Dt(e,t,n,l);break;case 23:break;case 22:c=t.stateNode,o=t.alternate,t.memoizedState!==null?c._visibility&2?Dt(e,t,n,l):Oa(e,t):c._visibility&2?Dt(e,t,n,l):(c._visibility|=2,Bl(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),u&2048&&Sc(o,t);break;case 24:Dt(e,t,n,l),u&2048&&Ec(t.alternate,t);break;default:Dt(e,t,n,l)}}function Bl(e,t,n,l,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,o=t,h=n,x=l,N=o.flags;switch(o.tag){case 0:case 11:case 15:Bl(c,o,h,x,u),Na(8,o);break;case 23:break;case 22:var w=o.stateNode;o.memoizedState!==null?w._visibility&2?Bl(c,o,h,x,u):Oa(c,o):(w._visibility|=2,Bl(c,o,h,x,u)),u&&N&2048&&Sc(o.alternate,o);break;case 24:Bl(c,o,h,x,u),u&&N&2048&&Ec(o.alternate,o);break;default:Bl(c,o,h,x,u)}t=t.sibling}}function Oa(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,u=l.flags;switch(l.tag){case 22:Oa(n,l),u&2048&&Sc(l.alternate,l);break;case 24:Oa(n,l),u&2048&&Ec(l.alternate,l);break;default:Oa(n,l)}t=t.sibling}}var Ma=8192;function Ll(e,t,n){if(e.subtreeFlags&Ma)for(e=e.child;e!==null;)Xd(e,t,n),e=e.sibling}function Xd(e,t,n){switch(e.tag){case 26:Ll(e,t,n),e.flags&Ma&&e.memoizedState!==null&&O0(n,zt,e.memoizedState,e.memoizedProps);break;case 5:Ll(e,t,n);break;case 3:case 4:var l=zt;zt=uu(e.stateNode.containerInfo),Ll(e,t,n),zt=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Ma,Ma=16777216,Ll(e,t,n),Ma=l):Ll(e,t,n));break;default:Ll(e,t,n)}}function Gd(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];Ge=l,Zd(l,e)}Gd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Qd(e),e=e.sibling}function Qd(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];Ge=l,Zd(l,e)}Gd(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 Zd(e,t){for(;Ge!==null;){var n=Ge;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:ma(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,Ge=l;else e:for(n=e;Ge!==null;){l=Ge;var u=l.sibling,c=l.return;if(Bd(l),l===n){Ge=null;break e}if(u!==null){u.return=c,Ge=u;break e}Ge=c}}}var Gy={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}},Qy=typeof WeakMap=="function"?WeakMap:Map,ye=0,Te=null,ce=null,oe=0,ge=0,mt=null,Cn=!1,Hl=!1,_c=!1,un=0,De=0,Nn=0,ul=0,Ac=0,pt=0,ql=0,Da=null,it=null,Tc=!1,Ji=0,Kd=0,$i=1/0,Fi=null,Rn=null,ke=0,On=null,Yl=null,sn=0,Cc=0,Nc=null,Jd=null,wa=0,Rc=null;function yt(){return(ye&2)!==0&&oe!==0?oe&-oe:j.T!==null?jc():co()}function $d(){if(pt===0)if((oe&536870912)===0||de){var e=ai;ai<<=1,(ai&3932160)===0&&(ai=262144),pt=e}else pt=536870912;return e=dt.current,e!==null&&(e.flags|=32),pt}function ut(e,t,n){(e===Te&&(ge===2||ge===9)||e.cancelPendingCommit!==null)&&(kl(e,0),Mn(e,oe,pt,!1)),ea(e,n),((ye&2)===0||e!==Te)&&(e===Te&&((ye&2)===0&&(ul|=n),De===4&&Mn(e,oe,pt,!1)),qt(e))}function Fd(e,t,n){if((ye&6)!==0)throw Error(r(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Pl(e,t),u=l?Jy(e,t):Mc(e,t,!0),c=l;do{if(u===0){Hl&&!l&&Mn(e,t,0,!1);break}else{if(n=e.current.alternate,c&&!Zy(n)){u=Mc(e,t,!1),c=!1;continue}if(u===2){if(c=t,e.errorRecoveryDisabledLanes&c)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var h=e;u=Da;var x=h.current.memoizedState.isDehydrated;if(x&&(kl(h,o).flags|=256),o=Mc(h,o,!1),o!==2){if(_c&&!x){h.errorRecoveryDisabledLanes|=c,ul|=c,u=4;break e}c=it,it=u,c!==null&&(it===null?it=c:it.push.apply(it,c))}u=o}if(c=!1,u!==2)continue}}if(u===1){kl(e,0),Mn(e,t,0,!0);break}e:{switch(l=e,c=u,c){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Mn(l,t,pt,!Cn);break e;case 2:it=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(u=Ji+300-st(),10<u)){if(Mn(l,t,pt,!Cn),ui(l,0,!0)!==0)break e;sn=t,l.timeoutHandle=Nh(Wd.bind(null,l,n,it,Fi,Tc,t,pt,ul,ql,Cn,c,"Throttled",-0,0),u);break e}Wd(l,n,it,Fi,Tc,t,pt,ul,ql,Cn,c,null,-0,0)}}break}while(!0);qt(e)}function Wd(e,t,n,l,u,c,o,h,x,N,w,L,O,z){if(e.timeoutHandle=-1,L=t.subtreeFlags,L&8192||(L&16785408)===16785408){L={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qt},Xd(t,c,L);var K=(c&62914560)===c?Ji-st():(c&4194048)===c?Kd-st():0;if(K=M0(L,K),K!==null){sn=c,e.cancelPendingCommit=K(ih.bind(null,e,t,c,n,l,u,o,h,x,w,L,null,O,z)),Mn(e,c,o,!N);return}}ih(e,t,c,n,l,u,o,h,x)}function Zy(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 u=n[l],c=u.getSnapshot;u=u.value;try{if(!ot(c(),u))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 Mn(e,t,n,l){t&=~Ac,t&=~ul,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var u=t;0<u;){var c=31-rt(u),o=1<<c;l[c]=-1,u&=~o}n!==0&&io(e,n,t)}function Wi(){return(ye&6)===0?(ja(0),!1):!0}function Oc(){if(ce!==null){if(ge===0)var e=ce.return;else e=ce,$t=Wn=null,Qs(e),zl=null,ya=0,e=ce;for(;e!==null;)Rd(e.alternate,e),e=e.return;ce=null}}function kl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,d0(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),sn=0,Oc(),Te=e,ce=n=Kt(e.current,null),oe=t,ge=0,mt=null,Cn=!1,Hl=Pl(e,t),_c=!1,ql=pt=Ac=ul=Nn=De=0,it=Da=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 u=31-rt(l),c=1<<u;t|=e[u],l&=~c}return un=t,gi(),n}function Id(e,t){le=null,j.H=Aa,t===Ml||t===Ci?(t=mf(),ge=3):t===ws?(t=mf(),ge=4):ge=t===sc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,mt=t,ce===null&&(De=1,Yi(e,St(t,e.current)))}function Pd(){var e=dt.current;return e===null?!0:(oe&4194048)===oe?Tt===null:(oe&62914560)===oe||(oe&536870912)!==0?e===Tt:!1}function eh(){var e=j.H;return j.H=Aa,e===null?Aa:e}function th(){var e=j.A;return j.A=Gy,e}function Ii(){De=4,Cn||(oe&4194048)!==oe&&dt.current!==null||(Hl=!0),(Nn&134217727)===0&&(ul&134217727)===0||Te===null||Mn(Te,oe,pt,!1)}function Mc(e,t,n){var l=ye;ye|=2;var u=eh(),c=th();(Te!==e||oe!==t)&&(Fi=null,kl(e,t)),t=!1;var o=De;e:do try{if(ge!==0&&ce!==null){var h=ce,x=mt;switch(ge){case 8:Oc(),o=6;break e;case 3:case 2:case 9:case 6:dt.current===null&&(t=!0);var N=ge;if(ge=0,mt=null,Vl(e,h,x,N),n&&Hl){o=0;break e}break;default:N=ge,ge=0,mt=null,Vl(e,h,x,N)}}Ky(),o=De;break}catch(w){Id(e,w)}while(!0);return t&&e.shellSuspendCounter++,$t=Wn=null,ye=l,j.H=u,j.A=c,ce===null&&(Te=null,oe=0,gi()),o}function Ky(){for(;ce!==null;)nh(ce)}function Jy(e,t){var n=ye;ye|=2;var l=eh(),u=th();Te!==e||oe!==t?(Fi=null,$i=st()+500,kl(e,t)):Hl=Pl(e,t);e:do try{if(ge!==0&&ce!==null){t=ce;var c=mt;t:switch(ge){case 1:ge=0,mt=null,Vl(e,t,c,1);break;case 2:case 9:if(df(c)){ge=0,mt=null,lh(t);break}t=function(){ge!==2&&ge!==9||Te!==e||(ge=7),qt(e)},c.then(t,t);break e;case 3:ge=7;break e;case 4:ge=5;break e;case 7:df(c)?(ge=0,mt=null,lh(t)):(ge=0,mt=null,Vl(e,t,c,7));break;case 5:var o=null;switch(ce.tag){case 26:o=ce.memoizedState;case 5:case 27:var h=ce;if(o?Vh(o):h.stateNode.complete){ge=0,mt=null;var x=h.sibling;if(x!==null)ce=x;else{var N=h.return;N!==null?(ce=N,Pi(N)):ce=null}break t}}ge=0,mt=null,Vl(e,t,c,5);break;case 6:ge=0,mt=null,Vl(e,t,c,6);break;case 8:Oc(),De=6;break e;default:throw Error(r(462))}}$y();break}catch(w){Id(e,w)}while(!0);return $t=Wn=null,j.H=l,j.A=u,ye=n,ce!==null?0:(Te=null,oe=0,gi(),De)}function $y(){for(;ce!==null&&!gp();)nh(ce)}function nh(e){var t=Cd(e.alternate,e,un);e.memoizedProps=e.pendingProps,t===null?Pi(e):ce=t}function lh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=xd(n,t,t.pendingProps,t.type,void 0,oe);break;case 11:t=xd(n,t,t.pendingProps,t.type.render,t.ref,oe);break;case 5:Qs(t);default:Rd(n,t),t=ce=ef(t,un),t=Cd(n,t,un)}e.memoizedProps=e.pendingProps,t===null?Pi(e):ce=t}function Vl(e,t,n,l){$t=Wn=null,Qs(t),zl=null,ya=0;var u=t.return;try{if(Ly(e,u,t,n,oe)){De=1,Yi(e,St(n,e.current)),ce=null;return}}catch(c){if(u!==null)throw ce=u,c;De=1,Yi(e,St(n,e.current)),ce=null;return}t.flags&32768?(de||l===1?e=!0:Hl||(oe&536870912)!==0?e=!1:(Cn=e=!0,(l===2||l===9||l===3||l===6)&&(l=dt.current,l!==null&&l.tag===13&&(l.flags|=16384))),ah(t,e)):Pi(t)}function Pi(e){var t=e;do{if((t.flags&32768)!==0){ah(t,Cn);return}e=t.return;var n=Yy(t.alternate,t,un);if(n!==null){ce=n;return}if(t=t.sibling,t!==null){ce=t;return}ce=t=e}while(t!==null);De===0&&(De=5)}function ah(e,t){do{var n=ky(e.alternate,e);if(n!==null){n.flags&=32767,ce=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ce=e;return}ce=e=n}while(e!==null);De=6,ce=null}function ih(e,t,n,l,u,c,o,h,x){e.cancelPendingCommit=null;do eu();while(ke!==0);if((ye&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(c=t.lanes|t.childLanes,c|=gs,Rp(e,n,c,o,h,x),e===Te&&(ce=Te=null,oe=0),Yl=t,On=e,sn=n,Cc=c,Nc=u,Jd=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Py(ni,function(){return oh(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=j.T,j.T=null,u=X.p,X.p=2,o=ye,ye|=4;try{Vy(e,t,n)}finally{ye=o,X.p=u,j.T=l}}ke=1,uh(),sh(),ch()}}function uh(){if(ke===1){ke=0;var e=On,t=Yl,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 u=ye;ye|=4;try{Yd(t,e);var c=Vc,o=Qo(e.containerInfo),h=c.focusedElem,x=c.selectionRange;if(o!==h&&h&&h.ownerDocument&&Go(h.ownerDocument.documentElement,h)){if(x!==null&&hs(h)){var N=x.start,w=x.end;if(w===void 0&&(w=N),"selectionStart"in h)h.selectionStart=N,h.selectionEnd=Math.min(w,h.value.length);else{var L=h.ownerDocument||document,O=L&&L.defaultView||window;if(O.getSelection){var z=O.getSelection(),K=h.textContent.length,W=Math.min(x.start,K),_e=x.end===void 0?W:Math.min(x.end,K);!z.extend&&W>_e&&(o=_e,_e=W,W=o);var _=Xo(h,W),S=Xo(h,_e);if(_&&S&&(z.rangeCount!==1||z.anchorNode!==_.node||z.anchorOffset!==_.offset||z.focusNode!==S.node||z.focusOffset!==S.offset)){var C=L.createRange();C.setStart(_.node,_.offset),z.removeAllRanges(),W>_e?(z.addRange(C),z.extend(S.node,S.offset)):(C.setEnd(S.node,S.offset),z.addRange(C))}}}}for(L=[],z=h;z=z.parentNode;)z.nodeType===1&&L.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<L.length;h++){var U=L[h];U.element.scrollLeft=U.left,U.element.scrollTop=U.top}}du=!!kc,Vc=kc=null}finally{ye=u,X.p=l,j.T=n}}e.current=t,ke=2}}function sh(){if(ke===2){ke=0;var e=On,t=Yl,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 u=ye;ye|=4;try{Ud(e,t.alternate,t)}finally{ye=u,X.p=l,j.T=n}}ke=3}}function ch(){if(ke===4||ke===3){ke=0,bp();var e=On,t=Yl,n=sn,l=Jd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ke=5:(ke=0,Yl=On=null,rh(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Rn=null),Ju(n),t=t.stateNode,ct&&typeof ct.onCommitFiberRoot=="function")try{ct.onCommitFiberRoot(Il,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=j.T,u=X.p,X.p=2,j.T=null;try{for(var c=e.onRecoverableError,o=0;o<l.length;o++){var h=l[o];c(h.value,{componentStack:h.stack})}}finally{j.T=t,X.p=u}}(sn&3)!==0&&eu(),qt(e),u=e.pendingLanes,(n&261930)!==0&&(u&42)!==0?e===Rc?wa++:(wa=0,Rc=e):wa=0,ja(0)}}function rh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ma(t)))}function eu(){return uh(),sh(),ch(),oh()}function oh(){if(ke!==5)return!1;var e=On,t=Cc;Cc=0;var n=Ju(sn),l=j.T,u=X.p;try{X.p=32>n?32:n,j.T=null,n=Nc,Nc=null;var c=On,o=sn;if(ke=0,Yl=On=null,sn=0,(ye&6)!==0)throw Error(r(331));var h=ye;if(ye|=4,Qd(c.current),Vd(c,c.current,o,n),ye=h,ja(0,!1),ct&&typeof ct.onPostCommitFiberRoot=="function")try{ct.onPostCommitFiberRoot(Il,c)}catch{}return!0}finally{X.p=u,j.T=l,rh(e,t)}}function fh(e,t,n){t=St(n,t),t=uc(e.stateNode,t,2),e=En(e,t,2),e!==null&&(ea(e,2),qt(e))}function be(e,t,n){if(e.tag===3)fh(e,e,n);else for(;t!==null;){if(t.tag===3){fh(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=dd(2),l=En(t,n,2),l!==null&&(hd(n,l,t,e),ea(l,2),qt(l));break}}t=t.return}}function zc(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new Qy;var u=new Set;l.set(t,u)}else u=l.get(t),u===void 0&&(u=new Set,l.set(t,u));u.has(n)||(_c=!0,u.add(n),e=Fy.bind(null,e,t,n),t.then(e,e))}function Fy(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Te===e&&(oe&n)===n&&(De===4||De===3&&(oe&62914560)===oe&&300>st()-Ji?(ye&2)===0&&kl(e,0):Ac|=n,ql===oe&&(ql=0)),qt(e)}function dh(e,t){t===0&&(t=ao()),e=Jn(e,t),e!==null&&(ea(e,t),qt(e))}function Wy(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),dh(e,n)}function Iy(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,u=e.memoizedState;u!==null&&(n=u.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),dh(e,n)}function Py(e,t){return Gu(e,t)}var tu=null,Xl=null,Dc=!1,nu=!1,wc=!1,zn=0;function qt(e){e!==Xl&&e.next===null&&(Xl===null?tu=Xl=e:Xl=Xl.next=e),nu=!0,Dc||(Dc=!0,t0())}function ja(e,t){if(!wc&&nu){wc=!0;do for(var n=!1,l=tu;l!==null;){if(e!==0){var u=l.pendingLanes;if(u===0)var c=0;else{var o=l.suspendedLanes,h=l.pingedLanes;c=(1<<31-rt(42|e)+1)-1,c&=u&~(o&~h),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,yh(l,c))}else c=oe,c=ui(l,l===Te?c:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(c&3)===0||Pl(l,c)||(n=!0,yh(l,c));l=l.next}while(n);wc=!1}}function e0(){hh()}function hh(){nu=Dc=!1;var e=0;zn!==0&&f0()&&(e=zn);for(var t=st(),n=null,l=tu;l!==null;){var u=l.next,c=mh(l,t);c===0?(l.next=null,n===null?tu=u:n.next=u,u===null&&(Xl=n)):(n=l,(e!==0||(c&3)!==0)&&(nu=!0)),l=u}ke!==0&&ke!==5||ja(e),zn!==0&&(zn=0)}function mh(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,u=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var o=31-rt(c),h=1<<o,x=u[o];x===-1?((h&n)===0||(h&l)!==0)&&(u[o]=Np(h,t)):x<=t&&(e.expiredLanes|=h),c&=~h}if(t=Te,n=oe,n=ui(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(ge===2||ge===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Qu(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&&Qu(l),Ju(n)){case 2:case 8:n=no;break;case 32:n=ni;break;case 268435456:n=lo;break;default:n=ni}return l=ph.bind(null,e),n=Gu(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&Qu(l),e.callbackPriority=2,e.callbackNode=null,2}function ph(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=oe;return l=ui(e,e===Te?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Fd(e,l,t),mh(e,st()),e.callbackNode!=null&&e.callbackNode===n?ph.bind(null,e):null)}function yh(e,t){if(eu())return null;Fd(e,t,!0)}function t0(){h0(function(){(ye&6)!==0?Gu(to,e0):hh()})}function jc(){if(zn===0){var e=Rl;e===0&&(e=li,li<<=1,(li&261888)===0&&(li=256)),zn=e}return zn}function vh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:oi(""+e)}function gh(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 n0(e,t,n,l,u){if(t==="submit"&&n&&n.stateNode===u){var c=vh((u[et]||null).action),o=l.submitter;o&&(t=(t=o[et]||null)?vh(t.formAction):o.getAttribute("formAction"),t!==null&&(c=t,o=null));var h=new mi("action","action",null,l,u);e.push({event:h,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(zn!==0){var x=o?gh(u,o):new FormData(u);ec(n,{pending:!0,data:x,method:u.method,action:c},null,x)}}else typeof c=="function"&&(h.preventDefault(),x=o?gh(u,o):new FormData(u),ec(n,{pending:!0,data:x,method:u.method,action:c},c,x))},currentTarget:u}]})}}for(var Uc=0;Uc<vs.length;Uc++){var Bc=vs[Uc],l0=Bc.toLowerCase(),a0=Bc[0].toUpperCase()+Bc.slice(1);Mt(l0,"on"+a0)}Mt(Jo,"onAnimationEnd"),Mt($o,"onAnimationIteration"),Mt(Fo,"onAnimationStart"),Mt("dblclick","onDoubleClick"),Mt("focusin","onFocus"),Mt("focusout","onBlur"),Mt(xy,"onTransitionRun"),Mt(Sy,"onTransitionStart"),Mt(Ey,"onTransitionCancel"),Mt(Wo,"onTransitionEnd"),ml("onMouseEnter",["mouseout","mouseover"]),ml("onMouseLeave",["mouseout","mouseover"]),ml("onPointerEnter",["pointerout","pointerover"]),ml("onPointerLeave",["pointerout","pointerover"]),Gn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Gn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Gn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Gn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Gn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Gn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ua="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(" "),i0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ua));function bh(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],u=l.event;l=l.listeners;e:{var c=void 0;if(t)for(var o=l.length-1;0<=o;o--){var h=l[o],x=h.instance,N=h.currentTarget;if(h=h.listener,x!==c&&u.isPropagationStopped())break e;c=h,u.currentTarget=N;try{c(u)}catch(w){vi(w)}u.currentTarget=null,c=x}else for(o=0;o<l.length;o++){if(h=l[o],x=h.instance,N=h.currentTarget,h=h.listener,x!==c&&u.isPropagationStopped())break e;c=h,u.currentTarget=N;try{c(u)}catch(w){vi(w)}u.currentTarget=null,c=x}}}}function re(e,t){var n=t[$u];n===void 0&&(n=t[$u]=new Set);var l=e+"__bubble";n.has(l)||(xh(t,e,2,!1),n.add(l))}function Lc(e,t,n){var l=0;t&&(l|=4),xh(n,e,l,t)}var lu="_reactListening"+Math.random().toString(36).slice(2);function Hc(e){if(!e[lu]){e[lu]=!0,fo.forEach(function(n){n!=="selectionchange"&&(i0.has(n)||Lc(n,!1,e),Lc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[lu]||(t[lu]=!0,Lc("selectionchange",!1,t))}}function xh(e,t,n,l){switch($h(t)){case 2:var u=w0;break;case 8:u=j0;break;default:u=Pc}n=u.bind(null,t,n,e),u=void 0,!as||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),l?u!==void 0?e.addEventListener(t,n,{capture:!0,passive:u}):e.addEventListener(t,n,!0):u!==void 0?e.addEventListener(t,n,{passive:u}):e.addEventListener(t,n,!1)}function qc(e,t,n,l,u){var c=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 h=l.stateNode.containerInfo;if(h===u)break;if(o===4)for(o=l.return;o!==null;){var x=o.tag;if((x===3||x===4)&&o.stateNode.containerInfo===u)return;o=o.return}for(;h!==null;){if(o=fl(h),o===null)return;if(x=o.tag,x===5||x===6||x===26||x===27){l=c=o;continue e}h=h.parentNode}}l=l.return}Ao(function(){var N=c,w=ns(n),L=[];e:{var O=Io.get(e);if(O!==void 0){var z=mi,K=e;switch(e){case"keypress":if(di(n)===0)break e;case"keydown":case"keyup":z=Ip;break;case"focusin":K="focus",z=cs;break;case"focusout":K="blur",z=cs;break;case"beforeblur":case"afterblur":z=cs;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":z=No;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=Yp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=ty;break;case Jo:case $o:case Fo:z=Xp;break;case Wo:z=ly;break;case"scroll":case"scrollend":z=Hp;break;case"wheel":z=iy;break;case"copy":case"cut":case"paste":z=Qp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=Oo;break;case"toggle":case"beforetoggle":z=sy}var W=(t&4)!==0,_e=!W&&(e==="scroll"||e==="scrollend"),_=W?O!==null?O+"Capture":null:O;W=[];for(var S=N,C;S!==null;){var U=S;if(C=U.stateNode,U=U.tag,U!==5&&U!==26&&U!==27||C===null||_===null||(U=la(S,_),U!=null&&W.push(Ba(S,U,C))),_e)break;S=S.return}0<W.length&&(O=new z(O,K,null,n,w),L.push({event:O,listeners:W}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",z=e==="mouseout"||e==="pointerout",O&&n!==ts&&(K=n.relatedTarget||n.fromElement)&&(fl(K)||K[ol]))break e;if((z||O)&&(O=w.window===w?w:(O=w.ownerDocument)?O.defaultView||O.parentWindow:window,z?(K=n.relatedTarget||n.toElement,z=N,K=K?fl(K):null,K!==null&&(_e=d(K),W=K.tag,K!==_e||W!==5&&W!==27&&W!==6)&&(K=null)):(z=null,K=N),z!==K)){if(W=No,U="onMouseLeave",_="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(W=Oo,U="onPointerLeave",_="onPointerEnter",S="pointer"),_e=z==null?O:na(z),C=K==null?O:na(K),O=new W(U,S+"leave",z,n,w),O.target=_e,O.relatedTarget=C,U=null,fl(w)===N&&(W=new W(_,S+"enter",K,n,w),W.target=C,W.relatedTarget=_e,U=W),_e=U,z&&K)t:{for(W=u0,_=z,S=K,C=0,U=_;U;U=W(U))C++;U=0;for(var F=S;F;F=W(F))U++;for(;0<C-U;)_=W(_),C--;for(;0<U-C;)S=W(S),U--;for(;C--;){if(_===S||S!==null&&_===S.alternate){W=_;break t}_=W(_),S=W(S)}W=null}else W=null;z!==null&&Sh(L,O,z,W,!1),K!==null&&_e!==null&&Sh(L,_e,K,W,!0)}}e:{if(O=N?na(N):window,z=O.nodeName&&O.nodeName.toLowerCase(),z==="select"||z==="input"&&O.type==="file")var me=Lo;else if(Uo(O))if(Ho)me=vy;else{me=py;var $=my}else z=O.nodeName,!z||z.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?N&&es(N.elementType)&&(me=Lo):me=yy;if(me&&(me=me(e,N))){Bo(L,me,n,w);break e}$&&$(e,O,N),e==="focusout"&&N&&O.type==="number"&&N.memoizedProps.value!=null&&Pu(O,"number",O.value)}switch($=N?na(N):window,e){case"focusin":(Uo($)||$.contentEditable==="true")&&(xl=$,ms=N,fa=null);break;case"focusout":fa=ms=xl=null;break;case"mousedown":ps=!0;break;case"contextmenu":case"mouseup":case"dragend":ps=!1,Zo(L,n,w);break;case"selectionchange":if(by)break;case"keydown":case"keyup":Zo(L,n,w)}var ie;if(os)e:{switch(e){case"compositionstart":var fe="onCompositionStart";break e;case"compositionend":fe="onCompositionEnd";break e;case"compositionupdate":fe="onCompositionUpdate";break e}fe=void 0}else bl?wo(e,n)&&(fe="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(fe="onCompositionStart");fe&&(Mo&&n.locale!=="ko"&&(bl||fe!=="onCompositionStart"?fe==="onCompositionEnd"&&bl&&(ie=To()):(pn=w,is="value"in pn?pn.value:pn.textContent,bl=!0)),$=au(N,fe),0<$.length&&(fe=new Ro(fe,e,null,n,w),L.push({event:fe,listeners:$}),ie?fe.data=ie:(ie=jo(n),ie!==null&&(fe.data=ie)))),(ie=ry?oy(e,n):fy(e,n))&&(fe=au(N,"onBeforeInput"),0<fe.length&&($=new Ro("onBeforeInput","beforeinput",null,n,w),L.push({event:$,listeners:fe}),$.data=ie)),n0(L,e,N,n,w)}bh(L,t)})}function Ba(e,t,n){return{instance:e,listener:t,currentTarget:n}}function au(e,t){for(var n=t+"Capture",l=[];e!==null;){var u=e,c=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||c===null||(u=la(e,n),u!=null&&l.unshift(Ba(e,u,c)),u=la(e,t),u!=null&&l.push(Ba(e,u,c))),e.tag===3)return l;e=e.return}return[]}function u0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Sh(e,t,n,l,u){for(var c=t._reactName,o=[];n!==null&&n!==l;){var h=n,x=h.alternate,N=h.stateNode;if(h=h.tag,x!==null&&x===l)break;h!==5&&h!==26&&h!==27||N===null||(x=N,u?(N=la(n,c),N!=null&&o.unshift(Ba(n,N,x))):u||(N=la(n,c),N!=null&&o.push(Ba(n,N,x)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var s0=/\r\n?/g,c0=/\u0000|\uFFFD/g;function Eh(e){return(typeof e=="string"?e:""+e).replace(s0,`
|
||
`).replace(c0,"")}function _h(e,t){return t=Eh(t),Eh(e)===t}function Ee(e,t,n,l,u,c){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||yl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&yl(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":Eo(e,l,c);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 c=="function"&&(n==="formAction"?(t!=="input"&&Ee(e,t,"name",u.name,u,null),Ee(e,t,"formEncType",u.formEncType,u,null),Ee(e,t,"formMethod",u.formMethod,u,null),Ee(e,t,"formTarget",u.formTarget,u,null)):(Ee(e,t,"encType",u.encType,u,null),Ee(e,t,"method",u.method,u,null),Ee(e,t,"target",u.target,u,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=Qt);break;case"onScroll":l!=null&&re("scroll",e);break;case"onScrollEnd":l!=null&&re("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(u.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":re("beforetoggle",e),re("toggle",e),si(e,"popover",l);break;case"xlinkActuate":Gt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Gt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Gt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Gt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Gt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Gt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Gt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Gt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Gt(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=Bp.get(n)||n,si(e,n,l))}}function Yc(e,t,n,l,u,c){switch(n){case"style":Eo(e,l,c);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(n=l.__html,n!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"children":typeof l=="string"?yl(e,l):(typeof l=="number"||typeof l=="bigint")&&yl(e,""+l);break;case"onScroll":l!=null&&re("scroll",e);break;case"onScrollEnd":l!=null&&re("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Qt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ho.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(u=n.endsWith("Capture"),t=n.slice(2,u?n.length-7:void 0),c=e[et]||null,c=c!=null?c[n]:null,typeof c=="function"&&e.removeEventListener(t,c,u),typeof l=="function")){typeof c!="function"&&c!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,u);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":re("error",e),re("load",e);var l=!1,u=!1,c;for(c in n)if(n.hasOwnProperty(c)){var o=n[c];if(o!=null)switch(c){case"src":l=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ee(e,t,c,o,n,null)}}u&&Ee(e,t,"srcSet",n.srcSet,n,null),l&&Ee(e,t,"src",n.src,n,null);return;case"input":re("invalid",e);var h=c=o=u=null,x=null,N=null;for(l in n)if(n.hasOwnProperty(l)){var w=n[l];if(w!=null)switch(l){case"name":u=w;break;case"type":o=w;break;case"checked":x=w;break;case"defaultChecked":N=w;break;case"value":c=w;break;case"defaultValue":h=w;break;case"children":case"dangerouslySetInnerHTML":if(w!=null)throw Error(r(137,t));break;default:Ee(e,t,l,w,n,null)}}go(e,c,h,x,N,o,u,!1);return;case"select":re("invalid",e),l=o=c=null;for(u in n)if(n.hasOwnProperty(u)&&(h=n[u],h!=null))switch(u){case"value":c=h;break;case"defaultValue":o=h;break;case"multiple":l=h;default:Ee(e,t,u,h,n,null)}t=c,n=o,e.multiple=!!l,t!=null?pl(e,!!l,t,!1):n!=null&&pl(e,!!l,n,!0);return;case"textarea":re("invalid",e),c=u=l=null;for(o in n)if(n.hasOwnProperty(o)&&(h=n[o],h!=null))switch(o){case"value":l=h;break;case"defaultValue":u=h;break;case"children":c=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(r(91));break;default:Ee(e,t,o,h,n,null)}xo(e,l,u,c);return;case"option":for(x in n)if(n.hasOwnProperty(x)&&(l=n[x],l!=null))switch(x){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Ee(e,t,x,l,n,null)}return;case"dialog":re("beforetoggle",e),re("toggle",e),re("cancel",e),re("close",e);break;case"iframe":case"object":re("load",e);break;case"video":case"audio":for(l=0;l<Ua.length;l++)re(Ua[l],e);break;case"image":re("error",e),re("load",e);break;case"details":re("toggle",e);break;case"embed":case"source":case"link":re("error",e),re("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:Ee(e,t,N,l,n,null)}return;default:if(es(t)){for(w in n)n.hasOwnProperty(w)&&(l=n[w],l!==void 0&&Yc(e,t,w,l,n,void 0));return}}for(h in n)n.hasOwnProperty(h)&&(l=n[h],l!=null&&Ee(e,t,h,l,n,null))}function r0(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 u=null,c=null,o=null,h=null,x=null,N=null,w=null;for(z in n){var L=n[z];if(n.hasOwnProperty(z)&&L!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":x=L;default:l.hasOwnProperty(z)||Ee(e,t,z,null,l,L)}}for(var O in l){var z=l[O];if(L=n[O],l.hasOwnProperty(O)&&(z!=null||L!=null))switch(O){case"type":c=z;break;case"name":u=z;break;case"checked":N=z;break;case"defaultChecked":w=z;break;case"value":o=z;break;case"defaultValue":h=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(137,t));break;default:z!==L&&Ee(e,t,O,z,l,L)}}Iu(e,o,h,x,N,w,c,u);return;case"select":z=o=h=O=null;for(c in n)if(x=n[c],n.hasOwnProperty(c)&&x!=null)switch(c){case"value":break;case"multiple":z=x;default:l.hasOwnProperty(c)||Ee(e,t,c,null,l,x)}for(u in l)if(c=l[u],x=n[u],l.hasOwnProperty(u)&&(c!=null||x!=null))switch(u){case"value":O=c;break;case"defaultValue":h=c;break;case"multiple":o=c;default:c!==x&&Ee(e,t,u,c,l,x)}t=h,n=o,l=z,O!=null?pl(e,!!n,O,!1):!!l!=!!n&&(t!=null?pl(e,!!n,t,!0):pl(e,!!n,n?[]:"",!1));return;case"textarea":z=O=null;for(h in n)if(u=n[h],n.hasOwnProperty(h)&&u!=null&&!l.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:Ee(e,t,h,null,l,u)}for(o in l)if(u=l[o],c=n[o],l.hasOwnProperty(o)&&(u!=null||c!=null))switch(o){case"value":O=u;break;case"defaultValue":z=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(r(91));break;default:u!==c&&Ee(e,t,o,u,l,c)}bo(e,O,z);return;case"option":for(var K in n)if(O=n[K],n.hasOwnProperty(K)&&O!=null&&!l.hasOwnProperty(K))switch(K){case"selected":e.selected=!1;break;default:Ee(e,t,K,null,l,O)}for(x in l)if(O=l[x],z=n[x],l.hasOwnProperty(x)&&O!==z&&(O!=null||z!=null))switch(x){case"selected":e.selected=O&&typeof O!="function"&&typeof O!="symbol";break;default:Ee(e,t,x,O,l,z)}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)&&Ee(e,t,W,null,l,O);for(N in l)if(O=l[N],z=n[N],l.hasOwnProperty(N)&&O!==z&&(O!=null||z!=null))switch(N){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:Ee(e,t,N,O,l,z)}return;default:if(es(t)){for(var _e in n)O=n[_e],n.hasOwnProperty(_e)&&O!==void 0&&!l.hasOwnProperty(_e)&&Yc(e,t,_e,void 0,l,O);for(w in l)O=l[w],z=n[w],!l.hasOwnProperty(w)||O===z||O===void 0&&z===void 0||Yc(e,t,w,O,l,z);return}}for(var _ in n)O=n[_],n.hasOwnProperty(_)&&O!=null&&!l.hasOwnProperty(_)&&Ee(e,t,_,null,l,O);for(L in l)O=l[L],z=n[L],!l.hasOwnProperty(L)||O===z||O==null&&z==null||Ee(e,t,L,O,l,z)}function Ah(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function o0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var u=n[l],c=u.transferSize,o=u.initiatorType,h=u.duration;if(c&&h&&Ah(o)){for(o=0,h=u.responseEnd,l+=1;l<n.length;l++){var x=n[l],N=x.startTime;if(N>h)break;var w=x.transferSize,L=x.initiatorType;w&&Ah(L)&&(x=x.responseEnd,o+=w*(x<h?1:(h-N)/(x-N)))}if(--l,t+=8*(c+o)/(u.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var kc=null,Vc=null;function iu(e){return e.nodeType===9?e:e.ownerDocument}function Th(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 Ch(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 f0(){var e=window.event;return e&&e.type==="popstate"?e===Gc?!1:(Gc=e,!0):(Gc=null,!1)}var Nh=typeof setTimeout=="function"?setTimeout:void 0,d0=typeof clearTimeout=="function"?clearTimeout:void 0,Rh=typeof Promise=="function"?Promise:void 0,h0=typeof queueMicrotask=="function"?queueMicrotask:typeof Rh<"u"?function(e){return Rh.resolve(null).then(e).catch(m0)}:Nh;function m0(e){setTimeout(function(){throw e})}function Dn(e){return e==="head"}function Oh(e,t){var n=t,l=0;do{var u=n.nextSibling;if(e.removeChild(n),u&&u.nodeType===8)if(n=u.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(u),Kl(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")La(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,La(n);for(var c=n.firstChild;c;){var o=c.nextSibling,h=c.nodeName;c[ta]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&c.rel.toLowerCase()==="stylesheet"||n.removeChild(c),c=o}}else n==="body"&&La(e.ownerDocument.body);n=u}while(n);Kl(t)}function Mh(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 Qc(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":Qc(n),Fu(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function p0(e,t,n,l){for(;e.nodeType===1;){var u=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ta])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Ct(e.nextSibling),e===null)break}return null}function y0(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Ct(e.nextSibling),e===null))return null;return e}function zh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ct(e.nextSibling),e===null))return null;return e}function Zc(e){return e.data==="$?"||e.data==="$~"}function Kc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function v0(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 Ct(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 Jc=null;function Dh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Ct(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function wh(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 jh(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 La(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Fu(e)}var Nt=new Map,Uh=new Set;function uu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var cn=X.d;X.d={f:g0,r:b0,D:x0,C:S0,L:E0,m:_0,X:T0,S:A0,M:C0};function g0(){var e=cn.f(),t=Wi();return e||t}function b0(e){var t=dl(e);t!==null&&t.tag===5&&t.type==="form"?If(t):cn.r(e)}var Gl=typeof document>"u"?null:document;function Bh(e,t,n){var l=Gl;if(l&&typeof t=="string"&&t){var u=bt(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof n=="string"&&(u+='[crossorigin="'+n+'"]'),Uh.has(u)||(Uh.add(u),e={rel:e,crossOrigin:n,href:t},l.querySelector(u)===null&&(t=l.createElement("link"),$e(t,"link",e),Xe(t),l.head.appendChild(t)))}}function x0(e){cn.D(e),Bh("dns-prefetch",e,null)}function S0(e,t){cn.C(e,t),Bh("preconnect",e,t)}function E0(e,t,n){cn.L(e,t,n);var l=Gl;if(l&&e&&t){var u='link[rel="preload"][as="'+bt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(u+='[imagesrcset="'+bt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(u+='[imagesizes="'+bt(n.imageSizes)+'"]')):u+='[href="'+bt(e)+'"]';var c=u;switch(t){case"style":c=Ql(e);break;case"script":c=Zl(e)}Nt.has(c)||(e=T({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Nt.set(c,e),l.querySelector(u)!==null||t==="style"&&l.querySelector(Ha(c))||t==="script"&&l.querySelector(qa(c))||(t=l.createElement("link"),$e(t,"link",e),Xe(t),l.head.appendChild(t)))}}function _0(e,t){cn.m(e,t);var n=Gl;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+bt(l)+'"][href="'+bt(e)+'"]',c=u;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Zl(e)}if(!Nt.has(c)&&(e=T({rel:"modulepreload",href:e},t),Nt.set(c,e),n.querySelector(u)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(qa(c)))return}l=n.createElement("link"),$e(l,"link",e),Xe(l),n.head.appendChild(l)}}}function A0(e,t,n){cn.S(e,t,n);var l=Gl;if(l&&e){var u=hl(l).hoistableStyles,c=Ql(e);t=t||"default";var o=u.get(c);if(!o){var h={loading:0,preload:null};if(o=l.querySelector(Ha(c)))h.loading=5;else{e=T({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Nt.get(c))&&$c(e,n);var x=o=l.createElement("link");Xe(x),$e(x,"link",e),x._p=new Promise(function(N,w){x.onload=N,x.onerror=w}),x.addEventListener("load",function(){h.loading|=1}),x.addEventListener("error",function(){h.loading|=2}),h.loading|=4,su(o,t,l)}o={type:"stylesheet",instance:o,count:1,state:h},u.set(c,o)}}}function T0(e,t){cn.X(e,t);var n=Gl;if(n&&e){var l=hl(n).hoistableScripts,u=Zl(e),c=l.get(u);c||(c=n.querySelector(qa(u)),c||(e=T({src:e,async:!0},t),(t=Nt.get(u))&&Fc(e,t),c=n.createElement("script"),Xe(c),$e(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(u,c))}}function C0(e,t){cn.M(e,t);var n=Gl;if(n&&e){var l=hl(n).hoistableScripts,u=Zl(e),c=l.get(u);c||(c=n.querySelector(qa(u)),c||(e=T({src:e,async:!0,type:"module"},t),(t=Nt.get(u))&&Fc(e,t),c=n.createElement("script"),Xe(c),$e(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(u,c))}}function Lh(e,t,n,l){var u=(u=se.current)?uu(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ql(n.href),n=hl(u).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=Ql(n.href);var c=hl(u).hoistableStyles,o=c.get(e);if(o||(u=u.ownerDocument||u,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,o),(c=u.querySelector(Ha(e)))&&!c._p&&(o.instance=c,o.state.loading=5),Nt.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},Nt.set(e,n),c||N0(u,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=Zl(n),n=hl(u).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 Ql(e){return'href="'+bt(e)+'"'}function Ha(e){return'link[rel="stylesheet"]['+e+"]"}function Hh(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function N0(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),Xe(t),e.head.appendChild(t))}function Zl(e){return'[src="'+bt(e)+'"]'}function qa(e){return"script[async]"+e}function qh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+bt(n.href)+'"]');if(l)return t.instance=l,Xe(l),l;var u=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Xe(l),$e(l,"style",u),su(l,n.precedence,e),t.instance=l;case"stylesheet":u=Ql(n.href);var c=e.querySelector(Ha(u));if(c)return t.state.loading|=4,t.instance=c,Xe(c),c;l=Hh(n),(u=Nt.get(u))&&$c(l,u),c=(e.ownerDocument||e).createElement("link"),Xe(c);var o=c;return o._p=new Promise(function(h,x){o.onload=h,o.onerror=x}),$e(c,"link",l),t.state.loading|=4,su(c,n.precedence,e),t.instance=c;case"script":return c=Zl(n.src),(u=e.querySelector(qa(c)))?(t.instance=u,Xe(u),u):(l=n,(u=Nt.get(c))&&(l=T({},n),Fc(l,u)),e=e.ownerDocument||e,u=e.createElement("script"),Xe(u),$e(u,"link",l),e.head.appendChild(u),t.instance=u);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]'),u=l.length?l[l.length-1]:null,c=u,o=0;o<l.length;o++){var h=l[o];if(h.dataset.precedence===t)c=h;else if(c!==u)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function $c(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Fc(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 Yh(e,t,n){if(cu===null){var l=new Map,u=cu=new Map;u.set(n,l)}else u=cu,l=u.get(n),l||(l=new Map,u.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),u=0;u<n.length;u++){var c=n[u];if(!(c[ta]||c[Qe]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var o=c.getAttribute(t)||"";o=e+o;var h=l.get(o);h?h.push(c):l.set(o,[c])}}return l}function kh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function R0(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 Vh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function O0(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 u=Ql(l.href),c=t.querySelector(Ha(u));if(c){t=c._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=c,Xe(c);return}c=t.ownerDocument||t,l=Hh(l),(u=Nt.get(u))&&$c(l,u),c=c.createElement("link"),Xe(c);var o=c;o._p=new Promise(function(h,x){o.onload=h,o.onerror=x}),$e(c,"link",l),n.instance=c}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 M0(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 c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Wc===0&&(Wc=62500*o0());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&fu(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Wc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(u)}}: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(z0,e),ou=null,ru.call(e))}function z0(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 u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<u.length;c++){var o=u[c];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(n.set(o.dataset.precedence,o),l=o)}l&&n.set(null,l)}u=t.instance,o=u.getAttribute("data-precedence"),c=n.get(o)||l,c===l&&n.set(null,u),n.set(o,u),this.count++,l=ru.bind(this),u.addEventListener("load",l),u.addEventListener("error",l),c?c.parentNode.insertBefore(u,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var Ya={$$typeof:q,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function D0(e,t,n,l,u,c,o,h,x){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=Zu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zu(0),this.hiddenUpdates=Zu(null),this.identifierPrefix=l,this.onUncaughtError=u,this.onCaughtError=c,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function Xh(e,t,n,l,u,c,o,h,x,N,w,L){return e=new D0(e,t,n,o,x,N,w,L,h),t=1,c===!0&&(t|=24),c=ft(3,null,null,t),e.current=c,c.stateNode=e,t=Ms(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:l,isDehydrated:n,cache:t},js(c),e}function Gh(e){return e?(e=_l,e):_l}function Qh(e,t,n,l,u,c){u=Gh(u),l.context===null?l.context=u:l.pendingContext=u,l=Sn(t),l.payload={element:n},c=c===void 0?null:c,c!==null&&(l.callback=c),n=En(e,l,t),n!==null&&(ut(n,e,t),ga(n,e,t))}function Zh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ic(e,t){Zh(e,t),(e=e.alternate)&&Zh(e,t)}function Kh(e){if(e.tag===13||e.tag===31){var t=Jn(e,67108864);t!==null&&ut(t,e,67108864),Ic(e,67108864)}}function Jh(e){if(e.tag===13||e.tag===31){var t=yt();t=Ku(t);var n=Jn(e,t);n!==null&&ut(n,e,t),Ic(e,t)}}var du=!0;function w0(e,t,n,l){var u=j.T;j.T=null;var c=X.p;try{X.p=2,Pc(e,t,n,l)}finally{X.p=c,j.T=u}}function j0(e,t,n,l){var u=j.T;j.T=null;var c=X.p;try{X.p=8,Pc(e,t,n,l)}finally{X.p=c,j.T=u}}function Pc(e,t,n,l){if(du){var u=er(l);if(u===null)qc(e,t,l,hu,n),Fh(e,l);else if(B0(u,e,t,n,l))l.stopPropagation();else if(Fh(e,l),t&4&&-1<U0.indexOf(e)){for(;u!==null;){var c=dl(u);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var o=Xn(c.pendingLanes);if(o!==0){var h=c;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var x=1<<31-rt(o);h.entanglements[1]|=x,o&=~x}qt(c),(ye&6)===0&&($i=st()+500,ja(0))}}break;case 31:case 13:h=Jn(c,2),h!==null&&ut(h,c,2),Wi(),Ic(c,2)}if(c=er(l),c===null&&qc(e,t,l,hu,n),c===u)break;u=c}u!==null&&l.stopPropagation()}else qc(e,t,l,null,n)}}function er(e){return e=ns(e),tr(e)}var hu=null;function tr(e){if(hu=null,e=fl(e),e!==null){var t=d(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=y(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 hu=e,null}function $h(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(xp()){case to:return 2;case no:return 8;case ni:case Sp:return 32;case lo:return 268435456;default:return 32}default:return 32}}var nr=!1,wn=null,jn=null,Un=null,ka=new Map,Va=new Map,Bn=[],U0="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 Fh(e,t){switch(e){case"focusin":case"focusout":wn=null;break;case"dragenter":case"dragleave":jn=null;break;case"mouseover":case"mouseout":Un=null;break;case"pointerover":case"pointerout":ka.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Va.delete(t.pointerId)}}function Xa(e,t,n,l,u,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:c,targetContainers:[u]},t!==null&&(t=dl(t),t!==null&&Kh(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function B0(e,t,n,l,u){switch(t){case"focusin":return wn=Xa(wn,e,t,n,l,u),!0;case"dragenter":return jn=Xa(jn,e,t,n,l,u),!0;case"mouseover":return Un=Xa(Un,e,t,n,l,u),!0;case"pointerover":var c=u.pointerId;return ka.set(c,Xa(ka.get(c)||null,e,t,n,l,u)),!0;case"gotpointercapture":return c=u.pointerId,Va.set(c,Xa(Va.get(c)||null,e,t,n,l,u)),!0}return!1}function Wh(e){var t=fl(e.target);if(t!==null){var n=d(t);if(n!==null){if(t=n.tag,t===13){if(t=y(n),t!==null){e.blockedOn=t,ro(e.priority,function(){Jh(n)});return}}else if(t===31){if(t=b(n),t!==null){e.blockedOn=t,ro(e.priority,function(){Jh(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=er(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);ts=l,n.target.dispatchEvent(l),ts=null}else return t=dl(n),t!==null&&Kh(t),e.blockedOn=n,!1;t.shift()}return!0}function Ih(e,t,n){mu(e)&&n.delete(t)}function L0(){nr=!1,wn!==null&&mu(wn)&&(wn=null),jn!==null&&mu(jn)&&(jn=null),Un!==null&&mu(Un)&&(Un=null),ka.forEach(Ih),Va.forEach(Ih)}function pu(e,t){e.blockedOn===t&&(e.blockedOn=null,nr||(nr=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,L0)))}var yu=null;function Ph(e){yu!==e&&(yu=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){yu===e&&(yu=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],u=e[t+2];if(typeof l!="function"){if(tr(l||n)===null)continue;break}var c=dl(n);c!==null&&(e.splice(t,3),t-=3,ec(c,{pending:!0,data:u,method:n.method,action:l},l,u))}}))}function Kl(e){function t(x){return pu(x,e)}wn!==null&&pu(wn,e),jn!==null&&pu(jn,e),Un!==null&&pu(Un,e),ka.forEach(t),Va.forEach(t);for(var n=0;n<Bn.length;n++){var l=Bn[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Bn.length&&(n=Bn[0],n.blockedOn===null);)Wh(n),n.blockedOn===null&&Bn.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var u=n[l],c=n[l+1],o=u[et]||null;if(typeof c=="function")o||Ph(n);else if(o){var h=null;if(c&&c.hasAttribute("formAction")){if(u=c,o=c[et]||null)h=o.formAction;else if(tr(u)!==null)continue}else h=o.action;typeof h=="function"?n[l+1]=h:(n.splice(l,3),l-=3),Ph(n)}}}function em(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(o){return u=o})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,u=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),u!==null&&(u(),u=null)}}}function lr(e){this._internalRoot=e}vu.prototype.render=lr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var n=t.current,l=yt();Qh(n,l,e,t,null,null)},vu.prototype.unmount=lr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Qh(e.current,2,null,e,null,null),Wi(),t[ol]=null}};function vu(e){this._internalRoot=e}vu.prototype.unstable_scheduleHydration=function(e){if(e){var t=co();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Bn.length&&t!==0&&t<Bn[n].priority;n++);Bn.splice(n,0,e),n===0&&Wh(e)}};var tm=a.version;if(tm!=="19.2.0")throw Error(r(527,tm,"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?A(e):null,e=e===null?null:e.stateNode,e};var H0={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{Il=gu.inject(H0),ct=gu}catch{}}return Qa.createRoot=function(e,t){if(!f(e))throw Error(r(299));var n=!1,l="",u=cd,c=rd,o=od;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Xh(e,1,!1,null,null,n,l,null,u,c,o,em),e[ol]=t.current,Hc(e),new lr(t)},Qa.hydrateRoot=function(e,t,n){if(!f(e))throw Error(r(299));var l=!1,u="",c=cd,o=rd,h=od,x=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(o=n.onCaughtError),n.onRecoverableError!==void 0&&(h=n.onRecoverableError),n.formState!==void 0&&(x=n.formState)),t=Xh(e,1,!0,t,n??null,l,u,x,c,o,h,em),t.context=Gh(null),n=t.current,l=yt(),l=Ku(l),u=Sn(l),u.callback=null,En(n,u,l),n=l,t.current.lanes=n,ea(t,n),qt(t),e[ol]=t.current,Hc(e),new vu(t)},Qa.version="19.2.0",Qa}var fm;function J0(){if(fm)return ur.exports;fm=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(a){console.error(a)}}return i(),ur.exports=K0(),ur.exports}var $0=J0();var dm="popstate";function F0(i={}){function a(r,f){let{pathname:d,search:y,hash:b}=r.location;return Er("",{pathname:d,search:y,hash:b},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function s(r,f){return typeof f=="string"?f:Fa(f)}return I0(a,s,null,i)}function Oe(i,a){if(i===!1||i===null||typeof i>"u")throw new Error(a)}function jt(i,a){if(!i){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function W0(){return Math.random().toString(36).substring(2,10)}function hm(i,a){return{usr:i.state,key:i.key,idx:a}}function Er(i,a,s=null,r){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof a=="string"?Jl(a):a,state:s,key:a&&a.key||r||W0()}}function Fa({pathname:i="/",search:a="",hash:s=""}){return a&&a!=="?"&&(i+=a.charAt(0)==="?"?a:"?"+a),s&&s!=="#"&&(i+=s.charAt(0)==="#"?s:"#"+s),i}function Jl(i){let a={};if(i){let s=i.indexOf("#");s>=0&&(a.hash=i.substring(s),i=i.substring(0,s));let r=i.indexOf("?");r>=0&&(a.search=i.substring(r),i=i.substring(0,r)),i&&(a.pathname=i)}return a}function I0(i,a,s,r={}){let{window:f=document.defaultView,v5Compat:d=!1}=r,y=f.history,b="POP",p=null,v=A();v==null&&(v=0,y.replaceState({...y.state,idx:v},""));function A(){return(y.state||{idx:null}).idx}function T(){b="POP";let Y=A(),k=Y==null?null:Y-v;v=Y,p&&p({action:b,location:V.location,delta:k})}function D(Y,k){b="PUSH";let B=Er(V.location,Y,k);v=A()+1;let q=hm(B,v),Z=V.createHref(B);try{y.pushState(q,"",Z)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;f.location.assign(Z)}d&&p&&p({action:b,location:V.location,delta:1})}function R(Y,k){b="REPLACE";let B=Er(V.location,Y,k);v=A();let q=hm(B,v),Z=V.createHref(B);y.replaceState(q,"",Z),d&&p&&p({action:b,location:V.location,delta:0})}function M(Y){return P0(Y)}let V={get action(){return b},get location(){return i(f,y)},listen(Y){if(p)throw new Error("A history only accepts one active listener");return f.addEventListener(dm,T),p=Y,()=>{f.removeEventListener(dm,T),p=null}},createHref(Y){return a(f,Y)},createURL:M,encodeLocation(Y){let k=M(Y);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:D,replace:R,go(Y){return y.go(Y)}};return V}function P0(i,a=!1){let s="http://localhost";typeof window<"u"&&(s=window.location.origin!=="null"?window.location.origin:window.location.href),Oe(s,"No window.location.(origin|href) available to create URL");let r=typeof i=="string"?i:Fa(i);return r=r.replace(/ $/,"%20"),!a&&r.startsWith("//")&&(r=s+r),new URL(r,s)}function Mm(i,a,s="/"){return ev(i,a,s,!1)}function ev(i,a,s,r){let f=typeof a=="string"?Jl(a):a,d=fn(f.pathname||"/",s);if(d==null)return null;let y=zm(i);tv(y);let b=null;for(let p=0;b==null&&p<y.length;++p){let v=dv(d);b=ov(y[p],v,r)}return b}function zm(i,a=[],s=[],r="",f=!1){let d=(y,b,p=f,v)=>{let A={relativePath:v===void 0?y.path||"":v,caseSensitive:y.caseSensitive===!0,childrenIndex:b,route:y};if(A.relativePath.startsWith("/")){if(!A.relativePath.startsWith(r)&&p)return;Oe(A.relativePath.startsWith(r),`Absolute route path "${A.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),A.relativePath=A.relativePath.slice(r.length)}let T=rn([r,A.relativePath]),D=s.concat(A);y.children&&y.children.length>0&&(Oe(y.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${T}".`),zm(y.children,a,D,T,p)),!(y.path==null&&!y.index)&&a.push({path:T,score:cv(T,y.index),routesMeta:D})};return i.forEach((y,b)=>{if(y.path===""||!y.path?.includes("?"))d(y,b);else for(let p of Dm(y.path))d(y,b,!0,p)}),a}function Dm(i){let a=i.split("/");if(a.length===0)return[];let[s,...r]=a,f=s.endsWith("?"),d=s.replace(/\?$/,"");if(r.length===0)return f?[d,""]:[d];let y=Dm(r.join("/")),b=[];return b.push(...y.map(p=>p===""?d:[d,p].join("/"))),f&&b.push(...y),b.map(p=>i.startsWith("/")&&p===""?"/":p)}function tv(i){i.sort((a,s)=>a.score!==s.score?s.score-a.score:rv(a.routesMeta.map(r=>r.childrenIndex),s.routesMeta.map(r=>r.childrenIndex)))}var nv=/^:[\w-]+$/,lv=3,av=2,iv=1,uv=10,sv=-2,mm=i=>i==="*";function cv(i,a){let s=i.split("/"),r=s.length;return s.some(mm)&&(r+=sv),a&&(r+=av),s.filter(f=>!mm(f)).reduce((f,d)=>f+(nv.test(d)?lv:d===""?iv:uv),r)}function rv(i,a){return i.length===a.length&&i.slice(0,-1).every((r,f)=>r===a[f])?i[i.length-1]-a[a.length-1]:0}function ov(i,a,s=!1){let{routesMeta:r}=i,f={},d="/",y=[];for(let b=0;b<r.length;++b){let p=r[b],v=b===r.length-1,A=d==="/"?a:a.slice(d.length)||"/",T=wu({path:p.relativePath,caseSensitive:p.caseSensitive,end:v},A),D=p.route;if(!T&&v&&s&&!r[r.length-1].route.index&&(T=wu({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},A)),!T)return null;Object.assign(f,T.params),y.push({params:f,pathname:rn([d,T.pathname]),pathnameBase:vv(rn([d,T.pathnameBase])),route:D}),T.pathnameBase!=="/"&&(d=rn([d,T.pathnameBase]))}return y}function wu(i,a){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[s,r]=fv(i.path,i.caseSensitive,i.end),f=a.match(s);if(!f)return null;let d=f[0],y=d.replace(/(.)\/+$/,"$1"),b=f.slice(1);return{params:r.reduce((v,{paramName:A,isOptional:T},D)=>{if(A==="*"){let M=b[D]||"";y=d.slice(0,d.length-M.length).replace(/(.)\/+$/,"$1")}const R=b[D];return T&&!R?v[A]=void 0:v[A]=(R||"").replace(/%2F/g,"/"),v},{}),pathname:d,pathnameBase:y,pattern:i}}function fv(i,a=!1,s=!0){jt(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let r=[],f="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(y,b,p)=>(r.push({paramName:b,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return i.endsWith("*")?(r.push({paramName:"*"}),f+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?f+="\\/*$":i!==""&&i!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,a?void 0:"i"),r]}function dv(i){try{return i.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return jt(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),i}}function fn(i,a){if(a==="/")return i;if(!i.toLowerCase().startsWith(a.toLowerCase()))return null;let s=a.endsWith("/")?a.length-1:a.length,r=i.charAt(s);return r&&r!=="/"?null:i.slice(s)||"/"}var hv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mv=i=>hv.test(i);function pv(i,a="/"){let{pathname:s,search:r="",hash:f=""}=typeof i=="string"?Jl(i):i,d;if(s)if(mv(s))d=s;else{if(s.includes("//")){let y=s;s=s.replace(/\/\/+/g,"/"),jt(!1,`Pathnames cannot have embedded double slashes - normalizing ${y} -> ${s}`)}s.startsWith("/")?d=pm(s.substring(1),"/"):d=pm(s,a)}else d=a;return{pathname:d,search:gv(r),hash:bv(f)}}function pm(i,a){let s=a.replace(/\/+$/,"").split("/");return i.split("/").forEach(f=>{f===".."?s.length>1&&s.pop():f!=="."&&s.push(f)}),s.length>1?s.join("/"):"/"}function or(i,a,s,r){return`Cannot include a '${i}' character in a manually specified \`to.${a}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function yv(i){return i.filter((a,s)=>s===0||a.route.path&&a.route.path.length>0)}function wm(i){let a=yv(i);return a.map((s,r)=>r===a.length-1?s.pathname:s.pathnameBase)}function jm(i,a,s,r=!1){let f;typeof i=="string"?f=Jl(i):(f={...i},Oe(!f.pathname||!f.pathname.includes("?"),or("?","pathname","search",f)),Oe(!f.pathname||!f.pathname.includes("#"),or("#","pathname","hash",f)),Oe(!f.search||!f.search.includes("#"),or("#","search","hash",f)));let d=i===""||f.pathname==="",y=d?"/":f.pathname,b;if(y==null)b=s;else{let T=a.length-1;if(!r&&y.startsWith("..")){let D=y.split("/");for(;D[0]==="..";)D.shift(),T-=1;f.pathname=D.join("/")}b=T>=0?a[T]:"/"}let p=pv(f,b),v=y&&y!=="/"&&y.endsWith("/"),A=(d||y===".")&&s.endsWith("/");return!p.pathname.endsWith("/")&&(v||A)&&(p.pathname+="/"),p}var rn=i=>i.join("/").replace(/\/\/+/g,"/"),vv=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),gv=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,bv=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i;function xv(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Um=["POST","PUT","PATCH","DELETE"];new Set(Um);var Sv=["GET",...Um];new Set(Sv);var $l=g.createContext(null);$l.displayName="DataRouter";var ju=g.createContext(null);ju.displayName="DataRouterState";g.createContext(!1);var Bm=g.createContext({isTransitioning:!1});Bm.displayName="ViewTransition";var Ev=g.createContext(new Map);Ev.displayName="Fetchers";var _v=g.createContext(null);_v.displayName="Await";var Vt=g.createContext(null);Vt.displayName="Navigation";var Ia=g.createContext(null);Ia.displayName="Location";var dn=g.createContext({outlet:null,matches:[],isDataRoute:!1});dn.displayName="Route";var Ur=g.createContext(null);Ur.displayName="RouteError";function Av(i,{relative:a}={}){Oe(Pa(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:r}=g.useContext(Vt),{hash:f,pathname:d,search:y}=ei(i,{relative:a}),b=d;return s!=="/"&&(b=d==="/"?s:rn([s,d])),r.createHref({pathname:b,search:y,hash:f})}function Pa(){return g.useContext(Ia)!=null}function rl(){return Oe(Pa(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(Ia).location}var Lm="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Hm(i){g.useContext(Vt).static||g.useLayoutEffect(i)}function Tv(){let{isDataRoute:i}=g.useContext(dn);return i?Hv():Cv()}function Cv(){Oe(Pa(),"useNavigate() may be used only in the context of a <Router> component.");let i=g.useContext($l),{basename:a,navigator:s}=g.useContext(Vt),{matches:r}=g.useContext(dn),{pathname:f}=rl(),d=JSON.stringify(wm(r)),y=g.useRef(!1);return Hm(()=>{y.current=!0}),g.useCallback((p,v={})=>{if(jt(y.current,Lm),!y.current)return;if(typeof p=="number"){s.go(p);return}let A=jm(p,JSON.parse(d),f,v.relative==="path");i==null&&a!=="/"&&(A.pathname=A.pathname==="/"?a:rn([a,A.pathname])),(v.replace?s.replace:s.push)(A,v.state,v)},[a,s,d,f,i])}g.createContext(null);function ei(i,{relative:a}={}){let{matches:s}=g.useContext(dn),{pathname:r}=rl(),f=JSON.stringify(wm(s));return g.useMemo(()=>jm(i,JSON.parse(f),r,a==="path"),[i,f,r,a])}function Nv(i,a){return qm(i,a)}function qm(i,a,s,r,f){Oe(Pa(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:d}=g.useContext(Vt),{matches:y}=g.useContext(dn),b=y[y.length-1],p=b?b.params:{},v=b?b.pathname:"/",A=b?b.pathnameBase:"/",T=b&&b.route;{let B=T&&T.path||"";Ym(v,!T||B.endsWith("*")||B.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${v}" (under <Route path="${B}">) 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="${B}"> to <Route path="${B==="/"?"*":`${B}/*`}">.`)}let D=rl(),R;if(a){let B=typeof a=="string"?Jl(a):a;Oe(A==="/"||B.pathname?.startsWith(A),`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 "${A}" but pathname "${B.pathname}" was given in the \`location\` prop.`),R=B}else R=D;let M=R.pathname||"/",V=M;if(A!=="/"){let B=A.replace(/^\//,"").split("/");V="/"+M.replace(/^\//,"").split("/").slice(B.length).join("/")}let Y=Mm(i,{pathname:V});jt(T||Y!=null,`No routes matched location "${R.pathname}${R.search}${R.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 "${R.pathname}${R.search}${R.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 k=Dv(Y&&Y.map(B=>Object.assign({},B,{params:Object.assign({},p,B.params),pathname:rn([A,d.encodeLocation?d.encodeLocation(B.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:B.pathname]),pathnameBase:B.pathnameBase==="/"?A:rn([A,d.encodeLocation?d.encodeLocation(B.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:B.pathnameBase])})),y,s,r,f);return a&&k?g.createElement(Ia.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...R},navigationType:"POP"}},k):k}function Rv(){let i=Lv(),a=xv(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),s=i instanceof Error?i.stack:null,r="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:r},d={padding:"2px 4px",backgroundColor:r},y=null;return console.error("Error handled by React Router default ErrorBoundary:",i),y=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:d},"ErrorBoundary")," or"," ",g.createElement("code",{style:d},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},a),s?g.createElement("pre",{style:f},s):null,y)}var Ov=g.createElement(Rv,null),Mv=class extends g.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,a){return a.location!==i.location||a.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:a.error,location:a.location,revalidation:i.revalidation||a.revalidation}}componentDidCatch(i,a){this.props.onError?this.props.onError(i,a):console.error("React Router caught the following error during render",i)}render(){return this.state.error!==void 0?g.createElement(dn.Provider,{value:this.props.routeContext},g.createElement(Ur.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function zv({routeContext:i,match:a,children:s}){let r=g.useContext($l);return r&&r.static&&r.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=a.route.id),g.createElement(dn.Provider,{value:i},s)}function Dv(i,a=[],s=null,r=null,f=null){if(i==null){if(!s)return null;if(s.errors)i=s.matches;else if(a.length===0&&!s.initialized&&s.matches.length>0)i=s.matches;else return null}let d=i,y=s?.errors;if(y!=null){let A=d.findIndex(T=>T.route.id&&y?.[T.route.id]!==void 0);Oe(A>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(y).join(",")}`),d=d.slice(0,Math.min(d.length,A+1))}let b=!1,p=-1;if(s)for(let A=0;A<d.length;A++){let T=d[A];if((T.route.HydrateFallback||T.route.hydrateFallbackElement)&&(p=A),T.route.id){let{loaderData:D,errors:R}=s,M=T.route.loader&&!D.hasOwnProperty(T.route.id)&&(!R||R[T.route.id]===void 0);if(T.route.lazy||M){b=!0,p>=0?d=d.slice(0,p+1):d=[d[0]];break}}}let v=s&&r?(A,T)=>{r(A,{location:s.location,params:s.matches?.[0]?.params??{},errorInfo:T})}:void 0;return d.reduceRight((A,T,D)=>{let R,M=!1,V=null,Y=null;s&&(R=y&&T.route.id?y[T.route.id]:void 0,V=T.route.errorElement||Ov,b&&(p<0&&D===0?(Ym("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),M=!0,Y=null):p===D&&(M=!0,Y=T.route.hydrateFallbackElement||null)));let k=a.concat(d.slice(0,D+1)),B=()=>{let q;return R?q=V:M?q=Y:T.route.Component?q=g.createElement(T.route.Component,null):T.route.element?q=T.route.element:q=A,g.createElement(zv,{match:T,routeContext:{outlet:A,matches:k,isDataRoute:s!=null},children:q})};return s&&(T.route.ErrorBoundary||T.route.errorElement||D===0)?g.createElement(Mv,{location:s.location,revalidation:s.revalidation,component:V,error:R,children:B(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:v}):B()},null)}function Br(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function wv(i){let a=g.useContext($l);return Oe(a,Br(i)),a}function jv(i){let a=g.useContext(ju);return Oe(a,Br(i)),a}function Uv(i){let a=g.useContext(dn);return Oe(a,Br(i)),a}function Lr(i){let a=Uv(i),s=a.matches[a.matches.length-1];return Oe(s.route.id,`${i} can only be used on routes that contain a unique "id"`),s.route.id}function Bv(){return Lr("useRouteId")}function Lv(){let i=g.useContext(Ur),a=jv("useRouteError"),s=Lr("useRouteError");return i!==void 0?i:a.errors?.[s]}function Hv(){let{router:i}=wv("useNavigate"),a=Lr("useNavigate"),s=g.useRef(!1);return Hm(()=>{s.current=!0}),g.useCallback(async(f,d={})=>{jt(s.current,Lm),s.current&&(typeof f=="number"?i.navigate(f):await i.navigate(f,{fromRouteId:a,...d}))},[i,a])}var ym={};function Ym(i,a,s){!a&&!ym[i]&&(ym[i]=!0,jt(!1,s))}g.memo(qv);function qv({routes:i,future:a,state:s,unstable_onError:r}){return qm(i,void 0,s,r,a)}function _r(i){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 Yv({basename:i="/",children:a=null,location:s,navigationType:r="POP",navigator:f,static:d=!1}){Oe(!Pa(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let y=i.replace(/^\/*/,"/"),b=g.useMemo(()=>({basename:y,navigator:f,static:d,future:{}}),[y,f,d]);typeof s=="string"&&(s=Jl(s));let{pathname:p="/",search:v="",hash:A="",state:T=null,key:D="default"}=s,R=g.useMemo(()=>{let M=fn(p,y);return M==null?null:{location:{pathname:M,search:v,hash:A,state:T,key:D},navigationType:r}},[y,p,v,A,T,D,r]);return jt(R!=null,`<Router basename="${y}"> is not able to match the URL "${p}${v}${A}" because it does not start with the basename, so the <Router> won't render anything.`),R==null?null:g.createElement(Vt.Provider,{value:b},g.createElement(Ia.Provider,{children:a,value:R}))}function kv({children:i,location:a}){return Nv(Ar(i),a)}function Ar(i,a=[]){let s=[];return g.Children.forEach(i,(r,f)=>{if(!g.isValidElement(r))return;let d=[...a,f];if(r.type===g.Fragment){s.push.apply(s,Ar(r.props.children,d));return}Oe(r.type===_r,`[${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 y={id:r.props.id||d.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&&(y.children=Ar(r.props.children,d)),s.push(y)}),s}var Nu="get",Ru="application/x-www-form-urlencoded";function Uu(i){return i!=null&&typeof i.tagName=="string"}function Vv(i){return Uu(i)&&i.tagName.toLowerCase()==="button"}function Xv(i){return Uu(i)&&i.tagName.toLowerCase()==="form"}function Gv(i){return Uu(i)&&i.tagName.toLowerCase()==="input"}function Qv(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function Zv(i,a){return i.button===0&&(!a||a==="_self")&&!Qv(i)}var bu=null;function Kv(){if(bu===null)try{new FormData(document.createElement("form"),0),bu=!1}catch{bu=!0}return bu}var Jv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function fr(i){return i!=null&&!Jv.has(i)?(jt(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ru}"`),null):i}function $v(i,a){let s,r,f,d,y;if(Xv(i)){let b=i.getAttribute("action");r=b?fn(b,a):null,s=i.getAttribute("method")||Nu,f=fr(i.getAttribute("enctype"))||Ru,d=new FormData(i)}else if(Vv(i)||Gv(i)&&(i.type==="submit"||i.type==="image")){let b=i.form;if(b==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=i.getAttribute("formaction")||b.getAttribute("action");if(r=p?fn(p,a):null,s=i.getAttribute("formmethod")||b.getAttribute("method")||Nu,f=fr(i.getAttribute("formenctype"))||fr(b.getAttribute("enctype"))||Ru,d=new FormData(b,i),!Kv()){let{name:v,type:A,value:T}=i;if(A==="image"){let D=v?`${v}.`:"";d.append(`${D}x`,"0"),d.append(`${D}y`,"0")}else v&&d.append(v,T)}}else{if(Uu(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=Nu,r=null,f=Ru,y=i}return d&&f==="text/plain"&&(y=d,d=void 0),{action:r,method:s.toLowerCase(),encType:f,formData:d,body:y}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Hr(i,a){if(i===!1||i===null||typeof i>"u")throw new Error(a)}function Fv(i,a,s){let r=typeof i=="string"?new URL(i,typeof window>"u"?"server://singlefetch/":window.location.origin):i;return r.pathname==="/"?r.pathname=`_root.${s}`:a&&fn(r.pathname,a)==="/"?r.pathname=`${a.replace(/\/$/,"")}/_root.${s}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${s}`,r}async function Wv(i,a){if(i.id in a)return a[i.id];try{let s=await import(i.module);return a[i.id]=s,s}catch(s){return console.error(`Error loading route module \`${i.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Iv(i){return i==null?!1:i.href==null?i.rel==="preload"&&typeof i.imageSrcSet=="string"&&typeof i.imageSizes=="string":typeof i.rel=="string"&&typeof i.href=="string"}async function Pv(i,a,s){let r=await Promise.all(i.map(async f=>{let d=a.routes[f.route.id];if(d){let y=await Wv(d,s);return y.links?y.links():[]}return[]}));return lg(r.flat(1).filter(Iv).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function vm(i,a,s,r,f,d){let y=(p,v)=>s[v]?p.route.id!==s[v].route.id:!0,b=(p,v)=>s[v].pathname!==p.pathname||s[v].route.path?.endsWith("*")&&s[v].params["*"]!==p.params["*"];return d==="assets"?a.filter((p,v)=>y(p,v)||b(p,v)):d==="data"?a.filter((p,v)=>{let A=r.routes[p.route.id];if(!A||!A.hasLoader)return!1;if(y(p,v)||b(p,v))return!0;if(p.route.shouldRevalidate){let T=p.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:s[0]?.params||{},nextUrl:new URL(i,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof T=="boolean")return T}return!0}):[]}function eg(i,a,{includeHydrateFallback:s}={}){return tg(i.map(r=>{let f=a.routes[r.route.id];if(!f)return[];let d=[f.module];return f.clientActionModule&&(d=d.concat(f.clientActionModule)),f.clientLoaderModule&&(d=d.concat(f.clientLoaderModule)),s&&f.hydrateFallbackModule&&(d=d.concat(f.hydrateFallbackModule)),f.imports&&(d=d.concat(f.imports)),d}).flat(1))}function tg(i){return[...new Set(i)]}function ng(i){let a={},s=Object.keys(i).sort();for(let r of s)a[r]=i[r];return a}function lg(i,a){let s=new Set;return new Set(a),i.reduce((r,f)=>{let d=JSON.stringify(ng(f));return s.has(d)||(s.add(d),r.push({key:d,link:f})),r},[])}function km(){let i=g.useContext($l);return Hr(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function ag(){let i=g.useContext(ju);return Hr(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var qr=g.createContext(void 0);qr.displayName="FrameworkContext";function Vm(){let i=g.useContext(qr);return Hr(i,"You must render this element inside a <HydratedRouter> element"),i}function ig(i,a){let s=g.useContext(qr),[r,f]=g.useState(!1),[d,y]=g.useState(!1),{onFocus:b,onBlur:p,onMouseEnter:v,onMouseLeave:A,onTouchStart:T}=a,D=g.useRef(null);g.useEffect(()=>{if(i==="render"&&y(!0),i==="viewport"){let V=k=>{k.forEach(B=>{y(B.isIntersecting)})},Y=new IntersectionObserver(V,{threshold:.5});return D.current&&Y.observe(D.current),()=>{Y.disconnect()}}},[i]),g.useEffect(()=>{if(r){let V=setTimeout(()=>{y(!0)},100);return()=>{clearTimeout(V)}}},[r]);let R=()=>{f(!0)},M=()=>{f(!1),y(!1)};return s?i!=="intent"?[d,D,{}]:[d,D,{onFocus:Za(b,R),onBlur:Za(p,M),onMouseEnter:Za(v,R),onMouseLeave:Za(A,M),onTouchStart:Za(T,R)}]:[!1,D,{}]}function Za(i,a){return s=>{i&&i(s),s.defaultPrevented||a(s)}}function ug({page:i,...a}){let{router:s}=km(),r=g.useMemo(()=>Mm(s.routes,i,s.basename),[s.routes,i,s.basename]);return r?g.createElement(cg,{page:i,matches:r,...a}):null}function sg(i){let{manifest:a,routeModules:s}=Vm(),[r,f]=g.useState([]);return g.useEffect(()=>{let d=!1;return Pv(i,a,s).then(y=>{d||f(y)}),()=>{d=!0}},[i,a,s]),r}function cg({page:i,matches:a,...s}){let r=rl(),{manifest:f,routeModules:d}=Vm(),{basename:y}=km(),{loaderData:b,matches:p}=ag(),v=g.useMemo(()=>vm(i,a,p,f,r,"data"),[i,a,p,f,r]),A=g.useMemo(()=>vm(i,a,p,f,r,"assets"),[i,a,p,f,r]),T=g.useMemo(()=>{if(i===r.pathname+r.search+r.hash)return[];let M=new Set,V=!1;if(a.forEach(k=>{let B=f.routes[k.route.id];!B||!B.hasLoader||(!v.some(q=>q.route.id===k.route.id)&&k.route.id in b&&d[k.route.id]?.shouldRevalidate||B.hasClientLoader?V=!0:M.add(k.route.id))}),M.size===0)return[];let Y=Fv(i,y,"data");return V&&M.size>0&&Y.searchParams.set("_routes",a.filter(k=>M.has(k.route.id)).map(k=>k.route.id).join(",")),[Y.pathname+Y.search]},[y,b,r,f,v,a,i,d]),D=g.useMemo(()=>eg(A,f),[A,f]),R=sg(A);return g.createElement(g.Fragment,null,T.map(M=>g.createElement("link",{key:M,rel:"prefetch",as:"fetch",href:M,...s})),D.map(M=>g.createElement("link",{key:M,rel:"modulepreload",href:M,...s})),R.map(({key:M,link:V})=>g.createElement("link",{key:M,nonce:s.nonce,...V})))}function rg(...i){return a=>{i.forEach(s=>{typeof s=="function"?s(a):s!=null&&(s.current=a)})}}var Xm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Xm&&(window.__reactRouterVersion="7.9.6")}catch{}function og({basename:i,children:a,window:s}){let r=g.useRef();r.current==null&&(r.current=F0({window:s,v5Compat:!0}));let f=r.current,[d,y]=g.useState({action:f.action,location:f.location}),b=g.useCallback(p=>{g.startTransition(()=>y(p))},[y]);return g.useLayoutEffect(()=>f.listen(b),[f,b]),g.createElement(Yv,{basename:i,children:a,location:d.location,navigationType:d.action,navigator:f})}var Gm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Qm=g.forwardRef(function({onClick:a,discover:s="render",prefetch:r="none",relative:f,reloadDocument:d,replace:y,state:b,target:p,to:v,preventScrollReset:A,viewTransition:T,...D},R){let{basename:M}=g.useContext(Vt),V=typeof v=="string"&&Gm.test(v),Y,k=!1;if(typeof v=="string"&&V&&(Y=v,Xm))try{let ee=new URL(window.location.href),Me=v.startsWith("//")?new URL(ee.protocol+v):new URL(v),Ve=fn(Me.pathname,M);Me.origin===ee.origin&&Ve!=null?v=Ve+Me.search+Me.hash:k=!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 B=Av(v,{relative:f}),[q,Z,I]=ig(r,D),ae=mg(v,{replace:y,state:b,target:p,preventScrollReset:A,relative:f,viewTransition:T});function Q(ee){a&&a(ee),ee.defaultPrevented||ae(ee)}let ue=g.createElement("a",{...D,...I,href:Y||B,onClick:k||d?a:Q,ref:rg(R,Z),target:p,"data-discover":!V&&s==="render"?"true":void 0});return q&&!V?g.createElement(g.Fragment,null,ue,g.createElement(ug,{page:B})):ue});Qm.displayName="Link";var fg=g.forwardRef(function({"aria-current":a="page",caseSensitive:s=!1,className:r="",end:f=!1,style:d,to:y,viewTransition:b,children:p,...v},A){let T=ei(y,{relative:v.relative}),D=rl(),R=g.useContext(ju),{navigator:M,basename:V}=g.useContext(Vt),Y=R!=null&&bg(T)&&b===!0,k=M.encodeLocation?M.encodeLocation(T).pathname:T.pathname,B=D.pathname,q=R&&R.navigation&&R.navigation.location?R.navigation.location.pathname:null;s||(B=B.toLowerCase(),q=q?q.toLowerCase():null,k=k.toLowerCase()),q&&V&&(q=fn(q,V)||q);const Z=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let I=B===k||!f&&B.startsWith(k)&&B.charAt(Z)==="/",ae=q!=null&&(q===k||!f&&q.startsWith(k)&&q.charAt(k.length)==="/"),Q={isActive:I,isPending:ae,isTransitioning:Y},ue=I?a:void 0,ee;typeof r=="function"?ee=r(Q):ee=[r,I?"active":null,ae?"pending":null,Y?"transitioning":null].filter(Boolean).join(" ");let Me=typeof d=="function"?d(Q):d;return g.createElement(Qm,{...v,"aria-current":ue,className:ee,ref:A,style:Me,to:y,viewTransition:b},typeof p=="function"?p(Q):p)});fg.displayName="NavLink";var dg=g.forwardRef(({discover:i="render",fetcherKey:a,navigate:s,reloadDocument:r,replace:f,state:d,method:y=Nu,action:b,onSubmit:p,relative:v,preventScrollReset:A,viewTransition:T,...D},R)=>{let M=vg(),V=gg(b,{relative:v}),Y=y.toLowerCase()==="get"?"get":"post",k=typeof b=="string"&&Gm.test(b),B=q=>{if(p&&p(q),q.defaultPrevented)return;q.preventDefault();let Z=q.nativeEvent.submitter,I=Z?.getAttribute("formmethod")||y;M(Z||q.currentTarget,{fetcherKey:a,method:I,navigate:s,replace:f,state:d,relative:v,preventScrollReset:A,viewTransition:T})};return g.createElement("form",{ref:R,method:Y,action:V,onSubmit:r?p:B,...D,"data-discover":!k&&i==="render"?"true":void 0})});dg.displayName="Form";function hg(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Zm(i){let a=g.useContext($l);return Oe(a,hg(i)),a}function mg(i,{target:a,replace:s,state:r,preventScrollReset:f,relative:d,viewTransition:y}={}){let b=Tv(),p=rl(),v=ei(i,{relative:d});return g.useCallback(A=>{if(Zv(A,a)){A.preventDefault();let T=s!==void 0?s:Fa(p)===Fa(v);b(i,{replace:T,state:r,preventScrollReset:f,relative:d,viewTransition:y})}},[p,b,v,s,r,a,i,f,d,y])}var pg=0,yg=()=>`__${String(++pg)}__`;function vg(){let{router:i}=Zm("useSubmit"),{basename:a}=g.useContext(Vt),s=Bv();return g.useCallback(async(r,f={})=>{let{action:d,method:y,encType:b,formData:p,body:v}=$v(r,a);if(f.navigate===!1){let A=f.fetcherKey||yg();await i.fetch(A,s,f.action||d,{preventScrollReset:f.preventScrollReset,formData:p,body:v,formMethod:f.method||y,formEncType:f.encType||b,flushSync:f.flushSync})}else await i.navigate(f.action||d,{preventScrollReset:f.preventScrollReset,formData:p,body:v,formMethod:f.method||y,formEncType:f.encType||b,replace:f.replace,state:f.state,fromRouteId:s,flushSync:f.flushSync,viewTransition:f.viewTransition})},[i,a,s])}function gg(i,{relative:a}={}){let{basename:s}=g.useContext(Vt),r=g.useContext(dn);Oe(r,"useFormAction must be used inside a RouteContext");let[f]=r.matches.slice(-1),d={...ei(i||".",{relative:a})},y=rl();if(i==null){d.search=y.search;let b=new URLSearchParams(d.search),p=b.getAll("index");if(p.some(A=>A==="")){b.delete("index"),p.filter(T=>T).forEach(T=>b.append("index",T));let A=b.toString();d.search=A?`?${A}`:""}}return(!i||i===".")&&f.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(d.pathname=d.pathname==="/"?s:rn([s,d.pathname])),Fa(d)}function bg(i,{relative:a}={}){let s=g.useContext(Bm);Oe(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Zm("useViewTransitionState"),f=ei(i,{relative:a});if(!s.isTransitioning)return!1;let d=fn(s.currentLocation.pathname,r)||s.currentLocation.pathname,y=fn(s.nextLocation.pathname,r)||s.nextLocation.pathname;return wu(f.pathname,y)!=null||wu(f.pathname,d)!=null}const kt=Object.create(null);kt.open="0";kt.close="1";kt.ping="2";kt.pong="3";kt.message="4";kt.upgrade="5";kt.noop="6";const Ou=Object.create(null);Object.keys(kt).forEach(i=>{Ou[kt[i]]=i});const Tr={type:"error",data:"parser error"},Km=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Jm=typeof ArrayBuffer=="function",$m=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i&&i.buffer instanceof ArrayBuffer,Yr=({type:i,data:a},s,r)=>Km&&a instanceof Blob?s?r(a):gm(a,r):Jm&&(a instanceof ArrayBuffer||$m(a))?s?r(a):gm(new Blob([a]),r):r(kt[i]+(a||"")),gm=(i,a)=>{const s=new FileReader;return s.onload=function(){const r=s.result.split(",")[1];a("b"+(r||""))},s.readAsDataURL(i)};function bm(i){return i instanceof Uint8Array?i:i instanceof ArrayBuffer?new Uint8Array(i):new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}let dr;function xg(i,a){if(Km&&i.data instanceof Blob)return i.data.arrayBuffer().then(bm).then(a);if(Jm&&(i.data instanceof ArrayBuffer||$m(i.data)))return a(bm(i.data));Yr(i,!1,s=>{dr||(dr=new TextEncoder),a(dr.encode(s))})}const xm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$a=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let i=0;i<xm.length;i++)$a[xm.charCodeAt(i)]=i;const Sg=i=>{let a=i.length*.75,s=i.length,r,f=0,d,y,b,p;i[i.length-1]==="="&&(a--,i[i.length-2]==="="&&a--);const v=new ArrayBuffer(a),A=new Uint8Array(v);for(r=0;r<s;r+=4)d=$a[i.charCodeAt(r)],y=$a[i.charCodeAt(r+1)],b=$a[i.charCodeAt(r+2)],p=$a[i.charCodeAt(r+3)],A[f++]=d<<2|y>>4,A[f++]=(y&15)<<4|b>>2,A[f++]=(b&3)<<6|p&63;return v},Eg=typeof ArrayBuffer=="function",kr=(i,a)=>{if(typeof i!="string")return{type:"message",data:Fm(i,a)};const s=i.charAt(0);return s==="b"?{type:"message",data:_g(i.substring(1),a)}:Ou[s]?i.length>1?{type:Ou[s],data:i.substring(1)}:{type:Ou[s]}:Tr},_g=(i,a)=>{if(Eg){const s=Sg(i);return Fm(s,a)}else return{base64:!0,data:i}},Fm=(i,a)=>{switch(a){case"blob":return i instanceof Blob?i:new Blob([i]);case"arraybuffer":default:return i instanceof ArrayBuffer?i:i.buffer}},Wm="",Ag=(i,a)=>{const s=i.length,r=new Array(s);let f=0;i.forEach((d,y)=>{Yr(d,!1,b=>{r[y]=b,++f===s&&a(r.join(Wm))})})},Tg=(i,a)=>{const s=i.split(Wm),r=[];for(let f=0;f<s.length;f++){const d=kr(s[f],a);if(r.push(d),d.type==="error")break}return r};function Cg(){return new TransformStream({transform(i,a){xg(i,s=>{const r=s.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 d=new DataView(f.buffer);d.setUint8(0,126),d.setUint16(1,r)}else{f=new Uint8Array(9);const d=new DataView(f.buffer);d.setUint8(0,127),d.setBigUint64(1,BigInt(r))}i.data&&typeof i.data!="string"&&(f[0]|=128),a.enqueue(f),a.enqueue(s)})}})}let hr;function xu(i){return i.reduce((a,s)=>a+s.length,0)}function Su(i,a){if(i[0].length===a)return i.shift();const s=new Uint8Array(a);let r=0;for(let f=0;f<a;f++)s[f]=i[0][r++],r===i[0].length&&(i.shift(),r=0);return i.length&&r<i[0].length&&(i[0]=i[0].slice(r)),s}function Ng(i,a){hr||(hr=new TextDecoder);const s=[];let r=0,f=-1,d=!1;return new TransformStream({transform(y,b){for(s.push(y);;){if(r===0){if(xu(s)<1)break;const p=Su(s,1);d=(p[0]&128)===128,f=p[0]&127,f<126?r=3:f===126?r=1:r=2}else if(r===1){if(xu(s)<2)break;const p=Su(s,2);f=new DataView(p.buffer,p.byteOffset,p.length).getUint16(0),r=3}else if(r===2){if(xu(s)<8)break;const p=Su(s,8),v=new DataView(p.buffer,p.byteOffset,p.length),A=v.getUint32(0);if(A>Math.pow(2,21)-1){b.enqueue(Tr);break}f=A*Math.pow(2,32)+v.getUint32(4),r=3}else{if(xu(s)<f)break;const p=Su(s,f);b.enqueue(kr(d?p:hr.decode(p),a)),r=0}if(f===0||f>i){b.enqueue(Tr);break}}}})}const Im=4;function Ye(i){if(i)return Rg(i)}function Rg(i){for(var a in Ye.prototype)i[a]=Ye.prototype[a];return i}Ye.prototype.on=Ye.prototype.addEventListener=function(i,a){return this._callbacks=this._callbacks||{},(this._callbacks["$"+i]=this._callbacks["$"+i]||[]).push(a),this};Ye.prototype.once=function(i,a){function s(){this.off(i,s),a.apply(this,arguments)}return s.fn=a,this.on(i,s),this};Ye.prototype.off=Ye.prototype.removeListener=Ye.prototype.removeAllListeners=Ye.prototype.removeEventListener=function(i,a){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+i];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+i],this;for(var r,f=0;f<s.length;f++)if(r=s[f],r===a||r.fn===a){s.splice(f,1);break}return s.length===0&&delete this._callbacks["$"+i],this};Ye.prototype.emit=function(i){this._callbacks=this._callbacks||{};for(var a=new Array(arguments.length-1),s=this._callbacks["$"+i],r=1;r<arguments.length;r++)a[r-1]=arguments[r];if(s){s=s.slice(0);for(var r=0,f=s.length;r<f;++r)s[r].apply(this,a)}return this};Ye.prototype.emitReserved=Ye.prototype.emit;Ye.prototype.listeners=function(i){return this._callbacks=this._callbacks||{},this._callbacks["$"+i]||[]};Ye.prototype.hasListeners=function(i){return!!this.listeners(i).length};const Bu=typeof Promise=="function"&&typeof Promise.resolve=="function"?a=>Promise.resolve().then(a):(a,s)=>s(a,0),Rt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Og="arraybuffer";function Pm(i,...a){return a.reduce((s,r)=>(i.hasOwnProperty(r)&&(s[r]=i[r]),s),{})}const Mg=Rt.setTimeout,zg=Rt.clearTimeout;function Lu(i,a){a.useNativeTimers?(i.setTimeoutFn=Mg.bind(Rt),i.clearTimeoutFn=zg.bind(Rt)):(i.setTimeoutFn=Rt.setTimeout.bind(Rt),i.clearTimeoutFn=Rt.clearTimeout.bind(Rt))}const Dg=1.33;function wg(i){return typeof i=="string"?jg(i):Math.ceil((i.byteLength||i.size)*Dg)}function jg(i){let a=0,s=0;for(let r=0,f=i.length;r<f;r++)a=i.charCodeAt(r),a<128?s+=1:a<2048?s+=2:a<55296||a>=57344?s+=3:(r++,s+=4);return s}function ep(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Ug(i){let a="";for(let s in i)i.hasOwnProperty(s)&&(a.length&&(a+="&"),a+=encodeURIComponent(s)+"="+encodeURIComponent(i[s]));return a}function Bg(i){let a={},s=i.split("&");for(let r=0,f=s.length;r<f;r++){let d=s[r].split("=");a[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}return a}class Lg extends Error{constructor(a,s,r){super(a),this.description=s,this.context=r,this.type="TransportError"}}class Vr extends Ye{constructor(a){super(),this.writable=!1,Lu(this,a),this.opts=a,this.query=a.query,this.socket=a.socket,this.supportsBinary=!a.forceBase64}onError(a,s,r){return super.emitReserved("error",new Lg(a,s,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(a){this.readyState==="open"&&this.write(a)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(a){const s=kr(a,this.socket.binaryType);this.onPacket(s)}onPacket(a){super.emitReserved("packet",a)}onClose(a){this.readyState="closed",super.emitReserved("close",a)}pause(a){}createUri(a,s={}){return a+"://"+this._hostname()+this._port()+this.opts.path+this._query(s)}_hostname(){const a=this.opts.hostname;return a.indexOf(":")===-1?a:"["+a+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(a){const s=Ug(a);return s.length?"?"+s:""}}class Hg extends Vr{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(a){this.readyState="pausing";const s=()=>{this.readyState="paused",a()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||s()})),this.writable||(r++,this.once("drain",function(){--r||s()}))}else s()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(a){const s=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)};Tg(a,this.socket.binaryType).forEach(s),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const a=()=>{this.write([{type:"close"}])};this.readyState==="open"?a():this.once("open",a)}write(a){this.writable=!1,Ag(a,s=>{this.doWrite(s,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const a=this.opts.secure?"https":"http",s=this.query||{};return this.opts.timestampRequests!==!1&&(s[this.opts.timestampParam]=ep()),!this.supportsBinary&&!s.sid&&(s.b64=1),this.createUri(a,s)}}let tp=!1;try{tp=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const qg=tp;function Yg(){}class kg extends Hg{constructor(a){if(super(a),typeof location<"u"){const s=location.protocol==="https:";let r=location.port;r||(r=s?"443":"80"),this.xd=typeof location<"u"&&a.hostname!==location.hostname||r!==a.port}}doWrite(a,s){const r=this.request({method:"POST",data:a});r.on("success",s),r.on("error",(f,d)=>{this.onError("xhr post error",f,d)})}doPoll(){const a=this.request();a.on("data",this.onData.bind(this)),a.on("error",(s,r)=>{this.onError("xhr poll error",s,r)}),this.pollXhr=a}}class Yt extends Ye{constructor(a,s,r){super(),this.createRequest=a,Lu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=s,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var a;const s=Pm(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(s);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{}(a=this._opts.cookieJar)===null||a===void 0||a.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=Yt.requestsCount++,Yt.requests[this._index]=this)}_onError(a){this.emitReserved("error",a,this._xhr),this._cleanup(!0)}_cleanup(a){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Yg,a)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Yt.requests[this._index],this._xhr=null}}_onLoad(){const a=this._xhr.responseText;a!==null&&(this.emitReserved("data",a),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Yt.requestsCount=0;Yt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Sm);else if(typeof addEventListener=="function"){const i="onpagehide"in Rt?"pagehide":"unload";addEventListener(i,Sm,!1)}}function Sm(){for(let i in Yt.requests)Yt.requests.hasOwnProperty(i)&&Yt.requests[i].abort()}const Vg=(function(){const i=np({xdomain:!1});return i&&i.responseType!==null})();class Xg extends kg{constructor(a){super(a);const s=a&&a.forceBase64;this.supportsBinary=Vg&&!s}request(a={}){return Object.assign(a,{xd:this.xd},this.opts),new Yt(np,this.uri(),a)}}function np(i){const a=i.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!a||qg))return new XMLHttpRequest}catch{}if(!a)try{return new Rt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const lp=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Gg extends Vr{get name(){return"websocket"}doOpen(){const a=this.uri(),s=this.opts.protocols,r=lp?{}:Pm(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(a,s,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=a=>this.onClose({description:"websocket connection closed",context:a}),this.ws.onmessage=a=>this.onData(a.data),this.ws.onerror=a=>this.onError("websocket error",a)}write(a){this.writable=!1;for(let s=0;s<a.length;s++){const r=a[s],f=s===a.length-1;Yr(r,this.supportsBinary,d=>{try{this.doWrite(r,d)}catch{}f&&Bu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const a=this.opts.secure?"wss":"ws",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=ep()),this.supportsBinary||(s.b64=1),this.createUri(a,s)}}const mr=Rt.WebSocket||Rt.MozWebSocket;class Qg extends Gg{createSocket(a,s,r){return lp?new mr(a,s,r):s?new mr(a,s):new mr(a)}doWrite(a,s){this.ws.send(s)}}class Zg extends Vr{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(a){return this.emitReserved("error",a)}this._transport.closed.then(()=>{this.onClose()}).catch(a=>{this.onError("webtransport error",a)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(a=>{const s=Ng(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=a.readable.pipeThrough(s).getReader(),f=Cg();f.readable.pipeTo(a.writable),this._writer=f.writable.getWriter();const d=()=>{r.read().then(({done:b,value:p})=>{b||(this.onPacket(p),d())}).catch(b=>{})};d();const y={type:"open"};this.query.sid&&(y.data=`{"sid":"${this.query.sid}"}`),this._writer.write(y).then(()=>this.onOpen())})})}write(a){this.writable=!1;for(let s=0;s<a.length;s++){const r=a[s],f=s===a.length-1;this._writer.write(r).then(()=>{f&&Bu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var a;(a=this._transport)===null||a===void 0||a.close()}}const Kg={websocket:Qg,webtransport:Zg,polling:Xg},Jg=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,$g=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Cr(i){if(i.length>8e3)throw"URI too long";const a=i,s=i.indexOf("["),r=i.indexOf("]");s!=-1&&r!=-1&&(i=i.substring(0,s)+i.substring(s,r).replace(/:/g,";")+i.substring(r,i.length));let f=Jg.exec(i||""),d={},y=14;for(;y--;)d[$g[y]]=f[y]||"";return s!=-1&&r!=-1&&(d.source=a,d.host=d.host.substring(1,d.host.length-1).replace(/;/g,":"),d.authority=d.authority.replace("[","").replace("]","").replace(/;/g,":"),d.ipv6uri=!0),d.pathNames=Fg(d,d.path),d.queryKey=Wg(d,d.query),d}function Fg(i,a){const s=/\/{2,9}/g,r=a.replace(s,"/").split("/");return(a.slice(0,1)=="/"||a.length===0)&&r.splice(0,1),a.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Wg(i,a){const s={};return a.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,f,d){f&&(s[f]=d)}),s}const Nr=typeof addEventListener=="function"&&typeof removeEventListener=="function",Mu=[];Nr&&addEventListener("offline",()=>{Mu.forEach(i=>i())},!1);class qn extends Ye{constructor(a,s){if(super(),this.binaryType=Og,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,a&&typeof a=="object"&&(s=a,a=null),a){const r=Cr(a);s.hostname=r.host,s.secure=r.protocol==="https"||r.protocol==="wss",s.port=r.port,r.query&&(s.query=r.query)}else s.host&&(s.hostname=Cr(s.host).host);Lu(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.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},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Bg(this.opts.query)),Nr&&(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"})},Mu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(a){const s=Object.assign({},this.opts.query);s.EIO=Im,s.transport=a,this.id&&(s.sid=this.id);const r=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[a]);return new this._transportsByName[a](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const a=this.opts.rememberUpgrade&&qn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const s=this.createTransport(a);s.open(),this.setTransport(s)}setTransport(a){this.transport&&this.transport.removeAllListeners(),this.transport=a,a.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",qn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(a){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",a),this.emitReserved("heartbeat"),a.type){case"open":this.onHandshake(JSON.parse(a.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const s=new Error("server error");s.code=a.data,this._onError(s);break;case"message":this.emitReserved("data",a.data),this.emitReserved("message",a.data);break}}onHandshake(a){this.emitReserved("handshake",a),this.id=a.sid,this.transport.query.sid=a.sid,this._pingInterval=a.pingInterval,this._pingTimeout=a.pingTimeout,this._maxPayload=a.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const a=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+a,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},a),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 a=this._getWritablePackets();this.transport.send(a),this._prevBufferLen=a.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let r=0;r<this.writeBuffer.length;r++){const f=this.writeBuffer[r].data;if(f&&(s+=wg(f)),r>0&&s>this._maxPayload)return this.writeBuffer.slice(0,r);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const a=Date.now()>this._pingTimeoutTime;return a&&(this._pingTimeoutTime=0,Bu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),a}write(a,s,r){return this._sendPacket("message",a,s,r),this}send(a,s,r){return this._sendPacket("message",a,s,r),this}_sendPacket(a,s,r,f){if(typeof s=="function"&&(f=s,s=void 0),typeof r=="function"&&(f=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const d={type:a,data:s,options:r};this.emitReserved("packetCreate",d),this.writeBuffer.push(d),f&&this.once("flush",f),this.flush()}close(){const a=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),a()},r=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():a()}):this.upgrading?r():a()),this}_onError(a){if(qn.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",a),this._onClose("transport error",a)}_onClose(a,s){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(),Nr&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Mu.indexOf(this._offlineEventListener);r!==-1&&Mu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",a,s),this.writeBuffer=[],this._prevBufferLen=0}}}qn.protocol=Im;class Ig extends qn{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let a=0;a<this._upgrades.length;a++)this._probe(this._upgrades[a])}_probe(a){let s=this.createTransport(a),r=!1;qn.priorWebsocketSuccess=!1;const f=()=>{r||(s.send([{type:"ping",data:"probe"}]),s.once("packet",T=>{if(!r)if(T.type==="pong"&&T.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;qn.priorWebsocketSuccess=s.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(A(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())})}else{const D=new Error("probe error");D.transport=s.name,this.emitReserved("upgradeError",D)}}))};function d(){r||(r=!0,A(),s.close(),s=null)}const y=T=>{const D=new Error("probe error: "+T);D.transport=s.name,d(),this.emitReserved("upgradeError",D)};function b(){y("transport closed")}function p(){y("socket closed")}function v(T){s&&T.name!==s.name&&d()}const A=()=>{s.removeListener("open",f),s.removeListener("error",y),s.removeListener("close",b),this.off("close",p),this.off("upgrading",v)};s.once("open",f),s.once("error",y),s.once("close",b),this.once("close",p),this.once("upgrading",v),this._upgrades.indexOf("webtransport")!==-1&&a!=="webtransport"?this.setTimeoutFn(()=>{r||s.open()},200):s.open()}onHandshake(a){this._upgrades=this._filterUpgrades(a.upgrades),super.onHandshake(a)}_filterUpgrades(a){const s=[];for(let r=0;r<a.length;r++)~this.transports.indexOf(a[r])&&s.push(a[r]);return s}}let Pg=class extends Ig{constructor(a,s={}){const r=typeof a=="object"?a:s;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(f=>Kg[f]).filter(f=>!!f)),super(a,r)}};function eb(i,a="",s){let r=i;s=s||typeof location<"u"&&location,i==null&&(i=s.protocol+"//"+s.host),typeof i=="string"&&(i.charAt(0)==="/"&&(i.charAt(1)==="/"?i=s.protocol+i:i=s.host+i),/^(https?|wss?):\/\//.test(i)||(typeof s<"u"?i=s.protocol+"//"+i:i="https://"+i),r=Cr(i)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const d=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+d+":"+r.port+a,r.href=r.protocol+"://"+d+(s&&s.port===r.port?"":":"+r.port),r}const tb=typeof ArrayBuffer=="function",nb=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer,ap=Object.prototype.toString,lb=typeof Blob=="function"||typeof Blob<"u"&&ap.call(Blob)==="[object BlobConstructor]",ab=typeof File=="function"||typeof File<"u"&&ap.call(File)==="[object FileConstructor]";function Xr(i){return tb&&(i instanceof ArrayBuffer||nb(i))||lb&&i instanceof Blob||ab&&i instanceof File}function zu(i,a){if(!i||typeof i!="object")return!1;if(Array.isArray(i)){for(let s=0,r=i.length;s<r;s++)if(zu(i[s]))return!0;return!1}if(Xr(i))return!0;if(i.toJSON&&typeof i.toJSON=="function"&&arguments.length===1)return zu(i.toJSON(),!0);for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&zu(i[s]))return!0;return!1}function ib(i){const a=[],s=i.data,r=i;return r.data=Rr(s,a),r.attachments=a.length,{packet:r,buffers:a}}function Rr(i,a){if(!i)return i;if(Xr(i)){const s={_placeholder:!0,num:a.length};return a.push(i),s}else if(Array.isArray(i)){const s=new Array(i.length);for(let r=0;r<i.length;r++)s[r]=Rr(i[r],a);return s}else if(typeof i=="object"&&!(i instanceof Date)){const s={};for(const r in i)Object.prototype.hasOwnProperty.call(i,r)&&(s[r]=Rr(i[r],a));return s}return i}function ub(i,a){return i.data=Or(i.data,a),delete i.attachments,i}function Or(i,a){if(!i)return i;if(i&&i._placeholder===!0){if(typeof i.num=="number"&&i.num>=0&&i.num<a.length)return a[i.num];throw new Error("illegal attachments")}else if(Array.isArray(i))for(let s=0;s<i.length;s++)i[s]=Or(i[s],a);else if(typeof i=="object")for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&(i[s]=Or(i[s],a));return i}const sb=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],cb=5;var he;(function(i){i[i.CONNECT=0]="CONNECT",i[i.DISCONNECT=1]="DISCONNECT",i[i.EVENT=2]="EVENT",i[i.ACK=3]="ACK",i[i.CONNECT_ERROR=4]="CONNECT_ERROR",i[i.BINARY_EVENT=5]="BINARY_EVENT",i[i.BINARY_ACK=6]="BINARY_ACK"})(he||(he={}));class rb{constructor(a){this.replacer=a}encode(a){return(a.type===he.EVENT||a.type===he.ACK)&&zu(a)?this.encodeAsBinary({type:a.type===he.EVENT?he.BINARY_EVENT:he.BINARY_ACK,nsp:a.nsp,data:a.data,id:a.id}):[this.encodeAsString(a)]}encodeAsString(a){let s=""+a.type;return(a.type===he.BINARY_EVENT||a.type===he.BINARY_ACK)&&(s+=a.attachments+"-"),a.nsp&&a.nsp!=="/"&&(s+=a.nsp+","),a.id!=null&&(s+=a.id),a.data!=null&&(s+=JSON.stringify(a.data,this.replacer)),s}encodeAsBinary(a){const s=ib(a),r=this.encodeAsString(s.packet),f=s.buffers;return f.unshift(r),f}}function Em(i){return Object.prototype.toString.call(i)==="[object Object]"}class Gr extends Ye{constructor(a){super(),this.reviver=a}add(a){let s;if(typeof a=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");s=this.decodeString(a);const r=s.type===he.BINARY_EVENT;r||s.type===he.BINARY_ACK?(s.type=r?he.EVENT:he.ACK,this.reconstructor=new ob(s),s.attachments===0&&super.emitReserved("decoded",s)):super.emitReserved("decoded",s)}else if(Xr(a)||a.base64)if(this.reconstructor)s=this.reconstructor.takeBinaryData(a),s&&(this.reconstructor=null,super.emitReserved("decoded",s));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+a)}decodeString(a){let s=0;const r={type:Number(a.charAt(0))};if(he[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===he.BINARY_EVENT||r.type===he.BINARY_ACK){const d=s+1;for(;a.charAt(++s)!=="-"&&s!=a.length;);const y=a.substring(d,s);if(y!=Number(y)||a.charAt(s)!=="-")throw new Error("Illegal attachments");r.attachments=Number(y)}if(a.charAt(s+1)==="/"){const d=s+1;for(;++s&&!(a.charAt(s)===","||s===a.length););r.nsp=a.substring(d,s)}else r.nsp="/";const f=a.charAt(s+1);if(f!==""&&Number(f)==f){const d=s+1;for(;++s;){const y=a.charAt(s);if(y==null||Number(y)!=y){--s;break}if(s===a.length)break}r.id=Number(a.substring(d,s+1))}if(a.charAt(++s)){const d=this.tryParse(a.substr(s));if(Gr.isPayloadValid(r.type,d))r.data=d;else throw new Error("invalid payload")}return r}tryParse(a){try{return JSON.parse(a,this.reviver)}catch{return!1}}static isPayloadValid(a,s){switch(a){case he.CONNECT:return Em(s);case he.DISCONNECT:return s===void 0;case he.CONNECT_ERROR:return typeof s=="string"||Em(s);case he.EVENT:case he.BINARY_EVENT:return Array.isArray(s)&&(typeof s[0]=="number"||typeof s[0]=="string"&&sb.indexOf(s[0])===-1);case he.ACK:case he.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ob{constructor(a){this.packet=a,this.buffers=[],this.reconPack=a}takeBinaryData(a){if(this.buffers.push(a),this.buffers.length===this.reconPack.attachments){const s=ub(this.reconPack,this.buffers);return this.finishedReconstruction(),s}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const fb=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Gr,Encoder:rb,get PacketType(){return he},protocol:cb},Symbol.toStringTag,{value:"Module"}));function wt(i,a,s){return i.on(a,s),function(){i.off(a,s)}}const db=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ip extends Ye{constructor(a,s,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=a,this.nsp=s,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 a=this.io;this.subs=[wt(a,"open",this.onopen.bind(this)),wt(a,"packet",this.onpacket.bind(this)),wt(a,"error",this.onerror.bind(this)),wt(a,"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(...a){return a.unshift("message"),this.emit.apply(this,a),this}emit(a,...s){var r,f,d;if(db.hasOwnProperty(a))throw new Error('"'+a.toString()+'" is a reserved event name');if(s.unshift(a),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(s),this;const y={type:he.EVENT,data:s};if(y.options={},y.options.compress=this.flags.compress!==!1,typeof s[s.length-1]=="function"){const A=this.ids++,T=s.pop();this._registerAckCallback(A,T),y.id=A}const b=(f=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||f===void 0?void 0:f.writable,p=this.connected&&!(!((d=this.io.engine)===null||d===void 0)&&d._hasPingExpired());return this.flags.volatile&&!b||(p?(this.notifyOutgoingListeners(y),this.packet(y)):this.sendBuffer.push(y)),this.flags={},this}_registerAckCallback(a,s){var r;const f=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(f===void 0){this.acks[a]=s;return}const d=this.io.setTimeoutFn(()=>{delete this.acks[a];for(let b=0;b<this.sendBuffer.length;b++)this.sendBuffer[b].id===a&&this.sendBuffer.splice(b,1);s.call(this,new Error("operation has timed out"))},f),y=(...b)=>{this.io.clearTimeoutFn(d),s.apply(this,b)};y.withError=!0,this.acks[a]=y}emitWithAck(a,...s){return new Promise((r,f)=>{const d=(y,b)=>y?f(y):r(b);d.withError=!0,s.push(d),this.emit(a,...s)})}_addToQueue(a){let s;typeof a[a.length-1]=="function"&&(s=a.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:a,flags:Object.assign({fromQueue:!0},this.flags)};a.push((f,...d)=>r!==this._queue[0]?void 0:(f!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),s&&s(f)):(this._queue.shift(),s&&s(null,...d)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(a=!1){if(!this.connected||this._queue.length===0)return;const s=this._queue[0];s.pending&&!a||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(a){a.nsp=this.nsp,this.io._packet(a)}onopen(){typeof this.auth=="function"?this.auth(a=>{this._sendConnectPacket(a)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(a){this.packet({type:he.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},a):a})}onerror(a){this.connected||this.emitReserved("connect_error",a)}onclose(a,s){this.connected=!1,delete this.id,this.emitReserved("disconnect",a,s),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(a=>{if(!this.sendBuffer.some(r=>String(r.id)===a)){const r=this.acks[a];delete this.acks[a],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(a){if(a.nsp===this.nsp)switch(a.type){case he.CONNECT:a.data&&a.data.sid?this.onconnect(a.data.sid,a.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 he.EVENT:case he.BINARY_EVENT:this.onevent(a);break;case he.ACK:case he.BINARY_ACK:this.onack(a);break;case he.DISCONNECT:this.ondisconnect();break;case he.CONNECT_ERROR:this.destroy();const r=new Error(a.data.message);r.data=a.data.data,this.emitReserved("connect_error",r);break}}onevent(a){const s=a.data||[];a.id!=null&&s.push(this.ack(a.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(a){if(this._anyListeners&&this._anyListeners.length){const s=this._anyListeners.slice();for(const r of s)r.apply(this,a)}super.emit.apply(this,a),this._pid&&a.length&&typeof a[a.length-1]=="string"&&(this._lastOffset=a[a.length-1])}ack(a){const s=this;let r=!1;return function(...f){r||(r=!0,s.packet({type:he.ACK,id:a,data:f}))}}onack(a){const s=this.acks[a.id];typeof s=="function"&&(delete this.acks[a.id],s.withError&&a.data.unshift(null),s.apply(this,a.data))}onconnect(a,s){this.id=a,this.recovered=s&&this._pid===s,this._pid=s,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(a=>this.emitEvent(a)),this.receiveBuffer=[],this.sendBuffer.forEach(a=>{this.notifyOutgoingListeners(a),this.packet(a)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(a=>a()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:he.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(a){return this.flags.compress=a,this}get volatile(){return this.flags.volatile=!0,this}timeout(a){return this.flags.timeout=a,this}onAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(a),this}prependAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(a),this}offAny(a){if(!this._anyListeners)return this;if(a){const s=this._anyListeners;for(let r=0;r<s.length;r++)if(a===s[r])return s.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(a),this}prependAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(a),this}offAnyOutgoing(a){if(!this._anyOutgoingListeners)return this;if(a){const s=this._anyOutgoingListeners;for(let r=0;r<s.length;r++)if(a===s[r])return s.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(a){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const s=this._anyOutgoingListeners.slice();for(const r of s)r.apply(this,a.data)}}}function Fl(i){i=i||{},this.ms=i.min||100,this.max=i.max||1e4,this.factor=i.factor||2,this.jitter=i.jitter>0&&i.jitter<=1?i.jitter:0,this.attempts=0}Fl.prototype.duration=function(){var i=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var a=Math.random(),s=Math.floor(a*this.jitter*i);i=(Math.floor(a*10)&1)==0?i-s:i+s}return Math.min(i,this.max)|0};Fl.prototype.reset=function(){this.attempts=0};Fl.prototype.setMin=function(i){this.ms=i};Fl.prototype.setMax=function(i){this.max=i};Fl.prototype.setJitter=function(i){this.jitter=i};class Mr extends Ye{constructor(a,s){var r;super(),this.nsps={},this.subs=[],a&&typeof a=="object"&&(s=a,a=void 0),s=s||{},s.path=s.path||"/socket.io",this.opts=s,Lu(this,s),this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor((r=s.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Fl({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this._readyState="closed",this.uri=a;const f=s.parser||fb;this.encoder=new f.Encoder,this.decoder=new f.Decoder,this._autoConnect=s.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(a){return arguments.length?(this._reconnection=!!a,a||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(a){return a===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=a,this)}reconnectionDelay(a){var s;return a===void 0?this._reconnectionDelay:(this._reconnectionDelay=a,(s=this.backoff)===null||s===void 0||s.setMin(a),this)}randomizationFactor(a){var s;return a===void 0?this._randomizationFactor:(this._randomizationFactor=a,(s=this.backoff)===null||s===void 0||s.setJitter(a),this)}reconnectionDelayMax(a){var s;return a===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=a,(s=this.backoff)===null||s===void 0||s.setMax(a),this)}timeout(a){return arguments.length?(this._timeout=a,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(a){if(~this._readyState.indexOf("open"))return this;this.engine=new Pg(this.uri,this.opts);const s=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const f=wt(s,"open",function(){r.onopen(),a&&a()}),d=b=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",b),a?a(b):this.maybeReconnectOnOpen()},y=wt(s,"error",d);if(this._timeout!==!1){const b=this._timeout,p=this.setTimeoutFn(()=>{f(),d(new Error("timeout")),s.close()},b);this.opts.autoUnref&&p.unref(),this.subs.push(()=>{this.clearTimeoutFn(p)})}return this.subs.push(f),this.subs.push(y),this}connect(a){return this.open(a)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const a=this.engine;this.subs.push(wt(a,"ping",this.onping.bind(this)),wt(a,"data",this.ondata.bind(this)),wt(a,"error",this.onerror.bind(this)),wt(a,"close",this.onclose.bind(this)),wt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(a){try{this.decoder.add(a)}catch(s){this.onclose("parse error",s)}}ondecoded(a){Bu(()=>{this.emitReserved("packet",a)},this.setTimeoutFn)}onerror(a){this.emitReserved("error",a)}socket(a,s){let r=this.nsps[a];return r?this._autoConnect&&!r.active&&r.connect():(r=new ip(this,a,s),this.nsps[a]=r),r}_destroy(a){const s=Object.keys(this.nsps);for(const r of s)if(this.nsps[r].active)return;this._close()}_packet(a){const s=this.encoder.encode(a);for(let r=0;r<s.length;r++)this.engine.write(s[r],a.options)}cleanup(){this.subs.forEach(a=>a()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(a,s){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",a,s),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const a=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const s=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{a.skipReconnect||(this.emitReserved("reconnect_attempt",a.backoff.attempts),!a.skipReconnect&&a.open(f=>{f?(a._reconnecting=!1,a.reconnect(),this.emitReserved("reconnect_error",f)):a.onreconnect()}))},s);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const a=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",a)}}const Ka={};function Du(i,a){typeof i=="object"&&(a=i,i=void 0),a=a||{};const s=eb(i,a.path||"/socket.io"),r=s.source,f=s.id,d=s.path,y=Ka[f]&&d in Ka[f].nsps,b=a.forceNew||a["force new connection"]||a.multiplex===!1||y;let p;return b?p=new Mr(r,a):(Ka[f]||(Ka[f]=new Mr(r,a)),p=Ka[f]),s.query&&!a.query&&(a.query=s.queryKey),p.socket(s.path,a)}Object.assign(Du,{Manager:Mr,Socket:ip,io:Du,connect:Du});const up=window.location.origin;console.info("[socket] connecting to",up);const Qr=Du(up,{transports:["polling","websocket"],timeout:15e3});Qr.on("connect_error",i=>console.error("connect_error",i.code,i.message,i.data));const sp=g.createContext(Qr),hb=({children:i})=>m.jsx(sp.Provider,{value:Qr,children:i}),Hu=()=>g.useContext(sp),cp=g.createContext({connected:!1,session:null,logs:[],login:async()=>{},setRole:async()=>{},requestControl:async()=>{},releaseControl:async()=>{},subscribeAll:async()=>{}});function mb(i){return g.useCallback((a,s={})=>new Promise((r,f)=>{i.emit(a,s,(d={})=>{d.error?f(new Error(d.error)):r(d)})}),[i])}function pb({children:i}){const a=Hu(),s=mb(a),[r,f]=g.useState(null),[d,y]=g.useState([]),[b,p]=g.useState([]),[v,A]=g.useState(a.connected);g.useEffect(()=>{const R=()=>A(!0),M=()=>A(!1);return a.on("connect",R),a.on("disconnect",M),()=>{a.off("connect",R),a.off("disconnect",M)}},[a]),g.useEffect(()=>{function R(Y){f(Y)}function M(Y=[]){y(Y)}function V(Y){y(k=>[...k.slice(-199),Y])}return a.on("session:sync",R),a.on("log:init",M),a.on("log:entry",V),a.on("alert:new",(Y={})=>{p(k=>[...k.slice(-49),{...Y,receivedAt:Date.now()}])}),()=>{a.off("session:sync",R),a.off("log:init",M),a.off("log:entry",V),a.off("alert:new")}},[a]);const T=g.useMemo(()=>({login:(R,M)=>s("auth:login",{username:R,password:M}),setRole:R=>s("session:setRole",{role:R}),requestControl:(R,M={})=>s("session:requestControl",{roverId:R,...M}),releaseControl:R=>s("session:releaseControl",{roverId:R}),subscribeAll:()=>s("session:subscribeAll"),lockRover:(R,M)=>s("session:lockRover",{roverId:R,locked:M}),setMode:R=>s("setMode",{mode:R})}),[s]),D=g.useMemo(()=>({connected:v,session:r,logs:d,alerts:b,...T}),[T,b,v,d,r]);return m.jsx(cp.Provider,{value:D,children:i})}function Ut(){return g.useContext(cp)}const rp=g.createContext({frames:{}});function yb({children:i}){const a=Hu(),[s,r]=g.useState({});g.useEffect(()=>{function d({roverId:y,sensors:b={},frame:p={}}){y&&r(v=>({...v,[y]:{roverId:y,sensors:b,raw:p?.data||null,receivedAt:Date.now()}}))}return a.on("sensorFrame",d),()=>{a.off("sensorFrame",d)}},[a]);const f=g.useMemo(()=>({frames:s}),[s]);return m.jsx(rp.Provider,{value:f,children:i})}function op(){return g.useContext(rp).frames}function Zr(i){const a=op();return i?a[i]??null:null}function sl(i,a="--"){return i==null||i===""?a:i}function Kr(){const{connected:i,session:a,requestControl:s}=Ut(),r=a?.assignment?.roverId,f=Zr(r),d=f?.sensors||{},y=d.voltageMv!=null?`${(d.voltageMv/1e3).toFixed(2)} V`:null,b=d.currentMa!=null?`${d.currentMa} mA`:null,p=d.batteryChargeMah,v=d.batteryCapacityMah,A=f?.receivedAt?new Date(f.receivedAt).toLocaleTimeString():null,T=f?.raw?f.raw:null,D=a?.roster??[],R=r?a?.activeDrivers?.[r]:null,M=r?R?R===a?.socketId?"You":R.slice(0,6):"Available":"n/a",V=g.useMemo(()=>a?.role==="admin"||a?.role==="lockdown"||a?.role==="lockdown-admin",[a?.role]),[Y,k]=g.useState({});async function B(q){if(q){k(Z=>({...Z,[q]:!0}));try{await s(q)}catch(Z){alert(Z.message)}finally{k(Z=>({...Z,[q]:!1}))}}}return m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsxs("div",{className:"text-sm text-slate-400",children:[m.jsx("span",{children:i?"online":"offline"}),m.jsxs("span",{children:[" · role ",a?.role||"unknown"]}),m.jsxs("span",{children:[" · mode ",a?.mode||"--"]}),A&&m.jsxs("span",{children:[" · sensors ",A]}),m.jsxs("span",{children:[" · driver ",M]})]}),r?f?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex flex-wrap gap-0.5",children:[m.jsx(cl,{label:"Charge",value:sl(p!=null&&v!=null?`${p}/${v}`:null)}),m.jsx(cl,{label:"Charging",value:sl(d.chargingState?.label)}),m.jsx(cl,{label:"OI mode",value:sl(d.oiMode?.label)}),m.jsx(cl,{label:"Voltage",value:sl(y)}),m.jsx(cl,{label:"Current",value:sl(b)}),m.jsx(cl,{label:"Left Encoder",value:sl(d.encoderCountsLeft)}),m.jsx(cl,{label:"Right Encoder",value:sl(d.encoderCountsRight)})]}),m.jsxs("div",{className:"mt-1 flex gap-0.5",children:[m.jsx(Eu,{value:d.cliffLeftSignal}),m.jsx(Eu,{value:d.cliffFrontLeftSignal}),m.jsx(Eu,{value:d.cliffFrontRightSignal}),m.jsx(Eu,{value:d.cliffRightSignal})]})]}):m.jsx("p",{className:"mt-1 text-[0.75rem] text-slate-400",children:"Waiting for sensor frames…"}):m.jsx("p",{className:"mt-1 text-[0.75rem] text-slate-400",children:"Assign a rover to view sensors."}),T&&m.jsx("pre",{className:"mt-1 text-wrap break-words p-1 text-xs text-lime-300 bg-gray-700",children:T}),m.jsxs("div",{className:"mt-1",children:[m.jsx("p",{className:"text-sm text-slate-400",children:"Rovers"}),D.length===0?m.jsx("p",{className:"text-sm text-slate-500",children:"No roster data."}):m.jsx("ul",{className:"mt-1 space-y-1 text-sm",children:D.map(q=>m.jsxs("li",{className:"flex items-center justify-between gap-1",children:[m.jsxs("div",{children:[m.jsx("p",{className:"text-slate-200",children:q.name}),m.jsxs("p",{className:"text-xs text-slate-500",children:[q.locked?"locked":"free"," · ",q.lastSeen?"seen":"unknown"]})]}),V&&m.jsx("button",{type:"button",onClick:()=>B(q.id),disabled:Y[q.id],className:"rounded-sm bg-black/40 px-1 py-0.5 text-xs text-slate-200 disabled:opacity-40",children:Y[q.id]?"...":"request"})]},q.id))})]})]})}function Eu({value:i}){const s=`${i==null?0:Math.max(0,Math.min(100,i/4095*100))}%`;return m.jsx("div",{className:"w-1/4 h-6 bg-gray-700 rounded-sm overflow-hidden",children:m.jsx("div",{className:"w-full bg-amber-400",style:{height:s}})})}function cl({label:i,value:a}){return m.jsxs("div",{className:"bg-gray-700 rounded-sm p-0.5 text-sm",children:[i,": ",a]})}const pr={main:[-127,127],side:[-127,127],vacuum:[0,127]},yr={maxSpeed:500,baseSpeed:250,boostSpeed:400},zr=200,vb={start:[128],safe:[131],full:[132],passive:[128],dock:[143]},gb={driveForward:["w"],driveBackward:["s"],driveLeft:["a"],driveRight:["d"],boostModifier:["\\\\"],slowModifier:["shift"],auxMainForward:["o"],auxMainReverse:["l"],auxSideForward:["p"],auxSideReverse:[";"],auxVacuumFast:["["],auxVacuumSlow:["'"],auxAllForward:["."],cameraUp:["i"],cameraDown:["k"],driveMacro:["g"],dockMacro:["h"]},bb=[{id:"drive-sequence",label:"Drive",description:"Start, dock, and full command sequence used by the drive button.",steps:[{type:"oi",command:"start"},{type:"pause",duration:zr},{type:"oi",command:"dock"},{type:"pause",duration:zr},{type:"oi",command:"full"}]},{id:"seek-dock",label:"Dock",description:"Send the seek dock command.",steps:[{type:"oi",command:"dock"}]}],fp="roverControlSettings",xb=3600*24*365;function Dr(){return{vector:{x:0,y:0,boost:!1},speeds:{left:0,right:0},source:null,lastUpdatedAt:0}}function wr(){return{main:0,side:0,vacuum:0}}function Sb(){return{enabled:!1,angle:null,config:null}}const Eb={roverId:null,mode:"drive",drive:Dr(),aux:wr(),camera:Sb(),macros:bb,keymap:gb,inputs:{},settings:{status:"idle",error:null,lastLoadedAt:null,lastSavedAt:null,data:null}};function _b(i,a){const s={status:"ready",error:null,lastLoadedAt:Date.now(),lastSavedAt:i.settings.lastSavedAt,data:a??i.settings.data},r={...i,settings:s};return a?.keymap&&(r.keymap={...i.keymap,...a.keymap}),a?.macros&&(r.macros=a.macros),r}function Ab(i,a){switch(a.type){case"control/set-rover":return{...i,roverId:a.payload??null,drive:a.payload?i.drive:Dr(),aux:a.payload?i.aux:wr()};case"control/set-mode":return i.mode===a.payload?i:{...i,mode:a.payload==="dock"?"dock":"drive"};case"control/update-drive":{const{vector:s,speeds:r,source:f}=a.payload;return{...i,drive:{vector:s??i.drive.vector,speeds:r??i.drive.speeds,source:f??i.drive.source,lastUpdatedAt:Date.now()}}}case"control/set-aux-motors":return{...i,aux:{...i.aux,...a.payload}};case"control/set-camera-config":return{...i,camera:{...i.camera,enabled:!!a.payload?.config,config:a.payload?.config??null,angle:typeof a.payload?.angle=="number"?a.payload.angle:a.payload?.config?a.payload.config.homeAngle??i.camera.angle:null}};case"control/set-camera-angle":return{...i,camera:{...i.camera,angle:a.payload}};case"control/register-input-state":{const s=a.payload?.source||"unknown";return{...i,inputs:{...i.inputs,[s]:{...i.inputs[s]??{},...a.payload?.state,updatedAt:Date.now()}}}}case"control/settings/loading":return{...i,settings:{...i.settings,status:"loading",error:null}};case"control/settings/loaded":return _b(i,a.payload);case"control/settings/error":return{...i,settings:{...i.settings,status:"error",error:a.payload}};case"control/set-keymap":return{...i,keymap:{...i.keymap,...a.payload??{}}};case"control/set-macros":return{...i,macros:Array.isArray(a.payload)?a.payload:i.macros};case"control/reset":return{...i,drive:Dr(),aux:wr()};default:return i}}function Wa(i,a,s){return typeof i!="number"||Number.isNaN(i)?a:Math.max(a,Math.min(s,i))}function on(i){return typeof i!="number"||Number.isNaN(i)?0:Math.max(-1,Math.min(1,i))}function Ja(i,a){return!Array.isArray(a)||a.length!==2?i:Wa(i,a[0],a[1])}function Tb(i={}){const a=on(i.x??0),s=on(i.y??0);return{x:a,y:s,boost:!!i.boost}}function Cb(i={},a={}){const s=Tb(i),r=typeof a.maxSpeed=="number"?a.maxSpeed:yr.maxSpeed,f=typeof a.baseSpeed=="number"?a.baseSpeed:yr.baseSpeed,d=typeof a.boostSpeed=="number"?a.boostSpeed:yr.boostSpeed,y=s.boost?d:f,b=s.y*y,p=s.x*y;return{vector:s,speeds:{left:Wa(Math.round(b+p),-r,r),right:Wa(Math.round(b-p),-r,r)}}}function Nb(i){const a=Array.isArray(i)?i:[],s=String.fromCharCode(...a);if(typeof btoa=="function")return btoa(s);if(typeof Buffer<"u")return Buffer.from(a).toString("base64");throw new Error("No base64 encoder available")}function _m(i){return new Promise(a=>setTimeout(a,i))}function Rb(){const i=Hu(),{session:a}=Ut(),s=a?.assignment?.roverId,r=g.useMemo(()=>!s||!Array.isArray(a?.roster)?null:a.roster.find(D=>String(D.id)===String(s))||null,[s,a?.roster]),f=g.useMemo(()=>!r?.cameraServo||!r.cameraServo.enabled?null:r.cameraServo,[r]),d=g.useCallback((D,R)=>{s&&i.emit("command",{roverId:s,...D},R)},[i,s]),y=g.useCallback(()=>{s&&d({type:"sensorStream",data:{sensorStream:{enable:!0}}})},[d,s]),b=g.useCallback(D=>{if(!s)return null;const R={left:Ja(D?.left??0,[-500,500]),right:Ja(D?.right??0,[-500,500])};return d({type:"drive",data:{driveDirect:R}}),R},[d,s]),p=g.useCallback(({main:D=0,side:R=0,vacuum:M=0}={})=>{if(!s)return null;const V={main:Ja(D,pr.main),side:Ja(R,pr.side),vacuum:Ja(M,pr.vacuum)};return d({type:"motors",data:{motorPwm:V}}),V},[d,s]),v=g.useCallback(D=>!s||!f?null:(d({type:"servo",data:{servo:{angle:D}}}),D),[d,s,f]),A=g.useCallback(D=>{if(!s)return!1;const R=Array.isArray(D)?D:typeof D=="string"?vb[D]:null;return R?(d({type:"raw",data:{raw:Nb(R)}}),y(),!0):!1},[d,y,s]),T=g.useCallback(async D=>{if(!(!D||!Array.isArray(D.steps)||!s))for(const R of D.steps){if(!s)break;switch(R.type){case"oi":A(R.command);break;case"drive":b(R.speeds??{left:0,right:0});break;case"motors":p(R.values??{});break;case"servo":v(R.angle);break;case"pause":await _m(R.duration??zr);break}if(R.delay||R.delayMs){const M=R.delayMs??R.delay;typeof M=="number"&&M>0&&await _m(M)}}},[s,A,b,p,v]);return g.useMemo(()=>({roverId:s,rosterEntry:r,servoConfig:f,emitCommand:d,enableSensorStream:y,sendDriveDirect:b,sendAuxMotors:p,sendServoAngle:v,sendOiCommand:A,runMacroSteps:T}),[s,r,f,d,y,b,p,v,A,T])}function Ob(i){try{const a=decodeURIComponent(i??"");return JSON.parse(a)}catch(a){return console.warn("Failed to parse control settings cookie",a),null}}function Am(){if(typeof document>"u")return null;const i=`${fp}=`,a=document.cookie.split(";").map(r=>r.trim()).find(r=>r.startsWith(i));if(!a)return null;const s=a.substring(i.length);return Ob(s)}function Mb(i){if(typeof document>"u")return!1;try{const a=encodeURIComponent(JSON.stringify(i??{})),s=`${fp}=${a}; path=/; max-age=${xb}; samesite=strict`;return document.cookie=s,!0}catch(a){return console.warn("Failed to write control settings cookie",a),!1}}const dp=g.createContext(null);function zb(i,a){if(!i)return a;const s=typeof i.minAngle=="number"?i.minAngle:-45,r=typeof i.maxAngle=="number"?i.maxAngle:45;return Wa(a,s,r)}function Db({children:i}){const a=Rb(),[s,r]=g.useReducer(Ab,Eb);g.useEffect(()=>{r({type:"control/set-rover",payload:a.roverId})},[a.roverId]),g.useEffect(()=>{r({type:"control/settings/loading"});const B=Am();r({type:"control/settings/loaded",payload:B})},[]),g.useEffect(()=>{const B=a.servoConfig;if(!B){r({type:"control/set-camera-config",payload:{config:null}});return}const q=typeof B.minAngle=="number"?B.minAngle:-45,Z=typeof B.maxAngle=="number"?B.maxAngle:45,I=typeof B.homeAngle=="number"?B.homeAngle:(q+Z)/2;r({type:"control/set-camera-config",payload:{config:B,angle:Wa(I,q,Z)}})},[a.servoConfig]),g.useEffect(()=>{a.roverId&&a.enableSensorStream()},[a.roverId,a.enableSensorStream]);const f=g.useCallback(B=>{r({type:"control/set-mode",payload:B})},[]),d=g.useCallback((B,q={})=>{const Z=Cb(B);r({type:"control/update-drive",payload:{...Z,source:q.source??null}}),a.sendDriveDirect(Z.speeds)},[a]),y=g.useCallback((B={})=>{const q=a.sendAuxMotors(B)??B;r({type:"control/set-aux-motors",payload:q})},[a]),b=g.useCallback(B=>{if(!a.servoConfig)return;const q=zb(a.servoConfig,B);r({type:"control/set-camera-angle",payload:q}),a.sendServoAngle(q)},[a]),p=g.useCallback((B=0)=>{const q=a.servoConfig;if(!q)return;const Z=typeof B=="number"&&B!==0?B:q.nudgeDegrees||1,I=typeof s.camera.angle=="number"?s.camera.angle:typeof q.homeAngle=="number"?q.homeAngle:0;b(I+Z)},[a.servoConfig,b,s.camera.angle]),v=g.useCallback(()=>{const B=a.servoConfig;if(!B)return;const q=typeof B.homeAngle=="number"?B.homeAngle:typeof B.minAngle=="number"&&typeof B.maxAngle=="number"?(B.minAngle+B.maxAngle)/2:0;b(q)},[a.servoConfig,b]),A=g.useCallback(async B=>{const q=s.macros.find(Z=>Z.id===B)||null;q&&await a.runMacroSteps(q)},[a,s.macros]),T=g.useCallback(()=>{r({type:"control/update-drive",payload:{vector:{x:0,y:0,boost:!1},speeds:{left:0,right:0},source:"system-stop"}}),a.sendDriveDirect({left:0,right:0}),a.sendAuxMotors({main:0,side:0,vacuum:0})},[a]),D=g.useCallback(B=>{a.sendOiCommand(B)},[a]),R=g.useCallback(B=>{a.roverId&&a.emitCommand({type:"sensorStream",data:{sensorStream:{enable:B}}})},[a]),M=g.useCallback((B,q)=>{r({type:"control/register-input-state",payload:{source:B,state:q}})},[]),V=g.useCallback(()=>{r({type:"control/settings/loading"});const B=Am();r({type:"control/settings/loaded",payload:B})},[]),Y=g.useCallback(B=>{const q={...s.settings.data??{},...B??{}},Z=Mb(q);return r(Z?{type:"control/settings/loaded",payload:q}:{type:"control/settings/error",payload:new Error("Failed to save control settings")}),Z},[s.settings.data]),k=g.useMemo(()=>({state:s,dispatch:r,pipeline:a,actions:{setMode:f,setDriveVector:d,setAuxMotors:y,setServoAngle:b,nudgeServo:p,goServoHome:v,runMacro:A,stopAllMotion:T,sendOiCommand:D,setSensorStream:R,registerInputState:M,reloadSettings:V,persistSettings:Y}}),[s,a,f,d,y,b,p,v,A,T,D,R,M,V,Y]);return m.jsx(dp.Provider,{value:k,children:i})}function Yn(){const i=g.useContext(dp);if(!i)throw new Error("useControlSystem must be used within ControlSystemProvider");return i}const vr="keyboard",gr={x:0,y:0,boost:!1},br={main:0,side:0,vacuum:0},wb=110;function jb(i){const a=i.target;if(!a)return!1;const s=a.tagName;return s==="INPUT"||s==="TEXTAREA"||a.isContentEditable||s==="SELECT"}function Ub(i={}){const a=Object.entries(i).map(([s,r])=>{const f=Array.isArray(r)?r:[r],d=new Set(f.map(y=>String(y).toLowerCase()));return[s,d]});return Object.fromEntries(a)}function Hn(i,a){return!i||i.size===0?!1:i.has(a)}function vt(i,a){if(!i||i.size===0)return!1;for(const s of a)if(i.has(s))return!0;return!1}function Bb(i,a){const s=vt(a.driveForward,i),r=vt(a.driveBackward,i),f=vt(a.driveLeft,i),d=vt(a.driveRight,i),y=vt(a.boostModifier,i),b=vt(a.slowModifier,i);let p=0;s&&!r?p=1:r&&!s&&(p=-1);let v=0;f&&!d?v=-1:d&&!f&&(v=1);const A=b?.4:1;return{x:v*A,y:p*A,boost:y&&!b}}function Lb(i,a){if(vt(a.auxAllForward,i))return{main:127,side:127,vacuum:127};const r=vt(a.auxMainForward,i)?127:vt(a.auxMainReverse,i)?-127:0,f=vt(a.auxSideForward,i)?127:vt(a.auxSideReverse,i)?-70:0,d=vt(a.auxVacuumFast,i)?127:vt(a.auxVacuumSlow,i)?50:0;return{main:r,side:f,vacuum:d}}function Hb(i,a){return i&&a&&i.x===a.x&&i.y===a.y&&i.boost===a.boost}function qb(i,a){return i&&a&&i.main===a.main&&i.side===a.side&&i.vacuum===a.vacuum}function Yb(){const{state:i,actions:{setMode:a,setDriveVector:s,setAuxMotors:r,nudgeServo:f,runMacro:d,stopAllMotion:y,registerInputState:b}}=Yn(),p=g.useMemo(()=>Ub(i.keymap),[i.keymap]),v=Math.abs(i.camera?.config?.nudgeDegrees)||1,A=g.useRef(new Set),T=g.useRef(gr),D=g.useRef(br),R=g.useRef(new Set),M=g.useRef(null),V=g.useMemo(()=>{const I=Object.values(p),ae=new Set;return I.forEach(Q=>{Q?.forEach(ue=>ae.add(ue))}),ae},[p]),Y=g.useCallback(()=>{const I=A.current,ae=Bb(I,p),Q=Lb(I,p);Hb(ae,T.current)||(T.current=ae,s(ae,{source:vr})),qb(Q,D.current)||(D.current=Q,r(Q)),b(vr,{keys:Array.from(I),vector:ae,aux:Q})},[p,b,r,s]),k=g.useCallback(()=>{M.current&&(clearTimeout(M.current),M.current=null)},[]),B=g.useCallback(()=>{if(M.current)return;const I=()=>{const ae=R.current.has("up")?1:0,Q=R.current.has("down")?1:0,ue=ae-Q;if(ue===0){M.current=null;return}f(ue*v),M.current=setTimeout(I,wb)};M.current=setTimeout(I,0)},[f,v]),q=g.useCallback(()=>{R.current.size===0?k():B()},[B,k]),Z=g.useCallback(()=>{A.current.clear(),R.current.clear(),k(),T.current=gr,D.current=br,y(),b(vr,{keys:[],vector:gr,aux:br})},[b,y,k]);return g.useEffect(()=>{function I(ue){if(jb(ue))return;const ee=ue.key?.toLowerCase();ee&&(V.has(ee)&&ue.preventDefault(),A.current.has(ee)||A.current.add(ee),Hn(p.driveMacro,ee)?(a("drive"),d("drive-sequence")):Hn(p.dockMacro,ee)?(a("dock"),d("seek-dock")):Hn(p.cameraUp,ee)?(R.current.add("up"),q()):Hn(p.cameraDown,ee)&&(R.current.add("down"),q()),Y())}function ae(ue){const ee=ue.key?.toLowerCase();if(!ee||!A.current.has(ee)){Hn(p.cameraUp,ee)?(R.current.delete("up"),q()):Hn(p.cameraDown,ee)&&(R.current.delete("down"),q());return}A.current.delete(ee),Hn(p.cameraUp,ee)?(R.current.delete("up"),q()):Hn(p.cameraDown,ee)&&(R.current.delete("down"),q()),Y()}function Q(){Z()}return window.addEventListener("keydown",I),window.addEventListener("keyup",ae),window.addEventListener("blur",Q),()=>{window.removeEventListener("keydown",I),window.removeEventListener("keyup",ae),window.removeEventListener("blur",Q)}},[V,Y,p,Z,d,a,q]),g.useEffect(()=>{Z()},[i.roverId,Z]),g.useEffect(()=>()=>{k()},[k]),null}const _u="gamepad",kb=.2;function xr(i){return Math.abs(i)<kb?0:i}function Tm(i,a,s=127,r=1){if(!i)return 0;const f=typeof i.value=="number"?i.value:i.pressed?1:0;if(f<.05)return 0;const d=a?.pressed?-1:1;return Math.round(f*s*d*r)}function Cm(i,a){return i&&a&&i.x===a.x&&i.y===a.y&&i.boost===a.boost}function Nm(i,a){return i&&a&&i.main===a.main&&i.side===a.side&&i.vacuum===a.vacuum}function Vb(){const{actions:{setMode:i,setDriveVector:a,setAuxMotors:s,nudgeServo:r,runMacro:f,registerInputState:d}}=Yn(),y=g.useRef(null),b=g.useRef({x:0,y:0,boost:!1}),p=g.useRef({main:0,side:0,vacuum:0}),v=g.useRef(new Map),A=g.useRef(0),T=g.useCallback((R,M)=>{const V=v.current.get(R)||!1;return v.current.set(R,M),M&&!V},[]),D=g.useCallback(()=>{if(typeof navigator>"u"||!navigator.getGamepads)return;const R=navigator.getGamepads(),M=R&&Array.from(R).find(Boolean);if(!M){Cm(b.current,{x:0,y:0,boost:!1})||(b.current={x:0,y:0,boost:!1},a({x:0,y:0,boost:!1},{source:_u})),Nm(p.current,{main:0,side:0,vacuum:0})||(p.current={main:0,side:0,vacuum:0},s({main:0,side:0,vacuum:0})),d(_u,{connected:!1});return}const V=on(xr(M.axes?.[0]??0)),Y=on(xr(-(M.axes?.[1]??0))),k={x:V,y:Y,boost:!1};Cm(k,b.current)||(b.current=k,a(k,{source:_u}));const B=Tm(M.buttons?.[7],M.buttons?.[5]),q=Tm(M.buttons?.[6],M.buttons?.[4],127,.55),Z=M.buttons?.[1]?.pressed?127:0;let I={main:B,side:q,vacuum:Z};M.buttons?.[0]?.pressed&&(I={main:127,side:127,vacuum:127}),Nm(I,p.current)||(p.current=I,s(I));const ae=on(xr(-(M.axes?.[3]??0))),Q=performance.now();Math.abs(ae)>.25&&Q-A.current>120&&(A.current=Q,r(ae>0?2:-2)),T(14,M.buttons?.[14]?.pressed)&&(i("drive"),f("drive-sequence")),T(15,M.buttons?.[15]?.pressed)&&(i("dock"),f("seek-dock")),d(_u,{connected:!0,id:M.id,index:M.index,axes:[V,Y,ae],buttons:{a:M.buttons?.[0]?.pressed||!1,b:M.buttons?.[1]?.pressed||!1,lb:M.buttons?.[4]?.pressed||!1,rb:M.buttons?.[5]?.pressed||!1}})},[T,r,d,f,s,a,i]);return g.useEffect(()=>{function R(){D(),y.current=requestAnimationFrame(R)}return y.current=requestAnimationFrame(R),()=>{y.current&&cancelAnimationFrame(y.current)}},[D]),null}function Jr(){const{state:{roverId:i},actions:a}=Yn(),r=Zr(i)?.sensors||{},f=(r.oiMode?.label||"").toLowerCase()==="full",d=!!r.chargingSources?.homeBase,y=!!(r.chargingState?.label&&r.chargingState.label.toLowerCase()!=="not charging"),b=()=>{i&&(a.setMode("drive"),a.runMacro("drive-sequence"))},p=()=>{i&&(a.setMode("dock"),a.runMacro("seek-dock"))};return m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-300",children:[m.jsx("span",{children:"Drive control"}),m.jsx("span",{children:i?`Rover ${i}`:"unassigned"})]}),m.jsxs("div",{className:"mt-1 space-y-1",children:[m.jsx(Rm,{title:"Start Driving",description:"Press to enable driving mode, then start moving. The headlamps should illuminate.",statuses:[{label:f?"Ready!":"Not Ready!",active:f}],tone:"emerald",onClick:b,disabled:!i}),m.jsx(Rm,{title:"Dock and Charge",description:"Line the rover up about a foot from the dock, then trigger an automatic approach.",statuses:[{label:d?"Docked!":"Not Docked!",active:d},{label:y?"Charging!":"Not Charging!",active:y}],tone:"indigo",onClick:p,disabled:!i})]})]})}function Rm({title:i,description:a,statuses:s,tone:r,onClick:f,disabled:d,footnote:y}){const b=r==="indigo"?"bg-indigo-600":"bg-emerald-600";return m.jsxs("button",{type:"button",onClick:f,disabled:d,className:`w-full rounded-lg ${b} px-1 py-1 text-left text-white disabled:opacity-40`,children:[m.jsx("p",{className:"text-base font-semibold",children:i}),m.jsx("p",{className:"text-sm text-white/90",children:a}),m.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:s.map(p=>m.jsx("span",{className:`rounded-full px-1 py-0.5 text-xs font-semibold ${p.active?"bg-lime-300 text-emerald-900":"bg-emerald-900 text-emerald-100"}`,children:p.label},p.label))}),y&&m.jsx("p",{className:"mt-1 text-xs text-emerald-50/80",children:y})]})}const Xb=5e3;function Gb(i){return i.id?i.id:i.timestamp?`${i.timestamp}-${i.message}`:`${i.title||"alert"}-${i.message}`}function Qb(){const{alerts:i}=Ut(),[a,s]=g.useState(()=>Date.now()),r=g.useMemo(()=>i.slice(-5).map(d=>({alert:d,key:Gb(d)})),[i]);g.useEffect(()=>{if(!r.length)return;const d=setInterval(()=>s(Date.now()),200);return()=>clearInterval(d)},[r.length]);const f=r.map(d=>({...d,age:a-(d.alert.receivedAt??d.alert.timestamp??0)})).filter(d=>d.age<=Xb);return f.length?m.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(d=>m.jsx(Zb,{alert:d.alert},d.key))}):null}function Zb({alert:i}){const a=i.color==="error"?"bg-red-500/30 text-red-100":i.color==="warn"?"bg-amber-500/30 text-amber-100":"bg-emerald-500/30 text-emerald-100";return m.jsxs("div",{className:`pointer-events-auto rounded-sm px-1 py-1 text-[0.75rem] shadow-lg shadow-black/60 ${a}`,children:[m.jsx("p",{className:"text-[0.65rem] text-slate-300",children:i.title||"Alert"}),m.jsx("p",{className:"text-sm text-white",children:i.message})]})}const Kb=[{key:"open",label:"Open"},{key:"turns",label:"Turns"},{key:"admin",label:"Admin"},{key:"lockdown",label:"Lockdown"}];function $r(){const{session:i,lockRover:a,setMode:s,requestControl:r}=Ut(),f=g.useMemo(()=>i?.roster??[],[i?.roster]),[d,y]=g.useState({}),b=i?.role==="admin"||i?.role==="lockdown"||i?.role==="lockdown-admin",p=i?.mode??"open",v=async(R,M)=>{try{await a(R,M),y(V=>({...V,[R]:M}))}catch(V){alert(V.message)}},A=async R=>{const M=R.target.value;try{await s(M)}catch(V){alert(V.message)}},T=async R=>{try{await r(R,{force:!0})}catch(M){alert(M.message)}},D=g.useMemo(()=>{const R={};return f.forEach(M=>{R[M.id]=d[M.id]??M.locked}),R},[f,d]);return b?m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsxs("div",{className:"flex items-center justify-between gap-1 text-sm",children:[m.jsx("span",{children:"Admin controls"}),m.jsx("select",{value:p,onChange:A,className:"rounded-sm bg-black/40 px-1 py-1 text-sm text-slate-100",children:Kb.map(R=>m.jsx("option",{value:R.key,children:R.label},R.key))})]}),m.jsx("div",{className:"mt-1 space-y-1 text-sm",children:f.map(R=>m.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-1 rounded-sm bg-black/30 px-1 py-1",children:[m.jsxs("div",{children:[m.jsx("p",{className:"text-slate-100",children:R.name}),m.jsx("p",{className:"text-xs text-slate-400",children:D[R.id]?"locked":"unlocked"})]}),m.jsxs("div",{className:"flex flex-wrap gap-1 text-xs",children:[m.jsx("button",{type:"button",onClick:()=>v(R.id,!D[R.id]),className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",children:D[R.id]?"Unlock":"Lock"}),m.jsx("button",{type:"button",onClick:()=>T(R.id),className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",children:"Force"})]})]},R.id))})]}):null}function Jb({size:i="default"}){const{state:{roverId:a,mode:s},actions:r}=Yn(),[f,d]=g.useState(null),y=!a||f!==null,b=async()=>{if(a){d("drive");try{r.setMode("drive"),await r.runMacro("drive-sequence")}finally{d(null)}}},p=async()=>{if(a){d("dock");try{r.setMode("dock"),await r.runMacro("seek-dock")}finally{d(null)}}},v=i==="compact"?"text-xs px-1 py-0.5":"text-sm px-1.5 py-0.5",A=s==="dock"?"Dock mode":"Drive mode";return m.jsxs("div",{className:"rounded-sm bg-black/30 p-1 text-slate-100",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("span",{className:`rounded-full bg-slate-800 ${v}`,children:A}),m.jsxs("span",{className:"text-[0.65rem] text-slate-400",children:["Rover ",a??"—"]})]}),m.jsxs("div",{className:"mt-1 grid grid-cols-2 gap-1 text-xs",children:[m.jsx("button",{type:"button",onClick:b,disabled:y,className:`rounded-sm bg-emerald-600 px-1 py-1 font-semibold uppercase tracking-wide text-emerald-50 disabled:opacity-40 ${i==="compact"?"text-xs":"text-sm"}`,children:"Drive"}),m.jsx("button",{type:"button",onClick:p,disabled:y,className:`rounded-sm bg-indigo-600 px-1 py-1 font-semibold uppercase tracking-wide text-indigo-50 disabled:opacity-40 ${i==="compact"?"text-xs":"text-sm"}`,children:"Dock"})]})]})}const Au="mobile-joystick",Sr=80,$b=[{id:"main-forward",label:"Main +",values:{main:127},hold:!0,color:"bg-emerald-600"},{id:"main-reverse",label:"Main -",values:{main:-127},hold:!0,color:"bg-emerald-800"},{id:"side-forward",label:"Side +",values:{side:127},hold:!0,color:"bg-cyan-600"},{id:"side-reverse",label:"Side -",values:{side:-70},hold:!0,color:"bg-cyan-800"},{id:"vacuum-fast",label:"Vacuum Max",values:{vacuum:127},hold:!0,color:"bg-amber-500 text-amber-950"},{id:"vacuum-slow",label:"Vacuum Low",values:{vacuum:50},hold:!0,color:"bg-amber-700"},{id:"all-forward",label:"All +",values:{main:127,side:127,vacuum:127},hold:!0,color:"bg-fuchsia-600"},{id:"stop-all",label:"Stop",values:{main:0,side:0,vacuum:0},hold:!1,color:"bg-slate-900"}];function Fb({disabled:i,layout:a,onMove:s,onStop:r}){const f=g.useRef(null),d=g.useRef(null),y=g.useRef({x:0,y:0}),[b,p]=g.useState({active:!1,base:{x:0,y:0},knob:{x:0,y:0}}),v=g.useCallback(()=>{d.current=null,p({active:!1,base:{x:0,y:0},knob:{x:0,y:0}}),r?.()},[r]),A=g.useCallback(M=>{if(i||d.current!==null)return;M.preventDefault();const V=f.current;if(!V)return;const Y=V.getBoundingClientRect(),k=M.clientX-Y.left,B=M.clientY-Y.top;y.current={x:k,y:B},d.current=M.pointerId,V.setPointerCapture?.(M.pointerId),p({active:!0,base:{x:k,y:B},knob:{x:0,y:0}})},[i]),T=g.useCallback(M=>{if(i||d.current!==M.pointerId)return;M.preventDefault();const V=f.current;if(!V)return;const Y=V.getBoundingClientRect(),k=M.clientX-Y.left,B=M.clientY-Y.top,q=k-y.current.x,Z=B-y.current.y,I=Math.min(Math.hypot(q,Z),Sr),ae=Math.atan2(Z,q),Q=Math.cos(ae)*I,ue=Math.sin(ae)*I,ee={x:on(Q/Sr),y:on(-ue/Sr),boost:!1};p(Me=>({...Me,knob:{x:Q,y:ue}})),s?.(ee)},[i,s]),D=g.useCallback(M=>{if(d.current!==M.pointerId)return;M.preventDefault(),f.current?.releasePointerCapture?.(M.pointerId),v()},[v]);g.useEffect(()=>{i&&v()},[i,v]);const R=a==="landscape"?"h-[260px]":"h-[220px]";return m.jsxs("div",{ref:f,role:"presentation",className:`relative w-full ${R} select-none overflow-hidden rounded-lg border border-slate-800 bg-slate-900/70`,style:{touchAction:"none"},onPointerDown:A,onPointerMove:T,onPointerUp:D,onPointerLeave:D,onPointerCancel:D,onContextMenu:M=>M.preventDefault(),children:[!b.active&&m.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-center text-xs text-slate-400",children:[m.jsx("p",{children:"Touch and hold anywhere"}),m.jsx("p",{children:"Joystick will follow your thumb"})]}),b.active&&m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"pointer-events-none absolute h-28 w-28 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-cyan-400/60 bg-cyan-400/10",style:{left:b.base.x,top:b.base.y}}),m.jsx("div",{className:"pointer-events-none absolute h-12 w-12 -translate-x-1/2 -translate-y-1/2 rounded-full bg-cyan-300/80 shadow-lg",style:{left:b.base.x+b.knob.x,top:b.base.y+b.knob.y}})]})]})}function hp({layout:i}){const{state:{roverId:a},actions:{setDriveVector:s,registerInputState:r,stopAllMotion:f}}=Yn(),d=!a,y=g.useCallback((p={})=>{if(d)return;const v={x:on(p.x??0),y:on(p.y??0),boost:!!p.boost};s(v,{source:Au}),r(Au,{vector:v,lastEvent:"move"})},[d,r,s]),b=g.useCallback(()=>{if(d)return;const p={x:0,y:0,boost:!1};s(p,{source:Au}),r(Au,{vector:p,lastEvent:"stop"})},[d,r,s]);return m.jsxs("div",{className:"flex flex-col gap-1 text-slate-100",children:[m.jsx(Jb,{size:"compact"}),m.jsx(Fb,{disabled:d,layout:i,onMove:y,onStop:b}),m.jsx("button",{type:"button",onClick:f,disabled:d,className:"rounded bg-red-600 px-2 py-2 text-xs font-semibold uppercase tracking-wide text-red-100 disabled:opacity-40",children:"Panic Stop"})]})}function mp({orientation:i}){const{state:{roverId:a},actions:{setAuxMotors:s}}=Yn(),r=g.useRef(null),f=!a,d=g.useCallback(p=>{if(!f){if(p.hold===!1){s(p.values),r.current=null;return}r.current=p.id,s(p.values)}},[f,s]),y=g.useCallback(p=>{f||p.hold===!1||r.current===p.id&&(r.current=null,s({main:0,side:0,vacuum:0}))},[f,s]),b=i==="landscape"?"grid-cols-1":"grid-cols-1 sm:grid-cols-2";return m.jsxs("div",{className:"flex flex-col gap-1 text-slate-100",children:[m.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-slate-400",children:"Aux controls"}),m.jsx("div",{className:`grid ${b} gap-1`,children:$b.map(p=>m.jsx("button",{type:"button",disabled:f,onPointerDown:v=>{v.preventDefault(),d(p)},onPointerUp:()=>y(p),onPointerLeave:()=>y(p),onPointerCancel:()=>y(p),onContextMenu:v=>v.preventDefault(),className:`rounded-lg px-2 py-2 text-left text-sm font-semibold uppercase tracking-wide text-white transition ${p.color} disabled:opacity-30`,children:p.label},p.id))})]})}function Wb(){return m.jsx("div",{className:"flex h-full flex-col gap-1",children:m.jsx(mp,{orientation:"landscape"})})}function Ib(){return m.jsx("div",{className:"flex h-full flex-col gap-1",children:m.jsx(hp,{layout:"landscape"})})}function Pb(){return m.jsx("section",{className:"w-full",children:m.jsxs("div",{className:"grid grid-cols-2 gap-1",children:[m.jsx(mp,{orientation:"portrait"}),m.jsx(hp,{layout:"portrait"})]})})}function Fr(){return m.jsxs("div",{className:"min-h-[8rem] rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsx("p",{className:"text-center text-sm text-slate-400",children:"Room camera"}),m.jsx("p",{className:"mt-1 text-center",children:"Feed placeholder. Wire upcoming room cam here."})]})}function Wr(){const{logs:i}=Ut();return m.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-400",children:[m.jsx("span",{children:"Server logs"}),m.jsx("span",{children:i.length})]}),m.jsx("div",{className:"mt-1 h-64 overflow-y-auto rounded-sm bg-black/40 p-1 font-mono text-xs",children:i.length===0?m.jsx("p",{children:"No logs yet."}):i.slice().reverse().map(a=>m.jsxs("div",{className:"mb-1",children:[m.jsx("span",{className:"text-amber-400",children:a.timestamp})," ",m.jsxs("span",{className:"text-lime-400",children:["[",a.level,"]"]})," ",a.label&&m.jsxs("span",{className:"text-teal-400",children:["[",a.label,"]"]})," ",m.jsx("span",{children:a.message})]},a.id))})]})}function qu(){const{login:i,setRole:a}=Ut(),[s,r]=g.useState(""),[f,d]=g.useState(""),[y,b]=g.useState(!1);async function p(v){v.preventDefault(),b(!0);try{await i(s,f),r(""),d("")}catch(A){alert(A.message)}finally{b(!1)}}return m.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsx("p",{className:"text-sm text-slate-400",children:"Admin login"}),m.jsxs("form",{className:"mt-1 flex flex-col gap-1",onSubmit:p,children:[m.jsx("input",{className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",placeholder:"Username",value:s,onChange:v=>r(v.target.value)}),m.jsx("input",{className:"rounded-sm bg-black/50 px-1 py-1 text-slate-100",placeholder:"Password",type:"password",value:f,onChange:v=>d(v.target.value)}),m.jsx("button",{type:"submit",disabled:y,className:"rounded-sm bg-slate-200 px-1 py-1 text-sm font-semibold text-black disabled:opacity-50",children:y?"Logging in…":"Login"})]}),m.jsxs("div",{className:"mt-1 flex gap-1 text-sm",children:[m.jsx("button",{type:"button",onClick:()=>a("user"),className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-slate-200",children:"Driver"}),m.jsx("button",{type:"button",onClick:()=>a("spectator"),className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-slate-200",children:"Spectator"})]})]})}function pp(i=[]){const a=Hu(),[s,r]=g.useState({}),f=Array.isArray(i)?i.filter(Boolean).join("|"):"";return g.useEffect(()=>{if(!f)return;const y=f.split("|");let b=!1;return y.forEach(p=>{a.emit("video:request",{roverId:p},(v={})=>{b||r(A=>({...A,[p]:v}))})}),()=>{b=!0}},[a,f]),g.useMemo(()=>{if(!f)return{};const y=f.split("|"),b={};return y.forEach(p=>{s[p]&&(b[p]=s[p])}),b},[f,s])}const e1={iceServers:[{urls:"stun:stun.l.google.com:19302"},{urls:"turn:your.turn.server:3478",username:"user",credential:"pass"}],bundlePolicy:"max-bundle",rtcpMuxPolicy:"require"};function t1(i){if(typeof btoa=="function")return btoa(i);if(typeof Buffer<"u")return Buffer.from(i).toString("base64");throw new Error("No base64 encoder available")}function n1(i){if(!i)return{};const a=`${i}:${i}`;return{Authorization:`Basic ${t1(a)}`}}class l1{constructor({url:a,token:s,video:r,onStatus:f}){this.url=a,this.token=s,this.video=r,this.pc=null,this.abortController=null,this.onStatus=f}notify(a,s){typeof this.onStatus=="function"&&this.onStatus(a,s)}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 a=new RTCPeerConnection(e1);this.pc=a;const s=new MediaStream;a.ontrack=r=>{r.streams[0]?.getTracks().forEach(f=>s.addTrack(f)),this.video.srcObject=s,r.track?.kind==="video"&&"playoutDelayHint"in r.receiver&&(r.receiver.playoutDelayHint=0)},a.addTransceiver("video",{direction:"recvonly"}),a.addTransceiver("audio",{direction:"recvonly"}),a.onconnectionstatechange=()=>{const r=a.connectionState;this.notify(r)},a.oniceconnectionstatechange=()=>{const r=a.iceConnectionState;(r==="failed"||r==="disconnected")&&this.notify(r)};try{const r=await a.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});await a.setLocalDescription(r);const f=await fetch(this.url,{method:"POST",headers:{"Content-Type":"application/sdp",...n1(this.token)},body:r.sdp,signal:this.abortController.signal});if(!f.ok)throw new Error(`WHEP request failed: ${f.status}`);const d=await f.text();await a.setRemoteDescription({type:"answer",sdp:d}),a.getReceivers().forEach(y=>{"playoutDelayHint"in y&&(y.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(a=>a.track?.stop()),this.pc.getReceivers().forEach(a=>a.track?.stop()),this.pc.close(),this.pc=null),this.video&&(this.video.srcObject=null),this.notify("stopped")}}const a1=2e3,i1=3e3;function yp({sessionInfo:i,label:a,forceMute:s=!1,telemetryFrame:r,batteryConfig:f}){const d=g.useRef(null),y=g.useRef(null),b=g.useRef(null),[p,v]=g.useState("idle"),[A,T]=g.useState(null),[D,R]=g.useState(0),[M,V]=g.useState(!0),Y=r?.sensors,k=Y?.batteryChargeMah??null,B=Y?.wheelOvercurrents||null,q=!!(B&&Object.values(B).some(Q=>!!Q)),Z=g.useCallback(()=>{clearTimeout(y.current),y.current=setTimeout(()=>R(Date.now()),a1)},[]),I=g.useCallback((Q=0)=>{if(s)return;clearTimeout(b.current);const ue=()=>{clearTimeout(b.current),b.current=setTimeout(()=>{s||ee()},i1)},ee=async()=>{const Me=d.current;if(Me)try{Me.muted=!1,await Me.play(),V(!1)}catch{Me.muted=!0,V(!0),ue()}};b.current=setTimeout(ee,Q)},[s]);g.useEffect(()=>()=>{clearTimeout(y.current),clearTimeout(b.current)},[]),g.useEffect(()=>{p==="playing"&&I(0)},[p,I]),g.useEffect(()=>{if(!i?.url||!d.current)return;let Q=!0,ue;const ee=setTimeout(()=>V(!0),0),Me=(Ve,Fe)=>{Q&&(v(Ve),T(Fe||null),["error","failed","disconnected","closed"].includes(Ve)&&Z())};return ue=new l1({url:i.url,token:i.token,video:d.current,onStatus:Me}),ue.start().catch(Ve=>{Q&&(v("error"),T(Ve.message),Z())}),()=>{Q=!1,clearTimeout(ee),ue?.stop()}},[i?.url,i?.token,D,Z]),g.useEffect(()=>{p==="stopped"&&i?.url&&Z()},[p,i?.url,Z]);const ae=i?.url?p==="error"?`Error: ${A||"unknown"}`:A?`${p} (${A})`:p:"waiting";return m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsxs("div",{className:"relative w-full overflow-hidden rounded-sm bg-black aspect-video",children:[m.jsx("video",{ref:d,muted:s||M,playsInline:!0,autoPlay:!0,controls:!1,className:"h-full w-full object-contain"}),m.jsx(s1,{frame:r}),m.jsx(c1,{active:q})]}),m.jsx(u1,{charge:k,config:f,label:a,status:ae})]})}function u1({charge:i,config:a,label:s,status:r}){const f=a?.Full,d=a?.Warn,y=a?.Urgent??null;if(i==null||f==null||d==null)return m.jsxs("div",{className:"rounded-sm bg-[#1e1e1e] px-1 py-1 text-sm text-slate-200",children:[m.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400",children:[m.jsx("span",{children:s}),m.jsx("span",{children:r})]}),m.jsx("p",{className:"mt-1 text-xs text-slate-400",children:"Battery telemetry unavailable"})]});const b=f-d;if(b<=0)return null;const p=(i-d)/b,v=Math.min(1,Math.max(0,p)),A=Math.round(v*100),T=`${A}%`,D=p<=0,R=y!=null&&i<=y,M=D?"bg-red-500 animate-pulse":R?"bg-amber-400":"bg-emerald-500";return m.jsxs("div",{className:"space-y-2 rounded-sm bg-[#1e1e1e] px-1 py-1 text-sm text-slate-200",children:[m.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400",children:[m.jsx("span",{children:s}),m.jsx("span",{children:r})]}),m.jsxs("div",{className:"relative h-4 w-full rounded-full bg-slate-800",children:[m.jsx("div",{className:`h-full rounded-full transition-[width] ${M}`,style:{width:`${A}%`}}),m.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-semibold text-black/80",children:T})]})]})}function s1({frame:i}){const s=i?.sensors?.bumpsAndWheelDrops||{},[r,f]=g.useState(()=>Date.now());g.useEffect(()=>{const p=setInterval(()=>f(Date.now()),150);return()=>clearInterval(p)},[]);const d=i?.receivedAt?r-i.receivedAt<200:!1,y=[{label:"B-L",active:s.bumpLeft},{label:"B-R",active:s.bumpRight}],b=[{label:"Drop L",active:s.wheelDropLeft},{label:"Drop R",active:s.wheelDropRight}];return m.jsxs("div",{className:"pointer-events-none absolute inset-0 flex flex-col justify-between p-1 text-[0.65rem] text-slate-200",children:[m.jsxs("div",{className:"flex items-center justify-between gap-1",children:[m.jsxs("div",{className:"flex items-center gap-1 text-[0.55rem] text-slate-400",children:[m.jsx("span",{className:`h-2 w-2 rounded-full ${d?"bg-emerald-300 shadow-[0_0_4px_rgba(16,185,129,0.8)]":"bg-slate-700"}`}),m.jsx("span",{children:"sensor"})]}),m.jsx("div",{className:"flex gap-1",children:y.map(p=>m.jsx(Om,{label:p.label,active:p.active},p.label))})]}),m.jsx("div",{className:"flex justify-end gap-1",children:b.map(p=>m.jsx(Om,{label:p.label,active:p.active},p.label))})]})}function Om({label:i,active:a}){return m.jsx("span",{className:`rounded-sm px-1 py-0.5 text-[0.55rem] ${a?"bg-emerald-500/30 text-emerald-100":"bg-black/40 text-slate-500"}`,children:i})}function c1({active:i}){return i?m.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-red-900/60",children:m.jsx("div",{className:"text-center text-sm font-semibold text-red-100 animate-pulse",children:"Overcurrent"})}):null}function Ir(){const{session:i}=Ut(),a=i?.assignment?.roverId,s=pp(a?[a]:[]),r=a?s[a]:null,f=Zr(a),y=(a&&i?.roster?i.roster.find(b=>String(b.id)===String(a)):null)?.battery??null;return m.jsx("section",{className:"rounded-sm bg-[#242a32] p-1",children:a?m.jsx("div",{className:"w-full",children:m.jsx(yp,{sessionInfo:r,label:a,muted:!1,telemetryFrame:f,batteryConfig:y})}):m.jsx("p",{className:"text-sm text-slate-400",children:"Assign a rover to view the video feed."})})}const r1=150;function Tu(i){return typeof i!="number"||Number.isNaN(i)?"—":`${i>0?"+":""}${i.toFixed(1)}°`}function o1(){const{state:{roverId:i,camera:a},actions:{setServoAngle:s,nudgeServo:r,goServoHome:f}}=Yn(),d=a?.config,y=!!(i&&a?.enabled&&d),b=typeof d?.minAngle=="number"?d.minAngle:-30,p=typeof d?.maxAngle=="number"?d.maxAngle:30,v=typeof a?.angle=="number"?a.angle:typeof d?.homeAngle=="number"?d.homeAngle:(b+p)/2;if(!y)return null;const[A,T]=g.useState(v),D=g.useRef(null),R=g.useRef(!1);g.useEffect(()=>{R.current||T(v)},[v]),g.useEffect(()=>()=>{D.current&&clearTimeout(D.current)},[]);const M=typeof d?.nudgeDegrees=="number"&&d.nudgeDegrees>0?d.nudgeDegrees:1,V=q=>{D.current&&clearTimeout(D.current),D.current=setTimeout(()=>{s(q)},r1)},Y=q=>{const Z=Number.parseFloat(q.target.value);Number.isNaN(Z)||(R.current=!0,T(Z),V(Z))},k=()=>{R.current=!1,D.current&&clearTimeout(D.current),s(A)},B=q=>{const Z=M*q;r(Z)};return m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsxs("div",{className:"flex items-center justify-between text-sm text-slate-300",children:[m.jsx("span",{children:"Camera Tilt"}),m.jsx("span",{className:"font-mono text-sm text-slate-100",children:Tu(v)})]}),m.jsxs("div",{className:"mt-2",children:[m.jsx("input",{type:"range",className:"w-full accent-emerald-400",min:b,max:p,step:.5,value:A,onChange:Y,onMouseUp:k,onTouchEnd:k,onPointerUp:k}),m.jsxs("div",{className:"mt-1 flex justify-between text-xs text-slate-400",children:[m.jsx("span",{children:Tu(b)}),m.jsx("span",{children:Tu(p)})]})]}),m.jsxs("div",{className:"mt-2 flex gap-1 text-sm",children:[m.jsx("button",{type:"button",className:"flex-1 rounded bg-slate-800 px-1 py-0.5 text-slate-100 hover:bg-slate-700",onClick:()=>B(-1),children:"Tilt Down"}),m.jsx("button",{type:"button",className:"flex-1 rounded bg-slate-700 px-1 py-0.5 text-slate-100 hover:bg-slate-600",onClick:()=>f(),children:"Center"}),m.jsx("button",{type:"button",className:"flex-1 rounded bg-slate-800 px-1 py-0.5 text-slate-100 hover:bg-slate-700",onClick:()=>B(1),children:"Tilt Up"})]}),m.jsxs("p",{className:"mt-1 text-xs text-slate-400",children:["Step: ",Tu(M)," · Pin GPIO ",d?.pin]})]})}const f1=[{key:"start",label:"Start OI"},{key:"safe",label:"Safe"},{key:"full",label:"Full"},{key:"passive",label:"Passive"},{key:"dock",label:"Dock"}];function d1(){const{state:{roverId:i},actions:{sendOiCommand:a,setSensorStream:s}}=Yn(),r=!!i,f=g.useMemo(()=>[{key:"start",label:"Enable stream",enable:!0},{key:"stop",label:"Disable stream",enable:!1}],[]),d=y=>{i&&s(y)};return m.jsxs("div",{className:"space-y-1",children:[m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[m.jsx("p",{className:"text-xs text-slate-400",children:"Manual OI commands"}),m.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:f1.map(y=>m.jsx("button",{type:"button",onClick:()=>a(y.key),disabled:!r,className:"rounded-sm bg-black/40 px-1 py-0.5 text-xs text-slate-200 disabled:opacity-30",children:y.label},y.key))})]}),m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[m.jsx("p",{className:"text-xs text-slate-400",children:"Sensor stream"}),m.jsx("div",{className:"mt-1 flex gap-1",children:f.map(y=>m.jsx("button",{type:"button",onClick:()=>d(y.enable),disabled:!r,className:"flex-1 rounded-sm bg-black/40 px-1 py-1 text-xs text-slate-200 disabled:opacity-30",children:y.label},y.key))}),!r&&m.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"Assign a rover to toggle streams."})]}),m.jsx(qu,{}),m.jsx($r,{})]})}function h1({layout:i}){const a={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."]},s=a[i]||a.desktop;return m.jsxs("section",{className:"rounded-sm bg-[#242a32] p-1 text-base text-slate-100",children:[m.jsx("p",{className:"text-sm text-slate-400",children:"Help"}),m.jsx("ul",{className:"mt-1 space-y-1 text-sm",children:s.map(r=>m.jsx("li",{className:"rounded-sm bg-black/30 px-1 py-1 text-slate-200",children:r},r))})]})}function Cu({active:i,onClick:a,children:s}){return m.jsx("button",{type:"button",onClick:a,className:`flex-1 rounded-sm px-1 py-1 text-xs font-semibold ${i?"bg-slate-100 text-slate-900":"bg-black/30 text-slate-300"}`,children:s})}function m1(){return m.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-sm text-slate-100",children:[m.jsx("p",{className:"text-xs text-slate-400",children:"Room controls"}),m.jsx("p",{className:"text-sm text-slate-200",children:"Coming soon: lighting, docks, and environmental toggles."})]})}function p1({layout:i}){const[a,s]=g.useState("telemetry");return m.jsxs("section",{className:"rounded-sm bg-[#1a1d23] p-1 text-base text-slate-100",children:[m.jsxs("div",{className:"flex gap-1",children:[m.jsx(Cu,{active:a==="telemetry",onClick:()=>s("telemetry"),children:"Rover Controls"}),m.jsx(Cu,{active:a==="room",onClick:()=>s("room"),children:"Room Controls"}),m.jsx(Cu,{active:a==="advanced",onClick:()=>s("advanced"),children:"Settings"}),m.jsx(Cu,{active:a==="help",onClick:()=>s("help"),children:"Help"})]}),m.jsxs("div",{className:"mt-1 space-y-1",children:[a==="telemetry"&&m.jsxs("div",{className:"space-y-1",children:[m.jsx(Jr,{}),m.jsx(o1,{}),m.jsx(Kr,{})]}),a==="room"&&m.jsxs("div",{className:"space-y-1",children:[m.jsx(Fr,{}),m.jsx(m1,{})]}),a==="advanced"&&m.jsx(d1,{}),a==="help"&&m.jsx(h1,{layout:i})]})]})}const y1=new Set(["admin","lockdown","lockdown-admin"]),v1=new Set(["admin","lockdown"]);function g1(i="admin"){return i==="lockdown"?{title:"Lockdown in effect",description:"Only the lockdown admin can remain connected right now. If you have credentials, log in below. Otherwise please stand by until the server re-opens."}:{title:"Admin mode active",description:"The server is temporarily restricted to administrators. Log in below if you are authorized, or wait for admin mode to end."}}function b1(){const{session:i}=Ut(),a=i?.mode,s=i?.role,r=v1.has(a),f=y1.has(s);if(!r||f)return null;const d=g1(a);return m.jsx("div",{className:"pointer-events-auto fixed inset-0 z-50 flex items-center justify-center bg-black/85 px-2 py-2",children:m.jsxs("div",{className:"w-full max-w-md space-y-2 rounded-lg bg-[#141821] p-2 text-slate-100 shadow-2xl",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsx("p",{className:"text-lg font-semibold",children:d.title}),m.jsx("p",{className:"text-sm text-slate-300",children:d.description})]}),m.jsx("div",{className:"rounded-md bg-black/40 p-1",children:m.jsx(qu,{})}),m.jsx("p",{className:"text-xs text-slate-500",children:"Your controls are paused until access is granted. You will automatically regain the interface once the mode changes or after a successful login."})]})})}function x1(){const{session:i}=Ut(),a=g.useMemo(()=>JSON.stringify(i??{},null,2),[i]);return m.jsxs("div",{className:"rounded-sm bg-[#242a32] p-1 text-xs text-slate-100",children:[m.jsx("p",{className:"text-sm text-slate-400",children:"Session snapshot"}),m.jsx("pre",{className:"mt-1 h-64 overflow-y-auto bg-black/40 p-1 text-[0.7rem] text-lime-300",children:a})]})}function S1(){const[i,a]=g.useState(()=>typeof window>"u"||window.innerWidth>=1024?"desktop":window.innerWidth>window.innerHeight?"mobile-landscape":"mobile-portrait");return g.useEffect(()=>{function s(){if(typeof window>"u")return;const{innerWidth:r,innerHeight:f}=window;r>=1024?a("desktop"):r>f?a("mobile-landscape"):a("mobile-portrait")}return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),i}function E1({layout:i}){return m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsxs("section",{className:"grid grid-cols-[minmax(0,1.8fr)_minmax(0,1fr)] gap-1",children:[m.jsx(Ir,{}),m.jsx(p1,{layout:i})]}),m.jsxs("section",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-1",children:[m.jsx(Wr,{}),m.jsx(x1,{})]})]})}function _1(){return m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx(Ir,{}),m.jsx(Pb,{}),m.jsx(Jr,{}),m.jsx(Kr,{}),m.jsx(qu,{}),m.jsx($r,{}),m.jsx(Fr,{}),m.jsx(Wr,{})]})}function A1(){return m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsxs("section",{className:"grid min-h-screen grid-cols-[minmax(0,0.7fr)_minmax(0,2.1fr)_minmax(0,0.7fr)] gap-1",children:[m.jsx(Wb,{}),m.jsx(Ir,{}),m.jsx(Ib,{})]}),m.jsxs("div",{className:"flex flex-col gap-1 pb-2",children:[m.jsx(Fr,{}),m.jsx(Jr,{}),m.jsxs("section",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-1",children:[m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx(qu,{}),m.jsx($r,{})]}),m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsx(Wr,{}),m.jsx(Kr,{})]})]})]})]})}function T1(){const i=S1(),a=i==="desktop"?m.jsx(E1,{layout:i}):i==="mobile-landscape"?m.jsx(A1,{}):m.jsx(_1,{});return m.jsx("div",{className:"min-h-screen bg-black text-slate-50",children:m.jsxs(Db,{children:[m.jsx(Yb,{}),m.jsx(Vb,{}),m.jsx("main",{className:"flex w-full flex-col gap-1 px-1 py-1 text-base",children:a}),m.jsx(Qb,{}),m.jsx(b1,{})]})})}function C1(){const{session:i,setRole:a,subscribeAll:s}=Ut(),[r,f]=g.useState(!1);return g.useEffect(()=>{let d=!1;async function y(){try{i?.role!=="spectator"&&await a("spectator"),await s(),d||f(!0)}catch(b){console.error("Failed to enter spectator mode",b)}}return y(),()=>{d=!0}},[i?.role,a,s]),r}function N1({connected:i,ready:a,rosterCount:s}){return m.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[m.jsx("span",{className:`rounded-full px-3 py-1 font-semibold ${i?"bg-emerald-500/20 text-emerald-200":"bg-red-500/20 text-red-200"}`,children:i?"Connected":"Disconnected"}),m.jsxs("span",{className:`rounded-full px-3 py-1 ${a?"bg-blue-600/40 text-blue-100":"bg-slate-700 text-slate-200"}`,children:["Spectator mode ",a?"active":"pending…"]}),m.jsxs("span",{className:"rounded-full bg-slate-800 px-3 py-1 text-slate-200",children:["Rovers: ",s]})]})}function R1({logs:i}){return m.jsxs("section",{className:"rounded-3xl border border-slate-800 bg-slate-900/70 p-4",children:[m.jsxs("header",{className:"mb-3 flex items-center justify-between",children:[m.jsx("h2",{className:"text-lg font-semibold text-white",children:"Server logs"}),m.jsxs("span",{className:"text-xs uppercase tracking-[0.3em] text-slate-500",children:["latest ",i.length]})]}),m.jsx("div",{className:"h-60 overflow-y-auto rounded-2xl bg-slate-950/40 p-3 text-xs font-mono text-slate-300",children:i.length===0?m.jsx("p",{children:"No log entries yet."}):i.slice().reverse().map(a=>m.jsxs("div",{className:"mb-2",children:[m.jsx("span",{className:"text-slate-500",children:a.timestamp})," ",m.jsxs("span",{className:"text-cyan-300",children:["[",a.level,"]"]})," ",a.label&&m.jsxs("span",{className:"text-pink-300",children:["[",a.label,"]"]})," ",m.jsx("span",{children:a.message})]},a.id))})]})}function O1(i={}){return Object.entries(i).map(([a,s])=>({key:a,value:typeof s=="object"?JSON.stringify(s):s}))}function M1({rover:i,frame:a,videoInfo:s}){const r=O1(a?.sensors);return m.jsxs("article",{className:"space-y-4 rounded-3xl border border-slate-800 bg-slate-900/70 p-5",children:[m.jsxs("header",{className:"flex flex-col gap-1",children:[m.jsx("h3",{className:"text-2xl font-semibold text-white",children:i.name}),m.jsx("p",{className:"text-sm text-slate-400",children:a?.receivedAt?`Updated ${new Date(a.receivedAt).toLocaleTimeString()}`:"Waiting for telemetry…"})]}),m.jsx(yp,{sessionInfo:s,label:i.name,forceMute:!0}),m.jsxs("section",{className:"rounded-2xl border border-slate-800/80 bg-slate-950/50 p-4",children:[m.jsx("p",{className:"text-xs uppercase tracking-[0.3em] text-slate-500",children:"Telemetry"}),r.length===0?m.jsx("p",{className:"mt-3 text-sm text-slate-400",children:"No sensor data yet."}):m.jsx("dl",{className:"mt-3 grid gap-2 text-sm text-slate-200",children:r.map(({key:f,value:d})=>m.jsxs("div",{className:"flex justify-between gap-4",children:[m.jsx("dt",{className:"text-slate-500",children:f}),m.jsx("dd",{className:"text-right font-semibold text-white",children:d})]},f))})]})]})}function z1(){const{connected:i,session:a,logs:s}=Ut(),r=C1(),f=op(),d=a?.roster??[],y=pp(d.map(p=>p.id)),b=g.useMemo(()=>({connected:i,ready:r,rosterCount:d.length}),[i,r,d.length]);return m.jsx("div",{className:"min-h-screen bg-slate-950 text-slate-50",children:m.jsxs("main",{className:"mx-auto flex max-w-7xl flex-col gap-6 px-6 py-10",children:[m.jsxs("header",{className:"space-y-3",children:[m.jsx("h1",{className:"text-4xl font-semibold text-white",children:"Spectator Console"}),m.jsx("p",{className:"text-slate-400",children:"Live rover telemetry & logs. This view is read-only."}),m.jsx(N1,{...b})]}),m.jsx("section",{className:"grid gap-6 lg:grid-cols-3",children:d.length===0?m.jsx("p",{className:"col-span-full text-slate-400",children:"No rovers registered."}):d.map(p=>m.jsx(M1,{rover:p,frame:f[p.id],videoInfo:y[p.id]},p.id))}),m.jsx(R1,{logs:s})]})})}$0.createRoot(document.getElementById("root")).render(m.jsx(g.StrictMode,{children:m.jsx(hb,{children:m.jsx(pb,{children:m.jsx(yb,{children:m.jsx(og,{children:m.jsxs(kv,{children:[m.jsx(_r,{path:"/",element:m.jsx(T1,{})}),m.jsx(_r,{path:"/spectate",element:m.jsx(z1,{})})]})})})})})}));
|