vendor: 8,194 bytes, line 1
1var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e),f=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ee={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ee,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()}
1,e.version=`19.2.7`})),p=s(((e,t)=>{t.exports=f()})),m=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,h=/^[\\/]{2}/;function g(e,t){return t+e.replace(/\\/g,`/`)}var _=`popstate`;function v(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function y(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return w(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:T(t)}return D(t,n,null,e)}function b(e,t){if(e===!1||e==null)throw Error(t)}function x(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function S(){return Math.random().toString(36).substring(2,10)}function C(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function w(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?E(t):t,state:n,key:t&&t.key||r||S(),mask:i}}function T({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function E(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function D(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=v(e)?e:w(h.location,e,t);n&&n(r,e),l=u()+1;let d=C(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=v(e)?e:w(h.location,e,t);n&&n(r,e),l=u();let i=C(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return O(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(_,d),c=e,()=>{i.removeEventListener(_,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function O(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),b(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:T(t);return i=i.replace(/ $/,`%20`),!n&&h.test(i)&&(i=r+i),new URL(i,r)}var k=u(p(),1),A=class{#e=new Map;constructor(e){if(e)for(let[t,n]of e)this.set(t,n)}get(e){if(this.#e.has(e))return this.#e.get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){this.#e.set(e,t)}},j=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function M(e){return j.has(e)}var N=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function P(e){return N.has(e)}function F(e){return e.index===!0}function I(e){let t={};return e.Component&&Object.assign(t,{element:k.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:k.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:k.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function ee(e,t=I,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(b(e.index!==!0||!e.children,`Cannot specify children on an index route`),b(i||!r[s],`Found a route id collision on i
1d "${s}". Route id's must be globally unique within Data Router usages`),F(e)){let n={...e,id:s};return r[s]=te(n,t(n)),n}else{let n={...e,id:s,children:void 0};return r[s]=te(n,t(n)),e.children&&(n.children=ee(e.children,t,o,r,i)),n}})}function te(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function ne(e,t,n=`/`){return L(e,t,n,!1)}function L(e,t,n,r,i){let a=he((typeof t==`string`?E(t):t).pathname||`/`,n);if(a==null)return null;let o=i??R(e),s=null,c=me(a);for(let e=0;s==null&&e<o.length;++e)s=de(o[e],c,r);return s}function re(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,loaderData:t[n.id],handle:n.handle}}function R(e){let t=ie(e);return ae(t),t}function ie(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;b(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=G([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(b(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),ie(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:le(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=W(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of z(e.path))a(e,t,!0,n)}),t}function z(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=z(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 ae(e){e.sort((e,t)=>e.score===t.score?ue(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var oe=/^:[\w-]+$/,se=3,B=2,ce=1,V=10,H=-2,U=e=>e===`*`;function le(e,t){let n=e.split(`/`),r=n.length;return n.some(U)&&(r+=H),t&&(r+=B),n.filter(e=>!U(e)).reduce((e,t)=>e+(oe.test(t)?se:t===``?ce:V),r)}function ue(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 de(e,t,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={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?pe(u,l,s.matcher,s.compiledParams):fe(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=fe({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;
1Object.assign(i,d.params),o.push({params:i,pathname:G([a,d.pathname]),pathnameBase:Ee(G([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=G([a,d.pathnameBase]))}return o}function fe(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=W(e.path,e.caseSensitive,e.end);return pe(e,t,n,r)}function pe(e,t,n,r){let 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,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function W(e,t=!1,n=!0){x(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,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function me(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return x(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function he(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 ge({basename:e,pathname:t}){return t===`/`?e:G([e,t])}var _e=e=>m.test(e);function ve(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?E(e):e,a;return n?(n=we(n),a=n.startsWith(`/`)?ye(n.substring(1),`/`):ye(n,t)):a=t,{pathname:a,search:De(r),hash:Oe(i)}}function ye(e,t){let n=Te(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function be(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 xe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Se(e){let t=xe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ce(e,t,n,r=!1){let i;typeof e==`string`?i=E(e):(i={...e},b(!i.pathname||!i.pathname.includes(`?`),be(`?`,`pathname`,`search`,i)),b(!i.pathname||!i.pathname.includes(`#`),be(`#`,`pathname`,`hash`,i)),b(!i.search||!i.search.includes(`#`),be(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=ve(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var we=e=>e.replace(/[\\/]{2,}/g,`/`),G=e=>we(e.join(`/`)),Te=e=>e.replace(/\/+$/,``),Ee=e=>Te(e).replace(/^\/*/,`/`),De=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Oe=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,ke=class{type=`DataWithResponseInit`;data;init;constructor(e,t){this.data=e,this.init=t||null}};function K(e,t){return new ke(e,typeof t==`number`?{status:t}:t)}var q=(e,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,{...n,headers:r})},Ae=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],je=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Me(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ne(e){return G(e.map(e=>
1e.route.path).filter(Boolean))||`/`}var Pe=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function J(e,t){let n=e;if(typeof n!=`string`||!m.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Pe)try{let e=new URL(window.location.href),r=h.test(n)?new URL(g(n,e.protocol)):new URL(n),a=he(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{x(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var Y=Symbol(`Uninstrumented`);function Fe(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=Le(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=Le(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[Y]??i,a=Le(n[e],t,(...e)=>ze(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[Y]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[Y]??e,r=Le(n.middleware,t,(...e)=>ze(e[0]));return r?(r[Y]=t,r):e})),r}function Ie(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[Y]??e.navigate,r=Le(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?T(n):`.`,...Be(e,r??{})}});r&&(r[Y]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[Y]??e.fetch,r=Le(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...Be(e,i??{})}});r&&(r[Y]=t,e.fetch=r)}return e}function Le(e,t,n){return e.length===0?null:async(...r)=>{let i=await Re(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function Re(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=Re(e,t,n,r-1),a=await o,b(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(s,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await s(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function ze(e){let{request:t,context:n,params:r,pattern:i}=e;return{request:Ve(t),params:{...r},pattern:i,context:He(n)}}function Be(e,t){return{currentUrl:T(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function Ve(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function He(e){return{get:t=>e.get(t)}}var Ue=[`POST`,`PUT`,`PATCH`,`DELETE`],We=new Set(Ue),Ge=[`GET`,...Ue],Ke=new Set(Ge),qe=new Set([301,302,303,307,308]),Je=new Set([307,308]),Ye={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Xe={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ze={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},Qe=`remix-router-transitions`,$e=Symbol(`ResetLoaderData`),et=class{#e;#t;#n;#r;constructor(e){this.#e=e,this.#t=R(e)}get stableRoutes(){return this.#e}get activeRoutes(){return this.#n??this.#e}get branches(){return this.#r??this.#t}get hasHMRRoutes(){return this.#n!=null}setRoutes(e){this.#e=e,this.#t=R(e)}setHmrRoutes(e){this.#n=e,this.#r=R(e)}commitHmrRoutes(){this.#n&&(this.#e=this.#n,this.#t=this.#r,this.#n=void 0,this.#r=void 0)}};function tt(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;b(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties,a=i||(()=>({}));if(e.instrumentations){let t=e.instrumentations;a=e=>({...i?.(e),...Fe(t.map(e=>
1e.route).filter(Boolean),e)})}let o={},s=new et(ee(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||vt,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,v=L(s.activeRoutes,e.history.location,c,!1,s.branches),y=!1,S=null,C,T;if(v==null&&!e.patchRoutesOnNavigation){let t=X(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Ht(s.activeRoutes);C=!0,T=!C,v=n,S={[r.id]:t}}else if(v&&!e.hydrationData&&Qe(v,s.activeRoutes,e.history.location.pathname).active&&(v=null),!v){C=!1,T=!C,v=[];let t=Qe(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}else if(v.some(e=>e.route.lazy))C=!1,T=!C;else if(!v.some(e=>ot(e.route)))C=!0,T=!C;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=v;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}T=!1,C=!0,r.forEach(e=>{let r=st(e.route,t,n);T||=r.renderFallback,C&&=!r.shouldLoad})}let D,k={historyAction:e.history.action,location:e.history.location,matches:v,initialized:C,renderFallback:T,navigation:Ye,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||S,fetchers:new Map,blockers:new Map},j=`POP`,M=null,N=!1,P,F=!1,I=new Map,te=null,ne=!1,R=!1,ie=new Set,z=new Map,ae=0,oe=-1,se=new Map,B=new Set,ce=new Map,V=new Map,H=new Set,U=new Map,le,ue=null;function de(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(le){le(),le=void 0;return}x(U.size===0||r!=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 i=He({currentLocation:k.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{le=e});e.history.go(r*-1),Ve(i,{state:`blocked`,location:n,proceed(){Ve(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(k.blockers);e.set(i,Ze),W({blockers:e})}}),M?.resolve(),M=null;return}return ye(t,n)}),n){dn(t,I);let e=()=>fn(t,I);t.addEventListener(`pagehide`,e),te=()=>t.removeEventListener(`pagehide`,e)}return k.initialized||ye(`POP`,k.location,{initialHydration:!0}),D}function fe(){d&&d(),te&&te(),f.clear(),P&&P.abort(),k.fetchers.forEach((e,t)=>Ne(k.fetchers,t)),k.blockers.forEach((e,t)=>Be(t))}function pe(e){if(f.add(e),p){let{newErrors:t}=p;p=null,e(k,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>f.delete(e)}function W(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),k={...k,...e};let n=[],r=[];k.fetchers.forEach((e,t)=>{e.state===`idle`&&(H.has(t)?n.push(t):r.push(t))}),H.forEach(e=>{!k.fetchers.has(e)&&!z.has(e)&&n.push(e)}),f.size===0&&(p={newErrors:e.errors??null}),[...f].forEach(r=>r(k,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Ne(k.fetchers,e)),r.forEach(e=>k.fetchers.delete(e))}function me(t,n,{flushSync:r}={}){let i=k.actionData!=null&&k.navigation.formMethod!=null&&Q(k.navigation.formMethod)&&k.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?k.actionData:null;let o=n.loaderData?zt(k.loaderData,n.loaderData,n.matches||[],n.errors):k.loaderData,c=k.blockers;c.size>0&&(c=new Map(c),c.forEach((e,t)=>c.set(t,Ze)));let l=ne?!1:qe(t,n.matches||k.matches),u=N===!0||k.navigation.formMethod!=null&&Q(k.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),ne||j===`POP`||(j===`PUSH`?e.history.push(t,t.state):j===`REPLACE`&&e.history.replace(t,t.state));let d;if(j===`POP`){let e=I.get(k.location.pathname);e&&e.has(t.pathname)?d={currentLocation:k.location,nextLocation:t}:I.has(t.pathname)&&(d={currentLocation:t,nextLocation:k.location})}else if(F){let e=I.get(k.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),I.set(k.location.pathname,e)),d={currentLocation:k.location,nextLocation:t}}W({...n,actionData:a,loaderData:o,historyAction:j,location:t,initialized:!0,renderFallback:!1,navigation:Ye,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),j=`POP`,N=!1,F=!1,ne=!1,R=!1,M?.resolve(),M=null,ue?.resolve(),ue=null}async function ge(t,n){if(M?.resolve(),M=null,typeof t==`number`){M||=pn();let n=M.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=it(!1,rt(k.location,k.matches,c,t,n?.fromRouteId,n?.relative),n),o;n?.mask&&(o={pathname:``,search:``,hash:``,...typeof n.mask==`string`?E(n.mask):{...k.location.mask,...n.mask}});let s=k.location,l=w(s,r,n&&n.state,void 0,o);l={...l,...e.history.encodeLocation(l)};let u=n&&n.replace!=null?n.replace:void 0,d=`PUSH`;u===!0?d=`REPLACE`:u===!1||i!=null&&Q(i.formMethod)&&i.formAction===k.location.pathname+k.location.search&&(d=`REPLACE`);let f=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,p=(n&&n.flushSync)===!0,m=He({currentLocation:s,nextLocation:l,historyAction:d});if(m){Ve(m,{state:`blocked`,location:l,proceed(){Ve(m,{state:`proceeding`,proceed:void 0,reset:void 0,location:l}),ge(t,n)},reset(){let e=new Map(k.blockers);e.set(m,Ze),W({blockers:e})}});return}await ye(d,l,{submission:i,pendingError:a,preventScrollReset:f,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:p,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate})}function ve(){ue||=pn(),ke(),W({revalidation:`loading`});let e=ue.promise;return k.navigation.state===`submitting`?e:k.navigation.state===`idle`?(ye(k.historyAction,k.location,{startUninterruptedRevalidation:!0}
1),e):(ye(j||k.historyAction,k.navigation.location,{overrideNavigation:k.navigation,enableViewTransition:F===!0}),e)}async function ye(t,n,r){P&&P.abort(),P=null,j=t,ne=(r&&r.startUninterruptedRevalidation)===!0,Ke(k.location,k.matches),N=(r&&r.preventScrollReset)===!0,F=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&k.matches&&k.matches.length>0&&!y?k.matches:L(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&k.initialized&&!R&&Gt(k.location,n)&&!(r&&r.submission&&Q(r.submission.formMethod))){me(n,{matches:a},{flushSync:o});return}let l=Qe(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),!a){let{error:e,notFoundMatches:t,route:r}=Ue(n.pathname);me(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;P=new AbortController;let d=Nt(e.history,n,P.signal,r&&r.submission),f=e.getContext?await e.getContext():new A,p;if(r&&r.pendingError)p=[Vt(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Q(r.submission.formMethod)){let i=await be(d,n,r.submission,a,t,f,l.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:o});if(i.shortCircuited)return;if(i.pendingActionResult){let[e,t]=i.pendingActionResult;if(Z(t)&&Me(t.error)&&t.error.status===404){P=null,me(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=on(n,a,t,r.submission),o=!1,l.active=!1,d=Nt(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await xe(d,n,a,t,f,l.active,u,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,o,p,r&&r.callSiteDefaultShouldRevalidate);m||(P=null,me(n,{matches:h||a,...Bt(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function be(t,n,i,l,u,d,f,p,m={}){if(ke(),W({navigation:sn(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await $e(l,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Ht(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=Vt(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}else if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=Ue(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=rn(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:X(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await De(t,n,wt(a,o,t,n,l,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of l)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(Xt(h)){let n;return n=m&&m.replace!=null?m.replace:Mt(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===k.location.pathname+k.location.search,await Ee(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(Z(h)){let e=Vt(l,g.route.id);return(m&&m.replace)!==!0&&(j=`PUSH`),{matches:l,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:l,pendingActionResult:[g.route.id,h]}}async function xe(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||on(n,i,l,p),x=p||m||an(b),S=!ne&&!g;if(d){if(S){let e=Se(v);W({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await $e(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Ht(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=Vt(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=Ue(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:w,revalidatingFetchers:T}=at(t,u,a,o,e.history,k,i,x,n,g?[]:r,g===!0,R,ie,H,ce,B,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(oe=++ae,!e.dataStrategy&&!w.some(e=>e.shouldLoad)&&!w.some(e=>e.route.middleware&&e.route.middleware.length>0)&&T.length===0){let e=new Map(k.fetchers),t=Le(e);return me(n,{matches:i,loaderData:{},errors:v&&Z(v[1])?{[v[0]]:v[1].error}:null,...Bt(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=Se(v);t!==void 0&&(e.actionData=t)}T.length>0&&(e.fetchers=Ce(T)),W(e,{flushSync:_})}
1T.forEach(e=>{J(e.key),e.controller&&z.set(e.key,e.controller)});let E=()=>T.forEach(e=>J(e.key));P&&P.signal.addEventListener(`abort`,E);let{loaderResults:D,fetcherResults:O}=await Oe(w,T,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};P&&P.signal.removeEventListener(`abort`,E),T.forEach(e=>z.delete(e.key));let A=Ut(D);if(A)return await Ee(t,A.result,!0,{replace:h}),{shortCircuited:!0};if(A=Ut(O),A)return B.add(A.key),await Ee(t,A.result,!0,{replace:h}),{shortCircuited:!0};let j=new Map(k.fetchers),{loaderData:M,errors:N}=Rt(k,i,D,v,T,O,j);g&&k.errors&&(N={...k.errors,...N});let F=Le(j),I=Re(oe,j),ee=F||I||T.length>0;return{matches:i,loaderData:M,errors:N,...ee?{workingFetchers:j}:{}}}function Se(e){if(e&&!Z(e[1]))return{[e[0]]:e[1].data};if(k.actionData)return Object.keys(k.actionData).length===0?null:k.actionData}function Ce(e){let t=new Map(k.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=cn(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function we(t,n,r,i){J(t);let a=(i&&i.flushSync)===!0,o=s.activeRoutes,l=rt(k.location,k.matches,c,r,n,i?.relative),u=L(o,l,c,!1,s.branches),d=Qe(u,o,l);if(d.active&&d.matches&&(u=d.matches),!u){q(t,n,X(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=it(!0,l,i);if(m){q(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new A,g=(i&&i.preventScrollReset)===!0;if(p&&Q(p.formMethod)){await G(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate);return}ce.set(t,{routeId:n,path:f}),await Te(t,n,f,u,h,d.active,a,g,p)}async function G(t,n,i,l,u,d,f,p,m,h){ke(),ce.delete(t),K(t,ln(m,k.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=Nt(e.history,i,g.signal,m);if(d){let e=await $e(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){q(t,n,e.error,{flushSync:f});return}else if(e.matches)l=e.matches;else{q(t,n,X(404,{pathname:i}),{flushSync:f});return}}let v=rn(l,i);if(!v.route.action&&!v.route.lazy){q(t,n,X(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}z.set(t,g);let y=ae,x=wt(a,o,_,i,l,v,r,u),S=await De(_,i,x,u,t),C=S[v.route.id];if(!C){for(let e of x)if(S[e.route.id]){C=S[e.route.id];break}}if(_.signal.aborted){z.get(t)===g&&z.delete(t);return}if(H.has(t)){if(Xt(C)||Z(C)){K(t,un(void 0));return}}else{if(Xt(C))if(z.delete(t),oe>y){K(t,un(void 0));return}else return B.add(t),K(t,cn(m)),Ee(_,C,!1,{fetcherSubmission:m,preventScrollReset:p});if(Z(C)){q(t,n,C.error);return}}let w=k.navigation.location||k.location,T=Nt(e.history,w,g.signal),E=s.activeRoutes,D=k.navigation.state===`idle`?k.matches:L(E,k.navigation.location,c,!1,s.branches);b(D,`Didn't find any matches after fetcher action`);let O=++ae;se.set(t,O);let{dsMatches:A,revalidatingFetchers:M}=at(T,u,a,o,e.history,k,D,m,w,r,!1,R,ie,H,ce,B,E,c,e.patchRoutesOnNavigation!=null,s.branches,[v.route.id,C],h),N=cn(m,C.data),F=new Map(k.fetchers);F.set(t,N),M.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=F.get(t),r=cn(void 0,n?n.data:void 0);F.set(t,r),J(t),e.controller&&z.set(t,e.controller)}),W({fetchers:F});let I=()=>M.forEach(e=>J(e.key));g.signal.addEventListener(`abort`,I);let{loaderResults:ee,fetcherResults:te}=await Oe(A,M,T,w,u);if(g.signal.aborted)return;g.signal.removeEventListener(`abort`,I),se.delete(t),z.delete(t),M.forEach(e=>z.delete(e.key));let ne=k.fetchers.has(t),re=e=>{if(!ne)return e;let n=new Map(e.fetchers);return n.set(t,un(C.data)),{...e,fetchers:n}},V=Ut(ee);if(V)return k=re(k),Ee(T,V.result,!1,{preventScrollReset:p});if(V=Ut(te),V)return B.add(V.key),k=re(k),Ee(T,V.result,!1,{preventScrollReset:p});let U=new Map(k.fetchers);ne&&U.set(t,un(C.data));let{loaderData:le,errors:ue}=Rt(k,D,ee,void 0,M,te,U);Re(O,U),k.navigation.state===`loading`&&O>oe?(b(j,`Expected pending action`),P&&P.abort(),me(k.navigation.location,{matches:D,loaderData:le,errors:ue,fetchers:U})):(W({errors:ue,loaderData:zt(k.loaderData,le,D,ue),fetchers:U}),R=!1)}async function Te(t,n,i,s,c,l,u,d,f){let p=k.fetchers.get(t);K(t,cn(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=Nt(e.history,i,m.signal);if(l){let e=await $e(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){q(t,n,e.error,{flushSync:u});return}else if(e.matches)s=e.matches;else{q(t,n,X(404,{pathname:i}),{flushSync:u});return}}let g=rn(s,i);z.set(t,m);let _=ae,v=await De(h,i,wt(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(z.get(t)===m&&z.delete(t),!h.signal.aborted){if(H.has(t)){K(t,un(void 0));return}if(Xt(y))if(oe>_){K(t,un(void 0));return}else{B.add(t),await Ee(h,y,!1,{preventScrollReset:d});return}if(Z(y)){q(t,n,y.error);return}K(t,un(y.data))}}async function Ee(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(M?.resolve(),M=null),i.response.headers.has(`X-Remix-Revalidate`)&&(R=!0);let d=i.response.headers.get(`Location`);b(d,`Expected a Location header on the redirect Response`),d=Mt(d,new URL(r.url),c,e.history);let f=w(k.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(_e(d)){let n=O(t,d,!0);e=n.origin!==t.location.origin||he(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}P=null;let p=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:m,formAction:h,formEncType:g}=k.navigation;!o&&!s&&m&&h&&g&&(o=an(k.navigation));let _=o||s;Je.has(i.response.status)&&_&&Q(_.formMethod)?await ye(p,f,{submission:{..._,formAction:d},preventScrollReset:l||N,enableViewTransition:a?F:void 0}):await ye(p,f,{overrideNavigation:on(f,[],p,o),fetcherSubmission:s,preventScrollReset:l||N,enableViewTransition:a?F:void 0})}async function De(e,t,n,r,i){let a,o={};try{a=await Tt(l,e,t,n,i,r,!1)}catch(e){return n.filter(e=>
1e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!Q(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!k.loaderData.hasOwnProperty(e.route.id)&&(!k.errors||!k.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(Yt(r)){let i=r.result;o[t]={type:`redirect`,response:kt(i,e,t,n,c)}}else o[t]=await Ot(r);return o}async function Oe(e,t,n,r,i){let a=De(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await De(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}else return Promise.resolve({[e.key]:{type:`error`,error:X(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function ke(){R=!0,ce.forEach((e,t)=>{z.has(t)&&ie.add(t),J(t)})}function K(e,t,n={}){let r=new Map(k.fetchers);r.set(e,t),W({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function q(e,t,n,r={}){let i=Vt(k.matches,t),a=new Map(k.fetchers);Ne(a,e),W({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Ae(e){return V.set(e,(V.get(e)||0)+1),H.has(e)&&H.delete(e),k.fetchers.get(e)||Xe}function je(e,t){J(e,t?.reason),K(e,un(null))}function Ne(e,t){let n=k.fetchers.get(t);z.has(t)&&!(n&&n.state===`loading`&&se.has(t))&&J(t),ce.delete(t),se.delete(t),B.delete(t),H.delete(t),ie.delete(t),e.delete(t)}function Pe(e){let t=(V.get(e)||0)-1;t<=0?(V.delete(e),H.add(e)):V.set(e,t),W({fetchers:new Map(k.fetchers)})}function J(e,t){let n=z.get(e);n&&(n.abort(t),z.delete(e))}function Y(e,t){for(let n of e){let e=t.get(n);b(e,`Expected fetcher: ${n}`);let r=un(e.data);t.set(n,r)}}function Le(e){let t=[],n=!1;for(let r of B){let i=e.get(r);b(i,`Expected fetcher: ${r}`),i.state===`loading`&&(B.delete(r),t.push(r),n=!0)}return Y(t,e),n}function Re(e,t){let n=[];for(let[r,i]of se)if(i<e){let e=t.get(r);b(e,`Expected fetcher: ${r}`),e.state===`loading`&&(J(r),se.delete(r),n.push(r))}return Y(n,t),n.length>0}function ze(e,t){let n=k.blockers.get(e)||Ze;return U.get(e)!==t&&U.set(e,t),n}function Be(e){k.blockers.delete(e),U.delete(e)}function Ve(e,t){let n=k.blockers.get(e)||Ze;b(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),W({blockers:r})}function He({currentLocation:e,nextLocation:t,historyAction:n}){if(U.size===0)return;U.size>1&&x(!1,`A router only supports one blocker at a time`);let r=Array.from(U.entries()),[i,a]=r[r.length-1],o=k.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function Ue(e){let t=X(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=Ht(n);return{notFoundMatches:r,route:i,error:t}}function We(e,t,n){if(m=e,g=t,h=n||null,!_&&k.navigation===Ye){_=!0;let e=qe(k.location,k.matches);e!=null&&W({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function Ge(e,t){return h&&h(e,t.map(e=>re(e,k.loaderData)))||e.key}function Ke(e,t){if(m&&g){let n=Ge(e,t);m[n]=g()}}function qe(e,t){if(m){let n=Ge(e,t),r=m[n];if(typeof r==`number`)return r}return null}function Qe(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:L(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:L(n,r,c,!0,e)}}return{active:!1,matches:null}}async function $e(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let l=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:i,patch:(e,n)=>{r.aborted||dt(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}if(r.aborted)return{type:`aborted`};let u=s.branches,d=L(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=L(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&tt(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=L(s.activeRoutes,n,c,!0,u),!f||tt(l,f))return{type:`success`,matches:null};l=f}}function tt(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function nt(e){o={},s.setHmrRoutes(ee(e,a,void 0,o))}function ct(e,t,n=!1){dt(e,t,s,o,a,n),s.hasHMRRoutes||W({})}return D={get basename(){return c},get future(){return u},get state(){return k},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:de,subscribe:pe,enableScrollRestoration:We,navigate:ge,fetch:we,revalidate:ve,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ae,resetFetcher:je,deleteFetcher:Pe,dispose:fe,getBlocker:ze,deleteBlocker:Be,patchRoutes:ct,_internalFetchControllers:z,_internalSetRoutes:nt,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){W(e)}},e.instrumentations&&(D=Ie(D,e.instrumentations.map(e=>
1e.router).filter(Boolean))),D}function nt(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function rt(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=Ce(r||`.`,Se(o),he(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=nn(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=ge({basename:n,pathname:c.pathname})),T(c)}function it(e,t,n){if(!n||!nt(n))return{path:t};if(n.formMethod&&!tn(n.formMethod))return{path:t,error:X(405,{method:n.formMethod})};let r=()=>({path:t,error:X(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=Wt(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Q(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}\n`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}else if(n.formEncType===`application/json`){if(!Q(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}b(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=Ft(n.formData),s=n.formData;else if(n.body instanceof FormData)o=Ft(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=It(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=It(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(Q(c.formMethod))return{path:t,submission:c};let l=E(t);return e&&l.search&&nn(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:T(l),submission:c}}function at(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?Z(b[1])?b[1].error:b[1].data:void 0,C=i.createURL(a.location),w=i.createURL(c),T;if(u&&a.errors){let e=Object.keys(a.errors)[0];T=o.findIndex(t=>t.route.id===e)}else if(b&&Z(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let E=b?b[1].statusCode:void 0,D=E&&E>=400,O={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},k=Ne(o),A=o.map((i,o)=>{let{route:s}=i,f=null;if(T!=null&&o>T)f=!1;else if(s.lazy)f=!0;else if(!ot(s))f=!1;else if(u){let{shouldLoad:e}=st(s,a.loaderData,a.errors);f=e}else ct(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return Ct(n,r,e,c,k,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:D?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?lt(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p};return Ct(n,r,e,c,k,i,l,t,ut(i,m),m,x)}),j=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,b=L(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;j.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let S=rn(b,e.path),C=new AbortController,w=Nt(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=wt(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=wt(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:D?!1:d;let a={...O,defaultShouldRevalidate:i};ut(S,a)&&(T=wt(n,r,w,e.path,b,S,l,t,a))}T&&j.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:A,revalidatingFetchers:j}}function ot(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function st(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!ot(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function ct(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function lt(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function ut(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function dt(e,t,n,r,i,a){let o;if(e){let t=r[e];b(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];
1if(t.forEach(e=>{let t=o.find(t=>ft(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=ee(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=ee([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function ft(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=>ft(e,t)))??!1:!1}var pt=new WeakMap,mt=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(b(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=pt.get(i);o||(o={},pt.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=M(e),n=i[e]!==void 0;if(t)x(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)x(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},ht=new WeakMap;function gt(e,t,n,r,i){let a=n[e.id];if(b(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=ht.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{b(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=P(e),o=a[e]!==void 0;i?x(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?x(!o,`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.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return ht.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=mt({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function _t(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function vt(e){return e.matches.some(e=>e.route.middleware)?yt(e,()=>_t(e)):_t(e)}function yt(e,t){return bt(e,t,e=>{if(en(e))throw e;return e},qt,n);async function n(t,n,r){if(r)return Object.assign(r.value,{[n]:{type:`error`,result:t}});{let{matches:r}=e,i=Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0)),a=r[i].route.id;for(let e of r.slice(0,i+1))try{await e._lazyPromises?.route}catch{a=e.route.id;break}return{[Vt(r,a).route.id]:{type:`error`,result:t}}}}}async function bt(e,t,n,r,i){let{matches:a,...o}=e;return await xt(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function xt(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await xt(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function St(e,t,n,r,i){let a=mt({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=gt(r.route,Q(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Ct(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=St(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?ut(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?ut(a,{...l,defaultShouldRevalidate:e}):ut(a,l):c}
1,resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!Q(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(Q(n.method)||!p)?Et({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function wt(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?Ct(e,t,n,r,Ne(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:St(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function Tt(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:Pt(t,n),pattern:Ne(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return yt(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function Et({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=Q(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:Pt(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a)if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw X(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}else if(t)c=await f(t);else{let t=new URL(e.url);throw X(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function Dt(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function Ot(e){let{result:t,type:n}=e;if(Qt(t)){let e;try{e=await Dt(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new je(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?Zt(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:Kt(t),statusCode:Me(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Me(t)?t.status:void 0}:Zt(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function kt(e,t,n,r,i){let a=e.headers.get(`Location`);if(b(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!_e(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=rt(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var At=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function jt(e){try{return At.includes(new URL(e).protocol)}catch{return!1}}function Mt(e,t,n,r){if(_e(e)){let r=e,i=h.test(r)?new URL(g(r,t.protocol)):new URL(r);if(jt(i.toString()))throw Error(`Invalid redirect location`);let a=he(i.pathname,n)!=null;if(i.origin===t.origin&&a)return we(i.pathname)+i.search+i.hash}try{if(jt(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function Nt(e,t,n,r){let i=e.createURL(Wt(t)).toString(),a={signal:n};if(r&&Q(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=Ft(r.formData):a.body=r.formData}
1return new Request(i,a)}function Pt(e,t){let n=new URL(e.url),r=typeof t==`string`?E(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);let i=e.toString();n.search=i?`?${i}`:``}else n.search=``;return n.hash=r.hash||``,n}function Ft(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function It(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Lt(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&Z(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(b(!Xt(f),`Cannot handle redirect results in processLoaderData`),Z(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=Vt(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=$e),c||(c=!0,s=Me(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function Rt(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=Lt(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(b(s,`Did not find corresponding fetcher result`),Z(s)){let t=Vt(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(Xt(s))b(!1,`Unhandled fetcher revalidation redirect`);else{let e=un(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function zt(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==$e).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function Bt(e){return e?Z(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Vt(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.ErrorBoundary!=null||e.route.errorElement!=null)||e[0]}function Ht(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 X(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new je(e||500,o,Error(s),!0)}function Ut(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(Xt(r))return{key:n,result:r}}}function Wt(e){return T({...typeof e==`string`?E(e):e,hash:``})}function Gt(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash?!0:t.hash!==``}function Kt(e){return new je(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function qt(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&Jt(t))}function Jt(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function Yt(e){return Qt(e.result)&&qe.has(e.result.status)}function Z(e){return e.type===`error`}function Xt(e){return(e&&e.type)===`redirect`}function Zt(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function Qt(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function $t(e){return qe.has(e)}function en(e){return Qt(e)&&$t(e.status)&&e.headers.has(`Location`)}function tn(e){return Ke.has(e.toUpperCase())}function Q(e){return We.has(e.toUpperCase())}function nn(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function rn(e,t){let n=typeof t==`string`?E(t).search:t.search;if(e[e.length-1].route.index&&nn(n||``))return e[e.length-1];let r=xe(e);return r[r.length-1]}function an(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 on(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function sn(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function cn(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 ln(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 un(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 dn(e,t){try{let n=e.sessionStorage.getItem(Qe);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 fn(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Qe,JSON.stringify(n))}catch(e){x(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function pn(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var mn=k.createContext(null);mn.displayName=`DataRouter`;var hn=k.createContext(null);hn.displayName=`DataRouterState`;var gn=k.createContext(!1);function _n(){return k.useContext(gn)}var vn=k.createContext({isTransitioning:!1});vn.displayName=`ViewTransition`;var yn=k.createContext(new Map);yn.displayName=`Fetchers`;var bn=k.createContext(null);bn.displayName=`Await`;var xn=k.createContext(null);xn.displayName=`Navigation`;var Sn=k.createContext(null);Sn.displayName=`Location`;var $=k.createContext({outlet:null,matches:[],isDataRoute:!1});$.displayName=`Route`;var Cn=k.createContext(null);Cn.displayName=`RouteError`;var wn=`REACT_ROUTER_ERROR`,Tn=`REDIRECT`,En=`ROUTE_ERROR_RESPONSE`;function Dn(e){if(e.startsWith(`${wn}:${Tn}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function On(e){if(e.startsWith(`${wn}:${En}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new je(t.status,t.statusText,t.data)}catch{}}function kn(e,{relative:t}={}){b(An(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=k.useContext(xn),{hash:i,pathname:a,search:o}=Rn(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:G([n,a])),r.createHref({pathname:s,search:o,hash:i})}function An(){return k.useContext(Sn)!=null}
1function jn(){return b(An(),`useLocation() may be used only in the context of a <Router> component.`),k.useContext(Sn).location}var Mn=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Nn(){let{isDataRoute:e}=k.useContext($);return e?ar():Pn()}function Pn(){b(An(),`useNavigate() may be used only in the context of a <Router> component.`);let e=k.useContext(mn),{basename:t,navigator:n}=k.useContext(xn),{matches:r}=k.useContext($),{pathname:i}=jn(),a=JSON.stringify(Se(r)),o=k.useRef(!1);return k.useLayoutEffect(()=>{o.current=!0}),k.useCallback((r,s={})=>{if(x(o.current,Mn),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Ce(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:G([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var Fn=k.createContext(null);function In(e){let t=k.useContext($).outlet;return k.useMemo(()=>t&&k.createElement(Fn.Provider,{value:e},t),[t,e])}function Ln(){let{matches:e}=k.useContext($);return e[e.length-1]?.params??{}}function Rn(e,{relative:t}={}){let{matches:n}=k.useContext($),{pathname:r}=jn(),i=JSON.stringify(Se(n));return k.useMemo(()=>Ce(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function zn(e,t,n){b(An(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=k.useContext(xn),{matches:i}=k.useContext($),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=jn(),l;if(t){let e=typeof t==`string`?E(t):t;b(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):ne(e,{pathname:d}),p=Kn(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:G([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:G([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?k.createElement(Sn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function Bn(){let e=ir(),t=Me(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return k.createElement(k.Fragment,null,k.createElement(`h2`,null,`Unexpected Application Error!`),k.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?k.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var Vn=k.createElement(Bn,null),Hn=class extends k.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=gn;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){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=On(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:k.createElement($.Provider,{value:this.props.routeContext},k.createElement(Cn.Provider,{value:e,children:this.props.component}));return this.context?k.createElement(Wn,{error:e},t):t}},Un=new WeakMap;function Wn({children:e,error:t}){let{basename:n}=k.useContext(xn);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Dn(t.digest);if(e){let r=Un.get(t);if(r)throw r;let i=J(e.location,n),a=i.absoluteURL||i.to;
1if(jt(a))throw Error(`Invalid redirect location`);if(Pe&&!Un.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Un.set(t,n),n}return k.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function Gn({routeContext:e,match:t,children:n}){let r=k.useContext(mn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),k.createElement($.Provider,{value:e},n)}function Kn(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);b(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Ne(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||Vn,o&&(s<0&&c===0?(sr(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?k.createElement(n.route.Component,null):n.route.element?n.route.element:e,k.createElement(Gn,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?k.createElement(Hn,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function qn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Jn(e){let t=k.useContext(mn);return b(t,qn(e)),t}function Yn(e){let t=k.useContext(hn);return b(t,qn(e)),t}function Xn(e){let t=k.useContext($);return b(t,qn(e)),t}function Zn(e){let t=Xn(e),n=t.matches[t.matches.length-1];return b(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Qn(){return Zn(`useRouteId`)}function $n(){let e=Yn(`useNavigation`);return k.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function er(){let{matches:e,loaderData:t}=Yn(`useMatches`);return k.useMemo(()=>e.map(e=>re(e,t)),[e,t])}function tr(){let e=Yn(`useLoaderData`),t=Zn(`useLoaderData`);return e.loaderData[t]}function nr(e){return Yn(`useRouteLoaderData`).loaderData[e]}function rr(){let e=Yn(`useActionData`),t=Zn(`useLoaderData`);return e.actionData?e.actionData[t]:void 0}function ir(){let e=k.useContext(Cn),t=Yn(`useRouteError`),n=Zn(`useRouteError`);return e===void 0?t.errors?.[n]:e}function ar(){let{router:e}=Jn(`useNavigate`),t=Zn(`useNavigate`),n=k.useRef(!1);return k.useLayoutEffect(()=>{n.current=!0}),k.useCallback(async(r,i={})=>{x(n.current,Mn),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var or={};function sr(e,t,n){!t&&!or[e]&&(or[e]=!0,x(!1,n))}var cr={};function lr(e,t){!e&&!cr[t]&&(cr[t]=!0,console.warn(t))}var ur=[`HydrateFallback`,`hydrateFallbackElement`],dr=class{status=`pending`;promise;resolve;reject;
1constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function fr({router:e,flushSync:t,onError:n,useTransitions:r}){r=_n()||r;let[i,a]=k.useState(e.state),[o,s]=(0,k.useOptimistic)(i),[c,l]=k.useState(),[u,d]=k.useState({isTransitioning:!1}),[f,p]=k.useState(),[m,h]=k.useState(),[g,_]=k.useState(),v=k.useRef(new Map),y=k.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:g})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:Ne(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&v.current.set(t,e.data)}),o.forEach(e=>v.current.delete(e)),lr(u===!1||t!=null,'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=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(lr(g==null||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."),!g||!y){t&&u?t(()=>a(i)):r===!1?a(i):k.startTransition(()=>{r===!0&&s(e=>pr(e,i)),a(i)});return}if(t&&u){t(()=>{m&&(f?.resolve(),m.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:g.currentLocation,nextLocation:g.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})})}),t(()=>h(n));return}m?(f?.resolve(),m.skipTransition(),_({state:i,currentLocation:g.currentLocation,nextLocation:g.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}))},[e.window,t,m,f,r,s,n]);k.useLayoutEffect(()=>e.subscribe(y),[e,y]),k.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new dr)},[u]),k.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):k.startTransition(()=>{r===!0&&s(e=>pr(e,t)),a(t)}),await n});i.finished.finally(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})}),h(i)}},[c,f,e.window,r,s]),k.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),k.useEffect(()=>{!u.isTransitioning&&g&&(l(g.state),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),_(void 0))},[u.isTransitioning,g]);let b=k.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),x=e.basename||`/`,S=k.useMemo(()=>({router:e,navigator:b,static:!1,basename:x,onError:n}),[e,b,x,n]);return k.createElement(k.Fragment,null,k.createElement(mn.Provider,{value:S},k.createElement(hn.Provider,{value:o},k.createElement(yn.Provider,{value:v.current},k.createElement(vn.Provider,{value:u},k.createElement(_r,{basename:x,location:o.location,navigationType:o.historyAction,navigator:b,useTransitions:r},k.createElement(mr,{routes:e.routes,manifest:e.manifest,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function pr(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var mr=k.memo(hr);function hr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return zn(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function gr(e){return In(e.context)}function _r({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){b(!An(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=k.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=E(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=k.useMemo(()=>{let e=he(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);
1return x(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:k.createElement(xn.Provider,{value:c},k.createElement(Sn.Provider,{children:t,value:h}))}k.Component;function vr(){return{params:Ln(),loaderData:tr(),actionData:rr(),matches:er()}}function yr(e){return function(){let t=vr();return k.createElement(e,t)}}export{u as $,Ae as A,q as B,vn as C,Zt as D,tt as E,G as F,b as G,he as H,fe as I,p as J,x as K,ne as L,K as M,I as N,Qt as O,Me as P,d as Q,L as R,$ as S,Xe as T,y as U,Ce as V,T as W,o as X,s as Y,c as Z,nr as _,yr as a,yn as b,jn as c,$n as d,In as f,Qn as g,ir as h,ur as i,W as j,je as k,er as l,Rn as m,_r as n,lr as o,Ln as p,m as q,fr as r,kn as s,gr as t,Nn as u,mn as v,_n as w,xn as x,hn as y,J as z};
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.