1import{d as f,a as Qt}from"./digital_next__loadShare__react__loadShare__-_Hi1eCiE.js";import{R as _n}from"./digital_next__loadShare__react_mf_2_dom__loadShare__-Bj52uMrz.js";import"./preload-helper-DfZQVC28.js";import"./_commonjsHelpers-BosuxZz1.js";import"./digital_next__mf_v__runtimeInit__mf_v__-CETsqmeW.js";/** 2 * @remix-run/router v1.23.2 3 * 4 * Copyright (c) Remix Software Inc. 5 * 6 * This source code is licensed under the MIT license found in the 7 * LICENSE.md file in the root directory of this source tree. 8 * 9 * @license MIT 10 */function K(){return K=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},K.apply(this,arguments)}var V;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(V||(V={}));const br="popstate";function zr(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:r,v5Compat:n=!1}=e,a;a=t.map((g,w)=>h(g,typeof g=="string"?null:g.state,w===0?"default":void 0));let o=l(r??a.length-1),i=V.Pop,s=null;function l(g){return Math.min(Math.max(g,0),a.length-1)}function c(){return a[o]}function h(g,w,E){w===void 0&&(w=null);let R=ke(a?c().pathname:"/",g,w,E);return ve(R.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(g)),R}function m(g){return typeof g=="string"?g:ge(g)}return{get index(){return o},get action(){return i},get location(){return c()},createHref:m,createURL(g){return new URL(m(g),"http://localhost")},encodeLocation(g){let w=typeof g=="string"?he(g):g;return{pathname:w.pathname||"",search:w.search||"",hash:w.hash||""}},push(g,w){i=V.Push;let E=h(g,w);o+=1,a.splice(o,a.length,E),n&&s&&s({action:i,location:E,delta:1})},replace(g,w){i=V.Replace;let E=h(g,w);a[o]=E,n&&s&&s({action:i,location:E,delta:0})},go(g){i=V.Pop;let w=l(o+g),E=a[w];o=w,s&&s({action:i,location:E,delta:g})},listen(g){return s=g,()=>{s=null}}}}function Hr(e){e===void 0&&(e={});function t(n,a){let{pathname:o,search:i,hash:s}=n.location;return ke("",{pathname:o,search:i,hash:s},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:ge(a)}return Kr(t,r,null,e)}function Wr(e){e===void 0&&(e={});function t(a,o){let{pathname:i="/",search:s="",hash:l=""}=he(a.location.hash.substr(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),ke("",{pathname:i,search:s,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(a,o){let i=a.document.querySelector("base"),s="";if(i&&i.getAttribute("href")){let l=a.location.href,c=l.indexOf("#");s=c===-1?l:l.slice(0,c)}return s+"#"+(typeof o=="string"?o:ge(o))}function n(a,o){ve(a.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return Kr(t,r,n,e)}function M(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ve(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Fn(){return Math.random().toString(36).substr(2,8)}function wr(e,t){return{usr:e.state,key:e.key,idx:t}}function ke(e,t,r,n){return r===void 0&&(r=null),K({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?he(t):t,{state:r,key:t&&t.key||n||Fn()})}function ge(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 he(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 Kr(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,s=V.Pop,l=null,c=h();c==null&&(c=0,i.replaceState(K({},i.state,{idx:c}),""));function h(){return(i.state||{idx:null}).idx}function m(){s=V.Pop;let R=h(),I=R==null?null:R-c;c=R,l&&l({action:s,location:E.location,delta:I})}function y(R,I){s=V.Push;let x=ke(E.location,R,I);r&&r(x,R),c=h()+1;let F=wr(x,c),O=E.createHref(x);try{i.pushState(F,"",O)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;a.location.assign(O)}o&&l&&l({action:s,location:E.location,delta:1})}function g(R,I){s=V.Replace;let x=ke(E.location,R,I);r&&r(x,R),c=h();let F=wr(x,c),O=E.createHref(x);i.replaceState(F,"",O),o&&l&&l({action:s,location:E.location,delta:0})}function w(R){let I=a.location.origin!=="null"?a.location.origin:a.location.href,x=typeof R=="str
10ing"?R:ge(R);return x=x.replace(/ $/,"%20"),M(I,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,I)}let E={get action(){return s},get location(){return e(a,i)},listen(R){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(br,m),l=R,()=>{a.removeEventListener(br,m),l=null}},createHref(R){return t(a,R)},createURL:w,encodeLocation(R){let I=w(R);return{pathname:I.pathname,search:I.search,hash:I.hash}},push:y,replace:g,go(R){return i.go(R)}};return E}var H;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(H||(H={}));const Un=new Set(["lazy","caseSensitive","path","id","index","children"]);function In(e){return e.index===!0}function Dt(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,o)=>{let i=[...r,String(o)],s=typeof a.id=="string"?a.id:i.join("-");if(M(a.index!==!0||!a.children,"Cannot specify children on an index route"),M(!n[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),In(a)){let l=K({},a,t(a),{id:s});return n[s]=l,l}else{let l=K({},a,t(a),{id:s,children:void 0});return n[s]=l,a.children&&(l.children=Dt(a.children,t,i,n)),l}})}function Ae(e,t,r){return r===void 0&&(r="/"),Ct(e,t,r,!1)}function Ct(e,t,r,n){let a=typeof t=="string"?he(t):t,o=ae(a.pathname||"/",r);if(o==null)return null;let i=$r(e);On(i);let s=null;for(let l=0;s==null&&l<i.length;++l){let c=$n(o);s=Kn(i[l],c,n)}return s}function Vr(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 $r(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(o,i,s)=>{let l={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};l.relativePath.startsWith("/")&&(M(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 c=pe([n,l.relativePath]),h=r.concat(l);o.children&&o.children.length>0&&(M(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),$r(o.children,t,h,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:Hn(c,o.index),routesMeta:h})};return e.forEach((o,i)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))a(o,i);else for(let l of Jr(o.path))a(o,i,l)}),t}function Jr(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=Jr(n.join("/")),s=[];return s.push(...i.map(l=>l===""?o:[o,l].join("/"))),a&&s.push(...i),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function On(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Wn(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const An=/^:[\w-]+$/,Nn=3,jn=2,kn=1,Bn=10,zn=-2,Er=e=>e==="*";function Hn(e,t){let r=e.split("/"),n=r.length;return r.some(Er)&&(n+=zn),t&&(n+=jn),r.filter(a=>!Er(a)).reduce((a,o)=>a+(An.test(o)?Nn:o===""?kn:Bn),n)}function Wn(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 Kn(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,a={},o="/",i=[];for(let s=0;s<n.length;++s){let l=n[s],c=s===n.length-1,h=o==="/"?t:t.slice(o.length)||"/",m=it({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},h),y=l.route;if(!m&&c&&r&&!n[n.length-1].route.index&&(m=it({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},h)),!m)return null;
10Object.assign(a,m.params),i.push({params:a,pathname:pe([o,m.pathname]),pathnameBase:Xn(pe([o,m.pathnameBase])),route:y}),m.pathnameBase!=="/"&&(o=pe([o,m.pathnameBase]))}return i}function Ui(e,t){t===void 0&&(t={});let r=e;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(ve(!1,'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".')),r=r.replace(/\*$/,"/*"));const n=r.startsWith("/")?"/":"",a=i=>i==null?"":typeof i=="string"?i:String(i),o=r.split(/\/+/).map((i,s,l)=>{if(s===l.length-1&&i==="*")return a(t["*"]);const h=i.match(/^:([\w-]+)(\??)$/);if(h){const[,m,y]=h;let g=t[m];return M(y==="?"||g!=null,'Missing ":'+m+'" param'),a(g)}return i.replace(/\?$/g,"")}).filter(i=>!!i);return n+o.join("/")}function it(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Vn(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:n.reduce((c,h,m)=>{let{paramName:y,isOptional:g}=h;if(y==="*"){let E=s[m]||"";i=o.slice(0,o.length-E.length).replace(/(.)\/+$/,"$1")}const w=s[m];return g&&!w?c[y]=void 0:c[y]=(w||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:i,pattern:e}}function Vn(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),ve(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,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function $n(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ve(!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 ae(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)||"/"}const Jn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yn=e=>Jn.test(e);function Gn(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?he(e):e,o;if(r)if(Yn(r))o=r;else{if(r.includes("//")){let i=r;r=r.replace(/\/\/+/g,"/"),ve(!1,"Pathnames cannot have embedded double slashes - normalizing "+(i+" -> "+r))}r.startsWith("/")?o=Sr(r.substring(1),"/"):o=Sr(r,t)}else o=t;return{pathname:o,search:Qn(n),hash:Zn(a)}}function Sr(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 Bt(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 Yr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function _t(e,t){let r=Yr(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Ft(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=he(e):(a=K({},e),M(!a.pathname||!a.pathname.includes("?"),Bt("?","pathname","search",a)),M(!a.pathname||!a.pathname.includes("#"),Bt("#","pathname","hash",a)),M(!a.search||!a.search.includes("#"),Bt("#","search","hash",a)));let o=e===""||a.pathname==="",i=o?"/":a.pathname,s;if(i==null)s=r;else{let m=t.length-1;if(!n&&i.startsWith("..")){let y=i.split("/");for(;y[0]==="..";)y.shift(),m-=1;a.pathname=y.join("/")}s=m>=0?t[m]:"/"}let l=Gn(a,s),c=i&&i!=="/"&&i.endsWith("/"),h=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||h)&&(l.pathname+="/"),l}const pe=e=>e.join("/").replace(/\/\/+/g,"/"),Xn=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Qn=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Zn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Ii=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r,a=new Headers(n.headers);return a.has("Content-Type")||a.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(t),K({},n,{headers:a}))};
10class Vt extends Error{}class qn{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],M(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 Vt("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[s,l]=i;return Object.assign(o,{[s]:this.trackPromise(s,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 Vt)return this.unlistenAbortSignal(),Object.defineProperty(t,"_error",{get:()=>n}),Promise.reject(n);if(this.pendingKeysSet.delete(r),this.done&&this.unlistenAbortSignal(),n===void 0&&a===void 0){let o=new Error('Deferred data for key "'+r+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(t,"_error",{get:()=>o}),this.emit(!1,r),Promise.reject(o)}return a===void 0?(Object.defineProperty(t,"_error",{get:()=>n}),this.emit(!1,r),Promise.reject(n)):(Object.defineProperty(t,"_data",{get:()=>a}),this.emit(!1,r),a)}emit(t,r){this.subscribers.forEach(n=>n(t,r))}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((t,r)=>this.pendingKeysSet.delete(r)),this.emit(!0)}async resolveData(t){let r=!1;if(!this.done){let n=()=>this.cancel();t.addEventListener("abort",n),r=await new Promise(a=>{this.subscribe(o=>{t.removeEventListener("abort",n),(o||this.done)&&a(o)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return M(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]:ta(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function ea(e){return e instanceof Promise&&e._tracked===!0}function ta(e){if(!ea(e))return e;if(e._error)throw e._error;return e._data}const Oi=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r;return new qn(t,n)},ra=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,K({},n,{headers:a}))},Ai=(e,t)=>{let r=ra(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r};class Tt{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}}function ot(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Gr=["post","put","patch","delete"],na=new Set(Gr),aa=["get",...Gr],ia=new Set(aa),oa=new Set([301,302,303,307,308]),la=new Set([307,308]),zt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Xr={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ye={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Zt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sa=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Qr="remix-router-transitions";function qt(e){const 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;M(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 u=e.detectErrorBoundary;a=d=>({hasErrorBoundary:u(d)})}else a=sa;let o={},i=Dt(e.routes,a,void 0,o),s,l=e.basename||"/",c=e.dataStrategy||fa,h=e.patchRoutesOnNavigation,m=K({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prepe
10ndBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),y=null,g=new Set,w=null,E=null,R=null,I=e.hydrationData!=null,x=Ae(i,e.history.location,l),F=!1,O=null;if(x==null&&!h){let u=re(404,{pathname:e.history.location.pathname}),{matches:d,route:v}=Ur(i);x=d,O={[v.id]:u}}x&&!e.hydrationData&&bt(x,i,e.history.location.pathname).active&&(x=null);let $;if(x)if(x.some(u=>u.route.lazy))$=!1;else if(!x.some(u=>u.route.loader))$=!0;else if(m.v7_partialHydration){let u=e.hydrationData?e.hydrationData.loaderData:null,d=e.hydrationData?e.hydrationData.errors:null;if(d){let v=x.findIndex(b=>d[b.route.id]!==void 0);$=x.slice(0,v+1).every(b=>!Jt(b.route,u,d))}else $=x.every(v=>!Jt(v.route,u,d))}else $=e.hydrationData!=null;else if($=!1,x=[],m.v7_partialHydration){let u=bt(null,i,e.history.location.pathname);u.active&&u.matches&&(F=!0,x=u.matches)}let ce,p={historyAction:e.history.action,location:e.history.location,matches:x,initialized:$,navigation:zt,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||O,fetchers:new Map,blockers:new Map},A=V.Pop,z=!1,k,J=!1,te=new Map,Q=null,Se=!1,Me=!1,ht=[],mt=new Set,Z=new Map,pt=0,Xe=-1,ze=new Map,be=new Set,He=new Map,Qe=new Map,de=new Set,_e=new Map,Fe=new Map,vt;function mn(){if(y=e.history.listen(u=>{let{action:d,location:v,delta:b}=u;if(vt){vt(),vt=void 0;return}ve(Fe.size===0||b!=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 S=pr({currentLocation:p.location,nextLocation:v,historyAction:d});if(S&&b!=null){let T=new Promise(_=>{vt=_});e.history.go(b*-1),yt(S,{state:"blocked",location:v,proceed(){yt(S,{state:"proceeding",proceed:void 0,reset:void 0,location:v}),T.then(()=>e.history.go(b))},reset(){let _=new Map(p.blockers);_.set(S,Ye),ee({blockers:_})}});return}return Ue(d,v)}),r){Ca(t,te);let u=()=>La(t,te);t.addEventListener("pagehide",u),Q=()=>t.removeEventListener("pagehide",u)}return p.initialized||Ue(V.Pop,p.location,{initialHydration:!0}),ce}function pn(){y&&y(),Q&&Q(),g.clear(),k&&k.abort(),p.fetchers.forEach((u,d)=>gt(d)),p.blockers.forEach((u,d)=>mr(d))}function vn(u){return g.add(u),()=>g.delete(u)}function ee(u,d){d===void 0&&(d={}),p=K({},p,u);let v=[],b=[];m.v7_fetcherPersist&&p.fetchers.forEach((S,T)=>{S.state==="idle"&&(de.has(T)?b.push(T):v.push(T))}),de.forEach(S=>{!p.fetchers.has(S)&&!Z.has(S)&&b.push(S)}),[...g].forEach(S=>S(p,{deletedFetchers:b,viewTransitionOpts:d.viewTransitionOpts,flushSync:d.flushSync===!0})),m.v7_fetcherPersist?(v.forEach(S=>p.fetchers.delete(S)),b.forEach(S=>gt(S))):b.forEach(S=>de.delete(S))}function We(u,d,v){var b,S;let{flushSync:T}=v===void 0?{}:v,_=p.actionData!=null&&p.navigation.formMethod!=null&&fe(p.navigation.formMethod)&&p.navigation.state==="loading"&&((b=u.state)==null?void 0:b._isRedirect)!==!0,C;d.actionData?Object.keys(d.actionData).length>0?C=d.actionData:C=null:_?C=p.actionData:C=null;let L=d.loaderData?_r(p.loaderData,d.loaderData,d.matches||[],d.errors):p.loaderData,P=p.blockers;P.size>0&&(P=new Map(P),P.forEach((N,q)=>P.set(q,Ye)));let D=z===!0||p.navigation.formMethod!=null&&fe(p.navigation.formMethod)&&((S=u.state)==null?void 0:S._isRedirect)!==!0;s&&(i=s,s=void 0),Se||A===V.Pop||(A===V.Push?e.history.push(u,u.state):A===V.Replace&&e.history.replace(u,u.state));let U;if(A===V.Pop){let N=te.get(p.location.pathname);N&&N.has(u.pathname)?U={currentLocation:p.location,nextLocation:u}:te.has(u.pathname)&&(U={currentLocation:u,nextLocation:p.location})}else if(J){let N=te.get(p.location.pathname);N?N.add(u.pathname):(N=new Set([u.pathname]),te.set(p.location.pathname,N)),U={currentLocation:p.location,nextLocation:u}}ee(K({},d,{actionData:C,loaderData:L,historyAction:A,location:u,initialized:!0,navigation:zt,revalidation:"idle",restoreScrollPosition:gr(u,d.matches||p.matches),preventScrollReset:D,blockers:P}),{viewTransitionOpts:U,flushSync:T===!0}),A=V.Pop,z=!1,J=!1,Se=!1,Me=!1,ht=[]}
10async function lr(u,d){if(typeof u=="number"){e.history.go(u);return}let v=$t(p.location,p.matches,l,m.v7_prependBasename,u,m.v7_relativeSplatPath,d?.fromRouteId,d?.relative),{path:b,submission:S,error:T}=Rr(m.v7_normalizeFormMethod,!1,v,d),_=p.location,C=ke(p.location,b,d&&d.state);C=K({},C,e.history.encodeLocation(C));let L=d&&d.replace!=null?d.replace:void 0,P=V.Push;L===!0?P=V.Replace:L===!1||S!=null&&fe(S.formMethod)&&S.formAction===p.location.pathname+p.location.search&&(P=V.Replace);let D=d&&"preventScrollReset"in d?d.preventScrollReset===!0:void 0,U=(d&&d.flushSync)===!0,N=pr({currentLocation:_,nextLocation:C,historyAction:P});if(N){yt(N,{state:"blocked",location:C,proceed(){yt(N,{state:"proceeding",proceed:void 0,reset:void 0,location:C}),lr(u,d)},reset(){let q=new Map(p.blockers);q.set(N,Ye),ee({blockers:q})}});return}return await Ue(P,C,{submission:S,pendingError:T,preventScrollReset:D,replace:d&&d.replace,enableViewTransition:d&&d.viewTransition,flushSync:U})}function gn(){if(At(),ee({revalidation:"loading"}),p.navigation.state!=="submitting"){if(p.navigation.state==="idle"){Ue(p.historyAction,p.location,{startUninterruptedRevalidation:!0});return}Ue(A||p.historyAction,p.navigation.location,{overrideNavigation:p.navigation,enableViewTransition:J===!0})}}async function Ue(u,d,v){k&&k.abort(),k=null,A=u,Se=(v&&v.startUninterruptedRevalidation)===!0,Ln(p.location,p.matches),z=(v&&v.preventScrollReset)===!0,J=(v&&v.enableViewTransition)===!0;let b=s||i,S=v&&v.overrideNavigation,T=v!=null&&v.initialHydration&&p.matches&&p.matches.length>0&&!F?p.matches:Ae(b,d,l),_=(v&&v.flushSync)===!0;if(T&&p.initialized&&!Me&&ya(p.location,d)&&!(v&&v.submission&&fe(v.submission.formMethod))){We(d,{matches:T},{flushSync:_});return}let C=bt(T,b,d.pathname);if(C.active&&C.matches&&(T=C.matches),!T){let{error:W,notFoundMatches:B,route:Y}=Nt(d.pathname);We(d,{matches:B,loaderData:{},errors:{[Y.id]:W}},{flushSync:_});return}k=new AbortController;let L=Je(e.history,d,k.signal,v&&v.submission),P;if(v&&v.pendingError)P=[Ne(T).route.id,{type:H.error,error:v.pendingError}];else if(v&&v.submission&&fe(v.submission.formMethod)){let W=await yn(L,d,v.submission,T,C.active,{replace:v.replace,flushSync:_});if(W.shortCircuited)return;if(W.pendingActionResult){let[B,Y]=W.pendingActionResult;if(oe(Y)&&ot(Y.error)&&Y.error.status===404){k=null,We(d,{matches:W.matches,loaderData:{},errors:{[B]:Y.error}});return}}T=W.matches||T,P=W.pendingActionResult,S=Ht(d,v.submission),_=!1,C.active=!1,L=Je(e.history,L.url,L.signal)}let{shortCircuited:D,matches:U,loaderData:N,errors:q}=await bn(L,d,T,C.active,S,v&&v.submission,v&&v.fetcherSubmission,v&&v.replace,v&&v.initialHydration===!0,_,P);D||(k=null,We(d,K({matches:U||T},Fr(P),{loaderData:N,errors:q})))}async function yn(u,d,v,b,S,T){T===void 0&&(T={}),At();let _=xa(d,v);if(ee({navigation:_},{flushSync:T.flushSync===!0}),S){let P=await wt(b,d.pathname,u.signal);if(P.type==="aborted")return{shortCircuited:!0};if(P.type==="error"){let D=Ne(P.partialMatches).route.id;return{matches:P.partialMatches,pendingActionResult:[D,{type:H.error,error:P.error}]}}else if(P.matches)b=P.matches;else{let{notFoundMatches:D,error:U,route:N}=Nt(d.pathname);return{matches:D,pendingActionResult:[N.id,{type:H.error,error:U}]}}}let C,L=at(b,d);if(!L.route.action&&!L.route.lazy)C={type:H.error,error:re(405,{method:u.method,pathname:d.pathname,routeId:L.route.id})};else if(C=(await Ze("action",p,u,[L],b,null))[L.route.id],u.signal.aborted)return{shortCircuited:!0};if(je(C)){let P;return T&&T.replace!=null?P=T.replace:P=Dr(C.response.headers.get("Location"),new URL(u.url),l,e.history)===p.location.pathname+p.location.search,await Ie(u,C,!0,{submission:v,replace:P}),{shortCircuited:!0}}if(Ce(C))throw re(400,{type:"defer-action"});if(oe(C)){let P=Ne(b,L.route.id);return(T&&T.replace)!==!0&&(A=V.Push),{matches:b,pendingActionResult:[P.route.id,C]}}return{matches:b,pendingActionResult:[L.route.id,C]}}async function bn(u,d,v,b,S,T,_,C,L,P,D){let U=S||Ht(d,T),N=T||_||Or(U),q=!Se&&(!m.v7_partialHydration||!L);if(b){if(q){let G=sr(D);ee(K({navigation:U},G!==void 0?{actionData:G}:{}),{flushSync:P})}let j=await wt(v,d.pathname,u.signal);if(j.type==="aborted")return{shortCircuited:!0};if(j.type==="error"){let G=Ne(j.partialMatches).route.id;return{matches:j.partialMatches,loaderData:{},errors:{[G]:j.error}}}else if(j.matches)v=j.matches;else{let{error:G,notFoundMatches:Ve,route:tt}=Nt(d.pathname);return{matches:Ve,loaderData:{},errors:{[tt.id]:G}}}}let W=s||i,[B,Y]=Pr(e.history,p,v,N,d,m.v7_partialHydration&&L===!0,m.v7_skipActionErrorRevalidation,Me,ht,mt,de,He,be,W,l,D);if(jt(j=>!(v&&v.some(G=>G.route.id===j))||B&&B.some(G=>G.route.id===j)),Xe=++pt,B.length===0&&Y.length===0){let j=fr();return We(d,K({matches:v,loaderData:{},errors:D&&oe(D[1])?{[D[0]]:D[1].error}:null},Fr(D),j?{fetchers:new Map(p.fetchers)}:{}),{flushSync:P}),{shortCircuited:!0}}if(q){let j={};if(!b){j.navigation=U;let G=sr(D);G!==void 0&&(j.actionData=G)}Y.length>0&&(j.fetchers=wn(Y)),ee(j,{flushSync:P})}Y.forEach(j=>{xe(j.key),j.controller&&Z.set(j.key,j.controller)});let Ke=()=>Y.forEach(j=>xe(j.key));k&&k.signal.addEventListener("abort",Ke);let{loaderResults:qe,fetcherResults:Ee}=await ur(p,v,B,Y,u);if(u.signal.aborted)return{shortCircuited:!0};k&&k.signal.removeEventListener("abort",Ke),Y.forEach(j=>Z.delete(j.key));let me=Rt(qe);if(me)return await Ie(u,me.result,!0,{replace:C}),{shortCircuited:!0};if(me=Rt(Ee),me)return be.add(me.key),await Ie(u,me.result,!0,{replace:C}),{shortCircuited:!0};let{loaderData:kt,errors:et}=Mr(p,v,qe,D,Y,Ee,_e);_e.forEach((j,G)=>{j.subscribe(Ve=>{(Ve||j.done)&&_e.delete(G)})}),m.v7_partialHydration&&L&&p.errors&&(et=K({},p.errors,et));let Oe=fr(),Et=hr(Xe),St=Oe||Et||Y.length>0;return K({matches:v,loaderData:kt,errors:et},St?{fetchers:new Map(p.fetchers)}:{})}function sr(u){if(u&&!oe(u[1]))return{[u[0]]:u[1].data};if(p.actionData)return Object.keys(p.actionData).length===0?null:p.actionData}function wn(u){return u.forEach(d=>{let v=p.fetchers.get(d.key),b=rt(void 0,v?v.data:void 0);p.fetchers.set(d.key,b)}),new Map(p.fetchers)}function En(u,d,v,b){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.");xe(u);let S=(b&&b.flushSync)===!0,T=s||i,_=$t(p.location,p.matches,l,m.v7_prepe
10ndBasename,v,m.v7_relativeSplatPath,d,b?.relative),C=Ae(T,_,l),L=bt(C,T,_);if(L.active&&L.matches&&(C=L.matches),!C){we(u,d,re(404,{pathname:_}),{flushSync:S});return}let{path:P,submission:D,error:U}=Rr(m.v7_normalizeFormMethod,!0,_,b);if(U){we(u,d,U,{flushSync:S});return}let N=at(C,P),q=(b&&b.preventScrollReset)===!0;if(D&&fe(D.formMethod)){Sn(u,d,P,N,C,L.active,S,q,D);return}He.set(u,{routeId:d,path:P}),Rn(u,d,P,N,C,L.active,S,q,D)}async function Sn(u,d,v,b,S,T,_,C,L){At(),He.delete(u);function P(X){if(!X.route.action&&!X.route.lazy){let $e=re(405,{method:L.formMethod,pathname:v,routeId:d});return we(u,d,$e,{flushSync:_}),!0}return!1}if(!T&&P(b))return;let D=p.fetchers.get(u);Re(u,Pa(L,D),{flushSync:_});let U=new AbortController,N=Je(e.history,v,U.signal,L);if(T){let X=await wt(S,new URL(N.url).pathname,N.signal,u);if(X.type==="aborted")return;if(X.type==="error"){we(u,d,X.error,{flushSync:_});return}else if(X.matches){if(S=X.matches,b=at(S,v),P(b))return}else{we(u,d,re(404,{pathname:v}),{flushSync:_});return}}Z.set(u,U);let q=pt,B=(await Ze("action",p,N,[b],S,u))[b.route.id];if(N.signal.aborted){Z.get(u)===U&&Z.delete(u);return}if(m.v7_fetcherPersist&&de.has(u)){if(je(B)||oe(B)){Re(u,Pe(void 0));return}}else{if(je(B))if(Z.delete(u),Xe>q){Re(u,Pe(void 0));return}else return be.add(u),Re(u,rt(L)),Ie(N,B,!1,{fetcherSubmission:L,preventScrollReset:C});if(oe(B)){we(u,d,B.error);return}}if(Ce(B))throw re(400,{type:"defer-action"});let Y=p.navigation.location||p.location,Ke=Je(e.history,Y,U.signal),qe=s||i,Ee=p.navigation.state!=="idle"?Ae(qe,p.navigation.location,l):p.matches;M(Ee,"Didn't find any matches after fetcher action");let me=++pt;ze.set(u,me);let kt=rt(L,B.data);p.fetchers.set(u,kt);let[et,Oe]=Pr(e.history,p,Ee,L,Y,!1,m.v7_skipActionErrorRevalidation,Me,ht,mt,de,He,be,qe,l,[b.route.id,B]);Oe.filter(X=>X.key!==u).forEach(X=>{let $e=X.key,yr=p.fetchers.get($e),Mn=rt(void 0,yr?yr.data:void 0);p.fetchers.set($e,Mn),xe($e),X.controller&&Z.set($e,X.controller)}),ee({fetchers:new Map(p.fetchers)});let Et=()=>Oe.forEach(X=>xe(X.key));U.signal.addEventListener("abort",Et);let{loaderResults:St,fetcherResults:j}=await ur(p,Ee,et,Oe,Ke);if(U.signal.aborted)return;U.signal.removeEventListener("abort",Et),ze.delete(u),Z.delete(u),Oe.forEach(X=>Z.delete(X.key));let G=Rt(St);if(G)return Ie(Ke,G.result,!1,{preventScrollReset:C});if(G=Rt(j),G)return be.add(G.key),Ie(Ke,G.result,!1,{preventScrollReset:C});let{loaderData:Ve,errors:tt}=Mr(p,Ee,St,void 0,Oe,j,_e);if(p.fetchers.has(u)){let X=Pe(B.data);p.fetchers.set(u,X)}hr(me),p.navigation.state==="loading"&&me>Xe?(M(A,"Expected pending action"),k&&k.abort(),We(p.navigation.location,{matches:Ee,loaderData:Ve,errors:tt,fetchers:new Map(p.fetchers)})):(ee({errors:tt,loaderData:_r(p.loaderData,Ve,Ee,tt),fetchers:new Map(p.fetchers)}),Me=!1)}async function Rn(u,d,v,b,S,T,_,C,L){let P=p.fetchers.get(u);Re(u,rt(L,P?P.data:void 0),{flushSync:_});let D=new AbortController,U=Je(e.history,v,D.signal);if(T){let B=await wt(S,new URL(U.url).pathname,U.signal,u);if(B.type==="aborted")return;if(B.type==="error"){we(u,d,B.error,{flushSync:_});return}else if(B.matches)S=B.matches,b=at(S,v);else{we(u,d,re(404,{pathname:v}),{flushSync:_});return}}Z.set(u,D);let N=pt,W=(await Ze("loader",p,U,[b],S,u))[b.route.id];if(Ce(W)&&(W=await er(W,U.signal,!0)||W),Z.get(u)===D&&Z.delete(u),!U.signal.aborted){if(de.has(u)){Re(u,Pe(void 0));return}if(je(W))if(Xe>N){Re(u,Pe(void 0));return}else{be.add(u),await Ie(U,W,!1,{preventScrollReset:C});return}if(oe(W)){we(u,d,W.error);return}M(!Ce(W),"Unhandled fetcher deferred data"),Re(u,Pe(W.data))}}async function Ie(u,d,v,b){let{submission:S,fetcherSubmission:T,preventScrollReset:_,replace:C}=b===void 0?{}:b;d.response.headers.has("X-Remix-Revalidate")&&(Me=!0);let L=d.response.headers.get("Location");M(L,"Expected a Location header on the redirect Response"),L=Dr(L,new URL(u.url),l,e.history);let P=ke(p.location,L,{_isRedirect:!0});if(r){let B=!1;if(d.response.headers.has("X-Remix-Reload-Document"))B=!0;else if(Zt.test(L)){const Y=e.history.createURL(L);B=Y.origin!==t.location.origin||ae(Y.pathname,l)==null}if(B){C?t.location.replace(L):t.location.assign(L);return}}k=null;let D=C===!0||d.response.headers.has("X-Remix-Replace")?V.Replace:V.Push,{formMethod:U,formAction:N,formEncType:q}=p.navigation;!S&&!T&&U&&N&&q&&(S=Or(p.navigation));let W=S||T;if(la.has(d.response.status)&&W&&fe(W.formMethod))await Ue(D,P,{submission:K({},W,{formAction:L}),preventScrollReset:_||z,enableViewTransition:v?J:void 0});else{let B=Ht(P,S);await Ue(D,P,{overrideNavigation:B,fetcherSubmission:T,preventScrollReset:_||z,enableViewTransition:v?J:void 0})}}async function Ze(u,d,v,b,S,T){let _,C={};try{_=await ha(c,u,d,v,b,S,T,o,a)}catch(L){return b.forEach(P=>{C[P.route.id]={type:H.error,error:L}}),C}for(let[L,P]of Object.entries(_))if(ba(P)){let D=P.result;C[L]={type:H.redirect,response:va(D,v,L,S,l,m.v7_relativeSplatPath)}}else C[L]=await pa(P);return C}async function ur(u,d,v,b,S){let T=u.matches,_=Ze("loader",u,S,v,d,null),C=Promise.all(b.map(async D=>{if(D.matches&&D.match&&D.controller){let N=(await Ze("loader",u,Je(e.history,D.path,D.controller.signal),[D.match],D.matches,D.key))[D.match.route.id];return{[D.key]:N}}else return Promise.resolve({[D.key]:{type:H.error,error:re(404,{pathname:D.path})}})})),L=await _,P=(await C).reduce((D,U)=>Object.assign(D,U),{});return await Promise.all([Sa(d,L,S.signal,T,u.loaderData),Ra(d,P,b)]),{loaderResults:L,fetcherResults:P}}function At(){Me=!0,ht.push(...jt()),He.forEach((u,d)=>{Z.has(d)&&mt.add(d),xe(d)})}function Re(u,d,v){v===void 0&&(v={}),p.fetchers.set(u,d),ee({fetchers:new Map(p.fetchers)},{flushSync:(v&&v.flushSync)===!0})}function we(u,d,v,b){b===void 0&&(b={});let S=Ne(p.matches,d);gt(u),ee({errors:{[S.route.id]:v},fetchers:new Map(p.fetchers)},{flushSync:(b&&b.flushSync)===!0})}function cr(u){return Qe.set(u,(Qe.get(u)||0)+1),de.has(u)&&de.delete(u),p.fetchers.get(u)||Xr}function gt(u){let d=p.fetchers.get(u);Z.has(u)&&!(d&&d.state==="loading"&&ze.has(u))&&xe(u),He.delete(u),ze.delete(u),be.delete(u),m.v7_fetcherPersist&&de.delete(u),mt.delete(u),p.fetchers.delete(u)}function xn(u){let d=(Qe.get(u)||0)-1;d<=0?(Qe.delete(u),de.add(u),m.v7_fetcherPersist||gt(u)):Qe.set(u,d),ee({fetchers:new Map(p.fetchers)})}function xe(u){let d=Z.get(u);d&&(d.abort(),Z.delete(u))}function dr(u){for(let d of u){let v=cr(d),b=Pe(v.data);p.fetchers.set(d,b)}}function fr(){let u=[],d=!1;for(let v of be){let b=p.fetchers.get(v);M(b,"Expected fetcher: "+v),b.state==="loading"&&(be.delete(v),u.push(v),d=!0)}return dr(u),d}function hr(u){let d=[];for(let[v,b]of ze)if(b<u){let S=p.fetchers.get(v);M(S,"Expected fetcher: "+v),S.state==="loading"&&(xe(v),ze.delete(v),d.push(v))}return dr(d),d.length>0}function Pn(u,d){let v=p.blockers.get(u)||Ye;return Fe.get(u)!==d&&Fe.set(u,d),v}function mr(u){p.blockers.delete(u),Fe.delete(u)}function yt(u,d){let v=p.blockers.get(u)||Ye;M(v.state==="unblocked"&&d.state==="blocked"||v.state==="blocked"&&d.state==="blocked"||v.state==="blocked"&&d.state==="proceeding"||v.state==="blocked"&&d.state==="unblocked"||v.state==="proceeding"&&d.state==="unblocked","Invalid blocker state transition: "+v.state+" -> "+d.state);let b=new Map(p.blockers);b.set(u,d),ee({blockers:b})}function pr(u){let{currentLocation:d,nextLocation:v,historyAction:b}=u;if(Fe.size===0)return;Fe.size>1&&ve(!1,"A router only supports one blocker at a time");let S=Array.from(Fe.entries()),[T,_]=S[S.length-1],C=p.blockers.get(T);if(!(C&&C.state==="proceeding")&&_({currentLocation:d,nextLocation:v,historyAction:b}))return T}function Nt(u){let d=re(404,{pathname:u}),v=s||i,{matches:b,route:S}=Ur(v);return jt(),{notFoundMatches:b,route:S,error:d}}function jt(u){let d=[];return _e.forEach((v,b)=>{(!u||u(b))&&(v.cancel(),d.push(b),_e.delete(b))}),d}function Cn(u,d,v){if(w=u,R=d,E=v||null,!I&&p.navigation===zt){I=!0;let b=gr(p.location,p.matches);b!=null&&ee({restoreScrollPosition:b})}return()=>{w=null,R=null,E=null}}function vr(u,d){return E&&E(u,d.map(b=>Vr(b,p.loaderData)))||u.key}function Ln(u,d){if(w&&R){let v=vr(u,d);w[v]=R()}}function gr(u,d){if(w){let v=vr(u,d),b=w[v];if(typeof b=="number")return b}return null}function bt(u,d,v){if(h)if(u){if(Object.keys(u[0].params).length>0)return{active:!0,matches:Ct(d,v,l,!0)}}else return{active:!0,matches:Ct(d,v,l,!0)||[]};return{active:!1,matches:null}}async function wt(u,d,v,b){if(!h)return{type:"success",matches:u};let S=u;for(;;){let T=s==null,_=s||i,C=o;try{await h({signal:v,path:d,matches:S,fetcherKey:b,patch:(D,U)=>{v.aborted||Lr(D,U,_,C,a)}})}catch(D){return{type:"error",error:D,partialMatches:S}}finally{T&&!v.aborted&&(i=[...i])}if(v.aborted)return{type:"aborted"};let L=Ae(_,d,l);if(L)return{type:"success",matches:L};let P=Ct(_,d,l,!0);if(!P||S.length===P.length&&S.every((D,U)=>D.route.id===P[U].route.id))return{type:"success",matches:null};S=P}}function Dn(u){o={},s=Dt(u,a,void 0,o)}function Tn(u,d){let v=s==null;Lr(u,d,s||i,o,a),v&&(i=[...i],ee({}))}return ce={get basename(){return l},get future(){return m},get state(){return p},get routes(){return i},get window(){return t},initialize:mn,subscribe:vn,enableScrollRestoration:Cn,navigate:lr,fetch:En,revalidate:gn,createHref:u=>e.history.createHref(u),encodeLocation:u=>e.history.encodeLocation(u),getFetcher:cr,deleteFetcher:xn,dispose:pn,getBlocker:Pn,deleteBlocker:mr,patchRoutes:Tn,_internalFetchControllers:Z,_internalActiveDeferreds:_e,_internalSetRoutes:Dn},ce}function ua(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function $t(e,t,r,n,a,o,i,s){let l,c;if(i){l=[];for(let m of t)if(l.push(m),m.route.id===i){c=m;break}}else l=t,c=t[t.length-1];let h=Ft(a||".",_t(l,o),ae(e.pathname,r)||e.pathname,s==="path");if(a==null&&(h.search=e.search,h.hash=e.hash),(a==null||a===""||a===".")&&c){let m=tr(h.search);if(c.route.index&&!m)h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&m){let y=new URLSearchParams(h.search),g=y.getAll("index");y.delete("index"),g.filter(E=>
10E).forEach(E=>y.append("index",E));let w=y.toString();h.search=w?"?"+w:""}}return n&&r!=="/"&&(h.pathname=h.pathname==="/"?r:pe([r,h.pathname])),ge(h)}function Rr(e,t,r,n){if(!n||!ua(n))return{path:r};if(n.formMethod&&!Ea(n.formMethod))return{path:r,error:re(405,{method:n.formMethod})};let a=()=>({path:r,error:re(400,{type:"invalid-body"})}),o=n.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),s=en(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!fe(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((g,w)=>{let[E,R]=w;return""+g+E+"="+R+` 11`},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:y}}}else if(n.formEncType==="application/json"){if(!fe(i))return a();try{let y=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:s,formEncType:n.formEncType,formData:void 0,json:y,text:void 0}}}catch{return a()}}}M(typeof FormData=="function","FormData is not available in this environment");let l,c;if(n.formData)l=Yt(n.formData),c=n.formData;else if(n.body instanceof FormData)l=Yt(n.body),c=n.body;else if(n.body instanceof URLSearchParams)l=n.body,c=Tr(l);else if(n.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(n.body),c=Tr(l)}catch{return a()}let h={formMethod:i,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(fe(h.formMethod))return{path:r,submission:h};let m=he(r);return t&&m.search&&tr(m.search)&&l.append("index",""),m.search="?"+l,{path:ge(m),submission:h}}function xr(e,t,r){r===void 0&&(r=!1);let n=e.findIndex(a=>a.route.id===t);return n>=0?e.slice(0,r?n+1:n):e}function Pr(e,t,r,n,a,o,i,s,l,c,h,m,y,g,w,E){let R=E?oe(E[1])?E[1].error:E[1].data:void 0,I=e.createURL(t.location),x=e.createURL(a),F=r;o&&t.errors?F=xr(r,Object.keys(t.errors)[0],!0):E&&oe(E[1])&&(F=xr(r,E[0]));let O=E?E[1].statusCode:void 0,$=i&&O&&O>=400,ce=F.filter((A,z)=>{let{route:k}=A;if(k.lazy)return!0;if(k.loader==null)return!1;if(o)return Jt(k,t.loaderData,t.errors);if(ca(t.loaderData,t.matches[z],A)||l.some(Q=>Q===A.route.id))return!0;let J=t.matches[z],te=A;return Cr(A,K({currentUrl:I,currentParams:J.params,nextUrl:x,nextParams:te.params},n,{actionResult:R,actionStatus:O,defaultShouldRevalidate:$?!1:s||I.pathname+I.search===x.pathname+x.search||I.search!==x.search||Zr(J,te)}))}),p=[];return m.forEach((A,z)=>{if(o||!r.some(Se=>Se.route.id===A.routeId)||h.has(z))return;let k=Ae(g,A.path,w);if(!k){p.push({key:z,routeId:A.routeId,path:A.path,matches:null,match:null,controller:null});return}let J=t.fetchers.get(z),te=at(k,A.path),Q=!1;y.has(z)?Q=!1:c.has(z)?(c.delete(z),Q=!0):J&&J.state!=="idle"&&J.data===void 0?Q=s:Q=Cr(te,K({currentUrl:I,currentParams:t.matches[t.matches.length-1].params,nextUrl:x,nextParams:r[r.length-1].params},n,{actionResult:R,actionStatus:O,defaultShouldRevalidate:$?!1:s})),Q&&p.push({key:z,routeId:A.routeId,path:A.path,matches:k,match:te,controller:new AbortController})}),[ce,p]}function Jt(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=t!=null&&t[e.id]!==void 0,a=r!=null&&r[e.id]!==void 0;return!n&&a?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!n&&!a}function ca(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function Zr(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Cr(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function Lr(e,t,r,n,a){var o;let i;if(e){let c=n[e];M(c,"No route found to patch children into: routeId = "+e),c.children||(c.children=[]),i=c.children}else i=r;let s=t.filter(c=>!i.some(h=>qr(c,h))),l=Dt(s,a,[e||"_","patch",String(((o=i)==null?void 0:o.length)||"0")],n);i.push(...l)}function qr(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((r,n)=>{var a;return(a=t.children)==null?void 0:a.some(o=>qr(r,o))}):!1}async function da(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];M(a,"No route found in manifest");let o={};for(let i in n){let l=a[i]!==void 0&&i!=="hasErrorBoundary";ve(!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&&!Un.has(i)&&(o[i]=n[i])}Object.assign(a,o),Object.assign(a,K({},t(a),{lazy:void 0}))}async function fa(e){let{matches:t}=e,r=t.filter(a=>a.shouldLoad);return(await Promise.all(r.map(a=>a.resolve()))).reduce((a,o,i)=>Object.assign(a,{[r[i].route.id]:o}),{})}async function ha(e,t,r,n,a,o,i,s,l,c){let h=o.map(g=>g.route.lazy?da(g.route,l,s):void 0),m=o.map((g,w)=>{let E=h[w],R=a.some(x=>x.route.id===g.route.id);return K({},g,{shouldLoad:R,resolve:async x=>(x&&n.method==="GET"&&(g.route.lazy||g.route.loader)&&(R=!0),R?ma(t,n,g,E,x,c):Promise.resolve({type:H.data,result:void 0}))})}),y=await e({matches:m,request:n,params:o[0].params,fetcherKey:i,context:c});try{await Promise.all(h)}catch{}return y}async function ma(e,t,r,n,a,o){let i,s,l=c=>{let h,m=new Promise((w,E)=>h=E);s=()=>h(),t.signal.addEventListener("abort",s);let y=w=>typeof c!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):c({request:t,params:r.params,context:o},...w!==void 0?[w]:[]),g=(async()=>{try{return{type:"data",result:await(a?a(E=>y(E)):y())}}catch(w){return{type:"error",result:w}}})();return Promise.race([g,m])};try{let c=r.route[e];if(n)if(c){let h,[m]=await Promise.all([l(c).catch(y=>{h=y}
11),n]);if(h!==void 0)throw h;i=m}else if(await n,c=r.route[e],c)i=await l(c);else if(e==="action"){let h=new URL(t.url),m=h.pathname+h.search;throw re(405,{method:t.method,pathname:m,routeId:r.route.id})}else return{type:H.data,result:void 0};else if(c)i=await l(c);else{let h=new URL(t.url),m=h.pathname+h.search;throw re(404,{pathname:m})}M(i.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(c){return{type:H.error,result:c}}finally{s&&t.signal.removeEventListener("abort",s)}return i}async function pa(e){let{result:t,type:r}=e;if(tn(t)){let m;try{let y=t.headers.get("Content-Type");y&&/\bapplication\/json\b/.test(y)?t.body==null?m=null:m=await t.json():m=await t.text()}catch(y){return{type:H.error,error:y}}return r===H.error?{type:H.error,error:new Tt(t.status,t.statusText,m),statusCode:t.status,headers:t.headers}:{type:H.data,data:m,statusCode:t.status,headers:t.headers}}if(r===H.error){if(Ir(t)){var n,a;if(t.data instanceof Error){var o,i;return{type:H.error,error:t.data,statusCode:(o=t.init)==null?void 0:o.status,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}}return{type:H.error,error:new Tt(((n=t.init)==null?void 0:n.status)||500,void 0,t.data),statusCode:ot(t)?t.status:void 0,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}}return{type:H.error,error:t,statusCode:ot(t)?t.status:void 0}}if(wa(t)){var s,l;return{type:H.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((l=t.init)==null?void 0:l.headers)&&new Headers(t.init.headers)}}if(Ir(t)){var c,h;return{type:H.data,data:t.data,statusCode:(c=t.init)==null?void 0:c.status,headers:(h=t.init)!=null&&h.headers?new Headers(t.init.headers):void 0}}return{type:H.data,data:t}}function va(e,t,r,n,a,o){let i=e.headers.get("Location");if(M(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Zt.test(i)){let s=n.slice(0,n.findIndex(l=>l.route.id===r)+1);i=$t(new URL(t.url),s,a,!0,i,o),e.headers.set("Location",i)}return e}function Dr(e,t,r,n){let a=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Zt.test(e)){let o=e,i=o.startsWith("//")?new URL(t.protocol+o):new URL(o);if(a.includes(i.protocol))throw new Error("Invalid redirect location");let s=ae(i.pathname,r)!=null;if(i.origin===t.origin&&s)return i.pathname+i.search+i.hash}try{let o=n.createURL(e);if(a.includes(o.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Je(e,t,r,n){let a=e.createURL(en(t)).toString(),o={signal:r};if(n&&fe(n.formMethod)){let{formMethod:i,formEncType:s}=n;o.method=i.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(n.json)):s==="text/plain"?o.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?o.body=Yt(n.formData):o.body=n.formData}return new Request(a,o)}function Yt(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function Tr(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function ga(e,t,r,n,a){let o={},i=null,s,l=!1,c={},h=r&&oe(r[1])?r[1].error:void 0;return e.forEach(m=>{if(!(m.route.id in t))return;let y=m.route.id,g=t[y];if(M(!je(g),"Cannot handle redirect results in processLoaderData"),oe(g)){let w=g.error;h!==void 0&&(w=h,h=void 0),i=i||{};{let E=Ne(e,y);i[E.route.id]==null&&(i[E.route.id]=w)}o[y]=void 0,l||(l=!0,s=ot(g.error)?g.error.status:500),g.headers&&(c[y]=g.headers)}else Ce(g)?(n.set(y,g.deferredData),o[y]=g.deferredData.data,g.statusCode!=null&&g.statusCode!==200&&!l&&(s=g.statusCode),g.headers&&(c[y]=g.headers)):(o[y]=g.data,g.statusCode&&g.statusCode!==200&&!l&&(s=g.statusCode),g.headers&&(c[y]=g.headers))}),h!==void 0&&r&&(i={[r[0]]:h},o[r[0]]=void 0),{loaderData:o,errors:i,statusCode:s||200,loaderHeaders:c}}function Mr(e,t,r,n,a,o,i){let{loaderData:s,errors:l}=ga(t,r,n,i);return a.forEach(c=>{let{key:h,match:m,controller:y}=c,g=o[h];if(M(g,"Did not find corresponding fetcher result"),!(y&&y.signal.aborted))if(oe(g)){let w=Ne(e.matches,m?.route.id);l&&l[w.route.id]||(l=K({},l,{[w.route.id]:g.error})),e.fetchers.delete(h)}else if(je(g))M(!1,"Unhandled fetcher revalidation redirect");else if(Ce(g))M(!1,"Unhandled fetcher deferred data");else{let w=Pe(g.data);e.fetchers.set(h,w)}}),{loaderData:s,errors:l}}function _r(e,t,r,n){let a=K({},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 Fr(e){return e?oe(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ne(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.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function re(e,t){let{pathname:r,routeId:n,method:a,type:o,message:i}=t===void 0?{}:t,s="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(s="Bad Request",a&&r&&n?l="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?l="defer() is not supported in actions":o==="invalid-body"&&(l="Unable to encode submission body")):e===403?(s="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(s="Not Found",l='No route matches URL "'+r+'"'):e===405&&(s="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&&
11(l='Invalid request method "'+a.toUpperCase()+'"')),new Tt(e||500,s,new Error(l),!0)}function Rt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(je(a))return{key:n,result:a}}}function en(e){let t=typeof e=="string"?he(e):e;return ge(K({},t,{hash:""}))}function ya(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function ba(e){return tn(e.result)&&oa.has(e.result.status)}function Ce(e){return e.type===H.deferred}function oe(e){return e.type===H.error}function je(e){return(e&&e.type)===H.redirect}function Ir(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function wa(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 tn(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Ea(e){return ia.has(e.toLowerCase())}function fe(e){return na.has(e.toLowerCase())}async function Sa(e,t,r,n,a){let o=Object.entries(t);for(let i=0;i<o.length;i++){let[s,l]=o[i],c=e.find(y=>y?.route.id===s);if(!c)continue;let h=n.find(y=>y.route.id===c.route.id),m=h!=null&&!Zr(h,c)&&(a&&a[c.route.id])!==void 0;Ce(l)&&m&&await er(l,r,!1).then(y=>{y&&(t[s]=y)})}}async function Ra(e,t,r){for(let n=0;n<r.length;n++){let{key:a,routeId:o,controller:i}=r[n],s=t[a];e.find(c=>c?.route.id===o)&&Ce(s)&&(M(i,"Expected an AbortController for revalidating fetcher deferred result"),await er(s,i.signal,!0).then(c=>{c&&(t[a]=c)}))}}async function er(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:H.data,data:e.deferredData.unwrappedData}}catch(a){return{type:H.error,error:a}}return{type:H.data,data:e.deferredData.data}}}function tr(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function at(e,t){let r=typeof t=="string"?he(t).search:t.search;if(e[e.length-1].route.index&&tr(r||""))return e[e.length-1];let n=Yr(e);return n[n.length-1]}function Or(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 Ht(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 xa(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 rt(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Pa(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function 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}}function Ca(e,t){try{let r=e.sessionStorage.getItem(Qr);if(r){let n=JSON.parse(r);for(let[a,o]of Object.entries(n||{}))o&&Array.isArray(o)&&t.set(a,new Set(o||[]))}}catch{}}function La(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(Qr,JSON.stringify(r))}catch(n){ve(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** 12 * React Router v6.23.1 13 * 14 * Copyright (c) Remix Software Inc. 15 * 16 * This source code is licensed under the MIT license found in the 17 * LICENSE.md file in the root directory of this source tree. 18 * 19 * @license MIT 20 */function Le(){return Le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
20for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Le.apply(this,arguments)}const st=f.createContext(null),Ut=f.createContext(null),Mt=f.createContext(null),se=f.createContext(null),ut=f.createContext(null),ue=f.createContext({outlet:null,matches:[],isDataRoute:!1}),rn=f.createContext(null);function Da(e,t){let{relative:r}=t===void 0?{}:t;Be()||M(!1);let{basename:n,navigator:a}=f.useContext(se),{hash:o,pathname:i,search:s}=ct(e,{relative:r}),l=i;return n!=="/"&&(l=i==="/"?n:pe([n,i])),a.createHref({pathname:l,search:s,hash:o})}function Be(){return f.useContext(ut)!=null}function ye(){return Be()||M(!1),f.useContext(ut).location}function Ni(){return f.useContext(ut).navigationType}function ji(e){Be()||M(!1);let{pathname:t}=ye();return f.useMemo(()=>it(e,t),[t,e])}function nn(e){f.useContext(se).static||f.useLayoutEffect(e)}function rr(){let{isDataRoute:e}=f.useContext(ue);return e?Ka():Ta()}function Ta(){Be()||M(!1);let e=f.useContext(st),{basename:t,future:r,navigator:n}=f.useContext(se),{matches:a}=f.useContext(ue),{pathname:o}=ye(),i=JSON.stringify(_t(a,r.v7_relativeSplatPath)),s=f.useRef(!1);return nn(()=>{s.current=!0}),f.useCallback(function(c,h){if(h===void 0&&(h={}),!s.current)return;if(typeof c=="number"){n.go(c);return}let m=Ft(c,JSON.parse(i),o,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:pe([t,m.pathname])),(h.replace?n.replace:n.push)(m,h.state,h)},[t,n,i,o,e])}const an=f.createContext(null);function ki(){return f.useContext(an)}function Ma(e){let t=f.useContext(ue).outlet;return t&&f.createElement(an.Provider,{value:e},t)}function Bi(){let{matches:e}=f.useContext(ue),t=e[e.length-1];return t?t.params:{}}function ct(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=f.useContext(se),{matches:a}=f.useContext(ue),{pathname:o}=ye(),i=JSON.stringify(_t(a,n.v7_relativeSplatPath));return f.useMemo(()=>Ft(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function _a(e,t){return on(e,t)}function on(e,t,r,n){Be()||M(!1);let{navigator:a}=f.useContext(se),{matches:o}=f.useContext(ue),i=o[o.length-1],s=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let c=ye(),h;if(t){var m;let R=typeof t=="string"?he(t):t;l==="/"||(m=R.pathname)!=null&&m.startsWith(l)||M(!1),h=R}else h=c;let y=h.pathname||"/",g=y;if(l!=="/"){let R=l.replace(/^\//,"").split("/");g="/"+y.replace(/^\//,"").split("/").slice(R.length).join("/")}let w=Ae(e,{pathname:g}),E=ln(w&&w.map(R=>Object.assign({},R,{params:Object.assign({},s,R.params),pathname:pe([l,a.encodeLocation?a.encodeLocation(R.pathname).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?l:pe([l,a.encodeLocation?a.encodeLocation(R.pathnameBase).pathname:R.pathnameBase])})),o,r,n);return t&&E?f.createElement(ut.Provider,{value:{location:Le({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:V.Pop}},E):E}function Fa(){let e=Ba(),t=ot(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},t),r?f.createElement("pre",{style:a},r):null,null)}const Ua=f.createElement(Fa,null);class Ia extends f.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!==void 0?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!==void 0?f.createElement(ue.Provider,{value:this.props.routeContext},f.createElement(rn.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}
20function Oa(e){let{routeContext:t,match:r,children:n}=e,a=f.useContext(st);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),f.createElement(ue.Provider,{value:t},n)}function ln(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if((o=r)!=null&&o.errors)e=r.matches;else return null}let i=e,s=(a=r)==null?void 0:a.errors;if(s!=null){let h=i.findIndex(m=>m.route.id&&s?.[m.route.id]!==void 0);h>=0||M(!1),i=i.slice(0,Math.min(i.length,h+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let h=0;h<i.length;h++){let m=i[h];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(c=h),m.route.id){let{loaderData:y,errors:g}=r,w=m.route.loader&&y[m.route.id]===void 0&&(!g||g[m.route.id]===void 0);if(m.route.lazy||w){l=!0,c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}return i.reduceRight((h,m,y)=>{let g,w=!1,E=null,R=null;r&&(g=s&&m.route.id?s[m.route.id]:void 0,E=m.route.errorElement||Ua,l&&(c<0&&y===0?(Va("route-fallback"),w=!0,R=null):c===y&&(w=!0,R=m.route.hydrateFallbackElement||null)));let I=t.concat(i.slice(0,y+1)),x=()=>{let F;return g?F=E:w?F=R:m.route.Component?F=f.createElement(m.route.Component,null):m.route.element?F=m.route.element:F=h,f.createElement(Oa,{match:m,routeContext:{outlet:h,matches:I,isDataRoute:r!=null},children:F})};return r&&(m.route.ErrorBoundary||m.route.errorElement||y===0)?f.createElement(Ia,{location:r.location,revalidation:r.revalidation,component:E,error:g,children:x(),routeContext:{outlet:null,matches:I,isDataRoute:!0}}):x()},null)}var sn=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(sn||{}),ie=function(e){return 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",e}(ie||{});function nr(e){let t=f.useContext(st);return t||M(!1),t}function Te(e){let t=f.useContext(Ut);return t||M(!1),t}function Aa(e){let t=f.useContext(ue);return t||M(!1),t}function dt(e){let t=Aa(),r=t.matches[t.matches.length-1];return r.route.id||M(!1),r.route.id}function Na(){return dt(ie.UseRouteId)}function ja(){return Te(ie.UseNavigation).navigation}function zi(){let e=nr(),t=Te(ie.UseRevalidator);return f.useMemo(()=>({revalidate:e.router.revalidate,state:t.revalidation}),[e.router.revalidate,t.revalidation])}function ka(){let{matches:e,loaderData:t}=Te(ie.UseMatches);return f.useMemo(()=>e.map(r=>Vr(r,t)),[e,t])}function Hi(){let e=Te(ie.UseLoaderData),t=dt(ie.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function Wi(e){return Te(ie.UseRouteLoaderData).loaderData[e]}function Ki(){let e=Te(ie.UseActionData),t=dt(ie.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function Ba(){var e;let t=f.useContext(rn),r=Te(ie.UseRouteError),n=dt(ie.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function za(){let e=f.useContext(Mt);return e?._data}function Vi(){let e=f.useContext(Mt);return e?._error}let Ha=0;function Wa(e){let{router:t,basename:r}=nr(sn.UseBlocker),n=Te(ie.UseBlocker),[a,o]=f.useState(""),i=f.useCallback(s=>{if(typeof e!="function")return!!e;if(r==="/")return e(s);let{currentLocation:l,nextLocation:c,historyAction:h}=s;return e({currentLocation:Le({},l,{pathname:ae(l.pathname,r)||l.pathname}),nextLocation:Le({},c,{pathname:ae(c.pathname,r)||c.pathname}),historyAction:h})},[r,e]);return f.useEffect(()=>{let s=String(++Ha);return o(s),()=>t.deleteBlocker(s)},[t]),f.useEffect(()=>{a!==""&&t.getBlocker(a,i)},[t,a,i]),a&&n.blockers.has(a)?n.blockers.get(a):Ye}function Ka(){let{router:e}=nr(),t=dt(ie.UseNavigateStable),r=f.useRef(!1);return nn(()=>{r.current=!0}),f.useCallback(function(a,o){o===void 0&&(o={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,Le({fromRouteId:t},o)))},[e,t])}const Ar={};function Va(e,t,r){Ar[e]||(Ar[e]=!0)}const $a="startTransition",Nr=Qt[$a];function $i(e){let{basename:t,children:r,initialEntries:n,initialIndex:a,future:o}=e,i=f.useRef();i.current==null&&(i.current=zr({initialEntries:n,initialIndex:a,v5Compat:!0}));let s=i.current,[l,c]=f.useState({action:s.action,location:s.location}),{v7_startTransition:h}=o||{},m=f.useCallback(y=>{h&&Nr?Nr(()=>c(y)):c(y)},[c,h]);return f.useLayoutEffect(()=>s.listen(m),[s,m]),f.createElement(ft,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:s,future:o})}function Ji(e){let{to:t,replace:r,state:n,relative:a}=e;Be()||M(!1);let{future:o,static:i}=f.useContext(se),{matches:s}=f.useContext(ue),{pathname:l}=ye(),c=rr(),h=Ft(t,_t(s,o.v7_relativeSplatPath),l,a==="path"),m=JSON.stringify(h);return f.useEffect(()=>c(JSON.parse(m),{replace:r,state:n,relative:a}),[c,m,a,r,n]),null}function Yi(e){return Ma(e.context)}function Ja(e){M(!1)}function ft(e){let{basename:t="/",children:r=null,location:n,navigationType:a=V.Pop,navigator:o,static:i=!1,future:s}=e;Be()&&M(!1);let l=t.replace(/^\/*/,"/"),c=f.useMemo(()=>({basename:l,navigator:o,static:i,future:Le({v7_relativeSplatPath:!1},s)}),[l,s,o,i]);typeof n=="string"&&(n=he(n));let{pathname:h="/",search:m="",hash:y="",state:g=null,key:w="default"}=n,E=f.useMemo(()=>{let R=ae(h,l);return R==null?null:{location:{pathname:R,search:m,hash:y,state:g,key:w},navigationType:a}},[l,h,m,y,g,w,a]);return E==null?null:f.createElement(se.Provider,{value:c},f.createElement(ut.Provider,{children:r,value:E}))}function Gi(e){let{children:t,location:r}=e;return _a(Gt(t),r)}function Xi(e){let{children:t,errorElement:r,resolve:n}=e;return f.createElement(Ga,{resolve:n,errorElement:r},f.createElement(Xa,null,t))}
20var le=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(le||{});const Ya=new Promise(()=>{});class Ga extends f.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=le.pending;if(!(n instanceof Promise))o=le.success,a=Promise.resolve(),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_data",{get:()=>n});else if(this.state.error){o=le.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="_error"in a?le.error:"_data"in a?le.success:le.pending):(o=le.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===le.error&&a._error instanceof Vt)throw Ya;if(o===le.error&&!r)throw a._error;if(o===le.error)return f.createElement(Mt.Provider,{value:a,children:r});if(o===le.success)return f.createElement(Mt.Provider,{value:a,children:t});throw a}}function Xa(e){let{children:t}=e,r=za(),n=typeof t=="function"?t(r):t;return f.createElement(f.Fragment,null,n)}function Gt(e,t){t===void 0&&(t=[]);let r=[];return f.Children.forEach(e,(n,a)=>{if(!f.isValidElement(n))return;let o=[...t,a];if(n.type===f.Fragment){r.push.apply(r,Gt(n.props.children,o));return}n.type!==Ja&&M(!1),!n.props.index||!n.props.children||M(!1);let i={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=Gt(n.props.children,o)),r.push(i)}),r}function Qi(e){return ln(e)}function ar(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:f.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:f.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:f.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function Zi(e,t){return qt({basename:t?.basename,future:Le({},t?.future,{v7_prependBasename:!0}),history:zr({initialEntries:t?.initialEntries,initialIndex:t?.initialIndex}),hydrationData:t?.hydrationData,routes:e,mapRouteProperties:ar,unstable_dataStrategy:t?.unstable_dataStrategy}).initialize()}/** 21 * React Router DOM v6.23.1 22 * 23 * Copyright (c) Remix Software Inc. 24 * 25 * This source code is licensed under the MIT license found in the 26 * LICENSE.md file in the root directory of this source tree. 27 * 28 * @license MIT 29 */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 ir(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}const Lt="get",Wt="application/x-www-form-urlencoded";function It(e){return e!=null&&typeof e.tagName=="string"}function Qa(e){return It(e)&&e.tagName.toLowerCase()==="button"}function Za(e){return It(e)&&e.tagName.toLowerCase()==="form"}function qa(e){return It(e)&&e.tagName.toLowerCase()==="input"}function ei(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ti(e,t){return e.button===0&&(!t||t==="_self")&&!ei(e)}function Xt(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 ri(e,t){let r=Xt(e);return t&&t.forEach((n,a)=>
29{r.has(a)||t.getAll(a).forEach(o=>{r.append(a,o)})}),r}let xt=null;function ni(){if(xt===null)try{new FormData(document.createElement("form"),0),xt=!1}catch{xt=!0}return xt}const ai=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Kt(e){return e!=null&&!ai.has(e)?null:e}function ii(e,t){let r,n,a,o,i;if(Za(e)){let s=e.getAttribute("action");n=s?ae(s,t):null,r=e.getAttribute("method")||Lt,a=Kt(e.getAttribute("enctype"))||Wt,o=new FormData(e)}else if(Qa(e)||qa(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||s.getAttribute("action");if(n=l?ae(l,t):null,r=e.getAttribute("formmethod")||s.getAttribute("method")||Lt,a=Kt(e.getAttribute("formenctype"))||Kt(s.getAttribute("enctype"))||Wt,o=new FormData(s,e),!ni()){let{name:c,type:h,value:m}=e;if(h==="image"){let y=c?c+".":"";o.append(y+"x","0"),o.append(y+"y","0")}else c&&o.append(c,m)}}else{if(It(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Lt,n=null,a=Wt,i=e}return o&&a==="text/plain"&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}const oi=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],li=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],si=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"],ui="6";try{window.__reactRouterVersion=ui}catch{}function qi(e,t){return qt({basename:t?.basename,future:ne({},t?.future,{v7_prependBasename:!0}),history:Hr({window:t?.window}),hydrationData:t?.hydrationData||un(),routes:e,mapRouteProperties:ar,unstable_dataStrategy:t?.unstable_dataStrategy,window:t?.window}).initialize()}function eo(e,t){return qt({basename:t?.basename,future:ne({},t?.future,{v7_prependBasename:!0}),history:Wr({window:t?.window}),hydrationData:t?.hydrationData||un(),routes:e,mapRouteProperties:ar,unstable_dataStrategy:t?.unstable_dataStrategy,window:t?.window}).initialize()}function un(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=ne({},t,{errors:ci(t.errors)})),t}function ci(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 Tt(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}const cn=f.createContext({isTransitioning:!1}),dn=f.createContext(new Map),di="startTransition",De=Qt[di],fi="flushSync",jr=_n[fi],hi="useId",kr=Qt[hi];function mi(e){De?De(e):e()}function nt(e){jr?jr(e):e()}class pi{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function to(e){let{fallbackElement:t,router:r,future:n}=e,[a,o]=f.useState(r.state),[i,s]=f.useState(),[l,c]=f.useState({isTransitioning:!1}),[h,m]=f.useState(),[y,g]=f.useState(),[w,E]=f.useState(),R=f.useRef(new Map),{v7_startTransition:I}=n||{},x=f.useCallback(p=>{I?mi(p):p()},[I]),F=f.useCallback((p,A)=>{let{deletedFetchers:z,unstable_flushSync:k,unstable_viewTransitionOpts:J}=A;z.forEach(Q=>R.current.delete(Q)),p.fetchers.forEach((Q,Se)=>{Q.data!==void 0&&R.current.set(Se,Q.data)});let te=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!J||te){k?nt(()=>o(p)):x(()=>o(p));return}if(k){nt(()=>{y&&(h&&h.resolve(),y.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:J.currentLocation,nextLocation:J.nextLocation})});let Q=r.window.document.startViewTransition(()=>{nt(()=>o(p))});Q.finished.finally(()=>{nt(()=>{m(void 0),g(void 0),s(void 0),c({isTransitioning:!1})})}),nt(()=>g(Q));return}y?(h&&h.resolve(),y.skipTransition(),E({state:p,currentLocation:J.currentLocation,nextLocation:J.nextLocation})):(s(p),c({isTransitioning:!0,flushSync:!1,currentLocation:J.currentLocation,nextLocation:J.nextLocation}))},[r.window,y,h,R,x]);f.useLayoutEffect(()=>r.subscribe(F),[r,F]),f.useEffect(()=>{l.isTransitioning&&!l.flushSync&&m(new pi)},[l]),f.useEffect(()=>{if(h&&i&&r.window){let p=i,A=h.promise,z=r.window.document.startViewTransition(async()=>{x(()=>o(p)),await A});z.finished.finally(()=>{m(void 0),g(void 0),s(void 0),c({isTransitioning:!1})}),g(z)}},[x,i,h,r.window]),f.useEffect(()=>{h&&i&&a.location.key===i.location.key&&h.resolve()},[h,y,a.location,i]),f.useEffect(()=>{!l.isTransitioning&&w&&(s(w.state),c({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),E(void 0))},[l.isTransitioning,w]),f.useEffect(()=>{},[]);let O=f.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:p=>r.navigate(p),push:(p,A,z)=>r.navigate(p,{state:A,preventScrollReset:z?.preventScrollReset}),replace:(p,A,z)=>r.navigate(p,{replace:!0,state:A,preventScrollReset:z?.preventScrollReset})}),[r]),$=r.basename||"/",ce=f.useMemo(()=>({router:r,navigator:O,static:!1,basename:$}),[r,O,$]);return f.createElement(f.Fragment,null,f.createElement(st.Provider,{value:ce},f.createElement(Ut.Provider,{value:a},f.createElement(dn.Provider,{value:R.current},f.createElement(cn.Provider,{value:l},f.createElement(ft,{basename:$,location:a.location,navigationType:a.historyAction,navigator:O,future:{v7_relativeSplatPath:r.future.v7_relativeSplatPath}},a.initialized||r.future.v7_partialHydration?f.createElement(vi,{routes:r.routes,future:r.future,state:a}):t))))),null)}function vi(e){let{routes:t,future:r,state:n}=e;return on(t,void 0,n,r)}function ro(e){let{basename:t,children:r,future:n,window:a}=e,o=f.useRef();o.current==null&&(o.current=Hr({window:a,v5Compat:!0}));let i=o.current,[s,l]=f.useState({action:i.action,location:i.location}),{v7_startTransition:c}=n||{},h=f.useCallback(m=>{c&&De?De(()=>l(m)):l(m)},[l,c]);return f.useLayoutEffect(()=>i.listen(h),[i,h]),f.createElement(ft,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:i,future:n})}function no(e){let{basename:t,children:r,future:n,window:a}=e,o=f.useRef();o.current==null&&(o.current=Wr({window:a,v5Compat:!0}));let i=o.current,[s,l]=f.useState({action:i.action,location:i.location}),{v7_startTransition:c}=n||{},h=f.useCallback(m=>{c&&De?De(()=>l(m)):l(m)},[l,c]);return f.useLayoutEffect(()=>i.listen(h),[i,h]),f.createElement(ft,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:i,future:n})}function ao(e){let{basename:t,children:r,future:n,history:a}=e,[o,i]=f.useState({action:a.action,location:a.location}),{v7_startTransition:s}=n||{},l=f.useCallback(c=>{s&&De?De(()=>i(c)):i(c)},[i,s]);return f.useLayoutEffect(()=>a.listen(l),[a,l]),f.createElement(ft,{basename:t,children:r,location:o.location,navigationType:o.action,navigator:a,future:n})}const gi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yi=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bi=f.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:o,replace:i,state:s,target:l,to:c,preventScrollReset:h,unstable_viewTransition:m}=t,y=ir(t,oi),{basename:g}=f.useContext(se),w,E=!1;if(typeof c=="string"&&yi.test(c)&&(w=c,gi))try{let F=new URL(window.location.href),O=c.startsWith("//")?new URL(F.protocol+c):new URL(c),$=ae(O.pathname,g);O.origin===F.origin&&$!=null?c=$+O.search+O.hash:E=!0}catch{}let R=Da(c,{relative:a}),I=Ei(c,{replace:i,state:s,target:l,preventScrollReset:h,relative:a,unstable_viewTransition:m});function x(F){n&&n(F),F.defaultPrevented||I(F)}return f.createElement("a",ne({},y,{href:w||R,onClick:E||o?n:x,ref:r,target:l}))}),io=f.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:a=!1,className:o="",end:i=!1,style:s,to:l,unstable_viewTransition:c,children:h}=t,m=ir(t,li),y=ct(l,{relative:m.relative}),g=ye(),w=f.useContext(Ut),{navigator:E,basename:R}=f.useContext(se),I=w!=null&&Li(y)&&c===!0,x=E.encodeLocation?E.encodeLocation(y).pathname:y.pathname,F=g.pathname,O=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;a||(F=F.toLowerCase(),O=O?O.toLowerCase():null,x=x.toLowerCase()),O&&R&&(O=ae(O,R)||O);const $=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let ce=F===x||!i&&F.startsWith(x)&&F.charAt($)==="/",p=O!=null&&(O===x||!i&&O.startsWith(x)&&O.charAt(x.length)==="/"),A={isActive:ce,isPending:p,isTransitioning:I},z=ce?n:void 0,k;
29typeof o=="function"?k=o(A):k=[o,ce?"active":null,p?"pending":null,I?"transitioning":null].filter(Boolean).join(" ");let J=typeof s=="function"?s(A):s;return f.createElement(bi,ne({},m,{"aria-current":z,className:k,ref:r,style:J,to:l,unstable_viewTransition:c}),typeof h=="function"?h(A):h)}),wi=f.forwardRef((e,t)=>{let{fetcherKey:r,navigate:n,reloadDocument:a,replace:o,state:i,method:s=Lt,action:l,onSubmit:c,relative:h,preventScrollReset:m,unstable_viewTransition:y}=e,g=ir(e,si),w=hn(),E=xi(l,{relative:h}),R=s.toLowerCase()==="get"?"get":"post",I=x=>{if(c&&c(x),x.defaultPrevented)return;x.preventDefault();let F=x.nativeEvent.submitter,O=F?.getAttribute("formmethod")||s;w(F||x.currentTarget,{fetcherKey:r,method:O,navigate:n,replace:o,state:i,relative:h,preventScrollReset:m,unstable_viewTransition:y})};return f.createElement("form",ne({ref:t,method:R,action:E,onSubmit:a?c:I},g))});function oo(e){let{getKey:t,storageKey:r}=e;return Pi({getKey:t,storageKey:r}),null}var Ge;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ge||(Ge={}));var lt;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(lt||(lt={}));function Ot(e){let t=f.useContext(st);return t||M(!1),t}function or(e){let t=f.useContext(Ut);return t||M(!1),t}function Ei(e,t){let{target:r,replace:n,state:a,preventScrollReset:o,relative:i,unstable_viewTransition:s}=t===void 0?{}:t,l=rr(),c=ye(),h=ct(e,{relative:i});return f.useCallback(m=>{if(ti(m,r)){m.preventDefault();let y=n!==void 0?n:ge(c)===ge(h);l(e,{replace:y,state:a,preventScrollReset:o,relative:i,unstable_viewTransition:s})}},[c,l,h,n,a,r,e,o,i,s])}function lo(e){let t=f.useRef(Xt(e)),r=f.useRef(!1),n=ye(),a=f.useMemo(()=>ri(n.search,r.current?null:t.current),[n.search]),o=rr(),i=f.useCallback((s,l)=>{const c=Xt(typeof s=="function"?s(a):s);r.current=!0,o("?"+c,l)},[o,a]);return[a,i]}function Si(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let Ri=0,fn=()=>"__"+String(++Ri)+"__";function hn(){let{router:e}
29=Ot(Ge.UseSubmit),{basename:t}=f.useContext(se),r=Na();return f.useCallback(function(n,a){a===void 0&&(a={}),Si();let{action:o,method:i,encType:s,formData:l,body:c}=ii(n,t);if(a.navigate===!1){let h=a.fetcherKey||fn();e.fetch(h,r,a.action||o,{preventScrollReset:a.preventScrollReset,formData:l,body:c,formMethod:a.method||i,formEncType:a.encType||s,unstable_flushSync:a.unstable_flushSync})}else e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:l,body:c,formMethod:a.method||i,formEncType:a.encType||s,replace:a.replace,state:a.state,fromRouteId:r,unstable_flushSync:a.unstable_flushSync,unstable_viewTransition:a.unstable_viewTransition})},[e,t,r])}function xi(e,t){let{relative:r}=t===void 0?{}:t,{basename:n}=f.useContext(se),a=f.useContext(ue);a||M(!1);let[o]=a.matches.slice(-1),i=ne({},ct(e||".",{relative:r})),s=ye();if(e==null){i.search=s.search;let l=new URLSearchParams(i.search);l.has("index")&&l.get("index")===""&&(l.delete("index"),i.search=l.toString()?"?"+l.toString():"")}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:pe([n,i.pathname])),ge(i)}function so(e){var t;let{key:r}=e===void 0?{}:e,{router:n}=Ot(Ge.UseFetcher),a=or(lt.UseFetcher),o=f.useContext(dn),i=f.useContext(ue),s=(t=i.matches[i.matches.length-1])==null?void 0:t.route.id;o||M(!1),i||M(!1),s==null&&M(!1);let l=kr?kr():"",[c,h]=f.useState(r||l);r&&r!==c?h(r):c||h(fn()),f.useEffect(()=>(n.getFetcher(c),()=>{n.deleteFetcher(c)}),[n,c]);let m=f.useCallback((x,F)=>{s||M(!1),n.fetch(c,s,x,F)},[c,s,n]),y=hn(),g=f.useCallback((x,F)=>{y(x,ne({},F,{navigate:!1,fetcherKey:c}))},[c,y]),w=f.useMemo(()=>f.forwardRef((F,O)=>f.createElement(wi,ne({},F,{navigate:!1,fetcherKey:c,ref:O}))),[c]),E=a.fetchers.get(c)||Xr,R=o.get(c);return f.useMemo(()=>ne({Form:w,submit:g,load:m},E,{data:R}),[w,g,m,E,R])}function uo(){let e=or(lt.UseFetchers);return Array.from(e.fetchers.entries()).map(t=>{let[r,n]=t;return ne({},n,{key:r})})}const Br="react-router-scroll-positions";let Pt={};function Pi(e){let{getKey:t,storageKey:r}=e===void 0?{}:e,{router:n}=Ot(Ge.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:o}=or(lt.UseScrollRestoration),{basename:i}=f.useContext(se),s=ye(),l=ka(),c=ja();f.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),Ci(f.useCallback(()=>{if(c.state==="idle"){let h=(t?t(s,l):null)||s.key;Pt[h]=window.scrollY}try{sessionStorage.setItem(r||Br,JSON.stringify(Pt))}catch{}window.history.scrollRestoration="auto"},[r,t,c.state,s,l])),typeof document<"u"&&(f.useLayoutEffect(()=>{try{let h=sessionStorage.getItem(r||Br);h&&(Pt=JSON.parse(h))}catch{}},[r]),f.useLayoutEffect(()=>{let h=t&&i!=="/"?(y,g)=>t(ne({},y,{pathname:ae(y.pathname,i)||y.pathname}),g):t,m=n?.enableScrollRestoration(Pt,()=>window.scrollY,h);return()=>m&&m()},[n,i,t]),f.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}if(s.hash){let h=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(h){h.scrollIntoView();return}}o!==!0&&window.scrollTo(0,0)}},[s,a,o]))}function co(e,t){let{capture:r}=t||{};f.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("beforeunload",e,n),()=>{window.removeEventListener("beforeunload",e,n)}},[e,r])}function Ci(e,t){let{capture:r}={};f.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,n),()=>{window.removeEventListener("pagehide",e,n)}},[e,r])}function fo(e){let{when:t,message:r}=e,n=Wa(t);f.useEffect(()=>{n.state==="blocked"&&(window.confirm(r)?setTimeout(n.proceed,0):n.reset())},[n,r]),f.useEffect(()=>{n.state==="blocked"&&!t&&n.reset()},[n,t])}function Li(e,t){t===void 0&&(t={});let r=f.useContext(cn);r==null&&M(!1);let{basename:n}=Ot(Ge.useViewTransitionState),a=ct(e,{relative:t.relative});if(!r.isTransitioning)return!1;let o=ae(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=ae(r.nextLocation.pathname,n)||r.nextLocation.pathname;return it(a.pathname,i)!=null||it(a.pathname,o)!=null}export{Vt as AbortedDeferredError,Xi as Await,ro as BrowserRouter,wi as Form,no as HashRouter,bi as
29Link,$i as MemoryRouter,io as NavLink,Ji as Navigate,V as NavigationType,Yi as Outlet,Ja as Route,ft as Router,to as RouterProvider,Gi as Routes,oo as ScrollRestoration,st as UNSAFE_DataRouterContext,Ut as UNSAFE_DataRouterStateContext,Tt as UNSAFE_ErrorResponseImpl,dn as UNSAFE_FetchersContext,ut as UNSAFE_LocationContext,se as UNSAFE_NavigationContext,ue as UNSAFE_RouteContext,cn as UNSAFE_ViewTransitionContext,Na as UNSAFE_useRouteId,Pi as UNSAFE_useScrollRestoration,qi as createBrowserRouter,eo as createHashRouter,Zi as createMemoryRouter,ge as createPath,Gt as createRoutesFromChildren,Gt as createRoutesFromElements,Xt as createSearchParams,Oi as defer,Ui as generatePath,ot as isRouteErrorResponse,Ii as json,it as matchPath,Ae as matchRoutes,he as parsePath,ra as redirect,Ai as redirectDocument,Qi as renderMatches,Gn as resolvePath,ao as unstable_HistoryRouter,fo as unstable_usePrompt,Li as unstable_useViewTransitionState,Ki as useActionData,Vi as useAsyncError,za as useAsyncValue,co as useBeforeUnload,Wa as useBlocker,so as useFetcher,uo as useFetchers,xi as useFormAction,Da as useHref,Be as useInRouterContext,Ei as useLinkClickHandler,Hi as useLoaderData,ye as useLocation,ji as useMatch,ka as useMatches,rr as useNavigate,ja as useNavigation,Ni as useNavigationType,Ma as useOutlet,ki as useOutletContext,Bi as useParams,ct as useResolvedPath,zi as useRevalidator,Ba as useRouteError,Wi as useRouteLoaderData,_a as useRoutes,lo as useSearchParams,hn as useSubmit};
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.