1import{r as Ne,g as pe,a as Fe}from"./react-vendor-BFjHA0Wy.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"2ecc7e431f5ea99c1855f803165b836ae53c68bb"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="54332c13-314f-4583-96a2-7dd734d3faa1",e._sentryDebugIdIdentifier="sentry-dbid-54332c13-314f-4583-96a2-7dd734d3faa1")})()}catch{}function _e(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const o=Object.getOwnPropertyDescriptor(n,a);o&&Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var i=Ne();const Me=pe(i),vr=_e({__proto__:null,default:Me},[i]);var se="popstate";function Ae(e={}){function t(n,a){let{pathname:o,search:l,hash:s}=n.location;return X("",{pathname:o,search:l,hash:s},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:B(a)}return Be(t,r,null,e)}function E(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function x(e,t){if(!e)try{throw new Error(t)}catch{}}function Ue(){return Math.random().toString(36).substring(2,10)}function ue(e,t){return{usr:e.state,key:e.key,idx:t}}function X(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?N(t):t,state:r,key:t&&t.key||n||Ue()}}function B({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 Be(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,l=a.history,s="POP",u=null,c=d();c==null&&(c=0,l.replaceState({...l.state,idx:c},""));function d(){return(l.state||{idx:null}).idx}function f(){s="POP";let m=d(),v=m==null?null:m-c;c=m,u&&u({action:s,location:g.location,delta:v})}function p(m,v){s="PUSH";let h=X(g.location,m,v);c=d()+1;let R=ue(h,c),S=g.createHref(h);try{l.pushState(R,"",S)}catch(b){if(b instanceof DOMException&&b.name==="DataCloneError")throw b;a.location.assign(S)}o&&u&&u({action:s,location:g.location,delta:1})}function y(m,v){s="REPLACE";let h=X(g.location,m,v);c=d();let R=ue(h,c),S=g.createHref(h);l.replaceState(R,"",S),o&&u&&u({action:s,location:g.location,delta:0})}function w(m){return We(m)}let g={get action(){return s},get location(){return e(a,l)},listen(m){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(se,f),u=m,()=>{a.removeEventListener(se,f),u=null}},createHref(m){return t(a,m)},createURL:w,encodeLocation(m){let v=w(m);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:p,replace:y,go(m){return l.go(m)}};return g}function We(e,t=!1){let r="http://localhost";
1typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),E(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:B(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function me(e,t,r="/"){return He(e,t,r,!1)}function He(e,t,r,n){let a=typeof t=="string"?N(t):t,o=$(a.pathname||"/",r);if(o==null)return null;let l=ye(e);je(l);let s=null;for(let u=0;s==null&&u<l.length;++u){let c=et(o);s=Qe(l[u],c,n)}return s}function ye(e,t=[],r=[],n="",a=!1){let o=(l,s,u=a,c)=>{let d={relativePath:c===void 0?l.path||"":c,caseSensitive:l.caseSensitive===!0,childrenIndex:s,route:l};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(n)&&u)return;E(d.relativePath.startsWith(n),`Absolute route path "${d.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(n.length)}let f=L([n,d.relativePath]),p=r.concat(d);l.children&&l.children.length>0&&(E(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),ye(l.children,t,p,f,u)),!(l.path==null&&!l.index)&&t.push({path:f,score:Ge(f,l.index),routesMeta:p})};return e.forEach((l,s)=>{if(l.path===""||!l.path?.includes("?"))o(l,s);else for(let u of ge(l.path))o(l,s,!0,u)}),t}function ge(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=ge(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 je(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Xe(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var ze=/^:[\w-]+$/,Ve=3,Je=2,Ke=1,Ye=10,qe=-2,ce=e=>e==="*";function Ge(e,t){let r=e.split("/"),n=r.length;return r.some(ce)&&(n+=qe),t&&(n+=Je),r.filter(a=>!ce(a)).reduce((a,o)=>a+(ze.test(o)?Ve:o===""?Ke:Ye),n)}function Xe(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 Qe(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,d=o==="/"?t:t.slice(o.length)||"/",f=V({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},d),p=u.route;if(!f&&c&&r&&!n[n.length-1].route.index&&(f=V({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},d)),!f)return null;
1Object.assign(a,f.params),l.push({params:a,pathname:L([o,f.pathname]),pathnameBase:at(L([o,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(o=L([o,f.pathnameBase]))}return l}function wr(e,t={}){let r=e;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(x(!1,`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`),r=r.replace(/\*$/,"/*"));const n=r.startsWith("/")?"/":"",a=l=>l==null?"":typeof l=="string"?l:String(l),o=r.split(/\/+/).map((l,s,u)=>{if(s===u.length-1&&l==="*")return a(t["*"]);const d=l.match(/^:([\w-]+)(\??)(.*)/);if(d){const[,f,p,y]=d;let w=t[f];return E(p==="?"||w!=null,`Missing ":${f}" param`),encodeURIComponent(a(w))+y}return l.replace(/\?$/g,"")}).filter(l=>!!l);return n+o.join("/")}function V(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Ze(e.path,e.caseSensitive,e.end),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:d,isOptional:f},p)=>{if(d==="*"){let w=s[p]||"";l=o.slice(0,o.length-w.length).replace(/(.)\/+$/,"$1")}const y=s[p];return f&&!y?c[d]=void 0:c[d]=(y||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:l,pattern:e}}function Ze(e,t=!1,r=!0){x(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,s,u)=>(n.push({paramName:s,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function et(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return x(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function $(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}var ve=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tt=e=>ve.test(e);function rt(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?N(e):e,o;if(r)if(tt(r))o=r;else{if(r.includes("//")){let l=r;r=r.replace(/\/\/+/g,"/"),x(!1,`Pathnames cannot have embedded double slashes - normalizing ${l} -> ${r}`)}r.startsWith("/")?o=fe(r.substring(1),"/"):o=fe(r,t)}else o=t;return{pathname:o,search:ot(n),hash:lt(a)}}function fe(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Y(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function nt(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function ee(e){let t=nt(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function te(e,t,r,n=!1){let a;typeof e=="string"?a=N(e):(a={...e},E(!a.pathname||!a.pathname.includes("?"),Y("?","pathname","search",a)),E(!a.pathname||!a.pathname.includes("#"),Y("#","pathname","hash",a)),E(!a.search||!a.search.includes("#"),Y("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,s;if(l==null)s=r;else{let f=t.length-1;if(!n&&l.startsWith("..")){let p=l.split("/");for(;p[0]==="..";)p.shift(),f-=1;a.pathname=p.join("/")}s=f>=0?t[f]:"/"}let u=rt(a,s),c=l&&l!=="/"&&l.endsWith("/"),d=(o||l===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}var L=e=>e.join("/").replace(/\/\/+/g,"/"),at=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ot=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,lt=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,it=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 st(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ut(e){return e.map(t=>
1t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var we=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Re(e,t){let r=e;if(typeof r!="string"||!ve.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(we)try{let o=new URL(window.location.href),l=r.startsWith("//")?new URL(o.protocol+r):new URL(r),s=$(l.pathname,t);l.origin===o.origin&&s!=null?r=s+l.search+l.hash:a=!0}catch{x(!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 Ee=["POST","PUT","PATCH","DELETE"];new Set(Ee);var ct=["GET",...Ee];new Set(ct);var F=i.createContext(null);F.displayName="DataRouter";var J=i.createContext(null);J.displayName="DataRouterState";var ft=i.createContext(!1),be=i.createContext({isTransitioning:!1});be.displayName="ViewTransition";var dt=i.createContext(new Map);dt.displayName="Fetchers";var ht=i.createContext(null);ht.displayName="Await";var C=i.createContext(null);C.displayName="Navigation";var _=i.createContext(null);_.displayName="Location";var P=i.createContext({outlet:null,matches:[],isDataRoute:!1});P.displayName="Route";var re=i.createContext(null);re.displayName="RouteError";var xe="REACT_ROUTER_ERROR",pt="REDIRECT",mt="ROUTE_ERROR_RESPONSE";function yt(e){if(e.startsWith(`${xe}:${pt}:{`))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 gt(e){if(e.startsWith(`${xe}:${mt}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new it(t.status,t.statusText,t.data)}catch{}}function vt(e,{relative:t}={}){E(M(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=i.useContext(C),{hash:a,pathname:o,search:l}=W(e,{relative:t}),s=o;return r!=="/"&&(s=o==="/"?r:L([r,o])),n.createHref({pathname:s,search:l,hash:a})}function M(){return i.useContext(_)!=null}function k(){return E(M(),"useLocation() may be used only in the context of a <Router> component."),i.useContext(_).location}function Rr(){return i.useContext(_).navigationType}var Ce="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Se(e){i.useContext(C).static||i.useLayoutEffect(e)}function ne(){let{isDataRoute:e}=i.useContext(P);return e?It():wt()}function wt(){E(M(),"useNavigate() may be used only in the context of a <Router> component.");let e=i.useContext(F),{basename:t,navigator:r}=i.useContext(C),{matches:n}=i.useContext(P),{pathname:a}=k(),o=JSON.stringify(ee(n)),l=i.useRef(!1);return Se(()=>{l.current=!0}),i.useCallback((u,c={})=>{if(x(l.current,Ce),!l.current)return;if(typeof u=="number"){r.go(u);return}let d=te(u,JSON.parse(o),a,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:L([t,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[t,r,o,a,e])}var Rt=i.createContext(null);function Et(e){let t=i.useContext(P).outlet;return i.useMemo(()=>t&&i.createElement(Rt.Provider,{value:e},t),[t,e])}function Er(){let{matches:e}=i.useContext(P),t=e[e.length-1];return t?t.params:{}}function W(e,{relative:t}={}){let{matches:r}=i.useContext(P),{pathname:n}=k(),a=JSON.stringify(ee(r));return i.useMemo(()=>te(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function bt(e,t){return Pe(e,t)}function Pe(e,t,r,n,a){E(M(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=i.useContext(C),{matches:l}=i.useContext(P),s=l[l.length-1],u=s?s.params:{},c=s?s.pathname:"/",d=s?s.pathnameBase:"/",f=s&&s.route;{let h=f&&f.path||"";$e(c,!f||h.endsWith("*")||h.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${h}">) 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. 2 3Please change the parent <Route path="${h}"> to <Route path="${h==="/"?"*":`${h}/*`}">.`)}let p=k(),y;if(t){let h=typeof t=="string"?N(t):t;E(d==="/"||h.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 "${h.pathname}" was given in the \`location\` prop.`),y=h}else y=p;let w=y.pathname||"/",g=w;if(d!=="/"){let h=d.replace(/^\//,"").split("/");g="/"+w.replace(/^\//,"").split("/").slice(h.length).join("/")}let m=me(e,{pathname:g});x(f||m!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),x(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.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 v=Lt(m&&m.map(h=>Object.assign({},h,{params:Object.assign({},u,h.params),pathname:L([d,o.encodeLocation?o.encodeLocation(h.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathname]),pathnameBase:h.pathnameBase==="/"?d:L([d,o.encodeLocation?o.encodeLocation(h.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathnameBase])})),l,r,n,a);return t&&v?i.createElement(_.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...y},navigationType:"POP"}},v):v}
3function xt(){let e=Ot(),t=st(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},l=null;return l=i.createElement(i.Fragment,null,i.createElement("p",null,"ð¿ Hey developer ð"),i.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",i.createElement("code",{style:o},"ErrorBoundary")," or"," ",i.createElement("code",{style:o},"errorElement")," prop on your route.")),i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),r?i.createElement("pre",{style:a},r):null,l)}var Ct=i.createElement(xt,null),Le=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)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=gt(e.digest);r&&(e=r)}let t=e!==void 0?i.createElement(P.Provider,{value:this.props.routeContext},i.createElement(re.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?i.createElement(St,{error:e},t):t}};Le.contextType=ft;var q=new WeakMap;function St({children:e,error:t}){let{basename:r}=i.useContext(C);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=yt(t.digest);if(n){let a=q.get(t);if(a)throw a;let o=Re(n.location,r);if(we&&!q.get(t))if(o.isExternal||n.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:n.replace}));throw q.set(t,l),l}return i.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function Pt({routeContext:e,match:t,children:r}){let n=i.useContext(F);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),i.createElement(P.Provider,{value:e},r)}function Lt(e,t=[],r=null,n=null,a=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,l=r?.errors;if(l!=null){let d=o.findIndex(f=>f.route.id&&l?.[f.route.id]!==void 0);E(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),o=o.slice(0,Math.min(o.length,d+1))}let s=!1,u=-1;if(r)for(let d=0;d<o.length;d++){let f=o[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:p,errors:y}=r,w=f.route.loader&&!p.hasOwnProperty(f.route.id)&&(!y||y[f.route.id]===void 0);if(f.route.lazy||w){s=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}let c=r&&n?(d,f)=>{n(d,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:ut(r.matches),errorInfo:f})}:void 0;return o.reduceRight((d,f,p)=>{let y,w=!1,g=null,m=null;r&&(y=l&&f.route.id?l[f.route.id]:void 0,g=f.route.errorElement||Ct,s&&(u<0&&p===0?($e("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,m=null):u===p&&(w=!0,m=f.route.hydrateFallbackElement||null)));let v=t.concat(o.slice(0,p+1)),h=()=>{let R;return y?R=g:w?R=m:f.route.Component?R=i.createElement(f.route.Component,null):f.route.element?R=f.route.element:R=d,i.createElement(Pt,{match:f,routeContext:{outlet:d,matches:v,isDataRoute:r!=null},children:R})};return r&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?i.createElement(Le,{location:r.location,revalidation:r.revalidation,component:g,error:y,children:h(),routeC
3ontext:{outlet:null,matches:v,isDataRoute:!0},onError:c}):h()},null)}function ae(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function $t(e){let t=i.useContext(F);return E(t,ae(e)),t}function kt(e){let t=i.useContext(J);return E(t,ae(e)),t}function Tt(e){let t=i.useContext(P);return E(t,ae(e)),t}function oe(e){let t=Tt(e),r=t.matches[t.matches.length-1];return E(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Dt(){return oe("useRouteId")}function Ot(){let e=i.useContext(re),t=kt("useRouteError"),r=oe("useRouteError");return e!==void 0?e:t.errors?.[r]}function It(){let{router:e}=$t("useNavigate"),t=oe("useNavigate"),r=i.useRef(!1);return Se(()=>{r.current=!0}),i.useCallback(async(a,o={})=>{x(r.current,Ce),r.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var de={};function $e(e,t,r){!t&&!de[e]&&(de[e]=!0,x(!1,r))}i.memo(Nt);function Nt({routes:e,future:t,state:r,onError:n}){return Pe(e,void 0,r,n,t)}function br({to:e,replace:t,state:r,relative:n}){E(M(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=i.useContext(C);x(!a,"<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:o}=i.useContext(P),{pathname:l}=k(),s=ne(),u=te(e,ee(o),l,n==="path"),c=JSON.stringify(u);return i.useEffect(()=>{s(JSON.parse(c),{replace:t,state:r,relative:n})},[s,c,n,t,r]),null}function xr(e){return Et(e.context)}function Ft(e){E(!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 _t({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1,unstable_useTransitions:l}){E(!M(),"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,unstable_useTransitions:l,future:{}}),[s,a,o,l]);typeof r=="string"&&(r=N(r));let{pathname:c="/",search:d="",hash:f="",state:p=null,key:y="default"}=r,w=i.useMemo(()=>{let g=$(c,s);return g==null?null:{location:{pathname:g,search:d,hash:f,state:p,key:y},navigationType:n}},[s,c,d,f,p,y,n]);return x(w!=null,`<Router basename="${s}"> is not able to match the URL "${c}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:i.createElement(C.Provider,{value:u},i.createElement(_.Provider,{children:t,value:w}))}function Cr({children:e,location:t}){return bt(Q(e),t)}function Q(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,Q(n.props.children,o));return}E(n.type===Ft,`[${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>`),E(!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=Q(n.props.children,o)),r.push(l)}),r}var j="get",z="application/x-www-form-urlencoded";function K(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Mt(e){return K(e)&&e.tagName.toLowerCase()==="button"}function At(e){return K(e)&&e.tagName.toLowerCase()==="form"}function Ut(e){return K(e)&&e.tagName.toLowerCase()==="input"}function Bt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Wt(e,t){return e.button===0&&(!t||t==="_self")&&!Bt(e)}function Z(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 Ht(e,t){let r=Z(e);return t&&t.forEach((n,a)=>
3{r.has(a)||t.getAll(a).forEach(o=>{r.append(a,o)})}),r}var H=null;function jt(){if(H===null)try{new FormData(document.createElement("form"),0),H=!1}catch{H=!0}return H}var zt=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function G(e){return e!=null&&!zt.has(e)?(x(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${z}"`),null):e}function Vt(e,t){let r,n,a,o,l;if(At(e)){let s=e.getAttribute("action");n=s?$(s,t):null,r=e.getAttribute("method")||j,a=G(e.getAttribute("enctype"))||z,o=new FormData(e)}else if(Mt(e)||Ut(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?$(u,t):null,r=e.getAttribute("formmethod")||s.getAttribute("method")||j,a=G(e.getAttribute("formenctype"))||G(s.getAttribute("enctype"))||z,o=new FormData(s,e),!jt()){let{name:c,type:d,value:f}=e;if(d==="image"){let p=c?`${c}.`:"";o.append(`${p}x`,"0"),o.append(`${p}y`,"0")}else c&&o.append(c,f)}}else{if(K(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=j,n=null,a=z,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 le(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Jt(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&&$(a.pathname,t)==="/"?a.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${n}`,a}async function Kt(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{return window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Yt(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 qt(e,t,r){let n=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await Kt(o,r);return l.links?l.links():[]}return[]}));return Zt(n.flat(1).filter(Yt).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function he(e,t,r,n,a,o){let l=(u,c)=>r[c]?u.route.id!==r[c].route.id:!0,s=(u,c)=>r[c].pathname!==u.pathname||r[c].route.path?.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)=>{let d=n.routes[u.route.id];if(!d||!d.hasLoader)return!1;if(l(u,c)||s(u,c))return!0;if(u.route.shouldRevalidate){let f=u.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function Gt(e,t,{includeHydrateFallback:r}={}){return Xt(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 Xt(e){return[...new Set(e)]}function Qt(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function Zt(e,t){let r=new Set;return new Set(t),e.reduce((n,a)=>{let o=JSON.stringify(Qt(a));return r.has(o)||(r.add(o),n.push({key:o,link:a})),n},[])}function ke(){let e=i.useContext(F);return le(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function er(){let e=i.useContext(J);return le(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ie=i.createContext(void 0);
3ie.displayName="FrameworkContext";function Te(){let e=i.useContext(ie);return le(e,"You must render this element inside a <HydratedRouter> element"),e}function tr(e,t){let r=i.useContext(ie),[n,a]=i.useState(!1),[o,l]=i.useState(!1),{onFocus:s,onBlur:u,onMouseEnter:c,onMouseLeave:d,onTouchStart:f}=t,p=i.useRef(null);i.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let g=v=>{v.forEach(h=>{l(h.isIntersecting)})},m=new IntersectionObserver(g,{threshold:.5});return p.current&&m.observe(p.current),()=>{m.disconnect()}}},[e]),i.useEffect(()=>{if(n){let g=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(g)}}},[n]);let y=()=>{a(!0)},w=()=>{a(!1),l(!1)};return r?e!=="intent"?[o,p,{}]:[o,p,{onFocus:U(s,y),onBlur:U(u,w),onMouseEnter:U(c,y),onMouseLeave:U(d,w),onTouchStart:U(f,y)}]:[!1,p,{}]}function U(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function rr({page:e,...t}){let{router:r}=ke(),n=i.useMemo(()=>me(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?i.createElement(ar,{page:e,matches:n,...t}):null}function nr(e){let{manifest:t,routeModules:r}=Te(),[n,a]=i.useState([]);return i.useEffect(()=>{let o=!1;return qt(e,t,r).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,r]),n}function ar({page:e,matches:t,...r}){let n=k(),{future:a,manifest:o,routeModules:l}=Te(),{basename:s}=ke(),{loaderData:u,matches:c}=er(),d=i.useMemo(()=>he(e,t,c,o,n,"data"),[e,t,c,o,n]),f=i.useMemo(()=>he(e,t,c,o,n,"assets"),[e,t,c,o,n]),p=i.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let g=new Set,m=!1;if(t.forEach(h=>{let R=o.routes[h.route.id];!R||!R.hasLoader||(!d.some(S=>S.route.id===h.route.id)&&h.route.id in u&&l[h.route.id]?.shouldRevalidate||R.hasCl
3ientLoader?m=!0:g.add(h.route.id))}),g.size===0)return[];let v=Jt(e,s,a.unstable_trailingSlashAwareDataRequests,"data");return m&&g.size>0&&v.searchParams.set("_routes",t.filter(h=>g.has(h.route.id)).map(h=>h.route.id).join(",")),[v.pathname+v.search]},[s,a.unstable_trailingSlashAwareDataRequests,u,n,o,d,t,e,l]),y=i.useMemo(()=>Gt(f,o),[f,o]),w=nr(f);return i.createElement(i.Fragment,null,p.map(g=>i.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...r})),y.map(g=>i.createElement("link",{key:g,rel:"modulepreload",href:g,...r})),w.map(({key:g,link:m})=>i.createElement("link",{key:g,nonce:r.nonce,...m})))}function or(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var lr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{lr&&(window.__reactRouterVersion="7.12.0")}catch{}function Sr({basename:e,children:t,unstable_useTransitions:r,window:n}){let a=i.useRef();a.current==null&&(a.current=Ae({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(_t,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,unstable_useTransitions:r})}var De=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Oe=i.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:a,reloadDocument:o,replace:l,state:s,target:u,to:c,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:p,...y},w){let{basename:g,unstable_useTransitions:m}=i.useContext(C),v=typeof c=="string"&&De.test(c),h=Re(c,g);c=h.to;let R=vt(c,{relative:a}),[S,b,T]=tr(n,y),D=cr(c,{replace:l,state:s,target:u,preventScrollReset:d,relative:a,viewTransition:f,unstable_defaultShouldRevalidate:p,unstable_useTransitions:m});function O(A){t&&t(A),A.defaultPrevented||D(A)}let I=i.createElement("a",{...y,...T,href:h.absoluteURL||R,onClick:h.isExternal||o?t:O,ref:or(w,b),target:u,"data-discover":!v&&r==="render"?"true":void 0});return S&&!v?i.createElement(i.Fragment,null,I,i.createElement(rr,{page:R})):I});Oe.displayName="Link";var ir=i.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:a=!1,style:o,to:l,viewTransition:s,children:u,...c},d){let f=W(l,{relative:c.relative}),p=k(),y=i.useContext(J),{navigator:w,basename:g}=i.useContext(C),m=y!=null&&mr(f)&&s===!0,v=w.encodeLocation?w.encodeLocation(f).pathname:f.pathname,h=p.pathname,R=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;r||(h=h.toLowerCase(),R=R?R.toLowerCase():null,v=v.toLowerCase()),R&&g&&(R=$(R,g)||R);const S=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let b=h===v||!a&&h.startsWith(v)&&h.charAt(S)==="/",T=R!=null&&(R===v||!a&&R.startsWith(v)&&R.charAt(v.length)==="/"),D={isActive:b,isPending:T,isTransitioning:m},O=b?t:void 0,I;typeof n=="function"?I=n(D):I=[n,b?"active":null,T?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let A=typeof o=="function"?o(D):o;return i.createElement(Oe,{...c,"aria-current":O,className:I,ref:d,style:A,to:l,viewTransition:s},typeof u=="function"?u(D):u)});ir.displayName="NavLink";var sr=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:d,viewTransition:f,unstable_defaultShouldRevalidate:p,...y},w)=>{let{unstable_useTransitions:g}=i.useContext(C),m=hr(),v=pr(s,{relative:c}
3),h=l.toLowerCase()==="get"?"get":"post",R=typeof s=="string"&&De.test(s),S=b=>{if(u&&u(b),b.defaultPrevented)return;b.preventDefault();let T=b.nativeEvent.submitter,D=T?.getAttribute("formmethod")||l,O=()=>m(T||b.currentTarget,{fetcherKey:t,method:D,navigate:r,replace:a,state:o,relative:c,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:p});g&&r!==!1?i.startTransition(()=>O()):O()};return i.createElement("form",{ref:w,method:h,action:v,onSubmit:n?u:S,...y,"data-discover":!R&&e==="render"?"true":void 0})});sr.displayName="Form";function ur(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ie(e){let t=i.useContext(F);return E(t,ur(e)),t}function cr(e,{target:t,replace:r,state:n,preventScrollReset:a,relative:o,viewTransition:l,unstable_defaultShouldRevalidate:s,unstable_useTransitions:u}={}){let c=ne(),d=k(),f=W(e,{relative:o});return i.useCallback(p=>{if(Wt(p,t)){p.preventDefault();let y=r!==void 0?r:B(d)===B(f),w=()=>c(e,{replace:y,state:n,preventScrollReset:a,relative:o,viewTransition:l,unstable_defaultShouldRevalidate:s});u?i.startTransition(()=>w()):w()}},[d,c,f,r,n,t,e,a,o,l,s,u])}function Pr(e){x(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(Z(e)),r=i.useRef(!1),n=k(),a=i.useMemo(()=>Ht(n.search,r.current?null:t.current),[n.search]),o=ne(),l=i.useCallback((s,u)=>{const c=Z(typeof s=="function"?s(new URLSearchParams(a)):s);r.current=!0,o("?"+c,u)},[o,a]);return[a,l]}var fr=0,dr=()=>`__${String(++fr)}__`;function hr(){let{router:e}=Ie("useSubmit"),{basename:t}=i.useContext(C),r=Dt(),n=e.fetch,a=e.navigate;return i.useCallback(async(o,l={})=>{let{action:s,method:u,encType:c,formData:d,body:f}=Vt(o,t);if(l.navigate===!1){let p=l.fetcherKey||dr();await n(p,r,l.action||s,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:d,body:f,formMethod:l.method||u,formEncType:l.encType||c,flushSync:l.flushSync})}else await a(l.action||s,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:d,body:f,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 pr(e,{relative:t}={}){let{basename:r}=i.useContext(C),n=i.useContext(P);E(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),o={...W(e||".",{relative:t})},l=k();if(e==null){o.search=l.search;let s=new URLSearchParams(o.search),u=s.getAll("index");if(u.some(d=>d==="")){s.delete("index"),u.filter(f=>f).forEach(f=>s.append("index",f));let d=s.toString();o.search=d?`?${d}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:L([r,o.pathname])),B(o)}function mr(e,{relative:t}={}){let r=i.useContext(be);E(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Ie("useViewTransitionState"),a=W(e,{relative:t});if(!r.isTransitioning)return!1;let o=$(r.currentLocation.pathname,n)||r.currentLocation.pathname,l=$(r.nextLocation.pathname,n)||r.nextLocation.pathname;return V(a.pathname,l)!=null||V(a.pathname,o)!=null}var yr=Fe();const Lr=pe(yr);export{Sr as B,Oe as L,br as N,xr as O,vr as R,yr as a,Lr as b,Me as c,k as d,ir as e,Cr as f,wr as g,Ft as h,Rr as i,me as j,Pr as k,bt as l,V as m,Er as n,i as r,ne as u}; 4//# sourceMappingURL=router-BNmspi0x.js.map
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.