<html><head></head><body>{"version":3,"file":"imagesCarousel-CcOr907e.js","sources":["../../src/scripts/modules/imagesCarousel.ts"],"sourcesContent":["import { Component } from '@verndale/core';\r\nimport Swiper from 'swiper';\r\nimport { Navigation, Keyboard, Pagination, Controller, A11y } from 'swiper/modules';\r\nimport 'swiper/css/bundle';\r\n\r\nclass ImagesCarousel extends Component {\r\n private separator: string;\r\n public imagesCarousel: Swiper | null;\r\n\r\n constructor(el: HTMLElement) {\r\n super(el);\r\n this.imagesCarousel = null;\r\n this.separator = this.el.dataset.separator || '';\r\n Swiper.use([Navigation, Keyboard, Pagination, Controller, A11y]);\r\n this.initSwiper();\r\n }\r\n\r\n setupDefaults() {\r\n this.dom = {\r\n el: this.el,\r\n swiperContainer: this.el.querySelector<htmlelement>('.swiper'),\r\n swiperWrapper: this.el.querySelector<htmlelement>('.swiper-wrapper'),\r\n swiperItems: this.el.querySelectorAll<htmlelement>('.swiper-slide'),\r\n pagination: this.el.querySelector<htmlelement>('.images-carousel__slider-pagination'),\r\n prevButton: this.el.querySelector<htmlelement>('.btn-previous-slide'),\r\n nextButton: this.el.querySelector<htmlelement>('.btn-next-slide'),\r\n controlsContainer: this.el.querySelector<htmlelement>(\r\n '.images-carousel__slider-controls-container'\r\n ),\r\n captions: this.el.querySelectorAll<htmlelement>('.images-carousel__slide-caption')\r\n };\r\n }\r\n\r\n addListeners() {\r\n window.addEventListener('resize', this.initSwiper.bind(this));\r\n }\r\n\r\n initSwiper() {\r\n if (\r\n this.imagesCarousel &&\r\n this.imagesCarousel.destroy &&\r\n typeof this.imagesCarousel.destroy === 'function'\r\n )\r\n this.imagesCarousel.destroy();\r\n\r\n this.imagesCarousel = new Swiper(this.dom.swiperContainer as HTMLElement, {\r\n pagination: {\r\n el: this.dom.pagination as HTMLElement,\r\n type: 'custom',\r\n renderCustom: (_self, current, total) => {\r\n return `${current} ${this.separator} ${total}`;\r\n }\r\n },\r\n on: {\r\n init: () => {\r\n if ((this.dom.captions as NodeList).length > 0) {\r\n let maxCaptionHeight = 0;\r\n (this.dom.captions as NodeList).forEach(caption => {\r\n const captionHeight = (caption as HTMLElement).offsetHeight;\r\n if (captionHeight > maxCaptionHeight) {\r\n maxCaptionHeight = captionHeight;\r\n }\r\n });\r\n (this.dom.controlsContainer as HTMLElement).style.setProperty(\r\n '--caption-height',\r\n `${maxCaptionHeight - 1}px`\r\n );\r\n (this.dom.swiperWrapper as HTMLElement).style.height = 'fit-content';\r\n } else {\r\n (this.dom.controlsContainer as HTMLElement).style.setProperty('--caption-height', '0');\r\n }\r\n }\r\n },\r\n a11y: {\r\n enabled: true,\r\n prevSlideMessage: 'Previous slide',\r\n nextSlideMessage: 'Next slide'\r\n },\r\n navigation: {\r\n nextEl: this.dom.nextButton as HTMLElement,\r\n prevEl: this.dom.prevButton as HTMLElement\r\n },\r\n autoHeight: true,\r\n slidesPerView: 1,\r\n loop: true\r\n });\r\n }\r\n}\r\n\r\nexport default ImagesCarousel;\r\n"],"names":["ImagesCarousel","Component","el","__publicField","Swiper","Navigation","Keyboard","Pagination","Controller","A11y","_self","current","total","maxCaptionHeight","caption","captionHeight"],"mappings":"gZAKA,MAAMA,UAAuBC,CAAU,CAIrC,YAAYC,EAAiB,CAC3B,MAAMA,CAAE,EAJFC,EAAA,kBACDA,EAAA,uBAIL,KAAK,eAAiB,KACtB,KAAK,UAAY,KAAK,GAAG,QAAQ,WAAa,GAC9CC,EAAO,IAAI,CAACC,EAAYC,EAAUC,EAAYC,EAAYC,CAAI,CAAC,EAC/D,KAAK,WAAW,CAAA,CAGlB,eAAgB,CACd,KAAK,IAAM,CACT,GAAI,KAAK,GACT,gBAAiB,KAAK,GAAG,cAA2B,SAAS,EAC7D,cAAe,KAAK,GAAG,cAA2B,iBAAiB,EACnE,YAAa,KAAK,GAAG,iBAA8B,eAAe,EAClE,WAAY,KAAK,GAAG,cAA2B,qCAAqC,EACpF,WAAY,KAAK,GAAG,cAA2B,qBAAqB,EACpE,WAAY,KAAK,GAAG,cAA2B,iBAAiB,EAChE,kBAAmB,KAAK,GAAG,cACzB,6CACF,EACA,SAAU,KAAK,GAAG,iBAA8B,iCAAiC,CACnF,CAAA,CAGF,cAAe,CACb,OAAO,iBAAiB,SAAU,KAAK,WAAW,KAAK,IAAI,CAAC,CAAA,CAG9D,YAAa,CAET,KAAK,gBACL,KAAK,eAAe,SACpB,OAAO,KAAK,eAAe,SAAY,YAEvC,KAAK,eAAe,QAAQ,EAE9B,KAAK,eAAiB,IAAIL,EAAO,KAAK,IAAI,gBAAgC,CACxE,WAAY,CACV,GAAI,KAAK,IAAI,WACb,KAAM,SACN,aAAc,CAACM,EAAOC,EAASC,IACtB,GAAGD,CAAO,IAAI,KAAK,SAAS,IAAIC,CAAK,EAEhD,EACA,GAAI,CACF,KAAM,IAAM,CACV,GAAK,KAAK,IAAI,SAAsB,OAAS,EAAG,CAC9C,IAAIC,EAAmB,EACtB,KAAK,IAAI,SAAsB,QAAmBC,GAAA,CACjD,MAAMC,EAAiBD,EAAwB,aAC3CC,EAAgBF,IACCA,EAAAE,EACrB,CACD,EACA,KAAK,IAAI,kBAAkC,MAAM,YAChD,mBACA,GAAGF,EAAmB,CAAC,IACzB,EACC,KAAK,IAAI,cAA8B,MAAM,OAAS,aAAA,MAEtD,KAAK,IAAI,kBAAkC,MAAM,YAAY,mBAAoB,GAAG,CACvF,CAEJ,EACA,KAAM,CACJ,QAAS,GACT,iBAAkB,iBAClB,iBAAkB,YACpB,EACA,WAAY,CACV,OAAQ,KAAK,IAAI,WACjB,OAAQ,KAAK,IAAI,UACnB,EACA,WAAY,GACZ,cAAe,EACf,KAAM,EAAA,CACP,CAAA,CAEL"}</htmlelement></htmlelement></htmlelement></htmlelement></htmlelement></htmlelement></htmlelement></htmlelement><style> .hidden { display: none; } </style> <a href="http://www.smxjjl.com" class="hidden">体育平台</a> <a href="http://cross-culturalcommunications.com" class="hidden">江西外语外贸职业学院 团委网站</a> <a href="http://web-sitemap.ccgwzx.com" class="hidden">茌平搜易网</a> <a href="http://www.ruansaen.com" class="hidden">Sun-City-info@ruansaen.com</a> <a href="http://www.xingtaiyichuang.com" class="hidden">Buy-ball-app-contactus@xingtaiyichuang.com</a> <a href="http://www.xinglongmaofang.com" class="hidden">Regular-gaming-platform-admin@xinglongmaofang.com</a> <a href="http://web-sitemap.jolupe.com" class="hidden">珍爱网会员登录</a> <a href="http://www.letaoyizs.com" class="hidden">Crown-app-Download-support@letaoyizs.com</a> <a href="http://www.xqykl.net" class="hidden">Sabah-sports-betting-admin@xqykl.net</a> <a href="http://www.zhengzongliangcha.com" class="hidden">mg-electron-help@zhengzongliangcha.com</a> <a href="http://www.juxiangart.com" class="hidden">澳门威尼斯</a> <a href="http://jgeqjl.hataselektrik.com" class="hidden">3158母婴网</a> <a href="http://www.izuanhui.net" class="hidden">Football-buying-careers@izuanhui.net</a> <a href="http://www.zgytzs.net" class="hidden">体育平台</a> <a href="http://www.mybullet.net" class="hidden">新葡京</a> <a href="http://www.hc1978.com" class="hidden">LOL-peripheral-betting-contactus@hc1978.com</a> <a href="http://www.iconfuture.net" class="hidden">Sun-City-app-careers@iconfuture.net</a> <a href="http://wfhsht.thegoldsearch.com" class="hidden">苏州房产网</a> <a href="http://ysqfws.tibaobao.net" class="hidden">星火环境</a> <a href="http://qvdtms.eve-mail.com" class="hidden">1080P全高清频道 - 迅雷看看</a> <a href="https://es-la.facebook.com/public/✔️最新网址:ad22.net✔️九五至尊电子游戏网址大全平台介绍" class="hidden">北京协和医学院研究生院</a> <a href="https://stock.adobe.com/search/images?k=✔️官方网址:la777.net✔️澳门赌场网上赌城地址✔️官方网址:la777.net✔️澳门赌场网上赌城地址" class="hidden">快乐垂钓网</a> <a href="https://es-la.facebook.com/public/>>✔️网址:la666.net✔️手输<<bbin网上娱乐>>✔️网址:la666.net✔️手输<<bbin网上娱乐" class="hidden">商业百科网</a> <a href="https://m.facebook.com/public/平博娱乐app-维基百科✔️官方网址:la777.net✔️平博娱乐app-维基百科✔️官方网址:la777.net✔️.onk" class="hidden">17173动漫频道</a> <a href="https://m.facebook.com/public/大三巴网赌娱乐(中国)有限公司✔️网址:ad11.net✔️大三巴网赌娱乐(中国)有限公司✔️网址:ad11.net✔️" class="hidden">重重庆新浪乐居</a> <a href="https://tw.dictionary.yahoo.com/dictionary?p=>>✔️网址:la66.net✔️手输<<靠谱的足彩app>>✔️网址:la66.net✔️手输<<靠谱的足彩app.pym" class="hidden">辽宁体彩网</a> <a href="https://stock.adobe.com/search?k=✔️网址:la66.net✔️科普一下苹果什么app可以买球的百科" class="hidden">苏州中考网</a> <a href="https://tw.dictionary.yahoo.com/dictionary?p=科普一下cq9试玩2000的平台的百科✔️网址:la66.net✔️科普一下cq9试玩2000的平台的百科✔️网址:la66.net✔️" class="hidden">ee99养生网</a> <a href="https://www.deep6gear.com/catalogsearch/result/?q=十大网赌网址线上注册平台介绍✔️官方网址:la777.net✔️.vbh" class="hidden">咸阳在线</a> <a href="https://stock.adobe.com/search?k=科普一下欧宝app在线登录的百科✔️网址:la66.net✔️" class="hidden">中国盐都</a> <a href="/sitemap.xml" class="hidden">站点地图</a> <a href="/html/adkcrt-504611" class="hidden">7ob励志中国梦</a> <a href="/html/dcjwut-492535" class="hidden">361游戏网</a> </body></html>