PageSourceSearch

https://www.hepco-becker.de/theme/e2c74d825a6d2d529bd4f45ca4f4554c…xia-listing-image-switcher.plugin.67c49e.js

js hepco-becker.de collected 2026-10-04 05:37:49 UTC 3,448 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[61463],{463(e,t,i){i.r(t),i.d(t,{default:()=>r});let a=window.PluginBaseClass,s=window.PluginManager;class r extends a{static #e=this.options={productBoxSelector:".product-box",imageWrapperSelector:".product-image-wrapper",imgIgnoreClasses:".is-custom, .cover-switch, .crossfade",restoreTimeout:400,imageHtml:""};init(){if(this.productBox=this.el.closest(this.options.productBoxSelector),null===this.productBox)return;if(this.imageWrapper=[...this.productBox.querySelectorAll(this.options.imageWrapperSelector)].slice(-1)[0],null===this.imageWrapper){console.warn("product box image not found");return}let e=this.imageWrapper.querySelectorAll("noscript");e&&e.forEach(e=>e.remove()),void 0===this.productBox._maxiaImageSwitcher&&this._updateDefaultImage(),this.configuratorPlugin=s.getPluginInstanceFromElement(this.productBox,"MaxiaListingConfigurator"),this._registerEvents()}_registerEvents(){this.el.addEventListener("mouseenter",this._setImage.bind(this)),this.el.addEventListener("mouseleave",this._restoreImage.bind(this)),this.el.addEventListener("focus",this._setImage.bind(this)),this.el.addEventListener("blur",e=>{e.relatedTarget&&e.relatedTarget.isSameNode(this.el)&&this._restoreImage.bind(this)}),document.$emitter.subscribe("MaxiaVariantsInitProductBox",e=>{e.detail.productBoxElement.isSameNode(this.productBox)&&this._updateDefaultImage()})}_updateDefaultImage(){this.productBox._maxiaImageSwitcher={timeoutId:null,defaultImageHtml:this.imageWrapper.innerHTML.trim()}}_setImage(){null!==this.productBox._maxiaImageSwitcher.timeoutId&&clearTimeout(this.productBox._maxiaImageSwitcher.timeoutId),this.configuratorPlugin.isLoading||this._preloadAndSwitchImage(this.options.imageHtml)}_restoreImage(){this.configuratorPlugin.isLoading||(this.productBox._maxiaImageSwitcher.timeoutId=setTimeout(()=>{this._preloadAndSwitchImage(this.productBox._maxiaImageSwitcher.defaultImageHtml,()=>{this.productBox._maxiaImageSwitcher.timeoutId=null,this.imageWrapper.classList.remove("variant-image-switched")})},this.options.restoreTimeout))}_preloadAndSwitchImage(e,t){let i=document.createElement("div");i.innerHTML=e;let a=i.querySelector("img:not("+this.options.imgIgnoreClasses+")");if(!a){t();return}a.classList.add("new-image"),a.style.transition="none",a.style.position="absolute",a.style.opacity="0";let s=this.imageWrapper.querySelector("img:not(.new-image,"+this.options.imgIgnoreClasses+"), .product-image-placeholder");a.addEventListener("load",()=>{this._onImageLoaded(a,t)},{once:!0});let r=a.parentElement&&"PICTURE"===a.parentElement.tagName?a.parentElement:a;s?s.parentElement&&"PICTURE"===s.parentElement.tagName?s.parentElement.insertAdjacentElement("beforebegin",r):s.insertAdjacentElement("beforebegin",r):this.imageWrapper.insertAdjacentElement("afterbegin",r)}_onImageLoaded(e,t){if(this.configuratorPlugin.isLoading){e.remove();return}let i=this.imageWrapper.querySelectorAll("img:not(.new-image,"+this.options.imgIgnoreClasses+"), .product-image-placeholder");i&&i.forEach(e=>{"PICTURE"===e.parentElement.tagName?e.parentElement.remove():e.remove()}),e.classList.remove("new-image"),e.style.opacity="",e.style.position="",setTimeout(()=>{e.style.transition="none","function"==typeof t&&t(e)}),this.imageWrapper.classList.add("variant-image-switched"),document.body.classList.contains("maxia-lazy")&&this.imageWrapper.classList.add("maxia-lazy-loaded")}}}}]);

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.