(()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.i18n,o=window.jQuery;var n=e.n(o);document.addEventListener("DOMContentLoaded",function(){const e=(0,t.__)("Show More","product-addons"),o=(0,t.__)("Show Less","product-addons");function s(){n()(["dl.variation","ul.wc-block-components-product-details","ul.wc-item-meta"].join(",")).each(function(){const t=this,s=n()(t);if(s.hasClass("prad-processed"))return;s.addClass("prad-processed");let a=[];if("dl"===t.tagName.toLowerCase()){const e=Array.from(t.children);for(let t=0;t<e.length;t+=2){const o=e.slice(t,t+2);2===o.length&&a.push(o)}}else"ul"===t.tagName.toLowerCase()&&(a=Array.from(t.children).map(function(e){return[e]}));if(a.length>3){s.parent().hasClass("prad-variation-container")||s.wrap('<div class="prad-variation-container"></div>'),s.css("max-height","none");const c=s.outerHeight();for(let e=3;e<a.length;e++)a[e].forEach(function(e){e.classList.add("prad-collapsed-hidden")});const i=s.outerHeight();s.css({"max-height":i,transition:"max-height 0.4s ease"});const r=n()('<div class="prad-show-more-btn">'+e+"</div>");r.css("padding-left",s.css("padding-left"));let d=!1;s.parent().append(r),r.on("click",function(n){if(n.stopPropagation(),d){s.css("max-height",i),r.text(e),d=!1;const o=function(){if(!d)for(let e=3;e<a.length;e++)a[e].forEach(function(e){e.classList.add("prad-collapsed-hidden")});t.removeEventListener("transitionend",o)};t.addEventListener("transitionend",o)}else a.forEach(function(e){e.forEach(function(e){e.classList.remove("prad-collapsed-hidden")})}),s.css("max-height",c),r.text(o),d=!0})}})}n()(document).find(".variation, .wc-block-components-product-details").css("opacity",.3),s(),setTimeout(function(){n()(document).find(".variation, .wc-block-components-product-details").css("opacity",1)},300),[".woocommerce-checkout-review-order",".woocommerce-cart-form",".woocommerce","body"].forEach(function(e){const t=n()(e);if(t.length>0){const e={childList:!0,subtree:!0};new MutationObserver(function(e){let t=!1;e.forEach(function(e){(e.addedNodes.length>0||"childList"===e.type)&&(t=!0)}),t&&setTimeout(s,50)}).observe(t[0],e)}})})})();