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