1"use strict";var minusBtn=function(){var t=document.createElement("span"),e=get_svg_icon("minus");return t.setAttribute("class","product-qty"),t.setAttribute("data-qty","minus"),t.innerHTML=e,t},plusBtn=function(){var t=document.createElement("span"),e=get_svg_icon("plus");return t.setAttribute("class","product-qty"),t.setAttribute("data-qty","plus"),t.innerHTML=e,t};function customQuantity(){var t=document.querySelectorAll(".quantity");t.length&&t.forEach((function(t){var e=t.querySelector("input.qty"),r=document.querySelector("body");if(e){"hidden"==e.type&&r.classList.contains("single-product")&&(e.closest(".quantity").style.display="none"),e.classList.add("ajax-ready"),t.querySelector('.product-qty[data-qty="minus"]')||t.insertBefore(minusBtn(),e),t.querySelector('.product-qty[data-qty="plus"]')||t.appendChild(plusBtn());t.closest("form.cart");var o=t.querySelectorAll(".product-qty"),n=Number(e.getAttribute("max")||-1),u=e.value,a=new Event("change",{bubbles:!0});e.addEventListener("change",(function(){var t=e.value,r=Number(e.getAttribute("min")||0);if(Number(t)<r||isNaN(t)||n>0&&Number(t)>n)return alert(woostify_woocommerce_general.qty_warning),void(e.value=u);e.classList.add("ajax-ready");var o=e.closest(".product-loop-wrapper");if(o){var a=o.querySelector(".add_to_cart_button");a&&a.setAttribute("data-quantity",t)}}));for(var i=0,d=o.length;i<d;i++)o[i].onclick=function(){var t=Number(e.value||0),r=Number(e.getAttribute("step")||1),o=Number(e.getAttribute("min")||0),n=Number(e.getAttribute("max")),u=this.getAttribute("data-qty");if("minus"===u&&t>=r){if(t<=o||t-r<o)return;e.value=Number((t-r).toFixed(r.countDecimals()))}else if("plus"===u){if(n&&(t>=n||t+r>n))return;e.value=Number((t+r).toFixed(r.countDecimals()))}e.dispatchEvent(a);var i=document.querySelector("[name='update_cart']");i&&(i.disabled=!1)}}}))}function woostifyValidAddToCartButton(t){var e=t.closest(".product");if(!e)return;var r=e.querySelector(".add_to_cart_button");if(!r)return;let o=r.getAttribute("data-product_id"),n=(r.getAttribute("data-quantity"),e.querySelector("input.qty")),u=e.querySelector("input.variation_id");null==n&&(n=e.querySelector('input[name="quantity"]'));let a=!!n&&Number(n.value.trim()),i=!!u&&Number(u.value.trim());try{var d=document.querySelector("div.cart-sidebar-content"),c=0;if(d.querySelectorAll(".woocommerce-mini-cart-item").forEach((function(t,e){if((t.querySelector("a.remove_from_cart_button").getAttribute("data-product_id")||0)==o){let e=t.querySelector("input.qty");null==e&&(e=t.querySelector('input[name="quantity"]')),c=!!e&&Number(e.value.trim())}})),i){c=0;let t=d.querySelector('input[data-variation_id="'+i+'"]');t&&(c=Number(t.value.trim()))}var l=parseInt(n.getAttribute("max")),s=c+a;l&&(c>=l||s>l||c>=l&&s==l?r.classList.add("disabled"):r.classList.remove("disabled"))}catch(t){console.warn(t)}}function woostifyValidLoopItemAddToCartButton(){var t=document.querySelectorAll(".quantity");t&&0!=t.length&&t.forEach((function(t){t.querySelector("input.qty").addEventListener("change",(function(){woostifyValidAddToCartButton(t)})),woostifyValidAddToCartButton(t)})),jQuery(document.body).on("added_to_cart removed_from_cart",(function(){var t=document.querySelectorAll(".quantity");t&&0!=t.length&&t.forEach((function(t){setTimeout((()=>{woostifyValidAddToCartButton(t)}),25)}))})).trigger("added_to_cart"),jQuery(document.body).on("wc_fragment_refresh updated_wc_div",(function(){var t=document.querySelectorAll(".quantity");t&&0!=t.length&&t.forEach((function(t){setTimeout((()=>{woostifyValidAddToCartButton(t)}),25)}))}))}document.addEventListener("DOMContentLoaded",(function(){"function"==typeof onElementorLoaded&&onElementorLoaded((function(){window.elementorFrontend.hooks.addAction("frontend/element_ready/woostify-product-add-to-cart.default",(function(){customQuantity()}))})),customQuantity(),woostifyValidLoopItemAddToCartButton()}));
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.