function ut(e,t){for(var r=0;rn[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function lt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var se={exports:{}},w={};var Se;function st(){if(Se)return w;Se=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),y=Symbol.iterator;function v(i){return i===null||typeof i!="object"?null:(i=y&&i[y]||i["@@iterator"],typeof i=="function"?i:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,g={};function R(i,h,_){this.props=i,this.context=h,this.refs=g,this.updater=_||x}R.prototype.isReactComponent={},R.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")},R.prototype.forceUpdate=function(i){this.updater.enqueueForceUpdate(this,i,"forceUpdate")};function m(){}m.prototype=R.prototype;function S(i,h,_){this.props=i,this.context=h,this.refs=g,this.updater=_||x}var k=S.prototype=new m;k.constructor=S,E(k,R.prototype),k.isPureReactComponent=!0;var $=Array.isArray;function I(){}var P={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function U(i,h,_){var C=_.ref;return{$$typeof:e,type:i,key:h,ref:C!==void 0?C:null,props:_}}function z(i,h){return U(i.type,h,i.props)}function ue(i){return typeof i=="object"&&i!==null&&i.$$typeof===e}function rt(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?rt(""+i.key):h.toString(36)}function nt(i){switch(i.status){case"fulfilled":return i.value;case"rejected":throw i.reason;default:switch(typeof i.status=="string"?i.then(I,I):(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 q(i,h,_,C,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 d:return L=i._init,q(L(i._payload),h,_,C,b)}}if(L)return b=b(i),L=C===""?"."+le(i,0):C,$(b)?(_="",L!=null&&(_=L.replace(Ce,"$&/")+"/"),q(b,h,_,"",function(it){return it})):b!=null&&(ue(b)&&(b=z(b,_+(b.key==null||i&&i.key===b.key?"":(""+b.key).replace(Ce,"$&/")+"/")+L)),h.push(b)),1;L=0;var H=C===""?".":C+":";if($(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=ft(),ce.exports}var Te="popstate";function pt(e={}){function t(n,a){let{pathname:o,search:l,hash:f}=n.location;return he("",{pathname:o,search:l,hash:f},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:J(a)}return mt(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 ht(){return Math.random().toString(36).substring(2,10)}function Le(e,t){return{usr:e.state,key:e.key,idx:t}}function he(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?K(t):t,state:r,key:t&&t.key||n||ht()}}function J({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 K(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 mt(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,l=a.history,f="POP",s=null,u=d();u==null&&(u=0,l.replaceState({...l.state,idx:u},""));function d(){return(l.state||{idx:null}).idx}function p(){f="POP";let g=d(),R=g==null?null:g-u;u=g,s&&s({action:f,location:E.location,delta:R})}function y(g,R){f="PUSH";let m=he(E.location,g,R);u=d()+1;let S=Le(m,u),k=E.createHref(m);try{l.pushState(S,"",k)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;a.location.assign(k)}o&&s&&s({action:f,location:E.location,delta:1})}function v(g,R){f="REPLACE";let m=he(E.location,g,R);u=d();let S=Le(m,u),k=E.createHref(m);l.replaceState(S,"",k),o&&s&&s({action:f,location:E.location,delta:0})}function x(g){return yt(g)}let E={get action(){return f},get location(){return e(a,l)},listen(g){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(Te,p),s=g,()=>{a.removeEventListener(Te,p),s=null}},createHref(g){return t(a,g)},createURL:x,encodeLocation(g){let R=x(g);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:y,replace:v,go(g){return l.go(g)}};return E}function yt(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:J(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function Ne(e,t,r="/"){return gt(e,t,r,!1)}function gt(e,t,r,n){let a=typeof t=="string"?K(t):t,o=W(a.pathname||"/",r);if(o==null)return null;let l=Ie(e);vt(l);let f=null;for(let s=0;f==null&&s{let d={relativePath:u===void 0?l.path||"":u,caseSensitive:l.caseSensitive===!0,childrenIndex:f,route:l};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(n)&&s)return;O(d.relativePath.startsWith(n),`Absolute route path "${d.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(n.length)}let p=B([n,d.relativePath]),y=r.concat(d);l.children&&l.children.length>0&&(O(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),Ie(l.children,t,y,p,s)),!(l.path==null&&!l.index)&&t.push({path:p,score:xt(p,l.index),routesMeta:y})};return e.forEach((l,f)=>{if(l.path===""||!l.path?.includes("?"))o(l,f);else for(let s of Me(l.path))o(l,f,!0,s)}),t}function Me(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let l=Me(n.join("/")),f=[];return f.push(...l.map(s=>s===""?o:[o,s].join("/"))),a&&f.push(...l),f.map(s=>e.startsWith("/")&&s===""?"/":s)}function vt(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Pt(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var Rt=/^:[\w-]+$/,Et=3,wt=2,Ct=1,_t=10,St=-2,Oe=e=>e==="*";function xt(e,t){let r=e.split("/"),n=r.length;return r.some(Oe)&&(n+=St),t&&(n+=wt),r.filter(a=>!Oe(a)).reduce((a,o)=>a+(Rt.test(o)?Et:o===""?Ct:_t),n)}function Pt(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function bt(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",l=[];for(let f=0;f{if(d==="*"){let x=f[y]||"";l=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const v=f[y];return p&&!v?u[d]=void 0:u[d]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:l,pattern:e}}function Tt(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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,f,s)=>(n.push({paramName:f,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Lt(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 W(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 Ot=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function $t(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?K(e):e,o;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?o=$e(r.substring(1),"/"):o=$e(r,t)):o=t,{pathname:o,search:Dt(n),hash:Nt(a)}}function $e(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),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 kt(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Ue(e){let t=kt(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function He(e,t,r,n=!1){let a;typeof e=="string"?a=K(e):(a={...e},O(!a.pathname||!a.pathname.includes("?"),fe("?","pathname","search",a)),O(!a.pathname||!a.pathname.includes("#"),fe("#","pathname","hash",a)),O(!a.search||!a.search.includes("#"),fe("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,f;if(l==null)f=r;else{let p=t.length-1;if(!n&&l.startsWith("..")){let y=l.split("/");for(;y[0]==="..";)y.shift(),p-=1;a.pathname=y.join("/")}f=p>=0?t[p]:"/"}let s=$t(a,f),u=l&&l!=="/"&&l.endsWith("/"),d=(o||l===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||d)&&(s.pathname+="/"),s}var B=e=>e.join("/").replace(/\/\/+/g,"/"),At=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Dt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Nt=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,It=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Mt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Ut(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Fe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function je(e,t){let r=e;if(typeof r!="string"||!Ot.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(Fe)try{let o=new URL(window.location.href),l=r.startsWith("//")?new URL(o.protocol+r):new URL(r),f=W(l.pathname,t);l.origin===o.origin&&f!=null?r=f+l.search+l.hash:a=!0}catch{M(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:a,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Be=["POST","PUT","PATCH","DELETE"];new Set(Be);var Ht=["GET",...Be];new Set(Ht);var G=c.createContext(null);G.displayName="DataRouter";var oe=c.createContext(null);oe.displayName="DataRouterState";var Ft=c.createContext(!1),We=c.createContext({isTransitioning:!1});We.displayName="ViewTransition";var jt=c.createContext(new Map);jt.displayName="Fetchers";var Bt=c.createContext(null);Bt.displayName="Await";var N=c.createContext(null);N.displayName="Navigation";var X=c.createContext(null);X.displayName="Location";var F=c.createContext({outlet:null,matches:[],isDataRoute:!1});F.displayName="Route";var ge=c.createContext(null);ge.displayName="RouteError";var Ye="REACT_ROUTER_ERROR",Wt="REDIRECT",Yt="ROUTE_ERROR_RESPONSE";function zt(e){if(e.startsWith(`${Ye}:${Wt}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function qt(e){if(e.startsWith(`${Ye}:${Yt}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new It(t.status,t.statusText,t.data)}catch{}}function Kt(e,{relative:t}={}){O(Q(),"useHref() may be used only in the context of a component.");let{basename:r,navigator:n}=c.useContext(N),{hash:a,pathname:o,search:l}=Z(e,{relative:t}),f=o;return r!=="/"&&(f=o==="/"?r:B([r,o])),n.createHref({pathname:f,search:l,hash:a})}function Q(){return c.useContext(X)!=null}function Y(){return O(Q(),"useLocation() may be used only in the context of a component."),c.useContext(X).location}var ze="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function qe(e){c.useContext(N).static||c.useLayoutEffect(e)}function Ke(){let{isDataRoute:e}=c.useContext(F);return e?ir():Gt()}function Gt(){O(Q(),"useNavigate() may be used only in the context of a component.");let e=c.useContext(G),{basename:t,navigator:r}=c.useContext(N),{matches:n}=c.useContext(F),{pathname:a}=Y(),o=JSON.stringify(Ue(n)),l=c.useRef(!1);return qe(()=>{l.current=!0}),c.useCallback((s,u={})=>{if(M(l.current,ze),!l.current)return;if(typeof s=="number"){r.go(s);return}let d=He(s,JSON.parse(o),a,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:B([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,o,a,e])}c.createContext(null);function Yr(){let{matches:e}=c.useContext(F),t=e[e.length-1];return t?t.params:{}}function Z(e,{relative:t}={}){let{matches:r}=c.useContext(F),{pathname:n}=Y(),a=JSON.stringify(Ue(r));return c.useMemo(()=>He(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function Vt(e,t){return Ge(e,t)}function Ge(e,t,r,n,a){O(Q(),"useRoutes() may be used only in the context of a component.");let{navigator:o}=c.useContext(N),{matches:l}=c.useContext(F),f=l[l.length-1],s=f?f.params:{},u=f?f.pathname:"/",d=f?f.pathnameBase:"/",p=f&&f.route;{let m=p&&p.path||"";Je(u,!p||m.endsWith("*")||m.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${u}" (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 y=Y(),v;if(t){let m=typeof t=="string"?K(t):t;O(d==="/"||m.pathname?.startsWith(d),`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 "${d}" but pathname "${m.pathname}" was given in the \`location\` prop.`),v=m}else v=y;let x=v.pathname||"/",E=x;if(d!=="/"){let m=d.replace(/^\//,"").split("/");E="/"+x.replace(/^\//,"").split("/").slice(m.length).join("/")}let g=Ne(e,{pathname:E});M(p||g!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),M(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.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 R=er(g&&g.map(m=>Object.assign({},m,{params:Object.assign({},s,m.params),pathname:B([d,o.encodeLocation?o.encodeLocation(m.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?d:B([d,o.encodeLocation?o.encodeLocation(m.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathnameBase])})),l,r,n,a);return t&&R?c.createElement(X.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},R):R}function Jt(){let e=or(),t=Mt(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)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=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:o},"ErrorBoundary")," or"," ",c.createElement("code",{style:o},"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:a},r):null,l)}var Xt=c.createElement(Jt,null),Ve=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(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=qt(e.digest);r&&(e=r)}let t=e!==void 0?c.createElement(F.Provider,{value:this.props.routeContext},c.createElement(ge.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?c.createElement(Qt,{error:e},t):t}};Ve.contextType=Ft;var de=new WeakMap;function Qt({children:e,error:t}){let{basename:r}=c.useContext(N);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=zt(t.digest);if(n){let a=de.get(t);if(a)throw a;let o=je(n.location,r);if(Fe&&!de.get(t))if(o.isExternal||n.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:n.replace}));throw de.set(t,l),l}return c.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}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(F.Provider,{value:e},r)}function er(e,t=[],r=null,n=null,a=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 o=e,l=r?.errors;if(l!=null){let d=o.findIndex(p=>p.route.id&&l?.[p.route.id]!==void 0);O(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),o=o.slice(0,Math.min(o.length,d+1))}let f=!1,s=-1;if(r)for(let d=0;d=0?o=o.slice(0,s+1):o=[o[0]];break}}}let u=r&&n?(d,p)=>{n(d,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Ut(r.matches),errorInfo:p})}:void 0;return o.reduceRight((d,p,y)=>{let v,x=!1,E=null,g=null;r&&(v=l&&p.route.id?l[p.route.id]:void 0,E=p.route.errorElement||Xt,f&&(s<0&&y===0?(Je("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,g=null):s===y&&(x=!0,g=p.route.hydrateFallbackElement||null)));let R=t.concat(o.slice(0,y+1)),m=()=>{let S;return v?S=E:x?S=g:p.route.Component?S=c.createElement(p.route.Component,null):p.route.element?S=p.route.element:S=d,c.createElement(Zt,{match:p,routeContext:{outlet:d,matches:R,isDataRoute:r!=null},children:S})};return r&&(p.route.ErrorBoundary||p.route.errorElement||y===0)?c.createElement(Ve,{location:r.location,revalidation:r.revalidation,component:E,error:v,children:m(),routeContext:{outlet:null,matches:R,isDataRoute:!0},onError:u}):m()},null)}function ve(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function tr(e){let t=c.useContext(G);return O(t,ve(e)),t}function rr(e){let t=c.useContext(oe);return O(t,ve(e)),t}function nr(e){let t=c.useContext(F);return O(t,ve(e)),t}function Re(e){let t=nr(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 ar(){return Re("useRouteId")}function or(){let e=c.useContext(ge),t=rr("useRouteError"),r=Re("useRouteError");return e!==void 0?e:t.errors?.[r]}function ir(){let{router:e}=tr("useNavigate"),t=Re("useNavigate"),r=c.useRef(!1);return qe(()=>{r.current=!0}),c.useCallback(async(a,o={})=>{M(r.current,ze),r.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var ke={};function Je(e,t,r){!t&&!ke[e]&&(ke[e]=!0,M(!1,r))}c.memo(ur);function ur({routes:e,future:t,state:r,onError:n}){return Ge(e,void 0,r,n,t)}function lr(e){O(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function sr({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1,unstable_useTransitions:l}){O(!Q(),"You cannot render a inside another . You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),s=c.useMemo(()=>({basename:f,navigator:a,static:o,unstable_useTransitions:l,future:{}}),[f,a,o,l]);typeof r=="string"&&(r=K(r));let{pathname:u="/",search:d="",hash:p="",state:y=null,key:v="default"}=r,x=c.useMemo(()=>{let E=W(u,f);return E==null?null:{location:{pathname:E,search:d,hash:p,state:y,key:v},navigationType:n}},[f,u,d,p,y,v,n]);return M(x!=null,` is not able to match the URL "${u}${d}${p}" because it does not start with the basename, so the won't render anything.`),x==null?null:c.createElement(N.Provider,{value:s},c.createElement(X.Provider,{children:t,value:x}))}function zr({children:e,location:t}){return Vt(me(e),t)}function me(e,t=[]){let r=[];return c.Children.forEach(e,(n,a)=>{if(!c.isValidElement(n))return;let o=[...t,a];if(n.type===c.Fragment){r.push.apply(r,me(n.props.children,o));return}O(n.type===lr,`[${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 l={id:n.props.id||o.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&&(l.children=me(n.props.children,o)),r.push(l)}),r}var re="get",ne="application/x-www-form-urlencoded";function ie(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function cr(e){return ie(e)&&e.tagName.toLowerCase()==="button"}function fr(e){return ie(e)&&e.tagName.toLowerCase()==="form"}function dr(e){return ie(e)&&e.tagName.toLowerCase()==="input"}function pr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function hr(e,t){return e.button===0&&(!t||t==="_self")&&!pr(e)}function ye(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function mr(e,t){let r=ye(e);return t&&t.forEach((n,a)=>{r.has(a)||t.getAll(a).forEach(o=>{r.append(a,o)})}),r}var te=null;function yr(){if(te===null)try{new FormData(document.createElement("form"),0),te=!1}catch{te=!0}return te}var gr=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function pe(e){return e!=null&&!gr.has(e)?(M(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${ne}"`),null):e}function vr(e,t){let r,n,a,o,l;if(fr(e)){let f=e.getAttribute("action");n=f?W(f,t):null,r=e.getAttribute("method")||re,a=pe(e.getAttribute("enctype"))||ne,o=new FormData(e)}else if(cr(e)||dr(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a