PageSourceSearch

https://www.lemieszewski.com/assets/chunk-OB3PAWPO-CxA_6mHl.js

js lemieszewski.com collected 2026-10-04 11:08:35 UTC 130,562 bytes, 51 lines download raw bytes

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

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.