vendor: 3,045 bytes, line 1
1import{a as Oe}from"/build/_shared/chunk-UPSOSVHG.js";import{a as Jt,d as Fe}from"/build/_shared/chunk-G5WX4PPA.js";function H(){return H=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},H.apply(this,arguments)}function Gr(e){e===void 0&&(e={});function t(n,a){let{pathname:o,search:i,hash:l}=n.location;return lt("",{pathname:o,search:i,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:ue(a)}return sa(t,r,null,e)}function A(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function We(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function la(){return Math.random().toString(36).substr(2,8)}function kr(e,t){return{usr:e.state,key:e.key,idx:t}}function lt(e,t,r,n){return r===void 0&&(r=null),H({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ee(t):t,{state:r,key:t&&t.key||n||la()})}function ue(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 ee(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 sa(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,l=z.Pop,s=null,u=c();u==null&&(u=0,i.replaceState(H({},i.state,{idx:u}),""));function c(){return(i.state||{idx:null}).idx}function m(){l=z.Pop;let b=c(),_=b==null?null:b-u;u=b,s&&s({action:l,location:E.location,delta:_})}function R(b,_){l=z.Push;let O=lt(E.location,b,_);r&&r(O,b),u=c()+1;let D=kr(O,u),d=E.createHref(O);try{i.pushState(D,"",d)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;a.location.assign(d)}o&&s&&s({action:l,location:E.location,delta:1})}function w(b,_){l=z.Replace;let O=lt(E.location,b,_);r&&r(O,b),u=c();let D=kr(O,u),d=E.createHref(O);i.replaceState(D,"",d),o&&s&&s({action:l,location:E.location,delta:0})}function v(b){let _=a.location.origin!=="null"?a.location.origin:a.location.href,O=typeof b=="string"?b:ue(b);return A(_,"No window.location.(origin|href) available to create URL for href: "+O),new URL(O,_)}let E={get action(){return l},get location(){return e(a,i)},listen(b){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(Tr,m),s=b,()=>{a.removeEventListener(Tr,m),s=null}},createHref(b){return t(a,b)},createURL:v,encodeLocation(b){let _=v(b);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:R,replace:w,go(b){return i.go(b)}};return E}function ca(e){return e.index===!0}function Yt(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,o)=>{let i=[...r,o],l=typeof a.id=="string"?a.id:i.join("-");if(A(a.index!==!0||!a.children,"Cannot specify children on an index route"),A(!n[l],'Found a route id collision on i
1d "'+l+`". Route id's must be globally unique within Data Router usages`),ca(a)){let s=H({},a,t(a),{id:l});return n[l]=s,s}else{let s=H({},a,t(a),{id:l,children:void 0});return n[l]=s,a.children&&(s.children=Yt(a.children,t,i,n)),s}})}function re(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?ee(t):t,a=ve(n.pathname||"/",r);if(a==null)return null;let o=Qr(e);da(o);let i=null;for(let l=0;i==null&&l<o.length;++l)i=Ea(o[l],ba(a));return i}function Qr(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(o,i,l)=>{let s={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};s.relativePath.startsWith("/")&&(A(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 u=se([n,s.relativePath]),c=r.concat(s);o.children&&o.children.length>0&&(A(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Qr(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:ga(u,o.index),routesMeta:c})};return e.forEach((o,i)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))a(o,i);else for(let s of Zr(o.path))a(o,i,s)}),t}function Zr(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let i=Zr(n.join("/")),l=[];return l.push(...i.map(s=>s===""?o:[o,s].join("/"))),a&&l.push(...i),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function da(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:va(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}function ga(e,t){let r=e.split("/"),n=r.length;return r.some(Ir)&&(n+=Ra),t&&(n+=ma),r.filter(a=>!Ir(a)).reduce((a,o)=>a+(fa.test(o)?ha:o===""?pa:ya),n)}function va(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 Ea(e,t){let{routesMeta:r}=e,n={},a="/",o=[];for(let i=0;i<r.length;++i){let l=r[i],s=i===r.length-1,u=a==="/"?t:t.slice(a.length)||"/",c=st({path:l.relativePath,caseSensitive:l.caseSensitive,end:s},u);if(!c)return null;
1Object.assign(n,c.params);let m=l.route;o.push({params:n,pathname:se([a,c.pathname]),pathnameBase:_a(se([a,c.pathnameBase])),route:m}),c.pathnameBase!=="/"&&(a=se([a,c.pathnameBase]))}return o}function st(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=wa(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:n.reduce((u,c,m)=>{if(c==="*"){let R=l[m]||"";i=o.slice(0,o.length-R.length).replace(/(.)\/+$/,"$1")}return u[c]=xa(l[m]||"",c),u},{}),pathname:o,pathnameBase:i,pattern:e}}function wa(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),We(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,(i,l)=>(n.push(l),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function ba(e){try{return decodeURI(e)}catch(t){return We(!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 xa(e,t){try{return decodeURIComponent(e)}catch(r){return We(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function ve(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 xt(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?ee(e):e;return{pathname:r?r.startsWith("/")?r:Sa(r,t):t,search:Na(n),hash:Da(a)}}function Sa(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 Kt(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 ut(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function St(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=ee(e):(a=H({},e),A(!a.pathname||!a.pathname.includes("?"),Kt("?","pathname","search",a)),A(!a.pathname||!a.pathname.includes("#"),Kt("#","pathname","hash",a)),A(!a.search||!a.search.includes("#"),Kt("#","search","hash",a)));let o=e===""||a.pathname==="",i=o?"/":a.pathname,l;if(n||i==null)l=r;else{let m=t.length-1;if(i.startsWith("..")){let R=i.split("/");for(;R[0]==="..";)R.shift(),m-=1;a.pathname=R.join("/")}l=m>=0?t[m]:"/"}let s=xt(a,l),u=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}function Ca(e){return e instanceof Promise&&e._tracked===!0}function La(e){if(!Ca(e))return e;if(e._error)throw e._error;return e._data}function fe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function qt(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;A(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 f=e.detectErrorBoundary;a=h=>({hasErrorBoundary:f(h)})}else a=Ta;let o={},i=Yt(e.routes,a,void 0,o),l,s=e.basename||"/",u=H({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),c=null,m=new Set,R=null,w=null,v=null,E=e.hydrationData!=null,b=re(i,e.history.location,s),_=null;if(b==null){let f=oe(404,{pathname:e.history.location.pathname}),{matches:h,route:p}=Jr(i);b=h,_={[p.id]:f}}let O=!b.some(f=>f.route.lazy)&&(!b.some(f=>f.route.loader)||e.hydrationData!=null),D,d={historyAction:e.history.action,location:e.history.location,matches:b,initialized:O,navigation:Xt,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||_,fetchers:new Map,blockers:new Map},C=z.Pop,k=!1,F,J=!1,te=!1,ae=[],q=[],$=new Map,Rt=0,Ze=-1,je=new Map,ye=new Set,Be=new Map,Le=new Map,Pe=new Map,kt=!1;function Kn(){return c=e.history.listen(f=>{let{action:h,location:p,delta:x}=f;if(kt){kt=!1;return}We(Pe.size===0||x!=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 M=Ar({currentLocation:d.location,nextLocation:p,historyAction:h});if(M&&x!=null){kt=!0,e.history.go(x*-1),vt(M,{state:"blocked",location:p,proceed(){vt(M,{state:"proceeding",proceed:void 0,reset:void 0,location:p}),e.history.go(x)},reset(){let L=new Map(d.blockers);L.set(M,He),Y({blockers:L})}});return}return be(h,p)}),d.initialized||be(z.Pop,d.location),D}
1function Xn(){c&&c(),m.clear(),F&&F.abort(),d.fetchers.forEach((f,h)=>jt(h)),d.blockers.forEach((f,h)=>Mr(h))}function Yn(f){return m.add(f),()=>m.delete(f)}function Y(f){d=H({},d,f),m.forEach(h=>h(d))}function qe(f,h){var p,x;let M=d.actionData!=null&&d.navigation.formMethod!=null&&le(d.navigation.formMethod)&&d.navigation.state==="loading"&&((p=f.state)==null?void 0:p._isRedirect)!==!0,L;h.actionData?Object.keys(h.actionData).length>0?L=h.actionData:L=null:M?L=d.actionData:L=null;let P=h.loaderData?Wr(d.loaderData,h.loaderData,h.matches||[],h.errors):d.loaderData,N=d.blockers;N.size>0&&(N=new Map(N),N.forEach((B,Q)=>N.set(Q,He)));let S=k===!0||d.navigation.formMethod!=null&&le(d.navigation.formMethod)&&((x=f.state)==null?void 0:x._isRedirect)!==!0;l&&(i=l,l=void 0),J||C===z.Pop||(C===z.Push?e.history.push(f,f.state):C===z.Replace&&e.history.replace(f,f.state)),Y(H({},h,{actionData:L,loaderData:P,historyAction:C,location:f,initialized:!0,navigation:Xt,revalidation:"idle",restoreScrollPosition:Or(f,h.matches||d.matches),preventScrollReset:S,blockers:N})),C=z.Pop,k=!1,J=!1,te=!1,ae=[],q=[]}async function _r(f,h){if(typeof f=="number"){e.history.go(f);return}let p=Gt(d.location,d.matches,s,u.v7_prependBasename,f,h?.fromRouteId,h?.relative),{path:x,submission:M,error:L}=jr(u.v7_normalizeFormMethod,!1,p,h),P=d.location,N=lt(d.location,x,h&&h.state);N=H({},N,e.history.encodeLocation(N));let S=h&&h.replace!=null?h.replace:void 0,B=z.Push;S===!0?B=z.Replace:S===!1||M!=null&&le(M.formMethod)&&M.formAction===d.location.pathname+d.location.search&&(B=z.Replace);let Q=h&&"preventScrollReset"in h?h.preventScrollReset===!0:void 0,I=Ar({currentLocation:P,nextLocation:N,historyAction:B});if(I){vt(I,{state:"blocked",location:N,proceed(){vt(I,{state:"proceeding",proceed:void 0,reset:void 0,location:N}),_r(f,h)},reset(){let W=new Map(d.blockers);W.set(I,He),Y({blockers:W})}});return}return await be(B,N,{submission:M,pendingError:L,preventScrollReset:Q,replace:h&&h.replace})}function Gn(){if(It(),Y({revalidation:"loading"}),d.navigation.state!=="submitting"){if(d.navigation.state==="idle"){be(d.historyAction,d.location,{startUninterruptedRevalidation:!0});return}be(C||d.historyAction,d.navigation.location,{overrideNavigation:d.navigation})}}async function be(f,h,p){F&&F.abort(),F=null,C=f,J=(p&&p.startUninterruptedRevalidation)===!0,aa(d.location,d.matches),k=(p&&p.preventScrollReset)===!0;let x=l||i,M=p&&p.overrideNavigation,L=re(x,h,s);if(!L){let W=oe(404,{pathname:h.pathname}),{matches:G,route:Me}=Jr(x);Bt(),qe(h,{matches:G,loaderData:{},errors:{[Me.id]:W}});return}if(d.initialized&&!te&&Ha(d.location,h)&&!(p&&p.submission&&le(p.submission.formMethod))){qe(h,{matches:L});return}F=new AbortController;let P=at(e.history,h,F.signal,p&&p.submission),N,S;if(p&&p.pendingError)S={[ze(L).route.id]:p.pendingError};else if(p&&p.submission&&le(p.submission.formMethod)){let W=await Qn(P,h,p.submission,L,{replace:p.replace});if(W.shortCircuited)return;N=W.pendingActionData,S=W.pendingActionError,M=wt(h,p.submission),P=new Request(P.url,{signal:P.signal})}let{shortCircuited:B,loaderData:Q,errors:I}=await Zn(P,h,L,M,p&&p.submission,p&&p.fetcherSubmission,p&&p.replace,N,S);B||(F=null,qe(h,H({matches:L},N?{actionData:N}:{},{loaderData:Q,errors:I})))}async function Qn(f,h,p,x,M){M===void 0&&(M={}),It();let L=Ja(h,p);Y({navigation:L});let P,N=Zt(x,h);if(!N.route.action&&!N.route.lazy)P={type:X.error,error:oe(405,{method:f.method,pathname:h.pathname,routeId:N.route.id})};else if(P=await nt("action",f,N,x,o,a,s),f.signal.aborted)return{shortCircuited:!0};if(Ve(P)){let S;return M&&M.replace!=null?S=M.replace:S=P.location===d.location.pathname+d.location.search,await et(d,P,{submission:p,replace:S}),{shortCircuited:!0}}if(it(P)){let S=ze(x,N.route.id);return(M&&M.replace)!==!0&&(C=z.Push),{pendingActionData:{},pendingActionError:{[S.route.id]:P.error}}}if(Ue(P))throw oe(400,{type:"defer-action"});return{pendingActionData:{[N.route.id]:P.data}}}async function Zn(f,h,p,x,M,L,P,N,S){let B=x||wt(h,M),Q=M||L||Yr(B),I=l||i,[W,G]=Br(e.history,d,p,Q,h,te,ae,q,Be,ye,I,s,N,S);if(Bt(j=>!(p&&p.some(ie=>ie.route.id===j))||W&&W.some(ie=>ie.route.id===j)),Ze=++Rt,W.length===0&&G.length===0){let j=Lr();return qe(h,H({matches:p,loaderData:{},errors:S||null},N?{actionData:N}:{},j?{fetchers:new Map(d.fetchers)}:{})),{shortCircuited:!0}}if(!J){G.forEach(ie=>{let Se=d.fetchers.get(ie.key),Wt=ot(void 0,Se?Se.data:void 0);d.fetchers.set(ie.key,Wt)});let j=N||d.actionData;Y(H({navigation:B},j?Object.keys(j).length===0?{actionData:null}:{actionData:j}:{},G.length>0?{fetchers:new Map(d.fetchers)}:{}))}G.forEach(j=>{$.has(j.key)&&xe(j.key),j.controller&&$.set(j.key,j.controller)});let Me=()=>G.forEach(j=>xe(j.key));F&&F.signal.addEventListener("abort",Me);let{results:Ae,loaderResults:tt,fetcherResults:Ht}=await Dr(d.matches,p,W,G,f);if(f.signal.aborted)return{shortCircuited:!0};F&&F.signal.removeEventListener("abort",Me),G.forEach(j=>$.delete(j.key));let Re=Kr(Ae);if(Re){if(Re.idx>=W.length){let j=G[Re.idx-W.length].key;ye.add(j)}return await et(d,Re.result,{replace:P}),{shortCircuited:!0}}let{loaderData:ge,errors:Et}=Vr(d,p,W,tt,S,G,Ht,Le);Le.forEach((j,ie)=>{j.subscribe(Se=>{(Se||j.done)&&Le.delete(ie)})});let $t=Lr(),zt=Pr(Ze),Vt=$t||zt||G.length>0;return H({loaderData:ge,errors:Et},Vt?{fetchers:new Map(d.fetchers)}:{})}function Nr(f){return d.fetchers.get(f)||Ua}function qn(f,h,p,x){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.");$.has(f)&&xe(f);
1let M=l||i,L=Gt(d.location,d.matches,s,u.v7_prependBasename,p,h,x?.relative),P=re(M,L,s);if(!P){gt(f,h,oe(404,{pathname:L}));return}let{path:N,submission:S,error:B}=jr(u.v7_normalizeFormMethod,!0,L,x);if(B){gt(f,h,B);return}let Q=Zt(P,N);if(k=(x&&x.preventScrollReset)===!0,S&&le(S.formMethod)){ea(f,h,N,Q,P,S);return}Be.set(f,{routeId:h,path:N}),ta(f,h,N,Q,P,S)}async function ea(f,h,p,x,M,L){if(It(),Be.delete(f),!x.route.action&&!x.route.lazy){let K=oe(405,{method:L.formMethod,pathname:p,routeId:h});gt(f,h,K);return}let P=d.fetchers.get(f),N=Ka(L,P);d.fetchers.set(f,N),Y({fetchers:new Map(d.fetchers)});let S=new AbortController,B=at(e.history,p,S.signal,L);$.set(f,S);let Q=Rt,I=await nt("action",B,x,M,o,a,s);if(B.signal.aborted){$.get(f)===S&&$.delete(f);return}if(Ve(I))if($.delete(f),Ze>Q){let K=$e(void 0);d.fetchers.set(f,K),Y({fetchers:new Map(d.fetchers)});return}else{ye.add(f);let K=ot(L);return d.fetchers.set(f,K),Y({fetchers:new Map(d.fetchers)}),et(d,I,{submission:L,isFetchActionRedirect:!0})}if(it(I)){gt(f,h,I.error);return}if(Ue(I))throw oe(400,{type:"defer-action"});let W=d.navigation.location||d.location,G=at(e.history,W,S.signal),Me=l||i,Ae=d.navigation.state!=="idle"?re(Me,d.navigation.location,s):d.matches;A(Ae,"Didn't find any matches after fetcher action");let tt=++Rt;je.set(f,tt);let Ht=ot(L,I.data);d.fetchers.set(f,Ht);let[Re,ge]=Br(e.history,d,Ae,L,W,te,ae,q,Be,ye,Me,s,{[x.route.id]:I.data},void 0);ge.filter(K=>K.key!==f).forEach(K=>{let rt=K.key,Ur=d.fetchers.get(rt),ia=ot(void 0,Ur?Ur.data:void 0);d.fetchers.set(rt,ia),$.has(rt)&&xe(rt),K.controller&&$.set(rt,K.controller)}),Y({fetchers:new Map(d.fetchers)});let Et=()=>ge.forEach(K=>xe(K.key));S.signal.addEventListener("abort",Et);let{results:$t,loaderResults:zt,fetcherResults:Vt}=await Dr(d.matches,Ae,Re,ge,G);if(S.signal.aborted)return;S.signal.removeEventListener("abort",Et),je.delete(f),$.delete(f),ge.forEach(K=>$.delete(K.key));let j=Kr($t);if(j){if(j.idx>=Re.length){let K=ge[j.idx-Re.length].key;ye.add(K)}return et(d,j.result)}let{loaderData:ie,errors:Se}=Vr(d,d.matches,Re,zt,void 0,ge,Vt,Le);if(d.fetchers.has(f)){let K=$e(I.data);d.fetchers.set(f,K)}let Wt=Pr(tt);d.navigation.state==="loading"&&tt>Ze?(A(C,"Expected pending action"),F&&F.abort(),qe(d.navigation.location,{matches:Ae,loaderData:ie,errors:Se,fetchers:new Map(d.fetchers)})):(Y(H({errors:Se,loaderData:Wr(d.loaderData,ie,Ae,Se)},Wt||ge.length>0?{fetchers:new Map(d.fetchers)}:{})),te=!1)}async function ta(f,h,p,x,M,L){let P=d.fetchers.get(f),N=ot(L,P?P.data:void 0);d.fetchers.set(f,N),Y({fetchers:new Map(d.fetchers)});let S=new AbortController,B=at(e.history,p,S.signal);$.set(f,S);let Q=Rt,I=await nt("loader",B,x,M,o,a,s);if(Ue(I)&&(I=await nn(I,B.signal,!0)||I),$.get(f)===S&&$.delete(f),B.signal.aborted)return;if(Ve(I))if(Ze>Q){let G=$e(void 0);d.fetchers.set(f,G),Y({fetchers:new Map(d.fetchers)});return}else{ye.add(f),await et(d,I);return}if(it(I)){let G=ze(d.matches,h);d.fetchers.delete(f),Y({fetchers:new Map(d.fetchers),errors:{[G.route.id]:I.error}});return}A(!Ue(I),"Unhandled fetcher deferred data");let W=$e(I.data);d.fetchers.set(f,W),Y({fetchers:new Map(d.fetchers)})}async function et(f,h,p){let{submission:x,replace:M,isFetchActionRedirect:L}=p===void 0?{}:p;h.revalidate&&(te=!0);let P=lt(f.location,h.location,H({_isRedirect:!0},L?{_isFetchActionRedirect:!0}:{}));if(A(P,"Expected a location on the redirect navigation"),en.test(h.location)&&r){let B=e.history.createURL(h.location),Q=ve(B.pathname,s)==null;if(t.location.origin!==B.origin||Q){M?t.location.replace(h.location):t.location.assign(h.location);return}}F=null;let N=M===!0?z.Replace:z.Push,S=x||Yr(f.navigation);if(Oa.has(h.status)&&S&&le(S.formMethod))await be(N,P,{submission:H({},S,{formAction:h.location}),preventScrollReset:k});else if(L)await be(N,P,{overrideNavigation:wt(P),fetcherSubmission:S,preventScrollReset:k});else{let B=wt(P,S);await be(N,P,{overrideNavigation:B,preventScrollReset:k})}}async function Dr(f,h,p,x,M){let L=await Promise.all([...p.map(S=>nt("loader",M,S,h,o,a,s)),...x.map(S=>S.matches&&S.match&&S.controller?nt("loader",at(e.history,S.path,S.controller.signal),S.match,S.matches,o,a,s):{type:X.error,error:oe(404,{pathname:S.path})})]),P=L.slice(0,p.length),N=L.slice(p.length);return await Promise.all([Xr(f,p,P,P.map(()=>M.signal),!1,d.loaderData),Xr(f,x.map(S=>S.match),N,x.map(S=>S.controller?S.controller.signal:null),!0)]),{results:L,loaderResults:P,fetcherResults:N}}function It(){te=!0,ae.push(...Bt()),Be.forEach((f,h)=>
1{$.has(h)&&(q.push(h),xe(h))})}function gt(f,h,p){let x=ze(d.matches,h);jt(f),Y({errors:{[x.route.id]:p},fetchers:new Map(d.fetchers)})}function jt(f){let h=d.fetchers.get(f);$.has(f)&&!(h&&h.state==="loading"&&je.has(f))&&xe(f),Be.delete(f),je.delete(f),ye.delete(f),d.fetchers.delete(f)}function xe(f){let h=$.get(f);A(h,"Expected fetch controller: "+f),h.abort(),$.delete(f)}function Cr(f){for(let h of f){let p=Nr(h),x=$e(p.data);d.fetchers.set(h,x)}}function Lr(){let f=[],h=!1;for(let p of ye){let x=d.fetchers.get(p);A(x,"Expected fetcher: "+p),x.state==="loading"&&(ye.delete(p),f.push(p),h=!0)}return Cr(f),h}function Pr(f){let h=[];for(let[p,x]of je)if(x<f){let M=d.fetchers.get(p);A(M,"Expected fetcher: "+p),M.state==="loading"&&(xe(p),je.delete(p),h.push(p))}return Cr(h),h.length>0}function ra(f,h){let p=d.blockers.get(f)||He;return Pe.get(f)!==h&&Pe.set(f,h),p}function Mr(f){d.blockers.delete(f),Pe.delete(f)}function vt(f,h){let p=d.blockers.get(f)||He;A(p.state==="unblocked"&&h.state==="blocked"||p.state==="blocked"&&h.state==="blocked"||p.state==="blocked"&&h.state==="proceeding"||p.state==="blocked"&&h.state==="unblocked"||p.state==="proceeding"&&h.state==="unblocked","Invalid blocker state transition: "+p.state+" -> "+h.state);let x=new Map(d.blockers);x.set(f,h),Y({blockers:x})}function Ar(f){let{currentLocation:h,nextLocation:p,historyAction:x}=f;if(Pe.size===0)return;Pe.size>1&&We(!1,"A router only supports one blocker at a time");let M=Array.from(Pe.entries()),[L,P]=M[M.length-1],N=d.blockers.get(L);if(!(N&&N.state==="proceeding")&&P({currentLocation:h,nextLocation:p,historyAction:x}))return L}function Bt(f){let h=[];return Le.forEach((p,x)=>{(!f||f(x))&&(p.cancel(),h.push(x),Le.delete(x))}),h}function na(f,h,p){if(R=f,v=h,w=p||null,!E&&d.navigation===Xt){E=!0;let x=Or(d.location,d.matches);x!=null&&Y({restoreScrollPosition:x})}return()=>{R=null,v=null,w=null}}function Fr(f,h){return w&&w(f,h.map(x=>Wa(x,d.loaderData)))||f.key}function aa(f,h){if(R&&v){let p=Fr(f,h);R[p]=v()}}function Or(f,h){if(R){let p=Fr(f,h),x=R[p];if(typeof x=="number")return x}return null}function oa(f){o={},l=Yt(f,a,void 0,o)}return D={get basename(){return s},get state(){return d},get routes(){return i},initialize:Kn,subscribe:Yn,enableScrollRestoration:na,navigate:_r,fetch:qn,revalidate:Gn,createHref:f=>e.history.createHref(f),encodeLocation:f=>e.history.encodeLocation(f),getFetcher:Nr,deleteFetcher:jt,dispose:Xn,getBlocker:ra,deleteBlocker:Mr,_internalFetchControllers:$,_internalActiveDeferreds:Le,_internalSetRoutes:oa},D}function ka(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Gt(e,t,r,n,a,o,i){let l,s;if(o!=null&&i!=="path"){l=[];for(let c of t)if(l.push(c),c.route.id===o){s=c;break}}else l=t,s=t[t.length-1];let u=St(a||".",ut(l).map(c=>c.pathnameBase),ve(e.pathname,r)||e.pathname,i==="path");return a==null&&(u.search=e.search,u.hash=e.hash),(a==null||a===""||a===".")&&s&&s.route.index&&!er(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(u.pathname=u.pathname==="/"?r:se([r,u.pathname])),ue(u)}function jr(e,t,r,n){if(!n||!ka(n))return{path:r};if(n.formMethod&&!Va(n.formMethod))return{path:r,error:oe(405,{method:n.formMethod})};let a=()=>({path:r,error:oe(400,{type:"invalid-body"})}),o=n.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),l=rn(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!le(i))return a();let R=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((w,v)=>{let[E,b]=v;return""+w+E+"="+b+` 2`},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:l,formEncType:n.formEncType,formData:void 0,json:void 0,text:R}}}else if(n.formEncType==="application/json"){if(!le(i))return a();try{let R=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:l,formEncType:n.formEncType,formData:void 0,json:R,text:void 0}}}catch{return a()}}}A(typeof FormData=="function","FormData is not available in this environment");let s,u;if(n.formData)s=Qt(n.formData),u=n.formData;else if(n.body instanceof FormData)s=Qt(n.body),u=n.body;else if(n.body instanceof URLSearchParams)s=n.body,u=zr(s);else if(n.body==null)s=new URLSearchParams,u=new FormData;else try{s=new URLSearchParams(n.body),u=zr(s)}catch{return a()}let c={formMethod:i,formAction:l,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(le(c.formMethod))return{path:r,submission:c};let m=ee(r);return t&&m.search&&er(m.search)&&s.append("index",""),m.search="?"+s,{path:ue(m),submission:c}}function Ia(e,t){let r=e;if(t){let n=e.findIndex(a=>a.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function Br(e,t,r,n,a,o,i,l,s,u,c,m,R,w){let v=w?Object.values(w)[0]:R?Object.values(R)[0]:void 0,E=e.createURL(t.location),b=e.createURL(a),_=w?Object.keys(w)[0]:void 0,D=Ia(r,_).filter((C,k)=>{if(C.route.lazy)return!0;
2if(C.route.loader==null)return!1;if(ja(t.loaderData,t.matches[k],C)||i.some(te=>te===C.route.id))return!0;let F=t.matches[k],J=C;return Hr(C,H({currentUrl:E,currentParams:F.params,nextUrl:b,nextParams:J.params},n,{actionResult:v,defaultShouldRevalidate:o||E.pathname+E.search===b.pathname+b.search||E.search!==b.search||tn(F,J)}))}),d=[];return s.forEach((C,k)=>{if(!r.some(q=>q.route.id===C.routeId))return;let F=re(c,C.path,m);if(!F){d.push({key:k,routeId:C.routeId,path:C.path,matches:null,match:null,controller:null});return}let J=t.fetchers.get(k),te=Zt(F,C.path),ae=!1;u.has(k)?ae=!1:l.includes(k)?ae=!0:J&&J.state!=="idle"&&J.data===void 0?ae=o:ae=Hr(te,H({currentUrl:E,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:r[r.length-1].params},n,{actionResult:v,defaultShouldRevalidate:o})),ae&&d.push({key:k,routeId:C.routeId,path:C.path,matches:F,match:te,controller:new AbortController})}),[D,d]}function ja(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function tn(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Hr(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function $r(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];A(a,"No route found in manifest");let o={};for(let i in n){let s=a[i]!==void 0&&i!=="hasErrorBoundary";We(!s,'Route "'+a.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.')),!s&&!ua.has(i)&&(o[i]=n[i])}Object.assign(a,o),Object.assign(a,H({},t(a),{lazy:void 0}))}async function nt(e,t,r,n,a,o,i,l){l===void 0&&(l={});let s,u,c,m=v=>{let E,b=new Promise((_,O)=>E=O);return c=()=>E(),t.signal.addEventListener("abort",c),Promise.race([v({request:t,params:r.params,context:l.requestContext}),b])};try{let v=r.route[e];if(r.route.lazy)if(v)u=(await Promise.all([m(v),$r(r.route,o,a)]))[0];else if(await $r(r.route,o,a),v=r.route[e],v)u=await m(v);else if(e==="action"){let E=new URL(t.url),b=E.pathname+E.search;throw oe(405,{method:t.method,pathname:b,routeId:r.route.id})}else return{type:X.data,data:void 0};else if(v)u=await m(v);else{let E=new URL(t.url),b=E.pathname+E.search;throw oe(404,{pathname:b})}A(u!==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(v){s=X.error,u=v}finally{c&&t.signal.removeEventListener("abort",c)}if(za(u)){let v=u.status;if(Fa.has(v)){let _=u.headers.get("Location");if(A(_,"Redirects returned/thrown from loaders/actions must have a Location header"),!en.test(_))_=Gt(new URL(t.url),n.slice(0,n.indexOf(r)+1),i,!0,_);else if(!l.isStaticRequest){let O=new URL(t.url),D=_.startsWith("//")?new URL(O.protocol+_):new URL(_),d=ve(D.pathname,i)!=null;D.origin===O.origin&&d&&(_=D.pathname+D.search+D.hash)}if(l.isStaticRequest)throw u.headers.set("Location",_),u;return{type:X.redirect,status:v,location:_,revalidate:u.headers.get("X-Remix-Revalidate")!==null}}if(l.isRouteRequest)throw{type:s||X.data,response:u};let E,b=u.headers.get("Content-Type");return b&&/\bapplication\/json\b/.test(b)?E=await u.json():E=await u.text(),s===X.error?{type:s,error:new _e(v,u.statusText,E),headers:u.headers}:{type:X.data,data:E,statusCode:u.status,headers:u.headers}}if(s===X.error)return{type:s,error:u};if($a(u)){var R,w;return{type:X.deferred,deferredData:u,statusCode:(R=u.init)==null?void 0:R.status,headers:((w=u.init)==null?void 0:w.headers)&&new Headers(u.init.headers)}}return{type:X.data,data:u}}function at(e,t,r,n){let a=e.createURL(rn(t)).toString(),o={signal:r};if(n&&le(n.formMethod)){let{formMethod:i,formEncType:l}=n;o.method=i.toUpperCase(),l==="application/json"?(o.headers=new Headers({"Content-Type":l}),o.body=JSON.stringify(n.json)):l==="text/plain"?o.body=n.text:l==="application/x-www-form-urlencoded"&&n.formData?o.body=Qt(n.formData):o.body=n.formData}
2return new Request(a,o)}function Qt(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function zr(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Ba(e,t,r,n,a){let o={},i=null,l,s=!1,u={};return r.forEach((c,m)=>{let R=t[m].route.id;if(A(!Ve(c),"Cannot handle redirect results in processLoaderData"),it(c)){let w=ze(e,R),v=c.error;n&&(v=Object.values(n)[0],n=void 0),i=i||{},i[w.route.id]==null&&(i[w.route.id]=v),o[R]=void 0,s||(s=!0,l=fe(c.error)?c.error.status:500),c.headers&&(u[R]=c.headers)}else Ue(c)?(a.set(R,c.deferredData),o[R]=c.deferredData.data):o[R]=c.data,c.statusCode!=null&&c.statusCode!==200&&!s&&(l=c.statusCode),c.headers&&(u[R]=c.headers)}),n&&(i=n,o[Object.keys(n)[0]]=void 0),{loaderData:o,errors:i,statusCode:l||200,loaderHeaders:u}}function Vr(e,t,r,n,a,o,i,l){let{loaderData:s,errors:u}=Ba(t,r,n,a,l);for(let c=0;c<o.length;c++){let{key:m,match:R,controller:w}=o[c];A(i!==void 0&&i[c]!==void 0,"Did not find corresponding fetcher result");let v=i[c];if(!(w&&w.signal.aborted))if(it(v)){let E=ze(e.matches,R?.route.id);u&&u[E.route.id]||(u=H({},u,{[E.route.id]:v.error})),e.fetchers.delete(m)}else if(Ve(v))A(!1,"Unhandled fetcher revalidation redirect");else if(Ue(v))A(!1,"Unhandled fetcher deferred data");else{let E=$e(v.data);e.fetchers.set(m,E)}}return{loaderData:s,errors:u}}function Wr(e,t,r,n){let a=H({},t);for(let o of r){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(a[i]=t[i]):e[i]!==void 0&&o.route.loader&&(a[i]=e[i]),n&&n.hasOwnProperty(i))break}return a}function ze(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 Jr(e){let t=e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function oe(e,t){let{pathname:r,routeId:n,method:a,type:o}=t===void 0?{}:t,i="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(i="Bad Request",a&&r&&n?l="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.":o==="defer-action"?l="defer() is not supported in actions":o==="invalid-body"&&(l="Unable to encode submission body")):e===403?(i="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(i="Not Found",l='No route matches URL "'+r+'"'):e===405&&(i="Method Not Allowed",a&&r&&n?l="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":a&&(l='Invalid request method "'+a.toUpperCase()+'"')),new _e(e||500,i,new Error(l),!0)}function Kr(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Ve(r))return{result:r,idx:t}}}function rn(e){let t=typeof e=="string"?ee(e):e;return ue(H({},t,{hash:""}))}function Ha(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Ue(e){return e.type===X.deferred}function it(e){return e.type===X.error}function Ve(e){return(e&&e.type)===X.redirect}function $a(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 za(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Va(e){return Aa.has(e.toLowerCase())}function le(e){return Pa.has(e.toLowerCase())}async function Xr(e,t,r,n,a,o){for(let i=0;i<r.length;i++){let l=r[i],s=t[i];if(!s)continue;let u=e.find(m=>m.route.id===s.route.id),c=u!=null&&!tn(u,s)&&(o&&o[s.route.id])!==void 0;if(Ue(l)&&(a||c)){let m=n[i];A(m,"Expected an AbortSignal for revalidating fetcher deferred result"),await nn(l,m,a).then(R=>{R&&(r[i]=R||r[i])})}}}async function nn(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:X.data,data:e.deferredData.unwrappedData}}catch(a){return{type:X.error,error:a}}return{type:X.data,data:e.deferredData.data}}}function er(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Wa(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 Zt(e,t){let r=typeof t=="string"?ee(t).search:t.search;if(e[e.length-1].route.index&&er(r||""))return e[e.length-1];let n=ut(e);return n[n.length-1]}function Yr(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;
2if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function wt(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 Ja(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 ot(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," _hasFetcherDoneAnything ":!0}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t," _hasFetcherDoneAnything ":!0}}function Ka(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," _hasFetcherDoneAnything ":!0}}function $e(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e," _hasFetcherDoneAnything ":!0}}var z,Tr,X,ua,fa,ha,ma,pa,ya,Ra,Ir,se,_a,Na,Da,de,bt,_t,_e,qr,Pa,Ma,Aa,Fa,Oa,Xt,Ua,He,en,Ta,ui,Je=Jt(()=>{(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(z||(z={}));Tr="popstate";(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(X||(X={}));ua=new Set(["lazy","caseSensitive","path","id","index","children"]);fa=/^:\w+$/,ha=3,ma=2,pa=1,ya=10,Ra=-2,Ir=e=>e==="*";se=e=>e.join("/").replace(/\/\/+/g,"/"),_a=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Na=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Da=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,de=class extends Error{},bt=class{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],A(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((o,i)=>n=i),this.controller=new AbortController;let a=()=>n(new de("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((o,i)=>{let[l,s]=i;return Object.assign(o,{[l]:this.trackPromise(l,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 de)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 o=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:()=>o}),this.emit(!1,r),Promise.reject(o)}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(o=>{t.removeEventListener("abort",n),(o||this.done)&&a(o)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return A(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((t,r)=>
2{let[n,a]=r;return Object.assign(t,{[n]:La(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}};_t=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,H({},n,{headers:a}))},_e=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}};qr=["post","put","patch","delete"],Pa=new Set(qr),Ma=["get",...qr],Aa=new Set(Ma),Fa=new Set([301,302,303,307,308]),Oa=new Set([307,308]),Xt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ua={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},He={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},en=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ta=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)});ui=Symbol("deferred")});function Nt(){return Nt=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},Nt.apply(this,arguments)}function Te(e,t){let{relative:r}=t===void 0?{}:t;Ke()||A(!1);let{basename:n,navigator:a}=g.useContext(he),{hash:o,pathname:i,search:l}=Xe(e,{relative:r}),s=i;return n!=="/"&&(s=i==="/"?n:se([n,i])),a.createHref({pathname:s,search:l,hash:o})}function Ke(){return g.useContext(ct)!=null}function Z(){return Ke()||A(!1),g.useContext(ct).location}function sn(e){g.useContext(he).static||g.useLayoutEffect(e)}function dt(){let{isDataRoute:e}=g.useContext(me);return e?ao():Ga()}function Ga(){Ke()||A(!1);let e=g.useContext(we),{basename:t,navigator:r}=g.useContext(he),{matches:n}=g.useContext(me),{pathname:a}=Z(),o=JSON.stringify(ut(n).map(s=>s.pathnameBase)),i=g.useRef(!1);return sn(()=>{i.current=!0}),g.useCallback(function(s,u){if(u===void 0&&(u={}),!i.current)return;if(typeof s=="number"){r.go(s);return}let c=St(s,JSON.parse(o),a,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:se([t,c.pathname])),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,o,a,e])}function cn(){return g.useContext(un)}function ar(e){let t=g.useContext(me).outlet;return t&&g.createElement(un.Provider,{value:e},t)}function Xe(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=g.useContext(me),{pathname:a}=Z(),o=JSON.stringify(ut(n).map(i=>i.pathnameBase));return g.useMemo(()=>St(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function Qa(e,t,r){Ke()||A(!1);let{navigator:n}=g.useContext(he),{matches:a}=g.useContext(me),o=a[a.length-1],i=o?o.params:{},l=o?o.pathname:"/",s=o?o.pathnameBase:"/",u=o&&o.route,c=Z(),m;if(t){var R;let _=typeof t=="string"?ee(t):t;s==="/"||(R=_.pathname)!=null&&R.startsWith(s)||A(!1),m=_}else m=c;let w=m.pathname||"/",v=s==="/"?w:w.slice(s.length)||"/",E=re(e,{pathname:v}),b=to(E&&E.map(_=>Object.assign({},_,{params:Object.assign({},i,_.params),pathname:se([s,n.encodeLocation?n.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?s:se([s,n.encodeLocation?n.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),a,r);return t&&b?g.createElement(ct.Provider,{value:{location:Nt({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:z.Pop}},b):b}function Za(){let e=ke(),t=fe(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),r?g.createElement("pre",{style:a},r):null,null)}function eo(e){let{routeContext:t,match:r,children:n}=e,a=g.useContext(we);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),g.createElement(me.Provider,{value:t},n)}function to(e,t,r){var n;if(t===void 0&&(t=[]),r===void 0&&(r=null),e==null){var a;if((a=r)!=null&&a.errors)e=r.matches;else return null}let o=e,i=(n=r)==null?void 0:n.errors;if(i!=null){let l=o.findIndex(s=>s.route.id&&i?.[s.route.id]);l>=0||A(!1),o=o.slice(0,Math.min(o.length,l+1))}return o.reduceRight((l,s,u)=>{let c=s.route.id?i?.[s.route.id]:null,m=null;r&&(m=s.route.errorElement||qa);let R=t.concat(o.slice(0,u+1)),w=()=>{let v;return c?v=m:s.route.Component?v=g.createElement(s.route.Component,null):s.route.element?v=s.route.element:v=l,g.createElement(eo,{match:s,routeContext:{outlet:l,matches:R,isDataRoute:r!=null},children:v})};return r&&(s.route.ErrorBoundary||s.route.errorElement||u===0)?g.createElement(tr,{location:r.location,revalidation:r.revalidation,component:m,error:c,children:w(),routeC
2ontext:{outlet:null,matches:R,isDataRoute:!0}}):w()},null)}function ro(e){let t=g.useContext(we);return t||A(!1),t}function Ct(e){let t=g.useContext(Ne);return t||A(!1),t}function no(e){let t=g.useContext(me);return t||A(!1),t}function or(e){let t=no(e),r=t.matches[t.matches.length-1];return r.route.id||A(!1),r.route.id}function Ye(){return Ct(Ee.UseNavigation).navigation}function ft(){let{matches:e,loaderData:t}=Ct(Ee.UseMatches);return g.useMemo(()=>e.map(r=>{let{pathname:n,params:a}=r;return{id:r.route.id,pathname:n,params:a,data:t[r.route.id],handle:r.route.handle}}),[e,t])}function ir(){let e=Ct(Ee.UseLoaderData),t=or(Ee.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function ke(){var e;let t=g.useContext(ln),r=Ct(Ee.UseRouteError),n=or(Ee.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function lr(){let e=g.useContext(Dt);return e?._data}function Lt(){let e=g.useContext(Dt);return e?._error}function ao(){let{router:e}=ro(rr.UseNavigateStable),t=or(Ee.UseNavigateStable),r=g.useRef(!1);return sn(()=>{r.current=!0}),g.useCallback(function(a,o){o===void 0&&(o={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,Nt({fromRouteId:t},o)))},[e,t])}function sr(e){let{fallbackElement:t,router:r,future:n}=e,[a,o]=g.useState(r.state),{v7_startTransition:i}=n||{},l=g.useCallback(m=>{i&&an?an(()=>o(m)):o(m)},[o,i]);g.useLayoutEffect(()=>r.subscribe(l),[r,l]);let s=g.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:m=>r.navigate(m),push:(m,R,w)=>r.navigate(m,{state:R,preventScrollReset:w?.preventScrollReset}),replace:(m,R,w)=>r.navigate(m,{replace:!0,state:R,preventScrollReset:w?.preventScrollReset})}),[r]),u=r.basename||"/",c=g.useMemo(()=>({router:r,navigator:s,static:!1,basename:u}),[r,s,u]);return g.createElement(g.Fragment,null,g.createElement(we.Provider,{value:c},g.createElement(Ne.Provider,{value:a},g.createElement(ur,{basename:u,location:a.location,navigationType:a.historyAction,navigator:s},a.initialized?g.createElement(io,{routes:r.routes,state:a}):t))),null)}function io(e){let{routes:t,state:r}=e;return Qa(t,void 0,r)}function Pt(e){return ar(e.context)}function ur(e){let{basename:t="/",children:r=null,location:n,navigationType:a=z.Pop,navigator:o,static:i=!1}=e;Ke()&&A(!1);let l=t.replace(/^\/*/,"/"),s=g.useMemo(()=>({basename:l,navigator:o,static:i}),[l,o,i]);typeof n=="string"&&(n=ee(n));
2let{pathname:u="/",search:c="",hash:m="",state:R=null,key:w="default"}=n,v=g.useMemo(()=>{let E=ve(u,l);return E==null?null:{location:{pathname:E,search:c,hash:m,state:R,key:w},navigationType:a}},[l,u,c,m,R,w,a]);return v==null?null:g.createElement(he.Provider,{value:s},g.createElement(ct.Provider,{children:r,value:v}))}function cr(e){let{children:t,errorElement:r,resolve:n}=e;return g.createElement(nr,{resolve:n,errorElement:r},g.createElement(so,null,t))}function so(e){let{children:t}=e,r=lr(),n=typeof t=="function"?t(r):t;return g.createElement(g.Fragment,null,n)}function dn(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:g.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:g.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}var g,we,Ne,Dt,he,ct,me,ln,un,qa,tr,rr,Ee,oo,an,ne,lo,nr,dr=Jt(()=>{g=Fe(Oe());Je();Je();we=g.createContext(null),Ne=g.createContext(null),Dt=g.createContext(null),he=g.createContext(null),ct=g.createContext(null),me=g.createContext({outlet:null,matches:[],isDataRoute:!1}),ln=g.createContext(null);un=g.createContext(null);qa=g.createElement(Za,null),tr=class extends g.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?g.createElement(me.Provider,{value:this.props.routeContext},g.createElement(ln.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(rr||(rr={}));(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(Ee||(Ee={}));oo="startTransition",an=g[oo];(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(ne||(ne={}));lo=new Promise(()=>{}),nr=class extends g.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,r){console.error("<Await> caught the following error during render",t,r)}render(){let{children:t,errorElement:r,resolve:n}=this.props,a=null,o=ne.pending;if(!(n instanceof Promise))o=ne.success,a=Promise.resolve(),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_data",{get:()=>n});else if(this.state.error){o=ne.error;let i=this.state.error;a=Promise.reject().catch(()=>{}),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_error",{get:()=>i})}else n._tracked?(a=n,o=a._error!==void 0?ne.error:a._data!==void 0?ne.success:ne.pending):(o=ne.pending,Object.defineProperty(n,"_tracked",{get:()=>!0}),a=n.then(i=>Object.defineProperty(n,"_data",{get:()=>i}),i=>Object.defineProperty(n,"_error",{get:()=>i})));if(o===ne.error&&a._error instanceof de)throw lo;if(o===ne.error&&!r)throw a._error;if(o===ne.error)return g.createElement(Dt.Provider,{value:a,children:r});if(o===ne.success)return g.createElement(Dt.Provider,{value:a,children:t});throw a}}});function Ie(){return Ie=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},Ie.apply(this,arguments)}function mn(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function go(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function vo(e,t){return e.button===0&&(!t||t==="_self")&&!go(e)}function fr(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function Eo(e,t){let r=fr(e);
2if(t)for(let n of t.keys())r.has(n)||t.getAll(n).forEach(a=>{r.append(n,a)});return r}function pn(e,t){return qt({basename:t?.basename,future:Ie({},t?.future,{v7_prependBasename:!0}),history:Gr({window:t?.window}),hydrationData:t?.hydrationData||xo(),routes:e,mapRouteProperties:dn}).initialize()}function xo(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Ie({},t,{errors:So(t.errors)})),t}function So(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&a.__type==="RouteErrorResponse")r[n]=new _e(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let o=window[a.__subType];if(typeof o=="function")try{let i=new o(a.message);i.stack="",r[n]=i}catch{}}if(r[n]==null){let o=new Error(a.message);o.stack="",r[n]=o}}else r[n]=a;return r}function Co(e){let t=T.useContext(we);return t||A(!1),t}function Lo(e){let t=T.useContext(Ne);return t||A(!1),t}function Po(e,t){let{target:r,replace:n,state:a,preventScrollReset:o,relative:i}=t===void 0?{}:t,l=dt(),s=Z(),u=Xe(e,{relative:i});return T.useCallback(c=>{if(vo(c,r)){c.preventDefault();let m=n!==void 0?n:ue(s)===ue(u);l(e,{replace:m,state:a,preventScrollReset:o,relative:i})}},[s,l,u,n,a,r,e,o,i])}function Mo(e){let t=T.useRef(fr(e)),r=T.useRef(!1),n=Z(),a=T.useMemo(()=>Eo(n.search,r.current?null:t.current),[n.search]),o=dt(),i=T.useCallback((l,s)=>{let u=fr(typeof l=="function"?l(a):l);r.current=!0,o("?"+u,s)},[o,a]);return[a,i]}function Rn(e){let{getKey:t,storageKey:r}=e===void 0?{}:e,{router:n}=Co(hr.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:o}=Lo(mr.UseScrollRestoration),{basename:i}=T.useContext(he),l=Z(),s=ft(),u=Ye();T.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),Ao(T.useCallback(()=>{if(u.state==="idle"){let c=(t?t(l,s):null)||l.key;Mt[c]=window.scrollY}sessionStorage.setItem(r||fn,JSON.stringify(Mt)),window.history.scrollRestoration="auto"},[r,t,u.state,l,s])),typeof document<"u"&&(T.useLayoutEffect(()=>{try{let c=sessionStorage.getItem(r||fn);c&&(Mt=JSON.parse(c))}catch{}},[r]),T.useLayoutEffect(()=>{let c=t&&i!=="/"?(R,w)=>t(Ie({},R,{pathname:ve(R.pathname,i)||R.pathname}),w):t,m=n?.enableScrollRestoration(Mt,()=>window.scrollY,c);return()=>m&&m()},[n,i,t]),T.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}if(l.hash){let c=document.getElementById(decodeURIComponent(l.hash.slice(1)));if(c){c.scrollIntoView();return}}o!==!0&&window.scrollTo(0,0)}},[l,a,o]))}function Ao(e,t){let{capture:r}=t||{};T.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,n),()=>{window.removeEventListener("pagehide",e,n)}},[e,r])}var T,wo,bo,_o,Di,No,Do,pr,yn,hr,mr,fn,Mt,De=Jt(()=>{T=Fe(Oe());dr();dr();Je();wo=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],bo=["aria-current","caseSensitive","className","end","style","to","children"];_o="startTransition",Di=T[_o],No=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Do=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pr=T.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:o,replace:i,state:l,target:s,to:u,preventScrollReset:c}=t,m=mn(t,wo),{basename:R}=T.useContext(he),w,v=!1;if(typeof u=="string"&&Do.test(u)&&(w=u,No))try{let O=new URL(window.location.href),D=u.startsWith("//")?new URL(O.protocol+u):new URL(u),d=ve(D.pathname,R);D.origin===O.origin&&d!=null?u=d+D.search+D.hash:v=!0}catch{}let E=Te(u,{relative:a}),b=Po(u,{replace:i,state:l,target:s,preventScrollReset:c,relative:a});function _(O){n&&n(O),O.defaultPrevented||b(O)}return T.createElement("a",Ie({},m,{href:w||E,onClick:v||o?n:_,ref:r,target:s}))}),yn=T.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:a=!1,className:o="",end:i=!1,style:l,to:s,children:u}=t,c=mn(t,bo),m=Xe(s,{relative:c.relative}),R=Z(),w=T.useContext(Ne),{navigator:v}=T.useContext(he),E=v.encodeLocation?v.encodeLocation(m).pathname:m.pathname,b=R.pathname,_=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;a||(b=b.toLowerCase(),_=_?_.toLowerCase():null,E=E.toLowerCase());let O=b===E||!i&&b.startsWith(E)&&b.charAt(E.length)==="/",D=_!=null&&(_===E||!i&&_.startsWith(E)&&_.charAt(E.length)==="/"),d=O?n:void 0,C;typeof o=="function"?C=o({isActive:O,isPending:D}
2):C=[o,O?"active":null,D?"pending":null].filter(Boolean).join(" ");let k=typeof l=="function"?l({isActive:O,isPending:D}):l;return T.createElement(pr,Ie({},c,{"aria-current":d,className:C,ref:r,style:k,to:s}),typeof u=="function"?u({isActive:O,isPending:D}):u)});(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(hr||(hr={}));(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(mr||(mr={}));fn="react-router-scroll-positions",Mt={}});var Ce=Fe(Oe());De();function V(){return V=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},V.apply(this,arguments)}var y=Fe(Oe());De();var U=Fe(Oe());De();var At=class extends U.default.Component{constructor(t){super(t),this.state={error:t.error||null,location:t.location}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location?{error:t.error||null,location:t.location}:{error:t.error||r.error,location:r.location}}render(){return this.state.error?U.default.createElement(this.props.component,{error:this.state.error}):this.props.children}};function Ge({error:e}){return U.default.useEffect(()=>{console.error(e)},[e]),U.default.createElement("html",{lang:"en"},U.default.createElement("head",null,U.default.createElement("meta",{charSet:"utf-8"}),U.default.createElement("meta",{name:"viewport",content:"width=device-width, initial-scale=1, viewport-fit=cover"}),U.default.createElement("title",null,"Application Error!")),U.default.createElement("body",null,U.default.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},U.default.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),e.stack?U.default.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},e.stack):null),U.default.createElement("script",{dangerouslySetInnerHTML:{__html:` 3 console.log( 4 "\u{1F4BF} Hey developer\u{1F44B}. You can provide a way better UX than this when your app throws errors. Check out https://remix.run/guides/errors for more information." 5 ); 6 `}})))}function gn(){let e=ke();if(fe(e))return U.default.createElement(bn,{caught:e});if(e instanceof Error)return U.default.createElement(Ge,{error:e});{let t=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);return U.default.createElement(Ge,{error:new Error(t)})}}var vn=U.default.createContext(void 0);function Fo(){return(0,U.useContext)(vn)}function En({catch:e,component:t,children:r}){return e?U.default.createElement(vn.Provider,{value:e},U.default.createElement(t,null)):U.default.createElement(U.default.Fragment,null,r)}function wn(){let e=Fo();return U.default.createElement(bn,{caught:e})}function bn({caught:e}){return U.default.createElement("html",{lang:"en"},U.default.createElement("head",null,U.default.createElement("meta",{charSet:"utf-8"}),U.default.createElement("meta",{name:"viewport",content:"width=device-width, initial-scale=1, viewport-fit=cover"}),U.default.createElement("title",null,"Unhandled Thrown Response!")),U.default.createElement("body",null,U.default.createElement("h1",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},e.status," ",e.statusText),U.default.createElement("script",{dangerouslySetInnerHTML:{__html:` 7 console.log( 8 "\u{1F4BF} Hey developer\u{1F44B}. You can provide a way better UX than this when your app throws 404s (and other responses). Check out https://remix.run/guides/not-found for more information." 9 ); 10 `}})))}function ce(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}De();async function Ft(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch{return window.location.reload(),new Promise(()=>{})}}function xn(e,t,r){let n=e.map(o=>{var i;let l=t[o.route.id];return((i=l.links)===null||i===void 0?void 0:i.call(l))||[]}).flat(1),a=To(e,r);return ko(n,a)}async function Sn(e){if(!e.links)return;let t=e.links();if(!t)return;let r=[];for(let a of t)!Ot(a)&&a.rel==="stylesheet"&&r.push({...a,rel:"preload",as:"style"});let n=r.filter(a=>(!a.media||window.matchMedia(a.media).matches)&&!document.querySelector(`link[rel="stylesheet"][href="${a.href}"]`));await Promise.all(n.map(Oo))}async function Oo(e){return new Promise(t=>{let r=document.createElement("link");Object.assign(r,e);function n(){document.head.contains(r)&&document.head.removeChild(r)}r.onload=()=>{n(),t()},r.onerror=()=>{n(),t()},document.head.appendChild(r)})}function Ot(e){return e!=null&&typeof e.page=="string"}function Uo(e){return e==null?!1:e.href==null?e.rel==="preload"&&(typeof e.imageSrcSet=="string"||typeof e.imagesrcset=="string")&&(typeof e.imageSizes=="string"||typeof e.imagesizes=="string"):typeof e.rel=="string"&&typeof e.href=="string"}async function _n(e,t,r){return(await Promise.all(e.map(async a=>{let o=await Ft(t.routes[a.route.id],r);return o.links?o.links():[]}))).flat(1).filter(Uo).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="preload"?{...a,rel:"prefetch"}:{...a,rel:"prefetch",as:"style"})}function yr(e,t,r,n,a,o){let i=Cn(e),l=(c,m)=>r[m]?c.route.id!==r[m].route.id:!0,s=(c,m)=>{var R;return r[m].pathname!==c.pathname||((R=r[m].route.path)===null||R===void 0?void 0:R.endsWith("*"))&&r[m].params["*"]!==c.params["*"]};return o==="data"&&a.search!==i.search?t.filter((c,m)=>{if(!n.routes[c.route.id].hasLoader)return!1;if(l(c,m)||s(c,m))return!0;
10if(c.route.shouldRevalidate){var w;let v=c.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((w=r[0])===null||w===void 0?void 0:w.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):t.filter((c,m)=>{let R=n.routes[c.route.id];return(o==="assets"||R.hasLoader)&&(l(c,m)||s(c,m))})}function Nn(e,t,r){let n=Cn(e);return Rr(t.filter(a=>r.routes[a.route.id].hasLoader).map(a=>{let{pathname:o,search:i}=n,l=new URLSearchParams(i);return l.set("_data",a.route.id),`${o}?${l}`}))}function Dn(e,t){return Rr(e.map(r=>{let n=t.routes[r.route.id],a=[n.module];return n.imports&&(a=a.concat(n.imports)),a}).flat(1))}function To(e,t){return Rr(e.map(r=>{let n=t.routes[r.route.id],a=[n.module];return n.imports&&(a=a.concat(n.imports)),a}).flat(1))}function Rr(e){return[...new Set(e)]}function ko(e,t){let r=new Set,n=new Set(t);return e.reduce((a,o)=>{if(!Ot(o)&&o.as==="script"&&o.href&&n.has(o.href))return a;let l=JSON.stringify(o);return r.has(l)||(r.add(l),a.push(o)),a},[])}function Cn(e){let t=ee(e);return t.search===void 0&&(t.search=""),t}var Io={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},jo=/[&><\u2028\u2029]/g;function ht(e){return e.replace(jo,t=>Io[t])}function gr(e){return{__html:e}}function Pn(){let e=y.useContext(we);return ce(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function pt(){let e=y.useContext(Ne);return ce(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var yt=y.createContext(void 0);yt.displayName="Remix";function pe(){let e=y.useContext(yt);return ce(e,"You must render this element inside a <Remix> element"),e}function Mn({id:e}){let{routeModules:t,future:r}=pe();ce(t,`Cannot initialize 'routeModules'. This normally occurs when you have server code in your client modules. 11Check this link for more details: 12https://remix.run/pages/gotchas#server-code-in-client-bundles`);let{default:n,ErrorBoundary:a,CatchBoundary:o}=t[e];return!n&&(a||!r.v2_errorBoundary&&o)&&(n=Pt),ce(n,`Route "${e}" has no component! Please go add a \`default\` export in the route module file. 13If you were trying to navigate or submit to a resource route, use \`<a>\` instead of \`<Link>\` or \`<Form reloadDocument>\`.`),y.createElement(n,null)}function An({id:e}){let{future:t,routeModules:r}=pe();ce(r,`Cannot initialize 'routeModules'. This normally occurs when you have server code in your client modules. 14Check this link for more details: 15https://remix.run/pages/gotchas#server-code-in-client-bundles`);let n=ke(),{CatchBoundary:a,ErrorBoundary:o}=r[e];if(t.v2_errorBoundary){if(e==="root"&&(o||(o=gn)),o)return y.createElement(o,null);throw n}if(e==="root"&&(a||(a=wn),o||(o=Ge)),fe(n)){let i=n;if(i!=null&&i.error&&i.status!==404&&o)return y.createElement(o,{error:i.error});if(a)return y.createElement(En,{catch:n,component:a})}if(n instanceof Error&&o)return y.createElement(o,{error:n});throw n}function Fn(e,t){let[r,n]=y.useState(!1),[a,o]=y.useState(!1),{onFocus:i,onBlur:l,onMouseEnter:s,onMouseLeave:u,onTouchStart:c}=t,m=y.useRef(null);y.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let v=b=>{b.forEach(_=>{o(_.isIntersecting)})},E=new IntersectionObserver(v,{threshold:.5});return m.current&&E.observe(m.current),()=>{E.disconnect()}}},[e]);let R=()=>{e==="intent"&&n(!0)},w=()=>{e==="intent"&&(n(!1),o(!1))};return y.useEffect(()=>{if(r){let v=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(v)}}},[r]),[a,m,{onFocus:mt(i,R),onBlur:mt(l,w),onMouseEnter:mt(s,R),onMouseLeave:mt(u,w),onTouchStart:mt(c,R)}]}var On=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Un=y.forwardRef(({to:e,prefetch:t="none",...r},n)=>{let a=typeof e=="string"&&On.test(e),o=Te(e),[i,l,s]=Fn(t,r);return y.createElement(y.Fragment,null,y.createElement(yn,V({},r,s,{ref:In(n,l),to:e})),i&&!a?y.createElement(Ut,{page:o}):null)});Un.displayName="NavLink";var Tn=y.forwardRef(({to:e,prefetch:t="none",...r},n)=>{let a=typeof e=="string"&&On.test(e),o=Te(e),[i,l,s]=Fn(t,r);return y.createElement(y.Fragment,null,y.createElement(pr,V({},r,s,{ref:In(n,l),to:e})),i&&!a?y.createElement(Ut,{page:o}):null)});Tn.displayName="Link";function mt(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}var Bo="\u26A0\uFE0F REMIX FUTURE CHANGE: The behavior of links `imagesizes` and `imagesrcset` will be changing in v2. Only the React camel case versions will be valid. Please change to `imageSizes` and `imageSrcSet`. For instructions on making this change see https://remix.run/docs/en/v1.15.0/pages/v2#links-imagesizes-and-imagesrcset";function Ho(){let{manifest:e,routeModules:t}=pe(),{errors:r,matches:n}=pt(),a=r?n.slice(0,n.findIndex(i=>r[i.route.id])+1):n,o=y.useMemo(()=>xn(a,t,e),[a,t,e]);return y.useEffect(()=>{o.some(i=>"imagesizes"in i||"imagesrcset"in i)&&void 0},[o]),y.createElement(y.Fragment,null,o.map(i=>{if(Ot(i))return y.createElement(Ut,V({key:i.page},i));let l=null;return"useId"in y?(i.imagesrcset&&(i.imageSrcSet=l=i.imagesrcset,delete i.imagesrcset),i.imagesizes&&(i.imageSizes=i.imagesizes,delete i.imagesizes)
15):(i.imageSrcSet&&(i.imagesrcset=l=i.imageSrcSet,delete i.imageSrcSet),i.imageSizes&&(i.imagesizes=i.imageSizes,delete i.imageSizes)),y.createElement("link",V({key:i.rel+(i.href||"")+(l||"")},i))}))}function Ut({page:e,...t}){let{router:r}=Pn(),n=y.useMemo(()=>re(r.routes,e),[r.routes,e]);return n?y.createElement(zo,V({page:e,matches:n},t)):(console.warn(`Tried to prefetch ${e} but no routes matched.`),null)}function $o(e){let{manifest:t,routeModules:r}=pe(),[n,a]=y.useState([]);return y.useEffect(()=>{let o=!1;return _n(e,t,r).then(i=>{o||a(i)}),()=>{o=!0}},[e,t,r]),n}function zo({page:e,matches:t,...r}){let n=Z(),{manifest:a}=pe(),{matches:o}=pt(),i=y.useMemo(()=>yr(e,t,o,a,n,"data"),[e,t,o,a,n]),l=y.useMemo(()=>yr(e,t,o,a,n,"assets"),[e,t,o,a,n]),s=y.useMemo(()=>Nn(e,i,a),[i,e,a]),u=y.useMemo(()=>Dn(l,a),[l,a]),c=$o(l);return y.createElement(y.Fragment,null,s.map(m=>y.createElement("link",V({key:m,rel:"prefetch",as:"fetch",href:m},r))),u.map(m=>y.createElement("link",V({key:m,rel:"modulepreload",href:m},r))),c.map(m=>y.createElement("link",V({key:m.href},m))))}function Vo(){let{routeModules:e}=pe(),{errors:t,matches:r,loaderData:n}=pt(),a=Z(),o=t?r.slice(0,r.findIndex(s=>t[s.route.id])+1):r,i={},l={};for(let s of o){let u=s.route.id,c=n[u],m=s.params,R=e[u];if(R.meta){let w=typeof R.meta=="function"?R.meta({data:c,parentsData:l,params:m,location:a}):R.meta;if(w&&Array.isArray(w))throw new Error("The route at "+s.route.path+" returns an array. This is only supported with the `v2_meta` future flag in the Remix config. Either set the flag to `true` or update the route's meta function to return an object.\n\nTo reference the v1 meta function API, see https://remix.run/route/meta");Object.assign(i,w)}l[u]=c}return y.createElement(y.Fragment,null,Object.entries(i).map(([s,u])=>{if(!u)return null;if(["charset","charSet"].includes(s))return y.createElement("meta",{key:"charSet",charSet:u});if(s==="title")return y.createElement("title",{key:"title"},String(u));let c=/^(og|music|video|article|book|profile|fb):.+$/.test(s);return[u].flat().map(m=>c?y.createElement("meta",{property:s,content:m,key:s+m}):typeof m=="string"?y.createElement("meta",{name:s,content:m,key:s+m}):y.createElement("meta",V({key:s+JSON.stringify(m)},m)))}))}function Wo(){let{routeModules:e}=pe(),{errors:t,matches:r,loaderData:n}=pt(),a=Z(),o=t?r.slice(0,r.findIndex(u=>t[u.route.id])+1):r,i=[],l=null,s=[];for(let u=0;u<o.length;u++){let c=o[u],m=c.route.id,R=n[m],w=c.params,v=e[m],E=[],b={id:m,data:R,meta:[],params:c.params,pathname:c.pathname,handle:c.route.handle,get route(){return console.warn("The meta function in "+c.route.path+" accesses the `route` property on `matches`. This is deprecated and will be removed in Remix version 2. See"),c.route}};if(s[u]=b,v!=null&&v.meta?E=typeof v.meta=="function"?v.meta({data:R,params:w,location:a,matches:s}):Array.isArray(v.meta)?[...v.meta]:v.meta:l&&(E=[...l]),E=E||[],!Array.isArray(E))throw new Error("The `v2_meta` API is enabled in the Remix config, but the route at "+c.route.path+` returns an invalid value. In v2, all route meta functions must return an array of meta objects. 16 17To reference the v1 meta function API, see https://remix.run/route/meta`);b.meta=E,s[u]=b,i=[...E],l=i}return y.createElement(y.Fragment,null,i.flat().map(u=>{if(!u)return null;if("tagName"in u){let c=u.tagName;return delete u.tagName,Jo(c)?y.createElement(c,V({key:JSON.stringify(u)},u)):(console.warn(`A meta object uses an invalid tagName: ${c}. Expected either 'link' or 'meta'`),null)}if("title"in u)return y.createElement("title",{key:"title"},String(u.title));if("charset"in u&&(u.charSet??(u.charSet=u.charset),delete u.charset),"charSet"in u&&u.charSet!=null)return typeof u.charSet=="string"?y.createElement("meta",{key:"charSet",charSet:u.charSet}):null;if("script:ld+json"in u){let c=null;try{c=JSON.stringify(u["script:ld+json"])}catch{}return c!=null&&y.createElement("script",{key:"script:ld+json",type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(u["script:ld+json"])}})}return y.createElement("meta",V({key:JSON.stringify(u)},u))}))}function Jo(e){return typeof e=="string"&&/^(meta|link)$/.test(e)}function Ko(){let{future:e}=pe();return e!=null&&e.v2_meta?y.createElement(Wo,null):y.createElement(Vo,null)}function kn(e){return y.createElement(cr,e)}var vr=!1;function Xo(e){let{manifest:t,serverHandoffString:r,abortDelay:n,serializeError:a}=pe(),{router:o,static:i,staticContext:l}=Pn(),{matches:s}=pt(),u=Ye();y.useEffect(()=>{vr=!0},[]);let c=(D,d)=>{let C;return a&&d instanceof Error?C=a(d):C=d,`${JSON.stringify(D)}:__remixContext.p(!1, ${ht(JSON.stringify(C))})`},m=(D,d,C)=>{let k;try{k=JSON.stringify(C)}catch(F){return c(d,F)}return`${JSON.stringify(d)}:__remixContext.p(${ht(k)})`},R=(D,d,C)=>{let k;return a&&C instanceof Error?k=a(C):k=C,`__remixContext.r(${JSON.stringify(D)}, ${JSON.stringify(d)}, !1, ${ht(JSON.stringify(k))})`},w=(D,d,C)=>{let k;try{k=JSON.stringify(C)}catch(F){return R(D,d,F)}return`__remixContext.r(${JSON.stringify(D)}, ${JSON.stringify(d)}, ${ht(k)})`},v=[],E=y.useMemo(()=>{var D;let d=l?`window.__remixContext = ${r};`:" ",C=l?.activeDeferreds;d+=C?["__remixContext.p = function(v,e,p,x) {"," if (typeof e !== 'undefined') {",` x=new Error("Unexpected Server Error"); 18 x.stack=undefined;`," p=Promise.reject(x);"," } else {"," p=Promise.resolve(v);"," }"," return p;","};","__remixContext.n = function(i,k) {"," __remixContext.t = __remixContext.t || {};"," __remixContext.t[i] = __remixContext.t[i] || {};"," let p = new Promise((r, e) => {__remixContext.t[i][k] = {r:(v)=>{r(v);},e:(v)=>{e(v);}};});",typeof n=="number"?`setTimeout(() => {if(typeof p._error !== "undefined" || typeof p._data !== "undefined"){return;} __remixContext.t[i][k].e(new Error("Server timeout."))}, ${n});`:""," return p;","};","__remixContext.r = function(i,k,v,e,p,x) {"," p = __remixContext.t[i][k];"," if (typeof e !== 'undefined') {",` x=new Error("Unexpected Server Error"); 19 x.stack=undefined;`," p.e(x);"," } else {"," p.r(v);"," }","};"].join(` 20`)+Object.entries(C).map(([F,J])=>{let te=new Set(J.pendingKeys),ae=J.deferredKeys.map(q=>{if(te.has(q))return v.push(y.createElement(Ln,{key:`${F} | ${q}`,deferredData:J,routeId:F,dataKey:q,scriptProps:e,serializeData:w,serializeError:R})),`${JSON.stringify(q)}:__remixContext.n(${JSON.stringify(F)}, ${JSON.stringify(q)})`;{let $=J.data[q];return typeof $._error<"u"?c(q,$._error):m(F,q,$._data)}}).join(`, 21`);return`Object.assign(__remixContext.state.loaderData[${JSON.stringify(F)}], {${ae}});`}).join(` 22`)+(v.length>0?`__remixContext.a=${v.length};`:""):"";let k=i?`${(D=t.hmr)!==null&&D!==void 0&&D.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}import ${JSON.stringify(t.url)}; 23${s.map((F,J)=>`import * as route${J} from ${JSON.stringify(t.routes[F.route.id].module)};`).join(` 24`)} 25window.__remixRouteModules = {${s.map((F,J)=>`${JSON.stringify(F.route.id)}:route${J}`).join(",")}}; 26 27import(${JSON.stringify(t.entry.module)});`:" ";return y.createElement(y.Fragment,null,y.createElement("script",V({},e,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:gr(d),type:void 0})),y.createElement("script",V({},e,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:gr(k),type:"module",async:!0})))},[]);if(!i&&typeof __remixContext=="object"&&__remixContext.a)for(let D=0;D<__remixContext.a;D++)v.push(y.createElement(Ln,{key:D,scriptProps:e,serializeData:w,serializeError:R}));let b=y.useMemo(()=>
27{if(u.location){let D=re(o.routes,u.location);return ce(D,`No routes match path "${u.location.pathname}"`),D}return[]},[u.location,o.routes]),_=s.concat(b).map(D=>{let d=t.routes[D.route.id];return(d.imports||[]).concat([d.module])}).flat(1),O=vr?[]:t.entry.imports.concat(_);return vr?null:y.createElement(y.Fragment,null,y.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin}),Go(O).map(D=>y.createElement("link",{key:D,rel:"modulepreload",href:D,crossOrigin:e.crossOrigin})),E,v)}function Ln({dataKey:e,deferredData:t,routeId:r,scriptProps:n,serializeData:a,serializeError:o}){return typeof document>"u"&&t&&e&&r&&ce(t.pendingKeys.includes(e),`Deferred data for route ${r} with key ${e} was not pending but tried to render a script for it.`),y.createElement(y.Suspense,{fallback:typeof document>"u"&&t&&e&&r?null:y.createElement("script",V({},n,{async:!0,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:" "}}))},typeof document>"u"&&t&&e&&r?y.createElement(kn,{resolve:t.data[e],errorElement:y.createElement(Yo,{dataKey:e,routeId:r,scriptProps:n,serializeError:o}),children:i=>y.createElement("script",V({},n,{async:!0,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:a(r,e,i)}}))}):y.createElement("script",V({},n,{async:!0,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:" "}})))}function Yo({dataKey:e,routeId:t,scriptProps:r,serializeError:n}){let a=Lt();return y.createElement("script",V({},r,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:n(t,e,a)}}))}function Go(e){return[...new Set(e)]}function Er(){let{routeModules:e}=pe(),t=ft();return y.useMemo(()=>t.map(r=>({id:r.id,pathname:r.pathname,params:r.params,data:r.data,handle:e[r.id].handle})),[t,e])}function Qo(){return ir()}function In(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}Je();function jn(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&a.__type==="RouteErrorResponse")r[n]=new _e(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let o=window[a.__subType];if(typeof o=="function")try{let i=new o(a.message);i.stack=a.stack,r[n]=i}catch{}}if(r[n]==null){let o=new Error(a.message);o.stack=a.stack,r[n]=o}}else r[n]=a;return r}var br=Fe(Oe());De();Je();function Hn(e){return e.headers.get("X-Remix-Catch")!=null}function Zo(e){return e.headers.get("X-Remix-Error")!=null}function qo(e){return ei(e)&&e.status>=400&&e.headers.get("X-Remix-Error")==null&&e.headers.get("X-Remix-Catch")==null&&e.headers.get("X-Remix-Response")==null}function $n(e){return e.headers.get("X-Remix-Redirect")!=null}function zn(e){var t;return!!((t=e.headers.get("Content-Type"))!==null&&t!==void 0&&t.match(/text\/remix-deferred/))}function ei(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}async function wr(e,t,r=0){let n=new URL(e.url);n.searchParams.set("_data",t);let a={signal:e.signal};if(e.method!=="GET"){a.method=e.method;let l=e.headers.get("Content-Type");l&&/\bapplication\/json\b/.test(l)?(a.headers={"Content-Type":l},a.body=JSON.stringify(await e.json())):l&&/\btext\/plain\b/.test(l)?(a.headers={"Content-Type":l},a.body=await e.text()):l&&/\bapplication\/x-www-form-urlencoded\b/.test(l)?a.body=new URLSearchParams(await e.text()):a.body=await e.formData()}r>0&&await new Promise(l=>setTimeout(l,5**r*10));let o=window.__remixRevalidation,i=await fetch(n.href,a).catch(l=>{if(typeof o=="number"&&o===window.__remixRevalidation&&l?.name==="TypeError"&&r<3)return wr(e,t,r+1);throw l});if(Zo(i)){let l=await i.json(),s=new Error(l.message);return s.stack=l.stack,s}if(qo(i)){let l=await i.text(),s=new Error(l);return s.stack=void 0,s}return i}var ti="__deferred_promise:";async function Vn(e){if(!e)throw new Error("parseDeferredReadableStream requires stream argument");let t,r={};try{let n=ri(e),o=(await n.next()).value;if(!o)throw new Error("no critical data");let i=JSON.parse(o);if(typeof i=="object"&&i!==null)for(let[l,s]of Object.entries(i))typeof s!="str
27ing"||!s.startsWith(ti)||(t=t||{},t[l]=new Promise((u,c)=>{r[l]={resolve:m=>{u(m),delete r[l]},reject:m=>{c(m),delete r[l]}}}));return(async()=>{try{for await(let l of n){let[s,...u]=l.split(":"),c=u.join(":"),m=JSON.parse(c);if(s==="data")for(let[R,w]of Object.entries(m))r[R]&&r[R].resolve(w);else if(s==="error")for(let[R,w]of Object.entries(m)){let v=new Error(w.message);v.stack=w.stack,r[R]&&r[R].reject(v)}}for(let[l,s]of Object.entries(r))s.reject(new de(`Deferred ${l} will never be resolved`))}catch(l){for(let s of Object.values(r))s.reject(l)}})(),new bt({...i,...t})}catch(n){for(let a of Object.values(r))a.reject(n);throw n}}async function*ri(e){let t=e.getReader(),r=[],n=[],a=!1,o=new TextEncoder,i=new TextDecoder,l=async()=>{if(n.length>0)return n.shift();for(;!a&&n.length===0;){let u=await t.read();if(u.done){a=!0;break}r.push(u.value);try{let m=i.decode(Bn(...r)).split(` 28 29`);if(m.length>=2&&(n.push(...m.slice(0,-1)),r=[o.encode(m.slice(-1).join(` 30 31`))]),n.length>0)break}catch{continue}}return n.length>0||r.length>0&&(n=i.decode(Bn(...r)).split(` 32 33`).filter(c=>c),r=[]),n.shift()},s=await l();for(;s;)yield s,s=await l()}function Bn(...e){let t=new Uint8Array(e.reduce((n,a)=>n+a.length,0)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}function ni(e){let t={};return Object.values(e).forEach(r=>{let n=r.parentId||"";t[n]||(t[n]=[]),t[n].push(r)}),t}function xr(e,t,r,n="",a=ni(e),o){return(a[n]||[]).map(i=>{let l=r.v2_errorBoundary===!0?i.id==="root"||i.hasErrorBoundary:i.id==="root"||i.hasCatchBoundary||i.hasErrorBoundary,s={caseSensitive:i.caseSensitive,element:br.createElement(Mn,{id:i.id}),errorElement:l?br.createElement(An,{id:i.id}):void 0,id:i.id,index:i.index,path:i.path,handle:void 0,loader:Wn(i,t,!1),action:Wn(i,t,!0),shouldRevalidate:ai(i,t,o)},u=xr(e,t,r,i.id,a,o);return u.length>0&&(s.children=u),s})}function ai(e,t,r){let n=!1;return function(a){let o=t[e.id];return ce(o,`Expected route module to be loaded for ${e.id}`),r!==void 0&&!n?(n=!0,r.has(e.id)):o.shouldRevalidate?o.shouldRevalidate(a):a.defaultShouldRevalidate}}async function oi(e,t){let r=await Ft(e,t);return await Sn(r),r}function Wn(e,t,r){return async({request:n})=>{let a=oi(e,t);try{if(r&&!e.hasAction){let i=`Route "${e.id}" does not have an action, but you are trying to submit to it. To fix this, please add an \`action\` function to the route`;throw console.error(i),new Error(i)}else if(!r&&!e.hasLoader)return null;let o=await wr(n,e.id);if(o instanceof Error)throw o;if($n(o))throw ii(o);if(Hn(o))throw o;return zn(o)&&o.body?await Vn(o.body):o}finally{await a}}}function ii(e){let t=parseInt(e.headers.get("X-Remix-Status"),10)||302,r=e.headers.get("X-Remix-Redirect"),n={},a=e.headers.get("X-Remix-Revalidate");return a&&(n["X-Remix-Revalidate"]=a),_t(r,{status:t,headers:n})}var Qe;var Sr,dl=new Promise(e=>{Sr=e}).catch(()=>{});function li(e){if(!Qe){let n=xr(window.__remixManifest.routes,window.__remixRouteModules,window.__remixContext.future),a=window.__remixContext.state;a&&a.errors&&(a={...a,errors:jn(a.errors)}),Qe=pn(n,{hydrationData:a,future:{v7_normalizeFormMethod:window.__remixContext.future.v2_normalizeFormMethod}});let o=window.__remixContext.url,i=window.location.pathname;if(o!==i){let l=`Initial URL (${o}) does not match URL at time of hydration (${i}), reloading page...`;console.error(l),window.location.reload()}Sr&&Sr(Qe)}let[t,r]=Ce.useState(Qe.state.location);return Ce.useLayoutEffect(()=>Qe.subscribe(n=>{n.location!==t&&r(n.location)}),[t]),Ce.createElement(yt.Provider,{value:{manifest:window.__remixManifest,routeModules:window.__remixRouteModules,future:window.__remixContext.future}},Ce.createElement(At,{location:t,component:Ge},Ce.createElement(sr,{router:Qe,fallbackElement:null,future:{v7_startTransition:!0}})))}De();var Tt=Fe(Oe());De();var Jn="positions";function si({getKey:e,...t}){let r=Z(),n=Er();Rn({getKey:e,storageKey:Jn});let a=Tt.useMemo(()=>{if(!e)return null;let i=e(r,n);return i!==r.key?i:null},[]),o=((i,l)=>{if(!window.history.state||!window.history.state.key){let s=Math.random().toString(32).slice(2);window.history.replaceState({key:s},"")}try{let u=JSON.parse(sessionStorage.getItem(i)||"{}")[l||window.history.state.key];typeof u=="number"&&window.scrollTo(0,u)}catch(s){console.error(s),sessionStorage.removeItem(i)}}).toString();return Tt.createElement("script",V({},t,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${o})(${JSON.stringify(Jn)}, ${JSON.stringify(a)})`}}))}export{Z as a,dt as b,cn as c,Ye as d,Pt as e,Mo as f,Tn as g,Ho as h,Ko as i,Xo as j,Qo as k,li as l,si as m}; 34/*! Bundled license information: 35 36@remix-run/router/dist/router.js: 37 (** 38 * @remix-run/router v1.7.2 39 * 40 * Copyright (c) Remix Software Inc. 41 * 42 * This source code is licensed under the MIT license found in the 43 * LICENSE.md file in the root directory of this source tree. 44 * 45 * @license MIT 46 *) 47 48react-router/dist/index.js: 49 (** 50 * React Router v6.14.2 51 * 52 * Copyright (c) Remix Software Inc. 53 * 54 * This source code is licensed under the MIT license found in the 55 * LICENSE.md file in the root directory of this source tree. 56 * 57 * @license MIT 58 *) 59 60react-router-dom/dist/index.js: 61 (** 62 * React Router DOM v6.14.2 63 * 64 * Copyright (c) Remix Software Inc. 65 * 66 * This source code is licensed under the MIT license found in the 67 * LICENSE.md file in the root directory of this source tree. 68 * 69 * @license MIT 70 *) 71 72@remix-run/react/dist/esm/_virtual/_rollupPluginBabelHelpers.js: 73 (** 74 * @remix-run/react v1.19.3 75 * 76 * Copyright (c) Remix Software Inc. 77 * 78 * This source code is licensed under the MIT license found in the 79 * LICENSE.md file in the root directory of this source tree. 80 * 81 * @license MIT 82 *) 83 84@remix-run/react/dist/esm/errorBoundaries.js: 85 (** 86 * @remix-run/react v1.19.3 87 * 88 * Copyright (c) Remix Software Inc. 89 * 90 * This source code is licensed under the MIT license found in the 91 * LICENSE.md file in the root directory of this source tree. 92 * 93 * @license MIT 94 *) 95 96@remix-run/react/dist/esm/invariant.js: 97 (** 98 * @remix-run/react v1.19.3 99 * 100 * Copyright (c) Remix Software Inc. 101 * 102 * This source code is licensed under the MIT license found in the 103 * LICENSE.md file in the root directory of this source tree. 104 * 105 * @license MIT 106 *) 107 108@remix-run/react/dist/esm/routeModules.js: 109 (** 110 * @remix-run/react v1.19.3 111 * 112 * Copyright (c) Remix Software Inc. 113 * 114 * This source code is licensed under the MIT license found in the 115 * LICENSE.md file in the root directory of this source tree. 116 * 117 * @license MIT 118 *) 119 120@remix-run/react/dist/esm/links.js: 121 (** 122 * @remix-run/react v1.19.3 123 * 124 * Copyright (c) Remix Software Inc. 125 * 126 * This source code is licensed under the MIT license found in the 127 * LICENSE.md file in the root directory of this source tree. 128 * 129 * @license MIT 130 *) 131 132@remix-run/react/dist/esm/markup.js: 133 (** 134 * @remix-run/react v1.19.3 135 * 136 * Copyright (c) Remix Software Inc. 137 * 138 * This source code is licensed under the MIT license found in the 139 * LICENSE.md file in the root directory of this source tree. 140 * 141 * @license MIT 142 *) 143 144@remix-run/react/dist/esm/components.js: 145 (** 146 * @remix-run/react v1.19.3 147 * 148 * Copyright (c) Remix Software Inc. 149 * 150 * This source code is licensed under the MIT license found in the 151 * LICENSE.md file in the root directory of this source tree. 152 * 153 * @license MIT 154 *) 155 156@remix-run/react/dist/esm/errors.js: 157 (** 158 * @remix-run/react v1.19.3 159 * 160 * Copyright (c) Remix Software Inc. 161 * 162 * This source code is licensed under the MIT license found in the 163 * LICENSE.md file in the root directory of this source tree. 164 * 165 * @license MIT 166 *) 167 168@remix-run/react/dist/esm/data.js: 169 (** 170 * @remix-run/react v1.19.3 171 * 172 * Copyright (c) Remix Software Inc. 173 * 174 * This source code is licensed under the MIT license found in the 175 * LICENSE.md file in the root directory of this source tree. 176 * 177 * @license MIT 178 *) 179 180@remix-run/react/dist/esm/routes.js: 181 (** 182 * @remix-run/react v1.19.3 183 * 184 * Copyright (c) Remix Software Inc. 185 * 186 * This source code is licensed under the MIT license found in the 187 * LICENSE.md file in the root directory of this source tree. 188 * 189 * @license MIT 190 *) 191 192@remix-run/react/dist/esm/browser.js: 193 (** 194 * @remix-run/react v1.19.3 195 * 196 * Copyright (c) Remix Software Inc. 197 * 198 * This source code is licensed under the MIT license found in the 199 * LICENSE.md file in the root directory of this source tree. 200 * 201 * @license MIT 202 *) 203 204@remix-run/react/dist/esm/scroll-restoration.js: 205 (** 206 * @remix-run/react v1.19.3 207 * 208 * Copyright (c) Remix Software Inc. 209 * 210 * This source code is licensed under the MIT license found in the 211 * LICENSE.md file in the root directory of this source tree. 212 * 213 * @license MIT 214 *) 215 216@remix-run/react/dist/esm/index.js: 217 (** 218 * @remix-run/react v1.19.3 219 * 220 * Copyright (c) Remix Software Inc. 221 * 222 * This source code is licensed under the MIT license found in the 223 * LICENSE.md file in the root directory of this source tree. 224 * 225 * @license MIT 226 *) 227*/
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.