PageSourceSearch

https://videreo.com/assets/index-BDsTRAUU.js

js videreo.com collected 2026-10-04 21:59:53 UTC 131,793 bytes, 26 lines download raw bytes

vendor: 5,133 bytes, line 1
1function mo(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const o=Object.getOwnPropertyDescriptor(n,a);o&&Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Xn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var cr={exports:{}},ht={};var fn;function po(){if(fn)return ht;fn=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,o){var i=null;if(o!==void 0&&(i=""+o),a.key!==void 0&&(i=""+a.key),"key"in a){o={};for(var u in a)u!=="key"&&(o[u]=a[u])}else o=a;return a=o.ref,{$$typeof:e,type:n,key:i,ref:a!==void 0?a:null,props:o}}return ht.Fragment=t,ht.jsx=r,ht.jsxs=r,ht}var hn;function yo(){return hn||(hn=1,cr.exports=po()),cr.exports}var Fs=yo(),dr={exports:{}},B={};var mn;function vo(){if(mn)return B;mn=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),i=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),s=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),p=Symbol.iterator;function g(m){return m===null||typeof m!="object"?null:(m=p&&m[p]||m["@@iterator"],typeof m=="function"?m:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,w={};function P(m,C,k){this.props=m,this.context=C,this.refs=w,this.updater=k||R}P.prototype.isReactComponent={},P.prototype.setState=function(m,C){if(typeof m!="object"&&typeof m!="function"&&m!=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,m,C,"setState")},P.prototype.forceUpdate=function(m){this.updater.enqueueForceUpdate(this,m,"forceUpdate")};function S(){}S.prototype=P.prototype;function D(m,C,k){this.props=m,this.context=C,this.refs=w,this.updater=k||R}var T=D.prototype=new S;T.constructor=D,b(T,P.prototype),T.isPureReactComponent=!0;var _=Array.isArray;function $(){}var M={H:null,A:null,T:null,S:null},v=Object.prototype.hasOwnProperty;function V(m,C,k){var I=k.ref;return{$$typeof:e,type:m,key:C,ref:I!==void 0?I:null,props:k}}function X(m,C){return V(m.type,C,m.props)}function ae(m){return typeof m=="object"&&m!==null&&m.$$typeof===e}function Y(m){var C={"=":"=0",":":"=2"};return"$"+m.replace(/[=:]/g,function(k){return C[k]})}var le=/\/+/g;function ee(m,C){return typeof m=="object"&&m!==null&&m.key!=null?Y(""+m.key):C.toString(36)}function ue(m){switch(m.status){case"fulfilled":return m.value;case"rejected":throw m.reason;default:switch(typeof m.status=="string"?m.then($,$):(m.status="pending",m.then(function(C){m.status==="pending"&&(m.status="fulfilled",m.value=C)},function(C){m.status==="pending"&&(m.status="rejected",m.reason=C)})),m.status){case"fulfilled":return m.value;case"rejected":throw m.reason}}throw m}function K(m,C,k,I,z){var W=typeof m;(W==="undefined"||W==="boolean")&&(m=null);var Z=!1;if(m===null)Z=!0;else switch(W){case"bigint":case"string":case"number":Z=!0;break;case"object":switch(m.$$typeof){case e:case t:Z=!0;break;case c:return Z=m._init,K(Z(m._payload),C,k,I,z)}}if(Z)return z=z(m),Z=I===""?"."+ee(m,0):I,_(z)?(k="",Z!=null&&(k=Z.replace(le,"$&/")+"/"),K(z,C,k,"",function(ar){return ar})):z!=null&&(ae(z)&&(z=X(z,k+(z.key==null||m&&m.key===z.key?"":(""+z.key).replace(le,"$&/")+"/")+Z)),C.push(z)),1;Z=0;var ve=I===""?".":I+":";if(_(m))for(var fe=0;fe<m.length;fe++)I=m[fe],W=ve+ee(I,fe),Z+=K(I,C,k,W,z);else if(fe=g(m),typeof fe=="function")for(m=fe.call(m),fe=0;!(I=m.next()).done;)I=I.value,W=ve+ee(I,fe++),Z+=K(I,C,k,W,z);else if(W==="object"){if(typeof m.then=="function")return K(ue(m),C,k,I,z);throw C=String(m),Error("Objects are not valid as a React child (found: "+(C==="[object Object]"?"object with keys {"+Object.keys(m).join(", ")+"}":C)+"). If you meant to render a collection of children, use an array instead.")}return Z}function Q(m,C,k){if(m==null)return m;var I=[],z=0;return K(m,I,"","",function(W){return C.call(k,W,z++)}),I}function we(m){if(m._status===-1){var C=m._result;C=C(),C.then(function(k){(m._status===0||m._status===-1)&&(m._status=1,m._result=k)},function(k){(m._status===0||m._status===-1)&&(m._status=2,m._result=k)}),m._status===-1&&(m._status=0,m._result=C)}if(m._status===1)return m._result.default;throw m._result}var te=typeof reportError=="function"?reportError:function(m){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var C=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof m=="object"&&m!==null&&typeof m.message=="string"?String(m.message):String(m),error:m});if(!window.dispatchEvent(C))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",m);return}console.error(m)}
vendor: 7,965 bytes, line 1
1,de={map:Q,forEach:function(m,C,k){Q(m,function(){C.apply(this,arguments)},k)},count:function(m){var C=0;return Q(m,function(){C++}),C},toArray:function(m){return Q(m,function(C){return C})||[]},only:function(m){if(!ae(m))throw Error("React.Children.only expected to receive a single React element child.");return m}};return B.Activity=d,B.Children=de,B.Component=P,B.Fragment=r,B.Profiler=a,B.PureComponent=D,B.StrictMode=n,B.Suspense=l,B.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,B.__COMPILER_RUNTIME={__proto__:null,c:function(m){return M.H.useMemoCache(m)}},B.cache=function(m){return function(){return m.apply(null,arguments)}},B.cacheSignal=function(){return null},B.cloneElement=function(m,C,k){if(m==null)throw Error("The argument must be a React element, but you passed "+m+".");var I=b({},m.props),z=m.key;if(C!=null)for(W in C.key!==void 0&&(z=""+C.key),C)!v.call(C,W)||W==="key"||W==="__self"||W==="__source"||W==="ref"&&C.ref===void 0||(I[W]=C[W]);var W=arguments.length-2;if(W===1)I.children=k;else if(1<W){for(var Z=Array(W),ve=0;ve<W;ve++)Z[ve]=arguments[ve+2];I.children=Z}return V(m.type,z,I)},B.createContext=function(m){return m={$$typeof:i,_currentValue:m,_currentValue2:m,_threadCount:0,Provider:null,Consumer:null},m.Provider=m,m.Consumer={$$typeof:o,_context:m},m},B.createElement=function(m,C,k){var I,z={},W=null;if(C!=null)for(I in C.key!==void 0&&(W=""+C.key),C)v.call(C,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(z[I]=C[I]);var Z=arguments.length-2;if(Z===1)z.children=k;else if(1<Z){for(var ve=Array(Z),fe=0;fe<Z;fe++)ve[fe]=arguments[fe+2];z.children=ve}if(m&&m.defaultProps)for(I in Z=m.defaultProps,Z)z[I]===void 0&&(z[I]=Z[I]);return V(m,W,z)},B.createRef=function(){return{current:null}},B.forwardRef=function(m){return{$$typeof:u,render:m}},B.isValidElement=ae,B.lazy=function(m){return{$$typeof:c,_payload:{_status:-1,_result:m},_init:we}},B.memo=function(m,C){return{$$typeof:s,type:m,compare:C===void 0?null:C}},B.startTransition=function(m){var C=M.T,k={};M.T=k;try{var I=m(),z=M.S;z!==null&&z(k,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then($,te)}catch(W){te(W)}finally{C!==null&&k.types!==null&&(C.types=k.types),M.T=C}},B.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},B.use=function(m){return M.H.use(m)},B.useActionState=function(m,C,k){return M.H.useActionState(m,C,k)},B.useCallback=function(m,C){return M.H.useCallback(m,C)},B.useContext=function(m){return M.H.useContext(m)},B.useDebugValue=function(){},B.useDeferredValue=function(m,C){return M.H.useDeferredValue(m,C)},B.useEffect=function(m,C){return M.H.useEffect(m,C)},B.useEffectEvent=function(m){return M.H.useEffectEvent(m)},B.useId=function(){return M.H.useId()},B.useImperativeHandle=function(m,C,k){return M.H.useImperativeHandle(m,C,k)},B.useInsertionEffect=function(m,C){return M.H.useInsertionEffect(m,C)},B.useLayoutEffect=function(m,C){return M.H.useLayoutEffect(m,C)},B.useMemo=function(m,C){return M.H.useMemo(m,C)},B.useOptimistic=function(m,C){return M.H.useOptimistic(m,C)},B.useReducer=function(m,C,k){return M.H.useReducer(m,C,k)},B.useRef=function(m){return M.H.useRef(m)},B.useState=function(m){return M.H.useState(m)},B.useSyncExternalStore=function(m,C,k){return M.H.useSyncExternalStore(m,C,k)},B.useTransition=function(){return M.H.useTransition()},B.version="19.2.4",B}var pn;function Kn(){return pn||(pn=1,dr.exports=vo()),dr.exports}var h=Kn();const go=Xn(h),wo=mo({__proto__:null,default:go},[h]);var fr={exports:{}},pe={};var yn;function Eo(){if(yn)return pe;yn=1;var e=Kn();function t(l){var s="https://react.dev/errors/"+l;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+l+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(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(l,s,c){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:d==null?null:""+d,children:l,containerInfo:s,implementation:c}}var i=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(l,s){if(l==="font")return"";if(typeof s=="string")return s==="use-credentials"?s:""}return pe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,pe.createPortal=function(l,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)throw Error(t(299));return o(l,s,null,c)},pe.flushSync=function(l){var s=i.T,c=n.p;try{if(i.T=null,n.p=2,l)return l()}finally{i.T=s,n.p=c,n.d.f()}},pe.preconnect=function(l,s){typeof l=="string"&&(s?(s=s.crossOrigin,s=typeof s=="string"?s==="use-credentials"?s:"":void 0):s=null,n.d.C(l,s))},pe.prefetchDNS=function(l){typeof l=="string"&&n.d.D(l)},pe.preinit=function(l,s){if(typeof l=="string"&&s&&typeof s.as=="string"){var c=s.as,d=u(c,s.crossOrigin),p=typeof s.integrity=="string"?s.integrity:void 0,g=typeof s.fetchPriority=="string"?s.fetchPriority:void 0;c==="style"?n.d.S(l,typeof s.precedence=="string"?s.precedence:void 0,{crossOrigin:d,integrity:p,fetchPriority:g}):c==="script"&&n.d.X(l,{crossOrigin:d,integrity:p,fetchPriority:g,nonce:typeof s.nonce=="string"?s.nonce:void 0})}},pe.preinitModule=function(l,s){if(typeof l=="string")if(typeof s=="object"&&s!==null){if(s.as==null||s.as==="script"){var c=u(s.as,s.crossOrigin);n.d.M(l,{crossOrigin:c,integrity:typeof s.integrity=="string"?s.integrity:void 0,nonce:typeof s.nonce=="string"?s.nonce:void 0})}}else s==null&&n.d.M(l)},pe.preload=function(l,s){if(typeof l=="string"&&typeof s=="object"&&s!==null&&typeof s.as=="string"){var c=s.as,d=u(c,s.crossOrigin);n.d.L(l,c,{crossOrigin:d,integrity:typeof s.integrity=="string"?s.integrity:void 0,nonce:typeof s.nonce=="string"?s.nonce:void 0,type:typeof s.type=="string"?s.type:void 0,fetchPriority:typeof s.fetchPriority=="string"?s.fetchPriority:void 0,referrerPolicy:typeof s.referrerPolicy=="string"?s.referrerPolicy:void 0,imageSrcSet:typeof s.imageSrcSet=="string"?s.imageSrcSet:void 0,imageSizes:typeof s.imageSizes=="string"?s.imageSizes:void 0,media:typeof s.media=="string"?s.media:void 0})}},pe.preloadModule=function(l,s){if(typeof l=="string")if(s){var c=u(s.as,s.crossOrigin);n.d.m(l,{as:typeof s.as=="string"&&s.as!=="script"?s.as:void 0,crossOrigin:c,integrity:typeof s.integrity=="string"?s.integrity:void 0})}else n.d.m(l)},pe.requestFormReset=function(l){n.d.r(l)},pe.unstable_batchedUpdates=function(l,s){return l(s)},pe.useFormState=function(l,s,c){return i.H.useFormState(l,s,c)},pe.useFormStatus=function(){return i.H.useHostTransitionStatus()},pe.version="19.2.4",pe}var vn;function Ro(){if(vn)return fr.exports;vn=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),fr.exports=Eo(),fr.exports}var qn=e=>{throw TypeError(e)},Qn=(e,t,r)=>t.has(e)||qn("Cannot "+r),Pe=(e,t,r)=>(Qn(e,t,"read from private field"),r?r.call(e):t.get(e)),vt=(e,t,r)=>t.has(e)?qn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Ne=(e,t,r,n)=>(Qn(e,t,"write to private field"),t.set(e,r),r),Kt=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Or=/^[\\/]{2}/;function Zn(e,t){return t+e.replace(/\\/g,"/")}var gn="popstate";function wn(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function $s(e={}){function t(n,a){let o=a.state?.masked,{pathname:i,search:u,hash:l}=o||n.location;return Et("",{pathname:i,search:u,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default",o?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}
1function r(n,a){return typeof a=="string"?a:De(a)}return bo(t,r,null,e)}function G(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ce(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function So(){return Math.random().toString(36).substring(2,10)}function En(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 Et(e,t,r=null,n,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Fe(t):t,state:r,key:t&&t.key||n||So(),mask:a}}function De({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Fe(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function bo(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,u="POP",l=null,s=c();s==null&&(s=0,i.replaceState({...i.state,idx:s},""));function c(){return(i.state||{idx:null}).idx}function d(){u="POP";let w=c(),P=w==null?null:w-s;s=w,l&&l({action:u,location:b.location,delta:P})}function p(w,P){u="PUSH";let S=wn(w)?w:Et(b.location,w,P);s=c()+1;let D=En(S,s),T=b.createHref(S.mask||S);try{i.pushState(D,"",T)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;a.location.assign(T)}o&&l&&l({action:u,location:b.location,delta:1})}function g(w,P){u="REPLACE";let S=wn(w)?w:Et(b.location,w,P);s=c();let D=En(S,s),T=b.createHref(S.mask||S);i.replaceState(D,"",T),o&&l&&l({action:u,location:b.location,delta:0})}function R(w){return ea(a,w)}let b={get action(){return u},get location(){return e(a,i)},listen(w){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(gn,d),l=w,()=>{a.removeEventListener(gn,d),l=null}},createHref(w){return t(a,w)},createURL:R,encodeLocation(w){let P=R(w);return{pathname:P.pathname,search:P.search,hash:P.hash}},push:p,replace:g,go(w){return i.go(w)}};return b}function ea(e,t,r=!1){let n="http://localhost";e&&(n=e.location.origin!=="null"?e.location.origin:e.location.href),G(n,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:De(t);return a=a.replace(/ $/,"%20"),!r&&Or.test(a)&&(a=n+a),new URL(a,n)}var gt,Rn=class{constructor(e){if(vt(this,gt,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(Pe(this,gt).has(e))return Pe(this,gt).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Pe(this,gt).set(e,t)}};gt=new WeakMap;var xo=new Set(["lazy","caseSensitive","path","id","index","children"]);function Lo(e){return xo.has(e)}var Co=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function Po(e){return Co.has(e)}function _o(e){return e.index===!0}function Rt(e,t,r=[],n={},a=!1){return e.map((o,i)=>{let u=[...r,String(i)],l=typeof o.id=="string"?o.id:u.join("-");if(G(o.index!==!0||!o.children,"Cannot specify children on an index route"),G(a||!n[l],`Found a route id collision on i
1d "${l}".  Route id's must be globally unique within Data Router usages`),_o(o)){let s={...o,id:l};return n[l]=Sn(s,t(s)),s}else{let s={...o,id:l,children:void 0};return n[l]=Sn(s,t(s)),o.children&&(s.children=Rt(o.children,t,u,n,a)),s}})}function Sn(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function ta(e,t,r="/"){return _e(e,t,r,!1)}function _e(e,t,r,n,a){let o=typeof t=="string"?Fe(t):t,i=Ce(o.pathname||"/",r);if(i==null)return null;let u=a??Ht(e),l=null,s=jo(i);for(let c=0;l==null&&c<u.length;++c)l=$o(u[c],s,n);return l}function ra(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function Ht(e){let t=na(e);return To(t),t}function na(e,t=[],r=[],n="",a=!1){let o=(i,u,l=a,s)=>{let c={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:u,route:i};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(n)&&l)return;G(c.relativePath.startsWith(n),`Absolute route path "${c.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(n.length)}let d=Le([n,c.relativePath]),p=r.concat(c);i.children&&i.children.length>0&&(G(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),na(i.children,t,p,d,l)),!(i.path==null&&!i.index)&&t.push({path:d,score:Io(d,i.index),routesMeta:p.map((g,R)=>{let[b,w]=kr(g.relativePath,g.caseSensitive,R===p.length-1);return{...g,matcher:b,compiledParams:w}})})};return e.forEach((i,u)=>{if(i.path===""||!i.path?.includes("?"))o(i,u);else for(let l of aa(i.path))o(i,u,!0,l)}),t}function aa(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let i=aa(n.join("/")),u=[];return u.push(...i.map(l=>l===""?o:[o,l].join("/"))),a&&u.push(...i),u.map(l=>e.startsWith("/")&&l===""?"/":l)}function To(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Fo(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var Mo=/^:[\w-]+$/,Do=3,Oo=2,ko=1,Ao=10,No=-2,bn=e=>e==="*";function Io(e,t){let r=e.split("/"),n=r.length;return r.some(bn)&&(n+=No),t&&(n+=Oo),r.filter(a=>!bn(a)).reduce((a,o)=>a+(Mo.test(o)?Do:o===""?ko:Ao),n)}function Fo(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function $o(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",i=[];for(let u=0;u<n.length;++u){let l=n[u],s=u===n.length-1,c=o==="/"?t:t.slice(o.length)||"/",d={path:l.relativePath,caseSensitive:l.caseSensitive,end:s},p=l.matcher&&l.compiledParams?oa(d,c,l.matcher,l.compiledParams):Vt(d,c),g=l.route;if(!p&&s&&r&&!n[n.length-1].route.index&&(p=Vt({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!p)return null;
1Object.assign(a,p.params),i.push({params:a,pathname:Le([o,p.pathname]),pathnameBase:zo(Le([o,p.pathnameBase])),route:g}),p.pathnameBase!=="/"&&(o=Le([o,p.pathnameBase]))}return i}function Vt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=kr(e.path,e.caseSensitive,e.end);return oa(e,t,r,n)}function oa(e,t,r,n){let a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),u=a.slice(1);return{params:n.reduce((s,{paramName:c,isOptional:d},p)=>{if(c==="*"){let R=u[p]||"";i=o.slice(0,o.length-R.length).replace(/(.)\/+$/,"$1")}const g=u[p];return d&&!g?s[c]=void 0:s[c]=(g||"").replace(/%2F/g,"/"),s},{}),pathname:o,pathnameBase:i,pattern:e}}function kr(e,t=!1,r=!0){ce(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 n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,u,l,s,c)=>{if(n.push({paramName:u,isOptional:l!=null}),l){let d=c.charAt(s+i.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function jo(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ce(!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 Ce(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function Uo({basename:e,pathname:t}){return t==="/"?e:Le([e,t])}var Ar=e=>Kt.test(e);function Ho(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Fe(e):e,o;return r?(r=Ir(r),r.startsWith("/")?o=xn(r.substring(1),"/"):o=xn(r,t)):o=t,{pathname:o,search:Bo(n),hash:Wo(a)}}function xn(e,t){let r=Jt(t).split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function hr(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}].  Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ia(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Nr(e){let t=ia(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function qt(e,t,r,n=!1){let a;typeof e=="string"?a=Fe(e):(a={...e},G(!a.pathname||!a.pathname.includes("?"),hr("?","pathname","search",a)),G(!a.pathname||!a.pathname.includes("#"),hr("#","pathname","hash",a)),G(!a.search||!a.search.includes("#"),hr("#","search","hash",a)));let o=e===""||a.pathname==="",i=o?"/":a.pathname,u;if(i==null)u=r;else{let d=t.length-1;if(!n&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),d-=1;a.pathname=p.join("/")}u=d>=0?t[d]:"/"}let l=Ho(a,u),s=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(s||c)&&(l.pathname+="/"),l}var Ir=e=>e.replace(/[\\/]{2,}/g,"/"),Le=e=>Ir(e.join("/")),Jt=e=>e.replace(/\/+$/,""),zo=e=>Jt(e).replace(/^\/*/,"/"),Bo=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Wo=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Yo=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function Vo(e,t){return new Yo(e,typeof t=="number"?{status:t}:t)}var Jo=(e,t=302)=>{let r=t;typeof r=="number"?r={status:r}:typeof r.status>"u"&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,{...r,headers:n})},la=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Xe=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function tt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function bt(e){let t=e.map(r=>
1r.route.path).filter(Boolean);return Le(t)||"/"}var sa=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ua(e,t){let r=e;if(typeof r!="string"||!Kt.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(sa)try{let o=new URL(window.location.href),i=Or.test(r)?new URL(Zn(r,o.protocol)):new URL(r),u=Ce(i.pathname,t);i.origin===o.origin&&u!=null?r=u+i.search+i.hash:a=!0}catch{ce(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:a,to:r}}var Ge=Symbol("Uninstrumented");function Go(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(a=>a({id:t.id,index:t.index,path:t.path,instrument(o){let i=Object.keys(r);for(let u of i)o[u]&&r[u].push(o[u])}}));let n={};if(typeof t.lazy=="function"&&r.lazy.length>0){let a=st(r.lazy,t.lazy,()=>{});a&&(n.lazy=a)}if(typeof t.lazy=="object"){let a=t.lazy;["middleware","loader","action"].forEach(o=>{let i=a[o],u=r[`lazy.${o}`];if(typeof i=="function"&&u.length>0){let l=st(u,i,()=>{});l&&(n.lazy=Object.assign(n.lazy||{},{[o]:l}))}})}return["loader","action"].forEach(a=>{let o=t[a];if(typeof o=="function"&&r[a].length>0){let i=o[Ge]??o,u=st(r[a],i,(...l)=>Ln(l[0]));u&&(a==="loader"&&i.hydrate===!0&&(u.hydrate=!0),u[Ge]=i,n[a]=u)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(n.middleware=t.middleware.map(a=>{let o=a[Ge]??a,i=st(r.middleware,o,(...u)=>Ln(u[0]));return i?(i[Ge]=o,i):a})),n}function Xo(e,t){let r={navigate:[],fetch:[]};if(t.forEach(n=>n({instrument(a){let o=Object.keys(a);for(let i of o)a[i]&&r[i].push(a[i])}})),r.navigate.length>0){let n=e.navigate[Ge]??e.navigate,a=st(r.navigate,n,(...o)=>{let[i,u]=o;return{to:typeof i=="number"||typeof i=="string"?i:i?De(i):".",...Cn(e,u??{})}});a&&(a[Ge]=n,e.navigate=a)}if(r.fetch.length>0){let n=e.fetch[Ge]??e.fetch,a=st(r.fetch,n,(...o)=>{let[i,,u,l]=o;return{href:u??".",fetcherKey:i,...Cn(e,l??{})}});a&&(a[Ge]=n,e.fetch=a)}return e}function st(e,t,r){return e.length===0?null:async(...n)=>{let a=await ca(e,r(...n),()=>t(...n),e.length-1);if(a.type==="error")throw a.value;return a.value}}async function ca(e,t,r,n){let a=e[n],o;if(a){let i,u=async()=>(i?console.error("You cannot call instrumented handlers more than once"):i=ca(e,t,r,n-1),o=await i,G(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await a(u,t)}catch(l){console.error("An instrumentation function threw an error:",l)}i||await u(),await i}else try{o={type:"success",value:await r()}}catch(i){o={type:"error",value:i}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Ln(e){let{request:t,context:r,params:n,pattern:a}=e;return{request:Ko(t),params:{...n},pattern:a,context:qo(r)}}function Cn(e,t){return{currentUrl:De(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 Ko(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function qo(e){if(Zo(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var Qo=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Zo(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===Qo}var da=["POST","PUT","PATCH","DELETE"],ei=new Set(da),ti=["GET",...da],ri=new Set(ti),fa=new Set([301,302,303,307,308]),ni=new Set([307,308]),mr={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},ai={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},mt={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},oi=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),ha="remix-router-transitions",ma=Symbol("ResetLoaderData"),Ze,ot,Ve,it,ii=class{constructor(e){vt(this,Ze),vt(this,ot),vt(this,Ve),vt(this,it),Ne(this,Ze,e),Ne(this,ot,Ht(e))}get stableRoutes(){return Pe(this,Ze)}get activeRoutes(){return Pe(this,Ve)??Pe(this,Ze)}get branches(){return Pe(this,it)??Pe(this,ot)}get hasHMRRoutes(){return Pe(this,Ve)!=null}setRoutes(e){Ne(this,Ze,e),Ne(this,ot,Ht(e))}setHmrRoutes(e){Ne(this,Ve,e),Ne(this,it,Ht(e))}commitHmrRoutes(){Pe(this,Ve)&&(Ne(this,Ze,Pe(this,Ve)),Ne(this,ot,Pe(this,it)),Ne(this,Ve,void 0),Ne(this,it,void 0))}};Ze=new WeakMap;ot=new WeakMap;Ve=new WeakMap;it=new WeakMap;function js(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";G(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let n=e.hydrationRouteProperties||[],a=e.mapRouteProperties||oi,o=a;if(e.instrumentations){let f=e.instrumentations;o=y=>({...a(y),...Go(f.map(E=>
1E.route).filter(Boolean),y)})}let i={},u=new ii(Rt(e.routes,o,void 0,i)),l=e.basename||"/";l.startsWith("/")||(l=`/${l}`);let s=e.dataStrategy||di,c={...e.future},d=null,p=new Set,g=null,R=null,b=null,w=null,P=e.hydrationData!=null,S=_e(u.activeRoutes,e.history.location,l,!1,u.branches),D=!1,T=null,_,$;if(S==null&&!e.patchRoutesOnNavigation){let f=Te(404,{pathname:e.history.location.pathname}),{matches:y,route:E}=At(u.activeRoutes);_=!0,$=!_,S=y,T={[E.id]:f}}else if(S&&!e.hydrationData&&Tt(S,u.activeRoutes,e.history.location.pathname).active&&(S=null),S)if(S.some(f=>f.route.lazy))_=!1,$=!_;else if(!S.some(f=>Fr(f.route)))_=!0,$=!_;else{let f=e.hydrationData?e.hydrationData.loaderData:null,y=e.hydrationData?e.hydrationData.errors:null,E=S;if(y){let x=S.findIndex(L=>y[L.route.id]!==void 0);E=E.slice(0,x+1)}$=!1,_=!0,E.forEach(x=>{let L=pa(x.route,f,y);$=$||L.renderFallback,_=_&&!L.shouldLoad})}else{_=!1,$=!_,S=[];let f=Tt(null,u.activeRoutes,e.history.location.pathname);f.active&&f.matches&&(D=!0,S=f.matches)}let M,v={historyAction:e.history.action,location:e.history.location,matches:S,initialized:_,renderFallback:$,navigation:mr,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||T,fetchers:new Map,blockers:new Map},V="POP",X=null,ae=!1,Y,le=!1,ee=new Map,ue=null,K=!1,Q=!1,we=new Set,te=new Map,de=0,m=-1,C=new Map,k=new Set,I=new Map,z=new Map,W=new Set,Z=new Map,ve,fe=null;function ar(){if(d=e.history.listen(({action:f,location:y,delta:E})=>{if(ve){ve(),ve=void 0;return}ce(Z.size===0||E!=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 x=on({currentLocation:v.location,nextLocation:y,historyAction:f});if(x&&E!=null){let L=new Promise(A=>{ve=A});e.history.go(E*-1),_t(x,{state:"blocked",location:y,proceed(){_t(x,{state:"proceeding",proceed:void 0,reset:void 0,location:y}),L.then(()=>e.history.go(E))},reset(){let A=new Map(v.blockers);A.set(x,mt),me({blockers:A})}}),X?.resolve(),X=null;return}return Ke(f,y)}),r){Mi(t,ee);let f=()=>Di(t,ee);t.addEventListener("pagehide",f),ue=()=>t.removeEventListener("pagehide",f)}return v.initialized||Ke("POP",v.location,{initialHydration:!0}),M}function Xa(){d&&d(),ue&&ue(),p.clear(),Y&&Y.abort(),v.fetchers.forEach((f,y)=>ir(v.fetchers,y)),v.blockers.forEach((f,y)=>an(y))}function Ka(f){if(p.add(f),g){let{newErrors:y}=g;g=null,f(v,{deletedFetchers:[],newErrors:y,viewTransitionOpts:void 0,flushSync:!1})}return()=>p.delete(f)}function me(f,y={}){f.matches&&(f.matches=f.matches.map(L=>{let A=i[L.route.id],N=L.route;return N.element!==A.element||N.errorElement!==A.errorElement||N.hydrateFallbackElement!==A.hydrateFallbackElement?{...L,route:A}:L})),v={...v,...f};let E=[],x=[];v.fetchers.forEach((L,A)=>{L.state==="idle"&&(W.has(A)?E.push(A):x.push(A))}),W.forEach(L=>{!v.fetchers.has(L)&&!te.has(L)&&E.push(L)}),p.size===0&&(g={newErrors:f.errors??null}),[...p].forEach(L=>L(v,{deletedFetchers:E,newErrors:f.errors??null,viewTransitionOpts:y.viewTransitionOpts,flushSync:y.flushSync===!0}
1)),E.forEach(L=>ir(v.fetchers,L)),x.forEach(L=>v.fetchers.delete(L))}function nt(f,y,{flushSync:E}={}){let x=v.actionData!=null&&v.navigation.formMethod!=null&&ye(v.navigation.formMethod)&&v.navigation.state==="loading"&&f.state?._isRedirect!==!0,L;y.actionData?Object.keys(y.actionData).length>0?L=y.actionData:L=null:x?L=v.actionData:L=null;let A=y.loaderData?In(v.loaderData,y.loaderData,y.matches||[],y.errors):v.loaderData,N=v.blockers;N.size>0&&(N=new Map(N),N.forEach((j,J)=>N.set(J,mt)));let F=K?!1:sn(f,y.matches||v.matches),O=ae===!0||v.navigation.formMethod!=null&&ye(v.navigation.formMethod)&&f.state?._isRedirect!==!0;u.commitHmrRoutes(),K||V==="POP"||(V==="PUSH"?e.history.push(f,f.state):V==="REPLACE"&&e.history.replace(f,f.state));let U;if(V==="POP"){let j=ee.get(v.location.pathname);j&&j.has(f.pathname)?U={currentLocation:v.location,nextLocation:f}:ee.has(f.pathname)&&(U={currentLocation:f,nextLocation:v.location})}else if(le){let j=ee.get(v.location.pathname);j?j.add(f.pathname):(j=new Set([f.pathname]),ee.set(v.location.pathname,j)),U={currentLocation:v.location,nextLocation:f}}me({...y,actionData:L,loaderData:A,historyAction:V,location:f,initialized:!0,renderFallback:!1,navigation:mr,revalidation:"idle",restoreScrollPosition:F,preventScrollReset:O,blockers:N},{viewTransitionOpts:U,flushSync:E===!0}),V="POP",ae=!1,le=!1,K=!1,Q=!1,X?.resolve(),X=null,fe?.resolve(),fe=null}async function Qr(f,y){if(X?.resolve(),X=null,typeof f=="number"){X||(X=jn());let ne=X.promise;return e.history.go(f),ne}let E=Er(v.location,v.matches,l,f,y?.fromRouteId,y?.relative),{path:x,submission:L,error:A}=Pn(!1,E,y),N;y?.mask&&(N={pathname:"",search:"",hash:"",...typeof y.mask=="str
1ing"?Fe(y.mask):{...v.location.mask,...y.mask}});let F=v.location,O=Et(F,x,y&&y.state,void 0,N);O={...O,...e.history.encodeLocation(O)};let U=y&&y.replace!=null?y.replace:void 0,j="PUSH";U===!0?j="REPLACE":U===!1||L!=null&&ye(L.formMethod)&&L.formAction===v.location.pathname+v.location.search&&(j="REPLACE");let J=y&&"preventScrollReset"in y?y.preventScrollReset===!0:void 0,H=(y&&y.flushSync)===!0,re=on({currentLocation:F,nextLocation:O,historyAction:j});if(re){_t(re,{state:"blocked",location:O,proceed(){_t(re,{state:"proceeding",proceed:void 0,reset:void 0,location:O}),Qr(f,y)},reset(){let ne=new Map(v.blockers);ne.set(re,mt),me({blockers:ne})}});return}await Ke(j,O,{submission:L,pendingError:A,preventScrollReset:J,replace:y&&y.replace,enableViewTransition:y&&y.viewTransition,flushSync:H,callSiteDefaultShouldRevalidate:y&&y.defaultShouldRevalidate})}function qa(){fe||(fe=jn()),or(),me({revalidation:"loading"});let f=fe.promise;return v.navigation.state==="submitting"?f:v.navigation.state==="idle"?(Ke(v.historyAction,v.location,{startUninterruptedRevalidation:!0}),f):(Ke(V||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation,enableViewTransition:le===!0}),f)}async function Ke(f,y,E){Y&&Y.abort(),Y=null,V=f,K=(E&&E.startUninterruptedRevalidation)===!0,uo(v.location,v.matches),ae=(E&&E.preventScrollReset)===!0,le=(E&&E.enableViewTransition)===!0;let x=u.activeRoutes,L=E?.initialHydration&&v.matches&&v.matches.length>0&&!D?v.matches:_e(x,y,l,!1,u.branches),A=(E&&E.flushSync)===!0;if(L&&v.initialized&&!Q&&Ei(v.location,y)&&!(E&&E.submission&&ye(E.submission.formMethod))){nt(y,{matches:L},{flushSync:A});return}let N=Tt(L,x,y.pathname);if(N.active&&N.matches&&(L=N.matches),!L){let{error:se,notFoundMatches:oe,route:Ee}=lr(y.pathname);nt(y,{matches:oe,loaderData:{},errors:{[Ee.id]:se}},{flushSync:A});return}let F=E&&E.overrideNavigation?{...E.overrideNavigation,matches:L,historyAction:f}:void 0;Y=new AbortController;let O=lt(e.history,y,Y.signal,E&&E.submission),U=e.getContext?await e.getContext():new Rn,j;if(E&&E.pendingError)j=[Je(L).route.id,{type:"error",error:E.pendingError}];else if(E&&E.submission&&ye(E.submission.formMethod)){let se=await Qa(O,y,E.submission,L,f,U,N.active,E&&E.initialHydration===!0,{replace:E.replace,flushSync:A});if(se.shortCircuited)return;if(se.pendingActionResult){let[oe,Ee]=se.pendingActionResult;if(xe(Ee)&&tt(Ee.error)&&Ee.error.status===404){Y=null,nt(y,{matches:se.matches,loaderData:{},errors:{[oe]:Ee.error}});return}}L=se.matches||L,j=se.pendingActionResult,F=pr(y,L,f,E.submission),A=!1,N.active=!1,O=lt(e.history,O.url,O.signal)}let{shortCircuited:J,matches:H,loaderData:re,errors:ne,workingFetchers:he}=await Za(O,y,L,f,U,N.active,F,E&&E.submission,E&&E.fetcherSubmission,E&&E.replace,E&&E.initialHydration===!0,A,j,E&&E.callSiteDefaultShouldRevalidate);J||(Y=null,nt(y,{matches:H||L,...Fn(j),loaderData:re,errors:ne,...he?{fetchers:he}:{}}))}async function Qa(f,y,E,x,L,A,N,F,O={}){or();let U=_i(y,x,L,E);if(me({navigation:U},{flushSync:O.flushSync===!0}),N){let H=await Mt(x,y.pathname,f.signal);if(H.type==="aborted")return{shortCircuited:!0};if(H.type==="error"){if(H.partialMatches.length===0){let{matches:ne,route:he}=At(u.activeRoutes);return{matches:ne,pendingActionResult:[he.id,{type:"error",error:H.error}]}}let re=Je(H.partialMatches).route.id;return{matches:H.partialMatches,pendingActionResult:[re,{type:"error",error:H.error}]}}else if(H.matches)x=H.matches;else{let{notFoundMatches:re,error:ne,route:he}=lr(y.pathname);return{matches:re,pendingActionResult:[he.id,{type:"error",error:ne}]}}}let j,J=zt(x,y);if(!J.route.action&&!J.route.lazy)j={type:"error",error:Te(405,{method:f.method,pathname:y.pathname,routeId:J.route.id})};else{let H=ut(o,i,f,y,x,J,F?[]:n,A),re=await dt(f,y,H,A,null);if(j=re[J.route.id],!j){for(let ne of x)if(re[ne.route.id]){j=re[ne.route.id];break}}if(f.signal.aborted)return{shortCircuited:!0}}if(et(j)){let H;return O&&O.replace!=null?H=O.replace:H=kn(j.response.headers.get("Location"),new URL(f.url),l,e.history)===v.location.pathname+v.location.search,await qe(f,j,!0,{submission:E,replace:H}),{shortCircuited:!0}}if(xe(j)){let H=Je(x,J.route.id);return(O&&O.replace)!==!0&&(V="PUSH"),{matches:x,pendingActionResult:[H.route.id,j,J.route.id]}}return{matches:x,pendingActionResult:[J.route.id,j]}}async function Za(f,y,E,x,L,A,N,F,O,U,j,J,H,re){let ne=N||pr(y,E,x,F),he=F||O||$n(ne),se=!K&&!j;if(A){if(se){let Se=Zr(H);me({navigation:ne,...Se!==void 0?{actionData:Se}:{}},{flushSync:J})}let q=await Mt(E,y.pathname,f.signal);if(q.type==="aborted")return{shortCircuited:!0};if(q.type==="error"){if(q.partialMatches.length===0){let{matches:Ae,route:ze}=At(u.activeRoutes);return{matches:Ae,loaderData:{}
1,errors:{[ze.id]:q.error}}}let Se=Je(q.partialMatches).route.id;return{matches:q.partialMatches,loaderData:{},errors:{[Se]:q.error}}}else if(q.matches)E=q.matches;else{let{error:Se,notFoundMatches:Ae,route:ze}=lr(y.pathname);return{matches:Ae,loaderData:{},errors:{[ze.id]:Se}}}}let oe=u.activeRoutes,{dsMatches:Ee,revalidatingFetchers:Re}=_n(f,L,o,i,e.history,v,E,he,y,j?[]:n,j===!0,Q,we,W,I,k,oe,l,e.patchRoutesOnNavigation!=null,u.branches,H,re);if(m=++de,!e.dataStrategy&&!Ee.some(q=>q.shouldLoad)&&!Ee.some(q=>q.route.middleware&&q.route.middleware.length>0)&&Re.length===0){let q=new Map(v.fetchers),Se=rn(q);return nt(y,{matches:E,loaderData:{},errors:H&&xe(H[1])?{[H[0]]:H[1].error}:null,...Fn(H),...Se?{fetchers:q}:{}},{flushSync:J}),{shortCircuited:!0}}if(se){let q={};if(!A){q.navigation=ne;let Se=Zr(H);Se!==void 0&&(q.actionData=Se)}Re.length>0&&(q.fetchers=eo(Re)),me(q,{flushSync:J})}Re.forEach(q=>{He(q.key),q.controller&&te.set(q.key,q.controller)});let ft=()=>Re.forEach(q=>He(q.key));Y&&Y.signal.addEventListener("abort",ft);let{loaderResults:Be,fetcherResults:at}=await en(Ee,Re,f,y,L);if(f.signal.aborted)return{shortCircuited:!0};Y&&Y.signal.removeEventListener("abort",ft),Re.forEach(q=>te.delete(q.key));let We=Nt(Be);if(We)return await qe(f,We.result,!0,{replace:U}),{shortCircuited:!0};if(We=Nt(at),We)return k.add(We.key),await qe(f,We.result,!0,{replace:U}),{shortCircuited:!0};let ke=new Map(v.fetchers),{loaderData:sr,errors:Ye}=Nn(v,E,Be,H,Re,at,ke);j&&v.errors&&(Ye={...v.errors,...Ye});let Dt=rn(ke),Ot=nn(m,ke),kt=Dt||Ot||Re.length>0;return{matches:E,loaderData:sr,errors:Ye,...kt?{workingFetchers:ke}:{}}}function Zr(f){if(f&&!xe(f[1]))return{[f[0]]:f[1].data};if(v.actionData)return Object.keys(v.actionData).length===0?null:v.actionData}function eo(f){let y=new Map(v.fetchers);return f.forEach(E=>{let x=y.get(E.key),L=pt(void 0,x?x.data:void 0);y.set(E.key,L)}),y}async function to(f,y,E,x){He(f);let L=(x&&x.flushSync)===!0,A=u.activeRoutes,N=Er(v.location,v.matches,l,E,y,x?.relative),F=_e(A,N,l,!1,u.branches),O=Tt(F,A,N);if(O.active&&O.matches&&(F=O.matches),!F){Ue(f,y,Te(404,{pathname:N}),{flushSync:L});return}let{path:U,submission:j,error:J}=Pn(!0,N,x);if(J){Ue(f,y,J,{flushSync:L});return}let H=e.getContext?await e.getContext():new Rn,re=(x&&x.preventScrollReset)===!0;if(j&&ye(j.formMethod)){await ro(f,y,U,F,H,O.active,L,re,j,x&&x.defaultShouldRevalidate);return}I.set(f,{routeId:y,path:U}),await no(f,y,U,F,H,O.active,L,re,j)}async function ro(f,y,E,x,L,A,N,F,O,U){or(),I.delete(f);let j=v.fetchers.get(f);je(f,Ti(O,j),{flushSync:N});let J=new AbortController,H=lt(e.history,E,J.signal,O);if(A){let ie=await Mt(x,new URL(H.url).pathname,H.signal,f);if(ie.type==="aborted")return;if(ie.type==="error"){Ue(f,y,ie.error,{flushSync:N});return}else if(ie.matches)x=ie.matches;else{Ue(f,y,Te(404,{pathname:E}),{flushSync:N});return}}let re=zt(x,E);if(!re.route.action&&!re.route.lazy){let ie=Te(405,{method:O.formMethod,pathname:E,routeId:y});Ue(f,y,ie,{flushSync:N});return}te.set(f,J);let ne=de,he=ut(o,i,H,E,x,re,n,L),se=await dt(H,E,he,L,f),oe=se[re.route.id];if(!oe){for(let ie of he)if(se[ie.route.id]){oe=se[ie.route.id];break}}if(H.signal.aborted){te.get(f)===J&&te.delete(f);return}if(W.has(f)){if(et(oe)||xe(oe)){je(f,Ie(void 0));return}}else{if(et(oe))if(te.delete(f),m>ne){je(f,Ie(void 0));return}else return k.add(f),je(f,pt(O)),qe(H,oe,!1,{fetcherSubmission:O,preventScrollReset:F});if(xe(oe)){Ue(f,y,oe.error);return}}let Ee=v.navigation.location||v.location,Re=lt(e.history,Ee,J.signal),ft=u.activeRoutes,Be=v.navigation.state!=="idle"?_e(ft,v.navigation.location,l,!1,u.branches):v.matches;G(Be,"Didn't find any matches after fetcher action");let at=++de;C.set(f,at);let{dsMatches:We,revalidatingFetchers:ke}=_n(Re,L,o,i,e.history,v,Be,O,Ee,n,!1,Q,we,W,I,k,ft,l,e.patchRoutesOnNavigation!=null,u.branches,[re.route.id,oe],U),sr=pt(O,oe.data),Ye=new Map(v.fetchers);Ye.set(f,sr),ke.filter(ie=>ie.key!==f).forEach(ie=>{let Qe=ie.key,dn=Ye.get(Qe),ho=pt(void 0,dn?dn.data:void 0);Ye.set(Qe,ho),He(Qe),ie.controller&&te.set(Qe,ie.controller)}),me({fetchers:Ye});let Dt=()=>ke.forEach(ie=>He(ie.key));J.signal.addEventListener("abort",Dt);let{loaderResults:Ot,fetcherResults:kt}=await en(We,ke,Re,Ee,L);if(J.signal.aborted)return;J.signal.removeEventListener("abort",Dt),C.delete(f),te.delete(f),ke.forEach(ie=>te.delete(ie.key));let q=v.fetchers.has(f),Se=ie=>{if(!q)return ie;let Qe=new Map(ie.fetchers);return Qe.set(f,Ie(oe.data)),{...ie,fetchers:Qe}},Ae=Nt(Ot);if(Ae)return v=Se(v),qe(Re,Ae.result,!1,{preventScrollReset:F});if(Ae=Nt(kt),Ae)return k.add(Ae.key),v=Se(v),qe(Re,Ae.result,!1,{preventScrollReset:F});let ze=new Map(v.fetchers);q&&ze.set(f,Ie(oe.data));let{loaderData:cn,errors:ur}=Nn(v,Be,Ot,void 0,ke,kt,ze);nn(at,ze),v.navigation.state==="loading"&&at>m?(G(V,"Expected pending action"),Y&&Y.abort(),nt(v.navigation.location,{matches:Be,loaderData:cn,errors:ur,fetchers:ze})):(me({errors:ur,loaderData:In(v.loaderData,cn,Be,ur),fetchers:ze}),Q=!1)}async function no(f,y,E,x,L,A,N,F,O){let U=v.fetchers.get(f);je(f,pt(O,U?U.data:void 0),{flushSync:N});let j=new AbortController,J=lt(e.history,E,j.signal);if(A){let oe=await Mt(x,new URL(J.url).pathname,J.signal,f);if(oe.type==="aborted")return;if(oe.type==="error"){Ue(f,y,oe.error,{flushSync:N});return}else if(oe.matches)x=oe.matches;else{Ue(f,y,Te(404,{pathname:E}),{flushSync:N});return}}let H=zt(x,E);te.set(f,j);let re=de,ne=ut(o,i,J,E,x,H,n,L),he=await dt(J,E,ne,L,f),se=he[H.route.id];if(!se){for(let oe of x)if(he[oe.route.id]){se=he[oe.route.id];break}}if(te.get(f)===j&&te.delete(f),!J.signal.aborted){if(W.has(f)){je(f,Ie(void 0));return}if(et(se))if(m>re){je(f,Ie(void 0));return}else{k.add(f),await qe(J,se,!1,{preventScrollReset:F});return}if(xe(se)){Ue(f,y,se.error);return}je(f,Ie(se.data))}}async function qe(f,y,E,{submission:x,fetcherSubmission:L,preventScrollReset:A,replace:N}={}){E||(X?.resolve(),X=null),y.response.headers.has("X-Remix-Revalidate")&&(Q=!0);let F=y.response.headers.get("Location");G(F,"Expected a Location header on the redirect Response"),F=kn(F,new URL(f.url),l,e.history);let O=Et(v.location,F,{_isRedirect:!0});if(r){let ne=!1;if(y.response.headers.has("X-Remix-Reload-Document"))ne=!0;else if(Ar(F)){const he=ea(t,F,!0);ne=he.origin!==t.location.origin||Ce(he.pathname,l)==null}if(ne){N?t.location.replace(F):t.location.assign(F);return}}Y=null;let U=N===!0||y.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:j,formAction:J,formEncType:H}=v.navigation;!x&&!L&&j&&J&&H&&(x=$n(v.navigation));let re=x||L;if(ni.has(y.response.status)&&re&&ye(re.formMethod))await Ke(U,O,{submission:{...re,formAction:F},preventScrollReset:A||ae,enableViewTransition:E?le:void 0});else{let ne=pr(O,[],U,x);await Ke(U,O,{overrideNavigation:ne,fetcherSubmission:L,preventScrollReset:A||ae,enableViewTransition:E?le:void 0})}}async function dt(f,y,E,x,L){let A,N={};try{A=await hi(s,f,y,E,L,x,!1)}catch(F){return E.filter(O=>
1O.shouldLoad).forEach(O=>{N[O.route.id]={type:"error",error:F}}),N}if(f.signal.aborted)return N;if(!ye(f.method))for(let F of E){if(A[F.route.id]?.type==="error")break;!A.hasOwnProperty(F.route.id)&&!v.loaderData.hasOwnProperty(F.route.id)&&(!v.errors||!v.errors.hasOwnProperty(F.route.id))&&F.shouldCallHandler()&&(A[F.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${F.route.id}`)})}for(let[F,O]of Object.entries(A))if(xi(O)){let U=O.result;N[F]={type:"redirect",response:vi(U,f,F,E,l)}}else N[F]=await yi(O);return N}async function en(f,y,E,x,L){let A=dt(E,x,f,L,null),N=Promise.all(y.map(async U=>{if(U.matches&&U.match&&U.request&&U.controller){let J=(await dt(U.request,U.path,U.matches,L,U.key))[U.match.route.id];return{[U.key]:J}}else return Promise.resolve({[U.key]:{type:"error",error:Te(404,{pathname:U.path})}})})),F=await A,O=(await N).reduce((U,j)=>Object.assign(U,j),{});return{loaderResults:F,fetcherResults:O}}function or(){Q=!0,I.forEach((f,y)=>{te.has(y)&&we.add(y),He(y)})}function je(f,y,E={}){let x=new Map(v.fetchers);x.set(f,y),me({fetchers:x},{flushSync:(E&&E.flushSync)===!0})}function Ue(f,y,E,x={}){let L=Je(v.matches,y),A=new Map(v.fetchers);ir(A,f),me({errors:{[L.route.id]:E},fetchers:A},{flushSync:(x&&x.flushSync)===!0})}function ao(f){return z.set(f,(z.get(f)||0)+1),W.has(f)&&W.delete(f),v.fetchers.get(f)||ai}function oo(f,y){He(f,y?.reason),je(f,Ie(null))}function ir(f,y){let E=v.fetchers.get(y);te.has(y)&&!(E&&E.state==="loading"&&C.has(y))&&He(y),I.delete(y),C.delete(y),k.delete(y),W.delete(y),we.delete(y),f.delete(y)}function io(f){let y=(z.get(f)||0)-1;y<=0?(z.delete(f),W.add(f)):z.set(f,y),me({fetchers:new Map(v.fetchers)})}function He(f,y){let E=te.get(f);E&&(E.abort(y),te.delete(f))}function tn(f,y){for(let E of f){let x=y.get(E);G(x,`Expected fetcher: ${E}`);let L=Ie(x.data);y.set(E,L)}}function rn(f){let y=[],E=!1;for(let x of k){let L=f.get(x);G(L,`Expected fetcher: ${x}`),L.state==="loading"&&(k.delete(x),y.push(x),E=!0)}return tn(y,f),E}function nn(f,y){let E=[];for(let[x,L]of C)if(L<f){let A=y.get(x);G(A,`Expected fetcher: ${x}`),A.state==="loading"&&(He(x),C.delete(x),E.push(x))}return tn(E,y),E.length>0}function lo(f,y){let E=v.blockers.get(f)||mt;return Z.get(f)!==y&&Z.set(f,y),E}function an(f){v.blockers.delete(f),Z.delete(f)}function _t(f,y){let E=v.blockers.get(f)||mt;G(E.state==="unblocked"&&y.state==="blocked"||E.state==="blocked"&&y.state==="blocked"||E.state==="blocked"&&y.state==="proceeding"||E.state==="blocked"&&y.state==="unblocked"||E.state==="proceeding"&&y.state==="unblocked",`Invalid blocker state transition: ${E.state} -> ${y.state}`);let x=new Map(v.blockers);x.set(f,y),me({blockers:x})}function on({currentLocation:f,nextLocation:y,historyAction:E}){if(Z.size===0)return;Z.size>1&&ce(!1,"A router only supports one blocker at a time");let x=Array.from(Z.entries()),[L,A]=x[x.length-1],N=v.blockers.get(L);if(!(N&&N.state==="proceeding")&&A({currentLocation:f,nextLocation:y,historyAction:E}))return L}function lr(f){let y=Te(404,{pathname:f}),E=u.activeRoutes,{matches:x,route:L}=At(E);return{notFoundMatches:x,route:L,error:y}}function so(f,y,E){if(R=f,w=y,b=E||null,!P&&v.navigation===mr){P=!0;let x=sn(v.location,v.matches);x!=null&&me({restoreScrollPosition:x})}return()=>{R=null,w=null,b=null}}function ln(f,y){return b&&b(f,y.map(x=>ra(x,v.loaderData)))||f.key}function uo(f,y){if(R&&w){let E=ln(f,y);R[E]=w()}}function sn(f,y){if(R){let E=ln(f,y),x=R[E];if(typeof x=="number")return x}return null}function Tt(f,y,E){if(e.patchRoutesOnNavigation){let x=u.branches;if(f){if(Object.keys(f[0].params).length>0)return{active:!0,matches:_e(y,E,l,!0,x)}}else return{active:!0,matches:_e(y,E,l,!0,x)||[]}}return{active:!1,matches:null}}async function Mt(f,y,E,x){if(!e.patchRoutesOnNavigation)return{type:"success",matches:f};let L=f;for(;;){let A=i;try{await e.patchRoutesOnNavigation({signal:E,path:y,matches:L,fetcherKey:x,patch:(U,j)=>{E.aborted||Tn(U,j,u,A,o,!1)}})}catch(U){return{type:"error",error:U,partialMatches:L}}if(E.aborted)return{type:"aborted"};let N=u.branches,F=_e(u.activeRoutes,y,l,!1,N),O=null;if(F){if(Object.keys(F[0].params).length===0)return{type:"success",matches:F};if(O=_e(u.activeRoutes,y,l,!0,N),!(O&&L.length<O.length&&un(L,O.slice(0,L.length))))return{type:"success",matches:F}}
1if(O||(O=_e(u.activeRoutes,y,l,!0,N)),!O||un(L,O))return{type:"success",matches:null};L=O}}function un(f,y){return f.length===y.length&&f.every((E,x)=>E.route.id===y[x].route.id)}function co(f){i={},u.setHmrRoutes(Rt(f,o,void 0,i))}function fo(f,y,E=!1){Tn(f,y,u,i,o,E),u.hasHMRRoutes||me({})}return M={get basename(){return l},get future(){return c},get state(){return v},get routes(){return u.stableRoutes},get branches(){return u.branches},get manifest(){return i},get window(){return t},initialize:ar,subscribe:Ka,enableScrollRestoration:so,navigate:Qr,fetch:to,revalidate:qa,createHref:f=>e.history.createHref(f),encodeLocation:f=>e.history.encodeLocation(f),getFetcher:ao,resetFetcher:oo,deleteFetcher:io,dispose:Xa,getBlocker:lo,deleteBlocker:an,patchRoutes:fo,_internalFetchControllers:te,_internalSetRoutes:co,_internalSetStateDoNotUseOrYouWillBreakYourApp(f){me(f)}},e.instrumentations&&(M=Xo(M,e.instrumentations.map(f=>f.router).filter(Boolean))),M}function li(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Er(e,t,r,n,a,o){let i,u;if(a){i=[];for(let s of t)if(i.push(s),s.route.id===a){u=s;break}}else i=t,u=t[t.length-1];let l=qt(n||".",Nr(i),Ce(e.pathname,r)||e.pathname,o==="path");if(n==null&&(l.search=e.search,l.hash=e.hash),(n==null||n===""||n===".")&&u){let s=$r(l.search);if(u.route.index&&!s)l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&s){let c=new URLSearchParams(l.search),d=c.getAll("index");c.delete("index"),d.filter(g=>g).forEach(g=>c.append("index",g));let p=c.toString();l.search=p?`?${p}`:""}}return r!=="/"&&(l.pathname=Uo({basename:r,pathname:l.pathname})),De(l)}function Pn(e,t,r){if(!r||!li(r))return{path:t};if(r.formMethod&&!Pi(r.formMethod))return{path:t,error:Te(405,{method:r.formMethod})};let n=()=>({path:t,error:Te(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),i=Sa(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ye(o))return n();let d=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((p,[g,R])=>`${p}${g}=${R}
2`,""):String(r.body);return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:void 0,text:d}}}else if(r.formEncType==="application/json"){if(!ye(o))return n();try{let d=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:d,text:void 0}}}catch{return n()}}}G(typeof FormData=="function","FormData is not available in this environment");let u,l;if(r.formData)u=br(r.formData),l=r.formData;else if(r.body instanceof FormData)u=br(r.body),l=r.body;else if(r.body instanceof URLSearchParams)u=r.body,l=An(u);else if(r.body==null)u=new URLSearchParams,l=new FormData;else try{u=new URLSearchParams(r.body),l=An(u)}catch{return n()}let s={formMethod:o,formAction:i,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(ye(s.formMethod))return{path:t,submission:s};let c=Fe(t);return e&&c.search&&$r(c.search)&&u.append("index",""),c.search=`?${u}`,{path:De(c),submission:s}}function _n(e,t,r,n,a,o,i,u,l,s,c,d,p,g,R,b,w,P,S,D,T,_){let $=T?xe(T[1])?T[1].error:T[1].data:void 0,M=a.createURL(o.location),v=a.createURL(l),V;if(c&&o.errors){let K=Object.keys(o.errors)[0];V=i.findIndex(Q=>Q.route.id===K)}else if(T&&xe(T[1])){let K=T[0];V=i.findIndex(Q=>Q.route.id===K)-1}let X=T?T[1].statusCode:void 0,ae=X&&X>=400,Y={currentUrl:M,currentParams:o.matches[0]?.params||{},nextUrl:v,nextParams:i[0].params,...u,actionResult:$,actionStatus:X},le=bt(i),ee=i.map((K,Q)=>{let{route:we}=K,te=null;if(V!=null&&Q>V)te=!1;else if(we.lazy)te=!0;else if(!Fr(we))te=!1;else if(c){let{shouldLoad:k}=pa(we,o.loaderData,o.errors);te=k}else si(o.loaderData,o.matches[Q],K)&&(te=!0);if(te!==null)return Rr(r,n,e,l,le,K,s,t,te);let de=!1;typeof _=="boolean"?de=_:ae?de=!1:(d||M.pathname+M.search===v.pathname+v.search||M.search!==v.search||ui(o.matches[Q],K))&&(de=!0);let m={...Y,defaultShouldRevalidate:de},C=wt(K,m);
2return Rr(r,n,e,l,le,K,s,t,C,m,_)}),ue=[];return R.forEach((K,Q)=>{if(c||!i.some(z=>z.route.id===K.routeId)||g.has(Q))return;let we=o.fetchers.get(Q),te=we&&we.state!=="idle"&&we.data===void 0,de=_e(w,K.path,P??"/",!1,D);if(!de){if(S&&te)return;ue.push({key:Q,routeId:K.routeId,path:K.path,matches:null,match:null,request:null,controller:null});return}if(b.has(Q))return;let m=zt(de,K.path),C=new AbortController,k=lt(a,K.path,C.signal),I=null;if(p.has(Q))p.delete(Q),I=ut(r,n,k,K.path,de,m,s,t);else if(te)d&&(I=ut(r,n,k,K.path,de,m,s,t));else{let z;typeof _=="boolean"?z=_:ae?z=!1:z=d;let W={...Y,defaultShouldRevalidate:z};wt(m,W)&&(I=ut(r,n,k,K.path,de,m,s,t,W))}I&&ue.push({key:Q,routeId:K.routeId,path:K.path,matches:I,match:m,request:k,controller:C})}),{dsMatches:ee,revalidatingFetchers:ue}}function Fr(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function pa(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Fr(e))return{shouldLoad:!1,renderFallback:!1};let n=t!=null&&e.id in t,a=r!=null&&r[e.id]!==void 0;if(!n&&a)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!n};let o=!n&&!a;return{shouldLoad:o,renderFallback:o}}function si(e,t,r){let n=!t||r.route.id!==t.route.id,a=!e.hasOwnProperty(r.route.id);return n||a}function ui(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function wt(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function Tn(e,t,r,n,a,o){let i;if(e){let s=n[e];G(s,`No route found to patch children into: routeId = ${e}`),s.children||(s.children=[]),i=s.children}else i=r.activeRoutes;let u=[],l=[];if(t.forEach(s=>{let c=i.find(d=>ya(s,d));c?l.push({existingRoute:c,newRoute:s}):u.push(s)}),u.length>0){let s=Rt(u,a,[e||"_","patch",String(i?.length||"0")],n);i.push(...s)}if(o&&l.length>0)for(let s=0;s<l.length;s++){let{existingRoute:c,newRoute:d}=l[s],p=c,[g]=Rt([d],a,[],{},!0);Object.assign(p,{element:g.element?g.element:p.element,errorElement:g.errorElement?g.errorElement:p.errorElement,hydrateFallbackElement:g.hydrateFallbackElement?g.hydrateFallbackElement:p.hydrateFallbackElement})}r.hasHMRRoutes||r.setRoutes([...r.activeRoutes])}function ya(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((r,n)=>t.children?.some(a=>ya(r,a)))??!1:!1}var Mn=new WeakMap,va=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let a=r[t.id];if(G(a,"No route found in manifest"),!a.lazy||typeof a.lazy!="object")return;let o=a.lazy[e];if(!o)return;let i=Mn.get(a);i||(i={},Mn.set(a,i));let u=i[e];if(u)return u;let l=(async()=>{let s=Lo(e),d=a[e]!==void 0&&e!=="hasErrorBoundary";if(s)ce(!s,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),i[e]=Promise.resolve();else if(d)ce(!1,`Route "${a.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let p=await o();p!=null&&(Object.assign(a,{[e]:p}),Object.assign(a,n(a)))}typeof a.lazy=="object"&&(a.lazy[e]=void 0,Object.values(a.lazy).every(p=>p===void 0)&&(a.lazy=void 0))})();return i[e]=l,l},Dn=new WeakMap;function ci(e,t,r,n,a){let o=r[e.id];if(G(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let c=Dn.get(o);if(c)return{lazyRoutePromise:c,lazyHandlerPromise:c};let d=(async()=>{G(typeof e.lazy=="function","No lazy route function found");let p=await e.lazy(),g={};for(let R in p){let b=p[R];if(b===void 0)continue;let w=Po(R),S=o[R]!==void 0&&R!=="hasErrorBoundary";w?ce(!w,"Route property "+R+" is not a supported property to be returned from a lazy route function. This property will be ignored."):S?ce(!S,`Route "${o.id}" has a static property "${R}" defined but its lazy function is also returning a value for this property. The lazy route property "${R}" will be ignored.`):g[R]=b}Object.assign(o,g),Object.assign(o,{...n(o),lazy:void 0})})();
2return Dn.set(o,d),d.catch(()=>{}),{lazyRoutePromise:d,lazyHandlerPromise:d}}let i=Object.keys(e.lazy),u=[],l;for(let c of i){if(a&&a.includes(c))continue;let d=va({key:c,route:e,manifest:r,mapRouteProperties:n});d&&(u.push(d),c===t&&(l=d))}let s=u.length>0?Promise.all(u).then(()=>{}):void 0;return s?.catch(()=>{}),l?.catch(()=>{}),{lazyRoutePromise:s,lazyHandlerPromise:l}}async function On(e){let t=e.matches.filter(a=>a.shouldLoad),r={};return(await Promise.all(t.map(a=>a.resolve()))).forEach((a,o)=>{r[t[o].route.id]=a}),r}async function di(e){return e.matches.some(t=>t.route.middleware)?ga(e,()=>On(e)):On(e)}function ga(e,t){return fi(e,t,n=>{if(Ci(n))throw n;return n},Si,r);function r(n,a,o){if(o)return Promise.resolve(Object.assign(o.value,{[a]:{type:"error",result:n}}));{let{matches:i}=e,u=Math.min(Math.max(i.findIndex(s=>s.route.id===a),0),Math.max(i.findIndex(s=>s.shouldCallHandler()),0)),l=Je(i,i[u].route.id).route.id;return Promise.resolve({[l]:{type:"error",result:n}})}}}async function fi(e,t,r,n,a){let{matches:o,...i}=e,u=o.flatMap(s=>s.route.middleware?s.route.middleware.map(c=>[s.route.id,c]):[]);return await wa(i,u,t,r,n,a)}async function wa(e,t,r,n,a,o,i=0){let{request:u}=e;if(u.signal.aborted)throw u.signal.reason??new Error(`Request aborted: ${u.method} ${u.url}`);let l=t[i];if(!l)return await r();let[s,c]=l,d,p=async()=>{if(d)throw new Error("You may only call `next()` once per middleware");try{return d={value:await wa(e,t,r,n,a,o,i+1)},d.value}catch(g){return d={value:await o(g,s,d)},d.value}};try{let g=await c(e,p),R=g!=null?n(g):void 0;return a(R)?R:d?R??d.value:(d={value:await p()},d.value)}catch(g){return await o(g,s,d)}}function Ea(e,t,r,n,a){let o=va({key:"middleware",route:n.route,manifest:t,mapRouteProperties:e}),i=ci(n.route,ye(r.method)?"action":"loader",t,e,a);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function Rr(e,t,r,n,a,o,i,u,l,s=null,c){let d=!1,p=Ea(e,t,r,o,i);return{...o,_lazyPromises:p,shouldLoad:l,shouldRevalidateArgs:s,shouldCallHandler(g){return d=!0,s?typeof c=="boolean"?wt(o,{...s,defaultShouldRevalidate:c}):typeof g=="boolean"?wt(o,{...s,defaultShouldRevalidate:g}):wt(o,s):l},resolve(g){let{lazy:R,loader:b,middleware:w}=o.route,P=d||l||g&&!ye(r.method)&&(R||b),S=w&&w.length>0&&!b&&!R;return P&&(ye(r.method)||!S)?mi({request:r,path:n,pattern:a,match:o,lazyHandlerPromise:p?.handler,lazyRoutePromise:p?.route,handlerOverride:g,scopedContext:u}):Promise.resolve({type:"data",result:void 0})}}}function ut(e,t,r,n,a,o,i,u,l=null){return a.map(s=>s.route.id!==o.route.id?{...s,shouldLoad:!1,shouldRevalidateArgs:l,shouldCallHandler:()=>!1,_lazyPromises:Ea(e,t,r,s,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Rr(e,t,r,n,bt(a),s,i,u,!0,l))}async function hi(e,t,r,n,a,o,i){n.some(c=>c._lazyPromises?.middleware)&&await Promise.all(n.map(c=>c._lazyPromises?.middleware));let u={request:t,url:Ra(t,r),pattern:bt(n),params:n[0].params,context:o,matches:n},s=await e({...u,fetcherKey:a,runClientMiddleware:c=>{let d=u;return ga(d,()=>c({...d,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(n.flatMap(c=>[c._lazyPromises?.handler,c._lazyPromises?.route]))}catch{}return s}async function mi({request:e,path:t,pattern:r,match:n,lazyHandlerPromise:a,lazyRoutePromise:o,handlerOverride:i,scopedContext:u}){let l,s,c=ye(e.method),d=c?"action":"loader",p=g=>{let R,b=new Promise((S,D)=>R=D);s=()=>R(),e.signal.addEventListener("abort",s);let w=S=>typeof g!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${n.route.id}]`)):g({request:e,url:Ra(e,t),pattern:r,params:n.params,context:u},...S!==void 0?[S]:[]),P=(async()=>{try{return{type:"data",result:await(i?i(D=>w(D)):w())}}catch(S){return{type:"error",result:S}}})();return Promise.race([P,b])};try{let g=c?n.route.action:n.route.loader;if(a||o)if(g){let R,[b]=await Promise.all([p(g).catch(w=>{R=w}),a,o]);if(R!==void 0)throw R;l=b}else{await a;let R=c?n.route.action:n.route.loader;if(R)[l]=await Promise.all([p(R),o]);else if(d==="action"){let b=new URL(e.url),w=b.pathname+b.search;throw Te(405,{method:e.method,pathname:w,routeId:n.route.id})}else return{type:"data",result:void 0}}else if(g)l=await p(g);else{let R=new URL(e.url),b=R.pathname+R.search;throw Te(404,{pathname:b})}}catch(g){return{type:"error",result:g}}finally{s&&e.signal.removeEventListener("abort",s)}return l}async function pi(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 yi(e){let{result:t,type:r}=e;if(Qt(t)){let n;try{n=await pi(t)}catch(a){return{type:"error",error:a}}
2return r==="error"?{type:"error",error:new Xe(t.status,t.statusText,n),statusCode:t.status,headers:t.headers}:{type:"data",data:n,statusCode:t.status,headers:t.headers}}return r==="error"?xr(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:Ri(t),statusCode:tt(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:tt(t)?t.status:void 0}:xr(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 vi(e,t,r,n,a){let o=e.headers.get("Location");if(G(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!Ar(o)){let i=n.slice(0,n.findIndex(u=>u.route.id===r)+1);o=Er(new URL(t.url),i,a,o),e.headers.set("Location",o)}return e}var gi=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Sr(e){try{return gi.includes(new URL(e).protocol)}catch{return!1}}function kn(e,t,r,n){if(Ar(e)){let a=e,o=Or.test(a)?new URL(Zn(a,t.protocol)):new URL(a);if(Sr(o.toString()))throw new Error("Invalid redirect location");let i=Ce(o.pathname,r)!=null;if(o.origin===t.origin&&i)return Ir(o.pathname)+o.search+o.hash}try{let a=n.createURL(e);if(Sr(a.toString()))throw new Error("Invalid redirect location")}catch{}return e}function lt(e,t,r,n){let a=e.createURL(Sa(t)).toString(),o={signal:r};if(n&&ye(n.formMethod)){let{formMethod:i,formEncType:u}=n;o.method=i.toUpperCase(),u==="application/json"?(o.headers=new Headers({"Content-Type":u}),o.body=JSON.stringify(n.json)):u==="text/plain"?o.body=n.text:u==="application/x-www-form-urlencoded"&&n.formData?o.body=br(n.formData):o.body=n.formData}return new Request(a,o)}function Ra(e,t){let r=new URL(e.url),n=typeof t=="string"?Fe(t):t;if(r.pathname=n.pathname||"/",n.search){let a=new URLSearchParams(n.search),o=a.getAll("index");a.delete("index");for(let i of o.filter(Boolean))a.append("index",i);r.search=a.size?`?${a.toString()}`:""}else r.search="";return r.hash=n.hash||"",r}function br(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function An(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function wi(e,t,r,n=!1,a=!1){let o={},i=null,u,l=!1,s={},c=r&&xe(r[1])?r[1].error:void 0;return e.forEach(d=>{if(!(d.route.id in t))return;let p=d.route.id,g=t[p];if(G(!et(g),"Cannot handle redirect results in processLoaderData"),xe(g)){let R=g.error;if(c!==void 0&&(R=c,c=void 0),i=i||{},a)i[p]=R;else{let b=Je(e,p);i[b.route.id]==null&&(i[b.route.id]=R)}n||(o[p]=ma),l||(l=!0,u=tt(g.error)?g.error.status:500),g.headers&&(s[p]=g.headers)}else o[p]=g.data,g.statusCode&&g.statusCode!==200&&!l&&(u=g.statusCode),g.headers&&(s[p]=g.headers)}),c!==void 0&&r&&(i={[r[0]]:c},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:i,statusCode:u||200,loaderHeaders:s}}function Nn(e,t,r,n,a,o,i){let{loaderData:u,errors:l}=wi(t,r,n);return a.filter(s=>!s.matches||s.matches.some(c=>c.shouldLoad)).forEach(s=>{let{key:c,match:d,controller:p}=s;if(p&&p.signal.aborted)return;let g=o[c];if(G(g,"Did not find corresponding fetcher result"),xe(g)){let R=Je(e.matches,d?.route.id);l&&l[R.route.id]||(l={...l,[R.route.id]:g.error}),i.delete(c)}else if(et(g))G(!1,"Unhandled fetcher revalidation redirect");else{let R=Ie(g.data);i.set(c,R)}}),{loaderData:u,errors:l}}function In(e,t,r,n){let a=Object.entries(t).filter(([,o])=>o!==ma).reduce((o,[i,u])=>(o[i]=u,o),{});for(let o of r){let i=o.route.id;if(!t.hasOwnProperty(i)&&e.hasOwnProperty(i)&&o.route.loader&&(a[i]=e[i]),n&&n.hasOwnProperty(i))break}return a}function Fn(e){return e?xe(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Je(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function At(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Te(e,{pathname:t,routeId:r,method:n,type:a,message:o}={}){let i="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(i="Bad Request",n&&t&&r?u=`You made a ${n} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:a==="invalid-body"&&(u="Unable to encode submission body")):e===403?(i="Forbidden",u=`Route "${r}" does not match URL "${t}"`):e===404?(i="Not Found",u=`No route matches URL "${t}"`):e===405&&(i="Method Not Allowed",n&&t&&r?u=`You made a ${n.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:n&&(u=`Invalid request method "${n.toUpperCase()}"`)),new Xe(e||500,i,new Error(u),!0)}function Nt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(et(a))return{key:n,result:a}}}function Sa(e){let t=typeof e=="string"?Fe(e):e;return De({...t,hash:""})}function Ei(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Ri(e){return new Xe(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function Si(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&bi(r))}function bi(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function xi(e){return Qt(e.result)&&fa.has(e.result.status)}function xe(e){return e.type==="error"}function et(e){return(e&&e.type)==="redirect"}function xr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Qt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Li(e){return fa.has(e)}function Ci(e){return Qt(e)&&Li(e.status)&&e.headers.has("Location")}function Pi(e){return ri.has(e.toUpperCase())}function ye(e){return ei.has(e.toUpperCase())}function $r(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function zt(e,t){let r=typeof t=="string"?Fe(t).search:t.search;if(e[e.length-1].route.index&&$r(r||""))return e[e.length-1];let n=ia(e);return n[n.length-1]}function $n(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;
2if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function pr(e,t,r,n){return n?{state:"loading",location:e,matches:t,historyAction:r,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}:{state:"loading",location:e,matches:t,historyAction:r,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function _i(e,t,r,n){return{state:"submitting",location:e,matches:t,historyAction:r,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}}function pt(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 Ti(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 Ie(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 Mi(e,t){try{let r=e.sessionStorage.getItem(ha);if(r){let n=JSON.parse(r);for(let[a,o]of Object.entries(n||{}))o&&Array.isArray(o)&&t.set(a,new Set(o||[]))}}catch{}}function Di(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(ha,JSON.stringify(r))}catch(n){ce(!1,`Failed to save applied view transitions in sessionStorage (${n}).`)}}}function jn(){let e,t,r=new Promise((n,a)=>{e=async o=>{n(o);try{await r}catch{}},t=async o=>{a(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var rt=h.createContext(null);rt.displayName="DataRouter";var ct=h.createContext(null);ct.displayName="DataRouterState";var ba=h.createContext(!1);function jr(){return h.useContext(ba)}var Ur=h.createContext({isTransitioning:!1});Ur.displayName="ViewTransition";var xa=h.createContext(new Map);xa.displayName="Fetchers";var Oi=h.createContext(null);Oi.displayName="Await";var be=h.createContext(null);be.displayName="Navigation";var Zt=h.createContext(null);Zt.displayName="Location";var Oe=h.createContext({outlet:null,matches:[],isDataRoute:!1});Oe.displayName="Route";var Hr=h.createContext(null);Hr.displayName="RouteError";var La="REACT_ROUTER_ERROR",ki="REDIRECT",Ai="ROUTE_ERROR_RESPONSE";function Ni(e){if(e.startsWith(`${La}:${ki}:{`))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 Ii(e){if(e.startsWith(`${La}:${Ai}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Xe(t.status,t.statusText,t.data)}catch{}}function Fi(e,{relative:t}={}){G(xt(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=h.useContext(be),{hash:a,pathname:o,search:i}=Lt(e,{relative:t}),u=o;return r!=="/"&&(u=o==="/"?r:Le([r,o])),n.createHref({pathname:u,search:i,hash:a})}function xt(){return h.useContext(Zt)!=null}function Me(){return G(xt(),"useLocation() may be used only in the context of a <Router> component."),h.useContext(Zt).location}var Ca="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Pa(e){h.useContext(be).static||h.useLayoutEffect(e)}function $i(){let{isDataRoute:e}=h.useContext(Oe);return e?Qi():ji()}function ji(){G(xt(),"useNavigate() may be used only in the context of a <Router> component.");let e=h.useContext(rt),{basename:t,navigator:r}=h.useContext(be),{matches:n}=h.useContext(Oe),{pathname:a}=Me(),o=JSON.stringify(Nr(n)),i=h.useRef(!1);return Pa(()=>{i.current=!0}),h.useCallback((l,s={})=>
2{if(ce(i.current,Ca),!i.current)return;if(typeof l=="number"){r.go(l);return}let c=qt(l,JSON.parse(o),a,s.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Le([t,c.pathname])),(s.replace?r.replace:r.push)(c,s.state,s)},[t,r,o,a,e])}var Ui=h.createContext(null);function Hi(e){let t=h.useContext(Oe).outlet;return h.useMemo(()=>t&&h.createElement(Ui.Provider,{value:e},t),[t,e])}function _a(){let{matches:e}=h.useContext(Oe);return e[e.length-1]?.params??{}}function Lt(e,{relative:t}={}){let{matches:r}=h.useContext(Oe),{pathname:n}=Me(),a=JSON.stringify(Nr(r));return h.useMemo(()=>qt(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function zi(e,t,r){G(xt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=h.useContext(be),{matches:a}=h.useContext(Oe),o=a[a.length-1],i=o?o.params:{},u=o?o.pathname:"/",l=o?o.pathnameBase:"/",s=o&&o.route;{let w=s&&s.path||"";Oa(u,!s||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${w}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
3
4Please change the parent <Route path="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let c=Me(),d;d=c;let p=d.pathname||"/",g=p;if(l!=="/"){let w=l.replace(/^\//,"").split("/");g="/"+p.replace(/^\//,"").split("/").slice(w.length).join("/")}let R=r&&r.state.matches.length?r.state.matches.map(w=>Object.assign(w,{route:r.manifest[w.route.id]||w.route})):ta(e,{pathname:g});return ce(s||R!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),ce(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Ji(R&&R.map(w=>Object.assign({},w,{params:Object.assign({},i,w.params),pathname:Le([l,n.encodeLocation?n.encodeLocation(w.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:Le([l,n.encodeLocation?n.encodeLocation(w.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathnameBase])})),a,r)}function Bi(){let e=Wr(),t=tt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=h.createElement(h.Fragment,null,h.createElement("p",null,"💿 Hey developer 👋"),h.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",h.createElement("code",{style:o},"ErrorBoundary")," or"," ",h.createElement("code",{style:o},"errorElement")," prop on your route.")),h.createElement(h.Fragment,null,h.createElement("h2",null,"Unexpected Application Error!"),h.createElement("h3",{style:{fontStyle:"italic"}},t),r?h.createElement("pre",{style:a},r):null,i)}var Wi=h.createElement(Bi,null),Ta=class extends h.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.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"){const r=Ii(e.digest);r&&(e=r)}let t=e!==void 0?h.createElement(Oe.Provider,{value:this.props.routeContext},h.createElement(Hr.Provider,{value:e,children:this.props.component})):this.props.children;
4return this.context?h.createElement(Yi,{error:e},t):t}};Ta.contextType=ba;var yr=new WeakMap;function Yi({children:e,error:t}){let{basename:r}=h.useContext(be);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=Ni(t.digest);if(n){let a=yr.get(t);if(a)throw a;let o=ua(n.location,r),i=o.absoluteURL||o.to;if(Sr(i))throw new Error("Invalid redirect location");if(sa&&!yr.get(t))if(o.isExternal||n.reloadDocument)window.location.href=i;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:n.replace}));throw yr.set(t,u),u}return h.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i}`})}}return e}function Vi({routeContext:e,match:t,children:r}){let n=h.useContext(rt);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),h.createElement(Oe.Provider,{value:e},r)}function Ji(e,t=[],r){let n=r?.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n?.errors;if(o!=null){let c=a.findIndex(d=>d.route.id&&o?.[d.route.id]!==void 0);G(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,c+1))}let i=!1,u=-1;if(r&&n){i=n.renderFallback;for(let c=0;c<a.length;c++){let d=a[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=c),d.route.id){let{loaderData:p,errors:g}=n,R=d.route.loader&&!p.hasOwnProperty(d.route.id)&&(!g||g[d.route.id]===void 0);if(d.route.lazy||R){r.isStatic&&(i=!0),u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}}let l=r?.onError,s=n&&l?(c,d)=>{l(c,{location:n.location,params:n.matches?.[0]?.params??{},pattern:bt(n.matches),errorInfo:d})}:void 0;return a.reduceRight((c,d,p)=>{let g,R=!1,b=null,w=null;n&&(g=o&&d.route.id?o[d.route.id]:void 0,b=d.route.errorElement||Wi,i&&(u<0&&p===0?(Oa("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,w=null):u===p&&(R=!0,w=d.route.hydrateFallbackElement||null)));let P=t.concat(a.slice(0,p+1)),S=()=>{let D;return g?D=b:R?D=w:d.route.Component?D=h.createElement(d.route.Component,null):d.route.element?D=d.route.element:D=c,h.createElement(Vi,{match:d,routeContext:{outlet:c,matches:P,isDataRoute:n!=null},children:D})};return n&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?h.createElement(Ta,{location:n.location,revalidation:n.revalidation,component:b,error:g,children:S(),routeC
4ontext:{outlet:null,matches:P,isDataRoute:!0},onError:s}):S()},null)}function zr(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Gi(e){let t=h.useContext(rt);return G(t,zr(e)),t}function Ct(e){let t=h.useContext(ct);return G(t,zr(e)),t}function Xi(e){let t=h.useContext(Oe);return G(t,zr(e)),t}function Pt(e){let t=Xi(e),r=t.matches[t.matches.length-1];return G(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Ki(){return Pt("useRouteId")}function qi(){let e=Ct("useNavigation");return h.useMemo(()=>{let{matches:t,historyAction:r,...n}=e.navigation;return n},[e.navigation])}function Br(){let{matches:e,loaderData:t}=Ct("useMatches");return h.useMemo(()=>e.map(r=>ra(r,t)),[e,t])}function Ma(){let e=Ct("useLoaderData"),t=Pt("useLoaderData");return e.loaderData[t]}function Da(){let e=Ct("useActionData"),t=Pt("useLoaderData");return e.actionData?e.actionData[t]:void 0}function Wr(){let e=h.useContext(Hr),t=Ct("useRouteError"),r=Pt("useRouteError");return e!==void 0?e:t.errors?.[r]}function Qi(){let{router:e}=Gi("useNavigate"),t=Pt("useNavigate"),r=h.useRef(!1);return Pa(()=>{r.current=!0}),h.useCallback(async(a,o={})=>{ce(r.current,Ca),r.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var Un={};function Oa(e,t,r){!t&&!Un[e]&&(Un[e]=!0,ce(!1,r))}var Hn={};function Lr(e,t){!e&&!Hn[t]&&(Hn[t]=!0,console.warn(t))}var Zi="useOptimistic",zn=wo[Zi],el=()=>{};function tl(e){return zn?zn(e):[e,el]}function Us(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&ce(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:h.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&ce(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:h.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&ce(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:h.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Hs=["HydrateFallback","hydrateFallbackElement"],rl=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function zs({router:e,flushSync:t,onError:r,useTransitions:n}){n=jr()||n;let[o,i]=h.useState(e.state),[u,l]=tl(o),[s,c]=h.useState(),[d,p]=h.useState({isTransitioning:!1}),[g,R]=h.useState(),[b,w]=h.useState(),[P,S]=h.useState(),D=h.useRef(new Map),T=h.useCallback((v,{deletedFetchers:V,newErrors:X,flushSync:ae,viewTransitionOpts:Y})=>{X&&r&&Object.values(X).forEach(ee=>r(ee,{location:v.location,params:v.matches[0]?.params??{},pattern:bt(v.matches)})),v.fetchers.forEach((ee,ue)=>{ee.data!==void 0&&D.current.set(ue,ee.data)}),V.forEach(ee=>D.current.delete(ee)),Lr(ae===!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 le=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(Lr(Y==null||le,"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."),!Y||!le){t&&ae?t(()=>i(v)):n===!1?i(v):h.startTransition(()=>{n===!0&&l(ee=>Bn(ee,v)),i(v)});return}if(t&&ae){t(()=>{b&&(g?.resolve(),b.skipTransition()),p({isTransitioning:!0,flushSync:!0,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation})});let ee=e.window.document.startViewTransition(()=>{t(()=>i(v))});ee.finished.finally(()=>{t(()=>{R(void 0),w(void 0),c(void 0),p({isTransitioning:!1})})}),t(()=>w(ee));return}b?(g?.resolve(),b.skipTransition(),S({state:v,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation})):(c(v),p({isTransitioning:!0,flushSync:!1,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation}))},[e.window,t,b,g,n,l,r]);h.useLayoutEffect(()=>e.subscribe(T),[e,T]),h.useEffect(()=>{d.isTransitioning&&!d.flushSync&&R(new rl)},[d]),h.useEffect(()=>{if(g&&s&&e.window){let v=s,V=g.promise,X=e.window.document.startViewTransition(async()=>{n===!1?i(v):h.startTransition(()=>{n===!0&&l(ae=>Bn(ae,v)),i(v)}),await V});X.finished.finally(()=>{R(void 0),w(void 0),c(void 0),p({isTransitioning:!1})}),w(X)}},[s,g,e.window,n,l]),h.useEffect(()=>{g&&s&&u.location.key===s.location.key&&g.resolve()},[g,b,u.location,s]),h.useEffect(()=>{!d.isTransitioning&&P&&(c(P.state),p({isTransitioning:!0,flushSync:!1,currentLocation:P.currentLocation,nextLocation:P.nextLocation}),S(void 0))},[d.isTransitioning,P]);let _=h.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:v=>e.navigate(v),push:(v,V,X)=>e.navigate(v,{state:V,preventScrollReset:X?.preventScrollReset}),replace:(v,V,X)=>e.navigate(v,{replace:!0,state:V,preventScrollReset:X?.preventScrollReset})}),[e]),$=e.basename||"/",M=h.useMemo(()=>({router:e,navigator:_,static:!1,basename:$,onError:r}),[e,_,$,r]);return h.createElement(h.Fragment,null,h.createElement(rt.Provider,{value:M},h.createElement(ct.Provider,{value:u},h.createElement(xa.Provider,{value:D.current},h.createElement(Ur.Provider,{value:d},h.createElement(ol,{basename:$,location:u.location,navigationType:u.historyAction,navigator:_,useTransitions:n},h.createElement(nl,{routes:e.routes,manifest:e.manifest,future:e.future,state:u,isStatic:!1,onError:r})))))),null)}function Bn(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var nl=h.memo(al);function al({routes:e,manifest:t,future:r,state:n,isStatic:a,onError:o}){return zi(e,void 0,{manifest:t,state:n,isStatic:a,onError:o})}function Bs(e){return Hi(e.context)}function ol({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1,useTransitions:i}){G(!xt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),l=h.useMemo(()=>({basename:u,navigator:a,static:o,useTransitions:i,future:{}}),[u,a,o,i]);typeof r=="string"&&(r=Fe(r));let{pathname:s="/",search:c="",hash:d="",state:p=null,key:g="default",mask:R}=r,b=h.useMemo(()=>{let w=Ce(s,u);return w==null?null:{location:{pathname:w,search:c,hash:d,state:p,key:g,mask:R},navigationType:n}}
4,[u,s,c,d,p,g,n,R]);return ce(b!=null,`<Router basename="${u}"> is not able to match the URL "${s}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:h.createElement(be.Provider,{value:l},h.createElement(Zt.Provider,{children:t,value:b}))}function il(){return{params:_a(),loaderData:Ma(),actionData:Da(),matches:Br()}}function Ws(e){return function(){const r=il();return h.createElement(e,r)}}function ll(){return{params:_a(),loaderData:Ma(),actionData:Da(),error:Wr()}}function Ys(e){return function(){const r=ll();return h.createElement(e,r)}}var Bt="get",Wt="application/x-www-form-urlencoded";function er(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function sl(e){return er(e)&&e.tagName.toLowerCase()==="button"}function ul(e){return er(e)&&e.tagName.toLowerCase()==="form"}function cl(e){return er(e)&&e.tagName.toLowerCase()==="input"}function dl(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function fl(e,t){return e.button===0&&(!t||t==="_self")&&!dl(e)}var It=null;function hl(){if(It===null)try{new FormData(document.createElement("form"),0),It=!1}catch{It=!0}return It}var ml=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vr(e){return e!=null&&!ml.has(e)?(ce(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Wt}"`),null):e}function pl(e,t){let r,n,a,o,i;if(ul(e)){let u=e.getAttribute("action");n=u?Ce(u,t):null,r=e.getAttribute("method")||Bt,a=vr(e.getAttribute("enctype"))||Wt,o=new FormData(e)}else if(sl(e)||cl(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||u.getAttribute("action");if(n=l?Ce(l,t):null,r=e.getAttribute("formmethod")||u.getAttribute("method")||Bt,a=vr(e.getAttribute("formenctype"))||vr(u.getAttribute("enctype"))||Wt,o=new FormData(u,e),!hl()){let{name:s,type:c,value:d}=e;if(c==="image"){let p=s?`${s}.`:"";o.append(`${p}x`,"0"),o.append(`${p}y`,"0")}else s&&o.append(s,d)}}else{if(er(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Bt,n=null,a=Wt,i=e}return o&&a==="text/plain"&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}var yl=-1,vl=-2,gl=-3,wl=-4,El=-5,Rl=-6,Sl=-7,bl="B",xl="D",ka="E",Ll="M",Cl="N",Aa="P",Pl="R",_l="S",Tl="Y",Ml="U",Dl="Z",Na=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};function Ol(){const e=new TextDecoder;let t="";return new TransformStream({transform(r,n){const a=e.decode(r,{stream:!0}),o=(t+a).split(`
5`);t=o.pop()||"";for(const i of o)n.enqueue(i)},flush(r){t&&r.enqueue(t)}})}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ft=typeof window<"u"?window:typeof globalThis<"u"?globalThis:void 0;function Cr(e){const{hydrated:t,values:r}=this;if(typeof e=="number")return Wn.call(this,e);if(!Array.isArray(e)||!e.length)throw new SyntaxError;const n=r.length;for(const a of e)r.push(a);return t.length=r.length,Wn.call(this,n)}function Wn(e){const{hydrated:t,values:r,deferred:n,plugins:a}=this;let o;const i=[[e,l=>{o=l}]];let u=[];for(;i.length>0;){const[l,s]=i.pop();switch(l){case Sl:s(void 0);continue;case El:s(null);continue;case vl:s(NaN);continue;case Rl:s(1/0);continue;case gl:s(-1/0);continue;case wl:s(-0);continue}if(t[l]){s(t[l]);continue}const c=r[l];if(!c||typeof c!="object"){t[l]=c,s(c);continue}if(Array.isArray(c))if(typeof c[0]=="string"){const[d,p,g]=c;switch(d){case xl:s(t[l]=new Date(p));continue;case Ml:s(t[l]=new URL(p));continue;case bl:s(t[l]=BigInt(p));continue;case Pl:s(t[l]=new RegExp(p,g));continue;case Tl:s(t[l]=Symbol.for(p));continue;case _l:const R=new Set;t[l]=R;for(let T=c.length-1;T>0;T--)i.push([c[T],_=>{R.add(_)}]);s(R);continue;case Ll:const b=new Map;t[l]=b;for(let T=c.length-2;T>0;T-=2){const _=[];i.push([c[T+1],$=>{_[1]=$}]),i.push([c[T],$=>{_[0]=$}]),u.push(()=>{b.set(_[0],_[1])})}s(b);continue;case Cl:const w=Object.create(null);t[l]=w;for(const T of Object.keys(p).reverse()){const _=[];i.push([p[T],$=>{_[1]=$}]),i.push([Number(T.slice(1)),$=>{_[0]=$}]),u.push(()=>{w[_[0]]=_[1]})}s(w);continue;case Aa:if(t[p])s(t[l]=t[p]);else{const T=new Na;n[p]=T,s(t[l]=T.promise)}continue;case ka:const[,P,S]=c;let D=S&&Ft&&la.includes(S)&&S in Ft&&typeof Ft[S]=="function"?new Ft[S](P):new Error(P);t[l]=D,s(D);continue;case Dl:s(t[l]=t[p]);continue;default:if(Array.isArray(a)){const T=[],_=c.slice(1);for(let $=0;$<_.length;$++){const M=_[$];i.push([M,v=>{T[$]=v}])}u.push(()=>{for(const $ of a){const M=$(c[0],...T);if(M){s(t[l]=M.value);return}}throw new SyntaxError});continue}throw new SyntaxError}}else{const d=[];t[l]=d;for(let p=0;p<c.length;p++){const g=c[p];g!==yl&&i.push([g,R=>{d[p]=R}])}s(d);continue}else{const d={};t[l]=d;for(const p of Object.keys(c).reverse()){const g=[];i.push([c[p],R=>{g[1]=R}]),i.push([Number(p.slice(1)),R=>{g[0]=R}]),u.push(()=>{d[g[0]]=g[1]})}s(d);continue}}for(;u.length>0;)u.pop()();return o}async function kl(e,t){const{plugins:r}=t??{},n=new Na,a=e.pipeThrough(Ol()).getReader(),o={values:[],hydrated:[],deferred:{},plugins:r},i=await Al.call(o,a);let u=n.promise;
5return i.done?n.resolve():u=Nl.call(o,a).then(n.resolve).catch(l=>{for(const s of Object.values(o.deferred))s.reject(l);n.reject(l)}),{done:u.then(()=>a.closed),value:i.value}}async function Al(e){const t=await e.read();if(!t.value)throw new SyntaxError;let r;try{r=JSON.parse(t.value)}catch{throw new SyntaxError}return{done:t.done,value:Cr.call(this,r)}}async function Nl(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;const r=t.value;switch(r[0]){case Aa:{const n=r.indexOf(":"),a=Number(r.slice(1,n)),o=this.deferred[a];if(!o)throw new Error(`Deferred ID ${a} not found in stream`);const i=r.slice(n+1);let u;try{u=JSON.parse(i)}catch{throw new SyntaxError}const l=Cr.call(this,u);o.resolve(l);break}case ka:{const n=r.indexOf(":"),a=Number(r.slice(1,n)),o=this.deferred[a];if(!o)throw new Error(`Deferred ID ${a} not found in stream`);const i=r.slice(n+1);let u;try{u=JSON.parse(i)}catch{throw new SyntaxError}const l=Cr.call(this,u);o.reject(l);break}default:throw new SyntaxError}t=await e.read()}}async function Il(e){let t={signal:e.signal};if(e.method!=="GET"){t.method=e.method;let r=e.headers.get("Content-Type");r&&/\bapplication\/json\b/.test(r)?(t.headers={"Content-Type":r},t.body=JSON.stringify(await e.json())):r&&/\btext\/plain\b/.test(r)?(t.headers={"Content-Type":r},t.body=await e.text()):r&&/\bapplication\/x-www-form-urlencoded\b/.test(r)?t.body=new URLSearchParams(await e.text()):t.body=await e.formData()}return t}var Fl={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},$l=/[&><\u2028\u2029]/g;function Pr(e){return e.replace($l,t=>Fl[t])}function ge(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}var _r=Symbol("SingleFetchRedirect"),Ia=class extends Error{},jl=202,Ul=new Set([100,101,204,205]);function Vs(e,t,r,n,a,o){let i=Hl(e,u=>{let l=t.routes[u.route.id];return ge(l,"Route not found in manifest"),{hasLoader:l.hasLoader,hasClientLoader:l.hasClientLoader}},Gl,n,a,o);return async u=>u.runClientMiddleware(i)}function Hl(e,t,r,n,a,o,i=()=>!0){return async u=>{let{request:l,matches:s,fetcherKey:c}=u,d=e();if(l.method!=="GET")return zl(u,r,a,o);let p=s.some(g=>{let{hasLoader:R,hasClientLoader:b}=t(g);return g.shouldCallHandler()&&R&&!b});return!n&&!p?Bl(u,t,r,a,o):c?Vl(u,r,a,o):Wl(u,d,t,r,n,a,o,i)}}async function zl(e,t,r,n){let a=e.matches.find(u=>u.shouldCallHandler());ge(a,"No action match found");let o,i=await a.resolve(async u=>await u(async()=>{let{data:s,status:c}=await t(e,r,n,[a.route.id]);return o=c,St(s,a.route.id)}));return Qt(i.result)||tt(i.result)||xr(i.result)?{[a.route.id]:i}:{[a.route.id]:{type:i.type,result:Vo(i.result,o)}}}async function Bl(e,t,r,n,a){let o=e.matches.filter(u=>u.shouldCallHandler()),i={};return await Promise.all(o.map(u=>u.resolve(async l=>{try{let{hasClientLoader:s}=t(u),c=u.route.id,d=s?await l(async()=>{let{data:p}=await r(e,n,a,[c]);return St(p,c)}):await l();i[u.route.id]={type:"data",result:d}}catch(s){i[u.route.id]={type:"error",result:s}}}))),i}async function Wl(e,t,r,n,a,o,i,u=()=>!0){let l=new Set,s=!1,c=e.matches.map(()=>Yn()),d=Yn(),p={},g=Promise.all(e.matches.map(async(b,w)=>b.resolve(async P=>{c[w].resolve();let S=b.route.id,{hasLoader:D,hasClientLoader:T}=r(b),_=!b.shouldRevalidateArgs||b.shouldRevalidateArgs.actionStatus==null||b.shouldRevalidateArgs.actionStatus<400;if(!b.shouldCallHandler(_)){s||(s=b.shouldRevalidateArgs!=null&&D);return}if(u(b)&&T){D&&(s=!0);try{let M=await P(async()=>{let{data:v}=await n(e,o,i,[S]);return St(v,S)});p[S]={type:"data",result:M}}catch(M){p[S]={type:"error",result:M}}return}D&&l.add(S);try{let M=await P(async()=>{let v=await d.promise;return St(v,S)});p[S]={type:"data",result:M}}catch(M){p[S]={type:"error",result:M}}})));if(await Promise.all(c.map(b=>b.promise)),(!t.state.initialized&&t.state.navigation.state==="idle"||l.size===0)&&!window.__reactRouterHdrActive)d.resolve({routes:{}});else{let b=a&&s&&l.size>0?[...l.keys()]:void 0;try{let w=await n(e,o,i,b);d.resolve(w.data)}catch(w){d.reject(w)}}return await g,await Yl(d.promise,e.matches,l,p),p}async function Yl(e,t,r,n){try{let a,o=await e;if("routes"in o){for(let i of t)if(i.route.id in o.routes){let u=o.routes[i.route.id];if("error"in u){a=u.error,n[i.route.id]?.result==null&&(n[i.route.id]={type:"error",result:a});break}}}
5a!==void 0&&Array.from(r.values()).forEach(i=>{n[i].result instanceof Ia&&(n[i].result=a)})}catch{}}async function Vl(e,t,r,n){let a=e.matches.find(u=>u.shouldCallHandler());ge(a,"No fetcher match found");let o=a.route.id,i=await a.resolve(async u=>u(async()=>{let{data:l}=await t(e,r,n,[o]);return St(l,o)}));return{[a.route.id]:i}}function Jl(e){let t=e.searchParams.getAll("index");e.searchParams.delete("index");let r=[];for(let n of t)n&&r.push(n);for(let n of r)e.searchParams.append("index",n);return e}function Yr(e,t,r,n){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${n}`:a.pathname=`${a.pathname}.${n}`:a.pathname==="/"?a.pathname=`_root.${n}`:t&&Ce(a.pathname,t)==="/"?a.pathname=`${Jt(t)}/_root.${n}`:a.pathname=`${Jt(a.pathname)}.${n}`,a}async function Gl(e,t,r,n){let{request:a}=e,o=Yr(a.url,t,r,"data");a.method==="GET"&&(o=Jl(o),n&&o.searchParams.set("_routes",n.join(",")));let i=await fetch(o,await Il(a));if(i.status>=400&&!i.headers.has("X-Remix-Response"))throw new Xe(i.status,i.statusText,await i.text());if(i.status===204&&i.headers.has("X-Remix-Redirect"))return{status:jl,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(Ul.has(i.status)){let u={};return n&&a.method!=="GET"&&(u[n[0]]={data:void 0}),{status:i.status,data:{routes:u}}}ge(i.body,"No response body to decode");try{let u=await Xl(i.body,window),l;if(a.method==="GET"){let s=u.value;_r in s?l={redirect:s[_r]}:l={routes:s}}else{let s=u.value,c=n?.[0];ge(c,"No routeId found for single fetch call decoding"),"redirect"in s?l={redirect:s}:l={routes:{[c]:s}}}return{status:i.status,data:l}}catch{throw new Error("Unable to decode turbo-stream response")}}function Xl(e,t){return kl(e,{plugins:[(r,...n)=>{if(r==="SanitizedError"){let[a,o,i]=n,u=Error;a&&la.includes(a)&&a in t&&typeof t[a]=="function"&&(u=t[a]);let l=new u(o);return l.stack=i,{value:l}}if(r==="ErrorResponse"){let[a,o,i]=n;return{value:new Xe(o,i,a)}}if(r==="SingleFetchRedirect")return{value:{[_r]:n[0]}};if(r==="SingleFetchClassInstance")return{value:n[0]};if(r==="SingleFetchFallback")return{value:void 0}}]})}function St(e,t){if("redirect"in e){let{redirect:n,revalidate:a,reload:o,replace:i,status:u}=e.redirect;throw Jo(n,{status:u,headers:{...a?{"X-Remix-Revalidate":"yes"}:null,...o?{"X-Remix-Reload-Document":"yes"}:null,...i?{"X-Remix-Replace":"yes"}:null}})}let r=e.routes[t];if(r==null)throw new Ia(`No result found for routeId "${t}"`);if("error"in r)throw r.error;if("data"in r)return r.data;throw new Error(`Invalid response found for routeId "${t}"`)}function Yn(){let e,t,r=new Promise((n,a)=>{e=async o=>{n(o);try{await r}catch{}},t=async o=>{a(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}async function Fa(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Kl(e,t,r){let n=e.map(o=>{let i=t[o.route.id],u=r.routes[o.route.id];return[u&&u.css?u.css.map(l=>({rel:"stylesheet",href:l})):[],i?.links?.()||[]]}).flat(2),a=Jr(e,r);return Ha(n,a)}function $a(e){return e.css?e.css.map(t=>({rel:"stylesheet",href:t})):[]}async function ql(e){if(!e.css)return;let t=$a(e);await Promise.all(t.map(Ua))}async function ja(e,t){if(!e.css&&!t.links||!rs())return;let r=[];if(e.css&&r.push(...$a(e)),t.links&&r.push(...t.links()),r.length===0)return;let n=[];for(let a of r)!Vr(a)&&a.rel==="stylesheet"&&n.push({...a,rel:"preload",as:"style"});await Promise.all(n.map(Ua))}async function Ua(e){return new Promise(t=>{if(e.media&&!window.matchMedia(e.media).matches||document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`))return t();let r=document.createElement("link");Object.assign(r,e);function n(){document.head.contains(r)&&document.head.removeChild(r)}r.onload=()=>{n(),t()},r.onerror=()=>{n(),t()},document.head.appendChild(r)})}function Vr(e){return e!=null&&typeof e.page=="string"}function Ql(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 Zl(e,t,r){let n=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let i=await Fa(o,r);return i.links?i.links():[]}return[]}));return Ha(n.flat(1).filter(Ql).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function Vn(e,t,r,n,a,o){let i=(l,s)=>r[s]?l.route.id!==r[s].route.id:!0,u=(l,s)=>r[s].pathname!==l.pathname||r[s].route.path?.endsWith("*")&&r[s].params["*"]!==l.params["*"];return o==="assets"?t.filter((l,s)=>i(l,s)||u(l,s)):o==="data"?t.filter((l,s)=>{let c=n.routes[l.route.id];if(!c||!c.hasLoader)return!1;if(i(l,s)||u(l,s))return!0;
5if(l.route.shouldRevalidate){let d=l.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function Jr(e,t,{includeHydrateFallback:r}={}){return es(e.map(n=>{let a=t.routes[n.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function es(e){return[...new Set(e)]}function ts(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function Ha(e,t){let r=new Set,n=new Set(t);return e.reduce((a,o)=>{if(t&&!Vr(o)&&o.as==="script"&&o.href&&n.has(o.href))return a;let u=JSON.stringify(ts(o));return r.has(u)||(r.add(u),a.push({key:u,link:o})),a},[])}var $t;function rs(){if($t!==void 0)return $t;let e=document.createElement("link");return $t=e.relList.supports("preload"),e=null,$t}function ns(){let{nonce:e}=$e();return h.createElement(Tr,{title:"Loading...",renderScripts:!0},h.createElement("script",{nonce:e,dangerouslySetInnerHTML:{__html:`
6              console.log(
7                "💿 Hey developer 👋. You can provide a way better UX than this " +
8                "when your app is loading JS modules and/or running \`clientLoader\` " +
9                "functions. Check out https://reactrouter.com/start/framework/route-module#hydratefallback " +
10                "for more information."
11              );
12            `}}))}function za(e){let t={};return Object.values(e).forEach(r=>{if(r){let n=r.parentId||"";t[n]||(t[n]=[]),t[n].push(r)}}),t}function as(e,t,r){let n=Ba(t),a=t.HydrateFallback&&(!r||e.id==="root")?t.HydrateFallback:e.id==="root"?ns:void 0,o=t.ErrorBoundary?t.ErrorBoundary:e.id==="root"?()=>h.createElement(Va,{error:Wr()}):void 0;return e.id==="root"&&t.Layout?{...n?{element:h.createElement(t.Layout,null,h.createElement(n,null))}:{Component:n},...o?{errorElement:h.createElement(t.Layout,null,h.createElement(o,null))}:{ErrorBoundary:o},...a?{hydrateFallbackElement:h.createElement(t.Layout,null,h.createElement(a,null))}:{HydrateFallback:a}}:{Component:n,ErrorBoundary:o,HydrateFallback:a}}function Js(e,t,r,n,a,o){return Gr(t,r,n,a,o,"",za(t),e)}function jt(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 Xe(400,"Bad Request",new Error(n),!0)}}function gr(e,t){let r=e==="clientAction"?"a":"an",n=`Route "${t}" does not have ${r} ${e}, but you are trying to submit to it. To fix this, please add ${r} \`${e}\` function to the route`;throw console.error(n),new Xe(405,"Method Not Allowed",new Error(n),!0)}function Gr(e,t,r,n,a,o="",i=za(e),u){return(i[o]||[]).map(l=>{let s=t[l.id];function c(S){return ge(typeof S=="function","No single fetch function available for route handler"),S()}function d(S){return l.hasLoader?c(S):Promise.resolve(null)}function p(S){if(!l.hasAction)throw gr("action",l.id);return c(S)}function g(S){import(S)}function R(S){S.clientActionModule&&g(S.clientActionModule),S.clientLoaderModule&&g(S.clientLoaderModule)}async function b(S){let D=t[l.id],T=D?ja(l,D):Promise.resolve();try{return S()}finally{await T}}let w={id:l.id,index:l.index,path:l.path};if(s){Object.assign(w,{...w,...as(l,s,a),middleware:s.clientMiddleware,handle:s.handle,shouldRevalidate:Jn(w.path,s,l,n,u)});let S=r&&r.loaderData&&l.id in r.loaderData,D=S?r?.loaderData?.[l.id]:void 0,T=r&&r.errors&&l.id in r.errors,_=T?r?.errors?.[l.id]:void 0,$=u==null&&(s.clientLoader?.hydrate===!0||!l.hasLoader);w.loader=async({request:M,params:v,context:V,pattern:X,url:ae},Y)=>{let le=$;return $=!1,await b(async()=>(ge(s,"No `routeModule` available for critical-route loader"),s.clientLoader?s.clientLoader({request:M,params:v,context:V,pattern:X,url:ae,async serverLoader(){if
12(jt("loader",l),le){if(S)return D;if(T)throw _}return d(Y)}}):d(Y)))},w.loader.hydrate=ls(l.id,s.clientLoader,l.hasLoader,a),w.action=({request:M,params:v,context:V,pattern:X,url:ae},Y)=>b(async()=>{if(ge(s,"No `routeModule` available for critical-route action"),!s.clientAction){if(a)throw gr("clientAction",l.id);return p(Y)}return s.clientAction({request:M,params:v,context:V,pattern:X,url:ae,async serverAction(){return jt("action",l),p(Y)}})})}else{l.hasClientLoader||(w.loader=(T,_)=>b(()=>d(_))),l.hasClientAction||(w.action=(T,_)=>b(()=>{if(a)throw gr("clientAction",l.id);return p(_)}));let S;async function D(){return S?await S:(S=(async()=>{(l.clientLoaderModule||l.clientActionModule)&&await new Promise(_=>setTimeout(_,0));let T=is(l,t);return R(l),await T})(),await S)}w.lazy={loader:l.hasClientLoader?async()=>{let{clientLoader:T}=l.clientLoaderModule?await import(l.clientLoaderModule):await D();return ge(T,"No `clientLoader` export found"),(_,$)=>T({..._,async serverLoader(){return jt("loader",l),d($)}})}:void 0,action:l.hasClientAction?async()=>{let T=l.clientActionModule?import(l.clientActionModule):D();R(l);let{clientAction:_}=await T;return ge(_,"No `clientAction` export found"),($,M)=>_({...$,async serverAction(){return jt("action",l),p(M)}})}:void 0,middleware:l.hasClientMiddleware?async()=>{let{clientMiddleware:T}=l.clientMiddlewareModule?await import(l.clientMiddlewareModule):await D();return ge(T,"No `clientMiddleware` export found"),T}:void 0,shouldRevalidate:async()=>{let T=await D();return Jn(w.path,T,l,n,u)},handle:async()=>(await D()).handle,Component:async()=>(await D()).Component,ErrorBoundary:l.hasErrorBoundary?async()=>(await D()).ErrorBoundary:void 0}}let P=Gr(e,t,r,n,a,l.id,i,u);return P.length>0&&(w.children=P),w})}function Jn(e,t,r,n,a){if(a)return os(r.id,t.shouldRevalidate,a);if(!n&&r.hasLoader&&!r.hasClientLoader){let o=e?kr(e)[1].map(u=>u.paramName):[];const i=u=>o.some(l=>u.currentParams[l]!==u.nextParams[l]);if(t.shouldRevalidate){let u=t.shouldRevalidate;return l=>u({...l,defaultShouldRevalidate:i(l)})}else return u=>i(u)}return t.shouldRevalidate}function os(e,t,r){let n=!1;return a=>n?t?t(a):a.defaultShouldRevalidate:(n=!0,r.has(e))}async function is(e,t){let r=Fa(e,t),n=ql(e),a=await r;return await Promise.all([n,ja(e,a)]),{Component:Ba(a),ErrorBoundary:a.ErrorBoundary,clientMiddleware:a.clientMiddleware,clientAction:a.clientAction,clientLoader:a.clientLoader,handle:a.handle,links:a.links,meta:a.meta,shouldRevalidate:a.shouldRevalidate}}function Ba(e){if(e.default==null)return;if(!(typeof e.default=="object"&&Object.keys(e.default).length===0))return e.default}function ls(e,t,r,n){return n&&e!=="root"||t!=null&&(t.hydrate===!0||r!==!0)}var Yt=new Set,ss=1e3,Gt=new Set,us=7680;function cs(e){let t=new Set;return e.forEach(r=>{r.startsWith("/")||(r=`/${r}`);for(let n=1;n<r.length;n++)r[n]==="/"&&t.add(r.slice(0,n));t.add(r)}),Array.from(t)}function Xr(e,t){return e.mode==="lazy"&&t===!0}function ds({sri:e,...t},r){let n=new Set(r.state.matches.map(u=>u.route.id)),a=r.state.location.pathname.split("/").filter(Boolean),o=["/"];for(a.pop();a.length>0;)o.push(`/${a.join("/")}`),a.pop();o.forEach(u=>{let l=_e(r.routes,u,r.basename||"/",!1,r.branches);l&&l.forEach(s=>n.add(s.route.id))});let i=[...n].reduce((u,l)=>Object.assign(u,{[l]:t.routes[l]}),{});return{...t,routes:i,sri:e?!0:void 0}}function Gs(e,t,r,n,a,o,i){if(Xr(a,n))return async({path:u,patch:l,signal:s,fetcherKey:c})=>{if(Gt.has(u))return;let{state:d}=e();await Wa([u],c?window.location.href:De(d.navigation.location||d.location),t,r,n,o,i,a.manifestPath,l,s)}}function Xs(e,t,r,n,a,o){h.useEffect(()=>{if(!Xr(a,n)||window.navigator?.connection?.saveData===!0)return;function i(c){let d=c.tagName==="FORM"?c.getAttribute("action"):c.getAttribute("href");if(!d)return;let p=c.tagName==="A"?c.pathname:new URL(d,window.location.origin).pathname;Gt.has(p)||Yt.add(p)}async function u(){document.querySelectorAll("a[data-discover], form[data-discover]").forEach(i);let c=Array.from(Yt.keys()).filter(d=>Gt.has(d)?(Yt.delete(d),!1):!0);if(c.length!==0)try{await Wa(c,null,t,r,n,o,e.basename,a.manifestPath,e.patchRoutes)}catch(d){console.error("Failed to fetch manifest patches",d)}}let l=ms(u,100);u();let s=new MutationObserver(()=>l());return s.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-discover","href","action"]}),()=>s.disconnect()},[n,o,t,r,e,a])}function fs(e,t){let r=e||"/__manifest";return t==null?r:Le([t,r])}var wr="react-router-manifest-version";async function Wa(e,t,r,n,a,o,i,u,l,s){e=cs(e);const c=new URLSearchParams;c.set("paths",e.sort().join(",")),c.set("version",r.version);let d=new URL(fs(u,i),window.location.origin);if(d.search=c.toString(),d.toString().length>us){Yt.clear();return}let p;try{let w=await fetch(d,{signal:s});if(w.ok){if(w.status===204&&w.headers.has("X-Remix-Reload-Document")){if(!t){console.warn("Detected a manifest version mismatch during eager route discovery. The next navigation/fetch to an undiscovered route will result in a 
12new document navigation to sync up with the latest manifest.");return}try{if(sessionStorage.getItem(wr)===r.version){console.error("Unable to discover routes due to manifest version mismatch.");return}sessionStorage.setItem(wr,r.version)}catch{}window.location.href=t,console.warn("Detected manifest version mismatch, reloading..."),await new Promise(()=>{})}else if(w.status>=400)throw new Error(await w.text())}else throw new Error(`${w.status} ${w.statusText}`);try{sessionStorage.removeItem(wr)}catch{}p=await w.json()}catch(w){if(s?.aborted)return;throw w}let g=new Set(Object.keys(r.routes)),R=Object.values(p).reduce((w,P)=>(P&&!g.has(P.id)&&(w[P.id]=P),w),{});Object.assign(r.routes,R),e.forEach(w=>hs(w,Gt));let b=new Set;Object.values(R).forEach(w=>{w&&(!w.parentId||!R[w.parentId])&&b.add(w.parentId)}),b.forEach(w=>l(w||null,Gr(R,n,null,a,o,w)))}function hs(e,t){if(t.size>=ss){let r=t.values().next().value;t.delete(r)}t.add(e)}function ms(e,t){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...n),t)}}function tr(){let e=h.useContext(rt);return ge(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function rr(){let e=h.useContext(ct);return ge(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var nr=h.createContext(void 0);nr.displayName="FrameworkContext";function $e(){let e=h.useContext(nr);return ge(e,"You must render this element inside a <HydratedRouter> element"),e}function ps(e,t){let r=h.useContext(nr),[n,a]=h.useState(!1),[o,i]=h.useState(!1),{onFocus:u,onBlur:l,onMouseEnter:s,onMouseLeave:c,onTouchStart:d}=t,p=h.useRef(null);h.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let b=P=>{P.forEach(S=>{i(S.isIntersecting)})},w=new IntersectionObserver(b,{threshold:.5});return p.current&&w.observe(p.current),()=>{w.disconnect()}}},[e]),h.useEffect(()=>{if(n){let b=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(b)}}},[n]);let g=()=>{a(!0)},R=()=>{a(!1),i(!1)};return r?e!=="intent"?[o,p,{}]:[o,p,{onFocus:yt(u,g),onBlur:yt(l,R),onMouseEnter:yt(s,g),onMouseLeave:yt(c,R),onTouchStart:yt(d,g)}]:[!1,p,{}]}function yt(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Kr(e,t,r){if(r&&!Xt)return[e[0]];if(t){let n=e.findIndex(a=>t[a.route.id]!==void 0);return e.slice(0,n+1)}return e}var Gn="data-react-router-critical-css";function Ks({nonce:e,crossOrigin:t}){let{isSpaMode:r,manifest:n,routeModules:a,criticalCss:o,nonce:i}=$e(),{errors:u,matches:l}=rr(),s=Kr(l,u,r),c=h.useMemo(()=>Kl(s,a,n),[s,a,n]);return e==null&&i&&(e=i),h.createElement(h.Fragment,null,typeof o=="string"?h.createElement("style",{[Gn]:"",nonce:e,dangerouslySetInnerHTML:{__html:o}}):null,typeof o=="object"?h.createElement("link",{[Gn]:"",rel:"stylesheet",href:o.href,nonce:e,crossOrigin:t}):null,c.map(({key:d,link:p})=>Vr(p)?h.createElement(Ya,{key:d,nonce:e,...p,crossOrigin:p.crossOrigin??t}):h.createElement("link",{key:d,nonce:e,...p,crossOrigin:p.crossOrigin??t})))}function Ya({page:e,...t}){let r=jr(),{nonce:n}=$e(),{router:a}=tr(),o=h.useMemo(()=>ta(a.routes,e,a.basename),[a.routes,e,a.basename]);return o?(t.nonce==null&&n&&(t={...t,nonce:n}),r?h.createElement(vs,{page:e,matches:o,...t}):h.createElement(gs,{page:e,matches:o,...t})):null}function ys(e){let{manifest:t,routeModules:r}=$e(),[n,a]=h.useState([]);return h.useEffect(()=>{let o=!1;return Zl(e,t,r).then(i=>{o||a(i)}),()=>{o=!0}},[e,t,r]),n}function vs({page:e,matches:t,...r}){let n=Me(),{future:a}=$e(),{basename:o}=tr(),i=h.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let u=Yr(e,o,a.v8_trailingSlashAwareDataRequests,"rsc"),l=!1,s=[];for(let c of t)typeof c.route.shouldRevalidate=="function"?l=!0:s.push(c.route.id);return l&&s.length>0&&u.searchParams.set("_routes",s.join(",")),[u.pathname+u.search]},[o,a.v8_trailingSlashAwareDataRequests,e,n,t]);return h.createElement(h.Fragment,null,i.map(u=>h.createElement("link",{key:u,rel:"prefetch",as:"fetch",href:u,...r})))}function gs({page:e,matches:t,...r}){let n=Me(),{future:a,manifest:o,routeModules:i}=$e(),{basename:u}=tr(),{loaderData:l,matches:s}=rr(),c=h.useMemo(()=>Vn(e,t,s,o,n,"data"),[e,t,s,o,n]),d=h.useMemo(()=>Vn(e,t,s,o,n,"assets"),[e,t,s,o,n]),p=h.useMemo(()=>
12{if(e===n.pathname+n.search+n.hash)return[];let b=new Set,w=!1;if(t.forEach(S=>{let D=o.routes[S.route.id];!D||!D.hasLoader||(!c.some(T=>T.route.id===S.route.id)&&S.route.id in l&&i[S.route.id]?.shouldRevalidate||D.hasClientLoader?w=!0:b.add(S.route.id))}),b.size===0)return[];let P=Yr(e,u,a.v8_trailingSlashAwareDataRequests,"data");return w&&b.size>0&&P.searchParams.set("_routes",t.filter(S=>b.has(S.route.id)).map(S=>S.route.id).join(",")),[P.pathname+P.search]},[u,a.v8_trailingSlashAwareDataRequests,l,n,o,c,t,e,i]),g=h.useMemo(()=>Jr(d,o),[d,o]),R=ys(d);return h.createElement(h.Fragment,null,p.map(b=>h.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...r})),g.map(b=>h.createElement("link",{key:b,rel:"modulepreload",href:b,...r})),R.map(({key:b,link:w})=>h.createElement("link",{key:b,nonce:r.nonce,...w,crossOrigin:w.crossOrigin??r.crossOrigin})))}function qs(){let{isSpaMode:e,routeModules:t}=$e(),{errors:r,matches:n,loaderData:a}=rr(),o=Me(),i=Kr(n,r,e),u=null;r&&(u=r[i[i.length-1].route.id]);let l=[],s=null,c=[];for(let d=0;d<i.length;d++){let p=i[d],g=p.route.id,R=a[g],b=p.params,w=t[g],P=[],S={id:g,data:R,loaderData:R,meta:[],params:p.params,pathname:p.pathname,handle:p.route.handle,error:u};if(c[d]=S,w?.meta?P=typeof w.meta=="function"?w.meta({data:R,loaderData:R,params:b,location:o,matches:c,error:u}):Array.isArray(w.meta)?[...w.meta]:w.meta:s&&(P=[...s]),P=P||[],!Array.isArray(P))throw new Error("The route at "+p.route.path+` returns an invalid value. All route meta functions must return an array of meta objects.
13
14To reference the meta function API, see https://reactrouter.com/start/framework/route-module#meta`);S.meta=P,c[d]=S,l=[...P],s=l}return h.createElement(h.Fragment,null,l.flat().map(d=>{if(!d)return null;if("tagName"in d){let{tagName:p,...g}=d;if(!ws(p))return console.warn(`A meta object uses an invalid tagName: ${p}. Expected either 'link' or 'meta'`),null;let R=p;return h.createElement(R,{key:JSON.stringify(g),...g})}if("title"in d)return h.createElement("title",{key:"title"},String(d.title));if("charset"in d&&(d.charSet??(d.charSet=d.charset),delete d.charset),"charSet"in d&&d.charSet!=null)return typeof d.charSet=="string"?h.createElement("meta",{key:"charSet",charSet:d.charSet}):null;if("script:ld+json"in d)try{let p=JSON.stringify(d["script:ld+json"]);return h.createElement("script",{key:`script:ld+json:${p}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:Pr(p)}})}catch{return null}return h.createElement("meta",{key:JSON.stringify(d),...d})}))}function ws(e){return typeof e=="string"&&/^(meta|link)$/.test(e)}var Xt=!1;function Es(){Xt=!0}function Rs(e){let{manifest:t,serverHandoffString:r,isSpaMode:n,renderMeta:a,routeDiscovery:o,ssr:i,nonce:u}=$e(),{router:l,static:s,staticContext:c}=tr(),{matches:d}=rr(),p=jr(),g=Xr(o,i);e.nonce==null&&u&&(e={...e,nonce:u}),a&&(a.didRenderScripts=!0);let R=Kr(d,null,n);h.useEffect(()=>{Es()},[]);let b=h.useMemo(()=>{if(p)return null;let D=c?`window.__reactRouterContext = ${r};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",T=s?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${g?"":`import ${JSON.stringify(t.url)}`};
15${R.map((_,$)=>{let M=`route${$}`,v=t.routes[_.route.id];ge(v,`Route ${_.route.id} not found in manifest`);let{clientActionModule:V,clientLoaderModule:X,clientMiddlewareModule:ae,hydrateFallbackModule:Y,module:le}=v,ee=[...V?[{module:V,varName:`${M}_clientAction`}]:[],...X?[{module:X,varName:`${M}_clientLoader`}]:[],...ae?[{module:ae,varName:`${M}_clientMiddleware`}]:[],...Y?[{module:Y,varName:`${M}_HydrateFallback`}]:[],{module:le,varName:`${M}_main`}];if(ee.length===1)return`import * as ${M} from ${JSON.stringify(le)};`;let ue=ee.map(Q=>`import * as ${Q.varName} from "${Q.module}";`).join(`
16`),K=`const ${M} = {${ee.map(Q=>`...${Q.varName}`).join(",")}};`;return[ue,K].join(`
17`)}).join(`
18`)}
19  ${g?`window.__reactRouterManifest = ${JSON.stringify(ds(t,l),null,2)};`:""}
20  window.__reactRouterRouteModules = {${R.map((_,$)=>`${JSON.stringify(_.route.id)}:route${$}`).join(",")}};
21
22import(${JSON.stringify(t.entry.module)});`:" ";return h.createElement(h.Fragment,null,h.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:D},type:void 0}),h.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:T},type:"module",async:!0}))},[]),w=Xt||p?[]:[...new Set(t.entry.imports.concat(Jr(R,t,{includeHydrateFallback:!0})))],P=typeof t.sri=="object"?t.sri:{};return Lr(!p,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),Xt||p?null:h.createElement(h.Fragment,null,typeof t.sri=="object"?h.createElement("script",{...e,"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:P})}}):null,g?null:h.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:P[t.url],nonce:e.nonce,suppressHydrationWarning:!0}),h.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:P[t.entry.module],nonce:e.nonce,suppressHydrationWarning:!0}),w.map(S=>h.createElement("link",{key:S,rel:"modulepreload",href:S,crossOrigin:e.crossOrigin,integrity:P[S],nonce:e.nonce,suppressHydrationWarning:!0})),b)}function Ss(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Qs=class extends h.Component{constructor(e){super(e),this.state={error:e.error||null,location:e.location}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error||null,location:e.location}:{error:e.error||t.error,location:t.location}}render(){return this.state.error?h.createElement(Va,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function Va({error:e,isOutsideRemixApp:t}){let{nonce:r}=$e();console.error(e);let n=h.createElement("script",{nonce:r,dangerouslySetInnerHTML:{__html:`
23        console.log(
24          "💿 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."
25        );
26      `}});if(tt(e))return h.createElement(Tr,{title:"Unhandled Thrown Response!"},h.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),n);let a;if(e instanceof Error)a=e;else{let o=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);a=new Error(o)}
26return h.createElement(Tr,{title:"Application Error!",isOutsideRemixApp:t},h.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),h.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},a.stack),n)}function Tr({title:e,renderScripts:t,isOutsideRemixApp:r,children:n}){let{routeModules:a}=$e();return a.root?.Layout&&!r?n:h.createElement("html",{lang:"en"},h.createElement("head",null,h.createElement("meta",{charSet:"utf-8"}),h.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),h.createElement("title",null,e)),h.createElement("body",null,h.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},n,t?h.createElement(Rs,null):null)))}var bs=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{bs&&(window.__reactRouterVersion="7.18.1")}catch{}var Ja=h.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:a,reloadDocument:o,replace:i,mask:u,state:l,target:s,to:c,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:g,...R},b){let{basename:w,navigator:P,useTransitions:S}=h.useContext(be),D=typeof c=="string"&&Kt.test(c),T=ua(c,w);c=T.to;let _=Fi(c,{relative:a}),$=Me(),M=null;if(u){let ue=qt(u,[],$.mask?$.mask.pathname:"/",!0);w!=="/"&&(ue.pathname=ue.pathname==="/"?w:Le([w,ue.pathname])),M=P.createHref(ue)}let[v,V,X]=ps(n,R),ae=_s(c,{replace:i,mask:u,state:l,target:s,preventScrollReset:d,relative:a,viewTransition:p,defaultShouldRevalidate:g,useTransitions:S});function Y(ue){t&&t(ue),ue.defaultPrevented||ae(ue)}let le=!(T.isExternal||o),ee=h.createElement("a",{...R,...X,href:(le?M:void 0)||T.absoluteURL||_,onClick:le?Y:t,ref:Ss(b,V),target:s,"data-discover":!D&&r==="render"?"true":void 0});return v&&!D?h.createElement(h.Fragment,null,ee,h.createElement(Ya,{page:_})):ee});Ja.displayName="Link";var xs=h.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:a=!1,style:o,to:i,viewTransition:u,children:l,...s},c){let d=Lt(i,{relative:s.relative}),p=Me(),g=h.useContext(ct),{navigator:R,basename:b}=h.useContext(be),w=g!=null&&Ns(d)&&u===!0,P=R.encodeLocation?R.encodeLocation(d).pathname:d.pathname,S=p.pathname,D=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;r||(S=S.toLowerCase(),D=D?D.toLowerCase():null,P=P.toLowerCase()),D&&b&&(D=Ce(D,b)||D);const T=P!=="/"&&P.endsWith("/")?P.length-1:P.length;let _=S===P||!a&&S.startsWith(P)&&S.charAt(T)==="/",$=D!=null&&(D===P||!a&&D.startsWith(P)&&D.charAt(P.length)==="/"),M={isActive:_,isPending:$,isTransitioning:w},v=_?t:void 0,V;typeof n=="function"?V=n(M):V=[n,_?"active":null,$?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let X=typeof o=="function"?o(M):o;return h.createElement(Ja,{...s,"aria-current":v,className:V,ref:c,style:X,to:i,viewTransition:u},typeof l=="function"?l(M):l)});xs.displayName="NavLink";var Ls=h.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:o,method:i=Bt,action:u,onSubmit:l,relative:s,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:p,...g},R)=>{let{useTransitions:b}=h.useContext(be),w=Ds(),P=Os(u,{relative:s}),S=i.toLowerCase()==="get"?"get":"post",D=typeof u=="string"&&Kt.test(u),T=_=>{if(l&&l(_),_.defaultPrevented)return;_.preventDefault();let $=_.nativeEvent.submitter,M=$?.getAttribute("formmethod")||i,v=()=>w($||_.currentTarget,{fetcherKey:t,method:M,navigate:r,replace:a,state:o,relative:s,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:p});b&&r!==!1?h.startTransition(()=>v()):v()};return h.createElement("form",{ref:R,method:S,action:P,onSubmit:n?l:T,...g,"data-discover":!D&&e==="render"?"true":void 0})});Ls.displayName="Form";function Cs({getKey:e,storageKey:t,...r}){let n=h.useContext(nr),{basename:a}=h.useContext(be),o=Me(),i=Br();ks({getKey:e,storageKey:t});let u=h.useMemo(()=>{if(!n||!e)return null;let s=Dr(o,i,a,e);return s!==o.key?s:null},[]);if(!n||n.isSpaMode)return null;let l=((s,c)=>{if(!window.history.state||!window.history.state.key){let d=Math.random().toString(32).slice(2);window.history.replaceState({key:d},"")}try{let p=JSON.parse(sessionStorage.getItem(s)||"{}")[c||window.history.state.key];typeof p=="number"&&window.scrollTo(0,p)}catch(d){console.error(d),sessionStorage.removeItem(s)}}).toString();return r.nonce==null&&n?.nonce&&(r.nonce=n.nonce),h.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${l})(${Pr(JSON.stringify(t||Mr))}, ${Pr(JSON.stringify(u))})`}})}Cs.displayName="ScrollRestoration";function Ga(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=h.useContext(rt);return G(t,Ga(e)),t}function Ps(e){let t=h.useContext(ct);return G(t,Ga(e)),t}function _s(e,{target:t,replace:r,mask:n,state:a,preventScrollReset:o,relative:i,viewTransition:u,defaultShouldRevalidate:l,useTransitions:s}={}){let c=$i(),d=Me(),p=Lt(e,{relative:i});return h.useCallback(g=>{if(fl(g,t)){g.preventDefault();let R=r!==void 0?r:De(d)===De(p),b=()=>c(e,{replace:R,mask:n,state:a,preventScrollReset:o,relative:i,viewTransition:u,defaultShouldRevalidate:l});s?h.startTransition(()=>b()):b()}},[d,c,p,r,n,a,t,e,o,i,u,l,s])}var Ts=0,Ms=()=>`__${String(++Ts)}__`;function Ds(){let{router:e}=qr("useSubmit"),{basename:t}=h.useContext(be),r=Ki(),n=e.fetch,a=e.navigate;return h.useCallback(async(o,i={})=>{let{action:u,method:l,encType:s,formData:c,body:d}=pl(o,t);if(i.navigate===!1){let p=i.fetcherKey||Ms();await n(p,r,i.action||u,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:c,body:d,formMethod:i.method||l,formEncType:i.encType||s,flushSync:i.flushSync})}else await a(i.action||u,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:c,body:d,formMethod:i.method||l,formEncType:i.encType||s,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[n,a,t,r])}function Os(e,{relative:t}={}){let{basename:r}=h.useContext(be),n=h.useContext(Oe);G(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),o={...Lt(e||".",{relative:t})},i=Me();if(e==null){o.search=i.search;let u=new URLSearchParams(o.search),l=u.getAll("index");if(l.some(c=>
26c==="")){u.delete("index"),l.filter(d=>d).forEach(d=>u.append("index",d));let c=u.toString();o.search=c?`?${c}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:Le([r,o.pathname])),De(o)}var Mr="react-router-scroll-positions",Ut={};function Dr(e,t,r,n){let a=null;return n&&(r!=="/"?a=n({...e,pathname:Ce(e.pathname,r)||e.pathname},t):a=n(e,t)),a==null&&(a=e.key),a}function ks({getKey:e,storageKey:t}={}){let{router:r}=qr("useScrollRestoration"),{restoreScrollPosition:n,preventScrollReset:a}=Ps("useScrollRestoration"),{basename:o}=h.useContext(be),i=Me(),u=Br(),l=qi();h.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),As(h.useCallback(()=>{if(l.state==="idle"){let s=Dr(i,u,o,e);Ut[s]=window.scrollY}try{sessionStorage.setItem(t||Mr,JSON.stringify(Ut))}catch(s){ce(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${s}).`)}window.history.scrollRestoration="auto"},[l.state,e,o,i,u,t])),typeof document<"u"&&(h.useLayoutEffect(()=>{try{let s=sessionStorage.getItem(t||Mr);s&&(Ut=JSON.parse(s))}catch{}},[t]),h.useLayoutEffect(()=>{let s=r?.enableScrollRestoration(Ut,()=>window.scrollY,e?(c,d)=>Dr(c,d,o,e):void 0);return()=>s&&s()},[r,o,e]),h.useLayoutEffect(()=>{if(n!==!1){if(typeof n=="number"){window.scrollTo(0,n);return}try{if(i.hash){let s=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(s){s.scrollIntoView();return}}}catch{ce(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}a!==!0&&window.scrollTo(0,0)}},[i,n,a]))}function As(e,t){let{capture:r}={};h.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,n),()=>{window.removeEventListener("pagehide",e,n)}},[e,r])}function Ns(e,{relative:t}={}){let r=h.useContext(Ur);G(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=qr("useViewTransitionState"),a=Lt(e,{relative:t});if(!r.isTransitioning)return!1;let o=Ce(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=Ce(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Vt(a.pathname,i)!=null||Vt(a.pathname,o)!=null}var Is=Ro();const Zs=Xn(Is);export{$i as A,Ja as B,wo as C,Zs as D,Xn as E,nr as F,Ks as L,qs as M,Ul as N,Bs as O,go as R,Cs as S,Ro as a,h as b,G as c,Qs as d,zs as e,Is as f,Xl as g,Gr as h,tt as i,js as j,Gs as k,Vs as l,ta as m,$s as n,Js as o,Us as p,Hs as q,Kn as r,ls as s,Fs as t,Xs as u,Me as v,Ws as w,Ys as x,Rs as y,Ma 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.