Module 830845

8,450 characters · in 256504.5ee0e252cf01a6da.js, 824668.0fdbd2db54964d5e.js
Dependencies
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(e,t,n){"use strict";n.d(t,{AO:()=>l,Fu:()=>h,TM:()=>E,sC:()=>R,yJ:()=>f,zR:()=>v});var r=n(1139),i=n(861193),a=n(987701),s=n(258635);function o(e){return"/"===e.charAt(0)?e:"/"+e}function u(e){return"/"===e.charAt(0)?e.substr(1):e}function c(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function l(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function f(e,t,n,a){var s,o,u,c,d,l;"string"==typeof e?(u="",c="",-1!==(d=(o=e||"/").indexOf("#"))&&(c=o.substr(d),o=o.substr(0,d)),-1!==(l=o.indexOf("?"))&&(u=o.substr(l),o=o.substr(0,l)),(s={pathname:o,search:"?"===u?"":u,hash:"#"===c?"":c}).state=t):(void 0===(s=(0,r.A)({},e)).pathname&&(s.pathname=""),s.search?"?"!==s.search.charAt(0)&&(s.search="?"+s.search):s.search="",s.hash?"#"!==s.hash.charAt(0)&&(s.hash="#"+s.hash):s.hash="",void 0!==t&&void 0===s.state&&(s.state=t));try{s.pathname=decodeURI(s.pathname)}catch(e){if(e instanceof URIError)throw URIError('Pathname "'+s.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.');throw e}return n&&(s.key=n),a?s.pathname?"/"!==s.pathname.charAt(0)&&(s.pathname=(0,i.A)(s.pathname,a.pathname)):s.pathname=a.pathname:s.pathname||(s.pathname="/"),s}function h(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&(0,a.A)(e.state,t.state)}function p(){var e=null,t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,i){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,i):i(!0):i(!1!==a)}else i(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter(function(e){return e!==r})}},notifyListeners:function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach(function(e){return e.apply(void 0,n)})}}}var _=!!("u">typeof window&&window.document&&window.document.createElement);function m(e,t){t(window.confirm(e))}var g="popstate",y="hashchange";function b(){try{return window.history.state||{}}catch(e){return{}}}function v(e){void 0===e&&(e={}),_||(0,s.A)(!1);var t,n=window.history,i=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,a=-1!==window.navigator.userAgent.indexOf("Trident"),u=e,h=u.forceRefresh,v=void 0!==h&&h,w=u.getUserConfirmation,V=void 0===w?m:w,T=u.keyLength,x=void 0===T?6:T,k=e.basename?d(o(e.basename)):"";function E(e){var t=e||{},n=t.key,r=t.state,i=window.location,a=i.pathname+i.search+i.hash;return k&&(a=c(a,k)),f(a,r,n)}function A(){return Math.random().toString(36).substr(2,x)}var R=p();function P(e){(0,r.A)(G,e),G.length=n.length,R.notifyListeners(G.location,G.action)}function S(e){(void 0!==e.state||-1!==navigator.userAgent.indexOf("CriOS"))&&I(E(e.state))}function L(){I(E(b()))}var O=!1;function I(e){O?(O=!1,P()):R.confirmTransitionTo(e,"POP",V,function(t){var n,r,i,a,s;t?P({action:"POP",location:e}):(n=e,r=G.location,-1===(i=C.indexOf(r.key))&&(i=0),-1===(a=C.indexOf(n.key))&&(a=0),(s=i-a)&&(O=!0,D(s)))})}var M=E(b()),C=[M.key];function U(e){return k+l(e)}function D(e){n.go(e)}var F=0;function B(e){1===(F+=e)&&1===e?(window.addEventListener(g,S),a&&window.addEventListener(y,L)):0===F&&(window.removeEventListener(g,S),a&&window.removeEventListener(y,L))}var j=!1,G={length:n.length,action:"POP",location:M,createHref:U,push:function(e,t){var r="PUSH",a=f(e,t,A(),G.location);R.confirmTransitionTo(a,r,V,function(e){if(e){var t=U(a),s=a.key,o=a.state;if(i)if(n.pushState({key:s,state:o},null,t),v)window.location.href=t;else{var u=C.indexOf(G.location.key),c=C.slice(0,u+1);c.push(a.key),C=c,P({action:r,location:a})}else window.location.href=t}})},replace:function(e,t){var r="REPLACE",a=f(e,t,A(),G.location);R.confirmTransitionTo(a,r,V,function(e){if(e){var t=U(a),s=a.key,o=a.state;if(i)if(n.replaceState({key:s,state:o},null,t),v)window.location.replace(t);else{var u=C.indexOf(G.location.key);-1!==u&&(C[u]=a.key),P({action:r,location:a})}else window.location.replace(t)}})},go:D,goBack:function(){D(-1)},goForward:function(){D(1)},block:function(e){void 0===e&&(e=!1);var t=R.setPrompt(e);return j||(B(1),j=!0),function(){return j&&(j=!1,B(-1)),t()}},listen:function(e){var t=R.appendListener(e);return B(1),function(){B(-1),t()}}};return G}var w="hashchange",V={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+u(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:u,decodePath:o},slash:{encodePath:o,decodePath:o}};function T(e){var t=e.indexOf("#");return -1===t?e:e.slice(0,t)}function x(){var e=window.location.href,t=e.indexOf("#");return -1===t?"":e.substring(t+1)}function k(e){window.location.replace(T(window.location.href)+"#"+e)}function E(e){void 0===e&&(e={}),_||(0,s.A)(!1);var t=window.history;window.navigator.userAgent.indexOf("Firefox");var n=e,i=n.getUserConfirmation,a=void 0===i?m:i,u=n.hashType,h=e.basename?d(o(e.basename)):"",g=V[void 0===u?"slash":u],y=g.encodePath,b=g.decodePath;function v(){var e=b(x());return h&&(e=c(e,h)),f(e)}var E=p();function A(e){(0,r.A)(B,e),B.length=t.length,E.notifyListeners(B.location,B.action)}var R=!1,P=null;function S(){var e=x(),t=y(e);if(e!==t)k(t);else{var n,r=v(),i=B.location;if(!R&&i.pathname===r.pathname&&i.search===r.search&&i.hash===r.hash||P===l(r))return;P=null,n=r,R?(R=!1,A()):E.confirmTransitionTo(n,"POP",a,function(e){var t,r,i,a,s;e?A({action:"POP",location:n}):(t=n,r=B.location,-1===(i=M.lastIndexOf(l(r)))&&(i=0),-1===(a=M.lastIndexOf(l(t)))&&(a=0),(s=i-a)&&(R=!0,C(s)))})}}var L=x(),O=y(L);L!==O&&k(O);var I=v(),M=[l(I)];function C(e){t.go(e)}var U=0;function D(e){1===(U+=e)&&1===e?window.addEventListener(w,S):0===U&&window.removeEventListener(w,S)}var F=!1,B={length:t.length,action:"POP",location:I,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=T(window.location.href)),n+"#"+y(h+l(e))},push:function(e,t){var n="PUSH",r=f(e,void 0,void 0,B.location);E.confirmTransitionTo(r,n,a,function(e){if(e){var t=l(r),i=y(h+t);if(x()!==i){P=t,window.location.hash=i;var a=M.lastIndexOf(l(B.location)),s=M.slice(0,a+1);s.push(t),M=s,A({action:n,location:r})}else A()}})},replace:function(e,t){var n="REPLACE",r=f(e,void 0,void 0,B.location);E.confirmTransitionTo(r,n,a,function(e){if(e){var t=l(r),i=y(h+t);x()!==i&&(P=t,k(i));var a=M.indexOf(l(B.location));-1!==a&&(M[a]=t),A({action:n,location:r})}})},go:C,goBack:function(){C(-1)},goForward:function(){C(1)},block:function(e){void 0===e&&(e=!1);var t=E.setPrompt(e);return F||(D(1),F=!0),function(){return F&&(F=!1,D(-1)),t()}},listen:function(e){var t=E.appendListener(e);return D(1),function(){D(-1),t()}}};return B}function A(e,t,n){return Math.min(Math.max(e,t),n)}function R(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,i=t.initialEntries,a=void 0===i?["/"]:i,s=t.initialIndex,o=t.keyLength,u=void 0===o?6:o,c=p();function d(e){(0,r.A)(y,e),y.length=y.entries.length,c.notifyListeners(y.location,y.action)}function h(){return Math.random().toString(36).substr(2,u)}var _=A(void 0===s?0:s,0,a.length-1),m=a.map(function(e){return"string"==typeof e?f(e,void 0,h()):f(e,void 0,e.key||h())});function g(e){var t=A(y.index+e,0,y.entries.length-1),r=y.entries[t];c.confirmTransitionTo(r,"POP",n,function(e){e?d({action:"POP",location:r,index:t}):d()})}var y={length:m.length,action:"POP",location:m[_],index:_,entries:m,createHref:l,push:function(e,t){var r="PUSH",i=f(e,t,h(),y.location);c.confirmTransitionTo(i,r,n,function(e){if(e){var t=y.index+1,n=y.entries.slice(0);n.length>t?n.splice(t,n.length-t,i):n.push(i),d({action:r,location:i,index:t,entries:n})}})},replace:function(e,t){var r="REPLACE",i=f(e,t,h(),y.location);c.confirmTransitionTo(i,r,n,function(e){e&&(y.entries[y.index]=i,d({action:r,location:i}))})},go:g,goBack:function(){g(-1)},goForward:function(){g(1)},canGo:function(e){var t=y.index+e;return t>=0&&t<y.entries.length},block:function(e){return void 0===e&&(e=!1),c.setPrompt(e)},listen:function(e){return c.appendListener(e)}};return y}}