PageSourceSearch

https://ekspress.natre.no/assets/dist-BwzYSECs.js

js natre.no collected 2026-10-04 23:10:14 UTC 67,905 bytes, 2 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`23e2a6a7-0341-4845-af1c-df4378491f9d`,e._sentryDebugIdIdentifier=`sentry-dbid-23e2a6a7-0341-4845-af1c-df4378491f9d`)}catch{}})();import{n as e,o as t,r as n}from"./chunk-DsdRxzc0.js";import{t as r}from"./react-BMX6WqRr.js";function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function a(e){e===void 0&&(e={});let{initialEntries:t=[`/`],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((e,t)=>m(e,typeof e==`string`?null:e.state,t===0?`default`:void 0));let a=f(n??i.length-1),o=B.Pop,c=null;function f(e){return Math.min(Math.max(e,0),i.length-1)}function p(){return i[a]}function m(e,t,n){t===void 0&&(t=null);let r=l(i?p().pathname:`/`,e,t,n);return s(r.pathname.charAt(0)===`/`,`relative pathnames are not supported in memory history: `+JSON.stringify(e)),r}function h(e){return typeof e==`string`?e:u(e)}return{get index(){return a},get action(){return o},get location(){return p()},createHref:h,createURL(e){return new URL(h(e),`http://localhost`)},encodeLocation(e){let t=typeof e==`string`?d(e):e;return{pathname:t.pathname||``,search:t.search||``,hash:t.hash||``}},push(e,t){o=B.Push;let n=m(e,t);a+=1,i.splice(a,i.length,n),r&&c&&c({action:o,location:n,delta:1})},replace(e,t){o=B.Replace;let n=m(e,t);i[a]=n,r&&c&&c({action:o,location:n,delta:0})},go(e){o=B.Pop;let t=f(a+e),n=i[t];a=t,c&&c({action:o,location:n,delta:e})},listen(e){return c=e,()=>{c=null}}}}function o(e,t){if(e===!1||e==null)throw Error(t)}function s(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function c(){return Math.random().toString(36).substr(2,8)}function l(e,t,n,r){return n===void 0&&(n=null),i({pathname:typeof e==`string`?e:e.pathname,search:``,hash:``},typeof t==`string`?d(t):t,{state:n,key:t&&t.key||r||c()})}function u(e){let{pathname:t=`/`,search:n=``,hash:r=``}=e;return n&&n!==`?`&&(t+=n.charAt(0)===`?`?n:`?`+n),r&&r!==`#`&&(t+=r.charAt(0)===`#`?r:`#`+r),t}function d(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function f(e){return e.index===!0}function p(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((e,a)=>{let s=[...n,String(a)],c=typeof e.id==`string`?e.id:s.join(`-`);if(o(e.index!==!0||!e.children,`Cannot specify children on an index route`),o(!r[c],`Found a route id collision on i
1d "`+c+`".  Route id's must be globally unique within Data Router usages`),f(e)){let n=i({},e,t(e),{id:c});return r[c]=n,n}else{let n=i({},e,t(e),{id:c,children:void 0});return r[c]=n,e.children&&(n.children=p(e.children,t,s,r)),n}})}function m(e,t,n){return n===void 0&&(n=`/`),h(e,t,n,!1)}function h(e,t,n,r){let i=ee((typeof t==`string`?d(t):t).pathname||`/`,n);if(i==null)return null;let a=_(e);y(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=E(i);o=S(a[e],t,r)}return o}function g(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}function _(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r=``);let i=(e,i,a)=>{let s={relativePath:a===void 0?e.path||``:a,caseSensitive:e.caseSensitive===!0,childrenIndex:i,route:e};s.relativePath.startsWith(`/`)&&(o(s.relativePath.startsWith(r),`Absolute route path "`+s.relativePath+`" nested under path `+(`"`+r+`" is not valid. An absolute child route path `)+`must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(r.length));let c=W([r,s.relativePath]),l=n.concat(s);e.children&&e.children.length>0&&(o(e.index!==!0,`Index routes must not have child routes. Please remove `+(`all child routes from route path "`+c+`".`)),_(e.children,t,l,c)),!(e.path==null&&!e.index)&&t.push({path:c,score:b(c,e.index),routesMeta:l})};return e.forEach((e,t)=>{var n;if(e.path===``||!((n=e.path)!=null&&n.includes(`?`)))i(e,t);else for(let n of v(e.path))i(e,t,n)}),t}function v(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=v(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function y(e){e.sort((e,t)=>e.score===t.score?x(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}function b(e,t){let n=e.split(`/`),r=n.length;return n.some(U)&&(r+=nt),t&&(r+=H),n.filter(e=>!U(e)).reduce((e,t)=>e+(Qe.test(t)?$e:t===``?et:tt),r)}function x(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function S(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=w({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=w({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;
1Object.assign(i,u.params),o.push({params:i,pathname:W([a,u.pathname]),pathnameBase:at(W([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=W([a,u.pathnameBase]))}return o}function C(e,t){t===void 0&&(t={});let n=e;n.endsWith(`*`)&&n!==`*`&&!n.endsWith(`/*`)&&(s(!1,`Route path "`+n+`" will be treated as if it were `+(`"`+n.replace(/\*$/,`/*`)+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+(`please change the route path to "`+n.replace(/\*$/,`/*`)+`".`)),n=n.replace(/\*$/,`/*`));let r=n.startsWith(`/`)?`/`:``,i=e=>e==null?``:typeof e==`string`?e:String(e);return r+n.split(/\/+/).map((e,n,r)=>{if(n===r.length-1&&e===`*`)return i(t[`*`]);let a=e.match(/^:([\w-]+)(\??)$/);if(a){let[,e,n]=a,r=t[e];return o(n===`?`||r!=null,`Missing ":`+e+`" param`),i(r)}return e.replace(/\?$/g,``)}).filter(e=>!!e).join(`/`)}function w(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=T(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,t,n)=>{let{paramName:r,isOptional:i}=t;if(r===`*`){let e=s[n]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let c=s[n];return i&&!c?e[r]=void 0:e[r]=(c||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function T(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),s(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "`+e+`" will be treated as if it were `+(`"`+e.replace(/\*$/,`/*`)+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+(`please change the route path to "`+e.replace(/\*$/,`/*`)+`".`));let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:n!=null}),n?`/?([^\\/]+)?`:`/([^\\/]+)`));return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function E(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return s(!1,`The URL path "`+e+`" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent `+(`encoding (`+t+`).`)),e}}function ee(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function D(e,t){t===void 0&&(t=`/`);let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?d(e):e,a;if(n)if(it(n))a=n;else{if(n.includes(`//`)){let e=n;n=n.replace(/\/\/+/g,`/`),s(!1,`Pathnames cannot have embedded double slashes - normalizing `+(e+` -> `+n))}a=n.startsWith(`/`)?te(n.substring(1),`/`):te(n,t)}else a=t;return{pathname:a,search:ot(r),hash:st(i)}}function te(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function O(e,t,n,r){return`Cannot include a '`+e+`' character in a manually specified `+("`to."+t+"` field ["+JSON.stringify(r)+`].  Please separate it out to the `)+("`to."+n+"` field. Alternatively you may provide the full path as ")+`a string in <Link to="..."> and the router will parse it for you.`}function ne(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function k(e,t){let n=ne(e);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function A(e,t,n,r){r===void 0&&(r=!1);let a;typeof e==`string`?a=d(e):(a=i({},e),o(!a.pathname||!a.pathname.includes(`?`),O(`?`,`pathname`,`search`,a)),o(!a.pathname||!a.pathname.includes(`#`),O(`#`,`pathname`,`hash`,a)),o(!a.search||!a.search.includes(`#`),O(`#`,`search`,`hash`,a)));let s=e===``||a.pathname===``,c=s?`/`:a.pathname,l;if(c==null)l=n;else{let e=t.length-1;if(!r&&c.startsWith(`..`)){let t=c.split(`/`);for(;t[0]===`..`;)t.shift(),--e;a.pathname=t.join(`/`)}l=e>=0?t[e]:`/`}let u=D(a,l),f=c&&c!==`/`&&c.endsWith(`/`),p=(s||c===`.`)&&n.endsWith(`/`);return!u.pathname.endsWith(`/`)&&(f||p)&&(u.pathname+=`/`),u}function j(e){return e instanceof Promise&&e._tracked===!0}function M(e){if(!j(e))return e;if(e._error)throw e._error;return e._data}function re(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function N(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0,r=!n;o(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;a=e=>({hasErrorBoundary:t(e)})}else a=Ct;let c={},u=p(e.routes,a,void 0,c),d,f=e.basename||`/`,_=e.dataStrategy||he,v=e.patchRoutesOnNavigation,y=i({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prepe
vendor: 23,247 bytes, lines 1-2
1ndBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),b=null,x=new Set,S=null,C=null,w=null,T=e.hydrationData!=null,E=m(u,e.history.location,f),D=!1,te=null;if(E==null&&!v){let t=I(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Oe(u);E=n,te={[r.id]:t}}E&&!e.hydrationData&&Nt(E,u,e.history.location.pathname).active&&(E=null);let O;if(!E){if(O=!1,E=[],y.v7_partialHydration){let t=Nt(null,u,e.history.location.pathname);t.active&&t.matches&&(D=!0,E=t.matches)}}else if(E.some(e=>e.route.lazy))O=!1;else if(!E.some(e=>e.route.loader))O=!0;else if(y.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=E.findIndex(e=>n[e.route.id]!==void 0);O=E.slice(0,e+1).every(e=>!le(e.route,t,n))}else O=E.every(e=>!le(e.route,t,n))}else O=e.hydrationData!=null;let ne,k={historyAction:e.history.action,location:e.history.location,matches:E,initialized:O,navigation:yt,restoreScrollPosition:e.hydrationData==null?null:!1,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||te,fetchers:new Map,blockers:new Map},A=B.Pop,j=!1,M,N=!1,ie=new Map,se=null,ue=!1,de=!1,fe=[],me=new Set,P=new Map,_e=0,Se=-1,Ce=new Map,F=new Set,Ae=new Map,Fe=new Map,R=new Set,Ie=new Map,Le=new Map,Ve;function Ze(){if(b=e.history.listen(t=>{let{action:n,location:r,delta:i}=t;if(Ve){Ve(),Ve=void 0;return}s(Le.size===0||i!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let a=Dt({currentLocation:k.location,nextLocation:r,historyAction:n});if(a&&i!=null){let t=new Promise(e=>{Ve=e});e.history.go(i*-1),J(a,{state:`blocked`,location:r,proceed(){J(a,{state:`proceeding`,proceed:void 0,reset:void 0,location:r}),t.then(()=>e.history.go(i))},reset(){let e=new Map(k.blockers);e.set(a,xt),H({blockers:e})}});return}return U(n,r)}),n){Ye(t,ie);let e=()=>Xe(t,ie);t.addEventListener(`pagehide`,e),se=()=>t.removeEventListener(`pagehide`,e)}return k.initialized||U(B.Pop,k.location,{initialHydration:!0}),ne}function Qe(){b&&b(),se&&se(),x.clear(),M&&M.abort(),k.fetchers.forEach((e,t)=>pt(t)),k.blockers.forEach((e,t)=>Et(t))}function $e(e){return x.add(e),()=>x.delete(e)}function H(e,t){t===void 0&&(t={}),k=i({},k,e);let n=[],r=[];y.v7_fetcherPersist&&k.fetchers.forEach((e,t)=>{e.state===`idle`&&(R.has(t)?r.push(t):n.push(t))}),R.forEach(e=>{!k.fetchers.has(e)&&!P.has(e)&&r.push(e)}),[...x].forEach(e=>e(k,{deletedFetchers:r,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),y.v7_fetcherPersist?(n.forEach(e=>k.fetchers.delete(e)),r.forEach(e=>pt(e))):r.forEach(e=>R.delete(e))}function et(t,n,r){let{flushSync:a}=r===void 0?{}:r,o=k.actionData!=null&&k.navigation.formMethod!=null&&z(k.navigation.formMethod)&&k.navigation.state===`loading`&&t.state?._isRedirect!==!0,s;s=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:o?k.actionData:null;let c=n.loaderData?Te(k.loaderData,n.loaderData,n.matches||[],n.errors):k.loaderData,l=k.blockers;l.size>0&&(l=new Map(l),l.forEach((e,t)=>l.set(t,xt)));let f=j===!0||k.navigation.formMethod!=null&&z(k.navigation.formMethod)&&t.state?._isRedirect!==!0;d&&=(u=d,void 0),ue||A===B.Pop||(A===B.Push?e.history.push(t,t.state):A===B.Replace&&e.history.replace(t,t.state));let p;if(A===B.Pop){let e=ie.get(k.location.pathname);e&&e.has(t.pathname)?p={currentLocation:k.location,nextLocation:t}:ie.has(t.pathname)&&(p={currentLocation:t,nextLocation:k.location})}else if(N){let e=ie.get(k.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),ie.set(k.location.pathname,e)),p={currentLocation:k.location,nextLocation:t}}H(i({},n,{actionData:s,loaderData:c,historyAction:A,location:t,initialized:!0,navigation:yt,revalidation:`idle`,restoreScrollPosition:Mt(t,n.matches||k.matches),preventScrollReset:f,blockers:l}),{viewTransitionOpts:p,flushSync:a===!0}),A=B.Pop,j=!1,N=!1,ue=!1,de=!1,fe=[]}async function tt(t,n){if(typeof t==`number`){e.history.go(t);return}let r=ae(k.location,k.matches,f,y.v7_prependBasename,t,y.v7_relativeSplatPath,n?.fromRouteId,n?.relative),{path:a,submission:o,error:s}=oe(y.v7_normalizeFormMethod,!1,r,n),c=k.location,u=l(k.location,a,n&&n.state);u=i({},u,e.history.encodeLocation(u));let d=n&&n.replace!=null?n.replace:void 0,p=B.Push;d===!0?p=B.Replace:d===!1||o!=null&&z(o.formMethod)&&o.formAction===k.location.pathname+k.location.search&&(p=B.Replace);let m=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,h=(n&&n.flushSync)===!0,g=Dt({currentLocation:c,nextLocation:u,historyAction:p});if(g){J(g,{state:`blocked`,location:u,proceed(){J(g,{state:`proceeding`,proceed:void 0,reset:void 0,location:u}),tt(t,n)},reset(){let e=new Map(k.blockers);e.set(g,xt),H({blockers:e})}});return}return await U(p,u,{submission:o,pendingError:s,preventScrollReset:m,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:h})}function nt(){if(dt(),H({revalidation:`loading`}),k.navigation.state!==`submitting`){if(k.navigation.state===`idle`){U(k.historyAction,k.location,{startUninterruptedRevalidation:!0});return}U(A||k.historyAction,k.navigation.location,{overrideNavigation:k.navigation,enableViewTransition:N===!0})}}async function U(t,n,r){M&&M.abort(),M=null,A=t,ue=(r&&r.startUninterruptedRevalidation)===!0,jt(k.location,k.matches),j=(r&&r.preventScrollReset)===!0,N=(r&&r.enableViewTransition)===!0;let a=d||u,o=r&&r.overrideNavigation,s=r!=null&&r.initialHydration&&k.matches&&k.matches.length>0&&!D?k.matches:m(a,n,f),c=(r&&r.flushSync)===!0;if(s&&k.initialized&&!de&&je(k.location,n)&&!(r&&r.submission&&z(r.submission.formMethod))){et(n,{matches:s},{flushSync:c});return}let l=Nt(s,a,n.pathname);if(l.active&&l.matches&&(s=l.matches),!s){let{error:e,notFoundMatches:t,route:r}=Y(n.pathname);et(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:c});return}M=new AbortController;let p=xe(e.history,n,M.signal,r&&r.submission),h;if(r&&r.pendingError)h=[De(s).route.id,{type:V.error,error:r.pendingError}];else if(r&&r.submission&&z(r.submission.formMethod)){let t=await rt(p,n,r.submission,s,l.active,{replace:r.replace,flushSync:c});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(L(r)&&re(r.error)&&r.error.status===404){M=null,et(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}s=t.matches||s,h=t.pendingActionResult,o=We(n,r.submission),c=!1,l.active=!1,p=xe(e.history,p.url,p.signal)}let{shortCircuited:g,matches:_,loaderData:v,errors:y}=await it(p,n,s,l.active,o,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,c,h);g||(M=null,et(n,i({matches:_||s},Ee(h),{loaderData:v,errors:y})))}async function rt(t,n,r,i,a,o){if(o===void 0&&(o={}),dt(),H({navigation:Ge(n,r)},{flushSync:o.flushSync===!0}),a){let e=await Pt(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){let t=De(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:V.error,error:e.error}]}}else if(e.matches)i=e.matches;else{let{notFoundMatches:e,error:t,route:r}=Y(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:V.error,error:t}]}}}let s,c=He(i,n);if(!c.route.action&&!c.route.lazy)s={type:V.error,error:I(405,{method:t.method,pathname:n.pathname,routeId:c.route.id})};else if(s=(await lt(`action`,k,t,[c],i,null))[c.route.id],t.signal.aborted)return{shortCircuited:!0};if(Pe(s)){let n;return n=o&&o.replace!=null?o.replace:be(s.response.headers.get(`Location`),new URL(t.url),f,e.history)===k.location.pathname+k.location.search,await G(t,s,!0,{submission:r,replace:n}),{shortCircuited:!0}}if(Ne(s))throw I(400,{type:`defer-action`});if(L(s)){let e=De(i,c.route.id);return(o&&o.replace)!==!0&&(A=B.Push),{matches:i,pendingActionResult:[e.route.id,s]}}return{matches:i,pendingActionResult:[c.route.id,s]}}async function it(t,n,r,a,o,s,c,l,p,m,h){let g=o||We(n,s),_=s||c||Ue(g),v=!ue&&(!y.v7_partialHydration||!p);if(a){if(v){let e=W(h);H(i({navigation:g},e===void 0?{}:{actionData:e}),{flushSync:m})}let e=await Pt(r,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){let t=De(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(e.matches)r=e.matches;else{let{error:e,notFoundMatches:t,route:r}=Y(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let b=d||u,[x,S]=ce(e.history,k,r,_,n,y.v7_partialHydration&&p===!0,y.v7_skipActionErrorRevalidation,de,fe,me,R,Ae,F,b,f,h);if(Ot(e=>!(r&&r.some(t=>t.route.id===e))||x&&x.some(t=>t.route.id===e)),Se=++_e,x.length===0&&S.length===0){let e=_t();return et(n,i({matches:r,loaderData:{},errors:h&&L(h[1])?{[h[0]]:h[1].error}:null},Ee(h),e?{fetchers:new Map(k.fetchers)}:{}),{flushSync:m}),{shortCircuited:!0}}if(v){let e={};if(!a){e.navigation=g;let t=W(h);t!==void 0&&(e.actionData=t)}S.length>0&&(e.fetchers=at(S)),H(e,{flushSync:m})}S.forEach(e=>{ht(e.key),e.controller&&P.set(e.key,e.controller)});let C=()=>S.forEach(e=>ht(e.key));M&&M.signal.addEventListener(`abort`,C);let{loaderResults:w,fetcherResults:T}=await ut(k,r,x,S,t);if(t.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener(`abort`,C),S.forEach(e=>P.delete(e.key));let E=ke(w);if(E)return await G(t,E.result,!0,{replace:l}),{shortCircuited:!0};if(E=ke(T),E)return F.add(E.key),await G(t,E.result,!0,{replace:l}),{shortCircuited:!0};let{loaderData:ee,errors:D}=we(k,r,w,h,S,T,Ie);Ie.forEach((e,t)=>{e.subscribe(n=>{(n||e.done)&&Ie.delete(t)})}),y.v7_partialHydration&&p&&k.errors&&(D=i({},k.errors,D));let te=_t(),O=wt(Se),ne=te||O||S.length>0;return i({matches:r,loaderData:ee,errors:D},ne?{fetchers:new Map(k.fetchers)}:{})}function W(e){if(e&&!L(e[1]))return{[e[0]]:e[1].data};if(k.actionData)return Object.keys(k.actionData).length===0?null:k.actionData}function at(e){return e.forEach(e=>{let t=k.fetchers.get(e.key),n=Ke(void 0,t?t.data:void 0);k.fetchers.set(e.key,n)}),new Map(k.fetchers)}function ot(e,t,n,i){if(r)throw Error(`router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.`);ht(e);let a=(i&&i.flushSync)===!0,o=d||u,s=ae(k.location,k.matches,f,y.v7_prependBasename,n,y.v7_relativeSplatPath,t,i?.relative),c=m(o,s,f),l=Nt(c,o,s);if(l.active&&l.matches&&(c=l.matches),!c){q(e,t,I(404,{pathname:s}),{flushSync:a});return}let{path:p,submission:h,error:g}=oe(y.v7_normalizeFormMethod,!0,s,i);if(g){q(e,t,g,{flushSync:a});return}let _=He(c,p),v=(i&&i.preventScrollReset)===!0;if(h&&z(h.formMethod)){st(e,t,p,_,c,l.active,a,v,h);return}Ae.set(e,{routeId:t,path:p}),ct(e,t,p,_,c,l.active,a,v,h)}async function st(t,n,r,i,a,s,c,l,p){dt(),Ae.delete(t);function h(e){return!e.route.action&&!e.route.lazy?(q(t,n,I(405,{method:p.formMethod,pathname:r,routeId:n}),{flushSync:c}),!0):!1}if(!s&&h(i))return;K(t,qe(p,k.fetchers.get(t)),{flushSync:c});let g=new AbortController,_=xe(e.history,r,g.signal,p);if(s){let e=await Pt(a,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){q(t,n,e.error,{flushSync:c});return}else if(!e.matches){q(t,n,I(404,{pathname:r}),{flushSync:c});return}else if(a=e.matches,i=He(a,r),h(i))return}P.set(t,g);let v=_e,b=(await lt(`action`,k,_,[i],a,t))[i.route.id];if(_.signal.aborted){P.get(t)===g&&P.delete(t);return}if(y.v7_fetcherPersist&&R.has(t)){if(Pe(b)||L(b)){K(t,Je(void 0));return}}else{if(Pe(b))if(P.delete(t),Se>v){K(t,Je(void 0));return}else return F.add(t),K(t,Ke(p)),G(_,b,!1,{fetcherSubmission:p,preventScrollReset:l});if(L(b)){q(t,n,b.error);return}}if(Ne(b))throw I(400,{type:`defer-action`});let x=k.navigation.location||k.location,S=xe(e.history,x,g.signal),C=d||u,w=k.navigation.state===`idle`?k.matches:m(C,k.navigation.location,f);o(w,`Didn't find any matches after fetcher action`);let T=++_e;Ce.set(t,T);let E=Ke(p,b.data);k.fetchers.set(t,E);let[ee,D]=ce(e.history,k,w,p,x,!1,y.v7_skipActionErrorRevalidation,de,fe,me,R,Ae,F,C,f,[i.route.id,b]);D.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=k.fetchers.get(t),r=Ke(void 0,n?n.data:void 0);k.fetchers.set(t,r),ht(t),e.controller&&P.set(t,e.controller)}),H({fetchers:new Map(k.fetchers)});let te=()=>D.forEach(e=>ht(e.key));g.signal.addEventListener(`abort`,te);let{loaderResults:O,fetcherResults:ne}=await ut(k,w,ee,D,S);if(g.signal.aborted)return;g.signal.removeEventListener(`abort`,te),Ce.delete(t),P.delete(t),D.forEach(e=>P.delete(e.key));let j=ke(O);if(j)return G(S,j.result,!1,{preventScrollReset:l});if(j=ke(ne),j)return F.add(j.key),G(S,j.result,!1,{preventScrollReset:l});let{loaderData:re,errors:N}=we(k,w,O,void 0,D,ne,Ie);if(k.fetchers.has(t)){let e=Je(b.data);k.fetchers.set(t,e)}wt(T),k.navigation.state===`loading`&&T>Se?(o(A,`Expected pending action`),M&&M.abort(),et(k.navigation.location,{matches:w,loaderData:re,errors:N,fetchers:new Map(k.fetchers)})):(H({errors:N,loaderData:Te(k.loaderData,re,w,N),fetchers:new Map(k.fetchers)}),de=!1)}async function ct(t,n,r,i,a,s,c,l,u){let d=k.fetchers.get(t);K(t,Ke(u,d?d.data:void 0),{flushSync:c});let f=new AbortController,p=xe(e.history,r,f.signal);if(s){let e=await Pt(a,new URL(p.url).pathname,p.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){q(t,n,e.error,{flushSync:c});return}else if(e.matches)a=e.matches,i=He(a,r);else{q(t,n,I(404,{pathname:r}),{flushSync:c});return}}P.set(t,f);let m=_e,h=(await lt(`loader`,k,p,[i],a,t))[i.route.id];if(Ne(h)&&(h=await Be(h,p.signal,!0)||h),P.get(t)===f&&P.delete(t),!p.signal.aborted){if(R.has(t)){K(t,Je(void 0));return}if(Pe(h))if(Se>m){K(t,Je(void 0));return}else{F.add(t),await G(p,h,!1,{preventScrollReset:l});return}if(L(h)){q(t,n,h.error);return}o(!Ne(h),`Unhandled fetcher deferred data`),K(t,Je(h.data))}}async function G(r,a,s,c){let{submission:u,fetcherSubmission:d,preventScrollReset:p,replace:m}=c===void 0?{}:c;a.response.headers.has(`X-Remix-Revalidate`)&&(de=!0);let h=a.response.headers.get(`Location`);o(h,`Expected a Location header on the redirect Response`),h=be(h,new URL(r.url),f,e.history);let g=l(k.location,h,{_isRedirect:!0});if(n){let n=!1;if(a.response.headers.has(`X-Remix-Reload-Document`))n=!0;else if(St.test(h)){let r=e.history.createURL(h);n=r.origin!==t.location.origin||ee(r.pathname,f)==null}if(n){m?t.location.replace(h):t.location.assign(h);return}}M=null;let _=m===!0||a.response.headers.has(`X-Remix-Replace`)?B.Replace:B.Push,{formMethod:v,formAction:y,formEncType:b}=k.navigation;!u&&!d&&v&&y&&b&&(u=Ue(k.navigation));let x=u||d;vt.has(a.response.status)&&x&&z(x.formMethod)?await U(_,g,{submission:i({},x,{formAction:h}),preventScrollReset:p||j,enableViewTransition:s?N:void 0}):await U(_,g,{overrideNavigation:We(g,u),fetcherSubmission:d,preventScrollReset:p||j,enableViewTransition:s?N:void 0})}async function lt(e,t,n,r,i,o){let s,l={};try{s=await ge(_,e,t,n,r,i,o,c,a)}catch(e){return r.forEach(t=>{l[t.route.id]={type:V.error,error:e}}),l}for(let[e,t]of Object.entries(s))if(Me(t)){let r=t.result;l[e]={type:V.redirect,response:ye(r,n,e,i,f,y.v7_relativeSplatPath)}}else l[e]=await ve(t);return l}async function ut(t,n,r,i,a){let o=t.matches,s=lt(`loader`,t,a,r,n,null),c=Promise.all(i.map(async n=>{if(n.matches&&n.match&&n.controller){let r=(await lt(`loader`,t,xe(e.history,n.path,n.controller.signal),[n.match],n.matches,n.key))[n.match.route.id];return{[n.key]:r}}else return Promise.resolve({[n.key]:{type:V.error,error:I(404,{pathname:n.path})}})})),l=await s,u=(await c).reduce((e,t)=>Object.assign(e,t),{});return await Promise.all([Re(n,l,a.signal,o,t.loaderData),ze(n,u,i)]),{loaderResults:l,fetcherResults:u}}function dt(){de=!0,fe.push(...Ot()),Ae.forEach((e,t)=>{P.has(t)&&me.add(t),ht(t)})}function K(e,t,n){n===void 0&&(n={}),k.fetchers.set(e,t),H({fetchers:new Map(k.fetchers)},{flushSync:(n&&n.flushSync)===!0})}function q(e,t,n,r){r===void 0&&(r={});let i=De(k.matches,t);pt(e),H({errors:{[i.route.id]:n},fetchers:new Map(k.fetchers)},{flushSync:(r&&r.flushSync)===!0})}function ft(e){return Fe.set(e,(Fe.get(e)||0)+1),R.has(e)&&R.delete(e),k.fetchers.get(e)||bt}function pt(e){let t=k.fetchers.get(e);P.has(e)&&!(t&&t.state===`loading`&&Ce.has(e))&&ht(e),Ae.delete(e),Ce.delete(e),F.delete(e),y.v7_fetcherPersist&&R.delete(e),me.delete(e),k.fetchers.delete(e)}function mt(e){let t=(Fe.get(e)||0)-1;t<=0?(Fe.delete(e),R.add(e),y.v7_fetcherPersist||pt(e)):Fe.set(e,t),H({fetchers:new Map(k.fetchers)})}function ht(e){let t=P.get(e);t&&(t.abort(),P.delete(e))}function gt(e){for(let t of e){let e=Je(ft(t).data);k.fetchers.set(t,e)}}function _t(){let e=[],t=!1;for(let n of F){let r=k.fetchers.get(n);o(r,`Expected fetcher: `+n),r.state===`loading`&&(F.delete(n),e.push(n),t=!0)}return gt(e),t}function wt(e){let t=[];for(let[n,r]of Ce)if(r<e){let e=k.fetchers.get(n);o(e,`Expected fetcher: `+n),e.state===`loading`&&(ht(n),Ce.delete(n),t.push(n))}return gt(t),t.length>0}function Tt(e,t){let n=k.blockers.get(e)||xt;return Le.get(e)!==t&&Le.set(e,t),n}function Et(e){k.blockers.delete(e),Le.delete(e)}function J(e,t){let n=k.blockers.get(e)||xt;o(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: `+n.state+` -> `+t.state);let r=new Map(k.blockers);r.set(e,t),H({blockers:r})}function Dt(e){let{currentLocation:t,nextLocation:n,historyAction:r}=e;if(Le.size===0)return;Le.size>1&&s(!1,`A router only supports one blocker at a time`);let i=Array.from(Le.entries()),[a,o]=i[i.length-1],c=k.blockers.get(a);if(!(c&&c.state===`proceeding`)&&o({currentLocation:t,nextLocation:n,historyAction:r}))return a}function Y(e){let t=I(404,{pathname:e}),{matches:n,route:r}=Oe(d||u);return Ot(),{notFoundMatches:n,route:r,error:t}}function Ot(e){let t=[];return Ie.forEach((n,r)=>{(!e||e(r))&&(n.cancel(),t.push(r),Ie.delete(r))}),t}function kt(e,t,n){if(S=e,w=t,C=n||null,!T&&k.navigation===yt){T=!0;let e=Mt(k.location,k.matches);e!=null&&H({restoreScrollPosition:e})}return()=>{S=null,w=null,C=null}}function At(e,t){return C&&C(e,t.map(e=>g(e,k.loaderData)))||e.key}function jt(e,t){if(S&&w){let n=At(e,t);S[n]=w()}}function Mt(e,t){if(S){let n=At(e,t),r=S[n];if(typeof r==`number`)return r}return null}function Nt(e,t,n){if(v){if(!e)return{active:!0,matches:h(t,n,f,!0)||[]};if(Object.keys(e[0].params).length>0)return{active:!0,matches:h(t,n,f,!0)}}return{active:!1,matches:null}}async function Pt(e,t,n,r){if(!v)return{type:`success`,matches:e};let i=e;for(;;){let e=d==null,o=d||u,s=c;try{await v({signal:n,path:t,matches:i,fetcherKey:r,patch:(e,t)=>{n.aborted||pe(e,t,o,s,a)}})}catch(e){return{type:`error`,error:e,partialMatches:i}}finally{e&&!n.aborted&&(u=[...u])}if(n.aborted)return{type:`aborted`};let l=m(o,t,f);if(l)return{type:`success`,matches:l};let p=h(o,t,f,!0);if(!p||i.length===p.length&&i.every((e,t)=>e.route.id===p[t].route.id))return{type:`success`,matches:null};i=p}}function Ft(e){c={},d=p(e,a,void 0,c)}function It(e,t){let n=d==null;pe(e,t,d||u,c,a),n&&(u=[...u],H({}))}return ne={get basename(){return f},get future(){return y},get state(){return k},get routes(){return u},get window(){return t},initialize:Ze,subscribe:$e,enableScrollRestoration:kt,navigate:tt,fetch:ot,revalidate:nt,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:ft,deleteFetcher:mt,dispose:Qe,getBlocker:Tt,deleteBlocker:Et,patchRoutes:It,_internalFetchControllers:P,_internalActiveDeferreds:Ie,_internalSetRoutes:Ft},ne}function ie(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function ae(e,t,n,r,i,a,o,s){let c,l;if(o){c=[];for(let e of t)if(c.push(e),e.route.id===o){l=e;break}}else c=t,l=t[t.length-1];let d=A(i||`.`,k(c,a),ee(e.pathname,n)||e.pathname,s===`path`);if(i??(d.search=e.search,d.hash=e.hash),(i==null||i===``||i===`.`)&&l){let e=Ve(d.search);if(l.route.index&&!e)d.search=d.search?d.search.replace(/^\?/,`?index&`):`?index`;else if(!l.route.index&&e){let e=new URLSearchParams(d.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();d.search=n?`?`+n:``}}return r&&n!==`/`&&(d.pathname=d.pathname===`/`?n:W([n,d.pathname])),u(d)}function oe(e,t,n,r){if(!r||!ie(r))return{path:n};if(r.formMethod&&!Le(r.formMethod))return{path:n,error:I(405,{method:r.formMethod})};let i=()=>({path:n,error:I(400,{type:`invalid-body`})}),a=r.formMethod||`get`,s=e?a.toUpperCase():a.toLowerCase(),c=Ae(n);if(r.body!==void 0){if(r.formEncType===`text/plain`){if(!z(s))return i();let e=typeof r.body==`string`?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((e,t)=>{let[n,r]=t;return``+e+n+`=`+r+`
2`},``):String(r.body);return{path:n,submission:{formMethod:s,formAction:c,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}else if(r.formEncType===`application/json`){if(!z(s))return i();try{let e=typeof r.body==`string`?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:c,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch{return i()}}}o(typeof FormData==`function`,`FormData is not available in this environment`);let l,f;if(r.formData)l=Se(r.formData),f=r.formData;else if(r.body instanceof FormData)l=Se(r.body),f=r.body;else if(r.body instanceof URLSearchParams)l=r.body,f=Ce(l);else if(r.body==null)l=new URLSearchParams,f=new FormData;else try{l=new URLSearchParams(r.body),f=Ce(l)}catch{return i()}let p={formMethod:s,formAction:c,formEncType:r&&r.formEncType||`application/x-www-form-urlencoded`,formData:f,json:void 0,text:void 0};if(z(p.formMethod))return{path:n,submission:p};let m=d(n);return t&&m.search&&Ve(m.search)&&l.append(`index`,``),m.search=`?`+l,{path:u(m),submission:p}}function se(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(e=>e.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function ce(e,t,n,r,a,o,s,c,l,u,d,f,p,h,g,_){let v=_?L(_[1])?_[1].error:_[1].data:void 0,y=e.createURL(t.location),b=e.createURL(a),x=n;o&&t.errors?x=se(n,Object.keys(t.errors)[0],!0):_&&L(_[1])&&(x=se(n,_[0]));let S=_?_[1].statusCode:void 0,C=s&&S&&S>=400,w=x.filter((e,n)=>{let{route:a}=e;if(a.lazy)return!0;if(a.loader==null)return!1;if(o)return le(a,t.loaderData,t.errors);if(ue(t.loaderData,t.matches[n],e)||l.some(t=>t===e.route.id))return!0;let s=t.matches[n],u=e;return fe(e,i({currentUrl:y,currentParams:s.params,nextUrl:b,nextParams:u.params},r,{actionResult:v,actionStatus:S,defaultShouldRevalidate:C?!1:c||y.pathname+y.search===b.pathname+b.search||y.search!==b.search||de(s,u)}))}),T=[];return f.forEach((e,a)=>{if(o||!n.some(t=>t.route.id===e.routeId)||d.has(a))return;let s=m(h,e.path,g);
2if(!s){T.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});return}let l=t.fetchers.get(a),f=He(s,e.path),_=!1;p.has(a)?_=!1:u.has(a)?(u.delete(a),_=!0):_=l&&l.state!==`idle`&&l.data===void 0?c:fe(f,i({currentUrl:y,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:n[n.length-1].params},r,{actionResult:v,actionStatus:S,defaultShouldRevalidate:C?!1:c})),_&&T.push({key:a,routeId:e.routeId,path:e.path,matches:s,match:f,controller:new AbortController})}),[w,T]}function le(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader==`function`&&e.loader.hydrate===!0?!0:!r&&!i}function ue(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function de(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function fe(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function pe(e,t,n,r,i){let a;if(e){let t=r[e];o(t,`No route found to patch children into: routeId = `+e),t.children||=[],a=t.children}else a=n;let s=p(t.filter(e=>!a.some(t=>me(e,t))),i,[e||`_`,`patch`,String(a?.length||`0`)],r);a.push(...s)}function me(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((e,n)=>t.children?.some(t=>me(e,t))):!1}async function P(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let a=n[e.id];o(a,`No route found in manifest`);let c={};for(let e in r){let t=a[e]!==void 0&&e!==`hasErrorBoundary`;s(!t,`Route "`+a.id+`" has a static property "`+e+`" defined but its lazy function is also returning a value for this property. `+(`The lazy route property "`+e+`" will be ignored.`)),!t&&!Ze.has(e)&&(c[e]=r[e])}Object.assign(a,c),Object.assign(a,i({},t(a),{lazy:void 0}))}async function he(e){let{matches:t}=e,n=t.filter(e=>e.shouldLoad);return(await Promise.all(n.map(e=>e.resolve()))).reduce((e,t,r)=>Object.assign(e,{[n[r].route.id]:t}),{})}async function ge(e,t,n,r,a,o,s,c,l,u){let d=o.map(e=>e.route.lazy?P(e.route,l,c):void 0),f=await e({matches:o.map((e,n)=>{let o=d[n],s=a.some(t=>t.route.id===e.route.id);return i({},e,{shouldLoad:s,resolve:async n=>(n&&r.method===`GET`&&(e.route.lazy||e.route.loader)&&(s=!0),s?_e(t,r,e,o,n,u):Promise.resolve({type:V.data,result:void 0}))})}),request:r,params:o[0].params,fetcherKey:s,context:u});try{await Promise.all(d)}catch{}return f}async function _e(e,t,n,r,i,a){let s,c,l=r=>{let o,s=new Promise((e,t)=>o=t);c=()=>o(),t.signal.addEventListener(`abort`,c);let l=i=>typeof r==`function`?r({request:t,params:n.params,context:a},...i===void 0?[]:[i]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean `+(`"`+e+`" [routeId: `+n.route.id+`]`))),u=(async()=>{try{return{type:`data`,result:await(i?i(e=>l(e)):l())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([u,s])};try{let i=n.route[e];if(r)if(i){let e,[t]=await Promise.all([l(i).catch(t=>{e=t}),r]);if(e!==void 0)throw e;s=t}else if(await r,i=n.route[e],i)s=await l(i);else if(e===`action`){let e=new URL(t.url),r=e.pathname+e.search;throw I(405,{method:t.method,pathname:r,routeId:n.route.id})}else return{type:V.data,result:void 0};else if(i)s=await l(i);else{let e=new URL(t.url);throw I(404,{pathname:e.pathname+e.search})}o(s.result!==void 0,`You defined `+(e===`action`?`an action`:`a loader`)+` for route `+(`"`+n.route.id+`" but didn't return anything from your \``+e+"` ")+"function. Please return a value or `null`.")}catch(e){return{type:V.error,result:e}}finally{c&&t.signal.removeEventListener(`abort`,c)}return s}async function ve(e){let{result:t,type:n}=e;if(Ie(t)){let e;try{let n=t.headers.get(`Content-Type`);e=n&&/\bapplication\/json\b/.test(n)?t.body==null?null:await t.json():await t.text()}catch(e){return{type:V.error,error:e}}return n===V.error?{type:V.error,error:new ft(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:V.data,data:e,statusCode:t.status,headers:t.headers}}if(n===V.error){if(Fe(t)){var r;if(t.data instanceof Error){var i;return{type:V.error,error:t.data,statusCode:t.init?.status,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}}return{type:V.error,error:new ft(t.init?.status||500,void 0,t.data),statusCode:re(t)?t.status:void 0,headers:(r=t.init)!=null&&r.headers?new Headers(t.init.headers):void 0}}return{type:V.error,error:t,statusCode:re(t)?t.status:void 0}}if(R(t))return{type:V.deferred,deferredData:t,statusCode:t.init?.status,headers:t.init?.headers&&new Headers(t.init.headers)};if(Fe(t)){var a;return{type:V.data,data:t.data,statusCode:t.init?.status,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}}return{type:V.data,data:t}}function ye(e,t,n,r,i,a){let s=e.headers.get(`Location`);if(o(s,`Redirects returned/thrown from loaders/actions must have a Location header`),!St.test(s)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);s=ae(new URL(t.url),o,i,!0,s,a),e.headers.set(`Location`,s)}return e}function be(e,t,n,r){let i=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];if(St.test(e)){let r=e,a=r.startsWith(`//`)?new URL(t.protocol+r):new URL(r);if(i.includes(a.protocol))throw Error(`Invalid redirect location`);let o=ee(a.pathname,n)!=null;if(a.origin===t.origin&&o)return a.pathname+a.search+a.hash}try{let t=r.createURL(e);if(i.includes(t.protocol))throw Error(`Invalid redirect location`)}catch{}return e}function xe(e,t,n,r){let i=e.createURL(Ae(t)).toString(),a={signal:n};if(r&&z(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):t===`text/plain`?a.body=r.text:t===`application/x-www-form-urlencoded`&&r.formData?a.body=Se(r.formData):a.body=r.formData}
vendor: 4,657 bytes, line 2
2return new Request(i,a)}function Se(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function Ce(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function F(e,t,n,r,i){let a={},s=null,c,l=!1,u={},d=n&&L(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let f=n.route.id,p=t[f];if(o(!Pe(p),`Cannot handle redirect results in processLoaderData`),L(p)){let t=p.error;if(d!==void 0&&(t=d,d=void 0),s||={},i)s[f]=t;else{let n=De(e,f);s[n.route.id]??(s[n.route.id]=t)}a[f]=void 0,l||(l=!0,c=re(p.error)?p.error.status:500),p.headers&&(u[f]=p.headers)}else Ne(p)?(r.set(f,p.deferredData),a[f]=p.deferredData.data,p.statusCode!=null&&p.statusCode!==200&&!l&&(c=p.statusCode),p.headers&&(u[f]=p.headers)):(a[f]=p.data,p.statusCode&&p.statusCode!==200&&!l&&(c=p.statusCode),p.headers&&(u[f]=p.headers))}),d!==void 0&&n&&(s={[n[0]]:d},a[n[0]]=void 0),{loaderData:a,errors:s,statusCode:c||200,loaderHeaders:u}}function we(e,t,n,r,a,s,c){let{loaderData:l,errors:u}=F(t,n,r,c,!1);return a.forEach(t=>{let{key:n,match:r,controller:a}=t,c=s[n];if(o(c,`Did not find corresponding fetcher result`),!(a&&a.signal.aborted))if(L(c)){let t=De(e.matches,r?.route.id);u&&u[t.route.id]||(u=i({},u,{[t.route.id]:c.error})),e.fetchers.delete(n)}else if(Pe(c))o(!1,`Unhandled fetcher revalidation redirect`);else if(Ne(c))o(!1,`Unhandled fetcher deferred data`);else{let t=Je(c.data);e.fetchers.set(n,t)}}),{loaderData:l,errors:u}}function Te(e,t,n,r){let a=i({},t);for(let i of n){let n=i.route.id;if(t.hasOwnProperty(n)?t[n]!==void 0&&(a[n]=t[n]):e[n]!==void 0&&i.route.loader&&(a[n]=e[n]),r&&r.hasOwnProperty(n))break}return a}function Ee(e){return e?L(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function De(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function Oe(e){let t=e.length===1?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 I(e,t){let{pathname:n,routeId:r,method:i,type:a,message:o}=t===void 0?{}:t,s=`Unknown Server Error`,c=`Unknown @remix-run/router error`;return e===400?(s=`Bad Request`,i&&n&&r?c=`You made a `+i+` request to "`+n+`" but `+('did not provide a `loader` for route "'+r+`", `)+`so there is no way to handle the request.`:a===`defer-action`?c=`defer() is not supported in actions`:a===`invalid-body`&&(c=`Unable to encode submission body`)):e===403?(s=`Forbidden`,c=`Route "`+r+`" does not match URL "`+n+`"`):e===404?(s=`Not Found`,c=`No route matches URL "`+n+`"`):e===405&&(s=`Method Not Allowed`,i&&n&&r?c=`You made a `+i.toUpperCase()+` request to "`+n+`" but `+('did not provide an `action` for route "'+r+`", `)+`so there is no way to handle the request.`:i&&(c=`Invalid request method "`+i.toUpperCase()+`"`)),new ft(e||500,s,Error(c),!0)}function ke(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(Pe(r))return{key:n,result:r}}}function Ae(e){let t=typeof e==`string`?d(e):e;return u(i({},t,{hash:``}))}function je(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash?!0:t.hash!==``}function Me(e){return Ie(e.result)&&_t.has(e.result.status)}function Ne(e){return e.type===V.deferred}function L(e){return e.type===V.error}function Pe(e){return(e&&e.type)===V.redirect}function Fe(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function R(e){let t=e;return t&&typeof t==`object`&&typeof t.data==`object`&&typeof t.subscribe==`function`&&typeof t.cancel==`function`&&typeof t.resolveData==`function`}function Ie(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function Le(e){return gt.has(e.toLowerCase())}function z(e){return mt.has(e.toLowerCase())}async function Re(e,t,n,r,i){let a=Object.entries(t);for(let o=0;o<a.length;o++){let[s,c]=a[o],l=e.find(e=>e?.route.id===s);if(!l)continue;let u=r.find(e=>e.route.id===l.route.id),d=u!=null&&!de(u,l)&&(i&&i[l.route.id])!==void 0;Ne(c)&&d&&await Be(c,n,!1).then(e=>{e&&(t[s]=e)})}}async function ze(e,t,n){for(let r=0;r<n.length;r++){let{key:i,routeId:a,controller:s}=n[r],c=t[i];e.find(e=>e?.route.id===a)&&Ne(c)&&(o(s,`Expected an AbortController for revalidating fetcher deferred result`),await Be(c,s.signal,!0).then(e=>{e&&(t[i]=e)}))}}async function Be(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:V.data,data:e.deferredData.unwrappedData}
2}catch(e){return{type:V.error,error:e}}return{type:V.data,data:e.deferredData.data}}}function Ve(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function He(e,t){let n=typeof t==`string`?d(t).search:t.search;if(e[e.length-1].route.index&&Ve(n||``))return e[e.length-1];let r=ne(e);return r[r.length-1]}function Ue(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function We(e,t){return t?{state:`loading`,location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:`loading`,location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Ge(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 Ke(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function qe(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Je(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Ye(e,t){try{let n=e.sessionStorage.getItem(wt);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function Xe(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(wt,JSON.stringify(n))}catch(e){s(!1,`Failed to save applied view transitions in sessionStorage (`+e+`).`)}}}var B,V,Ze,Qe,$e,H,et,tt,nt,U,rt,it,W,at,ot,st,ct,G,lt,ut,dt,K,q,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt=e((()=>{(function(e){e.Pop=`POP`,e.Push=`PUSH`,e.Replace=`REPLACE`})(B||={}),(function(e){e.data=`data`,e.deferred=`deferred`,e.redirect=`redirect`,e.error=`error`})(V||={}),Ze=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]),Qe=/^:[\w-]+$/,$e=3,H=2,et=1,tt=10,nt=-2,U=e=>e===`*`,rt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,it=e=>rt.test(e),W=e=>e.join(`/`).replace(/\/\/+/g,`/`),at=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),ot=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,st=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,ct=function(e,t){t===void 0&&(t={});let n=typeof t==`number`?{status:t}:t,r=new Headers(n.headers);return r.has(`Content-Type`)||r.set(`Content-Type`,`application/json; charset=utf-8`),new Response(JSON.stringify(e),i({},n,{headers:r}))},G=class extends Error{},lt=class{constructor(e,t){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],o(e&&typeof e==`object`&&!Array.isArray(e),`defer() only accepts plain objects`);let n;this.abortPromise=new Promise((e,t)=>n=t),this.controller=new AbortController;let r=()=>n(new G(`Deferred data aborted`));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener(`abort`,r),this.controller.signal.addEventListener(`abort`,r),this.data=Object.entries(e).reduce((e,t)=>{let[n,r]=t;return Object.assign(e,{[n]:this.trackPromise(n,r)})},{}),this.done&&this.unlistenAbortSignal(),this.init=t}trackPromise(e,t){if(!(t instanceof Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let n=Promise.race([t,this.abortPromise]).then(t=>this.onSettle(n,e,void 0,t),t=>this.onSettle(n,e,t));return n.catch(()=>{}),Object.defineProperty(n,`_tracked`,{get:()=>!0}),n}onSettle(e,t,n,r){if(this.controller.signal.aborted&&n instanceof G)return this.unlistenAbortSignal(),Object.defineProperty(e,`_error`,{get:()=>n}),Promise.reject(n);if(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),n===void 0&&r===void 0){let n=Error(`Deferred data for key "`+t+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(e,`_error`,{get:()=>n}
2),this.emit(!1,t),Promise.reject(n)}return r===void 0?(Object.defineProperty(e,`_error`,{get:()=>n}),this.emit(!1,t),Promise.reject(n)):(Object.defineProperty(e,`_data`,{get:()=>r}),this.emit(!1,t),r)}emit(e,t){this.subscribers.forEach(n=>n(e,t))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((e,t)=>this.pendingKeysSet.delete(t)),this.emit(!0)}async resolveData(e){let t=!1;if(!this.done){let n=()=>this.cancel();e.addEventListener(`abort`,n),t=await new Promise(t=>{this.subscribe(r=>{e.removeEventListener(`abort`,n),(r||this.done)&&t(r)})})}return t}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return o(this.data!==null&&this.done,`Can only unwrap data on initialized and settled deferreds`),Object.entries(this.data).reduce((e,t)=>{let[n,r]=t;return Object.assign(e,{[n]:M(r)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}},ut=function(e,t){return t===void 0&&(t={}),new lt(e,typeof t==`number`?{status:t}:t)},dt=function(e,t){t===void 0&&(t=302);let n=t;typeof n==`number`?n={status:n}:n.status===void 0&&(n.status=302);let r=new Headers(n.headers);return r.set(`Location`,e),new Response(null,i({},n,{headers:r}))},K=(e,t)=>{let n=dt(e,t);return n.headers.set(`X-Remix-Reload-Document`,`true`),n},q=(e,t)=>{let n=dt(e,t);return n.headers.set(`X-Remix-Replace`,`true`),n},ft=class{constructor(e,t,n,r){r===void 0&&(r=!1),this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}},pt=[`post`,`put`,`patch`,`delete`],mt=new Set(pt),ht=[`get`,...pt],gt=new Set(ht),_t=new Set([301,302,303,307,308]),vt=new Set([307,308]),yt={state:`idle`,location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},bt={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},xt={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},St=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ct=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),wt=`remix-router-transitions`})),Et=n({AbortedDeferredError:()=>G,Await:()=>gn,MemoryRouter:()=>un,Navigate:()=>dn,NavigationType:()=>B,Outlet:()=>fn,Route:()=>pn,Router:()=>mn,RouterProvider:()=>cn,Routes:()=>hn,UNSAFE_DataRouterContext:()=>Sn,UNSAFE_DataRouterStateContext:()=>Cn,UNSAFE_LocationContext:()=>En,UNSAFE_NavigationContext:()=>Tn,UNSAFE_RouteContext:()=>Z,UNSAFE_logV6DeprecationWarnings:()=>sn,UNSAFE_mapRouteProperties:()=>bn,UNSAFE_useRouteId:()=>qt,UNSAFE_useRoutesImpl:()=>zt,createMemoryRouter:()=>xn,createPath:()=>u,createRoutesFromChildren:()=>vn,createRoutesFromElements:()=>vn,defer:()=>ut,generatePath:()=>C,isRouteErrorResponse:()=>re,json:()=>ct,matchPath:()=>w,matchRoutes:()=>m,parsePath:()=>d,redirect:()=>dt,redirectDocument:()=>K,renderMatches:()=>yn,replace:()=>q,resolvePath:()=>D,useActionData:()=>$t,useAsyncError:()=>nn,useAsyncValue:()=>tn,useBlocker:()=>rn,useHref:()=>Dt,useInRouterContext:()=>Y,useLoaderData:()=>Zt,useLocation:()=>Ot,useMatch:()=>At,useMatches:()=>Xt,useNavigate:()=>Mt,useNavigation:()=>Jt,useNavigationType:()=>kt,useOutlet:()=>Ft,useOutletContext:()=>Pt,useParams:()=>It,useResolvedPath:()=>Lt,useRevalidator:()=>Yt,useRouteError:()=>en,useRouteLoaderData:()=>Qt,useRoutes:()=>Rt});function J(){return J=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},J.apply(this,arguments)}function Dt(e,t){let{relative:n}=t===void 0?{}:t;!Y()&&o(!1);let{basename:r,navigator:i}=X.useContext(Tn),{hash:a,pathname:s,search:c}=Lt(e,{relative:n}),l=s;return r!==`/`&&(l=s===`/`?r:W([r,s])),i.createHref({pathname:l,search:c,hash:a})}function Y(){return X.useContext(En)!=null}function Ot(){return!Y()&&o(!1),X.useContext(En).location}function kt(){return X.useContext(En).navigationType}function At(e){!Y()&&o(!1);let{pathname:t}=Ot();return X.useMemo(()=>w(e,E(t)),[t,e])}function jt(e){X.useContext(Tn).static||X.useLayoutEffect(e)}function Mt(){let{isDataRoute:e}=X.useContext(Z);return e?an():Nt()}function Nt(){!Y()&&o(!1);let e=X.useContext(Sn),{basename:t,future:n,navigator:r}=X.useContext(Tn),{matches:i}=X.useContext(Z),{pathname:a}=Ot(),s=JSON.stringify(k(i,n.v7_relativeSplatPath)),c=X.useRef(!1);return jt(()=>{c.current=!0}
2),X.useCallback(function(n,i){if(i===void 0&&(i={}),!c.current)return;if(typeof n==`number`){r.go(n);return}let o=A(n,JSON.parse(s),a,i.relative===`path`);e==null&&t!==`/`&&(o.pathname=o.pathname===`/`?t:W([t,o.pathname])),(i.replace?r.replace:r.push)(o,i.state,i)},[t,r,s,a,e])}function Pt(){return X.useContext(On)}function Ft(e){let t=X.useContext(Z).outlet;return t&&X.createElement(On.Provider,{value:e},t)}function It(){let{matches:e}=X.useContext(Z),t=e[e.length-1];return t?t.params:{}}function Lt(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=X.useContext(Tn),{matches:i}=X.useContext(Z),{pathname:a}=Ot(),o=JSON.stringify(k(i,r.v7_relativeSplatPath));return X.useMemo(()=>A(e,JSON.parse(o),a,n===`path`),[e,o,a,n])}function Rt(e,t){return zt(e,t)}function zt(e,t,n,r){!Y()&&o(!1);let{navigator:i}=X.useContext(Tn),{matches:a}=X.useContext(Z),s=a[a.length-1],c=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:`/`;s&&s.route;let u=Ot(),f;if(t){let e=typeof t==`string`?d(t):t;!(l===`/`||e.pathname?.startsWith(l))&&o(!1),f=e}else f=u;let p=f.pathname||`/`,h=p;if(l!==`/`){let e=l.replace(/^\//,``).split(`/`);h=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let g=m(e,{pathname:h}),_=Ht(g&&g.map(e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:W([l,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?l:W([l,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),a,n,r);return t&&_?X.createElement(En.Provider,{value:{location:J({pathname:`/`,search:``,hash:``,state:null,key:`default`},f),navigationType:B.Pop}},_):_}function Bt(){let e=en(),t=re(e)?e.status+` `+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return X.createElement(X.Fragment,null,X.createElement(`h2`,null,`Unexpected Application Error!`),X.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?X.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}function Vt(e){let{routeContext:t,match:n,children:r}=e,i=X.useContext(Sn);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),X.createElement(Z.Provider,{value:t},r)}function Ht(e,t,n,r){if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,s=n?.errors;if(s!=null){let e=a.findIndex(e=>e.route.id&&s?.[e.route.id]!==void 0);!(e>=0)&&o(!1),a=a.slice(0,Math.min(a.length,e+1))}let c=!1,l=-1;if(n&&r&&r.v7_partialHydration)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:r}=n,i=t.route.loader&&e[t.route.id]===void 0&&(!r||r[t.route.id]===void 0);if(t.route.lazy||i){c=!0,a=l>=0?a.slice(0,l+1):[a[0]];break}}}return a.reduceRight((e,r,i)=>{let o,u=!1,d=null,f=null;n&&(o=s&&r.route.id?s[r.route.id]:void 0,d=r.route.errorElement||kn,c&&(l<0&&i===0?(on(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),u=!0,f=null):l===i&&(u=!0,f=r.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,i+1)),m=()=>{let t;return t=o?d:u?f:r.route.Component?X.createElement(r.route.Component,null):r.route.element?r.route.element:e,X.createElement(Vt,{match:r,routeContext:{outlet:e,matches:p,isDataRoute:n!=null},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||i===0)?X.createElement(An,{location:n.location,revalidation:n.revalidation,component:d,error:o,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}function Ut(e){let t=X.useContext(Sn);return!t&&o(!1),t}function Wt(e){let t=X.useContext(Cn);return!t&&o(!1),t}function Gt(e){let t=X.useContext(Z);return!t&&o(!1),t}function Kt(e){let t=Gt(e),n=t.matches[t.matches.length-1];return!n.route.id&&o(!1),n.route.id}function qt(){return Kt(Q.UseRouteId)}function Jt(){return Wt(Q.UseNavigation).navigation}function Yt(){let e=Ut(jn.UseRevalidator),t=Wt(Q.UseRevalidator);return X.useMemo(()=>({revalidate:e.router.revalidate,state:t.revalidation}),[e.router.revalidate,t.revalidation])}function Xt(){let{matches:e,loaderData:t}=Wt(Q.UseMatches);return X.useMemo(()=>e.map(e=>g(e,t)),[e,t])}function Zt(){let e=Wt(Q.UseLoaderData),t=Kt(Q.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+`)`);return}return e.loaderData[t]}function Qt(e){return Wt(Q.UseRouteLoaderData).loaderData[e]}function $t(){let e=Wt(Q.UseActionData),t=Kt(Q.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function en(){let e=X.useContext(Dn),t=Wt(Q.UseRouteError),n=Kt(Q.UseRouteError);return e===void 0?t.errors?.[n]:e}function tn(){return X.useContext(wn)?._data}function nn(){return X.useContext(wn)?._error}function rn(e){let{router:t,basename:n}=Ut(jn.UseBlocker),r=Wt(Q.UseBlocker),[i,a]=X.useState(``),o=X.useCallback(t=>{if(typeof e!=`function`)return!!e;if(n===`/`)return e(t);let{currentLocation:r,nextLocation:i,historyAction:a}=t;return e({currentLocation:J({},r,{pathname:ee(r.pathname,n)||r.pathname}),nextLocation:J({},i,{pathname:ee(i.pathname,n)||i.pathname}),historyAction:a})},[n,e]);return X.useEffect(()=>{let e=String(++Mn);return a(e),()=>t.deleteBlocker(e)},[t]),X.useEffect(()=>{i!==``&&t.getBlocker(i,o)},[t,i,o]),i&&r.blockers.has(i)?r.blockers.get(i):xt}function an(){let{router:e}=Ut(jn.UseNavigateStable),t=Kt(Q.UseNavigateStable),n=X.useRef(!1);return jt(()=>{n.current=!0}),X.useCallback(function(r,i){i===void 0&&(i={}),n.current&&(typeof r==`number`?e.navigate(r):e.navigate(r,J({fromRouteId:t},i)))},[e,t])}function on(e,t,n){!t&&!Nn[e]&&(Nn[e]=!0)}function sn(e,t){e?.v7_startTransition===void 0&&Pn(`v7_startTransition`,"React Router will begin wrapping state updates in `React.startTransition` in v7",`https://reactrouter.com/v6/upgrading/future#v7_starttransition`),e?.v7_relativeSplatPath===void 0&&(!t||t.v7_relativeSplatPath===void 0)&&Pn(`v7_relativeSplatPath`,`Relative route resolution within Splat routes is changing in v7`,`https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath`),t&&(t.v7_fetcherPersist===void 0&&Pn(`v7_fetcherPersist`,`The persistence behavior of fetchers is changing in v7`,`https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist`),t.v7_normalizeFormMethod===void 0&&Pn(`v7_normalizeFormMethod`,"Casing of `formMethod` fields is being normalized to uppercase in v7",`https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod`),t.v7_partialHydration===void 0&&Pn(`v7_partialHydration`,"`RouterProvider` hydration behavior is changing in v7",`https://reactrouter.com/v6/upgrading/future#v7_partialhydration`),t.v7_skipActionErrorRevalidation===void 0&&Pn(`v7_skipActionErrorRevalidation`,"The revalidation behavior after 4xx/5xx `action` responses is changing in v7",`https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation`))}function cn(e){let{fallbackElement:t,router:n,future:r}=e,[i,a]=X.useState(n.state),{v7_startTransition:o}=r||{},s=X.useCallback(e=>{o&&Fn?Fn(()=>a(e)):a(e)},[a,o]);X.useLayoutEffect(()=>n.subscribe(s),[n,s]),X.useEffect(()=>{},[]);let c=X.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:e=>n.navigate(e),push:(e,t,r)=>n.navigate(e,{state:t,preventScrollReset:r?.preventScrollReset}),replace:(e,t,r)=>n.navigate(e,{replace:!0,state:t,preventScrollReset:r?.preventScrollReset})}
2),[n]),l=n.basename||`/`,u=X.useMemo(()=>({router:n,navigator:c,static:!1,basename:l}),[n,c,l]);return X.useEffect(()=>sn(r,n.future),[n,r]),X.createElement(X.Fragment,null,X.createElement(Sn.Provider,{value:u},X.createElement(Cn.Provider,{value:i},X.createElement(mn,{basename:l,location:i.location,navigationType:i.historyAction,navigator:c,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},i.initialized||n.future.v7_partialHydration?X.createElement(ln,{routes:n.routes,future:n.future,state:i}):t))),null)}function ln(e){let{routes:t,future:n,state:r}=e;return zt(t,void 0,r,n)}function un(e){let{basename:t,children:n,initialEntries:r,initialIndex:i,future:o}=e,s=X.useRef();s.current??=a({initialEntries:r,initialIndex:i,v5Compat:!0});let c=s.current,[l,u]=X.useState({action:c.action,location:c.location}),{v7_startTransition:d}=o||{},f=X.useCallback(e=>{d&&Fn?Fn(()=>u(e)):u(e)},[u,d]);return X.useLayoutEffect(()=>c.listen(f),[c,f]),X.useEffect(()=>sn(o),[o]),X.createElement(mn,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:c,future:o})}function dn(e){let{to:t,replace:n,state:r,relative:i}=e;!Y()&&o(!1);let{future:a,static:s}=X.useContext(Tn),{matches:c}=X.useContext(Z),{pathname:l}=Ot(),u=Mt(),d=A(t,k(c,a.v7_relativeSplatPath),l,i===`path`),f=JSON.stringify(d);return X.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:i}),[u,f,i,n,r]),null}function fn(e){return Ft(e.context)}function pn(e){o(!1)}function mn(e){let{basename:t=`/`,children:n=null,location:r,navigationType:i=B.Pop,navigator:a,static:s=!1,future:c}=e;Y()&&o(!1);let l=t.replace(/^\/*/,`/`),u=X.useMemo(()=>({basename:l,navigator:a,static:s,future:J({v7_relativeSplatPath:!1},c)}),[l,c,a,s]);typeof r==`string`&&(r=d(r));let{pathname:f=`/`,search:p=``,hash:m=``,state:h=null,key:g=`default`}=r,_=X.useMemo(()=>{let e=ee(f,l);return e==null?null:{location:{pathname:e,search:p,hash:m,state:h,key:g},navigationType:i}},[l,f,p,m,h,g,i]);return _==null?null:X.createElement(Tn.Provider,{value:u},X.createElement(En.Provider,{children:n,value:_}))}function hn(e){let{children:t,location:n}=e;return Rt(vn(t),n)}function gn(e){let{children:t,errorElement:n,resolve:r}=e;return X.createElement(Ln,{resolve:r,errorElement:n},X.createElement(_n,null,t))}function _n(e){let{children:t}=e,n=tn(),r=typeof t==`function`?t(n):t;return X.createElement(X.Fragment,null,r)}function vn(e,t){t===void 0&&(t=[]);let n=[];return X.Children.forEach(e,(e,r)=>{if(!X.isValidElement(e))return;let i=[...t,r];if(e.type===X.Fragment){n.push.apply(n,vn(e.props.children,i));return}e.type!==pn&&o(!1),!(!e.props.index||!e.props.children)&&o(!1);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=vn(e.props.children,i)),n.push(a)}),n}function yn(e){return Ht(e)}function bn(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:X.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:X.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:X.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function xn(e,t){return N({basename:t?.basename,future:J({},t?.future,{v7_prependBasename:!0}),history:a({initialEntries:t?.initialEntries,initialIndex:t?.initialIndex}),hydrationData:t?.hydrationData,routes:e,mapRouteProperties:bn,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation}).initialize()}var X,Sn,Cn,wn,Tn,En,Z,Dn,On,kn,An,jn,Q,Mn,Nn,Pn,Fn,$,In,Ln,Rn=e((()=>{X=t(r()),Tt(),Sn=X.createContext(null),Cn=X.createContext(null),wn=X.createContext(null),Tn=X.createContext(null),En=X.createContext(null),Z=X.createContext({outlet:null,matches:[],isDataRoute:!1}),Dn=X.createContext(null),On=X.createContext(null),kn=X.createElement(Bt,null),An=class extends X.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||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.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 this.state.error===void 0?this.props.children:X.createElement(Z.Provider,{value:this.props.routeContext},X.createElement(Dn.Provider,{value:this.state.error,children:this.props.component}))}},jn=function(e){return e.UseBlocker=`useBlocker`,e.UseRevalidator=`useRevalidator`,e.UseNavigateStable=`useNavigate`,e}(jn||{}),Q=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}(Q||{}),Mn=0,Nn={},Pn=(e,t,n)=>(``+t+("You can use the `"+e+"` future flag to opt-in early. ")+(`For more information, see `+n+`.`),void 0),Fn=X.startTransition,$=function(e){return e[e.pen
2ding=0]=`pending`,e[e.success=1]=`success`,e[e.error=2]=`error`,e}($||{}),In=new Promise(()=>{}),Ln=class extends X.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:e,errorElement:t,resolve:n}=this.props,r=null,i=$.pending;if(!(n instanceof Promise))i=$.success,r=Promise.resolve(),Object.defineProperty(r,`_tracked`,{get:()=>!0}),Object.defineProperty(r,`_data`,{get:()=>n});else if(this.state.error){i=$.error;let e=this.state.error;r=Promise.reject().catch(()=>{}),Object.defineProperty(r,`_tracked`,{get:()=>!0}),Object.defineProperty(r,`_error`,{get:()=>e})}else n._tracked?(r=n,i=`_error`in r?$.error:`_data`in r?$.success:$.pending):(i=$.pending,Object.defineProperty(n,`_tracked`,{get:()=>!0}),r=n.then(e=>Object.defineProperty(n,`_data`,{get:()=>e}),e=>Object.defineProperty(n,`_error`,{get:()=>e})));if(i===$.error&&r._error instanceof G)throw In;if(i===$.error&&!t)throw r._error;if(i===$.error)return X.createElement(wn.Provider,{value:r,children:t});if(i===$.success)return X.createElement(wn.Provider,{value:r,children:e});throw r}}}));export{Tt as _,pn as a,m as b,Et as c,Ot as d,Mt as f,u as g,Lt as h,Tn as i,Rn as l,It as m,Cn as n,hn as o,kt as p,dn as r,vn as s,Sn as t,Dt as u,o as v,ee as x,w as y};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.