From c2651213354ccbfac1d01da7ccda913fd7efc823 Mon Sep 17 00:00:00 2001 From: legop3 Date: Tue, 13 Jan 2026 01:45:15 -0500 Subject: [PATCH] low quality preview for non-drivers --- server/index.js | 1 + server/install_server.sh | 9 + server/mediamtx/mediamtx.yml | 3 +- server/mediamtx/rover-snapshot.sh | 32 ++++ server/public/assets/index-ClyuL_YR.js | 12 ++ server/public/assets/index-DNGguoJu.js | 12 -- server/public/index.html | 2 +- server/src/services/roverSnapshotService.js | 94 ++++++++++ .../services/roverSnapshotSocketService.js | 168 ++++++++++++++++++ webui/src/components/DriverVideoPanel.jsx | 41 ++++- webui/src/components/VideoTile.jsx | 60 +++++-- webui/src/hooks/useRoverSnapshots.js | 102 +++++++++++ webui/src/mini/MiniSummaryApp.jsx | 35 ++-- webui/src/spectate/SpectatorApp.jsx | 39 ++-- 14 files changed, 551 insertions(+), 59 deletions(-) create mode 100644 server/mediamtx/rover-snapshot.sh create mode 100644 server/public/assets/index-ClyuL_YR.js delete mode 100644 server/public/assets/index-DNGguoJu.js create mode 100644 server/src/services/roverSnapshotService.js create mode 100644 server/src/services/roverSnapshotSocketService.js create mode 100644 webui/src/hooks/useRoverSnapshots.js diff --git a/server/index.js b/server/index.js index e6e39f79..bdb71926 100644 --- a/server/index.js +++ b/server/index.js @@ -21,6 +21,7 @@ require('./src/services/videoSessions'); require('./src/services/videoAuthService'); require('./src/services/videoSocketService'); require('./src/services/roomCameraSocketService'); +require('./src/services/roverSnapshotSocketService'); require('./src/services/embedHttpService'); require('./src/services/logStreamService'); require('./src/services/homeAssistantService'); diff --git a/server/install_server.sh b/server/install_server.sh index 8071581d..4f91e6a5 100755 --- a/server/install_server.sh +++ b/server/install_server.sh @@ -6,6 +6,7 @@ MEDIAMTX_BASE_URL="https://github.com/bluenviron/mediamtx/releases/download/v${M MEDIAMTX_BIN="/usr/local/bin/mediamtx" MEDIAMTX_CONF_DIR="/etc/mediamtx" MEDIAMTX_CONFIG="$MEDIAMTX_CONF_DIR/mediamtx.yml" +MEDIAMTX_SNAPSHOT_SCRIPT="$MEDIAMTX_CONF_DIR/rover-snapshot.sh" MEDIAMTX_SERVICE="/etc/systemd/system/mediamtx.service" MULTIROVER_SERVICE="/etc/systemd/system/multirover.service" @@ -24,6 +25,7 @@ SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) SERVER_DIR="$SCRIPT_DIR" CONFIG_PATH="$SERVER_DIR/config.yaml" MEDIAMTX_TEMPLATE="$SERVER_DIR/mediamtx/mediamtx.yml" +MEDIAMTX_SNAPSHOT_TEMPLATE="$SERVER_DIR/mediamtx/rover-snapshot.sh" echo "[1/6] Installing dependencies..." dnf install -y nodejs npm curl tar >/dev/null @@ -71,6 +73,13 @@ fi echo " Installing mediaMTX config -> $MEDIAMTX_CONFIG" rm -f "$MEDIAMTX_CONFIG" install -m 0644 "$MEDIAMTX_TEMPLATE" "$MEDIAMTX_CONFIG" +if [[ ! -f "$MEDIAMTX_SNAPSHOT_TEMPLATE" ]]; then + echo "mediaMTX snapshot script missing at $MEDIAMTX_SNAPSHOT_TEMPLATE" >&2 + exit 1 +fi +echo " Installing mediaMTX snapshot script -> $MEDIAMTX_SNAPSHOT_SCRIPT" +rm -f "$MEDIAMTX_SNAPSHOT_SCRIPT" +install -m 0755 "$MEDIAMTX_SNAPSHOT_TEMPLATE" "$MEDIAMTX_SNAPSHOT_SCRIPT" chown -R "$TARGET_USER":"$TARGET_USER" "$MEDIAMTX_CONF_DIR" echo "[4/6] Writing systemd units..." diff --git a/server/mediamtx/mediamtx.yml b/server/mediamtx/mediamtx.yml index c82689be..c9b3c542 100644 --- a/server/mediamtx/mediamtx.yml +++ b/server/mediamtx/mediamtx.yml @@ -41,4 +41,5 @@ authHTTPExclude: paths: all: source: publisher - sourceOnDemand: no \ No newline at end of file + sourceOnDemand: no + runOnReady: /etc/mediamtx/rover-snapshot.sh diff --git a/server/mediamtx/rover-snapshot.sh b/server/mediamtx/rover-snapshot.sh new file mode 100644 index 00000000..f923b8ca --- /dev/null +++ b/server/mediamtx/rover-snapshot.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +set -euo pipefail + +STREAM_ID="${MTX_PATH:-}" +if [[ -z "${STREAM_ID}" ]]; then + echo "MTX_PATH is required." >&2 + exit 1 +fi + +if [[ "${STREAM_ID}" == *-audio ]]; then + exit 0 +fi + +OUTPUT_DIR="${ROVER_SNAPSHOT_DIR:-/run/rover-snapshots}" +FPS="${ROVER_SNAPSHOT_FPS:-1}" +WIDTH="${ROVER_SNAPSHOT_WIDTH:-640}" +QUALITY="${ROVER_SNAPSHOT_QUALITY:-8}" + +mkdir -p "${OUTPUT_DIR}" +OUTPUT_PATH="${OUTPUT_DIR}/${STREAM_ID}.jpg" + +INPUT_URL="${ROVER_SNAPSHOT_INPUT_URL:-srt://127.0.0.1:9000?streamid=#!::r=${STREAM_ID},m=play&latency=20&mode=caller&transtype=live&pkt_size=1316}" + +exec /usr/bin/ffmpeg -hide_banner -loglevel warning \ + -fflags nobuffer \ + -i "${INPUT_URL}" \ + -vf "fps=${FPS},scale=${WIDTH}:-1" \ + -q:v "${QUALITY}" \ + -an \ + -f image2 \ + -update 1 \ + "${OUTPUT_PATH}" diff --git a/server/public/assets/index-ClyuL_YR.js b/server/public/assets/index-ClyuL_YR.js new file mode 100644 index 00000000..c60cc14f --- /dev/null +++ b/server/public/assets/index-ClyuL_YR.js @@ -0,0 +1,12 @@ +(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.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 i(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=i(f);fetch(f.href,d)}})();function Dv(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var zc={exports:{}},hs={};var Im;function kv(){if(Im)return hs;Im=1;var l=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function i(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 m in f)m!=="key"&&(d[m]=f[m])}else d=f;return f=d.ref,{$$typeof:l,type:r,key:y,ref:f!==void 0?f:null,props:d}}return hs.Fragment=s,hs.jsx=i,hs.jsxs=i,hs}var Pm;function zv(){return Pm||(Pm=1,zc.exports=kv()),zc.exports}var o=zv(),Bc={exports:{}},he={};var ep;function Bv(){if(ep)return he;ep=1;var l=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),i=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"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),A=Symbol.for("react.activity"),_=Symbol.iterator;function q(N){return N===null||typeof N!="object"?null:(N=_&&N[_]||N["@@iterator"],typeof N=="function"?N:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,S={};function j(N,L,Q){this.props=N,this.context=L,this.refs=S,this.updater=Q||T}j.prototype.isReactComponent={},j.prototype.setState=function(N,L){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,L,"setState")},j.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function M(){}M.prototype=j.prototype;function V(N,L,Q){this.props=N,this.context=L,this.refs=S,this.updater=Q||T}var F=V.prototype=new M;F.constructor=V,C(F,j.prototype),F.isPureReactComponent=!0;var W=Array.isArray;function P(){}var H={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function te(N,L,Q){var G=Q.ref;return{$$typeof:l,type:N,key:L,ref:G!==void 0?G:null,props:Q}}function ue(N,L){return te(N.type,L,N.props)}function ce(N){return typeof N=="object"&&N!==null&&N.$$typeof===l}function le(N){var L={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(Q){return L[Q]})}var $=/\/+/g;function ee(N,L){return typeof N=="object"&&N!==null&&N.key!=null?le(""+N.key):L.toString(36)}function ne(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(P,P):(N.status="pending",N.then(function(L){N.status==="pending"&&(N.status="fulfilled",N.value=L)},function(L){N.status==="pending"&&(N.status="rejected",N.reason=L)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function R(N,L,Q,G,I){var ae=typeof N;(ae==="undefined"||ae==="boolean")&&(N=null);var de=!1;if(N===null)de=!0;else switch(ae){case"bigint":case"string":case"number":de=!0;break;case"object":switch(N.$$typeof){case l:case s:de=!0;break;case b:return de=N._init,R(de(N._payload),L,Q,G,I)}}if(de)return I=I(N),de=G===""?"."+ee(N,0):G,W(I)?(Q="",de!=null&&(Q=de.replace($,"$&/")+"/"),R(I,L,Q,"",function(At){return At})):I!=null&&(ce(I)&&(I=ue(I,Q+(I.key==null||N&&N.key===I.key?"":(""+I.key).replace($,"$&/")+"/")+de)),L.push(I)),1;de=0;var Re=G===""?".":G+":";if(W(N))for(var pe=0;pe>>1,me=R[re];if(0>>1;ref(Q,J))Gf(I,Q)?(R[re]=I,R[G]=J,re=G):(R[re]=Q,R[L]=J,re=L);else if(Gf(I,J))R[re]=I,R[G]=J,re=G;else break e}}return z}function f(R,z){var J=R.sortIndex-z.sortIndex;return J!==0?J:R.id-z.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;l.unstable_now=function(){return d.now()}}else{var y=Date,m=y.now();l.unstable_now=function(){return y.now()-m}}var g=[],v=[],b=1,A=null,_=3,q=!1,T=!1,C=!1,S=!1,j=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function F(R){for(var z=i(v);z!==null;){if(z.callback===null)r(v);else if(z.startTime<=R)r(v),z.sortIndex=z.expirationTime,s(g,z);else break;z=i(v)}}function W(R){if(C=!1,F(R),!T)if(i(g)!==null)T=!0,P||(P=!0,le());else{var z=i(v);z!==null&&ne(W,z.startTime-R)}}var P=!1,H=-1,Z=5,te=-1;function ue(){return S?!0:!(l.unstable_now()-teR&&ue());){var re=A.callback;if(typeof re=="function"){A.callback=null,_=A.priorityLevel;var me=re(A.expirationTime<=R);if(R=l.unstable_now(),typeof me=="function"){A.callback=me,F(R),z=!0;break t}A===i(g)&&r(g),F(R)}else r(g);A=i(g)}if(A!==null)z=!0;else{var N=i(v);N!==null&&ne(W,N.startTime-R),z=!1}}break e}finally{A=null,_=J,q=!1}z=void 0}}finally{z?le():P=!1}}}var le;if(typeof V=="function")le=function(){V(ce)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,ee=$.port2;$.port1.onmessage=ce,le=function(){ee.postMessage(null)}}else le=function(){j(ce,0)};function ne(R,z){H=j(function(){R(l.unstable_now())},z)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(R){R.callback=null},l.unstable_forceFrameRate=function(R){0>R||125re?(R.sortIndex=J,s(v,R),i(g)===null&&R===i(v)&&(C?(M(H),H=-1):C=!0,ne(W,J-re))):(R.sortIndex=me,s(g,R),T||q||(T=!0,P||(P=!0,le()))),R},l.unstable_shouldYield=ue,l.unstable_wrapCallback=function(R){var z=_;return function(){var J=_;_=z;try{return R.apply(this,arguments)}finally{_=J}}}})(Hc)),Hc}var ap;function Uv(){return ap||(ap=1,Uc.exports=Lv()),Uc.exports}var Vc={exports:{}},ot={};var lp;function Hv(){if(lp)return ot;lp=1;var l=xo();function s(g){var v="https://react.dev/errors/"+g;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(s){console.error(s)}}return l(),Vc.exports=Hv(),Vc.exports}var ip;function Yv(){if(ip)return ms;ip=1;var l=Uv(),s=xo(),i=Vv();function r(e){var t="https://react.dev/errors/"+e;if(1me||(e.current=re[me],re[me]=null,me--)}function Q(e,t){me++,re[me]=e.current,e.current=t}var G=N(null),I=N(null),ae=N(null),de=N(null);function Re(e,t){switch(Q(ae,t),Q(I,e),Q(G,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Am(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Am(t),e=Sm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(G),Q(G,e)}function pe(){L(G),L(I),L(ae)}function At(e){e.memoizedState!==null&&Q(de,e);var t=G.current,n=Sm(t,e.type);t!==n&&(Q(I,e),Q(G,n))}function It(e){I.current===e&&(L(G),L(I)),de.current===e&&(L(de),cs._currentValue=J)}var Qt,ua;function Gt(e){if(Qt===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Qt=t&&t[1]||"",ua=-1)":-1u||E[a]!==k[u]){var Y=` +`+E[a].replace(" at new "," at ");return e.displayName&&Y.includes("")&&(Y=Y.replace("",e.displayName)),Y}while(1<=a&&0<=u);break}}}finally{Pt=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Gt(n):""}function ca(e,t){switch(e.tag){case 26:case 27:case 5:return Gt(e.type);case 16:return Gt("Lazy");case 13:return e.child!==t&&t!==null?Gt("Suspense Fallback"):Gt("Suspense");case 19:return Gt("SuspenseList");case 0:case 15:return un(e.type,!1);case 11:return un(e.type.render,!1);case 1:return un(e.type,!0);case 31:return Gt("Activity");default:return""}}function qe(e){try{var t="",n=null;do t+=ca(e,n),n=e,e=e.return;while(e);return t}catch(a){return` +Error generating stack: `+a.message+` +`+a.stack}}var nt=Object.prototype.hasOwnProperty,ct=l.unstable_scheduleCallback,De=l.unstable_cancelCallback,Ke=l.unstable_shouldYield,ze=l.unstable_requestPaint,ft=l.unstable_now,mg=l.unstable_getCurrentPriorityLevel,Io=l.unstable_ImmediatePriority,Po=l.unstable_UserBlockingPriority,Os=l.unstable_NormalPriority,pg=l.unstable_LowPriority,ef=l.unstable_IdlePriority,gg=l.log,yg=l.unstable_setDisableYieldValue,Al=null,St=null;function On(e){if(typeof gg=="function"&&yg(e),St&&typeof St.setStrictMode=="function")try{St.setStrictMode(Al,e)}catch{}}var jt=Math.clz32?Math.clz32:bg,vg=Math.log,xg=Math.LN2;function bg(e){return e>>>=0,e===0?32:31-(vg(e)/xg|0)|0}var Ds=256,ks=262144,zs=4194304;function oa(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 Bs(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var u=0,c=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var x=a&134217727;return x!==0?(a=x&~c,a!==0?u=oa(a):(h&=x,h!==0?u=oa(h):n||(n=x&~e,n!==0&&(u=oa(n))))):(x=a&~c,x!==0?u=oa(x):h!==0?u=oa(h):n||(n=a&~e,n!==0&&(u=oa(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 Sl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ag(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 tf(){var e=zs;return zs<<=1,(zs&62914560)===0&&(zs=4194304),e}function qr(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function jl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Sg(e,t,n,a,u,c){var h=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 x=e.entanglements,E=e.expirationTimes,k=e.hiddenUpdates;for(n=h&~n;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Cg=/[\n"\\]/g;function Ot(e){return e.replace(Cg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Rr(e,t,n,a,u,c,h,x){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+_t(t)):e.value!==""+_t(t)&&(e.value=""+_t(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?Mr(e,h,_t(t)):n!=null?Mr(e,h,_t(n)):a!=null&&e.removeAttribute("value"),u==null&&c!=null&&(e.defaultChecked=!!c),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+_t(x):e.removeAttribute("name")}function pf(e,t,n,a,u,c,h,x){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)){Tr(e);return}n=n!=null?""+_t(n):"",t=t!=null?""+_t(t):n,x||t===e.value||(e.value=t),e.defaultValue=t}a=a??u,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=x?e.checked:!!a,e.defaultChecked=!!a,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),Tr(e)}function Mr(e,t,n){t==="number"&&Hs(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function za(e,t,n,a){if(e=e.options,t){t={};for(var u=0;u"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zr=!1;if(fn)try{var wl={};Object.defineProperty(wl,"passive",{get:function(){zr=!0}}),window.addEventListener("test",wl,wl),window.removeEventListener("test",wl,wl)}catch{zr=!1}var kn=null,Br=null,Ys=null;function Sf(){if(Ys)return Ys;var e,t=Br,n=t.length,a,u="value"in kn?kn.value:kn.textContent,c=u.length;for(e=0;e=Rl),Cf=" ",Tf=!1;function Rf(e,t){switch(e){case"keyup":return ny.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ha=!1;function ly(e,t){switch(e){case"compositionend":return Mf(t);case"keypress":return t.which!==32?null:(Tf=!0,Cf);case"textInput":return e=t.data,e===Cf&&Tf?null:e;default:return null}}function sy(e,t){if(Ha)return e==="compositionend"||!Yr&&Rf(e,t)?(e=Sf(),Ys=Br=kn=null,Ha=!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)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Uf(n)}}function Vf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Vf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Yf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Hs(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=Hs(e.document)}return t}function Xr(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 hy=fn&&"documentMode"in document&&11>=document.documentMode,Va=null,Kr=null,Dl=null,Zr=!1;function Qf(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Zr||Va==null||Va!==Hs(a)||(a=Va,"selectionStart"in a&&Xr(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Dl&&Ol(Dl,a)||(Dl=a,a=ki(Kr,"onSelect"),0>=h,u-=h,en=1<<32-jt(t)+u|n<ye?(Ae=ie,ie=null):Ae=ie.sibling;var Ne=B(O,ie,D[ye],X);if(Ne===null){ie===null&&(ie=Ae);break}e&&ie&&Ne.alternate===null&&t(O,ie),w=c(Ne,w,ye),Ee===null?oe=Ne:Ee.sibling=Ne,Ee=Ne,ie=Ae}if(ye===D.length)return n(O,ie),Se&&hn(O,ye),oe;if(ie===null){for(;yeye?(Ae=ie,ie=null):Ae=ie.sibling;var aa=B(O,ie,Ne.value,X);if(aa===null){ie===null&&(ie=Ae);break}e&&ie&&aa.alternate===null&&t(O,ie),w=c(aa,w,ye),Ee===null?oe=aa:Ee.sibling=aa,Ee=aa,ie=Ae}if(Ne.done)return n(O,ie),Se&&hn(O,ye),oe;if(ie===null){for(;!Ne.done;ye++,Ne=D.next())Ne=K(O,Ne.value,X),Ne!==null&&(w=c(Ne,w,ye),Ee===null?oe=Ne:Ee.sibling=Ne,Ee=Ne);return Se&&hn(O,ye),oe}for(ie=a(ie);!Ne.done;ye++,Ne=D.next())Ne=U(ie,O,ye,Ne.value,X),Ne!==null&&(e&&Ne.alternate!==null&&ie.delete(Ne.key===null?ye:Ne.key),w=c(Ne,w,ye),Ee===null?oe=Ne:Ee.sibling=Ne,Ee=Ne);return e&&ie.forEach(function(Ov){return t(O,Ov)}),Se&&hn(O,ye),oe}function Oe(O,w,D,X){if(typeof D=="object"&&D!==null&&D.type===C&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case q:e:{for(var oe=D.key;w!==null;){if(w.key===oe){if(oe=D.type,oe===C){if(w.tag===7){n(O,w.sibling),X=u(w,D.props.children),X.return=O,O=X;break e}}else if(w.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===Z&&Aa(oe)===w.type){n(O,w.sibling),X=u(w,D.props),Hl(X,D),X.return=O,O=X;break e}n(O,w);break}else t(O,w);w=w.sibling}D.type===C?(X=ga(D.props.children,O.mode,X,D.key),X.return=O,O=X):(X=Is(D.type,D.key,D.props,null,O.mode,X),Hl(X,D),X.return=O,O=X)}return h(O);case T:e:{for(oe=D.key;w!==null;){if(w.key===oe)if(w.tag===4&&w.stateNode.containerInfo===D.containerInfo&&w.stateNode.implementation===D.implementation){n(O,w.sibling),X=u(w,D.children||[]),X.return=O,O=X;break e}else{n(O,w);break}else t(O,w);w=w.sibling}X=eu(D,O.mode,X),X.return=O,O=X}return h(O);case Z:return D=Aa(D),Oe(O,w,D,X)}if(ne(D))return se(O,w,D,X);if(le(D)){if(oe=le(D),typeof oe!="function")throw Error(r(150));return D=oe.call(D),fe(O,w,D,X)}if(typeof D.then=="function")return Oe(O,w,si(D),X);if(D.$$typeof===V)return Oe(O,w,ti(O,D),X);ii(O,D)}return typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint"?(D=""+D,w!==null&&w.tag===6?(n(O,w.sibling),X=u(w,D),X.return=O,O=X):(n(O,w),X=Pr(D,O.mode,X),X.return=O,O=X),h(O)):n(O,w)}return function(O,w,D,X){try{Ul=0;var oe=Oe(O,w,D,X);return Ia=null,oe}catch(ie){if(ie===Wa||ie===ai)throw ie;var Ee=Et(29,ie,null,O.mode);return Ee.lanes=X,Ee.return=O,Ee}finally{}}}var ja=dd(!0),hd=dd(!1),Hn=!1;function du(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function hu(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 Vn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Yn(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(we&2)!==0){var u=a.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),a.pending=t,t=Ws(e),Ff(e,null,n),t}return Fs(e,a,t,n),Ws(e)}function Vl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,af(e,n)}}function mu(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var u=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var h={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?u=c=h:c=c.next=h,n=n.next}while(n!==null);c===null?u=c=t:c=c.next=t}else u=c=t;n={baseState:a.baseState,firstBaseUpdate:u,lastBaseUpdate:c,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var pu=!1;function Yl(){if(pu){var e=Fa;if(e!==null)throw e}}function Ql(e,t,n,a){pu=!1;var u=e.updateQueue;Hn=!1;var c=u.firstBaseUpdate,h=u.lastBaseUpdate,x=u.shared.pending;if(x!==null){u.shared.pending=null;var E=x,k=E.next;E.next=null,h===null?c=k:h.next=k,h=E;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,x=Y.lastBaseUpdate,x!==h&&(x===null?Y.firstBaseUpdate=k:x.next=k,Y.lastBaseUpdate=E))}if(c!==null){var K=u.baseState;h=0,Y=k=E=null,x=c;do{var B=x.lane&-536870913,U=B!==x.lane;if(U?(be&B)===B:(a&B)===B){B!==0&&B===Ja&&(pu=!0),Y!==null&&(Y=Y.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var se=e,fe=x;B=t;var Oe=n;switch(fe.tag){case 1:if(se=fe.payload,typeof se=="function"){K=se.call(Oe,K,B);break e}K=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=fe.payload,B=typeof se=="function"?se.call(Oe,K,B):se,B==null)break e;K=A({},K,B);break e;case 2:Hn=!0}}B=x.callback,B!==null&&(e.flags|=64,U&&(e.flags|=8192),U=u.callbacks,U===null?u.callbacks=[B]:U.push(B))}else U={lane:B,tag:x.tag,payload:x.payload,callback:x.callback,next:null},Y===null?(k=Y=U,E=K):Y=Y.next=U,h|=B;if(x=x.next,x===null){if(x=u.shared.pending,x===null)break;U=x,x=U.next,U.next=null,u.lastBaseUpdate=U,u.shared.pending=null}}while(!0);Y===null&&(E=K),u.baseState=E,u.firstBaseUpdate=k,u.lastBaseUpdate=Y,c===null&&(u.shared.lanes=0),Zn|=h,e.lanes=h,e.memoizedState=K}}function md(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function pd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ec?c:8;var h=R.T,x={};R.T=x,Du(e,!1,t,n);try{var E=u(),k=R.S;if(k!==null&&k(x,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var Y=Sy(E,a);Kl(e,t,Y,Rt(e))}else Kl(e,t,a,Rt(e))}catch(K){Kl(e,t,{then:function(){},status:"rejected",reason:K},Rt())}finally{z.p=c,h!==null&&x.types!==null&&(h.types=x.types),R.T=h}}function Cy(){}function _u(e,t,n,a){if(e.tag!==5)throw Error(r(476));var u=Zd(e).queue;Kd(e,u,t,J,n===null?Cy:function(){return $d(e),n(a)})}function Zd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:J},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:yn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function $d(e){var t=Zd(e);t.next===null&&(t=e.alternate.memoizedState),Kl(e,t.next.queue,{},Rt())}function Ou(){return st(cs)}function Jd(){return Xe().memoizedState}function Fd(){return Xe().memoizedState}function Ty(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Rt();e=Vn(n);var a=Yn(t,e,n);a!==null&&(xt(a,t,n),Vl(a,t,n)),t={cache:uu()},e.payload=t;return}t=t.return}}function Ry(e,t,n){var a=Rt();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},gi(e)?Id(t,n):(n=Wr(e,t,n,a),n!==null&&(xt(n,e,a),Pd(n,t,a)))}function Wd(e,t,n){var a=Rt();Kl(e,t,n,a)}function Kl(e,t,n,a){var u={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(gi(e))Id(t,u);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var h=t.lastRenderedState,x=c(h,n);if(u.hasEagerState=!0,u.eagerState=x,qt(x,h))return Fs(e,t,u,0),ke===null&&Js(),!1}catch{}finally{}if(n=Wr(e,t,u,a),n!==null)return xt(n,e,a),Pd(n,t,a),!0}return!1}function Du(e,t,n,a){if(a={lane:2,revertLane:dc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},gi(e)){if(t)throw Error(r(479))}else t=Wr(e,n,a,2),t!==null&&xt(t,e,2)}function gi(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function Id(e,t){el=ci=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Pd(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,af(e,n)}}var Zl={readContext:st,use:di,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useLayoutEffect:Ye,useInsertionEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useSyncExternalStore:Ye,useId:Ye,useHostTransitionStatus:Ye,useFormState:Ye,useActionState:Ye,useOptimistic:Ye,useMemoCache:Ye,useCacheRefresh:Ye};Zl.useEffectEvent=Ye;var eh={readContext:st,use:di,useCallback:function(e,t){return dt().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:Bd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,mi(4194308,4,Vd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return mi(4194308,4,e,t)},useInsertionEffect:function(e,t){mi(4,2,e,t)},useMemo:function(e,t){var n=dt();t=t===void 0?null:t;var a=e();if(qa){On(!0);try{e()}finally{On(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=dt();if(n!==void 0){var u=n(t);if(qa){On(!0);try{n(t)}finally{On(!1)}}}else u=t;return a.memoizedState=a.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},a.queue=e,e=e.dispatch=Ry.bind(null,ge,e),[a.memoizedState,e]},useRef:function(e){var t=dt();return e={current:e},t.memoizedState=e},useState:function(e){e=wu(e);var t=e.queue,n=Wd.bind(null,ge,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ru,useDeferredValue:function(e,t){var n=dt();return Mu(n,e,t)},useTransition:function(){var e=wu(!1);return e=Kd.bind(null,ge,e.queue,!0,!1),dt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=ge,u=dt();if(Se){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),ke===null)throw Error(r(349));(be&127)!==0||Ad(a,t,n)}u.memoizedState=n;var c={value:n,getSnapshot:t};return u.queue=c,Bd(jd.bind(null,a,c,e),[e]),a.flags|=2048,nl(9,{destroy:void 0},Sd.bind(null,a,c,n,t),null),n},useId:function(){var e=dt(),t=ke.identifierPrefix;if(Se){var n=tn,a=en;n=(a&~(1<<32-jt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=oi++,0<\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof a.is=="string"?h.createElement("select",{is:a.is}):h.createElement("select"),a.multiple?c.multiple=!0:a.size&&(c.size=a.size);break;default:c=typeof a.is=="string"?h.createElement(u,{is:a.is}):h.createElement(u)}}c[at]=t,c[ht]=a;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)c.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=c;e:switch(rt(c,u,a),u){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&xn(t)}}return Le(t),$u(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&xn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=ae.current,Za(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,u=lt,u!==null)switch(u.tag){case 27:case 5:a=u.memoizedProps}e[at]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||xm(e.nodeValue,n)),e||Ln(t,!0)}else e=zi(e).createTextNode(a),e[at]=t,t.stateNode=e}return Le(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Za(t),n!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[at]=t}else ya(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Le(t),e=!1}else n=lu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(wt(t),t):(wt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Le(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Za(t),a!==null&&a.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[at]=t}else ya(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Le(t),u=!1}else u=lu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(wt(t),t):(wt(t),null)}return wt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,u=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(u=a.alternate.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==u&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ai(t,t.updateQueue),Le(t),null);case 4:return pe(),e===null&&gc(t.stateNode.containerInfo),Le(t),null;case 10:return pn(t.type),Le(t),null;case 19:if(L(Ge),a=t.memoizedState,a===null)return Le(t),null;if(u=(t.flags&128)!==0,c=a.rendering,c===null)if(u)Jl(a,!1);else{if(Qe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=ui(e),c!==null){for(t.flags|=128,Jl(a,!1),e=c.updateQueue,t.updateQueue=e,Ai(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Wf(n,e),n=n.sibling;return Q(Ge,Ge.current&1|2),Se&&hn(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&ft()>Ni&&(t.flags|=128,u=!0,Jl(a,!1),t.lanes=4194304)}else{if(!u)if(e=ui(c),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,Ai(t,e),Jl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!c.alternate&&!Se)return Le(t),null}else 2*ft()-a.renderingStartTime>Ni&&n!==536870912&&(t.flags|=128,u=!0,Jl(a,!1),t.lanes=4194304);a.isBackwards?(c.sibling=t.child,t.child=c):(e=a.last,e!==null?e.sibling=c:t.child=c,a.last=c)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=ft(),e.sibling=null,n=Ge.current,Q(Ge,u?n&1|2:n&1),Se&&hn(t,a.treeForkCount),e):(Le(t),null);case 22:case 23:return wt(t),yu(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(Le(t),t.subtreeFlags&6&&(t.flags|=8192)):Le(t),n=t.updateQueue,n!==null&&Ai(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&L(ba),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),pn(Ze),Le(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function ky(e,t){switch(nu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pn(Ze),pe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return It(t),null;case 31:if(t.memoizedState!==null){if(wt(t),t.alternate===null)throw Error(r(340));ya()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(wt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));ya()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(Ge),null;case 4:return pe(),null;case 10:return pn(t.type),null;case 22:case 23:return wt(t),yu(),e!==null&&L(ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return pn(Ze),null;case 25:return null;default:return null}}function qh(e,t){switch(nu(t),t.tag){case 3:pn(Ze),pe();break;case 26:case 27:case 5:It(t);break;case 4:pe();break;case 31:t.memoizedState!==null&&wt(t);break;case 13:wt(t);break;case 19:L(Ge);break;case 10:pn(t.type);break;case 22:case 23:wt(t),yu(),e!==null&&L(ba);break;case 24:pn(Ze)}}function Fl(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var u=a.next;n=u;do{if((n.tag&e)===e){a=void 0;var c=n.create,h=n.inst;a=c(),h.destroy=a}n=n.next}while(n!==u)}}catch(x){Te(t,t.return,x)}}function Xn(e,t,n){try{var a=t.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var c=u.next;a=c;do{if((a.tag&e)===e){var h=a.inst,x=h.destroy;if(x!==void 0){h.destroy=void 0,u=t;var E=n,k=x;try{k()}catch(Y){Te(u,E,Y)}}}a=a.next}while(a!==c)}}catch(Y){Te(t,t.return,Y)}}function Eh(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{pd(t,n)}catch(a){Te(e,e.return,a)}}}function Nh(e,t,n){n.props=Ea(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){Te(e,t,a)}}function Wl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(u){Te(e,t,u)}}function nn(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(u){Te(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){Te(e,t,u)}else n.current=null}function wh(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(u){Te(e,e.return,u)}}function Ju(e,t,n){try{var a=e.stateNode;av(a,e.type,n,t),a[ht]=t}catch(u){Te(e,e.return,u)}}function Ch(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&In(e.type)||e.tag===4}function Fu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ch(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&&In(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 Wu(e,t,n){var a=e.tag;if(a===5||a===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=on));else if(a!==4&&(a===27&&In(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Wu(e,t,n),e=e.sibling;e!==null;)Wu(e,t,n),e=e.sibling}function Si(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&In(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Si(e,t,n),e=e.sibling;e!==null;)Si(e,t,n),e=e.sibling}function Th(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);rt(t,a,n),t[at]=e,t[ht]=n}catch(c){Te(e,e.return,c)}}var bn=!1,Fe=!1,Iu=!1,Rh=typeof WeakSet=="function"?WeakSet:Set,tt=null;function zy(e,t){if(e=e.containerInfo,xc=Qi,e=Yf(e),Xr(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var u=a.anchorOffset,c=a.focusNode;a=a.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var h=0,x=-1,E=-1,k=0,Y=0,K=e,B=null;t:for(;;){for(var U;K!==n||u!==0&&K.nodeType!==3||(x=h+u),K!==c||a!==0&&K.nodeType!==3||(E=h+a),K.nodeType===3&&(h+=K.nodeValue.length),(U=K.firstChild)!==null;)B=K,K=U;for(;;){if(K===e)break t;if(B===n&&++k===u&&(x=h),B===c&&++Y===a&&(E=h),(U=K.nextSibling)!==null)break;K=B,B=K.parentNode}K=U}n=x===-1||E===-1?null:{start:x,end:E}}else n=null}n=n||{start:0,end:0}}else n=null;for(bc={focusedElem:e,selectionRange:n},Qi=!1,tt=t;tt!==null;)if(t=tt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,tt=e;else for(;tt!==null;){switch(t=tt,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 title"))),rt(c,a,n),c[at]=e,et(c),a=c;break e;case"link":var h=zm("link","href",u).get(a+(n.href||""));if(h){for(var x=0;xOe&&(h=Oe,Oe=fe,fe=h);var O=Hf(x,fe),w=Hf(x,Oe);if(O&&w&&(U.rangeCount!==1||U.anchorNode!==O.node||U.anchorOffset!==O.offset||U.focusNode!==w.node||U.focusOffset!==w.offset)){var D=K.createRange();D.setStart(O.node,O.offset),U.removeAllRanges(),fe>Oe?(U.addRange(D),U.extend(w.node,w.offset)):(D.setEnd(w.node,w.offset),U.addRange(D))}}}}for(K=[],U=x;U=U.parentNode;)U.nodeType===1&&K.push({element:U,left:U.scrollLeft,top:U.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;xn?32:n,R.T=null,n=sc,sc=null;var c=Jn,h=En;if(Pe=0,rl=Jn=null,En=0,(we&6)!==0)throw Error(r(331));var x=we;if(we|=4,Vh(c.current),Lh(c,c.current,h,n),we=x,as(0,!1),St&&typeof St.onPostCommitFiberRoot=="function")try{St.onPostCommitFiberRoot(Al,c)}catch{}return!0}finally{z.p=u,R.T=a,sm(e,t)}}function rm(e,t,n){t=kt(n,t),t=Lu(e.stateNode,t,2),e=Yn(e,t,2),e!==null&&(jl(e,2),an(e))}function Te(e,t,n){if(e.tag===3)rm(e,e,n);else for(;t!==null;){if(t.tag===3){rm(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&($n===null||!$n.has(a))){e=kt(n,e),n=uh(2),a=Yn(t,n,2),a!==null&&(ch(n,a,t,e),jl(a,2),an(a));break}}t=t.return}}function cc(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new Uy;var u=new Set;a.set(t,u)}else u=a.get(t),u===void 0&&(u=new Set,a.set(t,u));u.has(n)||(tc=!0,u.add(n),e=Gy.bind(null,e,t,n),t.then(e,e))}function Gy(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ke===e&&(be&n)===n&&(Qe===4||Qe===3&&(be&62914560)===be&&300>ft()-Ei?(we&2)===0&&ul(e,0):nc|=n,il===be&&(il=0)),an(e)}function um(e,t){t===0&&(t=tf()),e=pa(e,t),e!==null&&(jl(e,t),an(e))}function Xy(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),um(e,n)}function Ky(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,u=e.memoizedState;u!==null&&(n=u.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),um(e,n)}function Zy(e,t){return ct(e,t)}var _i=null,ol=null,oc=!1,Oi=!1,fc=!1,Wn=0;function an(e){e!==ol&&e.next===null&&(ol===null?_i=ol=e:ol=ol.next=e),Oi=!0,oc||(oc=!0,Jy())}function as(e,t){if(!fc&&Oi){fc=!0;do for(var n=!1,a=_i;a!==null;){if(e!==0){var u=a.pendingLanes;if(u===0)var c=0;else{var h=a.suspendedLanes,x=a.pingedLanes;c=(1<<31-jt(42|e)+1)-1,c&=u&~(h&~x),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,dm(a,c))}else c=be,c=Bs(a,a===ke?c:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(c&3)===0||Sl(a,c)||(n=!0,dm(a,c));a=a.next}while(n);fc=!1}}function $y(){cm()}function cm(){Oi=oc=!1;var e=0;Wn!==0&&sv()&&(e=Wn);for(var t=ft(),n=null,a=_i;a!==null;){var u=a.next,c=om(a,t);c===0?(a.next=null,n===null?_i=u:n.next=u,u===null&&(ol=n)):(n=a,(e!==0||(c&3)!==0)&&(Oi=!0)),a=u}Pe!==0&&Pe!==5||as(e),Wn!==0&&(Wn=0)}function om(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,u=e.expirationTimes,c=e.pendingLanes&-62914561;0x)break;var Y=E.transferSize,K=E.initiatorType;Y&&bm(K)&&(E=E.responseEnd,h+=Y*(E"u"?null:document;function _m(e,t,n){var a=fl;if(a&&typeof t=="string"&&t){var u=Ot(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof n=="string"&&(u+='[crossorigin="'+n+'"]'),Mm.has(u)||(Mm.add(u),e={rel:e,crossOrigin:n,href:t},a.querySelector(u)===null&&(t=a.createElement("link"),rt(t,"link",e),et(t),a.head.appendChild(t)))}}function mv(e){Nn.D(e),_m("dns-prefetch",e,null)}function pv(e,t){Nn.C(e,t),_m("preconnect",e,t)}function gv(e,t,n){Nn.L(e,t,n);var a=fl;if(a&&e&&t){var u='link[rel="preload"][as="'+Ot(t)+'"]';t==="image"&&n&&n.imageSrcSet?(u+='[imagesrcset="'+Ot(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(u+='[imagesizes="'+Ot(n.imageSizes)+'"]')):u+='[href="'+Ot(e)+'"]';var c=u;switch(t){case"style":c=dl(e);break;case"script":c=hl(e)}Vt.has(c)||(e=A({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Vt.set(c,e),a.querySelector(u)!==null||t==="style"&&a.querySelector(rs(c))||t==="script"&&a.querySelector(us(c))||(t=a.createElement("link"),rt(t,"link",e),et(t),a.head.appendChild(t)))}}function yv(e,t){Nn.m(e,t);var n=fl;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+Ot(a)+'"][href="'+Ot(e)+'"]',c=u;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=hl(e)}if(!Vt.has(c)&&(e=A({rel:"modulepreload",href:e},t),Vt.set(c,e),n.querySelector(u)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(us(c)))return}a=n.createElement("link"),rt(a,"link",e),et(a),n.head.appendChild(a)}}}function vv(e,t,n){Nn.S(e,t,n);var a=fl;if(a&&e){var u=Da(a).hoistableStyles,c=dl(e);t=t||"default";var h=u.get(c);if(!h){var x={loading:0,preload:null};if(h=a.querySelector(rs(c)))x.loading=5;else{e=A({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Vt.get(c))&&wc(e,n);var E=h=a.createElement("link");et(E),rt(E,"link",e),E._p=new Promise(function(k,Y){E.onload=k,E.onerror=Y}),E.addEventListener("load",function(){x.loading|=1}),E.addEventListener("error",function(){x.loading|=2}),x.loading|=4,Li(h,t,a)}h={type:"stylesheet",instance:h,count:1,state:x},u.set(c,h)}}}function xv(e,t){Nn.X(e,t);var n=fl;if(n&&e){var a=Da(n).hoistableScripts,u=hl(e),c=a.get(u);c||(c=n.querySelector(us(u)),c||(e=A({src:e,async:!0},t),(t=Vt.get(u))&&Cc(e,t),c=n.createElement("script"),et(c),rt(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(u,c))}}function bv(e,t){Nn.M(e,t);var n=fl;if(n&&e){var a=Da(n).hoistableScripts,u=hl(e),c=a.get(u);c||(c=n.querySelector(us(u)),c||(e=A({src:e,async:!0,type:"module"},t),(t=Vt.get(u))&&Cc(e,t),c=n.createElement("script"),et(c),rt(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(u,c))}}function Om(e,t,n,a){var u=(u=ae.current)?Bi(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=dl(n.href),n=Da(u).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=dl(n.href);var c=Da(u).hoistableStyles,h=c.get(e);if(h||(u=u.ownerDocument||u,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,h),(c=u.querySelector(rs(e)))&&!c._p&&(h.instance=c,h.state.loading=5),Vt.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},Vt.set(e,n),c||Av(u,e,n,h.state))),t&&a===null)throw Error(r(528,""));return h}if(t&&a!==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=hl(n),n=Da(u).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function dl(e){return'href="'+Ot(e)+'"'}function rs(e){return'link[rel="stylesheet"]['+e+"]"}function Dm(e){return A({},e,{"data-precedence":e.precedence,precedence:null})}function Av(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),rt(t,"link",n),et(t),e.head.appendChild(t))}function hl(e){return'[src="'+Ot(e)+'"]'}function us(e){return"script[async]"+e}function km(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Ot(n.href)+'"]');if(a)return t.instance=a,et(a),a;var u=A({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),et(a),rt(a,"style",u),Li(a,n.precedence,e),t.instance=a;case"stylesheet":u=dl(n.href);var c=e.querySelector(rs(u));if(c)return t.state.loading|=4,t.instance=c,et(c),c;a=Dm(n),(u=Vt.get(u))&&wc(a,u),c=(e.ownerDocument||e).createElement("link"),et(c);var h=c;return h._p=new Promise(function(x,E){h.onload=x,h.onerror=E}),rt(c,"link",a),t.state.loading|=4,Li(c,n.precedence,e),t.instance=c;case"script":return c=hl(n.src),(u=e.querySelector(us(c)))?(t.instance=u,et(u),u):(a=n,(u=Vt.get(c))&&(a=A({},n),Cc(a,u)),e=e.ownerDocument||e,u=e.createElement("script"),et(u),rt(u,"link",a),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&&(a=t.instance,t.state.loading|=4,Li(a,n.precedence,e));return t.instance}function Li(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=a.length?a[a.length-1]:null,c=u,h=0;h title"):null)}function Sv(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 Lm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function jv(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var u=dl(a.href),c=t.querySelector(rs(u));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Hi.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=c,et(c);return}c=t.ownerDocument||t,a=Dm(a),(u=Vt.get(u))&&wc(a,u),c=c.createElement("link"),et(c);var h=c;h._p=new Promise(function(x,E){h.onload=x,h.onerror=E}),rt(c,"link",a),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=Hi.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Tc=0;function qv(e,t){return e.stylesheets&&e.count===0&&Yi(e,e.stylesheets),0Tc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(u)}}:null}function Hi(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Yi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Vi=null;function Yi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Vi=new Map,t.forEach(Ev,e),Vi=null,Hi.call(e))}function Ev(e,t){if(!(t.state.loading&4)){var n=Vi.get(e);if(n)var a=n.get(null);else{n=new Map,Vi.set(e,n);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(s){console.error(s)}}return l(),Lc.exports=Yv(),Lc.exports}var Gv=Qv();var up="popstate";function Xv(l={}){function s(r,f){let{pathname:d,search:y,hash:m}=r.location;return lo("",{pathname:d,search:y,hash:m},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function i(r,f){return typeof f=="string"?f:Ss(f)}return Zv(s,i,null,l)}function Ve(l,s){if(l===!1||l===null||typeof l>"u")throw new Error(s)}function Wt(l,s){if(!l){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function Kv(){return Math.random().toString(36).substring(2,10)}function cp(l,s){return{usr:l.state,key:l.key,idx:s}}function lo(l,s,i=null,r){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof s=="string"?vl(s):s,state:i,key:s&&s.key||r||Kv()}}function Ss({pathname:l="/",search:s="",hash:i=""}){return s&&s!=="?"&&(l+=s.charAt(0)==="?"?s:"?"+s),i&&i!=="#"&&(l+=i.charAt(0)==="#"?i:"#"+i),l}function vl(l){let s={};if(l){let i=l.indexOf("#");i>=0&&(s.hash=l.substring(i),l=l.substring(0,i));let r=l.indexOf("?");r>=0&&(s.search=l.substring(r),l=l.substring(0,r)),l&&(s.pathname=l)}return s}function Zv(l,s,i,r={}){let{window:f=document.defaultView,v5Compat:d=!1}=r,y=f.history,m="POP",g=null,v=b();v==null&&(v=0,y.replaceState({...y.state,idx:v},""));function b(){return(y.state||{idx:null}).idx}function A(){m="POP";let S=b(),j=S==null?null:S-v;v=S,g&&g({action:m,location:C.location,delta:j})}function _(S,j){m="PUSH";let M=lo(C.location,S,j);v=b()+1;let V=cp(M,v),F=C.createHref(M);try{y.pushState(V,"",F)}catch(W){if(W instanceof DOMException&&W.name==="DataCloneError")throw W;f.location.assign(F)}d&&g&&g({action:m,location:C.location,delta:1})}function q(S,j){m="REPLACE";let M=lo(C.location,S,j);v=b();let V=cp(M,v),F=C.createHref(M);y.replaceState(V,"",F),d&&g&&g({action:m,location:C.location,delta:0})}function T(S){return $v(S)}let C={get action(){return m},get location(){return l(f,y)},listen(S){if(g)throw new Error("A history only accepts one active listener");return f.addEventListener(up,A),g=S,()=>{f.removeEventListener(up,A),g=null}},createHref(S){return s(f,S)},createURL:T,encodeLocation(S){let j=T(S);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:_,replace:q,go(S){return y.go(S)}};return C}function $v(l,s=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),Ve(i,"No window.location.(origin|href) available to create URL");let r=typeof l=="string"?l:Ss(l);return r=r.replace(/ $/,"%20"),!s&&r.startsWith("//")&&(r=i+r),new URL(r,i)}function Fp(l,s,i="/"){return Jv(l,s,i,!1)}function Jv(l,s,i,r){let f=typeof s=="string"?vl(s):s,d=Mn(f.pathname||"/",i);if(d==null)return null;let y=Wp(l);Fv(y);let m=null;for(let g=0;m==null&&g{let b={relativePath:v===void 0?y.path||"":v,caseSensitive:y.caseSensitive===!0,childrenIndex:m,route:y};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(r)&&g)return;Ve(b.relativePath.startsWith(r),`Absolute route path "${b.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(r.length)}let A=Tn([r,b.relativePath]),_=i.concat(b);y.children&&y.children.length>0&&(Ve(y.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${A}".`),Wp(y.children,s,_,A,g)),!(y.path==null&&!y.index)&&s.push({path:A,score:ax(A,y.index),routesMeta:_})};return l.forEach((y,m)=>{if(y.path===""||!y.path?.includes("?"))d(y,m);else for(let g of Ip(y.path))d(y,m,!0,g)}),s}function Ip(l){let s=l.split("/");if(s.length===0)return[];let[i,...r]=s,f=i.endsWith("?"),d=i.replace(/\?$/,"");if(r.length===0)return f?[d,""]:[d];let y=Ip(r.join("/")),m=[];return m.push(...y.map(g=>g===""?d:[d,g].join("/"))),f&&m.push(...y),m.map(g=>l.startsWith("/")&&g===""?"/":g)}function Fv(l){l.sort((s,i)=>s.score!==i.score?i.score-s.score:lx(s.routesMeta.map(r=>r.childrenIndex),i.routesMeta.map(r=>r.childrenIndex)))}var Wv=/^:[\w-]+$/,Iv=3,Pv=2,ex=1,tx=10,nx=-2,op=l=>l==="*";function ax(l,s){let i=l.split("/"),r=i.length;return i.some(op)&&(r+=nx),s&&(r+=Pv),i.filter(f=>!op(f)).reduce((f,d)=>f+(Wv.test(d)?Iv:d===""?ex:tx),r)}function lx(l,s){return l.length===s.length&&l.slice(0,-1).every((r,f)=>r===s[f])?l[l.length-1]-s[s.length-1]:0}function sx(l,s,i=!1){let{routesMeta:r}=l,f={},d="/",y=[];for(let m=0;m{if(b==="*"){let T=m[_]||"";y=d.slice(0,d.length-T.length).replace(/(.)\/+$/,"$1")}const q=m[_];return A&&!q?v[b]=void 0:v[b]=(q||"").replace(/%2F/g,"/"),v},{}),pathname:d,pathnameBase:y,pattern:l}}function ix(l,s=!1,i=!0){Wt(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let r=[],f="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(y,m,g)=>(r.push({paramName:m,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(r.push({paramName:"*"}),f+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?f+="\\/*$":l!==""&&l!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,s?void 0:"i"),r]}function rx(l){try{return l.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return Wt(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${s}).`),l}}function Mn(l,s){if(s==="/")return l;if(!l.toLowerCase().startsWith(s.toLowerCase()))return null;let i=s.endsWith("/")?s.length-1:s.length,r=l.charAt(i);return r&&r!=="/"?null:l.slice(i)||"/"}var ux=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cx=l=>ux.test(l);function ox(l,s="/"){let{pathname:i,search:r="",hash:f=""}=typeof l=="string"?vl(l):l,d;if(i)if(cx(i))d=i;else{if(i.includes("//")){let y=i;i=i.replace(/\/\/+/g,"/"),Wt(!1,`Pathnames cannot have embedded double slashes - normalizing ${y} -> ${i}`)}i.startsWith("/")?d=fp(i.substring(1),"/"):d=fp(i,s)}else d=s;return{pathname:d,search:hx(r),hash:mx(f)}}function fp(l,s){let i=s.replace(/\/+$/,"").split("/");return l.split("/").forEach(f=>{f===".."?i.length>1&&i.pop():f!=="."&&i.push(f)}),i.length>1?i.join("/"):"/"}function Yc(l,s,i,r){return`Cannot include a '${l}' character in a manually specified \`to.${s}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function fx(l){return l.filter((s,i)=>i===0||s.route.path&&s.route.path.length>0)}function Pp(l){let s=fx(l);return s.map((i,r)=>r===s.length-1?i.pathname:i.pathnameBase)}function e0(l,s,i,r=!1){let f;typeof l=="string"?f=vl(l):(f={...l},Ve(!f.pathname||!f.pathname.includes("?"),Yc("?","pathname","search",f)),Ve(!f.pathname||!f.pathname.includes("#"),Yc("#","pathname","hash",f)),Ve(!f.search||!f.search.includes("#"),Yc("#","search","hash",f)));let d=l===""||f.pathname==="",y=d?"/":f.pathname,m;if(y==null)m=i;else{let A=s.length-1;if(!r&&y.startsWith("..")){let _=y.split("/");for(;_[0]==="..";)_.shift(),A-=1;f.pathname=_.join("/")}m=A>=0?s[A]:"/"}let g=ox(f,m),v=y&&y!=="/"&&y.endsWith("/"),b=(d||y===".")&&i.endsWith("/");return!g.pathname.endsWith("/")&&(v||b)&&(g.pathname+="/"),g}var Tn=l=>l.join("/").replace(/\/\/+/g,"/"),dx=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),hx=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,mx=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l;function px(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var t0=["POST","PUT","PATCH","DELETE"];new Set(t0);var gx=["GET",...t0];new Set(gx);var xl=p.createContext(null);xl.displayName="DataRouter";var vr=p.createContext(null);vr.displayName="DataRouterState";p.createContext(!1);var n0=p.createContext({isTransitioning:!1});n0.displayName="ViewTransition";var yx=p.createContext(new Map);yx.displayName="Fetchers";var vx=p.createContext(null);vx.displayName="Await";var rn=p.createContext(null);rn.displayName="Navigation";var ws=p.createContext(null);ws.displayName="Location";var _n=p.createContext({outlet:null,matches:[],isDataRoute:!1});_n.displayName="Route";var bo=p.createContext(null);bo.displayName="RouteError";function xx(l,{relative:s}={}){Ve(Cs(),"useHref() may be used only in the context of a component.");let{basename:i,navigator:r}=p.useContext(rn),{hash:f,pathname:d,search:y}=Ts(l,{relative:s}),m=d;return i!=="/"&&(m=d==="/"?i:Tn([i,d])),r.createHref({pathname:m,search:y,hash:f})}function Cs(){return p.useContext(ws)!=null}function Ra(){return Ve(Cs(),"useLocation() may be used only in the context of a component."),p.useContext(ws).location}var a0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function l0(l){p.useContext(rn).static||p.useLayoutEffect(l)}function bx(){let{isDataRoute:l}=p.useContext(_n);return l?Ox():Ax()}function Ax(){Ve(Cs(),"useNavigate() may be used only in the context of a component.");let l=p.useContext(xl),{basename:s,navigator:i}=p.useContext(rn),{matches:r}=p.useContext(_n),{pathname:f}=Ra(),d=JSON.stringify(Pp(r)),y=p.useRef(!1);return l0(()=>{y.current=!0}),p.useCallback((g,v={})=>{if(Wt(y.current,a0),!y.current)return;if(typeof g=="number"){i.go(g);return}let b=e0(g,JSON.parse(d),f,v.relative==="path");l==null&&s!=="/"&&(b.pathname=b.pathname==="/"?s:Tn([s,b.pathname])),(v.replace?i.replace:i.push)(b,v.state,v)},[s,i,d,f,l])}p.createContext(null);function Ts(l,{relative:s}={}){let{matches:i}=p.useContext(_n),{pathname:r}=Ra(),f=JSON.stringify(Pp(i));return p.useMemo(()=>e0(l,JSON.parse(f),r,s==="path"),[l,f,r,s])}function Sx(l,s){return s0(l,s)}function s0(l,s,i,r,f){Ve(Cs(),"useRoutes() may be used only in the context of a component.");let{navigator:d}=p.useContext(rn),{matches:y}=p.useContext(_n),m=y[y.length-1],g=m?m.params:{},v=m?m.pathname:"/",b=m?m.pathnameBase:"/",A=m&&m.route;{let M=A&&A.path||"";i0(v,!A||M.endsWith("*")||M.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${v}" (under ) 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 to .`)}let _=Ra(),q;if(s){let M=typeof s=="string"?vl(s):s;Ve(b==="/"||M.pathname?.startsWith(b),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${b}" but pathname "${M.pathname}" was given in the \`location\` prop.`),q=M}else q=_;let T=q.pathname||"/",C=T;if(b!=="/"){let M=b.replace(/^\//,"").split("/");C="/"+T.replace(/^\//,"").split("/").slice(M.length).join("/")}let S=Fp(l,{pathname:C});Wt(A||S!=null,`No routes matched location "${q.pathname}${q.search}${q.hash}" `),Wt(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${q.pathname}${q.search}${q.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let j=wx(S&&S.map(M=>Object.assign({},M,{params:Object.assign({},g,M.params),pathname:Tn([b,d.encodeLocation?d.encodeLocation(M.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?b:Tn([b,d.encodeLocation?d.encodeLocation(M.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathnameBase])})),y,i,r,f);return s&&j?p.createElement(ws.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...q},navigationType:"POP"}},j):j}function jx(){let l=_x(),s=px(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),i=l instanceof Error?l.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:",l),y=p.createElement(p.Fragment,null,p.createElement("p",null,"💿 Hey developer 👋"),p.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",p.createElement("code",{style:d},"ErrorBoundary")," or"," ",p.createElement("code",{style:d},"errorElement")," prop on your route.")),p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},s),i?p.createElement("pre",{style:f},i):null,y)}var qx=p.createElement(jx,null),Ex=class extends p.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,s){return s.location!==l.location||s.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:s.error,location:s.location,revalidation:l.revalidation||s.revalidation}}componentDidCatch(l,s){this.props.onError?this.props.onError(l,s):console.error("React Router caught the following error during render",l)}render(){return this.state.error!==void 0?p.createElement(_n.Provider,{value:this.props.routeContext},p.createElement(bo.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Nx({routeContext:l,match:s,children:i}){let r=p.useContext(xl);return r&&r.static&&r.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=s.route.id),p.createElement(_n.Provider,{value:l},i)}function wx(l,s=[],i=null,r=null,f=null){if(l==null){if(!i)return null;if(i.errors)l=i.matches;else if(s.length===0&&!i.initialized&&i.matches.length>0)l=i.matches;else return null}let d=l,y=i?.errors;if(y!=null){let b=d.findIndex(A=>A.route.id&&y?.[A.route.id]!==void 0);Ve(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(y).join(",")}`),d=d.slice(0,Math.min(d.length,b+1))}let m=!1,g=-1;if(i)for(let b=0;b=0?d=d.slice(0,g+1):d=[d[0]];break}}}let v=i&&r?(b,A)=>{r(b,{location:i.location,params:i.matches?.[0]?.params??{},errorInfo:A})}:void 0;return d.reduceRight((b,A,_)=>{let q,T=!1,C=null,S=null;i&&(q=y&&A.route.id?y[A.route.id]:void 0,C=A.route.errorElement||qx,m&&(g<0&&_===0?(i0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),T=!0,S=null):g===_&&(T=!0,S=A.route.hydrateFallbackElement||null)));let j=s.concat(d.slice(0,_+1)),M=()=>{let V;return q?V=C:T?V=S:A.route.Component?V=p.createElement(A.route.Component,null):A.route.element?V=A.route.element:V=b,p.createElement(Nx,{match:A,routeContext:{outlet:b,matches:j,isDataRoute:i!=null},children:V})};return i&&(A.route.ErrorBoundary||A.route.errorElement||_===0)?p.createElement(Ex,{location:i.location,revalidation:i.revalidation,component:C,error:q,children:M(),routeContext:{outlet:null,matches:j,isDataRoute:!0},onError:v}):M()},null)}function Ao(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Cx(l){let s=p.useContext(xl);return Ve(s,Ao(l)),s}function Tx(l){let s=p.useContext(vr);return Ve(s,Ao(l)),s}function Rx(l){let s=p.useContext(_n);return Ve(s,Ao(l)),s}function So(l){let s=Rx(l),i=s.matches[s.matches.length-1];return Ve(i.route.id,`${l} can only be used on routes that contain a unique "id"`),i.route.id}function Mx(){return So("useRouteId")}function _x(){let l=p.useContext(bo),s=Tx("useRouteError"),i=So("useRouteError");return l!==void 0?l:s.errors?.[i]}function Ox(){let{router:l}=Cx("useNavigate"),s=So("useNavigate"),i=p.useRef(!1);return l0(()=>{i.current=!0}),p.useCallback(async(f,d={})=>{Wt(i.current,a0),i.current&&(typeof f=="number"?l.navigate(f):await l.navigate(f,{fromRouteId:s,...d}))},[l,s])}var dp={};function i0(l,s,i){!s&&!dp[l]&&(dp[l]=!0,Wt(!1,i))}p.memo(Dx);function Dx({routes:l,future:s,state:i,unstable_onError:r}){return s0(l,void 0,i,r,s)}function lr(l){Ve(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function kx({basename:l="/",children:s=null,location:i,navigationType:r="POP",navigator:f,static:d=!1}){Ve(!Cs(),"You cannot render a inside another . You should never have more than one in your app.");let y=l.replace(/^\/*/,"/"),m=p.useMemo(()=>({basename:y,navigator:f,static:d,future:{}}),[y,f,d]);typeof i=="string"&&(i=vl(i));let{pathname:g="/",search:v="",hash:b="",state:A=null,key:_="default"}=i,q=p.useMemo(()=>{let T=Mn(g,y);return T==null?null:{location:{pathname:T,search:v,hash:b,state:A,key:_},navigationType:r}},[y,g,v,b,A,_,r]);return Wt(q!=null,` is not able to match the URL "${g}${v}${b}" because it does not start with the basename, so the won't render anything.`),q==null?null:p.createElement(rn.Provider,{value:m},p.createElement(ws.Provider,{children:s,value:q}))}function zx({children:l,location:s}){return Sx(so(l),s)}function so(l,s=[]){let i=[];return p.Children.forEach(l,(r,f)=>{if(!p.isValidElement(r))return;let d=[...s,f];if(r.type===p.Fragment){i.push.apply(i,so(r.props.children,d));return}Ve(r.type===lr,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),Ve(!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=so(r.props.children,d)),i.push(y)}),i}var sr="get",ir="application/x-www-form-urlencoded";function xr(l){return l!=null&&typeof l.tagName=="string"}function Bx(l){return xr(l)&&l.tagName.toLowerCase()==="button"}function Lx(l){return xr(l)&&l.tagName.toLowerCase()==="form"}function Ux(l){return xr(l)&&l.tagName.toLowerCase()==="input"}function Hx(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function Vx(l,s){return l.button===0&&(!s||s==="_self")&&!Hx(l)}var Fi=null;function Yx(){if(Fi===null)try{new FormData(document.createElement("form"),0),Fi=!1}catch{Fi=!0}return Fi}var Qx=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Qc(l){return l!=null&&!Qx.has(l)?(Wt(!1,`"${l}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${ir}"`),null):l}function Gx(l,s){let i,r,f,d,y;if(Lx(l)){let m=l.getAttribute("action");r=m?Mn(m,s):null,i=l.getAttribute("method")||sr,f=Qc(l.getAttribute("enctype"))||ir,d=new FormData(l)}else if(Bx(l)||Ux(l)&&(l.type==="submit"||l.type==="image")){let m=l.form;if(m==null)throw new Error('Cannot submit a