vendor: 4,101 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 gn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jt={exports:{}},I={};var Fr;function Rn(){if(Fr)return I;Fr=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"),u=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),R=Symbol.iterator;function g(f){return f===null||typeof f!="object"?null:(f=R&&f[R]||f["@@iterator"],typeof f=="function"?f:null)}var P={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,b={};function D(f,S,_){this.props=f,this.context=S,this.refs=b,this.updater=_||P}D.prototype.isReactComponent={},D.prototype.setState=function(f,S){if(typeof f!="object"&&typeof f!="function"&&f!=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,f,S,"setState")},D.prototype.forceUpdate=function(f){this.updater.enqueueForceUpdate(this,f,"forceUpdate")};function x(){}x.prototype=D.prototype;function N(f,S,_){this.props=f,this.context=S,this.refs=b,this.updater=_||P}var V=N.prototype=new x;V.constructor=N,C(V,D.prototype),V.isPureReactComponent=!0;var z=Array.isArray;function re(){}var U={H:null,A:null,T:null,S:null},v=Object.prototype.hasOwnProperty;function G(f,S,_){var O=_.ref;return{$$typeof:e,type:f,key:S,ref:O!==void 0?O:null,props:_}}function Z(f,S){return G(f.type,S,f.props)}function se(f){return typeof f=="object"&&f!==null&&f.$$typeof===e}function q(f){var S={"=":"=0",":":"=2"};return"$"+f.replace(/[=:]/g,function(_){return S[_]})}var de=/\/+/g;function ae(f,S){return typeof f=="object"&&f!==null&&f.key!=null?q(""+f.key):S.toString(36)}function ue(f){switch(f.status){case"fulfilled":return f.value;case"rejected":throw f.reason;default:switch(typeof f.status=="string"?f.then(re,re):(f.status="pending",f.then(function(S){f.status==="pending"&&(f.status="fulfilled",f.value=S)},function(S){f.status==="pending"&&(f.status="rejected",f.reason=S)})),f.status){case"fulfilled":return f.value;case"rejected":throw f.reason}}throw f}function Y(f,S,_,O,j){var H=typeof f;(H==="undefined"||H==="boolean")&&(f=null);var J=!1;if(f===null)J=!0;else switch(H){case"bigint":case"string":case"number":J=!0;break;case"object":switch(f.$$typeof){case e:case t:J=!0;break;case h:return J=f._init,Y(J(f._payload),S,_,O,j)}}if(J)return j=j(f),J=O===""?"."+ae(f,0):O,z(j)?(_="",J!=null&&(_=J.replace(de,"$&/")+"/"),Y(j,S,_,"",function(Bt){return Bt})):j!=null&&(se(j)&&(j=Z(j,_+(j.key==null||f&&f.key===j.key?"":(""+j.key).replace(de,"$&/")+"/")+J)),S.push(j)),1;J=0;var ve=O===""?".":O+":";if(z(f))for(var fe=0;fe<f.length;fe++)O=f[fe],H=ve+ae(O,fe),J+=Y(O,S,_,H,j);else if(fe=g(f),typeof fe=="function")for(f=fe.call(f),fe=0;!(O=f.next()).done;)O=O.value,H=ve+ae(O,fe++),J+=Y(O,S,_,H,j);else if(H==="object"){if(typeof f.then=="function")return Y(ue(f),S,_,O,j);throw S=String(f),Error("Objects are not valid as a React child (found: "+(S==="[object Object]"?"object with keys {"+Object.keys(f).join(", ")+"}":S)+"). If you meant to render a collection of children, use an array instead.")}return J}function ee(f,S,_){if(f==null)return f;var O=[],j=0;return Y(f,O,"","",function(H){return S.call(_,H,j++)}),O}function ge(f){if(f._status===-1){var S=f._result;S=S(),S.then(function(_){(f._status===0||f._status===-1)&&(f._status=1,f._result=_)},function(_){(f._status===0||f._status===-1)&&(f._status=2,f._result=_)}
vendor: 7,581 bytes, line 1
1),f._status===-1&&(f._status=0,f._result=S)}if(f._status===1)return f._result.default;throw f._result}var X=typeof reportError=="function"?reportError:function(f){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var S=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof f=="object"&&f!==null&&typeof f.message=="string"?String(f.message):String(f),error:f});if(!window.dispatchEvent(S))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",f);return}console.error(f)},ce={map:ee,forEach:function(f,S,_){ee(f,function(){S.apply(this,arguments)},_)},count:function(f){var S=0;return ee(f,function(){S++}),S},toArray:function(f){return ee(f,function(S){return S})||[]},only:function(f){if(!se(f))throw Error("React.Children.only expected to receive a single React element child.");return f}};return I.Activity=m,I.Children=ce,I.Component=D,I.Fragment=r,I.Profiler=n,I.PureComponent=N,I.StrictMode=a,I.Suspense=s,I.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,I.__COMPILER_RUNTIME={__proto__:null,c:function(f){return U.H.useMemoCache(f)}},I.cache=function(f){return function(){return f.apply(null,arguments)}},I.cacheSignal=function(){return null},I.cloneElement=function(f,S,_){if(f==null)throw Error("The argument must be a React element, but you passed "+f+".");var O=C({},f.props),j=f.key;if(S!=null)for(H in S.key!==void 0&&(j=""+S.key),S)!v.call(S,H)||H==="key"||H==="__self"||H==="__source"||H==="ref"&&S.ref===void 0||(O[H]=S[H]);var H=arguments.length-2;if(H===1)O.children=_;else if(1<H){for(var J=Array(H),ve=0;ve<H;ve++)J[ve]=arguments[ve+2];O.children=J}return G(f.type,j,O)},I.createContext=function(f){return f={$$typeof:i,_currentValue:f,_currentValue2:f,_threadCount:0,Provider:null,Consumer:null},f.Provider=f,f.Consumer={$$typeof:o,_context:f},f},I.createElement=function(f,S,_){var O,j={},H=null;if(S!=null)for(O in S.key!==void 0&&(H=""+S.key),S)v.call(S,O)&&O!=="key"&&O!=="__self"&&O!=="__source"&&(j[O]=S[O]);var J=arguments.length-2;if(J===1)j.children=_;else if(1<J){for(var ve=Array(J),fe=0;fe<J;fe++)ve[fe]=arguments[fe+2];j.children=ve}if(f&&f.defaultProps)for(O in J=f.defaultProps,J)j[O]===void 0&&(j[O]=J[O]);return G(f,H,j)},I.createRef=function(){return{current:null}},I.forwardRef=function(f){return{$$typeof:u,render:f}},I.isValidElement=se,I.lazy=function(f){return{$$typeof:h,_payload:{_status:-1,_result:f},_init:ge}},I.memo=function(f,S){return{$$typeof:l,type:f,compare:S===void 0?null:S}},I.startTransition=function(f){var S=U.T,_={};U.T=_;try{var O=f(),j=U.S;j!==null&&j(_,O),typeof O=="object"&&O!==null&&typeof O.then=="function"&&O.then(re,X)}catch(H){X(H)}finally{S!==null&&_.types!==null&&(S.types=_.types),U.T=S}},I.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},I.use=function(f){return U.H.use(f)},I.useActionState=function(f,S,_){return U.H.useActionState(f,S,_)},I.useCallback=function(f,S){return U.H.useCallback(f,S)},I.useContext=function(f){return U.H.useContext(f)},I.useDebugValue=function(){},I.useDeferredValue=function(f,S){return U.H.useDeferredValue(f,S)},I.useEffect=function(f,S){return U.H.useEffect(f,S)},I.useEffectEvent=function(f){return U.H.useEffectEvent(f)},I.useId=function(){return U.H.useId()},I.useImperativeHandle=function(f,S,_){return U.H.useImperativeHandle(f,S,_)},I.useInsertionEffect=function(f,S){return U.H.useInsertionEffect(f,S)},I.useLayoutEffect=function(f,S){return U.H.useLayoutEffect(f,S)},I.useMemo=function(f,S){return U.H.useMemo(f,S)},I.useOptimistic=function(f,S){return U.H.useOptimistic(f,S)},I.useReducer=function(f,S,_){return U.H.useReducer(f,S,_)},I.useRef=function(f){return U.H.useRef(f)},I.useState=function(f){return U.H.useState(f)},I.useSyncExternalStore=function(f,S,_){return U.H.useSyncExternalStore(f,S,_)},I.useTransition=function(){return U.H.useTransition()},I.version="19.2.3",I}var Ar;function ha(){return Ar||(Ar=1,Jt.exports=Rn()),Jt.exports}var qt={exports:{}},pe={};var Nr;function wn(){if(Nr)return pe;Nr=1;var e=ha();function t(s){var l="https://react.dev/errors/"+s;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)l+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},n=Symbol.for("react.portal");function o(s,l,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:n,key:m==null?null:""+m,children:s,containerInfo:l,implementation:h}}var i=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(s,l){if(s==="font")return"";if(typeof l=="string")return l==="use-credentials"?l:""}return pe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,pe.createPortal=function(s,l){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)throw Error(t(299));return o(s,l,null,h)},pe.flushSync=function(s){var l=i.T,h=a.p;try{if(i.T=null,a.p=2,s)return s()}finally{i.T=l,a.p=h,a.d.f()}},pe.preconnect=function(s,l){typeof s=="string"&&(l?(l=l.crossOrigin,l=typeof l=="string"?l==="use-credentials"?l:"":void 0):l=null,a.d.C(s,l))},pe.prefetchDNS=function(s){typeof s=="string"&&a.d.D(s)},pe.preinit=function(s,l){if(typeof s=="string"&&l&&typeof l.as=="string"){var h=l.as,m=u(h,l.crossOrigin),R=typeof l.integrity=="string"?l.integrity:void 0,g=typeof l.fetchPriority=="string"?l.fetchPriority:void 0;h==="style"?a.d.S(s,typeof l.precedence=="string"?l.precedence:void 0,{crossOrigin:m,integrity:R,fetchPriority:g}):h==="script"&&a.d.X(s,{crossOrigin:m,integrity:R,fetchPriority:g,nonce:typeof l.nonce=="string"?l.nonce:void 0})}},pe.preinitModule=function(s,l){if(typeof s=="string")if(typeof l=="object"&&l!==null){if(l.as==null||l.as==="script"){var h=u(l.as,l.crossOrigin);a.d.M(s,{crossOrigin:h,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0})}}else l==null&&a.d.M(s)},pe.preload=function(s,l){if(typeof s=="string"&&typeof l=="object"&&l!==null&&typeof l.as=="string"){var h=l.as,m=u(h,l.crossOrigin);a.d.L(s,h,{crossOrigin:m,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0,type:typeof l.type=="string"?l.type:void 0,fetchPriority:typeof l.fetchPriority=="string"?l.fetchPriority:void 0,referrerPolicy:typeof l.referrerPolicy=="string"?l.referrerPolicy:void 0,imageSrcSet:typeof l.imageSrcSet=="string"?l.imageSrcSet:void 0,imageSizes:typeof l.imageSizes=="string"?l.imageSizes:void 0,media:typeof l.media=="string"?l.media:void 0})}},pe.preloadModule=function(s,l){if(typeof s=="string")if(l){var h=u(l.as,l.crossOrigin);a.d.m(s,{as:typeof l.as=="string"&&l.as!=="script"?l.as:void 0,crossOrigin:h,integrity:typeof l.integrity=="string"?l.integrity:void 0})}else a.d.m(s)},pe.requestFormReset=function(s){a.d.r(s)},pe.unstable_batchedUpdates=function(s,l){return s(l)},pe.useFormState=function(s,l,h){return i.H.useFormState(s,l,h)},pe.useFormStatus=function(){return i.H.useHostTransitionStatus()},pe.version="19.2.3",pe}var Ur;function En(){if(Ur)return qt.exports;Ur=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}
1return e(),qt.exports=wn(),qt.exports}var p=ha();const bn=gn(p),Sn=vn({__proto__:null,default:bn},[p]);var ma=e=>{throw TypeError(e)},pa=(e,t,r)=>t.has(e)||ma("Cannot "+r),Pe=(e,t,r)=>(pa(e,t,"read from private field"),r?r.call(e):t.get(e)),dt=(e,t,r)=>t.has(e)?ma("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ke=(e,t,r,a)=>(pa(e,t,"write to private field"),t.set(e,r),r),$t=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,lr=/^[\\/]{2}/;function ya(e,t){return t+e.replace(/\\/g,"/")}var $r="popstate";function jr(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Pn(e={}){function t(a,n){let o=n.state?.masked,{pathname:i,search:u,hash:s}=o||a.location;return pt("",{pathname:i,search:u,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:Ae(n)}return xn(t,r,null,e)}function B(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function le(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Cn(){return Math.random().toString(36).substring(2,10)}function Ir(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function pt(e,t,r=null,a,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ne(t):t,state:r,key:t&&t.key||a||Cn(),mask:n}}function Ae({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 Ne(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 xn(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:o=!1}=a,i=n.history,u="POP",s=null,l=h();l==null&&(l=0,i.replaceState({...i.state,idx:l},""));function h(){return(i.state||{idx:null}).idx}function m(){u="POP";let b=h(),D=b==null?null:b-l;l=b,s&&s({action:u,location:C.location,delta:D})}function R(b,D){u="PUSH";let x=jr(b)?b:pt(C.location,b,D);l=h()+1;let N=Ir(x,l),V=C.createHref(x.mask||x);try{i.pushState(N,"",V)}catch(z){if(z instanceof DOMException&&z.name==="DataCloneError")throw z;n.location.assign(V)}o&&s&&s({action:u,location:C.location,delta:1})}function g(b,D){u="REPLACE";let x=jr(b)?b:pt(C.location,b,D);l=h();let N=Ir(x,l),V=C.createHref(x.mask||x);i.replaceState(N,"",V),o&&s&&s({action:u,location:C.location,delta:0})}function P(b){return va(n,b)}let C={get action(){return u},get location(){return e(n,i)},listen(b){if(s)throw new Error("A history only accepts one active listener");return n.addEventListener($r,m),s=b,()=>{n.removeEventListener($r,m),s=null}},createHref(b){return t(n,b)},createURL:P,encodeLocation(b){let D=P(b);return{pathname:D.pathname,search:D.search,hash:D.hash}},push:R,replace:g,go(b){return i.go(b)}};return C}function va(e,t,r=!1){let a="http://localhost";e&&(a=e.location.origin!=="null"?e.location.origin:e.location.href),B(a,"No window.location.(origin|href) available to create URL");let n=typeof t=="string"?t:Ae(t);return n=n.replace(/ $/,"%20"),!r&&lr.test(n)&&(n=a+n),new URL(n,a)}var ht,zr=class{constructor(e){if(dt(this,ht,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(Pe(this,ht).has(e))return Pe(this,ht).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Pe(this,ht).set(e,t)}};ht=new WeakMap;var Ln=new Set(["lazy","caseSensitive","path","id","index","children"]);function _n(e){return Ln.has(e)}var Dn=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function Tn(e){return Dn.has(e)}function Mn(e){return e.index===!0}function yt(e,t,r=[],a={},n=!1){return e.map((o,i)=>{let u=[...r,String(i)],s=typeof o.id=="string"?o.id:u.join("-");if(B(o.index!==!0||!o.children,"Cannot specify children on an index route"),B(n||!a[s],`Found a route id collision on i
1d "${s}". Route id's must be globally unique within Data Router usages`),Mn(o)){let l={...o,id:s};return a[s]=Hr(l,t(l)),l}else{let l={...o,id:s,children:void 0};return a[s]=Hr(l,t(l)),o.children&&(l.children=yt(o.children,t,u,a,n)),l}})}function Hr(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function ga(e,t,r="/"){return Te(e,t,r,!1)}function Te(e,t,r,a,n){let o=typeof t=="string"?Ne(t):t,i=Le(o.pathname||"/",r);if(i==null)return null;let u=n??kt(e),s=null,l=Sa(i);for(let h=0;s==null&&h<u.length;++h)s=Hn(u[h],l,a);return s}function On(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 kt(e){let t=Ra(e);return kn(t),t}function Ra(e,t=[],r=[],a="",n=!1){let o=(i,u,s=n,l)=>{let h={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:u,route:i};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(a)&&s)return;B(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 m=xe([a,h.relativePath]),R=r.concat(h);i.children&&i.children.length>0&&(B(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),Ra(i.children,t,R,m,s)),!(i.path==null&&!i.index)&&t.push({path:m,score:In(m,i.index),routesMeta:R.map((g,P)=>{let[C,b]=ba(g.relativePath,g.caseSensitive,P===R.length-1);return{...g,matcher:C,compiledParams:b}})})};return e.forEach((i,u)=>{if(i.path===""||!i.path?.includes("?"))o(i,u);else for(let s of wa(i.path))o(i,u,!0,s)}),t}function wa(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=wa(a.join("/")),u=[];return u.push(...i.map(s=>s===""?o:[o,s].join("/"))),n&&u.push(...i),u.map(s=>e.startsWith("/")&&s===""?"/":s)}function kn(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:zn(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var Fn=/^:[\w-]+$/,An=3,Nn=2,Un=1,$n=10,jn=-2,Br=e=>e==="*";function In(e,t){let r=e.split("/"),a=r.length;return r.some(Br)&&(a+=jn),t&&(a+=Nn),r.filter(n=>!Br(n)).reduce((n,o)=>n+(Fn.test(o)?An:o===""?Un:$n),a)}function zn(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 Hn(e,t,r=!1){let{routesMeta:a}=e,n={},o="/",i=[];for(let u=0;u<a.length;++u){let s=a[u],l=u===a.length-1,h=o==="/"?t:t.slice(o.length)||"/",m={path:s.relativePath,caseSensitive:s.caseSensitive,end:l},R=s.matcher&&s.compiledParams?Ea(m,h,s.matcher,s.compiledParams):vt(m,h),g=s.route;if(!R&&l&&r&&!a[a.length-1].route.index&&(R=vt({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},h)),!R)return null;
1Object.assign(n,R.params),i.push({params:n,pathname:xe([o,R.pathname]),pathnameBase:Yn(xe([o,R.pathnameBase])),route:g}),R.pathnameBase!=="/"&&(o=xe([o,R.pathnameBase]))}return i}function vt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=ba(e.path,e.caseSensitive,e.end);return Ea(e,t,r,a)}function Ea(e,t,r,a){let n=t.match(r);if(!n)return null;let o=n[0],i=o.replace(/(.)\/+$/,"$1"),u=n.slice(1);return{params:a.reduce((l,{paramName:h,isOptional:m},R)=>{if(h==="*"){let P=u[R]||"";i=o.slice(0,o.length-P.length).replace(/(.)\/+$/,"$1")}const g=u[R];return m&&!g?l[h]=void 0:l[h]=(g||"").replace(/%2F/g,"/"),l},{}),pathname:o,pathnameBase:i,pattern:e}}function ba(e,t=!1,r=!0){le(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,u,s,l,h)=>{if(a.push({paramName:u,isOptional:s!=null}),s){let m=h.charAt(l+i.length);return m&&m!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}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 Sa(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return le(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Le(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 Bn({basename:e,pathname:t}){return t==="/"?e:xe([e,t])}var sr=e=>$t.test(e);function Wn(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?Ne(e):e,o;return r?(r=ur(r),r.startsWith("/")?o=Wr(r.substring(1),"/"):o=Wr(r,t)):o=t,{pathname:o,search:Vn(a),hash:Kn(n)}}function Wr(e,t){let r=Ut(t).split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function Xt(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 Pa(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function jt(e){let t=Pa(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function Rt(e,t,r,a=!1){let n;typeof e=="string"?n=Ne(e):(n={...e},B(!n.pathname||!n.pathname.includes("?"),Xt("?","pathname","search",n)),B(!n.pathname||!n.pathname.includes("#"),Xt("#","pathname","hash",n)),B(!n.search||!n.search.includes("#"),Xt("#","search","hash",n)));let o=e===""||n.pathname==="",i=o?"/":n.pathname,u;if(i==null)u=r;else{let m=t.length-1;if(!a&&i.startsWith("..")){let R=i.split("/");for(;R[0]==="..";)R.shift(),m-=1;n.pathname=R.join("/")}u=m>=0?t[m]:"/"}let s=Wn(n,u),l=i&&i!=="/"&&i.endsWith("/"),h=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(l||h)&&(s.pathname+="/"),s}var ur=e=>e.replace(/[\\/]{2,}/g,"/"),xe=e=>ur(e.join("/")),Ut=e=>e.replace(/\/+$/,""),Yn=e=>Ut(e).replace(/^\/*/,"/"),Vn=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Kn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Gn=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],wt=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 gt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Et(e){let t=e.map(r=>r.route.path).filter(Boolean);return xe(t)||"/"}var Ca=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function xa(e,t){let r=e;if(typeof r!="string"||!$t.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,n=!1;if(Ca)try{let o=new URL(window.location.href),i=lr.test(r)?new URL(ya(r,o.protocol)):new URL(r),u=Le(i.pathname,t);i.origin===o.origin&&u!=null?r=u+i.search+i.hash:n=!0}catch{le(!1,`<Link to="${r}">
1 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 Ve=Symbol("Uninstrumented");function Jn(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 u of i)o[u]&&r[u].push(o[u])}}));let a={};if(typeof t.lazy=="function"&&r.lazy.length>0){let n=ot(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],u=r[`lazy.${o}`];if(typeof i=="function"&&u.length>0){let s=ot(u,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[Ve]??o,u=ot(r[n],i,(...s)=>Yr(s[0]));u&&(n==="loader"&&i.hydrate===!0&&(u.hydrate=!0),u[Ve]=i,a[n]=u)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(a.middleware=t.middleware.map(n=>{let o=n[Ve]??n,i=ot(r.middleware,o,(...u)=>Yr(u[0]));return i?(i[Ve]=o,i):n})),a}function qn(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[Ve]??e.navigate,n=ot(r.navigate,a,(...o)=>{let[i,u]=o;return{to:typeof i=="number"||typeof i=="string"?i:i?Ae(i):".",...Vr(e,u??{})}});n&&(n[Ve]=a,e.navigate=n)}if(r.fetch.length>0){let a=e.fetch[Ve]??e.fetch,n=ot(r.fetch,a,(...o)=>{let[i,,u,s]=o;return{href:u??".",fetcherKey:i,...Vr(e,s??{})}});n&&(n[Ve]=a,e.fetch=n)}return e}function ot(e,t,r){return e.length===0?null:async(...a)=>{let n=await La(e,r(...a),()=>t(...a),e.length-1);if(n.type==="error")throw n.value;return n.value}}async function La(e,t,r,a){let n=e[a],o;if(n){let i,u=async()=>(i?console.error("You cannot call instrumented handlers more than once"):i=La(e,t,r,a-1),o=await i,B(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await n(u,t)}catch(s){console.error("An instrumentation function threw an error:",s)}i||await u(),await i}else try{o={type:"success",value:await r()}}catch(i){o={type:"error",value:i}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Yr(e){let{request:t,context:r,params:a,pattern:n}=e;return{request:Xn(t),params:{...a},pattern:n,context:Qn(r)}}function Vr(e,t){return{currentUrl:Ae(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 Xn(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Qn(e){if(eo(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var Zn=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function eo(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")===Zn}var _a=["POST","PUT","PATCH","DELETE"],to=new Set(_a),ro=["GET",..._a],ao=new Set(ro),Da=new Set([301,302,303,307,308]),no=new Set([307,308]),Qt={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},oo={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ut={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},io=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Ta="remix-router-transitions",Ma=Symbol("ResetLoaderData"),qe,rt,We,at,lo=class{constructor(e){dt(this,qe),dt(this,rt),dt(this,We),dt(this,at),ke(this,qe,e),ke(this,rt,kt(e))}get stableRoutes(){return Pe(this,qe)}get activeRoutes(){return Pe(this,We)??Pe(this,qe)}get branches(){return Pe(this,at)??Pe(this,rt)}get hasHMRRoutes(){return Pe(this,We)!=null}setRoutes(e){ke(this,qe,e),ke(this,rt,kt(e))}setHmrRoutes(e){ke(this,We,e),ke(this,at,kt(e))}commitHmrRoutes(){Pe(this,We)&&(ke(this,qe,Pe(this,We)),ke(this,rt,Pe(this,at)),ke(this,We,void 0),ke(this,at,void 0))}};qe=new WeakMap;rt=new WeakMap;
1We=new WeakMap;at=new WeakMap;function so(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";B(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],n=e.mapRouteProperties||io,o=n;if(e.instrumentations){let c=e.instrumentations;o=d=>({...n(d),...Jn(c.map(y=>y.route).filter(Boolean),d)})}let i={},u=new lo(yt(e.routes,o,void 0,i)),s=e.basename||"/";s.startsWith("/")||(s=`/${s}`);let l=e.dataStrategy||mo,h={...e.future},m=null,R=new Set,g=null,P=null,C=null,b=null,D=e.hydrationData!=null,x=Te(u.activeRoutes,e.history.location,s,!1,u.branches),N=!1,V=null,z,re;if(x==null&&!e.patchRoutesOnNavigation){let c=Ce(404,{pathname:e.history.location.pathname}),{matches:d,route:y}=Tt(u.activeRoutes);z=!0,re=!z,x=d,V={[y.id]:c}}else if(x&&!e.hydrationData&&Ct(x,u.activeRoutes,e.history.location.pathname).active&&(x=null),x)if(x.some(c=>c.route.lazy))z=!1,re=!z;else if(!x.some(c=>cr(c.route)))z=!0,re=!z;else{let c=e.hydrationData?e.hydrationData.loaderData:null,d=e.hydrationData?e.hydrationData.errors:null,y=x;if(d){let w=x.findIndex(E=>d[E.route.id]!==void 0);y=y.slice(0,w+1)}
1re=!1,z=!0,y.forEach(w=>{let E=Oa(w.route,c,d);re=re||E.renderFallback,z=z&&!E.shouldLoad})}else{z=!1,re=!z,x=[];let c=Ct(null,u.activeRoutes,e.history.location.pathname);c.active&&c.matches&&(N=!0,x=c.matches)}let U,v={historyAction:e.history.action,location:e.history.location,matches:x,initialized:z,renderFallback:re,navigation:Qt,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||V,fetchers:new Map,blockers:new Map},G="POP",Z=null,se=!1,q,de=!1,ae=new Map,ue=null,Y=!1,ee=!1,ge=new Set,X=new Map,ce=0,f=-1,S=new Map,_=new Set,O=new Map,j=new Map,H=new Set,J=new Map,ve,fe=null;function Bt(){if(m=e.history.listen(({action:c,location:d,delta:y})=>{if(ve){ve(),ve=void 0;return}le(J.size===0||y!=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 w=_r({currentLocation:v.location,nextLocation:d,historyAction:c});if(w&&y!=null){let E=new Promise(T=>{ve=T});e.history.go(y*-1),Pt(w,{state:"blocked",location:d,proceed(){Pt(w,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),E.then(()=>e.history.go(y))},reset(){let T=new Map(v.blockers);T.set(w,ut),me({blockers:T})}}),Z?.resolve(),Z=null;return}return Ke(c,d)}),r){ko(t,ae);let c=()=>Fo(t,ae);t.addEventListener("pagehide",c),ue=()=>t.removeEventListener("pagehide",c)}return v.initialized||Ke("POP",v.location,{initialHydration:!0}),U}function Qa(){m&&m(),ue&&ue(),R.clear(),q&&q.abort(),v.fetchers.forEach((c,d)=>Yt(v.fetchers,d)),v.blockers.forEach((c,d)=>Lr(d))}function Za(c){if(R.add(c),g){let{newErrors:d}=g;g=null,c(v,{deletedFetchers:[],newErrors:d,viewTransitionOpts:void 0,flushSync:!1})}return()=>R.delete(c)}function me(c,d={}){c.matches&&(c.matches=c.matches.map(E=>{let T=i[E.route.id],M=E.route;return M.element!==T.element||M.errorElement!==T.errorElement||M.hydrateFallbackElement!==T.hydrateFallbackElement?{...E,route:T}:E})),v={...v,...c};let y=[],w=[];v.fetchers.forEach((E,T)=>{E.state==="idle"&&(H.has(T)?y.push(T):w.push(T))}),H.forEach(E=>{!v.fetchers.has(E)&&!X.has(E)&&y.push(E)}),R.size===0&&(g={newErrors:c.errors??null}),[...R].forEach(E=>E(v,{deletedFetchers:y,newErrors:c.errors??null,viewTransitionOpts:d.viewTransitionOpts,flushSync:d.flushSync===!0})),y.forEach(E=>Yt(v.fetchers,E)),w.forEach(E=>v.fetchers.delete(E))}function et(c,d,{flushSync:y}={}){let w=v.actionData!=null&&v.navigation.formMethod!=null&&ye(v.navigation.formMethod)&&v.navigation.state==="loading"&&c.state?._isRedirect!==!0,E;d.actionData?Object.keys(d.actionData).length>0?E=d.actionData:E=null:w?E=v.actionData:E=null;let T=d.loaderData?ra(v.loaderData,d.loaderData,d.matches||[],d.errors):v.loaderData,M=v.blockers;M.size>0&&(M=new Map(M),M.forEach((F,W)=>M.set(W,ut)));let k=Y?!1:Tr(c,d.matches||v.matches),L=se===!0||v.navigation.formMethod!=null&&ye(v.navigation.formMethod)&&c.state?._isRedirect!==!0;u.commitHmrRoutes(),Y||G==="POP"||(G==="PUSH"?e.history.push(c,c.state):G==="REPLACE"&&e.history.replace(c,c.state));let A;if(G==="POP"){let F=ae.get(v.location.pathname);F&&F.has(c.pathname)?A={currentLocation:v.location,nextLocation:c}:ae.has(c.pathname)&&(A={currentLocation:c,nextLocation:v.location})}else if(de){let F=ae.get(v.location.pathname);F?F.add(c.pathname):(F=new Set([c.pathname]),ae.set(v.location.pathname,F)),A={currentLocation:v.location,nextLocation:c}}me({...d,actionData:E,loaderData:T,historyAction:G,location:c,initialized:!0,renderFallback:!1,navigation:Qt,revalidation:"idle",restoreScrollPosition:k,preventScrollReset:L,blockers:M},{viewTransitionOpts:A,flushSync:y===!0}),G="POP",se=!1,de=!1,Y=!1,ee=!1,Z?.resolve(),Z=null,fe?.resolve(),fe=null}async function Er(c,d){if(Z?.resolve(),Z=null,typeof c=="number"){Z||(Z=ia());let te=Z.promise;return e.history.go(c),te}let y=rr(v.location,v.matches,s,c,d?.fromRouteId,d?.relative),{path:w,submission:E,error:T}=Kr(!1,y,d),M;d?.mask&&(M={pathname:"",search:"",hash:"",...typeof d.mask=="str
1ing"?Ne(d.mask):{...v.location.mask,...d.mask}});let k=v.location,L=pt(k,w,d&&d.state,void 0,M);L={...L,...e.history.encodeLocation(L)};let A=d&&d.replace!=null?d.replace:void 0,F="PUSH";A===!0?F="REPLACE":A===!1||E!=null&&ye(E.formMethod)&&E.formAction===v.location.pathname+v.location.search&&(F="REPLACE");let W=d&&"preventScrollReset"in d?d.preventScrollReset===!0:void 0,$=(d&&d.flushSync)===!0,Q=_r({currentLocation:k,nextLocation:L,historyAction:F});if(Q){Pt(Q,{state:"blocked",location:L,proceed(){Pt(Q,{state:"proceeding",proceed:void 0,reset:void 0,location:L}),Er(c,d)},reset(){let te=new Map(v.blockers);te.set(Q,ut),me({blockers:te})}});return}await Ke(F,L,{submission:E,pendingError:T,preventScrollReset:W,replace:d&&d.replace,enableViewTransition:d&&d.viewTransition,flushSync:$,callSiteDefaultShouldRevalidate:d&&d.defaultShouldRevalidate})}function en(){fe||(fe=ia()),Wt(),me({revalidation:"loading"});let c=fe.promise;return v.navigation.state==="submitting"?c:v.navigation.state==="idle"?(Ke(v.historyAction,v.location,{startUninterruptedRevalidation:!0}),c):(Ke(G||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation,enableViewTransition:de===!0}),c)}async function Ke(c,d,y){q&&q.abort(),q=null,G=c,Y=(y&&y.startUninterruptedRevalidation)===!0,hn(v.location,v.matches),se=(y&&y.preventScrollReset)===!0,de=(y&&y.enableViewTransition)===!0;let w=u.activeRoutes,E=y?.initialHydration&&v.matches&&v.matches.length>0&&!N?v.matches:Te(w,d,s,!1,u.branches),T=(y&&y.flushSync)===!0;if(E&&v.initialized&&!ee&&So(v.location,d)&&!(y&&y.submission&&ye(y.submission.formMethod))){et(d,{matches:E},{flushSync:T});return}let M=Ct(E,w,d.pathname);if(M.active&&M.matches&&(E=M.matches),!E){let{error:ie,notFoundMatches:ne,route:Re}=Vt(d.pathname);et(d,{matches:ne,loaderData:{},errors:{[Re.id]:ie}},{flushSync:T});return}let k=y&&y.overrideNavigation?{...y.overrideNavigation,matches:E,historyAction:c}:void 0;q=new AbortController;let L=nt(e.history,d,q.signal,y&&y.submission),A=e.getContext?await e.getContext():new zr,F;if(y&&y.pendingError)F=[Ye(E).route.id,{type:"error",error:y.pendingError}];else if(y&&y.submission&&ye(y.submission.formMethod)){let ie=await tn(L,d,y.submission,E,c,A,M.active,y&&y.initialHydration===!0,{replace:y.replace,flushSync:T});if(ie.shortCircuited)return;if(ie.pendingActionResult){let[ne,Re]=ie.pendingActionResult;if(be(Re)&>(Re.error)&&Re.error.status===404){q=null,et(d,{matches:ie.matches,loaderData:{},errors:{[ne]:Re.error}});return}}E=ie.matches||E,F=ie.pendingActionResult,k=Zt(d,E,c,y.submission),T=!1,M.active=!1,L=nt(e.history,L.url,L.signal)}let{shortCircuited:W,matches:$,loaderData:Q,errors:te,workingFetchers:he}=await rn(L,d,E,c,A,M.active,k,y&&y.submission,y&&y.fetcherSubmission,y&&y.replace,y&&y.initialHydration===!0,T,F,y&&y.callSiteDefaultShouldRevalidate);W||(q=null,et(d,{matches:$||E,...aa(F),loaderData:Q,errors:te,...he?{fetchers:he}:{}}))}async function tn(c,d,y,w,E,T,M,k,L={}){Wt();let A=Mo(d,w,E,y);if(me({navigation:A},{flushSync:L.flushSync===!0}),M){let $=await xt(w,d.pathname,c.signal);if($.type==="aborted")return{shortCircuited:!0};if($.type==="error"){if($.partialMatches.length===0){let{matches:te,route:he}=Tt(u.activeRoutes);return{matches:te,pendingActionResult:[he.id,{type:"error",error:$.error}]}}let Q=Ye($.partialMatches).route.id;return{matches:$.partialMatches,pendingActionResult:[Q,{type:"error",error:$.error}]}}else if($.matches)w=$.matches;else{let{notFoundMatches:Q,error:te,route:he}=Vt(d.pathname);return{matches:Q,pendingActionResult:[he.id,{type:"error",error:te}]}}}let F,W=Ft(w,d);if(!W.route.action&&!W.route.lazy)F={type:"error",error:Ce(405,{method:c.method,pathname:d.pathname,routeId:W.route.id})};else{let $=it(o,i,c,d,w,W,k?[]:a,T),Q=await lt(c,d,$,T,null);if(F=Q[W.route.id],!F){for(let te of w)if(Q[te.route.id]){F=Q[te.route.id];break}}if(c.signal.aborted)return{shortCircuited:!0}}if(Xe(F)){let $;return L&&L.replace!=null?$=L.replace:$=Zr(F.response.headers.get("Location"),new URL(c.url),s,e.history)===v.location.pathname+v.location.search,await Ge(c,F,!0,{submission:y,replace:$}),{shortCircuited:!0}}if(be(F)){let $=Ye(w,W.route.id);return(L&&L.replace)!==!0&&(G="PUSH"),{matches:w,pendingActionResult:[$.route.id,F,W.route.id]}}return{matches:w,pendingActionResult:[W.route.id,F]}}async function rn(c,d,y,w,E,T,M,k,L,A,F,W,$,Q){let te=M||Zt(d,y,w,k),he=k||L||oa(te),ie=!Y&&!F;if(T){if(ie){let Ee=br($);me({navigation:te,...Ee!==void 0?{actionData:Ee}:{}},{flushSync:W})}let K=await xt(y,d.pathname,c.signal);if(K.type==="aborted")return{shortCircuited:!0};if(K.type==="error"){if(K.partialMatches.length===0){let{matches:Oe,route:Ie}=Tt(u.activeRoutes);return{matches:Oe,loaderData:{},errors:{[Ie.id]:K.error}}}let Ee=Ye(K.partialMatches).route.id;return{matches:K.partialMatches,loaderData:{},errors:{[Ee]:K.error}}}else if(K.matches)y=K.matches;else{let{error:Ee,notFoundMatches:Oe,route:Ie}=Vt(d.pathname);return{matches:Oe,loaderData:{},errors:{[Ie.id]:Ee}}}}let ne=u.activeRoutes,{dsMatches:Re,revalidatingFetchers:we}=Gr(c,E,o,i,e.history,v,y,he,d,F?[]:a,F===!0,ee,ge,H,O,_,ne,s,e.patchRoutesOnNavigation!=null,u.branches,$,Q);if(f=++ce,!e.dataStrategy&&!Re.some(K=>K.shouldLoad)&&!Re.some(K=>K.route.middleware&&K.route.middleware.length>0)&&we.length===0){let K=new Map(v.fetchers),Ee=Cr(K);return et(d,{matches:y,loaderData:{},errors:$&&be($[1])?{[$[0]]:$[1].error}:null,...aa($),...Ee?{fetchers:K}:{}},{flushSync:W}),{shortCircuited:!0}}if(ie){let K={};if(!T){K.navigation=te;let Ee=br($);
1Ee!==void 0&&(K.actionData=Ee)}we.length>0&&(K.fetchers=an(we)),me(K,{flushSync:W})}we.forEach(K=>{je(K.key),K.controller&&X.set(K.key,K.controller)});let st=()=>we.forEach(K=>je(K.key));q&&q.signal.addEventListener("abort",st);let{loaderResults:ze,fetcherResults:tt}=await Sr(Re,we,c,d,E);if(c.signal.aborted)return{shortCircuited:!0};q&&q.signal.removeEventListener("abort",st),we.forEach(K=>X.delete(K.key));let He=Mt(ze);if(He)return await Ge(c,He.result,!0,{replace:A}),{shortCircuited:!0};if(He=Mt(tt),He)return _.add(He.key),await Ge(c,He.result,!0,{replace:A}),{shortCircuited:!0};let Me=new Map(v.fetchers),{loaderData:Kt,errors:Be}=ta(v,y,ze,$,we,tt,Me);F&&v.errors&&(Be={...v.errors,...Be});let Lt=Cr(Me),_t=xr(f,Me),Dt=Lt||_t||we.length>0;return{matches:y,loaderData:Kt,errors:Be,...Dt?{workingFetchers:Me}:{}}}function br(c){if(c&&!be(c[1]))return{[c[0]]:c[1].data};if(v.actionData)return Object.keys(v.actionData).length===0?null:v.actionData}function an(c){let d=new Map(v.fetchers);return c.forEach(y=>{let w=d.get(y.key),E=ct(void 0,w?w.data:void 0);d.set(y.key,E)}),d}async function nn(c,d,y,w){je(c);let E=(w&&w.flushSync)===!0,T=u.activeRoutes,M=rr(v.location,v.matches,s,y,d,w?.relative),k=Te(T,M,s,!1,u.branches),L=Ct(k,T,M);if(L.active&&L.matches&&(k=L.matches),!k){$e(c,d,Ce(404,{pathname:M}),{flushSync:E});return}let{path:A,submission:F,error:W}=Kr(!0,M,w);if(W){$e(c,d,W,{flushSync:E});return}let $=e.getContext?await e.getContext():new zr,Q=(w&&w.preventScrollReset)===!0;if(F&&ye(F.formMethod)){await on(c,d,A,k,$,L.active,E,Q,F,w&&w.defaultShouldRevalidate);return}O.set(c,{routeId:d,path:A}),await ln(c,d,A,k,$,L.active,E,Q,F)}async function on(c,d,y,w,E,T,M,k,L,A){Wt(),O.delete(c);let F=v.fetchers.get(c);Ue(c,Oo(L,F),{flushSync:M});let W=new AbortController,$=nt(e.history,y,W.signal,L);if(T){let oe=await xt(w,new URL($.url).pathname,$.signal,c);if(oe.type==="aborted")return;if(oe.type==="error"){$e(c,d,oe.error,{flushSync:M});return}else if(oe.matches)w=oe.matches;else{$e(c,d,Ce(404,{pathname:y}),{flushSync:M});return}}let Q=Ft(w,y);if(!Q.route.action&&!Q.route.lazy){let oe=Ce(405,{method:L.formMethod,pathname:y,routeId:d});$e(c,d,oe,{flushSync:M});return}X.set(c,W);let te=ce,he=it(o,i,$,y,w,Q,a,E),ie=await lt($,y,he,E,c),ne=ie[Q.route.id];if(!ne){for(let oe of he)if(ie[oe.route.id]){ne=ie[oe.route.id];break}}if($.signal.aborted){X.get(c)===W&&X.delete(c);return}if(H.has(c)){if(Xe(ne)||be(ne)){Ue(c,Fe(void 0));return}}else{if(Xe(ne))if(X.delete(c),f>te){Ue(c,Fe(void 0));return}else return _.add(c),Ue(c,ct(L)),Ge($,ne,!1,{fetcherSubmission:L,preventScrollReset:k});if(be(ne)){$e(c,d,ne.error);return}}let Re=v.navigation.location||v.location,we=nt(e.history,Re,W.signal),st=u.activeRoutes,ze=v.navigation.state!=="idle"?Te(st,v.navigation.location,s,!1,u.branches):v.matches;B(ze,"Didn't find any matches after fetcher action");let tt=++ce;S.set(c,tt);let{dsMatches:He,revalidatingFetchers:Me}=Gr(we,E,o,i,e.history,v,ze,L,Re,a,!1,ee,ge,H,O,_,st,s,e.patchRoutesOnNavigation!=null,u.branches,[Q.route.id,ne],A),Kt=ct(L,ne.data),Be=new Map(v.fetchers);Be.set(c,Kt),Me.filter(oe=>oe.key!==c).forEach(oe=>{let Je=oe.key,kr=Be.get(Je),yn=ct(void 0,kr?kr.data:void 0);Be.set(Je,yn),je(Je),oe.controller&&X.set(Je,oe.controller)}),me({fetchers:Be});let Lt=()=>Me.forEach(oe=>je(oe.key));W.signal.addEventListener("abort",Lt);let{loaderResults:_t,fetcherResults:Dt}=await Sr(He,Me,we,Re,E);if(W.signal.aborted)return;W.signal.removeEventListener("abort",Lt),S.delete(c),X.delete(c),Me.forEach(oe=>X.delete(oe.key));let K=v.fetchers.has(c),Ee=oe=>{if(!K)return oe;let Je=new Map(oe.fetchers);return Je.set(c,Fe(ne.data)),{...oe,fetchers:Je}},Oe=Mt(_t);if(Oe)return v=Ee(v),Ge(we,Oe.result,!1,{preventScrollReset:k});if(Oe=Mt(Dt),Oe)return _.add(Oe.key),v=Ee(v),Ge(we,Oe.result,!1,{preventScrollReset:k});let Ie=new Map(v.fetchers);K&&Ie.set(c,Fe(ne.data));let{loaderData:Or,errors:Gt}=ta(v,ze,_t,void 0,Me,Dt,Ie);xr(tt,Ie),v.navigation.state==="loading"&&tt>f?(B(G,"Expected pending action"),q&&q.abort(),et(v.navigation.location,{matches:ze,loaderData:Or,errors:Gt,fetchers:Ie})):(me({errors:Gt,loaderData:ra(v.loaderData,Or,ze,Gt),fetchers:Ie}),ee=!1)}async function ln(c,d,y,w,E,T,M,k,L){let A=v.fetchers.get(c);Ue(c,ct(L,A?A.data:void 0),{flushSync:M});let F=new AbortController,W=nt(e.history,y,F.signal);if(T){let ne=await xt(w,new URL(W.url).pathname,W.signal,c);if(ne.type==="aborted")return;if(ne.type==="error"){$e(c,d,ne.error,{flushSync:M});return}else if(ne.matches)w=ne.matches;else{$e(c,d,Ce(404,{pathname:y}),{flushSync:M});return}}let $=Ft(w,y);X.set(c,F);let Q=ce,te=it(o,i,W,y,w,$,a,E),he=await lt(W,y,te,E,c),ie=he[$.route.id];if(!ie){for(let ne of w)if(he[ne.route.id]){ie=he[ne.route.id];break}}if(X.get(c)===F&&X.delete(c),!W.signal.aborted){if(H.has(c)){Ue(c,Fe(void 0));return}if(Xe(ie))if(f>Q){Ue(c,Fe(void 0));return}else{_.add(c),await Ge(W,ie,!1,{preventScrollReset:k});return}if(be(ie)){$e(c,d,ie.error);return}Ue(c,Fe(ie.data))}}async function Ge(c,d,y,{submission:w,fetcherSubmission:E,preventScrollReset:T,replace:M}={}
1){y||(Z?.resolve(),Z=null),d.response.headers.has("X-Remix-Revalidate")&&(ee=!0);let k=d.response.headers.get("Location");B(k,"Expected a Location header on the redirect Response"),k=Zr(k,new URL(c.url),s,e.history);let L=pt(v.location,k,{_isRedirect:!0});if(r){let te=!1;if(d.response.headers.has("X-Remix-Reload-Document"))te=!0;else if(sr(k)){const he=va(t,k,!0);te=he.origin!==t.location.origin||Le(he.pathname,s)==null}if(te){M?t.location.replace(k):t.location.assign(k);return}}q=null;let A=M===!0||d.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:F,formAction:W,formEncType:$}=v.navigation;!w&&!E&&F&&W&&$&&(w=oa(v.navigation));let Q=w||E;if(no.has(d.response.status)&&Q&&ye(Q.formMethod))await Ke(A,L,{submission:{...Q,formAction:k},preventScrollReset:T||se,enableViewTransition:y?de:void 0});else{let te=Zt(L,[],A,w);await Ke(A,L,{overrideNavigation:te,fetcherSubmission:E,preventScrollReset:T||se,enableViewTransition:y?de:void 0})}}async function lt(c,d,y,w,E){let T,M={};try{T=await yo(l,c,d,y,E,w,!1)}catch(k){return y.filter(L=>L.shouldLoad).forEach(L=>{M[L.route.id]={type:"error",error:k}}),M}if(c.signal.aborted)return M;if(!ye(c.method))for(let k of y){if(T[k.route.id]?.type==="error")break;!T.hasOwnProperty(k.route.id)&&!v.loaderData.hasOwnProperty(k.route.id)&&(!v.errors||!v.errors.hasOwnProperty(k.route.id))&&k.shouldCallHandler()&&(T[k.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${k.route.id}`)})}for(let[k,L]of Object.entries(T))if(Lo(L)){let A=L.result;M[k]={type:"redirect",response:wo(A,c,k,y,s)}}else M[k]=await Ro(L);return M}async function Sr(c,d,y,w,E){let T=lt(y,w,c,E,null),M=Promise.all(d.map(async A=>{if(A.matches&&A.match&&A.request&&A.controller){let W=(await lt(A.request,A.path,A.matches,E,A.key))[A.match.route.id];return{[A.key]:W}}else return Promise.resolve({[A.key]:{type:"error",error:Ce(404,{pathname:A.path})}})})),k=await T,L=(await M).reduce((A,F)=>Object.assign(A,F),{});return{loaderResults:k,fetcherResults:L}}function Wt(){ee=!0,O.forEach((c,d)=>{X.has(d)&&ge.add(d),je(d)})}function Ue(c,d,y={}){let w=new Map(v.fetchers);w.set(c,d),me({fetchers:w},{flushSync:(y&&y.flushSync)===!0})}function $e(c,d,y,w={}){let E=Ye(v.matches,d),T=new Map(v.fetchers);Yt(T,c),me({errors:{[E.route.id]:y},fetchers:T},{flushSync:(w&&w.flushSync)===!0})}function sn(c){return j.set(c,(j.get(c)||0)+1),H.has(c)&&H.delete(c),v.fetchers.get(c)||oo}function un(c,d){je(c,d?.reason),Ue(c,Fe(null))}function Yt(c,d){let y=v.fetchers.get(d);X.has(d)&&!(y&&y.state==="loading"&&S.has(d))&&je(d),O.delete(d),S.delete(d),_.delete(d),H.delete(d),ge.delete(d),c.delete(d)}function cn(c){let d=(j.get(c)||0)-1;d<=0?(j.delete(c),H.add(c)):j.set(c,d),me({fetchers:new Map(v.fetchers)})}function je(c,d){let y=X.get(c);y&&(y.abort(d),X.delete(c))}function Pr(c,d){for(let y of c){let w=d.get(y);B(w,`Expected fetcher: ${y}`);let E=Fe(w.data);d.set(y,E)}}function Cr(c){let d=[],y=!1;for(let w of _){let E=c.get(w);B(E,`Expected fetcher: ${w}`),E.state==="loading"&&(_.delete(w),d.push(w),y=!0)}return Pr(d,c),y}function xr(c,d){let y=[];for(let[w,E]of S)if(E<c){let T=d.get(w);B(T,`Expected fetcher: ${w}`),T.state==="loading"&&(je(w),S.delete(w),y.push(w))}return Pr(y,d),y.length>0}function fn(c,d){let y=v.blockers.get(c)||ut;return J.get(c)!==d&&J.set(c,d),y}function Lr(c){v.blockers.delete(c),J.delete(c)}function Pt(c,d){let y=v.blockers.get(c)||ut;B(y.state==="unblocked"&&d.state==="blocked"||y.state==="blocked"&&d.state==="blocked"||y.state==="blocked"&&d.state==="proceeding"||y.state==="blocked"&&d.state==="unblocked"||y.state==="proceeding"&&d.state==="unblocked",`Invalid blocker state transition: ${y.state} -> ${d.state}`);let w=new Map(v.blockers);w.set(c,d),me({blockers:w})}function _r({currentLocation:c,nextLocation:d,historyAction:y}){if(J.size===0)return;J.size>1&&le(!1,"A router only supports one blocker at a time");let w=Array.from(J.entries()),[E,T]=w[w.length-1],M=v.blockers.get(E);if(!(M&&M.state==="proceeding")&&T({currentLocation:c,nextLocation:d,historyAction:y}))return E}function Vt(c){let d=Ce(404,{pathname:c}),y=u.activeRoutes,{matches:w,route:E}=Tt(y);return{notFoundMatches:w,route:E,error:d}}function dn(c,d,y){if(P=c,b=d,C=y||null,!D&&v.navigation===Qt){D=!0;let w=Tr(v.location,v.matches);w!=null&&me({restoreScrollPosition:w})}return()=>{P=null,b=null,C=null}}function Dr(c,d){return C&&C(c,d.map(w=>On(w,v.loaderData)))||c.key}function hn(c,d){if(P&&b){let y=Dr(c,d);
1P[y]=b()}}function Tr(c,d){if(P){let y=Dr(c,d),w=P[y];if(typeof w=="number")return w}return null}function Ct(c,d,y){if(e.patchRoutesOnNavigation){let w=u.branches;if(c){if(Object.keys(c[0].params).length>0)return{active:!0,matches:Te(d,y,s,!0,w)}}else return{active:!0,matches:Te(d,y,s,!0,w)||[]}}return{active:!1,matches:null}}async function xt(c,d,y,w){if(!e.patchRoutesOnNavigation)return{type:"success",matches:c};let E=c;for(;;){let T=i;try{await e.patchRoutesOnNavigation({signal:y,path:d,matches:E,fetcherKey:w,patch:(A,F)=>{y.aborted||Jr(A,F,u,T,o,!1)}})}catch(A){return{type:"error",error:A,partialMatches:E}}if(y.aborted)return{type:"aborted"};let M=u.branches,k=Te(u.activeRoutes,d,s,!1,M),L=null;if(k){if(Object.keys(k[0].params).length===0)return{type:"success",matches:k};if(L=Te(u.activeRoutes,d,s,!0,M),!(L&&E.length<L.length&&Mr(E,L.slice(0,E.length))))return{type:"success",matches:k}}if(L||(L=Te(u.activeRoutes,d,s,!0,M)),!L||Mr(E,L))return{type:"success",matches:null};E=L}}function Mr(c,d){return c.length===d.length&&c.every((y,w)=>y.route.id===d[w].route.id)}function mn(c){i={},u.setHmrRoutes(yt(c,o,void 0,i))}function pn(c,d,y=!1){Jr(c,d,u,i,o,y),u.hasHMRRoutes||me({})}return U={get basename(){return s},get future(){return h},get state(){return v},get routes(){return u.stableRoutes},get branches(){return u.branches},get manifest(){return i},get window(){return t},initialize:Bt,subscribe:Za,enableScrollRestoration:dn,navigate:Er,fetch:nn,revalidate:en,createHref:c=>e.history.createHref(c),encodeLocation:c=>e.history.encodeLocation(c),getFetcher:sn,resetFetcher:un,deleteFetcher:cn,dispose:Qa,getBlocker:fn,deleteBlocker:Lr,patchRoutes:pn,_internalFetchControllers:X,_internalSetRoutes:mn,_internalSetStateDoNotUseOrYouWillBreakYourApp(c){me(c)}},e.instrumentations&&(U=qn(U,e.instrumentations.map(c=>c.router).filter(Boolean))),U}function uo(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function rr(e,t,r,a,n,o){let i,u;if(n){i=[];for(let l of t)if(i.push(l),l.route.id===n){u=l;break}}else i=t,u=t[t.length-1];let s=Rt(a||".",jt(i),Le(e.pathname,r)||e.pathname,o==="path");if(a==null&&(s.search=e.search,s.hash=e.hash),(a==null||a===""||a===".")&&u){let l=dr(s.search);if(u.route.index&&!l)s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&l){let h=new URLSearchParams(s.search),m=h.getAll("index");h.delete("index"),m.filter(g=>g).forEach(g=>h.append("index",g));let R=h.toString();s.search=R?`?${R}`:""}}return r!=="/"&&(s.pathname=Bn({basename:r,pathname:s.pathname})),Ae(s)}function Kr(e,t,r){if(!r||!uo(r))return{path:t};if(r.formMethod&&!To(r.formMethod))return{path:t,error:Ce(405,{method:r.formMethod})};let a=()=>({path:t,error:Ce(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),i=ja(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ye(o))return a();let m=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((R,[g,P])=>`${R}${g}=${P} 2`,""):String(r.body);return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:void 0,text:m}}}else if(r.formEncType==="application/json"){if(!ye(o))return a();try{let m=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:m,text:void 0}}}catch{return a()}}}B(typeof FormData=="function","FormData is not available in this environment");let u,s;if(r.formData)u=or(r.formData),s=r.formData;else if(r.body instanceof FormData)u=or(r.body),s=r.body;else if(r.body instanceof URLSearchParams)u=r.body,s=ea(u);else if(r.body==null)u=new URLSearchParams,s=new FormData;else try{u=new URLSearchParams(r.body),s=ea(u)}catch{return a()}let l={formMethod:o,formAction:i,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(ye(l.formMethod))return{path:t,submission:l};let h=Ne(t);return e&&h.search&&dr(h.search)&&u.append("index",""),h.search=`?${u}`,{path:Ae(h),submission:l}}function Gr(e,t,r,a,n,o,i,u,s,l,h,m,R,g,P,C,b,D,x,N,V,z){let re=V?be(V[1])?V[1].error:V[1].data:void 0,U=n.createURL(o.location),v=n.createURL(s),G;if(h&&o.errors){let Y=Object.keys(o.errors)[0];G=i.findIndex(ee=>ee.route.id===Y)}else if(V&&be(V[1])){let Y=V[0];G=i.findIndex(ee=>ee.route.id===Y)-1}let Z=V?V[1].statusCode:void 0,se=Z&&Z>
2=400,q={currentUrl:U,currentParams:o.matches[0]?.params||{},nextUrl:v,nextParams:i[0].params,...u,actionResult:re,actionStatus:Z},de=Et(i),ae=i.map((Y,ee)=>{let{route:ge}=Y,X=null;if(G!=null&&ee>G)X=!1;else if(ge.lazy)X=!0;else if(!cr(ge))X=!1;else if(h){let{shouldLoad:_}=Oa(ge,o.loaderData,o.errors);X=_}else co(o.loaderData,o.matches[ee],Y)&&(X=!0);if(X!==null)return ar(r,a,e,s,de,Y,l,t,X);let ce=!1;typeof z=="boolean"?ce=z:se?ce=!1:(m||U.pathname+U.search===v.pathname+v.search||U.search!==v.search||fo(o.matches[ee],Y))&&(ce=!0);let f={...q,defaultShouldRevalidate:ce},S=mt(Y,f);return ar(r,a,e,s,de,Y,l,t,S,f,z)}),ue=[];return P.forEach((Y,ee)=>{if(h||!i.some(j=>j.route.id===Y.routeId)||g.has(ee))return;let ge=o.fetchers.get(ee),X=ge&&ge.state!=="idle"&&ge.data===void 0,ce=Te(b,Y.path,D??"/",!1,N);if(!ce){if(x&&X)return;ue.push({key:ee,routeId:Y.routeId,path:Y.path,matches:null,match:null,request:null,controller:null});return}if(C.has(ee))return;let f=Ft(ce,Y.path),S=new AbortController,_=nt(n,Y.path,S.signal),O=null;if(R.has(ee))R.delete(ee),O=it(r,a,_,Y.path,ce,f,l,t);else if(X)m&&(O=it(r,a,_,Y.path,ce,f,l,t));else{let j;typeof z=="boolean"?j=z:se?j=!1:j=m;let H={...q,defaultShouldRevalidate:j};mt(f,H)&&(O=it(r,a,_,Y.path,ce,f,l,t,H))}O&&ue.push({key:ee,routeId:Y.routeId,path:Y.path,matches:O,match:f,request:_,controller:S})}),{dsMatches:ae,revalidatingFetchers:ue}}function cr(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Oa(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!cr(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 co(e,t,r){let a=!t||r.route.id!==t.route.id,n=!e.hasOwnProperty(r.route.id);return a||n}function fo(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function mt(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function Jr(e,t,r,a,n,o){let i;if(e){let l=a[e];B(l,`No route found to patch children into: routeId = ${e}`),l.children||(l.children=[]),i=l.children}else i=r.activeRoutes;let u=[],s=[];if(t.forEach(l=>{let h=i.find(m=>ka(l,m));h?s.push({existingRoute:h,newRoute:l}):u.push(l)}),u.length>0){let l=yt(u,n,[e||"_","patch",String(i?.length||"0")],a);i.push(...l)}if(o&&s.length>0)for(let l=0;l<s.length;l++){let{existingRoute:h,newRoute:m}=s[l],R=h,[g]=yt([m],n,[],{},!0);Object.assign(R,{element:g.element?g.element:R.element,errorElement:g.errorElement?g.errorElement:R.errorElement,hydrateFallbackElement:g.hydrateFallbackElement?g.hydrateFallbackElement:R.hydrateFallbackElement})}r.hasHMRRoutes||r.setRoutes([...r.activeRoutes])}function ka(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=>ka(r,n)))??!1:!1}var qr=new WeakMap,Fa=({key:e,route:t,manifest:r,mapRouteProperties:a})=>{let n=r[t.id];if(B(n,"No route found in manifest"),!n.lazy||typeof n.lazy!="object")return;let o=n.lazy[e];if(!o)return;let i=qr.get(n);i||(i={},qr.set(n,i));let u=i[e];if(u)return u;let s=(async()=>{let l=_n(e),m=n[e]!==void 0&&e!=="hasErrorBoundary";if(l)le(!l,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),i[e]=Promise.resolve();else if(m)le(!1,`Route "${n.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let R=await o();R!=null&&(Object.assign(n,{[e]:R}),Object.assign(n,a(n)))}typeof n.lazy=="object"&&(n.lazy[e]=void 0,Object.values(n.lazy).every(R=>R===void 0)&&(n.lazy=void 0))})();return i[e]=s,s},Xr=new WeakMap;function ho(e,t,r,a,n){let o=r[e.id];if(B(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let h=Xr.get(o);if(h)return{lazyRoutePromise:h,lazyHandlerPromise:h};let m=(async()=>{B(typeof e.lazy=="function","No lazy route function found");let R=await e.lazy(),g={};for(let P in R){let C=R[P];
2if(C===void 0)continue;let b=Tn(P),x=o[P]!==void 0&&P!=="hasErrorBoundary";b?le(!b,"Route property "+P+" is not a supported property to be returned from a lazy route function. This property will be ignored."):x?le(!x,`Route "${o.id}" has a static property "${P}" defined but its lazy function is also returning a value for this property. The lazy route property "${P}" will be ignored.`):g[P]=C}Object.assign(o,g),Object.assign(o,{...a(o),lazy:void 0})})();return Xr.set(o,m),m.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:m}}let i=Object.keys(e.lazy),u=[],s;for(let h of i){if(n&&n.includes(h))continue;let m=Fa({key:h,route:e,manifest:r,mapRouteProperties:a});m&&(u.push(m),h===t&&(s=m))}let l=u.length>0?Promise.all(u).then(()=>{}):void 0;return l?.catch(()=>{}),s?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:s}}async function Qr(e){let t=e.matches.filter(n=>n.shouldLoad),r={};return(await Promise.all(t.map(n=>n.resolve()))).forEach((n,o)=>{r[t[o].route.id]=n}),r}async function mo(e){return e.matches.some(t=>t.route.middleware)?Aa(e,()=>Qr(e)):Qr(e)}function Aa(e,t){return po(e,t,a=>{if(Do(a))throw a;return a},Co,r);function r(a,n,o){if(o)return Promise.resolve(Object.assign(o.value,{[n]:{type:"error",result:a}}));{let{matches:i}=e,u=Math.min(Math.max(i.findIndex(l=>l.route.id===n),0),Math.max(i.findIndex(l=>l.shouldCallHandler()),0)),s=Ye(i,i[u].route.id).route.id;return Promise.resolve({[s]:{type:"error",result:a}})}}}async function po(e,t,r,a,n){let{matches:o,...i}=e,u=o.flatMap(l=>l.route.middleware?l.route.middleware.map(h=>[l.route.id,h]):[]);return await Na(i,u,t,r,a,n)}async function Na(e,t,r,a,n,o,i=0){let{request:u}=e;if(u.signal.aborted)throw u.signal.reason??new Error(`Request aborted: ${u.method} ${u.url}`);let s=t[i];if(!s)return await r();let[l,h]=s,m,R=async()=>{if(m)throw new Error("You may only call `next()` once per middleware");try{return m={value:await Na(e,t,r,a,n,o,i+1)},m.value}catch(g){return m={value:await o(g,l,m)},m.value}};try{let g=await h(e,R),P=g!=null?a(g):void 0;return n(P)?P:m?P??m.value:(m={value:await R()},m.value)}catch(g){return await o(g,l,m)}}function Ua(e,t,r,a,n){let o=Fa({key:"middleware",route:a.route,manifest:t,mapRouteProperties:e}),i=ho(a.route,ye(r.method)?"action":"loader",t,e,n);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function ar(e,t,r,a,n,o,i,u,s,l=null,h){let m=!1,R=Ua(e,t,r,o,i);return{...o,_lazyPromises:R,shouldLoad:s,shouldRevalidateArgs:l,shouldCallHandler(g){return m=!0,l?typeof h=="boolean"?mt(o,{...l,defaultShouldRevalidate:h}):typeof g=="boolean"?mt(o,{...l,defaultShouldRevalidate:g}):mt(o,l):s},resolve(g){let{lazy:P,loader:C,middleware:b}=o.route,D=m||s||g&&!ye(r.method)&&(P||C),x=b&&b.length>0&&!C&&!P;return D&&(ye(r.method)||!x)?vo({request:r,path:a,pattern:n,match:o,lazyHandlerPromise:R?.handler,lazyRoutePromise:R?.route,handlerOverride:g,scopedContext:u}):Promise.resolve({type:"data",result:void 0})}}}function it(e,t,r,a,n,o,i,u,s=null){return n.map(l=>l.route.id!==o.route.id?{...l,shouldLoad:!1,shouldRevalidateArgs:s,shouldCallHandler:()=>!1,_lazyPromises:Ua(e,t,r,l,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:ar(e,t,r,a,Et(n),l,i,u,!0,s))}async function yo(e,t,r,a,n,o,i){a.some(h=>h._lazyPromises?.middleware)&&await Promise.all(a.map(h=>h._lazyPromises?.middleware));let u={request:t,url:$a(t,r),pattern:Et(a),params:a[0].params,context:o,matches:a},l=await e({...u,fetcherKey:n,runClientMiddleware:h=>{let m=u;return Aa(m,()=>h({...m,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 l}async function vo({request:e,path:t,pattern:r,match:a,lazyHandlerPromise:n,lazyRoutePromise:o,handlerOverride:i,scopedContext:u}){let s,l,h=ye(e.method),m=h?"action":"loader",R=g=>{let P,C=new Promise((x,N)=>P=N);l=()=>P(),e.signal.addEventListener("abort",l);let b=x=>typeof g!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${m}" [routeId: ${a.route.id}]`)):g({request:e,url:$a(e,t),pattern:r,params:a.params,context:u},...x!==void 0?[x]:[]),D=(async()=>{try{return{type:"data",result:await(i?i(N=>b(N)):b())}}catch(x){return{type:"error",result:x}}})();return Promise.race([D,C])};try{let g=h?a.route.action:a.route.loader;
2if(n||o)if(g){let P,[C]=await Promise.all([R(g).catch(b=>{P=b}),n,o]);if(P!==void 0)throw P;s=C}else{await n;let P=h?a.route.action:a.route.loader;if(P)[s]=await Promise.all([R(P),o]);else if(m==="action"){let C=new URL(e.url),b=C.pathname+C.search;throw Ce(405,{method:e.method,pathname:b,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(g)s=await R(g);else{let P=new URL(e.url),C=P.pathname+P.search;throw Ce(404,{pathname:C})}}catch(g){return{type:"error",result:g}}finally{l&&e.signal.removeEventListener("abort",l)}return s}async function go(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 Ro(e){let{result:t,type:r}=e;if(fr(t)){let a;try{a=await go(t)}catch(n){return{type:"error",error:n}}return r==="error"?{type:"error",error:new wt(t.status,t.statusText,a),statusCode:t.status,headers:t.headers}:{type:"data",data:a,statusCode:t.status,headers:t.headers}}return r==="error"?na(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:Po(t),statusCode:gt(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:gt(t)?t.status:void 0}:na(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function wo(e,t,r,a,n){let o=e.headers.get("Location");if(B(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!sr(o)){let i=a.slice(0,a.findIndex(u=>u.route.id===r)+1);o=rr(new URL(t.url),i,n,o),e.headers.set("Location",o)}return e}var Eo=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function nr(e){try{return Eo.includes(new URL(e).protocol)}catch{return!1}}function Zr(e,t,r,a){if(sr(e)){let n=e,o=lr.test(n)?new URL(ya(n,t.protocol)):new URL(n);if(nr(o.toString()))throw new Error("Invalid redirect location");let i=Le(o.pathname,r)!=null;if(o.origin===t.origin&&i)return ur(o.pathname)+o.search+o.hash}try{let n=a.createURL(e);if(nr(n.toString()))throw new Error("Invalid redirect location")}catch{}return e}function nt(e,t,r,a){let n=e.createURL(ja(t)).toString(),o={signal:r};if(a&&ye(a.formMethod)){let{formMethod:i,formEncType:u}=a;o.method=i.toUpperCase(),u==="application/json"?(o.headers=new Headers({"Content-Type":u}),o.body=JSON.stringify(a.json)):u==="text/plain"?o.body=a.text:u==="application/x-www-form-urlencoded"&&a.formData?o.body=or(a.formData):o.body=a.formData}return new Request(n,o)}function $a(e,t){let r=new URL(e.url),a=typeof t=="string"?Ne(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 or(e){let t=new URLSearchParams;for(let[r,a]of e.entries())t.append(r,typeof a=="string"?a:a.name);return t}function ea(e){let t=new FormData;for(let[r,a]of e.entries())t.append(r,a);return t}function bo(e,t,r,a=!1,n=!1){let o={},i=null,u,s=!1,l={},h=r&&be(r[1])?r[1].error:void 0;return e.forEach(m=>{if(!(m.route.id in t))return;let R=m.route.id,g=t[R];if(B(!Xe(g),"Cannot handle redirect results in processLoaderData"),be(g)){let P=g.error;if(h!==void 0&&(P=h,h=void 0),i=i||{},n)i[R]=P;else{let C=Ye(e,R);i[C.route.id]==null&&(i[C.route.id]=P)}a||(o[R]=Ma),s||(s=!0,u=gt(g.error)?g.error.status:500),g.headers&&(l[R]=g.headers)}else o[R]=g.data,g.statusCode&&g.statusCode!==200&&!s&&(u=g.statusCode),g.headers&&(l[R]=g.headers)}),h!==void 0&&r&&(i={[r[0]]:h},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:i,statusCode:u||200,loaderHeaders:l}}function ta(e,t,r,a,n,o,i){let{loaderData:u,errors:s}=bo(t,r,a);return n.filter(l=>!l.matches||l.matches.some(h=>h.shouldLoad)).forEach(l=>{let{key:h,match:m,controller:R}=l;if(R&&R.signal.aborted)return;let g=o[h];if(B(g,"Did not find corresponding fetcher result"),be(g)){let P=Ye(e.matches,m?.route.id);s&&s[P.route.id]||(s={...s,[P.route.id]:g.error}),i.delete(h)}else if(Xe(g))B(!1,"Unhandled fetcher revalidation redirect");else{let P=Fe(g.data);i.set(h,P)}}),{loaderData:u,errors:s}}function ra(e,t,r,a){let n=Object.entries(t).filter(([,o])=>o!==Ma).reduce((o,[i,u])=>(o[i]=u,o),{});for(let o of r){let i=o.route.id;if(!t.hasOwnProperty(i)&&e.hasOwnProperty(i)&&o.route.loader&&(n[i]=e[i]),a&&a.hasOwnProperty(i))break}return n}function aa(e){return e?be(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ye(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 Tt(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ce(e,{pathname:t,routeId:r,method:a,type:n,message:o}={}){let i="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(i="Bad Request",a&&t&&r?u=`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"&&(u="Unable to encode submission body")):e===403?(i="Forbidden",u=`Route "${r}" does not match URL "${t}"`):e===404?(i="Not Found",u=`No route matches URL "${t}"`):e===405&&(i="Method Not Allowed",a&&t&&r?u=`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&&(u=`Invalid request method "${a.toUpperCase()}"`)),new wt(e||500,i,new Error(u),!0)}function Mt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[a,n]=t[r];
2if(Xe(n))return{key:a,result:n}}}function ja(e){let t=typeof e=="string"?Ne(e):e;return Ae({...t,hash:""})}function So(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Po(e){return new wt(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function Co(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&xo(r))}function xo(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function Lo(e){return fr(e.result)&&Da.has(e.result.status)}function be(e){return e.type==="error"}function Xe(e){return(e&&e.type)==="redirect"}function na(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function fr(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function _o(e){return Da.has(e)}function Do(e){return fr(e)&&_o(e.status)&&e.headers.has("Location")}function To(e){return ao.has(e.toUpperCase())}function ye(e){return to.has(e.toUpperCase())}function dr(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ft(e,t){let r=typeof t=="string"?Ne(t).search:t.search;if(e[e.length-1].route.index&&dr(r||""))return e[e.length-1];let a=Pa(e);return a[a.length-1]}function oa(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 Zt(e,t,r,a){return a?{state:"loading",location:e,matches:t,historyAction:r,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}:{state:"loading",location:e,matches:t,historyAction:r,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Mo(e,t,r,a){return{state:"submitting",location:e,matches:t,historyAction:r,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}}function ct(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 Oo(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 Fe(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 ko(e,t){try{let r=e.sessionStorage.getItem(Ta);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 Fo(e,t){if(t.size>0){let r={};for(let[a,n]of t)r[a]=[...n];try{e.sessionStorage.setItem(Ta,JSON.stringify(r))}catch(a){le(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function ia(){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 Qe=p.createContext(null);Qe.displayName="DataRouter";var bt=p.createContext(null);bt.displayName="DataRouterState";var Ia=p.createContext(!1);function za(){return p.useContext(Ia)}var hr=p.createContext({isTransitioning:!1});hr.displayName="ViewTransition";var Ha=p.createContext(new Map);Ha.displayName="Fetchers";var Ao=p.createContext(null);Ao.displayName="Await";var Se=p.createContext(null);Se.displayName="Navigation";var It=p.createContext(null);It.displayName="Location";var _e=p.createContext({outlet:null,matches:[],isDataRoute:!1});_e.displayName="Route";var mr=p.createContext(null);mr.displayName="RouteError";var Ba="REACT_ROUTER_ERROR",No="REDIRECT",Uo="ROUTE_ERROR_RESPONSE";function $o(e){if(e.startsWith(`${Ba}:${No}:{`))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 jo(e){if(e.startsWith(`${Ba}:${Uo}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new wt(t.status,t.statusText,t.data)}catch{}}function Io(e,{relative:t}={}){B(Ze(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=p.useContext(Se),{hash:n,pathname:o,search:i}=St(e,{relative:t}),u=o;return r!=="/"&&(u=o==="/"?r:xe([r,o])),a.createHref({pathname:u,search:i,hash:n})}function Ze(){return p.useContext(It)!=null}function De(){return B(Ze(),"useLocation() may be used only in the context of a <Router> component."),p.useContext(It).location}function Ki(e){B(Ze(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=De();return p.useMemo(()=>vt(e,Sa(t)),[t,e])}var Wa="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ya(e){p.useContext(Se).static||p.useLayoutEffect(e)}function pr(){let{isDataRoute:e}=p.useContext(_e);return e?ei():zo()}function zo(){B(Ze(),"useNavigate() may be used only in the context of a <Router> component.");let e=p.useContext(Qe),{basename:t,navigator:r}=p.useContext(Se),{matches:a}=p.useContext(_e),{pathname:n}=De(),o=JSON.stringify(jt(a)),i=p.useRef(!1);return Ya(()=>{i.current=!0}),p.useCallback((s,l={})=>{if(le(i.current,Wa),!i.current)return;if(typeof s=="number"){r.go(s);return}let h=Rt(s,JSON.parse(o),n,l.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:xe([t,h.pathname])),(l.replace?r.replace:r.push)(h,l.state,l)},[t,r,o,n,e])}var Va=p.createContext(null);function Gi(){return p.useContext(Va)}function Ho(e){let t=p.useContext(_e).outlet;return p.useMemo(()=>t&&p.createElement(Va.Provider,{value:e},t),[t,e])}function Ji(){let{matches:e}=p.useContext(_e);return e[e.length-1]?.params??{}}function St(e,{relative:t}={}){let{matches:r}=p.useContext(_e),{pathname:a}=De(),n=JSON.stringify(jt(r));return p.useMemo(()=>Rt(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function Bo(e,t,r){B(Ze(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=p.useContext(Se),{matches:n}=p.useContext(_e),o=n[n.length-1],i=o?o.params:{},u=o?o.pathname:"/",s=o?o.pathnameBase:"/",l=o&&o.route;{let b=l&&l.path||"";Ga(u,!l||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${b}">) 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="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let h=De(),m;m=h;let R=m.pathname||"/",g=R;if(s!=="/"){let b=s.replace(/^\//,"").split("/");g="/"+R.replace(/^\//,"").split("/").slice(b.length).join("/")}let P=r&&r.state.matches.length?r.state.matches.map(b=>Object.assign(b,{route:r.manifest[b.route.id]||b.route})):ga(e,{pathname:g});return le(l||P!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),le(P==null||P[P.length-1].route.element!==void 0||P[P.length-1].route.Component!==void 0||P[P.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.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.`),Go(P&&P.map(b=>Object.assign({},b,{params:Object.assign({},i,b.params),pathname:xe([s,a.encodeLocation?a.encodeLocation(b.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?s:xe([s,a.encodeLocation?a.encodeLocation(b.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathnameBase])})),n,r)}function Wo(){let e=Zo(),t=gt(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=p.createElement(p.Fragment,null,p.createElement("p",null,"ð¿ Hey developer ð"),p.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",p.createElement("code",{style:o},"ErrorBoundary")," or"," ",p.createElement("code",{style:o},"errorElement")," prop on your route.")),p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application
4Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),r?p.createElement("pre",{style:n},r):null,i)}var Yo=p.createElement(Wo,null),Ka=class extends p.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=jo(e.digest);r&&(e=r)}let t=e!==void 0?p.createElement(_e.Provider,{value:this.props.routeContext},p.createElement(mr.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?p.createElement(Vo,{error:e},t):t}};Ka.contextType=Ia;var er=new WeakMap;function Vo({children:e,error:t}){let{basename:r}=p.useContext(Se);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=$o(t.digest);if(a){let n=er.get(t);if(n)throw n;let o=xa(a.location,r),i=o.absoluteURL||o.to;if(nr(i))throw new Error("Invalid redirect location");if(Ca&&!er.get(t))if(o.isExternal||a.reloadDocument)window.location.href=i;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw er.set(t,u),u}return p.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i}`})}}return e}function Ko({routeContext:e,match:t,children:r}){let a=p.useContext(Qe);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),p.createElement(_e.Provider,{value:e},r)}function Go(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(m=>m.route.id&&o?.[m.route.id]!==void 0);B(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,u=-1;if(r&&a){i=a.renderFallback;for(let h=0;h<n.length;h++){let m=n[h];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(u=h),m.route.id){let{loaderData:R,errors:g}=a,P=m.route.loader&&!R.hasOwnProperty(m.route.id)&&(!g||g[m.route.id]===void 0);if(m.route.lazy||P){r.isStatic&&(i=!0),u>=0?n=n.slice(0,u+1):n=[n[0]];break}}}}let s=r?.onError,l=a&&s?(h,m)=>{s(h,{location:a.location,params:a.matches?.[0]?.params??{},pattern:Et(a.matches),errorInfo:m})}:void 0;return n.reduceRight((h,m,R)=>{let g,P=!1,C=null,b=null;a&&(g=o&&m.route.id?o[m.route.id]:void 0,C=m.route.errorElement||Yo,i&&(u<0&&R===0?(Ga("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),P=!0,b=null):u===R&&(P=!0,b=m.route.hydrateFallbackElement||null)));let D=t.concat(n.slice(0,R+1)),x=()=>{let N;return g?N=C:P?N=b:m.route.Component?N=p.createElement(m.route.Component,null):m.route.element?N=m.route.element:N=h,p.createElement(Ko,{match:m,routeContext:{outlet:h,matches:D,isDataRoute:a!=null},children:N})};return a&&(m.route.ErrorBoundary||m.route.errorElement||R===0)?p.createElement(Ka,{location:a.location,revalidation:a.revalidation,component:C,error:g,children:x(),routeContext:{outlet:null,matches:D,isDataRoute:!0},onError:l}):x()},null)}function yr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Jo(e){let t=p.useContext(Qe);return B(t,yr(e)),t}function qo(e){let t=p.useContext(bt);return B(t,yr(e)),t}function Xo(e){let t=p.useContext(_e);return B(t,yr(e)),t}function vr(e){let t=Xo(e),r=t.matches[t.matches.length-1];return B(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Qo(){return vr("useRouteId")}function Zo(){let e=p.useContext(mr),t=qo("useRouteError"),r=vr("useRouteError");return e!==void 0?e:t.errors?.[r]}function ei(){let{router:e}=Jo("useNavigate"),t=vr("useNavigate"),r=p.useRef(!1);return Ya(()=>{r.current=!0}),p.useCallback(async(n,o={})=>{le(r.current,Wa),r.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}var la={};function Ga(e,t,r){!t&&!la[e]&&(la[e]=!0,le(!1,r))}var sa={};function ua(e,t){!e&&!sa[t]&&(sa[t]=!0,console.warn(t))}var ti="useOptimistic",ca=Sn[ti],ri=()=>{};function ai(e){return ca?ca(e):[e,ri]}function ni(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&le(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:p.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&le(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:p.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&le(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:p.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var oi=["HydrateFallback","hydrateFallbackElement"],ii=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>
4{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function li({router:e,flushSync:t,onError:r,useTransitions:a}){a=za()||a;let[o,i]=p.useState(e.state),[u,s]=ai(o),[l,h]=p.useState(),[m,R]=p.useState({isTransitioning:!1}),[g,P]=p.useState(),[C,b]=p.useState(),[D,x]=p.useState(),N=p.useRef(new Map),V=p.useCallback((v,{deletedFetchers:G,newErrors:Z,flushSync:se,viewTransitionOpts:q})=>{Z&&r&&Object.values(Z).forEach(ae=>r(ae,{location:v.location,params:v.matches[0]?.params??{},pattern:Et(v.matches)})),v.fetchers.forEach((ae,ue)=>{ae.data!==void 0&&N.current.set(ue,ae.data)}),G.forEach(ae=>N.current.delete(ae)),ua(se===!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 de=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(ua(q==null||de,"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."),!q||!de){t&&se?t(()=>i(v)):a===!1?i(v):p.startTransition(()=>{a===!0&&s(ae=>fa(ae,v)),i(v)});return}if(t&&se){t(()=>{C&&(g?.resolve(),C.skipTransition()),R({isTransitioning:!0,flushSync:!0,currentLocation:q.currentLocation,nextLocation:q.nextLocation})});let ae=e.window.document.startViewTransition(()=>{t(()=>i(v))});ae.finished.finally(()=>{t(()=>{P(void 0),b(void 0),h(void 0),R({isTransitioning:!1})})}),t(()=>b(ae));return}C?(g?.resolve(),C.skipTransition(),x({state:v,currentLocation:q.currentLocation,nextLocation:q.nextLocation})):(h(v),R({isTransitioning:!0,flushSync:!1,currentLocation:q.currentLocation,nextLocation:q.nextLocation}))},[e.window,t,C,g,a,s,r]);p.useLayoutEffect(()=>e.subscribe(V),[e,V]),p.useEffect(()=>{m.isTransitioning&&!m.flushSync&&P(new ii)},[m]),p.useEffect(()=>{if(g&&l&&e.window){let v=l,G=g.promise,Z=e.window.document.startViewTransition(async()=>{a===!1?i(v):p.startTransition(()=>{a===!0&&s(se=>fa(se,v)),i(v)}),await G});Z.finished.finally(()=>{P(void 0),b(void 0),h(void 0),R({isTransitioning:!1})}),b(Z)}},[l,g,e.window,a,s]),p.useEffect(()=>{g&&l&&u.location.key===l.location.key&&g.resolve()},[g,C,u.location,l]),p.useEffect(()=>{!m.isTransitioning&&D&&(h(D.state),R({isTransitioning:!0,flushSync:!1,currentLocation:D.currentLocation,nextLocation:D.nextLocation}),x(void 0))},[m.isTransitioning,D]);let z=p.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:v=>e.navigate(v),push:(v,G,Z)=>e.navigate(v,{state:G,preventScrollReset:Z?.preventScrollReset}),replace:(v,G,Z)=>e.navigate(v,{replace:!0,state:G,preventScrollReset:Z?.preventScrollReset})}),[e]),re=e.basename||"/",U=p.useMemo(()=>({router:e,navigator:z,static:!1,basename:re,onError:r}),[e,z,re,r]);return p.createElement(p.Fragment,null,p.createElement(Qe.Provider,{value:U},p.createElement(bt.Provider,{value:u},p.createElement(Ha.Provider,{value:N.current},p.createElement(hr.Provider,{value:m},p.createElement(ci,{basename:re,location:u.location,navigationType:u.historyAction,navigator:z,useTransitions:a},p.createElement(si,{routes:e.routes,manifest:e.manifest,future:e.future,state:u,isStatic:!1,onError:r})))))),null)}function fa(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 si=p.memo(ui);function ui({routes:e,manifest:t,future:r,state:a,isStatic:n,onError:o}){return Bo(e,void 0,{manifest:t,state:a,isStatic:n,onError:o})}function qi({to:e,replace:t,state:r,relative:a}){B(Ze(),"<Navigate> may be used only in the context of a <Router> component.");let{static:n}=p.useContext(Se);le(!n,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=p.useContext(_e),{pathname:i}=De(),u=pr(),s=Rt(e,jt(o),i,a==="path"),l=JSON.stringify(s);return p.useEffect(()=>{u(JSON.parse(l),{replace:t,state:r,relative:a})},[u,l,a,t,r]),null}function Xi(e){return Ho(e.context)}function ci({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:o=!1,useTransitions:i}){B(!Ze(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),s=p.useMemo(()=>({basename:u,navigator:n,static:o,useTransitions:i,future:{}}),[u,n,o,i]);typeof r=="string"&&(r=Ne(r));
4let{pathname:l="/",search:h="",hash:m="",state:R=null,key:g="default",mask:P}=r,C=p.useMemo(()=>{let b=Le(l,u);return b==null?null:{location:{pathname:b,search:h,hash:m,state:R,key:g,mask:P},navigationType:a}},[u,l,h,m,R,g,a,P]);return le(C!=null,`<Router basename="${u}"> is not able to match the URL "${l}${h}${m}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:p.createElement(Se.Provider,{value:s},p.createElement(It.Provider,{children:t,value:C}))}var At="get",Nt="application/x-www-form-urlencoded";function zt(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function fi(e){return zt(e)&&e.tagName.toLowerCase()==="button"}function di(e){return zt(e)&&e.tagName.toLowerCase()==="form"}function hi(e){return zt(e)&&e.tagName.toLowerCase()==="input"}function mi(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function pi(e,t){return e.button===0&&(!t||t==="_self")&&!mi(e)}function ir(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 yi(e,t){let r=ir(e);return t&&t.forEach((a,n)=>{r.has(n)||t.getAll(n).forEach(o=>{r.append(n,o)})}),r}var Ot=null;function vi(){if(Ot===null)try{new FormData(document.createElement("form"),0),Ot=!1}catch{Ot=!0}return Ot}var gi=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function tr(e){return e!=null&&!gi.has(e)?(le(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Nt}"`),null):e}function Ri(e,t){let r,a,n,o,i;if(di(e)){let u=e.getAttribute("action");a=u?Le(u,t):null,r=e.getAttribute("method")||At,n=tr(e.getAttribute("enctype"))||Nt,o=new FormData(e)}else if(fi(e)||hi(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||u.getAttribute("action");if(a=s?Le(s,t):null,r=e.getAttribute("formmethod")||u.getAttribute("method")||At,n=tr(e.getAttribute("formenctype"))||tr(u.getAttribute("enctype"))||Nt,o=new FormData(u,e),!vi()){let{name:l,type:h,value:m}=e;if(h==="image"){let R=l?`${l}.`:"";o.append(`${R}x`,"0"),o.append(`${R}y`,"0")}else l&&o.append(l,m)}}else{if(zt(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=At,a=null,n=Nt,i=e}return o&&n==="text/plain"&&(i=o,o=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:o,body:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function gr(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ja(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&&Le(n.pathname,t)==="/"?n.pathname=`${Ut(t)}/_root.${a}`:n.pathname=`${Ut(n.pathname)}.${a}`,n}async function wi(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 Ei(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 bi(e,t,r){let a=await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let i=await wi(o,r);return i.links?i.links():[]}return[]}));return xi(a.flat(1).filter(Ei).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function da(e,t,r,a,n,o){let i=(s,l)=>r[l]?s.route.id!==r[l].route.id:!0,u=(s,l)=>r[l].pathname!==s.pathname||r[l].route.path?.endsWith("*")&&r[l].params["*"]!==s.params["*"];return o==="assets"?t.filter((s,l)=>i(s,l)||u(s,l)):o==="data"?t.filter((s,l)=>{let h=a.routes[s.route.id];if(!h||!h.hasLoader)return!1;if(i(s,l)||u(s,l))return!0;
4if(s.route.shouldRevalidate){let m=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 m=="boolean")return m}return!0}):[]}function Si(e,t,{includeHydrateFallback:r}={}){return Pi(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 Pi(e){return[...new Set(e)]}function Ci(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function xi(e,t){let r=new Set;return new Set(t),e.reduce((a,n)=>{let o=JSON.stringify(Ci(n));return r.has(o)||(r.add(o),a.push({key:o,link:n})),a},[])}function Rr(){let e=p.useContext(Qe);return gr(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Li(){let e=p.useContext(bt);return gr(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var wr=p.createContext(void 0);wr.displayName="FrameworkContext";function Ht(){let e=p.useContext(wr);return gr(e,"You must render this element inside a <HydratedRouter> element"),e}function _i(e,t){let r=p.useContext(wr),[a,n]=p.useState(!1),[o,i]=p.useState(!1),{onFocus:u,onBlur:s,onMouseEnter:l,onMouseLeave:h,onTouchStart:m}=t,R=p.useRef(null);p.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let C=D=>{D.forEach(x=>{i(x.isIntersecting)})},b=new IntersectionObserver(C,{threshold:.5});return R.current&&b.observe(R.current),()=>{b.disconnect()}}},[e]),p.useEffect(()=>{if(a){let C=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(C)}}},[a]);let g=()=>{n(!0)},P=()=>{n(!1),i(!1)};return r?e!=="intent"?[o,R,{}]:[o,R,{onFocus:ft(u,g),onBlur:ft(s,P),onMouseEnter:ft(l,g),onMouseLeave:ft(h,P),onTouchStart:ft(m,g)}]:[!1,R,{}]}function ft(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Di({page:e,...t}){let r=za(),{nonce:a}=Ht(),{router:n}=Rr(),o=p.useMemo(()=>ga(n.routes,e,n.basename),[n.routes,e,n.basename]);return o?(t.nonce==null&&a&&(t={...t,nonce:a}),r?p.createElement(Mi,{page:e,matches:o,...t}):p.createElement(Oi,{page:e,matches:o,...t})):null}function Ti(e){let{manifest:t,routeModules:r}=Ht(),[a,n]=p.useState([]);return p.useEffect(()=>{let o=!1;return bi(e,t,r).then(i=>{o||n(i)}),()=>{o=!0}},[e,t,r]),a}function Mi({page:e,matches:t,...r}){let a=De(),{future:n}=Ht(),{basename:o}=Rr(),i=p.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let u=Ja(e,o,n.v8_trailingSlashAwareDataRequests,"rsc"),s=!1,l=[];for(let h of t)typeof h.route.shouldRevalidate=="function"?s=!0:l.push(h.route.id);return s&&l.length>0&&u.searchParams.set("_routes",l.join(",")),[u.pathname+u.search]},[o,n.v8_trailingSlashAwareDataRequests,e,a,t]);return p.createElement(p.Fragment,null,i.map(u=>p.createElement("link",{key:u,rel:"prefetch",as:"fetch",href:u,...r})))}function Oi({page:e,matches:t,...r}){let a=De(),{future:n,manifest:o,routeModules:i}=Ht(),{basename:u}=Rr(),{loaderData:s,matches:l}=Li(),h=p.useMemo(()=>da(e,t,l,o,a,"data"),[e,t,l,o,a]),m=p.useMemo(()=>da(e,t,l,o,a,"assets"),[e,t,l,o,a]),R=p.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let C=new Set,b=!1;if(t.forEach(x=>{let N=o.routes[x.route.id];!N||!N.hasLoader||(!h.some(V=>V.route.id===x.route.id)&&x.route.id in s&&i[x.route.id]?.shouldRevalidate||N.hasClientLoader?b=!0:C.add(x.route.id))}),C.size===0)return[];let D=Ja(e,u,n.v8_trailingSlashAwareDataRequests,"data");return b&&C.size>0&&D.searchParams.set("_routes",t.filter(x=>C.has(x.route.id)).map(x=>x.route.id).join(",")),[D.pathname+D.search]},[u,n.v8_trailingSlashAwareDataRequests,s,a,o,h,t,e,i]),g=p.useMemo(()=>Si(m,o),[m,o]),P=Ti(m);return p.createElement(p.Fragment,null,R.map(C=>p.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...r})),g.map(C=>p.createElement("link",{key:C,rel:"modulepreload",href:C,...r})),P.map(({key:C,link:b})=>p.createElement("link",{key:C,nonce:r.nonce,...b,crossOrigin:b.crossOrigin??r.crossOrigin})))}function ki(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Fi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Fi&&(window.__reactRouterVersion="7.18.2")}catch{}function Qi(e,t){return so({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:Pn({window:t?.window}),hydrationData:Ai(),routes:e,mapRouteProperties:ni,hydrationRouteProperties:oi,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.
4instrumentations}).initialize()}function Ai(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Ni(e.errors)}),e}function Ni(e){if(!e)return null;let t=Object.entries(e),r={};for(let[a,n]of t)if(n&&n.__type==="RouteErrorResponse")r[a]=new wt(n.status,n.statusText,n.data,n.internal===!0);else if(n&&n.__type==="Error"){if(typeof n.__subType=="string"&&Gn.includes(n.__subType)){let o=window[n.__subType];if(typeof o=="function")try{let i=new o(n.message);i.stack="",r[a]=i}catch{}}if(r[a]==null){let o=new Error(n.message);o.stack="",r[a]=o}}else r[a]=n;return r}var qa=p.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:n,reloadDocument:o,replace:i,mask:u,state:s,target:l,to:h,preventScrollReset:m,viewTransition:R,defaultShouldRevalidate:g,...P},C){let{basename:b,navigator:D,useTransitions:x}=p.useContext(Se),N=typeof h=="string"&&$t.test(h),V=xa(h,b);h=V.to;let z=Io(h,{relative:n}),re=De(),U=null;if(u){let ue=Rt(u,[],re.mask?re.mask.pathname:"/",!0);b!=="/"&&(ue.pathname=ue.pathname==="/"?b:xe([b,ue.pathname])),U=D.createHref(ue)}let[v,G,Z]=_i(a,P),se=Ii(h,{replace:i,mask:u,state:s,target:l,preventScrollReset:m,relative:n,viewTransition:R,defaultShouldRevalidate:g,useTransitions:x});function q(ue){t&&t(ue),ue.defaultPrevented||se(ue)}let de=!(V.isExternal||o),ae=p.createElement("a",{...P,...Z,href:(de?U:void 0)||V.absoluteURL||z,onClick:de?q:t,ref:ki(C,G),target:l,"data-discover":!N&&r==="render"?"true":void 0});return v&&!N?p.createElement(p.Fragment,null,ae,p.createElement(Di,{page:z})):ae});qa.displayName="Link";var Ui=p.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:n=!1,style:o,to:i,viewTransition:u,children:s,...l},h){let m=St(i,{relative:l.relative}),R=De(),g=p.useContext(bt),{navigator:P,basename:C}=p.useContext(Se),b=g!=null&&Yi(m)&&u===!0,D=P.encodeLocation?P.encodeLocation(m).pathname:m.pathname,x=R.pathname,N=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;r||(x=x.toLowerCase(),N=N?N.toLowerCase():null,D=D.toLowerCase()),N&&C&&(N=Le(N,C)||N);const V=D!=="/"&&D.endsWith("/")?D.length-1:D.length;let z=x===D||!n&&x.startsWith(D)&&x.charAt(V)==="/",re=N!=null&&(N===D||!n&&N.startsWith(D)&&N.charAt(D.length)==="/"),U={isActive:z,isPending:re,isTransitioning:b},v=z?t:void 0,G;typeof a=="function"?G=a(U):G=[a,z?"active":null,re?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let Z=typeof o=="function"?o(U):o;return p.createElement(qa,{...l,"aria-current":v,className:G,ref:h,style:Z,to:i,viewTransition:u},typeof s=="function"?s(U):s)});Ui.displayName="NavLink";var $i=p.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:n,state:o,method:i=At,action:u,onSubmit:s,relative:l,preventScrollReset:h,viewTransition:m,defaultShouldRevalidate:R,...g},P)=>{let{useTransitions:C}=p.useContext(Se),b=Bi(),D=Wi(u,{relative:l}),x=i.toLowerCase()==="get"?"get":"post",N=typeof u=="string"&&$t.test(u),V=z=>{if(s&&s(z),z.defaultPrevented)return;z.preventDefault();let re=z.nativeEvent.submitter,U=re?.getAttribute("formmethod")||i,v=()=>b(re||z.currentTarget,{fetcherKey:t,method:U,navigate:r,replace:n,state:o,relative:l,preventScrollReset:h,viewTransition:m,defaultShouldRevalidate:R});C&&r!==!1?p.startTransition(()=>v()):v()};return p.createElement("form",{ref:P,method:x,action:D,onSubmit:a?s:V,...g,"data-discover":!N&&e==="render"?"true":void 0})});$i.displayName="Form";function ji(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Xa(e){let t=p.useContext(Qe);return B(t,ji(e)),t}function Ii(e,{target:t,replace:r,mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:u,defaultShouldRevalidate:s,useTransitions:l}={}){let h=pr(),m=De(),R=St(e,{relative:i});return p.useCallback(g=>{if(pi(g,t)){g.preventDefault();let P=r!==void 0?r:Ae(m)===Ae(R),C=()=>h(e,{replace:P,mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:u,defaultShouldRevalidate:s});l?p.startTransition(()=>C()):C()}},[m,h,R,r,a,n,t,e,o,i,u,s,l])}function Zi(e){le(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=p.useRef(ir(e)),r=p.useRef(!1),a=De(),n=p.useMemo(()=>yi(a.search,r.current?null:t.current),[a.search]),o=pr(),i=p.useCallback((u,s)=>{const l=ir(typeof u=="function"?u(new URLSearchParams(n)):u);r.current=!0,o("?"+l,s)},[o,n]);return[n,i]}var zi=0,Hi=()=>`__${String(++zi)}__`;function Bi(){let{router:e}=Xa("useSubmit"),{basename:t}=p.useContext(Se),r=Qo(),a=e.fetch,n=e.navigate;return p.useCallback(async(o,i={})=>{let{action:u,method:s,encType:l,formData:h,body:m}=Ri(o,t);
4if(i.navigate===!1){let R=i.fetcherKey||Hi();await a(R,r,i.action||u,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:h,body:m,formMethod:i.method||s,formEncType:i.encType||l,flushSync:i.flushSync})}else await n(i.action||u,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:h,body:m,formMethod:i.method||s,formEncType:i.encType||l,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[a,n,t,r])}function Wi(e,{relative:t}={}){let{basename:r}=p.useContext(Se),a=p.useContext(_e);B(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),o={...St(e||".",{relative:t})},i=De();if(e==null){o.search=i.search;let u=new URLSearchParams(o.search),s=u.getAll("index");if(s.some(h=>h==="")){u.delete("index"),s.filter(m=>m).forEach(m=>u.append("index",m));let h=u.toString();o.search=h?`?${h}`:""}}return(!e||e===".")&&n.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:xe([r,o.pathname])),Ae(o)}function Yi(e,{relative:t}={}){let r=p.useContext(hr);B(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Xa("useViewTransitionState"),n=St(e,{relative:t});if(!r.isTransitioning)return!1;let o=Le(r.currentLocation.pathname,a)||r.currentLocation.pathname,i=Le(r.nextLocation.pathname,a)||r.nextLocation.pathname;return vt(n.pathname,i)!=null||vt(n.pathname,o)!=null}var Vi=En();function el(e){return p.createElement(li,{flushSync:Vi.flushSync,...e})}export{bn as G,qa as L,qi as N,Xi as O,el as R,Vi as a,ha as b,En as c,pr as d,Zi as e,Gi as f,gn as g,Qi as h,Ki as i,Ji as j,p as r,Sn as t,De as u};
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.