
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f7a0b46c-c6e2-545b-a1e5-f4e6dbf6d5e1")}catch(e){}}();
function Xr(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const l=Object.getOwnPropertyDescriptor(n,a);l&&Object.defineProperty(e,a,l.get?l:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Da=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pr={exports:{}},L={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Pt=Symbol.for("react.transitional.element"),Zr=Symbol.for("react.portal"),en=Symbol.for("react.fragment"),tn=Symbol.for("react.strict_mode"),rn=Symbol.for("react.profiler"),nn=Symbol.for("react.consumer"),an=Symbol.for("react.context"),on=Symbol.for("react.forward_ref"),ln=Symbol.for("react.suspense"),sn=Symbol.for("react.memo"),mr=Symbol.for("react.lazy"),Jt=Symbol.iterator;function un(e){return e===null||typeof e!="object"?null:(e=Jt&&e[Jt]||e["@@iterator"],typeof e=="function"?e:null)}var vr={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},gr=Object.assign,yr={};function Ue(e,t,r){this.props=e,this.context=t,this.refs=yr,this.updater=r||vr}Ue.prototype.isReactComponent={};Ue.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")};Ue.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function br(){}br.prototype=Ue.prototype;function xt(e,t,r){this.props=e,this.context=t,this.refs=yr,this.updater=r||vr}var St=xt.prototype=new br;St.constructor=xt;gr(St,Ue.prototype);St.isPureReactComponent=!0;var Vt=Array.isArray,F={H:null,A:null,T:null,S:null},Er=Object.prototype.hasOwnProperty;function Ct(e,t,r,n,a,l,o){return r=o.ref,{$$typeof:Pt,type:e,key:t,ref:r!==void 0?r:null,props:o}}function dn(e,t){return Ct(e.type,t,null,void 0,void 0,void 0,e.props)}function Dt(e){return typeof e=="object"&&e!==null&&e.$$typeof===Pt}function cn(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Gt=/\/+/g;function pt(e,t){return typeof e=="object"&&e!==null&&e.key!=null?cn(""+e.key):t.toString(36)}function qt(){}function fn(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(qt,qt):(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 je(e,t,r,n,a){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(l){case"bigint":case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Pt:case Zr:o=!0;break;case mr:return o=e._init,je(o(e._payload),t,r,n,a)}}if(o)return a=a(e),o=n===""?"."+pt(e,0):n,Vt(a)?(r="",o!=null&&(r=o.replace(Gt,"$&/")+"/"),je(a,t,r,"",function(g){return g})):a!=null&&(Dt(a)&&(a=dn(a,r+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(Gt,"$&/")+"/")+o)),t.push(a)),1;o=0;var d=n===""?".":n+":";if(Vt(e))for(var u=0;u<e.length;u++)n=e[u],l=d+pt(n,u),o+=je(n,t,r,l,a);else if(u=un(e),typeof u=="function")for(e=u.call(e),u=0;!(n=e.next()).done;)n=n.value,l=d+pt(n,u++),o+=je(n,t,r,l,a);else if(l==="object"){if(typeof e.then=="function")return je(fn(e),t,r,n,a);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 o}function st(e,t,r){if(e==null)return e;var n=[],a=0;return je(e,n,"","",function(l){return t.call(r,l,a++)}),n}function hn(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 Xt=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 pn(){}L.Children={map:st,forEach:function(e,t,r){st(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return st(e,function(){t++}),t},toArray:function(e){return st(e,function(t){return t})||[]},only:function(e){if(!Dt(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};L.Component=Ue;L.Fragment=en;L.Profiler=rn;L.PureComponent=xt;L.StrictMode=tn;L.Suspense=ln;L.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F;L.act=function(){throw Error("act(...) is not supported in production builds of React.")};L.cache=function(e){return function(){return e.apply(null,arguments)}};L.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var n=gr({},e.props),a=e.key,l=void 0;if(t!=null)for(o in t.ref!==void 0&&(l=void 0),t.key!==void 0&&(a=""+t.key),t)!Er.call(t,o)||o==="key"||o==="__self"||o==="__source"||o==="ref"&&t.ref===void 0||(n[o]=t[o]);var o=arguments.length-2;if(o===1)n.children=r;else if(1<o){for(var d=Array(o),u=0;u<o;u++)d[u]=arguments[u+2];n.children=d}return Ct(e.type,a,null,void 0,void 0,l,n)};L.createContext=function(e){return e={$$typeof:an,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:nn,_context:e},e};L.createElement=function(e,t,r){var n,a={},l=null;if(t!=null)for(n in t.key!==void 0&&(l=""+t.key),t)Er.call(t,n)&&n!=="key"&&n!=="__self"&&n!=="__source"&&(a[n]=t[n]);var o=arguments.length-2;if(o===1)a.children=r;else if(1<o){for(var d=Array(o),u=0;u<o;u++)d[u]=arguments[u+2];a.children=d}if(e&&e.defaultProps)for(n in o=e.defaultProps,o)a[n]===void 0&&(a[n]=o[n]);return Ct(e,l,null,void 0,void 0,null,a)};L.createRef=function(){return{current:null}};L.forwardRef=function(e){return{$$typeof:on,render:e}};L.isValidElement=Dt;L.lazy=function(e){return{$$typeof:mr,_payload:{_status:-1,_result:e},_init:hn}};L.memo=function(e,t){return{$$typeof:sn,type:e,compare:t===void 0?null:t}};L.startTransition=function(e){var t=F.T,r={};F.T=r;try{var n=e(),a=F.S;a!==null&&a(r,n),typeof n=="object"&&n!==null&&typeof n.then=="function"&&n.then(pn,Xt)}catch(l){Xt(l)}finally{F.T=t}};L.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()};L.use=function(e){return F.H.use(e)};L.useActionState=function(e,t,r){return F.H.useActionState(e,t,r)};L.useCallback=function(e,t){return F.H.useCallback(e,t)};L.useContext=function(e){return F.H.useContext(e)};L.useDebugValue=function(){};L.useDeferredValue=function(e,t){return F.H.useDeferredValue(e,t)};L.useEffect=function(e,t){return F.H.useEffect(e,t)};L.useId=function(){return F.H.useId()};L.useImperativeHandle=function(e,t,r){return F.H.useImperativeHandle(e,t,r)};L.useInsertionEffect=function(e,t){return F.H.useInsertionEffect(e,t)};L.useLayoutEffect=function(e,t){return F.H.useLayoutEffect(e,t)};L.useMemo=function(e,t){return F.H.useMemo(e,t)};L.useOptimistic=function(e,t){return F.H.useOptimistic(e,t)};L.useReducer=function(e,t,r){return F.H.useReducer(e,t,r)};L.useRef=function(e){return F.H.useRef(e)};L.useState=function(e){return F.H.useState(e)};L.useSyncExternalStore=function(e,t,r){return F.H.useSyncExternalStore(e,t,r)};L.useTransition=function(){return F.H.useTransition()};L.version="19.0.0-rc-fb9a90fa48-20240614";pr.exports=L;var y=pr.exports;const mn=Qr(y),_a=Xr({__proto__:null,default:mn},[y]);/**
 * @remix-run/router v1.16.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},N.apply(this,arguments)}var $;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})($||($={}));const Qt="popstate";function La(e){e===void 0&&(e={});function t(n,a){let{pathname:l,search:o,hash:d}=n.location;return Ge("",{pathname:l,search:o,hash:d},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:qe(a)}return gn(t,r,null,e)}function M(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ae(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function vn(){return Math.random().toString(36).substr(2,8)}function Zt(e,t){return{usr:e.state,key:e.key,idx:t}}function Ge(e,t,r,n){return r===void 0&&(r=null),N({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?be(t):t,{state:r,key:t&&t.key||n||vn()})}function qe(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function be(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function gn(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:l=!1}=n,o=a.history,d=$.Pop,u=null,g=h();g==null&&(g=0,o.replaceState(N({},o.state,{idx:g}),""));function h(){return(o.state||{idx:null}).idx}function p(){d=$.Pop;let D=h(),O=D==null?null:D-g;g=D,u&&u({action:d,location:w.location,delta:O})}function v(D,O){d=$.Push;let B=Ge(w.location,D,O);g=h()+1;let z=Zt(B,g),pe=w.createHref(B);try{o.pushState(z,"",pe)}catch(ie){if(ie instanceof DOMException&&ie.name==="DataCloneError")throw ie;a.location.assign(pe)}l&&u&&u({action:d,location:w.location,delta:1})}function T(D,O){d=$.Replace;let B=Ge(w.location,D,O);g=h();let z=Zt(B,g),pe=w.createHref(B);o.replaceState(z,"",pe),l&&u&&u({action:d,location:w.location,delta:0})}function x(D){let O=a.location.origin!=="null"?a.location.origin:a.location.href,B=typeof D=="string"?D:qe(D);return B=B.replace(/ $/,"%20"),M(O,"No window.location.(origin|href) available to create URL for href: "+B),new URL(B,O)}let w={get action(){return d},get location(){return e(a,o)},listen(D){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(Qt,p),u=D,()=>{a.removeEventListener(Qt,p),u=null}},createHref(D){return t(a,D)},createURL:x,encodeLocation(D){let O=x(D);return{pathname:O.pathname,search:O.search,hash:O.hash}},push:v,replace:T,go(D){return o.go(D)}};return w}var I;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(I||(I={}));const yn=new Set(["lazy","caseSensitive","path","id","index","children"]);function bn(e){return e.index===!0}function yt(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,l)=>{let o=[...r,l],d=typeof a.id=="string"?a.id:o.join("-");if(M(a.index!==!0||!a.children,"Cannot specify children on an index route"),M(!n[d],'Found a route id collision on id "'+d+`".  Route id's must be globally unique within Data Router usages`),bn(a)){let u=N({},a,t(a),{id:d});return n[d]=u,u}else{let u=N({},a,t(a),{id:d,children:void 0});return n[d]=u,a.children&&(u.children=yt(a.children,t,o,n)),u}})}function Oe(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?be(t):t,a=Xe(n.pathname||"/",r);if(a==null)return null;let l=Rr(e);En(l);let o=null;for(let d=0;o==null&&d<l.length;++d){let u=jn(a);o=Ln(l[d],u)}return o}function wr(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}function Rr(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(l,o,d)=>{let u={relativePath:d===void 0?l.path||"":d,caseSensitive:l.caseSensitive===!0,childrenIndex:o,route:l};u.relativePath.startsWith("/")&&(M(u.relativePath.startsWith(n),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(n.length));let g=fe([n,u.relativePath]),h=r.concat(u);l.children&&l.children.length>0&&(M(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),Rr(l.children,t,h,g)),!(l.path==null&&!l.index)&&t.push({path:g,score:Dn(g,l.index),routesMeta:h})};return e.forEach((l,o)=>{var d;if(l.path===""||!((d=l.path)!=null&&d.includes("?")))a(l,o);else for(let u of Pr(l.path))a(l,o,u)}),t}function Pr(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),l=r.replace(/\?$/,"");if(n.length===0)return a?[l,""]:[l];let o=Pr(n.join("/")),d=[];return d.push(...o.map(u=>u===""?l:[l,u].join("/"))),a&&d.push(...o),d.map(u=>e.startsWith("/")&&u===""?"/":u)}function En(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:_n(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const wn=/^:[\w-]+$/,Rn=3,Pn=2,xn=1,Sn=10,Cn=-2,er=e=>e==="*";function Dn(e,t){let r=e.split("/"),n=r.length;return r.some(er)&&(n+=Cn),t&&(n+=Pn),r.filter(a=>!er(a)).reduce((a,l)=>a+(wn.test(l)?Rn:l===""?xn:Sn),n)}function _n(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function Ln(e,t){let{routesMeta:r}=e,n={},a="/",l=[];for(let o=0;o<r.length;++o){let d=r[o],u=o===r.length-1,g=a==="/"?t:t.slice(a.length)||"/",h=Mn({path:d.relativePath,caseSensitive:d.caseSensitive,end:u},g);if(!h)return null;Object.assign(n,h.params);let p=d.route;l.push({params:n,pathname:fe([a,h.pathname]),pathnameBase:Un(fe([a,h.pathnameBase])),route:p}),h.pathnameBase!=="/"&&(a=fe([a,h.pathnameBase]))}return l}function Mn(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Tn(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let l=a[0],o=l.replace(/(.)\/+$/,"$1"),d=a.slice(1);return{params:n.reduce((g,h,p)=>{let{paramName:v,isOptional:T}=h;if(v==="*"){let w=d[p]||"";o=l.slice(0,l.length-w.length).replace(/(.)\/+$/,"$1")}const x=d[p];return T&&!x?g[v]=void 0:g[v]=(x||"").replace(/%2F/g,"/"),g},{}),pathname:l,pathnameBase:o,pattern:e}}function Tn(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Ae(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,d,u)=>(n.push({paramName:d,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function jn(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ae(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Xe(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function On(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?be(e):e;return{pathname:r?r.startsWith("/")?r:An(r,t):t,search:Nn(n),hash:In(a)}}function An(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function mt(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"].  Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function xr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function _t(e,t){let r=xr(e);return t?r.map((n,a)=>a===e.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Lt(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=be(e):(a=N({},e),M(!a.pathname||!a.pathname.includes("?"),mt("?","pathname","search",a)),M(!a.pathname||!a.pathname.includes("#"),mt("#","pathname","hash",a)),M(!a.search||!a.search.includes("#"),mt("#","search","hash",a)));let l=e===""||a.pathname==="",o=l?"/":a.pathname,d;if(o==null)d=r;else{let p=t.length-1;if(!n&&o.startsWith("..")){let v=o.split("/");for(;v[0]==="..";)v.shift(),p-=1;a.pathname=v.join("/")}d=p>=0?t[p]:"/"}let u=On(a,d),g=o&&o!=="/"&&o.endsWith("/"),h=(l||o===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(g||h)&&(u.pathname+="/"),u}const fe=e=>e.join("/").replace(/\/\/+/g,"/"),Un=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Nn=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,In=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class bt extends Error{}class Ma{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],M(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((l,o)=>n=o),this.controller=new AbortController;let a=()=>n(new bt("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((l,o)=>{let[d,u]=o;return Object.assign(l,{[d]:this.trackPromise(d,u)})},{}),this.done&&this.unlistenAbortSignal(),this.init=r}trackPromise(t,r){if(!(r instanceof Promise))return r;this.deferredKeys.push(t),this.pendingKeysSet.add(t);let n=Promise.race([r,this.abortPromise]).then(a=>this.onSettle(n,t,void 0,a),a=>this.onSettle(n,t,a));return n.catch(()=>{}),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(t,r,n,a){if(this.controller.signal.aborted&&n instanceof bt)return this.unlistenAbortSignal(),Object.defineProperty(t,"_error",{get:()=>n}),Promise.reject(n);if(this.pendingKeysSet.delete(r),this.done&&this.unlistenAbortSignal(),n===void 0&&a===void 0){let l=new Error('Deferred data for key "'+r+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(t,"_error",{get:()=>l}),this.emit(!1,r),Promise.reject(l)}return a===void 0?(Object.defineProperty(t,"_error",{get:()=>n}),this.emit(!1,r),Promise.reject(n)):(Object.defineProperty(t,"_data",{get:()=>a}),this.emit(!1,r),a)}emit(t,r){this.subscribers.forEach(n=>n(t,r))}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((t,r)=>this.pendingKeysSet.delete(r)),this.emit(!0)}async resolveData(t){let r=!1;if(!this.done){let n=()=>this.cancel();t.addEventListener("abort",n),r=await new Promise(a=>{this.subscribe(l=>{t.removeEventListener("abort",n),(l||this.done)&&a(l)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return M(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((t,r)=>{let[n,a]=r;return Object.assign(t,{[n]:Bn(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function Fn(e){return e instanceof Promise&&e._tracked===!0}function Bn(e){if(!Fn(e))return e;if(e._error)throw e._error;return e._data}const Ta=function(t,r){r===void 0&&(r=302);let n=r;typeof n=="number"?n={status:n}:typeof n.status>"u"&&(n.status=302);let a=new Headers(n.headers);return a.set("Location",t),new Response(null,N({},n,{headers:a}))};class Sr{constructor(t,r,n,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function Mt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Cr=["post","put","patch","delete"],zn=new Set(Cr),Hn=["get",...Cr],kn=new Set(Hn),$n=new Set([301,302,303,307,308]),Kn=new Set([307,308]),vt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Yn={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},We={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Tt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Wn=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Dr="remix-router-transitions";function ja(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",n=!r;M(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let i=e.detectErrorBoundary;a=s=>({hasErrorBoundary:i(s)})}else a=Wn;let l={},o=yt(e.routes,a,void 0,l),d,u=e.basename||"/",g=e.unstable_dataStrategy||qn,h=N({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),p=null,v=new Set,T=null,x=null,w=null,D=e.hydrationData!=null,O=Oe(o,e.history.location,u),B=null;if(O==null){let i=re(404,{pathname:e.history.location.pathname}),{matches:s,route:c}=dr(o);O=s,B={[c.id]:i}}let z,pe=O.some(i=>i.route.lazy),ie=O.some(i=>i.route.loader);if(pe)z=!1;else if(!ie)z=!0;else if(h.v7_partialHydration){let i=e.hydrationData?e.hydrationData.loaderData:null,s=e.hydrationData?e.hydrationData.errors:null,c=m=>m.route.loader?typeof m.route.loader=="function"&&m.route.loader.hydrate===!0?!1:i&&i[m.route.id]!==void 0||s&&s[m.route.id]!==void 0:!0;if(s){let m=O.findIndex(b=>s[b.route.id]!==void 0);z=O.slice(0,m+1).every(c)}else z=O.every(c)}else z=e.hydrationData!=null;let Se,f={historyAction:e.history.action,location:e.history.location,matches:O,initialized:z,navigation:vt,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||B,fetchers:new Map,blockers:new Map},G=$.Pop,H=!1,A,q=!1,X=new Map,se=null,Z=!1,ue=!1,et=[],tt=[],k=new Map,rt=0,Fe=-1,Ce=new Map,de=new Set,De=new Map,Be=new Map,ce=new Set,Ee=new Map,we=new Map,ct=!1;function Nr(){if(p=e.history.listen(i=>{let{action:s,location:c,delta:m}=i;if(ct){ct=!1;return}Ae(we.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 b=$t({currentLocation:f.location,nextLocation:c,historyAction:s});if(b&&m!=null){ct=!0,e.history.go(m*-1),at(b,{state:"blocked",location:c,proceed(){at(b,{state:"proceeding",proceed:void 0,reset:void 0,location:c}),e.history.go(m)},reset(){let C=new Map(f.blockers);C.set(b,We),Q({blockers:C})}});return}return Re(s,c)}),r){sa(t,X);let i=()=>ua(t,X);t.addEventListener("pagehide",i),se=()=>t.removeEventListener("pagehide",i)}return f.initialized||Re($.Pop,f.location,{initialHydration:!0}),Se}function Ir(){p&&p(),se&&se(),v.clear(),A&&A.abort(),f.fetchers.forEach((i,s)=>nt(s)),f.blockers.forEach((i,s)=>kt(s))}function Fr(i){return v.add(i),()=>v.delete(i)}function Q(i,s){s===void 0&&(s={}),f=N({},f,i);let c=[],m=[];h.v7_fetcherPersist&&f.fetchers.forEach((b,C)=>{b.state==="idle"&&(ce.has(C)?m.push(C):c.push(C))}),[...v].forEach(b=>b(f,{deletedFetchers:m,unstable_viewTransitionOpts:s.viewTransitionOpts,unstable_flushSync:s.flushSync===!0})),h.v7_fetcherPersist&&(c.forEach(b=>f.fetchers.delete(b)),m.forEach(b=>nt(b)))}function ze(i,s,c){var m,b;let{flushSync:C}=c===void 0?{}:c,R=f.actionData!=null&&f.navigation.formMethod!=null&&oe(f.navigation.formMethod)&&f.navigation.state==="loading"&&((m=i.state)==null?void 0:m._isRedirect)!==!0,E;s.actionData?Object.keys(s.actionData).length>0?E=s.actionData:E=null:R?E=f.actionData:E=null;let _=s.loaderData?sr(f.loaderData,s.loaderData,s.matches||[],s.errors):f.loaderData,S=f.blockers;S.size>0&&(S=new Map(S),S.forEach((P,U)=>S.set(U,We)));let Y=H===!0||f.navigation.formMethod!=null&&oe(f.navigation.formMethod)&&((b=i.state)==null?void 0:b._isRedirect)!==!0;d&&(o=d,d=void 0),Z||G===$.Pop||(G===$.Push?e.history.push(i,i.state):G===$.Replace&&e.history.replace(i,i.state));let W;if(G===$.Pop){let P=X.get(f.location.pathname);P&&P.has(i.pathname)?W={currentLocation:f.location,nextLocation:i}:X.has(i.pathname)&&(W={currentLocation:i,nextLocation:f.location})}else if(q){let P=X.get(f.location.pathname);P?P.add(i.pathname):(P=new Set([i.pathname]),X.set(f.location.pathname,P)),W={currentLocation:f.location,nextLocation:i}}Q(N({},s,{actionData:E,loaderData:_,historyAction:G,location:i,initialized:!0,navigation:vt,revalidation:"idle",restoreScrollPosition:Yt(i,s.matches||f.matches),preventScrollReset:Y,blockers:S}),{viewTransitionOpts:W,flushSync:C===!0}),G=$.Pop,H=!1,q=!1,Z=!1,ue=!1,et=[],tt=[]}async function Nt(i,s){if(typeof i=="number"){e.history.go(i);return}let c=Et(f.location,f.matches,u,h.v7_prependBasename,i,h.v7_relativeSplatPath,s?.fromRouteId,s?.relative),{path:m,submission:b,error:C}=tr(h.v7_normalizeFormMethod,!1,c,s),R=f.location,E=Ge(f.location,m,s&&s.state);E=N({},E,e.history.encodeLocation(E));let _=s&&s.replace!=null?s.replace:void 0,S=$.Push;_===!0?S=$.Replace:_===!1||b!=null&&oe(b.formMethod)&&b.formAction===f.location.pathname+f.location.search&&(S=$.Replace);let Y=s&&"preventScrollReset"in s?s.preventScrollReset===!0:void 0,W=(s&&s.unstable_flushSync)===!0,P=$t({currentLocation:R,nextLocation:E,historyAction:S});if(P){at(P,{state:"blocked",location:E,proceed(){at(P,{state:"proceeding",proceed:void 0,reset:void 0,location:E}),Nt(i,s)},reset(){let U=new Map(f.blockers);U.set(P,We),Q({blockers:U})}});return}return await Re(S,E,{submission:b,pendingError:C,preventScrollReset:Y,replace:s&&s.replace,enableViewTransition:s&&s.unstable_viewTransition,flushSync:W})}function Br(){if(ft(),Q({revalidation:"loading"}),f.navigation.state!=="submitting"){if(f.navigation.state==="idle"){Re(f.historyAction,f.location,{startUninterruptedRevalidation:!0});return}Re(G||f.historyAction,f.navigation.location,{overrideNavigation:f.navigation})}}async function Re(i,s,c){A&&A.abort(),A=null,G=i,Z=(c&&c.startUninterruptedRevalidation)===!0,Vr(f.location,f.matches),H=(c&&c.preventScrollReset)===!0,q=(c&&c.enableViewTransition)===!0;let m=d||o,b=c&&c.overrideNavigation,C=Oe(m,s,u),R=(c&&c.flushSync)===!0;if(!C){let P=re(404,{pathname:s.pathname}),{matches:U,route:K}=dr(m);ht(),ze(s,{matches:U,loaderData:{},errors:{[K.id]:P}},{flushSync:R});return}if(f.initialized&&!ue&&ra(f.location,s)&&!(c&&c.submission&&oe(c.submission.formMethod))){ze(s,{matches:C},{flushSync:R});return}A=new AbortController;let E=Te(e.history,s,A.signal,c&&c.submission),_;if(c&&c.pendingError)_=[Ve(C).route.id,{type:I.error,error:c.pendingError}];else if(c&&c.submission&&oe(c.submission.formMethod)){let P=await zr(E,s,c.submission,C,{replace:c.replace,flushSync:R});if(P.shortCircuited)return;_=P.pendingActionResult,b=gt(s,c.submission),R=!1,E=Te(e.history,E.url,E.signal)}let{shortCircuited:S,loaderData:Y,errors:W}=await Hr(E,s,C,b,c&&c.submission,c&&c.fetcherSubmission,c&&c.replace,c&&c.initialHydration===!0,R,_);S||(A=null,ze(s,N({matches:C},ur(_),{loaderData:Y,errors:W})))}async function zr(i,s,c,m,b){b===void 0&&(b={}),ft();let C=ia(s,c);Q({navigation:C},{flushSync:b.flushSync===!0});let R,E=Rt(m,s);if(!E.route.action&&!E.route.lazy)R={type:I.error,error:re(405,{method:i.method,pathname:s.pathname,routeId:E.route.id})};else if(R=(await ke("action",i,[E],m))[0],i.signal.aborted)return{shortCircuited:!0};if(xe(R)){let _;return b&&b.replace!=null?_=b.replace:_=or(R.response.headers.get("Location"),new URL(i.url),u)===f.location.pathname+f.location.search,await He(i,R,{submission:c,replace:_}),{shortCircuited:!0}}if(Pe(R))throw re(400,{type:"defer-action"});if(ne(R)){let _=Ve(m,E.route.id);return(b&&b.replace)!==!0&&(G=$.Push),{pendingActionResult:[_.route.id,R]}}return{pendingActionResult:[E.route.id,R]}}async function Hr(i,s,c,m,b,C,R,E,_,S){let Y=m||gt(s,b),W=b||C||hr(Y),P=d||o,[U,K]=rr(e.history,f,c,W,s,h.v7_partialHydration&&E===!0,h.unstable_skipActionErrorRevalidation,ue,et,tt,ce,De,de,P,u,S);if(ht(j=>!(c&&c.some(V=>V.route.id===j))||U&&U.some(V=>V.route.id===j)),Fe=++rt,U.length===0&&K.length===0){let j=zt();return ze(s,N({matches:c,loaderData:{},errors:S&&ne(S[1])?{[S[0]]:S[1].error}:null},ur(S),j?{fetchers:new Map(f.fetchers)}:{}),{flushSync:_}),{shortCircuited:!0}}if(!Z&&(!h.v7_partialHydration||!E)){K.forEach(V=>{let ee=f.fetchers.get(V.key),J=Je(void 0,ee?ee.data:void 0);f.fetchers.set(V.key,J)});let j;S&&!ne(S[1])?j={[S[0]]:S[1].data}:f.actionData&&(Object.keys(f.actionData).length===0?j=null:j=f.actionData),Q(N({navigation:Y},j!==void 0?{actionData:j}:{},K.length>0?{fetchers:new Map(f.fetchers)}:{}),{flushSync:_})}K.forEach(j=>{k.has(j.key)&&ve(j.key),j.controller&&k.set(j.key,j.controller)});let Ke=()=>K.forEach(j=>ve(j.key));A&&A.signal.addEventListener("abort",Ke);let{loaderResults:ge,fetcherResults:_e}=await It(f.matches,c,U,K,i);if(i.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener("abort",Ke),K.forEach(j=>k.delete(j.key));let Le=cr([...ge,..._e]);if(Le){if(Le.idx>=U.length){let j=K[Le.idx-U.length].key;de.add(j)}return await He(i,Le.result,{replace:R}),{shortCircuited:!0}}let{loaderData:Me,errors:le}=lr(f,c,U,ge,S,K,_e,Ee);Ee.forEach((j,V)=>{j.subscribe(ee=>{(ee||j.done)&&Ee.delete(V)})}),h.v7_partialHydration&&E&&f.errors&&Object.entries(f.errors).filter(j=>{let[V]=j;return!U.some(ee=>ee.route.id===V)}).forEach(j=>{let[V,ee]=j;le=Object.assign(le||{},{[V]:ee})});let ot=zt(),it=Ht(Fe),lt=ot||it||K.length>0;return N({loaderData:Me,errors:le},lt?{fetchers:new Map(f.fetchers)}:{})}function kr(i,s,c,m){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");k.has(i)&&ve(i);let b=(m&&m.unstable_flushSync)===!0,C=d||o,R=Et(f.location,f.matches,u,h.v7_prependBasename,c,h.v7_relativeSplatPath,s,m?.relative),E=Oe(C,R,u);if(!E){$e(i,s,re(404,{pathname:R}),{flushSync:b});return}let{path:_,submission:S,error:Y}=tr(h.v7_normalizeFormMethod,!0,R,m);if(Y){$e(i,s,Y,{flushSync:b});return}let W=Rt(E,_);if(H=(m&&m.preventScrollReset)===!0,S&&oe(S.formMethod)){$r(i,s,_,W,E,b,S);return}De.set(i,{routeId:s,path:_}),Kr(i,s,_,W,E,b,S)}async function $r(i,s,c,m,b,C,R){if(ft(),De.delete(i),!m.route.action&&!m.route.lazy){let J=re(405,{method:R.formMethod,pathname:c,routeId:s});$e(i,s,J,{flushSync:C});return}let E=f.fetchers.get(i);me(i,la(R,E),{flushSync:C});let _=new AbortController,S=Te(e.history,c,_.signal,R);k.set(i,_);let Y=rt,P=(await ke("action",S,[m],b))[0];if(S.signal.aborted){k.get(i)===_&&k.delete(i);return}if(h.v7_fetcherPersist&&ce.has(i)){if(xe(P)||ne(P)){me(i,ye(void 0));return}}else{if(xe(P))if(k.delete(i),Fe>Y){me(i,ye(void 0));return}else return de.add(i),me(i,Je(R)),He(S,P,{fetcherSubmission:R});if(ne(P)){$e(i,s,P.error);return}}if(Pe(P))throw re(400,{type:"defer-action"});let U=f.navigation.location||f.location,K=Te(e.history,U,_.signal),Ke=d||o,ge=f.navigation.state!=="idle"?Oe(Ke,f.navigation.location,u):f.matches;M(ge,"Didn't find any matches after fetcher action");let _e=++rt;Ce.set(i,_e);let Le=Je(R,P.data);f.fetchers.set(i,Le);let[Me,le]=rr(e.history,f,ge,R,U,!1,h.unstable_skipActionErrorRevalidation,ue,et,tt,ce,De,de,Ke,u,[m.route.id,P]);le.filter(J=>J.key!==i).forEach(J=>{let Ye=J.key,Wt=f.fetchers.get(Ye),qr=Je(void 0,Wt?Wt.data:void 0);f.fetchers.set(Ye,qr),k.has(Ye)&&ve(Ye),J.controller&&k.set(Ye,J.controller)}),Q({fetchers:new Map(f.fetchers)});let ot=()=>le.forEach(J=>ve(J.key));_.signal.addEventListener("abort",ot);let{loaderResults:it,fetcherResults:lt}=await It(f.matches,ge,Me,le,K);if(_.signal.aborted)return;_.signal.removeEventListener("abort",ot),Ce.delete(i),k.delete(i),le.forEach(J=>k.delete(J.key));let j=cr([...it,...lt]);if(j){if(j.idx>=Me.length){let J=le[j.idx-Me.length].key;de.add(J)}return He(K,j.result)}let{loaderData:V,errors:ee}=lr(f,f.matches,Me,it,void 0,le,lt,Ee);if(f.fetchers.has(i)){let J=ye(P.data);f.fetchers.set(i,J)}Ht(_e),f.navigation.state==="loading"&&_e>Fe?(M(G,"Expected pending action"),A&&A.abort(),ze(f.navigation.location,{matches:ge,loaderData:V,errors:ee,fetchers:new Map(f.fetchers)})):(Q({errors:ee,loaderData:sr(f.loaderData,V,ge,ee),fetchers:new Map(f.fetchers)}),ue=!1)}async function Kr(i,s,c,m,b,C,R){let E=f.fetchers.get(i);me(i,Je(R,E?E.data:void 0),{flushSync:C});let _=new AbortController,S=Te(e.history,c,_.signal);k.set(i,_);let Y=rt,P=(await ke("loader",S,[m],b))[0];if(Pe(P)&&(P=await Tr(P,S.signal,!0)||P),k.get(i)===_&&k.delete(i),!S.signal.aborted){if(ce.has(i)){me(i,ye(void 0));return}if(xe(P))if(Fe>Y){me(i,ye(void 0));return}else{de.add(i),await He(S,P);return}if(ne(P)){$e(i,s,P.error);return}M(!Pe(P),"Unhandled fetcher deferred data"),me(i,ye(P.data))}}async function He(i,s,c){let{submission:m,fetcherSubmission:b,replace:C}=c===void 0?{}:c;s.response.headers.has("X-Remix-Revalidate")&&(ue=!0);let R=s.response.headers.get("Location");M(R,"Expected a Location header on the redirect Response"),R=or(R,new URL(i.url),u);let E=Ge(f.location,R,{_isRedirect:!0});if(r){let U=!1;if(s.response.headers.has("X-Remix-Reload-Document"))U=!0;else if(Tt.test(R)){const K=e.history.createURL(R);U=K.origin!==t.location.origin||Xe(K.pathname,u)==null}if(U){C?t.location.replace(R):t.location.assign(R);return}}A=null;let _=C===!0?$.Replace:$.Push,{formMethod:S,formAction:Y,formEncType:W}=f.navigation;!m&&!b&&S&&Y&&W&&(m=hr(f.navigation));let P=m||b;if(Kn.has(s.response.status)&&P&&oe(P.formMethod))await Re(_,E,{submission:N({},P,{formAction:R}),preventScrollReset:H});else{let U=gt(E,m);await Re(_,E,{overrideNavigation:U,fetcherSubmission:b,preventScrollReset:H})}}async function ke(i,s,c,m){try{let b=await Xn(g,i,s,c,m,l,a);return await Promise.all(b.map((C,R)=>{if(na(C)){let E=C.result;return{type:I.redirect,response:ea(E,s,c[R].route.id,m,u,h.v7_relativeSplatPath)}}return Zn(C)}))}catch(b){return c.map(()=>({type:I.error,error:b}))}}async function It(i,s,c,m,b){let[C,...R]=await Promise.all([c.length?ke("loader",b,c,s):[],...m.map(E=>{if(E.matches&&E.match&&E.controller){let _=Te(e.history,E.path,E.controller.signal);return ke("loader",_,[E.match],E.matches).then(S=>S[0])}else return Promise.resolve({type:I.error,error:re(404,{pathname:E.path})})})]);return await Promise.all([fr(i,c,C,C.map(()=>b.signal),!1,f.loaderData),fr(i,m.map(E=>E.match),R,m.map(E=>E.controller?E.controller.signal:null),!0)]),{loaderResults:C,fetcherResults:R}}function ft(){ue=!0,et.push(...ht()),De.forEach((i,s)=>{k.has(s)&&(tt.push(s),ve(s))})}function me(i,s,c){c===void 0&&(c={}),f.fetchers.set(i,s),Q({fetchers:new Map(f.fetchers)},{flushSync:(c&&c.flushSync)===!0})}function $e(i,s,c,m){m===void 0&&(m={});let b=Ve(f.matches,s);nt(i),Q({errors:{[b.route.id]:c},fetchers:new Map(f.fetchers)},{flushSync:(m&&m.flushSync)===!0})}function Ft(i){return h.v7_fetcherPersist&&(Be.set(i,(Be.get(i)||0)+1),ce.has(i)&&ce.delete(i)),f.fetchers.get(i)||Yn}function nt(i){let s=f.fetchers.get(i);k.has(i)&&!(s&&s.state==="loading"&&Ce.has(i))&&ve(i),De.delete(i),Ce.delete(i),de.delete(i),ce.delete(i),f.fetchers.delete(i)}function Yr(i){if(h.v7_fetcherPersist){let s=(Be.get(i)||0)-1;s<=0?(Be.delete(i),ce.add(i)):Be.set(i,s)}else nt(i);Q({fetchers:new Map(f.fetchers)})}function ve(i){let s=k.get(i);M(s,"Expected fetch controller: "+i),s.abort(),k.delete(i)}function Bt(i){for(let s of i){let c=Ft(s),m=ye(c.data);f.fetchers.set(s,m)}}function zt(){let i=[],s=!1;for(let c of de){let m=f.fetchers.get(c);M(m,"Expected fetcher: "+c),m.state==="loading"&&(de.delete(c),i.push(c),s=!0)}return Bt(i),s}function Ht(i){let s=[];for(let[c,m]of Ce)if(m<i){let b=f.fetchers.get(c);M(b,"Expected fetcher: "+c),b.state==="loading"&&(ve(c),Ce.delete(c),s.push(c))}return Bt(s),s.length>0}function Wr(i,s){let c=f.blockers.get(i)||We;return we.get(i)!==s&&we.set(i,s),c}function kt(i){f.blockers.delete(i),we.delete(i)}function at(i,s){let c=f.blockers.get(i)||We;M(c.state==="unblocked"&&s.state==="blocked"||c.state==="blocked"&&s.state==="blocked"||c.state==="blocked"&&s.state==="proceeding"||c.state==="blocked"&&s.state==="unblocked"||c.state==="proceeding"&&s.state==="unblocked","Invalid blocker state transition: "+c.state+" -> "+s.state);let m=new Map(f.blockers);m.set(i,s),Q({blockers:m})}function $t(i){let{currentLocation:s,nextLocation:c,historyAction:m}=i;if(we.size===0)return;we.size>1&&Ae(!1,"A router only supports one blocker at a time");let b=Array.from(we.entries()),[C,R]=b[b.length-1],E=f.blockers.get(C);if(!(E&&E.state==="proceeding")&&R({currentLocation:s,nextLocation:c,historyAction:m}))return C}function ht(i){let s=[];return Ee.forEach((c,m)=>{(!i||i(m))&&(c.cancel(),s.push(m),Ee.delete(m))}),s}function Jr(i,s,c){if(T=i,w=s,x=c||null,!D&&f.navigation===vt){D=!0;let m=Yt(f.location,f.matches);m!=null&&Q({restoreScrollPosition:m})}return()=>{T=null,w=null,x=null}}function Kt(i,s){return x&&x(i,s.map(m=>wr(m,f.loaderData)))||i.key}function Vr(i,s){if(T&&w){let c=Kt(i,s);T[c]=w()}}function Yt(i,s){if(T){let c=Kt(i,s),m=T[c];if(typeof m=="number")return m}return null}function Gr(i){l={},d=yt(i,a,void 0,l)}return Se={get basename(){return u},get future(){return h},get state(){return f},get routes(){return o},get window(){return t},initialize:Nr,subscribe:Fr,enableScrollRestoration:Jr,navigate:Nt,fetch:kr,revalidate:Br,createHref:i=>e.history.createHref(i),encodeLocation:i=>e.history.encodeLocation(i),getFetcher:Ft,deleteFetcher:Yr,dispose:Ir,getBlocker:Wr,deleteBlocker:kt,_internalFetchControllers:k,_internalActiveDeferreds:Ee,_internalSetRoutes:Gr},Se}function Jn(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Et(e,t,r,n,a,l,o,d){let u,g;if(o){u=[];for(let p of t)if(u.push(p),p.route.id===o){g=p;break}}else u=t,g=t[t.length-1];let h=Lt(a||".",_t(u,l),Xe(e.pathname,r)||e.pathname,d==="path");return a==null&&(h.search=e.search,h.hash=e.hash),(a==null||a===""||a===".")&&g&&g.route.index&&!jt(h.search)&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(h.pathname=h.pathname==="/"?r:fe([r,h.pathname])),qe(h)}function tr(e,t,r,n){if(!n||!Jn(n))return{path:r};if(n.formMethod&&!oa(n.formMethod))return{path:r,error:re(405,{method:n.formMethod})};let a=()=>({path:r,error:re(400,{type:"invalid-body"})}),l=n.formMethod||"get",o=e?l.toUpperCase():l.toLowerCase(),d=Lr(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!oe(o))return a();let v=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((T,x)=>{let[w,D]=x;return""+T+w+"="+D+`
`},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:d,formEncType:n.formEncType,formData:void 0,json:void 0,text:v}}}else if(n.formEncType==="application/json"){if(!oe(o))return a();try{let v=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:d,formEncType:n.formEncType,formData:void 0,json:v,text:void 0}}}catch{return a()}}}M(typeof FormData=="function","FormData is not available in this environment");let u,g;if(n.formData)u=wt(n.formData),g=n.formData;else if(n.body instanceof FormData)u=wt(n.body),g=n.body;else if(n.body instanceof URLSearchParams)u=n.body,g=ir(u);else if(n.body==null)u=new URLSearchParams,g=new FormData;else try{u=new URLSearchParams(n.body),g=ir(u)}catch{return a()}let h={formMethod:o,formAction:d,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:g,json:void 0,text:void 0};if(oe(h.formMethod))return{path:r,submission:h};let p=be(r);return t&&p.search&&jt(p.search)&&u.append("index",""),p.search="?"+u,{path:qe(p),submission:h}}function Vn(e,t){let r=e;if(t){let n=e.findIndex(a=>a.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function rr(e,t,r,n,a,l,o,d,u,g,h,p,v,T,x,w){let D=w?ne(w[1])?w[1].error:w[1].data:void 0,O=e.createURL(t.location),B=e.createURL(a),z=w&&ne(w[1])?w[0]:void 0,pe=z?Vn(r,z):r,ie=w?w[1].statusCode:void 0,Se=o&&ie&&ie>=400,f=pe.filter((H,A)=>{let{route:q}=H;if(q.lazy)return!0;if(q.loader==null)return!1;if(l)return typeof q.loader!="function"||q.loader.hydrate?!0:t.loaderData[q.id]===void 0&&(!t.errors||t.errors[q.id]===void 0);if(Gn(t.loaderData,t.matches[A],H)||u.some(Z=>Z===H.route.id))return!0;let X=t.matches[A],se=H;return nr(H,N({currentUrl:O,currentParams:X.params,nextUrl:B,nextParams:se.params},n,{actionResult:D,unstable_actionStatus:ie,defaultShouldRevalidate:Se?!1:d||O.pathname+O.search===B.pathname+B.search||O.search!==B.search||_r(X,se)}))}),G=[];return p.forEach((H,A)=>{if(l||!r.some(ue=>ue.route.id===H.routeId)||h.has(A))return;let q=Oe(T,H.path,x);if(!q){G.push({key:A,routeId:H.routeId,path:H.path,matches:null,match:null,controller:null});return}let X=t.fetchers.get(A),se=Rt(q,H.path),Z=!1;v.has(A)?Z=!1:g.includes(A)?Z=!0:X&&X.state!=="idle"&&X.data===void 0?Z=d:Z=nr(se,N({currentUrl:O,currentParams:t.matches[t.matches.length-1].params,nextUrl:B,nextParams:r[r.length-1].params},n,{actionResult:D,unstable_actionStatus:ie,defaultShouldRevalidate:Se?!1:d})),Z&&G.push({key:A,routeId:H.routeId,path:H.path,matches:q,match:se,controller:new AbortController})}),[f,G]}function Gn(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function _r(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function nr(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function ar(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];M(a,"No route found in manifest");let l={};for(let o in n){let u=a[o]!==void 0&&o!=="hasErrorBoundary";Ae(!u,'Route "'+a.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!u&&!yn.has(o)&&(l[o]=n[o])}Object.assign(a,l),Object.assign(a,N({},t(a),{lazy:void 0}))}function qn(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function Xn(e,t,r,n,a,l,o,d){let u=n.reduce((p,v)=>p.add(v.route.id),new Set),g=new Set,h=await e({matches:a.map(p=>{let v=u.has(p.route.id);return N({},p,{shouldLoad:v,resolve:x=>(g.add(p.route.id),v?Qn(t,r,p,l,o,x,d):Promise.resolve({type:I.data,result:void 0}))})}),request:r,params:a[0].params,context:d});return a.forEach(p=>M(g.has(p.route.id),'`match.resolve()` was not called for route id "'+p.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),h.filter((p,v)=>u.has(a[v].route.id))}async function Qn(e,t,r,n,a,l,o){let d,u,g=h=>{let p,v=new Promise((w,D)=>p=D);u=()=>p(),t.signal.addEventListener("abort",u);let T=w=>typeof h!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):h({request:t,params:r.params,context:o},...w!==void 0?[w]:[]),x;return l?x=l(w=>T(w)):x=(async()=>{try{return{type:"data",result:await T()}}catch(w){return{type:"error",result:w}}})(),Promise.race([x,v])};try{let h=r.route[e];if(r.route.lazy)if(h){let p,[v]=await Promise.all([g(h).catch(T=>{p=T}),ar(r.route,a,n)]);if(p!==void 0)throw p;d=v}else if(await ar(r.route,a,n),h=r.route[e],h)d=await g(h);else if(e==="action"){let p=new URL(t.url),v=p.pathname+p.search;throw re(405,{method:t.method,pathname:v,routeId:r.route.id})}else return{type:I.data,result:void 0};else if(h)d=await g(h);else{let p=new URL(t.url),v=p.pathname+p.search;throw re(404,{pathname:v})}M(d.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(h){return{type:I.error,result:h}}finally{u&&t.signal.removeEventListener("abort",u)}return d}async function Zn(e){let{result:t,type:r,status:n}=e;if(Mr(t)){let o;try{let d=t.headers.get("Content-Type");d&&/\bapplication\/json\b/.test(d)?t.body==null?o=null:o=await t.json():o=await t.text()}catch(d){return{type:I.error,error:d}}return r===I.error?{type:I.error,error:new Sr(t.status,t.statusText,o),statusCode:t.status,headers:t.headers}:{type:I.data,data:o,statusCode:t.status,headers:t.headers}}if(r===I.error)return{type:I.error,error:t,statusCode:Mt(t)?t.status:n};if(aa(t)){var a,l;return{type:I.deferred,deferredData:t,statusCode:(a=t.init)==null?void 0:a.status,headers:((l=t.init)==null?void 0:l.headers)&&new Headers(t.init.headers)}}return{type:I.data,data:t,statusCode:n}}function ea(e,t,r,n,a,l){let o=e.headers.get("Location");if(M(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!Tt.test(o)){let d=n.slice(0,n.findIndex(u=>u.route.id===r)+1);o=Et(new URL(t.url),d,a,!0,o,l),e.headers.set("Location",o)}return e}function or(e,t,r){if(Tt.test(e)){let n=e,a=n.startsWith("//")?new URL(t.protocol+n):new URL(n),l=Xe(a.pathname,r)!=null;if(a.origin===t.origin&&l)return a.pathname+a.search+a.hash}return e}function Te(e,t,r,n){let a=e.createURL(Lr(t)).toString(),l={signal:r};if(n&&oe(n.formMethod)){let{formMethod:o,formEncType:d}=n;l.method=o.toUpperCase(),d==="application/json"?(l.headers=new Headers({"Content-Type":d}),l.body=JSON.stringify(n.json)):d==="text/plain"?l.body=n.text:d==="application/x-www-form-urlencoded"&&n.formData?l.body=wt(n.formData):l.body=n.formData}return new Request(a,l)}function wt(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function ir(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function ta(e,t,r,n,a,l){let o={},d=null,u,g=!1,h={},p=n&&ne(n[1])?n[1].error:void 0;return r.forEach((v,T)=>{let x=t[T].route.id;if(M(!xe(v),"Cannot handle redirect results in processLoaderData"),ne(v)){let w=v.error;p!==void 0&&(w=p,p=void 0),d=d||{};{let D=Ve(e,x);d[D.route.id]==null&&(d[D.route.id]=w)}o[x]=void 0,g||(g=!0,u=Mt(v.error)?v.error.status:500),v.headers&&(h[x]=v.headers)}else Pe(v)?(a.set(x,v.deferredData),o[x]=v.deferredData.data,v.statusCode!=null&&v.statusCode!==200&&!g&&(u=v.statusCode),v.headers&&(h[x]=v.headers)):(o[x]=v.data,v.statusCode&&v.statusCode!==200&&!g&&(u=v.statusCode),v.headers&&(h[x]=v.headers))}),p!==void 0&&n&&(d={[n[0]]:p},o[n[0]]=void 0),{loaderData:o,errors:d,statusCode:u||200,loaderHeaders:h}}function lr(e,t,r,n,a,l,o,d){let{loaderData:u,errors:g}=ta(t,r,n,a,d);for(let h=0;h<l.length;h++){let{key:p,match:v,controller:T}=l[h];M(o!==void 0&&o[h]!==void 0,"Did not find corresponding fetcher result");let x=o[h];if(!(T&&T.signal.aborted))if(ne(x)){let w=Ve(e.matches,v?.route.id);g&&g[w.route.id]||(g=N({},g,{[w.route.id]:x.error})),e.fetchers.delete(p)}else if(xe(x))M(!1,"Unhandled fetcher revalidation redirect");else if(Pe(x))M(!1,"Unhandled fetcher deferred data");else{let w=ye(x.data);e.fetchers.set(p,w)}}return{loaderData:u,errors:g}}function sr(e,t,r,n){let a=N({},t);for(let l of r){let o=l.route.id;if(t.hasOwnProperty(o)?t[o]!==void 0&&(a[o]=t[o]):e[o]!==void 0&&l.route.loader&&(a[o]=e[o]),n&&n.hasOwnProperty(o))break}return a}function ur(e){return e?ne(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ve(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function dr(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 re(e,t){let{pathname:r,routeId:n,method:a,type:l}=t===void 0?{}:t,o="Unknown Server Error",d="Unknown @remix-run/router error";return e===400?(o="Bad Request",a&&r&&n?d="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":l==="defer-action"?d="defer() is not supported in actions":l==="invalid-body"&&(d="Unable to encode submission body")):e===403?(o="Forbidden",d='Route "'+n+'" does not match URL "'+r+'"'):e===404?(o="Not Found",d='No route matches URL "'+r+'"'):e===405&&(o="Method Not Allowed",a&&r&&n?d="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":a&&(d='Invalid request method "'+a.toUpperCase()+'"')),new Sr(e||500,o,new Error(d),!0)}function cr(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(xe(r))return{result:r,idx:t}}}function Lr(e){let t=typeof e=="string"?be(e):e;return qe(N({},t,{hash:""}))}function ra(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function na(e){return Mr(e.result)&&$n.has(e.result.status)}function Pe(e){return e.type===I.deferred}function ne(e){return e.type===I.error}function xe(e){return(e&&e.type)===I.redirect}function aa(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Mr(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function oa(e){return kn.has(e.toLowerCase())}function oe(e){return zn.has(e.toLowerCase())}async function fr(e,t,r,n,a,l){for(let o=0;o<r.length;o++){let d=r[o],u=t[o];if(!u)continue;let g=e.find(p=>p.route.id===u.route.id),h=g!=null&&!_r(g,u)&&(l&&l[u.route.id])!==void 0;if(Pe(d)&&(a||h)){let p=n[o];M(p,"Expected an AbortSignal for revalidating fetcher deferred result"),await Tr(d,p,a).then(v=>{v&&(r[o]=v||r[o])})}}}async function Tr(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:I.data,data:e.deferredData.unwrappedData}}catch(a){return{type:I.error,error:a}}return{type:I.data,data:e.deferredData.data}}}function jt(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Rt(e,t){let r=typeof t=="string"?be(t).search:t.search;if(e[e.length-1].route.index&&jt(r||""))return e[e.length-1];let n=xr(e);return n[n.length-1]}function hr(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:l,json:o}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(l!=null)return{formMethod:t,formAction:r,formEncType:n,formData:l,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:o,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 ia(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 Je(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 la(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 ye(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 sa(e,t){try{let r=e.sessionStorage.getItem(Dr);if(r){let n=JSON.parse(r);for(let[a,l]of Object.entries(n||{}))l&&Array.isArray(l)&&t.set(a,new Set(l||[]))}}catch{}}function ua(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(Dr,JSON.stringify(r))}catch(n){Ae(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/**
 * React Router v6.23.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function ut(){return ut=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ut.apply(this,arguments)}const Ot=y.createContext(null),da=y.createContext(null),dt=y.createContext(null),Ne=y.createContext(null),At=y.createContext(null),he=y.createContext({outlet:null,matches:[],isDataRoute:!1}),jr=y.createContext(null);function Oa(e,t){let{relative:r}=t===void 0?{}:t;Qe()||M(!1);let{basename:n,navigator:a}=y.useContext(Ne),{hash:l,pathname:o,search:d}=ha(e,{relative:r}),u=o;return n!=="/"&&(u=o==="/"?n:fe([n,o])),a.createHref({pathname:u,search:d,hash:l})}function Qe(){return y.useContext(At)!=null}function Ut(){return Qe()||M(!1),y.useContext(At).location}function Or(e){y.useContext(Ne).static||y.useLayoutEffect(e)}function Aa(){let{isDataRoute:e}=y.useContext(he);return e?Pa():ca()}function ca(){Qe()||M(!1);let e=y.useContext(Ot),{basename:t,future:r,navigator:n}=y.useContext(Ne),{matches:a}=y.useContext(he),{pathname:l}=Ut(),o=JSON.stringify(_t(a,r.v7_relativeSplatPath)),d=y.useRef(!1);return Or(()=>{d.current=!0}),y.useCallback(function(g,h){if(h===void 0&&(h={}),!d.current)return;if(typeof g=="number"){n.go(g);return}let p=Lt(g,JSON.parse(o),l,h.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:fe([t,p.pathname])),(h.replace?n.replace:n.push)(p,h.state,h)},[t,n,o,l,e])}const Ar=y.createContext(null);function Ua(){return y.useContext(Ar)}function fa(e){let t=y.useContext(he).outlet;return t&&y.createElement(Ar.Provider,{value:e},t)}function Na(){let{matches:e}=y.useContext(he),t=e[e.length-1];return t?t.params:{}}function ha(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=y.useContext(Ne),{matches:a}=y.useContext(he),{pathname:l}=Ut(),o=JSON.stringify(_t(a,n.v7_relativeSplatPath));return y.useMemo(()=>Lt(e,JSON.parse(o),l,r==="path"),[e,o,l,r])}function Ia(e,t,r,n){Qe()||M(!1);let{navigator:a}=y.useContext(Ne),{matches:l}=y.useContext(he),o=l[l.length-1],d=o?o.params:{};o&&o.pathname;let u=o?o.pathnameBase:"/";o&&o.route;let g=Ut(),h;h=g;let p=h.pathname||"/",v=p;if(u!=="/"){let w=u.replace(/^\//,"").split("/");v="/"+p.replace(/^\//,"").split("/").slice(w.length).join("/")}let T=Oe(e,{pathname:v});return ya(T&&T.map(w=>Object.assign({},w,{params:Object.assign({},d,w.params),pathname:fe([u,a.encodeLocation?a.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?u:fe([u,a.encodeLocation?a.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),l,r,n)}function pa(){let e=wa(),t=Mt(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),r?y.createElement("pre",{style:a},r):null,null)}const ma=y.createElement(pa,null);class va extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?y.createElement(he.Provider,{value:this.props.routeContext},y.createElement(jr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ga(e){let{routeContext:t,match:r,children:n}=e,a=y.useContext(Ot);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(he.Provider,{value:t},n)}function ya(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var l;if((l=r)!=null&&l.errors)e=r.matches;else return null}let o=e,d=(a=r)==null?void 0:a.errors;if(d!=null){let h=o.findIndex(p=>p.route.id&&d?.[p.route.id]!==void 0);h>=0||M(!1),o=o.slice(0,Math.min(o.length,h+1))}let u=!1,g=-1;if(r&&n&&n.v7_partialHydration)for(let h=0;h<o.length;h++){let p=o[h];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(g=h),p.route.id){let{loaderData:v,errors:T}=r,x=p.route.loader&&v[p.route.id]===void 0&&(!T||T[p.route.id]===void 0);if(p.route.lazy||x){u=!0,g>=0?o=o.slice(0,g+1):o=[o[0]];break}}}return o.reduceRight((h,p,v)=>{let T,x=!1,w=null,D=null;r&&(T=d&&p.route.id?d[p.route.id]:void 0,w=p.route.errorElement||ma,u&&(g<0&&v===0?(x=!0,D=null):g===v&&(x=!0,D=p.route.hydrateFallbackElement||null)));let O=t.concat(o.slice(0,v+1)),B=()=>{let z;return T?z=w:x?z=D:p.route.Component?z=y.createElement(p.route.Component,null):p.route.element?z=p.route.element:z=h,y.createElement(ga,{match:p,routeContext:{outlet:h,matches:O,isDataRoute:r!=null},children:z})};return r&&(p.route.ErrorBoundary||p.route.errorElement||v===0)?y.createElement(va,{location:r.location,revalidation:r.revalidation,component:w,error:T,children:B(),routeContext:{outlet:null,matches:O,isDataRoute:!0}}):B()},null)}var Ur=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Ur||{}),ae=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(ae||{});function ba(e){let t=y.useContext(Ot);return t||M(!1),t}function Ie(e){let t=y.useContext(da);return t||M(!1),t}function Ea(e){let t=y.useContext(he);return t||M(!1),t}function Ze(e){let t=Ea(),r=t.matches[t.matches.length-1];return r.route.id||M(!1),r.route.id}function Fa(){return Ze(ae.UseRouteId)}function Ba(){return Ie(ae.UseNavigation).navigation}function za(){let{matches:e,loaderData:t}=Ie(ae.UseMatches);return y.useMemo(()=>e.map(r=>wr(r,t)),[e,t])}function Ha(){let e=Ie(ae.UseLoaderData),t=Ze(ae.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function ka(e){return Ie(ae.UseRouteLoaderData).loaderData[e]}function $a(){let e=Ie(ae.UseActionData),t=Ze(ae.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function wa(){var e;let t=y.useContext(jr),r=Ie(ae.UseRouteError),n=Ze(ae.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function Ra(){let e=y.useContext(dt);return e?._data}function Ka(){let e=y.useContext(dt);return e?._error}function Pa(){let{router:e}=ba(Ur.UseNavigateStable),t=Ze(ae.UseNavigateStable),r=y.useRef(!1);return Or(()=>{r.current=!0}),y.useCallback(function(a,l){l===void 0&&(l={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,ut({fromRouteId:t},l)))},[e,t])}function Ya(e){return fa(e.context)}function Wa(e){let{basename:t="/",children:r=null,location:n,navigationType:a=$.Pop,navigator:l,static:o=!1,future:d}=e;Qe()&&M(!1);let u=t.replace(/^\/*/,"/"),g=y.useMemo(()=>({basename:u,navigator:l,static:o,future:ut({v7_relativeSplatPath:!1},d)}),[u,d,l,o]);typeof n=="string"&&(n=be(n));let{pathname:h="/",search:p="",hash:v="",state:T=null,key:x="default"}=n,w=y.useMemo(()=>{let D=Xe(h,u);return D==null?null:{location:{pathname:D,search:p,hash:v,state:T,key:x},navigationType:a}},[u,h,p,v,T,x,a]);return w==null?null:y.createElement(Ne.Provider,{value:g},y.createElement(At.Provider,{children:r,value:w}))}function Ja(e){let{children:t,errorElement:r,resolve:n}=e;return y.createElement(Sa,{resolve:n,errorElement:r},y.createElement(Ca,null,t))}var te=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(te||{});const xa=new Promise(()=>{});class Sa extends y.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,r){console.error("<Await> caught the following error during render",t,r)}render(){let{children:t,errorElement:r,resolve:n}=this.props,a=null,l=te.pending;if(!(n instanceof Promise))l=te.success,a=Promise.resolve(),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_data",{get:()=>n});else if(this.state.error){l=te.error;let o=this.state.error;a=Promise.reject().catch(()=>{}),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_error",{get:()=>o})}else n._tracked?(a=n,l="_error"in a?te.error:"_data"in a?te.success:te.pending):(l=te.pending,Object.defineProperty(n,"_tracked",{get:()=>!0}),a=n.then(o=>Object.defineProperty(n,"_data",{get:()=>o}),o=>Object.defineProperty(n,"_error",{get:()=>o})));if(l===te.error&&a._error instanceof bt)throw xa;if(l===te.error&&!r)throw a._error;if(l===te.error)return y.createElement(dt.Provider,{value:a,children:r});if(l===te.success)return y.createElement(dt.Provider,{value:a,children:t});throw a}}function Ca(e){let{children:t}=e,r=Ra(),n=typeof t=="function"?t(r):t;return y.createElement(y.Fragment,null,n)}function Va(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:y.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:y.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:y.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}export{bt as A,ka as B,Oe as C,Ot as D,Sr as E,$a as F,Ka as G,Ja as H,Yn as I,Mt as J,wa as K,ja as L,La as M,Ne as N,Ya as O,Va as P,_a as R,Ut as a,Ua as b,Da as c,Ba as d,mn as e,Na as f,Qr as g,Fa as h,he as i,M as j,ha as k,fe as l,qe as m,da as n,Wa as o,Ia as p,Oa as q,y as r,Xe as s,Mn as t,Aa as u,za as v,be as w,Ma as x,Ta as y,Ha as z};
//# sourceMappingURL=index-D6da9p6-.js.map

//# debugId=f7a0b46c-c6e2-545b-a1e5-f4e6dbf6d5e1
