function rt(e,t){for(var r=0;ro[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Lr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ae(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function kr(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var a=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,a.get?a:{enumerable:!0,get:function(){return e[o]}})}),r}var ce={exports:{}},_={};/** * @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 xe;function nt(){if(xe)return _;xe=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),n=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),g=Symbol.iterator;function y(i){return i===null||typeof i!="object"?null:(i=g&&i[g]||i["@@iterator"],typeof i=="function"?i:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p=Object.assign,w={};function v(i,h,x){this.props=i,this.context=h,this.refs=w,this.updater=x||E}v.prototype.isReactComponent={},v.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")},v.prototype.forceUpdate=function(i){this.updater.enqueueForceUpdate(this,i,"forceUpdate")};function m(){}m.prototype=v.prototype;function C(i,h,x){this.props=i,this.context=h,this.refs=w,this.updater=x||E}var R=C.prototype=new m;R.constructor=C,p(R,v.prototype),R.isPureReactComponent=!0;var O=Array.isArray,b={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function N(i,h,x,S,T,k){return x=k.ref,{$$typeof:e,type:i,key:h,ref:x!==void 0?x:null,props:k}}function F(i,h){return N(i.type,h,void 0,void 0,void 0,i.props)}function A(i){return typeof i=="object"&&i!==null&&i.$$typeof===e}function M(i){var h={"=":"=0",":":"=2"};return"$"+i.replace(/[=:]/g,function(x){return h[x]})}var G=/\/+/g;function se(i,h){return typeof i=="object"&&i!==null&&i.key!=null?M(""+i.key):h.toString(36)}function we(){}function Qe(i){switch(i.status){case"fulfilled":return i.value;case"rejected":throw i.reason;default:switch(typeof i.status=="string"?i.then(we,we):(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,x,S,T){var k=typeof i;(k==="undefined"||k==="boolean")&&(i=null);var P=!1;if(i===null)P=!0;else switch(k){case"bigint":case"string":case"number":P=!0;break;case"object":switch(i.$$typeof){case e:case t:P=!0;break;case d:return P=i._init,K(P(i._payload),h,x,S,T)}}if(P)return T=T(i),P=S===""?"."+se(i,0):S,O(T)?(x="",P!=null&&(x=P.replace(G,"$&/")+"/"),K(T,h,x,"",function(tt){return tt})):T!=null&&(A(T)&&(T=F(T,x+(T.key==null||i&&i.key===T.key?"":(""+T.key).replace(G,"$&/")+"/")+P)),h.push(T)),1;P=0;var z=S===""?".":S+":";if(O(i))for(var $=0;$"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),fe.exports=ot(),fe.exports}var J={},Pe;function ut(){if(Pe)return J;Pe=1,Object.defineProperty(J,"__esModule",{value:!0}),J.parse=s,J.serialize=n;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,o=/^[\u0020-\u003A\u003D-\u007E]*$/,a=Object.prototype.toString,u=(()=>{const y=function(){};return y.prototype=Object.create(null),y})();function s(y,E){const p=new u,w=y.length;if(w<2)return p;const v=(E==null?void 0:E.decode)||d;let m=0;do{const C=y.indexOf("=",m);if(C===-1)break;const R=y.indexOf(";",m),O=R===-1?w:R;if(C>O){m=y.lastIndexOf(";",C-1)+1;continue}const b=c(y,m,C),U=l(y,C,b),N=y.slice(b,U);if(p[N]===void 0){let F=c(y,C+1,O),A=l(y,O,F);const M=v(y.slice(F,A));p[N]=M}m=O+1}while(mp;){const w=y.charCodeAt(--E);if(w!==32&&w!==9)return E+1}return p}function n(y,E,p){const w=(p==null?void 0:p.encode)||encodeURIComponent;if(!e.test(y))throw new TypeError(`argument name is invalid: ${y}`);const v=w(E);if(!t.test(v))throw new TypeError(`argument val is invalid: ${E}`);let m=y+"="+v;if(!p)return m;if(p.maxAge!==void 0){if(!Number.isInteger(p.maxAge))throw new TypeError(`option maxAge is invalid: ${p.maxAge}`);m+="; Max-Age="+p.maxAge}if(p.domain){if(!r.test(p.domain))throw new TypeError(`option domain is invalid: ${p.domain}`);m+="; Domain="+p.domain}if(p.path){if(!o.test(p.path))throw new TypeError(`option path is invalid: ${p.path}`);m+="; Path="+p.path}if(p.expires){if(!g(p.expires)||!Number.isFinite(p.expires.valueOf()))throw new TypeError(`option expires is invalid: ${p.expires}`);m+="; Expires="+p.expires.toUTCString()}if(p.httpOnly&&(m+="; HttpOnly"),p.secure&&(m+="; Secure"),p.partitioned&&(m+="; Partitioned"),p.priority)switch(typeof p.priority=="string"?p.priority.toLowerCase():void 0){case"low":m+="; Priority=Low";break;case"medium":m+="; Priority=Medium";break;case"high":m+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${p.priority}`)}if(p.sameSite)switch(typeof p.sameSite=="string"?p.sameSite.toLowerCase():p.sameSite){case!0:case"strict":m+="; SameSite=Strict";break;case"lax":m+="; SameSite=Lax";break;case"none":m+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${p.sameSite}`)}return m}function d(y){if(y.indexOf("%")===-1)return y;try{return decodeURIComponent(y)}catch{return y}}function g(y){return a.call(y)==="[object Date]"}return J}ut();/** * react-router v7.3.0 * * 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 Te="popstate";function lt(e={}){function t(a,u){let{pathname:s="/",search:c="",hash:l=""}=Y(a.location.hash.substring(1));return!s.startsWith("/")&&!s.startsWith(".")&&(s="/"+s),pe("",{pathname:s,search:c,hash:l},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function r(a,u){let s=a.document.querySelector("base"),c="";if(s&&s.getAttribute("href")){let l=a.location.href,n=l.indexOf("#");c=n===-1?l:l.slice(0,n)}return c+"#"+(typeof u=="string"?u:Q(u))}function o(a,u){I(a.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(u)})`)}return ct(t,r,o,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 st(){return Math.random().toString(36).substring(2,10)}function Oe(e,t){return{usr:e.state,key:e.key,idx:t}}function pe(e,t,r=null,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Y(t):t,state:r,key:t&&t.key||o||st()}}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 Y(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let o=e.indexOf("?");o>=0&&(t.search=e.substring(o),e=e.substring(0,o)),e&&(t.pathname=e)}return t}function ct(e,t,r,o={}){let{window:a=document.defaultView,v5Compat:u=!1}=o,s=a.history,c="POP",l=null,n=d();n==null&&(n=0,s.replaceState({...s.state,idx:n},""));function d(){return(s.state||{idx:null}).idx}function g(){c="POP";let v=d(),m=v==null?null:v-n;n=v,l&&l({action:c,location:w.location,delta:m})}function y(v,m){c="PUSH";let C=pe(w.location,v,m);r&&r(C,v),n=d()+1;let R=Oe(C,n),O=w.createHref(C);try{s.pushState(R,"",O)}catch(b){if(b instanceof DOMException&&b.name==="DataCloneError")throw b;a.location.assign(O)}u&&l&&l({action:c,location:w.location,delta:1})}function E(v,m){c="REPLACE";let C=pe(w.location,v,m);r&&r(C,v),n=d();let R=Oe(C,n),O=w.createHref(C);s.replaceState(R,"",O),u&&l&&l({action:c,location:w.location,delta:0})}function p(v){let m=a.location.origin!=="null"?a.location.origin:a.location.href,C=typeof v=="string"?v:Q(v);return C=C.replace(/ $/,"%20"),L(m,`No window.location.(origin|href) available to create URL for href: ${C}`),new URL(C,m)}let w={get action(){return c},get location(){return e(a,s)},listen(v){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(Te,g),l=v,()=>{a.removeEventListener(Te,g),l=null}},createHref(v){return t(a,v)},createURL:p,encodeLocation(v){let m=p(v);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:y,replace:E,go(v){return s.go(v)}};return w}function Ne(e,t,r="/"){return ft(e,t,r,!1)}function ft(e,t,r,o){let a=typeof t=="string"?Y(t):t,u=B(a.pathname||"/",r);if(u==null)return null;let s=Ie(e);dt(s);let c=null;for(let l=0;c==null&&l{let l={relativePath:c===void 0?u.path||"":c,caseSensitive:u.caseSensitive===!0,childrenIndex:s,route:u};l.relativePath.startsWith("/")&&(L(l.relativePath.startsWith(o),`Absolute route path "${l.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(o.length));let n=j([o,l.relativePath]),d=r.concat(l);u.children&&u.children.length>0&&(L(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${n}".`),Ie(u.children,t,d,n)),!(u.path==null&&!u.index)&&t.push({path:n,score:Et(n,u.index),routesMeta:d})};return e.forEach((u,s)=>{var c;if(u.path===""||!((c=u.path)!=null&&c.includes("?")))a(u,s);else for(let l of Me(u.path))a(u,s,l)}),t}function Me(e){let t=e.split("/");if(t.length===0)return[];let[r,...o]=t,a=r.endsWith("?"),u=r.replace(/\?$/,"");if(o.length===0)return a?[u,""]:[u];let s=Me(o.join("/")),c=[];return c.push(...s.map(l=>l===""?u:[u,l].join("/"))),a&&c.push(...s),c.map(l=>e.startsWith("/")&&l===""?"/":l)}function dt(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Rt(t.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}var ht=/^:[\w-]+$/,pt=3,mt=2,yt=1,gt=10,vt=-2,Le=e=>e==="*";function Et(e,t){let r=e.split("/"),o=r.length;return r.some(Le)&&(o+=vt),t&&(o+=mt),r.filter(a=>!Le(a)).reduce((a,u)=>a+(ht.test(u)?pt:u===""?yt:gt),o)}function Rt(e,t){return e.length===t.length&&e.slice(0,-1).every((o,a)=>o===t[a])?e[e.length-1]-t[t.length-1]:0}function wt(e,t,r=!1){let{routesMeta:o}=e,a={},u="/",s=[];for(let c=0;c{if(d==="*"){let p=c[y]||"";s=u.slice(0,u.length-p.length).replace(/(.)\/+$/,"$1")}const E=c[y];return g&&!E?n[d]=void 0:n[d]=(E||"").replace(/%2F/g,"/"),n},{}),pathname:u,pathnameBase:s,pattern:e}}function Ct(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 o=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,c,l)=>(o.push({paramName:c,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(o.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),o]}function xt(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 B(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,o=e.charAt(r);return o&&o!=="/"?null:e.slice(r)||"/"}function St(e,t="/"){let{pathname:r,search:o="",hash:a=""}=typeof e=="string"?Y(e):e;return{pathname:r?r.startsWith("/")?r:_t(r,t):t,search:Tt(o),hash:Ot(a)}}function _t(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 de(e,t,r,o){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(o)}]. 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 bt(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function He(e){let t=bt(e);return t.map((r,o)=>o===t.length-1?r.pathname:r.pathnameBase)}function Ue(e,t,r,o=!1){let a;typeof e=="string"?a=Y(e):(a={...e},L(!a.pathname||!a.pathname.includes("?"),de("?","pathname","search",a)),L(!a.pathname||!a.pathname.includes("#"),de("#","pathname","hash",a)),L(!a.search||!a.search.includes("#"),de("#","search","hash",a)));let u=e===""||a.pathname==="",s=u?"/":a.pathname,c;if(s==null)c=r;else{let g=t.length-1;if(!o&&s.startsWith("..")){let y=s.split("/");for(;y[0]==="..";)y.shift(),g-=1;a.pathname=y.join("/")}c=g>=0?t[g]:"/"}let l=St(a,c),n=s&&s!=="/"&&s.endsWith("/"),d=(u||s===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(n||d)&&(l.pathname+="/"),l}var j=e=>e.join("/").replace(/\/\/+/g,"/"),Pt=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Tt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Ot=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Lt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var Fe=["POST","PUT","PATCH","DELETE"];new Set(Fe);var kt=["GET",...Fe];new Set(kt);var V=f.createContext(null);V.displayName="DataRouter";var ue=f.createContext(null);ue.displayName="DataRouterState";var je=f.createContext({isTransitioning:!1});je.displayName="ViewTransition";var $t=f.createContext(new Map);$t.displayName="Fetchers";var At=f.createContext(null);At.displayName="Await";var H=f.createContext(null);H.displayName="Navigation";var Z=f.createContext(null);Z.displayName="Location";var W=f.createContext({outlet:null,matches:[],isDataRoute:!1});W.displayName="Route";var ye=f.createContext(null);ye.displayName="RouteError";function Dt(e,{relative:t}={}){L(ee(),"useHref() may be used only in the context of a component.");let{basename:r,navigator:o}=f.useContext(H),{hash:a,pathname:u,search:s}=te(e,{relative:t}),c=u;return r!=="/"&&(c=u==="/"?r:j([r,u])),o.createHref({pathname:c,search:s,hash:a})}function ee(){return f.useContext(Z)!=null}function q(){return L(ee(),"useLocation() may be used only in the context of a component."),f.useContext(Z).location}var Be="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function We(e){f.useContext(H).static||f.useLayoutEffect(e)}function Nt(){let{isDataRoute:e}=f.useContext(W);return e?Vt():It()}function It(){L(ee(),"useNavigate() may be used only in the context of a component.");let e=f.useContext(V),{basename:t,navigator:r}=f.useContext(H),{matches:o}=f.useContext(W),{pathname:a}=q(),u=JSON.stringify(He(o)),s=f.useRef(!1);return We(()=>{s.current=!0}),f.useCallback((l,n={})=>{if(I(s.current,Be),!s.current)return;if(typeof l=="number"){r.go(l);return}let d=Ue(l,JSON.parse(u),a,n.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:j([t,d.pathname])),(n.replace?r.replace:r.push)(d,n.state,n)},[t,r,u,a,e])}f.createContext(null);function te(e,{relative:t}={}){let{matches:r}=f.useContext(W),{pathname:o}=q(),a=JSON.stringify(He(r));return f.useMemo(()=>Ue(e,JSON.parse(a),o,t==="path"),[e,a,o,t])}function Mt(e,t){return ze(e,t)}function ze(e,t,r,o){var C;L(ee(),"useRoutes() may be used only in the context of a component.");let{navigator:a,static:u}=f.useContext(H),{matches:s}=f.useContext(W),c=s[s.length-1],l=c?c.params:{},n=c?c.pathname:"/",d=c?c.pathnameBase:"/",g=c&&c.route;{let R=g&&g.path||"";Ye(n,!g||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${n}" (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=q(),E;if(t){let R=typeof t=="string"?Y(t):t;L(d==="/"||((C=R.pathname)==null?void 0:C.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 "${R.pathname}" was given in the \`location\` prop.`),E=R}else E=y;let p=E.pathname||"/",w=p;if(d!=="/"){let R=d.replace(/^\//,"").split("/");w="/"+p.replace(/^\//,"").split("/").slice(R.length).join("/")}let v=!u&&r&&r.matches&&r.matches.length>0?r.matches:Ne(e,{pathname:w});I(g||v!=null,`No routes matched location "${E.pathname}${E.search}${E.hash}" `),I(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.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=Bt(v&&v.map(R=>Object.assign({},R,{params:Object.assign({},l,R.params),pathname:j([d,a.encodeLocation?a.encodeLocation(R.pathname).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?d:j([d,a.encodeLocation?a.encodeLocation(R.pathnameBase).pathname:R.pathnameBase])})),s,r,o);return t&&m?f.createElement(Z.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...E},navigationType:"POP"}},m):m}function Ht(){let e=Kt(),t=Lt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:o},u={padding:"2px 4px",backgroundColor:o},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=f.createElement(f.Fragment,null,f.createElement("p",null,"💿 Hey developer 👋"),f.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",f.createElement("code",{style:u},"ErrorBoundary")," or"," ",f.createElement("code",{style:u},"errorElement")," prop on your route.")),f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},t),r?f.createElement("pre",{style:a},r):null,s)}var Ut=f.createElement(Ht,null),Ft=class extends f.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){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?f.createElement(W.Provider,{value:this.props.routeContext},f.createElement(ye.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function jt({routeContext:e,match:t,children:r}){let o=f.useContext(V);return o&&o.static&&o.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=t.route.id),f.createElement(W.Provider,{value:e},r)}function Bt(e,t=[],r=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 a=e,u=r==null?void 0:r.errors;if(u!=null){let l=a.findIndex(n=>n.route.id&&(u==null?void 0:u[n.route.id])!==void 0);L(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),a=a.slice(0,Math.min(a.length,l+1))}let s=!1,c=-1;if(r)for(let l=0;l=0?a=a.slice(0,c+1):a=[a[0]];break}}}return a.reduceRight((l,n,d)=>{let g,y=!1,E=null,p=null;r&&(g=u&&n.route.id?u[n.route.id]:void 0,E=n.route.errorElement||Ut,s&&(c<0&&d===0?(Ye("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,p=null):c===d&&(y=!0,p=n.route.hydrateFallbackElement||null)));let w=t.concat(a.slice(0,d+1)),v=()=>{let m;return g?m=E:y?m=p:n.route.Component?m=f.createElement(n.route.Component,null):n.route.element?m=n.route.element:m=l,f.createElement(jt,{match:n,routeContext:{outlet:l,matches:w,isDataRoute:r!=null},children:m})};return r&&(n.route.ErrorBoundary||n.route.errorElement||d===0)?f.createElement(Ft,{location:r.location,revalidation:r.revalidation,component:E,error:g,children:v(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):v()},null)}function ge(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Wt(e){let t=f.useContext(V);return L(t,ge(e)),t}function zt(e){let t=f.useContext(ue);return L(t,ge(e)),t}function Yt(e){let t=f.useContext(W);return L(t,ge(e)),t}function ve(e){let t=Yt(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 qt(){return ve("useRouteId")}function Kt(){var o;let e=f.useContext(ye),t=zt("useRouteError"),r=ve("useRouteError");return e!==void 0?e:(o=t.errors)==null?void 0:o[r]}function Vt(){let{router:e}=Wt("useNavigate"),t=ve("useNavigate"),r=f.useRef(!1);return We(()=>{r.current=!0}),f.useCallback(async(a,u={})=>{I(r.current,Be),r.current&&(typeof a=="number"?e.navigate(a):await e.navigate(a,{fromRouteId:t,...u}))},[e,t])}var ke={};function Ye(e,t,r){!t&&!ke[e]&&(ke[e]=!0,I(!1,r))}f.memo(Gt);function Gt({routes:e,future:t,state:r}){return ze(e,void 0,r,t)}function Jt(e){L(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function Xt({basename:e="/",children:t=null,location:r,navigationType:o="POP",navigator:a,static:u=!1}){L(!ee(),"You cannot render a inside another . You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),c=f.useMemo(()=>({basename:s,navigator:a,static:u,future:{}}),[s,a,u]);typeof r=="string"&&(r=Y(r));let{pathname:l="/",search:n="",hash:d="",state:g=null,key:y="default"}=r,E=f.useMemo(()=>{let p=B(l,s);return p==null?null:{location:{pathname:p,search:n,hash:d,state:g,key:y},navigationType:o}},[s,l,n,d,g,y,o]);return I(E!=null,` is not able to match the URL "${l}${n}${d}" because it does not start with the basename, so the won't render anything.`),E==null?null:f.createElement(H.Provider,{value:c},f.createElement(Z.Provider,{children:t,value:E}))}function Ar({children:e,location:t}){return Mt(me(e),t)}function me(e,t=[]){let r=[];return f.Children.forEach(e,(o,a)=>{if(!f.isValidElement(o))return;let u=[...t,a];if(o.type===f.Fragment){r.push.apply(r,me(o.props.children,u));return}L(o.type===Jt,`[${typeof o.type=="string"?o.type:o.type.name}] is not a component. All component children of must be a or `),L(!o.props.index||!o.props.children,"An index route cannot have child routes.");let s={id:o.props.id||u.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(s.children=me(o.props.children,u)),r.push(s)}),r}var ae="get",oe="application/x-www-form-urlencoded";function le(e){return e!=null&&typeof e.tagName=="string"}function Qt(e){return le(e)&&e.tagName.toLowerCase()==="button"}function Zt(e){return le(e)&&e.tagName.toLowerCase()==="form"}function er(e){return le(e)&&e.tagName.toLowerCase()==="input"}function tr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function rr(e,t){return e.button===0&&(!t||t==="_self")&&!tr(e)}var ne=null;function nr(){if(ne===null)try{new FormData(document.createElement("form"),0),ne=!1}catch{ne=!0}return ne}var ar=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function he(e){return e!=null&&!ar.has(e)?(I(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${oe}"`),null):e}function or(e,t){let r,o,a,u,s;if(Zt(e)){let c=e.getAttribute("action");o=c?B(c,t):null,r=e.getAttribute("method")||ae,a=he(e.getAttribute("enctype"))||oe,u=new FormData(e)}else if(Qt(e)||er(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a