1 line
10 KiB
JavaScript
1 line
10 KiB
JavaScript
"use strict";(self.webpackChunk_npwd_nui=self.webpackChunk_npwd_nui||[]).push([[2776,7860],{47860:function(n,t,e){e.r(t),e.d(t,{createBrowserHistory:function(){return k},createHashHistory:function(){return S},createLocation:function(){return w},createMemoryHistory:function(){return U},createPath:function(){return p},locationsAreEqual:function(){return g},parsePath:function(){return v}});var r=e(97538);function o(n){return"/"===n.charAt(0)}function i(n,t){for(var e=t,r=e+1,o=n.length;r<o;e+=1,r+=1)n[e]=n[r];n.pop()}var a=function(n,t){void 0===t&&(t="");var e,r=n&&n.split("/")||[],a=t&&t.split("/")||[],c=n&&o(n),u=t&&o(t),f=c||u;if(n&&o(n)?a=r:r.length&&(a.pop(),a=a.concat(r)),!a.length)return"/";if(a.length){var s=a[a.length-1];e="."===s||".."===s||""===s}else e=!1;for(var h=0,l=a.length;l>=0;l--){var d=a[l];"."===d?i(a,l):".."===d?(i(a,l),h++):h&&(i(a,l),h--)}if(!f)for(;h--;h)a.unshift("..");!f||""===a[0]||a[0]&&o(a[0])||a.unshift("");var v=a.join("/");return e&&"/"!==v.substr(-1)&&(v+="/"),v};function c(n){return n.valueOf?n.valueOf():Object.prototype.valueOf.call(n)}var u=function n(t,e){if(t===e)return!0;if(null==t||null==e)return!1;if(Array.isArray(t))return Array.isArray(e)&&t.length===e.length&&t.every((function(t,r){return n(t,e[r])}));if("object"==typeof t||"object"==typeof e){var r=c(t),o=c(e);return r!==t||o!==e?n(r,o):Object.keys(Object.assign({},t,e)).every((function(r){return n(t[r],e[r])}))}return!1},f=e(65669);function s(n){return"/"===n.charAt(0)?n:"/"+n}function h(n){return"/"===n.charAt(0)?n.substr(1):n}function l(n,t){return function(n,t){return 0===n.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(n.charAt(t.length))}(n,t)?n.substr(t.length):n}function d(n){return"/"===n.charAt(n.length-1)?n.slice(0,-1):n}function v(n){var t=n||"/",e="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(e=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===e?"":e,hash:"#"===r?"":r}}function p(n){var t=n.pathname,e=n.search,r=n.hash,o=t||"/";return e&&"?"!==e&&(o+="?"===e.charAt(0)?e:"?"+e),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function w(n,t,e,o){var i;"string"==typeof n?(i=v(n)).state=t:(void 0===(i=(0,r.Z)({},n)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(n){throw n instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):n}return e&&(i.key=e),o?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=a(i.pathname,o.pathname)):i.pathname=o.pathname:i.pathname||(i.pathname="/"),i}function g(n,t){return n.pathname===t.pathname&&n.search===t.search&&n.hash===t.hash&&n.key===t.key&&u(n.state,t.state)}function y(){var n=null,t=[];return{setPrompt:function(t){return n=t,function(){n===t&&(n=null)}},confirmTransitionTo:function(t,e,r,o){if(null!=n){var i="function"==typeof n?n(t,e):n;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(n){var e=!0;function r(){e&&n.apply(void 0,arguments)}return t.push(r),function(){e=!1,t=t.filter((function(n){return n!==r}))}},notifyListeners:function(){for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];t.forEach((function(n){return n.apply(void 0,e)}))}}}var m=!("undefined"==typeof window||!window.document||!window.document.createElement);function O(n,t){t(window.confirm(n))}var P="popstate",b="hashchange";function x(){try{return window.history.state||{}}catch(n){return{}}}function k(n){void 0===n&&(n={}),m||(0,f.Z)(!1);var t,e=window.history,o=(-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,i=!(-1===window.navigator.userAgent.indexOf("Trident")),a=n,c=a.forceRefresh,u=void 0!==c&&c,h=a.getUserConfirmation,v=void 0===h?O:h,g=a.keyLength,k=void 0===g?6:g,A=n.basename?d(s(n.basename)):"";function T(n){var t=n||{},e=t.key,r=t.state,o=window.location,i=o.pathname+o.search+o.hash;return A&&(i=l(i,A)),w(i,r,e)}function L(){return Math.random().toString(36).substr(2,k)}var E=y();function C(n){(0,r.Z)(q,n),q.length=e.length,E.notifyListeners(q.location,q.action)}function S(n){(function(n){return void 0===n.state&&-1===navigator.userAgent.indexOf("CriOS")})(n)||j(T(n.state))}function H(){j(T(x()))}var U=!1;function j(n){U?(U=!1,C()):E.confirmTransitionTo(n,"POP",v,(function(t){t?C({action:"POP",location:n}):function(n){var t=q.location,e=Z.indexOf(t.key);-1===e&&(e=0);var r=Z.indexOf(n.key);-1===r&&(r=0);var o=e-r;o&&(U=!0,M(o))}(n)}))}var I=T(x()),Z=[I.key];function R(n){return A+p(n)}function M(n){e.go(n)}var B=0;function F(n){1===(B+=n)&&1===n?(window.addEventListener(P,S),i&&window.addEventListener(b,H)):0===B&&(window.removeEventListener(P,S),i&&window.removeEventListener(b,H))}var _=!1,q={length:e.length,action:"POP",location:I,createHref:R,push:function(n,t){var r="PUSH",i=w(n,t,L(),q.location);E.confirmTransitionTo(i,r,v,(function(n){if(n){var t=R(i),a=i.key,c=i.state;if(o)if(e.pushState({key:a,state:c},null,t),u)window.location.href=t;else{var f=Z.indexOf(q.location.key),s=Z.slice(0,f+1);s.push(i.key),Z=s,C({action:r,location:i})}else window.location.href=t}}))},replace:function(n,t){var r="REPLACE",i=w(n,t,L(),q.location);E.confirmTransitionTo(i,r,v,(function(n){if(n){var t=R(i),a=i.key,c=i.state;if(o)if(e.replaceState({key:a,state:c},null,t),u)window.location.replace(t);else{var f=Z.indexOf(q.location.key);-1!==f&&(Z[f]=i.key),C({action:r,location:i})}else window.location.replace(t)}}))},go:M,goBack:function(){M(-1)},goForward:function(){M(1)},block:function(n){void 0===n&&(n=!1);var t=E.setPrompt(n);return _||(F(1),_=!0),function(){return _&&(_=!1,F(-1)),t()}},listen:function(n){var t=E.appendListener(n);return F(1),function(){F(-1),t()}}};return q}var A="hashchange",T={hashbang:{encodePath:function(n){return"!"===n.charAt(0)?n:"!/"+h(n)},decodePath:function(n){return"!"===n.charAt(0)?n.substr(1):n}},noslash:{encodePath:h,decodePath:s},slash:{encodePath:s,decodePath:s}};function L(n){var t=n.indexOf("#");return-1===t?n:n.slice(0,t)}function E(){var n=window.location.href,t=n.indexOf("#");return-1===t?"":n.substring(t+1)}function C(n){window.location.replace(L(window.location.href)+"#"+n)}function S(n){void 0===n&&(n={}),m||(0,f.Z)(!1);var t=window.history,e=(window.navigator.userAgent.indexOf("Firefox"),n),o=e.getUserConfirmation,i=void 0===o?O:o,a=e.hashType,c=void 0===a?"slash":a,u=n.basename?d(s(n.basename)):"",h=T[c],v=h.encodePath,g=h.decodePath;function P(){var n=g(E());return u&&(n=l(n,u)),w(n)}var b=y();function x(n){(0,r.Z)(_,n),_.length=t.length,b.notifyListeners(_.location,_.action)}var k=!1,S=null;function H(){var n,t,e=E(),r=v(e);if(e!==r)C(r);else{var o=P(),a=_.location;if(!k&&(t=o,(n=a).pathname===t.pathname&&n.search===t.search&&n.hash===t.hash))return;if(S===p(o))return;S=null,function(n){if(k)k=!1,x();else{b.confirmTransitionTo(n,"POP",i,(function(t){t?x({action:"POP",location:n}):function(n){var t=_.location,e=Z.lastIndexOf(p(t));-1===e&&(e=0);var r=Z.lastIndexOf(p(n));-1===r&&(r=0);var o=e-r;o&&(k=!0,R(o))}(n)}))}}(o)}}var U=E(),j=v(U);U!==j&&C(j);var I=P(),Z=[p(I)];function R(n){t.go(n)}var M=0;function B(n){1===(M+=n)&&1===n?window.addEventListener(A,H):0===M&&window.removeEventListener(A,H)}var F=!1,_={length:t.length,action:"POP",location:I,createHref:function(n){var t=document.querySelector("base"),e="";return t&&t.getAttribute("href")&&(e=L(window.location.href)),e+"#"+v(u+p(n))},push:function(n,t){var e="PUSH",r=w(n,void 0,void 0,_.location);b.confirmTransitionTo(r,e,i,(function(n){if(n){var t=p(r),o=v(u+t);if(E()!==o){S=t,function(n){window.location.hash=n}(o);var i=Z.lastIndexOf(p(_.location)),a=Z.slice(0,i+1);a.push(t),Z=a,x({action:e,location:r})}else x()}}))},replace:function(n,t){var e="REPLACE",r=w(n,void 0,void 0,_.location);b.confirmTransitionTo(r,e,i,(function(n){if(n){var t=p(r),o=v(u+t);E()!==o&&(S=t,C(o));var i=Z.indexOf(p(_.location));-1!==i&&(Z[i]=t),x({action:e,location:r})}}))},go:R,goBack:function(){R(-1)},goForward:function(){R(1)},block:function(n){void 0===n&&(n=!1);var t=b.setPrompt(n);return F||(B(1),F=!0),function(){return F&&(F=!1,B(-1)),t()}},listen:function(n){var t=b.appendListener(n);return B(1),function(){B(-1),t()}}};return _}function H(n,t,e){return Math.min(Math.max(n,t),e)}function U(n){void 0===n&&(n={});var t=n,e=t.getUserConfirmation,o=t.initialEntries,i=void 0===o?["/"]:o,a=t.initialIndex,c=void 0===a?0:a,u=t.keyLength,f=void 0===u?6:u,s=y();function h(n){(0,r.Z)(O,n),O.length=O.entries.length,s.notifyListeners(O.location,O.action)}function l(){return Math.random().toString(36).substr(2,f)}var d=H(c,0,i.length-1),v=i.map((function(n){return w(n,void 0,"string"==typeof n?l():n.key||l())})),g=p;function m(n){var t=H(O.index+n,0,O.entries.length-1),r=O.entries[t];s.confirmTransitionTo(r,"POP",e,(function(n){n?h({action:"POP",location:r,index:t}):h()}))}var O={length:v.length,action:"POP",location:v[d],index:d,entries:v,createHref:g,push:function(n,t){var r="PUSH",o=w(n,t,l(),O.location);s.confirmTransitionTo(o,r,e,(function(n){if(n){var t=O.index+1,e=O.entries.slice(0);e.length>t?e.splice(t,e.length-t,o):e.push(o),h({action:r,location:o,index:t,entries:e})}}))},replace:function(n,t){var r="REPLACE",o=w(n,t,l(),O.location);s.confirmTransitionTo(o,r,e,(function(n){n&&(O.entries[O.index]=o,h({action:r,location:o}))}))},go:m,goBack:function(){m(-1)},goForward:function(){m(1)},canGo:function(n){var t=O.index+n;return t>=0&&t<O.entries.length},block:function(n){return void 0===n&&(n=!1),s.setPrompt(n)},listen:function(n){return s.appendListener(n)}};return O}},97538:function(n,t,e){function r(){return r=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n},r.apply(this,arguments)}e.d(t,{Z:function(){return r}})},65669:function(n,t,e){e.d(t,{Z:function(){return i}});var r=!0,o="Invariant failed";function i(n,t){if(!n){if(r)throw new Error(o);var e="function"==typeof t?t():t,i=e?"".concat(o,": ").concat(e):o;throw new Error(i)}}}}]); |