function nt(e,t){for(var r=0;rn[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Ar=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ne(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var se={exports:{}},R={};var xe;function ot(){if(xe)return R;xe=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),s=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),a=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function E(i){return i===null||typeof i!="object"?null:(i=g&&i[g]||i["@@iterator"],typeof i=="function"?i:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,y={};function m(i,h,_){this.props=i,this.context=h,this.refs=y,this.updater=_||C}m.prototype.isReactComponent={},m.prototype.setState=function(i,h){if(typeof i!="object"&&typeof i!="function"&&i!=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,i,h,"setState")},m.prototype.forceUpdate=function(i){this.updater.enqueueForceUpdate(this,i,"forceUpdate")};function v(){}v.prototype=m.prototype;function S(i,h,_){this.props=i,this.context=h,this.refs=y,this.updater=_||C}var $=S.prototype=new v;$.constructor=S,x($,m.prototype),$.isPureReactComponent=!0;var N=Array.isArray;function B(){}var P={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function A(i,h,_){var w=_.ref;return{$$typeof:e,type:i,key:h,ref:w!==void 0?w:null,props:_}}function W(i,h){return A(i.type,h,i.props)}function q(i){return typeof i=="object"&&i!==null&&i.$$typeof===e}function Qe(i){var h={"=":"=0",":":"=2"};return"$"+i.replace(/[=:]/g,function(_){return h[_]})}var Ce=/\/+/g;function le(i,h){return typeof i=="object"&&i!==null&&i.key!=null?Qe(""+i.key):h.toString(36)}function Ze(i){switch(i.status){case"fulfilled":return i.value;case"rejected":throw i.reason;default:switch(typeof i.status=="string"?i.then(B,B):(i.status="pending",i.then(function(h){i.status==="pending"&&(i.status="fulfilled",i.value=h)},function(h){i.status==="pending"&&(i.status="rejected",i.reason=h)})),i.status){case"fulfilled":return i.value;case"rejected":throw i.reason}}throw i}function K(i,h,_,w,b){var T=typeof i;(T==="undefined"||T==="boolean")&&(i=null);var L=!1;if(i===null)L=!0;else switch(T){case"bigint":case"string":case"number":L=!0;break;case"object":switch(i.$$typeof){case e:case t:L=!0;break;case f:return L=i._init,K(L(i._payload),h,_,w,b)}}if(L)return b=b(i),L=w===""?"."+le(i,0):w,N(b)?(_="",L!=null&&(_=L.replace(Ce,"$&/")+"/"),K(b,h,_,"",function(rt){return rt})):b!=null&&(q(b)&&(b=W(b,_+(b.key==null||i&&i.key===b.key?"":(""+b.key).replace(Ce,"$&/")+"/")+L)),h.push(b)),1;L=0;var U=w===""?".":w+":";if(N(i))for(var D=0;D"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ce.exports=it(),ce.exports}var lt=ut();const Dr=Ne(lt);var Te="popstate";function st(e={}){function t(n,o){let{pathname:u,search:s,hash:d}=n.location;return pe("",{pathname:u,search:s,hash:d},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(n,o){return typeof o=="string"?o:Q(o)}return ft(t,r,null,e)}function O(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function M(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ct(){return Math.random().toString(36).substring(2,10)}function Le(e,t){return{usr:e.state,key:e.key,idx:t}}function pe(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?V(t):t,state:r,key:t&&t.key||n||ct()}}function Q({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function V(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function ft(e,t,r,n={}){let{window:o=document.defaultView,v5Compat:u=!1}=n,s=o.history,d="POP",l=null,a=f();a==null&&(a=0,s.replaceState({...s.state,idx:a},""));function f(){return(s.state||{idx:null}).idx}function p(){d="POP";let y=f(),m=y==null?null:y-a;a=y,l&&l({action:d,location:x.location,delta:m})}function g(y,m){d="PUSH";let v=pe(x.location,y,m);a=f()+1;let S=Le(v,a),$=x.createHref(v);try{s.pushState(S,"",$)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;o.location.assign($)}u&&l&&l({action:d,location:x.location,delta:1})}function E(y,m){d="REPLACE";let v=pe(x.location,y,m);a=f();let S=Le(v,a),$=x.createHref(v);s.replaceState(S,"",$),u&&l&&l({action:d,location:x.location,delta:0})}function C(y){return dt(y)}let x={get action(){return d},get location(){return e(o,s)},listen(y){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(Te,p),l=y,()=>{o.removeEventListener(Te,p),l=null}},createHref(y){return t(o,y)},createURL:C,encodeLocation(y){let m=C(y);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:g,replace:E,go(y){return s.go(y)}};return x}function dt(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),O(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:Q(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function Me(e,t,r="/"){return pt(e,t,r,!1)}function pt(e,t,r,n){let o=typeof t=="string"?V(t):t,u=j(o.pathname||"/",r);if(u==null)return null;let s=Ie(e);ht(s);let d=null;for(let l=0;d==null&&l{let f={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:d,route:s};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(n)&&l)return;O(f.relativePath.startsWith(n),`Absolute route path "${f.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(n.length)}let p=F([n,f.relativePath]),g=r.concat(f);s.children&&s.children.length>0&&(O(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),Ie(s.children,t,g,p,l)),!(s.path==null&&!s.index)&&t.push({path:p,score:wt(p,s.index),routesMeta:g})};return e.forEach((s,d)=>{if(s.path===""||!s.path?.includes("?"))u(s,d);else for(let l of He(s.path))u(s,d,!0,l)}),t}function He(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),u=r.replace(/\?$/,"");if(n.length===0)return o?[u,""]:[u];let s=He(n.join("/")),d=[];return d.push(...s.map(l=>l===""?u:[u,l].join("/"))),o&&d.push(...s),d.map(l=>e.startsWith("/")&&l===""?"/":l)}function ht(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Ct(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var mt=/^:[\w-]+$/,yt=3,gt=2,vt=1,Et=10,Rt=-2,Oe=e=>e==="*";function wt(e,t){let r=e.split("/"),n=r.length;return r.some(Oe)&&(n+=Rt),t&&(n+=gt),r.filter(o=>!Oe(o)).reduce((o,u)=>o+(mt.test(u)?yt:u===""?vt:Et),n)}function Ct(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function _t(e,t,r=!1){let{routesMeta:n}=e,o={},u="/",s=[];for(let d=0;d{if(f==="*"){let C=d[g]||"";s=u.slice(0,u.length-C.length).replace(/(.)\/+$/,"$1")}const E=d[g];return p&&!E?a[f]=void 0:a[f]=(E||"").replace(/%2F/g,"/"),a},{}),pathname:u,pathnameBase:s,pattern:e}}function xt(e,t=!1,r=!0){M(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,d,l)=>(n.push({paramName:d,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function St(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return M(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function j(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}var Pt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bt=e=>Pt.test(e);function Tt(e,t="/"){let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?V(e):e,u;if(r)if(bt(r))u=r;else{if(r.includes("//")){let s=r;r=r.replace(/\/\/+/g,"/"),M(!1,`Pathnames cannot have embedded double slashes - normalizing ${s} -> ${r}`)}r.startsWith("/")?u=ke(r.substring(1),"/"):u=ke(r,t)}else u=t;return{pathname:u,search:kt(n),hash:$t(o)}}function ke(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function fe(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function Lt(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function me(e){let t=Lt(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function ye(e,t,r,n=!1){let o;typeof e=="string"?o=V(e):(o={...e},O(!o.pathname||!o.pathname.includes("?"),fe("?","pathname","search",o)),O(!o.pathname||!o.pathname.includes("#"),fe("#","pathname","hash",o)),O(!o.search||!o.search.includes("#"),fe("#","search","hash",o)));let u=e===""||o.pathname==="",s=u?"/":o.pathname,d;if(s==null)d=r;else{let p=t.length-1;if(!n&&s.startsWith("..")){let g=s.split("/");for(;g[0]==="..";)g.shift(),p-=1;o.pathname=g.join("/")}d=p>=0?t[p]:"/"}let l=Tt(o,d),a=s&&s!=="/"&&s.endsWith("/"),f=(u||s===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(a||f)&&(l.pathname+="/"),l}var F=e=>e.join("/").replace(/\/\/+/g,"/"),Ot=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),kt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,$t=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function At(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ue=["POST","PUT","PATCH","DELETE"];new Set(Ue);var Nt=["GET",...Ue];new Set(Nt);var G=c.createContext(null);G.displayName="DataRouter";var ie=c.createContext(null);ie.displayName="DataRouterState";c.createContext(!1);var Fe=c.createContext({isTransitioning:!1});Fe.displayName="ViewTransition";var Dt=c.createContext(new Map);Dt.displayName="Fetchers";var Mt=c.createContext(null);Mt.displayName="Await";var I=c.createContext(null);I.displayName="Navigation";var Z=c.createContext(null);Z.displayName="Location";var H=c.createContext({outlet:null,matches:[],isDataRoute:!1});H.displayName="Route";var ge=c.createContext(null);ge.displayName="RouteError";function It(e,{relative:t}={}){O(J(),"useHref() may be used only in the context of a component.");let{basename:r,navigator:n}=c.useContext(I),{hash:o,pathname:u,search:s}=ee(e,{relative:t}),d=u;return r!=="/"&&(d=u==="/"?r:F([r,u])),n.createHref({pathname:d,search:s,hash:o})}function J(){return c.useContext(Z)!=null}function Y(){return O(J(),"useLocation() may be used only in the context of a component."),c.useContext(Z).location}var je="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Be(e){c.useContext(I).static||c.useLayoutEffect(e)}function We(){let{isDataRoute:e}=c.useContext(H);return e?Qt():Ht()}function Ht(){O(J(),"useNavigate() may be used only in the context of a component.");let e=c.useContext(G),{basename:t,navigator:r}=c.useContext(I),{matches:n}=c.useContext(H),{pathname:o}=Y(),u=JSON.stringify(me(n)),s=c.useRef(!1);return Be(()=>{s.current=!0}),c.useCallback((l,a={})=>{if(M(s.current,je),!s.current)return;if(typeof l=="number"){r.go(l);return}let f=ye(l,JSON.parse(u),o,a.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:F([t,f.pathname])),(a.replace?r.replace:r.push)(f,a.state,a)},[t,r,u,o,e])}var Ut=c.createContext(null);function Ft(e){let t=c.useContext(H).outlet;return c.useMemo(()=>t&&c.createElement(Ut.Provider,{value:e},t),[t,e])}function ee(e,{relative:t}={}){let{matches:r}=c.useContext(H),{pathname:n}=Y(),o=JSON.stringify(me(r));return c.useMemo(()=>ye(e,JSON.parse(o),n,t==="path"),[e,o,n,t])}function jt(e,t){return Ye(e,t)}function Ye(e,t,r,n,o){O(J(),"useRoutes() may be used only in the context of a component.");let{navigator:u}=c.useContext(I),{matches:s}=c.useContext(H),d=s[s.length-1],l=d?d.params:{},a=d?d.pathname:"/",f=d?d.pathnameBase:"/",p=d&&d.route;{let v=p&&p.path||"";ze(a,!p||v.endsWith("*")||v.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${a}" (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 g=Y(),E;if(t){let v=typeof t=="string"?V(t):t;O(f==="/"||v.pathname?.startsWith(f),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${v.pathname}" was given in the \`location\` prop.`),E=v}else E=g;let C=E.pathname||"/",x=C;if(f!=="/"){let v=f.replace(/^\//,"").split("/");x="/"+C.replace(/^\//,"").split("/").slice(v.length).join("/")}let y=Me(e,{pathname:x});M(p||y!=null,`No routes matched location "${E.pathname}${E.search}${E.hash}" `),M(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${E.pathname}${E.search}${E.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let m=qt(y&&y.map(v=>Object.assign({},v,{params:Object.assign({},l,v.params),pathname:F([f,u.encodeLocation?u.encodeLocation(v.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?f:F([f,u.encodeLocation?u.encodeLocation(v.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:v.pathnameBase])})),s,r,n,o);return t&&m?c.createElement(Z.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...E},navigationType:"POP"}},m):m}function Bt(){let e=Xt(),t=At(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},u={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=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:u},"ErrorBoundary")," or"," ",c.createElement("code",{style:u},"errorElement")," prop on your route.")),c.createElement(c.Fragment,null,c.createElement("h2",null,"Unexpected Application Error!"),c.createElement("h3",{style:{fontStyle:"italic"}},t),r?c.createElement("pre",{style:o},r):null,s)}var Wt=c.createElement(Bt,null),Yt=class extends c.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?c.createElement(H.Provider,{value:this.props.routeContext},c.createElement(ge.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function zt({routeContext:e,match:t,children:r}){let n=c.useContext(G);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),c.createElement(H.Provider,{value:e},r)}function qt(e,t=[],r=null,n=null,o=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let u=e,s=r?.errors;if(s!=null){let f=u.findIndex(p=>p.route.id&&s?.[p.route.id]!==void 0);O(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),u=u.slice(0,Math.min(u.length,f+1))}let d=!1,l=-1;if(r)for(let f=0;f=0?u=u.slice(0,l+1):u=[u[0]];break}}}let a=r&&n?(f,p)=>{n(f,{location:r.location,params:r.matches?.[0]?.params??{},errorInfo:p})}:void 0;return u.reduceRight((f,p,g)=>{let E,C=!1,x=null,y=null;r&&(E=s&&p.route.id?s[p.route.id]:void 0,x=p.route.errorElement||Wt,d&&(l<0&&g===0?(ze("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,y=null):l===g&&(C=!0,y=p.route.hydrateFallbackElement||null)));let m=t.concat(u.slice(0,g+1)),v=()=>{let S;return E?S=x:C?S=y:p.route.Component?S=c.createElement(p.route.Component,null):p.route.element?S=p.route.element:S=f,c.createElement(zt,{match:p,routeContext:{outlet:f,matches:m,isDataRoute:r!=null},children:S})};return r&&(p.route.ErrorBoundary||p.route.errorElement||g===0)?c.createElement(Yt,{location:r.location,revalidation:r.revalidation,component:x,error:E,children:v(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:a}):v()},null)}function ve(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Kt(e){let t=c.useContext(G);return O(t,ve(e)),t}function Vt(e){let t=c.useContext(ie);return O(t,ve(e)),t}function Gt(e){let t=c.useContext(H);return O(t,ve(e)),t}function Ee(e){let t=Gt(e),r=t.matches[t.matches.length-1];return O(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Jt(){return Ee("useRouteId")}function Xt(){let e=c.useContext(ge),t=Vt("useRouteError"),r=Ee("useRouteError");return e!==void 0?e:t.errors?.[r]}function Qt(){let{router:e}=Kt("useNavigate"),t=Ee("useNavigate"),r=c.useRef(!1);return Be(()=>{r.current=!0}),c.useCallback(async(o,u={})=>{M(r.current,je),r.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:t,...u}))},[e,t])}var $e={};function ze(e,t,r){!t&&!$e[e]&&($e[e]=!0,M(!1,r))}c.memo(Zt);function Zt({routes:e,future:t,state:r,unstable_onError:n}){return Ye(e,void 0,r,n,t)}function Mr({to:e,replace:t,state:r,relative:n}){O(J()," may be used only in the context of a component.");let{static:o}=c.useContext(I);M(!o," 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:u}=c.useContext(H),{pathname:s}=Y(),d=We(),l=ye(e,me(u),s,n==="path"),a=JSON.stringify(l);return c.useEffect(()=>{d(JSON.parse(a),{replace:t,state:r,relative:n})},[d,a,n,t,r]),null}function Ir(e){return Ft(e.context)}function er(e){O(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function tr({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:o,static:u=!1}){O(!J(),"You cannot render a inside another . You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),d=c.useMemo(()=>({basename:s,navigator:o,static:u,future:{}}),[s,o,u]);typeof r=="string"&&(r=V(r));let{pathname:l="/",search:a="",hash:f="",state:p=null,key:g="default"}=r,E=c.useMemo(()=>{let C=j(l,s);return C==null?null:{location:{pathname:C,search:a,hash:f,state:p,key:g},navigationType:n}},[s,l,a,f,p,g,n]);return M(E!=null,` is not able to match the URL "${l}${a}${f}" because it does not start with the basename, so the won't render anything.`),E==null?null:c.createElement(I.Provider,{value:d},c.createElement(Z.Provider,{children:t,value:E}))}function Hr({children:e,location:t}){return jt(he(e),t)}function he(e,t=[]){let r=[];return c.Children.forEach(e,(n,o)=>{if(!c.isValidElement(n))return;let u=[...t,o];if(n.type===c.Fragment){r.push.apply(r,he(n.props.children,u));return}O(n.type===er,`[${typeof n.type=="string"?n.type:n.type.name}] is not a component. All component children of must be a or `),O(!n.props.index||!n.props.children,"An index route cannot have child routes.");let s={id:n.props.id||u.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=he(n.props.children,u)),r.push(s)}),r}var ne="get",oe="application/x-www-form-urlencoded";function ue(e){return e!=null&&typeof e.tagName=="string"}function rr(e){return ue(e)&&e.tagName.toLowerCase()==="button"}function nr(e){return ue(e)&&e.tagName.toLowerCase()==="form"}function or(e){return ue(e)&&e.tagName.toLowerCase()==="input"}function ar(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ir(e,t){return e.button===0&&(!t||t==="_self")&&!ar(e)}var re=null;function ur(){if(re===null)try{new FormData(document.createElement("form"),0),re=!1}catch{re=!0}return re}var lr=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function de(e){return e!=null&&!lr.has(e)?(M(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${oe}"`),null):e}function sr(e,t){let r,n,o,u,s;if(nr(e)){let d=e.getAttribute("action");n=d?j(d,t):null,r=e.getAttribute("method")||ne,o=de(e.getAttribute("enctype"))||oe,u=new FormData(e)}else if(rr(e)||or(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a