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