PageSourceSearch

https://2026djbridge.web.app/assets/chunk-UVKPFVEO-D9yzbXen.js

js 2026djbridge.web.app collected 2026-10-03 12:15:16 UTC 126,469 bytes, 26 lines download raw bytes

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

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.