"use strict";if(void 0===woostifyEvent)var woostifyEvent={};var woostifyAvailableVariations=function(t){var e=t.closest("#woostify-quick-view-panel")?document.getElementById("woostify-quick-view-panel"):document.getElementById("view");if(e){if(document.querySelectorAll("form.composite_form").length)e.querySelectorAll(".composite_component").forEach(function(t){var e=t.querySelectorAll('.variations [data-attribute_name^="attribute_"] option');if(e.length){var a=[];e.forEach(function(t){var e=t.getAttribute("value");e&&!t.disabled&&a.push(e)}),a=a.filter(function(t,e,a){return a.indexOf(t)===e});var i=t.querySelectorAll(".variations .swatch");i.length&&i.forEach(function(t){var e=t.getAttribute("data-value");a.includes(e)?t.classList.remove("unavailable"):t.classList.add("unavailable")})}});else{var a=e.querySelectorAll('.variations [name^="attribute_"] option');if(a.length){var i=[];a.forEach(function(t){var e=t.getAttribute("value");e&&!t.disabled&&i.push(e)}),i=i.filter(function(t,e,a){return a.indexOf(t)===e});var s=e.querySelectorAll(".variations .swatch");s.length&&s.forEach(function(t){var e=t.getAttribute("data-value");i.includes(e)?t.classList.remove("unavailable"):t.classList.add("unavailable")})}}}},woostifyVariationSwatches=function(){var t=document.querySelectorAll("form.composite_form .composite_component"),e=t.length?t:document.querySelectorAll("form.variations_form");if(e.length)for(var a=0,i=e.length;a