(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const d of s)if(d.type==="childList")for(const v of d.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&o(v)}).observe(document,{childList:!0,subtree:!0});function f(s){const d={};return s.integrity&&(d.integrity=s.integrity),s.referrerPolicy&&(d.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?d.credentials="include":s.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function o(s){if(s.ep)return;s.ep=!0;const d=f(s);fetch(s.href,d)}})();var Vo={exports:{}},Gu={};/** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var am;function my(){if(am)return Gu;am=1;var i=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function f(o,s,d){var v=null;if(d!==void 0&&(v=""+d),s.key!==void 0&&(v=""+s.key),"key"in s){d={};for(var g in s)g!=="key"&&(d[g]=s[g])}else d=s;return s=d.ref,{$$typeof:i,type:o,key:v,ref:s!==void 0?s:null,props:d}}return Gu.Fragment=r,Gu.jsx=f,Gu.jsxs=f,Gu}var nm;function vy(){return nm||(nm=1,Vo.exports=my()),Vo.exports}var T=vy(),Zo={exports:{}},me={};/** * @license React * react.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var um;function yy(){if(um)return me;um=1;var i=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),v=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),N=Symbol.iterator;function B(S){return S===null||typeof S!="object"?null:(S=N&&S[N]||S["@@iterator"],typeof S=="function"?S:null)}var G={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,J={};function Q(S,L,Z){this.props=S,this.context=L,this.refs=J,this.updater=Z||G}Q.prototype.isReactComponent={},Q.prototype.setState=function(S,L){if(typeof S!="object"&&typeof S!="function"&&S!=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,S,L,"setState")},Q.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function I(){}I.prototype=Q.prototype;function ne(S,L,Z){this.props=S,this.context=L,this.refs=J,this.updater=Z||G}var Ce=ne.prototype=new I;Ce.constructor=ne,k(Ce,Q.prototype),Ce.isPureReactComponent=!0;var se=Array.isArray;function j(){}var W={H:null,A:null,T:null,S:null},pe=Object.prototype.hasOwnProperty;function he(S,L,Z){var P=Z.ref;return{$$typeof:i,type:S,key:L,ref:P!==void 0?P:null,props:Z}}function Be(S,L){return he(S.type,L,S.props)}function ke(S){return typeof S=="object"&&S!==null&&S.$$typeof===i}function et(S){var L={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(Z){return L[Z]})}var Oe=/\/+/g;function Ne(S,L){return typeof S=="object"&&S!==null&&S.key!=null?et(""+S.key):L.toString(36)}function Fe(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(j,j):(S.status="pending",S.then(function(L){S.status==="pending"&&(S.status="fulfilled",S.value=L)},function(L){S.status==="pending"&&(S.status="rejected",S.reason=L)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function D(S,L,Z,P,de){var ve=typeof S;(ve==="undefined"||ve==="boolean")&&(S=null);var je=!1;if(S===null)je=!0;else switch(ve){case"bigint":case"string":case"number":je=!0;break;case"object":switch(S.$$typeof){case i:case r:je=!0;break;case x:return je=S._init,D(je(S._payload),L,Z,P,de)}}if(je)return de=de(S),je=P===""?"."+Ne(S,0):P,se(de)?(Z="",je!=null&&(Z=je.replace(Oe,"$&/")+"/"),D(de,L,Z,"",function(tt){return tt})):de!=null&&(ke(de)&&(de=Be(de,Z+(de.key==null||S&&S.key===de.key?"":(""+de.key).replace(Oe,"$&/")+"/")+je)),L.push(de)),1;je=0;var yt=P===""?".":P+":";if(se(S))for(var Ie=0;Ie>>1,ye=D[Se];if(0>>1;Ses(Z,te))Ps(de,Z)?(D[Se]=de,D[P]=te,Se=P):(D[Se]=Z,D[L]=te,Se=L);else if(Ps(de,te))D[Se]=de,D[P]=te,Se=P;else break e}}return V}function s(D,V){var te=D.sortIndex-V.sortIndex;return te!==0?te:D.id-V.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;i.unstable_now=function(){return d.now()}}else{var v=Date,g=v.now();i.unstable_now=function(){return v.now()-g}}var y=[],m=[],x=1,E=null,N=3,B=!1,G=!1,k=!1,J=!1,Q=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,ne=typeof setImmediate<"u"?setImmediate:null;function Ce(D){for(var V=f(m);V!==null;){if(V.callback===null)o(m);else if(V.startTime<=D)o(m),V.sortIndex=V.expirationTime,r(y,V);else break;V=f(m)}}function se(D){if(k=!1,Ce(D),!G)if(f(y)!==null)G=!0,j||(j=!0,et());else{var V=f(m);V!==null&&Fe(se,V.startTime-D)}}var j=!1,W=-1,pe=5,he=-1;function Be(){return J?!0:!(i.unstable_now()-heD&&Be());){var Se=E.callback;if(typeof Se=="function"){E.callback=null,N=E.priorityLevel;var ye=Se(E.expirationTime<=D);if(D=i.unstable_now(),typeof ye=="function"){E.callback=ye,Ce(D),V=!0;break t}E===f(y)&&o(y),Ce(D)}else o(y);E=f(y)}if(E!==null)V=!0;else{var S=f(m);S!==null&&Fe(se,S.startTime-D),V=!1}}break e}finally{E=null,N=te,B=!1}V=void 0}}finally{V?et():j=!1}}}var et;if(typeof ne=="function")et=function(){ne(ke)};else if(typeof MessageChannel<"u"){var Oe=new MessageChannel,Ne=Oe.port2;Oe.port1.onmessage=ke,et=function(){Ne.postMessage(null)}}else et=function(){Q(ke,0)};function Fe(D,V){W=Q(function(){D(i.unstable_now())},V)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(D){D.callback=null},i.unstable_forceFrameRate=function(D){0>D||125Se?(D.sortIndex=te,r(m,D),f(y)===null&&D===f(m)&&(k?(I(W),W=-1):k=!0,Fe(se,te-Se))):(D.sortIndex=ye,r(y,D),G||B||(G=!0,j||(j=!0,et()))),D},i.unstable_shouldYield=Be,i.unstable_wrapCallback=function(D){var V=N;return function(){var te=N;N=V;try{return D.apply(this,arguments)}finally{N=te}}}})(Jo)),Jo}var cm;function py(){return cm||(cm=1,Ko.exports=gy()),Ko.exports}var $o={exports:{}},zt={};/** * @license React * react-dom.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var om;function by(){if(om)return zt;om=1;var i=uf();function r(y){var m="https://react.dev/errors/"+y;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(r){console.error(r)}}return i(),$o.exports=by(),$o.exports}/** * @license React * react-dom-client.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var sm;function Ey(){if(sm)return Xu;sm=1;var i=py(),r=uf(),f=Sy();function o(e){var t="https://react.dev/errors/"+e;if(1ye||(e.current=Se[ye],Se[ye]=null,ye--)}function Z(e,t){ye++,Se[ye]=e.current,e.current=t}var P=S(null),de=S(null),ve=S(null),je=S(null);function yt(e,t){switch(Z(ve,t),Z(de,e),Z(P,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Mh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Mh(t),e=Ch(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(P),Z(P,e)}function Ie(){L(P),L(de),L(ve)}function tt(e){e.memoizedState!==null&&Z(je,e);var t=P.current,l=Ch(t,e.type);t!==l&&(Z(de,e),Z(P,l))}function fl(e){de.current===e&&(L(P),L(de)),je.current===e&&(L(je),Hu._currentValue=te)}var an,ei;function Mt(e){if(an===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);an=t&&t[1]||"",ei=-1)":-1n||p[a]!==A[n]){var H=` `+p[a].replace(" at new "," at ");return e.displayName&&H.includes("")&&(H=H.replace("",e.displayName)),H}while(1<=a&&0<=n);break}}}finally{Jn=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Mt(l):""}function ti(e,t){switch(e.tag){case 26:case 27:case 5:return Mt(e.type);case 16:return Mt("Lazy");case 13:return e.child!==t&&t!==null?Mt("Suspense Fallback"):Mt("Suspense");case 19:return Mt("SuspenseList");case 0:case 15:return $n(e.type,!1);case 11:return $n(e.type.render,!1);case 1:return $n(e.type,!0);case 31:return Mt("Activity");default:return""}}function li(e){try{var t="",l=null;do t+=ti(e,l),l=e,e=e.return;while(e);return t}catch(a){return` Error generating stack: `+a.message+` `+a.stack}}var kn=Object.prototype.hasOwnProperty,Fn=i.unstable_scheduleCallback,Wn=i.unstable_cancelCallback,Ol=i.unstable_shouldYield,Na=i.unstable_requestPaint,_t=i.unstable_now,Pn=i.unstable_getCurrentPriorityLevel,Kt=i.unstable_ImmediatePriority,Jt=i.unstable_UserBlockingPriority,ja=i.unstable_NormalPriority,jr=i.unstable_LowPriority,nn=i.unstable_IdlePriority,Ur=i.log,sl=i.unstable_setDisableYieldValue,Il=null,Tt=null;function dl(e){if(typeof Ur=="function"&&sl(e),Tt&&typeof Tt.setStrictMode=="function")try{Tt.setStrictMode(Il,e)}catch{}}var Ct=Math.clz32?Math.clz32:ni,ai=Math.log,un=Math.LN2;function ni(e){return e>>>=0,e===0?32:31-(ai(e)/un|0)|0}var ea=256,rn=262144,Ua=4194304;function Nl(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 wa(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,u=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var h=a&134217727;return h!==0?(a=h&~u,a!==0?n=Nl(a):(c&=h,c!==0?n=Nl(c):l||(l=h&~e,l!==0&&(n=Nl(l))))):(h=a&~u,h!==0?n=Nl(h):c!==0?n=Nl(c):l||(l=a&~e,l!==0&&(n=Nl(l)))),n===0?0:t!==0&&t!==n&&(t&u)===0&&(u=n&-n,l=t&-t,u>=l||u===32&&(l&4194048)!==0)?t:n}function _l(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function cn(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 ui(){var e=Ua;return Ua<<=1,(Ua&62914560)===0&&(Ua=4194304),e}function In(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function b(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function M(e,t,l,a,n,u){var c=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var h=e.entanglements,p=e.expirationTimes,A=e.hiddenUpdates;for(l=c&~l;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var cv=/[\n"\\]/g;function Wt(e){return e.replace(cv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Br(e,t,l,a,n,u,c,h){e.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.type=c:e.removeAttribute("type"),t!=null?c==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ft(t)):e.value!==""+Ft(t)&&(e.value=""+Ft(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?Hr(e,c,Ft(t)):l!=null?Hr(e,c,Ft(l)):a!=null&&e.removeAttribute("value"),n==null&&u!=null&&(e.defaultChecked=!!u),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+Ft(h):e.removeAttribute("name")}function Sf(e,t,l,a,n,u,c,h){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||l!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){wr(e);return}l=l!=null?""+Ft(l):"",t=t!=null?""+Ft(t):l,h||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=h?e.checked:!!a,e.defaultChecked=!!a,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.name=c),wr(e)}function Hr(e,t,l){t==="number"&&ii(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function on(e,t,l,a){if(e=e.options,t){t={};for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xr=!1;if(Bl)try{var tu={};Object.defineProperty(tu,"passive",{get:function(){Xr=!0}}),window.addEventListener("test",tu,tu),window.removeEventListener("test",tu,tu)}catch{Xr=!1}var ta=null,Vr=null,ci=null;function Cf(){if(ci)return ci;var e,t=Vr,l=t.length,a,n="value"in ta?ta.value:ta.textContent,u=n.length;for(e=0;e=nu),jf=" ",Uf=!1;function wf(e,t){switch(e){case"keyup":return Bv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var hn=!1;function Lv(e,t){switch(e){case"compositionend":return Bf(t);case"keypress":return t.which!==32?null:(Uf=!0,jf);case"textInput":return e=t.data,e===jf&&Uf?null:e;default:return null}}function qv(e,t){if(hn)return e==="compositionend"||!$r&&wf(e,t)?(e=Cf(),ci=Vr=ta=null,hn=!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:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Zf(l)}}function Kf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Kf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ii(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=ii(e.document)}return t}function Wr(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 Jv=Bl&&"documentMode"in document&&11>=document.documentMode,mn=null,Pr=null,cu=null,Ir=!1;function $f(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Ir||mn==null||mn!==ii(a)||(a=mn,"selectionStart"in a&&Wr(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}),cu&&ru(cu,a)||(cu=a,a=tr(Pr,"onSelect"),0>=c,n-=c,Ml=1<<32-Ct(t)+n|l<be?(Ae=ae,ae=null):Ae=ae.sibling;var we=O(z,ae,R[be],q);if(we===null){ae===null&&(ae=Ae);break}e&&ae&&we.alternate===null&&t(z,ae),_=u(we,_,be),Ue===null?oe=we:Ue.sibling=we,Ue=we,ae=Ae}if(be===R.length)return l(z,ae),De&&Ll(z,be),oe;if(ae===null){for(;bebe?(Ae=ae,ae=null):Ae=ae.sibling;var Ta=O(z,ae,we.value,q);if(Ta===null){ae===null&&(ae=Ae);break}e&&ae&&Ta.alternate===null&&t(z,ae),_=u(Ta,_,be),Ue===null?oe=Ta:Ue.sibling=Ta,Ue=Ta,ae=Ae}if(we.done)return l(z,ae),De&&Ll(z,be),oe;if(ae===null){for(;!we.done;be++,we=R.next())we=Y(z,we.value,q),we!==null&&(_=u(we,_,be),Ue===null?oe=we:Ue.sibling=we,Ue=we);return De&&Ll(z,be),oe}for(ae=a(ae);!we.done;be++,we=R.next())we=w(ae,z,be,we.value,q),we!==null&&(e&&we.alternate!==null&&ae.delete(we.key===null?be:we.key),_=u(we,_,be),Ue===null?oe=we:Ue.sibling=we,Ue=we);return e&&ae.forEach(function(hy){return t(z,hy)}),De&&Ll(z,be),oe}function Ze(z,_,R,q){if(typeof R=="object"&&R!==null&&R.type===k&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case B:e:{for(var oe=R.key;_!==null;){if(_.key===oe){if(oe=R.type,oe===k){if(_.tag===7){l(z,_.sibling),q=n(_,R.props.children),q.return=z,z=q;break e}}else if(_.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===pe&&Ja(oe)===_.type){l(z,_.sibling),q=n(_,R.props),mu(q,R),q.return=z,z=q;break e}l(z,_);break}else t(z,_);_=_.sibling}R.type===k?(q=Xa(R.props.children,z.mode,q,R.key),q.return=z,z=q):(q=pi(R.type,R.key,R.props,null,z.mode,q),mu(q,R),q.return=z,z=q)}return c(z);case G:e:{for(oe=R.key;_!==null;){if(_.key===oe)if(_.tag===4&&_.stateNode.containerInfo===R.containerInfo&&_.stateNode.implementation===R.implementation){l(z,_.sibling),q=n(_,R.children||[]),q.return=z,z=q;break e}else{l(z,_);break}else t(z,_);_=_.sibling}q=ic(R,z.mode,q),q.return=z,z=q}return c(z);case pe:return R=Ja(R),Ze(z,_,R,q)}if(Fe(R))return ee(z,_,R,q);if(et(R)){if(oe=et(R),typeof oe!="function")throw Error(o(150));return R=oe.call(R),fe(z,_,R,q)}if(typeof R.then=="function")return Ze(z,_,zi(R),q);if(R.$$typeof===ne)return Ze(z,_,Ei(z,R),q);Mi(z,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,_!==null&&_.tag===6?(l(z,_.sibling),q=n(_,R),q.return=z,z=q):(l(z,_),q=uc(R,z.mode,q),q.return=z,z=q),c(z)):l(z,_)}return function(z,_,R,q){try{hu=0;var oe=Ze(z,_,R,q);return zn=null,oe}catch(ae){if(ae===xn||ae===Ti)throw ae;var Ue=qt(29,ae,null,z.mode);return Ue.lanes=q,Ue.return=z,Ue}finally{}}}var ka=gs(!0),ps=gs(!1),ia=!1;function pc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bc(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 ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ca(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Le&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=gi(e),ts(e,null,l),t}return yi(e,a,t,l),gi(e)}function vu(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,X(e,l)}}function Sc(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var c={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?n=u=c:u=u.next=c,l=l.next}while(l!==null);u===null?n=u=t:u=u.next=t}else n=u=t;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Ec=!1;function yu(){if(Ec){var e=Tn;if(e!==null)throw e}}function gu(e,t,l,a){Ec=!1;var n=e.updateQueue;ia=!1;var u=n.firstBaseUpdate,c=n.lastBaseUpdate,h=n.shared.pending;if(h!==null){n.shared.pending=null;var p=h,A=p.next;p.next=null,c===null?u=A:c.next=A,c=p;var H=e.alternate;H!==null&&(H=H.updateQueue,h=H.lastBaseUpdate,h!==c&&(h===null?H.firstBaseUpdate=A:h.next=A,H.lastBaseUpdate=p))}if(u!==null){var Y=n.baseState;c=0,H=A=p=null,h=u;do{var O=h.lane&-536870913,w=O!==h.lane;if(w?(Re&O)===O:(a&O)===O){O!==0&&O===_n&&(Ec=!0),H!==null&&(H=H.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var ee=e,fe=h;O=t;var Ze=l;switch(fe.tag){case 1:if(ee=fe.payload,typeof ee=="function"){Y=ee.call(Ze,Y,O);break e}Y=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=fe.payload,O=typeof ee=="function"?ee.call(Ze,Y,O):ee,O==null)break e;Y=E({},Y,O);break e;case 2:ia=!0}}O=h.callback,O!==null&&(e.flags|=64,w&&(e.flags|=8192),w=n.callbacks,w===null?n.callbacks=[O]:w.push(O))}else w={lane:O,tag:h.tag,payload:h.payload,callback:h.callback,next:null},H===null?(A=H=w,p=Y):H=H.next=w,c|=O;if(h=h.next,h===null){if(h=n.shared.pending,h===null)break;w=h,h=w.next,w.next=null,n.lastBaseUpdate=w,n.shared.pending=null}}while(!0);H===null&&(p=Y),n.baseState=p,n.firstBaseUpdate=A,n.lastBaseUpdate=H,u===null&&(n.shared.lanes=0),ha|=c,e.lanes=c,e.memoizedState=Y}}function bs(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Ss(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;eu?u:8;var c=D.T,h={};D.T=h,Yc(e,!1,t,l);try{var p=n(),A=D.S;if(A!==null&&A(h,p),p!==null&&typeof p=="object"&&typeof p.then=="function"){var H=l0(p,a);Su(e,t,H,Zt(e))}else Su(e,t,a,Zt(e))}catch(Y){Su(e,t,{then:function(){},status:"rejected",reason:Y},Zt())}finally{V.p=u,c!==null&&h.types!==null&&(c.types=h.types),D.T=c}}function c0(){}function Lc(e,t,l,a){if(e.tag!==5)throw Error(o(476));var n=Ps(e).queue;Ws(e,n,t,te,l===null?c0:function(){return Is(e),l(a)})}function Ps(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xl,lastRenderedState:te},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Is(e){var t=Ps(e);t.next===null&&(t=e.alternate.memoizedState),Su(e,t.next.queue,{},Zt())}function qc(){return bt(Hu)}function ed(){return it().memoizedState}function td(){return it().memoizedState}function o0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Zt();e=ra(l);var a=ca(t,e,l);a!==null&&(wt(a,t,l),vu(a,t,l)),t={cache:mc()},e.payload=t;return}t=t.return}}function f0(e,t,l){var a=Zt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Bi(e)?ad(t,l):(l=ac(e,t,l,a),l!==null&&(wt(l,e,a),nd(l,t,a)))}function ld(e,t,l){var a=Zt();Su(e,t,l,a)}function Su(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Bi(e))ad(t,n);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var c=t.lastRenderedState,h=u(c,l);if(n.hasEagerState=!0,n.eagerState=h,Lt(h,c))return yi(e,t,n,0),Qe===null&&vi(),!1}catch{}finally{}if(l=ac(e,t,n,a),l!==null)return wt(l,e,a),nd(l,t,a),!0}return!1}function Yc(e,t,l,a){if(a={lane:2,revertLane:bo(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Bi(e)){if(t)throw Error(o(479))}else t=ac(e,l,a,2),t!==null&&wt(t,e,2)}function Bi(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function ad(e,t){Cn=Ai=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function nd(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,X(e,l)}}var Eu={readContext:bt,use:Ni,useCallback:lt,useContext:lt,useEffect:lt,useImperativeHandle:lt,useLayoutEffect:lt,useInsertionEffect:lt,useMemo:lt,useReducer:lt,useRef:lt,useState:lt,useDebugValue:lt,useDeferredValue:lt,useTransition:lt,useSyncExternalStore:lt,useId:lt,useHostTransitionStatus:lt,useFormState:lt,useActionState:lt,useOptimistic:lt,useMemoCache:lt,useCacheRefresh:lt};Eu.useEffectEvent=lt;var ud={readContext:bt,use:Ni,useCallback:function(e,t){return At().memoizedState=[e,t===void 0?null:t],e},useContext:bt,useEffect:Xs,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Ui(4194308,4,Ks.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Ui(4194308,4,e,t)},useInsertionEffect:function(e,t){Ui(4,2,e,t)},useMemo:function(e,t){var l=At();t=t===void 0?null:t;var a=e();if(Fa){dl(!0);try{e()}finally{dl(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=At();if(l!==void 0){var n=l(t);if(Fa){dl(!0);try{l(t)}finally{dl(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=f0.bind(null,ge,e),[a.memoizedState,e]},useRef:function(e){var t=At();return e={current:e},t.memoizedState=e},useState:function(e){e=jc(e);var t=e.queue,l=ld.bind(null,ge,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Bc,useDeferredValue:function(e,t){var l=At();return Hc(l,e,t)},useTransition:function(){var e=jc(!1);return e=Ws.bind(null,ge,e.queue,!0,!1),At().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=ge,n=At();if(De){if(l===void 0)throw Error(o(407));l=l()}else{if(l=t(),Qe===null)throw Error(o(349));(Re&127)!==0||Ms(a,t,l)}n.memoizedState=l;var u={value:l,getSnapshot:t};return n.queue=u,Xs(Rs.bind(null,a,u,e),[e]),a.flags|=2048,An(9,{destroy:void 0},Cs.bind(null,a,u,l,t),null),l},useId:function(){var e=At(),t=Qe.identifierPrefix;if(De){var l=Cl,a=Ml;l=(a&~(1<<32-Ct(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Di++,0<\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?c.createElement("select",{is:a.is}):c.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?c.createElement(n,{is:a.is}):c.createElement(n)}}u[$]=t,u[F]=a;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)u.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=u;e:switch(Et(u,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Zl(t)}}return $e(t),eo(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Zl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(o(166));if(e=ve.current,Sn(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=pt,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[$]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||xh(e.nodeValue,l)),e||na(t,!0)}else e=lr(e).createTextNode(a),e[$]=t,t.stateNode=e}return $e(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Sn(t),l!==null){if(e===null){if(!a)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[$]=t}else Va(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;$e(t),e=!1}else l=fc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Gt(t),t):(Gt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return $e(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=Sn(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(o(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(o(317));n[$]=t}else Va(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;$e(t),n=!1}else n=fc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(Gt(t),t):(Gt(t),null)}return Gt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Gi(t,t.updateQueue),$e(t),null);case 4:return Ie(),e===null&&To(t.stateNode.containerInfo),$e(t),null;case 10:return Yl(t.type),$e(t),null;case 19:if(L(ut),a=t.memoizedState,a===null)return $e(t),null;if(n=(t.flags&128)!==0,u=a.rendering,u===null)if(n)Tu(a,!1);else{if(at!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Ri(e),u!==null){for(t.flags|=128,Tu(a,!1),e=u.updateQueue,t.updateQueue=e,Gi(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)ls(l,e),l=l.sibling;return Z(ut,ut.current&1|2),De&&Ll(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&_t()>Ki&&(t.flags|=128,n=!0,Tu(a,!1),t.lanes=4194304)}else{if(!n)if(e=Ri(u),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,Gi(t,e),Tu(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!De)return $e(t),null}else 2*_t()-a.renderingStartTime>Ki&&l!==536870912&&(t.flags|=128,n=!0,Tu(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(e=a.last,e!==null?e.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=_t(),e.sibling=null,l=ut.current,Z(ut,n?l&1|2:l&1),De&&Ll(t,a.treeForkCount),e):($e(t),null);case 22:case 23:return Gt(t),Tc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&($e(t),t.subtreeFlags&6&&(t.flags|=8192)):$e(t),l=t.updateQueue,l!==null&&Gi(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&L(Ka),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Yl(ot),$e(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function v0(e,t){switch(cc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yl(ot),Ie(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return fl(t),null;case 31:if(t.memoizedState!==null){if(Gt(t),t.alternate===null)throw Error(o(340));Va()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Gt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Va()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(ut),null;case 4:return Ie(),null;case 10:return Yl(t.type),null;case 22:case 23:return Gt(t),Tc(),e!==null&&L(Ka),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Yl(ot),null;case 25:return null;default:return null}}function Ad(e,t){switch(cc(t),t.tag){case 3:Yl(ot),Ie();break;case 26:case 27:case 5:fl(t);break;case 4:Ie();break;case 31:t.memoizedState!==null&&Gt(t);break;case 13:Gt(t);break;case 19:L(ut);break;case 10:Yl(t.type);break;case 22:case 23:Gt(t),Tc(),e!==null&&L(Ka);break;case 24:Yl(ot)}}function xu(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var u=l.create,c=l.inst;a=u(),c.destroy=a}l=l.next}while(l!==n)}}catch(h){Ye(t,t.return,h)}}function sa(e,t,l){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&e)===e){var c=a.inst,h=c.destroy;if(h!==void 0){c.destroy=void 0,n=t;var p=l,A=h;try{A()}catch(H){Ye(n,p,H)}}}a=a.next}while(a!==u)}}catch(H){Ye(t,t.return,H)}}function Dd(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Ss(t,l)}catch(a){Ye(e,e.return,a)}}}function Od(e,t,l){l.props=Wa(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Ye(e,t,a)}}function zu(e,t){try{var l=e.ref;if(l!==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 l=="function"?e.refCleanup=l(a):l.current=a}}catch(n){Ye(e,t,n)}}function Rl(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){Ye(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){Ye(e,t,n)}else l.current=null}function Nd(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){Ye(e,e.return,n)}}function to(e,t,l){try{var a=e.stateNode;H0(a,e.type,l,t),a[F]=t}catch(n){Ye(e,e.return,n)}}function jd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&pa(e.type)||e.tag===4}function lo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jd(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&&pa(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 ao(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=wl));else if(a!==4&&(a===27&&pa(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(ao(e,t,l),e=e.sibling;e!==null;)ao(e,t,l),e=e.sibling}function Xi(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&pa(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Xi(e,t,l),e=e.sibling;e!==null;)Xi(e,t,l),e=e.sibling}function Ud(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Et(t,a,l),t[$]=e,t[F]=l}catch(u){Ye(e,e.return,u)}}var Ql=!1,dt=!1,no=!1,wd=typeof WeakSet=="function"?WeakSet:Set,vt=null;function y0(e,t){if(e=e.containerInfo,Mo=or,e=Jf(e),Wr(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{l.nodeType,u.nodeType}catch{l=null;break e}var c=0,h=-1,p=-1,A=0,H=0,Y=e,O=null;t:for(;;){for(var w;Y!==l||n!==0&&Y.nodeType!==3||(h=c+n),Y!==u||a!==0&&Y.nodeType!==3||(p=c+a),Y.nodeType===3&&(c+=Y.nodeValue.length),(w=Y.firstChild)!==null;)O=Y,Y=w;for(;;){if(Y===e)break t;if(O===l&&++A===n&&(h=c),O===u&&++H===a&&(p=c),(w=Y.nextSibling)!==null)break;Y=O,O=Y.parentNode}Y=w}l=h===-1||p===-1?null:{start:h,end:p}}else l=null}l=l||{start:0,end:0}}else l=null;for(Co={focusedElem:e,selectionRange:l},or=!1,vt=t;vt!==null;)if(t=vt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,vt=e;else for(;vt!==null;){switch(t=vt,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(l=0;l title"))),Et(u,a,l),u[$]=e,We(u),a=u;break e;case"link":var c=Gh("link","href",n).get(a+(l.href||""));if(c){for(var h=0;hZe&&(c=Ze,Ze=fe,fe=c);var z=Qf(h,fe),_=Qf(h,Ze);if(z&&_&&(w.rangeCount!==1||w.anchorNode!==z.node||w.anchorOffset!==z.offset||w.focusNode!==_.node||w.focusOffset!==_.offset)){var R=Y.createRange();R.setStart(z.node,z.offset),w.removeAllRanges(),fe>Ze?(w.addRange(R),w.extend(_.node,_.offset)):(R.setEnd(_.node,_.offset),w.addRange(R))}}}}for(Y=[],w=h;w=w.parentNode;)w.nodeType===1&&Y.push({element:w,left:w.scrollLeft,top:w.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;hl?32:l,D.T=null,l=so,so=null;var u=va,c=Fl;if(ht=0,Un=va=null,Fl=0,(Le&6)!==0)throw Error(o(331));var h=Le;if(Le|=4,Kd(u.current),Vd(u,u.current,c,l),Le=h,Ou(0,!1),Tt&&typeof Tt.onPostCommitFiberRoot=="function")try{Tt.onPostCommitFiberRoot(Il,u)}catch{}return!0}finally{V.p=n,D.T=a,fh(e,t)}}function dh(e,t,l){t=It(l,t),t=Zc(e.stateNode,t,2),e=ca(e,t,2),e!==null&&(b(e,2),Al(e))}function Ye(e,t,l){if(e.tag===3)dh(e,e,l);else for(;t!==null;){if(t.tag===3){dh(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(ma===null||!ma.has(a))){e=It(l,e),l=hd(2),a=ca(t,l,2),a!==null&&(md(l,a,t,e),b(a,2),Al(a));break}}t=t.return}}function yo(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new b0;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(l)||(ro=!0,n.add(l),e=x0.bind(null,e,t,l),t.then(e,e))}function x0(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Qe===e&&(Re&l)===l&&(at===4||at===3&&(Re&62914560)===Re&&300>_t()-Qi?(Le&2)===0&&wn(e,0):co|=l,jn===Re&&(jn=0)),Al(e)}function hh(e,t){t===0&&(t=ui()),e=Ga(e,t),e!==null&&(b(e,t),Al(e))}function z0(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),hh(e,l)}function M0(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(t),hh(e,l)}function C0(e,t){return Fn(e,t)}var Pi=null,Hn=null,go=!1,Ii=!1,po=!1,ga=0;function Al(e){e!==Hn&&e.next===null&&(Hn===null?Pi=Hn=e:Hn=Hn.next=e),Ii=!0,go||(go=!0,A0())}function Ou(e,t){if(!po&&Ii){po=!0;do for(var l=!1,a=Pi;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var u=0;else{var c=a.suspendedLanes,h=a.pingedLanes;u=(1<<31-Ct(42|e)+1)-1,u&=n&~(c&~h),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,gh(a,u))}else u=Re,u=wa(a,a===Qe?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||_l(a,u)||(l=!0,gh(a,u));a=a.next}while(l);po=!1}}function R0(){mh()}function mh(){Ii=go=!1;var e=0;ga!==0&&q0()&&(e=ga);for(var t=_t(),l=null,a=Pi;a!==null;){var n=a.next,u=vh(a,t);u===0?(a.next=null,l===null?Pi=n:l.next=n,n===null&&(Hn=l)):(l=a,(e!==0||(u&3)!==0)&&(Ii=!0)),a=n}ht!==0&&ht!==5||Ou(e),ga!==0&&(ga=0)}function vh(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,u=e.pendingLanes&-62914561;0h)break;var H=p.transferSize,Y=p.initiatorType;H&&zh(Y)&&(p=p.responseEnd,c+=H*(p"u"?null:document;function Hh(e,t,l){var a=Ln;if(a&&typeof t=="string"&&t){var n=Wt(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),Bh.has(n)||(Bh.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),Et(t,"link",e),We(t),a.head.appendChild(t)))}}function $0(e){Wl.D(e),Hh("dns-prefetch",e,null)}function k0(e,t){Wl.C(e,t),Hh("preconnect",e,t)}function F0(e,t,l){Wl.L(e,t,l);var a=Ln;if(a&&e&&t){var n='link[rel="preload"][as="'+Wt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+Wt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+Wt(l.imageSizes)+'"]')):n+='[href="'+Wt(e)+'"]';var u=n;switch(t){case"style":u=qn(e);break;case"script":u=Yn(e)}ul.has(u)||(e=E({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),ul.set(u,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(wu(u))||t==="script"&&a.querySelector(Bu(u))||(t=a.createElement("link"),Et(t,"link",e),We(t),a.head.appendChild(t)))}}function W0(e,t){Wl.m(e,t);var l=Ln;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+Wt(a)+'"][href="'+Wt(e)+'"]',u=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Yn(e)}if(!ul.has(u)&&(e=E({rel:"modulepreload",href:e},t),ul.set(u,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Bu(u)))return}a=l.createElement("link"),Et(a,"link",e),We(a),l.head.appendChild(a)}}}function P0(e,t,l){Wl.S(e,t,l);var a=Ln;if(a&&e){var n=Tl(a).hoistableStyles,u=qn(e);t=t||"default";var c=n.get(u);if(!c){var h={loading:0,preload:null};if(c=a.querySelector(wu(u)))h.loading=5;else{e=E({rel:"stylesheet",href:e,"data-precedence":t},l),(l=ul.get(u))&&Uo(e,l);var p=c=a.createElement("link");We(p),Et(p,"link",e),p._p=new Promise(function(A,H){p.onload=A,p.onerror=H}),p.addEventListener("load",function(){h.loading|=1}),p.addEventListener("error",function(){h.loading|=2}),h.loading|=4,nr(c,t,a)}c={type:"stylesheet",instance:c,count:1,state:h},n.set(u,c)}}}function I0(e,t){Wl.X(e,t);var l=Ln;if(l&&e){var a=Tl(l).hoistableScripts,n=Yn(e),u=a.get(n);u||(u=l.querySelector(Bu(n)),u||(e=E({src:e,async:!0},t),(t=ul.get(n))&&wo(e,t),u=l.createElement("script"),We(u),Et(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function ey(e,t){Wl.M(e,t);var l=Ln;if(l&&e){var a=Tl(l).hoistableScripts,n=Yn(e),u=a.get(n);u||(u=l.querySelector(Bu(n)),u||(e=E({src:e,async:!0,type:"module"},t),(t=ul.get(n))&&wo(e,t),u=l.createElement("script"),We(u),Et(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function Lh(e,t,l,a){var n=(n=ve.current)?ar(n):null;if(!n)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=qn(l.href),l=Tl(n).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=qn(l.href);var u=Tl(n).hoistableStyles,c=u.get(e);if(c||(n=n.ownerDocument||n,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,c),(u=n.querySelector(wu(e)))&&!u._p&&(c.instance=u,c.state.loading=5),ul.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},ul.set(e,l),u||ty(n,e,l,c.state))),t&&a===null)throw Error(o(528,""));return c}if(t&&a!==null)throw Error(o(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Yn(l),l=Tl(n).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function qn(e){return'href="'+Wt(e)+'"'}function wu(e){return'link[rel="stylesheet"]['+e+"]"}function qh(e){return E({},e,{"data-precedence":e.precedence,precedence:null})}function ty(e,t,l,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}),Et(t,"link",l),We(t),e.head.appendChild(t))}function Yn(e){return'[src="'+Wt(e)+'"]'}function Bu(e){return"script[async]"+e}function Yh(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Wt(l.href)+'"]');if(a)return t.instance=a,We(a),a;var n=E({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),We(a),Et(a,"style",n),nr(a,l.precedence,e),t.instance=a;case"stylesheet":n=qn(l.href);var u=e.querySelector(wu(n));if(u)return t.state.loading|=4,t.instance=u,We(u),u;a=qh(l),(n=ul.get(n))&&Uo(a,n),u=(e.ownerDocument||e).createElement("link"),We(u);var c=u;return c._p=new Promise(function(h,p){c.onload=h,c.onerror=p}),Et(u,"link",a),t.state.loading|=4,nr(u,l.precedence,e),t.instance=u;case"script":return u=Yn(l.src),(n=e.querySelector(Bu(u)))?(t.instance=n,We(n),n):(a=l,(n=ul.get(u))&&(a=E({},l),wo(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),We(n),Et(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,nr(a,l.precedence,e));return t.instance}function nr(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,u=n,c=0;c title"):null)}function ly(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Vh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function ay(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=qn(a.href),u=t.querySelector(wu(n));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ir.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=u,We(u);return}u=t.ownerDocument||t,a=qh(a),(n=ul.get(n))&&Uo(a,n),u=u.createElement("link"),We(u);var c=u;c._p=new Promise(function(h,p){c.onload=h,c.onerror=p}),Et(u,"link",a),l.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=ir.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Bo=0;function ny(e,t){return e.stylesheets&&e.count===0&&cr(e,e.stylesheets),0Bo?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function ir(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)cr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var rr=null;function cr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,rr=new Map,t.forEach(uy,e),rr=null,ir.call(e))}function uy(e,t){if(!(t.state.loading&4)){var l=rr.get(e);if(l)var a=l.get(null);else{l=new Map,rr.set(e,l);for(var n=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(i)}catch(r){console.error(r)}}return i(),Qo.exports=Ey(),Qo.exports}var Ty=_y();/** * react-router v7.9.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */var Bm=i=>{throw TypeError(i)},xy=(i,r,f)=>r.has(i)||Bm("Cannot "+f),ko=(i,r,f)=>(xy(i,r,"read from private field"),f?f.call(i):r.get(i)),zy=(i,r,f)=>r.has(i)?Bm("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(i):r.set(i,f),hm="popstate";function My(i={}){function r(o,s){let{pathname:d,search:v,hash:g}=o.location;return ku("",{pathname:d,search:v,hash:g},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function f(o,s){return typeof s=="string"?s:Aa(s)}return Ry(r,f,null,i)}function Te(i,r){if(i===!1||i===null||typeof i>"u")throw new Error(r)}function rt(i,r){if(!i){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function Cy(){return Math.random().toString(36).substring(2,10)}function mm(i,r){return{usr:i.state,key:i.key,idx:r}}function ku(i,r,f=null,o){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof r=="string"?Da(r):r,state:f,key:r&&r.key||o||Cy()}}function Aa({pathname:i="/",search:r="",hash:f=""}){return r&&r!=="?"&&(i+=r.charAt(0)==="?"?r:"?"+r),f&&f!=="#"&&(i+=f.charAt(0)==="#"?f:"#"+f),i}function Da(i){let r={};if(i){let f=i.indexOf("#");f>=0&&(r.hash=i.substring(f),i=i.substring(0,f));let o=i.indexOf("?");o>=0&&(r.search=i.substring(o),i=i.substring(0,o)),i&&(r.pathname=i)}return r}function Ry(i,r,f,o={}){let{window:s=document.defaultView,v5Compat:d=!1}=o,v=s.history,g="POP",y=null,m=x();m==null&&(m=0,v.replaceState({...v.state,idx:m},""));function x(){return(v.state||{idx:null}).idx}function E(){g="POP";let J=x(),Q=J==null?null:J-m;m=J,y&&y({action:g,location:k.location,delta:Q})}function N(J,Q){g="PUSH";let I=ku(k.location,J,Q);m=x()+1;let ne=mm(I,m),Ce=k.createHref(I);try{v.pushState(ne,"",Ce)}catch(se){if(se instanceof DOMException&&se.name==="DataCloneError")throw se;s.location.assign(Ce)}d&&y&&y({action:g,location:k.location,delta:1})}function B(J,Q){g="REPLACE";let I=ku(k.location,J,Q);m=x();let ne=mm(I,m),Ce=k.createHref(I);v.replaceState(ne,"",Ce),d&&y&&y({action:g,location:k.location,delta:0})}function G(J){return Hm(J)}let k={get action(){return g},get location(){return i(s,v)},listen(J){if(y)throw new Error("A history only accepts one active listener");return s.addEventListener(hm,E),y=J,()=>{s.removeEventListener(hm,E),y=null}},createHref(J){return r(s,J)},createURL:G,encodeLocation(J){let Q=G(J);return{pathname:Q.pathname,search:Q.search,hash:Q.hash}},push:N,replace:B,go(J){return v.go(J)}};return k}function Hm(i,r=!1){let f="http://localhost";typeof window<"u"&&(f=window.location.origin!=="null"?window.location.origin:window.location.href),Te(f,"No window.location.(origin|href) available to create URL");let o=typeof i=="string"?i:Aa(i);return o=o.replace(/ $/,"%20"),!r&&o.startsWith("//")&&(o=f+o),new URL(o,f)}var $u,vm=class{constructor(i){if(zy(this,$u,new Map),i)for(let[r,f]of i)this.set(r,f)}get(i){if(ko(this,$u).has(i))return ko(this,$u).get(i);if(i.defaultValue!==void 0)return i.defaultValue;throw new Error("No value found for context")}set(i,r){ko(this,$u).set(i,r)}};$u=new WeakMap;var Ay=new Set(["lazy","caseSensitive","path","id","index","children"]);function Dy(i){return Ay.has(i)}var Oy=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function Ny(i){return Oy.has(i)}function jy(i){return i.index===!0}function Fu(i,r,f=[],o={},s=!1){return i.map((d,v)=>{let g=[...f,String(v)],y=typeof d.id=="string"?d.id:g.join("-");if(Te(d.index!==!0||!d.children,"Cannot specify children on an index route"),Te(s||!o[y],`Found a route id collision on id "${y}". Route id's must be globally unique within Data Router usages`),jy(d)){let m={...d,...r(d),id:y};return o[y]=m,m}else{let m={...d,...r(d),id:y,children:void 0};return o[y]=m,d.children&&(m.children=Fu(d.children,r,g,o,s)),m}})}function Ma(i,r,f="/"){return Sr(i,r,f,!1)}function Sr(i,r,f,o){let s=typeof r=="string"?Da(r):r,d=ol(s.pathname||"/",f);if(d==null)return null;let v=Lm(i);wy(v);let g=null;for(let y=0;g==null&&y{let x={relativePath:m===void 0?v.path||"":m,caseSensitive:v.caseSensitive===!0,childrenIndex:g,route:v};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(o)&&y)return;Te(x.relativePath.startsWith(o),`Absolute route path "${x.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(o.length)}let E=Dl([o,x.relativePath]),N=f.concat(x);v.children&&v.children.length>0&&(Te(v.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${E}".`),Lm(v.children,r,N,E,y)),!(v.path==null&&!v.index)&&r.push({path:E,score:Xy(E,v.index),routesMeta:N})};return i.forEach((v,g)=>{if(v.path===""||!v.path?.includes("?"))d(v,g);else for(let y of qm(v.path))d(v,g,!0,y)}),r}function qm(i){let r=i.split("/");if(r.length===0)return[];let[f,...o]=r,s=f.endsWith("?"),d=f.replace(/\?$/,"");if(o.length===0)return s?[d,""]:[d];let v=qm(o.join("/")),g=[];return g.push(...v.map(y=>y===""?d:[d,y].join("/"))),s&&g.push(...v),g.map(y=>i.startsWith("/")&&y===""?"/":y)}function wy(i){i.sort((r,f)=>r.score!==f.score?f.score-r.score:Vy(r.routesMeta.map(o=>o.childrenIndex),f.routesMeta.map(o=>o.childrenIndex)))}var By=/^:[\w-]+$/,Hy=3,Ly=2,qy=1,Yy=10,Gy=-2,ym=i=>i==="*";function Xy(i,r){let f=i.split("/"),o=f.length;return f.some(ym)&&(o+=Gy),r&&(o+=Ly),f.filter(s=>!ym(s)).reduce((s,d)=>s+(By.test(d)?Hy:d===""?qy:Yy),o)}function Vy(i,r){return i.length===r.length&&i.slice(0,-1).every((o,s)=>o===r[s])?i[i.length-1]-r[r.length-1]:0}function Zy(i,r,f=!1){let{routesMeta:o}=i,s={},d="/",v=[];for(let g=0;g{if(x==="*"){let G=g[N]||"";v=d.slice(0,d.length-G.length).replace(/(.)\/+$/,"$1")}const B=g[N];return E&&!B?m[x]=void 0:m[x]=(B||"").replace(/%2F/g,"/"),m},{}),pathname:d,pathnameBase:v,pattern:i}}function Qy(i,r=!1,f=!0){rt(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let o=[],s="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(v,g,y)=>(o.push({paramName:g,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return i.endsWith("*")?(o.push({paramName:"*"}),s+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):f?s+="\\/*$":i!==""&&i!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,r?void 0:"i"),o]}function Ky(i){try{return i.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return rt(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),i}}function ol(i,r){if(r==="/")return i;if(!i.toLowerCase().startsWith(r.toLowerCase()))return null;let f=r.endsWith("/")?r.length-1:r.length,o=i.charAt(f);return o&&o!=="/"?null:i.slice(f)||"/"}function Jy({basename:i,pathname:r}){return r==="/"?i:Dl([i,r])}function $y(i,r="/"){let{pathname:f,search:o="",hash:s=""}=typeof i=="string"?Da(i):i;return{pathname:f?f.startsWith("/")?f:ky(f,r):r,search:Wy(o),hash:Py(s)}}function ky(i,r){let f=r.replace(/\/+$/,"").split("/");return i.split("/").forEach(s=>{s===".."?f.length>1&&f.pop():s!=="."&&f.push(s)}),f.length>1?f.join("/"):"/"}function Fo(i,r,f,o){return`Cannot include a '${i}' character in a manually specified \`to.${r}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${f}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function Ym(i){return i.filter((r,f)=>f===0||r.route.path&&r.route.path.length>0)}function Rr(i){let r=Ym(i);return r.map((f,o)=>o===r.length-1?f.pathname:f.pathnameBase)}function Ar(i,r,f,o=!1){let s;typeof i=="string"?s=Da(i):(s={...i},Te(!s.pathname||!s.pathname.includes("?"),Fo("?","pathname","search",s)),Te(!s.pathname||!s.pathname.includes("#"),Fo("#","pathname","hash",s)),Te(!s.search||!s.search.includes("#"),Fo("#","search","hash",s)));let d=i===""||s.pathname==="",v=d?"/":s.pathname,g;if(v==null)g=f;else{let E=r.length-1;if(!o&&v.startsWith("..")){let N=v.split("/");for(;N[0]==="..";)N.shift(),E-=1;s.pathname=N.join("/")}g=E>=0?r[E]:"/"}let y=$y(s,g),m=v&&v!=="/"&&v.endsWith("/"),x=(d||v===".")&&f.endsWith("/");return!y.pathname.endsWith("/")&&(m||x)&&(y.pathname+="/"),y}var Dl=i=>i.join("/").replace(/\/\/+/g,"/"),Fy=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),Wy=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,Py=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i,zr=class{constructor(i,r,f,o=!1){this.status=i,this.statusText=r||"",this.internal=o,f instanceof Error?(this.data=f.toString(),this.error=f):this.data=f}};function Wu(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}var Gm=["POST","PUT","PATCH","DELETE"],Iy=new Set(Gm),eg=["GET",...Gm],tg=new Set(eg),lg=new Set([301,302,303,307,308]),ag=new Set([307,308]),Wo={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ng={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Vu={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ug=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rf=i=>ug.test(i),ig=i=>({hasErrorBoundary:!!i.hasErrorBoundary}),Xm="remix-router-transitions",Vm=Symbol("ResetLoaderData");function rg(i){const r=i.window?i.window:typeof window<"u"?window:void 0,f=typeof r<"u"&&typeof r.document<"u"&&typeof r.document.createElement<"u";Te(i.routes.length>0,"You must provide a non-empty routes array to createRouter");let o=i.hydrationRouteProperties||[],s=i.mapRouteProperties||ig,d={},v=Fu(i.routes,s,void 0,d),g,y=i.basename||"/";y.startsWith("/")||(y=`/${y}`);let m=i.dataStrategy||dg,x={...i.future},E=null,N=new Set,B=null,G=null,k=null,J=i.hydrationData!=null,Q=Ma(v,i.history.location,y),I=!1,ne=null,Ce;if(Q==null&&!i.patchRoutesOnNavigation){let b=cl(404,{pathname:i.history.location.pathname}),{matches:M,route:U}=yr(v);Ce=!0,Q=M,ne={[U.id]:b}}else if(Q&&!i.hydrationData&&_l(Q,v,i.history.location.pathname).active&&(Q=null),Q)if(Q.some(b=>b.route.lazy))Ce=!1;else if(!Q.some(b=>cf(b.route)))Ce=!0;else{let b=i.hydrationData?i.hydrationData.loaderData:null,M=i.hydrationData?i.hydrationData.errors:null;if(M){let U=Q.findIndex(X=>M[X.route.id]!==void 0);Ce=Q.slice(0,U+1).every(X=>!lf(X.route,b,M))}else Ce=Q.every(U=>!lf(U.route,b,M))}else{Ce=!1,Q=[];let b=_l(null,v,i.history.location.pathname);b.active&&b.matches&&(I=!0,Q=b.matches)}let se,j={historyAction:i.history.action,location:i.history.location,matches:Q,initialized:Ce,navigation:Wo,restoreScrollPosition:i.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:i.hydrationData&&i.hydrationData.loaderData||{},actionData:i.hydrationData&&i.hydrationData.actionData||null,errors:i.hydrationData&&i.hydrationData.errors||ne,fetchers:new Map,blockers:new Map},W="POP",pe=!1,he,Be=!1,ke=new Map,et=null,Oe=!1,Ne=!1,Fe=new Set,D=new Map,V=0,te=-1,Se=new Map,ye=new Set,S=new Map,L=new Map,Z=new Set,P=new Map,de,ve=null;function je(){if(E=i.history.listen(({action:b,location:M,delta:U})=>{if(de){de(),de=void 0;return}rt(P.size===0||U!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let X=ni({currentLocation:j.location,nextLocation:M,historyAction:b});if(X&&U!=null){let K=new Promise(ue=>{de=ue});i.history.go(U*-1),un(X,{state:"blocked",location:M,proceed(){un(X,{state:"proceeding",proceed:void 0,reset:void 0,location:M}),K.then(()=>i.history.go(U))},reset(){let ue=new Map(j.blockers);ue.set(X,Vu),tt({blockers:ue})}});return}return Mt(b,M)}),f){Cg(r,ke);let b=()=>Rg(r,ke);r.addEventListener("pagehide",b),et=()=>r.removeEventListener("pagehide",b)}return j.initialized||Mt("POP",j.location,{initialHydration:!0}),se}function yt(){E&&E(),et&&et(),N.clear(),he&&he.abort(),j.fetchers.forEach((b,M)=>nn(M)),j.blockers.forEach((b,M)=>ai(M))}function Ie(b){return N.add(b),()=>N.delete(b)}function tt(b,M={}){b.matches&&(b.matches=b.matches.map(K=>{let ue=d[K.route.id],ie=K.route;return ie.element!==ue.element||ie.errorElement!==ue.errorElement||ie.hydrateFallbackElement!==ue.hydrateFallbackElement?{...K,route:ue}:K})),j={...j,...b};let U=[],X=[];j.fetchers.forEach((K,ue)=>{K.state==="idle"&&(Z.has(ue)?U.push(ue):X.push(ue))}),Z.forEach(K=>{!j.fetchers.has(K)&&!D.has(K)&&U.push(K)}),[...N].forEach(K=>K(j,{deletedFetchers:U,viewTransitionOpts:M.viewTransitionOpts,flushSync:M.flushSync===!0})),U.forEach(K=>nn(K)),X.forEach(K=>j.fetchers.delete(K))}function fl(b,M,{flushSync:U}={}){let X=j.actionData!=null&&j.navigation.formMethod!=null&&Ht(j.navigation.formMethod)&&j.navigation.state==="loading"&&b.state?._isRedirect!==!0,K;M.actionData?Object.keys(M.actionData).length>0?K=M.actionData:K=null:X?K=j.actionData:K=null;let ue=M.loaderData?Mm(j.loaderData,M.loaderData,M.matches||[],M.errors):j.loaderData,ie=j.blockers;ie.size>0&&(ie=new Map(ie),ie.forEach(($,F)=>ie.set(F,Vu)));let le=Oe?!1:wa(b,M.matches||j.matches),re=pe===!0||j.navigation.formMethod!=null&&Ht(j.navigation.formMethod)&&b.state?._isRedirect!==!0;g&&(v=g,g=void 0),Oe||W==="POP"||(W==="PUSH"?i.history.push(b,b.state):W==="REPLACE"&&i.history.replace(b,b.state));let ce;if(W==="POP"){let $=ke.get(j.location.pathname);$&&$.has(b.pathname)?ce={currentLocation:j.location,nextLocation:b}:ke.has(b.pathname)&&(ce={currentLocation:b,nextLocation:j.location})}else if(Be){let $=ke.get(j.location.pathname);$?$.add(b.pathname):($=new Set([b.pathname]),ke.set(j.location.pathname,$)),ce={currentLocation:j.location,nextLocation:b}}tt({...M,actionData:K,loaderData:ue,historyAction:W,location:b,initialized:!0,navigation:Wo,revalidation:"idle",restoreScrollPosition:le,preventScrollReset:re,blockers:ie},{viewTransitionOpts:ce,flushSync:U===!0}),W="POP",pe=!1,Be=!1,Oe=!1,Ne=!1,ve?.resolve(),ve=null}async function an(b,M){if(typeof b=="number"){i.history.go(b);return}let U=tf(j.location,j.matches,y,b,M?.fromRouteId,M?.relative),{path:X,submission:K,error:ue}=gm(!1,U,M),ie=j.location,le=ku(j.location,X,M&&M.state);le={...le,...i.history.encodeLocation(le)};let re=M&&M.replace!=null?M.replace:void 0,ce="PUSH";re===!0?ce="REPLACE":re===!1||K!=null&&Ht(K.formMethod)&&K.formAction===j.location.pathname+j.location.search&&(ce="REPLACE");let $=M&&"preventScrollReset"in M?M.preventScrollReset===!0:void 0,F=(M&&M.flushSync)===!0,Ee=ni({currentLocation:ie,nextLocation:le,historyAction:ce});if(Ee){un(Ee,{state:"blocked",location:le,proceed(){un(Ee,{state:"proceeding",proceed:void 0,reset:void 0,location:le}),an(b,M)},reset(){let Ge=new Map(j.blockers);Ge.set(Ee,Vu),tt({blockers:Ge})}});return}await Mt(ce,le,{submission:K,pendingError:ue,preventScrollReset:$,replace:M&&M.replace,enableViewTransition:M&&M.viewTransition,flushSync:F})}function ei(){ve||(ve=Ag()),Pn(),tt({revalidation:"loading"});let b=ve.promise;return j.navigation.state==="submitting"?b:j.navigation.state==="idle"?(Mt(j.historyAction,j.location,{startUninterruptedRevalidation:!0}),b):(Mt(W||j.historyAction,j.navigation.location,{overrideNavigation:j.navigation,enableViewTransition:Be===!0}),b)}async function Mt(b,M,U){he&&he.abort(),he=null,W=b,Oe=(U&&U.startUninterruptedRevalidation)===!0,Nl(j.location,j.matches),pe=(U&&U.preventScrollReset)===!0,Be=(U&&U.enableViewTransition)===!0;let X=g||v,K=U&&U.overrideNavigation,ue=U?.initialHydration&&j.matches&&j.matches.length>0&&!I?j.matches:Ma(X,M,y),ie=(U&&U.flushSync)===!0;if(ue&&j.initialized&&!Ne&&Sg(j.location,M)&&!(U&&U.submission&&Ht(U.submission.formMethod))){fl(M,{matches:ue},{flushSync:ie});return}let le=_l(ue,X,M.pathname);if(le.active&&le.matches&&(ue=le.matches),!ue){let{error:gt,notFoundMatches:Ke,route:He}=ea(M.pathname);fl(M,{matches:Ke,loaderData:{},errors:{[He.id]:gt}},{flushSync:ie});return}he=new AbortController;let re=Vn(i.history,M,he.signal,U&&U.submission),ce=i.getContext?await i.getContext():new vm,$;if(U&&U.pendingError)$=[Ca(ue).route.id,{type:"error",error:U.pendingError}];else if(U&&U.submission&&Ht(U.submission.formMethod)){let gt=await Jn(re,M,U.submission,ue,ce,le.active,U&&U.initialHydration===!0,{replace:U.replace,flushSync:ie});if(gt.shortCircuited)return;if(gt.pendingActionResult){let[Ke,He]=gt.pendingActionResult;if(Qt(He)&&Wu(He.error)&&He.error.status===404){he=null,fl(M,{matches:gt.matches,loaderData:{},errors:{[Ke]:He.error}});return}}ue=gt.matches||ue,$=gt.pendingActionResult,K=Po(M,U.submission),ie=!1,le.active=!1,re=Vn(i.history,re.url,re.signal)}let{shortCircuited:F,matches:Ee,loaderData:Ge,errors:ct}=await $n(re,M,ue,ce,le.active,K,U&&U.submission,U&&U.fetcherSubmission,U&&U.replace,U&&U.initialHydration===!0,ie,$);F||(he=null,fl(M,{matches:Ee||ue,...Cm($),loaderData:Ge,errors:ct}))}async function Jn(b,M,U,X,K,ue,ie,le={}){Pn();let re=zg(M,U);if(tt({navigation:re},{flushSync:le.flushSync===!0}),ue){let F=await cn(X,M.pathname,b.signal);if(F.type==="aborted")return{shortCircuited:!0};if(F.type==="error"){if(F.partialMatches.length===0){let{matches:Ge,route:ct}=yr(v);return{matches:Ge,pendingActionResult:[ct.id,{type:"error",error:F.error}]}}let Ee=Ca(F.partialMatches).route.id;return{matches:F.partialMatches,pendingActionResult:[Ee,{type:"error",error:F.error}]}}else if(F.matches)X=F.matches;else{let{notFoundMatches:Ee,error:Ge,route:ct}=ea(M.pathname);return{matches:Ee,pendingActionResult:[ct.id,{type:"error",error:Ge}]}}}let ce,$=Er(X,M);if(!$.route.action&&!$.route.lazy)ce={type:"error",error:cl(405,{method:b.method,pathname:M.pathname,routeId:$.route.id})};else{let F=Qn(s,d,b,X,$,ie?[]:o,K),Ee=await Na(b,F,K,null);if(ce=Ee[$.route.id],!ce){for(let Ge of X)if(Ee[Ge.route.id]){ce=Ee[Ge.route.id];break}}if(b.signal.aborted)return{shortCircuited:!0}}if(tn(ce)){let F;return le&&le.replace!=null?F=le.replace:F=Tm(ce.response.headers.get("Location"),new URL(b.url),y)===j.location.pathname+j.location.search,await Ol(b,ce,!0,{submission:U,replace:F}),{shortCircuited:!0}}if(Qt(ce)){let F=Ca(X,$.route.id);return(le&&le.replace)!==!0&&(W="PUSH"),{matches:X,pendingActionResult:[F.route.id,ce,$.route.id]}}return{matches:X,pendingActionResult:[$.route.id,ce]}}async function $n(b,M,U,X,K,ue,ie,le,re,ce,$,F){let Ee=ue||Po(M,ie),Ge=ie||le||Am(Ee),ct=!Oe&&!ce;if(K){if(ct){let mt=ti(F);tt({navigation:Ee,...mt!==void 0?{actionData:mt}:{}},{flushSync:$})}let _e=await cn(U,M.pathname,b.signal);if(_e.type==="aborted")return{shortCircuited:!0};if(_e.type==="error"){if(_e.partialMatches.length===0){let{matches:jl,route:zl}=yr(v);return{matches:jl,loaderData:{},errors:{[zl.id]:_e.error}}}let mt=Ca(_e.partialMatches).route.id;return{matches:_e.partialMatches,loaderData:{},errors:{[mt]:_e.error}}}else if(_e.matches)U=_e.matches;else{let{error:mt,notFoundMatches:jl,route:zl}=ea(M.pathname);return{matches:jl,loaderData:{},errors:{[zl.id]:mt}}}}let gt=g||v,{dsMatches:Ke,revalidatingFetchers:He}=pm(b,X,s,d,i.history,j,U,Ge,M,ce?[]:o,ce===!0,Ne,Fe,Z,S,ye,gt,y,i.patchRoutesOnNavigation!=null,F);if(te=++V,!i.dataStrategy&&!Ke.some(_e=>_e.shouldLoad)&&!Ke.some(_e=>_e.route.middleware&&_e.route.middleware.length>0)&&He.length===0){let _e=Tt();return fl(M,{matches:U,loaderData:{},errors:F&&Qt(F[1])?{[F[0]]:F[1].error}:null,...Cm(F),..._e?{fetchers:new Map(j.fetchers)}:{}},{flushSync:$}),{shortCircuited:!0}}if(ct){let _e={};if(!K){_e.navigation=Ee;let mt=ti(F);mt!==void 0&&(_e.actionData=mt)}He.length>0&&(_e.fetchers=li(He)),tt(_e,{flushSync:$})}He.forEach(_e=>{sl(_e.key),_e.controller&&D.set(_e.key,_e.controller)});let hl=()=>He.forEach(_e=>sl(_e.key));he&&he.signal.addEventListener("abort",hl);let{loaderResults:$t,fetcherResults:Rt}=await _t(Ke,He,b,X);if(b.signal.aborted)return{shortCircuited:!0};he&&he.signal.removeEventListener("abort",hl),He.forEach(_e=>D.delete(_e.key));let xt=gr($t);if(xt)return await Ol(b,xt.result,!0,{replace:re}),{shortCircuited:!0};if(xt=gr(Rt),xt)return ye.add(xt.key),await Ol(b,xt.result,!0,{replace:re}),{shortCircuited:!0};let{loaderData:Tl,errors:We}=zm(j,U,$t,F,He,Rt);ce&&j.errors&&(We={...j.errors,...We});let xl=Tt(),Ba=dl(te),kt=xl||Ba||He.length>0;return{matches:U,loaderData:Tl,errors:We,...kt?{fetchers:new Map(j.fetchers)}:{}}}function ti(b){if(b&&!Qt(b[1]))return{[b[0]]:b[1].data};if(j.actionData)return Object.keys(j.actionData).length===0?null:j.actionData}function li(b){return b.forEach(M=>{let U=j.fetchers.get(M.key),X=Zu(void 0,U?U.data:void 0);j.fetchers.set(M.key,X)}),new Map(j.fetchers)}async function kn(b,M,U,X){sl(b);let K=(X&&X.flushSync)===!0,ue=g||v,ie=tf(j.location,j.matches,y,U,M,X?.relative),le=Ma(ue,ie,y),re=_l(le,ue,ie);if(re.active&&re.matches&&(le=re.matches),!le){Jt(b,M,cl(404,{pathname:ie}),{flushSync:K});return}let{path:ce,submission:$,error:F}=gm(!0,ie,X);if(F){Jt(b,M,F,{flushSync:K});return}let Ee=i.getContext?await i.getContext():new vm,Ge=(X&&X.preventScrollReset)===!0;if($&&Ht($.formMethod)){await Fn(b,M,ce,le,Ee,re.active,K,Ge,$);return}S.set(b,{routeId:M,path:ce}),await Wn(b,M,ce,le,Ee,re.active,K,Ge,$)}async function Fn(b,M,U,X,K,ue,ie,le,re){Pn(),S.delete(b);let ce=j.fetchers.get(b);Kt(b,Mg(re,ce),{flushSync:ie});let $=new AbortController,F=Vn(i.history,U,$.signal,re);if(ue){let nt=await cn(X,new URL(F.url).pathname,F.signal,b);if(nt.type==="aborted")return;if(nt.type==="error"){Jt(b,M,nt.error,{flushSync:ie});return}else if(nt.matches)X=nt.matches;else{Jt(b,M,cl(404,{pathname:U}),{flushSync:ie});return}}let Ee=Er(X,U);if(!Ee.route.action&&!Ee.route.lazy){let nt=cl(405,{method:re.formMethod,pathname:U,routeId:M});Jt(b,M,nt,{flushSync:ie});return}D.set(b,$);let Ge=V,ct=Qn(s,d,F,X,Ee,o,K),Ke=(await Na(F,ct,K,b))[Ee.route.id];if(F.signal.aborted){D.get(b)===$&&D.delete(b);return}if(Z.has(b)){if(tn(Ke)||Qt(Ke)){Kt(b,Pl(void 0));return}}else{if(tn(Ke))if(D.delete(b),te>Ge){Kt(b,Pl(void 0));return}else return ye.add(b),Kt(b,Zu(re)),Ol(F,Ke,!1,{fetcherSubmission:re,preventScrollReset:le});if(Qt(Ke)){Jt(b,M,Ke.error);return}}let He=j.navigation.location||j.location,hl=Vn(i.history,He,$.signal),$t=g||v,Rt=j.navigation.state!=="idle"?Ma($t,j.navigation.location,y):j.matches;Te(Rt,"Didn't find any matches after fetcher action");let xt=++V;Se.set(b,xt);let Tl=Zu(re,Ke.data);j.fetchers.set(b,Tl);let{dsMatches:We,revalidatingFetchers:xl}=pm(hl,K,s,d,i.history,j,Rt,re,He,o,!1,Ne,Fe,Z,S,ye,$t,y,i.patchRoutesOnNavigation!=null,[Ee.route.id,Ke]);xl.filter(nt=>nt.key!==b).forEach(nt=>{let Ul=nt.key,Ha=j.fetchers.get(Ul),ml=Zu(void 0,Ha?Ha.data:void 0);j.fetchers.set(Ul,ml),sl(Ul),nt.controller&&D.set(Ul,nt.controller)}),tt({fetchers:new Map(j.fetchers)});let Ba=()=>xl.forEach(nt=>sl(nt.key));$.signal.addEventListener("abort",Ba);let{loaderResults:kt,fetcherResults:_e}=await _t(We,xl,hl,K);if($.signal.aborted)return;if($.signal.removeEventListener("abort",Ba),Se.delete(b),D.delete(b),xl.forEach(nt=>D.delete(nt.key)),j.fetchers.has(b)){let nt=Pl(Ke.data);j.fetchers.set(b,nt)}let mt=gr(kt);if(mt)return Ol(hl,mt.result,!1,{preventScrollReset:le});if(mt=gr(_e),mt)return ye.add(mt.key),Ol(hl,mt.result,!1,{preventScrollReset:le});let{loaderData:jl,errors:zl}=zm(j,Rt,kt,void 0,xl,_e);dl(xt),j.navigation.state==="loading"&&xt>te?(Te(W,"Expected pending action"),he&&he.abort(),fl(j.navigation.location,{matches:Rt,loaderData:jl,errors:zl,fetchers:new Map(j.fetchers)})):(tt({errors:zl,loaderData:Mm(j.loaderData,jl,Rt,zl),fetchers:new Map(j.fetchers)}),Ne=!1)}async function Wn(b,M,U,X,K,ue,ie,le,re){let ce=j.fetchers.get(b);Kt(b,Zu(re,ce?ce.data:void 0),{flushSync:ie});let $=new AbortController,F=Vn(i.history,U,$.signal);if(ue){let He=await cn(X,new URL(F.url).pathname,F.signal,b);if(He.type==="aborted")return;if(He.type==="error"){Jt(b,M,He.error,{flushSync:ie});return}else if(He.matches)X=He.matches;else{Jt(b,M,cl(404,{pathname:U}),{flushSync:ie});return}}let Ee=Er(X,U);D.set(b,$);let Ge=V,ct=Qn(s,d,F,X,Ee,o,K),Ke=(await Na(F,ct,K,b))[Ee.route.id];if(D.get(b)===$&&D.delete(b),!F.signal.aborted){if(Z.has(b)){Kt(b,Pl(void 0));return}if(tn(Ke))if(te>Ge){Kt(b,Pl(void 0));return}else{ye.add(b),await Ol(F,Ke,!1,{preventScrollReset:le});return}if(Qt(Ke)){Jt(b,M,Ke.error);return}Kt(b,Pl(Ke.data))}}async function Ol(b,M,U,{submission:X,fetcherSubmission:K,preventScrollReset:ue,replace:ie}={}){M.response.headers.has("X-Remix-Revalidate")&&(Ne=!0);let le=M.response.headers.get("Location");Te(le,"Expected a Location header on the redirect Response"),le=Tm(le,new URL(b.url),y);let re=ku(j.location,le,{_isRedirect:!0});if(f){let ct=!1;if(M.response.headers.has("X-Remix-Reload-Document"))ct=!0;else if(rf(le)){const gt=Hm(le,!0);ct=gt.origin!==r.location.origin||ol(gt.pathname,y)==null}if(ct){ie?r.location.replace(le):r.location.assign(le);return}}he=null;let ce=ie===!0||M.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:$,formAction:F,formEncType:Ee}=j.navigation;!X&&!K&&$&&F&&Ee&&(X=Am(j.navigation));let Ge=X||K;if(ag.has(M.response.status)&&Ge&&Ht(Ge.formMethod))await Mt(ce,re,{submission:{...Ge,formAction:le},preventScrollReset:ue||pe,enableViewTransition:U?Be:void 0});else{let ct=Po(re,X);await Mt(ce,re,{overrideNavigation:ct,fetcherSubmission:K,preventScrollReset:ue||pe,enableViewTransition:U?Be:void 0})}}async function Na(b,M,U,X){let K,ue={};try{K=await mg(m,b,M,X,U,!1)}catch(ie){return M.filter(le=>le.shouldLoad).forEach(le=>{ue[le.route.id]={type:"error",error:ie}}),ue}if(b.signal.aborted)return ue;for(let[ie,le]of Object.entries(K))if(Tg(le)){let re=le.result;ue[ie]={type:"redirect",response:pg(re,b,ie,M,y)}}else ue[ie]=await gg(le);return ue}async function _t(b,M,U,X){let K=Na(U,b,X,null),ue=Promise.all(M.map(async re=>{if(re.matches&&re.match&&re.request&&re.controller){let $=(await Na(re.request,re.matches,X,re.key))[re.match.route.id];return{[re.key]:$}}else return Promise.resolve({[re.key]:{type:"error",error:cl(404,{pathname:re.path})}})})),ie=await K,le=(await ue).reduce((re,ce)=>Object.assign(re,ce),{});return{loaderResults:ie,fetcherResults:le}}function Pn(){Ne=!0,S.forEach((b,M)=>{D.has(M)&&Fe.add(M),sl(M)})}function Kt(b,M,U={}){j.fetchers.set(b,M),tt({fetchers:new Map(j.fetchers)},{flushSync:(U&&U.flushSync)===!0})}function Jt(b,M,U,X={}){let K=Ca(j.matches,M);nn(b),tt({errors:{[K.route.id]:U},fetchers:new Map(j.fetchers)},{flushSync:(X&&X.flushSync)===!0})}function ja(b){return L.set(b,(L.get(b)||0)+1),Z.has(b)&&Z.delete(b),j.fetchers.get(b)||ng}function jr(b,M){sl(b,M?.reason),Kt(b,Pl(null))}function nn(b){let M=j.fetchers.get(b);D.has(b)&&!(M&&M.state==="loading"&&Se.has(b))&&sl(b),S.delete(b),Se.delete(b),ye.delete(b),Z.delete(b),Fe.delete(b),j.fetchers.delete(b)}function Ur(b){let M=(L.get(b)||0)-1;M<=0?(L.delete(b),Z.add(b)):L.set(b,M),tt({fetchers:new Map(j.fetchers)})}function sl(b,M){let U=D.get(b);U&&(U.abort(M),D.delete(b))}function Il(b){for(let M of b){let U=ja(M),X=Pl(U.data);j.fetchers.set(M,X)}}function Tt(){let b=[],M=!1;for(let U of ye){let X=j.fetchers.get(U);Te(X,`Expected fetcher: ${U}`),X.state==="loading"&&(ye.delete(U),b.push(U),M=!0)}return Il(b),M}function dl(b){let M=[];for(let[U,X]of Se)if(X0}function Ct(b,M){let U=j.blockers.get(b)||Vu;return P.get(b)!==M&&P.set(b,M),U}function ai(b){j.blockers.delete(b),P.delete(b)}function un(b,M){let U=j.blockers.get(b)||Vu;Te(U.state==="unblocked"&&M.state==="blocked"||U.state==="blocked"&&M.state==="blocked"||U.state==="blocked"&&M.state==="proceeding"||U.state==="blocked"&&M.state==="unblocked"||U.state==="proceeding"&&M.state==="unblocked",`Invalid blocker state transition: ${U.state} -> ${M.state}`);let X=new Map(j.blockers);X.set(b,M),tt({blockers:X})}function ni({currentLocation:b,nextLocation:M,historyAction:U}){if(P.size===0)return;P.size>1&&rt(!1,"A router only supports one blocker at a time");let X=Array.from(P.entries()),[K,ue]=X[X.length-1],ie=j.blockers.get(K);if(!(ie&&ie.state==="proceeding")&&ue({currentLocation:b,nextLocation:M,historyAction:U}))return K}function ea(b){let M=cl(404,{pathname:b}),U=g||v,{matches:X,route:K}=yr(U);return{notFoundMatches:X,route:K,error:M}}function rn(b,M,U){if(B=b,k=M,G=U||null,!J&&j.navigation===Wo){J=!0;let X=wa(j.location,j.matches);X!=null&&tt({restoreScrollPosition:X})}return()=>{B=null,k=null,G=null}}function Ua(b,M){return G&&G(b,M.map(X=>Uy(X,j.loaderData)))||b.key}function Nl(b,M){if(B&&k){let U=Ua(b,M);B[U]=k()}}function wa(b,M){if(B){let U=Ua(b,M),X=B[U];if(typeof X=="number")return X}return null}function _l(b,M,U){if(i.patchRoutesOnNavigation)if(b){if(Object.keys(b[0].params).length>0)return{active:!0,matches:Sr(M,U,y,!0)}}else return{active:!0,matches:Sr(M,U,y,!0)||[]};return{active:!1,matches:null}}async function cn(b,M,U,X){if(!i.patchRoutesOnNavigation)return{type:"success",matches:b};let K=b;for(;;){let ue=g==null,ie=g||v,le=d;try{await i.patchRoutesOnNavigation({signal:U,path:M,matches:K,fetcherKey:X,patch:($,F)=>{U.aborted||bm($,F,ie,le,s,!1)}})}catch($){return{type:"error",error:$,partialMatches:K}}finally{ue&&!U.aborted&&(v=[...v])}if(U.aborted)return{type:"aborted"};let re=Ma(ie,M,y);if(re)return{type:"success",matches:re};let ce=Sr(ie,M,y,!0);if(!ce||K.length===ce.length&&K.every(($,F)=>$.route.id===ce[F].route.id))return{type:"success",matches:null};K=ce}}function ui(b){d={},g=Fu(b,s,void 0,d)}function In(b,M,U=!1){let X=g==null;bm(b,M,g||v,d,s,U),X&&(v=[...v],tt({}))}return se={get basename(){return y},get future(){return x},get state(){return j},get routes(){return v},get window(){return r},initialize:je,subscribe:Ie,enableScrollRestoration:rn,navigate:an,fetch:kn,revalidate:ei,createHref:b=>i.history.createHref(b),encodeLocation:b=>i.history.encodeLocation(b),getFetcher:ja,resetFetcher:jr,deleteFetcher:Ur,dispose:yt,getBlocker:Ct,deleteBlocker:ai,patchRoutes:In,_internalFetchControllers:D,_internalSetRoutes:ui,_internalSetStateDoNotUseOrYouWillBreakYourApp(b){tt(b)}},se}function cg(i){return i!=null&&("formData"in i&&i.formData!=null||"body"in i&&i.body!==void 0)}function tf(i,r,f,o,s,d){let v,g;if(s){v=[];for(let m of r)if(v.push(m),m.route.id===s){g=m;break}}else v=r,g=r[r.length-1];let y=Ar(o||".",Rr(v),ol(i.pathname,f)||i.pathname,d==="path");if(o==null&&(y.search=i.search,y.hash=i.hash),(o==null||o===""||o===".")&&g){let m=of(y.search);if(g.route.index&&!m)y.search=y.search?y.search.replace(/^\?/,"?index&"):"?index";else if(!g.route.index&&m){let x=new URLSearchParams(y.search),E=x.getAll("index");x.delete("index"),E.filter(B=>B).forEach(B=>x.append("index",B));let N=x.toString();y.search=N?`?${N}`:""}}return f!=="/"&&(y.pathname=Jy({basename:f,pathname:y.pathname})),Aa(y)}function gm(i,r,f){if(!f||!cg(f))return{path:r};if(f.formMethod&&!xg(f.formMethod))return{path:r,error:cl(405,{method:f.formMethod})};let o=()=>({path:r,error:cl(400,{type:"invalid-body"})}),d=(f.formMethod||"get").toUpperCase(),v=km(r);if(f.body!==void 0){if(f.formEncType==="text/plain"){if(!Ht(d))return o();let E=typeof f.body=="string"?f.body:f.body instanceof FormData||f.body instanceof URLSearchParams?Array.from(f.body.entries()).reduce((N,[B,G])=>`${N}${B}=${G} `,""):String(f.body);return{path:r,submission:{formMethod:d,formAction:v,formEncType:f.formEncType,formData:void 0,json:void 0,text:E}}}else if(f.formEncType==="application/json"){if(!Ht(d))return o();try{let E=typeof f.body=="string"?JSON.parse(f.body):f.body;return{path:r,submission:{formMethod:d,formAction:v,formEncType:f.formEncType,formData:void 0,json:E,text:void 0}}}catch{return o()}}}Te(typeof FormData=="function","FormData is not available in this environment");let g,y;if(f.formData)g=nf(f.formData),y=f.formData;else if(f.body instanceof FormData)g=nf(f.body),y=f.body;else if(f.body instanceof URLSearchParams)g=f.body,y=xm(g);else if(f.body==null)g=new URLSearchParams,y=new FormData;else try{g=new URLSearchParams(f.body),y=xm(g)}catch{return o()}let m={formMethod:d,formAction:v,formEncType:f&&f.formEncType||"application/x-www-form-urlencoded",formData:y,json:void 0,text:void 0};if(Ht(m.formMethod))return{path:r,submission:m};let x=Da(r);return i&&x.search&&of(x.search)&&g.append("index",""),x.search=`?${g}`,{path:Aa(x),submission:m}}function pm(i,r,f,o,s,d,v,g,y,m,x,E,N,B,G,k,J,Q,I,ne){let Ce=ne?Qt(ne[1])?ne[1].error:ne[1].data:void 0,se=s.createURL(d.location),j=s.createURL(y),W;if(x&&d.errors){let Oe=Object.keys(d.errors)[0];W=v.findIndex(Ne=>Ne.route.id===Oe)}else if(ne&&Qt(ne[1])){let Oe=ne[0];W=v.findIndex(Ne=>Ne.route.id===Oe)-1}let pe=ne?ne[1].statusCode:void 0,he=pe&&pe>=400,Be={currentUrl:se,currentParams:d.matches[0]?.params||{},nextUrl:j,nextParams:v[0].params,...g,actionResult:Ce,actionStatus:pe},ke=v.map((Oe,Ne)=>{let{route:Fe}=Oe,D=null;if(W!=null&&Ne>W?D=!1:Fe.lazy?D=!0:cf(Fe)?x?D=lf(Fe,d.loaderData,d.errors):og(d.loaderData,d.matches[Ne],Oe)&&(D=!0):D=!1,D!==null)return af(f,o,i,Oe,m,r,D);let V=he?!1:E||se.pathname+se.search===j.pathname+j.search||se.search!==j.search||fg(d.matches[Ne],Oe),te={...Be,defaultShouldRevalidate:V},Se=Mr(Oe,te);return af(f,o,i,Oe,m,r,Se,te)}),et=[];return G.forEach((Oe,Ne)=>{if(x||!v.some(L=>L.route.id===Oe.routeId)||B.has(Ne))return;let Fe=d.fetchers.get(Ne),D=Fe&&Fe.state!=="idle"&&Fe.data===void 0,V=Ma(J,Oe.path,Q);if(!V){if(I&&D)return;et.push({key:Ne,routeId:Oe.routeId,path:Oe.path,matches:null,match:null,request:null,controller:null});return}if(k.has(Ne))return;let te=Er(V,Oe.path),Se=new AbortController,ye=Vn(s,Oe.path,Se.signal),S=null;if(N.has(Ne))N.delete(Ne),S=Qn(f,o,ye,V,te,m,r);else if(D)E&&(S=Qn(f,o,ye,V,te,m,r));else{let L={...Be,defaultShouldRevalidate:he?!1:E};Mr(te,L)&&(S=Qn(f,o,ye,V,te,m,r,L))}S&&et.push({key:Ne,routeId:Oe.routeId,path:Oe.path,matches:S,match:te,request:ye,controller:Se})}),{dsMatches:ke,revalidatingFetchers:et}}function cf(i){return i.loader!=null||i.middleware!=null&&i.middleware.length>0}function lf(i,r,f){if(i.lazy)return!0;if(!cf(i))return!1;let o=r!=null&&i.id in r,s=f!=null&&f[i.id]!==void 0;return!o&&s?!1:typeof i.loader=="function"&&i.loader.hydrate===!0?!0:!o&&!s}function og(i,r,f){let o=!r||f.route.id!==r.route.id,s=!i.hasOwnProperty(f.route.id);return o||s}function fg(i,r){let f=i.route.path;return i.pathname!==r.pathname||f!=null&&f.endsWith("*")&&i.params["*"]!==r.params["*"]}function Mr(i,r){if(i.route.shouldRevalidate){let f=i.route.shouldRevalidate(r);if(typeof f=="boolean")return f}return r.defaultShouldRevalidate}function bm(i,r,f,o,s,d){let v;if(i){let m=o[i];Te(m,`No route found to patch children into: routeId = ${i}`),m.children||(m.children=[]),v=m.children}else v=f;let g=[],y=[];if(r.forEach(m=>{let x=v.find(E=>Zm(m,E));x?y.push({existingRoute:x,newRoute:m}):g.push(m)}),g.length>0){let m=Fu(g,s,[i||"_","patch",String(v?.length||"0")],o);v.push(...m)}if(d&&y.length>0)for(let m=0;mr.children?.some(s=>Zm(f,s))):!1}var Sm=new WeakMap,Qm=({key:i,route:r,manifest:f,mapRouteProperties:o})=>{let s=f[r.id];if(Te(s,"No route found in manifest"),!s.lazy||typeof s.lazy!="object")return;let d=s.lazy[i];if(!d)return;let v=Sm.get(s);v||(v={},Sm.set(s,v));let g=v[i];if(g)return g;let y=(async()=>{let m=Dy(i),E=s[i]!==void 0&&i!=="hasErrorBoundary";if(m)rt(!m,"Route property "+i+" is not a supported lazy route property. This property will be ignored."),v[i]=Promise.resolve();else if(E)rt(!1,`Route "${s.id}" has a static property "${i}" defined. The lazy property will be ignored.`);else{let N=await d();N!=null&&(Object.assign(s,{[i]:N}),Object.assign(s,o(s)))}typeof s.lazy=="object"&&(s.lazy[i]=void 0,Object.values(s.lazy).every(N=>N===void 0)&&(s.lazy=void 0))})();return v[i]=y,y},Em=new WeakMap;function sg(i,r,f,o,s){let d=f[i.id];if(Te(d,"No route found in manifest"),!i.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof i.lazy=="function"){let x=Em.get(d);if(x)return{lazyRoutePromise:x,lazyHandlerPromise:x};let E=(async()=>{Te(typeof i.lazy=="function","No lazy route function found");let N=await i.lazy(),B={};for(let G in N){let k=N[G];if(k===void 0)continue;let J=Ny(G),I=d[G]!==void 0&&G!=="hasErrorBoundary";J?rt(!J,"Route property "+G+" is not a supported property to be returned from a lazy route function. This property will be ignored."):I?rt(!I,`Route "${d.id}" has a static property "${G}" defined but its lazy function is also returning a value for this property. The lazy route property "${G}" will be ignored.`):B[G]=k}Object.assign(d,B),Object.assign(d,{...o(d),lazy:void 0})})();return Em.set(d,E),E.catch(()=>{}),{lazyRoutePromise:E,lazyHandlerPromise:E}}let v=Object.keys(i.lazy),g=[],y;for(let x of v){if(s&&s.includes(x))continue;let E=Qm({key:x,route:i,manifest:f,mapRouteProperties:o});E&&(g.push(E),x===r&&(y=E))}let m=g.length>0?Promise.all(g).then(()=>{}):void 0;return m?.catch(()=>{}),y?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:y}}async function _m(i){let r=i.matches.filter(s=>s.shouldLoad),f={};return(await Promise.all(r.map(s=>s.resolve()))).forEach((s,d)=>{f[r[d].route.id]=s}),f}async function dg(i){return i.matches.some(r=>r.route.middleware)?Km(i,()=>_m(i)):_m(i)}function Km(i,r){return hg(i,r,o=>o,Eg,f);function f(o,s,d){if(d)return Promise.resolve(Object.assign(d.value,{[s]:{type:"error",result:o}}));{let{matches:v}=i,g=Math.min(Math.max(v.findIndex(m=>m.route.id===s),0),Math.max(v.findIndex(m=>m.unstable_shouldCallHandler()),0)),y=Ca(v,v[g].route.id).route.id;return Promise.resolve({[y]:{type:"error",result:o}})}}}async function hg(i,r,f,o,s){let{matches:d,request:v,params:g,context:y}=i,m=d.flatMap(E=>E.route.middleware?E.route.middleware.map(N=>[E.route.id,N]):[]);return await Jm({request:v,params:g,context:y},m,r,f,o,s)}async function Jm(i,r,f,o,s,d,v=0){let{request:g}=i;if(g.signal.aborted)throw g.signal.reason??new Error(`Request aborted: ${g.method} ${g.url}`);let y=r[v];if(!y)return await f();let[m,x]=y,E,N=async()=>{if(E)throw new Error("You may only call `next()` once per middleware");try{return E={value:await Jm(i,r,f,o,s,d,v+1)},E.value}catch(B){return E={value:await d(B,m,E)},E.value}};try{let B=await x(i,N),G=B!=null?o(B):void 0;return s(G)?G:E?G??E.value:(E={value:await N()},E.value)}catch(B){return await d(B,m,E)}}function $m(i,r,f,o,s){let d=Qm({key:"middleware",route:o.route,manifest:r,mapRouteProperties:i}),v=sg(o.route,Ht(f.method)?"action":"loader",r,i,s);return{middleware:d,route:v.lazyRoutePromise,handler:v.lazyHandlerPromise}}function af(i,r,f,o,s,d,v,g=null){let y=!1,m=$m(i,r,f,o,s);return{...o,_lazyPromises:m,shouldLoad:v,unstable_shouldRevalidateArgs:g,unstable_shouldCallHandler(x){return y=!0,g?typeof x=="boolean"?Mr(o,{...g,defaultShouldRevalidate:x}):Mr(o,g):v},resolve(x){let{lazy:E,loader:N,middleware:B}=o.route,G=y||v||x&&!Ht(f.method)&&(E||N),k=B&&B.length>0&&!N&&!E;return G&&!k?vg({request:f,match:o,lazyHandlerPromise:m?.handler,lazyRoutePromise:m?.route,handlerOverride:x,scopedContext:d}):Promise.resolve({type:"data",result:void 0})}}}function Qn(i,r,f,o,s,d,v,g=null){return o.map(y=>y.route.id!==s.route.id?{...y,shouldLoad:!1,unstable_shouldRevalidateArgs:g,unstable_shouldCallHandler:()=>!1,_lazyPromises:$m(i,r,f,y,d),resolve:()=>Promise.resolve({type:"data",result:void 0})}:af(i,r,f,y,d,v,!0,g))}async function mg(i,r,f,o,s,d){f.some(m=>m._lazyPromises?.middleware)&&await Promise.all(f.map(m=>m._lazyPromises?.middleware));let v={request:r,params:f[0].params,context:s,matches:f},y=await i({...v,fetcherKey:o,runClientMiddleware:m=>{let x=v;return Km(x,()=>m({...x,fetcherKey:o,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(f.flatMap(m=>[m._lazyPromises?.handler,m._lazyPromises?.route]))}catch{}return y}async function vg({request:i,match:r,lazyHandlerPromise:f,lazyRoutePromise:o,handlerOverride:s,scopedContext:d}){let v,g,y=Ht(i.method),m=y?"action":"loader",x=E=>{let N,B=new Promise((J,Q)=>N=Q);g=()=>N(),i.signal.addEventListener("abort",g);let G=J=>typeof E!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${m}" [routeId: ${r.route.id}]`)):E({request:i,params:r.params,context:d},...J!==void 0?[J]:[]),k=(async()=>{try{return{type:"data",result:await(s?s(Q=>G(Q)):G())}}catch(J){return{type:"error",result:J}}})();return Promise.race([k,B])};try{let E=y?r.route.action:r.route.loader;if(f||o)if(E){let N,[B]=await Promise.all([x(E).catch(G=>{N=G}),f,o]);if(N!==void 0)throw N;v=B}else{await f;let N=y?r.route.action:r.route.loader;if(N)[v]=await Promise.all([x(N),o]);else if(m==="action"){let B=new URL(i.url),G=B.pathname+B.search;throw cl(405,{method:i.method,pathname:G,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(E)v=await x(E);else{let N=new URL(i.url),B=N.pathname+N.search;throw cl(404,{pathname:B})}}catch(E){return{type:"error",result:E}}finally{g&&i.signal.removeEventListener("abort",g)}return v}async function yg(i){let r=i.headers.get("Content-Type");return r&&/\bapplication\/json\b/.test(r)?i.body==null?null:i.json():i.text()}async function gg(i){let{result:r,type:f}=i;if(Fm(r)){let o;try{o=await yg(r)}catch(s){return{type:"error",error:s}}return f==="error"?{type:"error",error:new zr(r.status,r.statusText,o),statusCode:r.status,headers:r.headers}:{type:"data",data:o,statusCode:r.status,headers:r.headers}}return f==="error"?Rm(r)?r.data instanceof Error?{type:"error",error:r.data,statusCode:r.init?.status,headers:r.init?.headers?new Headers(r.init.headers):void 0}:{type:"error",error:new zr(r.init?.status||500,void 0,r.data),statusCode:Wu(r)?r.status:void 0,headers:r.init?.headers?new Headers(r.init.headers):void 0}:{type:"error",error:r,statusCode:Wu(r)?r.status:void 0}:Rm(r)?{type:"data",data:r.data,statusCode:r.init?.status,headers:r.init?.headers?new Headers(r.init.headers):void 0}:{type:"data",data:r}}function pg(i,r,f,o,s){let d=i.headers.get("Location");if(Te(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!rf(d)){let v=o.slice(0,o.findIndex(g=>g.route.id===f)+1);d=tf(new URL(r.url),v,s,d),i.headers.set("Location",d)}return i}function Tm(i,r,f){if(rf(i)){let o=i,s=o.startsWith("//")?new URL(r.protocol+o):new URL(o),d=ol(s.pathname,f)!=null;if(s.origin===r.origin&&d)return s.pathname+s.search+s.hash}return i}function Vn(i,r,f,o){let s=i.createURL(km(r)).toString(),d={signal:f};if(o&&Ht(o.formMethod)){let{formMethod:v,formEncType:g}=o;d.method=v.toUpperCase(),g==="application/json"?(d.headers=new Headers({"Content-Type":g}),d.body=JSON.stringify(o.json)):g==="text/plain"?d.body=o.text:g==="application/x-www-form-urlencoded"&&o.formData?d.body=nf(o.formData):d.body=o.formData}return new Request(s,d)}function nf(i){let r=new URLSearchParams;for(let[f,o]of i.entries())r.append(f,typeof o=="string"?o:o.name);return r}function xm(i){let r=new FormData;for(let[f,o]of i.entries())r.append(f,o);return r}function bg(i,r,f,o=!1,s=!1){let d={},v=null,g,y=!1,m={},x=f&&Qt(f[1])?f[1].error:void 0;return i.forEach(E=>{if(!(E.route.id in r))return;let N=E.route.id,B=r[N];if(Te(!tn(B),"Cannot handle redirect results in processLoaderData"),Qt(B)){let G=B.error;if(x!==void 0&&(G=x,x=void 0),v=v||{},s)v[N]=G;else{let k=Ca(i,N);v[k.route.id]==null&&(v[k.route.id]=G)}o||(d[N]=Vm),y||(y=!0,g=Wu(B.error)?B.error.status:500),B.headers&&(m[N]=B.headers)}else d[N]=B.data,B.statusCode&&B.statusCode!==200&&!y&&(g=B.statusCode),B.headers&&(m[N]=B.headers)}),x!==void 0&&f&&(v={[f[0]]:x},f[2]&&(d[f[2]]=void 0)),{loaderData:d,errors:v,statusCode:g||200,loaderHeaders:m}}function zm(i,r,f,o,s,d){let{loaderData:v,errors:g}=bg(r,f,o);return s.filter(y=>!y.matches||y.matches.some(m=>m.shouldLoad)).forEach(y=>{let{key:m,match:x,controller:E}=y;if(E&&E.signal.aborted)return;let N=d[m];if(Te(N,"Did not find corresponding fetcher result"),Qt(N)){let B=Ca(i.matches,x?.route.id);g&&g[B.route.id]||(g={...g,[B.route.id]:N.error}),i.fetchers.delete(m)}else if(tn(N))Te(!1,"Unhandled fetcher revalidation redirect");else{let B=Pl(N.data);i.fetchers.set(m,B)}}),{loaderData:v,errors:g}}function Mm(i,r,f,o){let s=Object.entries(r).filter(([,d])=>d!==Vm).reduce((d,[v,g])=>(d[v]=g,d),{});for(let d of f){let v=d.route.id;if(!r.hasOwnProperty(v)&&i.hasOwnProperty(v)&&d.route.loader&&(s[v]=i[v]),o&&o.hasOwnProperty(v))break}return s}function Cm(i){return i?Qt(i[1])?{actionData:{}}:{actionData:{[i[0]]:i[1].data}}:{}}function Ca(i,r){return(r?i.slice(0,i.findIndex(o=>o.route.id===r)+1):[...i]).reverse().find(o=>o.route.hasErrorBoundary===!0)||i[0]}function yr(i){let r=i.length===1?i[0]:i.find(f=>f.index||!f.path||f.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:r}],route:r}}function cl(i,{pathname:r,routeId:f,method:o,type:s,message:d}={}){let v="Unknown Server Error",g="Unknown @remix-run/router error";return i===400?(v="Bad Request",o&&r&&f?g=`You made a ${o} request to "${r}" but did not provide a \`loader\` for route "${f}", so there is no way to handle the request.`:s==="invalid-body"&&(g="Unable to encode submission body")):i===403?(v="Forbidden",g=`Route "${f}" does not match URL "${r}"`):i===404?(v="Not Found",g=`No route matches URL "${r}"`):i===405&&(v="Method Not Allowed",o&&r&&f?g=`You made a ${o.toUpperCase()} request to "${r}" but did not provide an \`action\` for route "${f}", so there is no way to handle the request.`:o&&(g=`Invalid request method "${o.toUpperCase()}"`)),new zr(i||500,v,new Error(g),!0)}function gr(i){let r=Object.entries(i);for(let f=r.length-1;f>=0;f--){let[o,s]=r[f];if(tn(s))return{key:o,result:s}}}function km(i){let r=typeof i=="string"?Da(i):i;return Aa({...r,hash:""})}function Sg(i,r){return i.pathname!==r.pathname||i.search!==r.search?!1:i.hash===""?r.hash!=="":i.hash===r.hash?!0:r.hash!==""}function Eg(i){return i!=null&&typeof i=="object"&&Object.entries(i).every(([r,f])=>typeof r=="string"&&_g(f))}function _g(i){return i!=null&&typeof i=="object"&&"type"in i&&"result"in i&&(i.type==="data"||i.type==="error")}function Tg(i){return Fm(i.result)&&lg.has(i.result.status)}function Qt(i){return i.type==="error"}function tn(i){return(i&&i.type)==="redirect"}function Rm(i){return typeof i=="object"&&i!=null&&"type"in i&&"data"in i&&"init"in i&&i.type==="DataWithResponseInit"}function Fm(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.headers=="object"&&typeof i.body<"u"}function xg(i){return tg.has(i.toUpperCase())}function Ht(i){return Iy.has(i.toUpperCase())}function of(i){return new URLSearchParams(i).getAll("index").some(r=>r==="")}function Er(i,r){let f=typeof r=="string"?Da(r).search:r.search;if(i[i.length-1].route.index&&of(f||""))return i[i.length-1];let o=Ym(i);return o[o.length-1]}function Am(i){let{formMethod:r,formAction:f,formEncType:o,text:s,formData:d,json:v}=i;if(!(!r||!f||!o)){if(s!=null)return{formMethod:r,formAction:f,formEncType:o,formData:void 0,json:void 0,text:s};if(d!=null)return{formMethod:r,formAction:f,formEncType:o,formData:d,json:void 0,text:void 0};if(v!==void 0)return{formMethod:r,formAction:f,formEncType:o,formData:void 0,json:v,text:void 0}}}function Po(i,r){return r?{state:"loading",location:i,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:"loading",location:i,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function zg(i,r){return{state:"submitting",location:i,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function Zu(i,r){return i?{state:"loading",formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text,data:r}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:r}}function Mg(i,r){return{state:"submitting",formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text,data:r?r.data:void 0}}function Pl(i){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:i}}function Cg(i,r){try{let f=i.sessionStorage.getItem(Xm);if(f){let o=JSON.parse(f);for(let[s,d]of Object.entries(o||{}))d&&Array.isArray(d)&&r.set(s,new Set(d||[]))}}catch{}}function Rg(i,r){if(r.size>0){let f={};for(let[o,s]of r)f[o]=[...s];try{i.sessionStorage.setItem(Xm,JSON.stringify(f))}catch(o){rt(!1,`Failed to save applied view transitions in sessionStorage (${o}).`)}}}function Ag(){let i,r,f=new Promise((o,s)=>{i=async d=>{o(d);try{await f}catch{}},r=async d=>{s(d);try{await f}catch{}}});return{promise:f,resolve:i,reject:r}}var ln=C.createContext(null);ln.displayName="DataRouter";var Pu=C.createContext(null);Pu.displayName="DataRouterState";C.createContext(!1);var ff=C.createContext({isTransitioning:!1});ff.displayName="ViewTransition";var Wm=C.createContext(new Map);Wm.displayName="Fetchers";var Dg=C.createContext(null);Dg.displayName="Await";var Sl=C.createContext(null);Sl.displayName="Navigation";var Dr=C.createContext(null);Dr.displayName="Location";var El=C.createContext({outlet:null,matches:[],isDataRoute:!1});El.displayName="Route";var sf=C.createContext(null);sf.displayName="RouteError";function Og(i,{relative:r}={}){Te(Kn(),"useHref() may be used only in the context of a component.");let{basename:f,navigator:o}=C.useContext(Sl),{hash:s,pathname:d,search:v}=Iu(i,{relative:r}),g=d;return f!=="/"&&(g=d==="/"?f:Dl([f,d])),o.createHref({pathname:g,search:v,hash:s})}function Kn(){return C.useContext(Dr)!=null}function Oa(){return Te(Kn(),"useLocation() may be used only in the context of a component."),C.useContext(Dr).location}var Pm="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Im(i){C.useContext(Sl).static||C.useLayoutEffect(i)}function Or(){let{isDataRoute:i}=C.useContext(El);return i?Kg():Ng()}function Ng(){Te(Kn(),"useNavigate() may be used only in the context of a component.");let i=C.useContext(ln),{basename:r,navigator:f}=C.useContext(Sl),{matches:o}=C.useContext(El),{pathname:s}=Oa(),d=JSON.stringify(Rr(o)),v=C.useRef(!1);return Im(()=>{v.current=!0}),C.useCallback((y,m={})=>{if(rt(v.current,Pm),!v.current)return;if(typeof y=="number"){f.go(y);return}let x=Ar(y,JSON.parse(d),s,m.relative==="path");i==null&&r!=="/"&&(x.pathname=x.pathname==="/"?r:Dl([r,x.pathname])),(m.replace?f.replace:f.push)(x,m.state,m)},[r,f,d,s,i])}var jg=C.createContext(null);function Ug(i){let r=C.useContext(El).outlet;return C.useMemo(()=>r&&C.createElement(jg.Provider,{value:i},r),[r,i])}function Iu(i,{relative:r}={}){let{matches:f}=C.useContext(El),{pathname:o}=Oa(),s=JSON.stringify(Rr(f));return C.useMemo(()=>Ar(i,JSON.parse(s),o,r==="path"),[i,s,o,r])}function wg(i,r,f,o,s){Te(Kn(),"useRoutes() may be used only in the context of a component.");let{navigator:d}=C.useContext(Sl),{matches:v}=C.useContext(El),g=v[v.length-1],y=g?g.params:{},m=g?g.pathname:"/",x=g?g.pathnameBase:"/",E=g&&g.route;{let I=E&&E.path||"";ev(m,!E||I.endsWith("*")||I.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${m}" (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 N=Oa(),B;B=N;let G=B.pathname||"/",k=G;if(x!=="/"){let I=x.replace(/^\//,"").split("/");k="/"+G.replace(/^\//,"").split("/").slice(I.length).join("/")}let J=Ma(i,{pathname:k});return rt(E||J!=null,`No routes matched location "${B.pathname}${B.search}${B.hash}" `),rt(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 "${B.pathname}${B.search}${B.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.`),Yg(J&&J.map(I=>Object.assign({},I,{params:Object.assign({},y,I.params),pathname:Dl([x,d.encodeLocation?d.encodeLocation(I.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:I.pathname]),pathnameBase:I.pathnameBase==="/"?x:Dl([x,d.encodeLocation?d.encodeLocation(I.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:I.pathnameBase])})),v,f,o,s)}function Bg(){let i=Qg(),r=Wu(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),f=i instanceof Error?i.stack:null,o="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:o},d={padding:"2px 4px",backgroundColor:o},v=null;return console.error("Error handled by React Router default ErrorBoundary:",i),v=C.createElement(C.Fragment,null,C.createElement("p",null,"💿 Hey developer 👋"),C.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",C.createElement("code",{style:d},"ErrorBoundary")," or"," ",C.createElement("code",{style:d},"errorElement")," prop on your route.")),C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},r),f?C.createElement("pre",{style:s},f):null,v)}var Hg=C.createElement(Bg,null),Lg=class extends C.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,r){return r.location!==i.location||r.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:r.error,location:r.location,revalidation:i.revalidation||r.revalidation}}componentDidCatch(i,r){this.props.unstable_onError?this.props.unstable_onError(i,r):console.error("React Router caught the following error during render",i)}render(){return this.state.error!==void 0?C.createElement(El.Provider,{value:this.props.routeContext},C.createElement(sf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function qg({routeContext:i,match:r,children:f}){let o=C.useContext(ln);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),C.createElement(El.Provider,{value:i},f)}function Yg(i,r=[],f=null,o=null,s=null){if(i==null){if(!f)return null;if(f.errors)i=f.matches;else if(r.length===0&&!f.initialized&&f.matches.length>0)i=f.matches;else return null}let d=i,v=f?.errors;if(v!=null){let m=d.findIndex(x=>x.route.id&&v?.[x.route.id]!==void 0);Te(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(v).join(",")}`),d=d.slice(0,Math.min(d.length,m+1))}let g=!1,y=-1;if(f)for(let m=0;m=0?d=d.slice(0,y+1):d=[d[0]];break}}}return d.reduceRight((m,x,E)=>{let N,B=!1,G=null,k=null;f&&(N=v&&x.route.id?v[x.route.id]:void 0,G=x.route.errorElement||Hg,g&&(y<0&&E===0?(ev("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),B=!0,k=null):y===E&&(B=!0,k=x.route.hydrateFallbackElement||null)));let J=r.concat(d.slice(0,E+1)),Q=()=>{let I;return N?I=G:B?I=k:x.route.Component?I=C.createElement(x.route.Component,null):x.route.element?I=x.route.element:I=m,C.createElement(qg,{match:x,routeContext:{outlet:m,matches:J,isDataRoute:f!=null},children:I})};return f&&(x.route.ErrorBoundary||x.route.errorElement||E===0)?C.createElement(Lg,{location:f.location,revalidation:f.revalidation,component:G,error:N,children:Q(),routeContext:{outlet:null,matches:J,isDataRoute:!0},unstable_onError:o}):Q()},null)}function df(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Gg(i){let r=C.useContext(ln);return Te(r,df(i)),r}function Xg(i){let r=C.useContext(Pu);return Te(r,df(i)),r}function Vg(i){let r=C.useContext(El);return Te(r,df(i)),r}function hf(i){let r=Vg(i),f=r.matches[r.matches.length-1];return Te(f.route.id,`${i} can only be used on routes that contain a unique "id"`),f.route.id}function Zg(){return hf("useRouteId")}function Qg(){let i=C.useContext(sf),r=Xg("useRouteError"),f=hf("useRouteError");return i!==void 0?i:r.errors?.[f]}function Kg(){let{router:i}=Gg("useNavigate"),r=hf("useNavigate"),f=C.useRef(!1);return Im(()=>{f.current=!0}),C.useCallback(async(s,d={})=>{rt(f.current,Pm),f.current&&(typeof s=="number"?i.navigate(s):await i.navigate(s,{fromRouteId:r,...d}))},[i,r])}var Dm={};function ev(i,r,f){!r&&!Dm[i]&&(Dm[i]=!0,rt(!1,f))}var Om={};function Nm(i,r){!i&&!Om[r]&&(Om[r]=!0,console.warn(r))}function Jg(i){let r={hasErrorBoundary:i.hasErrorBoundary||i.ErrorBoundary!=null||i.errorElement!=null};return i.Component&&(i.element&&rt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(r,{element:C.createElement(i.Component),Component:void 0})),i.HydrateFallback&&(i.hydrateFallbackElement&&rt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(r,{hydrateFallbackElement:C.createElement(i.HydrateFallback),HydrateFallback:void 0})),i.ErrorBoundary&&(i.errorElement&&rt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(r,{errorElement:C.createElement(i.ErrorBoundary),ErrorBoundary:void 0})),r}var $g=["HydrateFallback","hydrateFallbackElement"],kg=class{constructor(){this.status="pending",this.promise=new Promise((i,r)=>{this.resolve=f=>{this.status==="pending"&&(this.status="resolved",i(f))},this.reject=f=>{this.status==="pending"&&(this.status="rejected",r(f))}})}};function Fg({router:i,flushSync:r,unstable_onError:f}){let[o,s]=C.useState(i.state),[d,v]=C.useState(),[g,y]=C.useState({isTransitioning:!1}),[m,x]=C.useState(),[E,N]=C.useState(),[B,G]=C.useState(),k=C.useRef(new Map),J=C.useCallback(se=>{s(j=>(se.errors&&f&&Object.entries(se.errors).forEach(([W,pe])=>{j.errors?.[W]!==pe&&f(pe)}),se))},[f]),Q=C.useCallback((se,{deletedFetchers:j,flushSync:W,viewTransitionOpts:pe})=>{se.fetchers.forEach((Be,ke)=>{Be.data!==void 0&&k.current.set(ke,Be.data)}),j.forEach(Be=>k.current.delete(Be)),Nm(W===!1||r!=null,'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let he=i.window!=null&&i.window.document!=null&&typeof i.window.document.startViewTransition=="function";if(Nm(pe==null||he,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!pe||!he){r&&W?r(()=>J(se)):C.startTransition(()=>J(se));return}if(r&&W){r(()=>{E&&(m&&m.resolve(),E.skipTransition()),y({isTransitioning:!0,flushSync:!0,currentLocation:pe.currentLocation,nextLocation:pe.nextLocation})});let Be=i.window.document.startViewTransition(()=>{r(()=>J(se))});Be.finished.finally(()=>{r(()=>{x(void 0),N(void 0),v(void 0),y({isTransitioning:!1})})}),r(()=>N(Be));return}E?(m&&m.resolve(),E.skipTransition(),G({state:se,currentLocation:pe.currentLocation,nextLocation:pe.nextLocation})):(v(se),y({isTransitioning:!0,flushSync:!1,currentLocation:pe.currentLocation,nextLocation:pe.nextLocation}))},[i.window,r,E,m,J]);C.useLayoutEffect(()=>i.subscribe(Q),[i,Q]),C.useEffect(()=>{g.isTransitioning&&!g.flushSync&&x(new kg)},[g]),C.useEffect(()=>{if(m&&d&&i.window){let se=d,j=m.promise,W=i.window.document.startViewTransition(async()=>{C.startTransition(()=>J(se)),await j});W.finished.finally(()=>{x(void 0),N(void 0),v(void 0),y({isTransitioning:!1})}),N(W)}},[d,m,i.window,J]),C.useEffect(()=>{m&&d&&o.location.key===d.location.key&&m.resolve()},[m,E,o.location,d]),C.useEffect(()=>{!g.isTransitioning&&B&&(v(B.state),y({isTransitioning:!0,flushSync:!1,currentLocation:B.currentLocation,nextLocation:B.nextLocation}),G(void 0))},[g.isTransitioning,B]);let I=C.useMemo(()=>({createHref:i.createHref,encodeLocation:i.encodeLocation,go:se=>i.navigate(se),push:(se,j,W)=>i.navigate(se,{state:j,preventScrollReset:W?.preventScrollReset}),replace:(se,j,W)=>i.navigate(se,{replace:!0,state:j,preventScrollReset:W?.preventScrollReset})}),[i]),ne=i.basename||"/",Ce=C.useMemo(()=>({router:i,navigator:I,static:!1,basename:ne,unstable_onError:f}),[i,I,ne,f]);return C.createElement(C.Fragment,null,C.createElement(ln.Provider,{value:Ce},C.createElement(Pu.Provider,{value:o},C.createElement(Wm.Provider,{value:k.current},C.createElement(ff.Provider,{value:g},C.createElement(tp,{basename:ne,location:o.location,navigationType:o.historyAction,navigator:I},C.createElement(Wg,{routes:i.routes,future:i.future,state:o,unstable_onError:f})))))),null)}var Wg=C.memo(Pg);function Pg({routes:i,future:r,state:f,unstable_onError:o}){return wg(i,void 0,f,o,r)}function Ig({to:i,replace:r,state:f,relative:o}){Te(Kn()," may be used only in the context of a component.");let{static:s}=C.useContext(Sl);rt(!s," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:d}=C.useContext(El),{pathname:v}=Oa(),g=Or(),y=Ar(i,Rr(d),v,o==="path"),m=JSON.stringify(y);return C.useEffect(()=>{g(JSON.parse(m),{replace:r,state:f,relative:o})},[g,m,o,r,f]),null}function ep(i){return Ug(i.context)}function tp({basename:i="/",children:r=null,location:f,navigationType:o="POP",navigator:s,static:d=!1}){Te(!Kn(),"You cannot render a inside another . You should never have more than one in your app.");let v=i.replace(/^\/*/,"/"),g=C.useMemo(()=>({basename:v,navigator:s,static:d,future:{}}),[v,s,d]);typeof f=="string"&&(f=Da(f));let{pathname:y="/",search:m="",hash:x="",state:E=null,key:N="default"}=f,B=C.useMemo(()=>{let G=ol(y,v);return G==null?null:{location:{pathname:G,search:m,hash:x,state:E,key:N},navigationType:o}},[v,y,m,x,E,N,o]);return rt(B!=null,` is not able to match the URL "${y}${m}${x}" because it does not start with the basename, so the won't render anything.`),B==null?null:C.createElement(Sl.Provider,{value:g},C.createElement(Dr.Provider,{children:r,value:B}))}var _r="get",Tr="application/x-www-form-urlencoded";function Nr(i){return i!=null&&typeof i.tagName=="string"}function lp(i){return Nr(i)&&i.tagName.toLowerCase()==="button"}function ap(i){return Nr(i)&&i.tagName.toLowerCase()==="form"}function np(i){return Nr(i)&&i.tagName.toLowerCase()==="input"}function up(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function ip(i,r){return i.button===0&&(!r||r==="_self")&&!up(i)}var pr=null;function rp(){if(pr===null)try{new FormData(document.createElement("form"),0),pr=!1}catch{pr=!0}return pr}var cp=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Io(i){return i!=null&&!cp.has(i)?(rt(!1,`"${i}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${Tr}"`),null):i}function op(i,r){let f,o,s,d,v;if(ap(i)){let g=i.getAttribute("action");o=g?ol(g,r):null,f=i.getAttribute("method")||_r,s=Io(i.getAttribute("enctype"))||Tr,d=new FormData(i)}else if(lp(i)||np(i)&&(i.type==="submit"||i.type==="image")){let g=i.form;if(g==null)throw new Error('Cannot submit a