(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,522683,e=>{"use strict";var t,r,n,a;function o(){return(o=Object.assign.bind()).apply(this,arguments)}(n=t||(t={})).Pop="POP",n.Push="PUSH",n.Replace="REPLACE";let i="popstate";function l(e,t){if(!1===e||null==e)throw Error(t)}function s(e,t){if(!e){"u">typeof console&&console.warn(t);try{throw Error(t)}catch(e){}}}function u(e,t){return{usr:e.state,key:e.key,idx:t}}function c(e,t,r,n){return void 0===r&&(r=null),o({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?h(t):t,{state:r,key:t&&t.key||n||Math.random().toString(36).substr(2,8)})}function d(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&"?"!==r&&(t+="?"===r.charAt(0)?r:"?"+r),n&&"#"!==n&&(t+="#"===n.charAt(0)?n:"#"+n),t}function h(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function f(e,r,n,a){void 0===a&&(a={});let{window:h=document.defaultView,v5Compat:f=!1}=a,p=h.history,m=t.Pop,v=null,g=y();function y(){return(p.state||{idx:null}).idx}function b(){let e=t.Pop,r=y();if(null!=r){let t=r-g;m=e,g=r,v&&v({action:m,location:E.location,delta:t})}else s(!1,"You are trying to block a POP navigation to a location that was not created by @remix-run/router. The block will fail silently in production, but in general you should do all navigation with the router (instead of using window.history.pushState directly) to avoid this situation.")}function w(e){let t="null"!==h.location.origin?h.location.origin:h.location.href,r="string"==typeof e?e:d(e);return l(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}null==g&&(g=0,p.replaceState(o({},p.state,{idx:g}),""));let E={get action(){return m},get location(){return e(h,p)},listen(e){if(v)throw Error("A history only accepts one active listener");return h.addEventListener(i,b),v=e,()=>{h.removeEventListener(i,b),v=null}},createHref:e=>r(h,e),createURL:w,encodeLocation(e){let t=w(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,r){m=t.Push;let a=c(E.location,e,r);n&&n(a,e);let o=u(a,g=y()+1),i=E.createHref(a);try{p.pushState(o,"",i)}catch(e){h.location.assign(i)}f&&v&&v({action:m,location:E.location,delta:1})},replace:function(e,r){m=t.Replace;let a=c(E.location,e,r);n&&n(a,e);let o=u(a,g=y()),i=E.createHref(a);p.replaceState(o,"",i),f&&v&&v({action:m,location:E.location,delta:0})},go:e=>p.go(e)};return E}function p(e,t,r){return void 0===t&&(t=[]),void 0===r&&(r=new Set),e.map((e,n)=>{let a=[...t,n],i="string"==typeof e.id?e.id:a.join("-");return(l(!0!==e.index||!e.children,"Cannot specify children on an index route"),l(!r.has(i),'Found a route id collision on id "'+i+"\".  Route id's must be globally unique within Data Router usages"),r.add(i),!0===e.index)?o({},e,{id:i}):o({},e,{id:i,children:e.children?p(e.children,a,r):void 0})})}function m(e,t,r){void 0===r&&(r="/");let n=b(("string"==typeof t?h(t):t).pathname||"/",r);if(null==n)return null;let a=function e(t,r,n,a){void 0===r&&(r=[]),void 0===n&&(n=[]),void 0===a&&(a="");let o=(t,o,i)=>{var s,u;let c,d,h={relativePath:void 0===i?t.path||"":i,caseSensitive:!0===t.caseSensitive,childrenIndex:o,route:t};h.relativePath.startsWith("/")&&(l(h.relativePath.startsWith(a),'Absolute route path "'+h.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),h.relativePath=h.relativePath.slice(a.length));let f=P([a,h.relativePath]),p=n.concat(h);t.children&&t.children.length>0&&(l(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+f+'".'),e(t.children,r,p,f)),(null!=t.path||t.index)&&r.push({path:f,score:(s=f,u=t.index,d=(c=s.split("/")).length,c.some(g)&&(d+=-2),u&&(d+=2),c.filter(e=>!g(e)).reduce((e,t)=>e+(v.test(t)?3:""===t?1:10),d)),routesMeta:p})};return t.forEach((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of function e(t){let r=t.split("/");if(0===r.length)return[];let[n,...a]=r,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===a.length)return o?[i,""]:[i];let l=e(a.join("/")),s=[];return s.push(...l.map(e=>""===e?i:[i,e].join("/"))),o&&s.push(...l),s.map(e=>t.startsWith("/")&&""===e?"/":e)}(e.path))o(e,t,r);else o(e,t)}),r}(e);a.sort((e,t)=>{var r,n;return e.score!==t.score?t.score-e.score:(r=e.routesMeta.map(e=>e.childrenIndex),n=t.routesMeta.map(e=>e.childrenIndex),r.length===n.length&&r.slice(0,-1).every((e,t)=>e===n[t])?r[r.length-1]-n[n.length-1]:0)});let o=null;for(let e=0;null==o&&e<a.length;++e)o=function(e,t){let{routesMeta:r}=e,n={},a="/",o=[];for(let e=0;e<r.length;++e){let i=r[e],l=e===r.length-1,s="/"===a?t:t.slice(a.length)||"/",u=y({path:i.relativePath,caseSensitive:i.caseSensitive,end:l},s);if(!u)return null;Object.assign(n,u.params);let c=i.route;o.push({params:n,pathname:P([a,u.pathname]),pathnameBase:x(P([a,u.pathnameBase])),route:c}),"/"!==u.pathnameBase&&(a=P([a,u.pathnameBase]))}return o}(a[e],function(e){try{return decodeURI(e)}catch(t){return w(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}(n));return o}(a=r||(r={})).data="data",a.deferred="deferred",a.redirect="redirect",a.error="error";let v=/^:\w+$/,g=e=>"*"===e;function y(e,t){var r,n,a;let o,i;"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[l,s]=(r=e.path,n=e.caseSensitive,a=e.end,void 0===n&&(n=!1),void 0===a&&(a=!0),w("*"===r||!r.endsWith("*")||r.endsWith("/*"),'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(/\*$/,"/*")+'".'),o=[],i="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(e,t)=>(o.push(t),"/([^\\/]+)")),r.endsWith("*")?(o.push("*"),i+="*"===r||"/*"===r?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":""!==r&&"/"!==r&&(i+="(?:(?=\\/|$))"),[new RegExp(i,n?void 0:"i"),o]),u=t.match(l);if(!u)return null;let c=u[0],d=c.replace(/(.)\/+$/,"$1"),h=u.slice(1);return{params:s.reduce((e,t,r)=>{if("*"===t){let e=h[r]||"";d=c.slice(0,c.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(r){return w(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+r+")."),e}}(h[r]||"",t),e},{}),pathname:c,pathnameBase:d,pattern:e}}function b(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 w(e,t){if(!e){"u">typeof console&&console.warn(t);try{throw Error(t)}catch(e){}}}function E(e,t){var r;let n;void 0===t&&(t="/");let{pathname:a,search:o="",hash:i=""}="string"==typeof e?h(e):e;return{pathname:a?a.startsWith("/")?a:(r=a,n=t.replace(/\/+$/,"").split("/"),r.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"):t,search:S(o),hash:A(i)}}function D(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 R(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function C(e,t,r,n){let a,i;void 0===n&&(n=!1),"string"==typeof e?a=h(e):(l(!(a=o({},e)).pathname||!a.pathname.includes("?"),D("?","pathname","search",a)),l(!a.pathname||!a.pathname.includes("#"),D("#","pathname","hash",a)),l(!a.search||!a.search.includes("#"),D("#","search","hash",a)));let s=""===e||""===a.pathname,u=s?"/":a.pathname;if(n||null==u)i=r;else{let e=t.length-1;if(u.startsWith("..")){let t=u.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}i=e>=0?t[e]:"/"}let c=E(a,i),d=u&&"/"!==u&&u.endsWith("/"),f=(s||"."===u)&&r.endsWith("/");return!c.pathname.endsWith("/")&&(d||f)&&(c.pathname+="/"),c}let P=e=>e.join("/").replace(/\/\/+/g,"/"),x=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),S=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",A=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class M extends Error{}class L{trackPromise(e,t){if(!(t instanceof Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let r=Promise.race([t,this.abortPromise]).then(t=>this.onSettle(r,e,null,t),t=>this.onSettle(r,e,t));return r.catch(()=>{}),Object.defineProperty(r,"_tracked",{get:()=>!0}),r}onSettle(e,t,r,n){return this.controller.signal.aborted&&r instanceof M?(this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>r}),Promise.reject(r)):(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),r)?(Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)):(Object.defineProperty(e,"_data",{get:()=>n}),this.emit(!1,t),n)}emit(e,t){this.subscribers.forEach(r=>r(e,t))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((e,t)=>this.pendingKeysSet.delete(t)),this.emit(!0)}async resolveData(e){let t=!1;if(!this.done){let r=()=>this.cancel();e.addEventListener("abort",r),t=await new Promise(t=>{this.subscribe(n=>{e.removeEventListener("abort",r),(n||this.done)&&t(n)})})}return t}get done(){return 0===this.pendingKeysSet.size}get unwrappedData(){return l(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((e,t)=>{let[r,n]=t;return Object.assign(e,{[r]:function(e){if(!(e instanceof Promise&&!0===e._tracked))return e;if(e._error)throw e._error;return e._data}(n)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}constructor(e,t){let r;this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],l(e&&"object"==typeof e&&!Array.isArray(e),"defer() only accepts plain objects"),this.abortPromise=new Promise((e,t)=>r=t),this.controller=new AbortController;let n=()=>r(new M("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",n),this.controller.signal.addEventListener("abort",n),this.data=Object.entries(e).reduce((e,t)=>{let[r,n]=t;return Object.assign(e,{[r]:this.trackPromise(r,n)})},{}),this.init=t}}class k{constructor(e,t,r,n){void 0===n&&(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 U(e){return e instanceof k}let O=["post","put","patch","delete"],_=new Set(O),j=new Set(["get",...O]),T=new Set([301,302,303,307,308]),F=new Set([307,308]),N={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},B={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},H={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},I="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement,W=!I,$=Symbol("deferred");function q(e,t,r){var n;let a;void 0===r&&(r=!1);let o="string"==typeof e?e:d(e);if(!t||!(null!=t&&"formData"in t))return{path:o};if(t.formMethod&&(n=t.formMethod,!j.has(n)))return{path:o,error:en(405,{method:t.formMethod})};if(t.formData&&ed((a={formMethod:t.formMethod||"get",formAction:eo(o),formEncType:t&&t.formEncType||"application/x-www-form-urlencoded",formData:t.formData}).formMethod))return{path:o,submission:a};let i=h(o);try{let e=X(t.formData);r&&i.search&&ep(i.search)&&e.append("index",""),i.search="?"+e}catch(e){return{path:o,error:en(400)}}return{path:d(i),submission:a}}function K(e,t){let r=e;if(t){let n=e.findIndex(e=>e.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function z(e,t,r,n,a,o,i,l,s,u,c){let d=u?Object.values(u)[0]:s?Object.values(s)[0]:void 0,h=K(r,u?Object.keys(u)[0]:void 0).filter((r,l)=>{var s,u,c;let h,f;return null!=r.route.loader&&(s=t.loaderData,u=t.matches[l],c=r,h=!u||c.route.id!==u.route.id,f=void 0===s[c.route.id],h||f||i.some(e=>e===r.route.id)||J(e,t.location,t.matches[l],n,a,r,o,d))}),f=[];return c&&c.forEach((t,r)=>{let[a,i,s]=t;l.includes(r)?f.push([r,a,i,s]):o&&J(e,a,i,n,a,i,o,d)&&f.push([r,a,i,s])}),[h,f]}function Y(e,t){let r=e.route.path;return e.pathname!==t.pathname||r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function J(e,t,r,n,a,i,l,s){let u=e.createURL(t),c=r.params,d=e.createURL(a),h=i.params,f=Y(r,i)||u.toString()===d.toString()||u.search!==d.search||l;if(i.route.shouldRevalidate){let e=i.route.shouldRevalidate(o({currentUrl:u,currentParams:c,nextUrl:d,nextParams:h},n,{actionResult:s,defaultShouldRevalidate:f}));if("boolean"==typeof e)return e}return f}async function V(e,t,n,a,o,i,s,u){let c,h,f;void 0===o&&(o="/"),void 0===i&&(i=!1),void 0===s&&(s=!1);let p=new Promise((e,t)=>f=t),m=()=>f();t.signal.addEventListener("abort",m);try{let r=n.route[e];l(r,"Could not find the "+e+' to run on the "'+n.route.id+'" route'),h=await Promise.race([r({request:t,params:n.params,context:u}),p]),l(void 0!==h,"You defined "+("action"===e?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `")+e+"` function. Please return a value or `null`.")}catch(e){c=r.error,h=e}finally{t.signal.removeEventListener("abort",m)}if(eu(h)){let e,u=h.status;if(T.has(u)){let e=h.headers.get("Location");if(l(e,"Redirects returned/thrown from loaders/actions must have a Location header"),/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(e)){if(!i){let r=new URL(t.url),n=new URL(e.startsWith("//")?r.protocol+e:e);n.origin===r.origin&&(e=n.pathname+n.search+n.hash)}}else{let r=C(e,R(a.slice(0,a.indexOf(n)+1)).map(e=>e.pathnameBase),new URL(t.url).pathname);if(l(d(r),"Unable to resolve redirect location: "+e),o){let e=r.pathname;r.pathname="/"===e?o:P([o,e])}e=d(r)}if(i)throw h.headers.set("Location",e),h;return{type:r.redirect,status:u,location:e,revalidate:null!==h.headers.get("X-Remix-Revalidate")}}if(s)throw{type:c||r.data,response:h};let f=h.headers.get("Content-Type");return(e=f&&/\bapplication\/json\b/.test(f)?await h.json():await h.text(),c===r.error)?{type:c,error:new k(u,h.statusText,e),headers:h.headers}:{type:r.data,data:e,statusCode:h.status,headers:h.headers}}return c===r.error?{type:c,error:h}:h instanceof L?{type:r.deferred,deferredData:h}:{type:r.data,data:h}}function G(e,t,r,n){let a=e.createURL(eo(t)).toString(),o={signal:r};if(n&&ed(n.formMethod)){let{formMethod:e,formEncType:t,formData:r}=n;o.method=e.toUpperCase(),o.body="application/x-www-form-urlencoded"===t?X(r):r}return new Request(a,o)}function X(e){let t=new URLSearchParams;for(let[r,n]of e.entries())l("string"==typeof n,'File inputs are not supported with encType "application/x-www-form-urlencoded", please use "multipart/form-data" instead.'),t.append(r,n);return t}function Q(e,t,r,n,a){let o,i={},s=null,u=!1,c={};return r.forEach((r,d)=>{let h=t[d].route.id;if(l(!es(r),"Cannot handle redirect results in processLoaderData"),el(r)){let t=et(e,h),a=r.error;n&&(a=Object.values(n)[0],n=void 0),null==(s=s||{})[t.route.id]&&(s[t.route.id]=a),i[h]=void 0,u||(u=!0,o=U(r.error)?r.error.status:500),r.headers&&(c[h]=r.headers)}else ei(r)?(a.set(h,r.deferredData),i[h]=r.deferredData.data):i[h]=r.data,null==r.statusCode||200===r.statusCode||u||(o=r.statusCode),r.headers&&(c[h]=r.headers)}),n&&(s=n,i[Object.keys(n)[0]]=void 0),{loaderData:i,errors:s,statusCode:o||200,loaderHeaders:c}}function Z(e,t,r,n,a,i,s,u){let{loaderData:c,errors:d}=Q(t,r,n,a,u);for(let t=0;t<i.length;t++){let[r,,n]=i[t];l(void 0!==s&&void 0!==s[t],"Did not find corresponding fetcher result");let a=s[t];if(el(a)){let t=et(e.matches,n.route.id);d&&d[t.route.id]||(d=o({},d,{[t.route.id]:a.error})),e.fetchers.delete(r)}else if(es(a))l(!1,"Unhandled fetcher revalidation redirect");else if(ei(a))l(!1,"Unhandled fetcher deferred data");else{let t={state:"idle",data:a.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};e.fetchers.set(r,t)}}return{loaderData:c,errors:d}}function ee(e,t,r,n){let a=o({},t);for(let o of r){let r=o.route.id;if(t.hasOwnProperty(r)?void 0!==t[r]&&(a[r]=t[r]):void 0!==e[r]&&(a[r]=e[r]),n&&n.hasOwnProperty(r))break}return a}function et(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>!0===e.route.hasErrorBoundary)||e[0]}function er(e){let t=e.find(e=>e.index||!e.path||"/"===e.path)||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function en(e,t){let{pathname:r,routeId:n,method:a,type:o}=void 0===t?{}:t,i="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(i="Bad Request",l=a&&r&&n?"You made a "+a+' request to "'+r+'" but did not provide a `loader` for route "'+n+'", so there is no way to handle the request.':"defer-action"===o?"defer() is not supported in actions":"Cannot submit binary form data using GET"):403===e?(i="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):404===e?(i="Not Found",l='No route matches URL "'+r+'"'):405===e&&(i="Method Not Allowed",a&&r&&n?l="You made a "+a.toUpperCase()+' request to "'+r+'" but did not provide an `action` for route "'+n+'", so there is no way to handle the request.':a&&(l='Invalid request method "'+a.toUpperCase()+'"')),new k(e||500,i,Error(l),!0)}function ea(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(es(r))return r}}function eo(e){let t="string"==typeof e?h(e):e;return d(o({},t,{hash:""}))}function ei(e){return e.type===r.deferred}function el(e){return e.type===r.error}function es(e){return(e&&e.type)===r.redirect}function eu(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function ec(e){if(!eu(e))return!1;let t=e.status,r=e.headers.get("Location");return t>=300&&t<=399&&null!=r}function ed(e){return _.has(e)}async function eh(e,t,r,n,a,o){for(let i=0;i<r.length;i++){let l=r[i],s=t[i],u=e.find(e=>e.route.id===s.route.id),c=null!=u&&!Y(u,s)&&(o&&o[s.route.id])!==void 0;ei(l)&&(a||c)&&await ef(l,n,a).then(e=>{e&&(r[i]=e||r[i])})}}async function ef(e,t,n){if(void 0===n&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:r.data,data:e.deferredData.unwrappedData}}catch(e){return{type:r.error,error:e}}return{type:r.data,data:e.deferredData.data}}}function ep(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function em(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}function ev(e,t){let r="string"==typeof t?h(t).search:t.search;if(e[e.length-1].route.index&&ep(r||""))return e[e.length-1];let n=R(e);return n[n.length-1]}e.s(["AbortedDeferredError",0,M,"Action",0,t,"ErrorResponse",0,k,"IDLE_BLOCKER",0,H,"IDLE_FETCHER",0,B,"IDLE_NAVIGATION",0,N,"UNSAFE_DEFERRED_SYMBOL",0,$,"UNSAFE_DeferredData",0,L,"UNSAFE_convertRoutesToDataRoutes",0,p,"UNSAFE_getPathContributingMatches",0,R,"createBrowserHistory",0,function(e){return void 0===e&&(e={}),f(function(e,t){let{pathname:r,search:n,hash:a}=e.location;return c("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:d(t)},null,e)},"createHashHistory",0,function(e){return void 0===e&&(e={}),f(function(e,t){let{pathname:r="/",search:n="",hash:a=""}=h(e.location.hash.substr(1));return c("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"==typeof t?t:d(t))},function(e,t){s("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")},e)},"createMemoryHistory",0,function(e){let r;void 0===e&&(e={});let{initialEntries:n=["/"],initialIndex:a,v5Compat:o=!1}=e;r=n.map((e,t)=>p(e,"string"==typeof e?null:e.state,0===t?"default":void 0));let i=f(null==a?r.length-1:a),l=t.Pop,u=null;function f(e){return Math.min(Math.max(e,0),r.length-1)}function p(e,t,n){void 0===t&&(t=null);let a=c(r?r[i].pathname:"/",e,t,n);return s("/"===a.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),a}function m(e){return"string"==typeof e?e:d(e)}return{get index(){return i},get action(){return l},get location(){return r[i]},createHref:m,createURL:e=>new URL(m(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?h(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,n){l=t.Push;let a=p(e,n);i+=1,r.splice(i,r.length,a),o&&u&&u({action:l,location:a,delta:1})},replace(e,n){l=t.Replace;let a=p(e,n);r[i]=a,o&&u&&u({action:l,location:a,delta:0})},go(e){l=t.Pop;let n=f(i+e),a=r[n];i=n,u&&u({action:l,location:a,delta:e})},listen:e=>(u=e,()=>{u=null})}},"createPath",0,d,"createRouter",0,function(e){let n,a;l(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i=p(e.routes),s=null,u=new Set,d=null,h=null,f=null,v=null!=e.hydrationData,g=m(i,e.history.location,e.basename),y=null;if(null==g){let t=en(404,{pathname:e.history.location.pathname}),{matches:r,route:n}=er(i);g=r,y={[n.id]:t}}let b=!g.some(e=>e.route.loader)||null!=e.hydrationData,E={historyAction:e.history.action,location:e.history.location,matches:g,initialized:b,navigation:N,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||y,fetchers:new Map,blockers:new Map},D=t.Pop,R=!1,C=!1,P=!1,x=[],S=[],A=new Map,M=0,L=-1,k=new Map,U=new Set,O=new Map,_=new Map,j=null,T=new Map,$=!1;function K(e){E=o({},E,e),u.forEach(e=>e(E))}function Y(r,n){var a,i;let l,s=null!=E.actionData&&null!=E.navigation.formMethod&&ed(E.navigation.formMethod)&&"loading"===E.navigation.state&&(null==(a=r.state)?void 0:a._isRedirect)!==!0;l=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:s?E.actionData:null;let u=n.loaderData?ee(E.loaderData,n.loaderData,n.matches||[],n.errors):E.loaderData;for(let[e]of T)eP(e);let c=!0===R||null!=E.navigation.formMethod&&ed(E.navigation.formMethod)&&(null==(i=r.state)?void 0:i._isRedirect)!==!0;K(o({},n,{actionData:l,loaderData:u,historyAction:D,location:r,initialized:!0,navigation:N,revalidation:"idle",restoreScrollPosition:eM(r,n.matches||E.matches),preventScrollReset:c,blockers:new Map(E.blockers)})),C||D===t.Pop||(D===t.Push?e.history.push(r,r.state):D===t.Replace&&e.history.replace(r,r.state)),D=t.Pop,R=!1,C=!1,P=!1,x=[],S=[]}async function J(r,n){if("number"==typeof r)return void e.history.go(r);let{path:a,submission:i,error:l}=q(r,n),s=E.location,u=c(E.location,a,n&&n.state);u=o({},u,e.history.encodeLocation(u));let d=n&&null!=n.replace?n.replace:void 0,h=t.Push;!0===d?h=t.Replace:!1===d||null!=i&&ed(i.formMethod)&&i.formAction===E.location.pathname+E.location.search&&(h=t.Replace);let f=n&&"preventScrollReset"in n?!0===n.preventScrollReset:void 0,p=eS({currentLocation:s,nextLocation:u,historyAction:h});return p?void ex(p,{state:"blocked",location:u,proceed(){ex(p,{state:"proceeding",proceed:void 0,reset:void 0,location:u}),J(r,n)},reset(){eP(p),K({blockers:new Map(E.blockers)})}}):await X(h,u,{submission:i,pendingError:l,preventScrollReset:f,replace:n&&n.replace})}async function X(t,r,n){var l,s;let u,c;a&&a.abort(),a=null,D=t,C=!0===(n&&n.startUninterruptedRevalidation),function(e,t){if(d&&h&&f){let r=t.map(e=>em(e,E.loaderData));d[h(e,r)||e.key]=f()}}(E.location,E.matches),R=!0===(n&&n.preventScrollReset);let p=n&&n.overrideNavigation,v=m(i,r,e.basename);if(!v){let e=en(404,{pathname:r.pathname}),{matches:t,route:n}=er(i);eA(),Y(r,{matches:t,loaderData:{},errors:{[n.id]:e}});return}if(l=E.location,s=r,l.pathname===s.pathname&&l.search===s.search&&l.hash!==s.hash)return void Y(r,{matches:v});a=new AbortController;let g=G(e.history,r,a.signal,n&&n.submission);if(n&&n.pendingError)c={[et(v).route.id]:n.pendingError};else if(n&&n.submission&&ed(n.submission.formMethod)){let e=await Q(g,r,n.submission,v,{replace:n.replace});if(e.shortCircuited)return;u=e.pendingActionData,c=e.pendingActionError,p=o({state:"loading",location:r},n.submission),g=new Request(g.url,{signal:g.signal})}let{shortCircuited:y,loaderData:b,errors:w}=await eo(g,r,v,p,n&&n.submission,n&&n.replace,u,c);y||(a=null,Y(r,o({matches:v},u?{actionData:u}:{},{loaderData:b,errors:w})))}async function Q(e,a,i,l,s){let u;eb(),K({navigation:o({state:"submitting",location:a},i)});let c=ev(l,a);if(c.route.action){if(u=await V("action",e,c,l,n.basename),e.signal.aborted)return{shortCircuited:!0}}else u={type:r.error,error:en(405,{method:e.method,pathname:a.pathname,routeId:c.route.id})};if(es(u)){let e;return e=s&&null!=s.replace?s.replace:u.location===E.location.pathname+E.location.search,await eg(E,u,{submission:i,replace:e}),{shortCircuited:!0}}if(el(u)){let e=et(l,c.route.id);return!0!==(s&&s.replace)&&(D=t.Push),{pendingActionData:{},pendingActionError:{[e.route.id]:u.error}}}if(ei(u))throw en(400,{type:"defer-action"});return{pendingActionData:{[c.route.id]:u.data}}}async function eo(t,r,n,i,s,u,c,d){let h=i;h||(h=o({state:"loading",location:r,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},s));let f=s||(h.formMethod&&h.formAction&&h.formData&&h.formEncType?{formMethod:h.formMethod,formAction:h.formAction,formData:h.formData,formEncType:h.formEncType}:void 0),[p,m]=z(e.history,E,n,f,r,P,x,S,c,d,O);if(eA(e=>!(n&&n.some(t=>t.route.id===e))||p&&p.some(t=>t.route.id===e)),0===p.length&&0===m.length)return Y(r,o({matches:n,loaderData:{},errors:d||null},c?{actionData:c}:{})),{shortCircuited:!0};if(!C){m.forEach(e=>{let[t]=e,r=E.fetchers.get(t),n={state:"loading",data:r&&r.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};E.fetchers.set(t,n)});let e=c||E.actionData;K(o({navigation:h},e?0===Object.keys(e).length?{actionData:null}:{actionData:e}:{},m.length>0?{fetchers:new Map(E.fetchers)}:{}))}L=++M,m.forEach(e=>{let[t]=e;return A.set(t,a)});let{results:v,loaderResults:g,fetcherResults:y}=await ey(E.matches,n,p,m,t);if(t.signal.aborted)return{shortCircuited:!0};m.forEach(e=>{let[t]=e;return A.delete(t)});let b=ea(v);if(b)return await eg(E,b,{replace:u}),{shortCircuited:!0};let{loaderData:w,errors:D}=Z(E,n,p,g,d,m,y,_);_.forEach((e,t)=>{e.subscribe(r=>{(r||e.done)&&_.delete(t)})}),function(){let e=[];for(let t of U){let r=E.fetchers.get(t);l(r,"Expected fetcher: "+t),"loading"===r.state&&(U.delete(t),e.push(t))}eR(e)}();let R=eC(L);return o({loaderData:w,errors:D},R||m.length>0?{fetchers:new Map(E.fetchers)}:{})}function eu(e){return E.fetchers.get(e)||B}async function ec(t,r,s,u,c,d){if(eb(),O.delete(t),!u.route.action){let e=en(405,{method:d.formMethod,pathname:s,routeId:r});ew(t,r,e);return}let h=E.fetchers.get(t),f=o({state:"submitting"},d,{data:h&&h.data," _hasFetcherDoneAnything ":!0});E.fetchers.set(t,f),K({fetchers:new Map(E.fetchers)});let p=new AbortController,v=G(e.history,s,p.signal,d);A.set(t,p);let g=await V("action",v,u,c,n.basename);if(v.signal.aborted){A.get(t)===p&&A.delete(t);return}if(es(g)){A.delete(t),U.add(t);let e=o({state:"loading"},d,{data:void 0," _hasFetcherDoneAnything ":!0});return E.fetchers.set(t,e),K({fetchers:new Map(E.fetchers)}),eg(E,g,{isFetchActionRedirect:!0})}if(el(g))return void ew(t,r,g.error);if(ei(g))throw en(400,{type:"defer-action"});let y=E.navigation.location||E.location,b=G(e.history,y,p.signal),w="idle"!==E.navigation.state?m(i,E.navigation.location,e.basename):E.matches;l(w,"Didn't find any matches after fetcher action");let R=++M;k.set(t,R);let C=o({state:"loading",data:g.data},d,{" _hasFetcherDoneAnything ":!0});E.fetchers.set(t,C);let[j,T]=z(e.history,E,w,d,y,P,x,S,{[u.route.id]:g.data},void 0,O);T.filter(e=>{let[r]=e;return r!==t}).forEach(e=>{let[t]=e,r=E.fetchers.get(t),n={state:"loading",data:r&&r.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};E.fetchers.set(t,n),A.set(t,p)}),K({fetchers:new Map(E.fetchers)});let{results:F,loaderResults:N,fetcherResults:B}=await ey(E.matches,w,j,T,b);if(p.signal.aborted)return;k.delete(t),A.delete(t),T.forEach(e=>{let[t]=e;return A.delete(t)});let H=ea(F);if(H)return eg(E,H);let{loaderData:I,errors:W}=Z(E,E.matches,j,N,void 0,T,B,_),$={state:"idle",data:g.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};E.fetchers.set(t,$);let q=eC(R);"loading"===E.navigation.state&&R>L?(l(D,"Expected pending action"),a&&a.abort(),Y(E.navigation.location,{matches:w,loaderData:I,errors:W,fetchers:new Map(E.fetchers)})):(K(o({errors:W,loaderData:ee(E.loaderData,I,w,W)},q?{fetchers:new Map(E.fetchers)}:{})),P=!1)}async function ep(t,r,a,i,s,u){let c=E.fetchers.get(t),d=o({state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},u,{data:c&&c.data," _hasFetcherDoneAnything ":!0});E.fetchers.set(t,d),K({fetchers:new Map(E.fetchers)});let h=new AbortController,f=G(e.history,a,h.signal);A.set(t,h);let p=await V("loader",f,i,s,n.basename);if(ei(p)&&(p=await ef(p,f.signal,!0)||p),A.get(t)===h&&A.delete(t),f.signal.aborted)return;if(es(p))return void await eg(E,p);if(el(p)){let e=et(E.matches,r);E.fetchers.delete(t),K({fetchers:new Map(E.fetchers),errors:{[e.route.id]:p.error}});return}l(!ei(p),"Unhandled fetcher deferred data");let m={state:"idle",data:p.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};E.fetchers.set(t,m),K({fetchers:new Map(E.fetchers)})}async function eg(r,n,i){var s;let{submission:u,replace:d,isFetchActionRedirect:h}=void 0===i?{}:i;n.revalidate&&(P=!0);let f=c(r.location,n.location,o({_isRedirect:!0},h?{_isFetchActionRedirect:!0}:{}));if(l(f,"Expected a location on the redirect navigation"),I&&void 0!==(null==(s=window)?void 0:s.location)){let t=e.history.createURL(n.location).origin;if(window.location.origin!==t)return void(d?window.location.replace(n.location):window.location.assign(n.location))}a=null;let p=!0===d?t.Replace:t.Push,{formMethod:m,formAction:v,formEncType:g,formData:y}=r.navigation;!u&&m&&v&&y&&g&&(u={formMethod:m,formAction:v,formEncType:g,formData:y}),F.has(n.status)&&u&&ed(u.formMethod)?await X(p,f,{submission:o({},u,{formAction:n.location}),preventScrollReset:R}):await X(p,f,{overrideNavigation:{state:"loading",location:f,formMethod:u?u.formMethod:void 0,formAction:u?u.formAction:void 0,formEncType:u?u.formEncType:void 0,formData:u?u.formData:void 0},preventScrollReset:R})}async function ey(t,r,a,o,i){let l=await Promise.all([...a.map(e=>V("loader",i,e,r,n.basename)),...o.map(t=>{let[,r,a,o]=t;return V("loader",G(e.history,r,i.signal),a,o,n.basename)})]),s=l.slice(0,a.length),u=l.slice(a.length);return await Promise.all([eh(t,a,s,i.signal,!1,E.loaderData),eh(t,o.map(e=>{let[,,t]=e;return t}),u,i.signal,!0)]),{results:l,loaderResults:s,fetcherResults:u}}function eb(){P=!0,x.push(...eA()),O.forEach((e,t)=>{A.has(t)&&(S.push(t),eD(t))})}function ew(e,t,r){let n=et(E.matches,t);eE(e),K({errors:{[n.route.id]:r},fetchers:new Map(E.fetchers)})}function eE(e){A.has(e)&&eD(e),O.delete(e),k.delete(e),U.delete(e),E.fetchers.delete(e)}function eD(e){let t=A.get(e);l(t,"Expected fetch controller: "+e),t.abort(),A.delete(e)}function eR(e){for(let t of e){let e={state:"idle",data:eu(t).data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};E.fetchers.set(t,e)}}function eC(e){let t=[];for(let[r,n]of k)if(n<e){let e=E.fetchers.get(r);l(e,"Expected fetcher: "+r),"loading"===e.state&&(eD(r),k.delete(r),t.push(r))}return eR(t),t.length>0}function eP(e){E.blockers.delete(e),T.delete(e),j===e&&(j=null)}function ex(e,t){let r=E.blockers.get(e)||H;l("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,"Invalid blocker state transition: "+r.state+" -> "+t.state),E.blockers.set(e,t),K({blockers:new Map(E.blockers)})}function eS(e){let{currentLocation:t,nextLocation:r,historyAction:n}=e;if(null==j)return;let a=T.get(j);l(a,"Could not find a function for the active blocker");let o=E.blockers.get(j);if((!o||"proceeding"!==o.state)&&a({currentLocation:t,nextLocation:r,historyAction:n}))return j}function eA(e){let t=[];return _.forEach((r,n)=>{(!e||e(n))&&(r.cancel(),t.push(n),_.delete(n))}),t}function eM(e,t){if(d&&h&&f){let r=t.map(e=>em(e,E.loaderData)),n=d[h(e,r)||e.key];if("number"==typeof n)return n}return null}return n={get basename(){return e.basename},get state(){return E},get routes(){return i},initialize:function(){return s=e.history.listen(t=>{let{action:r,location:a,delta:o}=t;if($){$=!1;return}let i=eS({currentLocation:E.location,nextLocation:a,historyAction:r});if(i){$=!0,e.history.go(-1*o),ex(i,{state:"blocked",location:a,proceed(){ex(i,{state:"proceeding",proceed:void 0,reset:void 0,location:a}),e.history.go(o)},reset(){eP(i),K({blockers:new Map(n.state.blockers)})}});return}return X(r,a)}),E.initialized||X(t.Pop,E.location),n},subscribe:function(e){return u.add(e),()=>u.delete(e)},enableScrollRestoration:function(e,t,r){if(d=e,f=t,h=r||(e=>e.key),!v&&E.navigation===N){v=!0;let e=eM(E.location,E.matches);null!=e&&K({restoreScrollPosition:e})}return()=>{d=null,f=null,h=null}},navigate:J,fetch:function(t,r,n,a){if(W)throw Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");A.has(t)&&eD(t);let o=m(i,n,e.basename);if(!o)return void ew(t,r,en(404,{pathname:n}));let{path:l,submission:s}=q(n,a,!0),u=ev(o,l);s&&ed(s.formMethod)?ec(t,r,l,u,o,s):(O.set(t,[l,u,o]),ep(t,r,l,u,o,s))},revalidate:function(){if(eb(),K({revalidation:"loading"}),"submitting"!==E.navigation.state){if("idle"===E.navigation.state)return void X(E.historyAction,E.location,{startUninterruptedRevalidation:!0});X(D||E.historyAction,E.navigation.location,{overrideNavigation:E.navigation})}},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:eu,deleteFetcher:eE,dispose:function(){s&&s(),u.clear(),a&&a.abort(),E.fetchers.forEach((e,t)=>eE(t)),E.blockers.forEach((e,t)=>eP(t))},getBlocker:function(e,t){let r=E.blockers.get(e)||H;return T.get(e)!==t&&(T.set(e,t),null==j?j=e:e!==j&&w(!1,"A router only supports one blocker at a time")),r},deleteBlocker:eP,_internalFetchControllers:A,_internalActiveDeferreds:_}},"createStaticHandler",0,function(e,t){l(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let n=p(e),a=(t?t.basename:null)||"/";async function i(e,t){var r;let{requestContext:i}=void 0===t?{}:t,l=new URL(e.url),s=e.method.toLowerCase(),h=c("",d(l),null,"default"),f=m(n,h,a);if(r=s,j.has(r)||"head"===s){if(!f){let e=en(404,{pathname:h.pathname}),{matches:t,route:r}=er(n);return{basename:a,location:h,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}}else{let e=en(405,{method:s}),{matches:t,route:r}=er(n);return{basename:a,location:h,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let p=await u(e,h,f,i);return eu(p)?p:o({location:h,basename:a},p)}async function s(e,t){var r,o;let{routeId:i,requestContext:l}=void 0===t?{}:t,s=new URL(e.url),h=e.method.toLowerCase(),f=c("",d(s),null,"default"),p=m(n,f,a);if(r=h,j.has(r)||"head"===h||"options"===h){if(!p)throw en(404,{pathname:f.pathname})}else throw en(405,{method:h});let v=i?p.find(e=>e.route.id===i):ev(p,f);if(i&&!v)throw en(403,{pathname:f.pathname,routeId:i});if(!v)throw en(404,{pathname:f.pathname});let g=await u(e,f,p,l,v);if(eu(g))return g;let y=g.errors?Object.values(g.errors)[0]:void 0;if(void 0!==y)throw y;if(g.actionData)return Object.values(g.actionData)[0];if(g.loaderData){let e=Object.values(g.loaderData)[0];return null!=(o=g.activeDeferreds)&&o[v.route.id]&&(e[$]=g.activeDeferreds[v.route.id]),e}}async function u(e,t,n,a,i){l(e.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(ed(e.method.toLowerCase()))return await h(e,n,i||ev(n,t),a,null!=i);let r=await f(e,n,a,i);return eu(r)?r:o({},r,{actionData:null,actionHeaders:{}})}catch(e){var s;if((s=e)&&eu(s.response)&&(s.type===r.data||r.error)){if(e.type===r.error&&!ec(e.response))throw e.response;return e.response}if(ec(e))return e;throw e}}async function h(e,t,n,i,l){let s;if(n.route.action){if(s=await V("action",e,n,t,a,!0,l,i),e.signal.aborted)throw Error((l?"queryRoute":"query")+"() call aborted")}else{let t=en(405,{method:e.method,pathname:new URL(e.url).pathname,routeId:n.route.id});if(l)throw t;s={type:r.error,error:t}}if(es(s))throw new Response(null,{status:s.status,headers:{Location:s.location}});if(ei(s)){let e=en(400,{type:"defer-action"});if(l)throw e;s={type:r.error,error:e}}if(l){if(el(s))throw s.error;return{matches:[n],loaderData:{},actionData:{[n.route.id]:s.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}if(el(s)){let r=et(t,n.route.id),a=await f(e,t,i,void 0,{[r.route.id]:s.error});return o({},a,{statusCode:U(s.error)?s.error.status:500,actionData:null,actionHeaders:o({},s.headers?{[n.route.id]:s.headers}:{})})}let u=new Request(e.url,{headers:e.headers,redirect:e.redirect,signal:e.signal}),c=await f(u,t,i);return o({},c,s.statusCode?{statusCode:s.statusCode}:{},{actionData:{[n.route.id]:s.data},actionHeaders:o({},s.headers?{[n.route.id]:s.headers}:{})})}async function f(e,t,r,n,i){let l=null!=n;if(l&&!(null!=n&&n.route.loader))throw en(400,{method:e.method,pathname:new URL(e.url).pathname,routeId:null==n?void 0:n.route.id});let s=(n?[n]:K(t,Object.keys(i||{})[0])).filter(e=>e.route.loader);if(0===s.length)return{matches:t,loaderData:t.reduce((e,t)=>Object.assign(e,{[t.route.id]:null}),{}),errors:i||null,statusCode:200,loaderHeaders:{},activeDeferreds:null};let u=await Promise.all([...s.map(n=>V("loader",e,n,t,a,!0,l,r))]);if(e.signal.aborted)throw Error((l?"queryRoute":"query")+"() call aborted");let c=new Map,d=Q(t,s,u,i,c),h=new Set(s.map(e=>e.route.id));return t.forEach(e=>{h.has(e.route.id)||(d.loaderData[e.route.id]=null)}),o({},d,{matches:t,activeDeferreds:c.size>0?Object.fromEntries(c.entries()):null})}return{dataRoutes:n,query:i,queryRoute:s}},"defer",0,function(e,t){return void 0===t&&(t={}),new L(e,"number"==typeof t?{status:t}:t)},"generatePath",0,function(e,t){void 0===t&&(t={});let r=e;return r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(w(!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(/\*$/,"/*")),r.replace(/^:(\w+)(\??)/g,(e,r,n)=>{let a=t[r];return"?"===n?null==a?"":a:(null==a&&l(!1,'Missing ":'+r+'" param'),a)}).replace(/\/:(\w+)(\??)/g,(e,r,n)=>{let a=t[r];return"?"===n?null==a?"":"/"+a:(null==a&&l(!1,'Missing ":'+r+'" param'),"/"+a)}).replace(/\?/g,"").replace(/(\/?)\*/,(e,r,n,a)=>null==t["*"]?"/*"===a?"/":"":""+r+t["*"])},"getStaticContextFromError",0,function(e,t,r){return o({},t,{statusCode:500,errors:{[t._deepestRenderedBoundaryId||e[0].id]:r}})},"getToPathname",0,function(e){return""===e||""===e.pathname?"/":"string"==typeof e?h(e).pathname:e.pathname},"invariant",0,l,"isRouteErrorResponse",0,U,"joinPaths",0,P,"json",0,function(e,t){void 0===t&&(t={});let r="number"==typeof t?{status:t}:t,n=new Headers(r.headers);return n.has("Content-Type")||n.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),o({},r,{headers:n}))},"matchPath",0,y,"matchRoutes",0,m,"normalizePathname",0,x,"parsePath",0,h,"redirect",0,function(e,t){void 0===t&&(t=302);let r=t;"number"==typeof r?r={status:r}:void 0===r.status&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,o({},r,{headers:n}))},"resolvePath",0,E,"resolveTo",0,C,"stripBasename",0,b,"warning",0,w])},33399,e=>{"use strict";var t,r,n,a,o,i,l=e.i(522683),s=e.i(307629);function u(){return(u=Object.assign.bind()).apply(this,arguments)}let c="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},{useState:d,useEffect:h,useLayoutEffect:f,useDebugValue:p}=s;function m(e){let t=e.getSnapshot,r=e.value;try{let e=t();return!c(r,e)}catch(e){return!0}}let v="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement?function(e,t,r){let n=t(),[{inst:a},o]=d({inst:{value:n,getSnapshot:t}});return f(()=>{a.value=n,a.getSnapshot=t,m(a)&&o({inst:a})},[e,n,t]),h(()=>(m(a)&&o({inst:a}),e(()=>{m(a)&&o({inst:a})})),[e]),p(n),n}:function(e,t,r){return t()},g="useSyncExternalStore"in s?s.useSyncExternalStore:v,y=s.createContext(null),b=s.createContext(null),w=s.createContext(null),E=s.createContext(null),D=s.createContext(null),R=s.createContext({outlet:null,matches:[]}),C=s.createContext(null);function P(){return null!=s.useContext(D)}function x(){return P()||(0,l.invariant)(!1),s.useContext(D).location}function S(){P()||(0,l.invariant)(!1);let{basename:e,navigator:t}=s.useContext(E),{matches:r}=s.useContext(R),{pathname:n}=x(),a=JSON.stringify((0,l.UNSAFE_getPathContributingMatches)(r).map(e=>e.pathnameBase)),o=s.useRef(!1);return s.useEffect(()=>{o.current=!0}),s.useCallback(function(r,i){if(void 0===i&&(i={}),!o.current)return;if("number"==typeof r)return void t.go(r);let s=(0,l.resolveTo)(r,JSON.parse(a),n,"path"===i.relative);"/"!==e&&(s.pathname="/"===s.pathname?e:(0,l.joinPaths)([e,s.pathname])),(i.replace?t.replace:t.push)(s,i.state,i)},[e,t,a,n])}let A=s.createContext(null);function M(e){let t=s.useContext(R).outlet;return t?s.createElement(A.Provider,{value:e},t):t}function L(e,t){let{relative:r}=void 0===t?{}:t,{matches:n}=s.useContext(R),{pathname:a}=x(),o=JSON.stringify((0,l.UNSAFE_getPathContributingMatches)(n).map(e=>e.pathnameBase));return s.useMemo(()=>(0,l.resolveTo)(e,JSON.parse(o),a,"path"===r),[e,o,a,r])}function k(e,t){let r;P()||(0,l.invariant)(!1);let{navigator:n}=s.useContext(E),a=s.useContext(b),{matches:o}=s.useContext(R),i=o[o.length-1],c=i?i.params:{};i&&i.pathname;let d=i?i.pathnameBase:"/";i&&i.route;let h=x();if(t){var f;let e="string"==typeof t?(0,l.parsePath)(t):t;"/"===d||(null==(f=e.pathname)?void 0:f.startsWith(d))||(0,l.invariant)(!1),r=e}else r=h;let p=r.pathname||"/",m="/"===d?p:p.slice(d.length)||"/",v=(0,l.matchRoutes)(e,{pathname:m}),g=j(v&&v.map(e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:(0,l.joinPaths)([d,n.encodeLocation?n.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?d:(0,l.joinPaths)([d,n.encodeLocation?n.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),o,a||void 0);return t&&g?s.createElement(D.Provider,{value:{location:u({pathname:"/",search:"",hash:"",state:null,key:"default"},r),navigationType:l.Action.Pop}},g):g}function U(){let e=B(),t=(0,l.isRouteErrorResponse)(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:"2px 4px",backgroundColor:n};return s.createElement(s.Fragment,null,s.createElement("h2",null,"Unhandled Thrown Error!"),s.createElement("h3",{style:{fontStyle:"italic"}},t),r?s.createElement("pre",{style:{padding:"0.5rem",backgroundColor:n}},r):null,s.createElement("p",null,"💿 Hey developer 👋"),s.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",s.createElement("code",{style:a},"errorElement")," props on ",s.createElement("code",{style:a},"<Route>")))}class O extends s.Component{static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?s.createElement(R.Provider,{value:this.props.routeContext},s.createElement(C.Provider,{value:this.state.error,children:this.props.component})):this.props.children}constructor(e){super(e),this.state={location:e.location,error:e.error}}}function _(e){let{routeContext:t,match:r,children:n}=e,a=s.useContext(y);return a&&a.static&&a.staticContext&&r.route.errorElement&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),s.createElement(R.Provider,{value:t},n)}function j(e,t,r){if(void 0===t&&(t=[]),null==e)if(null==r||!r.errors)return null;else e=r.matches;let n=e,a=null==r?void 0:r.errors;if(null!=a){let e=n.findIndex(e=>e.route.id&&(null==a?void 0:a[e.route.id]));e>=0||(0,l.invariant)(!1),n=n.slice(0,Math.min(n.length,e+1))}return n.reduceRight((e,o,i)=>{let l=o.route.id?null==a?void 0:a[o.route.id]:null,u=r?o.route.errorElement||s.createElement(U,null):null,c=t.concat(n.slice(0,i+1)),d=()=>s.createElement(_,{match:o,routeContext:{outlet:e,matches:c}},l?u:void 0!==o.route.element?o.route.element:e);return r&&(o.route.errorElement||0===i)?s.createElement(O,{location:r.location,component:u,error:l,children:d(),routeContext:{outlet:null,matches:c}}):d()},null)}function T(e){let t=s.useContext(y);return t||(0,l.invariant)(!1),t}function F(e){let t=s.useContext(b);return t||(0,l.invariant)(!1),t}function N(e){let t,r=((t=s.useContext(R))||(0,l.invariant)(!1),t),n=r.matches[r.matches.length-1];return n.route.id||(0,l.invariant)(!1),n.route.id}function B(){var e;let t=s.useContext(C),r=F(o.UseRouteError),n=N(o.UseRouteError);return t||(null==(e=r.errors)?void 0:e[n])}function H(){let e=s.useContext(w);return null==e?void 0:e._data}(t=a||(a={})).UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",(r=o||(o={})).UseLoaderData="useLoaderData",r.UseActionData="useActionData",r.UseRouteError="useRouteError",r.UseNavigation="useNavigation",r.UseRouteLoaderData="useRouteLoaderData",r.UseMatches="useMatches",r.UseRevalidator="useRevalidator";let I="blocker-singleton";function W(e){(0,l.invariant)(!1)}function $(e){let{basename:t="/",children:r=null,location:n,navigationType:a=l.Action.Pop,navigator:o,static:i=!1}=e;P()&&(0,l.invariant)(!1);let u=t.replace(/^\/*/,"/"),c=s.useMemo(()=>({basename:u,navigator:o,static:i}),[u,o,i]);"string"==typeof n&&(n=(0,l.parsePath)(n));let{pathname:d="/",search:h="",hash:f="",state:p=null,key:m="default"}=n,v=s.useMemo(()=>{let e=(0,l.stripBasename)(d,u);return null==e?null:{pathname:e,search:h,hash:f,state:p,key:m}},[u,d,h,f,p,m]);return null==v?null:s.createElement(E.Provider,{value:c},s.createElement(D.Provider,{children:r,value:{location:v,navigationType:a}}))}function q(e){let{children:t,location:r}=e,n=s.useContext(y);return k(n&&!t?n.router.routes:J(t),r)}(n=i||(i={}))[n.pending=0]="pending",n[n.success=1]="success",n[n.error=2]="error";let K=new Promise(()=>{});class z extends s.Component{static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("<Await> caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:r}=this.props,n=null,a=i.pending;if(r instanceof Promise)if(this.state.error){a=i.error;let e=this.state.error;Object.defineProperty(n=Promise.reject().catch(()=>{}),"_tracked",{get:()=>!0}),Object.defineProperty(n,"_error",{get:()=>e})}else r._tracked?a=void 0!==(n=r)._error?i.error:void 0!==n._data?i.success:i.pending:(a=i.pending,Object.defineProperty(r,"_tracked",{get:()=>!0}),n=r.then(e=>Object.defineProperty(r,"_data",{get:()=>e}),e=>Object.defineProperty(r,"_error",{get:()=>e})));else a=i.success,Object.defineProperty(n=Promise.resolve(),"_tracked",{get:()=>!0}),Object.defineProperty(n,"_data",{get:()=>r});if(a===i.error&&n._error instanceof l.AbortedDeferredError)throw K;if(a===i.error&&!t)throw n._error;if(a===i.error)return s.createElement(w.Provider,{value:n,children:t});if(a===i.success)return s.createElement(w.Provider,{value:n,children:e});throw n}constructor(e){super(e),this.state={error:null}}}function Y(e){let{children:t}=e,r=H(),n="function"==typeof t?t(r):t;return s.createElement(s.Fragment,null,n)}function J(e,t){void 0===t&&(t=[]);let r=[];return s.Children.forEach(e,(e,n)=>{if(!s.isValidElement(e))return;if(e.type===s.Fragment)return void r.push.apply(r,J(e.props.children,t));e.type!==W&&(0,l.invariant)(!1),e.props.index&&e.props.children&&(0,l.invariant)(!1);let a=[...t,n],o={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,hasErrorBoundary:null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle};e.props.children&&(o.children=J(e.props.children,a)),r.push(o)}),r}function V(e){return e.map(e=>{let t=u({},e);return null==t.hasErrorBoundary&&(t.hasErrorBoundary=null!=t.errorElement),t.children&&(t.children=V(t.children)),t})}e.s(["Await",0,function(e){let{children:t,errorElement:r,resolve:n}=e;return s.createElement(z,{resolve:n,errorElement:r},s.createElement(Y,null,t))},"MemoryRouter",0,function(e){let{basename:t,children:r,initialEntries:n,initialIndex:a}=e,o=s.useRef();null==o.current&&(o.current=(0,l.createMemoryHistory)({initialEntries:n,initialIndex:a,v5Compat:!0}));let i=o.current,[u,c]=s.useState({action:i.action,location:i.location});return s.useLayoutEffect(()=>i.listen(c),[i]),s.createElement($,{basename:t,children:r,location:u.location,navigationType:u.action,navigator:i})},"Navigate",0,function(e){let{to:t,replace:r,state:n,relative:a}=e;P()||(0,l.invariant)(!1);let o=s.useContext(b),i=S();return s.useEffect(()=>{o&&"idle"!==o.navigation.state||i(t,{replace:r,state:n,relative:a})}),null},"Outlet",0,function(e){return M(e.context)},"Route",0,W,"Router",0,$,"RouterProvider",0,function(e){let{fallbackElement:t,router:r}=e,n=g(r.subscribe,()=>r.state,()=>r.state),a=s.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:e=>r.navigate(e),push:(e,t,n)=>r.navigate(e,{state:t,preventScrollReset:null==n?void 0:n.preventScrollReset}),replace:(e,t,n)=>r.navigate(e,{replace:!0,state:t,preventScrollReset:null==n?void 0:n.preventScrollReset})}),[r]),o=r.basename||"/";return s.createElement(s.Fragment,null,s.createElement(y.Provider,{value:{router:r,navigator:a,static:!1,basename:o}},s.createElement(b.Provider,{value:n},s.createElement($,{basename:r.basename,location:r.state.location,navigationType:r.state.historyAction,navigator:a},r.state.initialized?s.createElement(q,null):t))),null)},"Routes",0,q,"UNSAFE_DataRouterContext",0,y,"UNSAFE_DataRouterStateContext",0,b,"UNSAFE_LocationContext",0,D,"UNSAFE_NavigationContext",0,E,"UNSAFE_RouteContext",0,R,"UNSAFE_enhanceManualRouteObjects",0,V,"createMemoryRouter",0,function(e,t){return(0,l.createRouter)({basename:null==t?void 0:t.basename,history:(0,l.createMemoryHistory)({initialEntries:null==t?void 0:t.initialEntries,initialIndex:null==t?void 0:t.initialIndex}),hydrationData:null==t?void 0:t.hydrationData,routes:V(e)}).initialize()},"createRoutesFromChildren",0,J,"createRoutesFromElements",0,J,"renderMatches",0,function(e){return j(e)},"unstable_useBlocker",0,function(e){let{router:t}=T(a.UseBlocker),r=s.useCallback(t=>"function"==typeof e?!!e(t):!!e,[e]),n=t.getBlocker(I,r);return s.useEffect(()=>()=>t.deleteBlocker(I),[t]),n},"useActionData",0,function(){let e=F(o.UseActionData);return s.useContext(R)||(0,l.invariant)(!1),Object.values((null==e?void 0:e.actionData)||{})[0]},"useAsyncError",0,function(){let e=s.useContext(w);return null==e?void 0:e._error},"useAsyncValue",0,H,"useHref",0,function(e,t){let{relative:r}=void 0===t?{}:t;P()||(0,l.invariant)(!1);let{basename:n,navigator:a}=s.useContext(E),{hash:o,pathname:i,search:u}=L(e,{relative:r}),c=i;return"/"!==n&&(c="/"===i?n:(0,l.joinPaths)([n,i])),a.createHref({pathname:c,search:u,hash:o})},"useInRouterContext",0,P,"useLoaderData",0,function(){let e=F(o.UseLoaderData),t=N(o.UseLoaderData);return e.errors&&null!=e.errors[t]?void console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")"):e.loaderData[t]},"useLocation",0,x,"useMatch",0,function(e){P()||(0,l.invariant)(!1);let{pathname:t}=x();return s.useMemo(()=>(0,l.matchPath)(e,t),[t,e])},"useMatches",0,function(){let{matches:e,loaderData:t}=F(o.UseMatches);return s.useMemo(()=>e.map(e=>{let{pathname:r,params:n}=e;return{id:e.route.id,pathname:r,params:n,data:t[e.route.id],handle:e.route.handle}}),[e,t])},"useNavigate",0,S,"useNavigation",0,function(){return F(o.UseNavigation).navigation},"useNavigationType",0,function(){return s.useContext(D).navigationType},"useOutlet",0,M,"useOutletContext",0,function(){return s.useContext(A)},"useParams",0,function(){let{matches:e}=s.useContext(R),t=e[e.length-1];return t?t.params:{}},"useResolvedPath",0,L,"useRevalidator",0,function(){let e=T(a.UseRevalidator),t=F(o.UseRevalidator);return{revalidate:e.router.revalidate,state:t.revalidation}},"useRouteError",0,B,"useRouteLoaderData",0,function(e){return F(o.UseRouteLoaderData).loaderData[e]},"useRoutes",0,k])}]);