1class StickyAddButton{constructor(){if(this.stickyButton=document.querySelector("[data-sticky-button]"),!!this.stickyButton){if(this.sectionId=this.stickyButton.dataset.section,this.addToCartButton=document.getElementById(`Product-Submit-Button-${this.sectionId}`),!this.addToCartButton){console.warn("StickyAddButton: Could not find add to cart button with ID:",`Product-Submit-Button-${this.sectionId}`);return}this.formContainer=this.addToCartButton.closest(".product-form-buttons")||this.addToCartButton.closest("product-form"),this.init()}}init(){window.innerWidth>=750||(this.handleScroll=this.handleScroll.bind(this),window.addEventListener("scroll",this.handleScroll,{passive:!0}),this.handleScroll(),window.addEventListener("resize",()=>{window.innerWidth>=750&&this.stickyButton.classList.add("hidden")}),this.setupVariantChange())}handleScroll(){(this.formContainer||this.addToCartButton).getBoundingClientRect().bottom<0?this.stickyButton.classList.remove("hidden"):this.stickyButton.classList.add("hidden")}setupVariantChange(){typeof webvista<"u"&&webvista.subscribe&&typeof PUB_SUB_EVENTS<"u"&&webvista.subscribe(PUB_SUB_EVENTS.variantChange,event=>{if(event.data.sectionId!==this.sectionId)return;const button=this.stickyButton.querySelector("button");button&&event.data.variant&&(event.data.variant.available===!1?button.disabled=!0:button.disabled=!1)})}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{new StickyAddButton}):new StickyAddButton; 2//# sourceMappingURL=/cdn/shop/t/92/assets/sticky-add-button.js.map?v=160716816489031363181786440903
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.