!function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=96)}({96:function(e,t){for(var i=[{label:"xs",value:0},{label:"sm",value:580},{label:"md",value:768},{label:"lg",value:992},{label:"xl",value:1200},{label:"xxl",value:3e3}],n=[],s=0;s<i.length;s++)n.push(i[s].label);var o=window.innerWidth;function r(e,t){clearTimeout(e.timeId),e.timeId=setTimeout((function(){e()}),t)}function l(e){this.selector=e,this.isMinified=!1,this.isSticky=!1,this.element=document.getElementById(e),this.header=document.getElementById("hdr"),this.wrapper=document.getElementById("header"),this.inner=document.getElementById("header-inner"),this.customTopOffest=200}l.prototype.handleScroll=function(){var e=document.body.classList.contains("page-no-scrolling");if(!document.body.classList.contains("page-overlay-on")&&!e){var t=this.wrapper.offsetHeight+this.wrapper.offsetTop;console.error(window.scrollY+" "+t),window.scrollY>t?this.minify():this.unminify(),window.scrollY>t+this.customTopOffest?this.sticky():this.unsticky()}},l.prototype.handleResize=function(){var e=window.innerWidth;e!==o&&(this.setState(),this.handleScroll(),o=e)},l.prototype.minify=function(){this.isMinified||(this.isMinified=!0,this.element.dataset.isMinified=!0,this.wrapper.classList.add("header-minify"))},l.prototype.unminify=function(){this.isMinified&&(this.isMinified=!1,this.element.dataset.isMinified=!1,this.wrapper.classList.remove("header-minify"))},l.prototype.sticky=function(){this.isSticky||(this.isSticky=!0,this.element.dataset.isSticky=!0,this.wrapper.classList.add("header-sticky"))},l.prototype.unsticky=function(){this.isSticky&&(this.isSticky=!1,this.element.dataset.isSticky=!1,this.wrapper.classList.remove("header-sticky"))},l.prototype.setState=function(){var e=function(){for(var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t=0;t<i.length;t++){var n=i[t].value,s=1e4;if(i[t+1]&&(s=i[t+1].value),e>=n&&e<s)return i[t].label}return!1}();this.isTablet=!1,this.isMobile=!1,this.isDesktop=!1,"lg"===e||"xl"===e||"xxl"===e?this.isDesktop=!0:"md"===e?this.isTablet=!0:"sm"!==e&&"xs"!==e||(this.isMobile=!0)},l.prototype.setListeners=function(){var e=this;window.addEventListener("scroll",(function(){r((function(){e.handleScroll()}),100)})),window.addEventListener("resize",(function(){r((function(){e.handleResize()}),100)}))},l.prototype.setWrapper=function(){this.wrapper.style.height=this.header.offsetHeight+"px",this.wrapper.style.maxHeight=this.header.offsetHeight+"px"},l.prototype.constructMe=function(){this.setWrapper(),this.setState(),this.setListeners()},function(e,t){e.behaviors.pageMinfier={attach:function(e){console.log("Loaded -- Page minifier"),t("journeyPlanner","html",document).forEach((function(e){new l("hdr").constructMe()}))}}}(Drupal,once)}});
//# sourceMappingURL=minifier.js.map