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