diff --git a/404.html b/404.html new file mode 100644 index 0000000..ca86851 --- /dev/null +++ b/404.html @@ -0,0 +1,14 @@ + + +
+ + + +0}function Ep(p,y){let S=g.blockers.get(p)||zr;return mn.get(p)!==y&&mn.set(p,y),S}function Bu(p){g.blockers.delete(p),mn.delete(p)}function Cl(p,y){let S=g.blockers.get(p)||zr;Y(S.state==="unblocked"&&y.state==="blocked"||S.state==="blocked"&&y.state==="blocked"||S.state==="blocked"&&y.state==="proceeding"||S.state==="blocked"&&y.state==="unblocked"||S.state==="proceeding"&&y.state==="unblocked","Invalid blocker state transition: "+S.state+" -> "+y.state);let C=new Map(g.blockers);C.set(p,y),Oe({blockers:C})}function Vu(p){let{currentLocation:y,nextLocation:S,historyAction:C}=p;if(mn.size===0)return;mn.size>1&&hr(!1,"A router only supports one blocker at a time");let M=Array.from(mn.entries()),[A,H]=M[M.length-1],N=g.blockers.get(A);if(!(N&&N.state==="proceeding")&&H({currentLocation:y,nextLocation:S,historyAction:C}))return A}function ti(p){let y=Ie(404,{pathname:p}),S=a||i,{matches:C,route:M}=hc(S);return ni(),{notFoundMatches:C,route:M,error:y}}function Pl(p,y){return{boundaryId:er(y.partialMatches).route.id,error:Ie(400,{type:"route-discovery",pathname:p,message:y.error!=null&&"message"in y.error?y.error:String(y.error)})}}function ni(p){let y=[];return nt.forEach((S,C)=>{(!p||p(C))&&(S.cancel(),y.push(C),nt.delete(C))}),y}function xp(p,y,S){if(L=p,c=y,h=S||null,!v&&g.navigation===Ti){v=!0;let C=Wu(g.location,g.matches);C!=null&&Oe({restoreScrollPosition:C})}return()=>{L=null,c=null,h=null}}function Hu(p,y){return h&&h(p,y.map(C=>av(C,g.loaderData)))||p.key}function kp(p,y){if(L&&c){let S=Hu(p,y);L[S]=c()}}function Wu(p,y){if(L){let S=Hu(p,y),C=L[S];if(typeof C=="number")return C}return null}function _l(p,y,S){if(d){if(E.has(S))return{active:!1,matches:p};if(p){if(Object.keys(p[0].params).length>0)return{active:!0,matches:uo(y,S,u,!0)}}else return{active:!0,matches:uo(y,S,u,!0)||[]}}return{active:!1,matches:null}}async function Rl(p,y,S){let C=p;for(;;){let M=a==null,A=a||i;try{await Iv(d,y,C,A,o,l,sp,S)}catch(V){return{type:"error",error:V,partialMatches:C}}finally{M&&(i=[...i])}if(S.aborted)return{type:"aborted"};let H=Sn(A,y,u);if(H)return Qu(y,E),{type:"success",matches:H};let N=uo(A,y,u,!0);if(!N||C.length===N.length&&C.every((V,F)=>V.route.id===N[F].route.id))return Qu(y,E),{type:"success",matches:null};C=N}}function Qu(p,y){if(y.size>=k){let S=y.values().next().value;y.delete(S)}y.add(p)}function Cp(p){o={},a=hl(p,l,void 0,o)}function Pp(p,y){let S=a==null;Kd(p,y,a||i,o,l),S&&(i=[...i],Oe({}))}return j={get basename(){return u},get future(){return f},get state(){return g},get routes(){return i},get window(){return t},initialize:cp,subscribe:dp,enableScrollRestoration:xp,navigate:ju,fetch:gp,revalidate:pp,createHref:p=>e.history.createHref(p),encodeLocation:p=>e.history.encodeLocation(p),getFetcher:Fu,deleteFetcher:Sp,dispose:fp,getBlocker:Ep,deleteBlocker:Bu,patchRoutes:Pp,_internalFetchControllers:I,_internalActiveDeferreds:nt,_internalSetRoutes:Cp},j}function zv(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Ca(e,t,n,r,l,o,i,a){let u,s;if(i){u=[];for(let f of t)if(u.push(f),f.route.id===i){s=f;break}}else u=t,s=t[t.length-1];let d=ku(l||".",xu(u,o),Sr(e.pathname,n)||e.pathname,a==="path");return l==null&&(d.search=e.search,d.hash=e.hash),(l==null||l===""||l===".")&&s&&s.route.index&&!_u(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:jt([n,d.pathname])),Mn(d)}function ic(e,t,n,r){if(!r||!zv(r))return{path:n};if(r.formMethod&&!Xv(r.formMethod))return{path:n,error:Ie(405,{method:r.formMethod})};let l=()=>({path:n,error:Ie(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=Yd(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!pt(i))return l();let m=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((w,k)=>{let[E,L]=k;return""+w+E+"="+L+`
+`},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:m}}}else if(r.formEncType==="application/json"){if(!pt(i))return l();try{let m=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:m,text:void 0}}}catch{return l()}}}Y(typeof FormData=="function","FormData is not available in this environment");let u,s;if(r.formData)u=Pa(r.formData),s=r.formData;else if(r.body instanceof FormData)u=Pa(r.body),s=r.body;else if(r.body instanceof URLSearchParams)u=r.body,s=cc(u);else if(r.body==null)u=new URLSearchParams,s=new FormData;else try{u=new URLSearchParams(r.body),s=cc(u)}catch{return l()}let d={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(pt(d.formMethod))return{path:n,submission:d};let f=pn(n);return t&&f.search&&_u(f.search)&&u.append("index",""),f.search="?"+u,{path:Mn(f),submission:d}}function jv(e,t){let n=e;if(t){let r=e.findIndex(l=>l.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function ac(e,t,n,r,l,o,i,a,u,s,d,f,m,w,k,E){let L=E?Je(E[1])?E[1].error:E[1].data:void 0,h=e.createURL(t.location),c=e.createURL(l),v=E&&Je(E[1])?E[0]:void 0,x=v?jv(n,v):n,R=E?E[1].statusCode:void 0,T=i&&R&&R>=400,j=x.filter((B,O)=>{let{route:Q}=B;if(Q.lazy)return!0;if(Q.loader==null)return!1;if(o)return typeof Q.loader!="function"||Q.loader.hydrate?!0:t.loaderData[Q.id]===void 0&&(!t.errors||t.errors[Q.id]===void 0);if(Ov(t.loaderData,t.matches[O],B)||u.some(pe=>pe===B.route.id))return!0;let te=t.matches[O],ye=B;return uc(B,se({currentUrl:h,currentParams:te.params,nextUrl:c,nextParams:ye.params},r,{actionResult:L,actionStatus:R,defaultShouldRevalidate:T?!1:a||h.pathname+h.search===c.pathname+c.search||h.search!==c.search||Qd(te,ye)}))}),g=[];return f.forEach((B,O)=>{if(o||!n.some(yt=>yt.route.id===B.routeId)||d.has(O))return;let Q=Sn(w,B.path,k);if(!Q){g.push({key:O,routeId:B.routeId,path:B.path,matches:null,match:null,controller:null});return}let te=t.fetchers.get(O),ye=Ar(Q,B.path),pe=!1;m.has(O)?pe=!1:s.has(O)?(s.delete(O),pe=!0):te&&te.state!=="idle"&&te.data===void 0?pe=a:pe=uc(ye,se({currentUrl:h,currentParams:t.matches[t.matches.length-1].params,nextUrl:c,nextParams:n[n.length-1].params},r,{actionResult:L,actionStatus:R,defaultShouldRevalidate:T?!1:a})),pe&&g.push({key:O,routeId:B.routeId,path:B.path,matches:Q,match:ye,controller:new AbortController})}),[j,g]}function Ov(e,t,n){let r=!t||n.route.id!==t.route.id,l=e[n.route.id]===void 0;return r||l}function Qd(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function uc(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function Iv(e,t,n,r,l,o,i,a){let u=[t,...n.map(s=>s.route.id)].join("-");try{let s=i.get(u);s||(s=e({path:t,matches:n,patch:(d,f)=>{a.aborted||Kd(d,f,r,l,o)}}),i.set(u,s)),s&&Qv(s)&&await s}finally{i.delete(u)}}function Kd(e,t,n,r,l){if(e){var o;let i=r[e];Y(i,"No route found to patch children into: routeId = "+e);let a=hl(t,l,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],r);i.children?i.children.push(...a):i.children=a}else{let i=hl(t,l,["patch",String(n.length||"0")],r);n.push(...i)}}async function Fv(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let l=n[e.id];Y(l,"No route found in manifest");let o={};for(let i in r){let u=l[i]!==void 0&&i!=="hasErrorBoundary";hr(!u,'Route "'+l.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!u&&!ov.has(i)&&(o[i]=r[i])}Object.assign(l,o),Object.assign(l,se({},t(l),{lazy:void 0}))}async function Uv(e){let{matches:t}=e,n=t.filter(l=>l.shouldLoad);return(await Promise.all(n.map(l=>l.resolve()))).reduce((l,o,i)=>Object.assign(l,{[n[i].route.id]:o}),{})}async function $v(e,t,n,r,l,o,i,a,u,s){let d=o.map(w=>w.route.lazy?Fv(w.route,u,a):void 0),f=o.map((w,k)=>{let E=d[k],L=l.some(c=>c.route.id===w.route.id);return se({},w,{shouldLoad:L,resolve:async c=>(c&&r.method==="GET"&&(w.route.lazy||w.route.loader)&&(L=!0),L?Av(t,r,w,E,c,s):Promise.resolve({type:ee.data,result:void 0}))})}),m=await e({matches:f,request:r,params:o[0].params,fetcherKey:i,context:s});try{await Promise.all(d)}catch{}return m}async function Av(e,t,n,r,l,o){let i,a,u=s=>{let d,f=new Promise((k,E)=>d=E);a=()=>d(),t.signal.addEventListener("abort",a);let m=k=>typeof s!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):s({request:t,params:n.params,context:o},...k!==void 0?[k]:[]),w=(async()=>{try{return{type:"data",result:await(l?l(E=>m(E)):m())}}catch(k){return{type:"error",result:k}}})();return Promise.race([w,f])};try{let s=n.route[e];if(r)if(s){let d,[f]=await Promise.all([u(s).catch(m=>{d=m}),r]);if(d!==void 0)throw d;i=f}else if(await r,s=n.route[e],s)i=await u(s);else if(e==="action"){let d=new URL(t.url),f=d.pathname+d.search;throw Ie(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:ee.data,result:void 0};else if(s)i=await u(s);else{let d=new URL(t.url),f=d.pathname+d.search;throw Ie(404,{pathname:f})}Y(i.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(s){return{type:ee.error,result:s}}finally{a&&t.signal.removeEventListener("abort",a)}return i}async function Bv(e){let{result:t,type:n}=e;if(Xd(t)){let s;try{let d=t.headers.get("Content-Type");d&&/\bapplication\/json\b/.test(d)?t.body==null?s=null:s=await t.json():s=await t.text()}catch(d){return{type:ee.error,error:d}}return n===ee.error?{type:ee.error,error:new jo(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:ee.data,data:s,statusCode:t.status,headers:t.headers}}if(n===ee.error){if(mc(t)){var r;if(t.data instanceof Error){var l;return{type:ee.error,error:t.data,statusCode:(l=t.init)==null?void 0:l.status}}t=new jo(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:ee.error,error:t,statusCode:qo(t)?t.status:void 0}}if(Yv(t)){var o,i;return{type:ee.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((i=t.init)==null?void 0:i.headers)&&new Headers(t.init.headers)}}if(mc(t)){var a,u;return{type:ee.data,data:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(u=t.init)!=null&&u.headers?new Headers(t.init.headers):void 0}}return{type:ee.data,data:t}}function Vv(e,t,n,r,l,o){let i=e.headers.get("Location");if(Y(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Cu.test(i)){let a=r.slice(0,r.findIndex(u=>u.route.id===n)+1);i=Ca(new URL(t.url),a,l,!0,i,o),e.headers.set("Location",i)}return e}function sc(e,t,n){if(Cu.test(e)){let r=e,l=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=Sr(l.pathname,n)!=null;if(l.origin===t.origin&&o)return l.pathname+l.search+l.hash}return e}function Bn(e,t,n,r){let l=e.createURL(Yd(t)).toString(),o={signal:n};if(r&&pt(r.formMethod)){let{formMethod:i,formEncType:a}=r;o.method=i.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=Pa(r.formData):o.body=r.formData}return new Request(l,o)}function Pa(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function cc(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Hv(e,t,n,r,l){let o={},i=null,a,u=!1,s={},d=n&&Je(n[1])?n[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let m=f.route.id,w=t[m];if(Y(!Cn(w),"Cannot handle redirect results in processLoaderData"),Je(w)){let k=w.error;d!==void 0&&(k=d,d=void 0),i=i||{};{let E=er(e,m);i[E.route.id]==null&&(i[E.route.id]=k)}o[m]=void 0,u||(u=!0,a=qo(w.error)?w.error.status:500),w.headers&&(s[m]=w.headers)}else qt(w)?(r.set(m,w.deferredData),o[m]=w.deferredData.data,w.statusCode!=null&&w.statusCode!==200&&!u&&(a=w.statusCode),w.headers&&(s[m]=w.headers)):(o[m]=w.data,w.statusCode&&w.statusCode!==200&&!u&&(a=w.statusCode),w.headers&&(s[m]=w.headers))}),d!==void 0&&n&&(i={[n[0]]:d},o[n[0]]=void 0),{loaderData:o,errors:i,statusCode:a||200,loaderHeaders:s}}function fc(e,t,n,r,l,o,i,a){let{loaderData:u,errors:s}=Hv(t,r,l,a);return o.forEach(d=>{let{key:f,match:m,controller:w}=d,k=i[f];if(Y(k,"Did not find corresponding fetcher result"),!(w&&w.signal.aborted))if(Je(k)){let E=er(e.matches,m==null?void 0:m.route.id);s&&s[E.route.id]||(s=se({},s,{[E.route.id]:k.error})),e.fetchers.delete(f)}else if(Cn(k))Y(!1,"Unhandled fetcher revalidation redirect");else if(qt(k))Y(!1,"Unhandled fetcher deferred data");else{let E=Qt(k.data);e.fetchers.set(f,E)}}),{loaderData:u,errors:s}}function dc(e,t,n,r){let l=se({},t);for(let o of n){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(l[i]=t[i]):e[i]!==void 0&&o.route.loader&&(l[i]=e[i]),r&&r.hasOwnProperty(i))break}return l}function pc(e){return e?Je(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function er(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function hc(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ie(e,t){let{pathname:n,routeId:r,method:l,type:o,message:i}=t===void 0?{}:t,a="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(a="Bad Request",o==="route-discovery"?u='Unable to match URL "'+n+'" - the `unstable_patchRoutesOnNavigation()` '+(`function threw the following error:
+`+i):l&&n&&r?u="You made a "+l+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?u="defer() is not supported in actions":o==="invalid-body"&&(u="Unable to encode submission body")):e===403?(a="Forbidden",u='Route "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",u='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",l&&n&&r?u="You made a "+l.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":l&&(u='Invalid request method "'+l.toUpperCase()+'"')),new jo(e||500,a,new Error(u),!0)}function Gl(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,l]=t[n];if(Cn(l))return{key:r,result:l}}}function Yd(e){let t=typeof e=="string"?pn(e):e;return Mn(se({},t,{hash:""}))}function Wv(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Qv(e){return typeof e=="object"&&e!=null&&"then"in e}function Kv(e){return Xd(e.result)&&Lv.has(e.result.status)}function qt(e){return e.type===ee.deferred}function Je(e){return e.type===ee.error}function Cn(e){return(e&&e.type)===ee.redirect}function mc(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Yv(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 Xd(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Xv(e){return Rv.has(e.toLowerCase())}function pt(e){return Pv.has(e.toLowerCase())}async function Gv(e,t,n,r,l){let o=Object.entries(t);for(let i=0;i 0}function Sp(p,g){let S=y.blockers.get(p)||Mr;return mn.get(p)!==g&&mn.set(p,g),S}function Au(p){y.blockers.delete(p),mn.delete(p)}function kl(p,g){let S=y.blockers.get(p)||Mr;Y(S.state==="unblocked"&&g.state==="blocked"||S.state==="blocked"&&g.state==="blocked"||S.state==="blocked"&&g.state==="proceeding"||S.state==="blocked"&&g.state==="unblocked"||S.state==="proceeding"&&g.state==="unblocked","Invalid blocker state transition: "+S.state+" -> "+g.state);let C=new Map(y.blockers);C.set(p,g),Oe({blockers:C})}function Bu(p){let{currentLocation:g,nextLocation:S,historyAction:C}=p;if(mn.size===0)return;mn.size>1&&hr(!1,"A router only supports one blocker at a time");let M=Array.from(mn.entries()),[A,H]=M[M.length-1],N=y.blockers.get(A);if(!(N&&N.state==="proceeding")&&H({currentLocation:g,nextLocation:S,historyAction:C}))return A}function ei(p){let g=Fe(404,{pathname:p}),S=a||i,{matches:C,route:M}=pc(S);return ti(),{notFoundMatches:C,route:M,error:g}}function Cl(p,g){return{boundaryId:er(g.partialMatches).route.id,error:Fe(400,{type:"route-discovery",pathname:p,message:g.error!=null&&"message"in g.error?g.error:String(g.error)})}}function ti(p){let g=[];return nt.forEach((S,C)=>{(!p||p(C))&&(S.cancel(),g.push(C),nt.delete(C))}),g}function xp(p,g,S){if(L=p,c=g,h=S||null,!v&&y.navigation===Ni){v=!0;let C=Hu(y.location,y.matches);C!=null&&Oe({restoreScrollPosition:C})}return()=>{L=null,c=null,h=null}}function Vu(p,g){return h&&h(p,g.map(C=>iv(C,y.loaderData)))||p.key}function Ep(p,g){if(L&&c){let S=Vu(p,g);L[S]=c()}}function Hu(p,g){if(L){let S=Vu(p,g),C=L[S];if(typeof C=="number")return C}return null}function Pl(p,g,S){if(d){if(x.has(S))return{active:!1,matches:p};if(p){if(Object.keys(p[0].params).length>0)return{active:!0,matches:ao(g,S,u,!0)}}else return{active:!0,matches:ao(g,S,u,!0)||[]}}return{active:!1,matches:null}}async function _l(p,g,S){let C=p;for(;;){let M=a==null,A=a||i;try{await Ov(d,g,C,A,o,l,up,S)}catch(V){return{type:"error",error:V,partialMatches:C}}finally{M&&(i=[...i])}if(S.aborted)return{type:"aborted"};let H=Sn(A,g,u);if(H)return Wu(g,x),{type:"success",matches:H};let N=ao(A,g,u,!0);if(!N||C.length===N.length&&C.every((V,U)=>V.route.id===N[U].route.id))return Wu(g,x),{type:"success",matches:null};C=N}}function Wu(p,g){if(g.size>=k){let S=g.values().next().value;g.delete(S)}g.add(p)}function kp(p){o={},a=pl(p,l,void 0,o)}function Cp(p,g){let S=a==null;Qd(p,g,a||i,o,l),S&&(i=[...i],Oe({}))}return j={get basename(){return u},get future(){return f},get state(){return y},get routes(){return i},get window(){return t},initialize:sp,subscribe:fp,enableScrollRestoration:xp,navigate:zu,fetch:vp,revalidate:dp,createHref:p=>e.history.createHref(p),encodeLocation:p=>e.history.encodeLocation(p),getFetcher:Fu,deleteFetcher:wp,dispose:cp,getBlocker:Sp,deleteBlocker:Au,patchRoutes:Cp,_internalFetchControllers:I,_internalActiveDeferreds:nt,_internalSetRoutes:kp},j}function Mv(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function ka(e,t,n,r,l,o,i,a){let u,s;if(i){u=[];for(let f of t)if(u.push(f),f.route.id===i){s=f;break}}else u=t,s=t[t.length-1];let d=ku(l||".",Eu(u,o),wr(e.pathname,n)||e.pathname,a==="path");return l==null&&(d.search=e.search,d.hash=e.hash),(l==null||l===""||l===".")&&s&&s.route.index&&!_u(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:jt([n,d.pathname])),Mn(d)}function oc(e,t,n,r){if(!r||!Mv(r))return{path:n};if(r.formMethod&&!Yv(r.formMethod))return{path:n,error:Fe(405,{method:r.formMethod})};let l=()=>({path:n,error:Fe(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=Kd(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!pt(i))return l();let m=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((w,k)=>{let[x,L]=k;return""+w+x+"="+L+`
-`},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:m}}}else if(r.formEncType==="application/json"){if(!pt(i))return l();try{let m=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:m,text:void 0}}}catch{return l()}}}Y(typeof FormData=="function","FormData is not available in this environment");let u,s;if(r.formData)u=Ca(r.formData),s=r.formData;else if(r.body instanceof FormData)u=Ca(r.body),s=r.body;else if(r.body instanceof URLSearchParams)u=r.body,s=sc(u);else if(r.body==null)u=new URLSearchParams,s=new FormData;else try{u=new URLSearchParams(r.body),s=sc(u)}catch{return l()}let d={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(pt(d.formMethod))return{path:n,submission:d};let f=pn(n);return t&&f.search&&_u(f.search)&&u.append("index",""),f.search="?"+u,{path:Mn(f),submission:d}}function zv(e,t){let n=e;if(t){let r=e.findIndex(l=>l.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function ic(e,t,n,r,l,o,i,a,u,s,d,f,m,w,k,x){let L=x?Je(x[1])?x[1].error:x[1].data:void 0,h=e.createURL(t.location),c=e.createURL(l),v=x&&Je(x[1])?x[0]:void 0,E=v?zv(n,v):n,R=x?x[1].statusCode:void 0,T=i&&R&&R>=400,j=E.filter((B,O)=>{let{route:Q}=B;if(Q.lazy)return!0;if(Q.loader==null)return!1;if(o)return typeof Q.loader!="function"||Q.loader.hydrate?!0:t.loaderData[Q.id]===void 0&&(!t.errors||t.errors[Q.id]===void 0);if(jv(t.loaderData,t.matches[O],B)||u.some(pe=>pe===B.route.id))return!0;let te=t.matches[O],ge=B;return ac(B,se({currentUrl:h,currentParams:te.params,nextUrl:c,nextParams:ge.params},r,{actionResult:L,actionStatus:R,defaultShouldRevalidate:T?!1:a||h.pathname+h.search===c.pathname+c.search||h.search!==c.search||Wd(te,ge)}))}),y=[];return f.forEach((B,O)=>{if(o||!n.some(gt=>gt.route.id===B.routeId)||d.has(O))return;let Q=Sn(w,B.path,k);if(!Q){y.push({key:O,routeId:B.routeId,path:B.path,matches:null,match:null,controller:null});return}let te=t.fetchers.get(O),ge=$r(Q,B.path),pe=!1;m.has(O)?pe=!1:s.has(O)?(s.delete(O),pe=!0):te&&te.state!=="idle"&&te.data===void 0?pe=a:pe=ac(ge,se({currentUrl:h,currentParams:t.matches[t.matches.length-1].params,nextUrl:c,nextParams:n[n.length-1].params},r,{actionResult:L,actionStatus:R,defaultShouldRevalidate:T?!1:a})),pe&&y.push({key:O,routeId:B.routeId,path:B.path,matches:Q,match:ge,controller:new AbortController})}),[j,y]}function jv(e,t,n){let r=!t||n.route.id!==t.route.id,l=e[n.route.id]===void 0;return r||l}function Wd(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function ac(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function Ov(e,t,n,r,l,o,i,a){let u=[t,...n.map(s=>s.route.id)].join("-");try{let s=i.get(u);s||(s=e({path:t,matches:n,patch:(d,f)=>{a.aborted||Qd(d,f,r,l,o)}}),i.set(u,s)),s&&Wv(s)&&await s}finally{i.delete(u)}}function Qd(e,t,n,r,l){if(e){var o;let i=r[e];Y(i,"No route found to patch children into: routeId = "+e);let a=pl(t,l,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],r);i.children?i.children.push(...a):i.children=a}else{let i=pl(t,l,["patch",String(n.length||"0")],r);n.push(...i)}}async function Fv(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let l=n[e.id];Y(l,"No route found in manifest");let o={};for(let i in r){let u=l[i]!==void 0&&i!=="hasErrorBoundary";hr(!u,'Route "'+l.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!u&&!lv.has(i)&&(o[i]=r[i])}Object.assign(l,o),Object.assign(l,se({},t(l),{lazy:void 0}))}async function Iv(e){let{matches:t}=e,n=t.filter(l=>l.shouldLoad);return(await Promise.all(n.map(l=>l.resolve()))).reduce((l,o,i)=>Object.assign(l,{[n[i].route.id]:o}),{})}async function Uv(e,t,n,r,l,o,i,a,u,s){let d=o.map(w=>w.route.lazy?Fv(w.route,u,a):void 0),f=o.map((w,k)=>{let x=d[k],L=l.some(c=>c.route.id===w.route.id);return se({},w,{shouldLoad:L,resolve:async c=>(c&&r.method==="GET"&&(w.route.lazy||w.route.loader)&&(L=!0),L?$v(t,r,w,x,c,s):Promise.resolve({type:ee.data,result:void 0}))})}),m=await e({matches:f,request:r,params:o[0].params,fetcherKey:i,context:s});try{await Promise.all(d)}catch{}return m}async function $v(e,t,n,r,l,o){let i,a,u=s=>{let d,f=new Promise((k,x)=>d=x);a=()=>d(),t.signal.addEventListener("abort",a);let m=k=>typeof s!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):s({request:t,params:n.params,context:o},...k!==void 0?[k]:[]),w=(async()=>{try{return{type:"data",result:await(l?l(x=>m(x)):m())}}catch(k){return{type:"error",result:k}}})();return Promise.race([w,f])};try{let s=n.route[e];if(r)if(s){let d,[f]=await Promise.all([u(s).catch(m=>{d=m}),r]);if(d!==void 0)throw d;i=f}else if(await r,s=n.route[e],s)i=await u(s);else if(e==="action"){let d=new URL(t.url),f=d.pathname+d.search;throw Fe(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:ee.data,result:void 0};else if(s)i=await u(s);else{let d=new URL(t.url),f=d.pathname+d.search;throw Fe(404,{pathname:f})}Y(i.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(s){return{type:ee.error,result:s}}finally{a&&t.signal.removeEventListener("abort",a)}return i}async function Av(e){let{result:t,type:n}=e;if(Yd(t)){let s;try{let d=t.headers.get("Content-Type");d&&/\bapplication\/json\b/.test(d)?t.body==null?s=null:s=await t.json():s=await t.text()}catch(d){return{type:ee.error,error:d}}return n===ee.error?{type:ee.error,error:new zo(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:ee.data,data:s,statusCode:t.status,headers:t.headers}}if(n===ee.error){if(hc(t)){var r;if(t.data instanceof Error){var l;return{type:ee.error,error:t.data,statusCode:(l=t.init)==null?void 0:l.status}}t=new zo(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:ee.error,error:t,statusCode:Zo(t)?t.status:void 0}}if(Kv(t)){var o,i;return{type:ee.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((i=t.init)==null?void 0:i.headers)&&new Headers(t.init.headers)}}if(hc(t)){var a,u;return{type:ee.data,data:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(u=t.init)!=null&&u.headers?new Headers(t.init.headers):void 0}}return{type:ee.data,data:t}}function Bv(e,t,n,r,l,o){let i=e.headers.get("Location");if(Y(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Cu.test(i)){let a=r.slice(0,r.findIndex(u=>u.route.id===n)+1);i=ka(new URL(t.url),a,l,!0,i,o),e.headers.set("Location",i)}return e}function uc(e,t,n){if(Cu.test(e)){let r=e,l=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=wr(l.pathname,n)!=null;if(l.origin===t.origin&&o)return l.pathname+l.search+l.hash}return e}function Bn(e,t,n,r){let l=e.createURL(Kd(t)).toString(),o={signal:n};if(r&&pt(r.formMethod)){let{formMethod:i,formEncType:a}=r;o.method=i.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=Ca(r.formData):o.body=r.formData}return new Request(l,o)}function Ca(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function sc(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Vv(e,t,n,r,l){let o={},i=null,a,u=!1,s={},d=n&&Je(n[1])?n[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let m=f.route.id,w=t[m];if(Y(!Cn(w),"Cannot handle redirect results in processLoaderData"),Je(w)){let k=w.error;d!==void 0&&(k=d,d=void 0),i=i||{};{let x=er(e,m);i[x.route.id]==null&&(i[x.route.id]=k)}o[m]=void 0,u||(u=!0,a=Zo(w.error)?w.error.status:500),w.headers&&(s[m]=w.headers)}else qt(w)?(r.set(m,w.deferredData),o[m]=w.deferredData.data,w.statusCode!=null&&w.statusCode!==200&&!u&&(a=w.statusCode),w.headers&&(s[m]=w.headers)):(o[m]=w.data,w.statusCode&&w.statusCode!==200&&!u&&(a=w.statusCode),w.headers&&(s[m]=w.headers))}),d!==void 0&&n&&(i={[n[0]]:d},o[n[0]]=void 0),{loaderData:o,errors:i,statusCode:a||200,loaderHeaders:s}}function cc(e,t,n,r,l,o,i,a){let{loaderData:u,errors:s}=Vv(t,r,l,a);return o.forEach(d=>{let{key:f,match:m,controller:w}=d,k=i[f];if(Y(k,"Did not find corresponding fetcher result"),!(w&&w.signal.aborted))if(Je(k)){let x=er(e.matches,m==null?void 0:m.route.id);s&&s[x.route.id]||(s=se({},s,{[x.route.id]:k.error})),e.fetchers.delete(f)}else if(Cn(k))Y(!1,"Unhandled fetcher revalidation redirect");else if(qt(k))Y(!1,"Unhandled fetcher deferred data");else{let x=Qt(k.data);e.fetchers.set(f,x)}}),{loaderData:u,errors:s}}function fc(e,t,n,r){let l=se({},t);for(let o of n){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(l[i]=t[i]):e[i]!==void 0&&o.route.loader&&(l[i]=e[i]),r&&r.hasOwnProperty(i))break}return l}function dc(e){return e?Je(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function er(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function pc(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Fe(e,t){let{pathname:n,routeId:r,method:l,type:o,message:i}=t===void 0?{}:t,a="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(a="Bad Request",o==="route-discovery"?u='Unable to match URL "'+n+'" - the `unstable_patchRoutesOnNavigation()` '+(`function threw the following error:
-`+i):l&&n&&r?u="You made a "+l+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?u="defer() is not supported in actions":o==="invalid-body"&&(u="Unable to encode submission body")):e===403?(a="Forbidden",u='Route "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",u='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",l&&n&&r?u="You made a "+l.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":l&&(u='Invalid request method "'+l.toUpperCase()+'"')),new zo(e||500,a,new Error(u),!0)}function Xl(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,l]=t[n];if(Cn(l))return{key:r,result:l}}}function Kd(e){let t=typeof e=="string"?pn(e):e;return Mn(se({},t,{hash:""}))}function Hv(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Wv(e){return typeof e=="object"&&e!=null&&"then"in e}function Qv(e){return Yd(e.result)&&Rv.has(e.result.status)}function qt(e){return e.type===ee.deferred}function Je(e){return e.type===ee.error}function Cn(e){return(e&&e.type)===ee.redirect}function hc(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Kv(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 Yd(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Yv(e){return _v.has(e.toLowerCase())}function pt(e){return Cv.has(e.toLowerCase())}async function Xv(e,t,n,r,l){let o=Object.entries(t);for(let i=0;i