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