1import{r as i}from"./react-vendor-CkHENeON.js";/** 2 * react-router v7.18.1 3 * 4 * Copyright (c) Remix Software Inc. 5 * 6 * This source code is licensed under the MIT license found in the 7 * LICENSE.md file in the root directory of this source tree. 8 * 9 * @license MIT 10 */var ne=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Ee=/^[\\/]{2}/;function ze(e,t){return t+e.replace(/\\/g,"/")}var de="popstate";function me(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Je(e={}){function t(n,a){var c;let o=(c=a.state)==null?void 0:c.masked,{pathname:l,search:s,hash:u}=o||n.location;return ee("",{pathname:l,search:s,hash:u},a.state&&a.state.usr||null,a.state&&a.state.key||"default",o?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function r(n,a){return typeof a=="string"?a:U(a)}return Ye(t,r,null,e)}function w(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function P(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ke(){return Math.random().toString(36).substring(2,10)}function pe(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 ee(e,t,r=null,n,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?N(t):t,state:r,key:t&&t.key||n||Ke(),mask:a}}function U({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 N(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 Ye(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 h(){s="POP";let p=f(),m=p==null?null:p-c;c=p,u&&u({action:s,location:y.location,delta:m})}function d(p,m){s="PUSH";let R=me(p)?p:ee(y.location,p,m);c=f()+1;let E=pe(R,c),C=y.createHref(R.mask||R);try{l.pushState(E,"",C)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;a.location.assign(C)}o&&u&&u({action:s,location:y.location,delta:1})}function g(p,m){s="REPLACE";let R=me(p)?p:ee(y.location,p,m);c=f();let E=pe(R,c),C=y.createHref(R.mask||R);l.replaceState(E,"",C),o&&u&&u({action:s,location:y.location,delta:0})}function v(p){return qe(a,p)}let y={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(de,h),u=p,()=>{a.removeEventListener(de,h),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:d,replace:g,go(p){return l.go(p)}};return y}function qe(e,t,r=!1){let n="http://localhost";e&&(n=e.location.origin!=="null"?e.location.origin:e.location.href),w(n,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:U(t);return a=a.replace(/ $/,"%20"),!r&&Ee.test(a)&&(a=n+a),new URL(a,n)}function we(e,t,r="/"){return Ge(e,t,r,!1)}function Ge(e,t,r,n,a){let o=typeof t=="string"?N(t):t,l=T(o.pathname||"/",r);if(l==null)return null;let s=Xe(e),u=null,c=st(l);for(let f=0;u==null&&f<s.length;++f)u=it(s[f],c,n);return u}function Xe(e){let t=xe(e);return Qe(t),t}function xe(e,t=[],r=[],n="",a=!1){let o=(l,s,u=a,c)=>{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;w(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 h=b([n,f.relativePath]),d=r.concat(f);l.children&&l.children.length>0&&(w(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),xe(l.children,t,d,h,u)),!(l.path==null&&!l.index)&&t.push({path:h,score:ot(h,l.index),routesMeta:d.map((g,v)=>{let[y,p]=be(g.relativePath,g.caseSensitive,v===d.length-1);return{...g,matcher:y,compiledParams:p}})})};return e.forEach((l,s)=>{var u;if(l.path===""||!((u=l.path)!=null&&u.includes("?")))o(l,s);else for(let c of Ce(l.path))o(l,s,!0,c)}),t}function Ce(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=Ce(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 Qe(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:lt(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var Ze=/^:[\w-]+$/,et=3,tt=2,rt=1,nt=10,at=-2,ye=e=>e==="*";function ot(e,t){let r=e.split("/"),n=r.length;return r.some(ye)&&(n+=at),t&&(n+=tt),r.filter(a=>
10!ye(a)).reduce((a,o)=>a+(Ze.test(o)?et:o===""?rt:nt),n)}function lt(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 it(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",l=[];for(let s=0;s<n.length;++s){let u=n[s],c=s===n.length-1,f=o==="/"?t:t.slice(o.length)||"/",h={path:u.relativePath,caseSensitive:u.caseSensitive,end:c},d=u.matcher&&u.compiledParams?Se(h,f,u.matcher,u.compiledParams):z(h,f),g=u.route;if(!d&&c&&r&&!n[n.length-1].route.index&&(d=z({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},f)),!d)return null;Object.assign(a,d.params),l.push({params:a,pathname:b([o,d.pathname]),pathnameBase:ft(b([o,d.pathnameBase])),route:g}),d.pathnameBase!=="/"&&(o=b([o,d.pathnameBase]))}return l}function z(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=be(e.path,e.caseSensitive,e.end);return Se(e,t,r,n)}function Se(e,t,r,n){let a=t.match(r);if(!a)return null;let o=a[0],l=o.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:n.reduce((c,{paramName:f,isOptional:h},d)=>{if(f==="*"){let v=s[d]||"";l=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const g=s[d];return h&&!g?c[f]=void 0:c[f]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:l,pattern:e}}function be(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,c,f)=>{if(n.push({paramName:s,isOptional:u!=null}),u){let h=f.charAt(c+l.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).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 st(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 T(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 ut(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?N(e):e,o;return r?(r=Le(r),r.startsWith("/")?o=ge(r.substring(1),"/"):o=ge(r,t)):o=t,{pathname:o,search:ht(n),hash:dt(a)}}function ge(e,t){let r=J(t).split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function X(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 <Link to="..."> and the router will parse it for you.`}function ct(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Pe(e){let t=ct(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function ae(e,t,r,n=!1){let a;typeof e=="string"?a=N(e):(a={...e},w(!a.pathname||!a.pathname.includes("?"),X("?","pathname","search",a)),w(!a.pathname||!a.pathname.includes("#"),X("#","pathname","hash",a)),w(!a.search||!a.search.includes("#"),X("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,s;if(l==null)s=r;else{let h=t.length-1;if(!n&&l.startsWith("..")){let d=l.split("/");for(;d[0]==="..";)d.shift(),h-=1;a.pathname=d.join("/")}s=h>=0?t[h]:"/"}let u=ut(a,s),c=l&&l!=="/"&&l.endsWith("/"),f=(o||l===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(c||f)&&(u.pathname+="/"),u}var Le=e=>e.replace(/[\\/]{2,}/g,"/"),b=e=>Le(e.join("/")),J=e=>e.replace(/\/+$/,""),ft=e=>J(e).replace(/^\/*/,"/"),ht=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,dt=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,mt=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function pt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function yt(e){let t=e.map(r=>
10r.route.path).filter(Boolean);return b(t)||"/"}var ke=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function $e(e,t){let r=e;if(typeof r!="string"||!ne.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(ke)try{let o=new URL(window.location.href),l=Ee.test(r)?new URL(ze(r,o.protocol)):new URL(r),s=T(l.pathname,t);l.origin===o.origin&&s!=null?r=s+l.search+l.hash:a=!0}catch{P(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:a,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Te=["POST","PUT","PATCH","DELETE"];new Set(Te);var gt=["GET",...Te];new Set(gt);var vt=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Rt(e){try{return vt.includes(new URL(e).protocol)}catch{return!1}}var A=i.createContext(null);A.displayName="DataRouter";var K=i.createContext(null);K.displayName="DataRouterState";var Fe=i.createContext(!1);function Et(){return i.useContext(Fe)}var De=i.createContext({isTransitioning:!1});De.displayName="ViewTransition";var wt=i.createContext(new Map);wt.displayName="Fetchers";var xt=i.createContext(null);xt.displayName="Await";var S=i.createContext(null);S.displayName="Navigation";var B=i.createContext(null);B.displayName="Location";var L=i.createContext({outlet:null,matches:[],isDataRoute:!1});L.displayName="Route";var oe=i.createContext(null);oe.displayName="RouteError";var Ie="REACT_ROUTER_ERROR",Ct="REDIRECT",St="ROUTE_ERROR_RESPONSE";function bt(e){if(e.startsWith(`${Ie}:${Ct}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function Pt(e){if(e.startsWith(`${Ie}:${St}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new mt(t.status,t.statusText,t.data)}catch{}}function Lt(e,{relative:t}={}){w(_(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=i.useContext(S),{hash:a,pathname:o,search:l}=H(e,{relative:t}),s=o;return r!=="/"&&(s=o==="/"?r:b([r,o])),n.createHref({pathname:s,search:l,hash:a})}function _(){return i.useContext(B)!=null}function $(){return w(_(),"useLocation() may be used only in the context of a <Router> component."),i.useContext(B).location}var Ne="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ae(e){i.useContext(S).static||i.useLayoutEffect(e)}function Me(){let{isDataRoute:e}=i.useContext(L);return e?Wt():kt()}function kt(){w(_(),"useNavigate() may be used only in the context of a <Router> component.");let e=i.useContext(A),{basename:t,navigator:r}=i.useContext(S),{matches:n}=i.useContext(L),{pathname:a}=$(),o=JSON.stringify(Pe(n)),l=i.useRef(!1);return Ae(()=>{l.current=!0}),i.useCallback((u,c={})=>{if(P(l.current,Ne),!l.current)return;if(typeof u=="number"){r.go(u);return}let f=ae(u,JSON.parse(o),a,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:b([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,o,a,e])}var $t=i.createContext(null);function Tt(e){let t=i.useContext(L).outlet;return i.useMemo(()=>t&&i.createElement($t.Provider,{value:e},t),[t,e])}function Pr(){let{matches:e}=i.useContext(L),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function H(e,{relative:t}={}){let{matches:r}=i.useContext(L),{pathname:n}=$(),a=JSON.stringify(Pe(r));return i.useMemo(()=>ae(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function Ft(e,t){return Oe(e,t)}function Oe(e,t,r){var p;w(_(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=i.useContext(S),{matches:a}=i.useContext(L),o=a[a.length-1],l=o?o.params:{},s=o?o.pathname:"/",u=o?o.pathnameBase:"/",c=o&&o.route;{let m=c&&c.path||"";Be(s,!c||m.endsWith("*")||m.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${m}">) 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. 11 12Please change the parent <Route path="${m}"> to <Route path="${m==="/"?"*":`${m}/*`}">.`)}let f=$(),h;if(t){let m=typeof t=="string"?N(t):t;w(u==="/"||((p=m.pathname)==null?void 0:p.startsWith(u)),`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 "${u}" but pathname "${m.pathname}" was given in the \`location\` prop.`),h=m}else h=f;let d=h.pathname||"/",g=d;if(u!=="/"){let m=u.replace(/^\//,"").split("/");g="/"+d.replace(/^\//,"").split("/").slice(m.length).join("/")}let v=r&&r.state.matches.length?r.state.matches.map(m=>Object.assign(m,{route:r.manifest[m.route.id]||m.route})):we(e,{pathname:g});P(c||v!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),P(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.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 y=Mt(v&&v.map(m=>Object.assign({},m,{params:Object.assign({},l,m.params),pathname:b([u,n.encodeLocation?n.encodeLocation(m.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?u:b([u,n.encodeLocation?n.encodeLocation(m.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathnameBase])})),a,r);return t&&y?i.createElement(B.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...h},navigationType:"POP"}},y):y}function Dt(){let e=Ht(),t=pt(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 console.error("Error handled by React Router default ErrorBoundary:",e),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
12Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),r?i.createElement("pre",{style:a},r):null,l)}var It=i.createElement(Dt,null),Ue=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.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=Pt(e.digest);r&&(e=r)}let t=e!==void 0?i.createElement(L.Provider,{value:this.props.routeContext},i.createElement(oe.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?i.createElement(Nt,{error:e},t):t}};Ue.contextType=Fe;var Q=new WeakMap;function Nt({children:e,error:t}){let{basename:r}=i.useContext(S);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=bt(t.digest);if(n){let a=Q.get(t);if(a)throw a;let o=$e(n.location,r),l=o.absoluteURL||o.to;if(Rt(l))throw new Error("Invalid redirect location");if(ke&&!Q.get(t))if(o.isExternal||n.reloadDocument)window.location.href=l;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:n.replace}));throw Q.set(t,s),s}return i.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l}`})}}return e}function At({routeContext:e,match:t,children:r}){let n=i.useContext(A);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 Mt(e,t=[],r){let n=r==null?void 0:r.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n==null?void 0:n.errors;if(o!=null){let f=a.findIndex(h=>h.route.id&&(o==null?void 0:o[h.route.id])!==void 0);w(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,f+1))}let l=!1,s=-1;if(r&&n){l=n.renderFallback;for(let f=0;f<a.length;f++){let h=a[f];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(s=f),h.route.id){let{loaderData:d,errors:g}=n,v=h.route.loader&&!d.hasOwnProperty(h.route.id)&&(!g||g[h.route.id]===void 0);if(h.route.lazy||v){r.isStatic&&(l=!0),s>=0?a=a.slice(0,s+1):a=[a[0]];break}}}}let u=r==null?void 0:r.onError,c=n&&u?(f,h)=>{var d,g;u(f,{location:n.location,params:((g=(d=n.matches)==null?void 0:d[0])==null?void 0:g.params)??{},pattern:yt(n.matches),errorInfo:h})}:void 0;return a.reduceRight((f,h,d)=>{let g,v=!1,y=null,p=null;n&&(g=o&&h.route.id?o[h.route.id]:void 0,y=h.route.errorElement||It,l&&(s<0&&d===0?(Be("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,p=null):s===d&&(v=!0,p=h.route.hydrateFallbackElement||null)));let m=t.concat(a.slice(0,d+1)),R=()=>{let E;
12return g?E=y:v?E=p:h.route.Component?E=i.createElement(h.route.Component,null):h.route.element?E=h.route.element:E=f,i.createElement(At,{match:h,routeContext:{outlet:f,matches:m,isDataRoute:n!=null},children:E})};return n&&(h.route.ErrorBoundary||h.route.errorElement||d===0)?i.createElement(Ue,{location:n.location,revalidation:n.revalidation,component:y,error:g,children:R(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:c}):R()},null)}function le(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ot(e){let t=i.useContext(A);return w(t,le(e)),t}function Ut(e){let t=i.useContext(K);return w(t,le(e)),t}function Bt(e){let t=i.useContext(L);return w(t,le(e)),t}function ie(e){let t=Bt(e),r=t.matches[t.matches.length-1];return w(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function _t(){return ie("useRouteId")}function Ht(){var n;let e=i.useContext(oe),t=Ut("useRouteError"),r=ie("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function Wt(){let{router:e}=Ot("useNavigate"),t=ie("useNavigate"),r=i.useRef(!1);return Ae(()=>{r.current=!0}),i.useCallback(async(a,o={})=>{P(r.current,Ne),r.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var ve={};function Be(e,t,r){!t&&!ve[e]&&(ve[e]=!0,P(!1,r))}i.memo(jt);function jt({routes:e,manifest:t,future:r,state:n,isStatic:a,onError:o}){return Oe(e,void 0,{manifest:t,state:n,isStatic:a,onError:o})}function Lr(e){return Tt(e.context)}function Vt(e){w(!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 zt({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1,useTransitions:l}){w(!_(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),u=i.useMemo(()=>({basename:s,navigator:a,static:o,useTransitions:l,future:{}}),[s,a,o,l]);typeof r=="string"&&(r=N(r));let{pathname:c="/",search:f="",hash:h="",state:d=null,key:g="default",mask:v}=r,y=i.useMemo(()=>{let p=T(c,s);return p==null?null:{location:{pathname:p,search:f,hash:h,state:d,key:g,mask:v},navigationType:n}},[s,c,f,h,d,g,n,v]);return P(y!=null,`<Router basename="${s}"> is not able to match the URL "${c}${f}${h}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:i.createElement(S.Provider,{value:u},i.createElement(B.Provider,{children:t,value:y}))}function kr({children:e,location:t}){return Ft(te(e),t)}function te(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,te(n.props.children,o));return}w(n.type===Vt,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),w(!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,middleware:n.props.middleware,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=te(n.props.children,o)),r.push(l)}),r}var j="get",V="application/x-www-form-urlencoded";function Y(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Jt(e){return Y(e)&&e.tagName.toLowerCase()==="button"}function Kt(e){return Y(e)&&e.tagName.toLowerCase()==="form"}function Yt(e){return Y(e)&&e.tagName.toLowerCase()==="input"}function qt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Gt(e,t){return e.button===0&&(!t||t==="_self")&&!qt(e)}function re(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function Xt(e,t){let r=re(e);return t&&t.forEach((n,a)=>
12{r.has(a)||t.getAll(a).forEach(o=>{r.append(a,o)})}),r}var W=null;function Qt(){if(W===null)try{new FormData(document.createElement("form"),0),W=!1}catch{W=!0}return W}var Zt=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Z(e){return e!=null&&!Zt.has(e)?(P(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${V}"`),null):e}function er(e,t){let r,n,a,o,l;if(Kt(e)){let s=e.getAttribute("action");n=s?T(s,t):null,r=e.getAttribute("method")||j,a=Z(e.getAttribute("enctype"))||V,o=new FormData(e)}else if(Jt(e)||Yt(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||s.getAttribute("action");if(n=u?T(u,t):null,r=e.getAttribute("formmethod")||s.getAttribute("method")||j,a=Z(e.getAttribute("formenctype"))||Z(s.getAttribute("enctype"))||V,o=new FormData(s,e),!Qt()){let{name:c,type:f,value:h}=e;if(f==="image"){let d=c?`${c}.`:"";o.append(`${d}x`,"0"),o.append(`${d}y`,"0")}else c&&o.append(c,h)}}else{if(Y(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=j,n=null,a=V,l=e}return o&&a==="text/plain"&&(l=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function se(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function _e(e,t,r,n){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${n}`:a.pathname=`${a.pathname}.${n}`:a.pathname==="/"?a.pathname=`_root.${n}`:t&&T(a.pathname,t)==="/"?a.pathname=`${J(t)}/_root.${n}`:a.pathname=`${J(a.pathname)}.${n}`,a}async function tr(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function rr(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function nr(e,t,r){let n=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await tr(o,r);return l.links?l.links():[]}return[]}));return ir(n.flat(1).filter(rr).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function Re(e,t,r,n,a,o){let l=(u,c)=>r[c]?u.route.id!==r[c].route.id:!0,s=(u,c)=>{var f;return r[c].pathname!==u.pathname||((f=r[c].route.path)==null?void 0:f.endsWith("*"))&&r[c].params["*"]!==u.params["*"]};return o==="assets"?t.filter((u,c)=>l(u,c)||s(u,c)):o==="data"?t.filter((u,c)=>{var h;let f=n.routes[u.route.id];if(!f||!f.hasLoader)return!1;if(l(u,c)||s(u,c))return!0;if(u.route.shouldRevalidate){let d=u.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((h=r[0])==null?void 0:h.params)||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function ar(e,t,{includeHydrateFallback:r}={}){return or(e.map(n=>{let a=t.routes[n.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function or(e){return[...new Set(e)]}function lr(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function ir(e,t){let r=new Set;return new Set(t),e.reduce((n,a)=>{let o=JSON.stringify(lr(a));return r.has(o)||(r.add(o),n.push({key:o,link:a})),n},[])}function ue(){let e=i.useContext(A);return se(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function sr(){let e=i.useContext(K);return se(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ce=i.createContext(void 0);ce.displayName="FrameworkContext";function q(){let e=i.useContext(ce);return se(e,"You must render this element inside a <HydratedRouter> element"),e}function ur(e,t){let r=i.useContext(ce),[n,a]=i.useState(!1),[o,l]=i.useState(!1),{onFocus:s,onBlur:u,onMouseEnter:c,onMouseLeave:f,onTouchStart:h}=t,d=i.useRef(null);i.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let y=m=>{m.forEach(R=>{l(R.isIntersecting)})},p=new IntersectionObserver(y,{threshold:.5});return d.current&&p.observe(d.current),()=>{p.disconnect()}}},[e]),i.useEffect(()=>{if(n){let y=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(y)}}},[n]);let g=()=>{a(!0)},v=()=>{a(!1),l(!1)};return r?e!=="intent"?[o,d,{}]:[o,d,{onFocus:O(s,g),onBlur:O(u,v),onMouseEnter:O(c,g),onMouseLeave:O(f,v),onTouchStart:O(h,g)}]:[!1,d,{}]}function O(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function cr({page:e,...t}){let r=Et(),{nonce:n}=q(),{router:a}
12=ue(),o=i.useMemo(()=>we(a.routes,e,a.basename),[a.routes,e,a.basename]);return o?(t.nonce==null&&n&&(t={...t,nonce:n}),r?i.createElement(hr,{page:e,matches:o,...t}):i.createElement(dr,{page:e,matches:o,...t})):null}function fr(e){let{manifest:t,routeModules:r}=q(),[n,a]=i.useState([]);return i.useEffect(()=>{let o=!1;return nr(e,t,r).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,r]),n}function hr({page:e,matches:t,...r}){let n=$(),{future:a}=q(),{basename:o}=ue(),l=i.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let s=_e(e,o,a.v8_trailingSlashAwareDataRequests,"rsc"),u=!1,c=[];for(let f of t)typeof f.route.shouldRevalidate=="function"?u=!0:c.push(f.route.id);return u&&c.length>0&&s.searchParams.set("_routes",c.join(",")),[s.pathname+s.search]},[o,a.v8_trailingSlashAwareDataRequests,e,n,t]);return i.createElement(i.Fragment,null,l.map(s=>i.createElement("link",{key:s,rel:"prefetch",as:"fetch",href:s,...r})))}function dr({page:e,matches:t,...r}){let n=$(),{future:a,manifest:o,routeModules:l}=q(),{basename:s}=ue(),{loaderData:u,matches:c}=sr(),f=i.useMemo(()=>Re(e,t,c,o,n,"data"),[e,t,c,o,n]),h=i.useMemo(()=>Re(e,t,c,o,n,"assets"),[e,t,c,o,n]),d=i.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let y=new Set,p=!1;if(t.forEach(R=>{var C;let E=o.routes[R.route.id];!E||!E.hasLoader||(!f.some(x=>x.route.id===R.route.id)&&R.route.id in u&&((C=l[R.route.id])!=null&&C.shouldRevalidate)||E.hasClientLoader?p=!0:y.add(R.route.id))}),y.size===0)return[];let m=_e(e,s,a.v8_trailingSlashAwareDataRequests,"data");return p&&y.size>0&&m.searchParams.set("_routes",t.filter(R=>y.has(R.route.id)).map(R=>R.route.id).join(",")),[m.pathname+m.search]},[s,a.v8_trailingSlashAwareDataRequests,u,n,o,f,t,e,l]),g=i.useMemo(()=>ar(h,o),[h,o]),v=fr(h);return i.createElement(i.Fragment,null,d.map(y=>i.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...r})),g.map(y=>i.createElement("link",{key:y,rel:"modulepreload",href:y,...r})),v.map(({key:y,link:p})=>i.createElement("link",{key:y,nonce:r.nonce,...p,crossOrigin:p.crossOrigin??r.crossOrigin})))}function mr(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var pr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{pr&&(window.__reactRouterVersion="7.18.1")}catch{}function $r({basename:e,children:t,useTransitions:r,window:n}){let a=i.useRef();a.current==null&&(a.current=Je({window:n,v5Compat:!0}));let o=a.current,[l,s]=i.useState({action:o.action,location:o.location}),u=i.useCallback(c=>{r===!1?s(c):i.startTransition(()=>s(c))},[r]);return i.useLayoutEffect(()=>o.listen(u),[o,u]),i.createElement(zt,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,useTransitions:r})}var He=i.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:a,reloadDocument:o,replace:l,mask:s,state:u,target:c,to:f,preventScrollReset:h,viewTransition:d,defaultShouldRevalidate:g,...v},y){let{basename:p,navigator:m,useTransitions:R}=i.useContext(S),E=typeof f=="string"&&ne.test(f),C=$e(f,p);f=C.to;let x=Lt(f,{relative:a}),k=$(),F=null;if(s){let D=ae(s,[],k.mask?k.mask.pathname:"/",!0);p!=="/"&&(D.pathname=D.pathname==="/"?p:b([p,D.pathname])),F=m.createHref(D)}let[I,M,G]=ur(n,v),je=Rr(f,{replace:l,mask:s,state:u,target:c,preventScrollReset:h,relative:a,viewTransition:d,defaultShouldRevalidate:g,useTransitions:R});function Ve(D){t&&t(D),D.defaultPrevented||je(D)}let fe=!(C.isExternal||o),he=i.createElement("a",{...v,...G,href:(fe?F:void 0)||C.absoluteURL||x,onClick:fe?Ve:t,ref:mr(y,M),target:c,"data-discover":!E&&r==="render"?"true":void 0});return I&&!E?i.createElement(i.Fragment,null,he,i.createElement(cr,{page:x})):he});He.displayName="Link";var yr=i.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:a=!1,style:o,to:l,viewTransition:s,children:u,...c},f){let h=H(l,{relative:c.relative}),d=$(),g=i.useContext(K),{navigator:v,basename:y}=i.useContext(S),p=g!=null&&Sr(h)&&s===!0,m=v.encodeLocation?v.encodeLocation(h).pathname:h.pathname,R=d.pathname,E=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;r||(R=R.toLowerCase(),E=E?E.toLowerCase():null,m=m.toLowerCase()),E&&y&&(E=T(E,y)||E);const C=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let x=R===m||!a&&R.startsWith(m)&&R.charAt(C)==="/",k=E!=null&&(E===m||!a&&E.startsWith(m)&&E.charAt(m.length)==="/"),F={isActive:x,isPending:k,isTransitioning:p},I=x?t:void 0,M;typeof n=="function"?M=n(F):M=[n,x?"active":null,k?"pending":null,p?"transitioning":null].filter(
12Boolean).join(" ");let G=typeof o=="function"?o(F):o;return i.createElement(He,{...c,"aria-current":I,className:M,ref:f,style:G,to:l,viewTransition:s},typeof u=="function"?u(F):u)});yr.displayName="NavLink";var gr=i.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:o,method:l=j,action:s,onSubmit:u,relative:c,preventScrollReset:f,viewTransition:h,defaultShouldRevalidate:d,...g},v)=>{let{useTransitions:y}=i.useContext(S),p=xr(),m=Cr(s,{relative:c}),R=l.toLowerCase()==="get"?"get":"post",E=typeof s=="string"&&ne.test(s),C=x=>{if(u&&u(x),x.defaultPrevented)return;x.preventDefault();let k=x.nativeEvent.submitter,F=(k==null?void 0:k.getAttribute("formmethod"))||l,I=()=>p(k||x.currentTarget,{fetcherKey:t,method:F,navigate:r,replace:a,state:o,relative:c,preventScrollReset:f,viewTransition:h,defaultShouldRevalidate:d});y&&r!==!1?i.startTransition(()=>I()):I()};return i.createElement("form",{ref:v,method:R,action:m,onSubmit:n?u:C,...g,"data-discover":!E&&e==="render"?"true":void 0})});gr.displayName="Form";function vr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function We(e){let t=i.useContext(A);return w(t,vr(e)),t}function Rr(e,{target:t,replace:r,mask:n,state:a,preventScrollReset:o,relative:l,viewTransition:s,defaultShouldRevalidate:u,useTransitions:c}={}){let f=Me(),h=$(),d=H(e,{relative:l});return i.useCallback(g=>{if(Gt(g,t)){g.preventDefault();let v=r!==void 0?r:U(h)===U(d),y=()=>f(e,{replace:v,mask:n,state:a,preventScrollReset:o,relative:l,viewTransition:s,defaultShouldRevalidate:u});c?i.startTransition(()=>y()):y()}},[h,f,d,r,n,a,t,e,o,l,s,u,c])}function Tr(e){P(typeof URLSearchParams<"u","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 t=i.useRef(re(e)),r=i.useRef(!1),n=$(),a=i.useMemo(()=>Xt(n.search,r.current?null:t.current),[n.search]),o=Me(),l=i.useCallback((s,u)=>{const c=re(typeof s=="function"?s(new URLSearchParams(a)):s);r.current=!0,o("?"+c,u)},[o,a]);return[a,l]}var Er=0,wr=()=>`__${String(++Er)}__`;function xr(){let{router:e}=We("useSubmit"),{basename:t}=i.useContext(S),r=_t(),n=e.fetch,a=e.navigate;return i.useCallback(async(o,l={})=>{let{action:s,method:u,encType:c,formData:f,body:h}=er(o,t);if(l.navigate===!1){let d=l.fetcherKey||wr();await n(d,r,l.action||s,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:f,body:h,formMethod:l.method||u,formEncType:l.encType||c,flushSync:l.flushSync})}else await a(l.action||s,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:f,body:h,formMethod:l.method||u,formEncType:l.encType||c,replace:l.replace,state:l.state,fromRouteId:r,flushSync:l.flushSync,viewTransition:l.viewTransition})},[n,a,t,r])}function Cr(e,{relative:t}={}){let{basename:r}=i.useContext(S),n=i.useContext(L);w(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),o={...H(e||".",{relative:t})},l=$();if(e==null){o.search=l.search;let s=new URLSearchParams(o.search),u=s.getAll("index");if(u.some(f=>f==="")){s.delete("index"),u.filter(h=>h).forEach(h=>s.append("index",h));let f=s.toString();o.search=f?`?${f}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:b([r,o.pathname])),U(o)}function Sr(e,{relative:t}={}){let r=i.useContext(De);w(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=We("useViewTransitionState"),a=H(e,{relative:t});if(!r.isTransitioning)return!1;let o=T(r.currentLocation.pathname,n)||r.currentLocation.pathname,l=T(r.nextLocation.pathname,n)||r.nextLocation.pathname;return z(a.pathname,l)!=null||z(a.pathname,o)!=null}export{$r as B,He as L,yr as N,Lr as O,kr as R,Me as a,Tr as b,$ as c,Vt as d,Pr 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.