import{r as e,g as t}from"./react-vendor-C9E7Rxkj.js";var n=e();const r=t(n);var a="popstate";function o(e={}){return function(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:l=!1}=r,h=o.history,p="POP",d=null,m=f();null==m&&(m=0,h.replaceState({...h.state,idx:m},""));function f(){return(h.state||{idx:null}).idx}function v(){p="POP";let e=f(),t=null==e?null:e-m;m=e,d&&d({action:p,location:b.location,delta:t})}function g(e,t){p="PUSH";let n=s(b.location,e,t);m=f()+1;let r=u(n,m),a=b.createHref(n);try{h.pushState(r,"",a)}catch(i){if(i instanceof DOMException&&"DataCloneError"===i.name)throw i;o.location.assign(a)}l&&d&&d({action:p,location:b.location,delta:1})}function y(e,t){p="REPLACE";let n=s(b.location,e,t);m=f();let r=u(n,m),a=b.createHref(n);h.replaceState(r,"",a),l&&d&&d({action:p,location:b.location,delta:0})}function w(e){return function(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href);i(n,"No window.location.(origin|href) available to create URL");let r="string"==typeof e?e:c(e);r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r);return new URL(r,n)}(e)}let b={get action(){return p},get location(){return e(o,h)},listen(e){if(d)throw new Error("A history only accepts one active listener");return o.addEventListener(a,v),d=e,()=>{o.removeEventListener(a,v),d=null}},createHref:e=>t(o,e),createURL:w,encodeLocation(e){let t=w(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:g,replace:y,go:e=>h.go(e)};return b}(function(e,t){let{pathname:n,search:r,hash:a}=e.location;return s("",{pathname:n,search:r,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:c(t)},0,e)}function i(e,t){if(!1===e||null==e)throw new Error(t)}function l(e,t){if(!e)try{throw new Error(t)}catch(n){}}function u(e,t){return{usr:e.state,key:e.key,idx:t}}function s(e,t,n=null,r){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?h(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)}}function c({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function h(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function p(e,t,n="/"){return function(e,t,n,r){let a="string"==typeof t?h(t):t,o=S(a.pathname||"/",n);if(null==o)return null;let i=d(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(i);let l=null;for(let u=0;null==l&&u{let s={relativePath:void 0===u?e.path||"":u,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};if(s.relativePath.startsWith("/")){if(!s.relativePath.startsWith(r)&&l)return;i(s.relativePath.startsWith(r),`Absolute route path "${s.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(r.length)}let c=M([r,s.relativePath]),h=n.concat(s);e.children&&e.children.length>0&&(i(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),d(e.children,t,h,c,l)),(null!=e.path||e.index)&&t.push({path:c,score:E(c,e.index),routesMeta:h})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of m(e.path))o(e,t,!0,n);else o(e,t)}),t}function m(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return a?[o,""]:[o];let i=m(r.join("/")),l=[];return l.push(...i.map(e=>""===e?o:[o,e].join("/"))),a&&l.push(...i),l.map(t=>e.startsWith("/")&&""===t?"/":t)}var f=/^:[\w-]+$/,v=3,g=2,y=1,w=10,b=-2,x=e=>"*"===e;function E(e,t){let n=e.split("/"),r=n.length;return n.some(x)&&(r+=b),t&&(r+=g),n.filter(e=>!x(e)).reduce((e,t)=>e+(f.test(t)?v:""===t?y:w),r)}function R(e,t,n=!1){let{routesMeta:r}=e,a={},o="/",i=[];for(let l=0;l(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");e.endsWith("*")?(r.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))");let o=new RegExp(a,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),u=a.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=u[r]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const a=u[r];return e[t]=n&&!a?void 0:(a||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:i,pattern:e}}function $(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return l(!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 S(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}var L=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function T(e,t="/"){let n,{pathname:r,search:a="",hash:o=""}="string"==typeof e?h(e):e;if(r)if(i=r,L.test(i))n=r;else{if(r.includes("//")){let e=r;r=r.replace(/\/\/+/g,"/"),l(!1,`Pathnames cannot have embedded double slashes - normalizing ${e} -> ${r}`)}n=r.startsWith("/")?k(r.substring(1),"/"):k(r,t)}else n=t;var i;return{pathname:n,search:O(a),hash:D(o)}}function k(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function P(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function N(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function F(e,t,n,r=!1){let a;"string"==typeof e?a=h(e):(a={...e},i(!a.pathname||!a.pathname.includes("?"),P("?","pathname","search",a)),i(!a.pathname||!a.pathname.includes("#"),P("#","pathname","hash",a)),i(!a.search||!a.search.includes("#"),P("#","search","hash",a)));let o,l=""===e||""===a.pathname,u=l?"/":a.pathname;if(null==u)o=n;else{let e=t.length-1;if(!r&&u.startsWith("..")){let t=u.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let s=T(a,o),c=u&&"/"!==u&&u.endsWith("/"),p=(l||"."===u)&&n.endsWith("/");return s.pathname.endsWith("/")||!c&&!p||(s.pathname+="/"),s}var M=e=>e.join("/").replace(/\/\/+/g,"/"),A=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),O=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",D=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function W(e){return e.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var B=["POST","PUT","PATCH","DELETE"];new Set(B);var _=["GET",...B];new Set(_);var j=n.createContext(null);j.displayName="DataRouter";var U=n.createContext(null);U.displayName="DataRouterState",n.createContext(!1);var H=n.createContext({isTransitioning:!1});H.displayName="ViewTransition",n.createContext(new Map).displayName="Fetchers",n.createContext(null).displayName="Await";var I=n.createContext(null);I.displayName="Navigation";var z=n.createContext(null);z.displayName="Location";var Y=n.createContext({outlet:null,matches:[],isDataRoute:!1});Y.displayName="Route";var J=n.createContext(null);function K(){return null!=n.useContext(z)}function V(){return i(K(),"useLocation() may be used only in the context of a component."),n.useContext(z).location}J.displayName="RouteError";var q="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function G(e){n.useContext(I).static||n.useLayoutEffect(e)}function X(){let{isDataRoute:e}=n.useContext(Y);return e?function(){let{router:e}=function(e){let t=n.useContext(j);return i(t,ae(e)),t}("useNavigate"),t=oe("useNavigate"),r=n.useRef(!1);return G(()=>{r.current=!0}),n.useCallback(async(n,a={})=>{l(r.current,q),r.current&&("number"==typeof n?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...a}))},[e,t])}():function(){i(K(),"useNavigate() may be used only in the context of a component.");let e=n.useContext(j),{basename:t,navigator:r}=n.useContext(I),{matches:a}=n.useContext(Y),{pathname:o}=V(),u=JSON.stringify(N(a)),s=n.useRef(!1);return G(()=>{s.current=!0}),n.useCallback((n,a={})=>{if(l(s.current,q),!s.current)return;if("number"==typeof n)return void r.go(n);let i=F(n,JSON.parse(u),o,"path"===a.relative);null==e&&"/"!==t&&(i.pathname="/"===i.pathname?t:M([t,i.pathname])),(a.replace?r.replace:r.push)(i,a.state,a)},[t,r,u,o,e])}()}function Q(e,{relative:t}={}){let{matches:r}=n.useContext(Y),{pathname:a}=V(),o=JSON.stringify(N(r));return n.useMemo(()=>F(e,JSON.parse(o),a,"path"===t),[e,o,a,t])}function Z(e,t,r,a,o){i(K(),"useRoutes() may be used only in the context of a component.");let{navigator:u}=n.useContext(I),{matches:s}=n.useContext(Y),c=s[s.length-1],d=c?c.params:{},m=c?c.pathname:"/",f=c?c.pathnameBase:"/",v=c&&c.route;{let e=v&&v.path||"";le(m,!v||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${m}" (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.\n\nPlease change the parent to .`)}let g,y=V();if(t){let e="string"==typeof t?h(t):t;i("/"===f||e.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 "${e.pathname}" was given in the \`location\` prop.`),g=e}else g=y;let w=g.pathname||"/",b=w;if("/"!==f){let e=f.replace(/^\//,"").split("/");b="/"+w.replace(/^\//,"").split("/").slice(e.length).join("/")}let x=p(e,{pathname:b});l(v||null!=x,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),l(null==x||void 0!==x[x.length-1].route.element||void 0!==x[x.length-1].route.Component||void 0!==x[x.length-1].route.lazy,`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 E=function(e,t=[],r=null,a=null){if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let o=e,l=r?.errors;if(null!=l){let e=o.findIndex(e=>e.route.id&&void 0!==l?.[e.route.id]);i(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),o=o.slice(0,Math.min(o.length,e+1))}let u=!1,s=-1;if(r)for(let n=0;n=0?o.slice(0,s+1):[o[0]];break}}}let c=r&&a?(e,t)=>{a(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:W(r.matches),errorInfo:t})}:void 0;return o.reduceRight((e,a,i)=>{let h,p=!1,d=null,m=null;r&&(h=l&&a.route.id?l[a.route.id]:void 0,d=a.route.errorElement||te,u&&(s<0&&0===i?(le("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,m=null):s===i&&(p=!0,m=a.route.hydrateFallbackElement||null)));let f=t.concat(o.slice(0,i+1)),v=()=>{let t;return t=h?d:p?m:a.route.Component?n.createElement(a.route.Component,null):a.route.element?a.route.element:e,n.createElement(re,{match:a,routeContext:{outlet:e,matches:f,isDataRoute:null!=r},children:t})};return r&&(a.route.ErrorBoundary||a.route.errorElement||0===i)?n.createElement(ne,{location:r.location,revalidation:r.revalidation,component:d,error:h,children:v(),routeContext:{outlet:null,matches:f,isDataRoute:!0},onError:c}):v()},null)}(x&&x.map(e=>Object.assign({},e,{params:Object.assign({},d,e.params),pathname:M([f,u.encodeLocation?u.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?f:M([f,u.encodeLocation?u.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),s,r,a,o);return t&&E?n.createElement(z.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...g},navigationType:"POP"}},E):E}function ee(){let e=function(){let e=n.useContext(J),t=function(e){let t=n.useContext(U);return i(t,ae(e)),t}("useRouteError"),r=oe("useRouteError");if(void 0!==e)return e;return t.errors?.[r]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(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},l={padding:"2px 4px",backgroundColor:a},u=null;return u=n.createElement(n.Fragment,null,n.createElement("p",null,"💿 Hey developer 👋"),n.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",n.createElement("code",{style:l},"ErrorBoundary")," or"," ",n.createElement("code",{style:l},"errorElement")," prop on your route.")),n.createElement(n.Fragment,null,n.createElement("h2",null,"Unexpected Application Error!"),n.createElement("h3",{style:{fontStyle:"italic"}},t),r?n.createElement("pre",{style:o},r):null,u)}n.createContext(null);var te=n.createElement(ee,null),ne=class extends n.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||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t)}render(){return void 0!==this.state.error?n.createElement(Y.Provider,{value:this.props.routeContext},n.createElement(J.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function re({routeContext:e,match:t,children:r}){let a=n.useContext(j);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),n.createElement(Y.Provider,{value:e},r)}function ae(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function oe(e){let t=function(e){let t=n.useContext(Y);return i(t,ae(e)),t}(e),r=t.matches[t.matches.length-1];return i(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}var ie={};function le(e,t,n){t||ie[e]||(ie[e]=!0,l(!1,n))}function ue(e){i(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function se({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:o,static:u=!1,unstable_useTransitions:s}){i(!K(),"You cannot render a inside another . You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),p=n.useMemo(()=>({basename:c,navigator:o,static:u,unstable_useTransitions:s,future:{}}),[c,o,u,s]);"string"==typeof r&&(r=h(r));let{pathname:d="/",search:m="",hash:f="",state:v=null,key:g="default"}=r,y=n.useMemo(()=>{let e=S(d,c);return null==e?null:{location:{pathname:e,search:m,hash:f,state:v,key:g},navigationType:a}},[c,d,m,f,v,g,a]);return l(null!=y,` is not able to match the URL "${d}${m}${f}" because it does not start with the basename, so the won't render anything.`),null==y?null:n.createElement(I.Provider,{value:p},n.createElement(z.Provider,{children:t,value:y}))}function ce({children:e,location:t}){return Z(he(e),t)}function he(e,t=[]){let r=[];return n.Children.forEach(e,(e,a)=>{if(!n.isValidElement(e))return;let o=[...t,a];if(e.type===n.Fragment)return void r.push.apply(r,he(e.props.children,o));i(e.type===ue,`[${"string"==typeof e.type?e.type:e.type.name}] is not a component. All component children of must be a or `),i(!e.props.index||!e.props.children,"An index route cannot have child routes.");let l={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(l.children=he(e.props.children,o)),r.push(l)}),r}n.memo(function({routes:e,future:t,state:n,unstable_onError:r}){return Z(e,void 0,n,r,t)});var pe="get",de="application/x-www-form-urlencoded";function me(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}var fe=null;var ve=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ge(e){return null==e||ve.has(e)?e:(l(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${de}"`),null)}function ye(e,t){let n,r,a,o,i;if(me(l=e)&&"form"===l.tagName.toLowerCase()){let i=e.getAttribute("action");r=i?S(i,t):null,n=e.getAttribute("method")||pe,a=ge(e.getAttribute("enctype"))||de,o=new FormData(e)}else if(function(e){return me(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return me(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a