PageSourceSearch

https://openrxivlabs.org/assets/llS4fteD.js

js openrxivlabs.org collected 2026-09-30 11:21:58 UTC 128,170 bytes, 26 lines download raw bytes

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