{"version":3,"sources":["webpack://@verndale/toolkit/./src/js/modules/latest-articles-carousel.js"],"names":[],"mappings":"uKAIA,SAAW,CAAC,KAAY,IAAU,CAAC,EAEnC,MAAM,SAAe,KAAU,CAC7B,eAAgB,CACd,KAAK,IAAM,CACT,iBAAkB,KAAK,GAAG,cAAc,SAAS,EACjD,cAAe,KAAK,GAAG,iBAAiB,eAAe,EACvD,kBAAmB,KAAK,GAAG,cAAc,oBAAoB,EAC7D,kBAAmB,KAAK,GAAG,cAAc,qBAAqB,EAC9D,kBAAmB,KAAK,GAAG,cAAc,qBAAqB,CAChE,EAEA,KAAK,iBAAmB,KAAK,GAAG,QAAQ,8BAA8B,EACtE,KAAK,WAAW,CAClB,CAEA,YAAa,CACX,KAAM,GAAgB,KAAK,iBAAmB,EAAI,EAC5C,EAAuB,KAAK,iBAAmB,WAAa,UAElE,KAAK,OAAS,GAAI,MAAO,KAAK,IAAI,iBAAkB,CAClD,KAAM,GACN,OAAQ,GACR,cAAe,EACf,aAAc,GACd,cAAe,GACf,YAAa,EACV,uBAA+B,CAC9B,gBACA,WAAY,CACV,KAAM,CACR,CACF,CACF,EACA,WAAY,CACV,GAAI,KAAK,IAAI,kBACb,KAAM,UACR,EACA,WAAY,CACV,OAAQ,KAAK,IAAI,kBACjB,OAAQ,KAAK,IAAI,iBACnB,EACA,oBAAqB,EACvB,CAAC,CACH,CACF,CAEA,UAAe,C","file":"scripts/232.66b6dfe11cceedefe539.js","sourcesContent":["import { Component } from '@verndale/core';\r\nimport Swiper, { Navigation, Pagination } from 'swiper';\r\nimport { BREAKPOINTS } from '../utils';\r\n\r\nSwiper.use([Navigation, Pagination]);\r\n\r\nclass Module extends Component {\r\n setupDefaults() {\r\n this.dom = {\r\n $swiperContainer: this.el.querySelector('.swiper'),\r\n $swiperSlides: this.el.querySelectorAll('.swiper-slide'),\r\n $swiperPagination: this.el.querySelector('.swiper-pagination'),\r\n $swiperNextButton: this.el.querySelector('.swiper-button-next'),\r\n $swiperPrevButton: this.el.querySelector('.swiper-button-prev')\r\n };\r\n\r\n this.isSmallContainer = this.el.closest('.dual-column-container__main');\r\n this.initSwiper();\r\n }\r\n\r\n initSwiper() {\r\n const slidesPerView = this.isSmallContainer ? 1 : 3;\r\n const swiperPaginationType = this.isSmallContainer ? 'fraction' : 'bullets';\r\n\r\n this.swiper = new Swiper(this.dom.$swiperContainer, {\r\n a11y: true,\r\n rewind: true,\r\n slidesPerView: 1,\r\n spaceBetween: 32,\r\n watchOverflow: true,\r\n breakpoints: {\r\n [BREAKPOINTS.TABLET_LANDSCAPE]: {\r\n slidesPerView,\r\n pagination: {\r\n type: swiperPaginationType\r\n }\r\n }\r\n },\r\n pagination: {\r\n el: this.dom.$swiperPagination,\r\n type: 'fraction'\r\n },\r\n navigation: {\r\n nextEl: this.dom.$swiperNextButton,\r\n prevEl: this.dom.$swiperPrevButton\r\n },\r\n watchSlidesProgress: true\r\n });\r\n }\r\n}\r\n\r\nexport default Module;\r\n"],"sourceRoot":""}