Module 830845

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