/*! For license information please see lib-router.ed2aa94b.js.LICENSE.txt */ "use strict";(self.webpackChunkplatform_xyq=self.webpackChunkplatform_xyq||[]).push([["2118"],{93731:function(e,t,r){r.d(t,{J0:()=>f,OF:()=>N,RQ:()=>U,WK:()=>z,WS:()=>R,X3:()=>F,Zn:()=>L,aU:()=>o,cP:()=>g,cm:()=>M,fp:()=>S,lX:()=>d,p7:()=>K,pC:()=>T,q_:()=>h,uX:()=>B});var a,n,o,i,s=r(64349),l=r(3529);function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(r),e=e.substr(0,r));var a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}function b(e,t,r,a){void 0===a&&(a={});var{window:n=document.defaultView,v5Compat:i=!1}=a,s=n.history,l=o.Pop,d=null,h=v();function v(){return(s.state||{idx:null}).idx}function g(){l=o.Pop;var e=v(),t=null==e?null:e-h;h=e,d&&d({action:l,location:w.location,delta:t})}function b(e){var t="null"!==n.location.origin?n.location.origin:n.location.href,r="string"==typeof e?e:y(e);return f(t,"No window.location.(origin|href) available to create URL for href: "+(r=r.replace(/ $/,"%20"))),new URL(r,t)}null==h&&(h=0,s.replaceState(u({},s.state,{idx:h}),""));var w={get action(){return l},get location(){return e(n,s)},listen(e){if(d)throw Error("A history only accepts one active listener");return n.addEventListener(c,g),d=e,()=>{n.removeEventListener(c,g),d=null}},createHref:e=>t(n,e),createURL:b,encodeLocation(e){var t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){l=o.Push;var a=m(w.location,e,t);r&&r(a,e);var u=p(a,h=v()+1),c=w.createHref(a);try{s.pushState(u,"",c)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;n.location.assign(c)}i&&d&&d({action:l,location:w.location,delta:1})},replace:function(e,t){l=o.Replace;var a=m(w.location,e,t);r&&r(a,e);var n=p(a,h=v()),u=w.createHref(a);s.replaceState(n,"",u),i&&d&&d({action:l,location:w.location,delta:0})},go:e=>s.go(e)};return w}(n=i||(i={})).data="data",n.deferred="deferred",n.redirect="redirect",n.error="error";var w=new Set(["lazy","caseSensitive","path","id","index","children"]);function E(e,t,r,a){return void 0===r&&(r=[]),void 0===a&&(a={}),e.map((e,n)=>{var o=[...r,String(n)],i="string"==typeof e.id?e.id:o.join("-");if(f(!0!==e.index||!e.children,"Cannot specify children on an index route"),f(!a[i],'Found a route id collision on id "'+i+"\". Route id's must be globally unique within Data Router usages"),!0===e.index){var s=u({},e,t(e),{id:i});return a[i]=s,s}var l=u({},e,t(e),{id:i,children:void 0});return a[i]=l,e.children&&(l.children=E(e.children,t,o,a)),l})}function S(e,t,r){return void 0===r&&(r="/"),x(e,t,r,!1)}function x(e,t,r,a){var n=L(("string"==typeof t?g(t):t).pathname||"/",r);if(null==n)return null;var o=function e(t,r,a,n){void 0===r&&(r=[]),void 0===a&&(a=[]),void 0===n&&(n="");var o=(t,o,i)=>{var s,l,u,c,d={relativePath:void 0===i?t.path||"":i,caseSensitive:!0===t.caseSensitive,childrenIndex:o,route:t};d.relativePath.startsWith("/")&&(f(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));var h=U([n,d.relativePath]),v=a.concat(d);t.children&&t.children.length>0&&(f(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+h+'".'),e(t.children,r,v,h)),(null!=t.path||t.index)&&r.push({path:h,score:(s=h,l=t.index,c=(u=s.split("/")).length,u.some(P)&&(c+=-2),l&&(c+=2),u.filter(e=>!P(e)).reduce((e,t)=>e+(D.test(t)?3:""===t?1:10),c)),routesMeta:v})};return t.forEach((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(var a of function e(t){var r=t.split("/");if(0===r.length)return[];var[a,...n]=r,o=a.endsWith("?"),i=a.replace(/\?$/,"");if(0===n.length)return o?[i,""]:[i];var s=e(n.join("/")),l=[];return l.push(...s.map(e=>""===e?i:[i,e].join("/"))),o&&l.push(...s),l.map(e=>t.startsWith("/")&&""===e?"/":e)}(e.path))o(e,t,a);else o(e,t)}),r}(e);o.sort((e,t)=>{var r,a;return e.score!==t.score?t.score-e.score:(r=e.routesMeta.map(e=>e.childrenIndex),a=t.routesMeta.map(e=>e.childrenIndex),r.length===a.length&&r.slice(0,-1).every((e,t)=>e===a[t])?r[r.length-1]-a[a.length-1]:0)});for(var i=null,s=0;null==i&&sdecodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return v(!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);i=function(e,t,r){void 0===r&&(r=!1);for(var{routesMeta:a}=e,n={},o="/",i=[],s=0;s"*"===e;function C(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});var r,a,n,o,i,[s,l]=(r=e.path,a=e.caseSensitive,n=e.end,void 0===a&&(a=!1),void 0===n&&(n=!0),v("*"===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,r)=>(o.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")),r.endsWith("*")?(o.push({paramName:"*"}),i+="*"===r||"/*"===r?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==r&&"/"!==r&&(i+="(?:(?=\\/|$))"),[new RegExp(i,a?void 0:"i"),o]),u=t.match(s);if(!u)return null;var c=u[0],d=c.replace(/(.)\/+$/,"$1"),h=u.slice(1);return{params:l.reduce((e,t,r)=>{var{paramName:a,isOptional:n}=t;if("*"===a){var o=h[r]||"";d=c.slice(0,c.length-o.length).replace(/(.)\/+$/,"$1")}var i=h[r];return n&&!i?e[a]=void 0:e[a]=(i||"").replace(/%2F/g,"/"),e},{}),pathname:c,pathnameBase:d,pattern:e}}function L(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&"/"!==a?null:e.slice(r)||"/"}function k(e,t,r,a){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field [")+JSON.stringify(a)+"]. Please separate it out to the `to."+r+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function _(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function M(e,t){var r=_(e);return t?r.map((e,t)=>t===r.length-1?e.pathname:e.pathnameBase):r.map(e=>e.pathnameBase)}function T(e,t,r,a){void 0===a&&(a=!1),"string"==typeof e?n=g(e):(f(!(n=u({},e)).pathname||!n.pathname.includes("?"),k("?","pathname","search",n)),f(!n.pathname||!n.pathname.includes("#"),k("#","pathname","hash",n)),f(!n.search||!n.search.includes("#"),k("#","search","hash",n)));var n,o,i=""===e||""===n.pathname,s=i?"/":n.pathname;if(null==s)o=r;else{var l=t.length-1;if(!a&&s.startsWith("..")){for(var c=s.split("/");".."===c[0];)c.shift(),l-=1;n.pathname=c.join("/")}o=l>=0?t[l]:"/"}var d=function(e,t){void 0===t&&(t="/");var r,a,{pathname:n,search:o="",hash:i=""}="string"==typeof e?g(e):e;return{pathname:n?n.startsWith("/")?n:(r=n,a=t.replace(/\/+$/,"").split("/"),r.split("/").forEach(e=>{".."===e?a.length>1&&a.pop():"."!==e&&a.push(e)}),a.length>1?a.join("/"):"/"):t,search:O(o),hash:A(i)}}(n,o),h=s&&"/"!==s&&s.endsWith("/"),v=(i||"."===s)&&r.endsWith("/");return!d.pathname.endsWith("/")&&(h||v)&&(d.pathname+="/"),d}var U=e=>e.join("/").replace(/\/\/+/g,"/"),j=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),O=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",A=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class F extends Error{}var B=function(e,t){void 0===t&&(t=302);var r=t;"number"==typeof r?r={status:r}:void 0===r.status&&(r.status=302);var a=new Headers(r.headers);return a.set("Location",e),new Response(null,u({},r,{headers:a}))};class N{constructor(e,t,r,a){void 0===a&&(a=!1),this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function z(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}var H=["post","put","patch","delete"],I=new Set(H),J=new Set(["get",...H]),W=new Set([301,302,303,307,308]),$=new Set([307,308]),q={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},V={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Y={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},X=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Q=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),G="remix-router-transitions";function K(e){var t,r,a,n,c,d=e.window?e.window:"undefined"!=typeof window?window:void 0,h=void 0!==d&&void 0!==d.document&&void 0!==d.document.createElement,p=!h;if(f(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)t=e.mapRouteProperties;else if(e.detectErrorBoundary){var y=e.detectErrorBoundary;t=e=>({hasErrorBoundary:y(e)})}else t=Q;var g={},b=E(e.routes,t,void 0,g),D=e.basename||"/",P=e.dataStrategy||es,C=e.patchRoutesOnNavigation,k=u({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),_=null,M=new Set,T=null,U=null,j=null,O=null!=e.hydrationData,A=S(b,e.history.location,D),F=null;if(null==A&&!C){var B=ey(404,{pathname:e.history.location.pathname}),{matches:H,route:I}=em(b);A=H,F={[I.id]:B}}if(A&&!e.hydrationData&&tu(A,b,e.history.location.pathname).active&&(A=null),A)if(A.some(e=>e.route.lazy))a=!1;else if(A.some(e=>e.route.loader))if(k.v7_partialHydration){var J=e.hydrationData?e.hydrationData.loaderData:null,K=e.hydrationData?e.hydrationData.errors:null;if(K){var et=A.findIndex(e=>void 0!==K[e.route.id]);a=A.slice(0,et+1).every(e=>!ea(e.route,J,K))}else a=A.every(e=>!ea(e.route,J,K))}else a=null!=e.hydrationData;else a=!0;else if(a=!1,A=[],k.v7_partialHydration){var eo=tu(null,b,e.history.location.pathname);eo.active&&eo.matches&&(A=eo.matches)}var ec={historyAction:e.history.action,location:e.history.location,matches:A,initialized:a,navigation:q,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||F,fetchers:new Map,blockers:new Map},ed=o.Pop,eb=!1,eC=!1,eU=new Map,ej=null,eO=!1,eA=!1,eF=[],eB=new Set,eN=new Map,ez=0,eH=-1,eI=new Map,eJ=new Set,eW=new Map,e$=new Map,eq=new Set,eV=new Map,eY=new Map,eX=void 0;function eQ(e,t){void 0===t&&(t={}),ec=u({},ec,e);var r=[],a=[];k.v7_fetcherPersist&&ec.fetchers.forEach((e,t)=>{"idle"===e.state&&(eq.has(t)?a.push(t):r.push(t))}),[...M].forEach(e=>e(ec,{deletedFetchers:a,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync})),k.v7_fetcherPersist&&(r.forEach(e=>ec.fetchers.delete(e)),a.forEach(e=>e9(e)))}function eG(t,a,n){var i,s,l,c,{flushSync:d}=void 0===n?{}:n,h=null!=ec.actionData&&null!=ec.navigation.formMethod&&eD(ec.navigation.formMethod)&&"loading"===ec.navigation.state&&(null==(i=t.state)?void 0:i._isRedirect)!==!0;l=a.actionData?Object.keys(a.actionData).length>0?a.actionData:null:h?ec.actionData:null;var f=a.loaderData?ef(ec.loaderData,a.loaderData,a.matches||[],a.errors):ec.loaderData,v=ec.blockers;v.size>0&&(v=new Map(v)).forEach((e,t)=>v.set(t,Y));var p=!0===eb||null!=ec.navigation.formMethod&&eD(ec.navigation.formMethod)&&(null==(s=t.state)?void 0:s._isRedirect)!==!0;if(r&&(b=r,r=void 0),eO||ed===o.Pop||(ed===o.Push?e.history.push(t,t.state):ed===o.Replace&&e.history.replace(t,t.state)),ed===o.Pop){var m=eU.get(ec.location.pathname);m&&m.has(t.pathname)?c={currentLocation:ec.location,nextLocation:t}:eU.has(t.pathname)&&(c={currentLocation:t,nextLocation:ec.location})}else if(eC){var y=eU.get(ec.location.pathname);y?y.add(t.pathname):(y=new Set([t.pathname]),eU.set(ec.location.pathname,y)),c={currentLocation:ec.location,nextLocation:t}}eQ(u({},a,{actionData:l,loaderData:f,historyAction:ed,location:t,initialized:!0,navigation:q,revalidation:"idle",restoreScrollPosition:tl(t,a.matches||ec.matches),preventScrollReset:p,blockers:v}),{viewTransitionOpts:c,flushSync:!0===d}),ed=o.Pop,eb=!1,eC=!1,eO=!1,eA=!1,eF=[]}function eK(t,a,n){return(0,s._)(function*(){c&&c.abort(),c=null,ed=t,eO=!0===(n&&n.startUninterruptedRevalidation),x=ec.location,R=ec.matches,T&&j&&(T[ts(x,R)]=j()),eb=!0===(n&&n.preventScrollReset),eC=!0===(n&&n.enableViewTransition);var l,d,h,f,v,p,m,y,g,w,E,x,R,P,C=r||b,L=n&&n.overrideNavigation,_=S(C,a,D),M=!0===(n&&n.flushSync),U=tu(_,C,a.pathname);if(U.active&&U.matches&&(_=U.matches),!_){var{error:O,notFoundMatches:A,route:F}=to(a.pathname);eG(a,{matches:A,loaderData:{},errors:{[F.id]:O}},{flushSync:M});return}if(ec.initialized&&!eA&&(N=ec.location,H=a,N.pathname===H.pathname&&N.search===H.search&&(""===N.hash?""!==H.hash:N.hash===H.hash||""!==H.hash||!1))&&!(n&&n.submission&&eD(n.submission.formMethod)))return void eG(a,{matches:_},{flushSync:M});c=new AbortController;var B=eu(e.history,a,c.signal,n&&n.submission);if(n&&n.pendingError)P=[ep(_).route.id,{type:i.error,error:n.pendingError}];else if(n&&n.submission&&eD(n.submission.formMethod)){var N,H,I,J,W,$,q,V,Y=yield(I=B,J=a,W=n.submission,$=_,q=U.active,V={replace:n.replace,flushSync:M},(0,s._)(function*(){if(void 0===V&&(V={}),e4(),eQ({navigation:{state:"submitting",location:J,formMethod:(e=W).formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}},{flushSync:!0===V.flushSync}),q){var e,t,r,a=yield tc($,J.pathname,I.signal);if("aborted"===a.type)return{shortCircuited:!0};if("error"===a.type){var n=ep(a.partialMatches).route.id;return{matches:a.partialMatches,pendingActionResult:[n,{type:i.error,error:a.error}]}}if(a.matches)$=a.matches;else{var{notFoundMatches:s,error:l,route:u}=to(J.pathname);return{matches:s,pendingActionResult:[u.id,{type:i.error,error:l}]}}}var c=eL($,J);if(c.route.action||c.route.lazy){if(t=(yield e1("action",ec,I,[c],$,null))[c.route.id],I.signal.aborted)return{shortCircuited:!0}}else t={type:i.error,error:ey(405,{method:I.method,pathname:J.pathname,routeId:c.route.id})};if(eS(t))return r=V&&null!=V.replace?V.replace:el(t.response.headers.get("Location"),new URL(I.url),D)===ec.location.pathname+ec.location.search,yield e0(I,t,!0,{submission:W,replace:r}),{shortCircuited:!0};if(ew(t))throw ey(400,{type:"defer-action"});if(eE(t)){var d=ep($,c.route.id);return!0!==(V&&V.replace)&&(ed=o.Push),{matches:$,pendingActionResult:[d.route.id,t]}}return{matches:$,pendingActionResult:[c.route.id,t]}})());if(Y.shortCircuited)return;if(Y.pendingActionResult){var[X,Q]=Y.pendingActionResult;if(eE(Q)&&z(Q.error)&&404===Q.error.status){c=null,eG(a,{matches:Y.matches,loaderData:{},errors:{[X]:Q.error}});return}}_=Y.matches||_,P=Y.pendingActionResult,L=e_(a,n.submission),M=!1,U.active=!1,B=eu(e.history,B.url,B.signal)}var{shortCircuited:G,matches:K,loaderData:Z,errors:ee}=yield(l=B,d=a,h=_,f=U.active,v=L,p=n&&n.submission,m=n&&n.fetcherSubmission,y=n&&n.replace,g=n&&!0===n.initialHydration,w=M,E=P,(0,s._)(function*(){var t=v||e_(d,p),a=p||m||ek(t),n=!eO&&(!k.v7_partialHydration||!g);if(f){if(n){var o=eZ(E);eQ(u({navigation:t},void 0!==o?{actionData:o}:{}),{flushSync:w})}var i=yield tc(h,d.pathname,l.signal);if("aborted"===i.type)return{shortCircuited:!0};if("error"===i.type){var s=ep(i.partialMatches).route.id;return{matches:i.partialMatches,loaderData:{},errors:{[s]:i.error}}}if(i.matches)h=i.matches;else{var{error:S,notFoundMatches:x,route:R}=to(d.pathname);return{matches:x,loaderData:{},errors:{[R.id]:S}}}}var P=r||b,[C,L]=er(e.history,ec,h,a,d,k.v7_partialHydration&&!0===g,k.v7_skipActionErrorRevalidation,eA,eF,eB,eq,eW,eJ,P,D,E);if(ti(e=>!(h&&h.some(t=>t.route.id===e))||C&&C.some(t=>t.route.id===e)),eH=++ez,0===C.length&&0===L.length){var _=te();return eG(d,u({matches:h,loaderData:{},errors:E&&eE(E[1])?{[E[0]]:E[1].error}:null},ev(E),_?{fetchers:new Map(ec.fetchers)}:{}),{flushSync:w}),{shortCircuited:!0}}if(n){var M={};if(!f){M.navigation=t;var T=eZ(E);void 0!==T&&(M.actionData=T)}L.length>0&&(L.forEach(e=>{var t=ec.fetchers.get(e.key),r=eM(void 0,t?t.data:void 0);ec.fetchers.set(e.key,r)}),M.fetchers=new Map(ec.fetchers)),eQ(M,{flushSync:w})}L.forEach(e=>{e8(e.key),e.controller&&eN.set(e.key,e.controller)});var U=()=>L.forEach(e=>e8(e.key));c&&c.signal.addEventListener("abort",U);var{loaderResults:j,fetcherResults:O}=yield e7(ec,h,C,L,l);if(l.signal.aborted)return{shortCircuited:!0};c&&c.signal.removeEventListener("abort",U),L.forEach(e=>eN.delete(e.key));var A=eg(j);if(A)return yield e0(l,A.result,!0,{replace:y}),{shortCircuited:!0};if(A=eg(O))return eJ.add(A.key),yield e0(l,A.result,!0,{replace:y}),{shortCircuited:!0};var{loaderData:F,errors:B}=eh(ec,h,j,E,L,O,eV);eV.forEach((e,t)=>{e.subscribe(r=>{(r||e.done)&&eV.delete(t)})}),k.v7_partialHydration&&g&&ec.errors&&(B=u({},ec.errors,B));var N=te(),z=tt(eH),H=N||z||L.length>0;return u({matches:h,loaderData:F,errors:B},H?{fetchers:new Map(ec.fetchers)}:{})})());G||(c=null,eG(a,u({matches:K||_},ev(P),{loaderData:Z,errors:ee})))})()}function eZ(e){if(e&&!eE(e[1]))return{[e[0]]:e[1].data};if(ec.actionData)if(0===Object.keys(ec.actionData).length)return null;else return ec.actionData}function e0(t,r,a,n){return(0,s._)(function*(){var{submission:i,fetcherSubmission:s,preventScrollReset:l,replace:v}=void 0===n?{}:n;r.response.headers.has("X-Remix-Revalidate")&&(eA=!0);var p=r.response.headers.get("Location");f(p,"Expected a Location header on the redirect Response"),p=el(p,new URL(t.url),D);var y=m(ec.location,p,{_isRedirect:!0});if(h){var g=!1;if(r.response.headers.has("X-Remix-Reload-Document"))g=!0;else if(X.test(p)){var b=e.history.createURL(p);g=b.origin!==d.location.origin||null==L(b.pathname,D)}if(g)return void(v?d.location.replace(p):d.location.assign(p))}c=null;var w=!0===v||r.response.headers.has("X-Remix-Replace")?o.Replace:o.Push,{formMethod:E,formAction:S,formEncType:x}=ec.navigation;!i&&!s&&E&&S&&x&&(i=ek(ec.navigation));var R=i||s;if($.has(r.response.status)&&R&&eD(R.formMethod))yield eK(w,y,{submission:u({},R,{formAction:p}),preventScrollReset:l||eb,enableViewTransition:a?eC:void 0});else{var P=e_(y,i);yield eK(w,y,{overrideNavigation:P,fetcherSubmission:s,preventScrollReset:l||eb,enableViewTransition:a?eC:void 0})}})()}function e1(e,r,a,n,o,l){return(0,s._)(function*(){var r,c,d,h,p,m,y,b,E,S,x,R={};try{x=yield(r=P,c=e,d=a,h=n,p=o,m=l,y=g,b=t,(0,s._)(function*(){var e=p.map(e=>{var t;return e.route.lazy?(t=e.route,(0,s._)(function*(){if(t.lazy){var e=yield t.lazy();if(t.lazy){var r=y[t.id];f(r,"No route found in manifest");var a={};for(var n in e){var o=void 0!==r[n]&&"hasErrorBoundary"!==n;v(!o,'Route "'+r.id+'" has a static property "'+n+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+n+'" will be ignored.'),o||w.has(n)||(a[n]=e[n])}Object.assign(r,a),Object.assign(r,u({},b(r),{lazy:void 0}))}}})()):void 0}),t=p.map((t,r)=>{var a=e[r],n=h.some(e=>e.route.id===t.route.id);return u({},t,{shouldLoad:n,resolve:e=>(0,s._)(function*(){var r,o,l,u,h,v;return e&&"GET"===d.method&&(t.route.lazy||t.route.loader)&&(n=!0),n?(r=c,o=d,l=t,u=a,h=e,v=void 0,(0,s._)(function*(){var e=e=>{var t,a=new Promise((e,r)=>t=r);n=()=>t(),o.signal.addEventListener("abort",n);var i=t=>"function"!=typeof e?Promise.reject(Error("You cannot call the handler for a route which defines a boolean "+('"'+r+'" [routeId: ')+l.route.id+"]")):e({request:o,params:l.params,context:v},...void 0!==t?[t]:[]);return Promise.race([(0,s._)(function*(){try{var e=yield h?h(e=>i(e)):i();return{type:"data",result:e}}catch(e){return{type:"error",result:e}}})(),a])};try{var t=l.route[r];if(u)if(t){var a,n,c,[d]=yield Promise.all([e(t).catch(e=>{c=e}),u]);if(void 0!==c)throw c;a=d}else if(yield u,t=l.route[r])a=yield e(t);else{if("action"!==r)return{type:i.data,result:void 0};var p=new URL(o.url),m=p.pathname+p.search;throw ey(405,{method:o.method,pathname:m,routeId:l.route.id})}else if(t)a=yield e(t);else{var y=new URL(o.url),g=y.pathname+y.search;throw ey(404,{pathname:g})}f(void 0!==a.result,"You defined "+("action"===r?"an action":"a loader")+" for route "+('"'+l.route.id+"\" but didn't return anything from your `")+r+"` function. Please return a value or `null`.")}catch(e){return{type:i.error,result:e}}finally{n&&o.signal.removeEventListener("abort",n)}return a})()):Promise.resolve({type:i.data,result:void 0})})()})}),a=yield r({matches:t,request:d,params:p[0].params,fetcherKey:m,context:E});try{yield Promise.all(e)}catch(e){}return a})())}catch(e){return n.forEach(t=>{R[t.route.id]={type:i.error,error:e}}),R}for(var[C,L]of Object.entries(x)){if(eR((S=L).result)&&W.has(S.result.status)){var _=L.result;R[C]={type:i.redirect,response:function(e,t,r,a,n,o){var i=e.headers.get("Location");if(f(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!X.test(i)){var s=a.slice(0,a.findIndex(e=>e.route.id===r)+1);i=Z(new URL(t.url),s,n,!0,i,o),e.headers.set("Location",i)}return e}(_,a,C,o,D,k.v7_relativeSplatPath)}}else R[C]=yield function(e){return(0,s._)(function*(){var t,r,a,n,o,s,l,u,{result:c,type:d}=e;if(eR(c)){try{var h=c.headers.get("Content-Type");r=h&&/\bapplication\/json\b/.test(h)?null==c.body?null:yield c.json():yield c.text()}catch(e){return{type:i.error,error:e}}return d===i.error?{type:i.error,error:new N(c.status,c.statusText,r),statusCode:c.status,headers:c.headers}:{type:i.data,data:r,statusCode:c.status,headers:c.headers}}if(d===i.error){if(ex(c)){if(c.data instanceof Error)return{type:i.error,error:c.data,statusCode:null==(n=c.init)?void 0:n.status};c=new N((null==(a=c.init)?void 0:a.status)||500,void 0,c.data)}return{type:i.error,error:c,statusCode:z(c)?c.status:void 0}}return(t=c)&&"object"==typeof t&&"object"==typeof t.data&&"function"==typeof t.subscribe&&"function"==typeof t.cancel&&"function"==typeof t.resolveData?{type:i.deferred,deferredData:c,statusCode:null==(o=c.init)?void 0:o.status,headers:(null==(s=c.init)?void 0:s.headers)&&new Headers(c.init.headers)}:ex(c)?{type:i.data,data:c.data,statusCode:null==(l=c.init)?void 0:l.status,headers:null!=(u=c.init)&&u.headers?new Headers(c.init.headers):void 0}:{type:i.data,data:c}})()}(L)}return R})()}function e7(t,r,a,n,o){return(0,s._)(function*(){var l,u,c,d,h,v,p,m,y=t.matches,g=e1("loader",t,o,a,r,null),b=Promise.all(n.map(r=>(0,s._)(function*(){if(!r.matches||!r.match||!r.controller)return Promise.resolve({[r.key]:{type:i.error,error:ey(404,{pathname:r.path})}});var a=(yield e1("loader",t,eu(e.history,r.path,r.controller.signal),[r.match],r.matches,r.key))[r.match.route.id];return{[r.key]:a}})())),w=yield g,E=(yield b).reduce((e,t)=>Object.assign(e,t),{});return yield Promise.all([(l=r,u=w,c=o.signal,d=y,h=t.loaderData,(0,s._)(function*(){for(var e=function*(e){var[r,a]=t[e],n=l.find(e=>(null==e?void 0:e.route.id)===r);if(!n)return"continue";var o=d.find(e=>e.route.id===n.route.id),i=null!=o&&!en(o,n)&&(h&&h[n.route.id])!==void 0;ew(a)&&i&&(yield eP(a,c,!1).then(e=>{e&&(u[r]=e)}))},t=Object.entries(u),r=0;r(null==e?void 0:e.route.id)===r))return"continue";ew(n)&&(f(a,"Expected an AbortController for revalidating fetcher deferred result"),yield eP(n,a.signal,!0).then(e=>{e&&(p[t]=e)}))},t=0;t{eN.has(t)&&eB.add(t),e8(t)})}function e3(e,t,r){void 0===r&&(r={}),ec.fetchers.set(e,t),eQ({fetchers:new Map(ec.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function e2(e,t,r,a){void 0===a&&(a={});var n=ep(ec.matches,t);e9(e),eQ({errors:{[n.route.id]:r},fetchers:new Map(ec.fetchers)},{flushSync:!0===(a&&a.flushSync)})}function e5(e){return k.v7_fetcherPersist&&(e$.set(e,(e$.get(e)||0)+1),eq.has(e)&&eq.delete(e)),ec.fetchers.get(e)||V}function e9(e){var t=ec.fetchers.get(e);eN.has(e)&&!(t&&"loading"===t.state&&eI.has(e))&&e8(e),eW.delete(e),eI.delete(e),eJ.delete(e),eq.delete(e),eB.delete(e),ec.fetchers.delete(e)}function e8(e){var t=eN.get(e);t&&(t.abort(),eN.delete(e))}function e6(e){for(var t of e){var r=eT(e5(t).data);ec.fetchers.set(t,r)}}function te(){var e=[],t=!1;for(var r of eJ){var a=ec.fetchers.get(r);f(a,"Expected fetcher: "+r),"loading"===a.state&&(eJ.delete(r),e.push(r),t=!0)}return e6(e),t}function tt(e){var t=[];for(var[r,a]of eI)if(a0}function tr(e){ec.blockers.delete(e),eY.delete(e)}function ta(e,t){var r=ec.blockers.get(e)||Y;f("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);var a=new Map(ec.blockers);a.set(e,t),eQ({blockers:a})}function tn(e){var{currentLocation:t,nextLocation:r,historyAction:a}=e;if(0!==eY.size){eY.size>1&&v(!1,"A router only supports one blocker at a time");var n=Array.from(eY.entries()),[o,i]=n[n.length-1],s=ec.blockers.get(o);if((!s||"proceeding"!==s.state)&&i({currentLocation:t,nextLocation:r,historyAction:a}))return o}}function to(e){var t=ey(404,{pathname:e}),{matches:a,route:n}=em(r||b);return ti(),{notFoundMatches:a,route:n,error:t}}function ti(e){var t=[];return eV.forEach((r,a)=>{(!e||e(a))&&(r.cancel(),t.push(a),eV.delete(a))}),t}function ts(e,t){return U&&U(e,t.map(e=>R(e,ec.loaderData)))||e.key}function tl(e,t){if(T){var r=T[ts(e,t)];if("number"==typeof r)return r}return null}function tu(e,t,r){if(C){if(!e)return{active:!0,matches:x(t,r,D,!0)||[]};else if(Object.keys(e[0].params).length>0)return{active:!0,matches:x(t,r,D,!0)}}return{active:!1,matches:null}}function tc(e,a,n){return(0,s._)(function*(){var o=function*(){var e=null==r,o=r||b,s=g;try{yield C({path:a,matches:i,patch:(e,r)=>{n.aborted||ei(e,r,o,s,t)}})}catch(e){return{v:{type:"error",error:e,partialMatches:i}}}finally{e&&!n.aborted&&(b=[...b])}if(n.aborted)return{v:{type:"aborted"}};var l=S(o,a,D);if(l)return{v:{type:"success",matches:l}};var u=x(o,a,D,!0);if(!u||i.length===u.length&&i.every((e,t)=>e.route.id===u[t].route.id))return{v:{type:"success",matches:null}};i=u};if(!C)return{type:"success",matches:e};for(var i=e;;){var s=yield*o();if("object"===(0,l._)(s))return s.v}})()}return n={get basename(){return D},get future(){return k},get state(){return ec},get routes(){return b},get window(){return d},initialize:function(){if(_=e.history.listen(t=>{var{action:r,location:a,delta:n}=t;if(eX){eX(),eX=void 0;return}v(0===eY.size||null!=n,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");var o=tn({currentLocation:ec.location,nextLocation:a,historyAction:r});if(o&&null!=n){var i=new Promise(e=>{eX=e});e.history.go(-1*n),ta(o,{state:"blocked",location:a,proceed(){ta(o,{state:"proceeding",proceed:void 0,reset:void 0,location:a}),i.then(()=>e.history.go(n))},reset(){var e=new Map(ec.blockers);e.set(o,Y),eQ({blockers:e})}});return}return eK(r,a)}),h){var t=d,r=eU;try{var a=t.sessionStorage.getItem(G);if(a){var i=JSON.parse(a);for(var[s,l]of Object.entries(i||{}))l&&Array.isArray(l)&&r.set(s,new Set(l||[]))}}catch(e){}var u=()=>(function(e,t){if(t.size>0){var r={};for(var[a,n]of t)r[a]=[...n];try{e.sessionStorage.setItem(G,JSON.stringify(r))}catch(e){v(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}})(d,eU);d.addEventListener("pagehide",u),ej=()=>d.removeEventListener("pagehide",u)}return ec.initialized||eK(o.Pop,ec.location,{initialHydration:!0}),n},subscribe:function(e){return M.add(e),()=>M.delete(e)},enableScrollRestoration:function(e,t,r){if(T=e,j=t,U=r||null,!O&&ec.navigation===q){O=!0;var a=tl(ec.location,ec.matches);null!=a&&eQ({restoreScrollPosition:a})}return()=>{T=null,j=null,U=null}},navigate:function t(r,a){return(0,s._)(function*(){if("number"==typeof r)return void e.history.go(r);var n=Z(ec.location,ec.matches,D,k.v7_prependBasename,r,k.v7_relativeSplatPath,null==a?void 0:a.fromRouteId,null==a?void 0:a.relative),{path:i,submission:s,error:l}=ee(k.v7_normalizeFormMethod,!1,n,a),c=ec.location,d=m(ec.location,i,a&&a.state);d=u({},d,e.history.encodeLocation(d));var h=a&&null!=a.replace?a.replace:void 0,f=o.Push;!0===h?f=o.Replace:!1===h||null!=s&&eD(s.formMethod)&&s.formAction===ec.location.pathname+ec.location.search&&(f=o.Replace);var v=a&&"preventScrollReset"in a?!0===a.preventScrollReset:void 0,p=!0===(a&&a.flushSync),y=tn({currentLocation:c,nextLocation:d,historyAction:f});return y?void ta(y,{state:"blocked",location:d,proceed(){ta(y,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),t(r,a)},reset(){var e=new Map(ec.blockers);e.set(y,Y),eQ({blockers:e})}}):yield eK(f,d,{submission:s,pendingError:l,preventScrollReset:v,replace:a&&a.replace,enableViewTransition:a&&a.viewTransition,flushSync:p})})()},fetch:function(t,a,n,o){if(p)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.");e8(t);var i,l,u,d,h,v,m,y,g,w,E,x,R,P,C,L,_,M,T=!0===(o&&o.flushSync),U=r||b,j=Z(ec.location,ec.matches,D,k.v7_prependBasename,n,k.v7_relativeSplatPath,a,null==o?void 0:o.relative),O=S(U,j,D),A=tu(O,U,j);if(A.active&&A.matches&&(O=A.matches),!O)return void e2(t,a,ey(404,{pathname:j}),{flushSync:T});var{path:F,submission:B,error:N}=ee(k.v7_normalizeFormMethod,!0,j,o);if(N)return void e2(t,a,N,{flushSync:T});var z=eL(O,F),H=!0===(o&&o.preventScrollReset);if(B&&eD(B.formMethod)){return void(i=t,l=a,u=F,d=z,h=O,v=A.active,m=T,y=H,g=B,(0,s._)(function*(){function t(e){if(!e.route.action&&!e.route.lazy){var t=ey(405,{method:g.formMethod,pathname:u,routeId:l});return e2(i,l,t,{flushSync:m}),!0}return!1}if(e4(),eW.delete(i),!(!v&&t(d))){var a,n,o=ec.fetchers.get(i);e3(i,(a=g,n=o,{state:"submitting",formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text,data:n?n.data:void 0}),{flushSync:m});var s=new AbortController,p=eu(e.history,u,s.signal,g);if(v){var w=yield tc(h,u,p.signal);if("aborted"===w.type)return;if("error"===w.type)return void e2(i,l,w.error,{flushSync:m});if(!w.matches)return void e2(i,l,ey(404,{pathname:u}),{flushSync:m});if(t(d=eL(h=w.matches,u)))return}eN.set(i,s);var E=ez,x=(yield e1("action",ec,p,[d],h,i))[d.route.id];if(p.signal.aborted){eN.get(i)===s&&eN.delete(i);return}if(k.v7_fetcherPersist&&eq.has(i)){if(eS(x)||eE(x))return void e3(i,eT(void 0))}else{if(eS(x))return(eN.delete(i),eH>E)?void e3(i,eT(void 0)):(eJ.add(i),e3(i,eM(g)),e0(p,x,!1,{fetcherSubmission:g,preventScrollReset:y}));if(eE(x))return void e2(i,l,x.error)}if(ew(x))throw ey(400,{type:"defer-action"});var R=ec.navigation.location||ec.location,P=eu(e.history,R,s.signal),C=r||b,L="idle"!==ec.navigation.state?S(C,ec.navigation.location,D):ec.matches;f(L,"Didn't find any matches after fetcher action");var _=++ez;eI.set(i,_);var M=eM(g,x.data);ec.fetchers.set(i,M);var[T,U]=er(e.history,ec,L,g,R,!1,k.v7_skipActionErrorRevalidation,eA,eF,eB,eq,eW,eJ,C,D,[d.route.id,x]);U.filter(e=>e.key!==i).forEach(e=>{var t=e.key,r=ec.fetchers.get(t),a=eM(void 0,r?r.data:void 0);ec.fetchers.set(t,a),e8(t),e.controller&&eN.set(t,e.controller)}),eQ({fetchers:new Map(ec.fetchers)});var j=()=>U.forEach(e=>e8(e.key));s.signal.addEventListener("abort",j);var{loaderResults:O,fetcherResults:A}=yield e7(ec,L,T,U,P);if(!s.signal.aborted){s.signal.removeEventListener("abort",j),eI.delete(i),eN.delete(i),U.forEach(e=>eN.delete(e.key));var F=eg(O);if(F)return e0(P,F.result,!1,{preventScrollReset:y});if(F=eg(A))return eJ.add(F.key),e0(P,F.result,!1,{preventScrollReset:y});var{loaderData:B,errors:N}=eh(ec,L,O,void 0,U,A,eV);if(ec.fetchers.has(i)){var z=eT(x.data);ec.fetchers.set(i,z)}tt(_),"loading"===ec.navigation.state&&_>eH?(f(ed,"Expected pending action"),c&&c.abort(),eG(ec.navigation.location,{matches:L,loaderData:B,errors:N,fetchers:new Map(ec.fetchers)})):(eQ({errors:N,loaderData:ef(ec.loaderData,B,L,N),fetchers:new Map(ec.fetchers)}),eA=!1)}}})())}eW.set(t,{routeId:a,path:F}),w=t,E=a,x=F,R=z,P=O,C=A.active,L=T,_=H,M=B,(0,s._)(function*(){var t=ec.fetchers.get(w);e3(w,eM(M,t?t.data:void 0),{flushSync:L});var r=new AbortController,a=eu(e.history,x,r.signal);if(C){var n=yield tc(P,x,a.signal);if("aborted"===n.type)return;if("error"===n.type)return void e2(w,E,n.error,{flushSync:L});if(!n.matches)return void e2(w,E,ey(404,{pathname:x}),{flushSync:L});R=eL(P=n.matches,x)}eN.set(w,r);var o=ez,i=(yield e1("loader",ec,a,[R],P,w))[R.route.id];if(ew(i)&&(i=(yield eP(i,a.signal,!0))||i),eN.get(w)===r&&eN.delete(w),!a.signal.aborted){if(eq.has(w))return void e3(w,eT(void 0));if(eS(i))if(eH>o)return void e3(w,eT(void 0));else{eJ.add(w),yield e0(a,i,!1,{preventScrollReset:_});return}if(eE(i))return void e2(w,E,i.error);f(!ew(i),"Unhandled fetcher deferred data"),e3(w,eT(i.data))}})()},revalidate:function(){if(e4(),eQ({revalidation:"loading"}),"submitting"!==ec.navigation.state){if("idle"===ec.navigation.state)return void eK(ec.historyAction,ec.location,{startUninterruptedRevalidation:!0});eK(ed||ec.historyAction,ec.navigation.location,{overrideNavigation:ec.navigation,enableViewTransition:!0===eC})}},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:e5,deleteFetcher:function(e){if(k.v7_fetcherPersist){var t=(e$.get(e)||0)-1;t<=0?(e$.delete(e),eq.add(e)):e$.set(e,t)}else e9(e);eQ({fetchers:new Map(ec.fetchers)})},dispose:function(){_&&_(),ej&&ej(),M.clear(),c&&c.abort(),ec.fetchers.forEach((e,t)=>e9(t)),ec.blockers.forEach((e,t)=>tr(t))},getBlocker:function(e,t){var r=ec.blockers.get(e)||Y;return eY.get(e)!==t&&eY.set(e,t),r},deleteBlocker:tr,patchRoutes:function(e,a){var n=null==r;ei(e,a,r||b,g,t),n&&(b=[...b],eQ({}))},_internalFetchControllers:eN,_internalActiveDeferreds:eV,_internalSetRoutes:function(e){r=E(e,t,void 0,g={})}}}function Z(e,t,r,a,n,o,i,s){if(i){for(var l of(u=[],t))if(u.push(l),l.route.id===i){c=l;break}}else u=t,c=t[t.length-1];var u,c,d=T(n||".",M(u,o),L(e.pathname,r)||e.pathname,"path"===s);if(null==n&&(d.search=e.search,d.hash=e.hash),(null==n||""===n||"."===n)&&c){var h=eC(d.search);if(c.route.index&&!h)d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&h){var f=new URLSearchParams(d.search),v=f.getAll("index");f.delete("index"),v.filter(e=>e).forEach(e=>f.append("index",e));var p=f.toString();d.search=p?"?"+p:""}}return a&&"/"!==r&&(d.pathname="/"===d.pathname?r:U([r,d.pathname])),y(d)}function ee(e,t,r,a){if(!a||!(null!=a&&("formData"in a&&null!=a.formData||"body"in a&&void 0!==a.body)))return{path:r};if(a.formMethod&&(n=a.formMethod,!J.has(n.toLowerCase())))return{path:r,error:ey(405,{method:a.formMethod})};var n,o,i,s=()=>({path:r,error:ey(400,{type:"invalid-body"})}),l=a.formMethod||"get",u=e?l.toUpperCase():l.toLowerCase(),c=eb(r);if(void 0!==a.body){if("text/plain"===a.formEncType){if(!eD(u))return s();var d="string"==typeof a.body?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((e,t)=>{var[r,a]=t;return""+e+r+"="+a+"\n"},""):String(a.body);return{path:r,submission:{formMethod:u,formAction:c,formEncType:a.formEncType,formData:void 0,json:void 0,text:d}}}else if("application/json"===a.formEncType){if(!eD(u))return s();try{var h="string"==typeof a.body?JSON.parse(a.body):a.body;return{path:r,submission:{formMethod:u,formAction:c,formEncType:a.formEncType,formData:void 0,json:h,text:void 0}}}catch(e){return s()}}}if(f("function"==typeof FormData,"FormData is not available in this environment"),a.formData)o=ec(a.formData),i=a.formData;else if(a.body instanceof FormData)o=ec(a.body),i=a.body;else if(a.body instanceof URLSearchParams)i=ed(o=a.body);else if(null==a.body)o=new URLSearchParams,i=new FormData;else try{o=new URLSearchParams(a.body),i=ed(o)}catch(e){return s()}var v={formMethod:u,formAction:c,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(eD(v.formMethod))return{path:r,submission:v};var p=g(r);return t&&p.search&&eC(p.search)&&o.append("index",""),p.search="?"+o,{path:y(p),submission:v}}function et(e,t,r){void 0===r&&(r=!1);var a=e.findIndex(e=>e.route.id===t);return a>=0?e.slice(0,r?a+1:a):e}function er(e,t,r,a,n,o,i,s,l,c,d,h,f,v,p,m){var y=m?eE(m[1])?m[1].error:m[1].data:void 0,g=e.createURL(t.location),b=e.createURL(n),w=r;o&&t.errors?w=et(r,Object.keys(t.errors)[0],!0):m&&eE(m[1])&&(w=et(r,m[0]));var E=m?m[1].statusCode:void 0,x=i&&E&&E>=400,R=w.filter((e,r)=>{var n,i,c,d,h,{route:f}=e;if(f.lazy)return!0;if(null==f.loader)return!1;if(o)return ea(f,t.loaderData,t.errors);if(n=t.loaderData,i=t.matches[r],c=e,d=!i||c.route.id!==i.route.id,h=void 0===n[c.route.id],d||h||l.some(t=>t===e.route.id))return!0;var v=t.matches[r];return eo(e,u({currentUrl:g,currentParams:v.params,nextUrl:b,nextParams:e.params},a,{actionResult:y,actionStatus:E,defaultShouldRevalidate:!x&&(s||g.pathname+g.search===b.pathname+b.search||g.search!==b.search||en(v,e))}))}),D=[];return h.forEach((e,n)=>{if(!(o||!r.some(t=>t.route.id===e.routeId)||d.has(n))){var i=S(v,e.path,p);if(!i)return void D.push({key:n,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});var l=t.fetchers.get(n),h=eL(i,e.path),m=!1;f.has(n)?m=!1:c.has(n)?(c.delete(n),m=!0):m=l&&"idle"!==l.state&&void 0===l.data?s:eo(h,u({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:r[r.length-1].params},a,{actionResult:y,actionStatus:E,defaultShouldRevalidate:!x&&s})),m&&D.push({key:n,routeId:e.routeId,path:e.path,matches:i,match:h,controller:new AbortController})}}),[R,D]}function ea(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;var a=null!=t&&void 0!==t[e.id],n=null!=r&&void 0!==r[e.id];return(!!a||!n)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!a&&!n)}function en(e,t){var r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function eo(e,t){if(e.route.shouldRevalidate){var r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function ei(e,t,r,a,n){if(e){var o,i,s=a[e];f(s,"No route found to patch children into: routeId = "+e),s.children||(s.children=[]),i=s.children}else i=r;var l=E(t.filter(e=>!i.some(t=>(function e(t,r){return"id"in t&&"id"in r&&t.id===r.id||t.index===r.index&&t.path===r.path&&t.caseSensitive===r.caseSensitive&&((!t.children||0===t.children.length)&&(!r.children||0===r.children.length)||t.children.every((t,a)=>{var n;return null==(n=r.children)?void 0:n.some(r=>e(t,r))}))})(e,t))),n,[e||"_","patch",String((null==(o=i)?void 0:o.length)||"0")],a);i.push(...l)}function es(e){return(0,s._)(function*(){var{matches:t}=e,r=t.filter(e=>e.shouldLoad);return(yield Promise.all(r.map(e=>e.resolve()))).reduce((e,t,a)=>Object.assign(e,{[r[a].route.id]:t}),{})})()}function el(e,t,r){if(X.test(e)){var a=new URL(e.startsWith("//")?t.protocol+e:e),n=null!=L(a.pathname,r);if(a.origin===t.origin&&n)return a.pathname+a.search+a.hash}return e}function eu(e,t,r,a){var n=e.createURL(eb(t)).toString(),o={signal:r};if(a&&eD(a.formMethod)){var{formMethod:i,formEncType:s}=a;o.method=i.toUpperCase(),"application/json"===s?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(a.json)):"text/plain"===s?o.body=a.text:"application/x-www-form-urlencoded"===s&&a.formData?o.body=ec(a.formData):o.body=a.formData}return new Request(n,o)}function ec(e){var t=new URLSearchParams;for(var[r,a]of e.entries())t.append(r,"string"==typeof a?a:a.name);return t}function ed(e){var t=new FormData;for(var[r,a]of e.entries())t.append(r,a);return t}function eh(e,t,r,a,n,o,i){var s,l,c,d,h,v,{loaderData:p,errors:m}=(l={},c=null,d=!1,h={},v=a&&eE(a[1])?a[1].error:void 0,t.forEach(e=>{if(e.route.id in r){var a=e.route.id,n=r[a];if(f(!eS(n),"Cannot handle redirect results in processLoaderData"),eE(n)){var o=n.error;void 0!==v&&(o=v,v=void 0),c=c||{},1;var u=ep(t,a);null==c[u.route.id]&&(c[u.route.id]=o);l[a]=void 0,d||(d=!0,s=z(n.error)?n.error.status:500),n.headers&&(h[a]=n.headers)}else ew(n)?(i.set(a,n.deferredData),l[a]=n.deferredData.data,null==n.statusCode||200===n.statusCode||d||(s=n.statusCode)):(l[a]=n.data,n.statusCode&&200!==n.statusCode&&!d&&(s=n.statusCode)),n.headers&&(h[a]=n.headers)}}),void 0!==v&&a&&(c={[a[0]]:v},l[a[0]]=void 0),{loaderData:l,errors:c,statusCode:s||200,loaderHeaders:h});return n.forEach(t=>{var{key:r,match:a,controller:n}=t,i=o[r];if(f(i,"Did not find corresponding fetcher result"),!n||!n.signal.aborted)if(eE(i)){var s=ep(e.matches,null==a?void 0:a.route.id);m&&m[s.route.id]||(m=u({},m,{[s.route.id]:i.error})),e.fetchers.delete(r)}else if(eS(i))f(!1,"Unhandled fetcher revalidation redirect");else if(ew(i))f(!1,"Unhandled fetcher deferred data");else{var l=eT(i.data);e.fetchers.set(r,l)}}),{loaderData:p,errors:m}}function ef(e,t,r,a){var n=u({},t);for(var o of r){var i=o.route.id;if(t.hasOwnProperty(i)?void 0!==t[i]&&(n[i]=t[i]):void 0!==e[i]&&o.route.loader&&(n[i]=e[i]),a&&a.hasOwnProperty(i))break}return n}function ev(e){return e?eE(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ep(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 em(e){var t=1===e.length?e[0]:e.find(e=>e.index||!e.path||"/"===e.path)||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ey(e,t){var{pathname:r,routeId:a,method:n,type:o,message:i}=void 0===t?{}:t,s="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(s="Bad Request",n&&r&&a?l="You made a "+n+' request to "'+r+'" but did not provide a `loader` for route "'+a+'", so there is no way to handle the request.':"defer-action"===o?l="defer() is not supported in actions":"invalid-body"===o&&(l="Unable to encode submission body")):403===e?(s="Forbidden",l='Route "'+a+'" does not match URL "'+r+'"'):404===e?(s="Not Found",l='No route matches URL "'+r+'"'):405===e&&(s="Method Not Allowed",n&&r&&a?l="You made a "+n.toUpperCase()+' request to "'+r+'" but did not provide an `action` for route "'+a+'", so there is no way to handle the request.':n&&(l='Invalid request method "'+n.toUpperCase()+'"')),new N(e||500,s,Error(l),!0)}function eg(e){for(var t=Object.entries(e),r=t.length-1;r>=0;r--){var[a,n]=t[r];if(eS(n))return{key:a,result:n}}}function eb(e){var t="string"==typeof e?g(e):e;return y(u({},t,{hash:""}))}function ew(e){return e.type===i.deferred}function eE(e){return e.type===i.error}function eS(e){return(e&&e.type)===i.redirect}function ex(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function eR(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function eD(e){return I.has(e.toLowerCase())}function eP(e,t,r){return(0,s._)(function*(){if(void 0===r&&(r=!1),!(yield e.deferredData.resolveData(t))){if(r)try{return{type:i.data,data:e.deferredData.unwrappedData}}catch(e){return{type:i.error,error:e}}return{type:i.data,data:e.deferredData.data}}})()}function eC(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function eL(e,t){var r="string"==typeof t?g(t).search:t.search;if(e[e.length-1].route.index&&eC(r||""))return e[e.length-1];var a=_(e);return a[a.length-1]}function ek(e){var{formMethod:t,formAction:r,formEncType:a,text:n,formData:o,json:i}=e;if(t&&r&&a){if(null!=n)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:void 0,text:n};else if(null!=o)return{formMethod:t,formAction:r,formEncType:a,formData:o,json:void 0,text:void 0};else if(void 0!==i)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:i,text:void 0}}}function e_(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function eM(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function eT(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}Symbol("deferred")},54263:function(e,t,r){r.d(t,{aj:()=>m,cP:()=>y,lr:()=>C,pG:()=>D});var a,n,o,i,s,l,u=r(64349),c=r(18571),d=r(95291),h=r(73842),f=r(93731);function v(){return(v=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var a=e[r];return t.concat(Array.isArray(a)?a.map(e=>[r,e]):[[r,a]])},[]))}try{window.__reactRouterVersion="6"}catch(e){}function m(e,t){return(0,f.p7)({basename:null==t?void 0:t.basename,future:v({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:(0,f.lX)({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||g(),routes:e,mapRouteProperties:h.us,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation,window:null==t?void 0:t.window}).initialize()}function y(e,t){return(0,f.p7)({basename:null==t?void 0:t.basename,future:v({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:(0,f.q_)({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||g(),routes:e,mapRouteProperties:h.us,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation,window:null==t?void 0:t.window}).initialize()}function g(){var e,t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=v({},t,{errors:function(e){if(!e)return null;var t=Object.entries(e),r={};for(var[a,n]of t)if(n&&"RouteErrorResponse"===n.__type)r[a]=new f.OF(n.status,n.statusText,n.data,!0===n.internal);else if(n&&"Error"===n.__type){if(n.__subType){var o=window[n.__subType];if("function"==typeof o)try{var i=new o(n.message);i.stack="",r[a]=i}catch(e){}}if(null==r[a]){var s=Error(n.message);s.stack="",r[a]=s}}else r[a]=n;return r}(t.errors)})),t}var b=c.createContext({isTransitioning:!1}),w=c.createContext(new Map),E=(o||(o=r.t(c,2))).startTransition,S=(i||(i=r.t(d,2))).flushSync;function x(e){S?S(e):e()}(o||(o=r.t(c,2))).useId;class R{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}})}}function D(e){var{fallbackElement:t,router:r,future:a}=e,[n,o]=c.useState(r.state),[i,s]=c.useState(),[l,d]=c.useState({isTransitioning:!1}),[f,v]=c.useState(),[p,m]=c.useState(),[y,g]=c.useState(),S=c.useRef(new Map),{v7_startTransition:D}=a||{},C=c.useCallback(e=>{if(D)E?E(e):e();else e()},[D]),L=c.useCallback((e,t)=>{var{deletedFetchers:a,flushSync:n,viewTransitionOpts:i}=t;a.forEach(e=>S.current.delete(e)),e.fetchers.forEach((e,t)=>{void 0!==e.data&&S.current.set(t,e.data)});var l=null==r.window||null==r.window.document||"function"!=typeof r.window.document.startViewTransition;if(!i||l)return void(n?x(()=>o(e)):C(()=>o(e)));if(n){x(()=>{p&&(f&&f.resolve(),p.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:i.currentLocation,nextLocation:i.nextLocation})});var u=r.window.document.startViewTransition(()=>{x(()=>o(e))});u.finished.finally(()=>{x(()=>{v(void 0),m(void 0),s(void 0),d({isTransitioning:!1})})}),x(()=>m(u));return}p?(f&&f.resolve(),p.skipTransition(),g({state:e,currentLocation:i.currentLocation,nextLocation:i.nextLocation})):(s(e),d({isTransitioning:!0,flushSync:!1,currentLocation:i.currentLocation,nextLocation:i.nextLocation}))},[r.window,p,f,S,C]);c.useLayoutEffect(()=>r.subscribe(L),[r,L]),c.useEffect(()=>{l.isTransitioning&&!l.flushSync&&v(new R)},[l]),c.useEffect(()=>{if(f&&i&&r.window){var e=f.promise,t=r.window.document.startViewTransition(()=>(0,u._)(function*(){C(()=>o(i)),yield e})());t.finished.finally(()=>{v(void 0),m(void 0),s(void 0),d({isTransitioning:!1})}),m(t)}},[C,i,f,r.window]),c.useEffect(()=>{f&&i&&n.location.key===i.location.key&&f.resolve()},[f,p,n.location,i]),c.useEffect(()=>{!l.isTransitioning&&y&&(s(y.state),d({isTransitioning:!0,flushSync:!1,currentLocation:y.currentLocation,nextLocation:y.nextLocation}),g(void 0))},[l.isTransitioning,y]),c.useEffect(()=>{},[]);var k=c.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:e=>r.navigate(e),push:(e,t,a)=>r.navigate(e,{state:t,preventScrollReset:null==a?void 0:a.preventScrollReset}),replace:(e,t,a)=>r.navigate(e,{replace:!0,state:t,preventScrollReset:null==a?void 0:a.preventScrollReset})}),[r]),_=r.basename||"/",M=c.useMemo(()=>({router:r,navigator:k,static:!1,basename:_}),[r,k,_]),T=c.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return c.createElement(c.Fragment,null,c.createElement(h.w3.Provider,{value:M},c.createElement(h.FR.Provider,{value:n},c.createElement(w.Provider,{value:S.current},c.createElement(b.Provider,{value:l},c.createElement(h.F0,{basename:_,location:n.location,navigationType:n.historyAction,navigator:k,future:T},n.initialized||r.future.v7_partialHydration?c.createElement(P,{routes:r.routes,future:r.future,state:n}):t))))),null)}var P=c.memo(function(e){var{routes:t,future:r,state:a}=e;return(0,h.DY)(t,void 0,a,r)});function C(e){var t=c.useRef(p(e)),r=c.useRef(!1),a=(0,h.TH)(),n=c.useMemo(()=>{var e,n,o;return e=a.search,n=r.current?null:t.current,o=p(e),n&&n.forEach((e,t)=>{o.has(t)||n.getAll(t).forEach(e=>{o.append(t,e)})}),o},[a.search]),o=(0,h.s0)(),i=c.useCallback((e,t)=>{var a=p("function"==typeof e?e(n):e);r.current=!0,o("?"+a,t)},[o,n]);return[n,i]}"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,(a=s||(s={})).UseScrollRestoration="useScrollRestoration",a.UseSubmit="useSubmit",a.UseSubmitFetcher="useSubmitFetcher",a.UseFetcher="useFetcher",a.useViewTransitionState="useViewTransitionState",(n=l||(l={})).UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"},73842:function(e,t,r){r.d(t,{AW:()=>A,DY:()=>x,F0:()=>F,FR:()=>d,Fg:()=>j,SN:()=>M,TH:()=>g,UO:()=>S,f_:()=>T,i7:()=>function e(t,r){void 0===r&&(r=[]);var a=[];return s.Children.forEach(t,(t,n)=>{if(s.isValidElement(t)){var o=[...r,n];if(t.type===s.Fragment)return void a.push.apply(a,e(t.props.children,o));t.type!==A&&(0,l.J0)(!1),t.props.index&&t.props.children&&(0,l.J0)(!1);var i={id:t.props.id||o.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(i.children=e(t.props.children,o)),a.push(i)}}),a},j3:()=>O,oQ:()=>m,s0:()=>w,us:()=>N,w3:()=>c});var a,n,o,i,s=r(18571),l=r(93731);function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t(0,l.pC)(e,JSON.parse(i),o,"path"===r),[e,i,o,r])}(e,{relative:r}),c=i;return"/"!==a&&(c="/"===i?a:(0,l.RQ)([a,i])),n.createHref({pathname:c,search:u,hash:o})}function y(){return null!=s.useContext(f)}function g(){return y()||(0,l.J0)(!1),s.useContext(f).location}function b(e){s.useContext(h).static||s.useLayoutEffect(e)}function w(){var{isDataRoute:e}=s.useContext(v);return e?function(){var e,{router:t}=(C.UseNavigateStable,(e=s.useContext(c))||(0,l.J0)(!1),e),r=_(L.UseNavigateStable),a=s.useRef(!1);return b(()=>{a.current=!0}),s.useCallback(function(e,n){void 0===n&&(n={}),a.current&&("number"==typeof e?t.navigate(e):t.navigate(e,u({fromRouteId:r},n)))},[t,r])}():function(){y()||(0,l.J0)(!1);var e=s.useContext(c),{basename:t,future:r,navigator:a}=s.useContext(h),{matches:n}=s.useContext(v),{pathname:o}=g(),i=JSON.stringify((0,l.cm)(n,r.v7_relativeSplatPath)),u=s.useRef(!1);return b(()=>{u.current=!0}),s.useCallback(function(r,n){if(void 0===n&&(n={}),u.current){if("number"==typeof r)return void a.go(r);var s=(0,l.pC)(r,JSON.parse(i),o,"path"===n.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:(0,l.RQ)([t,s.pathname])),(n.replace?a.replace:a.push)(s,n.state,n)}},[t,a,i,o,e])}()}var E=s.createContext(null);function S(){var{matches:e}=s.useContext(v),t=e[e.length-1];return t?t.params:{}}function x(e,t,r,a){y()||(0,l.J0)(!1);var{navigator:n}=s.useContext(h),{matches:o}=s.useContext(v),i=o[o.length-1],c=i?i.params:{};i&&i.pathname;var d=i?i.pathnameBase:"/";i&&i.route;var p=g();if(t){var m,b,w="string"==typeof t?(0,l.cP)(t):t;"/"===d||(null==(b=w.pathname)?void 0:b.startsWith(d))||(0,l.J0)(!1),m=w}else m=p;var E=m.pathname||"/",S=E;if("/"!==d){var x=d.replace(/^\//,"").split("/");S="/"+E.replace(/^\//,"").split("/").slice(x.length).join("/")}var C=(0,l.fp)(e,{pathname:S}),L=function(e,t,r,a){if(void 0===t&&(t=[]),void 0===r&&(r=null),void 0===a&&(a=null),null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(null==(o=a)||!o.v7_partialHydration||0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}var n,o,i=e,u=null==(n=r)?void 0:n.errors;if(null!=u){var c=i.findIndex(e=>e.route.id&&(null==u?void 0:u[e.route.id])!==void 0);c>=0||(0,l.J0)(!1),i=i.slice(0,Math.min(i.length,c+1))}var d=!1,h=-1;if(r&&a&&a.v7_partialHydration)for(var f=0;f=0?i.slice(0,h+1):[i[0]];break}}}return i.reduceRight((e,a,n)=>{var o,l,c=!1,f=null,v=null;r&&(l=u&&a.route.id?u[a.route.id]:void 0,f=a.route.errorElement||R,d&&(h<0&&0===n?(o="route-fallback",U[o]||(U[o]=!0),c=!0,v=null):h===n&&(c=!0,v=a.route.hydrateFallbackElement||null)));var p=t.concat(i.slice(0,n+1)),m=()=>{var t;return t=l?f:c?v:a.route.Component?s.createElement(a.route.Component,null):a.route.element?a.route.element:e,s.createElement(P,{match:a,routeContext:{outlet:e,matches:p,isDataRoute:null!=r},children:t})};return r&&(a.route.ErrorBoundary||a.route.errorElement||0===n)?s.createElement(D,{location:r.location,revalidation:r.revalidation,component:f,error:l,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}(C&&C.map(e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:(0,l.RQ)([d,n.encodeLocation?n.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?d:(0,l.RQ)([d,n.encodeLocation?n.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),o,r,a);return t&&L?s.createElement(f.Provider,{value:{location:u({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:l.aU.Pop}},L):L}var R=s.createElement(function(){var e,t,r,a,n=(t=s.useContext(p),r=k(L.UseRouteError),a=_(L.UseRouteError),void 0!==t?t:null==(e=r.errors)?void 0:e[a]),o=(0,l.WK)(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null;return s.createElement(s.Fragment,null,s.createElement("h2",null,"Unexpected Application Error!"),s.createElement("h3",{style:{fontStyle:"italic"}},o),i?s.createElement("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"}},i):null,null)},null);class D extends s.Component{static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){}render(){return void 0!==this.state.error?s.createElement(v.Provider,{value:this.props.routeContext},s.createElement(p.Provider,{value:this.state.error,children:this.props.component})):this.props.children}constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}}function P(e){var{routeContext:t,match:r,children:a}=e,n=s.useContext(c);return n&&n.static&&n.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=r.route.id),s.createElement(v.Provider,{value:t},a)}var C=((a=C||{}).UseBlocker="useBlocker",a.UseRevalidator="useRevalidator",a.UseNavigateStable="useNavigate",a),L=((n=L||{}).UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n);function k(e){var t=s.useContext(d);return t||(0,l.J0)(!1),t}function _(e){var t,r=((t=s.useContext(v))||(0,l.J0)(!1),t),a=r.matches[r.matches.length-1];return a.route.id||(0,l.J0)(!1),a.route.id}function M(){var{matches:e,loaderData:t}=k(L.UseMatches);return s.useMemo(()=>e.map(e=>(0,l.WS)(e,t)),[e,t])}function T(){var e=k(L.UseLoaderData),t=_(L.UseLoaderData);if(!e.errors||null==e.errors[t])return e.loaderData[t]}var U={};function j(e){var{to:t,replace:r,state:a,relative:n}=e;y()||(0,l.J0)(!1);var{future:o,static:i}=s.useContext(h),{matches:u}=s.useContext(v),{pathname:c}=g(),d=w(),f=JSON.stringify((0,l.pC)(t,(0,l.cm)(u,o.v7_relativeSplatPath),c,"path"===n));return s.useEffect(()=>d(JSON.parse(f),{replace:r,state:a,relative:n}),[d,f,n,r,a]),null}function O(e){var t,r;return t=e.context,(r=s.useContext(v).outlet)?s.createElement(E.Provider,{value:t},r):r}function A(e){(0,l.J0)(!1)}function F(e){var{basename:t="/",children:r=null,location:a,navigationType:n=l.aU.Pop,navigator:o,static:i=!1,future:c}=e;y()&&(0,l.J0)(!1);var d=t.replace(/^\/*/,"/"),v=s.useMemo(()=>({basename:d,navigator:o,static:i,future:u({v7_relativeSplatPath:!1},c)}),[d,c,o,i]);"string"==typeof a&&(a=(0,l.cP)(a));var{pathname:p="/",search:m="",hash:g="",state:b=null,key:w="default"}=a,E=s.useMemo(()=>{var e=(0,l.Zn)(p,d);return null==e?null:{location:{pathname:e,search:m,hash:g,state:b,key:w},navigationType:n}},[d,p,m,g,b,w,n]);return null==E?null:s.createElement(h.Provider,{value:v},s.createElement(f.Provider,{children:r,value:E}))}(i||(i=r.t(s,2))).startTransition;var B=((o=B||{})[o.pending=0]="pending",o[o.success=1]="success",o[o.error=2]="error",o);function N(e){var t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:s.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:s.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:s.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}new Promise(()=>{}),s.Component}}]);