!function(){"use strict";var t=window.ctFrontend;(0,t.registerDynamicChunk)("blocksy_ext_woo_extra_floating_cart",{mount:function(e,a){var n=a.state;if("INPUT"===e.tagName&&e.classList.contains("qty"))!function(t){var e=document.querySelector(".ct-floating-bar .quantity .qty"),a=document.querySelector(".ct-cart-actions .quantity .qty");e&&a&&[e,a].forEach((function(e){e.value=t.value,e.dispatchEvent(new Event("change",{bubbles:!0}))}))}(e);else{"target-after-bottom"===n&&(e.closest(".ct-drawer-canvas").dataset.floatingBar="yes:start",requestAnimationFrame((function(){e.closest(".ct-drawer-canvas").dataset.floatingBar="yes"}))),"target-after-bottom"!==n&&(e.closest(".ct-drawer-canvas").dataset.floatingBar="no:updating",function(t,e){var a=function(){t.removeEventListener("transitionend",n),e()},n=function(e){e.target===t&&a()};t.addEventListener("transitionend",n)}(e,(function(){"no:updating"===e.closest(".ct-drawer-canvas").dataset.floatingBar&&(e.closest(".ct-drawer-canvas").dataset.floatingBar="no")})));var o=e.querySelector(".button:not(.single_add_to_cart_button):not(.product_type_external)");o&&(o.hasClickListener||(o.hasClickListener=!0,o.addEventListener("click",(function(e){e.preventDefault(),function(e){if(e){var a=window.scrollY,n=null,o=function o(r){n||(n=r);var i=r-n,c=e.getBoundingClientRect(),s=0,l=document.querySelector("[data-sticky*=yes], [data-sticky*=fixed]");l&&(s=parseFloat(getComputedStyle(l).top)||0);var u,d,f,g=window.scrollY+c.top-(parseFloat(getComputedStyle(document.body).getPropertyValue("--header-sticky-height"))||0)-20-s,y=Math.max((u=i,d=a,f=-a,(u/=350)<1?f/2*u*u+d:-f/2*(--u*(u-2)-1)+d),g);t.areWeDealingWithSafari?(scrollTo(0,y),i<700&&requestAnimationFrame(o)):scrollTo(0,g)};t.areWeDealingWithSafari?requestAnimationFrame(o):o(0)}}(document.querySelector(".single-product .single_add_to_cart_button").closest("form"))}))))}}})}();