(()=>{"use strict";document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".ablocks-block--carousel").forEach(e=>{!function(e,t){if(!e)return null;const a=e?.querySelector(".ablocks-carousel-swiper"),s=e?.querySelector(".ablocks-carousel-navigation__button--prev"),r=e?.querySelector(".ablocks-carousel-navigation__button--next"),o=e?.querySelector(".ablocks-carousel-pagination"),l=a?.getAttribute("data-swiper-options"),i=a?.getAttribute("data-swiper-frontend-options"),n=JSON.parse(a?.getAttribute("data-swiper-slides-per-view")),c=JSON.parse(a?.getAttribute("data-swiper-gap")),u=e?.querySelector(".ablocks-carousel-autoplay-progress svg"),p=e?.querySelector(".ablocks-carousel-autoplay-progress span"),b=JSON.parse(l),d=JSON.parse(i),v={navigation:{nextEl:r,prevEl:s,disabledClass:"ablocks-carousel-navigation__button--disabled"},pagination:{el:o,clickable:!!b.paginationClickable}};a&&new Swiper(a,{observer:!0,observeParents:!0,...v,...d,breakpoints:t&&"slide"===d?.effect?{0:{slidesPerView:n.valueMobile,spaceBetween:c.valueMobile},480:{slidesPerView:n.valueTablet,spaceBetween:c.valueTablet},840:{slidesPerView:n.value,spaceBetween:c.value}}:{},on:{autoplayTimeLeft(e,t,a){u&&u.style.setProperty("--progress",1-a),p&&(p.textContent=`${Math.ceil(t/1e3)}s`)}}})}(e,!0)})})})();