"use strict";var prevGSScrollpos=window.pageYOffset,headerGSsticky=document.querySelector(".gs-sticky-header"),headerGSstickyUp=headerGSsticky.classList.contains("gs-sticky-header-up");let headerGSparentblock=headerGSsticky.parentNode,headerGSalphaenabled=headerGSparentblock.classList.contains("gs-header-alpha"),stickySrc=document.querySelector("[data-stickysrc]");stickySrc&&(stickySrc.setAttribute("data-originalsrc",stickySrc.getAttribute("src")),stickySrc.srcset=""),window.addEventListener("scroll",function(){let e="down";if(headerGSstickyUp){let c=window.pageYOffset;e=prevGSScrollpos>c?"up":"down",prevGSScrollpos=c}headerGSsticky&&(headerGSparentblock.classList.toggle("gs-sticky-enable",window.scrollY>0&&(headerGSstickyUp&&"up"==e||!headerGSstickyUp)),headerGSalphaenabled&&(window.scrollY>headerGSparentblock.clientHeight?headerGSparentblock.classList.remove("gs-header-alpha"):headerGSparentblock.classList.add("gs-header-alpha")),document.body.style="--greenshift-sticky-height:"+headerGSparentblock.clientHeight+"px"),stickySrc&&(window.scrollY>0&&(headerGSstickyUp&&"up"==e||!headerGSstickyUp)?stickySrc&&stickySrc.dataset.stickysrc!=stickySrc.src&&setTimeout(function(){stickySrc.src=stickySrc.dataset.stickysrc},100):stickySrc&&stickySrc.dataset.originalsrc!=stickySrc.src&&setTimeout(function(){stickySrc.src=stickySrc.dataset.originalsrc},100))});