/*! YOOtheme Pro v5.0.19 | https://yootheme.com */

const e=window.jQuery&&Object.prototype.hasOwnProperty.call(window.jQuery,"default")?window.jQuery.default:window.jQuery,u=e(".product-type-variable .summary .product_title").length;if(u)e(".summary > .stock").length||e("form.variations_form").before('<div class="stock">'),e(".summary > .woocommerce-product-details__short-description").length||e("form.variations_form").before('<div class="woocommerce-product-details__short-description">'),s(".summary > .price","price_html",!0,!0),s(".summary > .stock","availability_html",!1,!1),s(".summary > .woocommerce-product-details__short-description","variation_description",!1,!0);else{let o=function(m){var r;(r=m.parentElement.querySelector("picture:scope > [data-woo-product-variation-image]"))==null||r.remove()},a=function(){return document.querySelectorAll("[data-woo-product-image]")};var p=o,d=a;e(".tm-element-woo-description > .woocommerce-product-details__short-description, .tm-source-woo-description.tm-source-page").length||e(".tm-element-woo-add-to-cart").prepend('<div class="tm-element-woo-description"><div class="woocommerce-product-details__short-description"></div></div>'),e(".tm-element-woo-stock, .tm-source-woo-stock.tm-source-page").length||e(".tm-element-woo-add-to-cart").prepend('<div class="tm-element-woo-stock">'),s(".tm-element-woo-price p, .tm-source-woo-price.tm-source-page","price_html",!0,!0),s(".tm-element-woo-stock, .tm-source-woo-stock.tm-source-page","availability_html",!1,!0),s(".tm-element-woo-description > .woocommerce-product-details__short-description, .tm-source-woo-description.tm-source-page","variation_description",!1,!0),s(".tm-source-woo-sku.tm-source-page","sku",!1,!0),e("form.cart").on("show_variation",(m,r)=>{for(const t of a()){if(o(t),!r.image.full_src)continue;t.decoding="sync",t.style.objectFit="cover",t.style.aspectRatio=t.width/t.height;let i=t.parentElement;i.tagName!=="PICTURE"&&(i=document.createElement("picture"),t.replaceWith(i),i.prepend(t));const c=document.createElement("source");c.srcset=r.image.full_src,c.dataset.wooProductVariationImage="",i.prepend(c)}}).on("hide_variation",()=>a().forEach(o))}function s(o,a,m,r){const t=(r?e(o).html():e(o).prop("outerHTML"))||"";e("form.cart").on("show_variation",(c,l)=>{let n=t;l[a]&&(n=e.parseHTML(l[a]),m&&(n=e(n).html())),i(n)}).on("hide_variation",()=>i(t));function i(c){r?e(o).html(c):e(o).replaceWith(c)}}
