(()=>{function e(e){if(e.swiper)return e.swiper.update(),e.swiper;const t=e.closest(".cb-carousel-block");if(!t)return null;const r=parseInt(t.getAttribute("data-cb-slides-per-view")),a=parseInt(t.getAttribute("data-cb-slides-per-group")),n=parseInt(t.getAttribute("data-cb-space-between")),i=parseInt(t.getAttribute("data-cb-speed")),u="true"===t.getAttribute("data-cb-navigation"),o="true"===t.getAttribute("data-cb-pagination"),s="true"===t.getAttribute("data-cb-loop"),b="true"===t.getAttribute("data-cb-resize-observer"),c="true"===t.getAttribute("data-cb-observer"),l=c&&"true"===t.getAttribute("data-cb-observe-parents"),d=c&&"true"===t.getAttribute("data-cb-observe-slide-children"),p="true"===t.getAttribute("data-cb-autoplay")&&{delay:parseInt(t.getAttribute("data-cb-autoplay-speed")),disableOnInteraction:"true"===t.getAttribute("data-cb-disable-on-interaction"),pauseOnMouseEnter:"true"===t.getAttribute("data-cb-pause-on-mouse-enter")},g=JSON.parse(t.getAttribute("data-cb-breakpoints")||"{}");return new Swiper(e,{slidesPerView:r,slidesPerGroup:a,spaceBetween:n,speed:i,loop:s,autoplay:p,navigation:!!u&&{nextEl:t.querySelector(".cb-button-next"),prevEl:t.querySelector(".cb-button-prev")},pagination:!!o&&{el:t.querySelector(".cb-pagination"),clickable:!0,renderBullet:function(e,t){return`<span class="${t} cb-pagination-bullet"></span>`}},breakpoints:g,...c&&{observer:!0},...l&&{observeParents:!0},...d&&{observeSlideChildren:!0},...b&&{resizeObserver:!0}})}function t(t=document){t.querySelectorAll(".cb-carousel-block .swiper").forEach((t=>{e(t)}))}window.CarouselSliderBlock={init(e=document){t(e)},update(t=document){!function(t=document){t.querySelectorAll(".cb-carousel-block .swiper").forEach((t=>{t.swiper?t.swiper.update():e(t)}))}(t)}},document.addEventListener("DOMContentLoaded",(()=>{t()}))})();