{"version":3,"file":"elements-callout-slider.js","mappings":"yJAIAA,SAASC,iBAAiB,0BAA0BC,SAASC,IAC3D,MAAMC,EAAYD,EAAGE,cAAc,WAC7BC,EAAmBH,EAAGE,cAAc,sBAEpCE,EAAS,IAAIC,EAAAA,EAAOJ,EAAW,CACnCK,QAAS,CAACC,EAAAA,GAAMC,EAAAA,GAAUC,EAAAA,IAC1BC,SAAU,CACRC,MAAO,KAETC,MAAM,EACNC,MAAO,IACPC,WAAY,CACVd,GAAIG,EACJY,WAAW,GAEbC,gBAAgB,EAChBC,cAAe,OACfC,aAAc,GACdC,YAAa,CACX,IAAK,CACHF,cAAe,EACfC,aAAc,IAEhB,KAAM,CACJD,cAAe,EACfC,aAAc,OAKpBd,EAAOM,SAASU,OAEhB,MAAMC,EAAW,IAAIC,sBACnB,EAAEC,MACIA,EAAEC,iBACJpB,EAAOM,SAASe,QAChBJ,EAASK,aACX,GAEF,CACEC,UAAW,CAAC,MAIhBN,EAASO,QAAQ5B,EAAG,G","sources":["webpack://silverstripe-base/./themes/app/src/elements/callout-slider.js"],"sourcesContent":["import Swiper from \"swiper\";\nimport { A11y, Autoplay, Pagination } from \"swiper/modules\";\nimport \"@styles/components/slider.css\";\n\ndocument.querySelectorAll(\".element-calloutslider\").forEach((el) => {\n const container = el.querySelector(\".swiper\");\n const sliderPagination = el.querySelector(\".slider-pagination\");\n\n const swiper = new Swiper(container, {\n modules: [A11y, Autoplay, Pagination],\n autoplay: {\n delay: 4000,\n },\n loop: true,\n speed: 1000,\n pagination: {\n el: sliderPagination,\n clickable: true,\n },\n centeredSlides: true,\n slidesPerView: \"auto\",\n spaceBetween: 16,\n breakpoints: {\n 768: {\n slidesPerView: 2,\n spaceBetween: 24,\n },\n 1536: {\n slidesPerView: 2,\n spaceBetween: 48,\n },\n },\n });\n\n swiper.autoplay.stop();\n\n const observer = new IntersectionObserver(\n ([e]) => {\n if (e.isIntersecting) {\n swiper.autoplay.start();\n observer.disconnect();\n }\n },\n {\n threshold: [0.7],\n },\n );\n\n observer.observe(el);\n});\n"],"names":["document","querySelectorAll","forEach","el","container","querySelector","sliderPagination","swiper","Swiper","modules","A11y","Autoplay","Pagination","autoplay","delay","loop","speed","pagination","clickable","centeredSlides","slidesPerView","spaceBetween","breakpoints","stop","observer","IntersectionObserver","e","isIntersecting","start","disconnect","threshold","observe"],"sourceRoot":""}