(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ad52edf2-995a-4c65-9b12-52e316072f9b",e._sentryDebugIdIdentifier="sentry-dbid-ad52edf2-995a-4c65-9b12-52e316072f9b")}catch{}})();function Ln(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 i=Object.getOwnPropertyDescriptor(n,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var co=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function jn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function fo(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),r}var Or={exports:{}},Pt={},Tr={exports:{}},N={};/**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var ot=Symbol.for("react.element"),Mn=Symbol.for("react.portal"),On=Symbol.for("react.fragment"),Tn=Symbol.for("react.strict_mode"),Un=Symbol.for("react.profiler"),Fn=Symbol.for("react.provider"),In=Symbol.for("react.context"),Nn=Symbol.for("react.forward_ref"),kn=Symbol.for("react.suspense"),An=Symbol.for("react.memo"),Bn=Symbol.for("react.lazy"),pr=Symbol.iterator;function zn(e){return e===null||typeof e!="object"?null:(e=pr&&e[pr]||e["@@iterator"],typeof e=="function"?e:null)}var Ur={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Fr=Object.assign,Ir={};function Ge(e,t,r){this.props=e,this.context=t,this.refs=Ir,this.updater=r||Ur}Ge.prototype.isReactComponent={};Ge.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): 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")};Ge.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Nr(){}Nr.prototype=Ge.prototype;function Jt(e,t,r){this.props=e,this.context=t,this.refs=Ir,this.updater=r||Ur}var Yt=Jt.prototype=new Nr;Yt.constructor=Jt;Fr(Yt,Ge.prototype);Yt.isPureReactComponent=!0;var mr=Array.isArray,kr=Object.prototype.hasOwnProperty,Gt={current:null},Ar={key:!0,ref:!0,__self:!0,__source:!0};function Br(e,t,r){var n,a={},i=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)kr.call(t,n)&&!Ar.hasOwnProperty(n)&&(a[n]=t[n]);var d=arguments.length-2;if(d===1)a.children=r;else if(1<d){for(var s=Array(d),h=0;h<d;h++)s[h]=arguments[h+2];a.children=s}if(e&&e.defaultProps)for(n in d=e.defaultProps,d)a[n]===void 0&&(a[n]=d[n]);return{$$typeof:ot,type:e,key:i,ref:o,props:a,_owner:Gt.current}}function $n(e,t){return{$$typeof:ot,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Xt(e){return typeof e=="object"&&e!==null&&e.$$typeof===ot}function Hn(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var yr=/\/+/g;function Ut(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Hn(""+e.key):t.toString(36)}function Et(e,t,r,n,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case ot:case Mn:o=!0}}if(o)return o=e,a=a(o),e=n===""?"."+Ut(o,0):n,mr(a)?(r="",e!=null&&(r=e.replace(yr,"$&/")+"/"),Et(a,t,r,"",function(h){return h})):a!=null&&(Xt(a)&&(a=$n(a,r+(!a.key||o&&o.key===a.key?"":(""+a.key).replace(yr,"$&/")+"/")+e)),t.push(a)),1;if(o=0,n=n===""?".":n+":",mr(e))for(var d=0;d<e.length;d++){i=e[d];var s=n+Ut(i,d);o+=Et(i,t,r,s,a)}else if(s=zn(e),typeof s=="function")for(e=s.call(e),d=0;!(i=e.next()).done;)i=i.value,s=n+Ut(i,d++),o+=Et(i,t,r,s,a);else if(i==="object")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 bt(e,t,r){if(e==null)return e;var n=[],a=0;return Et(e,n,"","",function(i){return t.call(r,i,a++)}),n}function Wn(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 ae={current:null},Rt={transition:null},Vn={ReactCurrentDispatcher:ae,ReactCurrentBatchConfig:Rt,ReactCurrentOwner:Gt};function zr(){throw Error("act(...) is not supported in production builds of React.")}N.Children={map:bt,forEach:function(e,t,r){bt(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return bt(e,function(){t++}),t},toArray:function(e){return bt(e,function(t){return t})||[]},only:function(e){if(!Xt(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};N.Component=Ge;N.Fragment=On;N.Profiler=Un;N.PureComponent=Jt;N.StrictMode=Tn;N.Suspense=kn;N.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Vn;N.act=zr;N.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=Fr({},e.props),a=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Gt.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var d=e.type.defaultProps;for(s in t)kr.call(t,s)&&!Ar.hasOwnProperty(s)&&(n[s]=t[s]===void 0&&d!==void 0?d[s]:t[s])}var s=arguments.length-2;if(s===1)n.children=r;else if(1<s){d=Array(s);for(var h=0;h<s;h++)d[h]=arguments[h+2];n.children=d}return{$$typeof:ot,type:e.type,key:a,ref:i,props:n,_owner:o}};N.createContext=function(e){return e={$$typeof:In,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Fn,_context:e},e.Consumer=e};N.createElement=Br;N.createFactory=function(e){var t=Br.bind(null,e);return t.type=e,t};N.createRef=function(){return{current:null}};N.forwardRef=function(e){return{$$typeof:Nn,render:e}};N.isValidElement=Xt;N.lazy=function(e){return{$$typeof:Bn,_payload:{_status:-1,_result:e},_init:Wn}};N.memo=function(e,t){return{$$typeof:An,type:e,compare:t===void 0?null:t}};N.startTransition=function(e){var t=Rt.transition;Rt.transition={};try{e()}finally{Rt.transition=t}};N.unstable_act=zr;N.useCallback=function(e,t){return ae.current.useCallback(e,t)};N.useContext=function(e){return ae.current.useContext(e)};N.useDebugValue=function(){};N.useDeferredValue=function(e){return ae.current.useDeferredValue(e)};N.useEffect=function(e,t){return ae.current.useEffect(e,t)};N.useId=function(){return ae.current.useId()};N.useImperativeHandle=function(e,t,r){return ae.current.useImperativeHandle(e,t,r)};N.useInsertionEffect=function(e,t){return ae.current.useInsertionEffect(e,t)};N.useLayoutEffect=function(e,t){return ae.current.useLayoutEffect(e,t)};N.useMemo=function(e,t){return ae.current.useMemo(e,t)};N.useReducer=function(e,t,r){return ae.current.useReducer(e,t,r)};N.useRef=function(e){return ae.current.useRef(e)};N.useState=function(e){return ae.current.useState(e)};N.useSyncExternalStore=function(e,t,r){return ae.current.useSyncExternalStore(e,t,r)};N.useTransition=function(){return ae.current.useTransition()};N.version="18.3.1";Tr.exports=N;var g=Tr.exports;const Kn=jn(g),ho=Ln({__proto__:null,default:Kn},[g]);/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Jn=g,Yn=Symbol.for("react.element"),Gn=Symbol.for("react.fragment"),Xn=Object.prototype.hasOwnProperty,Qn=Jn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Zn={key:!0,ref:!0,__self:!0,__source:!0};function $r(e,t,r){var n,a={},i=null,o=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)Xn.call(t,n)&&!Zn.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)a[n]===void 0&&(a[n]=t[n]);return{$$typeof:Yn,type:e,key:i,ref:o,props:a,_owner:Qn.current}}Pt.Fragment=Gn;Pt.jsx=$r;Pt.jsxs=$r;Or.exports=Pt;var po=Or.exports;/**
 * @remix-run/router v1.20.0
 *
 * 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 B(){return B=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},B.apply(this,arguments)}var Z;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Z||(Z={}));const vr="popstate";function mo(e){e===void 0&&(e={});function t(n,a){let{pathname:i,search:o,hash:d}=n.location;return Fe("",{pathname:i,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:Ie(a)}return ea(t,r,null,e)}function T(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ue(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function qn(){return Math.random().toString(36).substr(2,8)}function gr(e,t){return{usr:e.state,key:e.key,idx:t}}function Fe(e,t,r,n){return r===void 0&&(r=null),B({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?we(t):t,{state:r,key:t&&t.key||n||qn()})}function Ie(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 we(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 ea(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:i=!1}=n,o=a.history,d=Z.Pop,s=null,h=m();h==null&&(h=0,o.replaceState(B({},o.state,{idx:h}),""));function m(){return(o.state||{idx:null}).idx}function p(){d=Z.Pop;let D=m(),F=D==null?null:D-h;h=D,s&&s({action:d,location:b.location,delta:F})}function E(D,F){d=Z.Push;let C=Fe(b.location,D,F);h=m()+1;let O=gr(C,h),R=b.createHref(C);try{o.pushState(O,"",R)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;a.location.assign(R)}i&&s&&s({action:d,location:b.location,delta:1})}function y(D,F){d=Z.Replace;let C=Fe(b.location,D,F);h=m();let O=gr(C,h),R=b.createHref(C);o.replaceState(O,"",R),i&&s&&s({action:d,location:b.location,delta:0})}function w(D){let F=a.location.origin!=="null"?a.location.origin:a.location.href,C=typeof D=="string"?D:Ie(D);return C=C.replace(/ $/,"%20"),T(F,"No window.location.(origin|href) available to create URL for href: "+C),new URL(C,F)}let b={get action(){return d},get location(){return e(a,o)},listen(D){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(vr,p),s=D,()=>{a.removeEventListener(vr,p),s=null}},createHref(D){return t(a,D)},createURL:w,encodeLocation(D){let F=w(D);return{pathname:F.pathname,search:F.search,hash:F.hash}},push:E,replace:y,go(D){return o.go(D)}};return b}var $;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})($||($={}));const ta=new Set(["lazy","caseSensitive","path","id","index","children"]);function ra(e){return e.index===!0}function at(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,i)=>{let o=[...r,String(i)],d=typeof a.id=="string"?a.id:o.join("-");if(T(a.index!==!0||!a.children,"Cannot specify children on an index route"),T(!n[d],'Found a route id collision on id "'+d+`".  Route id's must be globally unique within Data Router usages`),ra(a)){let s=B({},a,t(a),{id:d});return n[d]=s,s}else{let s=B({},a,t(a),{id:d,children:void 0});return n[d]=s,a.children&&(s.children=at(a.children,t,o,n)),s}})}function ve(e,t,r){return r===void 0&&(r="/"),Dt(e,t,r,!1)}function Dt(e,t,r,n){let a=typeof t=="string"?we(t):t,i=Ne(a.pathname||"/",r);if(i==null)return null;let o=Wr(e);na(o);let d=null;for(let s=0;d==null&&s<o.length;++s){let h=Kr(i);d=fa(o[s],h,n)}return d}function Hr(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 Wr(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(i,o,d)=>{let s={relativePath:d===void 0?i.path||"":d,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};s.relativePath.startsWith("/")&&(T(s.relativePath.startsWith(n),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(n.length));let h=be([n,s.relativePath]),m=r.concat(s);i.children&&i.children.length>0&&(T(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),Wr(i.children,t,m,h)),!(i.path==null&&!i.index)&&t.push({path:h,score:da(h,i.index),routesMeta:m})};return e.forEach((i,o)=>{var d;if(i.path===""||!((d=i.path)!=null&&d.includes("?")))a(i,o);else for(let s of Vr(i.path))a(i,o,s)}),t}function Vr(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return a?[i,""]:[i];let o=Vr(n.join("/")),d=[];return d.push(...o.map(s=>s===""?i:[i,s].join("/"))),a&&d.push(...o),d.map(s=>e.startsWith("/")&&s===""?"/":s)}function na(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:ca(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const aa=/^:[\w-]+$/,oa=3,ia=2,la=1,sa=10,ua=-2,br=e=>e==="*";function da(e,t){let r=e.split("/"),n=r.length;return r.some(br)&&(n+=ua),t&&(n+=ia),r.filter(a=>!br(a)).reduce((a,i)=>a+(aa.test(i)?oa:i===""?la:sa),n)}function ca(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 fa(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,a={},i="/",o=[];for(let d=0;d<n.length;++d){let s=n[d],h=d===n.length-1,m=i==="/"?t:t.slice(i.length)||"/",p=kt({path:s.relativePath,caseSensitive:s.caseSensitive,end:h},m),E=s.route;if(!p&&h&&r&&!n[n.length-1].route.index&&(p=kt({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},m)),!p)return null;Object.assign(a,p.params),o.push({params:a,pathname:be([i,p.pathname]),pathnameBase:ya(be([i,p.pathnameBase])),route:E}),p.pathnameBase!=="/"&&(i=be([i,p.pathnameBase]))}return o}function yo(e,t){t===void 0&&(t={});let r=e;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(Ue(!1,'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".')),r=r.replace(/\*$/,"/*"));const n=r.startsWith("/")?"/":"",a=o=>o==null?"":typeof o=="string"?o:String(o),i=r.split(/\/+/).map((o,d,s)=>{if(d===s.length-1&&o==="*")return a(t["*"]);const m=o.match(/^:([\w-]+)(\??)$/);if(m){const[,p,E]=m;let y=t[p];return T(E==="?"||y!=null,'Missing ":'+p+'" param'),a(y)}return o.replace(/\?$/g,"")}).filter(o=>!!o);return n+i.join("/")}function kt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=ha(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let i=a[0],o=i.replace(/(.)\/+$/,"$1"),d=a.slice(1);return{params:n.reduce((h,m,p)=>{let{paramName:E,isOptional:y}=m;if(E==="*"){let b=d[p]||"";o=i.slice(0,i.length-b.length).replace(/(.)\/+$/,"$1")}const w=d[p];return y&&!w?h[E]=void 0:h[E]=(w||"").replace(/%2F/g,"/"),h},{}),pathname:i,pathnameBase:o,pattern:e}}function ha(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Ue(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,s)=>(n.push({paramName:d,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Kr(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ue(!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 Ne(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 pa(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?we(e):e;return{pathname:r?r.startsWith("/")?r:ma(r,t):t,search:va(n),hash:ga(a)}}function ma(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 Ft(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 Jr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Ct(e,t){let r=Jr(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function _t(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=we(e):(a=B({},e),T(!a.pathname||!a.pathname.includes("?"),Ft("?","pathname","search",a)),T(!a.pathname||!a.pathname.includes("#"),Ft("#","pathname","hash",a)),T(!a.search||!a.search.includes("#"),Ft("#","search","hash",a)));let i=e===""||a.pathname==="",o=i?"/":a.pathname,d;if(o==null)d=r;else{let p=t.length-1;if(!n&&o.startsWith("..")){let E=o.split("/");for(;E[0]==="..";)E.shift(),p-=1;a.pathname=E.join("/")}d=p>=0?t[p]:"/"}let s=pa(a,d),h=o&&o!=="/"&&o.endsWith("/"),m=(i||o===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(h||m)&&(s.pathname+="/"),s}const be=e=>e.join("/").replace(/\/\/+/g,"/"),ya=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),va=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ga=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,vo=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r,a=new Headers(n.headers);return a.has("Content-Type")||a.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(t),B({},n,{headers:a}))};class ba{constructor(t,r){this.type="DataWithResponseInit",this.data=t,this.init=r||null}}function go(e,t){return new ba(e,typeof t=="number"?{status:t}:t)}class At extends Error{}class wa{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],T(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((i,o)=>n=o),this.controller=new AbortController;let a=()=>n(new At("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((i,o)=>{let[d,s]=o;return Object.assign(i,{[d]:this.trackPromise(d,s)})},{}),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 At)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 i=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:()=>i}),this.emit(!1,r),Promise.reject(i)}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(i=>{t.removeEventListener("abort",n),(i||this.done)&&a(i)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return T(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]:Ra(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function Ea(e){return e instanceof Promise&&e._tracked===!0}function Ra(e){if(!Ea(e))return e;if(e._error)throw e._error;return e._data}const bo=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r;return new wa(t,n)},Yr=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,B({},n,{headers:a}))},wo=(e,t)=>{let r=Yr(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},Eo=(e,t)=>{let r=Yr(e,t);return r.headers.set("X-Remix-Replace","true"),r};class Bt{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 Xe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Gr=["post","put","patch","delete"],Da=new Set(Gr),Sa=["get",...Gr],xa=new Set(Sa),Pa=new Set([301,302,303,307,308]),Ca=new Set([307,308]),It={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},_a={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ye={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Qt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Xr=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Qr="remix-router-transitions";function Ro(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;T(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 l=e.detectErrorBoundary;a=u=>({hasErrorBoundary:l(u)})}else a=Xr;let i={},o=at(e.routes,a,void 0,i),d,s=e.basename||"/",h=e.dataStrategy||en,m=e.patchRoutesOnNavigation,p=B({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),E=null,y=new Set,w=null,b=null,D=null,F=e.hydrationData!=null,C=ve(o,e.history.location,s),O=null;if(C==null&&!m){let l=Y(404,{pathname:e.history.location.pathname}),{matches:u,route:c}=St(o);C=u,O={[c.id]:l}}C&&!e.hydrationData&&mt(C,o,e.history.location.pathname).active&&(C=null);let R;if(C)if(C.some(l=>l.route.lazy))R=!1;else if(!C.some(l=>l.route.loader))R=!0;else if(p.v7_partialHydration){let l=e.hydrationData?e.hydrationData.loaderData:null,u=e.hydrationData?e.hydrationData.errors:null;if(u){let c=C.findIndex(v=>u[v.route.id]!==void 0);R=C.slice(0,c+1).every(v=>!Ht(v.route,l,u))}else R=C.every(c=>!Ht(c.route,l,u))}else R=e.hydrationData!=null;else if(R=!1,C=[],p.v7_partialHydration){let l=mt(null,o,e.history.location.pathname);l.active&&l.matches&&(C=l.matches)}let V,f={historyAction:e.history.action,location:e.history.location,matches:C,initialized:R,navigation:It,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||O,fetchers:new Map,blockers:new Map},M=Z.Pop,A=!1,I,Q=!1,J=new Map,ue=null,ie=!1,fe=!1,ut=[],dt=new Set,ee=new Map,ct=0,Qe=-1,ze=new Map,he=new Set,$e=new Map,Ze=new Map,pe=new Set,_e=new Map,Le=new Map,ft;function fn(){if(E=e.history.listen(l=>{let{action:u,location:c,delta:v}=l;if(ft){ft(),ft=void 0;return}Ue(Le.size===0||v!=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 S=dr({currentLocation:f.location,nextLocation:c,historyAction:u});if(S&&v!=null){let L=new Promise(U=>{ft=U});e.history.go(v*-1),pt(S,{state:"blocked",location:c,proceed(){pt(S,{state:"proceeding",proceed:void 0,reset:void 0,location:c}),L.then(()=>e.history.go(v))},reset(){let U=new Map(f.blockers);U.set(S,Ye),ne({blockers:U})}});return}return je(u,c)}),r){$a(t,J);let l=()=>Ha(t,J);t.addEventListener("pagehide",l),ue=()=>t.removeEventListener("pagehide",l)}return f.initialized||je(Z.Pop,f.location,{initialHydration:!0}),V}function hn(){E&&E(),ue&&ue(),y.clear(),I&&I.abort(),f.fetchers.forEach((l,u)=>ht(u)),f.blockers.forEach((l,u)=>ur(u))}function pn(l){return y.add(l),()=>y.delete(l)}function ne(l,u){u===void 0&&(u={}),f=B({},f,l);let c=[],v=[];p.v7_fetcherPersist&&f.fetchers.forEach((S,L)=>{S.state==="idle"&&(pe.has(L)?v.push(L):c.push(L))}),[...y].forEach(S=>S(f,{deletedFetchers:v,viewTransitionOpts:u.viewTransitionOpts,flushSync:u.flushSync===!0})),p.v7_fetcherPersist&&(c.forEach(S=>f.fetchers.delete(S)),v.forEach(S=>ht(S)))}function He(l,u,c){var v,S;let{flushSync:L}=c===void 0?{}:c,U=f.actionData!=null&&f.navigation.formMethod!=null&&se(f.navigation.formMethod)&&f.navigation.state==="loading"&&((v=l.state)==null?void 0:v._isRedirect)!==!0,P;u.actionData?Object.keys(u.actionData).length>0?P=u.actionData:P=null:U?P=f.actionData:P=null;let _=u.loaderData?_r(f.loaderData,u.loaderData,u.matches||[],u.errors):f.loaderData,x=f.blockers;x.size>0&&(x=new Map(x),x.forEach((z,te)=>x.set(te,Ye)));let j=A===!0||f.navigation.formMethod!=null&&se(f.navigation.formMethod)&&((S=l.state)==null?void 0:S._isRedirect)!==!0;d&&(o=d,d=void 0),ie||M===Z.Pop||(M===Z.Push?e.history.push(l,l.state):M===Z.Replace&&e.history.replace(l,l.state));let k;if(M===Z.Pop){let z=J.get(f.location.pathname);z&&z.has(l.pathname)?k={currentLocation:f.location,nextLocation:l}:J.has(l.pathname)&&(k={currentLocation:l,nextLocation:f.location})}else if(Q){let z=J.get(f.location.pathname);z?z.add(l.pathname):(z=new Set([l.pathname]),J.set(f.location.pathname,z)),k={currentLocation:f.location,nextLocation:l}}ne(B({},u,{actionData:P,loaderData:_,historyAction:M,location:l,initialized:!0,navigation:It,revalidation:"idle",restoreScrollPosition:fr(l,u.matches||f.matches),preventScrollReset:j,blockers:x}),{viewTransitionOpts:k,flushSync:L===!0}),M=Z.Pop,A=!1,Q=!1,ie=!1,fe=!1,ut=[]}async function rr(l,u){if(typeof l=="number"){e.history.go(l);return}let c=zt(f.location,f.matches,s,p.v7_prependBasename,l,p.v7_relativeSplatPath,u?.fromRouteId,u?.relative),{path:v,submission:S,error:L}=Er(p.v7_normalizeFormMethod,!1,c,u),U=f.location,P=Fe(f.location,v,u&&u.state);P=B({},P,e.history.encodeLocation(P));let _=u&&u.replace!=null?u.replace:void 0,x=Z.Push;_===!0?x=Z.Replace:_===!1||S!=null&&se(S.formMethod)&&S.formAction===f.location.pathname+f.location.search&&(x=Z.Replace);let j=u&&"preventScrollReset"in u?u.preventScrollReset===!0:void 0,k=(u&&u.flushSync)===!0,z=dr({currentLocation:U,nextLocation:P,historyAction:x});if(z){pt(z,{state:"blocked",location:P,proceed(){pt(z,{state:"proceeding",proceed:void 0,reset:void 0,location:P}),rr(l,u)},reset(){let te=new Map(f.blockers);te.set(z,Ye),ne({blockers:te})}});return}return await je(x,P,{submission:S,pendingError:L,preventScrollReset:j,replace:u&&u.replace,enableViewTransition:u&&u.viewTransition,flushSync:k})}function mn(){if(jt(),ne({revalidation:"loading"}),f.navigation.state!=="submitting"){if(f.navigation.state==="idle"){je(f.historyAction,f.location,{startUninterruptedRevalidation:!0});return}je(M||f.historyAction,f.navigation.location,{overrideNavigation:f.navigation,enableViewTransition:Q===!0})}}async function je(l,u,c){I&&I.abort(),I=null,M=l,ie=(c&&c.startUninterruptedRevalidation)===!0,xn(f.location,f.matches),A=(c&&c.preventScrollReset)===!0,Q=(c&&c.enableViewTransition)===!0;let v=d||o,S=c&&c.overrideNavigation,L=ve(v,u,s),U=(c&&c.flushSync)===!0,P=mt(L,v,u.pathname);if(P.active&&P.matches&&(L=P.matches),!L){let{error:K,notFoundMatches:W,route:G}=Mt(u.pathname);He(u,{matches:W,loaderData:{},errors:{[G.id]:K}},{flushSync:U});return}if(f.initialized&&!fe&&Ua(f.location,u)&&!(c&&c.submission&&se(c.submission.formMethod))){He(u,{matches:L},{flushSync:U});return}I=new AbortController;let _=Je(e.history,u,I.signal,c&&c.submission),x;if(c&&c.pendingError)x=[Se(L).route.id,{type:$.error,error:c.pendingError}];else if(c&&c.submission&&se(c.submission.formMethod)){let K=await yn(_,u,c.submission,L,P.active,{replace:c.replace,flushSync:U});if(K.shortCircuited)return;if(K.pendingActionResult){let[W,G]=K.pendingActionResult;if(re(G)&&Xe(G.error)&&G.error.status===404){I=null,He(u,{matches:K.matches,loaderData:{},errors:{[W]:G.error}});return}}L=K.matches||L,x=K.pendingActionResult,S=Nt(u,c.submission),U=!1,P.active=!1,_=Je(e.history,_.url,_.signal)}let{shortCircuited:j,matches:k,loaderData:z,errors:te}=await vn(_,u,L,P.active,S,c&&c.submission,c&&c.fetcherSubmission,c&&c.replace,c&&c.initialHydration===!0,U,x);j||(I=null,He(u,B({matches:k||L},Lr(x),{loaderData:z,errors:te})))}async function yn(l,u,c,v,S,L){L===void 0&&(L={}),jt();let U=Ba(u,c);if(ne({navigation:U},{flushSync:L.flushSync===!0}),S){let x=await yt(v,u.pathname,l.signal);if(x.type==="aborted")return{shortCircuited:!0};if(x.type==="error"){let j=Se(x.partialMatches).route.id;return{matches:x.partialMatches,pendingActionResult:[j,{type:$.error,error:x.error}]}}else if(x.matches)v=x.matches;else{let{notFoundMatches:j,error:k,route:z}=Mt(u.pathname);return{matches:j,pendingActionResult:[z.id,{type:$.error,error:k}]}}}let P,_=Te(v,u);if(!_.route.action&&!_.route.lazy)P={type:$.error,error:Y(405,{method:l.method,pathname:u.pathname,routeId:_.route.id})};else if(P=(await qe("action",f,l,[_],v,null))[_.route.id],l.signal.aborted)return{shortCircuited:!0};if(Pe(P)){let x;return L&&L.replace!=null?x=L.replace:x=xr(P.response.headers.get("Location"),new URL(l.url),s)===f.location.pathname+f.location.search,await Me(l,P,!0,{submission:c,replace:x}),{shortCircuited:!0}}if(ge(P))throw Y(400,{type:"defer-action"});if(re(P)){let x=Se(v,_.route.id);return(L&&L.replace)!==!0&&(M=Z.Push),{matches:v,pendingActionResult:[x.route.id,P]}}return{matches:v,pendingActionResult:[_.route.id,P]}}async function vn(l,u,c,v,S,L,U,P,_,x,j){let k=S||Nt(u,L),z=L||U||Mr(k),te=!ie&&(!p.v7_partialHydration||!_);if(v){if(te){let X=nr(j);ne(B({navigation:k},X!==void 0?{actionData:X}:{}),{flushSync:x})}let H=await yt(c,u.pathname,l.signal);if(H.type==="aborted")return{shortCircuited:!0};if(H.type==="error"){let X=Se(H.partialMatches).route.id;return{matches:H.partialMatches,loaderData:{},errors:{[X]:H.error}}}else if(H.matches)c=H.matches;else{let{error:X,notFoundMatches:Ve,route:rt}=Mt(u.pathname);return{matches:Ve,loaderData:{},errors:{[rt.id]:X}}}}let K=d||o,[W,G]=Rr(e.history,f,c,z,u,p.v7_partialHydration&&_===!0,p.v7_skipActionErrorRevalidation,fe,ut,dt,pe,$e,he,K,s,j);if(Ot(H=>!(c&&c.some(X=>X.route.id===H))||W&&W.some(X=>X.route.id===H)),Qe=++ct,W.length===0&&G.length===0){let H=lr();return He(u,B({matches:c,loaderData:{},errors:j&&re(j[1])?{[j[0]]:j[1].error}:null},Lr(j),H?{fetchers:new Map(f.fetchers)}:{}),{flushSync:x}),{shortCircuited:!0}}if(te){let H={};if(!v){H.navigation=k;let X=nr(j);X!==void 0&&(H.actionData=X)}G.length>0&&(H.fetchers=gn(G)),ne(H,{flushSync:x})}G.forEach(H=>{Re(H.key),H.controller&&ee.set(H.key,H.controller)});let We=()=>G.forEach(H=>Re(H.key));I&&I.signal.addEventListener("abort",We);let{loaderResults:et,fetcherResults:ye}=await ar(f,c,W,G,l);if(l.signal.aborted)return{shortCircuited:!0};I&&I.signal.removeEventListener("abort",We),G.forEach(H=>ee.delete(H.key));let de=wt(et);if(de)return await Me(l,de.result,!0,{replace:P}),{shortCircuited:!0};if(de=wt(ye),de)return he.add(de.key),await Me(l,de.result,!0,{replace:P}),{shortCircuited:!0};let{loaderData:Tt,errors:tt}=Cr(f,c,et,j,G,ye,_e);_e.forEach((H,X)=>{H.subscribe(Ve=>{(Ve||H.done)&&_e.delete(X)})}),p.v7_partialHydration&&_&&f.errors&&(tt=B({},f.errors,tt));let Oe=lr(),vt=sr(Qe),gt=Oe||vt||G.length>0;return B({matches:c,loaderData:Tt,errors:tt},gt?{fetchers:new Map(f.fetchers)}:{})}function nr(l){if(l&&!re(l[1]))return{[l[0]]:l[1].data};if(f.actionData)return Object.keys(f.actionData).length===0?null:f.actionData}function gn(l){return l.forEach(u=>{let c=f.fetchers.get(u.key),v=nt(void 0,c?c.data:void 0);f.fetchers.set(u.key,v)}),new Map(f.fetchers)}function bn(l,u,c,v){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.");Re(l);let S=(v&&v.flushSync)===!0,L=d||o,U=zt(f.location,f.matches,s,p.v7_prependBasename,c,p.v7_relativeSplatPath,u,v?.relative),P=ve(L,U,s),_=mt(P,L,U);if(_.active&&_.matches&&(P=_.matches),!P){me(l,u,Y(404,{pathname:U}),{flushSync:S});return}let{path:x,submission:j,error:k}=Er(p.v7_normalizeFormMethod,!0,U,v);if(k){me(l,u,k,{flushSync:S});return}let z=Te(P,x),te=(v&&v.preventScrollReset)===!0;if(j&&se(j.formMethod)){wn(l,u,x,z,P,_.active,S,te,j);return}$e.set(l,{routeId:u,path:x}),En(l,u,x,z,P,_.active,S,te,j)}async function wn(l,u,c,v,S,L,U,P,_){jt(),$e.delete(l);function x(q){if(!q.route.action&&!q.route.lazy){let Ke=Y(405,{method:_.formMethod,pathname:c,routeId:u});return me(l,u,Ke,{flushSync:U}),!0}return!1}if(!L&&x(v))return;let j=f.fetchers.get(l);Ee(l,za(_,j),{flushSync:U});let k=new AbortController,z=Je(e.history,c,k.signal,_);if(L){let q=await yt(S,c,z.signal);if(q.type==="aborted")return;if(q.type==="error"){me(l,u,q.error,{flushSync:U});return}else if(q.matches){if(S=q.matches,v=Te(S,c),x(v))return}else{me(l,u,Y(404,{pathname:c}),{flushSync:U});return}}ee.set(l,k);let te=ct,W=(await qe("action",f,z,[v],S,l))[v.route.id];if(z.signal.aborted){ee.get(l)===k&&ee.delete(l);return}if(p.v7_fetcherPersist&&pe.has(l)){if(Pe(W)||re(W)){Ee(l,De(void 0));return}}else{if(Pe(W))if(ee.delete(l),Qe>te){Ee(l,De(void 0));return}else return he.add(l),Ee(l,nt(_)),Me(z,W,!1,{fetcherSubmission:_,preventScrollReset:P});if(re(W)){me(l,u,W.error);return}}if(ge(W))throw Y(400,{type:"defer-action"});let G=f.navigation.location||f.location,We=Je(e.history,G,k.signal),et=d||o,ye=f.navigation.state!=="idle"?ve(et,f.navigation.location,s):f.matches;T(ye,"Didn't find any matches after fetcher action");let de=++ct;ze.set(l,de);let Tt=nt(_,W.data);f.fetchers.set(l,Tt);let[tt,Oe]=Rr(e.history,f,ye,_,G,!1,p.v7_skipActionErrorRevalidation,fe,ut,dt,pe,$e,he,et,s,[v.route.id,W]);Oe.filter(q=>q.key!==l).forEach(q=>{let Ke=q.key,hr=f.fetchers.get(Ke),_n=nt(void 0,hr?hr.data:void 0);f.fetchers.set(Ke,_n),Re(Ke),q.controller&&ee.set(Ke,q.controller)}),ne({fetchers:new Map(f.fetchers)});let vt=()=>Oe.forEach(q=>Re(q.key));k.signal.addEventListener("abort",vt);let{loaderResults:gt,fetcherResults:H}=await ar(f,ye,tt,Oe,We);if(k.signal.aborted)return;k.signal.removeEventListener("abort",vt),ze.delete(l),ee.delete(l),Oe.forEach(q=>ee.delete(q.key));let X=wt(gt);if(X)return Me(We,X.result,!1,{preventScrollReset:P});if(X=wt(H),X)return he.add(X.key),Me(We,X.result,!1,{preventScrollReset:P});let{loaderData:Ve,errors:rt}=Cr(f,ye,gt,void 0,Oe,H,_e);if(f.fetchers.has(l)){let q=De(W.data);f.fetchers.set(l,q)}sr(de),f.navigation.state==="loading"&&de>Qe?(T(M,"Expected pending action"),I&&I.abort(),He(f.navigation.location,{matches:ye,loaderData:Ve,errors:rt,fetchers:new Map(f.fetchers)})):(ne({errors:rt,loaderData:_r(f.loaderData,Ve,ye,rt),fetchers:new Map(f.fetchers)}),fe=!1)}async function En(l,u,c,v,S,L,U,P,_){let x=f.fetchers.get(l);Ee(l,nt(_,x?x.data:void 0),{flushSync:U});let j=new AbortController,k=Je(e.history,c,j.signal);if(L){let W=await yt(S,c,k.signal);if(W.type==="aborted")return;if(W.type==="error"){me(l,u,W.error,{flushSync:U});return}else if(W.matches)S=W.matches,v=Te(S,c);else{me(l,u,Y(404,{pathname:c}),{flushSync:U});return}}ee.set(l,j);let z=ct,K=(await qe("loader",f,k,[v],S,l))[v.route.id];if(ge(K)&&(K=await Zt(K,k.signal,!0)||K),ee.get(l)===j&&ee.delete(l),!k.signal.aborted){if(pe.has(l)){Ee(l,De(void 0));return}if(Pe(K))if(Qe>z){Ee(l,De(void 0));return}else{he.add(l),await Me(k,K,!1,{preventScrollReset:P});return}if(re(K)){me(l,u,K.error);return}T(!ge(K),"Unhandled fetcher deferred data"),Ee(l,De(K.data))}}async function Me(l,u,c,v){let{submission:S,fetcherSubmission:L,preventScrollReset:U,replace:P}=v===void 0?{}:v;u.response.headers.has("X-Remix-Revalidate")&&(fe=!0);let _=u.response.headers.get("Location");T(_,"Expected a Location header on the redirect Response"),_=xr(_,new URL(l.url),s);let x=Fe(f.location,_,{_isRedirect:!0});if(r){let W=!1;if(u.response.headers.has("X-Remix-Reload-Document"))W=!0;else if(Qt.test(_)){const G=e.history.createURL(_);W=G.origin!==t.location.origin||Ne(G.pathname,s)==null}if(W){P?t.location.replace(_):t.location.assign(_);return}}I=null;let j=P===!0||u.response.headers.has("X-Remix-Replace")?Z.Replace:Z.Push,{formMethod:k,formAction:z,formEncType:te}=f.navigation;!S&&!L&&k&&z&&te&&(S=Mr(f.navigation));let K=S||L;if(Ca.has(u.response.status)&&K&&se(K.formMethod))await je(j,x,{submission:B({},K,{formAction:_}),preventScrollReset:U||A,enableViewTransition:c?Q:void 0});else{let W=Nt(x,S);await je(j,x,{overrideNavigation:W,fetcherSubmission:L,preventScrollReset:U||A,enableViewTransition:c?Q:void 0})}}async function qe(l,u,c,v,S,L){let U,P={};try{U=await tn(h,l,u,c,v,S,L,i,a)}catch(_){return v.forEach(x=>{P[x.route.id]={type:$.error,error:_}}),P}for(let[_,x]of Object.entries(U))if(ln(x)){let j=x.result;P[_]={type:$.redirect,response:nn(j,c,_,S,s,p.v7_relativeSplatPath)}}else P[_]=await rn(x);return P}async function ar(l,u,c,v,S){let L=l.matches,U=qe("loader",l,S,c,u,null),P=Promise.all(v.map(async j=>{if(j.matches&&j.match&&j.controller){let z=(await qe("loader",l,Je(e.history,j.path,j.controller.signal),[j.match],j.matches,j.key))[j.match.route.id];return{[j.key]:z}}else return Promise.resolve({[j.key]:{type:$.error,error:Y(404,{pathname:j.path})}})})),_=await U,x=(await P).reduce((j,k)=>Object.assign(j,k),{});return await Promise.all([ka(u,_,S.signal,L,l.loaderData),Aa(u,x,v)]),{loaderResults:_,fetcherResults:x}}function jt(){fe=!0,ut.push(...Ot()),$e.forEach((l,u)=>{ee.has(u)&&dt.add(u),Re(u)})}function Ee(l,u,c){c===void 0&&(c={}),f.fetchers.set(l,u),ne({fetchers:new Map(f.fetchers)},{flushSync:(c&&c.flushSync)===!0})}function me(l,u,c,v){v===void 0&&(v={});let S=Se(f.matches,u);ht(l),ne({errors:{[S.route.id]:c},fetchers:new Map(f.fetchers)},{flushSync:(v&&v.flushSync)===!0})}function or(l){return p.v7_fetcherPersist&&(Ze.set(l,(Ze.get(l)||0)+1),pe.has(l)&&pe.delete(l)),f.fetchers.get(l)||_a}function ht(l){let u=f.fetchers.get(l);ee.has(l)&&!(u&&u.state==="loading"&&ze.has(l))&&Re(l),$e.delete(l),ze.delete(l),he.delete(l),pe.delete(l),dt.delete(l),f.fetchers.delete(l)}function Rn(l){if(p.v7_fetcherPersist){let u=(Ze.get(l)||0)-1;u<=0?(Ze.delete(l),pe.add(l)):Ze.set(l,u)}else ht(l);ne({fetchers:new Map(f.fetchers)})}function Re(l){let u=ee.get(l);u&&(u.abort(),ee.delete(l))}function ir(l){for(let u of l){let c=or(u),v=De(c.data);f.fetchers.set(u,v)}}function lr(){let l=[],u=!1;for(let c of he){let v=f.fetchers.get(c);T(v,"Expected fetcher: "+c),v.state==="loading"&&(he.delete(c),l.push(c),u=!0)}return ir(l),u}function sr(l){let u=[];for(let[c,v]of ze)if(v<l){let S=f.fetchers.get(c);T(S,"Expected fetcher: "+c),S.state==="loading"&&(Re(c),ze.delete(c),u.push(c))}return ir(u),u.length>0}function Dn(l,u){let c=f.blockers.get(l)||Ye;return Le.get(l)!==u&&Le.set(l,u),c}function ur(l){f.blockers.delete(l),Le.delete(l)}function pt(l,u){let c=f.blockers.get(l)||Ye;T(c.state==="unblocked"&&u.state==="blocked"||c.state==="blocked"&&u.state==="blocked"||c.state==="blocked"&&u.state==="proceeding"||c.state==="blocked"&&u.state==="unblocked"||c.state==="proceeding"&&u.state==="unblocked","Invalid blocker state transition: "+c.state+" -> "+u.state);let v=new Map(f.blockers);v.set(l,u),ne({blockers:v})}function dr(l){let{currentLocation:u,nextLocation:c,historyAction:v}=l;if(Le.size===0)return;Le.size>1&&Ue(!1,"A router only supports one blocker at a time");let S=Array.from(Le.entries()),[L,U]=S[S.length-1],P=f.blockers.get(L);if(!(P&&P.state==="proceeding")&&U({currentLocation:u,nextLocation:c,historyAction:v}))return L}function Mt(l){let u=Y(404,{pathname:l}),c=d||o,{matches:v,route:S}=St(c);return Ot(),{notFoundMatches:v,route:S,error:u}}function Ot(l){let u=[];return _e.forEach((c,v)=>{(!l||l(v))&&(c.cancel(),u.push(v),_e.delete(v))}),u}function Sn(l,u,c){if(w=l,D=u,b=c||null,!F&&f.navigation===It){F=!0;let v=fr(f.location,f.matches);v!=null&&ne({restoreScrollPosition:v})}return()=>{w=null,D=null,b=null}}function cr(l,u){return b&&b(l,u.map(v=>Hr(v,f.loaderData)))||l.key}function xn(l,u){if(w&&D){let c=cr(l,u);w[c]=D()}}function fr(l,u){if(w){let c=cr(l,u),v=w[c];if(typeof v=="number")return v}return null}function mt(l,u,c){if(m)if(l){if(Object.keys(l[0].params).length>0)return{active:!0,matches:Dt(u,c,s,!0)}}else return{active:!0,matches:Dt(u,c,s,!0)||[]};return{active:!1,matches:null}}async function yt(l,u,c){if(!m)return{type:"success",matches:l};let v=l;for(;;){let S=d==null,L=d||o,U=i;try{await m({path:u,matches:v,patch:(x,j)=>{c.aborted||Sr(x,j,L,U,a)}})}catch(x){return{type:"error",error:x,partialMatches:v}}finally{S&&!c.aborted&&(o=[...o])}if(c.aborted)return{type:"aborted"};let P=ve(L,u,s);if(P)return{type:"success",matches:P};let _=Dt(L,u,s,!0);if(!_||v.length===_.length&&v.every((x,j)=>x.route.id===_[j].route.id))return{type:"success",matches:null};v=_}}function Pn(l){i={},d=at(l,a,void 0,i)}function Cn(l,u){let c=d==null;Sr(l,u,d||o,i,a),c&&(o=[...o],ne({}))}return V={get basename(){return s},get future(){return p},get state(){return f},get routes(){return o},get window(){return t},initialize:fn,subscribe:pn,enableScrollRestoration:Sn,navigate:rr,fetch:bn,revalidate:mn,createHref:l=>e.history.createHref(l),encodeLocation:l=>e.history.encodeLocation(l),getFetcher:or,deleteFetcher:Rn,dispose:hn,getBlocker:Dn,deleteBlocker:ur,patchRoutes:Cn,_internalFetchControllers:ee,_internalActiveDeferreds:_e,_internalSetRoutes:Pn},V}const La=Symbol("deferred");function Do(e,t){T(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let r={},n=(t?t.basename:null)||"/",a;if(t!=null&&t.mapRouteProperties)a=t.mapRouteProperties;else if(t!=null&&t.detectErrorBoundary){let y=t.detectErrorBoundary;a=w=>({hasErrorBoundary:y(w)})}else a=Xr;let i=B({v7_relativeSplatPath:!1,v7_throwAbortReason:!1},t?t.future:null),o=at(e,a,void 0,r);async function d(y,w){let{requestContext:b,skipLoaderErrorBubbling:D,dataStrategy:F}=w===void 0?{}:w,C=new URL(y.url),O=y.method,R=Fe("",Ie(C),null,"default"),V=ve(o,R,n);if(!Vt(O)&&O!=="HEAD"){let M=Y(405,{method:O}),{matches:A,route:I}=St(o);return{basename:n,location:R,matches:A,loaderData:{},actionData:null,errors:{[I.id]:M},statusCode:M.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}else if(!V){let M=Y(404,{pathname:R.pathname}),{matches:A,route:I}=St(o);return{basename:n,location:R,matches:A,loaderData:{},actionData:null,errors:{[I.id]:M},statusCode:M.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let f=await h(y,R,V,b,F||null,D===!0,null);return xe(f)?f:B({location:R,basename:n},f)}async function s(y,w){let{routeId:b,requestContext:D,dataStrategy:F}=w===void 0?{}:w,C=new URL(y.url),O=y.method,R=Fe("",Ie(C),null,"default"),V=ve(o,R,n);if(!Vt(O)&&O!=="HEAD"&&O!=="OPTIONS")throw Y(405,{method:O});if(!V)throw Y(404,{pathname:R.pathname});let f=b?V.find(Q=>Q.route.id===b):Te(V,R);if(b&&!f)throw Y(403,{pathname:R.pathname,routeId:b});if(!f)throw Y(404,{pathname:R.pathname});let M=await h(y,R,V,D,F||null,!1,f);if(xe(M))return M;let A=M.errors?Object.values(M.errors)[0]:void 0;if(A!==void 0)throw A;if(M.actionData)return Object.values(M.actionData)[0];if(M.loaderData){var I;let Q=Object.values(M.loaderData)[0];return(I=M.activeDeferreds)!=null&&I[f.route.id]&&(Q[La]=M.activeDeferreds[f.route.id]),Q}}async function h(y,w,b,D,F,C,O){T(y.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(se(y.method.toLowerCase()))return await m(y,b,O||Te(b,w),D,F,C,O!=null);let R=await p(y,b,D,F,C,O);return xe(R)?R:B({},R,{actionData:null,actionHeaders:{}})}catch(R){if(Fa(R)&&xe(R.result)){if(R.type===$.error)throw R.result;return R.result}if(Na(R))return R;throw R}}async function m(y,w,b,D,F,C,O){let R;if(!b.route.action&&!b.route.lazy){let M=Y(405,{method:y.method,pathname:new URL(y.url).pathname,routeId:b.route.id});if(O)throw M;R={type:$.error,error:M}}else R=(await E("action",y,[b],w,O,D,F))[b.route.id],y.signal.aborted&&wr(y,O,i);if(Pe(R))throw new Response(null,{status:R.response.status,headers:{Location:R.response.headers.get("Location")}});if(ge(R)){let M=Y(400,{type:"defer-action"});if(O)throw M;R={type:$.error,error:M}}if(O){if(re(R))throw R.error;return{matches:[b],loaderData:{},actionData:{[b.route.id]:R.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let V=new Request(y.url,{headers:y.headers,redirect:y.redirect,signal:y.signal});if(re(R)){let M=C?b:Se(w,b.route.id),A=await p(V,w,D,F,C,null,[M.route.id,R]);return B({},A,{statusCode:Xe(R.error)?R.error.status:R.statusCode!=null?R.statusCode:500,actionData:null,actionHeaders:B({},R.headers?{[b.route.id]:R.headers}:{})})}let f=await p(V,w,D,F,C,null);return B({},f,{actionData:{[b.route.id]:R.data}},R.statusCode?{statusCode:R.statusCode}:{},{actionHeaders:R.headers?{[b.route.id]:R.headers}:{}})}async function p(y,w,b,D,F,C,O){let R=C!=null;if(R&&!(C!=null&&C.route.loader)&&!(C!=null&&C.route.lazy))throw Y(400,{method:y.method,pathname:new URL(y.url).pathname,routeId:C?.route.id});let f=(C?[C]:O&&re(O[1])?$t(w,O[0]):w).filter(J=>J.route.loader||J.route.lazy);if(f.length===0)return{matches:w,loaderData:w.reduce((J,ue)=>Object.assign(J,{[ue.route.id]:null}),{}),errors:O&&re(O[1])?{[O[0]]:O[1].error}:null,statusCode:200,loaderHeaders:{},activeDeferreds:null};let M=await E("loader",y,f,w,R,b,D);y.signal.aborted&&wr(y,R,i);let A=new Map,I=an(w,M,O,A,F),Q=new Set(f.map(J=>J.route.id));return w.forEach(J=>{Q.has(J.route.id)||(I.loaderData[J.route.id]=null)}),B({},I,{matches:w,activeDeferreds:A.size>0?Object.fromEntries(A.entries()):null})}async function E(y,w,b,D,F,C,O){let R=await tn(O||en,y,null,w,b,D,null,r,a,C),V={};return await Promise.all(D.map(async f=>{if(!(f.route.id in R))return;let M=R[f.route.id];if(ln(M)){let A=M.result;throw nn(A,w,f.route.id,D,n,i.v7_relativeSplatPath)}if(xe(M.result)&&F)throw M;V[f.route.id]=await rn(M)})),V}return{dataRoutes:o,query:d,queryRoute:s}}function So(e,t,r){return B({},t,{statusCode:Xe(r)?r.status:500,errors:{[t._deepestRenderedBoundaryId||e[0].id]:r}})}function wr(e,t,r){if(r.v7_throwAbortReason&&e.signal.reason!==void 0)throw e.signal.reason;let n=t?"queryRoute":"query";throw new Error(n+"() call aborted: "+e.method+" "+e.url)}function ja(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function zt(e,t,r,n,a,i,o,d){let s,h;if(o){s=[];for(let p of t)if(s.push(p),p.route.id===o){h=p;break}}else s=t,h=t[t.length-1];let m=_t(a||".",Ct(s,i),Ne(e.pathname,r)||e.pathname,d==="path");if(a==null&&(m.search=e.search,m.hash=e.hash),(a==null||a===""||a===".")&&h){let p=qt(m.search);if(h.route.index&&!p)m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index";else if(!h.route.index&&p){let E=new URLSearchParams(m.search),y=E.getAll("index");E.delete("index"),y.filter(b=>b).forEach(b=>E.append("index",b));let w=E.toString();m.search=w?"?"+w:""}}return n&&r!=="/"&&(m.pathname=m.pathname==="/"?r:be([r,m.pathname])),Ie(m)}function Er(e,t,r,n){if(!n||!ja(n))return{path:r};if(n.formMethod&&!Vt(n.formMethod))return{path:r,error:Y(405,{method:n.formMethod})};let a=()=>({path:r,error:Y(400,{type:"invalid-body"})}),i=n.formMethod||"get",o=e?i.toUpperCase():i.toLowerCase(),d=on(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!se(o))return a();let E=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((y,w)=>{let[b,D]=w;return""+y+b+"="+D+`
`},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:d,formEncType:n.formEncType,formData:void 0,json:void 0,text:E}}}else if(n.formEncType==="application/json"){if(!se(o))return a();try{let E=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:E,text:void 0}}}catch{return a()}}}T(typeof FormData=="function","FormData is not available in this environment");let s,h;if(n.formData)s=Wt(n.formData),h=n.formData;else if(n.body instanceof FormData)s=Wt(n.body),h=n.body;else if(n.body instanceof URLSearchParams)s=n.body,h=Pr(s);else if(n.body==null)s=new URLSearchParams,h=new FormData;else try{s=new URLSearchParams(n.body),h=Pr(s)}catch{return a()}let m={formMethod:o,formAction:d,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:h,json:void 0,text:void 0};if(se(m.formMethod))return{path:r,submission:m};let p=we(r);return t&&p.search&&qt(p.search)&&s.append("index",""),p.search="?"+s,{path:Ie(p),submission:m}}function $t(e,t,r){r===void 0&&(r=!1);let n=e.findIndex(a=>a.route.id===t);return n>=0?e.slice(0,r?n+1:n):e}function Rr(e,t,r,n,a,i,o,d,s,h,m,p,E,y,w,b){let D=b?re(b[1])?b[1].error:b[1].data:void 0,F=e.createURL(t.location),C=e.createURL(a),O=r;i&&t.errors?O=$t(r,Object.keys(t.errors)[0],!0):b&&re(b[1])&&(O=$t(r,b[0]));let R=b?b[1].statusCode:void 0,V=o&&R&&R>=400,f=O.filter((A,I)=>{let{route:Q}=A;if(Q.lazy)return!0;if(Q.loader==null)return!1;if(i)return Ht(Q,t.loaderData,t.errors);if(Ma(t.loaderData,t.matches[I],A)||s.some(ie=>ie===A.route.id))return!0;let J=t.matches[I],ue=A;return Dr(A,B({currentUrl:F,currentParams:J.params,nextUrl:C,nextParams:ue.params},n,{actionResult:D,actionStatus:R,defaultShouldRevalidate:V?!1:d||F.pathname+F.search===C.pathname+C.search||F.search!==C.search||Zr(J,ue)}))}),M=[];return p.forEach((A,I)=>{if(i||!r.some(fe=>fe.route.id===A.routeId)||m.has(I))return;let Q=ve(y,A.path,w);if(!Q){M.push({key:I,routeId:A.routeId,path:A.path,matches:null,match:null,controller:null});return}let J=t.fetchers.get(I),ue=Te(Q,A.path),ie=!1;E.has(I)?ie=!1:h.has(I)?(h.delete(I),ie=!0):J&&J.state!=="idle"&&J.data===void 0?ie=d:ie=Dr(ue,B({currentUrl:F,currentParams:t.matches[t.matches.length-1].params,nextUrl:C,nextParams:r[r.length-1].params},n,{actionResult:D,actionStatus:R,defaultShouldRevalidate:V?!1:d})),ie&&M.push({key:I,routeId:A.routeId,path:A.path,matches:Q,match:ue,controller:new AbortController})}),[f,M]}function Ht(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=t!=null&&t[e.id]!==void 0,a=r!=null&&r[e.id]!==void 0;return!n&&a?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!n&&!a}function Ma(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function Zr(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Dr(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function Sr(e,t,r,n,a){var i;let o;if(e){let h=n[e];T(h,"No route found to patch children into: routeId = "+e),h.children||(h.children=[]),o=h.children}else o=r;let d=t.filter(h=>!o.some(m=>qr(h,m))),s=at(d,a,[e||"_","patch",String(((i=o)==null?void 0:i.length)||"0")],n);o.push(...s)}function qr(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((r,n)=>{var a;return(a=t.children)==null?void 0:a.some(i=>qr(r,i))}):!1}async function Oa(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];T(a,"No route found in manifest");let i={};for(let o in n){let s=a[o]!==void 0&&o!=="hasErrorBoundary";Ue(!s,'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.')),!s&&!ta.has(o)&&(i[o]=n[o])}Object.assign(a,i),Object.assign(a,B({},t(a),{lazy:void 0}))}async function en(e){let{matches:t}=e,r=t.filter(a=>a.shouldLoad);return(await Promise.all(r.map(a=>a.resolve()))).reduce((a,i,o)=>Object.assign(a,{[r[o].route.id]:i}),{})}async function tn(e,t,r,n,a,i,o,d,s,h){let m=i.map(y=>y.route.lazy?Oa(y.route,s,d):void 0),p=i.map((y,w)=>{let b=m[w],D=a.some(C=>C.route.id===y.route.id);return B({},y,{shouldLoad:D,resolve:async C=>(C&&n.method==="GET"&&(y.route.lazy||y.route.loader)&&(D=!0),D?Ta(t,n,y,b,C,h):Promise.resolve({type:$.data,result:void 0}))})}),E=await e({matches:p,request:n,params:i[0].params,fetcherKey:o,context:h});try{await Promise.all(m)}catch{}return E}async function Ta(e,t,r,n,a,i){let o,d,s=h=>{let m,p=new Promise((w,b)=>m=b);d=()=>m(),t.signal.addEventListener("abort",d);let E=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:i},...w!==void 0?[w]:[]),y=(async()=>{try{return{type:"data",result:await(a?a(b=>E(b)):E())}}catch(w){return{type:"error",result:w}}})();return Promise.race([y,p])};try{let h=r.route[e];if(n)if(h){let m,[p]=await Promise.all([s(h).catch(E=>{m=E}),n]);if(m!==void 0)throw m;o=p}else if(await n,h=r.route[e],h)o=await s(h);else if(e==="action"){let m=new URL(t.url),p=m.pathname+m.search;throw Y(405,{method:t.method,pathname:p,routeId:r.route.id})}else return{type:$.data,result:void 0};else if(h)o=await s(h);else{let m=new URL(t.url),p=m.pathname+m.search;throw Y(404,{pathname:p})}T(o.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:$.error,result:h}}finally{d&&t.signal.removeEventListener("abort",d)}return o}async function rn(e){let{result:t,type:r}=e;if(xe(t)){let h;try{let m=t.headers.get("Content-Type");m&&/\bapplication\/json\b/.test(m)?t.body==null?h=null:h=await t.json():h=await t.text()}catch(m){return{type:$.error,error:m}}return r===$.error?{type:$.error,error:new Bt(t.status,t.statusText,h),statusCode:t.status,headers:t.headers}:{type:$.data,data:h,statusCode:t.status,headers:t.headers}}if(r===$.error){if(jr(t)){var n;if(t.data instanceof Error){var a;return{type:$.error,error:t.data,statusCode:(a=t.init)==null?void 0:a.status}}t=new Bt(((n=t.init)==null?void 0:n.status)||500,void 0,t.data)}return{type:$.error,error:t,statusCode:Xe(t)?t.status:void 0}}if(Ia(t)){var i,o;return{type:$.deferred,deferredData:t,statusCode:(i=t.init)==null?void 0:i.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}if(jr(t)){var d,s;return{type:$.data,data:t.data,statusCode:(d=t.init)==null?void 0:d.status,headers:(s=t.init)!=null&&s.headers?new Headers(t.init.headers):void 0}}return{type:$.data,data:t}}function nn(e,t,r,n,a,i){let o=e.headers.get("Location");if(T(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!Qt.test(o)){let d=n.slice(0,n.findIndex(s=>s.route.id===r)+1);o=zt(new URL(t.url),d,a,!0,o,i),e.headers.set("Location",o)}return e}function xr(e,t,r){if(Qt.test(e)){let n=e,a=n.startsWith("//")?new URL(t.protocol+n):new URL(n),i=Ne(a.pathname,r)!=null;if(a.origin===t.origin&&i)return a.pathname+a.search+a.hash}return e}function Je(e,t,r,n){let a=e.createURL(on(t)).toString(),i={signal:r};if(n&&se(n.formMethod)){let{formMethod:o,formEncType:d}=n;i.method=o.toUpperCase(),d==="application/json"?(i.headers=new Headers({"Content-Type":d}),i.body=JSON.stringify(n.json)):d==="text/plain"?i.body=n.text:d==="application/x-www-form-urlencoded"&&n.formData?i.body=Wt(n.formData):i.body=n.formData}return new Request(a,i)}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 Pr(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function an(e,t,r,n,a){let i={},o=null,d,s=!1,h={},m=r&&re(r[1])?r[1].error:void 0;return e.forEach(p=>{if(!(p.route.id in t))return;let E=p.route.id,y=t[E];if(T(!Pe(y),"Cannot handle redirect results in processLoaderData"),re(y)){let w=y.error;if(m!==void 0&&(w=m,m=void 0),o=o||{},a)o[E]=w;else{let b=Se(e,E);o[b.route.id]==null&&(o[b.route.id]=w)}i[E]=void 0,s||(s=!0,d=Xe(y.error)?y.error.status:500),y.headers&&(h[E]=y.headers)}else ge(y)?(n.set(E,y.deferredData),i[E]=y.deferredData.data,y.statusCode!=null&&y.statusCode!==200&&!s&&(d=y.statusCode),y.headers&&(h[E]=y.headers)):(i[E]=y.data,y.statusCode&&y.statusCode!==200&&!s&&(d=y.statusCode),y.headers&&(h[E]=y.headers))}),m!==void 0&&r&&(o={[r[0]]:m},i[r[0]]=void 0),{loaderData:i,errors:o,statusCode:d||200,loaderHeaders:h}}function Cr(e,t,r,n,a,i,o){let{loaderData:d,errors:s}=an(t,r,n,o,!1);return a.forEach(h=>{let{key:m,match:p,controller:E}=h,y=i[m];if(T(y,"Did not find corresponding fetcher result"),!(E&&E.signal.aborted))if(re(y)){let w=Se(e.matches,p?.route.id);s&&s[w.route.id]||(s=B({},s,{[w.route.id]:y.error})),e.fetchers.delete(m)}else if(Pe(y))T(!1,"Unhandled fetcher revalidation redirect");else if(ge(y))T(!1,"Unhandled fetcher deferred data");else{let w=De(y.data);e.fetchers.set(m,w)}}),{loaderData:d,errors:s}}function _r(e,t,r,n){let a=B({},t);for(let i of r){let o=i.route.id;if(t.hasOwnProperty(o)?t[o]!==void 0&&(a[o]=t[o]):e[o]!==void 0&&i.route.loader&&(a[o]=e[o]),n&&n.hasOwnProperty(o))break}return a}function Lr(e){return e?re(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Se(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 St(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 Y(e,t){let{pathname:r,routeId:n,method:a,type:i,message:o}=t===void 0?{}:t,d="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(d="Bad Request",a&&r&&n?s="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.":i==="defer-action"?s="defer() is not supported in actions":i==="invalid-body"&&(s="Unable to encode submission body")):e===403?(d="Forbidden",s='Route "'+n+'" does not match URL "'+r+'"'):e===404?(d="Not Found",s='No route matches URL "'+r+'"'):e===405&&(d="Method Not Allowed",a&&r&&n?s="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&&(s='Invalid request method "'+a.toUpperCase()+'"')),new Bt(e||500,d,new Error(s),!0)}function wt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(Pe(a))return{key:n,result:a}}}function on(e){let t=typeof e=="string"?we(e):e;return Ie(B({},t,{hash:""}))}function Ua(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Fa(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type===$.data||e.type===$.error)}function ln(e){return xe(e.result)&&Pa.has(e.result.status)}function ge(e){return e.type===$.deferred}function re(e){return e.type===$.error}function Pe(e){return(e&&e.type)===$.redirect}function jr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Ia(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 xe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Na(e){if(!xe(e))return!1;let t=e.status,r=e.headers.get("Location");return t>=300&&t<=399&&r!=null}function Vt(e){return xa.has(e.toLowerCase())}function se(e){return Da.has(e.toLowerCase())}async function ka(e,t,r,n,a){let i=Object.entries(t);for(let o=0;o<i.length;o++){let[d,s]=i[o],h=e.find(E=>E?.route.id===d);if(!h)continue;let m=n.find(E=>E.route.id===h.route.id),p=m!=null&&!Zr(m,h)&&(a&&a[h.route.id])!==void 0;ge(s)&&p&&await Zt(s,r,!1).then(E=>{E&&(t[d]=E)})}}async function Aa(e,t,r){for(let n=0;n<r.length;n++){let{key:a,routeId:i,controller:o}=r[n],d=t[a];e.find(h=>h?.route.id===i)&&ge(d)&&(T(o,"Expected an AbortController for revalidating fetcher deferred result"),await Zt(d,o.signal,!0).then(h=>{h&&(t[a]=h)}))}}async function Zt(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:$.data,data:e.deferredData.unwrappedData}}catch(a){return{type:$.error,error:a}}return{type:$.data,data:e.deferredData.data}}}function qt(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Te(e,t){let r=typeof t=="string"?we(t).search:t.search;if(e[e.length-1].route.index&&qt(r||""))return e[e.length-1];let n=Jr(e);return n[n.length-1]}function Mr(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:i,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(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:i,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 Nt(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 Ba(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 nt(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 za(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 De(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 $a(e,t){try{let r=e.sessionStorage.getItem(Qr);if(r){let n=JSON.parse(r);for(let[a,i]of Object.entries(n||{}))i&&Array.isArray(i)&&t.set(a,new Set(i||[]))}}catch{}}function Ha(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(Qr,JSON.stringify(r))}catch(n){Ue(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/**
 * React Router v6.27.0
 *
 * 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 ke(){return ke=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},ke.apply(this,arguments)}const er=g.createContext(null),Wa=g.createContext(null),xt=g.createContext(null),Ae=g.createContext(null),it=g.createContext(null),ce=g.createContext({outlet:null,matches:[],isDataRoute:!1}),sn=g.createContext(null);function xo(e,t){let{relative:r}=t===void 0?{}:t;Be()||T(!1);let{basename:n,navigator:a}=g.useContext(Ae),{hash:i,pathname:o,search:d}=Ya(e,{relative:r}),s=o;return n!=="/"&&(s=o==="/"?n:be([n,o])),a.createHref({pathname:s,search:d,hash:i})}function Be(){return g.useContext(it)!=null}function lt(){return Be()||T(!1),g.useContext(it).location}function Po(){return g.useContext(it).navigationType}function Co(e){Be()||T(!1);let{pathname:t}=lt();return g.useMemo(()=>kt(e,Kr(t)),[t,e])}function un(e){g.useContext(Ae).static||g.useLayoutEffect(e)}function Va(){let{isDataRoute:e}=g.useContext(ce);return e?oo():Ka()}function Ka(){Be()||T(!1);let e=g.useContext(er),{basename:t,future:r,navigator:n}=g.useContext(Ae),{matches:a}=g.useContext(ce),{pathname:i}=lt(),o=JSON.stringify(Ct(a,r.v7_relativeSplatPath)),d=g.useRef(!1);return un(()=>{d.current=!0}),g.useCallback(function(h,m){if(m===void 0&&(m={}),!d.current)return;if(typeof h=="number"){n.go(h);return}let p=_t(h,JSON.parse(o),i,m.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:be([t,p.pathname])),(m.replace?n.replace:n.push)(p,m.state,m)},[t,n,o,i,e])}const dn=g.createContext(null);function _o(){return g.useContext(dn)}function Ja(e){let t=g.useContext(ce).outlet;return t&&g.createElement(dn.Provider,{value:e},t)}function Lo(){let{matches:e}=g.useContext(ce),t=e[e.length-1];return t?t.params:{}}function Ya(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=g.useContext(Ae),{matches:a}=g.useContext(ce),{pathname:i}=lt(),o=JSON.stringify(Ct(a,n.v7_relativeSplatPath));return g.useMemo(()=>_t(e,JSON.parse(o),i,r==="path"),[e,o,i,r])}function Ga(e,t){return Xa(e,t)}function Xa(e,t,r,n){Be()||T(!1);let{navigator:a}=g.useContext(Ae),{matches:i}=g.useContext(ce),o=i[i.length-1],d=o?o.params:{};o&&o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let h=lt(),m;if(t){var p;let D=typeof t=="string"?we(t):t;s==="/"||(p=D.pathname)!=null&&p.startsWith(s)||T(!1),m=D}else m=h;let E=m.pathname||"/",y=E;if(s!=="/"){let D=s.replace(/^\//,"").split("/");y="/"+E.replace(/^\//,"").split("/").slice(D.length).join("/")}let w=ve(e,{pathname:y}),b=cn(w&&w.map(D=>Object.assign({},D,{params:Object.assign({},d,D.params),pathname:be([s,a.encodeLocation?a.encodeLocation(D.pathname).pathname:D.pathname]),pathnameBase:D.pathnameBase==="/"?s:be([s,a.encodeLocation?a.encodeLocation(D.pathnameBase).pathname:D.pathnameBase])})),i,r,n);return t&&b?g.createElement(it.Provider,{value:{location:ke({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:Z.Pop}},b):b}function Qa(){let e=ro(),t=Xe(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 g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),r?g.createElement("pre",{style:a},r):null,null)}const Za=g.createElement(Qa,null);class qa extends g.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?g.createElement(ce.Provider,{value:this.props.routeContext},g.createElement(sn.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function eo(e){let{routeContext:t,match:r,children:n}=e,a=g.useContext(er);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),g.createElement(ce.Provider,{value:t},n)}function cn(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var i;if(!r)return null;if(r.errors)e=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,d=(a=r)==null?void 0:a.errors;if(d!=null){let m=o.findIndex(p=>p.route.id&&d?.[p.route.id]!==void 0);m>=0||T(!1),o=o.slice(0,Math.min(o.length,m+1))}let s=!1,h=-1;if(r&&n&&n.v7_partialHydration)for(let m=0;m<o.length;m++){let p=o[m];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(h=m),p.route.id){let{loaderData:E,errors:y}=r,w=p.route.loader&&E[p.route.id]===void 0&&(!y||y[p.route.id]===void 0);if(p.route.lazy||w){s=!0,h>=0?o=o.slice(0,h+1):o=[o[0]];break}}}return o.reduceRight((m,p,E)=>{let y,w=!1,b=null,D=null;r&&(y=d&&p.route.id?d[p.route.id]:void 0,b=p.route.errorElement||Za,s&&(h<0&&E===0?(w=!0,D=null):h===E&&(w=!0,D=p.route.hydrateFallbackElement||null)));let F=t.concat(o.slice(0,E+1)),C=()=>{let O;return y?O=b:w?O=D:p.route.Component?O=g.createElement(p.route.Component,null):p.route.element?O=p.route.element:O=m,g.createElement(eo,{match:p,routeContext:{outlet:m,matches:F,isDataRoute:r!=null},children:O})};return r&&(p.route.ErrorBoundary||p.route.errorElement||E===0)?g.createElement(qa,{location:r.location,revalidation:r.revalidation,component:b,error:y,children:C(),routeContext:{outlet:null,matches:F,isDataRoute:!0}}):C()},null)}var Lt=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Lt||{}),oe=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}(oe||{});function tr(e){let t=g.useContext(er);return t||T(!1),t}function Ce(e){let t=g.useContext(Wa);return t||T(!1),t}function to(e){let t=g.useContext(ce);return t||T(!1),t}function st(e){let t=to(),r=t.matches[t.matches.length-1];return r.route.id||T(!1),r.route.id}function jo(){return st(oe.UseRouteId)}function Mo(){return Ce(oe.UseNavigation).navigation}function Oo(){let e=tr(Lt.UseRevalidator),t=Ce(oe.UseRevalidator);return g.useMemo(()=>({revalidate:e.router.revalidate,state:t.revalidation}),[e.router.revalidate,t.revalidation])}function To(){let{matches:e,loaderData:t}=Ce(oe.UseMatches);return g.useMemo(()=>e.map(r=>Hr(r,t)),[e,t])}function Uo(){let e=Ce(oe.UseLoaderData),t=st(oe.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function Fo(e){return Ce(oe.UseRouteLoaderData).loaderData[e]}function Io(){let e=Ce(oe.UseActionData),t=st(oe.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function ro(){var e;let t=g.useContext(sn),r=Ce(oe.UseRouteError),n=st(oe.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function no(){let e=g.useContext(xt);return e?._data}function No(){let e=g.useContext(xt);return e?._error}let ao=0;function ko(e){let{router:t,basename:r}=tr(Lt.UseBlocker),n=Ce(oe.UseBlocker),[a,i]=g.useState(""),o=g.useCallback(d=>{if(typeof e!="function")return!!e;if(r==="/")return e(d);let{currentLocation:s,nextLocation:h,historyAction:m}=d;return e({currentLocation:ke({},s,{pathname:Ne(s.pathname,r)||s.pathname}),nextLocation:ke({},h,{pathname:Ne(h.pathname,r)||h.pathname}),historyAction:m})},[r,e]);return g.useEffect(()=>{let d=String(++ao);return i(d),()=>t.deleteBlocker(d)},[t]),g.useEffect(()=>{a!==""&&t.getBlocker(a,o)},[t,a,o]),a&&n.blockers.has(a)?n.blockers.get(a):Ye}function oo(){let{router:e}=tr(Lt.UseNavigateStable),t=st(oe.UseNavigateStable),r=g.useRef(!1);return un(()=>{r.current=!0}),g.useCallback(function(a,i){i===void 0&&(i={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,ke({fromRouteId:t},i)))},[e,t])}function Ao(e){let{to:t,replace:r,state:n,relative:a}=e;Be()||T(!1);let{future:i,static:o}=g.useContext(Ae),{matches:d}=g.useContext(ce),{pathname:s}=lt(),h=Va(),m=_t(t,Ct(d,i.v7_relativeSplatPath),s,a==="path"),p=JSON.stringify(m);return g.useEffect(()=>h(JSON.parse(p),{replace:r,state:n,relative:a}),[h,p,a,r,n]),null}function Bo(e){return Ja(e.context)}function io(e){T(!1)}function zo(e){let{basename:t="/",children:r=null,location:n,navigationType:a=Z.Pop,navigator:i,static:o=!1,future:d}=e;Be()&&T(!1);let s=t.replace(/^\/*/,"/"),h=g.useMemo(()=>({basename:s,navigator:i,static:o,future:ke({v7_relativeSplatPath:!1},d)}),[s,d,i,o]);typeof n=="string"&&(n=we(n));let{pathname:m="/",search:p="",hash:E="",state:y=null,key:w="default"}=n,b=g.useMemo(()=>{let D=Ne(m,s);return D==null?null:{location:{pathname:D,search:p,hash:E,state:y,key:w},navigationType:a}},[s,m,p,E,y,w,a]);return b==null?null:g.createElement(Ae.Provider,{value:h},g.createElement(it.Provider,{children:r,value:b}))}function $o(e){let{children:t,location:r}=e;return Ga(Kt(t),r)}function Ho(e){let{children:t,errorElement:r,resolve:n}=e;return g.createElement(so,{resolve:n,errorElement:r},g.createElement(uo,null,t))}var le=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(le||{});const lo=new Promise(()=>{});class so extends g.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,i=le.pending;if(!(n instanceof Promise))i=le.success,a=Promise.resolve(),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_data",{get:()=>n});else if(this.state.error){i=le.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,i="_error"in a?le.error:"_data"in a?le.success:le.pending):(i=le.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(i===le.error&&a._error instanceof At)throw lo;if(i===le.error&&!r)throw a._error;if(i===le.error)return g.createElement(xt.Provider,{value:a,children:r});if(i===le.success)return g.createElement(xt.Provider,{value:a,children:t});throw a}}function uo(e){let{children:t}=e,r=no(),n=typeof t=="function"?t(r):t;return g.createElement(g.Fragment,null,n)}function Kt(e,t){t===void 0&&(t=[]);let r=[];return g.Children.forEach(e,(n,a)=>{if(!g.isValidElement(n))return;let i=[...t,a];if(n.type===g.Fragment){r.push.apply(r,Kt(n.props.children,i));return}n.type!==io&&T(!1),!n.props.index||!n.props.children||T(!1);let o={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=Kt(n.props.children,i)),r.push(o)}),r}function Wo(e){return cn(e)}function Vo(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:g.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:g.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:g.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}export{co as $,ce as A,T as B,be as C,er as D,Bt as E,kt as F,Mo as G,ko as H,_a as I,bo as J,Yr as K,Eo as L,wo as M,Ae as N,Bo as O,go as P,we as Q,Kn as R,At as S,wa as T,La as U,ro as V,Ho as W,Uo as X,Io as Y,No as Z,Fo as _,lt as a,at as a0,Z as a1,It as a2,Ye as a3,Ao as a4,io as a5,$o as a6,Kt as a7,yo as a8,Wo as a9,pa as aa,no as ab,Be as ac,Co as ad,Po as ae,Ja as af,_o as ag,Ga as ah,To as b,Oo as c,Lo as d,Ro as e,mo as f,Vo as g,fo as h,jn as i,po as j,ho as k,Xe as l,ve as m,vo as n,So as o,Do as p,Wa as q,g as r,Ne as s,zo as t,Va as u,Xa as v,xo as w,Ya as x,Ie as y,jo as z};
