vendor: 3,043 bytes, line 1
1import{b as Xt}from"/build/_shared/chunk-ZRCR2KKS.js";import{b as gt,e as Gt}from"/build/_shared/chunk-ADMCF34Z.js";function I(){return I=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},I.apply(this,arguments)}function hr(e){e===void 0&&(e={});function t(n,a){let{pathname:o,search:i,hash:u}=n.location;return Ke("",{pathname:o,search:i,hash:u},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:ne(a)}return $r(t,r,null,e)}function _(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Le(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Wr(){return Math.random().toString(36).substr(2,8)}function Zt(e,t){return{usr:e.state,key:e.key,idx:t}}function Ke(e,t,r,n){return r===void 0&&(r=null),I({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?X(t):t,{state:r,key:t&&t.key||n||Wr()})}function ne(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 X(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 $r(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,u=j.Pop,l=null,f=h();f==null&&(f=0,i.replaceState(I({},i.state,{idx:f}),""));function h(){return(i.state||{idx:null}).idx}function v(){u=j.Pop;let R=h(),N=R==null?null:R-f;f=R,l&&l({action:u,location:b.location,delta:N})}function y(R,N){u=j.Push;let F=Ke(b.location,R,N);r&&r(F,R),f=h()+1;let T=Zt(F,f),c=b.createHref(F);try{i.pushState(T,"",c)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;a.location.assign(c)}o&&l&&l({action:u,location:b.location,delta:1})}function D(R,N){u=j.Replace;let F=Ke(b.location,R,N);r&&r(F,R),f=h();let T=Zt(F,f),c=b.createHref(F);i.replaceState(T,"",c),o&&l&&l({action:u,location:b.location,delta:0})}function w(R){let N=a.location.origin!=="null"?a.location.origin:a.location.href,F=typeof R=="string"?R:ne(R);return _(N,"No window.location.(origin|href) available to create URL for href: "+F),new URL(F,N)}let b={get action(){return u},get location(){return e(a,i)},listen(R){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(Qt,v),l=R,()=>{a.removeEventListener(Qt,v),l=null}},createHref(R){return t(a,R)},createURL:w,encodeLocation(R){let N=w(R);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:y,replace:D,go(R){return i.go(R)}};return b}function Jr(e){return e.index===!0}function Et(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,o)=>{let i=[...r,o],u=typeof a.id=="string"?a.id:i.join("-");if(_(a.index!==!0||!a.children,"Cannot specify children on an index route"),_(!n[u],'Found a route id collision on i
1d "'+u+`". Route id's must be globally unique within Data Router usages`),Jr(a)){let l=I({},a,t(a),{id:u});return n[u]=l,l}else{let l=I({},a,t(a),{id:u,children:void 0});return n[u]=l,a.children&&(l.children=Et(a.children,t,i,n)),l}})}function ue(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?X(t):t,a=ce(n.pathname||"/",r);if(a==null)return null;let o=pr(e);qr(o);let i=null;for(let u=0;i==null&&u<o.length;++u)i=an(o[u],ln(a));return i}function pr(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(o,i,u)=>{let l={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};l.relativePath.startsWith("/")&&(_(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let f=te([n,l.relativePath]),h=r.concat(l);o.children&&o.children.length>0&&(_(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),pr(o.children,t,h,f)),!(o.path==null&&!o.index)&&t.push({path:f,score:rn(f,o.index),routesMeta:h})};return e.forEach((o,i)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))a(o,i);else for(let l of mr(o.path))a(o,i,l)}),t}function mr(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=mr(n.join("/")),u=[];return u.push(...i.map(l=>l===""?o:[o,l].join("/"))),a&&u.push(...i),u.map(l=>e.startsWith("/")&&l===""?"/":l)}function qr(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:nn(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}function rn(e,t){let r=e.split("/"),n=r.length;return r.some(er)&&(n+=tn),t&&(n+=Qr),r.filter(a=>!er(a)).reduce((a,o)=>a+(Gr.test(o)?Xr:o===""?Zr:en),n)}function nn(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 an(e,t){let{routesMeta:r}=e,n={},a="/",o=[];for(let i=0;i<r.length;++i){let u=r[i],l=i===r.length-1,f=a==="/"?t:t.slice(a.length)||"/",h=et({path:u.relativePath,caseSensitive:u.caseSensitive,end:l},f);if(!h)return null;
1Object.assign(n,h.params);let v=u.route;o.push({params:n,pathname:te([a,h.pathname]),pathnameBase:cn(te([a,h.pathnameBase])),route:v}),h.pathnameBase!=="/"&&(a=te([a,h.pathnameBase]))}return o}function et(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=on(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),u=a.slice(1);return{params:n.reduce((f,h,v)=>{if(h==="*"){let y=u[v]||"";i=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}return f[h]=sn(u[v]||"",h),f},{}),pathname:o,pathnameBase:i,pattern:e}}function on(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Le(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,u)=>(n.push(u),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function ln(e){try{return decodeURI(e)}catch(t){return Le(!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 sn(e,t){try{return decodeURIComponent(e)}catch(r){return Le(!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 ce(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 St(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?X(e):e;return{pathname:r?r.startsWith("/")?r:un(r,t):t,search:dn(n),hash:fn(a)}}function un(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 yt(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 We(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function tt(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=X(e):(a=I({},e),_(!a.pathname||!a.pathname.includes("?"),yt("?","pathname","search",a)),_(!a.pathname||!a.pathname.includes("#"),yt("#","pathname","hash",a)),_(!a.search||!a.search.includes("#"),yt("#","search","hash",a)));let o=e===""||a.pathname==="",i=o?"/":a.pathname,u;if(n||i==null)u=r;else{let v=t.length-1;if(i.startsWith("..")){let y=i.split("/");for(;y[0]==="..";)y.shift(),v-=1;a.pathname=y.join("/")}u=v>=0?t[v]:"/"}let l=St(a,u),f=i&&i!=="/"&&i.endsWith("/"),h=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(f||h)&&(l.pathname+="/"),l}function hn(e){return e instanceof Promise&&e._tracked===!0}function pn(e){if(!hn(e))return e;if(e._error)throw e._error;return e._data}function $e(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Dt(e){let t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;_(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let s=e.detectErrorBoundary;a=d=>({hasErrorBoundary:s(d)})}else a=bn;let o={},i=Et(e.routes,a,void 0,o),u,l=e.basename||"/",f=I({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),h=null,v=new Set,y=null,D=null,w=null,b=e.hydrationData!=null,R=ue(i,e.history.location,l),N=null;if(R==null){let s=G(404,{pathname:e.history.location.pathname}),{matches:d,route:p}=ur(i);R=d,N={[p.id]:s}}let F=!R.some(s=>s.route.lazy)&&(!R.some(s=>s.route.loader)||e.hydrationData!=null),T,c={historyAction:e.history.action,location:e.history.location,matches:R,initialized:F,navigation:Rt,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||N,fetchers:new Map,blockers:new Map},L=j.Pop,K=!1,k,Q=!1,q=!1,re=[],Se=[],V=new Map,qe=0,Me=-1,De=new Map,ie=new Set,xe=new Map,ge=new Map,ye=new Map,st=!1;function Lr(){return h=e.history.listen(s=>{let{action:d,location:p,delta:g}=s;if(st){st=!1;return}Le(ye.size===0||g!=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 P=$t({currentLocation:c.location,nextLocation:p,historyAction:d});if(P&&g!=null){st=!0,e.history.go(g*-1),Xe(P,{state:"blocked",location:p,proceed(){Xe(P,{state:"proceeding",proceed:void 0,reset:void 0,location:p}),e.history.go(g)},reset(){let x=new Map(c.blockers);x.set(P,Ce),W({blockers:x})}});return}return he(d,p)}),c.initialized||he(j.Pop,c.location),T}
1function Ur(){h&&h(),v.clear(),k&&k.abort(),c.fetchers.forEach((s,d)=>ct(d)),c.blockers.forEach((s,d)=>Wt(d))}function Ar(s){return v.add(s),()=>v.delete(s)}function W(s){c=I({},c,s),v.forEach(d=>d(c))}function Te(s,d){var p,g;let P=c.actionData!=null&&c.navigation.formMethod!=null&&ee(c.navigation.formMethod)&&c.navigation.state==="loading"&&((p=s.state)==null?void 0:p._isRedirect)!==!0,x;d.actionData?Object.keys(d.actionData).length>0?x=d.actionData:x=null:P?x=c.actionData:x=null;let C=d.loaderData?sr(c.loaderData,d.loaderData,d.matches||[],d.errors):c.loaderData,S=c.blockers;S.size>0&&(S=new Map(S),S.forEach((M,Y)=>S.set(Y,Ce)));let E=K===!0||c.navigation.formMethod!=null&&ee(c.navigation.formMethod)&&((g=s.state)==null?void 0:g._isRedirect)!==!0;u&&(i=u,u=void 0),Q||L===j.Pop||(L===j.Push?e.history.push(s,s.state):L===j.Replace&&e.history.replace(s,s.state)),W(I({},d,{actionData:x,loaderData:C,historyAction:L,location:s,initialized:!0,navigation:Rt,revalidation:"idle",restoreScrollPosition:Jt(s,d.matches||c.matches),preventScrollReset:E,blockers:S})),L=j.Pop,K=!1,Q=!1,q=!1,re=[],Se=[]}async function kt(s,d){if(typeof s=="number"){e.history.go(s);return}let p=bt(c.location,c.matches,l,f.v7_prependBasename,s,d?.fromRouteId,d?.relative),{path:g,submission:P,error:x}=rr(f.v7_normalizeFormMethod,!1,p,d),C=c.location,S=Ke(c.location,g,d&&d.state);S=I({},S,e.history.encodeLocation(S));let E=d&&d.replace!=null?d.replace:void 0,M=j.Push;E===!0?M=j.Replace:E===!1||P!=null&&ee(P.formMethod)&&P.formAction===c.location.pathname+c.location.search&&(M=j.Replace);let Y=d&&"preventScrollReset"in d?d.preventScrollReset===!0:void 0,A=$t({currentLocation:C,nextLocation:S,historyAction:M});if(A){Xe(A,{state:"blocked",location:S,proceed(){Xe(A,{state:"proceeding",proceed:void 0,reset:void 0,location:S}),kt(s,d)},reset(){let B=new Map(c.blockers);B.set(A,Ce),W({blockers:B})}});return}return await he(M,S,{submission:P,pendingError:x,preventScrollReset:Y,replace:d&&d.replace})}function Or(){if(ut(),W({revalidation:"loading"}),c.navigation.state!=="submitting"){if(c.navigation.state==="idle"){he(c.historyAction,c.location,{startUninterruptedRevalidation:!0});return}he(L||c.historyAction,c.navigation.location,{overrideNavigation:c.navigation})}}async function he(s,d,p){k&&k.abort(),k=null,L=s,Q=(p&&p.startUninterruptedRevalidation)===!0,Hr(c.location,c.matches),K=(p&&p.preventScrollReset)===!0;let g=u||i,P=p&&p.overrideNavigation,x=ue(g,d,l);if(!x){let B=G(404,{pathname:d.pathname}),{matches:$,route:Re}=ur(g);dt(),Te(d,{matches:$,loaderData:{},errors:{[Re.id]:B}});return}if(c.initialized&&!q&&xn(c.location,d)&&!(p&&p.submission&&ee(p.submission.formMethod))){Te(d,{matches:x});return}k=new AbortController;let C=Ve(e.history,d,k.signal,p&&p.submission),S,E;if(p&&p.pendingError)E={[_e(x).route.id]:p.pendingError};else if(p&&p.submission&&ee(p.submission.formMethod)){let B=await Mr(C,d,p.submission,x,{replace:p.replace});if(B.shortCircuited)return;S=B.pendingActionData,E=B.pendingActionError,P=Ze(d,p.submission),C=new Request(C.url,{signal:C.signal})}let{shortCircuited:M,loaderData:Y,errors:A}=await Tr(C,d,x,P,p&&p.submission,p&&p.fetcherSubmission,p&&p.replace,S,E);M||(k=null,Te(d,I({matches:x},S?{actionData:S}:{},{loaderData:Y,errors:A})))}async function Mr(s,d,p,g,P){P===void 0&&(P={}),ut();let x=Ln(d,p);W({navigation:x});let C,S=Nt(g,d);if(!S.route.action&&!S.route.lazy)C={type:z.error,error:G(405,{method:s.method,pathname:d.pathname,routeId:S.route.id})};else if(C=await Be("action",s,S,g,o,a,l),s.signal.aborted)return{shortCircuited:!0};if(Fe(C)){let E;return P&&P.replace!=null?E=P.replace:E=C.location===c.location.pathname+c.location.search,await Ie(c,C,{submission:p,replace:E}),{shortCircuited:!0}}if(ze(C)){let E=_e(g,S.route.id);return(P&&P.replace)!==!0&&(L=j.Push),{pendingActionData:{},pendingActionError:{[E.route.id]:C.error}}}if(be(C))throw G(400,{type:"defer-action"});return{pendingActionData:{[S.route.id]:C.data}}}async function Tr(s,d,p,g,P,x,C,S,E){let M=g||Ze(d,P),Y=P||x||fr(M),A=u||i,[B,$]=nr(e.history,c,p,Y,d,q,re,Se,xe,ie,A,l,S,E);if(dt(O=>!(p&&p.some(Z=>Z.route.id===O))||B&&B.some(Z=>Z.route.id===O)),Me=++qe,B.length===0&&$.length===0){let O=zt();return Te(d,I({matches:p,loaderData:{},errors:E||null},S?{actionData:S}:{},O?{fetchers:new Map(c.fetchers)}:{})),{shortCircuited:!0}}if(!Q){$.forEach(Z=>{let me=c.fetchers.get(Z.key),vt=He(void 0,me?me.data:void 0);c.fetchers.set(Z.key,vt)});let O=S||c.actionData;W(I({navigation:M},O?Object.keys(O).length===0?{actionData:null}:{actionData:O}:{},$.length>0?{fetchers:new Map(c.fetchers)}:{}))}$.forEach(O=>{V.has(O.key)&&pe(O.key),O.controller&&V.set(O.key,O.controller)});let Re=()=>$.forEach(O=>pe(O.key));k&&k.signal.addEventListener("abort",Re);let{results:Ee,loaderResults:je,fetcherResults:ft}=await Vt(c.matches,p,B,$,s);if(s.signal.aborted)return{shortCircuited:!0};k&&k.signal.removeEventListener("abort",Re),$.forEach(O=>V.delete(O.key));let le=cr(Ee);if(le){if(le.idx>=B.length){let O=$[le.idx-B.length].key;ie.add(O)}return await Ie(c,le.result,{replace:C}),{shortCircuited:!0}}let{loaderData:se,errors:Qe}=lr(c,p,B,je,E,$,ft,ge);ge.forEach((O,Z)=>{O.subscribe(me=>{(me||O.done)&&ge.delete(Z)})});let ht=zt(),pt=Kt(Me),mt=ht||pt||$.length>0;return I({loaderData:se,errors:Qe},mt?{fetchers:new Map(c.fetchers)}:{})}function Bt(s){return c.fetchers.get(s)||En}function Ir(s,d,p,g){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.");V.has(s)&&pe(s);
1let P=u||i,x=bt(c.location,c.matches,l,f.v7_prependBasename,p,d,g?.relative),C=ue(P,x,l);if(!C){Ge(s,d,G(404,{pathname:x}));return}let{path:S,submission:E,error:M}=rr(f.v7_normalizeFormMethod,!0,x,g);if(M){Ge(s,d,M);return}let Y=Nt(C,S);if(K=(g&&g.preventScrollReset)===!0,E&&ee(E.formMethod)){jr(s,d,S,Y,C,E);return}xe.set(s,{routeId:d,path:S}),kr(s,d,S,Y,C,E)}async function jr(s,d,p,g,P,x){if(ut(),xe.delete(s),!g.route.action&&!g.route.lazy){let H=G(405,{method:x.formMethod,pathname:p,routeId:d});Ge(s,d,H);return}let C=c.fetchers.get(s),S=Un(x,C);c.fetchers.set(s,S),W({fetchers:new Map(c.fetchers)});let E=new AbortController,M=Ve(e.history,p,E.signal,x);V.set(s,E);let Y=qe,A=await Be("action",M,g,P,o,a,l);if(M.signal.aborted){V.get(s)===E&&V.delete(s);return}if(Fe(A))if(V.delete(s),Me>Y){let H=Pe(void 0);c.fetchers.set(s,H),W({fetchers:new Map(c.fetchers)});return}else{ie.add(s);let H=He(x);return c.fetchers.set(s,H),W({fetchers:new Map(c.fetchers)}),Ie(c,A,{submission:x,isFetchActionRedirect:!0})}if(ze(A)){Ge(s,d,A.error);return}if(be(A))throw G(400,{type:"defer-action"});let B=c.navigation.location||c.location,$=Ve(e.history,B,E.signal),Re=u||i,Ee=c.navigation.state!=="idle"?ue(Re,c.navigation.location,l):c.matches;_(Ee,"Didn't find any matches after fetcher action");let je=++qe;De.set(s,je);let ft=He(x,A.data);c.fetchers.set(s,ft);let[le,se]=nr(e.history,c,Ee,x,B,q,re,Se,xe,ie,Re,l,{[g.route.id]:A.data},void 0);se.filter(H=>H.key!==s).forEach(H=>{let ke=H.key,qt=c.fetchers.get(ke),Kr=He(void 0,qt?qt.data:void 0);c.fetchers.set(ke,Kr),V.has(ke)&&pe(ke),H.controller&&V.set(ke,H.controller)}),W({fetchers:new Map(c.fetchers)});let Qe=()=>se.forEach(H=>pe(H.key));E.signal.addEventListener("abort",Qe);let{results:ht,loaderResults:pt,fetcherResults:mt}=await Vt(c.matches,Ee,le,se,$);if(E.signal.aborted)return;E.signal.removeEventListener("abort",Qe),De.delete(s),V.delete(s),se.forEach(H=>V.delete(H.key));let O=cr(ht);if(O){if(O.idx>=le.length){let H=se[O.idx-le.length].key;ie.add(H)}return Ie(c,O.result)}let{loaderData:Z,errors:me}=lr(c,c.matches,le,pt,void 0,se,mt,ge);if(c.fetchers.has(s)){let H=Pe(A.data);c.fetchers.set(s,H)}let vt=Kt(je);c.navigation.state==="loading"&&je>Me?(_(L,"Expected pending action"),k&&k.abort(),Te(c.navigation.location,{matches:Ee,loaderData:Z,errors:me,fetchers:new Map(c.fetchers)})):(W(I({errors:me,loaderData:sr(c.loaderData,Z,Ee,me)},vt||se.length>0?{fetchers:new Map(c.fetchers)}:{})),q=!1)}async function kr(s,d,p,g,P,x){let C=c.fetchers.get(s),S=He(x,C?C.data:void 0);c.fetchers.set(s,S),W({fetchers:new Map(c.fetchers)});let E=new AbortController,M=Ve(e.history,p,E.signal);V.set(s,E);let Y=qe,A=await Be("loader",M,g,P,o,a,l);if(be(A)&&(A=await br(A,M.signal,!0)||A),V.get(s)===E&&V.delete(s),M.signal.aborted)return;if(Fe(A))if(Me>Y){let $=Pe(void 0);c.fetchers.set(s,$),W({fetchers:new Map(c.fetchers)});return}else{ie.add(s),await Ie(c,A);return}if(ze(A)){let $=_e(c.matches,d);c.fetchers.delete(s),W({fetchers:new Map(c.fetchers),errors:{[$.route.id]:A.error}});return}_(!be(A),"Unhandled fetcher deferred data");let B=Pe(A.data);c.fetchers.set(s,B),W({fetchers:new Map(c.fetchers)})}async function Ie(s,d,p){let{submission:g,replace:P,isFetchActionRedirect:x}=p===void 0?{}:p;d.revalidate&&(q=!0);let C=Ke(s.location,d.location,I({_isRedirect:!0},x?{_isFetchActionRedirect:!0}:{}));if(_(C,"Expected a location on the redirect navigation"),yr.test(d.location)&&r){let M=e.history.createURL(d.location),Y=ce(M.pathname,l)==null;if(t.location.origin!==M.origin||Y){P?t.location.replace(d.location):t.location.assign(d.location);return}}k=null;let S=P===!0?j.Replace:j.Push,E=g||fr(s.navigation);if(Rn.has(d.status)&&E&&ee(E.formMethod))await he(S,C,{submission:I({},E,{formAction:d.location}),preventScrollReset:K});else if(x)await he(S,C,{overrideNavigation:Ze(C),fetcherSubmission:E,preventScrollReset:K});else{let M=Ze(C,E);await he(S,C,{overrideNavigation:M,preventScrollReset:K})}}async function Vt(s,d,p,g,P){let x=await Promise.all([...p.map(E=>Be("loader",P,E,d,o,a,l)),...g.map(E=>
1E.matches&&E.match&&E.controller?Be("loader",Ve(e.history,E.path,E.controller.signal),E.match,E.matches,o,a,l):{type:z.error,error:G(404,{pathname:E.path})})]),C=x.slice(0,p.length),S=x.slice(p.length);return await Promise.all([dr(s,p,C,C.map(()=>P.signal),!1,c.loaderData),dr(s,g.map(E=>E.match),S,g.map(E=>E.controller?E.controller.signal:null),!0)]),{results:x,loaderResults:C,fetcherResults:S}}function ut(){q=!0,re.push(...dt()),xe.forEach((s,d)=>{V.has(d)&&(Se.push(d),pe(d))})}function Ge(s,d,p){let g=_e(c.matches,d);ct(s),W({errors:{[g.route.id]:p},fetchers:new Map(c.fetchers)})}function ct(s){let d=c.fetchers.get(s);V.has(s)&&!(d&&d.state==="loading"&&De.has(s))&&pe(s),xe.delete(s),De.delete(s),ie.delete(s),c.fetchers.delete(s)}function pe(s){let d=V.get(s);_(d,"Expected fetch controller: "+s),d.abort(),V.delete(s)}function Ht(s){for(let d of s){let p=Bt(d),g=Pe(p.data);c.fetchers.set(d,g)}}function zt(){let s=[],d=!1;for(let p of ie){let g=c.fetchers.get(p);_(g,"Expected fetcher: "+p),g.state==="loading"&&(ie.delete(p),s.push(p),d=!0)}return Ht(s),d}function Kt(s){let d=[];for(let[p,g]of De)if(g<s){let P=c.fetchers.get(p);_(P,"Expected fetcher: "+p),P.state==="loading"&&(pe(p),De.delete(p),d.push(p))}return Ht(d),d.length>0}function Br(s,d){let p=c.blockers.get(s)||Ce;return ye.get(s)!==d&&ye.set(s,d),p}function Wt(s){c.blockers.delete(s),ye.delete(s)}function Xe(s,d){let p=c.blockers.get(s)||Ce;_(p.state==="unblocked"&&d.state==="blocked"||p.state==="blocked"&&d.state==="blocked"||p.state==="blocked"&&d.state==="proceeding"||p.state==="blocked"&&d.state==="unblocked"||p.state==="proceeding"&&d.state==="unblocked","Invalid blocker state transition: "+p.state+" -> "+d.state);let g=new Map(c.blockers);g.set(s,d),W({blockers:g})}function $t(s){let{currentLocation:d,nextLocation:p,historyAction:g}=s;if(ye.size===0)return;ye.size>1&&Le(!1,"A router only supports one blocker at a time");let P=Array.from(ye.entries()),[x,C]=P[P.length-1],S=c.blockers.get(x);if(!(S&&S.state==="proceeding")&&C({currentLocation:d,nextLocation:p,historyAction:g}))return x}function dt(s){let d=[];return ge.forEach((p,g)=>{(!s||s(g))&&(p.cancel(),d.push(g),ge.delete(g))}),d}function Vr(s,d,p){if(y=s,w=d,D=p||null,!b&&c.navigation===Rt){b=!0;let g=Jt(c.location,c.matches);g!=null&&W({restoreScrollPosition:g})}return()=>{y=null,w=null,D=null}}function Yt(s,d){return D&&D(s,d.map(g=>Fn(g,c.loaderData)))||s.key}function Hr(s,d){if(y&&w){let p=Yt(s,d);y[p]=w()}}function Jt(s,d){if(y){let p=Yt(s,d),g=y[p];if(typeof g=="number")return g}return null}function zr(s){o={},u=Et(s,a,void 0,o)}return T={get basename(){return l},get state(){return c},get routes(){return i},initialize:Lr,subscribe:Ar,enableScrollRestoration:Vr,navigate:kt,fetch:Ir,revalidate:Or,createHref:s=>e.history.createHref(s),encodeLocation:s=>e.history.encodeLocation(s),getFetcher:Bt,deleteFetcher:ct,dispose:Ur,getBlocker:Br,deleteBlocker:Wt,_internalFetchControllers:V,_internalActiveDeferreds:ge,_internalSetRoutes:zr},T}function wn(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function bt(e,t,r,n,a,o,i){let u,l;if(o!=null&&i!=="path"){u=[];for(let h of t)if(u.push(h),h.route.id===o){l=h;break}}else u=t,l=t[t.length-1];let f=tt(a||".",We(u).map(h=>h.pathnameBase),ce(e.pathname,r)||e.pathname,i==="path");return a==null&&(f.search=e.search,f.hash=e.hash),(a==null||a===""||a===".")&&l&&l.route.index&&!xt(f.search)&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(f.pathname=f.pathname==="/"?r:te([r,f.pathname])),ne(f)}function rr(e,t,r,n){if(!n||!wn(n))return{path:r};if(n.formMethod&&!_n(n.formMethod))return{path:r,error:G(405,{method:n.formMethod})};let a=()=>({path:r,error:G(400,{type:"invalid-body"})}),o=n.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),u=Er(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!ee(i))return a();let y=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((D,w)=>{let[b,R]=w;return""+D+b+"="+R+` 2`},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:u,formEncType:n.formEncType,formData:void 0,json:void 0,text:y}}}else if(n.formEncType==="application/json"){if(!ee(i))return a();
2try{let y=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:u,formEncType:n.formEncType,formData:void 0,json:y,text:void 0}}}catch{return a()}}}_(typeof FormData=="function","FormData is not available in this environment");let l,f;if(n.formData)l=wt(n.formData),f=n.formData;else if(n.body instanceof FormData)l=wt(n.body),f=n.body;else if(n.body instanceof URLSearchParams)l=n.body,f=ir(l);else if(n.body==null)l=new URLSearchParams,f=new FormData;else try{l=new URLSearchParams(n.body),f=ir(l)}catch{return a()}let h={formMethod:i,formAction:u,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:f,json:void 0,text:void 0};if(ee(h.formMethod))return{path:r,submission:h};let v=X(r);return t&&v.search&&xt(v.search)&&l.append("index",""),v.search="?"+l,{path:ne(v),submission:h}}function Nn(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 nr(e,t,r,n,a,o,i,u,l,f,h,v,y,D){let w=D?Object.values(D)[0]:y?Object.values(y)[0]:void 0,b=e.createURL(t.location),R=e.createURL(a),N=D?Object.keys(D)[0]:void 0,T=Nn(r,N).filter((L,K)=>{if(L.route.lazy)return!0;if(L.route.loader==null)return!1;if(Sn(t.loaderData,t.matches[K],L)||i.some(q=>q===L.route.id))return!0;let k=t.matches[K],Q=L;return ar(L,I({currentUrl:b,currentParams:k.params,nextUrl:R,nextParams:Q.params},n,{actionResult:w,defaultShouldRevalidate:o||b.pathname+b.search===R.pathname+R.search||b.search!==R.search||Rr(k,Q)}))}),c=[];return l.forEach((L,K)=>{if(!r.some(Se=>Se.route.id===L.routeId))return;let k=ue(h,L.path,v);if(!k){c.push({key:K,routeId:L.routeId,path:L.path,matches:null,match:null,controller:null});return}let Q=t.fetchers.get(K),q=Nt(k,L.path),re=!1;f.has(K)?re=!1:u.includes(K)?re=!0:Q&&Q.state!=="idle"&&Q.data===void 0?re=o:re=ar(q,I({currentUrl:b,currentParams:t.matches[t.matches.length-1].params,nextUrl:R,nextParams:r[r.length-1].params},n,{actionResult:w,defaultShouldRevalidate:o})),re&&c.push({key:K,routeId:L.routeId,path:L.path,matches:k,match:q,controller:new AbortController})}),[T,c]}function Sn(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function Rr(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function ar(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function or(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];_(a,"No route found in manifest");let o={};for(let i in n){let l=a[i]!==void 0&&i!=="hasErrorBoundary";Le(!l,'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.')),!l&&!Yr.has(i)&&(o[i]=n[i])}Object.assign(a,o),Object.assign(a,I({},t(a),{lazy:void 0}))}async function Be(e,t,r,n,a,o,i,u){u===void 0&&(u={});let l,f,h,v=w=>{let b,R=new Promise((N,F)=>b=F);return h=()=>b(),t.signal.addEventListener("abort",h),Promise.race([w({request:t,params:r.params,context:u.requestContext}),R])};try{let w=r.route[e];if(r.route.lazy)if(w)f=(await Promise.all([v(w),or(r.route,o,a)]))[0];else if(await or(r.route,o,a),w=r.route[e],w)f=await v(w);else if(e==="action"){let b=new URL(t.url),R=b.pathname+b.search;throw G(405,{method:t.method,pathname:R,routeId:r.route.id})}else return{type:z.data,data:void 0};else if(w)f=await v(w);else{let b=new URL(t.url),R=b.pathname+b.search;throw G(404,{pathname:R})}_(f!==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){l=z.error,f=w}finally{h&&t.signal.removeEventListener("abort",h)}if(Pn(f)){let w=f.status;if(yn.has(w)){let N=f.headers.get("Location");if(_(N,"Redirects returned/thrown from loaders/actions must have a Location header"),!yr.test(N))N=bt(new URL(t.url),n.slice(0,n.indexOf(r)+1),i,!0,N);else if(!u.isStaticRequest){let F=new URL(t.url),T=N.startsWith("//")?new URL(F.protocol+N):new URL(N),c=ce(T.pathname,i)!=null;
2T.origin===F.origin&&c&&(N=T.pathname+T.search+T.hash)}if(u.isStaticRequest)throw f.headers.set("Location",N),f;return{type:z.redirect,status:w,location:N,revalidate:f.headers.get("X-Remix-Revalidate")!==null}}if(u.isRouteRequest)throw{type:l||z.data,response:f};let b,R=f.headers.get("Content-Type");return R&&/\bapplication\/json\b/.test(R)?b=await f.json():b=await f.text(),l===z.error?{type:l,error:new Ue(w,f.statusText,b),headers:f.headers}:{type:z.data,data:b,statusCode:f.status,headers:f.headers}}if(l===z.error)return{type:l,error:f};if(Cn(f)){var y,D;return{type:z.deferred,deferredData:f,statusCode:(y=f.init)==null?void 0:y.status,headers:((D=f.init)==null?void 0:D.headers)&&new Headers(f.init.headers)}}return{type:z.data,data:f}}function Ve(e,t,r,n){let a=e.createURL(Er(t)).toString(),o={signal:r};if(n&&ee(n.formMethod)){let{formMethod:i,formEncType:u}=n;o.method=i.toUpperCase(),u==="application/json"?(o.headers=new Headers({"Content-Type":u}),o.body=JSON.stringify(n.json)):u==="text/plain"?o.body=n.text:u==="application/x-www-form-urlencoded"&&n.formData?o.body=wt(n.formData):o.body=n.formData}return new Request(a,o)}function wt(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function ir(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Dn(e,t,r,n,a){let o={},i=null,u,l=!1,f={};return r.forEach((h,v)=>{let y=t[v].route.id;if(_(!Fe(h),"Cannot handle redirect results in processLoaderData"),ze(h)){let D=_e(e,y),w=h.error;n&&(w=Object.values(n)[0],n=void 0),i=i||{},i[D.route.id]==null&&(i[D.route.id]=w),o[y]=void 0,l||(l=!0,u=$e(h.error)?h.error.status:500),h.headers&&(f[y]=h.headers)}else be(h)?(a.set(y,h.deferredData),o[y]=h.deferredData.data):o[y]=h.data,h.statusCode!=null&&h.statusCode!==200&&!l&&(u=h.statusCode),h.headers&&(f[y]=h.headers)}),n&&(i=n,o[Object.keys(n)[0]]=void 0),{loaderData:o,errors:i,statusCode:u||200,loaderHeaders:f}}function lr(e,t,r,n,a,o,i,u){let{loaderData:l,errors:f}=Dn(t,r,n,a,u);for(let h=0;h<o.length;h++){let{key:v,match:y,controller:D}=o[h];_(i!==void 0&&i[h]!==void 0,"Did not find corresponding fetcher result");let w=i[h];if(!(D&&D.signal.aborted))if(ze(w)){let b=_e(e.matches,y?.route.id);f&&f[b.route.id]||(f=I({},f,{[b.route.id]:w.error})),e.fetchers.delete(v)}else if(Fe(w))_(!1,"Unhandled fetcher revalidation redirect");else if(be(w))_(!1,"Unhandled fetcher deferred data");else{let b=Pe(w.data);e.fetchers.set(v,b)}}return{loaderData:l,errors:f}}function sr(e,t,r,n){let a=I({},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 _e(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 ur(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 G(e,t){let{pathname:r,routeId:n,method:a,type:o}=t===void 0?{}:t,i="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(i="Bad Request",a&&r&&n?u="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"?u="defer() is not supported in actions":o==="invalid-body"&&(u="Unable to encode submission body")):e===403?(i="Forbidden",u='Route "'+n+'" does not match URL "'+r+'"'):e===404?(i="Not Found",u='No route matches URL "'+r+'"'):e===405&&(i="Method Not Allowed",a&&r&&n?u="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&&(u='Invalid request method "'+a.toUpperCase()+'"')),new Ue(e||500,i,new Error(u),!0)}function cr(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Fe(r))return{result:r,idx:t}}}function Er(e){let t=typeof e=="string"?X(e):e;return ne(I({},t,{hash:""}))}function xn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function be(e){return e.type===z.deferred}function ze(e){return e.type===z.error}function Fe(e){return(e&&e.type)===z.redirect}function Cn(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 Pn(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function _n(e){return gn.has(e.toLowerCase())}function ee(e){return mn.has(e.toLowerCase())}async function dr(e,t,r,n,a,o){for(let i=0;i<r.length;i++){let u=r[i],l=t[i];if(!l)continue;let f=e.find(v=>v.route.id===l.route.id),h=f!=null&&!Rr(f,l)&&(o&&o[l.route.id])!==void 0;if(be(u)&&(a||h)){let v=n[i];_(v,"Expected an AbortSignal for revalidating fetcher deferred result"),await br(u,v,a).then(y=>{y&&(r[i]=y||r[i])})}}}async function br(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:z.data,data:e.deferredData.unwrappedData}
2}catch(a){return{type:z.error,error:a}}return{type:z.data,data:e.deferredData.data}}}function xt(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Fn(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 Nt(e,t){let r=typeof t=="string"?X(t).search:t.search;if(e[e.length-1].route.index&&xt(r||""))return e[e.length-1];let n=We(e);return n[n.length-1]}function fr(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(!(!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 Ze(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 Ln(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function He(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t," _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 Un(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 Pe(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 j,Qt,z,Yr,Gr,Xr,Qr,Zr,en,tn,er,te,cn,dn,fn,ve,tr,vr,Ue,gr,mn,vn,gn,yn,Rn,Rt,En,Ce,yr,bn,Ea,rt=gt(()=>{(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(j||(j={}));Qt="popstate";(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(z||(z={}));Yr=new Set(["lazy","caseSensitive","path","id","index","children"]);Gr=/^:\w+$/,Xr=3,Qr=2,Zr=1,en=10,tn=-2,er=e=>e==="*";te=e=>e.join("/").replace(/\/\/+/g,"/"),cn=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),dn=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,fn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,ve=class extends Error{},tr=class{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],_(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((o,i)=>n=i),this.controller=new AbortController;let a=()=>n(new ve("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[u,l]=i;return Object.assign(o,{[u]:this.trackPromise(u,l)})},{}),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 ve)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}
2),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 _(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]:pn(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}};vr=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,I({},n,{headers:a}))},Ue=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}};gr=["post","put","patch","delete"],mn=new Set(gr),vn=["get",...gr],gn=new Set(vn),yn=new Set([301,302,303,307,308]),Rn=new Set([307,308]),Rt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},En={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ce={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},yr=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bn=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)});Ea=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 Ft(e,t){let{relative:r}=t===void 0?{}:t;Oe()||_(!1);let{basename:n,navigator:a}=m.useContext(ae),{hash:o,pathname:i,search:u}=Je(e,{relative:r}),l=i;return n!=="/"&&(l=i==="/"?n:te([n,i])),a.createHref({pathname:l,search:u,hash:o})}function Oe(){return m.useContext(Ye)!=null}function fe(){return Oe()||_(!1),m.useContext(Ye).location}function Sr(e){m.useContext(ae).static||m.useLayoutEffect(e)}function ot(){let{isDataRoute:e}=m.useContext(oe);return e?Yn():Tn()}function Tn(){Oe()||_(!1);let e=m.useContext(we),{basename:t,navigator:r}=m.useContext(ae),{matches:n}=m.useContext(oe),{pathname:a}=fe(),o=JSON.stringify(We(n).map(l=>l.pathnameBase)),i=m.useRef(!1);return Sr(()=>{i.current=!0}),m.useCallback(function(l,f){if(f===void 0&&(f={}),!i.current)return;if(typeof l=="number"){r.go(l);return}let h=tt(l,JSON.parse(o),a,f.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:te([t,h.pathname])),(f.replace?r.replace:r.push)(h,f.state,f)},[t,r,o,a,e])}function Dr(e){let t=m.useContext(oe).outlet;return t&&m.createElement(In.Provider,{value:e},t)}function Je(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=m.useContext(oe),{pathname:a}=fe(),o=JSON.stringify(We(n).map(i=>i.pathnameBase));return m.useMemo(()=>tt(e,JSON.parse(o),a,r==="path"),[e,o,a,r])}function jn(e,t,r){Oe()||_(!1);let{navigator:n}=m.useContext(ae),{matches:a}=m.useContext(oe),o=a[a.length-1],i=o?o.params:{},u=o?o.pathname:"/",l=o?o.pathnameBase:"/",f=o&&o.route,h=fe(),v;if(t){var y;let N=typeof t=="string"?X(t):t;l==="/"||(y=N.pathname)!=null&&y.startsWith(l)||_(!1),v=N}else v=h;let D=v.pathname||"/",w=l==="/"?D:D.slice(l.length)||"/",b=ue(e,{pathname:w}),R=Hn(b&&b.map(N=>Object.assign({},N,{params:Object.assign({},i,N.params),pathname:te([l,n.encodeLocation?n.encodeLocation(N.pathname).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?l:te([l,n.encodeLocation?n.encodeLocation(N.pathnameBase).pathname:N.pathnameBase])})),a,r);return t&&R?m.createElement(Ye.Provider,{value:{location:nt({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:j.Pop}},R):R}function kn(){let e=xr(),t=$e(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 m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application
2Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),r?m.createElement("pre",{style:a},r):null,null)}function Vn(e){let{routeContext:t,match:r,children:n}=e,a=m.useContext(we);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),m.createElement(oe.Provider,{value:t},n)}function Hn(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 u=o.findIndex(l=>l.route.id&&i?.[l.route.id]);u>=0||_(!1),o=o.slice(0,Math.min(o.length,u+1))}return o.reduceRight((u,l,f)=>{let h=l.route.id?i?.[l.route.id]:null,v=null;r&&(v=l.route.errorElement||Bn);let y=t.concat(o.slice(0,f+1)),D=()=>{let w;return h?w=v:l.route.Component?w=m.createElement(l.route.Component,null):l.route.element?w=l.route.element:w=u,m.createElement(Vn,{match:l,routeContext:{outlet:u,matches:y,isDataRoute:r!=null},children:w})};return r&&(l.route.ErrorBoundary||l.route.errorElement||f===0)?m.createElement(Ct,{location:r.location,revalidation:r.revalidation,component:v,error:h,children:D(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):D()},null)}function zn(e){let t=m.useContext(we);return t||_(!1),t}function it(e){let t=m.useContext(Ae);return t||_(!1),t}function Kn(e){let t=m.useContext(oe);return t||_(!1),t}function Lt(e){let t=Kn(e),r=t.matches[t.matches.length-1];return r.route.id||_(!1),r.route.id}function Ut(){return it(de.UseNavigation).navigation}function At(){let{matches:e,loaderData:t}=it(de.UseMatches);return m.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 Wn(){let e=it(de.UseLoaderData),t=Lt(de.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function xr(){var e;let t=m.useContext(Nr),r=it(de.UseRouteError),n=Lt(de.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function Cr(){let e=m.useContext(at);return e?._data}function $n(){let e=m.useContext(at);return e?._error}function Yn(){let{router:e}=zn(Pt.UseNavigateStable),t=Lt(de.UseNavigateStable),r=m.useRef(!1);return Sr(()=>{r.current=!0}),m.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 qn(e){let{fallbackElement:t,router:r,future:n}=e,[a,o]=m.useState(r.state),{v7_startTransition:i}=n||{},u=m.useCallback(v=>{i&&wr?wr(()=>o(v)):o(v)},[o,i]);m.useLayoutEffect(()=>r.subscribe(u),[r,u]);let l=m.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:v=>r.navigate(v),push:(v,y,D)=>r.navigate(v,{state:y,preventScrollReset:D?.preventScrollReset}),replace:(v,y,D)=>r.navigate(v,{replace:!0,state:y,preventScrollReset:D?.preventScrollReset})}),[r]),f=r.basename||"/",h=m.useMemo(()=>({router:r,navigator:l,static:!1,basename:f}),[r,l,f]);return m.createElement(m.Fragment,null,m.createElement(we.Provider,{value:h},m.createElement(Ae.Provider,{value:a},m.createElement(Ot,{basename:f,location:a.location,navigationType:a.historyAction,navigator:l},a.initialized?m.createElement(Gn,{routes:r.routes,state:a}):t))),null)}function Gn(e){let{routes:t,state:r}=e;return jn(t,void 0,r)}function Xn(e){return Dr(e.context)}function Ot(e){let{basename:t="/",children:r=null,location:n,navigationType:a=j.Pop,navigator:o,static:i=!1}=e;Oe()&&_(!1);let u=t.replace(/^\/*/,"/"),l=m.useMemo(()=>({basename:u,navigator:o,static:i}),[u,o,i]);typeof n=="string"&&(n=X(n));let{pathname:f="/",search:h="",hash:v="",state:y=null,key:D="default"}=n,w=m.useMemo(()=>{let b=ce(f,u);return b==null?null:{location:{pathname:b,search:h,hash:v,state:y,key:D},navigationType:a}},[u,f,h,v,y,D,a]);return w==null?null:m.createElement(ae.Provider,{value:l},m.createElement(Ye.Provider,{children:r,value:w}))}function Qn(e){let{children:t,errorElement:r,resolve:n}=e;return m.createElement(_t,{resolve:n,errorElement:r},m.createElement(ea,null,t))}function ea(e){let{children:t}
2=e,r=Cr(),n=typeof t=="function"?t(r):t;return m.createElement(m.Fragment,null,n)}function Pr(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:m.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:m.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}var m,we,Ae,at,ae,Ye,oe,Nr,In,Bn,Ct,Pt,de,Jn,wr,J,Zn,_t,Mt=gt(()=>{m=Gt(Xt());rt();rt();we=m.createContext(null),Ae=m.createContext(null),at=m.createContext(null),ae=m.createContext(null),Ye=m.createContext(null),oe=m.createContext({outlet:null,matches:[],isDataRoute:!1}),Nr=m.createContext(null);In=m.createContext(null);Bn=m.createElement(kn,null),Ct=class extends m.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?m.createElement(oe.Provider,{value:this.props.routeContext},m.createElement(Nr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(Pt||(Pt={}));(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"})(de||(de={}));Jn="startTransition",wr=m[Jn];(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(J||(J={}));Zn=new Promise(()=>{}),_t=class extends m.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=J.pending;if(!(n instanceof Promise))o=J.success,a=Promise.resolve(),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_data",{get:()=>n});else if(this.state.error){o=J.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?J.error:a._data!==void 0?J.success:J.pending):(o=J.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===J.error&&a._error instanceof ve)throw Zn;if(o===J.error&&!r)throw a._error;if(o===J.error)return m.createElement(at.Provider,{value:a,children:r});if(o===J.success)return m.createElement(at.Provider,{value:a,children:t});throw a}}});function Ne(){return Ne=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},Ne.apply(this,arguments)}function Fr(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 aa(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function oa(e,t){return e.button===0&&(!t||t==="_self")&&!aa(e)}function Tt(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 ia(e,t){let r=Tt(e);if(t)for(let n of t.keys())r.has(n)||t.getAll(n).forEach(a=>{r.append(n,a)});return r}function Wa(e,t){return Dt({basename:t?.basename,future:Ne({}
2,t?.future,{v7_prependBasename:!0}),history:hr({window:t?.window}),hydrationData:t?.hydrationData||ua(),routes:e,mapRouteProperties:Pr}).initialize()}function ua(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Ne({},t,{errors:ca(t.errors)})),t}function ca(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 Ue(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 ma(e){let t=U.useContext(we);return t||_(!1),t}function va(e){let t=U.useContext(Ae);return t||_(!1),t}function ga(e,t){let{target:r,replace:n,state:a,preventScrollReset:o,relative:i}=t===void 0?{}:t,u=ot(),l=fe(),f=Je(e,{relative:i});return U.useCallback(h=>{if(oa(h,r)){h.preventDefault();let v=n!==void 0?n:ne(l)===ne(f);u(e,{replace:v,state:a,preventScrollReset:o,relative:i})}},[l,u,f,n,a,r,e,o,i])}function Ja(e){let t=U.useRef(Tt(e)),r=U.useRef(!1),n=fe(),a=U.useMemo(()=>ia(n.search,r.current?null:t.current),[n.search]),o=ot(),i=U.useCallback((u,l)=>{let f=Tt(typeof u=="function"?u(a):u);r.current=!0,o("?"+f,l)},[o,a]);return[a,i]}function qa(e){let{getKey:t,storageKey:r}=e===void 0?{}:e,{router:n}=ma(It.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:o}=va(jt.UseScrollRestoration),{basename:i}=U.useContext(ae),u=fe(),l=At(),f=Ut();U.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),ya(U.useCallback(()=>{if(f.state==="idle"){let h=(t?t(u,l):null)||u.key;lt[h]=window.scrollY}sessionStorage.setItem(r||_r,JSON.stringify(lt)),window.history.scrollRestoration="auto"},[r,t,f.state,u,l])),typeof document<"u"&&(U.useLayoutEffect(()=>{try{let h=sessionStorage.getItem(r||_r);h&&(lt=JSON.parse(h))}catch{}},[r]),U.useLayoutEffect(()=>{let h=t&&i!=="/"?(y,D)=>t(Ne({},y,{pathname:ce(y.pathname,i)||y.pathname}),D):t,v=n?.enableScrollRestoration(lt,()=>window.scrollY,h);return()=>v&&v()},[n,i,t]),U.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}if(u.hash){let h=document.getElementById(decodeURIComponent(u.hash.slice(1)));if(h){h.scrollIntoView();return}}o!==!0&&window.scrollTo(0,0)}},[u,a,o]))}function ya(e,t){let{capture:r}=t||{};U.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,n),()=>{window.removeEventListener("pagehide",e,n)}},[e,r])}var U,la,sa,da,$a,fa,ha,pa,Ya,It,jt,_r,lt,Ra=gt(()=>{U=Gt(Xt());Mt();Mt();rt();la=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],sa=["aria-current","caseSensitive","className","end","style","to","children"];da="startTransition",$a=U[da],fa=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ha=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pa=U.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:o,replace:i,state:u,target:l,to:f,preventScrollReset:h}=t,v=Fr(t,la),{basename:y}=U.useContext(ae),D,w=!1;if(typeof f=="string"&&ha.test(f)&&(D=f,fa))try{let F=new URL(window.location.href),T=f.startsWith("//")?new URL(F.protocol+f):new URL(f),c=ce(T.pathname,y);T.origin===F.origin&&c!=null?f=c+T.search+T.hash:w=!0}catch{}let b=Ft(f,{relative:a}),R=ga(f,{replace:i,state:u,target:l,preventScrollReset:h,relative:a});function N(F){n&&n(F),F.defaultPrevented||R(F)}return U.createElement("a",Ne({},v,{href:D||b,onClick:w||o?n:N,ref:r,target:l}))}),Ya=U.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:a=!1,className:o="",end:i=!1,style:u,to:l,children:f}=t,h=Fr(t,sa),v=Je(l,{relative:h.relative}),y=fe(),D=U.useContext(Ae),{navigator:w}=U.useContext(ae),b=w.encodeLocation?w.encodeLocation(v).pathname:v.pathname,R=y.pathname,N=D&&D.navigation&&D.navigation.location?D.navigation.location.pathname:null;a||(R=R.toLowerCase(),N=N?N.toLowerCase():null,b=b.toLowerCase());let F=R===b||!i&&R.startsWith(b)&&R.charAt(b.length)==="/",T=N!=null&&(N===b||!i&&N.startsWith(b)&&N.charAt(b.length)==="/"),c=F?n:void 0,L;typeof o=="function"?L=o({isActive:F,isPending:T}
2):L=[o,F?"active":null,T?"pending":null].filter(Boolean).join(" ");let K=typeof u=="function"?u({isActive:F,isPending:T}):u;return U.createElement(pa,Ne({},h,{"aria-current":c,className:L,ref:r,style:K,to:l}),typeof f=="function"?f({isActive:F,isPending:T}):f)});(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(It||(It={}));(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(jt||(jt={}));_r="react-router-scroll-positions",lt={}});export{X as a,ue as b,ve as c,tr as d,vr as e,Ue as f,$e as g,rt as h,we as i,Ae as j,Ft as k,fe as l,ot as m,Ut as n,At as o,Wn as p,xr as q,$n as r,qn as s,Xn as t,Qn as u,Wa as v,pa as w,Ya as x,Ja as y,qa as z,Ra as A}; 3/*! Bundled license information: 4 5@remix-run/router/dist/router.js: 6 (** 7 * @remix-run/router v1.7.2 8 * 9 * Copyright (c) Remix Software Inc. 10 * 11 * This source code is licensed under the MIT license found in the 12 * LICENSE.md file in the root directory of this source tree. 13 * 14 * @license MIT 15 *) 16 17react-router/dist/index.js: 18 (** 19 * React Router v6.14.2 20 * 21 * Copyright (c) Remix Software Inc. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE.md file in the root directory of this source tree. 25 * 26 * @license MIT 27 *) 28 29react-router-dom/dist/index.js: 30 (** 31 * React Router DOM v6.14.2 32 * 33 * Copyright (c) Remix Software Inc. 34 * 35 * This source code is licensed under the MIT license found in the 36 * LICENSE.md file in the root directory of this source tree. 37 * 38 * @license MIT 39 *) 40*/
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.