Version Description
- New Widget: Chart
- Enhancement: Added Pause on Hover to Thumbnail Slider
Download this release
Release Info
Developer | wpvibes |
Plugin | Elementor Addon Elements |
Version | 1.10 |
Comparing to | |
See all releases |
Code changes from version 1.9.2 to 1.10
- assets/css/eae.css +9 -0
- assets/css/eae.min.css +1 -1
- assets/js/eae.js +138 -237
- assets/js/eae.min.js +1 -1
- assets/lib/swiper/css/swiper.css +0 -618
- assets/lib/swiper/css/swiper.min.css +0 -12
- assets/lib/swiper/js/swiper.esm.bundle.js +0 -7018
- assets/lib/swiper/js/swiper.esm.js +0 -7000
- assets/lib/swiper/js/swiper.js +0 -6558
assets/css/eae.css
CHANGED
@@ -5963,7 +5963,16 @@ body.rtl .eae-cs-layout-skin4 input:checked + .eae-content-toggle-switcher:befor
|
|
5963 |
padding-bottom: 100%;
|
5964 |
} */
|
5965 |
|
|
|
5966 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5967 |
|
5968 |
|
5969 |
|
5963 |
padding-bottom: 100%;
|
5964 |
} */
|
5965 |
|
5966 |
+
/* Chart */
|
5967 |
|
5968 |
+
.eae-chart-outer-container{
|
5969 |
+
position: relative;
|
5970 |
+
}
|
5971 |
+
.eae-chart-overlay{
|
5972 |
+
width: 100%;
|
5973 |
+
height: 100%;
|
5974 |
+
position: absolute;
|
5975 |
+
}
|
5976 |
|
5977 |
|
5978 |
|
assets/css/eae.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.elementor-widget-wts-textseparator .elementor-widget-container{overflow:hidden}.wts-eae-textseparator{align-items:center;display:flex;flex-flow:row nowrap;margin:auto}body.rtl .wts-eae-textseparator{flex-direction:row-reverse}.eae-separator-icon-inner i{height:1em;width:1em;text-align:center;position:relative;display:block}.eae-separator-icon-inner i:before{position:absolute;left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translateX(-50%)}.wts-eae-textseparator .eae-sep-holder{flex:1 1 auto;height:1px;min-width:10%;position:relative}.wts-eae-textseparator .eae-sep-holder .eae-sep-lines{border-top-width:1px;display:block;height:1px;position:relative;top:1px;width:100%}.eae-separator-title{margin:0;-moz-box-flex:0;flex:0 1 auto;line-height:1em;margin:0;overflow-wrap:break-word}.sep-align-right .sep-right{display:none}.sep-align-left .sep-left{display:none}.eae-icon-view-stacked i{color:#fff}.eae-icon-view-framed .eae-separator-icon-inner{border:1px solid}.eae-icon-shape-circle .eae-separator-icon-inner{border-radius:50%}.eae-separator-icon-wrapper,.eae-separator-title{margin:0 5px!important}.eae-separator-icon-inner{line-height:1}.wts-price-box-wrapper .eae-pt-heading,.wts-price-box-wrapper .eae-pt-sub-heading{margin:5px 0;text-align:center}.plan-price-shape{display:table;height:6em;margin:auto;width:6em}.eae-pt-price-box-shape-circle .plan-price-shape,.eae-pt-price-box-shape-square .plan-price-shape{border:1px solid}.eae-pt-price-box-shape-circle .plan-price-shape{border-radius:50%}.plan-price-block{padding:10px 0}.plan-price-shape-inner{display:table-cell;vertical-align:middle;padding:10px}.plan-price-shape-inner>span{display:block;font-size:1em;text-align:center}.eae-pt-feature-list{list-style:outside none none;text-align:center;margin:10px 0}.eae-pt-button-wrapper>a{text-align:center;display:inline-block;line-height:1}.eae-pt-button-wrapper{text-align:center}.wts-price-box-wrapper .heading-wrapper,.wts-price-box-wrapper .plan-features-wrapper{padding:10px 5px}.eae-pt-button-wrapper{padding:15px 0}.eae-pt-button-wrapper a{padding:5px 15px;border-radius:3px}.eae-pt-align-icon-right{float:right}.strike-feature{text-decoration:line-through}.eae-flip-box{width:100%;text-align:center}.eae-flip-box-wrapper{display:inline-block;width:100%}.eae-flip-box-inner{width:100%;height:200px;position:relative;-webkit-transform-style:preserve-3d;-moz-transform-style:preserve-3d;-ms-transform-style:preserve-3d;transform-style:preserve-3d}.eae-flip-box-inner .eae-flip-box-back,.eae-flip-box-inner .eae-flip-box-front{width:100%;height:100%;position:absolute;top:0;left:0;text-align:center;padding:10px;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:all .6s ease 0s;-moz-transition:all .6s ease 0s;-ms-transition:all .6s ease 0s;-o-transition:all .6s ease 0s;transition:all .6s ease 0s}.eae-flip-box-front{z-index:2}.eae-flip-box-back{z-index:1}.eae-fb-animate-vertical .eae-flip-box-inner .eae-flip-box-front{-webkit-transform:perspective(1000px) rotateX(0);-ms-transform:perspective(1000px) rotateX(0);transform:perspective(1000px) rotateX(0)}.eae-fb-animate-vertical .eae-flip-box-inner .eae-flip-box-back{-webkit-transform:perspective(1000px) rotateX(180deg);transform:perspective(1000px) rotateX(180deg);-ms-transform:perspective(1000px) rotateX(180deg)}.eae-fb-animate-vertical .eae-flip-box-inner:hover .eae-flip-box-front{-webkit-transform:perspective(1000px) rotateX(180deg);transform:perspective(1000px) rotateX(180deg);-ms-transform:perspective(1000px) rotateX(180deg)}.eae-fb-animate-vertical .eae-flip-box-inner:hover .eae-flip-box-back{-webkit-transform:perspective(1000px) rotateX(0);transform:perspective(1000px) rotateX(0);-ms-transform:perspective(1000px) rotateX(0)}.eae-fb-animate-horizontal .eae-flip-box-inner .eae-flip-box-front{-webkit-transform:perspective(1000px) rotateY(0);transform:perspective(1000px) rotateY(0);-ms-transform:perspective(1000px) rotateY(0)}.eae-fb-animate-horizontal .eae-flip-box-inner .eae-flip-box-back{-webkit-transform:perspective(1000px) rotateY(180deg);transform:perspective(1000px) rotateY(180deg);-ms-transform:perspective(1000px) rotateY(180deg)}.eae-fb-animate-horizontal .eae-flip-box-inner:hover .eae-flip-box-front{-webkit-transform:perspective(1000px) rotateY(180deg);transform:perspective(1000px) rotateY(180deg);-ms-transform:perspective(1000px) rotateY(180deg)}.eae-fb-animate-horizontal .eae-flip-box-inner:hover .eae-flip-box-back{-webkit-transform:perspective(1000px) rotateY(0);transform:perspective(1000px) rotateY(0);-ms-transform:perspective(1000px) rotateY(0)}.eae-fb-animate-fade .eae-flip-box-inner .eae-flip-box-front{opacity:1}.eae-fb-animate-fade .eae-flip-box-inner .eae-flip-box-back{opacity:0}.eae-fb-animate-fade .eae-flip-box-inner:hover .eae-flip-box-front{opacity:0}.eae-fb-animate-fade .eae-flip-box-inner:hover .eae-flip-box-back{opacity:1}.eae-flip-box-wrapper:focus .eae-flip-box-back,.eae-flip-box-wrapper:hover .eae-flip-box-back{z-index:2}.eae-flip-box-wrapper:focus .eae-flip-box-front,.eae-flip-box-wrapper:hover .eae-flip-box-front{z-index:1}.fade .eae-flip-box-wrapper .eae-flip-box-front{opacity:1;transition:1s}.fade .eae-flip-box-wrapper .eae-flip-box-back{opacity:0;transition:1s}.fade .eae-flip-box-wrapper:focus .eae-flip-box-front,.fade .eae-flip-box-wrapper:hover .eae-flip-box-front{opacity:0}.fade .eae-flip-box-wrapper:focus .eae-flip-box-back,.fade .eae-flip-box-wrapper:hover .eae-flip-box-back{opacity:1}.eae-fb-animate-flip .eae-flip-box-wrapper{perspective:800px}.eae-fb-animate-flip .eae-flip-box-inner{transform-style:preserve-3d;transform:rotateX(0) rotateY(0) rotateZ(0);transition:1s}.eae-fb-animate-flip .eae-flip-box-front{transform:translate3d(0,0,1px)}.eae-fb-animate-flip .eae-flip-box-back{transform:rotateY(180deg) translate3d(0,0,0)}.eae-fb-animate-flip .eae-flip-box-wrapper:focus .eae-flip-box-inner,.eae-fb-animate-flip .eae-flip-box-wrapper:hover .eae-flip-box-inner{transform:rotateY(180deg)}.up .eae-flip-box-front{transform:translate3d(0,0,1px)}.up .eae-flip-box-back{transform:rotateX(180deg) translate3d(0,0,0)}.up .eae-flip-box-wrapper:focus .eae-flip-box-inner,.up .eae-flip-box-wrapper:hover .eae-flip-box-inner{transform:rotateX(180deg)}.box .eae-flip-box-front{transform:translate3d(0,0,100px) scale(.85,.85)}.box .eae-flip-box-back{transform:rotateY(180deg) translate3d(0,0,100px) scale(.85,.85)}.box.up .eae-flip-box-back{transform:rotateX(180deg) translate3d(0,0,100px) scale(.85,.85)}.hideback .eae-flip-box-back,.hideback .eae-flip-box-front{backface-visibility:hidden}.eae-fb-animate-nananana .eae-flip-box-wrapper:focus .eae-flip-box-front,.eae-fb-animate-nananana .eae-flip-box-wrapper:hover .eae-flip-box-front{z-index:10;animation:batman 1s 2 alternate linear}.eae-fb-animate-flipcard .eae-flip-box-back,.eae-fb-animate-flipcard .eae-flip-box-front{transition:transform .4s ease;transform-origin:center center -150px;-webkit-transform-origin:center center -150px}.flipcard-rotate-top-down .eae-flip-box-front{transform:perspective(0) rotateX(0) rotateY(0) rotateZ(0)}.flipcard-rotate-top-down .eae-flip-box-back{transform:perspective(0) rotateX(90deg) rotateY(0) rotateZ(0)}.eae-fb-animate-flipcard.flipcard-rotate-top-down .eae-flip-box-wrapper:hover .eae-flip-box-front{transform:perspective(0) rotateX(-90deg) rotateY(0) rotateZ(0)}.eae-fb-animate-flipcard.flipcard-rotate-top-down .eae-flip-box-wrapper:hover .eae-flip-box-back{z-index:99999;transform:perspective(0) rotateX(0) rotateY(0) rotateZ(0)}.flipcard-rotate-down-top .eae-flip-box-front{transform:perspective(0) rotateX(0) rotateY(0) rotateZ(0)}.flipcard-rotate-down-top .eae-flip-box-back{transform:perspective(0) rotateX(-90deg) rotateY(0) rotateZ(0)}.eae-fb-animate-flipcard.flipcard-rotate-down-top .eae-flip-box-wrapper:hover .eae-flip-box-front{transform:perspective(0) rotateX(90deg) rotateY(0) rotateZ(0)}.eae-fb-animate-flipcard.flipcard-rotate-down-top .eae-flip-box-wrapper:hover .eae-flip-box-back{z-index:99999;transform:perspective(0) rotateX(0) rotateY(0) rotateZ(0)}.flipcard-rotate-left-right .eae-flip-box-front{transform:perspective(0) rotateX(0) rotateY(0) rotateZ(0)}.flipcard-rotate-left-right .eae-flip-box-back{transform:perspective(0) rotateX(0) rotateY(-90deg) rotateZ(0)}.eae-fb-animate-flipcard.flipcard-rotate-left-right .eae-flip-box-wrapper:hover .eae-flip-box-front{transform:perspective(0) rotateX(0) rotateY(90deg) rotateZ(0)}.eae-fb-animate-flipcard.flipcard-rotate-left-right .eae-flip-box-wrapper:hover .eae-flip-box-back{z-index:99999;transform:perspective(0) rotateX(0) rotateY(0) rotateZ(0)}.flipcard-rotate-right-left .eae-flip-box-front{transform:perspective(0) rotateX(0) rotateY(0) rotateZ(0)}.flipcard-rotate-right-left .eae-flip-box-back{transform:perspective(0) rotateX(0) rotateY(90deg) rotateZ(0)}.eae-fb-animate-flipcard.flipcard-rotate-right-left .eae-flip-box-wrapper:hover .eae-flip-box-front{transform:perspective(0) rotateX(0) rotateY(-90deg) rotateZ(0)}.eae-fb-animate-flipcard.flipcard-rotate-right-left .eae-flip-box-wrapper:hover .eae-flip-box-back{z-index:99999;transform:perspective(0) rotateX(0) rotateY(0) rotateZ(0)}@keyframes batman{0%{transform:scale(1,1) rotateZ(0)}100%{transform:scale(0,0) rotateZ(720deg);opacity:0}}.eae-flip-box-back i,.eae-flip-box-front i{font-size:32px;height:1em;width:1em;position:relative;display:block}.eae-flip-box-back i:before,.eae-flip-box-front i:before{position:absolute;left:50%;-webkit-transform:translate(-50%);-moz-transform:translate(-50%);-ms-transform:translate(-50%);-o-transform:translate(-50%);transform:translate(-50%)}.eae-fb-icon-view-framed{border:1px solid #92be43}.eae-fb-icon-shape-circle{border-radius:50%}.eae-flip-box-wrapper .icon-wrapper{display:inline-block;padding:10px;line-height:1}.eae-flip-box-wrapper .back-icon-title,.eae-flip-box-wrapper .front-icon-title{margin:10px auto;color:#fff}.eae-flip-box-wrapper .flipbox-content{display:block;position:relative;top:50%;transform:translateY(-50%);-ms-transform:translateY(-50%)}.flipbox-content p{margin-bottom:10px}.eae-fb-button{display:inline-block;padding:5px 10px}.eae-flip-box-front{background:#a0ce4e}.eae-flip-box-back{background:#73b9dc}@media only screen and (max-width:768px){.eae-flip-box-back,.eae-flip-box-front,.flipbox-content{cursor:pointer;overflow:visible!important;transform-style:preserve-3d;-webkit-transform-style:preserve-3d}}.elementor-widget-wts-shape-separator svg{display:block}.wts-eae-pl-wrapper ul{margin:0}.wts-eae-pl-wrapper ul li{list-style:none;overflow:hidden;margin-bottom:10px}.eae-pl-img-align-none .eae-pl-image-wrapper a{text-align:center}.eae-pl-title{margin:0}.eae-pl-title a{display:block}.eae-pl-readmore a{display:inline-block;border-radius:2px;color:#fff;padding:4px 8px}.eae-at-animation-text-wrapper{display:inline-block;position:relative;text-align:left}.eae-at-animation-text-wrapper .eae-at-animation-text{display:inline-block;position:absolute;white-space:nowrap;left:0;top:0}[data-elementor-device-mode=mobile] .eae-at-animation-text{white-space:normal}.eae-at-animation-text-wrapper .eae-at-animation-text.is-visible{position:relative}.no-js .eae-at-animation-text-wrapper .eae-at-animation-text{opacity:0}.no-js .eae-at-animation-text-wrapper .eae-at-animation-text.is-visible{opacity:1}.eae-animtext-wrapper{font-size:40px}.eae-st-rest-text{display:inline-block}.eae-st-split-text{display:inline-block}body.rtl .eae-st-transform-text-title{display:flex;flex-direction:row-reverse}body.rtl .eae-text-align-left .eae-st-transform-text-title{justify-content:flex-start}body.rtl .eae-text-align-right .eae-st-transform-text-title{justify-content:flex-end}body.rtl .eae-text-align-center .eae-st-transform-text-title{justify-content:center}.eae-at-animation.type .eae-at-animation-text-wrapper{vertical-align:bottom;overflow:hidden}.eae-at-animation.type .eae-at-animation-text-wrapper::after{content:"";position:absolute;right:0;top:50%;bottom:auto;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%);height:90%;width:1px}.eae-at-animation.type .eae-at-animation-text-wrapper.waiting::after{-webkit-animation:cd-pulse 1s infinite;-moz-animation:cd-pulse 1s infinite;animation:cd-pulse 1s infinite}.eae-at-animation.type .eae-at-animation-text-wrapper.selected::after{visibility:hidden}.eae-at-animation.type .eae-at-animation-text{visibility:hidden}.eae-at-animation.type .eae-at-animation-text.is-visible{visibility:visible}.eae-at-animation.type i{position:absolute;visibility:hidden}.eae-at-animation.type i.in{position:relative;visibility:visible}@-webkit-keyframes cd-pulse{0%{-webkit-transform:translateY(-50%) scale(1);opacity:1}40%{-webkit-transform:translateY(-50%) scale(.9);opacity:0}100%{-webkit-transform:translateY(-50%) scale(0);opacity:0}}@-moz-keyframes cd-pulse{0%{-moz-transform:translateY(-50%) scale(1);opacity:1}40%{-moz-transform:translateY(-50%) scale(.9);opacity:0}100%{-moz-transform:translateY(-50%) scale(0);opacity:0}}@keyframes cd-pulse{0%{-webkit-transform:translateY(-50%) scale(1);-moz-transform:translateY(-50%) scale(1);-ms-transform:translateY(-50%) scale(1);-o-transform:translateY(-50%) scale(1);transform:translateY(-50%) scale(1);opacity:1}40%{-webkit-transform:translateY(-50%) scale(.9);-moz-transform:translateY(-50%) scale(.9);-ms-transform:translateY(-50%) scale(.9);-o-transform:translateY(-50%) scale(.9);transform:translateY(-50%) scale(.9);opacity:0}100%{-webkit-transform:translateY(-50%) scale(0);-moz-transform:translateY(-50%) scale(0);-ms-transform:translateY(-50%) scale(0);-o-transform:translateY(-50%) scale(0);transform:translateY(-50%) scale(0);opacity:0}}.eae-img-comp-container{width:100%;position:relative;text-align:center}.eae-img-comp-container img{vertical-align:middle}.eae-img-comp-img{position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;transform:translateZ(0);backface-visibility:hidden}.eae-img-comp-img img{display:block;max-width:100%;width:100%}.eae-img-comp-slider{position:absolute;z-index:9;width:40px;height:40px;background-color:#2196f3;opacity:1;border-radius:50%}.icon-horizontal{cursor:ew-resize}.icon-vertical{cursor:n-resize}.mode-horizontal .eae-img-comp-overlay img{position:absolute;left:0;top:0;display:block;width:auto;height:100%!important;max-width:none!important}.mode-vertical .eae-img-comp-overlay img{position:absolute;left:0;top:0;display:block;width:100%;height:auto!important;max-width:none!important}.eae-img-comp-slider svg,.eae-slider-icon{top:50%;transform:translateY(-50%) translateX(-50%);position:absolute;left:50%;color:#fff}.elementor-widget-wts-ab-image{text-align:center}.elementor-widget-wts-ab-image .elementor-widget-container{display:inline-block;margin:0 auto!important;overflow:hidden}.eae-text-before{position:absolute!important;padding:10px;transition:transform .3s .7s,opacity .3s .7s;color:#d36118;z-index:0;background:rgba(255,255,255,.5);margin:20px}.eae-text-after{position:absolute!important;padding:10px;transition:transform .3s .7s,opacity .3s .7s;color:#d36118;z-index:0;background:rgba(255,255,255,.5);margin:20px}.divTest{display:inline-block;background-color:#00a0d2;padding:20px}.eae-particle-wrapper{position:absolute;left:0;top:0}.eae-particle-wrapper.eae-particle-area{width:100%;height:100%}body:not(.elementor-editor-active) .eae-particle-wrapper{width:100%;height:100%}body:not(.elementor-editor-active) .eae-particle-wrapper .particles-js-canvas-el{height:100%;position:absolute;z-index:0}.eae-section-bs{position:absolute;width:100%;height:100%;top:0}.eae-section-bs-inner{width:100%;height:100%!important}.eae-popup.mfp-bg{top:0;left:0;width:100%;height:100%;z-index:1042;overflow:hidden;position:fixed;background:#0b0b0b;opacity:.8}.eae-popup-link{padding:12px 24px;color:#fff;display:inline-flex;line-height:1}.eae-popup-link svg{fill:#fff}.eae-popup-link:hover{color:#fff}.eae-popup.mfp-wrap{top:0;left:0;width:100%;height:100%;z-index:1043;position:fixed;outline:0!important;-webkit-backface-visibility:hidden}.eae-popup .mfp-container{text-align:center;position:absolute;width:100%;height:100%;left:0;top:0;padding:0 8px;box-sizing:border-box}.eae-popup .mfp-container:before{content:"";display:inline-block;height:100%;vertical-align:middle}.eae-popup .mfp-align-top .mfp-container:before{display:none}.eae-popup .mfp-content{position:relative;display:inline-block;vertical-align:middle;margin:0 auto;text-align:left;z-index:1045}.eae-modal-content{padding:20px}.eae-pop-btn-align-left .eae-popup-wrapper{text-align:left}.eae-pop-btn-align-right .eae-popup-wrapper{text-align:right}.eae-pop-btn-align-center .eae-popup-wrapper{text-align:center}.eae-pop-btn-align-justify .eae-popup-wrapper{text-align:center}.eae-pop-btn-align-justify .eae-popup-wrapper a{display:block}.eae-popup .mfp-ajax-holder .mfp-content,.eae-popup .mfp-inline-holder .mfp-content{width:50%;background-color:#fff;cursor:auto;overflow:hidden}.eae-popup .mfp-ajax-cur{cursor:progress}.eae-popup .mfp-zoom-out-cur,.eae-popup .mfp-zoom-out-cur .mfp-image-holder .eae-close{cursor:-moz-zoom-out;cursor:-webkit-zoom-out;cursor:zoom-out}.eae-popup .mfp-zoom{cursor:pointer;cursor:-webkit-zoom-in;cursor:-moz-zoom-in;cursor:zoom-in}.eae-popup.mfp-auto-cursor .mfp-content{cursor:auto}.eae-popup .eae-close,.eae-popup .mfp-arrow,.eae-popup .mfp-counter,.eae-popup .mfp-preloader{-webkit-user-select:none;-moz-user-select:none;user-select:none}.mfp-loading.mfp-figure{display:none}.mfp-hide{display:none!important}.eae-popup .mfp-preloader{color:#ccc;position:absolute;top:50%;width:auto;text-align:center;margin-top:-.8em;left:8px;right:8px;z-index:1044}.eae-popup .mfp-preloader a{color:#ccc}.eae-popup .mfp-preloader a:hover{color:#fff}.mfp-s-ready .mfp-preloader{display:none}.mfp-s-error .mfp-content{display:none}button.eae-close,button.mfp-arrow{overflow:visible;cursor:pointer;background:0 0;border:0;-webkit-appearance:none;display:block;outline:0;padding:0;z-index:1046;box-shadow:none;touch-action:manipulation}button::-moz-focus-inner{padding:0;border:0}.eae-popup .eae-close{width:28px;height:28px;line-height:1em;position:absolute;right:10px;top:10px;text-decoration:none;text-align:center;opacity:1;color:#fff;font-size:28px;z-index:1500}.eae-close:focus,.eae-close:hover{opacity:1;cursor:pointer}.eae-close:active{top:1px}.eae-close:before{top:50%;left:50%;position:absolute;transform:translate(-50%,-50%)}.eae-popup.eae-close-btn-in .eae-close{color:#fff}.mfp-iframe-holder .eae-close,.mfp-image-holder .eae-close{color:#fff;right:-6px;text-align:right;padding-right:6px;width:100%}.mfp-counter{position:absolute;top:0;right:0;color:#ccc;font-size:12px;line-height:18px;white-space:nowrap}.mfp-arrow{position:absolute;opacity:.65;margin:0;top:50%;margin-top:-55px;padding:0;width:90px;height:110px;-webkit-tap-highlight-color:transparent}.mfp-arrow:active{margin-top:-54px}.mfp-arrow:focus,.mfp-arrow:hover{opacity:1}.mfp-arrow:after,.mfp-arrow:before{content:"";display:block;width:0;height:0;position:absolute;left:0;top:0;margin-top:35px;margin-left:35px;border:medium inset transparent}.mfp-arrow:after{border-top-width:13px;border-bottom-width:13px;top:8px}.mfp-arrow:before{border-top-width:21px;border-bottom-width:21px;opacity:.7}.mfp-arrow-left{left:0}.mfp-arrow-left:after{border-right:17px solid #fff;margin-left:31px}.mfp-arrow-left:before{margin-left:25px;border-right:27px solid #3f3f3f}.mfp-arrow-right{right:0}.mfp-arrow-right:after{border-left:17px solid #fff;margin-left:39px}.mfp-arrow-right:before{border-left:27px solid #3f3f3f}.mfp-iframe-holder{padding-top:40px;padding-bottom:40px}.mfp-iframe-holder .mfp-content{line-height:0;width:100%;max-width:900px}.mfp-iframe-holder .eae-close{top:-40px}.mfp-iframe-scaler{width:100%;height:0;overflow:hidden;padding-top:56.25%}.mfp-iframe-scaler iframe{position:absolute;display:block;top:0;left:0;width:100%;height:100%;box-shadow:0 0 8px rgba(0,0,0,.6);background:#000}img.mfp-img{width:auto;max-width:100%;height:auto;display:block;line-height:0;box-sizing:border-box;padding:40px 0 40px;margin:0 auto}.eae-popup .mfp-figure{line-height:0}.eae-popup .mfp-figure:after{content:"";position:absolute;left:0;top:40px;bottom:40px;display:block;right:0;width:auto;height:auto;z-index:-1;box-shadow:0 0 8px rgba(0,0,0,.6);background:#444}.eae-popup .mfp-figure small{color:#bdbdbd;display:block;font-size:12px;line-height:14px}.eae-popup .mfp-figure figure{margin:0}.eae-popup .mfp-bottom-bar{margin-top:-36px;position:absolute;top:100%;left:0;width:100%;cursor:auto}.eae-popup .mfp-title{text-align:left;line-height:1;word-wrap:break-word;color:#fff;background-color:#4054b2;padding:20px 20px 20px 20px}.eae-popup .mfp-image-holder .mfp-content{max-width:100%}.eae-popup .mfp-gallery .mfp-image-holder .mfp-figure{cursor:pointer}@media screen and (max-width:800px) and (orientation:landscape),screen and (max-height:300px){.mfp-img-mobile .mfp-image-holder{padding-left:0;padding-right:0}.mfp-img-mobile img.mfp-img{padding:0}.mfp-img-mobile .mfp-figure:after{top:0;bottom:0}.mfp-img-mobile .mfp-figure small{display:inline;margin-left:5px}.mfp-img-mobile .mfp-bottom-bar{background:rgba(0,0,0,.6);bottom:0;margin:0;top:auto;padding:3px 5px;position:fixed;box-sizing:border-box}.mfp-img-mobile .mfp-bottom-bar:empty{padding:0}.mfp-img-mobile .mfp-counter{right:5px;top:3px}.mfp-img-mobile .eae-close{top:0;right:0;width:35px;height:35px;line-height:35px;background:rgba(0,0,0,.6);position:fixed;text-align:center;padding:0}}.elementor-element.eae-animated-gradient-yes,.elementor-element.eae-animated-gradient-yes .animated-gradient{background-size:400% 400%!important;-webkit-animation:AnimateGradient 15s ease-in-out infinite;-moz-animation:AnimateGradient 15s ease-in-out infinite;animation:AnimateGradient 15s ease-in-out infinite}.animated-gradient{position:absolute;top:0;left:0;height:100%;width:100%}@-webkit-keyframes AnimateGradient{0%{background-position:0 50%}50%{background-position:100% 50%}100%{background-position:0 50%}}@-moz-keyframes AnimateGradient{0%{background-position:0 50%}50%{background-position:100% 50%}100%{background-position:0 50%}}@keyframes AnimateGradient{0%{background-position:0 50%}50%{background-position:100% 50%}100%{background-position:0 50%}}.eae-swiper-outer-wrapper .swiper-slide{height:auto;overflow:inherit}.eae-swiper-outer-wrapper .swiper-slide-wrapper,.eae-swiper-outer-wrapper .testimonial-wrapper{height:100%}.eae-grid{display:flex;flex-wrap:wrap;flex-direction:row}.eae-masonry- .eae-grid-item{position:relative;height:100%}.eae-masonry- .eae-grid-item .testimonial-wrapper{height:100%}.eae-grid-container{transition:.1s all ease}.eae-grid-container{display:inline-block}.wrapper .content{margin:10px 0}.skin-2.testimonial-wrapper{display:flex;flex-direction:column;background-color:#9c989821;min-height:300px;padding:10px 20px;box-shadow:0 0 5px rgba(0,0,0,.15);color:#696969}.skin-2 .content-wrapper{padding:10px;position:relative;background-color:#fff;border-radius:10px;color:#77778e}.skin-2 i.after-content,.skin-2 i.before-content{position:absolute}.skin-2 i.before-content{top:10px;left:20px}.skin-2 i.after-content{bottom:10px;right:20px}.skin-2 blockquote{position:relative;font-size:14px;padding:10px;font-weight:500;text-align:left;margin:0;line-height:1.6em;font-style:italic}.skin-2 blockquote::after,.skin-2 blockquote::before{font-family:FontAwesome;content:"\201C";position:absolute;font-size:50px;opacity:.3;font-style:normal}.skin-2 blockquote::before{top:10px;left:20px}.skin-2 blockquote::after{content:"\201D";right:20px}.skin-2 .image-wrapper{position:relative;max-width:100%;text-align:center}.skin-2 img{width:100px;border-radius:25%}.skin-2 .detail-wrapper{text-align:center}.skin-2 .company,.skin-2 .designation,.skin-2 .rating-wrapper,.skin-2 .title{padding:5px 0}.skin-2 .rating-wrapper{color:navy}.skin-2 .title{font-weight:800;color:#000}.skin-2 blockquote p{margin:10px 0!important}.skin-1.testimonial-wrapper{display:flex;flex-direction:column;background-color:#fff;box-shadow:0 0 5px rgba(0,0,0,.15);color:#000}.skin-1 .content-wrapper{order:0}.skin-1 .image-wrapper{order:1;text-align:center;margin:15px 0}.skin-1 .detail-wrapper{order:2}.skin-1 .content-wrapper{padding:10px;position:relative}.skin-1 i.after-content,.skin-1 i.before-content{position:absolute}.skin-1 i.before-content{top:10px;left:20px}.skin-1 i.after-content{bottom:10px;right:20px}.skin-1 blockquote{position:relative;background-color:#fff;font-size:14px;padding:10px;font-weight:500;text-align:left;margin:0;line-height:1.6em;font-style:italic}.skin-1 blockquote::after,.skin-1 blockquote::before{font-family:FontAwesome;content:"\201C";position:absolute;font-size:50px;opacity:.3;font-style:normal}.skin-1 blockquote::before{top:10px;left:20px}.skin-1 blockquote::after{content:"\201D";right:20px}.skin-1 .image-wrapper{position:relative;max-width:100%}.skin-1 img{width:100px;height:auto;border-radius:50%}.skin-1 .detail-wrapper{display:flex;flex-direction:row-reverse;justify-content:space-between;padding:10px;background-color:rgba(157,163,156,.18)}.skin-1 .designation,.skin-1 .rating-wrapper,.skin-1 .title{margin:0 5px}.skin-1 .title-wrapper{display:flex;flex-direction:row}.skin-1 .rating-wrapper{color:#fecc1f}.skin-4.testimonial-wrapper{flex-direction:column;display:flex;background-color:#bfbfb6bd;min-height:300px;padding:10px 0;box-shadow:0 0 5px rgba(0,0,0,.15);color:#77778e}.skin-4 .content-wrapper{padding:10px;position:relative}.skin-4 .content-wrapper{order:2;color:#3c3c3c}.skin-4 i.after-content,.skin-4 i.before-content{position:absolute}.skin-4 i.before-content{top:10px;left:20px}.skin-4 i.after-content{bottom:10px;right:20px}.skin-4 blockquote{position:relative;font-size:14px;padding:10px;font-weight:500;text-align:left;margin:0;line-height:1.6em;font-style:italic}.skin-4 blockquote::after,.skin-4 blockquote::before{font-family:FontAwesome;content:"\201C";position:absolute;font-size:50px;opacity:.3;font-style:normal}.skin-4 blockquote::before{top:10px;left:20px}.skin-4 blockquote::after{content:"\201D";right:20px}.skin-4 .image-wrapper{position:relative;max-width:100%;text-align:center}.skin-4 img{width:100px;border-radius:50%}.skin-4 .detail-wrapper{text-align:center}.skin-2 .designation,.skin-2 .title,.skin-4 .rating-wrapper{padding:5px 0}.skin-4 .rating-wrapper{color:#690a69}.skin-4 .title{font-weight:800;color:#000}.skin-3.testimonial-wrapper{display:flex;flex-direction:row;background-color:#9c989821;box-shadow:0 0 5px rgba(0,0,0,.15);color:#000;overflow:hidden}.skin-3 .content-section{display:flex;flex-direction:column;align-self:center}.skin-3 .content-wrapper{padding:10px;position:relative}.skin-2 i.after-content,.skin-3 i.before-content{position:absolute}.skin-3 i.before-content{top:10px;left:20px}.skin-3 i.after-content{bottom:10px;right:20px}.skin-3 blockquote{position:relative;font-size:18px;padding:10px;font-weight:500;text-align:left;margin:0;line-height:1.6em;font-style:italic}.skin-3 blockquote::after,.skin-3 blockquote::before{font-family:FontAwesome;content:"\201C";position:absolute;font-size:50px;opacity:.3;font-style:normal}.skin-3 blockquote::before{top:10px;left:20px}.skin-3 blockquote::after{content:"\201D";right:20px}.skin-3 .image-wrapper{position:relative;max-width:30%;max-height:250px;text-align:center;align-self:center}.skin-3 img{width:100%}.testimonial-wrapper .skin-3 .eae-person-avatar{border-radius:50%}.skin-3 .detail-wrapper{text-align:left;padding-left:20px}.skin-3 .designation,.skin-3 .rating-wrapper,.skin-3 .title{padding:3px 0}.skin-3 .rating-wrapper{color:#800040}.skin-3 .title{font-weight:800}.eae-swiper-outer-wrapper .swiper-button-prev{-webkit-mask:url(arrow-left.svg) no-repeat 100% 100%;mask:url(arrow-left.svg) no-repeat 100% 100%;-webkit-mask-size:cover;mask-size:cover;background-image:none;background-color:#007aff;transform:translateY(-50%);margin-top:0}.eae-swiper-outer-wrapper .swiper-container-rtl .swiper-button-prev{-webkit-mask:url(arrow-right.svg) no-repeat 100% 100%;mask:url(arrow-right.svg) no-repeat 100% 100%}.eae-swiper-outer-wrapper .swiper-button-next{-webkit-mask:url(arrow-right.svg) no-repeat 100% 100%;mask:url(arrow-right.svg) no-repeat 100% 100%;-webkit-mask-size:cover;mask-size:cover;background-image:none;background-color:#007aff;transform:translateY(-50%);margin-top:0}.eae-swiper-outer-wrapper .swiper-container-rtl .swiper-button-next{-webkit-mask:url(arrow-left.svg) no-repeat 100% 100%;mask:url(arrow-left.svg) no-repeat 100% 100%}.elementor-widget-wts-testimonial-slider .eae-swiper-outer-wrapper .swiper-button-next,.elementor-widget-wts-testimonial-slider .eae-swiper-outer-wrapper .swiper-button-prev{-webkit-mask:none;mask:none;-webkit-mask-size:unset;mask-size:unset;background-image:none;background-color:unset;width:auto;height:auto;transform:translateY(-50%);margin-top:0}.swiper-container .swiper-button-next i,.swiper-container .swiper-button-prev i{width:1em;height:1em;text-align:center;position:relative}.elementor-widget-wts-testimonial-slider .eae-swiper-outer-wrapper .eae-swiper-button-wrapper{position:absolute;height:auto;line-height:0}.eae-hpos-right.eae-vpos-top .eae-swiper-button-wrapper{bottom:auto;top:0;width:auto;right:0}.eae-vpos-top.eae-hpos-left .eae-swiper-button-wrapper{bottom:auto;top:0;width:auto;left:0}.eeae-hpos-right.eae-vpos-bottom .eae-swiper-button-wrapper{bottom:0;top:auto;width:auto;right:0}.eae-vpos-bottom.eae-hpos-left .eae-swiper-button-wrapper{bottom:0;top:auto;width:auto;left:0}.eae-hpos-right.eae-vpos-middle .eae-swiper-button-wrapper{bottom:auto;top:50%;width:auto;right:0}.eae-hpos-left.eae-vpos-middle .eae-swiper-button-wrapper{bottom:auto;top:50%;width:auto;left:0}.eae-hpos-left .swiper-button-next,.eae-hpos-left .swiper-button-prev,.eae-hpos-right .swiper-button-next,.eae-hpos-right .swiper-button-prev{position:relative;display:inline-block;right:auto;left:auto}.eae-hpos-right.eae-vpos-bottom .swiper-button-next,.eae-hpos-right.eae-vpos-bottom .swiper-button-prev{top:auto;bottom:0;transform:unset}.eae-hpos-right.eae-vpos-top .swiper-button-next,.eae-hpos-right.eae-vpos-top .swiper-button-prev{top:0;bottom:auto;transform:unset}.eae-hpos-left.eae-vpos-top .swiper-button-next,.eae-hpos-left.eae-vpos-top .swiper-button-prev{top:0;bottom:auto;transform:unset}.eae-hpos-left.eae-vpos-bottom .swiper-button-next,.eae-hpos-left.eae-vpos-bottom .swiper-button-prev{top:auto;bottom:0;transform:unset}.eae-hpos-center.eae-vpos-bottom .swiper-button-next,.eae-hpos-center.eae-vpos-bottom .swiper-button-prev{top:auto;bottom:0;transform:unset}.eae-hpos-center.eae-vpos-top .swiper-button-next,.eae-hpos-center.eae-vpos-top .swiper-button-prev{top:0;bottom:auto;transform:unset}@media all and (max-width:900px){.mfp-arrow{-webkit-transform:scale(.75);transform:scale(.75)}.mfp-arrow-left{-webkit-transform-origin:0;transform-origin:0}.mfp-arrow-right{-webkit-transform-origin:100%;transform-origin:100%}.mfp-container{padding-left:6px;padding-right:6px}}.eae-info-circle{position:relative;width:90%;margin:0 auto;border-radius:50%;display:block}.eae-info-circle:before{content:"";display:block;position:absolute;top:4%;left:4%;width:92%;height:92%;border-radius:50%;z-index:1;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;pointer-events:none}.eae-info-circle:after{content:"";display:block;padding-top:100%}.eae-info-circle .eae-ic-icon-wrap{position:absolute;display:inline-block;top:50%;left:50%;z-index:2;line-height:1em;vertical-align:middle;overflow:hidden;max-width:100%}.eae-info-circle .eae-info-circle-item{top:0;left:0;width:100%;height:100%;display:block}.eae-info-circle .eae-info-circle-item.eae-active .eae-info-circle-item__content-wrap{visibility:visible;opacity:1;display:flex}.eae-info-circle .eae-info-circle-item__content-wrap{visibility:visible;display:none;height:91%;width:91%;opacity:0;top:50%;transform:translateY(-50%) translateX(-50%);position:absolute;left:50%;border-radius:50%;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.eae-info-circle .eae-info-circle-item__content-wrap:before{content:"";display:inline-block;height:100%;vertical-align:middle}.eae-info-circle .eae-info-circle-item__content{display:inline-block;top:50%;transform:translateY(-50%) translateX(-50%);position:absolute;left:50%;vertical-align:middle;z-index:1;max-height:100%;overflow:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;text-align:center;width:75%}@media screen and (max-width:767px){.eae-info-circle.eae-info-circle .eae-info-circle-item__content-wrap:before{display:none}.eae-info-circle:after,.eae-info-circle:before{display:none}.eae-info-circle{width:100%!important}.eae-info-circle-wrapper:after,.eae-info-circle-wrapper:before{display:none}.eae-info-circle .eae-ic-icon-wrap{display:block;text-align:center;position:relative!important;left:unset!important;margin-left:0!important;margin-top:0!important;margin-bottom:10px}.eae-info-circle-item{position:relative!important;border-radius:0!important;padding:0;margin:10px 0}.eae-info-circle .eae-info-circle-item__content-wrap{visibility:visible;opacity:1!important;display:flex!important;border-radius:0!important;border:none!important;margin:0!important;padding-right:0!important;padding-left:0!important;padding-bottom:0!important;width:100%;height:auto;line-height:1.5em;position:relative;top:unset;left:unset;transform:unset}.eae-info-circle .eae-info-circle-item__content{position:relative;top:unset;left:unset;transform:unset;width:100%;padding:10px}}.eae-icon-wrap i{height:1.25em;width:1.25em;line-height:1.25em;display:block}.eae-icon-wrap i img{top:50%;left:50%;transform:translateX(-50%) translateY(-50%);position:absolute}.eae-icon{display:inline-block;text-align:center;vertical-align:middle;max-width:100%;overflow:hidden;padding:10px}.eae-icon-shape-circle:not(.elementor-element){border-radius:50%}.eae-icon-view-framed:not(.elementor-element){border-width:1px;border-style:solid}.eae-icon-wrapper{display:flex}.eae-icon-wrapper .eae-icon{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);line-height:1}.eae-timeline{position:relative;display:inline-block;width:100%}.eae-timline-progress-bar{width:4px;background-color:#f45b69;top:0;bottom:50px;position:absolute;transform:translateX(-50%)}.eae-timeline-item{position:relative;display:flex;flex-direction:row;padding-bottom:50px}.eae-timeline-item:last-child{padding-bottom:0!important}.eae-tl-top .eae-timeline-item{align-items:flex-start}.eae-tl-top .eae-tl-item-content::before{top:10px}.eae-timeline-item.image-position-row .eae-tl-item-image,.eae-timeline-item.image-position-row-reverse .eae-tl-item-image{margin-top:0;margin-bottom:0}.eae-tl-item-meta-wrapper-inner{display:none}.eae-tl-bottom .eae-timeline-item{align-items:flex-end}.eae-tl-bottom .eae-tl-item-content::before{bottom:10px}.eae-tl-center .eae-timeline-item{align-items:center}.eae-tl-center .eae-tl-item-content::before{bottom:calc(50% - 5px)}.eae-layout-center .eae-timline-progress-bar{left:50%}.eae-layout-center .eae-timeline-item:nth-child(odd){flex-direction:row-reverse}.eae-layout-center .eae-timeline-item:nth-child(odd) .eae-tl-item-meta-wrapper{margin-right:0;margin-left:0;justify-content:flex-start}body.rtl[data-elementor-device-mode=tablet] .eae-layout-center .eae-timeline-item:nth-child(even) .eae-tl-content-wrapper,body:not(.rtl)[data-elementor-device-mode=tablet] .eae-layout-center .eae-timeline-item:nth-child(odd) .eae-tl-content-wrapper{padding-right:20px;padding-left:0}body.rtl[data-elementor-device-mode=tablet] .eae-layout-center .eae-timeline-item:nth-child(odd) .eae-tl-content-wrapper,body:not(.rtl)[data-elementor-device-mode=tablet] .eae-layout-center .eae-timeline-item:nth-child(even) .eae-tl-content-wrapper{padding-right:0;padding-left:20px}body:not(.rtl) .eae-layout-left .eae-tl-content-wrapper{padding-right:10px;padding-left:20px}body.rtl .eae-layout-left .eae-tl-content-wrapper{padding-right:20px;padding-left:10px}.eae-layout-left .eae-timline-progress-bar{display:none}.eae-layout-left .eae-tl-item-meta-wrapper{display:none}.eae-layout-left .eae-tl-item-meta-wrapper-inner{display:block}.eae-layout-right .eae-timline-progress-bar{display:none}body:not(.rtl) .eae-layout-right .eae-tl-content-wrapper{padding-right:20px;padding-left:10px}body.rtl .eae-layout-right .eae-tl-content-wrapper{padding-right:10px;padding-left:20px}.eae-layout-right .eae-tl-icon-wrapper{order:3}.eae-layout-right .eae-tl-item-meta-wrapper{display:none}.eae-layout-right .eae-tl-item-meta-wrapper-inner{display:block}.eae-tl-item-meta-wrapper{flex-grow:1;order:0;flex-basis:50%;flex-direction:initial;justify-content:flex-end;display:flex;align-items:center;margin-right:0}.eae-tl-item-meta{padding:0 20px}.eae-tl-icon-wrapper{height:auto;width:auto;flex-grow:0;flex-shrink:0;order:1;margin-left:0;margin-right:0;min-width:10px;min-height:10px;border-radius:999px;position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.eae-tl-content-wrapper{flex-grow:1;order:2;flex-basis:50%;position:relative;padding-right:0;padding-left:20px}.eae-tl-item-content{background:#f4f4f4;padding:25px;overflow:hidden;text-align:center;display:flex;flex-direction:row}.eae-tl-content{display:inline-block;position:relative;padding:10px;width:100%;color:#000}.eae-timeline-item.custom-image-style-yes.image-position-row .eae-content-inner,.eae-timeline-item.custom-image-style-yes.image-position-row-reverse .eae-content-inner,.image-position-row .eae-timeline .eae-timeline-item:not(.custom-image-style-yes) .eae-content-inner,.image-position-row-reverse .eae-timeline .eae-timeline-item:not(.custom-image-style-yes) .eae-content-inner{position:relative;left:50%;top:50%;transform:translate(-50%,-50%);line-height:1;width:100%}.custom-image-style-.image-position-row .eae-content-inner,.custom-image-style-.image-position-row-reverse .eae-content-inner,.custom-image-style-no.image-position-row .eae-content-inner,.custom-image-style-no.image-position-row-reverse .eae-content-inner{left:unset;top:unset;transform:unset}.eae-tl-item-image{display:inline-block}.image-position-row .eae-tl-item-image img,.image-position-row-reverse .eae-tl-item-image img{object-fit:cover;height:100%!important}.image-position-row .eae-tl-item-image,.image-position-row-reverse .eae-tl-item-image{margin:0}.image-position-column .eae-tl-item-image{margin:auto}.custom-image-style-.image-position-column .eae-tl-item-image,.custom-image-style-no.image-position-column .eae-tl-item-image{margin:0 auto}.eae-pb-inner-line{width:100%;background-color:#3d5ac3}.eae-tl-item-content::before{content:"";position:absolute;width:0;height:0;border-style:solid;border-width:8px 16px 8px 0;border-color:transparent #f4f4f4 transparent transparent}.eae-icon-wrapper{display:flex}.elementor-widget-bpel-timeline .eae-icon-wrapper{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);line-height:1}.eae-tl-read-more{display:inline-block;padding:5px;border:2px solid #000}.image-position-row .eae-timeline.eae-timeline-alternate-yes .eae-timeline-item:nth-child(odd):not(.custom-image-style-yes) .eae-tl-item-content{flex-direction:row-reverse!important}.image-position-row-reverse .eae-timeline.eae-timeline-alternate-yes .eae-timeline-item:nth-child(odd):not(.custom-image-style-yes) .eae-tl-item-content{flex-direction:row!important}@media screen and (min-width:1024px){.eae-layout-center .eae-timeline-item:nth-child(odd) .eae-tl-content-wrapper,body.rtl .eae-layout-center .eae-timeline-item:nth-child(even) .eae-tl-content-wrapper{padding-right:20px;padding-left:0}.eae-layout-center .eae-timeline-item:nth-child(even) .eae-tl-content-wrapper,body.rtl .eae-layout-center .eae-timeline-item:nth-child(odd) .eae-tl-content-wrapper{padding-right:0;padding-left:20px}.eae-layout-center .eae-timeline-item:nth-child(odd) .eae-tl-item-content::before,.eae-layout-right .eae-tl-item-content::before,body.rtl .eae-layout-center .eae-timeline-item:nth-child(even) .eae-tl-item-content::before,body.rtl .eae-layout-left .eae-tl-item-content::before{right:4px;left:unset;border-width:8px 0 8px 16px;border-color:transparent transparent transparent #f4f4f4}.eae-layout-center .eae-timeline-item:nth-child(even) .eae-tl-item-content::before,.eae-layout-left .eae-tl-item-content::before,body.rtl .eae-layout-center .eae-timeline-item:nth-child(odd) .eae-tl-item-content::before,body.rtl .eae-layout-right .eae-tl-item-content::before{left:4px;right:unset;border-width:8px 16px 8px 0;border-color:transparent #f4f4f4 transparent transparent}}@media screen and (max-width:1023px) and (min-width:768px){.image-position-row .eae-timeline.eae-timeline-alternate-yes .eae-timeline-item:nth-child(odd):not(.custom-image-style-yes) .eae-tl-item-content{flex-direction:row-reverse!important}.image-position-row-reverse .eae-timeline.eae-timeline-alternate-yes .eae-timeline-item:nth-child(odd):not(.custom-image-style-yes) .eae-tl-item-content{flex-direction:row!important}.eae-tl-res-style-mobile-tablet .eae-tl-item-meta-wrapper{display:none}.eae-tl-res-style-mobile-tablet .eae-tl-item-meta-wrapper-inner{display:block}.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-left .eae-timeline-item{flex-direction:row!important}.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-right .eae-timeline-item{flex-direction:row-reverse!important}.eae-layout-center.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-left .eae-timeline-item .eae-tl-item-content::before,.eae-timeline.eae-layout-center.eae-tl-res-style-mobile .eae-timeline-item:nth-child(even) .eae-tl-item-content::before,body.rtl .eae-layout-center.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-right .eae-timeline-item .eae-tl-item-content::before,body.rtl .eae-layout-right .eae-timeline-item .eae-tl-item-content::before,body.rtl .eae-layout-right .eae-tl-item-content::before,body.rtl .eae-timeline.eae-layout-center.eae-tl-res-style-mobile .eae-timeline-item:nth-child(odd) .eae-tl-item-content::before,body:not(.rtl) .eae-layout-left .eae-timeline-item .eae-tl-item-content::before,body:not(.rtl) .eae-layout-left .eae-tl-item-content::before{left:4px!important;border-width:8px 16px 8px 0!important;border-color:transparent #f4f4f4 transparent transparent!important}body.rtl .eae-timeline.eae-layout-center.eae-tl-res-style-mobile .eae-timeline-item:nth-child(odd) .eae-tl-item-content::before{left:4px!important;right:unset!important;border-width:8px 16px 8px 0!important;border-color:transparent #f4f4f4 transparent transparent!important}.eae-timeline.eae-layout-center.eae-tl-res-style-mobile .eae-timeline-item:nth-child(odd) .eae-tl-item-content::before,body.rtl .eae-layout-center.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-left .eae-timeline-item .eae-tl-item-content::before,body.rtl .eae-layout-left .eae-timeline-item .eae-tl-item-content::before,body.rtl .eae-layout-left .eae-tl-item-content::before,body.rtl .eae-timeline.eae-layout-center.eae-tl-res-style-mobile .eae-timeline-item:nth-child(even) .eae-tl-item-content::before,body:not(.rtl) .eae-layout-center.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-right .eae-timeline-item .eae-tl-item-content::before,body:not(.rtl) .eae-layout-right .eae-timeline-item .eae-tl-item-content::before,body:not(.rtl) .eae-layout-right .eae-tl-item-content::before,body:not(.rtl) .eae-tl-res-style-mobile-tablet.eae-tl-res-layout-right .eae-timeline-item .eae-tl-item-content::before{right:4px!important;border-width:8px 0 8px 16px!important;border-color:transparent transparent transparent #f4f4f4!important}.eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-left .eae-timeline-item .eae-tl-content-wrapper,body.rtl .eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-right .eae-timeline-item .eae-tl-content-wrapper{padding-right:0!important;padding-left:20px!important}.eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-right .eae-timeline-item .eae-tl-content-wrapper,body.rtl .eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-left .eae-timeline-item .eae-tl-content-wrapper{padding-right:20px!important;padding-left:0!important}.eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-left .eae-timline-progress-bar{left:13px}.eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-right .eae-timline-progress-bar{left:calc(100% - 13px)}}@media screen and (max-width:767px){.eae-tl-item-meta-wrapper{display:none}.eae-tl-item-meta-wrapper-inner{display:block}.elementor-widget-bpel-timeline:not(.image-position-column) .eae-timeline .eae-tl-item-content{flex-direction:column-reverse!important}.eae-tl-item-image,.elementor-widget-bpel-timeline:not(.image-position-column) .eae-tl-content{width:100%!important}.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-left .eae-timeline-item,.eae-tl-res-style-mobile.eae-tl-res-layout-left .eae-timeline-item{flex-direction:row!important}.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-right .eae-timeline-item,.eae-tl-res-style-mobile.eae-tl-res-layout-right .eae-timeline-item{flex-direction:row-reverse!important}.eae-timeline.eae-layout-center.eae-tl-center.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-left .eae-timeline-item:nth-child(odd) .eae-tl-item-content::before,.eae-timeline.eae-layout-center.eae-tl-center.eae-tl-res-style-mobile.eae-tl-res-layout-left .eae-timeline-item:nth-child(odd) .eae-tl-item-content::before,body.rtl .eae-timeline.eae-layout-right .eae-timeline-item .eae-tl-item-content::before,body.rtl .eae-timeline.eae-tl-res-style-mobile.eae-tl-res-layout-right .eae-timeline-item .eae-tl-item-content::before,body:not(.rtl) .eae-layout-left .eae-timeline-item .eae-tl-item-content::before,body:not(.rtl) .eae-tl-res-style-mobile-tablet.eae-tl-res-layout-left .eae-timeline-item .eae-tl-item-content::before,body:not(.rtl) .eae-tl-res-style-mobile.eae-tl-res-layout-left .eae-timeline-item .eae-tl-item-content::before{left:4px!important;border-width:8px 16px 8px 0!important;border-color:transparent #f4f4f4 transparent transparent!important}body.rtl .eae-layout-left .eae-timeline-item .eae-tl-item-content::before,body.rtl .eae-tl-res-style-mobile.eae-tl-res-layout-left .eae-timeline-item .eae-tl-item-content::before,body:not(.rtl) .eae-layout-right .eae-timeline-item .eae-tl-item-content::before,body:not(.rtl) .eae-tl-res-style-mobile-tablet.eae-tl-res-layout-right .eae-timeline-item .eae-tl-item-content::before,body:not(.rtl) .eae-tl-res-style-mobile.eae-tl-res-layout-right .eae-timeline-item .eae-tl-item-content::before{right:4px!important;border-width:8px 0 8px 16px!important;border-color:transparent transparent transparent #f4f4f4!important}.eae-timeline.eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-right .eae-timeline-item .eae-tl-content-wrapper,body:not(.rtl) .eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-left .eae-timeline-item .eae-tl-content-wrapper body.rtl .eae-timeline.eae-tl-res-style-mobile.eae-layout-center.eae-tl-res-layout-right .eae-timeline-item .eae-tl-content-wrapper,body:not(.rtl) .eae-tl-res-style-mobile.eae-layout-center.eae-tl-res-layout-left .eae-timeline-item .eae-tl-content-wrapper{padding-right:0!important;padding-left:20px!important}body.rtl .eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-left .eae-timeline-item .eae-tl-content-wrapper,body.rtl .eae-tl-res-style-mobile.eae-layout-center.eae-tl-res-layout-left .eae-timeline-item .eae-tl-content-wrapper,body:not(.rtl) .eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-right .eae-timeline-item .eae-tl-content-wrapper,body:not(.rtl) .eae-tl-res-style-mobile.eae-layout-center.eae-tl-res-layout-right .eae-timeline-item .eae-tl-content-wrapper{padding-right:20px!important;padding-left:0!important}.eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-left .eae-timline-progress-bar,.eae-tl-res-style-mobile.eae-layout-center.eae-tl-res-layout-left .eae-timline-progress-bar{left:13px}.eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-right .eae-timline-progress-bar,.eae-tl-res-style-mobile.eae-layout-center.eae-tl-res-layout-right .eae-timline-progress-bar{left:calc(100% - 13px)}body.rtl .eae-layout-center.eae-timeline.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-right .eae-timeline-item .eae-tl-content-wrapper .eae-tl-item-content::before{left:4px;right:unset}body.rtl .eae-layout-center.eae-timeline.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-left .eae-timeline-item .eae-tl-content-wrapper .eae-tl-item-content::before{left:unset;right:4px;border-width:8px 0 8px 16px!important;border-color:transparent transparent transparent #f4f4f4!important}}[data-element_type="eae-evergreen-timer.skin1"] .eae-evergreen-wrapper{display:block;text-align:center}[data-element_type="eae-evergreen-timer.skin1"] #eaeclockdiv{font-family:sans-serif;color:#fff;display:inline-block;font-weight:100;text-align:center;font-size:30px}[data-element_type="eae-evergreen-timer.skin1"] .eae-time-wrapper{padding:10px;border-radius:3px;background:#00bf96;display:inline-block;overflow:hidden}[data-element_type="eae-evergreen-timer.skin1"] #eaeclockdiv div>span{padding:15px;width:100%;background:#00816a;display:inline-block}[data-element_type="eae-evergreen-timer.skin1"] .smalltext{padding:7px;font-size:16px}[data-element_type="eae-evergreen-timer.skin1"] .eae-egt-hide{display:none}.eae-egt-message{display:none}@media screen and (max-width:767px){[data-element_type="eae-evergreen-timer.skin1"] #eaeclockdiv div>span{padding:5px}[data-element_type="eae-evergreen-timer.skin1"] .eae-time-wrapper{padding:5px}}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}[data-element_type="eae-evergreen-timer.skin2"] .eae-evergreen-wrapper{display:inline-block;width:100%;text-align:center;margin:auto}[data-element_type="eae-evergreen-timer.skin2"] .timer-container{display:inline-block}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper a{cursor:pointer;text-decoration:none;color:#ccc}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper a:hover{color:#fff}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul{list-style:none}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper.clearfix:after,[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper.clearfix:before{content:" ";display:table}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper.clearfix:after{clear:both}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper{font:normal 11px "Helvetica Neue",Helvetica,sans-serif;-webkit-user-select:none}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-meridium{background:0 0!important;box-shadow:0 0 0!important;font-size:36px!important}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-meridium a{color:#313333}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper{text-align:center;position:relative;width:100%;margin:1em}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper:after,[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper:before{content:" ";display:table}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper:after{clear:both}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul{position:relative;float:left;margin:5px;width:60px;height:90px;font-size:80px;font-weight:700;line-height:87px;border-radius:6px;background:#000}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li{z-index:1;position:absolute;left:0;top:0;width:100%;height:100%;line-height:87px;text-decoration:none!important}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li:first-child{z-index:2}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li a{display:block;height:100%;-webkit-perspective:200px;-moz-perspective:200px;perspective:200px;margin:0!important;overflow:visible!important;cursor:default!important}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li a div{z-index:1;position:absolute;left:0;width:100%;height:50%;font-size:80px;overflow:hidden;outline:1px solid transparent}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li a div .shadow{position:absolute;width:100%;height:100%;z-index:2}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li a div.up{-webkit-transform-origin:50% 100%;-moz-transform-origin:50% 100%;-ms-transform-origin:50% 100%;-o-transform-origin:50% 100%;transform-origin:50% 100%;top:0}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li a div.up:after{content:"";position:absolute;top:44px;left:0;z-index:5;width:100%;height:3px;background-color:#000;background-color:rgba(0,0,0,.4)}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li a div.down{-webkit-transform-origin:50% 0;-moz-transform-origin:50% 0;-ms-transform-origin:50% 0;-o-transform-origin:50% 0;transform-origin:50% 0;bottom:0;border-bottom-left-radius:6px;border-bottom-right-radius:6px}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li a div div.inn{position:absolute;left:0;z-index:1;width:100%;height:200%;color:#ccc;text-shadow:0 1px 2px #000;text-align:center;background-color:#333;border-radius:6px;font-size:70px}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li a div.up div.inn{top:0}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li a div.down div.inn{bottom:0}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul.play li.flip-clock-before{z-index:3}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper .flip{box-shadow:0 2px 5px rgba(0,0,0,.7)}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul.play li.flip-clock-active{-webkit-animation:asd 10ms .49s linear both;-moz-animation:asd 10ms .49s linear both;animation:asd 10ms .49s linear both;z-index:5}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-divider{float:left;display:inline-block;position:relative;width:20px;height:100px}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-divider:first-child{width:0}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-dot{display:block;background:#323434;width:10px;height:10px;position:absolute;border-radius:50%;box-shadow:0 0 5px rgba(0,0,0,.5);left:5px}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-divider .flip-clock-label{position:absolute;top:-1.5em;right:-86px;color:#000;text-shadow:none}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-divider.minutes .flip-clock-label{right:-88px}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-divider.seconds .flip-clock-label{right:-91px}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-dot.top{top:30%}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-dot.bottom{bottom:30%}@-webkit-keyframes asd{0%{z-index:2}100%{z-index:4}}@-moz-keyframes asd{0%{z-index:2}100%{z-index:4}}@-o-keyframes asd{0%{z-index:2}100%{z-index:4}}@keyframes asd{0%{z-index:2}100%{z-index:4}}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul.play li.flip-clock-active .down{z-index:2;-webkit-animation:turn .5s .5s linear both;-moz-animation:turn .5s .5s linear both;animation:turn .5s .5s linear both}@-webkit-keyframes turn{0%{-webkit-transform:rotateX(90deg)}100%{-webkit-transform:rotateX(0)}}@-moz-keyframes turn{0%{-moz-transform:rotateX(90deg)}100%{-moz-transform:rotateX(0)}}@-o-keyframes turn{0%{-o-transform:rotateX(90deg)}100%{-o-transform:rotateX(0)}}@keyframes turn{0%{transform:rotateX(90deg)}100%{transform:rotateX(0)}}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul.play li.flip-clock-before .up{z-index:2;-webkit-animation:turn2 .5s linear both;-moz-animation:turn2 .5s linear both;animation:turn2 .5s linear both}@-webkit-keyframes turn2{0%{-webkit-transform:rotateX(0)}100%{-webkit-transform:rotateX(-90deg)}}@-moz-keyframes turn2{0%{-moz-transform:rotateX(0)}100%{-moz-transform:rotateX(-90deg)}}@-o-keyframes turn2{0%{-o-transform:rotateX(0)}100%{-o-transform:rotateX(-90deg)}}@keyframes turn2{0%{transform:rotateX(0)}100%{transform:rotateX(-90deg)}}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li.flip-clock-active{z-index:3}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul.play li.flip-clock-before .up .shadow{background:-moz-linear-gradient(top,rgba(0,0,0,.1) 0,#000 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,rgba(0,0,0,.1)),color-stop(100%,#000));background:linear,top,rgba(0,0,0,.1) 0,#000 100%;background:-o-linear-gradient(top,rgba(0,0,0,.1) 0,#000 100%);background:-ms-linear-gradient(top,rgba(0,0,0,.1) 0,#000 100%);background:linear,to bottom,rgba(0,0,0,.1) 0,#000 100%;-webkit-animation:show .5s linear both;-moz-animation:show .5s linear both;animation:show .5s linear both}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul.play li.flip-clock-active .up .shadow{background:-moz-linear-gradient(top,rgba(0,0,0,.1) 0,#000 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,rgba(0,0,0,.1)),color-stop(100%,#000));background:linear,top,rgba(0,0,0,.1) 0,#000 100%;background:-o-linear-gradient(top,rgba(0,0,0,.1) 0,#000 100%);background:-ms-linear-gradient(top,rgba(0,0,0,.1) 0,#000 100%);background:linear,to bottom,rgba(0,0,0,.1) 0,#000 100%;-webkit-animation:hide .5s .3s linear both;-moz-animation:hide .5s .3s linear both;animation:hide .5s .3s linear both}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul.play li.flip-clock-before .down .shadow{background:-moz-linear-gradient(top,#000 0,rgba(0,0,0,.1) 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#000),color-stop(100%,rgba(0,0,0,.1)));background:linear,top,#000 0,rgba(0,0,0,.1) 100%;background:-o-linear-gradient(top,#000 0,rgba(0,0,0,.1) 100%);background:-ms-linear-gradient(top,#000 0,rgba(0,0,0,.1) 100%);background:linear,to bottom,#000 0,rgba(0,0,0,.1) 100%;-webkit-animation:show .5s linear both;-moz-animation:show .5s linear both;animation:show .5s linear both}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul.play li.flip-clock-active .down .shadow{background:-moz-linear-gradient(top,#000 0,rgba(0,0,0,.1) 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#000),color-stop(100%,rgba(0,0,0,.1)));background:linear,top,#000 0,rgba(0,0,0,.1) 100%;background:-o-linear-gradient(top,#000 0,rgba(0,0,0,.1) 100%);background:-ms-linear-gradient(top,#000 0,rgba(0,0,0,.1) 100%);background:linear,to bottom,#000 0,rgba(0,0,0,.1) 100%;-webkit-animation:hide .5s .3s linear both;-moz-animation:hide .5s .3s linear both;animation:hide .5s .2s linear both}@-webkit-keyframes show{0%{opacity:0}100%{opacity:1}}@-moz-keyframes show{0%{opacity:0}100%{opacity:1}}@-o-keyframes show{0%{opacity:0}100%{opacity:1}}@keyframes show{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes hide{0%{opacity:1}100%{opacity:0}}@-moz-keyframes hide{0%{opacity:1}100%{opacity:0}}@-o-keyframes hide{0%{opacity:1}100%{opacity:0}}@keyframes hide{0%{opacity:1}100%{opacity:0}}@media screen and (max-width:767px){[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-divider{width:15px}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-dot{height:5px;width:5px}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul{height:40px}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-divider{height:50px}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li{line-height:37px}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li a div div.inn{font-size:24px}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul{margin:2px}}[data-element_type="eae-evergreen-timer.skin3"] #timer{font-family:sans-serif;color:#fff;display:inline-block;font-weight:100;text-align:center;font-size:30px}[data-element_type="eae-evergreen-timer.skin3"] .desc{display:flex;justify-content:center}[data-element_type="eae-evergreen-timer.skin3"].eae-egt-content-align-right .desc{justify-content:flex-end}[data-element_type="eae-evergreen-timer.skin3"].eae-egt-content-align-left .desc{justify-content:flex-start}[data-element_type="eae-evergreen-timer.skin3"] .desc .egt-time-text{display:inline-block;padding:0 50px 0 50px}[data-element_type="eae-evergreen-timer.skin3"] .eae-time-wrapper{padding:50px;border-radius:3px;background:#00bf96;display:inline-block;overflow:hidden;margin:5px;line-height:1em}[data-element_type="eae-evergreen-timer.skin3"] #timer span:nth-child(1){background:khaki}[data-element_type="eae-evergreen-timer.skin3"] #timer span:nth-child(2){background:#cd5c5c}[data-element_type="eae-evergreen-timer.skin3"] #timer span:nth-child(3){background:#5f9ea0}[data-element_type="eae-evergreen-timer.skin3"] #timer span:nth-child(4){background:#6495ed}[data-element_type="eae-evergreen-timer.skin3"] .fade{animation:flip .7s ease forwards}@keyframes flip{0%{transform:rotateY(0) scaleY(1.1);opacity:.5}50%{transform:rotateY(180deg) scaleY(1.3);opacity:0}100%{transform:rotateY(0);opacity:1}}@media screen and (max-width:767px){[data-element_type="eae-evergreen-timer.skin3"] #timer span{font-size:22px}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-divider .flip-clock-label{top:-1.5em;right:-42px}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-divider.minutes .flip-clock-label{right:-48px}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-divider.seconds .flip-clock-label{right:-51px}}[data-element_type="eae-evergreen-timer.skin4"] .eae-evergreen-wrapper{width:100%}[data-element_type="eae-evergreen-timer.skin4"] .container{margin:0 auto}[data-element_type="eae-evergreen-timer.skin4"] .special{position:relative;width:840px;height:47px}[data-element_type="eae-evergreen-timer.skin4"] #counter{position:absolute;z-index:4000}[data-element_type="eae-evergreen-timer.skin4"] .digit-separator{position:relative;float:left;width:17px;height:44px;overflow:hidden;background-image:url(../digit-sep-svg.svg);background-repeat:no-repeat;background-position:0 0;background-color:#4054b2}[data-element_type="eae-evergreen-timer.skin4"] .digit{background-image:url(../digits-svg-alpha.svg);background-color:#4054b2}.eae-ct-wrapper *{box-sizing:border-box;margin:0;outline:0}article.eae-ct-wrapper{width:100%;max-width:1000px;margin:0 auto;position:relative}.eae-ct-wrapper tbody tr.eae-ct-header td,.eae-ct-wrapper th{position:relative}.eae-ct-wrapper ul{display:none;top:0;z-index:10;padding-bottom:14px}.eae-ct-wrapper li{list-style:none;flex:1;position:relative}.eae-ct-wrapper li:hover{cursor:pointer}.eae-ct-wrapper .eae-ct-heading{width:100%;padding:10px;background:#fff;font-size:20px;font-weight:700;height:60px;color:#999;text-align:center}.eae-ct-wrapper li.eae-ct-heading .eae-ct-heading-inner{position:absolute;align-self:center;top:50%;left:50%;transform:translate(-50%,-50%);width:100%}.eae-ct-wrapper li.eae-ct-heading.active{background:#f5f5f5}.eae-ct-wrapper table{border-collapse:collapse;table-layout:fixed;width:100%}.eae-ct-wrapper th{background:#f5f5f5;display:none}.eae-ct-wrapper td,.eae-ct-wrapper th{height:53px;vertical-align:middle}.eae-ct-wrapper table{border:none}.eae-ct-wrapper table td,.eae-ct-wrapper table th{border:none}.eae-ct-wrapper table tr td:first-child,.eae-ct-wrapper table tr td:last-child,.eae-ct-wrapper td,.eae-ct-wrapper th{padding:10px;empty-cells:show}.eae-ct-wrapper td,.eae-ct-wrapper th{text-align:center}.eae-ct-wrapper td+td,.eae-ct-wrapper th+th{text-align:center}.eae-ct-wrapper tr:first-child{background:0 0!important}.eae-ct-wrapper ul li:nth-child(1){display:table-cell}.eae-ct-wrapper tr td:nth-child(2){display:table-cell}.eae-ct-wrapper td:nth-child(1){display:table-cell}.eae-ct-wrapper td{display:none}.eae-ct-wrapper .sep{background:#f5f5f5;font-weight:700}.eae-ct-price-wrapper{display:flex;justify-content:center}.eae-ct-tt-type-icon .eae-ct-feature .tooltip{float:right}.eae-ct-wrapper .tooltiptext::before{content:"";border-width:5px 5px 0 5px;border-color:#fff;border-left-color:transparent;border-right-color:transparent;border-bottom-color:transparent;bottom:-10px;width:0;height:0;border-style:solid;position:absolute;margin:5px;left:42%}.eae-ct-wrapper .eae-ct-price{font-size:28px;font-weight:700;line-height:1em}.eae-ct-wrapper .eae-ct-currency{align-self:flex-start;margin-right:3px}.eae-ct-wrapper .eae-ct-fractional-price{align-self:flex-start;margin-left:3px}.eae-ct-wrapper .eae-ct-duration{align-self:flex-start}.eae-ct-wrapper .eae-ct-original-price{margin-right:5px;text-decoration:line-through;align-self:flex-end}.eae-ct-wrapper .tick{font-size:18px;color:#2ca01c}.feature-heading-blank.eae-ct-wrapper .hide{border:unset!important;background:unset!important}.eae-ct-wrapper .hide.eae-ct-hide.eae-fbox-heading{border:0 solid #000}.eae-ct-ribbons-yes .eae-ct-ribbons-wrapper{position:absolute;top:0;width:100px;overflow:hidden;height:100px;z-index:998;padding:8px 12px}.eae-ct-ribbons-h-top.eae-ct-ribbons-yes .eae-ct-ribbons-wrapper{position:absolute;top:0;width:100%;overflow:hidden;height:50px;z-index:999;padding:8px 12px}.eae-ct-ribbons-h-top.eae-ct-ribbons-yes .eae-ct-ribbons-wrapper-top{background-color:rgba(63,195,135,.8);color:#fff;transform:translateY(-100%);position:absolute;width:100%;top:0;left:0}.eae-ct-ribbons-h-left.eae-ct-ribbons-yes .eae-ct-ribbons-wrapper{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);left:0;right:auto}.eae-ct-ribbons-h-right.eae-ct-ribbons-yes .eae-ct-ribbons-wrapper{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(90deg);left:auto;right:0}.eae-ct-ribbons-yes .eae-ct-ribbons-wrapper span.eae-ct-ribbons-inner{position:absolute;text-align:center;left:0;top:0;width:200%;-webkit-transform:translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg);-ms-transform:translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg);transform:translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg);margin-top:35px;font-size:13px;line-height:2;font-weight:800;text-transform:uppercase;background:rgba(63,195,135,.8);padding:8px 12px;color:#fff}.eae-ct-wrapper .tooltip{position:relative;display:inline-block}.eae-ct-wrapper .tooltip .tooltiptext{visibility:hidden;min-width:120px;background-color:#000;color:#fff;text-align:center;border-radius:6px;padding:5px 0;position:absolute;z-index:1;bottom:120%;left:50%;margin-left:-60px}.eae-ct-wrapper .tooltip:hover .tooltiptext{visibility:visible}.eae-ct-heading-tooltip{text-decoration-line:underline;text-decoration-style:dotted}.eae-ct-btn{padding:10px 15px 10px 15px;color:#fff;display:inline-block;line-height:1em}.eae-ct-btn:hover{color:#fff}.eae-ct-wrapper i.fa.fa-check,.eae-ct-wrapper i.fas.fa-check{color:#38f146}.eae-ct-wrapper i.fa.fa-close,.eae-ct-wrapper i.fas.fa-times{color:red}.button-heading-blank.eae-ct-wrapper tr:last-child td:first-child{background:0 0!important;border:none!important}.eae-ct-wrapper tr:last-child{background:0 0!important}tbody tr:nth-child(2){background:0 0!important}@media (min-width:767px){.eae-ct-wrapper .eae-ct-header,.eae-ct-wrapper td{width:330px}.eae-ct-wrapper td+td,.eae-ct-wrapper th+th{width:auto}}.eae-tab-format-all .eae-ct-wrapper ul{display:flex}.hide.eae-ct-hide{display:table-cell}@media (min-width:1023px){.eae-tab-format-all tbody tr.eae-ct-header{display:none}.eae-tab-format-mobile .eae-ct-wrapper td,.eae-tab-format-mobile .eae-ct-wrapper th,.eae-tab-format-tab-mob .eae-ct-wrapper td,.eae-tab-format-tab-mob .eae-ct-wrapper th{display:table-cell!important}.eae-tab-format-all .hide.eae-ct-hide{display:table-cell}.eae-tab-format-mobile .hide.eae-ct-hide,.eae-tab-format-tab-mob .hide.eae-ct-hide{display:none!important}}@media (max-width:1023px){.eae-tab-format-tab-mob .eae-ct-wrapper ul{display:flex}.eae-tab-format-all tbody tr.eae-ct-header,.eae-tab-format-tab-mob tbody tr.eae-ct-header{display:none}.eae-tab-format-all .hide.eae-ct-hide{display:table-cell}.eae-tab-format-tab-mob .hide.eae-ct-hide{display:table-cell}}@media (max-width:1023px) and (min-width:768px){.eae-tab-format-mobile .eae-ct-wrapper td,.eae-tab-format-mobile .eae-ct-wrapper th{display:table-cell!important}.eae-tab-format-all tbody tr.eae-ct-header,.eae-tab-format-tab-mob tbody tr.eae-ct-header{display:none}.eae-tab-format-tab-mob .hide.eae-ct-hide{display:table-cell}}@media (max-width:767px){.eae-tab-format-mobile .eae-ct-wrapper ul{display:flex}.eae-tab-format-mobile tbody tr.eae-ct-header{display:none}.eae-tab-format-all tbody tr.eae-ct-header,.eae-tab-format-mobile tbody tr.eae-ct-header{display:none}.eae-tab-format-mobile .hide.eae-ct-hide{display:table-cell}}.eae-progress-bar-wrapper{display:flex;flex-direction:column;align-items:flex-start;margin:15px 0}.eae-progress-bar-wrapper.eae-progress-bar{width:100%;position:relative;box-sizing:border-box}.eae-pb-bar,.eae-pb-bar-inner,.eae-pb-bar-skill,.eae-pb-bar-value{box-sizing:border-box}.eae-pb-bar{position:relative;height:100%;width:100%;overflow:hidden}.eae-pb-bar--no-overflow{overflow:visible}.eae-pb-bar-inner{position:absolute;top:0;left:0;height:100%;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:left center;transform-origin:left center}body.rtl .eae-pb-bar .eae-pb-bar-inner{position:absolute;top:0;right:0!important;height:100%;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:right center;transform-origin:right center}.eae-pb-bar-inner.js-animated{transition-property:all;transition-duration:1.5s;transition-timing-function:cubic-bezier(.1,1.14,.31,1.06);transition-delay:1.5s;-webkit-transform:scaleX(1);transform:scaleX(1)}body.rtl .eae-pb-bar .eae-pb-bar-inner.js-animated{transition-property:all;transition-duration:1.5s;transition-timing-function:cubic-bezier(.1,1.14,.31,1.06);transition-delay:1.5s;-webkit-transform:scaleX(1);transform:scaleX(1)}.eae-pb-bar-skill,.eae-pb-bar-value{font-size:14px;letter-spacing:1px}body:not(.rtl) .eae-pb-bar-value--aligned-value{-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.rtl .eae-pb-bar-value--aligned-value{-webkit-transform:translateX(50%);transform:translateX(50%)}.eae-progress-bar-skin1{height:20px;padding:4px;border:1px solid #ddd;border-radius:20px}.eae-pb-bar-skin1{border-radius:20px}.eae-pb-bar-inner-skin1{background-color:#00bfb3;background-size:200%;background-position:0 0;border-radius:20px}.eae-pb-bar-skill-skin1{position:absolute;bottom:20px;left:0;opacity:0}body.rtl .eae-pb-bar-skill-skin1{right:0}.eae-pb-bar-skill-skin1.js-animated{transition-property:all;transition-duration:.5s;transition-timing-function:linear;transition-delay:.5s;left:0;opacity:1}body.rtl .eae-pb-bar-skill-skin1.js-animated{right:0!important}.eae-pb-bar-value-skin1{position:absolute;bottom:20px;opacity:1}body:not(.rtl) .eae-pb-bar-value-skin1{right:0}body.rtl .eae-pb-bar-value-skin1{left:0!important}.eae-pb-bar-value-skin1.js-animated{transition-property:all;transition-duration:.5s;transition-timing-function:linear;transition-delay:.5s;opacity:1}body:not(.rtl) .eae-pb-bar-value-skin1.js-animated{right:0}.eae-progress-bar-skin2{height:15px;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2);border-radius:3px}@-webkit-keyframes progress-2-bg-animation-rtl{100%{background-position:0 0,0 0}0%{background-position:0 0,42px 0}}@keyframes progress-2-bg-animation-rtl{100%{background-position:0 0,0 0}0%{background-position:0 0,42px 0}}@-webkit-keyframes progress-2-bg-animation{0%{background-position:0 0,0 0}1000%{background-position:0 0,42px 0}}@keyframes progress-2-bg-animation{0%{background-position:0 0,0 0}100%{background-position:0 0,42px 0}}.eae-pb-bar-inner-skin2{background-image:linear-gradient(to top,rgba(255,255,255,.15),rgba(0,0,0,.2)),linear-gradient(135deg,#5eeb5b,#5eeb5b 33%,#358600 33%,#358600 66%,#5eeb5b 66%);background-size:100% 100%,42px 100%;background-position:0 0,0 0;border-radius:3px}body:not(.rtl) .eae-pb-bar-inner-skin2.js-animated{-webkit-animation:progress-2-bg-animation 1.5s linear 0s infinite;animation:progress-2-bg-animation 1.5s linear 0s infinite}body.rtl .eae-pb-bar-inner-skin2.js-animated{-webkit-animation:progress-2-bg-animation-rtl 1.5s linear 0s infinite;animation:progress-2-bg-animation-rtl 1.5s linear 0s infinite}.eae-pb-bar-skill-skin2{position:absolute;opacity:0}body:not(.rtl) .eae-pb-bar-skill-skin2{left:0}body.rtl .eae-pb-bar-skill-skin2{right:0}.eae-pb-bar-skill-skin2.js-animated{transition-property:all;transition-duration:.5s;transition-timing-function:linear;transition-delay:.5s;bottom:20px;opacity:1}.eae-pb-bar-value-skin2{position:absolute;opacity:0}body:not(.rtl) .eae-pb-bar-value-skin2{right:0}body.rtl .eae-pb-bar-value-skin2{left:0}.eae-pb-bar-value-skin2.js-animated{transition-property:all;transition-duration:.5s;transition-timing-function:linear;transition-delay:.5s;bottom:20px;opacity:1}.eae-progress-bar-skin3{height:5px;background-color:#efefef}.eae-pb-bar-inner-skin3,.eae-pb-bar-value-skin3{background-color:#f40076}.eae-pb-bar-inner:after,.eae-pb-bar-value-skin3:after{border-top-color:#f40076}.eae-pb-bar-skill-skin3{position:absolute;bottom:10px;left:-10px;opacity:0}.eae-pb-bar-skill-skin3.js-animated{transition-property:all;transition-duration:.5s;transition-timing-function:linear;transition-delay:.5s;opacity:1}body:not(.rtl) .eae-pb-bar-skill-skin3.js-animated{left:0}body.rtl .eae-pb-bar-skill-skin3.js-animated{right:0}.eae-pb-bar-value-skin3{position:absolute;display:inline-block;padding:0 8px;font-size:14px;color:#fff;opacity:0}.eae-pb-bar-value-skin3:after{position:absolute;left:50%;bottom:-10px;display:block;width:0;height:0;content:"";-webkit-transform:translateX(-50%);transform:translateX(-50%);border-width:5px;border-style:solid;border-color:#f40076 transparent transparent transparent}.eae-pb-bar-inner-skin3.js-animated{transition-property:all;transition-duration:1.5s;transition-timing-function:cubic-bezier(.1,1.14,.31,1.06);transition-delay:1.5s;-webkit-transform:scaleX(1);transform:scaleX(1)}.eae-pb-bar-value-skin3.js-animated{transition-property:all;transition-duration:1.5s;transition-timing-function:cubic-bezier(.1,1.14,.31,1.06);transition-delay:2s;bottom:14px;opacity:1}.eae-progress-bar-skin4{height:3px;background-color:#efefef}.eae-pb-bar-inner-skin4{background-color:#000}.eae-pb-bar-inner-skin4:after{position:absolute;top:50%;display:block;width:8px;height:8px;content:"";-webkit-transform:translateY(-50%);transform:translateY(-50%);background-color:#000;border-radius:50%}body:not(.rtl) .eae-pb-bar-inner-skin4:after{right:0}body.rtl .eae-pb-bar-inner-skin4:after{left:0}.eae-pb-bar-value-skin4{position:absolute;bottom:2px;font-size:14px;opacity:0}.eae-pb-bar-value-skin4.js-animated{transition-property:all;transition-duration:1.5s;transition-timing-function:linear;transition-delay:1.5s;opacity:1}.eae-pb-bar-skill-skin4{position:absolute;bottom:2px;left:-20px;opacity:0}.eae-pb-bar-skill-skin4.js-animated{transition-property:all;transition-duration:.5s;transition-timing-function:linear;transition-delay:.5s;opacity:1}body:not(.rtl) .eae-pb-bar-skill-skin4.js-animated{left:0}body.rtl .eae-pb-bar-skill-skin4.js-animated{right:0}.eae-progress-bar-skin5{height:30px;background-color:#f7f7f7}.eae-pb-bar-inner-skin5{background-color:#57b8ff}.eae-pb-bar-skill-skin5{position:absolute;top:50%;color:#fff;-webkit-transform:translateY(-50%);transform:translateY(-50%);opacity:0}body:not(.rtl) .eae-pb-bar-skill-skin5{left:10px}body:not(.rtl) .eae-pb-bar-skill-skin5{right:10px}.eae-pb-bar-skill-skin5.js-animated{transition-property:all;transition-duration:.5s;transition-timing-function:linear;transition-delay:.5s;opacity:1}.eae-pb-bar-value-skin5{position:absolute;top:50%;color:#fff;opacity:0;z-index:10}body:not(.rtl) .eae-pb-bar-value-skin5{-webkit-transform:translateX(-100%) translateX(-10px) translateY(-50%);transform:translateX(-100%) translateX(-10px) translateY(-50%)}body.rtl .eae-pb-bar-value-skin5{-webkit-transform:translateX(100%) translateX(10px) translateY(-50%);transform:translateX(100%) translateX(10px) translateY(-50%)}.eae-pb-bar-value-skin5.js-animated{transition-property:all;transition-duration:1.5s;transition-timing-function:linear;transition-delay:1.5s;opacity:1}.eae-dual-button-wrapper .eae-button-1-wrapper,.eae-dual-button-wrapper .eae-button-2-wrapper{overflow:hidden}.eae-dual-button-wrapper.button-style-horizontal{display:flex;flex-direction:row;position:relative}.eae-dual-button-main-wrapper{display:flex;flex-direction:row;justify-content:center}.eae-dual-button-wrapper a{min-width:0}.eae-dual-button-wrapper.button-style-vertical{display:inline-flex;flex-direction:column;position:relative}.eae-button-1.icon-before,.eae-button-2.icon-before{display:flex;flex-direction:row}body.rtl .eae-button-1.icon-before,body.rtl .eae-button-2.icon-before{display:flex;flex-direction:row-reverse}.eae-button-1.icon-after,.eae-button-2.icon-after{display:flex;flex-direction:row-reverse}body.rtl .eae-button-1.icon-after,body.rtl .eae-button-2.icon-after{display:flex;flex-direction:row}.eae-button-1-wrapper .eae-button-1,.eae-button-2-wrapper .eae-button-2{color:#000;align-items:center}.eae-button-1-wrapper:hover .eae-button-1,.eae-button-2-wrapper:hover .eae-button-2{color:#000}.eae-dual-button-wrapper.button-style-vertical .eae-button-1.icon-after,.eae-dual-button-wrapper.button-style-vertical .eae-button-1.icon-before,.eae-dual-button-wrapper.button-style-vertical .eae-button-2.icon-after,.eae-dual-button-wrapper.button-style-vertical .eae-button-2.icon-before{justify-content:center}.eae-button-1.icon-up,.eae-button-2.icon-up{display:flex;flex-direction:column;text-align:center}.eae-button-1.icon-down,.eae-button-2.icon-down{display:flex;flex-direction:column-reverse;text-align:center}.eae-button-1-wrapper{background:#ffb6c1;display:flex;justify-content:center;width:100%;line-height:1}.eae-button-2-wrapper{background:orange;display:flex;justify-content:center;width:100%;line-height:1}.eae-button-1.icon-up .icon-wrapper,.eae-button-2.icon-down .icon-wrapper,.eae-button-2.icon-up .icon-wrapper{text-align:center}.eae-button-1.icon-up .eae-button-text,.eae-button-2.icon-down .eae-button-text,.eae-button-2.icon-up .eae-button-text{text-align:center}.eae-button-1.icon-before i,.eae-button-2.icon-after i,.eae-button-2.icon-before i{align-self:center;margin:0 10px 0 0}.eae-button-1.icon-after i,.eae-button-2.icon-after i{align-self:center;margin:0 0 0 10px}.eae-button-1.icon-down i,.eae-button-1.icon-up i,.eae-button-2.icon-down i,.eae-button-2.icon-up i{align-self:center;margin:5px 0}.eae-dual-button-wrapper.button-style-horizontal .eae-button-1-wrapper,.eae-dual-button-wrapper.button-style-horizontal .eae-button-2-wrapper{padding:12px 30px}.eae-dual-button-wrapper.button-style-vertical .eae-button-1-wrapper,.eae-dual-button-wrapper.button-style-vertical .eae-button-2-wrapper{padding:20px 30px}.eae-button1,.eae-button2{position:relative;display:flex}.eae-dual-button-wrapper.button-style-horizontal .eae-button1,.eae-dual-button-wrapper.button-style-horizontal .eae-button2{min-width:150px}.eae-dual-button-wrapper.button-style-vertical .eae-button1{display:flex;flex-direction:column}.eae-button-separator-wrapper .eae-button-separator{width:40px;height:40px;line-height:40px;border-radius:50%;z-index:1;box-shadow:0 0 0 6px rgba(255,255,255,.2);background:#fafaf8;color:#444;text-transform:uppercase;text-align:center;vertical-align:middle;font-weight:400;font-size:14px;position:absolute;transform:translateY(-50%)}.eae-button-separator span{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}body.rtl.elementor-editor-active .eae-dual-button-main-wrapper .button-style-horizontal .eae-button1 .eae-button-separator-wrapper.not-rtl .eae-button-separator{display:none!important}body:not(.rtl).elementor-editor-active .eae-dual-button-main-wrapper .button-style-horizontal .eae-button2 .eae-button-separator-wrapper.rtl .eae-button-separator,body:not(.rtl).elementor-editor-preview .eae-dual-button-main-wrapper .button-style-horizontal .eae-button2 .eae-button-separator-wrapper.rtl .eae-button-separator{display:none!important}.eae-sweep-right{vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.3s;transition-duration:.3s}.eae-sweep-right:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098d1;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:0 50%;transform-origin:0 50%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.eae-sweep-right:active,.eae-sweep-right:focus,.eae-sweep-right:hover{color:#fff}.eae-sweep-right:active:before,.eae-sweep-right:focus:before,.eae-sweep-right:hover:before{-webkit-transform:scaleX(1);transform:scaleX(1)}.eae-sweep-left{vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.3s;transition-duration:.3s}.eae-sweep-left:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098d1;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:100% 50%;transform-origin:100% 50%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.eae-sweep-left:active,.eae-sweep-left:focus,.eae-sweep-left:hover{color:#fff}.eae-sweep-left:active:before,.eae-sweep-left:focus:before,.eae-sweep-left:hover:before{-webkit-transform:scaleX(1);transform:scaleX(1)}.eae-sweep-bottom{vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.3s;transition-duration:.3s}.eae-sweep-bottom:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098d1;-webkit-transform:scaleY(0);transform:scaleY(0);-webkit-transform-origin:50% 0;transform-origin:50% 0;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.eae-sweep-bottom:active,.eae-sweep-bottom:focus,.eae-sweep-bottom:hover{color:#fff}.eae-sweep-bottom:active:before,.eae-sweep-bottom:focus:before,.eae-sweep-bottom:hover:before{-webkit-transform:scaleY(1);transform:scaleY(1)}.eae-sweep-top{vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.3s;transition-duration:.3s}.eae-sweep-top:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098d1;-webkit-transform:scaleY(0);transform:scaleY(0);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.eae-sweep-top:active,.eae-sweep-top:focus,.eae-sweep-top:hover{color:#fff}.eae-sweep-top:active:before,.eae-sweep-top:focus:before,.eae-sweep-top:hover:before{-webkit-transform:scaleY(1);transform:scaleY(1)}.eae-bounce-right{vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.5s;transition-duration:.5s}.eae-bounce-right:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098d1;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:0 50%;transform-origin:0 50%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.eae-bounce-right:active,.eae-bounce-right:focus,.eae-bounce-right:hover{color:#fff}.eae-bounce-right:active:before,.eae-bounce-right:focus:before,.eae-bounce-right:hover:before{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transition-timing-function:cubic-bezier(.52,1.64,.37,.66);transition-timing-function:cubic-bezier(.52,1.64,.37,.66)}.eae-bounce-left{vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.5s;transition-duration:.5s}.eae-bounce-left:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098d1;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:100% 50%;transform-origin:100% 50%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.eae-bounce-left:active,.eae-bounce-left:focus,.eae-bounce-left:hover{color:#fff}.eae-bounce-left:active:before,.eae-bounce-left:focus:before,.eae-bounce-left:hover:before{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transition-timing-function:cubic-bezier(.52,1.64,.37,.66);transition-timing-function:cubic-bezier(.52,1.64,.37,.66)}.eae-bounce-bottom{vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.5s;transition-duration:.5s}.eae-bounce-bottom:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098d1;-webkit-transform:scaleY(0);transform:scaleY(0);-webkit-transform-origin:50% 0;transform-origin:50% 0;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.eae-bounce-bottom:active,.eae-bounce-bottom:focus,.eae-bounce-bottom:hover{color:#fff}.eae-bounce-bottom:active:before,.eae-bounce-bottom:focus:before,.eae-bounce-bottom:hover:before{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transition-timing-function:cubic-bezier(.52,1.64,.37,.66);transition-timing-function:cubic-bezier(.52,1.64,.37,.66)}.eae-bounce-top{vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.5s;transition-duration:.5s}.eae-bounce-top:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098d1;-webkit-transform:scaleY(0);transform:scaleY(0);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.eae-bounce-top:active,.eae-bounce-top:focus,.eae-bounce-top:hover{color:#fff}.eae-bounce-top:active:before,.eae-bounce-top:focus:before,.eae-bounce-top:hover:before{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transition-timing-function:cubic-bezier(.52,1.64,.37,.66);transition-timing-function:cubic-bezier(.52,1.64,.37,.66)}.eae-markers .marker{display:none}.eae-markers p{margin-bottom:0}.eae-fg-wrapper{display:flex;flex-direction:column;overflow:hidden}.eae-gallery-filter{display:flex;flex-direction:row;justify-content:center;flex-wrap:wrap}.eae-filter-label{padding:5px 10px;background-color:#a0ce4e;color:#fff;margin:0 3px 0 3px}.eae-filter-label.current{background-color:#73b9dc}.eae-fg-image{display:flex;flex-wrap:wrap;flex-direction:row}.eae-fg-wrapper .eae-gallery-item-inner img{width:100%;height:auto;display:block!important;transition:all .5s ease;-webkit-transition:all .5s ease}.eae-gallery-item{height:auto}.eae-gallery-filter a{color:#fff;text-decoration:none}.eae-gallery-filter a.current{font-weight:700}.eae-gallery-item-inner{position:relative;overflow:hidden}.eae-overlay-always .eae-gallery-item .eae-grid-overlay{display:block}.eae-overlay-hover .eae-gallery-item-inner:hover .eae-grid-overlay{display:block}.eae-overlay-hide-on-hover .eae-gallery-item-inner:hover .eae-grid-overlay{display:none}.eae-overlay-hide-on-hover .eae-grid-overlay{display:block}.eae-grid-overlay{position:absolute;top:0;left:0;display:none;z-index:99;background:rgba(0,0,0,.5);height:100%;width:100%}.eae-grid-overlay-inner{display:block;position:relative;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center}.eae-fg-wrapper .eae-icon-wrapper{display:flex;justify-content:center}.eae-overlay-caption{display:block;line-height:1em;margin-top:15px;color:#73b9dc;font-size:20px}.eae-overlay-icon{line-height:1em;padding:.5em;display:inline-block}.eae-overlay-icon svg{height:auto}.eae-icon-view-framed .eae-overlay-icon{padding:.5em;color:#73b9dc;border:3px solid #73b9dc;background-color:transparent}.eae-icon-view-stacked .eae-overlay-icon{padding:.5em;color:#fff;background-color:#818a91}.eae-hover-direction-effect .eae-grid-overlay{position:absolute;z-index:99;background:rgba(0,0,0,.5);height:100%;width:100%}.eae-fg-wrapper.eae-image-ratio-yes .eae-gallery-item-inner .eae-fg-img-wrapper{position:relative;top:0;overflow:hidden;left:0;right:0;border:0}.eae-fg-wrapper.eae-image-ratio-yes .eae-gallery-item-inner .eae-fg-img-wrapper img{height:100%;width:100%;display:block;position:absolute;top:0;left:0;object-fit:cover}.wts-eae-ribbons-badges-wrapper{display:none}.wts-eae-enable-ribbons-badges-yes .elementor-column-wrap>.wts-eae-ribbons-badges-wrapper{display:block}.wts-eae-enable-ribbons-badges-yes.wts-eae-badge-type-ribbon>.wts-eae-ribbons-badges-wrapper{position:absolute;top:0;left:auto;right:0;-ms-transform:rotate(90deg);width:150px;overflow:hidden;height:150px;z-index:999;padding:8px 12px}.wts-eae-badge-h-left.wts-eae-enable-ribbons-badges-yes.wts-eae-badge-type-ribbon>.wts-eae-ribbons-badges-wrapper{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);left:0;right:auto}.wts-eae-badge-h-right.wts-eae-enable-ribbons-badges-yes.wts-eae-badge-type-ribbon>.wts-eae-ribbons-badges-wrapper{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(90deg);left:auto;right:0}.wts-eae-enable-ribbons-badges-yes.wts-eae-badge-type-ribbon>.wts-eae-ribbons-badges-wrapper span.wts-eae-ribbons-badges-inner{position:absolute;text-align:center;left:0;top:0;width:200%;-webkit-transform:translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg);-ms-transform:translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg);transform:translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg);margin-top:35px;font-size:13px;line-height:2;font-weight:800;text-transform:uppercase;background:rgba(63,195,135,.8);padding:8px 12px}.wts-eae-enable-ribbons-badges-yes.wts-eae-badge-type-badge>.wts-eae-ribbons-badges-wrapper span.wts-eae-ribbons-badges-inner{min-height:3.236em;min-width:3.236em;padding:0;font-size:1em;font-weight:700;position:absolute;text-align:center;line-height:3.236;top:-.5em;left:-.5em;margin:0;border-radius:100%;background-color:#77a464;color:#fff;font-size:.857em;z-index:9}.wts-eae-badge-h-left.wts-eae-badge-v-bottom.wts-eae-enable-ribbons-badges-yes>.wts-eae-ribbons-badges-wrapper span.wts-eae-ribbons-badges-inner{left:20px;right:auto;top:auto;bottom:20px}.wts-eae-badge-h-left.wts-eae-badge-v-top.wts-eae-enable-ribbons-badges-yes>.wts-eae-ribbons-badges-wrapper span.wts-eae-ribbons-badges-inner{left:20px;right:auto;top:20px;bottom:auto}.wts-eae-badge-h-right.wts-eae-badge-v-bottom.wts-eae-enable-ribbons-badges-yes>.wts-eae-ribbons-badges-wrapper span.wts-eae-ribbons-badges-inner{left:auto;right:20px;top:auto;bottom:20px}.wts-eae-badge-h-right.wts-eae-badge-v-top.wts-eae-enable-ribbons-badges-yes>.wts-eae-ribbons-badges-wrapper span.wts-eae-ribbons-badges-inner{left:auto;right:20px;top:20px;bottom:auto}.eae-flip-box-back svg,.eae-flip-box-front svg{width:25px;height:auto}.wts-eae-textseparator svg{width:25px;height:auto}.eae-img-comp-slider svg{width:22px;height:auto}.eae-popup-link svg{display:inline-block;width:1em}.eae-popup svg:focus,.eae-popup svg:hover{opacity:1;cursor:pointer}.eae-popup svg:active{top:1px}.eae-popup svg.eae-close{width:28px;height:28px;line-height:1em;text-decoration:none;text-align:center;opacity:1;background-color:#fff}.eae-dual-button-wrapper svg{width:1em;height:auto;display:block}eae-button-separator i{position:relative;display:block}.eae-button-1.icon-before svg,.eae-button-2.icon-after svg,.eae-button-2.icon-before svg{align-self:center;margin:0 10px 0 0}.eae-button-1.icon-after svg,.eae-button-2.icon-after svg{align-self:center;margin:0 0 0 10px}.eae-button-1.icon-down svg,.eae-button-1.icon-up svg,.eae-button-2.icon-down svg,.eae-button-2.icon-up svg{align-self:center;margin:5px 0}.eae-pt-button-wrapper a svg{width:1em}.eae-pt-action-button .eae-pt-align-icon-left{float:left}.eae-pt-action-button .eae-pt-align-icon-right{float:right}.eae-icon-wrap svg{width:20px;height:auto;font-size:20px;display:block}.eae-info-circle .eae-icon-wrap svg{width:20px;height:auto;font-size:20px}.eae-icon-view-stacked svg{fill:#fff}.ae-link-yes{cursor:pointer}.eae-element-unfold-content{padding:10px 0;background-color:#d3d3d3c4;width:100%;position:absolute;left:0;bottom:0;z-index:999}a.eae-unfold-link{background-color:#61ce70;color:#fff;display:inline-block;overflow:hidden}a.eae-unfold-link svg{background-color:#fff}.eae-unfold-button-icon{vertical-align:middle}.eae-fold-yes .elementor-column-wrap,.eae-fold-yes.elementor-section .elementor-container,.eae-fold-yes.elementor-widget{overflow:hidden}body.elementor-editor-active .elementor.elementor-edit-mode .elementor-element.elementor-section.eae-widget-unfold-yes .elementor-container,body.elementor-editor-preview .elementor.elementor-edit-mode .elementor-element.elementor-section.eae-widget-unfold-yes .elementor-container{overflow:hidden}body.elementor-editor-active .elementor.elementor-edit-mode .elementor-element.elementor-column.eae-widget-unfold-yes .elementor-column-wrap,body.elementor-editor-preview .elementor.elementor-edit-mode .elementor-element.elementor-column.eae-widget-unfold-yes .elementor-column-wrap{overflow:hidden}body.elementor-editor-active .elementor.elementor-edit-mode .elementor-element.elementor-widget.eae-widget-unfold-yes,body.elementor-editor-preview .elementor.elementor-edit-mode .elementor-element.elementor-widget.eae-widget-unfold-yes{overflow:hidden}.eae-widget-unfold-yes .elementor-widget-container .eae-fold-yes.eae-rc{display:none!important}.eae-unfold-button-icon svg{line-height:1em;text-decoration:none;-webkit-mask-repeat:no-repeat!important;text-align:center;opacity:1}.eae-fold-icon-type-svg .eae-unfold-button-icon,.eae-unfold-icon-type-svg .eae-unfold-button-icon{-webkit-mask-size:cover!important;background-image:none;transform:translateY(-50%)}.elementor-section.elementor-section-items-bottom.eae-widget-unfold-yes>.elementor-container,.elementor-section.elementor-section-items-middle.eae-widget-unfold-yes>.elementor-container{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:start}.elementor-section.elementor-section-content-bottom.eae-widget-unfold-yes>.elementor-container,.elementor-section.elementor-section-content-middle.eae-widget-unfold-yes>.elementor-container{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:start}.elementor-widget-wts-modal-popup.eae-pop-btn-type-image .eae-popup-link{padding:0;background-color:transparent;overflow:hidden}[data-elementor-device-mode=tablet] .eae-tab-format-mobile .eae-ct-hide.eae-fbox-heading{display:none!important}.eae-timeline-item .eae-icon-view-stacked{border-width:0!important}.eae-content-switcher-wrapper{display:block;text-align:center}.eae-cs-layout-skin1 .eae-cs-switch-wrapper{display:inline-flex;flex-wrap:wrap;padding:8px 12px;background:#54595f;border-radius:50px}.eae-cs-switch-container{display:block;text-align:center}.eae-cs-layout-skin1 .eae-cs-label-wrapper{display:inline-block;overflow:hidden}.eae-cs-layout-skin1 .eae-content-switch-button{border-radius:50px;padding:8px 12px;background-color:#7a7a7a;color:#fff;overflow:hidden;display:block;min-width:150px;position:relative;text-align:center;margin:3px}.eae-cs-layout-skin1 .eae-content-switch-button:before{height:100%;top:0;left:0;z-index:0;content:'';width:0;position:absolute;right:0;transition:all .3s ease-out}.eae-cs-layout-skin1 .eae-content-switch-button.active:before{width:100%;left:0;right:auto;background-color:#61ce70}.eae-cs-layout-skin1 .eae-content-switch-label{position:relative}.eae-cs-content-section{display:none}.eae-cs-content-section.active{display:block}@media only screen and (max-width:768px){.eae-cs-switch-wrapper{display:inline-block!important}}.eae-cs-layout-skin2 .eae-cs-switch-wrapper{display:inline-flex;flex-wrap:wrap;padding:0;background:0 0}.eae-cs-layout-skin2 .eae-cs-label-wrapper{display:inline-block}.eae-cs-layout-skin2 .eae-content-switch-button{width:auto;margin:3px 8px;padding:10px 12px;background-color:#e2e2e2;overflow:hidden;display:block;position:relative;text-align:center;border-radius:5px;border:1px solid rgba(130,130,130,.26);color:rgba(71,71,71,.44)}.eae-cs-layout-skin2 .eae-content-switch-button.active{box-shadow:0 10px 34px -9px rgba(0,0,0,.38);background-color:#fff;color:#575757;border-color:#fff}h5.eae-cs-label{margin:0}.eae-cs-layout-skin3 .eae-cs-switch-wrapper{display:block;justify-content:center;align-items:center}.eae-content-switch-label.primary-label{margin-right:30px}.eae-content-switch-label.secondary-label{margin-left:30px}.eae-cs-layout-skin3 .eae-cs-switch-label{position:relative;display:inline-block;width:4.5em;height:2.3em;vertical-align:middle}.eae-cs-layout-skin3 .eae-content-switch-label{margin:0;display:inline-block}.eae-cs-layout-skin3 .eae-cs-switch-button{display:inline-block}.eae-cs-layout-skin3 .eae-cs-label{display:inline-block}.eae-cs-layout-skin3 .eae-cs-switch-label input.eae-content-toggle-switch{display:none}.eae-cs-layout-skin3 .eae-cs-switch-label input.eae-content-toggle-switch+span{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;-webkit-transition:.4s;transition:.4s;-webkit-border-radius:1.5em;border-radius:1.5em;background:#2e394d;border:2px solid #2e394d}.eae-cs-layout-skin3 .eae-cs-switch-label input.eae-content-toggle-switch+span:before{position:absolute;content:"";height:28px;width:28px;left:4px;transform:translateY(-52%);top:50%;transition:.4s;transition:.4s;-webkit-border-radius:50%;border-radius:50%;background:#88cf8f;border:2px solid #88cf8f}body.rtl .eae-cs-layout-skin3 .eae-cs-switch-label input.eae-content-toggle-switch+span:before{left:unset;right:4px}.eae-cs-layout-skin3 .eae-cs-switch-label input:checked.eae-content-toggle-switch+span:before{transform:translate(36px,-52%)}body.rtl .eae-cs-layout-skin3 .eae-cs-switch-label input:checked.eae-content-toggle-switch+span:before{transform:translate(-36px,-52%)}.eae-content-switch-label.active{color:#61ce70}.eae-cs-layout-skin4 .eae-cs-switch-wrapper{display:block}.eae-cs-layout-skin4 .eae-content-switch-label.primary-label{margin-right:30px}.eae-cs-layout-skin4 .eae-content-switch-label.secondary-label{margin-left:30px}.eae-cs-layout-skin4 .eae-content-switch-label{display:inline-block}.eae-cs-layout-skin4 .eae-cs-switch-label{position:relative;display:inline-block;width:70px;height:20px;vertical-align:middle}.eae-cs-layout-skin4 .eae-cs-label{display:inline-block}.eae-cs-layout-skin4 .eae-content-toggle-switch{display:none}.eae-cs-layout-skin4 .eae-content-toggle-switcher{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;-webkit-transition:.4s;transition:.4s;-webkit-border-radius:1.5em;border-radius:1.5em;background:#2e394d;border:2px solid #2e394d}.eae-cs-layout-skin4 .eae-cs-switch-button{display:inline-block}.eae-cs-layout-skin4 .eae-content-toggle-switcher:before{position:absolute;content:"";height:34px;width:34px;left:-12px;top:50%;transform:translateY(-50%);border-radius:50%;border:2px solid #88cf8f;background:#88cf8f;-webkit-transition:.4s;transition:.4s;-webkit-box-shadow:3px 3px 6px 1px rgba(0,0,0,.2);box-shadow:3px 3px 6px 1px rgba(0,0,0,.2)}.eae-cs-layout-skin4 .eae-cs-switch-container{padding:15px 0}body.rtl .eae-cs-layout-skin4 .eae-content-toggle-switcher:before{right:-12px!important}.eae-cs-layout-skin4 input:checked+.eae-content-toggle-switcher:before{transform:translate(55px,-50%)}body.rtl .eae-cs-layout-skin4 input:checked+.eae-content-toggle-switcher:before{transform:translate(-55px,-50%)}.eae-swiper-outer-wrapper{position:relative}.eae-swiper-container{position:relative}.eae-thumb-container{position:absolute}.eae-swiper-outer-wrapper .eae-swiper-slide{height:400px;background-size:cover;background-repeat:no-repeat;background-position:right}.eae-swiper-outer-wrapper .eae-swiper-slide .eae-slide-inner{color:#7a7a7a;display:flex;position:absolute;top:0;left:0;bottom:0;right:0;padding:20px}.eae-slide-inner .eae-slide-content{padding:20px 30px}.eae-slide-inner .eae-slide-heading{font-size:35px;font-weight:700;line-height:1}.eae-slide-inner .eae-slide-text{font-size:17px;line-height:1.4}.eae-slide-inner .eae-slide-button{display:inline-block}.eae-slide-inner .eae-slide-btn{display:inline-block;font-size:15px;padding:12px 24px;border-radius:3px;cursor:pointer;transition:all .3s}.eae-slide-inner .eae-slide-heading:not(:last-child),.eae-slide-inner .eae-slide-text:not(:last-child){margin-bottom:30px}.eae--hr-position-left .eae-slide-inner{-webkit-box-pack:start;justify-content:flex-start}.eae--hr-position-right .eae-slide-inner{-webkit-box-pack:end;justify-content:flex-end}.eae--hr-position-center .eae-slide-inner{-webkit-box-pack:center;justify-content:center}.eae--vr-position-top .eae-slide-inner{-webkit-box-pack:start;align-items:flex-start}.eae--vr-position-middle .eae-slide-inner{-webkit-box-align:center;align-items:center}.eae--vr-position-bottom .eae-slide-inner{-webkit-box-pack:end;align-items:flex-end}.eae-swiper-button-prev{left:10px}.eae-swiper-button-next{right:10px}.eae-swiper-button{position:absolute;display:inline-flex;z-index:1;cursor:pointer;color:#7a7a7a;top:50%;transform:translateY(-50%)}.swiper-pagination-bullet{margin-bottom:5px!important}.eae-swiper-outer-wrapper .eae-swiper-slide .eae-background-overlay{width:100%;height:100%;position:absolute}.eae-swiper-outer-wrapper .eae-gallery-thumbs{box-sizing:border-box;text-align:center}.eae-swiper-outer-wrapper .eae-gallery-thumbs .eae-thumb-slide{background-size:cover;background-position:center;height:100%;opacity:.7}.eae-swiper-outer-wrapper .eae-gallery-thumbs .swiper-slide-thumb-active{opacity:1}
|
1 |
+
.elementor-widget-wts-textseparator .elementor-widget-container{overflow:hidden}.wts-eae-textseparator{align-items:center;display:flex;flex-flow:row nowrap;margin:auto}body.rtl .wts-eae-textseparator{flex-direction:row-reverse}.eae-separator-icon-inner i{height:1em;width:1em;text-align:center;position:relative;display:block}.eae-separator-icon-inner i:before{position:absolute;left:50%;-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translateX(-50%)}.wts-eae-textseparator .eae-sep-holder{flex:1 1 auto;height:1px;min-width:10%;position:relative}.wts-eae-textseparator .eae-sep-holder .eae-sep-lines{border-top-width:1px;display:block;height:1px;position:relative;top:1px;width:100%}.eae-separator-title{margin:0;-moz-box-flex:0;flex:0 1 auto;line-height:1em;margin:0;overflow-wrap:break-word}.sep-align-right .sep-right{display:none}.sep-align-left .sep-left{display:none}.eae-icon-view-stacked i{color:#fff}.eae-icon-view-framed .eae-separator-icon-inner{border:1px solid}.eae-icon-shape-circle .eae-separator-icon-inner{border-radius:50%}.eae-separator-icon-wrapper,.eae-separator-title{margin:0 5px!important}.eae-separator-icon-inner{line-height:1}.wts-price-box-wrapper .eae-pt-heading,.wts-price-box-wrapper .eae-pt-sub-heading{margin:5px 0;text-align:center}.plan-price-shape{display:table;height:6em;margin:auto;width:6em}.eae-pt-price-box-shape-circle .plan-price-shape,.eae-pt-price-box-shape-square .plan-price-shape{border:1px solid}.eae-pt-price-box-shape-circle .plan-price-shape{border-radius:50%}.plan-price-block{padding:10px 0}.plan-price-shape-inner{display:table-cell;vertical-align:middle;padding:10px}.plan-price-shape-inner>span{display:block;font-size:1em;text-align:center}.eae-pt-feature-list{list-style:outside none none;text-align:center;margin:10px 0}.eae-pt-button-wrapper>a{text-align:center;display:inline-block;line-height:1}.eae-pt-button-wrapper{text-align:center}.wts-price-box-wrapper .heading-wrapper,.wts-price-box-wrapper .plan-features-wrapper{padding:10px 5px}.eae-pt-button-wrapper{padding:15px 0}.eae-pt-button-wrapper a{padding:5px 15px;border-radius:3px}.eae-pt-align-icon-right{float:right}.strike-feature{text-decoration:line-through}.eae-flip-box{width:100%;text-align:center}.eae-flip-box-wrapper{display:inline-block;width:100%}.eae-flip-box-inner{width:100%;height:200px;position:relative;-webkit-transform-style:preserve-3d;-moz-transform-style:preserve-3d;-ms-transform-style:preserve-3d;transform-style:preserve-3d}.eae-flip-box-inner .eae-flip-box-back,.eae-flip-box-inner .eae-flip-box-front{width:100%;height:100%;position:absolute;top:0;left:0;text-align:center;padding:10px;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:all .6s ease 0s;-moz-transition:all .6s ease 0s;-ms-transition:all .6s ease 0s;-o-transition:all .6s ease 0s;transition:all .6s ease 0s}.eae-flip-box-front{z-index:2}.eae-flip-box-back{z-index:1}.eae-fb-animate-vertical .eae-flip-box-inner .eae-flip-box-front{-webkit-transform:perspective(1000px) rotateX(0);-ms-transform:perspective(1000px) rotateX(0);transform:perspective(1000px) rotateX(0)}.eae-fb-animate-vertical .eae-flip-box-inner .eae-flip-box-back{-webkit-transform:perspective(1000px) rotateX(180deg);transform:perspective(1000px) rotateX(180deg);-ms-transform:perspective(1000px) rotateX(180deg)}.eae-fb-animate-vertical .eae-flip-box-inner:hover .eae-flip-box-front{-webkit-transform:perspective(1000px) rotateX(180deg);transform:perspective(1000px) rotateX(180deg);-ms-transform:perspective(1000px) rotateX(180deg)}.eae-fb-animate-vertical .eae-flip-box-inner:hover .eae-flip-box-back{-webkit-transform:perspective(1000px) rotateX(0);transform:perspective(1000px) rotateX(0);-ms-transform:perspective(1000px) rotateX(0)}.eae-fb-animate-horizontal .eae-flip-box-inner .eae-flip-box-front{-webkit-transform:perspective(1000px) rotateY(0);transform:perspective(1000px) rotateY(0);-ms-transform:perspective(1000px) rotateY(0)}.eae-fb-animate-horizontal .eae-flip-box-inner .eae-flip-box-back{-webkit-transform:perspective(1000px) rotateY(180deg);transform:perspective(1000px) rotateY(180deg);-ms-transform:perspective(1000px) rotateY(180deg)}.eae-fb-animate-horizontal .eae-flip-box-inner:hover .eae-flip-box-front{-webkit-transform:perspective(1000px) rotateY(180deg);transform:perspective(1000px) rotateY(180deg);-ms-transform:perspective(1000px) rotateY(180deg)}.eae-fb-animate-horizontal .eae-flip-box-inner:hover .eae-flip-box-back{-webkit-transform:perspective(1000px) rotateY(0);transform:perspective(1000px) rotateY(0);-ms-transform:perspective(1000px) rotateY(0)}.eae-fb-animate-fade .eae-flip-box-inner .eae-flip-box-front{opacity:1}.eae-fb-animate-fade .eae-flip-box-inner .eae-flip-box-back{opacity:0}.eae-fb-animate-fade .eae-flip-box-inner:hover .eae-flip-box-front{opacity:0}.eae-fb-animate-fade .eae-flip-box-inner:hover .eae-flip-box-back{opacity:1}.eae-flip-box-wrapper:focus .eae-flip-box-back,.eae-flip-box-wrapper:hover .eae-flip-box-back{z-index:2}.eae-flip-box-wrapper:focus .eae-flip-box-front,.eae-flip-box-wrapper:hover .eae-flip-box-front{z-index:1}.fade .eae-flip-box-wrapper .eae-flip-box-front{opacity:1;transition:1s}.fade .eae-flip-box-wrapper .eae-flip-box-back{opacity:0;transition:1s}.fade .eae-flip-box-wrapper:focus .eae-flip-box-front,.fade .eae-flip-box-wrapper:hover .eae-flip-box-front{opacity:0}.fade .eae-flip-box-wrapper:focus .eae-flip-box-back,.fade .eae-flip-box-wrapper:hover .eae-flip-box-back{opacity:1}.eae-fb-animate-flip .eae-flip-box-wrapper{perspective:800px}.eae-fb-animate-flip .eae-flip-box-inner{transform-style:preserve-3d;transform:rotateX(0) rotateY(0) rotateZ(0);transition:1s}.eae-fb-animate-flip .eae-flip-box-front{transform:translate3d(0,0,1px)}.eae-fb-animate-flip .eae-flip-box-back{transform:rotateY(180deg) translate3d(0,0,0)}.eae-fb-animate-flip .eae-flip-box-wrapper:focus .eae-flip-box-inner,.eae-fb-animate-flip .eae-flip-box-wrapper:hover .eae-flip-box-inner{transform:rotateY(180deg)}.up .eae-flip-box-front{transform:translate3d(0,0,1px)}.up .eae-flip-box-back{transform:rotateX(180deg) translate3d(0,0,0)}.up .eae-flip-box-wrapper:focus .eae-flip-box-inner,.up .eae-flip-box-wrapper:hover .eae-flip-box-inner{transform:rotateX(180deg)}.box .eae-flip-box-front{transform:translate3d(0,0,100px) scale(.85,.85)}.box .eae-flip-box-back{transform:rotateY(180deg) translate3d(0,0,100px) scale(.85,.85)}.box.up .eae-flip-box-back{transform:rotateX(180deg) translate3d(0,0,100px) scale(.85,.85)}.hideback .eae-flip-box-back,.hideback .eae-flip-box-front{backface-visibility:hidden}.eae-fb-animate-nananana .eae-flip-box-wrapper:focus .eae-flip-box-front,.eae-fb-animate-nananana .eae-flip-box-wrapper:hover .eae-flip-box-front{z-index:10;animation:batman 1s 2 alternate linear}.eae-fb-animate-flipcard .eae-flip-box-back,.eae-fb-animate-flipcard .eae-flip-box-front{transition:transform .4s ease;transform-origin:center center -150px;-webkit-transform-origin:center center -150px}.flipcard-rotate-top-down .eae-flip-box-front{transform:perspective(0) rotateX(0) rotateY(0) rotateZ(0)}.flipcard-rotate-top-down .eae-flip-box-back{transform:perspective(0) rotateX(90deg) rotateY(0) rotateZ(0)}.eae-fb-animate-flipcard.flipcard-rotate-top-down .eae-flip-box-wrapper:hover .eae-flip-box-front{transform:perspective(0) rotateX(-90deg) rotateY(0) rotateZ(0)}.eae-fb-animate-flipcard.flipcard-rotate-top-down .eae-flip-box-wrapper:hover .eae-flip-box-back{z-index:99999;transform:perspective(0) rotateX(0) rotateY(0) rotateZ(0)}.flipcard-rotate-down-top .eae-flip-box-front{transform:perspective(0) rotateX(0) rotateY(0) rotateZ(0)}.flipcard-rotate-down-top .eae-flip-box-back{transform:perspective(0) rotateX(-90deg) rotateY(0) rotateZ(0)}.eae-fb-animate-flipcard.flipcard-rotate-down-top .eae-flip-box-wrapper:hover .eae-flip-box-front{transform:perspective(0) rotateX(90deg) rotateY(0) rotateZ(0)}.eae-fb-animate-flipcard.flipcard-rotate-down-top .eae-flip-box-wrapper:hover .eae-flip-box-back{z-index:99999;transform:perspective(0) rotateX(0) rotateY(0) rotateZ(0)}.flipcard-rotate-left-right .eae-flip-box-front{transform:perspective(0) rotateX(0) rotateY(0) rotateZ(0)}.flipcard-rotate-left-right .eae-flip-box-back{transform:perspective(0) rotateX(0) rotateY(-90deg) rotateZ(0)}.eae-fb-animate-flipcard.flipcard-rotate-left-right .eae-flip-box-wrapper:hover .eae-flip-box-front{transform:perspective(0) rotateX(0) rotateY(90deg) rotateZ(0)}.eae-fb-animate-flipcard.flipcard-rotate-left-right .eae-flip-box-wrapper:hover .eae-flip-box-back{z-index:99999;transform:perspective(0) rotateX(0) rotateY(0) rotateZ(0)}.flipcard-rotate-right-left .eae-flip-box-front{transform:perspective(0) rotateX(0) rotateY(0) rotateZ(0)}.flipcard-rotate-right-left .eae-flip-box-back{transform:perspective(0) rotateX(0) rotateY(90deg) rotateZ(0)}.eae-fb-animate-flipcard.flipcard-rotate-right-left .eae-flip-box-wrapper:hover .eae-flip-box-front{transform:perspective(0) rotateX(0) rotateY(-90deg) rotateZ(0)}.eae-fb-animate-flipcard.flipcard-rotate-right-left .eae-flip-box-wrapper:hover .eae-flip-box-back{z-index:99999;transform:perspective(0) rotateX(0) rotateY(0) rotateZ(0)}@keyframes batman{0%{transform:scale(1,1) rotateZ(0)}100%{transform:scale(0,0) rotateZ(720deg);opacity:0}}.eae-flip-box-back i,.eae-flip-box-front i{font-size:32px;height:1em;width:1em;position:relative;display:block}.eae-flip-box-back i:before,.eae-flip-box-front i:before{position:absolute;left:50%;-webkit-transform:translate(-50%);-moz-transform:translate(-50%);-ms-transform:translate(-50%);-o-transform:translate(-50%);transform:translate(-50%)}.eae-fb-icon-view-framed{border:1px solid #92be43}.eae-fb-icon-shape-circle{border-radius:50%}.eae-flip-box-wrapper .icon-wrapper{display:inline-block;padding:10px;line-height:1}.eae-flip-box-wrapper .back-icon-title,.eae-flip-box-wrapper .front-icon-title{margin:10px auto;color:#fff}.eae-flip-box-wrapper .flipbox-content{display:block;position:relative;top:50%;transform:translateY(-50%);-ms-transform:translateY(-50%)}.flipbox-content p{margin-bottom:10px}.eae-fb-button{display:inline-block;padding:5px 10px}.eae-flip-box-front{background:#a0ce4e}.eae-flip-box-back{background:#73b9dc}@media only screen and (max-width:768px){.eae-flip-box-back,.eae-flip-box-front,.flipbox-content{cursor:pointer;overflow:visible!important;transform-style:preserve-3d;-webkit-transform-style:preserve-3d}}.elementor-widget-wts-shape-separator svg{display:block}.wts-eae-pl-wrapper ul{margin:0}.wts-eae-pl-wrapper ul li{list-style:none;overflow:hidden;margin-bottom:10px}.eae-pl-img-align-none .eae-pl-image-wrapper a{text-align:center}.eae-pl-title{margin:0}.eae-pl-title a{display:block}.eae-pl-readmore a{display:inline-block;border-radius:2px;color:#fff;padding:4px 8px}.eae-at-animation-text-wrapper{display:inline-block;position:relative;text-align:left}.eae-at-animation-text-wrapper .eae-at-animation-text{display:inline-block;position:absolute;white-space:nowrap;left:0;top:0}[data-elementor-device-mode=mobile] .eae-at-animation-text{white-space:normal}.eae-at-animation-text-wrapper .eae-at-animation-text.is-visible{position:relative}.no-js .eae-at-animation-text-wrapper .eae-at-animation-text{opacity:0}.no-js .eae-at-animation-text-wrapper .eae-at-animation-text.is-visible{opacity:1}.eae-animtext-wrapper{font-size:40px}.eae-st-rest-text{display:inline-block}.eae-st-split-text{display:inline-block}body.rtl .eae-st-transform-text-title{display:flex;flex-direction:row-reverse}body.rtl .eae-text-align-left .eae-st-transform-text-title{justify-content:flex-start}body.rtl .eae-text-align-right .eae-st-transform-text-title{justify-content:flex-end}body.rtl .eae-text-align-center .eae-st-transform-text-title{justify-content:center}.eae-at-animation.type .eae-at-animation-text-wrapper{vertical-align:bottom;overflow:hidden}.eae-at-animation.type .eae-at-animation-text-wrapper::after{content:"";position:absolute;right:0;top:50%;bottom:auto;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%);height:90%;width:1px}.eae-at-animation.type .eae-at-animation-text-wrapper.waiting::after{-webkit-animation:cd-pulse 1s infinite;-moz-animation:cd-pulse 1s infinite;animation:cd-pulse 1s infinite}.eae-at-animation.type .eae-at-animation-text-wrapper.selected::after{visibility:hidden}.eae-at-animation.type .eae-at-animation-text{visibility:hidden}.eae-at-animation.type .eae-at-animation-text.is-visible{visibility:visible}.eae-at-animation.type i{position:absolute;visibility:hidden}.eae-at-animation.type i.in{position:relative;visibility:visible}@-webkit-keyframes cd-pulse{0%{-webkit-transform:translateY(-50%) scale(1);opacity:1}40%{-webkit-transform:translateY(-50%) scale(.9);opacity:0}100%{-webkit-transform:translateY(-50%) scale(0);opacity:0}}@-moz-keyframes cd-pulse{0%{-moz-transform:translateY(-50%) scale(1);opacity:1}40%{-moz-transform:translateY(-50%) scale(.9);opacity:0}100%{-moz-transform:translateY(-50%) scale(0);opacity:0}}@keyframes cd-pulse{0%{-webkit-transform:translateY(-50%) scale(1);-moz-transform:translateY(-50%) scale(1);-ms-transform:translateY(-50%) scale(1);-o-transform:translateY(-50%) scale(1);transform:translateY(-50%) scale(1);opacity:1}40%{-webkit-transform:translateY(-50%) scale(.9);-moz-transform:translateY(-50%) scale(.9);-ms-transform:translateY(-50%) scale(.9);-o-transform:translateY(-50%) scale(.9);transform:translateY(-50%) scale(.9);opacity:0}100%{-webkit-transform:translateY(-50%) scale(0);-moz-transform:translateY(-50%) scale(0);-ms-transform:translateY(-50%) scale(0);-o-transform:translateY(-50%) scale(0);transform:translateY(-50%) scale(0);opacity:0}}.eae-img-comp-container{width:100%;position:relative;text-align:center}.eae-img-comp-container img{vertical-align:middle}.eae-img-comp-img{position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;transform:translateZ(0);backface-visibility:hidden}.eae-img-comp-img img{display:block;max-width:100%;width:100%}.eae-img-comp-slider{position:absolute;z-index:9;width:40px;height:40px;background-color:#2196f3;opacity:1;border-radius:50%}.icon-horizontal{cursor:ew-resize}.icon-vertical{cursor:n-resize}.mode-horizontal .eae-img-comp-overlay img{position:absolute;left:0;top:0;display:block;width:auto;height:100%!important;max-width:none!important}.mode-vertical .eae-img-comp-overlay img{position:absolute;left:0;top:0;display:block;width:100%;height:auto!important;max-width:none!important}.eae-img-comp-slider svg,.eae-slider-icon{top:50%;transform:translateY(-50%) translateX(-50%);position:absolute;left:50%;color:#fff}.elementor-widget-wts-ab-image{text-align:center}.elementor-widget-wts-ab-image .elementor-widget-container{display:inline-block;margin:0 auto!important;overflow:hidden}.eae-text-before{position:absolute!important;padding:10px;transition:transform .3s .7s,opacity .3s .7s;color:#d36118;z-index:0;background:rgba(255,255,255,.5);margin:20px}.eae-text-after{position:absolute!important;padding:10px;transition:transform .3s .7s,opacity .3s .7s;color:#d36118;z-index:0;background:rgba(255,255,255,.5);margin:20px}.divTest{display:inline-block;background-color:#00a0d2;padding:20px}.eae-particle-wrapper{position:absolute;left:0;top:0}.eae-particle-wrapper.eae-particle-area{width:100%;height:100%}body:not(.elementor-editor-active) .eae-particle-wrapper{width:100%;height:100%}body:not(.elementor-editor-active) .eae-particle-wrapper .particles-js-canvas-el{height:100%;position:absolute;z-index:0}.eae-section-bs{position:absolute;width:100%;height:100%;top:0}.eae-section-bs-inner{width:100%;height:100%!important}.eae-popup.mfp-bg{top:0;left:0;width:100%;height:100%;z-index:1042;overflow:hidden;position:fixed;background:#0b0b0b;opacity:.8}.eae-popup-link{padding:12px 24px;color:#fff;display:inline-flex;line-height:1}.eae-popup-link svg{fill:#fff}.eae-popup-link:hover{color:#fff}.eae-popup.mfp-wrap{top:0;left:0;width:100%;height:100%;z-index:1043;position:fixed;outline:0!important;-webkit-backface-visibility:hidden}.eae-popup .mfp-container{text-align:center;position:absolute;width:100%;height:100%;left:0;top:0;padding:0 8px;box-sizing:border-box}.eae-popup .mfp-container:before{content:"";display:inline-block;height:100%;vertical-align:middle}.eae-popup .mfp-align-top .mfp-container:before{display:none}.eae-popup .mfp-content{position:relative;display:inline-block;vertical-align:middle;margin:0 auto;text-align:left;z-index:1045}.eae-modal-content{padding:20px}.eae-pop-btn-align-left .eae-popup-wrapper{text-align:left}.eae-pop-btn-align-right .eae-popup-wrapper{text-align:right}.eae-pop-btn-align-center .eae-popup-wrapper{text-align:center}.eae-pop-btn-align-justify .eae-popup-wrapper{text-align:center}.eae-pop-btn-align-justify .eae-popup-wrapper a{display:block}.eae-popup .mfp-ajax-holder .mfp-content,.eae-popup .mfp-inline-holder .mfp-content{width:50%;background-color:#fff;cursor:auto;overflow:hidden}.eae-popup .mfp-ajax-cur{cursor:progress}.eae-popup .mfp-zoom-out-cur,.eae-popup .mfp-zoom-out-cur .mfp-image-holder .eae-close{cursor:-moz-zoom-out;cursor:-webkit-zoom-out;cursor:zoom-out}.eae-popup .mfp-zoom{cursor:pointer;cursor:-webkit-zoom-in;cursor:-moz-zoom-in;cursor:zoom-in}.eae-popup.mfp-auto-cursor .mfp-content{cursor:auto}.eae-popup .eae-close,.eae-popup .mfp-arrow,.eae-popup .mfp-counter,.eae-popup .mfp-preloader{-webkit-user-select:none;-moz-user-select:none;user-select:none}.mfp-loading.mfp-figure{display:none}.mfp-hide{display:none!important}.eae-popup .mfp-preloader{color:#ccc;position:absolute;top:50%;width:auto;text-align:center;margin-top:-.8em;left:8px;right:8px;z-index:1044}.eae-popup .mfp-preloader a{color:#ccc}.eae-popup .mfp-preloader a:hover{color:#fff}.mfp-s-ready .mfp-preloader{display:none}.mfp-s-error .mfp-content{display:none}button.eae-close,button.mfp-arrow{overflow:visible;cursor:pointer;background:0 0;border:0;-webkit-appearance:none;display:block;outline:0;padding:0;z-index:1046;box-shadow:none;touch-action:manipulation}button::-moz-focus-inner{padding:0;border:0}.eae-popup .eae-close{width:28px;height:28px;line-height:1em;position:absolute;right:10px;top:10px;text-decoration:none;text-align:center;opacity:1;color:#fff;font-size:28px;z-index:1500}.eae-close:focus,.eae-close:hover{opacity:1;cursor:pointer}.eae-close:active{top:1px}.eae-close:before{top:50%;left:50%;position:absolute;transform:translate(-50%,-50%)}.eae-popup.eae-close-btn-in .eae-close{color:#fff}.mfp-iframe-holder .eae-close,.mfp-image-holder .eae-close{color:#fff;right:-6px;text-align:right;padding-right:6px;width:100%}.mfp-counter{position:absolute;top:0;right:0;color:#ccc;font-size:12px;line-height:18px;white-space:nowrap}.mfp-arrow{position:absolute;opacity:.65;margin:0;top:50%;margin-top:-55px;padding:0;width:90px;height:110px;-webkit-tap-highlight-color:transparent}.mfp-arrow:active{margin-top:-54px}.mfp-arrow:focus,.mfp-arrow:hover{opacity:1}.mfp-arrow:after,.mfp-arrow:before{content:"";display:block;width:0;height:0;position:absolute;left:0;top:0;margin-top:35px;margin-left:35px;border:medium inset transparent}.mfp-arrow:after{border-top-width:13px;border-bottom-width:13px;top:8px}.mfp-arrow:before{border-top-width:21px;border-bottom-width:21px;opacity:.7}.mfp-arrow-left{left:0}.mfp-arrow-left:after{border-right:17px solid #fff;margin-left:31px}.mfp-arrow-left:before{margin-left:25px;border-right:27px solid #3f3f3f}.mfp-arrow-right{right:0}.mfp-arrow-right:after{border-left:17px solid #fff;margin-left:39px}.mfp-arrow-right:before{border-left:27px solid #3f3f3f}.mfp-iframe-holder{padding-top:40px;padding-bottom:40px}.mfp-iframe-holder .mfp-content{line-height:0;width:100%;max-width:900px}.mfp-iframe-holder .eae-close{top:-40px}.mfp-iframe-scaler{width:100%;height:0;overflow:hidden;padding-top:56.25%}.mfp-iframe-scaler iframe{position:absolute;display:block;top:0;left:0;width:100%;height:100%;box-shadow:0 0 8px rgba(0,0,0,.6);background:#000}img.mfp-img{width:auto;max-width:100%;height:auto;display:block;line-height:0;box-sizing:border-box;padding:40px 0 40px;margin:0 auto}.eae-popup .mfp-figure{line-height:0}.eae-popup .mfp-figure:after{content:"";position:absolute;left:0;top:40px;bottom:40px;display:block;right:0;width:auto;height:auto;z-index:-1;box-shadow:0 0 8px rgba(0,0,0,.6);background:#444}.eae-popup .mfp-figure small{color:#bdbdbd;display:block;font-size:12px;line-height:14px}.eae-popup .mfp-figure figure{margin:0}.eae-popup .mfp-bottom-bar{margin-top:-36px;position:absolute;top:100%;left:0;width:100%;cursor:auto}.eae-popup .mfp-title{text-align:left;line-height:1;word-wrap:break-word;color:#fff;background-color:#4054b2;padding:20px 20px 20px 20px}.eae-popup .mfp-image-holder .mfp-content{max-width:100%}.eae-popup .mfp-gallery .mfp-image-holder .mfp-figure{cursor:pointer}@media screen and (max-width:800px) and (orientation:landscape),screen and (max-height:300px){.mfp-img-mobile .mfp-image-holder{padding-left:0;padding-right:0}.mfp-img-mobile img.mfp-img{padding:0}.mfp-img-mobile .mfp-figure:after{top:0;bottom:0}.mfp-img-mobile .mfp-figure small{display:inline;margin-left:5px}.mfp-img-mobile .mfp-bottom-bar{background:rgba(0,0,0,.6);bottom:0;margin:0;top:auto;padding:3px 5px;position:fixed;box-sizing:border-box}.mfp-img-mobile .mfp-bottom-bar:empty{padding:0}.mfp-img-mobile .mfp-counter{right:5px;top:3px}.mfp-img-mobile .eae-close{top:0;right:0;width:35px;height:35px;line-height:35px;background:rgba(0,0,0,.6);position:fixed;text-align:center;padding:0}}.elementor-element.eae-animated-gradient-yes,.elementor-element.eae-animated-gradient-yes .animated-gradient{background-size:400% 400%!important;-webkit-animation:AnimateGradient 15s ease-in-out infinite;-moz-animation:AnimateGradient 15s ease-in-out infinite;animation:AnimateGradient 15s ease-in-out infinite}.animated-gradient{position:absolute;top:0;left:0;height:100%;width:100%}@-webkit-keyframes AnimateGradient{0%{background-position:0 50%}50%{background-position:100% 50%}100%{background-position:0 50%}}@-moz-keyframes AnimateGradient{0%{background-position:0 50%}50%{background-position:100% 50%}100%{background-position:0 50%}}@keyframes AnimateGradient{0%{background-position:0 50%}50%{background-position:100% 50%}100%{background-position:0 50%}}.eae-swiper-outer-wrapper .swiper-slide{height:auto;overflow:inherit}.eae-swiper-outer-wrapper .swiper-slide-wrapper,.eae-swiper-outer-wrapper .testimonial-wrapper{height:100%}.eae-grid{display:flex;flex-wrap:wrap;flex-direction:row}.eae-masonry- .eae-grid-item{position:relative;height:100%}.eae-masonry- .eae-grid-item .testimonial-wrapper{height:100%}.eae-grid-container{transition:.1s all ease}.eae-grid-container{display:inline-block}.wrapper .content{margin:10px 0}.skin-2.testimonial-wrapper{display:flex;flex-direction:column;background-color:#9c989821;min-height:300px;padding:10px 20px;box-shadow:0 0 5px rgba(0,0,0,.15);color:#696969}.skin-2 .content-wrapper{padding:10px;position:relative;background-color:#fff;border-radius:10px;color:#77778e}.skin-2 i.after-content,.skin-2 i.before-content{position:absolute}.skin-2 i.before-content{top:10px;left:20px}.skin-2 i.after-content{bottom:10px;right:20px}.skin-2 blockquote{position:relative;font-size:14px;padding:10px;font-weight:500;text-align:left;margin:0;line-height:1.6em;font-style:italic}.skin-2 blockquote::after,.skin-2 blockquote::before{font-family:FontAwesome;content:"\201C";position:absolute;font-size:50px;opacity:.3;font-style:normal}.skin-2 blockquote::before{top:10px;left:20px}.skin-2 blockquote::after{content:"\201D";right:20px}.skin-2 .image-wrapper{position:relative;max-width:100%;text-align:center}.skin-2 img{width:100px;border-radius:25%}.skin-2 .detail-wrapper{text-align:center}.skin-2 .company,.skin-2 .designation,.skin-2 .rating-wrapper,.skin-2 .title{padding:5px 0}.skin-2 .rating-wrapper{color:navy}.skin-2 .title{font-weight:800;color:#000}.skin-2 blockquote p{margin:10px 0!important}.skin-1.testimonial-wrapper{display:flex;flex-direction:column;background-color:#fff;box-shadow:0 0 5px rgba(0,0,0,.15);color:#000}.skin-1 .content-wrapper{order:0}.skin-1 .image-wrapper{order:1;text-align:center;margin:15px 0}.skin-1 .detail-wrapper{order:2}.skin-1 .content-wrapper{padding:10px;position:relative}.skin-1 i.after-content,.skin-1 i.before-content{position:absolute}.skin-1 i.before-content{top:10px;left:20px}.skin-1 i.after-content{bottom:10px;right:20px}.skin-1 blockquote{position:relative;background-color:#fff;font-size:14px;padding:10px;font-weight:500;text-align:left;margin:0;line-height:1.6em;font-style:italic}.skin-1 blockquote::after,.skin-1 blockquote::before{font-family:FontAwesome;content:"\201C";position:absolute;font-size:50px;opacity:.3;font-style:normal}.skin-1 blockquote::before{top:10px;left:20px}.skin-1 blockquote::after{content:"\201D";right:20px}.skin-1 .image-wrapper{position:relative;max-width:100%}.skin-1 img{width:100px;height:auto;border-radius:50%}.skin-1 .detail-wrapper{display:flex;flex-direction:row-reverse;justify-content:space-between;padding:10px;background-color:rgba(157,163,156,.18)}.skin-1 .designation,.skin-1 .rating-wrapper,.skin-1 .title{margin:0 5px}.skin-1 .title-wrapper{display:flex;flex-direction:row}.skin-1 .rating-wrapper{color:#fecc1f}.skin-4.testimonial-wrapper{flex-direction:column;display:flex;background-color:#bfbfb6bd;min-height:300px;padding:10px 0;box-shadow:0 0 5px rgba(0,0,0,.15);color:#77778e}.skin-4 .content-wrapper{padding:10px;position:relative}.skin-4 .content-wrapper{order:2;color:#3c3c3c}.skin-4 i.after-content,.skin-4 i.before-content{position:absolute}.skin-4 i.before-content{top:10px;left:20px}.skin-4 i.after-content{bottom:10px;right:20px}.skin-4 blockquote{position:relative;font-size:14px;padding:10px;font-weight:500;text-align:left;margin:0;line-height:1.6em;font-style:italic}.skin-4 blockquote::after,.skin-4 blockquote::before{font-family:FontAwesome;content:"\201C";position:absolute;font-size:50px;opacity:.3;font-style:normal}.skin-4 blockquote::before{top:10px;left:20px}.skin-4 blockquote::after{content:"\201D";right:20px}.skin-4 .image-wrapper{position:relative;max-width:100%;text-align:center}.skin-4 img{width:100px;border-radius:50%}.skin-4 .detail-wrapper{text-align:center}.skin-2 .designation,.skin-2 .title,.skin-4 .rating-wrapper{padding:5px 0}.skin-4 .rating-wrapper{color:#690a69}.skin-4 .title{font-weight:800;color:#000}.skin-3.testimonial-wrapper{display:flex;flex-direction:row;background-color:#9c989821;box-shadow:0 0 5px rgba(0,0,0,.15);color:#000;overflow:hidden}.skin-3 .content-section{display:flex;flex-direction:column;align-self:center}.skin-3 .content-wrapper{padding:10px;position:relative}.skin-2 i.after-content,.skin-3 i.before-content{position:absolute}.skin-3 i.before-content{top:10px;left:20px}.skin-3 i.after-content{bottom:10px;right:20px}.skin-3 blockquote{position:relative;font-size:18px;padding:10px;font-weight:500;text-align:left;margin:0;line-height:1.6em;font-style:italic}.skin-3 blockquote::after,.skin-3 blockquote::before{font-family:FontAwesome;content:"\201C";position:absolute;font-size:50px;opacity:.3;font-style:normal}.skin-3 blockquote::before{top:10px;left:20px}.skin-3 blockquote::after{content:"\201D";right:20px}.skin-3 .image-wrapper{position:relative;max-width:30%;max-height:250px;text-align:center;align-self:center}.skin-3 img{width:100%}.testimonial-wrapper .skin-3 .eae-person-avatar{border-radius:50%}.skin-3 .detail-wrapper{text-align:left;padding-left:20px}.skin-3 .designation,.skin-3 .rating-wrapper,.skin-3 .title{padding:3px 0}.skin-3 .rating-wrapper{color:#800040}.skin-3 .title{font-weight:800}.eae-swiper-outer-wrapper .swiper-button-prev{-webkit-mask:url(arrow-left.svg) no-repeat 100% 100%;mask:url(arrow-left.svg) no-repeat 100% 100%;-webkit-mask-size:cover;mask-size:cover;background-image:none;background-color:#007aff;transform:translateY(-50%);margin-top:0}.eae-swiper-outer-wrapper .swiper-container-rtl .swiper-button-prev{-webkit-mask:url(arrow-right.svg) no-repeat 100% 100%;mask:url(arrow-right.svg) no-repeat 100% 100%}.eae-swiper-outer-wrapper .swiper-button-next{-webkit-mask:url(arrow-right.svg) no-repeat 100% 100%;mask:url(arrow-right.svg) no-repeat 100% 100%;-webkit-mask-size:cover;mask-size:cover;background-image:none;background-color:#007aff;transform:translateY(-50%);margin-top:0}.eae-swiper-outer-wrapper .swiper-container-rtl .swiper-button-next{-webkit-mask:url(arrow-left.svg) no-repeat 100% 100%;mask:url(arrow-left.svg) no-repeat 100% 100%}.elementor-widget-wts-testimonial-slider .eae-swiper-outer-wrapper .swiper-button-next,.elementor-widget-wts-testimonial-slider .eae-swiper-outer-wrapper .swiper-button-prev{-webkit-mask:none;mask:none;-webkit-mask-size:unset;mask-size:unset;background-image:none;background-color:unset;width:auto;height:auto;transform:translateY(-50%);margin-top:0}.swiper-container .swiper-button-next i,.swiper-container .swiper-button-prev i{width:1em;height:1em;text-align:center;position:relative}.elementor-widget-wts-testimonial-slider .eae-swiper-outer-wrapper .eae-swiper-button-wrapper{position:absolute;height:auto;line-height:0}.eae-hpos-right.eae-vpos-top .eae-swiper-button-wrapper{bottom:auto;top:0;width:auto;right:0}.eae-vpos-top.eae-hpos-left .eae-swiper-button-wrapper{bottom:auto;top:0;width:auto;left:0}.eeae-hpos-right.eae-vpos-bottom .eae-swiper-button-wrapper{bottom:0;top:auto;width:auto;right:0}.eae-vpos-bottom.eae-hpos-left .eae-swiper-button-wrapper{bottom:0;top:auto;width:auto;left:0}.eae-hpos-right.eae-vpos-middle .eae-swiper-button-wrapper{bottom:auto;top:50%;width:auto;right:0}.eae-hpos-left.eae-vpos-middle .eae-swiper-button-wrapper{bottom:auto;top:50%;width:auto;left:0}.eae-hpos-left .swiper-button-next,.eae-hpos-left .swiper-button-prev,.eae-hpos-right .swiper-button-next,.eae-hpos-right .swiper-button-prev{position:relative;display:inline-block;right:auto;left:auto}.eae-hpos-right.eae-vpos-bottom .swiper-button-next,.eae-hpos-right.eae-vpos-bottom .swiper-button-prev{top:auto;bottom:0;transform:unset}.eae-hpos-right.eae-vpos-top .swiper-button-next,.eae-hpos-right.eae-vpos-top .swiper-button-prev{top:0;bottom:auto;transform:unset}.eae-hpos-left.eae-vpos-top .swiper-button-next,.eae-hpos-left.eae-vpos-top .swiper-button-prev{top:0;bottom:auto;transform:unset}.eae-hpos-left.eae-vpos-bottom .swiper-button-next,.eae-hpos-left.eae-vpos-bottom .swiper-button-prev{top:auto;bottom:0;transform:unset}.eae-hpos-center.eae-vpos-bottom .swiper-button-next,.eae-hpos-center.eae-vpos-bottom .swiper-button-prev{top:auto;bottom:0;transform:unset}.eae-hpos-center.eae-vpos-top .swiper-button-next,.eae-hpos-center.eae-vpos-top .swiper-button-prev{top:0;bottom:auto;transform:unset}@media all and (max-width:900px){.mfp-arrow{-webkit-transform:scale(.75);transform:scale(.75)}.mfp-arrow-left{-webkit-transform-origin:0;transform-origin:0}.mfp-arrow-right{-webkit-transform-origin:100%;transform-origin:100%}.mfp-container{padding-left:6px;padding-right:6px}}.eae-info-circle{position:relative;width:90%;margin:0 auto;border-radius:50%;display:block}.eae-info-circle:before{content:"";display:block;position:absolute;top:4%;left:4%;width:92%;height:92%;border-radius:50%;z-index:1;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;pointer-events:none}.eae-info-circle:after{content:"";display:block;padding-top:100%}.eae-info-circle .eae-ic-icon-wrap{position:absolute;display:inline-block;top:50%;left:50%;z-index:2;line-height:1em;vertical-align:middle;overflow:hidden;max-width:100%}.eae-info-circle .eae-info-circle-item{top:0;left:0;width:100%;height:100%;display:block}.eae-info-circle .eae-info-circle-item.eae-active .eae-info-circle-item__content-wrap{visibility:visible;opacity:1;display:flex}.eae-info-circle .eae-info-circle-item__content-wrap{visibility:visible;display:none;height:91%;width:91%;opacity:0;top:50%;transform:translateY(-50%) translateX(-50%);position:absolute;left:50%;border-radius:50%;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.eae-info-circle .eae-info-circle-item__content-wrap:before{content:"";display:inline-block;height:100%;vertical-align:middle}.eae-info-circle .eae-info-circle-item__content{display:inline-block;top:50%;transform:translateY(-50%) translateX(-50%);position:absolute;left:50%;vertical-align:middle;z-index:1;max-height:100%;overflow:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;text-align:center;width:75%}@media screen and (max-width:767px){.eae-info-circle.eae-info-circle .eae-info-circle-item__content-wrap:before{display:none}.eae-info-circle:after,.eae-info-circle:before{display:none}.eae-info-circle{width:100%!important}.eae-info-circle-wrapper:after,.eae-info-circle-wrapper:before{display:none}.eae-info-circle .eae-ic-icon-wrap{display:block;text-align:center;position:relative!important;left:unset!important;margin-left:0!important;margin-top:0!important;margin-bottom:10px}.eae-info-circle-item{position:relative!important;border-radius:0!important;padding:0;margin:10px 0}.eae-info-circle .eae-info-circle-item__content-wrap{visibility:visible;opacity:1!important;display:flex!important;border-radius:0!important;border:none!important;margin:0!important;padding-right:0!important;padding-left:0!important;padding-bottom:0!important;width:100%;height:auto;line-height:1.5em;position:relative;top:unset;left:unset;transform:unset}.eae-info-circle .eae-info-circle-item__content{position:relative;top:unset;left:unset;transform:unset;width:100%;padding:10px}}.eae-icon-wrap i{height:1.25em;width:1.25em;line-height:1.25em;display:block}.eae-icon-wrap i img{top:50%;left:50%;transform:translateX(-50%) translateY(-50%);position:absolute}.eae-icon{display:inline-block;text-align:center;vertical-align:middle;max-width:100%;overflow:hidden;padding:10px}.eae-icon-shape-circle:not(.elementor-element){border-radius:50%}.eae-icon-view-framed:not(.elementor-element){border-width:1px;border-style:solid}.eae-icon-wrapper{display:flex}.eae-icon-wrapper .eae-icon{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);line-height:1}.eae-timeline{position:relative;display:inline-block;width:100%}.eae-timline-progress-bar{width:4px;background-color:#f45b69;top:0;bottom:50px;position:absolute;transform:translateX(-50%)}.eae-timeline-item{position:relative;display:flex;flex-direction:row;padding-bottom:50px}.eae-timeline-item:last-child{padding-bottom:0!important}.eae-tl-top .eae-timeline-item{align-items:flex-start}.eae-tl-top .eae-tl-item-content::before{top:10px}.eae-timeline-item.image-position-row .eae-tl-item-image,.eae-timeline-item.image-position-row-reverse .eae-tl-item-image{margin-top:0;margin-bottom:0}.eae-tl-item-meta-wrapper-inner{display:none}.eae-tl-bottom .eae-timeline-item{align-items:flex-end}.eae-tl-bottom .eae-tl-item-content::before{bottom:10px}.eae-tl-center .eae-timeline-item{align-items:center}.eae-tl-center .eae-tl-item-content::before{bottom:calc(50% - 5px)}.eae-layout-center .eae-timline-progress-bar{left:50%}.eae-layout-center .eae-timeline-item:nth-child(odd){flex-direction:row-reverse}.eae-layout-center .eae-timeline-item:nth-child(odd) .eae-tl-item-meta-wrapper{margin-right:0;margin-left:0;justify-content:flex-start}body.rtl[data-elementor-device-mode=tablet] .eae-layout-center .eae-timeline-item:nth-child(even) .eae-tl-content-wrapper,body:not(.rtl)[data-elementor-device-mode=tablet] .eae-layout-center .eae-timeline-item:nth-child(odd) .eae-tl-content-wrapper{padding-right:20px;padding-left:0}body.rtl[data-elementor-device-mode=tablet] .eae-layout-center .eae-timeline-item:nth-child(odd) .eae-tl-content-wrapper,body:not(.rtl)[data-elementor-device-mode=tablet] .eae-layout-center .eae-timeline-item:nth-child(even) .eae-tl-content-wrapper{padding-right:0;padding-left:20px}body:not(.rtl) .eae-layout-left .eae-tl-content-wrapper{padding-right:10px;padding-left:20px}body.rtl .eae-layout-left .eae-tl-content-wrapper{padding-right:20px;padding-left:10px}.eae-layout-left .eae-timline-progress-bar{display:none}.eae-layout-left .eae-tl-item-meta-wrapper{display:none}.eae-layout-left .eae-tl-item-meta-wrapper-inner{display:block}.eae-layout-right .eae-timline-progress-bar{display:none}body:not(.rtl) .eae-layout-right .eae-tl-content-wrapper{padding-right:20px;padding-left:10px}body.rtl .eae-layout-right .eae-tl-content-wrapper{padding-right:10px;padding-left:20px}.eae-layout-right .eae-tl-icon-wrapper{order:3}.eae-layout-right .eae-tl-item-meta-wrapper{display:none}.eae-layout-right .eae-tl-item-meta-wrapper-inner{display:block}.eae-tl-item-meta-wrapper{flex-grow:1;order:0;flex-basis:50%;flex-direction:initial;justify-content:flex-end;display:flex;align-items:center;margin-right:0}.eae-tl-item-meta{padding:0 20px}.eae-tl-icon-wrapper{height:auto;width:auto;flex-grow:0;flex-shrink:0;order:1;margin-left:0;margin-right:0;min-width:10px;min-height:10px;border-radius:999px;position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.eae-tl-content-wrapper{flex-grow:1;order:2;flex-basis:50%;position:relative;padding-right:0;padding-left:20px}.eae-tl-item-content{background:#f4f4f4;padding:25px;overflow:hidden;text-align:center;display:flex;flex-direction:row}.eae-tl-content{display:inline-block;position:relative;padding:10px;width:100%;color:#000}.eae-timeline-item.custom-image-style-yes.image-position-row .eae-content-inner,.eae-timeline-item.custom-image-style-yes.image-position-row-reverse .eae-content-inner,.image-position-row .eae-timeline .eae-timeline-item:not(.custom-image-style-yes) .eae-content-inner,.image-position-row-reverse .eae-timeline .eae-timeline-item:not(.custom-image-style-yes) .eae-content-inner{position:relative;left:50%;top:50%;transform:translate(-50%,-50%);line-height:1;width:100%}.custom-image-style-.image-position-row .eae-content-inner,.custom-image-style-.image-position-row-reverse .eae-content-inner,.custom-image-style-no.image-position-row .eae-content-inner,.custom-image-style-no.image-position-row-reverse .eae-content-inner{left:unset;top:unset;transform:unset}.eae-tl-item-image{display:inline-block}.image-position-row .eae-tl-item-image img,.image-position-row-reverse .eae-tl-item-image img{object-fit:cover;height:100%!important}.image-position-row .eae-tl-item-image,.image-position-row-reverse .eae-tl-item-image{margin:0}.image-position-column .eae-tl-item-image{margin:auto}.custom-image-style-.image-position-column .eae-tl-item-image,.custom-image-style-no.image-position-column .eae-tl-item-image{margin:0 auto}.eae-pb-inner-line{width:100%;background-color:#3d5ac3}.eae-tl-item-content::before{content:"";position:absolute;width:0;height:0;border-style:solid;border-width:8px 16px 8px 0;border-color:transparent #f4f4f4 transparent transparent}.eae-icon-wrapper{display:flex}.elementor-widget-bpel-timeline .eae-icon-wrapper{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);line-height:1}.eae-tl-read-more{display:inline-block;padding:5px;border:2px solid #000}.image-position-row .eae-timeline.eae-timeline-alternate-yes .eae-timeline-item:nth-child(odd):not(.custom-image-style-yes) .eae-tl-item-content{flex-direction:row-reverse!important}.image-position-row-reverse .eae-timeline.eae-timeline-alternate-yes .eae-timeline-item:nth-child(odd):not(.custom-image-style-yes) .eae-tl-item-content{flex-direction:row!important}@media screen and (min-width:1024px){.eae-layout-center .eae-timeline-item:nth-child(odd) .eae-tl-content-wrapper,body.rtl .eae-layout-center .eae-timeline-item:nth-child(even) .eae-tl-content-wrapper{padding-right:20px;padding-left:0}.eae-layout-center .eae-timeline-item:nth-child(even) .eae-tl-content-wrapper,body.rtl .eae-layout-center .eae-timeline-item:nth-child(odd) .eae-tl-content-wrapper{padding-right:0;padding-left:20px}.eae-layout-center .eae-timeline-item:nth-child(odd) .eae-tl-item-content::before,.eae-layout-right .eae-tl-item-content::before,body.rtl .eae-layout-center .eae-timeline-item:nth-child(even) .eae-tl-item-content::before,body.rtl .eae-layout-left .eae-tl-item-content::before{right:4px;left:unset;border-width:8px 0 8px 16px;border-color:transparent transparent transparent #f4f4f4}.eae-layout-center .eae-timeline-item:nth-child(even) .eae-tl-item-content::before,.eae-layout-left .eae-tl-item-content::before,body.rtl .eae-layout-center .eae-timeline-item:nth-child(odd) .eae-tl-item-content::before,body.rtl .eae-layout-right .eae-tl-item-content::before{left:4px;right:unset;border-width:8px 16px 8px 0;border-color:transparent #f4f4f4 transparent transparent}}@media screen and (max-width:1023px) and (min-width:768px){.image-position-row .eae-timeline.eae-timeline-alternate-yes .eae-timeline-item:nth-child(odd):not(.custom-image-style-yes) .eae-tl-item-content{flex-direction:row-reverse!important}.image-position-row-reverse .eae-timeline.eae-timeline-alternate-yes .eae-timeline-item:nth-child(odd):not(.custom-image-style-yes) .eae-tl-item-content{flex-direction:row!important}.eae-tl-res-style-mobile-tablet .eae-tl-item-meta-wrapper{display:none}.eae-tl-res-style-mobile-tablet .eae-tl-item-meta-wrapper-inner{display:block}.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-left .eae-timeline-item{flex-direction:row!important}.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-right .eae-timeline-item{flex-direction:row-reverse!important}.eae-layout-center.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-left .eae-timeline-item .eae-tl-item-content::before,.eae-timeline.eae-layout-center.eae-tl-res-style-mobile .eae-timeline-item:nth-child(even) .eae-tl-item-content::before,body.rtl .eae-layout-center.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-right .eae-timeline-item .eae-tl-item-content::before,body.rtl .eae-layout-right .eae-timeline-item .eae-tl-item-content::before,body.rtl .eae-layout-right .eae-tl-item-content::before,body.rtl .eae-timeline.eae-layout-center.eae-tl-res-style-mobile .eae-timeline-item:nth-child(odd) .eae-tl-item-content::before,body:not(.rtl) .eae-layout-left .eae-timeline-item .eae-tl-item-content::before,body:not(.rtl) .eae-layout-left .eae-tl-item-content::before{left:4px!important;border-width:8px 16px 8px 0!important;border-color:transparent #f4f4f4 transparent transparent!important}body.rtl .eae-timeline.eae-layout-center.eae-tl-res-style-mobile .eae-timeline-item:nth-child(odd) .eae-tl-item-content::before{left:4px!important;right:unset!important;border-width:8px 16px 8px 0!important;border-color:transparent #f4f4f4 transparent transparent!important}.eae-timeline.eae-layout-center.eae-tl-res-style-mobile .eae-timeline-item:nth-child(odd) .eae-tl-item-content::before,body.rtl .eae-layout-center.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-left .eae-timeline-item .eae-tl-item-content::before,body.rtl .eae-layout-left .eae-timeline-item .eae-tl-item-content::before,body.rtl .eae-layout-left .eae-tl-item-content::before,body.rtl .eae-timeline.eae-layout-center.eae-tl-res-style-mobile .eae-timeline-item:nth-child(even) .eae-tl-item-content::before,body:not(.rtl) .eae-layout-center.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-right .eae-timeline-item .eae-tl-item-content::before,body:not(.rtl) .eae-layout-right .eae-timeline-item .eae-tl-item-content::before,body:not(.rtl) .eae-layout-right .eae-tl-item-content::before,body:not(.rtl) .eae-tl-res-style-mobile-tablet.eae-tl-res-layout-right .eae-timeline-item .eae-tl-item-content::before{right:4px!important;border-width:8px 0 8px 16px!important;border-color:transparent transparent transparent #f4f4f4!important}.eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-left .eae-timeline-item .eae-tl-content-wrapper,body.rtl .eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-right .eae-timeline-item .eae-tl-content-wrapper{padding-right:0!important;padding-left:20px!important}.eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-right .eae-timeline-item .eae-tl-content-wrapper,body.rtl .eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-left .eae-timeline-item .eae-tl-content-wrapper{padding-right:20px!important;padding-left:0!important}.eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-left .eae-timline-progress-bar{left:13px}.eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-right .eae-timline-progress-bar{left:calc(100% - 13px)}}@media screen and (max-width:767px){.eae-tl-item-meta-wrapper{display:none}.eae-tl-item-meta-wrapper-inner{display:block}.elementor-widget-bpel-timeline:not(.image-position-column) .eae-timeline .eae-tl-item-content{flex-direction:column-reverse!important}.eae-tl-item-image,.elementor-widget-bpel-timeline:not(.image-position-column) .eae-tl-content{width:100%!important}.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-left .eae-timeline-item,.eae-tl-res-style-mobile.eae-tl-res-layout-left .eae-timeline-item{flex-direction:row!important}.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-right .eae-timeline-item,.eae-tl-res-style-mobile.eae-tl-res-layout-right .eae-timeline-item{flex-direction:row-reverse!important}.eae-timeline.eae-layout-center.eae-tl-center.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-left .eae-timeline-item:nth-child(odd) .eae-tl-item-content::before,.eae-timeline.eae-layout-center.eae-tl-center.eae-tl-res-style-mobile.eae-tl-res-layout-left .eae-timeline-item:nth-child(odd) .eae-tl-item-content::before,body.rtl .eae-timeline.eae-layout-right .eae-timeline-item .eae-tl-item-content::before,body.rtl .eae-timeline.eae-tl-res-style-mobile.eae-tl-res-layout-right .eae-timeline-item .eae-tl-item-content::before,body:not(.rtl) .eae-layout-left .eae-timeline-item .eae-tl-item-content::before,body:not(.rtl) .eae-tl-res-style-mobile-tablet.eae-tl-res-layout-left .eae-timeline-item .eae-tl-item-content::before,body:not(.rtl) .eae-tl-res-style-mobile.eae-tl-res-layout-left .eae-timeline-item .eae-tl-item-content::before{left:4px!important;border-width:8px 16px 8px 0!important;border-color:transparent #f4f4f4 transparent transparent!important}body.rtl .eae-layout-left .eae-timeline-item .eae-tl-item-content::before,body.rtl .eae-tl-res-style-mobile.eae-tl-res-layout-left .eae-timeline-item .eae-tl-item-content::before,body:not(.rtl) .eae-layout-right .eae-timeline-item .eae-tl-item-content::before,body:not(.rtl) .eae-tl-res-style-mobile-tablet.eae-tl-res-layout-right .eae-timeline-item .eae-tl-item-content::before,body:not(.rtl) .eae-tl-res-style-mobile.eae-tl-res-layout-right .eae-timeline-item .eae-tl-item-content::before{right:4px!important;border-width:8px 0 8px 16px!important;border-color:transparent transparent transparent #f4f4f4!important}.eae-timeline.eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-right .eae-timeline-item .eae-tl-content-wrapper,body:not(.rtl) .eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-left .eae-timeline-item .eae-tl-content-wrapper body.rtl .eae-timeline.eae-tl-res-style-mobile.eae-layout-center.eae-tl-res-layout-right .eae-timeline-item .eae-tl-content-wrapper,body:not(.rtl) .eae-tl-res-style-mobile.eae-layout-center.eae-tl-res-layout-left .eae-timeline-item .eae-tl-content-wrapper{padding-right:0!important;padding-left:20px!important}body.rtl .eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-left .eae-timeline-item .eae-tl-content-wrapper,body.rtl .eae-tl-res-style-mobile.eae-layout-center.eae-tl-res-layout-left .eae-timeline-item .eae-tl-content-wrapper,body:not(.rtl) .eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-right .eae-timeline-item .eae-tl-content-wrapper,body:not(.rtl) .eae-tl-res-style-mobile.eae-layout-center.eae-tl-res-layout-right .eae-timeline-item .eae-tl-content-wrapper{padding-right:20px!important;padding-left:0!important}.eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-left .eae-timline-progress-bar,.eae-tl-res-style-mobile.eae-layout-center.eae-tl-res-layout-left .eae-timline-progress-bar{left:13px}.eae-tl-res-style-mobile-tablet.eae-layout-center.eae-tl-res-layout-right .eae-timline-progress-bar,.eae-tl-res-style-mobile.eae-layout-center.eae-tl-res-layout-right .eae-timline-progress-bar{left:calc(100% - 13px)}body.rtl .eae-layout-center.eae-timeline.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-right .eae-timeline-item .eae-tl-content-wrapper .eae-tl-item-content::before{left:4px;right:unset}body.rtl .eae-layout-center.eae-timeline.eae-tl-res-style-mobile-tablet.eae-tl-res-layout-left .eae-timeline-item .eae-tl-content-wrapper .eae-tl-item-content::before{left:unset;right:4px;border-width:8px 0 8px 16px!important;border-color:transparent transparent transparent #f4f4f4!important}}[data-element_type="eae-evergreen-timer.skin1"] .eae-evergreen-wrapper{display:block;text-align:center}[data-element_type="eae-evergreen-timer.skin1"] #eaeclockdiv{font-family:sans-serif;color:#fff;display:inline-block;font-weight:100;text-align:center;font-size:30px}[data-element_type="eae-evergreen-timer.skin1"] .eae-time-wrapper{padding:10px;border-radius:3px;background:#00bf96;display:inline-block;overflow:hidden}[data-element_type="eae-evergreen-timer.skin1"] #eaeclockdiv div>span{padding:15px;width:100%;background:#00816a;display:inline-block}[data-element_type="eae-evergreen-timer.skin1"] .smalltext{padding:7px;font-size:16px}[data-element_type="eae-evergreen-timer.skin1"] .eae-egt-hide{display:none}.eae-egt-message{display:none}@media screen and (max-width:767px){[data-element_type="eae-evergreen-timer.skin1"] #eaeclockdiv div>span{padding:5px}[data-element_type="eae-evergreen-timer.skin1"] .eae-time-wrapper{padding:5px}}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-o-backface-visibility:hidden;backface-visibility:hidden}[data-element_type="eae-evergreen-timer.skin2"] .eae-evergreen-wrapper{display:inline-block;width:100%;text-align:center;margin:auto}[data-element_type="eae-evergreen-timer.skin2"] .timer-container{display:inline-block}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper a{cursor:pointer;text-decoration:none;color:#ccc}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper a:hover{color:#fff}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul{list-style:none}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper.clearfix:after,[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper.clearfix:before{content:" ";display:table}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper.clearfix:after{clear:both}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper{font:normal 11px "Helvetica Neue",Helvetica,sans-serif;-webkit-user-select:none}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-meridium{background:0 0!important;box-shadow:0 0 0!important;font-size:36px!important}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-meridium a{color:#313333}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper{text-align:center;position:relative;width:100%;margin:1em}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper:after,[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper:before{content:" ";display:table}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper:after{clear:both}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul{position:relative;float:left;margin:5px;width:60px;height:90px;font-size:80px;font-weight:700;line-height:87px;border-radius:6px;background:#000}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li{z-index:1;position:absolute;left:0;top:0;width:100%;height:100%;line-height:87px;text-decoration:none!important}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li:first-child{z-index:2}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li a{display:block;height:100%;-webkit-perspective:200px;-moz-perspective:200px;perspective:200px;margin:0!important;overflow:visible!important;cursor:default!important}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li a div{z-index:1;position:absolute;left:0;width:100%;height:50%;font-size:80px;overflow:hidden;outline:1px solid transparent}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li a div .shadow{position:absolute;width:100%;height:100%;z-index:2}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li a div.up{-webkit-transform-origin:50% 100%;-moz-transform-origin:50% 100%;-ms-transform-origin:50% 100%;-o-transform-origin:50% 100%;transform-origin:50% 100%;top:0}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li a div.up:after{content:"";position:absolute;top:44px;left:0;z-index:5;width:100%;height:3px;background-color:#000;background-color:rgba(0,0,0,.4)}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li a div.down{-webkit-transform-origin:50% 0;-moz-transform-origin:50% 0;-ms-transform-origin:50% 0;-o-transform-origin:50% 0;transform-origin:50% 0;bottom:0;border-bottom-left-radius:6px;border-bottom-right-radius:6px}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li a div div.inn{position:absolute;left:0;z-index:1;width:100%;height:200%;color:#ccc;text-shadow:0 1px 2px #000;text-align:center;background-color:#333;border-radius:6px;font-size:70px}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li a div.up div.inn{top:0}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li a div.down div.inn{bottom:0}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul.play li.flip-clock-before{z-index:3}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper .flip{box-shadow:0 2px 5px rgba(0,0,0,.7)}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul.play li.flip-clock-active{-webkit-animation:asd 10ms .49s linear both;-moz-animation:asd 10ms .49s linear both;animation:asd 10ms .49s linear both;z-index:5}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-divider{float:left;display:inline-block;position:relative;width:20px;height:100px}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-divider:first-child{width:0}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-dot{display:block;background:#323434;width:10px;height:10px;position:absolute;border-radius:50%;box-shadow:0 0 5px rgba(0,0,0,.5);left:5px}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-divider .flip-clock-label{position:absolute;top:-1.5em;right:-86px;color:#000;text-shadow:none}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-divider.minutes .flip-clock-label{right:-88px}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-divider.seconds .flip-clock-label{right:-91px}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-dot.top{top:30%}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-dot.bottom{bottom:30%}@-webkit-keyframes asd{0%{z-index:2}100%{z-index:4}}@-moz-keyframes asd{0%{z-index:2}100%{z-index:4}}@-o-keyframes asd{0%{z-index:2}100%{z-index:4}}@keyframes asd{0%{z-index:2}100%{z-index:4}}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul.play li.flip-clock-active .down{z-index:2;-webkit-animation:turn .5s .5s linear both;-moz-animation:turn .5s .5s linear both;animation:turn .5s .5s linear both}@-webkit-keyframes turn{0%{-webkit-transform:rotateX(90deg)}100%{-webkit-transform:rotateX(0)}}@-moz-keyframes turn{0%{-moz-transform:rotateX(90deg)}100%{-moz-transform:rotateX(0)}}@-o-keyframes turn{0%{-o-transform:rotateX(90deg)}100%{-o-transform:rotateX(0)}}@keyframes turn{0%{transform:rotateX(90deg)}100%{transform:rotateX(0)}}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul.play li.flip-clock-before .up{z-index:2;-webkit-animation:turn2 .5s linear both;-moz-animation:turn2 .5s linear both;animation:turn2 .5s linear both}@-webkit-keyframes turn2{0%{-webkit-transform:rotateX(0)}100%{-webkit-transform:rotateX(-90deg)}}@-moz-keyframes turn2{0%{-moz-transform:rotateX(0)}100%{-moz-transform:rotateX(-90deg)}}@-o-keyframes turn2{0%{-o-transform:rotateX(0)}100%{-o-transform:rotateX(-90deg)}}@keyframes turn2{0%{transform:rotateX(0)}100%{transform:rotateX(-90deg)}}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li.flip-clock-active{z-index:3}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul.play li.flip-clock-before .up .shadow{background:-moz-linear-gradient(top,rgba(0,0,0,.1) 0,#000 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,rgba(0,0,0,.1)),color-stop(100%,#000));background:linear,top,rgba(0,0,0,.1) 0,#000 100%;background:-o-linear-gradient(top,rgba(0,0,0,.1) 0,#000 100%);background:-ms-linear-gradient(top,rgba(0,0,0,.1) 0,#000 100%);background:linear,to bottom,rgba(0,0,0,.1) 0,#000 100%;-webkit-animation:show .5s linear both;-moz-animation:show .5s linear both;animation:show .5s linear both}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul.play li.flip-clock-active .up .shadow{background:-moz-linear-gradient(top,rgba(0,0,0,.1) 0,#000 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,rgba(0,0,0,.1)),color-stop(100%,#000));background:linear,top,rgba(0,0,0,.1) 0,#000 100%;background:-o-linear-gradient(top,rgba(0,0,0,.1) 0,#000 100%);background:-ms-linear-gradient(top,rgba(0,0,0,.1) 0,#000 100%);background:linear,to bottom,rgba(0,0,0,.1) 0,#000 100%;-webkit-animation:hide .5s .3s linear both;-moz-animation:hide .5s .3s linear both;animation:hide .5s .3s linear both}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul.play li.flip-clock-before .down .shadow{background:-moz-linear-gradient(top,#000 0,rgba(0,0,0,.1) 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#000),color-stop(100%,rgba(0,0,0,.1)));background:linear,top,#000 0,rgba(0,0,0,.1) 100%;background:-o-linear-gradient(top,#000 0,rgba(0,0,0,.1) 100%);background:-ms-linear-gradient(top,#000 0,rgba(0,0,0,.1) 100%);background:linear,to bottom,#000 0,rgba(0,0,0,.1) 100%;-webkit-animation:show .5s linear both;-moz-animation:show .5s linear both;animation:show .5s linear both}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul.play li.flip-clock-active .down .shadow{background:-moz-linear-gradient(top,#000 0,rgba(0,0,0,.1) 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#000),color-stop(100%,rgba(0,0,0,.1)));background:linear,top,#000 0,rgba(0,0,0,.1) 100%;background:-o-linear-gradient(top,#000 0,rgba(0,0,0,.1) 100%);background:-ms-linear-gradient(top,#000 0,rgba(0,0,0,.1) 100%);background:linear,to bottom,#000 0,rgba(0,0,0,.1) 100%;-webkit-animation:hide .5s .3s linear both;-moz-animation:hide .5s .3s linear both;animation:hide .5s .2s linear both}@-webkit-keyframes show{0%{opacity:0}100%{opacity:1}}@-moz-keyframes show{0%{opacity:0}100%{opacity:1}}@-o-keyframes show{0%{opacity:0}100%{opacity:1}}@keyframes show{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes hide{0%{opacity:1}100%{opacity:0}}@-moz-keyframes hide{0%{opacity:1}100%{opacity:0}}@-o-keyframes hide{0%{opacity:1}100%{opacity:0}}@keyframes hide{0%{opacity:1}100%{opacity:0}}@media screen and (max-width:767px){[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-divider{width:15px}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-dot{height:5px;width:5px}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul{height:40px}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-divider{height:50px}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li{line-height:37px}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul li a div div.inn{font-size:24px}[data-element_type="eae-evergreen-timer.skin2"] .eae-flip-clock-wrapper ul{margin:2px}}[data-element_type="eae-evergreen-timer.skin3"] #timer{font-family:sans-serif;color:#fff;display:inline-block;font-weight:100;text-align:center;font-size:30px}[data-element_type="eae-evergreen-timer.skin3"] .desc{display:flex;justify-content:center}[data-element_type="eae-evergreen-timer.skin3"].eae-egt-content-align-right .desc{justify-content:flex-end}[data-element_type="eae-evergreen-timer.skin3"].eae-egt-content-align-left .desc{justify-content:flex-start}[data-element_type="eae-evergreen-timer.skin3"] .desc .egt-time-text{display:inline-block;padding:0 50px 0 50px}[data-element_type="eae-evergreen-timer.skin3"] .eae-time-wrapper{padding:50px;border-radius:3px;background:#00bf96;display:inline-block;overflow:hidden;margin:5px;line-height:1em}[data-element_type="eae-evergreen-timer.skin3"] #timer span:nth-child(1){background:khaki}[data-element_type="eae-evergreen-timer.skin3"] #timer span:nth-child(2){background:#cd5c5c}[data-element_type="eae-evergreen-timer.skin3"] #timer span:nth-child(3){background:#5f9ea0}[data-element_type="eae-evergreen-timer.skin3"] #timer span:nth-child(4){background:#6495ed}[data-element_type="eae-evergreen-timer.skin3"] .fade{animation:flip .7s ease forwards}@keyframes flip{0%{transform:rotateY(0) scaleY(1.1);opacity:.5}50%{transform:rotateY(180deg) scaleY(1.3);opacity:0}100%{transform:rotateY(0);opacity:1}}@media screen and (max-width:767px){[data-element_type="eae-evergreen-timer.skin3"] #timer span{font-size:22px}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-divider .flip-clock-label{top:-1.5em;right:-42px}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-divider.minutes .flip-clock-label{right:-48px}[data-element_type="eae-evergreen-timer.skin2"] .flip-clock-divider.seconds .flip-clock-label{right:-51px}}[data-element_type="eae-evergreen-timer.skin4"] .eae-evergreen-wrapper{width:100%}[data-element_type="eae-evergreen-timer.skin4"] .container{margin:0 auto}[data-element_type="eae-evergreen-timer.skin4"] .special{position:relative;width:840px;height:47px}[data-element_type="eae-evergreen-timer.skin4"] #counter{position:absolute;z-index:4000}[data-element_type="eae-evergreen-timer.skin4"] .digit-separator{position:relative;float:left;width:17px;height:44px;overflow:hidden;background-image:url(../digit-sep-svg.svg);background-repeat:no-repeat;background-position:0 0;background-color:#4054b2}[data-element_type="eae-evergreen-timer.skin4"] .digit{background-image:url(../digits-svg-alpha.svg);background-color:#4054b2}.eae-ct-wrapper *{box-sizing:border-box;margin:0;outline:0}article.eae-ct-wrapper{width:100%;max-width:1000px;margin:0 auto;position:relative}.eae-ct-wrapper tbody tr.eae-ct-header td,.eae-ct-wrapper th{position:relative}.eae-ct-wrapper ul{display:none;top:0;z-index:10;padding-bottom:14px}.eae-ct-wrapper li{list-style:none;flex:1;position:relative}.eae-ct-wrapper li:hover{cursor:pointer}.eae-ct-wrapper .eae-ct-heading{width:100%;padding:10px;background:#fff;font-size:20px;font-weight:700;height:60px;color:#999;text-align:center}.eae-ct-wrapper li.eae-ct-heading .eae-ct-heading-inner{position:absolute;align-self:center;top:50%;left:50%;transform:translate(-50%,-50%);width:100%}.eae-ct-wrapper li.eae-ct-heading.active{background:#f5f5f5}.eae-ct-wrapper table{border-collapse:collapse;table-layout:fixed;width:100%}.eae-ct-wrapper th{background:#f5f5f5;display:none}.eae-ct-wrapper td,.eae-ct-wrapper th{height:53px;vertical-align:middle}.eae-ct-wrapper table{border:none}.eae-ct-wrapper table td,.eae-ct-wrapper table th{border:none}.eae-ct-wrapper table tr td:first-child,.eae-ct-wrapper table tr td:last-child,.eae-ct-wrapper td,.eae-ct-wrapper th{padding:10px;empty-cells:show}.eae-ct-wrapper td,.eae-ct-wrapper th{text-align:center}.eae-ct-wrapper td+td,.eae-ct-wrapper th+th{text-align:center}.eae-ct-wrapper tr:first-child{background:0 0!important}.eae-ct-wrapper ul li:nth-child(1){display:table-cell}.eae-ct-wrapper tr td:nth-child(2){display:table-cell}.eae-ct-wrapper td:nth-child(1){display:table-cell}.eae-ct-wrapper td{display:none}.eae-ct-wrapper .sep{background:#f5f5f5;font-weight:700}.eae-ct-price-wrapper{display:flex;justify-content:center}.eae-ct-tt-type-icon .eae-ct-feature .tooltip{float:right}.eae-ct-wrapper .tooltiptext::before{content:"";border-width:5px 5px 0 5px;border-color:#fff;border-left-color:transparent;border-right-color:transparent;border-bottom-color:transparent;bottom:-10px;width:0;height:0;border-style:solid;position:absolute;margin:5px;left:42%}.eae-ct-wrapper .eae-ct-price{font-size:28px;font-weight:700;line-height:1em}.eae-ct-wrapper .eae-ct-currency{align-self:flex-start;margin-right:3px}.eae-ct-wrapper .eae-ct-fractional-price{align-self:flex-start;margin-left:3px}.eae-ct-wrapper .eae-ct-duration{align-self:flex-start}.eae-ct-wrapper .eae-ct-original-price{margin-right:5px;text-decoration:line-through;align-self:flex-end}.eae-ct-wrapper .tick{font-size:18px;color:#2ca01c}.feature-heading-blank.eae-ct-wrapper .hide{border:unset!important;background:unset!important}.eae-ct-wrapper .hide.eae-ct-hide.eae-fbox-heading{border:0 solid #000}.eae-ct-ribbons-yes .eae-ct-ribbons-wrapper{position:absolute;top:0;width:100px;overflow:hidden;height:100px;z-index:998;padding:8px 12px}.eae-ct-ribbons-h-top.eae-ct-ribbons-yes .eae-ct-ribbons-wrapper{position:absolute;top:0;width:100%;overflow:hidden;height:50px;z-index:999;padding:8px 12px}.eae-ct-ribbons-h-top.eae-ct-ribbons-yes .eae-ct-ribbons-wrapper-top{background-color:rgba(63,195,135,.8);color:#fff;transform:translateY(-100%);position:absolute;width:100%;top:0;left:0}.eae-ct-ribbons-h-left.eae-ct-ribbons-yes .eae-ct-ribbons-wrapper{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);left:0;right:auto}.eae-ct-ribbons-h-right.eae-ct-ribbons-yes .eae-ct-ribbons-wrapper{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(90deg);left:auto;right:0}.eae-ct-ribbons-yes .eae-ct-ribbons-wrapper span.eae-ct-ribbons-inner{position:absolute;text-align:center;left:0;top:0;width:200%;-webkit-transform:translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg);-ms-transform:translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg);transform:translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg);margin-top:35px;font-size:13px;line-height:2;font-weight:800;text-transform:uppercase;background:rgba(63,195,135,.8);padding:8px 12px;color:#fff}.eae-ct-wrapper .tooltip{position:relative;display:inline-block}.eae-ct-wrapper .tooltip .tooltiptext{visibility:hidden;min-width:120px;background-color:#000;color:#fff;text-align:center;border-radius:6px;padding:5px 0;position:absolute;z-index:1;bottom:120%;left:50%;margin-left:-60px}.eae-ct-wrapper .tooltip:hover .tooltiptext{visibility:visible}.eae-ct-heading-tooltip{text-decoration-line:underline;text-decoration-style:dotted}.eae-ct-btn{padding:10px 15px 10px 15px;color:#fff;display:inline-block;line-height:1em}.eae-ct-btn:hover{color:#fff}.eae-ct-wrapper i.fa.fa-check,.eae-ct-wrapper i.fas.fa-check{color:#38f146}.eae-ct-wrapper i.fa.fa-close,.eae-ct-wrapper i.fas.fa-times{color:red}.button-heading-blank.eae-ct-wrapper tr:last-child td:first-child{background:0 0!important;border:none!important}.eae-ct-wrapper tr:last-child{background:0 0!important}tbody tr:nth-child(2){background:0 0!important}@media (min-width:767px){.eae-ct-wrapper .eae-ct-header,.eae-ct-wrapper td{width:330px}.eae-ct-wrapper td+td,.eae-ct-wrapper th+th{width:auto}}.eae-tab-format-all .eae-ct-wrapper ul{display:flex}.hide.eae-ct-hide{display:table-cell}@media (min-width:1023px){.eae-tab-format-all tbody tr.eae-ct-header{display:none}.eae-tab-format-mobile .eae-ct-wrapper td,.eae-tab-format-mobile .eae-ct-wrapper th,.eae-tab-format-tab-mob .eae-ct-wrapper td,.eae-tab-format-tab-mob .eae-ct-wrapper th{display:table-cell!important}.eae-tab-format-all .hide.eae-ct-hide{display:table-cell}.eae-tab-format-mobile .hide.eae-ct-hide,.eae-tab-format-tab-mob .hide.eae-ct-hide{display:none!important}}@media (max-width:1023px){.eae-tab-format-tab-mob .eae-ct-wrapper ul{display:flex}.eae-tab-format-all tbody tr.eae-ct-header,.eae-tab-format-tab-mob tbody tr.eae-ct-header{display:none}.eae-tab-format-all .hide.eae-ct-hide{display:table-cell}.eae-tab-format-tab-mob .hide.eae-ct-hide{display:table-cell}}@media (max-width:1023px) and (min-width:768px){.eae-tab-format-mobile .eae-ct-wrapper td,.eae-tab-format-mobile .eae-ct-wrapper th{display:table-cell!important}.eae-tab-format-all tbody tr.eae-ct-header,.eae-tab-format-tab-mob tbody tr.eae-ct-header{display:none}.eae-tab-format-tab-mob .hide.eae-ct-hide{display:table-cell}}@media (max-width:767px){.eae-tab-format-mobile .eae-ct-wrapper ul{display:flex}.eae-tab-format-mobile tbody tr.eae-ct-header{display:none}.eae-tab-format-all tbody tr.eae-ct-header,.eae-tab-format-mobile tbody tr.eae-ct-header{display:none}.eae-tab-format-mobile .hide.eae-ct-hide{display:table-cell}}.eae-progress-bar-wrapper{display:flex;flex-direction:column;align-items:flex-start;margin:15px 0}.eae-progress-bar-wrapper.eae-progress-bar{width:100%;position:relative;box-sizing:border-box}.eae-pb-bar,.eae-pb-bar-inner,.eae-pb-bar-skill,.eae-pb-bar-value{box-sizing:border-box}.eae-pb-bar{position:relative;height:100%;width:100%;overflow:hidden}.eae-pb-bar--no-overflow{overflow:visible}.eae-pb-bar-inner{position:absolute;top:0;left:0;height:100%;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:left center;transform-origin:left center}body.rtl .eae-pb-bar .eae-pb-bar-inner{position:absolute;top:0;right:0!important;height:100%;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:right center;transform-origin:right center}.eae-pb-bar-inner.js-animated{transition-property:all;transition-duration:1.5s;transition-timing-function:cubic-bezier(.1,1.14,.31,1.06);transition-delay:1.5s;-webkit-transform:scaleX(1);transform:scaleX(1)}body.rtl .eae-pb-bar .eae-pb-bar-inner.js-animated{transition-property:all;transition-duration:1.5s;transition-timing-function:cubic-bezier(.1,1.14,.31,1.06);transition-delay:1.5s;-webkit-transform:scaleX(1);transform:scaleX(1)}.eae-pb-bar-skill,.eae-pb-bar-value{font-size:14px;letter-spacing:1px}body:not(.rtl) .eae-pb-bar-value--aligned-value{-webkit-transform:translateX(-50%);transform:translateX(-50%)}body.rtl .eae-pb-bar-value--aligned-value{-webkit-transform:translateX(50%);transform:translateX(50%)}.eae-progress-bar-skin1{height:20px;padding:4px;border:1px solid #ddd;border-radius:20px}.eae-pb-bar-skin1{border-radius:20px}.eae-pb-bar-inner-skin1{background-color:#00bfb3;background-size:200%;background-position:0 0;border-radius:20px}.eae-pb-bar-skill-skin1{position:absolute;bottom:20px;left:0;opacity:0}body.rtl .eae-pb-bar-skill-skin1{right:0}.eae-pb-bar-skill-skin1.js-animated{transition-property:all;transition-duration:.5s;transition-timing-function:linear;transition-delay:.5s;left:0;opacity:1}body.rtl .eae-pb-bar-skill-skin1.js-animated{right:0!important}.eae-pb-bar-value-skin1{position:absolute;bottom:20px;opacity:1}body:not(.rtl) .eae-pb-bar-value-skin1{right:0}body.rtl .eae-pb-bar-value-skin1{left:0!important}.eae-pb-bar-value-skin1.js-animated{transition-property:all;transition-duration:.5s;transition-timing-function:linear;transition-delay:.5s;opacity:1}body:not(.rtl) .eae-pb-bar-value-skin1.js-animated{right:0}.eae-progress-bar-skin2{height:15px;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2);border-radius:3px}@-webkit-keyframes progress-2-bg-animation-rtl{100%{background-position:0 0,0 0}0%{background-position:0 0,42px 0}}@keyframes progress-2-bg-animation-rtl{100%{background-position:0 0,0 0}0%{background-position:0 0,42px 0}}@-webkit-keyframes progress-2-bg-animation{0%{background-position:0 0,0 0}1000%{background-position:0 0,42px 0}}@keyframes progress-2-bg-animation{0%{background-position:0 0,0 0}100%{background-position:0 0,42px 0}}.eae-pb-bar-inner-skin2{background-image:linear-gradient(to top,rgba(255,255,255,.15),rgba(0,0,0,.2)),linear-gradient(135deg,#5eeb5b,#5eeb5b 33%,#358600 33%,#358600 66%,#5eeb5b 66%);background-size:100% 100%,42px 100%;background-position:0 0,0 0;border-radius:3px}body:not(.rtl) .eae-pb-bar-inner-skin2.js-animated{-webkit-animation:progress-2-bg-animation 1.5s linear 0s infinite;animation:progress-2-bg-animation 1.5s linear 0s infinite}body.rtl .eae-pb-bar-inner-skin2.js-animated{-webkit-animation:progress-2-bg-animation-rtl 1.5s linear 0s infinite;animation:progress-2-bg-animation-rtl 1.5s linear 0s infinite}.eae-pb-bar-skill-skin2{position:absolute;opacity:0}body:not(.rtl) .eae-pb-bar-skill-skin2{left:0}body.rtl .eae-pb-bar-skill-skin2{right:0}.eae-pb-bar-skill-skin2.js-animated{transition-property:all;transition-duration:.5s;transition-timing-function:linear;transition-delay:.5s;bottom:20px;opacity:1}.eae-pb-bar-value-skin2{position:absolute;opacity:0}body:not(.rtl) .eae-pb-bar-value-skin2{right:0}body.rtl .eae-pb-bar-value-skin2{left:0}.eae-pb-bar-value-skin2.js-animated{transition-property:all;transition-duration:.5s;transition-timing-function:linear;transition-delay:.5s;bottom:20px;opacity:1}.eae-progress-bar-skin3{height:5px;background-color:#efefef}.eae-pb-bar-inner-skin3,.eae-pb-bar-value-skin3{background-color:#f40076}.eae-pb-bar-inner:after,.eae-pb-bar-value-skin3:after{border-top-color:#f40076}.eae-pb-bar-skill-skin3{position:absolute;bottom:10px;left:-10px;opacity:0}.eae-pb-bar-skill-skin3.js-animated{transition-property:all;transition-duration:.5s;transition-timing-function:linear;transition-delay:.5s;opacity:1}body:not(.rtl) .eae-pb-bar-skill-skin3.js-animated{left:0}body.rtl .eae-pb-bar-skill-skin3.js-animated{right:0}.eae-pb-bar-value-skin3{position:absolute;display:inline-block;padding:0 8px;font-size:14px;color:#fff;opacity:0}.eae-pb-bar-value-skin3:after{position:absolute;left:50%;bottom:-10px;display:block;width:0;height:0;content:"";-webkit-transform:translateX(-50%);transform:translateX(-50%);border-width:5px;border-style:solid;border-color:#f40076 transparent transparent transparent}.eae-pb-bar-inner-skin3.js-animated{transition-property:all;transition-duration:1.5s;transition-timing-function:cubic-bezier(.1,1.14,.31,1.06);transition-delay:1.5s;-webkit-transform:scaleX(1);transform:scaleX(1)}.eae-pb-bar-value-skin3.js-animated{transition-property:all;transition-duration:1.5s;transition-timing-function:cubic-bezier(.1,1.14,.31,1.06);transition-delay:2s;bottom:14px;opacity:1}.eae-progress-bar-skin4{height:3px;background-color:#efefef}.eae-pb-bar-inner-skin4{background-color:#000}.eae-pb-bar-inner-skin4:after{position:absolute;top:50%;display:block;width:8px;height:8px;content:"";-webkit-transform:translateY(-50%);transform:translateY(-50%);background-color:#000;border-radius:50%}body:not(.rtl) .eae-pb-bar-inner-skin4:after{right:0}body.rtl .eae-pb-bar-inner-skin4:after{left:0}.eae-pb-bar-value-skin4{position:absolute;bottom:2px;font-size:14px;opacity:0}.eae-pb-bar-value-skin4.js-animated{transition-property:all;transition-duration:1.5s;transition-timing-function:linear;transition-delay:1.5s;opacity:1}.eae-pb-bar-skill-skin4{position:absolute;bottom:2px;left:-20px;opacity:0}.eae-pb-bar-skill-skin4.js-animated{transition-property:all;transition-duration:.5s;transition-timing-function:linear;transition-delay:.5s;opacity:1}body:not(.rtl) .eae-pb-bar-skill-skin4.js-animated{left:0}body.rtl .eae-pb-bar-skill-skin4.js-animated{right:0}.eae-progress-bar-skin5{height:30px;background-color:#f7f7f7}.eae-pb-bar-inner-skin5{background-color:#57b8ff}.eae-pb-bar-skill-skin5{position:absolute;top:50%;color:#fff;-webkit-transform:translateY(-50%);transform:translateY(-50%);opacity:0}body:not(.rtl) .eae-pb-bar-skill-skin5{left:10px}body:not(.rtl) .eae-pb-bar-skill-skin5{right:10px}.eae-pb-bar-skill-skin5.js-animated{transition-property:all;transition-duration:.5s;transition-timing-function:linear;transition-delay:.5s;opacity:1}.eae-pb-bar-value-skin5{position:absolute;top:50%;color:#fff;opacity:0;z-index:10}body:not(.rtl) .eae-pb-bar-value-skin5{-webkit-transform:translateX(-100%) translateX(-10px) translateY(-50%);transform:translateX(-100%) translateX(-10px) translateY(-50%)}body.rtl .eae-pb-bar-value-skin5{-webkit-transform:translateX(100%) translateX(10px) translateY(-50%);transform:translateX(100%) translateX(10px) translateY(-50%)}.eae-pb-bar-value-skin5.js-animated{transition-property:all;transition-duration:1.5s;transition-timing-function:linear;transition-delay:1.5s;opacity:1}.eae-dual-button-wrapper .eae-button-1-wrapper,.eae-dual-button-wrapper .eae-button-2-wrapper{overflow:hidden}.eae-dual-button-wrapper.button-style-horizontal{display:flex;flex-direction:row;position:relative}.eae-dual-button-main-wrapper{display:flex;flex-direction:row;justify-content:center}.eae-dual-button-wrapper a{min-width:0}.eae-dual-button-wrapper.button-style-vertical{display:inline-flex;flex-direction:column;position:relative}.eae-button-1.icon-before,.eae-button-2.icon-before{display:flex;flex-direction:row}body.rtl .eae-button-1.icon-before,body.rtl .eae-button-2.icon-before{display:flex;flex-direction:row-reverse}.eae-button-1.icon-after,.eae-button-2.icon-after{display:flex;flex-direction:row-reverse}body.rtl .eae-button-1.icon-after,body.rtl .eae-button-2.icon-after{display:flex;flex-direction:row}.eae-button-1-wrapper .eae-button-1,.eae-button-2-wrapper .eae-button-2{color:#000;align-items:center}.eae-button-1-wrapper:hover .eae-button-1,.eae-button-2-wrapper:hover .eae-button-2{color:#000}.eae-dual-button-wrapper.button-style-vertical .eae-button-1.icon-after,.eae-dual-button-wrapper.button-style-vertical .eae-button-1.icon-before,.eae-dual-button-wrapper.button-style-vertical .eae-button-2.icon-after,.eae-dual-button-wrapper.button-style-vertical .eae-button-2.icon-before{justify-content:center}.eae-button-1.icon-up,.eae-button-2.icon-up{display:flex;flex-direction:column;text-align:center}.eae-button-1.icon-down,.eae-button-2.icon-down{display:flex;flex-direction:column-reverse;text-align:center}.eae-button-1-wrapper{background:#ffb6c1;display:flex;justify-content:center;width:100%;line-height:1}.eae-button-2-wrapper{background:orange;display:flex;justify-content:center;width:100%;line-height:1}.eae-button-1.icon-up .icon-wrapper,.eae-button-2.icon-down .icon-wrapper,.eae-button-2.icon-up .icon-wrapper{text-align:center}.eae-button-1.icon-up .eae-button-text,.eae-button-2.icon-down .eae-button-text,.eae-button-2.icon-up .eae-button-text{text-align:center}.eae-button-1.icon-before i,.eae-button-2.icon-after i,.eae-button-2.icon-before i{align-self:center;margin:0 10px 0 0}.eae-button-1.icon-after i,.eae-button-2.icon-after i{align-self:center;margin:0 0 0 10px}.eae-button-1.icon-down i,.eae-button-1.icon-up i,.eae-button-2.icon-down i,.eae-button-2.icon-up i{align-self:center;margin:5px 0}.eae-dual-button-wrapper.button-style-horizontal .eae-button-1-wrapper,.eae-dual-button-wrapper.button-style-horizontal .eae-button-2-wrapper{padding:12px 30px}.eae-dual-button-wrapper.button-style-vertical .eae-button-1-wrapper,.eae-dual-button-wrapper.button-style-vertical .eae-button-2-wrapper{padding:20px 30px}.eae-button1,.eae-button2{position:relative;display:flex}.eae-dual-button-wrapper.button-style-horizontal .eae-button1,.eae-dual-button-wrapper.button-style-horizontal .eae-button2{min-width:150px}.eae-dual-button-wrapper.button-style-vertical .eae-button1{display:flex;flex-direction:column}.eae-button-separator-wrapper .eae-button-separator{width:40px;height:40px;line-height:40px;border-radius:50%;z-index:1;box-shadow:0 0 0 6px rgba(255,255,255,.2);background:#fafaf8;color:#444;text-transform:uppercase;text-align:center;vertical-align:middle;font-weight:400;font-size:14px;position:absolute;transform:translateY(-50%)}.eae-button-separator span{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}body.rtl.elementor-editor-active .eae-dual-button-main-wrapper .button-style-horizontal .eae-button1 .eae-button-separator-wrapper.not-rtl .eae-button-separator{display:none!important}body:not(.rtl).elementor-editor-active .eae-dual-button-main-wrapper .button-style-horizontal .eae-button2 .eae-button-separator-wrapper.rtl .eae-button-separator,body:not(.rtl).elementor-editor-preview .eae-dual-button-main-wrapper .button-style-horizontal .eae-button2 .eae-button-separator-wrapper.rtl .eae-button-separator{display:none!important}.eae-sweep-right{vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.3s;transition-duration:.3s}.eae-sweep-right:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098d1;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:0 50%;transform-origin:0 50%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.eae-sweep-right:active,.eae-sweep-right:focus,.eae-sweep-right:hover{color:#fff}.eae-sweep-right:active:before,.eae-sweep-right:focus:before,.eae-sweep-right:hover:before{-webkit-transform:scaleX(1);transform:scaleX(1)}.eae-sweep-left{vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.3s;transition-duration:.3s}.eae-sweep-left:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098d1;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:100% 50%;transform-origin:100% 50%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.eae-sweep-left:active,.eae-sweep-left:focus,.eae-sweep-left:hover{color:#fff}.eae-sweep-left:active:before,.eae-sweep-left:focus:before,.eae-sweep-left:hover:before{-webkit-transform:scaleX(1);transform:scaleX(1)}.eae-sweep-bottom{vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.3s;transition-duration:.3s}.eae-sweep-bottom:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098d1;-webkit-transform:scaleY(0);transform:scaleY(0);-webkit-transform-origin:50% 0;transform-origin:50% 0;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.eae-sweep-bottom:active,.eae-sweep-bottom:focus,.eae-sweep-bottom:hover{color:#fff}.eae-sweep-bottom:active:before,.eae-sweep-bottom:focus:before,.eae-sweep-bottom:hover:before{-webkit-transform:scaleY(1);transform:scaleY(1)}.eae-sweep-top{vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.3s;transition-duration:.3s}.eae-sweep-top:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098d1;-webkit-transform:scaleY(0);transform:scaleY(0);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.eae-sweep-top:active,.eae-sweep-top:focus,.eae-sweep-top:hover{color:#fff}.eae-sweep-top:active:before,.eae-sweep-top:focus:before,.eae-sweep-top:hover:before{-webkit-transform:scaleY(1);transform:scaleY(1)}.eae-bounce-right{vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.5s;transition-duration:.5s}.eae-bounce-right:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098d1;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:0 50%;transform-origin:0 50%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.eae-bounce-right:active,.eae-bounce-right:focus,.eae-bounce-right:hover{color:#fff}.eae-bounce-right:active:before,.eae-bounce-right:focus:before,.eae-bounce-right:hover:before{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transition-timing-function:cubic-bezier(.52,1.64,.37,.66);transition-timing-function:cubic-bezier(.52,1.64,.37,.66)}.eae-bounce-left{vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.5s;transition-duration:.5s}.eae-bounce-left:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098d1;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:100% 50%;transform-origin:100% 50%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.eae-bounce-left:active,.eae-bounce-left:focus,.eae-bounce-left:hover{color:#fff}.eae-bounce-left:active:before,.eae-bounce-left:focus:before,.eae-bounce-left:hover:before{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transition-timing-function:cubic-bezier(.52,1.64,.37,.66);transition-timing-function:cubic-bezier(.52,1.64,.37,.66)}.eae-bounce-bottom{vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.5s;transition-duration:.5s}.eae-bounce-bottom:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098d1;-webkit-transform:scaleY(0);transform:scaleY(0);-webkit-transform-origin:50% 0;transform-origin:50% 0;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.eae-bounce-bottom:active,.eae-bounce-bottom:focus,.eae-bounce-bottom:hover{color:#fff}.eae-bounce-bottom:active:before,.eae-bounce-bottom:focus:before,.eae-bounce-bottom:hover:before{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transition-timing-function:cubic-bezier(.52,1.64,.37,.66);transition-timing-function:cubic-bezier(.52,1.64,.37,.66)}.eae-bounce-top{vertical-align:middle;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px transparent;position:relative;-webkit-transition-property:color;transition-property:color;-webkit-transition-duration:.5s;transition-duration:.5s}.eae-bounce-top:before{content:"";position:absolute;z-index:-1;top:0;left:0;right:0;bottom:0;background:#2098d1;-webkit-transform:scaleY(0);transform:scaleY(0);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;-webkit-transition-property:transform;transition-property:transform;-webkit-transition-duration:.5s;transition-duration:.5s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.eae-bounce-top:active,.eae-bounce-top:focus,.eae-bounce-top:hover{color:#fff}.eae-bounce-top:active:before,.eae-bounce-top:focus:before,.eae-bounce-top:hover:before{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transition-timing-function:cubic-bezier(.52,1.64,.37,.66);transition-timing-function:cubic-bezier(.52,1.64,.37,.66)}.eae-markers .marker{display:none}.eae-markers p{margin-bottom:0}.eae-fg-wrapper{display:flex;flex-direction:column;overflow:hidden}.eae-gallery-filter{display:flex;flex-direction:row;justify-content:center;flex-wrap:wrap}.eae-filter-label{padding:5px 10px;background-color:#a0ce4e;color:#fff;margin:0 3px 0 3px}.eae-filter-label.current{background-color:#73b9dc}.eae-fg-image{display:flex;flex-wrap:wrap;flex-direction:row}.eae-fg-wrapper .eae-gallery-item-inner img{width:100%;height:auto;display:block!important;transition:all .5s ease;-webkit-transition:all .5s ease}.eae-gallery-item{height:auto}.eae-gallery-filter a{color:#fff;text-decoration:none}.eae-gallery-filter a.current{font-weight:700}.eae-gallery-item-inner{position:relative;overflow:hidden}.eae-overlay-always .eae-gallery-item .eae-grid-overlay{display:block}.eae-overlay-hover .eae-gallery-item-inner:hover .eae-grid-overlay{display:block}.eae-overlay-hide-on-hover .eae-gallery-item-inner:hover .eae-grid-overlay{display:none}.eae-overlay-hide-on-hover .eae-grid-overlay{display:block}.eae-grid-overlay{position:absolute;top:0;left:0;display:none;z-index:99;background:rgba(0,0,0,.5);height:100%;width:100%}.eae-grid-overlay-inner{display:block;position:relative;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center}.eae-fg-wrapper .eae-icon-wrapper{display:flex;justify-content:center}.eae-overlay-caption{display:block;line-height:1em;margin-top:15px;color:#73b9dc;font-size:20px}.eae-overlay-icon{line-height:1em;padding:.5em;display:inline-block}.eae-overlay-icon svg{height:auto}.eae-icon-view-framed .eae-overlay-icon{padding:.5em;color:#73b9dc;border:3px solid #73b9dc;background-color:transparent}.eae-icon-view-stacked .eae-overlay-icon{padding:.5em;color:#fff;background-color:#818a91}.eae-hover-direction-effect .eae-grid-overlay{position:absolute;z-index:99;background:rgba(0,0,0,.5);height:100%;width:100%}.eae-fg-wrapper.eae-image-ratio-yes .eae-gallery-item-inner .eae-fg-img-wrapper{position:relative;top:0;overflow:hidden;left:0;right:0;border:0}.eae-fg-wrapper.eae-image-ratio-yes .eae-gallery-item-inner .eae-fg-img-wrapper img{height:100%;width:100%;display:block;position:absolute;top:0;left:0;object-fit:cover}.wts-eae-ribbons-badges-wrapper{display:none}.wts-eae-enable-ribbons-badges-yes .elementor-column-wrap>.wts-eae-ribbons-badges-wrapper{display:block}.wts-eae-enable-ribbons-badges-yes.wts-eae-badge-type-ribbon>.wts-eae-ribbons-badges-wrapper{position:absolute;top:0;left:auto;right:0;-ms-transform:rotate(90deg);width:150px;overflow:hidden;height:150px;z-index:999;padding:8px 12px}.wts-eae-badge-h-left.wts-eae-enable-ribbons-badges-yes.wts-eae-badge-type-ribbon>.wts-eae-ribbons-badges-wrapper{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0);left:0;right:auto}.wts-eae-badge-h-right.wts-eae-enable-ribbons-badges-yes.wts-eae-badge-type-ribbon>.wts-eae-ribbons-badges-wrapper{-webkit-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(90deg);left:auto;right:0}.wts-eae-enable-ribbons-badges-yes.wts-eae-badge-type-ribbon>.wts-eae-ribbons-badges-wrapper span.wts-eae-ribbons-badges-inner{position:absolute;text-align:center;left:0;top:0;width:200%;-webkit-transform:translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg);-ms-transform:translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg);transform:translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg);margin-top:35px;font-size:13px;line-height:2;font-weight:800;text-transform:uppercase;background:rgba(63,195,135,.8);padding:8px 12px}.wts-eae-enable-ribbons-badges-yes.wts-eae-badge-type-badge>.wts-eae-ribbons-badges-wrapper span.wts-eae-ribbons-badges-inner{min-height:3.236em;min-width:3.236em;padding:0;font-size:1em;font-weight:700;position:absolute;text-align:center;line-height:3.236;top:-.5em;left:-.5em;margin:0;border-radius:100%;background-color:#77a464;color:#fff;font-size:.857em;z-index:9}.wts-eae-badge-h-left.wts-eae-badge-v-bottom.wts-eae-enable-ribbons-badges-yes>.wts-eae-ribbons-badges-wrapper span.wts-eae-ribbons-badges-inner{left:20px;right:auto;top:auto;bottom:20px}.wts-eae-badge-h-left.wts-eae-badge-v-top.wts-eae-enable-ribbons-badges-yes>.wts-eae-ribbons-badges-wrapper span.wts-eae-ribbons-badges-inner{left:20px;right:auto;top:20px;bottom:auto}.wts-eae-badge-h-right.wts-eae-badge-v-bottom.wts-eae-enable-ribbons-badges-yes>.wts-eae-ribbons-badges-wrapper span.wts-eae-ribbons-badges-inner{left:auto;right:20px;top:auto;bottom:20px}.wts-eae-badge-h-right.wts-eae-badge-v-top.wts-eae-enable-ribbons-badges-yes>.wts-eae-ribbons-badges-wrapper span.wts-eae-ribbons-badges-inner{left:auto;right:20px;top:20px;bottom:auto}.eae-flip-box-back svg,.eae-flip-box-front svg{width:25px;height:auto}.wts-eae-textseparator svg{width:25px;height:auto}.eae-img-comp-slider svg{width:22px;height:auto}.eae-popup-link svg{display:inline-block;width:1em}.eae-popup svg:focus,.eae-popup svg:hover{opacity:1;cursor:pointer}.eae-popup svg:active{top:1px}.eae-popup svg.eae-close{width:28px;height:28px;line-height:1em;text-decoration:none;text-align:center;opacity:1;background-color:#fff}.eae-dual-button-wrapper svg{width:1em;height:auto;display:block}eae-button-separator i{position:relative;display:block}.eae-button-1.icon-before svg,.eae-button-2.icon-after svg,.eae-button-2.icon-before svg{align-self:center;margin:0 10px 0 0}.eae-button-1.icon-after svg,.eae-button-2.icon-after svg{align-self:center;margin:0 0 0 10px}.eae-button-1.icon-down svg,.eae-button-1.icon-up svg,.eae-button-2.icon-down svg,.eae-button-2.icon-up svg{align-self:center;margin:5px 0}.eae-pt-button-wrapper a svg{width:1em}.eae-pt-action-button .eae-pt-align-icon-left{float:left}.eae-pt-action-button .eae-pt-align-icon-right{float:right}.eae-icon-wrap svg{width:20px;height:auto;font-size:20px;display:block}.eae-info-circle .eae-icon-wrap svg{width:20px;height:auto;font-size:20px}.eae-icon-view-stacked svg{fill:#fff}.ae-link-yes{cursor:pointer}.eae-element-unfold-content{padding:10px 0;background-color:#d3d3d3c4;width:100%;position:absolute;left:0;bottom:0;z-index:999}a.eae-unfold-link{background-color:#61ce70;color:#fff;display:inline-block;overflow:hidden}a.eae-unfold-link svg{background-color:#fff}.eae-unfold-button-icon{vertical-align:middle}.eae-fold-yes .elementor-column-wrap,.eae-fold-yes.elementor-section .elementor-container,.eae-fold-yes.elementor-widget{overflow:hidden}body.elementor-editor-active .elementor.elementor-edit-mode .elementor-element.elementor-section.eae-widget-unfold-yes .elementor-container,body.elementor-editor-preview .elementor.elementor-edit-mode .elementor-element.elementor-section.eae-widget-unfold-yes .elementor-container{overflow:hidden}body.elementor-editor-active .elementor.elementor-edit-mode .elementor-element.elementor-column.eae-widget-unfold-yes .elementor-column-wrap,body.elementor-editor-preview .elementor.elementor-edit-mode .elementor-element.elementor-column.eae-widget-unfold-yes .elementor-column-wrap{overflow:hidden}body.elementor-editor-active .elementor.elementor-edit-mode .elementor-element.elementor-widget.eae-widget-unfold-yes,body.elementor-editor-preview .elementor.elementor-edit-mode .elementor-element.elementor-widget.eae-widget-unfold-yes{overflow:hidden}.eae-widget-unfold-yes .elementor-widget-container .eae-fold-yes.eae-rc{display:none!important}.eae-unfold-button-icon svg{line-height:1em;text-decoration:none;-webkit-mask-repeat:no-repeat!important;text-align:center;opacity:1}.eae-fold-icon-type-svg .eae-unfold-button-icon,.eae-unfold-icon-type-svg .eae-unfold-button-icon{-webkit-mask-size:cover!important;background-image:none;transform:translateY(-50%)}.elementor-section.elementor-section-items-bottom.eae-widget-unfold-yes>.elementor-container,.elementor-section.elementor-section-items-middle.eae-widget-unfold-yes>.elementor-container{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:start}.elementor-section.elementor-section-content-bottom.eae-widget-unfold-yes>.elementor-container,.elementor-section.elementor-section-content-middle.eae-widget-unfold-yes>.elementor-container{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:start}.elementor-widget-wts-modal-popup.eae-pop-btn-type-image .eae-popup-link{padding:0;background-color:transparent;overflow:hidden}[data-elementor-device-mode=tablet] .eae-tab-format-mobile .eae-ct-hide.eae-fbox-heading{display:none!important}.eae-timeline-item .eae-icon-view-stacked{border-width:0!important}.eae-content-switcher-wrapper{display:block;text-align:center}.eae-cs-layout-skin1 .eae-cs-switch-wrapper{display:inline-flex;flex-wrap:wrap;padding:8px 12px;background:#54595f;border-radius:50px}.eae-cs-switch-container{display:block;text-align:center}.eae-cs-layout-skin1 .eae-cs-label-wrapper{display:inline-block;overflow:hidden}.eae-cs-layout-skin1 .eae-content-switch-button{border-radius:50px;padding:8px 12px;background-color:#7a7a7a;color:#fff;overflow:hidden;display:block;min-width:150px;position:relative;text-align:center;margin:3px}.eae-cs-layout-skin1 .eae-content-switch-button:before{height:100%;top:0;left:0;z-index:0;content:'';width:0;position:absolute;right:0;transition:all .3s ease-out}.eae-cs-layout-skin1 .eae-content-switch-button.active:before{width:100%;left:0;right:auto;background-color:#61ce70}.eae-cs-layout-skin1 .eae-content-switch-label{position:relative}.eae-cs-content-section{display:none}.eae-cs-content-section.active{display:block}@media only screen and (max-width:768px){.eae-cs-switch-wrapper{display:inline-block!important}}.eae-cs-layout-skin2 .eae-cs-switch-wrapper{display:inline-flex;flex-wrap:wrap;padding:0;background:0 0}.eae-cs-layout-skin2 .eae-cs-label-wrapper{display:inline-block}.eae-cs-layout-skin2 .eae-content-switch-button{width:auto;margin:3px 8px;padding:10px 12px;background-color:#e2e2e2;overflow:hidden;display:block;position:relative;text-align:center;border-radius:5px;border:1px solid rgba(130,130,130,.26);color:rgba(71,71,71,.44)}.eae-cs-layout-skin2 .eae-content-switch-button.active{box-shadow:0 10px 34px -9px rgba(0,0,0,.38);background-color:#fff;color:#575757;border-color:#fff}h5.eae-cs-label{margin:0}.eae-cs-layout-skin3 .eae-cs-switch-wrapper{display:block;justify-content:center;align-items:center}.eae-content-switch-label.primary-label{margin-right:30px}.eae-content-switch-label.secondary-label{margin-left:30px}.eae-cs-layout-skin3 .eae-cs-switch-label{position:relative;display:inline-block;width:4.5em;height:2.3em;vertical-align:middle}.eae-cs-layout-skin3 .eae-content-switch-label{margin:0;display:inline-block}.eae-cs-layout-skin3 .eae-cs-switch-button{display:inline-block}.eae-cs-layout-skin3 .eae-cs-label{display:inline-block}.eae-cs-layout-skin3 .eae-cs-switch-label input.eae-content-toggle-switch{display:none}.eae-cs-layout-skin3 .eae-cs-switch-label input.eae-content-toggle-switch+span{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;-webkit-transition:.4s;transition:.4s;-webkit-border-radius:1.5em;border-radius:1.5em;background:#2e394d;border:2px solid #2e394d}.eae-cs-layout-skin3 .eae-cs-switch-label input.eae-content-toggle-switch+span:before{position:absolute;content:"";height:28px;width:28px;left:4px;transform:translateY(-52%);top:50%;transition:.4s;transition:.4s;-webkit-border-radius:50%;border-radius:50%;background:#88cf8f;border:2px solid #88cf8f}body.rtl .eae-cs-layout-skin3 .eae-cs-switch-label input.eae-content-toggle-switch+span:before{left:unset;right:4px}.eae-cs-layout-skin3 .eae-cs-switch-label input:checked.eae-content-toggle-switch+span:before{transform:translate(36px,-52%)}body.rtl .eae-cs-layout-skin3 .eae-cs-switch-label input:checked.eae-content-toggle-switch+span:before{transform:translate(-36px,-52%)}.eae-content-switch-label.active{color:#61ce70}.eae-cs-layout-skin4 .eae-cs-switch-wrapper{display:block}.eae-cs-layout-skin4 .eae-content-switch-label.primary-label{margin-right:30px}.eae-cs-layout-skin4 .eae-content-switch-label.secondary-label{margin-left:30px}.eae-cs-layout-skin4 .eae-content-switch-label{display:inline-block}.eae-cs-layout-skin4 .eae-cs-switch-label{position:relative;display:inline-block;width:70px;height:20px;vertical-align:middle}.eae-cs-layout-skin4 .eae-cs-label{display:inline-block}.eae-cs-layout-skin4 .eae-content-toggle-switch{display:none}.eae-cs-layout-skin4 .eae-content-toggle-switcher{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;-webkit-transition:.4s;transition:.4s;-webkit-border-radius:1.5em;border-radius:1.5em;background:#2e394d;border:2px solid #2e394d}.eae-cs-layout-skin4 .eae-cs-switch-button{display:inline-block}.eae-cs-layout-skin4 .eae-content-toggle-switcher:before{position:absolute;content:"";height:34px;width:34px;left:-12px;top:50%;transform:translateY(-50%);border-radius:50%;border:2px solid #88cf8f;background:#88cf8f;-webkit-transition:.4s;transition:.4s;-webkit-box-shadow:3px 3px 6px 1px rgba(0,0,0,.2);box-shadow:3px 3px 6px 1px rgba(0,0,0,.2)}.eae-cs-layout-skin4 .eae-cs-switch-container{padding:15px 0}body.rtl .eae-cs-layout-skin4 .eae-content-toggle-switcher:before{right:-12px!important}.eae-cs-layout-skin4 input:checked+.eae-content-toggle-switcher:before{transform:translate(55px,-50%)}body.rtl .eae-cs-layout-skin4 input:checked+.eae-content-toggle-switcher:before{transform:translate(-55px,-50%)}.eae-swiper-outer-wrapper{position:relative}.eae-swiper-container{position:relative}.eae-thumb-container{position:absolute}.eae-swiper-outer-wrapper .eae-swiper-slide{height:400px;background-size:cover;background-repeat:no-repeat;background-position:right}.eae-swiper-outer-wrapper .eae-swiper-slide .eae-slide-inner{color:#7a7a7a;display:flex;position:absolute;top:0;left:0;bottom:0;right:0;padding:20px}.eae-slide-inner .eae-slide-content{padding:20px 30px}.eae-slide-inner .eae-slide-heading{font-size:35px;font-weight:700;line-height:1}.eae-slide-inner .eae-slide-text{font-size:17px;line-height:1.4}.eae-slide-inner .eae-slide-button{display:inline-block}.eae-slide-inner .eae-slide-btn{display:inline-block;font-size:15px;padding:12px 24px;border-radius:3px;cursor:pointer;transition:all .3s}.eae-slide-inner .eae-slide-heading:not(:last-child),.eae-slide-inner .eae-slide-text:not(:last-child){margin-bottom:30px}.eae--hr-position-left .eae-slide-inner{-webkit-box-pack:start;justify-content:flex-start}.eae--hr-position-right .eae-slide-inner{-webkit-box-pack:end;justify-content:flex-end}.eae--hr-position-center .eae-slide-inner{-webkit-box-pack:center;justify-content:center}.eae--vr-position-top .eae-slide-inner{-webkit-box-pack:start;align-items:flex-start}.eae--vr-position-middle .eae-slide-inner{-webkit-box-align:center;align-items:center}.eae--vr-position-bottom .eae-slide-inner{-webkit-box-pack:end;align-items:flex-end}.eae-swiper-button-prev{left:10px}.eae-swiper-button-next{right:10px}.eae-swiper-button{position:absolute;display:inline-flex;z-index:1;cursor:pointer;color:#7a7a7a;top:50%;transform:translateY(-50%)}.swiper-pagination-bullet{margin-bottom:5px!important}.eae-swiper-outer-wrapper .eae-swiper-slide .eae-background-overlay{width:100%;height:100%;position:absolute}.eae-swiper-outer-wrapper .eae-gallery-thumbs{box-sizing:border-box;text-align:center}.eae-swiper-outer-wrapper .eae-gallery-thumbs .eae-thumb-slide{background-size:cover;background-position:center;height:100%;opacity:.7}.eae-swiper-outer-wrapper .eae-gallery-thumbs .swiper-slide-thumb-active{opacity:1}.eae-chart-outer-container{position:relative}.eae-chart-overlay{width:100%;height:100%;position:absolute}
|
assets/js/eae.js
CHANGED
@@ -2586,246 +2586,147 @@ var breakpoints = eae.breakpoints;
|
|
2586 |
};
|
2587 |
|
2588 |
|
2589 |
-
|
2590 |
-
|
2591 |
-
|
2592 |
-
|
2593 |
-
|
2594 |
-
|
2595 |
-
|
2596 |
-
|
2597 |
-
|
2598 |
-
|
2599 |
-
|
2600 |
-
|
2601 |
-
|
2602 |
-
|
2603 |
-
//
|
2604 |
-
|
2605 |
-
//
|
2606 |
-
|
2607 |
-
|
2608 |
-
|
2609 |
-
|
2610 |
-
|
2611 |
-
|
2612 |
-
|
2613 |
-
|
2614 |
-
|
2615 |
-
|
2616 |
-
|
2617 |
-
//
|
2618 |
-
|
2619 |
-
|
2620 |
-
|
2621 |
-
|
2622 |
-
|
2623 |
-
|
2624 |
-
|
2625 |
-
|
2626 |
-
|
2627 |
-
|
2628 |
-
// // maintainAspectRatio: true,
|
2629 |
-
// type: type,
|
2630 |
-
// data : {
|
2631 |
-
// labels : labels,
|
2632 |
-
// datasets : data_chart,
|
2633 |
-
// },
|
2634 |
-
// options: {
|
2635 |
-
//
|
2636 |
-
// title: {
|
2637 |
-
// display: show_title,
|
2638 |
-
// text: title,
|
2639 |
-
// position: title_position,
|
2640 |
-
// // fontColor: 'black',
|
2641 |
-
// // fontSize: 30
|
2642 |
-
// },
|
2643 |
-
//
|
2644 |
-
// legend: {
|
2645 |
-
// display: display_legend,
|
2646 |
-
// position: legend_position,
|
2647 |
-
// align: legend_align,
|
2648 |
-
//
|
2649 |
-
// },
|
2650 |
-
//
|
2651 |
-
// tooltips: {
|
2652 |
-
// enabled: tooltip,
|
2653 |
-
// mode: tooltip_mode,
|
2654 |
-
// },
|
2655 |
-
//
|
2656 |
-
// animation: {
|
2657 |
-
// duration: animation_duration,
|
2658 |
-
// easing: animation,
|
2659 |
-
// },
|
2660 |
-
//
|
2661 |
-
// scales: {
|
2662 |
-
// xAxes: [{
|
2663 |
-
//
|
2664 |
-
// scaleLabel: {
|
2665 |
-
// display: show_xaxis_label,
|
2666 |
-
// labelString: xaxis_label,
|
2667 |
-
// },
|
2668 |
-
// gridLines: {
|
2669 |
-
// display: show_gridLine,
|
2670 |
-
// // color: gridLine_color,
|
2671 |
-
// //lineWidth: 2,
|
2672 |
-
//
|
2673 |
-
// },
|
2674 |
-
// ticks: {
|
2675 |
-
// // beginAtZero: true,
|
2676 |
-
// maxRotation: label_rotation,
|
2677 |
-
// minRotation: label_rotation,
|
2678 |
-
// stepSize: step_size,
|
2679 |
-
//
|
2680 |
-
// }
|
2681 |
-
//
|
2682 |
-
// }],
|
2683 |
-
//
|
2684 |
-
// yAxes: [{
|
2685 |
-
//
|
2686 |
-
// scaleLabel: {
|
2687 |
-
// display: show_yaxis_label,
|
2688 |
-
// labelString: yaxis_label,
|
2689 |
-
// },
|
2690 |
-
//
|
2691 |
-
// gridLines: {
|
2692 |
-
// display: yaxis_grlidLine,
|
2693 |
-
// // color: yaxis_gridLine_color,
|
2694 |
-
// //lineWidth: 1,
|
2695 |
-
// //drawBorder: true
|
2696 |
-
// },
|
2697 |
-
// ticks: {
|
2698 |
-
// stepSize: step_size,
|
2699 |
-
// suggestedMin: min_val,
|
2700 |
-
// suggestedMax: max_val,
|
2701 |
-
//
|
2702 |
-
// }
|
2703 |
-
//
|
2704 |
-
// }]
|
2705 |
-
// }
|
2706 |
-
// }
|
2707 |
-
// });
|
2708 |
-
// };
|
2709 |
-
|
2710 |
-
|
2711 |
-
|
2712 |
-
let EAEThumbGallery = function ($scope, $) {
|
2713 |
-
swiper_outer_wrapper = $scope.find('.eae-swiper-outer-wrapper');
|
2714 |
-
wid = $scope.data('id');
|
2715 |
-
wClass = '.elementor-element-'+ wid;
|
2716 |
-
thumb_outer_wrapper = $scope.find('.eae-gallery-thumbs');
|
2717 |
-
|
2718 |
-
let slider_data = swiper_outer_wrapper.data('swiper-settings');
|
2719 |
-
//console.log('Slider Data',slider_data);
|
2720 |
-
|
2721 |
-
let slides_per_view = swiper_outer_wrapper.data('slides-per-view');
|
2722 |
-
let spaceBetween = swiper_outer_wrapper.data('space');
|
2723 |
-
//let navigation = swiper_outer_wrapper.data('navigation');
|
2724 |
-
|
2725 |
-
// BreakPoints Thumbnail
|
2726 |
-
const bp = eae.breakpoints;
|
2727 |
-
let breakpoints = {};
|
2728 |
-
breakpoints[bp.lg - 1] ={
|
2729 |
-
slidesPerView: slides_per_view.desktop,
|
2730 |
-
spaceBetween: spaceBetween.desktop,
|
2731 |
-
};
|
2732 |
-
breakpoints[bp.md - 1] ={
|
2733 |
-
slidesPerView: slides_per_view.tablet,
|
2734 |
-
spaceBetween: spaceBetween.tablet,
|
2735 |
-
};
|
2736 |
-
|
2737 |
-
// BreakPoints Slider
|
2738 |
-
const Bp = eae.breakpoints;
|
2739 |
-
let BreakPoints = {};
|
2740 |
-
BreakPoints[Bp.lg - 1] ={
|
2741 |
-
spaceBetween: slider_data.spaceBetween.desktop,
|
2742 |
-
};
|
2743 |
-
BreakPoints[Bp.md - 1] ={
|
2744 |
-
spaceBetween: slider_data.spaceBetween.tablet,
|
2745 |
-
};
|
2746 |
-
|
2747 |
-
sliderData = {
|
2748 |
-
direction: 'horizontal',
|
2749 |
-
effect : slider_data.effect,
|
2750 |
-
keyboard: {
|
2751 |
-
enabled: slider_data.keyboard,
|
2752 |
-
},
|
2753 |
-
spaceBetween: slider_data.spaceBetween.mobile,
|
2754 |
-
breakpoints: BreakPoints,
|
2755 |
-
speed : slider_data.speed,
|
2756 |
-
loop: "yes" === slider_data.loop ? true : false,
|
2757 |
-
thumbs: {
|
2758 |
-
swiper: {
|
2759 |
-
el: thumb_outer_wrapper,
|
2760 |
direction: 'horizontal',
|
2761 |
-
|
2762 |
-
|
2763 |
-
|
2764 |
-
nextEl: wClass+' .eae-swiper-button-next',
|
2765 |
-
prevEl: wClass+' .eae-swiper-button-prev',
|
2766 |
},
|
2767 |
-
|
2768 |
-
|
2769 |
-
|
2770 |
-
|
2771 |
-
|
2772 |
-
|
2773 |
-
|
2774 |
-
|
2775 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2776 |
}
|
2777 |
-
|
2778 |
-
}
|
2779 |
|
2780 |
-
|
2781 |
-
|
2782 |
-
|
2783 |
-
|
2784 |
-
|
2785 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2786 |
|
2787 |
-
|
2788 |
-
|
2789 |
-
|
2790 |
-
|
2791 |
-
|
2792 |
-
|
2793 |
-
|
2794 |
-
|
2795 |
-
|
2796 |
-
|
2797 |
-
|
2798 |
-
|
2799 |
-
|
2800 |
-
|
2801 |
-
|
2802 |
-
|
2803 |
-
|
2804 |
-
|
2805 |
-
|
2806 |
-
|
2807 |
-
|
2808 |
-
|
2809 |
-
|
2810 |
-
|
2811 |
-
|
2812 |
-
|
2813 |
-
|
2814 |
-
|
2815 |
-
|
2816 |
-
|
2817 |
-
|
2818 |
-
|
2819 |
-
|
2820 |
-
|
2821 |
-
|
2822 |
-
|
2823 |
-
|
2824 |
-
//console.log(sliderData);
|
2825 |
-
// window.sswiper = new Swiper('.elementor-element-' + wid + ' .eae-swiper-outer-wrapper .eae-swiper-container', sliderData);
|
2826 |
-
// $('.elementor-element-' + wid + ' .eae-swiper-outer-wrapper .eae-swiper-container').css('visibility', 'visible');
|
2827 |
-
};
|
2828 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2829 |
|
2830 |
|
2831 |
elementorFrontend.hooks.addAction('frontend/element_ready/wts-ab-image.default', ab_image);
|
@@ -2859,15 +2760,15 @@ let EAEThumbGallery = function ($scope, $) {
|
|
2859 |
elementorFrontend.hooks.addAction('frontend/element_ready/eae-content-switcher.skin4', contentSwitcherRadio);
|
2860 |
//elementorFrontend.hooks.addAction('frontend/element_ready/global', RibbonsBadgesHandler);
|
2861 |
elementorFrontend.hooks.addAction('frontend/element_ready/global', WrapperLinksHander);
|
2862 |
-
// elementorFrontend.hooks.addAction('frontend/element_ready/eae-charts.bar', EAECharts);
|
2863 |
-
// elementorFrontend.hooks.addAction('frontend/element_ready/eae-charts.horizontalBar', EAECharts);
|
2864 |
-
// elementorFrontend.hooks.addAction('frontend/element_ready/eae-charts.line', EAECharts);
|
2865 |
// elementorFrontend.hooks.addAction('frontend/element_ready/eae-charts.pie', EAECharts);
|
2866 |
// elementorFrontend.hooks.addAction('frontend/element_ready/eae-charts.doughnut', EAECharts);
|
2867 |
// elementorFrontend.hooks.addAction('frontend/element_ready/eae-charts.polarArea', EAECharts);
|
2868 |
// // elementorFrontend.hooks.addAction('frontend/element_ready/eae-charts.radar', EAECharts);
|
2869 |
// elementorFrontend.hooks.addAction('frontend/element_ready/eae-charts.bubble', EAECharts);
|
2870 |
elementorFrontend.hooks.addAction('frontend/element_ready/eae-thumbgallery.default', EAEThumbGallery);
|
|
|
|
|
|
|
2871 |
|
2872 |
});
|
2873 |
|
2586 |
};
|
2587 |
|
2588 |
|
2589 |
+
|
2590 |
+
|
2591 |
+
|
2592 |
+
|
2593 |
+
let EAEThumbGallery = function ($scope, $) {
|
2594 |
+
swiper_outer_wrapper = $scope.find('.eae-swiper-outer-wrapper');
|
2595 |
+
wid = $scope.data('id');
|
2596 |
+
wClass = '.elementor-element-'+ wid;
|
2597 |
+
thumb_outer_wrapper = $scope.find('.eae-gallery-thumbs');
|
2598 |
+
|
2599 |
+
let slider_data = swiper_outer_wrapper.data('swiper-settings');
|
2600 |
+
|
2601 |
+
let slides_per_view = swiper_outer_wrapper.data('slides-per-view');
|
2602 |
+
let spaceBetween = swiper_outer_wrapper.data('space');
|
2603 |
+
//let navigation = swiper_outer_wrapper.data('navigation');
|
2604 |
+
|
2605 |
+
// BreakPoints Thumbnail
|
2606 |
+
const bp = eae.breakpoints;
|
2607 |
+
let breakpoints = {};
|
2608 |
+
breakpoints[bp.lg - 1] ={
|
2609 |
+
slidesPerView: slides_per_view.desktop,
|
2610 |
+
spaceBetween: spaceBetween.desktop,
|
2611 |
+
};
|
2612 |
+
breakpoints[bp.md - 1] ={
|
2613 |
+
slidesPerView: slides_per_view.tablet,
|
2614 |
+
spaceBetween: spaceBetween.tablet,
|
2615 |
+
};
|
2616 |
+
|
2617 |
+
// BreakPoints Slider
|
2618 |
+
const Bp = eae.breakpoints;
|
2619 |
+
let BreakPoints = {};
|
2620 |
+
BreakPoints[Bp.lg - 1] ={
|
2621 |
+
spaceBetween: slider_data.spaceBetween.desktop,
|
2622 |
+
};
|
2623 |
+
BreakPoints[Bp.md - 1] ={
|
2624 |
+
spaceBetween: slider_data.spaceBetween.tablet,
|
2625 |
+
};
|
2626 |
+
|
2627 |
+
sliderData = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2628 |
direction: 'horizontal',
|
2629 |
+
effect : slider_data.effect,
|
2630 |
+
keyboard: {
|
2631 |
+
enabled: slider_data.keyboard,
|
|
|
|
|
2632 |
},
|
2633 |
+
spaceBetween: slider_data.spaceBetween.mobile,
|
2634 |
+
breakpoints: BreakPoints,
|
2635 |
+
speed : slider_data.speed,
|
2636 |
+
loop: "yes" === slider_data.loop ? true : false,
|
2637 |
+
thumbs: {
|
2638 |
+
swiper: {
|
2639 |
+
el: thumb_outer_wrapper,
|
2640 |
+
direction: 'horizontal',
|
2641 |
+
spaceBetween: spaceBetween.mobile,
|
2642 |
+
slidesPerView: slides_per_view.mobile,
|
2643 |
+
navigation: {
|
2644 |
+
nextEl: wClass+' .eae-swiper-button-next',
|
2645 |
+
prevEl: wClass+' .eae-swiper-button-prev',
|
2646 |
+
},
|
2647 |
+
speed : slider_data.speed,
|
2648 |
+
loop: "yes" ===slider_data.loop ? true : false,
|
2649 |
+
freeMode : true,
|
2650 |
+
watchSlidesVisibility: true,
|
2651 |
+
watchSlidesProgress: true,
|
2652 |
+
breakpoints: breakpoints,
|
2653 |
+
// autoScrollOffset :true,
|
2654 |
+
// reverseDirection : true,
|
2655 |
+
slideToClickedSlide : true,
|
2656 |
+
}
|
2657 |
+
|
2658 |
+
}
|
2659 |
+
|
2660 |
+
}
|
2661 |
+
if(typeof slider_data.autoplay !== 'undefined' ){
|
2662 |
+
sliderData['thumbs']['swiper']['autoplay']= {
|
2663 |
+
delay: slider_data.autoplay.duration,
|
2664 |
+
disableOnInteraction: slider_data.autoplay.disableOnInteraction,
|
2665 |
+
reverseDirection: slider_data.autoplay.reverseDirection,
|
2666 |
+
|
2667 |
+
}
|
2668 |
}
|
|
|
|
|
2669 |
|
2670 |
+
if (slider_data.navigation == 'yes') {
|
2671 |
+
sliderData['navigation'] = {
|
2672 |
+
nextEl: wClass+' .eae-swiper-button-next',
|
2673 |
+
prevEl: wClass+' .eae-swiper-button-prev',
|
2674 |
+
}
|
2675 |
+
}
|
2676 |
+
if(slider_data.pagination !== '' ){
|
2677 |
+
sliderData['pagination'] = {
|
2678 |
+
type : slider_data.pagination,
|
2679 |
+
el: wClass+' .swiper-pagination',
|
2680 |
+
clickable : slider_data.clickable,
|
2681 |
+
}
|
2682 |
+
}
|
2683 |
|
2684 |
+
if(typeof slider_data.autoplay !== 'undefined' ){
|
2685 |
+
sliderData['autoplay'] = {
|
2686 |
+
delay: slider_data.autoplay.duration,
|
2687 |
+
disableOnInteraction: slider_data.autoplay.disableOnInteraction,
|
2688 |
+
reverseDirection: slider_data.autoplay.reverseDirection,
|
2689 |
+
}
|
2690 |
+
}
|
2691 |
+
|
2692 |
+
if ( 'undefined' === typeof Swiper ) {
|
2693 |
+
const asyncSwiper = elementorFrontend.utils.swiper;
|
2694 |
+
new asyncSwiper( '.elementor-element-' + wid + ' .eae-swiper-outer-wrapper .eae-swiper-container', sliderData ).then( ( newSwiperInstance ) => {
|
2695 |
+
sswiper = newSwiperInstance;
|
2696 |
+
} );
|
2697 |
+
} else {
|
2698 |
+
window.sswiper = new Swiper('.elementor-element-' + wid + ' .eae-swiper-outer-wrapper .eae-swiper-container', sliderData);
|
2699 |
+
$('.elementor-element-' + wid + ' .eae-swiper-outer-wrapper .eae-swiper-container').css('visibility', 'visible');
|
2700 |
+
}
|
2701 |
+
|
2702 |
+
if(typeof slider_data.autoplay !== 'undefined' ){
|
2703 |
+
let pause_on_hover = slider_data.autoplay.pauseOnHover;
|
2704 |
+
if (pause_on_hover == 'yes' ) {
|
2705 |
+
jQuery( wClass + ' .eae-swiper-container').hover(function () {
|
2706 |
+
sswiper.autoplay.stop();
|
2707 |
+
sswiper.thumbs.swiper.autoplay.stop();
|
2708 |
+
}, function () {
|
2709 |
+
sswiper.autoplay.start();
|
2710 |
+
sswiper.thumbs.swiper.autoplay.start();
|
2711 |
+
});
|
2712 |
+
}
|
2713 |
+
}
|
2714 |
+
|
2715 |
+
};
|
2716 |
+
|
2717 |
+
|
2718 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
2719 |
|
2720 |
+
let EAEChart = function ($scope , $){
|
2721 |
+
const Chart_Outer_Wrapper = $scope.find('.eae-chart-outer-container');
|
2722 |
+
const cid = $scope.data('id');
|
2723 |
+
const chartclass = '.elementor-element-' + cid;
|
2724 |
+
const chart_canvas = $scope.find('#eae-chart-canvas');
|
2725 |
+
let settings = Chart_Outer_Wrapper.data('settings');
|
2726 |
+
|
2727 |
+
new Chart( chart_canvas, settings );
|
2728 |
+
|
2729 |
+
};
|
2730 |
|
2731 |
|
2732 |
elementorFrontend.hooks.addAction('frontend/element_ready/wts-ab-image.default', ab_image);
|
2760 |
elementorFrontend.hooks.addAction('frontend/element_ready/eae-content-switcher.skin4', contentSwitcherRadio);
|
2761 |
//elementorFrontend.hooks.addAction('frontend/element_ready/global', RibbonsBadgesHandler);
|
2762 |
elementorFrontend.hooks.addAction('frontend/element_ready/global', WrapperLinksHander);
|
|
|
|
|
|
|
2763 |
// elementorFrontend.hooks.addAction('frontend/element_ready/eae-charts.pie', EAECharts);
|
2764 |
// elementorFrontend.hooks.addAction('frontend/element_ready/eae-charts.doughnut', EAECharts);
|
2765 |
// elementorFrontend.hooks.addAction('frontend/element_ready/eae-charts.polarArea', EAECharts);
|
2766 |
// // elementorFrontend.hooks.addAction('frontend/element_ready/eae-charts.radar', EAECharts);
|
2767 |
// elementorFrontend.hooks.addAction('frontend/element_ready/eae-charts.bubble', EAECharts);
|
2768 |
elementorFrontend.hooks.addAction('frontend/element_ready/eae-thumbgallery.default', EAEThumbGallery);
|
2769 |
+
elementorFrontend.hooks.addAction('frontend/element_ready/eae-chart.bar', EAEChart);
|
2770 |
+
elementorFrontend.hooks.addAction('frontend/element_ready/eae-chart.horizontalBar', EAEChart);
|
2771 |
+
elementorFrontend.hooks.addAction('frontend/element_ready/eae-chart.line', EAEChart);
|
2772 |
|
2773 |
});
|
2774 |
|
assets/js/eae.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(window).on("elementor/frontend/init",(function(){elementorFrontend.hooks.addAction("frontend/element_ready/wts-gmap.default",(function(e){map=function(a){$wrapper=e.find(".eae-markers");var t=$wrapper.data("zoom"),i=a.find(".marker"),n=$wrapper.data("style"),d=($wrapper.data("scroll"),{zoom:t,center:new google.maps.LatLng(0,0),mapTypeId:google.maps.MapTypeId.ROADMAP,styles:n}),r=new google.maps.Map(a[0],d);return r.markers=[],i.each((function(){!function(a,t){var i=$wrapper.data("animate");$wrapper.data("show-info-window-onload");$wrapper=e.find(".eae-markers");var n=new google.maps.LatLng(a.attr("data-lat"),a.attr("data-lng"));if(icon_img=a.attr("data-icon"),""!=icon_img)var d={url:a.attr("data-icon"),scaledSize:new google.maps.Size(a.attr("data-icon-size"),a.attr("data-icon-size"))};var r=new google.maps.Marker({position:n,map:t,icon:d,animation:google.maps.Animation.DROP});"animate-yes"==i&&"yes"!=a.data("info-window")&&r.setAnimation(google.maps.Animation.BOUNCE);"animate-yes"==i&&google.maps.event.addListener(r,"click",(function(){r.setAnimation(null)}));if(t.markers.push(r),a.html()){var s=new google.maps.InfoWindow({content:a.html()});"yes"==a.data("info-window")&&s.open(t,r),google.maps.event.addListener(r,"click",(function(){s.open(t,r)}))}"animate-yes"==i&&google.maps.event.addListener(s,"closeclick",(function(){r.setAnimation(google.maps.Animation.BOUNCE)}))}(jQuery(this),r)})),function(e,a){var t=new google.maps.LatLngBounds;jQuery.each(e.markers,(function(e,a){var i=new google.maps.LatLng(a.position.lat(),a.position.lng());t.extend(i)})),1==e.markers.length?(e.setCenter(t.getCenter()),e.setZoom(a)):e.fitBounds(t)}(r,t),r}(e.find(".eae-markers"))})),elementorFrontend.hooks.addAction("frontend/element_ready/global",(function(e){var a,t,i,n,d,r,s,l=[],o=[],c=e.children(".eae-section-bs").children(".eae-section-bs-inner");c&&c.data("eae-bg-slider")&&(slider_images=c.data("eae-bg-slider"),a=c.data("eae-bg-slider-transition"),t=c.data("eae-bg-slider-animation"),n=("yes"==(i=c.data("eae-bg-custom-overlay"))||c.data("eae-bg-slider-overlay"),eae_editor.plugin_url+"assets/lib/vegas/overlays/"+c.data("eae-bg-slider-overlay")),d=c.data("eae-bg-slider-cover"),r=c.data("eae-bs-slider-delay"),s=c.data("eae-bs-slider-timer"),"undefined"!=typeof slider_images&&(l=slider_images.split(","),jQuery.each(l,(function(e,a){var t=[];t.src=a,o.push(t)})),c.vegas({slides:o,transition:a,animation:t,overlay:n,cover:d,delay:r,timer:s,init:function(){"yes"==i&&c.children(".vegas-overlay").css("background-image","")}})))}))}));var isEditMode=!1,breakpoints=eae.breakpoints;!function(e){e(window).on("elementor/frontend/init",(function(){var a=function(e,a){function t(e){$icons=a(document).find(e).find(".eae-ic-icon-wrap"),window.innerWidth<767?$icons.each((function(e,t){a(t).css("top",a(t).height()/2+8+"px"),a(t).next(".eae-info-circle-item__content-wrap").css("padding-top",a(t).height()/2+8+"px")})):$icons.each((function(e,t){a(t).css("margin-left",-.5*a(t).outerWidth()),a(t).css("margin-top",-.5*a(t).outerHeight()),$a=function(e){return e=(e-90)*Math.PI/180,{x:50+45*Math.cos(e),y:50+45*Math.sin(e)}}($angle),$b=360/$icons.length,a(t).css("left",$a.x+"%"),a(t).css("top",$a.y+"%"),$angle+=$b}))}$wrap_class=".elementor-element-"+e.data("id"),$angle=0,t(e);var i=null;function n(){"yes"==e.find(".eae-info-circle").data("autoplay")&&(i=setInterval(d,$autoplayDuration))}function d(){e.find(".eae-active").next().length>0?e.find(".eae-active").next().addClass("eae-active").siblings().removeClass("eae-active"):e.find(".eae-info-circle-item").eq(0).addClass("eae-active").siblings().removeClass("eae-active")}$autoplayDuration=e.find(".eae-info-circle").data("delay"),n(),e.find(".eae-ic-icon-wrap").hover((function(){clearInterval(i)}),(function(){n()})),e.find(".eae-info-circle-item").length>0&&a(e.find(".eae-info-circle-item")[0]).addClass("eae-active"),e.find(".eae-ic-icon-wrap").on("click",(function(){e.find(".eae-info-circle-item").removeClass("eae-active"),a(this).parent().addClass("eae-active")})),e.hasClass("eae-mouseenter-yes")&&e.find(".eae-ic-icon-wrap").on("mouseenter",(function(){e.find(".eae-info-circle-item").removeClass("eae-active"),a(this).parent().addClass("eae-active")})),window.addEventListener("resize",t.bind(this,$wrap_class))},t=function(e,a){function t(){var t=e.find(".eae-timline-progress-bar"),i=e.find(".eae-timeline-item"),n=e.find(".eae-timeline");const d=n.data("top-offset");var r=a(n).height(),s=a(i).last().find(".eae-tl-icon-wrapper").offset().top-a(i[0]).parent().offset().top,l=e.find(".eae-tl-icon-wrapper");a(t).css("top",a(i[0]).find(".eae-tl-icon-wrapper").offset().top-a(i[0]).parent().offset().top),a(t).css("bottom",r-s),a(t).css("left",l.eq(0)[0].offsetLeft+l.eq(0).width()/2),a(t).css("display","block"),i.each((function(e,t){new Waypoint({element:a(t),handler:function(e){"down"==e?a(t).addClass("eae-tl-item-focused"):a(t).removeClass("eae-tl-item-focused")},offset:d})}))}t(),window.addEventListener("resize",t),window.addEventListener("scroll",(function(){e.find(".eae-timline-progress-bar");const t=e.find(".eae-timeline").data("top-offset");e.find(".eae-pb-inner-line").css("height",a(window).scrollTop()-e.find(".eae-timeline").offset().top+t),e.find(".eae-pb-inner-line").css("max-height",e.find(".eae-pb-inner-line").parent().height())}))};function i(e,a,t){var i=new Date;i.setTime(i.getTime()+60*t*60*1e3);var n="expires="+i.toUTCString();document.cookie=e+"="+a+";"+n+";path=/"}function n(e){for(var a=e+"=",t=decodeURIComponent(document.cookie).split(";"),i=0;i<t.length;i++){for(var n=t[i];" "==n.charAt(0);)n=n.substring(1);if(0==n.indexOf(a))return n.substring(a.length,n.length)}return""}var d=function(e,a){$is_rtl=jQuery("body").hasClass("rtl"),$wrapper=e.find(".eae-progress-bar");$wrapper.attr("data-skill");var t=$wrapper.attr("data-value"),i=$wrapper.attr("data-skin"),n=$wrapper.find(".eae-pb-bar-skill"),d=$wrapper.find(".eae-pb-bar-value"),r=$wrapper.find(".eae-pb-bar"),s=$wrapper.find(".eae-pb-bar-inner");"skin1"===i&&a(s).attr("style","width : "+t+"%"),"skin2"===i&&a(s).attr("style","width : "+t+"%"),"skin3"===i&&(a(d).addClass("eae-pb-bar-value--aligned-value"),$is_rtl?a(d).attr("style","right :"+t+"%"):a(d).attr("style","left :"+t+"%"),a(s).attr("style","width :"+t+"%")),"skin4"===i&&(a(d).addClass("eae-pb-bar-value--aligned-value"),$is_rtl?a(d).attr("style","right :"+t+"%"):a(d).attr("style","left :"+t+"%"),a(s).attr("style","width :"+t+"%"),a(r).addClass("eae-pb-bar--no-overflow")),"skin5"===i&&(a(d).addClass("eae-pb-bar-value--aligned-value"),$is_rtl?a(d).attr("style","right :"+t+"%"):a(d).attr("style","left :"+t+"%"),a(s).attr("style","width :"+t+"%")),$wrapper.each((function(e,t){new Waypoint({element:t,skill_value:a(t).find(".eae-pb-bar-skill"),valueElem:a(t).find(".eae-pb-bar-value"),prgBar:a(t).find(".eae-pb-bar-bar"),prgInner:a(t).find(".eae-pb-bar-inner"),handler:function(e){"down"==e&&(a(d).hasClass("js-animated")||a(d).addClass("js-animated"),a(s).hasClass("js-animated")||a(s).addClass("js-animated"),a(n).hasClass("js-animated")||a(n).addClass("js-animated"))},offset:"bottom-in-view"})}))},r=function(e,a){var t=e.find(".eae-content-switcher-wrapper"),i=(e.data("id"),t.find(".eae-content-switch-button"));i.each((function(e,n){a(this).on("click",(function(e){e.preventDefault();let n=a(this).find(".eae-content-switch-label");if(!a(this).hasClass("active")){a(i).removeClass("active");let e=a(n).attr("id");a(this).addClass("active");var d=a(t).find(".eae-cs-content-section");a(d).removeClass("active");let r=a(t).find(".eae-content-section-"+e);a(r).addClass("active")}}))}))},s=function(e,a){let t=e.find(".eae-content-switcher-wrapper"),i=(e.data("id"),t.find(".eae-cs-switch-label")),n=t.find(".eae-content-switch-label.primary-label");const d=a(n).attr("item_id");let r=t.find(".eae-content-switch-label.secondary-label");const s=a(r).attr("item_id");let l=t.find(".eae-cs-content-section.eae-content-section-"+d),o=t.find(".eae-cs-content-section.eae-content-section-"+s);a(i).on("click",(function(e){a(this).find("input.eae-content-toggle-switch").is(":checked")?(r.addClass("active"),o.addClass("active"),n.removeClass("active"),l.removeClass("active")):(n.addClass("active"),l.addClass("active"),r.removeClass("active"),o.removeClass("active"))}))};e.fn.EAEHoverDirection=function(a){var t=e.extend({inaccuracy:30,speed:200},a);this.find(".overlay").css({top:-9999999}),this.mouseenter((function(a){container=e(this),overlay=container.find(".overlay"),parentOffset=container.offset(),relX=a.pageX-parentOffset.left,relY=a.pageY-parentOffset.top,overlay.css({top:0,left:0,width:container.width(),height:container.height()}),relX>container.width()-t.inaccuracy?overlay.css({top:0,left:container.width()}):relX<t.inaccuracy?overlay.css({top:0,left:-container.width()}):relY>container.height()-t.inaccuracy?overlay.css({top:container.width(),left:0}):relY<t.inaccuracy&&overlay.css({top:-container.width(),left:0}),overlay.animate({top:0,left:0},t.speed)})),this.mouseleave((function(a){container=e(this),overlay=container.find(".overlay"),parentOffset=container.offset(),relX=a.pageX-parentOffset.left,relY=a.pageY-parentOffset.top,relX<=0&&overlay.animate({top:0,left:-container.width()},t.speed),relX>=container.width()&&overlay.animate({top:0,left:container.width()},t.speed),relY<=0&&overlay.animate({left:0,top:-container.height()},t.speed),relY>=container.height()&&overlay.animate({left:0,top:container.height()},t.speed)}))};elementorFrontend.hooks.addAction("frontend/element_ready/wts-ab-image.default",(function(e,a){e.find(".eae-img-comp-container").imagesLoaded().done((function(){ab_style=e.find(".eae-img-comp-container").data("ab-style"),slider_pos=e.find(".eae-img-comp-container").data("slider-pos"),"horizontal"===ab_style?(separator_width=parseInt(e.find(".eae-img-comp-overlay").css("border-right-width")),function(e){var a,t;a=e.find(".eae-img-comp-overlay"),t=(t=a.width())*slider_pos/100,function(a){var i,n,d,r=0;function s(e){e.preventDefault(),r=1,window.addEventListener("mousemove",o),i.addEventListener("touchmove",c)}function l(){r=0}function o(e){var t;if(0==r)return!1;(t=function(e){var t;return e=e||window.event,t=a.getBoundingClientRect(),e.pageX-t.left}(e))<0&&(t=0),t>n&&(t=n),f(t)}function c(e){var t;if(0==r)return!1;(t=function(e){var t;return t=a.getBoundingClientRect(),e.changedTouches[0].clientX-t.left}(e))<0&&(t=0),t>n&&(t=n),f(t)}function f(e){a.style.width=e+"px",i.style.left=a.offsetWidth-i.offsetWidth/2-separator_width/2+"px"}n=a.offsetWidth,d=a.offsetHeight,a.style.width=t+"px",(i=(i=e.find(".eae-img-comp-slider"))[0]).style.top=d/2-i.offsetHeight/2+"px",i.style.left=t-i.offsetWidth/2-separator_width/2+"px",e.hasClass("elementor-element-edit-mode")||(i.addEventListener("mousedown",s),window.addEventListener("mouseup",l),i.addEventListener("touchstart",s),window.addEventListener("touchstop",l))}(a[0])}(e)):(separator_width=parseInt(e.find(".eae-img-comp-overlay").css("border-bottom-width")),function(e){var a;a=e.find(".eae-img-comp-overlay"),start_pos=a.height(),start_pos=start_pos*slider_pos/100,function(a){var t,i,n,d=0;function r(e){e.preventDefault(),d=1,window.addEventListener("mousemove",l),t.addEventListener("touchmove",o)}function s(){d=0}function l(e){var t;if(0==d)return!1;(t=function(e){var t,i=0;return e=e||window.event,t=a.getBoundingClientRect(),i=e.pageY-t.top,i-=window.pageYOffset}(e))<0&&(t=0),t>n&&(t=n),c(t)}function o(e){var t;if(0==d)return!1;(t=function(e){var t;return t=a.getBoundingClientRect(),e.changedTouches[0].clientY-t.top}(e))<0&&(t=0),t>n&&(t=n),c(t)}function c(e){a.style.height=e+"px",t.style.top=a.offsetHeight-t.offsetHeight/2-separator_width/2+"px"}i=a.offsetWidth,n=a.offsetHeight,a.style.height=start_pos+"px",(t=(t=e.find(".eae-img-comp-slider"))[0]).style.top=start_pos-t.offsetHeight/2-separator_width/2+"px",t.style.left=i/2-t.offsetWidth/2+"px",e.hasClass("elementor-element-edit-mode")||(t.addEventListener("mousedown",r),window.addEventListener("mouseup",s),t.addEventListener("touchstart",r),window.addEventListener("touchstop",s))}(a[0])}(e))}))})),elementorFrontend.hooks.addAction("frontend/element_ready/global",(function(e,a){e.hasClass("eae-particle-yes")&&(id=e.data("id"),element_type=e.data("element_type"),pdata=e.data("eae-particle"),pdata_wrapper=e.find(".eae-particle-wrapper").data("eae-pdata"),"undefined"!=typeof pdata&&""!=pdata?e.find(".eae-section-bs").length>0?(e.find(".eae-section-bs").after('<div class="eae-particle-wrapper" id="eae-particle-'+id+'"></div>'),particlesJS("eae-particle-"+id,pdata)):("column"==element_type?e.prepend('<div class="eae-particle-wrapper" id="eae-particle-'+id+'"></div>'):e.prepend('<div class="eae-particle-wrapper " id="eae-particle-'+id+'"></div>'),particlesJS("eae-particle-"+id,pdata)):"undefined"!=typeof pdata_wrapper&&""!=pdata_wrapper&&(element_type,e.prepend('<div class="eae-particle-wrapper eae-particle-area" id="eae-particle-'+id+'"></div>'),particlesJS("eae-particle-"+id,JSON.parse(pdata_wrapper))))})),elementorFrontend.hooks.addAction("frontend/element_ready/global",(function(e,a){if(e.hasClass("eae-animated-gradient-yes")){id=e.data("id"),color=e.data("color"),angle=e.data("angle");var t="linear-gradient("+angle+","+color+")";heading=e.find(".elementor-heading-title"),e.css("background-image",t),e.hasClass("elementor-element-edit-mode")&&(color=e.find(".animated-gradient").data("color"),angle=e.find(".animated-gradient").data("angle"),gradient_color_editor="linear-gradient("+angle+","+color+")",e.prepend('<div class="animated-gradient" style="background-image : '+gradient_color_editor+' "></div>'))}})),elementorFrontend.hooks.addAction("frontend/element_ready/wts-modal-popup.default",(function(e,a){$preview_modal=e.find(".eae-popup-wrapper").data("preview-modal"),$close_btn_type=e.find(".eae-popup-wrapper").data("close-button-type"),$close_btn=e.find(".eae-popup-wrapper").data("close-btn"),"icon"==$close_btn_type?$close_btn_html='<i class="eae-close '+$close_btn+'"> </i>':$close_btn_html='<svg class="eae-close" style="-webkit-mask: url('+$close_btn+"); mask: url("+$close_btn+'); "></svg>',$magnific=e.find(".eae-popup-link").eaePopup({type:"inline",disableOn:0,key:null,midClick:!1,mainClass:"eae-popup eae-popup-"+e.find(".eae-popup-link").data("id")+" eae-wrap-"+e.find(".eae-popup-link").data("ctrl-id"),preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:e.find(".eae-popup-wrapper").data("close-in-out"),showCloseBtn:!0,enableEscapeKey:!1,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:$close_btn_html,tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}),"yes"==$preview_modal&&e.hasClass("elementor-element-edit-mode")&&e.find(".eae-popup-link").click()})),elementorFrontend.hooks.addAction("frontend/element_ready/wts-testimonial-slider.default",(function(e,a){if(e.find(".eae-grid-wrapper").hasClass("eae-masonry-yes")){var t=e.find(".eae-grid").masonry({});t.imagesLoaded().progress((function(){t.masonry("layout")}))}if(e.find(".eae-layout-carousel").length){outer_wrapper=e.find(".eae-swiper-outer-wrapper"),wid=e.data("id"),wclass=".elementor-element-"+wid;var i=outer_wrapper.data("direction"),n=outer_wrapper.data("speed"),d=outer_wrapper.data("autoplay"),r=outer_wrapper.data("duration"),s=outer_wrapper.data("effect"),l=outer_wrapper.data("space"),o=outer_wrapper.data("loop");o="yes"==o;var c=outer_wrapper.data("slides-per-view"),f=outer_wrapper.data("slides-per-group"),p=outer_wrapper.data("ptype"),m=outer_wrapper.data("navigation"),u=outer_wrapper.data("clickable"),g=outer_wrapper.data("keyboard"),v=outer_wrapper.data("scrollbar");adata={direction:i,effect:s,spaceBetween:l.desktop,loop:o,speed:n,slidesPerView:c.desktop,slidesPerGroup:f.desktop,observer:!0,mousewheel:{invert:!0},breakpoints:{1024:{spaceBetween:l.tablet,slidesPerView:c.tablet,slidesPerGroup:f.tablet},767:{spaceBetween:l.mobile,slidesPerView:c.mobile,slidesPerGroup:f.mobile}}},"fade"==s&&(adata.fadeEffect={crossFade:!1}),adata.autoplay="yes"==d&&{delay:r,disableOnInteraction:!1},"yes"==m&&(adata.navigation={nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}),""!=p&&(adata.pagination={el:".swiper-pagination",type:p}),"bullets"==p&&"yes"==u&&(adata.pagination={el:".swiper-pagination",clickable:!0,type:p}),"yes"==v&&(adata.scrollbar={el:".swiper-scrollbar",draggable:!0}),"yes"==g&&(adata.keyboard={enabled:!0,onlyInViewport:!0}),0==o&&(adata.autoplay={delay:r,stopOnLastSlide:!0,disableOnInteraction:!1}),window.mswiper=new Swiper(".elementor-element-"+wid+" .eae-swiper-outer-wrapper .swiper-container",adata),a(".elementor-element-"+wid+" .eae-swiper-outer-wrapper .swiper-container").css("visibility","visible")}})),elementorFrontend.hooks.addAction("frontend/element_ready/eae-info-circle.skin1",a),elementorFrontend.hooks.addAction("frontend/element_ready/eae-info-circle.skin2",a),elementorFrontend.hooks.addAction("frontend/element_ready/eae-info-circle.skin3",a),elementorFrontend.hooks.addAction("frontend/element_ready/eae-info-circle.skin4",a),elementorFrontend.hooks.addAction("frontend/element_ready/eae-timeline.skin1",t),elementorFrontend.hooks.addAction("frontend/element_ready/eae-timeline.skin2",t),elementorFrontend.hooks.addAction("frontend/element_ready/eae-timeline.skin3",t),elementorFrontend.hooks.addAction("frontend/element_ready/eae-timeline.skin4",t),elementorFrontend.hooks.addAction("frontend/element_ready/eae-evergreen-timer.skin1",(function(e,a){var t=e.find(".eae-evergreen-wrapper").data("egtime"),d=e.find(".eae-evergreen-wrapper").data("egt-expire"),r=e.find(".eae-evergreen-wrapper").data("element-type"),s="eae-"+e.find(".eae-evergreen-wrapper").data("id"),l="eae-temp-"+e.find(".eae-evergreen-wrapper").data("id"),o=e.find(".eae-evergreen-wrapper").data("actions"),c=e.find(".eae-evergreen-wrapper").data("unqid"),f=(new Date).getTime();if(!e.hasClass("elementor-element-edit-mode"))if("countdown"===r){u=new Date(t),t=u.getTime();var p="expires="+u.toUTCString();document.cookie=l+"="+u.getTime()+";"+p+";path=/"}else{var m=n(s),u="";if(""!==m){(u=new Date(parseInt(m))).setSeconds(u.getSeconds()+e.find(".eae-evergreen-wrapper").data("egtime")),t=u.getTime();var g=new Date(parseInt(m));g.setTime(g.getTime()+60*d*60*1e3);var v="expires="+g.toUTCString();document.cookie=s+"="+m+";"+v+";path=/";var h=new Date(parseInt(m));h.setTime(h.getTime()+1e3*e.find(".eae-evergreen-wrapper").data("egtime"));p="expires="+h.toUTCString();t-f>0&&(document.cookie=l+"="+m+";"+p+";path=/")}else{temp_date=t,(u=new Date).setSeconds(u.getSeconds()+e.find(".eae-evergreen-wrapper").data("egtime")),t=u.getTime(),i(s,(new Date).getTime(),d);var w=new Date;w.setTime(w.getTime()+1e3*temp_date);var y="expires="+w.toUTCString();document.cookie=l+"="+(new Date).getTime()+";"+y+";path=/"}}if(!e.hasClass("elementor-element-edit-mode")&&t-f<0)return o.length>0&&o.forEach((function(t){"redirect"===t&&($url=e.find(".eae-evergreen-wrapper").data("redirected-url"),""!==a.trim($url)&&(window.location.href=$url1)),"hide"===t&&(e.hasClass("elementor-element-edit-mode")||(e.find("#eaeclockdiv").css("display","none"),e.find(".egt-title").css("display","none"))),"message"===t&&e.find(".eae-egt-message").css("display","block"),"hide_parent"===t&&(e.hasClass("elementor-element-edit-mode")||($p_secs=e.closest("section"),$p_secs.css("display","none")))})),days="00",hours="00",minutes="00",seconds="00",e.find("."+c).find("#eaedivDays").html(days),e.find("."+c).find("#eaedivHours").html(hours.slice(-2)),e.find("."+c).find("#eaedivMinutes").html(minutes.slice(-2)),void e.find("."+c).find("#eaedivSeconds").html(seconds.slice(-2));e.hasClass("elementor-element-edit-mode")&&("countdown"===r?(u=new Date(t),t=u.getTime()):((u=new Date).setSeconds(u.getSeconds()+e.find(".eae-evergreen-wrapper").data("egtime")),t=u.getTime()));var k=setInterval((function(){var i=(new Date).getTime(),n=t-i,d=0,r=0,s=0,l=0;n>0?(d=Math.floor(n/864e5),r="0"+Math.floor(n%864e5/36e5),s="0"+Math.floor(n%36e5/6e4),l="0"+Math.floor(n%6e4/1e3)):(o.length>0&&(e.hasClass("elementor-element-edit-mode")||o.forEach((function(t){"redirect"===t&&($url1=e.find(".eae-evergreen-wrapper").data("redirected-url"),""!==a.trim($url1)&&(window.location.href=$url1)),"hide"===t&&(e.find("#eaeclockdiv").css("display","none"),e.find(".egt-title").css("display","none")),"message"===t&&e.find(".eae-egt-message").css("display","block"),"hide_parent"===t&&(e.hasClass("elementor-element-edit-mode")||($p_secs=e.closest("section"),$p_secs.css("display","none")))}))),clearInterval(k),d="0",r="00",s="00",l="00"),d<10&&(d="0"+d),e.find("."+c).find("#eaedivDays").html(d),e.find("."+c).find("#eaedivHours").html(r.slice(-2)),e.find("."+c).find("#eaedivMinutes").html(s.slice(-2)),e.find("."+c).find("#eaedivSeconds").html(l.slice(-2))}),1e3)})),elementorFrontend.hooks.addAction("frontend/element_ready/eae-evergreen-timer.skin2",(function(e,a){var t=e.find(".eae-evergreen-wrapper").data("egtime"),d=e.find(".eae-evergreen-wrapper").data("egt-expire"),r=e.find(".eae-evergreen-wrapper").data("element-type"),s="eae-"+e.find(".eae-evergreen-wrapper").data("id"),l="eae-temp-"+e.find(".eae-evergreen-wrapper").data("id"),o=e.find(".eae-evergreen-wrapper").data("actions"),c=e.find(".eae-evergreen-wrapper").data("unqid"),f=(new Date).getTime();if(!e.hasClass("elementor-element-edit-mode"))if("countdown"===r){u=new Date(t),t=u.getTime();var p="expires="+u.toUTCString();document.cookie=l+"="+u.getTime()+";"+p+";path=/"}else{var m=n(s),u="";if(""!==m){(u=new Date(parseInt(m))).setSeconds(u.getSeconds()+e.find(".eae-evergreen-wrapper").data("egtime")),t=u.getTime();var g=new Date(parseInt(m));g.setTime(g.getTime()+60*d*60*1e3);var v="expires="+g.toUTCString();document.cookie=s+"="+m+";"+v+";path=/";var h=new Date(parseInt(m));h.setTime(h.getTime()+1e3*e.find(".eae-evergreen-wrapper").data("egtime"));p="expires="+h.toUTCString();t-f>0&&(document.cookie=l+"="+m+";"+p+";path=/")}else{temp_date=t,(u=new Date).setSeconds(u.getSeconds()+e.find(".eae-evergreen-wrapper").data("egtime")),t=u.getTime(),i(s,(new Date).getTime(),d);var w=new Date;w.setTime(w.getTime()+1e3*temp_date);var y="expires="+w.toUTCString();document.cookie=l+"="+(new Date).getTime()+";"+y+";path=/"}}if(!e.hasClass("elementor-element-edit-mode")&&t-f<0)return void(o.length>0&&o.forEach((function(t){"redirect"===t&&($url=e.find(".eae-evergreen-wrapper").data("redirected-url"),""!==a.trim($url)&&(window.location.href=$url)),"hide"===t&&(e.find("."+c).find(".timer-container").css("display","none"),e.find("."+c).find(".egt-title").css("display","none")),"message"===t&&e.find("."+c).find(".eae-egt-message").css("display","block"),"hide_parent"===t&&(e.hasClass("elementor-element-edit-mode")||($p_secs=e.closest("section"),$p_secs.css("display","none")))})));e.hasClass("elementor-element-edit-mode")&&("countdown"===r?(u=new Date(t),t=u.getTime()):((u=new Date).setSeconds(u.getSeconds()+e.find(".eae-evergreen-wrapper").data("egtime")),t=u.getTime()));var k=setInterval((function(){var i=(new Date).getTime(),n=t-i,d=Math.floor(n/864e5),r=Math.floor(n%864e5/36e5),s=Math.floor(n%36e5/6e4),l=Math.floor(n%6e4/1e3);if(e.find("."+c).find("#eaeulSec1").find(".flip-clock-active").removeClass("flip-clock-active"),e.find("."+c).find("#eaeulSec1").find(".flip-clock-before").removeClass("flip-clock-before"),e.find("."+c).find("#eaeulSec").find(".flip-clock-active").removeClass("flip-clock-active"),e.find("."+c).find("#eaeulSec").find(".flip-clock-before").removeClass("flip-clock-before"),n<0)return clearInterval(k),void(o.length>0&&o.forEach((function(t){"redirect"===t&&(e.hasClass("elementor-element-edit-mode")||($url1=e.find(".eae-evergreen-wrapper").data("redirected-url"),""!==a.trim($url1)&&(window.location.href=$url1))),"hide"===t&&(e.hasClass("elementor-element-edit-mode")||(e.find("."+c).find(".timer-container").css("display","none"),e.find("."+c).find(".egt-title").css("display","none"))),"message"===t&&(e.hasClass("elementor-element-edit-mode")||e.find("."+c).find(".eae-egt-message").css("display","block")),"hide_parent"===t&&(e.hasClass("elementor-element-edit-mode")||($p_secs=e.closest("section"),$p_secs.css("display","none")))})));if(2===a.trim(l).length){var f="#eaeulSec1 li:eq( "+a.trim(l).charAt(1)+" )",p="#eaeulSec li:eq( "+a.trim(l).charAt(0)+" )";e.find("."+c).find(f).next().length>0?(e.find("."+c).find(f).addClass("flip-clock-active"),e.find("."+c).find(f).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulSec1 li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulSec1 li:first-child").addClass("flip-clock-before")),e.find("."+c).find(p).next().length>0?(e.find("."+c).find(p).addClass("flip-clock-active"),e.find("."+c).find(p).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulSec li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulSec li:first-child").addClass("flip-clock-before"))}else{f="#eaeulSec1 li:eq( "+a.trim(l).charAt(0)+" )",p="#eaeulSec li:eq( 0 )";e.find("."+c).find(f).next().length>0?(e.find("."+c).find(f).addClass("flip-clock-active"),e.find("."+c).find(f).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulSec1 li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulSec1 li:first-child").addClass("flip-clock-before")),e.find("."+c).find(p).next().length>0?(e.find("."+c).find(p).addClass("flip-clock-active"),e.find("."+c).find(p).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulSec li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulSec li:first-child").addClass("flip-clock-before"))}if(e.find("."+c).find("#eaeulMin1").find(".flip-clock-active").removeClass("flip-clock-active"),e.find("."+c).find("#eaeulMin1").find(".flip-clock-before").removeClass("flip-clock-before"),e.find("."+c).find("#eaeulMin").find(".flip-clock-active").removeClass("flip-clock-active"),e.find("."+c).find("#eaeulMin").find(".flip-clock-before").removeClass("flip-clock-before"),2==a.trim(s).length){f="#eaeulMin1 li:eq( "+a.trim(s).charAt(1)+" )",p="#eaeulMin li:eq( "+a.trim(s).charAt(0)+" )";e.find("."+c).find(f).next().length>0?(e.find("."+c).find(f).addClass("flip-clock-active"),e.find("."+c).find(f).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulMin1 li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulMin1 li:first-child").addClass("flip-clock-before")),e.find("."+c).find(p).next().length>0?(e.find("."+c).find(p).addClass("flip-clock-active"),e.find("."+c).find(p).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulMin li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulMin li:first-child").addClass("flip-clock-before"))}else{f="#eaeulMin1 li:eq( "+a.trim(s).charAt(0)+" )",p="#eaeulMin li:eq( 0 )";e.find("."+c).find(f).next().length>0?(e.find("."+c).find(f).addClass("flip-clock-active"),e.find("."+c).find(f).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulMin1 li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulMin1 li:first-child").addClass("flip-clock-before")),e.find("."+c).find(p).next().length>0?(e.find("."+c).find(p).addClass("flip-clock-active"),e.find("."+c).find(p).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulMin li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulMin li:first-child").addClass("flip-clock-before"))}if(e.find("."+c).find("#eaeulHour1").find(".flip-clock-active").removeClass("flip-clock-active"),e.find("."+c).find("#eaeulHour1").find(".flip-clock-before").removeClass("flip-clock-before"),e.find("."+c).find("#eaeulHour").find(".flip-clock-active").removeClass("flip-clock-active"),e.find("."+c).find("#eaeulHour").find(".flip-clock-before").removeClass("flip-clock-before"),2==a.trim(r).length){f="#eaeulHour1 li:eq( "+a.trim(r).charAt(1)+" )",p="#eaeulHour li:eq( "+a.trim(r).charAt(0)+" )";e.find("."+c).find(f).next().length>0?(e.find("."+c).find(f).addClass("flip-clock-active"),e.find("."+c).find(f).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulHour1 li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulHour1 li:first-child").addClass("flip-clock-before")),e.find("."+c).find(p).next().length>0?(e.find("."+c).find(p).addClass("flip-clock-active"),e.find("."+c).find(p).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulHour li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulHour li:first-child").addClass("flip-clock-before"))}else{f="#eaeulHour1 li:eq( "+a.trim(r).charAt(0)+" )",p="#eaeulHour li:eq( 0 )";e.find("."+c).find(f).next().length>0?(e.find("."+c).find(f).addClass("flip-clock-active"),e.find("."+c).find(f).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulHour1 li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulHour li:first-child").addClass("flip-clock-before")),e.find("."+c).find(p).next().length>0?(e.find("."+c).find(p).addClass("flip-clock-active"),e.find("."+c).find(p).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulHour li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulHour li:first-child").addClass("flip-clock-before"))}if(e.find("."+c).find("#eaeulDay1").find(".flip-clock-active").removeClass("flip-clock-active"),e.find("."+c).find("#eaeulDay1").find(".flip-clock-before").removeClass("flip-clock-before"),e.find("."+c).find("#eaeulDay").find(".flip-clock-active").removeClass("flip-clock-active"),e.find("."+c).find("#eaeulDay").find(".flip-clock-before").removeClass("flip-clock-before"),2==a.trim(d).length){f="#eaeulDay1 li:eq( "+a.trim(d).charAt(1)+" )",p="#eaeulDay li:eq( "+a.trim(d).charAt(0)+" )";e.find("."+c).find(f).next().length>0?(e.find("."+c).find(f).addClass("flip-clock-active"),e.find("."+c).find(f).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulDay1 li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulDay1 li:first-child").addClass("flip-clock-before")),e.find("."+c).find(p).next().length>0?(e.find("."+c).find(p).addClass("flip-clock-active"),e.find("."+c).find(p).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulDay li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulDay li:first-child").addClass("flip-clock-before"))}else{f="#eaeulDay1 li:eq( "+a.trim(d).charAt(0)+" )",p="#eaeulDay li:eq( 0 )";e.find("."+c).find(f).next().length>0?(e.find("."+c).find(f).addClass("flip-clock-active"),e.find("."+c).find(f).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulDay1 li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulDay li:first-child").addClass("flip-clock-before")),e.find("."+c).find(p).next().length>0?(e.find("."+c).find(p).addClass("flip-clock-active"),e.find("."+c).find(p).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulDay li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulDay li:first-child").addClass("flip-clock-before"))}}),1e3)})),elementorFrontend.hooks.addAction("frontend/element_ready/eae-evergreen-timer.skin3",(function(e,a){var t,d=e.find(".eae-evergreen-wrapper").data("egtime"),r=e.find(".eae-evergreen-wrapper").data("egt-expire"),s=e.find(".eae-evergreen-wrapper").data("element-type"),l="eae-"+e.find(".eae-evergreen-wrapper").data("id"),o="eae-temp-"+e.find(".eae-evergreen-wrapper").data("id"),c=e.find(".eae-evergreen-wrapper").data("actions"),f=e.find(".eae-evergreen-wrapper").data("days"),p=e.find(".eae-evergreen-wrapper").data("hours"),m=e.find(".eae-evergreen-wrapper").data("mins"),u=e.find(".eae-evergreen-wrapper").data("seconds"),g=e.find(".eae-evergreen-wrapper").data("unqid"),v=(new Date).getTime();if(!e.hasClass("elementor-element-edit-mode"))if("countdown"===s){y=new Date(d),d=y.getTime();var h="expires="+y.toUTCString();document.cookie=o+"="+y.getTime()+";"+h+";path=/"}else{var w=n(l),y="";if(""!==w){(y=new Date(parseInt(w))).setSeconds(y.getSeconds()+e.find(".eae-evergreen-wrapper").data("egtime")),d=y.getTime();var k=new Date(parseInt(w));k.setTime(k.getTime()+60*r*60*1e3);var b="expires="+k.toUTCString();document.cookie=l+"="+w+";"+b+";path=/";var C=new Date(parseInt(w));C.setTime(C.getTime()+1e3*e.find(".eae-evergreen-wrapper").data("egtime"));h="expires="+C.toUTCString();d-v>0&&(document.cookie=o+"="+w+";"+h+";path=/")}else{temp_date=d,(y=new Date).setSeconds(y.getSeconds()+e.find(".eae-evergreen-wrapper").data("egtime")),d=y.getTime(),i(l,(new Date).getTime(),r);var _=new Date;_.setTime(_.getTime()+1e3*temp_date);var x="expires="+_.toUTCString();document.cookie=o+"="+(new Date).getTime()+";"+x+";path=/"}}if(!e.hasClass("elementor-element-edit-mode")){var T=D(d);if(parseInt(T.all)<1){if(c.length>0&&(c.forEach((function(a){"redirect"===a&&(e.hasClass("elementor-element-edit-mode")||($url=e.find(".eae-evergreen-wrapper").data("redirected-url"),""!==$url&&(window.location.href=$url))),"hide_parent"===a&&(e.hasClass("elementor-element-edit-mode")||($p_secs=e.closest("section"),$p_secs.css("display","none"))),"hide"===a&&(e.find("#timer").css("display","none"),e.find(".egt-title").css("display","none"),e.find(".desc").css("display","none")),"message"===a&&e.find(".eae-egt-message").css("display","block")})),1===c.length&&(""===c[0]||"message"===c[0]))){var $=e.find("."+g).find("#timer")[0];"yes"===f&&($.innerHTML="<span class='egt-time eae-time-wrapper'><div>00</div></span>"),"yes"===p&&("yes"===f?a($).append("<span class='egt-time eae-time-wrapper'><div>00</div></span>"):$.innerHTML="<span class='egt-time eae-time-wrapper'><div>00</div></span>"),"yes"===m&&("yes"===f||"yes"===p?a($).append("<span class='egt-time eae-time-wrapper'><div>00</div></span>"):$.innerHTML="<span class='egt-time eae-time-wrapper'><div>00</div></span>"),"yes"===u&&("yes"===f||"yes"===p||"yes"===m?a($).append("<span class='egt-time eae-time-wrapper'><div>00</div></span>"):$.innerHTML="<span class='egt-time eae-time-wrapper'><div>00</div></span>")}return}}function D(e){var a=d-new Date;return{days:Math.floor(a/864e5),hours:"0"+Math.floor(a/36e5%24),minutes:"0"+Math.floor(a/6e4%60),seconds:"0"+Math.floor(a/1e3%60),all:a}}function S(e){e.classList.add("fade"),setTimeout((function(){e.classList.remove("fade")}),700)}e.hasClass("elementor-element-edit-mode")&&("countdown"===s?(y=new Date(d),d=y.getTime()):((y=new Date).setSeconds(y.getSeconds()+e.find(".eae-evergreen-wrapper").data("egtime")),d=y.getTime())),D(d).all>1&&(t=setInterval((function(){var i=e.find("."+g).find("#timer")[0],n=D(d);"yes"===f&&(n.days<10&&(n.days="0"+n.days),i.innerHTML="<span class='egt-time eae-time-wrapper'><div>"+n.days+"</div></span>"),"yes"===p&&("yes"===f?a(i).append("<span class='egt-time eae-time-wrapper'><div>"+n.hours.slice(-2)+"</div></span>"):i.innerHTML="<span class='egt-time eae-time-wrapper'><div>"+n.hours.slice(-2)+"</div></span>"),"yes"===m&&("yes"===f||"yes"===p?a(i).append("<span class='egt-time eae-time-wrapper'><div>"+n.minutes.slice(-2)+"</div></span>"):i.innerHTML="<span class='egt-time eae-time-wrapper'><div>"+n.minutes.slice(-2)+"</div></span>"),"yes"===u&&("yes"===f||"yes"===p||"yes"===m?a(i).append("<span class='egt-time eae-time-wrapper'><div>"+n.seconds.slice(-2)+"</div></span>"):i.innerHTML="<span class='egt-time eae-time-wrapper'><div>"+n.seconds.slice(-2)+"</div></span>");var r=i.getElementsByTagName("span");"yes"===f&&59==n.hours&&59==n.minutes&&59==n.seconds&&S(r[0]),"yes"===p&&("yes"===f?59==n.minutes&&59==n.seconds&&S(r[1]):59==n.minutes&&59==n.seconds&&S(r[0])),"yes"===m&&("yes"===f?"yes"===p?59==n.seconds&&S(r[2]):59==n.seconds&&S(r[1]):"yes"===p?59==n.seconds&&S(r[1]):59==n.seconds&&S(r[0])),"yes"===u&&("yes"===f?"yes"===p?"yes"===m&&S(r[3]):S("yes"===m?r[2]:r[1]):"yes"===p?"yes"===m&&S(r[2]):S("yes"===m?r[1]:r[0])),n.all<=1&&(clearInterval(t),"yes"===f&&(i.innerHTML="<span class='egt-time eae-time-wrapper'><div>00</div></span>"),"yes"===p&&("yes"===f?a(i).append("<span class='egt-time eae-time-wrapper'><div>00</div></span>"):i.innerHTML="<span class='egt-time eae-time-wrapper'><div>00</div></span>"),"yes"===m&&("yes"===f||"yes"===p?a(i).append("<span class='egt-time eae-time-wrapper'><div>00</div></span>"):i.innerHTML="<span class='egt-time eae-time-wrapper'><div>00</div></span>"),"yes"===u&&("yes"===f||"yes"===p||"yes"===m?a(i).append("<span class='egt-time eae-time-wrapper'><div>00</div></span>"):i.innerHTML="<span class='egt-time eae-time-wrapper'><div>00</div></span>"),e.hasClass("elementor-element-edit-mode")||c.length>0&&c.forEach((function(a){"redirect"===a&&($url1=e.find(".eae-evergreen-wrapper").data("redirected-url"),""!==$url1&&(window.location.href=$url1)),"hide"===a&&(e.find("#timer").css("display","none"),e.find(".egt-title").css("display","none"),e.find(".desc").css("display","none")),"message"===a&&e.find(".eae-egt-message").css("display","block"),"hide_parent"===a&&($p_secs=e.closest("section"),$p_secs.css("display","none"))})))}),1e3))})),elementorFrontend.hooks.addAction("frontend/element_ready/eae-comparisontable.default",(function(e,a){a(e.find(".eae-ct-heading")[0]).addClass("active"),e.find("ul").on("click","li",(function(){var t=a(this).index()+2;e.find("tr").find("td:not(:eq(0))").hide(),e.find("td:nth-child("+t+")").css("display","table-cell"),e.find("tr").find("th:not(:eq(0))").hide(),e.find("li").removeClass("active"),a(this).addClass("active")}));var t=window.matchMedia("(min-width: 767px)");function i(a){a.matches?e.find(".sep").attr("colspan",5):e.find(".sep").attr("colspan",2)}t.addListener(i),i(t)})),elementorFrontend.hooks.addAction("frontend/element_ready/eae-progress-bar.skin1",d),elementorFrontend.hooks.addAction("frontend/element_ready/eae-progress-bar.skin2",d),elementorFrontend.hooks.addAction("frontend/element_ready/eae-progress-bar.skin3",d),elementorFrontend.hooks.addAction("frontend/element_ready/eae-progress-bar.skin4",d),elementorFrontend.hooks.addAction("frontend/element_ready/eae-progress-bar.skin5",d),elementorFrontend.hooks.addAction("frontend/element_ready/eae-filterableGallery.default",(function(e,a){var t=e.find(".eae-fg-wrapper"),i=e.data("id"),n=t.attr("data-maxtilt"),d=t.attr("data-perspective"),r=t.attr("data-speed"),s=t.attr("data-tilt-axis"),l=t.attr("data-glare"),o=parseInt(t.attr("data-overlay-speed"));if(s="x"===s?"y":"y"===s?"x":"both","yes"===l)var c=t.attr("data-max-glare");l="yes"===l;var f=a(".elementor-element-"+i+" .eae-fg-image"),p=t.hasClass("masonry-yes")?"masonry":"fitRows";let m=f.outerHeight();adata={percentPosition:!0,animationOptions:{duration:750,easing:"linear",queue:!1}},"fitRows"===p&&(adata.layoutMode="fitRows"),"masonry"===p&&(adata.masonry={columnWidth:".eae-gallery-item",horizontalOrder:!0}),e.hasClass("eae-show-all-yes")||(e.find(".eae-gallery-filter a").first().addClass("current"),adata.filter=e.find(".eae-gallery-filter a").first().attr("data-filter"));var u=f.isotope(adata);u.imagesLoaded().progress((function(){u.isotope("layout"),e.find(".eae-fg-image").css({"min-height":"300px",height:m})})),e.find(".eae-tilt-yes")&&(atilt={maxTilt:n,perspective:d,easing:"linear",scale:1,speed:r,disableAxis:s,transition:!0,reset:!0,glare:l,maxGlare:c},e.find(".el-tilt").tilt(atilt)),a(".elementor-element-"+i+" .eae-gallery-filter a").on("click",(function(){e.find(".eae-gallery-filter .current").removeClass("current"),a(this).addClass("current");var t=a(this).attr("data-filter");adata.filter=t;var i=f.isotope(adata);return i.imagesLoaded().progress((function(){if(i.isotope("layout"),isEditMode)return!1;e.find(".eae-tilt-yes")&&(e.find(".el-tilt").tilt(atilt),e.find(".el-tilt").tilt.reset.call(e.find(".el-tilt")))})),!1})),t.hasClass("eae-hover-direction-effect")||e.find(".eae-gallery-item-inner").hover((function(){a(this).find(".eae-grid-overlay").addClass("animated")})),t.hasClass("eae-hover-direction-effect")&&(e.find(".eae-gallery-item-inner").hover((function(){a(this).find(".eae-grid-overlay").addClass("overlay")})),t.find(".eae-gallery-item-inner").EAEHoverDirection({speed:o}))})),elementorFrontend.hooks.addAction("frontend/element_ready/eae-content-switcher.skin1",r),elementorFrontend.hooks.addAction("frontend/element_ready/eae-content-switcher.skin2",r),elementorFrontend.hooks.addAction("frontend/element_ready/eae-content-switcher.skin3",s),elementorFrontend.hooks.addAction("frontend/element_ready/eae-content-switcher.skin4",s),elementorFrontend.hooks.addAction("frontend/element_ready/global",(function(e,a){isEditMode||e.data("wts-url")&&"yes"==e.data("wts-link")&&e.on("click",(function(a){e.data("wts-url")&&"yes"==e.data("wts-new-window")?window.open(e.data("wts-url")):location.href=e.data("wts-url")}))})),elementorFrontend.hooks.addAction("frontend/element_ready/eae-thumbgallery.default",(function(e,a){swiper_outer_wrapper=e.find(".eae-swiper-outer-wrapper"),wid=e.data("id"),wClass=".elementor-element-"+wid,thumb_outer_wrapper=e.find(".eae-gallery-thumbs");let t=swiper_outer_wrapper.data("swiper-settings"),i=swiper_outer_wrapper.data("slides-per-view"),n=swiper_outer_wrapper.data("space");const d=eae.breakpoints;let r={};r[d.lg-1]={slidesPerView:i.desktop,spaceBetween:n.desktop},r[d.md-1]={slidesPerView:i.tablet,spaceBetween:n.tablet};const s=eae.breakpoints;let l={};if(l[s.lg-1]={spaceBetween:t.spaceBetween.desktop},l[s.md-1]={spaceBetween:t.spaceBetween.tablet},sliderData={direction:"horizontal",effect:t.effect,keyboard:{enabled:t.keyboard},spaceBetween:t.spaceBetween.mobile,breakpoints:l,speed:t.speed,loop:"yes"===t.loop,thumbs:{swiper:{el:thumb_outer_wrapper,direction:"horizontal",spaceBetween:n.mobile,slidesPerView:i.mobile,navigation:{nextEl:wClass+" .eae-swiper-button-next",prevEl:wClass+" .eae-swiper-button-prev"},speed:t.speed,loop:"yes"===t.loop,freeMode:!0,watchSlidesVisibility:!0,watchSlidesProgress:!0,breakpoints:r,slideToClickedSlide:!0}}},void 0!==t.autoplay&&(sliderData.thumbs.swiper.autoplay={delay:t.autoplay.duration,disableOnInteraction:t.autoplay.disableOnInteraction,reverseDirection:t.autoplay.reverseDirection}),"yes"==t.navigation&&(sliderData.navigation={nextEl:wClass+" .eae-swiper-button-next",prevEl:wClass+" .eae-swiper-button-prev"}),""!==t.pagination&&(sliderData.pagination={type:t.pagination,el:wClass+" .swiper-pagination",clickable:t.clickable}),void 0!==t.autoplay&&(sliderData.autoplay={delay:t.autoplay.duration,disableOnInteraction:t.autoplay.disableOnInteraction,reverseDirection:t.autoplay.reverseDirection}),"undefined"==typeof Swiper){new(0,elementorFrontend.utils.swiper)(".elementor-element-"+wid+" .eae-swiper-outer-wrapper .eae-swiper-container",sliderData).then(e=>{sswiper=e})}else window.sswiper=new Swiper(".elementor-element-"+wid+" .eae-swiper-outer-wrapper .eae-swiper-container",sliderData),a(".elementor-element-"+wid+" .eae-swiper-outer-wrapper .eae-swiper-container").css("visibility","visible")}))}))}(jQuery);
|
1 |
+
jQuery(window).on("elementor/frontend/init",(function(){elementorFrontend.hooks.addAction("frontend/element_ready/wts-gmap.default",(function(e){map=function(a){$wrapper=e.find(".eae-markers");var t=$wrapper.data("zoom"),i=a.find(".marker"),n=$wrapper.data("style"),r=($wrapper.data("scroll"),{zoom:t,center:new google.maps.LatLng(0,0),mapTypeId:google.maps.MapTypeId.ROADMAP,styles:n}),d=new google.maps.Map(a[0],r);return d.markers=[],i.each((function(){!function(a,t){var i=$wrapper.data("animate");$wrapper.data("show-info-window-onload");$wrapper=e.find(".eae-markers");var n=new google.maps.LatLng(a.attr("data-lat"),a.attr("data-lng"));if(icon_img=a.attr("data-icon"),""!=icon_img)var r={url:a.attr("data-icon"),scaledSize:new google.maps.Size(a.attr("data-icon-size"),a.attr("data-icon-size"))};var d=new google.maps.Marker({position:n,map:t,icon:r,animation:google.maps.Animation.DROP});"animate-yes"==i&&"yes"!=a.data("info-window")&&d.setAnimation(google.maps.Animation.BOUNCE);"animate-yes"==i&&google.maps.event.addListener(d,"click",(function(){d.setAnimation(null)}));if(t.markers.push(d),a.html()){var s=new google.maps.InfoWindow({content:a.html()});"yes"==a.data("info-window")&&s.open(t,d),google.maps.event.addListener(d,"click",(function(){s.open(t,d)}))}"animate-yes"==i&&google.maps.event.addListener(s,"closeclick",(function(){d.setAnimation(google.maps.Animation.BOUNCE)}))}(jQuery(this),d)})),function(e,a){var t=new google.maps.LatLngBounds;jQuery.each(e.markers,(function(e,a){var i=new google.maps.LatLng(a.position.lat(),a.position.lng());t.extend(i)})),1==e.markers.length?(e.setCenter(t.getCenter()),e.setZoom(a)):e.fitBounds(t)}(d,t),d}(e.find(".eae-markers"))})),elementorFrontend.hooks.addAction("frontend/element_ready/global",(function(e){var a,t,i,n,r,d,s,l=[],o=[],c=e.children(".eae-section-bs").children(".eae-section-bs-inner");c&&c.data("eae-bg-slider")&&(slider_images=c.data("eae-bg-slider"),a=c.data("eae-bg-slider-transition"),t=c.data("eae-bg-slider-animation"),n=("yes"==(i=c.data("eae-bg-custom-overlay"))||c.data("eae-bg-slider-overlay"),eae_editor.plugin_url+"assets/lib/vegas/overlays/"+c.data("eae-bg-slider-overlay")),r=c.data("eae-bg-slider-cover"),d=c.data("eae-bs-slider-delay"),s=c.data("eae-bs-slider-timer"),"undefined"!=typeof slider_images&&(l=slider_images.split(","),jQuery.each(l,(function(e,a){var t=[];t.src=a,o.push(t)})),c.vegas({slides:o,transition:a,animation:t,overlay:n,cover:r,delay:d,timer:s,init:function(){"yes"==i&&c.children(".vegas-overlay").css("background-image","")}})))}))}));var isEditMode=!1,breakpoints=eae.breakpoints;!function(e){e(window).on("elementor/frontend/init",(function(){var a=function(e,a){function t(e){$icons=a(document).find(e).find(".eae-ic-icon-wrap"),window.innerWidth<767?$icons.each((function(e,t){a(t).css("top",a(t).height()/2+8+"px"),a(t).next(".eae-info-circle-item__content-wrap").css("padding-top",a(t).height()/2+8+"px")})):$icons.each((function(e,t){a(t).css("margin-left",-.5*a(t).outerWidth()),a(t).css("margin-top",-.5*a(t).outerHeight()),$a=function(e){return e=(e-90)*Math.PI/180,{x:50+45*Math.cos(e),y:50+45*Math.sin(e)}}($angle),$b=360/$icons.length,a(t).css("left",$a.x+"%"),a(t).css("top",$a.y+"%"),$angle+=$b}))}$wrap_class=".elementor-element-"+e.data("id"),$angle=0,t(e);var i=null;function n(){"yes"==e.find(".eae-info-circle").data("autoplay")&&(i=setInterval(r,$autoplayDuration))}function r(){e.find(".eae-active").next().length>0?e.find(".eae-active").next().addClass("eae-active").siblings().removeClass("eae-active"):e.find(".eae-info-circle-item").eq(0).addClass("eae-active").siblings().removeClass("eae-active")}$autoplayDuration=e.find(".eae-info-circle").data("delay"),n(),e.find(".eae-ic-icon-wrap").hover((function(){clearInterval(i)}),(function(){n()})),e.find(".eae-info-circle-item").length>0&&a(e.find(".eae-info-circle-item")[0]).addClass("eae-active"),e.find(".eae-ic-icon-wrap").on("click",(function(){e.find(".eae-info-circle-item").removeClass("eae-active"),a(this).parent().addClass("eae-active")})),e.hasClass("eae-mouseenter-yes")&&e.find(".eae-ic-icon-wrap").on("mouseenter",(function(){e.find(".eae-info-circle-item").removeClass("eae-active"),a(this).parent().addClass("eae-active")})),window.addEventListener("resize",t.bind(this,$wrap_class))},t=function(e,a){function t(){var t=e.find(".eae-timline-progress-bar"),i=e.find(".eae-timeline-item"),n=e.find(".eae-timeline");const r=n.data("top-offset");var d=a(n).height(),s=a(i).last().find(".eae-tl-icon-wrapper").offset().top-a(i[0]).parent().offset().top,l=e.find(".eae-tl-icon-wrapper");a(t).css("top",a(i[0]).find(".eae-tl-icon-wrapper").offset().top-a(i[0]).parent().offset().top),a(t).css("bottom",d-s),a(t).css("left",l.eq(0)[0].offsetLeft+l.eq(0).width()/2),a(t).css("display","block"),i.each((function(e,t){new Waypoint({element:a(t),handler:function(e){"down"==e?a(t).addClass("eae-tl-item-focused"):a(t).removeClass("eae-tl-item-focused")},offset:r})}))}t(),window.addEventListener("resize",t),window.addEventListener("scroll",(function(){e.find(".eae-timline-progress-bar");const t=e.find(".eae-timeline").data("top-offset");e.find(".eae-pb-inner-line").css("height",a(window).scrollTop()-e.find(".eae-timeline").offset().top+t),e.find(".eae-pb-inner-line").css("max-height",e.find(".eae-pb-inner-line").parent().height())}))};function i(e,a,t){var i=new Date;i.setTime(i.getTime()+60*t*60*1e3);var n="expires="+i.toUTCString();document.cookie=e+"="+a+";"+n+";path=/"}function n(e){for(var a=e+"=",t=decodeURIComponent(document.cookie).split(";"),i=0;i<t.length;i++){for(var n=t[i];" "==n.charAt(0);)n=n.substring(1);if(0==n.indexOf(a))return n.substring(a.length,n.length)}return""}var r=function(e,a){$is_rtl=jQuery("body").hasClass("rtl"),$wrapper=e.find(".eae-progress-bar");$wrapper.attr("data-skill");var t=$wrapper.attr("data-value"),i=$wrapper.attr("data-skin"),n=$wrapper.find(".eae-pb-bar-skill"),r=$wrapper.find(".eae-pb-bar-value"),d=$wrapper.find(".eae-pb-bar"),s=$wrapper.find(".eae-pb-bar-inner");"skin1"===i&&a(s).attr("style","width : "+t+"%"),"skin2"===i&&a(s).attr("style","width : "+t+"%"),"skin3"===i&&(a(r).addClass("eae-pb-bar-value--aligned-value"),$is_rtl?a(r).attr("style","right :"+t+"%"):a(r).attr("style","left :"+t+"%"),a(s).attr("style","width :"+t+"%")),"skin4"===i&&(a(r).addClass("eae-pb-bar-value--aligned-value"),$is_rtl?a(r).attr("style","right :"+t+"%"):a(r).attr("style","left :"+t+"%"),a(s).attr("style","width :"+t+"%"),a(d).addClass("eae-pb-bar--no-overflow")),"skin5"===i&&(a(r).addClass("eae-pb-bar-value--aligned-value"),$is_rtl?a(r).attr("style","right :"+t+"%"):a(r).attr("style","left :"+t+"%"),a(s).attr("style","width :"+t+"%")),$wrapper.each((function(e,t){new Waypoint({element:t,skill_value:a(t).find(".eae-pb-bar-skill"),valueElem:a(t).find(".eae-pb-bar-value"),prgBar:a(t).find(".eae-pb-bar-bar"),prgInner:a(t).find(".eae-pb-bar-inner"),handler:function(e){"down"==e&&(a(r).hasClass("js-animated")||a(r).addClass("js-animated"),a(s).hasClass("js-animated")||a(s).addClass("js-animated"),a(n).hasClass("js-animated")||a(n).addClass("js-animated"))},offset:"bottom-in-view"})}))},d=function(e,a){var t=e.find(".eae-content-switcher-wrapper"),i=(e.data("id"),t.find(".eae-content-switch-button"));i.each((function(e,n){a(this).on("click",(function(e){e.preventDefault();let n=a(this).find(".eae-content-switch-label");if(!a(this).hasClass("active")){a(i).removeClass("active");let e=a(n).attr("id");a(this).addClass("active");var r=a(t).find(".eae-cs-content-section");a(r).removeClass("active");let d=a(t).find(".eae-content-section-"+e);a(d).addClass("active")}}))}))},s=function(e,a){let t=e.find(".eae-content-switcher-wrapper"),i=(e.data("id"),t.find(".eae-cs-switch-label")),n=t.find(".eae-content-switch-label.primary-label");const r=a(n).attr("item_id");let d=t.find(".eae-content-switch-label.secondary-label");const s=a(d).attr("item_id");let l=t.find(".eae-cs-content-section.eae-content-section-"+r),o=t.find(".eae-cs-content-section.eae-content-section-"+s);a(i).on("click",(function(e){a(this).find("input.eae-content-toggle-switch").is(":checked")?(d.addClass("active"),o.addClass("active"),n.removeClass("active"),l.removeClass("active")):(n.addClass("active"),l.addClass("active"),d.removeClass("active"),o.removeClass("active"))}))};e.fn.EAEHoverDirection=function(a){var t=e.extend({inaccuracy:30,speed:200},a);this.find(".overlay").css({top:-9999999}),this.mouseenter((function(a){container=e(this),overlay=container.find(".overlay"),parentOffset=container.offset(),relX=a.pageX-parentOffset.left,relY=a.pageY-parentOffset.top,overlay.css({top:0,left:0,width:container.width(),height:container.height()}),relX>container.width()-t.inaccuracy?overlay.css({top:0,left:container.width()}):relX<t.inaccuracy?overlay.css({top:0,left:-container.width()}):relY>container.height()-t.inaccuracy?overlay.css({top:container.width(),left:0}):relY<t.inaccuracy&&overlay.css({top:-container.width(),left:0}),overlay.animate({top:0,left:0},t.speed)})),this.mouseleave((function(a){container=e(this),overlay=container.find(".overlay"),parentOffset=container.offset(),relX=a.pageX-parentOffset.left,relY=a.pageY-parentOffset.top,relX<=0&&overlay.animate({top:0,left:-container.width()},t.speed),relX>=container.width()&&overlay.animate({top:0,left:container.width()},t.speed),relY<=0&&overlay.animate({left:0,top:-container.height()},t.speed),relY>=container.height()&&overlay.animate({left:0,top:container.height()},t.speed)}))};let l=function(e,a){const t=e.find(".eae-chart-outer-container"),i=(e.data("id"),e.find("#eae-chart-canvas"));let n=t.data("settings");new Chart(i,n)};elementorFrontend.hooks.addAction("frontend/element_ready/wts-ab-image.default",(function(e,a){e.find(".eae-img-comp-container").imagesLoaded().done((function(){ab_style=e.find(".eae-img-comp-container").data("ab-style"),slider_pos=e.find(".eae-img-comp-container").data("slider-pos"),"horizontal"===ab_style?(separator_width=parseInt(e.find(".eae-img-comp-overlay").css("border-right-width")),function(e){var a,t;a=e.find(".eae-img-comp-overlay"),t=(t=a.width())*slider_pos/100,function(a){var i,n,r,d=0;function s(e){e.preventDefault(),d=1,window.addEventListener("mousemove",o),i.addEventListener("touchmove",c)}function l(){d=0}function o(e){var t;if(0==d)return!1;(t=function(e){var t;return e=e||window.event,t=a.getBoundingClientRect(),e.pageX-t.left}(e))<0&&(t=0),t>n&&(t=n),p(t)}function c(e){var t;if(0==d)return!1;(t=function(e){var t;return t=a.getBoundingClientRect(),e.changedTouches[0].clientX-t.left}(e))<0&&(t=0),t>n&&(t=n),p(t)}function p(e){a.style.width=e+"px",i.style.left=a.offsetWidth-i.offsetWidth/2-separator_width/2+"px"}n=a.offsetWidth,r=a.offsetHeight,a.style.width=t+"px",(i=(i=e.find(".eae-img-comp-slider"))[0]).style.top=r/2-i.offsetHeight/2+"px",i.style.left=t-i.offsetWidth/2-separator_width/2+"px",e.hasClass("elementor-element-edit-mode")||(i.addEventListener("mousedown",s),window.addEventListener("mouseup",l),i.addEventListener("touchstart",s),window.addEventListener("touchstop",l))}(a[0])}(e)):(separator_width=parseInt(e.find(".eae-img-comp-overlay").css("border-bottom-width")),function(e){var a;a=e.find(".eae-img-comp-overlay"),start_pos=a.height(),start_pos=start_pos*slider_pos/100,function(a){var t,i,n,r=0;function d(e){e.preventDefault(),r=1,window.addEventListener("mousemove",l),t.addEventListener("touchmove",o)}function s(){r=0}function l(e){var t;if(0==r)return!1;(t=function(e){var t,i=0;return e=e||window.event,t=a.getBoundingClientRect(),i=e.pageY-t.top,i-=window.pageYOffset}(e))<0&&(t=0),t>n&&(t=n),c(t)}function o(e){var t;if(0==r)return!1;(t=function(e){var t;return t=a.getBoundingClientRect(),e.changedTouches[0].clientY-t.top}(e))<0&&(t=0),t>n&&(t=n),c(t)}function c(e){a.style.height=e+"px",t.style.top=a.offsetHeight-t.offsetHeight/2-separator_width/2+"px"}i=a.offsetWidth,n=a.offsetHeight,a.style.height=start_pos+"px",(t=(t=e.find(".eae-img-comp-slider"))[0]).style.top=start_pos-t.offsetHeight/2-separator_width/2+"px",t.style.left=i/2-t.offsetWidth/2+"px",e.hasClass("elementor-element-edit-mode")||(t.addEventListener("mousedown",d),window.addEventListener("mouseup",s),t.addEventListener("touchstart",d),window.addEventListener("touchstop",s))}(a[0])}(e))}))})),elementorFrontend.hooks.addAction("frontend/element_ready/global",(function(e,a){e.hasClass("eae-particle-yes")&&(id=e.data("id"),element_type=e.data("element_type"),pdata=e.data("eae-particle"),pdata_wrapper=e.find(".eae-particle-wrapper").data("eae-pdata"),"undefined"!=typeof pdata&&""!=pdata?e.find(".eae-section-bs").length>0?(e.find(".eae-section-bs").after('<div class="eae-particle-wrapper" id="eae-particle-'+id+'"></div>'),particlesJS("eae-particle-"+id,pdata)):("column"==element_type?e.prepend('<div class="eae-particle-wrapper" id="eae-particle-'+id+'"></div>'):e.prepend('<div class="eae-particle-wrapper " id="eae-particle-'+id+'"></div>'),particlesJS("eae-particle-"+id,pdata)):"undefined"!=typeof pdata_wrapper&&""!=pdata_wrapper&&(element_type,e.prepend('<div class="eae-particle-wrapper eae-particle-area" id="eae-particle-'+id+'"></div>'),particlesJS("eae-particle-"+id,JSON.parse(pdata_wrapper))))})),elementorFrontend.hooks.addAction("frontend/element_ready/global",(function(e,a){if(e.hasClass("eae-animated-gradient-yes")){id=e.data("id"),color=e.data("color"),angle=e.data("angle");var t="linear-gradient("+angle+","+color+")";heading=e.find(".elementor-heading-title"),e.css("background-image",t),e.hasClass("elementor-element-edit-mode")&&(color=e.find(".animated-gradient").data("color"),angle=e.find(".animated-gradient").data("angle"),gradient_color_editor="linear-gradient("+angle+","+color+")",e.prepend('<div class="animated-gradient" style="background-image : '+gradient_color_editor+' "></div>'))}})),elementorFrontend.hooks.addAction("frontend/element_ready/wts-modal-popup.default",(function(e,a){$preview_modal=e.find(".eae-popup-wrapper").data("preview-modal"),$close_btn_type=e.find(".eae-popup-wrapper").data("close-button-type"),$close_btn=e.find(".eae-popup-wrapper").data("close-btn"),"icon"==$close_btn_type?$close_btn_html='<i class="eae-close '+$close_btn+'"> </i>':$close_btn_html='<svg class="eae-close" style="-webkit-mask: url('+$close_btn+"); mask: url("+$close_btn+'); "></svg>',$magnific=e.find(".eae-popup-link").eaePopup({type:"inline",disableOn:0,key:null,midClick:!1,mainClass:"eae-popup eae-popup-"+e.find(".eae-popup-link").data("id")+" eae-wrap-"+e.find(".eae-popup-link").data("ctrl-id"),preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:e.find(".eae-popup-wrapper").data("close-in-out"),showCloseBtn:!0,enableEscapeKey:!1,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:$close_btn_html,tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}),"yes"==$preview_modal&&e.hasClass("elementor-element-edit-mode")&&e.find(".eae-popup-link").click()})),elementorFrontend.hooks.addAction("frontend/element_ready/wts-testimonial-slider.default",(function(e,a){if(e.find(".eae-grid-wrapper").hasClass("eae-masonry-yes")){var t=e.find(".eae-grid").masonry({});t.imagesLoaded().progress((function(){t.masonry("layout")}))}if(e.find(".eae-layout-carousel").length){outer_wrapper=e.find(".eae-swiper-outer-wrapper"),wid=e.data("id"),wclass=".elementor-element-"+wid;var i=outer_wrapper.data("direction"),n=outer_wrapper.data("speed"),r=outer_wrapper.data("autoplay"),d=outer_wrapper.data("duration"),s=outer_wrapper.data("effect"),l=outer_wrapper.data("space"),o=outer_wrapper.data("loop");o="yes"==o;var c=outer_wrapper.data("slides-per-view"),p=outer_wrapper.data("slides-per-group"),f=outer_wrapper.data("ptype"),m=outer_wrapper.data("navigation"),u=outer_wrapper.data("clickable"),g=outer_wrapper.data("keyboard"),v=outer_wrapper.data("scrollbar");adata={direction:i,effect:s,spaceBetween:l.desktop,loop:o,speed:n,slidesPerView:c.desktop,slidesPerGroup:p.desktop,observer:!0,mousewheel:{invert:!0},breakpoints:{1024:{spaceBetween:l.tablet,slidesPerView:c.tablet,slidesPerGroup:p.tablet},767:{spaceBetween:l.mobile,slidesPerView:c.mobile,slidesPerGroup:p.mobile}}},"fade"==s&&(adata.fadeEffect={crossFade:!1}),adata.autoplay="yes"==r&&{delay:d,disableOnInteraction:!1},"yes"==m&&(adata.navigation={nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}),""!=f&&(adata.pagination={el:".swiper-pagination",type:f}),"bullets"==f&&"yes"==u&&(adata.pagination={el:".swiper-pagination",clickable:!0,type:f}),"yes"==v&&(adata.scrollbar={el:".swiper-scrollbar",draggable:!0}),"yes"==g&&(adata.keyboard={enabled:!0,onlyInViewport:!0}),0==o&&(adata.autoplay={delay:d,stopOnLastSlide:!0,disableOnInteraction:!1}),window.mswiper=new Swiper(".elementor-element-"+wid+" .eae-swiper-outer-wrapper .swiper-container",adata),a(".elementor-element-"+wid+" .eae-swiper-outer-wrapper .swiper-container").css("visibility","visible")}})),elementorFrontend.hooks.addAction("frontend/element_ready/eae-info-circle.skin1",a),elementorFrontend.hooks.addAction("frontend/element_ready/eae-info-circle.skin2",a),elementorFrontend.hooks.addAction("frontend/element_ready/eae-info-circle.skin3",a),elementorFrontend.hooks.addAction("frontend/element_ready/eae-info-circle.skin4",a),elementorFrontend.hooks.addAction("frontend/element_ready/eae-timeline.skin1",t),elementorFrontend.hooks.addAction("frontend/element_ready/eae-timeline.skin2",t),elementorFrontend.hooks.addAction("frontend/element_ready/eae-timeline.skin3",t),elementorFrontend.hooks.addAction("frontend/element_ready/eae-timeline.skin4",t),elementorFrontend.hooks.addAction("frontend/element_ready/eae-evergreen-timer.skin1",(function(e,a){var t=e.find(".eae-evergreen-wrapper").data("egtime"),r=e.find(".eae-evergreen-wrapper").data("egt-expire"),d=e.find(".eae-evergreen-wrapper").data("element-type"),s="eae-"+e.find(".eae-evergreen-wrapper").data("id"),l="eae-temp-"+e.find(".eae-evergreen-wrapper").data("id"),o=e.find(".eae-evergreen-wrapper").data("actions"),c=e.find(".eae-evergreen-wrapper").data("unqid"),p=(new Date).getTime();if(!e.hasClass("elementor-element-edit-mode"))if("countdown"===d){u=new Date(t),t=u.getTime();var f="expires="+u.toUTCString();document.cookie=l+"="+u.getTime()+";"+f+";path=/"}else{var m=n(s),u="";if(""!==m){(u=new Date(parseInt(m))).setSeconds(u.getSeconds()+e.find(".eae-evergreen-wrapper").data("egtime")),t=u.getTime();var g=new Date(parseInt(m));g.setTime(g.getTime()+60*r*60*1e3);var v="expires="+g.toUTCString();document.cookie=s+"="+m+";"+v+";path=/";var h=new Date(parseInt(m));h.setTime(h.getTime()+1e3*e.find(".eae-evergreen-wrapper").data("egtime"));f="expires="+h.toUTCString();t-p>0&&(document.cookie=l+"="+m+";"+f+";path=/")}else{temp_date=t,(u=new Date).setSeconds(u.getSeconds()+e.find(".eae-evergreen-wrapper").data("egtime")),t=u.getTime(),i(s,(new Date).getTime(),r);var w=new Date;w.setTime(w.getTime()+1e3*temp_date);var y="expires="+w.toUTCString();document.cookie=l+"="+(new Date).getTime()+";"+y+";path=/"}}if(!e.hasClass("elementor-element-edit-mode")&&t-p<0)return o.length>0&&o.forEach((function(t){"redirect"===t&&($url=e.find(".eae-evergreen-wrapper").data("redirected-url"),""!==a.trim($url)&&(window.location.href=$url1)),"hide"===t&&(e.hasClass("elementor-element-edit-mode")||(e.find("#eaeclockdiv").css("display","none"),e.find(".egt-title").css("display","none"))),"message"===t&&e.find(".eae-egt-message").css("display","block"),"hide_parent"===t&&(e.hasClass("elementor-element-edit-mode")||($p_secs=e.closest("section"),$p_secs.css("display","none")))})),days="00",hours="00",minutes="00",seconds="00",e.find("."+c).find("#eaedivDays").html(days),e.find("."+c).find("#eaedivHours").html(hours.slice(-2)),e.find("."+c).find("#eaedivMinutes").html(minutes.slice(-2)),void e.find("."+c).find("#eaedivSeconds").html(seconds.slice(-2));e.hasClass("elementor-element-edit-mode")&&("countdown"===d?(u=new Date(t),t=u.getTime()):((u=new Date).setSeconds(u.getSeconds()+e.find(".eae-evergreen-wrapper").data("egtime")),t=u.getTime()));var k=setInterval((function(){var i=(new Date).getTime(),n=t-i,r=0,d=0,s=0,l=0;n>0?(r=Math.floor(n/864e5),d="0"+Math.floor(n%864e5/36e5),s="0"+Math.floor(n%36e5/6e4),l="0"+Math.floor(n%6e4/1e3)):(o.length>0&&(e.hasClass("elementor-element-edit-mode")||o.forEach((function(t){"redirect"===t&&($url1=e.find(".eae-evergreen-wrapper").data("redirected-url"),""!==a.trim($url1)&&(window.location.href=$url1)),"hide"===t&&(e.find("#eaeclockdiv").css("display","none"),e.find(".egt-title").css("display","none")),"message"===t&&e.find(".eae-egt-message").css("display","block"),"hide_parent"===t&&(e.hasClass("elementor-element-edit-mode")||($p_secs=e.closest("section"),$p_secs.css("display","none")))}))),clearInterval(k),r="0",d="00",s="00",l="00"),r<10&&(r="0"+r),e.find("."+c).find("#eaedivDays").html(r),e.find("."+c).find("#eaedivHours").html(d.slice(-2)),e.find("."+c).find("#eaedivMinutes").html(s.slice(-2)),e.find("."+c).find("#eaedivSeconds").html(l.slice(-2))}),1e3)})),elementorFrontend.hooks.addAction("frontend/element_ready/eae-evergreen-timer.skin2",(function(e,a){var t=e.find(".eae-evergreen-wrapper").data("egtime"),r=e.find(".eae-evergreen-wrapper").data("egt-expire"),d=e.find(".eae-evergreen-wrapper").data("element-type"),s="eae-"+e.find(".eae-evergreen-wrapper").data("id"),l="eae-temp-"+e.find(".eae-evergreen-wrapper").data("id"),o=e.find(".eae-evergreen-wrapper").data("actions"),c=e.find(".eae-evergreen-wrapper").data("unqid"),p=(new Date).getTime();if(!e.hasClass("elementor-element-edit-mode"))if("countdown"===d){u=new Date(t),t=u.getTime();var f="expires="+u.toUTCString();document.cookie=l+"="+u.getTime()+";"+f+";path=/"}else{var m=n(s),u="";if(""!==m){(u=new Date(parseInt(m))).setSeconds(u.getSeconds()+e.find(".eae-evergreen-wrapper").data("egtime")),t=u.getTime();var g=new Date(parseInt(m));g.setTime(g.getTime()+60*r*60*1e3);var v="expires="+g.toUTCString();document.cookie=s+"="+m+";"+v+";path=/";var h=new Date(parseInt(m));h.setTime(h.getTime()+1e3*e.find(".eae-evergreen-wrapper").data("egtime"));f="expires="+h.toUTCString();t-p>0&&(document.cookie=l+"="+m+";"+f+";path=/")}else{temp_date=t,(u=new Date).setSeconds(u.getSeconds()+e.find(".eae-evergreen-wrapper").data("egtime")),t=u.getTime(),i(s,(new Date).getTime(),r);var w=new Date;w.setTime(w.getTime()+1e3*temp_date);var y="expires="+w.toUTCString();document.cookie=l+"="+(new Date).getTime()+";"+y+";path=/"}}if(!e.hasClass("elementor-element-edit-mode")&&t-p<0)return void(o.length>0&&o.forEach((function(t){"redirect"===t&&($url=e.find(".eae-evergreen-wrapper").data("redirected-url"),""!==a.trim($url)&&(window.location.href=$url)),"hide"===t&&(e.find("."+c).find(".timer-container").css("display","none"),e.find("."+c).find(".egt-title").css("display","none")),"message"===t&&e.find("."+c).find(".eae-egt-message").css("display","block"),"hide_parent"===t&&(e.hasClass("elementor-element-edit-mode")||($p_secs=e.closest("section"),$p_secs.css("display","none")))})));e.hasClass("elementor-element-edit-mode")&&("countdown"===d?(u=new Date(t),t=u.getTime()):((u=new Date).setSeconds(u.getSeconds()+e.find(".eae-evergreen-wrapper").data("egtime")),t=u.getTime()));var k=setInterval((function(){var i=(new Date).getTime(),n=t-i,r=Math.floor(n/864e5),d=Math.floor(n%864e5/36e5),s=Math.floor(n%36e5/6e4),l=Math.floor(n%6e4/1e3);if(e.find("."+c).find("#eaeulSec1").find(".flip-clock-active").removeClass("flip-clock-active"),e.find("."+c).find("#eaeulSec1").find(".flip-clock-before").removeClass("flip-clock-before"),e.find("."+c).find("#eaeulSec").find(".flip-clock-active").removeClass("flip-clock-active"),e.find("."+c).find("#eaeulSec").find(".flip-clock-before").removeClass("flip-clock-before"),n<0)return clearInterval(k),void(o.length>0&&o.forEach((function(t){"redirect"===t&&(e.hasClass("elementor-element-edit-mode")||($url1=e.find(".eae-evergreen-wrapper").data("redirected-url"),""!==a.trim($url1)&&(window.location.href=$url1))),"hide"===t&&(e.hasClass("elementor-element-edit-mode")||(e.find("."+c).find(".timer-container").css("display","none"),e.find("."+c).find(".egt-title").css("display","none"))),"message"===t&&(e.hasClass("elementor-element-edit-mode")||e.find("."+c).find(".eae-egt-message").css("display","block")),"hide_parent"===t&&(e.hasClass("elementor-element-edit-mode")||($p_secs=e.closest("section"),$p_secs.css("display","none")))})));if(2===a.trim(l).length){var p="#eaeulSec1 li:eq( "+a.trim(l).charAt(1)+" )",f="#eaeulSec li:eq( "+a.trim(l).charAt(0)+" )";e.find("."+c).find(p).next().length>0?(e.find("."+c).find(p).addClass("flip-clock-active"),e.find("."+c).find(p).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulSec1 li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulSec1 li:first-child").addClass("flip-clock-before")),e.find("."+c).find(f).next().length>0?(e.find("."+c).find(f).addClass("flip-clock-active"),e.find("."+c).find(f).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulSec li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulSec li:first-child").addClass("flip-clock-before"))}else{p="#eaeulSec1 li:eq( "+a.trim(l).charAt(0)+" )",f="#eaeulSec li:eq( 0 )";e.find("."+c).find(p).next().length>0?(e.find("."+c).find(p).addClass("flip-clock-active"),e.find("."+c).find(p).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulSec1 li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulSec1 li:first-child").addClass("flip-clock-before")),e.find("."+c).find(f).next().length>0?(e.find("."+c).find(f).addClass("flip-clock-active"),e.find("."+c).find(f).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulSec li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulSec li:first-child").addClass("flip-clock-before"))}if(e.find("."+c).find("#eaeulMin1").find(".flip-clock-active").removeClass("flip-clock-active"),e.find("."+c).find("#eaeulMin1").find(".flip-clock-before").removeClass("flip-clock-before"),e.find("."+c).find("#eaeulMin").find(".flip-clock-active").removeClass("flip-clock-active"),e.find("."+c).find("#eaeulMin").find(".flip-clock-before").removeClass("flip-clock-before"),2==a.trim(s).length){p="#eaeulMin1 li:eq( "+a.trim(s).charAt(1)+" )",f="#eaeulMin li:eq( "+a.trim(s).charAt(0)+" )";e.find("."+c).find(p).next().length>0?(e.find("."+c).find(p).addClass("flip-clock-active"),e.find("."+c).find(p).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulMin1 li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulMin1 li:first-child").addClass("flip-clock-before")),e.find("."+c).find(f).next().length>0?(e.find("."+c).find(f).addClass("flip-clock-active"),e.find("."+c).find(f).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulMin li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulMin li:first-child").addClass("flip-clock-before"))}else{p="#eaeulMin1 li:eq( "+a.trim(s).charAt(0)+" )",f="#eaeulMin li:eq( 0 )";e.find("."+c).find(p).next().length>0?(e.find("."+c).find(p).addClass("flip-clock-active"),e.find("."+c).find(p).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulMin1 li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulMin1 li:first-child").addClass("flip-clock-before")),e.find("."+c).find(f).next().length>0?(e.find("."+c).find(f).addClass("flip-clock-active"),e.find("."+c).find(f).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulMin li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulMin li:first-child").addClass("flip-clock-before"))}if(e.find("."+c).find("#eaeulHour1").find(".flip-clock-active").removeClass("flip-clock-active"),e.find("."+c).find("#eaeulHour1").find(".flip-clock-before").removeClass("flip-clock-before"),e.find("."+c).find("#eaeulHour").find(".flip-clock-active").removeClass("flip-clock-active"),e.find("."+c).find("#eaeulHour").find(".flip-clock-before").removeClass("flip-clock-before"),2==a.trim(d).length){p="#eaeulHour1 li:eq( "+a.trim(d).charAt(1)+" )",f="#eaeulHour li:eq( "+a.trim(d).charAt(0)+" )";e.find("."+c).find(p).next().length>0?(e.find("."+c).find(p).addClass("flip-clock-active"),e.find("."+c).find(p).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulHour1 li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulHour1 li:first-child").addClass("flip-clock-before")),e.find("."+c).find(f).next().length>0?(e.find("."+c).find(f).addClass("flip-clock-active"),e.find("."+c).find(f).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulHour li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulHour li:first-child").addClass("flip-clock-before"))}else{p="#eaeulHour1 li:eq( "+a.trim(d).charAt(0)+" )",f="#eaeulHour li:eq( 0 )";e.find("."+c).find(p).next().length>0?(e.find("."+c).find(p).addClass("flip-clock-active"),e.find("."+c).find(p).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulHour1 li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulHour li:first-child").addClass("flip-clock-before")),e.find("."+c).find(f).next().length>0?(e.find("."+c).find(f).addClass("flip-clock-active"),e.find("."+c).find(f).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulHour li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulHour li:first-child").addClass("flip-clock-before"))}if(e.find("."+c).find("#eaeulDay1").find(".flip-clock-active").removeClass("flip-clock-active"),e.find("."+c).find("#eaeulDay1").find(".flip-clock-before").removeClass("flip-clock-before"),e.find("."+c).find("#eaeulDay").find(".flip-clock-active").removeClass("flip-clock-active"),e.find("."+c).find("#eaeulDay").find(".flip-clock-before").removeClass("flip-clock-before"),2==a.trim(r).length){p="#eaeulDay1 li:eq( "+a.trim(r).charAt(1)+" )",f="#eaeulDay li:eq( "+a.trim(r).charAt(0)+" )";e.find("."+c).find(p).next().length>0?(e.find("."+c).find(p).addClass("flip-clock-active"),e.find("."+c).find(p).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulDay1 li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulDay1 li:first-child").addClass("flip-clock-before")),e.find("."+c).find(f).next().length>0?(e.find("."+c).find(f).addClass("flip-clock-active"),e.find("."+c).find(f).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulDay li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulDay li:first-child").addClass("flip-clock-before"))}else{p="#eaeulDay1 li:eq( "+a.trim(r).charAt(0)+" )",f="#eaeulDay li:eq( 0 )";e.find("."+c).find(p).next().length>0?(e.find("."+c).find(p).addClass("flip-clock-active"),e.find("."+c).find(p).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulDay1 li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulDay li:first-child").addClass("flip-clock-before")),e.find("."+c).find(f).next().length>0?(e.find("."+c).find(f).addClass("flip-clock-active"),e.find("."+c).find(f).next().addClass("flip-clock-before")):(e.find("."+c).find("#eaeulDay li:last-child").addClass("flip-clock-active"),e.find("."+c).find("#eaeulDay li:first-child").addClass("flip-clock-before"))}}),1e3)})),elementorFrontend.hooks.addAction("frontend/element_ready/eae-evergreen-timer.skin3",(function(e,a){var t,r=e.find(".eae-evergreen-wrapper").data("egtime"),d=e.find(".eae-evergreen-wrapper").data("egt-expire"),s=e.find(".eae-evergreen-wrapper").data("element-type"),l="eae-"+e.find(".eae-evergreen-wrapper").data("id"),o="eae-temp-"+e.find(".eae-evergreen-wrapper").data("id"),c=e.find(".eae-evergreen-wrapper").data("actions"),p=e.find(".eae-evergreen-wrapper").data("days"),f=e.find(".eae-evergreen-wrapper").data("hours"),m=e.find(".eae-evergreen-wrapper").data("mins"),u=e.find(".eae-evergreen-wrapper").data("seconds"),g=e.find(".eae-evergreen-wrapper").data("unqid"),v=(new Date).getTime();if(!e.hasClass("elementor-element-edit-mode"))if("countdown"===s){y=new Date(r),r=y.getTime();var h="expires="+y.toUTCString();document.cookie=o+"="+y.getTime()+";"+h+";path=/"}else{var w=n(l),y="";if(""!==w){(y=new Date(parseInt(w))).setSeconds(y.getSeconds()+e.find(".eae-evergreen-wrapper").data("egtime")),r=y.getTime();var k=new Date(parseInt(w));k.setTime(k.getTime()+60*d*60*1e3);var b="expires="+k.toUTCString();document.cookie=l+"="+w+";"+b+";path=/";var C=new Date(parseInt(w));C.setTime(C.getTime()+1e3*e.find(".eae-evergreen-wrapper").data("egtime"));h="expires="+C.toUTCString();r-v>0&&(document.cookie=o+"="+w+";"+h+";path=/")}else{temp_date=r,(y=new Date).setSeconds(y.getSeconds()+e.find(".eae-evergreen-wrapper").data("egtime")),r=y.getTime(),i(l,(new Date).getTime(),d);var _=new Date;_.setTime(_.getTime()+1e3*temp_date);var x="expires="+_.toUTCString();document.cookie=o+"="+(new Date).getTime()+";"+x+";path=/"}}if(!e.hasClass("elementor-element-edit-mode")){var T=D(r);if(parseInt(T.all)<1){if(c.length>0&&(c.forEach((function(a){"redirect"===a&&(e.hasClass("elementor-element-edit-mode")||($url=e.find(".eae-evergreen-wrapper").data("redirected-url"),""!==$url&&(window.location.href=$url))),"hide_parent"===a&&(e.hasClass("elementor-element-edit-mode")||($p_secs=e.closest("section"),$p_secs.css("display","none"))),"hide"===a&&(e.find("#timer").css("display","none"),e.find(".egt-title").css("display","none"),e.find(".desc").css("display","none")),"message"===a&&e.find(".eae-egt-message").css("display","block")})),1===c.length&&(""===c[0]||"message"===c[0]))){var $=e.find("."+g).find("#timer")[0];"yes"===p&&($.innerHTML="<span class='egt-time eae-time-wrapper'><div>00</div></span>"),"yes"===f&&("yes"===p?a($).append("<span class='egt-time eae-time-wrapper'><div>00</div></span>"):$.innerHTML="<span class='egt-time eae-time-wrapper'><div>00</div></span>"),"yes"===m&&("yes"===p||"yes"===f?a($).append("<span class='egt-time eae-time-wrapper'><div>00</div></span>"):$.innerHTML="<span class='egt-time eae-time-wrapper'><div>00</div></span>"),"yes"===u&&("yes"===p||"yes"===f||"yes"===m?a($).append("<span class='egt-time eae-time-wrapper'><div>00</div></span>"):$.innerHTML="<span class='egt-time eae-time-wrapper'><div>00</div></span>")}return}}function D(e){var a=r-new Date;return{days:Math.floor(a/864e5),hours:"0"+Math.floor(a/36e5%24),minutes:"0"+Math.floor(a/6e4%60),seconds:"0"+Math.floor(a/1e3%60),all:a}}function S(e){e.classList.add("fade"),setTimeout((function(){e.classList.remove("fade")}),700)}e.hasClass("elementor-element-edit-mode")&&("countdown"===s?(y=new Date(r),r=y.getTime()):((y=new Date).setSeconds(y.getSeconds()+e.find(".eae-evergreen-wrapper").data("egtime")),r=y.getTime())),D(r).all>1&&(t=setInterval((function(){var i=e.find("."+g).find("#timer")[0],n=D(r);"yes"===p&&(n.days<10&&(n.days="0"+n.days),i.innerHTML="<span class='egt-time eae-time-wrapper'><div>"+n.days+"</div></span>"),"yes"===f&&("yes"===p?a(i).append("<span class='egt-time eae-time-wrapper'><div>"+n.hours.slice(-2)+"</div></span>"):i.innerHTML="<span class='egt-time eae-time-wrapper'><div>"+n.hours.slice(-2)+"</div></span>"),"yes"===m&&("yes"===p||"yes"===f?a(i).append("<span class='egt-time eae-time-wrapper'><div>"+n.minutes.slice(-2)+"</div></span>"):i.innerHTML="<span class='egt-time eae-time-wrapper'><div>"+n.minutes.slice(-2)+"</div></span>"),"yes"===u&&("yes"===p||"yes"===f||"yes"===m?a(i).append("<span class='egt-time eae-time-wrapper'><div>"+n.seconds.slice(-2)+"</div></span>"):i.innerHTML="<span class='egt-time eae-time-wrapper'><div>"+n.seconds.slice(-2)+"</div></span>");var d=i.getElementsByTagName("span");"yes"===p&&59==n.hours&&59==n.minutes&&59==n.seconds&&S(d[0]),"yes"===f&&("yes"===p?59==n.minutes&&59==n.seconds&&S(d[1]):59==n.minutes&&59==n.seconds&&S(d[0])),"yes"===m&&("yes"===p?"yes"===f?59==n.seconds&&S(d[2]):59==n.seconds&&S(d[1]):"yes"===f?59==n.seconds&&S(d[1]):59==n.seconds&&S(d[0])),"yes"===u&&("yes"===p?"yes"===f?"yes"===m&&S(d[3]):S("yes"===m?d[2]:d[1]):"yes"===f?"yes"===m&&S(d[2]):S("yes"===m?d[1]:d[0])),n.all<=1&&(clearInterval(t),"yes"===p&&(i.innerHTML="<span class='egt-time eae-time-wrapper'><div>00</div></span>"),"yes"===f&&("yes"===p?a(i).append("<span class='egt-time eae-time-wrapper'><div>00</div></span>"):i.innerHTML="<span class='egt-time eae-time-wrapper'><div>00</div></span>"),"yes"===m&&("yes"===p||"yes"===f?a(i).append("<span class='egt-time eae-time-wrapper'><div>00</div></span>"):i.innerHTML="<span class='egt-time eae-time-wrapper'><div>00</div></span>"),"yes"===u&&("yes"===p||"yes"===f||"yes"===m?a(i).append("<span class='egt-time eae-time-wrapper'><div>00</div></span>"):i.innerHTML="<span class='egt-time eae-time-wrapper'><div>00</div></span>"),e.hasClass("elementor-element-edit-mode")||c.length>0&&c.forEach((function(a){"redirect"===a&&($url1=e.find(".eae-evergreen-wrapper").data("redirected-url"),""!==$url1&&(window.location.href=$url1)),"hide"===a&&(e.find("#timer").css("display","none"),e.find(".egt-title").css("display","none"),e.find(".desc").css("display","none")),"message"===a&&e.find(".eae-egt-message").css("display","block"),"hide_parent"===a&&($p_secs=e.closest("section"),$p_secs.css("display","none"))})))}),1e3))})),elementorFrontend.hooks.addAction("frontend/element_ready/eae-comparisontable.default",(function(e,a){a(e.find(".eae-ct-heading")[0]).addClass("active"),e.find("ul").on("click","li",(function(){var t=a(this).index()+2;e.find("tr").find("td:not(:eq(0))").hide(),e.find("td:nth-child("+t+")").css("display","table-cell"),e.find("tr").find("th:not(:eq(0))").hide(),e.find("li").removeClass("active"),a(this).addClass("active")}));var t=window.matchMedia("(min-width: 767px)");function i(a){a.matches?e.find(".sep").attr("colspan",5):e.find(".sep").attr("colspan",2)}t.addListener(i),i(t)})),elementorFrontend.hooks.addAction("frontend/element_ready/eae-progress-bar.skin1",r),elementorFrontend.hooks.addAction("frontend/element_ready/eae-progress-bar.skin2",r),elementorFrontend.hooks.addAction("frontend/element_ready/eae-progress-bar.skin3",r),elementorFrontend.hooks.addAction("frontend/element_ready/eae-progress-bar.skin4",r),elementorFrontend.hooks.addAction("frontend/element_ready/eae-progress-bar.skin5",r),elementorFrontend.hooks.addAction("frontend/element_ready/eae-filterableGallery.default",(function(e,a){var t=e.find(".eae-fg-wrapper"),i=e.data("id"),n=t.attr("data-maxtilt"),r=t.attr("data-perspective"),d=t.attr("data-speed"),s=t.attr("data-tilt-axis"),l=t.attr("data-glare"),o=parseInt(t.attr("data-overlay-speed"));if(s="x"===s?"y":"y"===s?"x":"both","yes"===l)var c=t.attr("data-max-glare");l="yes"===l;var p=a(".elementor-element-"+i+" .eae-fg-image"),f=t.hasClass("masonry-yes")?"masonry":"fitRows";let m=p.outerHeight();adata={percentPosition:!0,animationOptions:{duration:750,easing:"linear",queue:!1}},"fitRows"===f&&(adata.layoutMode="fitRows"),"masonry"===f&&(adata.masonry={columnWidth:".eae-gallery-item",horizontalOrder:!0}),e.hasClass("eae-show-all-yes")||(e.find(".eae-gallery-filter a").first().addClass("current"),adata.filter=e.find(".eae-gallery-filter a").first().attr("data-filter"));var u=p.isotope(adata);u.imagesLoaded().progress((function(){u.isotope("layout"),e.find(".eae-fg-image").css({"min-height":"300px",height:m})})),e.find(".eae-tilt-yes")&&(atilt={maxTilt:n,perspective:r,easing:"linear",scale:1,speed:d,disableAxis:s,transition:!0,reset:!0,glare:l,maxGlare:c},e.find(".el-tilt").tilt(atilt)),a(".elementor-element-"+i+" .eae-gallery-filter a").on("click",(function(){e.find(".eae-gallery-filter .current").removeClass("current"),a(this).addClass("current");var t=a(this).attr("data-filter");adata.filter=t;var i=p.isotope(adata);return i.imagesLoaded().progress((function(){if(i.isotope("layout"),isEditMode)return!1;e.find(".eae-tilt-yes")&&(e.find(".el-tilt").tilt(atilt),e.find(".el-tilt").tilt.reset.call(e.find(".el-tilt")))})),!1})),t.hasClass("eae-hover-direction-effect")||e.find(".eae-gallery-item-inner").hover((function(){a(this).find(".eae-grid-overlay").addClass("animated")})),t.hasClass("eae-hover-direction-effect")&&(e.find(".eae-gallery-item-inner").hover((function(){a(this).find(".eae-grid-overlay").addClass("overlay")})),t.find(".eae-gallery-item-inner").EAEHoverDirection({speed:o}))})),elementorFrontend.hooks.addAction("frontend/element_ready/eae-content-switcher.skin1",d),elementorFrontend.hooks.addAction("frontend/element_ready/eae-content-switcher.skin2",d),elementorFrontend.hooks.addAction("frontend/element_ready/eae-content-switcher.skin3",s),elementorFrontend.hooks.addAction("frontend/element_ready/eae-content-switcher.skin4",s),elementorFrontend.hooks.addAction("frontend/element_ready/global",(function(e,a){isEditMode||e.data("wts-url")&&"yes"==e.data("wts-link")&&e.on("click",(function(a){e.data("wts-url")&&"yes"==e.data("wts-new-window")?window.open(e.data("wts-url")):location.href=e.data("wts-url")}))})),elementorFrontend.hooks.addAction("frontend/element_ready/eae-thumbgallery.default",(function(e,a){swiper_outer_wrapper=e.find(".eae-swiper-outer-wrapper"),wid=e.data("id"),wClass=".elementor-element-"+wid,thumb_outer_wrapper=e.find(".eae-gallery-thumbs");let t=swiper_outer_wrapper.data("swiper-settings"),i=swiper_outer_wrapper.data("slides-per-view"),n=swiper_outer_wrapper.data("space");const r=eae.breakpoints;let d={};d[r.lg-1]={slidesPerView:i.desktop,spaceBetween:n.desktop},d[r.md-1]={slidesPerView:i.tablet,spaceBetween:n.tablet};const s=eae.breakpoints;let l={};if(l[s.lg-1]={spaceBetween:t.spaceBetween.desktop},l[s.md-1]={spaceBetween:t.spaceBetween.tablet},sliderData={direction:"horizontal",effect:t.effect,keyboard:{enabled:t.keyboard},spaceBetween:t.spaceBetween.mobile,breakpoints:l,speed:t.speed,loop:"yes"===t.loop,thumbs:{swiper:{el:thumb_outer_wrapper,direction:"horizontal",spaceBetween:n.mobile,slidesPerView:i.mobile,navigation:{nextEl:wClass+" .eae-swiper-button-next",prevEl:wClass+" .eae-swiper-button-prev"},speed:t.speed,loop:"yes"===t.loop,freeMode:!0,watchSlidesVisibility:!0,watchSlidesProgress:!0,breakpoints:d,slideToClickedSlide:!0}}},void 0!==t.autoplay&&(sliderData.thumbs.swiper.autoplay={delay:t.autoplay.duration,disableOnInteraction:t.autoplay.disableOnInteraction,reverseDirection:t.autoplay.reverseDirection}),"yes"==t.navigation&&(sliderData.navigation={nextEl:wClass+" .eae-swiper-button-next",prevEl:wClass+" .eae-swiper-button-prev"}),""!==t.pagination&&(sliderData.pagination={type:t.pagination,el:wClass+" .swiper-pagination",clickable:t.clickable}),void 0!==t.autoplay&&(sliderData.autoplay={delay:t.autoplay.duration,disableOnInteraction:t.autoplay.disableOnInteraction,reverseDirection:t.autoplay.reverseDirection}),"undefined"==typeof Swiper){new(0,elementorFrontend.utils.swiper)(".elementor-element-"+wid+" .eae-swiper-outer-wrapper .eae-swiper-container",sliderData).then(e=>{sswiper=e})}else window.sswiper=new Swiper(".elementor-element-"+wid+" .eae-swiper-outer-wrapper .eae-swiper-container",sliderData),a(".elementor-element-"+wid+" .eae-swiper-outer-wrapper .eae-swiper-container").css("visibility","visible");if(void 0!==t.autoplay){"yes"==t.autoplay.pauseOnHover&&jQuery(wClass+" .eae-swiper-container").hover((function(){sswiper.autoplay.stop(),sswiper.thumbs.swiper.autoplay.stop()}),(function(){sswiper.autoplay.start(),sswiper.thumbs.swiper.autoplay.start()}))}})),elementorFrontend.hooks.addAction("frontend/element_ready/eae-chart.bar",l),elementorFrontend.hooks.addAction("frontend/element_ready/eae-chart.horizontalBar",l),elementorFrontend.hooks.addAction("frontend/element_ready/eae-chart.line",l)}))}(jQuery);
|
assets/lib/swiper/css/swiper.css
DELETED
@@ -1,618 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Swiper 4.4.6
|
3 |
-
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
4 |
-
* http://www.idangero.us/swiper/
|
5 |
-
*
|
6 |
-
* Copyright 2014-2018 Vladimir Kharlampidi
|
7 |
-
*
|
8 |
-
* Released under the MIT License
|
9 |
-
*
|
10 |
-
* Released on: December 19, 2018
|
11 |
-
*/
|
12 |
-
.swiper-container {
|
13 |
-
margin: 0 auto;
|
14 |
-
position: relative;
|
15 |
-
overflow: hidden;
|
16 |
-
list-style: none;
|
17 |
-
padding: 0;
|
18 |
-
/* Fix of Webkit flickering */
|
19 |
-
z-index: 1;
|
20 |
-
}
|
21 |
-
.swiper-container-no-flexbox .swiper-slide {
|
22 |
-
float: left;
|
23 |
-
}
|
24 |
-
.swiper-container-vertical > .swiper-wrapper {
|
25 |
-
-webkit-box-orient: vertical;
|
26 |
-
-webkit-box-direction: normal;
|
27 |
-
-webkit-flex-direction: column;
|
28 |
-
-ms-flex-direction: column;
|
29 |
-
flex-direction: column;
|
30 |
-
}
|
31 |
-
.swiper-wrapper {
|
32 |
-
position: relative;
|
33 |
-
width: 100%;
|
34 |
-
height: 100%;
|
35 |
-
z-index: 1;
|
36 |
-
display: -webkit-box;
|
37 |
-
display: -webkit-flex;
|
38 |
-
display: -ms-flexbox;
|
39 |
-
display: flex;
|
40 |
-
-webkit-transition-property: -webkit-transform;
|
41 |
-
transition-property: -webkit-transform;
|
42 |
-
-o-transition-property: transform;
|
43 |
-
transition-property: transform;
|
44 |
-
transition-property: transform, -webkit-transform;
|
45 |
-
-webkit-box-sizing: content-box;
|
46 |
-
box-sizing: content-box;
|
47 |
-
}
|
48 |
-
.swiper-container-android .swiper-slide,
|
49 |
-
.swiper-wrapper {
|
50 |
-
-webkit-transform: translate3d(0px, 0, 0);
|
51 |
-
transform: translate3d(0px, 0, 0);
|
52 |
-
}
|
53 |
-
.swiper-container-multirow > .swiper-wrapper {
|
54 |
-
-webkit-flex-wrap: wrap;
|
55 |
-
-ms-flex-wrap: wrap;
|
56 |
-
flex-wrap: wrap;
|
57 |
-
}
|
58 |
-
.swiper-container-free-mode > .swiper-wrapper {
|
59 |
-
-webkit-transition-timing-function: ease-out;
|
60 |
-
-o-transition-timing-function: ease-out;
|
61 |
-
transition-timing-function: ease-out;
|
62 |
-
margin: 0 auto;
|
63 |
-
}
|
64 |
-
.swiper-slide {
|
65 |
-
-webkit-flex-shrink: 0;
|
66 |
-
-ms-flex-negative: 0;
|
67 |
-
flex-shrink: 0;
|
68 |
-
width: 100%;
|
69 |
-
height: 100%;
|
70 |
-
position: relative;
|
71 |
-
-webkit-transition-property: -webkit-transform;
|
72 |
-
transition-property: -webkit-transform;
|
73 |
-
-o-transition-property: transform;
|
74 |
-
transition-property: transform;
|
75 |
-
transition-property: transform, -webkit-transform;
|
76 |
-
}
|
77 |
-
.swiper-slide-invisible-blank {
|
78 |
-
visibility: hidden;
|
79 |
-
}
|
80 |
-
/* Auto Height */
|
81 |
-
.swiper-container-autoheight,
|
82 |
-
.swiper-container-autoheight .swiper-slide {
|
83 |
-
height: auto;
|
84 |
-
}
|
85 |
-
.swiper-container-autoheight .swiper-wrapper {
|
86 |
-
-webkit-box-align: start;
|
87 |
-
-webkit-align-items: flex-start;
|
88 |
-
-ms-flex-align: start;
|
89 |
-
align-items: flex-start;
|
90 |
-
-webkit-transition-property: height, -webkit-transform;
|
91 |
-
transition-property: height, -webkit-transform;
|
92 |
-
-o-transition-property: transform, height;
|
93 |
-
transition-property: transform, height;
|
94 |
-
transition-property: transform, height, -webkit-transform;
|
95 |
-
}
|
96 |
-
/* 3D Effects */
|
97 |
-
.swiper-container-3d {
|
98 |
-
-webkit-perspective: 1200px;
|
99 |
-
perspective: 1200px;
|
100 |
-
}
|
101 |
-
.swiper-container-3d .swiper-wrapper,
|
102 |
-
.swiper-container-3d .swiper-slide,
|
103 |
-
.swiper-container-3d .swiper-slide-shadow-left,
|
104 |
-
.swiper-container-3d .swiper-slide-shadow-right,
|
105 |
-
.swiper-container-3d .swiper-slide-shadow-top,
|
106 |
-
.swiper-container-3d .swiper-slide-shadow-bottom,
|
107 |
-
.swiper-container-3d .swiper-cube-shadow {
|
108 |
-
-webkit-transform-style: preserve-3d;
|
109 |
-
transform-style: preserve-3d;
|
110 |
-
}
|
111 |
-
.swiper-container-3d .swiper-slide-shadow-left,
|
112 |
-
.swiper-container-3d .swiper-slide-shadow-right,
|
113 |
-
.swiper-container-3d .swiper-slide-shadow-top,
|
114 |
-
.swiper-container-3d .swiper-slide-shadow-bottom {
|
115 |
-
position: absolute;
|
116 |
-
left: 0;
|
117 |
-
top: 0;
|
118 |
-
width: 100%;
|
119 |
-
height: 100%;
|
120 |
-
pointer-events: none;
|
121 |
-
z-index: 10;
|
122 |
-
}
|
123 |
-
.swiper-container-3d .swiper-slide-shadow-left {
|
124 |
-
background-image: -webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
|
125 |
-
background-image: -webkit-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
126 |
-
background-image: -o-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
127 |
-
background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
128 |
-
}
|
129 |
-
.swiper-container-3d .swiper-slide-shadow-right {
|
130 |
-
background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
|
131 |
-
background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
132 |
-
background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
133 |
-
background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
134 |
-
}
|
135 |
-
.swiper-container-3d .swiper-slide-shadow-top {
|
136 |
-
background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
|
137 |
-
background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
138 |
-
background-image: -o-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
139 |
-
background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
140 |
-
}
|
141 |
-
.swiper-container-3d .swiper-slide-shadow-bottom {
|
142 |
-
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
|
143 |
-
background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
144 |
-
background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
145 |
-
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
146 |
-
}
|
147 |
-
/* IE10 Windows Phone 8 Fixes */
|
148 |
-
.swiper-container-wp8-horizontal,
|
149 |
-
.swiper-container-wp8-horizontal > .swiper-wrapper {
|
150 |
-
-ms-touch-action: pan-y;
|
151 |
-
touch-action: pan-y;
|
152 |
-
}
|
153 |
-
.swiper-container-wp8-vertical,
|
154 |
-
.swiper-container-wp8-vertical > .swiper-wrapper {
|
155 |
-
-ms-touch-action: pan-x;
|
156 |
-
touch-action: pan-x;
|
157 |
-
}
|
158 |
-
.swiper-button-prev,
|
159 |
-
.swiper-button-next {
|
160 |
-
position: absolute;
|
161 |
-
top: 50%;
|
162 |
-
width: 27px;
|
163 |
-
height: 44px;
|
164 |
-
margin-top: -22px;
|
165 |
-
z-index: 10;
|
166 |
-
cursor: pointer;
|
167 |
-
background-size: 27px 44px;
|
168 |
-
background-position: center;
|
169 |
-
background-repeat: no-repeat;
|
170 |
-
}
|
171 |
-
.swiper-button-prev.swiper-button-disabled,
|
172 |
-
.swiper-button-next.swiper-button-disabled {
|
173 |
-
opacity: 0.35;
|
174 |
-
cursor: auto;
|
175 |
-
pointer-events: none;
|
176 |
-
}
|
177 |
-
.swiper-button-prev,
|
178 |
-
.swiper-container-rtl .swiper-button-next {
|
179 |
-
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");
|
180 |
-
left: 10px;
|
181 |
-
right: auto;
|
182 |
-
}
|
183 |
-
.swiper-button-next,
|
184 |
-
.swiper-container-rtl .swiper-button-prev {
|
185 |
-
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");
|
186 |
-
right: 10px;
|
187 |
-
left: auto;
|
188 |
-
}
|
189 |
-
.swiper-button-prev.swiper-button-white,
|
190 |
-
.swiper-container-rtl .swiper-button-next.swiper-button-white {
|
191 |
-
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E");
|
192 |
-
}
|
193 |
-
.swiper-button-next.swiper-button-white,
|
194 |
-
.swiper-container-rtl .swiper-button-prev.swiper-button-white {
|
195 |
-
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E");
|
196 |
-
}
|
197 |
-
.swiper-button-prev.swiper-button-black,
|
198 |
-
.swiper-container-rtl .swiper-button-next.swiper-button-black {
|
199 |
-
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E");
|
200 |
-
}
|
201 |
-
.swiper-button-next.swiper-button-black,
|
202 |
-
.swiper-container-rtl .swiper-button-prev.swiper-button-black {
|
203 |
-
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E");
|
204 |
-
}
|
205 |
-
.swiper-button-lock {
|
206 |
-
display: none;
|
207 |
-
}
|
208 |
-
.swiper-pagination {
|
209 |
-
position: absolute;
|
210 |
-
text-align: center;
|
211 |
-
-webkit-transition: 300ms opacity;
|
212 |
-
-o-transition: 300ms opacity;
|
213 |
-
transition: 300ms opacity;
|
214 |
-
-webkit-transform: translate3d(0, 0, 0);
|
215 |
-
transform: translate3d(0, 0, 0);
|
216 |
-
z-index: 10;
|
217 |
-
}
|
218 |
-
.swiper-pagination.swiper-pagination-hidden {
|
219 |
-
opacity: 0;
|
220 |
-
}
|
221 |
-
/* Common Styles */
|
222 |
-
.swiper-pagination-fraction,
|
223 |
-
.swiper-pagination-custom,
|
224 |
-
.swiper-container-horizontal > .swiper-pagination-bullets {
|
225 |
-
bottom: 10px;
|
226 |
-
left: 0;
|
227 |
-
width: 100%;
|
228 |
-
}
|
229 |
-
/* Bullets */
|
230 |
-
.swiper-pagination-bullets-dynamic {
|
231 |
-
overflow: hidden;
|
232 |
-
font-size: 0;
|
233 |
-
}
|
234 |
-
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
|
235 |
-
-webkit-transform: scale(0.33);
|
236 |
-
-ms-transform: scale(0.33);
|
237 |
-
transform: scale(0.33);
|
238 |
-
position: relative;
|
239 |
-
}
|
240 |
-
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active {
|
241 |
-
-webkit-transform: scale(1);
|
242 |
-
-ms-transform: scale(1);
|
243 |
-
transform: scale(1);
|
244 |
-
}
|
245 |
-
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main {
|
246 |
-
-webkit-transform: scale(1);
|
247 |
-
-ms-transform: scale(1);
|
248 |
-
transform: scale(1);
|
249 |
-
}
|
250 |
-
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev {
|
251 |
-
-webkit-transform: scale(0.66);
|
252 |
-
-ms-transform: scale(0.66);
|
253 |
-
transform: scale(0.66);
|
254 |
-
}
|
255 |
-
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev {
|
256 |
-
-webkit-transform: scale(0.33);
|
257 |
-
-ms-transform: scale(0.33);
|
258 |
-
transform: scale(0.33);
|
259 |
-
}
|
260 |
-
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next {
|
261 |
-
-webkit-transform: scale(0.66);
|
262 |
-
-ms-transform: scale(0.66);
|
263 |
-
transform: scale(0.66);
|
264 |
-
}
|
265 |
-
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next {
|
266 |
-
-webkit-transform: scale(0.33);
|
267 |
-
-ms-transform: scale(0.33);
|
268 |
-
transform: scale(0.33);
|
269 |
-
}
|
270 |
-
.swiper-pagination-bullet {
|
271 |
-
width: 8px;
|
272 |
-
height: 8px;
|
273 |
-
display: inline-block;
|
274 |
-
border-radius: 100%;
|
275 |
-
background: #000;
|
276 |
-
opacity: 0.2;
|
277 |
-
}
|
278 |
-
button.swiper-pagination-bullet {
|
279 |
-
border: none;
|
280 |
-
margin: 0;
|
281 |
-
padding: 0;
|
282 |
-
-webkit-box-shadow: none;
|
283 |
-
box-shadow: none;
|
284 |
-
-webkit-appearance: none;
|
285 |
-
-moz-appearance: none;
|
286 |
-
appearance: none;
|
287 |
-
}
|
288 |
-
.swiper-pagination-clickable .swiper-pagination-bullet {
|
289 |
-
cursor: pointer;
|
290 |
-
}
|
291 |
-
.swiper-pagination-bullet-active {
|
292 |
-
opacity: 1;
|
293 |
-
background: #007aff;
|
294 |
-
}
|
295 |
-
.swiper-container-vertical > .swiper-pagination-bullets {
|
296 |
-
right: 10px;
|
297 |
-
top: 50%;
|
298 |
-
-webkit-transform: translate3d(0px, -50%, 0);
|
299 |
-
transform: translate3d(0px, -50%, 0);
|
300 |
-
}
|
301 |
-
.swiper-container-vertical > .swiper-pagination-bullets .swiper-pagination-bullet {
|
302 |
-
margin: 6px 0;
|
303 |
-
display: block;
|
304 |
-
}
|
305 |
-
.swiper-container-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic {
|
306 |
-
top: 50%;
|
307 |
-
-webkit-transform: translateY(-50%);
|
308 |
-
-ms-transform: translateY(-50%);
|
309 |
-
transform: translateY(-50%);
|
310 |
-
width: 8px;
|
311 |
-
}
|
312 |
-
.swiper-container-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
|
313 |
-
display: inline-block;
|
314 |
-
-webkit-transition: 200ms top, 200ms -webkit-transform;
|
315 |
-
transition: 200ms top, 200ms -webkit-transform;
|
316 |
-
-o-transition: 200ms transform, 200ms top;
|
317 |
-
transition: 200ms transform, 200ms top;
|
318 |
-
transition: 200ms transform, 200ms top, 200ms -webkit-transform;
|
319 |
-
}
|
320 |
-
.swiper-container-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet {
|
321 |
-
margin: 0 4px;
|
322 |
-
}
|
323 |
-
.swiper-container-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic {
|
324 |
-
left: 50%;
|
325 |
-
-webkit-transform: translateX(-50%);
|
326 |
-
-ms-transform: translateX(-50%);
|
327 |
-
transform: translateX(-50%);
|
328 |
-
white-space: nowrap;
|
329 |
-
}
|
330 |
-
.swiper-container-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
|
331 |
-
-webkit-transition: 200ms left, 200ms -webkit-transform;
|
332 |
-
transition: 200ms left, 200ms -webkit-transform;
|
333 |
-
-o-transition: 200ms transform, 200ms left;
|
334 |
-
transition: 200ms transform, 200ms left;
|
335 |
-
transition: 200ms transform, 200ms left, 200ms -webkit-transform;
|
336 |
-
}
|
337 |
-
.swiper-container-horizontal.swiper-container-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
|
338 |
-
-webkit-transition: 200ms right, 200ms -webkit-transform;
|
339 |
-
transition: 200ms right, 200ms -webkit-transform;
|
340 |
-
-o-transition: 200ms transform, 200ms right;
|
341 |
-
transition: 200ms transform, 200ms right;
|
342 |
-
transition: 200ms transform, 200ms right, 200ms -webkit-transform;
|
343 |
-
}
|
344 |
-
/* Progress */
|
345 |
-
.swiper-pagination-progressbar {
|
346 |
-
background: rgba(0, 0, 0, 0.25);
|
347 |
-
position: absolute;
|
348 |
-
}
|
349 |
-
.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
|
350 |
-
background: #007aff;
|
351 |
-
position: absolute;
|
352 |
-
left: 0;
|
353 |
-
top: 0;
|
354 |
-
width: 100%;
|
355 |
-
height: 100%;
|
356 |
-
-webkit-transform: scale(0);
|
357 |
-
-ms-transform: scale(0);
|
358 |
-
transform: scale(0);
|
359 |
-
-webkit-transform-origin: left top;
|
360 |
-
-ms-transform-origin: left top;
|
361 |
-
transform-origin: left top;
|
362 |
-
}
|
363 |
-
.swiper-container-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
|
364 |
-
-webkit-transform-origin: right top;
|
365 |
-
-ms-transform-origin: right top;
|
366 |
-
transform-origin: right top;
|
367 |
-
}
|
368 |
-
.swiper-container-horizontal > .swiper-pagination-progressbar,
|
369 |
-
.swiper-container-vertical > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite {
|
370 |
-
width: 100%;
|
371 |
-
height: 4px;
|
372 |
-
left: 0;
|
373 |
-
top: 0;
|
374 |
-
}
|
375 |
-
.swiper-container-vertical > .swiper-pagination-progressbar,
|
376 |
-
.swiper-container-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite {
|
377 |
-
width: 4px;
|
378 |
-
height: 100%;
|
379 |
-
left: 0;
|
380 |
-
top: 0;
|
381 |
-
}
|
382 |
-
.swiper-pagination-white .swiper-pagination-bullet-active {
|
383 |
-
background: #ffffff;
|
384 |
-
}
|
385 |
-
.swiper-pagination-progressbar.swiper-pagination-white {
|
386 |
-
background: rgba(255, 255, 255, 0.25);
|
387 |
-
}
|
388 |
-
.swiper-pagination-progressbar.swiper-pagination-white .swiper-pagination-progressbar-fill {
|
389 |
-
background: #ffffff;
|
390 |
-
}
|
391 |
-
.swiper-pagination-black .swiper-pagination-bullet-active {
|
392 |
-
background: #000000;
|
393 |
-
}
|
394 |
-
.swiper-pagination-progressbar.swiper-pagination-black {
|
395 |
-
background: rgba(0, 0, 0, 0.25);
|
396 |
-
}
|
397 |
-
.swiper-pagination-progressbar.swiper-pagination-black .swiper-pagination-progressbar-fill {
|
398 |
-
background: #000000;
|
399 |
-
}
|
400 |
-
.swiper-pagination-lock {
|
401 |
-
display: none;
|
402 |
-
}
|
403 |
-
/* Scrollbar */
|
404 |
-
.swiper-scrollbar {
|
405 |
-
border-radius: 10px;
|
406 |
-
position: relative;
|
407 |
-
-ms-touch-action: none;
|
408 |
-
background: rgba(0, 0, 0, 0.1);
|
409 |
-
}
|
410 |
-
.swiper-container-horizontal > .swiper-scrollbar {
|
411 |
-
position: absolute;
|
412 |
-
left: 1%;
|
413 |
-
bottom: 3px;
|
414 |
-
z-index: 50;
|
415 |
-
height: 5px;
|
416 |
-
width: 98%;
|
417 |
-
}
|
418 |
-
.swiper-container-vertical > .swiper-scrollbar {
|
419 |
-
position: absolute;
|
420 |
-
right: 3px;
|
421 |
-
top: 1%;
|
422 |
-
z-index: 50;
|
423 |
-
width: 5px;
|
424 |
-
height: 98%;
|
425 |
-
}
|
426 |
-
.swiper-scrollbar-drag {
|
427 |
-
height: 100%;
|
428 |
-
width: 100%;
|
429 |
-
position: relative;
|
430 |
-
background: rgba(0, 0, 0, 0.5);
|
431 |
-
border-radius: 10px;
|
432 |
-
left: 0;
|
433 |
-
top: 0;
|
434 |
-
}
|
435 |
-
.swiper-scrollbar-cursor-drag {
|
436 |
-
cursor: move;
|
437 |
-
}
|
438 |
-
.swiper-scrollbar-lock {
|
439 |
-
display: none;
|
440 |
-
}
|
441 |
-
.swiper-zoom-container {
|
442 |
-
width: 100%;
|
443 |
-
height: 100%;
|
444 |
-
display: -webkit-box;
|
445 |
-
display: -webkit-flex;
|
446 |
-
display: -ms-flexbox;
|
447 |
-
display: flex;
|
448 |
-
-webkit-box-pack: center;
|
449 |
-
-webkit-justify-content: center;
|
450 |
-
-ms-flex-pack: center;
|
451 |
-
justify-content: center;
|
452 |
-
-webkit-box-align: center;
|
453 |
-
-webkit-align-items: center;
|
454 |
-
-ms-flex-align: center;
|
455 |
-
align-items: center;
|
456 |
-
text-align: center;
|
457 |
-
}
|
458 |
-
.swiper-zoom-container > img,
|
459 |
-
.swiper-zoom-container > svg,
|
460 |
-
.swiper-zoom-container > canvas {
|
461 |
-
max-width: 100%;
|
462 |
-
max-height: 100%;
|
463 |
-
-o-object-fit: contain;
|
464 |
-
object-fit: contain;
|
465 |
-
}
|
466 |
-
.swiper-slide-zoomed {
|
467 |
-
cursor: move;
|
468 |
-
}
|
469 |
-
/* Preloader */
|
470 |
-
.swiper-lazy-preloader {
|
471 |
-
width: 42px;
|
472 |
-
height: 42px;
|
473 |
-
position: absolute;
|
474 |
-
left: 50%;
|
475 |
-
top: 50%;
|
476 |
-
margin-left: -21px;
|
477 |
-
margin-top: -21px;
|
478 |
-
z-index: 10;
|
479 |
-
-webkit-transform-origin: 50%;
|
480 |
-
-ms-transform-origin: 50%;
|
481 |
-
transform-origin: 50%;
|
482 |
-
-webkit-animation: swiper-preloader-spin 1s steps(12, end) infinite;
|
483 |
-
animation: swiper-preloader-spin 1s steps(12, end) infinite;
|
484 |
-
}
|
485 |
-
.swiper-lazy-preloader:after {
|
486 |
-
display: block;
|
487 |
-
content: '';
|
488 |
-
width: 100%;
|
489 |
-
height: 100%;
|
490 |
-
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
|
491 |
-
background-position: 50%;
|
492 |
-
background-size: 100%;
|
493 |
-
background-repeat: no-repeat;
|
494 |
-
}
|
495 |
-
.swiper-lazy-preloader-white:after {
|
496 |
-
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
|
497 |
-
}
|
498 |
-
@-webkit-keyframes swiper-preloader-spin {
|
499 |
-
100% {
|
500 |
-
-webkit-transform: rotate(360deg);
|
501 |
-
transform: rotate(360deg);
|
502 |
-
}
|
503 |
-
}
|
504 |
-
@keyframes swiper-preloader-spin {
|
505 |
-
100% {
|
506 |
-
-webkit-transform: rotate(360deg);
|
507 |
-
transform: rotate(360deg);
|
508 |
-
}
|
509 |
-
}
|
510 |
-
/* a11y */
|
511 |
-
.swiper-container .swiper-notification {
|
512 |
-
position: absolute;
|
513 |
-
left: 0;
|
514 |
-
top: 0;
|
515 |
-
pointer-events: none;
|
516 |
-
opacity: 0;
|
517 |
-
z-index: -1000;
|
518 |
-
}
|
519 |
-
.swiper-container-fade.swiper-container-free-mode .swiper-slide {
|
520 |
-
-webkit-transition-timing-function: ease-out;
|
521 |
-
-o-transition-timing-function: ease-out;
|
522 |
-
transition-timing-function: ease-out;
|
523 |
-
}
|
524 |
-
.swiper-container-fade .swiper-slide {
|
525 |
-
pointer-events: none;
|
526 |
-
-webkit-transition-property: opacity;
|
527 |
-
-o-transition-property: opacity;
|
528 |
-
transition-property: opacity;
|
529 |
-
}
|
530 |
-
.swiper-container-fade .swiper-slide .swiper-slide {
|
531 |
-
pointer-events: none;
|
532 |
-
}
|
533 |
-
.swiper-container-fade .swiper-slide-active,
|
534 |
-
.swiper-container-fade .swiper-slide-active .swiper-slide-active {
|
535 |
-
pointer-events: auto;
|
536 |
-
}
|
537 |
-
.swiper-container-cube {
|
538 |
-
overflow: visible;
|
539 |
-
}
|
540 |
-
.swiper-container-cube .swiper-slide {
|
541 |
-
pointer-events: none;
|
542 |
-
-webkit-backface-visibility: hidden;
|
543 |
-
backface-visibility: hidden;
|
544 |
-
z-index: 1;
|
545 |
-
visibility: hidden;
|
546 |
-
-webkit-transform-origin: 0 0;
|
547 |
-
-ms-transform-origin: 0 0;
|
548 |
-
transform-origin: 0 0;
|
549 |
-
width: 100%;
|
550 |
-
height: 100%;
|
551 |
-
}
|
552 |
-
.swiper-container-cube .swiper-slide .swiper-slide {
|
553 |
-
pointer-events: none;
|
554 |
-
}
|
555 |
-
.swiper-container-cube.swiper-container-rtl .swiper-slide {
|
556 |
-
-webkit-transform-origin: 100% 0;
|
557 |
-
-ms-transform-origin: 100% 0;
|
558 |
-
transform-origin: 100% 0;
|
559 |
-
}
|
560 |
-
.swiper-container-cube .swiper-slide-active,
|
561 |
-
.swiper-container-cube .swiper-slide-active .swiper-slide-active {
|
562 |
-
pointer-events: auto;
|
563 |
-
}
|
564 |
-
.swiper-container-cube .swiper-slide-active,
|
565 |
-
.swiper-container-cube .swiper-slide-next,
|
566 |
-
.swiper-container-cube .swiper-slide-prev,
|
567 |
-
.swiper-container-cube .swiper-slide-next + .swiper-slide {
|
568 |
-
pointer-events: auto;
|
569 |
-
visibility: visible;
|
570 |
-
}
|
571 |
-
.swiper-container-cube .swiper-slide-shadow-top,
|
572 |
-
.swiper-container-cube .swiper-slide-shadow-bottom,
|
573 |
-
.swiper-container-cube .swiper-slide-shadow-left,
|
574 |
-
.swiper-container-cube .swiper-slide-shadow-right {
|
575 |
-
z-index: 0;
|
576 |
-
-webkit-backface-visibility: hidden;
|
577 |
-
backface-visibility: hidden;
|
578 |
-
}
|
579 |
-
.swiper-container-cube .swiper-cube-shadow {
|
580 |
-
position: absolute;
|
581 |
-
left: 0;
|
582 |
-
bottom: 0px;
|
583 |
-
width: 100%;
|
584 |
-
height: 100%;
|
585 |
-
background: #000;
|
586 |
-
opacity: 0.6;
|
587 |
-
-webkit-filter: blur(50px);
|
588 |
-
filter: blur(50px);
|
589 |
-
z-index: 0;
|
590 |
-
}
|
591 |
-
.swiper-container-flip {
|
592 |
-
overflow: visible;
|
593 |
-
}
|
594 |
-
.swiper-container-flip .swiper-slide {
|
595 |
-
pointer-events: none;
|
596 |
-
-webkit-backface-visibility: hidden;
|
597 |
-
backface-visibility: hidden;
|
598 |
-
z-index: 1;
|
599 |
-
}
|
600 |
-
.swiper-container-flip .swiper-slide .swiper-slide {
|
601 |
-
pointer-events: none;
|
602 |
-
}
|
603 |
-
.swiper-container-flip .swiper-slide-active,
|
604 |
-
.swiper-container-flip .swiper-slide-active .swiper-slide-active {
|
605 |
-
pointer-events: auto;
|
606 |
-
}
|
607 |
-
.swiper-container-flip .swiper-slide-shadow-top,
|
608 |
-
.swiper-container-flip .swiper-slide-shadow-bottom,
|
609 |
-
.swiper-container-flip .swiper-slide-shadow-left,
|
610 |
-
.swiper-container-flip .swiper-slide-shadow-right {
|
611 |
-
z-index: 0;
|
612 |
-
-webkit-backface-visibility: hidden;
|
613 |
-
backface-visibility: hidden;
|
614 |
-
}
|
615 |
-
.swiper-container-coverflow .swiper-wrapper {
|
616 |
-
/* Windows 8 IE 10 fix */
|
617 |
-
-ms-perspective: 1200px;
|
618 |
-
}
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/lib/swiper/css/swiper.min.css
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Swiper 4.4.6
|
3 |
-
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
4 |
-
* http://www.idangero.us/swiper/
|
5 |
-
*
|
6 |
-
* Copyright 2014-2018 Vladimir Kharlampidi
|
7 |
-
*
|
8 |
-
* Released under the MIT License
|
9 |
-
*
|
10 |
-
* Released on: December 19, 2018
|
11 |
-
*/
|
12 |
-
.swiper-container{margin:0 auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1}.swiper-container-no-flexbox .swiper-slide{float:left}.swiper-container-vertical>.swiper-wrapper{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;-o-transition-property:transform;transition-property:transform;transition-property:transform,-webkit-transform;-webkit-box-sizing:content-box;box-sizing:content-box}.swiper-container-android .swiper-slide,.swiper-wrapper{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.swiper-container-multirow>.swiper-wrapper{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.swiper-container-free-mode>.swiper-wrapper{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out;margin:0 auto}.swiper-slide{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;-o-transition-property:transform;transition-property:transform;transition-property:transform,-webkit-transform}.swiper-slide-invisible-blank{visibility:hidden}.swiper-container-autoheight,.swiper-container-autoheight .swiper-slide{height:auto}.swiper-container-autoheight .swiper-wrapper{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-transition-property:height,-webkit-transform;transition-property:height,-webkit-transform;-o-transition-property:transform,height;transition-property:transform,height;transition-property:transform,height,-webkit-transform}.swiper-container-3d{-webkit-perspective:1200px;perspective:1200px}.swiper-container-3d .swiper-cube-shadow,.swiper-container-3d .swiper-slide,.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top,.swiper-container-3d .swiper-wrapper{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-container-3d .swiper-slide-shadow-left{background-image:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-right{background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-top{background-image:-webkit-gradient(linear,left bottom,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-bottom{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-wp8-horizontal,.swiper-container-wp8-horizontal>.swiper-wrapper{-ms-touch-action:pan-y;touch-action:pan-y}.swiper-container-wp8-vertical,.swiper-container-wp8-vertical>.swiper-wrapper{-ms-touch-action:pan-x;touch-action:pan-x}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:27px;height:44px;margin-top:-22px;z-index:10;cursor:pointer;background-size:27px 44px;background-position:center;background-repeat:no-repeat}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-prev,.swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");left:10px;right:auto}.swiper-button-next,.swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");right:10px;left:auto}.swiper-button-prev.swiper-button-white,.swiper-container-rtl .swiper-button-next.swiper-button-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.swiper-button-next.swiper-button-white,.swiper-container-rtl .swiper-button-prev.swiper-button-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.swiper-button-black,.swiper-container-rtl .swiper-button-next.swiper-button-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.swiper-button-next.swiper-button-black,.swiper-container-rtl .swiper-button-prev.swiper-button-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;-webkit-transition:.3s opacity;-o-transition:.3s opacity;transition:.3s opacity;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-container-horizontal>.swiper-pagination-bullets,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:10px;left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}.swiper-pagination-bullet{width:8px;height:8px;display:inline-block;border-radius:100%;background:#000;opacity:.2}button.swiper-pagination-bullet{border:none;margin:0;padding:0;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet-active{opacity:1;background:#007aff}.swiper-container-vertical>.swiper-pagination-bullets{right:10px;top:50%;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.swiper-container-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:6px 0;display:block}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:8px}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;-webkit-transition:.2s top,.2s -webkit-transform;transition:.2s top,.2s -webkit-transform;-o-transition:.2s transform,.2s top;transition:.2s transform,.2s top;transition:.2s transform,.2s top,.2s -webkit-transform}.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 4px}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:.2s left,.2s -webkit-transform;transition:.2s left,.2s -webkit-transform;-o-transition:.2s transform,.2s left;transition:.2s transform,.2s left;transition:.2s transform,.2s left,.2s -webkit-transform}.swiper-container-horizontal.swiper-container-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:.2s right,.2s -webkit-transform;transition:.2s right,.2s -webkit-transform;-o-transition:.2s transform,.2s right;transition:.2s transform,.2s right;transition:.2s transform,.2s right,.2s -webkit-transform}.swiper-pagination-progressbar{background:rgba(0,0,0,.25);position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:#007aff;position:absolute;left:0;top:0;width:100%;height:100%;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-transform-origin:left top;-ms-transform-origin:left top;transform-origin:left top}.swiper-container-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{-webkit-transform-origin:right top;-ms-transform-origin:right top;transform-origin:right top}.swiper-container-horizontal>.swiper-pagination-progressbar,.swiper-container-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:4px;left:0;top:0}.swiper-container-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-container-vertical>.swiper-pagination-progressbar{width:4px;height:100%;left:0;top:0}.swiper-pagination-white .swiper-pagination-bullet-active{background:#fff}.swiper-pagination-progressbar.swiper-pagination-white{background:rgba(255,255,255,.25)}.swiper-pagination-progressbar.swiper-pagination-white .swiper-pagination-progressbar-fill{background:#fff}.swiper-pagination-black .swiper-pagination-bullet-active{background:#000}.swiper-pagination-progressbar.swiper-pagination-black{background:rgba(0,0,0,.25)}.swiper-pagination-progressbar.swiper-pagination-black .swiper-pagination-progressbar-fill{background:#000}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:10px;position:relative;-ms-touch-action:none;background:rgba(0,0,0,.1)}.swiper-container-horizontal>.swiper-scrollbar{position:absolute;left:1%;bottom:3px;z-index:50;height:5px;width:98%}.swiper-container-vertical>.swiper-scrollbar{position:absolute;right:3px;top:1%;z-index:50;width:5px;height:98%}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:rgba(0,0,0,.5);border-radius:10px;left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain}.swiper-slide-zoomed{cursor:move}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;-webkit-transform-origin:50%;-ms-transform-origin:50%;transform-origin:50%;-webkit-animation:swiper-preloader-spin 1s steps(12,end) infinite;animation:swiper-preloader-spin 1s steps(12,end) infinite}.swiper-lazy-preloader:after{display:block;content:'';width:100%;height:100%;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");background-position:50%;background-size:100%;background-repeat:no-repeat}.swiper-lazy-preloader-white:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}@-webkit-keyframes swiper-preloader-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes swiper-preloader-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.swiper-container .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-container-fade.swiper-container-free-mode .swiper-slide{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out}.swiper-container-fade .swiper-slide{pointer-events:none;-webkit-transition-property:opacity;-o-transition-property:opacity;transition-property:opacity}.swiper-container-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-fade .swiper-slide-active,.swiper-container-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube{overflow:visible}.swiper-container-cube .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;width:100%;height:100%}.swiper-container-cube .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-cube.swiper-container-rtl .swiper-slide{-webkit-transform-origin:100% 0;-ms-transform-origin:100% 0;transform-origin:100% 0}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-next,.swiper-container-cube .swiper-slide-next+.swiper-slide,.swiper-container-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-container-cube .swiper-slide-shadow-bottom,.swiper-container-cube .swiper-slide-shadow-left,.swiper-container-cube .swiper-slide-shadow-right,.swiper-container-cube .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0;width:100%;height:100%;background:#000;opacity:.6;-webkit-filter:blur(50px);filter:blur(50px);z-index:0}.swiper-container-flip{overflow:visible}.swiper-container-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-container-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-flip .swiper-slide-active,.swiper-container-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-flip .swiper-slide-shadow-bottom,.swiper-container-flip .swiper-slide-shadow-left,.swiper-container-flip .swiper-slide-shadow-right,.swiper-container-flip .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-coverflow .swiper-wrapper{-ms-perspective:1200px}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/lib/swiper/js/swiper.esm.bundle.js
DELETED
@@ -1,7018 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Swiper 4.4.6
|
3 |
-
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
4 |
-
* http://www.idangero.us/swiper/
|
5 |
-
*
|
6 |
-
* Copyright 2014-2018 Vladimir Kharlampidi
|
7 |
-
*
|
8 |
-
* Released under the MIT License
|
9 |
-
*
|
10 |
-
* Released on: December 19, 2018
|
11 |
-
*/
|
12 |
-
|
13 |
-
import { $, addClass, removeClass, hasClass, toggleClass, attr, removeAttr, data, transform, transition, on, off, trigger, transitionEnd, outerWidth, outerHeight, offset, css, each, html, text, is, index, eq, append, prepend, next, nextAll, prev, prevAll, parent, parents, closest, find, children, remove, add, styles } from 'dom7/dist/dom7.modular';
|
14 |
-
import { window, document } from 'ssr-window';
|
15 |
-
|
16 |
-
const Methods = {
|
17 |
-
addClass,
|
18 |
-
removeClass,
|
19 |
-
hasClass,
|
20 |
-
toggleClass,
|
21 |
-
attr,
|
22 |
-
removeAttr,
|
23 |
-
data,
|
24 |
-
transform,
|
25 |
-
transition,
|
26 |
-
on,
|
27 |
-
off,
|
28 |
-
trigger,
|
29 |
-
transitionEnd,
|
30 |
-
outerWidth,
|
31 |
-
outerHeight,
|
32 |
-
offset,
|
33 |
-
css,
|
34 |
-
each,
|
35 |
-
html,
|
36 |
-
text,
|
37 |
-
is,
|
38 |
-
index,
|
39 |
-
eq,
|
40 |
-
append,
|
41 |
-
prepend,
|
42 |
-
next,
|
43 |
-
nextAll,
|
44 |
-
prev,
|
45 |
-
prevAll,
|
46 |
-
parent,
|
47 |
-
parents,
|
48 |
-
closest,
|
49 |
-
find,
|
50 |
-
children,
|
51 |
-
remove,
|
52 |
-
add,
|
53 |
-
styles,
|
54 |
-
};
|
55 |
-
|
56 |
-
Object.keys(Methods).forEach((methodName) => {
|
57 |
-
$.fn[methodName] = Methods[methodName];
|
58 |
-
});
|
59 |
-
|
60 |
-
const Utils = {
|
61 |
-
deleteProps(obj) {
|
62 |
-
const object = obj;
|
63 |
-
Object.keys(object).forEach((key) => {
|
64 |
-
try {
|
65 |
-
object[key] = null;
|
66 |
-
} catch (e) {
|
67 |
-
// no getter for object
|
68 |
-
}
|
69 |
-
try {
|
70 |
-
delete object[key];
|
71 |
-
} catch (e) {
|
72 |
-
// something got wrong
|
73 |
-
}
|
74 |
-
});
|
75 |
-
},
|
76 |
-
nextTick(callback, delay = 0) {
|
77 |
-
return setTimeout(callback, delay);
|
78 |
-
},
|
79 |
-
now() {
|
80 |
-
return Date.now();
|
81 |
-
},
|
82 |
-
getTranslate(el, axis = 'x') {
|
83 |
-
let matrix;
|
84 |
-
let curTransform;
|
85 |
-
let transformMatrix;
|
86 |
-
|
87 |
-
const curStyle = window.getComputedStyle(el, null);
|
88 |
-
|
89 |
-
if (window.WebKitCSSMatrix) {
|
90 |
-
curTransform = curStyle.transform || curStyle.webkitTransform;
|
91 |
-
if (curTransform.split(',').length > 6) {
|
92 |
-
curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', ');
|
93 |
-
}
|
94 |
-
// Some old versions of Webkit choke when 'none' is passed; pass
|
95 |
-
// empty string instead in this case
|
96 |
-
transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);
|
97 |
-
} else {
|
98 |
-
transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');
|
99 |
-
matrix = transformMatrix.toString().split(',');
|
100 |
-
}
|
101 |
-
|
102 |
-
if (axis === 'x') {
|
103 |
-
// Latest Chrome and webkits Fix
|
104 |
-
if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41;
|
105 |
-
// Crazy IE10 Matrix
|
106 |
-
else if (matrix.length === 16) curTransform = parseFloat(matrix[12]);
|
107 |
-
// Normal Browsers
|
108 |
-
else curTransform = parseFloat(matrix[4]);
|
109 |
-
}
|
110 |
-
if (axis === 'y') {
|
111 |
-
// Latest Chrome and webkits Fix
|
112 |
-
if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42;
|
113 |
-
// Crazy IE10 Matrix
|
114 |
-
else if (matrix.length === 16) curTransform = parseFloat(matrix[13]);
|
115 |
-
// Normal Browsers
|
116 |
-
else curTransform = parseFloat(matrix[5]);
|
117 |
-
}
|
118 |
-
return curTransform || 0;
|
119 |
-
},
|
120 |
-
parseUrlQuery(url) {
|
121 |
-
const query = {};
|
122 |
-
let urlToParse = url || window.location.href;
|
123 |
-
let i;
|
124 |
-
let params;
|
125 |
-
let param;
|
126 |
-
let length;
|
127 |
-
if (typeof urlToParse === 'string' && urlToParse.length) {
|
128 |
-
urlToParse = urlToParse.indexOf('?') > -1 ? urlToParse.replace(/\S*\?/, '') : '';
|
129 |
-
params = urlToParse.split('&').filter(paramsPart => paramsPart !== '');
|
130 |
-
length = params.length;
|
131 |
-
|
132 |
-
for (i = 0; i < length; i += 1) {
|
133 |
-
param = params[i].replace(/#\S+/g, '').split('=');
|
134 |
-
query[decodeURIComponent(param[0])] = typeof param[1] === 'undefined' ? undefined : decodeURIComponent(param[1]) || '';
|
135 |
-
}
|
136 |
-
}
|
137 |
-
return query;
|
138 |
-
},
|
139 |
-
isObject(o) {
|
140 |
-
return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object;
|
141 |
-
},
|
142 |
-
extend(...args) {
|
143 |
-
const to = Object(args[0]);
|
144 |
-
for (let i = 1; i < args.length; i += 1) {
|
145 |
-
const nextSource = args[i];
|
146 |
-
if (nextSource !== undefined && nextSource !== null) {
|
147 |
-
const keysArray = Object.keys(Object(nextSource));
|
148 |
-
for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {
|
149 |
-
const nextKey = keysArray[nextIndex];
|
150 |
-
const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
|
151 |
-
if (desc !== undefined && desc.enumerable) {
|
152 |
-
if (Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {
|
153 |
-
Utils.extend(to[nextKey], nextSource[nextKey]);
|
154 |
-
} else if (!Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {
|
155 |
-
to[nextKey] = {};
|
156 |
-
Utils.extend(to[nextKey], nextSource[nextKey]);
|
157 |
-
} else {
|
158 |
-
to[nextKey] = nextSource[nextKey];
|
159 |
-
}
|
160 |
-
}
|
161 |
-
}
|
162 |
-
}
|
163 |
-
}
|
164 |
-
return to;
|
165 |
-
},
|
166 |
-
};
|
167 |
-
|
168 |
-
const Support = (function Support() {
|
169 |
-
const testDiv = document.createElement('div');
|
170 |
-
return {
|
171 |
-
touch: (window.Modernizr && window.Modernizr.touch === true) || (function checkTouch() {
|
172 |
-
return !!((window.navigator.maxTouchPoints > 0) || ('ontouchstart' in window) || (window.DocumentTouch && document instanceof window.DocumentTouch));
|
173 |
-
}()),
|
174 |
-
|
175 |
-
pointerEvents: !!(window.navigator.pointerEnabled || window.PointerEvent || ('maxTouchPoints' in window.navigator)),
|
176 |
-
prefixedPointerEvents: !!window.navigator.msPointerEnabled,
|
177 |
-
|
178 |
-
transition: (function checkTransition() {
|
179 |
-
const style = testDiv.style;
|
180 |
-
return ('transition' in style || 'webkitTransition' in style || 'MozTransition' in style);
|
181 |
-
}()),
|
182 |
-
transforms3d: (window.Modernizr && window.Modernizr.csstransforms3d === true) || (function checkTransforms3d() {
|
183 |
-
const style = testDiv.style;
|
184 |
-
return ('webkitPerspective' in style || 'MozPerspective' in style || 'OPerspective' in style || 'MsPerspective' in style || 'perspective' in style);
|
185 |
-
}()),
|
186 |
-
|
187 |
-
flexbox: (function checkFlexbox() {
|
188 |
-
const style = testDiv.style;
|
189 |
-
const styles$$1 = ('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' ');
|
190 |
-
for (let i = 0; i < styles$$1.length; i += 1) {
|
191 |
-
if (styles$$1[i] in style) return true;
|
192 |
-
}
|
193 |
-
return false;
|
194 |
-
}()),
|
195 |
-
|
196 |
-
observer: (function checkObserver() {
|
197 |
-
return ('MutationObserver' in window || 'WebkitMutationObserver' in window);
|
198 |
-
}()),
|
199 |
-
|
200 |
-
passiveListener: (function checkPassiveListener() {
|
201 |
-
let supportsPassive = false;
|
202 |
-
try {
|
203 |
-
const opts = Object.defineProperty({}, 'passive', {
|
204 |
-
// eslint-disable-next-line
|
205 |
-
get() {
|
206 |
-
supportsPassive = true;
|
207 |
-
},
|
208 |
-
});
|
209 |
-
window.addEventListener('testPassiveListener', null, opts);
|
210 |
-
} catch (e) {
|
211 |
-
// No support
|
212 |
-
}
|
213 |
-
return supportsPassive;
|
214 |
-
}()),
|
215 |
-
|
216 |
-
gestures: (function checkGestures() {
|
217 |
-
return 'ongesturestart' in window;
|
218 |
-
}()),
|
219 |
-
};
|
220 |
-
}());
|
221 |
-
|
222 |
-
class SwiperClass {
|
223 |
-
constructor(params = {}) {
|
224 |
-
const self = this;
|
225 |
-
self.params = params;
|
226 |
-
|
227 |
-
// Events
|
228 |
-
self.eventsListeners = {};
|
229 |
-
|
230 |
-
if (self.params && self.params.on) {
|
231 |
-
Object.keys(self.params.on).forEach((eventName) => {
|
232 |
-
self.on(eventName, self.params.on[eventName]);
|
233 |
-
});
|
234 |
-
}
|
235 |
-
}
|
236 |
-
|
237 |
-
on(events, handler, priority) {
|
238 |
-
const self = this;
|
239 |
-
if (typeof handler !== 'function') return self;
|
240 |
-
const method = priority ? 'unshift' : 'push';
|
241 |
-
events.split(' ').forEach((event) => {
|
242 |
-
if (!self.eventsListeners[event]) self.eventsListeners[event] = [];
|
243 |
-
self.eventsListeners[event][method](handler);
|
244 |
-
});
|
245 |
-
return self;
|
246 |
-
}
|
247 |
-
|
248 |
-
once(events, handler, priority) {
|
249 |
-
const self = this;
|
250 |
-
if (typeof handler !== 'function') return self;
|
251 |
-
function onceHandler(...args) {
|
252 |
-
handler.apply(self, args);
|
253 |
-
self.off(events, onceHandler);
|
254 |
-
}
|
255 |
-
return self.on(events, onceHandler, priority);
|
256 |
-
}
|
257 |
-
|
258 |
-
off(events, handler) {
|
259 |
-
const self = this;
|
260 |
-
if (!self.eventsListeners) return self;
|
261 |
-
events.split(' ').forEach((event) => {
|
262 |
-
if (typeof handler === 'undefined') {
|
263 |
-
self.eventsListeners[event] = [];
|
264 |
-
} else if (self.eventsListeners[event] && self.eventsListeners[event].length) {
|
265 |
-
self.eventsListeners[event].forEach((eventHandler, index$$1) => {
|
266 |
-
if (eventHandler === handler) {
|
267 |
-
self.eventsListeners[event].splice(index$$1, 1);
|
268 |
-
}
|
269 |
-
});
|
270 |
-
}
|
271 |
-
});
|
272 |
-
return self;
|
273 |
-
}
|
274 |
-
|
275 |
-
emit(...args) {
|
276 |
-
const self = this;
|
277 |
-
if (!self.eventsListeners) return self;
|
278 |
-
let events;
|
279 |
-
let data$$1;
|
280 |
-
let context;
|
281 |
-
if (typeof args[0] === 'string' || Array.isArray(args[0])) {
|
282 |
-
events = args[0];
|
283 |
-
data$$1 = args.slice(1, args.length);
|
284 |
-
context = self;
|
285 |
-
} else {
|
286 |
-
events = args[0].events;
|
287 |
-
data$$1 = args[0].data;
|
288 |
-
context = args[0].context || self;
|
289 |
-
}
|
290 |
-
const eventsArray = Array.isArray(events) ? events : events.split(' ');
|
291 |
-
eventsArray.forEach((event) => {
|
292 |
-
if (self.eventsListeners && self.eventsListeners[event]) {
|
293 |
-
const handlers = [];
|
294 |
-
self.eventsListeners[event].forEach((eventHandler) => {
|
295 |
-
handlers.push(eventHandler);
|
296 |
-
});
|
297 |
-
handlers.forEach((eventHandler) => {
|
298 |
-
eventHandler.apply(context, data$$1);
|
299 |
-
});
|
300 |
-
}
|
301 |
-
});
|
302 |
-
return self;
|
303 |
-
}
|
304 |
-
|
305 |
-
useModulesParams(instanceParams) {
|
306 |
-
const instance = this;
|
307 |
-
if (!instance.modules) return;
|
308 |
-
Object.keys(instance.modules).forEach((moduleName) => {
|
309 |
-
const module = instance.modules[moduleName];
|
310 |
-
// Extend params
|
311 |
-
if (module.params) {
|
312 |
-
Utils.extend(instanceParams, module.params);
|
313 |
-
}
|
314 |
-
});
|
315 |
-
}
|
316 |
-
|
317 |
-
useModules(modulesParams = {}) {
|
318 |
-
const instance = this;
|
319 |
-
if (!instance.modules) return;
|
320 |
-
Object.keys(instance.modules).forEach((moduleName) => {
|
321 |
-
const module = instance.modules[moduleName];
|
322 |
-
const moduleParams = modulesParams[moduleName] || {};
|
323 |
-
// Extend instance methods and props
|
324 |
-
if (module.instance) {
|
325 |
-
Object.keys(module.instance).forEach((modulePropName) => {
|
326 |
-
const moduleProp = module.instance[modulePropName];
|
327 |
-
if (typeof moduleProp === 'function') {
|
328 |
-
instance[modulePropName] = moduleProp.bind(instance);
|
329 |
-
} else {
|
330 |
-
instance[modulePropName] = moduleProp;
|
331 |
-
}
|
332 |
-
});
|
333 |
-
}
|
334 |
-
// Add event listeners
|
335 |
-
if (module.on && instance.on) {
|
336 |
-
Object.keys(module.on).forEach((moduleEventName) => {
|
337 |
-
instance.on(moduleEventName, module.on[moduleEventName]);
|
338 |
-
});
|
339 |
-
}
|
340 |
-
|
341 |
-
// Module create callback
|
342 |
-
if (module.create) {
|
343 |
-
module.create.bind(instance)(moduleParams);
|
344 |
-
}
|
345 |
-
});
|
346 |
-
}
|
347 |
-
|
348 |
-
static set components(components) {
|
349 |
-
const Class = this;
|
350 |
-
if (!Class.use) return;
|
351 |
-
Class.use(components);
|
352 |
-
}
|
353 |
-
|
354 |
-
static installModule(module, ...params) {
|
355 |
-
const Class = this;
|
356 |
-
if (!Class.prototype.modules) Class.prototype.modules = {};
|
357 |
-
const name = module.name || (`${Object.keys(Class.prototype.modules).length}_${Utils.now()}`);
|
358 |
-
Class.prototype.modules[name] = module;
|
359 |
-
// Prototype
|
360 |
-
if (module.proto) {
|
361 |
-
Object.keys(module.proto).forEach((key) => {
|
362 |
-
Class.prototype[key] = module.proto[key];
|
363 |
-
});
|
364 |
-
}
|
365 |
-
// Class
|
366 |
-
if (module.static) {
|
367 |
-
Object.keys(module.static).forEach((key) => {
|
368 |
-
Class[key] = module.static[key];
|
369 |
-
});
|
370 |
-
}
|
371 |
-
// Callback
|
372 |
-
if (module.install) {
|
373 |
-
module.install.apply(Class, params);
|
374 |
-
}
|
375 |
-
return Class;
|
376 |
-
}
|
377 |
-
|
378 |
-
static use(module, ...params) {
|
379 |
-
const Class = this;
|
380 |
-
if (Array.isArray(module)) {
|
381 |
-
module.forEach(m => Class.installModule(m));
|
382 |
-
return Class;
|
383 |
-
}
|
384 |
-
return Class.installModule(module, ...params);
|
385 |
-
}
|
386 |
-
}
|
387 |
-
|
388 |
-
function updateSize () {
|
389 |
-
const swiper = this;
|
390 |
-
let width;
|
391 |
-
let height;
|
392 |
-
const $el = swiper.$el;
|
393 |
-
if (typeof swiper.params.width !== 'undefined') {
|
394 |
-
width = swiper.params.width;
|
395 |
-
} else {
|
396 |
-
width = $el[0].clientWidth;
|
397 |
-
}
|
398 |
-
if (typeof swiper.params.height !== 'undefined') {
|
399 |
-
height = swiper.params.height;
|
400 |
-
} else {
|
401 |
-
height = $el[0].clientHeight;
|
402 |
-
}
|
403 |
-
if ((width === 0 && swiper.isHorizontal()) || (height === 0 && swiper.isVertical())) {
|
404 |
-
return;
|
405 |
-
}
|
406 |
-
|
407 |
-
// Subtract paddings
|
408 |
-
width = width - parseInt($el.css('padding-left'), 10) - parseInt($el.css('padding-right'), 10);
|
409 |
-
height = height - parseInt($el.css('padding-top'), 10) - parseInt($el.css('padding-bottom'), 10);
|
410 |
-
|
411 |
-
Utils.extend(swiper, {
|
412 |
-
width,
|
413 |
-
height,
|
414 |
-
size: swiper.isHorizontal() ? width : height,
|
415 |
-
});
|
416 |
-
}
|
417 |
-
|
418 |
-
function updateSlides () {
|
419 |
-
const swiper = this;
|
420 |
-
const params = swiper.params;
|
421 |
-
|
422 |
-
const {
|
423 |
-
$wrapperEl, size: swiperSize, rtlTranslate: rtl, wrongRTL,
|
424 |
-
} = swiper;
|
425 |
-
const isVirtual = swiper.virtual && params.virtual.enabled;
|
426 |
-
const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;
|
427 |
-
const slides = $wrapperEl.children(`.${swiper.params.slideClass}`);
|
428 |
-
const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;
|
429 |
-
let snapGrid = [];
|
430 |
-
const slidesGrid = [];
|
431 |
-
const slidesSizesGrid = [];
|
432 |
-
|
433 |
-
let offsetBefore = params.slidesOffsetBefore;
|
434 |
-
if (typeof offsetBefore === 'function') {
|
435 |
-
offsetBefore = params.slidesOffsetBefore.call(swiper);
|
436 |
-
}
|
437 |
-
|
438 |
-
let offsetAfter = params.slidesOffsetAfter;
|
439 |
-
if (typeof offsetAfter === 'function') {
|
440 |
-
offsetAfter = params.slidesOffsetAfter.call(swiper);
|
441 |
-
}
|
442 |
-
|
443 |
-
const previousSnapGridLength = swiper.snapGrid.length;
|
444 |
-
const previousSlidesGridLength = swiper.snapGrid.length;
|
445 |
-
|
446 |
-
let spaceBetween = params.spaceBetween;
|
447 |
-
let slidePosition = -offsetBefore;
|
448 |
-
let prevSlideSize = 0;
|
449 |
-
let index$$1 = 0;
|
450 |
-
if (typeof swiperSize === 'undefined') {
|
451 |
-
return;
|
452 |
-
}
|
453 |
-
if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {
|
454 |
-
spaceBetween = (parseFloat(spaceBetween.replace('%', '')) / 100) * swiperSize;
|
455 |
-
}
|
456 |
-
|
457 |
-
swiper.virtualSize = -spaceBetween;
|
458 |
-
|
459 |
-
// reset margins
|
460 |
-
if (rtl) slides.css({ marginLeft: '', marginTop: '' });
|
461 |
-
else slides.css({ marginRight: '', marginBottom: '' });
|
462 |
-
|
463 |
-
let slidesNumberEvenToRows;
|
464 |
-
if (params.slidesPerColumn > 1) {
|
465 |
-
if (Math.floor(slidesLength / params.slidesPerColumn) === slidesLength / swiper.params.slidesPerColumn) {
|
466 |
-
slidesNumberEvenToRows = slidesLength;
|
467 |
-
} else {
|
468 |
-
slidesNumberEvenToRows = Math.ceil(slidesLength / params.slidesPerColumn) * params.slidesPerColumn;
|
469 |
-
}
|
470 |
-
if (params.slidesPerView !== 'auto' && params.slidesPerColumnFill === 'row') {
|
471 |
-
slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, params.slidesPerView * params.slidesPerColumn);
|
472 |
-
}
|
473 |
-
}
|
474 |
-
|
475 |
-
// Calc slides
|
476 |
-
let slideSize;
|
477 |
-
const slidesPerColumn = params.slidesPerColumn;
|
478 |
-
const slidesPerRow = slidesNumberEvenToRows / slidesPerColumn;
|
479 |
-
const numFullColumns = Math.floor(slidesLength / params.slidesPerColumn);
|
480 |
-
for (let i = 0; i < slidesLength; i += 1) {
|
481 |
-
slideSize = 0;
|
482 |
-
const slide = slides.eq(i);
|
483 |
-
if (params.slidesPerColumn > 1) {
|
484 |
-
// Set slides order
|
485 |
-
let newSlideOrderIndex;
|
486 |
-
let column;
|
487 |
-
let row;
|
488 |
-
if (params.slidesPerColumnFill === 'column') {
|
489 |
-
column = Math.floor(i / slidesPerColumn);
|
490 |
-
row = i - (column * slidesPerColumn);
|
491 |
-
if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn - 1)) {
|
492 |
-
row += 1;
|
493 |
-
if (row >= slidesPerColumn) {
|
494 |
-
row = 0;
|
495 |
-
column += 1;
|
496 |
-
}
|
497 |
-
}
|
498 |
-
newSlideOrderIndex = column + ((row * slidesNumberEvenToRows) / slidesPerColumn);
|
499 |
-
slide
|
500 |
-
.css({
|
501 |
-
'-webkit-box-ordinal-group': newSlideOrderIndex,
|
502 |
-
'-moz-box-ordinal-group': newSlideOrderIndex,
|
503 |
-
'-ms-flex-order': newSlideOrderIndex,
|
504 |
-
'-webkit-order': newSlideOrderIndex,
|
505 |
-
order: newSlideOrderIndex,
|
506 |
-
});
|
507 |
-
} else {
|
508 |
-
row = Math.floor(i / slidesPerRow);
|
509 |
-
column = i - (row * slidesPerRow);
|
510 |
-
}
|
511 |
-
slide
|
512 |
-
.css(
|
513 |
-
`margin-${swiper.isHorizontal() ? 'top' : 'left'}`,
|
514 |
-
(row !== 0 && params.spaceBetween) && (`${params.spaceBetween}px`)
|
515 |
-
)
|
516 |
-
.attr('data-swiper-column', column)
|
517 |
-
.attr('data-swiper-row', row);
|
518 |
-
}
|
519 |
-
if (slide.css('display') === 'none') continue; // eslint-disable-line
|
520 |
-
|
521 |
-
if (params.slidesPerView === 'auto') {
|
522 |
-
const slideStyles = window.getComputedStyle(slide[0], null);
|
523 |
-
const currentTransform = slide[0].style.transform;
|
524 |
-
const currentWebKitTransform = slide[0].style.webkitTransform;
|
525 |
-
if (currentTransform) {
|
526 |
-
slide[0].style.transform = 'none';
|
527 |
-
}
|
528 |
-
if (currentWebKitTransform) {
|
529 |
-
slide[0].style.webkitTransform = 'none';
|
530 |
-
}
|
531 |
-
if (params.roundLengths) {
|
532 |
-
slideSize = swiper.isHorizontal()
|
533 |
-
? slide.outerWidth(true)
|
534 |
-
: slide.outerHeight(true);
|
535 |
-
} else {
|
536 |
-
// eslint-disable-next-line
|
537 |
-
if (swiper.isHorizontal()) {
|
538 |
-
const width = parseFloat(slideStyles.getPropertyValue('width'));
|
539 |
-
const paddingLeft = parseFloat(slideStyles.getPropertyValue('padding-left'));
|
540 |
-
const paddingRight = parseFloat(slideStyles.getPropertyValue('padding-right'));
|
541 |
-
const marginLeft = parseFloat(slideStyles.getPropertyValue('margin-left'));
|
542 |
-
const marginRight = parseFloat(slideStyles.getPropertyValue('margin-right'));
|
543 |
-
const boxSizing = slideStyles.getPropertyValue('box-sizing');
|
544 |
-
if (boxSizing && boxSizing === 'border-box') {
|
545 |
-
slideSize = width + marginLeft + marginRight;
|
546 |
-
} else {
|
547 |
-
slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight;
|
548 |
-
}
|
549 |
-
} else {
|
550 |
-
const height = parseFloat(slideStyles.getPropertyValue('height'));
|
551 |
-
const paddingTop = parseFloat(slideStyles.getPropertyValue('padding-top'));
|
552 |
-
const paddingBottom = parseFloat(slideStyles.getPropertyValue('padding-bottom'));
|
553 |
-
const marginTop = parseFloat(slideStyles.getPropertyValue('margin-top'));
|
554 |
-
const marginBottom = parseFloat(slideStyles.getPropertyValue('margin-bottom'));
|
555 |
-
const boxSizing = slideStyles.getPropertyValue('box-sizing');
|
556 |
-
if (boxSizing && boxSizing === 'border-box') {
|
557 |
-
slideSize = height + marginTop + marginBottom;
|
558 |
-
} else {
|
559 |
-
slideSize = height + paddingTop + paddingBottom + marginTop + marginBottom;
|
560 |
-
}
|
561 |
-
}
|
562 |
-
}
|
563 |
-
if (currentTransform) {
|
564 |
-
slide[0].style.transform = currentTransform;
|
565 |
-
}
|
566 |
-
if (currentWebKitTransform) {
|
567 |
-
slide[0].style.webkitTransform = currentWebKitTransform;
|
568 |
-
}
|
569 |
-
if (params.roundLengths) slideSize = Math.floor(slideSize);
|
570 |
-
} else {
|
571 |
-
slideSize = (swiperSize - ((params.slidesPerView - 1) * spaceBetween)) / params.slidesPerView;
|
572 |
-
if (params.roundLengths) slideSize = Math.floor(slideSize);
|
573 |
-
|
574 |
-
if (slides[i]) {
|
575 |
-
if (swiper.isHorizontal()) {
|
576 |
-
slides[i].style.width = `${slideSize}px`;
|
577 |
-
} else {
|
578 |
-
slides[i].style.height = `${slideSize}px`;
|
579 |
-
}
|
580 |
-
}
|
581 |
-
}
|
582 |
-
if (slides[i]) {
|
583 |
-
slides[i].swiperSlideSize = slideSize;
|
584 |
-
}
|
585 |
-
slidesSizesGrid.push(slideSize);
|
586 |
-
|
587 |
-
|
588 |
-
if (params.centeredSlides) {
|
589 |
-
slidePosition = slidePosition + (slideSize / 2) + (prevSlideSize / 2) + spaceBetween;
|
590 |
-
if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - (swiperSize / 2) - spaceBetween;
|
591 |
-
if (i === 0) slidePosition = slidePosition - (swiperSize / 2) - spaceBetween;
|
592 |
-
if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;
|
593 |
-
if (params.roundLengths) slidePosition = Math.floor(slidePosition);
|
594 |
-
if ((index$$1) % params.slidesPerGroup === 0) snapGrid.push(slidePosition);
|
595 |
-
slidesGrid.push(slidePosition);
|
596 |
-
} else {
|
597 |
-
if (params.roundLengths) slidePosition = Math.floor(slidePosition);
|
598 |
-
if ((index$$1) % params.slidesPerGroup === 0) snapGrid.push(slidePosition);
|
599 |
-
slidesGrid.push(slidePosition);
|
600 |
-
slidePosition = slidePosition + slideSize + spaceBetween;
|
601 |
-
}
|
602 |
-
|
603 |
-
swiper.virtualSize += slideSize + spaceBetween;
|
604 |
-
|
605 |
-
prevSlideSize = slideSize;
|
606 |
-
|
607 |
-
index$$1 += 1;
|
608 |
-
}
|
609 |
-
swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;
|
610 |
-
let newSlidesGrid;
|
611 |
-
|
612 |
-
if (
|
613 |
-
rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {
|
614 |
-
$wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });
|
615 |
-
}
|
616 |
-
if (!Support.flexbox || params.setWrapperSize) {
|
617 |
-
if (swiper.isHorizontal()) $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });
|
618 |
-
else $wrapperEl.css({ height: `${swiper.virtualSize + params.spaceBetween}px` });
|
619 |
-
}
|
620 |
-
|
621 |
-
if (params.slidesPerColumn > 1) {
|
622 |
-
swiper.virtualSize = (slideSize + params.spaceBetween) * slidesNumberEvenToRows;
|
623 |
-
swiper.virtualSize = Math.ceil(swiper.virtualSize / params.slidesPerColumn) - params.spaceBetween;
|
624 |
-
if (swiper.isHorizontal()) $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });
|
625 |
-
else $wrapperEl.css({ height: `${swiper.virtualSize + params.spaceBetween}px` });
|
626 |
-
if (params.centeredSlides) {
|
627 |
-
newSlidesGrid = [];
|
628 |
-
for (let i = 0; i < snapGrid.length; i += 1) {
|
629 |
-
let slidesGridItem = snapGrid[i];
|
630 |
-
if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);
|
631 |
-
if (snapGrid[i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem);
|
632 |
-
}
|
633 |
-
snapGrid = newSlidesGrid;
|
634 |
-
}
|
635 |
-
}
|
636 |
-
|
637 |
-
// Remove last grid elements depending on width
|
638 |
-
if (!params.centeredSlides) {
|
639 |
-
newSlidesGrid = [];
|
640 |
-
for (let i = 0; i < snapGrid.length; i += 1) {
|
641 |
-
let slidesGridItem = snapGrid[i];
|
642 |
-
if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);
|
643 |
-
if (snapGrid[i] <= swiper.virtualSize - swiperSize) {
|
644 |
-
newSlidesGrid.push(slidesGridItem);
|
645 |
-
}
|
646 |
-
}
|
647 |
-
snapGrid = newSlidesGrid;
|
648 |
-
if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {
|
649 |
-
snapGrid.push(swiper.virtualSize - swiperSize);
|
650 |
-
}
|
651 |
-
}
|
652 |
-
if (snapGrid.length === 0) snapGrid = [0];
|
653 |
-
|
654 |
-
if (params.spaceBetween !== 0) {
|
655 |
-
if (swiper.isHorizontal()) {
|
656 |
-
if (rtl) slides.css({ marginLeft: `${spaceBetween}px` });
|
657 |
-
else slides.css({ marginRight: `${spaceBetween}px` });
|
658 |
-
} else slides.css({ marginBottom: `${spaceBetween}px` });
|
659 |
-
}
|
660 |
-
|
661 |
-
if (params.centerInsufficientSlides) {
|
662 |
-
let allSlidesSize = 0;
|
663 |
-
slidesSizesGrid.forEach((slideSizeValue) => {
|
664 |
-
allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);
|
665 |
-
});
|
666 |
-
allSlidesSize -= params.spaceBetween;
|
667 |
-
if (allSlidesSize < swiperSize) {
|
668 |
-
const allSlidesOffset = (swiperSize - allSlidesSize) / 2;
|
669 |
-
snapGrid.forEach((snap, snapIndex) => {
|
670 |
-
snapGrid[snapIndex] = snap - allSlidesOffset;
|
671 |
-
});
|
672 |
-
slidesGrid.forEach((snap, snapIndex) => {
|
673 |
-
slidesGrid[snapIndex] = snap + allSlidesOffset;
|
674 |
-
});
|
675 |
-
}
|
676 |
-
}
|
677 |
-
|
678 |
-
Utils.extend(swiper, {
|
679 |
-
slides,
|
680 |
-
snapGrid,
|
681 |
-
slidesGrid,
|
682 |
-
slidesSizesGrid,
|
683 |
-
});
|
684 |
-
|
685 |
-
if (slidesLength !== previousSlidesLength) {
|
686 |
-
swiper.emit('slidesLengthChange');
|
687 |
-
}
|
688 |
-
if (snapGrid.length !== previousSnapGridLength) {
|
689 |
-
if (swiper.params.watchOverflow) swiper.checkOverflow();
|
690 |
-
swiper.emit('snapGridLengthChange');
|
691 |
-
}
|
692 |
-
if (slidesGrid.length !== previousSlidesGridLength) {
|
693 |
-
swiper.emit('slidesGridLengthChange');
|
694 |
-
}
|
695 |
-
|
696 |
-
if (params.watchSlidesProgress || params.watchSlidesVisibility) {
|
697 |
-
swiper.updateSlidesOffset();
|
698 |
-
}
|
699 |
-
}
|
700 |
-
|
701 |
-
function updateAutoHeight (speed) {
|
702 |
-
const swiper = this;
|
703 |
-
const activeSlides = [];
|
704 |
-
let newHeight = 0;
|
705 |
-
let i;
|
706 |
-
if (typeof speed === 'number') {
|
707 |
-
swiper.setTransition(speed);
|
708 |
-
} else if (speed === true) {
|
709 |
-
swiper.setTransition(swiper.params.speed);
|
710 |
-
}
|
711 |
-
// Find slides currently in view
|
712 |
-
if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {
|
713 |
-
for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {
|
714 |
-
const index$$1 = swiper.activeIndex + i;
|
715 |
-
if (index$$1 > swiper.slides.length) break;
|
716 |
-
activeSlides.push(swiper.slides.eq(index$$1)[0]);
|
717 |
-
}
|
718 |
-
} else {
|
719 |
-
activeSlides.push(swiper.slides.eq(swiper.activeIndex)[0]);
|
720 |
-
}
|
721 |
-
|
722 |
-
// Find new height from highest slide in view
|
723 |
-
for (i = 0; i < activeSlides.length; i += 1) {
|
724 |
-
if (typeof activeSlides[i] !== 'undefined') {
|
725 |
-
const height = activeSlides[i].offsetHeight;
|
726 |
-
newHeight = height > newHeight ? height : newHeight;
|
727 |
-
}
|
728 |
-
}
|
729 |
-
|
730 |
-
// Update Height
|
731 |
-
if (newHeight) swiper.$wrapperEl.css('height', `${newHeight}px`);
|
732 |
-
}
|
733 |
-
|
734 |
-
function updateSlidesOffset () {
|
735 |
-
const swiper = this;
|
736 |
-
const slides = swiper.slides;
|
737 |
-
for (let i = 0; i < slides.length; i += 1) {
|
738 |
-
slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop;
|
739 |
-
}
|
740 |
-
}
|
741 |
-
|
742 |
-
function updateSlidesProgress (translate = (this && this.translate) || 0) {
|
743 |
-
const swiper = this;
|
744 |
-
const params = swiper.params;
|
745 |
-
|
746 |
-
const { slides, rtlTranslate: rtl } = swiper;
|
747 |
-
|
748 |
-
if (slides.length === 0) return;
|
749 |
-
if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();
|
750 |
-
|
751 |
-
let offsetCenter = -translate;
|
752 |
-
if (rtl) offsetCenter = translate;
|
753 |
-
|
754 |
-
// Visible Slides
|
755 |
-
slides.removeClass(params.slideVisibleClass);
|
756 |
-
|
757 |
-
swiper.visibleSlidesIndexes = [];
|
758 |
-
swiper.visibleSlides = [];
|
759 |
-
|
760 |
-
for (let i = 0; i < slides.length; i += 1) {
|
761 |
-
const slide = slides[i];
|
762 |
-
const slideProgress = (
|
763 |
-
(offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0)) - slide.swiperSlideOffset
|
764 |
-
) / (slide.swiperSlideSize + params.spaceBetween);
|
765 |
-
if (params.watchSlidesVisibility) {
|
766 |
-
const slideBefore = -(offsetCenter - slide.swiperSlideOffset);
|
767 |
-
const slideAfter = slideBefore + swiper.slidesSizesGrid[i];
|
768 |
-
const isVisible = (slideBefore >= 0 && slideBefore < swiper.size)
|
769 |
-
|| (slideAfter > 0 && slideAfter <= swiper.size)
|
770 |
-
|| (slideBefore <= 0 && slideAfter >= swiper.size);
|
771 |
-
if (isVisible) {
|
772 |
-
swiper.visibleSlides.push(slide);
|
773 |
-
swiper.visibleSlidesIndexes.push(i);
|
774 |
-
slides.eq(i).addClass(params.slideVisibleClass);
|
775 |
-
}
|
776 |
-
}
|
777 |
-
slide.progress = rtl ? -slideProgress : slideProgress;
|
778 |
-
}
|
779 |
-
swiper.visibleSlides = $(swiper.visibleSlides);
|
780 |
-
}
|
781 |
-
|
782 |
-
function updateProgress (translate = (this && this.translate) || 0) {
|
783 |
-
const swiper = this;
|
784 |
-
const params = swiper.params;
|
785 |
-
|
786 |
-
const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
|
787 |
-
let { progress, isBeginning, isEnd } = swiper;
|
788 |
-
const wasBeginning = isBeginning;
|
789 |
-
const wasEnd = isEnd;
|
790 |
-
if (translatesDiff === 0) {
|
791 |
-
progress = 0;
|
792 |
-
isBeginning = true;
|
793 |
-
isEnd = true;
|
794 |
-
} else {
|
795 |
-
progress = (translate - swiper.minTranslate()) / (translatesDiff);
|
796 |
-
isBeginning = progress <= 0;
|
797 |
-
isEnd = progress >= 1;
|
798 |
-
}
|
799 |
-
Utils.extend(swiper, {
|
800 |
-
progress,
|
801 |
-
isBeginning,
|
802 |
-
isEnd,
|
803 |
-
});
|
804 |
-
|
805 |
-
if (params.watchSlidesProgress || params.watchSlidesVisibility) swiper.updateSlidesProgress(translate);
|
806 |
-
|
807 |
-
if (isBeginning && !wasBeginning) {
|
808 |
-
swiper.emit('reachBeginning toEdge');
|
809 |
-
}
|
810 |
-
if (isEnd && !wasEnd) {
|
811 |
-
swiper.emit('reachEnd toEdge');
|
812 |
-
}
|
813 |
-
if ((wasBeginning && !isBeginning) || (wasEnd && !isEnd)) {
|
814 |
-
swiper.emit('fromEdge');
|
815 |
-
}
|
816 |
-
|
817 |
-
swiper.emit('progress', progress);
|
818 |
-
}
|
819 |
-
|
820 |
-
function updateSlidesClasses () {
|
821 |
-
const swiper = this;
|
822 |
-
|
823 |
-
const {
|
824 |
-
slides, params, $wrapperEl, activeIndex, realIndex,
|
825 |
-
} = swiper;
|
826 |
-
const isVirtual = swiper.virtual && params.virtual.enabled;
|
827 |
-
|
828 |
-
slides.removeClass(`${params.slideActiveClass} ${params.slideNextClass} ${params.slidePrevClass} ${params.slideDuplicateActiveClass} ${params.slideDuplicateNextClass} ${params.slideDuplicatePrevClass}`);
|
829 |
-
|
830 |
-
let activeSlide;
|
831 |
-
if (isVirtual) {
|
832 |
-
activeSlide = swiper.$wrapperEl.find(`.${params.slideClass}[data-swiper-slide-index="${activeIndex}"]`);
|
833 |
-
} else {
|
834 |
-
activeSlide = slides.eq(activeIndex);
|
835 |
-
}
|
836 |
-
|
837 |
-
// Active classes
|
838 |
-
activeSlide.addClass(params.slideActiveClass);
|
839 |
-
|
840 |
-
if (params.loop) {
|
841 |
-
// Duplicate to all looped slides
|
842 |
-
if (activeSlide.hasClass(params.slideDuplicateClass)) {
|
843 |
-
$wrapperEl
|
844 |
-
.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${realIndex}"]`)
|
845 |
-
.addClass(params.slideDuplicateActiveClass);
|
846 |
-
} else {
|
847 |
-
$wrapperEl
|
848 |
-
.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${realIndex}"]`)
|
849 |
-
.addClass(params.slideDuplicateActiveClass);
|
850 |
-
}
|
851 |
-
}
|
852 |
-
// Next Slide
|
853 |
-
let nextSlide = activeSlide.nextAll(`.${params.slideClass}`).eq(0).addClass(params.slideNextClass);
|
854 |
-
if (params.loop && nextSlide.length === 0) {
|
855 |
-
nextSlide = slides.eq(0);
|
856 |
-
nextSlide.addClass(params.slideNextClass);
|
857 |
-
}
|
858 |
-
// Prev Slide
|
859 |
-
let prevSlide = activeSlide.prevAll(`.${params.slideClass}`).eq(0).addClass(params.slidePrevClass);
|
860 |
-
if (params.loop && prevSlide.length === 0) {
|
861 |
-
prevSlide = slides.eq(-1);
|
862 |
-
prevSlide.addClass(params.slidePrevClass);
|
863 |
-
}
|
864 |
-
if (params.loop) {
|
865 |
-
// Duplicate to all looped slides
|
866 |
-
if (nextSlide.hasClass(params.slideDuplicateClass)) {
|
867 |
-
$wrapperEl
|
868 |
-
.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`)
|
869 |
-
.addClass(params.slideDuplicateNextClass);
|
870 |
-
} else {
|
871 |
-
$wrapperEl
|
872 |
-
.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`)
|
873 |
-
.addClass(params.slideDuplicateNextClass);
|
874 |
-
}
|
875 |
-
if (prevSlide.hasClass(params.slideDuplicateClass)) {
|
876 |
-
$wrapperEl
|
877 |
-
.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`)
|
878 |
-
.addClass(params.slideDuplicatePrevClass);
|
879 |
-
} else {
|
880 |
-
$wrapperEl
|
881 |
-
.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`)
|
882 |
-
.addClass(params.slideDuplicatePrevClass);
|
883 |
-
}
|
884 |
-
}
|
885 |
-
}
|
886 |
-
|
887 |
-
function updateActiveIndex (newActiveIndex) {
|
888 |
-
const swiper = this;
|
889 |
-
const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
|
890 |
-
const {
|
891 |
-
slidesGrid, snapGrid, params, activeIndex: previousIndex, realIndex: previousRealIndex, snapIndex: previousSnapIndex,
|
892 |
-
} = swiper;
|
893 |
-
let activeIndex = newActiveIndex;
|
894 |
-
let snapIndex;
|
895 |
-
if (typeof activeIndex === 'undefined') {
|
896 |
-
for (let i = 0; i < slidesGrid.length; i += 1) {
|
897 |
-
if (typeof slidesGrid[i + 1] !== 'undefined') {
|
898 |
-
if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - ((slidesGrid[i + 1] - slidesGrid[i]) / 2)) {
|
899 |
-
activeIndex = i;
|
900 |
-
} else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {
|
901 |
-
activeIndex = i + 1;
|
902 |
-
}
|
903 |
-
} else if (translate >= slidesGrid[i]) {
|
904 |
-
activeIndex = i;
|
905 |
-
}
|
906 |
-
}
|
907 |
-
// Normalize slideIndex
|
908 |
-
if (params.normalizeSlideIndex) {
|
909 |
-
if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;
|
910 |
-
}
|
911 |
-
}
|
912 |
-
if (snapGrid.indexOf(translate) >= 0) {
|
913 |
-
snapIndex = snapGrid.indexOf(translate);
|
914 |
-
} else {
|
915 |
-
snapIndex = Math.floor(activeIndex / params.slidesPerGroup);
|
916 |
-
}
|
917 |
-
if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
|
918 |
-
if (activeIndex === previousIndex) {
|
919 |
-
if (snapIndex !== previousSnapIndex) {
|
920 |
-
swiper.snapIndex = snapIndex;
|
921 |
-
swiper.emit('snapIndexChange');
|
922 |
-
}
|
923 |
-
return;
|
924 |
-
}
|
925 |
-
|
926 |
-
// Get real index
|
927 |
-
const realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10);
|
928 |
-
|
929 |
-
Utils.extend(swiper, {
|
930 |
-
snapIndex,
|
931 |
-
realIndex,
|
932 |
-
previousIndex,
|
933 |
-
activeIndex,
|
934 |
-
});
|
935 |
-
swiper.emit('activeIndexChange');
|
936 |
-
swiper.emit('snapIndexChange');
|
937 |
-
if (previousRealIndex !== realIndex) {
|
938 |
-
swiper.emit('realIndexChange');
|
939 |
-
}
|
940 |
-
swiper.emit('slideChange');
|
941 |
-
}
|
942 |
-
|
943 |
-
function updateClickedSlide (e) {
|
944 |
-
const swiper = this;
|
945 |
-
const params = swiper.params;
|
946 |
-
const slide = $(e.target).closest(`.${params.slideClass}`)[0];
|
947 |
-
let slideFound = false;
|
948 |
-
if (slide) {
|
949 |
-
for (let i = 0; i < swiper.slides.length; i += 1) {
|
950 |
-
if (swiper.slides[i] === slide) slideFound = true;
|
951 |
-
}
|
952 |
-
}
|
953 |
-
|
954 |
-
if (slide && slideFound) {
|
955 |
-
swiper.clickedSlide = slide;
|
956 |
-
if (swiper.virtual && swiper.params.virtual.enabled) {
|
957 |
-
swiper.clickedIndex = parseInt($(slide).attr('data-swiper-slide-index'), 10);
|
958 |
-
} else {
|
959 |
-
swiper.clickedIndex = $(slide).index();
|
960 |
-
}
|
961 |
-
} else {
|
962 |
-
swiper.clickedSlide = undefined;
|
963 |
-
swiper.clickedIndex = undefined;
|
964 |
-
return;
|
965 |
-
}
|
966 |
-
if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {
|
967 |
-
swiper.slideToClickedSlide();
|
968 |
-
}
|
969 |
-
}
|
970 |
-
|
971 |
-
var update = {
|
972 |
-
updateSize,
|
973 |
-
updateSlides,
|
974 |
-
updateAutoHeight,
|
975 |
-
updateSlidesOffset,
|
976 |
-
updateSlidesProgress,
|
977 |
-
updateProgress,
|
978 |
-
updateSlidesClasses,
|
979 |
-
updateActiveIndex,
|
980 |
-
updateClickedSlide,
|
981 |
-
};
|
982 |
-
|
983 |
-
function getTranslate (axis = this.isHorizontal() ? 'x' : 'y') {
|
984 |
-
const swiper = this;
|
985 |
-
|
986 |
-
const {
|
987 |
-
params, rtlTranslate: rtl, translate, $wrapperEl,
|
988 |
-
} = swiper;
|
989 |
-
|
990 |
-
if (params.virtualTranslate) {
|
991 |
-
return rtl ? -translate : translate;
|
992 |
-
}
|
993 |
-
|
994 |
-
let currentTranslate = Utils.getTranslate($wrapperEl[0], axis);
|
995 |
-
if (rtl) currentTranslate = -currentTranslate;
|
996 |
-
|
997 |
-
return currentTranslate || 0;
|
998 |
-
}
|
999 |
-
|
1000 |
-
function setTranslate (translate, byController) {
|
1001 |
-
const swiper = this;
|
1002 |
-
const {
|
1003 |
-
rtlTranslate: rtl, params, $wrapperEl, progress,
|
1004 |
-
} = swiper;
|
1005 |
-
let x = 0;
|
1006 |
-
let y = 0;
|
1007 |
-
const z = 0;
|
1008 |
-
|
1009 |
-
if (swiper.isHorizontal()) {
|
1010 |
-
x = rtl ? -translate : translate;
|
1011 |
-
} else {
|
1012 |
-
y = translate;
|
1013 |
-
}
|
1014 |
-
|
1015 |
-
if (params.roundLengths) {
|
1016 |
-
x = Math.floor(x);
|
1017 |
-
y = Math.floor(y);
|
1018 |
-
}
|
1019 |
-
|
1020 |
-
if (!params.virtualTranslate) {
|
1021 |
-
if (Support.transforms3d) $wrapperEl.transform(`translate3d(${x}px, ${y}px, ${z}px)`);
|
1022 |
-
else $wrapperEl.transform(`translate(${x}px, ${y}px)`);
|
1023 |
-
}
|
1024 |
-
swiper.previousTranslate = swiper.translate;
|
1025 |
-
swiper.translate = swiper.isHorizontal() ? x : y;
|
1026 |
-
|
1027 |
-
// Check if we need to update progress
|
1028 |
-
let newProgress;
|
1029 |
-
const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
|
1030 |
-
if (translatesDiff === 0) {
|
1031 |
-
newProgress = 0;
|
1032 |
-
} else {
|
1033 |
-
newProgress = (translate - swiper.minTranslate()) / (translatesDiff);
|
1034 |
-
}
|
1035 |
-
if (newProgress !== progress) {
|
1036 |
-
swiper.updateProgress(translate);
|
1037 |
-
}
|
1038 |
-
|
1039 |
-
swiper.emit('setTranslate', swiper.translate, byController);
|
1040 |
-
}
|
1041 |
-
|
1042 |
-
function minTranslate () {
|
1043 |
-
return (-this.snapGrid[0]);
|
1044 |
-
}
|
1045 |
-
|
1046 |
-
function maxTranslate () {
|
1047 |
-
return (-this.snapGrid[this.snapGrid.length - 1]);
|
1048 |
-
}
|
1049 |
-
|
1050 |
-
var translate = {
|
1051 |
-
getTranslate,
|
1052 |
-
setTranslate,
|
1053 |
-
minTranslate,
|
1054 |
-
maxTranslate,
|
1055 |
-
};
|
1056 |
-
|
1057 |
-
function setTransition (duration, byController) {
|
1058 |
-
const swiper = this;
|
1059 |
-
|
1060 |
-
swiper.$wrapperEl.transition(duration);
|
1061 |
-
|
1062 |
-
swiper.emit('setTransition', duration, byController);
|
1063 |
-
}
|
1064 |
-
|
1065 |
-
function transitionStart (runCallbacks = true, direction) {
|
1066 |
-
const swiper = this;
|
1067 |
-
const { activeIndex, params, previousIndex } = swiper;
|
1068 |
-
if (params.autoHeight) {
|
1069 |
-
swiper.updateAutoHeight();
|
1070 |
-
}
|
1071 |
-
|
1072 |
-
let dir = direction;
|
1073 |
-
if (!dir) {
|
1074 |
-
if (activeIndex > previousIndex) dir = 'next';
|
1075 |
-
else if (activeIndex < previousIndex) dir = 'prev';
|
1076 |
-
else dir = 'reset';
|
1077 |
-
}
|
1078 |
-
|
1079 |
-
swiper.emit('transitionStart');
|
1080 |
-
|
1081 |
-
if (runCallbacks && activeIndex !== previousIndex) {
|
1082 |
-
if (dir === 'reset') {
|
1083 |
-
swiper.emit('slideResetTransitionStart');
|
1084 |
-
return;
|
1085 |
-
}
|
1086 |
-
swiper.emit('slideChangeTransitionStart');
|
1087 |
-
if (dir === 'next') {
|
1088 |
-
swiper.emit('slideNextTransitionStart');
|
1089 |
-
} else {
|
1090 |
-
swiper.emit('slidePrevTransitionStart');
|
1091 |
-
}
|
1092 |
-
}
|
1093 |
-
}
|
1094 |
-
|
1095 |
-
function transitionEnd$1 (runCallbacks = true, direction) {
|
1096 |
-
const swiper = this;
|
1097 |
-
const { activeIndex, previousIndex } = swiper;
|
1098 |
-
swiper.animating = false;
|
1099 |
-
swiper.setTransition(0);
|
1100 |
-
|
1101 |
-
let dir = direction;
|
1102 |
-
if (!dir) {
|
1103 |
-
if (activeIndex > previousIndex) dir = 'next';
|
1104 |
-
else if (activeIndex < previousIndex) dir = 'prev';
|
1105 |
-
else dir = 'reset';
|
1106 |
-
}
|
1107 |
-
|
1108 |
-
swiper.emit('transitionEnd');
|
1109 |
-
|
1110 |
-
if (runCallbacks && activeIndex !== previousIndex) {
|
1111 |
-
if (dir === 'reset') {
|
1112 |
-
swiper.emit('slideResetTransitionEnd');
|
1113 |
-
return;
|
1114 |
-
}
|
1115 |
-
swiper.emit('slideChangeTransitionEnd');
|
1116 |
-
if (dir === 'next') {
|
1117 |
-
swiper.emit('slideNextTransitionEnd');
|
1118 |
-
} else {
|
1119 |
-
swiper.emit('slidePrevTransitionEnd');
|
1120 |
-
}
|
1121 |
-
}
|
1122 |
-
}
|
1123 |
-
|
1124 |
-
var transition$1 = {
|
1125 |
-
setTransition,
|
1126 |
-
transitionStart,
|
1127 |
-
transitionEnd: transitionEnd$1,
|
1128 |
-
};
|
1129 |
-
|
1130 |
-
function slideTo (index$$1 = 0, speed = this.params.speed, runCallbacks = true, internal) {
|
1131 |
-
const swiper = this;
|
1132 |
-
let slideIndex = index$$1;
|
1133 |
-
if (slideIndex < 0) slideIndex = 0;
|
1134 |
-
|
1135 |
-
const {
|
1136 |
-
params, snapGrid, slidesGrid, previousIndex, activeIndex, rtlTranslate: rtl,
|
1137 |
-
} = swiper;
|
1138 |
-
if (swiper.animating && params.preventInteractionOnTransition) {
|
1139 |
-
return false;
|
1140 |
-
}
|
1141 |
-
|
1142 |
-
let snapIndex = Math.floor(slideIndex / params.slidesPerGroup);
|
1143 |
-
if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
|
1144 |
-
|
1145 |
-
if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) {
|
1146 |
-
swiper.emit('beforeSlideChangeStart');
|
1147 |
-
}
|
1148 |
-
|
1149 |
-
const translate = -snapGrid[snapIndex];
|
1150 |
-
|
1151 |
-
// Update progress
|
1152 |
-
swiper.updateProgress(translate);
|
1153 |
-
|
1154 |
-
// Normalize slideIndex
|
1155 |
-
if (params.normalizeSlideIndex) {
|
1156 |
-
for (let i = 0; i < slidesGrid.length; i += 1) {
|
1157 |
-
if (-Math.floor(translate * 100) >= Math.floor(slidesGrid[i] * 100)) {
|
1158 |
-
slideIndex = i;
|
1159 |
-
}
|
1160 |
-
}
|
1161 |
-
}
|
1162 |
-
// Directions locks
|
1163 |
-
if (swiper.initialized && slideIndex !== activeIndex) {
|
1164 |
-
if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) {
|
1165 |
-
return false;
|
1166 |
-
}
|
1167 |
-
if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {
|
1168 |
-
if ((activeIndex || 0) !== slideIndex) return false;
|
1169 |
-
}
|
1170 |
-
}
|
1171 |
-
|
1172 |
-
let direction;
|
1173 |
-
if (slideIndex > activeIndex) direction = 'next';
|
1174 |
-
else if (slideIndex < activeIndex) direction = 'prev';
|
1175 |
-
else direction = 'reset';
|
1176 |
-
|
1177 |
-
|
1178 |
-
// Update Index
|
1179 |
-
if ((rtl && -translate === swiper.translate) || (!rtl && translate === swiper.translate)) {
|
1180 |
-
swiper.updateActiveIndex(slideIndex);
|
1181 |
-
// Update Height
|
1182 |
-
if (params.autoHeight) {
|
1183 |
-
swiper.updateAutoHeight();
|
1184 |
-
}
|
1185 |
-
swiper.updateSlidesClasses();
|
1186 |
-
if (params.effect !== 'slide') {
|
1187 |
-
swiper.setTranslate(translate);
|
1188 |
-
}
|
1189 |
-
if (direction !== 'reset') {
|
1190 |
-
swiper.transitionStart(runCallbacks, direction);
|
1191 |
-
swiper.transitionEnd(runCallbacks, direction);
|
1192 |
-
}
|
1193 |
-
return false;
|
1194 |
-
}
|
1195 |
-
|
1196 |
-
if (speed === 0 || !Support.transition) {
|
1197 |
-
swiper.setTransition(0);
|
1198 |
-
swiper.setTranslate(translate);
|
1199 |
-
swiper.updateActiveIndex(slideIndex);
|
1200 |
-
swiper.updateSlidesClasses();
|
1201 |
-
swiper.emit('beforeTransitionStart', speed, internal);
|
1202 |
-
swiper.transitionStart(runCallbacks, direction);
|
1203 |
-
swiper.transitionEnd(runCallbacks, direction);
|
1204 |
-
} else {
|
1205 |
-
swiper.setTransition(speed);
|
1206 |
-
swiper.setTranslate(translate);
|
1207 |
-
swiper.updateActiveIndex(slideIndex);
|
1208 |
-
swiper.updateSlidesClasses();
|
1209 |
-
swiper.emit('beforeTransitionStart', speed, internal);
|
1210 |
-
swiper.transitionStart(runCallbacks, direction);
|
1211 |
-
if (!swiper.animating) {
|
1212 |
-
swiper.animating = true;
|
1213 |
-
if (!swiper.onSlideToWrapperTransitionEnd) {
|
1214 |
-
swiper.onSlideToWrapperTransitionEnd = function transitionEnd$$1(e) {
|
1215 |
-
if (!swiper || swiper.destroyed) return;
|
1216 |
-
if (e.target !== this) return;
|
1217 |
-
swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
1218 |
-
swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
|
1219 |
-
swiper.onSlideToWrapperTransitionEnd = null;
|
1220 |
-
delete swiper.onSlideToWrapperTransitionEnd;
|
1221 |
-
swiper.transitionEnd(runCallbacks, direction);
|
1222 |
-
};
|
1223 |
-
}
|
1224 |
-
swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
1225 |
-
swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
|
1226 |
-
}
|
1227 |
-
}
|
1228 |
-
|
1229 |
-
return true;
|
1230 |
-
}
|
1231 |
-
|
1232 |
-
function slideToLoop (index$$1 = 0, speed = this.params.speed, runCallbacks = true, internal) {
|
1233 |
-
const swiper = this;
|
1234 |
-
let newIndex = index$$1;
|
1235 |
-
if (swiper.params.loop) {
|
1236 |
-
newIndex += swiper.loopedSlides;
|
1237 |
-
}
|
1238 |
-
|
1239 |
-
return swiper.slideTo(newIndex, speed, runCallbacks, internal);
|
1240 |
-
}
|
1241 |
-
|
1242 |
-
/* eslint no-unused-vars: "off" */
|
1243 |
-
function slideNext (speed = this.params.speed, runCallbacks = true, internal) {
|
1244 |
-
const swiper = this;
|
1245 |
-
const { params, animating } = swiper;
|
1246 |
-
if (params.loop) {
|
1247 |
-
if (animating) return false;
|
1248 |
-
swiper.loopFix();
|
1249 |
-
// eslint-disable-next-line
|
1250 |
-
swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
|
1251 |
-
return swiper.slideTo(swiper.activeIndex + params.slidesPerGroup, speed, runCallbacks, internal);
|
1252 |
-
}
|
1253 |
-
return swiper.slideTo(swiper.activeIndex + params.slidesPerGroup, speed, runCallbacks, internal);
|
1254 |
-
}
|
1255 |
-
|
1256 |
-
/* eslint no-unused-vars: "off" */
|
1257 |
-
function slidePrev (speed = this.params.speed, runCallbacks = true, internal) {
|
1258 |
-
const swiper = this;
|
1259 |
-
const {
|
1260 |
-
params, animating, snapGrid, slidesGrid, rtlTranslate,
|
1261 |
-
} = swiper;
|
1262 |
-
|
1263 |
-
if (params.loop) {
|
1264 |
-
if (animating) return false;
|
1265 |
-
swiper.loopFix();
|
1266 |
-
// eslint-disable-next-line
|
1267 |
-
swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
|
1268 |
-
}
|
1269 |
-
const translate = rtlTranslate ? swiper.translate : -swiper.translate;
|
1270 |
-
function normalize(val) {
|
1271 |
-
if (val < 0) return -Math.floor(Math.abs(val));
|
1272 |
-
return Math.floor(val);
|
1273 |
-
}
|
1274 |
-
const normalizedTranslate = normalize(translate);
|
1275 |
-
const normalizedSnapGrid = snapGrid.map(val => normalize(val));
|
1276 |
-
const normalizedSlidesGrid = slidesGrid.map(val => normalize(val));
|
1277 |
-
|
1278 |
-
const currentSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate)];
|
1279 |
-
const prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];
|
1280 |
-
let prevIndex;
|
1281 |
-
if (typeof prevSnap !== 'undefined') {
|
1282 |
-
prevIndex = slidesGrid.indexOf(prevSnap);
|
1283 |
-
if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;
|
1284 |
-
}
|
1285 |
-
return swiper.slideTo(prevIndex, speed, runCallbacks, internal);
|
1286 |
-
}
|
1287 |
-
|
1288 |
-
/* eslint no-unused-vars: "off" */
|
1289 |
-
function slideReset (speed = this.params.speed, runCallbacks = true, internal) {
|
1290 |
-
const swiper = this;
|
1291 |
-
return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);
|
1292 |
-
}
|
1293 |
-
|
1294 |
-
/* eslint no-unused-vars: "off" */
|
1295 |
-
function slideToClosest (speed = this.params.speed, runCallbacks = true, internal) {
|
1296 |
-
const swiper = this;
|
1297 |
-
let index$$1 = swiper.activeIndex;
|
1298 |
-
const snapIndex = Math.floor(index$$1 / swiper.params.slidesPerGroup);
|
1299 |
-
|
1300 |
-
if (snapIndex < swiper.snapGrid.length - 1) {
|
1301 |
-
const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
|
1302 |
-
|
1303 |
-
const currentSnap = swiper.snapGrid[snapIndex];
|
1304 |
-
const nextSnap = swiper.snapGrid[snapIndex + 1];
|
1305 |
-
|
1306 |
-
if ((translate - currentSnap) > (nextSnap - currentSnap) / 2) {
|
1307 |
-
index$$1 = swiper.params.slidesPerGroup;
|
1308 |
-
}
|
1309 |
-
}
|
1310 |
-
|
1311 |
-
return swiper.slideTo(index$$1, speed, runCallbacks, internal);
|
1312 |
-
}
|
1313 |
-
|
1314 |
-
function slideToClickedSlide () {
|
1315 |
-
const swiper = this;
|
1316 |
-
const { params, $wrapperEl } = swiper;
|
1317 |
-
|
1318 |
-
const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;
|
1319 |
-
let slideToIndex = swiper.clickedIndex;
|
1320 |
-
let realIndex;
|
1321 |
-
if (params.loop) {
|
1322 |
-
if (swiper.animating) return;
|
1323 |
-
realIndex = parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'), 10);
|
1324 |
-
if (params.centeredSlides) {
|
1325 |
-
if (
|
1326 |
-
(slideToIndex < swiper.loopedSlides - (slidesPerView / 2))
|
1327 |
-
|| (slideToIndex > (swiper.slides.length - swiper.loopedSlides) + (slidesPerView / 2))
|
1328 |
-
) {
|
1329 |
-
swiper.loopFix();
|
1330 |
-
slideToIndex = $wrapperEl
|
1331 |
-
.children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`)
|
1332 |
-
.eq(0)
|
1333 |
-
.index();
|
1334 |
-
|
1335 |
-
Utils.nextTick(() => {
|
1336 |
-
swiper.slideTo(slideToIndex);
|
1337 |
-
});
|
1338 |
-
} else {
|
1339 |
-
swiper.slideTo(slideToIndex);
|
1340 |
-
}
|
1341 |
-
} else if (slideToIndex > swiper.slides.length - slidesPerView) {
|
1342 |
-
swiper.loopFix();
|
1343 |
-
slideToIndex = $wrapperEl
|
1344 |
-
.children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`)
|
1345 |
-
.eq(0)
|
1346 |
-
.index();
|
1347 |
-
|
1348 |
-
Utils.nextTick(() => {
|
1349 |
-
swiper.slideTo(slideToIndex);
|
1350 |
-
});
|
1351 |
-
} else {
|
1352 |
-
swiper.slideTo(slideToIndex);
|
1353 |
-
}
|
1354 |
-
} else {
|
1355 |
-
swiper.slideTo(slideToIndex);
|
1356 |
-
}
|
1357 |
-
}
|
1358 |
-
|
1359 |
-
var slide = {
|
1360 |
-
slideTo,
|
1361 |
-
slideToLoop,
|
1362 |
-
slideNext,
|
1363 |
-
slidePrev,
|
1364 |
-
slideReset,
|
1365 |
-
slideToClosest,
|
1366 |
-
slideToClickedSlide,
|
1367 |
-
};
|
1368 |
-
|
1369 |
-
function loopCreate () {
|
1370 |
-
const swiper = this;
|
1371 |
-
const { params, $wrapperEl } = swiper;
|
1372 |
-
// Remove duplicated slides
|
1373 |
-
$wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove();
|
1374 |
-
|
1375 |
-
let slides = $wrapperEl.children(`.${params.slideClass}`);
|
1376 |
-
|
1377 |
-
if (params.loopFillGroupWithBlank) {
|
1378 |
-
const blankSlidesNum = params.slidesPerGroup - (slides.length % params.slidesPerGroup);
|
1379 |
-
if (blankSlidesNum !== params.slidesPerGroup) {
|
1380 |
-
for (let i = 0; i < blankSlidesNum; i += 1) {
|
1381 |
-
const blankNode = $(document.createElement('div')).addClass(`${params.slideClass} ${params.slideBlankClass}`);
|
1382 |
-
$wrapperEl.append(blankNode);
|
1383 |
-
}
|
1384 |
-
slides = $wrapperEl.children(`.${params.slideClass}`);
|
1385 |
-
}
|
1386 |
-
}
|
1387 |
-
|
1388 |
-
if (params.slidesPerView === 'auto' && !params.loopedSlides) params.loopedSlides = slides.length;
|
1389 |
-
|
1390 |
-
swiper.loopedSlides = parseInt(params.loopedSlides || params.slidesPerView, 10);
|
1391 |
-
swiper.loopedSlides += params.loopAdditionalSlides;
|
1392 |
-
if (swiper.loopedSlides > slides.length) {
|
1393 |
-
swiper.loopedSlides = slides.length;
|
1394 |
-
}
|
1395 |
-
|
1396 |
-
const prependSlides = [];
|
1397 |
-
const appendSlides = [];
|
1398 |
-
slides.each((index$$1, el) => {
|
1399 |
-
const slide = $(el);
|
1400 |
-
if (index$$1 < swiper.loopedSlides) appendSlides.push(el);
|
1401 |
-
if (index$$1 < slides.length && index$$1 >= slides.length - swiper.loopedSlides) prependSlides.push(el);
|
1402 |
-
slide.attr('data-swiper-slide-index', index$$1);
|
1403 |
-
});
|
1404 |
-
for (let i = 0; i < appendSlides.length; i += 1) {
|
1405 |
-
$wrapperEl.append($(appendSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));
|
1406 |
-
}
|
1407 |
-
for (let i = prependSlides.length - 1; i >= 0; i -= 1) {
|
1408 |
-
$wrapperEl.prepend($(prependSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));
|
1409 |
-
}
|
1410 |
-
}
|
1411 |
-
|
1412 |
-
function loopFix () {
|
1413 |
-
const swiper = this;
|
1414 |
-
const {
|
1415 |
-
params, activeIndex, slides, loopedSlides, allowSlidePrev, allowSlideNext, snapGrid, rtlTranslate: rtl,
|
1416 |
-
} = swiper;
|
1417 |
-
let newIndex;
|
1418 |
-
swiper.allowSlidePrev = true;
|
1419 |
-
swiper.allowSlideNext = true;
|
1420 |
-
|
1421 |
-
const snapTranslate = -snapGrid[activeIndex];
|
1422 |
-
const diff = snapTranslate - swiper.getTranslate();
|
1423 |
-
|
1424 |
-
|
1425 |
-
// Fix For Negative Oversliding
|
1426 |
-
if (activeIndex < loopedSlides) {
|
1427 |
-
newIndex = (slides.length - (loopedSlides * 3)) + activeIndex;
|
1428 |
-
newIndex += loopedSlides;
|
1429 |
-
const slideChanged = swiper.slideTo(newIndex, 0, false, true);
|
1430 |
-
if (slideChanged && diff !== 0) {
|
1431 |
-
swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);
|
1432 |
-
}
|
1433 |
-
} else if ((params.slidesPerView === 'auto' && activeIndex >= loopedSlides * 2) || (activeIndex >= slides.length - loopedSlides)) {
|
1434 |
-
// Fix For Positive Oversliding
|
1435 |
-
newIndex = -slides.length + activeIndex + loopedSlides;
|
1436 |
-
newIndex += loopedSlides;
|
1437 |
-
const slideChanged = swiper.slideTo(newIndex, 0, false, true);
|
1438 |
-
if (slideChanged && diff !== 0) {
|
1439 |
-
swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);
|
1440 |
-
}
|
1441 |
-
}
|
1442 |
-
swiper.allowSlidePrev = allowSlidePrev;
|
1443 |
-
swiper.allowSlideNext = allowSlideNext;
|
1444 |
-
}
|
1445 |
-
|
1446 |
-
function loopDestroy () {
|
1447 |
-
const swiper = this;
|
1448 |
-
const { $wrapperEl, params, slides } = swiper;
|
1449 |
-
$wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass},.${params.slideClass}.${params.slideBlankClass}`).remove();
|
1450 |
-
slides.removeAttr('data-swiper-slide-index');
|
1451 |
-
}
|
1452 |
-
|
1453 |
-
var loop = {
|
1454 |
-
loopCreate,
|
1455 |
-
loopFix,
|
1456 |
-
loopDestroy,
|
1457 |
-
};
|
1458 |
-
|
1459 |
-
function setGrabCursor (moving) {
|
1460 |
-
const swiper = this;
|
1461 |
-
if (Support.touch || !swiper.params.simulateTouch || (swiper.params.watchOverflow && swiper.isLocked)) return;
|
1462 |
-
const el = swiper.el;
|
1463 |
-
el.style.cursor = 'move';
|
1464 |
-
el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';
|
1465 |
-
el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab';
|
1466 |
-
el.style.cursor = moving ? 'grabbing' : 'grab';
|
1467 |
-
}
|
1468 |
-
|
1469 |
-
function unsetGrabCursor () {
|
1470 |
-
const swiper = this;
|
1471 |
-
if (Support.touch || (swiper.params.watchOverflow && swiper.isLocked)) return;
|
1472 |
-
swiper.el.style.cursor = '';
|
1473 |
-
}
|
1474 |
-
|
1475 |
-
var grabCursor = {
|
1476 |
-
setGrabCursor,
|
1477 |
-
unsetGrabCursor,
|
1478 |
-
};
|
1479 |
-
|
1480 |
-
function appendSlide (slides) {
|
1481 |
-
const swiper = this;
|
1482 |
-
const { $wrapperEl, params } = swiper;
|
1483 |
-
if (params.loop) {
|
1484 |
-
swiper.loopDestroy();
|
1485 |
-
}
|
1486 |
-
if (typeof slides === 'object' && 'length' in slides) {
|
1487 |
-
for (let i = 0; i < slides.length; i += 1) {
|
1488 |
-
if (slides[i]) $wrapperEl.append(slides[i]);
|
1489 |
-
}
|
1490 |
-
} else {
|
1491 |
-
$wrapperEl.append(slides);
|
1492 |
-
}
|
1493 |
-
if (params.loop) {
|
1494 |
-
swiper.loopCreate();
|
1495 |
-
}
|
1496 |
-
if (!(params.observer && Support.observer)) {
|
1497 |
-
swiper.update();
|
1498 |
-
}
|
1499 |
-
}
|
1500 |
-
|
1501 |
-
function prependSlide (slides) {
|
1502 |
-
const swiper = this;
|
1503 |
-
const { params, $wrapperEl, activeIndex } = swiper;
|
1504 |
-
|
1505 |
-
if (params.loop) {
|
1506 |
-
swiper.loopDestroy();
|
1507 |
-
}
|
1508 |
-
let newActiveIndex = activeIndex + 1;
|
1509 |
-
if (typeof slides === 'object' && 'length' in slides) {
|
1510 |
-
for (let i = 0; i < slides.length; i += 1) {
|
1511 |
-
if (slides[i]) $wrapperEl.prepend(slides[i]);
|
1512 |
-
}
|
1513 |
-
newActiveIndex = activeIndex + slides.length;
|
1514 |
-
} else {
|
1515 |
-
$wrapperEl.prepend(slides);
|
1516 |
-
}
|
1517 |
-
if (params.loop) {
|
1518 |
-
swiper.loopCreate();
|
1519 |
-
}
|
1520 |
-
if (!(params.observer && Support.observer)) {
|
1521 |
-
swiper.update();
|
1522 |
-
}
|
1523 |
-
swiper.slideTo(newActiveIndex, 0, false);
|
1524 |
-
}
|
1525 |
-
|
1526 |
-
function addSlide (index$$1, slides) {
|
1527 |
-
const swiper = this;
|
1528 |
-
const { $wrapperEl, params, activeIndex } = swiper;
|
1529 |
-
let activeIndexBuffer = activeIndex;
|
1530 |
-
if (params.loop) {
|
1531 |
-
activeIndexBuffer -= swiper.loopedSlides;
|
1532 |
-
swiper.loopDestroy();
|
1533 |
-
swiper.slides = $wrapperEl.children(`.${params.slideClass}`);
|
1534 |
-
}
|
1535 |
-
const baseLength = swiper.slides.length;
|
1536 |
-
if (index$$1 <= 0) {
|
1537 |
-
swiper.prependSlide(slides);
|
1538 |
-
return;
|
1539 |
-
}
|
1540 |
-
if (index$$1 >= baseLength) {
|
1541 |
-
swiper.appendSlide(slides);
|
1542 |
-
return;
|
1543 |
-
}
|
1544 |
-
let newActiveIndex = activeIndexBuffer > index$$1 ? activeIndexBuffer + 1 : activeIndexBuffer;
|
1545 |
-
|
1546 |
-
const slidesBuffer = [];
|
1547 |
-
for (let i = baseLength - 1; i >= index$$1; i -= 1) {
|
1548 |
-
const currentSlide = swiper.slides.eq(i);
|
1549 |
-
currentSlide.remove();
|
1550 |
-
slidesBuffer.unshift(currentSlide);
|
1551 |
-
}
|
1552 |
-
|
1553 |
-
if (typeof slides === 'object' && 'length' in slides) {
|
1554 |
-
for (let i = 0; i < slides.length; i += 1) {
|
1555 |
-
if (slides[i]) $wrapperEl.append(slides[i]);
|
1556 |
-
}
|
1557 |
-
newActiveIndex = activeIndexBuffer > index$$1 ? activeIndexBuffer + slides.length : activeIndexBuffer;
|
1558 |
-
} else {
|
1559 |
-
$wrapperEl.append(slides);
|
1560 |
-
}
|
1561 |
-
|
1562 |
-
for (let i = 0; i < slidesBuffer.length; i += 1) {
|
1563 |
-
$wrapperEl.append(slidesBuffer[i]);
|
1564 |
-
}
|
1565 |
-
|
1566 |
-
if (params.loop) {
|
1567 |
-
swiper.loopCreate();
|
1568 |
-
}
|
1569 |
-
if (!(params.observer && Support.observer)) {
|
1570 |
-
swiper.update();
|
1571 |
-
}
|
1572 |
-
if (params.loop) {
|
1573 |
-
swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
|
1574 |
-
} else {
|
1575 |
-
swiper.slideTo(newActiveIndex, 0, false);
|
1576 |
-
}
|
1577 |
-
}
|
1578 |
-
|
1579 |
-
function removeSlide (slidesIndexes) {
|
1580 |
-
const swiper = this;
|
1581 |
-
const { params, $wrapperEl, activeIndex } = swiper;
|
1582 |
-
|
1583 |
-
let activeIndexBuffer = activeIndex;
|
1584 |
-
if (params.loop) {
|
1585 |
-
activeIndexBuffer -= swiper.loopedSlides;
|
1586 |
-
swiper.loopDestroy();
|
1587 |
-
swiper.slides = $wrapperEl.children(`.${params.slideClass}`);
|
1588 |
-
}
|
1589 |
-
let newActiveIndex = activeIndexBuffer;
|
1590 |
-
let indexToRemove;
|
1591 |
-
|
1592 |
-
if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) {
|
1593 |
-
for (let i = 0; i < slidesIndexes.length; i += 1) {
|
1594 |
-
indexToRemove = slidesIndexes[i];
|
1595 |
-
if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();
|
1596 |
-
if (indexToRemove < newActiveIndex) newActiveIndex -= 1;
|
1597 |
-
}
|
1598 |
-
newActiveIndex = Math.max(newActiveIndex, 0);
|
1599 |
-
} else {
|
1600 |
-
indexToRemove = slidesIndexes;
|
1601 |
-
if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();
|
1602 |
-
if (indexToRemove < newActiveIndex) newActiveIndex -= 1;
|
1603 |
-
newActiveIndex = Math.max(newActiveIndex, 0);
|
1604 |
-
}
|
1605 |
-
|
1606 |
-
if (params.loop) {
|
1607 |
-
swiper.loopCreate();
|
1608 |
-
}
|
1609 |
-
|
1610 |
-
if (!(params.observer && Support.observer)) {
|
1611 |
-
swiper.update();
|
1612 |
-
}
|
1613 |
-
if (params.loop) {
|
1614 |
-
swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
|
1615 |
-
} else {
|
1616 |
-
swiper.slideTo(newActiveIndex, 0, false);
|
1617 |
-
}
|
1618 |
-
}
|
1619 |
-
|
1620 |
-
function removeAllSlides () {
|
1621 |
-
const swiper = this;
|
1622 |
-
|
1623 |
-
const slidesIndexes = [];
|
1624 |
-
for (let i = 0; i < swiper.slides.length; i += 1) {
|
1625 |
-
slidesIndexes.push(i);
|
1626 |
-
}
|
1627 |
-
swiper.removeSlide(slidesIndexes);
|
1628 |
-
}
|
1629 |
-
|
1630 |
-
var manipulation = {
|
1631 |
-
appendSlide,
|
1632 |
-
prependSlide,
|
1633 |
-
addSlide,
|
1634 |
-
removeSlide,
|
1635 |
-
removeAllSlides,
|
1636 |
-
};
|
1637 |
-
|
1638 |
-
const Device = (function Device() {
|
1639 |
-
const ua = window.navigator.userAgent;
|
1640 |
-
|
1641 |
-
const device = {
|
1642 |
-
ios: false,
|
1643 |
-
android: false,
|
1644 |
-
androidChrome: false,
|
1645 |
-
desktop: false,
|
1646 |
-
windows: false,
|
1647 |
-
iphone: false,
|
1648 |
-
ipod: false,
|
1649 |
-
ipad: false,
|
1650 |
-
cordova: window.cordova || window.phonegap,
|
1651 |
-
phonegap: window.cordova || window.phonegap,
|
1652 |
-
};
|
1653 |
-
|
1654 |
-
const windows = ua.match(/(Windows Phone);?[\s\/]+([\d.]+)?/); // eslint-disable-line
|
1655 |
-
const android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line
|
1656 |
-
const ipad = ua.match(/(iPad).*OS\s([\d_]+)/);
|
1657 |
-
const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/);
|
1658 |
-
const iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/);
|
1659 |
-
|
1660 |
-
|
1661 |
-
// Windows
|
1662 |
-
if (windows) {
|
1663 |
-
device.os = 'windows';
|
1664 |
-
device.osVersion = windows[2];
|
1665 |
-
device.windows = true;
|
1666 |
-
}
|
1667 |
-
// Android
|
1668 |
-
if (android && !windows) {
|
1669 |
-
device.os = 'android';
|
1670 |
-
device.osVersion = android[2];
|
1671 |
-
device.android = true;
|
1672 |
-
device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0;
|
1673 |
-
}
|
1674 |
-
if (ipad || iphone || ipod) {
|
1675 |
-
device.os = 'ios';
|
1676 |
-
device.ios = true;
|
1677 |
-
}
|
1678 |
-
// iOS
|
1679 |
-
if (iphone && !ipod) {
|
1680 |
-
device.osVersion = iphone[2].replace(/_/g, '.');
|
1681 |
-
device.iphone = true;
|
1682 |
-
}
|
1683 |
-
if (ipad) {
|
1684 |
-
device.osVersion = ipad[2].replace(/_/g, '.');
|
1685 |
-
device.ipad = true;
|
1686 |
-
}
|
1687 |
-
if (ipod) {
|
1688 |
-
device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null;
|
1689 |
-
device.iphone = true;
|
1690 |
-
}
|
1691 |
-
// iOS 8+ changed UA
|
1692 |
-
if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) {
|
1693 |
-
if (device.osVersion.split('.')[0] === '10') {
|
1694 |
-
device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0];
|
1695 |
-
}
|
1696 |
-
}
|
1697 |
-
|
1698 |
-
// Desktop
|
1699 |
-
device.desktop = !(device.os || device.android || device.webView);
|
1700 |
-
|
1701 |
-
// Webview
|
1702 |
-
device.webView = (iphone || ipad || ipod) && ua.match(/.*AppleWebKit(?!.*Safari)/i);
|
1703 |
-
|
1704 |
-
// Minimal UI
|
1705 |
-
if (device.os && device.os === 'ios') {
|
1706 |
-
const osVersionArr = device.osVersion.split('.');
|
1707 |
-
const metaViewport = document.querySelector('meta[name="viewport"]');
|
1708 |
-
device.minimalUi = !device.webView
|
1709 |
-
&& (ipod || iphone)
|
1710 |
-
&& (osVersionArr[0] * 1 === 7 ? osVersionArr[1] * 1 >= 1 : osVersionArr[0] * 1 > 7)
|
1711 |
-
&& metaViewport && metaViewport.getAttribute('content').indexOf('minimal-ui') >= 0;
|
1712 |
-
}
|
1713 |
-
|
1714 |
-
// Pixel Ratio
|
1715 |
-
device.pixelRatio = window.devicePixelRatio || 1;
|
1716 |
-
|
1717 |
-
// Export object
|
1718 |
-
return device;
|
1719 |
-
}());
|
1720 |
-
|
1721 |
-
function onTouchStart (event) {
|
1722 |
-
const swiper = this;
|
1723 |
-
const data$$1 = swiper.touchEventsData;
|
1724 |
-
const { params, touches } = swiper;
|
1725 |
-
if (swiper.animating && params.preventInteractionOnTransition) {
|
1726 |
-
return;
|
1727 |
-
}
|
1728 |
-
let e = event;
|
1729 |
-
if (e.originalEvent) e = e.originalEvent;
|
1730 |
-
data$$1.isTouchEvent = e.type === 'touchstart';
|
1731 |
-
if (!data$$1.isTouchEvent && 'which' in e && e.which === 3) return;
|
1732 |
-
if (!data$$1.isTouchEvent && 'button' in e && e.button > 0) return;
|
1733 |
-
if (data$$1.isTouched && data$$1.isMoved) return;
|
1734 |
-
if (params.noSwiping && $(e.target).closest(params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`)[0]) {
|
1735 |
-
swiper.allowClick = true;
|
1736 |
-
return;
|
1737 |
-
}
|
1738 |
-
if (params.swipeHandler) {
|
1739 |
-
if (!$(e).closest(params.swipeHandler)[0]) return;
|
1740 |
-
}
|
1741 |
-
|
1742 |
-
touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
|
1743 |
-
touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
|
1744 |
-
const startX = touches.currentX;
|
1745 |
-
const startY = touches.currentY;
|
1746 |
-
|
1747 |
-
// Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore
|
1748 |
-
|
1749 |
-
const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection;
|
1750 |
-
const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold;
|
1751 |
-
if (
|
1752 |
-
edgeSwipeDetection
|
1753 |
-
&& ((startX <= edgeSwipeThreshold)
|
1754 |
-
|| (startX >= window.screen.width - edgeSwipeThreshold))
|
1755 |
-
) {
|
1756 |
-
return;
|
1757 |
-
}
|
1758 |
-
|
1759 |
-
Utils.extend(data$$1, {
|
1760 |
-
isTouched: true,
|
1761 |
-
isMoved: false,
|
1762 |
-
allowTouchCallbacks: true,
|
1763 |
-
isScrolling: undefined,
|
1764 |
-
startMoving: undefined,
|
1765 |
-
});
|
1766 |
-
|
1767 |
-
touches.startX = startX;
|
1768 |
-
touches.startY = startY;
|
1769 |
-
data$$1.touchStartTime = Utils.now();
|
1770 |
-
swiper.allowClick = true;
|
1771 |
-
swiper.updateSize();
|
1772 |
-
swiper.swipeDirection = undefined;
|
1773 |
-
if (params.threshold > 0) data$$1.allowThresholdMove = false;
|
1774 |
-
if (e.type !== 'touchstart') {
|
1775 |
-
let preventDefault = true;
|
1776 |
-
if ($(e.target).is(data$$1.formElements)) preventDefault = false;
|
1777 |
-
if (
|
1778 |
-
document.activeElement
|
1779 |
-
&& $(document.activeElement).is(data$$1.formElements)
|
1780 |
-
&& document.activeElement !== e.target
|
1781 |
-
) {
|
1782 |
-
document.activeElement.blur();
|
1783 |
-
}
|
1784 |
-
|
1785 |
-
const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;
|
1786 |
-
if (params.touchStartForcePreventDefault || shouldPreventDefault) {
|
1787 |
-
e.preventDefault();
|
1788 |
-
}
|
1789 |
-
}
|
1790 |
-
swiper.emit('touchStart', e);
|
1791 |
-
}
|
1792 |
-
|
1793 |
-
function onTouchMove (event) {
|
1794 |
-
const swiper = this;
|
1795 |
-
const data$$1 = swiper.touchEventsData;
|
1796 |
-
const { params, touches, rtlTranslate: rtl } = swiper;
|
1797 |
-
let e = event;
|
1798 |
-
if (e.originalEvent) e = e.originalEvent;
|
1799 |
-
if (!data$$1.isTouched) {
|
1800 |
-
if (data$$1.startMoving && data$$1.isScrolling) {
|
1801 |
-
swiper.emit('touchMoveOpposite', e);
|
1802 |
-
}
|
1803 |
-
return;
|
1804 |
-
}
|
1805 |
-
if (data$$1.isTouchEvent && e.type === 'mousemove') return;
|
1806 |
-
const pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
|
1807 |
-
const pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
|
1808 |
-
if (e.preventedByNestedSwiper) {
|
1809 |
-
touches.startX = pageX;
|
1810 |
-
touches.startY = pageY;
|
1811 |
-
return;
|
1812 |
-
}
|
1813 |
-
if (!swiper.allowTouchMove) {
|
1814 |
-
// isMoved = true;
|
1815 |
-
swiper.allowClick = false;
|
1816 |
-
if (data$$1.isTouched) {
|
1817 |
-
Utils.extend(touches, {
|
1818 |
-
startX: pageX,
|
1819 |
-
startY: pageY,
|
1820 |
-
currentX: pageX,
|
1821 |
-
currentY: pageY,
|
1822 |
-
});
|
1823 |
-
data$$1.touchStartTime = Utils.now();
|
1824 |
-
}
|
1825 |
-
return;
|
1826 |
-
}
|
1827 |
-
if (data$$1.isTouchEvent && params.touchReleaseOnEdges && !params.loop) {
|
1828 |
-
if (swiper.isVertical()) {
|
1829 |
-
// Vertical
|
1830 |
-
if (
|
1831 |
-
(pageY < touches.startY && swiper.translate <= swiper.maxTranslate())
|
1832 |
-
|| (pageY > touches.startY && swiper.translate >= swiper.minTranslate())
|
1833 |
-
) {
|
1834 |
-
data$$1.isTouched = false;
|
1835 |
-
data$$1.isMoved = false;
|
1836 |
-
return;
|
1837 |
-
}
|
1838 |
-
} else if (
|
1839 |
-
(pageX < touches.startX && swiper.translate <= swiper.maxTranslate())
|
1840 |
-
|| (pageX > touches.startX && swiper.translate >= swiper.minTranslate())
|
1841 |
-
) {
|
1842 |
-
return;
|
1843 |
-
}
|
1844 |
-
}
|
1845 |
-
if (data$$1.isTouchEvent && document.activeElement) {
|
1846 |
-
if (e.target === document.activeElement && $(e.target).is(data$$1.formElements)) {
|
1847 |
-
data$$1.isMoved = true;
|
1848 |
-
swiper.allowClick = false;
|
1849 |
-
return;
|
1850 |
-
}
|
1851 |
-
}
|
1852 |
-
if (data$$1.allowTouchCallbacks) {
|
1853 |
-
swiper.emit('touchMove', e);
|
1854 |
-
}
|
1855 |
-
if (e.targetTouches && e.targetTouches.length > 1) return;
|
1856 |
-
|
1857 |
-
touches.currentX = pageX;
|
1858 |
-
touches.currentY = pageY;
|
1859 |
-
|
1860 |
-
const diffX = touches.currentX - touches.startX;
|
1861 |
-
const diffY = touches.currentY - touches.startY;
|
1862 |
-
if (swiper.params.threshold && Math.sqrt((diffX ** 2) + (diffY ** 2)) < swiper.params.threshold) return;
|
1863 |
-
|
1864 |
-
if (typeof data$$1.isScrolling === 'undefined') {
|
1865 |
-
let touchAngle;
|
1866 |
-
if ((swiper.isHorizontal() && touches.currentY === touches.startY) || (swiper.isVertical() && touches.currentX === touches.startX)) {
|
1867 |
-
data$$1.isScrolling = false;
|
1868 |
-
} else {
|
1869 |
-
// eslint-disable-next-line
|
1870 |
-
if ((diffX * diffX) + (diffY * diffY) >= 25) {
|
1871 |
-
touchAngle = (Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180) / Math.PI;
|
1872 |
-
data$$1.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : (90 - touchAngle > params.touchAngle);
|
1873 |
-
}
|
1874 |
-
}
|
1875 |
-
}
|
1876 |
-
if (data$$1.isScrolling) {
|
1877 |
-
swiper.emit('touchMoveOpposite', e);
|
1878 |
-
}
|
1879 |
-
if (typeof data$$1.startMoving === 'undefined') {
|
1880 |
-
if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {
|
1881 |
-
data$$1.startMoving = true;
|
1882 |
-
}
|
1883 |
-
}
|
1884 |
-
if (data$$1.isScrolling) {
|
1885 |
-
data$$1.isTouched = false;
|
1886 |
-
return;
|
1887 |
-
}
|
1888 |
-
if (!data$$1.startMoving) {
|
1889 |
-
return;
|
1890 |
-
}
|
1891 |
-
swiper.allowClick = false;
|
1892 |
-
e.preventDefault();
|
1893 |
-
if (params.touchMoveStopPropagation && !params.nested) {
|
1894 |
-
e.stopPropagation();
|
1895 |
-
}
|
1896 |
-
|
1897 |
-
if (!data$$1.isMoved) {
|
1898 |
-
if (params.loop) {
|
1899 |
-
swiper.loopFix();
|
1900 |
-
}
|
1901 |
-
data$$1.startTranslate = swiper.getTranslate();
|
1902 |
-
swiper.setTransition(0);
|
1903 |
-
if (swiper.animating) {
|
1904 |
-
swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend');
|
1905 |
-
}
|
1906 |
-
data$$1.allowMomentumBounce = false;
|
1907 |
-
// Grab Cursor
|
1908 |
-
if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
|
1909 |
-
swiper.setGrabCursor(true);
|
1910 |
-
}
|
1911 |
-
swiper.emit('sliderFirstMove', e);
|
1912 |
-
}
|
1913 |
-
swiper.emit('sliderMove', e);
|
1914 |
-
data$$1.isMoved = true;
|
1915 |
-
|
1916 |
-
let diff = swiper.isHorizontal() ? diffX : diffY;
|
1917 |
-
touches.diff = diff;
|
1918 |
-
|
1919 |
-
diff *= params.touchRatio;
|
1920 |
-
if (rtl) diff = -diff;
|
1921 |
-
|
1922 |
-
swiper.swipeDirection = diff > 0 ? 'prev' : 'next';
|
1923 |
-
data$$1.currentTranslate = diff + data$$1.startTranslate;
|
1924 |
-
|
1925 |
-
let disableParentSwiper = true;
|
1926 |
-
let resistanceRatio = params.resistanceRatio;
|
1927 |
-
if (params.touchReleaseOnEdges) {
|
1928 |
-
resistanceRatio = 0;
|
1929 |
-
}
|
1930 |
-
if ((diff > 0 && data$$1.currentTranslate > swiper.minTranslate())) {
|
1931 |
-
disableParentSwiper = false;
|
1932 |
-
if (params.resistance) data$$1.currentTranslate = (swiper.minTranslate() - 1) + ((-swiper.minTranslate() + data$$1.startTranslate + diff) ** resistanceRatio);
|
1933 |
-
} else if (diff < 0 && data$$1.currentTranslate < swiper.maxTranslate()) {
|
1934 |
-
disableParentSwiper = false;
|
1935 |
-
if (params.resistance) data$$1.currentTranslate = (swiper.maxTranslate() + 1) - ((swiper.maxTranslate() - data$$1.startTranslate - diff) ** resistanceRatio);
|
1936 |
-
}
|
1937 |
-
|
1938 |
-
if (disableParentSwiper) {
|
1939 |
-
e.preventedByNestedSwiper = true;
|
1940 |
-
}
|
1941 |
-
|
1942 |
-
// Directions locks
|
1943 |
-
if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data$$1.currentTranslate < data$$1.startTranslate) {
|
1944 |
-
data$$1.currentTranslate = data$$1.startTranslate;
|
1945 |
-
}
|
1946 |
-
if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data$$1.currentTranslate > data$$1.startTranslate) {
|
1947 |
-
data$$1.currentTranslate = data$$1.startTranslate;
|
1948 |
-
}
|
1949 |
-
|
1950 |
-
|
1951 |
-
// Threshold
|
1952 |
-
if (params.threshold > 0) {
|
1953 |
-
if (Math.abs(diff) > params.threshold || data$$1.allowThresholdMove) {
|
1954 |
-
if (!data$$1.allowThresholdMove) {
|
1955 |
-
data$$1.allowThresholdMove = true;
|
1956 |
-
touches.startX = touches.currentX;
|
1957 |
-
touches.startY = touches.currentY;
|
1958 |
-
data$$1.currentTranslate = data$$1.startTranslate;
|
1959 |
-
touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;
|
1960 |
-
return;
|
1961 |
-
}
|
1962 |
-
} else {
|
1963 |
-
data$$1.currentTranslate = data$$1.startTranslate;
|
1964 |
-
return;
|
1965 |
-
}
|
1966 |
-
}
|
1967 |
-
|
1968 |
-
if (!params.followFinger) return;
|
1969 |
-
|
1970 |
-
// Update active index in free mode
|
1971 |
-
if (params.freeMode || params.watchSlidesProgress || params.watchSlidesVisibility) {
|
1972 |
-
swiper.updateActiveIndex();
|
1973 |
-
swiper.updateSlidesClasses();
|
1974 |
-
}
|
1975 |
-
if (params.freeMode) {
|
1976 |
-
// Velocity
|
1977 |
-
if (data$$1.velocities.length === 0) {
|
1978 |
-
data$$1.velocities.push({
|
1979 |
-
position: touches[swiper.isHorizontal() ? 'startX' : 'startY'],
|
1980 |
-
time: data$$1.touchStartTime,
|
1981 |
-
});
|
1982 |
-
}
|
1983 |
-
data$$1.velocities.push({
|
1984 |
-
position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'],
|
1985 |
-
time: Utils.now(),
|
1986 |
-
});
|
1987 |
-
}
|
1988 |
-
// Update progress
|
1989 |
-
swiper.updateProgress(data$$1.currentTranslate);
|
1990 |
-
// Update translate
|
1991 |
-
swiper.setTranslate(data$$1.currentTranslate);
|
1992 |
-
}
|
1993 |
-
|
1994 |
-
function onTouchEnd (event) {
|
1995 |
-
const swiper = this;
|
1996 |
-
const data$$1 = swiper.touchEventsData;
|
1997 |
-
|
1998 |
-
const {
|
1999 |
-
params, touches, rtlTranslate: rtl, $wrapperEl, slidesGrid, snapGrid,
|
2000 |
-
} = swiper;
|
2001 |
-
let e = event;
|
2002 |
-
if (e.originalEvent) e = e.originalEvent;
|
2003 |
-
if (data$$1.allowTouchCallbacks) {
|
2004 |
-
swiper.emit('touchEnd', e);
|
2005 |
-
}
|
2006 |
-
data$$1.allowTouchCallbacks = false;
|
2007 |
-
if (!data$$1.isTouched) {
|
2008 |
-
if (data$$1.isMoved && params.grabCursor) {
|
2009 |
-
swiper.setGrabCursor(false);
|
2010 |
-
}
|
2011 |
-
data$$1.isMoved = false;
|
2012 |
-
data$$1.startMoving = false;
|
2013 |
-
return;
|
2014 |
-
}
|
2015 |
-
// Return Grab Cursor
|
2016 |
-
if (params.grabCursor && data$$1.isMoved && data$$1.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
|
2017 |
-
swiper.setGrabCursor(false);
|
2018 |
-
}
|
2019 |
-
|
2020 |
-
// Time diff
|
2021 |
-
const touchEndTime = Utils.now();
|
2022 |
-
const timeDiff = touchEndTime - data$$1.touchStartTime;
|
2023 |
-
|
2024 |
-
// Tap, doubleTap, Click
|
2025 |
-
if (swiper.allowClick) {
|
2026 |
-
swiper.updateClickedSlide(e);
|
2027 |
-
swiper.emit('tap', e);
|
2028 |
-
if (timeDiff < 300 && (touchEndTime - data$$1.lastClickTime) > 300) {
|
2029 |
-
if (data$$1.clickTimeout) clearTimeout(data$$1.clickTimeout);
|
2030 |
-
data$$1.clickTimeout = Utils.nextTick(() => {
|
2031 |
-
if (!swiper || swiper.destroyed) return;
|
2032 |
-
swiper.emit('click', e);
|
2033 |
-
}, 300);
|
2034 |
-
}
|
2035 |
-
if (timeDiff < 300 && (touchEndTime - data$$1.lastClickTime) < 300) {
|
2036 |
-
if (data$$1.clickTimeout) clearTimeout(data$$1.clickTimeout);
|
2037 |
-
swiper.emit('doubleTap', e);
|
2038 |
-
}
|
2039 |
-
}
|
2040 |
-
|
2041 |
-
data$$1.lastClickTime = Utils.now();
|
2042 |
-
Utils.nextTick(() => {
|
2043 |
-
if (!swiper.destroyed) swiper.allowClick = true;
|
2044 |
-
});
|
2045 |
-
|
2046 |
-
if (!data$$1.isTouched || !data$$1.isMoved || !swiper.swipeDirection || touches.diff === 0 || data$$1.currentTranslate === data$$1.startTranslate) {
|
2047 |
-
data$$1.isTouched = false;
|
2048 |
-
data$$1.isMoved = false;
|
2049 |
-
data$$1.startMoving = false;
|
2050 |
-
return;
|
2051 |
-
}
|
2052 |
-
data$$1.isTouched = false;
|
2053 |
-
data$$1.isMoved = false;
|
2054 |
-
data$$1.startMoving = false;
|
2055 |
-
|
2056 |
-
let currentPos;
|
2057 |
-
if (params.followFinger) {
|
2058 |
-
currentPos = rtl ? swiper.translate : -swiper.translate;
|
2059 |
-
} else {
|
2060 |
-
currentPos = -data$$1.currentTranslate;
|
2061 |
-
}
|
2062 |
-
|
2063 |
-
if (params.freeMode) {
|
2064 |
-
if (currentPos < -swiper.minTranslate()) {
|
2065 |
-
swiper.slideTo(swiper.activeIndex);
|
2066 |
-
return;
|
2067 |
-
}
|
2068 |
-
if (currentPos > -swiper.maxTranslate()) {
|
2069 |
-
if (swiper.slides.length < snapGrid.length) {
|
2070 |
-
swiper.slideTo(snapGrid.length - 1);
|
2071 |
-
} else {
|
2072 |
-
swiper.slideTo(swiper.slides.length - 1);
|
2073 |
-
}
|
2074 |
-
return;
|
2075 |
-
}
|
2076 |
-
|
2077 |
-
if (params.freeModeMomentum) {
|
2078 |
-
if (data$$1.velocities.length > 1) {
|
2079 |
-
const lastMoveEvent = data$$1.velocities.pop();
|
2080 |
-
const velocityEvent = data$$1.velocities.pop();
|
2081 |
-
|
2082 |
-
const distance = lastMoveEvent.position - velocityEvent.position;
|
2083 |
-
const time = lastMoveEvent.time - velocityEvent.time;
|
2084 |
-
swiper.velocity = distance / time;
|
2085 |
-
swiper.velocity /= 2;
|
2086 |
-
if (Math.abs(swiper.velocity) < params.freeModeMinimumVelocity) {
|
2087 |
-
swiper.velocity = 0;
|
2088 |
-
}
|
2089 |
-
// this implies that the user stopped moving a finger then released.
|
2090 |
-
// There would be no events with distance zero, so the last event is stale.
|
2091 |
-
if (time > 150 || (Utils.now() - lastMoveEvent.time) > 300) {
|
2092 |
-
swiper.velocity = 0;
|
2093 |
-
}
|
2094 |
-
} else {
|
2095 |
-
swiper.velocity = 0;
|
2096 |
-
}
|
2097 |
-
swiper.velocity *= params.freeModeMomentumVelocityRatio;
|
2098 |
-
|
2099 |
-
data$$1.velocities.length = 0;
|
2100 |
-
let momentumDuration = 1000 * params.freeModeMomentumRatio;
|
2101 |
-
const momentumDistance = swiper.velocity * momentumDuration;
|
2102 |
-
|
2103 |
-
let newPosition = swiper.translate + momentumDistance;
|
2104 |
-
if (rtl) newPosition = -newPosition;
|
2105 |
-
|
2106 |
-
let doBounce = false;
|
2107 |
-
let afterBouncePosition;
|
2108 |
-
const bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeModeMomentumBounceRatio;
|
2109 |
-
let needsLoopFix;
|
2110 |
-
if (newPosition < swiper.maxTranslate()) {
|
2111 |
-
if (params.freeModeMomentumBounce) {
|
2112 |
-
if (newPosition + swiper.maxTranslate() < -bounceAmount) {
|
2113 |
-
newPosition = swiper.maxTranslate() - bounceAmount;
|
2114 |
-
}
|
2115 |
-
afterBouncePosition = swiper.maxTranslate();
|
2116 |
-
doBounce = true;
|
2117 |
-
data$$1.allowMomentumBounce = true;
|
2118 |
-
} else {
|
2119 |
-
newPosition = swiper.maxTranslate();
|
2120 |
-
}
|
2121 |
-
if (params.loop && params.centeredSlides) needsLoopFix = true;
|
2122 |
-
} else if (newPosition > swiper.minTranslate()) {
|
2123 |
-
if (params.freeModeMomentumBounce) {
|
2124 |
-
if (newPosition - swiper.minTranslate() > bounceAmount) {
|
2125 |
-
newPosition = swiper.minTranslate() + bounceAmount;
|
2126 |
-
}
|
2127 |
-
afterBouncePosition = swiper.minTranslate();
|
2128 |
-
doBounce = true;
|
2129 |
-
data$$1.allowMomentumBounce = true;
|
2130 |
-
} else {
|
2131 |
-
newPosition = swiper.minTranslate();
|
2132 |
-
}
|
2133 |
-
if (params.loop && params.centeredSlides) needsLoopFix = true;
|
2134 |
-
} else if (params.freeModeSticky) {
|
2135 |
-
let nextSlide;
|
2136 |
-
for (let j = 0; j < snapGrid.length; j += 1) {
|
2137 |
-
if (snapGrid[j] > -newPosition) {
|
2138 |
-
nextSlide = j;
|
2139 |
-
break;
|
2140 |
-
}
|
2141 |
-
}
|
2142 |
-
|
2143 |
-
if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') {
|
2144 |
-
newPosition = snapGrid[nextSlide];
|
2145 |
-
} else {
|
2146 |
-
newPosition = snapGrid[nextSlide - 1];
|
2147 |
-
}
|
2148 |
-
newPosition = -newPosition;
|
2149 |
-
}
|
2150 |
-
if (needsLoopFix) {
|
2151 |
-
swiper.once('transitionEnd', () => {
|
2152 |
-
swiper.loopFix();
|
2153 |
-
});
|
2154 |
-
}
|
2155 |
-
// Fix duration
|
2156 |
-
if (swiper.velocity !== 0) {
|
2157 |
-
if (rtl) {
|
2158 |
-
momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity);
|
2159 |
-
} else {
|
2160 |
-
momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity);
|
2161 |
-
}
|
2162 |
-
} else if (params.freeModeSticky) {
|
2163 |
-
swiper.slideToClosest();
|
2164 |
-
return;
|
2165 |
-
}
|
2166 |
-
|
2167 |
-
if (params.freeModeMomentumBounce && doBounce) {
|
2168 |
-
swiper.updateProgress(afterBouncePosition);
|
2169 |
-
swiper.setTransition(momentumDuration);
|
2170 |
-
swiper.setTranslate(newPosition);
|
2171 |
-
swiper.transitionStart(true, swiper.swipeDirection);
|
2172 |
-
swiper.animating = true;
|
2173 |
-
$wrapperEl.transitionEnd(() => {
|
2174 |
-
if (!swiper || swiper.destroyed || !data$$1.allowMomentumBounce) return;
|
2175 |
-
swiper.emit('momentumBounce');
|
2176 |
-
|
2177 |
-
swiper.setTransition(params.speed);
|
2178 |
-
swiper.setTranslate(afterBouncePosition);
|
2179 |
-
$wrapperEl.transitionEnd(() => {
|
2180 |
-
if (!swiper || swiper.destroyed) return;
|
2181 |
-
swiper.transitionEnd();
|
2182 |
-
});
|
2183 |
-
});
|
2184 |
-
} else if (swiper.velocity) {
|
2185 |
-
swiper.updateProgress(newPosition);
|
2186 |
-
swiper.setTransition(momentumDuration);
|
2187 |
-
swiper.setTranslate(newPosition);
|
2188 |
-
swiper.transitionStart(true, swiper.swipeDirection);
|
2189 |
-
if (!swiper.animating) {
|
2190 |
-
swiper.animating = true;
|
2191 |
-
$wrapperEl.transitionEnd(() => {
|
2192 |
-
if (!swiper || swiper.destroyed) return;
|
2193 |
-
swiper.transitionEnd();
|
2194 |
-
});
|
2195 |
-
}
|
2196 |
-
} else {
|
2197 |
-
swiper.updateProgress(newPosition);
|
2198 |
-
}
|
2199 |
-
|
2200 |
-
swiper.updateActiveIndex();
|
2201 |
-
swiper.updateSlidesClasses();
|
2202 |
-
} else if (params.freeModeSticky) {
|
2203 |
-
swiper.slideToClosest();
|
2204 |
-
return;
|
2205 |
-
}
|
2206 |
-
|
2207 |
-
if (!params.freeModeMomentum || timeDiff >= params.longSwipesMs) {
|
2208 |
-
swiper.updateProgress();
|
2209 |
-
swiper.updateActiveIndex();
|
2210 |
-
swiper.updateSlidesClasses();
|
2211 |
-
}
|
2212 |
-
return;
|
2213 |
-
}
|
2214 |
-
|
2215 |
-
// Find current slide
|
2216 |
-
let stopIndex = 0;
|
2217 |
-
let groupSize = swiper.slidesSizesGrid[0];
|
2218 |
-
for (let i = 0; i < slidesGrid.length; i += params.slidesPerGroup) {
|
2219 |
-
if (typeof slidesGrid[i + params.slidesPerGroup] !== 'undefined') {
|
2220 |
-
if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + params.slidesPerGroup]) {
|
2221 |
-
stopIndex = i;
|
2222 |
-
groupSize = slidesGrid[i + params.slidesPerGroup] - slidesGrid[i];
|
2223 |
-
}
|
2224 |
-
} else if (currentPos >= slidesGrid[i]) {
|
2225 |
-
stopIndex = i;
|
2226 |
-
groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];
|
2227 |
-
}
|
2228 |
-
}
|
2229 |
-
|
2230 |
-
// Find current slide size
|
2231 |
-
const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;
|
2232 |
-
|
2233 |
-
if (timeDiff > params.longSwipesMs) {
|
2234 |
-
// Long touches
|
2235 |
-
if (!params.longSwipes) {
|
2236 |
-
swiper.slideTo(swiper.activeIndex);
|
2237 |
-
return;
|
2238 |
-
}
|
2239 |
-
if (swiper.swipeDirection === 'next') {
|
2240 |
-
if (ratio >= params.longSwipesRatio) swiper.slideTo(stopIndex + params.slidesPerGroup);
|
2241 |
-
else swiper.slideTo(stopIndex);
|
2242 |
-
}
|
2243 |
-
if (swiper.swipeDirection === 'prev') {
|
2244 |
-
if (ratio > (1 - params.longSwipesRatio)) swiper.slideTo(stopIndex + params.slidesPerGroup);
|
2245 |
-
else swiper.slideTo(stopIndex);
|
2246 |
-
}
|
2247 |
-
} else {
|
2248 |
-
// Short swipes
|
2249 |
-
if (!params.shortSwipes) {
|
2250 |
-
swiper.slideTo(swiper.activeIndex);
|
2251 |
-
return;
|
2252 |
-
}
|
2253 |
-
if (swiper.swipeDirection === 'next') {
|
2254 |
-
swiper.slideTo(stopIndex + params.slidesPerGroup);
|
2255 |
-
}
|
2256 |
-
if (swiper.swipeDirection === 'prev') {
|
2257 |
-
swiper.slideTo(stopIndex);
|
2258 |
-
}
|
2259 |
-
}
|
2260 |
-
}
|
2261 |
-
|
2262 |
-
function onResize () {
|
2263 |
-
const swiper = this;
|
2264 |
-
|
2265 |
-
const { params, el } = swiper;
|
2266 |
-
|
2267 |
-
if (el && el.offsetWidth === 0) return;
|
2268 |
-
|
2269 |
-
// Breakpoints
|
2270 |
-
if (params.breakpoints) {
|
2271 |
-
swiper.setBreakpoint();
|
2272 |
-
}
|
2273 |
-
|
2274 |
-
// Save locks
|
2275 |
-
const { allowSlideNext, allowSlidePrev, snapGrid } = swiper;
|
2276 |
-
|
2277 |
-
// Disable locks on resize
|
2278 |
-
swiper.allowSlideNext = true;
|
2279 |
-
swiper.allowSlidePrev = true;
|
2280 |
-
|
2281 |
-
swiper.updateSize();
|
2282 |
-
swiper.updateSlides();
|
2283 |
-
|
2284 |
-
if (params.freeMode) {
|
2285 |
-
const newTranslate = Math.min(Math.max(swiper.translate, swiper.maxTranslate()), swiper.minTranslate());
|
2286 |
-
swiper.setTranslate(newTranslate);
|
2287 |
-
swiper.updateActiveIndex();
|
2288 |
-
swiper.updateSlidesClasses();
|
2289 |
-
|
2290 |
-
if (params.autoHeight) {
|
2291 |
-
swiper.updateAutoHeight();
|
2292 |
-
}
|
2293 |
-
} else {
|
2294 |
-
swiper.updateSlidesClasses();
|
2295 |
-
if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
|
2296 |
-
swiper.slideTo(swiper.slides.length - 1, 0, false, true);
|
2297 |
-
} else {
|
2298 |
-
swiper.slideTo(swiper.activeIndex, 0, false, true);
|
2299 |
-
}
|
2300 |
-
}
|
2301 |
-
// Return locks after resize
|
2302 |
-
swiper.allowSlidePrev = allowSlidePrev;
|
2303 |
-
swiper.allowSlideNext = allowSlideNext;
|
2304 |
-
|
2305 |
-
if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {
|
2306 |
-
swiper.checkOverflow();
|
2307 |
-
}
|
2308 |
-
}
|
2309 |
-
|
2310 |
-
function onClick (e) {
|
2311 |
-
const swiper = this;
|
2312 |
-
if (!swiper.allowClick) {
|
2313 |
-
if (swiper.params.preventClicks) e.preventDefault();
|
2314 |
-
if (swiper.params.preventClicksPropagation && swiper.animating) {
|
2315 |
-
e.stopPropagation();
|
2316 |
-
e.stopImmediatePropagation();
|
2317 |
-
}
|
2318 |
-
}
|
2319 |
-
}
|
2320 |
-
|
2321 |
-
function attachEvents() {
|
2322 |
-
const swiper = this;
|
2323 |
-
const {
|
2324 |
-
params, touchEvents, el, wrapperEl,
|
2325 |
-
} = swiper;
|
2326 |
-
|
2327 |
-
{
|
2328 |
-
swiper.onTouchStart = onTouchStart.bind(swiper);
|
2329 |
-
swiper.onTouchMove = onTouchMove.bind(swiper);
|
2330 |
-
swiper.onTouchEnd = onTouchEnd.bind(swiper);
|
2331 |
-
}
|
2332 |
-
|
2333 |
-
swiper.onClick = onClick.bind(swiper);
|
2334 |
-
|
2335 |
-
const target = params.touchEventsTarget === 'container' ? el : wrapperEl;
|
2336 |
-
const capture = !!params.nested;
|
2337 |
-
|
2338 |
-
// Touch Events
|
2339 |
-
{
|
2340 |
-
if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
|
2341 |
-
target.addEventListener(touchEvents.start, swiper.onTouchStart, false);
|
2342 |
-
document.addEventListener(touchEvents.move, swiper.onTouchMove, capture);
|
2343 |
-
document.addEventListener(touchEvents.end, swiper.onTouchEnd, false);
|
2344 |
-
} else {
|
2345 |
-
if (Support.touch) {
|
2346 |
-
const passiveListener = touchEvents.start === 'touchstart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
|
2347 |
-
target.addEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);
|
2348 |
-
target.addEventListener(touchEvents.move, swiper.onTouchMove, Support.passiveListener ? { passive: false, capture } : capture);
|
2349 |
-
target.addEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);
|
2350 |
-
}
|
2351 |
-
if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
|
2352 |
-
target.addEventListener('mousedown', swiper.onTouchStart, false);
|
2353 |
-
document.addEventListener('mousemove', swiper.onTouchMove, capture);
|
2354 |
-
document.addEventListener('mouseup', swiper.onTouchEnd, false);
|
2355 |
-
}
|
2356 |
-
}
|
2357 |
-
// Prevent Links Clicks
|
2358 |
-
if (params.preventClicks || params.preventClicksPropagation) {
|
2359 |
-
target.addEventListener('click', swiper.onClick, true);
|
2360 |
-
}
|
2361 |
-
}
|
2362 |
-
|
2363 |
-
// Resize handler
|
2364 |
-
swiper.on((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize, true);
|
2365 |
-
}
|
2366 |
-
|
2367 |
-
function detachEvents() {
|
2368 |
-
const swiper = this;
|
2369 |
-
|
2370 |
-
const {
|
2371 |
-
params, touchEvents, el, wrapperEl,
|
2372 |
-
} = swiper;
|
2373 |
-
|
2374 |
-
const target = params.touchEventsTarget === 'container' ? el : wrapperEl;
|
2375 |
-
const capture = !!params.nested;
|
2376 |
-
|
2377 |
-
// Touch Events
|
2378 |
-
{
|
2379 |
-
if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
|
2380 |
-
target.removeEventListener(touchEvents.start, swiper.onTouchStart, false);
|
2381 |
-
document.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);
|
2382 |
-
document.removeEventListener(touchEvents.end, swiper.onTouchEnd, false);
|
2383 |
-
} else {
|
2384 |
-
if (Support.touch) {
|
2385 |
-
const passiveListener = touchEvents.start === 'onTouchStart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
|
2386 |
-
target.removeEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);
|
2387 |
-
target.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);
|
2388 |
-
target.removeEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);
|
2389 |
-
}
|
2390 |
-
if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
|
2391 |
-
target.removeEventListener('mousedown', swiper.onTouchStart, false);
|
2392 |
-
document.removeEventListener('mousemove', swiper.onTouchMove, capture);
|
2393 |
-
document.removeEventListener('mouseup', swiper.onTouchEnd, false);
|
2394 |
-
}
|
2395 |
-
}
|
2396 |
-
// Prevent Links Clicks
|
2397 |
-
if (params.preventClicks || params.preventClicksPropagation) {
|
2398 |
-
target.removeEventListener('click', swiper.onClick, true);
|
2399 |
-
}
|
2400 |
-
}
|
2401 |
-
|
2402 |
-
// Resize handler
|
2403 |
-
swiper.off((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize);
|
2404 |
-
}
|
2405 |
-
|
2406 |
-
var events = {
|
2407 |
-
attachEvents,
|
2408 |
-
detachEvents,
|
2409 |
-
};
|
2410 |
-
|
2411 |
-
function setBreakpoint () {
|
2412 |
-
const swiper = this;
|
2413 |
-
const {
|
2414 |
-
activeIndex, initialized, loopedSlides = 0, params,
|
2415 |
-
} = swiper;
|
2416 |
-
const breakpoints = params.breakpoints;
|
2417 |
-
if (!breakpoints || (breakpoints && Object.keys(breakpoints).length === 0)) return;
|
2418 |
-
|
2419 |
-
// Set breakpoint for window width and update parameters
|
2420 |
-
const breakpoint = swiper.getBreakpoint(breakpoints);
|
2421 |
-
|
2422 |
-
if (breakpoint && swiper.currentBreakpoint !== breakpoint) {
|
2423 |
-
const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;
|
2424 |
-
if (breakpointOnlyParams) {
|
2425 |
-
['slidesPerView', 'spaceBetween', 'slidesPerGroup'].forEach((param) => {
|
2426 |
-
const paramValue = breakpointOnlyParams[param];
|
2427 |
-
if (typeof paramValue === 'undefined') return;
|
2428 |
-
if (param === 'slidesPerView' && (paramValue === 'AUTO' || paramValue === 'auto')) {
|
2429 |
-
breakpointOnlyParams[param] = 'auto';
|
2430 |
-
} else if (param === 'slidesPerView') {
|
2431 |
-
breakpointOnlyParams[param] = parseFloat(paramValue);
|
2432 |
-
} else {
|
2433 |
-
breakpointOnlyParams[param] = parseInt(paramValue, 10);
|
2434 |
-
}
|
2435 |
-
});
|
2436 |
-
}
|
2437 |
-
|
2438 |
-
const breakpointParams = breakpointOnlyParams || swiper.originalParams;
|
2439 |
-
const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView);
|
2440 |
-
|
2441 |
-
Utils.extend(swiper.params, breakpointParams);
|
2442 |
-
|
2443 |
-
Utils.extend(swiper, {
|
2444 |
-
allowTouchMove: swiper.params.allowTouchMove,
|
2445 |
-
allowSlideNext: swiper.params.allowSlideNext,
|
2446 |
-
allowSlidePrev: swiper.params.allowSlidePrev,
|
2447 |
-
});
|
2448 |
-
|
2449 |
-
swiper.currentBreakpoint = breakpoint;
|
2450 |
-
|
2451 |
-
if (needsReLoop && initialized) {
|
2452 |
-
swiper.loopDestroy();
|
2453 |
-
swiper.loopCreate();
|
2454 |
-
swiper.updateSlides();
|
2455 |
-
swiper.slideTo((activeIndex - loopedSlides) + swiper.loopedSlides, 0, false);
|
2456 |
-
}
|
2457 |
-
swiper.emit('breakpoint', breakpointParams);
|
2458 |
-
}
|
2459 |
-
}
|
2460 |
-
|
2461 |
-
function getBreakpoint (breakpoints) {
|
2462 |
-
const swiper = this;
|
2463 |
-
// Get breakpoint for window width
|
2464 |
-
if (!breakpoints) return undefined;
|
2465 |
-
let breakpoint = false;
|
2466 |
-
const points = [];
|
2467 |
-
Object.keys(breakpoints).forEach((point) => {
|
2468 |
-
points.push(point);
|
2469 |
-
});
|
2470 |
-
points.sort((a, b) => parseInt(a, 10) - parseInt(b, 10));
|
2471 |
-
for (let i = 0; i < points.length; i += 1) {
|
2472 |
-
const point = points[i];
|
2473 |
-
if (swiper.params.breakpointsInverse) {
|
2474 |
-
if (point <= window.innerWidth) {
|
2475 |
-
breakpoint = point;
|
2476 |
-
}
|
2477 |
-
} else if (point >= window.innerWidth && !breakpoint) {
|
2478 |
-
breakpoint = point;
|
2479 |
-
}
|
2480 |
-
}
|
2481 |
-
return breakpoint || 'max';
|
2482 |
-
}
|
2483 |
-
|
2484 |
-
var breakpoints = { setBreakpoint, getBreakpoint };
|
2485 |
-
|
2486 |
-
const Browser = (function Browser() {
|
2487 |
-
function isSafari() {
|
2488 |
-
const ua = window.navigator.userAgent.toLowerCase();
|
2489 |
-
return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0);
|
2490 |
-
}
|
2491 |
-
return {
|
2492 |
-
isIE: !!window.navigator.userAgent.match(/Trident/g) || !!window.navigator.userAgent.match(/MSIE/g),
|
2493 |
-
isEdge: !!window.navigator.userAgent.match(/Edge/g),
|
2494 |
-
isSafari: isSafari(),
|
2495 |
-
isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),
|
2496 |
-
};
|
2497 |
-
}());
|
2498 |
-
|
2499 |
-
function addClasses () {
|
2500 |
-
const swiper = this;
|
2501 |
-
const {
|
2502 |
-
classNames, params, rtl, $el,
|
2503 |
-
} = swiper;
|
2504 |
-
const suffixes = [];
|
2505 |
-
|
2506 |
-
suffixes.push(params.direction);
|
2507 |
-
|
2508 |
-
if (params.freeMode) {
|
2509 |
-
suffixes.push('free-mode');
|
2510 |
-
}
|
2511 |
-
if (!Support.flexbox) {
|
2512 |
-
suffixes.push('no-flexbox');
|
2513 |
-
}
|
2514 |
-
if (params.autoHeight) {
|
2515 |
-
suffixes.push('autoheight');
|
2516 |
-
}
|
2517 |
-
if (rtl) {
|
2518 |
-
suffixes.push('rtl');
|
2519 |
-
}
|
2520 |
-
if (params.slidesPerColumn > 1) {
|
2521 |
-
suffixes.push('multirow');
|
2522 |
-
}
|
2523 |
-
if (Device.android) {
|
2524 |
-
suffixes.push('android');
|
2525 |
-
}
|
2526 |
-
if (Device.ios) {
|
2527 |
-
suffixes.push('ios');
|
2528 |
-
}
|
2529 |
-
// WP8 Touch Events Fix
|
2530 |
-
if ((Browser.isIE || Browser.isEdge) && (Support.pointerEvents || Support.prefixedPointerEvents)) {
|
2531 |
-
suffixes.push(`wp8-${params.direction}`);
|
2532 |
-
}
|
2533 |
-
|
2534 |
-
suffixes.forEach((suffix) => {
|
2535 |
-
classNames.push(params.containerModifierClass + suffix);
|
2536 |
-
});
|
2537 |
-
|
2538 |
-
$el.addClass(classNames.join(' '));
|
2539 |
-
}
|
2540 |
-
|
2541 |
-
function removeClasses () {
|
2542 |
-
const swiper = this;
|
2543 |
-
const { $el, classNames } = swiper;
|
2544 |
-
|
2545 |
-
$el.removeClass(classNames.join(' '));
|
2546 |
-
}
|
2547 |
-
|
2548 |
-
var classes = { addClasses, removeClasses };
|
2549 |
-
|
2550 |
-
function loadImage (imageEl, src, srcset, sizes, checkForComplete, callback) {
|
2551 |
-
let image;
|
2552 |
-
function onReady() {
|
2553 |
-
if (callback) callback();
|
2554 |
-
}
|
2555 |
-
if (!imageEl.complete || !checkForComplete) {
|
2556 |
-
if (src) {
|
2557 |
-
image = new window.Image();
|
2558 |
-
image.onload = onReady;
|
2559 |
-
image.onerror = onReady;
|
2560 |
-
if (sizes) {
|
2561 |
-
image.sizes = sizes;
|
2562 |
-
}
|
2563 |
-
if (srcset) {
|
2564 |
-
image.srcset = srcset;
|
2565 |
-
}
|
2566 |
-
if (src) {
|
2567 |
-
image.src = src;
|
2568 |
-
}
|
2569 |
-
} else {
|
2570 |
-
onReady();
|
2571 |
-
}
|
2572 |
-
} else {
|
2573 |
-
// image already loaded...
|
2574 |
-
onReady();
|
2575 |
-
}
|
2576 |
-
}
|
2577 |
-
|
2578 |
-
function preloadImages () {
|
2579 |
-
const swiper = this;
|
2580 |
-
swiper.imagesToLoad = swiper.$el.find('img');
|
2581 |
-
function onReady() {
|
2582 |
-
if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) return;
|
2583 |
-
if (swiper.imagesLoaded !== undefined) swiper.imagesLoaded += 1;
|
2584 |
-
if (swiper.imagesLoaded === swiper.imagesToLoad.length) {
|
2585 |
-
if (swiper.params.updateOnImagesReady) swiper.update();
|
2586 |
-
swiper.emit('imagesReady');
|
2587 |
-
}
|
2588 |
-
}
|
2589 |
-
for (let i = 0; i < swiper.imagesToLoad.length; i += 1) {
|
2590 |
-
const imageEl = swiper.imagesToLoad[i];
|
2591 |
-
swiper.loadImage(
|
2592 |
-
imageEl,
|
2593 |
-
imageEl.currentSrc || imageEl.getAttribute('src'),
|
2594 |
-
imageEl.srcset || imageEl.getAttribute('srcset'),
|
2595 |
-
imageEl.sizes || imageEl.getAttribute('sizes'),
|
2596 |
-
true,
|
2597 |
-
onReady
|
2598 |
-
);
|
2599 |
-
}
|
2600 |
-
}
|
2601 |
-
|
2602 |
-
var images = {
|
2603 |
-
loadImage,
|
2604 |
-
preloadImages,
|
2605 |
-
};
|
2606 |
-
|
2607 |
-
function checkOverflow() {
|
2608 |
-
const swiper = this;
|
2609 |
-
const wasLocked = swiper.isLocked;
|
2610 |
-
|
2611 |
-
swiper.isLocked = swiper.snapGrid.length === 1;
|
2612 |
-
swiper.allowSlideNext = !swiper.isLocked;
|
2613 |
-
swiper.allowSlidePrev = !swiper.isLocked;
|
2614 |
-
|
2615 |
-
// events
|
2616 |
-
if (wasLocked !== swiper.isLocked) swiper.emit(swiper.isLocked ? 'lock' : 'unlock');
|
2617 |
-
|
2618 |
-
if (wasLocked && wasLocked !== swiper.isLocked) {
|
2619 |
-
swiper.isEnd = false;
|
2620 |
-
swiper.navigation.update();
|
2621 |
-
}
|
2622 |
-
}
|
2623 |
-
|
2624 |
-
var checkOverflow$1 = { checkOverflow };
|
2625 |
-
|
2626 |
-
var defaults = {
|
2627 |
-
init: true,
|
2628 |
-
direction: 'horizontal',
|
2629 |
-
touchEventsTarget: 'container',
|
2630 |
-
initialSlide: 0,
|
2631 |
-
speed: 300,
|
2632 |
-
//
|
2633 |
-
preventInteractionOnTransition: false,
|
2634 |
-
|
2635 |
-
// To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).
|
2636 |
-
edgeSwipeDetection: false,
|
2637 |
-
edgeSwipeThreshold: 20,
|
2638 |
-
|
2639 |
-
// Free mode
|
2640 |
-
freeMode: false,
|
2641 |
-
freeModeMomentum: true,
|
2642 |
-
freeModeMomentumRatio: 1,
|
2643 |
-
freeModeMomentumBounce: true,
|
2644 |
-
freeModeMomentumBounceRatio: 1,
|
2645 |
-
freeModeMomentumVelocityRatio: 1,
|
2646 |
-
freeModeSticky: false,
|
2647 |
-
freeModeMinimumVelocity: 0.02,
|
2648 |
-
|
2649 |
-
// Autoheight
|
2650 |
-
autoHeight: false,
|
2651 |
-
|
2652 |
-
// Set wrapper width
|
2653 |
-
setWrapperSize: false,
|
2654 |
-
|
2655 |
-
// Virtual Translate
|
2656 |
-
virtualTranslate: false,
|
2657 |
-
|
2658 |
-
// Effects
|
2659 |
-
effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
|
2660 |
-
|
2661 |
-
// Breakpoints
|
2662 |
-
breakpoints: undefined,
|
2663 |
-
breakpointsInverse: false,
|
2664 |
-
|
2665 |
-
// Slides grid
|
2666 |
-
spaceBetween: 0,
|
2667 |
-
slidesPerView: 1,
|
2668 |
-
slidesPerColumn: 1,
|
2669 |
-
slidesPerColumnFill: 'column',
|
2670 |
-
slidesPerGroup: 1,
|
2671 |
-
centeredSlides: false,
|
2672 |
-
slidesOffsetBefore: 0, // in px
|
2673 |
-
slidesOffsetAfter: 0, // in px
|
2674 |
-
normalizeSlideIndex: true,
|
2675 |
-
centerInsufficientSlides: false,
|
2676 |
-
|
2677 |
-
// Disable swiper and hide navigation when container not overflow
|
2678 |
-
watchOverflow: false,
|
2679 |
-
|
2680 |
-
// Round length
|
2681 |
-
roundLengths: false,
|
2682 |
-
|
2683 |
-
// Touches
|
2684 |
-
touchRatio: 1,
|
2685 |
-
touchAngle: 45,
|
2686 |
-
simulateTouch: true,
|
2687 |
-
shortSwipes: true,
|
2688 |
-
longSwipes: true,
|
2689 |
-
longSwipesRatio: 0.5,
|
2690 |
-
longSwipesMs: 300,
|
2691 |
-
followFinger: true,
|
2692 |
-
allowTouchMove: true,
|
2693 |
-
threshold: 0,
|
2694 |
-
touchMoveStopPropagation: true,
|
2695 |
-
touchStartPreventDefault: true,
|
2696 |
-
touchStartForcePreventDefault: false,
|
2697 |
-
touchReleaseOnEdges: false,
|
2698 |
-
|
2699 |
-
// Unique Navigation Elements
|
2700 |
-
uniqueNavElements: true,
|
2701 |
-
|
2702 |
-
// Resistance
|
2703 |
-
resistance: true,
|
2704 |
-
resistanceRatio: 0.85,
|
2705 |
-
|
2706 |
-
// Progress
|
2707 |
-
watchSlidesProgress: false,
|
2708 |
-
watchSlidesVisibility: false,
|
2709 |
-
|
2710 |
-
// Cursor
|
2711 |
-
grabCursor: false,
|
2712 |
-
|
2713 |
-
// Clicks
|
2714 |
-
preventClicks: true,
|
2715 |
-
preventClicksPropagation: true,
|
2716 |
-
slideToClickedSlide: false,
|
2717 |
-
|
2718 |
-
// Images
|
2719 |
-
preloadImages: true,
|
2720 |
-
updateOnImagesReady: true,
|
2721 |
-
|
2722 |
-
// loop
|
2723 |
-
loop: false,
|
2724 |
-
loopAdditionalSlides: 0,
|
2725 |
-
loopedSlides: null,
|
2726 |
-
loopFillGroupWithBlank: false,
|
2727 |
-
|
2728 |
-
// Swiping/no swiping
|
2729 |
-
allowSlidePrev: true,
|
2730 |
-
allowSlideNext: true,
|
2731 |
-
swipeHandler: null, // '.swipe-handler',
|
2732 |
-
noSwiping: true,
|
2733 |
-
noSwipingClass: 'swiper-no-swiping',
|
2734 |
-
noSwipingSelector: null,
|
2735 |
-
|
2736 |
-
// Passive Listeners
|
2737 |
-
passiveListeners: true,
|
2738 |
-
|
2739 |
-
// NS
|
2740 |
-
containerModifierClass: 'swiper-container-', // NEW
|
2741 |
-
slideClass: 'swiper-slide',
|
2742 |
-
slideBlankClass: 'swiper-slide-invisible-blank',
|
2743 |
-
slideActiveClass: 'swiper-slide-active',
|
2744 |
-
slideDuplicateActiveClass: 'swiper-slide-duplicate-active',
|
2745 |
-
slideVisibleClass: 'swiper-slide-visible',
|
2746 |
-
slideDuplicateClass: 'swiper-slide-duplicate',
|
2747 |
-
slideNextClass: 'swiper-slide-next',
|
2748 |
-
slideDuplicateNextClass: 'swiper-slide-duplicate-next',
|
2749 |
-
slidePrevClass: 'swiper-slide-prev',
|
2750 |
-
slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',
|
2751 |
-
wrapperClass: 'swiper-wrapper',
|
2752 |
-
|
2753 |
-
// Callbacks
|
2754 |
-
runCallbacksOnInit: true,
|
2755 |
-
};
|
2756 |
-
|
2757 |
-
const prototypes = {
|
2758 |
-
update,
|
2759 |
-
translate,
|
2760 |
-
transition: transition$1,
|
2761 |
-
slide,
|
2762 |
-
loop,
|
2763 |
-
grabCursor,
|
2764 |
-
manipulation,
|
2765 |
-
events,
|
2766 |
-
breakpoints,
|
2767 |
-
checkOverflow: checkOverflow$1,
|
2768 |
-
classes,
|
2769 |
-
images,
|
2770 |
-
};
|
2771 |
-
|
2772 |
-
const extendedDefaults = {};
|
2773 |
-
|
2774 |
-
class Swiper extends SwiperClass {
|
2775 |
-
constructor(...args) {
|
2776 |
-
let el;
|
2777 |
-
let params;
|
2778 |
-
if (args.length === 1 && args[0].constructor && args[0].constructor === Object) {
|
2779 |
-
params = args[0];
|
2780 |
-
} else {
|
2781 |
-
[el, params] = args;
|
2782 |
-
}
|
2783 |
-
if (!params) params = {};
|
2784 |
-
|
2785 |
-
params = Utils.extend({}, params);
|
2786 |
-
if (el && !params.el) params.el = el;
|
2787 |
-
|
2788 |
-
super(params);
|
2789 |
-
|
2790 |
-
Object.keys(prototypes).forEach((prototypeGroup) => {
|
2791 |
-
Object.keys(prototypes[prototypeGroup]).forEach((protoMethod) => {
|
2792 |
-
if (!Swiper.prototype[protoMethod]) {
|
2793 |
-
Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];
|
2794 |
-
}
|
2795 |
-
});
|
2796 |
-
});
|
2797 |
-
|
2798 |
-
// Swiper Instance
|
2799 |
-
const swiper = this;
|
2800 |
-
if (typeof swiper.modules === 'undefined') {
|
2801 |
-
swiper.modules = {};
|
2802 |
-
}
|
2803 |
-
Object.keys(swiper.modules).forEach((moduleName) => {
|
2804 |
-
const module = swiper.modules[moduleName];
|
2805 |
-
if (module.params) {
|
2806 |
-
const moduleParamName = Object.keys(module.params)[0];
|
2807 |
-
const moduleParams = module.params[moduleParamName];
|
2808 |
-
if (typeof moduleParams !== 'object' || moduleParams === null) return;
|
2809 |
-
if (!(moduleParamName in params && 'enabled' in moduleParams)) return;
|
2810 |
-
if (params[moduleParamName] === true) {
|
2811 |
-
params[moduleParamName] = { enabled: true };
|
2812 |
-
}
|
2813 |
-
if (
|
2814 |
-
typeof params[moduleParamName] === 'object'
|
2815 |
-
&& !('enabled' in params[moduleParamName])
|
2816 |
-
) {
|
2817 |
-
params[moduleParamName].enabled = true;
|
2818 |
-
}
|
2819 |
-
if (!params[moduleParamName]) params[moduleParamName] = { enabled: false };
|
2820 |
-
}
|
2821 |
-
});
|
2822 |
-
|
2823 |
-
// Extend defaults with modules params
|
2824 |
-
const swiperParams = Utils.extend({}, defaults);
|
2825 |
-
swiper.useModulesParams(swiperParams);
|
2826 |
-
|
2827 |
-
// Extend defaults with passed params
|
2828 |
-
swiper.params = Utils.extend({}, swiperParams, extendedDefaults, params);
|
2829 |
-
swiper.originalParams = Utils.extend({}, swiper.params);
|
2830 |
-
swiper.passedParams = Utils.extend({}, params);
|
2831 |
-
|
2832 |
-
// Save Dom lib
|
2833 |
-
swiper.$ = $;
|
2834 |
-
|
2835 |
-
// Find el
|
2836 |
-
const $el = $(swiper.params.el);
|
2837 |
-
el = $el[0];
|
2838 |
-
|
2839 |
-
if (!el) {
|
2840 |
-
return undefined;
|
2841 |
-
}
|
2842 |
-
|
2843 |
-
if ($el.length > 1) {
|
2844 |
-
const swipers = [];
|
2845 |
-
$el.each((index$$1, containerEl) => {
|
2846 |
-
const newParams = Utils.extend({}, params, { el: containerEl });
|
2847 |
-
swipers.push(new Swiper(newParams));
|
2848 |
-
});
|
2849 |
-
return swipers;
|
2850 |
-
}
|
2851 |
-
|
2852 |
-
el.swiper = swiper;
|
2853 |
-
$el.data('swiper', swiper);
|
2854 |
-
|
2855 |
-
// Find Wrapper
|
2856 |
-
const $wrapperEl = $el.children(`.${swiper.params.wrapperClass}`);
|
2857 |
-
|
2858 |
-
// Extend Swiper
|
2859 |
-
Utils.extend(swiper, {
|
2860 |
-
$el,
|
2861 |
-
el,
|
2862 |
-
$wrapperEl,
|
2863 |
-
wrapperEl: $wrapperEl[0],
|
2864 |
-
|
2865 |
-
// Classes
|
2866 |
-
classNames: [],
|
2867 |
-
|
2868 |
-
// Slides
|
2869 |
-
slides: $(),
|
2870 |
-
slidesGrid: [],
|
2871 |
-
snapGrid: [],
|
2872 |
-
slidesSizesGrid: [],
|
2873 |
-
|
2874 |
-
// isDirection
|
2875 |
-
isHorizontal() {
|
2876 |
-
return swiper.params.direction === 'horizontal';
|
2877 |
-
},
|
2878 |
-
isVertical() {
|
2879 |
-
return swiper.params.direction === 'vertical';
|
2880 |
-
},
|
2881 |
-
// RTL
|
2882 |
-
rtl: (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),
|
2883 |
-
rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),
|
2884 |
-
wrongRTL: $wrapperEl.css('display') === '-webkit-box',
|
2885 |
-
|
2886 |
-
// Indexes
|
2887 |
-
activeIndex: 0,
|
2888 |
-
realIndex: 0,
|
2889 |
-
|
2890 |
-
//
|
2891 |
-
isBeginning: true,
|
2892 |
-
isEnd: false,
|
2893 |
-
|
2894 |
-
// Props
|
2895 |
-
translate: 0,
|
2896 |
-
previousTranslate: 0,
|
2897 |
-
progress: 0,
|
2898 |
-
velocity: 0,
|
2899 |
-
animating: false,
|
2900 |
-
|
2901 |
-
// Locks
|
2902 |
-
allowSlideNext: swiper.params.allowSlideNext,
|
2903 |
-
allowSlidePrev: swiper.params.allowSlidePrev,
|
2904 |
-
|
2905 |
-
// Touch Events
|
2906 |
-
touchEvents: (function touchEvents() {
|
2907 |
-
const touch = ['touchstart', 'touchmove', 'touchend'];
|
2908 |
-
let desktop = ['mousedown', 'mousemove', 'mouseup'];
|
2909 |
-
if (Support.pointerEvents) {
|
2910 |
-
desktop = ['pointerdown', 'pointermove', 'pointerup'];
|
2911 |
-
} else if (Support.prefixedPointerEvents) {
|
2912 |
-
desktop = ['MSPointerDown', 'MSPointerMove', 'MSPointerUp'];
|
2913 |
-
}
|
2914 |
-
swiper.touchEventsTouch = {
|
2915 |
-
start: touch[0],
|
2916 |
-
move: touch[1],
|
2917 |
-
end: touch[2],
|
2918 |
-
};
|
2919 |
-
swiper.touchEventsDesktop = {
|
2920 |
-
start: desktop[0],
|
2921 |
-
move: desktop[1],
|
2922 |
-
end: desktop[2],
|
2923 |
-
};
|
2924 |
-
return Support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop;
|
2925 |
-
}()),
|
2926 |
-
touchEventsData: {
|
2927 |
-
isTouched: undefined,
|
2928 |
-
isMoved: undefined,
|
2929 |
-
allowTouchCallbacks: undefined,
|
2930 |
-
touchStartTime: undefined,
|
2931 |
-
isScrolling: undefined,
|
2932 |
-
currentTranslate: undefined,
|
2933 |
-
startTranslate: undefined,
|
2934 |
-
allowThresholdMove: undefined,
|
2935 |
-
// Form elements to match
|
2936 |
-
formElements: 'input, select, option, textarea, button, video',
|
2937 |
-
// Last click time
|
2938 |
-
lastClickTime: Utils.now(),
|
2939 |
-
clickTimeout: undefined,
|
2940 |
-
// Velocities
|
2941 |
-
velocities: [],
|
2942 |
-
allowMomentumBounce: undefined,
|
2943 |
-
isTouchEvent: undefined,
|
2944 |
-
startMoving: undefined,
|
2945 |
-
},
|
2946 |
-
|
2947 |
-
// Clicks
|
2948 |
-
allowClick: true,
|
2949 |
-
|
2950 |
-
// Touches
|
2951 |
-
allowTouchMove: swiper.params.allowTouchMove,
|
2952 |
-
|
2953 |
-
touches: {
|
2954 |
-
startX: 0,
|
2955 |
-
startY: 0,
|
2956 |
-
currentX: 0,
|
2957 |
-
currentY: 0,
|
2958 |
-
diff: 0,
|
2959 |
-
},
|
2960 |
-
|
2961 |
-
// Images
|
2962 |
-
imagesToLoad: [],
|
2963 |
-
imagesLoaded: 0,
|
2964 |
-
|
2965 |
-
});
|
2966 |
-
|
2967 |
-
// Install Modules
|
2968 |
-
swiper.useModules();
|
2969 |
-
|
2970 |
-
// Init
|
2971 |
-
if (swiper.params.init) {
|
2972 |
-
swiper.init();
|
2973 |
-
}
|
2974 |
-
|
2975 |
-
// Return app instance
|
2976 |
-
return swiper;
|
2977 |
-
}
|
2978 |
-
|
2979 |
-
slidesPerViewDynamic() {
|
2980 |
-
const swiper = this;
|
2981 |
-
const {
|
2982 |
-
params, slides, slidesGrid, size: swiperSize, activeIndex,
|
2983 |
-
} = swiper;
|
2984 |
-
let spv = 1;
|
2985 |
-
if (params.centeredSlides) {
|
2986 |
-
let slideSize = slides[activeIndex].swiperSlideSize;
|
2987 |
-
let breakLoop;
|
2988 |
-
for (let i = activeIndex + 1; i < slides.length; i += 1) {
|
2989 |
-
if (slides[i] && !breakLoop) {
|
2990 |
-
slideSize += slides[i].swiperSlideSize;
|
2991 |
-
spv += 1;
|
2992 |
-
if (slideSize > swiperSize) breakLoop = true;
|
2993 |
-
}
|
2994 |
-
}
|
2995 |
-
for (let i = activeIndex - 1; i >= 0; i -= 1) {
|
2996 |
-
if (slides[i] && !breakLoop) {
|
2997 |
-
slideSize += slides[i].swiperSlideSize;
|
2998 |
-
spv += 1;
|
2999 |
-
if (slideSize > swiperSize) breakLoop = true;
|
3000 |
-
}
|
3001 |
-
}
|
3002 |
-
} else {
|
3003 |
-
for (let i = activeIndex + 1; i < slides.length; i += 1) {
|
3004 |
-
if (slidesGrid[i] - slidesGrid[activeIndex] < swiperSize) {
|
3005 |
-
spv += 1;
|
3006 |
-
}
|
3007 |
-
}
|
3008 |
-
}
|
3009 |
-
return spv;
|
3010 |
-
}
|
3011 |
-
|
3012 |
-
update() {
|
3013 |
-
const swiper = this;
|
3014 |
-
if (!swiper || swiper.destroyed) return;
|
3015 |
-
const { snapGrid, params } = swiper;
|
3016 |
-
// Breakpoints
|
3017 |
-
if (params.breakpoints) {
|
3018 |
-
swiper.setBreakpoint();
|
3019 |
-
}
|
3020 |
-
swiper.updateSize();
|
3021 |
-
swiper.updateSlides();
|
3022 |
-
swiper.updateProgress();
|
3023 |
-
swiper.updateSlidesClasses();
|
3024 |
-
|
3025 |
-
function setTranslate() {
|
3026 |
-
const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;
|
3027 |
-
const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());
|
3028 |
-
swiper.setTranslate(newTranslate);
|
3029 |
-
swiper.updateActiveIndex();
|
3030 |
-
swiper.updateSlidesClasses();
|
3031 |
-
}
|
3032 |
-
let translated;
|
3033 |
-
if (swiper.params.freeMode) {
|
3034 |
-
setTranslate();
|
3035 |
-
if (swiper.params.autoHeight) {
|
3036 |
-
swiper.updateAutoHeight();
|
3037 |
-
}
|
3038 |
-
} else {
|
3039 |
-
if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
|
3040 |
-
translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true);
|
3041 |
-
} else {
|
3042 |
-
translated = swiper.slideTo(swiper.activeIndex, 0, false, true);
|
3043 |
-
}
|
3044 |
-
if (!translated) {
|
3045 |
-
setTranslate();
|
3046 |
-
}
|
3047 |
-
}
|
3048 |
-
if (params.watchOverflow && snapGrid !== swiper.snapGrid) {
|
3049 |
-
swiper.checkOverflow();
|
3050 |
-
}
|
3051 |
-
swiper.emit('update');
|
3052 |
-
}
|
3053 |
-
|
3054 |
-
init() {
|
3055 |
-
const swiper = this;
|
3056 |
-
if (swiper.initialized) return;
|
3057 |
-
|
3058 |
-
swiper.emit('beforeInit');
|
3059 |
-
|
3060 |
-
// Set breakpoint
|
3061 |
-
if (swiper.params.breakpoints) {
|
3062 |
-
swiper.setBreakpoint();
|
3063 |
-
}
|
3064 |
-
|
3065 |
-
// Add Classes
|
3066 |
-
swiper.addClasses();
|
3067 |
-
|
3068 |
-
// Create loop
|
3069 |
-
if (swiper.params.loop) {
|
3070 |
-
swiper.loopCreate();
|
3071 |
-
}
|
3072 |
-
|
3073 |
-
// Update size
|
3074 |
-
swiper.updateSize();
|
3075 |
-
|
3076 |
-
// Update slides
|
3077 |
-
swiper.updateSlides();
|
3078 |
-
|
3079 |
-
if (swiper.params.watchOverflow) {
|
3080 |
-
swiper.checkOverflow();
|
3081 |
-
}
|
3082 |
-
|
3083 |
-
// Set Grab Cursor
|
3084 |
-
if (swiper.params.grabCursor) {
|
3085 |
-
swiper.setGrabCursor();
|
3086 |
-
}
|
3087 |
-
|
3088 |
-
if (swiper.params.preloadImages) {
|
3089 |
-
swiper.preloadImages();
|
3090 |
-
}
|
3091 |
-
|
3092 |
-
// Slide To Initial Slide
|
3093 |
-
if (swiper.params.loop) {
|
3094 |
-
swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit);
|
3095 |
-
} else {
|
3096 |
-
swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit);
|
3097 |
-
}
|
3098 |
-
|
3099 |
-
// Attach events
|
3100 |
-
swiper.attachEvents();
|
3101 |
-
|
3102 |
-
// Init Flag
|
3103 |
-
swiper.initialized = true;
|
3104 |
-
|
3105 |
-
// Emit
|
3106 |
-
swiper.emit('init');
|
3107 |
-
}
|
3108 |
-
|
3109 |
-
destroy(deleteInstance = true, cleanStyles = true) {
|
3110 |
-
const swiper = this;
|
3111 |
-
const {
|
3112 |
-
params, $el, $wrapperEl, slides,
|
3113 |
-
} = swiper;
|
3114 |
-
|
3115 |
-
if (typeof swiper.params === 'undefined' || swiper.destroyed) {
|
3116 |
-
return null;
|
3117 |
-
}
|
3118 |
-
|
3119 |
-
swiper.emit('beforeDestroy');
|
3120 |
-
|
3121 |
-
// Init Flag
|
3122 |
-
swiper.initialized = false;
|
3123 |
-
|
3124 |
-
// Detach events
|
3125 |
-
swiper.detachEvents();
|
3126 |
-
|
3127 |
-
// Destroy loop
|
3128 |
-
if (params.loop) {
|
3129 |
-
swiper.loopDestroy();
|
3130 |
-
}
|
3131 |
-
|
3132 |
-
// Cleanup styles
|
3133 |
-
if (cleanStyles) {
|
3134 |
-
swiper.removeClasses();
|
3135 |
-
$el.removeAttr('style');
|
3136 |
-
$wrapperEl.removeAttr('style');
|
3137 |
-
if (slides && slides.length) {
|
3138 |
-
slides
|
3139 |
-
.removeClass([
|
3140 |
-
params.slideVisibleClass,
|
3141 |
-
params.slideActiveClass,
|
3142 |
-
params.slideNextClass,
|
3143 |
-
params.slidePrevClass,
|
3144 |
-
].join(' '))
|
3145 |
-
.removeAttr('style')
|
3146 |
-
.removeAttr('data-swiper-slide-index')
|
3147 |
-
.removeAttr('data-swiper-column')
|
3148 |
-
.removeAttr('data-swiper-row');
|
3149 |
-
}
|
3150 |
-
}
|
3151 |
-
|
3152 |
-
swiper.emit('destroy');
|
3153 |
-
|
3154 |
-
// Detach emitter events
|
3155 |
-
Object.keys(swiper.eventsListeners).forEach((eventName) => {
|
3156 |
-
swiper.off(eventName);
|
3157 |
-
});
|
3158 |
-
|
3159 |
-
if (deleteInstance !== false) {
|
3160 |
-
swiper.$el[0].swiper = null;
|
3161 |
-
swiper.$el.data('swiper', null);
|
3162 |
-
Utils.deleteProps(swiper);
|
3163 |
-
}
|
3164 |
-
swiper.destroyed = true;
|
3165 |
-
|
3166 |
-
return null;
|
3167 |
-
}
|
3168 |
-
|
3169 |
-
static extendDefaults(newDefaults) {
|
3170 |
-
Utils.extend(extendedDefaults, newDefaults);
|
3171 |
-
}
|
3172 |
-
|
3173 |
-
static get extendedDefaults() {
|
3174 |
-
return extendedDefaults;
|
3175 |
-
}
|
3176 |
-
|
3177 |
-
static get defaults() {
|
3178 |
-
return defaults;
|
3179 |
-
}
|
3180 |
-
|
3181 |
-
static get Class() {
|
3182 |
-
return SwiperClass;
|
3183 |
-
}
|
3184 |
-
|
3185 |
-
static get $() {
|
3186 |
-
return $;
|
3187 |
-
}
|
3188 |
-
}
|
3189 |
-
|
3190 |
-
var Device$1 = {
|
3191 |
-
name: 'device',
|
3192 |
-
proto: {
|
3193 |
-
device: Device,
|
3194 |
-
},
|
3195 |
-
static: {
|
3196 |
-
device: Device,
|
3197 |
-
},
|
3198 |
-
};
|
3199 |
-
|
3200 |
-
var Support$1 = {
|
3201 |
-
name: 'support',
|
3202 |
-
proto: {
|
3203 |
-
support: Support,
|
3204 |
-
},
|
3205 |
-
static: {
|
3206 |
-
support: Support,
|
3207 |
-
},
|
3208 |
-
};
|
3209 |
-
|
3210 |
-
var Browser$1 = {
|
3211 |
-
name: 'browser',
|
3212 |
-
proto: {
|
3213 |
-
browser: Browser,
|
3214 |
-
},
|
3215 |
-
static: {
|
3216 |
-
browser: Browser,
|
3217 |
-
},
|
3218 |
-
};
|
3219 |
-
|
3220 |
-
var Resize = {
|
3221 |
-
name: 'resize',
|
3222 |
-
create() {
|
3223 |
-
const swiper = this;
|
3224 |
-
Utils.extend(swiper, {
|
3225 |
-
resize: {
|
3226 |
-
resizeHandler() {
|
3227 |
-
if (!swiper || swiper.destroyed || !swiper.initialized) return;
|
3228 |
-
swiper.emit('beforeResize');
|
3229 |
-
swiper.emit('resize');
|
3230 |
-
},
|
3231 |
-
orientationChangeHandler() {
|
3232 |
-
if (!swiper || swiper.destroyed || !swiper.initialized) return;
|
3233 |
-
swiper.emit('orientationchange');
|
3234 |
-
},
|
3235 |
-
},
|
3236 |
-
});
|
3237 |
-
},
|
3238 |
-
on: {
|
3239 |
-
init() {
|
3240 |
-
const swiper = this;
|
3241 |
-
// Emit resize
|
3242 |
-
window.addEventListener('resize', swiper.resize.resizeHandler);
|
3243 |
-
|
3244 |
-
// Emit orientationchange
|
3245 |
-
window.addEventListener('orientationchange', swiper.resize.orientationChangeHandler);
|
3246 |
-
},
|
3247 |
-
destroy() {
|
3248 |
-
const swiper = this;
|
3249 |
-
window.removeEventListener('resize', swiper.resize.resizeHandler);
|
3250 |
-
window.removeEventListener('orientationchange', swiper.resize.orientationChangeHandler);
|
3251 |
-
},
|
3252 |
-
},
|
3253 |
-
};
|
3254 |
-
|
3255 |
-
const Observer = {
|
3256 |
-
func: window.MutationObserver || window.WebkitMutationObserver,
|
3257 |
-
attach(target, options = {}) {
|
3258 |
-
const swiper = this;
|
3259 |
-
|
3260 |
-
const ObserverFunc = Observer.func;
|
3261 |
-
const observer = new ObserverFunc((mutations) => {
|
3262 |
-
// The observerUpdate event should only be triggered
|
3263 |
-
// once despite the number of mutations. Additional
|
3264 |
-
// triggers are redundant and are very costly
|
3265 |
-
if (mutations.length === 1) {
|
3266 |
-
swiper.emit('observerUpdate', mutations[0]);
|
3267 |
-
return;
|
3268 |
-
}
|
3269 |
-
const observerUpdate = function observerUpdate() {
|
3270 |
-
swiper.emit('observerUpdate', mutations[0]);
|
3271 |
-
};
|
3272 |
-
|
3273 |
-
if (window.requestAnimationFrame) {
|
3274 |
-
window.requestAnimationFrame(observerUpdate);
|
3275 |
-
} else {
|
3276 |
-
window.setTimeout(observerUpdate, 0);
|
3277 |
-
}
|
3278 |
-
});
|
3279 |
-
|
3280 |
-
observer.observe(target, {
|
3281 |
-
attributes: typeof options.attributes === 'undefined' ? true : options.attributes,
|
3282 |
-
childList: typeof options.childList === 'undefined' ? true : options.childList,
|
3283 |
-
characterData: typeof options.characterData === 'undefined' ? true : options.characterData,
|
3284 |
-
});
|
3285 |
-
|
3286 |
-
swiper.observer.observers.push(observer);
|
3287 |
-
},
|
3288 |
-
init() {
|
3289 |
-
const swiper = this;
|
3290 |
-
if (!Support.observer || !swiper.params.observer) return;
|
3291 |
-
if (swiper.params.observeParents) {
|
3292 |
-
const containerParents = swiper.$el.parents();
|
3293 |
-
for (let i = 0; i < containerParents.length; i += 1) {
|
3294 |
-
swiper.observer.attach(containerParents[i]);
|
3295 |
-
}
|
3296 |
-
}
|
3297 |
-
// Observe container
|
3298 |
-
swiper.observer.attach(swiper.$el[0], { childList: swiper.params.observeSlideChildren });
|
3299 |
-
|
3300 |
-
// Observe wrapper
|
3301 |
-
swiper.observer.attach(swiper.$wrapperEl[0], { attributes: false });
|
3302 |
-
},
|
3303 |
-
destroy() {
|
3304 |
-
const swiper = this;
|
3305 |
-
swiper.observer.observers.forEach((observer) => {
|
3306 |
-
observer.disconnect();
|
3307 |
-
});
|
3308 |
-
swiper.observer.observers = [];
|
3309 |
-
},
|
3310 |
-
};
|
3311 |
-
|
3312 |
-
var Observer$1 = {
|
3313 |
-
name: 'observer',
|
3314 |
-
params: {
|
3315 |
-
observer: false,
|
3316 |
-
observeParents: false,
|
3317 |
-
observeSlideChildren: false,
|
3318 |
-
},
|
3319 |
-
create() {
|
3320 |
-
const swiper = this;
|
3321 |
-
Utils.extend(swiper, {
|
3322 |
-
observer: {
|
3323 |
-
init: Observer.init.bind(swiper),
|
3324 |
-
attach: Observer.attach.bind(swiper),
|
3325 |
-
destroy: Observer.destroy.bind(swiper),
|
3326 |
-
observers: [],
|
3327 |
-
},
|
3328 |
-
});
|
3329 |
-
},
|
3330 |
-
on: {
|
3331 |
-
init() {
|
3332 |
-
const swiper = this;
|
3333 |
-
swiper.observer.init();
|
3334 |
-
},
|
3335 |
-
destroy() {
|
3336 |
-
const swiper = this;
|
3337 |
-
swiper.observer.destroy();
|
3338 |
-
},
|
3339 |
-
},
|
3340 |
-
};
|
3341 |
-
|
3342 |
-
const Virtual = {
|
3343 |
-
update(force) {
|
3344 |
-
const swiper = this;
|
3345 |
-
const { slidesPerView, slidesPerGroup, centeredSlides } = swiper.params;
|
3346 |
-
const { addSlidesBefore, addSlidesAfter } = swiper.params.virtual;
|
3347 |
-
const {
|
3348 |
-
from: previousFrom,
|
3349 |
-
to: previousTo,
|
3350 |
-
slides,
|
3351 |
-
slidesGrid: previousSlidesGrid,
|
3352 |
-
renderSlide,
|
3353 |
-
offset: previousOffset,
|
3354 |
-
} = swiper.virtual;
|
3355 |
-
swiper.updateActiveIndex();
|
3356 |
-
const activeIndex = swiper.activeIndex || 0;
|
3357 |
-
|
3358 |
-
let offsetProp;
|
3359 |
-
if (swiper.rtlTranslate) offsetProp = 'right';
|
3360 |
-
else offsetProp = swiper.isHorizontal() ? 'left' : 'top';
|
3361 |
-
|
3362 |
-
let slidesAfter;
|
3363 |
-
let slidesBefore;
|
3364 |
-
if (centeredSlides) {
|
3365 |
-
slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore;
|
3366 |
-
slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter;
|
3367 |
-
} else {
|
3368 |
-
slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesBefore;
|
3369 |
-
slidesBefore = slidesPerGroup + addSlidesAfter;
|
3370 |
-
}
|
3371 |
-
const from = Math.max((activeIndex || 0) - slidesBefore, 0);
|
3372 |
-
const to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1);
|
3373 |
-
const offset$$1 = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0);
|
3374 |
-
|
3375 |
-
Utils.extend(swiper.virtual, {
|
3376 |
-
from,
|
3377 |
-
to,
|
3378 |
-
offset: offset$$1,
|
3379 |
-
slidesGrid: swiper.slidesGrid,
|
3380 |
-
});
|
3381 |
-
|
3382 |
-
function onRendered() {
|
3383 |
-
swiper.updateSlides();
|
3384 |
-
swiper.updateProgress();
|
3385 |
-
swiper.updateSlidesClasses();
|
3386 |
-
if (swiper.lazy && swiper.params.lazy.enabled) {
|
3387 |
-
swiper.lazy.load();
|
3388 |
-
}
|
3389 |
-
}
|
3390 |
-
|
3391 |
-
if (previousFrom === from && previousTo === to && !force) {
|
3392 |
-
if (swiper.slidesGrid !== previousSlidesGrid && offset$$1 !== previousOffset) {
|
3393 |
-
swiper.slides.css(offsetProp, `${offset$$1}px`);
|
3394 |
-
}
|
3395 |
-
swiper.updateProgress();
|
3396 |
-
return;
|
3397 |
-
}
|
3398 |
-
if (swiper.params.virtual.renderExternal) {
|
3399 |
-
swiper.params.virtual.renderExternal.call(swiper, {
|
3400 |
-
offset: offset$$1,
|
3401 |
-
from,
|
3402 |
-
to,
|
3403 |
-
slides: (function getSlides() {
|
3404 |
-
const slidesToRender = [];
|
3405 |
-
for (let i = from; i <= to; i += 1) {
|
3406 |
-
slidesToRender.push(slides[i]);
|
3407 |
-
}
|
3408 |
-
return slidesToRender;
|
3409 |
-
}()),
|
3410 |
-
});
|
3411 |
-
onRendered();
|
3412 |
-
return;
|
3413 |
-
}
|
3414 |
-
const prependIndexes = [];
|
3415 |
-
const appendIndexes = [];
|
3416 |
-
if (force) {
|
3417 |
-
swiper.$wrapperEl.find(`.${swiper.params.slideClass}`).remove();
|
3418 |
-
} else {
|
3419 |
-
for (let i = previousFrom; i <= previousTo; i += 1) {
|
3420 |
-
if (i < from || i > to) {
|
3421 |
-
swiper.$wrapperEl.find(`.${swiper.params.slideClass}[data-swiper-slide-index="${i}"]`).remove();
|
3422 |
-
}
|
3423 |
-
}
|
3424 |
-
}
|
3425 |
-
for (let i = 0; i < slides.length; i += 1) {
|
3426 |
-
if (i >= from && i <= to) {
|
3427 |
-
if (typeof previousTo === 'undefined' || force) {
|
3428 |
-
appendIndexes.push(i);
|
3429 |
-
} else {
|
3430 |
-
if (i > previousTo) appendIndexes.push(i);
|
3431 |
-
if (i < previousFrom) prependIndexes.push(i);
|
3432 |
-
}
|
3433 |
-
}
|
3434 |
-
}
|
3435 |
-
appendIndexes.forEach((index$$1) => {
|
3436 |
-
swiper.$wrapperEl.append(renderSlide(slides[index$$1], index$$1));
|
3437 |
-
});
|
3438 |
-
prependIndexes.sort((a, b) => b - a).forEach((index$$1) => {
|
3439 |
-
swiper.$wrapperEl.prepend(renderSlide(slides[index$$1], index$$1));
|
3440 |
-
});
|
3441 |
-
swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, `${offset$$1}px`);
|
3442 |
-
onRendered();
|
3443 |
-
},
|
3444 |
-
renderSlide(slide, index$$1) {
|
3445 |
-
const swiper = this;
|
3446 |
-
const params = swiper.params.virtual;
|
3447 |
-
if (params.cache && swiper.virtual.cache[index$$1]) {
|
3448 |
-
return swiper.virtual.cache[index$$1];
|
3449 |
-
}
|
3450 |
-
const $slideEl = params.renderSlide
|
3451 |
-
? $(params.renderSlide.call(swiper, slide, index$$1))
|
3452 |
-
: $(`<div class="${swiper.params.slideClass}" data-swiper-slide-index="${index$$1}">${slide}</div>`);
|
3453 |
-
if (!$slideEl.attr('data-swiper-slide-index')) $slideEl.attr('data-swiper-slide-index', index$$1);
|
3454 |
-
if (params.cache) swiper.virtual.cache[index$$1] = $slideEl;
|
3455 |
-
return $slideEl;
|
3456 |
-
},
|
3457 |
-
appendSlide(slide) {
|
3458 |
-
const swiper = this;
|
3459 |
-
swiper.virtual.slides.push(slide);
|
3460 |
-
swiper.virtual.update(true);
|
3461 |
-
},
|
3462 |
-
prependSlide(slide) {
|
3463 |
-
const swiper = this;
|
3464 |
-
swiper.virtual.slides.unshift(slide);
|
3465 |
-
if (swiper.params.virtual.cache) {
|
3466 |
-
const cache = swiper.virtual.cache;
|
3467 |
-
const newCache = {};
|
3468 |
-
Object.keys(cache).forEach((cachedIndex) => {
|
3469 |
-
newCache[cachedIndex + 1] = cache[cachedIndex];
|
3470 |
-
});
|
3471 |
-
swiper.virtual.cache = newCache;
|
3472 |
-
}
|
3473 |
-
swiper.virtual.update(true);
|
3474 |
-
swiper.slideNext(0);
|
3475 |
-
},
|
3476 |
-
};
|
3477 |
-
|
3478 |
-
var Virtual$1 = {
|
3479 |
-
name: 'virtual',
|
3480 |
-
params: {
|
3481 |
-
virtual: {
|
3482 |
-
enabled: false,
|
3483 |
-
slides: [],
|
3484 |
-
cache: true,
|
3485 |
-
renderSlide: null,
|
3486 |
-
renderExternal: null,
|
3487 |
-
addSlidesBefore: 0,
|
3488 |
-
addSlidesAfter: 0,
|
3489 |
-
},
|
3490 |
-
},
|
3491 |
-
create() {
|
3492 |
-
const swiper = this;
|
3493 |
-
Utils.extend(swiper, {
|
3494 |
-
virtual: {
|
3495 |
-
update: Virtual.update.bind(swiper),
|
3496 |
-
appendSlide: Virtual.appendSlide.bind(swiper),
|
3497 |
-
prependSlide: Virtual.prependSlide.bind(swiper),
|
3498 |
-
renderSlide: Virtual.renderSlide.bind(swiper),
|
3499 |
-
slides: swiper.params.virtual.slides,
|
3500 |
-
cache: {},
|
3501 |
-
},
|
3502 |
-
});
|
3503 |
-
},
|
3504 |
-
on: {
|
3505 |
-
beforeInit() {
|
3506 |
-
const swiper = this;
|
3507 |
-
if (!swiper.params.virtual.enabled) return;
|
3508 |
-
swiper.classNames.push(`${swiper.params.containerModifierClass}virtual`);
|
3509 |
-
const overwriteParams = {
|
3510 |
-
watchSlidesProgress: true,
|
3511 |
-
};
|
3512 |
-
Utils.extend(swiper.params, overwriteParams);
|
3513 |
-
Utils.extend(swiper.originalParams, overwriteParams);
|
3514 |
-
|
3515 |
-
if (!swiper.params.initialSlide) {
|
3516 |
-
swiper.virtual.update();
|
3517 |
-
}
|
3518 |
-
},
|
3519 |
-
setTranslate() {
|
3520 |
-
const swiper = this;
|
3521 |
-
if (!swiper.params.virtual.enabled) return;
|
3522 |
-
swiper.virtual.update();
|
3523 |
-
},
|
3524 |
-
},
|
3525 |
-
};
|
3526 |
-
|
3527 |
-
const Keyboard = {
|
3528 |
-
handle(event) {
|
3529 |
-
const swiper = this;
|
3530 |
-
const { rtlTranslate: rtl } = swiper;
|
3531 |
-
let e = event;
|
3532 |
-
if (e.originalEvent) e = e.originalEvent; // jquery fix
|
3533 |
-
const kc = e.keyCode || e.charCode;
|
3534 |
-
// Directions locks
|
3535 |
-
if (!swiper.allowSlideNext && ((swiper.isHorizontal() && kc === 39) || (swiper.isVertical() && kc === 40))) {
|
3536 |
-
return false;
|
3537 |
-
}
|
3538 |
-
if (!swiper.allowSlidePrev && ((swiper.isHorizontal() && kc === 37) || (swiper.isVertical() && kc === 38))) {
|
3539 |
-
return false;
|
3540 |
-
}
|
3541 |
-
if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {
|
3542 |
-
return undefined;
|
3543 |
-
}
|
3544 |
-
if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) {
|
3545 |
-
return undefined;
|
3546 |
-
}
|
3547 |
-
if (swiper.params.keyboard.onlyInViewport && (kc === 37 || kc === 39 || kc === 38 || kc === 40)) {
|
3548 |
-
let inView = false;
|
3549 |
-
// Check that swiper should be inside of visible area of window
|
3550 |
-
if (swiper.$el.parents(`.${swiper.params.slideClass}`).length > 0 && swiper.$el.parents(`.${swiper.params.slideActiveClass}`).length === 0) {
|
3551 |
-
return undefined;
|
3552 |
-
}
|
3553 |
-
const windowWidth = window.innerWidth;
|
3554 |
-
const windowHeight = window.innerHeight;
|
3555 |
-
const swiperOffset = swiper.$el.offset();
|
3556 |
-
if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft;
|
3557 |
-
const swiperCoord = [
|
3558 |
-
[swiperOffset.left, swiperOffset.top],
|
3559 |
-
[swiperOffset.left + swiper.width, swiperOffset.top],
|
3560 |
-
[swiperOffset.left, swiperOffset.top + swiper.height],
|
3561 |
-
[swiperOffset.left + swiper.width, swiperOffset.top + swiper.height],
|
3562 |
-
];
|
3563 |
-
for (let i = 0; i < swiperCoord.length; i += 1) {
|
3564 |
-
const point = swiperCoord[i];
|
3565 |
-
if (
|
3566 |
-
point[0] >= 0 && point[0] <= windowWidth
|
3567 |
-
&& point[1] >= 0 && point[1] <= windowHeight
|
3568 |
-
) {
|
3569 |
-
inView = true;
|
3570 |
-
}
|
3571 |
-
}
|
3572 |
-
if (!inView) return undefined;
|
3573 |
-
}
|
3574 |
-
if (swiper.isHorizontal()) {
|
3575 |
-
if (kc === 37 || kc === 39) {
|
3576 |
-
if (e.preventDefault) e.preventDefault();
|
3577 |
-
else e.returnValue = false;
|
3578 |
-
}
|
3579 |
-
if ((kc === 39 && !rtl) || (kc === 37 && rtl)) swiper.slideNext();
|
3580 |
-
if ((kc === 37 && !rtl) || (kc === 39 && rtl)) swiper.slidePrev();
|
3581 |
-
} else {
|
3582 |
-
if (kc === 38 || kc === 40) {
|
3583 |
-
if (e.preventDefault) e.preventDefault();
|
3584 |
-
else e.returnValue = false;
|
3585 |
-
}
|
3586 |
-
if (kc === 40) swiper.slideNext();
|
3587 |
-
if (kc === 38) swiper.slidePrev();
|
3588 |
-
}
|
3589 |
-
swiper.emit('keyPress', kc);
|
3590 |
-
return undefined;
|
3591 |
-
},
|
3592 |
-
enable() {
|
3593 |
-
const swiper = this;
|
3594 |
-
if (swiper.keyboard.enabled) return;
|
3595 |
-
$(document).on('keydown', swiper.keyboard.handle);
|
3596 |
-
swiper.keyboard.enabled = true;
|
3597 |
-
},
|
3598 |
-
disable() {
|
3599 |
-
const swiper = this;
|
3600 |
-
if (!swiper.keyboard.enabled) return;
|
3601 |
-
$(document).off('keydown', swiper.keyboard.handle);
|
3602 |
-
swiper.keyboard.enabled = false;
|
3603 |
-
},
|
3604 |
-
};
|
3605 |
-
|
3606 |
-
var Keyboard$1 = {
|
3607 |
-
name: 'keyboard',
|
3608 |
-
params: {
|
3609 |
-
keyboard: {
|
3610 |
-
enabled: false,
|
3611 |
-
onlyInViewport: true,
|
3612 |
-
},
|
3613 |
-
},
|
3614 |
-
create() {
|
3615 |
-
const swiper = this;
|
3616 |
-
Utils.extend(swiper, {
|
3617 |
-
keyboard: {
|
3618 |
-
enabled: false,
|
3619 |
-
enable: Keyboard.enable.bind(swiper),
|
3620 |
-
disable: Keyboard.disable.bind(swiper),
|
3621 |
-
handle: Keyboard.handle.bind(swiper),
|
3622 |
-
},
|
3623 |
-
});
|
3624 |
-
},
|
3625 |
-
on: {
|
3626 |
-
init() {
|
3627 |
-
const swiper = this;
|
3628 |
-
if (swiper.params.keyboard.enabled) {
|
3629 |
-
swiper.keyboard.enable();
|
3630 |
-
}
|
3631 |
-
},
|
3632 |
-
destroy() {
|
3633 |
-
const swiper = this;
|
3634 |
-
if (swiper.keyboard.enabled) {
|
3635 |
-
swiper.keyboard.disable();
|
3636 |
-
}
|
3637 |
-
},
|
3638 |
-
},
|
3639 |
-
};
|
3640 |
-
|
3641 |
-
function isEventSupported() {
|
3642 |
-
const eventName = 'onwheel';
|
3643 |
-
let isSupported = eventName in document;
|
3644 |
-
|
3645 |
-
if (!isSupported) {
|
3646 |
-
const element = document.createElement('div');
|
3647 |
-
element.setAttribute(eventName, 'return;');
|
3648 |
-
isSupported = typeof element[eventName] === 'function';
|
3649 |
-
}
|
3650 |
-
|
3651 |
-
if (!isSupported
|
3652 |
-
&& document.implementation
|
3653 |
-
&& document.implementation.hasFeature
|
3654 |
-
// always returns true in newer browsers as per the standard.
|
3655 |
-
// @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
|
3656 |
-
&& document.implementation.hasFeature('', '') !== true
|
3657 |
-
) {
|
3658 |
-
// This is the only way to test support for the `wheel` event in IE9+.
|
3659 |
-
isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
|
3660 |
-
}
|
3661 |
-
|
3662 |
-
return isSupported;
|
3663 |
-
}
|
3664 |
-
const Mousewheel = {
|
3665 |
-
lastScrollTime: Utils.now(),
|
3666 |
-
event: (function getEvent() {
|
3667 |
-
if (window.navigator.userAgent.indexOf('firefox') > -1) return 'DOMMouseScroll';
|
3668 |
-
return isEventSupported() ? 'wheel' : 'mousewheel';
|
3669 |
-
}()),
|
3670 |
-
normalize(e) {
|
3671 |
-
// Reasonable defaults
|
3672 |
-
const PIXEL_STEP = 10;
|
3673 |
-
const LINE_HEIGHT = 40;
|
3674 |
-
const PAGE_HEIGHT = 800;
|
3675 |
-
|
3676 |
-
let sX = 0;
|
3677 |
-
let sY = 0; // spinX, spinY
|
3678 |
-
let pX = 0;
|
3679 |
-
let pY = 0; // pixelX, pixelY
|
3680 |
-
|
3681 |
-
// Legacy
|
3682 |
-
if ('detail' in e) {
|
3683 |
-
sY = e.detail;
|
3684 |
-
}
|
3685 |
-
if ('wheelDelta' in e) {
|
3686 |
-
sY = -e.wheelDelta / 120;
|
3687 |
-
}
|
3688 |
-
if ('wheelDeltaY' in e) {
|
3689 |
-
sY = -e.wheelDeltaY / 120;
|
3690 |
-
}
|
3691 |
-
if ('wheelDeltaX' in e) {
|
3692 |
-
sX = -e.wheelDeltaX / 120;
|
3693 |
-
}
|
3694 |
-
|
3695 |
-
// side scrolling on FF with DOMMouseScroll
|
3696 |
-
if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) {
|
3697 |
-
sX = sY;
|
3698 |
-
sY = 0;
|
3699 |
-
}
|
3700 |
-
|
3701 |
-
pX = sX * PIXEL_STEP;
|
3702 |
-
pY = sY * PIXEL_STEP;
|
3703 |
-
|
3704 |
-
if ('deltaY' in e) {
|
3705 |
-
pY = e.deltaY;
|
3706 |
-
}
|
3707 |
-
if ('deltaX' in e) {
|
3708 |
-
pX = e.deltaX;
|
3709 |
-
}
|
3710 |
-
|
3711 |
-
if ((pX || pY) && e.deltaMode) {
|
3712 |
-
if (e.deltaMode === 1) { // delta in LINE units
|
3713 |
-
pX *= LINE_HEIGHT;
|
3714 |
-
pY *= LINE_HEIGHT;
|
3715 |
-
} else { // delta in PAGE units
|
3716 |
-
pX *= PAGE_HEIGHT;
|
3717 |
-
pY *= PAGE_HEIGHT;
|
3718 |
-
}
|
3719 |
-
}
|
3720 |
-
|
3721 |
-
// Fall-back if spin cannot be determined
|
3722 |
-
if (pX && !sX) {
|
3723 |
-
sX = (pX < 1) ? -1 : 1;
|
3724 |
-
}
|
3725 |
-
if (pY && !sY) {
|
3726 |
-
sY = (pY < 1) ? -1 : 1;
|
3727 |
-
}
|
3728 |
-
|
3729 |
-
return {
|
3730 |
-
spinX: sX,
|
3731 |
-
spinY: sY,
|
3732 |
-
pixelX: pX,
|
3733 |
-
pixelY: pY,
|
3734 |
-
};
|
3735 |
-
},
|
3736 |
-
handleMouseEnter() {
|
3737 |
-
const swiper = this;
|
3738 |
-
swiper.mouseEntered = true;
|
3739 |
-
},
|
3740 |
-
handleMouseLeave() {
|
3741 |
-
const swiper = this;
|
3742 |
-
swiper.mouseEntered = false;
|
3743 |
-
},
|
3744 |
-
handle(event) {
|
3745 |
-
let e = event;
|
3746 |
-
const swiper = this;
|
3747 |
-
const params = swiper.params.mousewheel;
|
3748 |
-
|
3749 |
-
if (!swiper.mouseEntered && !params.releaseOnEdges) return true;
|
3750 |
-
|
3751 |
-
if (e.originalEvent) e = e.originalEvent; // jquery fix
|
3752 |
-
let delta = 0;
|
3753 |
-
const rtlFactor = swiper.rtlTranslate ? -1 : 1;
|
3754 |
-
|
3755 |
-
const data$$1 = Mousewheel.normalize(e);
|
3756 |
-
|
3757 |
-
if (params.forceToAxis) {
|
3758 |
-
if (swiper.isHorizontal()) {
|
3759 |
-
if (Math.abs(data$$1.pixelX) > Math.abs(data$$1.pixelY)) delta = data$$1.pixelX * rtlFactor;
|
3760 |
-
else return true;
|
3761 |
-
} else if (Math.abs(data$$1.pixelY) > Math.abs(data$$1.pixelX)) delta = data$$1.pixelY;
|
3762 |
-
else return true;
|
3763 |
-
} else {
|
3764 |
-
delta = Math.abs(data$$1.pixelX) > Math.abs(data$$1.pixelY) ? -data$$1.pixelX * rtlFactor : -data$$1.pixelY;
|
3765 |
-
}
|
3766 |
-
|
3767 |
-
if (delta === 0) return true;
|
3768 |
-
|
3769 |
-
if (params.invert) delta = -delta;
|
3770 |
-
|
3771 |
-
if (!swiper.params.freeMode) {
|
3772 |
-
if (Utils.now() - swiper.mousewheel.lastScrollTime > 60) {
|
3773 |
-
if (delta < 0) {
|
3774 |
-
if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) {
|
3775 |
-
swiper.slideNext();
|
3776 |
-
swiper.emit('scroll', e);
|
3777 |
-
} else if (params.releaseOnEdges) return true;
|
3778 |
-
} else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) {
|
3779 |
-
swiper.slidePrev();
|
3780 |
-
swiper.emit('scroll', e);
|
3781 |
-
} else if (params.releaseOnEdges) return true;
|
3782 |
-
}
|
3783 |
-
swiper.mousewheel.lastScrollTime = (new window.Date()).getTime();
|
3784 |
-
} else {
|
3785 |
-
// Freemode or scrollContainer:
|
3786 |
-
if (swiper.params.loop) {
|
3787 |
-
swiper.loopFix();
|
3788 |
-
}
|
3789 |
-
let position = swiper.getTranslate() + (delta * params.sensitivity);
|
3790 |
-
const wasBeginning = swiper.isBeginning;
|
3791 |
-
const wasEnd = swiper.isEnd;
|
3792 |
-
|
3793 |
-
if (position >= swiper.minTranslate()) position = swiper.minTranslate();
|
3794 |
-
if (position <= swiper.maxTranslate()) position = swiper.maxTranslate();
|
3795 |
-
|
3796 |
-
swiper.setTransition(0);
|
3797 |
-
swiper.setTranslate(position);
|
3798 |
-
swiper.updateProgress();
|
3799 |
-
swiper.updateActiveIndex();
|
3800 |
-
swiper.updateSlidesClasses();
|
3801 |
-
|
3802 |
-
if ((!wasBeginning && swiper.isBeginning) || (!wasEnd && swiper.isEnd)) {
|
3803 |
-
swiper.updateSlidesClasses();
|
3804 |
-
}
|
3805 |
-
|
3806 |
-
if (swiper.params.freeModeSticky) {
|
3807 |
-
clearTimeout(swiper.mousewheel.timeout);
|
3808 |
-
swiper.mousewheel.timeout = Utils.nextTick(() => {
|
3809 |
-
swiper.slideToClosest();
|
3810 |
-
}, 300);
|
3811 |
-
}
|
3812 |
-
// Emit event
|
3813 |
-
swiper.emit('scroll', e);
|
3814 |
-
|
3815 |
-
// Stop autoplay
|
3816 |
-
if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop();
|
3817 |
-
// Return page scroll on edge positions
|
3818 |
-
if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true;
|
3819 |
-
}
|
3820 |
-
|
3821 |
-
if (e.preventDefault) e.preventDefault();
|
3822 |
-
else e.returnValue = false;
|
3823 |
-
return false;
|
3824 |
-
},
|
3825 |
-
enable() {
|
3826 |
-
const swiper = this;
|
3827 |
-
if (!Mousewheel.event) return false;
|
3828 |
-
if (swiper.mousewheel.enabled) return false;
|
3829 |
-
let target = swiper.$el;
|
3830 |
-
if (swiper.params.mousewheel.eventsTarged !== 'container') {
|
3831 |
-
target = $(swiper.params.mousewheel.eventsTarged);
|
3832 |
-
}
|
3833 |
-
target.on('mouseenter', swiper.mousewheel.handleMouseEnter);
|
3834 |
-
target.on('mouseleave', swiper.mousewheel.handleMouseLeave);
|
3835 |
-
target.on(Mousewheel.event, swiper.mousewheel.handle);
|
3836 |
-
swiper.mousewheel.enabled = true;
|
3837 |
-
return true;
|
3838 |
-
},
|
3839 |
-
disable() {
|
3840 |
-
const swiper = this;
|
3841 |
-
if (!Mousewheel.event) return false;
|
3842 |
-
if (!swiper.mousewheel.enabled) return false;
|
3843 |
-
let target = swiper.$el;
|
3844 |
-
if (swiper.params.mousewheel.eventsTarged !== 'container') {
|
3845 |
-
target = $(swiper.params.mousewheel.eventsTarged);
|
3846 |
-
}
|
3847 |
-
target.off(Mousewheel.event, swiper.mousewheel.handle);
|
3848 |
-
swiper.mousewheel.enabled = false;
|
3849 |
-
return true;
|
3850 |
-
},
|
3851 |
-
};
|
3852 |
-
|
3853 |
-
var Mousewheel$1 = {
|
3854 |
-
name: 'mousewheel',
|
3855 |
-
params: {
|
3856 |
-
mousewheel: {
|
3857 |
-
enabled: false,
|
3858 |
-
releaseOnEdges: false,
|
3859 |
-
invert: false,
|
3860 |
-
forceToAxis: false,
|
3861 |
-
sensitivity: 1,
|
3862 |
-
eventsTarged: 'container',
|
3863 |
-
},
|
3864 |
-
},
|
3865 |
-
create() {
|
3866 |
-
const swiper = this;
|
3867 |
-
Utils.extend(swiper, {
|
3868 |
-
mousewheel: {
|
3869 |
-
enabled: false,
|
3870 |
-
enable: Mousewheel.enable.bind(swiper),
|
3871 |
-
disable: Mousewheel.disable.bind(swiper),
|
3872 |
-
handle: Mousewheel.handle.bind(swiper),
|
3873 |
-
handleMouseEnter: Mousewheel.handleMouseEnter.bind(swiper),
|
3874 |
-
handleMouseLeave: Mousewheel.handleMouseLeave.bind(swiper),
|
3875 |
-
lastScrollTime: Utils.now(),
|
3876 |
-
},
|
3877 |
-
});
|
3878 |
-
},
|
3879 |
-
on: {
|
3880 |
-
init() {
|
3881 |
-
const swiper = this;
|
3882 |
-
if (swiper.params.mousewheel.enabled) swiper.mousewheel.enable();
|
3883 |
-
},
|
3884 |
-
destroy() {
|
3885 |
-
const swiper = this;
|
3886 |
-
if (swiper.mousewheel.enabled) swiper.mousewheel.disable();
|
3887 |
-
},
|
3888 |
-
},
|
3889 |
-
};
|
3890 |
-
|
3891 |
-
const Navigation = {
|
3892 |
-
update() {
|
3893 |
-
// Update Navigation Buttons
|
3894 |
-
const swiper = this;
|
3895 |
-
const params = swiper.params.navigation;
|
3896 |
-
|
3897 |
-
if (swiper.params.loop) return;
|
3898 |
-
const { $nextEl, $prevEl } = swiper.navigation;
|
3899 |
-
|
3900 |
-
if ($prevEl && $prevEl.length > 0) {
|
3901 |
-
if (swiper.isBeginning) {
|
3902 |
-
$prevEl.addClass(params.disabledClass);
|
3903 |
-
} else {
|
3904 |
-
$prevEl.removeClass(params.disabledClass);
|
3905 |
-
}
|
3906 |
-
$prevEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
|
3907 |
-
}
|
3908 |
-
if ($nextEl && $nextEl.length > 0) {
|
3909 |
-
if (swiper.isEnd) {
|
3910 |
-
$nextEl.addClass(params.disabledClass);
|
3911 |
-
} else {
|
3912 |
-
$nextEl.removeClass(params.disabledClass);
|
3913 |
-
}
|
3914 |
-
$nextEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
|
3915 |
-
}
|
3916 |
-
},
|
3917 |
-
onPrevClick(e) {
|
3918 |
-
const swiper = this;
|
3919 |
-
e.preventDefault();
|
3920 |
-
if (swiper.isBeginning && !swiper.params.loop) return;
|
3921 |
-
swiper.slidePrev();
|
3922 |
-
},
|
3923 |
-
onNextClick(e) {
|
3924 |
-
const swiper = this;
|
3925 |
-
e.preventDefault();
|
3926 |
-
if (swiper.isEnd && !swiper.params.loop) return;
|
3927 |
-
swiper.slideNext();
|
3928 |
-
},
|
3929 |
-
init() {
|
3930 |
-
const swiper = this;
|
3931 |
-
const params = swiper.params.navigation;
|
3932 |
-
if (!(params.nextEl || params.prevEl)) return;
|
3933 |
-
|
3934 |
-
let $nextEl;
|
3935 |
-
let $prevEl;
|
3936 |
-
if (params.nextEl) {
|
3937 |
-
$nextEl = $(params.nextEl);
|
3938 |
-
if (
|
3939 |
-
swiper.params.uniqueNavElements
|
3940 |
-
&& typeof params.nextEl === 'string'
|
3941 |
-
&& $nextEl.length > 1
|
3942 |
-
&& swiper.$el.find(params.nextEl).length === 1
|
3943 |
-
) {
|
3944 |
-
$nextEl = swiper.$el.find(params.nextEl);
|
3945 |
-
}
|
3946 |
-
}
|
3947 |
-
if (params.prevEl) {
|
3948 |
-
$prevEl = $(params.prevEl);
|
3949 |
-
if (
|
3950 |
-
swiper.params.uniqueNavElements
|
3951 |
-
&& typeof params.prevEl === 'string'
|
3952 |
-
&& $prevEl.length > 1
|
3953 |
-
&& swiper.$el.find(params.prevEl).length === 1
|
3954 |
-
) {
|
3955 |
-
$prevEl = swiper.$el.find(params.prevEl);
|
3956 |
-
}
|
3957 |
-
}
|
3958 |
-
|
3959 |
-
if ($nextEl && $nextEl.length > 0) {
|
3960 |
-
$nextEl.on('click', swiper.navigation.onNextClick);
|
3961 |
-
}
|
3962 |
-
if ($prevEl && $prevEl.length > 0) {
|
3963 |
-
$prevEl.on('click', swiper.navigation.onPrevClick);
|
3964 |
-
}
|
3965 |
-
|
3966 |
-
Utils.extend(swiper.navigation, {
|
3967 |
-
$nextEl,
|
3968 |
-
nextEl: $nextEl && $nextEl[0],
|
3969 |
-
$prevEl,
|
3970 |
-
prevEl: $prevEl && $prevEl[0],
|
3971 |
-
});
|
3972 |
-
},
|
3973 |
-
destroy() {
|
3974 |
-
const swiper = this;
|
3975 |
-
const { $nextEl, $prevEl } = swiper.navigation;
|
3976 |
-
if ($nextEl && $nextEl.length) {
|
3977 |
-
$nextEl.off('click', swiper.navigation.onNextClick);
|
3978 |
-
$nextEl.removeClass(swiper.params.navigation.disabledClass);
|
3979 |
-
}
|
3980 |
-
if ($prevEl && $prevEl.length) {
|
3981 |
-
$prevEl.off('click', swiper.navigation.onPrevClick);
|
3982 |
-
$prevEl.removeClass(swiper.params.navigation.disabledClass);
|
3983 |
-
}
|
3984 |
-
},
|
3985 |
-
};
|
3986 |
-
|
3987 |
-
var Navigation$1 = {
|
3988 |
-
name: 'navigation',
|
3989 |
-
params: {
|
3990 |
-
navigation: {
|
3991 |
-
nextEl: null,
|
3992 |
-
prevEl: null,
|
3993 |
-
|
3994 |
-
hideOnClick: false,
|
3995 |
-
disabledClass: 'swiper-button-disabled',
|
3996 |
-
hiddenClass: 'swiper-button-hidden',
|
3997 |
-
lockClass: 'swiper-button-lock',
|
3998 |
-
},
|
3999 |
-
},
|
4000 |
-
create() {
|
4001 |
-
const swiper = this;
|
4002 |
-
Utils.extend(swiper, {
|
4003 |
-
navigation: {
|
4004 |
-
init: Navigation.init.bind(swiper),
|
4005 |
-
update: Navigation.update.bind(swiper),
|
4006 |
-
destroy: Navigation.destroy.bind(swiper),
|
4007 |
-
onNextClick: Navigation.onNextClick.bind(swiper),
|
4008 |
-
onPrevClick: Navigation.onPrevClick.bind(swiper),
|
4009 |
-
},
|
4010 |
-
});
|
4011 |
-
},
|
4012 |
-
on: {
|
4013 |
-
init() {
|
4014 |
-
const swiper = this;
|
4015 |
-
swiper.navigation.init();
|
4016 |
-
swiper.navigation.update();
|
4017 |
-
},
|
4018 |
-
toEdge() {
|
4019 |
-
const swiper = this;
|
4020 |
-
swiper.navigation.update();
|
4021 |
-
},
|
4022 |
-
fromEdge() {
|
4023 |
-
const swiper = this;
|
4024 |
-
swiper.navigation.update();
|
4025 |
-
},
|
4026 |
-
destroy() {
|
4027 |
-
const swiper = this;
|
4028 |
-
swiper.navigation.destroy();
|
4029 |
-
},
|
4030 |
-
click(e) {
|
4031 |
-
const swiper = this;
|
4032 |
-
const { $nextEl, $prevEl } = swiper.navigation;
|
4033 |
-
if (
|
4034 |
-
swiper.params.navigation.hideOnClick
|
4035 |
-
&& !$(e.target).is($prevEl)
|
4036 |
-
&& !$(e.target).is($nextEl)
|
4037 |
-
) {
|
4038 |
-
if ($nextEl) $nextEl.toggleClass(swiper.params.navigation.hiddenClass);
|
4039 |
-
if ($prevEl) $prevEl.toggleClass(swiper.params.navigation.hiddenClass);
|
4040 |
-
}
|
4041 |
-
},
|
4042 |
-
},
|
4043 |
-
};
|
4044 |
-
|
4045 |
-
const Pagination = {
|
4046 |
-
update() {
|
4047 |
-
// Render || Update Pagination bullets/items
|
4048 |
-
const swiper = this;
|
4049 |
-
const rtl = swiper.rtl;
|
4050 |
-
const params = swiper.params.pagination;
|
4051 |
-
if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;
|
4052 |
-
const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
|
4053 |
-
const $el = swiper.pagination.$el;
|
4054 |
-
// Current/Total
|
4055 |
-
let current;
|
4056 |
-
const total = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
|
4057 |
-
if (swiper.params.loop) {
|
4058 |
-
current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup);
|
4059 |
-
if (current > slidesLength - 1 - (swiper.loopedSlides * 2)) {
|
4060 |
-
current -= (slidesLength - (swiper.loopedSlides * 2));
|
4061 |
-
}
|
4062 |
-
if (current > total - 1) current -= total;
|
4063 |
-
if (current < 0 && swiper.params.paginationType !== 'bullets') current = total + current;
|
4064 |
-
} else if (typeof swiper.snapIndex !== 'undefined') {
|
4065 |
-
current = swiper.snapIndex;
|
4066 |
-
} else {
|
4067 |
-
current = swiper.activeIndex || 0;
|
4068 |
-
}
|
4069 |
-
// Types
|
4070 |
-
if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {
|
4071 |
-
const bullets = swiper.pagination.bullets;
|
4072 |
-
let firstIndex;
|
4073 |
-
let lastIndex;
|
4074 |
-
let midIndex;
|
4075 |
-
if (params.dynamicBullets) {
|
4076 |
-
swiper.pagination.bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true);
|
4077 |
-
$el.css(swiper.isHorizontal() ? 'width' : 'height', `${swiper.pagination.bulletSize * (params.dynamicMainBullets + 4)}px`);
|
4078 |
-
if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) {
|
4079 |
-
swiper.pagination.dynamicBulletIndex += (current - swiper.previousIndex);
|
4080 |
-
if (swiper.pagination.dynamicBulletIndex > (params.dynamicMainBullets - 1)) {
|
4081 |
-
swiper.pagination.dynamicBulletIndex = params.dynamicMainBullets - 1;
|
4082 |
-
} else if (swiper.pagination.dynamicBulletIndex < 0) {
|
4083 |
-
swiper.pagination.dynamicBulletIndex = 0;
|
4084 |
-
}
|
4085 |
-
}
|
4086 |
-
firstIndex = current - swiper.pagination.dynamicBulletIndex;
|
4087 |
-
lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);
|
4088 |
-
midIndex = (lastIndex + firstIndex) / 2;
|
4089 |
-
}
|
4090 |
-
bullets.removeClass(`${params.bulletActiveClass} ${params.bulletActiveClass}-next ${params.bulletActiveClass}-next-next ${params.bulletActiveClass}-prev ${params.bulletActiveClass}-prev-prev ${params.bulletActiveClass}-main`);
|
4091 |
-
if ($el.length > 1) {
|
4092 |
-
bullets.each((index$$1, bullet) => {
|
4093 |
-
const $bullet = $(bullet);
|
4094 |
-
const bulletIndex = $bullet.index();
|
4095 |
-
if (bulletIndex === current) {
|
4096 |
-
$bullet.addClass(params.bulletActiveClass);
|
4097 |
-
}
|
4098 |
-
if (params.dynamicBullets) {
|
4099 |
-
if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {
|
4100 |
-
$bullet.addClass(`${params.bulletActiveClass}-main`);
|
4101 |
-
}
|
4102 |
-
if (bulletIndex === firstIndex) {
|
4103 |
-
$bullet
|
4104 |
-
.prev()
|
4105 |
-
.addClass(`${params.bulletActiveClass}-prev`)
|
4106 |
-
.prev()
|
4107 |
-
.addClass(`${params.bulletActiveClass}-prev-prev`);
|
4108 |
-
}
|
4109 |
-
if (bulletIndex === lastIndex) {
|
4110 |
-
$bullet
|
4111 |
-
.next()
|
4112 |
-
.addClass(`${params.bulletActiveClass}-next`)
|
4113 |
-
.next()
|
4114 |
-
.addClass(`${params.bulletActiveClass}-next-next`);
|
4115 |
-
}
|
4116 |
-
}
|
4117 |
-
});
|
4118 |
-
} else {
|
4119 |
-
const $bullet = bullets.eq(current);
|
4120 |
-
$bullet.addClass(params.bulletActiveClass);
|
4121 |
-
if (params.dynamicBullets) {
|
4122 |
-
const $firstDisplayedBullet = bullets.eq(firstIndex);
|
4123 |
-
const $lastDisplayedBullet = bullets.eq(lastIndex);
|
4124 |
-
for (let i = firstIndex; i <= lastIndex; i += 1) {
|
4125 |
-
bullets.eq(i).addClass(`${params.bulletActiveClass}-main`);
|
4126 |
-
}
|
4127 |
-
$firstDisplayedBullet
|
4128 |
-
.prev()
|
4129 |
-
.addClass(`${params.bulletActiveClass}-prev`)
|
4130 |
-
.prev()
|
4131 |
-
.addClass(`${params.bulletActiveClass}-prev-prev`);
|
4132 |
-
$lastDisplayedBullet
|
4133 |
-
.next()
|
4134 |
-
.addClass(`${params.bulletActiveClass}-next`)
|
4135 |
-
.next()
|
4136 |
-
.addClass(`${params.bulletActiveClass}-next-next`);
|
4137 |
-
}
|
4138 |
-
}
|
4139 |
-
if (params.dynamicBullets) {
|
4140 |
-
const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);
|
4141 |
-
const bulletsOffset = (((swiper.pagination.bulletSize * dynamicBulletsLength) - (swiper.pagination.bulletSize)) / 2) - (midIndex * swiper.pagination.bulletSize);
|
4142 |
-
const offsetProp = rtl ? 'right' : 'left';
|
4143 |
-
bullets.css(swiper.isHorizontal() ? offsetProp : 'top', `${bulletsOffset}px`);
|
4144 |
-
}
|
4145 |
-
}
|
4146 |
-
if (params.type === 'fraction') {
|
4147 |
-
$el.find(`.${params.currentClass}`).text(params.formatFractionCurrent(current + 1));
|
4148 |
-
$el.find(`.${params.totalClass}`).text(params.formatFractionTotal(total));
|
4149 |
-
}
|
4150 |
-
if (params.type === 'progressbar') {
|
4151 |
-
let progressbarDirection;
|
4152 |
-
if (params.progressbarOpposite) {
|
4153 |
-
progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';
|
4154 |
-
} else {
|
4155 |
-
progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';
|
4156 |
-
}
|
4157 |
-
const scale = (current + 1) / total;
|
4158 |
-
let scaleX = 1;
|
4159 |
-
let scaleY = 1;
|
4160 |
-
if (progressbarDirection === 'horizontal') {
|
4161 |
-
scaleX = scale;
|
4162 |
-
} else {
|
4163 |
-
scaleY = scale;
|
4164 |
-
}
|
4165 |
-
$el.find(`.${params.progressbarFillClass}`).transform(`translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`).transition(swiper.params.speed);
|
4166 |
-
}
|
4167 |
-
if (params.type === 'custom' && params.renderCustom) {
|
4168 |
-
$el.html(params.renderCustom(swiper, current + 1, total));
|
4169 |
-
swiper.emit('paginationRender', swiper, $el[0]);
|
4170 |
-
} else {
|
4171 |
-
swiper.emit('paginationUpdate', swiper, $el[0]);
|
4172 |
-
}
|
4173 |
-
$el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
|
4174 |
-
},
|
4175 |
-
render() {
|
4176 |
-
// Render Container
|
4177 |
-
const swiper = this;
|
4178 |
-
const params = swiper.params.pagination;
|
4179 |
-
if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;
|
4180 |
-
const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
|
4181 |
-
|
4182 |
-
const $el = swiper.pagination.$el;
|
4183 |
-
let paginationHTML = '';
|
4184 |
-
if (params.type === 'bullets') {
|
4185 |
-
const numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
|
4186 |
-
for (let i = 0; i < numberOfBullets; i += 1) {
|
4187 |
-
if (params.renderBullet) {
|
4188 |
-
paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);
|
4189 |
-
} else {
|
4190 |
-
paginationHTML += `<${params.bulletElement} class="${params.bulletClass}"></${params.bulletElement}>`;
|
4191 |
-
}
|
4192 |
-
}
|
4193 |
-
$el.html(paginationHTML);
|
4194 |
-
swiper.pagination.bullets = $el.find(`.${params.bulletClass}`);
|
4195 |
-
}
|
4196 |
-
if (params.type === 'fraction') {
|
4197 |
-
if (params.renderFraction) {
|
4198 |
-
paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);
|
4199 |
-
} else {
|
4200 |
-
paginationHTML = `<span class="${params.currentClass}"></span>`
|
4201 |
-
+ ' / '
|
4202 |
-
+ `<span class="${params.totalClass}"></span>`;
|
4203 |
-
}
|
4204 |
-
$el.html(paginationHTML);
|
4205 |
-
}
|
4206 |
-
if (params.type === 'progressbar') {
|
4207 |
-
if (params.renderProgressbar) {
|
4208 |
-
paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);
|
4209 |
-
} else {
|
4210 |
-
paginationHTML = `<span class="${params.progressbarFillClass}"></span>`;
|
4211 |
-
}
|
4212 |
-
$el.html(paginationHTML);
|
4213 |
-
}
|
4214 |
-
if (params.type !== 'custom') {
|
4215 |
-
swiper.emit('paginationRender', swiper.pagination.$el[0]);
|
4216 |
-
}
|
4217 |
-
},
|
4218 |
-
init() {
|
4219 |
-
const swiper = this;
|
4220 |
-
const params = swiper.params.pagination;
|
4221 |
-
if (!params.el) return;
|
4222 |
-
|
4223 |
-
let $el = $(params.el);
|
4224 |
-
if ($el.length === 0) return;
|
4225 |
-
|
4226 |
-
if (
|
4227 |
-
swiper.params.uniqueNavElements
|
4228 |
-
&& typeof params.el === 'string'
|
4229 |
-
&& $el.length > 1
|
4230 |
-
&& swiper.$el.find(params.el).length === 1
|
4231 |
-
) {
|
4232 |
-
$el = swiper.$el.find(params.el);
|
4233 |
-
}
|
4234 |
-
|
4235 |
-
if (params.type === 'bullets' && params.clickable) {
|
4236 |
-
$el.addClass(params.clickableClass);
|
4237 |
-
}
|
4238 |
-
|
4239 |
-
$el.addClass(params.modifierClass + params.type);
|
4240 |
-
|
4241 |
-
if (params.type === 'bullets' && params.dynamicBullets) {
|
4242 |
-
$el.addClass(`${params.modifierClass}${params.type}-dynamic`);
|
4243 |
-
swiper.pagination.dynamicBulletIndex = 0;
|
4244 |
-
if (params.dynamicMainBullets < 1) {
|
4245 |
-
params.dynamicMainBullets = 1;
|
4246 |
-
}
|
4247 |
-
}
|
4248 |
-
if (params.type === 'progressbar' && params.progressbarOpposite) {
|
4249 |
-
$el.addClass(params.progressbarOppositeClass);
|
4250 |
-
}
|
4251 |
-
|
4252 |
-
if (params.clickable) {
|
4253 |
-
$el.on('click', `.${params.bulletClass}`, function onClick(e) {
|
4254 |
-
e.preventDefault();
|
4255 |
-
let index$$1 = $(this).index() * swiper.params.slidesPerGroup;
|
4256 |
-
if (swiper.params.loop) index$$1 += swiper.loopedSlides;
|
4257 |
-
swiper.slideTo(index$$1);
|
4258 |
-
});
|
4259 |
-
}
|
4260 |
-
|
4261 |
-
Utils.extend(swiper.pagination, {
|
4262 |
-
$el,
|
4263 |
-
el: $el[0],
|
4264 |
-
});
|
4265 |
-
},
|
4266 |
-
destroy() {
|
4267 |
-
const swiper = this;
|
4268 |
-
const params = swiper.params.pagination;
|
4269 |
-
if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;
|
4270 |
-
const $el = swiper.pagination.$el;
|
4271 |
-
|
4272 |
-
$el.removeClass(params.hiddenClass);
|
4273 |
-
$el.removeClass(params.modifierClass + params.type);
|
4274 |
-
if (swiper.pagination.bullets) swiper.pagination.bullets.removeClass(params.bulletActiveClass);
|
4275 |
-
if (params.clickable) {
|
4276 |
-
$el.off('click', `.${params.bulletClass}`);
|
4277 |
-
}
|
4278 |
-
},
|
4279 |
-
};
|
4280 |
-
|
4281 |
-
var Pagination$1 = {
|
4282 |
-
name: 'pagination',
|
4283 |
-
params: {
|
4284 |
-
pagination: {
|
4285 |
-
el: null,
|
4286 |
-
bulletElement: 'span',
|
4287 |
-
clickable: false,
|
4288 |
-
hideOnClick: false,
|
4289 |
-
renderBullet: null,
|
4290 |
-
renderProgressbar: null,
|
4291 |
-
renderFraction: null,
|
4292 |
-
renderCustom: null,
|
4293 |
-
progressbarOpposite: false,
|
4294 |
-
type: 'bullets', // 'bullets' or 'progressbar' or 'fraction' or 'custom'
|
4295 |
-
dynamicBullets: false,
|
4296 |
-
dynamicMainBullets: 1,
|
4297 |
-
formatFractionCurrent: number => number,
|
4298 |
-
formatFractionTotal: number => number,
|
4299 |
-
bulletClass: 'swiper-pagination-bullet',
|
4300 |
-
bulletActiveClass: 'swiper-pagination-bullet-active',
|
4301 |
-
modifierClass: 'swiper-pagination-', // NEW
|
4302 |
-
currentClass: 'swiper-pagination-current',
|
4303 |
-
totalClass: 'swiper-pagination-total',
|
4304 |
-
hiddenClass: 'swiper-pagination-hidden',
|
4305 |
-
progressbarFillClass: 'swiper-pagination-progressbar-fill',
|
4306 |
-
progressbarOppositeClass: 'swiper-pagination-progressbar-opposite',
|
4307 |
-
clickableClass: 'swiper-pagination-clickable', // NEW
|
4308 |
-
lockClass: 'swiper-pagination-lock',
|
4309 |
-
},
|
4310 |
-
},
|
4311 |
-
create() {
|
4312 |
-
const swiper = this;
|
4313 |
-
Utils.extend(swiper, {
|
4314 |
-
pagination: {
|
4315 |
-
init: Pagination.init.bind(swiper),
|
4316 |
-
render: Pagination.render.bind(swiper),
|
4317 |
-
update: Pagination.update.bind(swiper),
|
4318 |
-
destroy: Pagination.destroy.bind(swiper),
|
4319 |
-
dynamicBulletIndex: 0,
|
4320 |
-
},
|
4321 |
-
});
|
4322 |
-
},
|
4323 |
-
on: {
|
4324 |
-
init() {
|
4325 |
-
const swiper = this;
|
4326 |
-
swiper.pagination.init();
|
4327 |
-
swiper.pagination.render();
|
4328 |
-
swiper.pagination.update();
|
4329 |
-
},
|
4330 |
-
activeIndexChange() {
|
4331 |
-
const swiper = this;
|
4332 |
-
if (swiper.params.loop) {
|
4333 |
-
swiper.pagination.update();
|
4334 |
-
} else if (typeof swiper.snapIndex === 'undefined') {
|
4335 |
-
swiper.pagination.update();
|
4336 |
-
}
|
4337 |
-
},
|
4338 |
-
snapIndexChange() {
|
4339 |
-
const swiper = this;
|
4340 |
-
if (!swiper.params.loop) {
|
4341 |
-
swiper.pagination.update();
|
4342 |
-
}
|
4343 |
-
},
|
4344 |
-
slidesLengthChange() {
|
4345 |
-
const swiper = this;
|
4346 |
-
if (swiper.params.loop) {
|
4347 |
-
swiper.pagination.render();
|
4348 |
-
swiper.pagination.update();
|
4349 |
-
}
|
4350 |
-
},
|
4351 |
-
snapGridLengthChange() {
|
4352 |
-
const swiper = this;
|
4353 |
-
if (!swiper.params.loop) {
|
4354 |
-
swiper.pagination.render();
|
4355 |
-
swiper.pagination.update();
|
4356 |
-
}
|
4357 |
-
},
|
4358 |
-
destroy() {
|
4359 |
-
const swiper = this;
|
4360 |
-
swiper.pagination.destroy();
|
4361 |
-
},
|
4362 |
-
click(e) {
|
4363 |
-
const swiper = this;
|
4364 |
-
if (
|
4365 |
-
swiper.params.pagination.el
|
4366 |
-
&& swiper.params.pagination.hideOnClick
|
4367 |
-
&& swiper.pagination.$el.length > 0
|
4368 |
-
&& !$(e.target).hasClass(swiper.params.pagination.bulletClass)
|
4369 |
-
) {
|
4370 |
-
swiper.pagination.$el.toggleClass(swiper.params.pagination.hiddenClass);
|
4371 |
-
}
|
4372 |
-
},
|
4373 |
-
},
|
4374 |
-
};
|
4375 |
-
|
4376 |
-
const Scrollbar = {
|
4377 |
-
setTranslate() {
|
4378 |
-
const swiper = this;
|
4379 |
-
if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
|
4380 |
-
const { scrollbar, rtlTranslate: rtl, progress } = swiper;
|
4381 |
-
const {
|
4382 |
-
dragSize, trackSize, $dragEl, $el,
|
4383 |
-
} = scrollbar;
|
4384 |
-
const params = swiper.params.scrollbar;
|
4385 |
-
|
4386 |
-
let newSize = dragSize;
|
4387 |
-
let newPos = (trackSize - dragSize) * progress;
|
4388 |
-
if (rtl) {
|
4389 |
-
newPos = -newPos;
|
4390 |
-
if (newPos > 0) {
|
4391 |
-
newSize = dragSize - newPos;
|
4392 |
-
newPos = 0;
|
4393 |
-
} else if (-newPos + dragSize > trackSize) {
|
4394 |
-
newSize = trackSize + newPos;
|
4395 |
-
}
|
4396 |
-
} else if (newPos < 0) {
|
4397 |
-
newSize = dragSize + newPos;
|
4398 |
-
newPos = 0;
|
4399 |
-
} else if (newPos + dragSize > trackSize) {
|
4400 |
-
newSize = trackSize - newPos;
|
4401 |
-
}
|
4402 |
-
if (swiper.isHorizontal()) {
|
4403 |
-
if (Support.transforms3d) {
|
4404 |
-
$dragEl.transform(`translate3d(${newPos}px, 0, 0)`);
|
4405 |
-
} else {
|
4406 |
-
$dragEl.transform(`translateX(${newPos}px)`);
|
4407 |
-
}
|
4408 |
-
$dragEl[0].style.width = `${newSize}px`;
|
4409 |
-
} else {
|
4410 |
-
if (Support.transforms3d) {
|
4411 |
-
$dragEl.transform(`translate3d(0px, ${newPos}px, 0)`);
|
4412 |
-
} else {
|
4413 |
-
$dragEl.transform(`translateY(${newPos}px)`);
|
4414 |
-
}
|
4415 |
-
$dragEl[0].style.height = `${newSize}px`;
|
4416 |
-
}
|
4417 |
-
if (params.hide) {
|
4418 |
-
clearTimeout(swiper.scrollbar.timeout);
|
4419 |
-
$el[0].style.opacity = 1;
|
4420 |
-
swiper.scrollbar.timeout = setTimeout(() => {
|
4421 |
-
$el[0].style.opacity = 0;
|
4422 |
-
$el.transition(400);
|
4423 |
-
}, 1000);
|
4424 |
-
}
|
4425 |
-
},
|
4426 |
-
setTransition(duration) {
|
4427 |
-
const swiper = this;
|
4428 |
-
if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
|
4429 |
-
swiper.scrollbar.$dragEl.transition(duration);
|
4430 |
-
},
|
4431 |
-
updateSize() {
|
4432 |
-
const swiper = this;
|
4433 |
-
if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
|
4434 |
-
|
4435 |
-
const { scrollbar } = swiper;
|
4436 |
-
const { $dragEl, $el } = scrollbar;
|
4437 |
-
|
4438 |
-
$dragEl[0].style.width = '';
|
4439 |
-
$dragEl[0].style.height = '';
|
4440 |
-
const trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight;
|
4441 |
-
|
4442 |
-
const divider = swiper.size / swiper.virtualSize;
|
4443 |
-
const moveDivider = divider * (trackSize / swiper.size);
|
4444 |
-
let dragSize;
|
4445 |
-
if (swiper.params.scrollbar.dragSize === 'auto') {
|
4446 |
-
dragSize = trackSize * divider;
|
4447 |
-
} else {
|
4448 |
-
dragSize = parseInt(swiper.params.scrollbar.dragSize, 10);
|
4449 |
-
}
|
4450 |
-
|
4451 |
-
if (swiper.isHorizontal()) {
|
4452 |
-
$dragEl[0].style.width = `${dragSize}px`;
|
4453 |
-
} else {
|
4454 |
-
$dragEl[0].style.height = `${dragSize}px`;
|
4455 |
-
}
|
4456 |
-
|
4457 |
-
if (divider >= 1) {
|
4458 |
-
$el[0].style.display = 'none';
|
4459 |
-
} else {
|
4460 |
-
$el[0].style.display = '';
|
4461 |
-
}
|
4462 |
-
if (swiper.params.scrollbarHide) {
|
4463 |
-
$el[0].style.opacity = 0;
|
4464 |
-
}
|
4465 |
-
Utils.extend(scrollbar, {
|
4466 |
-
trackSize,
|
4467 |
-
divider,
|
4468 |
-
moveDivider,
|
4469 |
-
dragSize,
|
4470 |
-
});
|
4471 |
-
scrollbar.$el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass);
|
4472 |
-
},
|
4473 |
-
setDragPosition(e) {
|
4474 |
-
const swiper = this;
|
4475 |
-
const { scrollbar, rtlTranslate: rtl } = swiper;
|
4476 |
-
const { $el, dragSize, trackSize } = scrollbar;
|
4477 |
-
|
4478 |
-
let pointerPosition;
|
4479 |
-
if (swiper.isHorizontal()) {
|
4480 |
-
pointerPosition = ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX);
|
4481 |
-
} else {
|
4482 |
-
pointerPosition = ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY);
|
4483 |
-
}
|
4484 |
-
let positionRatio;
|
4485 |
-
positionRatio = ((pointerPosition) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] - (dragSize / 2)) / (trackSize - dragSize);
|
4486 |
-
positionRatio = Math.max(Math.min(positionRatio, 1), 0);
|
4487 |
-
if (rtl) {
|
4488 |
-
positionRatio = 1 - positionRatio;
|
4489 |
-
}
|
4490 |
-
|
4491 |
-
const position = swiper.minTranslate() + ((swiper.maxTranslate() - swiper.minTranslate()) * positionRatio);
|
4492 |
-
|
4493 |
-
swiper.updateProgress(position);
|
4494 |
-
swiper.setTranslate(position);
|
4495 |
-
swiper.updateActiveIndex();
|
4496 |
-
swiper.updateSlidesClasses();
|
4497 |
-
},
|
4498 |
-
onDragStart(e) {
|
4499 |
-
const swiper = this;
|
4500 |
-
const params = swiper.params.scrollbar;
|
4501 |
-
const { scrollbar, $wrapperEl } = swiper;
|
4502 |
-
const { $el, $dragEl } = scrollbar;
|
4503 |
-
swiper.scrollbar.isTouched = true;
|
4504 |
-
e.preventDefault();
|
4505 |
-
e.stopPropagation();
|
4506 |
-
|
4507 |
-
$wrapperEl.transition(100);
|
4508 |
-
$dragEl.transition(100);
|
4509 |
-
scrollbar.setDragPosition(e);
|
4510 |
-
|
4511 |
-
clearTimeout(swiper.scrollbar.dragTimeout);
|
4512 |
-
|
4513 |
-
$el.transition(0);
|
4514 |
-
if (params.hide) {
|
4515 |
-
$el.css('opacity', 1);
|
4516 |
-
}
|
4517 |
-
swiper.emit('scrollbarDragStart', e);
|
4518 |
-
},
|
4519 |
-
onDragMove(e) {
|
4520 |
-
const swiper = this;
|
4521 |
-
const { scrollbar, $wrapperEl } = swiper;
|
4522 |
-
const { $el, $dragEl } = scrollbar;
|
4523 |
-
|
4524 |
-
if (!swiper.scrollbar.isTouched) return;
|
4525 |
-
if (e.preventDefault) e.preventDefault();
|
4526 |
-
else e.returnValue = false;
|
4527 |
-
scrollbar.setDragPosition(e);
|
4528 |
-
$wrapperEl.transition(0);
|
4529 |
-
$el.transition(0);
|
4530 |
-
$dragEl.transition(0);
|
4531 |
-
swiper.emit('scrollbarDragMove', e);
|
4532 |
-
},
|
4533 |
-
onDragEnd(e) {
|
4534 |
-
const swiper = this;
|
4535 |
-
|
4536 |
-
const params = swiper.params.scrollbar;
|
4537 |
-
const { scrollbar } = swiper;
|
4538 |
-
const { $el } = scrollbar;
|
4539 |
-
|
4540 |
-
if (!swiper.scrollbar.isTouched) return;
|
4541 |
-
swiper.scrollbar.isTouched = false;
|
4542 |
-
if (params.hide) {
|
4543 |
-
clearTimeout(swiper.scrollbar.dragTimeout);
|
4544 |
-
swiper.scrollbar.dragTimeout = Utils.nextTick(() => {
|
4545 |
-
$el.css('opacity', 0);
|
4546 |
-
$el.transition(400);
|
4547 |
-
}, 1000);
|
4548 |
-
}
|
4549 |
-
swiper.emit('scrollbarDragEnd', e);
|
4550 |
-
if (params.snapOnRelease) {
|
4551 |
-
swiper.slideToClosest();
|
4552 |
-
}
|
4553 |
-
},
|
4554 |
-
enableDraggable() {
|
4555 |
-
const swiper = this;
|
4556 |
-
if (!swiper.params.scrollbar.el) return;
|
4557 |
-
const {
|
4558 |
-
scrollbar, touchEventsTouch, touchEventsDesktop, params,
|
4559 |
-
} = swiper;
|
4560 |
-
const $el = scrollbar.$el;
|
4561 |
-
const target = $el[0];
|
4562 |
-
const activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false;
|
4563 |
-
const passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
|
4564 |
-
if (!Support.touch) {
|
4565 |
-
target.addEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);
|
4566 |
-
document.addEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);
|
4567 |
-
document.addEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);
|
4568 |
-
} else {
|
4569 |
-
target.addEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener);
|
4570 |
-
target.addEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener);
|
4571 |
-
target.addEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener);
|
4572 |
-
}
|
4573 |
-
},
|
4574 |
-
disableDraggable() {
|
4575 |
-
const swiper = this;
|
4576 |
-
if (!swiper.params.scrollbar.el) return;
|
4577 |
-
const {
|
4578 |
-
scrollbar, touchEventsTouch, touchEventsDesktop, params,
|
4579 |
-
} = swiper;
|
4580 |
-
const $el = scrollbar.$el;
|
4581 |
-
const target = $el[0];
|
4582 |
-
const activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false;
|
4583 |
-
const passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
|
4584 |
-
if (!Support.touch) {
|
4585 |
-
target.removeEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);
|
4586 |
-
document.removeEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);
|
4587 |
-
document.removeEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);
|
4588 |
-
} else {
|
4589 |
-
target.removeEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener);
|
4590 |
-
target.removeEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener);
|
4591 |
-
target.removeEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener);
|
4592 |
-
}
|
4593 |
-
},
|
4594 |
-
init() {
|
4595 |
-
const swiper = this;
|
4596 |
-
if (!swiper.params.scrollbar.el) return;
|
4597 |
-
const { scrollbar, $el: $swiperEl } = swiper;
|
4598 |
-
const params = swiper.params.scrollbar;
|
4599 |
-
|
4600 |
-
let $el = $(params.el);
|
4601 |
-
if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) {
|
4602 |
-
$el = $swiperEl.find(params.el);
|
4603 |
-
}
|
4604 |
-
|
4605 |
-
let $dragEl = $el.find(`.${swiper.params.scrollbar.dragClass}`);
|
4606 |
-
if ($dragEl.length === 0) {
|
4607 |
-
$dragEl = $(`<div class="${swiper.params.scrollbar.dragClass}"></div>`);
|
4608 |
-
$el.append($dragEl);
|
4609 |
-
}
|
4610 |
-
|
4611 |
-
Utils.extend(scrollbar, {
|
4612 |
-
$el,
|
4613 |
-
el: $el[0],
|
4614 |
-
$dragEl,
|
4615 |
-
dragEl: $dragEl[0],
|
4616 |
-
});
|
4617 |
-
|
4618 |
-
if (params.draggable) {
|
4619 |
-
scrollbar.enableDraggable();
|
4620 |
-
}
|
4621 |
-
},
|
4622 |
-
destroy() {
|
4623 |
-
const swiper = this;
|
4624 |
-
swiper.scrollbar.disableDraggable();
|
4625 |
-
},
|
4626 |
-
};
|
4627 |
-
|
4628 |
-
var Scrollbar$1 = {
|
4629 |
-
name: 'scrollbar',
|
4630 |
-
params: {
|
4631 |
-
scrollbar: {
|
4632 |
-
el: null,
|
4633 |
-
dragSize: 'auto',
|
4634 |
-
hide: false,
|
4635 |
-
draggable: false,
|
4636 |
-
snapOnRelease: true,
|
4637 |
-
lockClass: 'swiper-scrollbar-lock',
|
4638 |
-
dragClass: 'swiper-scrollbar-drag',
|
4639 |
-
},
|
4640 |
-
},
|
4641 |
-
create() {
|
4642 |
-
const swiper = this;
|
4643 |
-
Utils.extend(swiper, {
|
4644 |
-
scrollbar: {
|
4645 |
-
init: Scrollbar.init.bind(swiper),
|
4646 |
-
destroy: Scrollbar.destroy.bind(swiper),
|
4647 |
-
updateSize: Scrollbar.updateSize.bind(swiper),
|
4648 |
-
setTranslate: Scrollbar.setTranslate.bind(swiper),
|
4649 |
-
setTransition: Scrollbar.setTransition.bind(swiper),
|
4650 |
-
enableDraggable: Scrollbar.enableDraggable.bind(swiper),
|
4651 |
-
disableDraggable: Scrollbar.disableDraggable.bind(swiper),
|
4652 |
-
setDragPosition: Scrollbar.setDragPosition.bind(swiper),
|
4653 |
-
onDragStart: Scrollbar.onDragStart.bind(swiper),
|
4654 |
-
onDragMove: Scrollbar.onDragMove.bind(swiper),
|
4655 |
-
onDragEnd: Scrollbar.onDragEnd.bind(swiper),
|
4656 |
-
isTouched: false,
|
4657 |
-
timeout: null,
|
4658 |
-
dragTimeout: null,
|
4659 |
-
},
|
4660 |
-
});
|
4661 |
-
},
|
4662 |
-
on: {
|
4663 |
-
init() {
|
4664 |
-
const swiper = this;
|
4665 |
-
swiper.scrollbar.init();
|
4666 |
-
swiper.scrollbar.updateSize();
|
4667 |
-
swiper.scrollbar.setTranslate();
|
4668 |
-
},
|
4669 |
-
update() {
|
4670 |
-
const swiper = this;
|
4671 |
-
swiper.scrollbar.updateSize();
|
4672 |
-
},
|
4673 |
-
resize() {
|
4674 |
-
const swiper = this;
|
4675 |
-
swiper.scrollbar.updateSize();
|
4676 |
-
},
|
4677 |
-
observerUpdate() {
|
4678 |
-
const swiper = this;
|
4679 |
-
swiper.scrollbar.updateSize();
|
4680 |
-
},
|
4681 |
-
setTranslate() {
|
4682 |
-
const swiper = this;
|
4683 |
-
swiper.scrollbar.setTranslate();
|
4684 |
-
},
|
4685 |
-
setTransition(duration) {
|
4686 |
-
const swiper = this;
|
4687 |
-
swiper.scrollbar.setTransition(duration);
|
4688 |
-
},
|
4689 |
-
destroy() {
|
4690 |
-
const swiper = this;
|
4691 |
-
swiper.scrollbar.destroy();
|
4692 |
-
},
|
4693 |
-
},
|
4694 |
-
};
|
4695 |
-
|
4696 |
-
const Parallax = {
|
4697 |
-
setTransform(el, progress) {
|
4698 |
-
const swiper = this;
|
4699 |
-
const { rtl } = swiper;
|
4700 |
-
|
4701 |
-
const $el = $(el);
|
4702 |
-
const rtlFactor = rtl ? -1 : 1;
|
4703 |
-
|
4704 |
-
const p = $el.attr('data-swiper-parallax') || '0';
|
4705 |
-
let x = $el.attr('data-swiper-parallax-x');
|
4706 |
-
let y = $el.attr('data-swiper-parallax-y');
|
4707 |
-
const scale = $el.attr('data-swiper-parallax-scale');
|
4708 |
-
const opacity = $el.attr('data-swiper-parallax-opacity');
|
4709 |
-
|
4710 |
-
if (x || y) {
|
4711 |
-
x = x || '0';
|
4712 |
-
y = y || '0';
|
4713 |
-
} else if (swiper.isHorizontal()) {
|
4714 |
-
x = p;
|
4715 |
-
y = '0';
|
4716 |
-
} else {
|
4717 |
-
y = p;
|
4718 |
-
x = '0';
|
4719 |
-
}
|
4720 |
-
|
4721 |
-
if ((x).indexOf('%') >= 0) {
|
4722 |
-
x = `${parseInt(x, 10) * progress * rtlFactor}%`;
|
4723 |
-
} else {
|
4724 |
-
x = `${x * progress * rtlFactor}px`;
|
4725 |
-
}
|
4726 |
-
if ((y).indexOf('%') >= 0) {
|
4727 |
-
y = `${parseInt(y, 10) * progress}%`;
|
4728 |
-
} else {
|
4729 |
-
y = `${y * progress}px`;
|
4730 |
-
}
|
4731 |
-
|
4732 |
-
if (typeof opacity !== 'undefined' && opacity !== null) {
|
4733 |
-
const currentOpacity = opacity - ((opacity - 1) * (1 - Math.abs(progress)));
|
4734 |
-
$el[0].style.opacity = currentOpacity;
|
4735 |
-
}
|
4736 |
-
if (typeof scale === 'undefined' || scale === null) {
|
4737 |
-
$el.transform(`translate3d(${x}, ${y}, 0px)`);
|
4738 |
-
} else {
|
4739 |
-
const currentScale = scale - ((scale - 1) * (1 - Math.abs(progress)));
|
4740 |
-
$el.transform(`translate3d(${x}, ${y}, 0px) scale(${currentScale})`);
|
4741 |
-
}
|
4742 |
-
},
|
4743 |
-
setTranslate() {
|
4744 |
-
const swiper = this;
|
4745 |
-
const {
|
4746 |
-
$el, slides, progress, snapGrid,
|
4747 |
-
} = swiper;
|
4748 |
-
$el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
|
4749 |
-
.each((index$$1, el) => {
|
4750 |
-
swiper.parallax.setTransform(el, progress);
|
4751 |
-
});
|
4752 |
-
slides.each((slideIndex, slideEl) => {
|
4753 |
-
let slideProgress = slideEl.progress;
|
4754 |
-
if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') {
|
4755 |
-
slideProgress += Math.ceil(slideIndex / 2) - (progress * (snapGrid.length - 1));
|
4756 |
-
}
|
4757 |
-
slideProgress = Math.min(Math.max(slideProgress, -1), 1);
|
4758 |
-
$(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
|
4759 |
-
.each((index$$1, el) => {
|
4760 |
-
swiper.parallax.setTransform(el, slideProgress);
|
4761 |
-
});
|
4762 |
-
});
|
4763 |
-
},
|
4764 |
-
setTransition(duration = this.params.speed) {
|
4765 |
-
const swiper = this;
|
4766 |
-
const { $el } = swiper;
|
4767 |
-
$el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
|
4768 |
-
.each((index$$1, parallaxEl) => {
|
4769 |
-
const $parallaxEl = $(parallaxEl);
|
4770 |
-
let parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration;
|
4771 |
-
if (duration === 0) parallaxDuration = 0;
|
4772 |
-
$parallaxEl.transition(parallaxDuration);
|
4773 |
-
});
|
4774 |
-
},
|
4775 |
-
};
|
4776 |
-
|
4777 |
-
var Parallax$1 = {
|
4778 |
-
name: 'parallax',
|
4779 |
-
params: {
|
4780 |
-
parallax: {
|
4781 |
-
enabled: false,
|
4782 |
-
},
|
4783 |
-
},
|
4784 |
-
create() {
|
4785 |
-
const swiper = this;
|
4786 |
-
Utils.extend(swiper, {
|
4787 |
-
parallax: {
|
4788 |
-
setTransform: Parallax.setTransform.bind(swiper),
|
4789 |
-
setTranslate: Parallax.setTranslate.bind(swiper),
|
4790 |
-
setTransition: Parallax.setTransition.bind(swiper),
|
4791 |
-
},
|
4792 |
-
});
|
4793 |
-
},
|
4794 |
-
on: {
|
4795 |
-
beforeInit() {
|
4796 |
-
const swiper = this;
|
4797 |
-
if (!swiper.params.parallax.enabled) return;
|
4798 |
-
swiper.params.watchSlidesProgress = true;
|
4799 |
-
swiper.originalParams.watchSlidesProgress = true;
|
4800 |
-
},
|
4801 |
-
init() {
|
4802 |
-
const swiper = this;
|
4803 |
-
if (!swiper.params.parallax) return;
|
4804 |
-
swiper.parallax.setTranslate();
|
4805 |
-
},
|
4806 |
-
setTranslate() {
|
4807 |
-
const swiper = this;
|
4808 |
-
if (!swiper.params.parallax) return;
|
4809 |
-
swiper.parallax.setTranslate();
|
4810 |
-
},
|
4811 |
-
setTransition(duration) {
|
4812 |
-
const swiper = this;
|
4813 |
-
if (!swiper.params.parallax) return;
|
4814 |
-
swiper.parallax.setTransition(duration);
|
4815 |
-
},
|
4816 |
-
},
|
4817 |
-
};
|
4818 |
-
|
4819 |
-
const Zoom = {
|
4820 |
-
// Calc Scale From Multi-touches
|
4821 |
-
getDistanceBetweenTouches(e) {
|
4822 |
-
if (e.targetTouches.length < 2) return 1;
|
4823 |
-
const x1 = e.targetTouches[0].pageX;
|
4824 |
-
const y1 = e.targetTouches[0].pageY;
|
4825 |
-
const x2 = e.targetTouches[1].pageX;
|
4826 |
-
const y2 = e.targetTouches[1].pageY;
|
4827 |
-
const distance = Math.sqrt(((x2 - x1) ** 2) + ((y2 - y1) ** 2));
|
4828 |
-
return distance;
|
4829 |
-
},
|
4830 |
-
// Events
|
4831 |
-
onGestureStart(e) {
|
4832 |
-
const swiper = this;
|
4833 |
-
const params = swiper.params.zoom;
|
4834 |
-
const zoom = swiper.zoom;
|
4835 |
-
const { gesture } = zoom;
|
4836 |
-
zoom.fakeGestureTouched = false;
|
4837 |
-
zoom.fakeGestureMoved = false;
|
4838 |
-
if (!Support.gestures) {
|
4839 |
-
if (e.type !== 'touchstart' || (e.type === 'touchstart' && e.targetTouches.length < 2)) {
|
4840 |
-
return;
|
4841 |
-
}
|
4842 |
-
zoom.fakeGestureTouched = true;
|
4843 |
-
gesture.scaleStart = Zoom.getDistanceBetweenTouches(e);
|
4844 |
-
}
|
4845 |
-
if (!gesture.$slideEl || !gesture.$slideEl.length) {
|
4846 |
-
gesture.$slideEl = $(e.target).closest('.swiper-slide');
|
4847 |
-
if (gesture.$slideEl.length === 0) gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);
|
4848 |
-
gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
|
4849 |
-
gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);
|
4850 |
-
gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
|
4851 |
-
if (gesture.$imageWrapEl.length === 0) {
|
4852 |
-
gesture.$imageEl = undefined;
|
4853 |
-
return;
|
4854 |
-
}
|
4855 |
-
}
|
4856 |
-
gesture.$imageEl.transition(0);
|
4857 |
-
swiper.zoom.isScaling = true;
|
4858 |
-
},
|
4859 |
-
onGestureChange(e) {
|
4860 |
-
const swiper = this;
|
4861 |
-
const params = swiper.params.zoom;
|
4862 |
-
const zoom = swiper.zoom;
|
4863 |
-
const { gesture } = zoom;
|
4864 |
-
if (!Support.gestures) {
|
4865 |
-
if (e.type !== 'touchmove' || (e.type === 'touchmove' && e.targetTouches.length < 2)) {
|
4866 |
-
return;
|
4867 |
-
}
|
4868 |
-
zoom.fakeGestureMoved = true;
|
4869 |
-
gesture.scaleMove = Zoom.getDistanceBetweenTouches(e);
|
4870 |
-
}
|
4871 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
|
4872 |
-
if (Support.gestures) {
|
4873 |
-
zoom.scale = e.scale * zoom.currentScale;
|
4874 |
-
} else {
|
4875 |
-
zoom.scale = (gesture.scaleMove / gesture.scaleStart) * zoom.currentScale;
|
4876 |
-
}
|
4877 |
-
if (zoom.scale > gesture.maxRatio) {
|
4878 |
-
zoom.scale = (gesture.maxRatio - 1) + (((zoom.scale - gesture.maxRatio) + 1) ** 0.5);
|
4879 |
-
}
|
4880 |
-
if (zoom.scale < params.minRatio) {
|
4881 |
-
zoom.scale = (params.minRatio + 1) - (((params.minRatio - zoom.scale) + 1) ** 0.5);
|
4882 |
-
}
|
4883 |
-
gesture.$imageEl.transform(`translate3d(0,0,0) scale(${zoom.scale})`);
|
4884 |
-
},
|
4885 |
-
onGestureEnd(e) {
|
4886 |
-
const swiper = this;
|
4887 |
-
const params = swiper.params.zoom;
|
4888 |
-
const zoom = swiper.zoom;
|
4889 |
-
const { gesture } = zoom;
|
4890 |
-
if (!Support.gestures) {
|
4891 |
-
if (!zoom.fakeGestureTouched || !zoom.fakeGestureMoved) {
|
4892 |
-
return;
|
4893 |
-
}
|
4894 |
-
if (e.type !== 'touchend' || (e.type === 'touchend' && e.changedTouches.length < 2 && !Device.android)) {
|
4895 |
-
return;
|
4896 |
-
}
|
4897 |
-
zoom.fakeGestureTouched = false;
|
4898 |
-
zoom.fakeGestureMoved = false;
|
4899 |
-
}
|
4900 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
|
4901 |
-
zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio);
|
4902 |
-
gesture.$imageEl.transition(swiper.params.speed).transform(`translate3d(0,0,0) scale(${zoom.scale})`);
|
4903 |
-
zoom.currentScale = zoom.scale;
|
4904 |
-
zoom.isScaling = false;
|
4905 |
-
if (zoom.scale === 1) gesture.$slideEl = undefined;
|
4906 |
-
},
|
4907 |
-
onTouchStart(e) {
|
4908 |
-
const swiper = this;
|
4909 |
-
const zoom = swiper.zoom;
|
4910 |
-
const { gesture, image } = zoom;
|
4911 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
|
4912 |
-
if (image.isTouched) return;
|
4913 |
-
if (Device.android) e.preventDefault();
|
4914 |
-
image.isTouched = true;
|
4915 |
-
image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
|
4916 |
-
image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
|
4917 |
-
},
|
4918 |
-
onTouchMove(e) {
|
4919 |
-
const swiper = this;
|
4920 |
-
const zoom = swiper.zoom;
|
4921 |
-
const { gesture, image, velocity } = zoom;
|
4922 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
|
4923 |
-
swiper.allowClick = false;
|
4924 |
-
if (!image.isTouched || !gesture.$slideEl) return;
|
4925 |
-
|
4926 |
-
if (!image.isMoved) {
|
4927 |
-
image.width = gesture.$imageEl[0].offsetWidth;
|
4928 |
-
image.height = gesture.$imageEl[0].offsetHeight;
|
4929 |
-
image.startX = Utils.getTranslate(gesture.$imageWrapEl[0], 'x') || 0;
|
4930 |
-
image.startY = Utils.getTranslate(gesture.$imageWrapEl[0], 'y') || 0;
|
4931 |
-
gesture.slideWidth = gesture.$slideEl[0].offsetWidth;
|
4932 |
-
gesture.slideHeight = gesture.$slideEl[0].offsetHeight;
|
4933 |
-
gesture.$imageWrapEl.transition(0);
|
4934 |
-
if (swiper.rtl) {
|
4935 |
-
image.startX = -image.startX;
|
4936 |
-
image.startY = -image.startY;
|
4937 |
-
}
|
4938 |
-
}
|
4939 |
-
// Define if we need image drag
|
4940 |
-
const scaledWidth = image.width * zoom.scale;
|
4941 |
-
const scaledHeight = image.height * zoom.scale;
|
4942 |
-
|
4943 |
-
if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return;
|
4944 |
-
|
4945 |
-
image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);
|
4946 |
-
image.maxX = -image.minX;
|
4947 |
-
image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);
|
4948 |
-
image.maxY = -image.minY;
|
4949 |
-
|
4950 |
-
image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
|
4951 |
-
image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
|
4952 |
-
|
4953 |
-
if (!image.isMoved && !zoom.isScaling) {
|
4954 |
-
if (
|
4955 |
-
swiper.isHorizontal()
|
4956 |
-
&& (
|
4957 |
-
(Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x)
|
4958 |
-
|| (Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)
|
4959 |
-
)
|
4960 |
-
) {
|
4961 |
-
image.isTouched = false;
|
4962 |
-
return;
|
4963 |
-
} if (
|
4964 |
-
!swiper.isHorizontal()
|
4965 |
-
&& (
|
4966 |
-
(Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y)
|
4967 |
-
|| (Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)
|
4968 |
-
)
|
4969 |
-
) {
|
4970 |
-
image.isTouched = false;
|
4971 |
-
return;
|
4972 |
-
}
|
4973 |
-
}
|
4974 |
-
e.preventDefault();
|
4975 |
-
e.stopPropagation();
|
4976 |
-
|
4977 |
-
image.isMoved = true;
|
4978 |
-
image.currentX = (image.touchesCurrent.x - image.touchesStart.x) + image.startX;
|
4979 |
-
image.currentY = (image.touchesCurrent.y - image.touchesStart.y) + image.startY;
|
4980 |
-
|
4981 |
-
if (image.currentX < image.minX) {
|
4982 |
-
image.currentX = (image.minX + 1) - (((image.minX - image.currentX) + 1) ** 0.8);
|
4983 |
-
}
|
4984 |
-
if (image.currentX > image.maxX) {
|
4985 |
-
image.currentX = (image.maxX - 1) + (((image.currentX - image.maxX) + 1) ** 0.8);
|
4986 |
-
}
|
4987 |
-
|
4988 |
-
if (image.currentY < image.minY) {
|
4989 |
-
image.currentY = (image.minY + 1) - (((image.minY - image.currentY) + 1) ** 0.8);
|
4990 |
-
}
|
4991 |
-
if (image.currentY > image.maxY) {
|
4992 |
-
image.currentY = (image.maxY - 1) + (((image.currentY - image.maxY) + 1) ** 0.8);
|
4993 |
-
}
|
4994 |
-
|
4995 |
-
// Velocity
|
4996 |
-
if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x;
|
4997 |
-
if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y;
|
4998 |
-
if (!velocity.prevTime) velocity.prevTime = Date.now();
|
4999 |
-
velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2;
|
5000 |
-
velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2;
|
5001 |
-
if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0;
|
5002 |
-
if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0;
|
5003 |
-
velocity.prevPositionX = image.touchesCurrent.x;
|
5004 |
-
velocity.prevPositionY = image.touchesCurrent.y;
|
5005 |
-
velocity.prevTime = Date.now();
|
5006 |
-
|
5007 |
-
gesture.$imageWrapEl.transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);
|
5008 |
-
},
|
5009 |
-
onTouchEnd() {
|
5010 |
-
const swiper = this;
|
5011 |
-
const zoom = swiper.zoom;
|
5012 |
-
const { gesture, image, velocity } = zoom;
|
5013 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
|
5014 |
-
if (!image.isTouched || !image.isMoved) {
|
5015 |
-
image.isTouched = false;
|
5016 |
-
image.isMoved = false;
|
5017 |
-
return;
|
5018 |
-
}
|
5019 |
-
image.isTouched = false;
|
5020 |
-
image.isMoved = false;
|
5021 |
-
let momentumDurationX = 300;
|
5022 |
-
let momentumDurationY = 300;
|
5023 |
-
const momentumDistanceX = velocity.x * momentumDurationX;
|
5024 |
-
const newPositionX = image.currentX + momentumDistanceX;
|
5025 |
-
const momentumDistanceY = velocity.y * momentumDurationY;
|
5026 |
-
const newPositionY = image.currentY + momentumDistanceY;
|
5027 |
-
|
5028 |
-
// Fix duration
|
5029 |
-
if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x);
|
5030 |
-
if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y);
|
5031 |
-
const momentumDuration = Math.max(momentumDurationX, momentumDurationY);
|
5032 |
-
|
5033 |
-
image.currentX = newPositionX;
|
5034 |
-
image.currentY = newPositionY;
|
5035 |
-
|
5036 |
-
// Define if we need image drag
|
5037 |
-
const scaledWidth = image.width * zoom.scale;
|
5038 |
-
const scaledHeight = image.height * zoom.scale;
|
5039 |
-
image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);
|
5040 |
-
image.maxX = -image.minX;
|
5041 |
-
image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);
|
5042 |
-
image.maxY = -image.minY;
|
5043 |
-
image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX);
|
5044 |
-
image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY);
|
5045 |
-
|
5046 |
-
gesture.$imageWrapEl.transition(momentumDuration).transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);
|
5047 |
-
},
|
5048 |
-
onTransitionEnd() {
|
5049 |
-
const swiper = this;
|
5050 |
-
const zoom = swiper.zoom;
|
5051 |
-
const { gesture } = zoom;
|
5052 |
-
if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) {
|
5053 |
-
gesture.$imageEl.transform('translate3d(0,0,0) scale(1)');
|
5054 |
-
gesture.$imageWrapEl.transform('translate3d(0,0,0)');
|
5055 |
-
|
5056 |
-
zoom.scale = 1;
|
5057 |
-
zoom.currentScale = 1;
|
5058 |
-
|
5059 |
-
gesture.$slideEl = undefined;
|
5060 |
-
gesture.$imageEl = undefined;
|
5061 |
-
gesture.$imageWrapEl = undefined;
|
5062 |
-
}
|
5063 |
-
},
|
5064 |
-
// Toggle Zoom
|
5065 |
-
toggle(e) {
|
5066 |
-
const swiper = this;
|
5067 |
-
const zoom = swiper.zoom;
|
5068 |
-
|
5069 |
-
if (zoom.scale && zoom.scale !== 1) {
|
5070 |
-
// Zoom Out
|
5071 |
-
zoom.out();
|
5072 |
-
} else {
|
5073 |
-
// Zoom In
|
5074 |
-
zoom.in(e);
|
5075 |
-
}
|
5076 |
-
},
|
5077 |
-
in(e) {
|
5078 |
-
const swiper = this;
|
5079 |
-
|
5080 |
-
const zoom = swiper.zoom;
|
5081 |
-
const params = swiper.params.zoom;
|
5082 |
-
const { gesture, image } = zoom;
|
5083 |
-
|
5084 |
-
if (!gesture.$slideEl) {
|
5085 |
-
gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex);
|
5086 |
-
gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
|
5087 |
-
gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);
|
5088 |
-
}
|
5089 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
|
5090 |
-
|
5091 |
-
gesture.$slideEl.addClass(`${params.zoomedSlideClass}`);
|
5092 |
-
|
5093 |
-
let touchX;
|
5094 |
-
let touchY;
|
5095 |
-
let offsetX;
|
5096 |
-
let offsetY;
|
5097 |
-
let diffX;
|
5098 |
-
let diffY;
|
5099 |
-
let translateX;
|
5100 |
-
let translateY;
|
5101 |
-
let imageWidth;
|
5102 |
-
let imageHeight;
|
5103 |
-
let scaledWidth;
|
5104 |
-
let scaledHeight;
|
5105 |
-
let translateMinX;
|
5106 |
-
let translateMinY;
|
5107 |
-
let translateMaxX;
|
5108 |
-
let translateMaxY;
|
5109 |
-
let slideWidth;
|
5110 |
-
let slideHeight;
|
5111 |
-
|
5112 |
-
if (typeof image.touchesStart.x === 'undefined' && e) {
|
5113 |
-
touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;
|
5114 |
-
touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;
|
5115 |
-
} else {
|
5116 |
-
touchX = image.touchesStart.x;
|
5117 |
-
touchY = image.touchesStart.y;
|
5118 |
-
}
|
5119 |
-
|
5120 |
-
zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
|
5121 |
-
zoom.currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
|
5122 |
-
if (e) {
|
5123 |
-
slideWidth = gesture.$slideEl[0].offsetWidth;
|
5124 |
-
slideHeight = gesture.$slideEl[0].offsetHeight;
|
5125 |
-
offsetX = gesture.$slideEl.offset().left;
|
5126 |
-
offsetY = gesture.$slideEl.offset().top;
|
5127 |
-
diffX = (offsetX + (slideWidth / 2)) - touchX;
|
5128 |
-
diffY = (offsetY + (slideHeight / 2)) - touchY;
|
5129 |
-
|
5130 |
-
imageWidth = gesture.$imageEl[0].offsetWidth;
|
5131 |
-
imageHeight = gesture.$imageEl[0].offsetHeight;
|
5132 |
-
scaledWidth = imageWidth * zoom.scale;
|
5133 |
-
scaledHeight = imageHeight * zoom.scale;
|
5134 |
-
|
5135 |
-
translateMinX = Math.min(((slideWidth / 2) - (scaledWidth / 2)), 0);
|
5136 |
-
translateMinY = Math.min(((slideHeight / 2) - (scaledHeight / 2)), 0);
|
5137 |
-
translateMaxX = -translateMinX;
|
5138 |
-
translateMaxY = -translateMinY;
|
5139 |
-
|
5140 |
-
translateX = diffX * zoom.scale;
|
5141 |
-
translateY = diffY * zoom.scale;
|
5142 |
-
|
5143 |
-
if (translateX < translateMinX) {
|
5144 |
-
translateX = translateMinX;
|
5145 |
-
}
|
5146 |
-
if (translateX > translateMaxX) {
|
5147 |
-
translateX = translateMaxX;
|
5148 |
-
}
|
5149 |
-
|
5150 |
-
if (translateY < translateMinY) {
|
5151 |
-
translateY = translateMinY;
|
5152 |
-
}
|
5153 |
-
if (translateY > translateMaxY) {
|
5154 |
-
translateY = translateMaxY;
|
5155 |
-
}
|
5156 |
-
} else {
|
5157 |
-
translateX = 0;
|
5158 |
-
translateY = 0;
|
5159 |
-
}
|
5160 |
-
gesture.$imageWrapEl.transition(300).transform(`translate3d(${translateX}px, ${translateY}px,0)`);
|
5161 |
-
gesture.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${zoom.scale})`);
|
5162 |
-
},
|
5163 |
-
out() {
|
5164 |
-
const swiper = this;
|
5165 |
-
|
5166 |
-
const zoom = swiper.zoom;
|
5167 |
-
const params = swiper.params.zoom;
|
5168 |
-
const { gesture } = zoom;
|
5169 |
-
|
5170 |
-
if (!gesture.$slideEl) {
|
5171 |
-
gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex);
|
5172 |
-
gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
|
5173 |
-
gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);
|
5174 |
-
}
|
5175 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
|
5176 |
-
|
5177 |
-
zoom.scale = 1;
|
5178 |
-
zoom.currentScale = 1;
|
5179 |
-
gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)');
|
5180 |
-
gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)');
|
5181 |
-
gesture.$slideEl.removeClass(`${params.zoomedSlideClass}`);
|
5182 |
-
gesture.$slideEl = undefined;
|
5183 |
-
},
|
5184 |
-
// Attach/Detach Events
|
5185 |
-
enable() {
|
5186 |
-
const swiper = this;
|
5187 |
-
const zoom = swiper.zoom;
|
5188 |
-
if (zoom.enabled) return;
|
5189 |
-
zoom.enabled = true;
|
5190 |
-
|
5191 |
-
const passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;
|
5192 |
-
|
5193 |
-
// Scale image
|
5194 |
-
if (Support.gestures) {
|
5195 |
-
swiper.$wrapperEl.on('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener);
|
5196 |
-
swiper.$wrapperEl.on('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener);
|
5197 |
-
swiper.$wrapperEl.on('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener);
|
5198 |
-
} else if (swiper.touchEvents.start === 'touchstart') {
|
5199 |
-
swiper.$wrapperEl.on(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener);
|
5200 |
-
swiper.$wrapperEl.on(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, passiveListener);
|
5201 |
-
swiper.$wrapperEl.on(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener);
|
5202 |
-
}
|
5203 |
-
|
5204 |
-
// Move image
|
5205 |
-
swiper.$wrapperEl.on(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, zoom.onTouchMove);
|
5206 |
-
},
|
5207 |
-
disable() {
|
5208 |
-
const swiper = this;
|
5209 |
-
const zoom = swiper.zoom;
|
5210 |
-
if (!zoom.enabled) return;
|
5211 |
-
|
5212 |
-
swiper.zoom.enabled = false;
|
5213 |
-
|
5214 |
-
const passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;
|
5215 |
-
|
5216 |
-
// Scale image
|
5217 |
-
if (Support.gestures) {
|
5218 |
-
swiper.$wrapperEl.off('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener);
|
5219 |
-
swiper.$wrapperEl.off('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener);
|
5220 |
-
swiper.$wrapperEl.off('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener);
|
5221 |
-
} else if (swiper.touchEvents.start === 'touchstart') {
|
5222 |
-
swiper.$wrapperEl.off(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener);
|
5223 |
-
swiper.$wrapperEl.off(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, passiveListener);
|
5224 |
-
swiper.$wrapperEl.off(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener);
|
5225 |
-
}
|
5226 |
-
|
5227 |
-
// Move image
|
5228 |
-
swiper.$wrapperEl.off(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, zoom.onTouchMove);
|
5229 |
-
},
|
5230 |
-
};
|
5231 |
-
|
5232 |
-
var Zoom$1 = {
|
5233 |
-
name: 'zoom',
|
5234 |
-
params: {
|
5235 |
-
zoom: {
|
5236 |
-
enabled: false,
|
5237 |
-
maxRatio: 3,
|
5238 |
-
minRatio: 1,
|
5239 |
-
toggle: true,
|
5240 |
-
containerClass: 'swiper-zoom-container',
|
5241 |
-
zoomedSlideClass: 'swiper-slide-zoomed',
|
5242 |
-
},
|
5243 |
-
},
|
5244 |
-
create() {
|
5245 |
-
const swiper = this;
|
5246 |
-
const zoom = {
|
5247 |
-
enabled: false,
|
5248 |
-
scale: 1,
|
5249 |
-
currentScale: 1,
|
5250 |
-
isScaling: false,
|
5251 |
-
gesture: {
|
5252 |
-
$slideEl: undefined,
|
5253 |
-
slideWidth: undefined,
|
5254 |
-
slideHeight: undefined,
|
5255 |
-
$imageEl: undefined,
|
5256 |
-
$imageWrapEl: undefined,
|
5257 |
-
maxRatio: 3,
|
5258 |
-
},
|
5259 |
-
image: {
|
5260 |
-
isTouched: undefined,
|
5261 |
-
isMoved: undefined,
|
5262 |
-
currentX: undefined,
|
5263 |
-
currentY: undefined,
|
5264 |
-
minX: undefined,
|
5265 |
-
minY: undefined,
|
5266 |
-
maxX: undefined,
|
5267 |
-
maxY: undefined,
|
5268 |
-
width: undefined,
|
5269 |
-
height: undefined,
|
5270 |
-
startX: undefined,
|
5271 |
-
startY: undefined,
|
5272 |
-
touchesStart: {},
|
5273 |
-
touchesCurrent: {},
|
5274 |
-
},
|
5275 |
-
velocity: {
|
5276 |
-
x: undefined,
|
5277 |
-
y: undefined,
|
5278 |
-
prevPositionX: undefined,
|
5279 |
-
prevPositionY: undefined,
|
5280 |
-
prevTime: undefined,
|
5281 |
-
},
|
5282 |
-
};
|
5283 |
-
|
5284 |
-
('onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out').split(' ').forEach((methodName) => {
|
5285 |
-
zoom[methodName] = Zoom[methodName].bind(swiper);
|
5286 |
-
});
|
5287 |
-
Utils.extend(swiper, {
|
5288 |
-
zoom,
|
5289 |
-
});
|
5290 |
-
|
5291 |
-
let scale = 1;
|
5292 |
-
Object.defineProperty(swiper.zoom, 'scale', {
|
5293 |
-
get() {
|
5294 |
-
return scale;
|
5295 |
-
},
|
5296 |
-
set(value) {
|
5297 |
-
if (scale !== value) {
|
5298 |
-
const imageEl = swiper.zoom.gesture.$imageEl ? swiper.zoom.gesture.$imageEl[0] : undefined;
|
5299 |
-
const slideEl = swiper.zoom.gesture.$slideEl ? swiper.zoom.gesture.$slideEl[0] : undefined;
|
5300 |
-
swiper.emit('zoomChange', value, imageEl, slideEl);
|
5301 |
-
}
|
5302 |
-
scale = value;
|
5303 |
-
},
|
5304 |
-
});
|
5305 |
-
},
|
5306 |
-
on: {
|
5307 |
-
init() {
|
5308 |
-
const swiper = this;
|
5309 |
-
if (swiper.params.zoom.enabled) {
|
5310 |
-
swiper.zoom.enable();
|
5311 |
-
}
|
5312 |
-
},
|
5313 |
-
destroy() {
|
5314 |
-
const swiper = this;
|
5315 |
-
swiper.zoom.disable();
|
5316 |
-
},
|
5317 |
-
touchStart(e) {
|
5318 |
-
const swiper = this;
|
5319 |
-
if (!swiper.zoom.enabled) return;
|
5320 |
-
swiper.zoom.onTouchStart(e);
|
5321 |
-
},
|
5322 |
-
touchEnd(e) {
|
5323 |
-
const swiper = this;
|
5324 |
-
if (!swiper.zoom.enabled) return;
|
5325 |
-
swiper.zoom.onTouchEnd(e);
|
5326 |
-
},
|
5327 |
-
doubleTap(e) {
|
5328 |
-
const swiper = this;
|
5329 |
-
if (swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) {
|
5330 |
-
swiper.zoom.toggle(e);
|
5331 |
-
}
|
5332 |
-
},
|
5333 |
-
transitionEnd() {
|
5334 |
-
const swiper = this;
|
5335 |
-
if (swiper.zoom.enabled && swiper.params.zoom.enabled) {
|
5336 |
-
swiper.zoom.onTransitionEnd();
|
5337 |
-
}
|
5338 |
-
},
|
5339 |
-
},
|
5340 |
-
};
|
5341 |
-
|
5342 |
-
const Lazy = {
|
5343 |
-
loadInSlide(index$$1, loadInDuplicate = true) {
|
5344 |
-
const swiper = this;
|
5345 |
-
const params = swiper.params.lazy;
|
5346 |
-
if (typeof index$$1 === 'undefined') return;
|
5347 |
-
if (swiper.slides.length === 0) return;
|
5348 |
-
const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
|
5349 |
-
|
5350 |
-
const $slideEl = isVirtual
|
5351 |
-
? swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-swiper-slide-index="${index$$1}"]`)
|
5352 |
-
: swiper.slides.eq(index$$1);
|
5353 |
-
|
5354 |
-
let $images = $slideEl.find(`.${params.elementClass}:not(.${params.loadedClass}):not(.${params.loadingClass})`);
|
5355 |
-
if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) {
|
5356 |
-
$images = $images.add($slideEl[0]);
|
5357 |
-
}
|
5358 |
-
if ($images.length === 0) return;
|
5359 |
-
|
5360 |
-
$images.each((imageIndex, imageEl) => {
|
5361 |
-
const $imageEl = $(imageEl);
|
5362 |
-
$imageEl.addClass(params.loadingClass);
|
5363 |
-
|
5364 |
-
const background = $imageEl.attr('data-background');
|
5365 |
-
const src = $imageEl.attr('data-src');
|
5366 |
-
const srcset = $imageEl.attr('data-srcset');
|
5367 |
-
const sizes = $imageEl.attr('data-sizes');
|
5368 |
-
|
5369 |
-
swiper.loadImage($imageEl[0], (src || background), srcset, sizes, false, () => {
|
5370 |
-
if (typeof swiper === 'undefined' || swiper === null || !swiper || (swiper && !swiper.params) || swiper.destroyed) return;
|
5371 |
-
if (background) {
|
5372 |
-
$imageEl.css('background-image', `url("${background}")`);
|
5373 |
-
$imageEl.removeAttr('data-background');
|
5374 |
-
} else {
|
5375 |
-
if (srcset) {
|
5376 |
-
$imageEl.attr('srcset', srcset);
|
5377 |
-
$imageEl.removeAttr('data-srcset');
|
5378 |
-
}
|
5379 |
-
if (sizes) {
|
5380 |
-
$imageEl.attr('sizes', sizes);
|
5381 |
-
$imageEl.removeAttr('data-sizes');
|
5382 |
-
}
|
5383 |
-
if (src) {
|
5384 |
-
$imageEl.attr('src', src);
|
5385 |
-
$imageEl.removeAttr('data-src');
|
5386 |
-
}
|
5387 |
-
}
|
5388 |
-
|
5389 |
-
$imageEl.addClass(params.loadedClass).removeClass(params.loadingClass);
|
5390 |
-
$slideEl.find(`.${params.preloaderClass}`).remove();
|
5391 |
-
if (swiper.params.loop && loadInDuplicate) {
|
5392 |
-
const slideOriginalIndex = $slideEl.attr('data-swiper-slide-index');
|
5393 |
-
if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) {
|
5394 |
-
const originalSlide = swiper.$wrapperEl.children(`[data-swiper-slide-index="${slideOriginalIndex}"]:not(.${swiper.params.slideDuplicateClass})`);
|
5395 |
-
swiper.lazy.loadInSlide(originalSlide.index(), false);
|
5396 |
-
} else {
|
5397 |
-
const duplicatedSlide = swiper.$wrapperEl.children(`.${swiper.params.slideDuplicateClass}[data-swiper-slide-index="${slideOriginalIndex}"]`);
|
5398 |
-
swiper.lazy.loadInSlide(duplicatedSlide.index(), false);
|
5399 |
-
}
|
5400 |
-
}
|
5401 |
-
swiper.emit('lazyImageReady', $slideEl[0], $imageEl[0]);
|
5402 |
-
});
|
5403 |
-
|
5404 |
-
swiper.emit('lazyImageLoad', $slideEl[0], $imageEl[0]);
|
5405 |
-
});
|
5406 |
-
},
|
5407 |
-
load() {
|
5408 |
-
const swiper = this;
|
5409 |
-
const {
|
5410 |
-
$wrapperEl, params: swiperParams, slides, activeIndex,
|
5411 |
-
} = swiper;
|
5412 |
-
const isVirtual = swiper.virtual && swiperParams.virtual.enabled;
|
5413 |
-
const params = swiperParams.lazy;
|
5414 |
-
|
5415 |
-
let slidesPerView = swiperParams.slidesPerView;
|
5416 |
-
if (slidesPerView === 'auto') {
|
5417 |
-
slidesPerView = 0;
|
5418 |
-
}
|
5419 |
-
|
5420 |
-
function slideExist(index$$1) {
|
5421 |
-
if (isVirtual) {
|
5422 |
-
if ($wrapperEl.children(`.${swiperParams.slideClass}[data-swiper-slide-index="${index$$1}"]`).length) {
|
5423 |
-
return true;
|
5424 |
-
}
|
5425 |
-
} else if (slides[index$$1]) return true;
|
5426 |
-
return false;
|
5427 |
-
}
|
5428 |
-
function slideIndex(slideEl) {
|
5429 |
-
if (isVirtual) {
|
5430 |
-
return $(slideEl).attr('data-swiper-slide-index');
|
5431 |
-
}
|
5432 |
-
return $(slideEl).index();
|
5433 |
-
}
|
5434 |
-
|
5435 |
-
if (!swiper.lazy.initialImageLoaded) swiper.lazy.initialImageLoaded = true;
|
5436 |
-
if (swiper.params.watchSlidesVisibility) {
|
5437 |
-
$wrapperEl.children(`.${swiperParams.slideVisibleClass}`).each((elIndex, slideEl) => {
|
5438 |
-
const index$$1 = isVirtual ? $(slideEl).attr('data-swiper-slide-index') : $(slideEl).index();
|
5439 |
-
swiper.lazy.loadInSlide(index$$1);
|
5440 |
-
});
|
5441 |
-
} else if (slidesPerView > 1) {
|
5442 |
-
for (let i = activeIndex; i < activeIndex + slidesPerView; i += 1) {
|
5443 |
-
if (slideExist(i)) swiper.lazy.loadInSlide(i);
|
5444 |
-
}
|
5445 |
-
} else {
|
5446 |
-
swiper.lazy.loadInSlide(activeIndex);
|
5447 |
-
}
|
5448 |
-
if (params.loadPrevNext) {
|
5449 |
-
if (slidesPerView > 1 || (params.loadPrevNextAmount && params.loadPrevNextAmount > 1)) {
|
5450 |
-
const amount = params.loadPrevNextAmount;
|
5451 |
-
const spv = slidesPerView;
|
5452 |
-
const maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length);
|
5453 |
-
const minIndex = Math.max(activeIndex - Math.max(spv, amount), 0);
|
5454 |
-
// Next Slides
|
5455 |
-
for (let i = activeIndex + slidesPerView; i < maxIndex; i += 1) {
|
5456 |
-
if (slideExist(i)) swiper.lazy.loadInSlide(i);
|
5457 |
-
}
|
5458 |
-
// Prev Slides
|
5459 |
-
for (let i = minIndex; i < activeIndex; i += 1) {
|
5460 |
-
if (slideExist(i)) swiper.lazy.loadInSlide(i);
|
5461 |
-
}
|
5462 |
-
} else {
|
5463 |
-
const nextSlide = $wrapperEl.children(`.${swiperParams.slideNextClass}`);
|
5464 |
-
if (nextSlide.length > 0) swiper.lazy.loadInSlide(slideIndex(nextSlide));
|
5465 |
-
|
5466 |
-
const prevSlide = $wrapperEl.children(`.${swiperParams.slidePrevClass}`);
|
5467 |
-
if (prevSlide.length > 0) swiper.lazy.loadInSlide(slideIndex(prevSlide));
|
5468 |
-
}
|
5469 |
-
}
|
5470 |
-
},
|
5471 |
-
};
|
5472 |
-
|
5473 |
-
var Lazy$1 = {
|
5474 |
-
name: 'lazy',
|
5475 |
-
params: {
|
5476 |
-
lazy: {
|
5477 |
-
enabled: false,
|
5478 |
-
loadPrevNext: false,
|
5479 |
-
loadPrevNextAmount: 1,
|
5480 |
-
loadOnTransitionStart: false,
|
5481 |
-
|
5482 |
-
elementClass: 'swiper-lazy',
|
5483 |
-
loadingClass: 'swiper-lazy-loading',
|
5484 |
-
loadedClass: 'swiper-lazy-loaded',
|
5485 |
-
preloaderClass: 'swiper-lazy-preloader',
|
5486 |
-
},
|
5487 |
-
},
|
5488 |
-
create() {
|
5489 |
-
const swiper = this;
|
5490 |
-
Utils.extend(swiper, {
|
5491 |
-
lazy: {
|
5492 |
-
initialImageLoaded: false,
|
5493 |
-
load: Lazy.load.bind(swiper),
|
5494 |
-
loadInSlide: Lazy.loadInSlide.bind(swiper),
|
5495 |
-
},
|
5496 |
-
});
|
5497 |
-
},
|
5498 |
-
on: {
|
5499 |
-
beforeInit() {
|
5500 |
-
const swiper = this;
|
5501 |
-
if (swiper.params.lazy.enabled && swiper.params.preloadImages) {
|
5502 |
-
swiper.params.preloadImages = false;
|
5503 |
-
}
|
5504 |
-
},
|
5505 |
-
init() {
|
5506 |
-
const swiper = this;
|
5507 |
-
if (swiper.params.lazy.enabled && !swiper.params.loop && swiper.params.initialSlide === 0) {
|
5508 |
-
swiper.lazy.load();
|
5509 |
-
}
|
5510 |
-
},
|
5511 |
-
scroll() {
|
5512 |
-
const swiper = this;
|
5513 |
-
if (swiper.params.freeMode && !swiper.params.freeModeSticky) {
|
5514 |
-
swiper.lazy.load();
|
5515 |
-
}
|
5516 |
-
},
|
5517 |
-
resize() {
|
5518 |
-
const swiper = this;
|
5519 |
-
if (swiper.params.lazy.enabled) {
|
5520 |
-
swiper.lazy.load();
|
5521 |
-
}
|
5522 |
-
},
|
5523 |
-
scrollbarDragMove() {
|
5524 |
-
const swiper = this;
|
5525 |
-
if (swiper.params.lazy.enabled) {
|
5526 |
-
swiper.lazy.load();
|
5527 |
-
}
|
5528 |
-
},
|
5529 |
-
transitionStart() {
|
5530 |
-
const swiper = this;
|
5531 |
-
if (swiper.params.lazy.enabled) {
|
5532 |
-
if (swiper.params.lazy.loadOnTransitionStart || (!swiper.params.lazy.loadOnTransitionStart && !swiper.lazy.initialImageLoaded)) {
|
5533 |
-
swiper.lazy.load();
|
5534 |
-
}
|
5535 |
-
}
|
5536 |
-
},
|
5537 |
-
transitionEnd() {
|
5538 |
-
const swiper = this;
|
5539 |
-
if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) {
|
5540 |
-
swiper.lazy.load();
|
5541 |
-
}
|
5542 |
-
},
|
5543 |
-
},
|
5544 |
-
};
|
5545 |
-
|
5546 |
-
/* eslint no-bitwise: ["error", { "allow": [">>"] }] */
|
5547 |
-
|
5548 |
-
const Controller = {
|
5549 |
-
LinearSpline: function LinearSpline(x, y) {
|
5550 |
-
const binarySearch = (function search() {
|
5551 |
-
let maxIndex;
|
5552 |
-
let minIndex;
|
5553 |
-
let guess;
|
5554 |
-
return (array, val) => {
|
5555 |
-
minIndex = -1;
|
5556 |
-
maxIndex = array.length;
|
5557 |
-
while (maxIndex - minIndex > 1) {
|
5558 |
-
guess = maxIndex + minIndex >> 1;
|
5559 |
-
if (array[guess] <= val) {
|
5560 |
-
minIndex = guess;
|
5561 |
-
} else {
|
5562 |
-
maxIndex = guess;
|
5563 |
-
}
|
5564 |
-
}
|
5565 |
-
return maxIndex;
|
5566 |
-
};
|
5567 |
-
}());
|
5568 |
-
this.x = x;
|
5569 |
-
this.y = y;
|
5570 |
-
this.lastIndex = x.length - 1;
|
5571 |
-
// Given an x value (x2), return the expected y2 value:
|
5572 |
-
// (x1,y1) is the known point before given value,
|
5573 |
-
// (x3,y3) is the known point after given value.
|
5574 |
-
let i1;
|
5575 |
-
let i3;
|
5576 |
-
|
5577 |
-
this.interpolate = function interpolate(x2) {
|
5578 |
-
if (!x2) return 0;
|
5579 |
-
|
5580 |
-
// Get the indexes of x1 and x3 (the array indexes before and after given x2):
|
5581 |
-
i3 = binarySearch(this.x, x2);
|
5582 |
-
i1 = i3 - 1;
|
5583 |
-
|
5584 |
-
// We have our indexes i1 & i3, so we can calculate already:
|
5585 |
-
// y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1
|
5586 |
-
return (((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1])) + this.y[i1];
|
5587 |
-
};
|
5588 |
-
return this;
|
5589 |
-
},
|
5590 |
-
// xxx: for now i will just save one spline function to to
|
5591 |
-
getInterpolateFunction(c) {
|
5592 |
-
const swiper = this;
|
5593 |
-
if (!swiper.controller.spline) {
|
5594 |
-
swiper.controller.spline = swiper.params.loop
|
5595 |
-
? new Controller.LinearSpline(swiper.slidesGrid, c.slidesGrid)
|
5596 |
-
: new Controller.LinearSpline(swiper.snapGrid, c.snapGrid);
|
5597 |
-
}
|
5598 |
-
},
|
5599 |
-
setTranslate(setTranslate, byController) {
|
5600 |
-
const swiper = this;
|
5601 |
-
const controlled = swiper.controller.control;
|
5602 |
-
let multiplier;
|
5603 |
-
let controlledTranslate;
|
5604 |
-
function setControlledTranslate(c) {
|
5605 |
-
// this will create an Interpolate function based on the snapGrids
|
5606 |
-
// x is the Grid of the scrolled scroller and y will be the controlled scroller
|
5607 |
-
// it makes sense to create this only once and recall it for the interpolation
|
5608 |
-
// the function does a lot of value caching for performance
|
5609 |
-
const translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate;
|
5610 |
-
if (swiper.params.controller.by === 'slide') {
|
5611 |
-
swiper.controller.getInterpolateFunction(c);
|
5612 |
-
// i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid
|
5613 |
-
// but it did not work out
|
5614 |
-
controlledTranslate = -swiper.controller.spline.interpolate(-translate);
|
5615 |
-
}
|
5616 |
-
|
5617 |
-
if (!controlledTranslate || swiper.params.controller.by === 'container') {
|
5618 |
-
multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate());
|
5619 |
-
controlledTranslate = ((translate - swiper.minTranslate()) * multiplier) + c.minTranslate();
|
5620 |
-
}
|
5621 |
-
|
5622 |
-
if (swiper.params.controller.inverse) {
|
5623 |
-
controlledTranslate = c.maxTranslate() - controlledTranslate;
|
5624 |
-
}
|
5625 |
-
c.updateProgress(controlledTranslate);
|
5626 |
-
c.setTranslate(controlledTranslate, swiper);
|
5627 |
-
c.updateActiveIndex();
|
5628 |
-
c.updateSlidesClasses();
|
5629 |
-
}
|
5630 |
-
if (Array.isArray(controlled)) {
|
5631 |
-
for (let i = 0; i < controlled.length; i += 1) {
|
5632 |
-
if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
|
5633 |
-
setControlledTranslate(controlled[i]);
|
5634 |
-
}
|
5635 |
-
}
|
5636 |
-
} else if (controlled instanceof Swiper && byController !== controlled) {
|
5637 |
-
setControlledTranslate(controlled);
|
5638 |
-
}
|
5639 |
-
},
|
5640 |
-
setTransition(duration, byController) {
|
5641 |
-
const swiper = this;
|
5642 |
-
const controlled = swiper.controller.control;
|
5643 |
-
let i;
|
5644 |
-
function setControlledTransition(c) {
|
5645 |
-
c.setTransition(duration, swiper);
|
5646 |
-
if (duration !== 0) {
|
5647 |
-
c.transitionStart();
|
5648 |
-
if (c.params.autoHeight) {
|
5649 |
-
Utils.nextTick(() => {
|
5650 |
-
c.updateAutoHeight();
|
5651 |
-
});
|
5652 |
-
}
|
5653 |
-
c.$wrapperEl.transitionEnd(() => {
|
5654 |
-
if (!controlled) return;
|
5655 |
-
if (c.params.loop && swiper.params.controller.by === 'slide') {
|
5656 |
-
c.loopFix();
|
5657 |
-
}
|
5658 |
-
c.transitionEnd();
|
5659 |
-
});
|
5660 |
-
}
|
5661 |
-
}
|
5662 |
-
if (Array.isArray(controlled)) {
|
5663 |
-
for (i = 0; i < controlled.length; i += 1) {
|
5664 |
-
if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
|
5665 |
-
setControlledTransition(controlled[i]);
|
5666 |
-
}
|
5667 |
-
}
|
5668 |
-
} else if (controlled instanceof Swiper && byController !== controlled) {
|
5669 |
-
setControlledTransition(controlled);
|
5670 |
-
}
|
5671 |
-
},
|
5672 |
-
};
|
5673 |
-
var Controller$1 = {
|
5674 |
-
name: 'controller',
|
5675 |
-
params: {
|
5676 |
-
controller: {
|
5677 |
-
control: undefined,
|
5678 |
-
inverse: false,
|
5679 |
-
by: 'slide', // or 'container'
|
5680 |
-
},
|
5681 |
-
},
|
5682 |
-
create() {
|
5683 |
-
const swiper = this;
|
5684 |
-
Utils.extend(swiper, {
|
5685 |
-
controller: {
|
5686 |
-
control: swiper.params.controller.control,
|
5687 |
-
getInterpolateFunction: Controller.getInterpolateFunction.bind(swiper),
|
5688 |
-
setTranslate: Controller.setTranslate.bind(swiper),
|
5689 |
-
setTransition: Controller.setTransition.bind(swiper),
|
5690 |
-
},
|
5691 |
-
});
|
5692 |
-
},
|
5693 |
-
on: {
|
5694 |
-
update() {
|
5695 |
-
const swiper = this;
|
5696 |
-
if (!swiper.controller.control) return;
|
5697 |
-
if (swiper.controller.spline) {
|
5698 |
-
swiper.controller.spline = undefined;
|
5699 |
-
delete swiper.controller.spline;
|
5700 |
-
}
|
5701 |
-
},
|
5702 |
-
resize() {
|
5703 |
-
const swiper = this;
|
5704 |
-
if (!swiper.controller.control) return;
|
5705 |
-
if (swiper.controller.spline) {
|
5706 |
-
swiper.controller.spline = undefined;
|
5707 |
-
delete swiper.controller.spline;
|
5708 |
-
}
|
5709 |
-
},
|
5710 |
-
observerUpdate() {
|
5711 |
-
const swiper = this;
|
5712 |
-
if (!swiper.controller.control) return;
|
5713 |
-
if (swiper.controller.spline) {
|
5714 |
-
swiper.controller.spline = undefined;
|
5715 |
-
delete swiper.controller.spline;
|
5716 |
-
}
|
5717 |
-
},
|
5718 |
-
setTranslate(translate, byController) {
|
5719 |
-
const swiper = this;
|
5720 |
-
if (!swiper.controller.control) return;
|
5721 |
-
swiper.controller.setTranslate(translate, byController);
|
5722 |
-
},
|
5723 |
-
setTransition(duration, byController) {
|
5724 |
-
const swiper = this;
|
5725 |
-
if (!swiper.controller.control) return;
|
5726 |
-
swiper.controller.setTransition(duration, byController);
|
5727 |
-
},
|
5728 |
-
},
|
5729 |
-
};
|
5730 |
-
|
5731 |
-
const a11y = {
|
5732 |
-
makeElFocusable($el) {
|
5733 |
-
$el.attr('tabIndex', '0');
|
5734 |
-
return $el;
|
5735 |
-
},
|
5736 |
-
addElRole($el, role) {
|
5737 |
-
$el.attr('role', role);
|
5738 |
-
return $el;
|
5739 |
-
},
|
5740 |
-
addElLabel($el, label) {
|
5741 |
-
$el.attr('aria-label', label);
|
5742 |
-
return $el;
|
5743 |
-
},
|
5744 |
-
disableEl($el) {
|
5745 |
-
$el.attr('aria-disabled', true);
|
5746 |
-
return $el;
|
5747 |
-
},
|
5748 |
-
enableEl($el) {
|
5749 |
-
$el.attr('aria-disabled', false);
|
5750 |
-
return $el;
|
5751 |
-
},
|
5752 |
-
onEnterKey(e) {
|
5753 |
-
const swiper = this;
|
5754 |
-
const params = swiper.params.a11y;
|
5755 |
-
if (e.keyCode !== 13) return;
|
5756 |
-
const $targetEl = $(e.target);
|
5757 |
-
if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) {
|
5758 |
-
if (!(swiper.isEnd && !swiper.params.loop)) {
|
5759 |
-
swiper.slideNext();
|
5760 |
-
}
|
5761 |
-
if (swiper.isEnd) {
|
5762 |
-
swiper.a11y.notify(params.lastSlideMessage);
|
5763 |
-
} else {
|
5764 |
-
swiper.a11y.notify(params.nextSlideMessage);
|
5765 |
-
}
|
5766 |
-
}
|
5767 |
-
if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) {
|
5768 |
-
if (!(swiper.isBeginning && !swiper.params.loop)) {
|
5769 |
-
swiper.slidePrev();
|
5770 |
-
}
|
5771 |
-
if (swiper.isBeginning) {
|
5772 |
-
swiper.a11y.notify(params.firstSlideMessage);
|
5773 |
-
} else {
|
5774 |
-
swiper.a11y.notify(params.prevSlideMessage);
|
5775 |
-
}
|
5776 |
-
}
|
5777 |
-
if (swiper.pagination && $targetEl.is(`.${swiper.params.pagination.bulletClass}`)) {
|
5778 |
-
$targetEl[0].click();
|
5779 |
-
}
|
5780 |
-
},
|
5781 |
-
notify(message) {
|
5782 |
-
const swiper = this;
|
5783 |
-
const notification = swiper.a11y.liveRegion;
|
5784 |
-
if (notification.length === 0) return;
|
5785 |
-
notification.html('');
|
5786 |
-
notification.html(message);
|
5787 |
-
},
|
5788 |
-
updateNavigation() {
|
5789 |
-
const swiper = this;
|
5790 |
-
|
5791 |
-
if (swiper.params.loop) return;
|
5792 |
-
const { $nextEl, $prevEl } = swiper.navigation;
|
5793 |
-
|
5794 |
-
if ($prevEl && $prevEl.length > 0) {
|
5795 |
-
if (swiper.isBeginning) {
|
5796 |
-
swiper.a11y.disableEl($prevEl);
|
5797 |
-
} else {
|
5798 |
-
swiper.a11y.enableEl($prevEl);
|
5799 |
-
}
|
5800 |
-
}
|
5801 |
-
if ($nextEl && $nextEl.length > 0) {
|
5802 |
-
if (swiper.isEnd) {
|
5803 |
-
swiper.a11y.disableEl($nextEl);
|
5804 |
-
} else {
|
5805 |
-
swiper.a11y.enableEl($nextEl);
|
5806 |
-
}
|
5807 |
-
}
|
5808 |
-
},
|
5809 |
-
updatePagination() {
|
5810 |
-
const swiper = this;
|
5811 |
-
const params = swiper.params.a11y;
|
5812 |
-
if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
|
5813 |
-
swiper.pagination.bullets.each((bulletIndex, bulletEl) => {
|
5814 |
-
const $bulletEl = $(bulletEl);
|
5815 |
-
swiper.a11y.makeElFocusable($bulletEl);
|
5816 |
-
swiper.a11y.addElRole($bulletEl, 'button');
|
5817 |
-
swiper.a11y.addElLabel($bulletEl, params.paginationBulletMessage.replace(/{{index}}/, $bulletEl.index() + 1));
|
5818 |
-
});
|
5819 |
-
}
|
5820 |
-
},
|
5821 |
-
init() {
|
5822 |
-
const swiper = this;
|
5823 |
-
|
5824 |
-
swiper.$el.append(swiper.a11y.liveRegion);
|
5825 |
-
|
5826 |
-
// Navigation
|
5827 |
-
const params = swiper.params.a11y;
|
5828 |
-
let $nextEl;
|
5829 |
-
let $prevEl;
|
5830 |
-
if (swiper.navigation && swiper.navigation.$nextEl) {
|
5831 |
-
$nextEl = swiper.navigation.$nextEl;
|
5832 |
-
}
|
5833 |
-
if (swiper.navigation && swiper.navigation.$prevEl) {
|
5834 |
-
$prevEl = swiper.navigation.$prevEl;
|
5835 |
-
}
|
5836 |
-
if ($nextEl) {
|
5837 |
-
swiper.a11y.makeElFocusable($nextEl);
|
5838 |
-
swiper.a11y.addElRole($nextEl, 'button');
|
5839 |
-
swiper.a11y.addElLabel($nextEl, params.nextSlideMessage);
|
5840 |
-
$nextEl.on('keydown', swiper.a11y.onEnterKey);
|
5841 |
-
}
|
5842 |
-
if ($prevEl) {
|
5843 |
-
swiper.a11y.makeElFocusable($prevEl);
|
5844 |
-
swiper.a11y.addElRole($prevEl, 'button');
|
5845 |
-
swiper.a11y.addElLabel($prevEl, params.prevSlideMessage);
|
5846 |
-
$prevEl.on('keydown', swiper.a11y.onEnterKey);
|
5847 |
-
}
|
5848 |
-
|
5849 |
-
// Pagination
|
5850 |
-
if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
|
5851 |
-
swiper.pagination.$el.on('keydown', `.${swiper.params.pagination.bulletClass}`, swiper.a11y.onEnterKey);
|
5852 |
-
}
|
5853 |
-
},
|
5854 |
-
destroy() {
|
5855 |
-
const swiper = this;
|
5856 |
-
if (swiper.a11y.liveRegion && swiper.a11y.liveRegion.length > 0) swiper.a11y.liveRegion.remove();
|
5857 |
-
|
5858 |
-
let $nextEl;
|
5859 |
-
let $prevEl;
|
5860 |
-
if (swiper.navigation && swiper.navigation.$nextEl) {
|
5861 |
-
$nextEl = swiper.navigation.$nextEl;
|
5862 |
-
}
|
5863 |
-
if (swiper.navigation && swiper.navigation.$prevEl) {
|
5864 |
-
$prevEl = swiper.navigation.$prevEl;
|
5865 |
-
}
|
5866 |
-
if ($nextEl) {
|
5867 |
-
$nextEl.off('keydown', swiper.a11y.onEnterKey);
|
5868 |
-
}
|
5869 |
-
if ($prevEl) {
|
5870 |
-
$prevEl.off('keydown', swiper.a11y.onEnterKey);
|
5871 |
-
}
|
5872 |
-
|
5873 |
-
// Pagination
|
5874 |
-
if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
|
5875 |
-
swiper.pagination.$el.off('keydown', `.${swiper.params.pagination.bulletClass}`, swiper.a11y.onEnterKey);
|
5876 |
-
}
|
5877 |
-
},
|
5878 |
-
};
|
5879 |
-
var A11y = {
|
5880 |
-
name: 'a11y',
|
5881 |
-
params: {
|
5882 |
-
a11y: {
|
5883 |
-
enabled: true,
|
5884 |
-
notificationClass: 'swiper-notification',
|
5885 |
-
prevSlideMessage: 'Previous slide',
|
5886 |
-
nextSlideMessage: 'Next slide',
|
5887 |
-
firstSlideMessage: 'This is the first slide',
|
5888 |
-
lastSlideMessage: 'This is the last slide',
|
5889 |
-
paginationBulletMessage: 'Go to slide {{index}}',
|
5890 |
-
},
|
5891 |
-
},
|
5892 |
-
create() {
|
5893 |
-
const swiper = this;
|
5894 |
-
Utils.extend(swiper, {
|
5895 |
-
a11y: {
|
5896 |
-
liveRegion: $(`<span class="${swiper.params.a11y.notificationClass}" aria-live="assertive" aria-atomic="true"></span>`),
|
5897 |
-
},
|
5898 |
-
});
|
5899 |
-
Object.keys(a11y).forEach((methodName) => {
|
5900 |
-
swiper.a11y[methodName] = a11y[methodName].bind(swiper);
|
5901 |
-
});
|
5902 |
-
},
|
5903 |
-
on: {
|
5904 |
-
init() {
|
5905 |
-
const swiper = this;
|
5906 |
-
if (!swiper.params.a11y.enabled) return;
|
5907 |
-
swiper.a11y.init();
|
5908 |
-
swiper.a11y.updateNavigation();
|
5909 |
-
},
|
5910 |
-
toEdge() {
|
5911 |
-
const swiper = this;
|
5912 |
-
if (!swiper.params.a11y.enabled) return;
|
5913 |
-
swiper.a11y.updateNavigation();
|
5914 |
-
},
|
5915 |
-
fromEdge() {
|
5916 |
-
const swiper = this;
|
5917 |
-
if (!swiper.params.a11y.enabled) return;
|
5918 |
-
swiper.a11y.updateNavigation();
|
5919 |
-
},
|
5920 |
-
paginationUpdate() {
|
5921 |
-
const swiper = this;
|
5922 |
-
if (!swiper.params.a11y.enabled) return;
|
5923 |
-
swiper.a11y.updatePagination();
|
5924 |
-
},
|
5925 |
-
destroy() {
|
5926 |
-
const swiper = this;
|
5927 |
-
if (!swiper.params.a11y.enabled) return;
|
5928 |
-
swiper.a11y.destroy();
|
5929 |
-
},
|
5930 |
-
},
|
5931 |
-
};
|
5932 |
-
|
5933 |
-
const History = {
|
5934 |
-
init() {
|
5935 |
-
const swiper = this;
|
5936 |
-
if (!swiper.params.history) return;
|
5937 |
-
if (!window.history || !window.history.pushState) {
|
5938 |
-
swiper.params.history.enabled = false;
|
5939 |
-
swiper.params.hashNavigation.enabled = true;
|
5940 |
-
return;
|
5941 |
-
}
|
5942 |
-
const history = swiper.history;
|
5943 |
-
history.initialized = true;
|
5944 |
-
history.paths = History.getPathValues();
|
5945 |
-
if (!history.paths.key && !history.paths.value) return;
|
5946 |
-
history.scrollToSlide(0, history.paths.value, swiper.params.runCallbacksOnInit);
|
5947 |
-
if (!swiper.params.history.replaceState) {
|
5948 |
-
window.addEventListener('popstate', swiper.history.setHistoryPopState);
|
5949 |
-
}
|
5950 |
-
},
|
5951 |
-
destroy() {
|
5952 |
-
const swiper = this;
|
5953 |
-
if (!swiper.params.history.replaceState) {
|
5954 |
-
window.removeEventListener('popstate', swiper.history.setHistoryPopState);
|
5955 |
-
}
|
5956 |
-
},
|
5957 |
-
setHistoryPopState() {
|
5958 |
-
const swiper = this;
|
5959 |
-
swiper.history.paths = History.getPathValues();
|
5960 |
-
swiper.history.scrollToSlide(swiper.params.speed, swiper.history.paths.value, false);
|
5961 |
-
},
|
5962 |
-
getPathValues() {
|
5963 |
-
const pathArray = window.location.pathname.slice(1).split('/').filter(part => part !== '');
|
5964 |
-
const total = pathArray.length;
|
5965 |
-
const key = pathArray[total - 2];
|
5966 |
-
const value = pathArray[total - 1];
|
5967 |
-
return { key, value };
|
5968 |
-
},
|
5969 |
-
setHistory(key, index$$1) {
|
5970 |
-
const swiper = this;
|
5971 |
-
if (!swiper.history.initialized || !swiper.params.history.enabled) return;
|
5972 |
-
const slide = swiper.slides.eq(index$$1);
|
5973 |
-
let value = History.slugify(slide.attr('data-history'));
|
5974 |
-
if (!window.location.pathname.includes(key)) {
|
5975 |
-
value = `${key}/${value}`;
|
5976 |
-
}
|
5977 |
-
const currentState = window.history.state;
|
5978 |
-
if (currentState && currentState.value === value) {
|
5979 |
-
return;
|
5980 |
-
}
|
5981 |
-
if (swiper.params.history.replaceState) {
|
5982 |
-
window.history.replaceState({ value }, null, value);
|
5983 |
-
} else {
|
5984 |
-
window.history.pushState({ value }, null, value);
|
5985 |
-
}
|
5986 |
-
},
|
5987 |
-
slugify(text$$1) {
|
5988 |
-
return text$$1.toString().toLowerCase()
|
5989 |
-
.replace(/\s+/g, '-')
|
5990 |
-
.replace(/[^\w-]+/g, '')
|
5991 |
-
.replace(/--+/g, '-')
|
5992 |
-
.replace(/^-+/, '')
|
5993 |
-
.replace(/-+$/, '');
|
5994 |
-
},
|
5995 |
-
scrollToSlide(speed, value, runCallbacks) {
|
5996 |
-
const swiper = this;
|
5997 |
-
if (value) {
|
5998 |
-
for (let i = 0, length = swiper.slides.length; i < length; i += 1) {
|
5999 |
-
const slide = swiper.slides.eq(i);
|
6000 |
-
const slideHistory = History.slugify(slide.attr('data-history'));
|
6001 |
-
if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) {
|
6002 |
-
const index$$1 = slide.index();
|
6003 |
-
swiper.slideTo(index$$1, speed, runCallbacks);
|
6004 |
-
}
|
6005 |
-
}
|
6006 |
-
} else {
|
6007 |
-
swiper.slideTo(0, speed, runCallbacks);
|
6008 |
-
}
|
6009 |
-
},
|
6010 |
-
};
|
6011 |
-
|
6012 |
-
var History$1 = {
|
6013 |
-
name: 'history',
|
6014 |
-
params: {
|
6015 |
-
history: {
|
6016 |
-
enabled: false,
|
6017 |
-
replaceState: false,
|
6018 |
-
key: 'slides',
|
6019 |
-
},
|
6020 |
-
},
|
6021 |
-
create() {
|
6022 |
-
const swiper = this;
|
6023 |
-
Utils.extend(swiper, {
|
6024 |
-
history: {
|
6025 |
-
init: History.init.bind(swiper),
|
6026 |
-
setHistory: History.setHistory.bind(swiper),
|
6027 |
-
setHistoryPopState: History.setHistoryPopState.bind(swiper),
|
6028 |
-
scrollToSlide: History.scrollToSlide.bind(swiper),
|
6029 |
-
destroy: History.destroy.bind(swiper),
|
6030 |
-
},
|
6031 |
-
});
|
6032 |
-
},
|
6033 |
-
on: {
|
6034 |
-
init() {
|
6035 |
-
const swiper = this;
|
6036 |
-
if (swiper.params.history.enabled) {
|
6037 |
-
swiper.history.init();
|
6038 |
-
}
|
6039 |
-
},
|
6040 |
-
destroy() {
|
6041 |
-
const swiper = this;
|
6042 |
-
if (swiper.params.history.enabled) {
|
6043 |
-
swiper.history.destroy();
|
6044 |
-
}
|
6045 |
-
},
|
6046 |
-
transitionEnd() {
|
6047 |
-
const swiper = this;
|
6048 |
-
if (swiper.history.initialized) {
|
6049 |
-
swiper.history.setHistory(swiper.params.history.key, swiper.activeIndex);
|
6050 |
-
}
|
6051 |
-
},
|
6052 |
-
},
|
6053 |
-
};
|
6054 |
-
|
6055 |
-
const HashNavigation = {
|
6056 |
-
onHashCange() {
|
6057 |
-
const swiper = this;
|
6058 |
-
const newHash = document.location.hash.replace('#', '');
|
6059 |
-
const activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash');
|
6060 |
-
if (newHash !== activeSlideHash) {
|
6061 |
-
const newIndex = swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-hash="${newHash}"]`).index();
|
6062 |
-
if (typeof newIndex === 'undefined') return;
|
6063 |
-
swiper.slideTo(newIndex);
|
6064 |
-
}
|
6065 |
-
},
|
6066 |
-
setHash() {
|
6067 |
-
const swiper = this;
|
6068 |
-
if (!swiper.hashNavigation.initialized || !swiper.params.hashNavigation.enabled) return;
|
6069 |
-
if (swiper.params.hashNavigation.replaceState && window.history && window.history.replaceState) {
|
6070 |
-
window.history.replaceState(null, null, (`#${swiper.slides.eq(swiper.activeIndex).attr('data-hash')}` || ''));
|
6071 |
-
} else {
|
6072 |
-
const slide = swiper.slides.eq(swiper.activeIndex);
|
6073 |
-
const hash = slide.attr('data-hash') || slide.attr('data-history');
|
6074 |
-
document.location.hash = hash || '';
|
6075 |
-
}
|
6076 |
-
},
|
6077 |
-
init() {
|
6078 |
-
const swiper = this;
|
6079 |
-
if (!swiper.params.hashNavigation.enabled || (swiper.params.history && swiper.params.history.enabled)) return;
|
6080 |
-
swiper.hashNavigation.initialized = true;
|
6081 |
-
const hash = document.location.hash.replace('#', '');
|
6082 |
-
if (hash) {
|
6083 |
-
const speed = 0;
|
6084 |
-
for (let i = 0, length = swiper.slides.length; i < length; i += 1) {
|
6085 |
-
const slide = swiper.slides.eq(i);
|
6086 |
-
const slideHash = slide.attr('data-hash') || slide.attr('data-history');
|
6087 |
-
if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) {
|
6088 |
-
const index$$1 = slide.index();
|
6089 |
-
swiper.slideTo(index$$1, speed, swiper.params.runCallbacksOnInit, true);
|
6090 |
-
}
|
6091 |
-
}
|
6092 |
-
}
|
6093 |
-
if (swiper.params.hashNavigation.watchState) {
|
6094 |
-
$(window).on('hashchange', swiper.hashNavigation.onHashCange);
|
6095 |
-
}
|
6096 |
-
},
|
6097 |
-
destroy() {
|
6098 |
-
const swiper = this;
|
6099 |
-
if (swiper.params.hashNavigation.watchState) {
|
6100 |
-
$(window).off('hashchange', swiper.hashNavigation.onHashCange);
|
6101 |
-
}
|
6102 |
-
},
|
6103 |
-
};
|
6104 |
-
var HashNavigation$1 = {
|
6105 |
-
name: 'hash-navigation',
|
6106 |
-
params: {
|
6107 |
-
hashNavigation: {
|
6108 |
-
enabled: false,
|
6109 |
-
replaceState: false,
|
6110 |
-
watchState: false,
|
6111 |
-
},
|
6112 |
-
},
|
6113 |
-
create() {
|
6114 |
-
const swiper = this;
|
6115 |
-
Utils.extend(swiper, {
|
6116 |
-
hashNavigation: {
|
6117 |
-
initialized: false,
|
6118 |
-
init: HashNavigation.init.bind(swiper),
|
6119 |
-
destroy: HashNavigation.destroy.bind(swiper),
|
6120 |
-
setHash: HashNavigation.setHash.bind(swiper),
|
6121 |
-
onHashCange: HashNavigation.onHashCange.bind(swiper),
|
6122 |
-
},
|
6123 |
-
});
|
6124 |
-
},
|
6125 |
-
on: {
|
6126 |
-
init() {
|
6127 |
-
const swiper = this;
|
6128 |
-
if (swiper.params.hashNavigation.enabled) {
|
6129 |
-
swiper.hashNavigation.init();
|
6130 |
-
}
|
6131 |
-
},
|
6132 |
-
destroy() {
|
6133 |
-
const swiper = this;
|
6134 |
-
if (swiper.params.hashNavigation.enabled) {
|
6135 |
-
swiper.hashNavigation.destroy();
|
6136 |
-
}
|
6137 |
-
},
|
6138 |
-
transitionEnd() {
|
6139 |
-
const swiper = this;
|
6140 |
-
if (swiper.hashNavigation.initialized) {
|
6141 |
-
swiper.hashNavigation.setHash();
|
6142 |
-
}
|
6143 |
-
},
|
6144 |
-
},
|
6145 |
-
};
|
6146 |
-
|
6147 |
-
/* eslint no-underscore-dangle: "off" */
|
6148 |
-
|
6149 |
-
const Autoplay = {
|
6150 |
-
run() {
|
6151 |
-
const swiper = this;
|
6152 |
-
const $activeSlideEl = swiper.slides.eq(swiper.activeIndex);
|
6153 |
-
let delay = swiper.params.autoplay.delay;
|
6154 |
-
if ($activeSlideEl.attr('data-swiper-autoplay')) {
|
6155 |
-
delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay;
|
6156 |
-
}
|
6157 |
-
swiper.autoplay.timeout = Utils.nextTick(() => {
|
6158 |
-
if (swiper.params.autoplay.reverseDirection) {
|
6159 |
-
if (swiper.params.loop) {
|
6160 |
-
swiper.loopFix();
|
6161 |
-
swiper.slidePrev(swiper.params.speed, true, true);
|
6162 |
-
swiper.emit('autoplay');
|
6163 |
-
} else if (!swiper.isBeginning) {
|
6164 |
-
swiper.slidePrev(swiper.params.speed, true, true);
|
6165 |
-
swiper.emit('autoplay');
|
6166 |
-
} else if (!swiper.params.autoplay.stopOnLastSlide) {
|
6167 |
-
swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true);
|
6168 |
-
swiper.emit('autoplay');
|
6169 |
-
} else {
|
6170 |
-
swiper.autoplay.stop();
|
6171 |
-
}
|
6172 |
-
} else if (swiper.params.loop) {
|
6173 |
-
swiper.loopFix();
|
6174 |
-
swiper.slideNext(swiper.params.speed, true, true);
|
6175 |
-
swiper.emit('autoplay');
|
6176 |
-
} else if (!swiper.isEnd) {
|
6177 |
-
swiper.slideNext(swiper.params.speed, true, true);
|
6178 |
-
swiper.emit('autoplay');
|
6179 |
-
} else if (!swiper.params.autoplay.stopOnLastSlide) {
|
6180 |
-
swiper.slideTo(0, swiper.params.speed, true, true);
|
6181 |
-
swiper.emit('autoplay');
|
6182 |
-
} else {
|
6183 |
-
swiper.autoplay.stop();
|
6184 |
-
}
|
6185 |
-
}, delay);
|
6186 |
-
},
|
6187 |
-
start() {
|
6188 |
-
const swiper = this;
|
6189 |
-
if (typeof swiper.autoplay.timeout !== 'undefined') return false;
|
6190 |
-
if (swiper.autoplay.running) return false;
|
6191 |
-
swiper.autoplay.running = true;
|
6192 |
-
swiper.emit('autoplayStart');
|
6193 |
-
swiper.autoplay.run();
|
6194 |
-
return true;
|
6195 |
-
},
|
6196 |
-
stop() {
|
6197 |
-
const swiper = this;
|
6198 |
-
if (!swiper.autoplay.running) return false;
|
6199 |
-
if (typeof swiper.autoplay.timeout === 'undefined') return false;
|
6200 |
-
|
6201 |
-
if (swiper.autoplay.timeout) {
|
6202 |
-
clearTimeout(swiper.autoplay.timeout);
|
6203 |
-
swiper.autoplay.timeout = undefined;
|
6204 |
-
}
|
6205 |
-
swiper.autoplay.running = false;
|
6206 |
-
swiper.emit('autoplayStop');
|
6207 |
-
return true;
|
6208 |
-
},
|
6209 |
-
pause(speed) {
|
6210 |
-
const swiper = this;
|
6211 |
-
if (!swiper.autoplay.running) return;
|
6212 |
-
if (swiper.autoplay.paused) return;
|
6213 |
-
if (swiper.autoplay.timeout) clearTimeout(swiper.autoplay.timeout);
|
6214 |
-
swiper.autoplay.paused = true;
|
6215 |
-
if (speed === 0 || !swiper.params.autoplay.waitForTransition) {
|
6216 |
-
swiper.autoplay.paused = false;
|
6217 |
-
swiper.autoplay.run();
|
6218 |
-
} else {
|
6219 |
-
swiper.$wrapperEl[0].addEventListener('transitionend', swiper.autoplay.onTransitionEnd);
|
6220 |
-
swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);
|
6221 |
-
}
|
6222 |
-
},
|
6223 |
-
};
|
6224 |
-
|
6225 |
-
var Autoplay$1 = {
|
6226 |
-
name: 'autoplay',
|
6227 |
-
params: {
|
6228 |
-
autoplay: {
|
6229 |
-
enabled: false,
|
6230 |
-
delay: 3000,
|
6231 |
-
waitForTransition: true,
|
6232 |
-
disableOnInteraction: true,
|
6233 |
-
stopOnLastSlide: false,
|
6234 |
-
reverseDirection: false,
|
6235 |
-
},
|
6236 |
-
},
|
6237 |
-
create() {
|
6238 |
-
const swiper = this;
|
6239 |
-
Utils.extend(swiper, {
|
6240 |
-
autoplay: {
|
6241 |
-
running: false,
|
6242 |
-
paused: false,
|
6243 |
-
run: Autoplay.run.bind(swiper),
|
6244 |
-
start: Autoplay.start.bind(swiper),
|
6245 |
-
stop: Autoplay.stop.bind(swiper),
|
6246 |
-
pause: Autoplay.pause.bind(swiper),
|
6247 |
-
onTransitionEnd(e) {
|
6248 |
-
if (!swiper || swiper.destroyed || !swiper.$wrapperEl) return;
|
6249 |
-
if (e.target !== this) return;
|
6250 |
-
swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.autoplay.onTransitionEnd);
|
6251 |
-
swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);
|
6252 |
-
swiper.autoplay.paused = false;
|
6253 |
-
if (!swiper.autoplay.running) {
|
6254 |
-
swiper.autoplay.stop();
|
6255 |
-
} else {
|
6256 |
-
swiper.autoplay.run();
|
6257 |
-
}
|
6258 |
-
},
|
6259 |
-
},
|
6260 |
-
});
|
6261 |
-
},
|
6262 |
-
on: {
|
6263 |
-
init() {
|
6264 |
-
const swiper = this;
|
6265 |
-
if (swiper.params.autoplay.enabled) {
|
6266 |
-
swiper.autoplay.start();
|
6267 |
-
}
|
6268 |
-
},
|
6269 |
-
beforeTransitionStart(speed, internal) {
|
6270 |
-
const swiper = this;
|
6271 |
-
if (swiper.autoplay.running) {
|
6272 |
-
if (internal || !swiper.params.autoplay.disableOnInteraction) {
|
6273 |
-
swiper.autoplay.pause(speed);
|
6274 |
-
} else {
|
6275 |
-
swiper.autoplay.stop();
|
6276 |
-
}
|
6277 |
-
}
|
6278 |
-
},
|
6279 |
-
sliderFirstMove() {
|
6280 |
-
const swiper = this;
|
6281 |
-
if (swiper.autoplay.running) {
|
6282 |
-
if (swiper.params.autoplay.disableOnInteraction) {
|
6283 |
-
swiper.autoplay.stop();
|
6284 |
-
} else {
|
6285 |
-
swiper.autoplay.pause();
|
6286 |
-
}
|
6287 |
-
}
|
6288 |
-
},
|
6289 |
-
destroy() {
|
6290 |
-
const swiper = this;
|
6291 |
-
if (swiper.autoplay.running) {
|
6292 |
-
swiper.autoplay.stop();
|
6293 |
-
}
|
6294 |
-
},
|
6295 |
-
},
|
6296 |
-
};
|
6297 |
-
|
6298 |
-
const Fade = {
|
6299 |
-
setTranslate() {
|
6300 |
-
const swiper = this;
|
6301 |
-
const { slides } = swiper;
|
6302 |
-
for (let i = 0; i < slides.length; i += 1) {
|
6303 |
-
const $slideEl = swiper.slides.eq(i);
|
6304 |
-
const offset$$1 = $slideEl[0].swiperSlideOffset;
|
6305 |
-
let tx = -offset$$1;
|
6306 |
-
if (!swiper.params.virtualTranslate) tx -= swiper.translate;
|
6307 |
-
let ty = 0;
|
6308 |
-
if (!swiper.isHorizontal()) {
|
6309 |
-
ty = tx;
|
6310 |
-
tx = 0;
|
6311 |
-
}
|
6312 |
-
const slideOpacity = swiper.params.fadeEffect.crossFade
|
6313 |
-
? Math.max(1 - Math.abs($slideEl[0].progress), 0)
|
6314 |
-
: 1 + Math.min(Math.max($slideEl[0].progress, -1), 0);
|
6315 |
-
$slideEl
|
6316 |
-
.css({
|
6317 |
-
opacity: slideOpacity,
|
6318 |
-
})
|
6319 |
-
.transform(`translate3d(${tx}px, ${ty}px, 0px)`);
|
6320 |
-
}
|
6321 |
-
},
|
6322 |
-
setTransition(duration) {
|
6323 |
-
const swiper = this;
|
6324 |
-
const { slides, $wrapperEl } = swiper;
|
6325 |
-
slides.transition(duration);
|
6326 |
-
if (swiper.params.virtualTranslate && duration !== 0) {
|
6327 |
-
let eventTriggered = false;
|
6328 |
-
slides.transitionEnd(() => {
|
6329 |
-
if (eventTriggered) return;
|
6330 |
-
if (!swiper || swiper.destroyed) return;
|
6331 |
-
eventTriggered = true;
|
6332 |
-
swiper.animating = false;
|
6333 |
-
const triggerEvents = ['webkitTransitionEnd', 'transitionend'];
|
6334 |
-
for (let i = 0; i < triggerEvents.length; i += 1) {
|
6335 |
-
$wrapperEl.trigger(triggerEvents[i]);
|
6336 |
-
}
|
6337 |
-
});
|
6338 |
-
}
|
6339 |
-
},
|
6340 |
-
};
|
6341 |
-
|
6342 |
-
var EffectFade = {
|
6343 |
-
name: 'effect-fade',
|
6344 |
-
params: {
|
6345 |
-
fadeEffect: {
|
6346 |
-
crossFade: false,
|
6347 |
-
},
|
6348 |
-
},
|
6349 |
-
create() {
|
6350 |
-
const swiper = this;
|
6351 |
-
Utils.extend(swiper, {
|
6352 |
-
fadeEffect: {
|
6353 |
-
setTranslate: Fade.setTranslate.bind(swiper),
|
6354 |
-
setTransition: Fade.setTransition.bind(swiper),
|
6355 |
-
},
|
6356 |
-
});
|
6357 |
-
},
|
6358 |
-
on: {
|
6359 |
-
beforeInit() {
|
6360 |
-
const swiper = this;
|
6361 |
-
if (swiper.params.effect !== 'fade') return;
|
6362 |
-
swiper.classNames.push(`${swiper.params.containerModifierClass}fade`);
|
6363 |
-
const overwriteParams = {
|
6364 |
-
slidesPerView: 1,
|
6365 |
-
slidesPerColumn: 1,
|
6366 |
-
slidesPerGroup: 1,
|
6367 |
-
watchSlidesProgress: true,
|
6368 |
-
spaceBetween: 0,
|
6369 |
-
virtualTranslate: true,
|
6370 |
-
};
|
6371 |
-
Utils.extend(swiper.params, overwriteParams);
|
6372 |
-
Utils.extend(swiper.originalParams, overwriteParams);
|
6373 |
-
},
|
6374 |
-
setTranslate() {
|
6375 |
-
const swiper = this;
|
6376 |
-
if (swiper.params.effect !== 'fade') return;
|
6377 |
-
swiper.fadeEffect.setTranslate();
|
6378 |
-
},
|
6379 |
-
setTransition(duration) {
|
6380 |
-
const swiper = this;
|
6381 |
-
if (swiper.params.effect !== 'fade') return;
|
6382 |
-
swiper.fadeEffect.setTransition(duration);
|
6383 |
-
},
|
6384 |
-
},
|
6385 |
-
};
|
6386 |
-
|
6387 |
-
const Cube = {
|
6388 |
-
setTranslate() {
|
6389 |
-
const swiper = this;
|
6390 |
-
const {
|
6391 |
-
$el, $wrapperEl, slides, width: swiperWidth, height: swiperHeight, rtlTranslate: rtl, size: swiperSize,
|
6392 |
-
} = swiper;
|
6393 |
-
const params = swiper.params.cubeEffect;
|
6394 |
-
const isHorizontal = swiper.isHorizontal();
|
6395 |
-
const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
|
6396 |
-
let wrapperRotate = 0;
|
6397 |
-
let $cubeShadowEl;
|
6398 |
-
if (params.shadow) {
|
6399 |
-
if (isHorizontal) {
|
6400 |
-
$cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow');
|
6401 |
-
if ($cubeShadowEl.length === 0) {
|
6402 |
-
$cubeShadowEl = $('<div class="swiper-cube-shadow"></div>');
|
6403 |
-
$wrapperEl.append($cubeShadowEl);
|
6404 |
-
}
|
6405 |
-
$cubeShadowEl.css({ height: `${swiperWidth}px` });
|
6406 |
-
} else {
|
6407 |
-
$cubeShadowEl = $el.find('.swiper-cube-shadow');
|
6408 |
-
if ($cubeShadowEl.length === 0) {
|
6409 |
-
$cubeShadowEl = $('<div class="swiper-cube-shadow"></div>');
|
6410 |
-
$el.append($cubeShadowEl);
|
6411 |
-
}
|
6412 |
-
}
|
6413 |
-
}
|
6414 |
-
for (let i = 0; i < slides.length; i += 1) {
|
6415 |
-
const $slideEl = slides.eq(i);
|
6416 |
-
let slideIndex = i;
|
6417 |
-
if (isVirtual) {
|
6418 |
-
slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10);
|
6419 |
-
}
|
6420 |
-
let slideAngle = slideIndex * 90;
|
6421 |
-
let round = Math.floor(slideAngle / 360);
|
6422 |
-
if (rtl) {
|
6423 |
-
slideAngle = -slideAngle;
|
6424 |
-
round = Math.floor(-slideAngle / 360);
|
6425 |
-
}
|
6426 |
-
const progress = Math.max(Math.min($slideEl[0].progress, 1), -1);
|
6427 |
-
let tx = 0;
|
6428 |
-
let ty = 0;
|
6429 |
-
let tz = 0;
|
6430 |
-
if (slideIndex % 4 === 0) {
|
6431 |
-
tx = -round * 4 * swiperSize;
|
6432 |
-
tz = 0;
|
6433 |
-
} else if ((slideIndex - 1) % 4 === 0) {
|
6434 |
-
tx = 0;
|
6435 |
-
tz = -round * 4 * swiperSize;
|
6436 |
-
} else if ((slideIndex - 2) % 4 === 0) {
|
6437 |
-
tx = swiperSize + (round * 4 * swiperSize);
|
6438 |
-
tz = swiperSize;
|
6439 |
-
} else if ((slideIndex - 3) % 4 === 0) {
|
6440 |
-
tx = -swiperSize;
|
6441 |
-
tz = (3 * swiperSize) + (swiperSize * 4 * round);
|
6442 |
-
}
|
6443 |
-
if (rtl) {
|
6444 |
-
tx = -tx;
|
6445 |
-
}
|
6446 |
-
|
6447 |
-
if (!isHorizontal) {
|
6448 |
-
ty = tx;
|
6449 |
-
tx = 0;
|
6450 |
-
}
|
6451 |
-
|
6452 |
-
const transform$$1 = `rotateX(${isHorizontal ? 0 : -slideAngle}deg) rotateY(${isHorizontal ? slideAngle : 0}deg) translate3d(${tx}px, ${ty}px, ${tz}px)`;
|
6453 |
-
if (progress <= 1 && progress > -1) {
|
6454 |
-
wrapperRotate = (slideIndex * 90) + (progress * 90);
|
6455 |
-
if (rtl) wrapperRotate = (-slideIndex * 90) - (progress * 90);
|
6456 |
-
}
|
6457 |
-
$slideEl.transform(transform$$1);
|
6458 |
-
if (params.slideShadows) {
|
6459 |
-
// Set shadows
|
6460 |
-
let shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
|
6461 |
-
let shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
|
6462 |
-
if (shadowBefore.length === 0) {
|
6463 |
-
shadowBefore = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'left' : 'top'}"></div>`);
|
6464 |
-
$slideEl.append(shadowBefore);
|
6465 |
-
}
|
6466 |
-
if (shadowAfter.length === 0) {
|
6467 |
-
shadowAfter = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'right' : 'bottom'}"></div>`);
|
6468 |
-
$slideEl.append(shadowAfter);
|
6469 |
-
}
|
6470 |
-
if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);
|
6471 |
-
if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);
|
6472 |
-
}
|
6473 |
-
}
|
6474 |
-
$wrapperEl.css({
|
6475 |
-
'-webkit-transform-origin': `50% 50% -${swiperSize / 2}px`,
|
6476 |
-
'-moz-transform-origin': `50% 50% -${swiperSize / 2}px`,
|
6477 |
-
'-ms-transform-origin': `50% 50% -${swiperSize / 2}px`,
|
6478 |
-
'transform-origin': `50% 50% -${swiperSize / 2}px`,
|
6479 |
-
});
|
6480 |
-
|
6481 |
-
if (params.shadow) {
|
6482 |
-
if (isHorizontal) {
|
6483 |
-
$cubeShadowEl.transform(`translate3d(0px, ${(swiperWidth / 2) + params.shadowOffset}px, ${-swiperWidth / 2}px) rotateX(90deg) rotateZ(0deg) scale(${params.shadowScale})`);
|
6484 |
-
} else {
|
6485 |
-
const shadowAngle = Math.abs(wrapperRotate) - (Math.floor(Math.abs(wrapperRotate) / 90) * 90);
|
6486 |
-
const multiplier = 1.5 - (
|
6487 |
-
(Math.sin((shadowAngle * 2 * Math.PI) / 360) / 2)
|
6488 |
-
+ (Math.cos((shadowAngle * 2 * Math.PI) / 360) / 2)
|
6489 |
-
);
|
6490 |
-
const scale1 = params.shadowScale;
|
6491 |
-
const scale2 = params.shadowScale / multiplier;
|
6492 |
-
const offset$$1 = params.shadowOffset;
|
6493 |
-
$cubeShadowEl.transform(`scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${(swiperHeight / 2) + offset$$1}px, ${-swiperHeight / 2 / scale2}px) rotateX(-90deg)`);
|
6494 |
-
}
|
6495 |
-
}
|
6496 |
-
const zFactor = (Browser.isSafari || Browser.isUiWebView) ? (-swiperSize / 2) : 0;
|
6497 |
-
$wrapperEl
|
6498 |
-
.transform(`translate3d(0px,0,${zFactor}px) rotateX(${swiper.isHorizontal() ? 0 : wrapperRotate}deg) rotateY(${swiper.isHorizontal() ? -wrapperRotate : 0}deg)`);
|
6499 |
-
},
|
6500 |
-
setTransition(duration) {
|
6501 |
-
const swiper = this;
|
6502 |
-
const { $el, slides } = swiper;
|
6503 |
-
slides
|
6504 |
-
.transition(duration)
|
6505 |
-
.find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
|
6506 |
-
.transition(duration);
|
6507 |
-
if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) {
|
6508 |
-
$el.find('.swiper-cube-shadow').transition(duration);
|
6509 |
-
}
|
6510 |
-
},
|
6511 |
-
};
|
6512 |
-
|
6513 |
-
var EffectCube = {
|
6514 |
-
name: 'effect-cube',
|
6515 |
-
params: {
|
6516 |
-
cubeEffect: {
|
6517 |
-
slideShadows: true,
|
6518 |
-
shadow: true,
|
6519 |
-
shadowOffset: 20,
|
6520 |
-
shadowScale: 0.94,
|
6521 |
-
},
|
6522 |
-
},
|
6523 |
-
create() {
|
6524 |
-
const swiper = this;
|
6525 |
-
Utils.extend(swiper, {
|
6526 |
-
cubeEffect: {
|
6527 |
-
setTranslate: Cube.setTranslate.bind(swiper),
|
6528 |
-
setTransition: Cube.setTransition.bind(swiper),
|
6529 |
-
},
|
6530 |
-
});
|
6531 |
-
},
|
6532 |
-
on: {
|
6533 |
-
beforeInit() {
|
6534 |
-
const swiper = this;
|
6535 |
-
if (swiper.params.effect !== 'cube') return;
|
6536 |
-
swiper.classNames.push(`${swiper.params.containerModifierClass}cube`);
|
6537 |
-
swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);
|
6538 |
-
const overwriteParams = {
|
6539 |
-
slidesPerView: 1,
|
6540 |
-
slidesPerColumn: 1,
|
6541 |
-
slidesPerGroup: 1,
|
6542 |
-
watchSlidesProgress: true,
|
6543 |
-
resistanceRatio: 0,
|
6544 |
-
spaceBetween: 0,
|
6545 |
-
centeredSlides: false,
|
6546 |
-
virtualTranslate: true,
|
6547 |
-
};
|
6548 |
-
Utils.extend(swiper.params, overwriteParams);
|
6549 |
-
Utils.extend(swiper.originalParams, overwriteParams);
|
6550 |
-
},
|
6551 |
-
setTranslate() {
|
6552 |
-
const swiper = this;
|
6553 |
-
if (swiper.params.effect !== 'cube') return;
|
6554 |
-
swiper.cubeEffect.setTranslate();
|
6555 |
-
},
|
6556 |
-
setTransition(duration) {
|
6557 |
-
const swiper = this;
|
6558 |
-
if (swiper.params.effect !== 'cube') return;
|
6559 |
-
swiper.cubeEffect.setTransition(duration);
|
6560 |
-
},
|
6561 |
-
},
|
6562 |
-
};
|
6563 |
-
|
6564 |
-
const Flip = {
|
6565 |
-
setTranslate() {
|
6566 |
-
const swiper = this;
|
6567 |
-
const { slides, rtlTranslate: rtl } = swiper;
|
6568 |
-
for (let i = 0; i < slides.length; i += 1) {
|
6569 |
-
const $slideEl = slides.eq(i);
|
6570 |
-
let progress = $slideEl[0].progress;
|
6571 |
-
if (swiper.params.flipEffect.limitRotation) {
|
6572 |
-
progress = Math.max(Math.min($slideEl[0].progress, 1), -1);
|
6573 |
-
}
|
6574 |
-
const offset$$1 = $slideEl[0].swiperSlideOffset;
|
6575 |
-
const rotate = -180 * progress;
|
6576 |
-
let rotateY = rotate;
|
6577 |
-
let rotateX = 0;
|
6578 |
-
let tx = -offset$$1;
|
6579 |
-
let ty = 0;
|
6580 |
-
if (!swiper.isHorizontal()) {
|
6581 |
-
ty = tx;
|
6582 |
-
tx = 0;
|
6583 |
-
rotateX = -rotateY;
|
6584 |
-
rotateY = 0;
|
6585 |
-
} else if (rtl) {
|
6586 |
-
rotateY = -rotateY;
|
6587 |
-
}
|
6588 |
-
|
6589 |
-
$slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length;
|
6590 |
-
|
6591 |
-
if (swiper.params.flipEffect.slideShadows) {
|
6592 |
-
// Set shadows
|
6593 |
-
let shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
|
6594 |
-
let shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
|
6595 |
-
if (shadowBefore.length === 0) {
|
6596 |
-
shadowBefore = $(`<div class="swiper-slide-shadow-${swiper.isHorizontal() ? 'left' : 'top'}"></div>`);
|
6597 |
-
$slideEl.append(shadowBefore);
|
6598 |
-
}
|
6599 |
-
if (shadowAfter.length === 0) {
|
6600 |
-
shadowAfter = $(`<div class="swiper-slide-shadow-${swiper.isHorizontal() ? 'right' : 'bottom'}"></div>`);
|
6601 |
-
$slideEl.append(shadowAfter);
|
6602 |
-
}
|
6603 |
-
if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);
|
6604 |
-
if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);
|
6605 |
-
}
|
6606 |
-
$slideEl
|
6607 |
-
.transform(`translate3d(${tx}px, ${ty}px, 0px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`);
|
6608 |
-
}
|
6609 |
-
},
|
6610 |
-
setTransition(duration) {
|
6611 |
-
const swiper = this;
|
6612 |
-
const { slides, activeIndex, $wrapperEl } = swiper;
|
6613 |
-
slides
|
6614 |
-
.transition(duration)
|
6615 |
-
.find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
|
6616 |
-
.transition(duration);
|
6617 |
-
if (swiper.params.virtualTranslate && duration !== 0) {
|
6618 |
-
let eventTriggered = false;
|
6619 |
-
// eslint-disable-next-line
|
6620 |
-
slides.eq(activeIndex).transitionEnd(function onTransitionEnd() {
|
6621 |
-
if (eventTriggered) return;
|
6622 |
-
if (!swiper || swiper.destroyed) return;
|
6623 |
-
// if (!$(this).hasClass(swiper.params.slideActiveClass)) return;
|
6624 |
-
eventTriggered = true;
|
6625 |
-
swiper.animating = false;
|
6626 |
-
const triggerEvents = ['webkitTransitionEnd', 'transitionend'];
|
6627 |
-
for (let i = 0; i < triggerEvents.length; i += 1) {
|
6628 |
-
$wrapperEl.trigger(triggerEvents[i]);
|
6629 |
-
}
|
6630 |
-
});
|
6631 |
-
}
|
6632 |
-
},
|
6633 |
-
};
|
6634 |
-
|
6635 |
-
var EffectFlip = {
|
6636 |
-
name: 'effect-flip',
|
6637 |
-
params: {
|
6638 |
-
flipEffect: {
|
6639 |
-
slideShadows: true,
|
6640 |
-
limitRotation: true,
|
6641 |
-
},
|
6642 |
-
},
|
6643 |
-
create() {
|
6644 |
-
const swiper = this;
|
6645 |
-
Utils.extend(swiper, {
|
6646 |
-
flipEffect: {
|
6647 |
-
setTranslate: Flip.setTranslate.bind(swiper),
|
6648 |
-
setTransition: Flip.setTransition.bind(swiper),
|
6649 |
-
},
|
6650 |
-
});
|
6651 |
-
},
|
6652 |
-
on: {
|
6653 |
-
beforeInit() {
|
6654 |
-
const swiper = this;
|
6655 |
-
if (swiper.params.effect !== 'flip') return;
|
6656 |
-
swiper.classNames.push(`${swiper.params.containerModifierClass}flip`);
|
6657 |
-
swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);
|
6658 |
-
const overwriteParams = {
|
6659 |
-
slidesPerView: 1,
|
6660 |
-
slidesPerColumn: 1,
|
6661 |
-
slidesPerGroup: 1,
|
6662 |
-
watchSlidesProgress: true,
|
6663 |
-
spaceBetween: 0,
|
6664 |
-
virtualTranslate: true,
|
6665 |
-
};
|
6666 |
-
Utils.extend(swiper.params, overwriteParams);
|
6667 |
-
Utils.extend(swiper.originalParams, overwriteParams);
|
6668 |
-
},
|
6669 |
-
setTranslate() {
|
6670 |
-
const swiper = this;
|
6671 |
-
if (swiper.params.effect !== 'flip') return;
|
6672 |
-
swiper.flipEffect.setTranslate();
|
6673 |
-
},
|
6674 |
-
setTransition(duration) {
|
6675 |
-
const swiper = this;
|
6676 |
-
if (swiper.params.effect !== 'flip') return;
|
6677 |
-
swiper.flipEffect.setTransition(duration);
|
6678 |
-
},
|
6679 |
-
},
|
6680 |
-
};
|
6681 |
-
|
6682 |
-
const Coverflow = {
|
6683 |
-
setTranslate() {
|
6684 |
-
const swiper = this;
|
6685 |
-
const {
|
6686 |
-
width: swiperWidth, height: swiperHeight, slides, $wrapperEl, slidesSizesGrid,
|
6687 |
-
} = swiper;
|
6688 |
-
const params = swiper.params.coverflowEffect;
|
6689 |
-
const isHorizontal = swiper.isHorizontal();
|
6690 |
-
const transform$$1 = swiper.translate;
|
6691 |
-
const center = isHorizontal ? -transform$$1 + (swiperWidth / 2) : -transform$$1 + (swiperHeight / 2);
|
6692 |
-
const rotate = isHorizontal ? params.rotate : -params.rotate;
|
6693 |
-
const translate = params.depth;
|
6694 |
-
// Each slide offset from center
|
6695 |
-
for (let i = 0, length = slides.length; i < length; i += 1) {
|
6696 |
-
const $slideEl = slides.eq(i);
|
6697 |
-
const slideSize = slidesSizesGrid[i];
|
6698 |
-
const slideOffset = $slideEl[0].swiperSlideOffset;
|
6699 |
-
const offsetMultiplier = ((center - slideOffset - (slideSize / 2)) / slideSize) * params.modifier;
|
6700 |
-
|
6701 |
-
let rotateY = isHorizontal ? rotate * offsetMultiplier : 0;
|
6702 |
-
let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier;
|
6703 |
-
// var rotateZ = 0
|
6704 |
-
let translateZ = -translate * Math.abs(offsetMultiplier);
|
6705 |
-
|
6706 |
-
let translateY = isHorizontal ? 0 : params.stretch * (offsetMultiplier);
|
6707 |
-
let translateX = isHorizontal ? params.stretch * (offsetMultiplier) : 0;
|
6708 |
-
|
6709 |
-
// Fix for ultra small values
|
6710 |
-
if (Math.abs(translateX) < 0.001) translateX = 0;
|
6711 |
-
if (Math.abs(translateY) < 0.001) translateY = 0;
|
6712 |
-
if (Math.abs(translateZ) < 0.001) translateZ = 0;
|
6713 |
-
if (Math.abs(rotateY) < 0.001) rotateY = 0;
|
6714 |
-
if (Math.abs(rotateX) < 0.001) rotateX = 0;
|
6715 |
-
|
6716 |
-
const slideTransform = `translate3d(${translateX}px,${translateY}px,${translateZ}px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`;
|
6717 |
-
|
6718 |
-
$slideEl.transform(slideTransform);
|
6719 |
-
$slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;
|
6720 |
-
if (params.slideShadows) {
|
6721 |
-
// Set shadows
|
6722 |
-
let $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
|
6723 |
-
let $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
|
6724 |
-
if ($shadowBeforeEl.length === 0) {
|
6725 |
-
$shadowBeforeEl = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'left' : 'top'}"></div>`);
|
6726 |
-
$slideEl.append($shadowBeforeEl);
|
6727 |
-
}
|
6728 |
-
if ($shadowAfterEl.length === 0) {
|
6729 |
-
$shadowAfterEl = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'right' : 'bottom'}"></div>`);
|
6730 |
-
$slideEl.append($shadowAfterEl);
|
6731 |
-
}
|
6732 |
-
if ($shadowBeforeEl.length) $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;
|
6733 |
-
if ($shadowAfterEl.length) $shadowAfterEl[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0;
|
6734 |
-
}
|
6735 |
-
}
|
6736 |
-
|
6737 |
-
// Set correct perspective for IE10
|
6738 |
-
if (Support.pointerEvents || Support.prefixedPointerEvents) {
|
6739 |
-
const ws = $wrapperEl[0].style;
|
6740 |
-
ws.perspectiveOrigin = `${center}px 50%`;
|
6741 |
-
}
|
6742 |
-
},
|
6743 |
-
setTransition(duration) {
|
6744 |
-
const swiper = this;
|
6745 |
-
swiper.slides
|
6746 |
-
.transition(duration)
|
6747 |
-
.find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
|
6748 |
-
.transition(duration);
|
6749 |
-
},
|
6750 |
-
};
|
6751 |
-
|
6752 |
-
var EffectCoverflow = {
|
6753 |
-
name: 'effect-coverflow',
|
6754 |
-
params: {
|
6755 |
-
coverflowEffect: {
|
6756 |
-
rotate: 50,
|
6757 |
-
stretch: 0,
|
6758 |
-
depth: 100,
|
6759 |
-
modifier: 1,
|
6760 |
-
slideShadows: true,
|
6761 |
-
},
|
6762 |
-
},
|
6763 |
-
create() {
|
6764 |
-
const swiper = this;
|
6765 |
-
Utils.extend(swiper, {
|
6766 |
-
coverflowEffect: {
|
6767 |
-
setTranslate: Coverflow.setTranslate.bind(swiper),
|
6768 |
-
setTransition: Coverflow.setTransition.bind(swiper),
|
6769 |
-
},
|
6770 |
-
});
|
6771 |
-
},
|
6772 |
-
on: {
|
6773 |
-
beforeInit() {
|
6774 |
-
const swiper = this;
|
6775 |
-
if (swiper.params.effect !== 'coverflow') return;
|
6776 |
-
|
6777 |
-
swiper.classNames.push(`${swiper.params.containerModifierClass}coverflow`);
|
6778 |
-
swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);
|
6779 |
-
|
6780 |
-
swiper.params.watchSlidesProgress = true;
|
6781 |
-
swiper.originalParams.watchSlidesProgress = true;
|
6782 |
-
},
|
6783 |
-
setTranslate() {
|
6784 |
-
const swiper = this;
|
6785 |
-
if (swiper.params.effect !== 'coverflow') return;
|
6786 |
-
swiper.coverflowEffect.setTranslate();
|
6787 |
-
},
|
6788 |
-
setTransition(duration) {
|
6789 |
-
const swiper = this;
|
6790 |
-
if (swiper.params.effect !== 'coverflow') return;
|
6791 |
-
swiper.coverflowEffect.setTransition(duration);
|
6792 |
-
},
|
6793 |
-
},
|
6794 |
-
};
|
6795 |
-
|
6796 |
-
const Thumbs = {
|
6797 |
-
init() {
|
6798 |
-
const swiper = this;
|
6799 |
-
const { thumbs: thumbsParams } = swiper.params;
|
6800 |
-
const SwiperClass = swiper.constructor;
|
6801 |
-
if (thumbsParams.swiper instanceof SwiperClass) {
|
6802 |
-
swiper.thumbs.swiper = thumbsParams.swiper;
|
6803 |
-
Utils.extend(swiper.thumbs.swiper.originalParams, {
|
6804 |
-
watchSlidesProgress: true,
|
6805 |
-
slideToClickedSlide: false,
|
6806 |
-
});
|
6807 |
-
Utils.extend(swiper.thumbs.swiper.params, {
|
6808 |
-
watchSlidesProgress: true,
|
6809 |
-
slideToClickedSlide: false,
|
6810 |
-
});
|
6811 |
-
} else if (Utils.isObject(thumbsParams.swiper)) {
|
6812 |
-
swiper.thumbs.swiper = new SwiperClass(Utils.extend({}, thumbsParams.swiper, {
|
6813 |
-
watchSlidesVisibility: true,
|
6814 |
-
watchSlidesProgress: true,
|
6815 |
-
slideToClickedSlide: false,
|
6816 |
-
}));
|
6817 |
-
swiper.thumbs.swiperCreated = true;
|
6818 |
-
}
|
6819 |
-
swiper.thumbs.swiper.$el.addClass(swiper.params.thumbs.thumbsContainerClass);
|
6820 |
-
swiper.thumbs.swiper.on('tap', swiper.thumbs.onThumbClick);
|
6821 |
-
},
|
6822 |
-
onThumbClick() {
|
6823 |
-
const swiper = this;
|
6824 |
-
const thumbsSwiper = swiper.thumbs.swiper;
|
6825 |
-
if (!thumbsSwiper) return;
|
6826 |
-
const clickedIndex = thumbsSwiper.clickedIndex;
|
6827 |
-
const clickedSlide = thumbsSwiper.clickedSlide;
|
6828 |
-
if (clickedSlide && $(clickedSlide).hasClass(swiper.params.thumbs.slideThumbActiveClass)) return;
|
6829 |
-
if (typeof clickedIndex === 'undefined' || clickedIndex === null) return;
|
6830 |
-
let slideToIndex;
|
6831 |
-
if (thumbsSwiper.params.loop) {
|
6832 |
-
slideToIndex = parseInt($(thumbsSwiper.clickedSlide).attr('data-swiper-slide-index'), 10);
|
6833 |
-
} else {
|
6834 |
-
slideToIndex = clickedIndex;
|
6835 |
-
}
|
6836 |
-
if (swiper.params.loop) {
|
6837 |
-
let currentIndex = swiper.activeIndex;
|
6838 |
-
if (swiper.slides.eq(currentIndex).hasClass(swiper.params.slideDuplicateClass)) {
|
6839 |
-
swiper.loopFix();
|
6840 |
-
// eslint-disable-next-line
|
6841 |
-
swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
|
6842 |
-
currentIndex = swiper.activeIndex;
|
6843 |
-
}
|
6844 |
-
const prevIndex = swiper.slides.eq(currentIndex).prevAll(`[data-swiper-slide-index="${slideToIndex}"]`).eq(0).index();
|
6845 |
-
const nextIndex = swiper.slides.eq(currentIndex).nextAll(`[data-swiper-slide-index="${slideToIndex}"]`).eq(0).index();
|
6846 |
-
if (typeof prevIndex === 'undefined') slideToIndex = nextIndex;
|
6847 |
-
else if (typeof nextIndex === 'undefined') slideToIndex = prevIndex;
|
6848 |
-
else if (nextIndex - currentIndex < currentIndex - prevIndex) slideToIndex = nextIndex;
|
6849 |
-
else slideToIndex = prevIndex;
|
6850 |
-
}
|
6851 |
-
swiper.slideTo(slideToIndex);
|
6852 |
-
},
|
6853 |
-
update(initial) {
|
6854 |
-
const swiper = this;
|
6855 |
-
const thumbsSwiper = swiper.thumbs.swiper;
|
6856 |
-
if (!thumbsSwiper) return;
|
6857 |
-
|
6858 |
-
const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto'
|
6859 |
-
? thumbsSwiper.slidesPerViewDynamic()
|
6860 |
-
: thumbsSwiper.params.slidesPerView;
|
6861 |
-
|
6862 |
-
if (swiper.realIndex !== thumbsSwiper.realIndex) {
|
6863 |
-
let currentThumbsIndex = thumbsSwiper.activeIndex;
|
6864 |
-
let newThumbsIndex;
|
6865 |
-
if (thumbsSwiper.params.loop) {
|
6866 |
-
if (thumbsSwiper.slides.eq(currentThumbsIndex).hasClass(thumbsSwiper.params.slideDuplicateClass)) {
|
6867 |
-
thumbsSwiper.loopFix();
|
6868 |
-
// eslint-disable-next-line
|
6869 |
-
thumbsSwiper._clientLeft = thumbsSwiper.$wrapperEl[0].clientLeft;
|
6870 |
-
currentThumbsIndex = thumbsSwiper.activeIndex;
|
6871 |
-
}
|
6872 |
-
// Find actual thumbs index to slide to
|
6873 |
-
const prevThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).prevAll(`[data-swiper-slide-index="${swiper.realIndex}"]`).eq(0).index();
|
6874 |
-
const nextThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).nextAll(`[data-swiper-slide-index="${swiper.realIndex}"]`).eq(0).index();
|
6875 |
-
if (typeof prevThumbsIndex === 'undefined') newThumbsIndex = nextThumbsIndex;
|
6876 |
-
else if (typeof nextThumbsIndex === 'undefined') newThumbsIndex = prevThumbsIndex;
|
6877 |
-
else if (nextThumbsIndex - currentThumbsIndex === currentThumbsIndex - prevThumbsIndex) newThumbsIndex = currentThumbsIndex;
|
6878 |
-
else if (nextThumbsIndex - currentThumbsIndex < currentThumbsIndex - prevThumbsIndex) newThumbsIndex = nextThumbsIndex;
|
6879 |
-
else newThumbsIndex = prevThumbsIndex;
|
6880 |
-
} else {
|
6881 |
-
newThumbsIndex = swiper.realIndex;
|
6882 |
-
}
|
6883 |
-
if (thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0) {
|
6884 |
-
if (thumbsSwiper.params.centeredSlides) {
|
6885 |
-
if (newThumbsIndex > currentThumbsIndex) {
|
6886 |
-
newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1;
|
6887 |
-
} else {
|
6888 |
-
newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1;
|
6889 |
-
}
|
6890 |
-
} else if (newThumbsIndex > currentThumbsIndex) {
|
6891 |
-
newThumbsIndex = newThumbsIndex - slidesPerView + 1;
|
6892 |
-
}
|
6893 |
-
thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined);
|
6894 |
-
}
|
6895 |
-
}
|
6896 |
-
|
6897 |
-
// Activate thumbs
|
6898 |
-
let thumbsToActivate = 1;
|
6899 |
-
const thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass;
|
6900 |
-
|
6901 |
-
if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) {
|
6902 |
-
thumbsToActivate = swiper.params.slidesPerView;
|
6903 |
-
}
|
6904 |
-
|
6905 |
-
thumbsSwiper.slides.removeClass(thumbActiveClass);
|
6906 |
-
if (thumbsSwiper.params.loop) {
|
6907 |
-
for (let i = 0; i < thumbsToActivate; i += 1) {
|
6908 |
-
thumbsSwiper.$wrapperEl.children(`[data-swiper-slide-index="${swiper.realIndex + i}"]`).addClass(thumbActiveClass);
|
6909 |
-
}
|
6910 |
-
} else {
|
6911 |
-
for (let i = 0; i < thumbsToActivate; i += 1) {
|
6912 |
-
thumbsSwiper.slides.eq(swiper.realIndex + i).addClass(thumbActiveClass);
|
6913 |
-
}
|
6914 |
-
}
|
6915 |
-
},
|
6916 |
-
};
|
6917 |
-
var Thumbs$1 = {
|
6918 |
-
name: 'thumbs',
|
6919 |
-
params: {
|
6920 |
-
thumbs: {
|
6921 |
-
swiper: null,
|
6922 |
-
slideThumbActiveClass: 'swiper-slide-thumb-active',
|
6923 |
-
thumbsContainerClass: 'swiper-container-thumbs',
|
6924 |
-
},
|
6925 |
-
},
|
6926 |
-
create() {
|
6927 |
-
const swiper = this;
|
6928 |
-
Utils.extend(swiper, {
|
6929 |
-
thumbs: {
|
6930 |
-
swiper: null,
|
6931 |
-
init: Thumbs.init.bind(swiper),
|
6932 |
-
update: Thumbs.update.bind(swiper),
|
6933 |
-
onThumbClick: Thumbs.onThumbClick.bind(swiper),
|
6934 |
-
},
|
6935 |
-
});
|
6936 |
-
},
|
6937 |
-
on: {
|
6938 |
-
beforeInit() {
|
6939 |
-
const swiper = this;
|
6940 |
-
const { thumbs } = swiper.params;
|
6941 |
-
if (!thumbs || !thumbs.swiper) return;
|
6942 |
-
swiper.thumbs.init();
|
6943 |
-
swiper.thumbs.update(true);
|
6944 |
-
},
|
6945 |
-
slideChange() {
|
6946 |
-
const swiper = this;
|
6947 |
-
if (!swiper.thumbs.swiper) return;
|
6948 |
-
swiper.thumbs.update();
|
6949 |
-
},
|
6950 |
-
update() {
|
6951 |
-
const swiper = this;
|
6952 |
-
if (!swiper.thumbs.swiper) return;
|
6953 |
-
swiper.thumbs.update();
|
6954 |
-
},
|
6955 |
-
resize() {
|
6956 |
-
const swiper = this;
|
6957 |
-
if (!swiper.thumbs.swiper) return;
|
6958 |
-
swiper.thumbs.update();
|
6959 |
-
},
|
6960 |
-
observerUpdate() {
|
6961 |
-
const swiper = this;
|
6962 |
-
if (!swiper.thumbs.swiper) return;
|
6963 |
-
swiper.thumbs.update();
|
6964 |
-
},
|
6965 |
-
setTransition(duration) {
|
6966 |
-
const swiper = this;
|
6967 |
-
const thumbsSwiper = swiper.thumbs.swiper;
|
6968 |
-
if (!thumbsSwiper) return;
|
6969 |
-
thumbsSwiper.setTransition(duration);
|
6970 |
-
},
|
6971 |
-
beforeDestroy() {
|
6972 |
-
const swiper = this;
|
6973 |
-
const thumbsSwiper = swiper.thumbs.swiper;
|
6974 |
-
if (!thumbsSwiper) return;
|
6975 |
-
if (swiper.thumbs.swiperCreated && thumbsSwiper) {
|
6976 |
-
thumbsSwiper.destroy();
|
6977 |
-
}
|
6978 |
-
},
|
6979 |
-
},
|
6980 |
-
};
|
6981 |
-
|
6982 |
-
// Swiper Class
|
6983 |
-
|
6984 |
-
const components = [
|
6985 |
-
Device$1,
|
6986 |
-
Support$1,
|
6987 |
-
Browser$1,
|
6988 |
-
Resize,
|
6989 |
-
Observer$1,
|
6990 |
-
Virtual$1,
|
6991 |
-
Keyboard$1,
|
6992 |
-
Mousewheel$1,
|
6993 |
-
Navigation$1,
|
6994 |
-
Pagination$1,
|
6995 |
-
Scrollbar$1,
|
6996 |
-
Parallax$1,
|
6997 |
-
Zoom$1,
|
6998 |
-
Lazy$1,
|
6999 |
-
Controller$1,
|
7000 |
-
A11y,
|
7001 |
-
History$1,
|
7002 |
-
HashNavigation$1,
|
7003 |
-
Autoplay$1,
|
7004 |
-
EffectFade,
|
7005 |
-
EffectCube,
|
7006 |
-
EffectFlip,
|
7007 |
-
EffectCoverflow,
|
7008 |
-
Thumbs$1
|
7009 |
-
];
|
7010 |
-
|
7011 |
-
if (typeof Swiper.use === 'undefined') {
|
7012 |
-
Swiper.use = Swiper.Class.use;
|
7013 |
-
Swiper.installModule = Swiper.Class.installModule;
|
7014 |
-
}
|
7015 |
-
|
7016 |
-
Swiper.use(components);
|
7017 |
-
|
7018 |
-
export default Swiper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/lib/swiper/js/swiper.esm.js
DELETED
@@ -1,7000 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Swiper 4.4.6
|
3 |
-
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
4 |
-
* http://www.idangero.us/swiper/
|
5 |
-
*
|
6 |
-
* Copyright 2014-2018 Vladimir Kharlampidi
|
7 |
-
*
|
8 |
-
* Released under the MIT License
|
9 |
-
*
|
10 |
-
* Released on: December 19, 2018
|
11 |
-
*/
|
12 |
-
|
13 |
-
import { $, addClass, removeClass, hasClass, toggleClass, attr, removeAttr, data, transform, transition, on, off, trigger, transitionEnd, outerWidth, outerHeight, offset, css, each, html, text, is, index, eq, append, prepend, next, nextAll, prev, prevAll, parent, parents, closest, find, children, remove, add, styles } from 'dom7/dist/dom7.modular';
|
14 |
-
import { window, document } from 'ssr-window';
|
15 |
-
|
16 |
-
const Methods = {
|
17 |
-
addClass,
|
18 |
-
removeClass,
|
19 |
-
hasClass,
|
20 |
-
toggleClass,
|
21 |
-
attr,
|
22 |
-
removeAttr,
|
23 |
-
data,
|
24 |
-
transform,
|
25 |
-
transition,
|
26 |
-
on,
|
27 |
-
off,
|
28 |
-
trigger,
|
29 |
-
transitionEnd,
|
30 |
-
outerWidth,
|
31 |
-
outerHeight,
|
32 |
-
offset,
|
33 |
-
css,
|
34 |
-
each,
|
35 |
-
html,
|
36 |
-
text,
|
37 |
-
is,
|
38 |
-
index,
|
39 |
-
eq,
|
40 |
-
append,
|
41 |
-
prepend,
|
42 |
-
next,
|
43 |
-
nextAll,
|
44 |
-
prev,
|
45 |
-
prevAll,
|
46 |
-
parent,
|
47 |
-
parents,
|
48 |
-
closest,
|
49 |
-
find,
|
50 |
-
children,
|
51 |
-
remove,
|
52 |
-
add,
|
53 |
-
styles,
|
54 |
-
};
|
55 |
-
|
56 |
-
Object.keys(Methods).forEach((methodName) => {
|
57 |
-
$.fn[methodName] = Methods[methodName];
|
58 |
-
});
|
59 |
-
|
60 |
-
const Utils = {
|
61 |
-
deleteProps(obj) {
|
62 |
-
const object = obj;
|
63 |
-
Object.keys(object).forEach((key) => {
|
64 |
-
try {
|
65 |
-
object[key] = null;
|
66 |
-
} catch (e) {
|
67 |
-
// no getter for object
|
68 |
-
}
|
69 |
-
try {
|
70 |
-
delete object[key];
|
71 |
-
} catch (e) {
|
72 |
-
// something got wrong
|
73 |
-
}
|
74 |
-
});
|
75 |
-
},
|
76 |
-
nextTick(callback, delay = 0) {
|
77 |
-
return setTimeout(callback, delay);
|
78 |
-
},
|
79 |
-
now() {
|
80 |
-
return Date.now();
|
81 |
-
},
|
82 |
-
getTranslate(el, axis = 'x') {
|
83 |
-
let matrix;
|
84 |
-
let curTransform;
|
85 |
-
let transformMatrix;
|
86 |
-
|
87 |
-
const curStyle = window.getComputedStyle(el, null);
|
88 |
-
|
89 |
-
if (window.WebKitCSSMatrix) {
|
90 |
-
curTransform = curStyle.transform || curStyle.webkitTransform;
|
91 |
-
if (curTransform.split(',').length > 6) {
|
92 |
-
curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', ');
|
93 |
-
}
|
94 |
-
// Some old versions of Webkit choke when 'none' is passed; pass
|
95 |
-
// empty string instead in this case
|
96 |
-
transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);
|
97 |
-
} else {
|
98 |
-
transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');
|
99 |
-
matrix = transformMatrix.toString().split(',');
|
100 |
-
}
|
101 |
-
|
102 |
-
if (axis === 'x') {
|
103 |
-
// Latest Chrome and webkits Fix
|
104 |
-
if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41;
|
105 |
-
// Crazy IE10 Matrix
|
106 |
-
else if (matrix.length === 16) curTransform = parseFloat(matrix[12]);
|
107 |
-
// Normal Browsers
|
108 |
-
else curTransform = parseFloat(matrix[4]);
|
109 |
-
}
|
110 |
-
if (axis === 'y') {
|
111 |
-
// Latest Chrome and webkits Fix
|
112 |
-
if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42;
|
113 |
-
// Crazy IE10 Matrix
|
114 |
-
else if (matrix.length === 16) curTransform = parseFloat(matrix[13]);
|
115 |
-
// Normal Browsers
|
116 |
-
else curTransform = parseFloat(matrix[5]);
|
117 |
-
}
|
118 |
-
return curTransform || 0;
|
119 |
-
},
|
120 |
-
parseUrlQuery(url) {
|
121 |
-
const query = {};
|
122 |
-
let urlToParse = url || window.location.href;
|
123 |
-
let i;
|
124 |
-
let params;
|
125 |
-
let param;
|
126 |
-
let length;
|
127 |
-
if (typeof urlToParse === 'string' && urlToParse.length) {
|
128 |
-
urlToParse = urlToParse.indexOf('?') > -1 ? urlToParse.replace(/\S*\?/, '') : '';
|
129 |
-
params = urlToParse.split('&').filter(paramsPart => paramsPart !== '');
|
130 |
-
length = params.length;
|
131 |
-
|
132 |
-
for (i = 0; i < length; i += 1) {
|
133 |
-
param = params[i].replace(/#\S+/g, '').split('=');
|
134 |
-
query[decodeURIComponent(param[0])] = typeof param[1] === 'undefined' ? undefined : decodeURIComponent(param[1]) || '';
|
135 |
-
}
|
136 |
-
}
|
137 |
-
return query;
|
138 |
-
},
|
139 |
-
isObject(o) {
|
140 |
-
return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object;
|
141 |
-
},
|
142 |
-
extend(...args) {
|
143 |
-
const to = Object(args[0]);
|
144 |
-
for (let i = 1; i < args.length; i += 1) {
|
145 |
-
const nextSource = args[i];
|
146 |
-
if (nextSource !== undefined && nextSource !== null) {
|
147 |
-
const keysArray = Object.keys(Object(nextSource));
|
148 |
-
for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {
|
149 |
-
const nextKey = keysArray[nextIndex];
|
150 |
-
const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
|
151 |
-
if (desc !== undefined && desc.enumerable) {
|
152 |
-
if (Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {
|
153 |
-
Utils.extend(to[nextKey], nextSource[nextKey]);
|
154 |
-
} else if (!Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {
|
155 |
-
to[nextKey] = {};
|
156 |
-
Utils.extend(to[nextKey], nextSource[nextKey]);
|
157 |
-
} else {
|
158 |
-
to[nextKey] = nextSource[nextKey];
|
159 |
-
}
|
160 |
-
}
|
161 |
-
}
|
162 |
-
}
|
163 |
-
}
|
164 |
-
return to;
|
165 |
-
},
|
166 |
-
};
|
167 |
-
|
168 |
-
const Support = (function Support() {
|
169 |
-
const testDiv = document.createElement('div');
|
170 |
-
return {
|
171 |
-
touch: (window.Modernizr && window.Modernizr.touch === true) || (function checkTouch() {
|
172 |
-
return !!((window.navigator.maxTouchPoints > 0) || ('ontouchstart' in window) || (window.DocumentTouch && document instanceof window.DocumentTouch));
|
173 |
-
}()),
|
174 |
-
|
175 |
-
pointerEvents: !!(window.navigator.pointerEnabled || window.PointerEvent || ('maxTouchPoints' in window.navigator)),
|
176 |
-
prefixedPointerEvents: !!window.navigator.msPointerEnabled,
|
177 |
-
|
178 |
-
transition: (function checkTransition() {
|
179 |
-
const style = testDiv.style;
|
180 |
-
return ('transition' in style || 'webkitTransition' in style || 'MozTransition' in style);
|
181 |
-
}()),
|
182 |
-
transforms3d: (window.Modernizr && window.Modernizr.csstransforms3d === true) || (function checkTransforms3d() {
|
183 |
-
const style = testDiv.style;
|
184 |
-
return ('webkitPerspective' in style || 'MozPerspective' in style || 'OPerspective' in style || 'MsPerspective' in style || 'perspective' in style);
|
185 |
-
}()),
|
186 |
-
|
187 |
-
flexbox: (function checkFlexbox() {
|
188 |
-
const style = testDiv.style;
|
189 |
-
const styles$$1 = ('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' ');
|
190 |
-
for (let i = 0; i < styles$$1.length; i += 1) {
|
191 |
-
if (styles$$1[i] in style) return true;
|
192 |
-
}
|
193 |
-
return false;
|
194 |
-
}()),
|
195 |
-
|
196 |
-
observer: (function checkObserver() {
|
197 |
-
return ('MutationObserver' in window || 'WebkitMutationObserver' in window);
|
198 |
-
}()),
|
199 |
-
|
200 |
-
passiveListener: (function checkPassiveListener() {
|
201 |
-
let supportsPassive = false;
|
202 |
-
try {
|
203 |
-
const opts = Object.defineProperty({}, 'passive', {
|
204 |
-
// eslint-disable-next-line
|
205 |
-
get() {
|
206 |
-
supportsPassive = true;
|
207 |
-
},
|
208 |
-
});
|
209 |
-
window.addEventListener('testPassiveListener', null, opts);
|
210 |
-
} catch (e) {
|
211 |
-
// No support
|
212 |
-
}
|
213 |
-
return supportsPassive;
|
214 |
-
}()),
|
215 |
-
|
216 |
-
gestures: (function checkGestures() {
|
217 |
-
return 'ongesturestart' in window;
|
218 |
-
}()),
|
219 |
-
};
|
220 |
-
}());
|
221 |
-
|
222 |
-
class SwiperClass {
|
223 |
-
constructor(params = {}) {
|
224 |
-
const self = this;
|
225 |
-
self.params = params;
|
226 |
-
|
227 |
-
// Events
|
228 |
-
self.eventsListeners = {};
|
229 |
-
|
230 |
-
if (self.params && self.params.on) {
|
231 |
-
Object.keys(self.params.on).forEach((eventName) => {
|
232 |
-
self.on(eventName, self.params.on[eventName]);
|
233 |
-
});
|
234 |
-
}
|
235 |
-
}
|
236 |
-
|
237 |
-
on(events, handler, priority) {
|
238 |
-
const self = this;
|
239 |
-
if (typeof handler !== 'function') return self;
|
240 |
-
const method = priority ? 'unshift' : 'push';
|
241 |
-
events.split(' ').forEach((event) => {
|
242 |
-
if (!self.eventsListeners[event]) self.eventsListeners[event] = [];
|
243 |
-
self.eventsListeners[event][method](handler);
|
244 |
-
});
|
245 |
-
return self;
|
246 |
-
}
|
247 |
-
|
248 |
-
once(events, handler, priority) {
|
249 |
-
const self = this;
|
250 |
-
if (typeof handler !== 'function') return self;
|
251 |
-
function onceHandler(...args) {
|
252 |
-
handler.apply(self, args);
|
253 |
-
self.off(events, onceHandler);
|
254 |
-
}
|
255 |
-
return self.on(events, onceHandler, priority);
|
256 |
-
}
|
257 |
-
|
258 |
-
off(events, handler) {
|
259 |
-
const self = this;
|
260 |
-
if (!self.eventsListeners) return self;
|
261 |
-
events.split(' ').forEach((event) => {
|
262 |
-
if (typeof handler === 'undefined') {
|
263 |
-
self.eventsListeners[event] = [];
|
264 |
-
} else if (self.eventsListeners[event] && self.eventsListeners[event].length) {
|
265 |
-
self.eventsListeners[event].forEach((eventHandler, index$$1) => {
|
266 |
-
if (eventHandler === handler) {
|
267 |
-
self.eventsListeners[event].splice(index$$1, 1);
|
268 |
-
}
|
269 |
-
});
|
270 |
-
}
|
271 |
-
});
|
272 |
-
return self;
|
273 |
-
}
|
274 |
-
|
275 |
-
emit(...args) {
|
276 |
-
const self = this;
|
277 |
-
if (!self.eventsListeners) return self;
|
278 |
-
let events;
|
279 |
-
let data$$1;
|
280 |
-
let context;
|
281 |
-
if (typeof args[0] === 'string' || Array.isArray(args[0])) {
|
282 |
-
events = args[0];
|
283 |
-
data$$1 = args.slice(1, args.length);
|
284 |
-
context = self;
|
285 |
-
} else {
|
286 |
-
events = args[0].events;
|
287 |
-
data$$1 = args[0].data;
|
288 |
-
context = args[0].context || self;
|
289 |
-
}
|
290 |
-
const eventsArray = Array.isArray(events) ? events : events.split(' ');
|
291 |
-
eventsArray.forEach((event) => {
|
292 |
-
if (self.eventsListeners && self.eventsListeners[event]) {
|
293 |
-
const handlers = [];
|
294 |
-
self.eventsListeners[event].forEach((eventHandler) => {
|
295 |
-
handlers.push(eventHandler);
|
296 |
-
});
|
297 |
-
handlers.forEach((eventHandler) => {
|
298 |
-
eventHandler.apply(context, data$$1);
|
299 |
-
});
|
300 |
-
}
|
301 |
-
});
|
302 |
-
return self;
|
303 |
-
}
|
304 |
-
|
305 |
-
useModulesParams(instanceParams) {
|
306 |
-
const instance = this;
|
307 |
-
if (!instance.modules) return;
|
308 |
-
Object.keys(instance.modules).forEach((moduleName) => {
|
309 |
-
const module = instance.modules[moduleName];
|
310 |
-
// Extend params
|
311 |
-
if (module.params) {
|
312 |
-
Utils.extend(instanceParams, module.params);
|
313 |
-
}
|
314 |
-
});
|
315 |
-
}
|
316 |
-
|
317 |
-
useModules(modulesParams = {}) {
|
318 |
-
const instance = this;
|
319 |
-
if (!instance.modules) return;
|
320 |
-
Object.keys(instance.modules).forEach((moduleName) => {
|
321 |
-
const module = instance.modules[moduleName];
|
322 |
-
const moduleParams = modulesParams[moduleName] || {};
|
323 |
-
// Extend instance methods and props
|
324 |
-
if (module.instance) {
|
325 |
-
Object.keys(module.instance).forEach((modulePropName) => {
|
326 |
-
const moduleProp = module.instance[modulePropName];
|
327 |
-
if (typeof moduleProp === 'function') {
|
328 |
-
instance[modulePropName] = moduleProp.bind(instance);
|
329 |
-
} else {
|
330 |
-
instance[modulePropName] = moduleProp;
|
331 |
-
}
|
332 |
-
});
|
333 |
-
}
|
334 |
-
// Add event listeners
|
335 |
-
if (module.on && instance.on) {
|
336 |
-
Object.keys(module.on).forEach((moduleEventName) => {
|
337 |
-
instance.on(moduleEventName, module.on[moduleEventName]);
|
338 |
-
});
|
339 |
-
}
|
340 |
-
|
341 |
-
// Module create callback
|
342 |
-
if (module.create) {
|
343 |
-
module.create.bind(instance)(moduleParams);
|
344 |
-
}
|
345 |
-
});
|
346 |
-
}
|
347 |
-
|
348 |
-
static set components(components) {
|
349 |
-
const Class = this;
|
350 |
-
if (!Class.use) return;
|
351 |
-
Class.use(components);
|
352 |
-
}
|
353 |
-
|
354 |
-
static installModule(module, ...params) {
|
355 |
-
const Class = this;
|
356 |
-
if (!Class.prototype.modules) Class.prototype.modules = {};
|
357 |
-
const name = module.name || (`${Object.keys(Class.prototype.modules).length}_${Utils.now()}`);
|
358 |
-
Class.prototype.modules[name] = module;
|
359 |
-
// Prototype
|
360 |
-
if (module.proto) {
|
361 |
-
Object.keys(module.proto).forEach((key) => {
|
362 |
-
Class.prototype[key] = module.proto[key];
|
363 |
-
});
|
364 |
-
}
|
365 |
-
// Class
|
366 |
-
if (module.static) {
|
367 |
-
Object.keys(module.static).forEach((key) => {
|
368 |
-
Class[key] = module.static[key];
|
369 |
-
});
|
370 |
-
}
|
371 |
-
// Callback
|
372 |
-
if (module.install) {
|
373 |
-
module.install.apply(Class, params);
|
374 |
-
}
|
375 |
-
return Class;
|
376 |
-
}
|
377 |
-
|
378 |
-
static use(module, ...params) {
|
379 |
-
const Class = this;
|
380 |
-
if (Array.isArray(module)) {
|
381 |
-
module.forEach(m => Class.installModule(m));
|
382 |
-
return Class;
|
383 |
-
}
|
384 |
-
return Class.installModule(module, ...params);
|
385 |
-
}
|
386 |
-
}
|
387 |
-
|
388 |
-
function updateSize () {
|
389 |
-
const swiper = this;
|
390 |
-
let width;
|
391 |
-
let height;
|
392 |
-
const $el = swiper.$el;
|
393 |
-
if (typeof swiper.params.width !== 'undefined') {
|
394 |
-
width = swiper.params.width;
|
395 |
-
} else {
|
396 |
-
width = $el[0].clientWidth;
|
397 |
-
}
|
398 |
-
if (typeof swiper.params.height !== 'undefined') {
|
399 |
-
height = swiper.params.height;
|
400 |
-
} else {
|
401 |
-
height = $el[0].clientHeight;
|
402 |
-
}
|
403 |
-
if ((width === 0 && swiper.isHorizontal()) || (height === 0 && swiper.isVertical())) {
|
404 |
-
return;
|
405 |
-
}
|
406 |
-
|
407 |
-
// Subtract paddings
|
408 |
-
width = width - parseInt($el.css('padding-left'), 10) - parseInt($el.css('padding-right'), 10);
|
409 |
-
height = height - parseInt($el.css('padding-top'), 10) - parseInt($el.css('padding-bottom'), 10);
|
410 |
-
|
411 |
-
Utils.extend(swiper, {
|
412 |
-
width,
|
413 |
-
height,
|
414 |
-
size: swiper.isHorizontal() ? width : height,
|
415 |
-
});
|
416 |
-
}
|
417 |
-
|
418 |
-
function updateSlides () {
|
419 |
-
const swiper = this;
|
420 |
-
const params = swiper.params;
|
421 |
-
|
422 |
-
const {
|
423 |
-
$wrapperEl, size: swiperSize, rtlTranslate: rtl, wrongRTL,
|
424 |
-
} = swiper;
|
425 |
-
const isVirtual = swiper.virtual && params.virtual.enabled;
|
426 |
-
const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;
|
427 |
-
const slides = $wrapperEl.children(`.${swiper.params.slideClass}`);
|
428 |
-
const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;
|
429 |
-
let snapGrid = [];
|
430 |
-
const slidesGrid = [];
|
431 |
-
const slidesSizesGrid = [];
|
432 |
-
|
433 |
-
let offsetBefore = params.slidesOffsetBefore;
|
434 |
-
if (typeof offsetBefore === 'function') {
|
435 |
-
offsetBefore = params.slidesOffsetBefore.call(swiper);
|
436 |
-
}
|
437 |
-
|
438 |
-
let offsetAfter = params.slidesOffsetAfter;
|
439 |
-
if (typeof offsetAfter === 'function') {
|
440 |
-
offsetAfter = params.slidesOffsetAfter.call(swiper);
|
441 |
-
}
|
442 |
-
|
443 |
-
const previousSnapGridLength = swiper.snapGrid.length;
|
444 |
-
const previousSlidesGridLength = swiper.snapGrid.length;
|
445 |
-
|
446 |
-
let spaceBetween = params.spaceBetween;
|
447 |
-
let slidePosition = -offsetBefore;
|
448 |
-
let prevSlideSize = 0;
|
449 |
-
let index$$1 = 0;
|
450 |
-
if (typeof swiperSize === 'undefined') {
|
451 |
-
return;
|
452 |
-
}
|
453 |
-
if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {
|
454 |
-
spaceBetween = (parseFloat(spaceBetween.replace('%', '')) / 100) * swiperSize;
|
455 |
-
}
|
456 |
-
|
457 |
-
swiper.virtualSize = -spaceBetween;
|
458 |
-
|
459 |
-
// reset margins
|
460 |
-
if (rtl) slides.css({ marginLeft: '', marginTop: '' });
|
461 |
-
else slides.css({ marginRight: '', marginBottom: '' });
|
462 |
-
|
463 |
-
let slidesNumberEvenToRows;
|
464 |
-
if (params.slidesPerColumn > 1) {
|
465 |
-
if (Math.floor(slidesLength / params.slidesPerColumn) === slidesLength / swiper.params.slidesPerColumn) {
|
466 |
-
slidesNumberEvenToRows = slidesLength;
|
467 |
-
} else {
|
468 |
-
slidesNumberEvenToRows = Math.ceil(slidesLength / params.slidesPerColumn) * params.slidesPerColumn;
|
469 |
-
}
|
470 |
-
if (params.slidesPerView !== 'auto' && params.slidesPerColumnFill === 'row') {
|
471 |
-
slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, params.slidesPerView * params.slidesPerColumn);
|
472 |
-
}
|
473 |
-
}
|
474 |
-
|
475 |
-
// Calc slides
|
476 |
-
let slideSize;
|
477 |
-
const slidesPerColumn = params.slidesPerColumn;
|
478 |
-
const slidesPerRow = slidesNumberEvenToRows / slidesPerColumn;
|
479 |
-
const numFullColumns = Math.floor(slidesLength / params.slidesPerColumn);
|
480 |
-
for (let i = 0; i < slidesLength; i += 1) {
|
481 |
-
slideSize = 0;
|
482 |
-
const slide = slides.eq(i);
|
483 |
-
if (params.slidesPerColumn > 1) {
|
484 |
-
// Set slides order
|
485 |
-
let newSlideOrderIndex;
|
486 |
-
let column;
|
487 |
-
let row;
|
488 |
-
if (params.slidesPerColumnFill === 'column') {
|
489 |
-
column = Math.floor(i / slidesPerColumn);
|
490 |
-
row = i - (column * slidesPerColumn);
|
491 |
-
if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn - 1)) {
|
492 |
-
row += 1;
|
493 |
-
if (row >= slidesPerColumn) {
|
494 |
-
row = 0;
|
495 |
-
column += 1;
|
496 |
-
}
|
497 |
-
}
|
498 |
-
newSlideOrderIndex = column + ((row * slidesNumberEvenToRows) / slidesPerColumn);
|
499 |
-
slide
|
500 |
-
.css({
|
501 |
-
'-webkit-box-ordinal-group': newSlideOrderIndex,
|
502 |
-
'-moz-box-ordinal-group': newSlideOrderIndex,
|
503 |
-
'-ms-flex-order': newSlideOrderIndex,
|
504 |
-
'-webkit-order': newSlideOrderIndex,
|
505 |
-
order: newSlideOrderIndex,
|
506 |
-
});
|
507 |
-
} else {
|
508 |
-
row = Math.floor(i / slidesPerRow);
|
509 |
-
column = i - (row * slidesPerRow);
|
510 |
-
}
|
511 |
-
slide
|
512 |
-
.css(
|
513 |
-
`margin-${swiper.isHorizontal() ? 'top' : 'left'}`,
|
514 |
-
(row !== 0 && params.spaceBetween) && (`${params.spaceBetween}px`)
|
515 |
-
)
|
516 |
-
.attr('data-swiper-column', column)
|
517 |
-
.attr('data-swiper-row', row);
|
518 |
-
}
|
519 |
-
if (slide.css('display') === 'none') continue; // eslint-disable-line
|
520 |
-
|
521 |
-
if (params.slidesPerView === 'auto') {
|
522 |
-
const slideStyles = window.getComputedStyle(slide[0], null);
|
523 |
-
const currentTransform = slide[0].style.transform;
|
524 |
-
const currentWebKitTransform = slide[0].style.webkitTransform;
|
525 |
-
if (currentTransform) {
|
526 |
-
slide[0].style.transform = 'none';
|
527 |
-
}
|
528 |
-
if (currentWebKitTransform) {
|
529 |
-
slide[0].style.webkitTransform = 'none';
|
530 |
-
}
|
531 |
-
if (params.roundLengths) {
|
532 |
-
slideSize = swiper.isHorizontal()
|
533 |
-
? slide.outerWidth(true)
|
534 |
-
: slide.outerHeight(true);
|
535 |
-
} else {
|
536 |
-
// eslint-disable-next-line
|
537 |
-
if (swiper.isHorizontal()) {
|
538 |
-
const width = parseFloat(slideStyles.getPropertyValue('width'));
|
539 |
-
const paddingLeft = parseFloat(slideStyles.getPropertyValue('padding-left'));
|
540 |
-
const paddingRight = parseFloat(slideStyles.getPropertyValue('padding-right'));
|
541 |
-
const marginLeft = parseFloat(slideStyles.getPropertyValue('margin-left'));
|
542 |
-
const marginRight = parseFloat(slideStyles.getPropertyValue('margin-right'));
|
543 |
-
const boxSizing = slideStyles.getPropertyValue('box-sizing');
|
544 |
-
if (boxSizing && boxSizing === 'border-box') {
|
545 |
-
slideSize = width + marginLeft + marginRight;
|
546 |
-
} else {
|
547 |
-
slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight;
|
548 |
-
}
|
549 |
-
} else {
|
550 |
-
const height = parseFloat(slideStyles.getPropertyValue('height'));
|
551 |
-
const paddingTop = parseFloat(slideStyles.getPropertyValue('padding-top'));
|
552 |
-
const paddingBottom = parseFloat(slideStyles.getPropertyValue('padding-bottom'));
|
553 |
-
const marginTop = parseFloat(slideStyles.getPropertyValue('margin-top'));
|
554 |
-
const marginBottom = parseFloat(slideStyles.getPropertyValue('margin-bottom'));
|
555 |
-
const boxSizing = slideStyles.getPropertyValue('box-sizing');
|
556 |
-
if (boxSizing && boxSizing === 'border-box') {
|
557 |
-
slideSize = height + marginTop + marginBottom;
|
558 |
-
} else {
|
559 |
-
slideSize = height + paddingTop + paddingBottom + marginTop + marginBottom;
|
560 |
-
}
|
561 |
-
}
|
562 |
-
}
|
563 |
-
if (currentTransform) {
|
564 |
-
slide[0].style.transform = currentTransform;
|
565 |
-
}
|
566 |
-
if (currentWebKitTransform) {
|
567 |
-
slide[0].style.webkitTransform = currentWebKitTransform;
|
568 |
-
}
|
569 |
-
if (params.roundLengths) slideSize = Math.floor(slideSize);
|
570 |
-
} else {
|
571 |
-
slideSize = (swiperSize - ((params.slidesPerView - 1) * spaceBetween)) / params.slidesPerView;
|
572 |
-
if (params.roundLengths) slideSize = Math.floor(slideSize);
|
573 |
-
|
574 |
-
if (slides[i]) {
|
575 |
-
if (swiper.isHorizontal()) {
|
576 |
-
slides[i].style.width = `${slideSize}px`;
|
577 |
-
} else {
|
578 |
-
slides[i].style.height = `${slideSize}px`;
|
579 |
-
}
|
580 |
-
}
|
581 |
-
}
|
582 |
-
if (slides[i]) {
|
583 |
-
slides[i].swiperSlideSize = slideSize;
|
584 |
-
}
|
585 |
-
slidesSizesGrid.push(slideSize);
|
586 |
-
|
587 |
-
|
588 |
-
if (params.centeredSlides) {
|
589 |
-
slidePosition = slidePosition + (slideSize / 2) + (prevSlideSize / 2) + spaceBetween;
|
590 |
-
if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - (swiperSize / 2) - spaceBetween;
|
591 |
-
if (i === 0) slidePosition = slidePosition - (swiperSize / 2) - spaceBetween;
|
592 |
-
if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;
|
593 |
-
if (params.roundLengths) slidePosition = Math.floor(slidePosition);
|
594 |
-
if ((index$$1) % params.slidesPerGroup === 0) snapGrid.push(slidePosition);
|
595 |
-
slidesGrid.push(slidePosition);
|
596 |
-
} else {
|
597 |
-
if (params.roundLengths) slidePosition = Math.floor(slidePosition);
|
598 |
-
if ((index$$1) % params.slidesPerGroup === 0) snapGrid.push(slidePosition);
|
599 |
-
slidesGrid.push(slidePosition);
|
600 |
-
slidePosition = slidePosition + slideSize + spaceBetween;
|
601 |
-
}
|
602 |
-
|
603 |
-
swiper.virtualSize += slideSize + spaceBetween;
|
604 |
-
|
605 |
-
prevSlideSize = slideSize;
|
606 |
-
|
607 |
-
index$$1 += 1;
|
608 |
-
}
|
609 |
-
swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;
|
610 |
-
let newSlidesGrid;
|
611 |
-
|
612 |
-
if (
|
613 |
-
rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {
|
614 |
-
$wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });
|
615 |
-
}
|
616 |
-
if (!Support.flexbox || params.setWrapperSize) {
|
617 |
-
if (swiper.isHorizontal()) $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });
|
618 |
-
else $wrapperEl.css({ height: `${swiper.virtualSize + params.spaceBetween}px` });
|
619 |
-
}
|
620 |
-
|
621 |
-
if (params.slidesPerColumn > 1) {
|
622 |
-
swiper.virtualSize = (slideSize + params.spaceBetween) * slidesNumberEvenToRows;
|
623 |
-
swiper.virtualSize = Math.ceil(swiper.virtualSize / params.slidesPerColumn) - params.spaceBetween;
|
624 |
-
if (swiper.isHorizontal()) $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });
|
625 |
-
else $wrapperEl.css({ height: `${swiper.virtualSize + params.spaceBetween}px` });
|
626 |
-
if (params.centeredSlides) {
|
627 |
-
newSlidesGrid = [];
|
628 |
-
for (let i = 0; i < snapGrid.length; i += 1) {
|
629 |
-
let slidesGridItem = snapGrid[i];
|
630 |
-
if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);
|
631 |
-
if (snapGrid[i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem);
|
632 |
-
}
|
633 |
-
snapGrid = newSlidesGrid;
|
634 |
-
}
|
635 |
-
}
|
636 |
-
|
637 |
-
// Remove last grid elements depending on width
|
638 |
-
if (!params.centeredSlides) {
|
639 |
-
newSlidesGrid = [];
|
640 |
-
for (let i = 0; i < snapGrid.length; i += 1) {
|
641 |
-
let slidesGridItem = snapGrid[i];
|
642 |
-
if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);
|
643 |
-
if (snapGrid[i] <= swiper.virtualSize - swiperSize) {
|
644 |
-
newSlidesGrid.push(slidesGridItem);
|
645 |
-
}
|
646 |
-
}
|
647 |
-
snapGrid = newSlidesGrid;
|
648 |
-
if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {
|
649 |
-
snapGrid.push(swiper.virtualSize - swiperSize);
|
650 |
-
}
|
651 |
-
}
|
652 |
-
if (snapGrid.length === 0) snapGrid = [0];
|
653 |
-
|
654 |
-
if (params.spaceBetween !== 0) {
|
655 |
-
if (swiper.isHorizontal()) {
|
656 |
-
if (rtl) slides.css({ marginLeft: `${spaceBetween}px` });
|
657 |
-
else slides.css({ marginRight: `${spaceBetween}px` });
|
658 |
-
} else slides.css({ marginBottom: `${spaceBetween}px` });
|
659 |
-
}
|
660 |
-
|
661 |
-
if (params.centerInsufficientSlides) {
|
662 |
-
let allSlidesSize = 0;
|
663 |
-
slidesSizesGrid.forEach((slideSizeValue) => {
|
664 |
-
allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);
|
665 |
-
});
|
666 |
-
allSlidesSize -= params.spaceBetween;
|
667 |
-
if (allSlidesSize < swiperSize) {
|
668 |
-
const allSlidesOffset = (swiperSize - allSlidesSize) / 2;
|
669 |
-
snapGrid.forEach((snap, snapIndex) => {
|
670 |
-
snapGrid[snapIndex] = snap - allSlidesOffset;
|
671 |
-
});
|
672 |
-
slidesGrid.forEach((snap, snapIndex) => {
|
673 |
-
slidesGrid[snapIndex] = snap + allSlidesOffset;
|
674 |
-
});
|
675 |
-
}
|
676 |
-
}
|
677 |
-
|
678 |
-
Utils.extend(swiper, {
|
679 |
-
slides,
|
680 |
-
snapGrid,
|
681 |
-
slidesGrid,
|
682 |
-
slidesSizesGrid,
|
683 |
-
});
|
684 |
-
|
685 |
-
if (slidesLength !== previousSlidesLength) {
|
686 |
-
swiper.emit('slidesLengthChange');
|
687 |
-
}
|
688 |
-
if (snapGrid.length !== previousSnapGridLength) {
|
689 |
-
if (swiper.params.watchOverflow) swiper.checkOverflow();
|
690 |
-
swiper.emit('snapGridLengthChange');
|
691 |
-
}
|
692 |
-
if (slidesGrid.length !== previousSlidesGridLength) {
|
693 |
-
swiper.emit('slidesGridLengthChange');
|
694 |
-
}
|
695 |
-
|
696 |
-
if (params.watchSlidesProgress || params.watchSlidesVisibility) {
|
697 |
-
swiper.updateSlidesOffset();
|
698 |
-
}
|
699 |
-
}
|
700 |
-
|
701 |
-
function updateAutoHeight (speed) {
|
702 |
-
const swiper = this;
|
703 |
-
const activeSlides = [];
|
704 |
-
let newHeight = 0;
|
705 |
-
let i;
|
706 |
-
if (typeof speed === 'number') {
|
707 |
-
swiper.setTransition(speed);
|
708 |
-
} else if (speed === true) {
|
709 |
-
swiper.setTransition(swiper.params.speed);
|
710 |
-
}
|
711 |
-
// Find slides currently in view
|
712 |
-
if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {
|
713 |
-
for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {
|
714 |
-
const index$$1 = swiper.activeIndex + i;
|
715 |
-
if (index$$1 > swiper.slides.length) break;
|
716 |
-
activeSlides.push(swiper.slides.eq(index$$1)[0]);
|
717 |
-
}
|
718 |
-
} else {
|
719 |
-
activeSlides.push(swiper.slides.eq(swiper.activeIndex)[0]);
|
720 |
-
}
|
721 |
-
|
722 |
-
// Find new height from highest slide in view
|
723 |
-
for (i = 0; i < activeSlides.length; i += 1) {
|
724 |
-
if (typeof activeSlides[i] !== 'undefined') {
|
725 |
-
const height = activeSlides[i].offsetHeight;
|
726 |
-
newHeight = height > newHeight ? height : newHeight;
|
727 |
-
}
|
728 |
-
}
|
729 |
-
|
730 |
-
// Update Height
|
731 |
-
if (newHeight) swiper.$wrapperEl.css('height', `${newHeight}px`);
|
732 |
-
}
|
733 |
-
|
734 |
-
function updateSlidesOffset () {
|
735 |
-
const swiper = this;
|
736 |
-
const slides = swiper.slides;
|
737 |
-
for (let i = 0; i < slides.length; i += 1) {
|
738 |
-
slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop;
|
739 |
-
}
|
740 |
-
}
|
741 |
-
|
742 |
-
function updateSlidesProgress (translate = (this && this.translate) || 0) {
|
743 |
-
const swiper = this;
|
744 |
-
const params = swiper.params;
|
745 |
-
|
746 |
-
const { slides, rtlTranslate: rtl } = swiper;
|
747 |
-
|
748 |
-
if (slides.length === 0) return;
|
749 |
-
if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();
|
750 |
-
|
751 |
-
let offsetCenter = -translate;
|
752 |
-
if (rtl) offsetCenter = translate;
|
753 |
-
|
754 |
-
// Visible Slides
|
755 |
-
slides.removeClass(params.slideVisibleClass);
|
756 |
-
|
757 |
-
swiper.visibleSlidesIndexes = [];
|
758 |
-
swiper.visibleSlides = [];
|
759 |
-
|
760 |
-
for (let i = 0; i < slides.length; i += 1) {
|
761 |
-
const slide = slides[i];
|
762 |
-
const slideProgress = (
|
763 |
-
(offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0)) - slide.swiperSlideOffset
|
764 |
-
) / (slide.swiperSlideSize + params.spaceBetween);
|
765 |
-
if (params.watchSlidesVisibility) {
|
766 |
-
const slideBefore = -(offsetCenter - slide.swiperSlideOffset);
|
767 |
-
const slideAfter = slideBefore + swiper.slidesSizesGrid[i];
|
768 |
-
const isVisible = (slideBefore >= 0 && slideBefore < swiper.size)
|
769 |
-
|| (slideAfter > 0 && slideAfter <= swiper.size)
|
770 |
-
|| (slideBefore <= 0 && slideAfter >= swiper.size);
|
771 |
-
if (isVisible) {
|
772 |
-
swiper.visibleSlides.push(slide);
|
773 |
-
swiper.visibleSlidesIndexes.push(i);
|
774 |
-
slides.eq(i).addClass(params.slideVisibleClass);
|
775 |
-
}
|
776 |
-
}
|
777 |
-
slide.progress = rtl ? -slideProgress : slideProgress;
|
778 |
-
}
|
779 |
-
swiper.visibleSlides = $(swiper.visibleSlides);
|
780 |
-
}
|
781 |
-
|
782 |
-
function updateProgress (translate = (this && this.translate) || 0) {
|
783 |
-
const swiper = this;
|
784 |
-
const params = swiper.params;
|
785 |
-
|
786 |
-
const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
|
787 |
-
let { progress, isBeginning, isEnd } = swiper;
|
788 |
-
const wasBeginning = isBeginning;
|
789 |
-
const wasEnd = isEnd;
|
790 |
-
if (translatesDiff === 0) {
|
791 |
-
progress = 0;
|
792 |
-
isBeginning = true;
|
793 |
-
isEnd = true;
|
794 |
-
} else {
|
795 |
-
progress = (translate - swiper.minTranslate()) / (translatesDiff);
|
796 |
-
isBeginning = progress <= 0;
|
797 |
-
isEnd = progress >= 1;
|
798 |
-
}
|
799 |
-
Utils.extend(swiper, {
|
800 |
-
progress,
|
801 |
-
isBeginning,
|
802 |
-
isEnd,
|
803 |
-
});
|
804 |
-
|
805 |
-
if (params.watchSlidesProgress || params.watchSlidesVisibility) swiper.updateSlidesProgress(translate);
|
806 |
-
|
807 |
-
if (isBeginning && !wasBeginning) {
|
808 |
-
swiper.emit('reachBeginning toEdge');
|
809 |
-
}
|
810 |
-
if (isEnd && !wasEnd) {
|
811 |
-
swiper.emit('reachEnd toEdge');
|
812 |
-
}
|
813 |
-
if ((wasBeginning && !isBeginning) || (wasEnd && !isEnd)) {
|
814 |
-
swiper.emit('fromEdge');
|
815 |
-
}
|
816 |
-
|
817 |
-
swiper.emit('progress', progress);
|
818 |
-
}
|
819 |
-
|
820 |
-
function updateSlidesClasses () {
|
821 |
-
const swiper = this;
|
822 |
-
|
823 |
-
const {
|
824 |
-
slides, params, $wrapperEl, activeIndex, realIndex,
|
825 |
-
} = swiper;
|
826 |
-
const isVirtual = swiper.virtual && params.virtual.enabled;
|
827 |
-
|
828 |
-
slides.removeClass(`${params.slideActiveClass} ${params.slideNextClass} ${params.slidePrevClass} ${params.slideDuplicateActiveClass} ${params.slideDuplicateNextClass} ${params.slideDuplicatePrevClass}`);
|
829 |
-
|
830 |
-
let activeSlide;
|
831 |
-
if (isVirtual) {
|
832 |
-
activeSlide = swiper.$wrapperEl.find(`.${params.slideClass}[data-swiper-slide-index="${activeIndex}"]`);
|
833 |
-
} else {
|
834 |
-
activeSlide = slides.eq(activeIndex);
|
835 |
-
}
|
836 |
-
|
837 |
-
// Active classes
|
838 |
-
activeSlide.addClass(params.slideActiveClass);
|
839 |
-
|
840 |
-
if (params.loop) {
|
841 |
-
// Duplicate to all looped slides
|
842 |
-
if (activeSlide.hasClass(params.slideDuplicateClass)) {
|
843 |
-
$wrapperEl
|
844 |
-
.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${realIndex}"]`)
|
845 |
-
.addClass(params.slideDuplicateActiveClass);
|
846 |
-
} else {
|
847 |
-
$wrapperEl
|
848 |
-
.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${realIndex}"]`)
|
849 |
-
.addClass(params.slideDuplicateActiveClass);
|
850 |
-
}
|
851 |
-
}
|
852 |
-
// Next Slide
|
853 |
-
let nextSlide = activeSlide.nextAll(`.${params.slideClass}`).eq(0).addClass(params.slideNextClass);
|
854 |
-
if (params.loop && nextSlide.length === 0) {
|
855 |
-
nextSlide = slides.eq(0);
|
856 |
-
nextSlide.addClass(params.slideNextClass);
|
857 |
-
}
|
858 |
-
// Prev Slide
|
859 |
-
let prevSlide = activeSlide.prevAll(`.${params.slideClass}`).eq(0).addClass(params.slidePrevClass);
|
860 |
-
if (params.loop && prevSlide.length === 0) {
|
861 |
-
prevSlide = slides.eq(-1);
|
862 |
-
prevSlide.addClass(params.slidePrevClass);
|
863 |
-
}
|
864 |
-
if (params.loop) {
|
865 |
-
// Duplicate to all looped slides
|
866 |
-
if (nextSlide.hasClass(params.slideDuplicateClass)) {
|
867 |
-
$wrapperEl
|
868 |
-
.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`)
|
869 |
-
.addClass(params.slideDuplicateNextClass);
|
870 |
-
} else {
|
871 |
-
$wrapperEl
|
872 |
-
.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`)
|
873 |
-
.addClass(params.slideDuplicateNextClass);
|
874 |
-
}
|
875 |
-
if (prevSlide.hasClass(params.slideDuplicateClass)) {
|
876 |
-
$wrapperEl
|
877 |
-
.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`)
|
878 |
-
.addClass(params.slideDuplicatePrevClass);
|
879 |
-
} else {
|
880 |
-
$wrapperEl
|
881 |
-
.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`)
|
882 |
-
.addClass(params.slideDuplicatePrevClass);
|
883 |
-
}
|
884 |
-
}
|
885 |
-
}
|
886 |
-
|
887 |
-
function updateActiveIndex (newActiveIndex) {
|
888 |
-
const swiper = this;
|
889 |
-
const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
|
890 |
-
const {
|
891 |
-
slidesGrid, snapGrid, params, activeIndex: previousIndex, realIndex: previousRealIndex, snapIndex: previousSnapIndex,
|
892 |
-
} = swiper;
|
893 |
-
let activeIndex = newActiveIndex;
|
894 |
-
let snapIndex;
|
895 |
-
if (typeof activeIndex === 'undefined') {
|
896 |
-
for (let i = 0; i < slidesGrid.length; i += 1) {
|
897 |
-
if (typeof slidesGrid[i + 1] !== 'undefined') {
|
898 |
-
if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - ((slidesGrid[i + 1] - slidesGrid[i]) / 2)) {
|
899 |
-
activeIndex = i;
|
900 |
-
} else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {
|
901 |
-
activeIndex = i + 1;
|
902 |
-
}
|
903 |
-
} else if (translate >= slidesGrid[i]) {
|
904 |
-
activeIndex = i;
|
905 |
-
}
|
906 |
-
}
|
907 |
-
// Normalize slideIndex
|
908 |
-
if (params.normalizeSlideIndex) {
|
909 |
-
if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;
|
910 |
-
}
|
911 |
-
}
|
912 |
-
if (snapGrid.indexOf(translate) >= 0) {
|
913 |
-
snapIndex = snapGrid.indexOf(translate);
|
914 |
-
} else {
|
915 |
-
snapIndex = Math.floor(activeIndex / params.slidesPerGroup);
|
916 |
-
}
|
917 |
-
if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
|
918 |
-
if (activeIndex === previousIndex) {
|
919 |
-
if (snapIndex !== previousSnapIndex) {
|
920 |
-
swiper.snapIndex = snapIndex;
|
921 |
-
swiper.emit('snapIndexChange');
|
922 |
-
}
|
923 |
-
return;
|
924 |
-
}
|
925 |
-
|
926 |
-
// Get real index
|
927 |
-
const realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10);
|
928 |
-
|
929 |
-
Utils.extend(swiper, {
|
930 |
-
snapIndex,
|
931 |
-
realIndex,
|
932 |
-
previousIndex,
|
933 |
-
activeIndex,
|
934 |
-
});
|
935 |
-
swiper.emit('activeIndexChange');
|
936 |
-
swiper.emit('snapIndexChange');
|
937 |
-
if (previousRealIndex !== realIndex) {
|
938 |
-
swiper.emit('realIndexChange');
|
939 |
-
}
|
940 |
-
swiper.emit('slideChange');
|
941 |
-
}
|
942 |
-
|
943 |
-
function updateClickedSlide (e) {
|
944 |
-
const swiper = this;
|
945 |
-
const params = swiper.params;
|
946 |
-
const slide = $(e.target).closest(`.${params.slideClass}`)[0];
|
947 |
-
let slideFound = false;
|
948 |
-
if (slide) {
|
949 |
-
for (let i = 0; i < swiper.slides.length; i += 1) {
|
950 |
-
if (swiper.slides[i] === slide) slideFound = true;
|
951 |
-
}
|
952 |
-
}
|
953 |
-
|
954 |
-
if (slide && slideFound) {
|
955 |
-
swiper.clickedSlide = slide;
|
956 |
-
if (swiper.virtual && swiper.params.virtual.enabled) {
|
957 |
-
swiper.clickedIndex = parseInt($(slide).attr('data-swiper-slide-index'), 10);
|
958 |
-
} else {
|
959 |
-
swiper.clickedIndex = $(slide).index();
|
960 |
-
}
|
961 |
-
} else {
|
962 |
-
swiper.clickedSlide = undefined;
|
963 |
-
swiper.clickedIndex = undefined;
|
964 |
-
return;
|
965 |
-
}
|
966 |
-
if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {
|
967 |
-
swiper.slideToClickedSlide();
|
968 |
-
}
|
969 |
-
}
|
970 |
-
|
971 |
-
var update = {
|
972 |
-
updateSize,
|
973 |
-
updateSlides,
|
974 |
-
updateAutoHeight,
|
975 |
-
updateSlidesOffset,
|
976 |
-
updateSlidesProgress,
|
977 |
-
updateProgress,
|
978 |
-
updateSlidesClasses,
|
979 |
-
updateActiveIndex,
|
980 |
-
updateClickedSlide,
|
981 |
-
};
|
982 |
-
|
983 |
-
function getTranslate (axis = this.isHorizontal() ? 'x' : 'y') {
|
984 |
-
const swiper = this;
|
985 |
-
|
986 |
-
const {
|
987 |
-
params, rtlTranslate: rtl, translate, $wrapperEl,
|
988 |
-
} = swiper;
|
989 |
-
|
990 |
-
if (params.virtualTranslate) {
|
991 |
-
return rtl ? -translate : translate;
|
992 |
-
}
|
993 |
-
|
994 |
-
let currentTranslate = Utils.getTranslate($wrapperEl[0], axis);
|
995 |
-
if (rtl) currentTranslate = -currentTranslate;
|
996 |
-
|
997 |
-
return currentTranslate || 0;
|
998 |
-
}
|
999 |
-
|
1000 |
-
function setTranslate (translate, byController) {
|
1001 |
-
const swiper = this;
|
1002 |
-
const {
|
1003 |
-
rtlTranslate: rtl, params, $wrapperEl, progress,
|
1004 |
-
} = swiper;
|
1005 |
-
let x = 0;
|
1006 |
-
let y = 0;
|
1007 |
-
const z = 0;
|
1008 |
-
|
1009 |
-
if (swiper.isHorizontal()) {
|
1010 |
-
x = rtl ? -translate : translate;
|
1011 |
-
} else {
|
1012 |
-
y = translate;
|
1013 |
-
}
|
1014 |
-
|
1015 |
-
if (params.roundLengths) {
|
1016 |
-
x = Math.floor(x);
|
1017 |
-
y = Math.floor(y);
|
1018 |
-
}
|
1019 |
-
|
1020 |
-
if (!params.virtualTranslate) {
|
1021 |
-
if (Support.transforms3d) $wrapperEl.transform(`translate3d(${x}px, ${y}px, ${z}px)`);
|
1022 |
-
else $wrapperEl.transform(`translate(${x}px, ${y}px)`);
|
1023 |
-
}
|
1024 |
-
swiper.previousTranslate = swiper.translate;
|
1025 |
-
swiper.translate = swiper.isHorizontal() ? x : y;
|
1026 |
-
|
1027 |
-
// Check if we need to update progress
|
1028 |
-
let newProgress;
|
1029 |
-
const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
|
1030 |
-
if (translatesDiff === 0) {
|
1031 |
-
newProgress = 0;
|
1032 |
-
} else {
|
1033 |
-
newProgress = (translate - swiper.minTranslate()) / (translatesDiff);
|
1034 |
-
}
|
1035 |
-
if (newProgress !== progress) {
|
1036 |
-
swiper.updateProgress(translate);
|
1037 |
-
}
|
1038 |
-
|
1039 |
-
swiper.emit('setTranslate', swiper.translate, byController);
|
1040 |
-
}
|
1041 |
-
|
1042 |
-
function minTranslate () {
|
1043 |
-
return (-this.snapGrid[0]);
|
1044 |
-
}
|
1045 |
-
|
1046 |
-
function maxTranslate () {
|
1047 |
-
return (-this.snapGrid[this.snapGrid.length - 1]);
|
1048 |
-
}
|
1049 |
-
|
1050 |
-
var translate = {
|
1051 |
-
getTranslate,
|
1052 |
-
setTranslate,
|
1053 |
-
minTranslate,
|
1054 |
-
maxTranslate,
|
1055 |
-
};
|
1056 |
-
|
1057 |
-
function setTransition (duration, byController) {
|
1058 |
-
const swiper = this;
|
1059 |
-
|
1060 |
-
swiper.$wrapperEl.transition(duration);
|
1061 |
-
|
1062 |
-
swiper.emit('setTransition', duration, byController);
|
1063 |
-
}
|
1064 |
-
|
1065 |
-
function transitionStart (runCallbacks = true, direction) {
|
1066 |
-
const swiper = this;
|
1067 |
-
const { activeIndex, params, previousIndex } = swiper;
|
1068 |
-
if (params.autoHeight) {
|
1069 |
-
swiper.updateAutoHeight();
|
1070 |
-
}
|
1071 |
-
|
1072 |
-
let dir = direction;
|
1073 |
-
if (!dir) {
|
1074 |
-
if (activeIndex > previousIndex) dir = 'next';
|
1075 |
-
else if (activeIndex < previousIndex) dir = 'prev';
|
1076 |
-
else dir = 'reset';
|
1077 |
-
}
|
1078 |
-
|
1079 |
-
swiper.emit('transitionStart');
|
1080 |
-
|
1081 |
-
if (runCallbacks && activeIndex !== previousIndex) {
|
1082 |
-
if (dir === 'reset') {
|
1083 |
-
swiper.emit('slideResetTransitionStart');
|
1084 |
-
return;
|
1085 |
-
}
|
1086 |
-
swiper.emit('slideChangeTransitionStart');
|
1087 |
-
if (dir === 'next') {
|
1088 |
-
swiper.emit('slideNextTransitionStart');
|
1089 |
-
} else {
|
1090 |
-
swiper.emit('slidePrevTransitionStart');
|
1091 |
-
}
|
1092 |
-
}
|
1093 |
-
}
|
1094 |
-
|
1095 |
-
function transitionEnd$1 (runCallbacks = true, direction) {
|
1096 |
-
const swiper = this;
|
1097 |
-
const { activeIndex, previousIndex } = swiper;
|
1098 |
-
swiper.animating = false;
|
1099 |
-
swiper.setTransition(0);
|
1100 |
-
|
1101 |
-
let dir = direction;
|
1102 |
-
if (!dir) {
|
1103 |
-
if (activeIndex > previousIndex) dir = 'next';
|
1104 |
-
else if (activeIndex < previousIndex) dir = 'prev';
|
1105 |
-
else dir = 'reset';
|
1106 |
-
}
|
1107 |
-
|
1108 |
-
swiper.emit('transitionEnd');
|
1109 |
-
|
1110 |
-
if (runCallbacks && activeIndex !== previousIndex) {
|
1111 |
-
if (dir === 'reset') {
|
1112 |
-
swiper.emit('slideResetTransitionEnd');
|
1113 |
-
return;
|
1114 |
-
}
|
1115 |
-
swiper.emit('slideChangeTransitionEnd');
|
1116 |
-
if (dir === 'next') {
|
1117 |
-
swiper.emit('slideNextTransitionEnd');
|
1118 |
-
} else {
|
1119 |
-
swiper.emit('slidePrevTransitionEnd');
|
1120 |
-
}
|
1121 |
-
}
|
1122 |
-
}
|
1123 |
-
|
1124 |
-
var transition$1 = {
|
1125 |
-
setTransition,
|
1126 |
-
transitionStart,
|
1127 |
-
transitionEnd: transitionEnd$1,
|
1128 |
-
};
|
1129 |
-
|
1130 |
-
function slideTo (index$$1 = 0, speed = this.params.speed, runCallbacks = true, internal) {
|
1131 |
-
const swiper = this;
|
1132 |
-
let slideIndex = index$$1;
|
1133 |
-
if (slideIndex < 0) slideIndex = 0;
|
1134 |
-
|
1135 |
-
const {
|
1136 |
-
params, snapGrid, slidesGrid, previousIndex, activeIndex, rtlTranslate: rtl,
|
1137 |
-
} = swiper;
|
1138 |
-
if (swiper.animating && params.preventInteractionOnTransition) {
|
1139 |
-
return false;
|
1140 |
-
}
|
1141 |
-
|
1142 |
-
let snapIndex = Math.floor(slideIndex / params.slidesPerGroup);
|
1143 |
-
if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
|
1144 |
-
|
1145 |
-
if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) {
|
1146 |
-
swiper.emit('beforeSlideChangeStart');
|
1147 |
-
}
|
1148 |
-
|
1149 |
-
const translate = -snapGrid[snapIndex];
|
1150 |
-
|
1151 |
-
// Update progress
|
1152 |
-
swiper.updateProgress(translate);
|
1153 |
-
|
1154 |
-
// Normalize slideIndex
|
1155 |
-
if (params.normalizeSlideIndex) {
|
1156 |
-
for (let i = 0; i < slidesGrid.length; i += 1) {
|
1157 |
-
if (-Math.floor(translate * 100) >= Math.floor(slidesGrid[i] * 100)) {
|
1158 |
-
slideIndex = i;
|
1159 |
-
}
|
1160 |
-
}
|
1161 |
-
}
|
1162 |
-
// Directions locks
|
1163 |
-
if (swiper.initialized && slideIndex !== activeIndex) {
|
1164 |
-
if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) {
|
1165 |
-
return false;
|
1166 |
-
}
|
1167 |
-
if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {
|
1168 |
-
if ((activeIndex || 0) !== slideIndex) return false;
|
1169 |
-
}
|
1170 |
-
}
|
1171 |
-
|
1172 |
-
let direction;
|
1173 |
-
if (slideIndex > activeIndex) direction = 'next';
|
1174 |
-
else if (slideIndex < activeIndex) direction = 'prev';
|
1175 |
-
else direction = 'reset';
|
1176 |
-
|
1177 |
-
|
1178 |
-
// Update Index
|
1179 |
-
if ((rtl && -translate === swiper.translate) || (!rtl && translate === swiper.translate)) {
|
1180 |
-
swiper.updateActiveIndex(slideIndex);
|
1181 |
-
// Update Height
|
1182 |
-
if (params.autoHeight) {
|
1183 |
-
swiper.updateAutoHeight();
|
1184 |
-
}
|
1185 |
-
swiper.updateSlidesClasses();
|
1186 |
-
if (params.effect !== 'slide') {
|
1187 |
-
swiper.setTranslate(translate);
|
1188 |
-
}
|
1189 |
-
if (direction !== 'reset') {
|
1190 |
-
swiper.transitionStart(runCallbacks, direction);
|
1191 |
-
swiper.transitionEnd(runCallbacks, direction);
|
1192 |
-
}
|
1193 |
-
return false;
|
1194 |
-
}
|
1195 |
-
|
1196 |
-
if (speed === 0 || !Support.transition) {
|
1197 |
-
swiper.setTransition(0);
|
1198 |
-
swiper.setTranslate(translate);
|
1199 |
-
swiper.updateActiveIndex(slideIndex);
|
1200 |
-
swiper.updateSlidesClasses();
|
1201 |
-
swiper.emit('beforeTransitionStart', speed, internal);
|
1202 |
-
swiper.transitionStart(runCallbacks, direction);
|
1203 |
-
swiper.transitionEnd(runCallbacks, direction);
|
1204 |
-
} else {
|
1205 |
-
swiper.setTransition(speed);
|
1206 |
-
swiper.setTranslate(translate);
|
1207 |
-
swiper.updateActiveIndex(slideIndex);
|
1208 |
-
swiper.updateSlidesClasses();
|
1209 |
-
swiper.emit('beforeTransitionStart', speed, internal);
|
1210 |
-
swiper.transitionStart(runCallbacks, direction);
|
1211 |
-
if (!swiper.animating) {
|
1212 |
-
swiper.animating = true;
|
1213 |
-
if (!swiper.onSlideToWrapperTransitionEnd) {
|
1214 |
-
swiper.onSlideToWrapperTransitionEnd = function transitionEnd$$1(e) {
|
1215 |
-
if (!swiper || swiper.destroyed) return;
|
1216 |
-
if (e.target !== this) return;
|
1217 |
-
swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
1218 |
-
swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
|
1219 |
-
swiper.onSlideToWrapperTransitionEnd = null;
|
1220 |
-
delete swiper.onSlideToWrapperTransitionEnd;
|
1221 |
-
swiper.transitionEnd(runCallbacks, direction);
|
1222 |
-
};
|
1223 |
-
}
|
1224 |
-
swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
1225 |
-
swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
|
1226 |
-
}
|
1227 |
-
}
|
1228 |
-
|
1229 |
-
return true;
|
1230 |
-
}
|
1231 |
-
|
1232 |
-
function slideToLoop (index$$1 = 0, speed = this.params.speed, runCallbacks = true, internal) {
|
1233 |
-
const swiper = this;
|
1234 |
-
let newIndex = index$$1;
|
1235 |
-
if (swiper.params.loop) {
|
1236 |
-
newIndex += swiper.loopedSlides;
|
1237 |
-
}
|
1238 |
-
|
1239 |
-
return swiper.slideTo(newIndex, speed, runCallbacks, internal);
|
1240 |
-
}
|
1241 |
-
|
1242 |
-
/* eslint no-unused-vars: "off" */
|
1243 |
-
function slideNext (speed = this.params.speed, runCallbacks = true, internal) {
|
1244 |
-
const swiper = this;
|
1245 |
-
const { params, animating } = swiper;
|
1246 |
-
if (params.loop) {
|
1247 |
-
if (animating) return false;
|
1248 |
-
swiper.loopFix();
|
1249 |
-
// eslint-disable-next-line
|
1250 |
-
swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
|
1251 |
-
return swiper.slideTo(swiper.activeIndex + params.slidesPerGroup, speed, runCallbacks, internal);
|
1252 |
-
}
|
1253 |
-
return swiper.slideTo(swiper.activeIndex + params.slidesPerGroup, speed, runCallbacks, internal);
|
1254 |
-
}
|
1255 |
-
|
1256 |
-
/* eslint no-unused-vars: "off" */
|
1257 |
-
function slidePrev (speed = this.params.speed, runCallbacks = true, internal) {
|
1258 |
-
const swiper = this;
|
1259 |
-
const {
|
1260 |
-
params, animating, snapGrid, slidesGrid, rtlTranslate,
|
1261 |
-
} = swiper;
|
1262 |
-
|
1263 |
-
if (params.loop) {
|
1264 |
-
if (animating) return false;
|
1265 |
-
swiper.loopFix();
|
1266 |
-
// eslint-disable-next-line
|
1267 |
-
swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
|
1268 |
-
}
|
1269 |
-
const translate = rtlTranslate ? swiper.translate : -swiper.translate;
|
1270 |
-
function normalize(val) {
|
1271 |
-
if (val < 0) return -Math.floor(Math.abs(val));
|
1272 |
-
return Math.floor(val);
|
1273 |
-
}
|
1274 |
-
const normalizedTranslate = normalize(translate);
|
1275 |
-
const normalizedSnapGrid = snapGrid.map(val => normalize(val));
|
1276 |
-
const normalizedSlidesGrid = slidesGrid.map(val => normalize(val));
|
1277 |
-
|
1278 |
-
const currentSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate)];
|
1279 |
-
const prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];
|
1280 |
-
let prevIndex;
|
1281 |
-
if (typeof prevSnap !== 'undefined') {
|
1282 |
-
prevIndex = slidesGrid.indexOf(prevSnap);
|
1283 |
-
if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;
|
1284 |
-
}
|
1285 |
-
return swiper.slideTo(prevIndex, speed, runCallbacks, internal);
|
1286 |
-
}
|
1287 |
-
|
1288 |
-
/* eslint no-unused-vars: "off" */
|
1289 |
-
function slideReset (speed = this.params.speed, runCallbacks = true, internal) {
|
1290 |
-
const swiper = this;
|
1291 |
-
return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);
|
1292 |
-
}
|
1293 |
-
|
1294 |
-
/* eslint no-unused-vars: "off" */
|
1295 |
-
function slideToClosest (speed = this.params.speed, runCallbacks = true, internal) {
|
1296 |
-
const swiper = this;
|
1297 |
-
let index$$1 = swiper.activeIndex;
|
1298 |
-
const snapIndex = Math.floor(index$$1 / swiper.params.slidesPerGroup);
|
1299 |
-
|
1300 |
-
if (snapIndex < swiper.snapGrid.length - 1) {
|
1301 |
-
const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
|
1302 |
-
|
1303 |
-
const currentSnap = swiper.snapGrid[snapIndex];
|
1304 |
-
const nextSnap = swiper.snapGrid[snapIndex + 1];
|
1305 |
-
|
1306 |
-
if ((translate - currentSnap) > (nextSnap - currentSnap) / 2) {
|
1307 |
-
index$$1 = swiper.params.slidesPerGroup;
|
1308 |
-
}
|
1309 |
-
}
|
1310 |
-
|
1311 |
-
return swiper.slideTo(index$$1, speed, runCallbacks, internal);
|
1312 |
-
}
|
1313 |
-
|
1314 |
-
function slideToClickedSlide () {
|
1315 |
-
const swiper = this;
|
1316 |
-
const { params, $wrapperEl } = swiper;
|
1317 |
-
|
1318 |
-
const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;
|
1319 |
-
let slideToIndex = swiper.clickedIndex;
|
1320 |
-
let realIndex;
|
1321 |
-
if (params.loop) {
|
1322 |
-
if (swiper.animating) return;
|
1323 |
-
realIndex = parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'), 10);
|
1324 |
-
if (params.centeredSlides) {
|
1325 |
-
if (
|
1326 |
-
(slideToIndex < swiper.loopedSlides - (slidesPerView / 2))
|
1327 |
-
|| (slideToIndex > (swiper.slides.length - swiper.loopedSlides) + (slidesPerView / 2))
|
1328 |
-
) {
|
1329 |
-
swiper.loopFix();
|
1330 |
-
slideToIndex = $wrapperEl
|
1331 |
-
.children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`)
|
1332 |
-
.eq(0)
|
1333 |
-
.index();
|
1334 |
-
|
1335 |
-
Utils.nextTick(() => {
|
1336 |
-
swiper.slideTo(slideToIndex);
|
1337 |
-
});
|
1338 |
-
} else {
|
1339 |
-
swiper.slideTo(slideToIndex);
|
1340 |
-
}
|
1341 |
-
} else if (slideToIndex > swiper.slides.length - slidesPerView) {
|
1342 |
-
swiper.loopFix();
|
1343 |
-
slideToIndex = $wrapperEl
|
1344 |
-
.children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`)
|
1345 |
-
.eq(0)
|
1346 |
-
.index();
|
1347 |
-
|
1348 |
-
Utils.nextTick(() => {
|
1349 |
-
swiper.slideTo(slideToIndex);
|
1350 |
-
});
|
1351 |
-
} else {
|
1352 |
-
swiper.slideTo(slideToIndex);
|
1353 |
-
}
|
1354 |
-
} else {
|
1355 |
-
swiper.slideTo(slideToIndex);
|
1356 |
-
}
|
1357 |
-
}
|
1358 |
-
|
1359 |
-
var slide = {
|
1360 |
-
slideTo,
|
1361 |
-
slideToLoop,
|
1362 |
-
slideNext,
|
1363 |
-
slidePrev,
|
1364 |
-
slideReset,
|
1365 |
-
slideToClosest,
|
1366 |
-
slideToClickedSlide,
|
1367 |
-
};
|
1368 |
-
|
1369 |
-
function loopCreate () {
|
1370 |
-
const swiper = this;
|
1371 |
-
const { params, $wrapperEl } = swiper;
|
1372 |
-
// Remove duplicated slides
|
1373 |
-
$wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove();
|
1374 |
-
|
1375 |
-
let slides = $wrapperEl.children(`.${params.slideClass}`);
|
1376 |
-
|
1377 |
-
if (params.loopFillGroupWithBlank) {
|
1378 |
-
const blankSlidesNum = params.slidesPerGroup - (slides.length % params.slidesPerGroup);
|
1379 |
-
if (blankSlidesNum !== params.slidesPerGroup) {
|
1380 |
-
for (let i = 0; i < blankSlidesNum; i += 1) {
|
1381 |
-
const blankNode = $(document.createElement('div')).addClass(`${params.slideClass} ${params.slideBlankClass}`);
|
1382 |
-
$wrapperEl.append(blankNode);
|
1383 |
-
}
|
1384 |
-
slides = $wrapperEl.children(`.${params.slideClass}`);
|
1385 |
-
}
|
1386 |
-
}
|
1387 |
-
|
1388 |
-
if (params.slidesPerView === 'auto' && !params.loopedSlides) params.loopedSlides = slides.length;
|
1389 |
-
|
1390 |
-
swiper.loopedSlides = parseInt(params.loopedSlides || params.slidesPerView, 10);
|
1391 |
-
swiper.loopedSlides += params.loopAdditionalSlides;
|
1392 |
-
if (swiper.loopedSlides > slides.length) {
|
1393 |
-
swiper.loopedSlides = slides.length;
|
1394 |
-
}
|
1395 |
-
|
1396 |
-
const prependSlides = [];
|
1397 |
-
const appendSlides = [];
|
1398 |
-
slides.each((index$$1, el) => {
|
1399 |
-
const slide = $(el);
|
1400 |
-
if (index$$1 < swiper.loopedSlides) appendSlides.push(el);
|
1401 |
-
if (index$$1 < slides.length && index$$1 >= slides.length - swiper.loopedSlides) prependSlides.push(el);
|
1402 |
-
slide.attr('data-swiper-slide-index', index$$1);
|
1403 |
-
});
|
1404 |
-
for (let i = 0; i < appendSlides.length; i += 1) {
|
1405 |
-
$wrapperEl.append($(appendSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));
|
1406 |
-
}
|
1407 |
-
for (let i = prependSlides.length - 1; i >= 0; i -= 1) {
|
1408 |
-
$wrapperEl.prepend($(prependSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));
|
1409 |
-
}
|
1410 |
-
}
|
1411 |
-
|
1412 |
-
function loopFix () {
|
1413 |
-
const swiper = this;
|
1414 |
-
const {
|
1415 |
-
params, activeIndex, slides, loopedSlides, allowSlidePrev, allowSlideNext, snapGrid, rtlTranslate: rtl,
|
1416 |
-
} = swiper;
|
1417 |
-
let newIndex;
|
1418 |
-
swiper.allowSlidePrev = true;
|
1419 |
-
swiper.allowSlideNext = true;
|
1420 |
-
|
1421 |
-
const snapTranslate = -snapGrid[activeIndex];
|
1422 |
-
const diff = snapTranslate - swiper.getTranslate();
|
1423 |
-
|
1424 |
-
|
1425 |
-
// Fix For Negative Oversliding
|
1426 |
-
if (activeIndex < loopedSlides) {
|
1427 |
-
newIndex = (slides.length - (loopedSlides * 3)) + activeIndex;
|
1428 |
-
newIndex += loopedSlides;
|
1429 |
-
const slideChanged = swiper.slideTo(newIndex, 0, false, true);
|
1430 |
-
if (slideChanged && diff !== 0) {
|
1431 |
-
swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);
|
1432 |
-
}
|
1433 |
-
} else if ((params.slidesPerView === 'auto' && activeIndex >= loopedSlides * 2) || (activeIndex >= slides.length - loopedSlides)) {
|
1434 |
-
// Fix For Positive Oversliding
|
1435 |
-
newIndex = -slides.length + activeIndex + loopedSlides;
|
1436 |
-
newIndex += loopedSlides;
|
1437 |
-
const slideChanged = swiper.slideTo(newIndex, 0, false, true);
|
1438 |
-
if (slideChanged && diff !== 0) {
|
1439 |
-
swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);
|
1440 |
-
}
|
1441 |
-
}
|
1442 |
-
swiper.allowSlidePrev = allowSlidePrev;
|
1443 |
-
swiper.allowSlideNext = allowSlideNext;
|
1444 |
-
}
|
1445 |
-
|
1446 |
-
function loopDestroy () {
|
1447 |
-
const swiper = this;
|
1448 |
-
const { $wrapperEl, params, slides } = swiper;
|
1449 |
-
$wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass},.${params.slideClass}.${params.slideBlankClass}`).remove();
|
1450 |
-
slides.removeAttr('data-swiper-slide-index');
|
1451 |
-
}
|
1452 |
-
|
1453 |
-
var loop = {
|
1454 |
-
loopCreate,
|
1455 |
-
loopFix,
|
1456 |
-
loopDestroy,
|
1457 |
-
};
|
1458 |
-
|
1459 |
-
function setGrabCursor (moving) {
|
1460 |
-
const swiper = this;
|
1461 |
-
if (Support.touch || !swiper.params.simulateTouch || (swiper.params.watchOverflow && swiper.isLocked)) return;
|
1462 |
-
const el = swiper.el;
|
1463 |
-
el.style.cursor = 'move';
|
1464 |
-
el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';
|
1465 |
-
el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab';
|
1466 |
-
el.style.cursor = moving ? 'grabbing' : 'grab';
|
1467 |
-
}
|
1468 |
-
|
1469 |
-
function unsetGrabCursor () {
|
1470 |
-
const swiper = this;
|
1471 |
-
if (Support.touch || (swiper.params.watchOverflow && swiper.isLocked)) return;
|
1472 |
-
swiper.el.style.cursor = '';
|
1473 |
-
}
|
1474 |
-
|
1475 |
-
var grabCursor = {
|
1476 |
-
setGrabCursor,
|
1477 |
-
unsetGrabCursor,
|
1478 |
-
};
|
1479 |
-
|
1480 |
-
function appendSlide (slides) {
|
1481 |
-
const swiper = this;
|
1482 |
-
const { $wrapperEl, params } = swiper;
|
1483 |
-
if (params.loop) {
|
1484 |
-
swiper.loopDestroy();
|
1485 |
-
}
|
1486 |
-
if (typeof slides === 'object' && 'length' in slides) {
|
1487 |
-
for (let i = 0; i < slides.length; i += 1) {
|
1488 |
-
if (slides[i]) $wrapperEl.append(slides[i]);
|
1489 |
-
}
|
1490 |
-
} else {
|
1491 |
-
$wrapperEl.append(slides);
|
1492 |
-
}
|
1493 |
-
if (params.loop) {
|
1494 |
-
swiper.loopCreate();
|
1495 |
-
}
|
1496 |
-
if (!(params.observer && Support.observer)) {
|
1497 |
-
swiper.update();
|
1498 |
-
}
|
1499 |
-
}
|
1500 |
-
|
1501 |
-
function prependSlide (slides) {
|
1502 |
-
const swiper = this;
|
1503 |
-
const { params, $wrapperEl, activeIndex } = swiper;
|
1504 |
-
|
1505 |
-
if (params.loop) {
|
1506 |
-
swiper.loopDestroy();
|
1507 |
-
}
|
1508 |
-
let newActiveIndex = activeIndex + 1;
|
1509 |
-
if (typeof slides === 'object' && 'length' in slides) {
|
1510 |
-
for (let i = 0; i < slides.length; i += 1) {
|
1511 |
-
if (slides[i]) $wrapperEl.prepend(slides[i]);
|
1512 |
-
}
|
1513 |
-
newActiveIndex = activeIndex + slides.length;
|
1514 |
-
} else {
|
1515 |
-
$wrapperEl.prepend(slides);
|
1516 |
-
}
|
1517 |
-
if (params.loop) {
|
1518 |
-
swiper.loopCreate();
|
1519 |
-
}
|
1520 |
-
if (!(params.observer && Support.observer)) {
|
1521 |
-
swiper.update();
|
1522 |
-
}
|
1523 |
-
swiper.slideTo(newActiveIndex, 0, false);
|
1524 |
-
}
|
1525 |
-
|
1526 |
-
function addSlide (index$$1, slides) {
|
1527 |
-
const swiper = this;
|
1528 |
-
const { $wrapperEl, params, activeIndex } = swiper;
|
1529 |
-
let activeIndexBuffer = activeIndex;
|
1530 |
-
if (params.loop) {
|
1531 |
-
activeIndexBuffer -= swiper.loopedSlides;
|
1532 |
-
swiper.loopDestroy();
|
1533 |
-
swiper.slides = $wrapperEl.children(`.${params.slideClass}`);
|
1534 |
-
}
|
1535 |
-
const baseLength = swiper.slides.length;
|
1536 |
-
if (index$$1 <= 0) {
|
1537 |
-
swiper.prependSlide(slides);
|
1538 |
-
return;
|
1539 |
-
}
|
1540 |
-
if (index$$1 >= baseLength) {
|
1541 |
-
swiper.appendSlide(slides);
|
1542 |
-
return;
|
1543 |
-
}
|
1544 |
-
let newActiveIndex = activeIndexBuffer > index$$1 ? activeIndexBuffer + 1 : activeIndexBuffer;
|
1545 |
-
|
1546 |
-
const slidesBuffer = [];
|
1547 |
-
for (let i = baseLength - 1; i >= index$$1; i -= 1) {
|
1548 |
-
const currentSlide = swiper.slides.eq(i);
|
1549 |
-
currentSlide.remove();
|
1550 |
-
slidesBuffer.unshift(currentSlide);
|
1551 |
-
}
|
1552 |
-
|
1553 |
-
if (typeof slides === 'object' && 'length' in slides) {
|
1554 |
-
for (let i = 0; i < slides.length; i += 1) {
|
1555 |
-
if (slides[i]) $wrapperEl.append(slides[i]);
|
1556 |
-
}
|
1557 |
-
newActiveIndex = activeIndexBuffer > index$$1 ? activeIndexBuffer + slides.length : activeIndexBuffer;
|
1558 |
-
} else {
|
1559 |
-
$wrapperEl.append(slides);
|
1560 |
-
}
|
1561 |
-
|
1562 |
-
for (let i = 0; i < slidesBuffer.length; i += 1) {
|
1563 |
-
$wrapperEl.append(slidesBuffer[i]);
|
1564 |
-
}
|
1565 |
-
|
1566 |
-
if (params.loop) {
|
1567 |
-
swiper.loopCreate();
|
1568 |
-
}
|
1569 |
-
if (!(params.observer && Support.observer)) {
|
1570 |
-
swiper.update();
|
1571 |
-
}
|
1572 |
-
if (params.loop) {
|
1573 |
-
swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
|
1574 |
-
} else {
|
1575 |
-
swiper.slideTo(newActiveIndex, 0, false);
|
1576 |
-
}
|
1577 |
-
}
|
1578 |
-
|
1579 |
-
function removeSlide (slidesIndexes) {
|
1580 |
-
const swiper = this;
|
1581 |
-
const { params, $wrapperEl, activeIndex } = swiper;
|
1582 |
-
|
1583 |
-
let activeIndexBuffer = activeIndex;
|
1584 |
-
if (params.loop) {
|
1585 |
-
activeIndexBuffer -= swiper.loopedSlides;
|
1586 |
-
swiper.loopDestroy();
|
1587 |
-
swiper.slides = $wrapperEl.children(`.${params.slideClass}`);
|
1588 |
-
}
|
1589 |
-
let newActiveIndex = activeIndexBuffer;
|
1590 |
-
let indexToRemove;
|
1591 |
-
|
1592 |
-
if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) {
|
1593 |
-
for (let i = 0; i < slidesIndexes.length; i += 1) {
|
1594 |
-
indexToRemove = slidesIndexes[i];
|
1595 |
-
if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();
|
1596 |
-
if (indexToRemove < newActiveIndex) newActiveIndex -= 1;
|
1597 |
-
}
|
1598 |
-
newActiveIndex = Math.max(newActiveIndex, 0);
|
1599 |
-
} else {
|
1600 |
-
indexToRemove = slidesIndexes;
|
1601 |
-
if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();
|
1602 |
-
if (indexToRemove < newActiveIndex) newActiveIndex -= 1;
|
1603 |
-
newActiveIndex = Math.max(newActiveIndex, 0);
|
1604 |
-
}
|
1605 |
-
|
1606 |
-
if (params.loop) {
|
1607 |
-
swiper.loopCreate();
|
1608 |
-
}
|
1609 |
-
|
1610 |
-
if (!(params.observer && Support.observer)) {
|
1611 |
-
swiper.update();
|
1612 |
-
}
|
1613 |
-
if (params.loop) {
|
1614 |
-
swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
|
1615 |
-
} else {
|
1616 |
-
swiper.slideTo(newActiveIndex, 0, false);
|
1617 |
-
}
|
1618 |
-
}
|
1619 |
-
|
1620 |
-
function removeAllSlides () {
|
1621 |
-
const swiper = this;
|
1622 |
-
|
1623 |
-
const slidesIndexes = [];
|
1624 |
-
for (let i = 0; i < swiper.slides.length; i += 1) {
|
1625 |
-
slidesIndexes.push(i);
|
1626 |
-
}
|
1627 |
-
swiper.removeSlide(slidesIndexes);
|
1628 |
-
}
|
1629 |
-
|
1630 |
-
var manipulation = {
|
1631 |
-
appendSlide,
|
1632 |
-
prependSlide,
|
1633 |
-
addSlide,
|
1634 |
-
removeSlide,
|
1635 |
-
removeAllSlides,
|
1636 |
-
};
|
1637 |
-
|
1638 |
-
const Device = (function Device() {
|
1639 |
-
const ua = window.navigator.userAgent;
|
1640 |
-
|
1641 |
-
const device = {
|
1642 |
-
ios: false,
|
1643 |
-
android: false,
|
1644 |
-
androidChrome: false,
|
1645 |
-
desktop: false,
|
1646 |
-
windows: false,
|
1647 |
-
iphone: false,
|
1648 |
-
ipod: false,
|
1649 |
-
ipad: false,
|
1650 |
-
cordova: window.cordova || window.phonegap,
|
1651 |
-
phonegap: window.cordova || window.phonegap,
|
1652 |
-
};
|
1653 |
-
|
1654 |
-
const windows = ua.match(/(Windows Phone);?[\s\/]+([\d.]+)?/); // eslint-disable-line
|
1655 |
-
const android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line
|
1656 |
-
const ipad = ua.match(/(iPad).*OS\s([\d_]+)/);
|
1657 |
-
const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/);
|
1658 |
-
const iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/);
|
1659 |
-
|
1660 |
-
|
1661 |
-
// Windows
|
1662 |
-
if (windows) {
|
1663 |
-
device.os = 'windows';
|
1664 |
-
device.osVersion = windows[2];
|
1665 |
-
device.windows = true;
|
1666 |
-
}
|
1667 |
-
// Android
|
1668 |
-
if (android && !windows) {
|
1669 |
-
device.os = 'android';
|
1670 |
-
device.osVersion = android[2];
|
1671 |
-
device.android = true;
|
1672 |
-
device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0;
|
1673 |
-
}
|
1674 |
-
if (ipad || iphone || ipod) {
|
1675 |
-
device.os = 'ios';
|
1676 |
-
device.ios = true;
|
1677 |
-
}
|
1678 |
-
// iOS
|
1679 |
-
if (iphone && !ipod) {
|
1680 |
-
device.osVersion = iphone[2].replace(/_/g, '.');
|
1681 |
-
device.iphone = true;
|
1682 |
-
}
|
1683 |
-
if (ipad) {
|
1684 |
-
device.osVersion = ipad[2].replace(/_/g, '.');
|
1685 |
-
device.ipad = true;
|
1686 |
-
}
|
1687 |
-
if (ipod) {
|
1688 |
-
device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null;
|
1689 |
-
device.iphone = true;
|
1690 |
-
}
|
1691 |
-
// iOS 8+ changed UA
|
1692 |
-
if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) {
|
1693 |
-
if (device.osVersion.split('.')[0] === '10') {
|
1694 |
-
device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0];
|
1695 |
-
}
|
1696 |
-
}
|
1697 |
-
|
1698 |
-
// Desktop
|
1699 |
-
device.desktop = !(device.os || device.android || device.webView);
|
1700 |
-
|
1701 |
-
// Webview
|
1702 |
-
device.webView = (iphone || ipad || ipod) && ua.match(/.*AppleWebKit(?!.*Safari)/i);
|
1703 |
-
|
1704 |
-
// Minimal UI
|
1705 |
-
if (device.os && device.os === 'ios') {
|
1706 |
-
const osVersionArr = device.osVersion.split('.');
|
1707 |
-
const metaViewport = document.querySelector('meta[name="viewport"]');
|
1708 |
-
device.minimalUi = !device.webView
|
1709 |
-
&& (ipod || iphone)
|
1710 |
-
&& (osVersionArr[0] * 1 === 7 ? osVersionArr[1] * 1 >= 1 : osVersionArr[0] * 1 > 7)
|
1711 |
-
&& metaViewport && metaViewport.getAttribute('content').indexOf('minimal-ui') >= 0;
|
1712 |
-
}
|
1713 |
-
|
1714 |
-
// Pixel Ratio
|
1715 |
-
device.pixelRatio = window.devicePixelRatio || 1;
|
1716 |
-
|
1717 |
-
// Export object
|
1718 |
-
return device;
|
1719 |
-
}());
|
1720 |
-
|
1721 |
-
function onTouchStart (event) {
|
1722 |
-
const swiper = this;
|
1723 |
-
const data$$1 = swiper.touchEventsData;
|
1724 |
-
const { params, touches } = swiper;
|
1725 |
-
if (swiper.animating && params.preventInteractionOnTransition) {
|
1726 |
-
return;
|
1727 |
-
}
|
1728 |
-
let e = event;
|
1729 |
-
if (e.originalEvent) e = e.originalEvent;
|
1730 |
-
data$$1.isTouchEvent = e.type === 'touchstart';
|
1731 |
-
if (!data$$1.isTouchEvent && 'which' in e && e.which === 3) return;
|
1732 |
-
if (!data$$1.isTouchEvent && 'button' in e && e.button > 0) return;
|
1733 |
-
if (data$$1.isTouched && data$$1.isMoved) return;
|
1734 |
-
if (params.noSwiping && $(e.target).closest(params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`)[0]) {
|
1735 |
-
swiper.allowClick = true;
|
1736 |
-
return;
|
1737 |
-
}
|
1738 |
-
if (params.swipeHandler) {
|
1739 |
-
if (!$(e).closest(params.swipeHandler)[0]) return;
|
1740 |
-
}
|
1741 |
-
|
1742 |
-
touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
|
1743 |
-
touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
|
1744 |
-
const startX = touches.currentX;
|
1745 |
-
const startY = touches.currentY;
|
1746 |
-
|
1747 |
-
// Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore
|
1748 |
-
|
1749 |
-
const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection;
|
1750 |
-
const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold;
|
1751 |
-
if (
|
1752 |
-
edgeSwipeDetection
|
1753 |
-
&& ((startX <= edgeSwipeThreshold)
|
1754 |
-
|| (startX >= window.screen.width - edgeSwipeThreshold))
|
1755 |
-
) {
|
1756 |
-
return;
|
1757 |
-
}
|
1758 |
-
|
1759 |
-
Utils.extend(data$$1, {
|
1760 |
-
isTouched: true,
|
1761 |
-
isMoved: false,
|
1762 |
-
allowTouchCallbacks: true,
|
1763 |
-
isScrolling: undefined,
|
1764 |
-
startMoving: undefined,
|
1765 |
-
});
|
1766 |
-
|
1767 |
-
touches.startX = startX;
|
1768 |
-
touches.startY = startY;
|
1769 |
-
data$$1.touchStartTime = Utils.now();
|
1770 |
-
swiper.allowClick = true;
|
1771 |
-
swiper.updateSize();
|
1772 |
-
swiper.swipeDirection = undefined;
|
1773 |
-
if (params.threshold > 0) data$$1.allowThresholdMove = false;
|
1774 |
-
if (e.type !== 'touchstart') {
|
1775 |
-
let preventDefault = true;
|
1776 |
-
if ($(e.target).is(data$$1.formElements)) preventDefault = false;
|
1777 |
-
if (
|
1778 |
-
document.activeElement
|
1779 |
-
&& $(document.activeElement).is(data$$1.formElements)
|
1780 |
-
&& document.activeElement !== e.target
|
1781 |
-
) {
|
1782 |
-
document.activeElement.blur();
|
1783 |
-
}
|
1784 |
-
|
1785 |
-
const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;
|
1786 |
-
if (params.touchStartForcePreventDefault || shouldPreventDefault) {
|
1787 |
-
e.preventDefault();
|
1788 |
-
}
|
1789 |
-
}
|
1790 |
-
swiper.emit('touchStart', e);
|
1791 |
-
}
|
1792 |
-
|
1793 |
-
function onTouchMove (event) {
|
1794 |
-
const swiper = this;
|
1795 |
-
const data$$1 = swiper.touchEventsData;
|
1796 |
-
const { params, touches, rtlTranslate: rtl } = swiper;
|
1797 |
-
let e = event;
|
1798 |
-
if (e.originalEvent) e = e.originalEvent;
|
1799 |
-
if (!data$$1.isTouched) {
|
1800 |
-
if (data$$1.startMoving && data$$1.isScrolling) {
|
1801 |
-
swiper.emit('touchMoveOpposite', e);
|
1802 |
-
}
|
1803 |
-
return;
|
1804 |
-
}
|
1805 |
-
if (data$$1.isTouchEvent && e.type === 'mousemove') return;
|
1806 |
-
const pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
|
1807 |
-
const pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
|
1808 |
-
if (e.preventedByNestedSwiper) {
|
1809 |
-
touches.startX = pageX;
|
1810 |
-
touches.startY = pageY;
|
1811 |
-
return;
|
1812 |
-
}
|
1813 |
-
if (!swiper.allowTouchMove) {
|
1814 |
-
// isMoved = true;
|
1815 |
-
swiper.allowClick = false;
|
1816 |
-
if (data$$1.isTouched) {
|
1817 |
-
Utils.extend(touches, {
|
1818 |
-
startX: pageX,
|
1819 |
-
startY: pageY,
|
1820 |
-
currentX: pageX,
|
1821 |
-
currentY: pageY,
|
1822 |
-
});
|
1823 |
-
data$$1.touchStartTime = Utils.now();
|
1824 |
-
}
|
1825 |
-
return;
|
1826 |
-
}
|
1827 |
-
if (data$$1.isTouchEvent && params.touchReleaseOnEdges && !params.loop) {
|
1828 |
-
if (swiper.isVertical()) {
|
1829 |
-
// Vertical
|
1830 |
-
if (
|
1831 |
-
(pageY < touches.startY && swiper.translate <= swiper.maxTranslate())
|
1832 |
-
|| (pageY > touches.startY && swiper.translate >= swiper.minTranslate())
|
1833 |
-
) {
|
1834 |
-
data$$1.isTouched = false;
|
1835 |
-
data$$1.isMoved = false;
|
1836 |
-
return;
|
1837 |
-
}
|
1838 |
-
} else if (
|
1839 |
-
(pageX < touches.startX && swiper.translate <= swiper.maxTranslate())
|
1840 |
-
|| (pageX > touches.startX && swiper.translate >= swiper.minTranslate())
|
1841 |
-
) {
|
1842 |
-
return;
|
1843 |
-
}
|
1844 |
-
}
|
1845 |
-
if (data$$1.isTouchEvent && document.activeElement) {
|
1846 |
-
if (e.target === document.activeElement && $(e.target).is(data$$1.formElements)) {
|
1847 |
-
data$$1.isMoved = true;
|
1848 |
-
swiper.allowClick = false;
|
1849 |
-
return;
|
1850 |
-
}
|
1851 |
-
}
|
1852 |
-
if (data$$1.allowTouchCallbacks) {
|
1853 |
-
swiper.emit('touchMove', e);
|
1854 |
-
}
|
1855 |
-
if (e.targetTouches && e.targetTouches.length > 1) return;
|
1856 |
-
|
1857 |
-
touches.currentX = pageX;
|
1858 |
-
touches.currentY = pageY;
|
1859 |
-
|
1860 |
-
const diffX = touches.currentX - touches.startX;
|
1861 |
-
const diffY = touches.currentY - touches.startY;
|
1862 |
-
if (swiper.params.threshold && Math.sqrt((diffX ** 2) + (diffY ** 2)) < swiper.params.threshold) return;
|
1863 |
-
|
1864 |
-
if (typeof data$$1.isScrolling === 'undefined') {
|
1865 |
-
let touchAngle;
|
1866 |
-
if ((swiper.isHorizontal() && touches.currentY === touches.startY) || (swiper.isVertical() && touches.currentX === touches.startX)) {
|
1867 |
-
data$$1.isScrolling = false;
|
1868 |
-
} else {
|
1869 |
-
// eslint-disable-next-line
|
1870 |
-
if ((diffX * diffX) + (diffY * diffY) >= 25) {
|
1871 |
-
touchAngle = (Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180) / Math.PI;
|
1872 |
-
data$$1.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : (90 - touchAngle > params.touchAngle);
|
1873 |
-
}
|
1874 |
-
}
|
1875 |
-
}
|
1876 |
-
if (data$$1.isScrolling) {
|
1877 |
-
swiper.emit('touchMoveOpposite', e);
|
1878 |
-
}
|
1879 |
-
if (typeof data$$1.startMoving === 'undefined') {
|
1880 |
-
if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {
|
1881 |
-
data$$1.startMoving = true;
|
1882 |
-
}
|
1883 |
-
}
|
1884 |
-
if (data$$1.isScrolling) {
|
1885 |
-
data$$1.isTouched = false;
|
1886 |
-
return;
|
1887 |
-
}
|
1888 |
-
if (!data$$1.startMoving) {
|
1889 |
-
return;
|
1890 |
-
}
|
1891 |
-
swiper.allowClick = false;
|
1892 |
-
e.preventDefault();
|
1893 |
-
if (params.touchMoveStopPropagation && !params.nested) {
|
1894 |
-
e.stopPropagation();
|
1895 |
-
}
|
1896 |
-
|
1897 |
-
if (!data$$1.isMoved) {
|
1898 |
-
if (params.loop) {
|
1899 |
-
swiper.loopFix();
|
1900 |
-
}
|
1901 |
-
data$$1.startTranslate = swiper.getTranslate();
|
1902 |
-
swiper.setTransition(0);
|
1903 |
-
if (swiper.animating) {
|
1904 |
-
swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend');
|
1905 |
-
}
|
1906 |
-
data$$1.allowMomentumBounce = false;
|
1907 |
-
// Grab Cursor
|
1908 |
-
if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
|
1909 |
-
swiper.setGrabCursor(true);
|
1910 |
-
}
|
1911 |
-
swiper.emit('sliderFirstMove', e);
|
1912 |
-
}
|
1913 |
-
swiper.emit('sliderMove', e);
|
1914 |
-
data$$1.isMoved = true;
|
1915 |
-
|
1916 |
-
let diff = swiper.isHorizontal() ? diffX : diffY;
|
1917 |
-
touches.diff = diff;
|
1918 |
-
|
1919 |
-
diff *= params.touchRatio;
|
1920 |
-
if (rtl) diff = -diff;
|
1921 |
-
|
1922 |
-
swiper.swipeDirection = diff > 0 ? 'prev' : 'next';
|
1923 |
-
data$$1.currentTranslate = diff + data$$1.startTranslate;
|
1924 |
-
|
1925 |
-
let disableParentSwiper = true;
|
1926 |
-
let resistanceRatio = params.resistanceRatio;
|
1927 |
-
if (params.touchReleaseOnEdges) {
|
1928 |
-
resistanceRatio = 0;
|
1929 |
-
}
|
1930 |
-
if ((diff > 0 && data$$1.currentTranslate > swiper.minTranslate())) {
|
1931 |
-
disableParentSwiper = false;
|
1932 |
-
if (params.resistance) data$$1.currentTranslate = (swiper.minTranslate() - 1) + ((-swiper.minTranslate() + data$$1.startTranslate + diff) ** resistanceRatio);
|
1933 |
-
} else if (diff < 0 && data$$1.currentTranslate < swiper.maxTranslate()) {
|
1934 |
-
disableParentSwiper = false;
|
1935 |
-
if (params.resistance) data$$1.currentTranslate = (swiper.maxTranslate() + 1) - ((swiper.maxTranslate() - data$$1.startTranslate - diff) ** resistanceRatio);
|
1936 |
-
}
|
1937 |
-
|
1938 |
-
if (disableParentSwiper) {
|
1939 |
-
e.preventedByNestedSwiper = true;
|
1940 |
-
}
|
1941 |
-
|
1942 |
-
// Directions locks
|
1943 |
-
if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data$$1.currentTranslate < data$$1.startTranslate) {
|
1944 |
-
data$$1.currentTranslate = data$$1.startTranslate;
|
1945 |
-
}
|
1946 |
-
if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data$$1.currentTranslate > data$$1.startTranslate) {
|
1947 |
-
data$$1.currentTranslate = data$$1.startTranslate;
|
1948 |
-
}
|
1949 |
-
|
1950 |
-
|
1951 |
-
// Threshold
|
1952 |
-
if (params.threshold > 0) {
|
1953 |
-
if (Math.abs(diff) > params.threshold || data$$1.allowThresholdMove) {
|
1954 |
-
if (!data$$1.allowThresholdMove) {
|
1955 |
-
data$$1.allowThresholdMove = true;
|
1956 |
-
touches.startX = touches.currentX;
|
1957 |
-
touches.startY = touches.currentY;
|
1958 |
-
data$$1.currentTranslate = data$$1.startTranslate;
|
1959 |
-
touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;
|
1960 |
-
return;
|
1961 |
-
}
|
1962 |
-
} else {
|
1963 |
-
data$$1.currentTranslate = data$$1.startTranslate;
|
1964 |
-
return;
|
1965 |
-
}
|
1966 |
-
}
|
1967 |
-
|
1968 |
-
if (!params.followFinger) return;
|
1969 |
-
|
1970 |
-
// Update active index in free mode
|
1971 |
-
if (params.freeMode || params.watchSlidesProgress || params.watchSlidesVisibility) {
|
1972 |
-
swiper.updateActiveIndex();
|
1973 |
-
swiper.updateSlidesClasses();
|
1974 |
-
}
|
1975 |
-
if (params.freeMode) {
|
1976 |
-
// Velocity
|
1977 |
-
if (data$$1.velocities.length === 0) {
|
1978 |
-
data$$1.velocities.push({
|
1979 |
-
position: touches[swiper.isHorizontal() ? 'startX' : 'startY'],
|
1980 |
-
time: data$$1.touchStartTime,
|
1981 |
-
});
|
1982 |
-
}
|
1983 |
-
data$$1.velocities.push({
|
1984 |
-
position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'],
|
1985 |
-
time: Utils.now(),
|
1986 |
-
});
|
1987 |
-
}
|
1988 |
-
// Update progress
|
1989 |
-
swiper.updateProgress(data$$1.currentTranslate);
|
1990 |
-
// Update translate
|
1991 |
-
swiper.setTranslate(data$$1.currentTranslate);
|
1992 |
-
}
|
1993 |
-
|
1994 |
-
function onTouchEnd (event) {
|
1995 |
-
const swiper = this;
|
1996 |
-
const data$$1 = swiper.touchEventsData;
|
1997 |
-
|
1998 |
-
const {
|
1999 |
-
params, touches, rtlTranslate: rtl, $wrapperEl, slidesGrid, snapGrid,
|
2000 |
-
} = swiper;
|
2001 |
-
let e = event;
|
2002 |
-
if (e.originalEvent) e = e.originalEvent;
|
2003 |
-
if (data$$1.allowTouchCallbacks) {
|
2004 |
-
swiper.emit('touchEnd', e);
|
2005 |
-
}
|
2006 |
-
data$$1.allowTouchCallbacks = false;
|
2007 |
-
if (!data$$1.isTouched) {
|
2008 |
-
if (data$$1.isMoved && params.grabCursor) {
|
2009 |
-
swiper.setGrabCursor(false);
|
2010 |
-
}
|
2011 |
-
data$$1.isMoved = false;
|
2012 |
-
data$$1.startMoving = false;
|
2013 |
-
return;
|
2014 |
-
}
|
2015 |
-
// Return Grab Cursor
|
2016 |
-
if (params.grabCursor && data$$1.isMoved && data$$1.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
|
2017 |
-
swiper.setGrabCursor(false);
|
2018 |
-
}
|
2019 |
-
|
2020 |
-
// Time diff
|
2021 |
-
const touchEndTime = Utils.now();
|
2022 |
-
const timeDiff = touchEndTime - data$$1.touchStartTime;
|
2023 |
-
|
2024 |
-
// Tap, doubleTap, Click
|
2025 |
-
if (swiper.allowClick) {
|
2026 |
-
swiper.updateClickedSlide(e);
|
2027 |
-
swiper.emit('tap', e);
|
2028 |
-
if (timeDiff < 300 && (touchEndTime - data$$1.lastClickTime) > 300) {
|
2029 |
-
if (data$$1.clickTimeout) clearTimeout(data$$1.clickTimeout);
|
2030 |
-
data$$1.clickTimeout = Utils.nextTick(() => {
|
2031 |
-
if (!swiper || swiper.destroyed) return;
|
2032 |
-
swiper.emit('click', e);
|
2033 |
-
}, 300);
|
2034 |
-
}
|
2035 |
-
if (timeDiff < 300 && (touchEndTime - data$$1.lastClickTime) < 300) {
|
2036 |
-
if (data$$1.clickTimeout) clearTimeout(data$$1.clickTimeout);
|
2037 |
-
swiper.emit('doubleTap', e);
|
2038 |
-
}
|
2039 |
-
}
|
2040 |
-
|
2041 |
-
data$$1.lastClickTime = Utils.now();
|
2042 |
-
Utils.nextTick(() => {
|
2043 |
-
if (!swiper.destroyed) swiper.allowClick = true;
|
2044 |
-
});
|
2045 |
-
|
2046 |
-
if (!data$$1.isTouched || !data$$1.isMoved || !swiper.swipeDirection || touches.diff === 0 || data$$1.currentTranslate === data$$1.startTranslate) {
|
2047 |
-
data$$1.isTouched = false;
|
2048 |
-
data$$1.isMoved = false;
|
2049 |
-
data$$1.startMoving = false;
|
2050 |
-
return;
|
2051 |
-
}
|
2052 |
-
data$$1.isTouched = false;
|
2053 |
-
data$$1.isMoved = false;
|
2054 |
-
data$$1.startMoving = false;
|
2055 |
-
|
2056 |
-
let currentPos;
|
2057 |
-
if (params.followFinger) {
|
2058 |
-
currentPos = rtl ? swiper.translate : -swiper.translate;
|
2059 |
-
} else {
|
2060 |
-
currentPos = -data$$1.currentTranslate;
|
2061 |
-
}
|
2062 |
-
|
2063 |
-
if (params.freeMode) {
|
2064 |
-
if (currentPos < -swiper.minTranslate()) {
|
2065 |
-
swiper.slideTo(swiper.activeIndex);
|
2066 |
-
return;
|
2067 |
-
}
|
2068 |
-
if (currentPos > -swiper.maxTranslate()) {
|
2069 |
-
if (swiper.slides.length < snapGrid.length) {
|
2070 |
-
swiper.slideTo(snapGrid.length - 1);
|
2071 |
-
} else {
|
2072 |
-
swiper.slideTo(swiper.slides.length - 1);
|
2073 |
-
}
|
2074 |
-
return;
|
2075 |
-
}
|
2076 |
-
|
2077 |
-
if (params.freeModeMomentum) {
|
2078 |
-
if (data$$1.velocities.length > 1) {
|
2079 |
-
const lastMoveEvent = data$$1.velocities.pop();
|
2080 |
-
const velocityEvent = data$$1.velocities.pop();
|
2081 |
-
|
2082 |
-
const distance = lastMoveEvent.position - velocityEvent.position;
|
2083 |
-
const time = lastMoveEvent.time - velocityEvent.time;
|
2084 |
-
swiper.velocity = distance / time;
|
2085 |
-
swiper.velocity /= 2;
|
2086 |
-
if (Math.abs(swiper.velocity) < params.freeModeMinimumVelocity) {
|
2087 |
-
swiper.velocity = 0;
|
2088 |
-
}
|
2089 |
-
// this implies that the user stopped moving a finger then released.
|
2090 |
-
// There would be no events with distance zero, so the last event is stale.
|
2091 |
-
if (time > 150 || (Utils.now() - lastMoveEvent.time) > 300) {
|
2092 |
-
swiper.velocity = 0;
|
2093 |
-
}
|
2094 |
-
} else {
|
2095 |
-
swiper.velocity = 0;
|
2096 |
-
}
|
2097 |
-
swiper.velocity *= params.freeModeMomentumVelocityRatio;
|
2098 |
-
|
2099 |
-
data$$1.velocities.length = 0;
|
2100 |
-
let momentumDuration = 1000 * params.freeModeMomentumRatio;
|
2101 |
-
const momentumDistance = swiper.velocity * momentumDuration;
|
2102 |
-
|
2103 |
-
let newPosition = swiper.translate + momentumDistance;
|
2104 |
-
if (rtl) newPosition = -newPosition;
|
2105 |
-
|
2106 |
-
let doBounce = false;
|
2107 |
-
let afterBouncePosition;
|
2108 |
-
const bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeModeMomentumBounceRatio;
|
2109 |
-
let needsLoopFix;
|
2110 |
-
if (newPosition < swiper.maxTranslate()) {
|
2111 |
-
if (params.freeModeMomentumBounce) {
|
2112 |
-
if (newPosition + swiper.maxTranslate() < -bounceAmount) {
|
2113 |
-
newPosition = swiper.maxTranslate() - bounceAmount;
|
2114 |
-
}
|
2115 |
-
afterBouncePosition = swiper.maxTranslate();
|
2116 |
-
doBounce = true;
|
2117 |
-
data$$1.allowMomentumBounce = true;
|
2118 |
-
} else {
|
2119 |
-
newPosition = swiper.maxTranslate();
|
2120 |
-
}
|
2121 |
-
if (params.loop && params.centeredSlides) needsLoopFix = true;
|
2122 |
-
} else if (newPosition > swiper.minTranslate()) {
|
2123 |
-
if (params.freeModeMomentumBounce) {
|
2124 |
-
if (newPosition - swiper.minTranslate() > bounceAmount) {
|
2125 |
-
newPosition = swiper.minTranslate() + bounceAmount;
|
2126 |
-
}
|
2127 |
-
afterBouncePosition = swiper.minTranslate();
|
2128 |
-
doBounce = true;
|
2129 |
-
data$$1.allowMomentumBounce = true;
|
2130 |
-
} else {
|
2131 |
-
newPosition = swiper.minTranslate();
|
2132 |
-
}
|
2133 |
-
if (params.loop && params.centeredSlides) needsLoopFix = true;
|
2134 |
-
} else if (params.freeModeSticky) {
|
2135 |
-
let nextSlide;
|
2136 |
-
for (let j = 0; j < snapGrid.length; j += 1) {
|
2137 |
-
if (snapGrid[j] > -newPosition) {
|
2138 |
-
nextSlide = j;
|
2139 |
-
break;
|
2140 |
-
}
|
2141 |
-
}
|
2142 |
-
|
2143 |
-
if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') {
|
2144 |
-
newPosition = snapGrid[nextSlide];
|
2145 |
-
} else {
|
2146 |
-
newPosition = snapGrid[nextSlide - 1];
|
2147 |
-
}
|
2148 |
-
newPosition = -newPosition;
|
2149 |
-
}
|
2150 |
-
if (needsLoopFix) {
|
2151 |
-
swiper.once('transitionEnd', () => {
|
2152 |
-
swiper.loopFix();
|
2153 |
-
});
|
2154 |
-
}
|
2155 |
-
// Fix duration
|
2156 |
-
if (swiper.velocity !== 0) {
|
2157 |
-
if (rtl) {
|
2158 |
-
momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity);
|
2159 |
-
} else {
|
2160 |
-
momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity);
|
2161 |
-
}
|
2162 |
-
} else if (params.freeModeSticky) {
|
2163 |
-
swiper.slideToClosest();
|
2164 |
-
return;
|
2165 |
-
}
|
2166 |
-
|
2167 |
-
if (params.freeModeMomentumBounce && doBounce) {
|
2168 |
-
swiper.updateProgress(afterBouncePosition);
|
2169 |
-
swiper.setTransition(momentumDuration);
|
2170 |
-
swiper.setTranslate(newPosition);
|
2171 |
-
swiper.transitionStart(true, swiper.swipeDirection);
|
2172 |
-
swiper.animating = true;
|
2173 |
-
$wrapperEl.transitionEnd(() => {
|
2174 |
-
if (!swiper || swiper.destroyed || !data$$1.allowMomentumBounce) return;
|
2175 |
-
swiper.emit('momentumBounce');
|
2176 |
-
|
2177 |
-
swiper.setTransition(params.speed);
|
2178 |
-
swiper.setTranslate(afterBouncePosition);
|
2179 |
-
$wrapperEl.transitionEnd(() => {
|
2180 |
-
if (!swiper || swiper.destroyed) return;
|
2181 |
-
swiper.transitionEnd();
|
2182 |
-
});
|
2183 |
-
});
|
2184 |
-
} else if (swiper.velocity) {
|
2185 |
-
swiper.updateProgress(newPosition);
|
2186 |
-
swiper.setTransition(momentumDuration);
|
2187 |
-
swiper.setTranslate(newPosition);
|
2188 |
-
swiper.transitionStart(true, swiper.swipeDirection);
|
2189 |
-
if (!swiper.animating) {
|
2190 |
-
swiper.animating = true;
|
2191 |
-
$wrapperEl.transitionEnd(() => {
|
2192 |
-
if (!swiper || swiper.destroyed) return;
|
2193 |
-
swiper.transitionEnd();
|
2194 |
-
});
|
2195 |
-
}
|
2196 |
-
} else {
|
2197 |
-
swiper.updateProgress(newPosition);
|
2198 |
-
}
|
2199 |
-
|
2200 |
-
swiper.updateActiveIndex();
|
2201 |
-
swiper.updateSlidesClasses();
|
2202 |
-
} else if (params.freeModeSticky) {
|
2203 |
-
swiper.slideToClosest();
|
2204 |
-
return;
|
2205 |
-
}
|
2206 |
-
|
2207 |
-
if (!params.freeModeMomentum || timeDiff >= params.longSwipesMs) {
|
2208 |
-
swiper.updateProgress();
|
2209 |
-
swiper.updateActiveIndex();
|
2210 |
-
swiper.updateSlidesClasses();
|
2211 |
-
}
|
2212 |
-
return;
|
2213 |
-
}
|
2214 |
-
|
2215 |
-
// Find current slide
|
2216 |
-
let stopIndex = 0;
|
2217 |
-
let groupSize = swiper.slidesSizesGrid[0];
|
2218 |
-
for (let i = 0; i < slidesGrid.length; i += params.slidesPerGroup) {
|
2219 |
-
if (typeof slidesGrid[i + params.slidesPerGroup] !== 'undefined') {
|
2220 |
-
if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + params.slidesPerGroup]) {
|
2221 |
-
stopIndex = i;
|
2222 |
-
groupSize = slidesGrid[i + params.slidesPerGroup] - slidesGrid[i];
|
2223 |
-
}
|
2224 |
-
} else if (currentPos >= slidesGrid[i]) {
|
2225 |
-
stopIndex = i;
|
2226 |
-
groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];
|
2227 |
-
}
|
2228 |
-
}
|
2229 |
-
|
2230 |
-
// Find current slide size
|
2231 |
-
const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;
|
2232 |
-
|
2233 |
-
if (timeDiff > params.longSwipesMs) {
|
2234 |
-
// Long touches
|
2235 |
-
if (!params.longSwipes) {
|
2236 |
-
swiper.slideTo(swiper.activeIndex);
|
2237 |
-
return;
|
2238 |
-
}
|
2239 |
-
if (swiper.swipeDirection === 'next') {
|
2240 |
-
if (ratio >= params.longSwipesRatio) swiper.slideTo(stopIndex + params.slidesPerGroup);
|
2241 |
-
else swiper.slideTo(stopIndex);
|
2242 |
-
}
|
2243 |
-
if (swiper.swipeDirection === 'prev') {
|
2244 |
-
if (ratio > (1 - params.longSwipesRatio)) swiper.slideTo(stopIndex + params.slidesPerGroup);
|
2245 |
-
else swiper.slideTo(stopIndex);
|
2246 |
-
}
|
2247 |
-
} else {
|
2248 |
-
// Short swipes
|
2249 |
-
if (!params.shortSwipes) {
|
2250 |
-
swiper.slideTo(swiper.activeIndex);
|
2251 |
-
return;
|
2252 |
-
}
|
2253 |
-
if (swiper.swipeDirection === 'next') {
|
2254 |
-
swiper.slideTo(stopIndex + params.slidesPerGroup);
|
2255 |
-
}
|
2256 |
-
if (swiper.swipeDirection === 'prev') {
|
2257 |
-
swiper.slideTo(stopIndex);
|
2258 |
-
}
|
2259 |
-
}
|
2260 |
-
}
|
2261 |
-
|
2262 |
-
function onResize () {
|
2263 |
-
const swiper = this;
|
2264 |
-
|
2265 |
-
const { params, el } = swiper;
|
2266 |
-
|
2267 |
-
if (el && el.offsetWidth === 0) return;
|
2268 |
-
|
2269 |
-
// Breakpoints
|
2270 |
-
if (params.breakpoints) {
|
2271 |
-
swiper.setBreakpoint();
|
2272 |
-
}
|
2273 |
-
|
2274 |
-
// Save locks
|
2275 |
-
const { allowSlideNext, allowSlidePrev, snapGrid } = swiper;
|
2276 |
-
|
2277 |
-
// Disable locks on resize
|
2278 |
-
swiper.allowSlideNext = true;
|
2279 |
-
swiper.allowSlidePrev = true;
|
2280 |
-
|
2281 |
-
swiper.updateSize();
|
2282 |
-
swiper.updateSlides();
|
2283 |
-
|
2284 |
-
if (params.freeMode) {
|
2285 |
-
const newTranslate = Math.min(Math.max(swiper.translate, swiper.maxTranslate()), swiper.minTranslate());
|
2286 |
-
swiper.setTranslate(newTranslate);
|
2287 |
-
swiper.updateActiveIndex();
|
2288 |
-
swiper.updateSlidesClasses();
|
2289 |
-
|
2290 |
-
if (params.autoHeight) {
|
2291 |
-
swiper.updateAutoHeight();
|
2292 |
-
}
|
2293 |
-
} else {
|
2294 |
-
swiper.updateSlidesClasses();
|
2295 |
-
if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
|
2296 |
-
swiper.slideTo(swiper.slides.length - 1, 0, false, true);
|
2297 |
-
} else {
|
2298 |
-
swiper.slideTo(swiper.activeIndex, 0, false, true);
|
2299 |
-
}
|
2300 |
-
}
|
2301 |
-
// Return locks after resize
|
2302 |
-
swiper.allowSlidePrev = allowSlidePrev;
|
2303 |
-
swiper.allowSlideNext = allowSlideNext;
|
2304 |
-
|
2305 |
-
if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {
|
2306 |
-
swiper.checkOverflow();
|
2307 |
-
}
|
2308 |
-
}
|
2309 |
-
|
2310 |
-
function onClick (e) {
|
2311 |
-
const swiper = this;
|
2312 |
-
if (!swiper.allowClick) {
|
2313 |
-
if (swiper.params.preventClicks) e.preventDefault();
|
2314 |
-
if (swiper.params.preventClicksPropagation && swiper.animating) {
|
2315 |
-
e.stopPropagation();
|
2316 |
-
e.stopImmediatePropagation();
|
2317 |
-
}
|
2318 |
-
}
|
2319 |
-
}
|
2320 |
-
|
2321 |
-
function attachEvents() {
|
2322 |
-
const swiper = this;
|
2323 |
-
const {
|
2324 |
-
params, touchEvents, el, wrapperEl,
|
2325 |
-
} = swiper;
|
2326 |
-
|
2327 |
-
{
|
2328 |
-
swiper.onTouchStart = onTouchStart.bind(swiper);
|
2329 |
-
swiper.onTouchMove = onTouchMove.bind(swiper);
|
2330 |
-
swiper.onTouchEnd = onTouchEnd.bind(swiper);
|
2331 |
-
}
|
2332 |
-
|
2333 |
-
swiper.onClick = onClick.bind(swiper);
|
2334 |
-
|
2335 |
-
const target = params.touchEventsTarget === 'container' ? el : wrapperEl;
|
2336 |
-
const capture = !!params.nested;
|
2337 |
-
|
2338 |
-
// Touch Events
|
2339 |
-
{
|
2340 |
-
if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
|
2341 |
-
target.addEventListener(touchEvents.start, swiper.onTouchStart, false);
|
2342 |
-
document.addEventListener(touchEvents.move, swiper.onTouchMove, capture);
|
2343 |
-
document.addEventListener(touchEvents.end, swiper.onTouchEnd, false);
|
2344 |
-
} else {
|
2345 |
-
if (Support.touch) {
|
2346 |
-
const passiveListener = touchEvents.start === 'touchstart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
|
2347 |
-
target.addEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);
|
2348 |
-
target.addEventListener(touchEvents.move, swiper.onTouchMove, Support.passiveListener ? { passive: false, capture } : capture);
|
2349 |
-
target.addEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);
|
2350 |
-
}
|
2351 |
-
if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
|
2352 |
-
target.addEventListener('mousedown', swiper.onTouchStart, false);
|
2353 |
-
document.addEventListener('mousemove', swiper.onTouchMove, capture);
|
2354 |
-
document.addEventListener('mouseup', swiper.onTouchEnd, false);
|
2355 |
-
}
|
2356 |
-
}
|
2357 |
-
// Prevent Links Clicks
|
2358 |
-
if (params.preventClicks || params.preventClicksPropagation) {
|
2359 |
-
target.addEventListener('click', swiper.onClick, true);
|
2360 |
-
}
|
2361 |
-
}
|
2362 |
-
|
2363 |
-
// Resize handler
|
2364 |
-
swiper.on((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize, true);
|
2365 |
-
}
|
2366 |
-
|
2367 |
-
function detachEvents() {
|
2368 |
-
const swiper = this;
|
2369 |
-
|
2370 |
-
const {
|
2371 |
-
params, touchEvents, el, wrapperEl,
|
2372 |
-
} = swiper;
|
2373 |
-
|
2374 |
-
const target = params.touchEventsTarget === 'container' ? el : wrapperEl;
|
2375 |
-
const capture = !!params.nested;
|
2376 |
-
|
2377 |
-
// Touch Events
|
2378 |
-
{
|
2379 |
-
if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
|
2380 |
-
target.removeEventListener(touchEvents.start, swiper.onTouchStart, false);
|
2381 |
-
document.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);
|
2382 |
-
document.removeEventListener(touchEvents.end, swiper.onTouchEnd, false);
|
2383 |
-
} else {
|
2384 |
-
if (Support.touch) {
|
2385 |
-
const passiveListener = touchEvents.start === 'onTouchStart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
|
2386 |
-
target.removeEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);
|
2387 |
-
target.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);
|
2388 |
-
target.removeEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);
|
2389 |
-
}
|
2390 |
-
if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
|
2391 |
-
target.removeEventListener('mousedown', swiper.onTouchStart, false);
|
2392 |
-
document.removeEventListener('mousemove', swiper.onTouchMove, capture);
|
2393 |
-
document.removeEventListener('mouseup', swiper.onTouchEnd, false);
|
2394 |
-
}
|
2395 |
-
}
|
2396 |
-
// Prevent Links Clicks
|
2397 |
-
if (params.preventClicks || params.preventClicksPropagation) {
|
2398 |
-
target.removeEventListener('click', swiper.onClick, true);
|
2399 |
-
}
|
2400 |
-
}
|
2401 |
-
|
2402 |
-
// Resize handler
|
2403 |
-
swiper.off((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize);
|
2404 |
-
}
|
2405 |
-
|
2406 |
-
var events = {
|
2407 |
-
attachEvents,
|
2408 |
-
detachEvents,
|
2409 |
-
};
|
2410 |
-
|
2411 |
-
function setBreakpoint () {
|
2412 |
-
const swiper = this;
|
2413 |
-
const {
|
2414 |
-
activeIndex, initialized, loopedSlides = 0, params,
|
2415 |
-
} = swiper;
|
2416 |
-
const breakpoints = params.breakpoints;
|
2417 |
-
if (!breakpoints || (breakpoints && Object.keys(breakpoints).length === 0)) return;
|
2418 |
-
|
2419 |
-
// Set breakpoint for window width and update parameters
|
2420 |
-
const breakpoint = swiper.getBreakpoint(breakpoints);
|
2421 |
-
|
2422 |
-
if (breakpoint && swiper.currentBreakpoint !== breakpoint) {
|
2423 |
-
const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;
|
2424 |
-
if (breakpointOnlyParams) {
|
2425 |
-
['slidesPerView', 'spaceBetween', 'slidesPerGroup'].forEach((param) => {
|
2426 |
-
const paramValue = breakpointOnlyParams[param];
|
2427 |
-
if (typeof paramValue === 'undefined') return;
|
2428 |
-
if (param === 'slidesPerView' && (paramValue === 'AUTO' || paramValue === 'auto')) {
|
2429 |
-
breakpointOnlyParams[param] = 'auto';
|
2430 |
-
} else if (param === 'slidesPerView') {
|
2431 |
-
breakpointOnlyParams[param] = parseFloat(paramValue);
|
2432 |
-
} else {
|
2433 |
-
breakpointOnlyParams[param] = parseInt(paramValue, 10);
|
2434 |
-
}
|
2435 |
-
});
|
2436 |
-
}
|
2437 |
-
|
2438 |
-
const breakpointParams = breakpointOnlyParams || swiper.originalParams;
|
2439 |
-
const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView);
|
2440 |
-
|
2441 |
-
Utils.extend(swiper.params, breakpointParams);
|
2442 |
-
|
2443 |
-
Utils.extend(swiper, {
|
2444 |
-
allowTouchMove: swiper.params.allowTouchMove,
|
2445 |
-
allowSlideNext: swiper.params.allowSlideNext,
|
2446 |
-
allowSlidePrev: swiper.params.allowSlidePrev,
|
2447 |
-
});
|
2448 |
-
|
2449 |
-
swiper.currentBreakpoint = breakpoint;
|
2450 |
-
|
2451 |
-
if (needsReLoop && initialized) {
|
2452 |
-
swiper.loopDestroy();
|
2453 |
-
swiper.loopCreate();
|
2454 |
-
swiper.updateSlides();
|
2455 |
-
swiper.slideTo((activeIndex - loopedSlides) + swiper.loopedSlides, 0, false);
|
2456 |
-
}
|
2457 |
-
swiper.emit('breakpoint', breakpointParams);
|
2458 |
-
}
|
2459 |
-
}
|
2460 |
-
|
2461 |
-
function getBreakpoint (breakpoints) {
|
2462 |
-
const swiper = this;
|
2463 |
-
// Get breakpoint for window width
|
2464 |
-
if (!breakpoints) return undefined;
|
2465 |
-
let breakpoint = false;
|
2466 |
-
const points = [];
|
2467 |
-
Object.keys(breakpoints).forEach((point) => {
|
2468 |
-
points.push(point);
|
2469 |
-
});
|
2470 |
-
points.sort((a, b) => parseInt(a, 10) - parseInt(b, 10));
|
2471 |
-
for (let i = 0; i < points.length; i += 1) {
|
2472 |
-
const point = points[i];
|
2473 |
-
if (swiper.params.breakpointsInverse) {
|
2474 |
-
if (point <= window.innerWidth) {
|
2475 |
-
breakpoint = point;
|
2476 |
-
}
|
2477 |
-
} else if (point >= window.innerWidth && !breakpoint) {
|
2478 |
-
breakpoint = point;
|
2479 |
-
}
|
2480 |
-
}
|
2481 |
-
return breakpoint || 'max';
|
2482 |
-
}
|
2483 |
-
|
2484 |
-
var breakpoints = { setBreakpoint, getBreakpoint };
|
2485 |
-
|
2486 |
-
const Browser = (function Browser() {
|
2487 |
-
function isSafari() {
|
2488 |
-
const ua = window.navigator.userAgent.toLowerCase();
|
2489 |
-
return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0);
|
2490 |
-
}
|
2491 |
-
return {
|
2492 |
-
isIE: !!window.navigator.userAgent.match(/Trident/g) || !!window.navigator.userAgent.match(/MSIE/g),
|
2493 |
-
isEdge: !!window.navigator.userAgent.match(/Edge/g),
|
2494 |
-
isSafari: isSafari(),
|
2495 |
-
isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),
|
2496 |
-
};
|
2497 |
-
}());
|
2498 |
-
|
2499 |
-
function addClasses () {
|
2500 |
-
const swiper = this;
|
2501 |
-
const {
|
2502 |
-
classNames, params, rtl, $el,
|
2503 |
-
} = swiper;
|
2504 |
-
const suffixes = [];
|
2505 |
-
|
2506 |
-
suffixes.push(params.direction);
|
2507 |
-
|
2508 |
-
if (params.freeMode) {
|
2509 |
-
suffixes.push('free-mode');
|
2510 |
-
}
|
2511 |
-
if (!Support.flexbox) {
|
2512 |
-
suffixes.push('no-flexbox');
|
2513 |
-
}
|
2514 |
-
if (params.autoHeight) {
|
2515 |
-
suffixes.push('autoheight');
|
2516 |
-
}
|
2517 |
-
if (rtl) {
|
2518 |
-
suffixes.push('rtl');
|
2519 |
-
}
|
2520 |
-
if (params.slidesPerColumn > 1) {
|
2521 |
-
suffixes.push('multirow');
|
2522 |
-
}
|
2523 |
-
if (Device.android) {
|
2524 |
-
suffixes.push('android');
|
2525 |
-
}
|
2526 |
-
if (Device.ios) {
|
2527 |
-
suffixes.push('ios');
|
2528 |
-
}
|
2529 |
-
// WP8 Touch Events Fix
|
2530 |
-
if ((Browser.isIE || Browser.isEdge) && (Support.pointerEvents || Support.prefixedPointerEvents)) {
|
2531 |
-
suffixes.push(`wp8-${params.direction}`);
|
2532 |
-
}
|
2533 |
-
|
2534 |
-
suffixes.forEach((suffix) => {
|
2535 |
-
classNames.push(params.containerModifierClass + suffix);
|
2536 |
-
});
|
2537 |
-
|
2538 |
-
$el.addClass(classNames.join(' '));
|
2539 |
-
}
|
2540 |
-
|
2541 |
-
function removeClasses () {
|
2542 |
-
const swiper = this;
|
2543 |
-
const { $el, classNames } = swiper;
|
2544 |
-
|
2545 |
-
$el.removeClass(classNames.join(' '));
|
2546 |
-
}
|
2547 |
-
|
2548 |
-
var classes = { addClasses, removeClasses };
|
2549 |
-
|
2550 |
-
function loadImage (imageEl, src, srcset, sizes, checkForComplete, callback) {
|
2551 |
-
let image;
|
2552 |
-
function onReady() {
|
2553 |
-
if (callback) callback();
|
2554 |
-
}
|
2555 |
-
if (!imageEl.complete || !checkForComplete) {
|
2556 |
-
if (src) {
|
2557 |
-
image = new window.Image();
|
2558 |
-
image.onload = onReady;
|
2559 |
-
image.onerror = onReady;
|
2560 |
-
if (sizes) {
|
2561 |
-
image.sizes = sizes;
|
2562 |
-
}
|
2563 |
-
if (srcset) {
|
2564 |
-
image.srcset = srcset;
|
2565 |
-
}
|
2566 |
-
if (src) {
|
2567 |
-
image.src = src;
|
2568 |
-
}
|
2569 |
-
} else {
|
2570 |
-
onReady();
|
2571 |
-
}
|
2572 |
-
} else {
|
2573 |
-
// image already loaded...
|
2574 |
-
onReady();
|
2575 |
-
}
|
2576 |
-
}
|
2577 |
-
|
2578 |
-
function preloadImages () {
|
2579 |
-
const swiper = this;
|
2580 |
-
swiper.imagesToLoad = swiper.$el.find('img');
|
2581 |
-
function onReady() {
|
2582 |
-
if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) return;
|
2583 |
-
if (swiper.imagesLoaded !== undefined) swiper.imagesLoaded += 1;
|
2584 |
-
if (swiper.imagesLoaded === swiper.imagesToLoad.length) {
|
2585 |
-
if (swiper.params.updateOnImagesReady) swiper.update();
|
2586 |
-
swiper.emit('imagesReady');
|
2587 |
-
}
|
2588 |
-
}
|
2589 |
-
for (let i = 0; i < swiper.imagesToLoad.length; i += 1) {
|
2590 |
-
const imageEl = swiper.imagesToLoad[i];
|
2591 |
-
swiper.loadImage(
|
2592 |
-
imageEl,
|
2593 |
-
imageEl.currentSrc || imageEl.getAttribute('src'),
|
2594 |
-
imageEl.srcset || imageEl.getAttribute('srcset'),
|
2595 |
-
imageEl.sizes || imageEl.getAttribute('sizes'),
|
2596 |
-
true,
|
2597 |
-
onReady
|
2598 |
-
);
|
2599 |
-
}
|
2600 |
-
}
|
2601 |
-
|
2602 |
-
var images = {
|
2603 |
-
loadImage,
|
2604 |
-
preloadImages,
|
2605 |
-
};
|
2606 |
-
|
2607 |
-
function checkOverflow() {
|
2608 |
-
const swiper = this;
|
2609 |
-
const wasLocked = swiper.isLocked;
|
2610 |
-
|
2611 |
-
swiper.isLocked = swiper.snapGrid.length === 1;
|
2612 |
-
swiper.allowSlideNext = !swiper.isLocked;
|
2613 |
-
swiper.allowSlidePrev = !swiper.isLocked;
|
2614 |
-
|
2615 |
-
// events
|
2616 |
-
if (wasLocked !== swiper.isLocked) swiper.emit(swiper.isLocked ? 'lock' : 'unlock');
|
2617 |
-
|
2618 |
-
if (wasLocked && wasLocked !== swiper.isLocked) {
|
2619 |
-
swiper.isEnd = false;
|
2620 |
-
swiper.navigation.update();
|
2621 |
-
}
|
2622 |
-
}
|
2623 |
-
|
2624 |
-
var checkOverflow$1 = { checkOverflow };
|
2625 |
-
|
2626 |
-
var defaults = {
|
2627 |
-
init: true,
|
2628 |
-
direction: 'horizontal',
|
2629 |
-
touchEventsTarget: 'container',
|
2630 |
-
initialSlide: 0,
|
2631 |
-
speed: 300,
|
2632 |
-
//
|
2633 |
-
preventInteractionOnTransition: false,
|
2634 |
-
|
2635 |
-
// To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).
|
2636 |
-
edgeSwipeDetection: false,
|
2637 |
-
edgeSwipeThreshold: 20,
|
2638 |
-
|
2639 |
-
// Free mode
|
2640 |
-
freeMode: false,
|
2641 |
-
freeModeMomentum: true,
|
2642 |
-
freeModeMomentumRatio: 1,
|
2643 |
-
freeModeMomentumBounce: true,
|
2644 |
-
freeModeMomentumBounceRatio: 1,
|
2645 |
-
freeModeMomentumVelocityRatio: 1,
|
2646 |
-
freeModeSticky: false,
|
2647 |
-
freeModeMinimumVelocity: 0.02,
|
2648 |
-
|
2649 |
-
// Autoheight
|
2650 |
-
autoHeight: false,
|
2651 |
-
|
2652 |
-
// Set wrapper width
|
2653 |
-
setWrapperSize: false,
|
2654 |
-
|
2655 |
-
// Virtual Translate
|
2656 |
-
virtualTranslate: false,
|
2657 |
-
|
2658 |
-
// Effects
|
2659 |
-
effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
|
2660 |
-
|
2661 |
-
// Breakpoints
|
2662 |
-
breakpoints: undefined,
|
2663 |
-
breakpointsInverse: false,
|
2664 |
-
|
2665 |
-
// Slides grid
|
2666 |
-
spaceBetween: 0,
|
2667 |
-
slidesPerView: 1,
|
2668 |
-
slidesPerColumn: 1,
|
2669 |
-
slidesPerColumnFill: 'column',
|
2670 |
-
slidesPerGroup: 1,
|
2671 |
-
centeredSlides: false,
|
2672 |
-
slidesOffsetBefore: 0, // in px
|
2673 |
-
slidesOffsetAfter: 0, // in px
|
2674 |
-
normalizeSlideIndex: true,
|
2675 |
-
centerInsufficientSlides: false,
|
2676 |
-
|
2677 |
-
// Disable swiper and hide navigation when container not overflow
|
2678 |
-
watchOverflow: false,
|
2679 |
-
|
2680 |
-
// Round length
|
2681 |
-
roundLengths: false,
|
2682 |
-
|
2683 |
-
// Touches
|
2684 |
-
touchRatio: 1,
|
2685 |
-
touchAngle: 45,
|
2686 |
-
simulateTouch: true,
|
2687 |
-
shortSwipes: true,
|
2688 |
-
longSwipes: true,
|
2689 |
-
longSwipesRatio: 0.5,
|
2690 |
-
longSwipesMs: 300,
|
2691 |
-
followFinger: true,
|
2692 |
-
allowTouchMove: true,
|
2693 |
-
threshold: 0,
|
2694 |
-
touchMoveStopPropagation: true,
|
2695 |
-
touchStartPreventDefault: true,
|
2696 |
-
touchStartForcePreventDefault: false,
|
2697 |
-
touchReleaseOnEdges: false,
|
2698 |
-
|
2699 |
-
// Unique Navigation Elements
|
2700 |
-
uniqueNavElements: true,
|
2701 |
-
|
2702 |
-
// Resistance
|
2703 |
-
resistance: true,
|
2704 |
-
resistanceRatio: 0.85,
|
2705 |
-
|
2706 |
-
// Progress
|
2707 |
-
watchSlidesProgress: false,
|
2708 |
-
watchSlidesVisibility: false,
|
2709 |
-
|
2710 |
-
// Cursor
|
2711 |
-
grabCursor: false,
|
2712 |
-
|
2713 |
-
// Clicks
|
2714 |
-
preventClicks: true,
|
2715 |
-
preventClicksPropagation: true,
|
2716 |
-
slideToClickedSlide: false,
|
2717 |
-
|
2718 |
-
// Images
|
2719 |
-
preloadImages: true,
|
2720 |
-
updateOnImagesReady: true,
|
2721 |
-
|
2722 |
-
// loop
|
2723 |
-
loop: false,
|
2724 |
-
loopAdditionalSlides: 0,
|
2725 |
-
loopedSlides: null,
|
2726 |
-
loopFillGroupWithBlank: false,
|
2727 |
-
|
2728 |
-
// Swiping/no swiping
|
2729 |
-
allowSlidePrev: true,
|
2730 |
-
allowSlideNext: true,
|
2731 |
-
swipeHandler: null, // '.swipe-handler',
|
2732 |
-
noSwiping: true,
|
2733 |
-
noSwipingClass: 'swiper-no-swiping',
|
2734 |
-
noSwipingSelector: null,
|
2735 |
-
|
2736 |
-
// Passive Listeners
|
2737 |
-
passiveListeners: true,
|
2738 |
-
|
2739 |
-
// NS
|
2740 |
-
containerModifierClass: 'swiper-container-', // NEW
|
2741 |
-
slideClass: 'swiper-slide',
|
2742 |
-
slideBlankClass: 'swiper-slide-invisible-blank',
|
2743 |
-
slideActiveClass: 'swiper-slide-active',
|
2744 |
-
slideDuplicateActiveClass: 'swiper-slide-duplicate-active',
|
2745 |
-
slideVisibleClass: 'swiper-slide-visible',
|
2746 |
-
slideDuplicateClass: 'swiper-slide-duplicate',
|
2747 |
-
slideNextClass: 'swiper-slide-next',
|
2748 |
-
slideDuplicateNextClass: 'swiper-slide-duplicate-next',
|
2749 |
-
slidePrevClass: 'swiper-slide-prev',
|
2750 |
-
slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',
|
2751 |
-
wrapperClass: 'swiper-wrapper',
|
2752 |
-
|
2753 |
-
// Callbacks
|
2754 |
-
runCallbacksOnInit: true,
|
2755 |
-
};
|
2756 |
-
|
2757 |
-
const prototypes = {
|
2758 |
-
update,
|
2759 |
-
translate,
|
2760 |
-
transition: transition$1,
|
2761 |
-
slide,
|
2762 |
-
loop,
|
2763 |
-
grabCursor,
|
2764 |
-
manipulation,
|
2765 |
-
events,
|
2766 |
-
breakpoints,
|
2767 |
-
checkOverflow: checkOverflow$1,
|
2768 |
-
classes,
|
2769 |
-
images,
|
2770 |
-
};
|
2771 |
-
|
2772 |
-
const extendedDefaults = {};
|
2773 |
-
|
2774 |
-
class Swiper extends SwiperClass {
|
2775 |
-
constructor(...args) {
|
2776 |
-
let el;
|
2777 |
-
let params;
|
2778 |
-
if (args.length === 1 && args[0].constructor && args[0].constructor === Object) {
|
2779 |
-
params = args[0];
|
2780 |
-
} else {
|
2781 |
-
[el, params] = args;
|
2782 |
-
}
|
2783 |
-
if (!params) params = {};
|
2784 |
-
|
2785 |
-
params = Utils.extend({}, params);
|
2786 |
-
if (el && !params.el) params.el = el;
|
2787 |
-
|
2788 |
-
super(params);
|
2789 |
-
|
2790 |
-
Object.keys(prototypes).forEach((prototypeGroup) => {
|
2791 |
-
Object.keys(prototypes[prototypeGroup]).forEach((protoMethod) => {
|
2792 |
-
if (!Swiper.prototype[protoMethod]) {
|
2793 |
-
Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];
|
2794 |
-
}
|
2795 |
-
});
|
2796 |
-
});
|
2797 |
-
|
2798 |
-
// Swiper Instance
|
2799 |
-
const swiper = this;
|
2800 |
-
if (typeof swiper.modules === 'undefined') {
|
2801 |
-
swiper.modules = {};
|
2802 |
-
}
|
2803 |
-
Object.keys(swiper.modules).forEach((moduleName) => {
|
2804 |
-
const module = swiper.modules[moduleName];
|
2805 |
-
if (module.params) {
|
2806 |
-
const moduleParamName = Object.keys(module.params)[0];
|
2807 |
-
const moduleParams = module.params[moduleParamName];
|
2808 |
-
if (typeof moduleParams !== 'object' || moduleParams === null) return;
|
2809 |
-
if (!(moduleParamName in params && 'enabled' in moduleParams)) return;
|
2810 |
-
if (params[moduleParamName] === true) {
|
2811 |
-
params[moduleParamName] = { enabled: true };
|
2812 |
-
}
|
2813 |
-
if (
|
2814 |
-
typeof params[moduleParamName] === 'object'
|
2815 |
-
&& !('enabled' in params[moduleParamName])
|
2816 |
-
) {
|
2817 |
-
params[moduleParamName].enabled = true;
|
2818 |
-
}
|
2819 |
-
if (!params[moduleParamName]) params[moduleParamName] = { enabled: false };
|
2820 |
-
}
|
2821 |
-
});
|
2822 |
-
|
2823 |
-
// Extend defaults with modules params
|
2824 |
-
const swiperParams = Utils.extend({}, defaults);
|
2825 |
-
swiper.useModulesParams(swiperParams);
|
2826 |
-
|
2827 |
-
// Extend defaults with passed params
|
2828 |
-
swiper.params = Utils.extend({}, swiperParams, extendedDefaults, params);
|
2829 |
-
swiper.originalParams = Utils.extend({}, swiper.params);
|
2830 |
-
swiper.passedParams = Utils.extend({}, params);
|
2831 |
-
|
2832 |
-
// Save Dom lib
|
2833 |
-
swiper.$ = $;
|
2834 |
-
|
2835 |
-
// Find el
|
2836 |
-
const $el = $(swiper.params.el);
|
2837 |
-
el = $el[0];
|
2838 |
-
|
2839 |
-
if (!el) {
|
2840 |
-
return undefined;
|
2841 |
-
}
|
2842 |
-
|
2843 |
-
if ($el.length > 1) {
|
2844 |
-
const swipers = [];
|
2845 |
-
$el.each((index$$1, containerEl) => {
|
2846 |
-
const newParams = Utils.extend({}, params, { el: containerEl });
|
2847 |
-
swipers.push(new Swiper(newParams));
|
2848 |
-
});
|
2849 |
-
return swipers;
|
2850 |
-
}
|
2851 |
-
|
2852 |
-
el.swiper = swiper;
|
2853 |
-
$el.data('swiper', swiper);
|
2854 |
-
|
2855 |
-
// Find Wrapper
|
2856 |
-
const $wrapperEl = $el.children(`.${swiper.params.wrapperClass}`);
|
2857 |
-
|
2858 |
-
// Extend Swiper
|
2859 |
-
Utils.extend(swiper, {
|
2860 |
-
$el,
|
2861 |
-
el,
|
2862 |
-
$wrapperEl,
|
2863 |
-
wrapperEl: $wrapperEl[0],
|
2864 |
-
|
2865 |
-
// Classes
|
2866 |
-
classNames: [],
|
2867 |
-
|
2868 |
-
// Slides
|
2869 |
-
slides: $(),
|
2870 |
-
slidesGrid: [],
|
2871 |
-
snapGrid: [],
|
2872 |
-
slidesSizesGrid: [],
|
2873 |
-
|
2874 |
-
// isDirection
|
2875 |
-
isHorizontal() {
|
2876 |
-
return swiper.params.direction === 'horizontal';
|
2877 |
-
},
|
2878 |
-
isVertical() {
|
2879 |
-
return swiper.params.direction === 'vertical';
|
2880 |
-
},
|
2881 |
-
// RTL
|
2882 |
-
rtl: (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),
|
2883 |
-
rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),
|
2884 |
-
wrongRTL: $wrapperEl.css('display') === '-webkit-box',
|
2885 |
-
|
2886 |
-
// Indexes
|
2887 |
-
activeIndex: 0,
|
2888 |
-
realIndex: 0,
|
2889 |
-
|
2890 |
-
//
|
2891 |
-
isBeginning: true,
|
2892 |
-
isEnd: false,
|
2893 |
-
|
2894 |
-
// Props
|
2895 |
-
translate: 0,
|
2896 |
-
previousTranslate: 0,
|
2897 |
-
progress: 0,
|
2898 |
-
velocity: 0,
|
2899 |
-
animating: false,
|
2900 |
-
|
2901 |
-
// Locks
|
2902 |
-
allowSlideNext: swiper.params.allowSlideNext,
|
2903 |
-
allowSlidePrev: swiper.params.allowSlidePrev,
|
2904 |
-
|
2905 |
-
// Touch Events
|
2906 |
-
touchEvents: (function touchEvents() {
|
2907 |
-
const touch = ['touchstart', 'touchmove', 'touchend'];
|
2908 |
-
let desktop = ['mousedown', 'mousemove', 'mouseup'];
|
2909 |
-
if (Support.pointerEvents) {
|
2910 |
-
desktop = ['pointerdown', 'pointermove', 'pointerup'];
|
2911 |
-
} else if (Support.prefixedPointerEvents) {
|
2912 |
-
desktop = ['MSPointerDown', 'MSPointerMove', 'MSPointerUp'];
|
2913 |
-
}
|
2914 |
-
swiper.touchEventsTouch = {
|
2915 |
-
start: touch[0],
|
2916 |
-
move: touch[1],
|
2917 |
-
end: touch[2],
|
2918 |
-
};
|
2919 |
-
swiper.touchEventsDesktop = {
|
2920 |
-
start: desktop[0],
|
2921 |
-
move: desktop[1],
|
2922 |
-
end: desktop[2],
|
2923 |
-
};
|
2924 |
-
return Support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop;
|
2925 |
-
}()),
|
2926 |
-
touchEventsData: {
|
2927 |
-
isTouched: undefined,
|
2928 |
-
isMoved: undefined,
|
2929 |
-
allowTouchCallbacks: undefined,
|
2930 |
-
touchStartTime: undefined,
|
2931 |
-
isScrolling: undefined,
|
2932 |
-
currentTranslate: undefined,
|
2933 |
-
startTranslate: undefined,
|
2934 |
-
allowThresholdMove: undefined,
|
2935 |
-
// Form elements to match
|
2936 |
-
formElements: 'input, select, option, textarea, button, video',
|
2937 |
-
// Last click time
|
2938 |
-
lastClickTime: Utils.now(),
|
2939 |
-
clickTimeout: undefined,
|
2940 |
-
// Velocities
|
2941 |
-
velocities: [],
|
2942 |
-
allowMomentumBounce: undefined,
|
2943 |
-
isTouchEvent: undefined,
|
2944 |
-
startMoving: undefined,
|
2945 |
-
},
|
2946 |
-
|
2947 |
-
// Clicks
|
2948 |
-
allowClick: true,
|
2949 |
-
|
2950 |
-
// Touches
|
2951 |
-
allowTouchMove: swiper.params.allowTouchMove,
|
2952 |
-
|
2953 |
-
touches: {
|
2954 |
-
startX: 0,
|
2955 |
-
startY: 0,
|
2956 |
-
currentX: 0,
|
2957 |
-
currentY: 0,
|
2958 |
-
diff: 0,
|
2959 |
-
},
|
2960 |
-
|
2961 |
-
// Images
|
2962 |
-
imagesToLoad: [],
|
2963 |
-
imagesLoaded: 0,
|
2964 |
-
|
2965 |
-
});
|
2966 |
-
|
2967 |
-
// Install Modules
|
2968 |
-
swiper.useModules();
|
2969 |
-
|
2970 |
-
// Init
|
2971 |
-
if (swiper.params.init) {
|
2972 |
-
swiper.init();
|
2973 |
-
}
|
2974 |
-
|
2975 |
-
// Return app instance
|
2976 |
-
return swiper;
|
2977 |
-
}
|
2978 |
-
|
2979 |
-
slidesPerViewDynamic() {
|
2980 |
-
const swiper = this;
|
2981 |
-
const {
|
2982 |
-
params, slides, slidesGrid, size: swiperSize, activeIndex,
|
2983 |
-
} = swiper;
|
2984 |
-
let spv = 1;
|
2985 |
-
if (params.centeredSlides) {
|
2986 |
-
let slideSize = slides[activeIndex].swiperSlideSize;
|
2987 |
-
let breakLoop;
|
2988 |
-
for (let i = activeIndex + 1; i < slides.length; i += 1) {
|
2989 |
-
if (slides[i] && !breakLoop) {
|
2990 |
-
slideSize += slides[i].swiperSlideSize;
|
2991 |
-
spv += 1;
|
2992 |
-
if (slideSize > swiperSize) breakLoop = true;
|
2993 |
-
}
|
2994 |
-
}
|
2995 |
-
for (let i = activeIndex - 1; i >= 0; i -= 1) {
|
2996 |
-
if (slides[i] && !breakLoop) {
|
2997 |
-
slideSize += slides[i].swiperSlideSize;
|
2998 |
-
spv += 1;
|
2999 |
-
if (slideSize > swiperSize) breakLoop = true;
|
3000 |
-
}
|
3001 |
-
}
|
3002 |
-
} else {
|
3003 |
-
for (let i = activeIndex + 1; i < slides.length; i += 1) {
|
3004 |
-
if (slidesGrid[i] - slidesGrid[activeIndex] < swiperSize) {
|
3005 |
-
spv += 1;
|
3006 |
-
}
|
3007 |
-
}
|
3008 |
-
}
|
3009 |
-
return spv;
|
3010 |
-
}
|
3011 |
-
|
3012 |
-
update() {
|
3013 |
-
const swiper = this;
|
3014 |
-
if (!swiper || swiper.destroyed) return;
|
3015 |
-
const { snapGrid, params } = swiper;
|
3016 |
-
// Breakpoints
|
3017 |
-
if (params.breakpoints) {
|
3018 |
-
swiper.setBreakpoint();
|
3019 |
-
}
|
3020 |
-
swiper.updateSize();
|
3021 |
-
swiper.updateSlides();
|
3022 |
-
swiper.updateProgress();
|
3023 |
-
swiper.updateSlidesClasses();
|
3024 |
-
|
3025 |
-
function setTranslate() {
|
3026 |
-
const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;
|
3027 |
-
const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());
|
3028 |
-
swiper.setTranslate(newTranslate);
|
3029 |
-
swiper.updateActiveIndex();
|
3030 |
-
swiper.updateSlidesClasses();
|
3031 |
-
}
|
3032 |
-
let translated;
|
3033 |
-
if (swiper.params.freeMode) {
|
3034 |
-
setTranslate();
|
3035 |
-
if (swiper.params.autoHeight) {
|
3036 |
-
swiper.updateAutoHeight();
|
3037 |
-
}
|
3038 |
-
} else {
|
3039 |
-
if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
|
3040 |
-
translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true);
|
3041 |
-
} else {
|
3042 |
-
translated = swiper.slideTo(swiper.activeIndex, 0, false, true);
|
3043 |
-
}
|
3044 |
-
if (!translated) {
|
3045 |
-
setTranslate();
|
3046 |
-
}
|
3047 |
-
}
|
3048 |
-
if (params.watchOverflow && snapGrid !== swiper.snapGrid) {
|
3049 |
-
swiper.checkOverflow();
|
3050 |
-
}
|
3051 |
-
swiper.emit('update');
|
3052 |
-
}
|
3053 |
-
|
3054 |
-
init() {
|
3055 |
-
const swiper = this;
|
3056 |
-
if (swiper.initialized) return;
|
3057 |
-
|
3058 |
-
swiper.emit('beforeInit');
|
3059 |
-
|
3060 |
-
// Set breakpoint
|
3061 |
-
if (swiper.params.breakpoints) {
|
3062 |
-
swiper.setBreakpoint();
|
3063 |
-
}
|
3064 |
-
|
3065 |
-
// Add Classes
|
3066 |
-
swiper.addClasses();
|
3067 |
-
|
3068 |
-
// Create loop
|
3069 |
-
if (swiper.params.loop) {
|
3070 |
-
swiper.loopCreate();
|
3071 |
-
}
|
3072 |
-
|
3073 |
-
// Update size
|
3074 |
-
swiper.updateSize();
|
3075 |
-
|
3076 |
-
// Update slides
|
3077 |
-
swiper.updateSlides();
|
3078 |
-
|
3079 |
-
if (swiper.params.watchOverflow) {
|
3080 |
-
swiper.checkOverflow();
|
3081 |
-
}
|
3082 |
-
|
3083 |
-
// Set Grab Cursor
|
3084 |
-
if (swiper.params.grabCursor) {
|
3085 |
-
swiper.setGrabCursor();
|
3086 |
-
}
|
3087 |
-
|
3088 |
-
if (swiper.params.preloadImages) {
|
3089 |
-
swiper.preloadImages();
|
3090 |
-
}
|
3091 |
-
|
3092 |
-
// Slide To Initial Slide
|
3093 |
-
if (swiper.params.loop) {
|
3094 |
-
swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit);
|
3095 |
-
} else {
|
3096 |
-
swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit);
|
3097 |
-
}
|
3098 |
-
|
3099 |
-
// Attach events
|
3100 |
-
swiper.attachEvents();
|
3101 |
-
|
3102 |
-
// Init Flag
|
3103 |
-
swiper.initialized = true;
|
3104 |
-
|
3105 |
-
// Emit
|
3106 |
-
swiper.emit('init');
|
3107 |
-
}
|
3108 |
-
|
3109 |
-
destroy(deleteInstance = true, cleanStyles = true) {
|
3110 |
-
const swiper = this;
|
3111 |
-
const {
|
3112 |
-
params, $el, $wrapperEl, slides,
|
3113 |
-
} = swiper;
|
3114 |
-
|
3115 |
-
if (typeof swiper.params === 'undefined' || swiper.destroyed) {
|
3116 |
-
return null;
|
3117 |
-
}
|
3118 |
-
|
3119 |
-
swiper.emit('beforeDestroy');
|
3120 |
-
|
3121 |
-
// Init Flag
|
3122 |
-
swiper.initialized = false;
|
3123 |
-
|
3124 |
-
// Detach events
|
3125 |
-
swiper.detachEvents();
|
3126 |
-
|
3127 |
-
// Destroy loop
|
3128 |
-
if (params.loop) {
|
3129 |
-
swiper.loopDestroy();
|
3130 |
-
}
|
3131 |
-
|
3132 |
-
// Cleanup styles
|
3133 |
-
if (cleanStyles) {
|
3134 |
-
swiper.removeClasses();
|
3135 |
-
$el.removeAttr('style');
|
3136 |
-
$wrapperEl.removeAttr('style');
|
3137 |
-
if (slides && slides.length) {
|
3138 |
-
slides
|
3139 |
-
.removeClass([
|
3140 |
-
params.slideVisibleClass,
|
3141 |
-
params.slideActiveClass,
|
3142 |
-
params.slideNextClass,
|
3143 |
-
params.slidePrevClass,
|
3144 |
-
].join(' '))
|
3145 |
-
.removeAttr('style')
|
3146 |
-
.removeAttr('data-swiper-slide-index')
|
3147 |
-
.removeAttr('data-swiper-column')
|
3148 |
-
.removeAttr('data-swiper-row');
|
3149 |
-
}
|
3150 |
-
}
|
3151 |
-
|
3152 |
-
swiper.emit('destroy');
|
3153 |
-
|
3154 |
-
// Detach emitter events
|
3155 |
-
Object.keys(swiper.eventsListeners).forEach((eventName) => {
|
3156 |
-
swiper.off(eventName);
|
3157 |
-
});
|
3158 |
-
|
3159 |
-
if (deleteInstance !== false) {
|
3160 |
-
swiper.$el[0].swiper = null;
|
3161 |
-
swiper.$el.data('swiper', null);
|
3162 |
-
Utils.deleteProps(swiper);
|
3163 |
-
}
|
3164 |
-
swiper.destroyed = true;
|
3165 |
-
|
3166 |
-
return null;
|
3167 |
-
}
|
3168 |
-
|
3169 |
-
static extendDefaults(newDefaults) {
|
3170 |
-
Utils.extend(extendedDefaults, newDefaults);
|
3171 |
-
}
|
3172 |
-
|
3173 |
-
static get extendedDefaults() {
|
3174 |
-
return extendedDefaults;
|
3175 |
-
}
|
3176 |
-
|
3177 |
-
static get defaults() {
|
3178 |
-
return defaults;
|
3179 |
-
}
|
3180 |
-
|
3181 |
-
static get Class() {
|
3182 |
-
return SwiperClass;
|
3183 |
-
}
|
3184 |
-
|
3185 |
-
static get $() {
|
3186 |
-
return $;
|
3187 |
-
}
|
3188 |
-
}
|
3189 |
-
|
3190 |
-
var Device$1 = {
|
3191 |
-
name: 'device',
|
3192 |
-
proto: {
|
3193 |
-
device: Device,
|
3194 |
-
},
|
3195 |
-
static: {
|
3196 |
-
device: Device,
|
3197 |
-
},
|
3198 |
-
};
|
3199 |
-
|
3200 |
-
var Support$1 = {
|
3201 |
-
name: 'support',
|
3202 |
-
proto: {
|
3203 |
-
support: Support,
|
3204 |
-
},
|
3205 |
-
static: {
|
3206 |
-
support: Support,
|
3207 |
-
},
|
3208 |
-
};
|
3209 |
-
|
3210 |
-
var Browser$1 = {
|
3211 |
-
name: 'browser',
|
3212 |
-
proto: {
|
3213 |
-
browser: Browser,
|
3214 |
-
},
|
3215 |
-
static: {
|
3216 |
-
browser: Browser,
|
3217 |
-
},
|
3218 |
-
};
|
3219 |
-
|
3220 |
-
var Resize = {
|
3221 |
-
name: 'resize',
|
3222 |
-
create() {
|
3223 |
-
const swiper = this;
|
3224 |
-
Utils.extend(swiper, {
|
3225 |
-
resize: {
|
3226 |
-
resizeHandler() {
|
3227 |
-
if (!swiper || swiper.destroyed || !swiper.initialized) return;
|
3228 |
-
swiper.emit('beforeResize');
|
3229 |
-
swiper.emit('resize');
|
3230 |
-
},
|
3231 |
-
orientationChangeHandler() {
|
3232 |
-
if (!swiper || swiper.destroyed || !swiper.initialized) return;
|
3233 |
-
swiper.emit('orientationchange');
|
3234 |
-
},
|
3235 |
-
},
|
3236 |
-
});
|
3237 |
-
},
|
3238 |
-
on: {
|
3239 |
-
init() {
|
3240 |
-
const swiper = this;
|
3241 |
-
// Emit resize
|
3242 |
-
window.addEventListener('resize', swiper.resize.resizeHandler);
|
3243 |
-
|
3244 |
-
// Emit orientationchange
|
3245 |
-
window.addEventListener('orientationchange', swiper.resize.orientationChangeHandler);
|
3246 |
-
},
|
3247 |
-
destroy() {
|
3248 |
-
const swiper = this;
|
3249 |
-
window.removeEventListener('resize', swiper.resize.resizeHandler);
|
3250 |
-
window.removeEventListener('orientationchange', swiper.resize.orientationChangeHandler);
|
3251 |
-
},
|
3252 |
-
},
|
3253 |
-
};
|
3254 |
-
|
3255 |
-
const Observer = {
|
3256 |
-
func: window.MutationObserver || window.WebkitMutationObserver,
|
3257 |
-
attach(target, options = {}) {
|
3258 |
-
const swiper = this;
|
3259 |
-
|
3260 |
-
const ObserverFunc = Observer.func;
|
3261 |
-
const observer = new ObserverFunc((mutations) => {
|
3262 |
-
// The observerUpdate event should only be triggered
|
3263 |
-
// once despite the number of mutations. Additional
|
3264 |
-
// triggers are redundant and are very costly
|
3265 |
-
if (mutations.length === 1) {
|
3266 |
-
swiper.emit('observerUpdate', mutations[0]);
|
3267 |
-
return;
|
3268 |
-
}
|
3269 |
-
const observerUpdate = function observerUpdate() {
|
3270 |
-
swiper.emit('observerUpdate', mutations[0]);
|
3271 |
-
};
|
3272 |
-
|
3273 |
-
if (window.requestAnimationFrame) {
|
3274 |
-
window.requestAnimationFrame(observerUpdate);
|
3275 |
-
} else {
|
3276 |
-
window.setTimeout(observerUpdate, 0);
|
3277 |
-
}
|
3278 |
-
});
|
3279 |
-
|
3280 |
-
observer.observe(target, {
|
3281 |
-
attributes: typeof options.attributes === 'undefined' ? true : options.attributes,
|
3282 |
-
childList: typeof options.childList === 'undefined' ? true : options.childList,
|
3283 |
-
characterData: typeof options.characterData === 'undefined' ? true : options.characterData,
|
3284 |
-
});
|
3285 |
-
|
3286 |
-
swiper.observer.observers.push(observer);
|
3287 |
-
},
|
3288 |
-
init() {
|
3289 |
-
const swiper = this;
|
3290 |
-
if (!Support.observer || !swiper.params.observer) return;
|
3291 |
-
if (swiper.params.observeParents) {
|
3292 |
-
const containerParents = swiper.$el.parents();
|
3293 |
-
for (let i = 0; i < containerParents.length; i += 1) {
|
3294 |
-
swiper.observer.attach(containerParents[i]);
|
3295 |
-
}
|
3296 |
-
}
|
3297 |
-
// Observe container
|
3298 |
-
swiper.observer.attach(swiper.$el[0], { childList: swiper.params.observeSlideChildren });
|
3299 |
-
|
3300 |
-
// Observe wrapper
|
3301 |
-
swiper.observer.attach(swiper.$wrapperEl[0], { attributes: false });
|
3302 |
-
},
|
3303 |
-
destroy() {
|
3304 |
-
const swiper = this;
|
3305 |
-
swiper.observer.observers.forEach((observer) => {
|
3306 |
-
observer.disconnect();
|
3307 |
-
});
|
3308 |
-
swiper.observer.observers = [];
|
3309 |
-
},
|
3310 |
-
};
|
3311 |
-
|
3312 |
-
var Observer$1 = {
|
3313 |
-
name: 'observer',
|
3314 |
-
params: {
|
3315 |
-
observer: false,
|
3316 |
-
observeParents: false,
|
3317 |
-
observeSlideChildren: false,
|
3318 |
-
},
|
3319 |
-
create() {
|
3320 |
-
const swiper = this;
|
3321 |
-
Utils.extend(swiper, {
|
3322 |
-
observer: {
|
3323 |
-
init: Observer.init.bind(swiper),
|
3324 |
-
attach: Observer.attach.bind(swiper),
|
3325 |
-
destroy: Observer.destroy.bind(swiper),
|
3326 |
-
observers: [],
|
3327 |
-
},
|
3328 |
-
});
|
3329 |
-
},
|
3330 |
-
on: {
|
3331 |
-
init() {
|
3332 |
-
const swiper = this;
|
3333 |
-
swiper.observer.init();
|
3334 |
-
},
|
3335 |
-
destroy() {
|
3336 |
-
const swiper = this;
|
3337 |
-
swiper.observer.destroy();
|
3338 |
-
},
|
3339 |
-
},
|
3340 |
-
};
|
3341 |
-
|
3342 |
-
const Virtual = {
|
3343 |
-
update(force) {
|
3344 |
-
const swiper = this;
|
3345 |
-
const { slidesPerView, slidesPerGroup, centeredSlides } = swiper.params;
|
3346 |
-
const { addSlidesBefore, addSlidesAfter } = swiper.params.virtual;
|
3347 |
-
const {
|
3348 |
-
from: previousFrom,
|
3349 |
-
to: previousTo,
|
3350 |
-
slides,
|
3351 |
-
slidesGrid: previousSlidesGrid,
|
3352 |
-
renderSlide,
|
3353 |
-
offset: previousOffset,
|
3354 |
-
} = swiper.virtual;
|
3355 |
-
swiper.updateActiveIndex();
|
3356 |
-
const activeIndex = swiper.activeIndex || 0;
|
3357 |
-
|
3358 |
-
let offsetProp;
|
3359 |
-
if (swiper.rtlTranslate) offsetProp = 'right';
|
3360 |
-
else offsetProp = swiper.isHorizontal() ? 'left' : 'top';
|
3361 |
-
|
3362 |
-
let slidesAfter;
|
3363 |
-
let slidesBefore;
|
3364 |
-
if (centeredSlides) {
|
3365 |
-
slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore;
|
3366 |
-
slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter;
|
3367 |
-
} else {
|
3368 |
-
slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesBefore;
|
3369 |
-
slidesBefore = slidesPerGroup + addSlidesAfter;
|
3370 |
-
}
|
3371 |
-
const from = Math.max((activeIndex || 0) - slidesBefore, 0);
|
3372 |
-
const to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1);
|
3373 |
-
const offset$$1 = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0);
|
3374 |
-
|
3375 |
-
Utils.extend(swiper.virtual, {
|
3376 |
-
from,
|
3377 |
-
to,
|
3378 |
-
offset: offset$$1,
|
3379 |
-
slidesGrid: swiper.slidesGrid,
|
3380 |
-
});
|
3381 |
-
|
3382 |
-
function onRendered() {
|
3383 |
-
swiper.updateSlides();
|
3384 |
-
swiper.updateProgress();
|
3385 |
-
swiper.updateSlidesClasses();
|
3386 |
-
if (swiper.lazy && swiper.params.lazy.enabled) {
|
3387 |
-
swiper.lazy.load();
|
3388 |
-
}
|
3389 |
-
}
|
3390 |
-
|
3391 |
-
if (previousFrom === from && previousTo === to && !force) {
|
3392 |
-
if (swiper.slidesGrid !== previousSlidesGrid && offset$$1 !== previousOffset) {
|
3393 |
-
swiper.slides.css(offsetProp, `${offset$$1}px`);
|
3394 |
-
}
|
3395 |
-
swiper.updateProgress();
|
3396 |
-
return;
|
3397 |
-
}
|
3398 |
-
if (swiper.params.virtual.renderExternal) {
|
3399 |
-
swiper.params.virtual.renderExternal.call(swiper, {
|
3400 |
-
offset: offset$$1,
|
3401 |
-
from,
|
3402 |
-
to,
|
3403 |
-
slides: (function getSlides() {
|
3404 |
-
const slidesToRender = [];
|
3405 |
-
for (let i = from; i <= to; i += 1) {
|
3406 |
-
slidesToRender.push(slides[i]);
|
3407 |
-
}
|
3408 |
-
return slidesToRender;
|
3409 |
-
}()),
|
3410 |
-
});
|
3411 |
-
onRendered();
|
3412 |
-
return;
|
3413 |
-
}
|
3414 |
-
const prependIndexes = [];
|
3415 |
-
const appendIndexes = [];
|
3416 |
-
if (force) {
|
3417 |
-
swiper.$wrapperEl.find(`.${swiper.params.slideClass}`).remove();
|
3418 |
-
} else {
|
3419 |
-
for (let i = previousFrom; i <= previousTo; i += 1) {
|
3420 |
-
if (i < from || i > to) {
|
3421 |
-
swiper.$wrapperEl.find(`.${swiper.params.slideClass}[data-swiper-slide-index="${i}"]`).remove();
|
3422 |
-
}
|
3423 |
-
}
|
3424 |
-
}
|
3425 |
-
for (let i = 0; i < slides.length; i += 1) {
|
3426 |
-
if (i >= from && i <= to) {
|
3427 |
-
if (typeof previousTo === 'undefined' || force) {
|
3428 |
-
appendIndexes.push(i);
|
3429 |
-
} else {
|
3430 |
-
if (i > previousTo) appendIndexes.push(i);
|
3431 |
-
if (i < previousFrom) prependIndexes.push(i);
|
3432 |
-
}
|
3433 |
-
}
|
3434 |
-
}
|
3435 |
-
appendIndexes.forEach((index$$1) => {
|
3436 |
-
swiper.$wrapperEl.append(renderSlide(slides[index$$1], index$$1));
|
3437 |
-
});
|
3438 |
-
prependIndexes.sort((a, b) => b - a).forEach((index$$1) => {
|
3439 |
-
swiper.$wrapperEl.prepend(renderSlide(slides[index$$1], index$$1));
|
3440 |
-
});
|
3441 |
-
swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, `${offset$$1}px`);
|
3442 |
-
onRendered();
|
3443 |
-
},
|
3444 |
-
renderSlide(slide, index$$1) {
|
3445 |
-
const swiper = this;
|
3446 |
-
const params = swiper.params.virtual;
|
3447 |
-
if (params.cache && swiper.virtual.cache[index$$1]) {
|
3448 |
-
return swiper.virtual.cache[index$$1];
|
3449 |
-
}
|
3450 |
-
const $slideEl = params.renderSlide
|
3451 |
-
? $(params.renderSlide.call(swiper, slide, index$$1))
|
3452 |
-
: $(`<div class="${swiper.params.slideClass}" data-swiper-slide-index="${index$$1}">${slide}</div>`);
|
3453 |
-
if (!$slideEl.attr('data-swiper-slide-index')) $slideEl.attr('data-swiper-slide-index', index$$1);
|
3454 |
-
if (params.cache) swiper.virtual.cache[index$$1] = $slideEl;
|
3455 |
-
return $slideEl;
|
3456 |
-
},
|
3457 |
-
appendSlide(slide) {
|
3458 |
-
const swiper = this;
|
3459 |
-
swiper.virtual.slides.push(slide);
|
3460 |
-
swiper.virtual.update(true);
|
3461 |
-
},
|
3462 |
-
prependSlide(slide) {
|
3463 |
-
const swiper = this;
|
3464 |
-
swiper.virtual.slides.unshift(slide);
|
3465 |
-
if (swiper.params.virtual.cache) {
|
3466 |
-
const cache = swiper.virtual.cache;
|
3467 |
-
const newCache = {};
|
3468 |
-
Object.keys(cache).forEach((cachedIndex) => {
|
3469 |
-
newCache[cachedIndex + 1] = cache[cachedIndex];
|
3470 |
-
});
|
3471 |
-
swiper.virtual.cache = newCache;
|
3472 |
-
}
|
3473 |
-
swiper.virtual.update(true);
|
3474 |
-
swiper.slideNext(0);
|
3475 |
-
},
|
3476 |
-
};
|
3477 |
-
|
3478 |
-
var virtual = {
|
3479 |
-
name: 'virtual',
|
3480 |
-
params: {
|
3481 |
-
virtual: {
|
3482 |
-
enabled: false,
|
3483 |
-
slides: [],
|
3484 |
-
cache: true,
|
3485 |
-
renderSlide: null,
|
3486 |
-
renderExternal: null,
|
3487 |
-
addSlidesBefore: 0,
|
3488 |
-
addSlidesAfter: 0,
|
3489 |
-
},
|
3490 |
-
},
|
3491 |
-
create() {
|
3492 |
-
const swiper = this;
|
3493 |
-
Utils.extend(swiper, {
|
3494 |
-
virtual: {
|
3495 |
-
update: Virtual.update.bind(swiper),
|
3496 |
-
appendSlide: Virtual.appendSlide.bind(swiper),
|
3497 |
-
prependSlide: Virtual.prependSlide.bind(swiper),
|
3498 |
-
renderSlide: Virtual.renderSlide.bind(swiper),
|
3499 |
-
slides: swiper.params.virtual.slides,
|
3500 |
-
cache: {},
|
3501 |
-
},
|
3502 |
-
});
|
3503 |
-
},
|
3504 |
-
on: {
|
3505 |
-
beforeInit() {
|
3506 |
-
const swiper = this;
|
3507 |
-
if (!swiper.params.virtual.enabled) return;
|
3508 |
-
swiper.classNames.push(`${swiper.params.containerModifierClass}virtual`);
|
3509 |
-
const overwriteParams = {
|
3510 |
-
watchSlidesProgress: true,
|
3511 |
-
};
|
3512 |
-
Utils.extend(swiper.params, overwriteParams);
|
3513 |
-
Utils.extend(swiper.originalParams, overwriteParams);
|
3514 |
-
|
3515 |
-
if (!swiper.params.initialSlide) {
|
3516 |
-
swiper.virtual.update();
|
3517 |
-
}
|
3518 |
-
},
|
3519 |
-
setTranslate() {
|
3520 |
-
const swiper = this;
|
3521 |
-
if (!swiper.params.virtual.enabled) return;
|
3522 |
-
swiper.virtual.update();
|
3523 |
-
},
|
3524 |
-
},
|
3525 |
-
};
|
3526 |
-
|
3527 |
-
const Keyboard = {
|
3528 |
-
handle(event) {
|
3529 |
-
const swiper = this;
|
3530 |
-
const { rtlTranslate: rtl } = swiper;
|
3531 |
-
let e = event;
|
3532 |
-
if (e.originalEvent) e = e.originalEvent; // jquery fix
|
3533 |
-
const kc = e.keyCode || e.charCode;
|
3534 |
-
// Directions locks
|
3535 |
-
if (!swiper.allowSlideNext && ((swiper.isHorizontal() && kc === 39) || (swiper.isVertical() && kc === 40))) {
|
3536 |
-
return false;
|
3537 |
-
}
|
3538 |
-
if (!swiper.allowSlidePrev && ((swiper.isHorizontal() && kc === 37) || (swiper.isVertical() && kc === 38))) {
|
3539 |
-
return false;
|
3540 |
-
}
|
3541 |
-
if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {
|
3542 |
-
return undefined;
|
3543 |
-
}
|
3544 |
-
if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) {
|
3545 |
-
return undefined;
|
3546 |
-
}
|
3547 |
-
if (swiper.params.keyboard.onlyInViewport && (kc === 37 || kc === 39 || kc === 38 || kc === 40)) {
|
3548 |
-
let inView = false;
|
3549 |
-
// Check that swiper should be inside of visible area of window
|
3550 |
-
if (swiper.$el.parents(`.${swiper.params.slideClass}`).length > 0 && swiper.$el.parents(`.${swiper.params.slideActiveClass}`).length === 0) {
|
3551 |
-
return undefined;
|
3552 |
-
}
|
3553 |
-
const windowWidth = window.innerWidth;
|
3554 |
-
const windowHeight = window.innerHeight;
|
3555 |
-
const swiperOffset = swiper.$el.offset();
|
3556 |
-
if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft;
|
3557 |
-
const swiperCoord = [
|
3558 |
-
[swiperOffset.left, swiperOffset.top],
|
3559 |
-
[swiperOffset.left + swiper.width, swiperOffset.top],
|
3560 |
-
[swiperOffset.left, swiperOffset.top + swiper.height],
|
3561 |
-
[swiperOffset.left + swiper.width, swiperOffset.top + swiper.height],
|
3562 |
-
];
|
3563 |
-
for (let i = 0; i < swiperCoord.length; i += 1) {
|
3564 |
-
const point = swiperCoord[i];
|
3565 |
-
if (
|
3566 |
-
point[0] >= 0 && point[0] <= windowWidth
|
3567 |
-
&& point[1] >= 0 && point[1] <= windowHeight
|
3568 |
-
) {
|
3569 |
-
inView = true;
|
3570 |
-
}
|
3571 |
-
}
|
3572 |
-
if (!inView) return undefined;
|
3573 |
-
}
|
3574 |
-
if (swiper.isHorizontal()) {
|
3575 |
-
if (kc === 37 || kc === 39) {
|
3576 |
-
if (e.preventDefault) e.preventDefault();
|
3577 |
-
else e.returnValue = false;
|
3578 |
-
}
|
3579 |
-
if ((kc === 39 && !rtl) || (kc === 37 && rtl)) swiper.slideNext();
|
3580 |
-
if ((kc === 37 && !rtl) || (kc === 39 && rtl)) swiper.slidePrev();
|
3581 |
-
} else {
|
3582 |
-
if (kc === 38 || kc === 40) {
|
3583 |
-
if (e.preventDefault) e.preventDefault();
|
3584 |
-
else e.returnValue = false;
|
3585 |
-
}
|
3586 |
-
if (kc === 40) swiper.slideNext();
|
3587 |
-
if (kc === 38) swiper.slidePrev();
|
3588 |
-
}
|
3589 |
-
swiper.emit('keyPress', kc);
|
3590 |
-
return undefined;
|
3591 |
-
},
|
3592 |
-
enable() {
|
3593 |
-
const swiper = this;
|
3594 |
-
if (swiper.keyboard.enabled) return;
|
3595 |
-
$(document).on('keydown', swiper.keyboard.handle);
|
3596 |
-
swiper.keyboard.enabled = true;
|
3597 |
-
},
|
3598 |
-
disable() {
|
3599 |
-
const swiper = this;
|
3600 |
-
if (!swiper.keyboard.enabled) return;
|
3601 |
-
$(document).off('keydown', swiper.keyboard.handle);
|
3602 |
-
swiper.keyboard.enabled = false;
|
3603 |
-
},
|
3604 |
-
};
|
3605 |
-
|
3606 |
-
var keyboard = {
|
3607 |
-
name: 'keyboard',
|
3608 |
-
params: {
|
3609 |
-
keyboard: {
|
3610 |
-
enabled: false,
|
3611 |
-
onlyInViewport: true,
|
3612 |
-
},
|
3613 |
-
},
|
3614 |
-
create() {
|
3615 |
-
const swiper = this;
|
3616 |
-
Utils.extend(swiper, {
|
3617 |
-
keyboard: {
|
3618 |
-
enabled: false,
|
3619 |
-
enable: Keyboard.enable.bind(swiper),
|
3620 |
-
disable: Keyboard.disable.bind(swiper),
|
3621 |
-
handle: Keyboard.handle.bind(swiper),
|
3622 |
-
},
|
3623 |
-
});
|
3624 |
-
},
|
3625 |
-
on: {
|
3626 |
-
init() {
|
3627 |
-
const swiper = this;
|
3628 |
-
if (swiper.params.keyboard.enabled) {
|
3629 |
-
swiper.keyboard.enable();
|
3630 |
-
}
|
3631 |
-
},
|
3632 |
-
destroy() {
|
3633 |
-
const swiper = this;
|
3634 |
-
if (swiper.keyboard.enabled) {
|
3635 |
-
swiper.keyboard.disable();
|
3636 |
-
}
|
3637 |
-
},
|
3638 |
-
},
|
3639 |
-
};
|
3640 |
-
|
3641 |
-
function isEventSupported() {
|
3642 |
-
const eventName = 'onwheel';
|
3643 |
-
let isSupported = eventName in document;
|
3644 |
-
|
3645 |
-
if (!isSupported) {
|
3646 |
-
const element = document.createElement('div');
|
3647 |
-
element.setAttribute(eventName, 'return;');
|
3648 |
-
isSupported = typeof element[eventName] === 'function';
|
3649 |
-
}
|
3650 |
-
|
3651 |
-
if (!isSupported
|
3652 |
-
&& document.implementation
|
3653 |
-
&& document.implementation.hasFeature
|
3654 |
-
// always returns true in newer browsers as per the standard.
|
3655 |
-
// @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
|
3656 |
-
&& document.implementation.hasFeature('', '') !== true
|
3657 |
-
) {
|
3658 |
-
// This is the only way to test support for the `wheel` event in IE9+.
|
3659 |
-
isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
|
3660 |
-
}
|
3661 |
-
|
3662 |
-
return isSupported;
|
3663 |
-
}
|
3664 |
-
const Mousewheel = {
|
3665 |
-
lastScrollTime: Utils.now(),
|
3666 |
-
event: (function getEvent() {
|
3667 |
-
if (window.navigator.userAgent.indexOf('firefox') > -1) return 'DOMMouseScroll';
|
3668 |
-
return isEventSupported() ? 'wheel' : 'mousewheel';
|
3669 |
-
}()),
|
3670 |
-
normalize(e) {
|
3671 |
-
// Reasonable defaults
|
3672 |
-
const PIXEL_STEP = 10;
|
3673 |
-
const LINE_HEIGHT = 40;
|
3674 |
-
const PAGE_HEIGHT = 800;
|
3675 |
-
|
3676 |
-
let sX = 0;
|
3677 |
-
let sY = 0; // spinX, spinY
|
3678 |
-
let pX = 0;
|
3679 |
-
let pY = 0; // pixelX, pixelY
|
3680 |
-
|
3681 |
-
// Legacy
|
3682 |
-
if ('detail' in e) {
|
3683 |
-
sY = e.detail;
|
3684 |
-
}
|
3685 |
-
if ('wheelDelta' in e) {
|
3686 |
-
sY = -e.wheelDelta / 120;
|
3687 |
-
}
|
3688 |
-
if ('wheelDeltaY' in e) {
|
3689 |
-
sY = -e.wheelDeltaY / 120;
|
3690 |
-
}
|
3691 |
-
if ('wheelDeltaX' in e) {
|
3692 |
-
sX = -e.wheelDeltaX / 120;
|
3693 |
-
}
|
3694 |
-
|
3695 |
-
// side scrolling on FF with DOMMouseScroll
|
3696 |
-
if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) {
|
3697 |
-
sX = sY;
|
3698 |
-
sY = 0;
|
3699 |
-
}
|
3700 |
-
|
3701 |
-
pX = sX * PIXEL_STEP;
|
3702 |
-
pY = sY * PIXEL_STEP;
|
3703 |
-
|
3704 |
-
if ('deltaY' in e) {
|
3705 |
-
pY = e.deltaY;
|
3706 |
-
}
|
3707 |
-
if ('deltaX' in e) {
|
3708 |
-
pX = e.deltaX;
|
3709 |
-
}
|
3710 |
-
|
3711 |
-
if ((pX || pY) && e.deltaMode) {
|
3712 |
-
if (e.deltaMode === 1) { // delta in LINE units
|
3713 |
-
pX *= LINE_HEIGHT;
|
3714 |
-
pY *= LINE_HEIGHT;
|
3715 |
-
} else { // delta in PAGE units
|
3716 |
-
pX *= PAGE_HEIGHT;
|
3717 |
-
pY *= PAGE_HEIGHT;
|
3718 |
-
}
|
3719 |
-
}
|
3720 |
-
|
3721 |
-
// Fall-back if spin cannot be determined
|
3722 |
-
if (pX && !sX) {
|
3723 |
-
sX = (pX < 1) ? -1 : 1;
|
3724 |
-
}
|
3725 |
-
if (pY && !sY) {
|
3726 |
-
sY = (pY < 1) ? -1 : 1;
|
3727 |
-
}
|
3728 |
-
|
3729 |
-
return {
|
3730 |
-
spinX: sX,
|
3731 |
-
spinY: sY,
|
3732 |
-
pixelX: pX,
|
3733 |
-
pixelY: pY,
|
3734 |
-
};
|
3735 |
-
},
|
3736 |
-
handleMouseEnter() {
|
3737 |
-
const swiper = this;
|
3738 |
-
swiper.mouseEntered = true;
|
3739 |
-
},
|
3740 |
-
handleMouseLeave() {
|
3741 |
-
const swiper = this;
|
3742 |
-
swiper.mouseEntered = false;
|
3743 |
-
},
|
3744 |
-
handle(event) {
|
3745 |
-
let e = event;
|
3746 |
-
const swiper = this;
|
3747 |
-
const params = swiper.params.mousewheel;
|
3748 |
-
|
3749 |
-
if (!swiper.mouseEntered && !params.releaseOnEdges) return true;
|
3750 |
-
|
3751 |
-
if (e.originalEvent) e = e.originalEvent; // jquery fix
|
3752 |
-
let delta = 0;
|
3753 |
-
const rtlFactor = swiper.rtlTranslate ? -1 : 1;
|
3754 |
-
|
3755 |
-
const data$$1 = Mousewheel.normalize(e);
|
3756 |
-
|
3757 |
-
if (params.forceToAxis) {
|
3758 |
-
if (swiper.isHorizontal()) {
|
3759 |
-
if (Math.abs(data$$1.pixelX) > Math.abs(data$$1.pixelY)) delta = data$$1.pixelX * rtlFactor;
|
3760 |
-
else return true;
|
3761 |
-
} else if (Math.abs(data$$1.pixelY) > Math.abs(data$$1.pixelX)) delta = data$$1.pixelY;
|
3762 |
-
else return true;
|
3763 |
-
} else {
|
3764 |
-
delta = Math.abs(data$$1.pixelX) > Math.abs(data$$1.pixelY) ? -data$$1.pixelX * rtlFactor : -data$$1.pixelY;
|
3765 |
-
}
|
3766 |
-
|
3767 |
-
if (delta === 0) return true;
|
3768 |
-
|
3769 |
-
if (params.invert) delta = -delta;
|
3770 |
-
|
3771 |
-
if (!swiper.params.freeMode) {
|
3772 |
-
if (Utils.now() - swiper.mousewheel.lastScrollTime > 60) {
|
3773 |
-
if (delta < 0) {
|
3774 |
-
if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) {
|
3775 |
-
swiper.slideNext();
|
3776 |
-
swiper.emit('scroll', e);
|
3777 |
-
} else if (params.releaseOnEdges) return true;
|
3778 |
-
} else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) {
|
3779 |
-
swiper.slidePrev();
|
3780 |
-
swiper.emit('scroll', e);
|
3781 |
-
} else if (params.releaseOnEdges) return true;
|
3782 |
-
}
|
3783 |
-
swiper.mousewheel.lastScrollTime = (new window.Date()).getTime();
|
3784 |
-
} else {
|
3785 |
-
// Freemode or scrollContainer:
|
3786 |
-
if (swiper.params.loop) {
|
3787 |
-
swiper.loopFix();
|
3788 |
-
}
|
3789 |
-
let position = swiper.getTranslate() + (delta * params.sensitivity);
|
3790 |
-
const wasBeginning = swiper.isBeginning;
|
3791 |
-
const wasEnd = swiper.isEnd;
|
3792 |
-
|
3793 |
-
if (position >= swiper.minTranslate()) position = swiper.minTranslate();
|
3794 |
-
if (position <= swiper.maxTranslate()) position = swiper.maxTranslate();
|
3795 |
-
|
3796 |
-
swiper.setTransition(0);
|
3797 |
-
swiper.setTranslate(position);
|
3798 |
-
swiper.updateProgress();
|
3799 |
-
swiper.updateActiveIndex();
|
3800 |
-
swiper.updateSlidesClasses();
|
3801 |
-
|
3802 |
-
if ((!wasBeginning && swiper.isBeginning) || (!wasEnd && swiper.isEnd)) {
|
3803 |
-
swiper.updateSlidesClasses();
|
3804 |
-
}
|
3805 |
-
|
3806 |
-
if (swiper.params.freeModeSticky) {
|
3807 |
-
clearTimeout(swiper.mousewheel.timeout);
|
3808 |
-
swiper.mousewheel.timeout = Utils.nextTick(() => {
|
3809 |
-
swiper.slideToClosest();
|
3810 |
-
}, 300);
|
3811 |
-
}
|
3812 |
-
// Emit event
|
3813 |
-
swiper.emit('scroll', e);
|
3814 |
-
|
3815 |
-
// Stop autoplay
|
3816 |
-
if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop();
|
3817 |
-
// Return page scroll on edge positions
|
3818 |
-
if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true;
|
3819 |
-
}
|
3820 |
-
|
3821 |
-
if (e.preventDefault) e.preventDefault();
|
3822 |
-
else e.returnValue = false;
|
3823 |
-
return false;
|
3824 |
-
},
|
3825 |
-
enable() {
|
3826 |
-
const swiper = this;
|
3827 |
-
if (!Mousewheel.event) return false;
|
3828 |
-
if (swiper.mousewheel.enabled) return false;
|
3829 |
-
let target = swiper.$el;
|
3830 |
-
if (swiper.params.mousewheel.eventsTarged !== 'container') {
|
3831 |
-
target = $(swiper.params.mousewheel.eventsTarged);
|
3832 |
-
}
|
3833 |
-
target.on('mouseenter', swiper.mousewheel.handleMouseEnter);
|
3834 |
-
target.on('mouseleave', swiper.mousewheel.handleMouseLeave);
|
3835 |
-
target.on(Mousewheel.event, swiper.mousewheel.handle);
|
3836 |
-
swiper.mousewheel.enabled = true;
|
3837 |
-
return true;
|
3838 |
-
},
|
3839 |
-
disable() {
|
3840 |
-
const swiper = this;
|
3841 |
-
if (!Mousewheel.event) return false;
|
3842 |
-
if (!swiper.mousewheel.enabled) return false;
|
3843 |
-
let target = swiper.$el;
|
3844 |
-
if (swiper.params.mousewheel.eventsTarged !== 'container') {
|
3845 |
-
target = $(swiper.params.mousewheel.eventsTarged);
|
3846 |
-
}
|
3847 |
-
target.off(Mousewheel.event, swiper.mousewheel.handle);
|
3848 |
-
swiper.mousewheel.enabled = false;
|
3849 |
-
return true;
|
3850 |
-
},
|
3851 |
-
};
|
3852 |
-
|
3853 |
-
var mousewheel = {
|
3854 |
-
name: 'mousewheel',
|
3855 |
-
params: {
|
3856 |
-
mousewheel: {
|
3857 |
-
enabled: false,
|
3858 |
-
releaseOnEdges: false,
|
3859 |
-
invert: false,
|
3860 |
-
forceToAxis: false,
|
3861 |
-
sensitivity: 1,
|
3862 |
-
eventsTarged: 'container',
|
3863 |
-
},
|
3864 |
-
},
|
3865 |
-
create() {
|
3866 |
-
const swiper = this;
|
3867 |
-
Utils.extend(swiper, {
|
3868 |
-
mousewheel: {
|
3869 |
-
enabled: false,
|
3870 |
-
enable: Mousewheel.enable.bind(swiper),
|
3871 |
-
disable: Mousewheel.disable.bind(swiper),
|
3872 |
-
handle: Mousewheel.handle.bind(swiper),
|
3873 |
-
handleMouseEnter: Mousewheel.handleMouseEnter.bind(swiper),
|
3874 |
-
handleMouseLeave: Mousewheel.handleMouseLeave.bind(swiper),
|
3875 |
-
lastScrollTime: Utils.now(),
|
3876 |
-
},
|
3877 |
-
});
|
3878 |
-
},
|
3879 |
-
on: {
|
3880 |
-
init() {
|
3881 |
-
const swiper = this;
|
3882 |
-
if (swiper.params.mousewheel.enabled) swiper.mousewheel.enable();
|
3883 |
-
},
|
3884 |
-
destroy() {
|
3885 |
-
const swiper = this;
|
3886 |
-
if (swiper.mousewheel.enabled) swiper.mousewheel.disable();
|
3887 |
-
},
|
3888 |
-
},
|
3889 |
-
};
|
3890 |
-
|
3891 |
-
const Navigation = {
|
3892 |
-
update() {
|
3893 |
-
// Update Navigation Buttons
|
3894 |
-
const swiper = this;
|
3895 |
-
const params = swiper.params.navigation;
|
3896 |
-
|
3897 |
-
if (swiper.params.loop) return;
|
3898 |
-
const { $nextEl, $prevEl } = swiper.navigation;
|
3899 |
-
|
3900 |
-
if ($prevEl && $prevEl.length > 0) {
|
3901 |
-
if (swiper.isBeginning) {
|
3902 |
-
$prevEl.addClass(params.disabledClass);
|
3903 |
-
} else {
|
3904 |
-
$prevEl.removeClass(params.disabledClass);
|
3905 |
-
}
|
3906 |
-
$prevEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
|
3907 |
-
}
|
3908 |
-
if ($nextEl && $nextEl.length > 0) {
|
3909 |
-
if (swiper.isEnd) {
|
3910 |
-
$nextEl.addClass(params.disabledClass);
|
3911 |
-
} else {
|
3912 |
-
$nextEl.removeClass(params.disabledClass);
|
3913 |
-
}
|
3914 |
-
$nextEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
|
3915 |
-
}
|
3916 |
-
},
|
3917 |
-
onPrevClick(e) {
|
3918 |
-
const swiper = this;
|
3919 |
-
e.preventDefault();
|
3920 |
-
if (swiper.isBeginning && !swiper.params.loop) return;
|
3921 |
-
swiper.slidePrev();
|
3922 |
-
},
|
3923 |
-
onNextClick(e) {
|
3924 |
-
const swiper = this;
|
3925 |
-
e.preventDefault();
|
3926 |
-
if (swiper.isEnd && !swiper.params.loop) return;
|
3927 |
-
swiper.slideNext();
|
3928 |
-
},
|
3929 |
-
init() {
|
3930 |
-
const swiper = this;
|
3931 |
-
const params = swiper.params.navigation;
|
3932 |
-
if (!(params.nextEl || params.prevEl)) return;
|
3933 |
-
|
3934 |
-
let $nextEl;
|
3935 |
-
let $prevEl;
|
3936 |
-
if (params.nextEl) {
|
3937 |
-
$nextEl = $(params.nextEl);
|
3938 |
-
if (
|
3939 |
-
swiper.params.uniqueNavElements
|
3940 |
-
&& typeof params.nextEl === 'string'
|
3941 |
-
&& $nextEl.length > 1
|
3942 |
-
&& swiper.$el.find(params.nextEl).length === 1
|
3943 |
-
) {
|
3944 |
-
$nextEl = swiper.$el.find(params.nextEl);
|
3945 |
-
}
|
3946 |
-
}
|
3947 |
-
if (params.prevEl) {
|
3948 |
-
$prevEl = $(params.prevEl);
|
3949 |
-
if (
|
3950 |
-
swiper.params.uniqueNavElements
|
3951 |
-
&& typeof params.prevEl === 'string'
|
3952 |
-
&& $prevEl.length > 1
|
3953 |
-
&& swiper.$el.find(params.prevEl).length === 1
|
3954 |
-
) {
|
3955 |
-
$prevEl = swiper.$el.find(params.prevEl);
|
3956 |
-
}
|
3957 |
-
}
|
3958 |
-
|
3959 |
-
if ($nextEl && $nextEl.length > 0) {
|
3960 |
-
$nextEl.on('click', swiper.navigation.onNextClick);
|
3961 |
-
}
|
3962 |
-
if ($prevEl && $prevEl.length > 0) {
|
3963 |
-
$prevEl.on('click', swiper.navigation.onPrevClick);
|
3964 |
-
}
|
3965 |
-
|
3966 |
-
Utils.extend(swiper.navigation, {
|
3967 |
-
$nextEl,
|
3968 |
-
nextEl: $nextEl && $nextEl[0],
|
3969 |
-
$prevEl,
|
3970 |
-
prevEl: $prevEl && $prevEl[0],
|
3971 |
-
});
|
3972 |
-
},
|
3973 |
-
destroy() {
|
3974 |
-
const swiper = this;
|
3975 |
-
const { $nextEl, $prevEl } = swiper.navigation;
|
3976 |
-
if ($nextEl && $nextEl.length) {
|
3977 |
-
$nextEl.off('click', swiper.navigation.onNextClick);
|
3978 |
-
$nextEl.removeClass(swiper.params.navigation.disabledClass);
|
3979 |
-
}
|
3980 |
-
if ($prevEl && $prevEl.length) {
|
3981 |
-
$prevEl.off('click', swiper.navigation.onPrevClick);
|
3982 |
-
$prevEl.removeClass(swiper.params.navigation.disabledClass);
|
3983 |
-
}
|
3984 |
-
},
|
3985 |
-
};
|
3986 |
-
|
3987 |
-
var navigation = {
|
3988 |
-
name: 'navigation',
|
3989 |
-
params: {
|
3990 |
-
navigation: {
|
3991 |
-
nextEl: null,
|
3992 |
-
prevEl: null,
|
3993 |
-
|
3994 |
-
hideOnClick: false,
|
3995 |
-
disabledClass: 'swiper-button-disabled',
|
3996 |
-
hiddenClass: 'swiper-button-hidden',
|
3997 |
-
lockClass: 'swiper-button-lock',
|
3998 |
-
},
|
3999 |
-
},
|
4000 |
-
create() {
|
4001 |
-
const swiper = this;
|
4002 |
-
Utils.extend(swiper, {
|
4003 |
-
navigation: {
|
4004 |
-
init: Navigation.init.bind(swiper),
|
4005 |
-
update: Navigation.update.bind(swiper),
|
4006 |
-
destroy: Navigation.destroy.bind(swiper),
|
4007 |
-
onNextClick: Navigation.onNextClick.bind(swiper),
|
4008 |
-
onPrevClick: Navigation.onPrevClick.bind(swiper),
|
4009 |
-
},
|
4010 |
-
});
|
4011 |
-
},
|
4012 |
-
on: {
|
4013 |
-
init() {
|
4014 |
-
const swiper = this;
|
4015 |
-
swiper.navigation.init();
|
4016 |
-
swiper.navigation.update();
|
4017 |
-
},
|
4018 |
-
toEdge() {
|
4019 |
-
const swiper = this;
|
4020 |
-
swiper.navigation.update();
|
4021 |
-
},
|
4022 |
-
fromEdge() {
|
4023 |
-
const swiper = this;
|
4024 |
-
swiper.navigation.update();
|
4025 |
-
},
|
4026 |
-
destroy() {
|
4027 |
-
const swiper = this;
|
4028 |
-
swiper.navigation.destroy();
|
4029 |
-
},
|
4030 |
-
click(e) {
|
4031 |
-
const swiper = this;
|
4032 |
-
const { $nextEl, $prevEl } = swiper.navigation;
|
4033 |
-
if (
|
4034 |
-
swiper.params.navigation.hideOnClick
|
4035 |
-
&& !$(e.target).is($prevEl)
|
4036 |
-
&& !$(e.target).is($nextEl)
|
4037 |
-
) {
|
4038 |
-
if ($nextEl) $nextEl.toggleClass(swiper.params.navigation.hiddenClass);
|
4039 |
-
if ($prevEl) $prevEl.toggleClass(swiper.params.navigation.hiddenClass);
|
4040 |
-
}
|
4041 |
-
},
|
4042 |
-
},
|
4043 |
-
};
|
4044 |
-
|
4045 |
-
const Pagination = {
|
4046 |
-
update() {
|
4047 |
-
// Render || Update Pagination bullets/items
|
4048 |
-
const swiper = this;
|
4049 |
-
const rtl = swiper.rtl;
|
4050 |
-
const params = swiper.params.pagination;
|
4051 |
-
if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;
|
4052 |
-
const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
|
4053 |
-
const $el = swiper.pagination.$el;
|
4054 |
-
// Current/Total
|
4055 |
-
let current;
|
4056 |
-
const total = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
|
4057 |
-
if (swiper.params.loop) {
|
4058 |
-
current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup);
|
4059 |
-
if (current > slidesLength - 1 - (swiper.loopedSlides * 2)) {
|
4060 |
-
current -= (slidesLength - (swiper.loopedSlides * 2));
|
4061 |
-
}
|
4062 |
-
if (current > total - 1) current -= total;
|
4063 |
-
if (current < 0 && swiper.params.paginationType !== 'bullets') current = total + current;
|
4064 |
-
} else if (typeof swiper.snapIndex !== 'undefined') {
|
4065 |
-
current = swiper.snapIndex;
|
4066 |
-
} else {
|
4067 |
-
current = swiper.activeIndex || 0;
|
4068 |
-
}
|
4069 |
-
// Types
|
4070 |
-
if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {
|
4071 |
-
const bullets = swiper.pagination.bullets;
|
4072 |
-
let firstIndex;
|
4073 |
-
let lastIndex;
|
4074 |
-
let midIndex;
|
4075 |
-
if (params.dynamicBullets) {
|
4076 |
-
swiper.pagination.bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true);
|
4077 |
-
$el.css(swiper.isHorizontal() ? 'width' : 'height', `${swiper.pagination.bulletSize * (params.dynamicMainBullets + 4)}px`);
|
4078 |
-
if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) {
|
4079 |
-
swiper.pagination.dynamicBulletIndex += (current - swiper.previousIndex);
|
4080 |
-
if (swiper.pagination.dynamicBulletIndex > (params.dynamicMainBullets - 1)) {
|
4081 |
-
swiper.pagination.dynamicBulletIndex = params.dynamicMainBullets - 1;
|
4082 |
-
} else if (swiper.pagination.dynamicBulletIndex < 0) {
|
4083 |
-
swiper.pagination.dynamicBulletIndex = 0;
|
4084 |
-
}
|
4085 |
-
}
|
4086 |
-
firstIndex = current - swiper.pagination.dynamicBulletIndex;
|
4087 |
-
lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);
|
4088 |
-
midIndex = (lastIndex + firstIndex) / 2;
|
4089 |
-
}
|
4090 |
-
bullets.removeClass(`${params.bulletActiveClass} ${params.bulletActiveClass}-next ${params.bulletActiveClass}-next-next ${params.bulletActiveClass}-prev ${params.bulletActiveClass}-prev-prev ${params.bulletActiveClass}-main`);
|
4091 |
-
if ($el.length > 1) {
|
4092 |
-
bullets.each((index$$1, bullet) => {
|
4093 |
-
const $bullet = $(bullet);
|
4094 |
-
const bulletIndex = $bullet.index();
|
4095 |
-
if (bulletIndex === current) {
|
4096 |
-
$bullet.addClass(params.bulletActiveClass);
|
4097 |
-
}
|
4098 |
-
if (params.dynamicBullets) {
|
4099 |
-
if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {
|
4100 |
-
$bullet.addClass(`${params.bulletActiveClass}-main`);
|
4101 |
-
}
|
4102 |
-
if (bulletIndex === firstIndex) {
|
4103 |
-
$bullet
|
4104 |
-
.prev()
|
4105 |
-
.addClass(`${params.bulletActiveClass}-prev`)
|
4106 |
-
.prev()
|
4107 |
-
.addClass(`${params.bulletActiveClass}-prev-prev`);
|
4108 |
-
}
|
4109 |
-
if (bulletIndex === lastIndex) {
|
4110 |
-
$bullet
|
4111 |
-
.next()
|
4112 |
-
.addClass(`${params.bulletActiveClass}-next`)
|
4113 |
-
.next()
|
4114 |
-
.addClass(`${params.bulletActiveClass}-next-next`);
|
4115 |
-
}
|
4116 |
-
}
|
4117 |
-
});
|
4118 |
-
} else {
|
4119 |
-
const $bullet = bullets.eq(current);
|
4120 |
-
$bullet.addClass(params.bulletActiveClass);
|
4121 |
-
if (params.dynamicBullets) {
|
4122 |
-
const $firstDisplayedBullet = bullets.eq(firstIndex);
|
4123 |
-
const $lastDisplayedBullet = bullets.eq(lastIndex);
|
4124 |
-
for (let i = firstIndex; i <= lastIndex; i += 1) {
|
4125 |
-
bullets.eq(i).addClass(`${params.bulletActiveClass}-main`);
|
4126 |
-
}
|
4127 |
-
$firstDisplayedBullet
|
4128 |
-
.prev()
|
4129 |
-
.addClass(`${params.bulletActiveClass}-prev`)
|
4130 |
-
.prev()
|
4131 |
-
.addClass(`${params.bulletActiveClass}-prev-prev`);
|
4132 |
-
$lastDisplayedBullet
|
4133 |
-
.next()
|
4134 |
-
.addClass(`${params.bulletActiveClass}-next`)
|
4135 |
-
.next()
|
4136 |
-
.addClass(`${params.bulletActiveClass}-next-next`);
|
4137 |
-
}
|
4138 |
-
}
|
4139 |
-
if (params.dynamicBullets) {
|
4140 |
-
const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);
|
4141 |
-
const bulletsOffset = (((swiper.pagination.bulletSize * dynamicBulletsLength) - (swiper.pagination.bulletSize)) / 2) - (midIndex * swiper.pagination.bulletSize);
|
4142 |
-
const offsetProp = rtl ? 'right' : 'left';
|
4143 |
-
bullets.css(swiper.isHorizontal() ? offsetProp : 'top', `${bulletsOffset}px`);
|
4144 |
-
}
|
4145 |
-
}
|
4146 |
-
if (params.type === 'fraction') {
|
4147 |
-
$el.find(`.${params.currentClass}`).text(params.formatFractionCurrent(current + 1));
|
4148 |
-
$el.find(`.${params.totalClass}`).text(params.formatFractionTotal(total));
|
4149 |
-
}
|
4150 |
-
if (params.type === 'progressbar') {
|
4151 |
-
let progressbarDirection;
|
4152 |
-
if (params.progressbarOpposite) {
|
4153 |
-
progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';
|
4154 |
-
} else {
|
4155 |
-
progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';
|
4156 |
-
}
|
4157 |
-
const scale = (current + 1) / total;
|
4158 |
-
let scaleX = 1;
|
4159 |
-
let scaleY = 1;
|
4160 |
-
if (progressbarDirection === 'horizontal') {
|
4161 |
-
scaleX = scale;
|
4162 |
-
} else {
|
4163 |
-
scaleY = scale;
|
4164 |
-
}
|
4165 |
-
$el.find(`.${params.progressbarFillClass}`).transform(`translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`).transition(swiper.params.speed);
|
4166 |
-
}
|
4167 |
-
if (params.type === 'custom' && params.renderCustom) {
|
4168 |
-
$el.html(params.renderCustom(swiper, current + 1, total));
|
4169 |
-
swiper.emit('paginationRender', swiper, $el[0]);
|
4170 |
-
} else {
|
4171 |
-
swiper.emit('paginationUpdate', swiper, $el[0]);
|
4172 |
-
}
|
4173 |
-
$el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
|
4174 |
-
},
|
4175 |
-
render() {
|
4176 |
-
// Render Container
|
4177 |
-
const swiper = this;
|
4178 |
-
const params = swiper.params.pagination;
|
4179 |
-
if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;
|
4180 |
-
const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
|
4181 |
-
|
4182 |
-
const $el = swiper.pagination.$el;
|
4183 |
-
let paginationHTML = '';
|
4184 |
-
if (params.type === 'bullets') {
|
4185 |
-
const numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
|
4186 |
-
for (let i = 0; i < numberOfBullets; i += 1) {
|
4187 |
-
if (params.renderBullet) {
|
4188 |
-
paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);
|
4189 |
-
} else {
|
4190 |
-
paginationHTML += `<${params.bulletElement} class="${params.bulletClass}"></${params.bulletElement}>`;
|
4191 |
-
}
|
4192 |
-
}
|
4193 |
-
$el.html(paginationHTML);
|
4194 |
-
swiper.pagination.bullets = $el.find(`.${params.bulletClass}`);
|
4195 |
-
}
|
4196 |
-
if (params.type === 'fraction') {
|
4197 |
-
if (params.renderFraction) {
|
4198 |
-
paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);
|
4199 |
-
} else {
|
4200 |
-
paginationHTML = `<span class="${params.currentClass}"></span>`
|
4201 |
-
+ ' / '
|
4202 |
-
+ `<span class="${params.totalClass}"></span>`;
|
4203 |
-
}
|
4204 |
-
$el.html(paginationHTML);
|
4205 |
-
}
|
4206 |
-
if (params.type === 'progressbar') {
|
4207 |
-
if (params.renderProgressbar) {
|
4208 |
-
paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);
|
4209 |
-
} else {
|
4210 |
-
paginationHTML = `<span class="${params.progressbarFillClass}"></span>`;
|
4211 |
-
}
|
4212 |
-
$el.html(paginationHTML);
|
4213 |
-
}
|
4214 |
-
if (params.type !== 'custom') {
|
4215 |
-
swiper.emit('paginationRender', swiper.pagination.$el[0]);
|
4216 |
-
}
|
4217 |
-
},
|
4218 |
-
init() {
|
4219 |
-
const swiper = this;
|
4220 |
-
const params = swiper.params.pagination;
|
4221 |
-
if (!params.el) return;
|
4222 |
-
|
4223 |
-
let $el = $(params.el);
|
4224 |
-
if ($el.length === 0) return;
|
4225 |
-
|
4226 |
-
if (
|
4227 |
-
swiper.params.uniqueNavElements
|
4228 |
-
&& typeof params.el === 'string'
|
4229 |
-
&& $el.length > 1
|
4230 |
-
&& swiper.$el.find(params.el).length === 1
|
4231 |
-
) {
|
4232 |
-
$el = swiper.$el.find(params.el);
|
4233 |
-
}
|
4234 |
-
|
4235 |
-
if (params.type === 'bullets' && params.clickable) {
|
4236 |
-
$el.addClass(params.clickableClass);
|
4237 |
-
}
|
4238 |
-
|
4239 |
-
$el.addClass(params.modifierClass + params.type);
|
4240 |
-
|
4241 |
-
if (params.type === 'bullets' && params.dynamicBullets) {
|
4242 |
-
$el.addClass(`${params.modifierClass}${params.type}-dynamic`);
|
4243 |
-
swiper.pagination.dynamicBulletIndex = 0;
|
4244 |
-
if (params.dynamicMainBullets < 1) {
|
4245 |
-
params.dynamicMainBullets = 1;
|
4246 |
-
}
|
4247 |
-
}
|
4248 |
-
if (params.type === 'progressbar' && params.progressbarOpposite) {
|
4249 |
-
$el.addClass(params.progressbarOppositeClass);
|
4250 |
-
}
|
4251 |
-
|
4252 |
-
if (params.clickable) {
|
4253 |
-
$el.on('click', `.${params.bulletClass}`, function onClick(e) {
|
4254 |
-
e.preventDefault();
|
4255 |
-
let index$$1 = $(this).index() * swiper.params.slidesPerGroup;
|
4256 |
-
if (swiper.params.loop) index$$1 += swiper.loopedSlides;
|
4257 |
-
swiper.slideTo(index$$1);
|
4258 |
-
});
|
4259 |
-
}
|
4260 |
-
|
4261 |
-
Utils.extend(swiper.pagination, {
|
4262 |
-
$el,
|
4263 |
-
el: $el[0],
|
4264 |
-
});
|
4265 |
-
},
|
4266 |
-
destroy() {
|
4267 |
-
const swiper = this;
|
4268 |
-
const params = swiper.params.pagination;
|
4269 |
-
if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;
|
4270 |
-
const $el = swiper.pagination.$el;
|
4271 |
-
|
4272 |
-
$el.removeClass(params.hiddenClass);
|
4273 |
-
$el.removeClass(params.modifierClass + params.type);
|
4274 |
-
if (swiper.pagination.bullets) swiper.pagination.bullets.removeClass(params.bulletActiveClass);
|
4275 |
-
if (params.clickable) {
|
4276 |
-
$el.off('click', `.${params.bulletClass}`);
|
4277 |
-
}
|
4278 |
-
},
|
4279 |
-
};
|
4280 |
-
|
4281 |
-
var pagination = {
|
4282 |
-
name: 'pagination',
|
4283 |
-
params: {
|
4284 |
-
pagination: {
|
4285 |
-
el: null,
|
4286 |
-
bulletElement: 'span',
|
4287 |
-
clickable: false,
|
4288 |
-
hideOnClick: false,
|
4289 |
-
renderBullet: null,
|
4290 |
-
renderProgressbar: null,
|
4291 |
-
renderFraction: null,
|
4292 |
-
renderCustom: null,
|
4293 |
-
progressbarOpposite: false,
|
4294 |
-
type: 'bullets', // 'bullets' or 'progressbar' or 'fraction' or 'custom'
|
4295 |
-
dynamicBullets: false,
|
4296 |
-
dynamicMainBullets: 1,
|
4297 |
-
formatFractionCurrent: number => number,
|
4298 |
-
formatFractionTotal: number => number,
|
4299 |
-
bulletClass: 'swiper-pagination-bullet',
|
4300 |
-
bulletActiveClass: 'swiper-pagination-bullet-active',
|
4301 |
-
modifierClass: 'swiper-pagination-', // NEW
|
4302 |
-
currentClass: 'swiper-pagination-current',
|
4303 |
-
totalClass: 'swiper-pagination-total',
|
4304 |
-
hiddenClass: 'swiper-pagination-hidden',
|
4305 |
-
progressbarFillClass: 'swiper-pagination-progressbar-fill',
|
4306 |
-
progressbarOppositeClass: 'swiper-pagination-progressbar-opposite',
|
4307 |
-
clickableClass: 'swiper-pagination-clickable', // NEW
|
4308 |
-
lockClass: 'swiper-pagination-lock',
|
4309 |
-
},
|
4310 |
-
},
|
4311 |
-
create() {
|
4312 |
-
const swiper = this;
|
4313 |
-
Utils.extend(swiper, {
|
4314 |
-
pagination: {
|
4315 |
-
init: Pagination.init.bind(swiper),
|
4316 |
-
render: Pagination.render.bind(swiper),
|
4317 |
-
update: Pagination.update.bind(swiper),
|
4318 |
-
destroy: Pagination.destroy.bind(swiper),
|
4319 |
-
dynamicBulletIndex: 0,
|
4320 |
-
},
|
4321 |
-
});
|
4322 |
-
},
|
4323 |
-
on: {
|
4324 |
-
init() {
|
4325 |
-
const swiper = this;
|
4326 |
-
swiper.pagination.init();
|
4327 |
-
swiper.pagination.render();
|
4328 |
-
swiper.pagination.update();
|
4329 |
-
},
|
4330 |
-
activeIndexChange() {
|
4331 |
-
const swiper = this;
|
4332 |
-
if (swiper.params.loop) {
|
4333 |
-
swiper.pagination.update();
|
4334 |
-
} else if (typeof swiper.snapIndex === 'undefined') {
|
4335 |
-
swiper.pagination.update();
|
4336 |
-
}
|
4337 |
-
},
|
4338 |
-
snapIndexChange() {
|
4339 |
-
const swiper = this;
|
4340 |
-
if (!swiper.params.loop) {
|
4341 |
-
swiper.pagination.update();
|
4342 |
-
}
|
4343 |
-
},
|
4344 |
-
slidesLengthChange() {
|
4345 |
-
const swiper = this;
|
4346 |
-
if (swiper.params.loop) {
|
4347 |
-
swiper.pagination.render();
|
4348 |
-
swiper.pagination.update();
|
4349 |
-
}
|
4350 |
-
},
|
4351 |
-
snapGridLengthChange() {
|
4352 |
-
const swiper = this;
|
4353 |
-
if (!swiper.params.loop) {
|
4354 |
-
swiper.pagination.render();
|
4355 |
-
swiper.pagination.update();
|
4356 |
-
}
|
4357 |
-
},
|
4358 |
-
destroy() {
|
4359 |
-
const swiper = this;
|
4360 |
-
swiper.pagination.destroy();
|
4361 |
-
},
|
4362 |
-
click(e) {
|
4363 |
-
const swiper = this;
|
4364 |
-
if (
|
4365 |
-
swiper.params.pagination.el
|
4366 |
-
&& swiper.params.pagination.hideOnClick
|
4367 |
-
&& swiper.pagination.$el.length > 0
|
4368 |
-
&& !$(e.target).hasClass(swiper.params.pagination.bulletClass)
|
4369 |
-
) {
|
4370 |
-
swiper.pagination.$el.toggleClass(swiper.params.pagination.hiddenClass);
|
4371 |
-
}
|
4372 |
-
},
|
4373 |
-
},
|
4374 |
-
};
|
4375 |
-
|
4376 |
-
const Scrollbar = {
|
4377 |
-
setTranslate() {
|
4378 |
-
const swiper = this;
|
4379 |
-
if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
|
4380 |
-
const { scrollbar, rtlTranslate: rtl, progress } = swiper;
|
4381 |
-
const {
|
4382 |
-
dragSize, trackSize, $dragEl, $el,
|
4383 |
-
} = scrollbar;
|
4384 |
-
const params = swiper.params.scrollbar;
|
4385 |
-
|
4386 |
-
let newSize = dragSize;
|
4387 |
-
let newPos = (trackSize - dragSize) * progress;
|
4388 |
-
if (rtl) {
|
4389 |
-
newPos = -newPos;
|
4390 |
-
if (newPos > 0) {
|
4391 |
-
newSize = dragSize - newPos;
|
4392 |
-
newPos = 0;
|
4393 |
-
} else if (-newPos + dragSize > trackSize) {
|
4394 |
-
newSize = trackSize + newPos;
|
4395 |
-
}
|
4396 |
-
} else if (newPos < 0) {
|
4397 |
-
newSize = dragSize + newPos;
|
4398 |
-
newPos = 0;
|
4399 |
-
} else if (newPos + dragSize > trackSize) {
|
4400 |
-
newSize = trackSize - newPos;
|
4401 |
-
}
|
4402 |
-
if (swiper.isHorizontal()) {
|
4403 |
-
if (Support.transforms3d) {
|
4404 |
-
$dragEl.transform(`translate3d(${newPos}px, 0, 0)`);
|
4405 |
-
} else {
|
4406 |
-
$dragEl.transform(`translateX(${newPos}px)`);
|
4407 |
-
}
|
4408 |
-
$dragEl[0].style.width = `${newSize}px`;
|
4409 |
-
} else {
|
4410 |
-
if (Support.transforms3d) {
|
4411 |
-
$dragEl.transform(`translate3d(0px, ${newPos}px, 0)`);
|
4412 |
-
} else {
|
4413 |
-
$dragEl.transform(`translateY(${newPos}px)`);
|
4414 |
-
}
|
4415 |
-
$dragEl[0].style.height = `${newSize}px`;
|
4416 |
-
}
|
4417 |
-
if (params.hide) {
|
4418 |
-
clearTimeout(swiper.scrollbar.timeout);
|
4419 |
-
$el[0].style.opacity = 1;
|
4420 |
-
swiper.scrollbar.timeout = setTimeout(() => {
|
4421 |
-
$el[0].style.opacity = 0;
|
4422 |
-
$el.transition(400);
|
4423 |
-
}, 1000);
|
4424 |
-
}
|
4425 |
-
},
|
4426 |
-
setTransition(duration) {
|
4427 |
-
const swiper = this;
|
4428 |
-
if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
|
4429 |
-
swiper.scrollbar.$dragEl.transition(duration);
|
4430 |
-
},
|
4431 |
-
updateSize() {
|
4432 |
-
const swiper = this;
|
4433 |
-
if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
|
4434 |
-
|
4435 |
-
const { scrollbar } = swiper;
|
4436 |
-
const { $dragEl, $el } = scrollbar;
|
4437 |
-
|
4438 |
-
$dragEl[0].style.width = '';
|
4439 |
-
$dragEl[0].style.height = '';
|
4440 |
-
const trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight;
|
4441 |
-
|
4442 |
-
const divider = swiper.size / swiper.virtualSize;
|
4443 |
-
const moveDivider = divider * (trackSize / swiper.size);
|
4444 |
-
let dragSize;
|
4445 |
-
if (swiper.params.scrollbar.dragSize === 'auto') {
|
4446 |
-
dragSize = trackSize * divider;
|
4447 |
-
} else {
|
4448 |
-
dragSize = parseInt(swiper.params.scrollbar.dragSize, 10);
|
4449 |
-
}
|
4450 |
-
|
4451 |
-
if (swiper.isHorizontal()) {
|
4452 |
-
$dragEl[0].style.width = `${dragSize}px`;
|
4453 |
-
} else {
|
4454 |
-
$dragEl[0].style.height = `${dragSize}px`;
|
4455 |
-
}
|
4456 |
-
|
4457 |
-
if (divider >= 1) {
|
4458 |
-
$el[0].style.display = 'none';
|
4459 |
-
} else {
|
4460 |
-
$el[0].style.display = '';
|
4461 |
-
}
|
4462 |
-
if (swiper.params.scrollbarHide) {
|
4463 |
-
$el[0].style.opacity = 0;
|
4464 |
-
}
|
4465 |
-
Utils.extend(scrollbar, {
|
4466 |
-
trackSize,
|
4467 |
-
divider,
|
4468 |
-
moveDivider,
|
4469 |
-
dragSize,
|
4470 |
-
});
|
4471 |
-
scrollbar.$el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass);
|
4472 |
-
},
|
4473 |
-
setDragPosition(e) {
|
4474 |
-
const swiper = this;
|
4475 |
-
const { scrollbar, rtlTranslate: rtl } = swiper;
|
4476 |
-
const { $el, dragSize, trackSize } = scrollbar;
|
4477 |
-
|
4478 |
-
let pointerPosition;
|
4479 |
-
if (swiper.isHorizontal()) {
|
4480 |
-
pointerPosition = ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX);
|
4481 |
-
} else {
|
4482 |
-
pointerPosition = ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY);
|
4483 |
-
}
|
4484 |
-
let positionRatio;
|
4485 |
-
positionRatio = ((pointerPosition) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] - (dragSize / 2)) / (trackSize - dragSize);
|
4486 |
-
positionRatio = Math.max(Math.min(positionRatio, 1), 0);
|
4487 |
-
if (rtl) {
|
4488 |
-
positionRatio = 1 - positionRatio;
|
4489 |
-
}
|
4490 |
-
|
4491 |
-
const position = swiper.minTranslate() + ((swiper.maxTranslate() - swiper.minTranslate()) * positionRatio);
|
4492 |
-
|
4493 |
-
swiper.updateProgress(position);
|
4494 |
-
swiper.setTranslate(position);
|
4495 |
-
swiper.updateActiveIndex();
|
4496 |
-
swiper.updateSlidesClasses();
|
4497 |
-
},
|
4498 |
-
onDragStart(e) {
|
4499 |
-
const swiper = this;
|
4500 |
-
const params = swiper.params.scrollbar;
|
4501 |
-
const { scrollbar, $wrapperEl } = swiper;
|
4502 |
-
const { $el, $dragEl } = scrollbar;
|
4503 |
-
swiper.scrollbar.isTouched = true;
|
4504 |
-
e.preventDefault();
|
4505 |
-
e.stopPropagation();
|
4506 |
-
|
4507 |
-
$wrapperEl.transition(100);
|
4508 |
-
$dragEl.transition(100);
|
4509 |
-
scrollbar.setDragPosition(e);
|
4510 |
-
|
4511 |
-
clearTimeout(swiper.scrollbar.dragTimeout);
|
4512 |
-
|
4513 |
-
$el.transition(0);
|
4514 |
-
if (params.hide) {
|
4515 |
-
$el.css('opacity', 1);
|
4516 |
-
}
|
4517 |
-
swiper.emit('scrollbarDragStart', e);
|
4518 |
-
},
|
4519 |
-
onDragMove(e) {
|
4520 |
-
const swiper = this;
|
4521 |
-
const { scrollbar, $wrapperEl } = swiper;
|
4522 |
-
const { $el, $dragEl } = scrollbar;
|
4523 |
-
|
4524 |
-
if (!swiper.scrollbar.isTouched) return;
|
4525 |
-
if (e.preventDefault) e.preventDefault();
|
4526 |
-
else e.returnValue = false;
|
4527 |
-
scrollbar.setDragPosition(e);
|
4528 |
-
$wrapperEl.transition(0);
|
4529 |
-
$el.transition(0);
|
4530 |
-
$dragEl.transition(0);
|
4531 |
-
swiper.emit('scrollbarDragMove', e);
|
4532 |
-
},
|
4533 |
-
onDragEnd(e) {
|
4534 |
-
const swiper = this;
|
4535 |
-
|
4536 |
-
const params = swiper.params.scrollbar;
|
4537 |
-
const { scrollbar } = swiper;
|
4538 |
-
const { $el } = scrollbar;
|
4539 |
-
|
4540 |
-
if (!swiper.scrollbar.isTouched) return;
|
4541 |
-
swiper.scrollbar.isTouched = false;
|
4542 |
-
if (params.hide) {
|
4543 |
-
clearTimeout(swiper.scrollbar.dragTimeout);
|
4544 |
-
swiper.scrollbar.dragTimeout = Utils.nextTick(() => {
|
4545 |
-
$el.css('opacity', 0);
|
4546 |
-
$el.transition(400);
|
4547 |
-
}, 1000);
|
4548 |
-
}
|
4549 |
-
swiper.emit('scrollbarDragEnd', e);
|
4550 |
-
if (params.snapOnRelease) {
|
4551 |
-
swiper.slideToClosest();
|
4552 |
-
}
|
4553 |
-
},
|
4554 |
-
enableDraggable() {
|
4555 |
-
const swiper = this;
|
4556 |
-
if (!swiper.params.scrollbar.el) return;
|
4557 |
-
const {
|
4558 |
-
scrollbar, touchEventsTouch, touchEventsDesktop, params,
|
4559 |
-
} = swiper;
|
4560 |
-
const $el = scrollbar.$el;
|
4561 |
-
const target = $el[0];
|
4562 |
-
const activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false;
|
4563 |
-
const passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
|
4564 |
-
if (!Support.touch) {
|
4565 |
-
target.addEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);
|
4566 |
-
document.addEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);
|
4567 |
-
document.addEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);
|
4568 |
-
} else {
|
4569 |
-
target.addEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener);
|
4570 |
-
target.addEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener);
|
4571 |
-
target.addEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener);
|
4572 |
-
}
|
4573 |
-
},
|
4574 |
-
disableDraggable() {
|
4575 |
-
const swiper = this;
|
4576 |
-
if (!swiper.params.scrollbar.el) return;
|
4577 |
-
const {
|
4578 |
-
scrollbar, touchEventsTouch, touchEventsDesktop, params,
|
4579 |
-
} = swiper;
|
4580 |
-
const $el = scrollbar.$el;
|
4581 |
-
const target = $el[0];
|
4582 |
-
const activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false;
|
4583 |
-
const passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
|
4584 |
-
if (!Support.touch) {
|
4585 |
-
target.removeEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);
|
4586 |
-
document.removeEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);
|
4587 |
-
document.removeEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);
|
4588 |
-
} else {
|
4589 |
-
target.removeEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener);
|
4590 |
-
target.removeEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener);
|
4591 |
-
target.removeEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener);
|
4592 |
-
}
|
4593 |
-
},
|
4594 |
-
init() {
|
4595 |
-
const swiper = this;
|
4596 |
-
if (!swiper.params.scrollbar.el) return;
|
4597 |
-
const { scrollbar, $el: $swiperEl } = swiper;
|
4598 |
-
const params = swiper.params.scrollbar;
|
4599 |
-
|
4600 |
-
let $el = $(params.el);
|
4601 |
-
if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) {
|
4602 |
-
$el = $swiperEl.find(params.el);
|
4603 |
-
}
|
4604 |
-
|
4605 |
-
let $dragEl = $el.find(`.${swiper.params.scrollbar.dragClass}`);
|
4606 |
-
if ($dragEl.length === 0) {
|
4607 |
-
$dragEl = $(`<div class="${swiper.params.scrollbar.dragClass}"></div>`);
|
4608 |
-
$el.append($dragEl);
|
4609 |
-
}
|
4610 |
-
|
4611 |
-
Utils.extend(scrollbar, {
|
4612 |
-
$el,
|
4613 |
-
el: $el[0],
|
4614 |
-
$dragEl,
|
4615 |
-
dragEl: $dragEl[0],
|
4616 |
-
});
|
4617 |
-
|
4618 |
-
if (params.draggable) {
|
4619 |
-
scrollbar.enableDraggable();
|
4620 |
-
}
|
4621 |
-
},
|
4622 |
-
destroy() {
|
4623 |
-
const swiper = this;
|
4624 |
-
swiper.scrollbar.disableDraggable();
|
4625 |
-
},
|
4626 |
-
};
|
4627 |
-
|
4628 |
-
var scrollbar = {
|
4629 |
-
name: 'scrollbar',
|
4630 |
-
params: {
|
4631 |
-
scrollbar: {
|
4632 |
-
el: null,
|
4633 |
-
dragSize: 'auto',
|
4634 |
-
hide: false,
|
4635 |
-
draggable: false,
|
4636 |
-
snapOnRelease: true,
|
4637 |
-
lockClass: 'swiper-scrollbar-lock',
|
4638 |
-
dragClass: 'swiper-scrollbar-drag',
|
4639 |
-
},
|
4640 |
-
},
|
4641 |
-
create() {
|
4642 |
-
const swiper = this;
|
4643 |
-
Utils.extend(swiper, {
|
4644 |
-
scrollbar: {
|
4645 |
-
init: Scrollbar.init.bind(swiper),
|
4646 |
-
destroy: Scrollbar.destroy.bind(swiper),
|
4647 |
-
updateSize: Scrollbar.updateSize.bind(swiper),
|
4648 |
-
setTranslate: Scrollbar.setTranslate.bind(swiper),
|
4649 |
-
setTransition: Scrollbar.setTransition.bind(swiper),
|
4650 |
-
enableDraggable: Scrollbar.enableDraggable.bind(swiper),
|
4651 |
-
disableDraggable: Scrollbar.disableDraggable.bind(swiper),
|
4652 |
-
setDragPosition: Scrollbar.setDragPosition.bind(swiper),
|
4653 |
-
onDragStart: Scrollbar.onDragStart.bind(swiper),
|
4654 |
-
onDragMove: Scrollbar.onDragMove.bind(swiper),
|
4655 |
-
onDragEnd: Scrollbar.onDragEnd.bind(swiper),
|
4656 |
-
isTouched: false,
|
4657 |
-
timeout: null,
|
4658 |
-
dragTimeout: null,
|
4659 |
-
},
|
4660 |
-
});
|
4661 |
-
},
|
4662 |
-
on: {
|
4663 |
-
init() {
|
4664 |
-
const swiper = this;
|
4665 |
-
swiper.scrollbar.init();
|
4666 |
-
swiper.scrollbar.updateSize();
|
4667 |
-
swiper.scrollbar.setTranslate();
|
4668 |
-
},
|
4669 |
-
update() {
|
4670 |
-
const swiper = this;
|
4671 |
-
swiper.scrollbar.updateSize();
|
4672 |
-
},
|
4673 |
-
resize() {
|
4674 |
-
const swiper = this;
|
4675 |
-
swiper.scrollbar.updateSize();
|
4676 |
-
},
|
4677 |
-
observerUpdate() {
|
4678 |
-
const swiper = this;
|
4679 |
-
swiper.scrollbar.updateSize();
|
4680 |
-
},
|
4681 |
-
setTranslate() {
|
4682 |
-
const swiper = this;
|
4683 |
-
swiper.scrollbar.setTranslate();
|
4684 |
-
},
|
4685 |
-
setTransition(duration) {
|
4686 |
-
const swiper = this;
|
4687 |
-
swiper.scrollbar.setTransition(duration);
|
4688 |
-
},
|
4689 |
-
destroy() {
|
4690 |
-
const swiper = this;
|
4691 |
-
swiper.scrollbar.destroy();
|
4692 |
-
},
|
4693 |
-
},
|
4694 |
-
};
|
4695 |
-
|
4696 |
-
const Parallax = {
|
4697 |
-
setTransform(el, progress) {
|
4698 |
-
const swiper = this;
|
4699 |
-
const { rtl } = swiper;
|
4700 |
-
|
4701 |
-
const $el = $(el);
|
4702 |
-
const rtlFactor = rtl ? -1 : 1;
|
4703 |
-
|
4704 |
-
const p = $el.attr('data-swiper-parallax') || '0';
|
4705 |
-
let x = $el.attr('data-swiper-parallax-x');
|
4706 |
-
let y = $el.attr('data-swiper-parallax-y');
|
4707 |
-
const scale = $el.attr('data-swiper-parallax-scale');
|
4708 |
-
const opacity = $el.attr('data-swiper-parallax-opacity');
|
4709 |
-
|
4710 |
-
if (x || y) {
|
4711 |
-
x = x || '0';
|
4712 |
-
y = y || '0';
|
4713 |
-
} else if (swiper.isHorizontal()) {
|
4714 |
-
x = p;
|
4715 |
-
y = '0';
|
4716 |
-
} else {
|
4717 |
-
y = p;
|
4718 |
-
x = '0';
|
4719 |
-
}
|
4720 |
-
|
4721 |
-
if ((x).indexOf('%') >= 0) {
|
4722 |
-
x = `${parseInt(x, 10) * progress * rtlFactor}%`;
|
4723 |
-
} else {
|
4724 |
-
x = `${x * progress * rtlFactor}px`;
|
4725 |
-
}
|
4726 |
-
if ((y).indexOf('%') >= 0) {
|
4727 |
-
y = `${parseInt(y, 10) * progress}%`;
|
4728 |
-
} else {
|
4729 |
-
y = `${y * progress}px`;
|
4730 |
-
}
|
4731 |
-
|
4732 |
-
if (typeof opacity !== 'undefined' && opacity !== null) {
|
4733 |
-
const currentOpacity = opacity - ((opacity - 1) * (1 - Math.abs(progress)));
|
4734 |
-
$el[0].style.opacity = currentOpacity;
|
4735 |
-
}
|
4736 |
-
if (typeof scale === 'undefined' || scale === null) {
|
4737 |
-
$el.transform(`translate3d(${x}, ${y}, 0px)`);
|
4738 |
-
} else {
|
4739 |
-
const currentScale = scale - ((scale - 1) * (1 - Math.abs(progress)));
|
4740 |
-
$el.transform(`translate3d(${x}, ${y}, 0px) scale(${currentScale})`);
|
4741 |
-
}
|
4742 |
-
},
|
4743 |
-
setTranslate() {
|
4744 |
-
const swiper = this;
|
4745 |
-
const {
|
4746 |
-
$el, slides, progress, snapGrid,
|
4747 |
-
} = swiper;
|
4748 |
-
$el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
|
4749 |
-
.each((index$$1, el) => {
|
4750 |
-
swiper.parallax.setTransform(el, progress);
|
4751 |
-
});
|
4752 |
-
slides.each((slideIndex, slideEl) => {
|
4753 |
-
let slideProgress = slideEl.progress;
|
4754 |
-
if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') {
|
4755 |
-
slideProgress += Math.ceil(slideIndex / 2) - (progress * (snapGrid.length - 1));
|
4756 |
-
}
|
4757 |
-
slideProgress = Math.min(Math.max(slideProgress, -1), 1);
|
4758 |
-
$(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
|
4759 |
-
.each((index$$1, el) => {
|
4760 |
-
swiper.parallax.setTransform(el, slideProgress);
|
4761 |
-
});
|
4762 |
-
});
|
4763 |
-
},
|
4764 |
-
setTransition(duration = this.params.speed) {
|
4765 |
-
const swiper = this;
|
4766 |
-
const { $el } = swiper;
|
4767 |
-
$el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
|
4768 |
-
.each((index$$1, parallaxEl) => {
|
4769 |
-
const $parallaxEl = $(parallaxEl);
|
4770 |
-
let parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration;
|
4771 |
-
if (duration === 0) parallaxDuration = 0;
|
4772 |
-
$parallaxEl.transition(parallaxDuration);
|
4773 |
-
});
|
4774 |
-
},
|
4775 |
-
};
|
4776 |
-
|
4777 |
-
var parallax = {
|
4778 |
-
name: 'parallax',
|
4779 |
-
params: {
|
4780 |
-
parallax: {
|
4781 |
-
enabled: false,
|
4782 |
-
},
|
4783 |
-
},
|
4784 |
-
create() {
|
4785 |
-
const swiper = this;
|
4786 |
-
Utils.extend(swiper, {
|
4787 |
-
parallax: {
|
4788 |
-
setTransform: Parallax.setTransform.bind(swiper),
|
4789 |
-
setTranslate: Parallax.setTranslate.bind(swiper),
|
4790 |
-
setTransition: Parallax.setTransition.bind(swiper),
|
4791 |
-
},
|
4792 |
-
});
|
4793 |
-
},
|
4794 |
-
on: {
|
4795 |
-
beforeInit() {
|
4796 |
-
const swiper = this;
|
4797 |
-
if (!swiper.params.parallax.enabled) return;
|
4798 |
-
swiper.params.watchSlidesProgress = true;
|
4799 |
-
swiper.originalParams.watchSlidesProgress = true;
|
4800 |
-
},
|
4801 |
-
init() {
|
4802 |
-
const swiper = this;
|
4803 |
-
if (!swiper.params.parallax) return;
|
4804 |
-
swiper.parallax.setTranslate();
|
4805 |
-
},
|
4806 |
-
setTranslate() {
|
4807 |
-
const swiper = this;
|
4808 |
-
if (!swiper.params.parallax) return;
|
4809 |
-
swiper.parallax.setTranslate();
|
4810 |
-
},
|
4811 |
-
setTransition(duration) {
|
4812 |
-
const swiper = this;
|
4813 |
-
if (!swiper.params.parallax) return;
|
4814 |
-
swiper.parallax.setTransition(duration);
|
4815 |
-
},
|
4816 |
-
},
|
4817 |
-
};
|
4818 |
-
|
4819 |
-
const Zoom = {
|
4820 |
-
// Calc Scale From Multi-touches
|
4821 |
-
getDistanceBetweenTouches(e) {
|
4822 |
-
if (e.targetTouches.length < 2) return 1;
|
4823 |
-
const x1 = e.targetTouches[0].pageX;
|
4824 |
-
const y1 = e.targetTouches[0].pageY;
|
4825 |
-
const x2 = e.targetTouches[1].pageX;
|
4826 |
-
const y2 = e.targetTouches[1].pageY;
|
4827 |
-
const distance = Math.sqrt(((x2 - x1) ** 2) + ((y2 - y1) ** 2));
|
4828 |
-
return distance;
|
4829 |
-
},
|
4830 |
-
// Events
|
4831 |
-
onGestureStart(e) {
|
4832 |
-
const swiper = this;
|
4833 |
-
const params = swiper.params.zoom;
|
4834 |
-
const zoom = swiper.zoom;
|
4835 |
-
const { gesture } = zoom;
|
4836 |
-
zoom.fakeGestureTouched = false;
|
4837 |
-
zoom.fakeGestureMoved = false;
|
4838 |
-
if (!Support.gestures) {
|
4839 |
-
if (e.type !== 'touchstart' || (e.type === 'touchstart' && e.targetTouches.length < 2)) {
|
4840 |
-
return;
|
4841 |
-
}
|
4842 |
-
zoom.fakeGestureTouched = true;
|
4843 |
-
gesture.scaleStart = Zoom.getDistanceBetweenTouches(e);
|
4844 |
-
}
|
4845 |
-
if (!gesture.$slideEl || !gesture.$slideEl.length) {
|
4846 |
-
gesture.$slideEl = $(e.target).closest('.swiper-slide');
|
4847 |
-
if (gesture.$slideEl.length === 0) gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);
|
4848 |
-
gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
|
4849 |
-
gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);
|
4850 |
-
gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
|
4851 |
-
if (gesture.$imageWrapEl.length === 0) {
|
4852 |
-
gesture.$imageEl = undefined;
|
4853 |
-
return;
|
4854 |
-
}
|
4855 |
-
}
|
4856 |
-
gesture.$imageEl.transition(0);
|
4857 |
-
swiper.zoom.isScaling = true;
|
4858 |
-
},
|
4859 |
-
onGestureChange(e) {
|
4860 |
-
const swiper = this;
|
4861 |
-
const params = swiper.params.zoom;
|
4862 |
-
const zoom = swiper.zoom;
|
4863 |
-
const { gesture } = zoom;
|
4864 |
-
if (!Support.gestures) {
|
4865 |
-
if (e.type !== 'touchmove' || (e.type === 'touchmove' && e.targetTouches.length < 2)) {
|
4866 |
-
return;
|
4867 |
-
}
|
4868 |
-
zoom.fakeGestureMoved = true;
|
4869 |
-
gesture.scaleMove = Zoom.getDistanceBetweenTouches(e);
|
4870 |
-
}
|
4871 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
|
4872 |
-
if (Support.gestures) {
|
4873 |
-
zoom.scale = e.scale * zoom.currentScale;
|
4874 |
-
} else {
|
4875 |
-
zoom.scale = (gesture.scaleMove / gesture.scaleStart) * zoom.currentScale;
|
4876 |
-
}
|
4877 |
-
if (zoom.scale > gesture.maxRatio) {
|
4878 |
-
zoom.scale = (gesture.maxRatio - 1) + (((zoom.scale - gesture.maxRatio) + 1) ** 0.5);
|
4879 |
-
}
|
4880 |
-
if (zoom.scale < params.minRatio) {
|
4881 |
-
zoom.scale = (params.minRatio + 1) - (((params.minRatio - zoom.scale) + 1) ** 0.5);
|
4882 |
-
}
|
4883 |
-
gesture.$imageEl.transform(`translate3d(0,0,0) scale(${zoom.scale})`);
|
4884 |
-
},
|
4885 |
-
onGestureEnd(e) {
|
4886 |
-
const swiper = this;
|
4887 |
-
const params = swiper.params.zoom;
|
4888 |
-
const zoom = swiper.zoom;
|
4889 |
-
const { gesture } = zoom;
|
4890 |
-
if (!Support.gestures) {
|
4891 |
-
if (!zoom.fakeGestureTouched || !zoom.fakeGestureMoved) {
|
4892 |
-
return;
|
4893 |
-
}
|
4894 |
-
if (e.type !== 'touchend' || (e.type === 'touchend' && e.changedTouches.length < 2 && !Device.android)) {
|
4895 |
-
return;
|
4896 |
-
}
|
4897 |
-
zoom.fakeGestureTouched = false;
|
4898 |
-
zoom.fakeGestureMoved = false;
|
4899 |
-
}
|
4900 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
|
4901 |
-
zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio);
|
4902 |
-
gesture.$imageEl.transition(swiper.params.speed).transform(`translate3d(0,0,0) scale(${zoom.scale})`);
|
4903 |
-
zoom.currentScale = zoom.scale;
|
4904 |
-
zoom.isScaling = false;
|
4905 |
-
if (zoom.scale === 1) gesture.$slideEl = undefined;
|
4906 |
-
},
|
4907 |
-
onTouchStart(e) {
|
4908 |
-
const swiper = this;
|
4909 |
-
const zoom = swiper.zoom;
|
4910 |
-
const { gesture, image } = zoom;
|
4911 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
|
4912 |
-
if (image.isTouched) return;
|
4913 |
-
if (Device.android) e.preventDefault();
|
4914 |
-
image.isTouched = true;
|
4915 |
-
image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
|
4916 |
-
image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
|
4917 |
-
},
|
4918 |
-
onTouchMove(e) {
|
4919 |
-
const swiper = this;
|
4920 |
-
const zoom = swiper.zoom;
|
4921 |
-
const { gesture, image, velocity } = zoom;
|
4922 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
|
4923 |
-
swiper.allowClick = false;
|
4924 |
-
if (!image.isTouched || !gesture.$slideEl) return;
|
4925 |
-
|
4926 |
-
if (!image.isMoved) {
|
4927 |
-
image.width = gesture.$imageEl[0].offsetWidth;
|
4928 |
-
image.height = gesture.$imageEl[0].offsetHeight;
|
4929 |
-
image.startX = Utils.getTranslate(gesture.$imageWrapEl[0], 'x') || 0;
|
4930 |
-
image.startY = Utils.getTranslate(gesture.$imageWrapEl[0], 'y') || 0;
|
4931 |
-
gesture.slideWidth = gesture.$slideEl[0].offsetWidth;
|
4932 |
-
gesture.slideHeight = gesture.$slideEl[0].offsetHeight;
|
4933 |
-
gesture.$imageWrapEl.transition(0);
|
4934 |
-
if (swiper.rtl) {
|
4935 |
-
image.startX = -image.startX;
|
4936 |
-
image.startY = -image.startY;
|
4937 |
-
}
|
4938 |
-
}
|
4939 |
-
// Define if we need image drag
|
4940 |
-
const scaledWidth = image.width * zoom.scale;
|
4941 |
-
const scaledHeight = image.height * zoom.scale;
|
4942 |
-
|
4943 |
-
if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return;
|
4944 |
-
|
4945 |
-
image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);
|
4946 |
-
image.maxX = -image.minX;
|
4947 |
-
image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);
|
4948 |
-
image.maxY = -image.minY;
|
4949 |
-
|
4950 |
-
image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
|
4951 |
-
image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
|
4952 |
-
|
4953 |
-
if (!image.isMoved && !zoom.isScaling) {
|
4954 |
-
if (
|
4955 |
-
swiper.isHorizontal()
|
4956 |
-
&& (
|
4957 |
-
(Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x)
|
4958 |
-
|| (Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)
|
4959 |
-
)
|
4960 |
-
) {
|
4961 |
-
image.isTouched = false;
|
4962 |
-
return;
|
4963 |
-
} if (
|
4964 |
-
!swiper.isHorizontal()
|
4965 |
-
&& (
|
4966 |
-
(Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y)
|
4967 |
-
|| (Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)
|
4968 |
-
)
|
4969 |
-
) {
|
4970 |
-
image.isTouched = false;
|
4971 |
-
return;
|
4972 |
-
}
|
4973 |
-
}
|
4974 |
-
e.preventDefault();
|
4975 |
-
e.stopPropagation();
|
4976 |
-
|
4977 |
-
image.isMoved = true;
|
4978 |
-
image.currentX = (image.touchesCurrent.x - image.touchesStart.x) + image.startX;
|
4979 |
-
image.currentY = (image.touchesCurrent.y - image.touchesStart.y) + image.startY;
|
4980 |
-
|
4981 |
-
if (image.currentX < image.minX) {
|
4982 |
-
image.currentX = (image.minX + 1) - (((image.minX - image.currentX) + 1) ** 0.8);
|
4983 |
-
}
|
4984 |
-
if (image.currentX > image.maxX) {
|
4985 |
-
image.currentX = (image.maxX - 1) + (((image.currentX - image.maxX) + 1) ** 0.8);
|
4986 |
-
}
|
4987 |
-
|
4988 |
-
if (image.currentY < image.minY) {
|
4989 |
-
image.currentY = (image.minY + 1) - (((image.minY - image.currentY) + 1) ** 0.8);
|
4990 |
-
}
|
4991 |
-
if (image.currentY > image.maxY) {
|
4992 |
-
image.currentY = (image.maxY - 1) + (((image.currentY - image.maxY) + 1) ** 0.8);
|
4993 |
-
}
|
4994 |
-
|
4995 |
-
// Velocity
|
4996 |
-
if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x;
|
4997 |
-
if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y;
|
4998 |
-
if (!velocity.prevTime) velocity.prevTime = Date.now();
|
4999 |
-
velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2;
|
5000 |
-
velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2;
|
5001 |
-
if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0;
|
5002 |
-
if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0;
|
5003 |
-
velocity.prevPositionX = image.touchesCurrent.x;
|
5004 |
-
velocity.prevPositionY = image.touchesCurrent.y;
|
5005 |
-
velocity.prevTime = Date.now();
|
5006 |
-
|
5007 |
-
gesture.$imageWrapEl.transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);
|
5008 |
-
},
|
5009 |
-
onTouchEnd() {
|
5010 |
-
const swiper = this;
|
5011 |
-
const zoom = swiper.zoom;
|
5012 |
-
const { gesture, image, velocity } = zoom;
|
5013 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
|
5014 |
-
if (!image.isTouched || !image.isMoved) {
|
5015 |
-
image.isTouched = false;
|
5016 |
-
image.isMoved = false;
|
5017 |
-
return;
|
5018 |
-
}
|
5019 |
-
image.isTouched = false;
|
5020 |
-
image.isMoved = false;
|
5021 |
-
let momentumDurationX = 300;
|
5022 |
-
let momentumDurationY = 300;
|
5023 |
-
const momentumDistanceX = velocity.x * momentumDurationX;
|
5024 |
-
const newPositionX = image.currentX + momentumDistanceX;
|
5025 |
-
const momentumDistanceY = velocity.y * momentumDurationY;
|
5026 |
-
const newPositionY = image.currentY + momentumDistanceY;
|
5027 |
-
|
5028 |
-
// Fix duration
|
5029 |
-
if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x);
|
5030 |
-
if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y);
|
5031 |
-
const momentumDuration = Math.max(momentumDurationX, momentumDurationY);
|
5032 |
-
|
5033 |
-
image.currentX = newPositionX;
|
5034 |
-
image.currentY = newPositionY;
|
5035 |
-
|
5036 |
-
// Define if we need image drag
|
5037 |
-
const scaledWidth = image.width * zoom.scale;
|
5038 |
-
const scaledHeight = image.height * zoom.scale;
|
5039 |
-
image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);
|
5040 |
-
image.maxX = -image.minX;
|
5041 |
-
image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);
|
5042 |
-
image.maxY = -image.minY;
|
5043 |
-
image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX);
|
5044 |
-
image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY);
|
5045 |
-
|
5046 |
-
gesture.$imageWrapEl.transition(momentumDuration).transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);
|
5047 |
-
},
|
5048 |
-
onTransitionEnd() {
|
5049 |
-
const swiper = this;
|
5050 |
-
const zoom = swiper.zoom;
|
5051 |
-
const { gesture } = zoom;
|
5052 |
-
if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) {
|
5053 |
-
gesture.$imageEl.transform('translate3d(0,0,0) scale(1)');
|
5054 |
-
gesture.$imageWrapEl.transform('translate3d(0,0,0)');
|
5055 |
-
|
5056 |
-
zoom.scale = 1;
|
5057 |
-
zoom.currentScale = 1;
|
5058 |
-
|
5059 |
-
gesture.$slideEl = undefined;
|
5060 |
-
gesture.$imageEl = undefined;
|
5061 |
-
gesture.$imageWrapEl = undefined;
|
5062 |
-
}
|
5063 |
-
},
|
5064 |
-
// Toggle Zoom
|
5065 |
-
toggle(e) {
|
5066 |
-
const swiper = this;
|
5067 |
-
const zoom = swiper.zoom;
|
5068 |
-
|
5069 |
-
if (zoom.scale && zoom.scale !== 1) {
|
5070 |
-
// Zoom Out
|
5071 |
-
zoom.out();
|
5072 |
-
} else {
|
5073 |
-
// Zoom In
|
5074 |
-
zoom.in(e);
|
5075 |
-
}
|
5076 |
-
},
|
5077 |
-
in(e) {
|
5078 |
-
const swiper = this;
|
5079 |
-
|
5080 |
-
const zoom = swiper.zoom;
|
5081 |
-
const params = swiper.params.zoom;
|
5082 |
-
const { gesture, image } = zoom;
|
5083 |
-
|
5084 |
-
if (!gesture.$slideEl) {
|
5085 |
-
gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex);
|
5086 |
-
gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
|
5087 |
-
gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);
|
5088 |
-
}
|
5089 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
|
5090 |
-
|
5091 |
-
gesture.$slideEl.addClass(`${params.zoomedSlideClass}`);
|
5092 |
-
|
5093 |
-
let touchX;
|
5094 |
-
let touchY;
|
5095 |
-
let offsetX;
|
5096 |
-
let offsetY;
|
5097 |
-
let diffX;
|
5098 |
-
let diffY;
|
5099 |
-
let translateX;
|
5100 |
-
let translateY;
|
5101 |
-
let imageWidth;
|
5102 |
-
let imageHeight;
|
5103 |
-
let scaledWidth;
|
5104 |
-
let scaledHeight;
|
5105 |
-
let translateMinX;
|
5106 |
-
let translateMinY;
|
5107 |
-
let translateMaxX;
|
5108 |
-
let translateMaxY;
|
5109 |
-
let slideWidth;
|
5110 |
-
let slideHeight;
|
5111 |
-
|
5112 |
-
if (typeof image.touchesStart.x === 'undefined' && e) {
|
5113 |
-
touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;
|
5114 |
-
touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;
|
5115 |
-
} else {
|
5116 |
-
touchX = image.touchesStart.x;
|
5117 |
-
touchY = image.touchesStart.y;
|
5118 |
-
}
|
5119 |
-
|
5120 |
-
zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
|
5121 |
-
zoom.currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
|
5122 |
-
if (e) {
|
5123 |
-
slideWidth = gesture.$slideEl[0].offsetWidth;
|
5124 |
-
slideHeight = gesture.$slideEl[0].offsetHeight;
|
5125 |
-
offsetX = gesture.$slideEl.offset().left;
|
5126 |
-
offsetY = gesture.$slideEl.offset().top;
|
5127 |
-
diffX = (offsetX + (slideWidth / 2)) - touchX;
|
5128 |
-
diffY = (offsetY + (slideHeight / 2)) - touchY;
|
5129 |
-
|
5130 |
-
imageWidth = gesture.$imageEl[0].offsetWidth;
|
5131 |
-
imageHeight = gesture.$imageEl[0].offsetHeight;
|
5132 |
-
scaledWidth = imageWidth * zoom.scale;
|
5133 |
-
scaledHeight = imageHeight * zoom.scale;
|
5134 |
-
|
5135 |
-
translateMinX = Math.min(((slideWidth / 2) - (scaledWidth / 2)), 0);
|
5136 |
-
translateMinY = Math.min(((slideHeight / 2) - (scaledHeight / 2)), 0);
|
5137 |
-
translateMaxX = -translateMinX;
|
5138 |
-
translateMaxY = -translateMinY;
|
5139 |
-
|
5140 |
-
translateX = diffX * zoom.scale;
|
5141 |
-
translateY = diffY * zoom.scale;
|
5142 |
-
|
5143 |
-
if (translateX < translateMinX) {
|
5144 |
-
translateX = translateMinX;
|
5145 |
-
}
|
5146 |
-
if (translateX > translateMaxX) {
|
5147 |
-
translateX = translateMaxX;
|
5148 |
-
}
|
5149 |
-
|
5150 |
-
if (translateY < translateMinY) {
|
5151 |
-
translateY = translateMinY;
|
5152 |
-
}
|
5153 |
-
if (translateY > translateMaxY) {
|
5154 |
-
translateY = translateMaxY;
|
5155 |
-
}
|
5156 |
-
} else {
|
5157 |
-
translateX = 0;
|
5158 |
-
translateY = 0;
|
5159 |
-
}
|
5160 |
-
gesture.$imageWrapEl.transition(300).transform(`translate3d(${translateX}px, ${translateY}px,0)`);
|
5161 |
-
gesture.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${zoom.scale})`);
|
5162 |
-
},
|
5163 |
-
out() {
|
5164 |
-
const swiper = this;
|
5165 |
-
|
5166 |
-
const zoom = swiper.zoom;
|
5167 |
-
const params = swiper.params.zoom;
|
5168 |
-
const { gesture } = zoom;
|
5169 |
-
|
5170 |
-
if (!gesture.$slideEl) {
|
5171 |
-
gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex);
|
5172 |
-
gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
|
5173 |
-
gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);
|
5174 |
-
}
|
5175 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
|
5176 |
-
|
5177 |
-
zoom.scale = 1;
|
5178 |
-
zoom.currentScale = 1;
|
5179 |
-
gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)');
|
5180 |
-
gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)');
|
5181 |
-
gesture.$slideEl.removeClass(`${params.zoomedSlideClass}`);
|
5182 |
-
gesture.$slideEl = undefined;
|
5183 |
-
},
|
5184 |
-
// Attach/Detach Events
|
5185 |
-
enable() {
|
5186 |
-
const swiper = this;
|
5187 |
-
const zoom = swiper.zoom;
|
5188 |
-
if (zoom.enabled) return;
|
5189 |
-
zoom.enabled = true;
|
5190 |
-
|
5191 |
-
const passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;
|
5192 |
-
|
5193 |
-
// Scale image
|
5194 |
-
if (Support.gestures) {
|
5195 |
-
swiper.$wrapperEl.on('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener);
|
5196 |
-
swiper.$wrapperEl.on('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener);
|
5197 |
-
swiper.$wrapperEl.on('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener);
|
5198 |
-
} else if (swiper.touchEvents.start === 'touchstart') {
|
5199 |
-
swiper.$wrapperEl.on(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener);
|
5200 |
-
swiper.$wrapperEl.on(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, passiveListener);
|
5201 |
-
swiper.$wrapperEl.on(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener);
|
5202 |
-
}
|
5203 |
-
|
5204 |
-
// Move image
|
5205 |
-
swiper.$wrapperEl.on(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, zoom.onTouchMove);
|
5206 |
-
},
|
5207 |
-
disable() {
|
5208 |
-
const swiper = this;
|
5209 |
-
const zoom = swiper.zoom;
|
5210 |
-
if (!zoom.enabled) return;
|
5211 |
-
|
5212 |
-
swiper.zoom.enabled = false;
|
5213 |
-
|
5214 |
-
const passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;
|
5215 |
-
|
5216 |
-
// Scale image
|
5217 |
-
if (Support.gestures) {
|
5218 |
-
swiper.$wrapperEl.off('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener);
|
5219 |
-
swiper.$wrapperEl.off('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener);
|
5220 |
-
swiper.$wrapperEl.off('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener);
|
5221 |
-
} else if (swiper.touchEvents.start === 'touchstart') {
|
5222 |
-
swiper.$wrapperEl.off(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener);
|
5223 |
-
swiper.$wrapperEl.off(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, passiveListener);
|
5224 |
-
swiper.$wrapperEl.off(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener);
|
5225 |
-
}
|
5226 |
-
|
5227 |
-
// Move image
|
5228 |
-
swiper.$wrapperEl.off(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, zoom.onTouchMove);
|
5229 |
-
},
|
5230 |
-
};
|
5231 |
-
|
5232 |
-
var zoom = {
|
5233 |
-
name: 'zoom',
|
5234 |
-
params: {
|
5235 |
-
zoom: {
|
5236 |
-
enabled: false,
|
5237 |
-
maxRatio: 3,
|
5238 |
-
minRatio: 1,
|
5239 |
-
toggle: true,
|
5240 |
-
containerClass: 'swiper-zoom-container',
|
5241 |
-
zoomedSlideClass: 'swiper-slide-zoomed',
|
5242 |
-
},
|
5243 |
-
},
|
5244 |
-
create() {
|
5245 |
-
const swiper = this;
|
5246 |
-
const zoom = {
|
5247 |
-
enabled: false,
|
5248 |
-
scale: 1,
|
5249 |
-
currentScale: 1,
|
5250 |
-
isScaling: false,
|
5251 |
-
gesture: {
|
5252 |
-
$slideEl: undefined,
|
5253 |
-
slideWidth: undefined,
|
5254 |
-
slideHeight: undefined,
|
5255 |
-
$imageEl: undefined,
|
5256 |
-
$imageWrapEl: undefined,
|
5257 |
-
maxRatio: 3,
|
5258 |
-
},
|
5259 |
-
image: {
|
5260 |
-
isTouched: undefined,
|
5261 |
-
isMoved: undefined,
|
5262 |
-
currentX: undefined,
|
5263 |
-
currentY: undefined,
|
5264 |
-
minX: undefined,
|
5265 |
-
minY: undefined,
|
5266 |
-
maxX: undefined,
|
5267 |
-
maxY: undefined,
|
5268 |
-
width: undefined,
|
5269 |
-
height: undefined,
|
5270 |
-
startX: undefined,
|
5271 |
-
startY: undefined,
|
5272 |
-
touchesStart: {},
|
5273 |
-
touchesCurrent: {},
|
5274 |
-
},
|
5275 |
-
velocity: {
|
5276 |
-
x: undefined,
|
5277 |
-
y: undefined,
|
5278 |
-
prevPositionX: undefined,
|
5279 |
-
prevPositionY: undefined,
|
5280 |
-
prevTime: undefined,
|
5281 |
-
},
|
5282 |
-
};
|
5283 |
-
|
5284 |
-
('onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out').split(' ').forEach((methodName) => {
|
5285 |
-
zoom[methodName] = Zoom[methodName].bind(swiper);
|
5286 |
-
});
|
5287 |
-
Utils.extend(swiper, {
|
5288 |
-
zoom,
|
5289 |
-
});
|
5290 |
-
|
5291 |
-
let scale = 1;
|
5292 |
-
Object.defineProperty(swiper.zoom, 'scale', {
|
5293 |
-
get() {
|
5294 |
-
return scale;
|
5295 |
-
},
|
5296 |
-
set(value) {
|
5297 |
-
if (scale !== value) {
|
5298 |
-
const imageEl = swiper.zoom.gesture.$imageEl ? swiper.zoom.gesture.$imageEl[0] : undefined;
|
5299 |
-
const slideEl = swiper.zoom.gesture.$slideEl ? swiper.zoom.gesture.$slideEl[0] : undefined;
|
5300 |
-
swiper.emit('zoomChange', value, imageEl, slideEl);
|
5301 |
-
}
|
5302 |
-
scale = value;
|
5303 |
-
},
|
5304 |
-
});
|
5305 |
-
},
|
5306 |
-
on: {
|
5307 |
-
init() {
|
5308 |
-
const swiper = this;
|
5309 |
-
if (swiper.params.zoom.enabled) {
|
5310 |
-
swiper.zoom.enable();
|
5311 |
-
}
|
5312 |
-
},
|
5313 |
-
destroy() {
|
5314 |
-
const swiper = this;
|
5315 |
-
swiper.zoom.disable();
|
5316 |
-
},
|
5317 |
-
touchStart(e) {
|
5318 |
-
const swiper = this;
|
5319 |
-
if (!swiper.zoom.enabled) return;
|
5320 |
-
swiper.zoom.onTouchStart(e);
|
5321 |
-
},
|
5322 |
-
touchEnd(e) {
|
5323 |
-
const swiper = this;
|
5324 |
-
if (!swiper.zoom.enabled) return;
|
5325 |
-
swiper.zoom.onTouchEnd(e);
|
5326 |
-
},
|
5327 |
-
doubleTap(e) {
|
5328 |
-
const swiper = this;
|
5329 |
-
if (swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) {
|
5330 |
-
swiper.zoom.toggle(e);
|
5331 |
-
}
|
5332 |
-
},
|
5333 |
-
transitionEnd() {
|
5334 |
-
const swiper = this;
|
5335 |
-
if (swiper.zoom.enabled && swiper.params.zoom.enabled) {
|
5336 |
-
swiper.zoom.onTransitionEnd();
|
5337 |
-
}
|
5338 |
-
},
|
5339 |
-
},
|
5340 |
-
};
|
5341 |
-
|
5342 |
-
const Lazy = {
|
5343 |
-
loadInSlide(index$$1, loadInDuplicate = true) {
|
5344 |
-
const swiper = this;
|
5345 |
-
const params = swiper.params.lazy;
|
5346 |
-
if (typeof index$$1 === 'undefined') return;
|
5347 |
-
if (swiper.slides.length === 0) return;
|
5348 |
-
const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
|
5349 |
-
|
5350 |
-
const $slideEl = isVirtual
|
5351 |
-
? swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-swiper-slide-index="${index$$1}"]`)
|
5352 |
-
: swiper.slides.eq(index$$1);
|
5353 |
-
|
5354 |
-
let $images = $slideEl.find(`.${params.elementClass}:not(.${params.loadedClass}):not(.${params.loadingClass})`);
|
5355 |
-
if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) {
|
5356 |
-
$images = $images.add($slideEl[0]);
|
5357 |
-
}
|
5358 |
-
if ($images.length === 0) return;
|
5359 |
-
|
5360 |
-
$images.each((imageIndex, imageEl) => {
|
5361 |
-
const $imageEl = $(imageEl);
|
5362 |
-
$imageEl.addClass(params.loadingClass);
|
5363 |
-
|
5364 |
-
const background = $imageEl.attr('data-background');
|
5365 |
-
const src = $imageEl.attr('data-src');
|
5366 |
-
const srcset = $imageEl.attr('data-srcset');
|
5367 |
-
const sizes = $imageEl.attr('data-sizes');
|
5368 |
-
|
5369 |
-
swiper.loadImage($imageEl[0], (src || background), srcset, sizes, false, () => {
|
5370 |
-
if (typeof swiper === 'undefined' || swiper === null || !swiper || (swiper && !swiper.params) || swiper.destroyed) return;
|
5371 |
-
if (background) {
|
5372 |
-
$imageEl.css('background-image', `url("${background}")`);
|
5373 |
-
$imageEl.removeAttr('data-background');
|
5374 |
-
} else {
|
5375 |
-
if (srcset) {
|
5376 |
-
$imageEl.attr('srcset', srcset);
|
5377 |
-
$imageEl.removeAttr('data-srcset');
|
5378 |
-
}
|
5379 |
-
if (sizes) {
|
5380 |
-
$imageEl.attr('sizes', sizes);
|
5381 |
-
$imageEl.removeAttr('data-sizes');
|
5382 |
-
}
|
5383 |
-
if (src) {
|
5384 |
-
$imageEl.attr('src', src);
|
5385 |
-
$imageEl.removeAttr('data-src');
|
5386 |
-
}
|
5387 |
-
}
|
5388 |
-
|
5389 |
-
$imageEl.addClass(params.loadedClass).removeClass(params.loadingClass);
|
5390 |
-
$slideEl.find(`.${params.preloaderClass}`).remove();
|
5391 |
-
if (swiper.params.loop && loadInDuplicate) {
|
5392 |
-
const slideOriginalIndex = $slideEl.attr('data-swiper-slide-index');
|
5393 |
-
if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) {
|
5394 |
-
const originalSlide = swiper.$wrapperEl.children(`[data-swiper-slide-index="${slideOriginalIndex}"]:not(.${swiper.params.slideDuplicateClass})`);
|
5395 |
-
swiper.lazy.loadInSlide(originalSlide.index(), false);
|
5396 |
-
} else {
|
5397 |
-
const duplicatedSlide = swiper.$wrapperEl.children(`.${swiper.params.slideDuplicateClass}[data-swiper-slide-index="${slideOriginalIndex}"]`);
|
5398 |
-
swiper.lazy.loadInSlide(duplicatedSlide.index(), false);
|
5399 |
-
}
|
5400 |
-
}
|
5401 |
-
swiper.emit('lazyImageReady', $slideEl[0], $imageEl[0]);
|
5402 |
-
});
|
5403 |
-
|
5404 |
-
swiper.emit('lazyImageLoad', $slideEl[0], $imageEl[0]);
|
5405 |
-
});
|
5406 |
-
},
|
5407 |
-
load() {
|
5408 |
-
const swiper = this;
|
5409 |
-
const {
|
5410 |
-
$wrapperEl, params: swiperParams, slides, activeIndex,
|
5411 |
-
} = swiper;
|
5412 |
-
const isVirtual = swiper.virtual && swiperParams.virtual.enabled;
|
5413 |
-
const params = swiperParams.lazy;
|
5414 |
-
|
5415 |
-
let slidesPerView = swiperParams.slidesPerView;
|
5416 |
-
if (slidesPerView === 'auto') {
|
5417 |
-
slidesPerView = 0;
|
5418 |
-
}
|
5419 |
-
|
5420 |
-
function slideExist(index$$1) {
|
5421 |
-
if (isVirtual) {
|
5422 |
-
if ($wrapperEl.children(`.${swiperParams.slideClass}[data-swiper-slide-index="${index$$1}"]`).length) {
|
5423 |
-
return true;
|
5424 |
-
}
|
5425 |
-
} else if (slides[index$$1]) return true;
|
5426 |
-
return false;
|
5427 |
-
}
|
5428 |
-
function slideIndex(slideEl) {
|
5429 |
-
if (isVirtual) {
|
5430 |
-
return $(slideEl).attr('data-swiper-slide-index');
|
5431 |
-
}
|
5432 |
-
return $(slideEl).index();
|
5433 |
-
}
|
5434 |
-
|
5435 |
-
if (!swiper.lazy.initialImageLoaded) swiper.lazy.initialImageLoaded = true;
|
5436 |
-
if (swiper.params.watchSlidesVisibility) {
|
5437 |
-
$wrapperEl.children(`.${swiperParams.slideVisibleClass}`).each((elIndex, slideEl) => {
|
5438 |
-
const index$$1 = isVirtual ? $(slideEl).attr('data-swiper-slide-index') : $(slideEl).index();
|
5439 |
-
swiper.lazy.loadInSlide(index$$1);
|
5440 |
-
});
|
5441 |
-
} else if (slidesPerView > 1) {
|
5442 |
-
for (let i = activeIndex; i < activeIndex + slidesPerView; i += 1) {
|
5443 |
-
if (slideExist(i)) swiper.lazy.loadInSlide(i);
|
5444 |
-
}
|
5445 |
-
} else {
|
5446 |
-
swiper.lazy.loadInSlide(activeIndex);
|
5447 |
-
}
|
5448 |
-
if (params.loadPrevNext) {
|
5449 |
-
if (slidesPerView > 1 || (params.loadPrevNextAmount && params.loadPrevNextAmount > 1)) {
|
5450 |
-
const amount = params.loadPrevNextAmount;
|
5451 |
-
const spv = slidesPerView;
|
5452 |
-
const maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length);
|
5453 |
-
const minIndex = Math.max(activeIndex - Math.max(spv, amount), 0);
|
5454 |
-
// Next Slides
|
5455 |
-
for (let i = activeIndex + slidesPerView; i < maxIndex; i += 1) {
|
5456 |
-
if (slideExist(i)) swiper.lazy.loadInSlide(i);
|
5457 |
-
}
|
5458 |
-
// Prev Slides
|
5459 |
-
for (let i = minIndex; i < activeIndex; i += 1) {
|
5460 |
-
if (slideExist(i)) swiper.lazy.loadInSlide(i);
|
5461 |
-
}
|
5462 |
-
} else {
|
5463 |
-
const nextSlide = $wrapperEl.children(`.${swiperParams.slideNextClass}`);
|
5464 |
-
if (nextSlide.length > 0) swiper.lazy.loadInSlide(slideIndex(nextSlide));
|
5465 |
-
|
5466 |
-
const prevSlide = $wrapperEl.children(`.${swiperParams.slidePrevClass}`);
|
5467 |
-
if (prevSlide.length > 0) swiper.lazy.loadInSlide(slideIndex(prevSlide));
|
5468 |
-
}
|
5469 |
-
}
|
5470 |
-
},
|
5471 |
-
};
|
5472 |
-
|
5473 |
-
var lazy = {
|
5474 |
-
name: 'lazy',
|
5475 |
-
params: {
|
5476 |
-
lazy: {
|
5477 |
-
enabled: false,
|
5478 |
-
loadPrevNext: false,
|
5479 |
-
loadPrevNextAmount: 1,
|
5480 |
-
loadOnTransitionStart: false,
|
5481 |
-
|
5482 |
-
elementClass: 'swiper-lazy',
|
5483 |
-
loadingClass: 'swiper-lazy-loading',
|
5484 |
-
loadedClass: 'swiper-lazy-loaded',
|
5485 |
-
preloaderClass: 'swiper-lazy-preloader',
|
5486 |
-
},
|
5487 |
-
},
|
5488 |
-
create() {
|
5489 |
-
const swiper = this;
|
5490 |
-
Utils.extend(swiper, {
|
5491 |
-
lazy: {
|
5492 |
-
initialImageLoaded: false,
|
5493 |
-
load: Lazy.load.bind(swiper),
|
5494 |
-
loadInSlide: Lazy.loadInSlide.bind(swiper),
|
5495 |
-
},
|
5496 |
-
});
|
5497 |
-
},
|
5498 |
-
on: {
|
5499 |
-
beforeInit() {
|
5500 |
-
const swiper = this;
|
5501 |
-
if (swiper.params.lazy.enabled && swiper.params.preloadImages) {
|
5502 |
-
swiper.params.preloadImages = false;
|
5503 |
-
}
|
5504 |
-
},
|
5505 |
-
init() {
|
5506 |
-
const swiper = this;
|
5507 |
-
if (swiper.params.lazy.enabled && !swiper.params.loop && swiper.params.initialSlide === 0) {
|
5508 |
-
swiper.lazy.load();
|
5509 |
-
}
|
5510 |
-
},
|
5511 |
-
scroll() {
|
5512 |
-
const swiper = this;
|
5513 |
-
if (swiper.params.freeMode && !swiper.params.freeModeSticky) {
|
5514 |
-
swiper.lazy.load();
|
5515 |
-
}
|
5516 |
-
},
|
5517 |
-
resize() {
|
5518 |
-
const swiper = this;
|
5519 |
-
if (swiper.params.lazy.enabled) {
|
5520 |
-
swiper.lazy.load();
|
5521 |
-
}
|
5522 |
-
},
|
5523 |
-
scrollbarDragMove() {
|
5524 |
-
const swiper = this;
|
5525 |
-
if (swiper.params.lazy.enabled) {
|
5526 |
-
swiper.lazy.load();
|
5527 |
-
}
|
5528 |
-
},
|
5529 |
-
transitionStart() {
|
5530 |
-
const swiper = this;
|
5531 |
-
if (swiper.params.lazy.enabled) {
|
5532 |
-
if (swiper.params.lazy.loadOnTransitionStart || (!swiper.params.lazy.loadOnTransitionStart && !swiper.lazy.initialImageLoaded)) {
|
5533 |
-
swiper.lazy.load();
|
5534 |
-
}
|
5535 |
-
}
|
5536 |
-
},
|
5537 |
-
transitionEnd() {
|
5538 |
-
const swiper = this;
|
5539 |
-
if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) {
|
5540 |
-
swiper.lazy.load();
|
5541 |
-
}
|
5542 |
-
},
|
5543 |
-
},
|
5544 |
-
};
|
5545 |
-
|
5546 |
-
/* eslint no-bitwise: ["error", { "allow": [">>"] }] */
|
5547 |
-
|
5548 |
-
const Controller = {
|
5549 |
-
LinearSpline: function LinearSpline(x, y) {
|
5550 |
-
const binarySearch = (function search() {
|
5551 |
-
let maxIndex;
|
5552 |
-
let minIndex;
|
5553 |
-
let guess;
|
5554 |
-
return (array, val) => {
|
5555 |
-
minIndex = -1;
|
5556 |
-
maxIndex = array.length;
|
5557 |
-
while (maxIndex - minIndex > 1) {
|
5558 |
-
guess = maxIndex + minIndex >> 1;
|
5559 |
-
if (array[guess] <= val) {
|
5560 |
-
minIndex = guess;
|
5561 |
-
} else {
|
5562 |
-
maxIndex = guess;
|
5563 |
-
}
|
5564 |
-
}
|
5565 |
-
return maxIndex;
|
5566 |
-
};
|
5567 |
-
}());
|
5568 |
-
this.x = x;
|
5569 |
-
this.y = y;
|
5570 |
-
this.lastIndex = x.length - 1;
|
5571 |
-
// Given an x value (x2), return the expected y2 value:
|
5572 |
-
// (x1,y1) is the known point before given value,
|
5573 |
-
// (x3,y3) is the known point after given value.
|
5574 |
-
let i1;
|
5575 |
-
let i3;
|
5576 |
-
|
5577 |
-
this.interpolate = function interpolate(x2) {
|
5578 |
-
if (!x2) return 0;
|
5579 |
-
|
5580 |
-
// Get the indexes of x1 and x3 (the array indexes before and after given x2):
|
5581 |
-
i3 = binarySearch(this.x, x2);
|
5582 |
-
i1 = i3 - 1;
|
5583 |
-
|
5584 |
-
// We have our indexes i1 & i3, so we can calculate already:
|
5585 |
-
// y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1
|
5586 |
-
return (((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1])) + this.y[i1];
|
5587 |
-
};
|
5588 |
-
return this;
|
5589 |
-
},
|
5590 |
-
// xxx: for now i will just save one spline function to to
|
5591 |
-
getInterpolateFunction(c) {
|
5592 |
-
const swiper = this;
|
5593 |
-
if (!swiper.controller.spline) {
|
5594 |
-
swiper.controller.spline = swiper.params.loop
|
5595 |
-
? new Controller.LinearSpline(swiper.slidesGrid, c.slidesGrid)
|
5596 |
-
: new Controller.LinearSpline(swiper.snapGrid, c.snapGrid);
|
5597 |
-
}
|
5598 |
-
},
|
5599 |
-
setTranslate(setTranslate, byController) {
|
5600 |
-
const swiper = this;
|
5601 |
-
const controlled = swiper.controller.control;
|
5602 |
-
let multiplier;
|
5603 |
-
let controlledTranslate;
|
5604 |
-
function setControlledTranslate(c) {
|
5605 |
-
// this will create an Interpolate function based on the snapGrids
|
5606 |
-
// x is the Grid of the scrolled scroller and y will be the controlled scroller
|
5607 |
-
// it makes sense to create this only once and recall it for the interpolation
|
5608 |
-
// the function does a lot of value caching for performance
|
5609 |
-
const translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate;
|
5610 |
-
if (swiper.params.controller.by === 'slide') {
|
5611 |
-
swiper.controller.getInterpolateFunction(c);
|
5612 |
-
// i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid
|
5613 |
-
// but it did not work out
|
5614 |
-
controlledTranslate = -swiper.controller.spline.interpolate(-translate);
|
5615 |
-
}
|
5616 |
-
|
5617 |
-
if (!controlledTranslate || swiper.params.controller.by === 'container') {
|
5618 |
-
multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate());
|
5619 |
-
controlledTranslate = ((translate - swiper.minTranslate()) * multiplier) + c.minTranslate();
|
5620 |
-
}
|
5621 |
-
|
5622 |
-
if (swiper.params.controller.inverse) {
|
5623 |
-
controlledTranslate = c.maxTranslate() - controlledTranslate;
|
5624 |
-
}
|
5625 |
-
c.updateProgress(controlledTranslate);
|
5626 |
-
c.setTranslate(controlledTranslate, swiper);
|
5627 |
-
c.updateActiveIndex();
|
5628 |
-
c.updateSlidesClasses();
|
5629 |
-
}
|
5630 |
-
if (Array.isArray(controlled)) {
|
5631 |
-
for (let i = 0; i < controlled.length; i += 1) {
|
5632 |
-
if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
|
5633 |
-
setControlledTranslate(controlled[i]);
|
5634 |
-
}
|
5635 |
-
}
|
5636 |
-
} else if (controlled instanceof Swiper && byController !== controlled) {
|
5637 |
-
setControlledTranslate(controlled);
|
5638 |
-
}
|
5639 |
-
},
|
5640 |
-
setTransition(duration, byController) {
|
5641 |
-
const swiper = this;
|
5642 |
-
const controlled = swiper.controller.control;
|
5643 |
-
let i;
|
5644 |
-
function setControlledTransition(c) {
|
5645 |
-
c.setTransition(duration, swiper);
|
5646 |
-
if (duration !== 0) {
|
5647 |
-
c.transitionStart();
|
5648 |
-
if (c.params.autoHeight) {
|
5649 |
-
Utils.nextTick(() => {
|
5650 |
-
c.updateAutoHeight();
|
5651 |
-
});
|
5652 |
-
}
|
5653 |
-
c.$wrapperEl.transitionEnd(() => {
|
5654 |
-
if (!controlled) return;
|
5655 |
-
if (c.params.loop && swiper.params.controller.by === 'slide') {
|
5656 |
-
c.loopFix();
|
5657 |
-
}
|
5658 |
-
c.transitionEnd();
|
5659 |
-
});
|
5660 |
-
}
|
5661 |
-
}
|
5662 |
-
if (Array.isArray(controlled)) {
|
5663 |
-
for (i = 0; i < controlled.length; i += 1) {
|
5664 |
-
if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
|
5665 |
-
setControlledTransition(controlled[i]);
|
5666 |
-
}
|
5667 |
-
}
|
5668 |
-
} else if (controlled instanceof Swiper && byController !== controlled) {
|
5669 |
-
setControlledTransition(controlled);
|
5670 |
-
}
|
5671 |
-
},
|
5672 |
-
};
|
5673 |
-
var controller = {
|
5674 |
-
name: 'controller',
|
5675 |
-
params: {
|
5676 |
-
controller: {
|
5677 |
-
control: undefined,
|
5678 |
-
inverse: false,
|
5679 |
-
by: 'slide', // or 'container'
|
5680 |
-
},
|
5681 |
-
},
|
5682 |
-
create() {
|
5683 |
-
const swiper = this;
|
5684 |
-
Utils.extend(swiper, {
|
5685 |
-
controller: {
|
5686 |
-
control: swiper.params.controller.control,
|
5687 |
-
getInterpolateFunction: Controller.getInterpolateFunction.bind(swiper),
|
5688 |
-
setTranslate: Controller.setTranslate.bind(swiper),
|
5689 |
-
setTransition: Controller.setTransition.bind(swiper),
|
5690 |
-
},
|
5691 |
-
});
|
5692 |
-
},
|
5693 |
-
on: {
|
5694 |
-
update() {
|
5695 |
-
const swiper = this;
|
5696 |
-
if (!swiper.controller.control) return;
|
5697 |
-
if (swiper.controller.spline) {
|
5698 |
-
swiper.controller.spline = undefined;
|
5699 |
-
delete swiper.controller.spline;
|
5700 |
-
}
|
5701 |
-
},
|
5702 |
-
resize() {
|
5703 |
-
const swiper = this;
|
5704 |
-
if (!swiper.controller.control) return;
|
5705 |
-
if (swiper.controller.spline) {
|
5706 |
-
swiper.controller.spline = undefined;
|
5707 |
-
delete swiper.controller.spline;
|
5708 |
-
}
|
5709 |
-
},
|
5710 |
-
observerUpdate() {
|
5711 |
-
const swiper = this;
|
5712 |
-
if (!swiper.controller.control) return;
|
5713 |
-
if (swiper.controller.spline) {
|
5714 |
-
swiper.controller.spline = undefined;
|
5715 |
-
delete swiper.controller.spline;
|
5716 |
-
}
|
5717 |
-
},
|
5718 |
-
setTranslate(translate, byController) {
|
5719 |
-
const swiper = this;
|
5720 |
-
if (!swiper.controller.control) return;
|
5721 |
-
swiper.controller.setTranslate(translate, byController);
|
5722 |
-
},
|
5723 |
-
setTransition(duration, byController) {
|
5724 |
-
const swiper = this;
|
5725 |
-
if (!swiper.controller.control) return;
|
5726 |
-
swiper.controller.setTransition(duration, byController);
|
5727 |
-
},
|
5728 |
-
},
|
5729 |
-
};
|
5730 |
-
|
5731 |
-
const a11y = {
|
5732 |
-
makeElFocusable($el) {
|
5733 |
-
$el.attr('tabIndex', '0');
|
5734 |
-
return $el;
|
5735 |
-
},
|
5736 |
-
addElRole($el, role) {
|
5737 |
-
$el.attr('role', role);
|
5738 |
-
return $el;
|
5739 |
-
},
|
5740 |
-
addElLabel($el, label) {
|
5741 |
-
$el.attr('aria-label', label);
|
5742 |
-
return $el;
|
5743 |
-
},
|
5744 |
-
disableEl($el) {
|
5745 |
-
$el.attr('aria-disabled', true);
|
5746 |
-
return $el;
|
5747 |
-
},
|
5748 |
-
enableEl($el) {
|
5749 |
-
$el.attr('aria-disabled', false);
|
5750 |
-
return $el;
|
5751 |
-
},
|
5752 |
-
onEnterKey(e) {
|
5753 |
-
const swiper = this;
|
5754 |
-
const params = swiper.params.a11y;
|
5755 |
-
if (e.keyCode !== 13) return;
|
5756 |
-
const $targetEl = $(e.target);
|
5757 |
-
if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) {
|
5758 |
-
if (!(swiper.isEnd && !swiper.params.loop)) {
|
5759 |
-
swiper.slideNext();
|
5760 |
-
}
|
5761 |
-
if (swiper.isEnd) {
|
5762 |
-
swiper.a11y.notify(params.lastSlideMessage);
|
5763 |
-
} else {
|
5764 |
-
swiper.a11y.notify(params.nextSlideMessage);
|
5765 |
-
}
|
5766 |
-
}
|
5767 |
-
if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) {
|
5768 |
-
if (!(swiper.isBeginning && !swiper.params.loop)) {
|
5769 |
-
swiper.slidePrev();
|
5770 |
-
}
|
5771 |
-
if (swiper.isBeginning) {
|
5772 |
-
swiper.a11y.notify(params.firstSlideMessage);
|
5773 |
-
} else {
|
5774 |
-
swiper.a11y.notify(params.prevSlideMessage);
|
5775 |
-
}
|
5776 |
-
}
|
5777 |
-
if (swiper.pagination && $targetEl.is(`.${swiper.params.pagination.bulletClass}`)) {
|
5778 |
-
$targetEl[0].click();
|
5779 |
-
}
|
5780 |
-
},
|
5781 |
-
notify(message) {
|
5782 |
-
const swiper = this;
|
5783 |
-
const notification = swiper.a11y.liveRegion;
|
5784 |
-
if (notification.length === 0) return;
|
5785 |
-
notification.html('');
|
5786 |
-
notification.html(message);
|
5787 |
-
},
|
5788 |
-
updateNavigation() {
|
5789 |
-
const swiper = this;
|
5790 |
-
|
5791 |
-
if (swiper.params.loop) return;
|
5792 |
-
const { $nextEl, $prevEl } = swiper.navigation;
|
5793 |
-
|
5794 |
-
if ($prevEl && $prevEl.length > 0) {
|
5795 |
-
if (swiper.isBeginning) {
|
5796 |
-
swiper.a11y.disableEl($prevEl);
|
5797 |
-
} else {
|
5798 |
-
swiper.a11y.enableEl($prevEl);
|
5799 |
-
}
|
5800 |
-
}
|
5801 |
-
if ($nextEl && $nextEl.length > 0) {
|
5802 |
-
if (swiper.isEnd) {
|
5803 |
-
swiper.a11y.disableEl($nextEl);
|
5804 |
-
} else {
|
5805 |
-
swiper.a11y.enableEl($nextEl);
|
5806 |
-
}
|
5807 |
-
}
|
5808 |
-
},
|
5809 |
-
updatePagination() {
|
5810 |
-
const swiper = this;
|
5811 |
-
const params = swiper.params.a11y;
|
5812 |
-
if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
|
5813 |
-
swiper.pagination.bullets.each((bulletIndex, bulletEl) => {
|
5814 |
-
const $bulletEl = $(bulletEl);
|
5815 |
-
swiper.a11y.makeElFocusable($bulletEl);
|
5816 |
-
swiper.a11y.addElRole($bulletEl, 'button');
|
5817 |
-
swiper.a11y.addElLabel($bulletEl, params.paginationBulletMessage.replace(/{{index}}/, $bulletEl.index() + 1));
|
5818 |
-
});
|
5819 |
-
}
|
5820 |
-
},
|
5821 |
-
init() {
|
5822 |
-
const swiper = this;
|
5823 |
-
|
5824 |
-
swiper.$el.append(swiper.a11y.liveRegion);
|
5825 |
-
|
5826 |
-
// Navigation
|
5827 |
-
const params = swiper.params.a11y;
|
5828 |
-
let $nextEl;
|
5829 |
-
let $prevEl;
|
5830 |
-
if (swiper.navigation && swiper.navigation.$nextEl) {
|
5831 |
-
$nextEl = swiper.navigation.$nextEl;
|
5832 |
-
}
|
5833 |
-
if (swiper.navigation && swiper.navigation.$prevEl) {
|
5834 |
-
$prevEl = swiper.navigation.$prevEl;
|
5835 |
-
}
|
5836 |
-
if ($nextEl) {
|
5837 |
-
swiper.a11y.makeElFocusable($nextEl);
|
5838 |
-
swiper.a11y.addElRole($nextEl, 'button');
|
5839 |
-
swiper.a11y.addElLabel($nextEl, params.nextSlideMessage);
|
5840 |
-
$nextEl.on('keydown', swiper.a11y.onEnterKey);
|
5841 |
-
}
|
5842 |
-
if ($prevEl) {
|
5843 |
-
swiper.a11y.makeElFocusable($prevEl);
|
5844 |
-
swiper.a11y.addElRole($prevEl, 'button');
|
5845 |
-
swiper.a11y.addElLabel($prevEl, params.prevSlideMessage);
|
5846 |
-
$prevEl.on('keydown', swiper.a11y.onEnterKey);
|
5847 |
-
}
|
5848 |
-
|
5849 |
-
// Pagination
|
5850 |
-
if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
|
5851 |
-
swiper.pagination.$el.on('keydown', `.${swiper.params.pagination.bulletClass}`, swiper.a11y.onEnterKey);
|
5852 |
-
}
|
5853 |
-
},
|
5854 |
-
destroy() {
|
5855 |
-
const swiper = this;
|
5856 |
-
if (swiper.a11y.liveRegion && swiper.a11y.liveRegion.length > 0) swiper.a11y.liveRegion.remove();
|
5857 |
-
|
5858 |
-
let $nextEl;
|
5859 |
-
let $prevEl;
|
5860 |
-
if (swiper.navigation && swiper.navigation.$nextEl) {
|
5861 |
-
$nextEl = swiper.navigation.$nextEl;
|
5862 |
-
}
|
5863 |
-
if (swiper.navigation && swiper.navigation.$prevEl) {
|
5864 |
-
$prevEl = swiper.navigation.$prevEl;
|
5865 |
-
}
|
5866 |
-
if ($nextEl) {
|
5867 |
-
$nextEl.off('keydown', swiper.a11y.onEnterKey);
|
5868 |
-
}
|
5869 |
-
if ($prevEl) {
|
5870 |
-
$prevEl.off('keydown', swiper.a11y.onEnterKey);
|
5871 |
-
}
|
5872 |
-
|
5873 |
-
// Pagination
|
5874 |
-
if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
|
5875 |
-
swiper.pagination.$el.off('keydown', `.${swiper.params.pagination.bulletClass}`, swiper.a11y.onEnterKey);
|
5876 |
-
}
|
5877 |
-
},
|
5878 |
-
};
|
5879 |
-
var a11y$1 = {
|
5880 |
-
name: 'a11y',
|
5881 |
-
params: {
|
5882 |
-
a11y: {
|
5883 |
-
enabled: true,
|
5884 |
-
notificationClass: 'swiper-notification',
|
5885 |
-
prevSlideMessage: 'Previous slide',
|
5886 |
-
nextSlideMessage: 'Next slide',
|
5887 |
-
firstSlideMessage: 'This is the first slide',
|
5888 |
-
lastSlideMessage: 'This is the last slide',
|
5889 |
-
paginationBulletMessage: 'Go to slide {{index}}',
|
5890 |
-
},
|
5891 |
-
},
|
5892 |
-
create() {
|
5893 |
-
const swiper = this;
|
5894 |
-
Utils.extend(swiper, {
|
5895 |
-
a11y: {
|
5896 |
-
liveRegion: $(`<span class="${swiper.params.a11y.notificationClass}" aria-live="assertive" aria-atomic="true"></span>`),
|
5897 |
-
},
|
5898 |
-
});
|
5899 |
-
Object.keys(a11y).forEach((methodName) => {
|
5900 |
-
swiper.a11y[methodName] = a11y[methodName].bind(swiper);
|
5901 |
-
});
|
5902 |
-
},
|
5903 |
-
on: {
|
5904 |
-
init() {
|
5905 |
-
const swiper = this;
|
5906 |
-
if (!swiper.params.a11y.enabled) return;
|
5907 |
-
swiper.a11y.init();
|
5908 |
-
swiper.a11y.updateNavigation();
|
5909 |
-
},
|
5910 |
-
toEdge() {
|
5911 |
-
const swiper = this;
|
5912 |
-
if (!swiper.params.a11y.enabled) return;
|
5913 |
-
swiper.a11y.updateNavigation();
|
5914 |
-
},
|
5915 |
-
fromEdge() {
|
5916 |
-
const swiper = this;
|
5917 |
-
if (!swiper.params.a11y.enabled) return;
|
5918 |
-
swiper.a11y.updateNavigation();
|
5919 |
-
},
|
5920 |
-
paginationUpdate() {
|
5921 |
-
const swiper = this;
|
5922 |
-
if (!swiper.params.a11y.enabled) return;
|
5923 |
-
swiper.a11y.updatePagination();
|
5924 |
-
},
|
5925 |
-
destroy() {
|
5926 |
-
const swiper = this;
|
5927 |
-
if (!swiper.params.a11y.enabled) return;
|
5928 |
-
swiper.a11y.destroy();
|
5929 |
-
},
|
5930 |
-
},
|
5931 |
-
};
|
5932 |
-
|
5933 |
-
const History = {
|
5934 |
-
init() {
|
5935 |
-
const swiper = this;
|
5936 |
-
if (!swiper.params.history) return;
|
5937 |
-
if (!window.history || !window.history.pushState) {
|
5938 |
-
swiper.params.history.enabled = false;
|
5939 |
-
swiper.params.hashNavigation.enabled = true;
|
5940 |
-
return;
|
5941 |
-
}
|
5942 |
-
const history = swiper.history;
|
5943 |
-
history.initialized = true;
|
5944 |
-
history.paths = History.getPathValues();
|
5945 |
-
if (!history.paths.key && !history.paths.value) return;
|
5946 |
-
history.scrollToSlide(0, history.paths.value, swiper.params.runCallbacksOnInit);
|
5947 |
-
if (!swiper.params.history.replaceState) {
|
5948 |
-
window.addEventListener('popstate', swiper.history.setHistoryPopState);
|
5949 |
-
}
|
5950 |
-
},
|
5951 |
-
destroy() {
|
5952 |
-
const swiper = this;
|
5953 |
-
if (!swiper.params.history.replaceState) {
|
5954 |
-
window.removeEventListener('popstate', swiper.history.setHistoryPopState);
|
5955 |
-
}
|
5956 |
-
},
|
5957 |
-
setHistoryPopState() {
|
5958 |
-
const swiper = this;
|
5959 |
-
swiper.history.paths = History.getPathValues();
|
5960 |
-
swiper.history.scrollToSlide(swiper.params.speed, swiper.history.paths.value, false);
|
5961 |
-
},
|
5962 |
-
getPathValues() {
|
5963 |
-
const pathArray = window.location.pathname.slice(1).split('/').filter(part => part !== '');
|
5964 |
-
const total = pathArray.length;
|
5965 |
-
const key = pathArray[total - 2];
|
5966 |
-
const value = pathArray[total - 1];
|
5967 |
-
return { key, value };
|
5968 |
-
},
|
5969 |
-
setHistory(key, index$$1) {
|
5970 |
-
const swiper = this;
|
5971 |
-
if (!swiper.history.initialized || !swiper.params.history.enabled) return;
|
5972 |
-
const slide = swiper.slides.eq(index$$1);
|
5973 |
-
let value = History.slugify(slide.attr('data-history'));
|
5974 |
-
if (!window.location.pathname.includes(key)) {
|
5975 |
-
value = `${key}/${value}`;
|
5976 |
-
}
|
5977 |
-
const currentState = window.history.state;
|
5978 |
-
if (currentState && currentState.value === value) {
|
5979 |
-
return;
|
5980 |
-
}
|
5981 |
-
if (swiper.params.history.replaceState) {
|
5982 |
-
window.history.replaceState({ value }, null, value);
|
5983 |
-
} else {
|
5984 |
-
window.history.pushState({ value }, null, value);
|
5985 |
-
}
|
5986 |
-
},
|
5987 |
-
slugify(text$$1) {
|
5988 |
-
return text$$1.toString().toLowerCase()
|
5989 |
-
.replace(/\s+/g, '-')
|
5990 |
-
.replace(/[^\w-]+/g, '')
|
5991 |
-
.replace(/--+/g, '-')
|
5992 |
-
.replace(/^-+/, '')
|
5993 |
-
.replace(/-+$/, '');
|
5994 |
-
},
|
5995 |
-
scrollToSlide(speed, value, runCallbacks) {
|
5996 |
-
const swiper = this;
|
5997 |
-
if (value) {
|
5998 |
-
for (let i = 0, length = swiper.slides.length; i < length; i += 1) {
|
5999 |
-
const slide = swiper.slides.eq(i);
|
6000 |
-
const slideHistory = History.slugify(slide.attr('data-history'));
|
6001 |
-
if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) {
|
6002 |
-
const index$$1 = slide.index();
|
6003 |
-
swiper.slideTo(index$$1, speed, runCallbacks);
|
6004 |
-
}
|
6005 |
-
}
|
6006 |
-
} else {
|
6007 |
-
swiper.slideTo(0, speed, runCallbacks);
|
6008 |
-
}
|
6009 |
-
},
|
6010 |
-
};
|
6011 |
-
|
6012 |
-
var history = {
|
6013 |
-
name: 'history',
|
6014 |
-
params: {
|
6015 |
-
history: {
|
6016 |
-
enabled: false,
|
6017 |
-
replaceState: false,
|
6018 |
-
key: 'slides',
|
6019 |
-
},
|
6020 |
-
},
|
6021 |
-
create() {
|
6022 |
-
const swiper = this;
|
6023 |
-
Utils.extend(swiper, {
|
6024 |
-
history: {
|
6025 |
-
init: History.init.bind(swiper),
|
6026 |
-
setHistory: History.setHistory.bind(swiper),
|
6027 |
-
setHistoryPopState: History.setHistoryPopState.bind(swiper),
|
6028 |
-
scrollToSlide: History.scrollToSlide.bind(swiper),
|
6029 |
-
destroy: History.destroy.bind(swiper),
|
6030 |
-
},
|
6031 |
-
});
|
6032 |
-
},
|
6033 |
-
on: {
|
6034 |
-
init() {
|
6035 |
-
const swiper = this;
|
6036 |
-
if (swiper.params.history.enabled) {
|
6037 |
-
swiper.history.init();
|
6038 |
-
}
|
6039 |
-
},
|
6040 |
-
destroy() {
|
6041 |
-
const swiper = this;
|
6042 |
-
if (swiper.params.history.enabled) {
|
6043 |
-
swiper.history.destroy();
|
6044 |
-
}
|
6045 |
-
},
|
6046 |
-
transitionEnd() {
|
6047 |
-
const swiper = this;
|
6048 |
-
if (swiper.history.initialized) {
|
6049 |
-
swiper.history.setHistory(swiper.params.history.key, swiper.activeIndex);
|
6050 |
-
}
|
6051 |
-
},
|
6052 |
-
},
|
6053 |
-
};
|
6054 |
-
|
6055 |
-
const HashNavigation = {
|
6056 |
-
onHashCange() {
|
6057 |
-
const swiper = this;
|
6058 |
-
const newHash = document.location.hash.replace('#', '');
|
6059 |
-
const activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash');
|
6060 |
-
if (newHash !== activeSlideHash) {
|
6061 |
-
const newIndex = swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-hash="${newHash}"]`).index();
|
6062 |
-
if (typeof newIndex === 'undefined') return;
|
6063 |
-
swiper.slideTo(newIndex);
|
6064 |
-
}
|
6065 |
-
},
|
6066 |
-
setHash() {
|
6067 |
-
const swiper = this;
|
6068 |
-
if (!swiper.hashNavigation.initialized || !swiper.params.hashNavigation.enabled) return;
|
6069 |
-
if (swiper.params.hashNavigation.replaceState && window.history && window.history.replaceState) {
|
6070 |
-
window.history.replaceState(null, null, (`#${swiper.slides.eq(swiper.activeIndex).attr('data-hash')}` || ''));
|
6071 |
-
} else {
|
6072 |
-
const slide = swiper.slides.eq(swiper.activeIndex);
|
6073 |
-
const hash = slide.attr('data-hash') || slide.attr('data-history');
|
6074 |
-
document.location.hash = hash || '';
|
6075 |
-
}
|
6076 |
-
},
|
6077 |
-
init() {
|
6078 |
-
const swiper = this;
|
6079 |
-
if (!swiper.params.hashNavigation.enabled || (swiper.params.history && swiper.params.history.enabled)) return;
|
6080 |
-
swiper.hashNavigation.initialized = true;
|
6081 |
-
const hash = document.location.hash.replace('#', '');
|
6082 |
-
if (hash) {
|
6083 |
-
const speed = 0;
|
6084 |
-
for (let i = 0, length = swiper.slides.length; i < length; i += 1) {
|
6085 |
-
const slide = swiper.slides.eq(i);
|
6086 |
-
const slideHash = slide.attr('data-hash') || slide.attr('data-history');
|
6087 |
-
if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) {
|
6088 |
-
const index$$1 = slide.index();
|
6089 |
-
swiper.slideTo(index$$1, speed, swiper.params.runCallbacksOnInit, true);
|
6090 |
-
}
|
6091 |
-
}
|
6092 |
-
}
|
6093 |
-
if (swiper.params.hashNavigation.watchState) {
|
6094 |
-
$(window).on('hashchange', swiper.hashNavigation.onHashCange);
|
6095 |
-
}
|
6096 |
-
},
|
6097 |
-
destroy() {
|
6098 |
-
const swiper = this;
|
6099 |
-
if (swiper.params.hashNavigation.watchState) {
|
6100 |
-
$(window).off('hashchange', swiper.hashNavigation.onHashCange);
|
6101 |
-
}
|
6102 |
-
},
|
6103 |
-
};
|
6104 |
-
var hashNavigation = {
|
6105 |
-
name: 'hash-navigation',
|
6106 |
-
params: {
|
6107 |
-
hashNavigation: {
|
6108 |
-
enabled: false,
|
6109 |
-
replaceState: false,
|
6110 |
-
watchState: false,
|
6111 |
-
},
|
6112 |
-
},
|
6113 |
-
create() {
|
6114 |
-
const swiper = this;
|
6115 |
-
Utils.extend(swiper, {
|
6116 |
-
hashNavigation: {
|
6117 |
-
initialized: false,
|
6118 |
-
init: HashNavigation.init.bind(swiper),
|
6119 |
-
destroy: HashNavigation.destroy.bind(swiper),
|
6120 |
-
setHash: HashNavigation.setHash.bind(swiper),
|
6121 |
-
onHashCange: HashNavigation.onHashCange.bind(swiper),
|
6122 |
-
},
|
6123 |
-
});
|
6124 |
-
},
|
6125 |
-
on: {
|
6126 |
-
init() {
|
6127 |
-
const swiper = this;
|
6128 |
-
if (swiper.params.hashNavigation.enabled) {
|
6129 |
-
swiper.hashNavigation.init();
|
6130 |
-
}
|
6131 |
-
},
|
6132 |
-
destroy() {
|
6133 |
-
const swiper = this;
|
6134 |
-
if (swiper.params.hashNavigation.enabled) {
|
6135 |
-
swiper.hashNavigation.destroy();
|
6136 |
-
}
|
6137 |
-
},
|
6138 |
-
transitionEnd() {
|
6139 |
-
const swiper = this;
|
6140 |
-
if (swiper.hashNavigation.initialized) {
|
6141 |
-
swiper.hashNavigation.setHash();
|
6142 |
-
}
|
6143 |
-
},
|
6144 |
-
},
|
6145 |
-
};
|
6146 |
-
|
6147 |
-
/* eslint no-underscore-dangle: "off" */
|
6148 |
-
|
6149 |
-
const Autoplay = {
|
6150 |
-
run() {
|
6151 |
-
const swiper = this;
|
6152 |
-
const $activeSlideEl = swiper.slides.eq(swiper.activeIndex);
|
6153 |
-
let delay = swiper.params.autoplay.delay;
|
6154 |
-
if ($activeSlideEl.attr('data-swiper-autoplay')) {
|
6155 |
-
delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay;
|
6156 |
-
}
|
6157 |
-
swiper.autoplay.timeout = Utils.nextTick(() => {
|
6158 |
-
if (swiper.params.autoplay.reverseDirection) {
|
6159 |
-
if (swiper.params.loop) {
|
6160 |
-
swiper.loopFix();
|
6161 |
-
swiper.slidePrev(swiper.params.speed, true, true);
|
6162 |
-
swiper.emit('autoplay');
|
6163 |
-
} else if (!swiper.isBeginning) {
|
6164 |
-
swiper.slidePrev(swiper.params.speed, true, true);
|
6165 |
-
swiper.emit('autoplay');
|
6166 |
-
} else if (!swiper.params.autoplay.stopOnLastSlide) {
|
6167 |
-
swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true);
|
6168 |
-
swiper.emit('autoplay');
|
6169 |
-
} else {
|
6170 |
-
swiper.autoplay.stop();
|
6171 |
-
}
|
6172 |
-
} else if (swiper.params.loop) {
|
6173 |
-
swiper.loopFix();
|
6174 |
-
swiper.slideNext(swiper.params.speed, true, true);
|
6175 |
-
swiper.emit('autoplay');
|
6176 |
-
} else if (!swiper.isEnd) {
|
6177 |
-
swiper.slideNext(swiper.params.speed, true, true);
|
6178 |
-
swiper.emit('autoplay');
|
6179 |
-
} else if (!swiper.params.autoplay.stopOnLastSlide) {
|
6180 |
-
swiper.slideTo(0, swiper.params.speed, true, true);
|
6181 |
-
swiper.emit('autoplay');
|
6182 |
-
} else {
|
6183 |
-
swiper.autoplay.stop();
|
6184 |
-
}
|
6185 |
-
}, delay);
|
6186 |
-
},
|
6187 |
-
start() {
|
6188 |
-
const swiper = this;
|
6189 |
-
if (typeof swiper.autoplay.timeout !== 'undefined') return false;
|
6190 |
-
if (swiper.autoplay.running) return false;
|
6191 |
-
swiper.autoplay.running = true;
|
6192 |
-
swiper.emit('autoplayStart');
|
6193 |
-
swiper.autoplay.run();
|
6194 |
-
return true;
|
6195 |
-
},
|
6196 |
-
stop() {
|
6197 |
-
const swiper = this;
|
6198 |
-
if (!swiper.autoplay.running) return false;
|
6199 |
-
if (typeof swiper.autoplay.timeout === 'undefined') return false;
|
6200 |
-
|
6201 |
-
if (swiper.autoplay.timeout) {
|
6202 |
-
clearTimeout(swiper.autoplay.timeout);
|
6203 |
-
swiper.autoplay.timeout = undefined;
|
6204 |
-
}
|
6205 |
-
swiper.autoplay.running = false;
|
6206 |
-
swiper.emit('autoplayStop');
|
6207 |
-
return true;
|
6208 |
-
},
|
6209 |
-
pause(speed) {
|
6210 |
-
const swiper = this;
|
6211 |
-
if (!swiper.autoplay.running) return;
|
6212 |
-
if (swiper.autoplay.paused) return;
|
6213 |
-
if (swiper.autoplay.timeout) clearTimeout(swiper.autoplay.timeout);
|
6214 |
-
swiper.autoplay.paused = true;
|
6215 |
-
if (speed === 0 || !swiper.params.autoplay.waitForTransition) {
|
6216 |
-
swiper.autoplay.paused = false;
|
6217 |
-
swiper.autoplay.run();
|
6218 |
-
} else {
|
6219 |
-
swiper.$wrapperEl[0].addEventListener('transitionend', swiper.autoplay.onTransitionEnd);
|
6220 |
-
swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);
|
6221 |
-
}
|
6222 |
-
},
|
6223 |
-
};
|
6224 |
-
|
6225 |
-
var autoplay = {
|
6226 |
-
name: 'autoplay',
|
6227 |
-
params: {
|
6228 |
-
autoplay: {
|
6229 |
-
enabled: false,
|
6230 |
-
delay: 3000,
|
6231 |
-
waitForTransition: true,
|
6232 |
-
disableOnInteraction: true,
|
6233 |
-
stopOnLastSlide: false,
|
6234 |
-
reverseDirection: false,
|
6235 |
-
},
|
6236 |
-
},
|
6237 |
-
create() {
|
6238 |
-
const swiper = this;
|
6239 |
-
Utils.extend(swiper, {
|
6240 |
-
autoplay: {
|
6241 |
-
running: false,
|
6242 |
-
paused: false,
|
6243 |
-
run: Autoplay.run.bind(swiper),
|
6244 |
-
start: Autoplay.start.bind(swiper),
|
6245 |
-
stop: Autoplay.stop.bind(swiper),
|
6246 |
-
pause: Autoplay.pause.bind(swiper),
|
6247 |
-
onTransitionEnd(e) {
|
6248 |
-
if (!swiper || swiper.destroyed || !swiper.$wrapperEl) return;
|
6249 |
-
if (e.target !== this) return;
|
6250 |
-
swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.autoplay.onTransitionEnd);
|
6251 |
-
swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);
|
6252 |
-
swiper.autoplay.paused = false;
|
6253 |
-
if (!swiper.autoplay.running) {
|
6254 |
-
swiper.autoplay.stop();
|
6255 |
-
} else {
|
6256 |
-
swiper.autoplay.run();
|
6257 |
-
}
|
6258 |
-
},
|
6259 |
-
},
|
6260 |
-
});
|
6261 |
-
},
|
6262 |
-
on: {
|
6263 |
-
init() {
|
6264 |
-
const swiper = this;
|
6265 |
-
if (swiper.params.autoplay.enabled) {
|
6266 |
-
swiper.autoplay.start();
|
6267 |
-
}
|
6268 |
-
},
|
6269 |
-
beforeTransitionStart(speed, internal) {
|
6270 |
-
const swiper = this;
|
6271 |
-
if (swiper.autoplay.running) {
|
6272 |
-
if (internal || !swiper.params.autoplay.disableOnInteraction) {
|
6273 |
-
swiper.autoplay.pause(speed);
|
6274 |
-
} else {
|
6275 |
-
swiper.autoplay.stop();
|
6276 |
-
}
|
6277 |
-
}
|
6278 |
-
},
|
6279 |
-
sliderFirstMove() {
|
6280 |
-
const swiper = this;
|
6281 |
-
if (swiper.autoplay.running) {
|
6282 |
-
if (swiper.params.autoplay.disableOnInteraction) {
|
6283 |
-
swiper.autoplay.stop();
|
6284 |
-
} else {
|
6285 |
-
swiper.autoplay.pause();
|
6286 |
-
}
|
6287 |
-
}
|
6288 |
-
},
|
6289 |
-
destroy() {
|
6290 |
-
const swiper = this;
|
6291 |
-
if (swiper.autoplay.running) {
|
6292 |
-
swiper.autoplay.stop();
|
6293 |
-
}
|
6294 |
-
},
|
6295 |
-
},
|
6296 |
-
};
|
6297 |
-
|
6298 |
-
const Fade = {
|
6299 |
-
setTranslate() {
|
6300 |
-
const swiper = this;
|
6301 |
-
const { slides } = swiper;
|
6302 |
-
for (let i = 0; i < slides.length; i += 1) {
|
6303 |
-
const $slideEl = swiper.slides.eq(i);
|
6304 |
-
const offset$$1 = $slideEl[0].swiperSlideOffset;
|
6305 |
-
let tx = -offset$$1;
|
6306 |
-
if (!swiper.params.virtualTranslate) tx -= swiper.translate;
|
6307 |
-
let ty = 0;
|
6308 |
-
if (!swiper.isHorizontal()) {
|
6309 |
-
ty = tx;
|
6310 |
-
tx = 0;
|
6311 |
-
}
|
6312 |
-
const slideOpacity = swiper.params.fadeEffect.crossFade
|
6313 |
-
? Math.max(1 - Math.abs($slideEl[0].progress), 0)
|
6314 |
-
: 1 + Math.min(Math.max($slideEl[0].progress, -1), 0);
|
6315 |
-
$slideEl
|
6316 |
-
.css({
|
6317 |
-
opacity: slideOpacity,
|
6318 |
-
})
|
6319 |
-
.transform(`translate3d(${tx}px, ${ty}px, 0px)`);
|
6320 |
-
}
|
6321 |
-
},
|
6322 |
-
setTransition(duration) {
|
6323 |
-
const swiper = this;
|
6324 |
-
const { slides, $wrapperEl } = swiper;
|
6325 |
-
slides.transition(duration);
|
6326 |
-
if (swiper.params.virtualTranslate && duration !== 0) {
|
6327 |
-
let eventTriggered = false;
|
6328 |
-
slides.transitionEnd(() => {
|
6329 |
-
if (eventTriggered) return;
|
6330 |
-
if (!swiper || swiper.destroyed) return;
|
6331 |
-
eventTriggered = true;
|
6332 |
-
swiper.animating = false;
|
6333 |
-
const triggerEvents = ['webkitTransitionEnd', 'transitionend'];
|
6334 |
-
for (let i = 0; i < triggerEvents.length; i += 1) {
|
6335 |
-
$wrapperEl.trigger(triggerEvents[i]);
|
6336 |
-
}
|
6337 |
-
});
|
6338 |
-
}
|
6339 |
-
},
|
6340 |
-
};
|
6341 |
-
|
6342 |
-
var effectFade = {
|
6343 |
-
name: 'effect-fade',
|
6344 |
-
params: {
|
6345 |
-
fadeEffect: {
|
6346 |
-
crossFade: false,
|
6347 |
-
},
|
6348 |
-
},
|
6349 |
-
create() {
|
6350 |
-
const swiper = this;
|
6351 |
-
Utils.extend(swiper, {
|
6352 |
-
fadeEffect: {
|
6353 |
-
setTranslate: Fade.setTranslate.bind(swiper),
|
6354 |
-
setTransition: Fade.setTransition.bind(swiper),
|
6355 |
-
},
|
6356 |
-
});
|
6357 |
-
},
|
6358 |
-
on: {
|
6359 |
-
beforeInit() {
|
6360 |
-
const swiper = this;
|
6361 |
-
if (swiper.params.effect !== 'fade') return;
|
6362 |
-
swiper.classNames.push(`${swiper.params.containerModifierClass}fade`);
|
6363 |
-
const overwriteParams = {
|
6364 |
-
slidesPerView: 1,
|
6365 |
-
slidesPerColumn: 1,
|
6366 |
-
slidesPerGroup: 1,
|
6367 |
-
watchSlidesProgress: true,
|
6368 |
-
spaceBetween: 0,
|
6369 |
-
virtualTranslate: true,
|
6370 |
-
};
|
6371 |
-
Utils.extend(swiper.params, overwriteParams);
|
6372 |
-
Utils.extend(swiper.originalParams, overwriteParams);
|
6373 |
-
},
|
6374 |
-
setTranslate() {
|
6375 |
-
const swiper = this;
|
6376 |
-
if (swiper.params.effect !== 'fade') return;
|
6377 |
-
swiper.fadeEffect.setTranslate();
|
6378 |
-
},
|
6379 |
-
setTransition(duration) {
|
6380 |
-
const swiper = this;
|
6381 |
-
if (swiper.params.effect !== 'fade') return;
|
6382 |
-
swiper.fadeEffect.setTransition(duration);
|
6383 |
-
},
|
6384 |
-
},
|
6385 |
-
};
|
6386 |
-
|
6387 |
-
const Cube = {
|
6388 |
-
setTranslate() {
|
6389 |
-
const swiper = this;
|
6390 |
-
const {
|
6391 |
-
$el, $wrapperEl, slides, width: swiperWidth, height: swiperHeight, rtlTranslate: rtl, size: swiperSize,
|
6392 |
-
} = swiper;
|
6393 |
-
const params = swiper.params.cubeEffect;
|
6394 |
-
const isHorizontal = swiper.isHorizontal();
|
6395 |
-
const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
|
6396 |
-
let wrapperRotate = 0;
|
6397 |
-
let $cubeShadowEl;
|
6398 |
-
if (params.shadow) {
|
6399 |
-
if (isHorizontal) {
|
6400 |
-
$cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow');
|
6401 |
-
if ($cubeShadowEl.length === 0) {
|
6402 |
-
$cubeShadowEl = $('<div class="swiper-cube-shadow"></div>');
|
6403 |
-
$wrapperEl.append($cubeShadowEl);
|
6404 |
-
}
|
6405 |
-
$cubeShadowEl.css({ height: `${swiperWidth}px` });
|
6406 |
-
} else {
|
6407 |
-
$cubeShadowEl = $el.find('.swiper-cube-shadow');
|
6408 |
-
if ($cubeShadowEl.length === 0) {
|
6409 |
-
$cubeShadowEl = $('<div class="swiper-cube-shadow"></div>');
|
6410 |
-
$el.append($cubeShadowEl);
|
6411 |
-
}
|
6412 |
-
}
|
6413 |
-
}
|
6414 |
-
for (let i = 0; i < slides.length; i += 1) {
|
6415 |
-
const $slideEl = slides.eq(i);
|
6416 |
-
let slideIndex = i;
|
6417 |
-
if (isVirtual) {
|
6418 |
-
slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10);
|
6419 |
-
}
|
6420 |
-
let slideAngle = slideIndex * 90;
|
6421 |
-
let round = Math.floor(slideAngle / 360);
|
6422 |
-
if (rtl) {
|
6423 |
-
slideAngle = -slideAngle;
|
6424 |
-
round = Math.floor(-slideAngle / 360);
|
6425 |
-
}
|
6426 |
-
const progress = Math.max(Math.min($slideEl[0].progress, 1), -1);
|
6427 |
-
let tx = 0;
|
6428 |
-
let ty = 0;
|
6429 |
-
let tz = 0;
|
6430 |
-
if (slideIndex % 4 === 0) {
|
6431 |
-
tx = -round * 4 * swiperSize;
|
6432 |
-
tz = 0;
|
6433 |
-
} else if ((slideIndex - 1) % 4 === 0) {
|
6434 |
-
tx = 0;
|
6435 |
-
tz = -round * 4 * swiperSize;
|
6436 |
-
} else if ((slideIndex - 2) % 4 === 0) {
|
6437 |
-
tx = swiperSize + (round * 4 * swiperSize);
|
6438 |
-
tz = swiperSize;
|
6439 |
-
} else if ((slideIndex - 3) % 4 === 0) {
|
6440 |
-
tx = -swiperSize;
|
6441 |
-
tz = (3 * swiperSize) + (swiperSize * 4 * round);
|
6442 |
-
}
|
6443 |
-
if (rtl) {
|
6444 |
-
tx = -tx;
|
6445 |
-
}
|
6446 |
-
|
6447 |
-
if (!isHorizontal) {
|
6448 |
-
ty = tx;
|
6449 |
-
tx = 0;
|
6450 |
-
}
|
6451 |
-
|
6452 |
-
const transform$$1 = `rotateX(${isHorizontal ? 0 : -slideAngle}deg) rotateY(${isHorizontal ? slideAngle : 0}deg) translate3d(${tx}px, ${ty}px, ${tz}px)`;
|
6453 |
-
if (progress <= 1 && progress > -1) {
|
6454 |
-
wrapperRotate = (slideIndex * 90) + (progress * 90);
|
6455 |
-
if (rtl) wrapperRotate = (-slideIndex * 90) - (progress * 90);
|
6456 |
-
}
|
6457 |
-
$slideEl.transform(transform$$1);
|
6458 |
-
if (params.slideShadows) {
|
6459 |
-
// Set shadows
|
6460 |
-
let shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
|
6461 |
-
let shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
|
6462 |
-
if (shadowBefore.length === 0) {
|
6463 |
-
shadowBefore = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'left' : 'top'}"></div>`);
|
6464 |
-
$slideEl.append(shadowBefore);
|
6465 |
-
}
|
6466 |
-
if (shadowAfter.length === 0) {
|
6467 |
-
shadowAfter = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'right' : 'bottom'}"></div>`);
|
6468 |
-
$slideEl.append(shadowAfter);
|
6469 |
-
}
|
6470 |
-
if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);
|
6471 |
-
if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);
|
6472 |
-
}
|
6473 |
-
}
|
6474 |
-
$wrapperEl.css({
|
6475 |
-
'-webkit-transform-origin': `50% 50% -${swiperSize / 2}px`,
|
6476 |
-
'-moz-transform-origin': `50% 50% -${swiperSize / 2}px`,
|
6477 |
-
'-ms-transform-origin': `50% 50% -${swiperSize / 2}px`,
|
6478 |
-
'transform-origin': `50% 50% -${swiperSize / 2}px`,
|
6479 |
-
});
|
6480 |
-
|
6481 |
-
if (params.shadow) {
|
6482 |
-
if (isHorizontal) {
|
6483 |
-
$cubeShadowEl.transform(`translate3d(0px, ${(swiperWidth / 2) + params.shadowOffset}px, ${-swiperWidth / 2}px) rotateX(90deg) rotateZ(0deg) scale(${params.shadowScale})`);
|
6484 |
-
} else {
|
6485 |
-
const shadowAngle = Math.abs(wrapperRotate) - (Math.floor(Math.abs(wrapperRotate) / 90) * 90);
|
6486 |
-
const multiplier = 1.5 - (
|
6487 |
-
(Math.sin((shadowAngle * 2 * Math.PI) / 360) / 2)
|
6488 |
-
+ (Math.cos((shadowAngle * 2 * Math.PI) / 360) / 2)
|
6489 |
-
);
|
6490 |
-
const scale1 = params.shadowScale;
|
6491 |
-
const scale2 = params.shadowScale / multiplier;
|
6492 |
-
const offset$$1 = params.shadowOffset;
|
6493 |
-
$cubeShadowEl.transform(`scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${(swiperHeight / 2) + offset$$1}px, ${-swiperHeight / 2 / scale2}px) rotateX(-90deg)`);
|
6494 |
-
}
|
6495 |
-
}
|
6496 |
-
const zFactor = (Browser.isSafari || Browser.isUiWebView) ? (-swiperSize / 2) : 0;
|
6497 |
-
$wrapperEl
|
6498 |
-
.transform(`translate3d(0px,0,${zFactor}px) rotateX(${swiper.isHorizontal() ? 0 : wrapperRotate}deg) rotateY(${swiper.isHorizontal() ? -wrapperRotate : 0}deg)`);
|
6499 |
-
},
|
6500 |
-
setTransition(duration) {
|
6501 |
-
const swiper = this;
|
6502 |
-
const { $el, slides } = swiper;
|
6503 |
-
slides
|
6504 |
-
.transition(duration)
|
6505 |
-
.find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
|
6506 |
-
.transition(duration);
|
6507 |
-
if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) {
|
6508 |
-
$el.find('.swiper-cube-shadow').transition(duration);
|
6509 |
-
}
|
6510 |
-
},
|
6511 |
-
};
|
6512 |
-
|
6513 |
-
var effectCube = {
|
6514 |
-
name: 'effect-cube',
|
6515 |
-
params: {
|
6516 |
-
cubeEffect: {
|
6517 |
-
slideShadows: true,
|
6518 |
-
shadow: true,
|
6519 |
-
shadowOffset: 20,
|
6520 |
-
shadowScale: 0.94,
|
6521 |
-
},
|
6522 |
-
},
|
6523 |
-
create() {
|
6524 |
-
const swiper = this;
|
6525 |
-
Utils.extend(swiper, {
|
6526 |
-
cubeEffect: {
|
6527 |
-
setTranslate: Cube.setTranslate.bind(swiper),
|
6528 |
-
setTransition: Cube.setTransition.bind(swiper),
|
6529 |
-
},
|
6530 |
-
});
|
6531 |
-
},
|
6532 |
-
on: {
|
6533 |
-
beforeInit() {
|
6534 |
-
const swiper = this;
|
6535 |
-
if (swiper.params.effect !== 'cube') return;
|
6536 |
-
swiper.classNames.push(`${swiper.params.containerModifierClass}cube`);
|
6537 |
-
swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);
|
6538 |
-
const overwriteParams = {
|
6539 |
-
slidesPerView: 1,
|
6540 |
-
slidesPerColumn: 1,
|
6541 |
-
slidesPerGroup: 1,
|
6542 |
-
watchSlidesProgress: true,
|
6543 |
-
resistanceRatio: 0,
|
6544 |
-
spaceBetween: 0,
|
6545 |
-
centeredSlides: false,
|
6546 |
-
virtualTranslate: true,
|
6547 |
-
};
|
6548 |
-
Utils.extend(swiper.params, overwriteParams);
|
6549 |
-
Utils.extend(swiper.originalParams, overwriteParams);
|
6550 |
-
},
|
6551 |
-
setTranslate() {
|
6552 |
-
const swiper = this;
|
6553 |
-
if (swiper.params.effect !== 'cube') return;
|
6554 |
-
swiper.cubeEffect.setTranslate();
|
6555 |
-
},
|
6556 |
-
setTransition(duration) {
|
6557 |
-
const swiper = this;
|
6558 |
-
if (swiper.params.effect !== 'cube') return;
|
6559 |
-
swiper.cubeEffect.setTransition(duration);
|
6560 |
-
},
|
6561 |
-
},
|
6562 |
-
};
|
6563 |
-
|
6564 |
-
const Flip = {
|
6565 |
-
setTranslate() {
|
6566 |
-
const swiper = this;
|
6567 |
-
const { slides, rtlTranslate: rtl } = swiper;
|
6568 |
-
for (let i = 0; i < slides.length; i += 1) {
|
6569 |
-
const $slideEl = slides.eq(i);
|
6570 |
-
let progress = $slideEl[0].progress;
|
6571 |
-
if (swiper.params.flipEffect.limitRotation) {
|
6572 |
-
progress = Math.max(Math.min($slideEl[0].progress, 1), -1);
|
6573 |
-
}
|
6574 |
-
const offset$$1 = $slideEl[0].swiperSlideOffset;
|
6575 |
-
const rotate = -180 * progress;
|
6576 |
-
let rotateY = rotate;
|
6577 |
-
let rotateX = 0;
|
6578 |
-
let tx = -offset$$1;
|
6579 |
-
let ty = 0;
|
6580 |
-
if (!swiper.isHorizontal()) {
|
6581 |
-
ty = tx;
|
6582 |
-
tx = 0;
|
6583 |
-
rotateX = -rotateY;
|
6584 |
-
rotateY = 0;
|
6585 |
-
} else if (rtl) {
|
6586 |
-
rotateY = -rotateY;
|
6587 |
-
}
|
6588 |
-
|
6589 |
-
$slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length;
|
6590 |
-
|
6591 |
-
if (swiper.params.flipEffect.slideShadows) {
|
6592 |
-
// Set shadows
|
6593 |
-
let shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
|
6594 |
-
let shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
|
6595 |
-
if (shadowBefore.length === 0) {
|
6596 |
-
shadowBefore = $(`<div class="swiper-slide-shadow-${swiper.isHorizontal() ? 'left' : 'top'}"></div>`);
|
6597 |
-
$slideEl.append(shadowBefore);
|
6598 |
-
}
|
6599 |
-
if (shadowAfter.length === 0) {
|
6600 |
-
shadowAfter = $(`<div class="swiper-slide-shadow-${swiper.isHorizontal() ? 'right' : 'bottom'}"></div>`);
|
6601 |
-
$slideEl.append(shadowAfter);
|
6602 |
-
}
|
6603 |
-
if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);
|
6604 |
-
if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);
|
6605 |
-
}
|
6606 |
-
$slideEl
|
6607 |
-
.transform(`translate3d(${tx}px, ${ty}px, 0px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`);
|
6608 |
-
}
|
6609 |
-
},
|
6610 |
-
setTransition(duration) {
|
6611 |
-
const swiper = this;
|
6612 |
-
const { slides, activeIndex, $wrapperEl } = swiper;
|
6613 |
-
slides
|
6614 |
-
.transition(duration)
|
6615 |
-
.find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
|
6616 |
-
.transition(duration);
|
6617 |
-
if (swiper.params.virtualTranslate && duration !== 0) {
|
6618 |
-
let eventTriggered = false;
|
6619 |
-
// eslint-disable-next-line
|
6620 |
-
slides.eq(activeIndex).transitionEnd(function onTransitionEnd() {
|
6621 |
-
if (eventTriggered) return;
|
6622 |
-
if (!swiper || swiper.destroyed) return;
|
6623 |
-
// if (!$(this).hasClass(swiper.params.slideActiveClass)) return;
|
6624 |
-
eventTriggered = true;
|
6625 |
-
swiper.animating = false;
|
6626 |
-
const triggerEvents = ['webkitTransitionEnd', 'transitionend'];
|
6627 |
-
for (let i = 0; i < triggerEvents.length; i += 1) {
|
6628 |
-
$wrapperEl.trigger(triggerEvents[i]);
|
6629 |
-
}
|
6630 |
-
});
|
6631 |
-
}
|
6632 |
-
},
|
6633 |
-
};
|
6634 |
-
|
6635 |
-
var effectFlip = {
|
6636 |
-
name: 'effect-flip',
|
6637 |
-
params: {
|
6638 |
-
flipEffect: {
|
6639 |
-
slideShadows: true,
|
6640 |
-
limitRotation: true,
|
6641 |
-
},
|
6642 |
-
},
|
6643 |
-
create() {
|
6644 |
-
const swiper = this;
|
6645 |
-
Utils.extend(swiper, {
|
6646 |
-
flipEffect: {
|
6647 |
-
setTranslate: Flip.setTranslate.bind(swiper),
|
6648 |
-
setTransition: Flip.setTransition.bind(swiper),
|
6649 |
-
},
|
6650 |
-
});
|
6651 |
-
},
|
6652 |
-
on: {
|
6653 |
-
beforeInit() {
|
6654 |
-
const swiper = this;
|
6655 |
-
if (swiper.params.effect !== 'flip') return;
|
6656 |
-
swiper.classNames.push(`${swiper.params.containerModifierClass}flip`);
|
6657 |
-
swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);
|
6658 |
-
const overwriteParams = {
|
6659 |
-
slidesPerView: 1,
|
6660 |
-
slidesPerColumn: 1,
|
6661 |
-
slidesPerGroup: 1,
|
6662 |
-
watchSlidesProgress: true,
|
6663 |
-
spaceBetween: 0,
|
6664 |
-
virtualTranslate: true,
|
6665 |
-
};
|
6666 |
-
Utils.extend(swiper.params, overwriteParams);
|
6667 |
-
Utils.extend(swiper.originalParams, overwriteParams);
|
6668 |
-
},
|
6669 |
-
setTranslate() {
|
6670 |
-
const swiper = this;
|
6671 |
-
if (swiper.params.effect !== 'flip') return;
|
6672 |
-
swiper.flipEffect.setTranslate();
|
6673 |
-
},
|
6674 |
-
setTransition(duration) {
|
6675 |
-
const swiper = this;
|
6676 |
-
if (swiper.params.effect !== 'flip') return;
|
6677 |
-
swiper.flipEffect.setTransition(duration);
|
6678 |
-
},
|
6679 |
-
},
|
6680 |
-
};
|
6681 |
-
|
6682 |
-
const Coverflow = {
|
6683 |
-
setTranslate() {
|
6684 |
-
const swiper = this;
|
6685 |
-
const {
|
6686 |
-
width: swiperWidth, height: swiperHeight, slides, $wrapperEl, slidesSizesGrid,
|
6687 |
-
} = swiper;
|
6688 |
-
const params = swiper.params.coverflowEffect;
|
6689 |
-
const isHorizontal = swiper.isHorizontal();
|
6690 |
-
const transform$$1 = swiper.translate;
|
6691 |
-
const center = isHorizontal ? -transform$$1 + (swiperWidth / 2) : -transform$$1 + (swiperHeight / 2);
|
6692 |
-
const rotate = isHorizontal ? params.rotate : -params.rotate;
|
6693 |
-
const translate = params.depth;
|
6694 |
-
// Each slide offset from center
|
6695 |
-
for (let i = 0, length = slides.length; i < length; i += 1) {
|
6696 |
-
const $slideEl = slides.eq(i);
|
6697 |
-
const slideSize = slidesSizesGrid[i];
|
6698 |
-
const slideOffset = $slideEl[0].swiperSlideOffset;
|
6699 |
-
const offsetMultiplier = ((center - slideOffset - (slideSize / 2)) / slideSize) * params.modifier;
|
6700 |
-
|
6701 |
-
let rotateY = isHorizontal ? rotate * offsetMultiplier : 0;
|
6702 |
-
let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier;
|
6703 |
-
// var rotateZ = 0
|
6704 |
-
let translateZ = -translate * Math.abs(offsetMultiplier);
|
6705 |
-
|
6706 |
-
let translateY = isHorizontal ? 0 : params.stretch * (offsetMultiplier);
|
6707 |
-
let translateX = isHorizontal ? params.stretch * (offsetMultiplier) : 0;
|
6708 |
-
|
6709 |
-
// Fix for ultra small values
|
6710 |
-
if (Math.abs(translateX) < 0.001) translateX = 0;
|
6711 |
-
if (Math.abs(translateY) < 0.001) translateY = 0;
|
6712 |
-
if (Math.abs(translateZ) < 0.001) translateZ = 0;
|
6713 |
-
if (Math.abs(rotateY) < 0.001) rotateY = 0;
|
6714 |
-
if (Math.abs(rotateX) < 0.001) rotateX = 0;
|
6715 |
-
|
6716 |
-
const slideTransform = `translate3d(${translateX}px,${translateY}px,${translateZ}px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`;
|
6717 |
-
|
6718 |
-
$slideEl.transform(slideTransform);
|
6719 |
-
$slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;
|
6720 |
-
if (params.slideShadows) {
|
6721 |
-
// Set shadows
|
6722 |
-
let $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
|
6723 |
-
let $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
|
6724 |
-
if ($shadowBeforeEl.length === 0) {
|
6725 |
-
$shadowBeforeEl = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'left' : 'top'}"></div>`);
|
6726 |
-
$slideEl.append($shadowBeforeEl);
|
6727 |
-
}
|
6728 |
-
if ($shadowAfterEl.length === 0) {
|
6729 |
-
$shadowAfterEl = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'right' : 'bottom'}"></div>`);
|
6730 |
-
$slideEl.append($shadowAfterEl);
|
6731 |
-
}
|
6732 |
-
if ($shadowBeforeEl.length) $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;
|
6733 |
-
if ($shadowAfterEl.length) $shadowAfterEl[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0;
|
6734 |
-
}
|
6735 |
-
}
|
6736 |
-
|
6737 |
-
// Set correct perspective for IE10
|
6738 |
-
if (Support.pointerEvents || Support.prefixedPointerEvents) {
|
6739 |
-
const ws = $wrapperEl[0].style;
|
6740 |
-
ws.perspectiveOrigin = `${center}px 50%`;
|
6741 |
-
}
|
6742 |
-
},
|
6743 |
-
setTransition(duration) {
|
6744 |
-
const swiper = this;
|
6745 |
-
swiper.slides
|
6746 |
-
.transition(duration)
|
6747 |
-
.find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
|
6748 |
-
.transition(duration);
|
6749 |
-
},
|
6750 |
-
};
|
6751 |
-
|
6752 |
-
var effectCoverflow = {
|
6753 |
-
name: 'effect-coverflow',
|
6754 |
-
params: {
|
6755 |
-
coverflowEffect: {
|
6756 |
-
rotate: 50,
|
6757 |
-
stretch: 0,
|
6758 |
-
depth: 100,
|
6759 |
-
modifier: 1,
|
6760 |
-
slideShadows: true,
|
6761 |
-
},
|
6762 |
-
},
|
6763 |
-
create() {
|
6764 |
-
const swiper = this;
|
6765 |
-
Utils.extend(swiper, {
|
6766 |
-
coverflowEffect: {
|
6767 |
-
setTranslate: Coverflow.setTranslate.bind(swiper),
|
6768 |
-
setTransition: Coverflow.setTransition.bind(swiper),
|
6769 |
-
},
|
6770 |
-
});
|
6771 |
-
},
|
6772 |
-
on: {
|
6773 |
-
beforeInit() {
|
6774 |
-
const swiper = this;
|
6775 |
-
if (swiper.params.effect !== 'coverflow') return;
|
6776 |
-
|
6777 |
-
swiper.classNames.push(`${swiper.params.containerModifierClass}coverflow`);
|
6778 |
-
swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);
|
6779 |
-
|
6780 |
-
swiper.params.watchSlidesProgress = true;
|
6781 |
-
swiper.originalParams.watchSlidesProgress = true;
|
6782 |
-
},
|
6783 |
-
setTranslate() {
|
6784 |
-
const swiper = this;
|
6785 |
-
if (swiper.params.effect !== 'coverflow') return;
|
6786 |
-
swiper.coverflowEffect.setTranslate();
|
6787 |
-
},
|
6788 |
-
setTransition(duration) {
|
6789 |
-
const swiper = this;
|
6790 |
-
if (swiper.params.effect !== 'coverflow') return;
|
6791 |
-
swiper.coverflowEffect.setTransition(duration);
|
6792 |
-
},
|
6793 |
-
},
|
6794 |
-
};
|
6795 |
-
|
6796 |
-
const Thumbs = {
|
6797 |
-
init() {
|
6798 |
-
const swiper = this;
|
6799 |
-
const { thumbs: thumbsParams } = swiper.params;
|
6800 |
-
const SwiperClass = swiper.constructor;
|
6801 |
-
if (thumbsParams.swiper instanceof SwiperClass) {
|
6802 |
-
swiper.thumbs.swiper = thumbsParams.swiper;
|
6803 |
-
Utils.extend(swiper.thumbs.swiper.originalParams, {
|
6804 |
-
watchSlidesProgress: true,
|
6805 |
-
slideToClickedSlide: false,
|
6806 |
-
});
|
6807 |
-
Utils.extend(swiper.thumbs.swiper.params, {
|
6808 |
-
watchSlidesProgress: true,
|
6809 |
-
slideToClickedSlide: false,
|
6810 |
-
});
|
6811 |
-
} else if (Utils.isObject(thumbsParams.swiper)) {
|
6812 |
-
swiper.thumbs.swiper = new SwiperClass(Utils.extend({}, thumbsParams.swiper, {
|
6813 |
-
watchSlidesVisibility: true,
|
6814 |
-
watchSlidesProgress: true,
|
6815 |
-
slideToClickedSlide: false,
|
6816 |
-
}));
|
6817 |
-
swiper.thumbs.swiperCreated = true;
|
6818 |
-
}
|
6819 |
-
swiper.thumbs.swiper.$el.addClass(swiper.params.thumbs.thumbsContainerClass);
|
6820 |
-
swiper.thumbs.swiper.on('tap', swiper.thumbs.onThumbClick);
|
6821 |
-
},
|
6822 |
-
onThumbClick() {
|
6823 |
-
const swiper = this;
|
6824 |
-
const thumbsSwiper = swiper.thumbs.swiper;
|
6825 |
-
if (!thumbsSwiper) return;
|
6826 |
-
const clickedIndex = thumbsSwiper.clickedIndex;
|
6827 |
-
const clickedSlide = thumbsSwiper.clickedSlide;
|
6828 |
-
if (clickedSlide && $(clickedSlide).hasClass(swiper.params.thumbs.slideThumbActiveClass)) return;
|
6829 |
-
if (typeof clickedIndex === 'undefined' || clickedIndex === null) return;
|
6830 |
-
let slideToIndex;
|
6831 |
-
if (thumbsSwiper.params.loop) {
|
6832 |
-
slideToIndex = parseInt($(thumbsSwiper.clickedSlide).attr('data-swiper-slide-index'), 10);
|
6833 |
-
} else {
|
6834 |
-
slideToIndex = clickedIndex;
|
6835 |
-
}
|
6836 |
-
if (swiper.params.loop) {
|
6837 |
-
let currentIndex = swiper.activeIndex;
|
6838 |
-
if (swiper.slides.eq(currentIndex).hasClass(swiper.params.slideDuplicateClass)) {
|
6839 |
-
swiper.loopFix();
|
6840 |
-
// eslint-disable-next-line
|
6841 |
-
swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
|
6842 |
-
currentIndex = swiper.activeIndex;
|
6843 |
-
}
|
6844 |
-
const prevIndex = swiper.slides.eq(currentIndex).prevAll(`[data-swiper-slide-index="${slideToIndex}"]`).eq(0).index();
|
6845 |
-
const nextIndex = swiper.slides.eq(currentIndex).nextAll(`[data-swiper-slide-index="${slideToIndex}"]`).eq(0).index();
|
6846 |
-
if (typeof prevIndex === 'undefined') slideToIndex = nextIndex;
|
6847 |
-
else if (typeof nextIndex === 'undefined') slideToIndex = prevIndex;
|
6848 |
-
else if (nextIndex - currentIndex < currentIndex - prevIndex) slideToIndex = nextIndex;
|
6849 |
-
else slideToIndex = prevIndex;
|
6850 |
-
}
|
6851 |
-
swiper.slideTo(slideToIndex);
|
6852 |
-
},
|
6853 |
-
update(initial) {
|
6854 |
-
const swiper = this;
|
6855 |
-
const thumbsSwiper = swiper.thumbs.swiper;
|
6856 |
-
if (!thumbsSwiper) return;
|
6857 |
-
|
6858 |
-
const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto'
|
6859 |
-
? thumbsSwiper.slidesPerViewDynamic()
|
6860 |
-
: thumbsSwiper.params.slidesPerView;
|
6861 |
-
|
6862 |
-
if (swiper.realIndex !== thumbsSwiper.realIndex) {
|
6863 |
-
let currentThumbsIndex = thumbsSwiper.activeIndex;
|
6864 |
-
let newThumbsIndex;
|
6865 |
-
if (thumbsSwiper.params.loop) {
|
6866 |
-
if (thumbsSwiper.slides.eq(currentThumbsIndex).hasClass(thumbsSwiper.params.slideDuplicateClass)) {
|
6867 |
-
thumbsSwiper.loopFix();
|
6868 |
-
// eslint-disable-next-line
|
6869 |
-
thumbsSwiper._clientLeft = thumbsSwiper.$wrapperEl[0].clientLeft;
|
6870 |
-
currentThumbsIndex = thumbsSwiper.activeIndex;
|
6871 |
-
}
|
6872 |
-
// Find actual thumbs index to slide to
|
6873 |
-
const prevThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).prevAll(`[data-swiper-slide-index="${swiper.realIndex}"]`).eq(0).index();
|
6874 |
-
const nextThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).nextAll(`[data-swiper-slide-index="${swiper.realIndex}"]`).eq(0).index();
|
6875 |
-
if (typeof prevThumbsIndex === 'undefined') newThumbsIndex = nextThumbsIndex;
|
6876 |
-
else if (typeof nextThumbsIndex === 'undefined') newThumbsIndex = prevThumbsIndex;
|
6877 |
-
else if (nextThumbsIndex - currentThumbsIndex === currentThumbsIndex - prevThumbsIndex) newThumbsIndex = currentThumbsIndex;
|
6878 |
-
else if (nextThumbsIndex - currentThumbsIndex < currentThumbsIndex - prevThumbsIndex) newThumbsIndex = nextThumbsIndex;
|
6879 |
-
else newThumbsIndex = prevThumbsIndex;
|
6880 |
-
} else {
|
6881 |
-
newThumbsIndex = swiper.realIndex;
|
6882 |
-
}
|
6883 |
-
if (thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0) {
|
6884 |
-
if (thumbsSwiper.params.centeredSlides) {
|
6885 |
-
if (newThumbsIndex > currentThumbsIndex) {
|
6886 |
-
newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1;
|
6887 |
-
} else {
|
6888 |
-
newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1;
|
6889 |
-
}
|
6890 |
-
} else if (newThumbsIndex > currentThumbsIndex) {
|
6891 |
-
newThumbsIndex = newThumbsIndex - slidesPerView + 1;
|
6892 |
-
}
|
6893 |
-
thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined);
|
6894 |
-
}
|
6895 |
-
}
|
6896 |
-
|
6897 |
-
// Activate thumbs
|
6898 |
-
let thumbsToActivate = 1;
|
6899 |
-
const thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass;
|
6900 |
-
|
6901 |
-
if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) {
|
6902 |
-
thumbsToActivate = swiper.params.slidesPerView;
|
6903 |
-
}
|
6904 |
-
|
6905 |
-
thumbsSwiper.slides.removeClass(thumbActiveClass);
|
6906 |
-
if (thumbsSwiper.params.loop) {
|
6907 |
-
for (let i = 0; i < thumbsToActivate; i += 1) {
|
6908 |
-
thumbsSwiper.$wrapperEl.children(`[data-swiper-slide-index="${swiper.realIndex + i}"]`).addClass(thumbActiveClass);
|
6909 |
-
}
|
6910 |
-
} else {
|
6911 |
-
for (let i = 0; i < thumbsToActivate; i += 1) {
|
6912 |
-
thumbsSwiper.slides.eq(swiper.realIndex + i).addClass(thumbActiveClass);
|
6913 |
-
}
|
6914 |
-
}
|
6915 |
-
},
|
6916 |
-
};
|
6917 |
-
var thumbs = {
|
6918 |
-
name: 'thumbs',
|
6919 |
-
params: {
|
6920 |
-
thumbs: {
|
6921 |
-
swiper: null,
|
6922 |
-
slideThumbActiveClass: 'swiper-slide-thumb-active',
|
6923 |
-
thumbsContainerClass: 'swiper-container-thumbs',
|
6924 |
-
},
|
6925 |
-
},
|
6926 |
-
create() {
|
6927 |
-
const swiper = this;
|
6928 |
-
Utils.extend(swiper, {
|
6929 |
-
thumbs: {
|
6930 |
-
swiper: null,
|
6931 |
-
init: Thumbs.init.bind(swiper),
|
6932 |
-
update: Thumbs.update.bind(swiper),
|
6933 |
-
onThumbClick: Thumbs.onThumbClick.bind(swiper),
|
6934 |
-
},
|
6935 |
-
});
|
6936 |
-
},
|
6937 |
-
on: {
|
6938 |
-
beforeInit() {
|
6939 |
-
const swiper = this;
|
6940 |
-
const { thumbs } = swiper.params;
|
6941 |
-
if (!thumbs || !thumbs.swiper) return;
|
6942 |
-
swiper.thumbs.init();
|
6943 |
-
swiper.thumbs.update(true);
|
6944 |
-
},
|
6945 |
-
slideChange() {
|
6946 |
-
const swiper = this;
|
6947 |
-
if (!swiper.thumbs.swiper) return;
|
6948 |
-
swiper.thumbs.update();
|
6949 |
-
},
|
6950 |
-
update() {
|
6951 |
-
const swiper = this;
|
6952 |
-
if (!swiper.thumbs.swiper) return;
|
6953 |
-
swiper.thumbs.update();
|
6954 |
-
},
|
6955 |
-
resize() {
|
6956 |
-
const swiper = this;
|
6957 |
-
if (!swiper.thumbs.swiper) return;
|
6958 |
-
swiper.thumbs.update();
|
6959 |
-
},
|
6960 |
-
observerUpdate() {
|
6961 |
-
const swiper = this;
|
6962 |
-
if (!swiper.thumbs.swiper) return;
|
6963 |
-
swiper.thumbs.update();
|
6964 |
-
},
|
6965 |
-
setTransition(duration) {
|
6966 |
-
const swiper = this;
|
6967 |
-
const thumbsSwiper = swiper.thumbs.swiper;
|
6968 |
-
if (!thumbsSwiper) return;
|
6969 |
-
thumbsSwiper.setTransition(duration);
|
6970 |
-
},
|
6971 |
-
beforeDestroy() {
|
6972 |
-
const swiper = this;
|
6973 |
-
const thumbsSwiper = swiper.thumbs.swiper;
|
6974 |
-
if (!thumbsSwiper) return;
|
6975 |
-
if (swiper.thumbs.swiperCreated && thumbsSwiper) {
|
6976 |
-
thumbsSwiper.destroy();
|
6977 |
-
}
|
6978 |
-
},
|
6979 |
-
},
|
6980 |
-
};
|
6981 |
-
|
6982 |
-
// Swiper Class
|
6983 |
-
|
6984 |
-
const components = [
|
6985 |
-
Device$1,
|
6986 |
-
Support$1,
|
6987 |
-
Browser$1,
|
6988 |
-
Resize,
|
6989 |
-
Observer$1,
|
6990 |
-
|
6991 |
-
];
|
6992 |
-
|
6993 |
-
if (typeof Swiper.use === 'undefined') {
|
6994 |
-
Swiper.use = Swiper.Class.use;
|
6995 |
-
Swiper.installModule = Swiper.Class.installModule;
|
6996 |
-
}
|
6997 |
-
|
6998 |
-
Swiper.use(components);
|
6999 |
-
|
7000 |
-
export { Swiper, virtual as Virtual, keyboard as Keyboard, mousewheel as Mousewheel, navigation as Navigation, pagination as Pagination, scrollbar as Scrollbar, parallax as Parallax, zoom as Zoom, lazy as Lazy, controller as Controller, a11y$1 as A11y, history as History, hashNavigation as HashNavigation, autoplay as Autoplay, effectFade as EffectFade, effectCube as EffectCube, effectFlip as EffectFlip, effectCoverflow as EffectCoverflow, thumbs as Thumbs };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/lib/swiper/js/swiper.js
DELETED
@@ -1,7986 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Swiper 4.4.6
|
3 |
-
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
4 |
-
* http://www.idangero.us/swiper/
|
5 |
-
*
|
6 |
-
* Copyright 2014-2018 Vladimir Kharlampidi
|
7 |
-
*
|
8 |
-
* Released under the MIT License
|
9 |
-
*
|
10 |
-
* Released on: December 19, 2018
|
11 |
-
*/
|
12 |
-
|
13 |
-
(function (global, factory) {
|
14 |
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
15 |
-
typeof define === 'function' && define.amd ? define(factory) :
|
16 |
-
(global.Swiper = factory());
|
17 |
-
}(this, (function () { 'use strict';
|
18 |
-
|
19 |
-
/**
|
20 |
-
* SSR Window 1.0.1
|
21 |
-
* Better handling for window object in SSR environment
|
22 |
-
* https://github.com/nolimits4web/ssr-window
|
23 |
-
*
|
24 |
-
* Copyright 2018, Vladimir Kharlampidi
|
25 |
-
*
|
26 |
-
* Licensed under MIT
|
27 |
-
*
|
28 |
-
* Released on: July 18, 2018
|
29 |
-
*/
|
30 |
-
var doc = (typeof document === 'undefined') ? {
|
31 |
-
body: {},
|
32 |
-
addEventListener: function addEventListener() {},
|
33 |
-
removeEventListener: function removeEventListener() {},
|
34 |
-
activeElement: {
|
35 |
-
blur: function blur() {},
|
36 |
-
nodeName: '',
|
37 |
-
},
|
38 |
-
querySelector: function querySelector() {
|
39 |
-
return null;
|
40 |
-
},
|
41 |
-
querySelectorAll: function querySelectorAll() {
|
42 |
-
return [];
|
43 |
-
},
|
44 |
-
getElementById: function getElementById() {
|
45 |
-
return null;
|
46 |
-
},
|
47 |
-
createEvent: function createEvent() {
|
48 |
-
return {
|
49 |
-
initEvent: function initEvent() {},
|
50 |
-
};
|
51 |
-
},
|
52 |
-
createElement: function createElement() {
|
53 |
-
return {
|
54 |
-
children: [],
|
55 |
-
childNodes: [],
|
56 |
-
style: {},
|
57 |
-
setAttribute: function setAttribute() {},
|
58 |
-
getElementsByTagName: function getElementsByTagName() {
|
59 |
-
return [];
|
60 |
-
},
|
61 |
-
};
|
62 |
-
},
|
63 |
-
location: { hash: '' },
|
64 |
-
} : document; // eslint-disable-line
|
65 |
-
|
66 |
-
var win = (typeof window === 'undefined') ? {
|
67 |
-
document: doc,
|
68 |
-
navigator: {
|
69 |
-
userAgent: '',
|
70 |
-
},
|
71 |
-
location: {},
|
72 |
-
history: {},
|
73 |
-
CustomEvent: function CustomEvent() {
|
74 |
-
return this;
|
75 |
-
},
|
76 |
-
addEventListener: function addEventListener() {},
|
77 |
-
removeEventListener: function removeEventListener() {},
|
78 |
-
getComputedStyle: function getComputedStyle() {
|
79 |
-
return {
|
80 |
-
getPropertyValue: function getPropertyValue() {
|
81 |
-
return '';
|
82 |
-
},
|
83 |
-
};
|
84 |
-
},
|
85 |
-
Image: function Image() {},
|
86 |
-
Date: function Date() {},
|
87 |
-
screen: {},
|
88 |
-
setTimeout: function setTimeout() {},
|
89 |
-
clearTimeout: function clearTimeout() {},
|
90 |
-
} : window; // eslint-disable-line
|
91 |
-
|
92 |
-
/**
|
93 |
-
* Dom7 2.1.2
|
94 |
-
* Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API
|
95 |
-
* http://framework7.io/docs/dom.html
|
96 |
-
*
|
97 |
-
* Copyright 2018, Vladimir Kharlampidi
|
98 |
-
* The iDangero.us
|
99 |
-
* http://www.idangero.us/
|
100 |
-
*
|
101 |
-
* Licensed under MIT
|
102 |
-
*
|
103 |
-
* Released on: September 13, 2018
|
104 |
-
*/
|
105 |
-
|
106 |
-
var Dom7 = function Dom7(arr) {
|
107 |
-
var self = this;
|
108 |
-
// Create array-like object
|
109 |
-
for (var i = 0; i < arr.length; i += 1) {
|
110 |
-
self[i] = arr[i];
|
111 |
-
}
|
112 |
-
self.length = arr.length;
|
113 |
-
// Return collection with methods
|
114 |
-
return this;
|
115 |
-
};
|
116 |
-
|
117 |
-
function $(selector, context) {
|
118 |
-
var arr = [];
|
119 |
-
var i = 0;
|
120 |
-
if (selector && !context) {
|
121 |
-
if (selector instanceof Dom7) {
|
122 |
-
return selector;
|
123 |
-
}
|
124 |
-
}
|
125 |
-
if (selector) {
|
126 |
-
// String
|
127 |
-
if (typeof selector === 'string') {
|
128 |
-
var els;
|
129 |
-
var tempParent;
|
130 |
-
var html = selector.trim();
|
131 |
-
if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) {
|
132 |
-
var toCreate = 'div';
|
133 |
-
if (html.indexOf('<li') === 0) { toCreate = 'ul'; }
|
134 |
-
if (html.indexOf('<tr') === 0) { toCreate = 'tbody'; }
|
135 |
-
if (html.indexOf('<td') === 0 || html.indexOf('<th') === 0) { toCreate = 'tr'; }
|
136 |
-
if (html.indexOf('<tbody') === 0) { toCreate = 'table'; }
|
137 |
-
if (html.indexOf('<option') === 0) { toCreate = 'select'; }
|
138 |
-
tempParent = doc.createElement(toCreate);
|
139 |
-
tempParent.innerHTML = html;
|
140 |
-
for (i = 0; i < tempParent.childNodes.length; i += 1) {
|
141 |
-
arr.push(tempParent.childNodes[i]);
|
142 |
-
}
|
143 |
-
} else {
|
144 |
-
if (!context && selector[0] === '#' && !selector.match(/[ .<>:~]/)) {
|
145 |
-
// Pure ID selector
|
146 |
-
els = [doc.getElementById(selector.trim().split('#')[1])];
|
147 |
-
} else {
|
148 |
-
// Other selectors
|
149 |
-
els = (context || doc).querySelectorAll(selector.trim());
|
150 |
-
}
|
151 |
-
for (i = 0; i < els.length; i += 1) {
|
152 |
-
if (els[i]) { arr.push(els[i]); }
|
153 |
-
}
|
154 |
-
}
|
155 |
-
} else if (selector.nodeType || selector === win || selector === doc) {
|
156 |
-
// Node/element
|
157 |
-
arr.push(selector);
|
158 |
-
} else if (selector.length > 0 && selector[0].nodeType) {
|
159 |
-
// Array of elements or instance of Dom
|
160 |
-
for (i = 0; i < selector.length; i += 1) {
|
161 |
-
arr.push(selector[i]);
|
162 |
-
}
|
163 |
-
}
|
164 |
-
}
|
165 |
-
return new Dom7(arr);
|
166 |
-
}
|
167 |
-
|
168 |
-
$.fn = Dom7.prototype;
|
169 |
-
$.Class = Dom7;
|
170 |
-
$.Dom7 = Dom7;
|
171 |
-
|
172 |
-
function unique(arr) {
|
173 |
-
var uniqueArray = [];
|
174 |
-
for (var i = 0; i < arr.length; i += 1) {
|
175 |
-
if (uniqueArray.indexOf(arr[i]) === -1) { uniqueArray.push(arr[i]); }
|
176 |
-
}
|
177 |
-
return uniqueArray;
|
178 |
-
}
|
179 |
-
|
180 |
-
// Classes and attributes
|
181 |
-
function addClass(className) {
|
182 |
-
if (typeof className === 'undefined') {
|
183 |
-
return this;
|
184 |
-
}
|
185 |
-
var classes = className.split(' ');
|
186 |
-
for (var i = 0; i < classes.length; i += 1) {
|
187 |
-
for (var j = 0; j < this.length; j += 1) {
|
188 |
-
if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') { this[j].classList.add(classes[i]); }
|
189 |
-
}
|
190 |
-
}
|
191 |
-
return this;
|
192 |
-
}
|
193 |
-
function removeClass(className) {
|
194 |
-
var classes = className.split(' ');
|
195 |
-
for (var i = 0; i < classes.length; i += 1) {
|
196 |
-
for (var j = 0; j < this.length; j += 1) {
|
197 |
-
if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') { this[j].classList.remove(classes[i]); }
|
198 |
-
}
|
199 |
-
}
|
200 |
-
return this;
|
201 |
-
}
|
202 |
-
function hasClass(className) {
|
203 |
-
if (!this[0]) { return false; }
|
204 |
-
return this[0].classList.contains(className);
|
205 |
-
}
|
206 |
-
function toggleClass(className) {
|
207 |
-
var classes = className.split(' ');
|
208 |
-
for (var i = 0; i < classes.length; i += 1) {
|
209 |
-
for (var j = 0; j < this.length; j += 1) {
|
210 |
-
if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') { this[j].classList.toggle(classes[i]); }
|
211 |
-
}
|
212 |
-
}
|
213 |
-
return this;
|
214 |
-
}
|
215 |
-
function attr(attrs, value) {
|
216 |
-
var arguments$1 = arguments;
|
217 |
-
|
218 |
-
if (arguments.length === 1 && typeof attrs === 'string') {
|
219 |
-
// Get attr
|
220 |
-
if (this[0]) { return this[0].getAttribute(attrs); }
|
221 |
-
return undefined;
|
222 |
-
}
|
223 |
-
|
224 |
-
// Set attrs
|
225 |
-
for (var i = 0; i < this.length; i += 1) {
|
226 |
-
if (arguments$1.length === 2) {
|
227 |
-
// String
|
228 |
-
this[i].setAttribute(attrs, value);
|
229 |
-
} else {
|
230 |
-
// Object
|
231 |
-
// eslint-disable-next-line
|
232 |
-
for (var attrName in attrs) {
|
233 |
-
this[i][attrName] = attrs[attrName];
|
234 |
-
this[i].setAttribute(attrName, attrs[attrName]);
|
235 |
-
}
|
236 |
-
}
|
237 |
-
}
|
238 |
-
return this;
|
239 |
-
}
|
240 |
-
// eslint-disable-next-line
|
241 |
-
function removeAttr(attr) {
|
242 |
-
for (var i = 0; i < this.length; i += 1) {
|
243 |
-
this[i].removeAttribute(attr);
|
244 |
-
}
|
245 |
-
return this;
|
246 |
-
}
|
247 |
-
function data(key, value) {
|
248 |
-
var el;
|
249 |
-
if (typeof value === 'undefined') {
|
250 |
-
el = this[0];
|
251 |
-
// Get value
|
252 |
-
if (el) {
|
253 |
-
if (el.dom7ElementDataStorage && (key in el.dom7ElementDataStorage)) {
|
254 |
-
return el.dom7ElementDataStorage[key];
|
255 |
-
}
|
256 |
-
|
257 |
-
var dataKey = el.getAttribute(("data-" + key));
|
258 |
-
if (dataKey) {
|
259 |
-
return dataKey;
|
260 |
-
}
|
261 |
-
return undefined;
|
262 |
-
}
|
263 |
-
return undefined;
|
264 |
-
}
|
265 |
-
|
266 |
-
// Set value
|
267 |
-
for (var i = 0; i < this.length; i += 1) {
|
268 |
-
el = this[i];
|
269 |
-
if (!el.dom7ElementDataStorage) { el.dom7ElementDataStorage = {}; }
|
270 |
-
el.dom7ElementDataStorage[key] = value;
|
271 |
-
}
|
272 |
-
return this;
|
273 |
-
}
|
274 |
-
// Transforms
|
275 |
-
// eslint-disable-next-line
|
276 |
-
function transform(transform) {
|
277 |
-
for (var i = 0; i < this.length; i += 1) {
|
278 |
-
var elStyle = this[i].style;
|
279 |
-
elStyle.webkitTransform = transform;
|
280 |
-
elStyle.transform = transform;
|
281 |
-
}
|
282 |
-
return this;
|
283 |
-
}
|
284 |
-
function transition(duration) {
|
285 |
-
if (typeof duration !== 'string') {
|
286 |
-
duration = duration + "ms"; // eslint-disable-line
|
287 |
-
}
|
288 |
-
for (var i = 0; i < this.length; i += 1) {
|
289 |
-
var elStyle = this[i].style;
|
290 |
-
elStyle.webkitTransitionDuration = duration;
|
291 |
-
elStyle.transitionDuration = duration;
|
292 |
-
}
|
293 |
-
return this;
|
294 |
-
}
|
295 |
-
// Events
|
296 |
-
function on() {
|
297 |
-
var assign;
|
298 |
-
|
299 |
-
var args = [], len = arguments.length;
|
300 |
-
while ( len-- ) args[ len ] = arguments[ len ];
|
301 |
-
var eventType = args[0];
|
302 |
-
var targetSelector = args[1];
|
303 |
-
var listener = args[2];
|
304 |
-
var capture = args[3];
|
305 |
-
if (typeof args[1] === 'function') {
|
306 |
-
(assign = args, eventType = assign[0], listener = assign[1], capture = assign[2]);
|
307 |
-
targetSelector = undefined;
|
308 |
-
}
|
309 |
-
if (!capture) { capture = false; }
|
310 |
-
|
311 |
-
function handleLiveEvent(e) {
|
312 |
-
var target = e.target;
|
313 |
-
if (!target) { return; }
|
314 |
-
var eventData = e.target.dom7EventData || [];
|
315 |
-
if (eventData.indexOf(e) < 0) {
|
316 |
-
eventData.unshift(e);
|
317 |
-
}
|
318 |
-
if ($(target).is(targetSelector)) { listener.apply(target, eventData); }
|
319 |
-
else {
|
320 |
-
var parents = $(target).parents(); // eslint-disable-line
|
321 |
-
for (var k = 0; k < parents.length; k += 1) {
|
322 |
-
if ($(parents[k]).is(targetSelector)) { listener.apply(parents[k], eventData); }
|
323 |
-
}
|
324 |
-
}
|
325 |
-
}
|
326 |
-
function handleEvent(e) {
|
327 |
-
var eventData = e && e.target ? e.target.dom7EventData || [] : [];
|
328 |
-
if (eventData.indexOf(e) < 0) {
|
329 |
-
eventData.unshift(e);
|
330 |
-
}
|
331 |
-
listener.apply(this, eventData);
|
332 |
-
}
|
333 |
-
var events = eventType.split(' ');
|
334 |
-
var j;
|
335 |
-
for (var i = 0; i < this.length; i += 1) {
|
336 |
-
var el = this[i];
|
337 |
-
if (!targetSelector) {
|
338 |
-
for (j = 0; j < events.length; j += 1) {
|
339 |
-
var event = events[j];
|
340 |
-
if (!el.dom7Listeners) { el.dom7Listeners = {}; }
|
341 |
-
if (!el.dom7Listeners[event]) { el.dom7Listeners[event] = []; }
|
342 |
-
el.dom7Listeners[event].push({
|
343 |
-
listener: listener,
|
344 |
-
proxyListener: handleEvent,
|
345 |
-
});
|
346 |
-
el.addEventListener(event, handleEvent, capture);
|
347 |
-
}
|
348 |
-
} else {
|
349 |
-
// Live events
|
350 |
-
for (j = 0; j < events.length; j += 1) {
|
351 |
-
var event$1 = events[j];
|
352 |
-
if (!el.dom7LiveListeners) { el.dom7LiveListeners = {}; }
|
353 |
-
if (!el.dom7LiveListeners[event$1]) { el.dom7LiveListeners[event$1] = []; }
|
354 |
-
el.dom7LiveListeners[event$1].push({
|
355 |
-
listener: listener,
|
356 |
-
proxyListener: handleLiveEvent,
|
357 |
-
});
|
358 |
-
el.addEventListener(event$1, handleLiveEvent, capture);
|
359 |
-
}
|
360 |
-
}
|
361 |
-
}
|
362 |
-
return this;
|
363 |
-
}
|
364 |
-
function off() {
|
365 |
-
var assign;
|
366 |
-
|
367 |
-
var args = [], len = arguments.length;
|
368 |
-
while ( len-- ) args[ len ] = arguments[ len ];
|
369 |
-
var eventType = args[0];
|
370 |
-
var targetSelector = args[1];
|
371 |
-
var listener = args[2];
|
372 |
-
var capture = args[3];
|
373 |
-
if (typeof args[1] === 'function') {
|
374 |
-
(assign = args, eventType = assign[0], listener = assign[1], capture = assign[2]);
|
375 |
-
targetSelector = undefined;
|
376 |
-
}
|
377 |
-
if (!capture) { capture = false; }
|
378 |
-
|
379 |
-
var events = eventType.split(' ');
|
380 |
-
for (var i = 0; i < events.length; i += 1) {
|
381 |
-
var event = events[i];
|
382 |
-
for (var j = 0; j < this.length; j += 1) {
|
383 |
-
var el = this[j];
|
384 |
-
var handlers = (void 0);
|
385 |
-
if (!targetSelector && el.dom7Listeners) {
|
386 |
-
handlers = el.dom7Listeners[event];
|
387 |
-
} else if (targetSelector && el.dom7LiveListeners) {
|
388 |
-
handlers = el.dom7LiveListeners[event];
|
389 |
-
}
|
390 |
-
if (handlers && handlers.length) {
|
391 |
-
for (var k = handlers.length - 1; k >= 0; k -= 1) {
|
392 |
-
var handler = handlers[k];
|
393 |
-
if (listener && handler.listener === listener) {
|
394 |
-
el.removeEventListener(event, handler.proxyListener, capture);
|
395 |
-
handlers.splice(k, 1);
|
396 |
-
} else if (!listener) {
|
397 |
-
el.removeEventListener(event, handler.proxyListener, capture);
|
398 |
-
handlers.splice(k, 1);
|
399 |
-
}
|
400 |
-
}
|
401 |
-
}
|
402 |
-
}
|
403 |
-
}
|
404 |
-
return this;
|
405 |
-
}
|
406 |
-
function trigger() {
|
407 |
-
var args = [], len = arguments.length;
|
408 |
-
while ( len-- ) args[ len ] = arguments[ len ];
|
409 |
-
|
410 |
-
var events = args[0].split(' ');
|
411 |
-
var eventData = args[1];
|
412 |
-
for (var i = 0; i < events.length; i += 1) {
|
413 |
-
var event = events[i];
|
414 |
-
for (var j = 0; j < this.length; j += 1) {
|
415 |
-
var el = this[j];
|
416 |
-
var evt = (void 0);
|
417 |
-
try {
|
418 |
-
evt = new win.CustomEvent(event, {
|
419 |
-
detail: eventData,
|
420 |
-
bubbles: true,
|
421 |
-
cancelable: true,
|
422 |
-
});
|
423 |
-
} catch (e) {
|
424 |
-
evt = doc.createEvent('Event');
|
425 |
-
evt.initEvent(event, true, true);
|
426 |
-
evt.detail = eventData;
|
427 |
-
}
|
428 |
-
// eslint-disable-next-line
|
429 |
-
el.dom7EventData = args.filter(function (data, dataIndex) { return dataIndex > 0; });
|
430 |
-
el.dispatchEvent(evt);
|
431 |
-
el.dom7EventData = [];
|
432 |
-
delete el.dom7EventData;
|
433 |
-
}
|
434 |
-
}
|
435 |
-
return this;
|
436 |
-
}
|
437 |
-
function transitionEnd(callback) {
|
438 |
-
var events = ['webkitTransitionEnd', 'transitionend'];
|
439 |
-
var dom = this;
|
440 |
-
var i;
|
441 |
-
function fireCallBack(e) {
|
442 |
-
/* jshint validthis:true */
|
443 |
-
if (e.target !== this) { return; }
|
444 |
-
callback.call(this, e);
|
445 |
-
for (i = 0; i < events.length; i += 1) {
|
446 |
-
dom.off(events[i], fireCallBack);
|
447 |
-
}
|
448 |
-
}
|
449 |
-
if (callback) {
|
450 |
-
for (i = 0; i < events.length; i += 1) {
|
451 |
-
dom.on(events[i], fireCallBack);
|
452 |
-
}
|
453 |
-
}
|
454 |
-
return this;
|
455 |
-
}
|
456 |
-
function outerWidth(includeMargins) {
|
457 |
-
if (this.length > 0) {
|
458 |
-
if (includeMargins) {
|
459 |
-
// eslint-disable-next-line
|
460 |
-
var styles = this.styles();
|
461 |
-
return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left'));
|
462 |
-
}
|
463 |
-
return this[0].offsetWidth;
|
464 |
-
}
|
465 |
-
return null;
|
466 |
-
}
|
467 |
-
function outerHeight(includeMargins) {
|
468 |
-
if (this.length > 0) {
|
469 |
-
if (includeMargins) {
|
470 |
-
// eslint-disable-next-line
|
471 |
-
var styles = this.styles();
|
472 |
-
return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom'));
|
473 |
-
}
|
474 |
-
return this[0].offsetHeight;
|
475 |
-
}
|
476 |
-
return null;
|
477 |
-
}
|
478 |
-
function offset() {
|
479 |
-
if (this.length > 0) {
|
480 |
-
var el = this[0];
|
481 |
-
var box = el.getBoundingClientRect();
|
482 |
-
var body = doc.body;
|
483 |
-
var clientTop = el.clientTop || body.clientTop || 0;
|
484 |
-
var clientLeft = el.clientLeft || body.clientLeft || 0;
|
485 |
-
var scrollTop = el === win ? win.scrollY : el.scrollTop;
|
486 |
-
var scrollLeft = el === win ? win.scrollX : el.scrollLeft;
|
487 |
-
return {
|
488 |
-
top: (box.top + scrollTop) - clientTop,
|
489 |
-
left: (box.left + scrollLeft) - clientLeft,
|
490 |
-
};
|
491 |
-
}
|
492 |
-
|
493 |
-
return null;
|
494 |
-
}
|
495 |
-
function styles() {
|
496 |
-
if (this[0]) { return win.getComputedStyle(this[0], null); }
|
497 |
-
return {};
|
498 |
-
}
|
499 |
-
function css(props, value) {
|
500 |
-
var i;
|
501 |
-
if (arguments.length === 1) {
|
502 |
-
if (typeof props === 'string') {
|
503 |
-
if (this[0]) { return win.getComputedStyle(this[0], null).getPropertyValue(props); }
|
504 |
-
} else {
|
505 |
-
for (i = 0; i < this.length; i += 1) {
|
506 |
-
// eslint-disable-next-line
|
507 |
-
for (var prop in props) {
|
508 |
-
this[i].style[prop] = props[prop];
|
509 |
-
}
|
510 |
-
}
|
511 |
-
return this;
|
512 |
-
}
|
513 |
-
}
|
514 |
-
if (arguments.length === 2 && typeof props === 'string') {
|
515 |
-
for (i = 0; i < this.length; i += 1) {
|
516 |
-
this[i].style[props] = value;
|
517 |
-
}
|
518 |
-
return this;
|
519 |
-
}
|
520 |
-
return this;
|
521 |
-
}
|
522 |
-
// Iterate over the collection passing elements to `callback`
|
523 |
-
function each(callback) {
|
524 |
-
// Don't bother continuing without a callback
|
525 |
-
if (!callback) { return this; }
|
526 |
-
// Iterate over the current collection
|
527 |
-
for (var i = 0; i < this.length; i += 1) {
|
528 |
-
// If the callback returns false
|
529 |
-
if (callback.call(this[i], i, this[i]) === false) {
|
530 |
-
// End the loop early
|
531 |
-
return this;
|
532 |
-
}
|
533 |
-
}
|
534 |
-
// Return `this` to allow chained DOM operations
|
535 |
-
return this;
|
536 |
-
}
|
537 |
-
// eslint-disable-next-line
|
538 |
-
function html(html) {
|
539 |
-
if (typeof html === 'undefined') {
|
540 |
-
return this[0] ? this[0].innerHTML : undefined;
|
541 |
-
}
|
542 |
-
|
543 |
-
for (var i = 0; i < this.length; i += 1) {
|
544 |
-
this[i].innerHTML = html;
|
545 |
-
}
|
546 |
-
return this;
|
547 |
-
}
|
548 |
-
// eslint-disable-next-line
|
549 |
-
function text(text) {
|
550 |
-
if (typeof text === 'undefined') {
|
551 |
-
if (this[0]) {
|
552 |
-
return this[0].textContent.trim();
|
553 |
-
}
|
554 |
-
return null;
|
555 |
-
}
|
556 |
-
|
557 |
-
for (var i = 0; i < this.length; i += 1) {
|
558 |
-
this[i].textContent = text;
|
559 |
-
}
|
560 |
-
return this;
|
561 |
-
}
|
562 |
-
function is(selector) {
|
563 |
-
var el = this[0];
|
564 |
-
var compareWith;
|
565 |
-
var i;
|
566 |
-
if (!el || typeof selector === 'undefined') { return false; }
|
567 |
-
if (typeof selector === 'string') {
|
568 |
-
if (el.matches) { return el.matches(selector); }
|
569 |
-
else if (el.webkitMatchesSelector) { return el.webkitMatchesSelector(selector); }
|
570 |
-
else if (el.msMatchesSelector) { return el.msMatchesSelector(selector); }
|
571 |
-
|
572 |
-
compareWith = $(selector);
|
573 |
-
for (i = 0; i < compareWith.length; i += 1) {
|
574 |
-
if (compareWith[i] === el) { return true; }
|
575 |
-
}
|
576 |
-
return false;
|
577 |
-
} else if (selector === doc) { return el === doc; }
|
578 |
-
else if (selector === win) { return el === win; }
|
579 |
-
|
580 |
-
if (selector.nodeType || selector instanceof Dom7) {
|
581 |
-
compareWith = selector.nodeType ? [selector] : selector;
|
582 |
-
for (i = 0; i < compareWith.length; i += 1) {
|
583 |
-
if (compareWith[i] === el) { return true; }
|
584 |
-
}
|
585 |
-
return false;
|
586 |
-
}
|
587 |
-
return false;
|
588 |
-
}
|
589 |
-
function index() {
|
590 |
-
var child = this[0];
|
591 |
-
var i;
|
592 |
-
if (child) {
|
593 |
-
i = 0;
|
594 |
-
// eslint-disable-next-line
|
595 |
-
while ((child = child.previousSibling) !== null) {
|
596 |
-
if (child.nodeType === 1) { i += 1; }
|
597 |
-
}
|
598 |
-
return i;
|
599 |
-
}
|
600 |
-
return undefined;
|
601 |
-
}
|
602 |
-
// eslint-disable-next-line
|
603 |
-
function eq(index) {
|
604 |
-
if (typeof index === 'undefined') { return this; }
|
605 |
-
var length = this.length;
|
606 |
-
var returnIndex;
|
607 |
-
if (index > length - 1) {
|
608 |
-
return new Dom7([]);
|
609 |
-
}
|
610 |
-
if (index < 0) {
|
611 |
-
returnIndex = length + index;
|
612 |
-
if (returnIndex < 0) { return new Dom7([]); }
|
613 |
-
return new Dom7([this[returnIndex]]);
|
614 |
-
}
|
615 |
-
return new Dom7([this[index]]);
|
616 |
-
}
|
617 |
-
function append() {
|
618 |
-
var args = [], len = arguments.length;
|
619 |
-
while ( len-- ) args[ len ] = arguments[ len ];
|
620 |
-
|
621 |
-
var newChild;
|
622 |
-
|
623 |
-
for (var k = 0; k < args.length; k += 1) {
|
624 |
-
newChild = args[k];
|
625 |
-
for (var i = 0; i < this.length; i += 1) {
|
626 |
-
if (typeof newChild === 'string') {
|
627 |
-
var tempDiv = doc.createElement('div');
|
628 |
-
tempDiv.innerHTML = newChild;
|
629 |
-
while (tempDiv.firstChild) {
|
630 |
-
this[i].appendChild(tempDiv.firstChild);
|
631 |
-
}
|
632 |
-
} else if (newChild instanceof Dom7) {
|
633 |
-
for (var j = 0; j < newChild.length; j += 1) {
|
634 |
-
this[i].appendChild(newChild[j]);
|
635 |
-
}
|
636 |
-
} else {
|
637 |
-
this[i].appendChild(newChild);
|
638 |
-
}
|
639 |
-
}
|
640 |
-
}
|
641 |
-
|
642 |
-
return this;
|
643 |
-
}
|
644 |
-
function prepend(newChild) {
|
645 |
-
var i;
|
646 |
-
var j;
|
647 |
-
for (i = 0; i < this.length; i += 1) {
|
648 |
-
if (typeof newChild === 'string') {
|
649 |
-
var tempDiv = doc.createElement('div');
|
650 |
-
tempDiv.innerHTML = newChild;
|
651 |
-
for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) {
|
652 |
-
this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]);
|
653 |
-
}
|
654 |
-
} else if (newChild instanceof Dom7) {
|
655 |
-
for (j = 0; j < newChild.length; j += 1) {
|
656 |
-
this[i].insertBefore(newChild[j], this[i].childNodes[0]);
|
657 |
-
}
|
658 |
-
} else {
|
659 |
-
this[i].insertBefore(newChild, this[i].childNodes[0]);
|
660 |
-
}
|
661 |
-
}
|
662 |
-
return this;
|
663 |
-
}
|
664 |
-
function next(selector) {
|
665 |
-
if (this.length > 0) {
|
666 |
-
if (selector) {
|
667 |
-
if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) {
|
668 |
-
return new Dom7([this[0].nextElementSibling]);
|
669 |
-
}
|
670 |
-
return new Dom7([]);
|
671 |
-
}
|
672 |
-
|
673 |
-
if (this[0].nextElementSibling) { return new Dom7([this[0].nextElementSibling]); }
|
674 |
-
return new Dom7([]);
|
675 |
-
}
|
676 |
-
return new Dom7([]);
|
677 |
-
}
|
678 |
-
function nextAll(selector) {
|
679 |
-
var nextEls = [];
|
680 |
-
var el = this[0];
|
681 |
-
if (!el) { return new Dom7([]); }
|
682 |
-
while (el.nextElementSibling) {
|
683 |
-
var next = el.nextElementSibling; // eslint-disable-line
|
684 |
-
if (selector) {
|
685 |
-
if ($(next).is(selector)) { nextEls.push(next); }
|
686 |
-
} else { nextEls.push(next); }
|
687 |
-
el = next;
|
688 |
-
}
|
689 |
-
return new Dom7(nextEls);
|
690 |
-
}
|
691 |
-
function prev(selector) {
|
692 |
-
if (this.length > 0) {
|
693 |
-
var el = this[0];
|
694 |
-
if (selector) {
|
695 |
-
if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) {
|
696 |
-
return new Dom7([el.previousElementSibling]);
|
697 |
-
}
|
698 |
-
return new Dom7([]);
|
699 |
-
}
|
700 |
-
|
701 |
-
if (el.previousElementSibling) { return new Dom7([el.previousElementSibling]); }
|
702 |
-
return new Dom7([]);
|
703 |
-
}
|
704 |
-
return new Dom7([]);
|
705 |
-
}
|
706 |
-
function prevAll(selector) {
|
707 |
-
var prevEls = [];
|
708 |
-
var el = this[0];
|
709 |
-
if (!el) { return new Dom7([]); }
|
710 |
-
while (el.previousElementSibling) {
|
711 |
-
var prev = el.previousElementSibling; // eslint-disable-line
|
712 |
-
if (selector) {
|
713 |
-
if ($(prev).is(selector)) { prevEls.push(prev); }
|
714 |
-
} else { prevEls.push(prev); }
|
715 |
-
el = prev;
|
716 |
-
}
|
717 |
-
return new Dom7(prevEls);
|
718 |
-
}
|
719 |
-
function parent(selector) {
|
720 |
-
var parents = []; // eslint-disable-line
|
721 |
-
for (var i = 0; i < this.length; i += 1) {
|
722 |
-
if (this[i].parentNode !== null) {
|
723 |
-
if (selector) {
|
724 |
-
if ($(this[i].parentNode).is(selector)) { parents.push(this[i].parentNode); }
|
725 |
-
} else {
|
726 |
-
parents.push(this[i].parentNode);
|
727 |
-
}
|
728 |
-
}
|
729 |
-
}
|
730 |
-
return $(unique(parents));
|
731 |
-
}
|
732 |
-
function parents(selector) {
|
733 |
-
var parents = []; // eslint-disable-line
|
734 |
-
for (var i = 0; i < this.length; i += 1) {
|
735 |
-
var parent = this[i].parentNode; // eslint-disable-line
|
736 |
-
while (parent) {
|
737 |
-
if (selector) {
|
738 |
-
if ($(parent).is(selector)) { parents.push(parent); }
|
739 |
-
} else {
|
740 |
-
parents.push(parent);
|
741 |
-
}
|
742 |
-
parent = parent.parentNode;
|
743 |
-
}
|
744 |
-
}
|
745 |
-
return $(unique(parents));
|
746 |
-
}
|
747 |
-
function closest(selector) {
|
748 |
-
var closest = this; // eslint-disable-line
|
749 |
-
if (typeof selector === 'undefined') {
|
750 |
-
return new Dom7([]);
|
751 |
-
}
|
752 |
-
if (!closest.is(selector)) {
|
753 |
-
closest = closest.parents(selector).eq(0);
|
754 |
-
}
|
755 |
-
return closest;
|
756 |
-
}
|
757 |
-
function find(selector) {
|
758 |
-
var foundElements = [];
|
759 |
-
for (var i = 0; i < this.length; i += 1) {
|
760 |
-
var found = this[i].querySelectorAll(selector);
|
761 |
-
for (var j = 0; j < found.length; j += 1) {
|
762 |
-
foundElements.push(found[j]);
|
763 |
-
}
|
764 |
-
}
|
765 |
-
return new Dom7(foundElements);
|
766 |
-
}
|
767 |
-
function children(selector) {
|
768 |
-
var children = []; // eslint-disable-line
|
769 |
-
for (var i = 0; i < this.length; i += 1) {
|
770 |
-
var childNodes = this[i].childNodes;
|
771 |
-
|
772 |
-
for (var j = 0; j < childNodes.length; j += 1) {
|
773 |
-
if (!selector) {
|
774 |
-
if (childNodes[j].nodeType === 1) { children.push(childNodes[j]); }
|
775 |
-
} else if (childNodes[j].nodeType === 1 && $(childNodes[j]).is(selector)) {
|
776 |
-
children.push(childNodes[j]);
|
777 |
-
}
|
778 |
-
}
|
779 |
-
}
|
780 |
-
return new Dom7(unique(children));
|
781 |
-
}
|
782 |
-
function remove() {
|
783 |
-
for (var i = 0; i < this.length; i += 1) {
|
784 |
-
if (this[i].parentNode) { this[i].parentNode.removeChild(this[i]); }
|
785 |
-
}
|
786 |
-
return this;
|
787 |
-
}
|
788 |
-
function add() {
|
789 |
-
var args = [], len = arguments.length;
|
790 |
-
while ( len-- ) args[ len ] = arguments[ len ];
|
791 |
-
|
792 |
-
var dom = this;
|
793 |
-
var i;
|
794 |
-
var j;
|
795 |
-
for (i = 0; i < args.length; i += 1) {
|
796 |
-
var toAdd = $(args[i]);
|
797 |
-
for (j = 0; j < toAdd.length; j += 1) {
|
798 |
-
dom[dom.length] = toAdd[j];
|
799 |
-
dom.length += 1;
|
800 |
-
}
|
801 |
-
}
|
802 |
-
return dom;
|
803 |
-
}
|
804 |
-
|
805 |
-
var Methods = {
|
806 |
-
addClass: addClass,
|
807 |
-
removeClass: removeClass,
|
808 |
-
hasClass: hasClass,
|
809 |
-
toggleClass: toggleClass,
|
810 |
-
attr: attr,
|
811 |
-
removeAttr: removeAttr,
|
812 |
-
data: data,
|
813 |
-
transform: transform,
|
814 |
-
transition: transition,
|
815 |
-
on: on,
|
816 |
-
off: off,
|
817 |
-
trigger: trigger,
|
818 |
-
transitionEnd: transitionEnd,
|
819 |
-
outerWidth: outerWidth,
|
820 |
-
outerHeight: outerHeight,
|
821 |
-
offset: offset,
|
822 |
-
css: css,
|
823 |
-
each: each,
|
824 |
-
html: html,
|
825 |
-
text: text,
|
826 |
-
is: is,
|
827 |
-
index: index,
|
828 |
-
eq: eq,
|
829 |
-
append: append,
|
830 |
-
prepend: prepend,
|
831 |
-
next: next,
|
832 |
-
nextAll: nextAll,
|
833 |
-
prev: prev,
|
834 |
-
prevAll: prevAll,
|
835 |
-
parent: parent,
|
836 |
-
parents: parents,
|
837 |
-
closest: closest,
|
838 |
-
find: find,
|
839 |
-
children: children,
|
840 |
-
remove: remove,
|
841 |
-
add: add,
|
842 |
-
styles: styles,
|
843 |
-
};
|
844 |
-
|
845 |
-
Object.keys(Methods).forEach(function (methodName) {
|
846 |
-
$.fn[methodName] = Methods[methodName];
|
847 |
-
});
|
848 |
-
|
849 |
-
var Utils = {
|
850 |
-
deleteProps: function deleteProps(obj) {
|
851 |
-
var object = obj;
|
852 |
-
Object.keys(object).forEach(function (key) {
|
853 |
-
try {
|
854 |
-
object[key] = null;
|
855 |
-
} catch (e) {
|
856 |
-
// no getter for object
|
857 |
-
}
|
858 |
-
try {
|
859 |
-
delete object[key];
|
860 |
-
} catch (e) {
|
861 |
-
// something got wrong
|
862 |
-
}
|
863 |
-
});
|
864 |
-
},
|
865 |
-
nextTick: function nextTick(callback, delay) {
|
866 |
-
if ( delay === void 0 ) delay = 0;
|
867 |
-
|
868 |
-
return setTimeout(callback, delay);
|
869 |
-
},
|
870 |
-
now: function now() {
|
871 |
-
return Date.now();
|
872 |
-
},
|
873 |
-
getTranslate: function getTranslate(el, axis) {
|
874 |
-
if ( axis === void 0 ) axis = 'x';
|
875 |
-
|
876 |
-
var matrix;
|
877 |
-
var curTransform;
|
878 |
-
var transformMatrix;
|
879 |
-
|
880 |
-
var curStyle = win.getComputedStyle(el, null);
|
881 |
-
|
882 |
-
if (win.WebKitCSSMatrix) {
|
883 |
-
curTransform = curStyle.transform || curStyle.webkitTransform;
|
884 |
-
if (curTransform.split(',').length > 6) {
|
885 |
-
curTransform = curTransform.split(', ').map(function (a) { return a.replace(',', '.'); }).join(', ');
|
886 |
-
}
|
887 |
-
// Some old versions of Webkit choke when 'none' is passed; pass
|
888 |
-
// empty string instead in this case
|
889 |
-
transformMatrix = new win.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);
|
890 |
-
} else {
|
891 |
-
transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');
|
892 |
-
matrix = transformMatrix.toString().split(',');
|
893 |
-
}
|
894 |
-
|
895 |
-
if (axis === 'x') {
|
896 |
-
// Latest Chrome and webkits Fix
|
897 |
-
if (win.WebKitCSSMatrix) { curTransform = transformMatrix.m41; }
|
898 |
-
// Crazy IE10 Matrix
|
899 |
-
else if (matrix.length === 16) { curTransform = parseFloat(matrix[12]); }
|
900 |
-
// Normal Browsers
|
901 |
-
else { curTransform = parseFloat(matrix[4]); }
|
902 |
-
}
|
903 |
-
if (axis === 'y') {
|
904 |
-
// Latest Chrome and webkits Fix
|
905 |
-
if (win.WebKitCSSMatrix) { curTransform = transformMatrix.m42; }
|
906 |
-
// Crazy IE10 Matrix
|
907 |
-
else if (matrix.length === 16) { curTransform = parseFloat(matrix[13]); }
|
908 |
-
// Normal Browsers
|
909 |
-
else { curTransform = parseFloat(matrix[5]); }
|
910 |
-
}
|
911 |
-
return curTransform || 0;
|
912 |
-
},
|
913 |
-
parseUrlQuery: function parseUrlQuery(url) {
|
914 |
-
var query = {};
|
915 |
-
var urlToParse = url || win.location.href;
|
916 |
-
var i;
|
917 |
-
var params;
|
918 |
-
var param;
|
919 |
-
var length;
|
920 |
-
if (typeof urlToParse === 'string' && urlToParse.length) {
|
921 |
-
urlToParse = urlToParse.indexOf('?') > -1 ? urlToParse.replace(/\S*\?/, '') : '';
|
922 |
-
params = urlToParse.split('&').filter(function (paramsPart) { return paramsPart !== ''; });
|
923 |
-
length = params.length;
|
924 |
-
|
925 |
-
for (i = 0; i < length; i += 1) {
|
926 |
-
param = params[i].replace(/#\S+/g, '').split('=');
|
927 |
-
query[decodeURIComponent(param[0])] = typeof param[1] === 'undefined' ? undefined : decodeURIComponent(param[1]) || '';
|
928 |
-
}
|
929 |
-
}
|
930 |
-
return query;
|
931 |
-
},
|
932 |
-
isObject: function isObject(o) {
|
933 |
-
return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object;
|
934 |
-
},
|
935 |
-
extend: function extend() {
|
936 |
-
var args = [], len$1 = arguments.length;
|
937 |
-
while ( len$1-- ) args[ len$1 ] = arguments[ len$1 ];
|
938 |
-
|
939 |
-
var to = Object(args[0]);
|
940 |
-
for (var i = 1; i < args.length; i += 1) {
|
941 |
-
var nextSource = args[i];
|
942 |
-
if (nextSource !== undefined && nextSource !== null) {
|
943 |
-
var keysArray = Object.keys(Object(nextSource));
|
944 |
-
for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {
|
945 |
-
var nextKey = keysArray[nextIndex];
|
946 |
-
var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
|
947 |
-
if (desc !== undefined && desc.enumerable) {
|
948 |
-
if (Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {
|
949 |
-
Utils.extend(to[nextKey], nextSource[nextKey]);
|
950 |
-
} else if (!Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {
|
951 |
-
to[nextKey] = {};
|
952 |
-
Utils.extend(to[nextKey], nextSource[nextKey]);
|
953 |
-
} else {
|
954 |
-
to[nextKey] = nextSource[nextKey];
|
955 |
-
}
|
956 |
-
}
|
957 |
-
}
|
958 |
-
}
|
959 |
-
}
|
960 |
-
return to;
|
961 |
-
},
|
962 |
-
};
|
963 |
-
|
964 |
-
var Support = (function Support() {
|
965 |
-
var testDiv = doc.createElement('div');
|
966 |
-
return {
|
967 |
-
touch: (win.Modernizr && win.Modernizr.touch === true) || (function checkTouch() {
|
968 |
-
return !!((win.navigator.maxTouchPoints > 0) || ('ontouchstart' in win) || (win.DocumentTouch && doc instanceof win.DocumentTouch));
|
969 |
-
}()),
|
970 |
-
|
971 |
-
pointerEvents: !!(win.navigator.pointerEnabled || win.PointerEvent || ('maxTouchPoints' in win.navigator)),
|
972 |
-
prefixedPointerEvents: !!win.navigator.msPointerEnabled,
|
973 |
-
|
974 |
-
transition: (function checkTransition() {
|
975 |
-
var style = testDiv.style;
|
976 |
-
return ('transition' in style || 'webkitTransition' in style || 'MozTransition' in style);
|
977 |
-
}()),
|
978 |
-
transforms3d: (win.Modernizr && win.Modernizr.csstransforms3d === true) || (function checkTransforms3d() {
|
979 |
-
var style = testDiv.style;
|
980 |
-
return ('webkitPerspective' in style || 'MozPerspective' in style || 'OPerspective' in style || 'MsPerspective' in style || 'perspective' in style);
|
981 |
-
}()),
|
982 |
-
|
983 |
-
flexbox: (function checkFlexbox() {
|
984 |
-
var style = testDiv.style;
|
985 |
-
var styles = ('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' ');
|
986 |
-
for (var i = 0; i < styles.length; i += 1) {
|
987 |
-
if (styles[i] in style) { return true; }
|
988 |
-
}
|
989 |
-
return false;
|
990 |
-
}()),
|
991 |
-
|
992 |
-
observer: (function checkObserver() {
|
993 |
-
return ('MutationObserver' in win || 'WebkitMutationObserver' in win);
|
994 |
-
}()),
|
995 |
-
|
996 |
-
passiveListener: (function checkPassiveListener() {
|
997 |
-
var supportsPassive = false;
|
998 |
-
try {
|
999 |
-
var opts = Object.defineProperty({}, 'passive', {
|
1000 |
-
// eslint-disable-next-line
|
1001 |
-
get: function get() {
|
1002 |
-
supportsPassive = true;
|
1003 |
-
},
|
1004 |
-
});
|
1005 |
-
win.addEventListener('testPassiveListener', null, opts);
|
1006 |
-
} catch (e) {
|
1007 |
-
// No support
|
1008 |
-
}
|
1009 |
-
return supportsPassive;
|
1010 |
-
}()),
|
1011 |
-
|
1012 |
-
gestures: (function checkGestures() {
|
1013 |
-
return 'ongesturestart' in win;
|
1014 |
-
}()),
|
1015 |
-
};
|
1016 |
-
}());
|
1017 |
-
|
1018 |
-
var SwiperClass = function SwiperClass(params) {
|
1019 |
-
if ( params === void 0 ) params = {};
|
1020 |
-
|
1021 |
-
var self = this;
|
1022 |
-
self.params = params;
|
1023 |
-
|
1024 |
-
// Events
|
1025 |
-
self.eventsListeners = {};
|
1026 |
-
|
1027 |
-
if (self.params && self.params.on) {
|
1028 |
-
Object.keys(self.params.on).forEach(function (eventName) {
|
1029 |
-
self.on(eventName, self.params.on[eventName]);
|
1030 |
-
});
|
1031 |
-
}
|
1032 |
-
};
|
1033 |
-
|
1034 |
-
var staticAccessors = { components: { configurable: true } };
|
1035 |
-
|
1036 |
-
SwiperClass.prototype.on = function on (events, handler, priority) {
|
1037 |
-
var self = this;
|
1038 |
-
if (typeof handler !== 'function') { return self; }
|
1039 |
-
var method = priority ? 'unshift' : 'push';
|
1040 |
-
events.split(' ').forEach(function (event) {
|
1041 |
-
if (!self.eventsListeners[event]) { self.eventsListeners[event] = []; }
|
1042 |
-
self.eventsListeners[event][method](handler);
|
1043 |
-
});
|
1044 |
-
return self;
|
1045 |
-
};
|
1046 |
-
|
1047 |
-
SwiperClass.prototype.once = function once (events, handler, priority) {
|
1048 |
-
var self = this;
|
1049 |
-
if (typeof handler !== 'function') { return self; }
|
1050 |
-
function onceHandler() {
|
1051 |
-
var args = [], len = arguments.length;
|
1052 |
-
while ( len-- ) args[ len ] = arguments[ len ];
|
1053 |
-
|
1054 |
-
handler.apply(self, args);
|
1055 |
-
self.off(events, onceHandler);
|
1056 |
-
}
|
1057 |
-
return self.on(events, onceHandler, priority);
|
1058 |
-
};
|
1059 |
-
|
1060 |
-
SwiperClass.prototype.off = function off (events, handler) {
|
1061 |
-
var self = this;
|
1062 |
-
if (!self.eventsListeners) { return self; }
|
1063 |
-
events.split(' ').forEach(function (event) {
|
1064 |
-
if (typeof handler === 'undefined') {
|
1065 |
-
self.eventsListeners[event] = [];
|
1066 |
-
} else if (self.eventsListeners[event] && self.eventsListeners[event].length) {
|
1067 |
-
self.eventsListeners[event].forEach(function (eventHandler, index) {
|
1068 |
-
if (eventHandler === handler) {
|
1069 |
-
self.eventsListeners[event].splice(index, 1);
|
1070 |
-
}
|
1071 |
-
});
|
1072 |
-
}
|
1073 |
-
});
|
1074 |
-
return self;
|
1075 |
-
};
|
1076 |
-
|
1077 |
-
SwiperClass.prototype.emit = function emit () {
|
1078 |
-
var args = [], len = arguments.length;
|
1079 |
-
while ( len-- ) args[ len ] = arguments[ len ];
|
1080 |
-
|
1081 |
-
var self = this;
|
1082 |
-
if (!self.eventsListeners) { return self; }
|
1083 |
-
var events;
|
1084 |
-
var data;
|
1085 |
-
var context;
|
1086 |
-
if (typeof args[0] === 'string' || Array.isArray(args[0])) {
|
1087 |
-
events = args[0];
|
1088 |
-
data = args.slice(1, args.length);
|
1089 |
-
context = self;
|
1090 |
-
} else {
|
1091 |
-
events = args[0].events;
|
1092 |
-
data = args[0].data;
|
1093 |
-
context = args[0].context || self;
|
1094 |
-
}
|
1095 |
-
var eventsArray = Array.isArray(events) ? events : events.split(' ');
|
1096 |
-
eventsArray.forEach(function (event) {
|
1097 |
-
if (self.eventsListeners && self.eventsListeners[event]) {
|
1098 |
-
var handlers = [];
|
1099 |
-
self.eventsListeners[event].forEach(function (eventHandler) {
|
1100 |
-
handlers.push(eventHandler);
|
1101 |
-
});
|
1102 |
-
handlers.forEach(function (eventHandler) {
|
1103 |
-
eventHandler.apply(context, data);
|
1104 |
-
});
|
1105 |
-
}
|
1106 |
-
});
|
1107 |
-
return self;
|
1108 |
-
};
|
1109 |
-
|
1110 |
-
SwiperClass.prototype.useModulesParams = function useModulesParams (instanceParams) {
|
1111 |
-
var instance = this;
|
1112 |
-
if (!instance.modules) { return; }
|
1113 |
-
Object.keys(instance.modules).forEach(function (moduleName) {
|
1114 |
-
var module = instance.modules[moduleName];
|
1115 |
-
// Extend params
|
1116 |
-
if (module.params) {
|
1117 |
-
Utils.extend(instanceParams, module.params);
|
1118 |
-
}
|
1119 |
-
});
|
1120 |
-
};
|
1121 |
-
|
1122 |
-
SwiperClass.prototype.useModules = function useModules (modulesParams) {
|
1123 |
-
if ( modulesParams === void 0 ) modulesParams = {};
|
1124 |
-
|
1125 |
-
var instance = this;
|
1126 |
-
if (!instance.modules) { return; }
|
1127 |
-
Object.keys(instance.modules).forEach(function (moduleName) {
|
1128 |
-
var module = instance.modules[moduleName];
|
1129 |
-
var moduleParams = modulesParams[moduleName] || {};
|
1130 |
-
// Extend instance methods and props
|
1131 |
-
if (module.instance) {
|
1132 |
-
Object.keys(module.instance).forEach(function (modulePropName) {
|
1133 |
-
var moduleProp = module.instance[modulePropName];
|
1134 |
-
if (typeof moduleProp === 'function') {
|
1135 |
-
instance[modulePropName] = moduleProp.bind(instance);
|
1136 |
-
} else {
|
1137 |
-
instance[modulePropName] = moduleProp;
|
1138 |
-
}
|
1139 |
-
});
|
1140 |
-
}
|
1141 |
-
// Add event listeners
|
1142 |
-
if (module.on && instance.on) {
|
1143 |
-
Object.keys(module.on).forEach(function (moduleEventName) {
|
1144 |
-
instance.on(moduleEventName, module.on[moduleEventName]);
|
1145 |
-
});
|
1146 |
-
}
|
1147 |
-
|
1148 |
-
// Module create callback
|
1149 |
-
if (module.create) {
|
1150 |
-
module.create.bind(instance)(moduleParams);
|
1151 |
-
}
|
1152 |
-
});
|
1153 |
-
};
|
1154 |
-
|
1155 |
-
staticAccessors.components.set = function (components) {
|
1156 |
-
var Class = this;
|
1157 |
-
if (!Class.use) { return; }
|
1158 |
-
Class.use(components);
|
1159 |
-
};
|
1160 |
-
|
1161 |
-
SwiperClass.installModule = function installModule (module) {
|
1162 |
-
var params = [], len = arguments.length - 1;
|
1163 |
-
while ( len-- > 0 ) params[ len ] = arguments[ len + 1 ];
|
1164 |
-
|
1165 |
-
var Class = this;
|
1166 |
-
if (!Class.prototype.modules) { Class.prototype.modules = {}; }
|
1167 |
-
var name = module.name || (((Object.keys(Class.prototype.modules).length) + "_" + (Utils.now())));
|
1168 |
-
Class.prototype.modules[name] = module;
|
1169 |
-
// Prototype
|
1170 |
-
if (module.proto) {
|
1171 |
-
Object.keys(module.proto).forEach(function (key) {
|
1172 |
-
Class.prototype[key] = module.proto[key];
|
1173 |
-
});
|
1174 |
-
}
|
1175 |
-
// Class
|
1176 |
-
if (module.static) {
|
1177 |
-
Object.keys(module.static).forEach(function (key) {
|
1178 |
-
Class[key] = module.static[key];
|
1179 |
-
});
|
1180 |
-
}
|
1181 |
-
// Callback
|
1182 |
-
if (module.install) {
|
1183 |
-
module.install.apply(Class, params);
|
1184 |
-
}
|
1185 |
-
return Class;
|
1186 |
-
};
|
1187 |
-
|
1188 |
-
SwiperClass.use = function use (module) {
|
1189 |
-
var params = [], len = arguments.length - 1;
|
1190 |
-
while ( len-- > 0 ) params[ len ] = arguments[ len + 1 ];
|
1191 |
-
|
1192 |
-
var Class = this;
|
1193 |
-
if (Array.isArray(module)) {
|
1194 |
-
module.forEach(function (m) { return Class.installModule(m); });
|
1195 |
-
return Class;
|
1196 |
-
}
|
1197 |
-
return Class.installModule.apply(Class, [ module ].concat( params ));
|
1198 |
-
};
|
1199 |
-
|
1200 |
-
Object.defineProperties( SwiperClass, staticAccessors );
|
1201 |
-
|
1202 |
-
function updateSize () {
|
1203 |
-
var swiper = this;
|
1204 |
-
var width;
|
1205 |
-
var height;
|
1206 |
-
var $el = swiper.$el;
|
1207 |
-
if (typeof swiper.params.width !== 'undefined') {
|
1208 |
-
width = swiper.params.width;
|
1209 |
-
} else {
|
1210 |
-
width = $el[0].clientWidth;
|
1211 |
-
}
|
1212 |
-
if (typeof swiper.params.height !== 'undefined') {
|
1213 |
-
height = swiper.params.height;
|
1214 |
-
} else {
|
1215 |
-
height = $el[0].clientHeight;
|
1216 |
-
}
|
1217 |
-
if ((width === 0 && swiper.isHorizontal()) || (height === 0 && swiper.isVertical())) {
|
1218 |
-
return;
|
1219 |
-
}
|
1220 |
-
|
1221 |
-
// Subtract paddings
|
1222 |
-
width = width - parseInt($el.css('padding-left'), 10) - parseInt($el.css('padding-right'), 10);
|
1223 |
-
height = height - parseInt($el.css('padding-top'), 10) - parseInt($el.css('padding-bottom'), 10);
|
1224 |
-
|
1225 |
-
Utils.extend(swiper, {
|
1226 |
-
width: width,
|
1227 |
-
height: height,
|
1228 |
-
size: swiper.isHorizontal() ? width : height,
|
1229 |
-
});
|
1230 |
-
}
|
1231 |
-
|
1232 |
-
function updateSlides () {
|
1233 |
-
var swiper = this;
|
1234 |
-
var params = swiper.params;
|
1235 |
-
|
1236 |
-
var $wrapperEl = swiper.$wrapperEl;
|
1237 |
-
var swiperSize = swiper.size;
|
1238 |
-
var rtl = swiper.rtlTranslate;
|
1239 |
-
var wrongRTL = swiper.wrongRTL;
|
1240 |
-
var isVirtual = swiper.virtual && params.virtual.enabled;
|
1241 |
-
var previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;
|
1242 |
-
var slides = $wrapperEl.children(("." + (swiper.params.slideClass)));
|
1243 |
-
var slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;
|
1244 |
-
var snapGrid = [];
|
1245 |
-
var slidesGrid = [];
|
1246 |
-
var slidesSizesGrid = [];
|
1247 |
-
|
1248 |
-
var offsetBefore = params.slidesOffsetBefore;
|
1249 |
-
if (typeof offsetBefore === 'function') {
|
1250 |
-
offsetBefore = params.slidesOffsetBefore.call(swiper);
|
1251 |
-
}
|
1252 |
-
|
1253 |
-
var offsetAfter = params.slidesOffsetAfter;
|
1254 |
-
if (typeof offsetAfter === 'function') {
|
1255 |
-
offsetAfter = params.slidesOffsetAfter.call(swiper);
|
1256 |
-
}
|
1257 |
-
|
1258 |
-
var previousSnapGridLength = swiper.snapGrid.length;
|
1259 |
-
var previousSlidesGridLength = swiper.snapGrid.length;
|
1260 |
-
|
1261 |
-
var spaceBetween = params.spaceBetween;
|
1262 |
-
var slidePosition = -offsetBefore;
|
1263 |
-
var prevSlideSize = 0;
|
1264 |
-
var index = 0;
|
1265 |
-
if (typeof swiperSize === 'undefined') {
|
1266 |
-
return;
|
1267 |
-
}
|
1268 |
-
if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {
|
1269 |
-
spaceBetween = (parseFloat(spaceBetween.replace('%', '')) / 100) * swiperSize;
|
1270 |
-
}
|
1271 |
-
|
1272 |
-
swiper.virtualSize = -spaceBetween;
|
1273 |
-
|
1274 |
-
// reset margins
|
1275 |
-
if (rtl) { slides.css({ marginLeft: '', marginTop: '' }); }
|
1276 |
-
else { slides.css({ marginRight: '', marginBottom: '' }); }
|
1277 |
-
|
1278 |
-
var slidesNumberEvenToRows;
|
1279 |
-
if (params.slidesPerColumn > 1) {
|
1280 |
-
if (Math.floor(slidesLength / params.slidesPerColumn) === slidesLength / swiper.params.slidesPerColumn) {
|
1281 |
-
slidesNumberEvenToRows = slidesLength;
|
1282 |
-
} else {
|
1283 |
-
slidesNumberEvenToRows = Math.ceil(slidesLength / params.slidesPerColumn) * params.slidesPerColumn;
|
1284 |
-
}
|
1285 |
-
if (params.slidesPerView !== 'auto' && params.slidesPerColumnFill === 'row') {
|
1286 |
-
slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, params.slidesPerView * params.slidesPerColumn);
|
1287 |
-
}
|
1288 |
-
}
|
1289 |
-
|
1290 |
-
// Calc slides
|
1291 |
-
var slideSize;
|
1292 |
-
var slidesPerColumn = params.slidesPerColumn;
|
1293 |
-
var slidesPerRow = slidesNumberEvenToRows / slidesPerColumn;
|
1294 |
-
var numFullColumns = Math.floor(slidesLength / params.slidesPerColumn);
|
1295 |
-
for (var i = 0; i < slidesLength; i += 1) {
|
1296 |
-
slideSize = 0;
|
1297 |
-
var slide = slides.eq(i);
|
1298 |
-
if (params.slidesPerColumn > 1) {
|
1299 |
-
// Set slides order
|
1300 |
-
var newSlideOrderIndex = (void 0);
|
1301 |
-
var column = (void 0);
|
1302 |
-
var row = (void 0);
|
1303 |
-
if (params.slidesPerColumnFill === 'column') {
|
1304 |
-
column = Math.floor(i / slidesPerColumn);
|
1305 |
-
row = i - (column * slidesPerColumn);
|
1306 |
-
if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn - 1)) {
|
1307 |
-
row += 1;
|
1308 |
-
if (row >= slidesPerColumn) {
|
1309 |
-
row = 0;
|
1310 |
-
column += 1;
|
1311 |
-
}
|
1312 |
-
}
|
1313 |
-
newSlideOrderIndex = column + ((row * slidesNumberEvenToRows) / slidesPerColumn);
|
1314 |
-
slide
|
1315 |
-
.css({
|
1316 |
-
'-webkit-box-ordinal-group': newSlideOrderIndex,
|
1317 |
-
'-moz-box-ordinal-group': newSlideOrderIndex,
|
1318 |
-
'-ms-flex-order': newSlideOrderIndex,
|
1319 |
-
'-webkit-order': newSlideOrderIndex,
|
1320 |
-
order: newSlideOrderIndex,
|
1321 |
-
});
|
1322 |
-
} else {
|
1323 |
-
row = Math.floor(i / slidesPerRow);
|
1324 |
-
column = i - (row * slidesPerRow);
|
1325 |
-
}
|
1326 |
-
slide
|
1327 |
-
.css(
|
1328 |
-
("margin-" + (swiper.isHorizontal() ? 'top' : 'left')),
|
1329 |
-
(row !== 0 && params.spaceBetween) && (((params.spaceBetween) + "px"))
|
1330 |
-
)
|
1331 |
-
.attr('data-swiper-column', column)
|
1332 |
-
.attr('data-swiper-row', row);
|
1333 |
-
}
|
1334 |
-
if (slide.css('display') === 'none') { continue; } // eslint-disable-line
|
1335 |
-
|
1336 |
-
if (params.slidesPerView === 'auto') {
|
1337 |
-
var slideStyles = win.getComputedStyle(slide[0], null);
|
1338 |
-
var currentTransform = slide[0].style.transform;
|
1339 |
-
var currentWebKitTransform = slide[0].style.webkitTransform;
|
1340 |
-
if (currentTransform) {
|
1341 |
-
slide[0].style.transform = 'none';
|
1342 |
-
}
|
1343 |
-
if (currentWebKitTransform) {
|
1344 |
-
slide[0].style.webkitTransform = 'none';
|
1345 |
-
}
|
1346 |
-
if (params.roundLengths) {
|
1347 |
-
slideSize = swiper.isHorizontal()
|
1348 |
-
? slide.outerWidth(true)
|
1349 |
-
: slide.outerHeight(true);
|
1350 |
-
} else {
|
1351 |
-
// eslint-disable-next-line
|
1352 |
-
if (swiper.isHorizontal()) {
|
1353 |
-
var width = parseFloat(slideStyles.getPropertyValue('width'));
|
1354 |
-
var paddingLeft = parseFloat(slideStyles.getPropertyValue('padding-left'));
|
1355 |
-
var paddingRight = parseFloat(slideStyles.getPropertyValue('padding-right'));
|
1356 |
-
var marginLeft = parseFloat(slideStyles.getPropertyValue('margin-left'));
|
1357 |
-
var marginRight = parseFloat(slideStyles.getPropertyValue('margin-right'));
|
1358 |
-
var boxSizing = slideStyles.getPropertyValue('box-sizing');
|
1359 |
-
if (boxSizing && boxSizing === 'border-box') {
|
1360 |
-
slideSize = width + marginLeft + marginRight;
|
1361 |
-
} else {
|
1362 |
-
slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight;
|
1363 |
-
}
|
1364 |
-
} else {
|
1365 |
-
var height = parseFloat(slideStyles.getPropertyValue('height'));
|
1366 |
-
var paddingTop = parseFloat(slideStyles.getPropertyValue('padding-top'));
|
1367 |
-
var paddingBottom = parseFloat(slideStyles.getPropertyValue('padding-bottom'));
|
1368 |
-
var marginTop = parseFloat(slideStyles.getPropertyValue('margin-top'));
|
1369 |
-
var marginBottom = parseFloat(slideStyles.getPropertyValue('margin-bottom'));
|
1370 |
-
var boxSizing$1 = slideStyles.getPropertyValue('box-sizing');
|
1371 |
-
if (boxSizing$1 && boxSizing$1 === 'border-box') {
|
1372 |
-
slideSize = height + marginTop + marginBottom;
|
1373 |
-
} else {
|
1374 |
-
slideSize = height + paddingTop + paddingBottom + marginTop + marginBottom;
|
1375 |
-
}
|
1376 |
-
}
|
1377 |
-
}
|
1378 |
-
if (currentTransform) {
|
1379 |
-
slide[0].style.transform = currentTransform;
|
1380 |
-
}
|
1381 |
-
if (currentWebKitTransform) {
|
1382 |
-
slide[0].style.webkitTransform = currentWebKitTransform;
|
1383 |
-
}
|
1384 |
-
if (params.roundLengths) { slideSize = Math.floor(slideSize); }
|
1385 |
-
} else {
|
1386 |
-
slideSize = (swiperSize - ((params.slidesPerView - 1) * spaceBetween)) / params.slidesPerView;
|
1387 |
-
if (params.roundLengths) { slideSize = Math.floor(slideSize); }
|
1388 |
-
|
1389 |
-
if (slides[i]) {
|
1390 |
-
if (swiper.isHorizontal()) {
|
1391 |
-
slides[i].style.width = slideSize + "px";
|
1392 |
-
} else {
|
1393 |
-
slides[i].style.height = slideSize + "px";
|
1394 |
-
}
|
1395 |
-
}
|
1396 |
-
}
|
1397 |
-
if (slides[i]) {
|
1398 |
-
slides[i].swiperSlideSize = slideSize;
|
1399 |
-
}
|
1400 |
-
slidesSizesGrid.push(slideSize);
|
1401 |
-
|
1402 |
-
|
1403 |
-
if (params.centeredSlides) {
|
1404 |
-
slidePosition = slidePosition + (slideSize / 2) + (prevSlideSize / 2) + spaceBetween;
|
1405 |
-
if (prevSlideSize === 0 && i !== 0) { slidePosition = slidePosition - (swiperSize / 2) - spaceBetween; }
|
1406 |
-
if (i === 0) { slidePosition = slidePosition - (swiperSize / 2) - spaceBetween; }
|
1407 |
-
if (Math.abs(slidePosition) < 1 / 1000) { slidePosition = 0; }
|
1408 |
-
if (params.roundLengths) { slidePosition = Math.floor(slidePosition); }
|
1409 |
-
if ((index) % params.slidesPerGroup === 0) { snapGrid.push(slidePosition); }
|
1410 |
-
slidesGrid.push(slidePosition);
|
1411 |
-
} else {
|
1412 |
-
if (params.roundLengths) { slidePosition = Math.floor(slidePosition); }
|
1413 |
-
if ((index) % params.slidesPerGroup === 0) { snapGrid.push(slidePosition); }
|
1414 |
-
slidesGrid.push(slidePosition);
|
1415 |
-
slidePosition = slidePosition + slideSize + spaceBetween;
|
1416 |
-
}
|
1417 |
-
|
1418 |
-
swiper.virtualSize += slideSize + spaceBetween;
|
1419 |
-
|
1420 |
-
prevSlideSize = slideSize;
|
1421 |
-
|
1422 |
-
index += 1;
|
1423 |
-
}
|
1424 |
-
swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;
|
1425 |
-
var newSlidesGrid;
|
1426 |
-
|
1427 |
-
if (
|
1428 |
-
rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {
|
1429 |
-
$wrapperEl.css({ width: ((swiper.virtualSize + params.spaceBetween) + "px") });
|
1430 |
-
}
|
1431 |
-
if (!Support.flexbox || params.setWrapperSize) {
|
1432 |
-
if (swiper.isHorizontal()) { $wrapperEl.css({ width: ((swiper.virtualSize + params.spaceBetween) + "px") }); }
|
1433 |
-
else { $wrapperEl.css({ height: ((swiper.virtualSize + params.spaceBetween) + "px") }); }
|
1434 |
-
}
|
1435 |
-
|
1436 |
-
if (params.slidesPerColumn > 1) {
|
1437 |
-
swiper.virtualSize = (slideSize + params.spaceBetween) * slidesNumberEvenToRows;
|
1438 |
-
swiper.virtualSize = Math.ceil(swiper.virtualSize / params.slidesPerColumn) - params.spaceBetween;
|
1439 |
-
if (swiper.isHorizontal()) { $wrapperEl.css({ width: ((swiper.virtualSize + params.spaceBetween) + "px") }); }
|
1440 |
-
else { $wrapperEl.css({ height: ((swiper.virtualSize + params.spaceBetween) + "px") }); }
|
1441 |
-
if (params.centeredSlides) {
|
1442 |
-
newSlidesGrid = [];
|
1443 |
-
for (var i$1 = 0; i$1 < snapGrid.length; i$1 += 1) {
|
1444 |
-
var slidesGridItem = snapGrid[i$1];
|
1445 |
-
if (params.roundLengths) { slidesGridItem = Math.floor(slidesGridItem); }
|
1446 |
-
if (snapGrid[i$1] < swiper.virtualSize + snapGrid[0]) { newSlidesGrid.push(slidesGridItem); }
|
1447 |
-
}
|
1448 |
-
snapGrid = newSlidesGrid;
|
1449 |
-
}
|
1450 |
-
}
|
1451 |
-
|
1452 |
-
// Remove last grid elements depending on width
|
1453 |
-
if (!params.centeredSlides) {
|
1454 |
-
newSlidesGrid = [];
|
1455 |
-
for (var i$2 = 0; i$2 < snapGrid.length; i$2 += 1) {
|
1456 |
-
var slidesGridItem$1 = snapGrid[i$2];
|
1457 |
-
if (params.roundLengths) { slidesGridItem$1 = Math.floor(slidesGridItem$1); }
|
1458 |
-
if (snapGrid[i$2] <= swiper.virtualSize - swiperSize) {
|
1459 |
-
newSlidesGrid.push(slidesGridItem$1);
|
1460 |
-
}
|
1461 |
-
}
|
1462 |
-
snapGrid = newSlidesGrid;
|
1463 |
-
if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {
|
1464 |
-
snapGrid.push(swiper.virtualSize - swiperSize);
|
1465 |
-
}
|
1466 |
-
}
|
1467 |
-
if (snapGrid.length === 0) { snapGrid = [0]; }
|
1468 |
-
|
1469 |
-
if (params.spaceBetween !== 0) {
|
1470 |
-
if (swiper.isHorizontal()) {
|
1471 |
-
if (rtl) { slides.css({ marginLeft: (spaceBetween + "px") }); }
|
1472 |
-
else { slides.css({ marginRight: (spaceBetween + "px") }); }
|
1473 |
-
} else { slides.css({ marginBottom: (spaceBetween + "px") }); }
|
1474 |
-
}
|
1475 |
-
|
1476 |
-
if (params.centerInsufficientSlides) {
|
1477 |
-
var allSlidesSize = 0;
|
1478 |
-
slidesSizesGrid.forEach(function (slideSizeValue) {
|
1479 |
-
allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0);
|
1480 |
-
});
|
1481 |
-
allSlidesSize -= params.spaceBetween;
|
1482 |
-
if (allSlidesSize < swiperSize) {
|
1483 |
-
var allSlidesOffset = (swiperSize - allSlidesSize) / 2;
|
1484 |
-
snapGrid.forEach(function (snap, snapIndex) {
|
1485 |
-
snapGrid[snapIndex] = snap - allSlidesOffset;
|
1486 |
-
});
|
1487 |
-
slidesGrid.forEach(function (snap, snapIndex) {
|
1488 |
-
slidesGrid[snapIndex] = snap + allSlidesOffset;
|
1489 |
-
});
|
1490 |
-
}
|
1491 |
-
}
|
1492 |
-
|
1493 |
-
Utils.extend(swiper, {
|
1494 |
-
slides: slides,
|
1495 |
-
snapGrid: snapGrid,
|
1496 |
-
slidesGrid: slidesGrid,
|
1497 |
-
slidesSizesGrid: slidesSizesGrid,
|
1498 |
-
});
|
1499 |
-
|
1500 |
-
if (slidesLength !== previousSlidesLength) {
|
1501 |
-
swiper.emit('slidesLengthChange');
|
1502 |
-
}
|
1503 |
-
if (snapGrid.length !== previousSnapGridLength) {
|
1504 |
-
if (swiper.params.watchOverflow) { swiper.checkOverflow(); }
|
1505 |
-
swiper.emit('snapGridLengthChange');
|
1506 |
-
}
|
1507 |
-
if (slidesGrid.length !== previousSlidesGridLength) {
|
1508 |
-
swiper.emit('slidesGridLengthChange');
|
1509 |
-
}
|
1510 |
-
|
1511 |
-
if (params.watchSlidesProgress || params.watchSlidesVisibility) {
|
1512 |
-
swiper.updateSlidesOffset();
|
1513 |
-
}
|
1514 |
-
}
|
1515 |
-
|
1516 |
-
function updateAutoHeight (speed) {
|
1517 |
-
var swiper = this;
|
1518 |
-
var activeSlides = [];
|
1519 |
-
var newHeight = 0;
|
1520 |
-
var i;
|
1521 |
-
if (typeof speed === 'number') {
|
1522 |
-
swiper.setTransition(speed);
|
1523 |
-
} else if (speed === true) {
|
1524 |
-
swiper.setTransition(swiper.params.speed);
|
1525 |
-
}
|
1526 |
-
// Find slides currently in view
|
1527 |
-
if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {
|
1528 |
-
for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {
|
1529 |
-
var index = swiper.activeIndex + i;
|
1530 |
-
if (index > swiper.slides.length) { break; }
|
1531 |
-
activeSlides.push(swiper.slides.eq(index)[0]);
|
1532 |
-
}
|
1533 |
-
} else {
|
1534 |
-
activeSlides.push(swiper.slides.eq(swiper.activeIndex)[0]);
|
1535 |
-
}
|
1536 |
-
|
1537 |
-
// Find new height from highest slide in view
|
1538 |
-
for (i = 0; i < activeSlides.length; i += 1) {
|
1539 |
-
if (typeof activeSlides[i] !== 'undefined') {
|
1540 |
-
var height = activeSlides[i].offsetHeight;
|
1541 |
-
newHeight = height > newHeight ? height : newHeight;
|
1542 |
-
}
|
1543 |
-
}
|
1544 |
-
|
1545 |
-
// Update Height
|
1546 |
-
if (newHeight) { swiper.$wrapperEl.css('height', (newHeight + "px")); }
|
1547 |
-
}
|
1548 |
-
|
1549 |
-
function updateSlidesOffset () {
|
1550 |
-
var swiper = this;
|
1551 |
-
var slides = swiper.slides;
|
1552 |
-
for (var i = 0; i < slides.length; i += 1) {
|
1553 |
-
slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop;
|
1554 |
-
}
|
1555 |
-
}
|
1556 |
-
|
1557 |
-
function updateSlidesProgress (translate) {
|
1558 |
-
if ( translate === void 0 ) translate = (this && this.translate) || 0;
|
1559 |
-
|
1560 |
-
var swiper = this;
|
1561 |
-
var params = swiper.params;
|
1562 |
-
|
1563 |
-
var slides = swiper.slides;
|
1564 |
-
var rtl = swiper.rtlTranslate;
|
1565 |
-
|
1566 |
-
if (slides.length === 0) { return; }
|
1567 |
-
if (typeof slides[0].swiperSlideOffset === 'undefined') { swiper.updateSlidesOffset(); }
|
1568 |
-
|
1569 |
-
var offsetCenter = -translate;
|
1570 |
-
if (rtl) { offsetCenter = translate; }
|
1571 |
-
|
1572 |
-
// Visible Slides
|
1573 |
-
slides.removeClass(params.slideVisibleClass);
|
1574 |
-
|
1575 |
-
swiper.visibleSlidesIndexes = [];
|
1576 |
-
swiper.visibleSlides = [];
|
1577 |
-
|
1578 |
-
for (var i = 0; i < slides.length; i += 1) {
|
1579 |
-
var slide = slides[i];
|
1580 |
-
var slideProgress = (
|
1581 |
-
(offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0)) - slide.swiperSlideOffset
|
1582 |
-
) / (slide.swiperSlideSize + params.spaceBetween);
|
1583 |
-
if (params.watchSlidesVisibility) {
|
1584 |
-
var slideBefore = -(offsetCenter - slide.swiperSlideOffset);
|
1585 |
-
var slideAfter = slideBefore + swiper.slidesSizesGrid[i];
|
1586 |
-
var isVisible = (slideBefore >= 0 && slideBefore < swiper.size)
|
1587 |
-
|| (slideAfter > 0 && slideAfter <= swiper.size)
|
1588 |
-
|| (slideBefore <= 0 && slideAfter >= swiper.size);
|
1589 |
-
if (isVisible) {
|
1590 |
-
swiper.visibleSlides.push(slide);
|
1591 |
-
swiper.visibleSlidesIndexes.push(i);
|
1592 |
-
slides.eq(i).addClass(params.slideVisibleClass);
|
1593 |
-
}
|
1594 |
-
}
|
1595 |
-
slide.progress = rtl ? -slideProgress : slideProgress;
|
1596 |
-
}
|
1597 |
-
swiper.visibleSlides = $(swiper.visibleSlides);
|
1598 |
-
}
|
1599 |
-
|
1600 |
-
function updateProgress (translate) {
|
1601 |
-
if ( translate === void 0 ) translate = (this && this.translate) || 0;
|
1602 |
-
|
1603 |
-
var swiper = this;
|
1604 |
-
var params = swiper.params;
|
1605 |
-
|
1606 |
-
var translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
|
1607 |
-
var progress = swiper.progress;
|
1608 |
-
var isBeginning = swiper.isBeginning;
|
1609 |
-
var isEnd = swiper.isEnd;
|
1610 |
-
var wasBeginning = isBeginning;
|
1611 |
-
var wasEnd = isEnd;
|
1612 |
-
if (translatesDiff === 0) {
|
1613 |
-
progress = 0;
|
1614 |
-
isBeginning = true;
|
1615 |
-
isEnd = true;
|
1616 |
-
} else {
|
1617 |
-
progress = (translate - swiper.minTranslate()) / (translatesDiff);
|
1618 |
-
isBeginning = progress <= 0;
|
1619 |
-
isEnd = progress >= 1;
|
1620 |
-
}
|
1621 |
-
Utils.extend(swiper, {
|
1622 |
-
progress: progress,
|
1623 |
-
isBeginning: isBeginning,
|
1624 |
-
isEnd: isEnd,
|
1625 |
-
});
|
1626 |
-
|
1627 |
-
if (params.watchSlidesProgress || params.watchSlidesVisibility) { swiper.updateSlidesProgress(translate); }
|
1628 |
-
|
1629 |
-
if (isBeginning && !wasBeginning) {
|
1630 |
-
swiper.emit('reachBeginning toEdge');
|
1631 |
-
}
|
1632 |
-
if (isEnd && !wasEnd) {
|
1633 |
-
swiper.emit('reachEnd toEdge');
|
1634 |
-
}
|
1635 |
-
if ((wasBeginning && !isBeginning) || (wasEnd && !isEnd)) {
|
1636 |
-
swiper.emit('fromEdge');
|
1637 |
-
}
|
1638 |
-
|
1639 |
-
swiper.emit('progress', progress);
|
1640 |
-
}
|
1641 |
-
|
1642 |
-
function updateSlidesClasses () {
|
1643 |
-
var swiper = this;
|
1644 |
-
|
1645 |
-
var slides = swiper.slides;
|
1646 |
-
var params = swiper.params;
|
1647 |
-
var $wrapperEl = swiper.$wrapperEl;
|
1648 |
-
var activeIndex = swiper.activeIndex;
|
1649 |
-
var realIndex = swiper.realIndex;
|
1650 |
-
var isVirtual = swiper.virtual && params.virtual.enabled;
|
1651 |
-
|
1652 |
-
slides.removeClass(((params.slideActiveClass) + " " + (params.slideNextClass) + " " + (params.slidePrevClass) + " " + (params.slideDuplicateActiveClass) + " " + (params.slideDuplicateNextClass) + " " + (params.slideDuplicatePrevClass)));
|
1653 |
-
|
1654 |
-
var activeSlide;
|
1655 |
-
if (isVirtual) {
|
1656 |
-
activeSlide = swiper.$wrapperEl.find(("." + (params.slideClass) + "[data-swiper-slide-index=\"" + activeIndex + "\"]"));
|
1657 |
-
} else {
|
1658 |
-
activeSlide = slides.eq(activeIndex);
|
1659 |
-
}
|
1660 |
-
|
1661 |
-
// Active classes
|
1662 |
-
activeSlide.addClass(params.slideActiveClass);
|
1663 |
-
|
1664 |
-
if (params.loop) {
|
1665 |
-
// Duplicate to all looped slides
|
1666 |
-
if (activeSlide.hasClass(params.slideDuplicateClass)) {
|
1667 |
-
$wrapperEl
|
1668 |
-
.children(("." + (params.slideClass) + ":not(." + (params.slideDuplicateClass) + ")[data-swiper-slide-index=\"" + realIndex + "\"]"))
|
1669 |
-
.addClass(params.slideDuplicateActiveClass);
|
1670 |
-
} else {
|
1671 |
-
$wrapperEl
|
1672 |
-
.children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + realIndex + "\"]"))
|
1673 |
-
.addClass(params.slideDuplicateActiveClass);
|
1674 |
-
}
|
1675 |
-
}
|
1676 |
-
// Next Slide
|
1677 |
-
var nextSlide = activeSlide.nextAll(("." + (params.slideClass))).eq(0).addClass(params.slideNextClass);
|
1678 |
-
if (params.loop && nextSlide.length === 0) {
|
1679 |
-
nextSlide = slides.eq(0);
|
1680 |
-
nextSlide.addClass(params.slideNextClass);
|
1681 |
-
}
|
1682 |
-
// Prev Slide
|
1683 |
-
var prevSlide = activeSlide.prevAll(("." + (params.slideClass))).eq(0).addClass(params.slidePrevClass);
|
1684 |
-
if (params.loop && prevSlide.length === 0) {
|
1685 |
-
prevSlide = slides.eq(-1);
|
1686 |
-
prevSlide.addClass(params.slidePrevClass);
|
1687 |
-
}
|
1688 |
-
if (params.loop) {
|
1689 |
-
// Duplicate to all looped slides
|
1690 |
-
if (nextSlide.hasClass(params.slideDuplicateClass)) {
|
1691 |
-
$wrapperEl
|
1692 |
-
.children(("." + (params.slideClass) + ":not(." + (params.slideDuplicateClass) + ")[data-swiper-slide-index=\"" + (nextSlide.attr('data-swiper-slide-index')) + "\"]"))
|
1693 |
-
.addClass(params.slideDuplicateNextClass);
|
1694 |
-
} else {
|
1695 |
-
$wrapperEl
|
1696 |
-
.children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + (nextSlide.attr('data-swiper-slide-index')) + "\"]"))
|
1697 |
-
.addClass(params.slideDuplicateNextClass);
|
1698 |
-
}
|
1699 |
-
if (prevSlide.hasClass(params.slideDuplicateClass)) {
|
1700 |
-
$wrapperEl
|
1701 |
-
.children(("." + (params.slideClass) + ":not(." + (params.slideDuplicateClass) + ")[data-swiper-slide-index=\"" + (prevSlide.attr('data-swiper-slide-index')) + "\"]"))
|
1702 |
-
.addClass(params.slideDuplicatePrevClass);
|
1703 |
-
} else {
|
1704 |
-
$wrapperEl
|
1705 |
-
.children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + (prevSlide.attr('data-swiper-slide-index')) + "\"]"))
|
1706 |
-
.addClass(params.slideDuplicatePrevClass);
|
1707 |
-
}
|
1708 |
-
}
|
1709 |
-
}
|
1710 |
-
|
1711 |
-
function updateActiveIndex (newActiveIndex) {
|
1712 |
-
var swiper = this;
|
1713 |
-
var translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
|
1714 |
-
var slidesGrid = swiper.slidesGrid;
|
1715 |
-
var snapGrid = swiper.snapGrid;
|
1716 |
-
var params = swiper.params;
|
1717 |
-
var previousIndex = swiper.activeIndex;
|
1718 |
-
var previousRealIndex = swiper.realIndex;
|
1719 |
-
var previousSnapIndex = swiper.snapIndex;
|
1720 |
-
var activeIndex = newActiveIndex;
|
1721 |
-
var snapIndex;
|
1722 |
-
if (typeof activeIndex === 'undefined') {
|
1723 |
-
for (var i = 0; i < slidesGrid.length; i += 1) {
|
1724 |
-
if (typeof slidesGrid[i + 1] !== 'undefined') {
|
1725 |
-
if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - ((slidesGrid[i + 1] - slidesGrid[i]) / 2)) {
|
1726 |
-
activeIndex = i;
|
1727 |
-
} else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {
|
1728 |
-
activeIndex = i + 1;
|
1729 |
-
}
|
1730 |
-
} else if (translate >= slidesGrid[i]) {
|
1731 |
-
activeIndex = i;
|
1732 |
-
}
|
1733 |
-
}
|
1734 |
-
// Normalize slideIndex
|
1735 |
-
if (params.normalizeSlideIndex) {
|
1736 |
-
if (activeIndex < 0 || typeof activeIndex === 'undefined') { activeIndex = 0; }
|
1737 |
-
}
|
1738 |
-
}
|
1739 |
-
if (snapGrid.indexOf(translate) >= 0) {
|
1740 |
-
snapIndex = snapGrid.indexOf(translate);
|
1741 |
-
} else {
|
1742 |
-
snapIndex = Math.floor(activeIndex / params.slidesPerGroup);
|
1743 |
-
}
|
1744 |
-
if (snapIndex >= snapGrid.length) { snapIndex = snapGrid.length - 1; }
|
1745 |
-
if (activeIndex === previousIndex) {
|
1746 |
-
if (snapIndex !== previousSnapIndex) {
|
1747 |
-
swiper.snapIndex = snapIndex;
|
1748 |
-
swiper.emit('snapIndexChange');
|
1749 |
-
}
|
1750 |
-
return;
|
1751 |
-
}
|
1752 |
-
|
1753 |
-
// Get real index
|
1754 |
-
var realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10);
|
1755 |
-
|
1756 |
-
Utils.extend(swiper, {
|
1757 |
-
snapIndex: snapIndex,
|
1758 |
-
realIndex: realIndex,
|
1759 |
-
previousIndex: previousIndex,
|
1760 |
-
activeIndex: activeIndex,
|
1761 |
-
});
|
1762 |
-
swiper.emit('activeIndexChange');
|
1763 |
-
swiper.emit('snapIndexChange');
|
1764 |
-
if (previousRealIndex !== realIndex) {
|
1765 |
-
swiper.emit('realIndexChange');
|
1766 |
-
}
|
1767 |
-
swiper.emit('slideChange');
|
1768 |
-
}
|
1769 |
-
|
1770 |
-
function updateClickedSlide (e) {
|
1771 |
-
var swiper = this;
|
1772 |
-
var params = swiper.params;
|
1773 |
-
var slide = $(e.target).closest(("." + (params.slideClass)))[0];
|
1774 |
-
var slideFound = false;
|
1775 |
-
if (slide) {
|
1776 |
-
for (var i = 0; i < swiper.slides.length; i += 1) {
|
1777 |
-
if (swiper.slides[i] === slide) { slideFound = true; }
|
1778 |
-
}
|
1779 |
-
}
|
1780 |
-
|
1781 |
-
if (slide && slideFound) {
|
1782 |
-
swiper.clickedSlide = slide;
|
1783 |
-
if (swiper.virtual && swiper.params.virtual.enabled) {
|
1784 |
-
swiper.clickedIndex = parseInt($(slide).attr('data-swiper-slide-index'), 10);
|
1785 |
-
} else {
|
1786 |
-
swiper.clickedIndex = $(slide).index();
|
1787 |
-
}
|
1788 |
-
} else {
|
1789 |
-
swiper.clickedSlide = undefined;
|
1790 |
-
swiper.clickedIndex = undefined;
|
1791 |
-
return;
|
1792 |
-
}
|
1793 |
-
if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {
|
1794 |
-
swiper.slideToClickedSlide();
|
1795 |
-
}
|
1796 |
-
}
|
1797 |
-
|
1798 |
-
var update = {
|
1799 |
-
updateSize: updateSize,
|
1800 |
-
updateSlides: updateSlides,
|
1801 |
-
updateAutoHeight: updateAutoHeight,
|
1802 |
-
updateSlidesOffset: updateSlidesOffset,
|
1803 |
-
updateSlidesProgress: updateSlidesProgress,
|
1804 |
-
updateProgress: updateProgress,
|
1805 |
-
updateSlidesClasses: updateSlidesClasses,
|
1806 |
-
updateActiveIndex: updateActiveIndex,
|
1807 |
-
updateClickedSlide: updateClickedSlide,
|
1808 |
-
};
|
1809 |
-
|
1810 |
-
function getTranslate (axis) {
|
1811 |
-
if ( axis === void 0 ) axis = this.isHorizontal() ? 'x' : 'y';
|
1812 |
-
|
1813 |
-
var swiper = this;
|
1814 |
-
|
1815 |
-
var params = swiper.params;
|
1816 |
-
var rtl = swiper.rtlTranslate;
|
1817 |
-
var translate = swiper.translate;
|
1818 |
-
var $wrapperEl = swiper.$wrapperEl;
|
1819 |
-
|
1820 |
-
if (params.virtualTranslate) {
|
1821 |
-
return rtl ? -translate : translate;
|
1822 |
-
}
|
1823 |
-
|
1824 |
-
var currentTranslate = Utils.getTranslate($wrapperEl[0], axis);
|
1825 |
-
if (rtl) { currentTranslate = -currentTranslate; }
|
1826 |
-
|
1827 |
-
return currentTranslate || 0;
|
1828 |
-
}
|
1829 |
-
|
1830 |
-
function setTranslate (translate, byController) {
|
1831 |
-
var swiper = this;
|
1832 |
-
var rtl = swiper.rtlTranslate;
|
1833 |
-
var params = swiper.params;
|
1834 |
-
var $wrapperEl = swiper.$wrapperEl;
|
1835 |
-
var progress = swiper.progress;
|
1836 |
-
var x = 0;
|
1837 |
-
var y = 0;
|
1838 |
-
var z = 0;
|
1839 |
-
|
1840 |
-
if (swiper.isHorizontal()) {
|
1841 |
-
x = rtl ? -translate : translate;
|
1842 |
-
} else {
|
1843 |
-
y = translate;
|
1844 |
-
}
|
1845 |
-
|
1846 |
-
if (params.roundLengths) {
|
1847 |
-
x = Math.floor(x);
|
1848 |
-
y = Math.floor(y);
|
1849 |
-
}
|
1850 |
-
|
1851 |
-
if (!params.virtualTranslate) {
|
1852 |
-
if (Support.transforms3d) { $wrapperEl.transform(("translate3d(" + x + "px, " + y + "px, " + z + "px)")); }
|
1853 |
-
else { $wrapperEl.transform(("translate(" + x + "px, " + y + "px)")); }
|
1854 |
-
}
|
1855 |
-
swiper.previousTranslate = swiper.translate;
|
1856 |
-
swiper.translate = swiper.isHorizontal() ? x : y;
|
1857 |
-
|
1858 |
-
// Check if we need to update progress
|
1859 |
-
var newProgress;
|
1860 |
-
var translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
|
1861 |
-
if (translatesDiff === 0) {
|
1862 |
-
newProgress = 0;
|
1863 |
-
} else {
|
1864 |
-
newProgress = (translate - swiper.minTranslate()) / (translatesDiff);
|
1865 |
-
}
|
1866 |
-
if (newProgress !== progress) {
|
1867 |
-
swiper.updateProgress(translate);
|
1868 |
-
}
|
1869 |
-
|
1870 |
-
swiper.emit('setTranslate', swiper.translate, byController);
|
1871 |
-
}
|
1872 |
-
|
1873 |
-
function minTranslate () {
|
1874 |
-
return (-this.snapGrid[0]);
|
1875 |
-
}
|
1876 |
-
|
1877 |
-
function maxTranslate () {
|
1878 |
-
return (-this.snapGrid[this.snapGrid.length - 1]);
|
1879 |
-
}
|
1880 |
-
|
1881 |
-
var translate = {
|
1882 |
-
getTranslate: getTranslate,
|
1883 |
-
setTranslate: setTranslate,
|
1884 |
-
minTranslate: minTranslate,
|
1885 |
-
maxTranslate: maxTranslate,
|
1886 |
-
};
|
1887 |
-
|
1888 |
-
function setTransition (duration, byController) {
|
1889 |
-
var swiper = this;
|
1890 |
-
|
1891 |
-
swiper.$wrapperEl.transition(duration);
|
1892 |
-
|
1893 |
-
swiper.emit('setTransition', duration, byController);
|
1894 |
-
}
|
1895 |
-
|
1896 |
-
function transitionStart (runCallbacks, direction) {
|
1897 |
-
if ( runCallbacks === void 0 ) runCallbacks = true;
|
1898 |
-
|
1899 |
-
var swiper = this;
|
1900 |
-
var activeIndex = swiper.activeIndex;
|
1901 |
-
var params = swiper.params;
|
1902 |
-
var previousIndex = swiper.previousIndex;
|
1903 |
-
if (params.autoHeight) {
|
1904 |
-
swiper.updateAutoHeight();
|
1905 |
-
}
|
1906 |
-
|
1907 |
-
var dir = direction;
|
1908 |
-
if (!dir) {
|
1909 |
-
if (activeIndex > previousIndex) { dir = 'next'; }
|
1910 |
-
else if (activeIndex < previousIndex) { dir = 'prev'; }
|
1911 |
-
else { dir = 'reset'; }
|
1912 |
-
}
|
1913 |
-
|
1914 |
-
swiper.emit('transitionStart');
|
1915 |
-
|
1916 |
-
if (runCallbacks && activeIndex !== previousIndex) {
|
1917 |
-
if (dir === 'reset') {
|
1918 |
-
swiper.emit('slideResetTransitionStart');
|
1919 |
-
return;
|
1920 |
-
}
|
1921 |
-
swiper.emit('slideChangeTransitionStart');
|
1922 |
-
if (dir === 'next') {
|
1923 |
-
swiper.emit('slideNextTransitionStart');
|
1924 |
-
} else {
|
1925 |
-
swiper.emit('slidePrevTransitionStart');
|
1926 |
-
}
|
1927 |
-
}
|
1928 |
-
}
|
1929 |
-
|
1930 |
-
function transitionEnd$1 (runCallbacks, direction) {
|
1931 |
-
if ( runCallbacks === void 0 ) runCallbacks = true;
|
1932 |
-
|
1933 |
-
var swiper = this;
|
1934 |
-
var activeIndex = swiper.activeIndex;
|
1935 |
-
var previousIndex = swiper.previousIndex;
|
1936 |
-
swiper.animating = false;
|
1937 |
-
swiper.setTransition(0);
|
1938 |
-
|
1939 |
-
var dir = direction;
|
1940 |
-
if (!dir) {
|
1941 |
-
if (activeIndex > previousIndex) { dir = 'next'; }
|
1942 |
-
else if (activeIndex < previousIndex) { dir = 'prev'; }
|
1943 |
-
else { dir = 'reset'; }
|
1944 |
-
}
|
1945 |
-
|
1946 |
-
swiper.emit('transitionEnd');
|
1947 |
-
|
1948 |
-
if (runCallbacks && activeIndex !== previousIndex) {
|
1949 |
-
if (dir === 'reset') {
|
1950 |
-
swiper.emit('slideResetTransitionEnd');
|
1951 |
-
return;
|
1952 |
-
}
|
1953 |
-
swiper.emit('slideChangeTransitionEnd');
|
1954 |
-
if (dir === 'next') {
|
1955 |
-
swiper.emit('slideNextTransitionEnd');
|
1956 |
-
} else {
|
1957 |
-
swiper.emit('slidePrevTransitionEnd');
|
1958 |
-
}
|
1959 |
-
}
|
1960 |
-
}
|
1961 |
-
|
1962 |
-
var transition$1 = {
|
1963 |
-
setTransition: setTransition,
|
1964 |
-
transitionStart: transitionStart,
|
1965 |
-
transitionEnd: transitionEnd$1,
|
1966 |
-
};
|
1967 |
-
|
1968 |
-
function slideTo (index, speed, runCallbacks, internal) {
|
1969 |
-
if ( index === void 0 ) index = 0;
|
1970 |
-
if ( speed === void 0 ) speed = this.params.speed;
|
1971 |
-
if ( runCallbacks === void 0 ) runCallbacks = true;
|
1972 |
-
|
1973 |
-
var swiper = this;
|
1974 |
-
var slideIndex = index;
|
1975 |
-
if (slideIndex < 0) { slideIndex = 0; }
|
1976 |
-
|
1977 |
-
var params = swiper.params;
|
1978 |
-
var snapGrid = swiper.snapGrid;
|
1979 |
-
var slidesGrid = swiper.slidesGrid;
|
1980 |
-
var previousIndex = swiper.previousIndex;
|
1981 |
-
var activeIndex = swiper.activeIndex;
|
1982 |
-
var rtl = swiper.rtlTranslate;
|
1983 |
-
if (swiper.animating && params.preventInteractionOnTransition) {
|
1984 |
-
return false;
|
1985 |
-
}
|
1986 |
-
|
1987 |
-
var snapIndex = Math.floor(slideIndex / params.slidesPerGroup);
|
1988 |
-
if (snapIndex >= snapGrid.length) { snapIndex = snapGrid.length - 1; }
|
1989 |
-
|
1990 |
-
if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) {
|
1991 |
-
swiper.emit('beforeSlideChangeStart');
|
1992 |
-
}
|
1993 |
-
|
1994 |
-
var translate = -snapGrid[snapIndex];
|
1995 |
-
|
1996 |
-
// Update progress
|
1997 |
-
swiper.updateProgress(translate);
|
1998 |
-
|
1999 |
-
// Normalize slideIndex
|
2000 |
-
if (params.normalizeSlideIndex) {
|
2001 |
-
for (var i = 0; i < slidesGrid.length; i += 1) {
|
2002 |
-
if (-Math.floor(translate * 100) >= Math.floor(slidesGrid[i] * 100)) {
|
2003 |
-
slideIndex = i;
|
2004 |
-
}
|
2005 |
-
}
|
2006 |
-
}
|
2007 |
-
// Directions locks
|
2008 |
-
if (swiper.initialized && slideIndex !== activeIndex) {
|
2009 |
-
if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) {
|
2010 |
-
return false;
|
2011 |
-
}
|
2012 |
-
if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {
|
2013 |
-
if ((activeIndex || 0) !== slideIndex) { return false; }
|
2014 |
-
}
|
2015 |
-
}
|
2016 |
-
|
2017 |
-
var direction;
|
2018 |
-
if (slideIndex > activeIndex) { direction = 'next'; }
|
2019 |
-
else if (slideIndex < activeIndex) { direction = 'prev'; }
|
2020 |
-
else { direction = 'reset'; }
|
2021 |
-
|
2022 |
-
|
2023 |
-
// Update Index
|
2024 |
-
if ((rtl && -translate === swiper.translate) || (!rtl && translate === swiper.translate)) {
|
2025 |
-
swiper.updateActiveIndex(slideIndex);
|
2026 |
-
// Update Height
|
2027 |
-
if (params.autoHeight) {
|
2028 |
-
swiper.updateAutoHeight();
|
2029 |
-
}
|
2030 |
-
swiper.updateSlidesClasses();
|
2031 |
-
if (params.effect !== 'slide') {
|
2032 |
-
swiper.setTranslate(translate);
|
2033 |
-
}
|
2034 |
-
if (direction !== 'reset') {
|
2035 |
-
swiper.transitionStart(runCallbacks, direction);
|
2036 |
-
swiper.transitionEnd(runCallbacks, direction);
|
2037 |
-
}
|
2038 |
-
return false;
|
2039 |
-
}
|
2040 |
-
|
2041 |
-
if (speed === 0 || !Support.transition) {
|
2042 |
-
swiper.setTransition(0);
|
2043 |
-
swiper.setTranslate(translate);
|
2044 |
-
swiper.updateActiveIndex(slideIndex);
|
2045 |
-
swiper.updateSlidesClasses();
|
2046 |
-
swiper.emit('beforeTransitionStart', speed, internal);
|
2047 |
-
swiper.transitionStart(runCallbacks, direction);
|
2048 |
-
swiper.transitionEnd(runCallbacks, direction);
|
2049 |
-
} else {
|
2050 |
-
swiper.setTransition(speed);
|
2051 |
-
swiper.setTranslate(translate);
|
2052 |
-
swiper.updateActiveIndex(slideIndex);
|
2053 |
-
swiper.updateSlidesClasses();
|
2054 |
-
swiper.emit('beforeTransitionStart', speed, internal);
|
2055 |
-
swiper.transitionStart(runCallbacks, direction);
|
2056 |
-
if (!swiper.animating) {
|
2057 |
-
swiper.animating = true;
|
2058 |
-
if (!swiper.onSlideToWrapperTransitionEnd) {
|
2059 |
-
swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {
|
2060 |
-
if (!swiper || swiper.destroyed) { return; }
|
2061 |
-
if (e.target !== this) { return; }
|
2062 |
-
swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
2063 |
-
swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
|
2064 |
-
swiper.onSlideToWrapperTransitionEnd = null;
|
2065 |
-
delete swiper.onSlideToWrapperTransitionEnd;
|
2066 |
-
swiper.transitionEnd(runCallbacks, direction);
|
2067 |
-
};
|
2068 |
-
}
|
2069 |
-
swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
2070 |
-
swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
|
2071 |
-
}
|
2072 |
-
}
|
2073 |
-
|
2074 |
-
return true;
|
2075 |
-
}
|
2076 |
-
|
2077 |
-
function slideToLoop (index, speed, runCallbacks, internal) {
|
2078 |
-
if ( index === void 0 ) index = 0;
|
2079 |
-
if ( speed === void 0 ) speed = this.params.speed;
|
2080 |
-
if ( runCallbacks === void 0 ) runCallbacks = true;
|
2081 |
-
|
2082 |
-
var swiper = this;
|
2083 |
-
var newIndex = index;
|
2084 |
-
if (swiper.params.loop) {
|
2085 |
-
newIndex += swiper.loopedSlides;
|
2086 |
-
}
|
2087 |
-
|
2088 |
-
return swiper.slideTo(newIndex, speed, runCallbacks, internal);
|
2089 |
-
}
|
2090 |
-
|
2091 |
-
/* eslint no-unused-vars: "off" */
|
2092 |
-
function slideNext (speed, runCallbacks, internal) {
|
2093 |
-
if ( speed === void 0 ) speed = this.params.speed;
|
2094 |
-
if ( runCallbacks === void 0 ) runCallbacks = true;
|
2095 |
-
|
2096 |
-
var swiper = this;
|
2097 |
-
var params = swiper.params;
|
2098 |
-
var animating = swiper.animating;
|
2099 |
-
if (params.loop) {
|
2100 |
-
if (animating) { return false; }
|
2101 |
-
swiper.loopFix();
|
2102 |
-
// eslint-disable-next-line
|
2103 |
-
swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
|
2104 |
-
return swiper.slideTo(swiper.activeIndex + params.slidesPerGroup, speed, runCallbacks, internal);
|
2105 |
-
}
|
2106 |
-
return swiper.slideTo(swiper.activeIndex + params.slidesPerGroup, speed, runCallbacks, internal);
|
2107 |
-
}
|
2108 |
-
|
2109 |
-
/* eslint no-unused-vars: "off" */
|
2110 |
-
function slidePrev (speed, runCallbacks, internal) {
|
2111 |
-
if ( speed === void 0 ) speed = this.params.speed;
|
2112 |
-
if ( runCallbacks === void 0 ) runCallbacks = true;
|
2113 |
-
|
2114 |
-
var swiper = this;
|
2115 |
-
var params = swiper.params;
|
2116 |
-
var animating = swiper.animating;
|
2117 |
-
var snapGrid = swiper.snapGrid;
|
2118 |
-
var slidesGrid = swiper.slidesGrid;
|
2119 |
-
var rtlTranslate = swiper.rtlTranslate;
|
2120 |
-
|
2121 |
-
if (params.loop) {
|
2122 |
-
if (animating) { return false; }
|
2123 |
-
swiper.loopFix();
|
2124 |
-
// eslint-disable-next-line
|
2125 |
-
swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
|
2126 |
-
}
|
2127 |
-
var translate = rtlTranslate ? swiper.translate : -swiper.translate;
|
2128 |
-
function normalize(val) {
|
2129 |
-
if (val < 0) { return -Math.floor(Math.abs(val)); }
|
2130 |
-
return Math.floor(val);
|
2131 |
-
}
|
2132 |
-
var normalizedTranslate = normalize(translate);
|
2133 |
-
var normalizedSnapGrid = snapGrid.map(function (val) { return normalize(val); });
|
2134 |
-
var normalizedSlidesGrid = slidesGrid.map(function (val) { return normalize(val); });
|
2135 |
-
|
2136 |
-
var currentSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate)];
|
2137 |
-
var prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];
|
2138 |
-
var prevIndex;
|
2139 |
-
if (typeof prevSnap !== 'undefined') {
|
2140 |
-
prevIndex = slidesGrid.indexOf(prevSnap);
|
2141 |
-
if (prevIndex < 0) { prevIndex = swiper.activeIndex - 1; }
|
2142 |
-
}
|
2143 |
-
return swiper.slideTo(prevIndex, speed, runCallbacks, internal);
|
2144 |
-
}
|
2145 |
-
|
2146 |
-
/* eslint no-unused-vars: "off" */
|
2147 |
-
function slideReset (speed, runCallbacks, internal) {
|
2148 |
-
if ( speed === void 0 ) speed = this.params.speed;
|
2149 |
-
if ( runCallbacks === void 0 ) runCallbacks = true;
|
2150 |
-
|
2151 |
-
var swiper = this;
|
2152 |
-
return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);
|
2153 |
-
}
|
2154 |
-
|
2155 |
-
/* eslint no-unused-vars: "off" */
|
2156 |
-
function slideToClosest (speed, runCallbacks, internal) {
|
2157 |
-
if ( speed === void 0 ) speed = this.params.speed;
|
2158 |
-
if ( runCallbacks === void 0 ) runCallbacks = true;
|
2159 |
-
|
2160 |
-
var swiper = this;
|
2161 |
-
var index = swiper.activeIndex;
|
2162 |
-
var snapIndex = Math.floor(index / swiper.params.slidesPerGroup);
|
2163 |
-
|
2164 |
-
if (snapIndex < swiper.snapGrid.length - 1) {
|
2165 |
-
var translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
|
2166 |
-
|
2167 |
-
var currentSnap = swiper.snapGrid[snapIndex];
|
2168 |
-
var nextSnap = swiper.snapGrid[snapIndex + 1];
|
2169 |
-
|
2170 |
-
if ((translate - currentSnap) > (nextSnap - currentSnap) / 2) {
|
2171 |
-
index = swiper.params.slidesPerGroup;
|
2172 |
-
}
|
2173 |
-
}
|
2174 |
-
|
2175 |
-
return swiper.slideTo(index, speed, runCallbacks, internal);
|
2176 |
-
}
|
2177 |
-
|
2178 |
-
function slideToClickedSlide () {
|
2179 |
-
var swiper = this;
|
2180 |
-
var params = swiper.params;
|
2181 |
-
var $wrapperEl = swiper.$wrapperEl;
|
2182 |
-
|
2183 |
-
var slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;
|
2184 |
-
var slideToIndex = swiper.clickedIndex;
|
2185 |
-
var realIndex;
|
2186 |
-
if (params.loop) {
|
2187 |
-
if (swiper.animating) { return; }
|
2188 |
-
realIndex = parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'), 10);
|
2189 |
-
if (params.centeredSlides) {
|
2190 |
-
if (
|
2191 |
-
(slideToIndex < swiper.loopedSlides - (slidesPerView / 2))
|
2192 |
-
|| (slideToIndex > (swiper.slides.length - swiper.loopedSlides) + (slidesPerView / 2))
|
2193 |
-
) {
|
2194 |
-
swiper.loopFix();
|
2195 |
-
slideToIndex = $wrapperEl
|
2196 |
-
.children(("." + (params.slideClass) + "[data-swiper-slide-index=\"" + realIndex + "\"]:not(." + (params.slideDuplicateClass) + ")"))
|
2197 |
-
.eq(0)
|
2198 |
-
.index();
|
2199 |
-
|
2200 |
-
Utils.nextTick(function () {
|
2201 |
-
swiper.slideTo(slideToIndex);
|
2202 |
-
});
|
2203 |
-
} else {
|
2204 |
-
swiper.slideTo(slideToIndex);
|
2205 |
-
}
|
2206 |
-
} else if (slideToIndex > swiper.slides.length - slidesPerView) {
|
2207 |
-
swiper.loopFix();
|
2208 |
-
slideToIndex = $wrapperEl
|
2209 |
-
.children(("." + (params.slideClass) + "[data-swiper-slide-index=\"" + realIndex + "\"]:not(." + (params.slideDuplicateClass) + ")"))
|
2210 |
-
.eq(0)
|
2211 |
-
.index();
|
2212 |
-
|
2213 |
-
Utils.nextTick(function () {
|
2214 |
-
swiper.slideTo(slideToIndex);
|
2215 |
-
});
|
2216 |
-
} else {
|
2217 |
-
swiper.slideTo(slideToIndex);
|
2218 |
-
}
|
2219 |
-
} else {
|
2220 |
-
swiper.slideTo(slideToIndex);
|
2221 |
-
}
|
2222 |
-
}
|
2223 |
-
|
2224 |
-
var slide = {
|
2225 |
-
slideTo: slideTo,
|
2226 |
-
slideToLoop: slideToLoop,
|
2227 |
-
slideNext: slideNext,
|
2228 |
-
slidePrev: slidePrev,
|
2229 |
-
slideReset: slideReset,
|
2230 |
-
slideToClosest: slideToClosest,
|
2231 |
-
slideToClickedSlide: slideToClickedSlide,
|
2232 |
-
};
|
2233 |
-
|
2234 |
-
function loopCreate () {
|
2235 |
-
var swiper = this;
|
2236 |
-
var params = swiper.params;
|
2237 |
-
var $wrapperEl = swiper.$wrapperEl;
|
2238 |
-
// Remove duplicated slides
|
2239 |
-
$wrapperEl.children(("." + (params.slideClass) + "." + (params.slideDuplicateClass))).remove();
|
2240 |
-
|
2241 |
-
var slides = $wrapperEl.children(("." + (params.slideClass)));
|
2242 |
-
|
2243 |
-
if (params.loopFillGroupWithBlank) {
|
2244 |
-
var blankSlidesNum = params.slidesPerGroup - (slides.length % params.slidesPerGroup);
|
2245 |
-
if (blankSlidesNum !== params.slidesPerGroup) {
|
2246 |
-
for (var i = 0; i < blankSlidesNum; i += 1) {
|
2247 |
-
var blankNode = $(doc.createElement('div')).addClass(((params.slideClass) + " " + (params.slideBlankClass)));
|
2248 |
-
$wrapperEl.append(blankNode);
|
2249 |
-
}
|
2250 |
-
slides = $wrapperEl.children(("." + (params.slideClass)));
|
2251 |
-
}
|
2252 |
-
}
|
2253 |
-
|
2254 |
-
if (params.slidesPerView === 'auto' && !params.loopedSlides) { params.loopedSlides = slides.length; }
|
2255 |
-
|
2256 |
-
swiper.loopedSlides = parseInt(params.loopedSlides || params.slidesPerView, 10);
|
2257 |
-
swiper.loopedSlides += params.loopAdditionalSlides;
|
2258 |
-
if (swiper.loopedSlides > slides.length) {
|
2259 |
-
swiper.loopedSlides = slides.length;
|
2260 |
-
}
|
2261 |
-
|
2262 |
-
var prependSlides = [];
|
2263 |
-
var appendSlides = [];
|
2264 |
-
slides.each(function (index, el) {
|
2265 |
-
var slide = $(el);
|
2266 |
-
if (index < swiper.loopedSlides) { appendSlides.push(el); }
|
2267 |
-
if (index < slides.length && index >= slides.length - swiper.loopedSlides) { prependSlides.push(el); }
|
2268 |
-
slide.attr('data-swiper-slide-index', index);
|
2269 |
-
});
|
2270 |
-
for (var i$1 = 0; i$1 < appendSlides.length; i$1 += 1) {
|
2271 |
-
$wrapperEl.append($(appendSlides[i$1].cloneNode(true)).addClass(params.slideDuplicateClass));
|
2272 |
-
}
|
2273 |
-
for (var i$2 = prependSlides.length - 1; i$2 >= 0; i$2 -= 1) {
|
2274 |
-
$wrapperEl.prepend($(prependSlides[i$2].cloneNode(true)).addClass(params.slideDuplicateClass));
|
2275 |
-
}
|
2276 |
-
}
|
2277 |
-
|
2278 |
-
function loopFix () {
|
2279 |
-
var swiper = this;
|
2280 |
-
var params = swiper.params;
|
2281 |
-
var activeIndex = swiper.activeIndex;
|
2282 |
-
var slides = swiper.slides;
|
2283 |
-
var loopedSlides = swiper.loopedSlides;
|
2284 |
-
var allowSlidePrev = swiper.allowSlidePrev;
|
2285 |
-
var allowSlideNext = swiper.allowSlideNext;
|
2286 |
-
var snapGrid = swiper.snapGrid;
|
2287 |
-
var rtl = swiper.rtlTranslate;
|
2288 |
-
var newIndex;
|
2289 |
-
swiper.allowSlidePrev = true;
|
2290 |
-
swiper.allowSlideNext = true;
|
2291 |
-
|
2292 |
-
var snapTranslate = -snapGrid[activeIndex];
|
2293 |
-
var diff = snapTranslate - swiper.getTranslate();
|
2294 |
-
|
2295 |
-
|
2296 |
-
// Fix For Negative Oversliding
|
2297 |
-
if (activeIndex < loopedSlides) {
|
2298 |
-
newIndex = (slides.length - (loopedSlides * 3)) + activeIndex;
|
2299 |
-
newIndex += loopedSlides;
|
2300 |
-
var slideChanged = swiper.slideTo(newIndex, 0, false, true);
|
2301 |
-
if (slideChanged && diff !== 0) {
|
2302 |
-
swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);
|
2303 |
-
}
|
2304 |
-
} else if ((params.slidesPerView === 'auto' && activeIndex >= loopedSlides * 2) || (activeIndex >= slides.length - loopedSlides)) {
|
2305 |
-
// Fix For Positive Oversliding
|
2306 |
-
newIndex = -slides.length + activeIndex + loopedSlides;
|
2307 |
-
newIndex += loopedSlides;
|
2308 |
-
var slideChanged$1 = swiper.slideTo(newIndex, 0, false, true);
|
2309 |
-
if (slideChanged$1 && diff !== 0) {
|
2310 |
-
swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);
|
2311 |
-
}
|
2312 |
-
}
|
2313 |
-
swiper.allowSlidePrev = allowSlidePrev;
|
2314 |
-
swiper.allowSlideNext = allowSlideNext;
|
2315 |
-
}
|
2316 |
-
|
2317 |
-
function loopDestroy () {
|
2318 |
-
var swiper = this;
|
2319 |
-
var $wrapperEl = swiper.$wrapperEl;
|
2320 |
-
var params = swiper.params;
|
2321 |
-
var slides = swiper.slides;
|
2322 |
-
$wrapperEl.children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + ",." + (params.slideClass) + "." + (params.slideBlankClass))).remove();
|
2323 |
-
slides.removeAttr('data-swiper-slide-index');
|
2324 |
-
}
|
2325 |
-
|
2326 |
-
var loop = {
|
2327 |
-
loopCreate: loopCreate,
|
2328 |
-
loopFix: loopFix,
|
2329 |
-
loopDestroy: loopDestroy,
|
2330 |
-
};
|
2331 |
-
|
2332 |
-
function setGrabCursor (moving) {
|
2333 |
-
var swiper = this;
|
2334 |
-
if (Support.touch || !swiper.params.simulateTouch || (swiper.params.watchOverflow && swiper.isLocked)) { return; }
|
2335 |
-
var el = swiper.el;
|
2336 |
-
el.style.cursor = 'move';
|
2337 |
-
el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';
|
2338 |
-
el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab';
|
2339 |
-
el.style.cursor = moving ? 'grabbing' : 'grab';
|
2340 |
-
}
|
2341 |
-
|
2342 |
-
function unsetGrabCursor () {
|
2343 |
-
var swiper = this;
|
2344 |
-
if (Support.touch || (swiper.params.watchOverflow && swiper.isLocked)) { return; }
|
2345 |
-
swiper.el.style.cursor = '';
|
2346 |
-
}
|
2347 |
-
|
2348 |
-
var grabCursor = {
|
2349 |
-
setGrabCursor: setGrabCursor,
|
2350 |
-
unsetGrabCursor: unsetGrabCursor,
|
2351 |
-
};
|
2352 |
-
|
2353 |
-
function appendSlide (slides) {
|
2354 |
-
var swiper = this;
|
2355 |
-
var $wrapperEl = swiper.$wrapperEl;
|
2356 |
-
var params = swiper.params;
|
2357 |
-
if (params.loop) {
|
2358 |
-
swiper.loopDestroy();
|
2359 |
-
}
|
2360 |
-
if (typeof slides === 'object' && 'length' in slides) {
|
2361 |
-
for (var i = 0; i < slides.length; i += 1) {
|
2362 |
-
if (slides[i]) { $wrapperEl.append(slides[i]); }
|
2363 |
-
}
|
2364 |
-
} else {
|
2365 |
-
$wrapperEl.append(slides);
|
2366 |
-
}
|
2367 |
-
if (params.loop) {
|
2368 |
-
swiper.loopCreate();
|
2369 |
-
}
|
2370 |
-
if (!(params.observer && Support.observer)) {
|
2371 |
-
swiper.update();
|
2372 |
-
}
|
2373 |
-
}
|
2374 |
-
|
2375 |
-
function prependSlide (slides) {
|
2376 |
-
var swiper = this;
|
2377 |
-
var params = swiper.params;
|
2378 |
-
var $wrapperEl = swiper.$wrapperEl;
|
2379 |
-
var activeIndex = swiper.activeIndex;
|
2380 |
-
|
2381 |
-
if (params.loop) {
|
2382 |
-
swiper.loopDestroy();
|
2383 |
-
}
|
2384 |
-
var newActiveIndex = activeIndex + 1;
|
2385 |
-
if (typeof slides === 'object' && 'length' in slides) {
|
2386 |
-
for (var i = 0; i < slides.length; i += 1) {
|
2387 |
-
if (slides[i]) { $wrapperEl.prepend(slides[i]); }
|
2388 |
-
}
|
2389 |
-
newActiveIndex = activeIndex + slides.length;
|
2390 |
-
} else {
|
2391 |
-
$wrapperEl.prepend(slides);
|
2392 |
-
}
|
2393 |
-
if (params.loop) {
|
2394 |
-
swiper.loopCreate();
|
2395 |
-
}
|
2396 |
-
if (!(params.observer && Support.observer)) {
|
2397 |
-
swiper.update();
|
2398 |
-
}
|
2399 |
-
swiper.slideTo(newActiveIndex, 0, false);
|
2400 |
-
}
|
2401 |
-
|
2402 |
-
function addSlide (index, slides) {
|
2403 |
-
var swiper = this;
|
2404 |
-
var $wrapperEl = swiper.$wrapperEl;
|
2405 |
-
var params = swiper.params;
|
2406 |
-
var activeIndex = swiper.activeIndex;
|
2407 |
-
var activeIndexBuffer = activeIndex;
|
2408 |
-
if (params.loop) {
|
2409 |
-
activeIndexBuffer -= swiper.loopedSlides;
|
2410 |
-
swiper.loopDestroy();
|
2411 |
-
swiper.slides = $wrapperEl.children(("." + (params.slideClass)));
|
2412 |
-
}
|
2413 |
-
var baseLength = swiper.slides.length;
|
2414 |
-
if (index <= 0) {
|
2415 |
-
swiper.prependSlide(slides);
|
2416 |
-
return;
|
2417 |
-
}
|
2418 |
-
if (index >= baseLength) {
|
2419 |
-
swiper.appendSlide(slides);
|
2420 |
-
return;
|
2421 |
-
}
|
2422 |
-
var newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer;
|
2423 |
-
|
2424 |
-
var slidesBuffer = [];
|
2425 |
-
for (var i = baseLength - 1; i >= index; i -= 1) {
|
2426 |
-
var currentSlide = swiper.slides.eq(i);
|
2427 |
-
currentSlide.remove();
|
2428 |
-
slidesBuffer.unshift(currentSlide);
|
2429 |
-
}
|
2430 |
-
|
2431 |
-
if (typeof slides === 'object' && 'length' in slides) {
|
2432 |
-
for (var i$1 = 0; i$1 < slides.length; i$1 += 1) {
|
2433 |
-
if (slides[i$1]) { $wrapperEl.append(slides[i$1]); }
|
2434 |
-
}
|
2435 |
-
newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer;
|
2436 |
-
} else {
|
2437 |
-
$wrapperEl.append(slides);
|
2438 |
-
}
|
2439 |
-
|
2440 |
-
for (var i$2 = 0; i$2 < slidesBuffer.length; i$2 += 1) {
|
2441 |
-
$wrapperEl.append(slidesBuffer[i$2]);
|
2442 |
-
}
|
2443 |
-
|
2444 |
-
if (params.loop) {
|
2445 |
-
swiper.loopCreate();
|
2446 |
-
}
|
2447 |
-
if (!(params.observer && Support.observer)) {
|
2448 |
-
swiper.update();
|
2449 |
-
}
|
2450 |
-
if (params.loop) {
|
2451 |
-
swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
|
2452 |
-
} else {
|
2453 |
-
swiper.slideTo(newActiveIndex, 0, false);
|
2454 |
-
}
|
2455 |
-
}
|
2456 |
-
|
2457 |
-
function removeSlide (slidesIndexes) {
|
2458 |
-
var swiper = this;
|
2459 |
-
var params = swiper.params;
|
2460 |
-
var $wrapperEl = swiper.$wrapperEl;
|
2461 |
-
var activeIndex = swiper.activeIndex;
|
2462 |
-
|
2463 |
-
var activeIndexBuffer = activeIndex;
|
2464 |
-
if (params.loop) {
|
2465 |
-
activeIndexBuffer -= swiper.loopedSlides;
|
2466 |
-
swiper.loopDestroy();
|
2467 |
-
swiper.slides = $wrapperEl.children(("." + (params.slideClass)));
|
2468 |
-
}
|
2469 |
-
var newActiveIndex = activeIndexBuffer;
|
2470 |
-
var indexToRemove;
|
2471 |
-
|
2472 |
-
if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) {
|
2473 |
-
for (var i = 0; i < slidesIndexes.length; i += 1) {
|
2474 |
-
indexToRemove = slidesIndexes[i];
|
2475 |
-
if (swiper.slides[indexToRemove]) { swiper.slides.eq(indexToRemove).remove(); }
|
2476 |
-
if (indexToRemove < newActiveIndex) { newActiveIndex -= 1; }
|
2477 |
-
}
|
2478 |
-
newActiveIndex = Math.max(newActiveIndex, 0);
|
2479 |
-
} else {
|
2480 |
-
indexToRemove = slidesIndexes;
|
2481 |
-
if (swiper.slides[indexToRemove]) { swiper.slides.eq(indexToRemove).remove(); }
|
2482 |
-
if (indexToRemove < newActiveIndex) { newActiveIndex -= 1; }
|
2483 |
-
newActiveIndex = Math.max(newActiveIndex, 0);
|
2484 |
-
}
|
2485 |
-
|
2486 |
-
if (params.loop) {
|
2487 |
-
swiper.loopCreate();
|
2488 |
-
}
|
2489 |
-
|
2490 |
-
if (!(params.observer && Support.observer)) {
|
2491 |
-
swiper.update();
|
2492 |
-
}
|
2493 |
-
if (params.loop) {
|
2494 |
-
swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
|
2495 |
-
} else {
|
2496 |
-
swiper.slideTo(newActiveIndex, 0, false);
|
2497 |
-
}
|
2498 |
-
}
|
2499 |
-
|
2500 |
-
function removeAllSlides () {
|
2501 |
-
var swiper = this;
|
2502 |
-
|
2503 |
-
var slidesIndexes = [];
|
2504 |
-
for (var i = 0; i < swiper.slides.length; i += 1) {
|
2505 |
-
slidesIndexes.push(i);
|
2506 |
-
}
|
2507 |
-
swiper.removeSlide(slidesIndexes);
|
2508 |
-
}
|
2509 |
-
|
2510 |
-
var manipulation = {
|
2511 |
-
appendSlide: appendSlide,
|
2512 |
-
prependSlide: prependSlide,
|
2513 |
-
addSlide: addSlide,
|
2514 |
-
removeSlide: removeSlide,
|
2515 |
-
removeAllSlides: removeAllSlides,
|
2516 |
-
};
|
2517 |
-
|
2518 |
-
var Device = (function Device() {
|
2519 |
-
var ua = win.navigator.userAgent;
|
2520 |
-
|
2521 |
-
var device = {
|
2522 |
-
ios: false,
|
2523 |
-
android: false,
|
2524 |
-
androidChrome: false,
|
2525 |
-
desktop: false,
|
2526 |
-
windows: false,
|
2527 |
-
iphone: false,
|
2528 |
-
ipod: false,
|
2529 |
-
ipad: false,
|
2530 |
-
cordova: win.cordova || win.phonegap,
|
2531 |
-
phonegap: win.cordova || win.phonegap,
|
2532 |
-
};
|
2533 |
-
|
2534 |
-
var windows = ua.match(/(Windows Phone);?[\s\/]+([\d.]+)?/); // eslint-disable-line
|
2535 |
-
var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line
|
2536 |
-
var ipad = ua.match(/(iPad).*OS\s([\d_]+)/);
|
2537 |
-
var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/);
|
2538 |
-
var iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/);
|
2539 |
-
|
2540 |
-
|
2541 |
-
// Windows
|
2542 |
-
if (windows) {
|
2543 |
-
device.os = 'windows';
|
2544 |
-
device.osVersion = windows[2];
|
2545 |
-
device.windows = true;
|
2546 |
-
}
|
2547 |
-
// Android
|
2548 |
-
if (android && !windows) {
|
2549 |
-
device.os = 'android';
|
2550 |
-
device.osVersion = android[2];
|
2551 |
-
device.android = true;
|
2552 |
-
device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0;
|
2553 |
-
}
|
2554 |
-
if (ipad || iphone || ipod) {
|
2555 |
-
device.os = 'ios';
|
2556 |
-
device.ios = true;
|
2557 |
-
}
|
2558 |
-
// iOS
|
2559 |
-
if (iphone && !ipod) {
|
2560 |
-
device.osVersion = iphone[2].replace(/_/g, '.');
|
2561 |
-
device.iphone = true;
|
2562 |
-
}
|
2563 |
-
if (ipad) {
|
2564 |
-
device.osVersion = ipad[2].replace(/_/g, '.');
|
2565 |
-
device.ipad = true;
|
2566 |
-
}
|
2567 |
-
if (ipod) {
|
2568 |
-
device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null;
|
2569 |
-
device.iphone = true;
|
2570 |
-
}
|
2571 |
-
// iOS 8+ changed UA
|
2572 |
-
if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) {
|
2573 |
-
if (device.osVersion.split('.')[0] === '10') {
|
2574 |
-
device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0];
|
2575 |
-
}
|
2576 |
-
}
|
2577 |
-
|
2578 |
-
// Desktop
|
2579 |
-
device.desktop = !(device.os || device.android || device.webView);
|
2580 |
-
|
2581 |
-
// Webview
|
2582 |
-
device.webView = (iphone || ipad || ipod) && ua.match(/.*AppleWebKit(?!.*Safari)/i);
|
2583 |
-
|
2584 |
-
// Minimal UI
|
2585 |
-
if (device.os && device.os === 'ios') {
|
2586 |
-
var osVersionArr = device.osVersion.split('.');
|
2587 |
-
var metaViewport = doc.querySelector('meta[name="viewport"]');
|
2588 |
-
device.minimalUi = !device.webView
|
2589 |
-
&& (ipod || iphone)
|
2590 |
-
&& (osVersionArr[0] * 1 === 7 ? osVersionArr[1] * 1 >= 1 : osVersionArr[0] * 1 > 7)
|
2591 |
-
&& metaViewport && metaViewport.getAttribute('content').indexOf('minimal-ui') >= 0;
|
2592 |
-
}
|
2593 |
-
|
2594 |
-
// Pixel Ratio
|
2595 |
-
device.pixelRatio = win.devicePixelRatio || 1;
|
2596 |
-
|
2597 |
-
// Export object
|
2598 |
-
return device;
|
2599 |
-
}());
|
2600 |
-
|
2601 |
-
function onTouchStart (event) {
|
2602 |
-
var swiper = this;
|
2603 |
-
var data = swiper.touchEventsData;
|
2604 |
-
var params = swiper.params;
|
2605 |
-
var touches = swiper.touches;
|
2606 |
-
if (swiper.animating && params.preventInteractionOnTransition) {
|
2607 |
-
return;
|
2608 |
-
}
|
2609 |
-
var e = event;
|
2610 |
-
if (e.originalEvent) { e = e.originalEvent; }
|
2611 |
-
data.isTouchEvent = e.type === 'touchstart';
|
2612 |
-
if (!data.isTouchEvent && 'which' in e && e.which === 3) { return; }
|
2613 |
-
if (!data.isTouchEvent && 'button' in e && e.button > 0) { return; }
|
2614 |
-
if (data.isTouched && data.isMoved) { return; }
|
2615 |
-
if (params.noSwiping && $(e.target).closest(params.noSwipingSelector ? params.noSwipingSelector : ("." + (params.noSwipingClass)))[0]) {
|
2616 |
-
swiper.allowClick = true;
|
2617 |
-
return;
|
2618 |
-
}
|
2619 |
-
if (params.swipeHandler) {
|
2620 |
-
if (!$(e).closest(params.swipeHandler)[0]) { return; }
|
2621 |
-
}
|
2622 |
-
|
2623 |
-
touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
|
2624 |
-
touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
|
2625 |
-
var startX = touches.currentX;
|
2626 |
-
var startY = touches.currentY;
|
2627 |
-
|
2628 |
-
// Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore
|
2629 |
-
|
2630 |
-
var edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection;
|
2631 |
-
var edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold;
|
2632 |
-
if (
|
2633 |
-
edgeSwipeDetection
|
2634 |
-
&& ((startX <= edgeSwipeThreshold)
|
2635 |
-
|| (startX >= win.screen.width - edgeSwipeThreshold))
|
2636 |
-
) {
|
2637 |
-
return;
|
2638 |
-
}
|
2639 |
-
|
2640 |
-
Utils.extend(data, {
|
2641 |
-
isTouched: true,
|
2642 |
-
isMoved: false,
|
2643 |
-
allowTouchCallbacks: true,
|
2644 |
-
isScrolling: undefined,
|
2645 |
-
startMoving: undefined,
|
2646 |
-
});
|
2647 |
-
|
2648 |
-
touches.startX = startX;
|
2649 |
-
touches.startY = startY;
|
2650 |
-
data.touchStartTime = Utils.now();
|
2651 |
-
swiper.allowClick = true;
|
2652 |
-
swiper.updateSize();
|
2653 |
-
swiper.swipeDirection = undefined;
|
2654 |
-
if (params.threshold > 0) { data.allowThresholdMove = false; }
|
2655 |
-
if (e.type !== 'touchstart') {
|
2656 |
-
var preventDefault = true;
|
2657 |
-
if ($(e.target).is(data.formElements)) { preventDefault = false; }
|
2658 |
-
if (
|
2659 |
-
doc.activeElement
|
2660 |
-
&& $(doc.activeElement).is(data.formElements)
|
2661 |
-
&& doc.activeElement !== e.target
|
2662 |
-
) {
|
2663 |
-
doc.activeElement.blur();
|
2664 |
-
}
|
2665 |
-
|
2666 |
-
var shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;
|
2667 |
-
if (params.touchStartForcePreventDefault || shouldPreventDefault) {
|
2668 |
-
e.preventDefault();
|
2669 |
-
}
|
2670 |
-
}
|
2671 |
-
swiper.emit('touchStart', e);
|
2672 |
-
}
|
2673 |
-
|
2674 |
-
function onTouchMove (event) {
|
2675 |
-
var swiper = this;
|
2676 |
-
var data = swiper.touchEventsData;
|
2677 |
-
var params = swiper.params;
|
2678 |
-
var touches = swiper.touches;
|
2679 |
-
var rtl = swiper.rtlTranslate;
|
2680 |
-
var e = event;
|
2681 |
-
if (e.originalEvent) { e = e.originalEvent; }
|
2682 |
-
if (!data.isTouched) {
|
2683 |
-
if (data.startMoving && data.isScrolling) {
|
2684 |
-
swiper.emit('touchMoveOpposite', e);
|
2685 |
-
}
|
2686 |
-
return;
|
2687 |
-
}
|
2688 |
-
if (data.isTouchEvent && e.type === 'mousemove') { return; }
|
2689 |
-
var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
|
2690 |
-
var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
|
2691 |
-
if (e.preventedByNestedSwiper) {
|
2692 |
-
touches.startX = pageX;
|
2693 |
-
touches.startY = pageY;
|
2694 |
-
return;
|
2695 |
-
}
|
2696 |
-
if (!swiper.allowTouchMove) {
|
2697 |
-
// isMoved = true;
|
2698 |
-
swiper.allowClick = false;
|
2699 |
-
if (data.isTouched) {
|
2700 |
-
Utils.extend(touches, {
|
2701 |
-
startX: pageX,
|
2702 |
-
startY: pageY,
|
2703 |
-
currentX: pageX,
|
2704 |
-
currentY: pageY,
|
2705 |
-
});
|
2706 |
-
data.touchStartTime = Utils.now();
|
2707 |
-
}
|
2708 |
-
return;
|
2709 |
-
}
|
2710 |
-
if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) {
|
2711 |
-
if (swiper.isVertical()) {
|
2712 |
-
// Vertical
|
2713 |
-
if (
|
2714 |
-
(pageY < touches.startY && swiper.translate <= swiper.maxTranslate())
|
2715 |
-
|| (pageY > touches.startY && swiper.translate >= swiper.minTranslate())
|
2716 |
-
) {
|
2717 |
-
data.isTouched = false;
|
2718 |
-
data.isMoved = false;
|
2719 |
-
return;
|
2720 |
-
}
|
2721 |
-
} else if (
|
2722 |
-
(pageX < touches.startX && swiper.translate <= swiper.maxTranslate())
|
2723 |
-
|| (pageX > touches.startX && swiper.translate >= swiper.minTranslate())
|
2724 |
-
) {
|
2725 |
-
return;
|
2726 |
-
}
|
2727 |
-
}
|
2728 |
-
if (data.isTouchEvent && doc.activeElement) {
|
2729 |
-
if (e.target === doc.activeElement && $(e.target).is(data.formElements)) {
|
2730 |
-
data.isMoved = true;
|
2731 |
-
swiper.allowClick = false;
|
2732 |
-
return;
|
2733 |
-
}
|
2734 |
-
}
|
2735 |
-
if (data.allowTouchCallbacks) {
|
2736 |
-
swiper.emit('touchMove', e);
|
2737 |
-
}
|
2738 |
-
if (e.targetTouches && e.targetTouches.length > 1) { return; }
|
2739 |
-
|
2740 |
-
touches.currentX = pageX;
|
2741 |
-
touches.currentY = pageY;
|
2742 |
-
|
2743 |
-
var diffX = touches.currentX - touches.startX;
|
2744 |
-
var diffY = touches.currentY - touches.startY;
|
2745 |
-
if (swiper.params.threshold && Math.sqrt((Math.pow( diffX, 2 )) + (Math.pow( diffY, 2 ))) < swiper.params.threshold) { return; }
|
2746 |
-
|
2747 |
-
if (typeof data.isScrolling === 'undefined') {
|
2748 |
-
var touchAngle;
|
2749 |
-
if ((swiper.isHorizontal() && touches.currentY === touches.startY) || (swiper.isVertical() && touches.currentX === touches.startX)) {
|
2750 |
-
data.isScrolling = false;
|
2751 |
-
} else {
|
2752 |
-
// eslint-disable-next-line
|
2753 |
-
if ((diffX * diffX) + (diffY * diffY) >= 25) {
|
2754 |
-
touchAngle = (Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180) / Math.PI;
|
2755 |
-
data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : (90 - touchAngle > params.touchAngle);
|
2756 |
-
}
|
2757 |
-
}
|
2758 |
-
}
|
2759 |
-
if (data.isScrolling) {
|
2760 |
-
swiper.emit('touchMoveOpposite', e);
|
2761 |
-
}
|
2762 |
-
if (typeof data.startMoving === 'undefined') {
|
2763 |
-
if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {
|
2764 |
-
data.startMoving = true;
|
2765 |
-
}
|
2766 |
-
}
|
2767 |
-
if (data.isScrolling) {
|
2768 |
-
data.isTouched = false;
|
2769 |
-
return;
|
2770 |
-
}
|
2771 |
-
if (!data.startMoving) {
|
2772 |
-
return;
|
2773 |
-
}
|
2774 |
-
swiper.allowClick = false;
|
2775 |
-
e.preventDefault();
|
2776 |
-
if (params.touchMoveStopPropagation && !params.nested) {
|
2777 |
-
e.stopPropagation();
|
2778 |
-
}
|
2779 |
-
|
2780 |
-
if (!data.isMoved) {
|
2781 |
-
if (params.loop) {
|
2782 |
-
swiper.loopFix();
|
2783 |
-
}
|
2784 |
-
data.startTranslate = swiper.getTranslate();
|
2785 |
-
swiper.setTransition(0);
|
2786 |
-
if (swiper.animating) {
|
2787 |
-
swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend');
|
2788 |
-
}
|
2789 |
-
data.allowMomentumBounce = false;
|
2790 |
-
// Grab Cursor
|
2791 |
-
if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
|
2792 |
-
swiper.setGrabCursor(true);
|
2793 |
-
}
|
2794 |
-
swiper.emit('sliderFirstMove', e);
|
2795 |
-
}
|
2796 |
-
swiper.emit('sliderMove', e);
|
2797 |
-
data.isMoved = true;
|
2798 |
-
|
2799 |
-
var diff = swiper.isHorizontal() ? diffX : diffY;
|
2800 |
-
touches.diff = diff;
|
2801 |
-
|
2802 |
-
diff *= params.touchRatio;
|
2803 |
-
if (rtl) { diff = -diff; }
|
2804 |
-
|
2805 |
-
swiper.swipeDirection = diff > 0 ? 'prev' : 'next';
|
2806 |
-
data.currentTranslate = diff + data.startTranslate;
|
2807 |
-
|
2808 |
-
var disableParentSwiper = true;
|
2809 |
-
var resistanceRatio = params.resistanceRatio;
|
2810 |
-
if (params.touchReleaseOnEdges) {
|
2811 |
-
resistanceRatio = 0;
|
2812 |
-
}
|
2813 |
-
if ((diff > 0 && data.currentTranslate > swiper.minTranslate())) {
|
2814 |
-
disableParentSwiper = false;
|
2815 |
-
if (params.resistance) { data.currentTranslate = (swiper.minTranslate() - 1) + (Math.pow( (-swiper.minTranslate() + data.startTranslate + diff), resistanceRatio )); }
|
2816 |
-
} else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) {
|
2817 |
-
disableParentSwiper = false;
|
2818 |
-
if (params.resistance) { data.currentTranslate = (swiper.maxTranslate() + 1) - (Math.pow( (swiper.maxTranslate() - data.startTranslate - diff), resistanceRatio )); }
|
2819 |
-
}
|
2820 |
-
|
2821 |
-
if (disableParentSwiper) {
|
2822 |
-
e.preventedByNestedSwiper = true;
|
2823 |
-
}
|
2824 |
-
|
2825 |
-
// Directions locks
|
2826 |
-
if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {
|
2827 |
-
data.currentTranslate = data.startTranslate;
|
2828 |
-
}
|
2829 |
-
if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) {
|
2830 |
-
data.currentTranslate = data.startTranslate;
|
2831 |
-
}
|
2832 |
-
|
2833 |
-
|
2834 |
-
// Threshold
|
2835 |
-
if (params.threshold > 0) {
|
2836 |
-
if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {
|
2837 |
-
if (!data.allowThresholdMove) {
|
2838 |
-
data.allowThresholdMove = true;
|
2839 |
-
touches.startX = touches.currentX;
|
2840 |
-
touches.startY = touches.currentY;
|
2841 |
-
data.currentTranslate = data.startTranslate;
|
2842 |
-
touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;
|
2843 |
-
return;
|
2844 |
-
}
|
2845 |
-
} else {
|
2846 |
-
data.currentTranslate = data.startTranslate;
|
2847 |
-
return;
|
2848 |
-
}
|
2849 |
-
}
|
2850 |
-
|
2851 |
-
if (!params.followFinger) { return; }
|
2852 |
-
|
2853 |
-
// Update active index in free mode
|
2854 |
-
if (params.freeMode || params.watchSlidesProgress || params.watchSlidesVisibility) {
|
2855 |
-
swiper.updateActiveIndex();
|
2856 |
-
swiper.updateSlidesClasses();
|
2857 |
-
}
|
2858 |
-
if (params.freeMode) {
|
2859 |
-
// Velocity
|
2860 |
-
if (data.velocities.length === 0) {
|
2861 |
-
data.velocities.push({
|
2862 |
-
position: touches[swiper.isHorizontal() ? 'startX' : 'startY'],
|
2863 |
-
time: data.touchStartTime,
|
2864 |
-
});
|
2865 |
-
}
|
2866 |
-
data.velocities.push({
|
2867 |
-
position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'],
|
2868 |
-
time: Utils.now(),
|
2869 |
-
});
|
2870 |
-
}
|
2871 |
-
// Update progress
|
2872 |
-
swiper.updateProgress(data.currentTranslate);
|
2873 |
-
// Update translate
|
2874 |
-
swiper.setTranslate(data.currentTranslate);
|
2875 |
-
}
|
2876 |
-
|
2877 |
-
function onTouchEnd (event) {
|
2878 |
-
var swiper = this;
|
2879 |
-
var data = swiper.touchEventsData;
|
2880 |
-
|
2881 |
-
var params = swiper.params;
|
2882 |
-
var touches = swiper.touches;
|
2883 |
-
var rtl = swiper.rtlTranslate;
|
2884 |
-
var $wrapperEl = swiper.$wrapperEl;
|
2885 |
-
var slidesGrid = swiper.slidesGrid;
|
2886 |
-
var snapGrid = swiper.snapGrid;
|
2887 |
-
var e = event;
|
2888 |
-
if (e.originalEvent) { e = e.originalEvent; }
|
2889 |
-
if (data.allowTouchCallbacks) {
|
2890 |
-
swiper.emit('touchEnd', e);
|
2891 |
-
}
|
2892 |
-
data.allowTouchCallbacks = false;
|
2893 |
-
if (!data.isTouched) {
|
2894 |
-
if (data.isMoved && params.grabCursor) {
|
2895 |
-
swiper.setGrabCursor(false);
|
2896 |
-
}
|
2897 |
-
data.isMoved = false;
|
2898 |
-
data.startMoving = false;
|
2899 |
-
return;
|
2900 |
-
}
|
2901 |
-
// Return Grab Cursor
|
2902 |
-
if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
|
2903 |
-
swiper.setGrabCursor(false);
|
2904 |
-
}
|
2905 |
-
|
2906 |
-
// Time diff
|
2907 |
-
var touchEndTime = Utils.now();
|
2908 |
-
var timeDiff = touchEndTime - data.touchStartTime;
|
2909 |
-
|
2910 |
-
// Tap, doubleTap, Click
|
2911 |
-
if (swiper.allowClick) {
|
2912 |
-
swiper.updateClickedSlide(e);
|
2913 |
-
swiper.emit('tap', e);
|
2914 |
-
if (timeDiff < 300 && (touchEndTime - data.lastClickTime) > 300) {
|
2915 |
-
if (data.clickTimeout) { clearTimeout(data.clickTimeout); }
|
2916 |
-
data.clickTimeout = Utils.nextTick(function () {
|
2917 |
-
if (!swiper || swiper.destroyed) { return; }
|
2918 |
-
swiper.emit('click', e);
|
2919 |
-
}, 300);
|
2920 |
-
}
|
2921 |
-
if (timeDiff < 300 && (touchEndTime - data.lastClickTime) < 300) {
|
2922 |
-
if (data.clickTimeout) { clearTimeout(data.clickTimeout); }
|
2923 |
-
swiper.emit('doubleTap', e);
|
2924 |
-
}
|
2925 |
-
}
|
2926 |
-
|
2927 |
-
data.lastClickTime = Utils.now();
|
2928 |
-
Utils.nextTick(function () {
|
2929 |
-
if (!swiper.destroyed) { swiper.allowClick = true; }
|
2930 |
-
});
|
2931 |
-
|
2932 |
-
if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) {
|
2933 |
-
data.isTouched = false;
|
2934 |
-
data.isMoved = false;
|
2935 |
-
data.startMoving = false;
|
2936 |
-
return;
|
2937 |
-
}
|
2938 |
-
data.isTouched = false;
|
2939 |
-
data.isMoved = false;
|
2940 |
-
data.startMoving = false;
|
2941 |
-
|
2942 |
-
var currentPos;
|
2943 |
-
if (params.followFinger) {
|
2944 |
-
currentPos = rtl ? swiper.translate : -swiper.translate;
|
2945 |
-
} else {
|
2946 |
-
currentPos = -data.currentTranslate;
|
2947 |
-
}
|
2948 |
-
|
2949 |
-
if (params.freeMode) {
|
2950 |
-
if (currentPos < -swiper.minTranslate()) {
|
2951 |
-
swiper.slideTo(swiper.activeIndex);
|
2952 |
-
return;
|
2953 |
-
}
|
2954 |
-
if (currentPos > -swiper.maxTranslate()) {
|
2955 |
-
if (swiper.slides.length < snapGrid.length) {
|
2956 |
-
swiper.slideTo(snapGrid.length - 1);
|
2957 |
-
} else {
|
2958 |
-
swiper.slideTo(swiper.slides.length - 1);
|
2959 |
-
}
|
2960 |
-
return;
|
2961 |
-
}
|
2962 |
-
|
2963 |
-
if (params.freeModeMomentum) {
|
2964 |
-
if (data.velocities.length > 1) {
|
2965 |
-
var lastMoveEvent = data.velocities.pop();
|
2966 |
-
var velocityEvent = data.velocities.pop();
|
2967 |
-
|
2968 |
-
var distance = lastMoveEvent.position - velocityEvent.position;
|
2969 |
-
var time = lastMoveEvent.time - velocityEvent.time;
|
2970 |
-
swiper.velocity = distance / time;
|
2971 |
-
swiper.velocity /= 2;
|
2972 |
-
if (Math.abs(swiper.velocity) < params.freeModeMinimumVelocity) {
|
2973 |
-
swiper.velocity = 0;
|
2974 |
-
}
|
2975 |
-
// this implies that the user stopped moving a finger then released.
|
2976 |
-
// There would be no events with distance zero, so the last event is stale.
|
2977 |
-
if (time > 150 || (Utils.now() - lastMoveEvent.time) > 300) {
|
2978 |
-
swiper.velocity = 0;
|
2979 |
-
}
|
2980 |
-
} else {
|
2981 |
-
swiper.velocity = 0;
|
2982 |
-
}
|
2983 |
-
swiper.velocity *= params.freeModeMomentumVelocityRatio;
|
2984 |
-
|
2985 |
-
data.velocities.length = 0;
|
2986 |
-
var momentumDuration = 1000 * params.freeModeMomentumRatio;
|
2987 |
-
var momentumDistance = swiper.velocity * momentumDuration;
|
2988 |
-
|
2989 |
-
var newPosition = swiper.translate + momentumDistance;
|
2990 |
-
if (rtl) { newPosition = -newPosition; }
|
2991 |
-
|
2992 |
-
var doBounce = false;
|
2993 |
-
var afterBouncePosition;
|
2994 |
-
var bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeModeMomentumBounceRatio;
|
2995 |
-
var needsLoopFix;
|
2996 |
-
if (newPosition < swiper.maxTranslate()) {
|
2997 |
-
if (params.freeModeMomentumBounce) {
|
2998 |
-
if (newPosition + swiper.maxTranslate() < -bounceAmount) {
|
2999 |
-
newPosition = swiper.maxTranslate() - bounceAmount;
|
3000 |
-
}
|
3001 |
-
afterBouncePosition = swiper.maxTranslate();
|
3002 |
-
doBounce = true;
|
3003 |
-
data.allowMomentumBounce = true;
|
3004 |
-
} else {
|
3005 |
-
newPosition = swiper.maxTranslate();
|
3006 |
-
}
|
3007 |
-
if (params.loop && params.centeredSlides) { needsLoopFix = true; }
|
3008 |
-
} else if (newPosition > swiper.minTranslate()) {
|
3009 |
-
if (params.freeModeMomentumBounce) {
|
3010 |
-
if (newPosition - swiper.minTranslate() > bounceAmount) {
|
3011 |
-
newPosition = swiper.minTranslate() + bounceAmount;
|
3012 |
-
}
|
3013 |
-
afterBouncePosition = swiper.minTranslate();
|
3014 |
-
doBounce = true;
|
3015 |
-
data.allowMomentumBounce = true;
|
3016 |
-
} else {
|
3017 |
-
newPosition = swiper.minTranslate();
|
3018 |
-
}
|
3019 |
-
if (params.loop && params.centeredSlides) { needsLoopFix = true; }
|
3020 |
-
} else if (params.freeModeSticky) {
|
3021 |
-
var nextSlide;
|
3022 |
-
for (var j = 0; j < snapGrid.length; j += 1) {
|
3023 |
-
if (snapGrid[j] > -newPosition) {
|
3024 |
-
nextSlide = j;
|
3025 |
-
break;
|
3026 |
-
}
|
3027 |
-
}
|
3028 |
-
|
3029 |
-
if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') {
|
3030 |
-
newPosition = snapGrid[nextSlide];
|
3031 |
-
} else {
|
3032 |
-
newPosition = snapGrid[nextSlide - 1];
|
3033 |
-
}
|
3034 |
-
newPosition = -newPosition;
|
3035 |
-
}
|
3036 |
-
if (needsLoopFix) {
|
3037 |
-
swiper.once('transitionEnd', function () {
|
3038 |
-
swiper.loopFix();
|
3039 |
-
});
|
3040 |
-
}
|
3041 |
-
// Fix duration
|
3042 |
-
if (swiper.velocity !== 0) {
|
3043 |
-
if (rtl) {
|
3044 |
-
momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity);
|
3045 |
-
} else {
|
3046 |
-
momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity);
|
3047 |
-
}
|
3048 |
-
} else if (params.freeModeSticky) {
|
3049 |
-
swiper.slideToClosest();
|
3050 |
-
return;
|
3051 |
-
}
|
3052 |
-
|
3053 |
-
if (params.freeModeMomentumBounce && doBounce) {
|
3054 |
-
swiper.updateProgress(afterBouncePosition);
|
3055 |
-
swiper.setTransition(momentumDuration);
|
3056 |
-
swiper.setTranslate(newPosition);
|
3057 |
-
swiper.transitionStart(true, swiper.swipeDirection);
|
3058 |
-
swiper.animating = true;
|
3059 |
-
$wrapperEl.transitionEnd(function () {
|
3060 |
-
if (!swiper || swiper.destroyed || !data.allowMomentumBounce) { return; }
|
3061 |
-
swiper.emit('momentumBounce');
|
3062 |
-
|
3063 |
-
swiper.setTransition(params.speed);
|
3064 |
-
swiper.setTranslate(afterBouncePosition);
|
3065 |
-
$wrapperEl.transitionEnd(function () {
|
3066 |
-
if (!swiper || swiper.destroyed) { return; }
|
3067 |
-
swiper.transitionEnd();
|
3068 |
-
});
|
3069 |
-
});
|
3070 |
-
} else if (swiper.velocity) {
|
3071 |
-
swiper.updateProgress(newPosition);
|
3072 |
-
swiper.setTransition(momentumDuration);
|
3073 |
-
swiper.setTranslate(newPosition);
|
3074 |
-
swiper.transitionStart(true, swiper.swipeDirection);
|
3075 |
-
if (!swiper.animating) {
|
3076 |
-
swiper.animating = true;
|
3077 |
-
$wrapperEl.transitionEnd(function () {
|
3078 |
-
if (!swiper || swiper.destroyed) { return; }
|
3079 |
-
swiper.transitionEnd();
|
3080 |
-
});
|
3081 |
-
}
|
3082 |
-
} else {
|
3083 |
-
swiper.updateProgress(newPosition);
|
3084 |
-
}
|
3085 |
-
|
3086 |
-
swiper.updateActiveIndex();
|
3087 |
-
swiper.updateSlidesClasses();
|
3088 |
-
} else if (params.freeModeSticky) {
|
3089 |
-
swiper.slideToClosest();
|
3090 |
-
return;
|
3091 |
-
}
|
3092 |
-
|
3093 |
-
if (!params.freeModeMomentum || timeDiff >= params.longSwipesMs) {
|
3094 |
-
swiper.updateProgress();
|
3095 |
-
swiper.updateActiveIndex();
|
3096 |
-
swiper.updateSlidesClasses();
|
3097 |
-
}
|
3098 |
-
return;
|
3099 |
-
}
|
3100 |
-
|
3101 |
-
// Find current slide
|
3102 |
-
var stopIndex = 0;
|
3103 |
-
var groupSize = swiper.slidesSizesGrid[0];
|
3104 |
-
for (var i = 0; i < slidesGrid.length; i += params.slidesPerGroup) {
|
3105 |
-
if (typeof slidesGrid[i + params.slidesPerGroup] !== 'undefined') {
|
3106 |
-
if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + params.slidesPerGroup]) {
|
3107 |
-
stopIndex = i;
|
3108 |
-
groupSize = slidesGrid[i + params.slidesPerGroup] - slidesGrid[i];
|
3109 |
-
}
|
3110 |
-
} else if (currentPos >= slidesGrid[i]) {
|
3111 |
-
stopIndex = i;
|
3112 |
-
groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];
|
3113 |
-
}
|
3114 |
-
}
|
3115 |
-
|
3116 |
-
// Find current slide size
|
3117 |
-
var ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;
|
3118 |
-
|
3119 |
-
if (timeDiff > params.longSwipesMs) {
|
3120 |
-
// Long touches
|
3121 |
-
if (!params.longSwipes) {
|
3122 |
-
swiper.slideTo(swiper.activeIndex);
|
3123 |
-
return;
|
3124 |
-
}
|
3125 |
-
if (swiper.swipeDirection === 'next') {
|
3126 |
-
if (ratio >= params.longSwipesRatio) { swiper.slideTo(stopIndex + params.slidesPerGroup); }
|
3127 |
-
else { swiper.slideTo(stopIndex); }
|
3128 |
-
}
|
3129 |
-
if (swiper.swipeDirection === 'prev') {
|
3130 |
-
if (ratio > (1 - params.longSwipesRatio)) { swiper.slideTo(stopIndex + params.slidesPerGroup); }
|
3131 |
-
else { swiper.slideTo(stopIndex); }
|
3132 |
-
}
|
3133 |
-
} else {
|
3134 |
-
// Short swipes
|
3135 |
-
if (!params.shortSwipes) {
|
3136 |
-
swiper.slideTo(swiper.activeIndex);
|
3137 |
-
return;
|
3138 |
-
}
|
3139 |
-
if (swiper.swipeDirection === 'next') {
|
3140 |
-
swiper.slideTo(stopIndex + params.slidesPerGroup);
|
3141 |
-
}
|
3142 |
-
if (swiper.swipeDirection === 'prev') {
|
3143 |
-
swiper.slideTo(stopIndex);
|
3144 |
-
}
|
3145 |
-
}
|
3146 |
-
}
|
3147 |
-
|
3148 |
-
function onResize () {
|
3149 |
-
var swiper = this;
|
3150 |
-
|
3151 |
-
var params = swiper.params;
|
3152 |
-
var el = swiper.el;
|
3153 |
-
|
3154 |
-
if (el && el.offsetWidth === 0) { return; }
|
3155 |
-
|
3156 |
-
// Breakpoints
|
3157 |
-
if (params.breakpoints) {
|
3158 |
-
swiper.setBreakpoint();
|
3159 |
-
}
|
3160 |
-
|
3161 |
-
// Save locks
|
3162 |
-
var allowSlideNext = swiper.allowSlideNext;
|
3163 |
-
var allowSlidePrev = swiper.allowSlidePrev;
|
3164 |
-
var snapGrid = swiper.snapGrid;
|
3165 |
-
|
3166 |
-
// Disable locks on resize
|
3167 |
-
swiper.allowSlideNext = true;
|
3168 |
-
swiper.allowSlidePrev = true;
|
3169 |
-
|
3170 |
-
swiper.updateSize();
|
3171 |
-
swiper.updateSlides();
|
3172 |
-
|
3173 |
-
if (params.freeMode) {
|
3174 |
-
var newTranslate = Math.min(Math.max(swiper.translate, swiper.maxTranslate()), swiper.minTranslate());
|
3175 |
-
swiper.setTranslate(newTranslate);
|
3176 |
-
swiper.updateActiveIndex();
|
3177 |
-
swiper.updateSlidesClasses();
|
3178 |
-
|
3179 |
-
if (params.autoHeight) {
|
3180 |
-
swiper.updateAutoHeight();
|
3181 |
-
}
|
3182 |
-
} else {
|
3183 |
-
swiper.updateSlidesClasses();
|
3184 |
-
if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
|
3185 |
-
swiper.slideTo(swiper.slides.length - 1, 0, false, true);
|
3186 |
-
} else {
|
3187 |
-
swiper.slideTo(swiper.activeIndex, 0, false, true);
|
3188 |
-
}
|
3189 |
-
}
|
3190 |
-
// Return locks after resize
|
3191 |
-
swiper.allowSlidePrev = allowSlidePrev;
|
3192 |
-
swiper.allowSlideNext = allowSlideNext;
|
3193 |
-
|
3194 |
-
if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {
|
3195 |
-
swiper.checkOverflow();
|
3196 |
-
}
|
3197 |
-
}
|
3198 |
-
|
3199 |
-
function onClick (e) {
|
3200 |
-
var swiper = this;
|
3201 |
-
if (!swiper.allowClick) {
|
3202 |
-
if (swiper.params.preventClicks) { e.preventDefault(); }
|
3203 |
-
if (swiper.params.preventClicksPropagation && swiper.animating) {
|
3204 |
-
e.stopPropagation();
|
3205 |
-
e.stopImmediatePropagation();
|
3206 |
-
}
|
3207 |
-
}
|
3208 |
-
}
|
3209 |
-
|
3210 |
-
function attachEvents() {
|
3211 |
-
var swiper = this;
|
3212 |
-
var params = swiper.params;
|
3213 |
-
var touchEvents = swiper.touchEvents;
|
3214 |
-
var el = swiper.el;
|
3215 |
-
var wrapperEl = swiper.wrapperEl;
|
3216 |
-
|
3217 |
-
{
|
3218 |
-
swiper.onTouchStart = onTouchStart.bind(swiper);
|
3219 |
-
swiper.onTouchMove = onTouchMove.bind(swiper);
|
3220 |
-
swiper.onTouchEnd = onTouchEnd.bind(swiper);
|
3221 |
-
}
|
3222 |
-
|
3223 |
-
swiper.onClick = onClick.bind(swiper);
|
3224 |
-
|
3225 |
-
var target = params.touchEventsTarget === 'container' ? el : wrapperEl;
|
3226 |
-
var capture = !!params.nested;
|
3227 |
-
|
3228 |
-
// Touch Events
|
3229 |
-
{
|
3230 |
-
if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
|
3231 |
-
target.addEventListener(touchEvents.start, swiper.onTouchStart, false);
|
3232 |
-
doc.addEventListener(touchEvents.move, swiper.onTouchMove, capture);
|
3233 |
-
doc.addEventListener(touchEvents.end, swiper.onTouchEnd, false);
|
3234 |
-
} else {
|
3235 |
-
if (Support.touch) {
|
3236 |
-
var passiveListener = touchEvents.start === 'touchstart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
|
3237 |
-
target.addEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);
|
3238 |
-
target.addEventListener(touchEvents.move, swiper.onTouchMove, Support.passiveListener ? { passive: false, capture: capture } : capture);
|
3239 |
-
target.addEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);
|
3240 |
-
}
|
3241 |
-
if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
|
3242 |
-
target.addEventListener('mousedown', swiper.onTouchStart, false);
|
3243 |
-
doc.addEventListener('mousemove', swiper.onTouchMove, capture);
|
3244 |
-
doc.addEventListener('mouseup', swiper.onTouchEnd, false);
|
3245 |
-
}
|
3246 |
-
}
|
3247 |
-
// Prevent Links Clicks
|
3248 |
-
if (params.preventClicks || params.preventClicksPropagation) {
|
3249 |
-
target.addEventListener('click', swiper.onClick, true);
|
3250 |
-
}
|
3251 |
-
}
|
3252 |
-
|
3253 |
-
// Resize handler
|
3254 |
-
swiper.on((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize, true);
|
3255 |
-
}
|
3256 |
-
|
3257 |
-
function detachEvents() {
|
3258 |
-
var swiper = this;
|
3259 |
-
|
3260 |
-
var params = swiper.params;
|
3261 |
-
var touchEvents = swiper.touchEvents;
|
3262 |
-
var el = swiper.el;
|
3263 |
-
var wrapperEl = swiper.wrapperEl;
|
3264 |
-
|
3265 |
-
var target = params.touchEventsTarget === 'container' ? el : wrapperEl;
|
3266 |
-
var capture = !!params.nested;
|
3267 |
-
|
3268 |
-
// Touch Events
|
3269 |
-
{
|
3270 |
-
if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
|
3271 |
-
target.removeEventListener(touchEvents.start, swiper.onTouchStart, false);
|
3272 |
-
doc.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);
|
3273 |
-
doc.removeEventListener(touchEvents.end, swiper.onTouchEnd, false);
|
3274 |
-
} else {
|
3275 |
-
if (Support.touch) {
|
3276 |
-
var passiveListener = touchEvents.start === 'onTouchStart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
|
3277 |
-
target.removeEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);
|
3278 |
-
target.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);
|
3279 |
-
target.removeEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);
|
3280 |
-
}
|
3281 |
-
if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
|
3282 |
-
target.removeEventListener('mousedown', swiper.onTouchStart, false);
|
3283 |
-
doc.removeEventListener('mousemove', swiper.onTouchMove, capture);
|
3284 |
-
doc.removeEventListener('mouseup', swiper.onTouchEnd, false);
|
3285 |
-
}
|
3286 |
-
}
|
3287 |
-
// Prevent Links Clicks
|
3288 |
-
if (params.preventClicks || params.preventClicksPropagation) {
|
3289 |
-
target.removeEventListener('click', swiper.onClick, true);
|
3290 |
-
}
|
3291 |
-
}
|
3292 |
-
|
3293 |
-
// Resize handler
|
3294 |
-
swiper.off((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize);
|
3295 |
-
}
|
3296 |
-
|
3297 |
-
var events = {
|
3298 |
-
attachEvents: attachEvents,
|
3299 |
-
detachEvents: detachEvents,
|
3300 |
-
};
|
3301 |
-
|
3302 |
-
function setBreakpoint () {
|
3303 |
-
var swiper = this;
|
3304 |
-
var activeIndex = swiper.activeIndex;
|
3305 |
-
var initialized = swiper.initialized;
|
3306 |
-
var loopedSlides = swiper.loopedSlides; if ( loopedSlides === void 0 ) loopedSlides = 0;
|
3307 |
-
var params = swiper.params;
|
3308 |
-
var breakpoints = params.breakpoints;
|
3309 |
-
if (!breakpoints || (breakpoints && Object.keys(breakpoints).length === 0)) { return; }
|
3310 |
-
|
3311 |
-
// Set breakpoint for window width and update parameters
|
3312 |
-
var breakpoint = swiper.getBreakpoint(breakpoints);
|
3313 |
-
|
3314 |
-
if (breakpoint && swiper.currentBreakpoint !== breakpoint) {
|
3315 |
-
var breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;
|
3316 |
-
if (breakpointOnlyParams) {
|
3317 |
-
['slidesPerView', 'spaceBetween', 'slidesPerGroup'].forEach(function (param) {
|
3318 |
-
var paramValue = breakpointOnlyParams[param];
|
3319 |
-
if (typeof paramValue === 'undefined') { return; }
|
3320 |
-
if (param === 'slidesPerView' && (paramValue === 'AUTO' || paramValue === 'auto')) {
|
3321 |
-
breakpointOnlyParams[param] = 'auto';
|
3322 |
-
} else if (param === 'slidesPerView') {
|
3323 |
-
breakpointOnlyParams[param] = parseFloat(paramValue);
|
3324 |
-
} else {
|
3325 |
-
breakpointOnlyParams[param] = parseInt(paramValue, 10);
|
3326 |
-
}
|
3327 |
-
});
|
3328 |
-
}
|
3329 |
-
|
3330 |
-
var breakpointParams = breakpointOnlyParams || swiper.originalParams;
|
3331 |
-
var needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView);
|
3332 |
-
|
3333 |
-
Utils.extend(swiper.params, breakpointParams);
|
3334 |
-
|
3335 |
-
Utils.extend(swiper, {
|
3336 |
-
allowTouchMove: swiper.params.allowTouchMove,
|
3337 |
-
allowSlideNext: swiper.params.allowSlideNext,
|
3338 |
-
allowSlidePrev: swiper.params.allowSlidePrev,
|
3339 |
-
});
|
3340 |
-
|
3341 |
-
swiper.currentBreakpoint = breakpoint;
|
3342 |
-
|
3343 |
-
if (needsReLoop && initialized) {
|
3344 |
-
swiper.loopDestroy();
|
3345 |
-
swiper.loopCreate();
|
3346 |
-
swiper.updateSlides();
|
3347 |
-
swiper.slideTo((activeIndex - loopedSlides) + swiper.loopedSlides, 0, false);
|
3348 |
-
}
|
3349 |
-
swiper.emit('breakpoint', breakpointParams);
|
3350 |
-
}
|
3351 |
-
}
|
3352 |
-
|
3353 |
-
function getBreakpoint (breakpoints) {
|
3354 |
-
var swiper = this;
|
3355 |
-
// Get breakpoint for window width
|
3356 |
-
if (!breakpoints) { return undefined; }
|
3357 |
-
var breakpoint = false;
|
3358 |
-
var points = [];
|
3359 |
-
Object.keys(breakpoints).forEach(function (point) {
|
3360 |
-
points.push(point);
|
3361 |
-
});
|
3362 |
-
points.sort(function (a, b) { return parseInt(a, 10) - parseInt(b, 10); });
|
3363 |
-
for (var i = 0; i < points.length; i += 1) {
|
3364 |
-
var point = points[i];
|
3365 |
-
if (swiper.params.breakpointsInverse) {
|
3366 |
-
if (point <= win.innerWidth) {
|
3367 |
-
breakpoint = point;
|
3368 |
-
}
|
3369 |
-
} else if (point >= win.innerWidth && !breakpoint) {
|
3370 |
-
breakpoint = point;
|
3371 |
-
}
|
3372 |
-
}
|
3373 |
-
return breakpoint || 'max';
|
3374 |
-
}
|
3375 |
-
|
3376 |
-
var breakpoints = { setBreakpoint: setBreakpoint, getBreakpoint: getBreakpoint };
|
3377 |
-
|
3378 |
-
var Browser = (function Browser() {
|
3379 |
-
function isSafari() {
|
3380 |
-
var ua = win.navigator.userAgent.toLowerCase();
|
3381 |
-
return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0);
|
3382 |
-
}
|
3383 |
-
return {
|
3384 |
-
isIE: !!win.navigator.userAgent.match(/Trident/g) || !!win.navigator.userAgent.match(/MSIE/g),
|
3385 |
-
isEdge: !!win.navigator.userAgent.match(/Edge/g),
|
3386 |
-
isSafari: isSafari(),
|
3387 |
-
isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(win.navigator.userAgent),
|
3388 |
-
};
|
3389 |
-
}());
|
3390 |
-
|
3391 |
-
function addClasses () {
|
3392 |
-
var swiper = this;
|
3393 |
-
var classNames = swiper.classNames;
|
3394 |
-
var params = swiper.params;
|
3395 |
-
var rtl = swiper.rtl;
|
3396 |
-
var $el = swiper.$el;
|
3397 |
-
var suffixes = [];
|
3398 |
-
|
3399 |
-
suffixes.push(params.direction);
|
3400 |
-
|
3401 |
-
if (params.freeMode) {
|
3402 |
-
suffixes.push('free-mode');
|
3403 |
-
}
|
3404 |
-
if (!Support.flexbox) {
|
3405 |
-
suffixes.push('no-flexbox');
|
3406 |
-
}
|
3407 |
-
if (params.autoHeight) {
|
3408 |
-
suffixes.push('autoheight');
|
3409 |
-
}
|
3410 |
-
if (rtl) {
|
3411 |
-
suffixes.push('rtl');
|
3412 |
-
}
|
3413 |
-
if (params.slidesPerColumn > 1) {
|
3414 |
-
suffixes.push('multirow');
|
3415 |
-
}
|
3416 |
-
if (Device.android) {
|
3417 |
-
suffixes.push('android');
|
3418 |
-
}
|
3419 |
-
if (Device.ios) {
|
3420 |
-
suffixes.push('ios');
|
3421 |
-
}
|
3422 |
-
// WP8 Touch Events Fix
|
3423 |
-
if ((Browser.isIE || Browser.isEdge) && (Support.pointerEvents || Support.prefixedPointerEvents)) {
|
3424 |
-
suffixes.push(("wp8-" + (params.direction)));
|
3425 |
-
}
|
3426 |
-
|
3427 |
-
suffixes.forEach(function (suffix) {
|
3428 |
-
classNames.push(params.containerModifierClass + suffix);
|
3429 |
-
});
|
3430 |
-
|
3431 |
-
$el.addClass(classNames.join(' '));
|
3432 |
-
}
|
3433 |
-
|
3434 |
-
function removeClasses () {
|
3435 |
-
var swiper = this;
|
3436 |
-
var $el = swiper.$el;
|
3437 |
-
var classNames = swiper.classNames;
|
3438 |
-
|
3439 |
-
$el.removeClass(classNames.join(' '));
|
3440 |
-
}
|
3441 |
-
|
3442 |
-
var classes = { addClasses: addClasses, removeClasses: removeClasses };
|
3443 |
-
|
3444 |
-
function loadImage (imageEl, src, srcset, sizes, checkForComplete, callback) {
|
3445 |
-
var image;
|
3446 |
-
function onReady() {
|
3447 |
-
if (callback) { callback(); }
|
3448 |
-
}
|
3449 |
-
if (!imageEl.complete || !checkForComplete) {
|
3450 |
-
if (src) {
|
3451 |
-
image = new win.Image();
|
3452 |
-
image.onload = onReady;
|
3453 |
-
image.onerror = onReady;
|
3454 |
-
if (sizes) {
|
3455 |
-
image.sizes = sizes;
|
3456 |
-
}
|
3457 |
-
if (srcset) {
|
3458 |
-
image.srcset = srcset;
|
3459 |
-
}
|
3460 |
-
if (src) {
|
3461 |
-
image.src = src;
|
3462 |
-
}
|
3463 |
-
} else {
|
3464 |
-
onReady();
|
3465 |
-
}
|
3466 |
-
} else {
|
3467 |
-
// image already loaded...
|
3468 |
-
onReady();
|
3469 |
-
}
|
3470 |
-
}
|
3471 |
-
|
3472 |
-
function preloadImages () {
|
3473 |
-
var swiper = this;
|
3474 |
-
swiper.imagesToLoad = swiper.$el.find('img');
|
3475 |
-
function onReady() {
|
3476 |
-
if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) { return; }
|
3477 |
-
if (swiper.imagesLoaded !== undefined) { swiper.imagesLoaded += 1; }
|
3478 |
-
if (swiper.imagesLoaded === swiper.imagesToLoad.length) {
|
3479 |
-
if (swiper.params.updateOnImagesReady) { swiper.update(); }
|
3480 |
-
swiper.emit('imagesReady');
|
3481 |
-
}
|
3482 |
-
}
|
3483 |
-
for (var i = 0; i < swiper.imagesToLoad.length; i += 1) {
|
3484 |
-
var imageEl = swiper.imagesToLoad[i];
|
3485 |
-
swiper.loadImage(
|
3486 |
-
imageEl,
|
3487 |
-
imageEl.currentSrc || imageEl.getAttribute('src'),
|
3488 |
-
imageEl.srcset || imageEl.getAttribute('srcset'),
|
3489 |
-
imageEl.sizes || imageEl.getAttribute('sizes'),
|
3490 |
-
true,
|
3491 |
-
onReady
|
3492 |
-
);
|
3493 |
-
}
|
3494 |
-
}
|
3495 |
-
|
3496 |
-
var images = {
|
3497 |
-
loadImage: loadImage,
|
3498 |
-
preloadImages: preloadImages,
|
3499 |
-
};
|
3500 |
-
|
3501 |
-
function checkOverflow() {
|
3502 |
-
var swiper = this;
|
3503 |
-
var wasLocked = swiper.isLocked;
|
3504 |
-
|
3505 |
-
swiper.isLocked = swiper.snapGrid.length === 1;
|
3506 |
-
swiper.allowSlideNext = !swiper.isLocked;
|
3507 |
-
swiper.allowSlidePrev = !swiper.isLocked;
|
3508 |
-
|
3509 |
-
// events
|
3510 |
-
if (wasLocked !== swiper.isLocked) { swiper.emit(swiper.isLocked ? 'lock' : 'unlock'); }
|
3511 |
-
|
3512 |
-
if (wasLocked && wasLocked !== swiper.isLocked) {
|
3513 |
-
swiper.isEnd = false;
|
3514 |
-
swiper.navigation.update();
|
3515 |
-
}
|
3516 |
-
}
|
3517 |
-
|
3518 |
-
var checkOverflow$1 = { checkOverflow: checkOverflow };
|
3519 |
-
|
3520 |
-
var defaults = {
|
3521 |
-
init: true,
|
3522 |
-
direction: 'horizontal',
|
3523 |
-
touchEventsTarget: 'container',
|
3524 |
-
initialSlide: 0,
|
3525 |
-
speed: 300,
|
3526 |
-
//
|
3527 |
-
preventInteractionOnTransition: false,
|
3528 |
-
|
3529 |
-
// To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).
|
3530 |
-
edgeSwipeDetection: false,
|
3531 |
-
edgeSwipeThreshold: 20,
|
3532 |
-
|
3533 |
-
// Free mode
|
3534 |
-
freeMode: false,
|
3535 |
-
freeModeMomentum: true,
|
3536 |
-
freeModeMomentumRatio: 1,
|
3537 |
-
freeModeMomentumBounce: true,
|
3538 |
-
freeModeMomentumBounceRatio: 1,
|
3539 |
-
freeModeMomentumVelocityRatio: 1,
|
3540 |
-
freeModeSticky: false,
|
3541 |
-
freeModeMinimumVelocity: 0.02,
|
3542 |
-
|
3543 |
-
// Autoheight
|
3544 |
-
autoHeight: false,
|
3545 |
-
|
3546 |
-
// Set wrapper width
|
3547 |
-
setWrapperSize: false,
|
3548 |
-
|
3549 |
-
// Virtual Translate
|
3550 |
-
virtualTranslate: false,
|
3551 |
-
|
3552 |
-
// Effects
|
3553 |
-
effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
|
3554 |
-
|
3555 |
-
// Breakpoints
|
3556 |
-
breakpoints: undefined,
|
3557 |
-
breakpointsInverse: false,
|
3558 |
-
|
3559 |
-
// Slides grid
|
3560 |
-
spaceBetween: 0,
|
3561 |
-
slidesPerView: 1,
|
3562 |
-
slidesPerColumn: 1,
|
3563 |
-
slidesPerColumnFill: 'column',
|
3564 |
-
slidesPerGroup: 1,
|
3565 |
-
centeredSlides: false,
|
3566 |
-
slidesOffsetBefore: 0, // in px
|
3567 |
-
slidesOffsetAfter: 0, // in px
|
3568 |
-
normalizeSlideIndex: true,
|
3569 |
-
centerInsufficientSlides: false,
|
3570 |
-
|
3571 |
-
// Disable swiper and hide navigation when container not overflow
|
3572 |
-
watchOverflow: false,
|
3573 |
-
|
3574 |
-
// Round length
|
3575 |
-
roundLengths: false,
|
3576 |
-
|
3577 |
-
// Touches
|
3578 |
-
touchRatio: 1,
|
3579 |
-
touchAngle: 45,
|
3580 |
-
simulateTouch: true,
|
3581 |
-
shortSwipes: true,
|
3582 |
-
longSwipes: true,
|
3583 |
-
longSwipesRatio: 0.5,
|
3584 |
-
longSwipesMs: 300,
|
3585 |
-
followFinger: true,
|
3586 |
-
allowTouchMove: true,
|
3587 |
-
threshold: 0,
|
3588 |
-
touchMoveStopPropagation: true,
|
3589 |
-
touchStartPreventDefault: true,
|
3590 |
-
touchStartForcePreventDefault: false,
|
3591 |
-
touchReleaseOnEdges: false,
|
3592 |
-
|
3593 |
-
// Unique Navigation Elements
|
3594 |
-
uniqueNavElements: true,
|
3595 |
-
|
3596 |
-
// Resistance
|
3597 |
-
resistance: true,
|
3598 |
-
resistanceRatio: 0.85,
|
3599 |
-
|
3600 |
-
// Progress
|
3601 |
-
watchSlidesProgress: false,
|
3602 |
-
watchSlidesVisibility: false,
|
3603 |
-
|
3604 |
-
// Cursor
|
3605 |
-
grabCursor: false,
|
3606 |
-
|
3607 |
-
// Clicks
|
3608 |
-
preventClicks: true,
|
3609 |
-
preventClicksPropagation: true,
|
3610 |
-
slideToClickedSlide: false,
|
3611 |
-
|
3612 |
-
// Images
|
3613 |
-
preloadImages: true,
|
3614 |
-
updateOnImagesReady: true,
|
3615 |
-
|
3616 |
-
// loop
|
3617 |
-
loop: false,
|
3618 |
-
loopAdditionalSlides: 0,
|
3619 |
-
loopedSlides: null,
|
3620 |
-
loopFillGroupWithBlank: false,
|
3621 |
-
|
3622 |
-
// Swiping/no swiping
|
3623 |
-
allowSlidePrev: true,
|
3624 |
-
allowSlideNext: true,
|
3625 |
-
swipeHandler: null, // '.swipe-handler',
|
3626 |
-
noSwiping: true,
|
3627 |
-
noSwipingClass: 'swiper-no-swiping',
|
3628 |
-
noSwipingSelector: null,
|
3629 |
-
|
3630 |
-
// Passive Listeners
|
3631 |
-
passiveListeners: true,
|
3632 |
-
|
3633 |
-
// NS
|
3634 |
-
containerModifierClass: 'swiper-container-', // NEW
|
3635 |
-
slideClass: 'swiper-slide',
|
3636 |
-
slideBlankClass: 'swiper-slide-invisible-blank',
|
3637 |
-
slideActiveClass: 'swiper-slide-active',
|
3638 |
-
slideDuplicateActiveClass: 'swiper-slide-duplicate-active',
|
3639 |
-
slideVisibleClass: 'swiper-slide-visible',
|
3640 |
-
slideDuplicateClass: 'swiper-slide-duplicate',
|
3641 |
-
slideNextClass: 'swiper-slide-next',
|
3642 |
-
slideDuplicateNextClass: 'swiper-slide-duplicate-next',
|
3643 |
-
slidePrevClass: 'swiper-slide-prev',
|
3644 |
-
slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',
|
3645 |
-
wrapperClass: 'swiper-wrapper',
|
3646 |
-
|
3647 |
-
// Callbacks
|
3648 |
-
runCallbacksOnInit: true,
|
3649 |
-
};
|
3650 |
-
|
3651 |
-
var prototypes = {
|
3652 |
-
update: update,
|
3653 |
-
translate: translate,
|
3654 |
-
transition: transition$1,
|
3655 |
-
slide: slide,
|
3656 |
-
loop: loop,
|
3657 |
-
grabCursor: grabCursor,
|
3658 |
-
manipulation: manipulation,
|
3659 |
-
events: events,
|
3660 |
-
breakpoints: breakpoints,
|
3661 |
-
checkOverflow: checkOverflow$1,
|
3662 |
-
classes: classes,
|
3663 |
-
images: images,
|
3664 |
-
};
|
3665 |
-
|
3666 |
-
var extendedDefaults = {};
|
3667 |
-
|
3668 |
-
var Swiper = /*@__PURE__*/(function (SwiperClass$$1) {
|
3669 |
-
function Swiper() {
|
3670 |
-
var assign;
|
3671 |
-
|
3672 |
-
var args = [], len = arguments.length;
|
3673 |
-
while ( len-- ) args[ len ] = arguments[ len ];
|
3674 |
-
var el;
|
3675 |
-
var params;
|
3676 |
-
if (args.length === 1 && args[0].constructor && args[0].constructor === Object) {
|
3677 |
-
params = args[0];
|
3678 |
-
} else {
|
3679 |
-
(assign = args, el = assign[0], params = assign[1]);
|
3680 |
-
}
|
3681 |
-
if (!params) { params = {}; }
|
3682 |
-
|
3683 |
-
params = Utils.extend({}, params);
|
3684 |
-
if (el && !params.el) { params.el = el; }
|
3685 |
-
|
3686 |
-
SwiperClass$$1.call(this, params);
|
3687 |
-
|
3688 |
-
Object.keys(prototypes).forEach(function (prototypeGroup) {
|
3689 |
-
Object.keys(prototypes[prototypeGroup]).forEach(function (protoMethod) {
|
3690 |
-
if (!Swiper.prototype[protoMethod]) {
|
3691 |
-
Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];
|
3692 |
-
}
|
3693 |
-
});
|
3694 |
-
});
|
3695 |
-
|
3696 |
-
// Swiper Instance
|
3697 |
-
var swiper = this;
|
3698 |
-
if (typeof swiper.modules === 'undefined') {
|
3699 |
-
swiper.modules = {};
|
3700 |
-
}
|
3701 |
-
Object.keys(swiper.modules).forEach(function (moduleName) {
|
3702 |
-
var module = swiper.modules[moduleName];
|
3703 |
-
if (module.params) {
|
3704 |
-
var moduleParamName = Object.keys(module.params)[0];
|
3705 |
-
var moduleParams = module.params[moduleParamName];
|
3706 |
-
if (typeof moduleParams !== 'object' || moduleParams === null) { return; }
|
3707 |
-
if (!(moduleParamName in params && 'enabled' in moduleParams)) { return; }
|
3708 |
-
if (params[moduleParamName] === true) {
|
3709 |
-
params[moduleParamName] = { enabled: true };
|
3710 |
-
}
|
3711 |
-
if (
|
3712 |
-
typeof params[moduleParamName] === 'object'
|
3713 |
-
&& !('enabled' in params[moduleParamName])
|
3714 |
-
) {
|
3715 |
-
params[moduleParamName].enabled = true;
|
3716 |
-
}
|
3717 |
-
if (!params[moduleParamName]) { params[moduleParamName] = { enabled: false }; }
|
3718 |
-
}
|
3719 |
-
});
|
3720 |
-
|
3721 |
-
// Extend defaults with modules params
|
3722 |
-
var swiperParams = Utils.extend({}, defaults);
|
3723 |
-
swiper.useModulesParams(swiperParams);
|
3724 |
-
|
3725 |
-
// Extend defaults with passed params
|
3726 |
-
swiper.params = Utils.extend({}, swiperParams, extendedDefaults, params);
|
3727 |
-
swiper.originalParams = Utils.extend({}, swiper.params);
|
3728 |
-
swiper.passedParams = Utils.extend({}, params);
|
3729 |
-
|
3730 |
-
// Save Dom lib
|
3731 |
-
swiper.$ = $;
|
3732 |
-
|
3733 |
-
// Find el
|
3734 |
-
var $el = $(swiper.params.el);
|
3735 |
-
el = $el[0];
|
3736 |
-
|
3737 |
-
if (!el) {
|
3738 |
-
return undefined;
|
3739 |
-
}
|
3740 |
-
|
3741 |
-
if ($el.length > 1) {
|
3742 |
-
var swipers = [];
|
3743 |
-
$el.each(function (index, containerEl) {
|
3744 |
-
var newParams = Utils.extend({}, params, { el: containerEl });
|
3745 |
-
swipers.push(new Swiper(newParams));
|
3746 |
-
});
|
3747 |
-
return swipers;
|
3748 |
-
}
|
3749 |
-
|
3750 |
-
el.swiper = swiper;
|
3751 |
-
$el.data('swiper', swiper);
|
3752 |
-
|
3753 |
-
// Find Wrapper
|
3754 |
-
var $wrapperEl = $el.children(("." + (swiper.params.wrapperClass)));
|
3755 |
-
|
3756 |
-
// Extend Swiper
|
3757 |
-
Utils.extend(swiper, {
|
3758 |
-
$el: $el,
|
3759 |
-
el: el,
|
3760 |
-
$wrapperEl: $wrapperEl,
|
3761 |
-
wrapperEl: $wrapperEl[0],
|
3762 |
-
|
3763 |
-
// Classes
|
3764 |
-
classNames: [],
|
3765 |
-
|
3766 |
-
// Slides
|
3767 |
-
slides: $(),
|
3768 |
-
slidesGrid: [],
|
3769 |
-
snapGrid: [],
|
3770 |
-
slidesSizesGrid: [],
|
3771 |
-
|
3772 |
-
// isDirection
|
3773 |
-
isHorizontal: function isHorizontal() {
|
3774 |
-
return swiper.params.direction === 'horizontal';
|
3775 |
-
},
|
3776 |
-
isVertical: function isVertical() {
|
3777 |
-
return swiper.params.direction === 'vertical';
|
3778 |
-
},
|
3779 |
-
// RTL
|
3780 |
-
rtl: (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),
|
3781 |
-
rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),
|
3782 |
-
wrongRTL: $wrapperEl.css('display') === '-webkit-box',
|
3783 |
-
|
3784 |
-
// Indexes
|
3785 |
-
activeIndex: 0,
|
3786 |
-
realIndex: 0,
|
3787 |
-
|
3788 |
-
//
|
3789 |
-
isBeginning: true,
|
3790 |
-
isEnd: false,
|
3791 |
-
|
3792 |
-
// Props
|
3793 |
-
translate: 0,
|
3794 |
-
previousTranslate: 0,
|
3795 |
-
progress: 0,
|
3796 |
-
velocity: 0,
|
3797 |
-
animating: false,
|
3798 |
-
|
3799 |
-
// Locks
|
3800 |
-
allowSlideNext: swiper.params.allowSlideNext,
|
3801 |
-
allowSlidePrev: swiper.params.allowSlidePrev,
|
3802 |
-
|
3803 |
-
// Touch Events
|
3804 |
-
touchEvents: (function touchEvents() {
|
3805 |
-
var touch = ['touchstart', 'touchmove', 'touchend'];
|
3806 |
-
var desktop = ['mousedown', 'mousemove', 'mouseup'];
|
3807 |
-
if (Support.pointerEvents) {
|
3808 |
-
desktop = ['pointerdown', 'pointermove', 'pointerup'];
|
3809 |
-
} else if (Support.prefixedPointerEvents) {
|
3810 |
-
desktop = ['MSPointerDown', 'MSPointerMove', 'MSPointerUp'];
|
3811 |
-
}
|
3812 |
-
swiper.touchEventsTouch = {
|
3813 |
-
start: touch[0],
|
3814 |
-
move: touch[1],
|
3815 |
-
end: touch[2],
|
3816 |
-
};
|
3817 |
-
swiper.touchEventsDesktop = {
|
3818 |
-
start: desktop[0],
|
3819 |
-
move: desktop[1],
|
3820 |
-
end: desktop[2],
|
3821 |
-
};
|
3822 |
-
return Support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop;
|
3823 |
-
}()),
|
3824 |
-
touchEventsData: {
|
3825 |
-
isTouched: undefined,
|
3826 |
-
isMoved: undefined,
|
3827 |
-
allowTouchCallbacks: undefined,
|
3828 |
-
touchStartTime: undefined,
|
3829 |
-
isScrolling: undefined,
|
3830 |
-
currentTranslate: undefined,
|
3831 |
-
startTranslate: undefined,
|
3832 |
-
allowThresholdMove: undefined,
|
3833 |
-
// Form elements to match
|
3834 |
-
formElements: 'input, select, option, textarea, button, video',
|
3835 |
-
// Last click time
|
3836 |
-
lastClickTime: Utils.now(),
|
3837 |
-
clickTimeout: undefined,
|
3838 |
-
// Velocities
|
3839 |
-
velocities: [],
|
3840 |
-
allowMomentumBounce: undefined,
|
3841 |
-
isTouchEvent: undefined,
|
3842 |
-
startMoving: undefined,
|
3843 |
-
},
|
3844 |
-
|
3845 |
-
// Clicks
|
3846 |
-
allowClick: true,
|
3847 |
-
|
3848 |
-
// Touches
|
3849 |
-
allowTouchMove: swiper.params.allowTouchMove,
|
3850 |
-
|
3851 |
-
touches: {
|
3852 |
-
startX: 0,
|
3853 |
-
startY: 0,
|
3854 |
-
currentX: 0,
|
3855 |
-
currentY: 0,
|
3856 |
-
diff: 0,
|
3857 |
-
},
|
3858 |
-
|
3859 |
-
// Images
|
3860 |
-
imagesToLoad: [],
|
3861 |
-
imagesLoaded: 0,
|
3862 |
-
|
3863 |
-
});
|
3864 |
-
|
3865 |
-
// Install Modules
|
3866 |
-
swiper.useModules();
|
3867 |
-
|
3868 |
-
// Init
|
3869 |
-
if (swiper.params.init) {
|
3870 |
-
swiper.init();
|
3871 |
-
}
|
3872 |
-
|
3873 |
-
// Return app instance
|
3874 |
-
return swiper;
|
3875 |
-
}
|
3876 |
-
|
3877 |
-
if ( SwiperClass$$1 ) Swiper.__proto__ = SwiperClass$$1;
|
3878 |
-
Swiper.prototype = Object.create( SwiperClass$$1 && SwiperClass$$1.prototype );
|
3879 |
-
Swiper.prototype.constructor = Swiper;
|
3880 |
-
|
3881 |
-
var staticAccessors = { extendedDefaults: { configurable: true },defaults: { configurable: true },Class: { configurable: true },$: { configurable: true } };
|
3882 |
-
|
3883 |
-
Swiper.prototype.slidesPerViewDynamic = function slidesPerViewDynamic () {
|
3884 |
-
var swiper = this;
|
3885 |
-
var params = swiper.params;
|
3886 |
-
var slides = swiper.slides;
|
3887 |
-
var slidesGrid = swiper.slidesGrid;
|
3888 |
-
var swiperSize = swiper.size;
|
3889 |
-
var activeIndex = swiper.activeIndex;
|
3890 |
-
var spv = 1;
|
3891 |
-
if (params.centeredSlides) {
|
3892 |
-
var slideSize = slides[activeIndex].swiperSlideSize;
|
3893 |
-
var breakLoop;
|
3894 |
-
for (var i = activeIndex + 1; i < slides.length; i += 1) {
|
3895 |
-
if (slides[i] && !breakLoop) {
|
3896 |
-
slideSize += slides[i].swiperSlideSize;
|
3897 |
-
spv += 1;
|
3898 |
-
if (slideSize > swiperSize) { breakLoop = true; }
|
3899 |
-
}
|
3900 |
-
}
|
3901 |
-
for (var i$1 = activeIndex - 1; i$1 >= 0; i$1 -= 1) {
|
3902 |
-
if (slides[i$1] && !breakLoop) {
|
3903 |
-
slideSize += slides[i$1].swiperSlideSize;
|
3904 |
-
spv += 1;
|
3905 |
-
if (slideSize > swiperSize) { breakLoop = true; }
|
3906 |
-
}
|
3907 |
-
}
|
3908 |
-
} else {
|
3909 |
-
for (var i$2 = activeIndex + 1; i$2 < slides.length; i$2 += 1) {
|
3910 |
-
if (slidesGrid[i$2] - slidesGrid[activeIndex] < swiperSize) {
|
3911 |
-
spv += 1;
|
3912 |
-
}
|
3913 |
-
}
|
3914 |
-
}
|
3915 |
-
return spv;
|
3916 |
-
};
|
3917 |
-
|
3918 |
-
Swiper.prototype.update = function update$$1 () {
|
3919 |
-
var swiper = this;
|
3920 |
-
if (!swiper || swiper.destroyed) { return; }
|
3921 |
-
var snapGrid = swiper.snapGrid;
|
3922 |
-
var params = swiper.params;
|
3923 |
-
// Breakpoints
|
3924 |
-
if (params.breakpoints) {
|
3925 |
-
swiper.setBreakpoint();
|
3926 |
-
}
|
3927 |
-
swiper.updateSize();
|
3928 |
-
swiper.updateSlides();
|
3929 |
-
swiper.updateProgress();
|
3930 |
-
swiper.updateSlidesClasses();
|
3931 |
-
|
3932 |
-
function setTranslate() {
|
3933 |
-
var translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;
|
3934 |
-
var newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());
|
3935 |
-
swiper.setTranslate(newTranslate);
|
3936 |
-
swiper.updateActiveIndex();
|
3937 |
-
swiper.updateSlidesClasses();
|
3938 |
-
}
|
3939 |
-
var translated;
|
3940 |
-
if (swiper.params.freeMode) {
|
3941 |
-
setTranslate();
|
3942 |
-
if (swiper.params.autoHeight) {
|
3943 |
-
swiper.updateAutoHeight();
|
3944 |
-
}
|
3945 |
-
} else {
|
3946 |
-
if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
|
3947 |
-
translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true);
|
3948 |
-
} else {
|
3949 |
-
translated = swiper.slideTo(swiper.activeIndex, 0, false, true);
|
3950 |
-
}
|
3951 |
-
if (!translated) {
|
3952 |
-
setTranslate();
|
3953 |
-
}
|
3954 |
-
}
|
3955 |
-
if (params.watchOverflow && snapGrid !== swiper.snapGrid) {
|
3956 |
-
swiper.checkOverflow();
|
3957 |
-
}
|
3958 |
-
swiper.emit('update');
|
3959 |
-
};
|
3960 |
-
|
3961 |
-
Swiper.prototype.init = function init () {
|
3962 |
-
var swiper = this;
|
3963 |
-
if (swiper.initialized) { return; }
|
3964 |
-
|
3965 |
-
swiper.emit('beforeInit');
|
3966 |
-
|
3967 |
-
// Set breakpoint
|
3968 |
-
if (swiper.params.breakpoints) {
|
3969 |
-
swiper.setBreakpoint();
|
3970 |
-
}
|
3971 |
-
|
3972 |
-
// Add Classes
|
3973 |
-
swiper.addClasses();
|
3974 |
-
|
3975 |
-
// Create loop
|
3976 |
-
if (swiper.params.loop) {
|
3977 |
-
swiper.loopCreate();
|
3978 |
-
}
|
3979 |
-
|
3980 |
-
// Update size
|
3981 |
-
swiper.updateSize();
|
3982 |
-
|
3983 |
-
// Update slides
|
3984 |
-
swiper.updateSlides();
|
3985 |
-
|
3986 |
-
if (swiper.params.watchOverflow) {
|
3987 |
-
swiper.checkOverflow();
|
3988 |
-
}
|
3989 |
-
|
3990 |
-
// Set Grab Cursor
|
3991 |
-
if (swiper.params.grabCursor) {
|
3992 |
-
swiper.setGrabCursor();
|
3993 |
-
}
|
3994 |
-
|
3995 |
-
if (swiper.params.preloadImages) {
|
3996 |
-
swiper.preloadImages();
|
3997 |
-
}
|
3998 |
-
|
3999 |
-
// Slide To Initial Slide
|
4000 |
-
if (swiper.params.loop) {
|
4001 |
-
swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit);
|
4002 |
-
} else {
|
4003 |
-
swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit);
|
4004 |
-
}
|
4005 |
-
|
4006 |
-
// Attach events
|
4007 |
-
swiper.attachEvents();
|
4008 |
-
|
4009 |
-
// Init Flag
|
4010 |
-
swiper.initialized = true;
|
4011 |
-
|
4012 |
-
// Emit
|
4013 |
-
swiper.emit('init');
|
4014 |
-
};
|
4015 |
-
|
4016 |
-
Swiper.prototype.destroy = function destroy (deleteInstance, cleanStyles) {
|
4017 |
-
if ( deleteInstance === void 0 ) deleteInstance = true;
|
4018 |
-
if ( cleanStyles === void 0 ) cleanStyles = true;
|
4019 |
-
|
4020 |
-
var swiper = this;
|
4021 |
-
var params = swiper.params;
|
4022 |
-
var $el = swiper.$el;
|
4023 |
-
var $wrapperEl = swiper.$wrapperEl;
|
4024 |
-
var slides = swiper.slides;
|
4025 |
-
|
4026 |
-
if (typeof swiper.params === 'undefined' || swiper.destroyed) {
|
4027 |
-
return null;
|
4028 |
-
}
|
4029 |
-
|
4030 |
-
swiper.emit('beforeDestroy');
|
4031 |
-
|
4032 |
-
// Init Flag
|
4033 |
-
swiper.initialized = false;
|
4034 |
-
|
4035 |
-
// Detach events
|
4036 |
-
swiper.detachEvents();
|
4037 |
-
|
4038 |
-
// Destroy loop
|
4039 |
-
if (params.loop) {
|
4040 |
-
swiper.loopDestroy();
|
4041 |
-
}
|
4042 |
-
|
4043 |
-
// Cleanup styles
|
4044 |
-
if (cleanStyles) {
|
4045 |
-
swiper.removeClasses();
|
4046 |
-
$el.removeAttr('style');
|
4047 |
-
$wrapperEl.removeAttr('style');
|
4048 |
-
if (slides && slides.length) {
|
4049 |
-
slides
|
4050 |
-
.removeClass([
|
4051 |
-
params.slideVisibleClass,
|
4052 |
-
params.slideActiveClass,
|
4053 |
-
params.slideNextClass,
|
4054 |
-
params.slidePrevClass ].join(' '))
|
4055 |
-
.removeAttr('style')
|
4056 |
-
.removeAttr('data-swiper-slide-index')
|
4057 |
-
.removeAttr('data-swiper-column')
|
4058 |
-
.removeAttr('data-swiper-row');
|
4059 |
-
}
|
4060 |
-
}
|
4061 |
-
|
4062 |
-
swiper.emit('destroy');
|
4063 |
-
|
4064 |
-
// Detach emitter events
|
4065 |
-
Object.keys(swiper.eventsListeners).forEach(function (eventName) {
|
4066 |
-
swiper.off(eventName);
|
4067 |
-
});
|
4068 |
-
|
4069 |
-
if (deleteInstance !== false) {
|
4070 |
-
swiper.$el[0].swiper = null;
|
4071 |
-
swiper.$el.data('swiper', null);
|
4072 |
-
Utils.deleteProps(swiper);
|
4073 |
-
}
|
4074 |
-
swiper.destroyed = true;
|
4075 |
-
|
4076 |
-
return null;
|
4077 |
-
};
|
4078 |
-
|
4079 |
-
Swiper.extendDefaults = function extendDefaults (newDefaults) {
|
4080 |
-
Utils.extend(extendedDefaults, newDefaults);
|
4081 |
-
};
|
4082 |
-
|
4083 |
-
staticAccessors.extendedDefaults.get = function () {
|
4084 |
-
return extendedDefaults;
|
4085 |
-
};
|
4086 |
-
|
4087 |
-
staticAccessors.defaults.get = function () {
|
4088 |
-
return defaults;
|
4089 |
-
};
|
4090 |
-
|
4091 |
-
staticAccessors.Class.get = function () {
|
4092 |
-
return SwiperClass$$1;
|
4093 |
-
};
|
4094 |
-
|
4095 |
-
staticAccessors.$.get = function () {
|
4096 |
-
return $;
|
4097 |
-
};
|
4098 |
-
|
4099 |
-
Object.defineProperties( Swiper, staticAccessors );
|
4100 |
-
|
4101 |
-
return Swiper;
|
4102 |
-
}(SwiperClass));
|
4103 |
-
|
4104 |
-
var Device$1 = {
|
4105 |
-
name: 'device',
|
4106 |
-
proto: {
|
4107 |
-
device: Device,
|
4108 |
-
},
|
4109 |
-
static: {
|
4110 |
-
device: Device,
|
4111 |
-
},
|
4112 |
-
};
|
4113 |
-
|
4114 |
-
var Support$1 = {
|
4115 |
-
name: 'support',
|
4116 |
-
proto: {
|
4117 |
-
support: Support,
|
4118 |
-
},
|
4119 |
-
static: {
|
4120 |
-
support: Support,
|
4121 |
-
},
|
4122 |
-
};
|
4123 |
-
|
4124 |
-
var Browser$1 = {
|
4125 |
-
name: 'browser',
|
4126 |
-
proto: {
|
4127 |
-
browser: Browser,
|
4128 |
-
},
|
4129 |
-
static: {
|
4130 |
-
browser: Browser,
|
4131 |
-
},
|
4132 |
-
};
|
4133 |
-
|
4134 |
-
var Resize = {
|
4135 |
-
name: 'resize',
|
4136 |
-
create: function create() {
|
4137 |
-
var swiper = this;
|
4138 |
-
Utils.extend(swiper, {
|
4139 |
-
resize: {
|
4140 |
-
resizeHandler: function resizeHandler() {
|
4141 |
-
if (!swiper || swiper.destroyed || !swiper.initialized) { return; }
|
4142 |
-
swiper.emit('beforeResize');
|
4143 |
-
swiper.emit('resize');
|
4144 |
-
},
|
4145 |
-
orientationChangeHandler: function orientationChangeHandler() {
|
4146 |
-
if (!swiper || swiper.destroyed || !swiper.initialized) { return; }
|
4147 |
-
swiper.emit('orientationchange');
|
4148 |
-
},
|
4149 |
-
},
|
4150 |
-
});
|
4151 |
-
},
|
4152 |
-
on: {
|
4153 |
-
init: function init() {
|
4154 |
-
var swiper = this;
|
4155 |
-
// Emit resize
|
4156 |
-
win.addEventListener('resize', swiper.resize.resizeHandler);
|
4157 |
-
|
4158 |
-
// Emit orientationchange
|
4159 |
-
win.addEventListener('orientationchange', swiper.resize.orientationChangeHandler);
|
4160 |
-
},
|
4161 |
-
destroy: function destroy() {
|
4162 |
-
var swiper = this;
|
4163 |
-
win.removeEventListener('resize', swiper.resize.resizeHandler);
|
4164 |
-
win.removeEventListener('orientationchange', swiper.resize.orientationChangeHandler);
|
4165 |
-
},
|
4166 |
-
},
|
4167 |
-
};
|
4168 |
-
|
4169 |
-
var Observer = {
|
4170 |
-
func: win.MutationObserver || win.WebkitMutationObserver,
|
4171 |
-
attach: function attach(target, options) {
|
4172 |
-
if ( options === void 0 ) options = {};
|
4173 |
-
|
4174 |
-
var swiper = this;
|
4175 |
-
|
4176 |
-
var ObserverFunc = Observer.func;
|
4177 |
-
var observer = new ObserverFunc(function (mutations) {
|
4178 |
-
// The observerUpdate event should only be triggered
|
4179 |
-
// once despite the number of mutations. Additional
|
4180 |
-
// triggers are redundant and are very costly
|
4181 |
-
if (mutations.length === 1) {
|
4182 |
-
swiper.emit('observerUpdate', mutations[0]);
|
4183 |
-
return;
|
4184 |
-
}
|
4185 |
-
var observerUpdate = function observerUpdate() {
|
4186 |
-
swiper.emit('observerUpdate', mutations[0]);
|
4187 |
-
};
|
4188 |
-
|
4189 |
-
if (win.requestAnimationFrame) {
|
4190 |
-
win.requestAnimationFrame(observerUpdate);
|
4191 |
-
} else {
|
4192 |
-
win.setTimeout(observerUpdate, 0);
|
4193 |
-
}
|
4194 |
-
});
|
4195 |
-
|
4196 |
-
observer.observe(target, {
|
4197 |
-
attributes: typeof options.attributes === 'undefined' ? true : options.attributes,
|
4198 |
-
childList: typeof options.childList === 'undefined' ? true : options.childList,
|
4199 |
-
characterData: typeof options.characterData === 'undefined' ? true : options.characterData,
|
4200 |
-
});
|
4201 |
-
|
4202 |
-
swiper.observer.observers.push(observer);
|
4203 |
-
},
|
4204 |
-
init: function init() {
|
4205 |
-
var swiper = this;
|
4206 |
-
if (!Support.observer || !swiper.params.observer) { return; }
|
4207 |
-
if (swiper.params.observeParents) {
|
4208 |
-
var containerParents = swiper.$el.parents();
|
4209 |
-
for (var i = 0; i < containerParents.length; i += 1) {
|
4210 |
-
swiper.observer.attach(containerParents[i]);
|
4211 |
-
}
|
4212 |
-
}
|
4213 |
-
// Observe container
|
4214 |
-
swiper.observer.attach(swiper.$el[0], { childList: swiper.params.observeSlideChildren });
|
4215 |
-
|
4216 |
-
// Observe wrapper
|
4217 |
-
swiper.observer.attach(swiper.$wrapperEl[0], { attributes: false });
|
4218 |
-
},
|
4219 |
-
destroy: function destroy() {
|
4220 |
-
var swiper = this;
|
4221 |
-
swiper.observer.observers.forEach(function (observer) {
|
4222 |
-
observer.disconnect();
|
4223 |
-
});
|
4224 |
-
swiper.observer.observers = [];
|
4225 |
-
},
|
4226 |
-
};
|
4227 |
-
|
4228 |
-
var Observer$1 = {
|
4229 |
-
name: 'observer',
|
4230 |
-
params: {
|
4231 |
-
observer: false,
|
4232 |
-
observeParents: false,
|
4233 |
-
observeSlideChildren: false,
|
4234 |
-
},
|
4235 |
-
create: function create() {
|
4236 |
-
var swiper = this;
|
4237 |
-
Utils.extend(swiper, {
|
4238 |
-
observer: {
|
4239 |
-
init: Observer.init.bind(swiper),
|
4240 |
-
attach: Observer.attach.bind(swiper),
|
4241 |
-
destroy: Observer.destroy.bind(swiper),
|
4242 |
-
observers: [],
|
4243 |
-
},
|
4244 |
-
});
|
4245 |
-
},
|
4246 |
-
on: {
|
4247 |
-
init: function init() {
|
4248 |
-
var swiper = this;
|
4249 |
-
swiper.observer.init();
|
4250 |
-
},
|
4251 |
-
destroy: function destroy() {
|
4252 |
-
var swiper = this;
|
4253 |
-
swiper.observer.destroy();
|
4254 |
-
},
|
4255 |
-
},
|
4256 |
-
};
|
4257 |
-
|
4258 |
-
var Virtual = {
|
4259 |
-
update: function update(force) {
|
4260 |
-
var swiper = this;
|
4261 |
-
var ref = swiper.params;
|
4262 |
-
var slidesPerView = ref.slidesPerView;
|
4263 |
-
var slidesPerGroup = ref.slidesPerGroup;
|
4264 |
-
var centeredSlides = ref.centeredSlides;
|
4265 |
-
var ref$1 = swiper.params.virtual;
|
4266 |
-
var addSlidesBefore = ref$1.addSlidesBefore;
|
4267 |
-
var addSlidesAfter = ref$1.addSlidesAfter;
|
4268 |
-
var ref$2 = swiper.virtual;
|
4269 |
-
var previousFrom = ref$2.from;
|
4270 |
-
var previousTo = ref$2.to;
|
4271 |
-
var slides = ref$2.slides;
|
4272 |
-
var previousSlidesGrid = ref$2.slidesGrid;
|
4273 |
-
var renderSlide = ref$2.renderSlide;
|
4274 |
-
var previousOffset = ref$2.offset;
|
4275 |
-
swiper.updateActiveIndex();
|
4276 |
-
var activeIndex = swiper.activeIndex || 0;
|
4277 |
-
|
4278 |
-
var offsetProp;
|
4279 |
-
if (swiper.rtlTranslate) { offsetProp = 'right'; }
|
4280 |
-
else { offsetProp = swiper.isHorizontal() ? 'left' : 'top'; }
|
4281 |
-
|
4282 |
-
var slidesAfter;
|
4283 |
-
var slidesBefore;
|
4284 |
-
if (centeredSlides) {
|
4285 |
-
slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore;
|
4286 |
-
slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter;
|
4287 |
-
} else {
|
4288 |
-
slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesBefore;
|
4289 |
-
slidesBefore = slidesPerGroup + addSlidesAfter;
|
4290 |
-
}
|
4291 |
-
var from = Math.max((activeIndex || 0) - slidesBefore, 0);
|
4292 |
-
var to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1);
|
4293 |
-
var offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0);
|
4294 |
-
|
4295 |
-
Utils.extend(swiper.virtual, {
|
4296 |
-
from: from,
|
4297 |
-
to: to,
|
4298 |
-
offset: offset,
|
4299 |
-
slidesGrid: swiper.slidesGrid,
|
4300 |
-
});
|
4301 |
-
|
4302 |
-
function onRendered() {
|
4303 |
-
swiper.updateSlides();
|
4304 |
-
swiper.updateProgress();
|
4305 |
-
swiper.updateSlidesClasses();
|
4306 |
-
if (swiper.lazy && swiper.params.lazy.enabled) {
|
4307 |
-
swiper.lazy.load();
|
4308 |
-
}
|
4309 |
-
}
|
4310 |
-
|
4311 |
-
if (previousFrom === from && previousTo === to && !force) {
|
4312 |
-
if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) {
|
4313 |
-
swiper.slides.css(offsetProp, (offset + "px"));
|
4314 |
-
}
|
4315 |
-
swiper.updateProgress();
|
4316 |
-
return;
|
4317 |
-
}
|
4318 |
-
if (swiper.params.virtual.renderExternal) {
|
4319 |
-
swiper.params.virtual.renderExternal.call(swiper, {
|
4320 |
-
offset: offset,
|
4321 |
-
from: from,
|
4322 |
-
to: to,
|
4323 |
-
slides: (function getSlides() {
|
4324 |
-
var slidesToRender = [];
|
4325 |
-
for (var i = from; i <= to; i += 1) {
|
4326 |
-
slidesToRender.push(slides[i]);
|
4327 |
-
}
|
4328 |
-
return slidesToRender;
|
4329 |
-
}()),
|
4330 |
-
});
|
4331 |
-
onRendered();
|
4332 |
-
return;
|
4333 |
-
}
|
4334 |
-
var prependIndexes = [];
|
4335 |
-
var appendIndexes = [];
|
4336 |
-
if (force) {
|
4337 |
-
swiper.$wrapperEl.find(("." + (swiper.params.slideClass))).remove();
|
4338 |
-
} else {
|
4339 |
-
for (var i = previousFrom; i <= previousTo; i += 1) {
|
4340 |
-
if (i < from || i > to) {
|
4341 |
-
swiper.$wrapperEl.find(("." + (swiper.params.slideClass) + "[data-swiper-slide-index=\"" + i + "\"]")).remove();
|
4342 |
-
}
|
4343 |
-
}
|
4344 |
-
}
|
4345 |
-
for (var i$1 = 0; i$1 < slides.length; i$1 += 1) {
|
4346 |
-
if (i$1 >= from && i$1 <= to) {
|
4347 |
-
if (typeof previousTo === 'undefined' || force) {
|
4348 |
-
appendIndexes.push(i$1);
|
4349 |
-
} else {
|
4350 |
-
if (i$1 > previousTo) { appendIndexes.push(i$1); }
|
4351 |
-
if (i$1 < previousFrom) { prependIndexes.push(i$1); }
|
4352 |
-
}
|
4353 |
-
}
|
4354 |
-
}
|
4355 |
-
appendIndexes.forEach(function (index) {
|
4356 |
-
swiper.$wrapperEl.append(renderSlide(slides[index], index));
|
4357 |
-
});
|
4358 |
-
prependIndexes.sort(function (a, b) { return b - a; }).forEach(function (index) {
|
4359 |
-
swiper.$wrapperEl.prepend(renderSlide(slides[index], index));
|
4360 |
-
});
|
4361 |
-
swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, (offset + "px"));
|
4362 |
-
onRendered();
|
4363 |
-
},
|
4364 |
-
renderSlide: function renderSlide(slide, index) {
|
4365 |
-
var swiper = this;
|
4366 |
-
var params = swiper.params.virtual;
|
4367 |
-
if (params.cache && swiper.virtual.cache[index]) {
|
4368 |
-
return swiper.virtual.cache[index];
|
4369 |
-
}
|
4370 |
-
var $slideEl = params.renderSlide
|
4371 |
-
? $(params.renderSlide.call(swiper, slide, index))
|
4372 |
-
: $(("<div class=\"" + (swiper.params.slideClass) + "\" data-swiper-slide-index=\"" + index + "\">" + slide + "</div>"));
|
4373 |
-
if (!$slideEl.attr('data-swiper-slide-index')) { $slideEl.attr('data-swiper-slide-index', index); }
|
4374 |
-
if (params.cache) { swiper.virtual.cache[index] = $slideEl; }
|
4375 |
-
return $slideEl;
|
4376 |
-
},
|
4377 |
-
appendSlide: function appendSlide(slide) {
|
4378 |
-
var swiper = this;
|
4379 |
-
swiper.virtual.slides.push(slide);
|
4380 |
-
swiper.virtual.update(true);
|
4381 |
-
},
|
4382 |
-
prependSlide: function prependSlide(slide) {
|
4383 |
-
var swiper = this;
|
4384 |
-
swiper.virtual.slides.unshift(slide);
|
4385 |
-
if (swiper.params.virtual.cache) {
|
4386 |
-
var cache = swiper.virtual.cache;
|
4387 |
-
var newCache = {};
|
4388 |
-
Object.keys(cache).forEach(function (cachedIndex) {
|
4389 |
-
newCache[cachedIndex + 1] = cache[cachedIndex];
|
4390 |
-
});
|
4391 |
-
swiper.virtual.cache = newCache;
|
4392 |
-
}
|
4393 |
-
swiper.virtual.update(true);
|
4394 |
-
swiper.slideNext(0);
|
4395 |
-
},
|
4396 |
-
};
|
4397 |
-
|
4398 |
-
var Virtual$1 = {
|
4399 |
-
name: 'virtual',
|
4400 |
-
params: {
|
4401 |
-
virtual: {
|
4402 |
-
enabled: false,
|
4403 |
-
slides: [],
|
4404 |
-
cache: true,
|
4405 |
-
renderSlide: null,
|
4406 |
-
renderExternal: null,
|
4407 |
-
addSlidesBefore: 0,
|
4408 |
-
addSlidesAfter: 0,
|
4409 |
-
},
|
4410 |
-
},
|
4411 |
-
create: function create() {
|
4412 |
-
var swiper = this;
|
4413 |
-
Utils.extend(swiper, {
|
4414 |
-
virtual: {
|
4415 |
-
update: Virtual.update.bind(swiper),
|
4416 |
-
appendSlide: Virtual.appendSlide.bind(swiper),
|
4417 |
-
prependSlide: Virtual.prependSlide.bind(swiper),
|
4418 |
-
renderSlide: Virtual.renderSlide.bind(swiper),
|
4419 |
-
slides: swiper.params.virtual.slides,
|
4420 |
-
cache: {},
|
4421 |
-
},
|
4422 |
-
});
|
4423 |
-
},
|
4424 |
-
on: {
|
4425 |
-
beforeInit: function beforeInit() {
|
4426 |
-
var swiper = this;
|
4427 |
-
if (!swiper.params.virtual.enabled) { return; }
|
4428 |
-
swiper.classNames.push(((swiper.params.containerModifierClass) + "virtual"));
|
4429 |
-
var overwriteParams = {
|
4430 |
-
watchSlidesProgress: true,
|
4431 |
-
};
|
4432 |
-
Utils.extend(swiper.params, overwriteParams);
|
4433 |
-
Utils.extend(swiper.originalParams, overwriteParams);
|
4434 |
-
|
4435 |
-
if (!swiper.params.initialSlide) {
|
4436 |
-
swiper.virtual.update();
|
4437 |
-
}
|
4438 |
-
},
|
4439 |
-
setTranslate: function setTranslate() {
|
4440 |
-
var swiper = this;
|
4441 |
-
if (!swiper.params.virtual.enabled) { return; }
|
4442 |
-
swiper.virtual.update();
|
4443 |
-
},
|
4444 |
-
},
|
4445 |
-
};
|
4446 |
-
|
4447 |
-
var Keyboard = {
|
4448 |
-
handle: function handle(event) {
|
4449 |
-
var swiper = this;
|
4450 |
-
var rtl = swiper.rtlTranslate;
|
4451 |
-
var e = event;
|
4452 |
-
if (e.originalEvent) { e = e.originalEvent; } // jquery fix
|
4453 |
-
var kc = e.keyCode || e.charCode;
|
4454 |
-
// Directions locks
|
4455 |
-
if (!swiper.allowSlideNext && ((swiper.isHorizontal() && kc === 39) || (swiper.isVertical() && kc === 40))) {
|
4456 |
-
return false;
|
4457 |
-
}
|
4458 |
-
if (!swiper.allowSlidePrev && ((swiper.isHorizontal() && kc === 37) || (swiper.isVertical() && kc === 38))) {
|
4459 |
-
return false;
|
4460 |
-
}
|
4461 |
-
if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {
|
4462 |
-
return undefined;
|
4463 |
-
}
|
4464 |
-
if (doc.activeElement && doc.activeElement.nodeName && (doc.activeElement.nodeName.toLowerCase() === 'input' || doc.activeElement.nodeName.toLowerCase() === 'textarea')) {
|
4465 |
-
return undefined;
|
4466 |
-
}
|
4467 |
-
if (swiper.params.keyboard.onlyInViewport && (kc === 37 || kc === 39 || kc === 38 || kc === 40)) {
|
4468 |
-
var inView = false;
|
4469 |
-
// Check that swiper should be inside of visible area of window
|
4470 |
-
if (swiper.$el.parents(("." + (swiper.params.slideClass))).length > 0 && swiper.$el.parents(("." + (swiper.params.slideActiveClass))).length === 0) {
|
4471 |
-
return undefined;
|
4472 |
-
}
|
4473 |
-
var windowWidth = win.innerWidth;
|
4474 |
-
var windowHeight = win.innerHeight;
|
4475 |
-
var swiperOffset = swiper.$el.offset();
|
4476 |
-
if (rtl) { swiperOffset.left -= swiper.$el[0].scrollLeft; }
|
4477 |
-
var swiperCoord = [
|
4478 |
-
[swiperOffset.left, swiperOffset.top],
|
4479 |
-
[swiperOffset.left + swiper.width, swiperOffset.top],
|
4480 |
-
[swiperOffset.left, swiperOffset.top + swiper.height],
|
4481 |
-
[swiperOffset.left + swiper.width, swiperOffset.top + swiper.height] ];
|
4482 |
-
for (var i = 0; i < swiperCoord.length; i += 1) {
|
4483 |
-
var point = swiperCoord[i];
|
4484 |
-
if (
|
4485 |
-
point[0] >= 0 && point[0] <= windowWidth
|
4486 |
-
&& point[1] >= 0 && point[1] <= windowHeight
|
4487 |
-
) {
|
4488 |
-
inView = true;
|
4489 |
-
}
|
4490 |
-
}
|
4491 |
-
if (!inView) { return undefined; }
|
4492 |
-
}
|
4493 |
-
if (swiper.isHorizontal()) {
|
4494 |
-
if (kc === 37 || kc === 39) {
|
4495 |
-
if (e.preventDefault) { e.preventDefault(); }
|
4496 |
-
else { e.returnValue = false; }
|
4497 |
-
}
|
4498 |
-
if ((kc === 39 && !rtl) || (kc === 37 && rtl)) { swiper.slideNext(); }
|
4499 |
-
if ((kc === 37 && !rtl) || (kc === 39 && rtl)) { swiper.slidePrev(); }
|
4500 |
-
} else {
|
4501 |
-
if (kc === 38 || kc === 40) {
|
4502 |
-
if (e.preventDefault) { e.preventDefault(); }
|
4503 |
-
else { e.returnValue = false; }
|
4504 |
-
}
|
4505 |
-
if (kc === 40) { swiper.slideNext(); }
|
4506 |
-
if (kc === 38) { swiper.slidePrev(); }
|
4507 |
-
}
|
4508 |
-
swiper.emit('keyPress', kc);
|
4509 |
-
return undefined;
|
4510 |
-
},
|
4511 |
-
enable: function enable() {
|
4512 |
-
var swiper = this;
|
4513 |
-
if (swiper.keyboard.enabled) { return; }
|
4514 |
-
$(doc).on('keydown', swiper.keyboard.handle);
|
4515 |
-
swiper.keyboard.enabled = true;
|
4516 |
-
},
|
4517 |
-
disable: function disable() {
|
4518 |
-
var swiper = this;
|
4519 |
-
if (!swiper.keyboard.enabled) { return; }
|
4520 |
-
$(doc).off('keydown', swiper.keyboard.handle);
|
4521 |
-
swiper.keyboard.enabled = false;
|
4522 |
-
},
|
4523 |
-
};
|
4524 |
-
|
4525 |
-
var Keyboard$1 = {
|
4526 |
-
name: 'keyboard',
|
4527 |
-
params: {
|
4528 |
-
keyboard: {
|
4529 |
-
enabled: false,
|
4530 |
-
onlyInViewport: true,
|
4531 |
-
},
|
4532 |
-
},
|
4533 |
-
create: function create() {
|
4534 |
-
var swiper = this;
|
4535 |
-
Utils.extend(swiper, {
|
4536 |
-
keyboard: {
|
4537 |
-
enabled: false,
|
4538 |
-
enable: Keyboard.enable.bind(swiper),
|
4539 |
-
disable: Keyboard.disable.bind(swiper),
|
4540 |
-
handle: Keyboard.handle.bind(swiper),
|
4541 |
-
},
|
4542 |
-
});
|
4543 |
-
},
|
4544 |
-
on: {
|
4545 |
-
init: function init() {
|
4546 |
-
var swiper = this;
|
4547 |
-
if (swiper.params.keyboard.enabled) {
|
4548 |
-
swiper.keyboard.enable();
|
4549 |
-
}
|
4550 |
-
},
|
4551 |
-
destroy: function destroy() {
|
4552 |
-
var swiper = this;
|
4553 |
-
if (swiper.keyboard.enabled) {
|
4554 |
-
swiper.keyboard.disable();
|
4555 |
-
}
|
4556 |
-
},
|
4557 |
-
},
|
4558 |
-
};
|
4559 |
-
|
4560 |
-
function isEventSupported() {
|
4561 |
-
var eventName = 'onwheel';
|
4562 |
-
var isSupported = eventName in doc;
|
4563 |
-
|
4564 |
-
if (!isSupported) {
|
4565 |
-
var element = doc.createElement('div');
|
4566 |
-
element.setAttribute(eventName, 'return;');
|
4567 |
-
isSupported = typeof element[eventName] === 'function';
|
4568 |
-
}
|
4569 |
-
|
4570 |
-
if (!isSupported
|
4571 |
-
&& doc.implementation
|
4572 |
-
&& doc.implementation.hasFeature
|
4573 |
-
// always returns true in newer browsers as per the standard.
|
4574 |
-
// @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
|
4575 |
-
&& doc.implementation.hasFeature('', '') !== true
|
4576 |
-
) {
|
4577 |
-
// This is the only way to test support for the `wheel` event in IE9+.
|
4578 |
-
isSupported = doc.implementation.hasFeature('Events.wheel', '3.0');
|
4579 |
-
}
|
4580 |
-
|
4581 |
-
return isSupported;
|
4582 |
-
}
|
4583 |
-
var Mousewheel = {
|
4584 |
-
lastScrollTime: Utils.now(),
|
4585 |
-
event: (function getEvent() {
|
4586 |
-
if (win.navigator.userAgent.indexOf('firefox') > -1) { return 'DOMMouseScroll'; }
|
4587 |
-
return isEventSupported() ? 'wheel' : 'mousewheel';
|
4588 |
-
}()),
|
4589 |
-
normalize: function normalize(e) {
|
4590 |
-
// Reasonable defaults
|
4591 |
-
var PIXEL_STEP = 10;
|
4592 |
-
var LINE_HEIGHT = 40;
|
4593 |
-
var PAGE_HEIGHT = 800;
|
4594 |
-
|
4595 |
-
var sX = 0;
|
4596 |
-
var sY = 0; // spinX, spinY
|
4597 |
-
var pX = 0;
|
4598 |
-
var pY = 0; // pixelX, pixelY
|
4599 |
-
|
4600 |
-
// Legacy
|
4601 |
-
if ('detail' in e) {
|
4602 |
-
sY = e.detail;
|
4603 |
-
}
|
4604 |
-
if ('wheelDelta' in e) {
|
4605 |
-
sY = -e.wheelDelta / 120;
|
4606 |
-
}
|
4607 |
-
if ('wheelDeltaY' in e) {
|
4608 |
-
sY = -e.wheelDeltaY / 120;
|
4609 |
-
}
|
4610 |
-
if ('wheelDeltaX' in e) {
|
4611 |
-
sX = -e.wheelDeltaX / 120;
|
4612 |
-
}
|
4613 |
-
|
4614 |
-
// side scrolling on FF with DOMMouseScroll
|
4615 |
-
if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) {
|
4616 |
-
sX = sY;
|
4617 |
-
sY = 0;
|
4618 |
-
}
|
4619 |
-
|
4620 |
-
pX = sX * PIXEL_STEP;
|
4621 |
-
pY = sY * PIXEL_STEP;
|
4622 |
-
|
4623 |
-
if ('deltaY' in e) {
|
4624 |
-
pY = e.deltaY;
|
4625 |
-
}
|
4626 |
-
if ('deltaX' in e) {
|
4627 |
-
pX = e.deltaX;
|
4628 |
-
}
|
4629 |
-
|
4630 |
-
if ((pX || pY) && e.deltaMode) {
|
4631 |
-
if (e.deltaMode === 1) { // delta in LINE units
|
4632 |
-
pX *= LINE_HEIGHT;
|
4633 |
-
pY *= LINE_HEIGHT;
|
4634 |
-
} else { // delta in PAGE units
|
4635 |
-
pX *= PAGE_HEIGHT;
|
4636 |
-
pY *= PAGE_HEIGHT;
|
4637 |
-
}
|
4638 |
-
}
|
4639 |
-
|
4640 |
-
// Fall-back if spin cannot be determined
|
4641 |
-
if (pX && !sX) {
|
4642 |
-
sX = (pX < 1) ? -1 : 1;
|
4643 |
-
}
|
4644 |
-
if (pY && !sY) {
|
4645 |
-
sY = (pY < 1) ? -1 : 1;
|
4646 |
-
}
|
4647 |
-
|
4648 |
-
return {
|
4649 |
-
spinX: sX,
|
4650 |
-
spinY: sY,
|
4651 |
-
pixelX: pX,
|
4652 |
-
pixelY: pY,
|
4653 |
-
};
|
4654 |
-
},
|
4655 |
-
handleMouseEnter: function handleMouseEnter() {
|
4656 |
-
var swiper = this;
|
4657 |
-
swiper.mouseEntered = true;
|
4658 |
-
},
|
4659 |
-
handleMouseLeave: function handleMouseLeave() {
|
4660 |
-
var swiper = this;
|
4661 |
-
swiper.mouseEntered = false;
|
4662 |
-
},
|
4663 |
-
handle: function handle(event) {
|
4664 |
-
var e = event;
|
4665 |
-
var swiper = this;
|
4666 |
-
var params = swiper.params.mousewheel;
|
4667 |
-
|
4668 |
-
if (!swiper.mouseEntered && !params.releaseOnEdges) { return true; }
|
4669 |
-
|
4670 |
-
if (e.originalEvent) { e = e.originalEvent; } // jquery fix
|
4671 |
-
var delta = 0;
|
4672 |
-
var rtlFactor = swiper.rtlTranslate ? -1 : 1;
|
4673 |
-
|
4674 |
-
var data = Mousewheel.normalize(e);
|
4675 |
-
|
4676 |
-
if (params.forceToAxis) {
|
4677 |
-
if (swiper.isHorizontal()) {
|
4678 |
-
if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) { delta = data.pixelX * rtlFactor; }
|
4679 |
-
else { return true; }
|
4680 |
-
} else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) { delta = data.pixelY; }
|
4681 |
-
else { return true; }
|
4682 |
-
} else {
|
4683 |
-
delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY;
|
4684 |
-
}
|
4685 |
-
|
4686 |
-
if (delta === 0) { return true; }
|
4687 |
-
|
4688 |
-
if (params.invert) { delta = -delta; }
|
4689 |
-
|
4690 |
-
if (!swiper.params.freeMode) {
|
4691 |
-
if (Utils.now() - swiper.mousewheel.lastScrollTime > 60) {
|
4692 |
-
if (delta < 0) {
|
4693 |
-
if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) {
|
4694 |
-
swiper.slideNext();
|
4695 |
-
swiper.emit('scroll', e);
|
4696 |
-
} else if (params.releaseOnEdges) { return true; }
|
4697 |
-
} else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) {
|
4698 |
-
swiper.slidePrev();
|
4699 |
-
swiper.emit('scroll', e);
|
4700 |
-
} else if (params.releaseOnEdges) { return true; }
|
4701 |
-
}
|
4702 |
-
swiper.mousewheel.lastScrollTime = (new win.Date()).getTime();
|
4703 |
-
} else {
|
4704 |
-
// Freemode or scrollContainer:
|
4705 |
-
if (swiper.params.loop) {
|
4706 |
-
swiper.loopFix();
|
4707 |
-
}
|
4708 |
-
var position = swiper.getTranslate() + (delta * params.sensitivity);
|
4709 |
-
var wasBeginning = swiper.isBeginning;
|
4710 |
-
var wasEnd = swiper.isEnd;
|
4711 |
-
|
4712 |
-
if (position >= swiper.minTranslate()) { position = swiper.minTranslate(); }
|
4713 |
-
if (position <= swiper.maxTranslate()) { position = swiper.maxTranslate(); }
|
4714 |
-
|
4715 |
-
swiper.setTransition(0);
|
4716 |
-
swiper.setTranslate(position);
|
4717 |
-
swiper.updateProgress();
|
4718 |
-
swiper.updateActiveIndex();
|
4719 |
-
swiper.updateSlidesClasses();
|
4720 |
-
|
4721 |
-
if ((!wasBeginning && swiper.isBeginning) || (!wasEnd && swiper.isEnd)) {
|
4722 |
-
swiper.updateSlidesClasses();
|
4723 |
-
}
|
4724 |
-
|
4725 |
-
if (swiper.params.freeModeSticky) {
|
4726 |
-
clearTimeout(swiper.mousewheel.timeout);
|
4727 |
-
swiper.mousewheel.timeout = Utils.nextTick(function () {
|
4728 |
-
swiper.slideToClosest();
|
4729 |
-
}, 300);
|
4730 |
-
}
|
4731 |
-
// Emit event
|
4732 |
-
swiper.emit('scroll', e);
|
4733 |
-
|
4734 |
-
// Stop autoplay
|
4735 |
-
if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) { swiper.autoplay.stop(); }
|
4736 |
-
// Return page scroll on edge positions
|
4737 |
-
if (position === swiper.minTranslate() || position === swiper.maxTranslate()) { return true; }
|
4738 |
-
}
|
4739 |
-
|
4740 |
-
if (e.preventDefault) { e.preventDefault(); }
|
4741 |
-
else { e.returnValue = false; }
|
4742 |
-
return false;
|
4743 |
-
},
|
4744 |
-
enable: function enable() {
|
4745 |
-
var swiper = this;
|
4746 |
-
if (!Mousewheel.event) { return false; }
|
4747 |
-
if (swiper.mousewheel.enabled) { return false; }
|
4748 |
-
var target = swiper.$el;
|
4749 |
-
if (swiper.params.mousewheel.eventsTarged !== 'container') {
|
4750 |
-
target = $(swiper.params.mousewheel.eventsTarged);
|
4751 |
-
}
|
4752 |
-
target.on('mouseenter', swiper.mousewheel.handleMouseEnter);
|
4753 |
-
target.on('mouseleave', swiper.mousewheel.handleMouseLeave);
|
4754 |
-
target.on(Mousewheel.event, swiper.mousewheel.handle);
|
4755 |
-
swiper.mousewheel.enabled = true;
|
4756 |
-
return true;
|
4757 |
-
},
|
4758 |
-
disable: function disable() {
|
4759 |
-
var swiper = this;
|
4760 |
-
if (!Mousewheel.event) { return false; }
|
4761 |
-
if (!swiper.mousewheel.enabled) { return false; }
|
4762 |
-
var target = swiper.$el;
|
4763 |
-
if (swiper.params.mousewheel.eventsTarged !== 'container') {
|
4764 |
-
target = $(swiper.params.mousewheel.eventsTarged);
|
4765 |
-
}
|
4766 |
-
target.off(Mousewheel.event, swiper.mousewheel.handle);
|
4767 |
-
swiper.mousewheel.enabled = false;
|
4768 |
-
return true;
|
4769 |
-
},
|
4770 |
-
};
|
4771 |
-
|
4772 |
-
var Mousewheel$1 = {
|
4773 |
-
name: 'mousewheel',
|
4774 |
-
params: {
|
4775 |
-
mousewheel: {
|
4776 |
-
enabled: false,
|
4777 |
-
releaseOnEdges: false,
|
4778 |
-
invert: false,
|
4779 |
-
forceToAxis: false,
|
4780 |
-
sensitivity: 1,
|
4781 |
-
eventsTarged: 'container',
|
4782 |
-
},
|
4783 |
-
},
|
4784 |
-
create: function create() {
|
4785 |
-
var swiper = this;
|
4786 |
-
Utils.extend(swiper, {
|
4787 |
-
mousewheel: {
|
4788 |
-
enabled: false,
|
4789 |
-
enable: Mousewheel.enable.bind(swiper),
|
4790 |
-
disable: Mousewheel.disable.bind(swiper),
|
4791 |
-
handle: Mousewheel.handle.bind(swiper),
|
4792 |
-
handleMouseEnter: Mousewheel.handleMouseEnter.bind(swiper),
|
4793 |
-
handleMouseLeave: Mousewheel.handleMouseLeave.bind(swiper),
|
4794 |
-
lastScrollTime: Utils.now(),
|
4795 |
-
},
|
4796 |
-
});
|
4797 |
-
},
|
4798 |
-
on: {
|
4799 |
-
init: function init() {
|
4800 |
-
var swiper = this;
|
4801 |
-
if (swiper.params.mousewheel.enabled) { swiper.mousewheel.enable(); }
|
4802 |
-
},
|
4803 |
-
destroy: function destroy() {
|
4804 |
-
var swiper = this;
|
4805 |
-
if (swiper.mousewheel.enabled) { swiper.mousewheel.disable(); }
|
4806 |
-
},
|
4807 |
-
},
|
4808 |
-
};
|
4809 |
-
|
4810 |
-
var Navigation = {
|
4811 |
-
update: function update() {
|
4812 |
-
// Update Navigation Buttons
|
4813 |
-
var swiper = this;
|
4814 |
-
var params = swiper.params.navigation;
|
4815 |
-
|
4816 |
-
if (swiper.params.loop) { return; }
|
4817 |
-
var ref = swiper.navigation;
|
4818 |
-
var $nextEl = ref.$nextEl;
|
4819 |
-
var $prevEl = ref.$prevEl;
|
4820 |
-
|
4821 |
-
if ($prevEl && $prevEl.length > 0) {
|
4822 |
-
if (swiper.isBeginning) {
|
4823 |
-
$prevEl.addClass(params.disabledClass);
|
4824 |
-
} else {
|
4825 |
-
$prevEl.removeClass(params.disabledClass);
|
4826 |
-
}
|
4827 |
-
$prevEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
|
4828 |
-
}
|
4829 |
-
if ($nextEl && $nextEl.length > 0) {
|
4830 |
-
if (swiper.isEnd) {
|
4831 |
-
$nextEl.addClass(params.disabledClass);
|
4832 |
-
} else {
|
4833 |
-
$nextEl.removeClass(params.disabledClass);
|
4834 |
-
}
|
4835 |
-
$nextEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
|
4836 |
-
}
|
4837 |
-
},
|
4838 |
-
onPrevClick: function onPrevClick(e) {
|
4839 |
-
var swiper = this;
|
4840 |
-
e.preventDefault();
|
4841 |
-
if (swiper.isBeginning && !swiper.params.loop) { return; }
|
4842 |
-
swiper.slidePrev();
|
4843 |
-
},
|
4844 |
-
onNextClick: function onNextClick(e) {
|
4845 |
-
var swiper = this;
|
4846 |
-
e.preventDefault();
|
4847 |
-
if (swiper.isEnd && !swiper.params.loop) { return; }
|
4848 |
-
swiper.slideNext();
|
4849 |
-
},
|
4850 |
-
init: function init() {
|
4851 |
-
var swiper = this;
|
4852 |
-
var params = swiper.params.navigation;
|
4853 |
-
if (!(params.nextEl || params.prevEl)) { return; }
|
4854 |
-
|
4855 |
-
var $nextEl;
|
4856 |
-
var $prevEl;
|
4857 |
-
if (params.nextEl) {
|
4858 |
-
$nextEl = $(params.nextEl);
|
4859 |
-
if (
|
4860 |
-
swiper.params.uniqueNavElements
|
4861 |
-
&& typeof params.nextEl === 'string'
|
4862 |
-
&& $nextEl.length > 1
|
4863 |
-
&& swiper.$el.find(params.nextEl).length === 1
|
4864 |
-
) {
|
4865 |
-
$nextEl = swiper.$el.find(params.nextEl);
|
4866 |
-
}
|
4867 |
-
}
|
4868 |
-
if (params.prevEl) {
|
4869 |
-
$prevEl = $(params.prevEl);
|
4870 |
-
if (
|
4871 |
-
swiper.params.uniqueNavElements
|
4872 |
-
&& typeof params.prevEl === 'string'
|
4873 |
-
&& $prevEl.length > 1
|
4874 |
-
&& swiper.$el.find(params.prevEl).length === 1
|
4875 |
-
) {
|
4876 |
-
$prevEl = swiper.$el.find(params.prevEl);
|
4877 |
-
}
|
4878 |
-
}
|
4879 |
-
|
4880 |
-
if ($nextEl && $nextEl.length > 0) {
|
4881 |
-
$nextEl.on('click', swiper.navigation.onNextClick);
|
4882 |
-
}
|
4883 |
-
if ($prevEl && $prevEl.length > 0) {
|
4884 |
-
$prevEl.on('click', swiper.navigation.onPrevClick);
|
4885 |
-
}
|
4886 |
-
|
4887 |
-
Utils.extend(swiper.navigation, {
|
4888 |
-
$nextEl: $nextEl,
|
4889 |
-
nextEl: $nextEl && $nextEl[0],
|
4890 |
-
$prevEl: $prevEl,
|
4891 |
-
prevEl: $prevEl && $prevEl[0],
|
4892 |
-
});
|
4893 |
-
},
|
4894 |
-
destroy: function destroy() {
|
4895 |
-
var swiper = this;
|
4896 |
-
var ref = swiper.navigation;
|
4897 |
-
var $nextEl = ref.$nextEl;
|
4898 |
-
var $prevEl = ref.$prevEl;
|
4899 |
-
if ($nextEl && $nextEl.length) {
|
4900 |
-
$nextEl.off('click', swiper.navigation.onNextClick);
|
4901 |
-
$nextEl.removeClass(swiper.params.navigation.disabledClass);
|
4902 |
-
}
|
4903 |
-
if ($prevEl && $prevEl.length) {
|
4904 |
-
$prevEl.off('click', swiper.navigation.onPrevClick);
|
4905 |
-
$prevEl.removeClass(swiper.params.navigation.disabledClass);
|
4906 |
-
}
|
4907 |
-
},
|
4908 |
-
};
|
4909 |
-
|
4910 |
-
var Navigation$1 = {
|
4911 |
-
name: 'navigation',
|
4912 |
-
params: {
|
4913 |
-
navigation: {
|
4914 |
-
nextEl: null,
|
4915 |
-
prevEl: null,
|
4916 |
-
|
4917 |
-
hideOnClick: false,
|
4918 |
-
disabledClass: 'swiper-button-disabled',
|
4919 |
-
hiddenClass: 'swiper-button-hidden',
|
4920 |
-
lockClass: 'swiper-button-lock',
|
4921 |
-
},
|
4922 |
-
},
|
4923 |
-
create: function create() {
|
4924 |
-
var swiper = this;
|
4925 |
-
Utils.extend(swiper, {
|
4926 |
-
navigation: {
|
4927 |
-
init: Navigation.init.bind(swiper),
|
4928 |
-
update: Navigation.update.bind(swiper),
|
4929 |
-
destroy: Navigation.destroy.bind(swiper),
|
4930 |
-
onNextClick: Navigation.onNextClick.bind(swiper),
|
4931 |
-
onPrevClick: Navigation.onPrevClick.bind(swiper),
|
4932 |
-
},
|
4933 |
-
});
|
4934 |
-
},
|
4935 |
-
on: {
|
4936 |
-
init: function init() {
|
4937 |
-
var swiper = this;
|
4938 |
-
swiper.navigation.init();
|
4939 |
-
swiper.navigation.update();
|
4940 |
-
},
|
4941 |
-
toEdge: function toEdge() {
|
4942 |
-
var swiper = this;
|
4943 |
-
swiper.navigation.update();
|
4944 |
-
},
|
4945 |
-
fromEdge: function fromEdge() {
|
4946 |
-
var swiper = this;
|
4947 |
-
swiper.navigation.update();
|
4948 |
-
},
|
4949 |
-
destroy: function destroy() {
|
4950 |
-
var swiper = this;
|
4951 |
-
swiper.navigation.destroy();
|
4952 |
-
},
|
4953 |
-
click: function click(e) {
|
4954 |
-
var swiper = this;
|
4955 |
-
var ref = swiper.navigation;
|
4956 |
-
var $nextEl = ref.$nextEl;
|
4957 |
-
var $prevEl = ref.$prevEl;
|
4958 |
-
if (
|
4959 |
-
swiper.params.navigation.hideOnClick
|
4960 |
-
&& !$(e.target).is($prevEl)
|
4961 |
-
&& !$(e.target).is($nextEl)
|
4962 |
-
) {
|
4963 |
-
if ($nextEl) { $nextEl.toggleClass(swiper.params.navigation.hiddenClass); }
|
4964 |
-
if ($prevEl) { $prevEl.toggleClass(swiper.params.navigation.hiddenClass); }
|
4965 |
-
}
|
4966 |
-
},
|
4967 |
-
},
|
4968 |
-
};
|
4969 |
-
|
4970 |
-
var Pagination = {
|
4971 |
-
update: function update() {
|
4972 |
-
// Render || Update Pagination bullets/items
|
4973 |
-
var swiper = this;
|
4974 |
-
var rtl = swiper.rtl;
|
4975 |
-
var params = swiper.params.pagination;
|
4976 |
-
if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) { return; }
|
4977 |
-
var slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
|
4978 |
-
var $el = swiper.pagination.$el;
|
4979 |
-
// Current/Total
|
4980 |
-
var current;
|
4981 |
-
var total = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
|
4982 |
-
if (swiper.params.loop) {
|
4983 |
-
current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup);
|
4984 |
-
if (current > slidesLength - 1 - (swiper.loopedSlides * 2)) {
|
4985 |
-
current -= (slidesLength - (swiper.loopedSlides * 2));
|
4986 |
-
}
|
4987 |
-
if (current > total - 1) { current -= total; }
|
4988 |
-
if (current < 0 && swiper.params.paginationType !== 'bullets') { current = total + current; }
|
4989 |
-
} else if (typeof swiper.snapIndex !== 'undefined') {
|
4990 |
-
current = swiper.snapIndex;
|
4991 |
-
} else {
|
4992 |
-
current = swiper.activeIndex || 0;
|
4993 |
-
}
|
4994 |
-
// Types
|
4995 |
-
if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {
|
4996 |
-
var bullets = swiper.pagination.bullets;
|
4997 |
-
var firstIndex;
|
4998 |
-
var lastIndex;
|
4999 |
-
var midIndex;
|
5000 |
-
if (params.dynamicBullets) {
|
5001 |
-
swiper.pagination.bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true);
|
5002 |
-
$el.css(swiper.isHorizontal() ? 'width' : 'height', ((swiper.pagination.bulletSize * (params.dynamicMainBullets + 4)) + "px"));
|
5003 |
-
if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) {
|
5004 |
-
swiper.pagination.dynamicBulletIndex += (current - swiper.previousIndex);
|
5005 |
-
if (swiper.pagination.dynamicBulletIndex > (params.dynamicMainBullets - 1)) {
|
5006 |
-
swiper.pagination.dynamicBulletIndex = params.dynamicMainBullets - 1;
|
5007 |
-
} else if (swiper.pagination.dynamicBulletIndex < 0) {
|
5008 |
-
swiper.pagination.dynamicBulletIndex = 0;
|
5009 |
-
}
|
5010 |
-
}
|
5011 |
-
firstIndex = current - swiper.pagination.dynamicBulletIndex;
|
5012 |
-
lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);
|
5013 |
-
midIndex = (lastIndex + firstIndex) / 2;
|
5014 |
-
}
|
5015 |
-
bullets.removeClass(((params.bulletActiveClass) + " " + (params.bulletActiveClass) + "-next " + (params.bulletActiveClass) + "-next-next " + (params.bulletActiveClass) + "-prev " + (params.bulletActiveClass) + "-prev-prev " + (params.bulletActiveClass) + "-main"));
|
5016 |
-
if ($el.length > 1) {
|
5017 |
-
bullets.each(function (index, bullet) {
|
5018 |
-
var $bullet = $(bullet);
|
5019 |
-
var bulletIndex = $bullet.index();
|
5020 |
-
if (bulletIndex === current) {
|
5021 |
-
$bullet.addClass(params.bulletActiveClass);
|
5022 |
-
}
|
5023 |
-
if (params.dynamicBullets) {
|
5024 |
-
if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {
|
5025 |
-
$bullet.addClass(((params.bulletActiveClass) + "-main"));
|
5026 |
-
}
|
5027 |
-
if (bulletIndex === firstIndex) {
|
5028 |
-
$bullet
|
5029 |
-
.prev()
|
5030 |
-
.addClass(((params.bulletActiveClass) + "-prev"))
|
5031 |
-
.prev()
|
5032 |
-
.addClass(((params.bulletActiveClass) + "-prev-prev"));
|
5033 |
-
}
|
5034 |
-
if (bulletIndex === lastIndex) {
|
5035 |
-
$bullet
|
5036 |
-
.next()
|
5037 |
-
.addClass(((params.bulletActiveClass) + "-next"))
|
5038 |
-
.next()
|
5039 |
-
.addClass(((params.bulletActiveClass) + "-next-next"));
|
5040 |
-
}
|
5041 |
-
}
|
5042 |
-
});
|
5043 |
-
} else {
|
5044 |
-
var $bullet = bullets.eq(current);
|
5045 |
-
$bullet.addClass(params.bulletActiveClass);
|
5046 |
-
if (params.dynamicBullets) {
|
5047 |
-
var $firstDisplayedBullet = bullets.eq(firstIndex);
|
5048 |
-
var $lastDisplayedBullet = bullets.eq(lastIndex);
|
5049 |
-
for (var i = firstIndex; i <= lastIndex; i += 1) {
|
5050 |
-
bullets.eq(i).addClass(((params.bulletActiveClass) + "-main"));
|
5051 |
-
}
|
5052 |
-
$firstDisplayedBullet
|
5053 |
-
.prev()
|
5054 |
-
.addClass(((params.bulletActiveClass) + "-prev"))
|
5055 |
-
.prev()
|
5056 |
-
.addClass(((params.bulletActiveClass) + "-prev-prev"));
|
5057 |
-
$lastDisplayedBullet
|
5058 |
-
.next()
|
5059 |
-
.addClass(((params.bulletActiveClass) + "-next"))
|
5060 |
-
.next()
|
5061 |
-
.addClass(((params.bulletActiveClass) + "-next-next"));
|
5062 |
-
}
|
5063 |
-
}
|
5064 |
-
if (params.dynamicBullets) {
|
5065 |
-
var dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);
|
5066 |
-
var bulletsOffset = (((swiper.pagination.bulletSize * dynamicBulletsLength) - (swiper.pagination.bulletSize)) / 2) - (midIndex * swiper.pagination.bulletSize);
|
5067 |
-
var offsetProp = rtl ? 'right' : 'left';
|
5068 |
-
bullets.css(swiper.isHorizontal() ? offsetProp : 'top', (bulletsOffset + "px"));
|
5069 |
-
}
|
5070 |
-
}
|
5071 |
-
if (params.type === 'fraction') {
|
5072 |
-
$el.find(("." + (params.currentClass))).text(params.formatFractionCurrent(current + 1));
|
5073 |
-
$el.find(("." + (params.totalClass))).text(params.formatFractionTotal(total));
|
5074 |
-
}
|
5075 |
-
if (params.type === 'progressbar') {
|
5076 |
-
var progressbarDirection;
|
5077 |
-
if (params.progressbarOpposite) {
|
5078 |
-
progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';
|
5079 |
-
} else {
|
5080 |
-
progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';
|
5081 |
-
}
|
5082 |
-
var scale = (current + 1) / total;
|
5083 |
-
var scaleX = 1;
|
5084 |
-
var scaleY = 1;
|
5085 |
-
if (progressbarDirection === 'horizontal') {
|
5086 |
-
scaleX = scale;
|
5087 |
-
} else {
|
5088 |
-
scaleY = scale;
|
5089 |
-
}
|
5090 |
-
$el.find(("." + (params.progressbarFillClass))).transform(("translate3d(0,0,0) scaleX(" + scaleX + ") scaleY(" + scaleY + ")")).transition(swiper.params.speed);
|
5091 |
-
}
|
5092 |
-
if (params.type === 'custom' && params.renderCustom) {
|
5093 |
-
$el.html(params.renderCustom(swiper, current + 1, total));
|
5094 |
-
swiper.emit('paginationRender', swiper, $el[0]);
|
5095 |
-
} else {
|
5096 |
-
swiper.emit('paginationUpdate', swiper, $el[0]);
|
5097 |
-
}
|
5098 |
-
$el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
|
5099 |
-
},
|
5100 |
-
render: function render() {
|
5101 |
-
// Render Container
|
5102 |
-
var swiper = this;
|
5103 |
-
var params = swiper.params.pagination;
|
5104 |
-
if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) { return; }
|
5105 |
-
var slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
|
5106 |
-
|
5107 |
-
var $el = swiper.pagination.$el;
|
5108 |
-
var paginationHTML = '';
|
5109 |
-
if (params.type === 'bullets') {
|
5110 |
-
var numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
|
5111 |
-
for (var i = 0; i < numberOfBullets; i += 1) {
|
5112 |
-
if (params.renderBullet) {
|
5113 |
-
paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);
|
5114 |
-
} else {
|
5115 |
-
paginationHTML += "<" + (params.bulletElement) + " class=\"" + (params.bulletClass) + "\"></" + (params.bulletElement) + ">";
|
5116 |
-
}
|
5117 |
-
}
|
5118 |
-
$el.html(paginationHTML);
|
5119 |
-
swiper.pagination.bullets = $el.find(("." + (params.bulletClass)));
|
5120 |
-
}
|
5121 |
-
if (params.type === 'fraction') {
|
5122 |
-
if (params.renderFraction) {
|
5123 |
-
paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);
|
5124 |
-
} else {
|
5125 |
-
paginationHTML = "<span class=\"" + (params.currentClass) + "\"></span>"
|
5126 |
-
+ ' / '
|
5127 |
-
+ "<span class=\"" + (params.totalClass) + "\"></span>";
|
5128 |
-
}
|
5129 |
-
$el.html(paginationHTML);
|
5130 |
-
}
|
5131 |
-
if (params.type === 'progressbar') {
|
5132 |
-
if (params.renderProgressbar) {
|
5133 |
-
paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);
|
5134 |
-
} else {
|
5135 |
-
paginationHTML = "<span class=\"" + (params.progressbarFillClass) + "\"></span>";
|
5136 |
-
}
|
5137 |
-
$el.html(paginationHTML);
|
5138 |
-
}
|
5139 |
-
if (params.type !== 'custom') {
|
5140 |
-
swiper.emit('paginationRender', swiper.pagination.$el[0]);
|
5141 |
-
}
|
5142 |
-
},
|
5143 |
-
init: function init() {
|
5144 |
-
var swiper = this;
|
5145 |
-
var params = swiper.params.pagination;
|
5146 |
-
if (!params.el) { return; }
|
5147 |
-
|
5148 |
-
var $el = $(params.el);
|
5149 |
-
if ($el.length === 0) { return; }
|
5150 |
-
|
5151 |
-
if (
|
5152 |
-
swiper.params.uniqueNavElements
|
5153 |
-
&& typeof params.el === 'string'
|
5154 |
-
&& $el.length > 1
|
5155 |
-
&& swiper.$el.find(params.el).length === 1
|
5156 |
-
) {
|
5157 |
-
$el = swiper.$el.find(params.el);
|
5158 |
-
}
|
5159 |
-
|
5160 |
-
if (params.type === 'bullets' && params.clickable) {
|
5161 |
-
$el.addClass(params.clickableClass);
|
5162 |
-
}
|
5163 |
-
|
5164 |
-
$el.addClass(params.modifierClass + params.type);
|
5165 |
-
|
5166 |
-
if (params.type === 'bullets' && params.dynamicBullets) {
|
5167 |
-
$el.addClass(("" + (params.modifierClass) + (params.type) + "-dynamic"));
|
5168 |
-
swiper.pagination.dynamicBulletIndex = 0;
|
5169 |
-
if (params.dynamicMainBullets < 1) {
|
5170 |
-
params.dynamicMainBullets = 1;
|
5171 |
-
}
|
5172 |
-
}
|
5173 |
-
if (params.type === 'progressbar' && params.progressbarOpposite) {
|
5174 |
-
$el.addClass(params.progressbarOppositeClass);
|
5175 |
-
}
|
5176 |
-
|
5177 |
-
if (params.clickable) {
|
5178 |
-
$el.on('click', ("." + (params.bulletClass)), function onClick(e) {
|
5179 |
-
e.preventDefault();
|
5180 |
-
var index = $(this).index() * swiper.params.slidesPerGroup;
|
5181 |
-
if (swiper.params.loop) { index += swiper.loopedSlides; }
|
5182 |
-
swiper.slideTo(index);
|
5183 |
-
});
|
5184 |
-
}
|
5185 |
-
|
5186 |
-
Utils.extend(swiper.pagination, {
|
5187 |
-
$el: $el,
|
5188 |
-
el: $el[0],
|
5189 |
-
});
|
5190 |
-
},
|
5191 |
-
destroy: function destroy() {
|
5192 |
-
var swiper = this;
|
5193 |
-
var params = swiper.params.pagination;
|
5194 |
-
if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) { return; }
|
5195 |
-
var $el = swiper.pagination.$el;
|
5196 |
-
|
5197 |
-
$el.removeClass(params.hiddenClass);
|
5198 |
-
$el.removeClass(params.modifierClass + params.type);
|
5199 |
-
if (swiper.pagination.bullets) { swiper.pagination.bullets.removeClass(params.bulletActiveClass); }
|
5200 |
-
if (params.clickable) {
|
5201 |
-
$el.off('click', ("." + (params.bulletClass)));
|
5202 |
-
}
|
5203 |
-
},
|
5204 |
-
};
|
5205 |
-
|
5206 |
-
var Pagination$1 = {
|
5207 |
-
name: 'pagination',
|
5208 |
-
params: {
|
5209 |
-
pagination: {
|
5210 |
-
el: null,
|
5211 |
-
bulletElement: 'span',
|
5212 |
-
clickable: false,
|
5213 |
-
hideOnClick: false,
|
5214 |
-
renderBullet: null,
|
5215 |
-
renderProgressbar: null,
|
5216 |
-
renderFraction: null,
|
5217 |
-
renderCustom: null,
|
5218 |
-
progressbarOpposite: false,
|
5219 |
-
type: 'bullets', // 'bullets' or 'progressbar' or 'fraction' or 'custom'
|
5220 |
-
dynamicBullets: false,
|
5221 |
-
dynamicMainBullets: 1,
|
5222 |
-
formatFractionCurrent: function (number) { return number; },
|
5223 |
-
formatFractionTotal: function (number) { return number; },
|
5224 |
-
bulletClass: 'swiper-pagination-bullet',
|
5225 |
-
bulletActiveClass: 'swiper-pagination-bullet-active',
|
5226 |
-
modifierClass: 'swiper-pagination-', // NEW
|
5227 |
-
currentClass: 'swiper-pagination-current',
|
5228 |
-
totalClass: 'swiper-pagination-total',
|
5229 |
-
hiddenClass: 'swiper-pagination-hidden',
|
5230 |
-
progressbarFillClass: 'swiper-pagination-progressbar-fill',
|
5231 |
-
progressbarOppositeClass: 'swiper-pagination-progressbar-opposite',
|
5232 |
-
clickableClass: 'swiper-pagination-clickable', // NEW
|
5233 |
-
lockClass: 'swiper-pagination-lock',
|
5234 |
-
},
|
5235 |
-
},
|
5236 |
-
create: function create() {
|
5237 |
-
var swiper = this;
|
5238 |
-
Utils.extend(swiper, {
|
5239 |
-
pagination: {
|
5240 |
-
init: Pagination.init.bind(swiper),
|
5241 |
-
render: Pagination.render.bind(swiper),
|
5242 |
-
update: Pagination.update.bind(swiper),
|
5243 |
-
destroy: Pagination.destroy.bind(swiper),
|
5244 |
-
dynamicBulletIndex: 0,
|
5245 |
-
},
|
5246 |
-
});
|
5247 |
-
},
|
5248 |
-
on: {
|
5249 |
-
init: function init() {
|
5250 |
-
var swiper = this;
|
5251 |
-
swiper.pagination.init();
|
5252 |
-
swiper.pagination.render();
|
5253 |
-
swiper.pagination.update();
|
5254 |
-
},
|
5255 |
-
activeIndexChange: function activeIndexChange() {
|
5256 |
-
var swiper = this;
|
5257 |
-
if (swiper.params.loop) {
|
5258 |
-
swiper.pagination.update();
|
5259 |
-
} else if (typeof swiper.snapIndex === 'undefined') {
|
5260 |
-
swiper.pagination.update();
|
5261 |
-
}
|
5262 |
-
},
|
5263 |
-
snapIndexChange: function snapIndexChange() {
|
5264 |
-
var swiper = this;
|
5265 |
-
if (!swiper.params.loop) {
|
5266 |
-
swiper.pagination.update();
|
5267 |
-
}
|
5268 |
-
},
|
5269 |
-
slidesLengthChange: function slidesLengthChange() {
|
5270 |
-
var swiper = this;
|
5271 |
-
if (swiper.params.loop) {
|
5272 |
-
swiper.pagination.render();
|
5273 |
-
swiper.pagination.update();
|
5274 |
-
}
|
5275 |
-
},
|
5276 |
-
snapGridLengthChange: function snapGridLengthChange() {
|
5277 |
-
var swiper = this;
|
5278 |
-
if (!swiper.params.loop) {
|
5279 |
-
swiper.pagination.render();
|
5280 |
-
swiper.pagination.update();
|
5281 |
-
}
|
5282 |
-
},
|
5283 |
-
destroy: function destroy() {
|
5284 |
-
var swiper = this;
|
5285 |
-
swiper.pagination.destroy();
|
5286 |
-
},
|
5287 |
-
click: function click(e) {
|
5288 |
-
var swiper = this;
|
5289 |
-
if (
|
5290 |
-
swiper.params.pagination.el
|
5291 |
-
&& swiper.params.pagination.hideOnClick
|
5292 |
-
&& swiper.pagination.$el.length > 0
|
5293 |
-
&& !$(e.target).hasClass(swiper.params.pagination.bulletClass)
|
5294 |
-
) {
|
5295 |
-
swiper.pagination.$el.toggleClass(swiper.params.pagination.hiddenClass);
|
5296 |
-
}
|
5297 |
-
},
|
5298 |
-
},
|
5299 |
-
};
|
5300 |
-
|
5301 |
-
var Scrollbar = {
|
5302 |
-
setTranslate: function setTranslate() {
|
5303 |
-
var swiper = this;
|
5304 |
-
if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) { return; }
|
5305 |
-
var scrollbar = swiper.scrollbar;
|
5306 |
-
var rtl = swiper.rtlTranslate;
|
5307 |
-
var progress = swiper.progress;
|
5308 |
-
var dragSize = scrollbar.dragSize;
|
5309 |
-
var trackSize = scrollbar.trackSize;
|
5310 |
-
var $dragEl = scrollbar.$dragEl;
|
5311 |
-
var $el = scrollbar.$el;
|
5312 |
-
var params = swiper.params.scrollbar;
|
5313 |
-
|
5314 |
-
var newSize = dragSize;
|
5315 |
-
var newPos = (trackSize - dragSize) * progress;
|
5316 |
-
if (rtl) {
|
5317 |
-
newPos = -newPos;
|
5318 |
-
if (newPos > 0) {
|
5319 |
-
newSize = dragSize - newPos;
|
5320 |
-
newPos = 0;
|
5321 |
-
} else if (-newPos + dragSize > trackSize) {
|
5322 |
-
newSize = trackSize + newPos;
|
5323 |
-
}
|
5324 |
-
} else if (newPos < 0) {
|
5325 |
-
newSize = dragSize + newPos;
|
5326 |
-
newPos = 0;
|
5327 |
-
} else if (newPos + dragSize > trackSize) {
|
5328 |
-
newSize = trackSize - newPos;
|
5329 |
-
}
|
5330 |
-
if (swiper.isHorizontal()) {
|
5331 |
-
if (Support.transforms3d) {
|
5332 |
-
$dragEl.transform(("translate3d(" + newPos + "px, 0, 0)"));
|
5333 |
-
} else {
|
5334 |
-
$dragEl.transform(("translateX(" + newPos + "px)"));
|
5335 |
-
}
|
5336 |
-
$dragEl[0].style.width = newSize + "px";
|
5337 |
-
} else {
|
5338 |
-
if (Support.transforms3d) {
|
5339 |
-
$dragEl.transform(("translate3d(0px, " + newPos + "px, 0)"));
|
5340 |
-
} else {
|
5341 |
-
$dragEl.transform(("translateY(" + newPos + "px)"));
|
5342 |
-
}
|
5343 |
-
$dragEl[0].style.height = newSize + "px";
|
5344 |
-
}
|
5345 |
-
if (params.hide) {
|
5346 |
-
clearTimeout(swiper.scrollbar.timeout);
|
5347 |
-
$el[0].style.opacity = 1;
|
5348 |
-
swiper.scrollbar.timeout = setTimeout(function () {
|
5349 |
-
$el[0].style.opacity = 0;
|
5350 |
-
$el.transition(400);
|
5351 |
-
}, 1000);
|
5352 |
-
}
|
5353 |
-
},
|
5354 |
-
setTransition: function setTransition(duration) {
|
5355 |
-
var swiper = this;
|
5356 |
-
if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) { return; }
|
5357 |
-
swiper.scrollbar.$dragEl.transition(duration);
|
5358 |
-
},
|
5359 |
-
updateSize: function updateSize() {
|
5360 |
-
var swiper = this;
|
5361 |
-
if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) { return; }
|
5362 |
-
|
5363 |
-
var scrollbar = swiper.scrollbar;
|
5364 |
-
var $dragEl = scrollbar.$dragEl;
|
5365 |
-
var $el = scrollbar.$el;
|
5366 |
-
|
5367 |
-
$dragEl[0].style.width = '';
|
5368 |
-
$dragEl[0].style.height = '';
|
5369 |
-
var trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight;
|
5370 |
-
|
5371 |
-
var divider = swiper.size / swiper.virtualSize;
|
5372 |
-
var moveDivider = divider * (trackSize / swiper.size);
|
5373 |
-
var dragSize;
|
5374 |
-
if (swiper.params.scrollbar.dragSize === 'auto') {
|
5375 |
-
dragSize = trackSize * divider;
|
5376 |
-
} else {
|
5377 |
-
dragSize = parseInt(swiper.params.scrollbar.dragSize, 10);
|
5378 |
-
}
|
5379 |
-
|
5380 |
-
if (swiper.isHorizontal()) {
|
5381 |
-
$dragEl[0].style.width = dragSize + "px";
|
5382 |
-
} else {
|
5383 |
-
$dragEl[0].style.height = dragSize + "px";
|
5384 |
-
}
|
5385 |
-
|
5386 |
-
if (divider >= 1) {
|
5387 |
-
$el[0].style.display = 'none';
|
5388 |
-
} else {
|
5389 |
-
$el[0].style.display = '';
|
5390 |
-
}
|
5391 |
-
if (swiper.params.scrollbarHide) {
|
5392 |
-
$el[0].style.opacity = 0;
|
5393 |
-
}
|
5394 |
-
Utils.extend(scrollbar, {
|
5395 |
-
trackSize: trackSize,
|
5396 |
-
divider: divider,
|
5397 |
-
moveDivider: moveDivider,
|
5398 |
-
dragSize: dragSize,
|
5399 |
-
});
|
5400 |
-
scrollbar.$el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass);
|
5401 |
-
},
|
5402 |
-
setDragPosition: function setDragPosition(e) {
|
5403 |
-
var swiper = this;
|
5404 |
-
var scrollbar = swiper.scrollbar;
|
5405 |
-
var rtl = swiper.rtlTranslate;
|
5406 |
-
var $el = scrollbar.$el;
|
5407 |
-
var dragSize = scrollbar.dragSize;
|
5408 |
-
var trackSize = scrollbar.trackSize;
|
5409 |
-
|
5410 |
-
var pointerPosition;
|
5411 |
-
if (swiper.isHorizontal()) {
|
5412 |
-
pointerPosition = ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX);
|
5413 |
-
} else {
|
5414 |
-
pointerPosition = ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY);
|
5415 |
-
}
|
5416 |
-
var positionRatio;
|
5417 |
-
positionRatio = ((pointerPosition) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] - (dragSize / 2)) / (trackSize - dragSize);
|
5418 |
-
positionRatio = Math.max(Math.min(positionRatio, 1), 0);
|
5419 |
-
if (rtl) {
|
5420 |
-
positionRatio = 1 - positionRatio;
|
5421 |
-
}
|
5422 |
-
|
5423 |
-
var position = swiper.minTranslate() + ((swiper.maxTranslate() - swiper.minTranslate()) * positionRatio);
|
5424 |
-
|
5425 |
-
swiper.updateProgress(position);
|
5426 |
-
swiper.setTranslate(position);
|
5427 |
-
swiper.updateActiveIndex();
|
5428 |
-
swiper.updateSlidesClasses();
|
5429 |
-
},
|
5430 |
-
onDragStart: function onDragStart(e) {
|
5431 |
-
var swiper = this;
|
5432 |
-
var params = swiper.params.scrollbar;
|
5433 |
-
var scrollbar = swiper.scrollbar;
|
5434 |
-
var $wrapperEl = swiper.$wrapperEl;
|
5435 |
-
var $el = scrollbar.$el;
|
5436 |
-
var $dragEl = scrollbar.$dragEl;
|
5437 |
-
swiper.scrollbar.isTouched = true;
|
5438 |
-
e.preventDefault();
|
5439 |
-
e.stopPropagation();
|
5440 |
-
|
5441 |
-
$wrapperEl.transition(100);
|
5442 |
-
$dragEl.transition(100);
|
5443 |
-
scrollbar.setDragPosition(e);
|
5444 |
-
|
5445 |
-
clearTimeout(swiper.scrollbar.dragTimeout);
|
5446 |
-
|
5447 |
-
$el.transition(0);
|
5448 |
-
if (params.hide) {
|
5449 |
-
$el.css('opacity', 1);
|
5450 |
-
}
|
5451 |
-
swiper.emit('scrollbarDragStart', e);
|
5452 |
-
},
|
5453 |
-
onDragMove: function onDragMove(e) {
|
5454 |
-
var swiper = this;
|
5455 |
-
var scrollbar = swiper.scrollbar;
|
5456 |
-
var $wrapperEl = swiper.$wrapperEl;
|
5457 |
-
var $el = scrollbar.$el;
|
5458 |
-
var $dragEl = scrollbar.$dragEl;
|
5459 |
-
|
5460 |
-
if (!swiper.scrollbar.isTouched) { return; }
|
5461 |
-
if (e.preventDefault) { e.preventDefault(); }
|
5462 |
-
else { e.returnValue = false; }
|
5463 |
-
scrollbar.setDragPosition(e);
|
5464 |
-
$wrapperEl.transition(0);
|
5465 |
-
$el.transition(0);
|
5466 |
-
$dragEl.transition(0);
|
5467 |
-
swiper.emit('scrollbarDragMove', e);
|
5468 |
-
},
|
5469 |
-
onDragEnd: function onDragEnd(e) {
|
5470 |
-
var swiper = this;
|
5471 |
-
|
5472 |
-
var params = swiper.params.scrollbar;
|
5473 |
-
var scrollbar = swiper.scrollbar;
|
5474 |
-
var $el = scrollbar.$el;
|
5475 |
-
|
5476 |
-
if (!swiper.scrollbar.isTouched) { return; }
|
5477 |
-
swiper.scrollbar.isTouched = false;
|
5478 |
-
if (params.hide) {
|
5479 |
-
clearTimeout(swiper.scrollbar.dragTimeout);
|
5480 |
-
swiper.scrollbar.dragTimeout = Utils.nextTick(function () {
|
5481 |
-
$el.css('opacity', 0);
|
5482 |
-
$el.transition(400);
|
5483 |
-
}, 1000);
|
5484 |
-
}
|
5485 |
-
swiper.emit('scrollbarDragEnd', e);
|
5486 |
-
if (params.snapOnRelease) {
|
5487 |
-
swiper.slideToClosest();
|
5488 |
-
}
|
5489 |
-
},
|
5490 |
-
enableDraggable: function enableDraggable() {
|
5491 |
-
var swiper = this;
|
5492 |
-
if (!swiper.params.scrollbar.el) { return; }
|
5493 |
-
var scrollbar = swiper.scrollbar;
|
5494 |
-
var touchEventsTouch = swiper.touchEventsTouch;
|
5495 |
-
var touchEventsDesktop = swiper.touchEventsDesktop;
|
5496 |
-
var params = swiper.params;
|
5497 |
-
var $el = scrollbar.$el;
|
5498 |
-
var target = $el[0];
|
5499 |
-
var activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false;
|
5500 |
-
var passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
|
5501 |
-
if (!Support.touch) {
|
5502 |
-
target.addEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);
|
5503 |
-
doc.addEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);
|
5504 |
-
doc.addEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);
|
5505 |
-
} else {
|
5506 |
-
target.addEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener);
|
5507 |
-
target.addEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener);
|
5508 |
-
target.addEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener);
|
5509 |
-
}
|
5510 |
-
},
|
5511 |
-
disableDraggable: function disableDraggable() {
|
5512 |
-
var swiper = this;
|
5513 |
-
if (!swiper.params.scrollbar.el) { return; }
|
5514 |
-
var scrollbar = swiper.scrollbar;
|
5515 |
-
var touchEventsTouch = swiper.touchEventsTouch;
|
5516 |
-
var touchEventsDesktop = swiper.touchEventsDesktop;
|
5517 |
-
var params = swiper.params;
|
5518 |
-
var $el = scrollbar.$el;
|
5519 |
-
var target = $el[0];
|
5520 |
-
var activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false;
|
5521 |
-
var passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
|
5522 |
-
if (!Support.touch) {
|
5523 |
-
target.removeEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);
|
5524 |
-
doc.removeEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);
|
5525 |
-
doc.removeEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);
|
5526 |
-
} else {
|
5527 |
-
target.removeEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener);
|
5528 |
-
target.removeEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener);
|
5529 |
-
target.removeEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener);
|
5530 |
-
}
|
5531 |
-
},
|
5532 |
-
init: function init() {
|
5533 |
-
var swiper = this;
|
5534 |
-
if (!swiper.params.scrollbar.el) { return; }
|
5535 |
-
var scrollbar = swiper.scrollbar;
|
5536 |
-
var $swiperEl = swiper.$el;
|
5537 |
-
var params = swiper.params.scrollbar;
|
5538 |
-
|
5539 |
-
var $el = $(params.el);
|
5540 |
-
if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) {
|
5541 |
-
$el = $swiperEl.find(params.el);
|
5542 |
-
}
|
5543 |
-
|
5544 |
-
var $dragEl = $el.find(("." + (swiper.params.scrollbar.dragClass)));
|
5545 |
-
if ($dragEl.length === 0) {
|
5546 |
-
$dragEl = $(("<div class=\"" + (swiper.params.scrollbar.dragClass) + "\"></div>"));
|
5547 |
-
$el.append($dragEl);
|
5548 |
-
}
|
5549 |
-
|
5550 |
-
Utils.extend(scrollbar, {
|
5551 |
-
$el: $el,
|
5552 |
-
el: $el[0],
|
5553 |
-
$dragEl: $dragEl,
|
5554 |
-
dragEl: $dragEl[0],
|
5555 |
-
});
|
5556 |
-
|
5557 |
-
if (params.draggable) {
|
5558 |
-
scrollbar.enableDraggable();
|
5559 |
-
}
|
5560 |
-
},
|
5561 |
-
destroy: function destroy() {
|
5562 |
-
var swiper = this;
|
5563 |
-
swiper.scrollbar.disableDraggable();
|
5564 |
-
},
|
5565 |
-
};
|
5566 |
-
|
5567 |
-
var Scrollbar$1 = {
|
5568 |
-
name: 'scrollbar',
|
5569 |
-
params: {
|
5570 |
-
scrollbar: {
|
5571 |
-
el: null,
|
5572 |
-
dragSize: 'auto',
|
5573 |
-
hide: false,
|
5574 |
-
draggable: false,
|
5575 |
-
snapOnRelease: true,
|
5576 |
-
lockClass: 'swiper-scrollbar-lock',
|
5577 |
-
dragClass: 'swiper-scrollbar-drag',
|
5578 |
-
},
|
5579 |
-
},
|
5580 |
-
create: function create() {
|
5581 |
-
var swiper = this;
|
5582 |
-
Utils.extend(swiper, {
|
5583 |
-
scrollbar: {
|
5584 |
-
init: Scrollbar.init.bind(swiper),
|
5585 |
-
destroy: Scrollbar.destroy.bind(swiper),
|
5586 |
-
updateSize: Scrollbar.updateSize.bind(swiper),
|
5587 |
-
setTranslate: Scrollbar.setTranslate.bind(swiper),
|
5588 |
-
setTransition: Scrollbar.setTransition.bind(swiper),
|
5589 |
-
enableDraggable: Scrollbar.enableDraggable.bind(swiper),
|
5590 |
-
disableDraggable: Scrollbar.disableDraggable.bind(swiper),
|
5591 |
-
setDragPosition: Scrollbar.setDragPosition.bind(swiper),
|
5592 |
-
onDragStart: Scrollbar.onDragStart.bind(swiper),
|
5593 |
-
onDragMove: Scrollbar.onDragMove.bind(swiper),
|
5594 |
-
onDragEnd: Scrollbar.onDragEnd.bind(swiper),
|
5595 |
-
isTouched: false,
|
5596 |
-
timeout: null,
|
5597 |
-
dragTimeout: null,
|
5598 |
-
},
|
5599 |
-
});
|
5600 |
-
},
|
5601 |
-
on: {
|
5602 |
-
init: function init() {
|
5603 |
-
var swiper = this;
|
5604 |
-
swiper.scrollbar.init();
|
5605 |
-
swiper.scrollbar.updateSize();
|
5606 |
-
swiper.scrollbar.setTranslate();
|
5607 |
-
},
|
5608 |
-
update: function update() {
|
5609 |
-
var swiper = this;
|
5610 |
-
swiper.scrollbar.updateSize();
|
5611 |
-
},
|
5612 |
-
resize: function resize() {
|
5613 |
-
var swiper = this;
|
5614 |
-
swiper.scrollbar.updateSize();
|
5615 |
-
},
|
5616 |
-
observerUpdate: function observerUpdate() {
|
5617 |
-
var swiper = this;
|
5618 |
-
swiper.scrollbar.updateSize();
|
5619 |
-
},
|
5620 |
-
setTranslate: function setTranslate() {
|
5621 |
-
var swiper = this;
|
5622 |
-
swiper.scrollbar.setTranslate();
|
5623 |
-
},
|
5624 |
-
setTransition: function setTransition(duration) {
|
5625 |
-
var swiper = this;
|
5626 |
-
swiper.scrollbar.setTransition(duration);
|
5627 |
-
},
|
5628 |
-
destroy: function destroy() {
|
5629 |
-
var swiper = this;
|
5630 |
-
swiper.scrollbar.destroy();
|
5631 |
-
},
|
5632 |
-
},
|
5633 |
-
};
|
5634 |
-
|
5635 |
-
var Parallax = {
|
5636 |
-
setTransform: function setTransform(el, progress) {
|
5637 |
-
var swiper = this;
|
5638 |
-
var rtl = swiper.rtl;
|
5639 |
-
|
5640 |
-
var $el = $(el);
|
5641 |
-
var rtlFactor = rtl ? -1 : 1;
|
5642 |
-
|
5643 |
-
var p = $el.attr('data-swiper-parallax') || '0';
|
5644 |
-
var x = $el.attr('data-swiper-parallax-x');
|
5645 |
-
var y = $el.attr('data-swiper-parallax-y');
|
5646 |
-
var scale = $el.attr('data-swiper-parallax-scale');
|
5647 |
-
var opacity = $el.attr('data-swiper-parallax-opacity');
|
5648 |
-
|
5649 |
-
if (x || y) {
|
5650 |
-
x = x || '0';
|
5651 |
-
y = y || '0';
|
5652 |
-
} else if (swiper.isHorizontal()) {
|
5653 |
-
x = p;
|
5654 |
-
y = '0';
|
5655 |
-
} else {
|
5656 |
-
y = p;
|
5657 |
-
x = '0';
|
5658 |
-
}
|
5659 |
-
|
5660 |
-
if ((x).indexOf('%') >= 0) {
|
5661 |
-
x = (parseInt(x, 10) * progress * rtlFactor) + "%";
|
5662 |
-
} else {
|
5663 |
-
x = (x * progress * rtlFactor) + "px";
|
5664 |
-
}
|
5665 |
-
if ((y).indexOf('%') >= 0) {
|
5666 |
-
y = (parseInt(y, 10) * progress) + "%";
|
5667 |
-
} else {
|
5668 |
-
y = (y * progress) + "px";
|
5669 |
-
}
|
5670 |
-
|
5671 |
-
if (typeof opacity !== 'undefined' && opacity !== null) {
|
5672 |
-
var currentOpacity = opacity - ((opacity - 1) * (1 - Math.abs(progress)));
|
5673 |
-
$el[0].style.opacity = currentOpacity;
|
5674 |
-
}
|
5675 |
-
if (typeof scale === 'undefined' || scale === null) {
|
5676 |
-
$el.transform(("translate3d(" + x + ", " + y + ", 0px)"));
|
5677 |
-
} else {
|
5678 |
-
var currentScale = scale - ((scale - 1) * (1 - Math.abs(progress)));
|
5679 |
-
$el.transform(("translate3d(" + x + ", " + y + ", 0px) scale(" + currentScale + ")"));
|
5680 |
-
}
|
5681 |
-
},
|
5682 |
-
setTranslate: function setTranslate() {
|
5683 |
-
var swiper = this;
|
5684 |
-
var $el = swiper.$el;
|
5685 |
-
var slides = swiper.slides;
|
5686 |
-
var progress = swiper.progress;
|
5687 |
-
var snapGrid = swiper.snapGrid;
|
5688 |
-
$el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
|
5689 |
-
.each(function (index, el) {
|
5690 |
-
swiper.parallax.setTransform(el, progress);
|
5691 |
-
});
|
5692 |
-
slides.each(function (slideIndex, slideEl) {
|
5693 |
-
var slideProgress = slideEl.progress;
|
5694 |
-
if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') {
|
5695 |
-
slideProgress += Math.ceil(slideIndex / 2) - (progress * (snapGrid.length - 1));
|
5696 |
-
}
|
5697 |
-
slideProgress = Math.min(Math.max(slideProgress, -1), 1);
|
5698 |
-
$(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
|
5699 |
-
.each(function (index, el) {
|
5700 |
-
swiper.parallax.setTransform(el, slideProgress);
|
5701 |
-
});
|
5702 |
-
});
|
5703 |
-
},
|
5704 |
-
setTransition: function setTransition(duration) {
|
5705 |
-
if ( duration === void 0 ) duration = this.params.speed;
|
5706 |
-
|
5707 |
-
var swiper = this;
|
5708 |
-
var $el = swiper.$el;
|
5709 |
-
$el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
|
5710 |
-
.each(function (index, parallaxEl) {
|
5711 |
-
var $parallaxEl = $(parallaxEl);
|
5712 |
-
var parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration;
|
5713 |
-
if (duration === 0) { parallaxDuration = 0; }
|
5714 |
-
$parallaxEl.transition(parallaxDuration);
|
5715 |
-
});
|
5716 |
-
},
|
5717 |
-
};
|
5718 |
-
|
5719 |
-
var Parallax$1 = {
|
5720 |
-
name: 'parallax',
|
5721 |
-
params: {
|
5722 |
-
parallax: {
|
5723 |
-
enabled: false,
|
5724 |
-
},
|
5725 |
-
},
|
5726 |
-
create: function create() {
|
5727 |
-
var swiper = this;
|
5728 |
-
Utils.extend(swiper, {
|
5729 |
-
parallax: {
|
5730 |
-
setTransform: Parallax.setTransform.bind(swiper),
|
5731 |
-
setTranslate: Parallax.setTranslate.bind(swiper),
|
5732 |
-
setTransition: Parallax.setTransition.bind(swiper),
|
5733 |
-
},
|
5734 |
-
});
|
5735 |
-
},
|
5736 |
-
on: {
|
5737 |
-
beforeInit: function beforeInit() {
|
5738 |
-
var swiper = this;
|
5739 |
-
if (!swiper.params.parallax.enabled) { return; }
|
5740 |
-
swiper.params.watchSlidesProgress = true;
|
5741 |
-
swiper.originalParams.watchSlidesProgress = true;
|
5742 |
-
},
|
5743 |
-
init: function init() {
|
5744 |
-
var swiper = this;
|
5745 |
-
if (!swiper.params.parallax) { return; }
|
5746 |
-
swiper.parallax.setTranslate();
|
5747 |
-
},
|
5748 |
-
setTranslate: function setTranslate() {
|
5749 |
-
var swiper = this;
|
5750 |
-
if (!swiper.params.parallax) { return; }
|
5751 |
-
swiper.parallax.setTranslate();
|
5752 |
-
},
|
5753 |
-
setTransition: function setTransition(duration) {
|
5754 |
-
var swiper = this;
|
5755 |
-
if (!swiper.params.parallax) { return; }
|
5756 |
-
swiper.parallax.setTransition(duration);
|
5757 |
-
},
|
5758 |
-
},
|
5759 |
-
};
|
5760 |
-
|
5761 |
-
var Zoom = {
|
5762 |
-
// Calc Scale From Multi-touches
|
5763 |
-
getDistanceBetweenTouches: function getDistanceBetweenTouches(e) {
|
5764 |
-
if (e.targetTouches.length < 2) { return 1; }
|
5765 |
-
var x1 = e.targetTouches[0].pageX;
|
5766 |
-
var y1 = e.targetTouches[0].pageY;
|
5767 |
-
var x2 = e.targetTouches[1].pageX;
|
5768 |
-
var y2 = e.targetTouches[1].pageY;
|
5769 |
-
var distance = Math.sqrt((Math.pow( (x2 - x1), 2 )) + (Math.pow( (y2 - y1), 2 )));
|
5770 |
-
return distance;
|
5771 |
-
},
|
5772 |
-
// Events
|
5773 |
-
onGestureStart: function onGestureStart(e) {
|
5774 |
-
var swiper = this;
|
5775 |
-
var params = swiper.params.zoom;
|
5776 |
-
var zoom = swiper.zoom;
|
5777 |
-
var gesture = zoom.gesture;
|
5778 |
-
zoom.fakeGestureTouched = false;
|
5779 |
-
zoom.fakeGestureMoved = false;
|
5780 |
-
if (!Support.gestures) {
|
5781 |
-
if (e.type !== 'touchstart' || (e.type === 'touchstart' && e.targetTouches.length < 2)) {
|
5782 |
-
return;
|
5783 |
-
}
|
5784 |
-
zoom.fakeGestureTouched = true;
|
5785 |
-
gesture.scaleStart = Zoom.getDistanceBetweenTouches(e);
|
5786 |
-
}
|
5787 |
-
if (!gesture.$slideEl || !gesture.$slideEl.length) {
|
5788 |
-
gesture.$slideEl = $(e.target).closest('.swiper-slide');
|
5789 |
-
if (gesture.$slideEl.length === 0) { gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); }
|
5790 |
-
gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
|
5791 |
-
gesture.$imageWrapEl = gesture.$imageEl.parent(("." + (params.containerClass)));
|
5792 |
-
gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
|
5793 |
-
if (gesture.$imageWrapEl.length === 0) {
|
5794 |
-
gesture.$imageEl = undefined;
|
5795 |
-
return;
|
5796 |
-
}
|
5797 |
-
}
|
5798 |
-
gesture.$imageEl.transition(0);
|
5799 |
-
swiper.zoom.isScaling = true;
|
5800 |
-
},
|
5801 |
-
onGestureChange: function onGestureChange(e) {
|
5802 |
-
var swiper = this;
|
5803 |
-
var params = swiper.params.zoom;
|
5804 |
-
var zoom = swiper.zoom;
|
5805 |
-
var gesture = zoom.gesture;
|
5806 |
-
if (!Support.gestures) {
|
5807 |
-
if (e.type !== 'touchmove' || (e.type === 'touchmove' && e.targetTouches.length < 2)) {
|
5808 |
-
return;
|
5809 |
-
}
|
5810 |
-
zoom.fakeGestureMoved = true;
|
5811 |
-
gesture.scaleMove = Zoom.getDistanceBetweenTouches(e);
|
5812 |
-
}
|
5813 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
|
5814 |
-
if (Support.gestures) {
|
5815 |
-
zoom.scale = e.scale * zoom.currentScale;
|
5816 |
-
} else {
|
5817 |
-
zoom.scale = (gesture.scaleMove / gesture.scaleStart) * zoom.currentScale;
|
5818 |
-
}
|
5819 |
-
if (zoom.scale > gesture.maxRatio) {
|
5820 |
-
zoom.scale = (gesture.maxRatio - 1) + (Math.pow( ((zoom.scale - gesture.maxRatio) + 1), 0.5 ));
|
5821 |
-
}
|
5822 |
-
if (zoom.scale < params.minRatio) {
|
5823 |
-
zoom.scale = (params.minRatio + 1) - (Math.pow( ((params.minRatio - zoom.scale) + 1), 0.5 ));
|
5824 |
-
}
|
5825 |
-
gesture.$imageEl.transform(("translate3d(0,0,0) scale(" + (zoom.scale) + ")"));
|
5826 |
-
},
|
5827 |
-
onGestureEnd: function onGestureEnd(e) {
|
5828 |
-
var swiper = this;
|
5829 |
-
var params = swiper.params.zoom;
|
5830 |
-
var zoom = swiper.zoom;
|
5831 |
-
var gesture = zoom.gesture;
|
5832 |
-
if (!Support.gestures) {
|
5833 |
-
if (!zoom.fakeGestureTouched || !zoom.fakeGestureMoved) {
|
5834 |
-
return;
|
5835 |
-
}
|
5836 |
-
if (e.type !== 'touchend' || (e.type === 'touchend' && e.changedTouches.length < 2 && !Device.android)) {
|
5837 |
-
return;
|
5838 |
-
}
|
5839 |
-
zoom.fakeGestureTouched = false;
|
5840 |
-
zoom.fakeGestureMoved = false;
|
5841 |
-
}
|
5842 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
|
5843 |
-
zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio);
|
5844 |
-
gesture.$imageEl.transition(swiper.params.speed).transform(("translate3d(0,0,0) scale(" + (zoom.scale) + ")"));
|
5845 |
-
zoom.currentScale = zoom.scale;
|
5846 |
-
zoom.isScaling = false;
|
5847 |
-
if (zoom.scale === 1) { gesture.$slideEl = undefined; }
|
5848 |
-
},
|
5849 |
-
onTouchStart: function onTouchStart(e) {
|
5850 |
-
var swiper = this;
|
5851 |
-
var zoom = swiper.zoom;
|
5852 |
-
var gesture = zoom.gesture;
|
5853 |
-
var image = zoom.image;
|
5854 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
|
5855 |
-
if (image.isTouched) { return; }
|
5856 |
-
if (Device.android) { e.preventDefault(); }
|
5857 |
-
image.isTouched = true;
|
5858 |
-
image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
|
5859 |
-
image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
|
5860 |
-
},
|
5861 |
-
onTouchMove: function onTouchMove(e) {
|
5862 |
-
var swiper = this;
|
5863 |
-
var zoom = swiper.zoom;
|
5864 |
-
var gesture = zoom.gesture;
|
5865 |
-
var image = zoom.image;
|
5866 |
-
var velocity = zoom.velocity;
|
5867 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
|
5868 |
-
swiper.allowClick = false;
|
5869 |
-
if (!image.isTouched || !gesture.$slideEl) { return; }
|
5870 |
-
|
5871 |
-
if (!image.isMoved) {
|
5872 |
-
image.width = gesture.$imageEl[0].offsetWidth;
|
5873 |
-
image.height = gesture.$imageEl[0].offsetHeight;
|
5874 |
-
image.startX = Utils.getTranslate(gesture.$imageWrapEl[0], 'x') || 0;
|
5875 |
-
image.startY = Utils.getTranslate(gesture.$imageWrapEl[0], 'y') || 0;
|
5876 |
-
gesture.slideWidth = gesture.$slideEl[0].offsetWidth;
|
5877 |
-
gesture.slideHeight = gesture.$slideEl[0].offsetHeight;
|
5878 |
-
gesture.$imageWrapEl.transition(0);
|
5879 |
-
if (swiper.rtl) {
|
5880 |
-
image.startX = -image.startX;
|
5881 |
-
image.startY = -image.startY;
|
5882 |
-
}
|
5883 |
-
}
|
5884 |
-
// Define if we need image drag
|
5885 |
-
var scaledWidth = image.width * zoom.scale;
|
5886 |
-
var scaledHeight = image.height * zoom.scale;
|
5887 |
-
|
5888 |
-
if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) { return; }
|
5889 |
-
|
5890 |
-
image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);
|
5891 |
-
image.maxX = -image.minX;
|
5892 |
-
image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);
|
5893 |
-
image.maxY = -image.minY;
|
5894 |
-
|
5895 |
-
image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
|
5896 |
-
image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
|
5897 |
-
|
5898 |
-
if (!image.isMoved && !zoom.isScaling) {
|
5899 |
-
if (
|
5900 |
-
swiper.isHorizontal()
|
5901 |
-
&& (
|
5902 |
-
(Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x)
|
5903 |
-
|| (Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)
|
5904 |
-
)
|
5905 |
-
) {
|
5906 |
-
image.isTouched = false;
|
5907 |
-
return;
|
5908 |
-
} if (
|
5909 |
-
!swiper.isHorizontal()
|
5910 |
-
&& (
|
5911 |
-
(Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y)
|
5912 |
-
|| (Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)
|
5913 |
-
)
|
5914 |
-
) {
|
5915 |
-
image.isTouched = false;
|
5916 |
-
return;
|
5917 |
-
}
|
5918 |
-
}
|
5919 |
-
e.preventDefault();
|
5920 |
-
e.stopPropagation();
|
5921 |
-
|
5922 |
-
image.isMoved = true;
|
5923 |
-
image.currentX = (image.touchesCurrent.x - image.touchesStart.x) + image.startX;
|
5924 |
-
image.currentY = (image.touchesCurrent.y - image.touchesStart.y) + image.startY;
|
5925 |
-
|
5926 |
-
if (image.currentX < image.minX) {
|
5927 |
-
image.currentX = (image.minX + 1) - (Math.pow( ((image.minX - image.currentX) + 1), 0.8 ));
|
5928 |
-
}
|
5929 |
-
if (image.currentX > image.maxX) {
|
5930 |
-
image.currentX = (image.maxX - 1) + (Math.pow( ((image.currentX - image.maxX) + 1), 0.8 ));
|
5931 |
-
}
|
5932 |
-
|
5933 |
-
if (image.currentY < image.minY) {
|
5934 |
-
image.currentY = (image.minY + 1) - (Math.pow( ((image.minY - image.currentY) + 1), 0.8 ));
|
5935 |
-
}
|
5936 |
-
if (image.currentY > image.maxY) {
|
5937 |
-
image.currentY = (image.maxY - 1) + (Math.pow( ((image.currentY - image.maxY) + 1), 0.8 ));
|
5938 |
-
}
|
5939 |
-
|
5940 |
-
// Velocity
|
5941 |
-
if (!velocity.prevPositionX) { velocity.prevPositionX = image.touchesCurrent.x; }
|
5942 |
-
if (!velocity.prevPositionY) { velocity.prevPositionY = image.touchesCurrent.y; }
|
5943 |
-
if (!velocity.prevTime) { velocity.prevTime = Date.now(); }
|
5944 |
-
velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2;
|
5945 |
-
velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2;
|
5946 |
-
if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) { velocity.x = 0; }
|
5947 |
-
if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) { velocity.y = 0; }
|
5948 |
-
velocity.prevPositionX = image.touchesCurrent.x;
|
5949 |
-
velocity.prevPositionY = image.touchesCurrent.y;
|
5950 |
-
velocity.prevTime = Date.now();
|
5951 |
-
|
5952 |
-
gesture.$imageWrapEl.transform(("translate3d(" + (image.currentX) + "px, " + (image.currentY) + "px,0)"));
|
5953 |
-
},
|
5954 |
-
onTouchEnd: function onTouchEnd() {
|
5955 |
-
var swiper = this;
|
5956 |
-
var zoom = swiper.zoom;
|
5957 |
-
var gesture = zoom.gesture;
|
5958 |
-
var image = zoom.image;
|
5959 |
-
var velocity = zoom.velocity;
|
5960 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
|
5961 |
-
if (!image.isTouched || !image.isMoved) {
|
5962 |
-
image.isTouched = false;
|
5963 |
-
image.isMoved = false;
|
5964 |
-
return;
|
5965 |
-
}
|
5966 |
-
image.isTouched = false;
|
5967 |
-
image.isMoved = false;
|
5968 |
-
var momentumDurationX = 300;
|
5969 |
-
var momentumDurationY = 300;
|
5970 |
-
var momentumDistanceX = velocity.x * momentumDurationX;
|
5971 |
-
var newPositionX = image.currentX + momentumDistanceX;
|
5972 |
-
var momentumDistanceY = velocity.y * momentumDurationY;
|
5973 |
-
var newPositionY = image.currentY + momentumDistanceY;
|
5974 |
-
|
5975 |
-
// Fix duration
|
5976 |
-
if (velocity.x !== 0) { momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x); }
|
5977 |
-
if (velocity.y !== 0) { momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y); }
|
5978 |
-
var momentumDuration = Math.max(momentumDurationX, momentumDurationY);
|
5979 |
-
|
5980 |
-
image.currentX = newPositionX;
|
5981 |
-
image.currentY = newPositionY;
|
5982 |
-
|
5983 |
-
// Define if we need image drag
|
5984 |
-
var scaledWidth = image.width * zoom.scale;
|
5985 |
-
var scaledHeight = image.height * zoom.scale;
|
5986 |
-
image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);
|
5987 |
-
image.maxX = -image.minX;
|
5988 |
-
image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);
|
5989 |
-
image.maxY = -image.minY;
|
5990 |
-
image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX);
|
5991 |
-
image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY);
|
5992 |
-
|
5993 |
-
gesture.$imageWrapEl.transition(momentumDuration).transform(("translate3d(" + (image.currentX) + "px, " + (image.currentY) + "px,0)"));
|
5994 |
-
},
|
5995 |
-
onTransitionEnd: function onTransitionEnd() {
|
5996 |
-
var swiper = this;
|
5997 |
-
var zoom = swiper.zoom;
|
5998 |
-
var gesture = zoom.gesture;
|
5999 |
-
if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) {
|
6000 |
-
gesture.$imageEl.transform('translate3d(0,0,0) scale(1)');
|
6001 |
-
gesture.$imageWrapEl.transform('translate3d(0,0,0)');
|
6002 |
-
|
6003 |
-
zoom.scale = 1;
|
6004 |
-
zoom.currentScale = 1;
|
6005 |
-
|
6006 |
-
gesture.$slideEl = undefined;
|
6007 |
-
gesture.$imageEl = undefined;
|
6008 |
-
gesture.$imageWrapEl = undefined;
|
6009 |
-
}
|
6010 |
-
},
|
6011 |
-
// Toggle Zoom
|
6012 |
-
toggle: function toggle(e) {
|
6013 |
-
var swiper = this;
|
6014 |
-
var zoom = swiper.zoom;
|
6015 |
-
|
6016 |
-
if (zoom.scale && zoom.scale !== 1) {
|
6017 |
-
// Zoom Out
|
6018 |
-
zoom.out();
|
6019 |
-
} else {
|
6020 |
-
// Zoom In
|
6021 |
-
zoom.in(e);
|
6022 |
-
}
|
6023 |
-
},
|
6024 |
-
in: function in$1(e) {
|
6025 |
-
var swiper = this;
|
6026 |
-
|
6027 |
-
var zoom = swiper.zoom;
|
6028 |
-
var params = swiper.params.zoom;
|
6029 |
-
var gesture = zoom.gesture;
|
6030 |
-
var image = zoom.image;
|
6031 |
-
|
6032 |
-
if (!gesture.$slideEl) {
|
6033 |
-
gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex);
|
6034 |
-
gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
|
6035 |
-
gesture.$imageWrapEl = gesture.$imageEl.parent(("." + (params.containerClass)));
|
6036 |
-
}
|
6037 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
|
6038 |
-
|
6039 |
-
gesture.$slideEl.addClass(("" + (params.zoomedSlideClass)));
|
6040 |
-
|
6041 |
-
var touchX;
|
6042 |
-
var touchY;
|
6043 |
-
var offsetX;
|
6044 |
-
var offsetY;
|
6045 |
-
var diffX;
|
6046 |
-
var diffY;
|
6047 |
-
var translateX;
|
6048 |
-
var translateY;
|
6049 |
-
var imageWidth;
|
6050 |
-
var imageHeight;
|
6051 |
-
var scaledWidth;
|
6052 |
-
var scaledHeight;
|
6053 |
-
var translateMinX;
|
6054 |
-
var translateMinY;
|
6055 |
-
var translateMaxX;
|
6056 |
-
var translateMaxY;
|
6057 |
-
var slideWidth;
|
6058 |
-
var slideHeight;
|
6059 |
-
|
6060 |
-
if (typeof image.touchesStart.x === 'undefined' && e) {
|
6061 |
-
touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;
|
6062 |
-
touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;
|
6063 |
-
} else {
|
6064 |
-
touchX = image.touchesStart.x;
|
6065 |
-
touchY = image.touchesStart.y;
|
6066 |
-
}
|
6067 |
-
|
6068 |
-
zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
|
6069 |
-
zoom.currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
|
6070 |
-
if (e) {
|
6071 |
-
slideWidth = gesture.$slideEl[0].offsetWidth;
|
6072 |
-
slideHeight = gesture.$slideEl[0].offsetHeight;
|
6073 |
-
offsetX = gesture.$slideEl.offset().left;
|
6074 |
-
offsetY = gesture.$slideEl.offset().top;
|
6075 |
-
diffX = (offsetX + (slideWidth / 2)) - touchX;
|
6076 |
-
diffY = (offsetY + (slideHeight / 2)) - touchY;
|
6077 |
-
|
6078 |
-
imageWidth = gesture.$imageEl[0].offsetWidth;
|
6079 |
-
imageHeight = gesture.$imageEl[0].offsetHeight;
|
6080 |
-
scaledWidth = imageWidth * zoom.scale;
|
6081 |
-
scaledHeight = imageHeight * zoom.scale;
|
6082 |
-
|
6083 |
-
translateMinX = Math.min(((slideWidth / 2) - (scaledWidth / 2)), 0);
|
6084 |
-
translateMinY = Math.min(((slideHeight / 2) - (scaledHeight / 2)), 0);
|
6085 |
-
translateMaxX = -translateMinX;
|
6086 |
-
translateMaxY = -translateMinY;
|
6087 |
-
|
6088 |
-
translateX = diffX * zoom.scale;
|
6089 |
-
translateY = diffY * zoom.scale;
|
6090 |
-
|
6091 |
-
if (translateX < translateMinX) {
|
6092 |
-
translateX = translateMinX;
|
6093 |
-
}
|
6094 |
-
if (translateX > translateMaxX) {
|
6095 |
-
translateX = translateMaxX;
|
6096 |
-
}
|
6097 |
-
|
6098 |
-
if (translateY < translateMinY) {
|
6099 |
-
translateY = translateMinY;
|
6100 |
-
}
|
6101 |
-
if (translateY > translateMaxY) {
|
6102 |
-
translateY = translateMaxY;
|
6103 |
-
}
|
6104 |
-
} else {
|
6105 |
-
translateX = 0;
|
6106 |
-
translateY = 0;
|
6107 |
-
}
|
6108 |
-
gesture.$imageWrapEl.transition(300).transform(("translate3d(" + translateX + "px, " + translateY + "px,0)"));
|
6109 |
-
gesture.$imageEl.transition(300).transform(("translate3d(0,0,0) scale(" + (zoom.scale) + ")"));
|
6110 |
-
},
|
6111 |
-
out: function out() {
|
6112 |
-
var swiper = this;
|
6113 |
-
|
6114 |
-
var zoom = swiper.zoom;
|
6115 |
-
var params = swiper.params.zoom;
|
6116 |
-
var gesture = zoom.gesture;
|
6117 |
-
|
6118 |
-
if (!gesture.$slideEl) {
|
6119 |
-
gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex);
|
6120 |
-
gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
|
6121 |
-
gesture.$imageWrapEl = gesture.$imageEl.parent(("." + (params.containerClass)));
|
6122 |
-
}
|
6123 |
-
if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
|
6124 |
-
|
6125 |
-
zoom.scale = 1;
|
6126 |
-
zoom.currentScale = 1;
|
6127 |
-
gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)');
|
6128 |
-
gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)');
|
6129 |
-
gesture.$slideEl.removeClass(("" + (params.zoomedSlideClass)));
|
6130 |
-
gesture.$slideEl = undefined;
|
6131 |
-
},
|
6132 |
-
// Attach/Detach Events
|
6133 |
-
enable: function enable() {
|
6134 |
-
var swiper = this;
|
6135 |
-
var zoom = swiper.zoom;
|
6136 |
-
if (zoom.enabled) { return; }
|
6137 |
-
zoom.enabled = true;
|
6138 |
-
|
6139 |
-
var passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;
|
6140 |
-
|
6141 |
-
// Scale image
|
6142 |
-
if (Support.gestures) {
|
6143 |
-
swiper.$wrapperEl.on('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener);
|
6144 |
-
swiper.$wrapperEl.on('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener);
|
6145 |
-
swiper.$wrapperEl.on('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener);
|
6146 |
-
} else if (swiper.touchEvents.start === 'touchstart') {
|
6147 |
-
swiper.$wrapperEl.on(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener);
|
6148 |
-
swiper.$wrapperEl.on(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, passiveListener);
|
6149 |
-
swiper.$wrapperEl.on(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener);
|
6150 |
-
}
|
6151 |
-
|
6152 |
-
// Move image
|
6153 |
-
swiper.$wrapperEl.on(swiper.touchEvents.move, ("." + (swiper.params.zoom.containerClass)), zoom.onTouchMove);
|
6154 |
-
},
|
6155 |
-
disable: function disable() {
|
6156 |
-
var swiper = this;
|
6157 |
-
var zoom = swiper.zoom;
|
6158 |
-
if (!zoom.enabled) { return; }
|
6159 |
-
|
6160 |
-
swiper.zoom.enabled = false;
|
6161 |
-
|
6162 |
-
var passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;
|
6163 |
-
|
6164 |
-
// Scale image
|
6165 |
-
if (Support.gestures) {
|
6166 |
-
swiper.$wrapperEl.off('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener);
|
6167 |
-
swiper.$wrapperEl.off('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener);
|
6168 |
-
swiper.$wrapperEl.off('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener);
|
6169 |
-
} else if (swiper.touchEvents.start === 'touchstart') {
|
6170 |
-
swiper.$wrapperEl.off(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener);
|
6171 |
-
swiper.$wrapperEl.off(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, passiveListener);
|
6172 |
-
swiper.$wrapperEl.off(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener);
|
6173 |
-
}
|
6174 |
-
|
6175 |
-
// Move image
|
6176 |
-
swiper.$wrapperEl.off(swiper.touchEvents.move, ("." + (swiper.params.zoom.containerClass)), zoom.onTouchMove);
|
6177 |
-
},
|
6178 |
-
};
|
6179 |
-
|
6180 |
-
var Zoom$1 = {
|
6181 |
-
name: 'zoom',
|
6182 |
-
params: {
|
6183 |
-
zoom: {
|
6184 |
-
enabled: false,
|
6185 |
-
maxRatio: 3,
|
6186 |
-
minRatio: 1,
|
6187 |
-
toggle: true,
|
6188 |
-
containerClass: 'swiper-zoom-container',
|
6189 |
-
zoomedSlideClass: 'swiper-slide-zoomed',
|
6190 |
-
},
|
6191 |
-
},
|
6192 |
-
create: function create() {
|
6193 |
-
var swiper = this;
|
6194 |
-
var zoom = {
|
6195 |
-
enabled: false,
|
6196 |
-
scale: 1,
|
6197 |
-
currentScale: 1,
|
6198 |
-
isScaling: false,
|
6199 |
-
gesture: {
|
6200 |
-
$slideEl: undefined,
|
6201 |
-
slideWidth: undefined,
|
6202 |
-
slideHeight: undefined,
|
6203 |
-
$imageEl: undefined,
|
6204 |
-
$imageWrapEl: undefined,
|
6205 |
-
maxRatio: 3,
|
6206 |
-
},
|
6207 |
-
image: {
|
6208 |
-
isTouched: undefined,
|
6209 |
-
isMoved: undefined,
|
6210 |
-
currentX: undefined,
|
6211 |
-
currentY: undefined,
|
6212 |
-
minX: undefined,
|
6213 |
-
minY: undefined,
|
6214 |
-
maxX: undefined,
|
6215 |
-
maxY: undefined,
|
6216 |
-
width: undefined,
|
6217 |
-
height: undefined,
|
6218 |
-
startX: undefined,
|
6219 |
-
startY: undefined,
|
6220 |
-
touchesStart: {},
|
6221 |
-
touchesCurrent: {},
|
6222 |
-
},
|
6223 |
-
velocity: {
|
6224 |
-
x: undefined,
|
6225 |
-
y: undefined,
|
6226 |
-
prevPositionX: undefined,
|
6227 |
-
prevPositionY: undefined,
|
6228 |
-
prevTime: undefined,
|
6229 |
-
},
|
6230 |
-
};
|
6231 |
-
|
6232 |
-
('onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out').split(' ').forEach(function (methodName) {
|
6233 |
-
zoom[methodName] = Zoom[methodName].bind(swiper);
|
6234 |
-
});
|
6235 |
-
Utils.extend(swiper, {
|
6236 |
-
zoom: zoom,
|
6237 |
-
});
|
6238 |
-
|
6239 |
-
var scale = 1;
|
6240 |
-
Object.defineProperty(swiper.zoom, 'scale', {
|
6241 |
-
get: function get() {
|
6242 |
-
return scale;
|
6243 |
-
},
|
6244 |
-
set: function set(value) {
|
6245 |
-
if (scale !== value) {
|
6246 |
-
var imageEl = swiper.zoom.gesture.$imageEl ? swiper.zoom.gesture.$imageEl[0] : undefined;
|
6247 |
-
var slideEl = swiper.zoom.gesture.$slideEl ? swiper.zoom.gesture.$slideEl[0] : undefined;
|
6248 |
-
swiper.emit('zoomChange', value, imageEl, slideEl);
|
6249 |
-
}
|
6250 |
-
scale = value;
|
6251 |
-
},
|
6252 |
-
});
|
6253 |
-
},
|
6254 |
-
on: {
|
6255 |
-
init: function init() {
|
6256 |
-
var swiper = this;
|
6257 |
-
if (swiper.params.zoom.enabled) {
|
6258 |
-
swiper.zoom.enable();
|
6259 |
-
}
|
6260 |
-
},
|
6261 |
-
destroy: function destroy() {
|
6262 |
-
var swiper = this;
|
6263 |
-
swiper.zoom.disable();
|
6264 |
-
},
|
6265 |
-
touchStart: function touchStart(e) {
|
6266 |
-
var swiper = this;
|
6267 |
-
if (!swiper.zoom.enabled) { return; }
|
6268 |
-
swiper.zoom.onTouchStart(e);
|
6269 |
-
},
|
6270 |
-
touchEnd: function touchEnd(e) {
|
6271 |
-
var swiper = this;
|
6272 |
-
if (!swiper.zoom.enabled) { return; }
|
6273 |
-
swiper.zoom.onTouchEnd(e);
|
6274 |
-
},
|
6275 |
-
doubleTap: function doubleTap(e) {
|
6276 |
-
var swiper = this;
|
6277 |
-
if (swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) {
|
6278 |
-
swiper.zoom.toggle(e);
|
6279 |
-
}
|
6280 |
-
},
|
6281 |
-
transitionEnd: function transitionEnd() {
|
6282 |
-
var swiper = this;
|
6283 |
-
if (swiper.zoom.enabled && swiper.params.zoom.enabled) {
|
6284 |
-
swiper.zoom.onTransitionEnd();
|
6285 |
-
}
|
6286 |
-
},
|
6287 |
-
},
|
6288 |
-
};
|
6289 |
-
|
6290 |
-
var Lazy = {
|
6291 |
-
loadInSlide: function loadInSlide(index, loadInDuplicate) {
|
6292 |
-
if ( loadInDuplicate === void 0 ) loadInDuplicate = true;
|
6293 |
-
|
6294 |
-
var swiper = this;
|
6295 |
-
var params = swiper.params.lazy;
|
6296 |
-
if (typeof index === 'undefined') { return; }
|
6297 |
-
if (swiper.slides.length === 0) { return; }
|
6298 |
-
var isVirtual = swiper.virtual && swiper.params.virtual.enabled;
|
6299 |
-
|
6300 |
-
var $slideEl = isVirtual
|
6301 |
-
? swiper.$wrapperEl.children(("." + (swiper.params.slideClass) + "[data-swiper-slide-index=\"" + index + "\"]"))
|
6302 |
-
: swiper.slides.eq(index);
|
6303 |
-
|
6304 |
-
var $images = $slideEl.find(("." + (params.elementClass) + ":not(." + (params.loadedClass) + "):not(." + (params.loadingClass) + ")"));
|
6305 |
-
if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) {
|
6306 |
-
$images = $images.add($slideEl[0]);
|
6307 |
-
}
|
6308 |
-
if ($images.length === 0) { return; }
|
6309 |
-
|
6310 |
-
$images.each(function (imageIndex, imageEl) {
|
6311 |
-
var $imageEl = $(imageEl);
|
6312 |
-
$imageEl.addClass(params.loadingClass);
|
6313 |
-
|
6314 |
-
var background = $imageEl.attr('data-background');
|
6315 |
-
var src = $imageEl.attr('data-src');
|
6316 |
-
var srcset = $imageEl.attr('data-srcset');
|
6317 |
-
var sizes = $imageEl.attr('data-sizes');
|
6318 |
-
|
6319 |
-
swiper.loadImage($imageEl[0], (src || background), srcset, sizes, false, function () {
|
6320 |
-
if (typeof swiper === 'undefined' || swiper === null || !swiper || (swiper && !swiper.params) || swiper.destroyed) { return; }
|
6321 |
-
if (background) {
|
6322 |
-
$imageEl.css('background-image', ("url(\"" + background + "\")"));
|
6323 |
-
$imageEl.removeAttr('data-background');
|
6324 |
-
} else {
|
6325 |
-
if (srcset) {
|
6326 |
-
$imageEl.attr('srcset', srcset);
|
6327 |
-
$imageEl.removeAttr('data-srcset');
|
6328 |
-
}
|
6329 |
-
if (sizes) {
|
6330 |
-
$imageEl.attr('sizes', sizes);
|
6331 |
-
$imageEl.removeAttr('data-sizes');
|
6332 |
-
}
|
6333 |
-
if (src) {
|
6334 |
-
$imageEl.attr('src', src);
|
6335 |
-
$imageEl.removeAttr('data-src');
|
6336 |
-
}
|
6337 |
-
}
|
6338 |
-
|
6339 |
-
$imageEl.addClass(params.loadedClass).removeClass(params.loadingClass);
|
6340 |
-
$slideEl.find(("." + (params.preloaderClass))).remove();
|
6341 |
-
if (swiper.params.loop && loadInDuplicate) {
|
6342 |
-
var slideOriginalIndex = $slideEl.attr('data-swiper-slide-index');
|
6343 |
-
if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) {
|
6344 |
-
var originalSlide = swiper.$wrapperEl.children(("[data-swiper-slide-index=\"" + slideOriginalIndex + "\"]:not(." + (swiper.params.slideDuplicateClass) + ")"));
|
6345 |
-
swiper.lazy.loadInSlide(originalSlide.index(), false);
|
6346 |
-
} else {
|
6347 |
-
var duplicatedSlide = swiper.$wrapperEl.children(("." + (swiper.params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + slideOriginalIndex + "\"]"));
|
6348 |
-
swiper.lazy.loadInSlide(duplicatedSlide.index(), false);
|
6349 |
-
}
|
6350 |
-
}
|
6351 |
-
swiper.emit('lazyImageReady', $slideEl[0], $imageEl[0]);
|
6352 |
-
});
|
6353 |
-
|
6354 |
-
swiper.emit('lazyImageLoad', $slideEl[0], $imageEl[0]);
|
6355 |
-
});
|
6356 |
-
},
|
6357 |
-
load: function load() {
|
6358 |
-
var swiper = this;
|
6359 |
-
var $wrapperEl = swiper.$wrapperEl;
|
6360 |
-
var swiperParams = swiper.params;
|
6361 |
-
var slides = swiper.slides;
|
6362 |
-
var activeIndex = swiper.activeIndex;
|
6363 |
-
var isVirtual = swiper.virtual && swiperParams.virtual.enabled;
|
6364 |
-
var params = swiperParams.lazy;
|
6365 |
-
|
6366 |
-
var slidesPerView = swiperParams.slidesPerView;
|
6367 |
-
if (slidesPerView === 'auto') {
|
6368 |
-
slidesPerView = 0;
|
6369 |
-
}
|
6370 |
-
|
6371 |
-
function slideExist(index) {
|
6372 |
-
if (isVirtual) {
|
6373 |
-
if ($wrapperEl.children(("." + (swiperParams.slideClass) + "[data-swiper-slide-index=\"" + index + "\"]")).length) {
|
6374 |
-
return true;
|
6375 |
-
}
|
6376 |
-
} else if (slides[index]) { return true; }
|
6377 |
-
return false;
|
6378 |
-
}
|
6379 |
-
function slideIndex(slideEl) {
|
6380 |
-
if (isVirtual) {
|
6381 |
-
return $(slideEl).attr('data-swiper-slide-index');
|
6382 |
-
}
|
6383 |
-
return $(slideEl).index();
|
6384 |
-
}
|
6385 |
-
|
6386 |
-
if (!swiper.lazy.initialImageLoaded) { swiper.lazy.initialImageLoaded = true; }
|
6387 |
-
if (swiper.params.watchSlidesVisibility) {
|
6388 |
-
$wrapperEl.children(("." + (swiperParams.slideVisibleClass))).each(function (elIndex, slideEl) {
|
6389 |
-
var index = isVirtual ? $(slideEl).attr('data-swiper-slide-index') : $(slideEl).index();
|
6390 |
-
swiper.lazy.loadInSlide(index);
|
6391 |
-
});
|
6392 |
-
} else if (slidesPerView > 1) {
|
6393 |
-
for (var i = activeIndex; i < activeIndex + slidesPerView; i += 1) {
|
6394 |
-
if (slideExist(i)) { swiper.lazy.loadInSlide(i); }
|
6395 |
-
}
|
6396 |
-
} else {
|
6397 |
-
swiper.lazy.loadInSlide(activeIndex);
|
6398 |
-
}
|
6399 |
-
if (params.loadPrevNext) {
|
6400 |
-
if (slidesPerView > 1 || (params.loadPrevNextAmount && params.loadPrevNextAmount > 1)) {
|
6401 |
-
var amount = params.loadPrevNextAmount;
|
6402 |
-
var spv = slidesPerView;
|
6403 |
-
var maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length);
|
6404 |
-
var minIndex = Math.max(activeIndex - Math.max(spv, amount), 0);
|
6405 |
-
// Next Slides
|
6406 |
-
for (var i$1 = activeIndex + slidesPerView; i$1 < maxIndex; i$1 += 1) {
|
6407 |
-
if (slideExist(i$1)) { swiper.lazy.loadInSlide(i$1); }
|
6408 |
-
}
|
6409 |
-
// Prev Slides
|
6410 |
-
for (var i$2 = minIndex; i$2 < activeIndex; i$2 += 1) {
|
6411 |
-
if (slideExist(i$2)) { swiper.lazy.loadInSlide(i$2); }
|
6412 |
-
}
|
6413 |
-
} else {
|
6414 |
-
var nextSlide = $wrapperEl.children(("." + (swiperParams.slideNextClass)));
|
6415 |
-
if (nextSlide.length > 0) { swiper.lazy.loadInSlide(slideIndex(nextSlide)); }
|
6416 |
-
|
6417 |
-
var prevSlide = $wrapperEl.children(("." + (swiperParams.slidePrevClass)));
|
6418 |
-
if (prevSlide.length > 0) { swiper.lazy.loadInSlide(slideIndex(prevSlide)); }
|
6419 |
-
}
|
6420 |
-
}
|
6421 |
-
},
|
6422 |
-
};
|
6423 |
-
|
6424 |
-
var Lazy$1 = {
|
6425 |
-
name: 'lazy',
|
6426 |
-
params: {
|
6427 |
-
lazy: {
|
6428 |
-
enabled: false,
|
6429 |
-
loadPrevNext: false,
|
6430 |
-
loadPrevNextAmount: 1,
|
6431 |
-
loadOnTransitionStart: false,
|
6432 |
-
|
6433 |
-
elementClass: 'swiper-lazy',
|
6434 |
-
loadingClass: 'swiper-lazy-loading',
|
6435 |
-
loadedClass: 'swiper-lazy-loaded',
|
6436 |
-
preloaderClass: 'swiper-lazy-preloader',
|
6437 |
-
},
|
6438 |
-
},
|
6439 |
-
create: function create() {
|
6440 |
-
var swiper = this;
|
6441 |
-
Utils.extend(swiper, {
|
6442 |
-
lazy: {
|
6443 |
-
initialImageLoaded: false,
|
6444 |
-
load: Lazy.load.bind(swiper),
|
6445 |
-
loadInSlide: Lazy.loadInSlide.bind(swiper),
|
6446 |
-
},
|
6447 |
-
});
|
6448 |
-
},
|
6449 |
-
on: {
|
6450 |
-
beforeInit: function beforeInit() {
|
6451 |
-
var swiper = this;
|
6452 |
-
if (swiper.params.lazy.enabled && swiper.params.preloadImages) {
|
6453 |
-
swiper.params.preloadImages = false;
|
6454 |
-
}
|
6455 |
-
},
|
6456 |
-
init: function init() {
|
6457 |
-
var swiper = this;
|
6458 |
-
if (swiper.params.lazy.enabled && !swiper.params.loop && swiper.params.initialSlide === 0) {
|
6459 |
-
swiper.lazy.load();
|
6460 |
-
}
|
6461 |
-
},
|
6462 |
-
scroll: function scroll() {
|
6463 |
-
var swiper = this;
|
6464 |
-
if (swiper.params.freeMode && !swiper.params.freeModeSticky) {
|
6465 |
-
swiper.lazy.load();
|
6466 |
-
}
|
6467 |
-
},
|
6468 |
-
resize: function resize() {
|
6469 |
-
var swiper = this;
|
6470 |
-
if (swiper.params.lazy.enabled) {
|
6471 |
-
swiper.lazy.load();
|
6472 |
-
}
|
6473 |
-
},
|
6474 |
-
scrollbarDragMove: function scrollbarDragMove() {
|
6475 |
-
var swiper = this;
|
6476 |
-
if (swiper.params.lazy.enabled) {
|
6477 |
-
swiper.lazy.load();
|
6478 |
-
}
|
6479 |
-
},
|
6480 |
-
transitionStart: function transitionStart() {
|
6481 |
-
var swiper = this;
|
6482 |
-
if (swiper.params.lazy.enabled) {
|
6483 |
-
if (swiper.params.lazy.loadOnTransitionStart || (!swiper.params.lazy.loadOnTransitionStart && !swiper.lazy.initialImageLoaded)) {
|
6484 |
-
swiper.lazy.load();
|
6485 |
-
}
|
6486 |
-
}
|
6487 |
-
},
|
6488 |
-
transitionEnd: function transitionEnd() {
|
6489 |
-
var swiper = this;
|
6490 |
-
if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) {
|
6491 |
-
swiper.lazy.load();
|
6492 |
-
}
|
6493 |
-
},
|
6494 |
-
},
|
6495 |
-
};
|
6496 |
-
|
6497 |
-
/* eslint no-bitwise: ["error", { "allow": [">>"] }] */
|
6498 |
-
|
6499 |
-
var Controller = {
|
6500 |
-
LinearSpline: function LinearSpline(x, y) {
|
6501 |
-
var binarySearch = (function search() {
|
6502 |
-
var maxIndex;
|
6503 |
-
var minIndex;
|
6504 |
-
var guess;
|
6505 |
-
return function (array, val) {
|
6506 |
-
minIndex = -1;
|
6507 |
-
maxIndex = array.length;
|
6508 |
-
while (maxIndex - minIndex > 1) {
|
6509 |
-
guess = maxIndex + minIndex >> 1;
|
6510 |
-
if (array[guess] <= val) {
|
6511 |
-
minIndex = guess;
|
6512 |
-
} else {
|
6513 |
-
maxIndex = guess;
|
6514 |
-
}
|
6515 |
-
}
|
6516 |
-
return maxIndex;
|
6517 |
-
};
|
6518 |
-
}());
|
6519 |
-
this.x = x;
|
6520 |
-
this.y = y;
|
6521 |
-
this.lastIndex = x.length - 1;
|
6522 |
-
// Given an x value (x2), return the expected y2 value:
|
6523 |
-
// (x1,y1) is the known point before given value,
|
6524 |
-
// (x3,y3) is the known point after given value.
|
6525 |
-
var i1;
|
6526 |
-
var i3;
|
6527 |
-
|
6528 |
-
this.interpolate = function interpolate(x2) {
|
6529 |
-
if (!x2) { return 0; }
|
6530 |
-
|
6531 |
-
// Get the indexes of x1 and x3 (the array indexes before and after given x2):
|
6532 |
-
i3 = binarySearch(this.x, x2);
|
6533 |
-
i1 = i3 - 1;
|
6534 |
-
|
6535 |
-
// We have our indexes i1 & i3, so we can calculate already:
|
6536 |
-
// y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1
|
6537 |
-
return (((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1])) + this.y[i1];
|
6538 |
-
};
|
6539 |
-
return this;
|
6540 |
-
},
|
6541 |
-
// xxx: for now i will just save one spline function to to
|
6542 |
-
getInterpolateFunction: function getInterpolateFunction(c) {
|
6543 |
-
var swiper = this;
|
6544 |
-
if (!swiper.controller.spline) {
|
6545 |
-
swiper.controller.spline = swiper.params.loop
|
6546 |
-
? new Controller.LinearSpline(swiper.slidesGrid, c.slidesGrid)
|
6547 |
-
: new Controller.LinearSpline(swiper.snapGrid, c.snapGrid);
|
6548 |
-
}
|
6549 |
-
},
|
6550 |
-
setTranslate: function setTranslate(setTranslate$1, byController) {
|
6551 |
-
var swiper = this;
|
6552 |
-
var controlled = swiper.controller.control;
|
6553 |
-
var multiplier;
|
6554 |
-
var controlledTranslate;
|
6555 |
-
function setControlledTranslate(c) {
|
6556 |
-
// this will create an Interpolate function based on the snapGrids
|
6557 |
-
// x is the Grid of the scrolled scroller and y will be the controlled scroller
|
6558 |
-
// it makes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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