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