You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
9.0 KiB
JavaScript
10 lines
9.0 KiB
JavaScript
|
9 months ago
|
"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<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,{Ep:function(){return d},J0:function(){return h},RQ:function(){return x},WK:function(){return L},X3:function(){return R},Zn:function(){return b},Zq:function(){return P},aU:function(){return r},cP:function(){return m},fp:function(){return g},pC:function(){return W},q_:function(){return u}}),(i=r||(r={})).Pop="POP",i.Push="PUSH",i.Replace="REPLACE";let s="popstate";function u(e){return void 0===e&&(e={}),function(e,t,n,a){void 0===a&&(a={});let{window:i=document.defaultView,v5Compat:l=!1}=a,u=i.history,c=r.Pop,m=null,g=v();function v(){return(u.state||{idx:null}).idx}function y(){c=r.Pop;let e=v(),t=null==e?null:e-g;g=e,m&&m({action:c,location:w.location,delta:t})}function b(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof e?e:d(e);return h(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==g&&(g=0,u.replaceState(o({},u.state,{idx:g}),""));let w={get action(){return c},get location(){return e(i,u)},listen(e){if(m)throw Error("A history only accepts one active listener");return i.addEventListener(s,y),m=e,()=>{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|
|