diff --git a/dist/hornverifier b/dist/hornverifier index 7e51fbf8..1bc25d4c 100755 Binary files a/dist/hornverifier and b/dist/hornverifier differ diff --git a/dist/roverd b/dist/roverd index 4b69216d..e20d2565 100755 Binary files a/dist/roverd and b/dist/roverd differ diff --git a/dist/servoverifier b/dist/servoverifier index 01e8bea8..9eab33a6 100755 Binary files a/dist/servoverifier and b/dist/servoverifier differ diff --git a/docs/pi-deployment.md b/docs/pi-deployment.md deleted file mode 100644 index f3bd54ed..00000000 --- a/docs/pi-deployment.md +++ /dev/null @@ -1,112 +0,0 @@ -# Pi Deployment Guide - -## Tooling - -Fedora 43: - -```bash -sudo dnf install golang libgpiod -``` - -Cross-compiling roverd for Pi Zero 2 W (ARMv7): - -```bash -cd pi/roverd -mkdir -p ../../dist -make pi-build -``` - -The binary is placed in `dist/roverd` (relative to the repo root). - -### Dummy rover build (for local testing) - -If you need extra “virtual” rovers on your laptop/CI box, build the dummy binary: - -```bash -cd pi/roverd -mkdir -p ../../dist -make dummy -``` - -Run the resulting `dist/roverd-dummy` on any machine; it will connect to the server, stream fake Group 100 sensor data, and log drive commands so you can test multi-rover features without additional hardware. - -## Automated installation (recommended) - -Install the Raspberry Pi camera helpers (Bookworm ships them): - -```bash -sudo apt update -sudo apt install libcamera-apps -``` - -Once the binary (and repo) are on the Pi, run the helper script from the repo root: - -```bash -cd ~/MultiRoombaRover -sudo ./pi/install_roverd.sh -``` - -What the script does: - -- creates the `roverd` service account (dialout/gpio/video groups) if missing and installs `/usr/local/bin/roverd` -- copies `pi/roverd/roverd.sample.yaml` to `/etc/roverd.yaml` if the file is absent (existing configs are left untouched) -- installs/enables the `roverd.service` systemd unit, restarting it automatically when a config already exists -- installs `/usr/local/bin/video-publisher`, drops `video-publisher.service`, and enables it so video is published automatically on boot - -Flags: - -| Flag | Purpose | -|------|---------| -| `-b PATH` | use a different roverd binary (defaults to `dist/roverd`) | -| `-c PATH` | seed `/etc/roverd.yaml` from another template | - -If the script installs the sample config, it will remind you to edit `/etc/roverd.yaml` before manually restarting the service: set `name`, `serverUrl`, serial device, BRC pin, battery thresholds, and optionally override `media.publishUrl`. When left blank, roverd automatically publishes to `srt://:9000?streamid=#!::r=,m=publish…` (the host comes from `serverUrl`). If your reverse proxy adds prefixes (like `/video/`), use its rewrite options so the rover keeps publishing to plain ``. - -Re-run `pi/install_roverd.sh` any time you pull updates—the script overwrites the roverd + video-publisher binaries and drops the latest systemd units so the only configuration you ever touch manually is `/etc/roverd.yaml`. `roverd` rewrites `/var/lib/roverd/video.env` on startup, so no other files need editing. -## Manual installation - -1. Copy the binary and config: - ```bash - sudo useradd -r -s /usr/sbin/nologin roverd || true - sudo install -o roverd -g roverd -m 0755 dist/roverd /usr/local/bin/roverd - sudo install -o roverd -g roverd -m 0640 pi/roverd/roverd.sample.yaml /etc/roverd.yaml - ``` - Adjust `/etc/roverd.yaml` for each rover: `name`, `serverUrl` (e.g. `ws://control-server:8080/rover`), serial port path, battery thresholds, GPIO pin for BRC, and (if needed) the media `publishUrl` override. Otherwise, roverd derives `srt://:9000?streamid=#!::r=,m=publish&latency=20&mode=caller&transtype=live&pkt_size=1316` based on the `serverUrl`; keep proxy-only path prefixes out of this URL so every rover keeps the same simple stream name. - -2. Install the systemd unit: - ```bash - sudo install -m 0644 pi/systemd/roverd.service /etc/systemd/system/roverd.service - sudo systemctl daemon-reload - sudo systemctl enable --now roverd.service - ``` - -`roverd` requires access to `/dev/ttyAMA0` and `/dev/gpiochip*`; keeping it under its own user ensures the rest of the system stays isolated—just make sure the account belongs to the `dialout` and `gpio` groups so it can reach the UART and libgpiod. -The video publisher needs read access to the camera devices (`/dev/media*`, `/dev/video*`), so the install script adds the `roverd` service account to the `video` group; if you created the user manually, make sure it belongs to `video`. -**BRC note:** configure `brc.gpioPin` (and `brc.gpioChip` if you’re not using `gpiochip0`) and ensure the `roverd` user has permission to toggle that line—no root privileges are required anymore. -If you set `media.manage: true` in `/etc/roverd.yaml`, make sure the `roverd` service account can invoke `systemctl ` (the installer wires `video-publisher.service` to run as `roverd`, so no sudo tweaks are required unless you rename it). - -## Video publisher details - -The `video-publisher.service` unit runs `/usr/local/bin/video-publisher`, piping `rpicam-vid`/`libcamera-vid` straight into the stock FFmpeg package: - -```bash -rpicam-vid (or libcamera-vid) --inline --timeout 0 --width=WIDTH --height=HEIGHT \ - --framerate=FPS --bitrate=BITRATE --codec h264 --profile baseline --output - \ - | ffmpeg -hide_banner -loglevel warning -fflags nobuffer \ - -f h264 -i pipe:0 -c:v copy -an -flush_packets 1 -f mpegts $PUBLISH_URL -``` - -`/var/lib/roverd/video.env` carries all tunables (`PUBLISH_URL`, resolution, FPS, bitrate). `roverd` rewrites the file whenever you restart it or hit the “Restart Camera” button so the publisher always inherits the correct rover ID + bitrate knobs. Because we now use the distro FFmpeg build with SRT enabled, the installer is much faster—no custom compile steps. -Use `sudo systemctl status video-publisher` to watch logs; the unit auto-restarts whenever the connection drops or FFmpeg exits with an error. - -## Server + UI - -From the repo root: - -```bash -cd server -npm install -npm run start -``` - -This launches the HTTP server (serving the barebones UI) and the rover WebSocket endpoint at `ws://:8080/rover`. The UI expects `roverd` instances to send `hello` frames so it can populate the rover list. Use the mode buttons to emit Start/Safe/Full/Passive/Dock commands (they send the raw OI opcode bytes), tap the sensor toggle to request Group 100 streaming, and use WASD for drive testing; the UI emits Drive Direct commands ~8 times per second, so the rover sees them immediately. diff --git a/pi/roverd/config.go b/pi/roverd/config.go index 2a2768ce..f9760ea1 100644 --- a/pi/roverd/config.go +++ b/pi/roverd/config.go @@ -179,7 +179,7 @@ func LoadConfig(path string) (*Config, error) { Channels: 1, SineGain: 1.0, SawGain: 0.7, - MaxDuration: Duration{Duration: 1200 * time.Millisecond}, + MaxDuration: Duration{Duration: 10000 * time.Millisecond}, }, NightVision: NightVisionConfig{ Enabled: true, diff --git a/server/public/assets/index-KTCc4kAq.js b/server/public/assets/index-D96m5qZ0.js similarity index 99% rename from server/public/assets/index-KTCc4kAq.js rename to server/public/assets/index-D96m5qZ0.js index 8576049a..1259024a 100644 --- a/server/public/assets/index-KTCc4kAq.js +++ b/server/public/assets/index-D96m5qZ0.js @@ -8,7 +8,7 @@ Error generating stack: `+s.message+` `+s.stack}}var ma=Object.prototype.hasOwnProperty,Mt=a.unstable_scheduleCallback,yt=a.unstable_cancelCallback,Ha=a.unstable_shouldYield,Hl=a.unstable_requestPaint,ot=a.unstable_now,Vl=a.unstable_getCurrentPriorityLevel,ha=a.unstable_ImmediatePriority,Yl=a.unstable_UserBlockingPriority,Va=a.unstable_NormalPriority,eo=a.unstable_LowPriority,ai=a.unstable_IdlePriority,li=a.log,Ft=a.unstable_setDisableYieldValue,Ae=null,Oe=null;function We(e){if(typeof li=="function"&&Ft(e),Oe&&typeof Oe.setStrictMode=="function")try{Oe.setStrictMode(Ae,e)}catch{}}var je=Math.clz32?Math.clz32:to,nt=Math.log,Ge=Math.LN2;function to(e){return e>>>=0,e===0?32:31-(nt(e)/Ge|0)|0}var si=256,ii=262144,ri=4194304;function pa(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 oi(e,t,n){var s=e.pendingLanes;if(s===0)return 0;var c=0,u=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var y=s&134217727;return y!==0?(s=y&~u,s!==0?c=pa(s):(p&=y,p!==0?c=pa(p):n||(n=y&~e,n!==0&&(c=pa(n))))):(y=s&~u,y!==0?c=pa(y):p!==0?c=pa(p):n||(n=s&~e,n!==0&&(c=pa(n)))),c===0?0:t!==0&&t!==c&&(t&u)===0&&(u=c&-c,n=t&-t,u>=n||u===32&&(n&4194048)!==0)?t:c}function $l(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function dx(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 Yf(){var e=ri;return ri<<=1,(ri&62914560)===0&&(ri=4194304),e}function no(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Gl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function mx(e,t,n,s,c,u){var p=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 y=e.entanglements,T=e.expirationTimes,H=e.hiddenUpdates;for(n=p&~n;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var yx=/[\n"\\]/g;function Lt(e){return e.replace(yx,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function oo(e,t,n,s,c,u,p,y){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+zt(t)):e.value!==""+zt(t)&&(e.value=""+zt(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?co(e,p,zt(t)):n!=null?co(e,p,zt(n)):s!=null&&e.removeAttribute("value"),c==null&&u!=null&&(e.defaultChecked=!!u),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.name=""+zt(y):e.removeAttribute("name")}function td(e,t,n,s,c,u,p,y){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||n!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){ro(e);return}n=n!=null?""+zt(n):"",t=t!=null?""+zt(t):n,y||t===e.value||(e.value=t),e.defaultValue=t}s=s??c,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=y?e.checked:!!s,e.defaultChecked=!!s,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),ro(e)}function co(e,t,n){t==="number"&&fi(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Ka(e,t,n,s){if(e=e.options,t){t={};for(var c=0;c"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),po=!1;if(vn)try{var Zl={};Object.defineProperty(Zl,"passive",{get:function(){po=!0}}),window.addEventListener("test",Zl,Zl),window.removeEventListener("test",Zl,Zl)}catch{po=!1}var Yn=null,go=null,mi=null;function od(){if(mi)return mi;var e,t=go,n=t.length,s,c="value"in Yn?Yn.value:Yn.textContent,u=c.length;for(e=0;e=Il),hd=" ",pd=!1;function gd(e,t){switch(e){case"keyup":return Kx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ia=!1;function Fx(e,t){switch(e){case"compositionend":return xd(t);case"keypress":return t.which!==32?null:(pd=!0,hd);case"textInput":return e=t.data,e===hd&&pd?null:e;default:return null}}function Jx(e,t){if(Ia)return e==="compositionend"||!So&&gd(e,t)?(e=od(),mi=go=Yn=null,Ia=!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=s}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=wd(n)}}function Ed(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ed(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=fi(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=fi(e.document)}return t}function No(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 lv=vn&&"documentMode"in document&&11>=document.documentMode,Wa=null,wo=null,ts=null,Co=!1;function Md(e,t,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Co||Wa==null||Wa!==fi(s)||(s=Wa,"selectionStart"in s&&No(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),ts&&es(ts,s)||(ts=s,s=ir(wo,"onSelect"),0>=p,c-=p,ln=1<<32-je(t)+c|n<be?(Ee=de,de=null):Ee=de.sibling;var Re=V(D,de,U[be],I);if(Re===null){de===null&&(de=Ee);break}e&&de&&Re.alternate===null&&t(D,de),_=u(Re,_,be),Te===null?he=Re:Te.sibling=Re,Te=Re,de=Ee}if(be===U.length)return n(D,de),qe&&bn(D,be),he;if(de===null){for(;bebe?(Ee=de,de=null):Ee=de.sibling;var ua=V(D,de,Re.value,I);if(ua===null){de===null&&(de=Ee);break}e&&de&&ua.alternate===null&&t(D,de),_=u(ua,_,be),Te===null?he=ua:Te.sibling=ua,Te=ua,de=Ee}if(Re.done)return n(D,de),qe&&bn(D,be),he;if(de===null){for(;!Re.done;be++,Re=U.next())Re=P(D,Re.value,I),Re!==null&&(_=u(Re,_,be),Te===null?he=Re:Te.sibling=Re,Te=Re);return qe&&bn(D,be),he}for(de=s(de);!Re.done;be++,Re=U.next())Re=G(de,D,be,Re.value,I),Re!==null&&(e&&Re.alternate!==null&&de.delete(Re.key===null?be:Re.key),_=u(Re,_,be),Te===null?he=Re:Te.sibling=Re,Te=Re);return e&&de.forEach(function(Ny){return t(D,Ny)}),qe&&bn(D,be),he}function Ye(D,_,U,I){if(typeof U=="object"&&U!==null&&U.type===N&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case q:e:{for(var he=U.key;_!==null;){if(_.key===he){if(he=U.type,he===N){if(_.tag===7){n(D,_.sibling),I=c(_,U.props.children),I.return=D,D=I;break e}}else if(_.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===X&&Ca(he)===_.type){n(D,_.sibling),I=c(_,U.props),rs(I,U),I.return=D,D=I;break e}n(D,_);break}else t(D,_);_=_.sibling}U.type===N?(I=Sa(U.props.children,D.mode,I,U.key),I.return=D,D=I):(I=ji(U.type,U.key,U.props,null,D.mode,I),rs(I,U),I.return=D,D=I)}return p(D);case C:e:{for(he=U.key;_!==null;){if(_.key===he)if(_.tag===4&&_.stateNode.containerInfo===U.containerInfo&&_.stateNode.implementation===U.implementation){n(D,_.sibling),I=c(_,U.children||[]),I.return=D,D=I;break e}else{n(D,_);break}else t(D,_);_=_.sibling}I=_o(U,D.mode,I),I.return=D,D=I}return p(D);case X:return U=Ca(U),Ye(D,_,U,I)}if(W(U))return fe(D,_,U,I);if(K(U)){if(he=K(U),typeof he!="function")throw Error(r(150));return U=he.call(U),ge(D,_,U,I)}if(typeof U.then=="function")return Ye(D,_,Ti(U),I);if(U.$$typeof===k)return Ye(D,_,Ci(D,U),I);Ri(D,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,_!==null&&_.tag===6?(n(D,_.sibling),I=c(_,U),I.return=D,D=I):(n(D,_),I=ko(U,D.mode,I),I.return=D,D=I),p(D)):n(D,_)}return function(D,_,U,I){try{is=0;var he=Ye(D,_,U,I);return cl=null,he}catch(de){if(de===ol||de===qi)throw de;var Te=Rt(29,de,null,D.mode);return Te.lanes=I,Te.return=D,Te}finally{}}}var qa=Wd(!0),Pd=Wd(!1),Kn=!1;function Xo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qo(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 Zn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Fn(e,t,n){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(_e&2)!==0){var c=s.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),s.pending=t,t=Ai(e),Bd(e,null,n),t}return Si(e,s,t,n),Ai(e)}function os(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,Gf(e,n)}}function Ko(e,t){var n=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var c=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var p={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};u===null?c=u=p:u=u.next=p,n=n.next}while(n!==null);u===null?c=u=t:u=u.next=t}else c=u=t;n={baseState:s.baseState,firstBaseUpdate:c,lastBaseUpdate:u,shared:s.shared,callbacks:s.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Zo=!1;function cs(){if(Zo){var e=rl;if(e!==null)throw e}}function us(e,t,n,s){Zo=!1;var c=e.updateQueue;Kn=!1;var u=c.firstBaseUpdate,p=c.lastBaseUpdate,y=c.shared.pending;if(y!==null){c.shared.pending=null;var T=y,H=T.next;T.next=null,p===null?u=H:p.next=H,p=T;var J=e.alternate;J!==null&&(J=J.updateQueue,y=J.lastBaseUpdate,y!==p&&(y===null?J.firstBaseUpdate=H:y.next=H,J.lastBaseUpdate=T))}if(u!==null){var P=c.baseState;p=0,J=H=T=null,y=u;do{var V=y.lane&-536870913,G=V!==y.lane;if(G?(Ce&V)===V:(s&V)===V){V!==0&&V===il&&(Zo=!0),J!==null&&(J=J.next={lane:0,tag:y.tag,payload:y.payload,callback:null,next:null});e:{var fe=e,ge=y;V=t;var Ye=n;switch(ge.tag){case 1:if(fe=ge.payload,typeof fe=="function"){P=fe.call(Ye,P,V);break e}P=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=ge.payload,V=typeof fe=="function"?fe.call(Ye,P,V):fe,V==null)break e;P=S({},P,V);break e;case 2:Kn=!0}}V=y.callback,V!==null&&(e.flags|=64,G&&(e.flags|=8192),G=c.callbacks,G===null?c.callbacks=[V]:G.push(V))}else G={lane:V,tag:y.tag,payload:y.payload,callback:y.callback,next:null},J===null?(H=J=G,T=P):J=J.next=G,p|=V;if(y=y.next,y===null){if(y=c.shared.pending,y===null)break;G=y,y=G.next,G.next=null,c.lastBaseUpdate=G,c.shared.pending=null}}while(!0);J===null&&(T=P),c.baseState=T,c.firstBaseUpdate=H,c.lastBaseUpdate=J,u===null&&(c.shared.lanes=0),ea|=p,e.lanes=p,e.memoizedState=P}}function em(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function tm(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;eu?u:8;var p=R.T,y={};R.T=y,mc(e,!1,t,n);try{var T=c(),H=R.S;if(H!==null&&H(y,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var J=mv(T,s);ms(e,t,J,Bt(e))}else ms(e,t,s,Bt(e))}catch(P){ms(e,t,{then:function(){},status:"rejected",reason:P},Bt())}finally{F.p=u,p!==null&&y.types!==null&&(p.types=y.types),R.T=p}}function yv(){}function fc(e,t,n,s){if(e.tag!==5)throw Error(r(476));var c=_m(e).queue;km(e,c,t,ae,n===null?yv:function(){return Dm(e),n(s)})}function _m(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nn,lastRenderedState:ae},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Dm(e){var t=_m(e);t.next===null&&(t=e.alternate.memoizedState),ms(e,t.next.queue,{},Bt())}function dc(){return ht(Ts)}function Om(){return et().memoizedState}function Bm(){return et().memoizedState}function bv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Bt();e=Zn(n);var s=Fn(t,e,n);s!==null&&(Et(s,t,n),os(s,t,n)),t={cache:Vo()},e.payload=t;return}t=t.return}}function Sv(e,t,n){var s=Bt();n={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Vi(e)?Lm(t,n):(n=To(e,t,n,s),n!==null&&(Et(n,e,s),Um(n,t,s)))}function zm(e,t,n){var s=Bt();ms(e,t,n,s)}function ms(e,t,n,s){var c={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vi(e))Lm(t,c);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var p=t.lastRenderedState,y=u(p,n);if(c.hasEagerState=!0,c.eagerState=y,Tt(y,p))return Si(e,t,c,0),$e===null&&bi(),!1}catch{}finally{}if(n=To(e,t,c,s),n!==null)return Et(n,e,s),Um(n,t,s),!0}return!1}function mc(e,t,n,s){if(s={lane:2,revertLane:Xc(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Vi(e)){if(t)throw Error(r(479))}else t=To(e,n,s,2),t!==null&&Et(t,e,2)}function Vi(e){var t=e.alternate;return e===ye||t!==null&&t===ye}function Lm(e,t){fl=Di=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Um(e,t,n){if((n&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,Gf(e,n)}}var hs={readContext:ht,use:zi,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useLayoutEffect:Fe,useInsertionEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useSyncExternalStore:Fe,useId:Fe,useHostTransitionStatus:Fe,useFormState:Fe,useActionState:Fe,useOptimistic:Fe,useMemoCache:Fe,useCacheRefresh:Fe};hs.useEffectEvent=Fe;var Hm={readContext:ht,use:zi,useCallback:function(e,t){return bt().memoizedState=[e,t===void 0?null:t],e},useContext:ht,useEffect:jm,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Ui(4194308,4,Em.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ui(4194308,4,e,t)},useInsertionEffect:function(e,t){Ui(4,2,e,t)},useMemo:function(e,t){var n=bt();t=t===void 0?null:t;var s=e();if(Ma){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[s,t],s},useReducer:function(e,t,n){var s=bt();if(n!==void 0){var c=n(t);if(Ma){We(!0);try{n(t)}finally{We(!1)}}}else c=t;return s.memoizedState=s.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},s.queue=e,e=e.dispatch=Sv.bind(null,ye,e),[s.memoizedState,e]},useRef:function(e){var t=bt();return e={current:e},t.memoizedState=e},useState:function(e){e=ic(e);var t=e.queue,n=zm.bind(null,ye,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:cc,useDeferredValue:function(e,t){var n=bt();return uc(n,e,t)},useTransition:function(){var e=ic(!1);return e=km.bind(null,ye,e.queue,!0,!1),bt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var s=ye,c=bt();if(qe){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),$e===null)throw Error(r(349));(Ce&127)!==0||rm(s,t,n)}c.memoizedState=n;var u={value:n,getSnapshot:t};return c.queue=u,jm(cm.bind(null,s,u,e),[e]),s.flags|=2048,ml(9,{destroy:void 0},om.bind(null,s,u,n,t),null),n},useId:function(){var e=bt(),t=$e.identifierPrefix;if(qe){var n=sn,s=ln;n=(s&~(1<<32-je(s)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Oi++,0<\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof s.is=="string"?p.createElement("select",{is:s.is}):p.createElement("select"),s.multiple?u.multiple=!0:s.size&&(u.size=s.size);break;default:u=typeof s.is=="string"?p.createElement(c,{is:s.is}):p.createElement(c)}}u[dt]=t,u[St]=s;e:for(p=t.child;p!==null;){if(p.tag===5||p.tag===6)u.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===t)break e;for(;p.sibling===null;){if(p.return===null||p.return===t)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}t.stateNode=u;e:switch(gt(u,c,s),c){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Cn(t)}}return Qe(t),Ec(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Cn(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(r(166));if(e=ie.current,ll(t)){if(e=t.stateNode,n=t.memoizedProps,s=null,c=mt,c!==null)switch(c.tag){case 27:case 5:s=c.memoizedProps}e[dt]=t,e=!!(e.nodeValue===n||s!==null&&s.suppressHydrationWarning===!0||sp(e.nodeValue,n)),e||Xn(t,!0)}else e=rr(e).createTextNode(s),e[dt]=t,t.stateNode=e}return Qe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(s=ll(t),n!==null){if(e===null){if(!s)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[dt]=t}else Aa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Qe(t),e=!1}else n=zo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(_t(t),t):(_t(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Qe(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=ll(t),s!==null&&s.dehydrated!==null){if(e===null){if(!c)throw Error(r(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));c[dt]=t}else Aa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Qe(t),c=!1}else c=zo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(_t(t),t):(_t(t),null)}return _t(t),(t.flags&128)!==0?(t.lanes=n,t):(n=s!==null,e=e!==null&&e.memoizedState!==null,n&&(s=t.child,c=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(c=s.alternate.memoizedState.cachePool.pool),u=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(u=s.memoizedState.cachePool.pool),u!==c&&(s.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Qi(t,t.updateQueue),Qe(t),null);case 4:return me(),e===null&&Fc(t.stateNode.containerInfo),Qe(t),null;case 10:return An(t.type),Qe(t),null;case 19:if(Y(Pe),s=t.memoizedState,s===null)return Qe(t),null;if(c=(t.flags&128)!==0,u=s.rendering,u===null)if(c)gs(s,!1);else{if(Je!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=_i(e),u!==null){for(t.flags|=128,gs(s,!1),e=u.updateQueue,t.updateQueue=e,Qi(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)zd(n,e),n=n.sibling;return ne(Pe,Pe.current&1|2),qe&&bn(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&ot()>Ii&&(t.flags|=128,c=!0,gs(s,!1),t.lanes=4194304)}else{if(!c)if(e=_i(u),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,Qi(t,e),gs(s,!0),s.tail===null&&s.tailMode==="hidden"&&!u.alternate&&!qe)return Qe(t),null}else 2*ot()-s.renderingStartTime>Ii&&n!==536870912&&(t.flags|=128,c=!0,gs(s,!1),t.lanes=4194304);s.isBackwards?(u.sibling=t.child,t.child=u):(e=s.last,e!==null?e.sibling=u:t.child=u,s.last=u)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=ot(),e.sibling=null,n=Pe.current,ne(Pe,c?n&1|2:n&1),qe&&bn(t,s.treeForkCount),e):(Qe(t),null);case 22:case 23:return _t(t),Jo(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(n&536870912)!==0&&(t.flags&128)===0&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),n=t.updateQueue,n!==null&&Qi(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==n&&(t.flags|=2048),e!==null&&Y(wa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),An(at),Qe(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Cv(e,t){switch(Oo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return An(at),me(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return te(t),null;case 31:if(t.memoizedState!==null){if(_t(t),t.alternate===null)throw Error(r(340));Aa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(_t(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Aa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(Pe),null;case 4:return me(),null;case 10:return An(t.type),null;case 22:case 23:return _t(t),Jo(),e!==null&&Y(wa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return An(at),null;case 25:return null;default:return null}}function uh(e,t){switch(Oo(t),t.tag){case 3:An(at),me();break;case 26:case 27:case 5:te(t);break;case 4:me();break;case 31:t.memoizedState!==null&&_t(t);break;case 13:_t(t);break;case 19:Y(Pe);break;case 10:An(t.type);break;case 22:case 23:_t(t),Jo(),e!==null&&Y(wa);break;case 24:An(at)}}function xs(e,t){try{var n=t.updateQueue,s=n!==null?n.lastEffect:null;if(s!==null){var c=s.next;n=c;do{if((n.tag&e)===e){s=void 0;var u=n.create,p=n.inst;s=u(),p.destroy=s}n=n.next}while(n!==c)}}catch(y){ze(t,t.return,y)}}function Wn(e,t,n){try{var s=t.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var u=c.next;s=u;do{if((s.tag&e)===e){var p=s.inst,y=p.destroy;if(y!==void 0){p.destroy=void 0,c=t;var T=n,H=y;try{H()}catch(J){ze(c,T,J)}}}s=s.next}while(s!==u)}}catch(J){ze(t,t.return,J)}}function fh(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{tm(t,n)}catch(s){ze(e,e.return,s)}}}function dh(e,t,n){n.props=Ta(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(s){ze(e,t,s)}}function vs(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof n=="function"?e.refCleanup=n(s):n.current=s}}catch(c){ze(e,t,c)}}function rn(e,t){var n=e.ref,s=e.refCleanup;if(n!==null)if(typeof s=="function")try{s()}catch(c){ze(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(c){ze(e,t,c)}else n.current=null}function mh(e){var t=e.type,n=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&s.focus();break e;case"img":n.src?s.src=n.src:n.srcSet&&(s.srcset=n.srcSet)}}catch(c){ze(e,e.return,c)}}function qc(e,t,n){try{var s=e.stateNode;Zv(s,e.type,n,t),s[St]=t}catch(c){ze(e,e.return,c)}}function hh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&sa(e.type)||e.tag===4}function Mc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hh(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&&sa(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 Tc(e,t,n){var s=e.tag;if(s===5||s===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=xn));else if(s!==4&&(s===27&&sa(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Tc(e,t,n),e=e.sibling;e!==null;)Tc(e,t,n),e=e.sibling}function Ki(e,t,n){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(s!==4&&(s===27&&sa(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Ki(e,t,n),e=e.sibling;e!==null;)Ki(e,t,n),e=e.sibling}function ph(e){var t=e.stateNode,n=e.memoizedProps;try{for(var s=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);gt(t,s,n),t[dt]=e,t[St]=n}catch(u){ze(e,e.return,u)}}var En=!1,it=!1,Rc=!1,gh=typeof WeakSet=="function"?WeakSet:Set,ft=null;function Ev(e,t){if(e=e.containerInfo,Wc=hr,e=qd(e),No(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var s=n.getSelection&&n.getSelection();if(s&&s.rangeCount!==0){n=s.anchorNode;var c=s.anchorOffset,u=s.focusNode;s=s.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var p=0,y=-1,T=-1,H=0,J=0,P=e,V=null;t:for(;;){for(var G;P!==n||c!==0&&P.nodeType!==3||(y=p+c),P!==u||s!==0&&P.nodeType!==3||(T=p+s),P.nodeType===3&&(p+=P.nodeValue.length),(G=P.firstChild)!==null;)V=P,P=G;for(;;){if(P===e)break t;if(V===n&&++H===c&&(y=p),V===u&&++J===s&&(T=p),(G=P.nextSibling)!==null)break;P=V,V=P.parentNode}P=G}n=y===-1||T===-1?null:{start:y,end:T}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pc={focusedElem:e,selectionRange:n},hr=!1,ft=t;ft!==null;)if(t=ft,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ft=e;else for(;ft!==null;){switch(t=ft,u=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"))),gt(u,s,n),u[dt]=e,ut(u),s=u;break e;case"link":var p=Ap("link","href",c).get(s+(n.href||""));if(p){for(var y=0;yYe&&(p=Ye,Ye=ge,ge=p);var D=Cd(y,ge),_=Cd(y,Ye);if(D&&_&&(G.rangeCount!==1||G.anchorNode!==D.node||G.anchorOffset!==D.offset||G.focusNode!==_.node||G.focusOffset!==_.offset)){var U=P.createRange();U.setStart(D.node,D.offset),G.removeAllRanges(),ge>Ye?(G.addRange(U),G.extend(_.node,_.offset)):(U.setEnd(_.node,_.offset),G.addRange(U))}}}}for(P=[],G=y;G=G.parentNode;)G.nodeType===1&&P.push({element:G,left:G.scrollLeft,top:G.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;yn?32:n,R.T=null,n=Lc,Lc=null;var u=na,p=kn;if(ct=0,vl=na=null,kn=0,(_e&6)!==0)throw Error(r(331));var y=_e;if(_e|=4,Eh(u.current),Nh(u,u.current,p,n),_e=y,Ns(0,!1),Oe&&typeof Oe.onPostCommitFiberRoot=="function")try{Oe.onPostCommitFiberRoot(Ae,u)}catch{}return!0}finally{F.p=c,R.T=s,Xh(e,t)}}function Kh(e,t,n){t=Ht(n,t),t=xc(e.stateNode,t,2),e=Fn(e,t,2),e!==null&&(Gl(e,2),on(e))}function ze(e,t,n){if(e.tag===3)Kh(e,e,n);else for(;t!==null;){if(t.tag===3){Kh(t,e,n);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ta===null||!ta.has(s))){e=Ht(n,e),n=Zm(2),s=Fn(t,n,2),s!==null&&(Fm(n,s,t,e),Gl(s,2),on(s));break}}t=t.return}}function Yc(e,t,n){var s=e.pingCache;if(s===null){s=e.pingCache=new Tv;var c=new Set;s.set(t,c)}else c=s.get(t),c===void 0&&(c=new Set,s.set(t,c));c.has(n)||(Dc=!0,c.add(n),e=Ov.bind(null,e,t,n),t.then(e,e))}function Ov(e,t,n){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,$e===e&&(Ce&n)===n&&(Je===4||Je===3&&(Ce&62914560)===Ce&&300>ot()-Ji?(_e&2)===0&&yl(e,0):Oc|=n,xl===Ce&&(xl=0)),on(e)}function Zh(e,t){t===0&&(t=Yf()),e=ba(e,t),e!==null&&(Gl(e,t),on(e))}function Bv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zh(e,n)}function zv(e,t){var n=0;switch(e.tag){case 31:case 13:var s=e.stateNode,c=e.memoizedState;c!==null&&(n=c.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(t),Zh(e,n)}function Lv(e,t){return Mt(e,t)}var ar=null,Sl=null,$c=!1,lr=!1,Gc=!1,la=0;function on(e){e!==Sl&&e.next===null&&(Sl===null?ar=Sl=e:Sl=Sl.next=e),lr=!0,$c||($c=!0,Hv())}function Ns(e,t){if(!Gc&&lr){Gc=!0;do for(var n=!1,s=ar;s!==null;){if(e!==0){var c=s.pendingLanes;if(c===0)var u=0;else{var p=s.suspendedLanes,y=s.pingedLanes;u=(1<<31-je(42|e)+1)-1,u&=c&~(p&~y),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(n=!0,Wh(s,u))}else u=Ce,u=oi(s,s===$e?u:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(u&3)===0||$l(s,u)||(n=!0,Wh(s,u));s=s.next}while(n);Gc=!1}}function Uv(){Fh()}function Fh(){lr=$c=!1;var e=0;la!==0&&Jv()&&(e=la);for(var t=ot(),n=null,s=ar;s!==null;){var c=s.next,u=Jh(s,t);u===0?(s.next=null,n===null?ar=c:n.next=c,c===null&&(Sl=n)):(n=s,(e!==0||(u&3)!==0)&&(lr=!0)),s=c}ct!==0&&ct!==5||Ns(e),la!==0&&(la=0)}function Jh(e,t){for(var n=e.suspendedLanes,s=e.pingedLanes,c=e.expirationTimes,u=e.pendingLanes&-62914561;0y)break;var J=T.transferSize,P=T.initiatorType;J&&ip(P)&&(T=T.responseEnd,p+=J*(T"u"?null:document;function vp(e,t,n){var s=Al;if(s&&typeof t=="string"&&t){var c=Lt(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof n=="string"&&(c+='[crossorigin="'+n+'"]'),xp.has(c)||(xp.add(c),e={rel:e,crossOrigin:n,href:t},s.querySelector(c)===null&&(t=s.createElement("link"),gt(t,"link",e),ut(t),s.head.appendChild(t)))}}function sy(e){_n.D(e),vp("dns-prefetch",e,null)}function iy(e,t){_n.C(e,t),vp("preconnect",e,t)}function ry(e,t,n){_n.L(e,t,n);var s=Al;if(s&&e&&t){var c='link[rel="preload"][as="'+Lt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(c+='[imagesrcset="'+Lt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(c+='[imagesizes="'+Lt(n.imageSizes)+'"]')):c+='[href="'+Lt(e)+'"]';var u=c;switch(t){case"style":u=jl(e);break;case"script":u=Nl(e)}Qt.has(u)||(e=S({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Qt.set(u,e),s.querySelector(c)!==null||t==="style"&&s.querySelector(qs(u))||t==="script"&&s.querySelector(Ms(u))||(t=s.createElement("link"),gt(t,"link",e),ut(t),s.head.appendChild(t)))}}function oy(e,t){_n.m(e,t);var n=Al;if(n&&e){var s=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Lt(s)+'"][href="'+Lt(e)+'"]',u=c;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Nl(e)}if(!Qt.has(u)&&(e=S({rel:"modulepreload",href:e},t),Qt.set(u,e),n.querySelector(c)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ms(u)))return}s=n.createElement("link"),gt(s,"link",e),ut(s),n.head.appendChild(s)}}}function cy(e,t,n){_n.S(e,t,n);var s=Al;if(s&&e){var c=Xa(s).hoistableStyles,u=jl(e);t=t||"default";var p=c.get(u);if(!p){var y={loading:0,preload:null};if(p=s.querySelector(qs(u)))y.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Qt.get(u))&&iu(e,n);var T=p=s.createElement("link");ut(T),gt(T,"link",e),T._p=new Promise(function(H,J){T.onload=H,T.onerror=J}),T.addEventListener("load",function(){y.loading|=1}),T.addEventListener("error",function(){y.loading|=2}),y.loading|=4,cr(p,t,s)}p={type:"stylesheet",instance:p,count:1,state:y},c.set(u,p)}}}function uy(e,t){_n.X(e,t);var n=Al;if(n&&e){var s=Xa(n).hoistableScripts,c=Nl(e),u=s.get(c);u||(u=n.querySelector(Ms(c)),u||(e=S({src:e,async:!0},t),(t=Qt.get(c))&&ru(e,t),u=n.createElement("script"),ut(u),gt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(c,u))}}function fy(e,t){_n.M(e,t);var n=Al;if(n&&e){var s=Xa(n).hoistableScripts,c=Nl(e),u=s.get(c);u||(u=n.querySelector(Ms(c)),u||(e=S({src:e,async:!0,type:"module"},t),(t=Qt.get(c))&&ru(e,t),u=n.createElement("script"),ut(u),gt(u,"link",e),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(c,u))}}function yp(e,t,n,s){var c=(c=ie.current)?or(c):null;if(!c)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=jl(n.href),n=Xa(c).hoistableStyles,s=n.get(t),s||(s={type:"style",instance:null,count:0,state:null},n.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=jl(n.href);var u=Xa(c).hoistableStyles,p=u.get(e);if(p||(c=c.ownerDocument||c,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,p),(u=c.querySelector(qs(e)))&&!u._p&&(p.instance=u,p.state.loading=5),Qt.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},Qt.set(e,n),u||dy(c,e,n,p.state))),t&&s===null)throw Error(r(528,""));return p}if(t&&s!==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=Nl(n),n=Xa(c).hoistableScripts,s=n.get(t),s||(s={type:"script",instance:null,count:0,state:null},n.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function jl(e){return'href="'+Lt(e)+'"'}function qs(e){return'link[rel="stylesheet"]['+e+"]"}function bp(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function dy(e,t,n,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),gt(t,"link",n),ut(t),e.head.appendChild(t))}function Nl(e){return'[src="'+Lt(e)+'"]'}function Ms(e){return"script[async]"+e}function Sp(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Lt(n.href)+'"]');if(s)return t.instance=s,ut(s),s;var c=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),ut(s),gt(s,"style",c),cr(s,n.precedence,e),t.instance=s;case"stylesheet":c=jl(n.href);var u=e.querySelector(qs(c));if(u)return t.state.loading|=4,t.instance=u,ut(u),u;s=bp(n),(c=Qt.get(c))&&iu(s,c),u=(e.ownerDocument||e).createElement("link"),ut(u);var p=u;return p._p=new Promise(function(y,T){p.onload=y,p.onerror=T}),gt(u,"link",s),t.state.loading|=4,cr(u,n.precedence,e),t.instance=u;case"script":return u=Nl(n.src),(c=e.querySelector(Ms(u)))?(t.instance=c,ut(c),c):(s=n,(c=Qt.get(u))&&(s=S({},n),ru(s,c)),e=e.ownerDocument||e,c=e.createElement("script"),ut(c),gt(c,"link",s),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,cr(s,n.precedence,e));return t.instance}function cr(e,t,n){for(var s=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=s.length?s[s.length-1]:null,u=c,p=0;p title"):null)}function my(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 Np(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function hy(e,t,n,s){if(n.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var c=jl(s.href),u=t.querySelector(qs(c));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=fr.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=u,ut(u);return}u=t.ownerDocument||t,s=bp(s),(c=Qt.get(c))&&iu(s,c),u=u.createElement("link"),ut(u);var p=u;p._p=new Promise(function(y,T){p.onload=y,p.onerror=T}),gt(u,"link",s),n.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=fr.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var ou=0;function py(e,t){return e.stylesheets&&e.count===0&&mr(e,e.stylesheets),0ou?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(c)}}:null}function fr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)mr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var dr=null;function mr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,dr=new Map,t.forEach(gy,e),dr=null,fr.call(e))}function gy(e,t){if(!(t.state.loading&4)){var n=dr.get(e);if(n)var s=n.get(null);else{n=new Map,dr.set(e,n);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(l){console.error(l)}}return a(),xu.exports=_y(),xu.exports}var Oy=Dy();var Zp="popstate";function By(a={}){function l(r,f){let{pathname:d,search:h,hash:x}=r.location;return Xu("",{pathname:d,search:h,hash:x},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function i(r,f){return typeof f=="string"?f:Qs(f)}return Ly(l,i,null,a)}function Ze(a,l){if(a===!1||a===null||typeof a>"u")throw new Error(l)}function nn(a,l){if(!a){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function zy(){return Math.random().toString(36).substring(2,10)}function Fp(a,l){return{usr:a.state,key:a.key,idx:l}}function Xu(a,l,i=null,r){return{pathname:typeof a=="string"?a:a.pathname,search:"",hash:"",...typeof l=="string"?Bl(l):l,state:i,key:l&&l.key||r||zy()}}function Qs({pathname:a="/",search:l="",hash:i=""}){return l&&l!=="?"&&(a+=l.charAt(0)==="?"?l:"?"+l),i&&i!=="#"&&(a+=i.charAt(0)==="#"?i:"#"+i),a}function Bl(a){let l={};if(a){let i=a.indexOf("#");i>=0&&(l.hash=a.substring(i),a=a.substring(0,i));let r=a.indexOf("?");r>=0&&(l.search=a.substring(r),a=a.substring(0,r)),a&&(l.pathname=a)}return l}function Ly(a,l,i,r={}){let{window:f=document.defaultView,v5Compat:d=!1}=r,h=f.history,x="POP",g=null,v=b();v==null&&(v=0,h.replaceState({...h.state,idx:v},""));function b(){return(h.state||{idx:null}).idx}function S(){x="POP";let j=b(),M=j==null?null:j-v;v=j,g&&g({action:x,location:N.location,delta:M})}function w(j,M){x="PUSH";let A=Xu(N.location,j,M);v=b()+1;let k=Fp(A,v),B=N.createHref(A);try{h.pushState(k,"",B)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;f.location.assign(B)}d&&g&&g({action:x,location:N.location,delta:1})}function q(j,M){x="REPLACE";let A=Xu(N.location,j,M);v=b();let k=Fp(A,v),B=N.createHref(A);h.replaceState(k,"",B),d&&g&&g({action:x,location:N.location,delta:0})}function C(j){return Uy(j)}let N={get action(){return x},get location(){return a(f,h)},listen(j){if(g)throw new Error("A history only accepts one active listener");return f.addEventListener(Zp,S),g=j,()=>{f.removeEventListener(Zp,S),g=null}},createHref(j){return l(f,j)},createURL:C,encodeLocation(j){let M=C(j);return{pathname:M.pathname,search:M.search,hash:M.hash}},push:w,replace:q,go(j){return h.go(j)}};return N}function Uy(a,l=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),Ze(i,"No window.location.(origin|href) available to create URL");let r=typeof a=="string"?a:Qs(a);return r=r.replace(/ $/,"%20"),!l&&r.startsWith("//")&&(r=i+r),new URL(r,i)}function H0(a,l,i="/"){return Hy(a,l,i,!1)}function Hy(a,l,i,r){let f=typeof l=="string"?Bl(l):l,d=Un(f.pathname||"/",i);if(d==null)return null;let h=V0(a);Vy(h);let x=null;for(let g=0;x==null&&g{let b={relativePath:v===void 0?h.path||"":v,caseSensitive:h.caseSensitive===!0,childrenIndex:x,route:h};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(r)&&g)return;Ze(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 S=Ln([r,b.relativePath]),w=i.concat(b);h.children&&h.children.length>0&&(Ze(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${S}".`),V0(h.children,l,w,S,g)),!(h.path==null&&!h.index)&&l.push({path:S,score:Zy(S,h.index),routesMeta:w})};return a.forEach((h,x)=>{if(h.path===""||!h.path?.includes("?"))d(h,x);else for(let g of Y0(h.path))d(h,x,!0,g)}),l}function Y0(a){let l=a.split("/");if(l.length===0)return[];let[i,...r]=l,f=i.endsWith("?"),d=i.replace(/\?$/,"");if(r.length===0)return f?[d,""]:[d];let h=Y0(r.join("/")),x=[];return x.push(...h.map(g=>g===""?d:[d,g].join("/"))),f&&x.push(...h),x.map(g=>a.startsWith("/")&&g===""?"/":g)}function Vy(a){a.sort((l,i)=>l.score!==i.score?i.score-l.score:Fy(l.routesMeta.map(r=>r.childrenIndex),i.routesMeta.map(r=>r.childrenIndex)))}var Yy=/^:[\w-]+$/,$y=3,Gy=2,Xy=1,Qy=10,Ky=-2,Jp=a=>a==="*";function Zy(a,l){let i=a.split("/"),r=i.length;return i.some(Jp)&&(r+=Ky),l&&(r+=Gy),i.filter(f=>!Jp(f)).reduce((f,d)=>f+(Yy.test(d)?$y:d===""?Xy:Qy),r)}function Fy(a,l){return a.length===l.length&&a.slice(0,-1).every((r,f)=>r===l[f])?a[a.length-1]-l[l.length-1]:0}function Jy(a,l,i=!1){let{routesMeta:r}=a,f={},d="/",h=[];for(let x=0;x{if(b==="*"){let C=x[w]||"";h=d.slice(0,d.length-C.length).replace(/(.)\/+$/,"$1")}const q=x[w];return S&&!q?v[b]=void 0:v[b]=(q||"").replace(/%2F/g,"/"),v},{}),pathname:d,pathnameBase:h,pattern:a}}function Iy(a,l=!1,i=!0){nn(a==="*"||!a.endsWith("*")||a.endsWith("/*"),`Route path "${a}" will be treated as if it were "${a.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${a.replace(/\*$/,"/*")}".`);let r=[],f="^"+a.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,x,g)=>(r.push({paramName:x,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return a.endsWith("*")?(r.push({paramName:"*"}),f+=a==="*"||a==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?f+="\\/*$":a!==""&&a!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,l?void 0:"i"),r]}function Wy(a){try{return a.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return nn(!1,`The URL path "${a}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),a}}function Un(a,l){if(l==="/")return a;if(!a.toLowerCase().startsWith(l.toLowerCase()))return null;let i=l.endsWith("/")?l.length-1:l.length,r=a.charAt(i);return r&&r!=="/"?null:a.slice(i)||"/"}var Py=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,eb=a=>Py.test(a);function tb(a,l="/"){let{pathname:i,search:r="",hash:f=""}=typeof a=="string"?Bl(a):a,d;if(i)if(eb(i))d=i;else{if(i.includes("//")){let h=i;i=i.replace(/\/\/+/g,"/"),nn(!1,`Pathnames cannot have embedded double slashes - normalizing ${h} -> ${i}`)}i.startsWith("/")?d=Ip(i.substring(1),"/"):d=Ip(i,l)}else d=l;return{pathname:d,search:lb(r),hash:sb(f)}}function Ip(a,l){let i=l.replace(/\/+$/,"").split("/");return a.split("/").forEach(f=>{f===".."?i.length>1&&i.pop():f!=="."&&i.push(f)}),i.length>1?i.join("/"):"/"}function Su(a,l,i,r){return`Cannot include a '${a}' character in a manually specified \`to.${l}\` 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 nb(a){return a.filter((l,i)=>i===0||l.route.path&&l.route.path.length>0)}function $0(a){let l=nb(a);return l.map((i,r)=>r===l.length-1?i.pathname:i.pathnameBase)}function G0(a,l,i,r=!1){let f;typeof a=="string"?f=Bl(a):(f={...a},Ze(!f.pathname||!f.pathname.includes("?"),Su("?","pathname","search",f)),Ze(!f.pathname||!f.pathname.includes("#"),Su("#","pathname","hash",f)),Ze(!f.search||!f.search.includes("#"),Su("#","search","hash",f)));let d=a===""||f.pathname==="",h=d?"/":f.pathname,x;if(h==null)x=i;else{let S=l.length-1;if(!r&&h.startsWith("..")){let w=h.split("/");for(;w[0]==="..";)w.shift(),S-=1;f.pathname=w.join("/")}x=S>=0?l[S]:"/"}let g=tb(f,x),v=h&&h!=="/"&&h.endsWith("/"),b=(d||h===".")&&i.endsWith("/");return!g.pathname.endsWith("/")&&(v||b)&&(g.pathname+="/"),g}var Ln=a=>a.join("/").replace(/\/\/+/g,"/"),ab=a=>a.replace(/\/+$/,"").replace(/^\/*/,"/"),lb=a=>!a||a==="?"?"":a.startsWith("?")?a:"?"+a,sb=a=>!a||a==="#"?"":a.startsWith("#")?a:"#"+a;function ib(a){return a!=null&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.internal=="boolean"&&"data"in a}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var X0=["POST","PUT","PATCH","DELETE"];new Set(X0);var rb=["GET",...X0];new Set(rb);var zl=m.createContext(null);zl.displayName="DataRouter";var Gr=m.createContext(null);Gr.displayName="DataRouterState";m.createContext(!1);var Q0=m.createContext({isTransitioning:!1});Q0.displayName="ViewTransition";var ob=m.createContext(new Map);ob.displayName="Fetchers";var cb=m.createContext(null);cb.displayName="Await";var mn=m.createContext(null);mn.displayName="Navigation";var Ps=m.createContext(null);Ps.displayName="Location";var Hn=m.createContext({outlet:null,matches:[],isDataRoute:!1});Hn.displayName="Route";var uf=m.createContext(null);uf.displayName="RouteError";function ub(a,{relative:l}={}){Ze(ei(),"useHref() may be used only in the context of a component.");let{basename:i,navigator:r}=m.useContext(mn),{hash:f,pathname:d,search:h}=ti(a,{relative:l}),x=d;return i!=="/"&&(x=d==="/"?i:Ln([i,d])),r.createHref({pathname:x,search:h,hash:f})}function ei(){return m.useContext(Ps)!=null}function Ua(){return Ze(ei(),"useLocation() may be used only in the context of a component."),m.useContext(Ps).location}var K0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Z0(a){m.useContext(mn).static||m.useLayoutEffect(a)}function fb(){let{isDataRoute:a}=m.useContext(Hn);return a?Nb():db()}function db(){Ze(ei(),"useNavigate() may be used only in the context of a component.");let a=m.useContext(zl),{basename:l,navigator:i}=m.useContext(mn),{matches:r}=m.useContext(Hn),{pathname:f}=Ua(),d=JSON.stringify($0(r)),h=m.useRef(!1);return Z0(()=>{h.current=!0}),m.useCallback((g,v={})=>{if(nn(h.current,K0),!h.current)return;if(typeof g=="number"){i.go(g);return}let b=G0(g,JSON.parse(d),f,v.relative==="path");a==null&&l!=="/"&&(b.pathname=b.pathname==="/"?l:Ln([l,b.pathname])),(v.replace?i.replace:i.push)(b,v.state,v)},[l,i,d,f,a])}m.createContext(null);function ti(a,{relative:l}={}){let{matches:i}=m.useContext(Hn),{pathname:r}=Ua(),f=JSON.stringify($0(i));return m.useMemo(()=>G0(a,JSON.parse(f),r,l==="path"),[a,f,r,l])}function mb(a,l){return F0(a,l)}function F0(a,l,i,r,f){Ze(ei(),"useRoutes() may be used only in the context of a component.");let{navigator:d}=m.useContext(mn),{matches:h}=m.useContext(Hn),x=h[h.length-1],g=x?x.params:{},v=x?x.pathname:"/",b=x?x.pathnameBase:"/",S=x&&x.route;{let A=S&&S.path||"";J0(v,!S||A.endsWith("*")||A.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 w=Ua(),q;if(l){let A=typeof l=="string"?Bl(l):l;Ze(b==="/"||A.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 "${A.pathname}" was given in the \`location\` prop.`),q=A}else q=w;let C=q.pathname||"/",N=C;if(b!=="/"){let A=b.replace(/^\//,"").split("/");N="/"+C.replace(/^\//,"").split("/").slice(A.length).join("/")}let j=H0(a,{pathname:N});nn(S||j!=null,`No routes matched location "${q.pathname}${q.search}${q.hash}" `),nn(j==null||j[j.length-1].route.element!==void 0||j[j.length-1].route.Component!==void 0||j[j.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 M=vb(j&&j.map(A=>Object.assign({},A,{params:Object.assign({},g,A.params),pathname:Ln([b,d.encodeLocation?d.encodeLocation(A.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?b:Ln([b,d.encodeLocation?d.encodeLocation(A.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),h,i,r,f);return l&&M?m.createElement(Ps.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...q},navigationType:"POP"}},M):M}function hb(){let a=jb(),l=ib(a)?`${a.status} ${a.statusText}`:a instanceof Error?a.message:JSON.stringify(a),i=a instanceof Error?a.stack:null,r="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:r},d={padding:"2px 4px",backgroundColor:r},h=null;return console.error("Error handled by React Router default ErrorBoundary:",a),h=m.createElement(m.Fragment,null,m.createElement("p",null,"💿 Hey developer 👋"),m.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",m.createElement("code",{style:d},"ErrorBoundary")," or"," ",m.createElement("code",{style:d},"errorElement")," prop on your route.")),m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},l),i?m.createElement("pre",{style:f},i):null,h)}var pb=m.createElement(hb,null),gb=class extends m.Component{constructor(a){super(a),this.state={location:a.location,revalidation:a.revalidation,error:a.error}}static getDerivedStateFromError(a){return{error:a}}static getDerivedStateFromProps(a,l){return l.location!==a.location||l.revalidation!=="idle"&&a.revalidation==="idle"?{error:a.error,location:a.location,revalidation:a.revalidation}:{error:a.error!==void 0?a.error:l.error,location:l.location,revalidation:a.revalidation||l.revalidation}}componentDidCatch(a,l){this.props.onError?this.props.onError(a,l):console.error("React Router caught the following error during render",a)}render(){return this.state.error!==void 0?m.createElement(Hn.Provider,{value:this.props.routeContext},m.createElement(uf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function xb({routeContext:a,match:l,children:i}){let r=m.useContext(zl);return r&&r.static&&r.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=l.route.id),m.createElement(Hn.Provider,{value:a},i)}function vb(a,l=[],i=null,r=null,f=null){if(a==null){if(!i)return null;if(i.errors)a=i.matches;else if(l.length===0&&!i.initialized&&i.matches.length>0)a=i.matches;else return null}let d=a,h=i?.errors;if(h!=null){let b=d.findIndex(S=>S.route.id&&h?.[S.route.id]!==void 0);Ze(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),d=d.slice(0,Math.min(d.length,b+1))}let x=!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,S)=>{r(b,{location:i.location,params:i.matches?.[0]?.params??{},errorInfo:S})}:void 0;return d.reduceRight((b,S,w)=>{let q,C=!1,N=null,j=null;i&&(q=h&&S.route.id?h[S.route.id]:void 0,N=S.route.errorElement||pb,x&&(g<0&&w===0?(J0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,j=null):g===w&&(C=!0,j=S.route.hydrateFallbackElement||null)));let M=l.concat(d.slice(0,w+1)),A=()=>{let k;return q?k=N:C?k=j:S.route.Component?k=m.createElement(S.route.Component,null):S.route.element?k=S.route.element:k=b,m.createElement(xb,{match:S,routeContext:{outlet:b,matches:M,isDataRoute:i!=null},children:k})};return i&&(S.route.ErrorBoundary||S.route.errorElement||w===0)?m.createElement(gb,{location:i.location,revalidation:i.revalidation,component:N,error:q,children:A(),routeContext:{outlet:null,matches:M,isDataRoute:!0},onError:v}):A()},null)}function ff(a){return`${a} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yb(a){let l=m.useContext(zl);return Ze(l,ff(a)),l}function bb(a){let l=m.useContext(Gr);return Ze(l,ff(a)),l}function Sb(a){let l=m.useContext(Hn);return Ze(l,ff(a)),l}function df(a){let l=Sb(a),i=l.matches[l.matches.length-1];return Ze(i.route.id,`${a} can only be used on routes that contain a unique "id"`),i.route.id}function Ab(){return df("useRouteId")}function jb(){let a=m.useContext(uf),l=bb("useRouteError"),i=df("useRouteError");return a!==void 0?a:l.errors?.[i]}function Nb(){let{router:a}=yb("useNavigate"),l=df("useNavigate"),i=m.useRef(!1);return Z0(()=>{i.current=!0}),m.useCallback(async(f,d={})=>{nn(i.current,K0),i.current&&(typeof f=="number"?a.navigate(f):await a.navigate(f,{fromRouteId:l,...d}))},[a,l])}var Wp={};function J0(a,l,i){!l&&!Wp[a]&&(Wp[a]=!0,nn(!1,i))}m.memo(wb);function wb({routes:a,future:l,state:i,unstable_onError:r}){return F0(a,void 0,i,r,l)}function Er(a){Ze(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function Cb({basename:a="/",children:l=null,location:i,navigationType:r="POP",navigator:f,static:d=!1}){Ze(!ei(),"You cannot render a inside another . You should never have more than one in your app.");let h=a.replace(/^\/*/,"/"),x=m.useMemo(()=>({basename:h,navigator:f,static:d,future:{}}),[h,f,d]);typeof i=="string"&&(i=Bl(i));let{pathname:g="/",search:v="",hash:b="",state:S=null,key:w="default"}=i,q=m.useMemo(()=>{let C=Un(g,h);return C==null?null:{location:{pathname:C,search:v,hash:b,state:S,key:w},navigationType:r}},[h,g,v,b,S,w,r]);return nn(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:m.createElement(mn.Provider,{value:x},m.createElement(Ps.Provider,{children:l,value:q}))}function Eb({children:a,location:l}){return mb(Qu(a),l)}function Qu(a,l=[]){let i=[];return m.Children.forEach(a,(r,f)=>{if(!m.isValidElement(r))return;let d=[...l,f];if(r.type===m.Fragment){i.push.apply(i,Qu(r.props.children,d));return}Ze(r.type===Er,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),Ze(!r.props.index||!r.props.children,"An index route cannot have child routes.");let h={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&&(h.children=Qu(r.props.children,d)),i.push(h)}),i}var qr="get",Mr="application/x-www-form-urlencoded";function Xr(a){return a!=null&&typeof a.tagName=="string"}function qb(a){return Xr(a)&&a.tagName.toLowerCase()==="button"}function Mb(a){return Xr(a)&&a.tagName.toLowerCase()==="form"}function Tb(a){return Xr(a)&&a.tagName.toLowerCase()==="input"}function Rb(a){return!!(a.metaKey||a.altKey||a.ctrlKey||a.shiftKey)}function kb(a,l){return a.button===0&&(!l||l==="_self")&&!Rb(a)}var Sr=null;function _b(){if(Sr===null)try{new FormData(document.createElement("form"),0),Sr=!1}catch{Sr=!0}return Sr}var Db=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Au(a){return a!=null&&!Db.has(a)?(nn(!1,`"${a}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${Mr}"`),null):a}function Ob(a,l){let i,r,f,d,h;if(Mb(a)){let x=a.getAttribute("action");r=x?Un(x,l):null,i=a.getAttribute("method")||qr,f=Au(a.getAttribute("enctype"))||Mr,d=new FormData(a)}else if(qb(a)||Tb(a)&&(a.type==="submit"||a.type==="image")){let x=a.form;if(x==null)throw new Error('Cannot submit a