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