芝麻web文件管理V1.00
编辑当前文件:/var/www/cognitio.in/wp-content/plugins/elementor/assets/js/image-carousel.624de4dfcf054f3ddaa7.bundle.min.js
/*! elementor - v3.12.1 - 02-04-2023 */ "use strict";(self.webpackChunkelementor=self.webpackChunkelementor||[]).push([[268],{5914:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;class ImageCarousel extends elementorModules.frontend.handlers.SwiperBase{getDefaultSettings(){return{selectors:{carousel:".elementor-image-carousel-wrapper",slideContent:".swiper-slide"}}}getDefaultElements(){const e=this.getSettings("selectors"),t={$swiperContainer:this.$element.find(e.carousel)};return t.$slides=t.$swiperContainer.find(e.slideContent),t}getSwiperSettings(){const e=this.getElementSettings(),t=+e.slides_to_show||3,s=1===t,n=elementorFrontend.config.responsive.activeBreakpoints,i={mobile:1,tablet:s?1:2},a={slidesPerView:t,loop:"yes"===e.infinite,speed:e.speed,handleElementorBreakpoints:!0,breakpoints:{}};let o=t;Object.keys(n).reverse().forEach((t=>{const s=i[t]?i[t]:o;a.breakpoints[n[t].value]={slidesPerView:+e["slides_to_show_"+t]||s,slidesPerGroup:+e["slides_to_scroll_"+t]||1},e.image_spacing_custom&&(a.breakpoints[n[t].value].spaceBetween=this.getSpaceBetween(t)),o=+e["slides_to_show_"+t]||s})),"yes"===e.autoplay&&(a.autoplay={delay:e.autoplay_speed,disableOnInteraction:"yes"===e.pause_on_interaction}),s?(a.effect=e.effect,"fade"===e.effect&&(a.fadeEffect={crossFade:!0})):a.slidesPerGroup=+e.slides_to_scroll||1,e.image_spacing_custom&&(a.spaceBetween=this.getSpaceBetween());const r="arrows"===e.navigation||"both"===e.navigation,l="dots"===e.navigation||"both"===e.navigation;return r&&(a.navigation={prevEl:".elementor-swiper-button-prev",nextEl:".elementor-swiper-button-next"}),l&&(a.pagination={el:".swiper-pagination",type:"bullets",clickable:!0}),"yes"===e.lazyload&&(a.lazy={loadPrevNext:!0,loadPrevNextAmount:1}),a}async onInit(){if(super.onInit(...arguments),!this.elements.$swiperContainer.length||2>this.elements.$slides.length)return;const e=elementorFrontend.utils.swiper;this.swiper=await new e(this.elements.$swiperContainer,this.getSwiperSettings()),this.elements.$swiperContainer.data("swiper",this.swiper);"yes"===this.getElementSettings().pause_on_hover&&this.togglePauseOnHover(!0)}updateSwiperOption(e){const t=this.getElementSettings()[e],s=this.swiper.params;switch(e){case"autoplay_speed":s.autoplay.delay=t;break;case"speed":s.speed=t}this.swiper.update()}getChangeableProperties(){return{pause_on_hover:"pauseOnHover",autoplay_speed:"delay",speed:"speed",arrows_position:"arrows_position"}}onElementChange(e){if(0===e.indexOf("image_spacing_custom"))return void this.updateSpaceBetween(e);if(this.getChangeableProperties()[e])if("pause_on_hover"===e){const e=this.getElementSettings("pause_on_hover");this.togglePauseOnHover("yes"===e)}else this.updateSwiperOption(e)}onEditSettingsChange(e){"activeItemIndex"===e&&this.swiper.slideToLoop(this.getEditSettings("activeItemIndex")-1)}getSpaceBetween(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return elementorFrontend.utils.controls.getResponsiveControlValue(this.getElementSettings(),"image_spacing_custom","size",e)||0}updateSpaceBetween(e){const t=e.match("image_spacing_custom_(.*)"),s=t?t[1]:"desktop",n=this.getSpaceBetween(s);"desktop"!==s&&(this.swiper.params.breakpoints[elementorFrontend.config.responsive.activeBreakpoints[s].value].spaceBetween=n),this.swiper.params.spaceBetween=n,this.swiper.update()}}t.default=ImageCarousel}}]);