"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8252],{85346:function(e,t,n){var r,a,i,l;/** * @remix-run/router v1.8.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t{i.removeEventListener(s,y),m=null}},createHref:e=>t(i,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c=r.Push;let a=f(w.location,e,t);n&&n(a,e);let o=p(a,g=v()+1),s=w.createHref(a);try{u.pushState(o,"",s)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;i.location.assign(s)}l&&m&&m({action:c,location:w.location,delta:1})},replace:function(e,t){c=r.Replace;let a=f(w.location,e,t);n&&n(a,e);let i=p(a,g=v()),o=w.createHref(a);u.replaceState(i,"",o),l&&m&&m({action:c,location:w.location,delta:0})},go:e=>u.go(e)};return w}(function(e,t){let{pathname:n="/",search:r="",hash:a=""}=m(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),f("",{pathname:n,search:r,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:d(t))},function(e,t){c("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")},e)}function h(e,t){if(!1===e||null==e)throw Error(t)}function c(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw Error(t)}catch(e){}}}function p(e,t){return{usr:e.state,key:e.key,idx:t}}function f(e,t,n,r){return void 0===n&&(n=null),o({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?m(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function d(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function m(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function g(e,t,n){void 0===n&&(n="/");let r=b(("string"==typeof t?m(t):t).pathname||"/",n);if(null==r)return null;let a=function e(t,n,r,a){void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===a&&(a="");let i=(t,i,l)=>{let o={relativePath:void 0===l?t.path||"":l,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};o.relativePath.startsWith("/")&&(h(o.relativePath.startsWith(a),'Absolute route path "'+o.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),o.relativePath=o.relativePath.slice(a.length));let s=x([a,o.relativePath]),u=r.concat(o);if(t.children&&t.children.length>0&&(h(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),e(t.children,n,u,s)),null!=t.path||t.index){var c;let e,r;n.push({path:s,score:(c=t.index,r=(e=s.split("/")).length,e.some(y)&&(r+=-2),c&&(r+=2),e.filter(e=>!y(e)).reduce((e,t)=>e+(v.test(t)?3:""===t?1:10),r)),routesMeta:u})}};return t.forEach((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let n of function e(t){let n=t.split("/");if(0===n.length)return[];let[r,...a]=n,i=r.endsWith("?"),l=r.replace(/\?$/,"");if(0===a.length)return i?[l,""]:[l];let o=e(a.join("/")),s=[];return s.push(...o.map(e=>""===e?l:[l,e].join("/"))),i&&s.push(...o),s.map(e=>t.startsWith("/")&&""===e?"/":e)}(e.path))i(e,t,n);else i(e,t)}),n}(e);!function(e){e.sort((e,t)=>{var n,r;return e.score!==t.score?t.score-e.score:(n=e.routesMeta.map(e=>e.childrenIndex),r=t.routesMeta.map(e=>e.childrenIndex),n.length===r.length&&n.slice(0,-1).every((e,t)=>e===r[t])?n[n.length-1]-r[r.length-1]:0)})}(a);let i=null;for(let e=0;null==i&&e(r.push(t),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],l=i.replace(/(.)\/+$/,"$1"),o=a.slice(1);return{params:r.reduce((e,t,n)=>{if("*"===t){let e=o[n]||"";l=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return c(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(o[n]||"",t),e},{}),pathname:i,pathnameBase:l,pattern:e}}({path:l.relativePath,caseSensitive:l.caseSensitive,end:o},s);if(!u)return null;Object.assign(r,u.params);let h=l.route;i.push({params:r,pathname:x([a,u.pathname]),pathnameBase:$(x([a,u.pathnameBase])),route:h}),"/"!==u.pathnameBase&&(a=x([a,u.pathnameBase]))}return i}(a[e],function(e){try{return decodeURI(e)}catch(t){return c(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}(r));return i}(l=a||(a={})).data="data",l.deferred="deferred",l.redirect="redirect",l.error="error";let v=/^:\w+$/,y=e=>"*"===e;function b(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function w(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t)+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function P(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function W(e,t,n,r){let a,i;void 0===r&&(r=!1),"string"==typeof e?a=m(e):(h(!(a=o({},e)).pathname||!a.pathname.includes("?"),w("?","pathname","search",a)),h(!a.pathname||!a.pathname.includes("#"),w("#","pathname","hash",a)),h(!a.search||!a.search.includes("#"),w("#","search","hash",a)));let l=""===e||""===a.pathname,s=l?"/":a.pathname;if(r||null==s)i=n;else{let e=t.length-1;if(s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}i=e>=0?t[e]:"/"}let u=function(e,t){let n;void 0===t&&(t="/");let{pathname:r,search:a="",hash:i=""}="string"==typeof e?m(e):e;return{pathname:r?r.startsWith("/")?r:(n=t.replace(/\/+$/,"").split("/"),r.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"):t,search:E(a),hash:S(i)}}(a,i),c=s&&"/"!==s&&s.endsWith("/"),p=(l||"."===s)&&n.endsWith("/");return!u.pathname.endsWith("/")&&(c||p)&&(u.pathname+="/"),u}let x=e=>e.join("/").replace(/\/\/+/g,"/"),$=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),E=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",S=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class R extends Error{}function L(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}Symbol("deferred")}}]);