vendor: 13,268 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)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(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},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),l=`modulepreload`,u=function(e){return`/`+e},d={},f=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=u(t,n),t in d)return;d[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:l,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},p=o((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 ee(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 F=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)},te={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=te,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:ee}},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,F)}catch(e){F(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()},e.version=`19.2.7`})),m=o(((e,t)=>{t.exports=p()})),h=o((e=>{var t=m();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=c(m()),v=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);T(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},y={},b=(e,t,n,r)=>{T(n)&&y[n]||(T(n)&&(y[n]=new Date),v(e,t,n,r))},x=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},S=(e,t,n)=>{e.loadNamespaces(t,x(e,n))},C=(e,t,n,r)=>{if(T(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return S(e,n,r);
1n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,x(e,r))},w=(e,t,n={})=>!t.languages||!t.languages.length?(b(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n?.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),T=e=>typeof e==`string`,E=e=>typeof e==`object`&&!!e,D=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,O={"&":`&`,"&":`&`,"<":`<`,"<":`<`,">":`>`,">":`>`,"'":`'`,"'":`'`,""":`"`,""":`"`," ":` `," ":` `,"©":`©`,"©":`©`,"®":`®`,"®":`®`,"…":`â¦`,"…":`â¦`,"/":`/`,"/":`/`},k=e=>O[e],A={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(D,k)},j=(e={})=>{A={...A,...e}},M=()=>A,N,P=e=>{N=e},ee=()=>N,F={type:`3rdParty`,init(e){j(e.options.react),P(e)}},te=(0,_.createContext)(),ne=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},I=(e,t)=>{let n=(0,_.useRef)();return(0,_.useEffect)(()=>{n.current=t?n.current:e},[e,t]),n.current},L=(e,t,n,r)=>e.getFixedT(t,n,r),re=(e,t,n,r)=>(0,_.useCallback)(L(e,t,n,r),[e,t,n,r]),ie=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,_.useContext)(te)||{},a=n||r||ee();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new ne),!a){b(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next`);let e=(e,t)=>T(t)?t:E(t)&&T(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,t=[e,{},!1];return t.t=e,t.i18n={},t.ready=!1,t}a.options.react?.wait&&b(a,`DEPRECATED_OPTION`,`useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.`);let o={...M(),...a.options.react,...t},{useSuspense:s,keyPrefix:c}=o,l=e||i||a.options?.defaultNS;l=T(l)?[l]:l||[`translation`],a.reportNamespaces.addUsedNamespaces?.(l);let u=(a.isInitialized||a.initializedStoreOnce)&&l.every(e=>w(e,a,o)),d=re(a,t.lng||null,o.nsMode===`fallback`?l:l[0],c),f=()=>d,p=()=>L(a,t.lng||null,o.nsMode===`fallback`?l:l[0],c),[m,h]=(0,_.useState)(f),g=l.join();t.lng&&(g=`${t.lng}${g}`);let v=I(g),y=(0,_.useRef)(!0);(0,_.useEffect)(()=>{let{bindI18n:e,bindI18nStore:n}=o;y.current=!0,!u&&!s&&(t.lng?C(a,t.lng,l,()=>{y.current&&h(p)}):S(a,l,()=>{y.current&&h(p)})),u&&v&&v!==g&&y.current&&h(p);let r=()=>{y.current&&h(p)};return e&&a?.on(e,r),n&&a?.store.on(n,r),()=>{y.current=!1,a&&e?.split(` `).forEach(e=>a.off(e,r)),n&&a&&n.split(` `).forEach(e=>a.store.off(e,r))}},[a,g]),(0,_.useEffect)(()=>{y.current&&u&&h(f)},[a,c,u]);let x=[m,a,u];if(x.t=m,x.i18n=a,x.ready=u,u||!u&&!s)return x;throw new Promise(e=>{t.lng?C(a,t.lng,l,()=>e()):S(a,l,()=>e())})},R=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),z=o(((e,t)=>{t.exports=R()})),B=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,ae=/^[\\/]{2}/;function V(e,t){return t+e.replace(/\\/g,`/`)}var oe=`popstate`;function se(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function ce(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return ue(``,{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:G(t)}return de(t,n,null,e)}function H(e,t){if(e===!1||e==null)throw Error(t)}function U(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function W(){return Math.random().toString(36).substring(2,10)}function le(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 ue(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?K(t):t,state:n,key:t&&t.key||r||W(),mask:i}}function G({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 K(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 de(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=se(e)?e:ue(h.location,e,t);n&&n(r,e),l=u()+1;let d=le(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=se(e)?e:ue(h.location,e,t);n&&n(r,e),l=u();let i=le(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 fe(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(oe,d),c=e,()=>{i.removeEventListener(oe,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 fe(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),H(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:G(t);return i=i.replace(/ $/,`%20`),!n&&ae.test(i)&&(i=r+i),new URL(i,r)}var pe=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)}},me=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`,`unstable_validateParams`]);function he(e){return me.has(e)}var ge=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`,`unstable_validateParams`]);function _e(e){return ge.has(e)}function ve(e){return e.index===!0}function ye(e){let t={};return e.Component&&Object.assign(t,{element:_.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:_.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:_.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}
1function be(e,t=ye,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(H(e.index!==!0||!e.children,`Cannot specify children on an index route`),H(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),ve(e)){let n={...e,id:s};return r[s]=xe(n,t(n)),n}else{let n={...e,id:s,children:void 0};return r[s]=xe(n,t(n)),e.children&&(n.children=be(e.children,t,o,r,i)),n}})}function xe(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Se(e,t,n=`/`){return Ce(e,t,n,!1)}function Ce(e,t,n,r,i){let a=Ue((typeof t==`string`?K(t):t).pathname||`/`,n);if(a==null)return null;let o=i??Te(e),s=null,c=He(a);for(let e=0;s==null&&e<o.length;++e)s=Re(o[e],c,r);return s}function we(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 Te(e){let t=Ee(e);return Oe(t),t}function Ee(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;H(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=Y([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(H(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Ee(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:Ie(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Ve(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 De(e.path))a(e,t,!0,n)}),t}function De(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=De(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 Oe(e){e.sort((e,t)=>e.score===t.score?Le(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var q=/^:[\w-]+$/,J=/^:[\w-]+/,ke=3.5,Ae=3,je=2,Me=1,Ne=10,Pe=-2,Fe=e=>e===`*`;function Ie(e,t){let n=e.split(`/`),r=n.length;return n.some(Fe)&&(r+=Pe),t&&(r+=je),n.filter(e=>!Fe(e)).reduce((e,t)=>e+(q.test(t)?Ae:J.test(t)?ke:t===``?Me:Ne),r)}function Le(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 Re(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?Be(u,l,s.matcher,s.compiledParams):ze(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=ze({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;
1Object.assign(i,d.params),o.push({params:i,pathname:Y([a,d.pathname]),pathnameBase:et(Y([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=Y([a,d.pathnameBase]))}return o}function ze(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Ve(e.path,e.caseSensitive,e.end);return Be(e,t,n,r)}function Be(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=$e(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=$e(a.slice(0,a.length-e.length),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 Ve(e,t=!1,n=!0){U(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 U(!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 Ue(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 We({basename:e,pathname:t}){return t===`/`?e:Y([e,t])}var Ge=e=>B.test(e);function Ke(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?K(e):e,a;return n?(n=Qe(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?qe(n.substring(1),`/`):qe(n,t)):a=t,{pathname:a,search:tt(r),hash:nt(i)}}function qe(e,t){let n=$e(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Je(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 Ye(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Xe(e){let t=Ye(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ze(e,t,n,r=!1){let i;typeof e==`string`?i=K(e):(i={...e},H(!i.pathname||!i.pathname.includes(`?`),Je(`?`,`pathname`,`search`,i)),H(!i.pathname||!i.pathname.includes(`#`),Je(`#`,`pathname`,`hash`,i)),H(!i.search||!i.search.includes(`#`),Je(`#`,`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=Ke(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Qe=e=>e.replace(/[\\/]{2,}/g,`/`),Y=e=>Qe(e.join(`/`));function $e(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 et=e=>$e(e).replace(/^\/*/,`/`),tt=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,nt=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,rt=class{type=`DataWithResponseInit`;data;init;constructor(e,t){this.data=e,this.init=t||null}};function it(e,t){return new rt(e,typeof t==`number`?{status:t}:t)}var at=(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})},ot=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],st=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 ct(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function lt(e){return Y(e.map(e=>
1e.route.path).filter(Boolean))||`/`}function ut(e,t){let n=new URL(typeof e==`string`||e instanceof URL?e:e.url),r=typeof t==`string`?K(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 dt=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function ft(e,t){let n=e;if(typeof n!=`string`||!B.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(dt)try{let e=new URL(window.location.href),r=ae.test(n)?new URL(V(n,e.protocol)):new URL(n),a=Ue(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{U(!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 pt=Symbol(`Uninstrumented`),mt=new WeakMap;function ht(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)=>xt(await St(n.lazy,void 0,()=>e(...t),Ct))}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)=>xt(await St(n[`lazy.middleware`],void 0,()=>t(...e),Ct))})}if(typeof e.loader==`function`&&n[`lazy.loader`].length>0){let t=e.loader;r.lazy=Object.assign(r.lazy||{},{loader:async(...e)=>xt(await St(n[`lazy.loader`],void 0,()=>t(...e),Ct))})}if(typeof e.action==`function`&&n[`lazy.action`].length>0){let t=e.action;r.lazy=Object.assign(r.lazy||{},{action:async(...e)=>xt(await St(n[`lazy.action`],void 0,()=>t(...e),Ct))})}}if(typeof t.loader==`function`&&n.loader.length>0){let e=_t(t.loader),i=async(...t)=>xt(await St(n.loader,wt(t[0]),()=>e(...t),Ct));e.hydrate===!0&&(i.hydrate=!0),vt(i,e),r.loader=i}if(typeof t.action==`function`&&n.action.length>0){let e=_t(t.action),i=async(...t)=>xt(await St(n.action,wt(t[0]),()=>e(...t),Ct));vt(i,e),r.action=i}return t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=_t(e),r=async(...e)=>xt(await St(n.middleware,wt(e[0]),()=>t(...e),Ct));return vt(r,t),r})),r}function gt(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=_t(e.navigate),r=async(...r)=>{let[i,a]=r,o,s={to:typeof i==`number`||typeof i==`string`?i:i?G(i):`.`,...Tt(e,a??{})};return xt(await St(n.navigate,s,async()=>{if(typeof i==`number`)return await t(...r);let n=yt(e,e=>{o=e});try{return await t(...r)}finally{n()}},e=>({...Ct(e),meta:o})))};vt(r,t),e.navigate=r}if(n.fetch.length>0){let t=_t(e.fetch),r=async(...r)=>{let[i,a,o,s]=r,c;return xt(await St(n.fetch,{href:o??`.`,fetcherKey:i,...Tt(e,s??{})},async()=>{let n=yt(e,e=>{c=e});try{return await t(...r)}finally{n()}},e=>({...Ct(e),meta:c})))};vt(r,t),e.fetch=r}return e}function _t(e){return e[pt]??e}function vt(e,t){e[pt]=t}function yt(e,t){return mt.set(e,t),()=>{mt.get(e)===t&&mt.delete(e)}}function bt(e){let t=mt.get(e);return mt.delete(e),t}function xt(e){if(e.type===`error`)throw e.value;return e.value}async function St(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=St(e,t,n,r,i,a-1),await s,H(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 Ct(e){return e.type===`error`&&e.value instanceof Error?{status:`error`,error:e.value}:{status:`success`,error:void 0}}function wt(e){let{request:t,context:n,params:r}=e;return{...e,request:Et(t),params:{...r},context:Dt(n)}}function Tt(e,t){return{currentUrl:G(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 Et(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Dt(e){return{get:t=>e.get(t)}}var Ot=class{#e=[];#t=[];#n;constructor(e){this.#n=e}update(e){this.#e=e,this.#t=Te(e)}match(e,t=!1){return Ce(this.#e,e,this.#n,t,this.#t)}}
1,kt;function At(){return kt}var jt=new URL(`http://localhost`);function Mt(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),jt)}catch{return jt}}function Nt(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function Pt(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 Ft(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&&!Nt(i,n),s=!Nt(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!Pt(e,i)||!Nt(i,a)))throw Error(`External navigation is not allowed`)}var It=[`POST`,`PUT`,`PATCH`,`DELETE`],Lt=new Set(It),Rt=[`GET`,...It],zt=new Set(Rt),Bt=new Set([301,302,303,307,308]),Vt=new Set([307,308]),Ht={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},Wt={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},Gt=`remix-router-transitions`,Kt=Symbol(`ResetLoaderData`);function qt(e,t){if(e.unstable_routePatternMatching){let e=At();return H(e,`You must call unstable_preloadRoutePattern() from "react-router/route-pattern" before enabling future.unstable_routePatternMatching.`),new e(t)}return new Ot(t)}var Jt=class{#e;#t;#n;constructor(e,t){this.#e=e,this.#n=t,this.#n.update(e)}get stableRoutes(){return this.#e}get activeRoutes(){return this.#t??this.#e}get hasHMRRoutes(){return this.#t!=null}setRoutes(e){this.#e=e,this.#t||this.#n.update(e)}setHmrRoutes(e){this.#t=e,this.#n.update(e)}commitHmrRoutes(){this.#t&&(this.#e=this.#t,this.#t=void 0,this.#n.update(this.#e))}};function Yt(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;H(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),...ht(t.map(e=>e.route).filter(Boolean),e)})}let o={...e.future},s=e.basename||`/`;s.startsWith(`/`)||(s=`/${s}`);let c=qt(o,s),l={},u=new Jt(be(e.routes,a,void 0,l),c),d=e.dataStrategy||pn,f=null,p=new Set,m=null,h=null,g=null,_=null,v=e.hydrationData!=null,y=c.match(e.history.location),b=!1,x=null,S,C;if(y==null&&!e.patchRoutesOnNavigation){let t=X(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=In(u.activeRoutes);S=!0,C=!S,y=n,x={[r.id]:t}}else if(y&&!e.hydrationData&&Je(y,e.history.location.pathname).active&&(y=null),!y){S=!1,C=!S,y=[];let t=Je(null,e.history.location.pathname);t.active&&t.matches&&(b=!0,y=t.matches)}else if(y.some(e=>e.route.lazy))S=!1,C=!S;else if(!y.some(e=>en(e.route)))S=!0,C=!S;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)}C=!1,S=!0,r.forEach(e=>{let r=tn(e.route,t,n);C||=r.renderFallback,S&&=!r.shouldLoad})}let w,T={historyAction:e.history.action,location:e.history.location,matches:y,initialized:S,renderFallback:C,navigation:Ht,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||x,fetchers:new Map,blockers:new Map},E=`POP`,D=null,O=!1,k,A=!1,j=new Map,M=null,N=!1,P=!1,ee=new Set,F=new Map,te=0,ne=-1,I=new Map,L=new Set,re=new Map,ie=new Map,R=new Set,z=new Map,B,V=null;function oe(){if(f=e.history.listen(({action:t,location:n,delta:r})=>{if(B){B(),B=void 0;return}U(z.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=Be({currentLocation:T.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{B=e});e.history.go(r*-1),ze(i,{state:`blocked`,location:n,proceed(){ze(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(T.blockers);e.set(i,Wt),W({blockers:e})}}),D?.resolve(),D=null;return}return he(t,n)}),n){ar(t,j);let e=()=>
1or(t,j);t.addEventListener(`pagehide`,e),M=()=>t.removeEventListener(`pagehide`,e)}return T.initialized||he(`POP`,T.location,{initialHydration:!0}),w}function se(){f&&f(),M&&M(),p.clear(),k&&k.abort(),T.fetchers.forEach((e,t)=>je(T.fetchers,t)),T.blockers.forEach((e,t)=>Re(t))}function ce(e){if(p.add(e),m){let{newErrors:t}=m;m=null,e(T,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>p.delete(e)}function W(e,t={}){e.matches&&=e.matches.map(e=>{let t=l[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),T={...T,...e};let n=[],r=[];T.fetchers.forEach((e,t)=>{e.state===`idle`&&(R.has(t)?n.push(t):r.push(t))}),R.forEach(e=>{!T.fetchers.has(e)&&!F.has(e)&&n.push(e)}),p.size===0&&(m={newErrors:e.errors??null}),[...p].forEach(r=>r(T,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>je(T.fetchers,e)),r.forEach(e=>T.fetchers.delete(e))}function le(t,n,{flushSync:r}={}){let i=T.actionData!=null&&T.navigation.formMethod!=null&&Q(T.navigation.formMethod)&&T.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?T.actionData:null;let o=n.loaderData?Nn(T.loaderData,n.loaderData,n.matches||[],n.errors):T.loaderData,s=T.blockers;s.size>
10&&!N&&(s=new Map(s),s.forEach((e,t)=>s.set(t,Wt)));let c=N?!1:qe(t,n.matches||T.matches),l=O===!0||T.navigation.formMethod!=null&&Q(T.navigation.formMethod)&&t.state?._isRedirect!==!0;u.commitHmrRoutes(),N||E===`POP`||(E===`PUSH`?e.history.push(t,t.state):E===`REPLACE`&&e.history.replace(t,t.state));let d;if(E===`POP`&&!N&&t!==T.location){let e=j.get(T.location.pathname);e&&e.has(t.pathname)?d={currentLocation:T.location,nextLocation:t}:j.has(t.pathname)&&(d={currentLocation:t,nextLocation:T.location})}else if(A){let e=j.get(T.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),j.set(T.location.pathname,e)),d={currentLocation:T.location,nextLocation:t}}W({...n,actionData:a,loaderData:o,historyAction:E,location:t,initialized:!0,renderFallback:!1,navigation:Ht,revalidation:`idle`,restoreScrollPosition:c,preventScrollReset:l,blockers:s},{viewTransitionOpts:d,flushSync:r===!0}),E=`POP`,O=!1,A=!1,N=!1,P=!1,D?.resolve(),D=null,V?.resolve(),V=null}async function de(t,n){if(D?.resolve(),D=null,typeof t==`number`){D||=sr();let n=D.promise;return e.history.go(t),n}let r=bt(w),{path:i,submission:a,error:o}=Qt(!1,Zt(T.location,T.matches,s,t,n?.fromRouteId,n?.relative),n),c;if(n?.mask){let t=typeof n.mask==`string`?K(n.mask):{...T.location.mask,...n.mask};if(c={pathname:t.pathname??``,search:t.search??``,hash:t.hash??``},ae.test(c.pathname))throw Error(`External navigation is not allowed`);c.pathname.startsWith(`\\`)&&(c.pathname=c.pathname.replace(/^\\+/,`/`)),Ft(typeof n.mask==`string`?n.mask:G(n.mask),G(c),e.history.createURL(`/`),`reject`)}let l=T.location,u=ue(l,i,n&&n.state,void 0,c);u={...u,...e.history.encodeLocation(u)},Ft(t==null?e.history.createHref(T.location):typeof t==`string`?t:G(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===T.location.pathname+T.location.search&&(f=`REPLACE`);let p=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,m=(n&&n.flushSync)===!0,h=Be({currentLocation:l,nextLocation:u,historyAction:f});if(h){ze(h,{state:`blocked`,location:u,proceed(){ze(h,{state:`proceeding`,proceed:void 0,reset:void 0,location:u}),de(t,n)},reset(){let e=new Map(T.blockers);e.set(h,Wt),W({blockers:e})}});return}await he(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 me(){V||=sr(),Oe(),W({revalidation:`loading`});let e=V.promise;return T.navigation.state===`submitting`?e:T.navigation.state===`idle`?(he(T.historyAction,T.location,{startUninterruptedRevalidation:!0}),e):(he(E||T.historyAction,T.navigation.location,{overrideNavigation:T.navigation,enableViewTransition:A===!0}),e)}async function he(t,n,r){k&&k.abort(),k=null,E=t,N=(r&&r.startUninterruptedRevalidation)===!0,Ke(T.location,T.matches),O=(r&&r.preventScrollReset)===!0,A=(r&&r.enableViewTransition)===!0;let i=r?.initialHydration&&T.matches&&T.matches.length>0&&!b?T.matches:c.match(n),a=(r&&r.flushSync)===!0;if(i&&T.initialized&&!P&&zn(T.location,n)&&!(r&&r.submission&&Q(r.submission.formMethod))){le(n,{matches:i},{flushSync:a});return}let o=Je(i,n.pathname);if(o.active&&o.matches&&(i=o.matches),r?.instrumentationNavigateMetaReceiver){let t=Qn(e.history,n,i);r.instrumentationNavigateMetaReceiver(t)}if(!i){let{error:e,notFoundMatches:t,route:r}=Ve(n.pathname);le(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:a});return}let s=r&&r.overrideNavigation?{...r.overrideNavigation,matches:i,historyAction:t}:void 0;k=new AbortController;let l=On(e.history,n,k.signal,r&&r.submission),u=e.getContext?await e.getContext():new pe,d;if(r&&r.pendingError)d=[Fn(i).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Q(r.submission.formMethod)){let c=await ge(l,n,r.submission,i,t,u,o.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:a});if(c.shortCircuited)return;if(c.pendingActionResult){let[e,t]=c.pendingActionResult;if(Z(t)&&ct(t.error)&&t.error.status===404){k=null,le(n,{matches:c.matches,loaderData:{},errors:{[e]:t.error}});return}}i=c.matches||i,d=c.pendingActionResult,s=er(n,i,t,r.submission),a=!1,o.active=!1,l=On(e.history,l.url,l.signal)}let{shortCircuited:f,matches:p,loaderData:m,errors:h,workingFetchers:g}=await _e(l,n,i,t,u,o.active,s,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,a,d,r&&r.callSiteDefaultShouldRevalidate);f||(k=null,le(n,{matches:p||i,...Pn(d),loaderData:m,errors:h,...g?{fetchers:g}:{}}))}async function ge(t,n,i,o,c,d,f,p,m={}){if(Oe(),W({navigation:tr(n,o,c,i)},{flushSync:m.flushSync===!0}),f){let e=await Ye(o,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}=In(u.activeRoutes);
1return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=Fn(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}else if(e.matches)o=e.matches;else{let{notFoundMatches:e,error:t,route:r}=Ve(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=Zn(o,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 Ee(t,n,yn(a,l,t,n,o,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of o)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(Wn(h)){let n;return n=m&&m.replace!=null?m.replace:Dn(h.response.headers.get(`Location`),new URL(t.url),s,e.history)===T.location.pathname+T.location.search,await Te(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(Z(h)){let e=Fn(o,g.route.id);return(m&&m.replace)!==!0&&(E=`PUSH`),{matches:o,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:o,pendingActionResult:[g.route.id,h]}}async function _e(t,n,i,o,s,d,f,p,m,h,g,_,v,y){let b=f||er(n,i,o,p),x=p||m||$n(b),S=!N&&!g;if(d){if(S){let e=ve(v);W({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await Ye(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}=In(u.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=Fn(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}=Ve(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let{dsMatches:C,revalidatingFetchers:w}=$t(t,s,a,l,e.history,T,i,x,n,g?[]:r,g===!0,P,ee,R,re,L,c,v,y);if(ne=++te,!e.dataStrategy&&!C.some(e=>e.shouldLoad)&&!C.some(e=>e.route.middleware&&e.route.middleware.length>0)&&w.length===0){let e=new Map(T.fetchers),t=Fe(e);return le(n,{matches:i,loaderData:{},errors:v&&Z(v[1])?{[v[0]]:v[1].error}:null,...Pn(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=ve(v);t!==void 0&&(e.actionData=t)}w.length>0&&(e.fetchers=ye(w)),W(e,{flushSync:_})}w.forEach(e=>{Ne(e.key),e.controller&&F.set(e.key,e.controller)});let E=()=>w.forEach(e=>Ne(e.key));k&&k.signal.addEventListener(`abort`,E);let{loaderResults:D,fetcherResults:O}=await De(C,w,t,n,s);if(t.signal.aborted)return{shortCircuited:!0};k&&k.signal.removeEventListener(`abort`,E),w.forEach(e=>F.delete(e.key));let A=Ln(D);if(A)return await Te(t,A.result,!0,{replace:h}),{shortCircuited:!0};if(A=Ln(O),A)return L.add(A.key),await Te(t,A.result,!0,{replace:h}),{shortCircuited:!0};let j=new Map(T.fetchers),{loaderData:M,errors:I}=Mn(T,i,D,v,w,O,j);g&&T.errors&&(I={...T.errors,...I});let ie=Fe(j),z=Ie(ne,j),B=ie||z||w.length>0;return{matches:i,loaderData:M,errors:I,...B?{workingFetchers:j}:{}}}function ve(e){if(e&&!Z(e[1]))return{[e[0]]:e[1].data};if(T.actionData)return Object.keys(T.actionData).length===0?null:T.actionData}function ye(e){let t=new Map(T.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=nr(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function xe(t,n,r,i){Ne(t);let a=(i&&i.flushSync)===!0,o=bt(w),l=Zt(T.location,T.matches,s,r,n,i?.relative),u=c.match(l),d=Je(u,l);if(d.active&&d.matches&&(u=d.matches),o&&o(Qn(e.history,l,u)),!u){J(t,n,X(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=Qt(!0,l,i);if(m){J(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new pe,g=(i&&i.preventScrollReset)===!0;if(p&&Q(p.formMethod)){await Se(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate);return}let _={routeId:n,path:f,isDiscovering:d.active};re.set(t,_),await Ce(t,_,u,h,a,g,p)}async function Se(t,n,i,o,s,u,d,f,p,m){Oe(),re.delete(t),q(t,rr(p,T.fetchers.get(t)),{flushSync:d});let h=new AbortController,g=On(e.history,i,h.signal,p);if(u){let e=await Ye(o,new URL(g.url).pathname,g.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){J(t,n,e.error,{flushSync:d});return}else if(e.matches)o=e.matches;else{J(t,n,X(404,{pathname:i}),{flushSync:d});return}}let _=Zn(o,i);if(!_.route.action&&!_.route.lazy){J(t,n,X(405,{method:p.formMethod,pathname:i,routeId:n}),{flushSync:d});return}F.set(t,h);let v=te,y=yn(a,l,g,i,o,_,r,s),b=await Ee(g,i,y,s,t),x=b[_.route.id];if(!x){for(let e of y)if(b[e.route.id]){x=b[e.route.id];break}}if(g.signal.aborted){F.get(t)===h&&F.delete(t);return}if(R.has(t)){if(Wn(x)||Z(x)){q(t,ir(void 0));return}}else{if(Wn(x))if(F.delete(t),ne>v){q(t,ir(void 0));return}else return L.add(t),q(t,nr(p)),Te(g,x,!1,{fetcherSubmission:p,preventScrollReset:f});if(Z(x)){J(t,n,x.error);return}}let S=T.navigation.location||T.location,C=On(e.history,S,h.signal),w=T.navigation.state===`idle`?T.matches:c.match(T.navigation.location);H(w,`Didn't find any matches after fetcher action`);let D=++te;I.set(t,D);let{dsMatches:O,revalidatingFetchers:A}=$t(C,s,a,l,e.history,T,w,p,S,r,!1,P,ee,R,re,L,c,[_.route.id,x],m),j=nr(p,x.data),M=new Map(T.fetchers);M.set(t,j),A.filter(e=>
1e.key!==t).forEach(e=>{let t=e.key,n=M.get(t),r=nr(void 0,n?n.data:void 0);M.set(t,r),Ne(t),e.controller&&F.set(t,e.controller)}),W({fetchers:M});let N=()=>A.forEach(e=>Ne(e.key));h.signal.addEventListener(`abort`,N);let{loaderResults:ie,fetcherResults:z}=await De(O,A,C,S,s);if(h.signal.aborted){I.get(t)===D&&I.delete(t);return}h.signal.removeEventListener(`abort`,N),I.delete(t),F.delete(t),A.forEach(e=>F.delete(e.key));let B=T.fetchers.has(t),ae=e=>{if(!B)return e;let n=new Map(e.fetchers);return n.set(t,ir(x.data)),{...e,fetchers:n}},V=Ln(ie);if(V)return T=ae(T),Te(C,V.result,!1,{preventScrollReset:f});if(V=Ln(z),V)return L.add(V.key),T=ae(T),Te(C,V.result,!1,{preventScrollReset:f});let oe=new Map(T.fetchers);B&&oe.set(t,ir(x.data));let{loaderData:se,errors:ce}=Mn(T,w,ie,void 0,A,z,oe);Ie(D,oe),T.navigation.state===`loading`&&D>ne?(H(E,`Expected pending action`),k&&k.abort(),le(T.navigation.location,{matches:w,loaderData:se,errors:ce,fetchers:oe})):(W({errors:ce,loaderData:Nn(T.loaderData,se,w,ce),fetchers:oe}),P=!1)}async function Ce(t,n,i,o,s,c,u){let{routeId:d,path:f}=n,p=T.fetchers.get(t);q(t,nr(u,p?p.data:void 0),{flushSync:s});let m=new AbortController,h=On(e.history,f,m.signal);if(n.isDiscovering){let e=await Ye(i,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){J(t,d,e.error,{flushSync:s});return}else if(e.matches)i=e.matches,n.isDiscovering=!1;else{J(t,d,X(404,{pathname:f}),{flushSync:s});return}}let g=Zn(i,f);F.set(t,m);let _=te,v=await Ee(h,f,yn(a,l,h,f,i,g,r,o),o,t),y=v[g.route.id];if(!y){for(let e of i)if(v[e.route.id]){y=v[e.route.id];break}}if(F.get(t)===m&&F.delete(t),!h.signal.aborted){if(R.has(t)){q(t,ir(void 0));return}if(Wn(y))if(ne>_){q(t,ir(void 0));return}else{L.add(t),await Te(h,y,!1,{preventScrollReset:c});return}if(Z(y)){J(t,d,y.error);return}q(t,ir(y.data))}}async function Te(r,i,a,{submission:o,fetcherSubmission:c,preventScrollReset:l,replace:u}={}){a||(D?.resolve(),D=null),i.response.headers.has(`X-Remix-Revalidate`)&&(P=!0);let d=i.response.headers.get(`Location`);H(d,`Expected a Location header on the redirect Response`);let f=d,p=new URL(r.url);d=Dn(d,p,s,e.history),Ft(f,d,p,`allow-explicit`);let m=ue(T.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(Ge(d)){let n=fe(t,d,!0);e=n.origin!==t.location.origin||Ue(n.pathname,s)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}k=null;let h=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:g,formAction:_,formEncType:v}=T.navigation;!o&&!c&&g&&_&&v&&(o=$n(T.navigation));let y=o||c;Vt.has(i.response.status)&&y&&Q(y.formMethod)?await he(h,m,{submission:{...y,formAction:d},preventScrollReset:l||O,enableViewTransition:a?A:void 0}):await he(h,m,{overrideNavigation:er(m,[],h,o),fetcherSubmission:c,preventScrollReset:l||O,enableViewTransition:a?A:void 0})}async function Ee(e,t,n,r,i){let a,o={};try{a=await bn(d,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)&&!T.loaderData.hasOwnProperty(e.route.id)&&(!T.errors||!T.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(Un(r)){let i=r.result;o[t]={type:`redirect`,response:wn(i,e,t,n,s)}}else o[t]=await Cn(r);return o}async function De(e,t,n,r,i){let a=Ee(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Ee(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 Oe(){P=!0,re.forEach((e,t)=>{F.has(t)&&ee.add(t),Ne(t)})}function q(e,t,n={}){let r=new Map(T.fetchers);r.set(e,t),W({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function J(e,t,n,r={}){let i=Fn(T.matches,t),a=new Map(T.fetchers);je(a,e),W({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function ke(e){return ie.set(e,(ie.get(e)||0)+1),R.has(e)&&R.delete(e),T.fetchers.get(e)||Ut}function Ae(e,t){Ne(e,t?.reason),q(e,ir(null))}function je(e,t){let n=T.fetchers.get(t);F.has(t)&&!(n&&n.state===`loading`&&I.has(t))&&Ne(t),re.delete(t),I.delete(t),L.delete(t),R.delete(t),ee.delete(t),e.delete(t)}function Me(e){let t=(ie.get(e)||0)-1;t<=0?(ie.delete(e),R.add(e)):ie.set(e,t),W({fetchers:new Map(T.fetchers)})}function Ne(e,t){let n=F.get(e);n&&(n.abort(t),F.delete(e))}function Pe(e,t){for(let n of e){let e=t.get(n);H(e,`Expected fetcher: ${n}`);let r=ir(e.data);t.set(n,r)}}function Fe(e){let t=[],n=!1;for(let r of L){let i=e.get(r);H(i,`Expected fetcher: ${r}`),i.state===`loading`&&(L.delete(r),t.push(r),n=!0)}return Pe(t,e),n}function Ie(e,t){let n=[];for(let[r,i]of I)if(i<e){let e=t.get(r);H(e,`Expected fetcher: ${r}`),e.state===`loading`&&(Ne(r),I.delete(r),n.push(r))}return Pe(n,t),n.length>0}function Le(e,t){let n=T.blockers.get(e)||Wt;return z.get(e)!==t&&z.set(e,t),n}function Re(e){T.blockers.delete(e),z.delete(e)}function ze(e,t){let n=T.blockers.get(e)||Wt;H(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(T.blockers);r.set(e,t),W({blockers:r})}function Be({currentLocation:e,nextLocation:t,historyAction:n}){if(z.size===0)return;z.size>1&&U(!1,`A router only supports one blocker at a time`);let r=Array.from(z.entries()),[i,a]=r[r.length-1],o=T.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function Ve(e){let t=X(404,{pathname:e}),n=u.activeRoutes,{matches:r,route:i}=In(n);return{notFoundMatches:r,route:i,error:t}}function He(e,t,n){if(h=e,_=t,g=n||null,!v&&T.navigation===Ht){v=!0;let e=qe(T.location,T.matches);e!=null&&W({restoreScrollPosition:e})}return()=>{h=null,_=null,g=null}}function We(e,t){return g&&g(e,t.map(e=>we(e,T.loaderData)))||e.key}function Ke(e,t){if(h&&_){let n=We(e,t);h[n]=_()}}function qe(e,t){if(h){let n=We(e,t),r=h[n];if(typeof r==`number`)return r}return null}function Je(t,n){if(e.patchRoutesOnNavigation){if(!t)return{active:!0,matches:c.match(n,!0)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:c.match(n,!0)}}return{active:!1,matches:null}}async function Ye(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let o=t;for(;;){let t=l;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:o,fetcherKey:i,patch:(e,n)=>{r.aborted||on(e,n,u,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:o}}if(r.aborted)return{type:`aborted`};let s=c.match(n),d=null;if(s&&(Object.keys(s[0].params).length===0||(d=c.match(n,!0),!(d&&o.length<d.length&&Xe(o,d.slice(0,o.length))))))return{type:`success`,matches:s};if(d||=c.match(n,!0),!d||Xe(o,d))return{type:`success`,matches:null};o=d}}function Xe(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function Ze(e){l={},u.setHmrRoutes(be(e,a,void 0,l))}function Qe(e,t,n=!1){on(e,t,u,l,a,n),u.hasHMRRoutes||W({})}return w={get basename(){return s},get future(){return o},get state(){return T},get routes(){return u.stableRoutes},match(e){return c.match(e)},get manifest(){return l},get window(){return t},initialize:oe,subscribe:ce,enableScrollRestoration:He,navigate:de,fetch:xe,revalidate:me,createHref:t=>e.history.createHref(t),createURL:t=>e.history.createURL(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:ke,resetFetcher:Ae,deleteFetcher:Me,dispose:se,getBlocker:Le,deleteBlocker:Re,patchRoutes:Qe,_internalFetchControllers:F,_internalSetRoutes:Ze,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){W(e)}},e.instrumentations&&(w=gt(w,e.instrumentations.map(e=>
1e.router).filter(Boolean))),w}function Xt(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function Zt(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=Ze(r||`.`,Xe(o),Ue(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=Xn(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=We({basename:n,pathname:c.pathname})),G(c)}function Qt(e,t,n){if(!n||!Xt(n))return{path:t};if(n.formMethod&&!Yn(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}}}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()}}}H(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=kn(n.formData),s=n.formData;else if(n.body instanceof FormData)o=kn(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=An(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=An(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=K(t);return e&&l.search&&Xn(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:G(l),submission:c}}function $t(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v){let y=_?Z(_[1])?_[1].error:_[1].data:void 0,b=i.createURL(a.location),x=i.createURL(c),S;if(u&&a.errors){let e=Object.keys(a.errors)[0];S=o.findIndex(t=>t.route.id===e)}else if(_&&Z(_[1])){let e=_[0];S=o.findIndex(t=>t.route.id===e)-1}let C=_?_[1].statusCode:void 0,w=C&&C>=400,T={currentUrl:b,currentParams:a.matches[0]?.params||{},nextUrl:x,nextParams:o[0].params,...s,actionResult:y,actionStatus:C},E=lt(o),D=o.map((i,o)=>{let{route:s}=i,f=null;if(S!=null&&o>S)f=!1;else if(s.lazy)f=!0;else if(!en(s))f=!1;else if(u){let{shouldLoad:e}=tn(s,a.loaderData,a.errors);f=e}else nn(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return vn(n,r,e,c,E,i,l,t,f);let p=!1;typeof v==`boolean`?p=v:w?p=!1:d||b.pathname+b.search===x.pathname+x.search?p=!0:b.search===x.search?rn(a.matches[o],i)&&(p=!0):p=!0;let m={...T,defaultShouldRevalidate:p};return vn(n,r,e,c,E,i,l,t,an(i,m),m,v)}),O=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s)||e.isDiscovering)return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,_=g.match(e.path);if(!_){O.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let y=Zn(_,e.path),b=new AbortController,x=On(i,e.path,b.signal),S=null;if(f.has(s))f.delete(s),S=yn(n,r,x,e.path,_,y,l,t);else if(m)d&&(S=yn(n,r,x,e.path,_,y,l,t));else{let i;i=typeof v==`boolean`?v:w?!1:d;let a={...T,defaultShouldRevalidate:i};an(y,a)&&(S=yn(n,r,x,e.path,_,y,l,t,a))}S&&O.push({key:s,routeId:e.routeId,path:e.path,matches:S,match:y,request:x,controller:b})}),{dsMatches:D,revalidatingFetchers:O}}function en(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function tn(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!en(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 nn(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function rn(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function an(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function on(e,t,n,r,i,a){let o;if(e){let t=r[e];H(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=>sn(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=be(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]=be([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 sn(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=>sn(e,t)))??!1:!1}var cn=new WeakMap,ln=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(H(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=cn.get(i);o||(o={},cn.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=he(e),n=i[e]!==void 0;if(t)U(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)U(!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},un=new WeakMap;function dn(e,t,n,r,i){let a=n[e.id];if(H(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=un.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{H(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=_e(e),o=a[e]!==void 0;i?U(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?U(!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 un.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=ln({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 fn(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 pn(e){return e.matches.some(e=>e.route.middleware)?mn(e,()=>fn(e)):fn(e)}function mn(e,t){return hn(e,t,e=>{if(Jn(e))throw e;return e},Vn,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{[Fn(r,a).route.id]:{type:`error`,result:t}}}}}async function hn(e,t,n,r,i){let{matches:a,...o}=e;return await gn(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function gn(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 gn(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 _n(e,t,n,r,i){let a=ln({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=dn(r.route,Q(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function vn(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=_n(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?an(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?an(a,{...l,defaultShouldRevalidate:e}):an(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)?xn({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 yn(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?vn(e,t,n,r,lt(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:_n(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function bn(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:ut(t,n),pattern:lt(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 mn(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 xn({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:ut(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 Sn(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 Cn(e){let{result:t,type:n}=e;if(Kn(t)){let e;try{e=await Sn(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new st(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?Gn(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:Bn(t),statusCode:ct(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:ct(t)?t.status:void 0}:Gn(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 wn(e,t,n,r,i){let a=e.headers.get(`Location`);if(H(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!Ge(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=Zt(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Tn=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function En(e){try{return Tn.includes(new URL(e).protocol)}catch{return!1}}function Dn(e,t,n,r){if(Ge(e)){let r=e,i=ae.test(r)?new URL(V(r,t.protocol)):new URL(r);if(En(i.toString()))throw Error(`Invalid redirect location`);let a=Ue(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Qe(i.pathname)+i.search+i.hash}try{if(En(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function On(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)):t===`text/plain`?a.body=r.text:t===`application/x-www-form-urlencoded`&&r.formData?a.body=kn(r.formData):a.body=r.formData}
1return new Request(i,a)}function kn(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function An(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function jn(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(H(!Wn(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=Fn(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=Kt),c||(c=!0,s=ct(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 Mn(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=jn(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(H(s,`Did not find corresponding fetcher result`),Z(s)){let t=Fn(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(Wn(s))H(!1,`Unhandled fetcher revalidation redirect`);else{let e=ir(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function Nn(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==Kt).reduce((e,[t,n])=>(e[t]=n,e),{}),a=0;for(let o of n){let n=o.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&o.route.loader&&(i[n]=e[n],a++),r&&r.hasOwnProperty(n))break}return Object.keys(t).length===0&&a===Object.keys(e).length?e:i}function Pn(e){return e?Z(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Fn(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 In(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 st(e||500,o,Error(s),!0)}function Ln(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(Wn(r))return{key:n,result:r}}}function Rn(e){return G({...typeof e==`string`?K(e):e,hash:``})}function zn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash?!0:t.hash!==``}function Bn(e){return new st(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function Vn(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&Hn(t))}function Hn(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function Un(e){return Kn(e.result)&&Bt.has(e.result.status)}function Z(e){return e.type===`error`}function Wn(e){return(e&&e.type)===`redirect`}function Gn(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function Kn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function qn(e){return Bt.has(e)}function Jn(e){return Kn(e)&&qn(e.status)&&e.headers.has(`Location`)}function Yn(e){return zt.has(e.toUpperCase())}function Q(e){return Lt.has(e.toUpperCase())}function Xn(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function Zn(e,t){let n=typeof t==`string`?K(t).search:t.search;if(e[e.length-1].route.index&&Xn(n||``))return e[e.length-1];let r=Ye(e);return r[r.length-1]}function Qn(e,t,n){return{url:ut(e.createURL(t),t),pattern:n?lt(n):``,params:n?.[0]?.params?{...n[0].params}:{}}}function $n(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 er(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 tr(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 nr(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 rr(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 ir(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 ar(e,t){try{let n=e.sessionStorage.getItem(Gt);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 or(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Gt,JSON.stringify(n))}catch(e){U(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function sr(){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 cr=_.createContext(null);cr.displayName=`DataRouter`;var lr=_.createContext(null);lr.displayName=`DataRouterState`;var ur=_.createContext(null);ur.displayName=`DataRouterData`;var dr=_.createContext(null);dr.displayName=`DataRouterNavigation`;var fr=_.createContext(!1);function pr(){return _.useContext(fr)}var mr=_.createContext({isTransitioning:!1});mr.displayName=`ViewTransition`;var hr=_.createContext(null);hr.displayName=`Fetchers`;var gr=_.createContext(null);
1gr.displayName=`Await`;var _r=_.createContext(null);_r.displayName=`Navigation`;var vr=_.createContext(null);vr.displayName=`Location`;var yr=_.createContext({outlet:null,matches:[],isDataRoute:!1});yr.displayName=`Route`;var br=_.createContext(!1);br.displayName=`IsDataRoute`;var xr=_.createContext(void 0);xr.displayName=`RouteId`;var Sr=_.createContext(null);Sr.displayName=`RouteError`;var Cr=`REACT_ROUTER_ERROR`,wr=`REDIRECT`,Tr=`ROUTE_ERROR_RESPONSE`;function Er(e){if(e.startsWith(`${Cr}:${wr}:{`))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 Dr(e){if(e.startsWith(`${Cr}:${Tr}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new st(t.status,t.statusText,t.data)}catch{}}function Or(e,{relative:t}={}){H(kr(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=_.useContext(_r),{hash:i,pathname:a,search:o}=Lr(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Y([n,a])),r.createHref({pathname:s,search:o,hash:i})}function kr(){return _.useContext(vr)!=null}function Ar(){return H(kr(),`useLocation() may be used only in the context of a <Router> component.`),_.useContext(vr).location}var jr=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Mr(){return _.useContext(br)?ii():Nr()}function Nr(){H(kr(),`useNavigate() may be used only in the context of a <Router> component.`);let e=_.useContext(cr),{basename:t,navigator:n}=_.useContext(_r),{matches:r}=_.useContext(yr),{pathname:i}=Ar(),a=JSON.stringify(Xe(r)),o=_.useRef(!1);return _.useLayoutEffect(()=>{o.current=!0}),_.useCallback((r,s={})=>{if(U(o.current,jr),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Ze(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Y([t,c.pathname])),Ft(typeof r==`string`?r:G(r),n.createHref(c),Mt(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var Pr=_.createContext(null);function Fr(e){let t=_.useContext(yr).outlet;return _.useMemo(()=>t&&_.createElement(Pr.Provider,{value:e},t),[t,e])}function Ir(){let{matches:e}=_.useContext(yr);return e[e.length-1]?.params??{}}function Lr(e,{relative:t}={}){let{matches:n}=_.useContext(yr),{pathname:r}=Ar(),i=JSON.stringify(Xe(n));return _.useMemo(()=>Ze(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Rr(e,t,n){H(kr(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=_.useContext(_r),{matches:i}=_.useContext(yr),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=Ar(),l;if(t){let e=typeof t==`string`?K(t):t;H(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;f=n?n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):n.router.match(n.state.location):Se(e,{pathname:d});let p=Gr(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Y([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:Y([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?_.createElement(vr.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function zr(){let e=ri(),t=ct(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return _.createElement(_.Fragment,null,_.createElement(`h2`,null,`Unexpected Application
1Error!`),_.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?_.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var Br=_.createElement(zr,null),Vr=class extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=fr;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=Dr(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:_.createElement(yr.Provider,{value:this.props.routeContext},_.createElement(br.Provider,{value:this.props.routeContext.isDataRoute},_.createElement(xr.Provider,{value:this.props.routeContext.matches[this.props.routeContext.matches.length-1]?.route.id},_.createElement(Sr.Provider,{value:e,children:this.props.component}))));return this.context?_.createElement(Ur,{error:e},t):t}},Hr=new WeakMap;function Ur({children:e,error:t}){let{basename:n,navigator:r}=_.useContext(_r);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Er(t.digest);if(e){let i=Hr.get(t);if(i)throw i;let a=ft(e.location,n),o=a.absoluteURL||a.to;if(Ft(e.location,o,Mt(r),`allow-explicit`),En(o))throw Error(`Invalid redirect location`);if(dt&&!Hr.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 Hr.set(t,n),n}return _.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function Wr({routeContext:e,match:t,children:n}){let r=_.useContext(cr);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(yr.Provider,{value:e},_.createElement(br.Provider,{value:e.isDataRoute},_.createElement(xr.Provider,{value:t.route.id},n)))}function Gr(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);H(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:lt(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||Br,o&&(s<0&&c===0?(oi(`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?_.createElement(n.route.Component,null):n.route.element?n.route.element:e,_.createElement(Wr,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?_.createElement(Vr,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function Kr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qr(e){let t=_.useContext(cr);return H(t,Kr(e)),t}function Jr(e){let t=_.useContext(lr);return H(t,Kr(e)),t}function Yr(e){let t=_.useContext(hr);return H(t,Kr(e)),t}function Xr(e){let t=_.useContext(ur);return H(t,Kr(e)),t}function Zr(e){let t=_.useContext(dr);return H(t,Kr(e)),t}function Qr(e){let t=_.useContext(xr);return H(t,`${e} can only be used on routes that contain a unique "id"`),t}function $r(){let{navigation:e}=Zr(`useNavigation`);return _.useMemo(()=>{let{matches:t,historyAction:n,...r}=e;return r},[e])}function ei(){let{matches:e}=Jr(`useMatches`),{loaderData:t}=Xr(`useMatches`);return _.useMemo(()=>e.map(e=>we(e,t)),[e,t])}function ti(){let e=Xr(`useLoaderData`),t=Qr(`useLoaderData`);return e.loaderData[t]}function ni(){let e=Xr(`useActionData`),t=Qr(`useActionData`);return e.actionData?e.actionData[t]:void 0}function ri(){let e=_.useContext(Sr),t=Xr(`useRouteError`),n=Qr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function ii(){let{router:e}=qr(`useNavigate`),t=Qr(`useNavigate`),n=_.useRef(!1);return _.useLayoutEffect(()=>{n.current=!0}),_.useCallback(async(r,i={})=>{U(n.current,jr),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var ai={};function oi(e,t,n){!t&&!ai[e]&&(ai[e]=!0,U(!1,n))}var si={};function ci(e,t){!e&&!si[t]&&(si[t]=!0,console.warn(t))}var li=[`HydrateFallback`,`hydrateFallbackElement`],ui=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 di({router:e,flushSync:t,onError:n,useTransitions:r}){r=pr()||r;let[i,a]=_.useState(e.state),[o,s]=(0,_.useOptimistic)(i),[c,l]=_.useState(),[u,d]=_.useState({isTransitioning:!1}),[f,p]=_.useState(),[m,h]=_.useState(),[g,v]=_.useState(),y=_.useRef(new Map),b=_.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:lt(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),o.forEach(e=>y.current.delete(e)),ci(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 b=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(ci(g==null||b,"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||!b){t&&u?t(()=>a(i)):r===!1?a(i):_.startTransition(()=>{r===!0&&s(e=>fi(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(),v({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]);_.useLayoutEffect(()=>e.subscribe(b),[e,b]),_.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new ui)},[u]),_.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):_.startTransition(()=>{r===!0&&s(e=>fi(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]),_.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),_.useEffect(()=>{!u.isTransitioning&&g&&(l(g.state),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),v(void 0))},[u.isTransitioning,g]);let x=_.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]),S=e.basename||`/`,C=_.useMemo(()=>({router:e,navigator:x,static:!1,basename:S,onError:n}),[e,x,S,n]),w=_.useMemo(()=>({historyAction:o.historyAction,location:o.location,matches:o.matches,initialized:o.initialized,renderFallback:o.renderFallback,restoreScrollPosition:o.restoreScrollPosition,preventScrollReset:o.preventScrollReset,blockers:o.blockers}),[o.historyAction,o.location,o.matches,o.initialized,o.renderFallback,o.restoreScrollPosition,o.preventScrollReset,o.blockers]),T=_.useMemo(()=>({navigation:o.navigation,revalidation:o.revalidation}),[o.navigation,o.revalidation]),E=_.useMemo(()=>({loaderData:o.loaderData,actionData:o.actionData,errors:o.errors}),[o.loaderData,o.actionData,o.errors]),D=_.useMemo(()=>({fetchers:o.fetchers,fetcherData:y.current}),[o.fetchers]);return _.createElement(_.Fragment,null,_.createElement(cr.Provider,{value:C},_.createElement(lr.Provider,{value:w},_.createElement(dr.Provider,{value:T},_.createElement(ur.Provider,{value:E},_.createElement(hr.Provider,{value:D},_.createElement(mr.Provider,{value:u},_.createElement(gi,{basename:S,location:o.location,navigationType:o.historyAction,navigator:x,useTransitions:r},_.createElement(pi,{routes:e.routes,manifest:e.manifest,state:o,isStatic:!1,onError:n})))))))),null)}function fi(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 pi=_.memo(mi);function mi({routes:e,manifest:t,state:n,isStatic:r,onError:i}){let a=_.useContext(cr);return H(a,`You must render this element inside a <DataRouterContext.Provider> element`),Rr(e,void 0,{router:a.router,manifest:t,state:n,isStatic:r,onError:i})}function hi(e){return Fr(e.context)}function gi({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){H(!kr(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=_.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=K(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=_.useMemo(()=>{let e=Ue(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 U(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:_.createElement(_r.Provider,{value:c},_.createElement(vr.Provider,{children:t,value:h}))}_.Component;function _i(){return{params:Ir(),loaderData:ti(),actionData:ni(),matches:ei()}}function vi(e){return function(){let t=_i();return _.createElement(e,t)}}function yi(){return{params:Ir(),loaderData:ti(),actionData:ni(),error:ri()}}function bi(e){return function(){let t=yi();return _.createElement(e,t)}}function $(e,t){if(e===!1||e==null)throw Error(t)}var xi={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Si=/[&><\u2028\u2029]/g;function Ci(e){return e.replace(Si,e=>xi[e])}var wi=class{promise;resolve;reject;constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};function Ti(){let e=new TextDecoder,t=``;return new TransformStream({transform(n,r){let i=e.decode(n,{stream:!0}),a=(t+i).split(` 2`);t=a.pop()||``;for(let e of a)r.enqueue(e)},flush(e){t&&e.enqueue(t)}})}var Ei=typeof window<`u`?window:typeof globalThis<`u`?globalThis:void 0;function Di(e){let{hydrated:t,values:n}=this;if(typeof e==`number`)return Oi.call(this,e);if(!Array.isArray(e)||!e.length)throw SyntaxError();let r=n.length;for(let t of e)n.push(t);return t.length=n.length,Oi.call(this,r)}function Oi(e){let{hydrated:t,values:n,deferred:r,plugins:i}=this,a,o=[[e,e=>{a=e}]],s=[];for(;o.length>0;){let[e,a]=o.pop();switch(e){case-7:a(void 0);continue;case-5:a(null);continue;case-2:a(NaN);continue;case-6:a(1/0);continue;case-3:a(-1/0);continue;case-4:a(-0);continue}if(t[e]){a(t[e]);continue}let c=n[e];if(!c||typeof c!=`object`){t[e]=c,a(c);continue}if(Array.isArray(c))if(typeof c[0]==`string`){let[n,l,u]=c;switch(n){case`D`:a(t[e]=new Date(l));continue;case`U`:a(t[e]=new URL(l));continue;case`B`:a(t[e]=BigInt(l));continue;case`R`:a(t[e]=new RegExp(l,u));continue;case`Y`:a(t[e]=Symbol.for(l));continue;case`S`:let n=new Set;t[e]=n;for(let e=c.length-1;e>0;e--)o.push([c[e],e=>{n.add(e)}]);a(n);continue;case`M`:let d=new Map;t[e]=d;for(let e=c.length-2;e>0;e-=2){let t=[];o.push([c[e+1],e=>{t[1]=e}]),o.push([c[e],e=>{t[0]=e}]),s.push(()=>{d.set(t[0],t[1])})}a(d);continue;case`N`:let f=Object.create(null);t[e]=f;for(let e of Object.keys(l).reverse()){let t=[];o.push([l[e],e=>{t[1]=e}]),o.push([Number(e.slice(1)),e=>{t[0]=e}]),s.push(()=>{f[t[0]]=t[1]})}a(f);continue;case`P`:if(t[l])a(t[e]=t[l]);else{let n=new wi;r[l]=n,a(t[e]=n.promise)}continue;case`E`:let[,p,m]=c,h=m&&Ei&&ot.includes(m)&&m in Ei&&typeof Ei[m]==`function`?new Ei[m](p):Error(p);t[e]=h,a(h);continue;case`Z`:a(t[e]=t[l]);continue;default:if(Array.isArray(i)){let n=[],r=c.slice(1);for(let e=0;e<r.length;e++){let t=r[e];o.push([t,t=>{n[e]=t}])}s.push(()=>{for(let r of i){let i=r(c[0],...n);if(i){a(t[e]=i.value);return}}throw SyntaxError()});continue}throw SyntaxError()}}else{let n=[];t[e]=n;for(let e=0;e<c.length;e++){let t=c[e];t!==-1&&o.push([t,t=>{n[e]=t}])}a(n);continue}else{let n={};t[e]=n;for(let e of Object.keys(c).reverse()){let t=[];o.push([c[e],e=>{t[1]=e}]),o.push([Number(e.slice(1)),e=>{t[0]=e}]),s.push(()=>{n[t[0]]=t[1]})}a(n);continue}}for(;s.length>0;)s.pop()();return a}async function ki(e,t){let{plugins:n}=t??{},r=new wi,i=e.pipeThrough(Ti()).getReader(),a={values:[],hydrated:[],deferred:{},plugins:n},o=await Ai.call(a,i),s=r.promise;return o.done?r.resolve():s=ji.call(a,i).then(r.resolve).catch(e=>{for(let t of Object.values(a.deferred))t.reject(e);r.reject(e)}),{done:s.then(()=>i.closed),value:o.value}}async function Ai(e){let t=await e.read();if(!t.value)throw SyntaxError();let n;try{n=JSON.parse(t.value)}catch{throw SyntaxError()}return{done:t.done,value:Di.call(this,n)}}async function ji(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;let n=t.value;switch(n[0]){case`P`:{let e=n.indexOf(`:`),t=Number(n.slice(1,e)),r=this.deferred[t];if(!r)throw Error(`Deferred ID ${t} not found in stream`);let i=n.slice(e+1),a;try{a=JSON.parse(i)}catch{throw SyntaxError()}let o=Di.call(this,a);r.resolve(o);break}case`E`:{let e=n.indexOf(`:`),t=Number(n.slice(1,e)),r=this.deferred[t];if(!r)throw Error(`Deferred ID ${t} not found in stream`);let i=n.slice(e+1),a;try{a=JSON.parse(i)}catch{throw SyntaxError()}let o=Di.call(this,a);r.reject(o);break}default:throw SyntaxError()}t=await e.read()}}async function Mi(e){let t={signal:e.signal};if(e.method!==`GET`){t.method=e.method;let n=e.headers.get(`Content-Type`);n&&/\bapplication\/json\b/.test(n)?(t.headers={"Content-Type":n},t.body=JSON.stringify(await e.json())):n&&/\btext\/plain\b/.test(n)?(t.headers={"Content-Type":n},t.body=await e.text()):n&&/\bapplication\/x-www-form-urlencoded\b/.test(n)?t.body=new URLSearchParams(await e.text()):t.body=await e.formData()}return t}
2var Ni=Symbol(`SingleFetchRedirect`),Pi=class extends Error{},Fi=new Set([100,101,204,205]);function Ii(e,t,n,r){let i=Li(e,e=>{let n=t.routes[e.route.id];return $(n,`Route not found in manifest`),{hasLoader:n.hasLoader,hasClientLoader:n.hasClientLoader}},Gi,r);return async e=>e.runClientMiddleware(i)}function Li(e,t,n,r,i=()=>!0){return async a=>{let{request:o,matches:s,fetcherKey:c}=a,l=e();if(o.method!==`GET`)return Ri(a,n);let u=s.some(e=>{let{hasLoader:n,hasClientLoader:r}=t(e);return e.shouldCallHandler()&&n&&!r});return!r&&!u?zi(a,t,n):c?Hi(a,n):Bi(a,l,t,n,r,i)}}async function Ri(e,t){let n=e.matches.find(e=>e.shouldCallHandler());$(n,`No action match found`);let r,i=await n.resolve(async i=>await i(async()=>{let{data:i,status:a}=await t(e,[n.route.id]);return r=a,qi(i,n.route.id)}));return Kn(i.result)||ct(i.result)||Gn(i.result)?{[n.route.id]:i}:{[n.route.id]:{type:i.type,result:it(i.result,r)}}}async function zi(e,t,n){let r=e.matches.filter(e=>e.shouldCallHandler()),i={};return await Promise.all(r.map(async r=>{let a=r.route.id;i[a]=await r.resolve(async i=>{let{hasClientLoader:o}=t(r);return o?i(async()=>{let{data:t}=await n(e,[a]);return qi(t,a)}):i()})})),i}async function Bi(e,t,n,r,i,a=()=>!0){let o=new Set,s=!1,c=e.matches.map(()=>Ji()),l=Ji(),u={},d=Promise.all(e.matches.map(async(t,i)=>t.resolve(async d=>{c[i].resolve();let f=t.route.id,{hasLoader:p,hasClientLoader:m}=n(t),h=!t.shouldRevalidateArgs||t.shouldRevalidateArgs.actionStatus==null||t.shouldRevalidateArgs.actionStatus<400;if(!t.shouldCallHandler(h)){s||=t.shouldRevalidateArgs!=null&&p;return}if(a(t)&&m){p&&(s=!0);try{u[f]={type:`data`,result:await d(async()=>{let{data:t}=await r(e,[f]);return qi(t,f)})}}catch(e){u[f]={type:`error`,result:e}}return}p&&o.add(f);try{u[f]={type:`data`,result:await d(async()=>qi(await l.promise,f))}}catch(e){u[f]={type:`error`,result:e}}})));if(await Promise.all(c.map(e=>e.promise)),(!t.state.initialized&&t.state.navigation.state===`idle`||o.size===0)&&!window.__reactRouterHdrActive)l.resolve({routes:{}});else{let t=i&&s&&o.size>0?[...o.keys()]:void 0;try{let n=await r(e,t);l.resolve(n.data)}catch(e){l.reject(e)}}return await d,await Vi(l.promise,e.matches,o,u),u}async function Vi(e,t,n,r){try{let i,a=await e;if(`routes`in a){for(let e of t)if(e.route.id in a.routes){let t=a.routes[e.route.id];if(`error`in t){i=t.error,r[e.route.id]?.result??(r[e.route.id]={type:`error`,result:i});break}}}i!==void 0&&Array.from(n.values()).forEach(e=>{r[e].result instanceof Pi&&(r[e].result=i)})}catch{}}async function Hi(e,t){let n=e.matches.find(e=>e.shouldCallHandler());$(n,`No fetcher match found`);let r=n.route.id,i=await n.resolve(async n=>n(async()=>{let{data:n}=await t(e,[r]);return qi(n,r)}));return{[n.route.id]:i}}function Ui(e){let t=e.searchParams.getAll(`index`);e.searchParams.delete(`index`);let n=[];for(let e of t)e&&n.push(e);for(let t of n)e.searchParams.append(`index`,t);return e}function Wi(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname.endsWith(`/`)?n.pathname=`${n.pathname}_.${t}`:n.pathname=`${n.pathname}.${t}`,n}async function Gi(e,t){let{request:n}=e,r=Wi(n.url,`data`);n.method===`GET`&&(r=Ui(r),t&&r.searchParams.set(`_routes`,t.join(`,`)));let i=await fetch(r,await Mi(n));if(i.status>=400&&!i.headers.has(`X-Remix-Response`))throw new st(i.status,i.statusText,await i.text());if(i.status===204&&i.headers.has(`X-Remix-Redirect`))return{status:202,data:{redirect:{redirect:i.headers.get(`X-Remix-Redirect`),status:Number(i.headers.get(`X-Remix-Status`)||`302`),revalidate:i.headers.get(`X-Remix-Revalidate`)===`true`,reload:i.headers.get(`X-Remix-Reload-Document`)===`true`,replace:i.headers.get(`X-Remix-Replace`)===`true`}}};if(Fi.has(i.status)){let e={};return t&&n.method!==`GET`&&(e[t[0]]={data:void 0}),{status:i.status,data:{routes:e}}}$(i.body,`No response body to decode`);try{let e=await Ki(i.body,window),r;if(n.method===`GET`){let t=e.value;r=Ni in t?{redirect:t[Ni]}:{routes:t}}else{let n=e.value,i=t?.[0];$(i,`No routeId found for single fetch call decoding`),r=`redirect`in n?{redirect:n}:{routes:{[i]:n}}}return{status:i.status,data:r}}catch(e){throw Error(`Unable to decode turbo-stream response`,{cause:e})}}function Ki(e,t){return ki(e,{plugins:[(e,...n)=>{if(e===`SanitizedError`){let[e,r,i]=n,a=Error;e&&ot.includes(e)&&e in t&&typeof t[e]==`function`&&(a=t[e]);let o=new a(r);return o.stack=i,{value:o}}if(e===`ErrorResponse`){let[e,t,r]=n;return{value:new st(t,r,e)}}if(e===`SingleFetchRedirect`)return{value:{[Ni]:n[0]}};if(e===`SingleFetchClassInstance`)return{value:n[0]};if(e===`SingleFetchFallback`)return{value:void 0}}]})}function qi(e,t){if(`redirect`in e){let{redirect:t,revalidate:n,reload:r,replace:i,status:a}=e.redirect;throw at(t,{status:a,headers:{...n?{"X-Remix-Revalidate":`yes`}:null,...r?{"X-Remix-Reload-Document":`yes`}:null,...i?{"X-Remix-Replace":`yes`}:null}})}let n=e.routes[t];if(n==null)throw new Pi(`No result found for routeId "${t}"`);if(`error`in n)throw n.error;if(`data`in n)return n.data;throw Error(`Invalid response found for routeId "${t}"`)}function Ji(){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}}async function Yi(e,t){if(e.id in t)return t[e.id];try{let n=await f(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.
2isSpaMode,window.location.reload(),new Promise(()=>{})}}function Xi(e,t,n){return ca(e.map(e=>{let r=t[e.route.id],i=n.routes[e.route.id];return[i&&i.css?i.css.map(e=>({rel:`stylesheet`,href:e})):[],r?.links?.()||[]]}).flat(2),aa(e,n))}function Zi(e){return e.css?e.css.map(e=>({rel:`stylesheet`,href:e})):[]}async function Qi(e){if(!e.css)return;let t=Zi(e);await Promise.all(t.map(ea))}async function $i(e,t){if(!e.css&&!t.links||!ua())return;let n=[];if(e.css&&n.push(...Zi(e)),t.links&&n.push(...t.links()),n.length===0)return;let r=[];for(let e of n)!ta(e)&&e.rel===`stylesheet`&&r.push({...e,rel:`preload`,as:`style`});await Promise.all(r.map(ea))}async function ea(e){return new Promise(t=>{if(e.media&&!window.matchMedia(e.media).matches||document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`))return t();let n=document.createElement(`link`);Object.assign(n,e);function r(){document.head.contains(n)&&document.head.removeChild(n)}n.onload=()=>{r(),t()},n.onerror=()=>{r(),t()},document.head.appendChild(n)})}function ta(e){return e!=null&&typeof e.page==`string`}function na(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function ra(e,t,n){return ca((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Yi(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(na).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function ia(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function aa(e,t,{includeHydrateFallback:n}={}){return oa(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function oa(e){return[...new Set(e)]}function sa(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function ca(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!ta(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(sa(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}var la;function ua(){if(la!==void 0)return la;let e=document.createElement(`link`);return la=e.relList.supports(`preload`),e=null,la}function da(){let{nonce:e}=Ba();return _.createElement(io,{title:`Loading...`,renderScripts:!0},null)}function fa(e){let t={};return Object.values(e).forEach(e=>{if(e){let n=e.parentId||``;t[n]||(t[n]=[]),t[n].push(e)}}),t}function pa(e,t,n){let r=xa(t),i=t.HydrateFallback&&(!n||e.id===`root`)?t.HydrateFallback:e.id===`root`?da:void 0,a=t.ErrorBoundary?t.ErrorBoundary:e.id===`root`?()=>_.createElement(ro,{error:ri()}):void 0;return e.id===`root`&&t.Layout?{...r?{element:_.createElement(t.Layout,null,_.createElement(r,null))}:{Component:r},...a?{errorElement:_.createElement(t.Layout,null,_.createElement(a,null))}:{ErrorBoundary:a},...i?{hydrateFallbackElement:_.createElement(t.Layout,null,_.createElement(i,null))}:{HydrateFallback:i}}:{Component:r,ErrorBoundary:a,HydrateFallback:i}}function ma(e,t,n,r,i,a){return _a(t,n,r,i,a,``,fa(t),e)}function ha(e,t){if(e===`loader`&&!t.hasLoader||e===`action`&&!t.hasAction){let n=`You are trying to call ${e===`action`?`serverAction()`:`serverLoader()`} on a route that does not have a server ${e} (routeId: "${t.id}")`;throw console.error(n),new st(400,`Bad Request`,Error(n),!0)}}function ga(e,t){let n=e===`clientAction`?`a`:`an`,r=`Route "${t}" does not have ${n} ${e}, but you are trying to submit to it. To fix this, please add ${n} \`${e}\` function to the route`;throw console.error(r),new st(405,`Method Not Allowed`,Error(r),!0)}function _a(e,t,n,r,i,a=``,o=fa(e),s){return(o[a]||[]).map(a=>{let c=t[a.id];function l(e){return $(typeof e==`function`,`No single fetch function available for route handler`),e()}function u(e){return a.hasLoader?l(e):Promise.resolve(null)}function d(e){if(!a.hasAction)throw ga(`action`,a.id);return l(e)}function p(e){f(()=>import(e),[])}function m(e){e.clientActionModule&&p(e.clientActionModule),e.clientLoaderModule&&p(e.clientLoaderModule)}async function h(e){let n=t[a.id],r=n?$i(a,n):Promise.resolve();try{return e()}finally{await r}}let g={id:a.id,index:a.index,path:a.path};if(c){Object.assign(g,{...g,...pa(a,c,i),middleware:c.clientMiddleware,handle:c.handle,shouldRevalidate:va(g.path,c,a,r,s)});let e=n&&n.loaderData&&a.id in n.loaderData,t=e?n?.loaderData?.[a.id]:void 0,o=n&&n.errors&&a.id in n.errors,l=o?n?.errors?.[a.id]:void 0,f=s==null&&(c.clientLoader?.hydrate===!0||!a.hasLoader);g.loader=async({request:n,params:r,context:i,pattern:s,url:d},p)=>{let m=f;return f=!1,await h(async()=>($(c,"No `routeModule` available for critical-route loader"),c.clientLoader?c.clientLoader({request:n,params:r,context:i,pattern:s,url:d,async serverLoader(){if
2(ha(`loader`,a),m){if(e)return t;if(o)throw l}return u(p)}}):u(p)))},g.loader.hydrate=Sa(a.id,c.clientLoader,a.hasLoader,i),g.action=({request:e,params:t,context:n,pattern:r,url:o},s)=>h(async()=>{if($(c,"No `routeModule` available for critical-route action"),!c.clientAction){if(i)throw ga(`clientAction`,a.id);return d(s)}return c.clientAction({request:e,params:t,context:n,pattern:r,url:o,async serverAction(){return ha(`action`,a),d(s)}})})}else{a.hasClientLoader||(g.loader=(e,t)=>h(()=>u(t))),a.hasClientAction||(g.action=(e,t)=>h(()=>{if(i)throw ga(`clientAction`,a.id);return d(t)}));let e;async function n(){return e||=(async()=>{(a.clientLoaderModule||a.clientActionModule)&&await new Promise(e=>setTimeout(e,0));let e=ba(a,t);return m(a),await e})(),await e}g.lazy={loader:a.hasClientLoader?async()=>{let{clientLoader:e}=a.clientLoaderModule?await f(()=>import(a.clientLoaderModule),[]):await n();return $(e,"No `clientLoader` export found"),(t,n)=>e({...t,async serverLoader(){return ha(`loader`,a),u(n)}})}:void 0,action:a.hasClientAction?async()=>{let e=a.clientActionModule?f(()=>import(a.clientActionModule),[]):n();m(a);let{clientAction:t}=await e;return $(t,"No `clientAction` export found"),(e,n)=>t({...e,async serverAction(){return ha(`action`,a),d(n)}})}:void 0,middleware:a.hasClientMiddleware?async()=>{let{clientMiddleware:e}=a.clientMiddlewareModule?await f(()=>import(a.clientMiddlewareModule),[]):await n();return $(e,"No `clientMiddleware` export found"),e}:void 0,shouldRevalidate:async()=>{let e=await n();return va(g.path,e,a,r,s)},handle:async()=>(await n()).handle,Component:async()=>(await n()).Component,ErrorBoundary:a.hasErrorBoundary?async()=>(await n()).ErrorBoundary:void 0}}let _=_a(e,t,n,r,i,a.id,o,s);return _.length>0&&(g.children=_),g})}function va(e,t,n,r,i){if(i)return ya(n.id,t.shouldRevalidate,i);if(!r&&n.hasLoader&&!n.hasClientLoader){let n=e?Ve(e)[1].map(e=>e.paramName):[],r=e=>n.some(t=>e.currentParams[t]!==e.nextParams[t]);if(t.shouldRevalidate){let e=t.shouldRevalidate;return t=>e({...t,defaultShouldRevalidate:r(t)})}else return e=>r(e)}return t.shouldRevalidate}function ya(e,t,n){let r=!1;return i=>r?t?t(i):i.defaultShouldRevalidate:(r=!0,n.has(e))}async function ba(e,t){let n=Yi(e,t),r=Qi(e),i=await n;return await Promise.all([r,$i(e,i)]),{Component:xa(i),ErrorBoundary:i.ErrorBoundary,clientMiddleware:i.clientMiddleware,clientAction:i.clientAction,clientLoader:i.clientLoader,handle:i.handle,links:i.links,meta:i.meta,shouldRevalidate:i.shouldRevalidate}}function xa(e){if(e.default!=null&&!(typeof e.default==`object`&&Object.keys(e.default).length===0))return e.default}function Sa(e,t,n,r){return r&&e!==`root`||t!=null&&(t.hydrate===!0||n!==!0)}var Ca=new Set,wa=1e3,Ta=new Set;function Ea(e){let t=new Set;return e.forEach(e=>{e.startsWith(`/`)||(e=`/${e}`);for(let n=1;n<e.length;n++)e[n]===`/`&&t.add(e.slice(0,n));t.add(e)}),Array.from(t)}function Da(e,t){return e.mode===`lazy`&&t===!0}function Oa({sri:e,...t},n){let r=new Set(n.state.matches.map(e=>e.route.id)),i=n.state.location.pathname.split(`/`).filter(Boolean),a=[`/`];for(i.pop();i.length>0;)a.push(`/${i.join(`/`)}`),i.pop();a.forEach(e=>{let t=n.match(e);t&&t.forEach(e=>r.add(e.route.id))});let o=[...r].reduce((e,n)=>Object.assign(e,{[n]:t.routes[n]}),{});return{...t,routes:o,sri:e?!0:void 0}}function ka(e,t,n,r,i,a,o){if(Da(i,r))return async({path:s,patch:c,signal:l,fetcherKey:u})=>{if(Ta.has(s))return;let{state:d}=e();await Ia([s],u?window.location.href:G(d.navigation.location||d.location),t,n,r,a,o,i.manifestPath,c,l)}}function Aa(e,t,n,r,i,a){_.useEffect(()=>{if(!Da(i,r)||window.navigator?.connection?.saveData===!0)return;function o(e){let t=e.tagName===`FORM`?e.getAttribute(`action`):e.getAttribute(`href`);if(!t)return;let n=e.tagName===`A`?e.pathname:new URL(t,window.location.origin).pathname;Ta.has(n)||Ca.add(n)}async function s(){document.querySelectorAll(`a[data-discover], form[data-discover]`).forEach(o);let s=Array.from(Ca.keys()).filter(e=>Ta.has(e)?(Ca.delete(e),!1):!0);if(s.length!==0)try{await Ia(s,null,t,n,r,a,e.basename,i.manifestPath,e.patchRoutes)}catch(e){console.error(`Failed to fetch manifest patches`,e)}}let c=Ra(s,100);s();let l=new MutationObserver(()=>c());return l.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`data-discover`,`href`,`action`]}),()=>l.disconnect()},[r,a,t,n,e,i])}function ja(e,t){let n=e||`/__manifest`;return t==null?n:Y([t,n])}var Ma=`react-router-manifest-version`,Na=5e3,Pa;
2async function Fa(e,t,n){if(Pa)return Pa;if(!e){try{sessionStorage.removeItem(Ma)}catch{}return!1}if(!n)return console.warn(`Detected a manifest version mismatch during eager route discovery. The next navigation/fetch to an undiscovered route will result in a new document navigation to sync up with the latest manifest.`),!0;let r=!1;try{r=sessionStorage.getItem(Ma)===t,r||sessionStorage.setItem(Ma,t)}catch{}if(r)throw Error(`Unable to discover routes due to manifest version mismatch.`);let i,a=new Promise((e,t)=>{i=t});Pa=a;let o=()=>{clearTimeout(s),window.removeEventListener(`pageshow`,c),Pa=void 0,i(Error(`Unable to discover routes due to manifest version mismatch.`))},s=setTimeout(o,Na),c=e=>{e.persisted&&o()};window.addEventListener(`pageshow`,c);try{window.location.href=n,console.warn(`Detected manifest version mismatch, reloading...`)}catch{o()}return a}async function Ia(e,t,n,r,i,a,o,s,c,l){e=Ea(e);let u=new URLSearchParams;u.set(`paths`,e.sort().join(`,`)),u.set(`version`,n.version);let d=new URL(ja(s,o),window.location.origin);if(d.search=u.toString(),d.toString().length>7680){Ca.clear();return}let f;try{let e=await fetch(d,{signal:l});if(!e.ok)throw Error(`${e.status} ${e.statusText}`);if(await Fa(e.status===204&&e.headers.has(`X-Remix-Reload-Document`),n.version,t))return;f=await e.json()}catch(e){if(l?.aborted)return;throw e}if(l?.aborted)return;let p=new Set(Object.keys(n.routes)),m=Object.values(f).reduce((e,t)=>(t&&!p.has(t.id)&&(e[t.id]=t),e),{});Object.assign(n.routes,m),e.forEach(e=>La(e,Ta));let h=new Set;Object.values(m).forEach(e=>{e&&(!e.parentId||!m[e.parentId])&&h.add(e.parentId)}),h.forEach(e=>c(e||null,_a(m,r,null,i,a,e)))}function La(e,t){if(t.size>=wa){let e=t.values().next().value;e!==void 0&&t.delete(e)}t.add(e)}function Ra(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}var za=_.createContext(void 0);za.displayName=`FrameworkContext`;function Ba(){let e=_.useContext(za);return $(e,`You must render this element inside a <HydratedRouter> element`),e}function Va(e,t){let n=_.useContext(za),[r,i]=_.useState(!1),[a,o]=_.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=_.useRef(null);_.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),_.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Ha(s,p),onBlur:Ha(c,m),onMouseEnter:Ha(l,p),onMouseLeave:Ha(u,m),onTouchStart:Ha(d,p)}]:[a,f,{}]:[!1,f,{}]}function Ha(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ua(e,t,n){if(n&&!Qa)return[e[0]];if(t){let n=e.findIndex(e=>t[e.route.id]!==void 0);return e.slice(0,n+1)}return e}var Wa=`data-react-router-critical-css`;function Ga({nonce:e,crossOrigin:t}){let{isSpaMode:n,manifest:r,routeModules:i,criticalCss:a,nonce:o}=Ba(),{matches:s}=Jr(`Links`),{errors:c}=Xr(`Links`),l=Ua(s,c,n),u=_.useMemo(()=>Xi(l,i,r),[l,i,r]);return e==null&&o&&(e=o),_.createElement(_.Fragment,null,typeof a==`string`?_.createElement(`style`,{[Wa]:``,nonce:e,dangerouslySetInnerHTML:{__html:a}}):null,typeof a==`object`?_.createElement(`link`,{[Wa]:``,rel:`stylesheet`,href:a.href,nonce:e,crossOrigin:t}):null,u.map(({key:n,link:r})=>ta(r)?_.createElement(Ka,{key:n,nonce:e,...r,crossOrigin:r.crossOrigin??t}):_.createElement(`link`,{key:n,nonce:e,...r,crossOrigin:r.crossOrigin??t})))}function Ka({page:e,...t}){let n=pr(),{nonce:r}=Ba(),{router:i}=qr(`PrefetchPageLinks`),a=_.useMemo(()=>i.match(e),[i,i.routes,e]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?_.createElement(Ja,{page:e,matches:a,...t}):_.createElement(Ya,{page:e,matches:a,...t})):null}function qa(e){let{manifest:t,routeModules:n}=Ba(),[r,i]=_.useState([]);return _.useEffect(()=>{let r=!1;return ra(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Ja({page:e,matches:t,...n}){let r=Ar(),i=_.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Wi(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return _.createElement(_.Fragment,null,i.map(e=>_.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Ya({page:e,matches:t,...n}){let r=Ar(),{manifest:i,routeModules:a}=Ba(),{matches:o}=Jr(`PrefetchPageLinks`),{loaderData:s}=Xr(`PrefetchPageLinks`),c=_.useMemo(()=>ia(e,t,o,i,r,`data`),[e,t,o,i,r]),l=_.useMemo(()=>ia(e,t,o,i,r,`assets`),[e,t,o,i,r]),u=_.useMemo(()=>
2{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,o=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];!t||!t.hasLoader||(!c.some(t=>t.route.id===e.route.id)&&e.route.id in s&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?o=!0:n.add(e.route.id))}),n.size===0)return[];let l=Wi(e,`data`);return o&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[s,r,i,c,t,e,a]),d=_.useMemo(()=>aa(l,i),[l,i]),f=qa(l);return _.createElement(_.Fragment,null,u.map(e=>_.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>_.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>_.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Xa(){let{isSpaMode:e,routeModules:t}=Ba(),{matches:n}=Jr(`Meta`),{errors:r,loaderData:i}=Xr(`Meta`),a=Ar(),o=Ua(n,r,e),s=null;r&&(s=r[o[o.length-1].route.id]);let c=[],l=null,u=[];for(let e=0;e<o.length;e++){let n=o[e],r=n.route.id,d=i[r],f=n.params,p=t[r],m=[],h={id:r,loaderData:d,meta:[],params:n.params,pathname:n.pathname,handle:n.route.handle,error:s};if(u[e]=h,p?.meta?m=typeof p.meta==`function`?p.meta({loaderData:d,params:f,location:a,matches:u,error:s}):Array.isArray(p.meta)?[...p.meta]:p.meta:l&&(m=[...l]),m||=[],!Array.isArray(m))throw Error(`The route at `+n.route.path+` returns an invalid value. All route meta functions must return an array of meta objects. 3 4To reference the meta function API, see https://reactrouter.com/start/framework/route-module#meta`);h.meta=m,u[e]=h,c=[...m],l=c}return _.createElement(_.Fragment,null,c.flat().map(e=>{if(!e)return null;if(`tagName`in e){let{tagName:t,...n}=e;if(!Za(t))return console.warn(`A meta object uses an invalid tagName: ${t}. Expected either 'link' or 'meta'`),null;let r=t;return _.createElement(r,{key:JSON.stringify(n),...n})}if(`title`in e)return _.createElement(`title`,{key:`title`},String(e.title));if(`charset`in e&&(e.charSet??=e.charset,delete e.charset),`charSet`in e&&e.charSet!=null)return typeof e.charSet==`string`?_.createElement(`meta`,{key:`charSet`,charSet:e.charSet}):null;if(`script:ld+json`in e)try{let t=JSON.stringify(e[`script:ld+json`]);return _.createElement(`script`,{key:`script:ld+json:${t}`,type:`application/ld+json`,dangerouslySetInnerHTML:{__html:Ci(t)}})}catch{return null}return _.createElement(`meta`,{key:JSON.stringify(e),...e})}))}function Za(e){return typeof e==`string`&&/^(meta|link)$/.test(e)}var Qa=!1;function $a(){Qa=!0}function eo(e){let{manifest:t,serverHandoffString:n,isSpaMode:r,renderMeta:i,routeDiscovery:a,ssr:o,nonce:s}=Ba(),{router:c,static:l,staticContext:u}=qr(`Scripts`),{matches:d}=Jr(`Scripts`),f=pr(),p=Da(a,o);e.nonce==null&&s&&(e={...e,nonce:s}),i&&(i.didRenderScripts=!0);let m=Ua(d,null,r);_.useEffect(()=>{$a()},[]);let h=_.useMemo(()=>{if(f)return null;let r=u?`window.__reactRouterContext = ${n};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:` `,i=l?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:``}${p?``:`import ${JSON.stringify(t.url)}`}; 5${m.map((e,n)=>{let r=`route${n}`,i=t.routes[e.route.id];$(i,`Route ${e.route.id} not found in manifest`);let{clientActionModule:a,clientLoaderModule:o,clientMiddlewareModule:s,hydrateFallbackModule:c,module:l}=i,u=[...a?[{module:a,varName:`${r}_clientAction`}]:[],...o?[{module:o,varName:`${r}_clientLoader`}]:[],...s?[{module:s,varName:`${r}_clientMiddleware`}]:[],...c?[{module:c,varName:`${r}_HydrateFallback`}]:[],{module:l,varName:`${r}_main`}];return u.length===1?`import * as ${r} from ${JSON.stringify(l)};`:[u.map(e=>`import * as ${e.varName} from "${e.module}";`).join(` 6`),`const ${r} = {${u.map(e=>`...${e.varName}`).join(`,`)}};`].join(` 7`)}).join(` 8`)} 9 ${p?`window.__reactRouterManifest = ${JSON.stringify(Oa(t,c),null,2)};`:``} 10 window.__reactRouterRouteModules = {${m.map((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`).join(`,`)}}; 11 12import(${JSON.stringify(t.entry.module)});`:` `;return _.createElement(_.Fragment,null,_.createElement(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:r},type:void 0}),_.createElement(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:i},type:`module`,async:!0}))},[]),g=Qa||f?[]:[...new Set(t.entry.imports.concat(aa(m,t,{includeHydrateFallback:!0})))],v=typeof t.sri==`object`?t.sri:{};return ci(!f,`The <Scripts /> element is a no-op when using RSC and can be safely removed.`),Qa||f?null:_.createElement(_.Fragment,null,typeof t.sri==`object`?_.createElement(`script`,{...e,"rr-importmap":``,type:`importmap`,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:v})}}):null,p?null:_.createElement(`link`,{rel:`modulepreload`,href:t.url,crossOrigin:e.crossOrigin,integrity:v[t.url],nonce:e.nonce,suppressHydrationWarning:!0}),_.createElement(`link`,{rel:`modulepreload`,href:t.entry.module,crossOrigin:e.crossOrigin,integrity:v[t.entry.module],nonce:e.nonce,suppressHydrationWarning:!0}),g.map(t=>_.createElement(`link`,{key:t,rel:`modulepreload`,href:t,crossOrigin:e.crossOrigin,integrity:v[t],nonce:e.nonce,suppressHydrationWarning:!0})),h)}function to(...e){return t=>
12{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var no=class extends _.Component{constructor(e){super(e),this.state={error:e.error||null,location:e.location}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location===e.location?{error:e.error||t.error,location:t.location}:{error:e.error||null,location:e.location}}render(){return this.state.error?_.createElement(ro,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function ro({error:e,isOutsideRemixApp:t}){let{nonce:n}=Ba();console.error(e);let r=_.createElement(`script`,{nonce:n,dangerouslySetInnerHTML:{__html:` 13 console.log( 14 "ð¿ Hey developer ð. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information." 15 ); 16 `}});if(ct(e))return _.createElement(io,{title:`Unhandled Thrown Response!`},_.createElement(`h1`,{style:{fontSize:`24px`}},e.status,` `,e.statusText),null);let i;if(e instanceof Error)i=e;else{let t=e==null?`Unknown Error`:typeof e==`object`&&`toString`in e?e.toString():JSON.stringify(e);i=Error(t)}return _.createElement(io,{title:`Application Error!`,isOutsideRemixApp:t},_.createElement(`h1`,{style:{fontSize:`24px`}},`Application Error`),_.createElement(`pre`,{style:{padding:`2rem`,background:`hsla(10, 50%, 50%, 0.1)`,color:`red`,overflow:`auto`}},i.stack),r)}function io({title:e,renderScripts:t,isOutsideRemixApp:n,children:r}){let{routeModules:i}=Ba();return i.root?.Layout&&!n?r:_.createElement(`html`,{lang:`en`},_.createElement(`head`,null,_.createElement(`meta`,{charSet:`utf-8`}),_.createElement(`meta`,{name:`viewport`,content:`width=device-width,initial-scale=1,viewport-fit=cover`}),_.createElement(`title`,null,e)),_.createElement(`body`,null,_.createElement(`main`,{style:{fontFamily:`system-ui, sans-serif`,padding:`2rem`}},r,t?_.createElement(eo,null):null)))}export{U as $,Ar as A,Ut as B,ni as C,Jr as D,Yr as E,ri as F,Y as G,Yt as H,dr as I,Ze as J,ze as K,_r as L,Mr as M,$r as N,Or as O,Lr as P,H as Q,yr as R,bi as S,qr as T,ye as U,qt as V,ct as W,ce as X,Ue as Y,G as Z,hi as _,Ka as a,ee as at,li as b,Va as c,T as ct,_a as d,g as dt,B as et,ma as f,m as ft,Ci as g,Ii as h,c as ht,Xa as i,F as it,ei as j,ti as k,ka as l,v as lt,Ki as m,o as mt,za as n,ie as nt,eo as o,M as ot,Sa as p,f as pt,ft as q,Ga as r,te as rt,to as s,E as st,no as t,z as tt,Aa as u,b as ut,gi as v,Qr as w,vi as x,di as y,mr 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.