{"version":3,"file":"components-photo-gallery.js","mappings":"yJAGAA,SAASC,iBAAiB,4BAA4BC,SAASC,IAC7D,MAAMC,EAAgBD,EAAGE,cAAc,yBACjCC,EAAiBH,EAAGE,cAAc,0BAGxC,GAFkBD,EAAcH,iBAAiB,iBAAiBM,OAElD,EAAG,CACjB,MAAMC,EAAc,IAAIC,EAAAA,EAAOH,EAAgB,CAC7CI,cAAe,OACfC,aAAc,GACdC,eAAe,EACfC,qBAAqB,EACrBC,UAAW,GACXC,MAAM,EACNC,YAAa,CACX,KAAM,CACJC,UAAW,eAKjB,IAAIR,EAAAA,EAAOL,EAAe,CACxBc,QAAS,CAACC,EAAAA,GAAMC,EAAAA,GAAUC,EAAAA,GAAYC,EAAAA,GAAYC,EAAAA,IAClDb,cAAe,EACfc,MAAO,IACPC,OAAQ,OACRC,WAAY,CACVC,WAAW,GAEbf,eAAe,EACfG,MAAM,EACNa,SAAU,CACRC,MAAO,IACPC,sBAAsB,GAExBC,WAAY,CACVC,OAAQ7B,EAAGE,cAAc,uBACzB4B,OAAQ9B,EAAGE,cAAc,wBAE3B6B,OAAQ,CACNC,sBAAsB,EACtBC,OAAQ5B,IAGd,I","sources":["webpack://silverstripe-base/./themes/app/src/components/photo-gallery.js"],"sourcesContent":["import Swiper from \"swiper\";\nimport { A11y, Autoplay, EffectFade, Navigation, Thumbs } from \"swiper/modules\";\n\ndocument.querySelectorAll(\".component-photo-gallery\").forEach((el) => {\n const mainContainer = el.querySelector(\".main-gallery .swiper\");\n const thumbContainer = el.querySelector(\".thumb-gallery .swiper\");\n const numSlides = mainContainer.querySelectorAll(\".swiper-slide\").length;\n\n if (numSlides > 1) {\n const thumbSwiper = new Swiper(thumbContainer, {\n slidesPerView: \"auto\",\n spaceBetween: 12,\n preloadImages: false,\n watchSlidesProgress: true,\n threshold: 20,\n loop: true,\n breakpoints: {\n 1280: {\n direction: \"vertical\",\n },\n },\n });\n\n new Swiper(mainContainer, {\n modules: [A11y, Autoplay, EffectFade, Navigation, Thumbs],\n slidesPerView: 1,\n speed: 750,\n effect: \"fade\",\n fadeEffect: {\n crossFade: true,\n },\n preloadImages: false,\n loop: true,\n autoplay: {\n delay: 5000,\n disableOnInteraction: false,\n },\n navigation: {\n nextEl: el.querySelector(\".slider-button-next\"),\n prevEl: el.querySelector(\".slider-button-prev\"),\n },\n thumbs: {\n multipleActiveThumbs: false,\n swiper: thumbSwiper,\n },\n });\n }\n});\n"],"names":["document","querySelectorAll","forEach","el","mainContainer","querySelector","thumbContainer","length","thumbSwiper","Swiper","slidesPerView","spaceBetween","preloadImages","watchSlidesProgress","threshold","loop","breakpoints","direction","modules","A11y","Autoplay","EffectFade","Navigation","Thumbs","speed","effect","fadeEffect","crossFade","autoplay","delay","disableOnInteraction","navigation","nextEl","prevEl","thumbs","multipleActiveThumbs","swiper"],"sourceRoot":""}