!function(){"use strict";var t;(t=function(t){null!==t&&(this.element=t,this.target=t.getAttribute("href"),this.offset=t.getAttribute("data-offset"),this.init=this.init.bind(this),this.scrollToTarget=this.scrollToTarget.bind(this),this.getOffset=this.getOffset.bind(this),this.init())}).prototype.init=function(){this.element.addEventListener("click",this.scrollToTarget)},t.prototype.scrollToTarget=function(t){t.preventDefault();var e,o=document.querySelector(this.target);o&&(e=o.getBoundingClientRect().top,window.scrollTo({top:e-this.getOffset()+window.pageYOffset,left:0,behavior:"smooth"}),this.openAccordion(o))},t.prototype.getOffset=function(){var t;return"string"==typeof this.offset?t=document.querySelector(this.offset):"number"==typeof this.offset&&(t=this.offset),void 0!==t?t.offsetHeight:0},t.prototype.openAccordion=function(t){if(-1===t.id.indexOf("accordion"))return 0;var e=t.querySelector(".product-item-accordion__content"),o=t.querySelector(".product-item-accordion__icon");"none"===window.getComputedStyle(e).display&&(e.style.display="block",o.classList.contains(".icon--reverse")||o.classList.toggle("icon--reverse"))},window.scrollToItem=t}();