!function(){"use strict";var t={d:function(n,e){for(var r in e)t.o(e,r)&&!t.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:e[r]})},o:function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},n={};function e(){return(e=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t}).apply(this,arguments)}t.r(n),t.d(n,{default:function(){return u}});var r,o=r||(r={});o.Pop="POP",o.Push="PUSH",o.Replace="REPLACE";function a(t){t.preventDefault(),t.returnValue=""}function i(){var t=[];return{get length(){return t.length},push:function(n){return t.push(n),function(){t=t.filter((function(t){return t!==n}))}},call:function(n){t.forEach((function(t){return t&&t(n)}))}}}var u=function(t){function n(){var t=s.location,n=f.state||{};return[n.idx,{pathname:t.pathname,search:t.search,hash:t.hash,state:n.usr||null,key:n.key||"default"}]}function o(t){return"string"==typeof t?t:function(t){var n=t.pathname,e=t.search;return(void 0===n?"/":n)+(void 0===e?"":e)+(void 0===(t=t.hash)?"":t)}(t)}function u(t,n){return void 0===n&&(n=null),e({},v,{},"string"==typeof t?function(t){var n={};if(t){var e=t.indexOf("#");0<=e&&(n.hash=t.substr(e),t=t.substr(0,e)),0<=(e=t.indexOf("?"))&&(n.search=t.substr(e),t=t.substr(0,e)),t&&(n.pathname=t)}return n}(t):t,{state:n,key:Math.random().toString(36).substr(2,8)})}function c(t){d=t,t=n(),p=t[0],v=t[1],y.call({action:d,location:v})}function l(t){f.go(t)}void 0===t&&(t={});var s=void 0===(t=t.window)?document.defaultView:t,f=s.history,h=null;s.addEventListener("popstate",(function(){if(h)g.call(h),h=null;else{var t=r.Pop,e=n(),o=e[0];if(e=e[1],g.length){if(null!=o){var a=p-o;a&&(h={action:t,location:e,retry:function(){l(-1*a)}},l(a))}}else c(t)}}));var d=r.Pop,p=(t=n())[0],v=t[1],y=i(),g=i();return null==p&&(p=0,f.replaceState(e({},f.state,{idx:p}),"")),{get action(){return d},get location(){return v},createHref:o,push:function t(n,e){var a=r.Push,i=u(n,e);if(!g.length||(g.call({action:a,location:i,retry:function(){t(n,e)}}),0)){var l=[{usr:i.state,key:i.key,idx:p+1},o(i)];i=l[0],l=l[1];try{f.pushState(i,"",l)}catch(t){s.location.assign(l)}c(a)}},replace:function t(n,e){var a=r.Replace,i=u(n,e);g.length&&(g.call({action:a,location:i,retry:function(){t(n,e)}}),1)||(i=[{usr:i.state,key:i.key,idx:p},o(i)],f.replaceState(i[0],"",i[1]),c(a))},go:l,back:function(){l(-1)},forward:function(){l(1)},listen:function(t){return y.push(t)},block:function(t){var n=g.push(t);return 1===g.length&&s.addEventListener("beforeunload",a),function(){n(),g.length||s.removeEventListener("beforeunload",a)}}}}({basename:(0,window.nisje.settings.getOption)("base","/")});(window.nisje=window.nisje||{}).history=n}();