PageSourceSearch

https://app.laneapp.co/assets/index-I4AokuEV.js

js laneapp.co collected 2026-09-24 13:33:14 UTC 86,488 bytes, 29 lines download raw bytes

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

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.