import{r as Le,g as ke,a as $e}from"./react-vendor-CqRd3GwO.js";var i=Le();const Qt=ke(i);/** * react-router v7.9.1 * * 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 le="popstate";function Fe(e={}){function t(n,a){let{pathname:o,search:l,hash:s}=n.location;return G("",{pathname:o,search:l,hash:s},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:O(a)}return De(t,r,null,e)}function x(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function P(e,t){if(!e)try{throw new Error(t)}catch{}}function Ne(){return Math.random().toString(36).substring(2,10)}function ie(e,t){return{usr:e.state,key:e.key,idx:t}}function G(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?D(t):t,state:r,key:t&&t.key||n||Ne()}}function O({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 D(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 De(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,l=a.history,s="POP",u=null,c=f();c==null&&(c=0,l.replaceState({...l.state,idx:c},""));function f(){return(l.state||{idx:null}).idx}function d(){s="POP";let p=f(),m=p==null?null:p-c;c=p,u&&u({action:s,location:w.location,delta:m})}function y(p,m){s="PUSH";let h=G(w.location,p,m);c=f()+1;let R=ie(h,c),E=w.createHref(h);try{l.pushState(R,"",E)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;a.location.assign(E)}o&&u&&u({action:s,location:w.location,delta:1})}function g(p,m){s="REPLACE";let h=G(w.location,p,m);c=f();let R=ie(h,c),E=w.createHref(h);l.replaceState(R,"",E),o&&u&&u({action:s,location:w.location,delta:0})}function v(p){return Ie(p)}let w={get action(){return s},get location(){return e(a,l)},listen(p){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(le,d),u=p,()=>{a.removeEventListener(le,d),u=null}},createHref(p){return t(a,p)},createURL:v,encodeLocation(p){let m=v(p);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:y,replace:g,go(p){return l.go(p)}};return w}function Ie(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),x(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:O(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function fe(e,t,r="/"){return Te(e,t,r,!1)}function Te(e,t,r,n){let a=typeof t=="string"?D(t):t,o=$(a.pathname||"/",r);if(o==null)return null;let l=de(e);Be(l);let s=null;for(let u=0;s==null&&u{let f={relativePath:c===void 0?l.path||"":c,caseSensitive:l.caseSensitive===!0,childrenIndex:s,route:l};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(n)&&u)return;x(f.relativePath.startsWith(n),`Absolute route path "${f.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(n.length)}let d=k([n,f.relativePath]),y=r.concat(f);l.children&&l.children.length>0&&(x(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),de(l.children,t,y,d,u)),!(l.path==null&&!l.index)&&t.push({path:d,score:_e(d,l.index),routesMeta:y})};return e.forEach((l,s)=>{if(l.path===""||!l.path?.includes("?"))o(l,s);else for(let u of he(l.path))o(l,s,!0,u)}),t}function he(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=he(n.join("/")),s=[];return s.push(...l.map(u=>u===""?o:[o,u].join("/"))),a&&s.push(...l),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function Be(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Ve(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var Me=/^:[\w-]+$/,Oe=3,Ae=2,We=1,Ue=10,He=-2,ue=e=>e==="*";function _e(e,t){let r=e.split("/"),n=r.length;return r.some(ue)&&(n+=He),t&&(n+=Ae),r.filter(a=>!ue(a)).reduce((a,o)=>a+(Me.test(o)?Oe:o===""?We:Ue),n)}function Ve(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 ze(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",l=[];for(let s=0;s{if(f==="*"){let v=s[y]||"";l=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const g=s[y];return d&&!g?c[f]=void 0:c[f]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:l,pattern:e}}function je(e,t=!1,r=!0){P(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,s,u)=>(n.push({paramName:s,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)")).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 Je(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return P(!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 $(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)||"/"}function Ke(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?D(e):e;return{pathname:r?r.startsWith("/")?r:Ye(r,t):t,search:Xe(n),hash:Qe(a)}}function Ye(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 Y(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 qe(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Q(e){let t=qe(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function Z(e,t,r,n=!1){let a;typeof e=="string"?a=D(e):(a={...e},x(!a.pathname||!a.pathname.includes("?"),Y("?","pathname","search",a)),x(!a.pathname||!a.pathname.includes("#"),Y("#","pathname","hash",a)),x(!a.search||!a.search.includes("#"),Y("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,s;if(l==null)s=r;else{let d=t.length-1;if(!n&&l.startsWith("..")){let y=l.split("/");for(;y[0]==="..";)y.shift(),d-=1;a.pathname=y.join("/")}s=d>=0?t[d]:"/"}let u=Ke(a,s),c=l&&l!=="/"&&l.endsWith("/"),f=(o||l===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(c||f)&&(u.pathname+="/"),u}var k=e=>e.join("/").replace(/\/\/+/g,"/"),Ge=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Xe=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Qe=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Ze(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var pe=["POST","PUT","PATCH","DELETE"];new Set(pe);var et=["GET",...pe];new Set(et);var I=i.createContext(null);I.displayName="DataRouter";var J=i.createContext(null);J.displayName="DataRouterState";i.createContext(!1);var me=i.createContext({isTransitioning:!1});me.displayName="ViewTransition";var tt=i.createContext(new Map);tt.displayName="Fetchers";var rt=i.createContext(null);rt.displayName="Await";var S=i.createContext(null);S.displayName="Navigation";var A=i.createContext(null);A.displayName="Location";var L=i.createContext({outlet:null,matches:[],isDataRoute:!1});L.displayName="Route";var ee=i.createContext(null);ee.displayName="RouteError";function nt(e,{relative:t}={}){x(T(),"useHref() may be used only in the context of a component.");let{basename:r,navigator:n}=i.useContext(S),{hash:a,pathname:o,search:l}=W(e,{relative:t}),s=o;return r!=="/"&&(s=o==="/"?r:k([r,o])),n.createHref({pathname:s,search:l,hash:a})}function T(){return i.useContext(A)!=null}function F(){return x(T(),"useLocation() may be used only in the context of a component."),i.useContext(A).location}var ye="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ge(e){i.useContext(S).static||i.useLayoutEffect(e)}function ve(){let{isDataRoute:e}=i.useContext(L);return e?yt():at()}function at(){x(T(),"useNavigate() may be used only in the context of a component.");let e=i.useContext(I),{basename:t,navigator:r}=i.useContext(S),{matches:n}=i.useContext(L),{pathname:a}=F(),o=JSON.stringify(Q(n)),l=i.useRef(!1);return ge(()=>{l.current=!0}),i.useCallback((u,c={})=>{if(P(l.current,ye),!l.current)return;if(typeof u=="number"){r.go(u);return}let f=Z(u,JSON.parse(o),a,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:k([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,o,a,e])}i.createContext(null);function Zt(){let{matches:e}=i.useContext(L),t=e[e.length-1];return t?t.params:{}}function W(e,{relative:t}={}){let{matches:r}=i.useContext(L),{pathname:n}=F(),a=JSON.stringify(Q(r));return i.useMemo(()=>Z(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function ot(e,t){return we(e,t)}function we(e,t,r,n,a){x(T(),"useRoutes() may be used only in the context of a component.");let{navigator:o}=i.useContext(S),{matches:l}=i.useContext(L),s=l[l.length-1],u=s?s.params:{},c=s?s.pathname:"/",f=s?s.pathnameBase:"/",d=s&&s.route;{let h=d&&d.path||"";Re(c,!d||h.endsWith("*")||h.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${c}" (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=F(),g;if(t){let h=typeof t=="string"?D(t):t;x(f==="/"||h.pathname?.startsWith(f),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${h.pathname}" was given in the \`location\` prop.`),g=h}else g=y;let v=g.pathname||"/",w=v;if(f!=="/"){let h=f.replace(/^\//,"").split("/");w="/"+v.replace(/^\//,"").split("/").slice(h.length).join("/")}let p=fe(e,{pathname:w});P(d||p!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),P(p==null||p[p.length-1].route.element!==void 0||p[p.length-1].route.Component!==void 0||p[p.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.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=ct(p&&p.map(h=>Object.assign({},h,{params:Object.assign({},u,h.params),pathname:k([f,o.encodeLocation?o.encodeLocation(h.pathname).pathname:h.pathname]),pathnameBase:h.pathnameBase==="/"?f:k([f,o.encodeLocation?o.encodeLocation(h.pathnameBase).pathname:h.pathnameBase])})),l,r,n,a);return t&&m?i.createElement(A.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...g},navigationType:"POP"}},m):m}function lt(){let e=mt(),t=Ze(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 l=i.createElement(i.Fragment,null,i.createElement("p",null,"💿 Hey developer 👋"),i.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",i.createElement("code",{style:o},"ErrorBoundary")," or"," ",i.createElement("code",{style:o},"errorElement")," prop on your route.")),i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),r?i.createElement("pre",{style:a},r):null,l)}var it=i.createElement(lt,null),ut=class extends i.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.unstable_onError&&this.props.unstable_onError(e,t)}render(){return this.state.error!==void 0?i.createElement(L.Provider,{value:this.props.routeContext},i.createElement(ee.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function st({routeContext:e,match:t,children:r}){let n=i.useContext(I);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),i.createElement(L.Provider,{value:e},r)}function ct(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 c=o.findIndex(f=>f.route.id&&l?.[f.route.id]!==void 0);x(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),o=o.slice(0,Math.min(o.length,c+1))}let s=!1,u=-1;if(r)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,d)=>{let y,g=!1,v=null,w=null;r&&(y=l&&f.route.id?l[f.route.id]:void 0,v=f.route.errorElement||it,s&&(u<0&&d===0?(Re("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,w=null):u===d&&(g=!0,w=f.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,d+1)),m=()=>{let h;return y?h=v:g?h=w:f.route.Component?h=i.createElement(f.route.Component,null):f.route.element?h=f.route.element:h=c,i.createElement(st,{match:f,routeContext:{outlet:c,matches:p,isDataRoute:r!=null},children:h})};return r&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?i.createElement(ut,{location:r.location,revalidation:r.revalidation,component:v,error:y,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0},unstable_onError:n}):m()},null)}function te(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ft(e){let t=i.useContext(I);return x(t,te(e)),t}function dt(e){let t=i.useContext(J);return x(t,te(e)),t}function ht(e){let t=i.useContext(L);return x(t,te(e)),t}function re(e){let t=ht(e),r=t.matches[t.matches.length-1];return x(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function pt(){return re("useRouteId")}function mt(){let e=i.useContext(ee),t=dt("useRouteError"),r=re("useRouteError");return e!==void 0?e:t.errors?.[r]}function yt(){let{router:e}=ft("useNavigate"),t=re("useNavigate"),r=i.useRef(!1);return ge(()=>{r.current=!0}),i.useCallback(async(a,o={})=>{P(r.current,ye),r.current&&(typeof a=="number"?e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var se={};function Re(e,t,r){!t&&!se[e]&&(se[e]=!0,P(!1,r))}i.memo(gt);function gt({routes:e,future:t,state:r,unstable_onError:n}){return we(e,void 0,r,n,t)}function er({to:e,replace:t,state:r,relative:n}){x(T()," may be used only in the context of a component.");let{static:a}=i.useContext(S);P(!a," 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:o}=i.useContext(L),{pathname:l}=F(),s=ve(),u=Z(e,Q(o),l,n==="path"),c=JSON.stringify(u);return i.useEffect(()=>{s(JSON.parse(c),{replace:t,state:r,relative:n})},[s,c,n,t,r]),null}function vt(e){x(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function wt({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1}){x(!T(),"You cannot render a inside another . You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=i.useMemo(()=>({basename:l,navigator:a,static:o,future:{}}),[l,a,o]);typeof r=="string"&&(r=D(r));let{pathname:u="/",search:c="",hash:f="",state:d=null,key:y="default"}=r,g=i.useMemo(()=>{let v=$(u,l);return v==null?null:{location:{pathname:v,search:c,hash:f,state:d,key:y},navigationType:n}},[l,u,c,f,d,y,n]);return P(g!=null,` is not able to match the URL "${u}${c}${f}" because it does not start with the basename, so the won't render anything.`),g==null?null:i.createElement(S.Provider,{value:s},i.createElement(A.Provider,{children:t,value:g}))}function tr({children:e,location:t}){return ot(X(e),t)}function X(e,t=[]){let r=[];return i.Children.forEach(e,(n,a)=>{if(!i.isValidElement(n))return;let o=[...t,a];if(n.type===i.Fragment){r.push.apply(r,X(n.props.children,o));return}x(n.type===vt,`[${typeof n.type=="string"?n.type:n.type.name}] is not a component. All component children of must be a or `),x(!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,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=X(n.props.children,o)),r.push(l)}),r}var V="get",z="application/x-www-form-urlencoded";function K(e){return e!=null&&typeof e.tagName=="string"}function Rt(e){return K(e)&&e.tagName.toLowerCase()==="button"}function xt(e){return K(e)&&e.tagName.toLowerCase()==="form"}function Et(e){return K(e)&&e.tagName.toLowerCase()==="input"}function Ct(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function bt(e,t){return e.button===0&&(!t||t==="_self")&&!Ct(e)}var _=null;function Pt(){if(_===null)try{new FormData(document.createElement("form"),0),_=!1}catch{_=!0}return _}var St=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function q(e){return e!=null&&!St.has(e)?(P(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${z}"`),null):e}function Lt(e,t){let r,n,a,o,l;if(xt(e)){let s=e.getAttribute("action");n=s?$(s,t):null,r=e.getAttribute("method")||V,a=q(e.getAttribute("enctype"))||z,o=new FormData(e)}else if(Rt(e)||Et(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a