1import{r as e}from"./vendor-react-CcOkrrXR.js";var t=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,n=/^[\\/]{2}/;var a="popstate";function r(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function o(e={}){return function(e,t,o,l={}){let{window:h=document.defaultView,v5Compat:p=!1}=l,d=h.history,m="POP",f=null,v=g();null==v&&(v=0,d.replaceState({...d.state,idx:v},""));function g(){return(d.state||{idx:null}).idx}function y(){m="POP";let e=g(),t=null==e?null:e-v;v=e,f&&f({action:m,location:E.location,delta:t})}function w(e,t){m="PUSH";let n=r(e)?e:u(E.location,e,t);v=g()+1;let a=s(n,v),o=E.createHref(n.mask||n);try{d.pushState(a,"",o)}catch(i){if(i instanceof DOMException&&"DataCloneError"===i.name)throw i;h.location.assign(o)}p&&f&&f({action:m,location:E.location,delta:1})}function b(e,t){m="REPLACE";let n=r(e)?e:u(E.location,e,t);v=g();let a=s(n,v),o=E.createHref(n.mask||n);d.replaceState(a,"",o),p&&f&&f({action:m,location:E.location,delta:0})}function R(e){return function(e,t,a=!1){let r="http://localhost";e&&(r="null"!==e.location.origin?e.location.origin:e.location.href);
1i(r,"No window.location.(origin|href) available to create URL");let o="string"==typeof t?t:c(t);o=o.replace(/ $/,"%20"),!a&&n.test(o)&&(o=r+o);return new URL(o,r)}(h,e)}let E={get action(){return m},get location(){return e(h,d)},listen(e){if(f)throw new Error("A history only accepts one active listener");return h.addEventListener(a,y),f=e,()=>{h.removeEventListener(a,y),f=null}},createHref:e=>t(h,e),createURL:R,encodeLocation(e){let t=R(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:w,replace:b,go:e=>d.go(e)};return E}(function(e,t){let n=t.state?.masked,{pathname:a,search:r,hash:o}=n||e.location;return u("",{pathname:a,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default",n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)},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 s(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function u(e,t,n=null,a,r){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?h(t):t,state:n,key:t&&t.key||a||Math.random().toString(36).substring(2,10),mask:r}}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 a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function p(e,t,n="/"){return function(e,t,n,a){let r="string"==typeof t?h(t):t,o=$(r.pathname||"/",n);if(null==o)return null;let i=function(e){let t=d(e);return 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)))}(t),t}(e),s=null,u=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}}(o);for(let l=0;null==s&&l<i.length;++l)s=x(i[l],u,a);return s}(e,t,n,!1)}function d(e,t=[],n=[],a="",r=!1){let o=(e,o,l=r,s)=>{let u={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};if(u.relativePath.startsWith("/")){if(!u.relativePath.startsWith(a)&&l)return;i(u.relativePath.startsWith(a),`Absolute route path "${u.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(a.length)}let c=A([a,u.relativePath]),h=n.concat(u);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.map((e,t)=>{let[n,a]=k(e.relativePath,e.caseSensitive,t===h.length-1);return{...e,matcher:n,compiledParams:a}})})};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,...a]=t,r=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===a.length)return r?[o,""]:[o];let i=m(a.join("/")),l=[];return l.push(...i.map(e=>""===e?o:[o,e].join("/"))),r&&l.push(...i),l.map(t=>e.startsWith("/")&&""===t?"/":t)}var f=/^:[\w-]+$/,v=3,g=2,y=1,w=10,b=-2,R=e=>"*"===e;function E(e,t){let n=e.split("/"),a=n.length;return n.some(R)&&(a+=b),t&&(a+=g),n.filter(e=>!R(e)).reduce((e,t)=>e+(f.test(t)?v:""===t?y:w),a)}function x(e,t,n=!1){let{routesMeta:a}=e,r={},o="/",i=[];for(let l=0;l<a.length;++l){let e=a[l],s=l===a.length-1,u="/"===o?t:t.slice(o.length)||"/",c={path:e.relativePath,caseSensitive:e.caseSensitive,end:s},h=e.matcher&&e.compiledParams?C(c,u,e.matcher,e.compiledParams):S(c,u),p=e.route;if(!h&&s&&n&&!a[a.length-1].route.index&&(h=S({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!h)return null;
1Object.assign(r,h.params),i.push({params:r,pathname:A([o,h.pathname]),pathnameBase:D(A([o,h.pathnameBase])),route:p}),"/"!==h.pathnameBase&&(o=A([o,h.pathnameBase]))}return i}function S(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=k(e.path,e.caseSensitive,e.end);return C(e,t,n,a)}function C(e,t,n,a){let r=t.match(n);if(!r)return null;let o=r[0],i=o.replace(/(.)\/+$/,"$1"),l=r.slice(1);return{params:a.reduce((e,{paramName:t,isOptional:n},a)=>{if("*"===t){let e=l[a]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const r=l[a];return e[t]=n&&!r?void 0:(r||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:i,pattern:e}}function k(e,t=!1,n=!0){l("*"===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=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,r,o)=>{if(a.push({paramName:t,isOptional:null!=n}),n){let t=o.charAt(r+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),r+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":""!==e&&"/"!==e&&(r+="(?:(?=\\/|$))"),[new RegExp(r,t?void 0:"i"),a]}function $(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&"/"!==a?null:e.slice(n)||"/"}function L(e,t){let n=M(t).split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function T(e,t,n,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function P(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 N(e,t,n,a=!1){let r;"string"==typeof e?r=h(e):(r={...e},i(!r.pathname||!r.pathname.includes("?"),T("?","pathname","search",r)),i(!r.pathname||!r.pathname.includes("#"),T("#","pathname","hash",r)),i(!r.search||!r.search.includes("#"),T("#","search","hash",r)));let o,l=""===e||""===r.pathname,s=l?"/":r.pathname;if(null==s)o=n;else{let e=t.length-1;if(!a&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;r.pathname=t.join("/")}o=e>=0?t[e]:"/"}let u=function(e,t="/"){let n,{pathname:a,search:r="",hash:o=""}="string"==typeof e?h(e):e;return a?(a=O(a),n=a.startsWith("/")?L(a.substring(1),"/"):L(a,t)):n=t,{pathname:n,search:F(r),hash:U(o)}}(r,o),c=s&&"/"!==s&&s.endsWith("/"),p=(l||"."===s)&&n.endsWith("/");return u.pathname.endsWith("/")||!c&&!p||(u.pathname+="/"),u}var O=e=>e.replace(/[\\/]{2,}/g,"/"),A=e=>O(e.join("/")),M=e=>e.replace(/\/+$/,""),D=e=>M(e).replace(/^\/*/,"/"),F=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",U=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",j=class{constructor(e,t,n,a=!1){this.status=e,this.statusText=t||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function W(e){let t=e.map(e=>e.route.path).filter(Boolean);return A(t)||"/"}var _="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function B(e,a){let r=e;if("string"!=typeof r||!t.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let o=r,i=!1;if(_)try{let e=new URL(window.location.href),t=n.test(r)?new URL((s=r,e.protocol+s.replace(/\\/g,"/"))):new URL(r),o=$(t.pathname,a);t.origin===e.origin&&null!=o?r=o+t.search+t.hash:i=!0}catch(u){l(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}var s;return{absoluteURL:o,isExternal:i,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var I=["POST","PUT","PATCH","DELETE"];new Set(I);var H=["GET",...I];new Set(H);var J=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];var z=e.createContext(null);z.displayName="DataRouter";var Y=e.createContext(null);Y.displayName="DataRouterState";var K=e.createContext(!1);var q=e.createContext({isTransitioning:!1});q.displayName="ViewTransition",e.createContext(new Map).displayName="Fetchers",e.createContext(null).displayName="Await";var V=e.createContext(null);V.displayName="Navigation";var G=e.createContext(null);G.displayName="Location";var X=e.createContext({outlet:null,matches:[],isDataRoute:!1});X.displayName="Route";var Q=e.createContext(null);Q.displayName="RouteError";var Z="REACT_ROUTER_ERROR";function ee(){return null!=e.useContext(G)}function te(){return i(ee(),"useLocation() may be used only in the context of a <Router> component."),e.useContext(G).location}var ne="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ae(t){e.useContext(V).static||e.useLayoutEffect(t)}function re(){let{isDataRoute:t}=e.useContext(X);return t?function(){let{router:t}=function(t){let n=e.useContext(z);return i(n,fe(t)),n}("useNavigate"),n=ve("useNavigate"),a=e.useRef(!1);return ae(()=>{a.current=!0}),e.useCallback(async(e,r={})=>{l(a.current,ne),a.current&&("number"==typeof e?await t.navigate(e):await t.navigate(e,{fromRouteId:n,...r}))},[t,n])}():function(){i(ee(),"useNavigate() may be used only in the context of a <Router> component.");
1let t=e.useContext(z),{basename:n,navigator:a}=e.useContext(V),{matches:r}=e.useContext(X),{pathname:o}=te(),s=JSON.stringify(P(r)),u=e.useRef(!1);return ae(()=>{u.current=!0}),e.useCallback((e,r={})=>{if(l(u.current,ne),!u.current)return;if("number"==typeof e)return void a.go(e);let i=N(e,JSON.parse(s),o,"path"===r.relative);null==t&&"/"!==n&&(i.pathname="/"===i.pathname?n:A([n,i.pathname])),(r.replace?a.replace:a.push)(i,r.state,r)},[n,a,s,o,t])}()}var oe=e.createContext(null);function ie(){let{matches:t}=e.useContext(X),n=t[t.length-1];return n?.params??{}}function le(t,{relative:n}={}){let{matches:a}=e.useContext(X),{pathname:r}=te(),o=JSON.stringify(P(a));return e.useMemo(()=>N(t,JSON.parse(o),r,"path"===n),[t,o,r,n])}function se(t,n,a){i(ee(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=e.useContext(V),{matches:o}=e.useContext(X),s=o[o.length-1],u=s?s.params:{},c=s?s.pathname:"/",d=s?s.pathnameBase:"/",m=s&&s.route;{let e=m&&m.path||"";ye(c,!m||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) 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 <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let f,v=te();if(n){let e="string"==typeof n?h(n):n;i("/"===d||e.pathname?.startsWith(d),`When overriding the location using \`<Routes location>\` 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 "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=v;let g=f.pathname||"/",y=g;if("/"!==d){let e=d.replace(/^\//,"").split("/");y="/"+g.replace(/^\//,"").split("/").slice(e.length).join("/")}let w=a&&a.state.matches.length?a.state.matches.map(e=>Object.assign(e,{route:a.manifest[e.route.id]||e.route})):p(t,{pathname:y});l(m||null!=w,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),l(null==w||void 0!==w[w.length-1].route.element||void 0!==w[w.length-1].route.Component||void 0!==w[w.length-1].route.lazy,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let b=function(t,n=[],a){let r=a?.state;if(null==t){if(!r)return null;if(r.errors)t=r.matches;else{if(0!==n.length||r.initialized||!(r.matches.length>0))return null;t=r.matches}}let o=t,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 s=!1,u=-1;if(a&&r){s=r.renderFallback;for(let e=0;e<o.length;e++){let t=o[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(u=e),t.route.id){let{loaderData:e,errors:n}=r,i=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!n||void 0===n[t.route.id]);if(t.route.lazy||i){a.isStatic&&(s=!0),o=u>=0?o.slice(0,u+1):[o[0]];break}}}}let c=a?.onError,h=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:W(r.matches),errorInfo:t})}:void 0;return o.reduceRight((t,a,i)=>{let c,p=!1,d=null,m=null;r&&(c=l&&a.route.id?l[a.route.id]:void 0,d=a.route.errorElement||ce,s&&(u<0&&0===i?(ye("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,m=null):u===i&&(p=!0,m=a.route.hydrateFallbackElement||null)));let f=n.concat(o.slice(0,i+1)),v=()=>{let n;return n=c?d:p?m:a.route.Component?e.createElement(a.route.Component,null):a.route.element?a.route.element:t,e.createElement(me,{match:a,routeContext:{outlet:t,matches:f,isDataRoute:null!=r},children:n})};return r&&(a.route.ErrorBoundary||a.route.errorElement||0===i)?e.createElement(he,{location:r.location,revalidation:r.revalidation,component:d,error:c,children:v(),routeContext:{outlet:null,matches:f,isDataRoute:!0},onError:h}):v()},null)}(w&&w.map(e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:A([d,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?d:A([d,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),o,a);return n&&b?e.createElement(G.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...f},navigationType:"POP"}},b):b}function ue(){let t=function(){let t=e.useContext(Q),n=function(t){let n=e.useContext(Y);return i(n,fe(t)),n}("useRouteError"),a=ve("useRouteError");
1if(void 0!==t)return t;return n.errors?.[a]}(),n=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),a=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},l={padding:"2px 4px",backgroundColor:r},s=null;return s=e.createElement(e.Fragment,null,e.createElement("p",null,"\ud83d\udcbf Hey developer \ud83d\udc4b"),e.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",e.createElement("code",{style:l},"ErrorBoundary")," or"," ",e.createElement("code",{style:l},"errorElement")," prop on your route.")),e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},n),a?e.createElement("pre",{style:o},a):null,s)}var ce=e.createElement(ue,null),he=class extends e.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(){let t=this.state.error;if(this.context&&"object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){const e=function(e){if(e.startsWith(`${Z}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new j(t.status,t.statusText,t.data)}catch{}}(t.digest);e&&(t=e)}let n=void 0!==t?e.createElement(X.Provider,{value:this.props.routeContext},e.createElement(Q.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?e.createElement(de,{error:t},n):n}};he.contextType=K;var pe=new WeakMap;function de({children:t,error:n}){let{basename:a}=e.useContext(V);if("object"==typeof n&&n&&"digest"in n&&"string"==typeof n.digest){let t=function(e){if(e.startsWith(`${Z}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(n.digest);if(t){let r=pe.get(n);if(r)throw r;let o=B(t.location,a),i=o.absoluteURL||o.to;if(function(e){try{return J.includes(new URL(e).protocol)}catch{return!1}}(i))throw new Error("Invalid redirect location");if(_&&!pe.get(n)){if(!o.isExternal&&!t.reloadDocument){const e=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:t.replace}));throw pe.set(n,e),e}window.location.href=i}return e.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i}`})}}return t}function me({routeContext:t,match:n,children:a}){let r=e.useContext(z);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),e.createElement(X.Provider,{value:t},a)}function fe(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ve(t){let n=function(t){let n=e.useContext(X);return i(n,fe(t)),n}(t),a=n.matches[n.matches.length-1];return i(a.route.id,`${t} can only be used on routes that contain a unique "id"`),a.route.id}var ge={};function ye(e,t,n){t||ge[e]||(ge[e]=!0,l(!1,n))}function we({to:t,replace:n,state:a,relative:r}){i(ee(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=e.useContext(V);l(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=e.useContext(X),{pathname:u}
1=te(),c=re(),h=N(t,P(s),u,"path"===r),p=JSON.stringify(h);return e.useEffect(()=>{c(JSON.parse(p),{replace:n,state:a,relative:r})},[c,p,r,n,a]),null}function be(t){return function(t){let n=e.useContext(X).outlet;return e.useMemo(()=>n&&e.createElement(oe.Provider,{value:t},n),[n,t])}(t.context)}function Re(e){i(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Ee({basename:t="/",children:n=null,location:a,navigationType:r="POP",navigator:o,static:s=!1,useTransitions:u}){i(!ee(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=t.replace(/^\/*/,"/"),p=e.useMemo(()=>({basename:c,navigator:o,static:s,useTransitions:u,future:{}}),[c,o,s,u]);"string"==typeof a&&(a=h(a));let{pathname:d="/",search:m="",hash:f="",state:v=null,key:g="default",mask:y}=a,w=e.useMemo(()=>{let e=$(d,c);return null==e?null:{location:{pathname:e,search:m,hash:f,state:v,key:g,mask:y},navigationType:r}},[c,d,m,f,v,g,r,y]);return l(null!=w,`<Router basename="${c}"> is not able to match the URL "${d}${m}${f}" because it does not start with the basename, so the <Router> won't render anything.`),null==w?null:e.createElement(V.Provider,{value:p},e.createElement(G.Provider,{children:n,value:w}))}function xe({children:e,location:t}){return se(Se(e),t)}function Se(t,n=[]){let a=[];return e.Children.forEach(t,(t,r)=>{if(!e.isValidElement(t))return;let o=[...n,r];if(t.type===e.Fragment)return void a.push.apply(a,Se(t.props.children,o));i(t.type===Re,`[${"string"==typeof t.type?t.type:t.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),i(!t.props.index||!t.props.children,"An index route cannot have child routes.");let l={id:t.props.id||o.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,middleware:t.props.middleware,loader:t.props.loader,action:t.props.action,hydrateFallbackElement:t.props.hydrateFallbackElement,HydrateFallback:t.props.HydrateFallback,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:!0===t.props.hasErrorBoundary||null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(l.children=Se(t.props.children,o)),a.push(l)}),a}e.memo(function({routes:e,manifest:t,future:n,state:a,isStatic:r,onError:o}){return se(e,void 0,{manifest:t,state:a,isStatic:r,onError:o})});var Ce="get",ke="application/x-www-form-urlencoded";function $e(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}function Le(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let a=e[n];return t.concat(Array.isArray(a)?a.map(e=>[n,e]):[[n,a]])},[]))}var Te=null;var Pe=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ne(e){return null==e||Pe.has(e)?e:(l(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ke}"`),null)}function Oe(e,t){let n,a,r,o,i;if($e(l=e)&&"form"===l.tagName.toLowerCase()){let i=e.getAttribute("action");a=i?$(i,t):null,n=e.getAttribute("method")||Ce,r=Ne(e.getAttribute("enctype"))||ke,o=new FormData(e)}else if(function(e){return $e(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return $e(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 <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(a=l?$(l,t):null,n=e.getAttribute("formmethod")||i.getAttribute("method")||Ce,r=Ne(e.getAttribute("formenctype"))||Ne(i.getAttribute("enctype"))||ke,o=new FormData(i,e),!function(){if(null===Te)try{new FormData(document.createElement("form"),0),Te=!1}catch(e){Te=!0}return Te}()){let{name:t,type:n,value:a}=e;if("image"===n){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}
1else t&&o.append(t,a)}}else{if($e(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Ce,a=null,r=ke,i=e}var l;return o&&"text/plain"===r&&(i=o,o=void 0),{action:a,method:n.toLowerCase(),encType:r,formData:o,body:i}}function Ae(e,t){if(!1===e||null==e)throw new Error(t)}function Me(e,t,n,a){let r="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?r.pathname.endsWith("/")?r.pathname=`${r.pathname}_.${a}`:r.pathname=`${r.pathname}.${a}`:"/"===r.pathname?r.pathname=`_root.${a}`:t&&"/"===$(r.pathname,t)?r.pathname=`${M(t)}/_root.${a}`:r.pathname=`${M(r.pathname)}.${a}`,r}function De(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function Fe(e,t,n){return function(e,t){let n=new Set;return new Set(t),e.reduce((e,t)=>{let a=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let a of n)t[a]=e[a];return t}(t));return n.has(a)||(n.add(a),e.push({key:a,link:t})),e},[])}((await Promise.all(e.map(async e=>{let a=t.routes[e.route.id];if(a){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(a,n);return e.links?e.links():[]}return[]}))).flat(1).filter(De).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}function Ue(e,t,n,a,r,o){let i=(e,t)=>!n[t]||e.route.id!==n[t].route.id,l=(e,t)=>
1n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===o?t.filter((e,t)=>i(e,t)||l(e,t)):"data"===o?t.filter((t,o)=>{let s=a.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(i(t,o)||l(t,o))return!0;if(t.route.shouldRevalidate){let a=t.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof a)return a}return!0}):[]}function je(e,t,{includeHydrateFallback:n}={}){return a=e.map(e=>{let a=t.routes[e.route.id];if(!a)return[];let r=[a.module];return a.clientActionModule&&(r=r.concat(a.clientActionModule)),a.clientLoaderModule&&(r=r.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(r=r.concat(a.hydrateFallbackModule)),a.imports&&(r=r.concat(a.imports)),r}).flat(1),[...new Set(a)];var a}function We(){let t=e.useContext(z);return Ae(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var _e=e.createContext(void 0);function Be(){let t=e.useContext(_e);return Ae(t,"You must render this element inside a <HydratedRouter> element"),t}function Ie(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function He({page:t,...n}){let a=e.useContext(K),{nonce:r}=Be(),{router:o}=We(),i=e.useMemo(()=>p(o.routes,t,o.basename),[o.routes,t,o.basename]);return i?(null==n.nonce&&r&&(n={...n,nonce:r}),a?e.createElement(Je,{page:t,matches:i,...n}):e.createElement(ze,{page:t,matches:i,...n})):null}function Je({page:t,matches:n,...a}){let r=te(),{future:o}=Be(),{basename:i}=We(),l=e.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let e=Me(t,i,o.v8_trailingSlashAwareDataRequests,"rsc"),a=!1,l=[];for(let t of n)"function"==typeof t.route.shouldRevalidate?a=!0:l.push(t.route.id);return a&&l.length>0&&e.searchParams.set("_routes",l.join(",")),[e.pathname+e.search]},[i,o.v8_trailingSlashAwareDataRequests,t,r,n]);return e.createElement(e.Fragment,null,l.map(t=>e.createElement("link",{key:t,rel:"prefetch",as:"fetch",href:t,...a})))}function ze({page:t,matches:n,...a}){let r=te(),{future:o,manifest:i,routeModules:l}=Be(),{basename:s}=We(),{loaderData:u,matches:c}=function(){let t=e.useContext(Y);return Ae(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}(),h=e.useMemo(()=>Ue(t,n,c,i,r,"data"),[t,n,c,i,r]),p=e.useMemo(()=>Ue(t,n,c,i,r,"assets"),[t,n,c,i,r]),d=e.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let e=new Set,a=!1;if(n.forEach(t=>{let n=i.routes[t.route.id];n&&n.hasLoader&&(!h.some(e=>e.route.id===t.route.id)&&t.route.id in u&&l[t.route.id]?.shouldRevalidate||n.hasClientLoader?a=!0:e.add(t.route.id))}),0===e.size)return[];let c=Me(t,s,o.v8_trailingSlashAwareDataRequests,"data");return a&&e.size>0&&c.searchParams.set("_routes",n.filter(t=>e.has(t.route.id)).map(e=>e.route.id).join(",")),[c.pathname+c.search]},[s,o.v8_trailingSlashAwareDataRequests,u,r,i,h,n,t,l]),m=e.useMemo(()=>je(p,i),[p,i]),f=function(t){let{manifest:n,routeModules:a}=Be(),[r,o]=e.useState([]);return e.useEffect(()=>{let e=!1;return Fe(t,n,a).then(t=>{e||o(t)}),()=>{e=!0}},[t,n,a]),r}(p);return e.createElement(e.Fragment,null,d.map(t=>e.createElement("link",{key:t,rel:"prefetch",as:"fetch",href:t,...a})),m.map(t=>e.createElement("link",{key:t,rel:"modulepreload",href:t,...a})),f.map(({key:t,link:n})=>e.createElement("link",{key:t,nonce:a.nonce,...n,crossOrigin:n.crossOrigin??a.crossOrigin})))}function Ye(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}_e.displayName="FrameworkContext";var Ke="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Ke&&(window.__reactRouterVersion="7.18.1")}catch(et){}function qe({basename:t,children:n,useTransitions:a,window:r}){let i=e.useRef();null==i.current&&(i.current=o({window:r,v5Compat:!0}));let l=i.current,[s,u]=e.useState({action:l.action,location:l.location}),c=e.useCallback(t=>{!1===a?u(t):e.startTransition(()=>u(t))},[a]);return e.useLayoutEffect(()=>l.listen(c),[l,c]),e.createElement(Ee,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:l,useTransitions:a})}var Ve=e.forwardRef(function({onClick:n,discover:a="render",prefetch:r="none",relative:o,reloadDocument:l,replace:s,mask:u,state:h,target:p,to:d,preventScrollReset:m,viewTransition:f,defaultShouldRevalidate:v,...g},y){let{basename:w,navigator:b,useTransitions:R}=e.useContext(V),E="string"==typeof d&&t.test(d),x=B(d,w),S=function(t,{relative:n}={}){i(ee(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:r}=e.useContext(V),{hash:o,pathname:l,search:s}=le(t,{relative:n}),u=l;return"/"!==a&&(u="/"===l?a:A([a,l])),r.createHref({pathname:u,search:s,hash:o})}(d=x.to,{relative:o}),C=te(),k=null;if(u){let e=N(u,[],C.mask?C.mask.pathname:"/",!0);"/"!==w&&(e.pathname="/"===e.pathname?w:A([w,e.pathname])),k=b.createHref(e)}let[$,L,T]=function(t,n){let a=e.useContext(_e),[r,o]=e.useState(!1),[i,l]=e.useState(!1),{onFocus:s,onBlur:u,onMouseEnter:c,onMouseLeave:h,onTouchStart:p}=n,d=e.useRef(null);e.useEffect(()=>{if("render"===t&&l(!0),"viewport"===t){let e=new IntersectionObserver(e=>
1{e.forEach(e=>{l(e.isIntersecting)})},{threshold:.5});return d.current&&e.observe(d.current),()=>{e.disconnect()}}},[t]),e.useEffect(()=>{if(r){let e=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{o(!0)},f=()=>{o(!1),l(!1)};return a?"intent"!==t?[i,d,{}]:[i,d,{onFocus:Ie(s,m),onBlur:Ie(u,f),onMouseEnter:Ie(c,m),onMouseLeave:Ie(h,f),onTouchStart:Ie(p,m)}]:[!1,d,{}]}(r,g),P=function(t,{target:n,replace:a,mask:r,state:o,preventScrollReset:i,relative:l,viewTransition:s,defaultShouldRevalidate:u,useTransitions:h}={}){let p=re(),d=te(),m=le(t,{relative:l});return e.useCallback(f=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(f,n)){f.preventDefault();let n=void 0!==a?a:c(d)===c(m),v=()=>p(t,{replace:n,mask:r,state:o,preventScrollReset:i,relative:l,viewTransition:s,defaultShouldRevalidate:u});h?e.startTransition(()=>v()):v()}},[d,p,m,a,r,o,n,t,i,l,s,u,h])}(d,{replace:s,mask:u,state:h,target:p,preventScrollReset:m,relative:o,viewTransition:f,defaultShouldRevalidate:v,useTransitions:R});let O=!(x.isExternal||l),M=e.createElement("a",{...g,...T,href:(O?k:void 0)||x.absoluteURL||S,onClick:O?function(e){n&&n(e),e.defaultPrevented||P(e)}:n,ref:Ye(y,L),target:p,"data-discover":E||"render"!==a?void 0:"true"});return $&&!E?e.createElement(e.Fragment,null,M,e.createElement(He,{page:S})):M});function Ge(t){let n=e.useContext(z);return i(n,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(t)),n}function Xe(t){l("undefined"!=typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let n=e.useRef(Le(t)),a=e.useRef(!1),r=te(),o=e.useMemo(()=>function(e,t){let n=Le(e);return t&&t.forEach((e,a)=>{n.has(a)||t.getAll(a).forEach(e=>{n.append(a,e)})}),n}(r.search,a.current?null:n.current),[r.search]),i=re(),s=e.useCallback((e,t)=>{const n=Le("function"==typeof e?e(new URLSearchParams(o)):e);a.current=!0,i("?"+n,t)},[i,o]);return[o,s]}Ve.displayName="Link",e.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:r=!1,style:o,to:l,viewTransition:s,children:u,...c},h){let p=le(l,{relative:c.relative}),d=te(),m=e.useContext(Y),{navigator:f,basename:v}=e.useContext(V),g=null!=m&&function(t,{relative:n}={}){let a=e.useContext(q);i(null!=a,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ge("useViewTransitionState"),o=le(t,{relative:n});if(!a.isTransitioning)return!1;let l=$(a.currentLocation.pathname,r)||a.currentLocation.pathname,s=$(a.nextLocation.pathname,r)||a.nextLocation.pathname;return null!=S(o.pathname,s)||null!=S(o.pathname,l)}(p)&&!0===s,y=f.encodeLocation?f.encodeLocation(p).pathname:p.pathname,w=d.pathname,b=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;n||(w=w.toLowerCase(),b=b?b.toLowerCase():null,y=y.toLowerCase()),b&&v&&(b=$(b,v)||b);const R="/"!==y&&y.endsWith("/")?y.length-1:y.length;let E,x=w===y||!r&&w.startsWith(y)&&"/"===w.charAt(R),C=null!=b&&(b===y||!r&&b.startsWith(y)&&"/"===b.charAt(y.length)),k={isActive:x,isPending:C,isTransitioning:g},L=x?t:void 0;E="function"==typeof a?a(k):[a,x?"active":null,C?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let T="function"==typeof o?o(k):o;return e.createElement(Ve,{...c,"aria-current":L,className:E,ref:h,style:T,to:l,viewTransition:s},"function"==typeof u?u(k):u)}).displayName="NavLink",e.forwardRef(({discover:n="render",fetcherKey:a,navigate:r,reloadDocument:o,replace:l,state:s,method:u=Ce,action:h,onSubmit:p,relative:d,preventScrollReset:m,viewTransition:f,defaultShouldRevalidate:v,...g},y)=>{let{useTransitions:w}=e.useContext(V),b=function(){let{router:t}=Ge("useSubmit"),{basename:n}=e.useContext(V),a=ve("useRouteId"),r=t.fetch,o=t.navigate;return e.useCallback(async(e,t={})=>{let{action:i,method:l,encType:s,formData:u,body:c}=Oe(e,n);if(!1===t.navigate){let e=t.fetcherKey||Ze();await r(e,a,t.action||i,{defaultShouldRevalidate:t.defaultShouldRevalidate,preventScrollReset:t.preventScrollReset,formData:u,body:c,formMethod:t.method||l,formEncType:t.encType||s,flushSync:t.flushSync})}else await o(t.action||i,{defaultShouldRevalidate:t.defaultShouldRevalidate,preventScrollReset:t.preventScrollReset,formData:u,body:c,formMethod:t.method||l,formEncType:t.encType||s,replace:t.replace,state:t.state,fromRouteId:a,flushSync:t.flushSync,viewTransition:t.viewTransition})}
1,[r,o,n,a])}(),R=function(t,{relative:n}={}){let{basename:a}=e.useContext(V),r=e.useContext(X);i(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),l={...le(t||".",{relative:n})},s=te();if(null==t){l.search=s.search;let e=new URLSearchParams(l.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();l.search=n?`?${n}`:""}}t&&"."!==t||!o.route.index||(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index");"/"!==a&&(l.pathname="/"===l.pathname?a:A([a,l.pathname]));return c(l)}(h,{relative:d}),E="get"===u.toLowerCase()?"get":"post",x="string"==typeof h&&t.test(h);return e.createElement("form",{ref:y,method:E,action:R,onSubmit:o?p:t=>{if(p&&p(t),t.defaultPrevented)return;t.preventDefault();let n=t.nativeEvent.submitter,o=n?.getAttribute("formmethod")||u,i=()=>b(n||t.currentTarget,{fetcherKey:a,method:o,navigate:r,replace:l,state:s,relative:d,preventScrollReset:m,viewTransition:f,defaultShouldRevalidate:v});w&&!1!==r?e.startTransition(()=>i()):i()},...g,"data-discover":x||"render"!==n?void 0:"true"})}).displayName="Form";var Qe=0,Ze=()=>`__${String(++Qe)}__`;export{qe as B,Ve as L,we as N,be as O,xe as R,re as a,Xe as b,Re as c,ie as d,te as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.