react-router 7.0.0-pre.1 → 7.0.0-pre.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/dist/dom-export.mjs +10 -2
- package/dist/dom-export.mjs.map +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.mjs +1375 -219
- package/dist/index.mjs.map +1 -1
- package/dist/lib/components.d.ts +6 -6
- package/dist/lib/dom/lib.d.ts +3 -2
- package/dist/lib/dom/ssr/components.d.ts +0 -1
- package/dist/lib/dom/ssr/data.d.ts +0 -5
- package/dist/lib/dom/ssr/entry.d.ts +2 -1
- package/dist/lib/dom/ssr/routeModules.d.ts +64 -22
- package/dist/lib/dom/ssr/routes.d.ts +2 -5
- package/dist/lib/hooks.d.ts +4 -3
- package/dist/lib/router/router.d.ts +4 -0
- package/dist/lib/router/utils.d.ts +1 -9
- package/dist/lib/server-runtime/build.d.ts +1 -1
- package/dist/lib/server-runtime/cookies.d.ts +5 -5
- package/dist/lib/server-runtime/data.d.ts +1 -5
- package/dist/lib/server-runtime/routeModules.d.ts +3 -175
- package/dist/lib/server-runtime/routes.d.ts +2 -22
- package/dist/lib/server-runtime/sessions.d.ts +4 -4
- package/dist/lib/types.d.ts +17 -10
- package/dist/lib/types.mjs +1 -1
- package/dist/main-dom-export.js +1 -1
- package/dist/main.js +1 -1
- package/dist/react-router-dom.development.js +2 -2
- package/dist/react-router-dom.development.js.map +1 -1
- package/dist/react-router-dom.production.min.js +2 -2
- package/dist/react-router-dom.production.min.js.map +1 -1
- package/dist/react-router.development.js +196 -171
- package/dist/react-router.development.js.map +1 -1
- package/dist/react-router.production.min.js +2 -2
- package/dist/react-router.production.min.js.map +1 -1
- package/dist/umd/react-router-dom.development.js +2 -2
- package/dist/umd/react-router-dom.development.js.map +1 -1
- package/dist/umd/react-router-dom.production.min.js +2 -2
- package/dist/umd/react-router-dom.production.min.js.map +1 -1
- package/dist/umd/react-router.development.js +195 -179
- package/dist/umd/react-router.development.js.map +1 -1
- package/dist/umd/react-router.production.min.js +2 -2
- package/dist/umd/react-router.production.min.js.map +1 -1
- package/package.json +4 -4
- package/dist/lib/server-runtime/jsonify.d.ts +0 -33
- package/dist/lib/server-runtime/responses.d.ts +0 -37
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* React Router v7.0.0-pre.
|
|
2
|
+
* React Router v7.0.0-pre.2
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
|
-
import*as e from"react";import{decode as t,encode as r}from"turbo-stream";import{parse as n,serialize as a}from"cookie";import{splitCookiesString as o}from"set-cookie-parser";let i=function(e){return e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE",e}({});function s(e={}){let t,{initialEntries:r=["/"],initialIndex:n,v5Compat:a=!1}=e;t=r.map(((e,t)=>d(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let o=u(null==n?t.length-1:n),s=i.Pop,l=null;function u(e){return Math.min(Math.max(e,0),t.length-1)}function c(){return t[o]}function d(e,r=null,n){return h(t?c().pathname:"/",e,r,n)}function p(e){return"string"==typeof e?e:f(e)}return{get index(){return o},get action(){return s},get location(){return c()},createHref:p,createURL:e=>new URL(p(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?m(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,r){s=i.Push;let n=d(e,r);o+=1,t.splice(o,t.length,n),a&&l&&l({action:s,location:n,delta:1})},replace(e,r){s=i.Replace;let n=d(e,r);t[o]=n,a&&l&&l({action:s,location:n,delta:0})},go(e){s=i.Pop;let r=u(o+e),n=t[r];o=r,l&&l({action:s,location:n,delta:e})},listen:e=>(l=e,()=>{l=null})}}function l(e={}){return p((function(e,t){let{pathname:r,search:n,hash:a}=e.location;return h("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:f(t)}),null,e)}function u(e={}){return p((function(e,t){let{pathname:r="/",search:n="",hash:a=""}=m(e.location.hash.substr(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),h("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"==typeof t?t:f(t))}),(function(e,t){}),e)}function c(e,t){if(!1===e||null==e)throw new Error(t)}function d(e,t){return{usr:e.state,key:e.key,idx:t}}function h(e,t,r=null,n){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?m(t):t,state:r,key:t&&t.key||n||Math.random().toString(36).substr(2,8)}}function f({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function m(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 p(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,s=a.history,l=i.Pop,u=null,m=p();function p(){return(s.state||{idx:null}).idx}function y(){l=i.Pop;let e=p(),t=null==e?null:e-m;m=e,u&&u({action:l,location:v.location,delta:t})}function g(e){let t="null"!==a.location.origin?a.location.origin:a.location.href,r="string"==typeof e?e:f(e);return r=r.replace(/ $/,"%20"),t||c(!1),new URL(r,t)}null==m&&(m=0,s.replaceState({...s.state,idx:m},""));let v={get action(){return l},get location(){return e(a,s)},listen(e){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener("popstate",y),u=e,()=>{a.removeEventListener("popstate",y),u=null}},createHref:e=>t(a,e),createURL:g,encodeLocation(e){let t=g(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){l=i.Push;let n=h(v.location,e,t);r&&r(n,e),m=p()+1;let c=d(n,m),f=v.createHref(n);try{s.pushState(c,"",f)}catch(y){if(y instanceof DOMException&&"DataCloneError"===y.name)throw y;a.location.assign(f)}o&&u&&u({action:l,location:v.location,delta:1})},replace:function(e,t){l=i.Replace;let n=h(v.location,e,t);r&&r(n,e),m=p();let a=d(n,m),c=v.createHref(n);s.replaceState(a,"",c),o&&u&&u({action:l,location:v.location,delta:0})},go:e=>s.go(e)};return v}let y=function(e){return e.data="data",e.redirect="redirect",e.error="error",e}({});const g=new Set(["lazy","caseSensitive","path","id","index","children"]);function v(e,t,r=[],n={}){return e.map(((e,a)=>{let o=[...r,String(a)],i="string"==typeof e.id?e.id:o.join("-");if(!0===e.index&&e.children&&c(!1),n[i]&&c(!1),function(e){return!0===e.index}(e)){let r={...e,...t(e),id:i};return n[i]=r,r}{let r={...e,...t(e),id:i,children:void 0};return n[i]=r,e.children&&(r.children=v(e.children,t,o,n)),r}}))}function w(e,t,r="/"){return b(e,t,r,!1)}function b(e,t,r,n){let a=M(("string"==typeof t?m(t):t).pathname||"/",r);if(null==a)return null;let o=S(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let i=null;for(let s=0;null==i&&s<o.length;++s){let e=A(a);i=k(o[s],e,n)}return i}function E(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 S(e,t=[],r=[],n=""){let a=(e,a,o)=>{let i={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};i.relativePath.startsWith("/")&&(i.relativePath.startsWith(n)||c(!1),i.relativePath=i.relativePath.slice(n.length));let s=j([n,i.relativePath]),l=r.concat(i);e.children&&e.children.length>0&&(!0===e.index&&c(!1),S(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:D(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let r of R(e.path))a(e,t,r);else a(e,t)})),t}function R(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(0===n.length)return a?[o,""]:[o];let i=R(n.join("/")),s=[];return s.push(...i.map((e=>""===e?o:[o,e].join("/")))),a&&s.push(...i),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const x=/^:[\w-]+$/,C=e=>"*"===e;function D(e,t){let r=e.split("/"),n=r.length;return r.some(C)&&(n+=-2),t&&(n+=2),r.filter((e=>!C(e))).reduce(((e,t)=>e+(x.test(t)?3:""===t?1:10)),n)}function k(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",i=[];for(let s=0;s<n.length;++s){let e=n[s],l=s===n.length-1,u="/"===o?t:t.slice(o.length)||"/",c=T({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},u),d=e.route;if(!c&&l&&r&&!n[n.length-1].route.index&&(c=T({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!c)return null;Object.assign(a,c.params),i.push({params:a,pathname:j([o,c.pathname]),pathnameBase:F(j([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=j([o,c.pathnameBase]))}return i}function L(e,t={}){let r=e;r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(r=r.replace(/\*$/,"/*"));const n=r.startsWith("/")?"/":"",a=e=>null==e?"":"string"==typeof e?e:String(e);return n+r.split(/\/+/).map(((e,r,n)=>{if(r===n.length-1&&"*"===e){return a(t["*"])}const o=e.match(/^:([\w-]+)(\??)$/);if(o){const[,e,r]=o;let n=t[e];return"?"!==r&&null==n&&c(!1),a(n)}return e.replace(/\?$/g,"")})).filter((e=>!!e)).join("/")}function T(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t=!1,r=!0){let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(n.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))");return[new RegExp(a,t?void 0:"i"),n]}(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(((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=s[n]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const a=s[n];return e[t]=r&&!a?void 0:(a||"").replace(/%2F/g,"/"),e}),{}),pathname:o,pathnameBase:i,pattern:e}}function A(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return e}}function M(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function O(e,t="/"){let{pathname:r,search:n="",hash:a=""}="string"==typeof e?m(e):e,o=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:o,search:N(n),hash:H(a)}}function P(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function _(e){let t=P(e);return t.map(((e,r)=>r===t.length-1?e.pathname:e.pathnameBase))}function U(e,t,r,n=!1){let a;"string"==typeof e?a=m(e):(a={...e},a.pathname&&a.pathname.includes("?")&&c(!1),a.pathname&&a.pathname.includes("#")&&c(!1),a.search&&a.search.includes("#")&&c(!1));let o,i=""===e||""===a.pathname,s=i?"/":a.pathname;if(null==s)o=r;else{let e=t.length-1;if(!n&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=O(a,o),u=s&&"/"!==s&&s.endsWith("/"),d=(i||"."===s)&&r.endsWith("/");return l.pathname.endsWith("/")||!u&&!d||(l.pathname+="/"),l}const j=e=>e.join("/").replace(/\/\/+/g,"/"),F=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),N=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",H=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",$=(e,t={})=>{let r="number"==typeof t?{status:t}:t,n=new Headers(r.headers);return n.has("Content-Type")||n.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),{...r,headers:n})};class I{type="DataWithResponseInit";constructor(e,t){this.data=e,this.init=t||null}}function B(e,t){return new I(e,"number"==typeof t?{status:t}:t)}const z=(e,t=302)=>{let r=t;"number"==typeof r?r={status:r}:void 0===r.status&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,{...r,headers:n})},q=(e,t)=>{let r=z(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},J=(e,t)=>{let r=z(e,t);return r.headers.set("X-Remix-Replace","true"),r};class W{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function X(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const V=["POST","PUT","PATCH","DELETE"],Y=new Set(V),K=["GET",...V],G=new Set(K),Q=new Set([301,302,303,307,308]),Z=new Set([307,308]),ee={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},te={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},re={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ne=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ae=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),oe=Symbol("ResetLoaderData");function ie(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,r=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement;e.routes.length>0||c(!1);let n,a,o,s=e.mapRouteProperties||ae,l={},u=v(e.routes,s,void 0,l),d=e.basename||"/",f=e.dataStrategy||ve,m=e.patchRoutesOnNavigation,p={...e.future},g=null,S=new Set,R=null,x=null,C=null,D=null!=e.hydrationData,k=w(u,e.history.location,d),L=null;if(null==k&&!m){let t=Oe(404,{pathname:e.history.location.pathname}),{matches:r,route:n}=Me(u);k=r,L={[n.id]:t}}if(k&&!e.hydrationData){et(k,u,e.history.location.pathname).active&&(k=null)}if(k)if(k.some((e=>e.route.lazy)))a=!1;else if(k.some((e=>e.route.loader))){let t=e.hydrationData?e.hydrationData.loaderData:null,r=e.hydrationData?e.hydrationData.errors:null;if(r){let e=k.findIndex((e=>void 0!==r[e.route.id]));a=k.slice(0,e+1).every((e=>!fe(e.route,t,r)))}else a=k.every((e=>!fe(e.route,t,r)))}else a=!0;else{a=!1,k=[];let t=et(null,u,e.history.location.pathname);t.active&&t.matches&&(k=t.matches)}let T,A,O={historyAction:e.history.action,location:e.history.location,matches:k,initialized:a,navigation:ee,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||L,fetchers:new Map,blockers:new Map},P=i.Pop,_=!1,U=!1,j=new Map,F=null,N=!1,H=!1,$=new Set,I=new Map,B=0,z=-1,q=new Map,J=new Set,W=new Map,V=new Map,Y=new Set,K=new Map,G=null;function Q(e,t={}){O={...O,...e};let r=[],n=[];O.fetchers.forEach(((e,t)=>{"idle"===e.state&&(Y.has(t)?r.push(t):n.push(t))})),[...S].forEach((e=>e(O,{deletedFetchers:r,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync}))),r.forEach((e=>De(e))),n.forEach((e=>O.fetchers.delete(e)))}function oe(t,r,{flushSync:a}={}){let o,s=null!=O.actionData&&null!=O.navigation.formMethod&&Ie(O.navigation.formMethod)&&"loading"===O.navigation.state&&!0!==t.state?._isRedirect;o=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:s?O.actionData:null;let l=r.loaderData?Le(O.loaderData,r.loaderData,r.matches||[],r.errors):O.loaderData,c=O.blockers;c.size>0&&(c=new Map(c),c.forEach(((e,t)=>c.set(t,re))));let d,h=!0===_||null!=O.navigation.formMethod&&Ie(O.navigation.formMethod)&&!0!==t.state?._isRedirect;if(n&&(u=n,n=void 0),N||P===i.Pop||(P===i.Push?e.history.push(t,t.state):P===i.Replace&&e.history.replace(t,t.state)),P===i.Pop){let e=j.get(O.location.pathname);e&&e.has(t.pathname)?d={currentLocation:O.location,nextLocation:t}:j.has(t.pathname)&&(d={currentLocation:t,nextLocation:O.location})}else if(U){let e=j.get(O.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),j.set(O.location.pathname,e)),d={currentLocation:O.location,nextLocation:t}}Q({...r,actionData:o,loaderData:l,historyAction:P,location:t,initialized:!0,navigation:ee,revalidation:"idle",restoreScrollPosition:Ze(t,r.matches||O.matches),preventScrollReset:h,blockers:c},{viewTransitionOpts:d,flushSync:!0===a}),P=i.Pop,_=!1,U=!1,N=!1,H=!1,G?.resolve(),G=null}async function ie(t,r,a){T&&T.abort(),T=null,P=t,N=!0===(a&&a.startUninterruptedRevalidation),function(e,t){if(R&&C){let r=Qe(e,t);R[r]=C()}}(O.location,O.matches),_=!0===(a&&a.preventScrollReset),U=!0===(a&&a.enableViewTransition);let o=n||u,s=a&&a.overrideNavigation,l=w(o,r,d),c=!0===(a&&a.flushSync),h=et(l,o,r.pathname);if(h.active&&h.matches&&(l=h.matches),!l){let{error:e,notFoundMatches:t,route:n}=Ge(r.pathname);return void oe(r,{matches:t,loaderData:{},errors:{[n.id]:e}},{flushSync:c})}if(O.initialized&&!H&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(O.location,r)&&!(a&&a.submission&&Ie(a.submission.formMethod)))return void oe(r,{matches:l},{flushSync:c});T=new AbortController;let f,m=Re(e.history,r,T.signal,a&&a.submission);if(a&&a.pendingError)f=[Ae(l).route.id,{type:y.error,error:a.pendingError}];else if(a&&a.submission&&Ie(a.submission.formMethod)){let t=await async function(e,t,r,n,a,o={}){let s;if(pe(),Q({navigation:We(t,r)},{flushSync:!0===o.flushSync}),a){let r=await tt(n,t.pathname,e.signal);if("aborted"===r.type)return{shortCircuited:!0};if("error"===r.type){let e=Ae(r.partialMatches).route.id;return{matches:r.partialMatches,pendingActionResult:[e,{type:y.error,error:r.error}]}}if(!r.matches){let{notFoundMatches:e,error:r,route:n}=Ge(t.pathname);return{matches:e,pendingActionResult:[n.id,{type:y.error,error:r}]}}n=r.matches}let l=ze(n,t);if(l.route.action||l.route.lazy){if(s=(await de("action",O,e,[l],n,null))[l.route.id],e.signal.aborted)return{shortCircuited:!0}}else s={type:y.error,error:Oe(405,{method:e.method,pathname:t.pathname,routeId:l.route.id})};if(Fe(s)){let t;if(o&&null!=o.replace)t=o.replace;else{t=Se(s.response.headers.get("Location"),new URL(e.url),d)===O.location.pathname+O.location.search}return await le(e,s,!0,{submission:r,replace:t}),{shortCircuited:!0}}if(je(s)){let e=Ae(n,l.route.id);return!0!==(o&&o.replace)&&(P=i.Push),{matches:n,pendingActionResult:[e.route.id,s]}}return{matches:n,pendingActionResult:[l.route.id,s]}}(m,r,a.submission,l,h.active,{replace:a.replace,flushSync:c});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,n]=t.pendingActionResult;if(je(n)&&X(n.error)&&404===n.error.status)return T=null,void oe(r,{matches:t.matches,loaderData:{},errors:{[e]:n.error}})}l=t.matches||l,f=t.pendingActionResult,s=Je(r,a.submission),c=!1,h.active=!1,m=Re(e.history,m.url,m.signal)}let{shortCircuited:p,matches:g,loaderData:v,errors:b}=await async function(t,r,a,o,i,s,l,c,h,f,m){let p=i||Je(r,s),y=s||l||qe(p),g=!N&&!h;if(o){if(g){let e=se(m);Q({navigation:p,...void 0!==e?{actionData:e}:{}},{flushSync:f})}let e=await tt(a,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=Ae(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:n}=Ge(r.pathname);return{matches:t,loaderData:{},errors:{[n.id]:e}}}a=e.matches}let v=n||u,[w,b]=he(e.history,O,a,y,r,!0===h,H,$,Y,W,J,v,d,m);if(z=++B,0===w.length&&0===b.length){let e=He();return oe(r,{matches:a,loaderData:{},errors:m&&je(m[1])?{[m[0]]:m[1].error}:null,...Te(m),...e?{fetchers:new Map(O.fetchers)}:{}},{flushSync:f}),{shortCircuited:!0}}if(g){let e={};if(!o){e.navigation=p;let t=se(m);void 0!==t&&(e.actionData=t)}b.length>0&&(e.fetchers=function(e){return e.forEach((e=>{let t=O.fetchers.get(e.key),r=Xe(void 0,t?t.data:void 0);O.fetchers.set(e.key,r)})),new Map(O.fetchers)}(b)),Q(e,{flushSync:f})}b.forEach((e=>{_e(e.key),e.controller&&I.set(e.key,e.controller)}));let E=()=>b.forEach((e=>_e(e.key)));T&&T.signal.addEventListener("abort",E);let{loaderResults:S,fetcherResults:R}=await me(O,a,w,b,t);if(t.signal.aborted)return{shortCircuited:!0};T&&T.signal.removeEventListener("abort",E);b.forEach((e=>I.delete(e.key)));let x=Pe(S);if(x)return await le(t,x.result,!0,{replace:c}),{shortCircuited:!0};if(x=Pe(R),x)return J.add(x.key),await le(t,x.result,!0,{replace:c}),{shortCircuited:!0};let{loaderData:C,errors:D}=ke(O,a,S,m,b,R);h&&O.errors&&(D={...O.errors,...D});let k=He(),L=$e(z),A=k||L||b.length>0;return{matches:a,loaderData:C,errors:D,...A?{fetchers:new Map(O.fetchers)}:{}}}(m,r,l,h.active,s,a&&a.submission,a&&a.fetcherSubmission,a&&a.replace,a&&!0===a.initialHydration,c,f);p||(T=null,oe(r,{matches:g||l,...Te(f),loaderData:v,errors:b}))}function se(e){return e&&!je(e[1])?{[e[0]]:e[1].data}:O.actionData?0===Object.keys(O.actionData).length?null:O.actionData:void 0}async function le(n,a,o,{submission:s,fetcherSubmission:l,preventScrollReset:u,replace:f}={}){a.response.headers.has("X-Remix-Revalidate")&&(H=!0);let m=a.response.headers.get("Location");m||c(!1),m=Se(m,new URL(n.url),d);let p=h(O.location,m,{_isRedirect:!0});if(r){let r=!1;if(a.response.headers.has("X-Remix-Reload-Document"))r=!0;else if(ne.test(m)){const n=e.history.createURL(m);r=n.origin!==t.location.origin||null==M(n.pathname,d)}if(r)return void(f?t.location.replace(m):t.location.assign(m))}T=null;let y=!0===f||a.response.headers.has("X-Remix-Replace")?i.Replace:i.Push,{formMethod:g,formAction:v,formEncType:w}=O.navigation;!s&&!l&&g&&v&&w&&(s=qe(O.navigation));let b=s||l;if(Z.has(a.response.status)&&b&&Ie(b.formMethod))await ie(y,p,{submission:{...b,formAction:m},preventScrollReset:u||_,enableViewTransition:o?U:void 0});else{let e=Je(p,s);await ie(y,p,{overrideNavigation:e,fetcherSubmission:l,preventScrollReset:u||_,enableViewTransition:o?U:void 0})}}async function de(e,t,r,n,a,o){let i,u={};try{i=await we(f,e,t,r,n,a,o,l,s)}catch(c){return n.forEach((e=>{u[e.route.id]={type:y.error,error:c}})),u}for(let[s,l]of Object.entries(i))if(Ue(l)){let e=l.result;u[s]={type:y.redirect,response:Ee(e,r,s,a,d)}}else u[s]=await be(l);return u}async function me(t,r,n,a,o){t.matches;let i=de("loader",t,o,n,r,null),s=Promise.all(a.map((async r=>{if(r.matches&&r.match&&r.controller){let n=(await de("loader",t,Re(e.history,r.path,r.controller.signal),[r.match],r.matches,r.key))[r.match.route.id];return{[r.key]:n}}return Promise.resolve({[r.key]:{type:y.error,error:Oe(404,{pathname:r.path})}})})));return{loaderResults:await i,fetcherResults:(await s).reduce(((e,t)=>Object.assign(e,t)),{})}}function pe(){H=!0,W.forEach(((e,t)=>{I.has(t)&&$.add(t),_e(t)}))}function ge(e,t,r={}){O.fetchers.set(e,t),Q({fetchers:new Map(O.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function xe(e,t,r,n={}){let a=Ae(O.matches,t);De(e),Q({errors:{[a.route.id]:r},fetchers:new Map(O.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function Ce(e){return V.set(e,(V.get(e)||0)+1),Y.has(e)&&Y.delete(e),O.fetchers.get(e)||te}function De(e){let t=O.fetchers.get(e);!I.has(e)||t&&"loading"===t.state&&q.has(e)||_e(e),W.delete(e),q.delete(e),J.delete(e),Y.delete(e),$.delete(e),O.fetchers.delete(e)}function _e(e){let t=I.get(e);t&&(t.abort(),I.delete(e))}function Ne(e){for(let t of e){let e=Ve(Ce(t).data);O.fetchers.set(t,e)}}function He(){let e=[],t=!1;for(let r of J){let n=O.fetchers.get(r);n||c(!1),"loading"===n.state&&(J.delete(r),e.push(r),t=!0)}return Ne(e),t}function $e(e){let t=[];for(let[r,n]of q)if(n<e){let e=O.fetchers.get(r);e||c(!1),"loading"===e.state&&(_e(r),q.delete(r),t.push(r))}return Ne(t),t.length>0}function Be(e){O.blockers.delete(e),K.delete(e)}function Ye(e,t){let r=O.blockers.get(e)||re;"unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state||c(!1);let n=new Map(O.blockers);n.set(e,t),Q({blockers:n})}function Ke({currentLocation:e,nextLocation:t,historyAction:r}){if(0===K.size)return;K.size;let n=Array.from(K.entries()),[a,o]=n[n.length-1],i=O.blockers.get(a);return i&&"proceeding"===i.state?void 0:o({currentLocation:e,nextLocation:t,historyAction:r})?a:void 0}function Ge(e){let t=Oe(404,{pathname:e}),r=n||u,{matches:a,route:o}=Me(r);return{notFoundMatches:a,route:o,error:t}}function Qe(e,t){if(x){return x(e,t.map((e=>E(e,O.loaderData))))||e.key}return e.key}function Ze(e,t){if(R){let r=Qe(e,t),n=R[r];if("number"==typeof n)return n}return null}function et(e,t,r){if(m){if(!e){return{active:!0,matches:b(t,r,d,!0)||[]}}if(Object.keys(e[0].params).length>0){return{active:!0,matches:b(t,r,d,!0)}}}return{active:!1,matches:null}}async function tt(e,t,r){if(!m)return{type:"success",matches:e};let a=e;for(;;){let e=null==n,i=n||u,c=l;try{await m({path:t,matches:a,patch:(e,t)=>{r.aborted||ye(e,t,i,c,s)}})}catch(o){return{type:"error",error:o,partialMatches:a}}finally{e&&!r.aborted&&(u=[...u])}if(r.aborted)return{type:"aborted"};let h=w(i,t,d);if(h)return{type:"success",matches:h};let f=b(i,t,d,!0);if(!f||a.length===f.length&&a.every(((e,t)=>e.route.id===f[t].route.id)))return{type:"success",matches:null};a=f}}return o={get basename(){return d},get future(){return p},get state(){return O},get routes(){return u},get window(){return t},initialize:function(){if(g=e.history.listen((({action:t,location:r,delta:n})=>{if(A)return A(),void(A=void 0);let a=Ke({currentLocation:O.location,nextLocation:r,historyAction:t});if(a&&null!=n){let t=new Promise((e=>{A=e}));return e.history.go(-1*n),void Ye(a,{state:"blocked",location:r,proceed(){Ye(a,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),t.then((()=>e.history.go(n)))},reset(){let e=new Map(O.blockers);e.set(a,re),Q({blockers:e})}})}return ie(t,r)})),r){!function(e,t){try{let r=e.sessionStorage.getItem("remix-router-transitions");if(r){let e=JSON.parse(r);for(let[r,n]of Object.entries(e||{}))n&&Array.isArray(n)&&t.set(r,new Set(n||[]))}}catch(r){}}(t,j);let e=()=>function(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem("remix-router-transitions",JSON.stringify(n))}catch(r){}}}(t,j);t.addEventListener("pagehide",e),F=()=>t.removeEventListener("pagehide",e)}return O.initialized||ie(i.Pop,O.location,{initialHydration:!0}),o},subscribe:function(e){return S.add(e),()=>S.delete(e)},enableScrollRestoration:function(e,t,r){if(R=e,C=t,x=r||null,!D&&O.navigation===ee){D=!0;let e=Ze(O.location,O.matches);null!=e&&Q({restoreScrollPosition:e})}return()=>{R=null,C=null,x=null}},navigate:async function t(r,n){if("number"==typeof r)return void e.history.go(r);let a=ue(O.location,O.matches,d,r,n?.fromRouteId,n?.relative),{path:o,submission:s,error:l}=ce(!1,a,n),u=O.location,c=h(O.location,o,n&&n.state);c={...c,...e.history.encodeLocation(c)};let f=n&&null!=n.replace?n.replace:void 0,m=i.Push;!0===f?m=i.Replace:!1===f||null!=s&&Ie(s.formMethod)&&s.formAction===O.location.pathname+O.location.search&&(m=i.Replace);let p=n&&"preventScrollReset"in n?!0===n.preventScrollReset:void 0,y=!0===(n&&n.flushSync),g=Ke({currentLocation:u,nextLocation:c,historyAction:m});g?Ye(g,{state:"blocked",location:c,proceed(){Ye(g,{state:"proceeding",proceed:void 0,reset:void 0,location:c}),t(r,n)},reset(){let e=new Map(O.blockers);e.set(g,re),Q({blockers:e})}}):await ie(m,c,{submission:s,pendingError:l,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:y})},fetch:async function(t,r,a,o){_e(t);let i=!0===(o&&o.flushSync),s=n||u,l=ue(O.location,O.matches,d,a,r,o?.relative),h=w(s,l,d),f=et(h,s,l);if(f.active&&f.matches&&(h=f.matches),!h)return void xe(t,r,Oe(404,{pathname:l}),{flushSync:i});let{path:m,submission:p,error:y}=ce(!0,l,o);if(y)return void xe(t,r,y,{flushSync:i});let g=ze(h,m),v=!0===(o&&o.preventScrollReset);p&&Ie(p.formMethod)?await async function(t,r,a,o,i,s,l,h,f){function m(e){if(!e.route.action&&!e.route.lazy){let e=Oe(405,{method:f.formMethod,pathname:a,routeId:r});return xe(t,r,e,{flushSync:l}),!0}return!1}if(pe(),W.delete(t),!s&&m(o))return;let p=O.fetchers.get(t);ge(t,function(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}}(f,p),{flushSync:l});let y=new AbortController,g=Re(e.history,a,y.signal,f);if(s){let e=await tt(i,a,g.signal);if("aborted"===e.type)return;if("error"===e.type)return void xe(t,r,e.error,{flushSync:l});if(!e.matches)return void xe(t,r,Oe(404,{pathname:a}),{flushSync:l});if(m(o=ze(i=e.matches,a)))return}I.set(t,y);let v=B,b=(await de("action",O,g,[o],i,t))[o.route.id];if(g.signal.aborted)return void(I.get(t)===y&&I.delete(t));if(Y.has(t)){if(Fe(b)||je(b))return void ge(t,Ve(void 0))}else{if(Fe(b))return I.delete(t),z>v?void ge(t,Ve(void 0)):(J.add(t),ge(t,Xe(f)),le(g,b,!1,{fetcherSubmission:f,preventScrollReset:h}));if(je(b))return void xe(t,r,b.error)}let E=O.navigation.location||O.location,S=Re(e.history,E,y.signal),R=n||u,x="idle"!==O.navigation.state?w(R,O.navigation.location,d):O.matches;x||c(!1);let C=++B;q.set(t,C);let D=Xe(f,b.data);O.fetchers.set(t,D);let[k,L]=he(e.history,O,x,f,E,!1,H,$,Y,W,J,R,d,[o.route.id,b]);L.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,r=O.fetchers.get(t),n=Xe(void 0,r?r.data:void 0);O.fetchers.set(t,n),_e(t),e.controller&&I.set(t,e.controller)})),Q({fetchers:new Map(O.fetchers)});let A=()=>L.forEach((e=>_e(e.key)));y.signal.addEventListener("abort",A);let{loaderResults:M,fetcherResults:_}=await me(O,x,k,L,S);if(y.signal.aborted)return;y.signal.removeEventListener("abort",A),q.delete(t),I.delete(t),L.forEach((e=>I.delete(e.key)));let U=Pe(M);if(U)return le(S,U.result,!1,{preventScrollReset:h});if(U=Pe(_),U)return J.add(U.key),le(S,U.result,!1,{preventScrollReset:h});let{loaderData:j,errors:F}=ke(O,x,M,void 0,L,_);if(O.fetchers.has(t)){let e=Ve(b.data);O.fetchers.set(t,e)}$e(C),"loading"===O.navigation.state&&C>z?(P||c(!1),T&&T.abort(),oe(O.navigation.location,{matches:x,loaderData:j,errors:F,fetchers:new Map(O.fetchers)})):(Q({errors:F,loaderData:Le(O.loaderData,j,x,F),fetchers:new Map(O.fetchers)}),H=!1)}(t,r,m,g,h,f.active,i,v,p):(W.set(t,{routeId:r,path:m}),await async function(t,r,n,a,o,i,s,l,u){let c=O.fetchers.get(t);ge(t,Xe(u,c?c.data:void 0),{flushSync:s});let d=new AbortController,h=Re(e.history,n,d.signal);if(i){let e=await tt(o,n,h.signal);if("aborted"===e.type)return;if("error"===e.type)return void xe(t,r,e.error,{flushSync:s});if(!e.matches)return void xe(t,r,Oe(404,{pathname:n}),{flushSync:s});a=ze(o=e.matches,n)}I.set(t,d);let f=B,m=(await de("loader",O,h,[a],o,t))[a.route.id];I.get(t)===d&&I.delete(t);if(h.signal.aborted)return;if(Y.has(t))return void ge(t,Ve(void 0));if(Fe(m))return z>f?void ge(t,Ve(void 0)):(J.add(t),void(await le(h,m,!1,{preventScrollReset:l})));if(je(m))return void xe(t,r,m.error);ge(t,Ve(m.data))}(t,r,m,g,h,f.active,i,v,p))},revalidate:function(){G||(G=function(){let e,t,r=new Promise(((n,a)=>{e=async e=>{n(e);try{await r}catch(t){}},t=async e=>{a(e);try{await r}catch(t){}}}));return{promise:r,resolve:e,reject:t}}()),pe(),Q({revalidation:"loading"});let e=G.promise;return"submitting"===O.navigation.state?e:"idle"===O.navigation.state?(ie(O.historyAction,O.location,{startUninterruptedRevalidation:!0}),e):(ie(P||O.historyAction,O.navigation.location,{overrideNavigation:O.navigation,enableViewTransition:!0===U}),e)},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ce,deleteFetcher:function(e){let t=(V.get(e)||0)-1;t<=0?(V.delete(e),Y.add(e)):V.set(e,t),Q({fetchers:new Map(O.fetchers)})},dispose:function(){g&&g(),F&&F(),S.clear(),T&&T.abort(),O.fetchers.forEach(((e,t)=>De(t))),O.blockers.forEach(((e,t)=>Be(t)))},getBlocker:function(e,t){let r=O.blockers.get(e)||re;return K.get(e)!==t&&K.set(e,t),r},deleteBlocker:Be,patchRoutes:function(e,t){let r=null==n;ye(e,t,n||u,l,s),r&&(u=[...u],Q({}))},_internalFetchControllers:I,_internalSetRoutes:function(e){l={},n=v(e,s,void 0,l)}},o}function se(e,t){e.length>0||c(!1);let r={},n=(t?t.basename:null)||"/",a=t?.mapRouteProperties||ae,o=v(e,a,void 0,r);async function i(e,t,r,n,a,o,i){e.signal||c(!1);try{if(Ie(e.method)){let u=await async function(e,t,r,n,a,o,i){let u;if(r.route.action||r.route.lazy){u=(await l("action",e,[r],t,i,n,a))[r.route.id],e.signal.aborted&&le(e,i)}else{let t=Oe(405,{method:e.method,pathname:new URL(e.url).pathname,routeId:r.route.id});if(i)throw t;u={type:y.error,error:t}}if(Fe(u))throw new Response(null,{status:u.response.status,headers:{Location:u.response.headers.get("Location")}});if(i){if(je(u))throw u.error;return{matches:[r],loaderData:{},actionData:{[r.route.id]:u.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{}}}let c=new Request(e.url,{headers:e.headers,redirect:e.redirect,signal:e.signal});if(je(u)){let e=o?r:Ae(t,r.route.id);return{...await s(c,t,n,a,o,null,[e.route.id,u]),statusCode:X(u.error)?u.error.status:null!=u.statusCode?u.statusCode:500,actionData:null,actionHeaders:{...u.headers?{[r.route.id]:u.headers}:{}}}}return{...await s(c,t,n,a,o,null),actionData:{[r.route.id]:u.data},...u.statusCode?{statusCode:u.statusCode}:{},actionHeaders:u.headers?{[r.route.id]:u.headers}:{}}}(e,r,i||ze(r,t),n,a,o,null!=i);return u}let u=await s(e,r,n,a,o,i);return He(u)?u:{...u,actionData:null,actionHeaders:{}}}catch(u){if(function(e){return null!=e&&"object"==typeof e&&"type"in e&&"result"in e&&(e.type===y.data||e.type===y.error)}(u)&&He(u.result)){if(u.type===y.error)throw u.result;return u.result}if(function(e){if(!He(e))return!1;let t=e.status,r=e.headers.get("Location");return t>=300&&t<=399&&null!=r}(u))return u;throw u}}async function s(e,t,r,n,a,o,i){let s=null!=o;if(s&&!o?.route.loader&&!o?.route.lazy)throw Oe(400,{method:e.method,pathname:new URL(e.url).pathname,routeId:o?.route.id});let u=(o?[o]:i&&je(i[1])?de(t,i[0]):t).filter((e=>e.route.loader||e.route.lazy));if(0===u.length)return{matches:t,loaderData:t.reduce(((e,t)=>Object.assign(e,{[t.route.id]:null})),{}),errors:i&&je(i[1])?{[i[0]]:i[1].error}:null,statusCode:200,loaderHeaders:{}};let c=await l("loader",e,u,t,s,r,n);e.signal.aborted&&le(e,s);let d=De(t,c,i,!0,a),h=new Set(u.map((e=>e.route.id)));return t.forEach((e=>{h.has(e.route.id)||(d.loaderData[e.route.id]=null)})),{...d,matches:t}}async function l(e,t,o,i,s,l,u){let c=await we(u||ve,e,null,t,o,i,null,r,a,l),d={};return await Promise.all(i.map((async e=>{if(!(e.route.id in c))return;let r=c[e.route.id];if(Ue(r)){throw Ee(r.result,t,e.route.id,i,n)}if(He(r.result)&&s)throw r;d[e.route.id]=await be(r)}))),d}return{dataRoutes:o,query:async function(e,{requestContext:t,skipLoaderErrorBubbling:r,dataStrategy:a}={}){let s=new URL(e.url),l=e.method,u=h("",f(s),null,"default"),c=w(o,u,n);if(!$e(l)&&"HEAD"!==l){let e=Oe(405,{method:l}),{matches:t,route:r}=Me(o);return{basename:n,location:u,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{}}}if(!c){let e=Oe(404,{pathname:u.pathname}),{matches:t,route:r}=Me(o);return{basename:n,location:u,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{}}}let d=await i(e,u,c,t,a||null,!0===r,null);return He(d)?d:{location:u,basename:n,...d}},queryRoute:async function(e,{routeId:t,requestContext:r,dataStrategy:a}={}){let s=new URL(e.url),l=e.method,u=h("",f(s),null,"default"),c=w(o,u,n);if(!$e(l)&&"HEAD"!==l&&"OPTIONS"!==l)throw Oe(405,{method:l});if(!c)throw Oe(404,{pathname:u.pathname});let d=t?c.find((e=>e.route.id===t)):ze(c,u);if(t&&!d)throw Oe(403,{pathname:u.pathname,routeId:t});if(!d)throw Oe(404,{pathname:u.pathname});let m=await i(e,u,c,r,a||null,!1,d);if(He(m))return m;let p=m.errors?Object.values(m.errors)[0]:void 0;if(void 0!==p)throw p;return m.actionData?Object.values(m.actionData)[0]:m.loaderData?Object.values(m.loaderData)[0]:void 0}}}function le(e,t){if(void 0!==e.signal.reason)throw e.signal.reason;throw new Error(`${t?"queryRoute":"query"}() call aborted without an \`AbortSignal.reason\`: ${e.method} ${e.url}`)}function ue(e,t,r,n,a,o){let i,s;if(a){i=[];for(let e of t)if(i.push(e),e.route.id===a){s=e;break}}else i=t,s=t[t.length-1];let l=U(n||".",_(i),M(e.pathname,r)||e.pathname,"path"===o);if(null==n&&(l.search=e.search,l.hash=e.hash),(null==n||""===n||"."===n)&&s){let e=Be(l.search);if(s.route.index&&!e)l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&e){let e=new URLSearchParams(l.search),t=e.getAll("index");e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let r=e.toString();l.search=r?`?${r}`:""}}return"/"!==r&&(l.pathname="/"===l.pathname?r:j([r,l.pathname])),f(l)}function ce(e,t,r){if(!r||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(r))return{path:t};if(r.formMethod&&!$e(r.formMethod))return{path:t,error:Oe(405,{method:r.formMethod})};let n,a,o=()=>({path:t,error:Oe(400,{type:"invalid-body"})}),i=(r.formMethod||"get").toUpperCase(),s=_e(t);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!Ie(i))return o();let e="string"==typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce(((e,[t,r])=>`${e}${t}=${r}\n`),""):String(r.body);return{path:t,submission:{formMethod:i,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===r.formEncType){if(!Ie(i))return o();try{let e="string"==typeof r.body?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:i,formAction:s,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch(d){return o()}}}if("function"!=typeof FormData&&c(!1),r.formData)n=xe(r.formData),a=r.formData;else if(r.body instanceof FormData)n=xe(r.body),a=r.body;else if(r.body instanceof URLSearchParams)n=r.body,a=Ce(n);else if(null==r.body)n=new URLSearchParams,a=new FormData;else try{n=new URLSearchParams(r.body),a=Ce(n)}catch(d){return o()}let l={formMethod:i,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:a,json:void 0,text:void 0};if(Ie(l.formMethod))return{path:t,submission:l};let u=m(t);return e&&u.search&&Be(u.search)&&n.append("index",""),u.search=`?${n}`,{path:f(u),submission:l}}function de(e,t,r=!1){let n=e.findIndex((e=>e.route.id===t));return n>=0?e.slice(0,r?n+1:n):e}function he(e,t,r,n,a,o,i,s,l,u,c,d,h,f){let m=f?je(f[1])?f[1].error:f[1].data:void 0,p=e.createURL(t.location),y=e.createURL(a),g=r;o&&t.errors?g=de(r,Object.keys(t.errors)[0],!0):f&&je(f[1])&&(g=de(r,f[0]));let v=f?f[1].statusCode:void 0,b=v&&v>=400,E=g.filter(((e,r)=>{let{route:a}=e;if(a.lazy)return!0;if(null==a.loader)return!1;if(o)return fe(a,t.loaderData,t.errors);if(function(e,t,r){let n=!t||r.route.id!==t.route.id,a=!e.hasOwnProperty(r.route.id);return n||a}(t.loaderData,t.matches[r],e))return!0;let s=t.matches[r],l=e;return pe(e,{currentUrl:p,currentParams:s.params,nextUrl:y,nextParams:l.params,...n,actionResult:m,actionStatus:v,defaultShouldRevalidate:!b&&(i||p.pathname+p.search===y.pathname+y.search||p.search!==y.search||me(s,l))})})),S=[];return u.forEach(((e,a)=>{if(o||!r.some((t=>t.route.id===e.routeId))||l.has(a))return;let u=w(d,e.path,h);if(!u)return void S.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let f=t.fetchers.get(a),g=ze(u,e.path),E=!1;c.has(a)?E=!1:s.has(a)?(s.delete(a),E=!0):E=f&&"idle"!==f.state&&void 0===f.data?i:pe(g,{currentUrl:p,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:r[r.length-1].params,...n,actionResult:m,actionStatus:v,defaultShouldRevalidate:!b&&i}),E&&S.push({key:a,routeId:e.routeId,path:e.path,matches:u,match:g,controller:new AbortController})})),[E,S]}function fe(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=null!=t&&void 0!==t[e.id],a=null!=r&&void 0!==r[e.id];return!(!n&&a)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!n&&!a)}function me(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function pe(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function ye(e,t,r,n,a){let o;if(e){let t=n[e];t||c(!1),t.children||(t.children=[]),o=t.children}else o=r;let i=v(t.filter((e=>!o.some((t=>ge(e,t))))),a,[e||"_","patch",String(o?.length||"0")],n);o.push(...i)}function ge(e,t){return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||e.children.every(((e,r)=>t.children?.some((t=>ge(e,t))))))}async function ve({matches:e}){let t=e.filter((e=>e.shouldLoad));return(await Promise.all(t.map((e=>e.resolve())))).reduce(((e,r,n)=>Object.assign(e,{[t[n].route.id]:r})),{})}async function we(e,t,r,n,a,o,i,s,l,u){let d=o.map((e=>e.route.lazy?async function(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];a||c(!1);let o={};for(let i in n)void 0!==a[i]&&"hasErrorBoundary"!==i||g.has(i)||(o[i]=n[i]);Object.assign(a,o),Object.assign(a,{...t(a),lazy:void 0})}(e.route,l,s):void 0)),h=o.map(((e,r)=>{let o=d[r],i=a.some((t=>t.route.id===e.route.id));return{...e,shouldLoad:i,resolve:async r=>(r&&"GET"===n.method&&(e.route.lazy||e.route.loader)&&(i=!0),i?async function(e,t,r,n,a,o){let i,s,l=n=>{let i,l=new Promise(((e,t)=>i=t));s=()=>i(),t.signal.addEventListener("abort",s);let u=a=>"function"!=typeof n?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${e}" [routeId: ${r.route.id}]`)):n({request:t,params:r.params,context:o},...void 0!==a?[a]:[]),c=(async()=>{try{return{type:"data",result:await(a?a((e=>u(e))):u())}}catch(e){return{type:"error",result:e}}})();return Promise.race([c,l])};try{let a=r.route[e];if(n)if(a){let e,[t]=await Promise.all([l(a).catch((t=>{e=t})),n]);if(void 0!==e)throw e;i=t}else{if(await n,a=r.route[e],!a){if("action"===e){let e=new URL(t.url),n=e.pathname+e.search;throw Oe(405,{method:t.method,pathname:n,routeId:r.route.id})}return{type:y.data,result:void 0}}i=await l(a)}else{if(!a){let e=new URL(t.url);throw Oe(404,{pathname:e.pathname+e.search})}i=await l(a)}}catch(u){return{type:y.error,result:u}}finally{s&&t.signal.removeEventListener("abort",s)}return i}(t,n,e,o,r,u):Promise.resolve({type:y.data,result:void 0}))}})),f=await e({matches:h,request:n,params:o[0].params,fetcherKey:i,context:u});try{await Promise.all(d)}catch(m){}return f}async function be(e){let{result:t,type:r}=e;if(He(t)){let e;try{let r=t.headers.get("Content-Type");e=r&&/\bapplication\/json\b/.test(r)?null==t.body?null:await t.json():await t.text()}catch(n){return{type:y.error,error:n}}return r===y.error?{type:y.error,error:new W(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:y.data,data:e,statusCode:t.status,headers:t.headers}}if(r===y.error){if(Ne(t)){if(t.data instanceof Error)return{type:y.error,error:t.data,statusCode:t.init?.status};t=new W(t.init?.status||500,void 0,t.data)}return{type:y.error,error:t,statusCode:X(t)?t.status:void 0}}return Ne(t)?{type:y.data,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:y.data,data:t}}function Ee(e,t,r,n,a){let o=e.headers.get("Location");if(o||c(!1),!ne.test(o)){let i=n.slice(0,n.findIndex((e=>e.route.id===r))+1);o=ue(new URL(t.url),i,a,o),e.headers.set("Location",o)}return e}function Se(e,t,r){if(ne.test(e)){let n=e,a=n.startsWith("//")?new URL(t.protocol+n):new URL(n),o=null!=M(a.pathname,r);if(a.origin===t.origin&&o)return a.pathname+a.search+a.hash}return e}function Re(e,t,r,n){let a=e.createURL(_e(t)).toString(),o={signal:r};if(n&&Ie(n.formMethod)){let{formMethod:e,formEncType:t}=n;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(n.json)):"text/plain"===t?o.body=n.text:"application/x-www-form-urlencoded"===t&&n.formData?o.body=xe(n.formData):o.body=n.formData}return new Request(a,o)}function xe(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,"string"==typeof n?n:n.name);return t}function Ce(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function De(e,t,r,n=!1,a=!1){let o,i={},s=null,l=!1,u={},d=r&&je(r[1])?r[1].error:void 0;return e.forEach((r=>{if(!(r.route.id in t))return;let h=r.route.id,f=t[h];if(Fe(f)&&c(!1),je(f)){let t=f.error;if(void 0!==d&&(t=d,d=void 0),s=s||{},a)s[h]=t;else{let r=Ae(e,h);null==s[r.route.id]&&(s[r.route.id]=t)}n||(i[h]=oe),l||(l=!0,o=X(f.error)?f.error.status:500),f.headers&&(u[h]=f.headers)}else i[h]=f.data,f.statusCode&&200!==f.statusCode&&!l&&(o=f.statusCode),f.headers&&(u[h]=f.headers)})),void 0!==d&&r&&(s={[r[0]]:d},i[r[0]]=void 0),{loaderData:i,errors:s,statusCode:o||200,loaderHeaders:u}}function ke(e,t,r,n,a,o){let{loaderData:i,errors:s}=De(t,r,n);return a.forEach((t=>{let{key:r,match:n,controller:a}=t,i=o[r];if(i||c(!1),!a||!a.signal.aborted)if(je(i)){let t=Ae(e.matches,n?.route.id);s&&s[t.route.id]||(s={...s,[t.route.id]:i.error}),e.fetchers.delete(r)}else if(Fe(i))c(!1);else{let t=Ve(i.data);e.fetchers.set(r,t)}})),{loaderData:i,errors:s}}function Le(e,t,r,n){let a=Object.entries(t).filter((([,e])=>e!==oe)).reduce(((e,[t,r])=>(e[t]=r,e)),{});for(let o of r){let r=o.route.id;if(!t.hasOwnProperty(r)&&e.hasOwnProperty(r)&&o.route.loader&&(a[r]=e[r]),n&&n.hasOwnProperty(r))break}return a}function Te(e){return e?je(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ae(e,t){return(t?e.slice(0,e.findIndex((e=>e.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function Me(e){let t=1===e.length?e[0]:e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Oe(e,{pathname:t,routeId:r,method:n,type:a,message:o}={}){let i="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(i="Bad Request",n&&t&&r?s=`You made a ${n} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:"invalid-body"===a&&(s="Unable to encode submission body")):403===e?(i="Forbidden",s=`Route "${r}" does not match URL "${t}"`):404===e?(i="Not Found",s=`No route matches URL "${t}"`):405===e&&(i="Method Not Allowed",n&&t&&r?s=`You made a ${n.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:n&&(s=`Invalid request method "${n.toUpperCase()}"`)),new W(e||500,i,new Error(s),!0)}function Pe(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[e,n]=t[r];if(Fe(n))return{key:e,result:n}}}function _e(e){return f({..."string"==typeof e?m(e):e,hash:""})}function Ue(e){return He(e.result)&&Q.has(e.result.status)}function je(e){return e.type===y.error}function Fe(e){return(e&&e.type)===y.redirect}function Ne(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function He(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function $e(e){return G.has(e.toUpperCase())}function Ie(e){return Y.has(e.toUpperCase())}function Be(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function ze(e,t){let r="string"==typeof t?m(t).search:t.search;if(e[e.length-1].route.index&&Be(r||""))return e[e.length-1];let n=P(e);return n[n.length-1]}function qe(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(t&&r&&n)return null!=a?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a}:null!=o?{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0}:void 0!==i?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}:void 0}function Je(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function We(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 Xe(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Ve(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}const Ye=e.createContext(null);Ye.displayName="DataRouter";const Ke=e.createContext(null);Ke.displayName="DataRouterState";const Ge=e.createContext({isTransitioning:!1});Ge.displayName="ViewTransition";const Qe=e.createContext(new Map);Qe.displayName="Fetchers";const Ze=e.createContext(null);Ze.displayName="Await";const et=e.createContext(null);et.displayName="Navigation";const tt=e.createContext(null);tt.displayName="Location";const rt=e.createContext({outlet:null,matches:[],isDataRoute:!1});rt.displayName="Route";const nt=e.createContext(null);function at(t,{relative:r}={}){ot()||c(!1);let{basename:n,navigator:a}=e.useContext(et),{hash:o,pathname:i,search:s}=pt(t,{relative:r}),l=i;return"/"!==n&&(l="/"===i?n:j([n,i])),a.createHref({pathname:l,search:s,hash:o})}function ot(){return null!=e.useContext(tt)}function it(){return ot()||c(!1),e.useContext(tt).location}function st(){return e.useContext(tt).navigationType}function lt(t){ot()||c(!1);let{pathname:r}=it();return e.useMemo((()=>T(t,A(r))),[r,t])}function ut(t){e.useContext(et).static||e.useLayoutEffect(t)}function ct(){let{isDataRoute:t}=e.useContext(rt);return t?function(){let{router:t}=Ct(Rt.UseNavigateStable),r=kt(xt.UseNavigateStable),n=e.useRef(!1);return ut((()=>{n.current=!0})),e.useCallback((async(e,a={})=>{n.current&&("number"==typeof e?t.navigate(e):await t.navigate(e,{fromRouteId:r,...a}))}),[t,r])}():function(){ot()||c(!1);let t=e.useContext(Ye),{basename:r,navigator:n}=e.useContext(et),{matches:a}=e.useContext(rt),{pathname:o}=it(),i=JSON.stringify(_(a)),s=e.useRef(!1);return ut((()=>{s.current=!0})),e.useCallback(((e,a={})=>{if(!s.current)return;if("number"==typeof e)return void n.go(e);let l=U(e,JSON.parse(i),o,"path"===a.relative);null==t&&"/"!==r&&(l.pathname="/"===l.pathname?r:j([r,l.pathname])),(a.replace?n.replace:n.push)(l,a.state,a)}),[r,n,i,o,t])}()}nt.displayName="RouteError";const dt=e.createContext(null);function ht(){return e.useContext(dt)}function ft(t){let r=e.useContext(rt).outlet;return r?e.createElement(dt.Provider,{value:t},r):r}function mt(){let{matches:t}=e.useContext(rt),r=t[t.length-1];return r?r.params:{}}function pt(t,{relative:r}={}){let{matches:n}=e.useContext(rt),{pathname:a}=it(),o=JSON.stringify(_(n));return e.useMemo((()=>U(t,JSON.parse(o),a,"path"===r)),[t,o,a,r])}function yt(e,t){return gt(e,t)}function gt(t,r,n,a){ot()||c(!1);let{navigator:o}=e.useContext(et),{matches:s}=e.useContext(rt),l=s[s.length-1],u=l?l.params:{},d=l?l.pathname:"/",h=l?l.pathnameBase:"/",f=l&&l.route;{let e=f&&f.path||"";$t(d,!f||e.endsWith("*"))}let p,y=it();if(r){let e="string"==typeof r?m(r):r;"/"===h||e.pathname?.startsWith(h)||c(!1),p=e}else p=y;let g=p.pathname||"/",v=g;if("/"!==h){let e=h.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(e.length).join("/")}let b=w(t,{pathname:v}),E=St(b&&b.map((e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:j([h,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?h:j([h,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),s,n,a);return r&&E?e.createElement(tt.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:i.Pop}},E):E}function vt(){let t=_t(),r=X(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,a="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:a},i={padding:"2px 4px",backgroundColor:a},s=null;return console.error("Error handled by React Router default ErrorBoundary:",t),s=e.createElement(e.Fragment,null,e.createElement("p",null,"💿 Hey developer 👋"),e.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",e.createElement("code",{style:i},"ErrorBoundary")," or"," ",e.createElement("code",{style:i},"errorElement")," prop on your route.")),e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},r),n?e.createElement("pre",{style:o},n):null,s)}const wt=e.createElement(vt,null);class bt extends e.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?e.createElement(rt.Provider,{value:this.props.routeContext},e.createElement(nt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Et({routeContext:t,match:r,children:n}){let a=e.useContext(Ye);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),e.createElement(rt.Provider,{value:t},n)}function St(t,r=[],n=null,a=null){if(null==t){if(!n)return null;if(n.errors)t=n.matches;else{if(0!==r.length||n.initialized||!(n.matches.length>0))return null;t=n.matches}}let o=t,i=n?.errors;if(null!=i){let e=o.findIndex((e=>e.route.id&&void 0!==i?.[e.route.id]));e>=0||c(!1),o=o.slice(0,Math.min(o.length,e+1))}let s=!1,l=-1;if(n)for(let e=0;e<o.length;e++){let t=o[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:r}=n,a=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||void 0===r[t.route.id]);if(t.route.lazy||a){s=!0,o=l>=0?o.slice(0,l+1):[o[0]];break}}}return o.reduceRight(((t,a,u)=>{let c,d=!1,h=null,f=null;n&&(c=i&&a.route.id?i[a.route.id]:void 0,h=a.route.errorElement||wt,s&&(l<0&&0===u?($t("route-fallback",!1),d=!0,f=null):l===u&&(d=!0,f=a.route.hydrateFallbackElement||null)));let m=r.concat(o.slice(0,u+1)),p=()=>{let r;return r=c?h:d?f:a.route.Component?e.createElement(a.route.Component,null):a.route.element?a.route.element:t,e.createElement(Et,{match:a,routeContext:{outlet:t,matches:m,isDataRoute:null!=n},children:r})};return n&&(a.route.ErrorBoundary||a.route.errorElement||0===u)?e.createElement(bt,{location:n.location,revalidation:n.revalidation,component:h,error:c,children:p(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):p()}),null)}var Rt=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Rt||{}),xt=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}(xt||{});function Ct(t){let r=e.useContext(Ye);return r||c(!1),r}function Dt(t){let r=e.useContext(Ke);return r||c(!1),r}function kt(t){let r=function(t){let r=e.useContext(rt);return r||c(!1),r}(),n=r.matches[r.matches.length-1];return n.route.id||c(!1),n.route.id}function Lt(){return Dt(xt.UseNavigation).navigation}function Tt(){let t=Ct(Rt.UseRevalidator),r=Dt(xt.UseRevalidator);return e.useMemo((()=>({async revalidate(){await t.router.revalidate()},state:r.revalidation})),[t.router,r.revalidation])}function At(){let{matches:t,loaderData:r}=Dt(xt.UseMatches);return e.useMemo((()=>t.map((e=>E(e,r)))),[t,r])}function Mt(){let e=Dt(xt.UseLoaderData),t=kt(xt.UseLoaderData);return e.loaderData[t]}function Ot(e){return Dt(xt.UseRouteLoaderData).loaderData[e]}function Pt(){let e=Dt(xt.UseActionData),t=kt(xt.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function _t(){let t=e.useContext(nt),r=Dt(xt.UseRouteError),n=kt(xt.UseRouteError);return void 0!==t?t:r.errors?.[n]}function Ut(){return e.useContext(Ze)?._data}function jt(){return e.useContext(Ze)?._error}let Ft=0;function Nt(t){let{router:r,basename:n}=Ct(Rt.UseBlocker),a=Dt(xt.UseBlocker),[o,i]=e.useState(""),s=e.useCallback((e=>{if("function"!=typeof t)return!!t;if("/"===n)return t(e);let{currentLocation:r,nextLocation:a,historyAction:o}=e;return t({currentLocation:{...r,pathname:M(r.pathname,n)||r.pathname},nextLocation:{...a,pathname:M(a.pathname,n)||a.pathname},historyAction:o})}),[n,t]);return e.useEffect((()=>{let e=String(++Ft);return i(e),()=>r.deleteBlocker(e)}),[r]),e.useEffect((()=>{""!==o&&r.getBlocker(o,s)}),[r,o,s]),o&&a.blockers.has(o)?a.blockers.get(o):re}const Ht={};function $t(e,t,r){t||Ht[e]||(Ht[e]=!0)}const It={};function Bt(e,t){e||It[t]||(It[t]=!0,console.warn(t))}function zt(t){let r={hasErrorBoundary:t.hasErrorBoundary||null!=t.ErrorBoundary||null!=t.errorElement};return t.Component&&(t.element,Object.assign(r,{element:e.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement,Object.assign(r,{hydrateFallbackElement:e.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement,Object.assign(r,{errorElement:e.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),r}function qt(e,t){return ie({basename:t?.basename,future:t?.future,history:s({initialEntries:t?.initialEntries,initialIndex:t?.initialIndex}),hydrationData:t?.hydrationData,routes:e,mapRouteProperties:zt,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation}).initialize()}class Jt{status="pending";constructor(){this.promise=new Promise(((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}}))}}function Wt({router:t,flushSync:r}){let[n,a]=e.useState(t.state),[o,i]=e.useState(),[s,l]=e.useState({isTransitioning:!1}),[u,c]=e.useState(),[d,h]=e.useState(),[f,m]=e.useState(),p=e.useRef(new Map),y=e.useCallback(((n,{deletedFetchers:o,flushSync:s,viewTransitionOpts:f})=>{o.forEach((e=>p.current.delete(e))),n.fetchers.forEach(((e,t)=>{void 0!==e.data&&p.current.set(t,e.data)})),Bt(!1===s||null!=r,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let y=null!=t.window&&null!=t.window.document&&"function"==typeof t.window.document.startViewTransition;if(Bt(null==f||y,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),f&&y){if(r&&s){r((()=>{d&&(u&&u.resolve(),d.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:f.currentLocation,nextLocation:f.nextLocation})}));let e=t.window.document.startViewTransition((()=>{r((()=>a(n)))}));return e.finished.finally((()=>{r((()=>{c(void 0),h(void 0),i(void 0),l({isTransitioning:!1})}))})),void r((()=>h(e)))}d?(u&&u.resolve(),d.skipTransition(),m({state:n,currentLocation:f.currentLocation,nextLocation:f.nextLocation})):(i(n),l({isTransitioning:!0,flushSync:!1,currentLocation:f.currentLocation,nextLocation:f.nextLocation}))}else r&&s?r((()=>a(n))):e.startTransition((()=>a(n)))}),[t.window,r,d,u]);e.useLayoutEffect((()=>t.subscribe(y)),[t,y]),e.useEffect((()=>{s.isTransitioning&&!s.flushSync&&c(new Jt)}),[s]),e.useEffect((()=>{if(u&&o&&t.window){let r=o,n=u.promise,s=t.window.document.startViewTransition((async()=>{e.startTransition((()=>a(r))),await n}));s.finished.finally((()=>{c(void 0),h(void 0),i(void 0),l({isTransitioning:!1})})),h(s)}}),[o,u,t.window]),e.useEffect((()=>{u&&o&&n.location.key===o.location.key&&u.resolve()}),[u,d,n.location,o]),e.useEffect((()=>{!s.isTransitioning&&f&&(i(f.state),l({isTransitioning:!0,flushSync:!1,currentLocation:f.currentLocation,nextLocation:f.nextLocation}),m(void 0))}),[s.isTransitioning,f]);let g=e.useMemo((()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:e=>t.navigate(e),push:(e,r,n)=>t.navigate(e,{state:r,preventScrollReset:n?.preventScrollReset}),replace:(e,r,n)=>t.navigate(e,{replace:!0,state:r,preventScrollReset:n?.preventScrollReset})})),[t]),v=t.basename||"/",w=e.useMemo((()=>({router:t,navigator:g,static:!1,basename:v})),[t,g,v]);return e.createElement(e.Fragment,null,e.createElement(Ye.Provider,{value:w},e.createElement(Ke.Provider,{value:n},e.createElement(Qe.Provider,{value:p.current},e.createElement(Ge.Provider,{value:s},e.createElement(Zt,{basename:v,location:n.location,navigationType:n.historyAction,navigator:g},e.createElement(Xt,{routes:t.routes,future:t.future,state:n})))))),null)}const Xt=e.memo(Vt);function Vt({routes:e,future:t,state:r}){return gt(e,void 0,r,t)}function Yt({basename:t,children:r,initialEntries:n,initialIndex:a}){let o=e.useRef();null==o.current&&(o.current=s({initialEntries:n,initialIndex:a,v5Compat:!0}));let i=o.current,[l,u]=e.useState({action:i.action,location:i.location}),c=e.useCallback((t=>{e.startTransition((()=>u(t)))}),[u]);return e.useLayoutEffect((()=>i.listen(c)),[i,c]),e.createElement(Zt,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:i})}function Kt({to:t,replace:r,state:n,relative:a}){ot()||c(!1),e.useContext(et);let{matches:o}=e.useContext(rt),{pathname:i}=it(),s=ct(),l=U(t,_(o),i,"path"===a),u=JSON.stringify(l);return e.useEffect((()=>{s(JSON.parse(u),{replace:r,state:n,relative:a})}),[s,u,a,r,n]),null}function Gt(e){return ft(e.context)}function Qt(e){c(!1)}function Zt({basename:t="/",children:r=null,location:n,navigationType:a=i.Pop,navigator:o,static:s=!1}){ot()&&c(!1);let l=t.replace(/^\/*/,"/"),u=e.useMemo((()=>({basename:l,navigator:o,static:s,future:{}})),[l,o,s]);"string"==typeof n&&(n=m(n));let{pathname:d="/",search:h="",hash:f="",state:p=null,key:y="default"}=n,g=e.useMemo((()=>{let e=M(d,l);return null==e?null:{location:{pathname:e,search:h,hash:f,state:p,key:y},navigationType:a}}),[l,d,h,f,p,y,a]);return null==g?null:e.createElement(et.Provider,{value:u},e.createElement(tt.Provider,{children:r,value:g}))}function er({children:e,location:t}){return yt(or(e),t)}function tr({children:t,errorElement:r,resolve:n}){return e.createElement(nr,{resolve:n,errorElement:r},e.createElement(ar,null,t))}var rr=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(rr||{});class nr extends e.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("<Await> caught the following error during render",e,t)}render(){let{children:t,errorElement:r,resolve:n}=this.props,a=null,o=rr.pending;if(n instanceof Promise)if(this.state.error){o=rr.error;let e=this.state.error;a=Promise.reject().catch((()=>{})),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_error",{get:()=>e})}else n._tracked?(a=n,o="_error"in a?rr.error:"_data"in a?rr.success:rr.pending):(o=rr.pending,Object.defineProperty(n,"_tracked",{get:()=>!0}),a=n.then((e=>Object.defineProperty(n,"_data",{get:()=>e})),(e=>Object.defineProperty(n,"_error",{get:()=>e}))));else o=rr.success,a=Promise.resolve(),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_data",{get:()=>n});if(o===rr.error&&!r)throw a._error;if(o===rr.error)return e.createElement(Ze.Provider,{value:a,children:r});if(o===rr.success)return e.createElement(Ze.Provider,{value:a,children:t});throw a}}function ar({children:t}){let r=Ut(),n="function"==typeof t?t(r):t;return e.createElement(e.Fragment,null,n)}function or(t,r=[]){let n=[];return e.Children.forEach(t,((t,a)=>{if(!e.isValidElement(t))return;let o=[...r,a];if(t.type===e.Fragment)return void n.push.apply(n,or(t.props.children,o));t.type!==Qt&&c(!1),t.props.index&&t.props.children&&c(!1);let i={id:t.props.id||o.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,hydrateFallbackElement:t.props.hydrateFallbackElement,HydrateFallback:t.props.HydrateFallback,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:!0===t.props.hasErrorBoundary||null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(i.children=or(t.props.children,o)),n.push(i)})),n}function ir(e){return St(e)}const sr="application/x-www-form-urlencoded";function lr(e){return null!=e&&"string"==typeof e.tagName}function ur(e=""){return new URLSearchParams("string"==typeof e||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((e=>[r,e])):[[r,n]])}),[]))}let cr=null;const dr=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function hr(e){return null==e||dr.has(e)?e:null}function fr(e,t){let r,n,a,o,i;if(lr(s=e)&&"form"===s.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?M(i,t):null,r=e.getAttribute("method")||"get",a=hr(e.getAttribute("enctype"))||sr,o=new FormData(e)}else if(function(e){return lr(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return lr(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||i.getAttribute("action");if(n=s?M(s,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||"get",a=hr(e.getAttribute("formenctype"))||hr(i.getAttribute("enctype"))||sr,o=new FormData(i,e),!function(){if(null===cr)try{new FormData(document.createElement("form"),0),cr=!1}catch(e){cr=!0}return cr}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}else t&&o.append(t,n)}}else{if(lr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r="get",n=null,a=sr,i=e}var s;return o&&"text/plain"===a&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}function mr(e,t){if(!1===e||null==e)throw new Error(t)}async function pr(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){if(console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode&&void 0!==import.meta.hot)throw r;return window.location.reload(),new Promise((()=>{}))}}function yr(e,t,r){let n=e.map((e=>{let n=t[e.route.id],a=r.routes[e.route.id];return[a.css?a.css.map((e=>({rel:"stylesheet",href:e}))):[],n?.links?.()||[]]})).flat(2),a=function(e,t){return Sr(e.map((e=>{let r=t.routes[e.route.id],n=[r.module];return r.imports&&(n=n.concat(r.imports)),n})).flat(1))}(e,r);return Rr(n,a)}async function gr(e,t){if(!e.css&&!t.links||!function(){if(void 0!==xr)return xr;let e=document.createElement("link");return xr=e.relList.supports("preload"),e=null,xr}())return;let r=[];if(e.css&&r.push(...e.css.map((e=>({rel:"stylesheet",href:e})))),t.links&&r.push(...t.links()),0===r.length)return;let n=[];for(let o of r)wr(o)||"stylesheet"!==o.rel||n.push({...o,rel:"preload",as:"style"});let a=n.filter((e=>(!e.media||window.matchMedia(e.media).matches)&&!document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`)));await Promise.all(a.map(vr))}async function vr(e){return new Promise((t=>{let r=document.createElement("link");function n(){document.head.contains(r)&&document.head.removeChild(r)}Object.assign(r,e),r.onload=()=>{n(),t()},r.onerror=()=>{n(),t()},document.head.appendChild(r)}))}function wr(e){return null!=e&&"string"==typeof e.page}function br(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function Er(e,t,r,n,a,o){let i=function(e){let t=m(e);void 0===t.search&&(t.search="");return t}(e),s=(e,t)=>!r[t]||e.route.id!==r[t].route.id,l=(e,t)=>r[t].pathname!==e.pathname||r[t].route.path?.endsWith("*")&&r[t].params["*"]!==e.params["*"];return"data"===o&&a.search!==i.search?t.filter(((t,o)=>{if(!n.routes[t.route.id].hasLoader)return!1;if(s(t,o)||l(t,o))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0})):t.filter(((e,t)=>{let r=n.routes[e.route.id];return("assets"===o||r.hasLoader)&&(s(e,t)||l(e,t))}))}function Sr(e){return[...new Set(e)]}function Rr(e,t){let r=new Set,n=new Set(t);return e.reduce(((e,a)=>{if(t&&!wr(a)&&"script"===a.as&&a.href&&n.has(a.href))return e;let o=JSON.stringify(function(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}(a));return r.has(o)||(r.add(o),e.push({key:o,link:a})),e}),[])}let xr;const Cr={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Dr=/[&><\u2028\u2029]/g;function kr(e){return{__html:e}}async function Lr(e){let t={signal:e.signal};if("GET"!==e.method){t.method=e.method;let r=e.headers.get("Content-Type");r&&/\bapplication\/json\b/.test(r)?(t.headers={"Content-Type":r},t.body=JSON.stringify(await e.json())):r&&/\btext\/plain\b/.test(r)?(t.headers={"Content-Type":r},t.body=await e.text()):r&&/\bapplication\/x-www-form-urlencoded\b/.test(r)?t.body=new URLSearchParams(await e.text()):t.body=await e.formData()}return t}const Tr=Symbol("SingleFetchRedirect");function Ar({context:t,identifier:r,reader:n,textDecoder:a,nonce:o}){if(!t.renderMeta||!t.renderMeta.didRenderScripts)return null;t.renderMeta.streamCache||(t.renderMeta.streamCache={});let{streamCache:i}=t.renderMeta,s=i[r];if(s||(s=i[r]=n.read().then((e=>{i[r].result={done:e.done,value:a.decode(e.value,{stream:!0})}})).catch((e=>{i[r].error=e}))),s.error)throw s.error;if(void 0===s.result)throw s;let{done:l,value:u}=s.result,c=u?e.createElement("script",{nonce:o,dangerouslySetInnerHTML:{__html:`window.__reactRouterContext.streamController.enqueue(${d=JSON.stringify(u),d.replace(Dr,(e=>Cr[e]))});`}}):null;var d;return l?e.createElement(e.Fragment,null,c,e.createElement("script",{nonce:o,dangerouslySetInnerHTML:{__html:"window.__reactRouterContext.streamController.close();"}})):e.createElement(e.Fragment,null,c,e.createElement(e.Suspense,null,e.createElement(Ar,{context:t,identifier:r+1,reader:n,textDecoder:a,nonce:o})))}function Mr(e,t,r){return async({request:n,matches:a,fetcherKey:o})=>"GET"!==n.method?async function(e,t){let r=t.find((e=>e.shouldLoad));r||mr(!1);let n,a=await r.resolve((async t=>{let a=await t((async()=>{let t=_r(e.url),a=await Lr(e),{data:o,status:i}=await Ur(t,a);return n=i,Nr(o,r.route.id)}));return a}));if(o=a.result,null!=o&&"number"==typeof o.status&&"string"==typeof o.statusText&&"object"==typeof o.headers&&void 0!==o.body||X(a.result))return{[r.route.id]:a};var o;return{[r.route.id]:{type:a.type,result:B(a.result,n)}}}(n,a):o?async function(e,t){let r=t.find((e=>e.shouldLoad));r||mr(!1);let n=await r.resolve((async t=>Or(t,Pr(_r(e.url)),await Lr(e),r.route.id)));return{[r.route.id]:n}}(n,a):async function(e,t,r,n,a){let o=new Set,i=!1,s=a.map((()=>Hr())),l=Promise.all(s.map((e=>e.promise))),u=Hr(),c=Pr(_r(n.url)),d=await Lr(n),h={},f=Promise.all(a.map((async(n,a)=>n.resolve((async l=>{if(s[a].resolve(),!n.shouldLoad){if(!r.state.initialized)return;if(n.route.id in r.state.loaderData&&e.routes[n.route.id].hasLoader&&t[n.route.id]?.shouldRevalidate)return void(i=!0)}if(e.routes[n.route.id].hasClientLoader){e.routes[n.route.id].hasLoader&&(i=!0);try{let e=await Or(l,c,d,n.route.id);h[n.route.id]={type:"data",result:e}}catch(f){h[n.route.id]={type:"error",result:f}}}else{e.routes[n.route.id].hasLoader&&o.add(n.route.id);try{let e=await l((async()=>Fr(await u.promise,n.route.id)));h[n.route.id]={type:"data",result:e}}catch(f){h[n.route.id]={type:"error",result:f}}}})))));if(await l,r.state.initialized&&0!==o.size||window.__reactRouterHdrActive)try{i&&o.size>0&&c.searchParams.set("_routes",a.filter((e=>o.has(e.route.id))).map((e=>e.route.id)).join(","));let e=await Ur(c,d);u.resolve(e.data)}catch(m){u.reject(m)}else u.resolve({});return await f,h}(e,t,r(),n,a)}function Or(e,t,r,n){return e((async()=>{let e=new URL(t);e.searchParams.set("_routes",n);let{data:a}=await Ur(e,r);return Fr(a,n)}))}function Pr(e){let t=e.searchParams.getAll("index");e.searchParams.delete("index");let r=[];for(let n of t)n&&r.push(n);for(let n of r)e.searchParams.append("index",n);return e}function _r(e){let t="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===t.pathname?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}async function Ur(e,t){let r=await fetch(e,t);if(404===r.status&&!r.headers.has("X-Remix-Response"))throw new W(404,"Not Found",!0);r.body||mr(!1);try{let e=await jr(r.body,window);return{status:r.status,data:e.value}}catch(n){throw new Error("Unable to decode turbo-stream response")}}function jr(e,r){return t(e,{plugins:[(e,...t)=>{if("SanitizedError"===e){let[e,n,a]=t,o=Error;e&&e in r&&"function"==typeof r[e]&&(o=r[e]);let i=new o(n);return i.stack=a,{value:i}}if("ErrorResponse"===e){let[e,r,n]=t;return{value:new W(r,n,e)}}return"SingleFetchRedirect"===e?{value:{[Tr]:t[0]}}:"SingleFetchClassInstance"===e?{value:t[0]}:"SingleFetchFallback"===e?{value:void 0}:void 0}]})}function Fr(e,t){let r=e[Tr];return r?Nr(r,t):void 0!==e[t]?Nr(e[t],t):null}function Nr(e,t){if("error"in e)throw e.error;if("redirect"in e){let t={};return e.revalidate&&(t["X-Remix-Revalidate"]="yes"),e.reload&&(t["X-Remix-Reload-Document"]="yes"),e.replace&&(t["X-Remix-Replace"]="yes"),z(e.redirect,{status:e.status,headers:t})}if("data"in e)return e.data;throw new Error(`No response found for routeId "${t}"`)}function Hr(){let e,t,r=new Promise(((n,a)=>{e=async e=>{n(e);try{await r}catch(t){}},t=async e=>{a(e);try{await r}catch(t){}}}));return{promise:r,resolve:e,reject:t}}class $r extends e.Component{constructor(e){super(e),this.state={error:e.error||null,location:e.location}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error||null,location:e.location}:{error:e.error||t.error,location:t.location}}render(){return this.state.error?e.createElement(Ir,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}}function Ir({error:t,isOutsideRemixApp:r}){console.error(t);let n,a=e.createElement("script",{dangerouslySetInnerHTML:{__html:'\n console.log(\n "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://remix.run/guides/errors for more information."\n );\n '}});if(X(t))return e.createElement(Br,{title:"Unhandled Thrown Response!"},e.createElement("h1",{style:{fontSize:"24px"}},t.status," ",t.statusText),a);if(t instanceof Error)n=t;else{let e=null==t?"Unknown Error":"object"==typeof t&&"toString"in t?t.toString():JSON.stringify(t);n=new Error(e)}return e.createElement(Br,{title:"Application Error!",isOutsideRemixApp:r},e.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),e.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},n.stack),a)}function Br({title:t,renderScripts:r,isOutsideRemixApp:n,children:a}){let{routeModules:o}=cn();return o.root?.Layout&&!n?a:e.createElement("html",{lang:"en"},e.createElement("head",null,e.createElement("meta",{charSet:"utf-8"}),e.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),e.createElement("title",null,t)),e.createElement("body",null,e.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},a,r?e.createElement(wn,null):null)))}function zr(){return e.createElement(Br,{title:"Loading...",renderScripts:!0},e.createElement("script",{dangerouslySetInnerHTML:{__html:'\n console.log(\n "💿 Hey developer 👋. You can provide a way better UX than this " +\n "when your app is loading JS modules and/or running `clientLoader` " +\n "functions. Check out https://remix.run/route/hydrate-fallback " +\n "for more information."\n );\n '}}))}function qr(e){let t={};return Object.values(e).forEach((e=>{let r=e.parentId||"";t[r]||(t[r]=[]),t[r].push(e)})),t}function Jr(t,r,n){let a=Qr(r),o=!r.HydrateFallback||n&&"root"!==t.id?"root"===t.id?zr:void 0:r.HydrateFallback,i=r.ErrorBoundary?r.ErrorBoundary:"root"===t.id?()=>e.createElement(Ir,{error:_t()}):void 0;return"root"===t.id&&r.Layout?{...a?{element:e.createElement(r.Layout,null,e.createElement(a,null))}:{Component:a},...i?{errorElement:e.createElement(r.Layout,null,e.createElement(i,null))}:{ErrorBoundary:i},...o?{hydrateFallbackElement:e.createElement(r.Layout,null,e.createElement(o,null))}:{HydrateFallback:o}}:{Component:a,ErrorBoundary:i,HydrateFallback:o}}function Wr(e,t,r,n,a="",o=qr(e),i=Promise.resolve({Component:()=>null})){return(o[a]||[]).map((a=>{let s=t[a.id];s||mr(!1);let l={...Jr(a,s,n),caseSensitive:a.caseSensitive,id:a.id,index:a.index,path:a.path,handle:s.handle,lazy:n?()=>i:void 0,loader:a.hasLoader||a.hasClientLoader?()=>null:void 0},u=Wr(e,t,r,n,a.id,o,i);return u.length>0&&(l.children=u),l}))}function Xr(e,t,r,n,a,o){return Kr(t,r,n,o,"",qr(t),e)}function Vr(e,t,r){if(r){let r=`You cannot call ${"action"===e?"serverAction()":"serverLoader()"} in SPA Mode (routeId: "${t.id}")`;throw console.error(r),new W(400,"Bad Request",new Error(r),!0)}let n=`You are trying to call ${"action"===e?"serverAction()":"serverLoader()"} on a route that does not have a server ${e} (routeId: "${t.id}")`;if("loader"===e&&!t.hasLoader||"action"===e&&!t.hasAction)throw console.error(n),new W(400,"Bad Request",new Error(n),!0)}function Yr(e,t){let r="clientAction"===e?"a":"an",n=`Route "${t}" does not have ${r} ${e}, but you are trying to submit to it. To fix this, please add ${r} \`${e}\` function to the route`;throw console.error(n),new W(405,"Method Not Allowed",new Error(n),!0)}function Kr(e,t,r,n,a="",o=qr(e),i){return(o[a]||[]).map((a=>{let s=t[a.id];function l(e){return"function"!=typeof e&&mr(!1),e()}function u(e){return a.hasLoader?l(e):Promise.resolve(null)}function c(e){if(!a.hasAction)throw Yr("action",a.id);return l(e)}async function d(e){let r=t[a.id],n=r?gr(a,r):Promise.resolve();try{return e()}finally{await n}}let h={id:a.id,index:a.index,path:a.path};if(s){Object.assign(h,{...h,...Jr(a,s,n),handle:s.handle,shouldRevalidate:i?Gr(a.id,s.shouldRevalidate,i):s.shouldRevalidate});let e=r&&r.loaderData&&a.id in r.loaderData,t=e?r?.loaderData?.[a.id]:void 0,o=r&&r.errors&&a.id in r.errors,l=o?r?.errors?.[a.id]:void 0,f=null==i&&(!0===s.clientLoader?.hydrate||!a.hasLoader);h.loader=async({request:r,params:i},c)=>{try{return await d((async()=>(s||mr(!1),s.clientLoader?s.clientLoader({request:r,params:i,async serverLoader(){if(Vr("loader",a,n),f){if(e)return t;if(o)throw l}return u(c)}}):n?null:u(c))))}finally{f=!1}},h.loader.hydrate=Zr(a,s,n),h.action=({request:e,params:t},r)=>d((async()=>{if(s||mr(!1),!s.clientAction){if(n)throw Yr("clientAction",a.id);return c(r)}return s.clientAction({request:e,params:t,serverAction:async()=>(Vr("action",a,n),c(r))})}))}else a.hasClientLoader||(h.loader=({request:e},t)=>d((()=>n?Promise.resolve(null):u(t)))),a.hasClientAction||(h.action=({request:e},t)=>d((()=>{if(n)throw Yr("clientAction",a.id);return c(t)}))),h.lazy=async()=>{let e=await async function(e,t){let r=await pr(e,t);return await gr(e,r),{Component:Qr(r),ErrorBoundary:r.ErrorBoundary,clientAction:r.clientAction,clientLoader:r.clientLoader,handle:r.handle,links:r.links,meta:r.meta,shouldRevalidate:r.shouldRevalidate}}(a,t),r={...e};if(e.clientLoader){let t=e.clientLoader;r.loader=(e,r)=>t({...e,serverLoader:async()=>(Vr("loader",a,n),u(r))})}if(e.clientAction){let t=e.clientAction;r.action=(e,r)=>t({...e,serverAction:async()=>(Vr("action",a,n),c(r))})}return i&&(r.shouldRevalidate=Gr(a.id,e.shouldRevalidate,i)),{...r.loader?{loader:r.loader}:{},...r.action?{action:r.action}:{},hasErrorBoundary:r.hasErrorBoundary,shouldRevalidate:r.shouldRevalidate,handle:r.handle,Component:r.Component,ErrorBoundary:r.ErrorBoundary}};let f=Kr(e,t,r,n,a.id,o,i);return f.length>0&&(h.children=f),h}))}function Gr(e,t,r){let n=!1;return a=>n?t?t(a):a.defaultShouldRevalidate:(n=!0,r.has(e))}function Qr(e){if(null==e.default)return;return"object"==typeof e.default&&0===Object.keys(e.default).length?void 0:e.default}function Zr(e,t,r){return r&&"root"!==e.id||null!=t.clientLoader&&(!0===t.clientLoader.hydrate||!0!==e.hasLoader)}const en=new Set,tn=new Set;function rn(e){return!e}function nn(e,t,r,n){if(rn(r))return async({path:a,patch:o})=>{tn.has(a)||await on([a],e,t,r,n,o)}}function an(t,r,n,a){e.useEffect((()=>{if(!rn(a)||!0===navigator.connection?.saveData)return;function e(e){let t="FORM"===e.tagName?e.getAttribute("action"):e.getAttribute("href");if(!t)return;let r=new URL(t,window.location.origin);tn.has(r.pathname)||en.add(r.pathname)}async function o(){let e=Array.from(en.keys()).filter((e=>!tn.has(e)||(en.delete(e),!1)));if(0!==e.length)try{await on(e,r,n,a,t.basename,t.patchRoutes)}catch(o){console.error("Failed to fetch manifest patches",o)}}document.body.querySelectorAll("a[data-discover], form[data-discover]").forEach((t=>e(t))),o();let i=function(e,t){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout((()=>e(...n)),t)}}(o,100);let s=new MutationObserver((t=>{let r=new Set;t.forEach((e=>{[e.target,...e.addedNodes].forEach((e=>{(function(e){return e.nodeType===Node.ELEMENT_NODE})(e)&&(("A"===e.tagName&&e.getAttribute("data-discover")||"FORM"===e.tagName&&e.getAttribute("data-discover"))&&r.add(e),"A"!==e.tagName&&e.querySelectorAll("a[data-discover], form[data-discover]").forEach((e=>r.add(e))))}))})),r.forEach((t=>e(t))),i()}));return s.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-discover","href","action"]}),()=>s.disconnect()}),[a,r,n,t])}async function on(e,t,r,n,a,o){let i=`${null!=a?a:"/"}/__manifest`.replace(/\/+/g,"/"),s=new URL(i,window.location.origin);if(e.sort().forEach((e=>s.searchParams.append("p",e))),s.searchParams.set("version",t.version),s.toString().length>7680)return void en.clear();let l=await fetch(s);if(!l.ok)throw new Error(`${l.status} ${l.statusText}`);if(l.status>=400)throw new Error(await l.text());let u=await l.json(),c=new Set(Object.keys(t.routes)),d=Object.values(u).reduce(((e,t)=>c.has(t.id)?e:Object.assign(e,{[t.id]:t})),{});Object.assign(t.routes,d),e.forEach((e=>function(e,t){if(t.size>=1e3){let e=t.values().next().value;t.delete(e)}t.add(e)}(e,tn)));let h=new Set;Object.values(d).forEach((e=>{e.parentId&&d[e.parentId]||h.add(e.parentId)})),h.forEach((e=>o(e||null,Kr(d,r,null,n,e))))}function sn(){let t=e.useContext(Ye);return t||mr(!1),t}function ln(){let t=e.useContext(Ke);return t||mr(!1),t}const un=e.createContext(void 0);function cn(){let t=e.useContext(un);return t||mr(!1),t}function dn(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function hn(e,t,r){if(r&&!vn)return[e[0]];if(t){let r=e.findIndex((e=>void 0!==t[e.route.id]));return e.slice(0,r+1)}return e}function fn(){let{isSpaMode:t,manifest:r,routeModules:n,criticalCss:a}=cn(),{errors:o,matches:i}=ln(),s=hn(i,o,t),l=e.useMemo((()=>yr(s,n,r)),[s,n,r]);return e.createElement(e.Fragment,null,a?e.createElement("style",{dangerouslySetInnerHTML:{__html:a}}):null,l.map((({key:t,link:r})=>wr(r)?e.createElement(mn,Object.assign({key:t},r)):e.createElement("link",Object.assign({key:t},r)))))}function mn({page:t,...r}){let{router:n}=sn(),a=e.useMemo((()=>w(n.routes,t,n.basename)),[n.routes,t,n.basename]);return a?e.createElement(yn,Object.assign({page:t,matches:a},r)):(console.warn(`Tried to prefetch ${t} but no routes matched.`),null)}function pn(t){let{manifest:r,routeModules:n}=cn(),[a,o]=e.useState([]);return e.useEffect((()=>{let e=!1;return async function(e,t,r){return Rr((await Promise.all(e.map((async e=>{let n=await pr(t.routes[e.route.id],r);return n.links?n.links():[]})))).flat(1).filter(br).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}(t,r,n).then((t=>{e||o(t)})),()=>{e=!0}}),[t,r,n]),a}function yn({page:t,matches:r,...n}){let a=it(),{manifest:o,routeModules:i}=cn(),{loaderData:s,matches:l}=ln(),u=e.useMemo((()=>Er(t,r,l,o,a,"data")),[t,r,l,o,a]),c=e.useMemo((()=>Er(t,r,l,o,a,"assets")),[t,r,l,o,a]),d=e.useMemo((()=>{if(t===a.pathname+a.search+a.hash)return[];let e=new Set,n=!1;if(r.forEach((t=>{o.routes[t.route.id].hasLoader&&(!u.some((e=>e.route.id===t.route.id))&&t.route.id in s&&i[t.route.id]?.shouldRevalidate||o.routes[t.route.id].hasClientLoader?n=!0:e.add(t.route.id))})),0===e.size)return[];let l=_r(t);return n&&e.size>0&&l.searchParams.set("_routes",r.filter((t=>e.has(t.route.id))).map((e=>e.route.id)).join(",")),[l.pathname+l.search]}),[s,a,o,u,r,t,i]),h=e.useMemo((()=>function(e,t){return Sr(e.map((e=>{let r=t.routes[e.route.id],n=[r.module];return r.imports&&(n=n.concat(r.imports)),n})).flat(1))}(c,o)),[c,o]),f=pn(c);return e.createElement(e.Fragment,null,d.map((t=>e.createElement("link",Object.assign({key:t,rel:"prefetch",as:"fetch",href:t},n)))),h.map((t=>e.createElement("link",Object.assign({key:t,rel:"modulepreload",href:t},n)))),f.map((({key:t,link:r})=>e.createElement("link",Object.assign({key:t},r)))))}function gn(){let{isSpaMode:t,routeModules:r}=cn(),{errors:n,matches:a,loaderData:o}=ln(),i=it(),s=hn(a,n,t),l=null;n&&(l=n[s[s.length-1].route.id]);let u=[],c=null,d=[];for(let e=0;e<s.length;e++){let t=s[e],n=t.route.id,a=o[n],h=t.params,f=r[n],m=[],p={id:n,data:a,meta:[],params:t.params,pathname:t.pathname,handle:t.route.handle,error:l};if(d[e]=p,f?.meta?m="function"==typeof f.meta?f.meta({data:a,params:h,location:i,matches:d,error:l}):Array.isArray(f.meta)?[...f.meta]:f.meta:c&&(m=[...c]),m=m||[],!Array.isArray(m))throw new Error("The route at "+t.route.path+" returns an invalid value. All route meta functions must return an array of meta objects.\n\nTo reference the meta function API, see https://remix.run/route/meta");p.meta=m,d[e]=p,u=[...m],c=u}return e.createElement(e.Fragment,null,u.flat().map((t=>{if(!t)return null;if("tagName"in t){let{tagName:r,...n}=t;if(!function(e){return"string"==typeof e&&/^(meta|link)$/.test(e)}(r))return console.warn(`A meta object uses an invalid tagName: ${r}. Expected either 'link' or 'meta'`),null;let a=r;return e.createElement(a,Object.assign({key:JSON.stringify(n)},n))}if("title"in t)return e.createElement("title",{key:"title"},String(t.title));if("charset"in t&&(t.charSet??=t.charset,delete t.charset),"charSet"in t&&null!=t.charSet)return"string"==typeof t.charSet?e.createElement("meta",{key:"charSet",charSet:t.charSet}):null;if("script:ld+json"in t)try{let r=JSON.stringify(t["script:ld+json"]);return e.createElement("script",{key:`script:ld+json:${r}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:r}})}catch(r){return null}return e.createElement("meta",Object.assign({key:JSON.stringify(t)},t))})))}un.displayName="FrameworkContext";let vn=!1;function wn(t){let{manifest:r,serverHandoffString:n,isSpaMode:a,renderMeta:o}=cn(),{router:i,static:s,staticContext:l}=sn(),{matches:u}=ln(),c=rn(a);o&&(o.didRenderScripts=!0);let d=hn(u,null,a);e.useEffect((()=>{vn=!0}),[]);let h=e.useMemo((()=>{let a=l?`window.__reactRouterContext = ${n};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",o=s?`${r.hmr?.runtime?`import ${JSON.stringify(r.hmr.runtime)};`:""}${c?"":`import ${JSON.stringify(r.url)}`};\n${d.map(((e,t)=>`import * as route${t} from ${JSON.stringify(r.routes[e.route.id].module)};`)).join("\n")}\n ${c?`window.__reactRouterManifest = ${JSON.stringify(function(e,t){let r=new Set(t.state.matches.map((e=>e.route.id))),n=t.state.location.pathname.split("/").filter(Boolean),a=["/"];for(n.pop();n.length>0;)a.push(`/${n.join("/")}`),n.pop();a.forEach((e=>{let n=w(t.routes,e,t.basename);n&&n.forEach((e=>r.add(e.route.id)))}));let o=[...r].reduce(((t,r)=>Object.assign(t,{[r]:e.routes[r]})),{});return{...e,routes:o}}(r,i),null,2)};`:""}\n window.__reactRouterRouteModules = {${d.map(((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`)).join(",")}};\n\nimport(${JSON.stringify(r.entry.module)});`:" ";return e.createElement(e.Fragment,null,e.createElement("script",Object.assign({},t,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:kr(a),type:void 0})),e.createElement("script",Object.assign({},t,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:kr(o),type:"module",async:!0})))}),[]),f=d.map((e=>{let t=r.routes[e.route.id];return(t.imports||[]).concat([t.module])})).flat(1),m=vn?[]:r.entry.imports.concat(f);return vn?null:e.createElement(e.Fragment,null,c?null:e.createElement("link",{rel:"modulepreload",href:r.url,crossOrigin:t.crossOrigin}),e.createElement("link",{rel:"modulepreload",href:r.entry.module,crossOrigin:t.crossOrigin}),(p=m,[...new Set(p)]).map((r=>e.createElement("link",{key:r,rel:"modulepreload",href:r,crossOrigin:t.crossOrigin}))),h);var p}function bn(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}const En="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{En&&(window.__reactRouterVersion="7")}catch(ao){}function Sn(e,t){return ie({basename:t?.basename,future:t?.future,history:l({window:t?.window}),hydrationData:t?.hydrationData||xn(),routes:e,mapRouteProperties:zt,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window}).initialize()}function Rn(e,t){return ie({basename:t?.basename,future:t?.future,history:u({window:t?.window}),hydrationData:t?.hydrationData||xn(),routes:e,mapRouteProperties:zt,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window}).initialize()}function xn(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Cn(e.errors)}),e}function Cn(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&"RouteErrorResponse"===a.__type)r[n]=new W(a.status,a.statusText,a.data,!0===a.internal);else if(a&&"Error"===a.__type){if(a.__subType){let e=window[a.__subType];if("function"==typeof e)try{let t=new e(a.message);t.stack="",r[n]=t}catch(ao){}}if(null==r[n]){let e=new Error(a.message);e.stack="",r[n]=e}}else r[n]=a;return r}function Dn({basename:t,children:r,window:n}){let a=e.useRef();null==a.current&&(a.current=l({window:n,v5Compat:!0}));let o=a.current,[i,s]=e.useState({action:o.action,location:o.location}),u=e.useCallback((t=>{e.startTransition((()=>s(t)))}),[s]);return e.useLayoutEffect((()=>o.listen(u)),[o,u]),e.createElement(Zt,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:o})}function kn({basename:t,children:r,window:n}){let a=e.useRef();null==a.current&&(a.current=u({window:n,v5Compat:!0}));let o=a.current,[i,s]=e.useState({action:o.action,location:o.location}),l=e.useCallback((t=>{e.startTransition((()=>s(t)))}),[s]);return e.useLayoutEffect((()=>o.listen(l)),[o,l]),e.createElement(Zt,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:o})}function Ln({basename:t,children:r,history:n}){let[a,o]=e.useState({action:n.action,location:n.location}),i=e.useCallback((t=>{e.startTransition((()=>o(t)))}),[o]);return e.useLayoutEffect((()=>n.listen(i)),[n,i]),e.createElement(Zt,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:n})}Ln.displayName="unstable_HistoryRouter";const Tn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,An=e.forwardRef((function({onClick:t,discover:r="render",prefetch:n="none",relative:a,reloadDocument:o,replace:i,state:s,target:l,to:u,preventScrollReset:c,viewTransition:d,...h},f){let m,{basename:p}=e.useContext(et),y="string"==typeof u&&Tn.test(u),g=!1;if("string"==typeof u&&y&&(m=u,En))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),r=M(t.pathname,p);t.origin===e.origin&&null!=r?u=r+t.search+t.hash:g=!0}catch(ao){}let v=at(u,{relative:a}),[w,b,E]=function(t,r){let n=e.useContext(un),[a,o]=e.useState(!1),[i,s]=e.useState(!1),{onFocus:l,onBlur:u,onMouseEnter:c,onMouseLeave:d,onTouchStart:h}=r,f=e.useRef(null);e.useEffect((()=>{if("render"===t&&s(!0),"viewport"===t){let e=new IntersectionObserver((e=>{e.forEach((e=>{s(e.isIntersecting)}))}),{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}}),[t]),e.useEffect((()=>{if(a){let e=setTimeout((()=>{s(!0)}),100);return()=>{clearTimeout(e)}}}),[a]);let m=()=>{o(!0)},p=()=>{o(!1),s(!1)};return n?"intent"!==t?[i,f,{}]:[i,f,{onFocus:dn(l,m),onBlur:dn(u,p),onMouseEnter:dn(c,m),onMouseLeave:dn(d,p),onTouchStart:dn(h,m)}]:[!1,f,{}]}(n,h),S=Nn(u,{replace:i,state:s,target:l,preventScrollReset:c,relative:a,viewTransition:d});let R=e.createElement("a",Object.assign({},h,E,{href:m||v,onClick:g||o?t:function(e){t&&t(e),e.defaultPrevented||S(e)},ref:bn(f,b),target:l,"data-discover":y||"render"!==r?void 0:"true"}));return w&&!y?e.createElement(e.Fragment,null,R,e.createElement(mn,{page:v})):R}));An.displayName="Link";const Mn=e.forwardRef((function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:a=!1,style:o,to:i,viewTransition:s,children:l,...u},c){let d=pt(i,{relative:u.relative}),h=it(),f=e.useContext(Ke),{navigator:m,basename:p}=e.useContext(et),y=null!=f&&Gn(d)&&!0===s,g=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=h.pathname,w=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;r||(v=v.toLowerCase(),w=w?w.toLowerCase():null,g=g.toLowerCase()),w&&p&&(w=M(w,p)||w);const b="/"!==g&&g.endsWith("/")?g.length-1:g.length;let E,S=v===g||!a&&v.startsWith(g)&&"/"===v.charAt(b),R=null!=w&&(w===g||!a&&w.startsWith(g)&&"/"===w.charAt(g.length)),x={isActive:S,isPending:R,isTransitioning:y},C=S?t:void 0;E="function"==typeof n?n(x):[n,S?"active":null,R?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let D="function"==typeof o?o(x):o;return e.createElement(An,Object.assign({},u,{"aria-current":C,className:E,ref:c,style:D,to:i,viewTransition:s}),"function"==typeof l?l(x):l)}));Mn.displayName="NavLink";const On=e.forwardRef((({discover:t="render",fetcherKey:r,navigate:n,reloadDocument:a,replace:o,state:i,method:s="get",action:l,onSubmit:u,relative:c,preventScrollReset:d,viewTransition:h,...f},m)=>{let p=In(),y=Bn(l,{relative:c}),g="get"===s.toLowerCase()?"get":"post",v="string"==typeof l&&Tn.test(l);return e.createElement("form",Object.assign({ref:m,method:g,action:y,onSubmit:a?u:e=>{if(u&&u(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,a=t?.getAttribute("formmethod")||s;p(t||e.currentTarget,{fetcherKey:r,method:a,navigate:n,replace:o,state:i,relative:c,preventScrollReset:d,viewTransition:h})}},f,{"data-discover":v||"render"!==t?void 0:"true"}))}));function Pn({getKey:t,storageKey:r,...n}){let a=e.useContext(un),{basename:o}=e.useContext(et),i=it(),s=At();Vn({getKey:t,storageKey:r});let l=e.useMemo((()=>{if(!a||!t)return null;let e=Xn(i,s,o,t);return e!==i.key?e:null}),[]);if(!a||a.isSpaMode)return null;let u=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},"")}try{let r=JSON.parse(sessionStorage.getItem(e)||"{}")[t||window.history.state.key];"number"==typeof r&&window.scrollTo(0,r)}catch(r){console.error(r),sessionStorage.removeItem(e)}}).toString();return e.createElement("script",Object.assign({},n,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${u})(${JSON.stringify(r||Jn)}, ${JSON.stringify(l)})`}}))}On.displayName="Form",Pn.displayName="ScrollRestoration";var _n=function(e){return e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState",e}(_n||{}),Un=function(e){return e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration",e}(Un||{});function jn(t){let r=e.useContext(Ye);return r||c(!1),r}function Fn(t){let r=e.useContext(Ke);return r||c(!1),r}function Nn(t,{target:r,replace:n,state:a,preventScrollReset:o,relative:i,viewTransition:s}={}){let l=ct(),u=it(),c=pt(t,{relative:i});return e.useCallback((e=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(e,r)){e.preventDefault();let r=void 0!==n?n:f(u)===f(c);l(t,{replace:r,state:a,preventScrollReset:o,relative:i,viewTransition:s})}}),[u,l,c,n,a,r,t,o,i,s])}function Hn(t){let r=e.useRef(ur(t)),n=e.useRef(!1),a=it(),o=e.useMemo((()=>function(e,t){let r=ur(e);return t&&t.forEach(((e,n)=>{r.has(n)||t.getAll(n).forEach((e=>{r.append(n,e)}))})),r}(a.search,n.current?null:r.current)),[a.search]),i=ct(),s=e.useCallback(((e,t)=>{const r=ur("function"==typeof e?e(o):e);n.current=!0,i("?"+r,t)}),[i,o]);return[o,s]}let $n=0;function In(){let{router:t}=jn(_n.UseSubmit),{basename:r}=e.useContext(et),n=kt(xt.UseRouteId);return e.useCallback((async(e,a={})=>{let{action:o,method:i,encType:s,formData:l,body:u}=fr(e,r);if(!1===a.navigate){let e=a.fetcherKey||`__${String(++$n)}__`;await t.fetch(e,n,a.action||o,{preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||i,formEncType:a.encType||s,flushSync:a.flushSync})}else await t.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||i,formEncType:a.encType||s,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})}),[t,r,n])}function Bn(t,{relative:r}={}){let{basename:n}=e.useContext(et),a=e.useContext(rt);a||c(!1);let[o]=a.matches.slice(-1),i={...pt(t||".",{relative:r})},s=it();if(null==t){i.search=s.search;let e=new URLSearchParams(i.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let r=e.toString();i.search=r?`?${r}`:""}}return t&&"."!==t||!o.route.index||(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(i.pathname="/"===i.pathname?n:j([n,i.pathname])),f(i)}function zn({key:t}={}){let{router:r}=jn(_n.UseFetcher),n=Fn(Un.UseFetcher),a=e.useContext(Qe),o=e.useContext(rt),i=o.matches[o.matches.length-1]?.route.id;a||c(!1),o||c(!1),null==i&&c(!1);let s=e.useId(),[l,u]=e.useState(t||s);t&&t!==l&&u(t),e.useEffect((()=>(r.getFetcher(l),()=>r.deleteFetcher(l))),[r,l]);let d=e.useCallback((async(e,t)=>{i||c(!1),await r.fetch(l,i,e,t)}),[l,i,r]),h=In(),f=e.useCallback((async(e,t)=>{await h(e,{...t,navigate:!1,fetcherKey:l})}),[l,h]),m=e.useMemo((()=>{let t=e.forwardRef(((t,r)=>e.createElement(On,Object.assign({},t,{navigate:!1,fetcherKey:l,ref:r}))));return t.displayName="fetcher.Form",t}),[l]),p=n.fetchers.get(l)||te,y=a.get(l);return e.useMemo((()=>({Form:m,submit:f,load:d,...p,data:y})),[m,f,d,p,y])}function qn(){let e=Fn(Un.UseFetchers);return Array.from(e.fetchers.entries()).map((([e,t])=>({...t,key:e})))}const Jn="react-router-scroll-positions";let Wn={};function Xn(e,t,r,n){let a=null;return n&&(a=n("/"!==r?{...e,pathname:M(e.pathname,r)||e.pathname}:e,t)),null==a&&(a=e.key),a}function Vn({getKey:t,storageKey:r}={}){let{router:n}=jn(_n.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:o}=Fn(Un.UseScrollRestoration),{basename:i}=e.useContext(et),s=it(),l=At(),u=Lt();e.useEffect((()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"})),[]),function(t,r){let{capture:n}=r||{};e.useEffect((()=>{let e=null!=n?{capture:n}:void 0;return window.addEventListener("pagehide",t,e),()=>{window.removeEventListener("pagehide",t,e)}}),[t,n])}(e.useCallback((()=>{if("idle"===u.state){let e=Xn(s,l,i,t);Wn[e]=window.scrollY}try{sessionStorage.setItem(r||Jn,JSON.stringify(Wn))}catch(e){}window.history.scrollRestoration="auto"}),[u.state,t,i,s,l,r])),"undefined"!=typeof document&&(e.useLayoutEffect((()=>{try{let e=sessionStorage.getItem(r||Jn);e&&(Wn=JSON.parse(e))}catch(ao){}}),[r]),e.useLayoutEffect((()=>{let e=n?.enableScrollRestoration(Wn,(()=>window.scrollY),t?(e,r)=>Xn(e,r,i,t):void 0);return()=>e&&e()}),[n,i,t]),e.useLayoutEffect((()=>{if(!1!==a)if("number"!=typeof a){if(s.hash){let e=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(e)return void e.scrollIntoView()}!0!==o&&window.scrollTo(0,0)}else window.scrollTo(0,a)}),[s,a,o]))}function Yn(t,r){let{capture:n}=r||{};e.useEffect((()=>{let e=null!=n?{capture:n}:void 0;return window.addEventListener("beforeunload",t,e),()=>{window.removeEventListener("beforeunload",t,e)}}),[t,n])}function Kn({when:t,message:r}){let n=Nt(t);e.useEffect((()=>{if("blocked"===n.state){window.confirm(r)?setTimeout(n.proceed,0):n.reset()}}),[n,r]),e.useEffect((()=>{"blocked"!==n.state||t||n.reset()}),[n,t])}function Gn(t,r={}){let n=e.useContext(Ge);null==n&&c(!1);let{basename:a}=jn(_n.useViewTransitionState),o=pt(t,{relative:r.relative});if(!n.isTransitioning)return!1;let i=M(n.currentLocation.pathname,a)||n.currentLocation.pathname,s=M(n.nextLocation.pathname,a)||n.nextLocation.pathname;return null!=T(o.pathname,s)||null!=T(o.pathname,i)}function Qn({basename:t,children:r,location:n="/"}){"string"==typeof n&&(n=m(n));let a=i.Pop,o={pathname:n.pathname||"/",search:n.search||"",hash:n.hash||"",state:null!=n.state?n.state:null,key:n.key||"default"},s=ra();return e.createElement(Zt,{basename:t,children:r,location:o,navigationType:a,navigator:s,static:!0})}function Zn({context:t,router:r,hydrate:n=!0,nonce:a}){r&&t||c(!1);let o={router:r,navigator:ra(),static:!0,staticContext:t,basename:t.basename||"/"},i=new Map,s="";if(!1!==n){let e={loaderData:t.loaderData,actionData:t.actionData,errors:ta(t.errors)};s=`window.__staticRouterHydrationData = JSON.parse(${JSON.stringify(JSON.stringify(e)).replace(ua,(e=>la[e]))});`}let{state:l}=o.router;return e.createElement(e.Fragment,null,e.createElement(Ye.Provider,{value:o},e.createElement(Ke.Provider,{value:l},e.createElement(Qe.Provider,{value:i},e.createElement(Ge.Provider,{value:{isTransitioning:!1}},e.createElement(Zt,{basename:o.basename,location:l.location,navigationType:l.historyAction,navigator:o.navigator,static:o.static},e.createElement(ea,{routes:r.routes,future:r.future,state:l})))))),s?e.createElement("script",{suppressHydrationWarning:!0,nonce:a,dangerouslySetInnerHTML:{__html:s}}):null)}function ea({routes:e,future:t,state:r}){return gt(e,void 0,r,t)}function ta(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)X(a)?r[n]={...a,__type:"RouteErrorResponse"}:a instanceof Error?r[n]={message:a.message,__type:"Error",..."Error"!==a.name?{__subType:a.name}:{}}:r[n]=a;return r}function ra(){return{createHref:oa,encodeLocation:ia,push(e){throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)})\` somewhere in your app.`)},replace(e){throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)}, { replace: true })\` somewhere in your app.`)},go(e){throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${e})\` somewhere in your app.`)},back(){throw new Error("You cannot use navigator.back() on the server because it is a stateless environment.")},forward(){throw new Error("You cannot use navigator.forward() on the server because it is a stateless environment.")}}}function na(e,t){return se(e,{...t,mapRouteProperties:zt})}function aa(e,t,r={}){let n={},a=v(e,zt,void 0,n),o=t.matches.map((e=>{let t=n[e.route.id]||e.route;return{...e,route:t}})),s=e=>`You cannot use router.${e}() on the server because it is a stateless environment`;return{get basename(){return t.basename},get future(){return{...r?.future}},get state(){return{historyAction:i.Pop,location:t.location,matches:o,loaderData:t.loaderData,actionData:t.actionData,errors:t.errors,initialized:!0,navigation:ee,restoreScrollPosition:null,preventScrollReset:!1,revalidation:"idle",fetchers:new Map,blockers:new Map}},get routes(){return a},get window(){},initialize(){throw s("initialize")},subscribe(){throw s("subscribe")},enableScrollRestoration(){throw s("enableScrollRestoration")},navigate(){throw s("navigate")},fetch(){throw s("fetch")},revalidate(){throw s("revalidate")},createHref:oa,encodeLocation:ia,getFetcher:()=>te,deleteFetcher(){throw s("deleteFetcher")},dispose(){throw s("dispose")},getBlocker:()=>re,deleteBlocker(){throw s("deleteBlocker")},patchRoutes(){throw s("patchRoutes")},_internalFetchControllers:new Map,_internalSetRoutes(){throw s("_internalSetRoutes")}}}function oa(e){return"string"==typeof e?e:f(e)}function ia(e){let t="string"==typeof e?e:f(e);t=t.replace(/ $/,"%20");let r=sa.test(t)?new URL(t):new URL(t,"http://localhost");return{pathname:r.pathname,search:r.search,hash:r.hash}}const sa=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,la={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},ua=/[&><\u2028\u2029]/g;function ca({context:t,url:r,abortDelay:n,nonce:a}){"string"==typeof r&&(r=new URL(r));let{manifest:o,routeModules:i,criticalCss:s,serverHandoffString:l}=t,u=Wr(o.routes,i,t.future,t.isSpaMode);t.staticHandlerContext.loaderData={...t.staticHandlerContext.loaderData};for(let e of t.staticHandlerContext.matches){let r=e.route.id,n=i[r],a=t.manifest.routes[r];n&&Zr(a,n,t.isSpaMode)&&(n.HydrateFallback||!a.hasLoader)&&delete t.staticHandlerContext.loaderData[r]}let c=aa(u,t.staticHandlerContext);return e.createElement(e.Fragment,null,e.createElement(un.Provider,{value:{manifest:o,routeModules:i,criticalCss:s,serverHandoffString:l,future:t.future,isSpaMode:t.isSpaMode,serializeError:t.serializeError,abortDelay:n,renderMeta:t.renderMeta}},e.createElement($r,{location:c.state.location},e.createElement(Zn,{router:c,context:t.staticHandlerContext,hydrate:!1}))),t.serverHandoffStream?e.createElement(e.Suspense,null,e.createElement(Ar,{context:t,identifier:0,reader:t.serverHandoffStream.getReader(),textDecoder:new TextDecoder,nonce:a})):null)}function da(t,r={}){return function({initialEntries:n,initialIndex:a,hydrationData:o,future:i}){let s=e.useRef(),l=e.useRef();if(null==s.current){l.current={future:{},manifest:{routes:{},entry:{imports:[],module:""},url:"",version:""},routeModules:{},isSpaMode:!1};let e=ha(v(t,(e=>e)),r,l.current.manifest,l.current.routeModules);s.current=qt(e,{initialEntries:n,initialIndex:a,hydrationData:o})}return e.createElement(un.Provider,{value:l.current},e.createElement(Wt,{router:s.current}))}}function ha(e,t,r,n,a){return e.map((e=>{if(!e.id)throw new Error("Expected a route.id in @remix-run/testing processRoutes() function");let{loader:o,action:i}=e,s={id:e.id,path:e.path,index:e.index,Component:e.Component,HydrateFallback:e.HydrateFallback,ErrorBoundary:e.ErrorBoundary,action:i?e=>i({...e,context:t}):void 0,loader:o?e=>o({...e,context:t}):void 0,handle:e.handle,shouldRevalidate:e.shouldRevalidate},l={id:e.id,path:e.path,index:e.index,parentId:a,hasAction:null!=e.action,hasLoader:null!=e.loader,hasClientAction:!1,hasClientLoader:!1,hasErrorBoundary:null!=e.ErrorBoundary,module:"build/stub-path-to-module.js"};return r.routes[s.id]=l,n[e.id]={default:e.Component||Gt,ErrorBoundary:e.ErrorBoundary||void 0,handle:e.handle,links:e.links,meta:e.meta,shouldRevalidate:e.shouldRevalidate},e.children&&(s.children=ha(e.children,t,r,n,s.id)),s}))}const fa=new TextEncoder,ma=async(e,t)=>{let r=e.lastIndexOf("."),n=e.slice(0,r),a=e.slice(r+1),o=fa.encode(n),i=await pa(t,["verify"]),s=function(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}(atob(a));return!!(await crypto.subtle.verify("HMAC",i,s,o))&&n},pa=async(e,t)=>crypto.subtle.importKey("raw",fa.encode(e),{name:"HMAC",hash:"SHA-256"},!1,t);const ya=(e,t={})=>{let{secrets:r=[],...o}={path:"/",sameSite:"lax",...t};return function(e,t){Bt(!t,`The "${e}" cookie has an "expires" property set. This will cause the expires value to not be updated when the session is committed. Instead, you should set the expires value when serializing the cookie. You can use \`commitSession(session, { expires })\` if using a session storage object, or \`cookie.serialize("value", { expires })\` if you're using the cookie directly.`)}(e,o.expires),{get name(){return e},get isSigned(){return r.length>0},get expires(){return void 0!==o.maxAge?new Date(Date.now()+1e3*o.maxAge):o.expires},async parse(t,a){if(!t)return null;let i=n(t,{...o,...a});return e in i?""===i[e]?"":await async function(e,t){if(t.length>0){for(let r of t){let t=await ma(e,r);if(!1!==t)return va(t)}return null}return va(e)}(i[e],r):null},serialize:async(t,n)=>a(e,""===t?"":await async function(e,t){let r=function(e){return btoa(function(e){let t,r,n=e.toString(),a="",o=0;for(;o<n.length;){if(t=n.charAt(o++),"%"===t)if("u"===n.charAt(o)){if(r=n.slice(o+1,o+5),/^[\da-f]{4}$/i.exec(r)){a+=String.fromCharCode(parseInt(r,16)),o+=5;continue}}else if(r=n.slice(o,o+2),/^[\da-f]{2}$/i.exec(r)){a+=String.fromCharCode(parseInt(r,16)),o+=2;continue}a+=t}return a}(encodeURIComponent(JSON.stringify(e))))}(e);t.length>0&&(r=await(async(e,t)=>{let r=fa.encode(e),n=await pa(t,["sign"]),a=await crypto.subtle.sign("HMAC",n,r);return e+"."+btoa(String.fromCharCode(...new Uint8Array(a))).replace(/=+$/,"")})(r,t[0]));return r}(t,r),{...o,...n})}},ga=e=>null!=e&&"string"==typeof e.name&&"boolean"==typeof e.isSigned&&"function"==typeof e.parse&&"function"==typeof e.serialize;function va(e){try{return JSON.parse(decodeURIComponent(function(e){let t,r,n=e.toString(),a="",o=0;for(;o<n.length;)t=n.charAt(o++),/[\w*+\-./@]/.exec(t)?a+=t:(r=t.charCodeAt(0),a+=r<256?"%"+wa(r,2):"%u"+wa(r,4).toUpperCase());return a}(atob(e))))}catch(t){return{}}}function wa(e,t){let r=e.toString(16);for(;r.length<t;)r="0"+r;return r}function ba(e){return Object.keys(e).reduce(((t,r)=>(t[r]=e[r].module,t)),{})}let Ea=function(e){return e.Development="development",e.Production="production",e.Test="test",e}({});function Sa(e,t){if(e instanceof Error&&t!==Ea.Development){let e=new Error("Unexpected Server Error");return e.stack=void 0,e}return e}function Ra(e,t){return Object.entries(e).reduce(((e,[r,n])=>Object.assign(e,{[r]:Sa(n,t)})),{})}function xa(e,t){let r=Sa(e,t);return{message:r.message,stack:r.stack}}function Ca(e,t){if(!e)return null;let r=Object.entries(e),n={};for(let[a,o]of r)if(X(o))n[a]={...o,__type:"RouteErrorResponse"};else if(o instanceof Error){let e=Sa(o,t);n[a]={message:e.message,stack:e.stack,__type:"Error",..."Error"!==e.name?{__subType:e.name}:{}}}else n[a]=o;return n}function Da(e,t,r){let n=w(e,t,r);return n?n.map((e=>({params:e.params,pathname:e.pathname,route:e.route}))):null}function ka(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}const La=new Set([301,302,303,307,308]);function Ta(e){return La.has(e)}async function Aa(e,t){let r=await e({request:Oa(Ma(t.request)),params:t.params,context:t.context});if(Ne(r)&&r.init&&r.init.status&&Ta(r.init.status))throw new Response(null,r.init);return r}function Ma(e){let t=new URL(e.url),r=t.searchParams.getAll("index");t.searchParams.delete("index");let n=[];for(let o of r)o&&n.push(o);for(let o of n)t.searchParams.append("index",o);let a={method:e.method,body:e.body,headers:e.headers,signal:e.signal};return a.body&&(a.duplex="half"),new Request(t.href,a)}function Oa(e){let t=new URL(e.url);t.searchParams.delete("_routes");let r={method:e.method,body:e.body,headers:e.headers,signal:e.signal};return r.body&&(r.duplex="half"),new Request(t.href,r)}function Pa(e,t){if(!1===e||null==e)throw console.error("The following error is a bug in Remix; please open an issue! https://github.com/remix-run/remix/issues/new"),new Error(t)}function _a(e){let t={};return Object.values(e).forEach((e=>{let r=e.parentId||"";t[r]||(t[r]=[]),t[r].push(e)})),t}function Ua(e,t="",r=_a(e)){return(r[t]||[]).map((t=>({...t,children:Ua(e,t.id,r)})))}function ja(e,t,r="",n=_a(e)){return(n[r]||[]).map((r=>{let a={hasErrorBoundary:"root"===r.id||null!=r.module.ErrorBoundary,id:r.id,path:r.path,loader:r.module.loader?async e=>{if(e.request.headers.has("X-React-Router-Prerender-Data")){let t=e.request.headers.get("X-React-Router-Prerender-Data");t||Pa(!1);let n=(new TextEncoder).encode(t),a=new ReadableStream({start(e){e.enqueue(n),e.close()}}),o=(await jr(a,global)).value;o&&r.id in o||Pa(!1);let i=o[r.id];return"data"in i||Pa(!1),i.data}return await Aa(r.module.loader,e)}:void 0,action:r.module.action?e=>Aa(r.module.action,e):void 0,handle:r.module.handle};return r.index?{index:!0,...a}:{caseSensitive:r.caseSensitive,children:ja(e,t,r.id,n),...a}}))}const Fa={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Na=/[&><\u2028\u2029]/g;function Ha(e){return JSON.stringify(e).replace(Na,(e=>Fa[e]))}function $a(e){globalThis.__reactRouterDevServerHooks=e}function Ia(){return globalThis.__reactRouterDevServerHooks}function Ba(e,t){let r,n=t.errors?t.matches.findIndex((e=>t.errors[e.route.id])):-1,a=n>=0?t.matches.slice(0,n+1):t.matches;if(n>=0){let{actionHeaders:e,actionData:a,loaderHeaders:o,loaderData:i}=t;t.matches.slice(n).some((t=>{let n=t.route.id;return!e[n]||a&&a.hasOwnProperty(n)?o[n]&&!i.hasOwnProperty(n)&&(r=o[n]):r=e[n],null!=r}))}return a.reduce(((n,o,i)=>{let{id:s}=o.route,l=e.routes[s].module,u=t.loaderHeaders[s]||new Headers,c=t.actionHeaders[s]||new Headers,d=null!=r&&i===a.length-1,h=d&&r!==u&&r!==c;if(null==l.headers){let e=new Headers(n);return h&&za(r,e),za(c,e),za(u,e),e}let f=new Headers(l.headers?"function"==typeof l.headers?l.headers({loaderHeaders:u,parentHeaders:n,actionHeaders:c,errorHeaders:d?r:void 0}):l.headers:void 0);return h&&za(r,f),za(c,f),za(u,f),za(n,f),f}),new Headers)}function za(e,t){let r=e.get("Set-Cookie");if(r){o(r).forEach((e=>{t.append("Set-Cookie",e)}))}}function qa({isActionDataRequest:e,loadRouteIds:t}={}){return async({request:r,matches:n})=>{if(e&&"GET"===r.method)return{};let a=t?n.filter((e=>t.includes(e.route.id))):n;return(await Promise.all(a.map((e=>e.resolve())))).reduce(((e,t,r)=>Object.assign(e,{[a[r].route.id]:t})),{})}}function Ja(e,t,r){let n=t.get("Location");return r&&(n=M(n,r)||n),{redirect:n,status:e,revalidate:t.has("X-Remix-Revalidate")||t.has("Set-Cookie"),reload:t.has("X-Remix-Reload-Document"),replace:t.has("X-Remix-Replace")}}function Wa(e,t,n,a){let o=new AbortController,i=setTimeout((()=>o.abort(new Error("Server Timeout"))),"number"==typeof n?n:4950);return t.addEventListener("abort",(()=>clearTimeout(i))),r(e,{signal:o.signal,plugins:[e=>{if(e instanceof Error){let{name:t,message:r,stack:n}=a===Ea.Production?Sa(e,a):e;return["SanitizedError",t,r,n]}if(e instanceof W){let{data:t,status:r,statusText:n}=e;return["ErrorResponse",t,r,n]}if(e&&"object"==typeof e&&Tr in e)return["SingleFetchRedirect",e[Tr]]}],postPlugins:[e=>{if(e&&"object"==typeof e)return["SingleFetchClassInstance",Object.fromEntries(Object.entries(e))]},()=>["SingleFetchFallback"]]})}function Xa(e,t){let r=Ua(e.routes),n=ja(e.routes,e.future),a=(o=t)===Ea.Development||o===Ea.Production||o===Ea.Test?t:Ea.Production;var o;let i=se(n,{basename:e.basename}),s=e.entry.module.handleError||((e,{request:t})=>{a===Ea.Test||t.signal.aborted||console.error(X(e)&&e.error?e.error:e)});return{routes:r,dataRoutes:n,serverMode:a,staticHandler:i,errorHandler:s}}const Va=(e,t)=>{let r,n,a,o,i;return async function(s,l={}){if(r="function"==typeof e?await e():e,"function"==typeof e){let e=Xa(r,t);n=e.routes,a=e.serverMode,o=e.staticHandler,i=e.errorHandler}else if(!(n&&a&&o&&i)){let e=Xa(r,t);n=e.routes,a=e.serverMode,o=e.staticHandler,i=e.errorHandler}let u=new URL(s.url),c={},d=e=>{t===Ea.Development&&Ia()?.processRequestError?.(e),i(e,{context:l,params:c,request:s})},h=`${r.basename??"/"}/__manifest`.replace(/\/+/g,"/");if(u.pathname===h)try{let e=await async function(e,t,r){let n={};if(r.searchParams.has("p")){for(let a of r.searchParams.getAll("p")){let r=Da(t,a,e.basename);if(r)for(let t of r){let r=t.route.id;n[r]=e.assets.routes[r]}}return((e,t={})=>$(e,t))(n,{headers:{"Cache-Control":"public, max-age=31536000, immutable"}})}return new Response("Invalid Request",{status:400})}(r,n,u);return e}catch(ao){return d(ao),new Response("Unknown Server Error",{status:500})}let f,m=Da(n,u.pathname,r.basename);if(m&&m.length>0&&Object.assign(c,m[0].params),u.pathname.endsWith(".data")){let e=new URL(s.url);e.pathname=e.pathname.replace(/\.data$/,"").replace(/^\/_root$/,"/");let t=Da(n,e.pathname,r.basename);if(f=await async function(e,t,r,n,a,o,i){let{result:s,headers:l,status:u}="GET"!==n.method?await async function(e,t,r,n,a,o,i){try{let s=new Request(a,{method:n.method,body:n.body,headers:n.headers,signal:n.signal,...n.body?{duplex:"half"}:void 0}),l=await r.query(s,{requestContext:o,skipLoaderErrorBubbling:!0,dataStrategy:qa({isActionDataRequest:!0})});if(ka(l))return{result:Ja(l.status,l.headers,e.basename),headers:l.headers,status:202};let u,c=l,d=Ba(e,c);return Ta(c.statusCode)&&d.has("Location")?{result:Ja(c.statusCode,d,e.basename),headers:d,status:202}:(c.errors&&(Object.values(c.errors).forEach((e=>{X(e)&&!e.error||i(e)})),c.errors=Ra(c.errors,t)),u=c.errors?{error:Object.values(c.errors)[0]}:{data:Object.values(c.actionData||{})[0]},{result:u,headers:d,status:c.statusCode})}catch(s){return i(s),{result:{error:s},headers:new Headers,status:500}}}(t,e,r,n,a,o,i):await async function(e,t,r,n,a,o,i){try{let s=new Request(a,{headers:n.headers,signal:n.signal}),l=new URL(n.url).searchParams.get("_routes")?.split(",")||void 0,u=await r.query(s,{requestContext:o,skipLoaderErrorBubbling:!0,dataStrategy:qa({loadRouteIds:l})});if(ka(u))return{result:{[Tr]:Ja(u.status,u.headers,e.basename)},headers:u.headers,status:202};let c=u,d=Ba(e,c);if(Ta(c.statusCode)&&d.has("Location"))return{result:{[Tr]:Ja(c.statusCode,d,e.basename)},headers:d,status:202};c.errors&&(Object.values(c.errors).forEach((e=>{X(e)&&!e.error||i(e)})),c.errors=Ra(c.errors,t));let h={};return(l?c.matches.filter((e=>e.route.loader&&l.includes(e.route.id))):c.matches).forEach((e=>{let{id:t}=e.route;c.errors&&c.errors.hasOwnProperty(t)?h[t]={error:c.errors[t]}:c.loaderData.hasOwnProperty(t)&&(h[t]={data:c.loaderData[t]})})),{result:h,headers:d,status:c.statusCode}}catch(s){return i(s),{result:{root:{error:s}},headers:new Headers,status:500}}}(t,e,r,n,a,o,i),c=new Headers(l);if(c.set("X-Remix-Response","yes"),304===u)return new Response(null,{status:304,headers:c});return c.set("Content-Type","text/x-script"),new Response(Wa(s,n.signal,t.entry.module.streamTimeout,e),{status:u||200,headers:c})}(a,r,o,s,e,l,d),r.entry.module.handleDataRequest&&(f=await r.entry.module.handleDataRequest(f,{context:l,params:t?t[0].params:{},request:s}),function(e){return Ta(e.status)}(f))){let e=Ja(f.status,f.headers,r.basename);"GET"===s.method&&(e={[Tr]:e});let t=new Headers(f.headers);return t.set("Content-Type","text/x-script"),new Response(Wa(e,s.signal,r.entry.module.streamTimeout,a),{status:202,headers:t})}}else if(m&&null==m[m.length-1].route.module.default&&null==m[m.length-1].route.module.ErrorBoundary)f=await async function(e,t,r,n,a,o,i){try{let e=await r.queryRoute(a,{routeId:n,requestContext:o});return ka(e)||Pa(!1),e}catch(s){return ka(s)?(s.headers.set("X-Remix-Catch","yes"),s):X(s)?(s&&i(s),function(e,t){return $(xa(e.error||new Error("Unexpected Server Error"),t),{status:e.status,statusText:e.statusText,headers:{"X-Remix-Error":"yes"}})}(s,e)):(i(s),Ya(s,e))}}(a,0,o,m.slice(-1)[0].route.id,s,l,d);else{let e=t===Ea.Development?await(Ia()?.getCriticalCss?.(r,u.pathname)):void 0;f=await async function(e,t,r,n,a,o,i){let s;try{s=await r.query(n,{requestContext:a})}catch(h){return o(h),new Response(null,{status:500})}if(ka(s))return s;let l=Ba(t,s);if(304===s.statusCode)return new Response(null,{status:304,headers:l});s.errors&&(Object.values(s.errors).forEach((e=>{X(e)&&!e.error||o(e)})),s.errors=Ra(s.errors,e));let u={loaderData:s.loaderData,actionData:s.actionData,errors:Ca(s.errors,e)},c={manifest:t.assets,routeModules:ba(t.routes),staticHandlerContext:s,criticalCss:i,serverHandoffString:Ha({basename:t.basename,criticalCss:i,future:t.future,isSpaMode:t.isSpaMode}),serverHandoffStream:Wa(u,n.signal,t.entry.module.streamTimeout,e),renderMeta:{},future:t.future,isSpaMode:t.isSpaMode,serializeError:t=>xa(t,e)},d=t.entry.module.default;try{return await d(n,s.statusCode,l,c,a)}catch(h){o(h);let i=h;if(ka(h))try{let e=await function(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?null==e.body?null:e.json():e.text()}(h);i=new W(h.status,h.statusText,e)}catch(ao){}s=function(e,t,r){return{...t,statusCode:X(r)?r.status:500,errors:{[t._deepestRenderedBoundaryId||e[0].id]:r}}}(r.dataRoutes,s,i),s.errors&&(s.errors=Ra(s.errors,e));let u={loaderData:s.loaderData,actionData:s.actionData,errors:Ca(s.errors,e)};c={...c,staticHandlerContext:s,serverHandoffString:Ha({basename:t.basename,future:t.future,isSpaMode:t.isSpaMode}),serverHandoffStream:Wa(u,n.signal,t.entry.module.streamTimeout,e),renderMeta:{}};try{return await d(n,s.statusCode,l,c,a)}catch(h){return o(h),Ya(h,e)}}}(a,r,o,s,l,d,e)}return"HEAD"===s.method?new Response(null,{headers:f.headers,status:f.status,statusText:f.statusText}):f}};function Ya(e,t){let r="Unexpected Server Error";return t!==Ea.Production&&(r+=`\n\n${String(e)}`),new Response(r,{status:500,headers:{"Content-Type":"text/plain"}})}function Ka(e){return`__flash_${e}__`}const Ga=(e={},t="")=>{let r=new Map(Object.entries(e));return{get id(){return t},get data(){return Object.fromEntries(r)},has:e=>r.has(e)||r.has(Ka(e)),get(e){if(r.has(e))return r.get(e);let t=Ka(e);if(r.has(t)){let e=r.get(t);return r.delete(t),e}},set(e,t){r.set(e,t)},flash(e,t){r.set(Ka(e),t)},unset(e){r.delete(e)}}},Qa=e=>null!=e&&"string"==typeof e.id&&void 0!==e.data&&"function"==typeof e.has&&"function"==typeof e.get&&"function"==typeof e.set&&"function"==typeof e.flash&&"function"==typeof e.unset;function Za({cookie:e,createData:t,readData:r,updateData:n,deleteData:a}){let o=ga(e)?e:ya(e?.name||"__session",e);return eo(o),{async getSession(e,t){let n=e&&await o.parse(e,t),a=n&&await r(n);return Ga(a||{},n||"")},async commitSession(e,r){let{id:a,data:i}=e,s=null!=r?.maxAge?new Date(Date.now()+1e3*r.maxAge):null!=r?.expires?r.expires:o.expires;return a?await n(a,i,s):a=await t(i,s),o.serialize(a,r)},destroySession:async(e,t)=>(await a(e.id),o.serialize("",{...t,maxAge:void 0,expires:new Date(0)}))}}function eo(e){Bt(e.isSigned,`The "${e.name}" cookie is not signed, but session cookies should be signed to prevent tampering on the client before they are sent back to the server. See https://remix.run/utils/cookies#signing-cookies for more information.`)}function to({cookie:e}={}){let t=ga(e)?e:ya(e?.name||"__session",e);return eo(t),{getSession:async(e,r)=>Ga(e&&await t.parse(e,r)||{}),async commitSession(e,r){let n=await t.serialize(e.data,r);if(n.length>4096)throw new Error("Cookie length will exceed browser maximum. Length: "+n.length);return n},destroySession:async(e,r)=>t.serialize("",{...r,maxAge:void 0,expires:new Date(0)})}}function ro({cookie:e}={}){let t=new Map;return Za({cookie:e,async createData(e,r){let n=Math.random().toString(36).substring(2,10);return t.set(n,{data:e,expires:r}),n},async readData(e){if(t.has(e)){let{data:r,expires:n}=t.get(e);if(!n||n>new Date)return r;n&&t.delete(e)}return null},async updateData(e,r,n){t.set(e,{data:r,expires:n})},async deleteData(e){t.delete(e)}})}function no(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&"RouteErrorResponse"===a.__type)r[n]=new W(a.status,a.statusText,a.data,!0===a.internal);else if(a&&"Error"===a.__type){if(a.__subType){let e=window[a.__subType];if("function"==typeof e)try{let t=new e(a.message);t.stack=a.stack,r[n]=t}catch(ao){}}if(null==r[n]){let e=new Error(a.message);e.stack=a.stack,r[n]=e}}else r[n]=a;return r}export{tr as Await,Dn as BrowserRouter,On as Form,kn as HashRouter,re as IDLE_BLOCKER,te as IDLE_FETCHER,ee as IDLE_NAVIGATION,An as Link,fn as Links,Yt as MemoryRouter,gn as Meta,Mn as NavLink,Kt as Navigate,i as NavigationType,Gt as Outlet,mn as PrefetchPageLinks,Qt as Route,Zt as Router,Wt as RouterProvider,er as Routes,wn as Scripts,Pn as ScrollRestoration,ca as ServerRouter,Qn as StaticRouter,Zn as StaticRouterProvider,Ye as UNSAFE_DataRouterContext,Ke as UNSAFE_DataRouterStateContext,W as UNSAFE_ErrorResponseImpl,Qe as UNSAFE_FetchersContext,un as UNSAFE_FrameworkContext,tt as UNSAFE_LocationContext,et as UNSAFE_NavigationContext,$r as UNSAFE_RemixErrorBoundary,rt as UNSAFE_RouteContext,Ea as UNSAFE_ServerMode,Tr as UNSAFE_SingleFetchRedirectSymbol,Ge as UNSAFE_ViewTransitionContext,l as UNSAFE_createBrowserHistory,Kr as UNSAFE_createClientRoutes,Xr as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,ie as UNSAFE_createRouter,jr as UNSAFE_decodeViaTurboStream,no as UNSAFE_deserializeErrors,nn as UNSAFE_getPatchRoutesOnNavigationFunction,Mr as UNSAFE_getSingleFetchDataStrategy,c as UNSAFE_invariant,zt as UNSAFE_mapRouteProperties,Zr as UNSAFE_shouldHydrateRouteLoader,an as UNSAFE_useFogOFWarDiscovery,Vn as UNSAFE_useScrollRestoration,Sn as createBrowserRouter,ya as createCookie,to as createCookieSessionStorage,Rn as createHashRouter,qt as createMemoryRouter,ro as createMemorySessionStorage,f as createPath,Va as createRequestHandler,or as createRoutesFromChildren,or as createRoutesFromElements,da as createRoutesStub,ur as createSearchParams,Ga as createSession,Za as createSessionStorage,na as createStaticHandler,aa as createStaticRouter,B as data,L as generatePath,ga as isCookie,X as isRouteErrorResponse,Qa as isSession,$ as json,T as matchPath,w as matchRoutes,m as parsePath,z as redirect,q as redirectDocument,ir as renderMatches,J as replace,O as resolvePath,Ln as unstable_HistoryRouter,$a as unstable_setDevServerHooks,Kn as unstable_usePrompt,Pt as useActionData,jt as useAsyncError,Ut as useAsyncValue,Yn as useBeforeUnload,Nt as useBlocker,zn as useFetcher,qn as useFetchers,Bn as useFormAction,at as useHref,ot as useInRouterContext,Nn as useLinkClickHandler,Mt as useLoaderData,it as useLocation,lt as useMatch,At as useMatches,ct as useNavigate,Lt as useNavigation,st as useNavigationType,ft as useOutlet,ht as useOutletContext,mt as useParams,pt as useResolvedPath,Tt as useRevalidator,_t as useRouteError,Ot as useRouteLoaderData,yt as useRoutes,Hn as useSearchParams,In as useSubmit,Gn as useViewTransitionState};
|
|
11
|
+
import*as e from"react";import{decode as t,encode as r}from"turbo-stream";import{parse as n,serialize as a}from"cookie";import{splitCookiesString as o}from"set-cookie-parser";let i=function(e){return e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE",e}({});function s(e={}){let t,{initialEntries:r=["/"],initialIndex:n,v5Compat:a=!1}=e;t=r.map(((e,t)=>d(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let o=u(null==n?t.length-1:n),s=i.Pop,l=null;function u(e){return Math.min(Math.max(e,0),t.length-1)}function c(){return t[o]}function d(e,r=null,n){return h(t?c().pathname:"/",e,r,n)}function p(e){return"string"==typeof e?e:f(e)}return{get index(){return o},get action(){return s},get location(){return c()},createHref:p,createURL:e=>new URL(p(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?m(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,r){s=i.Push;let n=d(e,r);o+=1,t.splice(o,t.length,n),a&&l&&l({action:s,location:n,delta:1})},replace(e,r){s=i.Replace;let n=d(e,r);t[o]=n,a&&l&&l({action:s,location:n,delta:0})},go(e){s=i.Pop;let r=u(o+e),n=t[r];o=r,l&&l({action:s,location:n,delta:e})},listen:e=>(l=e,()=>{l=null})}}function l(e={}){return p((function(e,t){let{pathname:r,search:n,hash:a}=e.location;return h("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:f(t)}),null,e)}function u(e={}){return p((function(e,t){let{pathname:r="/",search:n="",hash:a=""}=m(e.location.hash.substring(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),h("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"==typeof t?t:f(t))}),(function(e,t){}),e)}function c(e,t){if(!1===e||null==e)throw new Error(t)}function d(e,t){return{usr:e.state,key:e.key,idx:t}}function h(e,t,r=null,n){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?m(t):t,state:r,key:t&&t.key||n||Math.random().toString(36).substring(2,10)}}function f({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function m(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function p(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,s=a.history,l=i.Pop,u=null,m=p();function p(){return(s.state||{idx:null}).idx}function y(){l=i.Pop;let e=p(),t=null==e?null:e-m;m=e,u&&u({action:l,location:v.location,delta:t})}function g(e){let t="null"!==a.location.origin?a.location.origin:a.location.href,r="string"==typeof e?e:f(e);return r=r.replace(/ $/,"%20"),t||c(!1),new URL(r,t)}null==m&&(m=0,s.replaceState({...s.state,idx:m},""));let v={get action(){return l},get location(){return e(a,s)},listen(e){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener("popstate",y),u=e,()=>{a.removeEventListener("popstate",y),u=null}},createHref:e=>t(a,e),createURL:g,encodeLocation(e){let t=g(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){l=i.Push;let n=h(v.location,e,t);r&&r(n,e),m=p()+1;let c=d(n,m),f=v.createHref(n);try{s.pushState(c,"",f)}catch(y){if(y instanceof DOMException&&"DataCloneError"===y.name)throw y;a.location.assign(f)}o&&u&&u({action:l,location:v.location,delta:1})},replace:function(e,t){l=i.Replace;let n=h(v.location,e,t);r&&r(n,e),m=p();let a=d(n,m),c=v.createHref(n);s.replaceState(a,"",c),o&&u&&u({action:l,location:v.location,delta:0})},go:e=>s.go(e)};return v}let y=function(e){return e.data="data",e.redirect="redirect",e.error="error",e}({});const g=new Set(["lazy","caseSensitive","path","id","index","children"]);function v(e,t,r=[],n={}){return e.map(((e,a)=>{let o=[...r,String(a)],i="string"==typeof e.id?e.id:o.join("-");if(!0===e.index&&e.children&&c(!1),n[i]&&c(!1),function(e){return!0===e.index}(e)){let r={...e,...t(e),id:i};return n[i]=r,r}{let r={...e,...t(e),id:i,children:void 0};return n[i]=r,e.children&&(r.children=v(e.children,t,o,n)),r}}))}function w(e,t,r="/"){return b(e,t,r,!1)}function b(e,t,r,n){let a=M(("string"==typeof t?m(t):t).pathname||"/",r);if(null==a)return null;let o=S(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let i=null;for(let s=0;null==i&&s<o.length;++s){let e=A(a);i=k(o[s],e,n)}return i}function E(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 S(e,t=[],r=[],n=""){let a=(e,a,o)=>{let i={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};i.relativePath.startsWith("/")&&(i.relativePath.startsWith(n)||c(!1),i.relativePath=i.relativePath.slice(n.length));let s=j([n,i.relativePath]),l=r.concat(i);e.children&&e.children.length>0&&(!0===e.index&&c(!1),S(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:D(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let r of R(e.path))a(e,t,r);else a(e,t)})),t}function R(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(0===n.length)return a?[o,""]:[o];let i=R(n.join("/")),s=[];return s.push(...i.map((e=>""===e?o:[o,e].join("/")))),a&&s.push(...i),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const x=/^:[\w-]+$/,C=e=>"*"===e;function D(e,t){let r=e.split("/"),n=r.length;return r.some(C)&&(n+=-2),t&&(n+=2),r.filter((e=>!C(e))).reduce(((e,t)=>e+(x.test(t)?3:""===t?1:10)),n)}function k(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",i=[];for(let s=0;s<n.length;++s){let e=n[s],l=s===n.length-1,u="/"===o?t:t.slice(o.length)||"/",c=T({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},u),d=e.route;if(!c&&l&&r&&!n[n.length-1].route.index&&(c=T({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!c)return null;Object.assign(a,c.params),i.push({params:a,pathname:j([o,c.pathname]),pathnameBase:F(j([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=j([o,c.pathnameBase]))}return i}function L(e,t={}){let r=e;r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(r=r.replace(/\*$/,"/*"));const n=r.startsWith("/")?"/":"",a=e=>null==e?"":"string"==typeof e?e:String(e);return n+r.split(/\/+/).map(((e,r,n)=>{if(r===n.length-1&&"*"===e){return a(t["*"])}const o=e.match(/^:([\w-]+)(\??)$/);if(o){const[,e,r]=o;let n=t[e];return"?"!==r&&null==n&&c(!1),a(n)}return e.replace(/\?$/g,"")})).filter((e=>!!e)).join("/")}function T(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t=!1,r=!0){let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(n.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))");return[new RegExp(a,t?void 0:"i"),n]}(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(((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=s[n]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const a=s[n];return e[t]=r&&!a?void 0:(a||"").replace(/%2F/g,"/"),e}),{}),pathname:o,pathnameBase:i,pattern:e}}function A(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return e}}function M(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function P(e,t="/"){let{pathname:r,search:n="",hash:a=""}="string"==typeof e?m(e):e,o=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:o,search:N(n),hash:H(a)}}function O(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function _(e){let t=O(e);return t.map(((e,r)=>r===t.length-1?e.pathname:e.pathnameBase))}function U(e,t,r,n=!1){let a;"string"==typeof e?a=m(e):(a={...e},a.pathname&&a.pathname.includes("?")&&c(!1),a.pathname&&a.pathname.includes("#")&&c(!1),a.search&&a.search.includes("#")&&c(!1));let o,i=""===e||""===a.pathname,s=i?"/":a.pathname;if(null==s)o=r;else{let e=t.length-1;if(!n&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=P(a,o),u=s&&"/"!==s&&s.endsWith("/"),d=(i||"."===s)&&r.endsWith("/");return l.pathname.endsWith("/")||!u&&!d||(l.pathname+="/"),l}const j=e=>e.join("/").replace(/\/\/+/g,"/"),F=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),N=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",H=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class ${type="DataWithResponseInit";constructor(e,t){this.data=e,this.init=t||null}}function I(e,t){return new $(e,"number"==typeof t?{status:t}:t)}const B=(e,t=302)=>{let r=t;"number"==typeof r?r={status:r}:void 0===r.status&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,{...r,headers:n})},z=(e,t)=>{let r=B(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},q=(e,t)=>{let r=B(e,t);return r.headers.set("X-Remix-Replace","true"),r};class J{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function W(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const X=["POST","PUT","PATCH","DELETE"],V=new Set(X),Y=["GET",...X],K=new Set(Y),G=new Set([301,302,303,307,308]),Q=new Set([307,308]),Z={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ee={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},te={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},re=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ne=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),ae=Symbol("ResetLoaderData");function oe(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,r=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement;e.routes.length>0||c(!1);let n,a,o,s=e.mapRouteProperties||ne,l={},u=v(e.routes,s,void 0,l),d=e.basename||"/",f=e.dataStrategy||ge,m=e.patchRoutesOnNavigation,p={...e.future},g=null,S=new Set,R=null,x=null,C=null,D=null!=e.hydrationData,k=w(u,e.history.location,d),L=null;if(null==k&&!m){let t=Me(404,{pathname:e.history.location.pathname}),{matches:r,route:n}=Ae(u);k=r,L={[n.id]:t}}if(k&&!e.hydrationData){et(k,u,e.history.location.pathname).active&&(k=null)}if(k)if(k.some((e=>e.route.lazy)))a=!1;else if(k.some((e=>e.route.loader))){let t=e.hydrationData?e.hydrationData.loaderData:null,r=e.hydrationData?e.hydrationData.errors:null;if(r){let e=k.findIndex((e=>void 0!==r[e.route.id]));a=k.slice(0,e+1).every((e=>!he(e.route,t,r)))}else a=k.every((e=>!he(e.route,t,r)))}else a=!0;else{a=!1,k=[];let t=et(null,u,e.history.location.pathname);t.active&&t.matches&&(k=t.matches)}let T,A,P={historyAction:e.history.action,location:e.history.location,matches:k,initialized:a,navigation:Z,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||L,fetchers:new Map,blockers:new Map},O=i.Pop,_=!1,U=!1,j=new Map,F=null,N=!1,H=!1,$=new Set,I=new Map,B=0,z=-1,q=new Map,J=new Set,X=new Map,V=new Map,Y=new Set,K=new Map,G=null;function ae(e,t={}){P={...P,...e};let r=[],n=[];P.fetchers.forEach(((e,t)=>{"idle"===e.state&&(Y.has(t)?r.push(t):n.push(t))})),[...S].forEach((e=>e(P,{deletedFetchers:r,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync}))),r.forEach((e=>Oe(e))),n.forEach((e=>P.fetchers.delete(e)))}function oe(t,r,{flushSync:a}={}){let o,s=null!=P.actionData&&null!=P.navigation.formMethod&&Be(P.navigation.formMethod)&&"loading"===P.navigation.state&&!0!==t.state?._isRedirect;o=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:s?P.actionData:null;let l=r.loaderData?ke(P.loaderData,r.loaderData,r.matches||[],r.errors):P.loaderData,c=P.blockers;c.size>0&&(c=new Map(c),c.forEach(((e,t)=>c.set(t,te))));let d,h=!0===_||null!=P.navigation.formMethod&&Be(P.navigation.formMethod)&&!0!==t.state?._isRedirect;if(n&&(u=n,n=void 0),N||O===i.Pop||(O===i.Push?e.history.push(t,t.state):O===i.Replace&&e.history.replace(t,t.state)),O===i.Pop){let e=j.get(P.location.pathname);e&&e.has(t.pathname)?d={currentLocation:P.location,nextLocation:t}:j.has(t.pathname)&&(d={currentLocation:t,nextLocation:P.location})}else if(U){let e=j.get(P.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),j.set(P.location.pathname,e)),d={currentLocation:P.location,nextLocation:t}}ae({...r,actionData:o,loaderData:l,historyAction:O,location:t,initialized:!0,navigation:Z,revalidation:"idle",restoreScrollPosition:Ze(t,r.matches||P.matches),preventScrollReset:h,blockers:c},{viewTransitionOpts:d,flushSync:!0===a}),O=i.Pop,_=!1,U=!1,N=!1,H=!1,G?.resolve(),G=null}async function ie(t,r,a){T&&T.abort(),T=null,O=t,N=!0===(a&&a.startUninterruptedRevalidation),function(e,t){if(R&&C){let r=Qe(e,t);R[r]=C()}}(P.location,P.matches),_=!0===(a&&a.preventScrollReset),U=!0===(a&&a.enableViewTransition);let o=n||u,s=a&&a.overrideNavigation,l=w(o,r,d),c=!0===(a&&a.flushSync),h=et(l,o,r.pathname);if(h.active&&h.matches&&(l=h.matches),!l){let{error:e,notFoundMatches:t,route:n}=Ge(r.pathname);return void oe(r,{matches:t,loaderData:{},errors:{[n.id]:e}},{flushSync:c})}if(P.initialized&&!H&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(P.location,r)&&!(a&&a.submission&&Be(a.submission.formMethod)))return void oe(r,{matches:l},{flushSync:c});T=new AbortController;let f,m=Se(e.history,r,T.signal,a&&a.submission);if(a&&a.pendingError)f=[Te(l).route.id,{type:y.error,error:a.pendingError}];else if(a&&a.submission&&Be(a.submission.formMethod)){let t=await async function(e,t,r,n,a,o={}){let s;if(ye(),ae({navigation:Xe(t,r)},{flushSync:!0===o.flushSync}),a){let r=await tt(n,t.pathname,e.signal);if("aborted"===r.type)return{shortCircuited:!0};if("error"===r.type){let e=Te(r.partialMatches).route.id;return{matches:r.partialMatches,pendingActionResult:[e,{type:y.error,error:r.error}]}}if(!r.matches){let{notFoundMatches:e,error:r,route:n}=Ge(t.pathname);return{matches:e,pendingActionResult:[n.id,{type:y.error,error:r}]}}n=r.matches}let l=qe(n,t);if(l.route.action||l.route.lazy){if(s=(await fe("action",P,e,[l],n,null))[l.route.id],e.signal.aborted)return{shortCircuited:!0}}else s={type:y.error,error:Me(405,{method:e.method,pathname:t.pathname,routeId:l.route.id})};if(je(s)){let t;if(o&&null!=o.replace)t=o.replace;else{t=Ee(s.response.headers.get("Location"),new URL(e.url),d)===P.location.pathname+P.location.search}return await ce(e,s,!0,{submission:r,replace:t}),{shortCircuited:!0}}if(Ue(s)){let e=Te(n,l.route.id);return!0!==(o&&o.replace)&&(O=i.Push),{matches:n,pendingActionResult:[e.route.id,s]}}return{matches:n,pendingActionResult:[l.route.id,s]}}(m,r,a.submission,l,h.active,{replace:a.replace,flushSync:c});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,n]=t.pendingActionResult;if(Ue(n)&&W(n.error)&&404===n.error.status)return T=null,void oe(r,{matches:t.matches,loaderData:{},errors:{[e]:n.error}})}l=t.matches||l,f=t.pendingActionResult,s=We(r,a.submission),c=!1,h.active=!1,m=Se(e.history,m.url,m.signal)}let{shortCircuited:p,matches:g,loaderData:v,errors:b}=await async function(t,r,a,o,i,s,l,c,h,f,m){let p=i||We(r,s),y=s||l||Je(p),g=!N&&!h;if(o){if(g){let e=se(m);ae({navigation:p,...void 0!==e?{actionData:e}:{}},{flushSync:f})}let e=await tt(a,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=Te(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:n}=Ge(r.pathname);return{matches:t,loaderData:{},errors:{[n.id]:e}}}a=e.matches}let v=n||u,[w,b]=de(e.history,P,a,y,r,!0===h,H,$,Y,X,J,v,d,m);if(z=++B,0===w.length&&0===b.length){let e=He();return oe(r,{matches:a,loaderData:{},errors:m&&Ue(m[1])?{[m[0]]:m[1].error}:null,...Le(m),...e?{fetchers:new Map(P.fetchers)}:{}},{flushSync:f}),{shortCircuited:!0}}if(g){let e={};if(!o){e.navigation=p;let t=se(m);void 0!==t&&(e.actionData=t)}b.length>0&&(e.fetchers=function(e){return e.forEach((e=>{let t=P.fetchers.get(e.key),r=Ve(void 0,t?t.data:void 0);P.fetchers.set(e.key,r)})),new Map(P.fetchers)}(b)),ae(e,{flushSync:f})}b.forEach((e=>{Fe(e.key),e.controller&&I.set(e.key,e.controller)}));let E=()=>b.forEach((e=>Fe(e.key)));T&&T.signal.addEventListener("abort",E);let{loaderResults:S,fetcherResults:R}=await me(P,a,w,b,t);if(t.signal.aborted)return{shortCircuited:!0};T&&T.signal.removeEventListener("abort",E);b.forEach((e=>I.delete(e.key)));let x=Pe(S);if(x)return await ce(t,x.result,!0,{replace:c}),{shortCircuited:!0};if(x=Pe(R),x)return J.add(x.key),await ce(t,x.result,!0,{replace:c}),{shortCircuited:!0};let{loaderData:C,errors:D}=De(P,a,S,m,b,R);h&&P.errors&&(D={...P.errors,...D});let k=He(),L=$e(z),A=k||L||b.length>0;return{matches:a,loaderData:C,errors:D,...A?{fetchers:new Map(P.fetchers)}:{}}}(m,r,l,h.active,s,a&&a.submission,a&&a.fetcherSubmission,a&&a.replace,a&&!0===a.initialHydration,c,f);p||(T=null,oe(r,{matches:g||l,...Le(f),loaderData:v,errors:b}))}function se(e){return e&&!Ue(e[1])?{[e[0]]:e[1].data}:P.actionData?0===Object.keys(P.actionData).length?null:P.actionData:void 0}async function ce(n,a,o,{submission:s,fetcherSubmission:l,preventScrollReset:u,replace:f}={}){a.response.headers.has("X-Remix-Revalidate")&&(H=!0);let m=a.response.headers.get("Location");m||c(!1),m=Ee(m,new URL(n.url),d);let p=h(P.location,m,{_isRedirect:!0});if(r){let r=!1;if(a.response.headers.has("X-Remix-Reload-Document"))r=!0;else if(re.test(m)){const n=e.history.createURL(m);r=n.origin!==t.location.origin||null==M(n.pathname,d)}if(r)return void(f?t.location.replace(m):t.location.assign(m))}T=null;let y=!0===f||a.response.headers.has("X-Remix-Replace")?i.Replace:i.Push,{formMethod:g,formAction:v,formEncType:w}=P.navigation;!s&&!l&&g&&v&&w&&(s=Je(P.navigation));let b=s||l;if(Q.has(a.response.status)&&b&&Be(b.formMethod))await ie(y,p,{submission:{...b,formAction:m},preventScrollReset:u||_,enableViewTransition:o?U:void 0});else{let e=We(p,s);await ie(y,p,{overrideNavigation:e,fetcherSubmission:l,preventScrollReset:u||_,enableViewTransition:o?U:void 0})}}async function fe(e,t,r,n,a,o){let i,u={};try{i=await ve(f,e,t,r,n,a,o,l,s)}catch(c){return n.forEach((e=>{u[e.route.id]={type:y.error,error:c}})),u}for(let[s,l]of Object.entries(i))if(_e(l)){let e=l.result;u[s]={type:y.redirect,response:be(e,r,s,a,d)}}else u[s]=await we(l);return u}async function me(t,r,n,a,o){let i=fe("loader",t,o,n,r,null),s=Promise.all(a.map((async r=>{if(r.matches&&r.match&&r.controller){let n=(await fe("loader",t,Se(e.history,r.path,r.controller.signal),[r.match],r.matches,r.key))[r.match.route.id];return{[r.key]:n}}return Promise.resolve({[r.key]:{type:y.error,error:Me(404,{pathname:r.path})}})})));return{loaderResults:await i,fetcherResults:(await s).reduce(((e,t)=>Object.assign(e,t)),{})}}function ye(){H=!0,X.forEach(((e,t)=>{I.has(t)&&$.add(t),Fe(t)}))}function Re(e,t,r={}){P.fetchers.set(e,t),ae({fetchers:new Map(P.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function xe(e,t,r,n={}){let a=Te(P.matches,t);Oe(e),ae({errors:{[a.route.id]:r},fetchers:new Map(P.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function Ce(e){return V.set(e,(V.get(e)||0)+1),Y.has(e)&&Y.delete(e),P.fetchers.get(e)||ee}function Oe(e){let t=P.fetchers.get(e);!I.has(e)||t&&"loading"===t.state&&q.has(e)||Fe(e),X.delete(e),q.delete(e),J.delete(e),Y.delete(e),$.delete(e),P.fetchers.delete(e)}function Fe(e){let t=I.get(e);t&&(t.abort(),I.delete(e))}function Ne(e){for(let t of e){let e=Ye(Ce(t).data);P.fetchers.set(t,e)}}function He(){let e=[],t=!1;for(let r of J){let n=P.fetchers.get(r);n||c(!1),"loading"===n.state&&(J.delete(r),e.push(r),t=!0)}return Ne(e),t}function $e(e){let t=[];for(let[r,n]of q)if(n<e){let e=P.fetchers.get(r);e||c(!1),"loading"===e.state&&(Fe(r),q.delete(r),t.push(r))}return Ne(t),t.length>0}function Ie(e){P.blockers.delete(e),K.delete(e)}function ze(e,t){let r=P.blockers.get(e)||te;"unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state||c(!1);let n=new Map(P.blockers);n.set(e,t),ae({blockers:n})}function Ke({currentLocation:e,nextLocation:t,historyAction:r}){if(0===K.size)return;K.size;let n=Array.from(K.entries()),[a,o]=n[n.length-1],i=P.blockers.get(a);return i&&"proceeding"===i.state?void 0:o({currentLocation:e,nextLocation:t,historyAction:r})?a:void 0}function Ge(e){let t=Me(404,{pathname:e}),r=n||u,{matches:a,route:o}=Ae(r);return{notFoundMatches:a,route:o,error:t}}function Qe(e,t){if(x){return x(e,t.map((e=>E(e,P.loaderData))))||e.key}return e.key}function Ze(e,t){if(R){let r=Qe(e,t),n=R[r];if("number"==typeof n)return n}return null}function et(e,t,r){if(m){if(!e){return{active:!0,matches:b(t,r,d,!0)||[]}}if(Object.keys(e[0].params).length>0){return{active:!0,matches:b(t,r,d,!0)}}}return{active:!1,matches:null}}async function tt(e,t,r){if(!m)return{type:"success",matches:e};let a=e;for(;;){let e=null==n,i=n||u,c=l;try{await m({path:t,matches:a,patch:(e,t)=>{r.aborted||pe(e,t,i,c,s)}})}catch(o){return{type:"error",error:o,partialMatches:a}}finally{e&&!r.aborted&&(u=[...u])}if(r.aborted)return{type:"aborted"};let h=w(i,t,d);if(h)return{type:"success",matches:h};let f=b(i,t,d,!0);if(!f||a.length===f.length&&a.every(((e,t)=>e.route.id===f[t].route.id)))return{type:"success",matches:null};a=f}}return o={get basename(){return d},get future(){return p},get state(){return P},get routes(){return u},get window(){return t},initialize:function(){if(g=e.history.listen((({action:t,location:r,delta:n})=>{if(A)return A(),void(A=void 0);let a=Ke({currentLocation:P.location,nextLocation:r,historyAction:t});if(a&&null!=n){let t=new Promise((e=>{A=e}));return e.history.go(-1*n),void ze(a,{state:"blocked",location:r,proceed(){ze(a,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),t.then((()=>e.history.go(n)))},reset(){let e=new Map(P.blockers);e.set(a,te),ae({blockers:e})}})}return ie(t,r)})),r){!function(e,t){try{let r=e.sessionStorage.getItem("remix-router-transitions");if(r){let e=JSON.parse(r);for(let[r,n]of Object.entries(e||{}))n&&Array.isArray(n)&&t.set(r,new Set(n||[]))}}catch(r){}}(t,j);let e=()=>function(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem("remix-router-transitions",JSON.stringify(n))}catch(r){}}}(t,j);t.addEventListener("pagehide",e),F=()=>t.removeEventListener("pagehide",e)}return P.initialized||ie(i.Pop,P.location,{initialHydration:!0}),o},subscribe:function(e){return S.add(e),()=>S.delete(e)},enableScrollRestoration:function(e,t,r){if(R=e,C=t,x=r||null,!D&&P.navigation===Z){D=!0;let e=Ze(P.location,P.matches);null!=e&&ae({restoreScrollPosition:e})}return()=>{R=null,C=null,x=null}},navigate:async function t(r,n){if("number"==typeof r)return void e.history.go(r);let a=le(P.location,P.matches,d,r,n?.fromRouteId,n?.relative),{path:o,submission:s,error:l}=ue(!1,a,n),u=P.location,c=h(P.location,o,n&&n.state);c={...c,...e.history.encodeLocation(c)};let f=n&&null!=n.replace?n.replace:void 0,m=i.Push;!0===f?m=i.Replace:!1===f||null!=s&&Be(s.formMethod)&&s.formAction===P.location.pathname+P.location.search&&(m=i.Replace);let p=n&&"preventScrollReset"in n?!0===n.preventScrollReset:void 0,y=!0===(n&&n.flushSync),g=Ke({currentLocation:u,nextLocation:c,historyAction:m});g?ze(g,{state:"blocked",location:c,proceed(){ze(g,{state:"proceeding",proceed:void 0,reset:void 0,location:c}),t(r,n)},reset(){let e=new Map(P.blockers);e.set(g,te),ae({blockers:e})}}):await ie(m,c,{submission:s,pendingError:l,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:y})},fetch:async function(t,r,a,o){Fe(t);let i=!0===(o&&o.flushSync),s=n||u,l=le(P.location,P.matches,d,a,r,o?.relative),h=w(s,l,d),f=et(h,s,l);if(f.active&&f.matches&&(h=f.matches),!h)return void xe(t,r,Me(404,{pathname:l}),{flushSync:i});let{path:m,submission:p,error:y}=ue(!0,l,o);if(y)return void xe(t,r,y,{flushSync:i});let g=qe(h,m),v=!0===(o&&o.preventScrollReset);p&&Be(p.formMethod)?await async function(t,r,a,o,i,s,l,h,f){function m(e){if(!e.route.action&&!e.route.lazy){let e=Me(405,{method:f.formMethod,pathname:a,routeId:r});return xe(t,r,e,{flushSync:l}),!0}return!1}if(ye(),X.delete(t),!s&&m(o))return;let p=P.fetchers.get(t);Re(t,function(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}}(f,p),{flushSync:l});let y=new AbortController,g=Se(e.history,a,y.signal,f);if(s){let e=await tt(i,a,g.signal);if("aborted"===e.type)return;if("error"===e.type)return void xe(t,r,e.error,{flushSync:l});if(!e.matches)return void xe(t,r,Me(404,{pathname:a}),{flushSync:l});if(m(o=qe(i=e.matches,a)))return}I.set(t,y);let v=B,b=(await fe("action",P,g,[o],i,t))[o.route.id];if(g.signal.aborted)return void(I.get(t)===y&&I.delete(t));if(Y.has(t)){if(je(b)||Ue(b))return void Re(t,Ye(void 0))}else{if(je(b))return I.delete(t),z>v?void Re(t,Ye(void 0)):(J.add(t),Re(t,Ve(f)),ce(g,b,!1,{fetcherSubmission:f,preventScrollReset:h}));if(Ue(b))return void xe(t,r,b.error)}let E=P.navigation.location||P.location,S=Se(e.history,E,y.signal),R=n||u,x="idle"!==P.navigation.state?w(R,P.navigation.location,d):P.matches;x||c(!1);let C=++B;q.set(t,C);let D=Ve(f,b.data);P.fetchers.set(t,D);let[k,L]=de(e.history,P,x,f,E,!1,H,$,Y,X,J,R,d,[o.route.id,b]);L.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,r=P.fetchers.get(t),n=Ve(void 0,r?r.data:void 0);P.fetchers.set(t,n),Fe(t),e.controller&&I.set(t,e.controller)})),ae({fetchers:new Map(P.fetchers)});let A=()=>L.forEach((e=>Fe(e.key)));y.signal.addEventListener("abort",A);let{loaderResults:M,fetcherResults:_}=await me(P,x,k,L,S);if(y.signal.aborted)return;y.signal.removeEventListener("abort",A),q.delete(t),I.delete(t),L.forEach((e=>I.delete(e.key)));let U=Pe(M);if(U)return ce(S,U.result,!1,{preventScrollReset:h});if(U=Pe(_),U)return J.add(U.key),ce(S,U.result,!1,{preventScrollReset:h});let{loaderData:j,errors:F}=De(P,x,M,void 0,L,_);if(P.fetchers.has(t)){let e=Ye(b.data);P.fetchers.set(t,e)}$e(C),"loading"===P.navigation.state&&C>z?(O||c(!1),T&&T.abort(),oe(P.navigation.location,{matches:x,loaderData:j,errors:F,fetchers:new Map(P.fetchers)})):(ae({errors:F,loaderData:ke(P.loaderData,j,x,F),fetchers:new Map(P.fetchers)}),H=!1)}(t,r,m,g,h,f.active,i,v,p):(X.set(t,{routeId:r,path:m}),await async function(t,r,n,a,o,i,s,l,u){let c=P.fetchers.get(t);Re(t,Ve(u,c?c.data:void 0),{flushSync:s});let d=new AbortController,h=Se(e.history,n,d.signal);if(i){let e=await tt(o,n,h.signal);if("aborted"===e.type)return;if("error"===e.type)return void xe(t,r,e.error,{flushSync:s});if(!e.matches)return void xe(t,r,Me(404,{pathname:n}),{flushSync:s});a=qe(o=e.matches,n)}I.set(t,d);let f=B,m=(await fe("loader",P,h,[a],o,t))[a.route.id];I.get(t)===d&&I.delete(t);if(h.signal.aborted)return;if(Y.has(t))return void Re(t,Ye(void 0));if(je(m))return z>f?void Re(t,Ye(void 0)):(J.add(t),void(await ce(h,m,!1,{preventScrollReset:l})));if(Ue(m))return void xe(t,r,m.error);Re(t,Ye(m.data))}(t,r,m,g,h,f.active,i,v,p))},revalidate:function(){G||(G=function(){let e,t,r=new Promise(((n,a)=>{e=async e=>{n(e);try{await r}catch(t){}},t=async e=>{a(e);try{await r}catch(t){}}}));return{promise:r,resolve:e,reject:t}}()),ye(),ae({revalidation:"loading"});let e=G.promise;return"submitting"===P.navigation.state?e:"idle"===P.navigation.state?(ie(P.historyAction,P.location,{startUninterruptedRevalidation:!0}),e):(ie(O||P.historyAction,P.navigation.location,{overrideNavigation:P.navigation,enableViewTransition:!0===U}),e)},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ce,deleteFetcher:function(e){let t=(V.get(e)||0)-1;t<=0?(V.delete(e),Y.add(e)):V.set(e,t),ae({fetchers:new Map(P.fetchers)})},dispose:function(){g&&g(),F&&F(),S.clear(),T&&T.abort(),P.fetchers.forEach(((e,t)=>Oe(t))),P.blockers.forEach(((e,t)=>Ie(t)))},getBlocker:function(e,t){let r=P.blockers.get(e)||te;return K.get(e)!==t&&K.set(e,t),r},deleteBlocker:Ie,patchRoutes:function(e,t){let r=null==n;pe(e,t,n||u,l,s),r&&(u=[...u],ae({}))},_internalFetchControllers:I,_internalSetRoutes:function(e){l={},n=v(e,s,void 0,l)}},o}function ie(e,t){e.length>0||c(!1);let r={},n=(t?t.basename:null)||"/",a=t?.mapRouteProperties||ne,o=v(e,a,void 0,r);async function i(e,t,r,n,a,o,i){e.signal||c(!1);try{if(Be(e.method)){let u=await async function(e,t,r,n,a,o,i){let u;if(r.route.action||r.route.lazy){u=(await l("action",e,[r],t,i,n,a))[r.route.id],e.signal.aborted&&se(e,i)}else{let t=Me(405,{method:e.method,pathname:new URL(e.url).pathname,routeId:r.route.id});if(i)throw t;u={type:y.error,error:t}}if(je(u))throw new Response(null,{status:u.response.status,headers:{Location:u.response.headers.get("Location")}});if(i){if(Ue(u))throw u.error;return{matches:[r],loaderData:{},actionData:{[r.route.id]:u.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{}}}let c=new Request(e.url,{headers:e.headers,redirect:e.redirect,signal:e.signal});if(Ue(u)){let e=o?r:Te(t,r.route.id);return{...await s(c,t,n,a,o,null,[e.route.id,u]),statusCode:W(u.error)?u.error.status:null!=u.statusCode?u.statusCode:500,actionData:null,actionHeaders:{...u.headers?{[r.route.id]:u.headers}:{}}}}return{...await s(c,t,n,a,o,null),actionData:{[r.route.id]:u.data},...u.statusCode?{statusCode:u.statusCode}:{},actionHeaders:u.headers?{[r.route.id]:u.headers}:{}}}(e,r,i||qe(r,t),n,a,o,null!=i);return u}let u=await s(e,r,n,a,o,i);return Ne(u)?u:{...u,actionData:null,actionHeaders:{}}}catch(u){if(function(e){return null!=e&&"object"==typeof e&&"type"in e&&"result"in e&&(e.type===y.data||e.type===y.error)}(u)&&Ne(u.result)){if(u.type===y.error)throw u.result;return u.result}if($e(u))return u;throw u}}async function s(e,t,r,n,a,o,i){let s=null!=o;if(s&&!o?.route.loader&&!o?.route.lazy)throw Me(400,{method:e.method,pathname:new URL(e.url).pathname,routeId:o?.route.id});let u=(o?[o]:i&&Ue(i[1])?ce(t,i[0]):t).filter((e=>e.route.loader||e.route.lazy));if(0===u.length)return{matches:t,loaderData:t.reduce(((e,t)=>Object.assign(e,{[t.route.id]:null})),{}),errors:i&&Ue(i[1])?{[i[0]]:i[1].error}:null,statusCode:200,loaderHeaders:{}};let c=await l("loader",e,u,t,s,r,n);e.signal.aborted&&se(e,s);let d=Ce(t,c,i,!0,a),h=new Set(u.map((e=>e.route.id)));return t.forEach((e=>{h.has(e.route.id)||(d.loaderData[e.route.id]=null)})),{...d,matches:t}}async function l(e,t,o,i,s,l,u){let c=await ve(u||ge,e,null,t,o,i,null,r,a,l),d={};return await Promise.all(i.map((async e=>{if(!(e.route.id in c))return;let r=c[e.route.id];if(_e(r)){throw be(r.result,t,e.route.id,i,n)}if(Ne(r.result)&&s)throw r;d[e.route.id]=await we(r)}))),d}return{dataRoutes:o,query:async function(e,{requestContext:t,skipLoaderErrorBubbling:r,dataStrategy:a}={}){let s=new URL(e.url),l=e.method,u=h("",f(s),null,"default"),c=w(o,u,n);if(!Ie(l)&&"HEAD"!==l){let e=Me(405,{method:l}),{matches:t,route:r}=Ae(o);return{basename:n,location:u,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{}}}if(!c){let e=Me(404,{pathname:u.pathname}),{matches:t,route:r}=Ae(o);return{basename:n,location:u,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{}}}let d=await i(e,u,c,t,a||null,!0===r,null);return Ne(d)?d:{location:u,basename:n,...d}},queryRoute:async function(e,{routeId:t,requestContext:r,dataStrategy:a}={}){let s=new URL(e.url),l=e.method,u=h("",f(s),null,"default"),c=w(o,u,n);if(!Ie(l)&&"HEAD"!==l&&"OPTIONS"!==l)throw Me(405,{method:l});if(!c)throw Me(404,{pathname:u.pathname});let d=t?c.find((e=>e.route.id===t)):qe(c,u);if(t&&!d)throw Me(403,{pathname:u.pathname,routeId:t});if(!d)throw Me(404,{pathname:u.pathname});let m=await i(e,u,c,r,a||null,!1,d);if(Ne(m))return m;let p=m.errors?Object.values(m.errors)[0]:void 0;if(void 0!==p)throw p;return m.actionData?Object.values(m.actionData)[0]:m.loaderData?Object.values(m.loaderData)[0]:void 0}}}function se(e,t){if(void 0!==e.signal.reason)throw e.signal.reason;throw new Error(`${t?"queryRoute":"query"}() call aborted without an \`AbortSignal.reason\`: ${e.method} ${e.url}`)}function le(e,t,r,n,a,o){let i,s;if(a){i=[];for(let e of t)if(i.push(e),e.route.id===a){s=e;break}}else i=t,s=t[t.length-1];let l=U(n||".",_(i),M(e.pathname,r)||e.pathname,"path"===o);if(null==n&&(l.search=e.search,l.hash=e.hash),(null==n||""===n||"."===n)&&s){let e=ze(l.search);if(s.route.index&&!e)l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&e){let e=new URLSearchParams(l.search),t=e.getAll("index");e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let r=e.toString();l.search=r?`?${r}`:""}}return"/"!==r&&(l.pathname="/"===l.pathname?r:j([r,l.pathname])),f(l)}function ue(e,t,r){if(!r||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(r))return{path:t};if(r.formMethod&&!Ie(r.formMethod))return{path:t,error:Me(405,{method:r.formMethod})};let n,a,o=()=>({path:t,error:Me(400,{type:"invalid-body"})}),i=(r.formMethod||"get").toUpperCase(),s=Oe(t);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!Be(i))return o();let e="string"==typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce(((e,[t,r])=>`${e}${t}=${r}\n`),""):String(r.body);return{path:t,submission:{formMethod:i,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===r.formEncType){if(!Be(i))return o();try{let e="string"==typeof r.body?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:i,formAction:s,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch(d){return o()}}}if("function"!=typeof FormData&&c(!1),r.formData)n=Re(r.formData),a=r.formData;else if(r.body instanceof FormData)n=Re(r.body),a=r.body;else if(r.body instanceof URLSearchParams)n=r.body,a=xe(n);else if(null==r.body)n=new URLSearchParams,a=new FormData;else try{n=new URLSearchParams(r.body),a=xe(n)}catch(d){return o()}let l={formMethod:i,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:a,json:void 0,text:void 0};if(Be(l.formMethod))return{path:t,submission:l};let u=m(t);return e&&u.search&&ze(u.search)&&n.append("index",""),u.search=`?${n}`,{path:f(u),submission:l}}function ce(e,t,r=!1){let n=e.findIndex((e=>e.route.id===t));return n>=0?e.slice(0,r?n+1:n):e}function de(e,t,r,n,a,o,i,s,l,u,c,d,h,f){let m=f?Ue(f[1])?f[1].error:f[1].data:void 0,p=e.createURL(t.location),y=e.createURL(a),g=r;o&&t.errors?g=ce(r,Object.keys(t.errors)[0],!0):f&&Ue(f[1])&&(g=ce(r,f[0]));let v=f?f[1].statusCode:void 0,b=v&&v>=400,E=g.filter(((e,r)=>{let{route:a}=e;if(a.lazy)return!0;if(null==a.loader)return!1;if(o)return he(a,t.loaderData,t.errors);if(function(e,t,r){let n=!t||r.route.id!==t.route.id,a=!e.hasOwnProperty(r.route.id);return n||a}(t.loaderData,t.matches[r],e))return!0;let s=t.matches[r],l=e;return me(e,{currentUrl:p,currentParams:s.params,nextUrl:y,nextParams:l.params,...n,actionResult:m,actionStatus:v,defaultShouldRevalidate:!b&&(i||p.pathname+p.search===y.pathname+y.search||p.search!==y.search||fe(s,l))})})),S=[];return u.forEach(((e,a)=>{if(o||!r.some((t=>t.route.id===e.routeId))||l.has(a))return;let u=w(d,e.path,h);if(!u)return void S.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let f=t.fetchers.get(a),g=qe(u,e.path),E=!1;c.has(a)?E=!1:s.has(a)?(s.delete(a),E=!0):E=f&&"idle"!==f.state&&void 0===f.data?i:me(g,{currentUrl:p,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:r[r.length-1].params,...n,actionResult:m,actionStatus:v,defaultShouldRevalidate:!b&&i}),E&&S.push({key:a,routeId:e.routeId,path:e.path,matches:u,match:g,controller:new AbortController})})),[E,S]}function he(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=null!=t&&void 0!==t[e.id],a=null!=r&&void 0!==r[e.id];return!(!n&&a)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!n&&!a)}function fe(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function me(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function pe(e,t,r,n,a){let o;if(e){let t=n[e];t||c(!1),t.children||(t.children=[]),o=t.children}else o=r;let i=v(t.filter((e=>!o.some((t=>ye(e,t))))),a,[e||"_","patch",String(o?.length||"0")],n);o.push(...i)}function ye(e,t){return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||e.children.every(((e,r)=>t.children?.some((t=>ye(e,t))))))}async function ge({matches:e}){let t=e.filter((e=>e.shouldLoad));return(await Promise.all(t.map((e=>e.resolve())))).reduce(((e,r,n)=>Object.assign(e,{[t[n].route.id]:r})),{})}async function ve(e,t,r,n,a,o,i,s,l,u){let d=o.map((e=>e.route.lazy?async function(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];a||c(!1);let o={};for(let i in n)void 0!==a[i]&&"hasErrorBoundary"!==i||g.has(i)||(o[i]=n[i]);Object.assign(a,o),Object.assign(a,{...t(a),lazy:void 0})}(e.route,l,s):void 0)),h=o.map(((e,r)=>{let o=d[r],i=a.some((t=>t.route.id===e.route.id));return{...e,shouldLoad:i,resolve:async r=>(r&&"GET"===n.method&&(e.route.lazy||e.route.loader)&&(i=!0),i?async function(e,t,r,n,a,o){let i,s,l=n=>{let i,l=new Promise(((e,t)=>i=t));s=()=>i(),t.signal.addEventListener("abort",s);let u=a=>"function"!=typeof n?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${e}" [routeId: ${r.route.id}]`)):n({request:t,params:r.params,context:o},...void 0!==a?[a]:[]),c=(async()=>{try{return{type:"data",result:await(a?a((e=>u(e))):u())}}catch(e){return{type:"error",result:e}}})();return Promise.race([c,l])};try{let a=r.route[e];if(n)if(a){let e,[t]=await Promise.all([l(a).catch((t=>{e=t})),n]);if(void 0!==e)throw e;i=t}else{if(await n,a=r.route[e],!a){if("action"===e){let e=new URL(t.url),n=e.pathname+e.search;throw Me(405,{method:t.method,pathname:n,routeId:r.route.id})}return{type:y.data,result:void 0}}i=await l(a)}else{if(!a){let e=new URL(t.url);throw Me(404,{pathname:e.pathname+e.search})}i=await l(a)}}catch(u){return{type:y.error,result:u}}finally{s&&t.signal.removeEventListener("abort",s)}return i}(t,n,e,o,r,u):Promise.resolve({type:y.data,result:void 0}))}})),f=await e({matches:h,request:n,params:o[0].params,fetcherKey:i,context:u});try{await Promise.all(d)}catch(m){}return f}async function we(e){let{result:t,type:r}=e;if(Ne(t)){let e;try{let r=t.headers.get("Content-Type");e=r&&/\bapplication\/json\b/.test(r)?null==t.body?null:await t.json():await t.text()}catch(n){return{type:y.error,error:n}}return r===y.error?{type:y.error,error:new J(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:y.data,data:e,statusCode:t.status,headers:t.headers}}if(r===y.error){if(Fe(t)){if(t.data instanceof Error)return{type:y.error,error:t.data,statusCode:t.init?.status};t=new J(t.init?.status||500,void 0,t.data)}return{type:y.error,error:t,statusCode:W(t)?t.status:void 0}}return Fe(t)?{type:y.data,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:y.data,data:t}}function be(e,t,r,n,a){let o=e.headers.get("Location");if(o||c(!1),!re.test(o)){let i=n.slice(0,n.findIndex((e=>e.route.id===r))+1);o=le(new URL(t.url),i,a,o),e.headers.set("Location",o)}return e}function Ee(e,t,r){if(re.test(e)){let n=e,a=n.startsWith("//")?new URL(t.protocol+n):new URL(n),o=null!=M(a.pathname,r);if(a.origin===t.origin&&o)return a.pathname+a.search+a.hash}return e}function Se(e,t,r,n){let a=e.createURL(Oe(t)).toString(),o={signal:r};if(n&&Be(n.formMethod)){let{formMethod:e,formEncType:t}=n;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(n.json)):"text/plain"===t?o.body=n.text:"application/x-www-form-urlencoded"===t&&n.formData?o.body=Re(n.formData):o.body=n.formData}return new Request(a,o)}function Re(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,"string"==typeof n?n:n.name);return t}function xe(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Ce(e,t,r,n=!1,a=!1){let o,i={},s=null,l=!1,u={},d=r&&Ue(r[1])?r[1].error:void 0;return e.forEach((r=>{if(!(r.route.id in t))return;let h=r.route.id,f=t[h];if(je(f)&&c(!1),Ue(f)){let t=f.error;if(void 0!==d&&(t=d,d=void 0),s=s||{},a)s[h]=t;else{let r=Te(e,h);null==s[r.route.id]&&(s[r.route.id]=t)}n||(i[h]=ae),l||(l=!0,o=W(f.error)?f.error.status:500),f.headers&&(u[h]=f.headers)}else i[h]=f.data,f.statusCode&&200!==f.statusCode&&!l&&(o=f.statusCode),f.headers&&(u[h]=f.headers)})),void 0!==d&&r&&(s={[r[0]]:d},i[r[0]]=void 0),{loaderData:i,errors:s,statusCode:o||200,loaderHeaders:u}}function De(e,t,r,n,a,o){let{loaderData:i,errors:s}=Ce(t,r,n);return a.forEach((t=>{let{key:r,match:n,controller:a}=t,i=o[r];if(i||c(!1),!a||!a.signal.aborted)if(Ue(i)){let t=Te(e.matches,n?.route.id);s&&s[t.route.id]||(s={...s,[t.route.id]:i.error}),e.fetchers.delete(r)}else if(je(i))c(!1);else{let t=Ye(i.data);e.fetchers.set(r,t)}})),{loaderData:i,errors:s}}function ke(e,t,r,n){let a=Object.entries(t).filter((([,e])=>e!==ae)).reduce(((e,[t,r])=>(e[t]=r,e)),{});for(let o of r){let r=o.route.id;if(!t.hasOwnProperty(r)&&e.hasOwnProperty(r)&&o.route.loader&&(a[r]=e[r]),n&&n.hasOwnProperty(r))break}return a}function Le(e){return e?Ue(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Te(e,t){return(t?e.slice(0,e.findIndex((e=>e.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function Ae(e){let t=1===e.length?e[0]:e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Me(e,{pathname:t,routeId:r,method:n,type:a,message:o}={}){let i="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(i="Bad Request",n&&t&&r?s=`You made a ${n} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:"invalid-body"===a&&(s="Unable to encode submission body")):403===e?(i="Forbidden",s=`Route "${r}" does not match URL "${t}"`):404===e?(i="Not Found",s=`No route matches URL "${t}"`):405===e&&(i="Method Not Allowed",n&&t&&r?s=`You made a ${n.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:n&&(s=`Invalid request method "${n.toUpperCase()}"`)),new J(e||500,i,new Error(s),!0)}function Pe(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[e,n]=t[r];if(je(n))return{key:e,result:n}}}function Oe(e){return f({..."string"==typeof e?m(e):e,hash:""})}function _e(e){return Ne(e.result)&&G.has(e.result.status)}function Ue(e){return e.type===y.error}function je(e){return(e&&e.type)===y.redirect}function Fe(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function Ne(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function He(e){return G.has(e)}function $e(e){return Ne(e)&&He(e.status)&&e.headers.has("Location")}function Ie(e){return K.has(e.toUpperCase())}function Be(e){return V.has(e.toUpperCase())}function ze(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function qe(e,t){let r="string"==typeof t?m(t).search:t.search;if(e[e.length-1].route.index&&ze(r||""))return e[e.length-1];let n=O(e);return n[n.length-1]}function Je(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(t&&r&&n)return null!=a?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a}:null!=o?{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0}:void 0!==i?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}:void 0}function We(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Xe(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 Ve(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Ye(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}const Ke=e.createContext(null);Ke.displayName="DataRouter";const Ge=e.createContext(null);Ge.displayName="DataRouterState";const Qe=e.createContext({isTransitioning:!1});Qe.displayName="ViewTransition";const Ze=e.createContext(new Map);Ze.displayName="Fetchers";const et=e.createContext(null);et.displayName="Await";const tt=e.createContext(null);tt.displayName="Navigation";const rt=e.createContext(null);rt.displayName="Location";const nt=e.createContext({outlet:null,matches:[],isDataRoute:!1});nt.displayName="Route";const at=e.createContext(null);function ot(t,{relative:r}={}){it()||c(!1);let{basename:n,navigator:a}=e.useContext(tt),{hash:o,pathname:i,search:s}=yt(t,{relative:r}),l=i;return"/"!==n&&(l="/"===i?n:j([n,i])),a.createHref({pathname:l,search:s,hash:o})}function it(){return null!=e.useContext(rt)}function st(){return it()||c(!1),e.useContext(rt).location}function lt(){return e.useContext(rt).navigationType}function ut(t){it()||c(!1);let{pathname:r}=st();return e.useMemo((()=>T(t,A(r))),[r,t])}function ct(t){e.useContext(tt).static||e.useLayoutEffect(t)}function dt(){let{isDataRoute:t}=e.useContext(nt);return t?function(){let{router:t}=Dt(xt.UseNavigateStable),r=Lt(Ct.UseNavigateStable),n=e.useRef(!1);return ct((()=>{n.current=!0})),e.useCallback((async(e,a={})=>{n.current&&("number"==typeof e?t.navigate(e):await t.navigate(e,{fromRouteId:r,...a}))}),[t,r])}():function(){it()||c(!1);let t=e.useContext(Ke),{basename:r,navigator:n}=e.useContext(tt),{matches:a}=e.useContext(nt),{pathname:o}=st(),i=JSON.stringify(_(a)),s=e.useRef(!1);return ct((()=>{s.current=!0})),e.useCallback(((e,a={})=>{if(!s.current)return;if("number"==typeof e)return void n.go(e);let l=U(e,JSON.parse(i),o,"path"===a.relative);null==t&&"/"!==r&&(l.pathname="/"===l.pathname?r:j([r,l.pathname])),(a.replace?n.replace:n.push)(l,a.state,a)}),[r,n,i,o,t])}()}at.displayName="RouteError";const ht=e.createContext(null);function ft(){return e.useContext(ht)}function mt(t){let r=e.useContext(nt).outlet;return r?e.createElement(ht.Provider,{value:t},r):r}function pt(){let{matches:t}=e.useContext(nt),r=t[t.length-1];return r?r.params:{}}function yt(t,{relative:r}={}){let{matches:n}=e.useContext(nt),{pathname:a}=st(),o=JSON.stringify(_(n));return e.useMemo((()=>U(t,JSON.parse(o),a,"path"===r)),[t,o,a,r])}function gt(e,t){return vt(e,t)}function vt(t,r,n,a){it()||c(!1);let{navigator:o}=e.useContext(tt),{matches:s}=e.useContext(nt),l=s[s.length-1],u=l?l.params:{},d=l?l.pathname:"/",h=l?l.pathnameBase:"/",f=l&&l.route;{let e=f&&f.path||"";It(d,!f||e.endsWith("*"))}let p,y=st();if(r){let e="string"==typeof r?m(r):r;"/"===h||e.pathname?.startsWith(h)||c(!1),p=e}else p=y;let g=p.pathname||"/",v=g;if("/"!==h){let e=h.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(e.length).join("/")}let b=w(t,{pathname:v}),E=Rt(b&&b.map((e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:j([h,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?h:j([h,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),s,n,a);return r&&E?e.createElement(rt.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:i.Pop}},E):E}function wt(){let t=Ut(),r=W(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,a="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:a},i={padding:"2px 4px",backgroundColor:a},s=null;return console.error("Error handled by React Router default ErrorBoundary:",t),s=e.createElement(e.Fragment,null,e.createElement("p",null,"💿 Hey developer 👋"),e.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",e.createElement("code",{style:i},"ErrorBoundary")," or"," ",e.createElement("code",{style:i},"errorElement")," prop on your route.")),e.createElement(e.Fragment,null,e.createElement("h2",null,"Unexpected Application Error!"),e.createElement("h3",{style:{fontStyle:"italic"}},r),n?e.createElement("pre",{style:o},n):null,s)}const bt=e.createElement(wt,null);class Et extends e.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?e.createElement(nt.Provider,{value:this.props.routeContext},e.createElement(at.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function St({routeContext:t,match:r,children:n}){let a=e.useContext(Ke);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),e.createElement(nt.Provider,{value:t},n)}function Rt(t,r=[],n=null,a=null){if(null==t){if(!n)return null;if(n.errors)t=n.matches;else{if(0!==r.length||n.initialized||!(n.matches.length>0))return null;t=n.matches}}let o=t,i=n?.errors;if(null!=i){let e=o.findIndex((e=>e.route.id&&void 0!==i?.[e.route.id]));e>=0||c(!1),o=o.slice(0,Math.min(o.length,e+1))}let s=!1,l=-1;if(n)for(let e=0;e<o.length;e++){let t=o[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:r}=n,a=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||void 0===r[t.route.id]);if(t.route.lazy||a){s=!0,o=l>=0?o.slice(0,l+1):[o[0]];break}}}return o.reduceRight(((t,a,u)=>{let c,d=!1,h=null,f=null;n&&(c=i&&a.route.id?i[a.route.id]:void 0,h=a.route.errorElement||bt,s&&(l<0&&0===u?(It("route-fallback",!1),d=!0,f=null):l===u&&(d=!0,f=a.route.hydrateFallbackElement||null)));let m=r.concat(o.slice(0,u+1)),p=()=>{let r;return r=c?h:d?f:a.route.Component?e.createElement(a.route.Component,null):a.route.element?a.route.element:t,e.createElement(St,{match:a,routeContext:{outlet:t,matches:m,isDataRoute:null!=n},children:r})};return n&&(a.route.ErrorBoundary||a.route.errorElement||0===u)?e.createElement(Et,{location:n.location,revalidation:n.revalidation,component:h,error:c,children:p(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):p()}),null)}var xt=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(xt||{}),Ct=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}(Ct||{});function Dt(t){let r=e.useContext(Ke);return r||c(!1),r}function kt(t){let r=e.useContext(Ge);return r||c(!1),r}function Lt(t){let r=function(t){let r=e.useContext(nt);return r||c(!1),r}(),n=r.matches[r.matches.length-1];return n.route.id||c(!1),n.route.id}function Tt(){return kt(Ct.UseNavigation).navigation}function At(){let t=Dt(xt.UseRevalidator),r=kt(Ct.UseRevalidator);return e.useMemo((()=>({async revalidate(){await t.router.revalidate()},state:r.revalidation})),[t.router,r.revalidation])}function Mt(){let{matches:t,loaderData:r}=kt(Ct.UseMatches);return e.useMemo((()=>t.map((e=>E(e,r)))),[t,r])}function Pt(){let e=kt(Ct.UseLoaderData),t=Lt(Ct.UseLoaderData);return e.loaderData[t]}function Ot(e){return kt(Ct.UseRouteLoaderData).loaderData[e]}function _t(){let e=kt(Ct.UseActionData),t=Lt(Ct.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function Ut(){let t=e.useContext(at),r=kt(Ct.UseRouteError),n=Lt(Ct.UseRouteError);return void 0!==t?t:r.errors?.[n]}function jt(){return e.useContext(et)?._data}function Ft(){return e.useContext(et)?._error}let Nt=0;function Ht(t){let{router:r,basename:n}=Dt(xt.UseBlocker),a=kt(Ct.UseBlocker),[o,i]=e.useState(""),s=e.useCallback((e=>{if("function"!=typeof t)return!!t;if("/"===n)return t(e);let{currentLocation:r,nextLocation:a,historyAction:o}=e;return t({currentLocation:{...r,pathname:M(r.pathname,n)||r.pathname},nextLocation:{...a,pathname:M(a.pathname,n)||a.pathname},historyAction:o})}),[n,t]);return e.useEffect((()=>{let e=String(++Nt);return i(e),()=>r.deleteBlocker(e)}),[r]),e.useEffect((()=>{""!==o&&r.getBlocker(o,s)}),[r,o,s]),o&&a.blockers.has(o)?a.blockers.get(o):te}const $t={};function It(e,t,r){t||$t[e]||($t[e]=!0)}const Bt={};function zt(e,t){e||Bt[t]||(Bt[t]=!0,console.warn(t))}function qt(t){let r={hasErrorBoundary:t.hasErrorBoundary||null!=t.ErrorBoundary||null!=t.errorElement};return t.Component&&(t.element,Object.assign(r,{element:e.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement,Object.assign(r,{hydrateFallbackElement:e.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement,Object.assign(r,{errorElement:e.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),r}function Jt(e,t){return oe({basename:t?.basename,future:t?.future,history:s({initialEntries:t?.initialEntries,initialIndex:t?.initialIndex}),hydrationData:t?.hydrationData,routes:e,mapRouteProperties:qt,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation}).initialize()}class Wt{status="pending";constructor(){this.promise=new Promise(((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}}))}}function Xt({router:t,flushSync:r}){let[n,a]=e.useState(t.state),[o,i]=e.useState(),[s,l]=e.useState({isTransitioning:!1}),[u,c]=e.useState(),[d,h]=e.useState(),[f,m]=e.useState(),p=e.useRef(new Map),y=e.useCallback(((n,{deletedFetchers:o,flushSync:s,viewTransitionOpts:f})=>{o.forEach((e=>p.current.delete(e))),n.fetchers.forEach(((e,t)=>{void 0!==e.data&&p.current.set(t,e.data)})),zt(!1===s||null!=r,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let y=null!=t.window&&null!=t.window.document&&"function"==typeof t.window.document.startViewTransition;if(zt(null==f||y,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),f&&y){if(r&&s){r((()=>{d&&(u&&u.resolve(),d.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:f.currentLocation,nextLocation:f.nextLocation})}));let e=t.window.document.startViewTransition((()=>{r((()=>a(n)))}));return e.finished.finally((()=>{r((()=>{c(void 0),h(void 0),i(void 0),l({isTransitioning:!1})}))})),void r((()=>h(e)))}d?(u&&u.resolve(),d.skipTransition(),m({state:n,currentLocation:f.currentLocation,nextLocation:f.nextLocation})):(i(n),l({isTransitioning:!0,flushSync:!1,currentLocation:f.currentLocation,nextLocation:f.nextLocation}))}else r&&s?r((()=>a(n))):e.startTransition((()=>a(n)))}),[t.window,r,d,u]);e.useLayoutEffect((()=>t.subscribe(y)),[t,y]),e.useEffect((()=>{s.isTransitioning&&!s.flushSync&&c(new Wt)}),[s]),e.useEffect((()=>{if(u&&o&&t.window){let r=o,n=u.promise,s=t.window.document.startViewTransition((async()=>{e.startTransition((()=>a(r))),await n}));s.finished.finally((()=>{c(void 0),h(void 0),i(void 0),l({isTransitioning:!1})})),h(s)}}),[o,u,t.window]),e.useEffect((()=>{u&&o&&n.location.key===o.location.key&&u.resolve()}),[u,d,n.location,o]),e.useEffect((()=>{!s.isTransitioning&&f&&(i(f.state),l({isTransitioning:!0,flushSync:!1,currentLocation:f.currentLocation,nextLocation:f.nextLocation}),m(void 0))}),[s.isTransitioning,f]);let g=e.useMemo((()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:e=>t.navigate(e),push:(e,r,n)=>t.navigate(e,{state:r,preventScrollReset:n?.preventScrollReset}),replace:(e,r,n)=>t.navigate(e,{replace:!0,state:r,preventScrollReset:n?.preventScrollReset})})),[t]),v=t.basename||"/",w=e.useMemo((()=>({router:t,navigator:g,static:!1,basename:v})),[t,g,v]);return e.createElement(e.Fragment,null,e.createElement(Ke.Provider,{value:w},e.createElement(Ge.Provider,{value:n},e.createElement(Ze.Provider,{value:p.current},e.createElement(Qe.Provider,{value:s},e.createElement(er,{basename:v,location:n.location,navigationType:n.historyAction,navigator:g},e.createElement(Vt,{routes:t.routes,future:t.future,state:n})))))),null)}const Vt=e.memo(Yt);function Yt({routes:e,future:t,state:r}){return vt(e,void 0,r,t)}function Kt({basename:t,children:r,initialEntries:n,initialIndex:a}){let o=e.useRef();null==o.current&&(o.current=s({initialEntries:n,initialIndex:a,v5Compat:!0}));let i=o.current,[l,u]=e.useState({action:i.action,location:i.location}),c=e.useCallback((t=>{e.startTransition((()=>u(t)))}),[u]);return e.useLayoutEffect((()=>i.listen(c)),[i,c]),e.createElement(er,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:i})}function Gt({to:t,replace:r,state:n,relative:a}){it()||c(!1),e.useContext(tt);let{matches:o}=e.useContext(nt),{pathname:i}=st(),s=dt(),l=U(t,_(o),i,"path"===a),u=JSON.stringify(l);return e.useEffect((()=>{s(JSON.parse(u),{replace:r,state:n,relative:a})}),[s,u,a,r,n]),null}function Qt(e){return mt(e.context)}function Zt(e){c(!1)}function er({basename:t="/",children:r=null,location:n,navigationType:a=i.Pop,navigator:o,static:s=!1}){it()&&c(!1);let l=t.replace(/^\/*/,"/"),u=e.useMemo((()=>({basename:l,navigator:o,static:s,future:{}})),[l,o,s]);"string"==typeof n&&(n=m(n));let{pathname:d="/",search:h="",hash:f="",state:p=null,key:y="default"}=n,g=e.useMemo((()=>{let e=M(d,l);return null==e?null:{location:{pathname:e,search:h,hash:f,state:p,key:y},navigationType:a}}),[l,d,h,f,p,y,a]);return null==g?null:e.createElement(tt.Provider,{value:u},e.createElement(rt.Provider,{children:r,value:g}))}function tr({children:e,location:t}){return gt(ir(e),t)}function rr({children:t,errorElement:r,resolve:n}){return e.createElement(ar,{resolve:n,errorElement:r},e.createElement(or,null,t))}var nr=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(nr||{});class ar extends e.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("<Await> caught the following error during render",e,t)}render(){let{children:t,errorElement:r,resolve:n}=this.props,a=null,o=nr.pending;if(n instanceof Promise)if(this.state.error){o=nr.error;let e=this.state.error;a=Promise.reject().catch((()=>{})),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_error",{get:()=>e})}else n._tracked?(a=n,o="_error"in a?nr.error:"_data"in a?nr.success:nr.pending):(o=nr.pending,Object.defineProperty(n,"_tracked",{get:()=>!0}),a=n.then((e=>Object.defineProperty(n,"_data",{get:()=>e})),(e=>Object.defineProperty(n,"_error",{get:()=>e}))));else o=nr.success,a=Promise.resolve(),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_data",{get:()=>n});if(o===nr.error&&!r)throw a._error;if(o===nr.error)return e.createElement(et.Provider,{value:a,children:r});if(o===nr.success)return e.createElement(et.Provider,{value:a,children:t});throw a}}function or({children:t}){let r=jt(),n="function"==typeof t?t(r):t;return e.createElement(e.Fragment,null,n)}function ir(t,r=[]){let n=[];return e.Children.forEach(t,((t,a)=>{if(!e.isValidElement(t))return;let o=[...r,a];if(t.type===e.Fragment)return void n.push.apply(n,ir(t.props.children,o));t.type!==Zt&&c(!1),t.props.index&&t.props.children&&c(!1);let i={id:t.props.id||o.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,hydrateFallbackElement:t.props.hydrateFallbackElement,HydrateFallback:t.props.HydrateFallback,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:!0===t.props.hasErrorBoundary||null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(i.children=ir(t.props.children,o)),n.push(i)})),n}function sr(e){return Rt(e)}const lr="application/x-www-form-urlencoded";function ur(e){return null!=e&&"string"==typeof e.tagName}function cr(e=""){return new URLSearchParams("string"==typeof e||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((e=>[r,e])):[[r,n]])}),[]))}let dr=null;const hr=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function fr(e){return null==e||hr.has(e)?e:null}function mr(e,t){let r,n,a,o,i;if(ur(s=e)&&"form"===s.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?M(i,t):null,r=e.getAttribute("method")||"get",a=fr(e.getAttribute("enctype"))||lr,o=new FormData(e)}else if(function(e){return ur(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return ur(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||i.getAttribute("action");if(n=s?M(s,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||"get",a=fr(e.getAttribute("formenctype"))||fr(i.getAttribute("enctype"))||lr,o=new FormData(i,e),!function(){if(null===dr)try{new FormData(document.createElement("form"),0),dr=!1}catch(e){dr=!0}return dr}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}else t&&o.append(t,n)}}else{if(ur(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r="get",n=null,a=lr,i=e}var s;return o&&"text/plain"===a&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}function pr(e,t){if(!1===e||null==e)throw new Error(t)}async function yr(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){if(console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode&&void 0!==import.meta.hot)throw r;return window.location.reload(),new Promise((()=>{}))}}function gr(e,t,r){let n=e.map((e=>{let n=t[e.route.id],a=r.routes[e.route.id];return[a&&a.css?a.css.map((e=>({rel:"stylesheet",href:e}))):[],n?.links?.()||[]]})).flat(2),a=function(e,t){return Rr(e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let n=[r.module];return r.imports&&(n=n.concat(r.imports)),n})).flat(1))}(e,r);return xr(n,a)}async function vr(e,t){if(!e.css&&!t.links||!function(){if(void 0!==Cr)return Cr;let e=document.createElement("link");return Cr=e.relList.supports("preload"),e=null,Cr}())return;let r=[];if(e.css&&r.push(...e.css.map((e=>({rel:"stylesheet",href:e})))),t.links&&r.push(...t.links()),0===r.length)return;let n=[];for(let o of r)br(o)||"stylesheet"!==o.rel||n.push({...o,rel:"preload",as:"style"});let a=n.filter((e=>(!e.media||window.matchMedia(e.media).matches)&&!document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`)));await Promise.all(a.map(wr))}async function wr(e){return new Promise((t=>{let r=document.createElement("link");function n(){document.head.contains(r)&&document.head.removeChild(r)}Object.assign(r,e),r.onload=()=>{n(),t()},r.onerror=()=>{n(),t()},document.head.appendChild(r)}))}function br(e){return null!=e&&"string"==typeof e.page}function Er(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function Sr(e,t,r,n,a,o){let i=(e,t)=>!r[t]||e.route.id!==r[t].route.id,s=(e,t)=>r[t].pathname!==e.pathname||r[t].route.path?.endsWith("*")&&r[t].params["*"]!==e.params["*"];return"assets"===o?t.filter(((e,t)=>i(e,t)||s(e,t))):"data"===o?t.filter(((t,o)=>{let l=n.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(i(t,o)||s(t,o))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0})):[]}function Rr(e){return[...new Set(e)]}function xr(e,t){let r=new Set,n=new Set(t);return e.reduce(((e,a)=>{if(t&&!br(a)&&"script"===a.as&&a.href&&n.has(a.href))return e;let o=JSON.stringify(function(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}(a));return r.has(o)||(r.add(o),e.push({key:o,link:a})),e}),[])}let Cr;const Dr={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},kr=/[&><\u2028\u2029]/g;function Lr(e){return{__html:e}}async function Tr(e){let t={signal:e.signal};if("GET"!==e.method){t.method=e.method;let r=e.headers.get("Content-Type");r&&/\bapplication\/json\b/.test(r)?(t.headers={"Content-Type":r},t.body=JSON.stringify(await e.json())):r&&/\btext\/plain\b/.test(r)?(t.headers={"Content-Type":r},t.body=await e.text()):r&&/\bapplication\/x-www-form-urlencoded\b/.test(r)?t.body=new URLSearchParams(await e.text()):t.body=await e.formData()}return t}const Ar=Symbol("SingleFetchRedirect");function Mr({context:t,identifier:r,reader:n,textDecoder:a,nonce:o}){if(!t.renderMeta||!t.renderMeta.didRenderScripts)return null;t.renderMeta.streamCache||(t.renderMeta.streamCache={});let{streamCache:i}=t.renderMeta,s=i[r];if(s||(s=i[r]=n.read().then((e=>{i[r].result={done:e.done,value:a.decode(e.value,{stream:!0})}})).catch((e=>{i[r].error=e}))),s.error)throw s.error;if(void 0===s.result)throw s;let{done:l,value:u}=s.result,c=u?e.createElement("script",{nonce:o,dangerouslySetInnerHTML:{__html:`window.__reactRouterContext.streamController.enqueue(${d=JSON.stringify(u),d.replace(kr,(e=>Dr[e]))});`}}):null;var d;return l?e.createElement(e.Fragment,null,c,e.createElement("script",{nonce:o,dangerouslySetInnerHTML:{__html:"window.__reactRouterContext.streamController.close();"}})):e.createElement(e.Fragment,null,c,e.createElement(e.Suspense,null,e.createElement(Mr,{context:t,identifier:r+1,reader:n,textDecoder:a,nonce:o})))}function Pr(e,t,r){return async({request:n,matches:a,fetcherKey:o})=>"GET"!==n.method?async function(e,t){let r=t.find((e=>e.shouldLoad));r||pr(!1);let n,a=await r.resolve((async t=>{let a=await t((async()=>{let t=Ur(e.url),a=await Tr(e),{data:o,status:i}=await jr(t,a);return n=i,Hr(o,r.route.id)}));return a}));if(Ne(a.result)||W(a.result))return{[r.route.id]:a};return{[r.route.id]:{type:a.type,result:I(a.result,n)}}}(n,a):o?async function(e,t){let r=t.find((e=>e.shouldLoad));r||pr(!1);let n=await r.resolve((async t=>Or(t,_r(Ur(e.url)),await Tr(e),r.route.id)));return{[r.route.id]:n}}(n,a):async function(e,t,r,n,a){let o=new Set,i=!1,s=a.map((()=>$r())),l=Promise.all(s.map((e=>e.promise))),u=$r(),c=_r(Ur(n.url)),d=await Tr(n),h={},f=Promise.all(a.map((async(n,a)=>n.resolve((async l=>{s[a].resolve();let f=e.routes[n.route.id];if(!n.shouldLoad){if(!r.state.initialized)return;if(n.route.id in r.state.loaderData&&f&&f.hasLoader&&t[n.route.id]?.shouldRevalidate)return void(i=!0)}if(f&&f.hasClientLoader){f.hasLoader&&(i=!0);try{let e=await Or(l,c,d,n.route.id);h[n.route.id]={type:"data",result:e}}catch(m){h[n.route.id]={type:"error",result:m}}}else{f&&f.hasLoader&&o.add(n.route.id);try{let e=await l((async()=>Nr(await u.promise,n.route.id)));h[n.route.id]={type:"data",result:e}}catch(m){h[n.route.id]={type:"error",result:m}}}})))));if(await l,r.state.initialized&&0!==o.size||window.__reactRouterHdrActive)try{i&&o.size>0&&c.searchParams.set("_routes",a.filter((e=>o.has(e.route.id))).map((e=>e.route.id)).join(","));let e=await jr(c,d);u.resolve(e.data)}catch(m){u.reject(m)}else u.resolve({});return await f,h}(e,t,r(),n,a)}function Or(e,t,r,n){return e((async()=>{let e=new URL(t);e.searchParams.set("_routes",n);let{data:a}=await jr(e,r);return Nr(a,n)}))}function _r(e){let t=e.searchParams.getAll("index");e.searchParams.delete("index");let r=[];for(let n of t)n&&r.push(n);for(let n of r)e.searchParams.append("index",n);return e}function Ur(e){let t="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===t.pathname?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}async function jr(e,t){let r=await fetch(e,t);if(404===r.status&&!r.headers.has("X-Remix-Response"))throw new J(404,"Not Found",!0);r.body||pr(!1);try{let e=await Fr(r.body,window);return{status:r.status,data:e.value}}catch(n){throw new Error("Unable to decode turbo-stream response")}}function Fr(e,r){return t(e,{plugins:[(e,...t)=>{if("SanitizedError"===e){let[e,n,a]=t,o=Error;e&&e in r&&"function"==typeof r[e]&&(o=r[e]);let i=new o(n);return i.stack=a,{value:i}}if("ErrorResponse"===e){let[e,r,n]=t;return{value:new J(r,n,e)}}return"SingleFetchRedirect"===e?{value:{[Ar]:t[0]}}:"SingleFetchClassInstance"===e?{value:t[0]}:"SingleFetchFallback"===e?{value:void 0}:void 0}]})}function Nr(e,t){let r=e[Ar];return r?Hr(r,t):void 0!==e[t]?Hr(e[t],t):null}function Hr(e,t){if("error"in e)throw e.error;if("redirect"in e){let t={};return e.revalidate&&(t["X-Remix-Revalidate"]="yes"),e.reload&&(t["X-Remix-Reload-Document"]="yes"),e.replace&&(t["X-Remix-Replace"]="yes"),B(e.redirect,{status:e.status,headers:t})}if("data"in e)return e.data;throw new Error(`No response found for routeId "${t}"`)}function $r(){let e,t,r=new Promise(((n,a)=>{e=async e=>{n(e);try{await r}catch(t){}},t=async e=>{a(e);try{await r}catch(t){}}}));return{promise:r,resolve:e,reject:t}}class Ir extends e.Component{constructor(e){super(e),this.state={error:e.error||null,location:e.location}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error||null,location:e.location}:{error:e.error||t.error,location:t.location}}render(){return this.state.error?e.createElement(Br,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}}function Br({error:t,isOutsideRemixApp:r}){console.error(t);let n,a=e.createElement("script",{dangerouslySetInnerHTML:{__html:'\n console.log(\n "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://remix.run/guides/errors for more information."\n );\n '}});if(W(t))return e.createElement(zr,{title:"Unhandled Thrown Response!"},e.createElement("h1",{style:{fontSize:"24px"}},t.status," ",t.statusText),a);if(t instanceof Error)n=t;else{let e=null==t?"Unknown Error":"object"==typeof t&&"toString"in t?t.toString():JSON.stringify(t);n=new Error(e)}return e.createElement(zr,{title:"Application Error!",isOutsideRemixApp:r},e.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),e.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},n.stack),a)}function zr({title:t,renderScripts:r,isOutsideRemixApp:n,children:a}){let{routeModules:o}=dn();return o.root?.Layout&&!n?a:e.createElement("html",{lang:"en"},e.createElement("head",null,e.createElement("meta",{charSet:"utf-8"}),e.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),e.createElement("title",null,t)),e.createElement("body",null,e.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},a,r?e.createElement(bn,null):null)))}function qr(){return e.createElement(zr,{title:"Loading...",renderScripts:!0},e.createElement("script",{dangerouslySetInnerHTML:{__html:'\n console.log(\n "💿 Hey developer 👋. You can provide a way better UX than this " +\n "when your app is loading JS modules and/or running `clientLoader` " +\n "functions. Check out https://remix.run/route/hydrate-fallback " +\n "for more information."\n );\n '}}))}function Jr(e){let t={};return Object.values(e).forEach((e=>{if(e){let r=e.parentId||"";t[r]||(t[r]=[]),t[r].push(e)}})),t}function Wr(t,r,n){let a=Zr(r),o=!r.HydrateFallback||n&&"root"!==t.id?"root"===t.id?qr:void 0:r.HydrateFallback,i=r.ErrorBoundary?r.ErrorBoundary:"root"===t.id?()=>e.createElement(Br,{error:Ut()}):void 0;return"root"===t.id&&r.Layout?{...a?{element:e.createElement(r.Layout,null,e.createElement(a,null))}:{Component:a},...i?{errorElement:e.createElement(r.Layout,null,e.createElement(i,null))}:{ErrorBoundary:i},...o?{hydrateFallbackElement:e.createElement(r.Layout,null,e.createElement(o,null))}:{HydrateFallback:o}}:{Component:a,ErrorBoundary:i,HydrateFallback:o}}function Xr(e,t,r,n,a="",o=Jr(e),i=Promise.resolve({Component:()=>null})){return(o[a]||[]).map((a=>{let s=t[a.id];s||pr(!1);let l={...Wr(a,s,n),caseSensitive:a.caseSensitive,id:a.id,index:a.index,path:a.path,handle:s.handle,lazy:n?()=>i:void 0,loader:a.hasLoader||a.hasClientLoader?()=>null:void 0},u=Xr(e,t,r,n,a.id,o,i);return u.length>0&&(l.children=u),l}))}function Vr(e,t,r,n,a,o){return Gr(t,r,n,o,"",Jr(t),e)}function Yr(e,t,r){if(r){let r=`You cannot call ${"action"===e?"serverAction()":"serverLoader()"} in SPA Mode (routeId: "${t.id}")`;throw console.error(r),new J(400,"Bad Request",new Error(r),!0)}let n=`You are trying to call ${"action"===e?"serverAction()":"serverLoader()"} on a route that does not have a server ${e} (routeId: "${t.id}")`;if("loader"===e&&!t.hasLoader||"action"===e&&!t.hasAction)throw console.error(n),new J(400,"Bad Request",new Error(n),!0)}function Kr(e,t){let r="clientAction"===e?"a":"an",n=`Route "${t}" does not have ${r} ${e}, but you are trying to submit to it. To fix this, please add ${r} \`${e}\` function to the route`;throw console.error(n),new J(405,"Method Not Allowed",new Error(n),!0)}function Gr(e,t,r,n,a="",o=Jr(e),i){return(o[a]||[]).map((a=>{let s=t[a.id];function l(e){return"function"!=typeof e&&pr(!1),e()}function u(e){return a.hasLoader?l(e):Promise.resolve(null)}function c(e){if(!a.hasAction)throw Kr("action",a.id);return l(e)}async function d(e){let r=t[a.id],n=r?vr(a,r):Promise.resolve();try{return e()}finally{await n}}let h={id:a.id,index:a.index,path:a.path};if(s){Object.assign(h,{...h,...Wr(a,s,n),handle:s.handle,shouldRevalidate:Qr(s,a.id,i)});let e=r&&r.loaderData&&a.id in r.loaderData,t=e?r?.loaderData?.[a.id]:void 0,o=r&&r.errors&&a.id in r.errors,l=o?r?.errors?.[a.id]:void 0,f=null==i&&(!0===s.clientLoader?.hydrate||!a.hasLoader);h.loader=async({request:r,params:i},c)=>{try{return await d((async()=>(s||pr(!1),s.clientLoader?s.clientLoader({request:r,params:i,async serverLoader(){if(Yr("loader",a,n),f){if(e)return t;if(o)throw l}return u(c)}}):n?null:u(c))))}finally{f=!1}},h.loader.hydrate=en(a,s,n),h.action=({request:e,params:t},r)=>d((async()=>{if(s||pr(!1),!s.clientAction){if(n)throw Kr("clientAction",a.id);return c(r)}return s.clientAction({request:e,params:t,serverAction:async()=>(Yr("action",a,n),c(r))})}))}else a.hasClientLoader||(h.loader=({request:e},t)=>d((()=>n?Promise.resolve(null):u(t)))),a.hasClientAction||(h.action=({request:e},t)=>d((()=>{if(n)throw Kr("clientAction",a.id);return c(t)}))),h.lazy=async()=>{let e=await async function(e,t){let r=await yr(e,t);return await vr(e,r),{Component:Zr(r),ErrorBoundary:r.ErrorBoundary,clientAction:r.clientAction,clientLoader:r.clientLoader,handle:r.handle,links:r.links,meta:r.meta,shouldRevalidate:r.shouldRevalidate}}(a,t),r={...e};if(e.clientLoader){let t=e.clientLoader;r.loader=(e,r)=>t({...e,serverLoader:async()=>(Yr("loader",a,n),u(r))})}if(e.clientAction){let t=e.clientAction;r.action=(e,r)=>t({...e,serverAction:async()=>(Yr("action",a,n),c(r))})}return{...r.loader?{loader:r.loader}:{},...r.action?{action:r.action}:{},hasErrorBoundary:r.hasErrorBoundary,shouldRevalidate:Qr(r,a.id,i),handle:r.handle,Component:r.Component,ErrorBoundary:r.ErrorBoundary}};let f=Gr(e,t,r,n,a.id,o,i);return f.length>0&&(h.children=f),h}))}function Qr(e,t,r){if(r)return function(e,t,r){let n=!1;return a=>n?t?t(a):a.defaultShouldRevalidate:(n=!0,r.has(e))}(t,e.shouldRevalidate,r);if(e.shouldRevalidate){let t=e.shouldRevalidate;return e=>t({...e,defaultShouldRevalidate:!0})}return e.shouldRevalidate}function Zr(e){if(null==e.default)return;return"object"==typeof e.default&&0===Object.keys(e.default).length?void 0:e.default}function en(e,t,r){return r&&"root"!==e.id||null!=t.clientLoader&&(!0===t.clientLoader.hydrate||!0!==e.hasLoader)}const tn=new Set,rn=new Set;function nn(e){return!e}function an(e,t,r,n){if(nn(r))return async({path:a,patch:o})=>{rn.has(a)||await sn([a],e,t,r,n,o)}}function on(t,r,n,a){e.useEffect((()=>{if(!nn(a)||!0===navigator.connection?.saveData)return;function e(e){let t="FORM"===e.tagName?e.getAttribute("action"):e.getAttribute("href");if(!t)return;let r=new URL(t,window.location.origin);rn.has(r.pathname)||tn.add(r.pathname)}async function o(){let e=Array.from(tn.keys()).filter((e=>!rn.has(e)||(tn.delete(e),!1)));if(0!==e.length)try{await sn(e,r,n,a,t.basename,t.patchRoutes)}catch(o){console.error("Failed to fetch manifest patches",o)}}document.body.querySelectorAll("a[data-discover], form[data-discover]").forEach((t=>e(t))),o();let i=function(e,t){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout((()=>e(...n)),t)}}(o,100);let s=new MutationObserver((t=>{let r=new Set;t.forEach((e=>{[e.target,...e.addedNodes].forEach((e=>{(function(e){return e.nodeType===Node.ELEMENT_NODE})(e)&&(("A"===e.tagName&&e.getAttribute("data-discover")||"FORM"===e.tagName&&e.getAttribute("data-discover"))&&r.add(e),"A"!==e.tagName&&e.querySelectorAll("a[data-discover], form[data-discover]").forEach((e=>r.add(e))))}))})),r.forEach((t=>e(t))),i()}));return s.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-discover","href","action"]}),()=>s.disconnect()}),[a,r,n,t])}async function sn(e,t,r,n,a,o){let i=`${null!=a?a:"/"}/__manifest`.replace(/\/+/g,"/"),s=new URL(i,window.location.origin);if(e.sort().forEach((e=>s.searchParams.append("p",e))),s.searchParams.set("version",t.version),s.toString().length>7680)return void tn.clear();let l=await fetch(s);if(!l.ok)throw new Error(`${l.status} ${l.statusText}`);if(l.status>=400)throw new Error(await l.text());let u=await l.json(),c=new Set(Object.keys(t.routes)),d=Object.values(u).reduce(((e,t)=>(t&&!c.has(t.id)&&(e[t.id]=t),e)),{});Object.assign(t.routes,d),e.forEach((e=>function(e,t){if(t.size>=1e3){let e=t.values().next().value;t.delete(e)}t.add(e)}(e,rn)));let h=new Set;Object.values(d).forEach((e=>{!e||e.parentId&&d[e.parentId]||h.add(e.parentId)})),h.forEach((e=>o(e||null,Gr(d,r,null,n,e))))}function ln(){let t=e.useContext(Ke);return t||pr(!1),t}function un(){let t=e.useContext(Ge);return t||pr(!1),t}const cn=e.createContext(void 0);function dn(){let t=e.useContext(cn);return t||pr(!1),t}function hn(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function fn(e,t,r){if(r&&!wn)return[e[0]];if(t){let r=e.findIndex((e=>void 0!==t[e.route.id]));return e.slice(0,r+1)}return e}function mn(){let{isSpaMode:t,manifest:r,routeModules:n,criticalCss:a}=dn(),{errors:o,matches:i}=un(),s=fn(i,o,t),l=e.useMemo((()=>gr(s,n,r)),[s,n,r]);return e.createElement(e.Fragment,null,a?e.createElement("style",{dangerouslySetInnerHTML:{__html:a}}):null,l.map((({key:t,link:r})=>br(r)?e.createElement(pn,Object.assign({key:t},r)):e.createElement("link",Object.assign({key:t},r)))))}function pn({page:t,...r}){let{router:n}=ln(),a=e.useMemo((()=>w(n.routes,t,n.basename)),[n.routes,t,n.basename]);return a?e.createElement(gn,Object.assign({page:t,matches:a},r)):(console.warn(`Tried to prefetch ${t} but no routes matched.`),null)}function yn(t){let{manifest:r,routeModules:n}=dn(),[a,o]=e.useState([]);return e.useEffect((()=>{let e=!1;return async function(e,t,r){return xr((await Promise.all(e.map((async e=>{let n=t.routes[e.route.id];if(n){let e=await yr(n,r);return e.links?e.links():[]}return[]})))).flat(1).filter(Er).filter((e=>"stylesheet"===e.rel||"preload"===e.rel)).map((e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"})))}(t,r,n).then((t=>{e||o(t)})),()=>{e=!0}}),[t,r,n]),a}function gn({page:t,matches:r,...n}){let a=st(),{manifest:o,routeModules:i}=dn(),{loaderData:s,matches:l}=un(),u=e.useMemo((()=>Sr(t,r,l,o,a,"data")),[t,r,l,o,a]),c=e.useMemo((()=>Sr(t,r,l,o,a,"assets")),[t,r,l,o,a]),d=e.useMemo((()=>{if(t===a.pathname+a.search+a.hash)return[];let e=new Set,n=!1;if(r.forEach((t=>{let r=o.routes[t.route.id];r&&r.hasLoader&&(!u.some((e=>e.route.id===t.route.id))&&t.route.id in s&&i[t.route.id]?.shouldRevalidate||r.hasClientLoader?n=!0:e.add(t.route.id))})),0===e.size)return[];let l=Ur(t);return n&&e.size>0&&l.searchParams.set("_routes",r.filter((t=>e.has(t.route.id))).map((e=>e.route.id)).join(",")),[l.pathname+l.search]}),[s,a,o,u,r,t,i]),h=e.useMemo((()=>function(e,t){return Rr(e.map((e=>{let r=t.routes[e.route.id];if(!r)return[];let n=[r.module];return r.imports&&(n=n.concat(r.imports)),n})).flat(1))}(c,o)),[c,o]),f=yn(c);return e.createElement(e.Fragment,null,d.map((t=>e.createElement("link",Object.assign({key:t,rel:"prefetch",as:"fetch",href:t},n)))),h.map((t=>e.createElement("link",Object.assign({key:t,rel:"modulepreload",href:t},n)))),f.map((({key:t,link:r})=>e.createElement("link",Object.assign({key:t},r)))))}function vn(){let{isSpaMode:t,routeModules:r}=dn(),{errors:n,matches:a,loaderData:o}=un(),i=st(),s=fn(a,n,t),l=null;n&&(l=n[s[s.length-1].route.id]);let u=[],c=null,d=[];for(let e=0;e<s.length;e++){let t=s[e],n=t.route.id,a=o[n],h=t.params,f=r[n],m=[],p={id:n,data:a,meta:[],params:t.params,pathname:t.pathname,handle:t.route.handle,error:l};if(d[e]=p,f?.meta?m="function"==typeof f.meta?f.meta({data:a,params:h,location:i,matches:d,error:l}):Array.isArray(f.meta)?[...f.meta]:f.meta:c&&(m=[...c]),m=m||[],!Array.isArray(m))throw new Error("The route at "+t.route.path+" returns an invalid value. All route meta functions must return an array of meta objects.\n\nTo reference the meta function API, see https://remix.run/route/meta");p.meta=m,d[e]=p,u=[...m],c=u}return e.createElement(e.Fragment,null,u.flat().map((t=>{if(!t)return null;if("tagName"in t){let{tagName:r,...n}=t;if(!function(e){return"string"==typeof e&&/^(meta|link)$/.test(e)}(r))return console.warn(`A meta object uses an invalid tagName: ${r}. Expected either 'link' or 'meta'`),null;let a=r;return e.createElement(a,Object.assign({key:JSON.stringify(n)},n))}if("title"in t)return e.createElement("title",{key:"title"},String(t.title));if("charset"in t&&(t.charSet??=t.charset,delete t.charset),"charSet"in t&&null!=t.charSet)return"string"==typeof t.charSet?e.createElement("meta",{key:"charSet",charSet:t.charSet}):null;if("script:ld+json"in t)try{let r=JSON.stringify(t["script:ld+json"]);return e.createElement("script",{key:`script:ld+json:${r}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:r}})}catch(r){return null}return e.createElement("meta",Object.assign({key:JSON.stringify(t)},t))})))}cn.displayName="FrameworkContext";let wn=!1;function bn(t){let{manifest:r,serverHandoffString:n,isSpaMode:a,renderMeta:o}=dn(),{router:i,static:s,staticContext:l}=ln(),{matches:u}=un(),c=nn(a);o&&(o.didRenderScripts=!0);let d=fn(u,null,a);e.useEffect((()=>{wn=!0}),[]);let h=e.useMemo((()=>{let a=l?`window.__reactRouterContext = ${n};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",o=s?`${r.hmr?.runtime?`import ${JSON.stringify(r.hmr.runtime)};`:""}${c?"":`import ${JSON.stringify(r.url)}`};\n${d.map(((e,t)=>`import * as route${t} from ${JSON.stringify(r.routes[e.route.id].module)};`)).join("\n")}\n ${c?`window.__reactRouterManifest = ${JSON.stringify(function(e,t){let r=new Set(t.state.matches.map((e=>e.route.id))),n=t.state.location.pathname.split("/").filter(Boolean),a=["/"];for(n.pop();n.length>0;)a.push(`/${n.join("/")}`),n.pop();a.forEach((e=>{let n=w(t.routes,e,t.basename);n&&n.forEach((e=>r.add(e.route.id)))}));let o=[...r].reduce(((t,r)=>Object.assign(t,{[r]:e.routes[r]})),{});return{...e,routes:o}}(r,i),null,2)};`:""}\n window.__reactRouterRouteModules = {${d.map(((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`)).join(",")}};\n\nimport(${JSON.stringify(r.entry.module)});`:" ";return e.createElement(e.Fragment,null,e.createElement("script",Object.assign({},t,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:Lr(a),type:void 0})),e.createElement("script",Object.assign({},t,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:Lr(o),type:"module",async:!0})))}),[]),f=d.map((e=>{let t=r.routes[e.route.id];return t?(t.imports||[]).concat([t.module]):[]})).flat(1),m=wn?[]:r.entry.imports.concat(f);return wn?null:e.createElement(e.Fragment,null,c?null:e.createElement("link",{rel:"modulepreload",href:r.url,crossOrigin:t.crossOrigin}),e.createElement("link",{rel:"modulepreload",href:r.entry.module,crossOrigin:t.crossOrigin}),(p=m,[...new Set(p)]).map((r=>e.createElement("link",{key:r,rel:"modulepreload",href:r,crossOrigin:t.crossOrigin}))),h);var p}function En(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}const Sn="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Sn&&(window.__reactRouterVersion="7")}catch(ro){}function Rn(e,t){return oe({basename:t?.basename,future:t?.future,history:l({window:t?.window}),hydrationData:t?.hydrationData||Cn(),routes:e,mapRouteProperties:qt,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window}).initialize()}function xn(e,t){return oe({basename:t?.basename,future:t?.future,history:u({window:t?.window}),hydrationData:t?.hydrationData||Cn(),routes:e,mapRouteProperties:qt,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window}).initialize()}function Cn(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Dn(e.errors)}),e}function Dn(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&"RouteErrorResponse"===a.__type)r[n]=new J(a.status,a.statusText,a.data,!0===a.internal);else if(a&&"Error"===a.__type){if(a.__subType){let e=window[a.__subType];if("function"==typeof e)try{let t=new e(a.message);t.stack="",r[n]=t}catch(ro){}}if(null==r[n]){let e=new Error(a.message);e.stack="",r[n]=e}}else r[n]=a;return r}function kn({basename:t,children:r,window:n}){let a=e.useRef();null==a.current&&(a.current=l({window:n,v5Compat:!0}));let o=a.current,[i,s]=e.useState({action:o.action,location:o.location}),u=e.useCallback((t=>{e.startTransition((()=>s(t)))}),[s]);return e.useLayoutEffect((()=>o.listen(u)),[o,u]),e.createElement(er,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:o})}function Ln({basename:t,children:r,window:n}){let a=e.useRef();null==a.current&&(a.current=u({window:n,v5Compat:!0}));let o=a.current,[i,s]=e.useState({action:o.action,location:o.location}),l=e.useCallback((t=>{e.startTransition((()=>s(t)))}),[s]);return e.useLayoutEffect((()=>o.listen(l)),[o,l]),e.createElement(er,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:o})}function Tn({basename:t,children:r,history:n}){let[a,o]=e.useState({action:n.action,location:n.location}),i=e.useCallback((t=>{e.startTransition((()=>o(t)))}),[o]);return e.useLayoutEffect((()=>n.listen(i)),[n,i]),e.createElement(er,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:n})}Tn.displayName="unstable_HistoryRouter";const An=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mn=e.forwardRef((function({onClick:t,discover:r="render",prefetch:n="none",relative:a,reloadDocument:o,replace:i,state:s,target:l,to:u,preventScrollReset:c,viewTransition:d,...h},f){let m,{basename:p}=e.useContext(tt),y="string"==typeof u&&An.test(u),g=!1;if("string"==typeof u&&y&&(m=u,Sn))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),r=M(t.pathname,p);t.origin===e.origin&&null!=r?u=r+t.search+t.hash:g=!0}catch(ro){}let v=ot(u,{relative:a}),[w,b,E]=function(t,r){let n=e.useContext(cn),[a,o]=e.useState(!1),[i,s]=e.useState(!1),{onFocus:l,onBlur:u,onMouseEnter:c,onMouseLeave:d,onTouchStart:h}=r,f=e.useRef(null);e.useEffect((()=>{if("render"===t&&s(!0),"viewport"===t){let e=new IntersectionObserver((e=>{e.forEach((e=>{s(e.isIntersecting)}))}),{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}}),[t]),e.useEffect((()=>{if(a){let e=setTimeout((()=>{s(!0)}),100);return()=>{clearTimeout(e)}}}),[a]);let m=()=>{o(!0)},p=()=>{o(!1),s(!1)};return n?"intent"!==t?[i,f,{}]:[i,f,{onFocus:hn(l,m),onBlur:hn(u,p),onMouseEnter:hn(c,m),onMouseLeave:hn(d,p),onTouchStart:hn(h,m)}]:[!1,f,{}]}(n,h),S=Hn(u,{replace:i,state:s,target:l,preventScrollReset:c,relative:a,viewTransition:d});let R=e.createElement("a",Object.assign({},h,E,{href:m||v,onClick:g||o?t:function(e){t&&t(e),e.defaultPrevented||S(e)},ref:En(f,b),target:l,"data-discover":y||"render"!==r?void 0:"true"}));return w&&!y?e.createElement(e.Fragment,null,R,e.createElement(pn,{page:v})):R}));Mn.displayName="Link";const Pn=e.forwardRef((function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:a=!1,style:o,to:i,viewTransition:s,children:l,...u},c){let d=yt(i,{relative:u.relative}),h=st(),f=e.useContext(Ge),{navigator:m,basename:p}=e.useContext(tt),y=null!=f&&Qn(d)&&!0===s,g=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=h.pathname,w=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;r||(v=v.toLowerCase(),w=w?w.toLowerCase():null,g=g.toLowerCase()),w&&p&&(w=M(w,p)||w);const b="/"!==g&&g.endsWith("/")?g.length-1:g.length;let E,S=v===g||!a&&v.startsWith(g)&&"/"===v.charAt(b),R=null!=w&&(w===g||!a&&w.startsWith(g)&&"/"===w.charAt(g.length)),x={isActive:S,isPending:R,isTransitioning:y},C=S?t:void 0;E="function"==typeof n?n(x):[n,S?"active":null,R?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let D="function"==typeof o?o(x):o;return e.createElement(Mn,Object.assign({},u,{"aria-current":C,className:E,ref:c,style:D,to:i,viewTransition:s}),"function"==typeof l?l(x):l)}));Pn.displayName="NavLink";const On=e.forwardRef((({discover:t="render",fetcherKey:r,navigate:n,reloadDocument:a,replace:o,state:i,method:s="get",action:l,onSubmit:u,relative:c,preventScrollReset:d,viewTransition:h,...f},m)=>{let p=Bn(),y=zn(l,{relative:c}),g="get"===s.toLowerCase()?"get":"post",v="string"==typeof l&&An.test(l);return e.createElement("form",Object.assign({ref:m,method:g,action:y,onSubmit:a?u:e=>{if(u&&u(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,a=t?.getAttribute("formmethod")||s;p(t||e.currentTarget,{fetcherKey:r,method:a,navigate:n,replace:o,state:i,relative:c,preventScrollReset:d,viewTransition:h})}},f,{"data-discover":v||"render"!==t?void 0:"true"}))}));function _n({getKey:t,storageKey:r,...n}){let a=e.useContext(cn),{basename:o}=e.useContext(tt),i=st(),s=Mt();Yn({getKey:t,storageKey:r});let l=e.useMemo((()=>{if(!a||!t)return null;let e=Vn(i,s,o,t);return e!==i.key?e:null}),[]);if(!a||a.isSpaMode)return null;let u=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},"")}try{let r=JSON.parse(sessionStorage.getItem(e)||"{}")[t||window.history.state.key];"number"==typeof r&&window.scrollTo(0,r)}catch(r){console.error(r),sessionStorage.removeItem(e)}}).toString();return e.createElement("script",Object.assign({},n,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${u})(${JSON.stringify(r||Wn)}, ${JSON.stringify(l)})`}}))}On.displayName="Form",_n.displayName="ScrollRestoration";var Un=function(e){return e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState",e}(Un||{}),jn=function(e){return e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration",e}(jn||{});function Fn(t){let r=e.useContext(Ke);return r||c(!1),r}function Nn(t){let r=e.useContext(Ge);return r||c(!1),r}function Hn(t,{target:r,replace:n,state:a,preventScrollReset:o,relative:i,viewTransition:s}={}){let l=dt(),u=st(),c=yt(t,{relative:i});return e.useCallback((e=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(e,r)){e.preventDefault();let r=void 0!==n?n:f(u)===f(c);l(t,{replace:r,state:a,preventScrollReset:o,relative:i,viewTransition:s})}}),[u,l,c,n,a,r,t,o,i,s])}function $n(t){let r=e.useRef(cr(t)),n=e.useRef(!1),a=st(),o=e.useMemo((()=>function(e,t){let r=cr(e);return t&&t.forEach(((e,n)=>{r.has(n)||t.getAll(n).forEach((e=>{r.append(n,e)}))})),r}(a.search,n.current?null:r.current)),[a.search]),i=dt(),s=e.useCallback(((e,t)=>{const r=cr("function"==typeof e?e(o):e);n.current=!0,i("?"+r,t)}),[i,o]);return[o,s]}let In=0;function Bn(){let{router:t}=Fn(Un.UseSubmit),{basename:r}=e.useContext(tt),n=Lt(Ct.UseRouteId);return e.useCallback((async(e,a={})=>{let{action:o,method:i,encType:s,formData:l,body:u}=mr(e,r);if(!1===a.navigate){let e=a.fetcherKey||`__${String(++In)}__`;await t.fetch(e,n,a.action||o,{preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||i,formEncType:a.encType||s,flushSync:a.flushSync})}else await t.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||i,formEncType:a.encType||s,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})}),[t,r,n])}function zn(t,{relative:r}={}){let{basename:n}=e.useContext(tt),a=e.useContext(nt);a||c(!1);let[o]=a.matches.slice(-1),i={...yt(t||".",{relative:r})},s=st();if(null==t){i.search=s.search;let e=new URLSearchParams(i.search),t=e.getAll("index");if(t.some((e=>""===e))){e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let r=e.toString();i.search=r?`?${r}`:""}}return t&&"."!==t||!o.route.index||(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(i.pathname="/"===i.pathname?n:j([n,i.pathname])),f(i)}function qn({key:t}={}){let{router:r}=Fn(Un.UseFetcher),n=Nn(jn.UseFetcher),a=e.useContext(Ze),o=e.useContext(nt),i=o.matches[o.matches.length-1]?.route.id;a||c(!1),o||c(!1),null==i&&c(!1);let s=e.useId(),[l,u]=e.useState(t||s);t&&t!==l&&u(t),e.useEffect((()=>(r.getFetcher(l),()=>r.deleteFetcher(l))),[r,l]);let d=e.useCallback((async(e,t)=>{i||c(!1),await r.fetch(l,i,e,t)}),[l,i,r]),h=Bn(),f=e.useCallback((async(e,t)=>{await h(e,{...t,navigate:!1,fetcherKey:l})}),[l,h]),m=e.useMemo((()=>{let t=e.forwardRef(((t,r)=>e.createElement(On,Object.assign({},t,{navigate:!1,fetcherKey:l,ref:r}))));return t.displayName="fetcher.Form",t}),[l]),p=n.fetchers.get(l)||ee,y=a.get(l);return e.useMemo((()=>({Form:m,submit:f,load:d,...p,data:y})),[m,f,d,p,y])}function Jn(){let e=Nn(jn.UseFetchers);return Array.from(e.fetchers.entries()).map((([e,t])=>({...t,key:e})))}const Wn="react-router-scroll-positions";let Xn={};function Vn(e,t,r,n){let a=null;return n&&(a=n("/"!==r?{...e,pathname:M(e.pathname,r)||e.pathname}:e,t)),null==a&&(a=e.key),a}function Yn({getKey:t,storageKey:r}={}){let{router:n}=Fn(Un.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:o}=Nn(jn.UseScrollRestoration),{basename:i}=e.useContext(tt),s=st(),l=Mt(),u=Tt();e.useEffect((()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"})),[]),function(t,r){let{capture:n}=r||{};e.useEffect((()=>{let e=null!=n?{capture:n}:void 0;return window.addEventListener("pagehide",t,e),()=>{window.removeEventListener("pagehide",t,e)}}),[t,n])}(e.useCallback((()=>{if("idle"===u.state){let e=Vn(s,l,i,t);Xn[e]=window.scrollY}try{sessionStorage.setItem(r||Wn,JSON.stringify(Xn))}catch(e){}window.history.scrollRestoration="auto"}),[u.state,t,i,s,l,r])),"undefined"!=typeof document&&(e.useLayoutEffect((()=>{try{let e=sessionStorage.getItem(r||Wn);e&&(Xn=JSON.parse(e))}catch(ro){}}),[r]),e.useLayoutEffect((()=>{let e=n?.enableScrollRestoration(Xn,(()=>window.scrollY),t?(e,r)=>Vn(e,r,i,t):void 0);return()=>e&&e()}),[n,i,t]),e.useLayoutEffect((()=>{if(!1!==a)if("number"!=typeof a){if(s.hash){let e=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(e)return void e.scrollIntoView()}!0!==o&&window.scrollTo(0,0)}else window.scrollTo(0,a)}),[s,a,o]))}function Kn(t,r){let{capture:n}=r||{};e.useEffect((()=>{let e=null!=n?{capture:n}:void 0;return window.addEventListener("beforeunload",t,e),()=>{window.removeEventListener("beforeunload",t,e)}}),[t,n])}function Gn({when:t,message:r}){let n=Ht(t);e.useEffect((()=>{if("blocked"===n.state){window.confirm(r)?setTimeout(n.proceed,0):n.reset()}}),[n,r]),e.useEffect((()=>{"blocked"!==n.state||t||n.reset()}),[n,t])}function Qn(t,r={}){let n=e.useContext(Qe);null==n&&c(!1);let{basename:a}=Fn(Un.useViewTransitionState),o=yt(t,{relative:r.relative});if(!n.isTransitioning)return!1;let i=M(n.currentLocation.pathname,a)||n.currentLocation.pathname,s=M(n.nextLocation.pathname,a)||n.nextLocation.pathname;return null!=T(o.pathname,s)||null!=T(o.pathname,i)}function Zn({basename:t,children:r,location:n="/"}){"string"==typeof n&&(n=m(n));let a=i.Pop,o={pathname:n.pathname||"/",search:n.search||"",hash:n.hash||"",state:null!=n.state?n.state:null,key:n.key||"default"},s=na();return e.createElement(er,{basename:t,children:r,location:o,navigationType:a,navigator:s,static:!0})}function ea({context:t,router:r,hydrate:n=!0,nonce:a}){r&&t||c(!1);let o={router:r,navigator:na(),static:!0,staticContext:t,basename:t.basename||"/"},i=new Map,s="";if(!1!==n){let e={loaderData:t.loaderData,actionData:t.actionData,errors:ra(t.errors)};s=`window.__staticRouterHydrationData = JSON.parse(${JSON.stringify(JSON.stringify(e)).replace(ca,(e=>ua[e]))});`}let{state:l}=o.router;return e.createElement(e.Fragment,null,e.createElement(Ke.Provider,{value:o},e.createElement(Ge.Provider,{value:l},e.createElement(Ze.Provider,{value:i},e.createElement(Qe.Provider,{value:{isTransitioning:!1}},e.createElement(er,{basename:o.basename,location:l.location,navigationType:l.historyAction,navigator:o.navigator,static:o.static},e.createElement(ta,{routes:r.routes,future:r.future,state:l})))))),s?e.createElement("script",{suppressHydrationWarning:!0,nonce:a,dangerouslySetInnerHTML:{__html:s}}):null)}function ta({routes:e,future:t,state:r}){return vt(e,void 0,r,t)}function ra(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)W(a)?r[n]={...a,__type:"RouteErrorResponse"}:a instanceof Error?r[n]={message:a.message,__type:"Error",..."Error"!==a.name?{__subType:a.name}:{}}:r[n]=a;return r}function na(){return{createHref:ia,encodeLocation:sa,push(e){throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)})\` somewhere in your app.`)},replace(e){throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)}, { replace: true })\` somewhere in your app.`)},go(e){throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${e})\` somewhere in your app.`)},back(){throw new Error("You cannot use navigator.back() on the server because it is a stateless environment.")},forward(){throw new Error("You cannot use navigator.forward() on the server because it is a stateless environment.")}}}function aa(e,t){return ie(e,{...t,mapRouteProperties:qt})}function oa(e,t,r={}){let n={},a=v(e,qt,void 0,n),o=t.matches.map((e=>{let t=n[e.route.id]||e.route;return{...e,route:t}})),s=e=>`You cannot use router.${e}() on the server because it is a stateless environment`;return{get basename(){return t.basename},get future(){return{...r?.future}},get state(){return{historyAction:i.Pop,location:t.location,matches:o,loaderData:t.loaderData,actionData:t.actionData,errors:t.errors,initialized:!0,navigation:Z,restoreScrollPosition:null,preventScrollReset:!1,revalidation:"idle",fetchers:new Map,blockers:new Map}},get routes(){return a},get window(){},initialize(){throw s("initialize")},subscribe(){throw s("subscribe")},enableScrollRestoration(){throw s("enableScrollRestoration")},navigate(){throw s("navigate")},fetch(){throw s("fetch")},revalidate(){throw s("revalidate")},createHref:ia,encodeLocation:sa,getFetcher:()=>ee,deleteFetcher(){throw s("deleteFetcher")},dispose(){throw s("dispose")},getBlocker:()=>te,deleteBlocker(){throw s("deleteBlocker")},patchRoutes(){throw s("patchRoutes")},_internalFetchControllers:new Map,_internalSetRoutes(){throw s("_internalSetRoutes")}}}function ia(e){return"string"==typeof e?e:f(e)}function sa(e){let t="string"==typeof e?e:f(e);t=t.replace(/ $/,"%20");let r=la.test(t)?new URL(t):new URL(t,"http://localhost");return{pathname:r.pathname,search:r.search,hash:r.hash}}const la=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ua={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},ca=/[&><\u2028\u2029]/g;function da({context:t,url:r,abortDelay:n,nonce:a}){"string"==typeof r&&(r=new URL(r));let{manifest:o,routeModules:i,criticalCss:s,serverHandoffString:l}=t,u=Xr(o.routes,i,t.future,t.isSpaMode);t.staticHandlerContext.loaderData={...t.staticHandlerContext.loaderData};for(let e of t.staticHandlerContext.matches){let r=e.route.id,n=i[r],a=t.manifest.routes[r];n&&a&&en(a,n,t.isSpaMode)&&(n.HydrateFallback||!a.hasLoader)&&delete t.staticHandlerContext.loaderData[r]}let c=oa(u,t.staticHandlerContext);return e.createElement(e.Fragment,null,e.createElement(cn.Provider,{value:{manifest:o,routeModules:i,criticalCss:s,serverHandoffString:l,future:t.future,isSpaMode:t.isSpaMode,serializeError:t.serializeError,abortDelay:n,renderMeta:t.renderMeta}},e.createElement(Ir,{location:c.state.location},e.createElement(ea,{router:c,context:t.staticHandlerContext,hydrate:!1}))),t.serverHandoffStream?e.createElement(e.Suspense,null,e.createElement(Mr,{context:t,identifier:0,reader:t.serverHandoffStream.getReader(),textDecoder:new TextDecoder,nonce:a})):null)}function ha(t,r={}){return function({initialEntries:n,initialIndex:a,hydrationData:o,future:i}){let s=e.useRef(),l=e.useRef();if(null==s.current){l.current={future:{},manifest:{routes:{},entry:{imports:[],module:""},url:"",version:""},routeModules:{},isSpaMode:!1};let e=fa(v(t,(e=>e)),r,l.current.manifest,l.current.routeModules);s.current=Jt(e,{initialEntries:n,initialIndex:a,hydrationData:o})}return e.createElement(cn.Provider,{value:l.current},e.createElement(Xt,{router:s.current}))}}function fa(e,t,r,n,a){return e.map((e=>{if(!e.id)throw new Error("Expected a route.id in @remix-run/testing processRoutes() function");let{loader:o,action:i}=e,s={id:e.id,path:e.path,index:e.index,Component:e.Component,HydrateFallback:e.HydrateFallback,ErrorBoundary:e.ErrorBoundary,action:i?e=>i({...e,context:t}):void 0,loader:o?e=>o({...e,context:t}):void 0,handle:e.handle,shouldRevalidate:e.shouldRevalidate},l={id:e.id,path:e.path,index:e.index,parentId:a,hasAction:null!=e.action,hasLoader:null!=e.loader,hasClientAction:!1,hasClientLoader:!1,hasErrorBoundary:null!=e.ErrorBoundary,module:"build/stub-path-to-module.js"};return r.routes[s.id]=l,n[e.id]={default:e.Component||Qt,ErrorBoundary:e.ErrorBoundary||void 0,handle:e.handle,links:e.links,meta:e.meta,shouldRevalidate:e.shouldRevalidate},e.children&&(s.children=fa(e.children,t,r,n,s.id)),s}))}const ma=new TextEncoder,pa=async(e,t)=>{let r=e.lastIndexOf("."),n=e.slice(0,r),a=e.slice(r+1),o=ma.encode(n),i=await ya(t,["verify"]),s=function(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}(atob(a));return!!(await crypto.subtle.verify("HMAC",i,s,o))&&n},ya=async(e,t)=>crypto.subtle.importKey("raw",ma.encode(e),{name:"HMAC",hash:"SHA-256"},!1,t);const ga=(e,t={})=>{let{secrets:r=[],...o}={path:"/",sameSite:"lax",...t};return function(e,t){zt(!t,`The "${e}" cookie has an "expires" property set. This will cause the expires value to not be updated when the session is committed. Instead, you should set the expires value when serializing the cookie. You can use \`commitSession(session, { expires })\` if using a session storage object, or \`cookie.serialize("value", { expires })\` if you're using the cookie directly.`)}(e,o.expires),{get name(){return e},get isSigned(){return r.length>0},get expires(){return void 0!==o.maxAge?new Date(Date.now()+1e3*o.maxAge):o.expires},async parse(t,a){if(!t)return null;let i=n(t,{...o,...a});if(e in i){let t=i[e];if("string"==typeof t&&""!==t){let e=await async function(e,t){if(t.length>0){for(let r of t){let t=await pa(e,r);if(!1!==t)return wa(t)}return null}return wa(e)}(t,r);return e}return""}return null},serialize:async(t,n)=>a(e,""===t?"":await async function(e,t){let r=function(e){return btoa(function(e){let t,r,n=e.toString(),a="",o=0;for(;o<n.length;){if(t=n.charAt(o++),"%"===t)if("u"===n.charAt(o)){if(r=n.slice(o+1,o+5),/^[\da-f]{4}$/i.exec(r)){a+=String.fromCharCode(parseInt(r,16)),o+=5;continue}}else if(r=n.slice(o,o+2),/^[\da-f]{2}$/i.exec(r)){a+=String.fromCharCode(parseInt(r,16)),o+=2;continue}a+=t}return a}(encodeURIComponent(JSON.stringify(e))))}(e);t.length>0&&(r=await(async(e,t)=>{let r=ma.encode(e),n=await ya(t,["sign"]),a=await crypto.subtle.sign("HMAC",n,r);return e+"."+btoa(String.fromCharCode(...new Uint8Array(a))).replace(/=+$/,"")})(r,t[0]));return r}(t,r),{...o,...n})}},va=e=>null!=e&&"string"==typeof e.name&&"boolean"==typeof e.isSigned&&"function"==typeof e.parse&&"function"==typeof e.serialize;function wa(e){try{return JSON.parse(decodeURIComponent(function(e){let t,r,n=e.toString(),a="",o=0;for(;o<n.length;)t=n.charAt(o++),/[\w*+\-./@]/.exec(t)?a+=t:(r=t.charCodeAt(0),a+=r<256?"%"+ba(r,2):"%u"+ba(r,4).toUpperCase());return a}(atob(e))))}catch(t){return{}}}function ba(e,t){let r=e.toString(16);for(;r.length<t;)r="0"+r;return r}function Ea(e){return Object.keys(e).reduce(((t,r)=>{let n=e[r];return n&&(t[r]=n.module),t}),{})}let Sa=function(e){return e.Development="development",e.Production="production",e.Test="test",e}({});function Ra(e,t){if(e instanceof Error&&t!==Sa.Development){let e=new Error("Unexpected Server Error");return e.stack=void 0,e}return e}function xa(e,t){return Object.entries(e).reduce(((e,[r,n])=>Object.assign(e,{[r]:Ra(n,t)})),{})}function Ca(e,t){let r=Ra(e,t);return{message:r.message,stack:r.stack}}function Da(e,t){if(!e)return null;let r=Object.entries(e),n={};for(let[a,o]of r)if(W(o))n[a]={...o,__type:"RouteErrorResponse"};else if(o instanceof Error){let e=Ra(o,t);n[a]={message:e.message,stack:e.stack,__type:"Error",..."Error"!==e.name?{__subType:e.name}:{}}}else n[a]=o;return n}function ka(e,t,r){let n=w(e,t,r);return n?n.map((e=>({params:e.params,pathname:e.pathname,route:e.route}))):null}async function La(e,t){let r=await e({request:Aa(Ta(t.request)),params:t.params,context:t.context});if(Fe(r)&&r.init&&r.init.status&&He(r.init.status))throw new Response(null,r.init);return r}function Ta(e){let t=new URL(e.url),r=t.searchParams.getAll("index");t.searchParams.delete("index");let n=[];for(let o of r)o&&n.push(o);for(let o of n)t.searchParams.append("index",o);let a={method:e.method,body:e.body,headers:e.headers,signal:e.signal};return a.body&&(a.duplex="half"),new Request(t.href,a)}function Aa(e){let t=new URL(e.url);t.searchParams.delete("_routes");let r={method:e.method,body:e.body,headers:e.headers,signal:e.signal};return r.body&&(r.duplex="half"),new Request(t.href,r)}function Ma(e,t){if(!1===e||null==e)throw console.error("The following error is a bug in React Router; please open an issue! https://github.com/remix-run/react-router/issues/new/choose"),new Error(t)}function Pa(e){let t={};return Object.values(e).forEach((e=>{if(e){let r=e.parentId||"";t[r]||(t[r]=[]),t[r].push(e)}})),t}function Oa(e,t="",r=Pa(e)){return(r[t]||[]).map((t=>({...t,children:Oa(e,t.id,r)})))}function _a(e,t,r="",n=Pa(e)){return(n[r]||[]).map((r=>{let a={hasErrorBoundary:"root"===r.id||null!=r.module.ErrorBoundary,id:r.id,path:r.path,loader:r.module.loader?async e=>{if(e.request.headers.has("X-React-Router-Prerender-Data")){let t=e.request.headers.get("X-React-Router-Prerender-Data");t||Ma(!1);let n=(new TextEncoder).encode(t),a=new ReadableStream({start(e){e.enqueue(n),e.close()}}),o=(await Fr(a,global)).value;o&&r.id in o||Ma(!1);let i=o[r.id];return"data"in i||Ma(!1),i.data}return await La(r.module.loader,e)}:void 0,action:r.module.action?e=>La(r.module.action,e):void 0,handle:r.module.handle};return r.index?{index:!0,...a}:{caseSensitive:r.caseSensitive,children:_a(e,t,r.id,n),...a}}))}const Ua={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},ja=/[&><\u2028\u2029]/g;function Fa(e){return JSON.stringify(e).replace(ja,(e=>Ua[e]))}function Na(e){globalThis.__reactRouterDevServerHooks=e}function Ha(){return globalThis.__reactRouterDevServerHooks}function $a(e,t){let r,n=t.errors?t.matches.findIndex((e=>t.errors[e.route.id])):-1,a=n>=0?t.matches.slice(0,n+1):t.matches;if(n>=0){let{actionHeaders:e,actionData:a,loaderHeaders:o,loaderData:i}=t;t.matches.slice(n).some((t=>{let n=t.route.id;return!e[n]||a&&a.hasOwnProperty(n)?o[n]&&!i.hasOwnProperty(n)&&(r=o[n]):r=e[n],null!=r}))}return a.reduce(((n,o,i)=>{let{id:s}=o.route,l=e.routes[s];l||Ma(!1);let u=l.module,c=t.loaderHeaders[s]||new Headers,d=t.actionHeaders[s]||new Headers,h=null!=r&&i===a.length-1,f=h&&r!==c&&r!==d;if(null==u.headers){let e=new Headers(n);return f&&Ia(r,e),Ia(d,e),Ia(c,e),e}let m=new Headers(u.headers?"function"==typeof u.headers?u.headers({loaderHeaders:c,parentHeaders:n,actionHeaders:d,errorHeaders:h?r:void 0}):u.headers:void 0);return f&&Ia(r,m),Ia(d,m),Ia(c,m),Ia(n,m),m}),new Headers)}function Ia(e,t){let r=e.get("Set-Cookie");if(r){o(r).forEach((e=>{t.append("Set-Cookie",e)}))}}function Ba({isActionDataRequest:e,loadRouteIds:t}={}){return async({request:r,matches:n})=>{if(e&&"GET"===r.method)return{};let a=t?n.filter((e=>t.includes(e.route.id))):n;return(await Promise.all(a.map((e=>e.resolve())))).reduce(((e,t,r)=>Object.assign(e,{[a[r].route.id]:t})),{})}}function za(e,t,r){let n=t.get("Location");return r&&(n=M(n,r)||n),{redirect:n,status:e,revalidate:t.has("X-Remix-Revalidate")||t.has("Set-Cookie"),reload:t.has("X-Remix-Reload-Document"),replace:t.has("X-Remix-Replace")}}function qa(e,t,n,a){let o=new AbortController,i=setTimeout((()=>o.abort(new Error("Server Timeout"))),"number"==typeof n?n:4950);return t.addEventListener("abort",(()=>clearTimeout(i))),r(e,{signal:o.signal,plugins:[e=>{if(e instanceof Error){let{name:t,message:r,stack:n}=a===Sa.Production?Ra(e,a):e;return["SanitizedError",t,r,n]}if(e instanceof J){let{data:t,status:r,statusText:n}=e;return["ErrorResponse",t,r,n]}if(e&&"object"==typeof e&&Ar in e)return["SingleFetchRedirect",e[Ar]]}],postPlugins:[e=>{if(e&&"object"==typeof e)return["SingleFetchClassInstance",Object.fromEntries(Object.entries(e))]},()=>["SingleFetchFallback"]]})}function Ja(e,t){let r=Oa(e.routes),n=_a(e.routes,e.future),a=(o=t)===Sa.Development||o===Sa.Production||o===Sa.Test?t:Sa.Production;var o;let i=ie(n,{basename:e.basename}),s=e.entry.module.handleError||((e,{request:t})=>{a===Sa.Test||t.signal.aborted||console.error(W(e)&&e.error?e.error:e)});return{routes:r,dataRoutes:n,serverMode:a,staticHandler:i,errorHandler:s}}const Wa=(e,t)=>{let r,n,a,o,i;return async function(s,l={}){if(r="function"==typeof e?await e():e,"function"==typeof e){let e=Ja(r,t);n=e.routes,a=e.serverMode,o=e.staticHandler,i=e.errorHandler}else if(!(n&&a&&o&&i)){let e=Ja(r,t);n=e.routes,a=e.serverMode,o=e.staticHandler,i=e.errorHandler}let u=new URL(s.url),c={},d=e=>{t===Sa.Development&&Ha()?.processRequestError?.(e),i(e,{context:l,params:c,request:s})},h=`${r.basename??"/"}/__manifest`.replace(/\/+/g,"/");if(u.pathname===h)try{let e=await async function(e,t,r){let n={};if(r.searchParams.has("p")){for(let a of r.searchParams.getAll("p")){let r=ka(t,a,e.basename);if(r)for(let t of r){let r=t.route.id,a=e.assets.routes[r];a&&(n[r]=a)}}return Response.json(n,{headers:{"Cache-Control":"public, max-age=31536000, immutable"}})}return new Response("Invalid Request",{status:400})}(r,n,u);return e}catch(ro){return d(ro),new Response("Unknown Server Error",{status:500})}let f,m=ka(n,u.pathname,r.basename);if(m&&m.length>0&&Object.assign(c,m[0].params),u.pathname.endsWith(".data")){let e=new URL(s.url);e.pathname=e.pathname.replace(/\.data$/,"").replace(/^\/_root$/,"/");let t=ka(n,e.pathname,r.basename);if(f=await async function(e,t,r,n,a,o,i){let{result:s,headers:l,status:u}="GET"!==n.method?await async function(e,t,r,n,a,o,i){try{let s=new Request(a,{method:n.method,body:n.body,headers:n.headers,signal:n.signal,...n.body?{duplex:"half"}:void 0}),l=await r.query(s,{requestContext:o,skipLoaderErrorBubbling:!0,dataStrategy:Ba({isActionDataRequest:!0})});if(Ne(l))return{result:za(l.status,l.headers,e.basename),headers:l.headers,status:202};let u,c=l,d=$a(e,c);return He(c.statusCode)&&d.has("Location")?{result:za(c.statusCode,d,e.basename),headers:d,status:202}:(c.errors&&(Object.values(c.errors).forEach((e=>{W(e)&&!e.error||i(e)})),c.errors=xa(c.errors,t)),u=c.errors?{error:Object.values(c.errors)[0]}:{data:Object.values(c.actionData||{})[0]},{result:u,headers:d,status:c.statusCode})}catch(s){return i(s),{result:{error:s},headers:new Headers,status:500}}}(t,e,r,n,a,o,i):await async function(e,t,r,n,a,o,i){try{let s=new Request(a,{headers:n.headers,signal:n.signal}),l=new URL(n.url).searchParams.get("_routes")?.split(",")||void 0,u=await r.query(s,{requestContext:o,skipLoaderErrorBubbling:!0,dataStrategy:Ba({loadRouteIds:l})});if(Ne(u))return{result:{[Ar]:za(u.status,u.headers,e.basename)},headers:u.headers,status:202};let c=u,d=$a(e,c);if(He(c.statusCode)&&d.has("Location"))return{result:{[Ar]:za(c.statusCode,d,e.basename)},headers:d,status:202};c.errors&&(Object.values(c.errors).forEach((e=>{W(e)&&!e.error||i(e)})),c.errors=xa(c.errors,t));let h={};return(l?c.matches.filter((e=>e.route.loader&&l.includes(e.route.id))):c.matches).forEach((e=>{let{id:t}=e.route;c.errors&&c.errors.hasOwnProperty(t)?h[t]={error:c.errors[t]}:c.loaderData.hasOwnProperty(t)&&(h[t]={data:c.loaderData[t]})})),{result:h,headers:d,status:c.statusCode}}catch(s){return i(s),{result:{root:{error:s}},headers:new Headers,status:500}}}(t,e,r,n,a,o,i),c=new Headers(l);if(c.set("X-Remix-Response","yes"),304===u)return new Response(null,{status:304,headers:c});return c.set("Content-Type","text/x-script"),new Response(qa(s,n.signal,t.entry.module.streamTimeout,e),{status:u||200,headers:c})}(a,r,o,s,e,l,d),r.entry.module.handleDataRequest&&(f=await r.entry.module.handleDataRequest(f,{context:l,params:t?t[0].params:{},request:s}),$e(f))){let e=za(f.status,f.headers,r.basename);"GET"===s.method&&(e={[Ar]:e});let t=new Headers(f.headers);return t.set("Content-Type","text/x-script"),new Response(qa(e,s.signal,r.entry.module.streamTimeout,a),{status:202,headers:t})}}else if(m&&null==m[m.length-1].route.module.default&&null==m[m.length-1].route.module.ErrorBoundary)f=await async function(e,t,r,n,a,o,i){try{let e=await r.queryRoute(a,{routeId:n,requestContext:o});return Ne(e)||Ma(!1),e}catch(s){return Ne(s)?(s.headers.set("X-Remix-Catch","yes"),s):W(s)?(s&&i(s),function(e,t){return Response.json(Ca(e.error||new Error("Unexpected Server Error"),t),{status:e.status,statusText:e.statusText,headers:{"X-Remix-Error":"yes"}})}(s,e)):(i(s),Xa(s,e))}}(a,0,o,m.slice(-1)[0].route.id,s,l,d);else{let e=t===Sa.Development?await(Ha()?.getCriticalCss?.(r,u.pathname)):void 0;f=await async function(e,t,r,n,a,o,i){let s;try{s=await r.query(n,{requestContext:a})}catch(h){return o(h),new Response(null,{status:500})}if(Ne(s))return s;let l=$a(t,s);if(304===s.statusCode)return new Response(null,{status:304,headers:l});s.errors&&(Object.values(s.errors).forEach((e=>{W(e)&&!e.error||o(e)})),s.errors=xa(s.errors,e));let u={loaderData:s.loaderData,actionData:s.actionData,errors:Da(s.errors,e)},c={manifest:t.assets,routeModules:Ea(t.routes),staticHandlerContext:s,criticalCss:i,serverHandoffString:Fa({basename:t.basename,criticalCss:i,future:t.future,isSpaMode:t.isSpaMode}),serverHandoffStream:qa(u,n.signal,t.entry.module.streamTimeout,e),renderMeta:{},future:t.future,isSpaMode:t.isSpaMode,serializeError:t=>Ca(t,e)},d=t.entry.module.default;try{return await d(n,s.statusCode,l,c,a)}catch(h){o(h);let i=h;if(Ne(h))try{let e=await function(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?null==e.body?null:e.json():e.text()}(h);i=new J(h.status,h.statusText,e)}catch(ro){}s=function(e,t,r){return{...t,statusCode:W(r)?r.status:500,errors:{[t._deepestRenderedBoundaryId||e[0].id]:r}}}(r.dataRoutes,s,i),s.errors&&(s.errors=xa(s.errors,e));let u={loaderData:s.loaderData,actionData:s.actionData,errors:Da(s.errors,e)};c={...c,staticHandlerContext:s,serverHandoffString:Fa({basename:t.basename,future:t.future,isSpaMode:t.isSpaMode}),serverHandoffStream:qa(u,n.signal,t.entry.module.streamTimeout,e),renderMeta:{}};try{return await d(n,s.statusCode,l,c,a)}catch(h){return o(h),Xa(h,e)}}}(a,r,o,s,l,d,e)}return"HEAD"===s.method?new Response(null,{headers:f.headers,status:f.status,statusText:f.statusText}):f}};function Xa(e,t){let r="Unexpected Server Error";return t!==Sa.Production&&(r+=`\n\n${String(e)}`),new Response(r,{status:500,headers:{"Content-Type":"text/plain"}})}function Va(e){return`__flash_${e}__`}const Ya=(e={},t="")=>{let r=new Map(Object.entries(e));return{get id(){return t},get data(){return Object.fromEntries(r)},has:e=>r.has(e)||r.has(Va(e)),get(e){if(r.has(e))return r.get(e);let t=Va(e);if(r.has(t)){let e=r.get(t);return r.delete(t),e}},set(e,t){r.set(e,t)},flash(e,t){r.set(Va(e),t)},unset(e){r.delete(e)}}},Ka=e=>null!=e&&"string"==typeof e.id&&void 0!==e.data&&"function"==typeof e.has&&"function"==typeof e.get&&"function"==typeof e.set&&"function"==typeof e.flash&&"function"==typeof e.unset;function Ga({cookie:e,createData:t,readData:r,updateData:n,deleteData:a}){let o=va(e)?e:ga(e?.name||"__session",e);return Qa(o),{async getSession(e,t){let n=e&&await o.parse(e,t),a=n&&await r(n);return Ya(a||{},n||"")},async commitSession(e,r){let{id:a,data:i}=e,s=null!=r?.maxAge?new Date(Date.now()+1e3*r.maxAge):null!=r?.expires?r.expires:o.expires;return a?await n(a,i,s):a=await t(i,s),o.serialize(a,r)},destroySession:async(e,t)=>(await a(e.id),o.serialize("",{...t,maxAge:void 0,expires:new Date(0)}))}}function Qa(e){zt(e.isSigned,`The "${e.name}" cookie is not signed, but session cookies should be signed to prevent tampering on the client before they are sent back to the server. See https://remix.run/utils/cookies#signing-cookies for more information.`)}function Za({cookie:e}={}){let t=va(e)?e:ga(e?.name||"__session",e);return Qa(t),{getSession:async(e,r)=>Ya(e&&await t.parse(e,r)||{}),async commitSession(e,r){let n=await t.serialize(e.data,r);if(n.length>4096)throw new Error("Cookie length will exceed browser maximum. Length: "+n.length);return n},destroySession:async(e,r)=>t.serialize("",{...r,maxAge:void 0,expires:new Date(0)})}}function eo({cookie:e}={}){let t=new Map;return Ga({cookie:e,async createData(e,r){let n=Math.random().toString(36).substring(2,10);return t.set(n,{data:e,expires:r}),n},async readData(e){if(t.has(e)){let{data:r,expires:n}=t.get(e);if(!n||n>new Date)return r;n&&t.delete(e)}return null},async updateData(e,r,n){t.set(e,{data:r,expires:n})},async deleteData(e){t.delete(e)}})}function to(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&"RouteErrorResponse"===a.__type)r[n]=new J(a.status,a.statusText,a.data,!0===a.internal);else if(a&&"Error"===a.__type){if(a.__subType){let e=window[a.__subType];if("function"==typeof e)try{let t=new e(a.message);t.stack=a.stack,r[n]=t}catch(ro){}}if(null==r[n]){let e=new Error(a.message);e.stack=a.stack,r[n]=e}}else r[n]=a;return r}export{rr as Await,kn as BrowserRouter,On as Form,Ln as HashRouter,te as IDLE_BLOCKER,ee as IDLE_FETCHER,Z as IDLE_NAVIGATION,Mn as Link,mn as Links,Kt as MemoryRouter,vn as Meta,Pn as NavLink,Gt as Navigate,i as NavigationType,Qt as Outlet,pn as PrefetchPageLinks,Zt as Route,er as Router,Xt as RouterProvider,tr as Routes,bn as Scripts,_n as ScrollRestoration,da as ServerRouter,Zn as StaticRouter,ea as StaticRouterProvider,Ke as UNSAFE_DataRouterContext,Ge as UNSAFE_DataRouterStateContext,J as UNSAFE_ErrorResponseImpl,Ze as UNSAFE_FetchersContext,cn as UNSAFE_FrameworkContext,rt as UNSAFE_LocationContext,tt as UNSAFE_NavigationContext,Ir as UNSAFE_RemixErrorBoundary,nt as UNSAFE_RouteContext,Sa as UNSAFE_ServerMode,Ar as UNSAFE_SingleFetchRedirectSymbol,Qe as UNSAFE_ViewTransitionContext,l as UNSAFE_createBrowserHistory,Gr as UNSAFE_createClientRoutes,Vr as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,oe as UNSAFE_createRouter,Fr as UNSAFE_decodeViaTurboStream,to as UNSAFE_deserializeErrors,an as UNSAFE_getPatchRoutesOnNavigationFunction,Pr as UNSAFE_getSingleFetchDataStrategy,c as UNSAFE_invariant,qt as UNSAFE_mapRouteProperties,en as UNSAFE_shouldHydrateRouteLoader,on as UNSAFE_useFogOFWarDiscovery,Yn as UNSAFE_useScrollRestoration,Rn as createBrowserRouter,ga as createCookie,Za as createCookieSessionStorage,xn as createHashRouter,Jt as createMemoryRouter,eo as createMemorySessionStorage,f as createPath,Wa as createRequestHandler,ir as createRoutesFromChildren,ir as createRoutesFromElements,ha as createRoutesStub,cr as createSearchParams,Ya as createSession,Ga as createSessionStorage,aa as createStaticHandler,oa as createStaticRouter,I as data,L as generatePath,va as isCookie,W as isRouteErrorResponse,Ka as isSession,T as matchPath,w as matchRoutes,m as parsePath,B as redirect,z as redirectDocument,sr as renderMatches,q as replace,P as resolvePath,Tn as unstable_HistoryRouter,Na as unstable_setDevServerHooks,Gn as unstable_usePrompt,_t as useActionData,Ft as useAsyncError,jt as useAsyncValue,Kn as useBeforeUnload,Ht as useBlocker,qn as useFetcher,Jn as useFetchers,zn as useFormAction,ot as useHref,it as useInRouterContext,Hn as useLinkClickHandler,Pt as useLoaderData,st as useLocation,ut as useMatch,Mt as useMatches,dt as useNavigate,Tt as useNavigation,lt as useNavigationType,mt as useOutlet,ft as useOutletContext,pt as useParams,yt as useResolvedPath,At as useRevalidator,Ut as useRouteError,Ot as useRouteLoaderData,gt as useRoutes,$n as useSearchParams,Bn as useSubmit,Qn as useViewTransitionState};
|
|
12
12
|
//# sourceMappingURL=react-router.production.min.js.map
|