1const{Core,Events}=Global,BORDER_COMPENSATION=4,OFFSET_STYLE_PROP="--offset-scroll-y";function isElementValueEquals(value){return el=>el.value===value.toString()}customElements.define("product-gallery-thumbnails",class extends Core{propTypes={"auto-scroll":Boolean};elements={$:[["input"]]};render(){this.sub(Events.PRODUCT_GALLERY_SLIDE_CHANGE,this._changeThumb),this.$({change:this._handleChange})}_handleChange({target}){this.pub(Events.PRODUCT_GALLERY_SLIDE_CHANGE,+target.value),this._scrollToTarget(target)}_scrollToTarget(target){if(!this.prop("auto-scroll"))return;const label=target.labels[0];label&&this.style.setProperty(OFFSET_STYLE_PROP,`${this._calcOffset(label)}px`)}_calcOffset(el){if(!this.height||!this.parentHeight||!this.halfParentHeight){if(this.height=this.offsetHeight,this.parentHeight=this.parentNode.offsetHeight,this.parentHeight>window.innerHeight)return this.parentHeight=null,0;if(this.parentHeight>=this.height)return 0;this.halfParentHeight=this.parentHeight/2}return Math.max(Math.min(el.offsetTop*-1+this.halfParentHeight,0),this.parentHeight-this.height-BORDER_COMPENSATION)}_changeThumb(index){const currentThumb=this.$("input").find(isElementValueEquals(index));currentThumb&&(currentThumb.checked=!0,this._scrollToTarget(currentThumb))}}); 2//# sourceMappingURL=/cdn/shop/t/78/assets/product-gallery-thumbnails.js.map?v=90190769649995024301774326692
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.