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