vendor: 3,015 bytes, line 1
1import{b as Mr}from"/build/_shared/chunk-76K4WF2D.js";function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},z.apply(this,arguments)}function Zn(e){e===void 0&&(e={});function t(n,a){let{pathname:d,search:l,hash:c}=n.location;return Be("",{pathname:d,search:l,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:Ye(a)}return Fr(t,r,null,e)}function _(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ee(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Or(){return Math.random().toString(36).substr(2,8)}function _t(e,t){return{usr:e.state,key:e.key,idx:t}}function Be(e,t,r,n){return r===void 0&&(r=null),z({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Re(t):t,{state:r,key:t&&t.key||n||Or()})}function Ye(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 Re(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 Fr(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:d=!1}=n,l=a.history,c=K.Pop,s=null,h=m();h==null&&(h=0,l.replaceState(z({},l.state,{idx:h}),""));function m(){return(l.state||{idx:null}).idx}function y(){c=K.Pop;let M=m(),H=M==null?null:M-h;h=M,s&&s({action:c,location:L.location,delta:H})}function g(M,H){c=K.Push;let j=Be(L.location,M,H);r&&r(j,M),h=m()+1;let q=_t(j,h),C=L.createHref(j);try{l.pushState(q,"",C)}catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;a.location.assign(C)}d&&s&&s({action:c,location:L.location,delta:1})}function w(M,H){c=K.Replace;let j=Be(L.location,M,H);r&&r(j,M),h=m();let q=_t(j,h),C=L.createHref(j);l.replaceState(q,"",C),d&&s&&s({action:c,location:L.location,delta:0})}function x(M){let H=a.location.origin!=="null"?a.location.origin:a.location.href,j=typeof M=="string"?M:Ye(M);return j=j.replace(/ $/,"%20"),_(H,"No window.location.(origin|href) available to create URL for href: "+j),new URL(j,H)}let L={get action(){return c},get location(){return e(a,l)},listen(M){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(Nt,y),s=M,()=>{a.removeEventListener(Nt,y),s=null}},createHref(M){return t(a,M)},createURL:x,encodeLocation(M){let H=x(M);return{pathname:H.pathname,search:H.search,hash:H.hash}},push:g,replace:w,go(M){return l.go(M)}};return L}function Cr(e){return e.index===!0}function at(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,d)=>{let l=[...r,String(d)],c=typeof a.id=="string"?a.id:l.join("-");if(_(a.index!==!0||!a.children,"Cannot specify children on an index route"),_(!n[c],'Found a route id collision on i
1d "'+c+`". Route id's must be globally unique within Data Router usages`),Cr(a)){let s=z({},a,t(a),{id:c});return n[c]=s,s}else{let s=z({},a,t(a),{id:c,children:void 0});return n[c]=s,a.children&&(s.children=at(a.children,t,l,n)),s}})}function Fe(e,t,r){return r===void 0&&(r="/"),nt(e,t,r,!1)}function nt(e,t,r,n){let a=typeof t=="string"?Re(t):t,d=lt(a.pathname||"/",r);if(d==null)return null;let l=er(e);Nr(l);let c=null;for(let s=0;c==null&&s<l.length;++s){let h=Kr(d);c=Yr(l[s],h,n)}return c}function Ir(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 er(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(d,l,c)=>{let s={relativePath:c===void 0?d.path||"":c,caseSensitive:d.caseSensitive===!0,childrenIndex:l,route:d};s.relativePath.startsWith("/")&&(_(s.relativePath.startsWith(n),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(n.length));let h=ke([n,s.relativePath]),m=r.concat(s);d.children&&d.children.length>0&&(_(d.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),er(d.children,t,m,h)),!(d.path==null&&!d.index)&&t.push({path:h,score:Br(h,d.index),routesMeta:m})};return e.forEach((d,l)=>{var c;if(d.path===""||!((c=d.path)!=null&&c.includes("?")))a(d,l);else for(let s of tr(d.path))a(d,l,s)}),t}function tr(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),d=r.replace(/\?$/,"");if(n.length===0)return a?[d,""]:[d];let l=tr(n.join("/")),c=[];return c.push(...l.map(s=>s===""?d:[d,s].join("/"))),a&&c.push(...l),c.map(s=>e.startsWith("/")&&s===""?"/":s)}function Nr(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Wr(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}function Br(e,t){let r=e.split("/"),n=r.length;return r.some(Ut)&&(n+=kr),t&&(n+=$r),r.filter(a=>!Ut(a)).reduce((a,d)=>a+(_r.test(d)?Ur:d===""?Hr:zr),n)}function Wr(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function Yr(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,a={},d="/",l=[];for(let c=0;c<n.length;++c){let s=n[c],h=c===n.length-1,m=d==="/"?t:t.slice(d.length)||"/",y=$t({path:s.relativePath,caseSensitive:s.caseSensitive,end:h},m),g=s.route;if(!y&&h&&r&&!n[n.length-1].route.index&&(y=$t({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},m)),!y)return null;
1Object.assign(a,y.params),l.push({params:a,pathname:ke([d,y.pathname]),pathnameBase:Qr(ke([d,y.pathnameBase])),route:g}),y.pathnameBase!=="/"&&(d=ke([d,y.pathnameBase]))}return l}function Qn(e,t){t===void 0&&(t={});let r=e;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(Ee(!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(/\*$/,"/*"));let n=r.startsWith("/")?"/":"",a=l=>l==null?"":typeof l=="string"?l:String(l),d=r.split(/\/+/).map((l,c,s)=>{if(c===s.length-1&&l==="*")return a(t["*"]);let m=l.match(/^:([\w-]+)(\??)$/);if(m){let[,y,g]=m,w=t[y];return _(g==="?"||w!=null,'Missing ":'+y+'" param'),a(w)}return l.replace(/\?$/g,"")}).filter(l=>!!l);return n+d.join("/")}function $t(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Vr(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let d=a[0],l=d.replace(/(.)\/+$/,"$1"),c=a.slice(1);return{params:n.reduce((h,m,y)=>{let{paramName:g,isOptional:w}=m;if(g==="*"){let L=c[y]||"";l=d.slice(0,d.length-L.length).replace(/(.)\/+$/,"$1")}let x=c[y];return w&&!x?h[g]=void 0:h[g]=(x||"").replace(/%2F/g,"/"),h},{}),pathname:d,pathnameBase:l,pattern:e}}function Vr(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Ee(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,c,s)=>(n.push({paramName:c,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Kr(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ee(!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}}function lt(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 Jr(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Re(e):e;return{pathname:r?r.startsWith("/")?r:Gr(r,t):t,search:qr(n),hash:en(a)}}function Gr(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function ft(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 rr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Xr(e,t){let r=rr(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Zr(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=Re(e):(a=z({},e),_(!a.pathname||!a.pathname.includes("?"),ft("?","pathname","search",a)),_(!a.pathname||!a.pathname.includes("#"),ft("#","pathname","hash",a)),_(!a.search||!a.search.includes("#"),ft("#","search","hash",a)));let d=e===""||a.pathname==="",l=d?"/":a.pathname,c;if(l==null)c=r;else{let y=t.length-1;if(!n&&l.startsWith("..")){let g=l.split("/");for(;g[0]==="..";)g.shift(),y-=1;a.pathname=g.join("/")}c=y>=0?t[y]:"/"}let s=Jr(a,c),h=l&&l!=="/"&&l.endsWith("/"),m=(d||l===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(h||m)&&(s.pathname+="/"),s}function qn(e,t){return new mt(e,typeof t=="number"?{status:t}:t)}function tn(e){return e instanceof Promise&&e._tracked===!0}function rn(e){if(!tn(e))return e;if(e._error)throw e._error;return e._data}function ot(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ta(e){let t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;_(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let i=e.detectErrorBoundary;a=o=>({hasErrorBoundary:i(o)})}else a=un;let d={},l=at(e.routes,a,void 0,d),c,s=e.basename||"/",h=e.dataStrategy||pn,m=e.patchRoutesOnNavigation,y=z({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prepe
vendor: 36,729 bytes, lines 1-2
1ndBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),g=null,w=new Set,x=null,L=null,M=null,H=e.hydrationData!=null,j=Fe(l,e.history.location,s),q=!1,C=null;if(j==null&&!m){let i=Q(404,{pathname:e.history.location.pathname}),{matches:o,route:u}=Zt(l);j=o,C={[u.id]:i}}j&&!e.hydrationData&&Qe(j,l,e.history.location.pathname).active&&(j=null);let I;if(j)if(j.some(i=>i.route.lazy))I=!1;else if(!j.some(i=>i.route.loader))I=!0;else if(y.v7_partialHydration){let i=e.hydrationData?e.hydrationData.loaderData:null,o=e.hydrationData?e.hydrationData.errors:null;if(o){let u=j.findIndex(p=>o[p.route.id]!==void 0);I=j.slice(0,u+1).every(p=>!gt(p.route,i,o))}else I=j.every(u=>!gt(u.route,i,o))}else I=e.hydrationData!=null;else if(I=!1,j=[],y.v7_partialHydration){let i=Qe(null,l,e.history.location.pathname);i.active&&i.matches&&(q=!0,j=i.matches)}let Y,f={historyAction:e.history.action,location:e.history.location,matches:j,initialized:I,navigation:ht,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||C,fetchers:new Map,blockers:new Map},U=K.Pop,X=!1,k,ee=!1,re=new Map,ne=null,De=!1,pe=!1,Ve=[],Ke=new Set,J=new Map,Je=0,Ae=-1,xe=new Map,le=new Set,Pe=new Map,Ce=new Map,ae=new Set,me=new Map,ye=new Map,Ge;function hr(){if(g=e.history.listen(i=>{let{action:o,location:u,delta:p}=i;if(Ge){Ge(),Ge=void 0;return}Ee(ye.size===0||p!=null,"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.");let v=Ft({currentLocation:f.location,nextLocation:u,historyAction:o});if(v&&p!=null){let D=new Promise(P=>{Ge=P});e.history.go(p*-1),Ze(v,{state:"blocked",location:u,proceed(){Ze(v,{state:"proceeding",proceed:void 0,reset:void 0,location:u}),D.then(()=>e.history.go(p))},reset(){let P=new Map(f.blockers);P.set(v,$e),Z({blockers:P})}});return}return ge(o,u)}),r){jn(t,re);let i=()=>Tn(t,re);t.addEventListener("pagehide",i),ne=()=>t.removeEventListener("pagehide",i)}return f.initialized||ge(K.Pop,f.location,{initialHydration:!0}),Y}function pr(){g&&g(),ne&&ne(),w.clear(),k&&k.abort(),f.fetchers.forEach((i,o)=>Xe(o)),f.blockers.forEach((i,o)=>Ot(o))}function mr(i){return w.add(i),()=>w.delete(i)}function Z(i,o){o===void 0&&(o={}),f=z({},f,i);let u=[],p=[];y.v7_fetcherPersist&&f.fetchers.forEach((v,D)=>{v.state==="idle"&&(ae.has(D)?p.push(D):u.push(D))}),ae.forEach(v=>{!f.fetchers.has(v)&&!J.has(v)&&p.push(v)}),[...w].forEach(v=>v(f,{deletedFetchers:p,viewTransitionOpts:o.viewTransitionOpts,flushSync:o.flushSync===!0})),y.v7_fetcherPersist?(u.forEach(v=>f.fetchers.delete(v)),p.forEach(v=>Xe(v))):p.forEach(v=>ae.delete(v))}function Le(i,o,u){var p,v;let{flushSync:D}=u===void 0?{}:u,P=f.actionData!=null&&f.navigation.formMethod!=null&&ie(f.navigation.formMethod)&&f.navigation.state==="loading"&&((p=i.state)==null?void 0:p._isRedirect)!==!0,S;o.actionData?Object.keys(o.actionData).length>0?S=o.actionData:S=null:P?S=f.actionData:S=null;let E=o.loaderData?Gt(f.loaderData,o.loaderData,o.matches||[],o.errors):f.loaderData,b=f.blockers;b.size>0&&(b=new Map(b),b.forEach((O,G)=>b.set(G,$e)));let R=X===!0||f.navigation.formMethod!=null&&ie(f.navigation.formMethod)&&((v=i.state)==null?void 0:v._isRedirect)!==!0;c&&(l=c,c=void 0),De||U===K.Pop||(U===K.Push?e.history.push(i,i.state):U===K.Replace&&e.history.replace(i,i.state));let T;if(U===K.Pop){let O=re.get(f.location.pathname);O&&O.has(i.pathname)?T={currentLocation:f.location,nextLocation:i}:re.has(i.pathname)&&(T={currentLocation:i,nextLocation:f.location})}else if(ee){let O=re.get(f.location.pathname);O?O.add(i.pathname):(O=new Set([i.pathname]),re.set(f.location.pathname,O)),T={currentLocation:f.location,nextLocation:i}}Z(z({},o,{actionData:S,loaderData:E,historyAction:U,location:i,initialized:!0,navigation:ht,revalidation:"idle",restoreScrollPosition:Ct(i,o.matches||f.matches),preventScrollReset:R,blockers:b}),{viewTransitionOpts:T,flushSync:D===!0}),U=K.Pop,X=!1,ee=!1,De=!1,pe=!1,Ve=[]}async function Dt(i,o){if(typeof i=="number"){e.history.go(i);return}let u=yt(f.location,f.matches,s,y.v7_prependBasename,i,y.v7_relativeSplatPath,o?.fromRouteId,o?.relative),{path:p,submission:v,error:D}=zt(y.v7_normalizeFormMethod,!1,u,o),P=f.location,S=Be(f.location,p,o&&o.state);S=z({},S,e.history.encodeLocation(S));let E=o&&o.replace!=null?o.replace:void 0,b=K.Push;E===!0?b=K.Replace:E===!1||v!=null&&ie(v.formMethod)&&v.formAction===f.location.pathname+f.location.search&&(b=K.Replace);let R=o&&"preventScrollReset"in o?o.preventScrollReset===!0:void 0,T=(o&&o.flushSync)===!0,O=Ft({currentLocation:P,nextLocation:S,historyAction:b});if(O){Ze(O,{state:"blocked",location:S,proceed(){Ze(O,{state:"proceeding",proceed:void 0,reset:void 0,location:S}),Dt(i,o)},reset(){let G=new Map(f.blockers);G.set(O,$e),Z({blockers:G})}});return}return await ge(b,S,{submission:v,pendingError:D,preventScrollReset:R,replace:o&&o.replace,enableViewTransition:o&&o.viewTransition,flushSync:T})}function yr(){if(st(),Z({revalidation:"loading"}),f.navigation.state!=="submitting"){if(f.navigation.state==="idle"){ge(f.historyAction,f.location,{startUninterruptedRevalidation:!0});return}ge(U||f.historyAction,f.navigation.location,{overrideNavigation:f.navigation,enableViewTransition:ee===!0})}}async function ge(i,o,u){k&&k.abort(),k=null,U=i,De=(u&&u.startUninterruptedRevalidation)===!0,Pr(f.location,f.matches),X=(u&&u.preventScrollReset)===!0,ee=(u&&u.enableViewTransition)===!0;let p=c||l,v=u&&u.overrideNavigation,D=u!=null&&u.initialHydration&&f.matches&&f.matches.length>0&&!q?f.matches:Fe(p,o,s),P=(u&&u.flushSync)===!0;if(D&&f.initialized&&!pe&&bn(f.location,o)&&!(u&&u.submission&&ie(u.submission.formMethod))){Le(o,{matches:D},{flushSync:P});return}let S=Qe(D,p,o.pathname);if(S.active&&S.matches&&(D=S.matches),!D){let{error:$,notFoundMatches:A,route:B}=dt(o.pathname);Le(o,{matches:A,loaderData:{},errors:{[B.id]:$}},{flushSync:P});return}k=new AbortController;let E=Oe(e.history,o,k.signal,u&&u.submission),b;if(u&&u.pendingError)b=[be(D).route.id,{type:N.error,error:u.pendingError}];else if(u&&u.submission&&ie(u.submission.formMethod)){let $=await gr(E,o,u.submission,D,S.active,{replace:u.replace,flushSync:P});if($.shortCircuited)return;if($.pendingActionResult){let[A,B]=$.pendingActionResult;if(te(B)&&ot(B.error)&&B.error.status===404){k=null,Le(o,{matches:$.matches,loaderData:{},errors:{[A]:B.error}});return}}D=$.matches||D,b=$.pendingActionResult,v=pt(o,u.submission),P=!1,S.active=!1,E=Oe(e.history,E.url,E.signal)}let{shortCircuited:R,matches:T,loaderData:O,errors:G}=await vr(E,o,D,S.active,v,u&&u.submission,u&&u.fetcherSubmission,u&&u.replace,u&&u.initialHydration===!0,P,b);R||(k=null,Le(o,z({matches:T||D},Xt(b),{loaderData:O,errors:G})))}async function gr(i,o,u,p,v,D){D===void 0&&(D={}),st();let P=Pn(o,u);if(Z({navigation:P},{flushSync:D.flushSync===!0}),v){let b=await qe(p,o.pathname,i.signal);if(b.type==="aborted")return{shortCircuited:!0};if(b.type==="error"){let R=be(b.partialMatches).route.id;return{matches:b.partialMatches,pendingActionResult:[R,{type:N.error,error:b.error}]}}else if(b.matches)p=b.matches;else{let{notFoundMatches:R,error:T,route:O}=dt(o.pathname);return{matches:R,pendingActionResult:[O.id,{type:N.error,error:T}]}}}let S,E=ze(p,o);if(!E.route.action&&!E.route.lazy)S={type:N.error,error:Q(405,{method:i.method,pathname:o.pathname,routeId:E.route.id})};else if(S=(await Ie("action",f,i,[E],p,null))[E.route.id],i.signal.aborted)return{shortCircuited:!0};if(Se(S)){let b;return D&&D.replace!=null?b=D.replace:b=Vt(S.response.headers.get("Location"),new URL(i.url),s)===f.location.pathname+f.location.search,await ve(i,S,!0,{submission:u,replace:b}),{shortCircuited:!0}}if(he(S))throw Q(400,{type:"defer-action"});if(te(S)){let b=be(p,E.route.id);return(D&&D.replace)!==!0&&(U=K.Push),{matches:p,pendingActionResult:[b.route.id,S]}}return{matches:p,pendingActionResult:[E.route.id,S]}}async function vr(i,o,u,p,v,D,P,S,E,b,R){let T=v||pt(o,D),O=D||P||qt(T),G=!De&&(!y.v7_partialHydration||!E);if(p){if(G){let W=xt(R);Z(z({navigation:T},W!==void 0?{actionData:W}:{}),{flushSync:b})}let F=await qe(u,o.pathname,i.signal);if(F.type==="aborted")return{shortCircuited:!0};if(F.type==="error"){let W=be(F.partialMatches).route.id;return{matches:F.partialMatches,loaderData:{},errors:{[W]:F.error}}}else if(F.matches)u=F.matches;else{let{error:W,notFoundMatches:Te,route:Ue}=dt(o.pathname);return{matches:Te,loaderData:{},errors:{[Ue.id]:W}}}}let $=c||l,[A,B]=Bt(e.history,f,u,O,o,y.v7_partialHydration&&E===!0,y.v7_skipActionErrorRevalidation,pe,Ve,Ke,ae,Pe,le,$,s,R);if(ut(F=>!(u&&u.some(W=>W.route.id===F))||A&&A.some(W=>W.route.id===F)),Ae=++Je,A.length===0&&B.length===0){let F=Tt();return Le(o,z({matches:u,loaderData:{},errors:R&&te(R[1])?{[R[0]]:R[1].error}:null},Xt(R),F?{fetchers:new Map(f.fetchers)}:{}),{flushSync:b}),{shortCircuited:!0}}if(G){let F={};if(!p){F.navigation=T;let W=xt(R);W!==void 0&&(F.actionData=W)}B.length>0&&(F.fetchers=wr(B)),Z(F,{flushSync:b})}B.forEach(F=>{ce(F.key),F.controller&&J.set(F.key,F.controller)});let je=()=>B.forEach(F=>ce(F.key));k&&k.signal.addEventListener("abort",je);let{loaderResults:Ne,fetcherResults:de}=await Pt(f,u,A,B,i);if(i.signal.aborted)return{shortCircuited:!0};k&&k.signal.removeEventListener("abort",je),B.forEach(F=>J.delete(F.key));let oe=rt(Ne);if(oe)return await ve(i,oe.result,!0,{replace:S}),{shortCircuited:!0};if(oe=rt(de),oe)return le.add(oe.key),await ve(i,oe.result,!0,{replace:S}),{shortCircuited:!0};let{loaderData:ct,errors:_e}=Jt(f,u,Ne,R,B,de,me);me.forEach((F,W)=>{F.subscribe(Te=>{(Te||F.done)&&me.delete(W)})}),y.v7_partialHydration&&E&&f.errors&&(_e=z({},f.errors,_e));let we=Tt(),et=Mt(Ae),tt=we||et||B.length>0;return z({matches:u,loaderData:ct,errors:_e},tt?{fetchers:new Map(f.fetchers)}:{})}function xt(i){if(i&&!te(i[1]))return{[i[0]]:i[1].data};if(f.actionData)return Object.keys(f.actionData).length===0?null:f.actionData}function wr(i){return i.forEach(o=>{let u=f.fetchers.get(o.key),p=He(void 0,u?u.data:void 0);f.fetchers.set(o.key,p)}),new Map(f.fetchers)}function br(i,o,u,p){if(n)throw new 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.");ce(i);let v=(p&&p.flushSync)===!0,D=c||l,P=yt(f.location,f.matches,s,y.v7_prependBasename,u,y.v7_relativeSplatPath,o,p?.relative),S=Fe(D,P,s),E=Qe(S,D,P);if(E.active&&E.matches&&(S=E.matches),!S){se(i,o,Q(404,{pathname:P}),{flushSync:v});return}let{path:b,submission:R,error:T}=zt(y.v7_normalizeFormMethod,!0,P,p);if(T){se(i,o,T,{flushSync:v});return}let O=ze(S,b),G=(p&&p.preventScrollReset)===!0;if(R&&ie(R.formMethod)){Sr(i,o,b,O,S,E.active,v,G,R);return}Pe.set(i,{routeId:o,path:b}),Er(i,o,b,O,S,E.active,v,G,R)}async function Sr(i,o,u,p,v,D,P,S,E){st(),Pe.delete(i);function b(V){if(!V.route.action&&!V.route.lazy){let Me=Q(405,{method:E.formMethod,pathname:u,routeId:o});return se(i,o,Me,{flushSync:P}),!0}return!1}if(!D&&b(p))return;let R=f.fetchers.get(i);ue(i,Ln(E,R),{flushSync:P});let T=new AbortController,O=Oe(e.history,u,T.signal,E);if(D){let V=await qe(v,new URL(O.url).pathname,O.signal,i);if(V.type==="aborted")return;if(V.type==="error"){se(i,o,V.error,{flushSync:P});return}else if(V.matches){if(v=V.matches,p=ze(v,u),b(p))return}else{se(i,o,Q(404,{pathname:u}),{flushSync:P});return}}J.set(i,T);let G=Je,A=(await Ie("action",f,O,[p],v,i))[p.route.id];if(O.signal.aborted){J.get(i)===T&&J.delete(i);return}if(y.v7_fetcherPersist&&ae.has(i)){if(Se(A)||te(A)){ue(i,fe(void 0));return}}else{if(Se(A))if(J.delete(i),Ae>G){ue(i,fe(void 0));return}else return le.add(i),ue(i,He(E)),ve(O,A,!1,{fetcherSubmission:E,preventScrollReset:S});if(te(A)){se(i,o,A.error);return}}if(he(A))throw Q(400,{type:"defer-action"});let B=f.navigation.location||f.location,je=Oe(e.history,B,T.signal),Ne=c||l,de=f.navigation.state!=="idle"?Fe(Ne,f.navigation.location,s):f.matches;_(de,"Didn't find any matches after fetcher action");let oe=++Je;xe.set(i,oe);let ct=He(E,A.data);f.fetchers.set(i,ct);let[_e,we]=Bt(e.history,f,de,E,B,!1,y.v7_skipActionErrorRevalidation,pe,Ve,Ke,ae,Pe,le,Ne,s,[p.route.id,A]);we.filter(V=>V.key!==i).forEach(V=>{let Me=V.key,It=f.fetchers.get(Me),Tr=He(void 0,It?It.data:void 0);f.fetchers.set(Me,Tr),ce(Me),V.controller&&J.set(Me,V.controller)}),Z({fetchers:new Map(f.fetchers)});let et=()=>we.forEach(V=>ce(V.key));T.signal.addEventListener("abort",et);let{loaderResults:tt,fetcherResults:F}=await Pt(f,de,_e,we,je);if(T.signal.aborted)return;T.signal.removeEventListener("abort",et),xe.delete(i),J.delete(i),we.forEach(V=>J.delete(V.key));let W=rt(tt);if(W)return ve(je,W.result,!1,{preventScrollReset:S});if(W=rt(F),W)return le.add(W.key),ve(je,W.result,!1,{preventScrollReset:S});let{loaderData:Te,errors:Ue}=Jt(f,de,tt,void 0,we,F,me);if(f.fetchers.has(i)){let V=fe(A.data);f.fetchers.set(i,V)}Mt(oe),f.navigation.state==="loading"&&oe>Ae?(_(U,"Expected pending action"),k&&k.abort(),Le(f.navigation.location,{matches:de,loaderData:Te,errors:Ue,fetchers:new Map(f.fetchers)})):(Z({errors:Ue,loaderData:Gt(f.loaderData,Te,de,Ue),fetchers:new Map(f.fetchers)}),pe=!1)}async function Er(i,o,u,p,v,D,P,S,E){let b=f.fetchers.get(i);ue(i,He(E,b?b.data:void 0),{flushSync:P});let R=new AbortController,T=Oe(e.history,u,R.signal);if(D){let A=await qe(v,new URL(T.url).pathname,T.signal,i);if(A.type==="aborted")return;if(A.type==="error"){se(i,o,A.error,{flushSync:P});return}else if(A.matches)v=A.matches,p=ze(v,u);else{se(i,o,Q(404,{pathname:u}),{flushSync:P});return}}J.set(i,R);let O=Je,$=(await Ie("loader",f,T,[p],v,i))[p.route.id];if(he($)&&($=await bt($,T.signal,!0)||$),J.get(i)===R&&J.delete(i),!T.signal.aborted){if(ae.has(i)){ue(i,fe(void 0));return}if(Se($))if(Ae>O){ue(i,fe(void 0));return}else{le.add(i),await ve(T,$,!1,{preventScrollReset:S});return}if(te($)){se(i,o,$.error);return}_(!he($),"Unhandled fetcher deferred data"),ue(i,fe($.data))}}async function ve(i,o,u,p){let{submission:v,fetcherSubmission:D,preventScrollReset:P,replace:S}=p===void 0?{}:p;o.response.headers.has("X-Remix-Revalidate")&&(pe=!0);let E=o.response.headers.get("Location");_(E,"Expected a Location header on the redirect Response"),E=Vt(E,new URL(i.url),s);let b=Be(f.location,E,{_isRedirect:!0});if(r){let A=!1;if(o.response.headers.has("X-Remix-Reload-Document"))A=!0;else if(wt.test(E)){let B=e.history.createURL(E);A=B.origin!==t.location.origin||lt(B.pathname,s)==null}if(A){S?t.location.replace(E):t.location.assign(E);return}}k=null;let R=S===!0||o.response.headers.has("X-Remix-Replace")?K.Replace:K.Push,{formMethod:T,formAction:O,formEncType:G}=f.navigation;!v&&!D&&T&&O&&G&&(v=qt(f.navigation));let $=v||D;if(sn.has(o.response.status)&&$&&ie($.formMethod))await ge(R,b,{submission:z({},$,{formAction:E}),preventScrollReset:P||X,enableViewTransition:u?ee:void 0});else{let A=pt(b,v);await ge(R,b,{overrideNavigation:A,fetcherSubmission:D,preventScrollReset:P||X,enableViewTransition:u?ee:void 0})}}async function Ie(i,o,u,p,v,D){let P,S={};try{P=await mn(h,i,o,u,p,v,D,d,a)}catch(E){return p.forEach(b=>{S[b.route.id]={type:N.error,error:E}}),S}for(let[E,b]of Object.entries(P))if(Sn(b)){let R=b.result;S[E]={type:N.redirect,response:vn(R,u,E,v,s,y.v7_relativeSplatPath)}}else S[E]=await gn(b);return S}async function Pt(i,o,u,p,v){let D=i.matches,P=Ie("loader",i,v,u,o,null),S=Promise.all(p.map(async R=>{if(R.matches&&R.match&&R.controller){let O=(await Ie("loader",i,Oe(e.history,R.path,R.controller.signal),[R.match],R.matches,R.key))[R.match.route.id];return{[R.key]:O}}else return Promise.resolve({[R.key]:{type:N.error,error:Q(404,{pathname:R.path})}})})),E=await P,b=(await S).reduce((R,T)=>Object.assign(R,T),{});return await Promise.all([Dn(o,E,v.signal,D,i.loaderData),xn(o,b,p)]),{loaderResults:E,fetcherResults:b}}function st(){pe=!0,Ve.push(...ut()),Pe.forEach((i,o)=>{J.has(o)&&Ke.add(o),ce(o)})}function ue(i,o,u){u===void 0&&(u={}),f.fetchers.set(i,o),Z({fetchers:new Map(f.fetchers)},{flushSync:(u&&u.flushSync)===!0})}function se(i,o,u,p){p===void 0&&(p={});let v=be(f.matches,o);Xe(i),Z({errors:{[v.route.id]:u},fetchers:new Map(f.fetchers)},{flushSync:(p&&p.flushSync)===!0})}function Lt(i){return Ce.set(i,(Ce.get(i)||0)+1),ae.has(i)&&ae.delete(i),f.fetchers.get(i)||dn}function Xe(i){let o=f.fetchers.get(i);J.has(i)&&!(o&&o.state==="loading"&&xe.has(i))&&ce(i),Pe.delete(i),xe.delete(i),le.delete(i),y.v7_fetcherPersist&&ae.delete(i),Ke.delete(i),f.fetchers.delete(i)}function Rr(i){let o=(Ce.get(i)||0)-1;o<=0?(Ce.delete(i),ae.add(i),y.v7_fetcherPersist||Xe(i)):Ce.set(i,o),Z({fetchers:new Map(f.fetchers)})}function ce(i){let o=J.get(i);o&&(o.abort(),J.delete(i))}function jt(i){for(let o of i){let u=Lt(o),p=fe(u.data);f.fetchers.set(o,p)}}function Tt(){let i=[],o=!1;for(let u of le){let p=f.fetchers.get(u);_(p,"Expected fetcher: "+u),p.state==="loading"&&(le.delete(u),i.push(u),o=!0)}return jt(i),o}function Mt(i){let o=[];for(let[u,p]of xe)if(p<i){let v=f.fetchers.get(u);_(v,"Expected fetcher: "+u),v.state==="loading"&&(ce(u),xe.delete(u),o.push(u))}return jt(o),o.length>0}function Dr(i,o){let u=f.blockers.get(i)||$e;return ye.get(i)!==o&&ye.set(i,o),u}function Ot(i){f.blockers.delete(i),ye.delete(i)}function Ze(i,o){let u=f.blockers.get(i)||$e;_(u.state==="unblocked"&&o.state==="blocked"||u.state==="blocked"&&o.state==="blocked"||u.state==="blocked"&&o.state==="proceeding"||u.state==="blocked"&&o.state==="unblocked"||u.state==="proceeding"&&o.state==="unblocked","Invalid blocker state transition: "+u.state+" -> "+o.state);let p=new Map(f.blockers);p.set(i,o),Z({blockers:p})}function Ft(i){let{currentLocation:o,nextLocation:u,historyAction:p}=i;if(ye.size===0)return;ye.size>1&&Ee(!1,"A router only supports one blocker at a time");let v=Array.from(ye.entries()),[D,P]=v[v.length-1],S=f.blockers.get(D);if(!(S&&S.state==="proceeding")&&P({currentLocation:o,nextLocation:u,historyAction:p}))return D}function dt(i){let o=Q(404,{pathname:i}),u=c||l,{matches:p,route:v}=Zt(u);return ut(),{notFoundMatches:p,route:v,error:o}}function ut(i){let o=[];return me.forEach((u,p)=>{(!i||i(p))&&(u.cancel(),o.push(p),me.delete(p))}),o}function xr(i,o,u){if(x=i,M=o,L=u||null,!H&&f.navigation===ht){H=!0;let p=Ct(f.location,f.matches);p!=null&&Z({restoreScrollPosition:p})}return()=>{x=null,M=null,L=null}}function At(i,o){return L&&L(i,o.map(p=>Ir(p,f.loaderData)))||i.key}function Pr(i,o){if(x&&M){let u=At(i,o);x[u]=M()}}function Ct(i,o){if(x){let u=At(i,o),p=x[u];if(typeof p=="number")return p}return null}function Qe(i,o,u){if(m)if(i){if(Object.keys(i[0].params).length>0)return{active:!0,matches:nt(o,u,s,!0)}}else return{active:!0,matches:nt(o,u,s,!0)||[]};return{active:!1,matches:null}}async function qe(i,o,u,p){if(!m)return{type:"success",matches:i};let v=i;for(;;){let D=c==null,P=c||l,S=d;try{await m({signal:u,path:o,matches:v,fetcherKey:p,patch:(R,T)=>{u.aborted||Yt(R,T,P,S,a)}})}catch(R){return{type:"error",error:R,partialMatches:v}}finally{D&&!u.aborted&&(l=[...l])}if(u.aborted)return{type:"aborted"};let E=Fe(P,o,s);if(E)return{type:"success",matches:E};let b=nt(P,o,s,!0);if(!b||v.length===b.length&&v.every((R,T)=>R.route.id===b[T].route.id))return{type:"success",matches:null};v=b}}function Lr(i){d={},c=at(i,a,void 0,d)}function jr(i,o){let u=c==null;Yt(i,o,c||l,d,a),u&&(l=[...l],Z({}))}return Y={get basename(){return s},get future(){return y},get state(){return f},get routes(){return l},get window(){return t},initialize:hr,subscribe:mr,enableScrollRestoration:xr,navigate:Dt,fetch:br,revalidate:yr,createHref:i=>e.history.createHref(i),encodeLocation:i=>e.history.encodeLocation(i),getFetcher:Lt,deleteFetcher:Rr,dispose:pr,getBlocker:Dr,deleteBlocker:Ot,patchRoutes:jr,_internalFetchControllers:J,_internalActiveDeferreds:me,_internalSetRoutes:Lr},Y}function cn(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function yt(e,t,r,n,a,d,l,c){let s,h;if(l){s=[];for(let y of t)if(s.push(y),y.route.id===l){h=y;break}}else s=t,h=t[t.length-1];let m=Zr(a||".",Xr(s,d),lt(e.pathname,r)||e.pathname,c==="path");if(a==null&&(m.search=e.search,m.hash=e.hash),(a==null||a===""||a===".")&&h){let y=St(m.search);if(h.route.index&&!y)m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index";else if(!h.route.index&&y){let g=new URLSearchParams(m.search),w=g.getAll("index");g.delete("index"),w.filter(L=>L).forEach(L=>g.append("index",L));let x=g.toString();m.search=x?"?"+x:""}}return n&&r!=="/"&&(m.pathname=m.pathname==="/"?r:ke([r,m.pathname])),Ye(m)}function zt(e,t,r,n){if(!n||!cn(n))return{path:r};if(n.formMethod&&!Rn(n.formMethod))return{path:r,error:Q(405,{method:n.formMethod})};let a=()=>({path:r,error:Q(400,{type:"invalid-body"})}),d=n.formMethod||"get",l=e?d.toUpperCase():d.toLowerCase(),c=lr(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!ie(l))return a();let g=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((w,x)=>{let[L,M]=x;return""+w+L+"="+M+` 2`},""):String(n.body);return{path:r,submission:{formMethod:l,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:g}}}else if(n.formEncType==="application/json"){if(!ie(l))return a();try{let g=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:l,formAction:c,formEncType:n.formEncType,formData:void 0,json:g,text:void 0}}}catch{return a()}}}_(typeof FormData=="function","FormData is not available in this environment");let s,h;if(n.formData)s=vt(n.formData),h=n.formData;else if(n.body instanceof FormData)s=vt(n.body),h=n.body;else if(n.body instanceof URLSearchParams)s=n.body,h=Kt(s);else if(n.body==null)s=new URLSearchParams,h=new FormData;else try{s=new URLSearchParams(n.body),h=Kt(s)}catch{return a()}let m={formMethod:l,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:h,json:void 0,text:void 0};if(ie(m.formMethod))return{path:r,submission:m};let y=Re(r);return t&&y.search&&St(y.search)&&s.append("index",""),y.search="?"+s,{path:Ye(y),submission:m}}function kt(e,t,r){r===void 0&&(r=!1);let n=e.findIndex(a=>a.route.id===t);return n>=0?e.slice(0,r?n+1:n):e}function Bt(e,t,r,n,a,d,l,c,s,h,m,y,g,w,x,L){let M=L?te(L[1])?L[1].error:L[1].data:void 0,H=e.createURL(t.location),j=e.createURL(a),q=r;d&&t.errors?q=kt(r,Object.keys(t.errors)[0],!0):L&&te(L[1])&&(q=kt(r,L[0]));let C=L?L[1].statusCode:void 0,I=l&&C&&C>=400,Y=q.filter((U,X)=>{let{route:k}=U;if(k.lazy)return!0;if(k.loader==null)return!1;if(d)return gt(k,t.loaderData,t.errors);if(fn(t.loaderData,t.matches[X],U)||s.some(ne=>ne===U.route.id))return!0;let ee=t.matches[X],re=U;return Wt(U,z({currentUrl:H,currentParams:ee.params,nextUrl:j,nextParams:re.params},n,{actionResult:M,actionStatus:C,defaultShouldRevalidate:I?!1:c||H.pathname+H.search===j.pathname+j.search||H.search!==j.search||ir(ee,re)}))}),f=[];return y.forEach((U,X)=>{if(d||!r.some(De=>De.route.id===U.routeId)||m.has(X))return;let k=Fe(w,U.path,x);if(!k){f.push({key:X,routeId:U.routeId,path:U.path,matches:null,match:null,controller:null});return}let ee=t.fetchers.get(X),re=ze(k,U.path),ne=!1;g.has(X)?ne=!1:h.has(X)?(h.delete(X),ne=!0):ee&&ee.state!=="idle"&&ee.data===void 0?ne=c:ne=Wt(re,z({currentUrl:H,currentParams:t.matches[t.matches.length-1].params,nextUrl:j,nextParams:r[r.length-1].params},n,{actionResult:M,actionStatus:C,defaultShouldRevalidate:I?!1:c})),ne&&f.push({key:X,routeId:U.routeId,path:U.path,matches:k,match:re,controller:new AbortController})}),[Y,f]}function gt(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=t!=null&&t[e.id]!==void 0,a=r!=null&&r[e.id]!==void 0;return!n&&a?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!n&&!a}function fn(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function ir(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Wt(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function Yt(e,t,r,n,a){var d;let l;if(e){let h=n[e];_(h,"No route found to patch children into: routeId = "+e),h.children||(h.children=[]),l=h.children}else l=r;let c=t.filter(h=>!l.some(m=>or(h,m))),s=at(c,a,[e||"_","patch",String(((d=l)==null?void 0:d.length)||"0")],n);l.push(...s)}function or(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((r,n)=>{var a;return(a=t.children)==null?void 0:a.some(d=>or(r,d))}):!1}async function hn(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];_(a,"No route found in manifest");let d={};for(let l in n){let s=a[l]!==void 0&&l!=="hasErrorBoundary";Ee(!s,'Route "'+a.id+'" has a static property "'+l+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+l+'" will be ignored.')),!s&&!Ar.has(l)&&(d[l]=n[l])}Object.assign(a,d),Object.assign(a,z({},t(a),{lazy:void 0}))}async function pn(e){let{matches:t}=e,r=t.filter(a=>a.shouldLoad);return(await Promise.all(r.map(a=>a.resolve()))).reduce((a,d,l)=>Object.assign(a,{[r[l].route.id]:d}),{})}async function mn(e,t,r,n,a,d,l,c,s,h){let m=d.map(w=>w.route.lazy?hn(w.route,s,c):void 0),y=d.map((w,x)=>{let L=m[x],M=a.some(j=>j.route.id===w.route.id);return z({},w,{shouldLoad:M,resolve:async j=>(j&&n.method==="GET"&&(w.route.lazy||w.route.loader)&&(M=!0),M?yn(t,n,w,L,j,h):Promise.resolve({type:N.data,result:void 0}))})}),g=await e({matches:y,request:n,params:d[0].params,fetcherKey:l,context:h});try{await Promise.all(m)}catch{}return g}async function yn(e,t,r,n,a,d){let l,c,s=h=>{let m,y=new Promise((x,L)=>m=L);c=()=>m(),t.signal.addEventListener("abort",c);let g=x=>typeof h!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):h({request:t,params:r.params,context:d},...x!==void 0?[x]:[]),w=(async()=>{try{return{type:"data",result:await(a?a(L=>g(L)):g())}}catch(x){return{type:"error",result:x}}})();return Promise.race([w,y])};try{let h=r.route[e];if(n)if(h){let m,[y]=await Promise.all([s(h).catch(g=>{m=g}),n]);if(m!==void 0)throw m;l=y}else if(await n,h=r.route[e],h)l=await s(h);else if(e==="action"){let m=new URL(t.url),y=m.pathname+m.search;throw Q(405,{method:t.method,pathname:y,routeId:r.route.id})}else return{type:N.data,result:void 0};else if(h)l=await s(h);else{let m=new URL(t.url),y=m.pathname+m.search;throw Q(404,{pathname:y})}_(l.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(h){return{type:N.error,result:h}}finally{c&&t.signal.removeEventListener("abort",c)}return l}async function gn(e){let{result:t,type:r}=e;if(sr(t)){let y;try{let g=t.headers.get("Content-Type");g&&/\bapplication\/json\b/.test(g)?t.body==null?y=null:y=await t.json():y=await t.text()}catch(g){return{type:N.error,error:g}}return r===N.error?{type:N.error,error:new We(t.status,t.statusText,y),statusCode:t.status,headers:t.headers}:{type:N.data,data:y,statusCode:t.status,headers:t.headers}}if(r===N.error){if(Qt(t)){var n,a;if(t.data instanceof Error){var d,l;return{type:N.error,error:t.data,statusCode:(d=t.init)==null?void 0:d.status,headers:(l=t.init)!=null&&l.headers?new Headers(t.init.headers):void 0}}return{type:N.error,error:new We(((n=t.init)==null?void 0:n.status)||500,void 0,t.data),statusCode:ot(t)?t.status:void 0,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}}return{type:N.error,error:t,statusCode:ot(t)?t.status:void 0}}if(En(t)){var c,s;return{type:N.deferred,deferredData:t,statusCode:(c=t.init)==null?void 0:c.status,headers:((s=t.init)==null?void 0:s.headers)&&new Headers(t.init.headers)}}if(Qt(t)){var h,m;return{type:N.data,data:t.data,statusCode:(h=t.init)==null?void 0:h.status,headers:(m=t.init)!=null&&m.headers?new Headers(t.init.headers):void 0}}return{type:N.data,data:t}}function vn(e,t,r,n,a,d){let l=e.headers.get("Location");if(_(l,"Redirects returned/thrown from loaders/actions must have a Location header"),!wt.test(l)){let c=n.slice(0,n.findIndex(s=>s.route.id===r)+1);l=yt(new URL(t.url),c,a,!0,l,d),e.headers.set("Location",l)}return e}function Vt(e,t,r){if(wt.test(e)){let n=e,a=n.startsWith("//")?new URL(t.protocol+n):new URL(n),d=lt(a.pathname,r)!=null;if(a.origin===t.origin&&d)return a.pathname+a.search+a.hash}return e}function Oe(e,t,r,n){let a=e.createURL(lr(t)).toString(),d={signal:r};if(n&&ie(n.formMethod)){let{formMethod:l,formEncType:c}=n;d.method=l.toUpperCase(),c==="application/json"?(d.headers=new Headers({"Content-Type":c}),d.body=JSON.stringify(n.json)):c==="text/plain"?d.body=n.text:c==="application/x-www-form-urlencoded"&&n.formData?d.body=vt(n.formData):d.body=n.formData}return new Request(a,d)}function vt(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function Kt(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function wn(e,t,r,n,a){let d={},l=null,c,s=!1,h={},m=r&&te(r[1])?r[1].error:void 0;return e.forEach(y=>{if(!(y.route.id in t))return;let g=y.route.id,w=t[g];if(_(!Se(w),"Cannot handle redirect results in processLoaderData"),te(w)){let x=w.error;if(m!==void 0&&(x=m,m=void 0),l=l||{},a)l[g]=x;else{let L=be(e,g);l[L.route.id]==null&&(l[L.route.id]=x)}d[g]=void 0,s||(s=!0,c=ot(w.error)?w.error.status:500),w.headers&&(h[g]=w.headers)}else he(w)?(n.set(g,w.deferredData),d[g]=w.deferredData.data,w.statusCode!=null&&w.statusCode!==200&&!s&&(c=w.statusCode),w.headers&&(h[g]=w.headers)):(d[g]=w.data,w.statusCode&&w.statusCode!==200&&!s&&(c=w.statusCode),w.headers&&(h[g]=w.headers))}),m!==void 0&&r&&(l={[r[0]]:m},d[r[0]]=void 0),{loaderData:d,errors:l,statusCode:c||200,loaderHeaders:h}}function Jt(e,t,r,n,a,d,l){let{loaderData:c,errors:s}=wn(t,r,n,l,!1);return a.forEach(h=>{let{key:m,match:y,controller:g}=h,w=d[m];if(_(w,"Did not find corresponding fetcher result"),!(g&&g.signal.aborted))if(te(w)){let x=be(e.matches,y?.route.id);s&&s[x.route.id]||(s=z({},s,{[x.route.id]:w.error})),e.fetchers.delete(m)}else if(Se(w))_(!1,"Unhandled fetcher revalidation redirect");else if(he(w))_(!1,"Unhandled fetcher deferred data");else{let x=fe(w.data);e.fetchers.set(m,x)}}),{loaderData:c,errors:s}}function Gt(e,t,r,n){let a=z({},t);for(let d of r){let l=d.route.id;if(t.hasOwnProperty(l)?t[l]!==void 0&&(a[l]=t[l]):e[l]!==void 0&&d.route.loader&&(a[l]=e[l]),n&&n.hasOwnProperty(l))break}return a}function Xt(e){return e?te(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function be(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function Zt(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Q(e,t){let{pathname:r,routeId:n,method:a,type:d,message:l}=t===void 0?{}:t,c="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(c="Bad Request",a&&r&&n?s="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.":d==="defer-action"?s="defer() is not supported in actions":d==="invalid-body"&&(s="Unable to encode submission body")):e===403?(c="Forbidden",s='Route "'+n+'" does not match URL "'+r+'"'):e===404?(c="Not Found",s='No route matches URL "'+r+'"'):e===405&&(c="Method Not Allowed",a&&r&&n?s="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&&(s='Invalid request method "'+a.toUpperCase()+'"')),new We(e||500,c,new Error(s),!0)}function rt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(Se(a))return{key:n,result:a}}}function lr(e){let t=typeof e=="string"?Re(e):e;return Ye(z({},t,{hash:""}))}function bn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Sn(e){return sr(e.result)&&ln.has(e.result.status)}function he(e){return e.type===N.deferred}function te(e){return e.type===N.error}function Se(e){return(e&&e.type)===N.redirect}function Qt(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function En(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function sr(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Rn(e){return on.has(e.toLowerCase())}function ie(e){return nn.has(e.toLowerCase())}async function Dn(e,t,r,n,a){let d=Object.entries(t);for(let l=0;l<d.length;l++){let[c,s]=d[l],h=e.find(g=>g?.route.id===c);if(!h)continue;let m=n.find(g=>g.route.id===h.route.id),y=m!=null&&!ir(m,h)&&(a&&a[h.route.id])!==void 0;he(s)&&y&&await bt(s,r,!1).then(g=>{g&&(t[c]=g)})}}async function xn(e,t,r){for(let n=0;n<r.length;n++){let{key:a,routeId:d,controller:l}=r[n],c=t[a];e.find(h=>h?.route.id===d)&&he(c)&&(_(l,"Expected an AbortController for revalidating fetcher deferred result"),await bt(c,l.signal,!0).then(h=>{h&&(t[a]=h)}))}}async function bt(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:N.data,data:e.deferredData.unwrappedData}}catch(a){return{type:N.error,error:a}}return{type:N.data,data:e.deferredData.data}}}function St(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function ze(e,t){let r=typeof t=="string"?Re(t).search:t.search;if(e[e.length-1].route.index&&St(r||""))return e[e.length-1];let n=rr(e);return n[n.length-1]}function qt(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:d,json:l}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(d!=null)return{formMethod:t,formAction:r,formEncType:n,formData:d,json:void 0,text:void 0};if(l!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:l,text:void 0}}}function pt(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 Pn(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function He(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 Ln(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function fe(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function jn(e,t){try{let r=e.sessionStorage.getItem(ar);if(r){let n=JSON.parse(r);for(let[a,d]of Object.entries(n||{}))d&&Array.isArray(d)&&t.set(a,new Set(d||[]))}}catch{}}function Tn(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(ar,JSON.stringify(r))}catch(n){Ee(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}var K,Nt,N,Ar,_r,Ur,$r,Hr,zr,kr,Ut,ke,Qr,qr,en,mt,it,Ht,ea,We,nr,nn,an,on,ln,sn,ht,dn,$e,wt,un,ar,ra,Mn=Mr(()=>{(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(K||(K={}));Nt="popstate";(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(N||(N={}));
2Ar=new Set(["lazy","caseSensitive","path","id","index","children"]);_r=/^:[\w-]+$/,Ur=3,$r=2,Hr=1,zr=10,kr=-2,Ut=e=>e==="*";ke=e=>e.join("/").replace(/\/\/+/g,"/"),Qr=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),qr=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,en=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,mt=class{constructor(t,r){this.type="DataWithResponseInit",this.data=t,this.init=r||null}};it=class extends Error{},Ht=class{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],_(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((d,l)=>n=l),this.controller=new AbortController;let a=()=>n(new it("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((d,l)=>{let[c,s]=l;return Object.assign(d,{[c]:this.trackPromise(c,s)})},{}),this.done&&this.unlistenAbortSignal(),this.init=r}trackPromise(t,r){if(!(r instanceof Promise))return r;this.deferredKeys.push(t),this.pendingKeysSet.add(t);let n=Promise.race([r,this.abortPromise]).then(a=>this.onSettle(n,t,void 0,a),a=>this.onSettle(n,t,a));return n.catch(()=>{}),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(t,r,n,a){if(this.controller.signal.aborted&&n instanceof it)return this.unlistenAbortSignal(),Object.defineProperty(t,"_error",{get:()=>n}),Promise.reject(n);if(this.pendingKeysSet.delete(r),this.done&&this.unlistenAbortSignal(),n===void 0&&a===void 0){let d=new Error('Deferred data for key "'+r+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(t,"_error",{get:()=>d}),this.emit(!1,r),Promise.reject(d)}return a===void 0?(Object.defineProperty(t,"_error",{get:()=>n}),this.emit(!1,r),Promise.reject(n)):(Object.defineProperty(t,"_data",{get:()=>a}),this.emit(!1,r),a)}emit(t,r){this.subscribers.forEach(n=>n(t,r))}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((t,r)=>this.pendingKeysSet.delete(r)),this.emit(!0)}async resolveData(t){let r=!1;if(!this.done){let n=()=>this.cancel();t.addEventListener("abort",n),r=await new Promise(a=>{this.subscribe(d=>{t.removeEventListener("abort",n),(d||this.done)&&a(d)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return _(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((t,r)=>{let[n,a]=r;return Object.assign(t,{[n]:rn(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}};ea=function(t,r){r===void 0&&(r=302);let n=r;typeof n=="number"?n={status:n}:typeof n.status>"u"&&(n.status=302);let a=new Headers(n.headers);return a.set("Location",t),new Response(null,z({},n,{headers:a}))},We=class{constructor(t,r,n,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};nr=["post","put","patch","delete"],nn=new Set(nr),an=["get",...nr],on=new Set(an),ln=new Set([301,302,303,307,308]),sn=new Set([307,308]),ht={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},dn={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},$e={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},wt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,un=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),ar="remix-router-transitions";ra=Symbol("deferred")});var On=-1,Fn=-2,An=-3,Cn=-4,In=-5,Nn=-6,_n=-7,Un="B",$n="D",ur="E",Hn="M",zn="N",cr="P",kn="R",Bn="S",Wn="Y",Yn="U",Vn="Z",fr=class{promise;resolve;reject;
2constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};function Kn(){let e=new TextDecoder,t="";return new TransformStream({transform(r,n){let a=e.decode(r,{stream:!0}),d=(t+a).split(` 3`);t=d.pop()||"";for(let l of d)n.enqueue(l)},flush(r){t&&r.enqueue(t)}})}var aa=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Et=typeof window<"u"?window:typeof globalThis<"u"?globalThis:void 0;function Rt(e){let{hydrated:t,values:r}=this;if(typeof e=="number")return dr.call(this,e);if(!Array.isArray(e)||!e.length)throw new SyntaxError;let n=r.length;for(let a of e)r.push(a);return t.length=r.length,dr.call(this,n)}function dr(e){let{hydrated:t,values:r,deferred:n,plugins:a}=this,d,l=[[e,s=>{d=s}]],c=[];for(;l.length>0;){let[s,h]=l.pop();switch(s){case _n:h(void 0);continue;case In:h(null);continue;case Fn:h(NaN);continue;case Nn:h(1/0);continue;case An:h(-1/0);continue;case Cn:h(-0);continue}if(t[s]){h(t[s]);continue}let m=r[s];if(!m||typeof m!="object"){t[s]=m,h(m);continue}if(Array.isArray(m))if(typeof m[0]=="string"){let[y,g,w]=m;switch(y){case $n:h(t[s]=new Date(g));continue;case Yn:h(t[s]=new URL(g));continue;case Un:h(t[s]=BigInt(g));continue;case kn:h(t[s]=new RegExp(g,w));continue;case Wn:h(t[s]=Symbol.for(g));continue;case Bn:let x=new Set;t[s]=x;for(let C=1;C<m.length;C++)l.push([m[C],I=>{x.add(I)}]);h(x);continue;case Hn:let L=new Map;t[s]=L;for(let C=1;C<m.length;C+=2){let I=[];l.push([m[C+1],Y=>{I[1]=Y}]),l.push([m[C],Y=>{I[0]=Y}]),c.push(()=>{L.set(I[0],I[1])})}h(L);continue;case zn:let M=Object.create(null);t[s]=M;for(let C of Object.keys(g).reverse()){let I=[];l.push([g[C],Y=>{I[1]=Y}]),l.push([Number(C.slice(1)),Y=>{I[0]=Y}]),c.push(()=>{M[I[0]]=I[1]})}h(M);continue;case cr:if(t[g])h(t[s]=t[g]);else{let C=new fr;n[g]=C,h(t[s]=C.promise)}continue;case ur:let[,H,j]=m,q=j&&Et&&Et[j]?new Et[j](H):new Error(H);t[s]=q,h(q);continue;case Vn:h(t[s]=t[g]);continue;default:if(Array.isArray(a)){let C=[],I=m.slice(1);for(let Y=0;Y<I.length;Y++){let f=I[Y];l.push([f,U=>{C[Y]=U}])}c.push(()=>{for(let Y of a){let f=Y(m[0],...C);if(f){h(t[s]=f.value);return}}throw new SyntaxError});continue}throw new SyntaxError}}else{let y=[];t[s]=y;for(let g=0;g<m.length;g++){let w=m[g];w!==On&&l.push([w,x=>{y[g]=x}])}h(y);continue}else{let y={};t[s]=y;for(let g of Object.keys(m).reverse()){let w=[];l.push([m[g],x=>{w[1]=x}]),l.push([Number(g.slice(1)),x=>{w[0]=x}]),c.push(()=>{y[w[0]]=w[1]})}h(y);continue}}for(;c.length>0;)c.pop()();return d}async function ia(e,t){let{plugins:r}=t??{},n=new fr,a=e.pipeThrough(Kn()).getReader(),d={values:[],hydrated:[],deferred:{},plugins:r},l=await Jn.call(d,a),c=n.promise;return l.done?n.resolve():c=Gn.call(d,a).then(n.resolve).catch(s=>{for(let h of Object.values(d.deferred))h.reject(s);n.reject(s)}),{done:c.then(()=>a.closed),value:l.value}}async function Jn(e){let t=await e.read();if(!t.value)throw new SyntaxError;let r;try{r=JSON.parse(t.value)}catch{throw new SyntaxError}return{done:t.done,value:Rt.call(this,r)}}async function Gn(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;let r=t.value;switch(r[0]){case cr:{let n=r.indexOf(":"),a=Number(r.slice(1,n)),d=this.deferred[a];if(!d)throw new Error(`Deferred ID ${a} not found in stream`);let l=r.slice(n+1),c;try{c=JSON.parse(l)}catch{throw new SyntaxError}let s=Rt.call(this,c);d.resolve(s);break}case ur:{let n=r.indexOf(":"),a=Number(r.slice(1,n)),d=this.deferred[a];if(!d)throw new Error(`Deferred ID ${a} not found in stream`);let l=r.slice(n+1),c;try{c=JSON.parse(l)}catch{throw new SyntaxError}let s=Rt.call(this,c);d.reject(s);break}default:throw new SyntaxError}t=await e.read()}}var Xn=Symbol("SingleFetchRedirect");export{K as a,Zn as b,_ as c,Ye as d,Re as e,Fe as f,Ir as g,Qn as h,$t as i,lt as j,Xr as k,Zr as l,ke as m,qn as n,it as o,Ht as p,ea as q,We as r,ot as s,ta as t,Mn as u,ia as v,Xn as w}; 4/*! Bundled license information: 5 6@remix-run/router/dist/router.js: 7 (** 8 * @remix-run/router v1.23.0 9 * 10 * Copyright (c) Remix Software Inc. 11 * 12 * This source code is licensed under the MIT license found in the 13 * LICENSE.md file in the root directory of this source tree. 14 * 15 * @license MIT 16 *) 17 18@remix-run/server-runtime/dist/esm/single-fetch.js: 19 (** 20 * @remix-run/server-runtime v2.17.3 21 * 22 * Copyright (c) Remix Software Inc. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE.md file in the root directory of this source tree. 26 * 27 * @license MIT 28 *) 29 30@remix-run/server-runtime/dist/esm/index.js: 31 (** 32 * @remix-run/server-runtime v2.17.3 33 * 34 * Copyright (c) Remix Software Inc. 35 * 36 * This source code is licensed under the MIT license found in the 37 * LICENSE.md file in the root directory of this source tree. 38 * 39 * @license MIT 40 *) 41*/ 42//# sourceMappingURL=/build/_shared/chunk-VYKUOKWG.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.