class VamtamProductsBase extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{productImages:"img.attachment-woocommerce_thumbnail"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$productImages:this.$element.find(e.productImages)}}onInit(...e){super.onInit(...e),this.handleProductImageAnims()}handleProductImageAnims(){var e=this.getElementSettings(),t=!1;e.product_image_animation&&(this.handleProductImageAnim(),t="none"!==e.product_image_animation),e.product_image_hover_animation&&!t&&this.handleProductImageHoverAnim()}handleProductImageAnim(){var e=this;this.elements.$productImages.each(function(t,n){jQuery(n).addClass("elementor-invisible"),window.VAMTAM_FRONT.WidgetsObserver.observe(n,e.animateProductImage.bind(e,t))})}handleProductImageHoverAnim(e=null){var t=this.getElementSettings().product_image_hover_animation;t&&(e?jQuery(e).addClass("elementor-animation-"+t):this.elements.$productImages.each(function(e,n){jQuery(n).addClass("elementor-animation-"+t)}))}animateProductImage(e){const t=jQuery(this.elements.$productImages[e]),n=this.getProductImageAnimation(),a=this;"none"!==n?(t.removeClass(n),this.currentAnimation&&t.removeClass(this.currentAnimation),this.currentAnimation=n,t.removeClass("elementor-invisible").addClass("animated "+n),t.on("webkitAnimationEnd mozAnimationEnd animationend",function(){jQuery(this).removeClass("animated"),a.handleProductImageHoverAnim(this)})):t.removeClass("elementor-invisible")}getProductImageAnimation(){return this.getCurrentDeviceSetting("product_image_animation")||this.getCurrentDeviceSetting("_product_image_animation")}onElementChange(e){/^_?product_image_animation/.test(e)&&this.animateProductImage()}}jQuery(window).on("elementor/frontend/init",()=>{const e=["woocommerce-product-related","woocommerce-product-upsell","wc-archive-products","woocommerce-products"];if(elementorFrontend.elementsHandler&&elementorFrontend.elementsHandler.attachHandler)e.forEach(e=>{elementorFrontend.elementsHandler.attachHandler(e,VamtamProductsBase)});else{const t=e=>{elementorFrontend.elementsHandler.addHandler(VamtamProductsBase,{$element:e})};e.forEach(e=>{elementorFrontend.hooks.addAction(`frontend/element_ready/${e}.default`,t,100)})}});