function closeActivePopup(){$(".popup__wrapper.open .popup-container").addClass("slide-out"),setTimeout((function(){$(".popup-container.slide-out").removeClass("slide-out"),$(".popup__wrapper.open").removeClass("open")}),500),unbockBodyScroll()}function blockBodyScroll(){$("html").addClass("scroll-blocked")}function unbockBodyScroll(){$("html").removeClass("scroll-blocked")}$(".open-popup").on("click",(function(e){console.log("opening popup");let target=$(this).attr("data-target");$(target).addClass("open"),blockBodyScroll(),e.preventDefault()})),$(".pc__close").on("click",closeActivePopup),$(".popup__wrapper").on("click",(function(e){$(e.target).closest(".popup-container").length||$(".popup__wrapper").hasClass("open")&&closeActivePopup()})); //# sourceURL=https://cdn2.hubspot.net/hub/3446270/hub_generated/template_assets/175286965112/1723627089605/Xsens_aug2024/js/main.js