"use strict";(globalThis.blocksyJsonP=globalThis.blocksyJsonP||[]).push([[529],{529:function(t,e,n){n.r(e),n.d(e,{mount:function(){return s}});var r=n(194),u=n.n(r);const a=function(){return[...document.querySelectorAll(".quantity")].map((function(t){t.querySelector(".ct-increase")&&[...t.querySelectorAll("input")].map((function(t){t.hasInputListener||(t.hasInputListener=!0,t.addEventListener("input",(function(e){t.closest("tr")&&[...t.closest("tr").querySelectorAll(".quantity input")].filter((function(e){return e!==t})).map((function(t){return t.value=e.target.value}))})))}))}))};let o=!1;const s=function(t,e){let{event:n}=e;u()&&!o&&(o=!0,u()(document.body).on("updated_cart_totals",a),a());const r=t.parentNode.querySelector("input"),s=parseFloat(r.value,10)||0;if(t.classList.contains("ct-increase")){const t=r.getAttribute("max")&&parseFloat(r.getAttribute("max"),0)||1/0;r.value=s<t?Math.round(100*(s+parseFloat(r.step||"1")))/100:t}if(t.classList.contains("ct-decrease")){const t=r.getAttribute("min")?Math.round(100*parseFloat(r.getAttribute("min"),0))/100:0;r.value=s>t?Math.round(100*(s-parseFloat(r.step||"1")))/100:t}u()(r).trigger("change"),u()(r).trigger("input"),r.dispatchEvent(new Event("input",{bubbles:!0})),r.closest("tr")&&[...r.closest("tr").querySelectorAll(".quantity input")].filter((function(t){return t!==r})).map((function(t){return t.value=r.value}))}}}]);
//# sourceMappingURL=529.9189b2737bbf32170687.js.map