1class ScxClickZoom extends HTMLElement{constructor(){super(),this.imageZoom=document.getElementById(this.getAttribute("data-elem")),this.clickToUnZoom=this.getAttribute("data-click-to-unzoom")==="true"}connectedCallback(){this.updateZoom()}isZoomEnabled(){return this.imageZoom.style.getPropertyValue("--zoomEnabled")=="true"}setPointerZoom(e){let pointer={x:e.offsetX*100/this.imageZoom.offsetWidth,y:e.offsetY*100/this.imageZoom.offsetHeight};this.imageZoom.style.setProperty("--zoom-x",pointer.x+"%"),this.imageZoom.style.setProperty("--zoom-y",pointer.y+"%")}resetZoom(){this.imageZoom.style.setProperty("--zoomEnabled","false"),this.imageZoom.style.setProperty("--img-display","none")}enableZoom(){this.imageZoom.style.setProperty("--img-display","block"),this.imageZoom.style.setProperty("--zoomEnabled","true")}updateZoom=()=>{this.imageZoom.addEventListener("click",e=>{if(!this.isZoomEnabled()){this.enableZoom(),this.setPointerZoom(e);return}this.clickToUnZoom&&this.isZoomEnabled()&&this.resetZoom()}),this.imageZoom.addEventListener("mousemove",e=>{this.imageZoom.style.getPropertyValue("--zoomEnabled")=="true"&&this.setPointerZoom(e)}),this.imageZoom.addEventListener("mouseleave",()=>{this.resetZoom()})}}customElements.define("scx-click-zoom",ScxClickZoom); 2//# sourceMappingURL=/cdn/shop/t/1/assets/scx_asset_click-zoom.js.map?v=51771409950970059211737046783
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.