vendor: 6,591 bytes, line 1
1function e(e,t){for(var r=0;r<t.length;r++){const n=t[r];if("string"!=typeof n&&!Array.isArray(n))for(const t in n)if("default"!==t&&!(t in e)){const r=Object.getOwnPropertyDescriptor(n,t);r&&Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){var r=!1;try{r=this instanceof e}catch{}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var a,o,i={exports:{}},l={};var s,u,c=(o||(o=1,i.exports=function(){if(a)return l;a=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(t,r,n){var a=null;if(void 0!==n&&(a=""+n),void 0!==r.key&&(a=""+r.key),"key"in r)for(var o in n={},r)"key"!==o&&(n[o]=r[o]);else n=r;return r=n.ref,{$$typeof:e,type:t,key:a,ref:void 0!==r?r:null,props:n}}return l.Fragment=t,l.jsx=r,l.jsxs=r,l}()),i.exports),d={exports:{}},h={};function f(){if(s)return h;s=1;var e=Symbol.for("react.transitional.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.consumer"),i=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),p=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,v={};function g(e,t,r){this.props=e,this.context=t,this.refs=v,this.updater=r||m}function w(){}function b(e,t,r){this.props=e,this.context=t,this.refs=v,this.updater=r||m}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},w.prototype=g.prototype;var E=b.prototype=new w;E.constructor=b,y(E,g.prototype),E.isPureReactComponent=!0;var R=Array.isArray;function S(){}var x={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function L(t,r,n){var a=n.ref;return{$$typeof:e,type:t,key:r,ref:void 0!==a?a:null,props:n}}function C(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var M=/\/+/g;function P(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(r=""+e.key,n={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return n[e]})):t.toString(36);var r,n}function T(r,n,a,o,i){var l=typeof r;"undefined"!==l&&"boolean"!==l||(r=null);var s,u,c=!1;if(null===r)c=!0;else switch(l){case"bigint":case"string":case"number":c=!0;break;case"object":switch(r.$$typeof){case e:case t:c=!0;break;case d:return T((c=r._init)(r._payload),n,a,o,i)}}if(c)return i=i(r),c=""===o?"."+P(r,0):o,R(i)?(a="",null!=c&&(a=c.replace(M,"$&/")+"/"),T(i,n,a,"",function(e){return e})):null!=i&&(C(i)&&(s=i,u=a+(null==i.key||r&&r.key===i.key?"":(""+i.key).replace(M,"$&/")+"/")+c,i=L(s.type,u,s.props)),n.push(i)),1;c=0;var h,f=""===o?".":o+":";if(R(r))for(var m=0;m<r.length;m++)c+=T(o=r[m],n,a,l=f+P(o,m),i);else if("function"==typeof(m=null===(h=r)||"object"!=typeof h?null:"function"==typeof(h=p&&h[p]||h["@@iterator"])?h:null))for(r=m.call(r),m=0;!(o=r.next()).done;)c+=T(o=o.value,n,a,l=f+P(o,m++),i);else if("object"===l){if("function"==typeof r.then)return T(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(S,S):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(r),n,a,o,i);throw n=String(r),Error("Objects are not valid as a React child (found: "+("[object Object]"===n?"object with keys {"+Object.keys(r).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.")}return c}function O(e,t,r){if(null==e)return e;var n=[],a=0;return T(e,n,"","",function(e){return t.call(r,e,a++)}),n}function D(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var $="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e)},A={map:O,forEach:function(e,t,r){O(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return O(e,function(){t++}),t},toArray:function(e){return O(e,function(e){return e})||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};return h.Activity=f,h.Children=A,h.Component=g,h.Fragment=r,h.Profiler=a,h.PureComponent=b,h.StrictMode=n,h.Suspense=u,h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=x,h.__COMPILER_RUNTIME={__proto__:null,c:function(e){return x.H.useMemoCache(e)}},h.cache=function(e){return function(){return e.apply(null,arguments)}},h.cacheSignal=function(){return null},h.cloneElement=function(e,t,r){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var n=y({},e.props),a=e.key;if(null!=t)for(o in void 0!==t.key&&(a=""+t.key),t)!k.call(t,o)||"key"===o||"__self"===o||"__source"===o||"ref"===o&&void 0===t.ref||(n[o]=t[o
1]);var o=arguments.length-2;if(1===o)n.children=r;else if(1<o){for(var i=Array(o),l=0;l<o;l++)i[l]=arguments[l+2];n.children=i}return L(e.type,a,n)},h.createContext=function(e){return(e={$$typeof:i,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:o,_context:e},e},h.createElement=function(e,t,r){var n,a={},o=null;if(null!=t)for(n in void 0!==t.key&&(o=""+t.key),t)k.call(t,n)&&"key"!==n&&"__self"!==n&&"__source"!==n&&(a[n]=t[n]);var i=arguments.length-2;if(1===i)a.children=r;else if(1<i){for(var l=Array(i),s=0;s<i;s++)l[s]=arguments[s+2];a.children=l}if(e&&e.defaultProps)for(n in i=e.defaultProps)void 0===a[n]&&(a[n]=i[n]);return L(e,o,a)},h.createRef=function(){return{current:null}},h.forwardRef=function(e){return{$$typeof:l,render:e}},h.isValidElement=C,h.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:D}},h.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},h.startTransition=function(e){var t=x.T,r={};x.T=r;try{var n=e(),a=x.S;null!==a&&a(r,n),"object"==typeof n&&null!==n&&"function"==typeof n.then&&n.then(S,$)}catch(o){$(o)}finally{null!==t&&null!==r.types&&(t.types=r.types),x.T=t}},h.unstable_useCacheRefresh=function(){return x.H.useCacheRefresh()},h.use=function(e){return x.H.use(e)},h.useActionState=function(e,t,r){return x.H.useActionState(e,t,r)},h.useCallback=function(e,t){return x.H.useCallback(e,t)},h.useContext=function(e){return x.H.useContext(e)},h.useDebugValue=function(){},h.useDeferredValue=function(e,t){return x.H.useDeferredValue(e,t)},h.useEffect=function(e,t){return x.H.useEffect(e,t)},h.useEffectEvent=function(e){return x.H.useEffectEvent(e)},h.useId=function(){return x.H.useId()},h.useImperativeHandle=function(e,t,r){return x.H.useImperativeHandle(e,t,r)},h.useInsertionEffect=function(e,t){return x.H.useInsertionEffect(e,t)},h.useLayoutEffect=function(e,t){return x.H.useLayoutEffect(e,t)},h.useMemo=function(e,t){return x.H.useMemo(e,t)},h.useOptimistic=function(e,t){return x.H.useOptimistic(e,t)},h.useReducer=function(e,t,r){return x.H.useReducer(e,t,r)},h.useRef=function(e){return x.H.useRef(e)},h.useState=function(e){return x.H.useState(e)},h.useSyncExternalStore=function(e,t,r){return x.H.useSyncExternalStore(e,t,r)},h.useTransition=function(){return x.H.useTransition()},h.version="19.2.8",h}function p(){return u||(u=1,d.exports=f()),d.exports}var m=p();const y=r(m),v=e({__proto__:null,default:y},[m]);var g,w=e=>{throw TypeError(e)},b=(e,t,r)=>t.has(e)||w("Cannot "+r),E=(e,t,r)=>(b(e,t,"read from private field"),r?r.call(e):t.get(e)),R=(e,t,r)=>t.has(e)?w("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),S=(e,t,r,n)=>(b(e,t,"write to private field"),t.set(e,r),r),x="popstate";function k(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function L(e={}){return function(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,l="POP",s=null,u=c();null==u&&(u=0,i.replaceState({...i.state,idx:u},""));function c(){return(i.state||{idx:null}).idx}function d(){l="POP";let e=c(),t=null==e?null:e-u;u=e,s&&s({action:l,location:m.location,delta:t})}function h(e,t){l="PUSH";let r=k(e)?e:T(m.location,e,t);u=c()+1;let n=P(r,u),d=m.createHref(r.mask||r);try{i.pushState(n,"",d)}catch(h){if(h instanceof DOMException&&"DataCloneError"===h.name)throw h;a.location.assign(d)}o&&s&&s({action:l,location:m.location,delta:1})}function f(e,t){l="REPLACE";let r=k(e)?e:T(m.location,e,t);u=c();let n=P(r,u),a=m.createHref(r.mask||r);i.replaceState(n,"",a),o&&s&&s({action:l,location:m.location,delta:0})}function p(e){return $(a,e)}let m={get action(){return l},get location(){return e(a,i)},listen(e){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(x,d),s=e,()=>{a.removeEventListener(x,d),s=null}},createHref:e=>t(a,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:h,replace:f,go:e=>i.go(e)};return m}(function(e,t){let r=t.state?.masked,{pathname:n,search:a,hash:o}=r||e.location;return T("",{pathname:n,search:a,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default",r?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)},function(e,t){return"string"==typeof t?t:O(t)},0,e)}function C(e,t){if(!1===e||null==e)throw new Error(t)}function M(e,t){if(!e)try{throw new Error(t)}catch(r){}}function P(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 T(e,t,r=null,n,a){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?D(t):t,state:r,key:t&&t.key||n||Math.random().toString(36).substring(2,10),mask:a}}function O({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"
1===r.charAt(0)?r:"#"+r),e}function D(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 $(e,t,r=!1){let n="http://localhost";e&&(n="null"!==e.location.origin?e.location.origin:e.location.href),C(n,"No window.location.(origin|href) available to create URL");let a="string"==typeof t?t:O(t);return a=a.replace(/ $/,"%20"),!r&&a.startsWith("//")&&(a=n+a),new URL(a,n)}var A=class{constructor(e){if(R(this,g,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(E(this,g).has(e))return E(this,g).get(e);if(void 0!==e.defaultValue)return e.defaultValue;throw new Error("No value found for context")}set(e,t){E(this,g).set(e,t)}};g=new WeakMap;var j=new Set(["lazy","caseSensitive","path","id","index","children"]);var _=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function N(e){return _.has(e)}function F(e,t,r=[],n={},a=!1){return e.map((e,o)=>{let i=[...r,String(o)],l="string"==typeof e.id?e.id:i.join("-");if(C(!0!==e.index||!e.children,"Cannot specify children on an index route"),C(a||!n[l],`Found a route id collision on i
1d "${l}". Route id's must be globally unique within Data Router usages`),function(e){return!0===e.index}(e)){let r={...e,id:l};return n[l]=H(r,t(r)),r}{let r={...e,id:l,children:void 0};return n[l]=H(r,t(r)),e.children&&(r.children=F(e.children,t,i,n,a)),r}})}function H(e,t){return Object.assign(e,{...t,..."object"==typeof t.lazy&&null!=t.lazy?{lazy:{...e.lazy,...t.lazy}}:{}})}function z(e,t,r="/"){return U(e,t,r,!1)}function U(e,t,r,n,a){let o=ne(("string"==typeof t?D(t):t).pathname||"/",r);if(null==o)return null;let i=a??B(e),l=null,s=function(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return M(!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}}(o);for(let u=0;null==l&&u<i.length;++u)l=ee(i[u],s,n);return l}function I(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 B(e){let t=W(e);return function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every((e,r)=>e===t[r]);return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(t),t}function W(e,t=[],r=[],n="",a=!1){let o=(e,o,i=a,l)=>{let s={relativePath:void 0===l?e.path||"":l,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};if(s.relativePath.startsWith("/")){if(!s.relativePath.startsWith(n)&&i)return;C(s.relativePath.startsWith(n),`Absolute route path "${s.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(n.length)}let u=he([n,s.relativePath]),c=r.concat(s);e.children&&e.children.length>0&&(C(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),W(e.children,t,c,u,i)),(null!=e.path||e.index)&&t.push({path:u,score:Q(u,e.index),routesMeta:c})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let r of q(e.path))o(e,t,!0,r);else o(e,t)}),t}function q(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(0===n.length)return a?[o,""]:[o];let i=q(n.join("/")),l=[];return l.push(...i.map(e=>""===e?o:[o,e].join("/"))),a&&l.push(...i),l.map(t=>e.startsWith("/")&&""===t?"/":t)}var J=/^:[\w-]+$/,Y=3,V=2,K=1,X=10,G=-2,Z=e=>"*"===e;function Q(e,t){let r=e.split("/"),n=r.length;return r.some(Z)&&(n+=G),t&&(n+=V),r.filter(e=>!Z(e)).reduce((e,t)=>e+(J.test(t)?Y:""===t?K:X),n)}function ee(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",i=[];for(let l=0;l<n.length;++l){let e=n[l],s=l===n.length-1,u="/"===o?t:t.slice(o.length)||"/",c=te({path:e.relativePath,caseSensitive:e.caseSensitive,end:s},u),d=e.route;if(!c&&s&&r&&!n[n.length-1].route.index&&(c=te({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!c)return null;
1Object.assign(a,c.params),i.push({params:a,pathname:he([o,c.pathname]),pathnameBase:pe(he([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=he([o,c.pathnameBase]))}return i}function te(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=re(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:n.reduce((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=l[n]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const a=l[n];return e[t]=r&&!a?void 0:(a||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:i,pattern:e}}function re(e,t=!1,r=!0){M("*"===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,(e,t,r,a,o)=>{if(n.push({paramName:t,isOptional:null!=r}),r){let t=o.charAt(a+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}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 ne(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}var ae=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,oe=e=>ae.test(e);function ie(e,t){let r=fe(t).split("/");return e.split("/").forEach(e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"}function le(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 se(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function ue(e){let t=se(e);return t.map((e,r)=>r===t.length-1?e.pathname:e.pathnameBase)}function ce(e,t,r,n=!1){let a;"string"==typeof e?a=D(e):(a={...e},C(!a.pathname||!a.pathname.includes("?"),le("?","pathname","search",a)),C(!a.pathname||!a.pathname.includes("#"),le("#","pathname","hash",a)),C(!a.search||!a.search.includes("#"),le("#","search","hash",a)));let o,i=""===e||""===a.pathname,l=i?"/":a.pathname;if(null==l)o=r;else{let e=t.length-1;if(!n&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let s=function(e,t="/"){let r,{pathname:n,search:a="",hash:o=""}="string"==typeof e?D(e):e;return n?(n=de(n),r=n.startsWith("/")?ie(n.substring(1),"/"):ie(n,t)):r=t,{pathname:r,search:me(a),hash:ye(o)}}(a,o),u=l&&"/"!==l&&l.endsWith("/"),c=(i||"."===l)&&r.endsWith("/");return s.pathname.endsWith("/")||!u&&!c||(s.pathname+="/"),s}var de=e=>e.replace(/\/\/+/g,"/"),he=e=>de(e.join("/")),fe=e=>e.replace(/\/+$/,""),pe=e=>fe(e).replace(/^\/*/,"/"),me=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",ye=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",ve=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function ge(e,t){return new ve(e,"number"==typeof t?{status:t}:t)}var we=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 be(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function Ee(e){let t=e.map(e=>e.route.path).filter(Boolean);return he(t)||"/"}var Re="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function Se(e,t){let r=e;if("string"!=typeof r||!ae.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(Re)try{let e=new URL(window.location.href),n=r.startsWith("//")?new URL(e.protocol+r):new URL(r),o=ne(n.pathname,t);
1n.origin===e.origin&&null!=o?r=o+n.search+n.hash:a=!0}catch(o){M(!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 xe=Symbol("Uninstrumented");function ke(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(r);for(let n of t)e[n]&&r[n].push(e[n])}}));let n={};if("function"==typeof t.lazy&&r.lazy.length>0){let e=Le(r.lazy,t.lazy,()=>{});e&&(n.lazy=e)}if("object"==typeof t.lazy){let e=t.lazy;["middleware","loader","action"].forEach(t=>{let a=e[t],o=r[`lazy.${t}`];if("function"==typeof a&&o.length>0){let e=Le(o,a,()=>{});e&&(n.lazy=Object.assign(n.lazy||{},{[t]:e}))}})}return["loader","action"].forEach(e=>{let a=t[e];if("function"==typeof a&&r[e].length>0){let t=a[xe]??a,o=Le(r[e],t,(...e)=>Me(e[0]));o&&("loader"===e&&!0===t.hydrate&&(o.hydrate=!0),o[xe]=t,n[e]=o)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(n.middleware=t.middleware.map(e=>{let t=e[xe]??e,n=Le(r.middleware,t,(...e)=>Me(e[0]));return n?(n[xe]=t,n):e})),n}function Le(e,t,r){return 0===e.length?null:async(...n)=>{let a=await Ce(e,r(...n),()=>t(...n),e.length-1);if("error"===a.type)throw a.value;return a.value}}async function Ce(e,t,r,n){let a,o=e[n];if(o){let l,s=async()=>(l||(l=Ce(e,t,r,n-1)),a=await l,C(a,"Expected a result"),"error"===a.type&&a.value instanceof Error?{status:"error",error:a.value}:{status:"success",error:void 0});try{await o(s,t)}catch(i){}l||await s(),await l}else try{let e=await r();a={type:"success",value:e}}catch(i){a={type:"error",value:i}}return a||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Me(e){let{request:t,context:r,params:n,pattern:a}=e;return{request:Te(t),params:{...n},pattern:a,context:Oe(r)}}function Pe(e,t){return{currentUrl:O(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 Te(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Oe(e){if(function(e){if(null===e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t||Object.getOwnPropertyNames(t).sort().join("\0")===De}(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var De=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var $e,Ae,je,_e,Ne=["POST","PUT","PATCH","DELETE"],Fe=new Set(Ne),He=["GET",...Ne],ze=new Set(He),Ue=new Set([301,302,303,307,308]),Ie=new Set([307,308]),Be={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},We={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},qe={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Je=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),Ye="remix-router-transitions",Ve=Symbol("ResetLoaderData"),Ke=class{constructor(e){R(this,$e),R(this,Ae),R(this,je),R(this,_e),S(this,$e,e),S(this,Ae,B(e))}get stableRoutes(){return E(this,$e)}get activeRoutes(){return E(this,je)??E(this,$e)}get branches(){return E(this,_e)??E(this,Ae)}get hasHMRRoutes(){return null!=E(this,je)}setRoutes(e){S(this,$e,e),S(this,Ae,B(e))}setHmrRoutes(e){S(this,je,e),S(this,_e,B(e))}commitHmrRoutes(){E(this,je)&&(S(this,$e,E(this,je)),S(this,Ae,E(this,_e)),S(this,je,void 0),S(this,_e,void 0))}};function Xe(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,r=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement;C(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let n=e.hydrationRouteProperties||[],a=e.mapRouteProperties||Je,o=a;if(e.instrumentations){let t=e.instrumentations;o=e=>({...a(e),...ke(t.map(e=>e.route).filter(Boolean),e)})}let i={},l=new Ke(F(e.routes,o,void 0,i)),s=e.basename||"/";s.startsWith("/")||(s=`/${s}`);let u,c,d,h=e.dataStrategy||ut,f={...e.future},p=null,m=new Set,y=null,v=null,g=null,w=null,b=null!=e.hydrationData,E=U(l.activeRoutes,e.history.location,s,!1,l.branches),R=!1,S=null;if(null!=E||e.patchRoutesOnNavigation){if(E&&!e.hydrationData){Oe(E,l.activeRoutes,e.history.location.pathname).active&&(E=null)}if(E)if(E.some(e=>e.route.lazy))u=!1,c=!u;else if(E.some(e=>et(e.route))){let t=e.hydrationData?e.hydrationData.loaderData:null,r=e.hydrationData?e.hydrationData.errors:null,n=E;
1if(r){let e=E.findIndex(e=>void 0!==r[e.route.id]);n=n.slice(0,e+1)}c=!1,u=!0,n.forEach(e=>{let n=tt(e.route,t,r);c=c||n.renderFallback,u=u&&!n.shouldLoad})}else u=!0,c=!u;else{u=!1,c=!u,E=[];let t=Oe(null,l.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(R=!0,E=t.matches)}}else{let t=Mt(404,{pathname:e.history.location.pathname}),{matches:r,route:n}=Ct(l.activeRoutes);u=!0,c=!u,E=r,S={[n.id]:t}}let x,k,L={historyAction:e.history.action,location:e.history.location,matches:E,initialized:u,renderFallback:c,navigation:Be,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||S,fetchers:new Map,blockers:new Map},P="POP",j=null,_=!1,N=!1,H=new Map,z=null,B=!1,W=!1,q=new Set,J=new Map,Y=0,V=-1,K=new Map,X=new Set,G=new Map,Z=new Map,Q=new Set,ee=new Map,te=null;function re(e,t={}){e.matches&&(e.matches=e.matches.map(e=>{let t=i[e.route.id],r=e.route;return r.element!==t.element||r.errorElement!==t.errorElement||r.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e})),L={...L,...e};let r=[],n=[];L.fetchers.forEach((e,t)=>{"idle"===e.state&&(Q.has(t)?r.push(t):n.push(t))}),Q.forEach(e=>{L.fetchers.has(e)||J.has(e)||r.push(e)}),0===m.size&&(y={newErrors:e.errors??null}),[...m].forEach(n=>n(L,{deletedFetchers:r,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync})),r.forEach(e=>pe(L.fetchers,e)),n.forEach(e=>L.fetchers.delete(e))}function ae(t,r,{flushSync:n}={}){let a,o=null!=L.actionData&&null!=L.navigation.formMethod&&Nt(L.navigation.formMethod)&&"loading"===L.navigation.state&&!0!==t.state?._isRedirect;a=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:o?L.actionData:null;let i=r.loaderData?xt(L.loaderData,r.loaderData,r.matches||[],r.errors):L.loaderData,s=L.blockers;s.size>
10&&(s=new Map(s),s.forEach((e,t)=>s.set(t,qe)));let u,c=!B&&Te(t,r.matches||L.matches),d=!0===_||null!=L.navigation.formMethod&&Nt(L.navigation.formMethod)&&!0!==t.state?._isRedirect;if(l.commitHmrRoutes(),B||"POP"===P||("PUSH"===P?e.history.push(t,t.state):"REPLACE"===P&&e.history.replace(t,t.state)),"POP"===P){let e=H.get(L.location.pathname);e&&e.has(t.pathname)?u={currentLocation:L.location,nextLocation:t}:H.has(t.pathname)&&(u={currentLocation:t,nextLocation:L.location})}else if(N){let e=H.get(L.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),H.set(L.location.pathname,e)),u={currentLocation:L.location,nextLocation:t}}re({...r,actionData:a,loaderData:i,historyAction:P,location:t,initialized:!0,renderFallback:!1,navigation:Be,revalidation:"idle",restoreScrollPosition:c,preventScrollReset:d,blockers:s},{viewTransitionOpts:u,flushSync:!0===n}),P="POP",_=!1,N=!1,B=!1,W=!1,j?.resolve(),j=null,te?.resolve(),te=null}async function ie(t,r,a){x&&x.abort(),x=null,P=t,B=!0===(a&&a.startUninterruptedRevalidation),function(e,t){if(v&&w){let r=Me(e,t);v[r]=w()}}(L.location,L.matches),_=!0===(a&&a.preventScrollReset),N=!0===(a&&a.enableViewTransition);let u=l.activeRoutes,c=a?.initialHydration&&L.matches&&L.matches.length>0&&!R?L.matches:U(u,r,s,!1,l.branches),d=!0===(a&&a.flushSync);if(c&&L.initialized&&!W&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(L.location,r)&&!(a&&a.submission&&Nt(a.submission.formMethod)))return void ae(r,{matches:c},{flushSync:d});let h=Oe(c,u,r.pathname);if(h.active&&h.matches&&(c=h.matches),!c){let{error:e,notFoundMatches:t,route:n}=Ce(r.pathname);return void ae(r,{matches:t,loaderData:{},errors:{[n.id]:e}},{flushSync:d})}let f=a&&a.overrideNavigation?{...a.overrideNavigation,matches:c,historyAction:t}:void 0;x=new AbortController;let p,m=wt(e.history,r,x.signal,a&&a.submission),y=e.getContext?await e.getContext():new A;if(a&&a.pendingError)p=[Lt(c).route.id,{type:"error",error:a.pendingError}];else if(a&&a.submission&&Nt(a.submission.formMethod)){let u=await async function(t,r,a,u,c,d,h,f,p={}){de();let m,y=function(e,t,r,n){let a={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};return a}(r,u,c,a);if(re({navigation:y},{flushSync:!0===p.flushSync}),h){let e=await De(u,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:r}=Ct(l.activeRoutes);return{matches:t,pendingActionResult:[r.id,{type:"error",error:e.error}]}}let t=Lt(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:"error",error:e.error}]}}if(!e.matches){let{notFoundMatches:e,error:t,route:n}=Ce(r.pathname);return{matches:e,pendingActionResult:[n.id,{type:"error",error:t}]}}u=e.matches}let v=Ht(u,r);if(v.route.action||v.route.lazy){let e=pt(o,i,t,r,u,v,f?[]:n,d),a=await ue(t,r,e,d,null);if(m=a[v.route.id],!m)for(let t of u)if(a[t.route.id]){m=a[t.route.id];break}if(t.signal.aborted)return{shortCircuited:!0}}else m={type:"error",error:Mt(405,{method:t.method,pathname:r.pathname,routeId:v.route.id})};if(At(m)){let r;if(p&&null!=p.replace)r=p.replace;else{r=gt(m.response.headers.get("Location"),new URL(t.url),s,e.history)===L.location.pathname+L.location.search}return await se(t,m,!0,{submission:a,replace:r}),{shortCircuited:!0}}if($t(m)){let e=Lt(u,v.route.id);return!0!==(p&&p.replace)&&(P="PUSH"),{matches:u,pendingActionResult:[e.route.id,m,v.route.id]}}return{matches:u,pendingActionResult:[v.route.id,m]}}(m,r,a.submission,c,t,y,h.active,a&&!0===a.initialHydration,{replace:a.replace,flushSync:d});if(u.shortCircuited)return;if(u.pendingActionResult){let[e,t]=u.pendingActionResult;if($t(t)&&be(t.error)&&404===t.error.status)return x=null,void ae(r,{matches:u.matches,loaderData:{},errors:{[e]:t.error}})}c=u.matches||c,p=u.pendingActionResult,f=Ut(r,c,t,a.submission),d=!1,h.active=!1,m=wt(e.history,m.url,m.signal)}let{shortCircuited:g,matches:b,loaderData:E,errors:S,workingFetchers:k}
1=await async function(t,r,a,u,c,d,h,f,p,m,y,v,g,w){let b=h||Ut(r,a,u,f),E=f||p||zt(b),R=!B&&!y;if(d){if(R){let e=le(g);re({navigation:b,...void 0!==e?{actionData:e}:{}},{flushSync:v})}let e=await De(a,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:r}=Ct(l.activeRoutes);return{matches:t,loaderData:{},errors:{[r.id]:e.error}}}let t=Lt(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:n}=Ce(r.pathname);return{matches:t,loaderData:{},errors:{[n.id]:e}}}a=e.matches}let S=l.activeRoutes,{dsMatches:k,revalidatingFetchers:C}=Qe(t,c,o,i,e.history,L,a,E,r,y?[]:n,!0===y,W,q,Q,G,X,S,s,null!=e.patchRoutesOnNavigation,l.branches,g,w);if(V=++Y,!e.dataStrategy&&!k.some(e=>e.shouldLoad)&&!k.some(e=>e.route.middleware&&e.route.middleware.length>0)&&0===C.length){let e=new Map(L.fetchers),t=ve(e);return ae(r,{matches:a,loaderData:{},errors:g&&$t(g[1])?{[g[0]]:g[1].error}:null,...kt(g),...t?{fetchers:e}:{}},{flushSync:v}),{shortCircuited:!0}}if(R){let e={};if(!d){e.navigation=b;let t=le(g);void 0!==t&&(e.actionData=t)}C.length>0&&(e.fetchers=function(e){let t=new Map(L.fetchers);return e.forEach(e=>{let r=t.get(e.key),n=It(void 0,r?r.data:void 0);t.set(e.key,n)}),t}(C)),re(e,{flushSync:v})}C.forEach(e=>{me(e.key),e.controller&&J.set(e.key,e.controller)});let M=()=>C.forEach(e=>me(e.key));x&&x.signal.addEventListener("abort",M);let{loaderResults:P,fetcherResults:T}=await ce(k,C,t,r,c);if(t.signal.aborted)return{shortCircuited:!0};x&&x.signal.removeEventListener("abort",M);C.forEach(e=>J.delete(e.key));let O=Pt(P);if(O)return await se(t,O.result,!0,{replace:m}),{shortCircuited:!0};if(O=Pt(T),O)return X.add(O.key),await se(t,O.result,!0,{replace:m}),{shortCircuited:!0};let D=new Map(L.fetchers),{loaderData:$,errors:A}=St(L,a,P,g,C,T,D);y&&L.errors&&(A={...L.errors,...A});let j=ve(D),_=ge(V,D),N=j||_||C.length>0;return{matches:a,loaderData:$,errors:A,...N?{workingFetchers:D}:{}}}(m,r,c,t,y,h.active,f,a&&a.submission,a&&a.fetcherSubmission,a&&a.replace,a&&!0===a.initialHydration,d,p,a&&a.callSiteDefaultShouldRevalidate);g||(x=null,ae(r,{matches:b||c,...kt(p),loaderData:E,errors:S,...k?{fetchers:k}:{}}))}function le(e){return e&&!$t(e[1])?{[e[0]]:e[1].data}:L.actionData?0===Object.keys(L.actionData).length?null:L.actionData:void 0}async function se(n,a,o,{submission:i,fetcherSubmission:l,preventScrollReset:u,replace:c}={}){o||(j?.resolve(),j=null),a.response.headers.has("X-Remix-Revalidate")&&(W=!0);let d=a.response.headers.get("Location");C(d,"Expected a Location header on the redirect Response"),d=gt(d,new URL(n.url),s,e.history);let h=T(L.location,d,{_isRedirect:!0});if(r){let e=!1;if(a.response.headers.has("X-Remix-Reload-Document"))e=!0;else if(oe(d)){const r=$(t,d,!0);e=r.origin!==t.location.origin||null==ne(r.pathname,s)}if(e)return void(c?t.location.replace(d):t.location.assign(d))}x=null;let f=!0===c||a.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:p,formAction:m,formEncType:y}=L.navigation;!i&&!l&&p&&m&&y&&(i=zt(L.navigation));let v=i||l;if(Ie.has(a.response.status)&&v&&Nt(v.formMethod))await ie(f,h,{submission:{...v,formAction:d},preventScrollReset:u||_,enableViewTransition:o?N:void 0});else{let e=Ut(h,[],f,i);await ie(f,h,{overrideNavigation:e,fetcherSubmission:l,preventScrollReset:u||_,enableViewTransition:o?N:void 0})}}async function ue(e,t,r,n,a){let o,i={};try{o=await async function(e,t,r,n,a,o){n.some(e=>e._lazyPromises?.middleware)&&await Promise.all(n.map(e=>e._lazyPromises?.middleware));let i={request:t,url:bt(t,r),pattern:Ee(n),params:n[0].params,context:o,matches:n},l=e=>{let t=i;return ct(t,()=>e({...t,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},s=await e({...i,fetcherKey:a,runClientMiddleware:l});try{await Promise.all(n.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch(u){}return s}(h,e,t,r,a,n)}catch(l){return r.filter(e=>
1e.shouldLoad).forEach(e=>{i[e.route.id]={type:"error",error:l}}),i}if(e.signal.aborted)return i;if(!Nt(e.method))for(let s of r){if("error"===o[s.route.id]?.type)break;o.hasOwnProperty(s.route.id)||L.loaderData.hasOwnProperty(s.route.id)||L.errors&&L.errors.hasOwnProperty(s.route.id)||!s.shouldCallHandler()||(o[s.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${s.route.id}`)})}for(let[u,c]of Object.entries(o))if(Dt(c)){let t=c.result;i[u]={type:"redirect",response:yt(t,e,u,r,s)}}else i[u]=await mt(c);return i}async function ce(e,t,r,n,a){let o=ue(r,n,e,a,null),i=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await ue(e.request,e.path,e.matches,a,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:"error",error:Mt(404,{pathname:e.path})}})}));return{loaderResults:await o,fetcherResults:(await i).reduce((e,t)=>Object.assign(e,t),{})}}function de(){W=!0,G.forEach((e,t)=>{J.has(t)&&q.add(t),me(t)})}function he(e,t,r={}){let n=new Map(L.fetchers);n.set(e,t),re({fetchers:n},{flushSync:!0===(r&&r.flushSync)})}function fe(e,t,r,n={}){let a=Lt(L.matches,t),o=new Map(L.fetchers);pe(o,e),re({errors:{[a.route.id]:r},fetchers:o},{flushSync:!0===(n&&n.flushSync)})}function pe(e,t){let r=L.fetchers.get(t);!J.has(t)||r&&"loading"===r.state&&K.has(t)||me(t),G.delete(t),K.delete(t),X.delete(t),Q.delete(t),q.delete(t),e.delete(t)}function me(e,t){let r=J.get(e);r&&(r.abort(t),J.delete(e))}function ye(e,t){for(let r of e){let e=t.get(r);C(e,`Expected fetcher: ${r}`);let n=Bt(e.data);t.set(r,n)}}function ve(e){let t=[],r=!1;for(let n of X){let a=e.get(n);C(a,`Expected fetcher: ${n}`),"loading"===a.state&&(X.delete(n),t.push(n),r=!0)}return ye(t,e),r}function ge(e,t){let r=[];for(let[n,a]of K)if(a<e){let e=t.get(n);C(e,`Expected fetcher: ${n}`),"loading"===e.state&&(me(n),K.delete(n),r.push(n))}return ye(r,t),r.length>0}function we(e){L.blockers.delete(e),ee.delete(e)}function Re(e,t){let r=L.blockers.get(e)||qe;C("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,`Invalid blocker state transition: ${r.state} -> ${t.state}`);let n=new Map(L.blockers);n.set(e,t),re({blockers:n})}function Se({currentLocation:e,nextLocation:t,historyAction:r}){if(0===ee.size)return;ee.size>1&&M(!1,"A router only supports one blocker at a time");let n=Array.from(ee.entries()),[a,o]=n[n.length-1],i=L.blockers.get(a);return i&&"proceeding"===i.state?void 0:o({currentLocation:e,nextLocation:t,historyAction:r})?a:void 0}function Ce(e){let t=Mt(404,{pathname:e}),r=l.activeRoutes,{matches:n,route:a}=Ct(r);return{notFoundMatches:n,route:a,error:t}}function Me(e,t){if(g){return g(e,t.map(e=>I(e,L.loaderData)))||e.key}return e.key}function Te(e,t){if(v){let r=Me(e,t),n=v[r];if("number"==typeof n)return n}return null}function Oe(t,r,n){if(e.patchRoutesOnNavigation){let e=l.branches;if(!t){return{active:!0,matches:U(r,n,s,!0,e)||[]}}if(Object.keys(t[0].params).length>0){return{active:!0,matches:U(r,n,s,!0,e)}}}return{active:!1,matches:null}}async function De(t,r,n,a){if(!e.patchRoutesOnNavigation)return{type:"success",matches:t};let u=t;for(;;){let t=i;try{await e.patchRoutesOnNavigation({signal:n,path:r,matches:u,fetcherKey:a,patch:(e,r)=>{n.aborted||nt(e,r,l,t,o,!1)}})}catch(c){return{type:"error",error:c,partialMatches:u}}if(n.aborted)return{type:"aborted"};let d=l.branches,h=U(l.activeRoutes,r,s,!1,d),f=null;if(h){if(0===Object.keys(h[0].params).length)return{type:"success",matches:h};if(f=U(l.activeRoutes,r,s,!0,d),!(f&&u.length<f.length&&$e(u,f.slice(0,u.length))))return{type:"success",matches:h}}if(f||(f=U(l.activeRoutes,r,s,!0,d)),!f||$e(u,f))return{type:"success",matches:null};u=f}}function $e(e,t){return e.length===t.length&&e.every((e,r)=>e.route.id===t[r].route.id)}return d={get basename(){return s},get future(){return f},get state(){return L},get routes(){return l.stableRoutes},get branches(){return l.branches},get manifest(){return i},get window(){return t},initialize:function(){if(p=e.history.listen(({action:t,location:r,delta:n})=>{if(k)return k(),void(k=void 0);M(0===ee.size||null!=n,"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 a=Se({currentLocation:L.location,nextLocation:r,historyAction:t});if(a&&null!=n){let t=new Promise(e=>{k=e});return e.history.go(-1*n),Re(a,{state:"blocked",location:r,proceed(){Re(a,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),t.then(()=>e.history.go(n))},reset(){let e=new Map(L.blockers);e.set(a,qe),re({blockers:e})}}),j?.resolve(),void(j=null)}return ie(t,r)}),r){!function(e,t){try{let r=e.sessionStorage.getItem(Ye);if(r){let e=JSON.parse(r);for(let[r,n]of Object.entries(e||{}))n&&Array.isArray(n)&&t.set(r,new Set(n||[]))}}catch(r){}}(t,H);let e=()=>function(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Ye,JSON.stringify(n))}catch(r){M(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}(t,H);t.addEventListener("pagehide",e),z=()=>t.removeEventListener("pagehide",e)}return L.initialized||ie("POP",L.location,{initialHydration:!0}),d},subscribe:function(e){if(m.add(e),y){let{newErrors:t}=y;y=null,e(L,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>m.delete(e)},enableScrollRestoration:function(e,t,r){if(v=e,w=t,g=r||null,!b&&L.navigation===Be){b=!0;let e=Te(L.location,L.matches);null!=e&&re({restoreScrollPosition:e})}return()=>{v=null,w=null,g=null}},navigate:async function t(r,n){if(j?.resolve(),j=null,"number"==typeof r){j||(j=Wt());let t=j.promise;return e.history.go(r),t}let a,o=Ge(L.location,L.matches,s,r,n?.fromRouteId,n?.relative),{path:i,submission:l,error:u}=Ze(!1,o,n);if(n?.mask){a={pathname:"",search:"",hash:"",..."string"==typeof n.mask?D(n.mask):{...L.location.mask,...n.mask}}}let c=L.location,d=T(c,i,n&&n.state,void 0,a);d={...d,...e.history.encodeLocation(d)};let h=n&&null!=n.replace?n.replace:void 0,f="PUSH";!0===h?f="REPLACE":!1===h||null!=l&&Nt(l.formMethod)&&l.formAction===L.location.pathname+L.location.search&&(f="REPLACE");let p=n&&"preventScrollReset"in n?!0===n.preventScrollReset:void 0,m=!0===(n&&n.flushSync),y=Se({currentLocation:c,nextLocation:d,historyAction:f});y?Re(y,{state:"blocked",location:d,proceed(){Re(y,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),t(r,n)},reset(){let e=new Map(L.blockers);e.set(y,qe),re({blockers:e})}}):await ie(f,d,{submission:l,pendingError:u,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:m,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate})},fetch:async function(t,r,a,u){me(t);let c=!0===(u&&u.flushSync),d=l.activeRoutes,h=Ge(L.location,L.matches,s,a,r,u?.relative),f=U(d,h,s,!1,l.branches),p=Oe(f,d,h);if(p.active&&p.matches&&(f=p.matches),!f)return void fe(t,r,Mt(404,{pathname:h}),{flushSync:c});let{path:m,submission:y,error:v}=Ze(!0,h,u);if(v)return void fe(t,r,v,{flushSync:c});let g=e.getContext?await e.getContext():new A,w=!0===(u&&u.preventScrollReset);y&&Nt(y.formMethod)?await async function(t,r,a,u,c,d,h,f,p,m){de(),G.delete(t);let y=L.fetchers.get(t);he(t,function(e,t){let r={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};return r}(p,y),{flushSync:h});let v=new AbortController,g=wt(e.history,a,v.signal,p);if(d){let e=await De(u,new URL(g.url).pathname,g.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void fe(t,r,e.error,{flushSync:h});if(!e.matches)return void fe(t,r,Mt(404,{pathname:a}),{flushSync:h});u=e.matches}let w=Ht(u,a);if(!w.route.action&&!w.route.lazy){let e=Mt(405,{method:p.formMethod,pathname:a,routeId:r});return void fe(t,r,e,{flushSync:h})}J.set(t,v);let b=Y,E=pt(o,i,g,a,u,w,n,c),R=await ue(g,a,E,c,t),S=R[w.route.id];if(!S)for(let e of E)if(R[e.route.id]){S=R[e.route.id];break}if(g.signal.aborted)return void(J.get(t)===v&&J.delete(t));if(Q.has(t)){if(At(S)||$t(S))return void he(t,Bt(void 0))}else{if(At(S))return J.delete(t),V>b?void he(t,Bt(void 0)):(X.add(t),he(t,It(p)),se(g,S,!1,{fetcherSubmission:p,preventScrollReset:f}));if($t(S))return void fe(t,r,S.error)}let k=L.navigation.location||L.location,M=wt(e.history,k,v.signal),T=l.activeRoutes,O="idle"!==L.navigation.state?U(T,L.navigation.location,s,!1,l.branches):L.matches;C(O,"Didn't find any matches after fetcher action");let D=++Y;K.set(t,D);let{dsMatches:$,revalidatingFetchers:A}=Qe(M,c,o,i,e.history,L,O,p,k,n,!1,W,q,Q,G,X,T,s,null!=e.patchRoutesOnNavigation,l.branches,[w.route.id,S],m),j=It(p,S.data),_=new Map(L.fetchers);_.set(t,j),A.filter(e=>
1e.key!==t).forEach(e=>{let t=e.key,r=_.get(t),n=It(void 0,r?r.data:void 0);_.set(t,n),me(t),e.controller&&J.set(t,e.controller)}),re({fetchers:_});let N=()=>A.forEach(e=>me(e.key));v.signal.addEventListener("abort",N);let{loaderResults:F,fetcherResults:H}=await ce($,A,M,k,c);if(v.signal.aborted)return;v.signal.removeEventListener("abort",N),K.delete(t),J.delete(t),A.forEach(e=>J.delete(e.key));let z=L.fetchers.has(t),I=e=>{if(!z)return e;let r=new Map(e.fetchers);return r.set(t,Bt(S.data)),{...e,fetchers:r}},B=Pt(F);if(B)return L=I(L),se(M,B.result,!1,{preventScrollReset:f});if(B=Pt(H),B)return X.add(B.key),L=I(L),se(M,B.result,!1,{preventScrollReset:f});let Z=new Map(L.fetchers);z&&Z.set(t,Bt(S.data));let{loaderData:ee,errors:te}=St(L,O,F,void 0,A,H,Z);ge(D,Z),"loading"===L.navigation.state&&D>V?(C(P,"Expected pending action"),x&&x.abort(),ae(L.navigation.location,{matches:O,loaderData:ee,errors:te,fetchers:Z})):(re({errors:te,loaderData:xt(L.loaderData,ee,O,te),fetchers:Z}),W=!1)}(t,r,m,f,g,p.active,c,w,y,u&&u.defaultShouldRevalidate):(G.set(t,{routeId:r,path:m}),await async function(t,r,a,l,s,u,c,d,h){let f=L.fetchers.get(t);he(t,It(h,f?f.data:void 0),{flushSync:c});let p=new AbortController,m=wt(e.history,a,p.signal);if(u){let e=await De(l,new URL(m.url).pathname,m.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void fe(t,r,e.error,{flushSync:c});if(!e.matches)return void fe(t,r,Mt(404,{pathname:a}),{flushSync:c});l=e.matches}let y=Ht(l,a);J.set(t,p);let v=Y,g=pt(o,i,m,a,l,y,n,s),w=await ue(m,a,g,s,t),b=w[y.route.id];if(!b)for(let e of l)if(w[e.route.id]){b=w[e.route.id];break}J.get(t)===p&&J.delete(t);if(m.signal.aborted)return;if(Q.has(t))return void he(t,Bt(void 0));if(At(b))return V>v?void he(t,Bt(void 0)):(X.add(t),void(await se(m,b,!1,{preventScrollReset:d})));if($t(b))return void fe(t,r,b.error);he(t,Bt(b.data))}(t,r,m,f,g,p.active,c,w,y))},revalidate:function(){te||(te=Wt()),de(),re({revalidation:"loading"});let e=te.promise;return"submitting"===L.navigation.state?e:"idle"===L.navigation.state?(ie(L.historyAction,L.location,{startUninterruptedRevalidation:!0}),e):(ie(P||L.historyAction,L.navigation.location,{overrideNavigation:L.navigation,enableViewTransition:!0===N}),e)},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:function(e){return Z.set(e,(Z.get(e)||0)+1),Q.has(e)&&Q.delete(e),L.fetchers.get(e)||We},resetFetcher:function(e,t){me(e,t?.reason),he(e,Bt(null))},deleteFetcher:function(e){let t=(Z.get(e)||0)-1;t<=0?(Z.delete(e),Q.add(e)):Z.set(e,t),re({fetchers:new Map(L.fetchers)})},dispose:function(){p&&p(),z&&z(),m.clear(),x&&x.abort(),L.fetchers.forEach((e,t)=>pe(L.fetchers,t)),L.blockers.forEach((e,t)=>we(t))},getBlocker:function(e,t){let r=L.blockers.get(e)||qe;return ee.get(e)!==t&&ee.set(e,t),r},deleteBlocker:we,patchRoutes:function(e,t,r=!1){nt(e,t,l,i,o,r),l.hasHMRRoutes||re({})},_internalFetchControllers:J,_internalSetRoutes:function(e){i={},l.setHmrRoutes(F(e,o,void 0,i))},_internalSetStateDoNotUseOrYouWillBreakYourApp(e){re(e)}},e.instrumentations&&(d=function(e,t){let r={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let n of t)e[n]&&r[n].push(e[n])}})),r.navigate.length>0){let t=e.navigate[xe]??e.navigate,n=Le(r.navigate,t,(...t)=>{let[r,n]=t;return{to:"number"==typeof r||"string"==typeof r?r:r?O(r):".",...Pe(e,n??{})}});n&&(n[xe]=t,e.navigate=n)}if(r.fetch.length>0){let t=e.fetch[xe]??e.fetch,n=Le(r.fetch,t,(...t)=>{let[r,,n,a]=t;return{href:n??".",fetcherKey:r,...Pe(e,a??{})}});n&&(n[xe]=t,e.fetch=n)}return e}(d,e.instrumentations.map(e=>e.router).filter(Boolean))),d}function Ge(e,t,r,n,a,o){let i,l;if(a){i=[];for(let e of t)if(i.push(e),e.route.id===a){l=e;break}}else i=t,l=t[t.length-1];let s=ce(n||".",ue(i),ne(e.pathname,r)||e.pathname,"path"===o);if(null==n&&(s.search=e.search,s.hash=e.hash),(null==n||""===n||"."===n)&&l){let e=Ft(s.search);if(l.route.index&&!e)s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&e){let e=new URLSearchParams(s.search),t=e.getAll("index");e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();s.search=r?`?${r}`:""}}return"/"!==r&&(s.pathname=function({basename:e,pathname:t}){return"/"===t?e:he([e,t])}({basename:r,pathname:s.pathname})),O(s)}function Ze(e,t,r){if(!r||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(r))return{path:t};if(r.formMethod&&(n=r.formMethod,!ze.has(n.toUpperCase())))return{path:t,error:Mt(405,{method:r.formMethod})};var n;let a,o,i=()=>({path:t,error:Mt(400,{type:"invalid-body"})}),l=(r.formMethod||"get").toUpperCase(),s=Tt(t);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!Nt(l))return i();let e="string"==typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((e,[t,r])=>`${e}${t}=${r}\n`,""):String(r.body);return{path:t,submission:{formMethod:l,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===r.formEncType){if(!Nt(l))return i();try{let e="string"==typeof r.body?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:l,formAction:s,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch(d){return i()}}}if(C("function"==typeof FormData,"FormData is not available in this environment"),r.formData)a=Et(r.formData),o=r.formData;else if(r.body instanceof FormData)a=Et(r.body),o=r.body;else if(r.body instanceof URLSearchParams)a=r.body,o=Rt(a);else if(null==r.body)a=new URLSearchParams,o=new FormData;else try{a=new URLSearchParams(r.body),o=Rt(a)}catch(d){return i()}let u={formMethod:l,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:o,json:void 0,text:void 0};if(Nt(u.formMethod))return{path:t,submission:u};let c=D(t);return e&&c.search&&Ft(c.search)&&a.append("index",""),c.search=`?${a}`,{path:O(c),submission:u}}function Qe(e,t,r,n,a,o,i,l,s,u,c,d,h,f,p,m,y,v,g,w,b,E){let R,S=b?$t(b[1])?b[1].error:b[1].data:void 0,x=a.createURL(o.location),k=a.createURL(s);if(c&&o.errors){let e=Object.keys(o.errors)[0];R=i.findIndex(t=>t.route.id===e)}else if(b&&$t(b[1])){let e=b[0];R=i.findIndex(t=>t.route.id===e)-1}let L=b?b[1].statusCode:void 0,C=L&&L>
1=400,M={currentUrl:x,currentParams:o.matches[0]?.params||{},nextUrl:k,nextParams:i[0].params,...l,actionResult:S,actionStatus:L},P=Ee(i),T=i.map((a,i)=>{let{route:l}=a,h=null;if(null!=R&&i>R)h=!1;else if(l.lazy)h=!0;else if(et(l))if(c){let{shouldLoad:e}=tt(l,o.loaderData,o.errors);h=e}else(function(e,t,r){let n=!t||r.route.id!==t.route.id,a=!e.hasOwnProperty(r.route.id);return n||a})(o.loaderData,o.matches[i],a)&&(h=!0);else h=!1;if(null!==h)return ft(r,n,e,s,P,a,u,t,h);let f=!1;"boolean"==typeof E?f=E:C?f=!1:(d||x.pathname+x.search===k.pathname+k.search||x.search!==k.search||function(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}(o.matches[i],a))&&(f=!0);let p={...M,defaultShouldRevalidate:f},m=rt(a,p);return ft(r,n,e,s,P,a,u,t,m,p,E)}),O=[];return p.forEach((e,l)=>{if(c||!i.some(t=>t.route.id===e.routeId)||f.has(l))return;let s=o.fetchers.get(l),p=s&&"idle"!==s.state&&void 0===s.data,b=U(y,e.path,v??"/",!1,w);if(!b){if(g&&p)return;return void O.push({key:l,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null})}if(m.has(l))return;let R=Ht(b,e.path),S=new AbortController,x=wt(a,e.path,S.signal),k=null;if(h.has(l))h.delete(l),k=pt(r,n,x,e.path,b,R,u,t);else if(p)d&&(k=pt(r,n,x,e.path,b,R,u,t));else{let a;a="boolean"==typeof E?E:!C&&d;let o={...M,defaultShouldRevalidate:a};rt(R,o)&&(k=pt(r,n,x,e.path,b,R,u,t,o))}k&&O.push({key:l,routeId:e.routeId,path:e.path,matches:k,match:R,request:x,controller:S})}),{dsMatches:T,revalidatingFetchers:O}}function et(e){return null!=e.loader||null!=e.middleware&&e.middleware.length>0}function tt(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!et(e))return{shouldLoad:!1,renderFallback:!1};let n=null!=t&&e.id in t,a=null!=r&&void 0!==r[e.id];if(!n&&a)return{shouldLoad:!1,renderFallback:!1};if("function"==typeof e.loader&&!0===e.loader.hydrate)return{shouldLoad:!0,renderFallback:!n};let o=!n&&!a;return{shouldLoad:o,renderFallback:o}}function rt(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function nt(e,t,r,n,a,o){let i;if(e){let t=n[e];C(t,`No route found to patch children into: routeId = ${e}`),t.children||(t.children=[]),i=t.children}else i=r.activeRoutes;let l=[],s=[];if(t.forEach(e=>{let t=i.find(t=>at(e,t));t?s.push({existingRoute:t,newRoute:e}):l.push(e)}),l.length>0){let t=F(l,a,[e||"_","patch",String(i?.length||"0")],n);i.push(...t)}if(o&&s.length>0)for(let u=0;u<s.length;u++){let{existingRoute:e,newRoute:t}=s[u],r=e,[n]=F([t],a,[],{},!0);Object.assign(r,{element:n.element?n.element:r.element,errorElement:n.errorElement?n.errorElement:r.errorElement,hydrateFallbackElement:n.hydrateFallbackElement?n.hydrateFallbackElement:r.hydrateFallbackElement})}r.hasHMRRoutes||r.setRoutes([...r.activeRoutes])}function at(e,t){return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||(e.children?.every((e,r)=>t.children?.some(t=>at(e,t)))??!1))}$e=new WeakMap,Ae=new WeakMap,je=new WeakMap,_e=new WeakMap;var ot=new WeakMap,it=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let a=r[t.id];if(C(a,"No route found in manifest"),!a.lazy||"object"!=typeof a.lazy)return;let o=a.lazy[e];if(!o)return;let i=ot.get(a);i||(i={},ot.set(a,i));let l=i[e];if(l)return l;let s=(async()=>{let t=function(e){return j.has(e)}(e),r=void 0!==a[e]&&"hasErrorBoundary"!==e;if(t)M(!t,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),i[e]=Promise.resolve();else if(r)M(!1,`Route "${a.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await o();null!=t&&(Object.assign(a,{[e]:t}),Object.assign(a,n(a)))}"object"==typeof a.lazy&&(a.lazy[e]=void 0,Object.values(a.lazy).every(e=>void 0===e)&&(a.lazy=void 0))})();return i[e]=s,s},lt=new WeakMap;async function st(e){let t=e.matches.filter(e=>e.shouldLoad),r={};return(await Promise.all(t.map(e=>
1e.resolve()))).forEach((e,n)=>{r[t[n].route.id]=e}),r}async function ut(e){return e.matches.some(e=>e.route.middleware)?ct(e,()=>st(e)):st(e)}function ct(e,t){return async function(e,t,r,n,a){let{matches:o,...i}=e,l=o.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),s=await dt(i,l,t,r,n,a);return s}(e,t,e=>{if(_t(t=e)&&(r=t.status,Ue.has(r))&&t.headers.has("Location"))throw e;var t,r;return e},Ot,function(t,r,n){if(n)return Promise.resolve(Object.assign(n.value,{[r]:{type:"error",result:t}}));{let{matches:n}=e,a=Math.min(Math.max(n.findIndex(e=>e.route.id===r),0),Math.max(n.findIndex(e=>e.shouldCallHandler()),0)),o=Lt(n,n[a].route.id).route.id;return Promise.resolve({[o]:{type:"error",result:t}})}})}async function dt(e,t,r,n,a,o,i=0){let{request:l}=e;if(l.signal.aborted)throw l.signal.reason??new Error(`Request aborted: ${l.method} ${l.url}`);let s=t[i];if(!s){return await r()}let u,[c,d]=s,h=async()=>{if(u)throw new Error("You may only call `next()` once per middleware");try{let l=await dt(e,t,r,n,a,o,i+1);return u={value:l},u.value}catch(l){return u={value:await o(l,c,u)},u.value}};try{let t=await d(e,h),r=null!=t?n(t):void 0;return a(r)?r:u?r??u.value:(u={value:await h()},u.value)}catch(f){return await o(f,c,u)}}function ht(e,t,r,n,a){let o=it({key:"middleware",route:n.route,manifest:t,mapRouteProperties:e}),i=function(e,t,r,n,a){let o=r[e.id];if(C(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if("function"==typeof e.lazy){let t=lt.get(o);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let r=(async()=>{C("function"==typeof e.lazy,"No lazy route function found");let t=await e.lazy(),r={};for(let e in t){let n=t[e];if(void 0===n)continue;let a=N(e),i=void 0!==o[e]&&"hasErrorBoundary"!==e;a?M(!a,"Route property "+e+" is not a supported property to be returned from a lazy route function. This property will be ignored."):i?M(!i,`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.`):r[e]=n}Object.assign(o,r),Object.assign(o,{...n(o),lazy:void 0})})();return lt.set(o,r),r.catch(()=>{}),{lazyRoutePromise:r,lazyHandlerPromise:r}}let i,l=Object.keys(e.lazy),s=[];for(let c of l){if(a&&a.includes(c))continue;let o=it({key:c,route:e,manifest:r,mapRouteProperties:n});o&&(s.push(o),c===t&&(i=o))}let u=s.length>0?Promise.all(s).then(()=>{}):void 0;return u?.catch(()=>{}),i?.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:i}}(n.route,Nt(r.method)?"action":"loader",t,e,a);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function ft(e,t,r,n,a,o,i,l,s,u=null,c){let d=!1,h=ht(e,t,r,o,i);return{...o,_lazyPromises:h,shouldLoad:s,shouldRevalidateArgs:u,shouldCallHandler:e=>(d=!0,u?rt(o,"boolean"==typeof c?{...u,defaultShouldRevalidate:c}:"boolean"==typeof e?{...u,defaultShouldRevalidate:e}:u):s),resolve(e){let{lazy:t,loader:i,middleware:u}=o.route,c=d||s||e&&!Nt(r.method)&&(t||i),f=u&&u.length>0&&!i&&!t;return!c||!Nt(r.method)&&f?Promise.resolve({type:"data",result:void 0}):async function({request:e,path:t,pattern:r,match:n,lazyHandlerPromise:a,lazyRoutePromise:o,handlerOverride:i,scopedContext:l}){let s,u,c=Nt(e.method),d=c?"action":"loader",h=a=>{let o,s=new Promise((e,t)=>o=t);u=()=>o(),e.signal.addEventListener("abort",u);let c=o=>"function"!=typeof a?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${n.route.id}]`)):a({request:e,url:bt(e,t),pattern:r,params:n.params,context:l},...void 0!==o?[o]:[]),h=(async()=>{try{return{type:"data",result:await(i?i(e=>c(e)):c())}}catch(e){return{type:"error",result:e}}})();return Promise.race([h,s])};try{let t=c?n.route.action:n.route.loader;if(a||o)if(t){let e,[r]=await Promise.all([h(t).catch(t=>{e=t}),a,o]);if(void 0!==e)throw e;s=r}else{await a;let t=c?n.route.action:n.route.loader;if(!t){if("action"===d){let t=new URL(e.url),r=t.pathname+t.search;throw Mt(405,{method:e.method,pathname:r,routeId:n.route.id})}return{type:"data",result:void 0}}[s]=await Promise.all([h(t),o])}else{if(!t){let t=new URL(e.url);throw Mt(404,{pathname:t.pathname+t.search})}s=await h(t)}}catch(f){return{type:"error",result:f}}finally{u&&e.signal.removeEventListener("abort",u)}return s}({request:r,path:n,pattern:a,match:o,lazyHandlerPromise:h?.handler,lazyRoutePromise:h?.route,handlerOverride:e,scopedContext:l})}}}function pt(e,t,r,n,a,o,i,l,s=null){return a.map(u=>u.route.id!==o.route.id?{...u,shouldLoad:!1,shouldRevalidateArgs:s,shouldCallHandler:()=>!1,_lazyPromises:ht(e,t,r,u,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:ft(e,t,r,n,Ee(a),u,i,l,!0,s))}async function mt(e){let{result:t,type:r}=e;if(_t(t)){let e;try{e=await async function(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?null==e.body?null:e.json():e.text()}(t)}catch(a){return{type:"error",error:a}}return"error"===r?{type:"error",error:new we(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:"data",data:e,statusCode:t.status,headers:t.headers}}return"error"===r?jt(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:(n=t,new we(n.init?.status??500,n.init?.statusText??"Internal Server Error",n.data)),statusCode:be(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:be(t)?t.status:void 0}:jt(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t};var n}function yt(e,t,r,n,a){let o=e.headers.get("Location");if(C(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!oe(o)){let i=n.slice(0,n.findIndex(e=>e.route.id===r)+1);o=Ge(new URL(t.url),i,a,o),e.headers.set("Location",o)}return e}var vt=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function gt(e,t,r,n){if(oe(e)){let n=e,a=n.startsWith("//")?new URL(t.protocol+n):new URL(n);if(vt.includes(a.protocol))throw new Error("Invalid redirect location");let o=null!=ne(a.pathname,r);
1if(a.origin===t.origin&&o)return de(a.pathname)+a.search+a.hash}try{let t=n.createURL(e);if(vt.includes(t.protocol))throw new Error("Invalid redirect location")}catch(a){}return e}function wt(e,t,r,n){let a=e.createURL(Tt(t)).toString(),o={signal:r};if(n&&Nt(n.formMethod)){let{formMethod:e,formEncType:t}=n;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(n.json)):"text/plain"===t?o.body=n.text:"application/x-www-form-urlencoded"===t&&n.formData?o.body=Et(n.formData):o.body=n.formData}return new Request(a,o)}function bt(e,t){let r=new URL(e.url),n="string"==typeof t?D(t):t;if(r.pathname=n.pathname||"/",n.search){let e=new URLSearchParams(n.search),t=e.getAll("index");e.delete("index");for(let r of t.filter(Boolean))e.append("index",r);r.search=e.size?`?${e.toString()}`:""}else r.search="";return r.hash=n.hash||"",r}function Et(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,"string"==typeof n?n:n.name);return t}function Rt(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function St(e,t,r,n,a,o,i){let{loaderData:l,errors:s}=function(e,t,r,n=!1,a=!1){let o,i={},l=null,s=!1,u={},c=r&&$t(r[1])?r[1].error:void 0;return e.forEach(r=>{if(!(r.route.id in t))return;let d=r.route.id,h=t[d];if(C(!At(h),"Cannot handle redirect results in processLoaderData"),$t(h)){let t=h.error;if(void 0!==c&&(t=c,c=void 0),l=l||{},a)l[d]=t;else{let r=Lt(e,d);null==l[r.route.id]&&(l[r.route.id]=t)}n||(i[d]=Ve),s||(s=!0,o=be(h.error)?h.error.status:500),h.headers&&(u[d]=h.headers)}else i[d]=h.data,h.statusCode&&200!==h.statusCode&&!s&&(o=h.statusCode),h.headers&&(u[d]=h.headers)}),void 0!==c&&r&&(l={[r[0]]:c},r[2]&&(i[r[2]]=void 0)),{loaderData:i,errors:l,statusCode:o||200,loaderHeaders:u}}(t,r,n);return a.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:r,match:n,controller:a}=t;if(a&&a.signal.aborted)return;let l=o[r];if(C(l,"Did not find corresponding fetcher result"),$t(l)){let t=Lt(e.matches,n?.route.id);s&&s[t.route.id]||(s={...s,[t.route.id]:l.error}),i.delete(r)}else if(At(l))C(!1,"Unhandled fetcher revalidation redirect");else{let e=Bt(l.data);i.set(r,e)}}),{loaderData:l,errors:s}}function xt(e,t,r,n){let a=Object.entries(t).filter(([,e])=>e!==Ve).reduce((e,[t,r])=>(e[t]=r,e),{});for(let o of r){let r=o.route.id;if(!t.hasOwnProperty(r)&&e.hasOwnProperty(r)&&o.route.loader&&(a[r]=e[r]),n&&n.hasOwnProperty(r))break}return a}function kt(e){return e?$t(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Lt(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>!0===e.route.hasErrorBoundary)||e[0]}function Ct(e){let t=1===e.length?e[0]:e.find(e=>e.index||!e.path||"/"===e.path)||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Mt(e,{pathname:t,routeId:r,method:n,type:a,message:o}={}){let i="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(i="Bad Request",n&&t&&r?l=`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.`:"invalid-body"===a&&(l="Unable to encode submission body")):403===e?(i="Forbidden",l=`Route "${r}" does not match URL "${t}"`):404===e?(i="Not Found",l=`No route matches URL "${t}"`):405===e&&(i="Method Not Allowed",n&&t&&r?l=`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&&(l=`Invalid request method "${n.toUpperCase()}"`)),new we(e||500,i,new Error(l),!0)}function Pt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[e,n]=t[r];
1if(At(n))return{key:e,result:n}}}function Tt(e){return O({..."string"==typeof e?D(e):e,hash:""})}function Ot(e){return null!=e&&"object"==typeof e&&Object.entries(e).every(([e,t])=>"string"==typeof e&&function(e){return null!=e&&"object"==typeof e&&"type"in e&&"result"in e&&("data"===e.type||"error"===e.type)}(t))}function Dt(e){return _t(e.result)&&Ue.has(e.result.status)}function $t(e){return"error"===e.type}function At(e){return"redirect"===(e&&e.type)}function jt(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function _t(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function Nt(e){return Fe.has(e.toUpperCase())}function Ft(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function Ht(e,t){let r="string"==typeof t?D(t).search:t.search;if(e[e.length-1].route.index&&Ft(r||""))return e[e.length-1];let n=se(e);return n[n.length-1]}function zt(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(t&&r&&n)return null!=a?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a}:null!=o?{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0}:void 0!==i?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}:void 0}function Ut(e,t,r,n){if(n){return{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}}return{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 It(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Bt(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 Wt(){let e,t,r=new Promise((n,a)=>{e=async e=>{n(e);try{await r}catch(t){}},t=async e=>{a(e);try{await r}catch(t){}}});return{promise:r,resolve:e,reject:t}}var qt=m.createContext(null);qt.displayName="DataRouter";var Jt=m.createContext(null);Jt.displayName="DataRouterState";var Yt=m.createContext(!1);function Vt(){return m.useContext(Yt)}var Kt=m.createContext({isTransitioning:!1});Kt.displayName="ViewTransition";var Xt=m.createContext(new Map);Xt.displayName="Fetchers",m.createContext(null).displayName="Await";var Gt=m.createContext(null);Gt.displayName="Navigation";var Zt=m.createContext(null);Zt.displayName="Location";var Qt=m.createContext({outlet:null,matches:[],isDataRoute:!1});Qt.displayName="Route";var er=m.createContext(null);er.displayName="RouteError";var tr="REACT_ROUTER_ERROR";function rr(){return null!=m.useContext(Zt)}function nr(){return C(rr(),"useLocation() may be used only in the context of a <Router> component."),m.useContext(Zt).location}var ar="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function or(e){m.useContext(Gt).static||m.useLayoutEffect(e)}function ir(){let{isDataRoute:e}=m.useContext(Qt);return e?function(){let{router:e}=function(e){let t=m.useContext(qt);return C(t,vr(e)),t}("useNavigate"),t=wr("useNavigate"),r=m.useRef(!1);return or(()=>{r.current=!0}),m.useCallback(async(n,a={})=>{M(r.current,ar),r.current&&("number"==typeof n?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...a}))},[e,t])}():function(){C(rr(),"useNavigate() may be used only in the context of a <Router> component.");let e=m.useContext(qt),{basename:t,navigator:r}=m.useContext(Gt),{matches:n}=m.useContext(Qt),{pathname:a}=nr(),o=JSON.stringify(ue(n)),i=m.useRef(!1);return or(()=>{i.current=!0}),m.useCallback((n,l={})=>{if(M(i.current,ar),!i.current)return;if("number"==typeof n)return void r.go(n);let s=ce(n,JSON.parse(o),a,"path"===l.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:he([t,s.pathname])),(l.replace?r.replace:r.push)(s,l.state,l)},[t,r,o,a,e])}()}var lr=m.createContext(null);function sr(){let{matches:e}=m.useContext(Qt),t=e[e.length-1];return t?.params??{}}function ur(e,{relative:t}={}){let{matches:r}=m.useContext(Qt),{pathname:n}=nr(),a=JSON.stringify(ue(r));return m.useMemo(()=>ce(e,JSON.parse(a),n,"path"===t),[e,a,n,t])}function cr(e,t,r){C(rr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=m.useContext(Gt),{matches:a}=m.useContext(Qt),o=a[a.length-1],i=o?o.params:{},l=o?o.pathname:"/",s=o?o.pathnameBase:"/",u=o&&o.route;{let e=u&&u.path||"";kr(l,!u||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${e}">) 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.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let c,d=nr();if(t){let e="string"==typeof t?D(t):t;C("/"===s||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),c=e}else c=d;let h=c.pathname||"/",f=h;if("/"!==s){let e=s.replace(/^\//,"").split("/");f="/"+h.replace(/^\//,"").split("/").slice(e.length).join("/")}let p=r&&r.state.matches.length?r.state.matches.map(e=>Object.assign(e,{route:r.manifest[e.route.id]||e.route})):z(e,{pathname:f});M(u||null!=p,`No routes matched location "${c.pathname}
1${c.search}${c.hash}" `),M(null==p||void 0!==p[p.length-1].route.element||void 0!==p[p.length-1].route.Component||void 0!==p[p.length-1].route.lazy,`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.`);let y=function(e,t=[],r){let n=r?.state;if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let a=e,o=n?.errors;if(null!=o){let e=a.findIndex(e=>e.route.id&&void 0!==o?.[e.route.id]);C(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let i=!1,l=-1;if(r&&n){i=n.renderFallback;for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:o}=n,s=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!o||void 0===o[t.route.id]);if(t.route.lazy||s){r.isStatic&&(i=!0),a=l>=0?a.slice(0,l+1):[a[0]];break}}}}let s=r?.onError,u=n&&s?(e,t)=>{s(e,{location:n.location,params:n.matches?.[0]?.params??{},pattern:Ee(n.matches),errorInfo:t})}:void 0;return a.reduceRight((e,r,s)=>{let c,d=!1,h=null,f=null;n&&(c=o&&r.route.id?o[r.route.id]:void 0,h=r.route.errorElement||hr,i&&(l<0&&0===s?(kr("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,f=null):l===s&&(d=!0,f=r.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,s+1)),y=()=>{let t;return t=c?h:d?f:r.route.Component?m.createElement(r.route.Component,null):r.route.element?r.route.element:e,m.createElement(yr,{match:r,routeContext:{outlet:e,matches:p,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===s)?m.createElement(fr,{location:n.location,revalidation:n.revalidation,component:h,error:c,children:y(),routeC
1ontext:{outlet:null,matches:p,isDataRoute:!0},onError:u}):y()},null)}(p&&p.map(e=>Object.assign({},e,{params:Object.assign({},i,e.params),pathname:he([s,n.encodeLocation?n.encodeLocation(e.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?s:he([s,n.encodeLocation?n.encodeLocation(e.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),a,r);return t&&y?m.createElement(Zt.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...c},navigationType:"POP"}},y):y}function dr(){let e=Sr(),t=be(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 i=m.createElement(m.Fragment,null,m.createElement("p",null,"ð¿ Hey developer ð"),m.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",m.createElement("code",{style:o},"ErrorBoundary")," or"," ",m.createElement("code",{style:o},"errorElement")," prop on your route.")),m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),r?m.createElement("pre",{style:a},r):null,i)}var hr=m.createElement(dr,null),fr=class extends m.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||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith(`${tr}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new we(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?m.createElement(Qt.Provider,{value:this.props.routeContext},m.createElement(er.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?m.createElement(mr,{error:e},t):t}};fr.contextType=Yt;var pr=new WeakMap;function mr({children:e,error:t}){let{basename:r}=m.useContext(Gt);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${tr}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(t.digest);if(e){let n=pr.get(t);if(n)throw n;let a=Se(e.location,r);if(Re&&!pr.get(t)){if(!a.isExternal&&!e.reloadDocument){const r=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw pr.set(t,r),r}window.location.href=a.absoluteURL||a.to}return m.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function yr({routeContext:e,match:t,children:r}){let n=m.useContext(qt);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),m.createElement(Qt.Provider,{value:e},r)}function vr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gr(e){let t=m.useContext(Jt);return C(t,vr(e)),t}function wr(e){let t=function(e){let t=m.useContext(Qt);return C(t,vr(e)),t}(e),r=t.matches[t.matches.length-1];return C(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function br(){let{matches:e,loaderData:t}=gr("useMatches");return m.useMemo(()=>e.map(e=>I(e,t)),[e,t])}function Er(){let e=gr("useLoaderData"),t=wr("useLoaderData");return e.loaderData[t]}function Rr(){let e=gr("useActionData"),t=wr("useLoaderData");return e.actionData?e.actionData[t]:void 0}function Sr(){let e=m.useContext(er),t=gr("useRouteError"),r=wr("useRouteError");return void 0!==e?e:t.errors?.[r]}var xr={};function kr(e,t,r){t||xr[e]||(xr[e]=!0,M(!1,r))}var Lr={};function Cr(e,t){e||Lr[t]||(Lr[t]=!0)}var Mr=v.useOptimistic,Pr=()=>{};function Tr(e){let t={hasErrorBoundary:e.hasErrorBoundary||null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&(e.element&&M(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:m.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&M(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:m.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&M(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:m.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Or=["HydrateFallback","hydrateFallbackElement"],Dr=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>
1{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}})}};function $r({router:e,flushSync:t,onError:r,useTransitions:n}){let a=Vt();n=a||n;let[o,i]=m.useState(e.state),[l,s]=(u=o,Mr?Mr(u):[u,Pr]);var u;let[c,d]=m.useState(),[h,f]=m.useState({isTransitioning:!1}),[p,y]=m.useState(),[v,g]=m.useState(),[w,b]=m.useState(),E=m.useRef(new Map),R=m.useCallback((a,{deletedFetchers:o,newErrors:l,flushSync:u,viewTransitionOpts:c})=>{l&&r&&Object.values(l).forEach(e=>r(e,{location:a.location,params:a.matches[0]?.params??{},pattern:Ee(a.matches)})),a.fetchers.forEach((e,t)=>{void 0!==e.data&&E.current.set(t,e.data)}),o.forEach(e=>E.current.delete(e)),Cr(!1===u||null!=t,'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 h=null!=e.window&&null!=e.window.document&&"function"==typeof e.window.document.startViewTransition;if(Cr(null==c||h,"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."),c&&h){if(t&&u){t(()=>{v&&(p?.resolve(),v.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:c.currentLocation,nextLocation:c.nextLocation})});let r=e.window.document.startViewTransition(()=>{t(()=>i(a))});return r.finished.finally(()=>{t(()=>{y(void 0),g(void 0),d(void 0),f({isTransitioning:!1})})}),void t(()=>g(r))}v?(p?.resolve(),v.skipTransition(),b({state:a,currentLocation:c.currentLocation,nextLocation:c.nextLocation})):(d(a),f({isTransitioning:!0,flushSync:!1,currentLocation:c.currentLocation,nextLocation:c.nextLocation}))}else t&&u?t(()=>i(a)):!1===n?i(a):m.startTransition(()=>{!0===n&&s(e=>Ar(e,a)),i(a)})},[e.window,t,v,p,n,s,r]);m.useLayoutEffect(()=>e.subscribe(R),[e,R]),m.useEffect(()=>{h.isTransitioning&&!h.flushSync&&y(new Dr)},[h]),m.useEffect(()=>{if(p&&c&&e.window){let t=c,r=p.promise,a=e.window.document.startViewTransition(async()=>{!1===n?i(t):m.startTransition(()=>{!0===n&&s(e=>Ar(e,t)),i(t)}),await r});a.finished.finally(()=>{y(void 0),g(void 0),d(void 0),f({isTransitioning:!1})}),g(a)}},[c,p,e.window,n,s]),m.useEffect(()=>{p&&c&&l.location.key===c.location.key&&p.resolve()},[p,v,l.location,c]),m.useEffect(()=>{!h.isTransitioning&&w&&(d(w.state),f({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),b(void 0))},[h.isTransitioning,w]);let S=m.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,r,n)=>e.navigate(t,{state:r,preventScrollReset:n?.preventScrollReset}),replace:(t,r,n)=>e.navigate(t,{replace:!0,state:r,preventScrollReset:n?.preventScrollReset})}),[e]),x=e.basename||"/",k=m.useMemo(()=>({router:e,navigator:S,static:!1,basename:x,onError:r}),[e,S,x,r]);return m.createElement(m.Fragment,null,m.createElement(qt.Provider,{value:k},m.createElement(Jt.Provider,{value:l},m.createElement(Xt.Provider,{value:E.current},m.createElement(Kt.Provider,{value:h},m.createElement(Hr,{basename:x,location:l.location,navigationType:l.historyAction,navigator:S,useTransitions:n},m.createElement(jr,{routes:e.routes,manifest:e.manifest,future:e.future,state:l,isStatic:!1,onError:r})))))),null)}function Ar(e,t){return{...e,navigation:"idle"!==t.navigation.state?t.navigation:e.navigation,revalidation:"idle"!==t.revalidation?t.revalidation:e.revalidation,actionData:"submitting"!==t.navigation.state?t.actionData:e.actionData,fetchers:t.fetchers}}var jr=m.memo(function({routes:e,manifest:t,future:r,state:n,isStatic:a,onError:o}){return cr(e,void 0,{manifest:t,state:n,isStatic:a,onError:o})});function _r({to:e,replace:t,state:r,relative:n}){C(rr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=m.useContext(Gt);M(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=m.useContext(Qt),{pathname:i}=nr(),l=ir(),s=ce(e,ue(o),i,"path"===n),u=JSON.stringify(s);return m.useEffect(()=>{l(JSON.parse(u),{replace:t,state:r,relative:n})},[l,u,n,t,r]),null}function Nr(e){return function(e){let t=m.useContext(Qt).outlet;return m.useMemo(()=>t&&m.createElement(lr.Provider,{value:e},t),[t,e])}(e.context)}function Fr(e){C(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Hr({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1,useTransitions:i}){C(!rr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=m.useMemo(()=>({basename:l,navigator:a,static:o,useTransitions:i,future:{}}),[l,a,o,i]);"string"==typeof r&&(r=D(r));
1let{pathname:u="/",search:c="",hash:d="",state:h=null,key:f="default",mask:p}=r,y=m.useMemo(()=>{let e=ne(u,l);return null==e?null:{location:{pathname:e,search:c,hash:d,state:h,key:f,mask:p},navigationType:n}},[l,u,c,d,h,f,n,p]);return M(null!=y,`<Router basename="${l}"> is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),null==y?null:m.createElement(Gt.Provider,{value:s},m.createElement(Zt.Provider,{children:t,value:y}))}function zr({children:e,location:t}){return cr(Ur(e),t)}function Ur(e,t=[]){let r=[];return m.Children.forEach(e,(e,n)=>{if(!m.isValidElement(e))return;let a=[...t,n];if(e.type===m.Fragment)return void r.push.apply(r,Ur(e.props.children,a));C(e.type===Fr,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),C(!e.props.index||!e.props.children,"An index route cannot have child routes.");let o={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=Ur(e.props.children,a)),r.push(o)}),r}function Ir(e){return function(){const t={params:sr(),loaderData:Er(),actionData:Rr(),matches:br()};return m.createElement(e,t)}}function Br(e){return function(){const t={params:sr(),loaderData:Er(),actionData:Rr()};return m.createElement(e,t)}}function Wr(e){return function(){const t={params:sr(),loaderData:Er(),actionData:Rr(),error:Sr()};return m.createElement(e,t)}}var qr="get",Jr="application/x-www-form-urlencoded";function Yr(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}function Vr(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(e=>[r,e]):[[r,n]])},[]))}var Kr=null;var Xr=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Gr(e){return null==e||Xr.has(e)?e:(M(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Jr}"`),null)}function Zr(e,t){let r,n,a,o,i;if(Yr(l=e)&&"form"===l.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?ne(i,t):null,r=e.getAttribute("method")||qr,a=Gr(e.getAttribute("enctype"))||Jr,o=new FormData(e)}else if(function(e){return Yr(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Yr(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(n=l?ne(l,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||qr,a=Gr(e.getAttribute("formenctype"))||Gr(i.getAttribute("enctype"))||Jr,o=new FormData(i,e),!function(){if(null===Kr)try{new FormData(document.createElement("form"),0),Kr=!1}catch(e){Kr=!0}return Kr}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}else t&&o.append(t,n)}}else{if(Yr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=qr,n=null,a=Jr,i=e}var l;return o&&"text/plain"===a&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}var Qr=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],en=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var tn="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:void 0;function rn(e){const{hydrated:t,values:r}=this;if("number"==typeof e)return nn.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,nn.call(this,n)}function nn(e){const{hydrated:t,values:r,deferred:n,plugins:a}=this;let o;const i=[[e,e=>{o=e}]];let l=[];for(;i.length>0;){const[e,o]=i.pop();switch(e){case-7:o(void 0);continue;case-5:o(null);continue;case-2:o(NaN);continue;case-6:o(1/0);continue;case-3:o(-1/0);continue;case-4:o(-0);continue}if(t[e]){o(t[e]);continue}const s=r[e];if(s&&"object"==typeof s){if(!Array.isArray(s)){const r={};t[e]=r;for(const e of Object.keys(s).reverse()){const t=[];i.push([s[e],e=>{t[1]=e}]),i.push([Number(e.slice(1)),e=>{t[0]=e}]),l.push(()=>{r[t[0]]=t[1]})}o(r);continue}if("string"!=typeof s[0]){const r=[];t[e]=r;for(let e=0;e<s.length;e++){const t=s[e];-1!==t&&i.push([t,t=>{r[e]=t}])}o(r);continue}{const[r,u,c]=s;switch(r){case"D":o(t[e]=new Date(u));continue;case"U":o(t[e]=new URL(u));continue;case"B":o(t[e]=BigInt(u));continue;case"R":o(t[e]=new RegExp(u,c));continue;case"Y":o(t[e]=Symbol.for(u));continue;case"S":const r=new Set;t[e]=r;for(let e=s.length-1;e>0;e--)i.push([s[e],e=>{r.add(e)}]);o(r);continue;case"M":const d=new Map;t[e]=d;for(let e=s.length-2;e>0;e-=2){const t=[];i.push([s[e+1],e=>{t[1]=e}]),i.push([s[e],e=>{t[0]=e}]),l.push(()=>{d.set(t[0],t[1])})}o(d);continue;case"N":const h=Object.create(null);t[e]=h;for(const e of Object.keys(u).reverse()){const t=[];i.push([u[e],e=>{t[1]=e}]),i.push([Number(e.slice(1)),e=>{t[0]=e}]),l.push(()=>{h[t[0]]=t[1]})}o(h);continue;case"P":if(t[u])o(t[e]=t[u]);else{const r=new en;n[u]=r,o(t[e]=r.promise)}continue;case"E":const[,f,p]=s;let m=p&&tn&&Qr.includes(p)&&p in tn&&"function"==typeof tn[p]?new tn[p](f):new Error(f);t[e]=m,o(m);continue;case"Z":o(t[e]=t[u]);continue;default:if(Array.isArray(a)){const r=[],n=s.slice(1);for(let e=0;e<n.length;e++){const t=n[e];i.push([t,t=>{r[e]=t}])}l.push(()=>{for(const n of a){const a=n(s[0],...r);if(a)return void o(t[e]=a.value)}throw new SyntaxError});continue}throw new SyntaxError}}}else t[e]=s,o(s)}for(;l.length>0;)l.pop()();return o}async function an(e,t){const{plugins:r}=t??{},n=new en,a=e.pipeThrough(function(){const e=new TextDecoder;let t="";return new TransformStream({transform(r,n){const a=e.decode(r,{stream:!0}),o=(t+a).split("\n");t=o.pop()||"";for(const e of o)n.enqueue(e)},flush(e){t&&e.enqueue(t)}})}()).getReader(),o={values:[],hydrated:[],deferred:{},plugins:r},i=await on.call(o,a);let l=n.promise;
1return i.done?n.resolve():l=ln.call(o,a).then(n.resolve).catch(e=>{for(const t of Object.values(o.deferred))t.reject(e);n.reject(e)}),{done:l.then(()=>a.closed),value:i.value}}async function on(e){const t=await e.read();if(!t.value)throw new SyntaxError;let r;try{r=JSON.parse(t.value)}catch(n){throw new SyntaxError}return{done:t.done,value:rn.call(this,r)}}async function ln(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;const n=t.value;switch(n[0]){case"P":{const e=n.indexOf(":"),t=Number(n.slice(1,e)),a=this.deferred[t];if(!a)throw new Error(`Deferred ID ${t} not found in stream`);const o=n.slice(e+1);let i;try{i=JSON.parse(o)}catch(r){throw new SyntaxError}const l=rn.call(this,i);a.resolve(l);break}case"E":{const e=n.indexOf(":"),t=Number(n.slice(1,e)),a=this.deferred[t];if(!a)throw new Error(`Deferred ID ${t} not found in stream`);const o=n.slice(e+1);let i;try{i=JSON.parse(o)}catch(r){throw new SyntaxError}const l=rn.call(this,i);a.reject(l);break}default:throw new SyntaxError}t=await e.read()}}var sn={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},un=/[&><\u2028\u2029]/g;function cn(e){return e.replace(un,e=>sn[e])}function dn(e,t){if(!1===e||null==e)throw new Error(t)}var hn,fn=Symbol("SingleFetchRedirect"),pn=class extends Error{},mn=new Set([100,101,204,205]);function yn(e,t,r,n,a,o){let i=function(e,t,r,n,a,o,i=()=>!0){return async l=>{let{request:s,matches:u,fetcherKey:c}=l,d=e();if("GET"!==s.method)return async function(e,t,r,n){let a=e.matches.find(e=>e.shouldCallHandler());dn(a,"No action match found");let o,i=await a.resolve(async i=>await i(async()=>{let{data:i,status:l}=await t(e,r,n,[a.route.id]);return o=l,bn(i,a.route.id)}));if(_t(i.result)||be(i.result)||jt(i.result))return{[a.route.id]:i};return{[a.route.id]:{type:i.type,result:ge(i.result,o)}}}(l,r,a,o);let h=u.some(e=>{let{hasLoader:r,hasClientLoader:n}=t(e);return e.shouldCallHandler()&&r&&!n});return n||h?c?async function(e,t,r,n){let a=e.matches.find(e=>e.shouldCallHandler());dn(a,"No fetcher match found");let o=a.route.id,i=await a.resolve(async a=>a(async()=>{let{data:a}=await t(e,r,n,[o]);return bn(a,o)}));return{[a.route.id]:i}}(l,r,a,o):async function(e,t,r,n,a,o,i,l=()=>!0){let s=new Set,u=!1,c=e.matches.map(()=>En()),d=En(),h={},f=Promise.all(e.matches.map(async(t,a)=>t.resolve(async f=>{c[a].resolve();let p=t.route.id,{hasLoader:m,hasClientLoader:y}=r(t),v=!t.shouldRevalidateArgs||null==t.shouldRevalidateArgs.actionStatus||t.shouldRevalidateArgs.actionStatus<400;if(t.shouldCallHandler(v))if(l(t)&&y){m&&(u=!0);try{let t=await f(async()=>{let{data:t}=await n(e,o,i,[p]);return bn(t,p)});h[p]={type:"data",result:t}}catch(g){h[p]={type:"error",result:g}}}else{m&&s.add(p);try{let e=await f(async()=>bn(await d.promise,p));h[p]={type:"data",result:e}}catch(g){h[p]={type:"error",result:g}}}else u||(u=null!=t.shouldRevalidateArgs&&m)})));await Promise.all(c.map(e=>e.promise));let p=!t.state.initialized&&"idle"===t.state.navigation.state;if(!p&&0!==s.size||window.__reactRouterHdrActive){let t=a&&u&&s.size>0?[...s.keys()]:void 0;try{let r=await n(e,o,i,t);d.resolve(r.data)}catch(m){d.reject(m)}}else d.resolve({routes:{}});return await f,await async function(e,t,r,n){try{let a,o=await e;if("routes"in o)for(let e of t)if(e.route.id in o.routes){let t=o.routes[e.route.id];if("error"in t){a=t.error,null==n[e.route.id]?.result&&(n[e.route.id]={type:"error",result:a});break}}void 0!==a&&Array.from(r.values()).forEach(e=>{n[e].result instanceof pn&&(n[e].result=a)})}catch(m){}}(d.promise,e.matches,s,h),h}(l,d,t,r,n,a,o,i):async function(e,t,r,n,a){let o=e.matches.filter(e=>e.shouldCallHandler()),i={};return await Promise.all(o.map(o=>o.resolve(async l=>{try{let{hasClientLoader:s}=t(o),u=o.route.id,c=s?await l(async()=>{let{data:t}=await r(e,n,a,[u]);return bn(t,u)}):await l();i[o.route.id]={type:"data",result:c}}catch(s){i[o.route.id]={type:"error",result:s}}}))),i}(l,t,r,a,o)}}(e,e=>{let r=t.routes[e.route.id];return dn(r,"Route not found in manifest"),{hasLoader:r.hasLoader,hasClientLoader:r.hasClientLoader}},gn,n,a,o);return async e=>e.runClientMiddleware(i)}function vn(e,t,r,n){let a="string"==typeof e?new URL(e,"undefined"==typeof window?"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&&"/"===ne(a.pathname,t)?a.pathname=`${fe(t)}
1/_root.${n}`:a.pathname=`${fe(a.pathname)}.${n}`,a}async function gn(e,t,r,n){let{request:a}=e,o=vn(a.url,t,r,"data");"GET"===a.method&&(o=function(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}(o),n&&o.searchParams.set("_routes",n.join(",")));let i=await fetch(o,await async function(e){let t={signal:e.signal};if("GET"!==e.method){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}(a));if(i.status>=400&&!i.headers.has("X-Remix-Response"))throw new we(i.status,i.statusText,await i.text());if(204===i.status&&i.headers.has("X-Remix-Redirect"))return{status:202,data:{redirect:{redirect:i.headers.get("X-Remix-Redirect"),status:Number(i.headers.get("X-Remix-Status")||"302"),revalidate:"true"===i.headers.get("X-Remix-Revalidate"),reload:"true"===i.headers.get("X-Remix-Reload-Document"),replace:"true"===i.headers.get("X-Remix-Replace")}}};if(mn.has(i.status)){let e={};return n&&"GET"!==a.method&&(e[n[0]]={data:void 0}),{status:i.status,data:{routes:e}}}dn(i.body,"No response body to decode");try{let e,t=await wn(i.body,window);if("GET"===a.method){let r=t.value;e=fn in r?{redirect:r[fn]}:{routes:r}}else{let r=t.value,a=n?.[0];dn(a,"No routeId found for single fetch call decoding"),e="redirect"in r?{redirect:r}:{routes:{[a]:r}}}return{status:i.status,data:e}}catch(l){throw new Error("Unable to decode turbo-stream response")}}function wn(e,t){return an(e,{plugins:[(e,...r)=>{if("SanitizedError"===e){let[e,n,a]=r,o=Error;e&&Qr.includes(e)&&e in t&&"function"==typeof t[e]&&(o=t[e]);let i=new o(n);return i.stack=a,{value:i}}if("ErrorResponse"===e){let[e,t,n]=r;return{value:new we(t,n,e)}}return"SingleFetchRedirect"===e?{value:{[fn]:r[0]}}:"SingleFetchClassInstance"===e?{value:r[0]}:"SingleFetchFallback"===e?{value:void 0}:void 0}]})}function bn(e,t){if("redirect"in e){let{redirect:t,revalidate:r,reload:n,replace:a,status:o}=e.redirect;throw((e,t=302)=>{let r=t;"number"==typeof r?r={status:r}:void 0===r.status&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,{...r,headers:n})})(t,{status:o,headers:{...r?{"X-Remix-Revalidate":"yes"}:null,...n?{"X-Remix-Reload-Document":"yes"}:null,...a?{"X-Remix-Replace":"yes"}:null}})}let r=e.routes[t];if(null==r)throw new pn(`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 En(){let e,t,r=new Promise((n,a)=>{e=async e=>{n(e);try{await r}catch(t){}},t=async e=>{a(e);try{await r}catch(t){}}});return{promise:r,resolve:e,reject:t}}async function Rn(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 window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Sn(e){return e.css?e.css.map(e=>({rel:"stylesheet",href:e})):[]}async function xn(e,t){if(!e.css&&!t.links||!function(){if(void 0!==hn)return hn;let e=document.createElement("link");return hn=e.relList.supports("preload"),e=null,hn}())return;let r=[];if(e.css&&r.push(...Sn(e)),t.links&&r.push(...t.links()),0===r.length)return;let n=[];for(let a of r)Ln(a)||"stylesheet"!==a.rel||n.push({...a,rel:"preload",as:"style"});await Promise.all(n.map(kn))}async function kn(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");function n(){document.head.contains(r)&&document.head.removeChild(r)}Object.assign(r,e),r.onload=()=>{n(),t()},r.onerror=()=>{n(),t()},document.head.appendChild(r)})}function Ln(e){return null!=e&&"string"==typeof e.page}function Cn(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function Mn(e,t,r,n,a,o){let i=(e,t)=>!r[t]||e.route.id!==r[t].route.id,l=(e,t)=>
1r[t].pathname!==e.pathname||r[t].route.path?.endsWith("*")&&r[t].params["*"]!==e.params["*"];return"assets"===o?t.filter((e,t)=>i(e,t)||l(e,t)):"data"===o?t.filter((t,o)=>{let s=n.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(i(t,o)||l(t,o))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0}):[]}function Pn(e,t,{includeHydrateFallback:r}={}){return n=e.map(e=>{let n=t.routes[e.route.id];if(!n)return[];let a=[n.module];return n.clientActionModule&&(a=a.concat(n.clientActionModule)),n.clientLoaderModule&&(a=a.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(a=a.concat(n.hydrateFallbackModule)),n.imports&&(a=a.concat(n.imports)),a}).flat(1),[...new Set(n)];var n}function Tn(e,t){let r=new Set,n=new Set(t);return e.reduce((e,a)=>{if(t&&!Ln(a)&&"script"===a.as&&a.href&&n.has(a.href))return e;let o=JSON.stringify(function(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}(a));return r.has(o)||(r.add(o),e.push({key:o,link:a})),e},[])}function On(){return m.createElement(ha,{title:"Loading...",renderScripts:!0},m.createElement("script",{dangerouslySetInnerHTML:{__html:'\n console.log(\n "ð¿ Hey developer ð. You can provide a way better UX than this " +\n "when your app is loading JS modules and/or running `clientLoader` " +\n "functions. Check out https://reactrouter.com/start/framework/route-module#hydratefallback " +\n "for more information."\n );\n '}}))}function Dn(e){let t={};return Object.values(e).forEach(e=>{if(e){let r=e.parentId||"";t[r]||(t[r]=[]),t[r].push(e)}}),t}function $n(e,t,r){let n=Hn(t),a=!t.HydrateFallback||r&&"root"!==e.id?"root"===e.id?On:void 0:t.HydrateFallback,o=t.ErrorBoundary?t.ErrorBoundary:"root"===e.id?()=>m.createElement(da,{error:Sr()}):void 0;return"root"===e.id&&t.Layout?{...n?{element:m.createElement(t.Layout,null,m.createElement(n,null))}:{Component:n},...o?{errorElement:m.createElement(t.Layout,null,m.createElement(o,null))}:{ErrorBoundary:o},...a?{hydrateFallbackElement:m.createElement(t.Layout,null,m.createElement(a,null))}:{HydrateFallback:a}}:{Component:n,ErrorBoundary:o,HydrateFallback:a}}function An(e,t,r,n,a,o){return Nn(t,r,n,a,o,"",Dn(t),e)}function jn(e,t){if("loader"===e&&!t.hasLoader||"action"===e&&!t.hasAction){let r=`You are trying to call ${"action"===e?"serverAction()":"serverLoader()"} on a route that does not have a server ${e} (routeId: "${t.id}")`;throw new we(400,"Bad Request",new Error(r),!0)}}function _n(e,t){let r="clientAction"===e?"a":"an";throw new we(405,"Method Not Allowed",new Error(`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`),!0)}function Nn(e,t,r,n,a,o="",i=Dn(e),l){return(i[o]||[]).map(o=>{let s=t[o.id];function u(e){return dn("function"==typeof e,"No single fetch function available for route handler"),e()}function c(e){return o.hasLoader?u(e):Promise.resolve(null)}function d(e){if(!o.hasAction)throw _n("action",o.id);return u(e)}function h(e){import(e)}function f(e){e.clientActionModule&&h(e.clientActionModule),e.clientLoaderModule&&h(e.clientLoaderModule)}async function p(e){let r=t[o.id],n=r?xn(o,r):Promise.resolve();try{return e()}finally{await n}}let m={id:o.id,index:o.index,path:o.path};if(s){Object.assign(m,{...m,...$n(o,s,a),middleware:s.clientMiddleware,handle:s.handle,shouldRevalidate:Fn(m.path,s,o,n,l)});let v=r&&r.loaderData&&o.id in r.loaderData,g=v?r?.loaderData?.[o.id]:void 0,w=r&&r.errors&&o.id in r.errors,b=w?r?.errors?.[o.id]:void 0,E=null==l&&(!0===s.clientLoader?.hydrate||!o.hasLoader);m.loader=async({request:e,params:t,context:r,pattern:n,url:a},i)=>{let l=E;return E=!1,await p(async()=>(dn(s,"No `routeModule` available for critical-route loader"),s.clientLoader?s.clientLoader({request:e,params:t,context:r,pattern:n,url:a,async serverLoader(){if
1(jn("loader",o),l){if(v)return g;if(w)throw b}return c(i)}}):c(i)))},m.loader.hydrate=zn(o.id,s.clientLoader,o.hasLoader,a),m.action=({request:e,params:t,context:r,pattern:n,url:i},l)=>p(async()=>{if(dn(s,"No `routeModule` available for critical-route action"),!s.clientAction){if(a)throw _n("clientAction",o.id);return d(l)}return s.clientAction({request:e,params:t,context:r,pattern:n,url:i,serverAction:async()=>(jn("action",o),d(l))})})}else{let R;async function S(){return R||(R=(async()=>{(o.clientLoaderModule||o.clientActionModule)&&await new Promise(e=>setTimeout(e,0));let e=async function(e,t){let r=Rn(e,t),n=async function(e){if(!e.css)return;let t=Sn(e);await Promise.all(t.map(kn))}(e),a=await r;return await Promise.all([n,xn(e,a)]),{Component:Hn(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}}(o,t);return f(o),await e})()),await R}o.hasClientLoader||(m.loader=(e,t)=>p(()=>c(t))),o.hasClientAction||(m.action=(e,t)=>p(()=>{if(a)throw _n("clientAction",o.id);return d(t)})),m.lazy={loader:o.hasClientLoader?async()=>{let{clientLoader:e}=o.clientLoaderModule?await import(o.clientLoaderModule):await S();return dn(e,"No `clientLoader` export found"),(t,r)=>e({...t,serverLoader:async()=>(jn("loader",o),c(r))})}:void 0,action:o.hasClientAction?async()=>{let e=o.clientActionModule?import(o.clientActionModule):S();f(o);let{clientAction:t}=await e;return dn(t,"No `clientAction` export found"),(e,r)=>t({...e,serverAction:async()=>(jn("action",o),d(r))})}:void 0,middleware:o.hasClientMiddleware?async()=>{let{clientMiddleware:e}=o.clientMiddlewareModule?await import(o.clientMiddlewareModule):await S();return dn(e,"No `clientMiddleware` export found"),e}:void 0,shouldRevalidate:async()=>{let e=await S();return Fn(m.path,e,o,n,l)},handle:async()=>(await S()).handle,Component:async()=>(await S()).Component,ErrorBoundary:o.hasErrorBoundary?async()=>(await S()).ErrorBoundary:void 0}}let y=Nn(e,t,r,n,a,o.id,i,l);return y.length>0&&(m.children=y),m})}function Fn(e,t,r,n,a){if(a)return function(e,t,r){let n=!1;return a=>n?t?t(a):a.defaultShouldRevalidate:(n=!0,r.has(e))}(r.id,t.shouldRevalidate,a);if(!n&&r.hasLoader&&!r.hasClientLoader){let r=e?re(e)[1].map(e=>e.paramName):[];const n=e=>r.some(t=>e.currentParams[t]!==e.nextParams[t]);if(t.shouldRevalidate){let e=t.shouldRevalidate;return t=>e({...t,defaultShouldRevalidate:n(t)})}return e=>n(e)}return t.shouldRevalidate}function Hn(e){if(null==e.default)return;return"object"==typeof e.default&&0===Object.keys(e.default).length?void 0:e.default}function zn(e,t,r,n){return n&&"root"!==e||null!=t&&(!0===t.hydrate||!0!==r)}var Un=new Set,In=new Set;function Bn(e,t){return"lazy"===e.mode&&!0===t}function Wn(e,t,r,n,a,o,i){if(Bn(a,n))return async({path:l,patch:s,signal:u,fetcherKey:c})=>{if(In.has(l))return;let{state:d}=e();await Yn([l],c?window.location.href:O(d.navigation.location||d.location),t,r,n,o,i,a.manifestPath,s,u)}}function qn(e,t,r,n,a,o){m.useEffect(()=>{if(!Bn(a,n)||!0===window.navigator?.connection?.saveData)return;function i(e){let t="FORM"===e.tagName?e.getAttribute("action"):e.getAttribute("href");if(!t)return;let r="A"===e.tagName?e.pathname:new URL(t,window.location.origin).pathname;In.has(r)||Un.add(r)}async function l(){document.querySelectorAll("a[data-discover], form[data-discover]").forEach(i);let l=Array.from(Un.keys()).filter(e=>!In.has(e)||(Un.delete(e),!1));if(0!==l.length)try{await Yn(l,null,t,r,n,o,e.basename,a.manifestPath,e.patchRoutes)}catch(s){}}let s=function(e,t){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...n),t)}}(l,100);l();let u=new MutationObserver(()=>s());return u.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-discover","href","action"]}),()=>u.disconnect()},[n,o,t,r,e,a])}var Jn="react-router-manifest-version";async function Yn(e,t,r,n,a,o,i,l,s,u){const c=new URLSearchParams;c.set("paths",e.sort().join(",")),c.set("version",r.version);let d,h=new URL(function(e,t){let r=e||"/__manifest";return null==t?r:he([t,r])}(l,i),window.location.origin);if(h.search=c.toString(),h.toString().length>7680)return void Un.clear();try{let e=await fetch(h,{signal:u});if(!e.ok)throw new Error(`${e.status} ${e.statusText}`);if(204===e.status&&e.headers.has("X-Remix-Reload-Document")){if(!t)return;try{if(sessionStorage.getItem(Jn)===r.version)return;sessionStorage.setItem(Jn,r.version)}catch{}window.location.href=t,await new Promise(()=>{})}else if(e.status>=400)throw new Error(await e.text());try{sessionStorage.removeItem(Jn)}catch{}d=await e.json()}catch(y){if(u?.aborted)return;throw y}let f=new Set(Object.keys(r.routes)),p=Object.values(d).reduce((e,t)=>
1(t&&!f.has(t.id)&&(e[t.id]=t),e),{});Object.assign(r.routes,p),e.forEach(e=>function(e,t){if(t.size>=1e3){let e=t.values().next().value;t.delete(e)}t.add(e)}(e,In));let m=new Set;Object.values(p).forEach(e=>{!e||e.parentId&&p[e.parentId]||m.add(e.parentId)}),m.forEach(e=>s(e||null,Nn(p,n,null,a,o,e)))}function Vn(){let e=m.useContext(qt);return dn(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Kn(){let e=m.useContext(Jt);return dn(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Xn=m.createContext(void 0);function Gn(){let e=m.useContext(Xn);return dn(e,"You must render this element inside a <HydratedRouter> element"),e}function Zn(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Qn(e,t,r){if(r&&!la)return[e[0]];if(t){let r=e.findIndex(e=>void 0!==t[e.route.id]);return e.slice(0,r+1)}return e}Xn.displayName="FrameworkContext";var ea="data-react-router-critical-css";function ta({nonce:e,crossOrigin:t}){let{isSpaMode:r,manifest:n,routeModules:a,criticalCss:o}=Gn(),{errors:i,matches:l}=Kn(),s=Qn(l,i,r),u=m.useMemo(()=>function(e,t,r){return Tn(e.map(e=>{let n=t[e.route.id],a=r.routes[e.route.id];return[a&&a.css?a.css.map(e=>({rel:"stylesheet",href:e})):[],n?.links?.()||[]]}).flat(2),Pn(e,r))}(s,a,n),[s,a,n]);return m.createElement(m.Fragment,null,"string"==typeof o?m.createElement("style",{[ea]:"",nonce:e,dangerouslySetInnerHTML:{__html:o}}):null,"object"==typeof o?m.createElement("link",{[ea]:"",rel:"stylesheet",href:o.href,nonce:e,crossOrigin:t}):null,u.map(({key:r,link:n})=>Ln(n)?m.createElement(ra,{key:r,nonce:e,...n,crossOrigin:n.crossOrigin??t}):m.createElement("link",{key:r,nonce:e,...n,crossOrigin:n.crossOrigin??t})))}function ra({page:e,...t}){let r=Vt(),{router:n}=Vn(),a=m.useMemo(()=>z(n.routes,e,n.basename),[n.routes,e,n.basename]);return a?r?m.createElement(aa,{page:e,matches:a,...t}):m.createElement(oa,{page:e,matches:a,...t}):null}function na(e){let{manifest:t,routeModules:r}=Gn(),[n,a]=m.useState([]);return m.useEffect(()=>{let n=!1;return async function(e,t,r){return Tn((await Promise.all(e.map(async e=>{let n=t.routes[e.route.id];if(n){let e=await Rn(n,r);return e.links?e.links():[]}return[]}))).flat(1).filter(Cn).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}(e,t,r).then(e=>{n||a(e)}),()=>{n=!0}},[e,t,r]),n}function aa({page:e,matches:t,...r}){let n=nr(),{future:a}=Gn(),{basename:o}=Vn(),i=m.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let r=vn(e,o,a.v8_trailingSlashAwareDataRequests,"rsc"),i=!1,l=[];for(let e of t)"function"==typeof e.route.shouldRevalidate?i=!0:l.push(e.route.id);return i&&l.length>0&&r.searchParams.set("_routes",l.join(",")),[r.pathname+r.search]},[o,a.v8_trailingSlashAwareDataRequests,e,n,t]);return m.createElement(m.Fragment,null,i.map(e=>m.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r})))}function oa({page:e,matches:t,...r}){let n=nr(),{future:a,manifest:o,routeModules:i}=Gn(),{basename:l}=Vn(),{loaderData:s,matches:u}=Kn(),c=m.useMemo(()=>Mn(e,t,u,o,n,"data"),[e,t,u,o,n]),d=m.useMemo(()=>Mn(e,t,u,o,n,"assets"),[e,t,u,o,n]),h=m.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let r=new Set,u=!1;if(t.forEach(e=>{let t=o.routes[e.route.id];t&&t.hasLoader&&(!c.some(t=>t.route.id===e.route.id)&&e.route.id in s&&i[e.route.id]?.shouldRevalidate||t.hasClientLoader?u=!0:r.add(e.route.id))}),0===r.size)return[];let d=vn(e,l,a.v8_trailingSlashAwareDataRequests,"data");return u&&r.size>0&&d.searchParams.set("_routes",t.filter(e=>r.has(e.route.id)).map(e=>e.route.id).join(",")),[d.pathname+d.search]},[l,a.v8_trailingSlashAwareDataRequests,s,n,o,c,t,e,i]),f=m.useMemo(()=>Pn(d,o),[d,o]),p=na(d);return m.createElement(m.Fragment,null,h.map(e=>m.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r})),f.map(e=>m.createElement("link",{key:e,rel:"modulepreload",href:e,...r})),p.map(({key:e,link:t})=>m.createElement("link",{key:e,nonce:r.nonce,...t,crossOrigin:t.crossOrigin??r.crossOrigin})))}
1function ia(){let{isSpaMode:e,routeModules:t}=Gn(),{errors:r,matches:n,loaderData:a}=Kn(),o=nr(),i=Qn(n,r,e),l=null;r&&(l=r[i[i.length-1].route.id]);let s=[],u=null,c=[];for(let d=0;d<i.length;d++){let e=i[d],r=e.route.id,n=a[r],h=e.params,f=t[r],p=[],m={id:r,data:n,loaderData:n,meta:[],params:e.params,pathname:e.pathname,handle:e.route.handle,error:l};if(c[d]=m,f?.meta?p="function"==typeof f.meta?f.meta({data:n,loaderData:n,params:h,location:o,matches:c,error:l}):Array.isArray(f.meta)?[...f.meta]:f.meta:u&&(p=[...u]),p=p||[],!Array.isArray(p))throw new Error("The route at "+e.route.path+" returns an invalid value. All route meta functions must return an array of meta objects.\n\nTo reference the meta function API, see https://reactrouter.com/start/framework/route-module#meta");m.meta=p,c[d]=m,s=[...p],u=s}return m.createElement(m.Fragment,null,s.flat().map(e=>{if(!e)return null;if("tagName"in e){let{tagName:t,...r}=e;if(!function(e){return"string"==typeof e&&/^(meta|link)$/.test(e)}(t))return null;let n=t;return m.createElement(n,{key:JSON.stringify(r),...r})}if("title"in e)return m.createElement("title",{key:"title"},String(e.title));if("charset"in e&&(e.charSet??(e.charSet=e.charset),delete e.charset),"charSet"in e&&null!=e.charSet)return"string"==typeof e.charSet?m.createElement("meta",{key:"charSet",charSet:e.charSet}):null;if("script:ld+json"in e)try{let t=JSON.stringify(e["script:ld+json"]);return m.createElement("script",{key:`script:ld+json:${t}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:cn(t)}})}catch(t){return null}return m.createElement("meta",{key:JSON.stringify(e),...e})}))}var la=!1;function sa(e){let{manifest:t,serverHandoffString:r,isSpaMode:n,renderMeta:a,routeDiscovery:o,ssr:i}=Gn(),{router:l,static:s,staticContext:u}=Vn(),{matches:c}=Kn(),d=Vt(),h=Bn(o,i);a&&(a.didRenderScripts=!0);let f=Qn(c,null,n);m.useEffect(()=>{la=!0},[]);let p=m.useMemo(()=>{if(d)return null;let n=u?`window.__reactRouterContext = ${r};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",a=s?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${h?"":`import ${JSON.stringify(t.url)}`};\n${f.map((e,r)=>{let n=`route${r}`,a=t.routes[e.route.id];dn(a,`Route ${e.route.id} not found in manifest`);let{clientActionModule:o,clientLoaderModule:i,clientMiddlewareModule:l,hydrateFallbackModule:s,module:u}=a,c=[...o?[{module:o,varName:`${n}_clientAction`}]:[],...i?[{module:i,varName:`${n}_clientLoader`}]:[],...l?[{module:l,varName:`${n}_clientMiddleware`}]:[],...s?[{module:s,varName:`${n}_HydrateFallback`}]:[],{module:u,varName:`${n}_main`}];return 1===c.length?`import * as ${n} from ${JSON.stringify(u)};`:[c.map(e=>`import * as ${e.varName} from "${e.module}";`).join("\n"),`const ${n} = {${c.map(e=>`...${e.varName}`).join(",")}};`].join("\n")}).join("\n")}\n ${h?`window.__reactRouterManifest = ${JSON.stringify(function({sri:e,...t},r){let n=new Set(r.state.matches.map(e=>e.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(e=>{let t=U(r.routes,e,r.basename||"/",!1,r.branches);t&&t.forEach(e=>n.add(e.route.id))});let i=[...n].reduce((e,r)=>Object.assign(e,{[r]:t.routes[r]}),{});return{...t,routes:i,sri:!!e||void 0}}(t,l),null,2)};`:""}\n window.__reactRouterRouteModules = {${f.map((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`).join(",")}};\n\nimport(${JSON.stringify(t.entry.module)});`:" ";return m.createElement(m.Fragment,null,m.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:n},type:void 0}),m.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:a},type:"module",async:!0}))},[]),y=la||d?[]:[...new Set(t.entry.imports.concat(Pn(f,t,{includeHydrateFallback:!0})))],v="object"==typeof t.sri?t.sri:{};return Cr(!d,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),la||d?null:m.createElement(m.Fragment,null,"object"==typeof t.sri?m.createElement("script",{...e,"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:v})}}):null,h?null:m.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:v[t.url],nonce:e.nonce,suppressHydrationWarning:!0}),m.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:v[t.entry.module],nonce:e.nonce,suppressHydrationWarning:!0}),y.map(t=>m.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin,integrity:v[t],nonce:e.nonce,suppressHydrationWarning:!0})),p)}function ua(...e){return t=>
1{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}var ca=class extends m.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?m.createElement(da,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function da({error:e,isOutsideRemixApp:t}){let r,n=m.createElement("script",{dangerouslySetInnerHTML:{__html:'\n console.log(\n "ð¿ 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."\n );\n '}});if(be(e))return m.createElement(ha,{title:"Unhandled Thrown Response!"},m.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),n);if(e instanceof Error)r=e;else{let t=null==e?"Unknown Error":"object"==typeof e&&"toString"in e?e.toString():JSON.stringify(e);r=new Error(t)}return m.createElement(ha,{title:"Application Error!",isOutsideRemixApp:t},m.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),m.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},r.stack),n)}function ha({title:e,renderScripts:t,isOutsideRemixApp:r,children:n}){let{routeModules:a}=Gn();return a.root?.Layout&&!r?n:m.createElement("html",{lang:"en"},m.createElement("head",null,m.createElement("meta",{charSet:"utf-8"}),m.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),m.createElement("title",null,e)),m.createElement("body",null,m.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},n,t?m.createElement(sa,null):null)))}var fa="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{fa&&(window.__reactRouterVersion="7.17.0")}catch(La){}var pa=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ma=m.forwardRef(function({onClick:e,discover:t="render",prefetch:r="none",relative:n,reloadDocument:a,replace:o,mask:i,state:l,target:s,to:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:h,...f},p){let{basename:y,navigator:v,useTransitions:g}=m.useContext(Gt),w="string"==typeof u&&pa.test(u),b=Se(u,y),E=function(e,{relative:t}={}){C(rr(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=m.useContext(Gt),{hash:a,pathname:o,search:i}=ur(e,{relative:t}),l=o;return"/"!==r&&(l="/"===o?r:he([r,o])),n.createHref({pathname:l,search:i,hash:a})}(u=b.to,{relative:n}),R=nr(),S=null;if(i){let e=ce(i,[],R.mask?R.mask.pathname:"/",!0);"/"!==y&&(e.pathname="/"===e.pathname?y:he([y,e.pathname])),S=v.createHref(e)}let[x,k,L]=function(e,t){let r=m.useContext(Xn),[n,a]=m.useState(!1),[o,i]=m.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,h=m.useRef(null);m.useEffect(()=>{if("render"===e&&i(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{i(e.isIntersecting)})},{threshold:.5});return h.current&&e.observe(h.current),()=>{e.disconnect()}}},[e]),m.useEffect(()=>{if(n){let e=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(e)}}},[n]);let f=()=>{a(!0)},p=()=>{a(!1),i(!1)};return r?"intent"!==e?[o,h,{}]:[o,h,{onFocus:Zn(l,f),onBlur:Zn(s,p),onMouseEnter:Zn(u,f),onMouseLeave:Zn(c,p),onTouchStart:Zn(d,f)}]:[!1,h,{}]}(r,f),M=function(e,{target:t,replace:r,mask:n,state:a,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s,useTransitions:u}={}){let c=ir(),d=nr(),h=ur(e,{relative:i});return m.useCallback(f=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(f,t)){f.preventDefault();let t=void 0!==r?r:O(d)===O(h),p=()=>c(e,{replace:t,mask:n,state:a,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s});u?m.startTransition(()=>p()):p()}},[d,c,h,r,n,a,t,e,o,i,l,s,u])}(u,{replace:o,mask:i,state:l,target:s,preventScrollReset:c,relative:n,viewTransition:d,defaultShouldRevalidate:h,useTransitions:g});let P=!(b.isExternal||a),T=m.createElement("a",{...f,...L,href:(P?S:void 0)||b.absoluteURL||E,onClick:P?function(t){e&&e(t),t.defaultPrevented||M(t)}:e,ref:ua(p,k),target:s,"data-discover":w||"render"!==t?void 0:"true"});return x&&!w?m.createElement(m.Fragment,null,T,m.createElement(ra,{page:E})):T});ma.displayName="Link";var ya=m.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:r="",end:n=!1,style:a,to:o,viewTransition:i,children:l,...s},u){let c=ur(o,{relative:s.relative}),d=nr(),h=m.useContext(Jt),{navigator:f,basename:p}=m.useContext(Gt),y=null!=h&&function(e,{relative:t}={}){let r=m.useContext(Kt);C(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=wa("useViewTransitionState"),a=ur(e,{relative:t});if(!r.isTransitioning)return!1;let o=ne(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=ne(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=te(a.pathname,i)||null!=te(a.pathname,o)}(c)&&!0===i,v=f.encodeLocation?f.encodeLocation(c).pathname:c.pathname,g=d.pathname,w=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;t||(g=g.toLowerCase(),w=w?w.toLowerCase():null,v=v.toLowerCase()),w&&p&&(w=ne(w,p)||w);const b="/"!==v&&v.endsWith("/")?v.length-1:v.length;let E,R=g===v||!n&&g.startsWith(v)&&"/"===g.charAt(b),S=null!=w&&(w===v||!n&&w.startsWith(v)&&"/"===w.charAt(v.length)),x={isActive:R,isPending:S,isTransitioning:y},k=R?e:void 0;E="function"==typeof r?r(x):[r,R?"active":null,S?"pending":null,y?"transitioning":null].filter(
1Boolean).join(" ");let L="function"==typeof a?a(x):a;return m.createElement(ma,{...s,"aria-current":k,className:E,ref:u,style:L,to:o,viewTransition:i},"function"==typeof l?l(x):l)});function va({getKey:e,storageKey:t,...r}){let n=m.useContext(Xn),{basename:a}=m.useContext(Gt),o=nr(),i=br();!function({getKey:e,storageKey:t}={}){let{router:r}=wa("useScrollRestoration"),{restoreScrollPosition:n,preventScrollReset:a}=function(e){let t=m.useContext(Jt);return C(t,ga(e)),t}("useScrollRestoration"),{basename:o}=m.useContext(Gt),i=nr(),l=br(),s=function(){let e=gr("useNavigation");return m.useMemo(()=>{let{matches:t,historyAction:r,...n}=e.navigation;return n},[e.navigation])}();m.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),function(e){let{capture:t}={};m.useEffect(()=>{let r=null!=t?{capture:t}:void 0;return window.addEventListener("pagehide",e,r),()=>{window.removeEventListener("pagehide",e,r)}},[e,t])}(m.useCallback(()=>{if("idle"===s.state){let t=ka(i,l,o,e);xa[t]=window.scrollY}try{sessionStorage.setItem(t||Sa,JSON.stringify(xa))}catch(r){M(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${r}).`)}window.history.scrollRestoration="auto"},[s.state,e,o,i,l,t])),"undefined"!=typeof document&&(m.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Sa);e&&(xa=JSON.parse(e))}catch(La){}},[t]),m.useLayoutEffect(()=>{let t=r?.enableScrollRestoration(xa,()=>window.scrollY,e?(t,r)=>ka(t,r,o,e):void 0);return()=>t&&t()},[r,o,e]),m.useLayoutEffect(()=>{if(!1!==n)if("number"!=typeof n){try{if(i.hash){let e=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(e)return void e.scrollIntoView()}}catch{M(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}!0!==a&&window.scrollTo(0,0)}else window.scrollTo(0,n)},[i,n,a]))}({getKey:e,storageKey:t});let l=m.useMemo(()=>{if(!n||!e)return null;let t=ka(o,i,a,e);return t!==o.key?t:null},[]);if(!n||n.isSpaMode)return null;let s=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},"")}try{let r=JSON.parse(sessionStorage.getItem(e)||"{}")[t||window.history.state.key];"number"==typeof r&&window.scrollTo(0,r)}catch(r){sessionStorage.removeItem(e)}}).toString();return m.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${s})(${cn(JSON.stringify(t||Sa))}, ${cn(JSON.stringify(l))})`}})}function ga(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function wa(e){let t=m.useContext(qt);return C(t,ga(e)),t}function ba(e){M("undefined"!=typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=m.useRef(Vr(e)),r=m.useRef(!1),n=nr(),a=m.useMemo(()=>function(e,t){let r=Vr(e);return t&&t.forEach((e,n)=>{r.has(n)||t.getAll(n).forEach(e=>{r.append(n,e)})}),r}(n.search,r.current?null:t.current),[n.search]),o=ir(),i=m.useCallback((e,t)=>{const n=Vr("function"==typeof e?e(new URLSearchParams(a)):e);r.current=!0,o("?"+n,t)},[o,a]);return[a,i]}ya.displayName="NavLink",m.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:o,method:i=qr,action:l,onSubmit:s,relative:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:h,...f},p)=>{let{useTransitions:y}=m.useContext(Gt),v=function(){let{router:e}=wa("useSubmit"),{basename:t}=m.useContext(Gt),r=wr("useRouteId"),n=e.fetch,a=e.navigate;return m.useCallback(async(e,o={})=>{let{action:i,method:l,encType:s,formData:u,body:c}=Zr(e,t);if(!1===o.navigate){let e=o.fetcherKey||Ra();await n(e,r,o.action||i,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:u,body:c,formMethod:o.method||l,formEncType:o.encType||s,flushSync:o.flushSync})}else await a(o.action||i,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:u,body:c,formMethod:o.method||l,formEncType:o.encType||s,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[n,a,t,r])}(),g=function(e,{relative:t}={}){let{basename:r}=m.useContext(Gt),n=m.useContext(Qt);C(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),o={...ur(e||".",{relative:t})},i=nr();if(null==e){o.search=i.search;let e=new URLSearchParams(o.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();o.search=r?`?${r}`:""}}e&&"."!==e||!a.route.index||(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index");"/"!==r&&(o.pathname="/"===o.pathname?r:he([r,o.pathname]));return O(o)}(l,{relative:u}),w="get"===i.toLowerCase()?"get":"post",b="string"==typeof l&&pa.test(l);return m.createElement("form",{ref:p,method:w,action:g,onSubmit:n?s:e=>{if(s&&s(e),e.defaultPrevented)return;e.preventDefault();let n=e.nativeEvent.submitter,l=n?.getAttribute("formmethod")||i,f=()=>v(n||e.currentTarget,{fetcherKey:t,method:l,navigate:r,replace:a,state:o,relative:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:h});y&&!1!==r?m.startTransition(()=>f()):f()},...f,"data-discover":b||"render"!==e?void 0:"true"})}).displayName="Form",va.displayName="ScrollRestoration";var Ea=0,Ra=()=>`__${String(++Ea)}__`;var Sa="react-router-scroll-positions",xa={};function ka(e,t,r,n){let a=null;return n&&(a=n("/"!==r?{...e,pathname:ne(e.pathname,r)||e.pathname}:e,t)),null==a&&(a=e.key),a}export{ir as A,ma as B,nr as C,r as D,we as E,Xn as F,v as G,sr as H,ya as I,_r as J,n as K,ta as L,ia as M,mn as N,Nr as O,t as P,y as R,va as S,m as a,C as b,ca as c,$r as d,wn as e,Nn as f,Xe as g,Wn as h,be as i,yn as j,L as k,An as l,z as m,Tr as n,Or as o,c as p,Wr as q,p as r,zn as s,Br as t,qn as u,sa as v,Ir as w,zr as x,Fr as y,ba as z};
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.