1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="09ae2af1-0d94-5851-aa56-956f0dc23e5e")}catch(e){}}(); 3(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`5d6e2a6dc100e27104c4f4f9ae908d50e0e81b8a`}}catch{}})();var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},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,o)=>(o=n==null?{}:e(i(n)),l(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,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.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.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`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(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 P(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,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=P(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(N(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 F(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function I(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var ee=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)};function L(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;
3try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,ee)}catch(e){ee(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function R(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else L(R.bind(null,e))}var z={map:F,forEach:function(e,t,n){F(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return F(e,function(){t++}),t},toArray:function(e){return F(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=z,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=R,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=_({},e.props),i=e.key;
3if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.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 D(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)E.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 D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:I}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=L,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),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)=>
3{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 id "${s}". Route id's must be globally unique within Data Router usages`),F(e)){let n={...e,id:s};return r[s]=L(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=L(n,t(n)),e.children&&(n.children=ee(e.children,t,o,r,i)),n}})}function L(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function R(e,t,n=`/`){return z(e,t,n,!1)}function z(e,t,n,r,i){let a=ge((typeof t==`string`?E(t):t).pathname||`/`,n);if(a==null)return null;let o=i??B(e),s=null,c=he(a);for(let e=0;s==null&&e<o.length;++e)s=fe(o[e],c,r);return s}function te(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 B(e){let t=V(e);return re(t),t}function V(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=K([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}".`),V(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:ue(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=G(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 ne(e.path))a(e,t,!0,n)}),t}function ne(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=ne(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 re(e){e.sort((e,t)=>e.score===t.score?de(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var H=/^:[\w-]+$/,ie=/^:[\w-]+/,ae=3.5,oe=3,se=2,ce=1,le=10,U=-2,W=e=>e===`*`;function ue(e,t){let n=e.split(`/`),r=n.length;return n.some(W)&&(r+=U),t&&(r+=se),n.filter(e=>!W(e)).reduce((e,t)=>e+(H.test(t)?oe:ie.test(t)?ae:t===``?ce:le),r)}function de(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 fe(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?me(u,l,s.matcher,s.compiledParams):pe(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=pe({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;
3Object.assign(i,d.params),o.push({params:i,pathname:K([a,d.pathname]),pathnameBase:De(K([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=K([a,d.pathnameBase]))}return o}function pe(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=G(e.path,e.caseSensitive,e.end);return me(e,t,n,r)}function me(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=Ee(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=Ee(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function G(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)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function he(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 ge(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 _e({basename:e,pathname:t}){return t===`/`?e:K([e,t])}var ve=e=>m.test(e);function ye(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?E(e):e,a;return n?(n=Te(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?be(n.substring(1),`/`):be(n,t)):a=t,{pathname:a,search:Oe(r),hash:ke(i)}}function be(e,t){let n=Ee(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function xe(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 Se(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ce(e){let t=Se(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function we(e,t,n,r=!1){let i;typeof e==`string`?i=E(e):(i={...e},b(!i.pathname||!i.pathname.includes(`?`),xe(`?`,`pathname`,`search`,i)),b(!i.pathname||!i.pathname.includes(`#`),xe(`#`,`pathname`,`hash`,i)),b(!i.search||!i.search.includes(`#`),xe(`#`,`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=ye(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Te=e=>e.replace(/[\\/]{2,}/g,`/`),K=e=>Te(e.join(`/`));function Ee(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var De=e=>Ee(e).replace(/^\/*/,`/`),Oe=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,ke=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Ae=class{type=`DataWithResponseInit`;data;init;constructor(e,t){this.data=e,this.init=t||null}};function je(e,t){return new Ae(e,typeof t==`number`?{status:t}:t)}var Me=(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})},Ne=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],Pe=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 Fe(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ie(e){return K(e.map(e=>
3e.route.path).filter(Boolean))||`/`}function Le(e,t){let n=new URL(typeof e==`string`||e instanceof URL?e: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}var q=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Re(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(q)try{let e=new URL(window.location.href),r=h.test(n)?new URL(g(n,e.protocol)):new URL(n),a=ge(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 ze=Symbol(`Uninstrumented`),Be=new WeakMap;function Ve(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){e.lazy!=null&&n.lazy.push(e.lazy),e[`lazy.loader`]!=null&&n[`lazy.loader`].push(e[`lazy.loader`]),e[`lazy.action`]!=null&&n[`lazy.action`].push(e[`lazy.action`]),e[`lazy.middleware`]!=null&&n[`lazy.middleware`].push(e[`lazy.middleware`]),e.middleware!=null&&n.middleware.push(e.middleware),e.loader!=null&&n.loader.push(e.loader),e.action!=null&&n.action.push(e.action)}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=t.lazy;r.lazy=async(...t)=>J(await Y(n.lazy,void 0,()=>e(...t),qe))}if(typeof t.lazy==`object`){let e=t.lazy;if(typeof e.middleware==`function`&&n[`lazy.middleware`].length>0){let t=e.middleware;r.lazy=Object.assign(r.lazy||{},{middleware:async(...e)=>J(await Y(n[`lazy.middleware`],void 0,()=>t(...e),qe))})}if(typeof e.loader==`function`&&n[`lazy.loader`].length>0){let t=e.loader;r.lazy=Object.assign(r.lazy||{},{loader:async(...e)=>J(await Y(n[`lazy.loader`],void 0,()=>t(...e),qe))})}if(typeof e.action==`function`&&n[`lazy.action`].length>0){let t=e.action;r.lazy=Object.assign(r.lazy||{},{action:async(...e)=>J(await Y(n[`lazy.action`],void 0,()=>t(...e),qe))})}}if(typeof t.loader==`function`&&n.loader.length>0){let e=Ue(t.loader),i=async(...t)=>J(await Y(n.loader,Je(t[0]),()=>e(...t),qe));e.hydrate===!0&&(i.hydrate=!0),We(i,e),r.loader=i}if(typeof t.action==`function`&&n.action.length>0){let e=Ue(t.action),i=async(...t)=>J(await Y(n.action,Je(t[0]),()=>e(...t),qe));We(i,e),r.action=i}return t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=Ue(e),r=async(...e)=>J(await Y(n.middleware,Je(e[0]),()=>t(...e),qe));return We(r,t),r})),r}function He(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){e.navigate!=null&&n.navigate.push(e.navigate),e.fetch!=null&&n.fetch.push(e.fetch)}})),n.navigate.length>0){let t=Ue(e.navigate),r=async(...r)=>{let[i,a]=r,o,s={to:typeof i==`number`||typeof i==`string`?i:i?T(i):`.`,...Ye(e,a??{})};return J(await Y(n.navigate,s,async()=>{if(typeof i==`number`)return await t(...r);let n=Ge(e,e=>{o=e});try{return await t(...r)}finally{n()}},e=>({...qe(e),meta:o})))};We(r,t),e.navigate=r}if(n.fetch.length>0){let t=Ue(e.fetch),r=async(...r)=>{let[i,a,o,s]=r,c;return J(await Y(n.fetch,{href:o??`.`,fetcherKey:i,...Ye(e,s??{})},async()=>{let n=Ge(e,e=>{c=e});try{return await t(...r)}finally{n()}},e=>({...qe(e),meta:c})))};We(r,t),e.fetch=r}return e}function Ue(e){return e[ze]??e}function We(e,t){e[ze]=t}function Ge(e,t){return Be.set(e,t),()=>{Be.get(e)===t&&Be.delete(e)}}function Ke(e){let t=Be.get(e);return Be.delete(e),t}function J(e){if(e.type===`error`)throw e.value;return e.value}async function Y(e,t,n,r,i={result:null,innerResult:null},a=e.length-1){let o=e[a];if(o){let s,c=async()=>(s?console.error(`You cannot call instrumented handlers more than once`):s=Y(e,t,n,r,i,a-1),await s,b(i.innerResult,`Expected an inner result`),i.innerResult);try{await o(c,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}s||await c(),await s}else{try{i.result={type:`success`,value:await n()}}catch(e){i.result={type:`error`,value:e}}i.innerResult=r(i.result,t)}return i.result?i.result:(i.result={type:`error`,value:Error(`No result assigned in instrumentation chain.`)},i.innerResult=r(i.result,t),i.result)}function qe(e){return e.type===`error`&&e.value instanceof Error?{status:`error`,error:e.value}:{status:`success`,error:void 0}}function Je(e){let{request:t,context:n,params:r}=e;return{...e,request:Xe(t),params:{...r},context:Ze(n)}}function Ye(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 Xe(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Ze(e){return{get:t=>e.get(t)}}
3var Qe=new URL(`http://localhost`);function $e(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),Qe)}catch{return Qe}}function et(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function tt(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function nt(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!et(i,n),s=!et(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!tt(e,i)||!et(i,a)))throw Error(`External navigation is not allowed`)}var rt=[`POST`,`PUT`,`PATCH`,`DELETE`],it=new Set(rt),at=[`GET`,...rt],ot=new Set(at),st=new Set([301,302,303,307,308]),ct=new Set([307,308]),lt={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},ut={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},dt={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},ft=`remix-router-transitions`,pt=Symbol(`ResetLoaderData`),mt=class{#e;#t;#n;#r;constructor(e){this.#e=e,this.#t=B(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=B(e)}setHmrRoutes(e){this.#n=e,this.#r=B(e)}commitHmrRoutes(){this.#n&&(this.#e=this.#n,this.#t=this.#r,this.#n=void 0,this.#r=void 0)}};function ht(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),...Ve(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new mt(ee(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||Mt,u={...e.future},d=null,f=new Set,p=null,m=null,g=null,_=null,v=e.hydrationData!=null,y=z(s.activeRoutes,e.history.location,c,!1,s.branches),S=!1,C=null,D,k;if(y==null&&!e.patchRoutesOnNavigation){let t=X(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=tn(s.activeRoutes);D=!0,k=!D,y=n,C={[r.id]:t}}else if(y&&!e.hydrationData&&Ze(y,s.activeRoutes,e.history.location.pathname).active&&(y=null),!y){D=!1,k=!D,y=[];let t=Ze(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(S=!0,y=t.matches)}else if(y.some(e=>e.route.lazy))D=!1,k=!D;else if(!y.some(e=>bt(e.route)))D=!0,k=!D;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=y;if(n){let e=y.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}k=!1,D=!0,r.forEach(e=>{let r=xt(e.route,t,n);k||=r.renderFallback,D&&=!r.shouldLoad})}let j,M={historyAction:e.history.action,location:e.history.location,matches:y,initialized:D,renderFallback:k,navigation:lt,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||C,fetchers:new Map,blockers:new Map},N=`POP`,P=null,F=!1,I,L=!1,R=new Map,B=null,V=!1,ne=!1,re=new Set,H=new Map,ie=0,ae=-1,oe=new Map,se=new Set,ce=new Map,le=new Map,U=new Set,W=new Map,ue,de=null;function fe(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(ue){ue(),ue=void 0;return}x(W.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=J({currentLocation:M.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{ue=e});e.history.go(r*-1),Ge(i,{state:`blocked`,location:n,proceed(){Ge(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(M.blockers);e.set(i,dt),G({blockers:e})}}),P?.resolve(),P=null;return}return be(t,n)}),n){Tn(t,R);let e=()=>En(t,R);t.addEventListener(`pagehide`,e),B=()=>t.removeEventListener(`pagehide`,e)}return M.initialized||be(`POP`,M.location,{initialHydration:!0}),j}function pe(){d&&d(),B&&B(),f.clear(),I&&I.abort(),M.fetchers.forEac
3h((e,t)=>Ie(M.fetchers,t)),M.blockers.forEach((e,t)=>We(t))}function me(e){if(f.add(e),p){let{newErrors:t}=p;p=null,e(M,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>f.delete(e)}function G(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}),M={...M,...e};let n=[],r=[];M.fetchers.forEach((e,t)=>{e.state===`idle`&&(U.has(t)?n.push(t):r.push(t))}),U.forEach(e=>{!M.fetchers.has(e)&&!H.has(e)&&n.push(e)}),f.size===0&&(p={newErrors:e.errors??null}),[...f].forEach(r=>r(M,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Ie(M.fetchers,e)),r.forEach(e=>M.fetchers.delete(e))}function he(t,n,{flushSync:r}={}){let i=M.actionData!=null&&M.navigation.formMethod!=null&&Q(M.navigation.formMethod)&&M.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?M.actionData:null;let o=n.loaderData?Qt(M.loaderData,n.loaderData,n.matches||[],n.errors):M.loaderData,c=M.blockers;c.size>0&&!V&&(c=new Map(c),c.forEach((e,t)=>c.set(t,dt)));let l=!V&&Xe(t,n.matches||M.matches),u=F===!0||M.navigation.formMethod!=null&&Q(M.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),V||N===`POP`||(N===`PUSH`?e.history.push(t,t.state):N===`REPLACE`&&e.history.replace(t,t.state));let d;if(N===`POP`){let e=R.get(M.location.pathname);e&&e.has(t.pathname)?d={currentLocation:M.location,nextLocation:t}:R.has(t.pathname)&&(d={currentLocation:t,nextLocation:M.location})}else if(L){let e=R.get(M.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),R.set(M.location.pathname,e)),d={currentLocation:M.location,nextLocation:t}}G({...n,actionData:a,loaderData:o,historyAction:N,location:t,initialized:!0,renderFallback:!1,navigation:lt,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),N=`POP`,F=!1,L=!1,V=!1,ne=!1,P?.resolve(),P=null,de?.resolve(),de=null}async function _e(t,n){if(P?.resolve(),P=null,typeof t==`number`){P||=Dn();let n=P.promise;return e.history.go(t),n}let r=Ke(j),{path:i,submission:a,error:o}=vt(!1,_t(M.location,M.matches,c,t,n?.fromRouteId,n?.relative),n),s;if(n?.mask){let t=typeof n.mask==`string`?E(n.mask):{...M.location.mask,...n.mask};if(s={pathname:t.pathname??``,search:t.search??``,hash:t.hash??``},h.test(s.pathname))throw Error(`External navigation is not allowed`);s.pathname.startsWith(`\\`)&&(s.pathname=s.pathname.replace(/^\\+/,`/`)),nt(typeof n.mask==`string`?n.mask:T(n.mask),T(s),e.history.createURL(`/`),`reject`)}let l=M.location,u=w(l,i,n&&n.state,void 0,s);u={...u,...e.history.encodeLocation(u)},nt(t==null?e.history.createHref(M.location):typeof t==`string`?t:T(t),e.history.createHref(u.mask||u),e.history.createURL(`/`),`reject`);let d=n&&n.replace!=null?n.replace:void 0,f=`PUSH`;d===!0?f=`REPLACE`:d===!1||a!=null&&Q(a.formMethod)&&a.formAction===M.location.pathname+M.location.search&&(f=`REPLACE`);let p=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,m=(n&&n.flushSync)===!0,g=J({currentLocation:l,nextLocation:u,historyAction:f});if(g){Ge(g,{state:`blocked`,location:u,proceed(){Ge(g,{state:`proceeding`,proceed:void 0,reset:void 0,location:u}),_e(t,n)},reset(){let e=new Map(M.blockers);e.set(g,dt),G({blockers:e})}});return}await be(f,u,{submission:a,pendingError:o,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:m,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate,instrumentationNavigateMetaReceiver:r})}function ye(){de||=Dn(),Ae(),G({revalidation:`loading`});let e=de.promise;return M.navigation.state===`submitting`?e:M.navigation.state===`idle`?(be(M.historyAction,M.location,{startUninterruptedRevalidation:!0}),e):(be(N||M.historyAction,M.navigation.location,{overrideNavigation:M.navigation,enableViewTransition:L===!0}),e)}async function be(t,n,r){I&&I.abort(),I=null,N=t,V=(r&&r.startUninterruptedRevalidation)===!0,Ye(M.location,M.matches),F=(r&&r.preventScrollReset)===!0,L=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&M.matches&&M.matches.length>0&&!S?M.matches:z(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&M.initialized&&!ne&&an(M.location,n)&&!(r&&r.submission&&Q(r.submission.formMethod))){he(n,{matches:a},{flushSync:o});return}let l=Ze(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),r?.instrumentationNavigateMetaReceiver){let t=vn(e.history,n,a);r.instrumentationNavigateMetaReceiver(t)}if(!a){let{error:e,notFoundMatches:t,route:r}=Y(n.pathname);he(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;I=new AbortController;let d=qt(e.history,n,I.signal,r&&r.submission),f=e.getContext?await e.getContext():new A,p;if(r&&r.pendingError)p=[en(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Q(r.submission.formMethod)){let i=await xe(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)&&Fe(t.error)&&t.error.status===404){I=null,he(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=bn(n,a,t,r.submission),o=!1,l.active=!1,d=qt(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await Se(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||(I=null,he(n,{matches:h||a,...$t(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function xe(t,n,i,l,u,d,f,p,m={}){if(Ae(),G({navigation:xn(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await Qe(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}=tn(s.activeRoutes);
3return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=en(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=Y(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=_n(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 Oe(t,n,Rt(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(un(h)){let n;return n=m&&m.replace!=null?m.replace:Kt(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===M.location.pathname+M.location.search,await De(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(Z(h)){let e=en(l,g.route.id);return(m&&m.replace)!==!0&&(N=`PUSH`),{matches:l,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:l,pendingActionResult:[g.route.id,h]}}async function Se(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||bn(n,i,l,p),x=p||m||yn(b),S=!V&&!g;if(d){if(S){let e=Ce(v);G({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await Qe(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}=tn(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=en(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=Y(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:w,revalidatingFetchers:T}=yt(t,u,a,o,e.history,M,i,x,n,g?[]:r,g===!0,ne,re,U,ce,se,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(ae=++ie,!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(M.fetchers),t=ze(e);return he(n,{matches:i,loaderData:{},errors:v&&Z(v[1])?{[v[0]]:v[1].error}:null,...$t(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=Ce(v);t!==void 0&&(e.actionData=t)}T.length>0&&(e.fetchers=we(T)),G(e,{flushSync:_})}T.forEach(e=>{q(e.key),e.controller&&H.set(e.key,e.controller)});let E=()=>T.forEach(e=>q(e.key));I&&I.signal.addEventListener(`abort`,E);let{loaderResults:D,fetcherResults:O}=await ke(w,T,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};I&&I.signal.removeEventListener(`abort`,E),T.forEach(e=>H.delete(e.key));let k=nn(D);if(k)return await De(t,k.result,!0,{replace:h}),{shortCircuited:!0};if(k=nn(O),k)return se.add(k.key),await De(t,k.result,!0,{replace:h}),{shortCircuited:!0};let A=new Map(M.fetchers),{loaderData:j,errors:N}=Zt(M,i,D,v,T,O,A);g&&M.errors&&(N={...M.errors,...N});let P=ze(A),F=Be(ae,A),ee=P||F||T.length>0;return{matches:i,loaderData:j,errors:N,...ee?{workingFetchers:A}:{}}}function Ce(e){if(e&&!Z(e[1]))return{[e[0]]:e[1].data};if(M.actionData)return Object.keys(M.actionData).length===0?null:M.actionData}function we(e){let t=new Map(M.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=Sn(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function Te(t,n,r,i){q(t);let a=(i&&i.flushSync)===!0,o=Ke(j),l=s.activeRoutes,u=_t(M.location,M.matches,c,r,n,i?.relative),d=z(l,u,c,!1,s.branches),f=Ze(d,l,u);if(f.active&&f.matches&&(d=f.matches),o&&o(vn(e.history,u,d)),!d){Me(t,n,X(404,{pathname:u}),{flushSync:a});return}let{path:p,submission:m,error:h}=vt(!0,u,i);if(h){Me(t,n,h,{flushSync:a});return}let g=e.getContext?await e.getContext():new A,_=(i&&i.preventScrollReset)===!0;if(m&&Q(m.formMethod)){await K(t,n,p,d,g,f.active,a,_,m,i&&i.defaultShouldRevalidate);return}ce.set(t,{routeId:n,path:p}),await Ee(t,n,p,d,g,f.active,a,_,m)}async function K(t,n,i,l,u,d,f,p,m,h){Ae(),ce.delete(t),je(t,Cn(m,M.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=qt(e.history,i,g.signal,m);if(d){let e=await Qe(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Me(t,n,e.error,{flushSync:f});return}if(e.matches)l=e.matches;else{Me(t,n,X(404,{pathname:i}),{flushSync:f});return}}let v=_n(l,i);if(!v.route.action&&!v.route.lazy){Me(t,n,X(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}H.set(t,g);
3let y=ie,x=Rt(a,o,_,i,l,v,r,u),S=await Oe(_,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){H.get(t)===g&&H.delete(t);return}if(U.has(t)){if(un(C)||Z(C)){je(t,wn(void 0));return}}else{if(un(C)){if(H.delete(t),ae>y){je(t,wn(void 0));return}return se.add(t),je(t,Sn(m)),De(_,C,!1,{fetcherSubmission:m,preventScrollReset:p})}if(Z(C)){Me(t,n,C.error);return}}let w=M.navigation.location||M.location,T=qt(e.history,w,g.signal),E=s.activeRoutes,D=M.navigation.state===`idle`?M.matches:z(E,M.navigation.location,c,!1,s.branches);b(D,`Didn't find any matches after fetcher action`);let O=++ie;oe.set(t,O);let{dsMatches:k,revalidatingFetchers:A}=yt(T,u,a,o,e.history,M,D,m,w,r,!1,ne,re,U,ce,se,E,c,e.patchRoutesOnNavigation!=null,s.branches,[v.route.id,C],h),j=Sn(m,C.data),P=new Map(M.fetchers);P.set(t,j),A.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=P.get(t),r=Sn(void 0,n?n.data:void 0);P.set(t,r),q(t),e.controller&&H.set(t,e.controller)}),G({fetchers:P});let F=()=>A.forEach(e=>q(e.key));g.signal.addEventListener(`abort`,F);let{loaderResults:ee,fetcherResults:L}=await ke(k,A,T,w,u);if(g.signal.aborted){oe.get(t)===O&&oe.delete(t);return}g.signal.removeEventListener(`abort`,F),oe.delete(t),H.delete(t),A.forEach(e=>H.delete(e.key));let R=M.fetchers.has(t),te=e=>{if(!R)return e;let n=new Map(e.fetchers);return n.set(t,wn(C.data)),{...e,fetchers:n}},B=nn(ee);if(B)return M=te(M),De(T,B.result,!1,{preventScrollReset:p});if(B=nn(L),B)return se.add(B.key),M=te(M),De(T,B.result,!1,{preventScrollReset:p});let V=new Map(M.fetchers);R&&V.set(t,wn(C.data));let{loaderData:le,errors:W}=Zt(M,D,ee,void 0,A,L,V);Be(O,V),M.navigation.state===`loading`&&O>
3ae?(b(N,`Expected pending action`),I&&I.abort(),he(M.navigation.location,{matches:D,loaderData:le,errors:W,fetchers:V})):(G({errors:W,loaderData:Qt(M.loaderData,le,D,W),fetchers:V}),ne=!1)}async function Ee(t,n,i,s,c,l,u,d,f){let p=M.fetchers.get(t);je(t,Sn(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=qt(e.history,i,m.signal);if(l){let e=await Qe(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Me(t,n,e.error,{flushSync:u});return}if(e.matches)s=e.matches;else{Me(t,n,X(404,{pathname:i}),{flushSync:u});return}}let g=_n(s,i);H.set(t,m);let _=ie,v=await Oe(h,i,Rt(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(H.get(t)===m&&H.delete(t),!h.signal.aborted){if(U.has(t)){je(t,wn(void 0));return}if(un(y)){if(ae>_){je(t,wn(void 0));return}se.add(t),await De(h,y,!1,{preventScrollReset:d});return}if(Z(y)){Me(t,n,y.error);return}je(t,wn(y.data))}}async function De(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(P?.resolve(),P=null),i.response.headers.has(`X-Remix-Revalidate`)&&(ne=!0);let d=i.response.headers.get(`Location`);b(d,`Expected a Location header on the redirect Response`);let f=d,p=new URL(r.url);d=Kt(d,p,c,e.history),nt(f,d,p,`allow-explicit`);let m=w(M.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(ve(d)){let n=O(t,d,!0);e=n.origin!==t.location.origin||ge(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}I=null;let h=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:g,formAction:_,formEncType:v}=M.navigation;!o&&!s&&g&&_&&v&&(o=yn(M.navigation));let y=o||s;ct.has(i.response.status)&&y&&Q(y.formMethod)?await be(h,m,{submission:{...y,formAction:d},preventScrollReset:l||F,enableViewTransition:a?L:void 0}):await be(h,m,{overrideNavigation:bn(m,[],h,o),fetcherSubmission:s,preventScrollReset:l||F,enableViewTransition:a?L:void 0})}async function Oe(e,t,n,r,i){let a,o={};try{a=await zt(l,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.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)&&!M.loaderData.hasOwnProperty(e.route.id)&&(!M.errors||!M.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(ln(r)){let i=r.result;o[t]={type:`redirect`,response:Ut(i,e,t,n,c)}}else o[t]=await Ht(r);return o}async function ke(e,t,n,r,i){let a=Oe(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Oe(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}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 Ae(){ne=!0,ce.forEach((e,t)=>{H.has(t)&&re.add(t),q(t)})}function je(e,t,n={}){let r=new Map(M.fetchers);r.set(e,t),G({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function Me(e,t,n,r={}){let i=en(M.matches,t),a=new Map(M.fetchers);Ie(a,e),G({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Ne(e){return le.set(e,(le.get(e)||0)+1),U.has(e)&&U.delete(e),M.fetchers.get(e)||ut}function Pe(e,t){q(e,t?.reason),je(e,wn(null))}function Ie(e,t){let n=M.fetchers.get(t);H.has(t)&&!(n&&n.state===`loading`&&oe.has(t))&&q(t),ce.delete(t),oe.delete(t),se.delete(t),U.delete(t),re.delete(t),e.delete(t)}function Le(e){let t=(le.get(e)||0)-1;t<=0?(le.delete(e),U.add(e)):le.set(e,t),G({fetchers:new Map(M.fetchers)})}function q(e,t){let n=H.get(e);n&&(n.abort(t),H.delete(e))}function Re(e,t){for(let n of e){let e=t.get(n);b(e,`Expected fetcher: ${n}`);let r=wn(e.data);t.set(n,r)}}function ze(e){let t=[],n=!1;for(let r of se){let i=e.get(r);b(i,`Expected fetcher: ${r}`),i.state===`loading`&&(se.delete(r),t.push(r),n=!0)}return Re(t,e),n}function Be(e,t){let n=[];for(let[r,i]of oe)if(i<e){let e=t.get(r);b(e,`Expected fetcher: ${r}`),e.state===`loading`&&(q(r),oe.delete(r),n.push(r))}return Re(n,t),n.length>0}function Ue(e,t){let n=M.blockers.get(e)||dt;return W.get(e)!==t&&W.set(e,t),n}function We(e){M.blockers.delete(e),W.delete(e)}function Ge(e,t){let n=M.blockers.get(e)||dt;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(M.blockers);r.set(e,t),G({blockers:r})}function J({currentLocation:e,nextLocation:t,historyAction:n}){if(W.size===0)return;W.size>1&&x(!1,`A router only supports one blocker at a time`);let r=Array.from(W.entries()),[i,a]=r[r.length-1],o=M.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function Y(e){let t=X(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=tn(n);return{notFoundMatches:r,route:i,error:t}}function qe(e,t,n){if(m=e,_=t,g=n||null,!v&&M.navigation===lt){v=!0;let e=Xe(M.location,M.matches);e!=null&&G({restoreScrollPosition:e})}return()=>{m=null,_=null,g=null}}function Je(e,t){return g&&g(e,t.map(e=>te(e,M.loaderData)))||e.key}function Ye(e,t){if(m&&_){let n=Je(e,t);m[n]=_()}}function Xe(e,t){if(m){let n=Je(e,t),r=m[n];if(typeof r==`number`)return r}return null}function Ze(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:z(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:z(n,r,c,!0,e)}}return{active:!1,matches:null}}async function Qe(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||Tt(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=z(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=z(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&$e(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=z(s.activeRoutes,n,c,!0,u),!f||$e(l,f))return{type:`success`,matches:null};l=f}}function $e(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function et(e){o={},s.setHmrRoutes(ee(e,a,void 0,o))}function tt(e,t,n=!1){Tt(e,t,s,o,a,n),s.hasHMRRoutes||G({})}return j={get basename(){return c},get future(){return u},get state(){return M},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:fe,subscribe:me,enableScrollRestoration:qe,navigate:_e,fetch:Te,revalidate:ye,createHref:t=>e.history.createHref(t),createURL:t=>e.history.createURL(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ne,resetFetcher:Pe,deleteFetcher:Le,dis
3pose:pe,getBlocker:Ue,deleteBlocker:We,patchRoutes:tt,_internalFetchControllers:H,_internalSetRoutes:et,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){G(e)}},e.instrumentations&&(j=He(j,e.instrumentations.map(e=>e.router).filter(Boolean))),j}function gt(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function _t(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=we(r||`.`,Ce(o),ge(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=gn(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=_e({basename:n,pathname:c.pathname})),T(c)}function vt(e,t,n){if(!n||!gt(n))return{path:t};if(n.formMethod&&!hn(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=rn(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}}}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=Jt(n.formData),s=n.formData;else if(n.body instanceof FormData)o=Jt(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=Yt(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=Yt(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&&gn(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:T(l),submission:c}}function yt(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=Ie(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(!bt(s))f=!1;else if(u){let{shouldLoad:e}=xt(s,a.loaderData,a.errors);f=e}else St(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return Lt(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?Ct(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p};return Lt(n,r,e,c,k,i,l,t,wt(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=z(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=_n(b,e.path),C=new AbortController,w=qt(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=Rt(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=Rt(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!D&&d;let a={...O,defaultShouldRevalidate:i};wt(S,a)&&(T=Rt(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 bt(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function xt(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!bt(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 St(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function Ct(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function wt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Tt(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=[];
3if(t.forEach(e=>{let t=o.find(t=>Et(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 Et(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?!1:(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>Et(e,t)))??!1}var Dt=new WeakMap,Ot=({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=Dt.get(i);o||(o={},Dt.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},kt=new WeakMap;function At(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=kt.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 kt.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=Ot({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 jt(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 Mt(e){return e.matches.some(e=>e.route.middleware)?Nt(e,()=>jt(e)):jt(e)}function Nt(e,t){return Pt(e,t,e=>{if(mn(e))throw e;return e},sn,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{[en(r,a).route.id]:{type:`error`,result:t}}}}}async function Pt(e,t,n,r,i){let{matches:a,...o}=e;return await Ft(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function Ft(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 Ft(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 It(e,t,n,r,i){let a=Ot({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=At(r.route,Q(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Lt(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=It(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?wt(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?wt(a,{...l,defaultShouldRevalidate:e}
3):wt(a,l):c},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)?Bt({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 Rt(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?Lt(e,t,n,r,Ie(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:It(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function zt(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:Le(t,n),pattern:Ie(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 Nt(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 Bt({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:Le(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 Vt(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 Ht(e){let{result:t,type:n}=e;if(fn(t)){let e;try{e=await Vt(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new Pe(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?dn(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:on(t),statusCode:Fe(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Fe(t)?t.status:void 0}:dn(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 Ut(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`),!ve(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=_t(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Wt=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Gt(e){try{return Wt.includes(new URL(e).protocol)}catch{return!1}}function Kt(e,t,n,r){if(ve(e)){let r=e,i=h.test(r)?new URL(g(r,t.protocol)):new URL(r);if(Gt(i.toString()))throw Error(`Invalid redirect location`);let a=ge(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Te(i.pathname)+i.search+i.hash}try{if(Gt(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function qt(e,t,n,r){let i=e.createURL(rn(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)):a.body=t===`text/plain`?r.text:t===`application/x-www-form-urlencoded`&&r.formData?Jt(r.formData):r.formData}
3return new Request(i,a)}function Jt(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function Yt(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Xt(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(!un(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=en(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=pt),c||(c=!0,s=Fe(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 Zt(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=Xt(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=en(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(un(s))b(!1,`Unhandled fetcher revalidation redirect`);else{let e=wn(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function Qt(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==pt).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 $t(e){return e?Z(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function en(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 tn(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 Pe(e||500,o,Error(s),!0)}function nn(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(un(r))return{key:n,result:r}}}function rn(e){return T({...typeof e==`string`?E(e):e,hash:``})}function an(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function on(e){return new Pe(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function sn(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&cn(t))}function cn(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function ln(e){return fn(e.result)&&st.has(e.result.status)}function Z(e){return e.type===`error`}function un(e){return(e&&e.type)===`redirect`}function dn(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function fn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function pn(e){return st.has(e)}function mn(e){return fn(e)&&pn(e.status)&&e.headers.has(`Location`)}function hn(e){return ot.has(e.toUpperCase())}function Q(e){return it.has(e.toUpperCase())}function gn(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function _n(e,t){let n=typeof t==`string`?E(t).search:t.search;if(e[e.length-1].route.index&&gn(n||``))return e[e.length-1];let r=Se(e);return r[r.length-1]}
3function vn(e,t,n){return{url:Le(e.createURL(t),t),pattern:n?Ie(n):``,params:n?.[0]?.params?{...n[0].params}:{}}}function yn(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 bn(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 xn(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 Sn(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 Cn(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 wn(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 Tn(e,t){try{let n=e.sessionStorage.getItem(ft);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 En(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(ft,JSON.stringify(n))}catch(e){x(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function Dn(){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 On=k.createContext(null);On.displayName=`DataRouter`;var kn=k.createContext(null);kn.displayName=`DataRouterState`;var An=k.createContext(!1);function jn(){return k.useContext(An)}var Mn=k.createContext({isTransitioning:!1});Mn.displayName=`ViewTransition`;var Nn=k.createContext(new Map);Nn.displayName=`Fetchers`;var Pn=k.createContext(null);Pn.displayName=`Await`;var Fn=k.createContext(null);Fn.displayName=`Navigation`;var In=k.createContext(null);In.displayName=`Location`;var $=k.createContext({outlet:null,matches:[],isDataRoute:!1});$.displayName=`Route`;var Ln=k.createContext(null);Ln.displayName=`RouteError`;var Rn=`REACT_ROUTER_ERROR`,zn=`REDIRECT`,Bn=`ROUTE_ERROR_RESPONSE`;function Vn(e){if(e.startsWith(`${Rn}:${zn}:{`))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 Hn(e){if(e.startsWith(`${Rn}:${Bn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Pe(t.status,t.statusText,t.data)}catch{}}function Un(e,{relative:t}={}){b(Wn(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=k.useContext(Fn),{hash:i,pathname:a,search:o}=Qn(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:K([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Wn(){return k.useContext(In)!=null}function Gn(){return b(Wn(),`useLocation() may be used only in the context of a <Router> component.`),k.useContext(In).location}var Kn=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function qn(){let{isDataRoute:e}=k.useContext($);return e?vr():Jn()}function Jn(){b(Wn(),`useNavigate() may be used only in the context of a <Router> component.`);let e=k.useContext(On),{basename:t,navigator:n}=k.useContext(Fn),{matches:r}=k.useContext($),{pathname:i}=Gn(),a=JSON.stringify(Ce(r)),o=k.useRef(!1);return k.useLayoutEffect(()=>{o.current=!0}),k.useCallback((r,s={})=>
3{if(x(o.current,Kn),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=we(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:K([t,c.pathname])),nt(typeof r==`string`?r:T(r),n.createHref(c),$e(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var Yn=k.createContext(null);function Xn(e){let t=k.useContext($).outlet;return k.useMemo(()=>t&&k.createElement(Yn.Provider,{value:e},t),[t,e])}function Zn(){let{matches:e}=k.useContext($);return e[e.length-1]?.params??{}}function Qn(e,{relative:t}={}){let{matches:n}=k.useContext($),{pathname:r}=Gn(),i=JSON.stringify(Ce(n));return k.useMemo(()=>we(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function $n(e,t,n){b(Wn(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=k.useContext(Fn),{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=Gn(),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})):R(e,{pathname:d}),p=or(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:K([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:K([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(In.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function er(){let e=_r(),t=Fe(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 tr=k.createElement(er,null),nr=class extends k.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=An;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=Hn(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:k.createElement($.Provider,{value:this.props.routeContext},k.createElement(Ln.Provider,{value:e,children:this.props.component}));return this.context?k.createElement(ir,{error:e},t):t}},rr=new WeakMap;function ir({children:e,error:t}){let{basename:n,navigator:r}=k.useContext(Fn);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Vn(t.digest);if(e){let i=rr.get(t);if(i)throw i;let a=Re(e.location,n),o=a.absoluteURL||a.to;if(nt(e.location,o,$e(r),`allow-explicit`),Gt(o))throw Error(`Invalid redirect location`);if(q&&!rr.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw rr.set(t,n),n}}return k.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function ar({routeContext:e,match:t,children:n}){let r=k.useContext(On);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 or(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}
3=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:Ie(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||tr,o&&(s<0&&c===0?(br(`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(ar,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?k.createElement(nr,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function sr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function cr(e){let t=k.useContext(On);return b(t,sr(e)),t}function lr(e){let t=k.useContext(kn);return b(t,sr(e)),t}function ur(e){let t=k.useContext($);return b(t,sr(e)),t}function dr(e){let t=ur(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 fr(){return dr(`useRouteId`)}function pr(){let e=lr(`useNavigation`);return k.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function mr(){let{matches:e,loaderData:t}=lr(`useMatches`);return k.useMemo(()=>e.map(e=>te(e,t)),[e,t])}function hr(){let e=lr(`useLoaderData`),t=dr(`useLoaderData`);return e.loaderData[t]}function gr(){let e=lr(`useActionData`),t=dr(`useLoaderData`);return e.actionData?e.actionData[t]:void 0}function _r(){let e=k.useContext(Ln),t=lr(`useRouteError`),n=dr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function vr(){let{router:e}=cr(`useNavigate`),t=dr(`useNavigate`),n=k.useRef(!1);return k.useLayoutEffect(()=>{n.current=!0}),k.useCallback(async(r,i={})=>{x(n.current,Kn),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var yr={};function br(e,t,n){!t&&!yr[e]&&(yr[e]=!0,x(!1,n))}var xr={};function Sr(e,t){!e&&!xr[t]&&(xr[t]=!0,console.warn(t))}var Cr=[`HydrateFallback`,`hydrateFallbackElement`],wr=class{status=`pending`;promise;resolve;reject;
3constructor(){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 Tr({router:e,flushSync:t,onError:n,useTransitions:r}){r=jn()||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:Ie(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&v.current.set(t,e.data)}),o.forEach(e=>v.current.delete(e)),Sr(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(Sr(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=>Er(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 wr)},[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=>Er(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,createURL:e.createURL,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(On.Provider,{value:S},k.createElement(kn.Provider,{value:o},k.createElement(Nn.Provider,{value:v.current},k.createElement(Mn.Provider,{value:u},k.createElement(jr,{basename:x,location:o.location,navigationType:o.historyAction,navigator:b,useTransitions:r},k.createElement(Dr,{routes:e.routes,manifest:e.manifest,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function Er(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 Dr=k.memo(Or);function Or({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return $n(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function kr({to:e,replace:t,state:n,relative:r}){b(Wn(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i,navigator:a}=k.useContext(Fn);x(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:o}=k.useContext($),{pathname:s}=Gn(),c=qn(),l=we(e,Ce(o),s,r===`path`);nt(typeof e==`string`?e:T(e),a.createHref(l),$e(a),`reject`);let u=JSON.stringify(l);return k.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function Ar(e){return Xn(e.context)}function jr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){b(!Wn(),`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=ge(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]);
3return 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(Fn.Provider,{value:c},k.createElement(In.Provider,{children:t,value:h}))}k.Component;function Mr(){return{params:Zn(),loaderData:hr(),actionData:gr(),matches:mr()}}function Nr(e){return function(){let t=Mr();return k.createElement(e,t)}}function Pr(){return{params:Zn(),loaderData:hr(),actionData:gr(),error:_r()}}function Fr(e){return function(){let t=Pr();return k.createElement(e,t)}}export{G as A,we as B,Mn as C,fn as D,dn as E,pe as F,x as G,y as H,R as I,s as J,m as K,z as L,I as M,Fe as N,Pe as O,K as P,u as Q,Re as R,$ as S,ht as T,T as U,ge as V,b as W,c as X,o as Y,d as Z,_r as _,Cr as a,kn as b,Sr as c,Gn as d,mr as f,Qn as g,Zn as h,Tr as i,je as j,Ne as k,Un as l,pr as m,Ar as n,Nr as o,qn as p,p as q,jr as r,Fr as s,kr as t,hr as u,fr as v,jn as w,Fn as x,On as y,Me as z}; 4//# debugId=09ae2af1-0d94-5851-aa56-956f0dc23e5e
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.