commit 83c6b1f635516c3f8fa709fb4db413d05581d85b Author: geun1416 <1416geun@naver.com> Date: Mon May 16 16:49:26 2022 +0900 init diff --git a/html/css/animate.css b/html/css/animate.css new file mode 100644 index 0000000..60f0c96 --- /dev/null +++ b/html/css/animate.css @@ -0,0 +1,2744 @@ +@charset "UTF-8"; + + +/*! +Animate.css - http://daneden.me/animate +Licensed under the MIT license + +Copyright (c) 2013 Daniel Eden + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +.animated { + -webkit-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; +} + +.animated.hinge { + -webkit-animation-duration: 2s; + animation-duration: 2s; +} + +@-webkit-keyframes bounce { + 0%, 20%, 50%, 80%, 100% { + -webkit-transform: translateY(0); + transform: translateY(0); + } + + 40% { + -webkit-transform: translateY(-30px); + transform: translateY(-30px); + } + + 60% { + -webkit-transform: translateY(-15px); + transform: translateY(-15px); + } +} + +@keyframes bounce { + 0%, 20%, 50%, 80%, 100% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } + + 40% { + -webkit-transform: translateY(-30px); + -ms-transform: translateY(-30px); + transform: translateY(-30px); + } + + 60% { + -webkit-transform: translateY(-15px); + -ms-transform: translateY(-15px); + transform: translateY(-15px); + } +} + +.bounce { + -webkit-animation-name: bounce; + animation-name: bounce; +} + +@-webkit-keyframes flash { + 0%, 50%, 100% { + opacity: 1; + } + + 25%, 75% { + opacity: 0; + } +} + +@keyframes flash { + 0%, 50%, 100% { + opacity: 1; + } + + 25%, 75% { + opacity: 0; + } +} + +.flash { + -webkit-animation-name: flash; + animation-name: flash; +} + +/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ + +@-webkit-keyframes pulse { + 0% { + -webkit-transform: scale(1); + transform: scale(1); + } + + 50% { + -webkit-transform: scale(1.1); + transform: scale(1.1); + } + + 100% { + -webkit-transform: scale(1); + transform: scale(1); + } +} + +@keyframes pulse { + 0% { + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } + + 50% { + -webkit-transform: scale(1.1); + -ms-transform: scale(1.1); + transform: scale(1.1); + } + + 100% { + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } +} + +.pulse { + -webkit-animation-name: pulse; + animation-name: pulse; +} + +@-webkit-keyframes shake { + 0%, 100% { + -webkit-transform: translateX(0); + transform: translateX(0); + } + + 10%, 30%, 50%, 70%, 90% { + -webkit-transform: translateX(-10px); + transform: translateX(-10px); + } + + 20%, 40%, 60%, 80% { + -webkit-transform: translateX(10px); + transform: translateX(10px); + } +} + +@keyframes shake { + 0%, 100% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } + + 10%, 30%, 50%, 70%, 90% { + -webkit-transform: translateX(-10px); + -ms-transform: translateX(-10px); + transform: translateX(-10px); + } + + 20%, 40%, 60%, 80% { + -webkit-transform: translateX(10px); + -ms-transform: translateX(10px); + transform: translateX(10px); + } +} + +.shake { + -webkit-animation-name: shake; + animation-name: shake; +} + +@-webkit-keyframes swing { + 20% { + -webkit-transform: rotate(15deg); + transform: rotate(15deg); + } + + 40% { + -webkit-transform: rotate(-10deg); + transform: rotate(-10deg); + } + + 60% { + -webkit-transform: rotate(5deg); + transform: rotate(5deg); + } + + 80% { + -webkit-transform: rotate(-5deg); + transform: rotate(-5deg); + } + + 100% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } +} + +@keyframes swing { + 20% { + -webkit-transform: rotate(15deg); + -ms-transform: rotate(15deg); + transform: rotate(15deg); + } + + 40% { + -webkit-transform: rotate(-10deg); + -ms-transform: rotate(-10deg); + transform: rotate(-10deg); + } + + 60% { + -webkit-transform: rotate(5deg); + -ms-transform: rotate(5deg); + transform: rotate(5deg); + } + + 80% { + -webkit-transform: rotate(-5deg); + -ms-transform: rotate(-5deg); + transform: rotate(-5deg); + } + + 100% { + -webkit-transform: rotate(0deg); + -ms-transform: rotate(0deg); + transform: rotate(0deg); + } +} + +.swing { + -webkit-transform-origin: top center; + -ms-transform-origin: top center; + transform-origin: top center; + -webkit-animation-name: swing; + animation-name: swing; +} + +@-webkit-keyframes tada { + 0% { + -webkit-transform: scale(1); + transform: scale(1); + } + + 10%, 20% { + -webkit-transform: scale(0.9) rotate(-3deg); + transform: scale(0.9) rotate(-3deg); + } + + 30%, 50%, 70%, 90% { + -webkit-transform: scale(1.1) rotate(3deg); + transform: scale(1.1) rotate(3deg); + } + + 40%, 60%, 80% { + -webkit-transform: scale(1.1) rotate(-3deg); + transform: scale(1.1) rotate(-3deg); + } + + 100% { + -webkit-transform: scale(1) rotate(0); + transform: scale(1) rotate(0); + } +} + +@keyframes tada { + 0% { + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } + + 10%, 20% { + -webkit-transform: scale(0.9) rotate(-3deg); + -ms-transform: scale(0.9) rotate(-3deg); + transform: scale(0.9) rotate(-3deg); + } + + 30%, 50%, 70%, 90% { + -webkit-transform: scale(1.1) rotate(3deg); + -ms-transform: scale(1.1) rotate(3deg); + transform: scale(1.1) rotate(3deg); + } + + 40%, 60%, 80% { + -webkit-transform: scale(1.1) rotate(-3deg); + -ms-transform: scale(1.1) rotate(-3deg); + transform: scale(1.1) rotate(-3deg); + } + + 100% { + -webkit-transform: scale(1) rotate(0); + -ms-transform: scale(1) rotate(0); + transform: scale(1) rotate(0); + } +} + +.tada { + -webkit-animation-name: tada; + animation-name: tada; +} + +/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ + +@-webkit-keyframes wobble { + 0% { + -webkit-transform: translateX(0%); + transform: translateX(0%); + } + + 15% { + -webkit-transform: translateX(-25%) rotate(-5deg); + transform: translateX(-25%) rotate(-5deg); + } + + 30% { + -webkit-transform: translateX(20%) rotate(3deg); + transform: translateX(20%) rotate(3deg); + } + + 45% { + -webkit-transform: translateX(-15%) rotate(-3deg); + transform: translateX(-15%) rotate(-3deg); + } + + 60% { + -webkit-transform: translateX(10%) rotate(2deg); + transform: translateX(10%) rotate(2deg); + } + + 75% { + -webkit-transform: translateX(-5%) rotate(-1deg); + transform: translateX(-5%) rotate(-1deg); + } + + 100% { + -webkit-transform: translateX(0%); + transform: translateX(0%); + } +} + +@keyframes wobble { + 0% { + -webkit-transform: translateX(0%); + -ms-transform: translateX(0%); + transform: translateX(0%); + } + + 15% { + -webkit-transform: translateX(-25%) rotate(-5deg); + -ms-transform: translateX(-25%) rotate(-5deg); + transform: translateX(-25%) rotate(-5deg); + } + + 30% { + -webkit-transform: translateX(20%) rotate(3deg); + -ms-transform: translateX(20%) rotate(3deg); + transform: translateX(20%) rotate(3deg); + } + + 45% { + -webkit-transform: translateX(-15%) rotate(-3deg); + -ms-transform: translateX(-15%) rotate(-3deg); + transform: translateX(-15%) rotate(-3deg); + } + + 60% { + -webkit-transform: translateX(10%) rotate(2deg); + -ms-transform: translateX(10%) rotate(2deg); + transform: translateX(10%) rotate(2deg); + } + + 75% { + -webkit-transform: translateX(-5%) rotate(-1deg); + -ms-transform: translateX(-5%) rotate(-1deg); + transform: translateX(-5%) rotate(-1deg); + } + + 100% { + -webkit-transform: translateX(0%); + -ms-transform: translateX(0%); + transform: translateX(0%); + } +} + +.wobble { + -webkit-animation-name: wobble; + animation-name: wobble; +} + +@-webkit-keyframes bounceIn { + 0% { + opacity: 0; + -webkit-transform: scale(.3); + transform: scale(.3); + } + + 50% { + opacity: 1; + -webkit-transform: scale(1.05); + transform: scale(1.05); + } + + 70% { + -webkit-transform: scale(.9); + transform: scale(.9); + } + + 100% { + -webkit-transform: scale(1); + transform: scale(1); + } +} + +@keyframes bounceIn { + 0% { + opacity: 0; + -webkit-transform: scale(.3); + -ms-transform: scale(.3); + transform: scale(.3); + } + + 50% { + opacity: 1; + -webkit-transform: scale(1.05); + -ms-transform: scale(1.05); + transform: scale(1.05); + } + + 70% { + -webkit-transform: scale(.9); + -ms-transform: scale(.9); + transform: scale(.9); + } + + 100% { + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } +} + +.bounceIn { + -webkit-animation-name: bounceIn; + animation-name: bounceIn; +} + +@-webkit-keyframes bounceInDown { + 0% { + opacity: 0; + -webkit-transform: translateY(-2000px); + transform: translateY(-2000px); + } + + 60% { + opacity: 1; + -webkit-transform: translateY(30px); + transform: translateY(30px); + } + + 80% { + -webkit-transform: translateY(-10px); + transform: translateY(-10px); + } + + 100% { + -webkit-transform: translateY(0); + transform: translateY(0); + } +} + +@keyframes bounceInDown { + 0% { + opacity: 0; + -webkit-transform: translateY(-2000px); + -ms-transform: translateY(-2000px); + transform: translateY(-2000px); + } + + 60% { + opacity: 1; + -webkit-transform: translateY(30px); + -ms-transform: translateY(30px); + transform: translateY(30px); + } + + 80% { + -webkit-transform: translateY(-10px); + -ms-transform: translateY(-10px); + transform: translateY(-10px); + } + + 100% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } +} + +.bounceInDown { + -webkit-animation-name: bounceInDown; + animation-name: bounceInDown; +} + +@-webkit-keyframes bounceInLeft { + 0% { + opacity: 0; + -webkit-transform: translateX(-2000px); + transform: translateX(-2000px); + } + + 60% { + opacity: 1; + -webkit-transform: translateX(30px); + transform: translateX(30px); + } + + 80% { + -webkit-transform: translateX(-10px); + transform: translateX(-10px); + } + + 100% { + -webkit-transform: translateX(0); + transform: translateX(0); + } +} + +@keyframes bounceInLeft { + 0% { + opacity: 0; + -webkit-transform: translateX(-2000px); + -ms-transform: translateX(-2000px); + transform: translateX(-2000px); + } + + 60% { + opacity: 1; + -webkit-transform: translateX(30px); + -ms-transform: translateX(30px); + transform: translateX(30px); + } + + 80% { + -webkit-transform: translateX(-10px); + -ms-transform: translateX(-10px); + transform: translateX(-10px); + } + + 100% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } +} + +.bounceInLeft { + -webkit-animation-name: bounceInLeft; + animation-name: bounceInLeft; +} + +@-webkit-keyframes bounceInRight { + 0% { + opacity: 0; + -webkit-transform: translateX(2000px); + transform: translateX(2000px); + } + + 60% { + opacity: 1; + -webkit-transform: translateX(-30px); + transform: translateX(-30px); + } + + 80% { + -webkit-transform: translateX(10px); + transform: translateX(10px); + } + + 100% { + -webkit-transform: translateX(0); + transform: translateX(0); + } +} + +@keyframes bounceInRight { + 0% { + opacity: 0; + -webkit-transform: translateX(2000px); + -ms-transform: translateX(2000px); + transform: translateX(2000px); + } + + 60% { + opacity: 1; + -webkit-transform: translateX(-30px); + -ms-transform: translateX(-30px); + transform: translateX(-30px); + } + + 80% { + -webkit-transform: translateX(10px); + -ms-transform: translateX(10px); + transform: translateX(10px); + } + + 100% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } +} + +.bounceInRight { + -webkit-animation-name: bounceInRight; + animation-name: bounceInRight; +} + +@-webkit-keyframes bounceInUp { + 0% { + opacity: 0; + -webkit-transform: translateY(2000px); + transform: translateY(2000px); + } + + 60% { + opacity: 1; + -webkit-transform: translateY(-30px); + transform: translateY(-30px); + } + + 80% { + -webkit-transform: translateY(10px); + transform: translateY(10px); + } + + 100% { + -webkit-transform: translateY(0); + transform: translateY(0); + } +} + +@keyframes bounceInUp { + 0% { + opacity: 0; + -webkit-transform: translateY(2000px); + -ms-transform: translateY(2000px); + transform: translateY(2000px); + } + + 60% { + opacity: 1; + -webkit-transform: translateY(-30px); + -ms-transform: translateY(-30px); + transform: translateY(-30px); + } + + 80% { + -webkit-transform: translateY(10px); + -ms-transform: translateY(10px); + transform: translateY(10px); + } + + 100% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } +} + +.bounceInUp { + -webkit-animation-name: bounceInUp; + animation-name: bounceInUp; +} + +@-webkit-keyframes bounceOut { + 0% { + -webkit-transform: scale(1); + transform: scale(1); + } + + 25% { + -webkit-transform: scale(.95); + transform: scale(.95); + } + + 50% { + opacity: 1; + -webkit-transform: scale(1.1); + transform: scale(1.1); + } + + 100% { + opacity: 0; + -webkit-transform: scale(.3); + transform: scale(.3); + } +} + +@keyframes bounceOut { + 0% { + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } + + 25% { + -webkit-transform: scale(.95); + -ms-transform: scale(.95); + transform: scale(.95); + } + + 50% { + opacity: 1; + -webkit-transform: scale(1.1); + -ms-transform: scale(1.1); + transform: scale(1.1); + } + + 100% { + opacity: 0; + -webkit-transform: scale(.3); + -ms-transform: scale(.3); + transform: scale(.3); + } +} + +.bounceOut { + -webkit-animation-name: bounceOut; + animation-name: bounceOut; +} + +@-webkit-keyframes bounceOutDown { + 0% { + -webkit-transform: translateY(0); + transform: translateY(0); + } + + 20% { + opacity: 1; + -webkit-transform: translateY(-20px); + transform: translateY(-20px); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(2000px); + transform: translateY(2000px); + } +} + +@keyframes bounceOutDown { + 0% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } + + 20% { + opacity: 1; + -webkit-transform: translateY(-20px); + -ms-transform: translateY(-20px); + transform: translateY(-20px); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(2000px); + -ms-transform: translateY(2000px); + transform: translateY(2000px); + } +} + +.bounceOutDown { + -webkit-animation-name: bounceOutDown; + animation-name: bounceOutDown; +} + +@-webkit-keyframes bounceOutLeft { + 0% { + -webkit-transform: translateX(0); + transform: translateX(0); + } + + 20% { + opacity: 1; + -webkit-transform: translateX(20px); + transform: translateX(20px); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(-2000px); + transform: translateX(-2000px); + } +} + +@keyframes bounceOutLeft { + 0% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } + + 20% { + opacity: 1; + -webkit-transform: translateX(20px); + -ms-transform: translateX(20px); + transform: translateX(20px); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(-2000px); + -ms-transform: translateX(-2000px); + transform: translateX(-2000px); + } +} + +.bounceOutLeft { + -webkit-animation-name: bounceOutLeft; + animation-name: bounceOutLeft; +} + +@-webkit-keyframes bounceOutRight { + 0% { + -webkit-transform: translateX(0); + transform: translateX(0); + } + + 20% { + opacity: 1; + -webkit-transform: translateX(-20px); + transform: translateX(-20px); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(2000px); + transform: translateX(2000px); + } +} + +@keyframes bounceOutRight { + 0% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } + + 20% { + opacity: 1; + -webkit-transform: translateX(-20px); + -ms-transform: translateX(-20px); + transform: translateX(-20px); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(2000px); + -ms-transform: translateX(2000px); + transform: translateX(2000px); + } +} + +.bounceOutRight { + -webkit-animation-name: bounceOutRight; + animation-name: bounceOutRight; +} + +@-webkit-keyframes bounceOutUp { + 0% { + -webkit-transform: translateY(0); + transform: translateY(0); + } + + 20% { + opacity: 1; + -webkit-transform: translateY(20px); + transform: translateY(20px); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(-2000px); + transform: translateY(-2000px); + } +} + +@keyframes bounceOutUp { + 0% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } + + 20% { + opacity: 1; + -webkit-transform: translateY(20px); + -ms-transform: translateY(20px); + transform: translateY(20px); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(-2000px); + -ms-transform: translateY(-2000px); + transform: translateY(-2000px); + } +} + +.bounceOutUp { + -webkit-animation-name: bounceOutUp; + animation-name: bounceOutUp; +} + +@-webkit-keyframes fadeIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +@keyframes fadeIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +.fadeIn { + -webkit-animation-name: fadeIn; + animation-name: fadeIn; +} + +@-webkit-keyframes fadeInDown { + 0% { + opacity: 0; + -webkit-transform: translateY(-20px); + transform: translateY(-20px); + } + + 100% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } +} + +@keyframes fadeInDown { + 0% { + opacity: 0; + -webkit-transform: translateY(-20px); + -ms-transform: translateY(-20px); + transform: translateY(-20px); + } + + 100% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } +} + +.fadeInDown { + -webkit-animation-name: fadeInDown; + animation-name: fadeInDown; +} + +@-webkit-keyframes fadeInDownBig { + 0% { + opacity: 0; + -webkit-transform: translateY(-2000px); + transform: translateY(-2000px); + } + + 100% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } +} + +@keyframes fadeInDownBig { + 0% { + opacity: 0; + -webkit-transform: translateY(-2000px); + -ms-transform: translateY(-2000px); + transform: translateY(-2000px); + } + + 100% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } +} + +.fadeInDownBig { + -webkit-animation-name: fadeInDownBig; + animation-name: fadeInDownBig; +} + +@-webkit-keyframes fadeInLeft { + 0% { + opacity: 0; + -webkit-transform: translateX(-20px); + transform: translateX(-20px); + } + + 100% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } +} + +@keyframes fadeInLeft { + 0% { + opacity: 0; + -webkit-transform: translateX(-20px); + -ms-transform: translateX(-20px); + transform: translateX(-20px); + } + + 100% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } +} + +.fadeInLeft { + -webkit-animation-name: fadeInLeft; + animation-name: fadeInLeft; +} + +@-webkit-keyframes fadeInLeftBig { + 0% { + opacity: 0; + -webkit-transform: translateX(-2000px); + transform: translateX(-2000px); + } + + 100% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } +} + +@keyframes fadeInLeftBig { + 0% { + opacity: 0; + -webkit-transform: translateX(-2000px); + -ms-transform: translateX(-2000px); + transform: translateX(-2000px); + } + + 100% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } +} + +.fadeInLeftBig { + -webkit-animation-name: fadeInLeftBig; + animation-name: fadeInLeftBig; +} + +@-webkit-keyframes fadeInRight { + 0% { + opacity: 0; + -webkit-transform: translateX(20px); + transform: translateX(20px); + } + + 100% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } +} + +@keyframes fadeInRight { + 0% { + opacity: 0; + -webkit-transform: translateX(20px); + -ms-transform: translateX(20px); + transform: translateX(20px); + } + + 100% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } +} + +.fadeInRight { + -webkit-animation-name: fadeInRight; + animation-name: fadeInRight; +} + +@-webkit-keyframes fadeInRightBig { + 0% { + opacity: 0; + -webkit-transform: translateX(2000px); + transform: translateX(2000px); + } + + 100% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } +} + +@keyframes fadeInRightBig { + 0% { + opacity: 0; + -webkit-transform: translateX(2000px); + -ms-transform: translateX(2000px); + transform: translateX(2000px); + } + + 100% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } +} + +.fadeInRightBig { + -webkit-animation-name: fadeInRightBig; + animation-name: fadeInRightBig; +} + +@-webkit-keyframes fadeInUp { + 0% { + opacity: 0; + -webkit-transform: translateY(20px); + transform: translateY(20px); + } + + 100% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } +} + +@keyframes fadeInUp { + 0% { + opacity: 0; + -webkit-transform: translateY(20px); + -ms-transform: translateY(20px); + transform: translateY(20px); + } + + 100% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } +} + +.fadeInUp { + -webkit-animation-name: fadeInUp; + animation-name: fadeInUp; +} + +@-webkit-keyframes fadeInUpBig { + 0% { + opacity: 0; + -webkit-transform: translateY(2000px); + transform: translateY(2000px); + } + + 100% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } +} + +@keyframes fadeInUpBig { + 0% { + opacity: 0; + -webkit-transform: translateY(2000px); + -ms-transform: translateY(2000px); + transform: translateY(2000px); + } + + 100% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } +} + +.fadeInUpBig { + -webkit-animation-name: fadeInUpBig; + animation-name: fadeInUpBig; +} + +@-webkit-keyframes fadeOut { + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +} + +@keyframes fadeOut { + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +} + +.fadeOut { + -webkit-animation-name: fadeOut; + animation-name: fadeOut; +} + +@-webkit-keyframes fadeOutDown { + 0% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(20px); + transform: translateY(20px); + } +} + +@keyframes fadeOutDown { + 0% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(20px); + -ms-transform: translateY(20px); + transform: translateY(20px); + } +} + +.fadeOutDown { + -webkit-animation-name: fadeOutDown; + animation-name: fadeOutDown; +} + +@-webkit-keyframes fadeOutDownBig { + 0% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(2000px); + transform: translateY(2000px); + } +} + +@keyframes fadeOutDownBig { + 0% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(2000px); + -ms-transform: translateY(2000px); + transform: translateY(2000px); + } +} + +.fadeOutDownBig { + -webkit-animation-name: fadeOutDownBig; + animation-name: fadeOutDownBig; +} + +@-webkit-keyframes fadeOutLeft { + 0% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(-20px); + transform: translateX(-20px); + } +} + +@keyframes fadeOutLeft { + 0% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(-20px); + -ms-transform: translateX(-20px); + transform: translateX(-20px); + } +} + +.fadeOutLeft { + -webkit-animation-name: fadeOutLeft; + animation-name: fadeOutLeft; +} + +@-webkit-keyframes fadeOutLeftBig { + 0% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(-2000px); + transform: translateX(-2000px); + } +} + +@keyframes fadeOutLeftBig { + 0% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(-2000px); + -ms-transform: translateX(-2000px); + transform: translateX(-2000px); + } +} + +.fadeOutLeftBig { + -webkit-animation-name: fadeOutLeftBig; + animation-name: fadeOutLeftBig; +} + +@-webkit-keyframes fadeOutRight { + 0% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(20px); + transform: translateX(20px); + } +} + +@keyframes fadeOutRight { + 0% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(20px); + -ms-transform: translateX(20px); + transform: translateX(20px); + } +} + +.fadeOutRight { + -webkit-animation-name: fadeOutRight; + animation-name: fadeOutRight; +} + +@-webkit-keyframes fadeOutRightBig { + 0% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(2000px); + transform: translateX(2000px); + } +} + +@keyframes fadeOutRightBig { + 0% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(2000px); + -ms-transform: translateX(2000px); + transform: translateX(2000px); + } +} + +.fadeOutRightBig { + -webkit-animation-name: fadeOutRightBig; + animation-name: fadeOutRightBig; +} + +@-webkit-keyframes fadeOutUp { + 0% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(-20px); + transform: translateY(-20px); + } +} + +@keyframes fadeOutUp { + 0% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(-20px); + -ms-transform: translateY(-20px); + transform: translateY(-20px); + } +} + +.fadeOutUp { + -webkit-animation-name: fadeOutUp; + animation-name: fadeOutUp; +} + +@-webkit-keyframes fadeOutUpBig { + 0% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(-2000px); + transform: translateY(-2000px); + } +} + +@keyframes fadeOutUpBig { + 0% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(-2000px); + -ms-transform: translateY(-2000px); + transform: translateY(-2000px); + } +} + +.fadeOutUpBig { + -webkit-animation-name: fadeOutUpBig; + animation-name: fadeOutUpBig; +} + +@-webkit-keyframes flip { + 0% { + -webkit-transform: perspective(400px) translateZ(0) rotateY(0) scale(1); + transform: perspective(400px) translateZ(0) rotateY(0) scale(1); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + + 40% { + -webkit-transform: perspective(400px) translateZ(150px) rotateY(170deg) scale(1); + transform: perspective(400px) translateZ(150px) rotateY(170deg) scale(1); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + + 50% { + -webkit-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1); + transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 80% { + -webkit-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(.95); + transform: perspective(400px) translateZ(0) rotateY(360deg) scale(.95); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 100% { + -webkit-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(1); + transform: perspective(400px) translateZ(0) rotateY(360deg) scale(1); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } +} + +@keyframes flip { + 0% { + -webkit-transform: perspective(400px) translateZ(0) rotateY(0) scale(1); + -ms-transform: perspective(400px) translateZ(0) rotateY(0) scale(1); + transform: perspective(400px) translateZ(0) rotateY(0) scale(1); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + + 40% { + -webkit-transform: perspective(400px) translateZ(150px) rotateY(170deg) scale(1); + -ms-transform: perspective(400px) translateZ(150px) rotateY(170deg) scale(1); + transform: perspective(400px) translateZ(150px) rotateY(170deg) scale(1); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + + 50% { + -webkit-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1); + -ms-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1); + transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 80% { + -webkit-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(.95); + -ms-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(.95); + transform: perspective(400px) translateZ(0) rotateY(360deg) scale(.95); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 100% { + -webkit-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(1); + -ms-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(1); + transform: perspective(400px) translateZ(0) rotateY(360deg) scale(1); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } +} + +.animated.flip { + -webkit-backface-visibility: visible; + -ms-backface-visibility: visible; + backface-visibility: visible; + -webkit-animation-name: flip; + animation-name: flip; +} + +@-webkit-keyframes flipInX { + 0% { + -webkit-transform: perspective(400px) rotateX(90deg); + transform: perspective(400px) rotateX(90deg); + opacity: 0; + } + + 40% { + -webkit-transform: perspective(400px) rotateX(-10deg); + transform: perspective(400px) rotateX(-10deg); + } + + 70% { + -webkit-transform: perspective(400px) rotateX(10deg); + transform: perspective(400px) rotateX(10deg); + } + + 100% { + -webkit-transform: perspective(400px) rotateX(0deg); + transform: perspective(400px) rotateX(0deg); + opacity: 1; + } +} + +@keyframes flipInX { + 0% { + -webkit-transform: perspective(400px) rotateX(90deg); + -ms-transform: perspective(400px) rotateX(90deg); + transform: perspective(400px) rotateX(90deg); + opacity: 0; + } + + 40% { + -webkit-transform: perspective(400px) rotateX(-10deg); + -ms-transform: perspective(400px) rotateX(-10deg); + transform: perspective(400px) rotateX(-10deg); + } + + 70% { + -webkit-transform: perspective(400px) rotateX(10deg); + -ms-transform: perspective(400px) rotateX(10deg); + transform: perspective(400px) rotateX(10deg); + } + + 100% { + -webkit-transform: perspective(400px) rotateX(0deg); + -ms-transform: perspective(400px) rotateX(0deg); + transform: perspective(400px) rotateX(0deg); + opacity: 1; + } +} + +.flipInX { + -webkit-backface-visibility: visible !important; + -ms-backface-visibility: visible !important; + backface-visibility: visible !important; + -webkit-animation-name: flipInX; + animation-name: flipInX; +} + +@-webkit-keyframes flipInY { + 0% { + -webkit-transform: perspective(400px) rotateY(90deg); + transform: perspective(400px) rotateY(90deg); + opacity: 0; + } + + 40% { + -webkit-transform: perspective(400px) rotateY(-10deg); + transform: perspective(400px) rotateY(-10deg); + } + + 70% { + -webkit-transform: perspective(400px) rotateY(10deg); + transform: perspective(400px) rotateY(10deg); + } + + 100% { + -webkit-transform: perspective(400px) rotateY(0deg); + transform: perspective(400px) rotateY(0deg); + opacity: 1; + } +} + +@keyframes flipInY { + 0% { + -webkit-transform: perspective(400px) rotateY(90deg); + -ms-transform: perspective(400px) rotateY(90deg); + transform: perspective(400px) rotateY(90deg); + opacity: 0; + } + + 40% { + -webkit-transform: perspective(400px) rotateY(-10deg); + -ms-transform: perspective(400px) rotateY(-10deg); + transform: perspective(400px) rotateY(-10deg); + } + + 70% { + -webkit-transform: perspective(400px) rotateY(10deg); + -ms-transform: perspective(400px) rotateY(10deg); + transform: perspective(400px) rotateY(10deg); + } + + 100% { + -webkit-transform: perspective(400px) rotateY(0deg); + -ms-transform: perspective(400px) rotateY(0deg); + transform: perspective(400px) rotateY(0deg); + opacity: 1; + } +} + +.flipInY { + -webkit-backface-visibility: visible !important; + -ms-backface-visibility: visible !important; + backface-visibility: visible !important; + -webkit-animation-name: flipInY; + animation-name: flipInY; +} + +@-webkit-keyframes flipOutX { + 0% { + -webkit-transform: perspective(400px) rotateX(0deg); + transform: perspective(400px) rotateX(0deg); + opacity: 1; + } + + 100% { + -webkit-transform: perspective(400px) rotateX(90deg); + transform: perspective(400px) rotateX(90deg); + opacity: 0; + } +} + +@keyframes flipOutX { + 0% { + -webkit-transform: perspective(400px) rotateX(0deg); + -ms-transform: perspective(400px) rotateX(0deg); + transform: perspective(400px) rotateX(0deg); + opacity: 1; + } + + 100% { + -webkit-transform: perspective(400px) rotateX(90deg); + -ms-transform: perspective(400px) rotateX(90deg); + transform: perspective(400px) rotateX(90deg); + opacity: 0; + } +} + +.flipOutX { + -webkit-animation-name: flipOutX; + animation-name: flipOutX; + -webkit-backface-visibility: visible !important; + -ms-backface-visibility: visible !important; + backface-visibility: visible !important; +} + +@-webkit-keyframes flipOutY { + 0% { + -webkit-transform: perspective(400px) rotateY(0deg); + transform: perspective(400px) rotateY(0deg); + opacity: 1; + } + + 100% { + -webkit-transform: perspective(400px) rotateY(90deg); + transform: perspective(400px) rotateY(90deg); + opacity: 0; + } +} + +@keyframes flipOutY { + 0% { + -webkit-transform: perspective(400px) rotateY(0deg); + -ms-transform: perspective(400px) rotateY(0deg); + transform: perspective(400px) rotateY(0deg); + opacity: 1; + } + + 100% { + -webkit-transform: perspective(400px) rotateY(90deg); + -ms-transform: perspective(400px) rotateY(90deg); + transform: perspective(400px) rotateY(90deg); + opacity: 0; + } +} + +.flipOutY { + -webkit-backface-visibility: visible !important; + -ms-backface-visibility: visible !important; + backface-visibility: visible !important; + -webkit-animation-name: flipOutY; + animation-name: flipOutY; +} + +@-webkit-keyframes lightSpeedIn { + 0% { + -webkit-transform: translateX(100%) skewX(-30deg); + transform: translateX(100%) skewX(-30deg); + opacity: 0; + } + + 60% { + -webkit-transform: translateX(-20%) skewX(30deg); + transform: translateX(-20%) skewX(30deg); + opacity: 1; + } + + 80% { + -webkit-transform: translateX(0%) skewX(-15deg); + transform: translateX(0%) skewX(-15deg); + opacity: 1; + } + + 100% { + -webkit-transform: translateX(0%) skewX(0deg); + transform: translateX(0%) skewX(0deg); + opacity: 1; + } +} + +@keyframes lightSpeedIn { + 0% { + -webkit-transform: translateX(100%) skewX(-30deg); + -ms-transform: translateX(100%) skewX(-30deg); + transform: translateX(100%) skewX(-30deg); + opacity: 0; + } + + 60% { + -webkit-transform: translateX(-20%) skewX(30deg); + -ms-transform: translateX(-20%) skewX(30deg); + transform: translateX(-20%) skewX(30deg); + opacity: 1; + } + + 80% { + -webkit-transform: translateX(0%) skewX(-15deg); + -ms-transform: translateX(0%) skewX(-15deg); + transform: translateX(0%) skewX(-15deg); + opacity: 1; + } + + 100% { + -webkit-transform: translateX(0%) skewX(0deg); + -ms-transform: translateX(0%) skewX(0deg); + transform: translateX(0%) skewX(0deg); + opacity: 1; + } +} + +.lightSpeedIn { + -webkit-animation-name: lightSpeedIn; + animation-name: lightSpeedIn; + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; +} + +@-webkit-keyframes lightSpeedOut { + 0% { + -webkit-transform: translateX(0%) skewX(0deg); + transform: translateX(0%) skewX(0deg); + opacity: 1; + } + + 100% { + -webkit-transform: translateX(100%) skewX(-30deg); + transform: translateX(100%) skewX(-30deg); + opacity: 0; + } +} + +@keyframes lightSpeedOut { + 0% { + -webkit-transform: translateX(0%) skewX(0deg); + -ms-transform: translateX(0%) skewX(0deg); + transform: translateX(0%) skewX(0deg); + opacity: 1; + } + + 100% { + -webkit-transform: translateX(100%) skewX(-30deg); + -ms-transform: translateX(100%) skewX(-30deg); + transform: translateX(100%) skewX(-30deg); + opacity: 0; + } +} + +.lightSpeedOut { + -webkit-animation-name: lightSpeedOut; + animation-name: lightSpeedOut; + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; +} + +@-webkit-keyframes rotateIn { + 0% { + -webkit-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(-200deg); + transform: rotate(-200deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } +} + +@keyframes rotateIn { + 0% { + -webkit-transform-origin: center center; + -ms-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(-200deg); + -ms-transform: rotate(-200deg); + transform: rotate(-200deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: center center; + -ms-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } +} + +.rotateIn { + -webkit-animation-name: rotateIn; + animation-name: rotateIn; +} + +@-webkit-keyframes rotateInDownLeft { + 0% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } +} + +@keyframes rotateInDownLeft { + 0% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } +} + +.rotateInDownLeft { + -webkit-animation-name: rotateInDownLeft; + animation-name: rotateInDownLeft; +} + +@-webkit-keyframes rotateInDownRight { + 0% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } +} + +@keyframes rotateInDownRight { + 0% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } +} + +.rotateInDownRight { + -webkit-animation-name: rotateInDownRight; + animation-name: rotateInDownRight; +} + +@-webkit-keyframes rotateInUpLeft { + 0% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } +} + +@keyframes rotateInUpLeft { + 0% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } +} + +.rotateInUpLeft { + -webkit-animation-name: rotateInUpLeft; + animation-name: rotateInUpLeft; +} + +@-webkit-keyframes rotateInUpRight { + 0% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } +} + +@keyframes rotateInUpRight { + 0% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } +} + +.rotateInUpRight { + -webkit-animation-name: rotateInUpRight; + animation-name: rotateInUpRight; +} + +@-webkit-keyframes rotateOut { + 0% { + -webkit-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(200deg); + transform: rotate(200deg); + opacity: 0; + } +} + +@keyframes rotateOut { + 0% { + -webkit-transform-origin: center center; + -ms-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: center center; + -ms-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(200deg); + -ms-transform: rotate(200deg); + transform: rotate(200deg); + opacity: 0; + } +} + +.rotateOut { + -webkit-animation-name: rotateOut; + animation-name: rotateOut; +} + +@-webkit-keyframes rotateOutDownLeft { + 0% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } +} + +@keyframes rotateOutDownLeft { + 0% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } +} + +.rotateOutDownLeft { + -webkit-animation-name: rotateOutDownLeft; + animation-name: rotateOutDownLeft; +} + +@-webkit-keyframes rotateOutDownRight { + 0% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } +} + +@keyframes rotateOutDownRight { + 0% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } +} + +.rotateOutDownRight { + -webkit-animation-name: rotateOutDownRight; + animation-name: rotateOutDownRight; +} + +@-webkit-keyframes rotateOutUpLeft { + 0% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } +} + +@keyframes rotateOutUpLeft { + 0% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } +} + +.rotateOutUpLeft { + -webkit-animation-name: rotateOutUpLeft; + animation-name: rotateOutUpLeft; +} + +@-webkit-keyframes rotateOutUpRight { + 0% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } +} + +@keyframes rotateOutUpRight { + 0% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } +} + +.rotateOutUpRight { + -webkit-animation-name: rotateOutUpRight; + animation-name: rotateOutUpRight; +} + +@-webkit-keyframes slideInDown { + 0% { + opacity: 0; + -webkit-transform: translateY(-2000px); + transform: translateY(-2000px); + } + + 100% { + -webkit-transform: translateY(0); + transform: translateY(0); + } +} + +@keyframes slideInDown { + 0% { + opacity: 0; + -webkit-transform: translateY(-2000px); + -ms-transform: translateY(-2000px); + transform: translateY(-2000px); + } + + 100% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } +} + +.slideInDown { + -webkit-animation-name: slideInDown; + animation-name: slideInDown; +} + +@-webkit-keyframes slideInLeft { + 0% { + opacity: 0; + -webkit-transform: translateX(-2000px); + transform: translateX(-2000px); + } + + 100% { + -webkit-transform: translateX(0); + transform: translateX(0); + } +} + +@keyframes slideInLeft { + 0% { + opacity: 0; + -webkit-transform: translateX(-2000px); + -ms-transform: translateX(-2000px); + transform: translateX(-2000px); + } + + 100% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } +} + +.slideInLeft { + -webkit-animation-name: slideInLeft; + animation-name: slideInLeft; +} + +@-webkit-keyframes slideInRight { + 0% { + opacity: 0; + -webkit-transform: translateX(2000px); + transform: translateX(2000px); + } + + 100% { + -webkit-transform: translateX(0); + transform: translateX(0); + } +} + +@keyframes slideInRight { + 0% { + opacity: 0; + -webkit-transform: translateX(2000px); + -ms-transform: translateX(2000px); + transform: translateX(2000px); + } + + 100% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } +} + +.slideInRight { + -webkit-animation-name: slideInRight; + animation-name: slideInRight; +} + +@-webkit-keyframes slideOutLeft { + 0% { + -webkit-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(-2000px); + transform: translateX(-2000px); + } +} + +@keyframes slideOutLeft { + 0% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(-2000px); + -ms-transform: translateX(-2000px); + transform: translateX(-2000px); + } +} + +.slideOutLeft { + -webkit-animation-name: slideOutLeft; + animation-name: slideOutLeft; +} + +@-webkit-keyframes slideOutRight { + 0% { + -webkit-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(2000px); + transform: translateX(2000px); + } +} + +@keyframes slideOutRight { + 0% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(2000px); + -ms-transform: translateX(2000px); + transform: translateX(2000px); + } +} + +.slideOutRight { + -webkit-animation-name: slideOutRight; + animation-name: slideOutRight; +} + +@-webkit-keyframes slideOutUp { + 0% { + -webkit-transform: translateY(0); + transform: translateY(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(-2000px); + transform: translateY(-2000px); + } +} + +@keyframes slideOutUp { + 0% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(-2000px); + -ms-transform: translateY(-2000px); + transform: translateY(-2000px); + } +} + +.slideOutUp { + -webkit-animation-name: slideOutUp; + animation-name: slideOutUp; +} + +@-webkit-keyframes hinge { + 0% { + -webkit-transform: rotate(0); + transform: rotate(0); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 20%, 60% { + -webkit-transform: rotate(80deg); + transform: rotate(80deg); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 40% { + -webkit-transform: rotate(60deg); + transform: rotate(60deg); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 80% { + -webkit-transform: rotate(60deg) translateY(0); + transform: rotate(60deg) translateY(0); + opacity: 1; + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 100% { + -webkit-transform: translateY(700px); + transform: translateY(700px); + opacity: 0; + } +} + +@keyframes hinge { + 0% { + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + -webkit-transform-origin: top left; + -ms-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 20%, 60% { + -webkit-transform: rotate(80deg); + -ms-transform: rotate(80deg); + transform: rotate(80deg); + -webkit-transform-origin: top left; + -ms-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 40% { + -webkit-transform: rotate(60deg); + -ms-transform: rotate(60deg); + transform: rotate(60deg); + -webkit-transform-origin: top left; + -ms-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 80% { + -webkit-transform: rotate(60deg) translateY(0); + -ms-transform: rotate(60deg) translateY(0); + transform: rotate(60deg) translateY(0); + opacity: 1; + -webkit-transform-origin: top left; + -ms-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 100% { + -webkit-transform: translateY(700px); + -ms-transform: translateY(700px); + transform: translateY(700px); + opacity: 0; + } +} + +.hinge { + -webkit-animation-name: hinge; + animation-name: hinge; +} + +/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ + +@-webkit-keyframes rollIn { + 0% { + opacity: 0; + -webkit-transform: translateX(-100%) rotate(-120deg); + transform: translateX(-100%) rotate(-120deg); + } + + 100% { + opacity: 1; + -webkit-transform: translateX(0px) rotate(0deg); + transform: translateX(0px) rotate(0deg); + } +} + +@keyframes rollIn { + 0% { + opacity: 0; + -webkit-transform: translateX(-100%) rotate(-120deg); + -ms-transform: translateX(-100%) rotate(-120deg); + transform: translateX(-100%) rotate(-120deg); + } + + 100% { + opacity: 1; + -webkit-transform: translateX(0px) rotate(0deg); + -ms-transform: translateX(0px) rotate(0deg); + transform: translateX(0px) rotate(0deg); + } +} + +.rollIn { + -webkit-animation-name: rollIn; + animation-name: rollIn; +} + +/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ + +@-webkit-keyframes rollOut { + 0% { + opacity: 1; + -webkit-transform: translateX(0px) rotate(0deg); + transform: translateX(0px) rotate(0deg); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(100%) rotate(120deg); + transform: translateX(100%) rotate(120deg); + } +} + +@keyframes rollOut { + 0% { + opacity: 1; + -webkit-transform: translateX(0px) rotate(0deg); + -ms-transform: translateX(0px) rotate(0deg); + transform: translateX(0px) rotate(0deg); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(100%) rotate(120deg); + -ms-transform: translateX(100%) rotate(120deg); + transform: translateX(100%) rotate(120deg); + } +} + +.rollOut { + -webkit-animation-name: rollOut; + animation-name: rollOut; +} diff --git a/html/css/aos.css b/html/css/aos.css new file mode 100644 index 0000000..66923fe --- /dev/null +++ b/html/css/aos.css @@ -0,0 +1 @@ +[data-aos][data-aos][data-aos-duration="50"],body[data-aos-duration="50"] [data-aos]{transition-duration:50ms}[data-aos][data-aos][data-aos-delay="50"],body[data-aos-delay="50"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="50"].aos-animate,body[data-aos-delay="50"] [data-aos].aos-animate{transition-delay:50ms}[data-aos][data-aos][data-aos-duration="100"],body[data-aos-duration="100"] [data-aos]{transition-duration:.1s}[data-aos][data-aos][data-aos-delay="100"],body[data-aos-delay="100"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="100"].aos-animate,body[data-aos-delay="100"] [data-aos].aos-animate{transition-delay:.1s}[data-aos][data-aos][data-aos-duration="150"],body[data-aos-duration="150"] [data-aos]{transition-duration:.15s}[data-aos][data-aos][data-aos-delay="150"],body[data-aos-delay="150"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="150"].aos-animate,body[data-aos-delay="150"] [data-aos].aos-animate{transition-delay:.15s}[data-aos][data-aos][data-aos-duration="200"],body[data-aos-duration="200"] [data-aos]{transition-duration:.2s}[data-aos][data-aos][data-aos-delay="200"],body[data-aos-delay="200"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="200"].aos-animate,body[data-aos-delay="200"] [data-aos].aos-animate{transition-delay:.2s}[data-aos][data-aos][data-aos-duration="250"],body[data-aos-duration="250"] [data-aos]{transition-duration:.25s}[data-aos][data-aos][data-aos-delay="250"],body[data-aos-delay="250"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="250"].aos-animate,body[data-aos-delay="250"] [data-aos].aos-animate{transition-delay:.25s}[data-aos][data-aos][data-aos-duration="300"],body[data-aos-duration="300"] [data-aos]{transition-duration:.3s}[data-aos][data-aos][data-aos-delay="300"],body[data-aos-delay="300"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="300"].aos-animate,body[data-aos-delay="300"] [data-aos].aos-animate{transition-delay:.3s}[data-aos][data-aos][data-aos-duration="350"],body[data-aos-duration="350"] [data-aos]{transition-duration:.35s}[data-aos][data-aos][data-aos-delay="350"],body[data-aos-delay="350"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="350"].aos-animate,body[data-aos-delay="350"] [data-aos].aos-animate{transition-delay:.35s}[data-aos][data-aos][data-aos-duration="400"],body[data-aos-duration="400"] [data-aos]{transition-duration:.4s}[data-aos][data-aos][data-aos-delay="400"],body[data-aos-delay="400"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="400"].aos-animate,body[data-aos-delay="400"] [data-aos].aos-animate{transition-delay:.4s}[data-aos][data-aos][data-aos-duration="450"],body[data-aos-duration="450"] [data-aos]{transition-duration:.45s}[data-aos][data-aos][data-aos-delay="450"],body[data-aos-delay="450"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="450"].aos-animate,body[data-aos-delay="450"] [data-aos].aos-animate{transition-delay:.45s}[data-aos][data-aos][data-aos-duration="500"],body[data-aos-duration="500"] [data-aos]{transition-duration:.5s}[data-aos][data-aos][data-aos-delay="500"],body[data-aos-delay="500"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="500"].aos-animate,body[data-aos-delay="500"] [data-aos].aos-animate{transition-delay:.5s}[data-aos][data-aos][data-aos-duration="550"],body[data-aos-duration="550"] [data-aos]{transition-duration:.55s}[data-aos][data-aos][data-aos-delay="550"],body[data-aos-delay="550"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="550"].aos-animate,body[data-aos-delay="550"] [data-aos].aos-animate{transition-delay:.55s}[data-aos][data-aos][data-aos-duration="600"],body[data-aos-duration="600"] [data-aos]{transition-duration:.6s}[data-aos][data-aos][data-aos-delay="600"],body[data-aos-delay="600"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="600"].aos-animate,body[data-aos-delay="600"] [data-aos].aos-animate{transition-delay:.6s}[data-aos][data-aos][data-aos-duration="650"],body[data-aos-duration="650"] [data-aos]{transition-duration:.65s}[data-aos][data-aos][data-aos-delay="650"],body[data-aos-delay="650"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="650"].aos-animate,body[data-aos-delay="650"] [data-aos].aos-animate{transition-delay:.65s}[data-aos][data-aos][data-aos-duration="700"],body[data-aos-duration="700"] [data-aos]{transition-duration:.7s}[data-aos][data-aos][data-aos-delay="700"],body[data-aos-delay="700"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="700"].aos-animate,body[data-aos-delay="700"] [data-aos].aos-animate{transition-delay:.7s}[data-aos][data-aos][data-aos-duration="750"],body[data-aos-duration="750"] [data-aos]{transition-duration:.75s}[data-aos][data-aos][data-aos-delay="750"],body[data-aos-delay="750"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="750"].aos-animate,body[data-aos-delay="750"] [data-aos].aos-animate{transition-delay:.75s}[data-aos][data-aos][data-aos-duration="800"],body[data-aos-duration="800"] [data-aos]{transition-duration:.8s}[data-aos][data-aos][data-aos-delay="800"],body[data-aos-delay="800"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="800"].aos-animate,body[data-aos-delay="800"] [data-aos].aos-animate{transition-delay:.8s}[data-aos][data-aos][data-aos-duration="850"],body[data-aos-duration="850"] [data-aos]{transition-duration:.85s}[data-aos][data-aos][data-aos-delay="850"],body[data-aos-delay="850"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="850"].aos-animate,body[data-aos-delay="850"] [data-aos].aos-animate{transition-delay:.85s}[data-aos][data-aos][data-aos-duration="900"],body[data-aos-duration="900"] [data-aos]{transition-duration:.9s}[data-aos][data-aos][data-aos-delay="900"],body[data-aos-delay="900"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="900"].aos-animate,body[data-aos-delay="900"] [data-aos].aos-animate{transition-delay:.9s}[data-aos][data-aos][data-aos-duration="950"],body[data-aos-duration="950"] [data-aos]{transition-duration:.95s}[data-aos][data-aos][data-aos-delay="950"],body[data-aos-delay="950"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="950"].aos-animate,body[data-aos-delay="950"] [data-aos].aos-animate{transition-delay:.95s}[data-aos][data-aos][data-aos-duration="1000"],body[data-aos-duration="1000"] [data-aos]{transition-duration:1s}[data-aos][data-aos][data-aos-delay="1000"],body[data-aos-delay="1000"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1000"].aos-animate,body[data-aos-delay="1000"] [data-aos].aos-animate{transition-delay:1s}[data-aos][data-aos][data-aos-duration="1050"],body[data-aos-duration="1050"] [data-aos]{transition-duration:1.05s}[data-aos][data-aos][data-aos-delay="1050"],body[data-aos-delay="1050"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1050"].aos-animate,body[data-aos-delay="1050"] [data-aos].aos-animate{transition-delay:1.05s}[data-aos][data-aos][data-aos-duration="1100"],body[data-aos-duration="1100"] [data-aos]{transition-duration:1.1s}[data-aos][data-aos][data-aos-delay="1100"],body[data-aos-delay="1100"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1100"].aos-animate,body[data-aos-delay="1100"] [data-aos].aos-animate{transition-delay:1.1s}[data-aos][data-aos][data-aos-duration="1150"],body[data-aos-duration="1150"] [data-aos]{transition-duration:1.15s}[data-aos][data-aos][data-aos-delay="1150"],body[data-aos-delay="1150"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1150"].aos-animate,body[data-aos-delay="1150"] [data-aos].aos-animate{transition-delay:1.15s}[data-aos][data-aos][data-aos-duration="1200"],body[data-aos-duration="1200"] [data-aos]{transition-duration:1.2s}[data-aos][data-aos][data-aos-delay="1200"],body[data-aos-delay="1200"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1200"].aos-animate,body[data-aos-delay="1200"] [data-aos].aos-animate{transition-delay:1.2s}[data-aos][data-aos][data-aos-duration="1250"],body[data-aos-duration="1250"] [data-aos]{transition-duration:1.25s}[data-aos][data-aos][data-aos-delay="1250"],body[data-aos-delay="1250"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1250"].aos-animate,body[data-aos-delay="1250"] [data-aos].aos-animate{transition-delay:1.25s}[data-aos][data-aos][data-aos-duration="1300"],body[data-aos-duration="1300"] [data-aos]{transition-duration:1.3s}[data-aos][data-aos][data-aos-delay="1300"],body[data-aos-delay="1300"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1300"].aos-animate,body[data-aos-delay="1300"] [data-aos].aos-animate{transition-delay:1.3s}[data-aos][data-aos][data-aos-duration="1350"],body[data-aos-duration="1350"] [data-aos]{transition-duration:1.35s}[data-aos][data-aos][data-aos-delay="1350"],body[data-aos-delay="1350"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1350"].aos-animate,body[data-aos-delay="1350"] [data-aos].aos-animate{transition-delay:1.35s}[data-aos][data-aos][data-aos-duration="1400"],body[data-aos-duration="1400"] [data-aos]{transition-duration:1.4s}[data-aos][data-aos][data-aos-delay="1400"],body[data-aos-delay="1400"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1400"].aos-animate,body[data-aos-delay="1400"] [data-aos].aos-animate{transition-delay:1.4s}[data-aos][data-aos][data-aos-duration="1450"],body[data-aos-duration="1450"] [data-aos]{transition-duration:1.45s}[data-aos][data-aos][data-aos-delay="1450"],body[data-aos-delay="1450"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1450"].aos-animate,body[data-aos-delay="1450"] [data-aos].aos-animate{transition-delay:1.45s}[data-aos][data-aos][data-aos-duration="1500"],body[data-aos-duration="1500"] [data-aos]{transition-duration:1.5s}[data-aos][data-aos][data-aos-delay="1500"],body[data-aos-delay="1500"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1500"].aos-animate,body[data-aos-delay="1500"] [data-aos].aos-animate{transition-delay:1.5s}[data-aos][data-aos][data-aos-duration="1550"],body[data-aos-duration="1550"] [data-aos]{transition-duration:1.55s}[data-aos][data-aos][data-aos-delay="1550"],body[data-aos-delay="1550"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1550"].aos-animate,body[data-aos-delay="1550"] [data-aos].aos-animate{transition-delay:1.55s}[data-aos][data-aos][data-aos-duration="1600"],body[data-aos-duration="1600"] [data-aos]{transition-duration:1.6s}[data-aos][data-aos][data-aos-delay="1600"],body[data-aos-delay="1600"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1600"].aos-animate,body[data-aos-delay="1600"] [data-aos].aos-animate{transition-delay:1.6s}[data-aos][data-aos][data-aos-duration="1650"],body[data-aos-duration="1650"] [data-aos]{transition-duration:1.65s}[data-aos][data-aos][data-aos-delay="1650"],body[data-aos-delay="1650"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1650"].aos-animate,body[data-aos-delay="1650"] [data-aos].aos-animate{transition-delay:1.65s}[data-aos][data-aos][data-aos-duration="1700"],body[data-aos-duration="1700"] [data-aos]{transition-duration:1.7s}[data-aos][data-aos][data-aos-delay="1700"],body[data-aos-delay="1700"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1700"].aos-animate,body[data-aos-delay="1700"] [data-aos].aos-animate{transition-delay:1.7s}[data-aos][data-aos][data-aos-duration="1750"],body[data-aos-duration="1750"] [data-aos]{transition-duration:1.75s}[data-aos][data-aos][data-aos-delay="1750"],body[data-aos-delay="1750"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1750"].aos-animate,body[data-aos-delay="1750"] [data-aos].aos-animate{transition-delay:1.75s}[data-aos][data-aos][data-aos-duration="1800"],body[data-aos-duration="1800"] [data-aos]{transition-duration:1.8s}[data-aos][data-aos][data-aos-delay="1800"],body[data-aos-delay="1800"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1800"].aos-animate,body[data-aos-delay="1800"] [data-aos].aos-animate{transition-delay:1.8s}[data-aos][data-aos][data-aos-duration="1850"],body[data-aos-duration="1850"] [data-aos]{transition-duration:1.85s}[data-aos][data-aos][data-aos-delay="1850"],body[data-aos-delay="1850"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1850"].aos-animate,body[data-aos-delay="1850"] [data-aos].aos-animate{transition-delay:1.85s}[data-aos][data-aos][data-aos-duration="1900"],body[data-aos-duration="1900"] [data-aos]{transition-duration:1.9s}[data-aos][data-aos][data-aos-delay="1900"],body[data-aos-delay="1900"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1900"].aos-animate,body[data-aos-delay="1900"] [data-aos].aos-animate{transition-delay:1.9s}[data-aos][data-aos][data-aos-duration="1950"],body[data-aos-duration="1950"] [data-aos]{transition-duration:1.95s}[data-aos][data-aos][data-aos-delay="1950"],body[data-aos-delay="1950"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="1950"].aos-animate,body[data-aos-delay="1950"] [data-aos].aos-animate{transition-delay:1.95s}[data-aos][data-aos][data-aos-duration="2000"],body[data-aos-duration="2000"] [data-aos]{transition-duration:2s}[data-aos][data-aos][data-aos-delay="2000"],body[data-aos-delay="2000"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2000"].aos-animate,body[data-aos-delay="2000"] [data-aos].aos-animate{transition-delay:2s}[data-aos][data-aos][data-aos-duration="2050"],body[data-aos-duration="2050"] [data-aos]{transition-duration:2.05s}[data-aos][data-aos][data-aos-delay="2050"],body[data-aos-delay="2050"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2050"].aos-animate,body[data-aos-delay="2050"] [data-aos].aos-animate{transition-delay:2.05s}[data-aos][data-aos][data-aos-duration="2100"],body[data-aos-duration="2100"] [data-aos]{transition-duration:2.1s}[data-aos][data-aos][data-aos-delay="2100"],body[data-aos-delay="2100"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2100"].aos-animate,body[data-aos-delay="2100"] [data-aos].aos-animate{transition-delay:2.1s}[data-aos][data-aos][data-aos-duration="2150"],body[data-aos-duration="2150"] [data-aos]{transition-duration:2.15s}[data-aos][data-aos][data-aos-delay="2150"],body[data-aos-delay="2150"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2150"].aos-animate,body[data-aos-delay="2150"] [data-aos].aos-animate{transition-delay:2.15s}[data-aos][data-aos][data-aos-duration="2200"],body[data-aos-duration="2200"] [data-aos]{transition-duration:2.2s}[data-aos][data-aos][data-aos-delay="2200"],body[data-aos-delay="2200"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2200"].aos-animate,body[data-aos-delay="2200"] [data-aos].aos-animate{transition-delay:2.2s}[data-aos][data-aos][data-aos-duration="2250"],body[data-aos-duration="2250"] [data-aos]{transition-duration:2.25s}[data-aos][data-aos][data-aos-delay="2250"],body[data-aos-delay="2250"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2250"].aos-animate,body[data-aos-delay="2250"] [data-aos].aos-animate{transition-delay:2.25s}[data-aos][data-aos][data-aos-duration="2300"],body[data-aos-duration="2300"] [data-aos]{transition-duration:2.3s}[data-aos][data-aos][data-aos-delay="2300"],body[data-aos-delay="2300"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2300"].aos-animate,body[data-aos-delay="2300"] [data-aos].aos-animate{transition-delay:2.3s}[data-aos][data-aos][data-aos-duration="2350"],body[data-aos-duration="2350"] [data-aos]{transition-duration:2.35s}[data-aos][data-aos][data-aos-delay="2350"],body[data-aos-delay="2350"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2350"].aos-animate,body[data-aos-delay="2350"] [data-aos].aos-animate{transition-delay:2.35s}[data-aos][data-aos][data-aos-duration="2400"],body[data-aos-duration="2400"] [data-aos]{transition-duration:2.4s}[data-aos][data-aos][data-aos-delay="2400"],body[data-aos-delay="2400"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2400"].aos-animate,body[data-aos-delay="2400"] [data-aos].aos-animate{transition-delay:2.4s}[data-aos][data-aos][data-aos-duration="2450"],body[data-aos-duration="2450"] [data-aos]{transition-duration:2.45s}[data-aos][data-aos][data-aos-delay="2450"],body[data-aos-delay="2450"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2450"].aos-animate,body[data-aos-delay="2450"] [data-aos].aos-animate{transition-delay:2.45s}[data-aos][data-aos][data-aos-duration="2500"],body[data-aos-duration="2500"] [data-aos]{transition-duration:2.5s}[data-aos][data-aos][data-aos-delay="2500"],body[data-aos-delay="2500"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2500"].aos-animate,body[data-aos-delay="2500"] [data-aos].aos-animate{transition-delay:2.5s}[data-aos][data-aos][data-aos-duration="2550"],body[data-aos-duration="2550"] [data-aos]{transition-duration:2.55s}[data-aos][data-aos][data-aos-delay="2550"],body[data-aos-delay="2550"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2550"].aos-animate,body[data-aos-delay="2550"] [data-aos].aos-animate{transition-delay:2.55s}[data-aos][data-aos][data-aos-duration="2600"],body[data-aos-duration="2600"] [data-aos]{transition-duration:2.6s}[data-aos][data-aos][data-aos-delay="2600"],body[data-aos-delay="2600"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2600"].aos-animate,body[data-aos-delay="2600"] [data-aos].aos-animate{transition-delay:2.6s}[data-aos][data-aos][data-aos-duration="2650"],body[data-aos-duration="2650"] [data-aos]{transition-duration:2.65s}[data-aos][data-aos][data-aos-delay="2650"],body[data-aos-delay="2650"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2650"].aos-animate,body[data-aos-delay="2650"] [data-aos].aos-animate{transition-delay:2.65s}[data-aos][data-aos][data-aos-duration="2700"],body[data-aos-duration="2700"] [data-aos]{transition-duration:2.7s}[data-aos][data-aos][data-aos-delay="2700"],body[data-aos-delay="2700"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2700"].aos-animate,body[data-aos-delay="2700"] [data-aos].aos-animate{transition-delay:2.7s}[data-aos][data-aos][data-aos-duration="2750"],body[data-aos-duration="2750"] [data-aos]{transition-duration:2.75s}[data-aos][data-aos][data-aos-delay="2750"],body[data-aos-delay="2750"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2750"].aos-animate,body[data-aos-delay="2750"] [data-aos].aos-animate{transition-delay:2.75s}[data-aos][data-aos][data-aos-duration="2800"],body[data-aos-duration="2800"] [data-aos]{transition-duration:2.8s}[data-aos][data-aos][data-aos-delay="2800"],body[data-aos-delay="2800"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2800"].aos-animate,body[data-aos-delay="2800"] [data-aos].aos-animate{transition-delay:2.8s}[data-aos][data-aos][data-aos-duration="2850"],body[data-aos-duration="2850"] [data-aos]{transition-duration:2.85s}[data-aos][data-aos][data-aos-delay="2850"],body[data-aos-delay="2850"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2850"].aos-animate,body[data-aos-delay="2850"] [data-aos].aos-animate{transition-delay:2.85s}[data-aos][data-aos][data-aos-duration="2900"],body[data-aos-duration="2900"] [data-aos]{transition-duration:2.9s}[data-aos][data-aos][data-aos-delay="2900"],body[data-aos-delay="2900"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2900"].aos-animate,body[data-aos-delay="2900"] [data-aos].aos-animate{transition-delay:2.9s}[data-aos][data-aos][data-aos-duration="2950"],body[data-aos-duration="2950"] [data-aos]{transition-duration:2.95s}[data-aos][data-aos][data-aos-delay="2950"],body[data-aos-delay="2950"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="2950"].aos-animate,body[data-aos-delay="2950"] [data-aos].aos-animate{transition-delay:2.95s}[data-aos][data-aos][data-aos-duration="3000"],body[data-aos-duration="3000"] [data-aos]{transition-duration:3s}[data-aos][data-aos][data-aos-delay="3000"],body[data-aos-delay="3000"] [data-aos]{transition-delay:0}[data-aos][data-aos][data-aos-delay="3000"].aos-animate,body[data-aos-delay="3000"] [data-aos].aos-animate{transition-delay:3s}[data-aos][data-aos][data-aos-easing=linear],body[data-aos-easing=linear] [data-aos]{transition-timing-function:cubic-bezier(.25,.25,.75,.75)}[data-aos][data-aos][data-aos-easing=ease],body[data-aos-easing=ease] [data-aos]{transition-timing-function:ease}[data-aos][data-aos][data-aos-easing=ease-in],body[data-aos-easing=ease-in] [data-aos]{transition-timing-function:ease-in}[data-aos][data-aos][data-aos-easing=ease-out],body[data-aos-easing=ease-out] [data-aos]{transition-timing-function:ease-out}[data-aos][data-aos][data-aos-easing=ease-in-out],body[data-aos-easing=ease-in-out] [data-aos]{transition-timing-function:ease-in-out}[data-aos][data-aos][data-aos-easing=ease-in-back],body[data-aos-easing=ease-in-back] [data-aos]{transition-timing-function:cubic-bezier(.6,-.28,.735,.045)}[data-aos][data-aos][data-aos-easing=ease-out-back],body[data-aos-easing=ease-out-back] [data-aos]{transition-timing-function:cubic-bezier(.175,.885,.32,1.275)}[data-aos][data-aos][data-aos-easing=ease-in-out-back],body[data-aos-easing=ease-in-out-back] [data-aos]{transition-timing-function:cubic-bezier(.68,-.55,.265,1.55)}[data-aos][data-aos][data-aos-easing=ease-in-sine],body[data-aos-easing=ease-in-sine] [data-aos]{transition-timing-function:cubic-bezier(.47,0,.745,.715)}[data-aos][data-aos][data-aos-easing=ease-out-sine],body[data-aos-easing=ease-out-sine] [data-aos]{transition-timing-function:cubic-bezier(.39,.575,.565,1)}[data-aos][data-aos][data-aos-easing=ease-in-out-sine],body[data-aos-easing=ease-in-out-sine] [data-aos]{transition-timing-function:cubic-bezier(.445,.05,.55,.95)}[data-aos][data-aos][data-aos-easing=ease-in-quad],body[data-aos-easing=ease-in-quad] [data-aos]{transition-timing-function:cubic-bezier(.55,.085,.68,.53)}[data-aos][data-aos][data-aos-easing=ease-out-quad],body[data-aos-easing=ease-out-quad] [data-aos]{transition-timing-function:cubic-bezier(.25,.46,.45,.94)}[data-aos][data-aos][data-aos-easing=ease-in-out-quad],body[data-aos-easing=ease-in-out-quad] [data-aos]{transition-timing-function:cubic-bezier(.455,.03,.515,.955)}[data-aos][data-aos][data-aos-easing=ease-in-cubic],body[data-aos-easing=ease-in-cubic] [data-aos]{transition-timing-function:cubic-bezier(.55,.085,.68,.53)}[data-aos][data-aos][data-aos-easing=ease-out-cubic],body[data-aos-easing=ease-out-cubic] [data-aos]{transition-timing-function:cubic-bezier(.25,.46,.45,.94)}[data-aos][data-aos][data-aos-easing=ease-in-out-cubic],body[data-aos-easing=ease-in-out-cubic] [data-aos]{transition-timing-function:cubic-bezier(.455,.03,.515,.955)}[data-aos][data-aos][data-aos-easing=ease-in-quart],body[data-aos-easing=ease-in-quart] [data-aos]{transition-timing-function:cubic-bezier(.55,.085,.68,.53)}[data-aos][data-aos][data-aos-easing=ease-out-quart],body[data-aos-easing=ease-out-quart] [data-aos]{transition-timing-function:cubic-bezier(.25,.46,.45,.94)}[data-aos][data-aos][data-aos-easing=ease-in-out-quart],body[data-aos-easing=ease-in-out-quart] [data-aos]{transition-timing-function:cubic-bezier(.455,.03,.515,.955)}[data-aos^=fade][data-aos^=fade]{opacity:0;transition-property:opacity,transform}[data-aos^=fade][data-aos^=fade].aos-animate{opacity:1;transform:translateZ(0)}[data-aos=fade-up]{transform:translate3d(0,100px,0)}[data-aos=fade-down]{transform:translate3d(0,-100px,0)}[data-aos=fade-right]{transform:translate3d(-100px,0,0)}[data-aos=fade-left]{transform:translate3d(100px,0,0)}[data-aos=fade-up-right]{transform:translate3d(-100px,100px,0)}[data-aos=fade-up-left]{transform:translate3d(100px,100px,0)}[data-aos=fade-down-right]{transform:translate3d(-100px,-100px,0)}[data-aos=fade-down-left]{transform:translate3d(100px,-100px,0)}[data-aos^=zoom][data-aos^=zoom]{opacity:0;transition-property:opacity,transform}[data-aos^=zoom][data-aos^=zoom].aos-animate{opacity:1;transform:translateZ(0) scale(1)}[data-aos=zoom-in]{transform:scale(.6)}[data-aos=zoom-in-up]{transform:translate3d(0,100px,0) scale(.6)}[data-aos=zoom-in-down]{transform:translate3d(0,-100px,0) scale(.6)}[data-aos=zoom-in-right]{transform:translate3d(-100px,0,0) scale(.6)}[data-aos=zoom-in-left]{transform:translate3d(100px,0,0) scale(.6)}[data-aos=zoom-out]{transform:scale(1.2)}[data-aos=zoom-out-up]{transform:translate3d(0,100px,0) scale(1.2)}[data-aos=zoom-out-down]{transform:translate3d(0,-100px,0) scale(1.2)}[data-aos=zoom-out-right]{transform:translate3d(-100px,0,0) scale(1.2)}[data-aos=zoom-out-left]{transform:translate3d(100px,0,0) scale(1.2)}[data-aos^=slide][data-aos^=slide]{transition-property:transform}[data-aos^=slide][data-aos^=slide].aos-animate{transform:translateZ(0)}[data-aos=slide-up]{transform:translate3d(0,100%,0)}[data-aos=slide-down]{transform:translate3d(0,-100%,0)}[data-aos=slide-right]{transform:translate3d(-100%,0,0)}[data-aos=slide-left]{transform:translate3d(100%,0,0)}[data-aos^=flip][data-aos^=flip]{backface-visibility:hidden;transition-property:transform}[data-aos=flip-left]{transform:perspective(2500px) rotateY(-100deg)}[data-aos=flip-left].aos-animate{transform:perspective(2500px) rotateY(0)}[data-aos=flip-right]{transform:perspective(2500px) rotateY(100deg)}[data-aos=flip-right].aos-animate{transform:perspective(2500px) rotateY(0)}[data-aos=flip-up]{transform:perspective(2500px) rotateX(-100deg)}[data-aos=flip-up].aos-animate{transform:perspective(2500px) rotateX(0)}[data-aos=flip-down]{transform:perspective(2500px) rotateX(100deg)}[data-aos=flip-down].aos-animate{transform:perspective(2500px) rotateX(0)} \ No newline at end of file diff --git a/html/css/common.css b/html/css/common.css new file mode 100644 index 0000000..37c64e8 --- /dev/null +++ b/html/css/common.css @@ -0,0 +1,57 @@ +@charset "utf-8"; + +body,html{ + overflow-y: hidden !important; +} + +/* 본문 바로가기 */ +#skip_to_container a {z-index:100000;position:absolute;top:0;left:0;width:1px;height:1px;font-size:0;line-height:0;overflow:hidden} +#skip_to_container a:focus, #skip_to_container a:active {width:100%;height:75px;background:#21272e;color:#fff;font-size:2em;font-weight:bold;text-align:center;text-decoration:none;line-height:3.3em} + +/*header*/ +#hd {z-index:1000;position:fixed;width:100%; top:0;overflow:hidden; transition:0.6s ease; -webkit-transition:0.6s ease;} +#hd:hover{background:#fff; border-bottom:1px solid #ddd;} +#hd_h1 {position:absolute;font-size:0;line-height:0;overflow:hidden} +#logo a{display:block;padding:20px;} +#logo a img{width:200px;} +#hd_wrapper{display:flex;width:100%;justify-content: space-between;} + +/* nav */ +#gnb{position:relative;width:calc(100% - 250px);} +#gnb h2{position:absolute;font-size:0;line-height:0;overflow:hidden} +#gnb .gnb_wrap{margin:0 auto;position:relative;} +#gnb #gnb_1dul {font-size:1.083em;padding:0 30px;display: flex;justify-content: flex-end;width:100%;} +#gnb ul:after {display:block;visibility:hidden;clear:both;content:""} +#gnb .gnb_1dli{line-height:100px;position:relative;width:25%;max-width:220px;} + +.gnb_1dli .bg{display:none;width:10px;height:10px;overflow:hidden;background:url(../img/gnb_bg2.gif) no-repeat 50% 50%;text-indent:-999px} +.gnb_1da {width:100%;display:inline-block;font-weight:500;color:#fff;text-decoration:none; font-size:20px;} +.gnb_2dli{line-height:36px; padding:0 0 10px; font-size:18px; font-weight:400;} +.gnb_2dli:first-child{border:0} +.gnb_2dul {display:block;padding: 0; height:0; overflow:hidden;} +.gnb_2da {color:#222;text-align:left;text-decoration:none} + + +/*slidesNav*/ +#fp-nav ul li a span, .fp-slidesNav ul li a span{background:rgba(255,255,255,0.8)} +/*section*/ +.inner{width:1280px;margin:0px auto;position:absolute;left:50%;top:50%;transform: translate(-50%,-50%);} +.inner div b{color:#fff;} +.main-bn{position: relative;} +.main-bn h2{font-size:3rem;font-weight:500;color:rgba(255,255,255,0.8);} +.main-bn .big{display:block;font-size:6rem;color:#fff;font-weight:bold;} +.main-bn .sm{display:block;font-size:1.25rem;color:rgba(255,255,255,0.8);margin:10px 0 0 10px;} +.main-bn .txt-box{font-size:1.25rem;font-weight:300;color:rgba(255,255,255,0.8);line-height:1.5;} +.main-bn .txt-box b{font-size:3rem;} +.bg-canvas{position: absolute;top:0;opacity:0.3;} +.bg01{background:url('../images/bg01.jpg');} +.bg02{background:url('../images/bg02.jpg');} +.scroll-animation {position:absolute;left:50%;transform: translateX(-50%);bottom:40px;} +.scroll-box span{display:block;text-align:center;color:rgba(255,255,255,0.8);font-size:0.875rem;font-weight:300;animation: updown 1s ease-in-out 0.3s infinite normal;} +.scroll-box span.scroll-icon{margin:10px auto;fill:#fff;width:30px;} +.scroll-box span.scroll-icon img{width:100%;} +@keyframes updown{ + 0% { transform: translateY(0); } + 50% { transform: translateY(-5px); } + 100% { transform: translateY(0px); } + } diff --git a/html/css/common_version02.css b/html/css/common_version02.css new file mode 100644 index 0000000..044c8c4 --- /dev/null +++ b/html/css/common_version02.css @@ -0,0 +1,27 @@ +@charset "utf-8"; + +/*header*/ +#header{border-bottom:1px solid #f4f4f4;background:rgba(255,255,255,0.5);position:fixed;z-index:999;width:100%;} +#header .header-wrap{width:100%;height:100px;padding:0 20px;display:flex;align-items: center;justify-content: space-between;} +#header .logo h1 a{width:100%;height:100%;display:block;} +#header .logo h1 img{width:200px;} +#header .nav{width:calc(100% - 250px);} +#header .nav > ul{display: flex;justify-content: flex-end;align-items: center;} +#header .nav > ul > li{max-width:180px;width:25%;height:100px;line-height:100px;text-align:center;position: relative;} +#header .nav > ul > li > a{font-size:1.125em;font-weight:500;width:100%;display:block;height:100%; + -webkit-transition: all .25s ease; + -moz-transition: all .25s ease; + -ms-transition: all .25s ease; + -o-transition: all .25s ease; + transition: all .25s ease; +} +#header .nav ul.submenu {opacity:0;position: absolute;z-index: 99;top:100px;visibility: hidden;width:100%;background:#f4f4f4;} +#header .nav ul.submenu li{width:100%;height:60px;line-height:60px;} +#header .nav ul.submenu li a{width:100%;display:block;} +#header .nav li:hover ul.submenu {opacity: 1;visibility: visible;} +#header .nav li:hover ul.submenu a:hover {background: #ddd;} +#submenu a {background-color:#000000;} + +.main-v{height:calc(100vh - 200px);background:green} +.swiper-container{height:100%;} +.slide-box{display:flex;justify-content:center;align-items:center;font-size:100px;} diff --git a/html/css/font.css b/html/css/font.css new file mode 100644 index 0000000..48dde90 --- /dev/null +++ b/html/css/font.css @@ -0,0 +1,241 @@ +@charset "utf-8"; + +/* 에스코어드림 */ +@font-face { + font-family: 'score'; + font-style: normal; + font-weight: 100; + src:url('font/S-CoreDream-1Thin.eot'); + src:url('font/S-CoreDream-1Thin.eot?#iefix') format('embedded-opentype'), + url('font/S-CoreDream-1Thin.woff') format('woff'), + url('font/S-CoreDream-1Thin.woff2') format('woff2'), + url('font/S-CoreDream-1Thin.ttf') format('truetype'); +} + +@font-face { + font-family: 'score'; + font-style: normal; + font-weight: 200; + src:url('font/S-CoreDream-2ExtraLight.eot'); + src:url('font/S-CoreDream-2ExtraLight.eot?#iefix') format('embedded-opentype'), + url('font/S-CoreDream-2ExtraLight.woff') format('woff'), + url('font/S-CoreDream-2ExtraLight.woff2') format('woff2'), + url('font/S-CoreDream-2ExtraLight.ttf') format('truetype'); +} + +@font-face { + font-family: 'score'; + font-style: normal; + font-weight: 300; + src:url('font/S-CoreDream-3Light.eot'); + src:url('font/S-CoreDream-3Light.eot?#iefix') format('embedded-opentype'), + url('font/S-CoreDream-3Light.woff') format('woff'), + url('font/S-CoreDream-3Light.woff2') format('woff2'), + url('font/S-CoreDream-3Light.ttf') format('truetype'); +} + +@font-face { + font-family: 'score'; + font-style: normal; + font-weight: 400; + src:url('font/S-CoreDream-4Regular.eot'); + src:url('font/S-CoreDream-4Regular.eot?#iefix') format('embedded-opentype'), + url('font/S-CoreDream-4Regular.woff') format('woff'), + url('font/S-CoreDream-4Regular.woff2') format('woff2'), + url('font/S-CoreDream-4Regular.ttf') format('truetype'); +} + +@font-face { + font-family: 'score'; + font-style: normal; + font-weight: 500; + src:url('font/S-CoreDream-5Medium.eot'); + src:url('font/S-CoreDream-5Medium.eot?#iefix') format('embedded-opentype'), + url('font/S-CoreDream-5Medium.woff') format('woff'), + url('font/S-CoreDream-5Medium.woff2') format('woff2'), + url('font/S-CoreDream-5Medium.ttf') format('truetype'); +} + +@font-face { + font-family: 'score'; + font-style: normal; + font-weight: 600; + src:url('font/S-CoreDream-6Bold.eot'); + src:url('font/S-CoreDream-6Bold.eot?#iefix') format('embedded-opentype'), + url('font/S-CoreDream-6Bold.woff') format('woff'), + url('font/S-CoreDream-6Bold.woff2') format('woff2'), + url('font/S-CoreDream-6Bold.ttf') format('truetype'); +} + +@font-face { + font-family: 'score'; + font-style: normal; + font-weight: 700; + src:url('font/S-CoreDream-7ExtraBold.eot'); + src:url('font/S-CoreDream-7ExtraBold.eot?#iefix') format('embedded-opentype'), + url('font/S-CoreDream-7ExtraBold.woff') format('woff'), + url('font/S-CoreDream-7ExtraBold.woff2') format('woff2'), + url('font/S-CoreDream-7ExtraBold.ttf') format('truetype'); +} + +@font-face { + font-family: 'score'; + font-style: normal; + font-weight: 800; + src:url('font/S-CoreDream-8Heavy.eot'); + src:url('font/S-CoreDream-8Heavy.eot?#iefix') format('embedded-opentype'), + url('font/S-CoreDream-8Heavy.woff') format('woff'), + url('font/S-CoreDream-8Heavy.woff2') format('woff2'), + url('font/S-CoreDream-8Heavy.ttf') format('truetype'); +} + +@font-face { + font-family: 'score'; + font-style: normal; + font-weight: 900; + src:url('font/S-CoreDream-9Black.eot'); + src:url('font/S-CoreDream-9Black.eot?#iefix') format('embedded-opentype'), + url('font/S-CoreDream-9Black.woff') format('woff'), + url('font/S-CoreDream-9Black.woff2') format('woff2'), + url('font/S-CoreDream-9Black.ttf') format('truetype'); +} +/*Montserrat*/ +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-Thin.ttf') format('truetype'), + font-weight:100; + font-style:normal; +} +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-ThinItalic.ttf') format('truetype'), + font-weight:100; + font-style:italic; +} +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-Light.ttf') format('truetype'), + font-weight:200; + font-style:normal; +} +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-LightItalic.ttf') format('truetype'), + font-weight:200; + font-style:italic; +} + +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-Medium.ttf') format('truetype'), + font-weight:300; + font-style:normal; +} +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-MediumItalic.ttf') format('truetype'), + font-weight:300; + font-style:italic; +} +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-SemiBold.ttf') format('truetype'), + font-weight:500; + font-style:normal; +} +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-SemiBold.ttf') format('truetype'), + font-weight:500; + font-style:italic; +} +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-Bold.ttf') format('truetype'), + font-weight:600; + font-style:normal; +} +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-BoldItalic.ttf') format('truetype'), + font-weight:600; + font-style:italic; +} +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-Black.ttf') format('truetype'), + font-weight:900; + font-style:normal; +} +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-BlackItalic.ttf') format('truetype'), + font-weight:900; + font-style:italic; +} +/*NotoSansKR*/ +@font-face { + font-family:"NotoSansKR"; + src: + url('../font/NotoSansKR-Thin.otf') format('opentype'), + url('../font/NotoSansKR-Thin.woff') format('woff'), + url('../font/NotoSansKR-Thin.woff2') format('woff2'); + font-weight:100; + font-style:normal; +} +@font-face { + font-family:"NotoSansKR"; + src: + url('../font/NotoSansKR-Light.otf') format('opentype'), + url('../font/NotoSansKR-Light.woff') format('woff'), + url('../font/NotoSansKR-Light.woff2') format('woff2'); + font-weight:300; + font-style:normal; +} +@font-face { + font-family:"NotoSansKR"; + src: + url('../font/NotoSansKR-Regular.otf') format('opentype'), + url('../font/NotoSansKR-Regular.woff') format('woff'), + url('../font/NotoSansKR-Regular.woff2') format('woff2'); + font-weight:400; + font-style:normal; +} +@font-face { + font-family:"NotoSansKR"; + src: + url('../font/NotoSansKR-Medium.otf') format('opentype'), + url('../font/NotoSansKR-Medium.woff') format('woff'), + url('../font/NotoSansKR-Medium.woff2') format('woff2'); + font-weight:500; + font-style:normal; +} +@font-face { + font-family:"NotoSansKR"; + src: + url('../font/NotoSansKR-Bold.otf') format('opentype'), + url('../font/NotoSansKR-Bold.woff') format('woff'), + url('../font/NotoSansKR-Bold.woff2') format('woff2'); + font-weight:900; + font-style:normal; +} +/*나눔스퀘어라운드*/ +@font-face {font-family:"NanumSquareRound", 맑은고딕, Arial,sans-serif, Dotum, 돋움, "Apple SD Gothic Neo", arial;} +@font-face { + font-family: 'NanumSquareRound'; + src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_two@1.0/NanumSquareRound.woff') format('woff'); + font-weight: normal; + font-style: normal; +} diff --git a/html/css/font/Montserrat-Black.ttf b/html/css/font/Montserrat-Black.ttf new file mode 100644 index 0000000..93b8bab Binary files /dev/null and b/html/css/font/Montserrat-Black.ttf differ diff --git a/html/css/font/Montserrat-BlackItalic.ttf b/html/css/font/Montserrat-BlackItalic.ttf new file mode 100644 index 0000000..438630e Binary files /dev/null and b/html/css/font/Montserrat-BlackItalic.ttf differ diff --git a/html/css/font/Montserrat-Bold.ttf b/html/css/font/Montserrat-Bold.ttf new file mode 100644 index 0000000..55e0b1a Binary files /dev/null and b/html/css/font/Montserrat-Bold.ttf differ diff --git a/html/css/font/Montserrat-BoldItalic.ttf b/html/css/font/Montserrat-BoldItalic.ttf new file mode 100644 index 0000000..6b4541d Binary files /dev/null and b/html/css/font/Montserrat-BoldItalic.ttf differ diff --git a/html/css/font/Montserrat-ExtraBold.ttf b/html/css/font/Montserrat-ExtraBold.ttf new file mode 100644 index 0000000..7b4f267 Binary files /dev/null and b/html/css/font/Montserrat-ExtraBold.ttf differ diff --git a/html/css/font/Montserrat-ExtraBoldItalic.ttf b/html/css/font/Montserrat-ExtraBoldItalic.ttf new file mode 100644 index 0000000..66ccd46 Binary files /dev/null and b/html/css/font/Montserrat-ExtraBoldItalic.ttf differ diff --git a/html/css/font/Montserrat-ExtraLight.ttf b/html/css/font/Montserrat-ExtraLight.ttf new file mode 100644 index 0000000..532cbb5 Binary files /dev/null and b/html/css/font/Montserrat-ExtraLight.ttf differ diff --git a/html/css/font/Montserrat-ExtraLightItalic.ttf b/html/css/font/Montserrat-ExtraLightItalic.ttf new file mode 100644 index 0000000..150591a Binary files /dev/null and b/html/css/font/Montserrat-ExtraLightItalic.ttf differ diff --git a/html/css/font/Montserrat-Italic.ttf b/html/css/font/Montserrat-Italic.ttf new file mode 100644 index 0000000..be99e1c Binary files /dev/null and b/html/css/font/Montserrat-Italic.ttf differ diff --git a/html/css/font/Montserrat-Light.ttf b/html/css/font/Montserrat-Light.ttf new file mode 100644 index 0000000..2c91484 Binary files /dev/null and b/html/css/font/Montserrat-Light.ttf differ diff --git a/html/css/font/Montserrat-LightItalic.ttf b/html/css/font/Montserrat-LightItalic.ttf new file mode 100644 index 0000000..7082e03 Binary files /dev/null and b/html/css/font/Montserrat-LightItalic.ttf differ diff --git a/html/css/font/Montserrat-Medium.ttf b/html/css/font/Montserrat-Medium.ttf new file mode 100644 index 0000000..0f0fd1d Binary files /dev/null and b/html/css/font/Montserrat-Medium.ttf differ diff --git a/html/css/font/Montserrat-MediumItalic.ttf b/html/css/font/Montserrat-MediumItalic.ttf new file mode 100644 index 0000000..5bd6dd2 Binary files /dev/null and b/html/css/font/Montserrat-MediumItalic.ttf differ diff --git a/html/css/font/Montserrat-Regular.ttf b/html/css/font/Montserrat-Regular.ttf new file mode 100644 index 0000000..1cd0259 Binary files /dev/null and b/html/css/font/Montserrat-Regular.ttf differ diff --git a/html/css/font/Montserrat-SemiBold.ttf b/html/css/font/Montserrat-SemiBold.ttf new file mode 100644 index 0000000..ccaba1a Binary files /dev/null and b/html/css/font/Montserrat-SemiBold.ttf differ diff --git a/html/css/font/Montserrat-SemiBoldItalic.ttf b/html/css/font/Montserrat-SemiBoldItalic.ttf new file mode 100644 index 0000000..b8278b9 Binary files /dev/null and b/html/css/font/Montserrat-SemiBoldItalic.ttf differ diff --git a/html/css/font/Montserrat-Thin.ttf b/html/css/font/Montserrat-Thin.ttf new file mode 100644 index 0000000..a6d0321 Binary files /dev/null and b/html/css/font/Montserrat-Thin.ttf differ diff --git a/html/css/font/Montserrat-ThinItalic.ttf b/html/css/font/Montserrat-ThinItalic.ttf new file mode 100644 index 0000000..585c82b Binary files /dev/null and b/html/css/font/Montserrat-ThinItalic.ttf differ diff --git a/html/css/font/NotoSansKR-Black.otf b/html/css/font/NotoSansKR-Black.otf new file mode 100644 index 0000000..2b54d19 Binary files /dev/null and b/html/css/font/NotoSansKR-Black.otf differ diff --git a/html/css/font/NotoSansKR-Black.woff b/html/css/font/NotoSansKR-Black.woff new file mode 100644 index 0000000..90ef003 Binary files /dev/null and b/html/css/font/NotoSansKR-Black.woff differ diff --git a/html/css/font/NotoSansKR-Black.woff2 b/html/css/font/NotoSansKR-Black.woff2 new file mode 100644 index 0000000..8953c8f Binary files /dev/null and b/html/css/font/NotoSansKR-Black.woff2 differ diff --git a/html/css/font/NotoSansKR-Bold.otf b/html/css/font/NotoSansKR-Bold.otf new file mode 100644 index 0000000..2b78dd8 Binary files /dev/null and b/html/css/font/NotoSansKR-Bold.otf differ diff --git a/html/css/font/NotoSansKR-Bold.woff b/html/css/font/NotoSansKR-Bold.woff new file mode 100644 index 0000000..74b20d4 Binary files /dev/null and b/html/css/font/NotoSansKR-Bold.woff differ diff --git a/html/css/font/NotoSansKR-Bold.woff2 b/html/css/font/NotoSansKR-Bold.woff2 new file mode 100644 index 0000000..216f94d Binary files /dev/null and b/html/css/font/NotoSansKR-Bold.woff2 differ diff --git a/html/css/font/NotoSansKR-Light.otf b/html/css/font/NotoSansKR-Light.otf new file mode 100644 index 0000000..ecab31a Binary files /dev/null and b/html/css/font/NotoSansKR-Light.otf differ diff --git a/html/css/font/NotoSansKR-Light.woff b/html/css/font/NotoSansKR-Light.woff new file mode 100644 index 0000000..40aabd2 Binary files /dev/null and b/html/css/font/NotoSansKR-Light.woff differ diff --git a/html/css/font/NotoSansKR-Light.woff2 b/html/css/font/NotoSansKR-Light.woff2 new file mode 100644 index 0000000..6b7cd13 Binary files /dev/null and b/html/css/font/NotoSansKR-Light.woff2 differ diff --git a/html/css/font/NotoSansKR-Medium.otf b/html/css/font/NotoSansKR-Medium.otf new file mode 100644 index 0000000..371959d Binary files /dev/null and b/html/css/font/NotoSansKR-Medium.otf differ diff --git a/html/css/font/NotoSansKR-Medium.woff b/html/css/font/NotoSansKR-Medium.woff new file mode 100644 index 0000000..e15aae0 Binary files /dev/null and b/html/css/font/NotoSansKR-Medium.woff differ diff --git a/html/css/font/NotoSansKR-Medium.woff2 b/html/css/font/NotoSansKR-Medium.woff2 new file mode 100644 index 0000000..b976680 Binary files /dev/null and b/html/css/font/NotoSansKR-Medium.woff2 differ diff --git a/html/css/font/NotoSansKR-Regular.otf b/html/css/font/NotoSansKR-Regular.otf new file mode 100644 index 0000000..7ba76b4 Binary files /dev/null and b/html/css/font/NotoSansKR-Regular.otf differ diff --git a/html/css/font/NotoSansKR-Regular.woff b/html/css/font/NotoSansKR-Regular.woff new file mode 100644 index 0000000..40fab25 Binary files /dev/null and b/html/css/font/NotoSansKR-Regular.woff differ diff --git a/html/css/font/NotoSansKR-Regular.woff2 b/html/css/font/NotoSansKR-Regular.woff2 new file mode 100644 index 0000000..61d0646 Binary files /dev/null and b/html/css/font/NotoSansKR-Regular.woff2 differ diff --git a/html/css/font/NotoSansKR-Thin.otf b/html/css/font/NotoSansKR-Thin.otf new file mode 100644 index 0000000..06c5662 Binary files /dev/null and b/html/css/font/NotoSansKR-Thin.otf differ diff --git a/html/css/font/NotoSansKR-Thin.woff b/html/css/font/NotoSansKR-Thin.woff new file mode 100644 index 0000000..4072373 Binary files /dev/null and b/html/css/font/NotoSansKR-Thin.woff differ diff --git a/html/css/font/NotoSansKR-Thin.woff2 b/html/css/font/NotoSansKR-Thin.woff2 new file mode 100644 index 0000000..7835c23 Binary files /dev/null and b/html/css/font/NotoSansKR-Thin.woff2 differ diff --git a/html/css/font/S-CoreDream-1Thin.eot b/html/css/font/S-CoreDream-1Thin.eot new file mode 100644 index 0000000..96934b6 Binary files /dev/null and b/html/css/font/S-CoreDream-1Thin.eot differ diff --git a/html/css/font/S-CoreDream-1Thin.ttf b/html/css/font/S-CoreDream-1Thin.ttf new file mode 100644 index 0000000..6a8b575 Binary files /dev/null and b/html/css/font/S-CoreDream-1Thin.ttf differ diff --git a/html/css/font/S-CoreDream-1Thin.woff b/html/css/font/S-CoreDream-1Thin.woff new file mode 100644 index 0000000..a2aefdf Binary files /dev/null and b/html/css/font/S-CoreDream-1Thin.woff differ diff --git a/html/css/font/S-CoreDream-1Thin.woff2 b/html/css/font/S-CoreDream-1Thin.woff2 new file mode 100644 index 0000000..ac7e132 Binary files /dev/null and b/html/css/font/S-CoreDream-1Thin.woff2 differ diff --git a/html/css/font/S-CoreDream-2ExtraLight.eot b/html/css/font/S-CoreDream-2ExtraLight.eot new file mode 100644 index 0000000..ffa137b Binary files /dev/null and b/html/css/font/S-CoreDream-2ExtraLight.eot differ diff --git a/html/css/font/S-CoreDream-2ExtraLight.ttf b/html/css/font/S-CoreDream-2ExtraLight.ttf new file mode 100644 index 0000000..19452ba Binary files /dev/null and b/html/css/font/S-CoreDream-2ExtraLight.ttf differ diff --git a/html/css/font/S-CoreDream-2ExtraLight.woff b/html/css/font/S-CoreDream-2ExtraLight.woff new file mode 100644 index 0000000..894fbf0 Binary files /dev/null and b/html/css/font/S-CoreDream-2ExtraLight.woff differ diff --git a/html/css/font/S-CoreDream-2ExtraLight.woff2 b/html/css/font/S-CoreDream-2ExtraLight.woff2 new file mode 100644 index 0000000..cdc886f Binary files /dev/null and b/html/css/font/S-CoreDream-2ExtraLight.woff2 differ diff --git a/html/css/font/S-CoreDream-3Light.eot b/html/css/font/S-CoreDream-3Light.eot new file mode 100644 index 0000000..2208a28 Binary files /dev/null and b/html/css/font/S-CoreDream-3Light.eot differ diff --git a/html/css/font/S-CoreDream-3Light.ttf b/html/css/font/S-CoreDream-3Light.ttf new file mode 100644 index 0000000..3c81df7 Binary files /dev/null and b/html/css/font/S-CoreDream-3Light.ttf differ diff --git a/html/css/font/S-CoreDream-3Light.woff b/html/css/font/S-CoreDream-3Light.woff new file mode 100644 index 0000000..260ecac Binary files /dev/null and b/html/css/font/S-CoreDream-3Light.woff differ diff --git a/html/css/font/S-CoreDream-3Light.woff2 b/html/css/font/S-CoreDream-3Light.woff2 new file mode 100644 index 0000000..fa6f0aa Binary files /dev/null and b/html/css/font/S-CoreDream-3Light.woff2 differ diff --git a/html/css/font/S-CoreDream-4Regular.eot b/html/css/font/S-CoreDream-4Regular.eot new file mode 100644 index 0000000..5c317a0 Binary files /dev/null and b/html/css/font/S-CoreDream-4Regular.eot differ diff --git a/html/css/font/S-CoreDream-4Regular.ttf b/html/css/font/S-CoreDream-4Regular.ttf new file mode 100644 index 0000000..4e592d8 Binary files /dev/null and b/html/css/font/S-CoreDream-4Regular.ttf differ diff --git a/html/css/font/S-CoreDream-4Regular.woff b/html/css/font/S-CoreDream-4Regular.woff new file mode 100644 index 0000000..1150cfc Binary files /dev/null and b/html/css/font/S-CoreDream-4Regular.woff differ diff --git a/html/css/font/S-CoreDream-4Regular.woff2 b/html/css/font/S-CoreDream-4Regular.woff2 new file mode 100644 index 0000000..8f4b578 Binary files /dev/null and b/html/css/font/S-CoreDream-4Regular.woff2 differ diff --git a/html/css/font/S-CoreDream-5Medium.eot b/html/css/font/S-CoreDream-5Medium.eot new file mode 100644 index 0000000..f317b1c Binary files /dev/null and b/html/css/font/S-CoreDream-5Medium.eot differ diff --git a/html/css/font/S-CoreDream-5Medium.ttf b/html/css/font/S-CoreDream-5Medium.ttf new file mode 100644 index 0000000..91eb406 Binary files /dev/null and b/html/css/font/S-CoreDream-5Medium.ttf differ diff --git a/html/css/font/S-CoreDream-5Medium.woff b/html/css/font/S-CoreDream-5Medium.woff new file mode 100644 index 0000000..53f6691 Binary files /dev/null and b/html/css/font/S-CoreDream-5Medium.woff differ diff --git a/html/css/font/S-CoreDream-5Medium.woff2 b/html/css/font/S-CoreDream-5Medium.woff2 new file mode 100644 index 0000000..7be4dcb Binary files /dev/null and b/html/css/font/S-CoreDream-5Medium.woff2 differ diff --git a/html/css/font/S-CoreDream-6Bold.eot b/html/css/font/S-CoreDream-6Bold.eot new file mode 100644 index 0000000..47281f3 Binary files /dev/null and b/html/css/font/S-CoreDream-6Bold.eot differ diff --git a/html/css/font/S-CoreDream-6Bold.ttf b/html/css/font/S-CoreDream-6Bold.ttf new file mode 100644 index 0000000..413a51d Binary files /dev/null and b/html/css/font/S-CoreDream-6Bold.ttf differ diff --git a/html/css/font/S-CoreDream-6Bold.woff b/html/css/font/S-CoreDream-6Bold.woff new file mode 100644 index 0000000..19f4e38 Binary files /dev/null and b/html/css/font/S-CoreDream-6Bold.woff differ diff --git a/html/css/font/S-CoreDream-6Bold.woff2 b/html/css/font/S-CoreDream-6Bold.woff2 new file mode 100644 index 0000000..8fc53a7 Binary files /dev/null and b/html/css/font/S-CoreDream-6Bold.woff2 differ diff --git a/html/css/font/S-CoreDream-7ExtraBold.eot b/html/css/font/S-CoreDream-7ExtraBold.eot new file mode 100644 index 0000000..e51d546 Binary files /dev/null and b/html/css/font/S-CoreDream-7ExtraBold.eot differ diff --git a/html/css/font/S-CoreDream-7ExtraBold.ttf b/html/css/font/S-CoreDream-7ExtraBold.ttf new file mode 100644 index 0000000..ace547d Binary files /dev/null and b/html/css/font/S-CoreDream-7ExtraBold.ttf differ diff --git a/html/css/font/S-CoreDream-7ExtraBold.woff b/html/css/font/S-CoreDream-7ExtraBold.woff new file mode 100644 index 0000000..bb3234d Binary files /dev/null and b/html/css/font/S-CoreDream-7ExtraBold.woff differ diff --git a/html/css/font/S-CoreDream-7ExtraBold.woff2 b/html/css/font/S-CoreDream-7ExtraBold.woff2 new file mode 100644 index 0000000..f61ffab Binary files /dev/null and b/html/css/font/S-CoreDream-7ExtraBold.woff2 differ diff --git a/html/css/font/S-CoreDream-8Heavy.eot b/html/css/font/S-CoreDream-8Heavy.eot new file mode 100644 index 0000000..664ce19 Binary files /dev/null and b/html/css/font/S-CoreDream-8Heavy.eot differ diff --git a/html/css/font/S-CoreDream-8Heavy.ttf b/html/css/font/S-CoreDream-8Heavy.ttf new file mode 100644 index 0000000..8c0d4ca Binary files /dev/null and b/html/css/font/S-CoreDream-8Heavy.ttf differ diff --git a/html/css/font/S-CoreDream-8Heavy.woff b/html/css/font/S-CoreDream-8Heavy.woff new file mode 100644 index 0000000..8e14f23 Binary files /dev/null and b/html/css/font/S-CoreDream-8Heavy.woff differ diff --git a/html/css/font/S-CoreDream-8Heavy.woff2 b/html/css/font/S-CoreDream-8Heavy.woff2 new file mode 100644 index 0000000..f15625b Binary files /dev/null and b/html/css/font/S-CoreDream-8Heavy.woff2 differ diff --git a/html/css/font/S-CoreDream-9Black.eot b/html/css/font/S-CoreDream-9Black.eot new file mode 100644 index 0000000..a2bd7ec Binary files /dev/null and b/html/css/font/S-CoreDream-9Black.eot differ diff --git a/html/css/font/S-CoreDream-9Black.ttf b/html/css/font/S-CoreDream-9Black.ttf new file mode 100644 index 0000000..0fa3610 Binary files /dev/null and b/html/css/font/S-CoreDream-9Black.ttf differ diff --git a/html/css/font/S-CoreDream-9Black.woff b/html/css/font/S-CoreDream-9Black.woff new file mode 100644 index 0000000..73205a5 Binary files /dev/null and b/html/css/font/S-CoreDream-9Black.woff differ diff --git a/html/css/font/S-CoreDream-9Black.woff2 b/html/css/font/S-CoreDream-9Black.woff2 new file mode 100644 index 0000000..b3e0c0f Binary files /dev/null and b/html/css/font/S-CoreDream-9Black.woff2 differ diff --git a/html/css/fullpage.css b/html/css/fullpage.css new file mode 100644 index 0000000..a338335 --- /dev/null +++ b/html/css/fullpage.css @@ -0,0 +1,236 @@ +/*! + * fullPage 3.0.8 + * https://github.com/alvarotrigo/fullPage.js + * + * @license GPLv3 for open source use only + * or Fullpage Commercial License for commercial use + * http://alvarotrigo.com/fullPage/pricing/ + * + * Copyright (C) 2018 http://alvarotrigo.com/fullPage - A project by Alvaro Trigo + */ +html.fp-enabled, +.fp-enabled body { + margin: 0; + padding: 0; + overflow:hidden; + + /*Avoid flicker on slides transitions for mobile phones #336 */ + -webkit-tap-highlight-color: rgba(0,0,0,0); +} +.fp-section { + position: relative; + -webkit-box-sizing: border-box; /* Safari<=5 Android<=3 */ + -moz-box-sizing: border-box; /* <=28 */ + box-sizing: border-box; +} +.fp-slide { + float: left; +} +.fp-slide, .fp-slidesContainer { + height: 100%; + display: block; +} +.fp-slides { + z-index:1; + height: 100%; + overflow: hidden; + position: relative; + -webkit-transition: all 0.3s ease-out; /* Safari<=6 Android<=4.3 */ + transition: all 0.3s ease-out; +} +.fp-section.fp-table, .fp-slide.fp-table { + display: table; + table-layout:fixed; + width: 100%; +} +.fp-tableCell { + display: table-cell; + vertical-align: middle; + width: 100%; + height: 100%; +} +.fp-slidesContainer { + float: left; + position: relative; +} +.fp-controlArrow { + -webkit-user-select: none; /* webkit (safari, chrome) browsers */ + -moz-user-select: none; /* mozilla browsers */ + -khtml-user-select: none; /* webkit (konqueror) browsers */ + -ms-user-select: none; /* IE10+ */ + position: absolute; + z-index: 4; + top: 50%; + cursor: pointer; + width: 0; + height: 0; + border-style: solid; + margin-top: -38px; + -webkit-transform: translate3d(0,0,0); + -ms-transform: translate3d(0,0,0); + transform: translate3d(0,0,0); +} +.fp-controlArrow.fp-prev { + left: 15px; + width: 0; + border-width: 38.5px 34px 38.5px 0; + border-color: transparent #fff transparent transparent; +} +.fp-controlArrow.fp-next { + right: 15px; + border-width: 38.5px 0 38.5px 34px; + border-color: transparent transparent transparent #fff; +} +.fp-scrollable { + overflow: hidden; + position: relative; +} +.fp-scroller{ + overflow: hidden; +} +.iScrollIndicator{ + border: 0 !important; +} +.fp-notransition { + -webkit-transition: none !important; + transition: none !important; +} +#fp-nav { + position: fixed; + z-index: 100; + margin-top: -32px; + top: 50%; + opacity: 1; + -webkit-transform: translate3d(0,0,0); +} +#fp-nav.fp-right { + right: 17px; +} +#fp-nav.fp-left { + left: 17px; +} +.fp-slidesNav{ + position: absolute; + z-index: 4; + opacity: 1; + -webkit-transform: translate3d(0,0,0); + -ms-transform: translate3d(0,0,0); + transform: translate3d(0,0,0); + left: 0 !important; + right: 0; + margin: 0 auto !important; +} +.fp-slidesNav.fp-bottom { + bottom: 17px; +} +.fp-slidesNav.fp-top { + top: 17px; +} +#fp-nav ul, +.fp-slidesNav ul { + margin: 0; + padding: 0; +} +#fp-nav ul li, +.fp-slidesNav ul li { + display: block; + width: 14px; + height: 13px; + margin: 7px; + position:relative; +} +.fp-slidesNav ul li { + display: inline-block; +} +#fp-nav ul li a, +.fp-slidesNav ul li a { + display: block; + position: relative; + z-index: 1; + width: 100%; + height: 100%; + cursor: pointer; + text-decoration: none; +} +#fp-nav ul li a.active span, +.fp-slidesNav ul li a.active span, +#fp-nav ul li:hover a.active span, +.fp-slidesNav ul li:hover a.active span{ + height: 12px; + width: 12px; + margin: -6px 0 0 -6px; + border-radius: 100%; + } +#fp-nav ul li a span, +.fp-slidesNav ul li a span { + border-radius: 50%; + position: absolute; + z-index: 1; + height: 4px; + width: 4px; + border: 0; + background: #333; + left: 50%; + top: 50%; + margin: -2px 0 0 -2px; + -webkit-transition: all 0.1s ease-in-out; + -moz-transition: all 0.1s ease-in-out; + -o-transition: all 0.1s ease-in-out; + transition: all 0.1s ease-in-out; +} +#fp-nav ul li:hover a span, +.fp-slidesNav ul li:hover a span{ + width: 10px; + height: 10px; + margin: -5px 0px 0px -5px; +} +#fp-nav ul li .fp-tooltip { + position: absolute; + top: -2px; + color: #fff; + font-size: 14px; + font-family: arial, helvetica, sans-serif; + white-space: nowrap; + max-width: 220px; + overflow: hidden; + display: block; + opacity: 0; + width: 0; + cursor: pointer; +} +#fp-nav ul li:hover .fp-tooltip, +#fp-nav.fp-show-active a.active + .fp-tooltip { + -webkit-transition: opacity 0.2s ease-in; + transition: opacity 0.2s ease-in; + width: auto; + opacity: 1; +} +#fp-nav ul li .fp-tooltip.fp-right { + right: 20px; +} +#fp-nav ul li .fp-tooltip.fp-left { + left: 20px; +} +.fp-auto-height.fp-section, +.fp-auto-height .fp-slide, +.fp-auto-height .fp-tableCell{ + height: auto !important; +} + +.fp-responsive .fp-auto-height-responsive.fp-section, +.fp-responsive .fp-auto-height-responsive .fp-slide, +.fp-responsive .fp-auto-height-responsive .fp-tableCell { + height: auto !important; +} + +/*Only display content to screen readers*/ +.fp-sr-only{ + position: absolute; + width: 1px; + height: 1px; + padding: 0; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} \ No newline at end of file diff --git a/html/css/reset.css b/html/css/reset.css new file mode 100644 index 0000000..9846bb5 --- /dev/null +++ b/html/css/reset.css @@ -0,0 +1,224 @@ +@charset "utf-8"; +@import url("font.css"); +/* v2.0 | 20110126 + http://meyerweb.com/eric/tools/css/reset/ + License: none (public domain) +*/ +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font-family:"Montserrat","score", 맑은고딕, Arial,sans-serif, Dotum, 돋움, "Apple SD Gothic Neo", arial; + font-style: normal; + vertical-align: baseline; +} +select, input, textarea, button{ + font-family:"Montserrat","score", 맑은고딕, Arial,sans-serif, Dotum, 돋움, "Apple SD Gothic Neo", arial; +} +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; +} +body { + line-height: 1.4; +} +ol, ul { + list-style: none; +} +blockquote, q{ + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +*, :after, :before { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +/*margin*/ +.m-0{margin:0px !important;} +.m-10{margin:10px !important;} +.m-20{margin:20px !important;} +.m-30{margin:30px !important;} +.m-40{margin:40px !important;} +.m-50{margin:50px !important;} +.m-60{margin:60px !important;} +.m-70{margin:70px !important;} +.m-80{margin:80px !important;} +.m-90{margin:90px !important;} +.m-100{margin:100px !important;} + +.mt-0{margin-top:0px !important;} +.mt-10{margin-top:10px !important;} +.mt-20{margin-top:20px !important;} +.mt-30{margin-top:30px !important;} +.mt-40{margin-top:40px !important;} +.mt-50{margin-top:50px !important;} +.mt-60{margin-top:60px !important;} +.mt-70{margin-top:70px !important;} +.mt-80{margin-top:80px !important;} +.mt-90{margin-top:90px !important;} +.mt-100{margin-top:100px !important;} + +.mb-0{margin-bottom:0px !important;} +.mb-10{margin-bottom:10px !important;} +.mb-20{margin-bottom:20px !important;} +.mb-30{margin-bottom:30px !important;} +.mb-40{margin-bottom:40px !important;} +.mb-50{margin-bottom:50px !important;} +.mb-60{margin-bottom:60px !important;} +.mb-70{margin-bottom:70px !important;} +.mb-80{margin-bottom:80px !important;} +.mb-90{margin-bottom:90px !important;} +.mb-100{margin-bottom:100px !important;} + +.ml-0{margin-left:0px !important;} +.ml-10{margin-left:10px !important;} +.ml-20{margin-left:20px !important;} +.ml-30{margin-left:30px !important;} +.ml-40{margin-left:40px !important;} +.ml-50{margin-left:50px !important;} +.ml-60{margin-left:60px !important;} +.ml-70{margin-left:70px !important;} +.ml-80{margin-left:80px !important;} +.ml-90{margin-left:90px !important;} +.ml-100{margin-left:10px !important;} + +.mr-0{margin-right:0px !important;} +.mr-10{margin-right:10px !important;} +.mr-20{margin-right:20px !important;} +.mr-30{margin-right:30px !important;} +.mr-40{margin-right:40px !important;} +.mr-50{margin-right:50px !important;} +.mr-60{margin-right:60px !important;} +.mr-70{margin-right:70px !important;} +.mr-80{margin-right:80px !important;} +.mr-90{margin-right:90px !important;} +.mr-100{margin-right:100px !important;} + +/*padding*/ +.p-0{padding:0px !important;} +.p-10{padding:10px!important;} +.p-20{padding:20px!important;} +.p-30{padding:30px!important;} +.p-40{padding:40px!important;} +.p-50{padding:50px!important;} +.p-60{padding:60px!important;} +.p-70{padding:70px!important;} +.p-80{padding:80px!important;} +.p-90{padding:90px!important;} +.p-100{padding:100px!important;} + +.pt-0{padding-top:0px !important;} +.pt-10{padding-top:10px !important;} +.pt-20{padding-top:20px !important;} +.pt-30{padding-top:30px !important;} +.pt-40{padding-top:40px !important;} +.pt-50{padding-top:50px !important;} +.pt-60{padding-top:60px !important;} +.pt-70{padding-top:70px !important;} +.pt-80{padding-top:80px !important;} +.pt-90{padding-top:90px !important;} +.pt-100{padding-top:100px !important;} + +.pb-0{padding-bottom:0px !important;} +.pb-10{padding-bottom:10px !important;} +.pb-20{padding-bottom:20px !important;} +.pb-30{padding-bottom:30px !important;} +.pb-40{padding-bottom:40px !important;} +.pb-50{padding-bottom:50px !important;} +.pb-60{padding-bottom:60px !important;} +.pb-70{padding-bottom:70px !important;} +.pb-80{padding-bottom:80px !important;} +.pb-90{padding-bottom:90px !important;} +.pb-100{padding-bottom:100px !important;} + +.pl-0{padding-left:0px !important;} +.pl-10{padding-left:10px !important;} +.pl-20{padding-left:20px !important;} +.pl-30{padding-left:30px !important;} +.pl-40{padding-left:40px !important;} +.pl-50{padding-left:50px !important;} +.pl-60{padding-left:60px !important;} +.pl-70{padding-left:70px !important;} +.pl-80{padding-left:80px !important;} +.pl-90{padding-left:90px !important;} +.pl-100{padding-left:120px !important;} + +.pr-0{padding-right:0px !important;} +.pr-10{padding-right:10px !important;} +.pr-20{padding-right:20px !important;} +.pr-30{padding-right:30px !important;} +.pr-40{padding-right:40px !important;} +.pr-50{padding-right:50px !important;} +.pr-60{padding-right:60px !important;} +.pr-70{padding-right:70px !important;} +.pr-80{padding-right:80px !important;} +.pr-90{padding-right:90px !important;} +.pr-100{padding-right:100px !important;} + + +[class*=width_] {float:left;} +.width_100 {width:100% !important;} +.width_90 {width:90% !important;} +.width_80 {width:80% !important;} +.width_70 {width:70% !important;} +.width_60 {width:60% !important;} +.width_50 {width:50% !important;} +.width_40 {width:40% !important;} +.width_30 {width:30% !important;} +.width_20 {width:20% !important;} +.width_10 {width:10% !important;} + +.width_2n {width:50% !important;} +.width_3n {width:33.333333333% !important;} +.width_4n {width:25% !important;} +.width_5n {width:20% !important;} +.width_6n {width:16.6666666666666666667% !important;} +.width_7n {width:14.2857142857143% !important;} +.width_8n {width:12.5% !important;} +.width_9n {width:11.111111111111111111111% !important;} +.width_10n {width:10% !important;} + + +a{color:#000;text-decoration:none;cursor: pointer;} +img{vertical-align:middle;} +/* .container{width:1280px;height:100%;margin:0px auto;} */ + + +/* select { +font-family: inherit; +background: url('../img/icon/arrow_bk.png') no-repeat 90% 50%; +-webkit-appearance: none; +-moz-appearance: none; +appearance: none; +} +select::-ms-expand { + display: none; +} */ + +.on{display:block!important;} + +/* .list-txt > li {position: relative;padding-left: 14px;} +.list-txt > li:before {content: "- ";display: inline-block;position: absolute;top: 0;left: 0;} */ diff --git a/html/css/swiper-bundle.css b/html/css/swiper-bundle.css new file mode 100644 index 0000000..6cf2fe7 --- /dev/null +++ b/html/css/swiper-bundle.css @@ -0,0 +1,628 @@ +/** + * Swiper 8.1.4 + * Most modern mobile touch slider and framework with hardware accelerated transitions + * https://swiperjs.com + * + * Copyright 2014-2022 Vladimir Kharlampidi + * + * Released under the MIT License + * + * Released on: April 24, 2022 + */ + +@font-face { + font-family: 'swiper-icons'; + src: url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA'); + font-weight: 400; + font-style: normal; +} +:root { + --swiper-theme-color: #007aff; +} +.swiper { + margin-left: auto; + margin-right: auto; + position: relative; + overflow: hidden; + list-style: none; + padding: 0; + /* Fix of Webkit flickering */ + z-index: 1; +} +.swiper-vertical > .swiper-wrapper { + flex-direction: column; +} +.swiper-wrapper { + position: relative; + width: 100%; + height: 100%; + z-index: 1; + display: flex; + transition-property: transform; + box-sizing: content-box; +} +.swiper-android .swiper-slide, +.swiper-wrapper { + transform: translate3d(0px, 0, 0); +} +.swiper-pointer-events { + touch-action: pan-y; +} +.swiper-pointer-events.swiper-vertical { + touch-action: pan-x; +} +.swiper-slide { + flex-shrink: 0; + width: 100%; + height: 100%; + position: relative; + transition-property: transform; +} +.swiper-slide-invisible-blank { + visibility: hidden; +} +/* Auto Height */ +.swiper-autoheight, +.swiper-autoheight .swiper-slide { + height: auto; +} +.swiper-autoheight .swiper-wrapper { + align-items: flex-start; + transition-property: transform, height; +} +.swiper-backface-hidden .swiper-slide { + transform: translateZ(0); + -webkit-backface-visibility: hidden; + backface-visibility: hidden; +} +/* 3D Effects */ +.swiper-3d, +.swiper-3d.swiper-css-mode .swiper-wrapper { + perspective: 1200px; +} +.swiper-3d .swiper-wrapper, +.swiper-3d .swiper-slide, +.swiper-3d .swiper-slide-shadow, +.swiper-3d .swiper-slide-shadow-left, +.swiper-3d .swiper-slide-shadow-right, +.swiper-3d .swiper-slide-shadow-top, +.swiper-3d .swiper-slide-shadow-bottom, +.swiper-3d .swiper-cube-shadow { + transform-style: preserve-3d; +} +.swiper-3d .swiper-slide-shadow, +.swiper-3d .swiper-slide-shadow-left, +.swiper-3d .swiper-slide-shadow-right, +.swiper-3d .swiper-slide-shadow-top, +.swiper-3d .swiper-slide-shadow-bottom { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + pointer-events: none; + z-index: 10; +} +.swiper-3d .swiper-slide-shadow { + background: rgba(0, 0, 0, 0.15); +} +.swiper-3d .swiper-slide-shadow-left { + background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); +} +.swiper-3d .swiper-slide-shadow-right { + background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); +} +.swiper-3d .swiper-slide-shadow-top { + background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); +} +.swiper-3d .swiper-slide-shadow-bottom { + background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); +} +/* CSS Mode */ +.swiper-css-mode > .swiper-wrapper { + overflow: auto; + scrollbar-width: none; + /* For Firefox */ + -ms-overflow-style: none; + /* For Internet Explorer and Edge */ +} +.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar { + display: none; +} +.swiper-css-mode > .swiper-wrapper > .swiper-slide { + scroll-snap-align: start start; +} +.swiper-horizontal.swiper-css-mode > .swiper-wrapper { + scroll-snap-type: x mandatory; +} +.swiper-vertical.swiper-css-mode > .swiper-wrapper { + scroll-snap-type: y mandatory; +} +.swiper-centered > .swiper-wrapper::before { + content: ''; + flex-shrink: 0; + order: 9999; +} +.swiper-centered.swiper-horizontal > .swiper-wrapper > .swiper-slide:first-child { + margin-inline-start: var(--swiper-centered-offset-before); +} +.swiper-centered.swiper-horizontal > .swiper-wrapper::before { + height: 100%; + min-height: 1px; + width: var(--swiper-centered-offset-after); +} +.swiper-centered.swiper-vertical > .swiper-wrapper > .swiper-slide:first-child { + margin-block-start: var(--swiper-centered-offset-before); +} +.swiper-centered.swiper-vertical > .swiper-wrapper::before { + width: 100%; + min-width: 1px; + height: var(--swiper-centered-offset-after); +} +.swiper-centered > .swiper-wrapper > .swiper-slide { + scroll-snap-align: center center; +} +.swiper-virtual .swiper-slide { + -webkit-backface-visibility: hidden; + transform: translateZ(0); +} +.swiper-virtual.swiper-css-mode .swiper-wrapper::after { + content: ''; + position: absolute; + left: 0; + top: 0; + pointer-events: none; +} +.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper::after { + height: 1px; + width: var(--swiper-virtual-size); +} +.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper::after { + width: 1px; + height: var(--swiper-virtual-size); +} +:root { + --swiper-navigation-size: 44px; + /* + --swiper-navigation-color: var(--swiper-theme-color); + */ +} +.swiper-button-prev, +.swiper-button-next { + position: absolute; + top: 50%; + width: calc(var(--swiper-navigation-size) / 44 * 27); + height: var(--swiper-navigation-size); + margin-top: calc(0px - (var(--swiper-navigation-size) / 2)); + z-index: 10; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + color: var(--swiper-navigation-color, var(--swiper-theme-color)); +} +.swiper-button-prev.swiper-button-disabled, +.swiper-button-next.swiper-button-disabled { + opacity: 0.35; + cursor: auto; + pointer-events: none; +} +.swiper-button-prev:after, +.swiper-button-next:after { + font-family: swiper-icons; + font-size: var(--swiper-navigation-size); + text-transform: none !important; + letter-spacing: 0; + text-transform: none; + font-variant: initial; + line-height: 1; +} +.swiper-button-prev, +.swiper-rtl .swiper-button-next { + left: 10px; + right: auto; +} +.swiper-button-prev:after, +.swiper-rtl .swiper-button-next:after { + content: 'prev'; +} +.swiper-button-next, +.swiper-rtl .swiper-button-prev { + right: 10px; + left: auto; +} +.swiper-button-next:after, +.swiper-rtl .swiper-button-prev:after { + content: 'next'; +} +.swiper-button-lock { + display: none; +} +:root { + /* + --swiper-pagination-color: var(--swiper-theme-color); + --swiper-pagination-bullet-size: 8px; + --swiper-pagination-bullet-width: 8px; + --swiper-pagination-bullet-height: 8px; + --swiper-pagination-bullet-inactive-color: #000; + --swiper-pagination-bullet-inactive-opacity: 0.2; + --swiper-pagination-bullet-opacity: 1; + --swiper-pagination-bullet-horizontal-gap: 4px; + --swiper-pagination-bullet-vertical-gap: 6px; + */ +} +.swiper-pagination { + position: absolute; + text-align: center; + transition: 300ms opacity; + transform: translate3d(0, 0, 0); + z-index: 10; +} +.swiper-pagination.swiper-pagination-hidden { + opacity: 0; +} +/* Common Styles */ +.swiper-pagination-fraction, +.swiper-pagination-custom, +.swiper-horizontal > .swiper-pagination-bullets, +.swiper-pagination-bullets.swiper-pagination-horizontal { + bottom: 10px; + left: 0; + width: 100%; +} +/* Bullets */ +.swiper-pagination-bullets-dynamic { + overflow: hidden; + font-size: 0; +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet { + transform: scale(0.33); + position: relative; +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active { + transform: scale(1); +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main { + transform: scale(1); +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev { + transform: scale(0.66); +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev { + transform: scale(0.33); +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next { + transform: scale(0.66); +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next { + transform: scale(0.33); +} +.swiper-pagination-bullet { + width: var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px)); + height: var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px)); + display: inline-block; + border-radius: 50%; + background: var(--swiper-pagination-bullet-inactive-color, #000); + opacity: var(--swiper-pagination-bullet-inactive-opacity, 0.2); +} +button.swiper-pagination-bullet { + border: none; + margin: 0; + padding: 0; + box-shadow: none; + -webkit-appearance: none; + appearance: none; +} +.swiper-pagination-clickable .swiper-pagination-bullet { + cursor: pointer; +} +.swiper-pagination-bullet:only-child { + display: none !important; +} +.swiper-pagination-bullet-active { + opacity: var(--swiper-pagination-bullet-opacity, 1); + background: var(--swiper-pagination-color, var(--swiper-theme-color)); +} +.swiper-vertical > .swiper-pagination-bullets, +.swiper-pagination-vertical.swiper-pagination-bullets { + right: 10px; + top: 50%; + transform: translate3d(0px, -50%, 0); +} +.swiper-vertical > .swiper-pagination-bullets .swiper-pagination-bullet, +.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet { + margin: var(--swiper-pagination-bullet-vertical-gap, 6px) 0; + display: block; +} +.swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic, +.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic { + top: 50%; + transform: translateY(-50%); + width: 8px; +} +.swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet, +.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet { + display: inline-block; + transition: 200ms transform, 200ms top; +} +.swiper-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet, +.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet { + margin: 0 var(--swiper-pagination-bullet-horizontal-gap, 4px); +} +.swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic, +.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic { + left: 50%; + transform: translateX(-50%); + white-space: nowrap; +} +.swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet, +.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet { + transition: 200ms transform, 200ms left; +} +.swiper-horizontal.swiper-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet { + transition: 200ms transform, 200ms right; +} +/* Progress */ +.swiper-pagination-progressbar { + background: rgba(0, 0, 0, 0.25); + position: absolute; +} +.swiper-pagination-progressbar .swiper-pagination-progressbar-fill { + background: var(--swiper-pagination-color, var(--swiper-theme-color)); + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + transform: scale(0); + transform-origin: left top; +} +.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill { + transform-origin: right top; +} +.swiper-horizontal > .swiper-pagination-progressbar, +.swiper-pagination-progressbar.swiper-pagination-horizontal, +.swiper-vertical > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite, +.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite { + width: 100%; + height: 4px; + left: 0; + top: 0; +} +.swiper-vertical > .swiper-pagination-progressbar, +.swiper-pagination-progressbar.swiper-pagination-vertical, +.swiper-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite, +.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite { + width: 4px; + height: 100%; + left: 0; + top: 0; +} +.swiper-pagination-lock { + display: none; +} +/* Scrollbar */ +.swiper-scrollbar { + border-radius: 10px; + position: relative; + -ms-touch-action: none; + background: rgba(0, 0, 0, 0.1); +} +.swiper-horizontal > .swiper-scrollbar { + position: absolute; + left: 1%; + bottom: 3px; + z-index: 50; + height: 5px; + width: 98%; +} +.swiper-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, 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: flex; + justify-content: center; + align-items: center; + text-align: center; +} +.swiper-zoom-container > img, +.swiper-zoom-container > svg, +.swiper-zoom-container > canvas { + max-width: 100%; + max-height: 100%; + object-fit: contain; +} +.swiper-slide-zoomed { + cursor: move; +} +/* Preloader */ +:root { + /* + --swiper-preloader-color: var(--swiper-theme-color); + */ +} +.swiper-lazy-preloader { + width: 42px; + height: 42px; + position: absolute; + left: 50%; + top: 50%; + margin-left: -21px; + margin-top: -21px; + z-index: 10; + transform-origin: 50%; + box-sizing: border-box; + border: 4px solid var(--swiper-preloader-color, var(--swiper-theme-color)); + border-radius: 50%; + border-top-color: transparent; +} +.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader, +.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader { + animation: swiper-preloader-spin 1s infinite linear; +} +.swiper-lazy-preloader-white { + --swiper-preloader-color: #fff; +} +.swiper-lazy-preloader-black { + --swiper-preloader-color: #000; +} +@keyframes swiper-preloader-spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +/* a11y */ +.swiper .swiper-notification { + position: absolute; + left: 0; + top: 0; + pointer-events: none; + opacity: 0; + z-index: -1000; +} +.swiper-free-mode > .swiper-wrapper { + transition-timing-function: ease-out; + margin: 0 auto; +} +.swiper-grid > .swiper-wrapper { + flex-wrap: wrap; +} +.swiper-grid-column > .swiper-wrapper { + flex-wrap: wrap; + flex-direction: column; +} +.swiper-fade.swiper-free-mode .swiper-slide { + transition-timing-function: ease-out; +} +.swiper-fade .swiper-slide { + pointer-events: none; + transition-property: opacity; +} +.swiper-fade .swiper-slide .swiper-slide { + pointer-events: none; +} +.swiper-fade .swiper-slide-active, +.swiper-fade .swiper-slide-active .swiper-slide-active { + pointer-events: auto; +} +.swiper-cube { + overflow: visible; +} +.swiper-cube .swiper-slide { + pointer-events: none; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + z-index: 1; + visibility: hidden; + transform-origin: 0 0; + width: 100%; + height: 100%; +} +.swiper-cube .swiper-slide .swiper-slide { + pointer-events: none; +} +.swiper-cube.swiper-rtl .swiper-slide { + transform-origin: 100% 0; +} +.swiper-cube .swiper-slide-active, +.swiper-cube .swiper-slide-active .swiper-slide-active { + pointer-events: auto; +} +.swiper-cube .swiper-slide-active, +.swiper-cube .swiper-slide-next, +.swiper-cube .swiper-slide-prev, +.swiper-cube .swiper-slide-next + .swiper-slide { + pointer-events: auto; + visibility: visible; +} +.swiper-cube .swiper-slide-shadow-top, +.swiper-cube .swiper-slide-shadow-bottom, +.swiper-cube .swiper-slide-shadow-left, +.swiper-cube .swiper-slide-shadow-right { + z-index: 0; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; +} +.swiper-cube .swiper-cube-shadow { + position: absolute; + left: 0; + bottom: 0px; + width: 100%; + height: 100%; + opacity: 0.6; + z-index: 0; +} +.swiper-cube .swiper-cube-shadow:before { + content: ''; + background: #000; + position: absolute; + left: 0; + top: 0; + bottom: 0; + right: 0; + filter: blur(50px); +} +.swiper-flip { + overflow: visible; +} +.swiper-flip .swiper-slide { + pointer-events: none; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + z-index: 1; +} +.swiper-flip .swiper-slide .swiper-slide { + pointer-events: none; +} +.swiper-flip .swiper-slide-active, +.swiper-flip .swiper-slide-active .swiper-slide-active { + pointer-events: auto; +} +.swiper-flip .swiper-slide-shadow-top, +.swiper-flip .swiper-slide-shadow-bottom, +.swiper-flip .swiper-slide-shadow-left, +.swiper-flip .swiper-slide-shadow-right { + z-index: 0; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; +} +.swiper-creative .swiper-slide { + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + overflow: hidden; + transition-property: transform, opacity, height; +} +.swiper-cards { + overflow: visible; +} +.swiper-cards .swiper-slide { + transform-origin: center bottom; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + overflow: hidden; +} diff --git a/html/css/swiper.css b/html/css/swiper.css new file mode 100644 index 0000000..7f6e132 --- /dev/null +++ b/html/css/swiper.css @@ -0,0 +1,531 @@ +/** + * Swiper 5.3.0 + * Most modern mobile touch slider and framework with hardware accelerated transitions + * http://swiperjs.com + * + * Copyright 2014-2020 Vladimir Kharlampidi + * + * Released under the MIT License + * + * Released on: January 11, 2020 + */ + +@font-face { + font-family: 'swiper-icons'; + src: url("data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA") format("woff"); + font-weight: 400; + font-style: normal; +} +:root { + --swiper-theme-color: #007aff; +} +.swiper-container { + margin-left: auto; + margin-right: auto; + position: relative; + overflow: hidden; + list-style: none; + padding: 0; + /* Fix of Webkit flickering */ + z-index: 1; +} +.swiper-container-vertical > .swiper-wrapper { + flex-direction: column; +} +.swiper-wrapper { + position: relative; + width: 100%; + height: 100%; + z-index: 1; + display: flex; + transition-property: transform; + box-sizing: content-box; +} +.swiper-container-android .swiper-slide, +.swiper-wrapper { + transform: translate3d(0px, 0, 0); +} +.swiper-container-multirow > .swiper-wrapper { + flex-wrap: wrap; +} +.swiper-container-multirow-column > .swiper-wrapper { + flex-wrap: wrap; + flex-direction: column; +} +.swiper-container-free-mode > .swiper-wrapper { + transition-timing-function: ease-out; + margin: 0 auto; +} +.swiper-slide { + flex-shrink: 0; + width: 100%; + height: 100%; + position: relative; + transition-property: transform; +} +.swiper-slide-invisible-blank { + visibility: hidden; +} +/* Auto Height */ +.swiper-container-autoheight, +.swiper-container-autoheight .swiper-slide { + height: auto; +} +.swiper-container-autoheight .swiper-wrapper { + align-items: flex-start; + transition-property: transform, height; +} +/* 3D Effects */ +.swiper-container-3d { + perspective: 1200px; +} +.swiper-container-3d .swiper-wrapper, +.swiper-container-3d .swiper-slide, +.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-slide-shadow-bottom, +.swiper-container-3d .swiper-cube-shadow { + transform-style: preserve-3d; +} +.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-slide-shadow-bottom { + 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: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); +} +.swiper-container-3d .swiper-slide-shadow-right { + background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); +} +.swiper-container-3d .swiper-slide-shadow-top { + background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); +} +.swiper-container-3d .swiper-slide-shadow-bottom { + background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); +} +/* CSS Mode */ +.swiper-container-css-mode > .swiper-wrapper { + overflow: auto; + scrollbar-width: none; + /* For Firefox */ + -ms-overflow-style: none; + /* For Internet Explorer and Edge */ +} +.swiper-container-css-mode > .swiper-wrapper::-webkit-scrollbar { + display: none; +} +.swiper-container-css-mode > .swiper-wrapper > .swiper-slide { + scroll-snap-align: start start; +} +.swiper-container-horizontal.swiper-container-css-mode > .swiper-wrapper { + scroll-snap-type: x mandatory; +} +.swiper-container-vertical.swiper-container-css-mode > .swiper-wrapper { + scroll-snap-type: y mandatory; +} +:root { + --swiper-navigation-size: 44px; + /* + --swiper-navigation-color: var(--swiper-theme-color); + */ +} +.swiper-button-prev, +.swiper-button-next { + position: absolute; + top: 50%; + width: calc(var(--swiper-navigation-size) / 44 * 27); + height: var(--swiper-navigation-size); + margin-top: calc(-1 * var(--swiper-navigation-size) / 2); + z-index: 10; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + color: var(--swiper-navigation-color, var(--swiper-theme-color)); +} +.swiper-button-prev.swiper-button-disabled, +.swiper-button-next.swiper-button-disabled { + opacity: 0.35; + cursor: auto; + pointer-events: none; +} +.swiper-button-prev:after, +.swiper-button-next:after { + font-family: swiper-icons; + font-size: var(--swiper-navigation-size); + text-transform: none !important; + letter-spacing: 0; + text-transform: none; + font-variant: initial; +} +.swiper-button-prev, +.swiper-container-rtl .swiper-button-next { + left: 10px; + right: auto; +} +.swiper-button-prev:after, +.swiper-container-rtl .swiper-button-next:after { + content: 'prev'; +} +.swiper-button-next, +.swiper-container-rtl .swiper-button-prev { + right: 10px; + left: auto; +} +.swiper-button-next:after, +.swiper-container-rtl .swiper-button-prev:after { + content: 'next'; +} +.swiper-button-prev.swiper-button-white, +.swiper-button-next.swiper-button-white { + --swiper-navigation-color: #ffffff; +} +.swiper-button-prev.swiper-button-black, +.swiper-button-next.swiper-button-black { + --swiper-navigation-color: #000000; +} +.swiper-button-lock { + display: none; +} +:root { + /* + --swiper-pagination-color: var(--swiper-theme-color); + */ +} +.swiper-pagination { + position: absolute; + text-align: center; + transition: 300ms opacity; + transform: translate3d(0, 0, 0); + z-index: 10; +} +.swiper-pagination.swiper-pagination-hidden { + opacity: 0; +} +/* Common Styles */ +.swiper-pagination-fraction, +.swiper-pagination-custom, +.swiper-container-horizontal > .swiper-pagination-bullets { + bottom: 10px; + left: 0; + width: 100%; +} +/* Bullets */ +.swiper-pagination-bullets-dynamic { + overflow: hidden; + font-size: 0; +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet { + transform: scale(0.33); + position: relative; +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active { + transform: scale(1); +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main { + transform: scale(1); +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev { + transform: scale(0.66); +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev { + transform: scale(0.33); +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next { + transform: scale(0.66); +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next { + transform: scale(0.33); +} +.swiper-pagination-bullet { + width: 8px; + height: 8px; + display: inline-block; + border-radius: 100%; + background: #000; + opacity: 0.2; +} +button.swiper-pagination-bullet { + border: none; + margin: 0; + padding: 0; + 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: var(--swiper-pagination-color, var(--swiper-theme-color)); +} +.swiper-container-vertical > .swiper-pagination-bullets { + right: 10px; + top: 50%; + transform: translate3d(0px, -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%; + transform: translateY(-50%); + width: 8px; +} +.swiper-container-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet { + display: inline-block; + transition: 200ms transform, 200ms top; +} +.swiper-container-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet { + margin: 0 4px; +} +.swiper-container-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic { + left: 50%; + transform: translateX(-50%); + white-space: nowrap; +} +.swiper-container-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet { + transition: 200ms transform, 200ms left; +} +.swiper-container-horizontal.swiper-container-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet { + transition: 200ms transform, 200ms right; +} +/* Progress */ +.swiper-pagination-progressbar { + background: rgba(0, 0, 0, 0.25); + position: absolute; +} +.swiper-pagination-progressbar .swiper-pagination-progressbar-fill { + background: var(--swiper-pagination-color, var(--swiper-theme-color)); + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + transform: scale(0); + transform-origin: left top; +} +.swiper-container-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill { + 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-vertical > .swiper-pagination-progressbar, +.swiper-container-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite { + width: 4px; + height: 100%; + left: 0; + top: 0; +} +.swiper-pagination-white { + --swiper-pagination-color: #ffffff; +} +.swiper-pagination-black { + --swiper-pagination-color: #000000; +} +.swiper-pagination-lock { + display: none; +} +/* Scrollbar */ +.swiper-scrollbar { + border-radius: 10px; + position: relative; + -ms-touch-action: none; + background: rgba(0, 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, 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: flex; + justify-content: center; + align-items: center; + text-align: center; +} +.swiper-zoom-container > img, +.swiper-zoom-container > svg, +.swiper-zoom-container > canvas { + max-width: 100%; + max-height: 100%; + object-fit: contain; +} +.swiper-slide-zoomed { + cursor: move; +} +/* Preloader */ +:root { + /* + --swiper-preloader-color: var(--swiper-theme-color); + */ +} +.swiper-lazy-preloader { + width: 42px; + height: 42px; + position: absolute; + left: 50%; + top: 50%; + margin-left: -21px; + margin-top: -21px; + z-index: 10; + transform-origin: 50%; + animation: swiper-preloader-spin 1s infinite linear; + box-sizing: border-box; + border: 4px solid var(--swiper-preloader-color, var(--swiper-theme-color)); + border-radius: 50%; + border-top-color: transparent; +} +.swiper-lazy-preloader-white { + --swiper-preloader-color: #fff; +} +.swiper-lazy-preloader-black { + --swiper-preloader-color: #000; +} +@keyframes swiper-preloader-spin { + 100% { + transform: rotate(360deg); + } +} +/* a11y */ +.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 { + transition-timing-function: ease-out; +} +.swiper-container-fade .swiper-slide { + pointer-events: none; + 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; + 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 { + 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-prev, +.swiper-container-cube .swiper-slide-next + .swiper-slide { + pointer-events: auto; + visibility: visible; +} +.swiper-container-cube .swiper-slide-shadow-top, +.swiper-container-cube .swiper-slide-shadow-bottom, +.swiper-container-cube .swiper-slide-shadow-left, +.swiper-container-cube .swiper-slide-shadow-right { + z-index: 0; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; +} +.swiper-container-cube .swiper-cube-shadow { + position: absolute; + left: 0; + bottom: 0px; + width: 100%; + height: 100%; + background: #000; + opacity: 0.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-top, +.swiper-container-flip .swiper-slide-shadow-bottom, +.swiper-container-flip .swiper-slide-shadow-left, +.swiper-container-flip .swiper-slide-shadow-right { + z-index: 0; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; +} diff --git a/html/css/swiper.min.css b/html/css/swiper.min.css new file mode 100644 index 0000000..16e006a --- /dev/null +++ b/html/css/swiper.min.css @@ -0,0 +1,13 @@ +/** + * Swiper 5.3.0 + * Most modern mobile touch slider and framework with hardware accelerated transitions + * http://swiperjs.com + * + * Copyright 2014-2020 Vladimir Kharlampidi + * + * Released under the MIT License + * + * Released on: January 11, 2020 + */ + +@font-face{font-family:swiper-icons;src:url("data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA") format("woff");font-weight:400;font-style:normal}:root{--swiper-theme-color:#007aff}.swiper-container{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1}.swiper-container-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;box-sizing:content-box}.swiper-container-android .swiper-slide,.swiper-wrapper{transform:translate3d(0px,0,0)}.swiper-container-multirow>.swiper-wrapper{flex-wrap:wrap}.swiper-container-multirow-column>.swiper-wrapper{flex-wrap:wrap;flex-direction:column}.swiper-container-free-mode>.swiper-wrapper{transition-timing-function:ease-out;margin:0 auto}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform}.swiper-slide-invisible-blank{visibility:hidden}.swiper-container-autoheight,.swiper-container-autoheight .swiper-slide{height:auto}.swiper-container-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-container-3d{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{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:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-right{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:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-container-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-container-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-container-horizontal.swiper-container-css-mode>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-container-vertical.swiper-container-css-mode>.swiper-wrapper{scroll-snap-type:y mandatory}:root{--swiper-navigation-size:44px}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:calc(var(--swiper-navigation-size)/ 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(-1 * var(--swiper-navigation-size)/ 2);z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color,var(--swiper-theme-color))}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-next:after,.swiper-button-prev:after{font-family:swiper-icons;font-size:var(--swiper-navigation-size);text-transform:none!important;letter-spacing:0;text-transform:none;font-variant:initial}.swiper-button-prev,.swiper-container-rtl .swiper-button-next{left:10px;right:auto}.swiper-button-prev:after,.swiper-container-rtl .swiper-button-next:after{content:'prev'}.swiper-button-next,.swiper-container-rtl .swiper-button-prev{right:10px;left:auto}.swiper-button-next:after,.swiper-container-rtl .swiper-button-prev:after{content:'next'}.swiper-button-next.swiper-button-white,.swiper-button-prev.swiper-button-white{--swiper-navigation-color:#ffffff}.swiper-button-next.swiper-button-black,.swiper-button-prev.swiper-button-black{--swiper-navigation-color:#000000}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;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{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{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;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:var(--swiper-pagination-color,var(--swiper-theme-color))}.swiper-container-vertical>.swiper-pagination-bullets{right:10px;top:50%;transform:translate3d(0px,-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%;transform:translateY(-50%);width:8px}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 4px}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translateX(-50%);white-space:nowrap}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-container-horizontal.swiper-container-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-progressbar{background:rgba(0,0,0,.25);position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-container-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{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-color:#ffffff}.swiper-pagination-black{--swiper-pagination-color:#000000}.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:flex;justify-content: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%;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;transform-origin:50%;animation:swiper-preloader-spin 1s infinite linear;box-sizing:border-box;border:4px solid var(--swiper-preloader-color,var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper-lazy-preloader-white{--swiper-preloader-color:#fff}.swiper-lazy-preloader-black{--swiper-preloader-color:#000}@keyframes swiper-preloader-spin{100%{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{transition-timing-function:ease-out}.swiper-container-fade .swiper-slide{pointer-events:none;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;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{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:0px;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} \ No newline at end of file diff --git a/html/images/bg01.jpg b/html/images/bg01.jpg new file mode 100644 index 0000000..a6e9841 Binary files /dev/null and b/html/images/bg01.jpg differ diff --git a/html/images/bg02.jpg b/html/images/bg02.jpg new file mode 100644 index 0000000..b4a5a91 Binary files /dev/null and b/html/images/bg02.jpg differ diff --git a/html/images/mainicon01.png b/html/images/mainicon01.png new file mode 100644 index 0000000..e91ee6d Binary files /dev/null and b/html/images/mainicon01.png differ diff --git a/html/images/mainicon02.png b/html/images/mainicon02.png new file mode 100644 index 0000000..d419c1a Binary files /dev/null and b/html/images/mainicon02.png differ diff --git a/html/images/mainicon03.png b/html/images/mainicon03.png new file mode 100644 index 0000000..582e71f Binary files /dev/null and b/html/images/mainicon03.png differ diff --git a/html/images/mainicon04.png b/html/images/mainicon04.png new file mode 100644 index 0000000..e7ecf64 Binary files /dev/null and b/html/images/mainicon04.png differ diff --git a/html/images/mainicon05.png b/html/images/mainicon05.png new file mode 100644 index 0000000..e8babd9 Binary files /dev/null and b/html/images/mainicon05.png differ diff --git a/html/images/mainicon06.png b/html/images/mainicon06.png new file mode 100644 index 0000000..a4567b2 Binary files /dev/null and b/html/images/mainicon06.png differ diff --git a/html/images/pal_icon.png b/html/images/pal_icon.png new file mode 100644 index 0000000..d1c07c5 Binary files /dev/null and b/html/images/pal_icon.png differ diff --git a/html/images/pal_icon02.png b/html/images/pal_icon02.png new file mode 100644 index 0000000..c54c09b Binary files /dev/null and b/html/images/pal_icon02.png differ diff --git a/html/images/pal_icon02_wh.png b/html/images/pal_icon02_wh.png new file mode 100644 index 0000000..4a6d32c Binary files /dev/null and b/html/images/pal_icon02_wh.png differ diff --git a/html/images/pal_logo.png b/html/images/pal_logo.png new file mode 100644 index 0000000..b8fa32e Binary files /dev/null and b/html/images/pal_logo.png differ diff --git a/html/images/pal_logo_wh.png b/html/images/pal_logo_wh.png new file mode 100644 index 0000000..524b185 Binary files /dev/null and b/html/images/pal_logo_wh.png differ diff --git a/html/images/scroll_icon.svg b/html/images/scroll_icon.svg new file mode 100644 index 0000000..1d7a913 --- /dev/null +++ b/html/images/scroll_icon.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/html/include/footer.html b/html/include/footer.html new file mode 100644 index 0000000..5972dde --- /dev/null +++ b/html/include/footer.html @@ -0,0 +1,3 @@ + diff --git a/html/include/header.html b/html/include/header.html new file mode 100644 index 0000000..6478a80 --- /dev/null +++ b/html/include/header.html @@ -0,0 +1,81 @@ + + +
+

팔네트웍스

+ +
본문 바로가기
+ +
+ + + + + +
+
\ No newline at end of file diff --git a/html/include/header_version02.html b/html/include/header_version02.html new file mode 100644 index 0000000..f226035 --- /dev/null +++ b/html/include/header_version02.html @@ -0,0 +1,49 @@ +
+ + +
\ No newline at end of file diff --git a/html/index.html b/html/index.html new file mode 100644 index 0000000..51af975 --- /dev/null +++ b/html/index.html @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +jieun + + + + + + + + + + + +
+
+
+ +
+

가치를 존중하며 신뢰를 바탕으로 실천하는 기업

+ PAL Networks + 항공·전문 IT산업분야의 소프트웨어 개발 전문 기업 +
+
+
+ SCROLL DOWN + +
+
+
+
+
+

+ 팔네트웍스
+ ‘인천 항공 산업 선도기업’ 유망기업으로 선정된
 항공 소프트웨어 전문 기업입니다. +

+
+
+
+ SCROLL DOWN + +
+
+
+
3333
+
Section 4
+ +
+
+ + + + + diff --git a/html/index_version02.html b/html/index_version02.html new file mode 100644 index 0000000..07419c4 --- /dev/null +++ b/html/index_version02.html @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + +jieun + + + + + + + + + + + +
+
+
+
Slide 1
+
Slide 2
+
Slide 3
+
+
+ + +
+
+ +
+
+ + + + + + + + + + diff --git a/html/js/aos.js b/html/js/aos.js new file mode 100644 index 0000000..0ba1c7b --- /dev/null +++ b/html/js/aos.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AOS=t():e.AOS=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="dist/",t(0)}([function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var i=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0];if(e&&(k=!0),k)return w=(0,y.default)(w,x),(0,b.default)(w,x.once),w},O=function(){w=(0,h.default)(),j()},_=function(){w.forEach(function(e,t){e.node.removeAttribute("data-aos"),e.node.removeAttribute("data-aos-easing"),e.node.removeAttribute("data-aos-duration"),e.node.removeAttribute("data-aos-delay")})},S=function(e){return e===!0||"mobile"===e&&p.default.mobile()||"phone"===e&&p.default.phone()||"tablet"===e&&p.default.tablet()||"function"==typeof e&&e()===!0},z=function(e){x=i(x,e),w=(0,h.default)();var t=document.all&&!window.atob;return S(x.disable)||t?_():(document.querySelector("body").setAttribute("data-aos-easing",x.easing),document.querySelector("body").setAttribute("data-aos-duration",x.duration),document.querySelector("body").setAttribute("data-aos-delay",x.delay),"DOMContentLoaded"===x.startEvent&&["complete","interactive"].indexOf(document.readyState)>-1?j(!0):"load"===x.startEvent?window.addEventListener(x.startEvent,function(){j(!0)}):document.addEventListener(x.startEvent,function(){j(!0)}),window.addEventListener("resize",(0,f.default)(j,x.debounceDelay,!0)),window.addEventListener("orientationchange",(0,f.default)(j,x.debounceDelay,!0)),window.addEventListener("scroll",(0,u.default)(function(){(0,b.default)(w,x.once)},x.throttleDelay)),x.disableMutationObserver||(0,d.default)("[data-aos]",O),w)};e.exports={init:z,refresh:j,refreshHard:O}},function(e,t){},,,,,function(e,t){(function(t){"use strict";function n(e,t,n){function o(t){var n=b,o=v;return b=v=void 0,k=t,g=e.apply(o,n)}function r(e){return k=e,h=setTimeout(s,t),_?o(e):g}function a(e){var n=e-w,o=e-k,i=t-n;return S?j(i,y-o):i}function c(e){var n=e-w,o=e-k;return void 0===w||n>=t||n<0||S&&o>=y}function s(){var e=O();return c(e)?d(e):void(h=setTimeout(s,a(e)))}function d(e){return h=void 0,z&&b?o(e):(b=v=void 0,g)}function l(){void 0!==h&&clearTimeout(h),k=0,b=w=v=h=void 0}function p(){return void 0===h?g:d(O())}function m(){var e=O(),n=c(e);if(b=arguments,v=this,w=e,n){if(void 0===h)return r(w);if(S)return h=setTimeout(s,t),o(w)}return void 0===h&&(h=setTimeout(s,t)),g}var b,v,y,g,h,w,k=0,_=!1,S=!1,z=!0;if("function"!=typeof e)throw new TypeError(f);return t=u(t)||0,i(n)&&(_=!!n.leading,S="maxWait"in n,y=S?x(u(n.maxWait)||0,t):y,z="trailing"in n?!!n.trailing:z),m.cancel=l,m.flush=p,m}function o(e,t,o){var r=!0,a=!0;if("function"!=typeof e)throw new TypeError(f);return i(o)&&(r="leading"in o?!!o.leading:r,a="trailing"in o?!!o.trailing:a),n(e,t,{leading:r,maxWait:t,trailing:a})}function i(e){var t="undefined"==typeof e?"undefined":c(e);return!!e&&("object"==t||"function"==t)}function r(e){return!!e&&"object"==("undefined"==typeof e?"undefined":c(e))}function a(e){return"symbol"==("undefined"==typeof e?"undefined":c(e))||r(e)&&k.call(e)==d}function u(e){if("number"==typeof e)return e;if(a(e))return s;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(l,"");var n=m.test(e);return n||b.test(e)?v(e.slice(2),n?2:8):p.test(e)?s:+e}var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f="Expected a function",s=NaN,d="[object Symbol]",l=/^\s+|\s+$/g,p=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,b=/^0o[0-7]+$/i,v=parseInt,y="object"==("undefined"==typeof t?"undefined":c(t))&&t&&t.Object===Object&&t,g="object"==("undefined"==typeof self?"undefined":c(self))&&self&&self.Object===Object&&self,h=y||g||Function("return this")(),w=Object.prototype,k=w.toString,x=Math.max,j=Math.min,O=function(){return h.Date.now()};e.exports=o}).call(t,function(){return this}())},function(e,t){(function(t){"use strict";function n(e,t,n){function i(t){var n=b,o=v;return b=v=void 0,O=t,g=e.apply(o,n)}function r(e){return O=e,h=setTimeout(s,t),_?i(e):g}function u(e){var n=e-w,o=e-O,i=t-n;return S?x(i,y-o):i}function f(e){var n=e-w,o=e-O;return void 0===w||n>=t||n<0||S&&o>=y}function s(){var e=j();return f(e)?d(e):void(h=setTimeout(s,u(e)))}function d(e){return h=void 0,z&&b?i(e):(b=v=void 0,g)}function l(){void 0!==h&&clearTimeout(h),O=0,b=w=v=h=void 0}function p(){return void 0===h?g:d(j())}function m(){var e=j(),n=f(e);if(b=arguments,v=this,w=e,n){if(void 0===h)return r(w);if(S)return h=setTimeout(s,t),i(w)}return void 0===h&&(h=setTimeout(s,t)),g}var b,v,y,g,h,w,O=0,_=!1,S=!1,z=!0;if("function"!=typeof e)throw new TypeError(c);return t=a(t)||0,o(n)&&(_=!!n.leading,S="maxWait"in n,y=S?k(a(n.maxWait)||0,t):y,z="trailing"in n?!!n.trailing:z),m.cancel=l,m.flush=p,m}function o(e){var t="undefined"==typeof e?"undefined":u(e);return!!e&&("object"==t||"function"==t)}function i(e){return!!e&&"object"==("undefined"==typeof e?"undefined":u(e))}function r(e){return"symbol"==("undefined"==typeof e?"undefined":u(e))||i(e)&&w.call(e)==s}function a(e){if("number"==typeof e)return e;if(r(e))return f;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(d,"");var n=p.test(e);return n||m.test(e)?b(e.slice(2),n?2:8):l.test(e)?f:+e}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c="Expected a function",f=NaN,s="[object Symbol]",d=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,m=/^0o[0-7]+$/i,b=parseInt,v="object"==("undefined"==typeof t?"undefined":u(t))&&t&&t.Object===Object&&t,y="object"==("undefined"==typeof self?"undefined":u(self))&&self&&self.Object===Object&&self,g=v||y||Function("return this")(),h=Object.prototype,w=h.toString,k=Math.max,x=Math.min,j=function(){return g.Date.now()};e.exports=n}).call(t,function(){return this}())},function(e,t){"use strict";function n(e,t){var n=window.document,r=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,a=new r(o);i=t,a.observe(n.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}function o(e){e&&e.forEach(function(e){var t=Array.prototype.slice.call(e.addedNodes),n=Array.prototype.slice.call(e.removedNodes),o=t.concat(n).filter(function(e){return e.hasAttribute&&e.hasAttribute("data-aos")}).length;o&&i()})}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){};t.default=n},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(){return navigator.userAgent||navigator.vendor||window.opera||""}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;ne.position?e.node.classList.add("aos-animate"):"undefined"!=typeof o&&("false"===o||!n&&"true"!==o)&&e.node.classList.remove("aos-animate")},o=function(e,t){var o=window.pageYOffset,i=window.innerHeight;e.forEach(function(e,r){n(e,i+o,t)})};t.default=o},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),r=o(i),a=function(e,t){return e.forEach(function(e,n){e.node.classList.add("aos-init"),e.position=(0,r.default)(e.node,t.offset)}),e};t.default=a},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(13),r=o(i),a=function(e,t){var n=0,o=0,i=window.innerHeight,a={offset:e.getAttribute("data-aos-offset"),anchor:e.getAttribute("data-aos-anchor"),anchorPlacement:e.getAttribute("data-aos-anchor-placement")};switch(a.offset&&!isNaN(a.offset)&&(o=parseInt(a.offset)),a.anchor&&document.querySelectorAll(a.anchor)&&(e=document.querySelectorAll(a.anchor)[0]),n=(0,r.default)(e).top,a.anchorPlacement){case"top-bottom":break;case"center-bottom":n+=e.offsetHeight/2;break;case"bottom-bottom":n+=e.offsetHeight;break;case"top-center":n+=i/2;break;case"bottom-center":n+=i/2+e.offsetHeight;break;case"center-center":n+=i/2+e.offsetHeight/2;break;case"top-top":n+=i;break;case"bottom-top":n+=e.offsetHeight+i;break;case"center-top":n+=e.offsetHeight/2+i}return a.anchorPlacement||a.offset||isNaN(t)||(o=t),n+o};t.default=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){for(var t=0,n=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-("BODY"!=e.tagName?e.scrollLeft:0),n+=e.offsetTop-("BODY"!=e.tagName?e.scrollTop:0),e=e.offsetParent;return{top:n,left:t}};t.default=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e=e||document.querySelectorAll("[data-aos]"),Array.prototype.map.call(e,function(e){return{node:e}})};t.default=n}])}); \ No newline at end of file diff --git a/html/js/common.js b/html/js/common.js new file mode 100644 index 0000000..b33e5db --- /dev/null +++ b/html/js/common.js @@ -0,0 +1,166 @@ +$(function(){ + new WOW().init(); + AOS.init(); + new Swiper('.swiper-container'); + const swiper = new Swiper('.swiper-container', { + //기본 셋팅 + //방향 셋팅 vertical 수직, horizontal 수평 설정이 없으면 수평 + direction: 'horizontal', + //한번에 보여지는 페이지 숫자 + slidesPerView: 1, + //페이지와 페이지 사이의 간격 + spaceBetween: 30, + //드레그 기능 true 사용가능 false 사용불가 + debugger: true, + //마우스 휠기능 true 사용가능 false 사용불가 + mousewheel: false, + //반복 기능 true 사용가능 false 사용불가 + loop: true, + //선택된 슬라이드를 중심으로 true 사용가능 false 사용불가 + centeredSlides: true, + // 페이지 전환효과 slidesPerView효과와 같이 사용 불가 + // effect: 'fade', + //자동 스크를링 + autoplay: { + //시간 1000 이 1초 + delay: 2500, + disableOnInteraction: false, + }, + //페이징 + pagination: { + //페이지 기능 + el: '.swiper-pagination', + //클릭 가능여부 + clickable: true, + }, + //방향표 + navigation: { + //다음페이지 설정 + nextEl: '.swiper-button-next', + //이전페이지 설정 + prevEl: '.swiper-button-prev', + }, + }); + + new fullpage('#fullpage', { + licenseKey: '13F1F552-6ACE43B7-95262729-9E0B4778', + //options here + autoScrolling:true, + scrollHorizontally: true, + navigation:true, + navigationPosition:'right', + scrollBar: true + }); + + //methods + $.fn.fullpage.setAllowScrolling(true); +}); + + +$(function(){ + + "use strict"; + + var canvas = document.getElementById('canvas'), + ctx = canvas.getContext('2d'), + w = canvas.width = window.innerWidth, + h = canvas.height = window.innerHeight, + + hue = 217, + stars = [], + count = 0, + maxStars = 1000; + + // Thanks @jackrugile for the performance tip! https://codepen.io/jackrugile/pen/BjBGoM + // Cache gradient + var canvas2 = document.createElement('canvas'), + ctx2 = canvas2.getContext('2d'); + canvas2.width = 100; + canvas2.height = 100; + var half = canvas2.width/2, + gradient2 = ctx2.createRadialGradient(half, half, 0, half, half, half); + gradient2.addColorStop(0.025, '#fff'); + gradient2.addColorStop(0.1, 'hsl(' + hue + ', 61%, 33%)'); + gradient2.addColorStop(0.25, 'hsl(' + hue + ', 64%, 6%)'); + gradient2.addColorStop(1, 'transparent'); + + ctx2.fillStyle = gradient2; + ctx2.beginPath(); + ctx2.arc(half, half, half, 0, Math.PI * 2); + ctx2.fill(); + + // End cache + + function random(min, max) { + if (arguments.length < 2) { + max = min; + min = 0; + } + + if (min > max) { + var hold = max; + max = min; + min = hold; + } + + return Math.floor(Math.random() * (max - min + 1)) + min; + } + + function maxOrbit(x,y) { + var max = Math.max(x,y), + diameter = Math.round(Math.sqrt(max*max + max*max)); + return diameter/2; + } + + var Star = function() { + + this.orbitRadius = random(maxOrbit(w,h)); + this.radius = random(60, this.orbitRadius) / 12; + this.orbitX = w / 2; + this.orbitY = h / 2; + this.timePassed = random(0, maxStars); + this.speed = random(this.orbitRadius) / 1000000; + this.alpha = random(2, 10) / 10; + + count++; + stars[count] = this; + } + + Star.prototype.draw = function() { + var x = Math.sin(this.timePassed) * this.orbitRadius + this.orbitX, + y = Math.cos(this.timePassed) * this.orbitRadius + this.orbitY, + twinkle = random(10); + + if (twinkle === 1 && this.alpha > 0) { + this.alpha -= 0.05; + } else if (twinkle === 2 && this.alpha < 1) { + this.alpha += 0.05; + } + + ctx.globalAlpha = this.alpha; + ctx.drawImage(canvas2, x - this.radius / 2, y - this.radius / 2, this.radius, this.radius); + this.timePassed += this.speed; + } + + for (var i = 0; i < maxStars; i++) { + new Star(); + } + + function animation() { + ctx.globalCompositeOperation = 'source-over'; + ctx.globalAlpha = 0.8; + ctx.fillStyle = 'hsla(' + hue + ', 64%, 6%, 1)'; + ctx.fillRect(0, 0, w, h) + + ctx.globalCompositeOperation = 'lighter'; + for (var i = 1, l = stars.length; i < l; i++) { + stars[i].draw(); + }; + + window.requestAnimationFrame(animation); + } + + animation(); + + +}); \ No newline at end of file diff --git a/html/js/fullpage.js b/html/js/fullpage.js new file mode 100644 index 0000000..f747762 --- /dev/null +++ b/html/js/fullpage.js @@ -0,0 +1,4201 @@ +/*! + * fullPage 3.0.8 + * https://github.com/alvarotrigo/fullPage.js + * + * @license GPLv3 for open source use only + * or Fullpage Commercial License for commercial use + * http://alvarotrigo.com/fullPage/pricing/ + * + * Copyright (C) 2018 http://alvarotrigo.com/fullPage - A project by Alvaro Trigo + */ +(function( root, window, document, factory, undefined) { + if( typeof define === 'function' && define.amd ) { + // AMD. Register as an anonymous module. + define( function() { + root.fullpage = factory(window, document); + return root.fullpage; + } ); + } else if( typeof exports === 'object' ) { + // Node. Does not work with strict CommonJS. + module.exports = factory(window, document); + } else { + // Browser globals. + window.fullpage = factory(window, document); + } +}(this, window, document, function(window, document){ + 'use strict'; + + // keeping central set of classnames and selectors + var WRAPPER = 'fullpage-wrapper'; + var WRAPPER_SEL = '.' + WRAPPER; + + // slimscroll + var SCROLLABLE = 'fp-scrollable'; + var SCROLLABLE_SEL = '.' + SCROLLABLE; + + // util + var RESPONSIVE = 'fp-responsive'; + var NO_TRANSITION = 'fp-notransition'; + var DESTROYED = 'fp-destroyed'; + var ENABLED = 'fp-enabled'; + var VIEWING_PREFIX = 'fp-viewing'; + var ACTIVE = 'active'; + var ACTIVE_SEL = '.' + ACTIVE; + var COMPLETELY = 'fp-completely'; + var COMPLETELY_SEL = '.' + COMPLETELY; + + // section + var SECTION_DEFAULT_SEL = '.section'; + var SECTION = 'fp-section'; + var SECTION_SEL = '.' + SECTION; + var SECTION_ACTIVE_SEL = SECTION_SEL + ACTIVE_SEL; + var TABLE_CELL = 'fp-tableCell'; + var TABLE_CELL_SEL = '.' + TABLE_CELL; + var AUTO_HEIGHT = 'fp-auto-height'; + var AUTO_HEIGHT_SEL = '.' + AUTO_HEIGHT; + var AUTO_HEIGHT_RESPONSIVE = 'fp-auto-height-responsive'; + var AUTO_HEIGHT_RESPONSIVE_SEL = '.' + AUTO_HEIGHT_RESPONSIVE; + var NORMAL_SCROLL = 'fp-normal-scroll'; + var NORMAL_SCROLL_SEL = '.' + NORMAL_SCROLL; + + // section nav + var SECTION_NAV = 'fp-nav'; + var SECTION_NAV_SEL = '#' + SECTION_NAV; + var SECTION_NAV_TOOLTIP = 'fp-tooltip'; + var SECTION_NAV_TOOLTIP_SEL='.'+SECTION_NAV_TOOLTIP; + var SHOW_ACTIVE_TOOLTIP = 'fp-show-active'; + + // slide + var SLIDE_DEFAULT_SEL = '.slide'; + var SLIDE = 'fp-slide'; + var SLIDE_SEL = '.' + SLIDE; + var SLIDE_ACTIVE_SEL = SLIDE_SEL + ACTIVE_SEL; + var SLIDES_WRAPPER = 'fp-slides'; + var SLIDES_WRAPPER_SEL = '.' + SLIDES_WRAPPER; + var SLIDES_CONTAINER = 'fp-slidesContainer'; + var SLIDES_CONTAINER_SEL = '.' + SLIDES_CONTAINER; + var TABLE = 'fp-table'; + + // slide nav + var SLIDES_NAV = 'fp-slidesNav'; + var SLIDES_NAV_SEL = '.' + SLIDES_NAV; + var SLIDES_NAV_LINK_SEL = SLIDES_NAV_SEL + ' a'; + var SLIDES_ARROW = 'fp-controlArrow'; + var SLIDES_ARROW_SEL = '.' + SLIDES_ARROW; + var SLIDES_PREV = 'fp-prev'; + var SLIDES_PREV_SEL = '.' + SLIDES_PREV; + var SLIDES_ARROW_PREV = SLIDES_ARROW + ' ' + SLIDES_PREV; + var SLIDES_ARROW_PREV_SEL = SLIDES_ARROW_SEL + SLIDES_PREV_SEL; + var SLIDES_NEXT = 'fp-next'; + var SLIDES_NEXT_SEL = '.' + SLIDES_NEXT; + var SLIDES_ARROW_NEXT = SLIDES_ARROW + ' ' + SLIDES_NEXT; + var SLIDES_ARROW_NEXT_SEL = SLIDES_ARROW_SEL + SLIDES_NEXT_SEL; + + function initialise(containerSelector, options) { + var isOK = options && new RegExp('([\\d\\w]{8}-){3}[\\d\\w]{8}|^(?=.*?[A-Y])(?=.*?[a-y])(?=.*?[0-8])(?=.*?[#?!@$%^&*-]).{8,}$').test(options['li'+'cen'+'seK' + 'e' + 'y']) || document.domain.indexOf('al'+'varotri' +'go' + '.' + 'com') > -1; + + // cache common elements + var $htmlBody = $('html, body'); + var $html = $('html')[0]; + var $body = $('body')[0]; + + //only once my friend! + if(hasClass($html, ENABLED)){ displayWarnings(); return; } + + var FP = {}; + + // Creating some defaults, extending them with any options that were provided + options = deepExtend({ + //navigation + menu: false, + anchors:[], + lockAnchors: false, + navigation: false, + navigationPosition: 'right', + navigationTooltips: [], + showActiveTooltip: false, + slidesNavigation: false, + slidesNavPosition: 'bottom', + scrollBar: false, + hybrid: false, + + //scrolling + css3: true, + scrollingSpeed: 700, + autoScrolling: true, + fitToSection: true, + fitToSectionDelay: 1000, + easing: 'easeInOutCubic', + easingcss3: 'ease', + loopBottom: false, + loopTop: false, + loopHorizontal: true, + continuousVertical: false, + continuousHorizontal: false, + scrollHorizontally: false, + interlockedSlides: false, + dragAndMove: false, + offsetSections: false, + resetSliders: false, + fadingEffect: false, + normalScrollElements: null, + scrollOverflow: false, + scrollOverflowReset: false, + scrollOverflowHandler: window.fp_scrolloverflow ? window.fp_scrolloverflow.iscrollHandler : null, + scrollOverflowOptions: null, + touchSensitivity: 5, + touchWrapper: typeof containerSelector === 'string' ? $(containerSelector)[0] : containerSelector, + bigSectionsDestination: null, + + //Accessibility + keyboardScrolling: true, + animateAnchor: true, + recordHistory: true, + + //design + controlArrows: true, + controlArrowColor: '#fff', + verticalCentered: true, + sectionsColor : [], + paddingTop: 0, + paddingBottom: 0, + fixedElements: null, + responsive: 0, //backwards compabitility with responsiveWiddth + responsiveWidth: 0, + responsiveHeight: 0, + responsiveSlides: false, + parallax: false, + parallaxOptions: { + type: 'reveal', + percentage: 62, + property: 'translate' + }, + cards: false, + cardsOptions: { + perspective: 100, + fadeContent: true, + fadeBackground: true + }, + + //Custom selectors + sectionSelector: SECTION_DEFAULT_SEL, + slideSelector: SLIDE_DEFAULT_SEL, + + //events + v2compatible: false, + afterLoad: null, + onLeave: null, + afterRender: null, + afterResize: null, + afterReBuild: null, + afterSlideLoad: null, + onSlideLeave: null, + afterResponsive: null, + + lazyLoading: true + }, options); + + //flag to avoid very fast sliding for landscape sliders + var slideMoving = false; + + var isTouchDevice = navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/); + var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0) || (navigator.maxTouchPoints)); + var container = typeof containerSelector === 'string' ? $(containerSelector)[0] : containerSelector; + var windowsHeight = getWindowHeight(); + var windowsWidth = getWindowWidth(); + var isResizing = false; + var isWindowFocused = true; + var lastScrolledDestiny; + var lastScrolledSlide; + var canScroll = true; + var scrollings = []; + var controlPressed; + var startingSection; + var isScrollAllowed = {}; + isScrollAllowed.m = { 'up':true, 'down':true, 'left':true, 'right':true }; + isScrollAllowed.k = deepExtend({}, isScrollAllowed.m); + var MSPointer = getMSPointer(); + var events = { + touchmove: 'ontouchmove' in window ? 'touchmove' : MSPointer.move, + touchstart: 'ontouchstart' in window ? 'touchstart' : MSPointer.down + }; + var scrollBarHandler; + + // taken from https://github.com/udacity/ud891/blob/gh-pages/lesson2-focus/07-modals-and-keyboard-traps/solution/modal.js + var focusableElementsString = 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable]'; + + //cheks for passive event support + var g_supportsPassive = false; + try { + var opts = Object.defineProperty({}, 'passive', { + get: function() { + g_supportsPassive = true; + } + }); + window.addEventListener("testPassive", null, opts); + window.removeEventListener("testPassive", null, opts); + } catch (e) {} + + //timeouts + var resizeId; + var resizeHandlerId; + var afterSectionLoadsId; + var afterSlideLoadsId; + var scrollId; + var scrollId2; + var keydownId; + var g_doubleCheckHeightId; + var originals = deepExtend({}, options); //deep copy + var activeAnimation; + var g_initialAnchorsInDom = false; + var g_canFireMouseEnterNormalScroll = true; + var g_mediaLoadedId; + var extensions = [ + 'parallax', + 'scrollOverflowReset', + 'dragAndMove', + 'offsetSections', + 'fadingEffect', + 'responsiveSlides', + 'continuousHorizontal', + 'interlockedSlides', + 'scrollHorizontally', + 'resetSliders', + 'cards' + ]; + + displayWarnings(); + + //easeInOutCubic animation included in the plugin + window.fp_easings = deepExtend(window.fp_easings, { + easeInOutCubic: function (t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t + b;return c/2*((t-=2)*t*t + 2) + b; + } + }); + + /** + * Sets the autoScroll option. + * It changes the scroll bar visibility and the history of the site as a result. + */ + function setAutoScrolling(value, type){ + //removing the transformation + if(!value){ + silentScroll(0); + } + + setVariableState('autoScrolling', value, type); + + var element = $(SECTION_ACTIVE_SEL)[0]; + + if(options.autoScrolling && !options.scrollBar){ + css($htmlBody, { + 'overflow': 'hidden', + 'height': '100%' + }); + + setRecordHistory(originals.recordHistory, 'internal'); + + //for IE touch devices + css(container, { + '-ms-touch-action': 'none', + 'touch-action': 'none' + }); + + if(element != null){ + //moving the container up + silentScroll(element.offsetTop); + } + }else{ + css($htmlBody, { + 'overflow' : 'visible', + 'height' : 'initial' + }); + + var recordHistory = !options.autoScrolling ? false : originals.recordHistory; + setRecordHistory(recordHistory, 'internal'); + + //for IE touch devices + css(container, { + '-ms-touch-action': '', + 'touch-action': '' + }); + + //scrolling the page to the section with no animation + if (element != null) { + var scrollSettings = getScrollSettings(element.offsetTop); + scrollSettings.element.scrollTo(0, scrollSettings.options); + } + } + } + + /** + * Defines wheter to record the history for each hash change in the URL. + */ + function setRecordHistory(value, type){ + setVariableState('recordHistory', value, type); + } + + /** + * Defines the scrolling speed + */ + function setScrollingSpeed(value, type){ + setVariableState('scrollingSpeed', value, type); + } + + /** + * Sets fitToSection + */ + function setFitToSection(value, type){ + setVariableState('fitToSection', value, type); + } + + /** + * Sets lockAnchors + */ + function setLockAnchors(value){ + options.lockAnchors = value; + } + + /** + * Adds or remove the possibility of scrolling through sections by using the mouse wheel or the trackpad. + */ + function setMouseWheelScrolling(value){ + if(value){ + addMouseWheelHandler(); + addMiddleWheelHandler(); + }else{ + removeMouseWheelHandler(); + removeMiddleWheelHandler(); + } + } + + /** + * Adds or remove the possibility of scrolling through sections by using the mouse wheel/trackpad or touch gestures. + * Optionally a second parameter can be used to specify the direction for which the action will be applied. + * + * @param directions string containing the direction or directions separated by comma. + */ + function setAllowScrolling(value, directions){ + if(typeof directions !== 'undefined'){ + directions = directions.replace(/ /g,'').split(','); + + directions.forEach(function (direction){ + setIsScrollAllowed(value, direction, 'm'); + }); + } + else{ + setIsScrollAllowed(value, 'all', 'm'); + } + } + + /** + * Adds or remove the mouse wheel hijacking + */ + function setMouseHijack(value){ + if(value){ + setMouseWheelScrolling(true); + addTouchHandler(); + }else{ + setMouseWheelScrolling(false); + removeTouchHandler(); + } + } + + /** + * Adds or remove the possibility of scrolling through sections by using the keyboard arrow keys + */ + function setKeyboardScrolling(value, directions){ + if(typeof directions !== 'undefined'){ + directions = directions.replace(/ /g,'').split(','); + + directions.forEach(function(direction){ + setIsScrollAllowed(value, direction, 'k'); + }); + }else{ + setIsScrollAllowed(value, 'all', 'k'); + options.keyboardScrolling = value; + } + } + + /** + * Moves the page up one section. + */ + function moveSectionUp(){ + var prev = prevUntil($(SECTION_ACTIVE_SEL)[0], SECTION_SEL); + + //looping to the bottom if there's no more sections above + if (!prev && (options.loopTop || options.continuousVertical)) { + prev = last($(SECTION_SEL)); + } + + if (prev != null) { + scrollPage(prev, null, true); + } + } + + /** + * Moves the page down one section. + */ + function moveSectionDown(){ + var next = nextUntil($(SECTION_ACTIVE_SEL)[0], SECTION_SEL); + + //looping to the top if there's no more sections below + if(!next && + (options.loopBottom || options.continuousVertical)){ + next = $(SECTION_SEL)[0]; + } + + if(next != null){ + scrollPage(next, null, false); + } + } + + /** + * Moves the page to the given section and slide with no animation. + * Anchors or index positions can be used as params. + */ + function silentMoveTo(sectionAnchor, slideAnchor){ + setScrollingSpeed (0, 'internal'); + moveTo(sectionAnchor, slideAnchor); + setScrollingSpeed (originals.scrollingSpeed, 'internal'); + } + + /** + * Moves the page to the given section and slide. + * Anchors or index positions can be used as params. + */ + function moveTo(sectionAnchor, slideAnchor){ + var destiny = getSectionByAnchor(sectionAnchor); + + if (typeof slideAnchor !== 'undefined'){ + scrollPageAndSlide(sectionAnchor, slideAnchor); + }else if(destiny != null){ + scrollPage(destiny); + } + } + + /** + * Slides right the slider of the active section. + * Optional `section` param. + */ + function moveSlideRight(section){ + moveSlide('right', section); + } + + /** + * Slides left the slider of the active section. + * Optional `section` param. + */ + function moveSlideLeft(section){ + moveSlide('left', section); + } + + /** + * When resizing is finished, we adjust the slides sizes and positions + */ + function reBuild(resizing){ + if(hasClass(container, DESTROYED)){ return; } //nothing to do if the plugin was destroyed + + isResizing = true; + + //updating global vars + windowsHeight = getWindowHeight(); + windowsWidth = getWindowWidth(); + + var sections = $(SECTION_SEL); + for (var i = 0; i < sections.length; ++i) { + var section = sections[i]; + var slidesWrap = $(SLIDES_WRAPPER_SEL, section)[0]; + var slides = $(SLIDE_SEL, section); + + //adjusting the height of the table-cell for IE and Firefox + if(options.verticalCentered){ + css($(TABLE_CELL_SEL, section), {'height': getTableHeight(section) + 'px'}); + } + + css(section, {'height': windowsHeight + 'px'}); + + //adjusting the position fo the FULL WIDTH slides... + if (slides.length > 1) { + landscapeScroll(slidesWrap, $(SLIDE_ACTIVE_SEL, slidesWrap)[0]); + } + } + + if(options.scrollOverflow){ + scrollBarHandler.createScrollBarForAll(); + } + + var activeSection = $(SECTION_ACTIVE_SEL)[0]; + var sectionIndex = index(activeSection, SECTION_SEL); + + //isn't it the first section? + if(sectionIndex){ + //adjusting the position for the current section + silentMoveTo(sectionIndex + 1); + } + + isResizing = false; + if(isFunction( options.afterResize ) && resizing){ + options.afterResize.call(container, window.innerWidth, window.innerHeight); + } + if(isFunction( options.afterReBuild ) && !resizing){ + options.afterReBuild.call(container); + } + } + + /** + * Determines whether fullpage.js is in responsive mode or not. + */ + function isResponsiveMode(){ + return hasClass($body, RESPONSIVE); + } + + /** + * Turns fullPage.js to normal scrolling mode when the viewport `width` or `height` + * are smaller than the set limit values. + */ + function setResponsive(active){ + var isResponsive = isResponsiveMode(); + + if(active){ + if(!isResponsive){ + setAutoScrolling(false, 'internal'); + setFitToSection(false, 'internal'); + hide($(SECTION_NAV_SEL)); + addClass($body, RESPONSIVE); + if(isFunction( options.afterResponsive )){ + options.afterResponsive.call( container, active); + } + + //when on page load, we will remove scrolloverflow if necessary + if(options.scrollOverflow){ + scrollBarHandler.createScrollBarForAll(); + } + } + } + else if(isResponsive){ + setAutoScrolling(originals.autoScrolling, 'internal'); + setFitToSection(originals.autoScrolling, 'internal'); + show($(SECTION_NAV_SEL)); + removeClass($body, RESPONSIVE); + if(isFunction( options.afterResponsive )){ + options.afterResponsive.call( container, active); + } + } + } + + if(container){ + //public functions + FP.version = '3.0.8'; + FP.setAutoScrolling = setAutoScrolling; + FP.setRecordHistory = setRecordHistory; + FP.setScrollingSpeed = setScrollingSpeed; + FP.setFitToSection = setFitToSection; + FP.setLockAnchors = setLockAnchors; + FP.setMouseWheelScrolling = setMouseWheelScrolling; + FP.setAllowScrolling = setAllowScrolling; + FP.setKeyboardScrolling = setKeyboardScrolling; + FP.moveSectionUp = moveSectionUp; + FP.moveSectionDown = moveSectionDown; + FP.silentMoveTo = silentMoveTo; + FP.moveTo = moveTo; + FP.moveSlideRight = moveSlideRight; + FP.moveSlideLeft = moveSlideLeft; + FP.fitToSection = fitToSection; + FP.reBuild = reBuild; + FP.setResponsive = setResponsive; + FP.getFullpageData = function(){ return options; }; + FP.destroy = destroy; + FP.getActiveSection = getActiveSection; + FP.getActiveSlide = getActiveSlide; + + FP.test = { + top: '0px', + translate3d: 'translate3d(0px, 0px, 0px)', + translate3dH: (function(){ + var a = []; + for(var i = 0; i < $(options.sectionSelector, container).length; i++){ + a.push('translate3d(0px, 0px, 0px)'); + } + return a; + })(), + left: (function(){ + var a = []; + for(var i = 0; i < $(options.sectionSelector, container).length; i++){ + a.push(0); + } + return a; + })(), + options: options, + setAutoScrolling: setAutoScrolling + }; + + //functions we want to share across files but which are not + //mean to be used on their own by developers + FP.shared = { + afterRenderActions: afterRenderActions, + isNormalScrollElement: false + }; + + window.fullpage_api = FP; + + //using jQuery initialization? Creating the $.fn.fullpage object + if(options.$){ + Object.keys(FP).forEach(function (key) { + options.$.fn.fullpage[key] = FP[key]; + }); + } + + init(); + + bindEvents(); + } + + function init(){ + //if css3 is not supported, it will use jQuery animations + if(options.css3){ + options.css3 = support3d(); + } + + options.scrollBar = options.scrollBar || options.hybrid; + + setOptionsFromDOM(); + prepareDom(); + setAllowScrolling(true); + setMouseHijack(true); + setAutoScrolling(options.autoScrolling, 'internal'); + responsive(); + + //setting the class for the body element + setBodyClass(); + + if(document.readyState === 'complete'){ + scrollToAnchor(); + } + window.addEventListener('load', scrollToAnchor); + + //if we use scrollOverflow we'll fire afterRender in the scrolloverflow file + if(!options.scrollOverflow){ + afterRenderActions(); + } + + doubleCheckHeight(); + } + + function bindEvents(){ + + //when scrolling... + window.addEventListener('scroll', scrollHandler); + + //detecting any change on the URL to scroll to the given anchor link + //(a way to detect back history button as we play with the hashes on the URL) + window.addEventListener('hashchange', hashChangeHandler); + + //when opening a new tab (ctrl + t), `control` won't be pressed when coming back. + window.addEventListener('blur', blurHandler); + + //when resizing the site, we adjust the heights of the sections, slimScroll... + window.addEventListener('resize', resizeHandler); + + //Sliding with arrow keys, both, vertical and horizontal + document.addEventListener('keydown', keydownHandler); + + //to prevent scrolling while zooming + document.addEventListener('keyup', keyUpHandler); + + //Scrolls to the section when clicking the navigation bullet + //simulating the jQuery .on('click') event using delegation + ['click', 'touchstart'].forEach(function(eventName){ + document.addEventListener(eventName, delegatedEvents); + }); + + /** + * Applying normalScroll elements. + * Ignoring the scrolls over the specified selectors. + */ + if(options.normalScrollElements){ + ['mouseenter', 'touchstart'].forEach(function(eventName){ + forMouseLeaveOrTouch(eventName, false); + }); + + ['mouseleave', 'touchend'].forEach(function(eventName){ + forMouseLeaveOrTouch(eventName, true); + }); + } + } + + function delegatedEvents(e){ + var target = e.target; + + if(target && closest(target, SECTION_NAV_SEL + ' a')){ + sectionBulletHandler.call(target, e); + } + else if(matches(target, SECTION_NAV_TOOLTIP_SEL)){ + tooltipTextHandler.call(target); + } + else if(matches(target, SLIDES_ARROW_SEL)){ + slideArrowHandler.call(target, e); + } + else if(matches(target, SLIDES_NAV_LINK_SEL) || closest(target, SLIDES_NAV_LINK_SEL) != null){ + slideBulletHandler.call(target, e); + } + else if(closest(target, options.menu + ' [data-menuanchor]')){ + menuItemsHandler.call(target, e); + } + } + + function forMouseLeaveOrTouch(eventName, allowScrolling){ + //a way to pass arguments to the onMouseEnterOrLeave function + document['fp_' + eventName] = allowScrolling; + document.addEventListener(eventName, onMouseEnterOrLeave, true); //capturing phase + } + + function onMouseEnterOrLeave(e) { + var type = e.type; + var isInsideOneNormalScroll = false; + var isUsingScrollOverflow = options.scrollOverflow; + + //onMouseLeave will use the destination target, not the one we are moving away from + var target = type === 'mouseleave' ? e.toElement || e.relatedTarget : e.target; + + //coming from closing a normalScrollElements modal or moving outside viewport? + if(target == document || !target){ + setMouseHijack(true); + + if(isUsingScrollOverflow){ + options.scrollOverflowHandler.setIscroll(target, true); + } + return; + } + + if(type === 'touchend'){ + g_canFireMouseEnterNormalScroll = false; + setTimeout(function(){ + g_canFireMouseEnterNormalScroll = true; + }, 800); + } + + //preventing mouseenter event to do anything when coming from a touchEnd event + //fixing issue #3576 + if(type === 'mouseenter' && !g_canFireMouseEnterNormalScroll){ + return; + } + + var normalSelectors = options.normalScrollElements.split(','); + + normalSelectors.forEach(function(normalSelector){ + if(!isInsideOneNormalScroll){ + var isNormalScrollTarget = matches(target, normalSelector); + + //leaving a child inside the normalScoll element is not leaving the normalScroll #3661 + var isNormalScrollChildFocused = closest(target, normalSelector); + + if(isNormalScrollTarget || isNormalScrollChildFocused){ + if(!FP.shared.isNormalScrollElement){ + setMouseHijack(false); + + if(isUsingScrollOverflow){ + options.scrollOverflowHandler.setIscroll(target, false); + } + } + FP.shared.isNormalScrollElement = true; + isInsideOneNormalScroll = true; + } + } + }); + + //not inside a single normal scroll element anymore? + if(!isInsideOneNormalScroll && FP.shared.isNormalScrollElement){ + setMouseHijack(true); + + if(isUsingScrollOverflow){ + options.scrollOverflowHandler.setIscroll(target, true); + } + + FP.shared.isNormalScrollElement = false; + } + } + + /** + * Checks the viewport a few times on a define interval of time to + * see if it has changed in any of those. If that's the case, it resizes. + */ + function doubleCheckHeight(){ + for(var i = 1; i < 4; i++){ + g_doubleCheckHeightId = setTimeout(adjustToNewViewport, 350 * i); + } + } + + /** + * Adjusts a section to the viewport if it has changed. + */ + function adjustToNewViewport(){ + var newWindowHeight = getWindowHeight(); + var newWindowWidth = getWindowWidth(); + + if(windowsHeight !== newWindowHeight || windowsWidth !== newWindowWidth){ + windowsHeight = newWindowHeight; + windowsWidth = newWindowWidth; + reBuild(true); + } + } + + /** + * Setting options from DOM elements if they are not provided. + */ + function setOptionsFromDOM(){ + + //no anchors option? Checking for them in the DOM attributes + if(!options.anchors.length){ + var anchorsAttribute = '[data-anchor]'; + var anchors = $(options.sectionSelector.split(',').join(anchorsAttribute + ',') + anchorsAttribute, container); + if(anchors.length){ + g_initialAnchorsInDom = true; + anchors.forEach(function(item){ + options.anchors.push(item.getAttribute('data-anchor').toString()); + }); + } + } + + //no tooltips option? Checking for them in the DOM attributes + if(!options.navigationTooltips.length){ + var tooltipsAttribute = '[data-tooltip]'; + var tooltips = $(options.sectionSelector.split(',').join(tooltipsAttribute + ',') + tooltipsAttribute, container); + if(tooltips.length){ + tooltips.forEach(function(item){ + options.navigationTooltips.push(item.getAttribute('data-tooltip').toString()); + }); + } + } + } + + /** + * Works over the DOM structure to set it up for the current fullpage options. + */ + function prepareDom(){ + css(container, { + 'height': '100%', + 'position': 'relative' + }); + + //adding a class to recognize the container internally in the code + addClass(container, WRAPPER); + addClass($html, ENABLED); + + //due to https://github.com/alvarotrigo/fullPage.js/issues/1502 + windowsHeight = getWindowHeight(); + + removeClass(container, DESTROYED); //in case it was destroyed before initializing it again + + addInternalSelectors(); + + var sections = $(SECTION_SEL); + + //styling the sections / slides / menu + for(var i = 0; i 0) { + styleSlides(section, slides, numSlides); + }else{ + if(options.verticalCentered){ + addTableClass(section); + } + } + } + + //fixed elements need to be moved out of the plugin container due to problems with CSS3. + if(options.fixedElements && options.css3){ + $(options.fixedElements).forEach(function(item){ + $body.appendChild(item); + }); + } + + //vertical centered of the navigation + active bullet + if(options.navigation){ + addVerticalNavigation(); + } + + enableYoutubeAPI(); + + if(options.scrollOverflow){ + scrollBarHandler = options.scrollOverflowHandler.init(options); + } + } + + /** + * Styles the horizontal slides for a section. + */ + function styleSlides(section, slides, numSlides){ + var sliderWidth = numSlides * 100; + var slideWidth = 100 / numSlides; + + var slidesWrapper = document.createElement('div'); + slidesWrapper.className = SLIDES_WRAPPER; //fp-slides + wrapAll(slides, slidesWrapper); + + var slidesContainer = document.createElement('div'); + slidesContainer.className = SLIDES_CONTAINER; //fp-slidesContainer + wrapAll(slides, slidesContainer); + + css($(SLIDES_CONTAINER_SEL, section), {'width': sliderWidth + '%'}); + + if(numSlides > 1){ + if(options.controlArrows){ + createSlideArrows(section); + } + + if(options.slidesNavigation){ + addSlidesNavigation(section, numSlides); + } + } + + slides.forEach(function(slide) { + css(slide, {'width': slideWidth + '%'}); + + if(options.verticalCentered){ + addTableClass(slide); + } + }); + + var startingSlide = $(SLIDE_ACTIVE_SEL, section)[0]; + + //if the slide won't be an starting point, the default will be the first one + //the active section isn't the first one? Is not the first slide of the first section? Then we load that section/slide by default. + if( startingSlide != null && (index($(SECTION_ACTIVE_SEL), SECTION_SEL) !== 0 || (index($(SECTION_ACTIVE_SEL), SECTION_SEL) === 0 && index(startingSlide) !== 0))){ + silentLandscapeScroll(startingSlide, 'internal'); + }else{ + addClass(slides[0], ACTIVE); + } + } + + /** + * Styling vertical sections + */ + function styleSection(section, index){ + //if no active section is defined, the 1st one will be the default one + if(!index && $(SECTION_ACTIVE_SEL)[0] == null) { + addClass(section, ACTIVE); + } + startingSection = $(SECTION_ACTIVE_SEL)[0]; + + css(section, {'height': windowsHeight + 'px'}); + + if(options.paddingTop){ + css(section, {'padding-top': options.paddingTop}); + } + + if(options.paddingBottom){ + css(section, {'padding-bottom': options.paddingBottom}); + } + + if (typeof options.sectionsColor[index] !== 'undefined') { + css(section, {'background-color': options.sectionsColor[index]}); + } + + if (typeof options.anchors[index] !== 'undefined') { + section.setAttribute('data-anchor', options.anchors[index]); + } + } + + /** + * Sets the data-anchor attributes to the menu elements and activates the current one. + */ + function styleMenu(section, index){ + if (typeof options.anchors[index] !== 'undefined') { + //activating the menu / nav element on load + if(hasClass(section, ACTIVE)){ + activateMenuAndNav(options.anchors[index], index); + } + } + + //moving the menu outside the main container if it is inside (avoid problems with fixed positions when using CSS3 tranforms) + if(options.menu && options.css3 && closest($(options.menu)[0], WRAPPER_SEL) != null){ + $(options.menu).forEach(function(menu) { + $body.appendChild(menu); + }); + } + } + + /** + * Adds internal classes to be able to provide customizable selectors + * keeping the link with the style sheet. + */ + function addInternalSelectors(){ + addClass($(options.sectionSelector, container), SECTION); + addClass($(options.slideSelector, container), SLIDE); + } + + /** + * Creates the control arrows for the given section + */ + function createSlideArrows(section){ + var arrows = [createElementFromHTML('
'), createElementFromHTML('
')]; + after($(SLIDES_WRAPPER_SEL, section)[0], arrows); + + if(options.controlArrowColor !== '#fff'){ + css($(SLIDES_ARROW_NEXT_SEL, section), {'border-color': 'transparent transparent transparent '+options.controlArrowColor}); + css($(SLIDES_ARROW_PREV_SEL, section), {'border-color': 'transparent '+ options.controlArrowColor + ' transparent transparent'}); + } + + if(!options.loopHorizontal){ + hide($(SLIDES_ARROW_PREV_SEL, section)); + } + } + + /** + * Creates a vertical navigation bar. + */ + function addVerticalNavigation(){ + var navigation = document.createElement('div'); + navigation.setAttribute('id', SECTION_NAV); + + var divUl = document.createElement('ul'); + navigation.appendChild(divUl); + + appendTo(navigation, $body); + var nav = $(SECTION_NAV_SEL)[0]; + + addClass(nav, 'fp-' + options.navigationPosition); + + if(options.showActiveTooltip){ + addClass(nav, SHOW_ACTIVE_TOOLTIP); + } + + var li = ''; + + for (var i = 0; i < $(SECTION_SEL).length; i++) { + var link = ''; + if (options.anchors.length) { + link = options.anchors[i]; + } + + li += '
  • ' + getBulletLinkName(i, 'Section') + ''; + + // Only add tooltip if needed (defined by user) + var tooltip = options.navigationTooltips[i]; + + if (typeof tooltip !== 'undefined' && tooltip !== '') { + li += '
    ' + tooltip + '
    '; + } + + li += '
  • '; + } + $('ul', nav)[0].innerHTML = li; + + //centering it vertically + css($(SECTION_NAV_SEL), {'margin-top': '-' + ($(SECTION_NAV_SEL)[0].offsetHeight/2) + 'px'}); + + //activating the current active section + + var bullet = $('li', $(SECTION_NAV_SEL)[0])[index($(SECTION_ACTIVE_SEL)[0], SECTION_SEL)]; + addClass($('a', bullet), ACTIVE); + } + + /** + * Gets the name for screen readers for a section/slide navigation bullet. + */ + function getBulletLinkName(i, defaultName){ + return options.navigationTooltips[i] + || options.anchors[i] + || defaultName + ' ' + (i+1); + } + + /* + * Enables the Youtube videos API so we can control their flow if necessary. + */ + function enableYoutubeAPI(){ + $('iframe[src*="youtube.com/embed/"]', container).forEach(function(item){ + addURLParam(item, 'enablejsapi=1'); + }); + } + + /** + * Adds a new parameter and its value to the `src` of a given element + */ + function addURLParam(element, newParam){ + var originalSrc = element.getAttribute('src'); + element.setAttribute('src', originalSrc + getUrlParamSign(originalSrc) + newParam); + } + + /* + * Returns the prefix sign to use for a new parameter in an existen URL. + * + * @return {String} ? | & + */ + function getUrlParamSign(url){ + return ( !/\?/.test( url ) ) ? '?' : '&'; + } + + /** + * Actions and callbacks to fire afterRender + */ + function afterRenderActions(){ + var section = $(SECTION_ACTIVE_SEL)[0]; + + addClass(section, COMPLETELY); + + lazyLoad(section); + lazyLoadOthers(); + playMedia(section); + + if(options.scrollOverflow){ + options.scrollOverflowHandler.afterLoad(); + } + + if(isDestinyTheStartingSection() && isFunction(options.afterLoad) ){ + fireCallback('afterLoad', { + activeSection: section, + element: section, + direction: null, + + //for backwards compatibility callback (to be removed in a future!) + anchorLink: section.getAttribute('data-anchor'), + sectionIndex: index(section, SECTION_SEL) + }); + } + + if(isFunction(options.afterRender)){ + fireCallback('afterRender'); + } + } + + /** + * Determines if the URL anchor destiny is the starting section (the one using 'active' class before initialization) + */ + function isDestinyTheStartingSection(){ + var anchor = getAnchorsURL(); + var destinationSection = getSectionByAnchor(anchor.section); + return !anchor.section || !destinationSection || typeof destinationSection !=='undefined' && index(destinationSection) === index(startingSection); + } + + var isScrolling = false; + var lastScroll = 0; + + //when scrolling... + function scrollHandler(){ + var currentSection; + + if(!options.autoScrolling || options.scrollBar){ + var currentScroll = getScrollTop(); + var scrollDirection = getScrollDirection(currentScroll); + var visibleSectionIndex = 0; + var screen_mid = currentScroll + (getWindowHeight() / 2.0); + var isAtBottom = $body.offsetHeight - getWindowHeight() === currentScroll; + var sections = $(SECTION_SEL); + + //when using `auto-height` for a small last section it won't be centered in the viewport + if(isAtBottom){ + visibleSectionIndex = sections.length - 1; + } + //is at top? when using `auto-height` for a small first section it won't be centered in the viewport + else if(!currentScroll){ + visibleSectionIndex = 0; + } + + //taking the section which is showing more content in the viewport + else{ + for (var i = 0; i < sections.length; ++i) { + var section = sections[i]; + + // Pick the the last section which passes the middle line of the screen. + if (section.offsetTop <= screen_mid) + { + visibleSectionIndex = i; + } + } + } + + if(isCompletelyInViewPort(scrollDirection)){ + if(!hasClass($(SECTION_ACTIVE_SEL)[0], COMPLETELY)){ + addClass($(SECTION_ACTIVE_SEL)[0], COMPLETELY); + removeClass(siblings($(SECTION_ACTIVE_SEL)[0]), COMPLETELY); + } + } + + //geting the last one, the current one on the screen + currentSection = sections[visibleSectionIndex]; + + //setting the visible section as active when manually scrolling + //executing only once the first time we reach the section + if(!hasClass(currentSection, ACTIVE)){ + isScrolling = true; + var leavingSection = $(SECTION_ACTIVE_SEL)[0]; + var leavingSectionIndex = index(leavingSection, SECTION_SEL) + 1; + var yMovement = getYmovement(currentSection); + var anchorLink = currentSection.getAttribute('data-anchor'); + var sectionIndex = index(currentSection, SECTION_SEL) + 1; + var activeSlide = $(SLIDE_ACTIVE_SEL, currentSection)[0]; + var slideIndex; + var slideAnchorLink; + var callbacksParams = { + activeSection: leavingSection, + sectionIndex: sectionIndex -1, + anchorLink: anchorLink, + element: currentSection, + leavingSection: leavingSectionIndex, + direction: yMovement + }; + + if(activeSlide){ + slideAnchorLink = activeSlide.getAttribute('data-anchor'); + slideIndex = index(activeSlide); + } + + if(canScroll){ + addClass(currentSection, ACTIVE); + removeClass(siblings(currentSection), ACTIVE); + + if(isFunction( options.onLeave )){ + fireCallback('onLeave', callbacksParams); + } + if(isFunction( options.afterLoad )){ + fireCallback('afterLoad', callbacksParams); + } + + stopMedia(leavingSection); + lazyLoad(currentSection); + playMedia(currentSection); + + activateMenuAndNav(anchorLink, sectionIndex - 1); + + if(options.anchors.length){ + //needed to enter in hashChange event when using the menu with anchor links + lastScrolledDestiny = anchorLink; + } + setState(slideIndex, slideAnchorLink, anchorLink, sectionIndex); + } + + //small timeout in order to avoid entering in hashChange event when scrolling is not finished yet + clearTimeout(scrollId); + scrollId = setTimeout(function(){ + isScrolling = false; + }, 100); + } + + if(options.fitToSection){ + //for the auto adjust of the viewport to fit a whole section + clearTimeout(scrollId2); + + scrollId2 = setTimeout(function(){ + //checking it again in case it changed during the delay + if(options.fitToSection && + + //is the destination element bigger than the viewport? + $(SECTION_ACTIVE_SEL)[0].offsetHeight <= windowsHeight + ){ + fitToSection(); + } + }, options.fitToSectionDelay); + } + } + } + + /** + * Fits the site to the nearest active section + */ + function fitToSection(){ + //checking fitToSection again in case it was set to false before the timeout delay + if(canScroll){ + //allows to scroll to an active section and + //if the section is already active, we prevent firing callbacks + isResizing = true; + + scrollPage($(SECTION_ACTIVE_SEL)[0]); + isResizing = false; + } + } + + /** + * Determines whether the active section has seen in its whole or not. + */ + function isCompletelyInViewPort(movement){ + var top = $(SECTION_ACTIVE_SEL)[0].offsetTop; + var bottom = top + getWindowHeight(); + + if(movement == 'up'){ + return bottom >= (getScrollTop() + getWindowHeight()); + } + return top <= getScrollTop(); + } + + /** + * Determines whether a section is in the viewport or not. + */ + function isSectionInViewport (el) { + var rect = el.getBoundingClientRect(); + var top = rect.top; + var bottom = rect.bottom; + + //sometimes there's a 1px offset on the bottom of the screen even when the + //section's height is the window.innerHeight one. I guess because pixels won't allow decimals. + //using this prevents from lazyLoading the section that is not yet visible + //(only 1 pixel offset is) + var pixelOffset = 2; + + var isTopInView = top + pixelOffset < windowsHeight && top > 0; + var isBottomInView = bottom > pixelOffset && bottom < windowsHeight; + + return isTopInView || isBottomInView; + } + + /** + * Gets the directon of the the scrolling fired by the scroll event. + */ + function getScrollDirection(currentScroll){ + var direction = currentScroll > lastScroll ? 'down' : 'up'; + + lastScroll = currentScroll; + + //needed for auto-height sections to determine if we want to scroll to the top or bottom of the destination + previousDestTop = currentScroll; + + return direction; + } + + /** + * Determines the way of scrolling up or down: + * by 'automatically' scrolling a section or by using the default and normal scrolling. + */ + function scrolling(type){ + if (!isScrollAllowed.m[type]){ + return; + } + + var scrollSection = (type === 'down') ? moveSectionDown : moveSectionUp; + + if(options.scrollOverflow){ + var scrollable = options.scrollOverflowHandler.scrollable($(SECTION_ACTIVE_SEL)[0]); + var check = (type === 'down') ? 'bottom' : 'top'; + + if(scrollable != null ){ + //is the scrollbar at the start/end of the scroll? + if(options.scrollOverflowHandler.isScrolled(check, scrollable)){ + scrollSection(); + }else{ + return true; + } + }else{ + // moved up/down + scrollSection(); + } + }else{ + // moved up/down + scrollSection(); + } + } + + /* + * Preventing bouncing in iOS #2285 + */ + function preventBouncing(e){ + if(options.autoScrolling && isReallyTouch(e) && isScrollAllowed.m.up){ + //preventing the easing on iOS devices + preventDefault(e); + } + } + + var touchStartY = 0; + var touchStartX = 0; + var touchEndY = 0; + var touchEndX = 0; + + /* Detecting touch events + + * As we are changing the top property of the page on scrolling, we can not use the traditional way to detect it. + * This way, the touchstart and the touch moves shows an small difference between them which is the + * used one to determine the direction. + */ + function touchMoveHandler(e){ + var activeSection = closest(e.target, SECTION_SEL) || $(SECTION_ACTIVE_SEL)[0]; + + if (isReallyTouch(e) ) { + + if(options.autoScrolling){ + //preventing the easing on iOS devices + preventDefault(e); + } + + var touchEvents = getEventsPage(e); + + touchEndY = touchEvents.y; + touchEndX = touchEvents.x; + + //if movement in the X axys is greater than in the Y and the currect section has slides... + if ($(SLIDES_WRAPPER_SEL, activeSection).length && Math.abs(touchStartX - touchEndX) > (Math.abs(touchStartY - touchEndY))) { + + //is the movement greater than the minimum resistance to scroll? + if (!slideMoving && Math.abs(touchStartX - touchEndX) > (getWindowWidth() / 100 * options.touchSensitivity)) { + if (touchStartX > touchEndX) { + if(isScrollAllowed.m.right){ + moveSlideRight(activeSection); //next + } + } else { + if(isScrollAllowed.m.left){ + moveSlideLeft(activeSection); //prev + } + } + } + } + + //vertical scrolling (only when autoScrolling is enabled) + else if(options.autoScrolling && canScroll){ + + //is the movement greater than the minimum resistance to scroll? + if (Math.abs(touchStartY - touchEndY) > (window.innerHeight / 100 * options.touchSensitivity)) { + if (touchStartY > touchEndY) { + scrolling('down'); + } else if (touchEndY > touchStartY) { + scrolling('up'); + } + } + } + } + } + + /** + * As IE >= 10 fires both touch and mouse events when using a mouse in a touchscreen + * this way we make sure that is really a touch event what IE is detecting. + */ + function isReallyTouch(e){ + //if is not IE || IE is detecting `touch` or `pen` + return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse'; + } + + /** + * Handler for the touch start event. + */ + function touchStartHandler(e){ + + //stopping the auto scroll to adjust to a section + if(options.fitToSection){ + activeAnimation = false; + } + + if(isReallyTouch(e)){ + var touchEvents = getEventsPage(e); + touchStartY = touchEvents.y; + touchStartX = touchEvents.x; + } + } + + /** + * Gets the average of the last `number` elements of the given array. + */ + function getAverage(elements, number){ + var sum = 0; + + //taking `number` elements from the end to make the average, if there are not enought, 1 + var lastElements = elements.slice(Math.max(elements.length - number, 1)); + + for(var i = 0; i < lastElements.length; i++){ + sum = sum + lastElements[i]; + } + + return Math.ceil(sum/number); + } + + /** + * Detecting mousewheel scrolling + * + * http://blogs.sitepointstatic.com/examples/tech/mouse-wheel/index.html + * http://www.sitepoint.com/html5-javascript-mouse-wheel/ + */ + var prevTime = new Date().getTime(); + + function MouseWheelHandler(e) { + var curTime = new Date().getTime(); + var isNormalScroll = hasClass($(COMPLETELY_SEL)[0], NORMAL_SCROLL); + + //is scroll allowed? + if (!isScrollAllowed.m.down && !isScrollAllowed.m.up) { + preventDefault(e); + return false; + } + + //autoscrolling and not zooming? + if(options.autoScrolling && !controlPressed && !isNormalScroll){ + // cross-browser wheel delta + e = e || window.event; + var value = e.wheelDelta || -e.deltaY || -e.detail; + var delta = Math.max(-1, Math.min(1, value)); + + var horizontalDetection = typeof e.wheelDeltaX !== 'undefined' || typeof e.deltaX !== 'undefined'; + var isScrollingVertically = (Math.abs(e.wheelDeltaX) < Math.abs(e.wheelDelta)) || (Math.abs(e.deltaX ) < Math.abs(e.deltaY) || !horizontalDetection); + + //Limiting the array to 150 (lets not waste memory!) + if(scrollings.length > 149){ + scrollings.shift(); + } + + //keeping record of the previous scrollings + scrollings.push(Math.abs(value)); + + //preventing to scroll the site on mouse wheel when scrollbar is present + if(options.scrollBar){ + preventDefault(e); + } + + //time difference between the last scroll and the current one + var timeDiff = curTime-prevTime; + prevTime = curTime; + + //haven't they scrolled in a while? + //(enough to be consider a different scrolling action to scroll another section) + if(timeDiff > 200){ + //emptying the array, we dont care about old scrollings for our averages + scrollings = []; + } + + if(canScroll){ + var averageEnd = getAverage(scrollings, 10); + var averageMiddle = getAverage(scrollings, 70); + var isAccelerating = averageEnd >= averageMiddle; + + //to avoid double swipes... + if(isAccelerating && isScrollingVertically){ + //scrolling down? + if (delta < 0) { + scrolling('down'); + + //scrolling up? + }else { + scrolling('up'); + } + } + } + + return false; + } + + if(options.fitToSection){ + //stopping the auto scroll to adjust to a section + activeAnimation = false; + } + } + + /** + * Slides a slider to the given direction. + * Optional `section` param. + */ + function moveSlide(direction, section){ + var activeSection = section == null ? $(SECTION_ACTIVE_SEL)[0] : section; + var slides = $(SLIDES_WRAPPER_SEL, activeSection)[0]; + + // more than one slide needed and nothing should be sliding + if (slides == null || slideMoving || $(SLIDE_SEL, slides).length < 2) { + return; + } + + var currentSlide = $(SLIDE_ACTIVE_SEL, slides)[0]; + var destiny = null; + + if(direction === 'left'){ + destiny = prevUntil(currentSlide, SLIDE_SEL); + }else{ + destiny = nextUntil(currentSlide, SLIDE_SEL); + } + + //isn't there a next slide in the secuence? + if(destiny == null){ + //respect loopHorizontal settin + if (!options.loopHorizontal) return; + + var slideSiblings = siblings(currentSlide); + if(direction === 'left'){ + destiny = slideSiblings[slideSiblings.length - 1]; //last + }else{ + destiny = slideSiblings[0]; //first + } + } + + slideMoving = true && !FP.test.isTesting; + landscapeScroll(slides, destiny, direction); + } + + /** + * Maintains the active slides in the viewport + * (Because the `scroll` animation might get lost with some actions, such as when using continuousVertical) + */ + function keepSlidesPosition(){ + var activeSlides = $(SLIDE_ACTIVE_SEL); + for( var i =0; i previousDestTop; + var sectionBottom = position - windowsHeight + elementHeight; + var bigSectionsDestination = options.bigSectionsDestination; + + //is the destination element bigger than the viewport? + if(elementHeight > windowsHeight){ + //scrolling up? + if(!isScrollingDown && !bigSectionsDestination || bigSectionsDestination === 'bottom' ){ + position = sectionBottom; + } + } + + //sections equal or smaller than the viewport height && scrolling down? || is resizing and its in the last section + else if(isScrollingDown || (isResizing && next(element) == null) ){ + //The bottom of the destination will be at the bottom of the viewport + position = sectionBottom; + } + + /* + Keeping record of the last scrolled position to determine the scrolling direction. + No conventional methods can be used as the scroll bar might not be present + AND the section might not be active if it is auto-height and didnt reach the middle + of the viewport. + */ + previousDestTop = position; + return position; + } + + /** + * Scrolls the site to the given element and scrolls to the slide if a callback is given. + */ + function scrollPage(element, callback, isMovementUp){ + if(element == null){ return; } //there's no element to scroll, leaving the function + + var dtop = getDestinationPosition(element); + var slideAnchorLink; + var slideIndex; + + //local variables + var v = { + element: element, + callback: callback, + isMovementUp: isMovementUp, + dtop: dtop, + yMovement: getYmovement(element), + anchorLink: element.getAttribute('data-anchor'), + sectionIndex: index(element, SECTION_SEL), + activeSlide: $(SLIDE_ACTIVE_SEL, element)[0], + activeSection: $(SECTION_ACTIVE_SEL)[0], + leavingSection: index($(SECTION_ACTIVE_SEL), SECTION_SEL) + 1, + + //caching the value of isResizing at the momment the function is called + //because it will be checked later inside a setTimeout and the value might change + localIsResizing: isResizing + }; + + //quiting when destination scroll is the same as the current one + if((v.activeSection == element && !isResizing) || (options.scrollBar && getScrollTop() === v.dtop && !hasClass(element, AUTO_HEIGHT) )){ return; } + + if(v.activeSlide != null){ + slideAnchorLink = v.activeSlide.getAttribute('data-anchor'); + slideIndex = index(v.activeSlide); + } + + //callback (onLeave) if the site is not just resizing and readjusting the slides + if(!v.localIsResizing){ + var direction = v.yMovement; + + //required for continousVertical + if(typeof isMovementUp !== 'undefined'){ + direction = isMovementUp ? 'up' : 'down'; + } + + //for the callback + v.direction = direction; + + if(isFunction(options.onLeave)){ + if(fireCallback('onLeave', v) === false){ + return; + } + } + } + + // If continuousVertical && we need to wrap around + if (options.autoScrolling && options.continuousVertical && typeof (v.isMovementUp) !== "undefined" && + ((!v.isMovementUp && v.yMovement == 'up') || // Intending to scroll down but about to go up or + (v.isMovementUp && v.yMovement == 'down'))) { // intending to scroll up but about to go down + + v = createInfiniteSections(v); + } + + //pausing media of the leaving section (if we are not just resizing, as destinatino will be the same one) + if(!v.localIsResizing){ + stopMedia(v.activeSection); + } + + if(options.scrollOverflow){ + options.scrollOverflowHandler.beforeLeave(); + } + + addClass(element, ACTIVE); + removeClass(siblings(element), ACTIVE); + lazyLoad(element); + + if(options.scrollOverflow){ + options.scrollOverflowHandler.onLeave(); + } + + //preventing from activating the MouseWheelHandler event + //more than once if the page is scrolling + canScroll = false || FP.test.isTesting; + + setState(slideIndex, slideAnchorLink, v.anchorLink, v.sectionIndex); + + performMovement(v); + + //flag to avoid callingn `scrollPage()` twice in case of using anchor links + lastScrolledDestiny = v.anchorLink; + + //avoid firing it twice (as it does also on scroll) + activateMenuAndNav(v.anchorLink, v.sectionIndex); + } + + /** + * Dispatch events & callbacks making sure it does it on the right format, depending on + * whether v2compatible is being used or not. + */ + function fireCallback(eventName, v){ + var eventData = getEventData(eventName, v); + + if(!options.v2compatible){ + trigger(container, eventName, eventData); + + if(options[eventName].apply(eventData[Object.keys(eventData)[0]], toArray(eventData)) === false){ + return false; + } + } + else{ + if(options[eventName].apply(eventData[0], eventData.slice(1)) === false){ + return false; + } + } + + return true; + } + + /** + * Makes sure to only create a Panel object if the element exist + */ + function nullOrSection(el){ + return el ? new Section(el) : null; + } + + function nullOrSlide(el){ + return el ? new Slide(el) : null; + } + + /** + * Gets the event's data for the given event on the right format. Depending on whether + * v2compatible is being used or not. + */ + function getEventData(eventName, v){ + var paramsPerEvent; + + if(!options.v2compatible){ + + //using functions to run only the necessary bits within the object + paramsPerEvent = { + afterRender: function(){ + return { + section: nullOrSection($(SECTION_ACTIVE_SEL)[0]), + slide: nullOrSlide($(SLIDE_ACTIVE_SEL, $(SECTION_ACTIVE_SEL)[0])[0]) + }; + }, + onLeave: function(){ + return { + origin: nullOrSection(v.activeSection), + destination: nullOrSection(v.element), + direction: v.direction + }; + }, + + afterLoad: function(){ + return paramsPerEvent.onLeave(); + }, + + afterSlideLoad: function(){ + return { + section: nullOrSection(v.section), + origin: nullOrSlide(v.prevSlide), + destination: nullOrSlide(v.destiny), + direction: v.direction + }; + }, + + onSlideLeave: function(){ + return paramsPerEvent.afterSlideLoad(); + } + }; + } + else{ + paramsPerEvent = { + afterRender: function(){ return [container]; }, + onLeave: function(){ return [v.activeSection, v.leavingSection, (v.sectionIndex + 1), v.direction]; }, + afterLoad: function(){ return [v.element, v.anchorLink, (v.sectionIndex + 1)]; }, + afterSlideLoad: function(){ return [v.destiny, v.anchorLink, (v.sectionIndex + 1), v.slideAnchor, v.slideIndex]; }, + onSlideLeave: function(){ return [v.prevSlide, v.anchorLink, (v.sectionIndex + 1), v.prevSlideIndex, v.direction, v.slideIndex]; }, + }; + } + + return paramsPerEvent[eventName](); + } + + /** + * Performs the vertical movement (by CSS3 or by jQuery) + */ + function performMovement(v){ + // using CSS3 translate functionality + if (options.css3 && options.autoScrolling && !options.scrollBar) { + + // The first section can have a negative value in iOS 10. Not quite sure why: -0.0142822265625 + // that's why we round it to 0. + var translate3d = 'translate3d(0px, -' + Math.round(v.dtop) + 'px, 0px)'; + transformContainer(translate3d, true); + + //even when the scrollingSpeed is 0 there's a little delay, which might cause the + //scrollingSpeed to change in case of using silentMoveTo(); + if(options.scrollingSpeed){ + clearTimeout(afterSectionLoadsId); + afterSectionLoadsId = setTimeout(function () { + afterSectionLoads(v); + }, options.scrollingSpeed); + }else{ + afterSectionLoads(v); + } + } + + // using JS to animate + else{ + var scrollSettings = getScrollSettings(v.dtop); + FP.test.top = -v.dtop + 'px'; + + scrollTo(scrollSettings.element, scrollSettings.options, options.scrollingSpeed, function(){ + if(options.scrollBar){ + + /* Hack! + The timeout prevents setting the most dominant section in the viewport as "active" when the user + scrolled to a smaller section by using the mousewheel (auto scrolling) rather than draging the scroll bar. + + When using scrollBar:true It seems like the scroll events still getting propagated even after the scrolling animation has finished. + */ + setTimeout(function(){ + afterSectionLoads(v); + },30); + }else{ + afterSectionLoads(v); + } + }); + } + } + + /** + * Gets the scrolling settings depending on the plugin autoScrolling option + */ + function getScrollSettings(top){ + var scroll = {}; + + //top property animation + if(options.autoScrolling && !options.scrollBar){ + scroll.options = -top; + scroll.element = $(WRAPPER_SEL)[0]; + } + + //window real scrolling + else{ + scroll.options = top; + scroll.element = window; + } + + return scroll; + } + + /** + * Adds sections before or after the current one to create the infinite effect. + */ + function createInfiniteSections(v){ + // Scrolling down + if (!v.isMovementUp) { + // Move all previous sections to after the active section + after($(SECTION_ACTIVE_SEL)[0], prevAll(v.activeSection, SECTION_SEL).reverse()); + } + else { // Scrolling up + // Move all next sections to before the active section + before($(SECTION_ACTIVE_SEL)[0], nextAll(v.activeSection, SECTION_SEL)); + } + + // Maintain the displayed position (now that we changed the element order) + silentScroll($(SECTION_ACTIVE_SEL)[0].offsetTop); + + // Maintain the active slides visible in the viewport + keepSlidesPosition(); + + // save for later the elements that still need to be reordered + v.wrapAroundElements = v.activeSection; + + // Recalculate animation variables + v.dtop = v.element.offsetTop; + v.yMovement = getYmovement(v.element); + + return v; + } + + /** + * Fix section order after continuousVertical changes have been animated + */ + function continuousVerticalFixSectionOrder (v) { + // If continuousVertical is in effect (and autoScrolling would also be in effect then), + // finish moving the elements around so the direct navigation will function more simply + if (v.wrapAroundElements == null) { + return; + } + + if (v.isMovementUp) { + before($(SECTION_SEL)[0], v.wrapAroundElements); + } + else { + after($(SECTION_SEL)[$(SECTION_SEL).length-1], v.wrapAroundElements); + } + + silentScroll($(SECTION_ACTIVE_SEL)[0].offsetTop); + + // Maintain the active slides visible in the viewport + keepSlidesPosition(); + } + + /** + * Actions to do once the section is loaded. + */ + function afterSectionLoads (v){ + continuousVerticalFixSectionOrder(v); + + //callback (afterLoad) if the site is not just resizing and readjusting the slides + if(isFunction(options.afterLoad) && !v.localIsResizing){ + fireCallback('afterLoad', v); + } + + if(options.scrollOverflow){ + options.scrollOverflowHandler.afterLoad(); + } + + if(!v.localIsResizing){ + playMedia(v.element); + } + + addClass(v.element, COMPLETELY); + removeClass(siblings(v.element), COMPLETELY); + lazyLoadOthers(); + + canScroll = true; + + if(isFunction(v.callback)){ + v.callback(); + } + } + + /** + * Sets the value for the given attribute from the `data-` attribute with the same suffix + * ie: data-srcset ==> srcset | data-src ==> src + */ + function setSrc(element, attribute){ + element.setAttribute(attribute, element.getAttribute('data-' + attribute)); + element.removeAttribute('data-' + attribute); + } + + /** + * Makes sure lazyload is done for other sections in the viewport that are not the + * active one. + */ + function lazyLoadOthers(){ + var hasAutoHeightSections = $(AUTO_HEIGHT_SEL)[0] || isResponsiveMode() && $(AUTO_HEIGHT_RESPONSIVE_SEL)[0]; + + //quitting when it doesn't apply + if (!options.lazyLoading || !hasAutoHeightSections){ + return; + } + + //making sure to lazy load auto-height sections that are in the viewport + $(SECTION_SEL + ':not(' + ACTIVE_SEL + ')').forEach(function(section){ + if(isSectionInViewport(section)){ + lazyLoad(section); + } + }); + } + + /** + * Lazy loads image, video and audio elements. + */ + function lazyLoad(destiny){ + if (!options.lazyLoading){ + return; + } + + var panel = getSlideOrSection(destiny); + + $('img[data-src], img[data-srcset], source[data-src], source[data-srcset], video[data-src], audio[data-src], iframe[data-src]', panel).forEach(function(element){ + ['src', 'srcset'].forEach(function(type){ + var attribute = element.getAttribute('data-' + type); + if(attribute != null && attribute){ + setSrc(element, type); + element.addEventListener('load', function(){ + onMediaLoad(destiny); + }); + } + }); + + if(matches(element, 'source')){ + var elementToPlay = closest(element, 'video, audio'); + if(elementToPlay){ + elementToPlay.load(); + elementToPlay.onloadeddata = function(){ + onMediaLoad(destiny); + }; + } + } + }); + } + + /** + * Callback firing when a lazy load media element has loaded. + * Making sure it only fires one per section in normal conditions (if load time is not huge) + */ + function onMediaLoad(section){ + if(options.scrollOverflow){ + clearTimeout(g_mediaLoadedId); + g_mediaLoadedId = setTimeout(function(){ + scrollBarHandler.createScrollBar(section); + }, 200); + } + } + + /** + * Plays video and audio elements. + */ + function playMedia(destiny){ + var panel = getSlideOrSection(destiny); + + //playing HTML5 media elements + $('video, audio', panel).forEach(function(element){ + if( element.hasAttribute('data-autoplay') && typeof element.play === 'function' ) { + element.play(); + } + }); + + //youtube videos + $('iframe[src*="youtube.com/embed/"]', panel).forEach(function(element){ + if ( element.hasAttribute('data-autoplay') ){ + playYoutube(element); + } + + //in case the URL was not loaded yet. On page load we need time for the new URL (with the API string) to load. + element.onload = function() { + if ( element.hasAttribute('data-autoplay') ){ + playYoutube(element); + } + }; + }); + } + + /** + * Plays a youtube video + */ + function playYoutube(element){ + element.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*'); + } + + /** + * Stops video and audio elements. + */ + function stopMedia(destiny){ + var panel = getSlideOrSection(destiny); + + //stopping HTML5 media elements + $('video, audio', panel).forEach(function(element){ + if( !element.hasAttribute('data-keepplaying') && typeof element.pause === 'function' ) { + element.pause(); + } + }); + + //youtube videos + $('iframe[src*="youtube.com/embed/"]', panel).forEach(function(element){ + if( /youtube\.com\/embed\//.test(element.getAttribute('src')) && !element.hasAttribute('data-keepplaying')){ + element.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}','*'); + } + }); + } + + /** + * Gets the active slide (or section) for the given section + */ + function getSlideOrSection(destiny){ + var slide = $(SLIDE_ACTIVE_SEL, destiny); + if( slide.length ) { + destiny = slide[0]; + } + + return destiny; + } + + /** + * Scrolls to the anchor in the URL when loading the site + */ + function scrollToAnchor(){ + var anchors = getAnchorsURL(); + var sectionAnchor = anchors.section; + var slideAnchor = anchors.slide; + + if(sectionAnchor){ //if theres any # + if(options.animateAnchor){ + scrollPageAndSlide(sectionAnchor, slideAnchor); + }else{ + silentMoveTo(sectionAnchor, slideAnchor); + } + } + } + + /** + * Detecting any change on the URL to scroll to the given anchor link + * (a way to detect back history button as we play with the hashes on the URL) + */ + function hashChangeHandler(){ + if(!isScrolling && !options.lockAnchors){ + var anchors = getAnchorsURL(); + var sectionAnchor = anchors.section; + var slideAnchor = anchors.slide; + + //when moving to a slide in the first section for the first time (first time to add an anchor to the URL) + var isFirstSlideMove = (typeof lastScrolledDestiny === 'undefined'); + var isFirstScrollMove = (typeof lastScrolledDestiny === 'undefined' && typeof slideAnchor === 'undefined' && !slideMoving); + + if(sectionAnchor && sectionAnchor.length){ + /*in order to call scrollpage() only once for each destination at a time + It is called twice for each scroll otherwise, as in case of using anchorlinks `hashChange` + event is fired on every scroll too.*/ + if ((sectionAnchor && sectionAnchor !== lastScrolledDestiny) && !isFirstSlideMove + || isFirstScrollMove + || (!slideMoving && lastScrolledSlide != slideAnchor )){ + + scrollPageAndSlide(sectionAnchor, slideAnchor); + } + } + } + } + + //gets the URL anchors (section and slide) + function getAnchorsURL(){ + var section; + var slide; + var hash = window.location.hash; + + if(hash.length){ + //getting the anchor link in the URL and deleting the `#` + var anchorsParts = hash.replace('#', '').split('/'); + + //using / for visual reasons and not as a section/slide separator #2803 + var isFunkyAnchor = hash.indexOf('#/') > -1; + + section = isFunkyAnchor ? '/' + anchorsParts[1] : decodeURIComponent(anchorsParts[0]); + + var slideAnchor = isFunkyAnchor ? anchorsParts[2] : anchorsParts[1]; + if(slideAnchor && slideAnchor.length){ + slide = decodeURIComponent(slideAnchor); + } + } + + return { + section: section, + slide: slide + }; + } + + //Sliding with arrow keys, both, vertical and horizontal + function keydownHandler(e) { + clearTimeout(keydownId); + + var activeElement = document.activeElement; + var keyCode = e.keyCode; + + //tab? + if(keyCode === 9){ + onTab(e); + } + + else if(!matches(activeElement, 'textarea') && !matches(activeElement, 'input') && !matches(activeElement, 'select') && + activeElement.getAttribute('contentEditable') !== "true" && activeElement.getAttribute('contentEditable') !== '' && + options.keyboardScrolling && options.autoScrolling){ + + //preventing the scroll with arrow keys & spacebar & Page Up & Down keys + var keyControls = [40, 38, 32, 33, 34]; + if(keyControls.indexOf(keyCode) > -1){ + preventDefault(e); + } + + controlPressed = e.ctrlKey; + + keydownId = setTimeout(function(){ + onkeydown(e); + },150); + } + } + + function tooltipTextHandler(){ + /*jshint validthis:true */ + trigger(prev(this), 'click'); + } + + //to prevent scrolling while zooming + function keyUpHandler(e){ + if(isWindowFocused){ //the keyup gets fired on new tab ctrl + t in Firefox + controlPressed = e.ctrlKey; + } + } + + //binding the mousemove when the mouse's middle button is released + function mouseDownHandler(e){ + //middle button + if (e.which == 2){ + oldPageY = e.pageY; + container.addEventListener('mousemove', mouseMoveHandler); + } + } + + //unbinding the mousemove when the mouse's middle button is released + function mouseUpHandler(e){ + //middle button + if (e.which == 2){ + container.removeEventListener('mousemove', mouseMoveHandler); + } + } + + /** + * Makes sure the tab key will only focus elements within the current section/slide + * preventing this way from breaking the page. + * Based on "Modals and keyboard traps" + * from https://developers.google.com/web/fundamentals/accessibility/focus/using-tabindex + */ + function onTab(e){ + var isShiftPressed = e.shiftKey; + var activeElement = document.activeElement; + var focusableElements = getFocusables(getSlideOrSection($(SECTION_ACTIVE_SEL)[0])); + + function preventAndFocusFirst(e){ + preventDefault(e); + return focusableElements[0] ? focusableElements[0].focus() : null; + } + + //outside any section or slide? Let's not hijack the tab! + if(isFocusOutside(e)){ + return; + } + + //is there an element with focus? + if(activeElement){ + if(closest(activeElement, SECTION_ACTIVE_SEL + ',' + SECTION_ACTIVE_SEL + ' ' + SLIDE_ACTIVE_SEL) == null){ + activeElement = preventAndFocusFirst(e); + } + } + + //no element if focused? Let's focus the first one of the section/slide + else{ + preventAndFocusFirst(e); + } + + //when reached the first or last focusable element of the section/slide + //we prevent the tab action to keep it in the last focusable element + if(!isShiftPressed && activeElement == focusableElements[focusableElements.length - 1] || + isShiftPressed && activeElement == focusableElements[0] + ){ + preventDefault(e); + } + } + + /** + * Gets all the focusable elements inside the passed element. + */ + function getFocusables(el){ + return [].slice.call($(focusableElementsString, el)).filter(function(item) { + return item.getAttribute('tabindex') !== '-1' + //are also not hidden elements (or with hidden parents) + && item.offsetParent !== null; + }); + } + + /** + * Determines whether the focus is outside fullpage.js sections/slides or not. + */ + function isFocusOutside(e){ + var allFocusables = getFocusables(document); + var currentFocusIndex = allFocusables.indexOf(document.activeElement); + var focusDestinationIndex = e.shiftKey ? currentFocusIndex - 1 : currentFocusIndex + 1; + var focusDestination = allFocusables[focusDestinationIndex]; + var destinationItemSlide = nullOrSlide(closest(focusDestination, SLIDE_SEL)); + var destinationItemSection = nullOrSection(closest(focusDestination, SECTION_SEL)); + + return !destinationItemSlide && !destinationItemSection; + } + + //Scrolling horizontally when clicking on the slider controls. + function slideArrowHandler(){ + /*jshint validthis:true */ + var section = closest(this, SECTION_SEL); + + /*jshint validthis:true */ + if (hasClass(this, SLIDES_PREV)) { + if(isScrollAllowed.m.left){ + moveSlideLeft(section); + } + } else { + if(isScrollAllowed.m.right){ + moveSlideRight(section); + } + } + } + + //when opening a new tab (ctrl + t), `control` won't be pressed when coming back. + function blurHandler(){ + isWindowFocused = false; + controlPressed = false; + } + + //Scrolls to the section when clicking the navigation bullet + function sectionBulletHandler(e){ + preventDefault(e); + + /*jshint validthis:true */ + var indexBullet = index(closest(this, SECTION_NAV_SEL + ' li')); + scrollPage($(SECTION_SEL)[indexBullet]); + } + + //Scrolls the slider to the given slide destination for the given section + function slideBulletHandler(e){ + preventDefault(e); + + /*jshint validthis:true */ + var slides = $(SLIDES_WRAPPER_SEL, closest(this, SECTION_SEL))[0]; + var destiny = $(SLIDE_SEL, slides)[index(closest(this, 'li'))]; + + landscapeScroll(slides, destiny); + } + + //Menu item handler when not using anchors or using lockAnchors:true + function menuItemsHandler(e){ + if($(options.menu)[0] && (options.lockAnchors || !options.anchors.length)){ + preventDefault(e); + /*jshint validthis:true */ + moveTo(this.getAttribute('data-menuanchor')); + } + } + + /** + * Keydown event + */ + function onkeydown(e){ + var shiftPressed = e.shiftKey; + var activeElement = document.activeElement; + var isMediaFocused = matches(activeElement, 'video') || matches(activeElement, 'audio'); + + //do nothing if we can not scroll or we are not using horizotnal key arrows. + if(!canScroll && [37,39].indexOf(e.keyCode) < 0){ + return; + } + + switch (e.keyCode) { + //up + case 38: + case 33: + if(isScrollAllowed.k.up){ + moveSectionUp(); + } + break; + + //down + case 32: //spacebar + + if(shiftPressed && isScrollAllowed.k.up && !isMediaFocused){ + moveSectionUp(); + break; + } + /* falls through */ + case 40: + case 34: + if(isScrollAllowed.k.down){ + // space bar? + if(e.keyCode !== 32 || !isMediaFocused){ + moveSectionDown(); + } + } + break; + + //Home + case 36: + if(isScrollAllowed.k.up){ + moveTo(1); + } + break; + + //End + case 35: + if(isScrollAllowed.k.down){ + moveTo( $(SECTION_SEL).length ); + } + break; + + //left + case 37: + if(isScrollAllowed.k.left){ + moveSlideLeft(); + } + break; + + //right + case 39: + if(isScrollAllowed.k.right){ + moveSlideRight(); + } + break; + + default: + return; // exit this handler for other keys + } + } + + /** + * Detecting the direction of the mouse movement. + * Used only for the middle button of the mouse. + */ + var oldPageY = 0; + function mouseMoveHandler(e){ + if(!options.autoScrolling){ + return; + } + if(canScroll){ + // moving up + if (e.pageY < oldPageY && isScrollAllowed.m.up){ + moveSectionUp(); + } + + // moving down + else if(e.pageY > oldPageY && isScrollAllowed.m.down){ + moveSectionDown(); + } + } + oldPageY = e.pageY; + } + + /** + * Scrolls horizontal sliders. + */ + function landscapeScroll(slides, destiny, direction){ + var section = closest(slides, SECTION_SEL); + var v = { + slides: slides, + destiny: destiny, + direction: direction, + destinyPos: {left: destiny.offsetLeft}, + slideIndex: index(destiny), + section: section, + sectionIndex: index(section, SECTION_SEL), + anchorLink: section.getAttribute('data-anchor'), + slidesNav: $(SLIDES_NAV_SEL, section)[0], + slideAnchor: getAnchor(destiny), + prevSlide: $(SLIDE_ACTIVE_SEL, section)[0], + prevSlideIndex: index($(SLIDE_ACTIVE_SEL, section)[0]), + + //caching the value of isResizing at the momment the function is called + //because it will be checked later inside a setTimeout and the value might change + localIsResizing: isResizing + }; + v.xMovement = getXmovement(v.prevSlideIndex, v.slideIndex); + v.direction = v.direction ? v.direction : v.xMovement; + + //important!! Only do it when not resizing + if(!v.localIsResizing){ + //preventing from scrolling to the next/prev section when using scrollHorizontally + canScroll = false; + } + + if(options.onSlideLeave){ + + //if the site is not just resizing and readjusting the slides + if(!v.localIsResizing && v.xMovement!=='none'){ + if(isFunction( options.onSlideLeave )){ + if( fireCallback('onSlideLeave', v) === false){ + slideMoving = false; + return; + } + } + } + } + + addClass(destiny, ACTIVE); + removeClass(siblings(destiny), ACTIVE); + + if(!v.localIsResizing){ + stopMedia(v.prevSlide); + lazyLoad(destiny); + } + + if(!options.loopHorizontal && options.controlArrows){ + //hidding it for the fist slide, showing for the rest + toggle($(SLIDES_ARROW_PREV_SEL, section), v.slideIndex!==0); + + //hidding it for the last slide, showing for the rest + toggle($(SLIDES_ARROW_NEXT_SEL, section), next(destiny) != null); + } + + //only changing the URL if the slides are in the current section (not for resize re-adjusting) + if(hasClass(section, ACTIVE) && !v.localIsResizing){ + setState(v.slideIndex, v.slideAnchor, v.anchorLink, v.sectionIndex); + } + + performHorizontalMove(slides, v, true); + } + + + function afterSlideLoads(v){ + activeSlidesNavigation(v.slidesNav, v.slideIndex); + + //if the site is not just resizing and readjusting the slides + if(!v.localIsResizing){ + if(isFunction( options.afterSlideLoad )){ + fireCallback('afterSlideLoad', v); + } + + //needs to be inside the condition to prevent problems with continuousVertical and scrollHorizontally + //and to prevent double scroll right after a windows resize + canScroll = true; + + playMedia(v.destiny); + } + + //letting them slide again + slideMoving = false; + } + + /** + * Performs the horizontal movement. (CSS3 or jQuery) + * + * @param fireCallback {Bool} - determines whether or not to fire the callback + */ + function performHorizontalMove(slides, v, fireCallback){ + var destinyPos = v.destinyPos; + + if(options.css3){ + var translate3d = 'translate3d(-' + Math.round(destinyPos.left) + 'px, 0px, 0px)'; + + FP.test.translate3dH[v.sectionIndex] = translate3d; + css(addAnimation($(SLIDES_CONTAINER_SEL, slides)), getTransforms(translate3d)); + + afterSlideLoadsId = setTimeout(function(){ + if(fireCallback){ + afterSlideLoads(v); + } + }, options.scrollingSpeed); + }else{ + FP.test.left[v.sectionIndex] = Math.round(destinyPos.left); + + scrollTo(slides, Math.round(destinyPos.left), options.scrollingSpeed, function(){ + if(fireCallback){ + afterSlideLoads(v); + } + }); + } + } + + /** + * Sets the state for the horizontal bullet navigations. + */ + function activeSlidesNavigation(slidesNav, slideIndex){ + if(options.slidesNavigation && slidesNav != null){ + removeClass($(ACTIVE_SEL, slidesNav), ACTIVE); + addClass( $('a', $('li', slidesNav)[slideIndex] ), ACTIVE); + } + } + + var previousHeight = windowsHeight; + + /* + * Resize event handler. + */ + function resizeHandler(){ + clearTimeout(resizeId); + + //in order to call the functions only when the resize is finished + //http://stackoverflow.com/questions/4298612/jquery-how-to-call-resize-event-only-once-its-finished-resizing + resizeId = setTimeout(function(){ + + //issue #3336 + //(some apps or browsers, like Chrome/Firefox for Mobile take time to report the real height) + //so we check it 3 times with intervals in that case + for(var i = 0; i< 4; i++){ + resizeHandlerId = setTimeout(resizeActions, 200 * i); + } + }, 200); + } + + /** + * When resizing the site, we adjust the heights of the sections, slimScroll... + */ + function resizeActions(){ + + //checking if it needs to get responsive + responsive(); + + // rebuild immediately on touch devices + if (isTouchDevice) { + var activeElement = document.activeElement; + + //if the keyboard is NOT visible + if (!matches(activeElement, 'textarea') && !matches(activeElement, 'input') && !matches(activeElement, 'select')) { + var currentHeight = getWindowHeight(); + + //making sure the change in the viewport size is enough to force a rebuild. (20 % of the window to avoid problems when hidding scroll bars) + if( Math.abs(currentHeight - previousHeight) > (20 * Math.max(previousHeight, currentHeight) / 100) ){ + reBuild(true); + previousHeight = currentHeight; + } + } + } + else{ + adjustToNewViewport(); + } + } + + /** + * Checks if the site needs to get responsive and disables autoScrolling if so. + * A class `fp-responsive` is added to the plugin's container in case the user wants to use it for his own responsive CSS. + */ + function responsive(){ + var widthLimit = options.responsive || options.responsiveWidth; //backwards compatiblity + var heightLimit = options.responsiveHeight; + + //only calculating what we need. Remember its called on the resize event. + var isBreakingPointWidth = widthLimit && window.innerWidth < widthLimit; + var isBreakingPointHeight = heightLimit && window.innerHeight < heightLimit; + + if(widthLimit && heightLimit){ + setResponsive(isBreakingPointWidth || isBreakingPointHeight); + } + else if(widthLimit){ + setResponsive(isBreakingPointWidth); + } + else if(heightLimit){ + setResponsive(isBreakingPointHeight); + } + } + + /** + * Adds transition animations for the given element + */ + function addAnimation(element){ + var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3; + + removeClass(element, NO_TRANSITION); + return css(element, { + '-webkit-transition': transition, + 'transition': transition + }); + } + + /** + * Remove transition animations for the given element + */ + function removeAnimation(element){ + return addClass(element, NO_TRANSITION); + } + + /** + * Activating the vertical navigation bullets according to the given slide name. + */ + function activateNavDots(name, sectionIndex){ + if(options.navigation && $(SECTION_NAV_SEL)[0] != null){ + removeClass($(ACTIVE_SEL, $(SECTION_NAV_SEL)[0]), ACTIVE); + if(name){ + addClass( $('a[href="#' + name + '"]', $(SECTION_NAV_SEL)[0]), ACTIVE); + }else{ + addClass($('a', $('li', $(SECTION_NAV_SEL)[0])[sectionIndex]), ACTIVE); + } + } + } + + /** + * Activating the website main menu elements according to the given slide name. + */ + function activateMenuElement(name){ + $(options.menu).forEach(function(menu) { + if(options.menu && menu != null){ + removeClass($(ACTIVE_SEL, menu), ACTIVE); + addClass($('[data-menuanchor="'+name+'"]', menu), ACTIVE); + } + }); + } + + /** + * Sets to active the current menu and vertical nav items. + */ + function activateMenuAndNav(anchor, index){ + activateMenuElement(anchor); + activateNavDots(anchor, index); + } + + /** + * Retuns `up` or `down` depending on the scrolling movement to reach its destination + * from the current section. + */ + function getYmovement(destiny){ + var fromIndex = index($(SECTION_ACTIVE_SEL)[0], SECTION_SEL); + var toIndex = index(destiny, SECTION_SEL); + if( fromIndex == toIndex){ + return 'none'; + } + if(fromIndex > toIndex){ + return 'up'; + } + return 'down'; + } + + /** + * Retuns `right` or `left` depending on the scrolling movement to reach its destination + * from the current slide. + */ + function getXmovement(fromIndex, toIndex){ + if( fromIndex == toIndex){ + return 'none'; + } + if(fromIndex > toIndex){ + return 'left'; + } + return 'right'; + } + + function addTableClass(element){ + //In case we are styling for the 2nd time as in with reponsiveSlides + if(!hasClass(element, TABLE)){ + var wrapper = document.createElement('div'); + wrapper.className = TABLE_CELL; + wrapper.style.height = getTableHeight(element) + 'px'; + + addClass(element, TABLE); + wrapInner(element, wrapper); + } + } + + function getTableHeight(element){ + var sectionHeight = windowsHeight; + + if(options.paddingTop || options.paddingBottom){ + var section = element; + if(!hasClass(section, SECTION)){ + section = closest(element, SECTION_SEL); + } + + var paddings = parseInt(getComputedStyle(section)['padding-top']) + parseInt(getComputedStyle(section)['padding-bottom']); + sectionHeight = (windowsHeight - paddings); + } + + return sectionHeight; + } + + /** + * Adds a css3 transform property to the container class with or without animation depending on the animated param. + */ + function transformContainer(translate3d, animated){ + if(animated){ + addAnimation(container); + }else{ + removeAnimation(container); + } + + css(container, getTransforms(translate3d)); + FP.test.translate3d = translate3d; + + //syncronously removing the class after the animation has been applied. + setTimeout(function(){ + removeClass(container, NO_TRANSITION); + },10); + } + + /** + * Gets a section by its anchor / index + */ + function getSectionByAnchor(sectionAnchor){ + var section = $(SECTION_SEL + '[data-anchor="'+sectionAnchor+'"]', container)[0]; + if(!section){ + var sectionIndex = typeof sectionAnchor !== 'undefined' ? sectionAnchor -1 : 0; + section = $(SECTION_SEL)[sectionIndex]; + } + + return section; + } + + /** + * Gets a slide inside a given section by its anchor / index + */ + function getSlideByAnchor(slideAnchor, section){ + var slide = $(SLIDE_SEL + '[data-anchor="'+slideAnchor+'"]', section)[0]; + if(slide == null){ + slideAnchor = typeof slideAnchor !== 'undefined' ? slideAnchor : 0; + slide = $(SLIDE_SEL, section)[slideAnchor]; + } + + return slide; + } + + /** + * Scrolls to the given section and slide anchors + */ + function scrollPageAndSlide(sectionAnchor, slideAnchor){ + var section = getSectionByAnchor(sectionAnchor); + + //do nothing if there's no section with the given anchor name + if(section == null) return; + + var slide = getSlideByAnchor(slideAnchor, section); + + //we need to scroll to the section and then to the slide + if (getAnchor(section) !== lastScrolledDestiny && !hasClass(section, ACTIVE)){ + scrollPage(section, function(){ + scrollSlider(slide); + }); + } + //if we were already in the section + else{ + scrollSlider(slide); + } + } + + /** + * Scrolls the slider to the given slide destination for the given section + */ + function scrollSlider(slide){ + if(slide != null){ + landscapeScroll(closest(slide, SLIDES_WRAPPER_SEL), slide); + } + } + + /** + * Creates a landscape navigation bar with dots for horizontal sliders. + */ + function addSlidesNavigation(section, numSlides){ + appendTo(createElementFromHTML('
      '), section); + var nav = $(SLIDES_NAV_SEL, section)[0]; + + //top or bottom + addClass(nav, 'fp-' + options.slidesNavPosition); + + for(var i=0; i< numSlides; i++){ + appendTo(createElementFromHTML('
    • '+ getBulletLinkName(i, 'Slide') +'
    • '), $('ul', nav)[0] ); + } + + //centering it + css(nav, {'margin-left': '-' + (nav.innerWidth/2) + 'px'}); + + addClass($('a', $('li', nav)[0] ), ACTIVE); + } + + + /** + * Sets the state of the website depending on the active section/slide. + * It changes the URL hash when needed and updates the body class. + */ + function setState(slideIndex, slideAnchor, anchorLink, sectionIndex){ + var sectionHash = ''; + + if(options.anchors.length && !options.lockAnchors){ + + //isn't it the first slide? + if(slideIndex){ + if(anchorLink != null){ + sectionHash = anchorLink; + } + + //slide without anchor link? We take the index instead. + if(slideAnchor == null){ + slideAnchor = slideIndex; + } + + lastScrolledSlide = slideAnchor; + setUrlHash(sectionHash + '/' + slideAnchor); + + //first slide won't have slide anchor, just the section one + }else if(slideIndex != null){ + lastScrolledSlide = slideAnchor; + setUrlHash(anchorLink); + } + + //section without slides + else{ + setUrlHash(anchorLink); + } + } + + setBodyClass(); + } + + /** + * Sets the URL hash. + */ + function setUrlHash(url){ + if(options.recordHistory){ + location.hash = url; + }else{ + //Mobile Chrome doesn't work the normal way, so... lets use HTML5 for phones :) + if(isTouchDevice || isTouch){ + window.history.replaceState(undefined, undefined, '#' + url); + }else{ + var baseUrl = window.location.href.split('#')[0]; + window.location.replace( baseUrl + '#' + url ); + } + } + } + + /** + * Gets the anchor for the given slide / section. Its index will be used if there's none. + */ + function getAnchor(element){ + if(!element){ + return null; + } + var anchor = element.getAttribute('data-anchor'); + var elementIndex = index(element); + + //Slide without anchor link? We take the index instead. + if(anchor == null){ + anchor = elementIndex; + } + + return anchor; + } + + /** + * Sets a class for the body of the page depending on the active section / slide + */ + function setBodyClass(){ + var section = $(SECTION_ACTIVE_SEL)[0]; + var slide = $(SLIDE_ACTIVE_SEL, section)[0]; + + var sectionAnchor = getAnchor(section); + var slideAnchor = getAnchor(slide); + + var text = String(sectionAnchor); + + if(slide){ + text = text + '-' + slideAnchor; + } + + //changing slash for dash to make it a valid CSS style + text = text.replace('/', '-').replace('#',''); + + //removing previous anchor classes + var classRe = new RegExp('\\b\\s?' + VIEWING_PREFIX + '-[^\\s]+\\b', "g"); + $body.className = $body.className.replace(classRe, ''); + + //adding the current anchor + addClass($body, VIEWING_PREFIX + '-' + text); + } + + /** + * Checks for translate3d support + * @return boolean + * http://stackoverflow.com/questions/5661671/detecting-transform-translate3d-support + */ + function support3d() { + var el = document.createElement('p'), + has3d, + transforms = { + 'webkitTransform':'-webkit-transform', + 'OTransform':'-o-transform', + 'msTransform':'-ms-transform', + 'MozTransform':'-moz-transform', + 'transform':'transform' + }; + + //preventing the style p:empty{display: none;} from returning the wrong result + el.style.display = 'block'; + + // Add it to the body to get the computed style. + document.body.insertBefore(el, null); + + for (var t in transforms) { + if (el.style[t] !== undefined) { + el.style[t] = 'translate3d(1px,1px,1px)'; + has3d = window.getComputedStyle(el).getPropertyValue(transforms[t]); + } + } + + document.body.removeChild(el); + + return (has3d !== undefined && has3d.length > 0 && has3d !== 'none'); + } + + /** + * Removes the auto scrolling action fired by the mouse wheel and trackpad. + * After this function is called, the mousewheel and trackpad movements won't scroll through sections. + */ + function removeMouseWheelHandler(){ + if (document.addEventListener) { + document.removeEventListener('mousewheel', MouseWheelHandler, false); //IE9, Chrome, Safari, Oper + document.removeEventListener('wheel', MouseWheelHandler, false); //Firefox + document.removeEventListener('MozMousePixelScroll', MouseWheelHandler, false); //old Firefox + } else { + document.detachEvent('onmousewheel', MouseWheelHandler); //IE 6/7/8 + } + } + + /** + * Adds the auto scrolling action for the mouse wheel and trackpad. + * After this function is called, the mousewheel and trackpad movements will scroll through sections + * https://developer.mozilla.org/en-US/docs/Web/Events/wheel + */ + function addMouseWheelHandler(){ + var prefix = ''; + var _addEventListener; + + if (window.addEventListener){ + _addEventListener = "addEventListener"; + }else{ + _addEventListener = "attachEvent"; + prefix = 'on'; + } + + // detect available wheel event + var support = 'onwheel' in document.createElement('div') ? 'wheel' : // Modern browsers support "wheel" + document.onmousewheel !== undefined ? 'mousewheel' : // Webkit and IE support at least "mousewheel" + 'DOMMouseScroll'; // let's assume that remaining browsers are older Firefox + var passiveEvent = g_supportsPassive ? {passive: false }: false; + + if(support == 'DOMMouseScroll'){ + document[ _addEventListener ](prefix + 'MozMousePixelScroll', MouseWheelHandler, passiveEvent); + } + + //handle MozMousePixelScroll in older Firefox + else{ + document[ _addEventListener ](prefix + support, MouseWheelHandler, passiveEvent); + } + } + + /** + * Binding the mousemove when the mouse's middle button is pressed + */ + function addMiddleWheelHandler(){ + container.addEventListener('mousedown', mouseDownHandler); + container.addEventListener('mouseup', mouseUpHandler); + } + + /** + * Unbinding the mousemove when the mouse's middle button is released + */ + function removeMiddleWheelHandler(){ + container.removeEventListener('mousedown', mouseDownHandler); + container.removeEventListener('mouseup', mouseUpHandler); + } + + /** + * Adds the possibility to auto scroll through sections on touch devices. + */ + function addTouchHandler(){ + if(isTouchDevice || isTouch){ + if(options.autoScrolling){ + $body.removeEventListener(events.touchmove, preventBouncing, {passive: false}); + $body.addEventListener(events.touchmove, preventBouncing, {passive: false}); + } + + var touchWrapper = options.touchWrapper; + touchWrapper.removeEventListener(events.touchstart, touchStartHandler); + touchWrapper.removeEventListener(events.touchmove, touchMoveHandler, {passive: false}); + + touchWrapper.addEventListener(events.touchstart, touchStartHandler); + touchWrapper.addEventListener(events.touchmove, touchMoveHandler, {passive: false}); + } + } + + /** + * Removes the auto scrolling for touch devices. + */ + function removeTouchHandler(){ + if(isTouchDevice || isTouch){ + // normalScrollElements requires it off #2691 + if(options.autoScrolling){ + $body.removeEventListener(events.touchmove, touchMoveHandler, {passive: false}); + $body.removeEventListener(events.touchmove, preventBouncing, {passive: false}); + } + + var touchWrapper = options.touchWrapper; + touchWrapper.removeEventListener(events.touchstart, touchStartHandler); + touchWrapper.removeEventListener(events.touchmove, touchMoveHandler, {passive: false}); + } + } + + /* + * Returns and object with Microsoft pointers (for IE<11 and for IE >= 11) + * http://msdn.microsoft.com/en-us/library/ie/dn304886(v=vs.85).aspx + */ + function getMSPointer(){ + var pointer; + + //IE >= 11 & rest of browsers + if(window.PointerEvent){ + pointer = { down: 'pointerdown', move: 'pointermove'}; + } + + //IE < 11 + else{ + pointer = { down: 'MSPointerDown', move: 'MSPointerMove'}; + } + + return pointer; + } + + /** + * Gets the pageX and pageY properties depending on the browser. + * https://github.com/alvarotrigo/fullPage.js/issues/194#issuecomment-34069854 + */ + function getEventsPage(e){ + var events = []; + + events.y = (typeof e.pageY !== 'undefined' && (e.pageY || e.pageX) ? e.pageY : e.touches[0].pageY); + events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX); + + //in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008 + if(isTouch && isReallyTouch(e) && options.scrollBar && typeof e.touches !== 'undefined'){ + events.y = e.touches[0].pageY; + events.x = e.touches[0].pageX; + } + + return events; + } + + /** + * Slides silently (with no animation) the active slider to the given slide. + * @param noCallback {bool} true or defined -> no callbacks + */ + function silentLandscapeScroll(activeSlide, noCallbacks){ + setScrollingSpeed(0, 'internal'); + + if(typeof noCallbacks !== 'undefined'){ + //preventing firing callbacks afterSlideLoad etc. + isResizing = true; + } + + landscapeScroll(closest(activeSlide, SLIDES_WRAPPER_SEL), activeSlide); + + if(typeof noCallbacks !== 'undefined'){ + isResizing = false; + } + + setScrollingSpeed(originals.scrollingSpeed, 'internal'); + } + + /** + * Scrolls silently (with no animation) the page to the given Y position. + */ + function silentScroll(top){ + // The first section can have a negative value in iOS 10. Not quite sure why: -0.0142822265625 + // that's why we round it to 0. + var roundedTop = Math.round(top); + + if (options.css3 && options.autoScrolling && !options.scrollBar){ + var translate3d = 'translate3d(0px, -' + roundedTop + 'px, 0px)'; + transformContainer(translate3d, false); + } + else if(options.autoScrolling && !options.scrollBar){ + css(container, {'top': -roundedTop + 'px'}); + FP.test.top = -roundedTop + 'px'; + } + else{ + var scrollSettings = getScrollSettings(roundedTop); + setScrolling(scrollSettings.element, scrollSettings.options); + } + } + + /** + * Returns the cross-browser transform string. + */ + function getTransforms(translate3d){ + return { + '-webkit-transform': translate3d, + '-moz-transform': translate3d, + '-ms-transform':translate3d, + 'transform': translate3d + }; + } + + /** + * Allowing or disallowing the mouse/swipe scroll in a given direction. (not for keyboard) + * @type m (mouse) or k (keyboard) + */ + function setIsScrollAllowed(value, direction, type){ + //up, down, left, right + if(direction !== 'all'){ + isScrollAllowed[type][direction] = value; + } + + //all directions? + else{ + Object.keys(isScrollAllowed[type]).forEach(function(key){ + isScrollAllowed[type][key] = value; + }); + } + } + + /* + * Destroys fullpage.js plugin events and optinally its html markup and styles + */ + function destroy(all){ + setAutoScrolling(false, 'internal'); + setAllowScrolling(true); + setMouseHijack(false); + setKeyboardScrolling(false); + addClass(container, DESTROYED); + + [ + afterSlideLoadsId, + afterSectionLoadsId, + resizeId, + scrollId, + scrollId2, + g_doubleCheckHeightId, + resizeHandlerId + ].forEach(function(timeoutId){ + clearTimeout(timeoutId); + }); + + window.removeEventListener('scroll', scrollHandler); + window.removeEventListener('hashchange', hashChangeHandler); + window.removeEventListener('resize', resizeHandler); + + document.removeEventListener('keydown', keydownHandler); + document.removeEventListener('keyup', keyUpHandler); + + ['click', 'touchstart'].forEach(function(eventName){ + document.removeEventListener(eventName, delegatedEvents); + }); + + ['mouseenter', 'touchstart', 'mouseleave', 'touchend'].forEach(function(eventName){ + document.removeEventListener(eventName, onMouseEnterOrLeave, true); //true is required! + }); + + //lets make a mess! + if(all){ + destroyStructure(); + } + } + + /* + * Removes inline styles added by fullpage.js + */ + function destroyStructure(){ + //reseting the `top` or `translate` properties to 0 + silentScroll(0); + + //loading all the lazy load content + $('img[data-src], source[data-src], audio[data-src], iframe[data-src]', container).forEach(function(item){ + setSrc(item, 'src'); + }); + + $('img[data-srcset]').forEach(function(item){ + setSrc(item, 'srcset'); + }); + + remove($(SECTION_NAV_SEL + ', ' + SLIDES_NAV_SEL + ', ' + SLIDES_ARROW_SEL)); + + //removing inline styles + css($(SECTION_SEL), { + 'height': '', + 'background-color' : '', + 'padding': '' + }); + + css($(SLIDE_SEL), { + 'width': '' + }); + + css(container, { + 'height': '', + 'position': '', + '-ms-touch-action': '', + 'touch-action': '' + }); + + css($htmlBody, { + 'overflow': '', + 'height': '' + }); + + // remove .fp-enabled class + removeClass($html, ENABLED); + + // remove .fp-responsive class + removeClass($body, RESPONSIVE); + + // remove all of the .fp-viewing- classes + $body.className.split(/\s+/).forEach(function (className) { + if (className.indexOf(VIEWING_PREFIX) === 0) { + removeClass($body, className); + } + }); + + //removing added classes + $(SECTION_SEL + ', ' + SLIDE_SEL).forEach(function(item){ + if(options.scrollOverflowHandler && options.scrollOverflow){ + options.scrollOverflowHandler.remove(item); + } + removeClass(item, TABLE + ' ' + ACTIVE + ' ' + COMPLETELY); + var previousStyles = item.getAttribute('data-fp-styles'); + if(previousStyles){ + item.setAttribute('style', item.getAttribute('data-fp-styles')); + } + + //removing anchors if they were not set using the HTML markup + if(hasClass(item, SECTION) && !g_initialAnchorsInDom){ + item.removeAttribute('data-anchor'); + } + }); + + //removing the applied transition from the fullpage wrapper + removeAnimation(container); + + //Unwrapping content + [TABLE_CELL_SEL, SLIDES_CONTAINER_SEL,SLIDES_WRAPPER_SEL].forEach(function(selector){ + $(selector, container).forEach(function(item){ + //unwrap not being use in case there's no child element inside and its just text + unwrap(item); + }); + }); + + //removing the applied transition from the fullpage wrapper + css(container, { + '-webkit-transition': 'none', + 'transition': 'none' + }); + + //scrolling the page to the top with no animation + window.scrollTo(0, 0); + + //removing selectors + var usedSelectors = [SECTION, SLIDE, SLIDES_CONTAINER]; + usedSelectors.forEach(function(item){ + removeClass($('.' + item), item); + }); + } + + /* + * Sets the state for a variable with multiple states (original, and temporal) + * Some variables such as `autoScrolling` or `recordHistory` might change automatically its state when using `responsive` or `autoScrolling:false`. + * This function is used to keep track of both states, the original and the temporal one. + * If type is not 'internal', then we assume the user is globally changing the variable. + */ + function setVariableState(variable, value, type){ + options[variable] = value; + if(type !== 'internal'){ + originals[variable] = value; + } + } + + /** + * Displays warnings + */ + function displayWarnings(){ + var l = options['li' + 'c' + 'enseK' + 'e' + 'y']; + var msgStyle = 'font-size: 15px;background:yellow;'; + + if(!isOK){ + showError('error', 'Fullpage.js version 3 has changed its license to GPLv3 and it requires a `licenseKey` option. Read about it here:'); + showError('error', 'https://github.com/alvarotrigo/fullPage.js#options.'); + } + else if(l && l.length < 20){ + console.warn('%c This website was made using fullPage.js slider. More info on the following website:', msgStyle); + console.warn('%c https://alvarotrigo.com/fullPage/', msgStyle); + } + + if(hasClass($html, ENABLED)){ + showError('error', 'Fullpage.js can only be initialized once and you are doing it multiple times!'); + return; + } + + // Disable mutually exclusive settings + if (options.continuousVertical && + (options.loopTop || options.loopBottom)) { + options.continuousVertical = false; + showError('warn', 'Option `loopTop/loopBottom` is mutually exclusive with `continuousVertical`; `continuousVertical` disabled'); + } + + if(options.scrollOverflow && + (options.scrollBar || !options.autoScrolling)){ + showError('warn', 'Options scrollBar:true and autoScrolling:false are mutually exclusive with scrollOverflow:true. Sections with scrollOverflow might not work well in Firefox'); + } + + if(options.continuousVertical && (options.scrollBar || !options.autoScrolling)){ + options.continuousVertical = false; + showError('warn', 'Scroll bars (`scrollBar:true` or `autoScrolling:false`) are mutually exclusive with `continuousVertical`; `continuousVertical` disabled'); + } + + if(options.scrollOverflow && options.scrollOverflowHandler == null){ + options.scrollOverflow = false; + showError('error', 'The option `scrollOverflow:true` requires the file `scrolloverflow.min.js`. Please include it before fullPage.js.'); + } + + //using extensions? Wrong file! + extensions.forEach(function(extension){ + //is the option set to true? + if(options[extension]){ + showError('warn', 'fullpage.js extensions require fullpage.extensions.min.js file instead of the usual fullpage.js. Requested: '+ extension); + } + }); + + //anchors can not have the same value as any element ID or NAME + options.anchors.forEach(function(name){ + + //case insensitive selectors (http://stackoverflow.com/a/19465187/1081396) + var nameAttr = [].slice.call($('[name]')).filter(function(item) { + return item.getAttribute('name') && item.getAttribute('name').toLowerCase() == name.toLowerCase(); + }); + + var idAttr = [].slice.call($('[id]')).filter(function(item) { + return item.getAttribute('id') && item.getAttribute('id').toLowerCase() == name.toLowerCase(); + }); + + if(idAttr.length || nameAttr.length ){ + showError('error', 'data-anchor tags can not have the same value as any `id` element on the site (or `name` element for IE).'); + var propertyName = idAttr.length ? 'id' : 'name'; + + if(idAttr.length || nameAttr.length){ + showError('error', '"' + name + '" is is being used by another element `'+ propertyName +'` property'); + } + } + }); + } + + /** + * Getting the position of the element to scroll when using jQuery animations + */ + function getScrolledPosition(element){ + var position; + + //is not the window element and is a slide? + if(element.self != window && hasClass(element, SLIDES_WRAPPER)){ + position = element.scrollLeft; + } + else if(!options.autoScrolling || options.scrollBar){ + position = getScrollTop(); + } + else{ + position = element.offsetTop; + } + + //gets the top property of the wrapper + return position; + } + + /** + * Simulates the animated scrollTop of jQuery. Used when css3:false or scrollBar:true or autoScrolling:false + * http://stackoverflow.com/a/16136789/1081396 + */ + function scrollTo(element, to, duration, callback) { + var start = getScrolledPosition(element); + var change = to - start; + var currentTime = 0; + var increment = 20; + activeAnimation = true; + + var animateScroll = function(){ + if(activeAnimation){ //in order to stope it from other function whenever we want + var val = to; + + currentTime += increment; + + if(duration){ + val = window.fp_easings[options.easing](currentTime, start, change, duration); + } + + setScrolling(element, val); + + if(currentTime < duration) { + setTimeout(animateScroll, increment); + }else if(typeof callback !== 'undefined'){ + callback(); + } + }else if (currentTime < duration){ + callback(); + } + }; + + animateScroll(); + } + + /** + * Scrolls the page / slider the given number of pixels. + * It will do it one or another way dependiong on the library's config. + */ + function setScrolling(element, val){ + if(!options.autoScrolling || options.scrollBar || (element.self != window && hasClass(element, SLIDES_WRAPPER))){ + + //scrolling horizontally through the slides? + if(element.self != window && hasClass(element, SLIDES_WRAPPER)){ + element.scrollLeft = val; + } + //vertical scroll + else{ + element.scrollTo(0, val); + } + }else{ + element.style.top = val + 'px'; + } + } + + /** + * Gets the active slide. + */ + function getActiveSlide(){ + var activeSlide = $(SLIDE_ACTIVE_SEL, $(SECTION_ACTIVE_SEL)[0])[0]; + return nullOrSlide(activeSlide); + } + + /** + * Gets the active section. + */ + function getActiveSection(){ + return new Section($(SECTION_ACTIVE_SEL)[0]); + } + + /** + * Item. Slide or Section objects share the same properties. + */ + function Item(el, selector){ + this.anchor = el.getAttribute('data-anchor'); + this.item = el; + this.index = index(el, selector); + this.isLast = this.index === el.parentElement.querySelectorAll(selector).length -1; + this.isFirst = !this.index; + } + + /** + * Section object + */ + function Section(el){ + Item.call(this, el, SECTION_SEL); + } + + /** + * Slide object + */ + function Slide(el){ + Item.call(this, el, SLIDE_SEL); + } + + return FP; + } //end of $.fn.fullpage + + //utils + /** + * Shows a message in the console of the given type. + */ + function showError(type, text){ + window.console && window.console[type] && window.console[type]('fullPage: ' + text); + } + + /** + * Equivalent or jQuery function $(). + */ + function $(selector, context){ + context = arguments.length > 1 ? context : document; + return context ? context.querySelectorAll(selector) : null; + } + + /** + * Extends a given Object properties and its childs. + */ + function deepExtend(out) { + out = out || {}; + for (var i = 1, len = arguments.length; i < len; ++i){ + var obj = arguments[i]; + + if(!obj){ + continue; + } + + for(var key in obj){ + if (!obj.hasOwnProperty(key)){ + continue; + } + + // based on https://javascriptweblog.wordpress.com/2011/08/08/fixing-the-javascript-typeof-operator/ + if (Object.prototype.toString.call(obj[key]) === '[object Object]'){ + out[key] = deepExtend(out[key], obj[key]); + continue; + } + + out[key] = obj[key]; + } + } + return out; + } + + /** + * Checks if the passed element contains the passed class. + */ + function hasClass(el, className){ + if(el == null){ + return false; + } + if (el.classList){ + return el.classList.contains(className); + } + return new RegExp('(^| )' + className + '( |$)', 'gi').test(el.className); + } + + /** + * Gets the window height. Crossbrowser. + */ + function getWindowHeight(){ + return 'innerHeight' in window ? window.innerHeight : document.documentElement.offsetHeight; + } + + /** + * Gets the window width. + */ + function getWindowWidth(){ + return window.innerWidth; + } + + /** + * Set's the CSS properties for the passed item/s. + * @param {NodeList|HTMLElement} items + * @param {Object} props css properties and values. + */ + function css(items, props) { + items = getList(items); + + var key; + for (key in props) { + if (props.hasOwnProperty(key)) { + if (key !== null) { + for (var i = 0; i < items.length; i++) { + var item = items[i]; + item.style[key] = props[key]; + } + } + } + } + + return items; + } + + /** + * Generic function to get the previous or next element. + */ + function until(item, selector, fn){ + var sibling = item[fn]; + while(sibling && !matches(sibling, selector)){ + sibling = sibling[fn]; + } + + return sibling; + } + + /** + * Gets the previous element to the passed element that matches the passed selector. + */ + function prevUntil(item, selector){ + return until(item, selector, 'previousElementSibling'); + } + + /** + * Gets the next element to the passed element that matches the passed selector. + */ + function nextUntil(item, selector){ + return until(item, selector, 'nextElementSibling'); + } + + /** + * Gets the previous element to the passed element. + */ + function prev(item){ + return item.previousElementSibling; + } + + /** + * Gets the next element to the passed element. + */ + function next(item){ + return item.nextElementSibling; + } + + /** + * Gets the last element from the passed list of elements. + */ + function last(item){ + return item[item.length-1]; + } + + /** + * Gets index from the passed element. + * @param {String} selector is optional. + */ + function index(item, selector) { + item = isArrayOrList(item) ? item[0] : item; + var children = selector != null? $(selector, item.parentNode) : item.parentNode.childNodes; + var num = 0; + for (var i=0; iafdas'); + * wrapInner(document.querySelector('#pepe'), element); + * + * https://jsfiddle.net/zexxz0tw/6/ + * + * https://stackoverflow.com/a/21817590/1081396 + */ + function wrapInner(parent, wrapper) { + if (typeof wrapper === "string"){ + wrapper = createElementFromHTML(wrapper); + } + + parent.appendChild(wrapper); + + while(parent.firstChild !== wrapper){ + wrapper.appendChild(parent.firstChild); + } + } + + /** + * Usage: + * unwrap(document.querySelector('#pepe')); + * unwrap(element); + * + * https://jsfiddle.net/szjt0hxq/1/ + * + */ + function unwrap(wrapper) { + var wrapperContent = document.createDocumentFragment(); + while (wrapper.firstChild) { + wrapperContent.appendChild(wrapper.firstChild); + } + + wrapper.parentNode.replaceChild(wrapperContent, wrapper); + } + + /** + * http://stackoverflow.com/questions/22100853/dom-pure-javascript-solution-to-jquery-closest-implementation + * Returns the element or `false` if there's none + */ + function closest(el, selector) { + if(el && el.nodeType === 1){ + if(matches(el, selector)){ + return el; + } + return closest(el.parentNode, selector); + } + return null; + } + + /** + * Places one element (rel) after another one or group of them (reference). + * @param {HTMLElement} reference + * @param {HTMLElement|NodeList|String} el + * https://jsfiddle.net/9s97hhzv/1/ + */ + function after(reference, el) { + insertBefore(reference, reference.nextSibling, el); + } + + /** + * Places one element (rel) before another one or group of them (reference). + * @param {HTMLElement} reference + * @param {HTMLElement|NodeList|String} el + * https://jsfiddle.net/9s97hhzv/1/ + */ + function before(reference, el) { + insertBefore(reference, reference, el); + } + + /** + * Based in https://stackoverflow.com/a/19316024/1081396 + * and https://stackoverflow.com/a/4793630/1081396 + */ + function insertBefore(reference, beforeElement, el){ + if(!isArrayOrList(el)){ + if(typeof el == 'string'){ + el = createElementFromHTML(el); + } + el = [el]; + } + + for(var i = 0; i").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"":"")+""),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;e=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
      a",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="
      "+""+"
      ",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="
      t
      ",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="
      ",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function( +a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

      ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
      ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*",""],legend:[1,"
      ","
      "],thead:[1,"","
      "],tr:[2,"","
      "],td:[3,"","
      "],col:[2,"","
      "],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
      ","
      "]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f +.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(;d1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]===""&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
      ").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/html/js/jquery-3.6.0.min.js b/html/js/jquery-3.6.0.min.js new file mode 100644 index 0000000..c4c6022 --- /dev/null +++ b/html/js/jquery-3.6.0.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"
      ","
      "],col:[2,"","
      "],tr:[2,"","
      "],td:[3,"","
      "],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
      ",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0 right || + elRight < left || + elTop > bottom || + elBottom < top); + + if (isIntersect) { + hits.push(element); + } + }); + + return hits; + } + + /** + * Called when the user scrolls the window + */ + function onScroll() { + // unique tick id + ++ticks; + + // viewport rectangle + var top = jWindow.scrollTop(), + left = jWindow.scrollLeft(), + right = left + jWindow.width(), + bottom = top + jWindow.height(); + + // determine which elements are in view + var intersections = findElements(top+offset.top, right+offset.right, bottom+offset.bottom, left+offset.left); + $.each(intersections, function(i, element) { + var lastTick = element.data('scrollSpy:ticks'); + if (typeof lastTick != 'number') { + // entered into view + element.triggerHandler('scrollSpy:enter'); + } + + // update tick id + element.data('scrollSpy:ticks', ticks); + }); + + // determine which elements are no longer in view + $.each(elementsInView, function(i, element) { + var lastTick = element.data('scrollSpy:ticks'); + if (typeof lastTick == 'number' && lastTick !== ticks) { + // exited from view + element.triggerHandler('scrollSpy:exit'); + element.data('scrollSpy:ticks', null); + } + }); + + // remember elements in view for next tick + elementsInView = intersections; + } + + /** + * Called when window is resized + */ + function onWinSize() { + jWindow.trigger('scrollSpy:winSize'); + } + + /** + * Get time in ms + * @license https://raw.github.com/jashkenas/underscore/master/LICENSE + * @type {function} + * @return {number} + */ + var getTime = (Date.now || function () { + return new Date().getTime(); + }); + + /** + * Returns a function, that, when invoked, will only be triggered at most once + * during a given window of time. Normally, the throttled function will run + * as much as it can, without ever going more than once per `wait` duration; + * but if you'd like to disable the execution on the leading edge, pass + * `{leading: false}`. To disable execution on the trailing edge, ditto. + * @license https://raw.github.com/jashkenas/underscore/master/LICENSE + * @param {function} func + * @param {number} wait + * @param {Object=} options + * @returns {Function} + */ + function throttle(func, wait, options) { + var context, args, result; + var timeout = null; + var previous = 0; + options || (options = {}); + var later = function () { + previous = options.leading === false ? 0 : getTime(); + timeout = null; + result = func.apply(context, args); + context = args = null; + }; + return function () { + var now = getTime(); + if (!previous && options.leading === false) previous = now; + var remaining = wait - (now - previous); + context = this; + args = arguments; + if (remaining <= 0) { + clearTimeout(timeout); + timeout = null; + previous = now; + result = func.apply(context, args); + context = args = null; + } else if (!timeout && options.trailing !== false) { + timeout = setTimeout(later, remaining); + } + return result; + }; + }; + + /** + * Enables ScrollSpy using a selector + * @param {jQuery|string} selector The elements collection, or a selector + * @param {Object=} options Optional. + throttle : number -> scrollspy throttling. Default: 100 ms + offsetTop : number -> offset from top. Default: 0 + offsetRight : number -> offset from right. Default: 0 + offsetBottom : number -> offset from bottom. Default: 0 + offsetLeft : number -> offset from left. Default: 0 + * @returns {jQuery} + */ + $.scrollSpy = function(selector, options) { + selector = $(selector); + selector.each(function(i, element) { + elements.push($(element)); + }); + options = options || { + throttle: 100 + }; + + offset.top = options.offsetTop || 0; + offset.right = options.offsetRight || 0; + offset.bottom = options.offsetBottom || 0; + offset.left = options.offsetLeft || 0; + + var throttledScroll = throttle(onScroll, options.throttle || 100); + var readyScroll = function(){ + $(document).ready(throttledScroll); + }; + + if (!isSpying) { + jWindow.on('scroll', readyScroll); + jWindow.on('resize', readyScroll); + isSpying = true; + } + + // perform a scan once, after current execution context, and after dom is ready + setTimeout(readyScroll, 0); + + return selector; + }; + + /** + * Listen for window resize events + * @param {Object=} options Optional. Set { throttle: number } to change throttling. Default: 100 ms + * @returns {jQuery} $(window) + */ + $.winSizeSpy = function(options) { + $.winSizeSpy = function() { return jWindow; }; // lock from multiple calls + options = options || { + throttle: 100 + }; + return jWindow.on('resize', throttle(onWinSize, options.throttle || 100)); + }; + + /** + * Enables ScrollSpy on a collection of elements + * e.g. $('.scrollSpy').scrollSpy() + * @param {Object=} options Optional. + throttle : number -> scrollspy throttling. Default: 100 ms + offsetTop : number -> offset from top. Default: 0 + offsetRight : number -> offset from right. Default: 0 + offsetBottom : number -> offset from bottom. Default: 0 + offsetLeft : number -> offset from left. Default: 0 + * @returns {jQuery} + */ + $.fn.scrollSpy = function(options) { + return $.scrollSpy($(this), options); + }; + +})(jQuery); \ No newline at end of file diff --git a/html/js/swiper-bundle.js b/html/js/swiper-bundle.js new file mode 100644 index 0000000..44bd7a6 --- /dev/null +++ b/html/js/swiper-bundle.js @@ -0,0 +1,10481 @@ +/** + * Swiper 8.1.4 + * Most modern mobile touch slider and framework with hardware accelerated transitions + * https://swiperjs.com + * + * Copyright 2014-2022 Vladimir Kharlampidi + * + * Released under the MIT License + * + * Released on: April 24, 2022 + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Swiper = factory()); +})(this, (function () { 'use strict'; + + /** + * SSR Window 4.0.2 + * Better handling for window object in SSR environment + * https://github.com/nolimits4web/ssr-window + * + * Copyright 2021, Vladimir Kharlampidi + * + * Licensed under MIT + * + * Released on: December 13, 2021 + */ + + /* eslint-disable no-param-reassign */ + function isObject$1(obj) { + return obj !== null && typeof obj === 'object' && 'constructor' in obj && obj.constructor === Object; + } + + function extend$1(target, src) { + if (target === void 0) { + target = {}; + } + + if (src === void 0) { + src = {}; + } + + Object.keys(src).forEach(key => { + if (typeof target[key] === 'undefined') target[key] = src[key];else if (isObject$1(src[key]) && isObject$1(target[key]) && Object.keys(src[key]).length > 0) { + extend$1(target[key], src[key]); + } + }); + } + + const ssrDocument = { + body: {}, + + addEventListener() {}, + + removeEventListener() {}, + + activeElement: { + blur() {}, + + nodeName: '' + }, + + querySelector() { + return null; + }, + + querySelectorAll() { + return []; + }, + + getElementById() { + return null; + }, + + createEvent() { + return { + initEvent() {} + + }; + }, + + createElement() { + return { + children: [], + childNodes: [], + style: {}, + + setAttribute() {}, + + getElementsByTagName() { + return []; + } + + }; + }, + + createElementNS() { + return {}; + }, + + importNode() { + return null; + }, + + location: { + hash: '', + host: '', + hostname: '', + href: '', + origin: '', + pathname: '', + protocol: '', + search: '' + } + }; + + function getDocument() { + const doc = typeof document !== 'undefined' ? document : {}; + extend$1(doc, ssrDocument); + return doc; + } + + const ssrWindow = { + document: ssrDocument, + navigator: { + userAgent: '' + }, + location: { + hash: '', + host: '', + hostname: '', + href: '', + origin: '', + pathname: '', + protocol: '', + search: '' + }, + history: { + replaceState() {}, + + pushState() {}, + + go() {}, + + back() {} + + }, + CustomEvent: function CustomEvent() { + return this; + }, + + addEventListener() {}, + + removeEventListener() {}, + + getComputedStyle() { + return { + getPropertyValue() { + return ''; + } + + }; + }, + + Image() {}, + + Date() {}, + + screen: {}, + + setTimeout() {}, + + clearTimeout() {}, + + matchMedia() { + return {}; + }, + + requestAnimationFrame(callback) { + if (typeof setTimeout === 'undefined') { + callback(); + return null; + } + + return setTimeout(callback, 0); + }, + + cancelAnimationFrame(id) { + if (typeof setTimeout === 'undefined') { + return; + } + + clearTimeout(id); + } + + }; + + function getWindow() { + const win = typeof window !== 'undefined' ? window : {}; + extend$1(win, ssrWindow); + return win; + } + + /** + * Dom7 4.0.4 + * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API + * https://framework7.io/docs/dom7.html + * + * Copyright 2022, Vladimir Kharlampidi + * + * Licensed under MIT + * + * Released on: January 11, 2022 + */ + /* eslint-disable no-proto */ + + function makeReactive(obj) { + const proto = obj.__proto__; + Object.defineProperty(obj, '__proto__', { + get() { + return proto; + }, + + set(value) { + proto.__proto__ = value; + } + + }); + } + + class Dom7 extends Array { + constructor(items) { + if (typeof items === 'number') { + super(items); + } else { + super(...(items || [])); + makeReactive(this); + } + } + + } + + function arrayFlat(arr) { + if (arr === void 0) { + arr = []; + } + + const res = []; + arr.forEach(el => { + if (Array.isArray(el)) { + res.push(...arrayFlat(el)); + } else { + res.push(el); + } + }); + return res; + } + + function arrayFilter(arr, callback) { + return Array.prototype.filter.call(arr, callback); + } + + function arrayUnique(arr) { + const uniqueArray = []; + + for (let i = 0; i < arr.length; i += 1) { + if (uniqueArray.indexOf(arr[i]) === -1) uniqueArray.push(arr[i]); + } + + return uniqueArray; + } + + + function qsa(selector, context) { + if (typeof selector !== 'string') { + return [selector]; + } + + const a = []; + const res = context.querySelectorAll(selector); + + for (let i = 0; i < res.length; i += 1) { + a.push(res[i]); + } + + return a; + } + + function $(selector, context) { + const window = getWindow(); + const document = getDocument(); + let arr = []; + + if (!context && selector instanceof Dom7) { + return selector; + } + + if (!selector) { + return new Dom7(arr); + } + + if (typeof selector === 'string') { + const html = selector.trim(); + + if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) { + let toCreate = 'div'; + if (html.indexOf(' c.split(' '))); + this.forEach(el => { + el.classList.add(...classNames); + }); + return this; + } + + function removeClass() { + for (var _len2 = arguments.length, classes = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + classes[_key2] = arguments[_key2]; + } + + const classNames = arrayFlat(classes.map(c => c.split(' '))); + this.forEach(el => { + el.classList.remove(...classNames); + }); + return this; + } + + function toggleClass() { + for (var _len3 = arguments.length, classes = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + classes[_key3] = arguments[_key3]; + } + + const classNames = arrayFlat(classes.map(c => c.split(' '))); + this.forEach(el => { + classNames.forEach(className => { + el.classList.toggle(className); + }); + }); + } + + function hasClass() { + for (var _len4 = arguments.length, classes = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { + classes[_key4] = arguments[_key4]; + } + + const classNames = arrayFlat(classes.map(c => c.split(' '))); + return arrayFilter(this, el => { + return classNames.filter(className => el.classList.contains(className)).length > 0; + }).length > 0; + } + + function attr(attrs, value) { + if (arguments.length === 1 && typeof attrs === 'string') { + // Get attr + if (this[0]) return this[0].getAttribute(attrs); + return undefined; + } // Set attrs + + + for (let i = 0; i < this.length; i += 1) { + if (arguments.length === 2) { + // String + this[i].setAttribute(attrs, value); + } else { + // Object + for (const attrName in attrs) { + this[i][attrName] = attrs[attrName]; + this[i].setAttribute(attrName, attrs[attrName]); + } + } + } + + return this; + } + + function removeAttr(attr) { + for (let i = 0; i < this.length; i += 1) { + this[i].removeAttribute(attr); + } + + return this; + } + + function transform(transform) { + for (let i = 0; i < this.length; i += 1) { + this[i].style.transform = transform; + } + + return this; + } + + function transition$1(duration) { + for (let i = 0; i < this.length; i += 1) { + this[i].style.transitionDuration = typeof duration !== 'string' ? `${duration}ms` : duration; + } + + return this; + } + + function on() { + for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { + args[_key5] = arguments[_key5]; + } + + let [eventType, targetSelector, listener, capture] = args; + + if (typeof args[1] === 'function') { + [eventType, listener, capture] = args; + targetSelector = undefined; + } + + if (!capture) capture = false; + + function handleLiveEvent(e) { + const target = e.target; + if (!target) return; + const eventData = e.target.dom7EventData || []; + + if (eventData.indexOf(e) < 0) { + eventData.unshift(e); + } + + if ($(target).is(targetSelector)) listener.apply(target, eventData);else { + const parents = $(target).parents(); // eslint-disable-line + + for (let k = 0; k < parents.length; k += 1) { + if ($(parents[k]).is(targetSelector)) listener.apply(parents[k], eventData); + } + } + } + + function handleEvent(e) { + const eventData = e && e.target ? e.target.dom7EventData || [] : []; + + if (eventData.indexOf(e) < 0) { + eventData.unshift(e); + } + + listener.apply(this, eventData); + } + + const events = eventType.split(' '); + let j; + + for (let i = 0; i < this.length; i += 1) { + const el = this[i]; + + if (!targetSelector) { + for (j = 0; j < events.length; j += 1) { + const event = events[j]; + if (!el.dom7Listeners) el.dom7Listeners = {}; + if (!el.dom7Listeners[event]) el.dom7Listeners[event] = []; + el.dom7Listeners[event].push({ + listener, + proxyListener: handleEvent + }); + el.addEventListener(event, handleEvent, capture); + } + } else { + // Live events + for (j = 0; j < events.length; j += 1) { + const event = events[j]; + if (!el.dom7LiveListeners) el.dom7LiveListeners = {}; + if (!el.dom7LiveListeners[event]) el.dom7LiveListeners[event] = []; + el.dom7LiveListeners[event].push({ + listener, + proxyListener: handleLiveEvent + }); + el.addEventListener(event, handleLiveEvent, capture); + } + } + } + + return this; + } + + function off() { + for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { + args[_key6] = arguments[_key6]; + } + + let [eventType, targetSelector, listener, capture] = args; + + if (typeof args[1] === 'function') { + [eventType, listener, capture] = args; + targetSelector = undefined; + } + + if (!capture) capture = false; + const events = eventType.split(' '); + + for (let i = 0; i < events.length; i += 1) { + const event = events[i]; + + for (let j = 0; j < this.length; j += 1) { + const el = this[j]; + let handlers; + + if (!targetSelector && el.dom7Listeners) { + handlers = el.dom7Listeners[event]; + } else if (targetSelector && el.dom7LiveListeners) { + handlers = el.dom7LiveListeners[event]; + } + + if (handlers && handlers.length) { + for (let k = handlers.length - 1; k >= 0; k -= 1) { + const handler = handlers[k]; + + if (listener && handler.listener === listener) { + el.removeEventListener(event, handler.proxyListener, capture); + handlers.splice(k, 1); + } else if (listener && handler.listener && handler.listener.dom7proxy && handler.listener.dom7proxy === listener) { + el.removeEventListener(event, handler.proxyListener, capture); + handlers.splice(k, 1); + } else if (!listener) { + el.removeEventListener(event, handler.proxyListener, capture); + handlers.splice(k, 1); + } + } + } + } + } + + return this; + } + + function trigger() { + const window = getWindow(); + + for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) { + args[_key9] = arguments[_key9]; + } + + const events = args[0].split(' '); + const eventData = args[1]; + + for (let i = 0; i < events.length; i += 1) { + const event = events[i]; + + for (let j = 0; j < this.length; j += 1) { + const el = this[j]; + + if (window.CustomEvent) { + const evt = new window.CustomEvent(event, { + detail: eventData, + bubbles: true, + cancelable: true + }); + el.dom7EventData = args.filter((data, dataIndex) => dataIndex > 0); + el.dispatchEvent(evt); + el.dom7EventData = []; + delete el.dom7EventData; + } + } + } + + return this; + } + + function transitionEnd$1(callback) { + const dom = this; + + function fireCallBack(e) { + if (e.target !== this) return; + callback.call(this, e); + dom.off('transitionend', fireCallBack); + } + + if (callback) { + dom.on('transitionend', fireCallBack); + } + + return this; + } + + function outerWidth(includeMargins) { + if (this.length > 0) { + if (includeMargins) { + const styles = this.styles(); + return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left')); + } + + return this[0].offsetWidth; + } + + return null; + } + + function outerHeight(includeMargins) { + if (this.length > 0) { + if (includeMargins) { + const styles = this.styles(); + return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom')); + } + + return this[0].offsetHeight; + } + + return null; + } + + function offset() { + if (this.length > 0) { + const window = getWindow(); + const document = getDocument(); + const el = this[0]; + const box = el.getBoundingClientRect(); + const body = document.body; + const clientTop = el.clientTop || body.clientTop || 0; + const clientLeft = el.clientLeft || body.clientLeft || 0; + const scrollTop = el === window ? window.scrollY : el.scrollTop; + const scrollLeft = el === window ? window.scrollX : el.scrollLeft; + return { + top: box.top + scrollTop - clientTop, + left: box.left + scrollLeft - clientLeft + }; + } + + return null; + } + + function styles() { + const window = getWindow(); + if (this[0]) return window.getComputedStyle(this[0], null); + return {}; + } + + function css(props, value) { + const window = getWindow(); + let i; + + if (arguments.length === 1) { + if (typeof props === 'string') { + // .css('width') + if (this[0]) return window.getComputedStyle(this[0], null).getPropertyValue(props); + } else { + // .css({ width: '100px' }) + for (i = 0; i < this.length; i += 1) { + for (const prop in props) { + this[i].style[prop] = props[prop]; + } + } + + return this; + } + } + + if (arguments.length === 2 && typeof props === 'string') { + // .css('width', '100px') + for (i = 0; i < this.length; i += 1) { + this[i].style[props] = value; + } + + return this; + } + + return this; + } + + function each(callback) { + if (!callback) return this; + this.forEach((el, index) => { + callback.apply(el, [el, index]); + }); + return this; + } + + function filter(callback) { + const result = arrayFilter(this, callback); + return $(result); + } + + function html(html) { + if (typeof html === 'undefined') { + return this[0] ? this[0].innerHTML : null; + } + + for (let i = 0; i < this.length; i += 1) { + this[i].innerHTML = html; + } + + return this; + } + + function text(text) { + if (typeof text === 'undefined') { + return this[0] ? this[0].textContent.trim() : null; + } + + for (let i = 0; i < this.length; i += 1) { + this[i].textContent = text; + } + + return this; + } + + function is(selector) { + const window = getWindow(); + const document = getDocument(); + const el = this[0]; + let compareWith; + let i; + if (!el || typeof selector === 'undefined') return false; + + if (typeof selector === 'string') { + if (el.matches) return el.matches(selector); + if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector); + if (el.msMatchesSelector) return el.msMatchesSelector(selector); + compareWith = $(selector); + + for (i = 0; i < compareWith.length; i += 1) { + if (compareWith[i] === el) return true; + } + + return false; + } + + if (selector === document) { + return el === document; + } + + if (selector === window) { + return el === window; + } + + if (selector.nodeType || selector instanceof Dom7) { + compareWith = selector.nodeType ? [selector] : selector; + + for (i = 0; i < compareWith.length; i += 1) { + if (compareWith[i] === el) return true; + } + + return false; + } + + return false; + } + + function index() { + let child = this[0]; + let i; + + if (child) { + i = 0; // eslint-disable-next-line + + while ((child = child.previousSibling) !== null) { + if (child.nodeType === 1) i += 1; + } + + return i; + } + + return undefined; + } + + function eq(index) { + if (typeof index === 'undefined') return this; + const length = this.length; + + if (index > length - 1) { + return $([]); + } + + if (index < 0) { + const returnIndex = length + index; + if (returnIndex < 0) return $([]); + return $([this[returnIndex]]); + } + + return $([this[index]]); + } + + function append() { + let newChild; + const document = getDocument(); + + for (let k = 0; k < arguments.length; k += 1) { + newChild = k < 0 || arguments.length <= k ? undefined : arguments[k]; + + for (let i = 0; i < this.length; i += 1) { + if (typeof newChild === 'string') { + const tempDiv = document.createElement('div'); + tempDiv.innerHTML = newChild; + + while (tempDiv.firstChild) { + this[i].appendChild(tempDiv.firstChild); + } + } else if (newChild instanceof Dom7) { + for (let j = 0; j < newChild.length; j += 1) { + this[i].appendChild(newChild[j]); + } + } else { + this[i].appendChild(newChild); + } + } + } + + return this; + } + + function prepend(newChild) { + const document = getDocument(); + let i; + let j; + + for (i = 0; i < this.length; i += 1) { + if (typeof newChild === 'string') { + const tempDiv = document.createElement('div'); + tempDiv.innerHTML = newChild; + + for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) { + this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]); + } + } else if (newChild instanceof Dom7) { + for (j = 0; j < newChild.length; j += 1) { + this[i].insertBefore(newChild[j], this[i].childNodes[0]); + } + } else { + this[i].insertBefore(newChild, this[i].childNodes[0]); + } + } + + return this; + } + + function next(selector) { + if (this.length > 0) { + if (selector) { + if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) { + return $([this[0].nextElementSibling]); + } + + return $([]); + } + + if (this[0].nextElementSibling) return $([this[0].nextElementSibling]); + return $([]); + } + + return $([]); + } + + function nextAll(selector) { + const nextEls = []; + let el = this[0]; + if (!el) return $([]); + + while (el.nextElementSibling) { + const next = el.nextElementSibling; // eslint-disable-line + + if (selector) { + if ($(next).is(selector)) nextEls.push(next); + } else nextEls.push(next); + + el = next; + } + + return $(nextEls); + } + + function prev(selector) { + if (this.length > 0) { + const el = this[0]; + + if (selector) { + if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) { + return $([el.previousElementSibling]); + } + + return $([]); + } + + if (el.previousElementSibling) return $([el.previousElementSibling]); + return $([]); + } + + return $([]); + } + + function prevAll(selector) { + const prevEls = []; + let el = this[0]; + if (!el) return $([]); + + while (el.previousElementSibling) { + const prev = el.previousElementSibling; // eslint-disable-line + + if (selector) { + if ($(prev).is(selector)) prevEls.push(prev); + } else prevEls.push(prev); + + el = prev; + } + + return $(prevEls); + } + + function parent(selector) { + const parents = []; // eslint-disable-line + + for (let i = 0; i < this.length; i += 1) { + if (this[i].parentNode !== null) { + if (selector) { + if ($(this[i].parentNode).is(selector)) parents.push(this[i].parentNode); + } else { + parents.push(this[i].parentNode); + } + } + } + + return $(parents); + } + + function parents(selector) { + const parents = []; // eslint-disable-line + + for (let i = 0; i < this.length; i += 1) { + let parent = this[i].parentNode; // eslint-disable-line + + while (parent) { + if (selector) { + if ($(parent).is(selector)) parents.push(parent); + } else { + parents.push(parent); + } + + parent = parent.parentNode; + } + } + + return $(parents); + } + + function closest(selector) { + let closest = this; // eslint-disable-line + + if (typeof selector === 'undefined') { + return $([]); + } + + if (!closest.is(selector)) { + closest = closest.parents(selector).eq(0); + } + + return closest; + } + + function find(selector) { + const foundElements = []; + + for (let i = 0; i < this.length; i += 1) { + const found = this[i].querySelectorAll(selector); + + for (let j = 0; j < found.length; j += 1) { + foundElements.push(found[j]); + } + } + + return $(foundElements); + } + + function children(selector) { + const children = []; // eslint-disable-line + + for (let i = 0; i < this.length; i += 1) { + const childNodes = this[i].children; + + for (let j = 0; j < childNodes.length; j += 1) { + if (!selector || $(childNodes[j]).is(selector)) { + children.push(childNodes[j]); + } + } + } + + return $(children); + } + + function remove() { + for (let i = 0; i < this.length; i += 1) { + if (this[i].parentNode) this[i].parentNode.removeChild(this[i]); + } + + return this; + } + + const Methods = { + addClass, + removeClass, + hasClass, + toggleClass, + attr, + removeAttr, + transform, + transition: transition$1, + on, + off, + trigger, + transitionEnd: transitionEnd$1, + outerWidth, + outerHeight, + styles, + offset, + css, + each, + html, + text, + is, + index, + eq, + append, + prepend, + next, + nextAll, + prev, + prevAll, + parent, + parents, + closest, + find, + children, + filter, + remove + }; + Object.keys(Methods).forEach(methodName => { + Object.defineProperty($.fn, methodName, { + value: Methods[methodName], + writable: true + }); + }); + + function deleteProps(obj) { + const object = obj; + Object.keys(object).forEach(key => { + try { + object[key] = null; + } catch (e) {// no getter for object + } + + try { + delete object[key]; + } catch (e) {// something got wrong + } + }); + } + + function nextTick(callback, delay) { + if (delay === void 0) { + delay = 0; + } + + return setTimeout(callback, delay); + } + + function now() { + return Date.now(); + } + + function getComputedStyle$1(el) { + const window = getWindow(); + let style; + + if (window.getComputedStyle) { + style = window.getComputedStyle(el, null); + } + + if (!style && el.currentStyle) { + style = el.currentStyle; + } + + if (!style) { + style = el.style; + } + + return style; + } + + function getTranslate(el, axis) { + if (axis === void 0) { + axis = 'x'; + } + + const window = getWindow(); + let matrix; + let curTransform; + let transformMatrix; + const curStyle = getComputedStyle$1(el); + + if (window.WebKitCSSMatrix) { + curTransform = curStyle.transform || curStyle.webkitTransform; + + if (curTransform.split(',').length > 6) { + curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', '); + } // Some old versions of Webkit choke when 'none' is passed; pass + // empty string instead in this case + + + transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform); + } else { + transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,'); + matrix = transformMatrix.toString().split(','); + } + + if (axis === 'x') { + // Latest Chrome and webkits Fix + if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41; // Crazy IE10 Matrix + else if (matrix.length === 16) curTransform = parseFloat(matrix[12]); // Normal Browsers + else curTransform = parseFloat(matrix[4]); + } + + if (axis === 'y') { + // Latest Chrome and webkits Fix + if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42; // Crazy IE10 Matrix + else if (matrix.length === 16) curTransform = parseFloat(matrix[13]); // Normal Browsers + else curTransform = parseFloat(matrix[5]); + } + + return curTransform || 0; + } + + function isObject(o) { + return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object'; + } + + function isNode(node) { + // eslint-disable-next-line + if (typeof window !== 'undefined' && typeof window.HTMLElement !== 'undefined') { + return node instanceof HTMLElement; + } + + return node && (node.nodeType === 1 || node.nodeType === 11); + } + + function extend() { + const to = Object(arguments.length <= 0 ? undefined : arguments[0]); + const noExtend = ['__proto__', 'constructor', 'prototype']; + + for (let i = 1; i < arguments.length; i += 1) { + const nextSource = i < 0 || arguments.length <= i ? undefined : arguments[i]; + + if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) { + const keysArray = Object.keys(Object(nextSource)).filter(key => noExtend.indexOf(key) < 0); + + for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) { + const nextKey = keysArray[nextIndex]; + const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); + + if (desc !== undefined && desc.enumerable) { + if (isObject(to[nextKey]) && isObject(nextSource[nextKey])) { + if (nextSource[nextKey].__swiper__) { + to[nextKey] = nextSource[nextKey]; + } else { + extend(to[nextKey], nextSource[nextKey]); + } + } else if (!isObject(to[nextKey]) && isObject(nextSource[nextKey])) { + to[nextKey] = {}; + + if (nextSource[nextKey].__swiper__) { + to[nextKey] = nextSource[nextKey]; + } else { + extend(to[nextKey], nextSource[nextKey]); + } + } else { + to[nextKey] = nextSource[nextKey]; + } + } + } + } + } + + return to; + } + + function setCSSProperty(el, varName, varValue) { + el.style.setProperty(varName, varValue); + } + + function animateCSSModeScroll(_ref) { + let { + swiper, + targetPosition, + side + } = _ref; + const window = getWindow(); + const startPosition = -swiper.translate; + let startTime = null; + let time; + const duration = swiper.params.speed; + swiper.wrapperEl.style.scrollSnapType = 'none'; + window.cancelAnimationFrame(swiper.cssModeFrameID); + const dir = targetPosition > startPosition ? 'next' : 'prev'; + + const isOutOfBound = (current, target) => { + return dir === 'next' && current >= target || dir === 'prev' && current <= target; + }; + + const animate = () => { + time = new Date().getTime(); + + if (startTime === null) { + startTime = time; + } + + const progress = Math.max(Math.min((time - startTime) / duration, 1), 0); + const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2; + let currentPosition = startPosition + easeProgress * (targetPosition - startPosition); + + if (isOutOfBound(currentPosition, targetPosition)) { + currentPosition = targetPosition; + } + + swiper.wrapperEl.scrollTo({ + [side]: currentPosition + }); + + if (isOutOfBound(currentPosition, targetPosition)) { + swiper.wrapperEl.style.overflow = 'hidden'; + swiper.wrapperEl.style.scrollSnapType = ''; + setTimeout(() => { + swiper.wrapperEl.style.overflow = ''; + swiper.wrapperEl.scrollTo({ + [side]: currentPosition + }); + }); + window.cancelAnimationFrame(swiper.cssModeFrameID); + return; + } + + swiper.cssModeFrameID = window.requestAnimationFrame(animate); + }; + + animate(); + } + + let support; + + function calcSupport() { + const window = getWindow(); + const document = getDocument(); + return { + smoothScroll: document.documentElement && 'scrollBehavior' in document.documentElement.style, + touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch), + passiveListener: function checkPassiveListener() { + let supportsPassive = false; + + try { + const opts = Object.defineProperty({}, 'passive', { + // eslint-disable-next-line + get() { + supportsPassive = true; + } + + }); + window.addEventListener('testPassiveListener', null, opts); + } catch (e) {// No support + } + + return supportsPassive; + }(), + gestures: function checkGestures() { + return 'ongesturestart' in window; + }() + }; + } + + function getSupport() { + if (!support) { + support = calcSupport(); + } + + return support; + } + + let deviceCached; + + function calcDevice(_temp) { + let { + userAgent + } = _temp === void 0 ? {} : _temp; + const support = getSupport(); + const window = getWindow(); + const platform = window.navigator.platform; + const ua = userAgent || window.navigator.userAgent; + const device = { + ios: false, + android: false + }; + const screenWidth = window.screen.width; + const screenHeight = window.screen.height; + const android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line + + let ipad = ua.match(/(iPad).*OS\s([\d_]+)/); + const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); + const iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); + const windows = platform === 'Win32'; + let macos = platform === 'MacIntel'; // iPadOs 13 fix + + const iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810']; + + if (!ipad && macos && support.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) { + ipad = ua.match(/(Version)\/([\d.]+)/); + if (!ipad) ipad = [0, 1, '13_0_0']; + macos = false; + } // Android + + + if (android && !windows) { + device.os = 'android'; + device.android = true; + } + + if (ipad || iphone || ipod) { + device.os = 'ios'; + device.ios = true; + } // Export object + + + return device; + } + + function getDevice(overrides) { + if (overrides === void 0) { + overrides = {}; + } + + if (!deviceCached) { + deviceCached = calcDevice(overrides); + } + + return deviceCached; + } + + let browser; + + function calcBrowser() { + const window = getWindow(); + + function isSafari() { + const ua = window.navigator.userAgent.toLowerCase(); + return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0; + } + + return { + isSafari: isSafari(), + isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent) + }; + } + + function getBrowser() { + if (!browser) { + browser = calcBrowser(); + } + + return browser; + } + + function Resize(_ref) { + let { + swiper, + on, + emit + } = _ref; + const window = getWindow(); + let observer = null; + let animationFrame = null; + + const resizeHandler = () => { + if (!swiper || swiper.destroyed || !swiper.initialized) return; + emit('beforeResize'); + emit('resize'); + }; + + const createObserver = () => { + if (!swiper || swiper.destroyed || !swiper.initialized) return; + observer = new ResizeObserver(entries => { + animationFrame = window.requestAnimationFrame(() => { + const { + width, + height + } = swiper; + let newWidth = width; + let newHeight = height; + entries.forEach(_ref2 => { + let { + contentBoxSize, + contentRect, + target + } = _ref2; + if (target && target !== swiper.el) return; + newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize; + newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize; + }); + + if (newWidth !== width || newHeight !== height) { + resizeHandler(); + } + }); + }); + observer.observe(swiper.el); + }; + + const removeObserver = () => { + if (animationFrame) { + window.cancelAnimationFrame(animationFrame); + } + + if (observer && observer.unobserve && swiper.el) { + observer.unobserve(swiper.el); + observer = null; + } + }; + + const orientationChangeHandler = () => { + if (!swiper || swiper.destroyed || !swiper.initialized) return; + emit('orientationchange'); + }; + + on('init', () => { + if (swiper.params.resizeObserver && typeof window.ResizeObserver !== 'undefined') { + createObserver(); + return; + } + + window.addEventListener('resize', resizeHandler); + window.addEventListener('orientationchange', orientationChangeHandler); + }); + on('destroy', () => { + removeObserver(); + window.removeEventListener('resize', resizeHandler); + window.removeEventListener('orientationchange', orientationChangeHandler); + }); + } + + function Observer(_ref) { + let { + swiper, + extendParams, + on, + emit + } = _ref; + const observers = []; + const window = getWindow(); + + const attach = function (target, options) { + if (options === void 0) { + options = {}; + } + + const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver; + const observer = new ObserverFunc(mutations => { + // The observerUpdate event should only be triggered + // once despite the number of mutations. Additional + // triggers are redundant and are very costly + if (mutations.length === 1) { + emit('observerUpdate', mutations[0]); + return; + } + + const observerUpdate = function observerUpdate() { + emit('observerUpdate', mutations[0]); + }; + + if (window.requestAnimationFrame) { + window.requestAnimationFrame(observerUpdate); + } else { + window.setTimeout(observerUpdate, 0); + } + }); + observer.observe(target, { + attributes: typeof options.attributes === 'undefined' ? true : options.attributes, + childList: typeof options.childList === 'undefined' ? true : options.childList, + characterData: typeof options.characterData === 'undefined' ? true : options.characterData + }); + observers.push(observer); + }; + + const init = () => { + if (!swiper.params.observer) return; + + if (swiper.params.observeParents) { + const containerParents = swiper.$el.parents(); + + for (let i = 0; i < containerParents.length; i += 1) { + attach(containerParents[i]); + } + } // Observe container + + + attach(swiper.$el[0], { + childList: swiper.params.observeSlideChildren + }); // Observe wrapper + + attach(swiper.$wrapperEl[0], { + attributes: false + }); + }; + + const destroy = () => { + observers.forEach(observer => { + observer.disconnect(); + }); + observers.splice(0, observers.length); + }; + + extendParams({ + observer: false, + observeParents: false, + observeSlideChildren: false + }); + on('init', init); + on('destroy', destroy); + } + + /* eslint-disable no-underscore-dangle */ + var eventsEmitter = { + on(events, handler, priority) { + const self = this; + if (!self.eventsListeners || self.destroyed) return self; + if (typeof handler !== 'function') return self; + const method = priority ? 'unshift' : 'push'; + events.split(' ').forEach(event => { + if (!self.eventsListeners[event]) self.eventsListeners[event] = []; + self.eventsListeners[event][method](handler); + }); + return self; + }, + + once(events, handler, priority) { + const self = this; + if (!self.eventsListeners || self.destroyed) return self; + if (typeof handler !== 'function') return self; + + function onceHandler() { + self.off(events, onceHandler); + + if (onceHandler.__emitterProxy) { + delete onceHandler.__emitterProxy; + } + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + handler.apply(self, args); + } + + onceHandler.__emitterProxy = handler; + return self.on(events, onceHandler, priority); + }, + + onAny(handler, priority) { + const self = this; + if (!self.eventsListeners || self.destroyed) return self; + if (typeof handler !== 'function') return self; + const method = priority ? 'unshift' : 'push'; + + if (self.eventsAnyListeners.indexOf(handler) < 0) { + self.eventsAnyListeners[method](handler); + } + + return self; + }, + + offAny(handler) { + const self = this; + if (!self.eventsListeners || self.destroyed) return self; + if (!self.eventsAnyListeners) return self; + const index = self.eventsAnyListeners.indexOf(handler); + + if (index >= 0) { + self.eventsAnyListeners.splice(index, 1); + } + + return self; + }, + + off(events, handler) { + const self = this; + if (!self.eventsListeners || self.destroyed) return self; + if (!self.eventsListeners) return self; + events.split(' ').forEach(event => { + if (typeof handler === 'undefined') { + self.eventsListeners[event] = []; + } else if (self.eventsListeners[event]) { + self.eventsListeners[event].forEach((eventHandler, index) => { + if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) { + self.eventsListeners[event].splice(index, 1); + } + }); + } + }); + return self; + }, + + emit() { + const self = this; + if (!self.eventsListeners || self.destroyed) return self; + if (!self.eventsListeners) return self; + let events; + let data; + let context; + + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + if (typeof args[0] === 'string' || Array.isArray(args[0])) { + events = args[0]; + data = args.slice(1, args.length); + context = self; + } else { + events = args[0].events; + data = args[0].data; + context = args[0].context || self; + } + + data.unshift(context); + const eventsArray = Array.isArray(events) ? events : events.split(' '); + eventsArray.forEach(event => { + if (self.eventsAnyListeners && self.eventsAnyListeners.length) { + self.eventsAnyListeners.forEach(eventHandler => { + eventHandler.apply(context, [event, ...data]); + }); + } + + if (self.eventsListeners && self.eventsListeners[event]) { + self.eventsListeners[event].forEach(eventHandler => { + eventHandler.apply(context, data); + }); + } + }); + return self; + } + + }; + + function updateSize() { + const swiper = this; + let width; + let height; + const $el = swiper.$el; + + if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) { + width = swiper.params.width; + } else { + width = $el[0].clientWidth; + } + + if (typeof swiper.params.height !== 'undefined' && swiper.params.height !== null) { + height = swiper.params.height; + } else { + height = $el[0].clientHeight; + } + + if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) { + return; + } // Subtract paddings + + + width = width - parseInt($el.css('padding-left') || 0, 10) - parseInt($el.css('padding-right') || 0, 10); + height = height - parseInt($el.css('padding-top') || 0, 10) - parseInt($el.css('padding-bottom') || 0, 10); + if (Number.isNaN(width)) width = 0; + if (Number.isNaN(height)) height = 0; + Object.assign(swiper, { + width, + height, + size: swiper.isHorizontal() ? width : height + }); + } + + function updateSlides() { + const swiper = this; + + function getDirectionLabel(property) { + if (swiper.isHorizontal()) { + return property; + } // prettier-ignore + + + return { + 'width': 'height', + 'margin-top': 'margin-left', + 'margin-bottom ': 'margin-right', + 'margin-left': 'margin-top', + 'margin-right': 'margin-bottom', + 'padding-left': 'padding-top', + 'padding-right': 'padding-bottom', + 'marginRight': 'marginBottom' + }[property]; + } + + function getDirectionPropertyValue(node, label) { + return parseFloat(node.getPropertyValue(getDirectionLabel(label)) || 0); + } + + const params = swiper.params; + const { + $wrapperEl, + size: swiperSize, + rtlTranslate: rtl, + wrongRTL + } = swiper; + const isVirtual = swiper.virtual && params.virtual.enabled; + const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length; + const slides = $wrapperEl.children(`.${swiper.params.slideClass}`); + const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length; + let snapGrid = []; + const slidesGrid = []; + const slidesSizesGrid = []; + let offsetBefore = params.slidesOffsetBefore; + + if (typeof offsetBefore === 'function') { + offsetBefore = params.slidesOffsetBefore.call(swiper); + } + + let offsetAfter = params.slidesOffsetAfter; + + if (typeof offsetAfter === 'function') { + offsetAfter = params.slidesOffsetAfter.call(swiper); + } + + const previousSnapGridLength = swiper.snapGrid.length; + const previousSlidesGridLength = swiper.slidesGrid.length; + let spaceBetween = params.spaceBetween; + let slidePosition = -offsetBefore; + let prevSlideSize = 0; + let index = 0; + + if (typeof swiperSize === 'undefined') { + return; + } + + if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) { + spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize; + } + + swiper.virtualSize = -spaceBetween; // reset margins + + if (rtl) slides.css({ + marginLeft: '', + marginBottom: '', + marginTop: '' + });else slides.css({ + marginRight: '', + marginBottom: '', + marginTop: '' + }); // reset cssMode offsets + + if (params.centeredSlides && params.cssMode) { + setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-before', ''); + setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-after', ''); + } + + const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid; + + if (gridEnabled) { + swiper.grid.initSlides(slidesLength); + } // Calc slides + + + let slideSize; + const shouldResetSlideSize = params.slidesPerView === 'auto' && params.breakpoints && Object.keys(params.breakpoints).filter(key => { + return typeof params.breakpoints[key].slidesPerView !== 'undefined'; + }).length > 0; + + for (let i = 0; i < slidesLength; i += 1) { + slideSize = 0; + const slide = slides.eq(i); + + if (gridEnabled) { + swiper.grid.updateSlide(i, slide, slidesLength, getDirectionLabel); + } + + if (slide.css('display') === 'none') continue; // eslint-disable-line + + if (params.slidesPerView === 'auto') { + if (shouldResetSlideSize) { + slides[i].style[getDirectionLabel('width')] = ``; + } + + const slideStyles = getComputedStyle(slide[0]); + const currentTransform = slide[0].style.transform; + const currentWebKitTransform = slide[0].style.webkitTransform; + + if (currentTransform) { + slide[0].style.transform = 'none'; + } + + if (currentWebKitTransform) { + slide[0].style.webkitTransform = 'none'; + } + + if (params.roundLengths) { + slideSize = swiper.isHorizontal() ? slide.outerWidth(true) : slide.outerHeight(true); + } else { + // eslint-disable-next-line + const width = getDirectionPropertyValue(slideStyles, 'width'); + const paddingLeft = getDirectionPropertyValue(slideStyles, 'padding-left'); + const paddingRight = getDirectionPropertyValue(slideStyles, 'padding-right'); + const marginLeft = getDirectionPropertyValue(slideStyles, 'margin-left'); + const marginRight = getDirectionPropertyValue(slideStyles, 'margin-right'); + const boxSizing = slideStyles.getPropertyValue('box-sizing'); + + if (boxSizing && boxSizing === 'border-box') { + slideSize = width + marginLeft + marginRight; + } else { + const { + clientWidth, + offsetWidth + } = slide[0]; + slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth); + } + } + + if (currentTransform) { + slide[0].style.transform = currentTransform; + } + + if (currentWebKitTransform) { + slide[0].style.webkitTransform = currentWebKitTransform; + } + + if (params.roundLengths) slideSize = Math.floor(slideSize); + } else { + slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView; + if (params.roundLengths) slideSize = Math.floor(slideSize); + + if (slides[i]) { + slides[i].style[getDirectionLabel('width')] = `${slideSize}px`; + } + } + + if (slides[i]) { + slides[i].swiperSlideSize = slideSize; + } + + slidesSizesGrid.push(slideSize); + + if (params.centeredSlides) { + slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween; + if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween; + if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween; + if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0; + if (params.roundLengths) slidePosition = Math.floor(slidePosition); + if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition); + slidesGrid.push(slidePosition); + } else { + if (params.roundLengths) slidePosition = Math.floor(slidePosition); + if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition); + slidesGrid.push(slidePosition); + slidePosition = slidePosition + slideSize + spaceBetween; + } + + swiper.virtualSize += slideSize + spaceBetween; + prevSlideSize = slideSize; + index += 1; + } + + swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter; + + if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) { + $wrapperEl.css({ + width: `${swiper.virtualSize + params.spaceBetween}px` + }); + } + + if (params.setWrapperSize) { + $wrapperEl.css({ + [getDirectionLabel('width')]: `${swiper.virtualSize + params.spaceBetween}px` + }); + } + + if (gridEnabled) { + swiper.grid.updateWrapperSize(slideSize, snapGrid, getDirectionLabel); + } // Remove last grid elements depending on width + + + if (!params.centeredSlides) { + const newSlidesGrid = []; + + for (let i = 0; i < snapGrid.length; i += 1) { + let slidesGridItem = snapGrid[i]; + if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem); + + if (snapGrid[i] <= swiper.virtualSize - swiperSize) { + newSlidesGrid.push(slidesGridItem); + } + } + + snapGrid = newSlidesGrid; + + if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) { + snapGrid.push(swiper.virtualSize - swiperSize); + } + } + + if (snapGrid.length === 0) snapGrid = [0]; + + if (params.spaceBetween !== 0) { + const key = swiper.isHorizontal() && rtl ? 'marginLeft' : getDirectionLabel('marginRight'); + slides.filter((_, slideIndex) => { + if (!params.cssMode) return true; + + if (slideIndex === slides.length - 1) { + return false; + } + + return true; + }).css({ + [key]: `${spaceBetween}px` + }); + } + + if (params.centeredSlides && params.centeredSlidesBounds) { + let allSlidesSize = 0; + slidesSizesGrid.forEach(slideSizeValue => { + allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0); + }); + allSlidesSize -= params.spaceBetween; + const maxSnap = allSlidesSize - swiperSize; + snapGrid = snapGrid.map(snap => { + if (snap < 0) return -offsetBefore; + if (snap > maxSnap) return maxSnap + offsetAfter; + return snap; + }); + } + + if (params.centerInsufficientSlides) { + let allSlidesSize = 0; + slidesSizesGrid.forEach(slideSizeValue => { + allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0); + }); + allSlidesSize -= params.spaceBetween; + + if (allSlidesSize < swiperSize) { + const allSlidesOffset = (swiperSize - allSlidesSize) / 2; + snapGrid.forEach((snap, snapIndex) => { + snapGrid[snapIndex] = snap - allSlidesOffset; + }); + slidesGrid.forEach((snap, snapIndex) => { + slidesGrid[snapIndex] = snap + allSlidesOffset; + }); + } + } + + Object.assign(swiper, { + slides, + snapGrid, + slidesGrid, + slidesSizesGrid + }); + + if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) { + setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-before', `${-snapGrid[0]}px`); + setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-after', `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`); + const addToSnapGrid = -swiper.snapGrid[0]; + const addToSlidesGrid = -swiper.slidesGrid[0]; + swiper.snapGrid = swiper.snapGrid.map(v => v + addToSnapGrid); + swiper.slidesGrid = swiper.slidesGrid.map(v => v + addToSlidesGrid); + } + + if (slidesLength !== previousSlidesLength) { + swiper.emit('slidesLengthChange'); + } + + if (snapGrid.length !== previousSnapGridLength) { + if (swiper.params.watchOverflow) swiper.checkOverflow(); + swiper.emit('snapGridLengthChange'); + } + + if (slidesGrid.length !== previousSlidesGridLength) { + swiper.emit('slidesGridLengthChange'); + } + + if (params.watchSlidesProgress) { + swiper.updateSlidesOffset(); + } + + if (!isVirtual && !params.cssMode && (params.effect === 'slide' || params.effect === 'fade')) { + const backFaceHiddenClass = `${params.containerModifierClass}backface-hidden`; + const hasClassBackfaceClassAdded = swiper.$el.hasClass(backFaceHiddenClass); + + if (slidesLength <= params.maxBackfaceHiddenSlides) { + if (!hasClassBackfaceClassAdded) swiper.$el.addClass(backFaceHiddenClass); + } else if (hasClassBackfaceClassAdded) { + swiper.$el.removeClass(backFaceHiddenClass); + } + } + } + + function updateAutoHeight(speed) { + const swiper = this; + const activeSlides = []; + const isVirtual = swiper.virtual && swiper.params.virtual.enabled; + let newHeight = 0; + let i; + + if (typeof speed === 'number') { + swiper.setTransition(speed); + } else if (speed === true) { + swiper.setTransition(swiper.params.speed); + } + + const getSlideByIndex = index => { + if (isVirtual) { + return swiper.slides.filter(el => parseInt(el.getAttribute('data-swiper-slide-index'), 10) === index)[0]; + } + + return swiper.slides.eq(index)[0]; + }; // Find slides currently in view + + + if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) { + if (swiper.params.centeredSlides) { + swiper.visibleSlides.each(slide => { + activeSlides.push(slide); + }); + } else { + for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) { + const index = swiper.activeIndex + i; + if (index > swiper.slides.length && !isVirtual) break; + activeSlides.push(getSlideByIndex(index)); + } + } + } else { + activeSlides.push(getSlideByIndex(swiper.activeIndex)); + } // Find new height from highest slide in view + + + for (i = 0; i < activeSlides.length; i += 1) { + if (typeof activeSlides[i] !== 'undefined') { + const height = activeSlides[i].offsetHeight; + newHeight = height > newHeight ? height : newHeight; + } + } // Update Height + + + if (newHeight || newHeight === 0) swiper.$wrapperEl.css('height', `${newHeight}px`); + } + + function updateSlidesOffset() { + const swiper = this; + const slides = swiper.slides; + + for (let i = 0; i < slides.length; i += 1) { + slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop; + } + } + + function updateSlidesProgress(translate) { + if (translate === void 0) { + translate = this && this.translate || 0; + } + + const swiper = this; + const params = swiper.params; + const { + slides, + rtlTranslate: rtl, + snapGrid + } = swiper; + if (slides.length === 0) return; + if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset(); + let offsetCenter = -translate; + if (rtl) offsetCenter = translate; // Visible Slides + + slides.removeClass(params.slideVisibleClass); + swiper.visibleSlidesIndexes = []; + swiper.visibleSlides = []; + + for (let i = 0; i < slides.length; i += 1) { + const slide = slides[i]; + let slideOffset = slide.swiperSlideOffset; + + if (params.cssMode && params.centeredSlides) { + slideOffset -= slides[0].swiperSlideOffset; + } + + const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + params.spaceBetween); + const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + params.spaceBetween); + const slideBefore = -(offsetCenter - slideOffset); + const slideAfter = slideBefore + swiper.slidesSizesGrid[i]; + const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size; + + if (isVisible) { + swiper.visibleSlides.push(slide); + swiper.visibleSlidesIndexes.push(i); + slides.eq(i).addClass(params.slideVisibleClass); + } + + slide.progress = rtl ? -slideProgress : slideProgress; + slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress; + } + + swiper.visibleSlides = $(swiper.visibleSlides); + } + + function updateProgress(translate) { + const swiper = this; + + if (typeof translate === 'undefined') { + const multiplier = swiper.rtlTranslate ? -1 : 1; // eslint-disable-next-line + + translate = swiper && swiper.translate && swiper.translate * multiplier || 0; + } + + const params = swiper.params; + const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); + let { + progress, + isBeginning, + isEnd + } = swiper; + const wasBeginning = isBeginning; + const wasEnd = isEnd; + + if (translatesDiff === 0) { + progress = 0; + isBeginning = true; + isEnd = true; + } else { + progress = (translate - swiper.minTranslate()) / translatesDiff; + isBeginning = progress <= 0; + isEnd = progress >= 1; + } + + Object.assign(swiper, { + progress, + isBeginning, + isEnd + }); + if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate); + + if (isBeginning && !wasBeginning) { + swiper.emit('reachBeginning toEdge'); + } + + if (isEnd && !wasEnd) { + swiper.emit('reachEnd toEdge'); + } + + if (wasBeginning && !isBeginning || wasEnd && !isEnd) { + swiper.emit('fromEdge'); + } + + swiper.emit('progress', progress); + } + + function updateSlidesClasses() { + const swiper = this; + const { + slides, + params, + $wrapperEl, + activeIndex, + realIndex + } = swiper; + const isVirtual = swiper.virtual && params.virtual.enabled; + slides.removeClass(`${params.slideActiveClass} ${params.slideNextClass} ${params.slidePrevClass} ${params.slideDuplicateActiveClass} ${params.slideDuplicateNextClass} ${params.slideDuplicatePrevClass}`); + let activeSlide; + + if (isVirtual) { + activeSlide = swiper.$wrapperEl.find(`.${params.slideClass}[data-swiper-slide-index="${activeIndex}"]`); + } else { + activeSlide = slides.eq(activeIndex); + } // Active classes + + + activeSlide.addClass(params.slideActiveClass); + + if (params.loop) { + // Duplicate to all looped slides + if (activeSlide.hasClass(params.slideDuplicateClass)) { + $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${realIndex}"]`).addClass(params.slideDuplicateActiveClass); + } else { + $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${realIndex}"]`).addClass(params.slideDuplicateActiveClass); + } + } // Next Slide + + + let nextSlide = activeSlide.nextAll(`.${params.slideClass}`).eq(0).addClass(params.slideNextClass); + + if (params.loop && nextSlide.length === 0) { + nextSlide = slides.eq(0); + nextSlide.addClass(params.slideNextClass); + } // Prev Slide + + + let prevSlide = activeSlide.prevAll(`.${params.slideClass}`).eq(0).addClass(params.slidePrevClass); + + if (params.loop && prevSlide.length === 0) { + prevSlide = slides.eq(-1); + prevSlide.addClass(params.slidePrevClass); + } + + if (params.loop) { + // Duplicate to all looped slides + if (nextSlide.hasClass(params.slideDuplicateClass)) { + $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`).addClass(params.slideDuplicateNextClass); + } else { + $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`).addClass(params.slideDuplicateNextClass); + } + + if (prevSlide.hasClass(params.slideDuplicateClass)) { + $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`).addClass(params.slideDuplicatePrevClass); + } else { + $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`).addClass(params.slideDuplicatePrevClass); + } + } + + swiper.emitSlidesClasses(); + } + + function updateActiveIndex(newActiveIndex) { + const swiper = this; + const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; + const { + slidesGrid, + snapGrid, + params, + activeIndex: previousIndex, + realIndex: previousRealIndex, + snapIndex: previousSnapIndex + } = swiper; + let activeIndex = newActiveIndex; + let snapIndex; + + if (typeof activeIndex === 'undefined') { + for (let i = 0; i < slidesGrid.length; i += 1) { + if (typeof slidesGrid[i + 1] !== 'undefined') { + if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) { + activeIndex = i; + } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) { + activeIndex = i + 1; + } + } else if (translate >= slidesGrid[i]) { + activeIndex = i; + } + } // Normalize slideIndex + + + if (params.normalizeSlideIndex) { + if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0; + } + } + + if (snapGrid.indexOf(translate) >= 0) { + snapIndex = snapGrid.indexOf(translate); + } else { + const skip = Math.min(params.slidesPerGroupSkip, activeIndex); + snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup); + } + + if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1; + + if (activeIndex === previousIndex) { + if (snapIndex !== previousSnapIndex) { + swiper.snapIndex = snapIndex; + swiper.emit('snapIndexChange'); + } + + return; + } // Get real index + + + const realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10); + Object.assign(swiper, { + snapIndex, + realIndex, + previousIndex, + activeIndex + }); + swiper.emit('activeIndexChange'); + swiper.emit('snapIndexChange'); + + if (previousRealIndex !== realIndex) { + swiper.emit('realIndexChange'); + } + + if (swiper.initialized || swiper.params.runCallbacksOnInit) { + swiper.emit('slideChange'); + } + } + + function updateClickedSlide(e) { + const swiper = this; + const params = swiper.params; + const slide = $(e).closest(`.${params.slideClass}`)[0]; + let slideFound = false; + let slideIndex; + + if (slide) { + for (let i = 0; i < swiper.slides.length; i += 1) { + if (swiper.slides[i] === slide) { + slideFound = true; + slideIndex = i; + break; + } + } + } + + if (slide && slideFound) { + swiper.clickedSlide = slide; + + if (swiper.virtual && swiper.params.virtual.enabled) { + swiper.clickedIndex = parseInt($(slide).attr('data-swiper-slide-index'), 10); + } else { + swiper.clickedIndex = slideIndex; + } + } else { + swiper.clickedSlide = undefined; + swiper.clickedIndex = undefined; + return; + } + + if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) { + swiper.slideToClickedSlide(); + } + } + + var update = { + updateSize, + updateSlides, + updateAutoHeight, + updateSlidesOffset, + updateSlidesProgress, + updateProgress, + updateSlidesClasses, + updateActiveIndex, + updateClickedSlide + }; + + function getSwiperTranslate(axis) { + if (axis === void 0) { + axis = this.isHorizontal() ? 'x' : 'y'; + } + + const swiper = this; + const { + params, + rtlTranslate: rtl, + translate, + $wrapperEl + } = swiper; + + if (params.virtualTranslate) { + return rtl ? -translate : translate; + } + + if (params.cssMode) { + return translate; + } + + let currentTranslate = getTranslate($wrapperEl[0], axis); + if (rtl) currentTranslate = -currentTranslate; + return currentTranslate || 0; + } + + function setTranslate(translate, byController) { + const swiper = this; + const { + rtlTranslate: rtl, + params, + $wrapperEl, + wrapperEl, + progress + } = swiper; + let x = 0; + let y = 0; + const z = 0; + + if (swiper.isHorizontal()) { + x = rtl ? -translate : translate; + } else { + y = translate; + } + + if (params.roundLengths) { + x = Math.floor(x); + y = Math.floor(y); + } + + if (params.cssMode) { + wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y; + } else if (!params.virtualTranslate) { + $wrapperEl.transform(`translate3d(${x}px, ${y}px, ${z}px)`); + } + + swiper.previousTranslate = swiper.translate; + swiper.translate = swiper.isHorizontal() ? x : y; // Check if we need to update progress + + let newProgress; + const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); + + if (translatesDiff === 0) { + newProgress = 0; + } else { + newProgress = (translate - swiper.minTranslate()) / translatesDiff; + } + + if (newProgress !== progress) { + swiper.updateProgress(translate); + } + + swiper.emit('setTranslate', swiper.translate, byController); + } + + function minTranslate() { + return -this.snapGrid[0]; + } + + function maxTranslate() { + return -this.snapGrid[this.snapGrid.length - 1]; + } + + function translateTo(translate, speed, runCallbacks, translateBounds, internal) { + if (translate === void 0) { + translate = 0; + } + + if (speed === void 0) { + speed = this.params.speed; + } + + if (runCallbacks === void 0) { + runCallbacks = true; + } + + if (translateBounds === void 0) { + translateBounds = true; + } + + const swiper = this; + const { + params, + wrapperEl + } = swiper; + + if (swiper.animating && params.preventInteractionOnTransition) { + return false; + } + + const minTranslate = swiper.minTranslate(); + const maxTranslate = swiper.maxTranslate(); + let newTranslate; + if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate; // Update progress + + swiper.updateProgress(newTranslate); + + if (params.cssMode) { + const isH = swiper.isHorizontal(); + + if (speed === 0) { + wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate; + } else { + if (!swiper.support.smoothScroll) { + animateCSSModeScroll({ + swiper, + targetPosition: -newTranslate, + side: isH ? 'left' : 'top' + }); + return true; + } + + wrapperEl.scrollTo({ + [isH ? 'left' : 'top']: -newTranslate, + behavior: 'smooth' + }); + } + + return true; + } + + if (speed === 0) { + swiper.setTransition(0); + swiper.setTranslate(newTranslate); + + if (runCallbacks) { + swiper.emit('beforeTransitionStart', speed, internal); + swiper.emit('transitionEnd'); + } + } else { + swiper.setTransition(speed); + swiper.setTranslate(newTranslate); + + if (runCallbacks) { + swiper.emit('beforeTransitionStart', speed, internal); + swiper.emit('transitionStart'); + } + + if (!swiper.animating) { + swiper.animating = true; + + if (!swiper.onTranslateToWrapperTransitionEnd) { + swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) { + if (!swiper || swiper.destroyed) return; + if (e.target !== this) return; + swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd); + swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd); + swiper.onTranslateToWrapperTransitionEnd = null; + delete swiper.onTranslateToWrapperTransitionEnd; + + if (runCallbacks) { + swiper.emit('transitionEnd'); + } + }; + } + + swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd); + swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd); + } + } + + return true; + } + + var translate = { + getTranslate: getSwiperTranslate, + setTranslate, + minTranslate, + maxTranslate, + translateTo + }; + + function setTransition(duration, byController) { + const swiper = this; + + if (!swiper.params.cssMode) { + swiper.$wrapperEl.transition(duration); + } + + swiper.emit('setTransition', duration, byController); + } + + function transitionEmit(_ref) { + let { + swiper, + runCallbacks, + direction, + step + } = _ref; + const { + activeIndex, + previousIndex + } = swiper; + let dir = direction; + + if (!dir) { + if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset'; + } + + swiper.emit(`transition${step}`); + + if (runCallbacks && activeIndex !== previousIndex) { + if (dir === 'reset') { + swiper.emit(`slideResetTransition${step}`); + return; + } + + swiper.emit(`slideChangeTransition${step}`); + + if (dir === 'next') { + swiper.emit(`slideNextTransition${step}`); + } else { + swiper.emit(`slidePrevTransition${step}`); + } + } + } + + function transitionStart(runCallbacks, direction) { + if (runCallbacks === void 0) { + runCallbacks = true; + } + + const swiper = this; + const { + params + } = swiper; + if (params.cssMode) return; + + if (params.autoHeight) { + swiper.updateAutoHeight(); + } + + transitionEmit({ + swiper, + runCallbacks, + direction, + step: 'Start' + }); + } + + function transitionEnd(runCallbacks, direction) { + if (runCallbacks === void 0) { + runCallbacks = true; + } + + const swiper = this; + const { + params + } = swiper; + swiper.animating = false; + if (params.cssMode) return; + swiper.setTransition(0); + transitionEmit({ + swiper, + runCallbacks, + direction, + step: 'End' + }); + } + + var transition = { + setTransition, + transitionStart, + transitionEnd + }; + + function slideTo(index, speed, runCallbacks, internal, initial) { + if (index === void 0) { + index = 0; + } + + if (speed === void 0) { + speed = this.params.speed; + } + + if (runCallbacks === void 0) { + runCallbacks = true; + } + + if (typeof index !== 'number' && typeof index !== 'string') { + throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof index}] given.`); + } + + if (typeof index === 'string') { + /** + * The `index` argument converted from `string` to `number`. + * @type {number} + */ + const indexAsNumber = parseInt(index, 10); + /** + * Determines whether the `index` argument is a valid `number` + * after being converted from the `string` type. + * @type {boolean} + */ + + const isValidNumber = isFinite(indexAsNumber); + + if (!isValidNumber) { + throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${index}] given.`); + } // Knowing that the converted `index` is a valid number, + // we can update the original argument's value. + + + index = indexAsNumber; + } + + const swiper = this; + let slideIndex = index; + if (slideIndex < 0) slideIndex = 0; + const { + params, + snapGrid, + slidesGrid, + previousIndex, + activeIndex, + rtlTranslate: rtl, + wrapperEl, + enabled + } = swiper; + + if (swiper.animating && params.preventInteractionOnTransition || !enabled && !internal && !initial) { + return false; + } + + const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex); + let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup); + if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1; + + if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) { + swiper.emit('beforeSlideChangeStart'); + } + + const translate = -snapGrid[snapIndex]; // Update progress + + swiper.updateProgress(translate); // Normalize slideIndex + + if (params.normalizeSlideIndex) { + for (let i = 0; i < slidesGrid.length; i += 1) { + const normalizedTranslate = -Math.floor(translate * 100); + const normalizedGrid = Math.floor(slidesGrid[i] * 100); + const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100); + + if (typeof slidesGrid[i + 1] !== 'undefined') { + if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) { + slideIndex = i; + } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) { + slideIndex = i + 1; + } + } else if (normalizedTranslate >= normalizedGrid) { + slideIndex = i; + } + } + } // Directions locks + + + if (swiper.initialized && slideIndex !== activeIndex) { + if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) { + return false; + } + + if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) { + if ((activeIndex || 0) !== slideIndex) return false; + } + } + + let direction; + if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset'; // Update Index + + if (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate) { + swiper.updateActiveIndex(slideIndex); // Update Height + + if (params.autoHeight) { + swiper.updateAutoHeight(); + } + + swiper.updateSlidesClasses(); + + if (params.effect !== 'slide') { + swiper.setTranslate(translate); + } + + if (direction !== 'reset') { + swiper.transitionStart(runCallbacks, direction); + swiper.transitionEnd(runCallbacks, direction); + } + + return false; + } + + if (params.cssMode) { + const isH = swiper.isHorizontal(); + const t = rtl ? translate : -translate; + + if (speed === 0) { + const isVirtual = swiper.virtual && swiper.params.virtual.enabled; + + if (isVirtual) { + swiper.wrapperEl.style.scrollSnapType = 'none'; + swiper._immediateVirtual = true; + } + + wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t; + + if (isVirtual) { + requestAnimationFrame(() => { + swiper.wrapperEl.style.scrollSnapType = ''; + swiper._swiperImmediateVirtual = false; + }); + } + } else { + if (!swiper.support.smoothScroll) { + animateCSSModeScroll({ + swiper, + targetPosition: t, + side: isH ? 'left' : 'top' + }); + return true; + } + + wrapperEl.scrollTo({ + [isH ? 'left' : 'top']: t, + behavior: 'smooth' + }); + } + + return true; + } + + swiper.setTransition(speed); + swiper.setTranslate(translate); + swiper.updateActiveIndex(slideIndex); + swiper.updateSlidesClasses(); + swiper.emit('beforeTransitionStart', speed, internal); + swiper.transitionStart(runCallbacks, direction); + + if (speed === 0) { + swiper.transitionEnd(runCallbacks, direction); + } else if (!swiper.animating) { + swiper.animating = true; + + if (!swiper.onSlideToWrapperTransitionEnd) { + swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) { + if (!swiper || swiper.destroyed) return; + if (e.target !== this) return; + swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd); + swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd); + swiper.onSlideToWrapperTransitionEnd = null; + delete swiper.onSlideToWrapperTransitionEnd; + swiper.transitionEnd(runCallbacks, direction); + }; + } + + swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd); + swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd); + } + + return true; + } + + function slideToLoop(index, speed, runCallbacks, internal) { + if (index === void 0) { + index = 0; + } + + if (speed === void 0) { + speed = this.params.speed; + } + + if (runCallbacks === void 0) { + runCallbacks = true; + } + + const swiper = this; + let newIndex = index; + + if (swiper.params.loop) { + newIndex += swiper.loopedSlides; + } + + return swiper.slideTo(newIndex, speed, runCallbacks, internal); + } + + /* eslint no-unused-vars: "off" */ + function slideNext(speed, runCallbacks, internal) { + if (speed === void 0) { + speed = this.params.speed; + } + + if (runCallbacks === void 0) { + runCallbacks = true; + } + + const swiper = this; + const { + animating, + enabled, + params + } = swiper; + if (!enabled) return swiper; + let perGroup = params.slidesPerGroup; + + if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) { + perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1); + } + + const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup; + + if (params.loop) { + if (animating && params.loopPreventsSlide) return false; + swiper.loopFix(); // eslint-disable-next-line + + swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; + } + + if (params.rewind && swiper.isEnd) { + return swiper.slideTo(0, speed, runCallbacks, internal); + } + + return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal); + } + + /* eslint no-unused-vars: "off" */ + function slidePrev(speed, runCallbacks, internal) { + if (speed === void 0) { + speed = this.params.speed; + } + + if (runCallbacks === void 0) { + runCallbacks = true; + } + + const swiper = this; + const { + params, + animating, + snapGrid, + slidesGrid, + rtlTranslate, + enabled + } = swiper; + if (!enabled) return swiper; + + if (params.loop) { + if (animating && params.loopPreventsSlide) return false; + swiper.loopFix(); // eslint-disable-next-line + + swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; + } + + const translate = rtlTranslate ? swiper.translate : -swiper.translate; + + function normalize(val) { + if (val < 0) return -Math.floor(Math.abs(val)); + return Math.floor(val); + } + + const normalizedTranslate = normalize(translate); + const normalizedSnapGrid = snapGrid.map(val => normalize(val)); + let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1]; + + if (typeof prevSnap === 'undefined' && params.cssMode) { + let prevSnapIndex; + snapGrid.forEach((snap, snapIndex) => { + if (normalizedTranslate >= snap) { + // prevSnap = snap; + prevSnapIndex = snapIndex; + } + }); + + if (typeof prevSnapIndex !== 'undefined') { + prevSnap = snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex]; + } + } + + let prevIndex = 0; + + if (typeof prevSnap !== 'undefined') { + prevIndex = slidesGrid.indexOf(prevSnap); + if (prevIndex < 0) prevIndex = swiper.activeIndex - 1; + + if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) { + prevIndex = prevIndex - swiper.slidesPerViewDynamic('previous', true) + 1; + prevIndex = Math.max(prevIndex, 0); + } + } + + if (params.rewind && swiper.isBeginning) { + const lastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1; + return swiper.slideTo(lastIndex, speed, runCallbacks, internal); + } + + return swiper.slideTo(prevIndex, speed, runCallbacks, internal); + } + + /* eslint no-unused-vars: "off" */ + function slideReset(speed, runCallbacks, internal) { + if (speed === void 0) { + speed = this.params.speed; + } + + if (runCallbacks === void 0) { + runCallbacks = true; + } + + const swiper = this; + return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal); + } + + /* eslint no-unused-vars: "off" */ + function slideToClosest(speed, runCallbacks, internal, threshold) { + if (speed === void 0) { + speed = this.params.speed; + } + + if (runCallbacks === void 0) { + runCallbacks = true; + } + + if (threshold === void 0) { + threshold = 0.5; + } + + const swiper = this; + let index = swiper.activeIndex; + const skip = Math.min(swiper.params.slidesPerGroupSkip, index); + const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup); + const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; + + if (translate >= swiper.snapGrid[snapIndex]) { + // The current translate is on or after the current snap index, so the choice + // is between the current index and the one after it. + const currentSnap = swiper.snapGrid[snapIndex]; + const nextSnap = swiper.snapGrid[snapIndex + 1]; + + if (translate - currentSnap > (nextSnap - currentSnap) * threshold) { + index += swiper.params.slidesPerGroup; + } + } else { + // The current translate is before the current snap index, so the choice + // is between the current index and the one before it. + const prevSnap = swiper.snapGrid[snapIndex - 1]; + const currentSnap = swiper.snapGrid[snapIndex]; + + if (translate - prevSnap <= (currentSnap - prevSnap) * threshold) { + index -= swiper.params.slidesPerGroup; + } + } + + index = Math.max(index, 0); + index = Math.min(index, swiper.slidesGrid.length - 1); + return swiper.slideTo(index, speed, runCallbacks, internal); + } + + function slideToClickedSlide() { + const swiper = this; + const { + params, + $wrapperEl + } = swiper; + const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView; + let slideToIndex = swiper.clickedIndex; + let realIndex; + + if (params.loop) { + if (swiper.animating) return; + realIndex = parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'), 10); + + if (params.centeredSlides) { + if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 || slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) { + swiper.loopFix(); + slideToIndex = $wrapperEl.children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`).eq(0).index(); + nextTick(() => { + swiper.slideTo(slideToIndex); + }); + } else { + swiper.slideTo(slideToIndex); + } + } else if (slideToIndex > swiper.slides.length - slidesPerView) { + swiper.loopFix(); + slideToIndex = $wrapperEl.children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`).eq(0).index(); + nextTick(() => { + swiper.slideTo(slideToIndex); + }); + } else { + swiper.slideTo(slideToIndex); + } + } else { + swiper.slideTo(slideToIndex); + } + } + + var slide = { + slideTo, + slideToLoop, + slideNext, + slidePrev, + slideReset, + slideToClosest, + slideToClickedSlide + }; + + function loopCreate() { + const swiper = this; + const document = getDocument(); + const { + params, + $wrapperEl + } = swiper; // Remove duplicated slides + + const $selector = $wrapperEl.children().length > 0 ? $($wrapperEl.children()[0].parentNode) : $wrapperEl; + $selector.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove(); + let slides = $selector.children(`.${params.slideClass}`); + + if (params.loopFillGroupWithBlank) { + const blankSlidesNum = params.slidesPerGroup - slides.length % params.slidesPerGroup; + + if (blankSlidesNum !== params.slidesPerGroup) { + for (let i = 0; i < blankSlidesNum; i += 1) { + const blankNode = $(document.createElement('div')).addClass(`${params.slideClass} ${params.slideBlankClass}`); + $selector.append(blankNode); + } + + slides = $selector.children(`.${params.slideClass}`); + } + } + + if (params.slidesPerView === 'auto' && !params.loopedSlides) params.loopedSlides = slides.length; + swiper.loopedSlides = Math.ceil(parseFloat(params.loopedSlides || params.slidesPerView, 10)); + swiper.loopedSlides += params.loopAdditionalSlides; + + if (swiper.loopedSlides > slides.length) { + swiper.loopedSlides = slides.length; + } + + const prependSlides = []; + const appendSlides = []; + slides.each((el, index) => { + const slide = $(el); + + if (index < swiper.loopedSlides) { + appendSlides.push(el); + } + + if (index < slides.length && index >= slides.length - swiper.loopedSlides) { + prependSlides.push(el); + } + + slide.attr('data-swiper-slide-index', index); + }); + + for (let i = 0; i < appendSlides.length; i += 1) { + $selector.append($(appendSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass)); + } + + for (let i = prependSlides.length - 1; i >= 0; i -= 1) { + $selector.prepend($(prependSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass)); + } + } + + function loopFix() { + const swiper = this; + swiper.emit('beforeLoopFix'); + const { + activeIndex, + slides, + loopedSlides, + allowSlidePrev, + allowSlideNext, + snapGrid, + rtlTranslate: rtl + } = swiper; + let newIndex; + swiper.allowSlidePrev = true; + swiper.allowSlideNext = true; + const snapTranslate = -snapGrid[activeIndex]; + const diff = snapTranslate - swiper.getTranslate(); // Fix For Negative Oversliding + + if (activeIndex < loopedSlides) { + newIndex = slides.length - loopedSlides * 3 + activeIndex; + newIndex += loopedSlides; + const slideChanged = swiper.slideTo(newIndex, 0, false, true); + + if (slideChanged && diff !== 0) { + swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff); + } + } else if (activeIndex >= slides.length - loopedSlides) { + // Fix For Positive Oversliding + newIndex = -slides.length + activeIndex + loopedSlides; + newIndex += loopedSlides; + const slideChanged = swiper.slideTo(newIndex, 0, false, true); + + if (slideChanged && diff !== 0) { + swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff); + } + } + + swiper.allowSlidePrev = allowSlidePrev; + swiper.allowSlideNext = allowSlideNext; + swiper.emit('loopFix'); + } + + function loopDestroy() { + const swiper = this; + const { + $wrapperEl, + params, + slides + } = swiper; + $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass},.${params.slideClass}.${params.slideBlankClass}`).remove(); + slides.removeAttr('data-swiper-slide-index'); + } + + var loop = { + loopCreate, + loopFix, + loopDestroy + }; + + function setGrabCursor(moving) { + const swiper = this; + if (swiper.support.touch || !swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return; + const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl; + el.style.cursor = 'move'; + el.style.cursor = moving ? 'grabbing' : 'grab'; + } + + function unsetGrabCursor() { + const swiper = this; + + if (swiper.support.touch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) { + return; + } + + swiper[swiper.params.touchEventsTarget === 'container' ? 'el' : 'wrapperEl'].style.cursor = ''; + } + + var grabCursor = { + setGrabCursor, + unsetGrabCursor + }; + + function closestElement(selector, base) { + if (base === void 0) { + base = this; + } + + function __closestFrom(el) { + if (!el || el === getDocument() || el === getWindow()) return null; + if (el.assignedSlot) el = el.assignedSlot; + const found = el.closest(selector); + return found || __closestFrom(el.getRootNode().host); + } + + return __closestFrom(base); + } + + function onTouchStart(event) { + const swiper = this; + const document = getDocument(); + const window = getWindow(); + const data = swiper.touchEventsData; + const { + params, + touches, + enabled + } = swiper; + if (!enabled) return; + + if (swiper.animating && params.preventInteractionOnTransition) { + return; + } + + if (!swiper.animating && params.cssMode && params.loop) { + swiper.loopFix(); + } + + let e = event; + if (e.originalEvent) e = e.originalEvent; + let $targetEl = $(e.target); + + if (params.touchEventsTarget === 'wrapper') { + if (!$targetEl.closest(swiper.wrapperEl).length) return; + } + + data.isTouchEvent = e.type === 'touchstart'; + if (!data.isTouchEvent && 'which' in e && e.which === 3) return; + if (!data.isTouchEvent && 'button' in e && e.button > 0) return; + if (data.isTouched && data.isMoved) return; // change target el for shadow root component + + const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== ''; + + if (swipingClassHasValue && e.target && e.target.shadowRoot && event.path && event.path[0]) { + $targetEl = $(event.path[0]); + } + + const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`; + const isTargetShadow = !!(e.target && e.target.shadowRoot); // use closestElement for shadow root element to get the actual closest for nested shadow root element + + if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, e.target) : $targetEl.closest(noSwipingSelector)[0])) { + swiper.allowClick = true; + return; + } + + if (params.swipeHandler) { + if (!$targetEl.closest(params.swipeHandler)[0]) return; + } + + touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + const startX = touches.currentX; + const startY = touches.currentY; // Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore + + const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection; + const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold; + + if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window.innerWidth - edgeSwipeThreshold)) { + if (edgeSwipeDetection === 'prevent') { + event.preventDefault(); + } else { + return; + } + } + + Object.assign(data, { + isTouched: true, + isMoved: false, + allowTouchCallbacks: true, + isScrolling: undefined, + startMoving: undefined + }); + touches.startX = startX; + touches.startY = startY; + data.touchStartTime = now(); + swiper.allowClick = true; + swiper.updateSize(); + swiper.swipeDirection = undefined; + if (params.threshold > 0) data.allowThresholdMove = false; + + if (e.type !== 'touchstart') { + let preventDefault = true; + + if ($targetEl.is(data.focusableElements)) { + preventDefault = false; + + if ($targetEl[0].nodeName === 'SELECT') { + data.isTouched = false; + } + } + + if (document.activeElement && $(document.activeElement).is(data.focusableElements) && document.activeElement !== $targetEl[0]) { + document.activeElement.blur(); + } + + const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault; + + if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !$targetEl[0].isContentEditable) { + e.preventDefault(); + } + } + + if (swiper.params.freeMode && swiper.params.freeMode.enabled && swiper.freeMode && swiper.animating && !params.cssMode) { + swiper.freeMode.onTouchStart(); + } + + swiper.emit('touchStart', e); + } + + function onTouchMove(event) { + const document = getDocument(); + const swiper = this; + const data = swiper.touchEventsData; + const { + params, + touches, + rtlTranslate: rtl, + enabled + } = swiper; + if (!enabled) return; + let e = event; + if (e.originalEvent) e = e.originalEvent; + + if (!data.isTouched) { + if (data.startMoving && data.isScrolling) { + swiper.emit('touchMoveOpposite', e); + } + + return; + } + + if (data.isTouchEvent && e.type !== 'touchmove') return; + const targetTouch = e.type === 'touchmove' && e.targetTouches && (e.targetTouches[0] || e.changedTouches[0]); + const pageX = e.type === 'touchmove' ? targetTouch.pageX : e.pageX; + const pageY = e.type === 'touchmove' ? targetTouch.pageY : e.pageY; + + if (e.preventedByNestedSwiper) { + touches.startX = pageX; + touches.startY = pageY; + return; + } + + if (!swiper.allowTouchMove) { + if (!$(e.target).is(data.focusableElements)) { + swiper.allowClick = false; + } + + if (data.isTouched) { + Object.assign(touches, { + startX: pageX, + startY: pageY, + currentX: pageX, + currentY: pageY + }); + data.touchStartTime = now(); + } + + return; + } + + if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) { + if (swiper.isVertical()) { + // Vertical + if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) { + data.isTouched = false; + data.isMoved = false; + return; + } + } else if (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate()) { + return; + } + } + + if (data.isTouchEvent && document.activeElement) { + if (e.target === document.activeElement && $(e.target).is(data.focusableElements)) { + data.isMoved = true; + swiper.allowClick = false; + return; + } + } + + if (data.allowTouchCallbacks) { + swiper.emit('touchMove', e); + } + + if (e.targetTouches && e.targetTouches.length > 1) return; + touches.currentX = pageX; + touches.currentY = pageY; + const diffX = touches.currentX - touches.startX; + const diffY = touches.currentY - touches.startY; + if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) return; + + if (typeof data.isScrolling === 'undefined') { + let touchAngle; + + if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) { + data.isScrolling = false; + } else { + // eslint-disable-next-line + if (diffX * diffX + diffY * diffY >= 25) { + touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI; + data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle; + } + } + } + + if (data.isScrolling) { + swiper.emit('touchMoveOpposite', e); + } + + if (typeof data.startMoving === 'undefined') { + if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) { + data.startMoving = true; + } + } + + if (data.isScrolling) { + data.isTouched = false; + return; + } + + if (!data.startMoving) { + return; + } + + swiper.allowClick = false; + + if (!params.cssMode && e.cancelable) { + e.preventDefault(); + } + + if (params.touchMoveStopPropagation && !params.nested) { + e.stopPropagation(); + } + + if (!data.isMoved) { + if (params.loop && !params.cssMode) { + swiper.loopFix(); + } + + data.startTranslate = swiper.getTranslate(); + swiper.setTransition(0); + + if (swiper.animating) { + swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend'); + } + + data.allowMomentumBounce = false; // Grab Cursor + + if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { + swiper.setGrabCursor(true); + } + + swiper.emit('sliderFirstMove', e); + } + + swiper.emit('sliderMove', e); + data.isMoved = true; + let diff = swiper.isHorizontal() ? diffX : diffY; + touches.diff = diff; + diff *= params.touchRatio; + if (rtl) diff = -diff; + swiper.swipeDirection = diff > 0 ? 'prev' : 'next'; + data.currentTranslate = diff + data.startTranslate; + let disableParentSwiper = true; + let resistanceRatio = params.resistanceRatio; + + if (params.touchReleaseOnEdges) { + resistanceRatio = 0; + } + + if (diff > 0 && data.currentTranslate > swiper.minTranslate()) { + disableParentSwiper = false; + if (params.resistance) data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio; + } else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) { + disableParentSwiper = false; + if (params.resistance) data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio; + } + + if (disableParentSwiper) { + e.preventedByNestedSwiper = true; + } // Directions locks + + + if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) { + data.currentTranslate = data.startTranslate; + } + + if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) { + data.currentTranslate = data.startTranslate; + } + + if (!swiper.allowSlidePrev && !swiper.allowSlideNext) { + data.currentTranslate = data.startTranslate; + } // Threshold + + + if (params.threshold > 0) { + if (Math.abs(diff) > params.threshold || data.allowThresholdMove) { + if (!data.allowThresholdMove) { + data.allowThresholdMove = true; + touches.startX = touches.currentX; + touches.startY = touches.currentY; + data.currentTranslate = data.startTranslate; + touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY; + return; + } + } else { + data.currentTranslate = data.startTranslate; + return; + } + } + + if (!params.followFinger || params.cssMode) return; // Update active index in free mode + + if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) { + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + } + + if (swiper.params.freeMode && params.freeMode.enabled && swiper.freeMode) { + swiper.freeMode.onTouchMove(); + } // Update progress + + + swiper.updateProgress(data.currentTranslate); // Update translate + + swiper.setTranslate(data.currentTranslate); + } + + function onTouchEnd(event) { + const swiper = this; + const data = swiper.touchEventsData; + const { + params, + touches, + rtlTranslate: rtl, + slidesGrid, + enabled + } = swiper; + if (!enabled) return; + let e = event; + if (e.originalEvent) e = e.originalEvent; + + if (data.allowTouchCallbacks) { + swiper.emit('touchEnd', e); + } + + data.allowTouchCallbacks = false; + + if (!data.isTouched) { + if (data.isMoved && params.grabCursor) { + swiper.setGrabCursor(false); + } + + data.isMoved = false; + data.startMoving = false; + return; + } // Return Grab Cursor + + + if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { + swiper.setGrabCursor(false); + } // Time diff + + + const touchEndTime = now(); + const timeDiff = touchEndTime - data.touchStartTime; // Tap, doubleTap, Click + + if (swiper.allowClick) { + const pathTree = e.path || e.composedPath && e.composedPath(); + swiper.updateClickedSlide(pathTree && pathTree[0] || e.target); + swiper.emit('tap click', e); + + if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) { + swiper.emit('doubleTap doubleClick', e); + } + } + + data.lastClickTime = now(); + nextTick(() => { + if (!swiper.destroyed) swiper.allowClick = true; + }); + + if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) { + data.isTouched = false; + data.isMoved = false; + data.startMoving = false; + return; + } + + data.isTouched = false; + data.isMoved = false; + data.startMoving = false; + let currentPos; + + if (params.followFinger) { + currentPos = rtl ? swiper.translate : -swiper.translate; + } else { + currentPos = -data.currentTranslate; + } + + if (params.cssMode) { + return; + } + + if (swiper.params.freeMode && params.freeMode.enabled) { + swiper.freeMode.onTouchEnd({ + currentPos + }); + return; + } // Find current slide + + + let stopIndex = 0; + let groupSize = swiper.slidesSizesGrid[0]; + + for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) { + const increment = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup; + + if (typeof slidesGrid[i + increment] !== 'undefined') { + if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) { + stopIndex = i; + groupSize = slidesGrid[i + increment] - slidesGrid[i]; + } + } else if (currentPos >= slidesGrid[i]) { + stopIndex = i; + groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2]; + } + } + + let rewindFirstIndex = null; + let rewindLastIndex = null; + + if (params.rewind) { + if (swiper.isBeginning) { + rewindLastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1; + } else if (swiper.isEnd) { + rewindFirstIndex = 0; + } + } // Find current slide size + + + const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize; + const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup; + + if (timeDiff > params.longSwipesMs) { + // Long touches + if (!params.longSwipes) { + swiper.slideTo(swiper.activeIndex); + return; + } + + if (swiper.swipeDirection === 'next') { + if (ratio >= params.longSwipesRatio) swiper.slideTo(params.rewind && swiper.isEnd ? rewindFirstIndex : stopIndex + increment);else swiper.slideTo(stopIndex); + } + + if (swiper.swipeDirection === 'prev') { + if (ratio > 1 - params.longSwipesRatio) { + swiper.slideTo(stopIndex + increment); + } else if (rewindLastIndex !== null && ratio < 0 && Math.abs(ratio) > params.longSwipesRatio) { + swiper.slideTo(rewindLastIndex); + } else { + swiper.slideTo(stopIndex); + } + } + } else { + // Short swipes + if (!params.shortSwipes) { + swiper.slideTo(swiper.activeIndex); + return; + } + + const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl); + + if (!isNavButtonTarget) { + if (swiper.swipeDirection === 'next') { + swiper.slideTo(rewindFirstIndex !== null ? rewindFirstIndex : stopIndex + increment); + } + + if (swiper.swipeDirection === 'prev') { + swiper.slideTo(rewindLastIndex !== null ? rewindLastIndex : stopIndex); + } + } else if (e.target === swiper.navigation.nextEl) { + swiper.slideTo(stopIndex + increment); + } else { + swiper.slideTo(stopIndex); + } + } + } + + function onResize() { + const swiper = this; + const { + params, + el + } = swiper; + if (el && el.offsetWidth === 0) return; // Breakpoints + + if (params.breakpoints) { + swiper.setBreakpoint(); + } // Save locks + + + const { + allowSlideNext, + allowSlidePrev, + snapGrid + } = swiper; // Disable locks on resize + + swiper.allowSlideNext = true; + swiper.allowSlidePrev = true; + swiper.updateSize(); + swiper.updateSlides(); + swiper.updateSlidesClasses(); + + if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides) { + swiper.slideTo(swiper.slides.length - 1, 0, false, true); + } else { + swiper.slideTo(swiper.activeIndex, 0, false, true); + } + + if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) { + swiper.autoplay.run(); + } // Return locks after resize + + + swiper.allowSlidePrev = allowSlidePrev; + swiper.allowSlideNext = allowSlideNext; + + if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) { + swiper.checkOverflow(); + } + } + + function onClick(e) { + const swiper = this; + if (!swiper.enabled) return; + + if (!swiper.allowClick) { + if (swiper.params.preventClicks) e.preventDefault(); + + if (swiper.params.preventClicksPropagation && swiper.animating) { + e.stopPropagation(); + e.stopImmediatePropagation(); + } + } + } + + function onScroll() { + const swiper = this; + const { + wrapperEl, + rtlTranslate, + enabled + } = swiper; + if (!enabled) return; + swiper.previousTranslate = swiper.translate; + + if (swiper.isHorizontal()) { + swiper.translate = -wrapperEl.scrollLeft; + } else { + swiper.translate = -wrapperEl.scrollTop; + } // eslint-disable-next-line + + + if (swiper.translate === 0) swiper.translate = 0; + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + let newProgress; + const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); + + if (translatesDiff === 0) { + newProgress = 0; + } else { + newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff; + } + + if (newProgress !== swiper.progress) { + swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate); + } + + swiper.emit('setTranslate', swiper.translate, false); + } + + let dummyEventAttached = false; + + function dummyEventListener() {} + + const events = (swiper, method) => { + const document = getDocument(); + const { + params, + touchEvents, + el, + wrapperEl, + device, + support + } = swiper; + const capture = !!params.nested; + const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener'; + const swiperMethod = method; // Touch Events + + if (!support.touch) { + el[domMethod](touchEvents.start, swiper.onTouchStart, false); + document[domMethod](touchEvents.move, swiper.onTouchMove, capture); + document[domMethod](touchEvents.end, swiper.onTouchEnd, false); + } else { + const passiveListener = touchEvents.start === 'touchstart' && support.passiveListener && params.passiveListeners ? { + passive: true, + capture: false + } : false; + el[domMethod](touchEvents.start, swiper.onTouchStart, passiveListener); + el[domMethod](touchEvents.move, swiper.onTouchMove, support.passiveListener ? { + passive: false, + capture + } : capture); + el[domMethod](touchEvents.end, swiper.onTouchEnd, passiveListener); + + if (touchEvents.cancel) { + el[domMethod](touchEvents.cancel, swiper.onTouchEnd, passiveListener); + } + } // Prevent Links Clicks + + + if (params.preventClicks || params.preventClicksPropagation) { + el[domMethod]('click', swiper.onClick, true); + } + + if (params.cssMode) { + wrapperEl[domMethod]('scroll', swiper.onScroll); + } // Resize handler + + + if (params.updateOnWindowResize) { + swiper[swiperMethod](device.ios || device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', onResize, true); + } else { + swiper[swiperMethod]('observerUpdate', onResize, true); + } + }; + + function attachEvents() { + const swiper = this; + const document = getDocument(); + const { + params, + support + } = swiper; + swiper.onTouchStart = onTouchStart.bind(swiper); + swiper.onTouchMove = onTouchMove.bind(swiper); + swiper.onTouchEnd = onTouchEnd.bind(swiper); + + if (params.cssMode) { + swiper.onScroll = onScroll.bind(swiper); + } + + swiper.onClick = onClick.bind(swiper); + + if (support.touch && !dummyEventAttached) { + document.addEventListener('touchstart', dummyEventListener); + dummyEventAttached = true; + } + + events(swiper, 'on'); + } + + function detachEvents() { + const swiper = this; + events(swiper, 'off'); + } + + var events$1 = { + attachEvents, + detachEvents + }; + + const isGridEnabled = (swiper, params) => { + return swiper.grid && params.grid && params.grid.rows > 1; + }; + + function setBreakpoint() { + const swiper = this; + const { + activeIndex, + initialized, + loopedSlides = 0, + params, + $el + } = swiper; + const breakpoints = params.breakpoints; + if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return; // Get breakpoint for window width and update parameters + + const breakpoint = swiper.getBreakpoint(breakpoints, swiper.params.breakpointsBase, swiper.el); + if (!breakpoint || swiper.currentBreakpoint === breakpoint) return; + const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined; + const breakpointParams = breakpointOnlyParams || swiper.originalParams; + const wasMultiRow = isGridEnabled(swiper, params); + const isMultiRow = isGridEnabled(swiper, breakpointParams); + const wasEnabled = params.enabled; + + if (wasMultiRow && !isMultiRow) { + $el.removeClass(`${params.containerModifierClass}grid ${params.containerModifierClass}grid-column`); + swiper.emitContainerClasses(); + } else if (!wasMultiRow && isMultiRow) { + $el.addClass(`${params.containerModifierClass}grid`); + + if (breakpointParams.grid.fill && breakpointParams.grid.fill === 'column' || !breakpointParams.grid.fill && params.grid.fill === 'column') { + $el.addClass(`${params.containerModifierClass}grid-column`); + } + + swiper.emitContainerClasses(); + } + + const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction; + const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged); + + if (directionChanged && initialized) { + swiper.changeDirection(); + } + + extend(swiper.params, breakpointParams); + const isEnabled = swiper.params.enabled; + Object.assign(swiper, { + allowTouchMove: swiper.params.allowTouchMove, + allowSlideNext: swiper.params.allowSlideNext, + allowSlidePrev: swiper.params.allowSlidePrev + }); + + if (wasEnabled && !isEnabled) { + swiper.disable(); + } else if (!wasEnabled && isEnabled) { + swiper.enable(); + } + + swiper.currentBreakpoint = breakpoint; + swiper.emit('_beforeBreakpoint', breakpointParams); + + if (needsReLoop && initialized) { + swiper.loopDestroy(); + swiper.loopCreate(); + swiper.updateSlides(); + swiper.slideTo(activeIndex - loopedSlides + swiper.loopedSlides, 0, false); + } + + swiper.emit('breakpoint', breakpointParams); + } + + function getBreakpoint(breakpoints, base, containerEl) { + if (base === void 0) { + base = 'window'; + } + + if (!breakpoints || base === 'container' && !containerEl) return undefined; + let breakpoint = false; + const window = getWindow(); + const currentHeight = base === 'window' ? window.innerHeight : containerEl.clientHeight; + const points = Object.keys(breakpoints).map(point => { + if (typeof point === 'string' && point.indexOf('@') === 0) { + const minRatio = parseFloat(point.substr(1)); + const value = currentHeight * minRatio; + return { + value, + point + }; + } + + return { + value: point, + point + }; + }); + points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10)); + + for (let i = 0; i < points.length; i += 1) { + const { + point, + value + } = points[i]; + + if (base === 'window') { + if (window.matchMedia(`(min-width: ${value}px)`).matches) { + breakpoint = point; + } + } else if (value <= containerEl.clientWidth) { + breakpoint = point; + } + } + + return breakpoint || 'max'; + } + + var breakpoints = { + setBreakpoint, + getBreakpoint + }; + + function prepareClasses(entries, prefix) { + const resultClasses = []; + entries.forEach(item => { + if (typeof item === 'object') { + Object.keys(item).forEach(classNames => { + if (item[classNames]) { + resultClasses.push(prefix + classNames); + } + }); + } else if (typeof item === 'string') { + resultClasses.push(prefix + item); + } + }); + return resultClasses; + } + + function addClasses() { + const swiper = this; + const { + classNames, + params, + rtl, + $el, + device, + support + } = swiper; // prettier-ignore + + const suffixes = prepareClasses(['initialized', params.direction, { + 'pointer-events': !support.touch + }, { + 'free-mode': swiper.params.freeMode && params.freeMode.enabled + }, { + 'autoheight': params.autoHeight + }, { + 'rtl': rtl + }, { + 'grid': params.grid && params.grid.rows > 1 + }, { + 'grid-column': params.grid && params.grid.rows > 1 && params.grid.fill === 'column' + }, { + 'android': device.android + }, { + 'ios': device.ios + }, { + 'css-mode': params.cssMode + }, { + 'centered': params.cssMode && params.centeredSlides + }, { + 'watch-progress': params.watchSlidesProgress + }], params.containerModifierClass); + classNames.push(...suffixes); + $el.addClass([...classNames].join(' ')); + swiper.emitContainerClasses(); + } + + function removeClasses() { + const swiper = this; + const { + $el, + classNames + } = swiper; + $el.removeClass(classNames.join(' ')); + swiper.emitContainerClasses(); + } + + var classes = { + addClasses, + removeClasses + }; + + function loadImage(imageEl, src, srcset, sizes, checkForComplete, callback) { + const window = getWindow(); + let image; + + function onReady() { + if (callback) callback(); + } + + const isPicture = $(imageEl).parent('picture')[0]; + + if (!isPicture && (!imageEl.complete || !checkForComplete)) { + if (src) { + image = new window.Image(); + image.onload = onReady; + image.onerror = onReady; + + if (sizes) { + image.sizes = sizes; + } + + if (srcset) { + image.srcset = srcset; + } + + if (src) { + image.src = src; + } + } else { + onReady(); + } + } else { + // image already loaded... + onReady(); + } + } + + function preloadImages() { + const swiper = this; + swiper.imagesToLoad = swiper.$el.find('img'); + + function onReady() { + if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) return; + if (swiper.imagesLoaded !== undefined) swiper.imagesLoaded += 1; + + if (swiper.imagesLoaded === swiper.imagesToLoad.length) { + if (swiper.params.updateOnImagesReady) swiper.update(); + swiper.emit('imagesReady'); + } + } + + for (let i = 0; i < swiper.imagesToLoad.length; i += 1) { + const imageEl = swiper.imagesToLoad[i]; + swiper.loadImage(imageEl, imageEl.currentSrc || imageEl.getAttribute('src'), imageEl.srcset || imageEl.getAttribute('srcset'), imageEl.sizes || imageEl.getAttribute('sizes'), true, onReady); + } + } + + var images = { + loadImage, + preloadImages + }; + + function checkOverflow() { + const swiper = this; + const { + isLocked: wasLocked, + params + } = swiper; + const { + slidesOffsetBefore + } = params; + + if (slidesOffsetBefore) { + const lastSlideIndex = swiper.slides.length - 1; + const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2; + swiper.isLocked = swiper.size > lastSlideRightEdge; + } else { + swiper.isLocked = swiper.snapGrid.length === 1; + } + + if (params.allowSlideNext === true) { + swiper.allowSlideNext = !swiper.isLocked; + } + + if (params.allowSlidePrev === true) { + swiper.allowSlidePrev = !swiper.isLocked; + } + + if (wasLocked && wasLocked !== swiper.isLocked) { + swiper.isEnd = false; + } + + if (wasLocked !== swiper.isLocked) { + swiper.emit(swiper.isLocked ? 'lock' : 'unlock'); + } + } + + var checkOverflow$1 = { + checkOverflow + }; + + var defaults = { + init: true, + direction: 'horizontal', + touchEventsTarget: 'wrapper', + initialSlide: 0, + speed: 300, + cssMode: false, + updateOnWindowResize: true, + resizeObserver: true, + nested: false, + createElements: false, + enabled: true, + focusableElements: 'input, select, option, textarea, button, video, label', + // Overrides + width: null, + height: null, + // + preventInteractionOnTransition: false, + // ssr + userAgent: null, + url: null, + // To support iOS's swipe-to-go-back gesture (when being used in-app). + edgeSwipeDetection: false, + edgeSwipeThreshold: 20, + // Autoheight + autoHeight: false, + // Set wrapper width + setWrapperSize: false, + // Virtual Translate + virtualTranslate: false, + // Effects + effect: 'slide', + // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip' + // Breakpoints + breakpoints: undefined, + breakpointsBase: 'window', + // Slides grid + spaceBetween: 0, + slidesPerView: 1, + slidesPerGroup: 1, + slidesPerGroupSkip: 0, + slidesPerGroupAuto: false, + centeredSlides: false, + centeredSlidesBounds: false, + slidesOffsetBefore: 0, + // in px + slidesOffsetAfter: 0, + // in px + normalizeSlideIndex: true, + centerInsufficientSlides: false, + // Disable swiper and hide navigation when container not overflow + watchOverflow: true, + // Round length + roundLengths: false, + // Touches + touchRatio: 1, + touchAngle: 45, + simulateTouch: true, + shortSwipes: true, + longSwipes: true, + longSwipesRatio: 0.5, + longSwipesMs: 300, + followFinger: true, + allowTouchMove: true, + threshold: 0, + touchMoveStopPropagation: false, + touchStartPreventDefault: true, + touchStartForcePreventDefault: false, + touchReleaseOnEdges: false, + // Unique Navigation Elements + uniqueNavElements: true, + // Resistance + resistance: true, + resistanceRatio: 0.85, + // Progress + watchSlidesProgress: false, + // Cursor + grabCursor: false, + // Clicks + preventClicks: true, + preventClicksPropagation: true, + slideToClickedSlide: false, + // Images + preloadImages: true, + updateOnImagesReady: true, + // loop + loop: false, + loopAdditionalSlides: 0, + loopedSlides: null, + loopFillGroupWithBlank: false, + loopPreventsSlide: true, + // rewind + rewind: false, + // Swiping/no swiping + allowSlidePrev: true, + allowSlideNext: true, + swipeHandler: null, + // '.swipe-handler', + noSwiping: true, + noSwipingClass: 'swiper-no-swiping', + noSwipingSelector: null, + // Passive Listeners + passiveListeners: true, + maxBackfaceHiddenSlides: 10, + // NS + containerModifierClass: 'swiper-', + // NEW + slideClass: 'swiper-slide', + slideBlankClass: 'swiper-slide-invisible-blank', + slideActiveClass: 'swiper-slide-active', + slideDuplicateActiveClass: 'swiper-slide-duplicate-active', + slideVisibleClass: 'swiper-slide-visible', + slideDuplicateClass: 'swiper-slide-duplicate', + slideNextClass: 'swiper-slide-next', + slideDuplicateNextClass: 'swiper-slide-duplicate-next', + slidePrevClass: 'swiper-slide-prev', + slideDuplicatePrevClass: 'swiper-slide-duplicate-prev', + wrapperClass: 'swiper-wrapper', + // Callbacks + runCallbacksOnInit: true, + // Internals + _emitClasses: false + }; + + function moduleExtendParams(params, allModulesParams) { + return function extendParams(obj) { + if (obj === void 0) { + obj = {}; + } + + const moduleParamName = Object.keys(obj)[0]; + const moduleParams = obj[moduleParamName]; + + if (typeof moduleParams !== 'object' || moduleParams === null) { + extend(allModulesParams, obj); + return; + } + + if (['navigation', 'pagination', 'scrollbar'].indexOf(moduleParamName) >= 0 && params[moduleParamName] === true) { + params[moduleParamName] = { + auto: true + }; + } + + if (!(moduleParamName in params && 'enabled' in moduleParams)) { + extend(allModulesParams, obj); + return; + } + + if (params[moduleParamName] === true) { + params[moduleParamName] = { + enabled: true + }; + } + + if (typeof params[moduleParamName] === 'object' && !('enabled' in params[moduleParamName])) { + params[moduleParamName].enabled = true; + } + + if (!params[moduleParamName]) params[moduleParamName] = { + enabled: false + }; + extend(allModulesParams, obj); + }; + } + + /* eslint no-param-reassign: "off" */ + const prototypes = { + eventsEmitter, + update, + translate, + transition, + slide, + loop, + grabCursor, + events: events$1, + breakpoints, + checkOverflow: checkOverflow$1, + classes, + images + }; + const extendedDefaults = {}; + + class Swiper { + constructor() { + let el; + let params; + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object') { + params = args[0]; + } else { + [el, params] = args; + } + + if (!params) params = {}; + params = extend({}, params); + if (el && !params.el) params.el = el; + + if (params.el && $(params.el).length > 1) { + const swipers = []; + $(params.el).each(containerEl => { + const newParams = extend({}, params, { + el: containerEl + }); + swipers.push(new Swiper(newParams)); + }); + return swipers; + } // Swiper Instance + + + const swiper = this; + swiper.__swiper__ = true; + swiper.support = getSupport(); + swiper.device = getDevice({ + userAgent: params.userAgent + }); + swiper.browser = getBrowser(); + swiper.eventsListeners = {}; + swiper.eventsAnyListeners = []; + swiper.modules = [...swiper.__modules__]; + + if (params.modules && Array.isArray(params.modules)) { + swiper.modules.push(...params.modules); + } + + const allModulesParams = {}; + swiper.modules.forEach(mod => { + mod({ + swiper, + extendParams: moduleExtendParams(params, allModulesParams), + on: swiper.on.bind(swiper), + once: swiper.once.bind(swiper), + off: swiper.off.bind(swiper), + emit: swiper.emit.bind(swiper) + }); + }); // Extend defaults with modules params + + const swiperParams = extend({}, defaults, allModulesParams); // Extend defaults with passed params + + swiper.params = extend({}, swiperParams, extendedDefaults, params); + swiper.originalParams = extend({}, swiper.params); + swiper.passedParams = extend({}, params); // add event listeners + + if (swiper.params && swiper.params.on) { + Object.keys(swiper.params.on).forEach(eventName => { + swiper.on(eventName, swiper.params.on[eventName]); + }); + } + + if (swiper.params && swiper.params.onAny) { + swiper.onAny(swiper.params.onAny); + } // Save Dom lib + + + swiper.$ = $; // Extend Swiper + + Object.assign(swiper, { + enabled: swiper.params.enabled, + el, + // Classes + classNames: [], + // Slides + slides: $(), + slidesGrid: [], + snapGrid: [], + slidesSizesGrid: [], + + // isDirection + isHorizontal() { + return swiper.params.direction === 'horizontal'; + }, + + isVertical() { + return swiper.params.direction === 'vertical'; + }, + + // Indexes + activeIndex: 0, + realIndex: 0, + // + isBeginning: true, + isEnd: false, + // Props + translate: 0, + previousTranslate: 0, + progress: 0, + velocity: 0, + animating: false, + // Locks + allowSlideNext: swiper.params.allowSlideNext, + allowSlidePrev: swiper.params.allowSlidePrev, + // Touch Events + touchEvents: function touchEvents() { + const touch = ['touchstart', 'touchmove', 'touchend', 'touchcancel']; + const desktop = ['pointerdown', 'pointermove', 'pointerup']; + swiper.touchEventsTouch = { + start: touch[0], + move: touch[1], + end: touch[2], + cancel: touch[3] + }; + swiper.touchEventsDesktop = { + start: desktop[0], + move: desktop[1], + end: desktop[2] + }; + return swiper.support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop; + }(), + touchEventsData: { + isTouched: undefined, + isMoved: undefined, + allowTouchCallbacks: undefined, + touchStartTime: undefined, + isScrolling: undefined, + currentTranslate: undefined, + startTranslate: undefined, + allowThresholdMove: undefined, + // Form elements to match + focusableElements: swiper.params.focusableElements, + // Last click time + lastClickTime: now(), + clickTimeout: undefined, + // Velocities + velocities: [], + allowMomentumBounce: undefined, + isTouchEvent: undefined, + startMoving: undefined + }, + // Clicks + allowClick: true, + // Touches + allowTouchMove: swiper.params.allowTouchMove, + touches: { + startX: 0, + startY: 0, + currentX: 0, + currentY: 0, + diff: 0 + }, + // Images + imagesToLoad: [], + imagesLoaded: 0 + }); + swiper.emit('_swiper'); // Init + + if (swiper.params.init) { + swiper.init(); + } // Return app instance + + + return swiper; + } + + enable() { + const swiper = this; + if (swiper.enabled) return; + swiper.enabled = true; + + if (swiper.params.grabCursor) { + swiper.setGrabCursor(); + } + + swiper.emit('enable'); + } + + disable() { + const swiper = this; + if (!swiper.enabled) return; + swiper.enabled = false; + + if (swiper.params.grabCursor) { + swiper.unsetGrabCursor(); + } + + swiper.emit('disable'); + } + + setProgress(progress, speed) { + const swiper = this; + progress = Math.min(Math.max(progress, 0), 1); + const min = swiper.minTranslate(); + const max = swiper.maxTranslate(); + const current = (max - min) * progress + min; + swiper.translateTo(current, typeof speed === 'undefined' ? 0 : speed); + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + } + + emitContainerClasses() { + const swiper = this; + if (!swiper.params._emitClasses || !swiper.el) return; + const cls = swiper.el.className.split(' ').filter(className => { + return className.indexOf('swiper') === 0 || className.indexOf(swiper.params.containerModifierClass) === 0; + }); + swiper.emit('_containerClasses', cls.join(' ')); + } + + getSlideClasses(slideEl) { + const swiper = this; + if (swiper.destroyed) return ''; + return slideEl.className.split(' ').filter(className => { + return className.indexOf('swiper-slide') === 0 || className.indexOf(swiper.params.slideClass) === 0; + }).join(' '); + } + + emitSlidesClasses() { + const swiper = this; + if (!swiper.params._emitClasses || !swiper.el) return; + const updates = []; + swiper.slides.each(slideEl => { + const classNames = swiper.getSlideClasses(slideEl); + updates.push({ + slideEl, + classNames + }); + swiper.emit('_slideClass', slideEl, classNames); + }); + swiper.emit('_slideClasses', updates); + } + + slidesPerViewDynamic(view, exact) { + if (view === void 0) { + view = 'current'; + } + + if (exact === void 0) { + exact = false; + } + + const swiper = this; + const { + params, + slides, + slidesGrid, + slidesSizesGrid, + size: swiperSize, + activeIndex + } = swiper; + let spv = 1; + + if (params.centeredSlides) { + let slideSize = slides[activeIndex].swiperSlideSize; + let breakLoop; + + for (let i = activeIndex + 1; i < slides.length; i += 1) { + if (slides[i] && !breakLoop) { + slideSize += slides[i].swiperSlideSize; + spv += 1; + if (slideSize > swiperSize) breakLoop = true; + } + } + + for (let i = activeIndex - 1; i >= 0; i -= 1) { + if (slides[i] && !breakLoop) { + slideSize += slides[i].swiperSlideSize; + spv += 1; + if (slideSize > swiperSize) breakLoop = true; + } + } + } else { + // eslint-disable-next-line + if (view === 'current') { + for (let i = activeIndex + 1; i < slides.length; i += 1) { + const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize; + + if (slideInView) { + spv += 1; + } + } + } else { + // previous + for (let i = activeIndex - 1; i >= 0; i -= 1) { + const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize; + + if (slideInView) { + spv += 1; + } + } + } + } + + return spv; + } + + update() { + const swiper = this; + if (!swiper || swiper.destroyed) return; + const { + snapGrid, + params + } = swiper; // Breakpoints + + if (params.breakpoints) { + swiper.setBreakpoint(); + } + + swiper.updateSize(); + swiper.updateSlides(); + swiper.updateProgress(); + swiper.updateSlidesClasses(); + + function setTranslate() { + const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate; + const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate()); + swiper.setTranslate(newTranslate); + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + } + + let translated; + + if (swiper.params.freeMode && swiper.params.freeMode.enabled) { + setTranslate(); + + if (swiper.params.autoHeight) { + swiper.updateAutoHeight(); + } + } else { + if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) { + translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true); + } else { + translated = swiper.slideTo(swiper.activeIndex, 0, false, true); + } + + if (!translated) { + setTranslate(); + } + } + + if (params.watchOverflow && snapGrid !== swiper.snapGrid) { + swiper.checkOverflow(); + } + + swiper.emit('update'); + } + + changeDirection(newDirection, needUpdate) { + if (needUpdate === void 0) { + needUpdate = true; + } + + const swiper = this; + const currentDirection = swiper.params.direction; + + if (!newDirection) { + // eslint-disable-next-line + newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal'; + } + + if (newDirection === currentDirection || newDirection !== 'horizontal' && newDirection !== 'vertical') { + return swiper; + } + + swiper.$el.removeClass(`${swiper.params.containerModifierClass}${currentDirection}`).addClass(`${swiper.params.containerModifierClass}${newDirection}`); + swiper.emitContainerClasses(); + swiper.params.direction = newDirection; + swiper.slides.each(slideEl => { + if (newDirection === 'vertical') { + slideEl.style.width = ''; + } else { + slideEl.style.height = ''; + } + }); + swiper.emit('changeDirection'); + if (needUpdate) swiper.update(); + return swiper; + } + + mount(el) { + const swiper = this; + if (swiper.mounted) return true; // Find el + + const $el = $(el || swiper.params.el); + el = $el[0]; + + if (!el) { + return false; + } + + el.swiper = swiper; + + const getWrapperSelector = () => { + return `.${(swiper.params.wrapperClass || '').trim().split(' ').join('.')}`; + }; + + const getWrapper = () => { + if (el && el.shadowRoot && el.shadowRoot.querySelector) { + const res = $(el.shadowRoot.querySelector(getWrapperSelector())); // Children needs to return slot items + + res.children = options => $el.children(options); + + return res; + } + + return $el.children(getWrapperSelector()); + }; // Find Wrapper + + + let $wrapperEl = getWrapper(); + + if ($wrapperEl.length === 0 && swiper.params.createElements) { + const document = getDocument(); + const wrapper = document.createElement('div'); + $wrapperEl = $(wrapper); + wrapper.className = swiper.params.wrapperClass; + $el.append(wrapper); + $el.children(`.${swiper.params.slideClass}`).each(slideEl => { + $wrapperEl.append(slideEl); + }); + } + + Object.assign(swiper, { + $el, + el, + $wrapperEl, + wrapperEl: $wrapperEl[0], + mounted: true, + // RTL + rtl: el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl', + rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'), + wrongRTL: $wrapperEl.css('display') === '-webkit-box' + }); + return true; + } + + init(el) { + const swiper = this; + if (swiper.initialized) return swiper; + const mounted = swiper.mount(el); + if (mounted === false) return swiper; + swiper.emit('beforeInit'); // Set breakpoint + + if (swiper.params.breakpoints) { + swiper.setBreakpoint(); + } // Add Classes + + + swiper.addClasses(); // Create loop + + if (swiper.params.loop) { + swiper.loopCreate(); + } // Update size + + + swiper.updateSize(); // Update slides + + swiper.updateSlides(); + + if (swiper.params.watchOverflow) { + swiper.checkOverflow(); + } // Set Grab Cursor + + + if (swiper.params.grabCursor && swiper.enabled) { + swiper.setGrabCursor(); + } + + if (swiper.params.preloadImages) { + swiper.preloadImages(); + } // Slide To Initial Slide + + + if (swiper.params.loop) { + swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit, false, true); + } else { + swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true); + } // Attach events + + + swiper.attachEvents(); // Init Flag + + swiper.initialized = true; // Emit + + swiper.emit('init'); + swiper.emit('afterInit'); + return swiper; + } + + destroy(deleteInstance, cleanStyles) { + if (deleteInstance === void 0) { + deleteInstance = true; + } + + if (cleanStyles === void 0) { + cleanStyles = true; + } + + const swiper = this; + const { + params, + $el, + $wrapperEl, + slides + } = swiper; + + if (typeof swiper.params === 'undefined' || swiper.destroyed) { + return null; + } + + swiper.emit('beforeDestroy'); // Init Flag + + swiper.initialized = false; // Detach events + + swiper.detachEvents(); // Destroy loop + + if (params.loop) { + swiper.loopDestroy(); + } // Cleanup styles + + + if (cleanStyles) { + swiper.removeClasses(); + $el.removeAttr('style'); + $wrapperEl.removeAttr('style'); + + if (slides && slides.length) { + slides.removeClass([params.slideVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass].join(' ')).removeAttr('style').removeAttr('data-swiper-slide-index'); + } + } + + swiper.emit('destroy'); // Detach emitter events + + Object.keys(swiper.eventsListeners).forEach(eventName => { + swiper.off(eventName); + }); + + if (deleteInstance !== false) { + swiper.$el[0].swiper = null; + deleteProps(swiper); + } + + swiper.destroyed = true; + return null; + } + + static extendDefaults(newDefaults) { + extend(extendedDefaults, newDefaults); + } + + static get extendedDefaults() { + return extendedDefaults; + } + + static get defaults() { + return defaults; + } + + static installModule(mod) { + if (!Swiper.prototype.__modules__) Swiper.prototype.__modules__ = []; + const modules = Swiper.prototype.__modules__; + + if (typeof mod === 'function' && modules.indexOf(mod) < 0) { + modules.push(mod); + } + } + + static use(module) { + if (Array.isArray(module)) { + module.forEach(m => Swiper.installModule(m)); + return Swiper; + } + + Swiper.installModule(module); + return Swiper; + } + + } + + Object.keys(prototypes).forEach(prototypeGroup => { + Object.keys(prototypes[prototypeGroup]).forEach(protoMethod => { + Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod]; + }); + }); + Swiper.use([Resize, Observer]); + + function Virtual(_ref) { + let { + swiper, + extendParams, + on, + emit + } = _ref; + extendParams({ + virtual: { + enabled: false, + slides: [], + cache: true, + renderSlide: null, + renderExternal: null, + renderExternalUpdate: true, + addSlidesBefore: 0, + addSlidesAfter: 0 + } + }); + let cssModeTimeout; + swiper.virtual = { + cache: {}, + from: undefined, + to: undefined, + slides: [], + offset: 0, + slidesGrid: [] + }; + + function renderSlide(slide, index) { + const params = swiper.params.virtual; + + if (params.cache && swiper.virtual.cache[index]) { + return swiper.virtual.cache[index]; + } + + const $slideEl = params.renderSlide ? $(params.renderSlide.call(swiper, slide, index)) : $(`
      ${slide}
      `); + if (!$slideEl.attr('data-swiper-slide-index')) $slideEl.attr('data-swiper-slide-index', index); + if (params.cache) swiper.virtual.cache[index] = $slideEl; + return $slideEl; + } + + function update(force) { + const { + slidesPerView, + slidesPerGroup, + centeredSlides + } = swiper.params; + const { + addSlidesBefore, + addSlidesAfter + } = swiper.params.virtual; + const { + from: previousFrom, + to: previousTo, + slides, + slidesGrid: previousSlidesGrid, + offset: previousOffset + } = swiper.virtual; + + if (!swiper.params.cssMode) { + swiper.updateActiveIndex(); + } + + const activeIndex = swiper.activeIndex || 0; + let offsetProp; + if (swiper.rtlTranslate) offsetProp = 'right';else offsetProp = swiper.isHorizontal() ? 'left' : 'top'; + let slidesAfter; + let slidesBefore; + + if (centeredSlides) { + slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter; + slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore; + } else { + slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesAfter; + slidesBefore = slidesPerGroup + addSlidesBefore; + } + + const from = Math.max((activeIndex || 0) - slidesBefore, 0); + const to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1); + const offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0); + Object.assign(swiper.virtual, { + from, + to, + offset, + slidesGrid: swiper.slidesGrid + }); + + function onRendered() { + swiper.updateSlides(); + swiper.updateProgress(); + swiper.updateSlidesClasses(); + + if (swiper.lazy && swiper.params.lazy.enabled) { + swiper.lazy.load(); + } + + emit('virtualUpdate'); + } + + if (previousFrom === from && previousTo === to && !force) { + if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) { + swiper.slides.css(offsetProp, `${offset}px`); + } + + swiper.updateProgress(); + emit('virtualUpdate'); + return; + } + + if (swiper.params.virtual.renderExternal) { + swiper.params.virtual.renderExternal.call(swiper, { + offset, + from, + to, + slides: function getSlides() { + const slidesToRender = []; + + for (let i = from; i <= to; i += 1) { + slidesToRender.push(slides[i]); + } + + return slidesToRender; + }() + }); + + if (swiper.params.virtual.renderExternalUpdate) { + onRendered(); + } else { + emit('virtualUpdate'); + } + + return; + } + + const prependIndexes = []; + const appendIndexes = []; + + if (force) { + swiper.$wrapperEl.find(`.${swiper.params.slideClass}`).remove(); + } else { + for (let i = previousFrom; i <= previousTo; i += 1) { + if (i < from || i > to) { + swiper.$wrapperEl.find(`.${swiper.params.slideClass}[data-swiper-slide-index="${i}"]`).remove(); + } + } + } + + for (let i = 0; i < slides.length; i += 1) { + if (i >= from && i <= to) { + if (typeof previousTo === 'undefined' || force) { + appendIndexes.push(i); + } else { + if (i > previousTo) appendIndexes.push(i); + if (i < previousFrom) prependIndexes.push(i); + } + } + } + + appendIndexes.forEach(index => { + swiper.$wrapperEl.append(renderSlide(slides[index], index)); + }); + prependIndexes.sort((a, b) => b - a).forEach(index => { + swiper.$wrapperEl.prepend(renderSlide(slides[index], index)); + }); + swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, `${offset}px`); + onRendered(); + } + + function appendSlide(slides) { + if (typeof slides === 'object' && 'length' in slides) { + for (let i = 0; i < slides.length; i += 1) { + if (slides[i]) swiper.virtual.slides.push(slides[i]); + } + } else { + swiper.virtual.slides.push(slides); + } + + update(true); + } + + function prependSlide(slides) { + const activeIndex = swiper.activeIndex; + let newActiveIndex = activeIndex + 1; + let numberOfNewSlides = 1; + + if (Array.isArray(slides)) { + for (let i = 0; i < slides.length; i += 1) { + if (slides[i]) swiper.virtual.slides.unshift(slides[i]); + } + + newActiveIndex = activeIndex + slides.length; + numberOfNewSlides = slides.length; + } else { + swiper.virtual.slides.unshift(slides); + } + + if (swiper.params.virtual.cache) { + const cache = swiper.virtual.cache; + const newCache = {}; + Object.keys(cache).forEach(cachedIndex => { + const $cachedEl = cache[cachedIndex]; + const cachedElIndex = $cachedEl.attr('data-swiper-slide-index'); + + if (cachedElIndex) { + $cachedEl.attr('data-swiper-slide-index', parseInt(cachedElIndex, 10) + numberOfNewSlides); + } + + newCache[parseInt(cachedIndex, 10) + numberOfNewSlides] = $cachedEl; + }); + swiper.virtual.cache = newCache; + } + + update(true); + swiper.slideTo(newActiveIndex, 0); + } + + function removeSlide(slidesIndexes) { + if (typeof slidesIndexes === 'undefined' || slidesIndexes === null) return; + let activeIndex = swiper.activeIndex; + + if (Array.isArray(slidesIndexes)) { + for (let i = slidesIndexes.length - 1; i >= 0; i -= 1) { + swiper.virtual.slides.splice(slidesIndexes[i], 1); + + if (swiper.params.virtual.cache) { + delete swiper.virtual.cache[slidesIndexes[i]]; + } + + if (slidesIndexes[i] < activeIndex) activeIndex -= 1; + activeIndex = Math.max(activeIndex, 0); + } + } else { + swiper.virtual.slides.splice(slidesIndexes, 1); + + if (swiper.params.virtual.cache) { + delete swiper.virtual.cache[slidesIndexes]; + } + + if (slidesIndexes < activeIndex) activeIndex -= 1; + activeIndex = Math.max(activeIndex, 0); + } + + update(true); + swiper.slideTo(activeIndex, 0); + } + + function removeAllSlides() { + swiper.virtual.slides = []; + + if (swiper.params.virtual.cache) { + swiper.virtual.cache = {}; + } + + update(true); + swiper.slideTo(0, 0); + } + + on('beforeInit', () => { + if (!swiper.params.virtual.enabled) return; + swiper.virtual.slides = swiper.params.virtual.slides; + swiper.classNames.push(`${swiper.params.containerModifierClass}virtual`); + swiper.params.watchSlidesProgress = true; + swiper.originalParams.watchSlidesProgress = true; + + if (!swiper.params.initialSlide) { + update(); + } + }); + on('setTranslate', () => { + if (!swiper.params.virtual.enabled) return; + + if (swiper.params.cssMode && !swiper._immediateVirtual) { + clearTimeout(cssModeTimeout); + cssModeTimeout = setTimeout(() => { + update(); + }, 100); + } else { + update(); + } + }); + on('init update resize', () => { + if (!swiper.params.virtual.enabled) return; + + if (swiper.params.cssMode) { + setCSSProperty(swiper.wrapperEl, '--swiper-virtual-size', `${swiper.virtualSize}px`); + } + }); + Object.assign(swiper.virtual, { + appendSlide, + prependSlide, + removeSlide, + removeAllSlides, + update + }); + } + + /* eslint-disable consistent-return */ + function Keyboard(_ref) { + let { + swiper, + extendParams, + on, + emit + } = _ref; + const document = getDocument(); + const window = getWindow(); + swiper.keyboard = { + enabled: false + }; + extendParams({ + keyboard: { + enabled: false, + onlyInViewport: true, + pageUpDown: true + } + }); + + function handle(event) { + if (!swiper.enabled) return; + const { + rtlTranslate: rtl + } = swiper; + let e = event; + if (e.originalEvent) e = e.originalEvent; // jquery fix + + const kc = e.keyCode || e.charCode; + const pageUpDown = swiper.params.keyboard.pageUpDown; + const isPageUp = pageUpDown && kc === 33; + const isPageDown = pageUpDown && kc === 34; + const isArrowLeft = kc === 37; + const isArrowRight = kc === 39; + const isArrowUp = kc === 38; + const isArrowDown = kc === 40; // Directions locks + + if (!swiper.allowSlideNext && (swiper.isHorizontal() && isArrowRight || swiper.isVertical() && isArrowDown || isPageDown)) { + return false; + } + + if (!swiper.allowSlidePrev && (swiper.isHorizontal() && isArrowLeft || swiper.isVertical() && isArrowUp || isPageUp)) { + return false; + } + + if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) { + return undefined; + } + + if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) { + return undefined; + } + + if (swiper.params.keyboard.onlyInViewport && (isPageUp || isPageDown || isArrowLeft || isArrowRight || isArrowUp || isArrowDown)) { + let inView = false; // Check that swiper should be inside of visible area of window + + if (swiper.$el.parents(`.${swiper.params.slideClass}`).length > 0 && swiper.$el.parents(`.${swiper.params.slideActiveClass}`).length === 0) { + return undefined; + } + + const $el = swiper.$el; + const swiperWidth = $el[0].clientWidth; + const swiperHeight = $el[0].clientHeight; + const windowWidth = window.innerWidth; + const windowHeight = window.innerHeight; + const swiperOffset = swiper.$el.offset(); + if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft; + const swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiperWidth, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiperHeight], [swiperOffset.left + swiperWidth, swiperOffset.top + swiperHeight]]; + + for (let i = 0; i < swiperCoord.length; i += 1) { + const point = swiperCoord[i]; + + if (point[0] >= 0 && point[0] <= windowWidth && point[1] >= 0 && point[1] <= windowHeight) { + if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line + + inView = true; + } + } + + if (!inView) return undefined; + } + + if (swiper.isHorizontal()) { + if (isPageUp || isPageDown || isArrowLeft || isArrowRight) { + if (e.preventDefault) e.preventDefault();else e.returnValue = false; + } + + if ((isPageDown || isArrowRight) && !rtl || (isPageUp || isArrowLeft) && rtl) swiper.slideNext(); + if ((isPageUp || isArrowLeft) && !rtl || (isPageDown || isArrowRight) && rtl) swiper.slidePrev(); + } else { + if (isPageUp || isPageDown || isArrowUp || isArrowDown) { + if (e.preventDefault) e.preventDefault();else e.returnValue = false; + } + + if (isPageDown || isArrowDown) swiper.slideNext(); + if (isPageUp || isArrowUp) swiper.slidePrev(); + } + + emit('keyPress', kc); + return undefined; + } + + function enable() { + if (swiper.keyboard.enabled) return; + $(document).on('keydown', handle); + swiper.keyboard.enabled = true; + } + + function disable() { + if (!swiper.keyboard.enabled) return; + $(document).off('keydown', handle); + swiper.keyboard.enabled = false; + } + + on('init', () => { + if (swiper.params.keyboard.enabled) { + enable(); + } + }); + on('destroy', () => { + if (swiper.keyboard.enabled) { + disable(); + } + }); + Object.assign(swiper.keyboard, { + enable, + disable + }); + } + + /* eslint-disable consistent-return */ + function Mousewheel(_ref) { + let { + swiper, + extendParams, + on, + emit + } = _ref; + const window = getWindow(); + extendParams({ + mousewheel: { + enabled: false, + releaseOnEdges: false, + invert: false, + forceToAxis: false, + sensitivity: 1, + eventsTarget: 'container', + thresholdDelta: null, + thresholdTime: null + } + }); + swiper.mousewheel = { + enabled: false + }; + let timeout; + let lastScrollTime = now(); + let lastEventBeforeSnap; + const recentWheelEvents = []; + + function normalize(e) { + // Reasonable defaults + const PIXEL_STEP = 10; + const LINE_HEIGHT = 40; + const PAGE_HEIGHT = 800; + let sX = 0; + let sY = 0; // spinX, spinY + + let pX = 0; + let pY = 0; // pixelX, pixelY + // Legacy + + if ('detail' in e) { + sY = e.detail; + } + + if ('wheelDelta' in e) { + sY = -e.wheelDelta / 120; + } + + if ('wheelDeltaY' in e) { + sY = -e.wheelDeltaY / 120; + } + + if ('wheelDeltaX' in e) { + sX = -e.wheelDeltaX / 120; + } // side scrolling on FF with DOMMouseScroll + + + if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) { + sX = sY; + sY = 0; + } + + pX = sX * PIXEL_STEP; + pY = sY * PIXEL_STEP; + + if ('deltaY' in e) { + pY = e.deltaY; + } + + if ('deltaX' in e) { + pX = e.deltaX; + } + + if (e.shiftKey && !pX) { + // if user scrolls with shift he wants horizontal scroll + pX = pY; + pY = 0; + } + + if ((pX || pY) && e.deltaMode) { + if (e.deltaMode === 1) { + // delta in LINE units + pX *= LINE_HEIGHT; + pY *= LINE_HEIGHT; + } else { + // delta in PAGE units + pX *= PAGE_HEIGHT; + pY *= PAGE_HEIGHT; + } + } // Fall-back if spin cannot be determined + + + if (pX && !sX) { + sX = pX < 1 ? -1 : 1; + } + + if (pY && !sY) { + sY = pY < 1 ? -1 : 1; + } + + return { + spinX: sX, + spinY: sY, + pixelX: pX, + pixelY: pY + }; + } + + function handleMouseEnter() { + if (!swiper.enabled) return; + swiper.mouseEntered = true; + } + + function handleMouseLeave() { + if (!swiper.enabled) return; + swiper.mouseEntered = false; + } + + function animateSlider(newEvent) { + if (swiper.params.mousewheel.thresholdDelta && newEvent.delta < swiper.params.mousewheel.thresholdDelta) { + // Prevent if delta of wheel scroll delta is below configured threshold + return false; + } + + if (swiper.params.mousewheel.thresholdTime && now() - lastScrollTime < swiper.params.mousewheel.thresholdTime) { + // Prevent if time between scrolls is below configured threshold + return false; + } // If the movement is NOT big enough and + // if the last time the user scrolled was too close to the current one (avoid continuously triggering the slider): + // Don't go any further (avoid insignificant scroll movement). + + + if (newEvent.delta >= 6 && now() - lastScrollTime < 60) { + // Return false as a default + return true; + } // If user is scrolling towards the end: + // If the slider hasn't hit the latest slide or + // if the slider is a loop and + // if the slider isn't moving right now: + // Go to next slide and + // emit a scroll event. + // Else (the user is scrolling towards the beginning) and + // if the slider hasn't hit the first slide or + // if the slider is a loop and + // if the slider isn't moving right now: + // Go to prev slide and + // emit a scroll event. + + + if (newEvent.direction < 0) { + if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) { + swiper.slideNext(); + emit('scroll', newEvent.raw); + } + } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) { + swiper.slidePrev(); + emit('scroll', newEvent.raw); + } // If you got here is because an animation has been triggered so store the current time + + + lastScrollTime = new window.Date().getTime(); // Return false as a default + + return false; + } + + function releaseScroll(newEvent) { + const params = swiper.params.mousewheel; + + if (newEvent.direction < 0) { + if (swiper.isEnd && !swiper.params.loop && params.releaseOnEdges) { + // Return true to animate scroll on edges + return true; + } + } else if (swiper.isBeginning && !swiper.params.loop && params.releaseOnEdges) { + // Return true to animate scroll on edges + return true; + } + + return false; + } + + function handle(event) { + let e = event; + let disableParentSwiper = true; + if (!swiper.enabled) return; + const params = swiper.params.mousewheel; + + if (swiper.params.cssMode) { + e.preventDefault(); + } + + let target = swiper.$el; + + if (swiper.params.mousewheel.eventsTarget !== 'container') { + target = $(swiper.params.mousewheel.eventsTarget); + } + + if (!swiper.mouseEntered && !target[0].contains(e.target) && !params.releaseOnEdges) return true; + if (e.originalEvent) e = e.originalEvent; // jquery fix + + let delta = 0; + const rtlFactor = swiper.rtlTranslate ? -1 : 1; + const data = normalize(e); + + if (params.forceToAxis) { + if (swiper.isHorizontal()) { + if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) delta = -data.pixelX * rtlFactor;else return true; + } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) delta = -data.pixelY;else return true; + } else { + delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY; + } + + if (delta === 0) return true; + if (params.invert) delta = -delta; // Get the scroll positions + + let positions = swiper.getTranslate() + delta * params.sensitivity; + if (positions >= swiper.minTranslate()) positions = swiper.minTranslate(); + if (positions <= swiper.maxTranslate()) positions = swiper.maxTranslate(); // When loop is true: + // the disableParentSwiper will be true. + // When loop is false: + // if the scroll positions is not on edge, + // then the disableParentSwiper will be true. + // if the scroll on edge positions, + // then the disableParentSwiper will be false. + + disableParentSwiper = swiper.params.loop ? true : !(positions === swiper.minTranslate() || positions === swiper.maxTranslate()); + if (disableParentSwiper && swiper.params.nested) e.stopPropagation(); + + if (!swiper.params.freeMode || !swiper.params.freeMode.enabled) { + // Register the new event in a variable which stores the relevant data + const newEvent = { + time: now(), + delta: Math.abs(delta), + direction: Math.sign(delta), + raw: event + }; // Keep the most recent events + + if (recentWheelEvents.length >= 2) { + recentWheelEvents.shift(); // only store the last N events + } + + const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined; + recentWheelEvents.push(newEvent); // If there is at least one previous recorded event: + // If direction has changed or + // if the scroll is quicker than the previous one: + // Animate the slider. + // Else (this is the first time the wheel is moved): + // Animate the slider. + + if (prevEvent) { + if (newEvent.direction !== prevEvent.direction || newEvent.delta > prevEvent.delta || newEvent.time > prevEvent.time + 150) { + animateSlider(newEvent); + } + } else { + animateSlider(newEvent); + } // If it's time to release the scroll: + // Return now so you don't hit the preventDefault. + + + if (releaseScroll(newEvent)) { + return true; + } + } else { + // Freemode or scrollContainer: + // If we recently snapped after a momentum scroll, then ignore wheel events + // to give time for the deceleration to finish. Stop ignoring after 500 msecs + // or if it's a new scroll (larger delta or inverse sign as last event before + // an end-of-momentum snap). + const newEvent = { + time: now(), + delta: Math.abs(delta), + direction: Math.sign(delta) + }; + const ignoreWheelEvents = lastEventBeforeSnap && newEvent.time < lastEventBeforeSnap.time + 500 && newEvent.delta <= lastEventBeforeSnap.delta && newEvent.direction === lastEventBeforeSnap.direction; + + if (!ignoreWheelEvents) { + lastEventBeforeSnap = undefined; + + if (swiper.params.loop) { + swiper.loopFix(); + } + + let position = swiper.getTranslate() + delta * params.sensitivity; + const wasBeginning = swiper.isBeginning; + const wasEnd = swiper.isEnd; + if (position >= swiper.minTranslate()) position = swiper.minTranslate(); + if (position <= swiper.maxTranslate()) position = swiper.maxTranslate(); + swiper.setTransition(0); + swiper.setTranslate(position); + swiper.updateProgress(); + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + + if (!wasBeginning && swiper.isBeginning || !wasEnd && swiper.isEnd) { + swiper.updateSlidesClasses(); + } + + if (swiper.params.freeMode.sticky) { + // When wheel scrolling starts with sticky (aka snap) enabled, then detect + // the end of a momentum scroll by storing recent (N=15?) wheel events. + // 1. do all N events have decreasing or same (absolute value) delta? + // 2. did all N events arrive in the last M (M=500?) msecs? + // 3. does the earliest event have an (absolute value) delta that's + // at least P (P=1?) larger than the most recent event's delta? + // 4. does the latest event have a delta that's smaller than Q (Q=6?) pixels? + // If 1-4 are "yes" then we're near the end of a momentum scroll deceleration. + // Snap immediately and ignore remaining wheel events in this scroll. + // See comment above for "remaining wheel events in this scroll" determination. + // If 1-4 aren't satisfied, then wait to snap until 500ms after the last event. + clearTimeout(timeout); + timeout = undefined; + + if (recentWheelEvents.length >= 15) { + recentWheelEvents.shift(); // only store the last N events + } + + const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined; + const firstEvent = recentWheelEvents[0]; + recentWheelEvents.push(newEvent); + + if (prevEvent && (newEvent.delta > prevEvent.delta || newEvent.direction !== prevEvent.direction)) { + // Increasing or reverse-sign delta means the user started scrolling again. Clear the wheel event log. + recentWheelEvents.splice(0); + } else if (recentWheelEvents.length >= 15 && newEvent.time - firstEvent.time < 500 && firstEvent.delta - newEvent.delta >= 1 && newEvent.delta <= 6) { + // We're at the end of the deceleration of a momentum scroll, so there's no need + // to wait for more events. Snap ASAP on the next tick. + // Also, because there's some remaining momentum we'll bias the snap in the + // direction of the ongoing scroll because it's better UX for the scroll to snap + // in the same direction as the scroll instead of reversing to snap. Therefore, + // if it's already scrolled more than 20% in the current direction, keep going. + const snapToThreshold = delta > 0 ? 0.8 : 0.2; + lastEventBeforeSnap = newEvent; + recentWheelEvents.splice(0); + timeout = nextTick(() => { + swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold); + }, 0); // no delay; move on next tick + } + + if (!timeout) { + // if we get here, then we haven't detected the end of a momentum scroll, so + // we'll consider a scroll "complete" when there haven't been any wheel events + // for 500ms. + timeout = nextTick(() => { + const snapToThreshold = 0.5; + lastEventBeforeSnap = newEvent; + recentWheelEvents.splice(0); + swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold); + }, 500); + } + } // Emit event + + + if (!ignoreWheelEvents) emit('scroll', e); // Stop autoplay + + if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop(); // Return page scroll on edge positions + + if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true; + } + } + + if (e.preventDefault) e.preventDefault();else e.returnValue = false; + return false; + } + + function events(method) { + let target = swiper.$el; + + if (swiper.params.mousewheel.eventsTarget !== 'container') { + target = $(swiper.params.mousewheel.eventsTarget); + } + + target[method]('mouseenter', handleMouseEnter); + target[method]('mouseleave', handleMouseLeave); + target[method]('wheel', handle); + } + + function enable() { + if (swiper.params.cssMode) { + swiper.wrapperEl.removeEventListener('wheel', handle); + return true; + } + + if (swiper.mousewheel.enabled) return false; + events('on'); + swiper.mousewheel.enabled = true; + return true; + } + + function disable() { + if (swiper.params.cssMode) { + swiper.wrapperEl.addEventListener(event, handle); + return true; + } + + if (!swiper.mousewheel.enabled) return false; + events('off'); + swiper.mousewheel.enabled = false; + return true; + } + + on('init', () => { + if (!swiper.params.mousewheel.enabled && swiper.params.cssMode) { + disable(); + } + + if (swiper.params.mousewheel.enabled) enable(); + }); + on('destroy', () => { + if (swiper.params.cssMode) { + enable(); + } + + if (swiper.mousewheel.enabled) disable(); + }); + Object.assign(swiper.mousewheel, { + enable, + disable + }); + } + + function createElementIfNotDefined(swiper, originalParams, params, checkProps) { + const document = getDocument(); + + if (swiper.params.createElements) { + Object.keys(checkProps).forEach(key => { + if (!params[key] && params.auto === true) { + let element = swiper.$el.children(`.${checkProps[key]}`)[0]; + + if (!element) { + element = document.createElement('div'); + element.className = checkProps[key]; + swiper.$el.append(element); + } + + params[key] = element; + originalParams[key] = element; + } + }); + } + + return params; + } + + function Navigation(_ref) { + let { + swiper, + extendParams, + on, + emit + } = _ref; + extendParams({ + navigation: { + nextEl: null, + prevEl: null, + hideOnClick: false, + disabledClass: 'swiper-button-disabled', + hiddenClass: 'swiper-button-hidden', + lockClass: 'swiper-button-lock' + } + }); + swiper.navigation = { + nextEl: null, + $nextEl: null, + prevEl: null, + $prevEl: null + }; + + function getEl(el) { + let $el; + + if (el) { + $el = $(el); + + if (swiper.params.uniqueNavElements && typeof el === 'string' && $el.length > 1 && swiper.$el.find(el).length === 1) { + $el = swiper.$el.find(el); + } + } + + return $el; + } + + function toggleEl($el, disabled) { + const params = swiper.params.navigation; + + if ($el && $el.length > 0) { + $el[disabled ? 'addClass' : 'removeClass'](params.disabledClass); + if ($el[0] && $el[0].tagName === 'BUTTON') $el[0].disabled = disabled; + + if (swiper.params.watchOverflow && swiper.enabled) { + $el[swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); + } + } + } + + function update() { + // Update Navigation Buttons + if (swiper.params.loop) return; + const { + $nextEl, + $prevEl + } = swiper.navigation; + toggleEl($prevEl, swiper.isBeginning && !swiper.params.rewind); + toggleEl($nextEl, swiper.isEnd && !swiper.params.rewind); + } + + function onPrevClick(e) { + e.preventDefault(); + if (swiper.isBeginning && !swiper.params.loop && !swiper.params.rewind) return; + swiper.slidePrev(); + } + + function onNextClick(e) { + e.preventDefault(); + if (swiper.isEnd && !swiper.params.loop && !swiper.params.rewind) return; + swiper.slideNext(); + } + + function init() { + const params = swiper.params.navigation; + swiper.params.navigation = createElementIfNotDefined(swiper, swiper.originalParams.navigation, swiper.params.navigation, { + nextEl: 'swiper-button-next', + prevEl: 'swiper-button-prev' + }); + if (!(params.nextEl || params.prevEl)) return; + const $nextEl = getEl(params.nextEl); + const $prevEl = getEl(params.prevEl); + + if ($nextEl && $nextEl.length > 0) { + $nextEl.on('click', onNextClick); + } + + if ($prevEl && $prevEl.length > 0) { + $prevEl.on('click', onPrevClick); + } + + Object.assign(swiper.navigation, { + $nextEl, + nextEl: $nextEl && $nextEl[0], + $prevEl, + prevEl: $prevEl && $prevEl[0] + }); + + if (!swiper.enabled) { + if ($nextEl) $nextEl.addClass(params.lockClass); + if ($prevEl) $prevEl.addClass(params.lockClass); + } + } + + function destroy() { + const { + $nextEl, + $prevEl + } = swiper.navigation; + + if ($nextEl && $nextEl.length) { + $nextEl.off('click', onNextClick); + $nextEl.removeClass(swiper.params.navigation.disabledClass); + } + + if ($prevEl && $prevEl.length) { + $prevEl.off('click', onPrevClick); + $prevEl.removeClass(swiper.params.navigation.disabledClass); + } + } + + on('init', () => { + init(); + update(); + }); + on('toEdge fromEdge lock unlock', () => { + update(); + }); + on('destroy', () => { + destroy(); + }); + on('enable disable', () => { + const { + $nextEl, + $prevEl + } = swiper.navigation; + + if ($nextEl) { + $nextEl[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.navigation.lockClass); + } + + if ($prevEl) { + $prevEl[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.navigation.lockClass); + } + }); + on('click', (_s, e) => { + const { + $nextEl, + $prevEl + } = swiper.navigation; + const targetEl = e.target; + + if (swiper.params.navigation.hideOnClick && !$(targetEl).is($prevEl) && !$(targetEl).is($nextEl)) { + if (swiper.pagination && swiper.params.pagination && swiper.params.pagination.clickable && (swiper.pagination.el === targetEl || swiper.pagination.el.contains(targetEl))) return; + let isHidden; + + if ($nextEl) { + isHidden = $nextEl.hasClass(swiper.params.navigation.hiddenClass); + } else if ($prevEl) { + isHidden = $prevEl.hasClass(swiper.params.navigation.hiddenClass); + } + + if (isHidden === true) { + emit('navigationShow'); + } else { + emit('navigationHide'); + } + + if ($nextEl) { + $nextEl.toggleClass(swiper.params.navigation.hiddenClass); + } + + if ($prevEl) { + $prevEl.toggleClass(swiper.params.navigation.hiddenClass); + } + } + }); + Object.assign(swiper.navigation, { + update, + init, + destroy + }); + } + + function classesToSelector(classes) { + if (classes === void 0) { + classes = ''; + } + + return `.${classes.trim().replace(/([\.:!\/])/g, '\\$1') // eslint-disable-line + .replace(/ /g, '.')}`; + } + + function Pagination(_ref) { + let { + swiper, + extendParams, + on, + emit + } = _ref; + const pfx = 'swiper-pagination'; + extendParams({ + pagination: { + el: null, + bulletElement: 'span', + clickable: false, + hideOnClick: false, + renderBullet: null, + renderProgressbar: null, + renderFraction: null, + renderCustom: null, + progressbarOpposite: false, + type: 'bullets', + // 'bullets' or 'progressbar' or 'fraction' or 'custom' + dynamicBullets: false, + dynamicMainBullets: 1, + formatFractionCurrent: number => number, + formatFractionTotal: number => number, + bulletClass: `${pfx}-bullet`, + bulletActiveClass: `${pfx}-bullet-active`, + modifierClass: `${pfx}-`, + currentClass: `${pfx}-current`, + totalClass: `${pfx}-total`, + hiddenClass: `${pfx}-hidden`, + progressbarFillClass: `${pfx}-progressbar-fill`, + progressbarOppositeClass: `${pfx}-progressbar-opposite`, + clickableClass: `${pfx}-clickable`, + lockClass: `${pfx}-lock`, + horizontalClass: `${pfx}-horizontal`, + verticalClass: `${pfx}-vertical` + } + }); + swiper.pagination = { + el: null, + $el: null, + bullets: [] + }; + let bulletSize; + let dynamicBulletIndex = 0; + + function isPaginationDisabled() { + return !swiper.params.pagination.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0; + } + + function setSideBullets($bulletEl, position) { + const { + bulletActiveClass + } = swiper.params.pagination; + $bulletEl[position]().addClass(`${bulletActiveClass}-${position}`)[position]().addClass(`${bulletActiveClass}-${position}-${position}`); + } + + function update() { + // Render || Update Pagination bullets/items + const rtl = swiper.rtl; + const params = swiper.params.pagination; + if (isPaginationDisabled()) return; + const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length; + const $el = swiper.pagination.$el; // Current/Total + + let current; + const total = swiper.params.loop ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup) : swiper.snapGrid.length; + + if (swiper.params.loop) { + current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup); + + if (current > slidesLength - 1 - swiper.loopedSlides * 2) { + current -= slidesLength - swiper.loopedSlides * 2; + } + + if (current > total - 1) current -= total; + if (current < 0 && swiper.params.paginationType !== 'bullets') current = total + current; + } else if (typeof swiper.snapIndex !== 'undefined') { + current = swiper.snapIndex; + } else { + current = swiper.activeIndex || 0; + } // Types + + + if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) { + const bullets = swiper.pagination.bullets; + let firstIndex; + let lastIndex; + let midIndex; + + if (params.dynamicBullets) { + bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true); + $el.css(swiper.isHorizontal() ? 'width' : 'height', `${bulletSize * (params.dynamicMainBullets + 4)}px`); + + if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) { + dynamicBulletIndex += current - (swiper.previousIndex - swiper.loopedSlides || 0); + + if (dynamicBulletIndex > params.dynamicMainBullets - 1) { + dynamicBulletIndex = params.dynamicMainBullets - 1; + } else if (dynamicBulletIndex < 0) { + dynamicBulletIndex = 0; + } + } + + firstIndex = Math.max(current - dynamicBulletIndex, 0); + lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1); + midIndex = (lastIndex + firstIndex) / 2; + } + + bullets.removeClass(['', '-next', '-next-next', '-prev', '-prev-prev', '-main'].map(suffix => `${params.bulletActiveClass}${suffix}`).join(' ')); + + if ($el.length > 1) { + bullets.each(bullet => { + const $bullet = $(bullet); + const bulletIndex = $bullet.index(); + + if (bulletIndex === current) { + $bullet.addClass(params.bulletActiveClass); + } + + if (params.dynamicBullets) { + if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) { + $bullet.addClass(`${params.bulletActiveClass}-main`); + } + + if (bulletIndex === firstIndex) { + setSideBullets($bullet, 'prev'); + } + + if (bulletIndex === lastIndex) { + setSideBullets($bullet, 'next'); + } + } + }); + } else { + const $bullet = bullets.eq(current); + const bulletIndex = $bullet.index(); + $bullet.addClass(params.bulletActiveClass); + + if (params.dynamicBullets) { + const $firstDisplayedBullet = bullets.eq(firstIndex); + const $lastDisplayedBullet = bullets.eq(lastIndex); + + for (let i = firstIndex; i <= lastIndex; i += 1) { + bullets.eq(i).addClass(`${params.bulletActiveClass}-main`); + } + + if (swiper.params.loop) { + if (bulletIndex >= bullets.length) { + for (let i = params.dynamicMainBullets; i >= 0; i -= 1) { + bullets.eq(bullets.length - i).addClass(`${params.bulletActiveClass}-main`); + } + + bullets.eq(bullets.length - params.dynamicMainBullets - 1).addClass(`${params.bulletActiveClass}-prev`); + } else { + setSideBullets($firstDisplayedBullet, 'prev'); + setSideBullets($lastDisplayedBullet, 'next'); + } + } else { + setSideBullets($firstDisplayedBullet, 'prev'); + setSideBullets($lastDisplayedBullet, 'next'); + } + } + } + + if (params.dynamicBullets) { + const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4); + const bulletsOffset = (bulletSize * dynamicBulletsLength - bulletSize) / 2 - midIndex * bulletSize; + const offsetProp = rtl ? 'right' : 'left'; + bullets.css(swiper.isHorizontal() ? offsetProp : 'top', `${bulletsOffset}px`); + } + } + + if (params.type === 'fraction') { + $el.find(classesToSelector(params.currentClass)).text(params.formatFractionCurrent(current + 1)); + $el.find(classesToSelector(params.totalClass)).text(params.formatFractionTotal(total)); + } + + if (params.type === 'progressbar') { + let progressbarDirection; + + if (params.progressbarOpposite) { + progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal'; + } else { + progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical'; + } + + const scale = (current + 1) / total; + let scaleX = 1; + let scaleY = 1; + + if (progressbarDirection === 'horizontal') { + scaleX = scale; + } else { + scaleY = scale; + } + + $el.find(classesToSelector(params.progressbarFillClass)).transform(`translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`).transition(swiper.params.speed); + } + + if (params.type === 'custom' && params.renderCustom) { + $el.html(params.renderCustom(swiper, current + 1, total)); + emit('paginationRender', $el[0]); + } else { + emit('paginationUpdate', $el[0]); + } + + if (swiper.params.watchOverflow && swiper.enabled) { + $el[swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); + } + } + + function render() { + // Render Container + const params = swiper.params.pagination; + if (isPaginationDisabled()) return; + const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length; + const $el = swiper.pagination.$el; + let paginationHTML = ''; + + if (params.type === 'bullets') { + let numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup) : swiper.snapGrid.length; + + if (swiper.params.freeMode && swiper.params.freeMode.enabled && !swiper.params.loop && numberOfBullets > slidesLength) { + numberOfBullets = slidesLength; + } + + for (let i = 0; i < numberOfBullets; i += 1) { + if (params.renderBullet) { + paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass); + } else { + paginationHTML += `<${params.bulletElement} class="${params.bulletClass}">`; + } + } + + $el.html(paginationHTML); + swiper.pagination.bullets = $el.find(classesToSelector(params.bulletClass)); + } + + if (params.type === 'fraction') { + if (params.renderFraction) { + paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass); + } else { + paginationHTML = `` + ' / ' + ``; + } + + $el.html(paginationHTML); + } + + if (params.type === 'progressbar') { + if (params.renderProgressbar) { + paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass); + } else { + paginationHTML = ``; + } + + $el.html(paginationHTML); + } + + if (params.type !== 'custom') { + emit('paginationRender', swiper.pagination.$el[0]); + } + } + + function init() { + swiper.params.pagination = createElementIfNotDefined(swiper, swiper.originalParams.pagination, swiper.params.pagination, { + el: 'swiper-pagination' + }); + const params = swiper.params.pagination; + if (!params.el) return; + let $el = $(params.el); + if ($el.length === 0) return; + + if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1) { + $el = swiper.$el.find(params.el); // check if it belongs to another nested Swiper + + if ($el.length > 1) { + $el = $el.filter(el => { + if ($(el).parents('.swiper')[0] !== swiper.el) return false; + return true; + }); + } + } + + if (params.type === 'bullets' && params.clickable) { + $el.addClass(params.clickableClass); + } + + $el.addClass(params.modifierClass + params.type); + $el.addClass(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass); + + if (params.type === 'bullets' && params.dynamicBullets) { + $el.addClass(`${params.modifierClass}${params.type}-dynamic`); + dynamicBulletIndex = 0; + + if (params.dynamicMainBullets < 1) { + params.dynamicMainBullets = 1; + } + } + + if (params.type === 'progressbar' && params.progressbarOpposite) { + $el.addClass(params.progressbarOppositeClass); + } + + if (params.clickable) { + $el.on('click', classesToSelector(params.bulletClass), function onClick(e) { + e.preventDefault(); + let index = $(this).index() * swiper.params.slidesPerGroup; + if (swiper.params.loop) index += swiper.loopedSlides; + swiper.slideTo(index); + }); + } + + Object.assign(swiper.pagination, { + $el, + el: $el[0] + }); + + if (!swiper.enabled) { + $el.addClass(params.lockClass); + } + } + + function destroy() { + const params = swiper.params.pagination; + if (isPaginationDisabled()) return; + const $el = swiper.pagination.$el; + $el.removeClass(params.hiddenClass); + $el.removeClass(params.modifierClass + params.type); + $el.removeClass(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass); + if (swiper.pagination.bullets && swiper.pagination.bullets.removeClass) swiper.pagination.bullets.removeClass(params.bulletActiveClass); + + if (params.clickable) { + $el.off('click', classesToSelector(params.bulletClass)); + } + } + + on('init', () => { + init(); + render(); + update(); + }); + on('activeIndexChange', () => { + if (swiper.params.loop) { + update(); + } else if (typeof swiper.snapIndex === 'undefined') { + update(); + } + }); + on('snapIndexChange', () => { + if (!swiper.params.loop) { + update(); + } + }); + on('slidesLengthChange', () => { + if (swiper.params.loop) { + render(); + update(); + } + }); + on('snapGridLengthChange', () => { + if (!swiper.params.loop) { + render(); + update(); + } + }); + on('destroy', () => { + destroy(); + }); + on('enable disable', () => { + const { + $el + } = swiper.pagination; + + if ($el) { + $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.pagination.lockClass); + } + }); + on('lock unlock', () => { + update(); + }); + on('click', (_s, e) => { + const targetEl = e.target; + const { + $el + } = swiper.pagination; + + if (swiper.params.pagination.el && swiper.params.pagination.hideOnClick && $el.length > 0 && !$(targetEl).hasClass(swiper.params.pagination.bulletClass)) { + if (swiper.navigation && (swiper.navigation.nextEl && targetEl === swiper.navigation.nextEl || swiper.navigation.prevEl && targetEl === swiper.navigation.prevEl)) return; + const isHidden = $el.hasClass(swiper.params.pagination.hiddenClass); + + if (isHidden === true) { + emit('paginationShow'); + } else { + emit('paginationHide'); + } + + $el.toggleClass(swiper.params.pagination.hiddenClass); + } + }); + Object.assign(swiper.pagination, { + render, + update, + init, + destroy + }); + } + + function Scrollbar(_ref) { + let { + swiper, + extendParams, + on, + emit + } = _ref; + const document = getDocument(); + let isTouched = false; + let timeout = null; + let dragTimeout = null; + let dragStartPos; + let dragSize; + let trackSize; + let divider; + extendParams({ + scrollbar: { + el: null, + dragSize: 'auto', + hide: false, + draggable: false, + snapOnRelease: true, + lockClass: 'swiper-scrollbar-lock', + dragClass: 'swiper-scrollbar-drag' + } + }); + swiper.scrollbar = { + el: null, + dragEl: null, + $el: null, + $dragEl: null + }; + + function setTranslate() { + if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; + const { + scrollbar, + rtlTranslate: rtl, + progress + } = swiper; + const { + $dragEl, + $el + } = scrollbar; + const params = swiper.params.scrollbar; + let newSize = dragSize; + let newPos = (trackSize - dragSize) * progress; + + if (rtl) { + newPos = -newPos; + + if (newPos > 0) { + newSize = dragSize - newPos; + newPos = 0; + } else if (-newPos + dragSize > trackSize) { + newSize = trackSize + newPos; + } + } else if (newPos < 0) { + newSize = dragSize + newPos; + newPos = 0; + } else if (newPos + dragSize > trackSize) { + newSize = trackSize - newPos; + } + + if (swiper.isHorizontal()) { + $dragEl.transform(`translate3d(${newPos}px, 0, 0)`); + $dragEl[0].style.width = `${newSize}px`; + } else { + $dragEl.transform(`translate3d(0px, ${newPos}px, 0)`); + $dragEl[0].style.height = `${newSize}px`; + } + + if (params.hide) { + clearTimeout(timeout); + $el[0].style.opacity = 1; + timeout = setTimeout(() => { + $el[0].style.opacity = 0; + $el.transition(400); + }, 1000); + } + } + + function setTransition(duration) { + if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; + swiper.scrollbar.$dragEl.transition(duration); + } + + function updateSize() { + if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; + const { + scrollbar + } = swiper; + const { + $dragEl, + $el + } = scrollbar; + $dragEl[0].style.width = ''; + $dragEl[0].style.height = ''; + trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight; + divider = swiper.size / (swiper.virtualSize + swiper.params.slidesOffsetBefore - (swiper.params.centeredSlides ? swiper.snapGrid[0] : 0)); + + if (swiper.params.scrollbar.dragSize === 'auto') { + dragSize = trackSize * divider; + } else { + dragSize = parseInt(swiper.params.scrollbar.dragSize, 10); + } + + if (swiper.isHorizontal()) { + $dragEl[0].style.width = `${dragSize}px`; + } else { + $dragEl[0].style.height = `${dragSize}px`; + } + + if (divider >= 1) { + $el[0].style.display = 'none'; + } else { + $el[0].style.display = ''; + } + + if (swiper.params.scrollbar.hide) { + $el[0].style.opacity = 0; + } + + if (swiper.params.watchOverflow && swiper.enabled) { + scrollbar.$el[swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass); + } + } + + function getPointerPosition(e) { + if (swiper.isHorizontal()) { + return e.type === 'touchstart' || e.type === 'touchmove' ? e.targetTouches[0].clientX : e.clientX; + } + + return e.type === 'touchstart' || e.type === 'touchmove' ? e.targetTouches[0].clientY : e.clientY; + } + + function setDragPosition(e) { + const { + scrollbar, + rtlTranslate: rtl + } = swiper; + const { + $el + } = scrollbar; + let positionRatio; + positionRatio = (getPointerPosition(e) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] - (dragStartPos !== null ? dragStartPos : dragSize / 2)) / (trackSize - dragSize); + positionRatio = Math.max(Math.min(positionRatio, 1), 0); + + if (rtl) { + positionRatio = 1 - positionRatio; + } + + const position = swiper.minTranslate() + (swiper.maxTranslate() - swiper.minTranslate()) * positionRatio; + swiper.updateProgress(position); + swiper.setTranslate(position); + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + } + + function onDragStart(e) { + const params = swiper.params.scrollbar; + const { + scrollbar, + $wrapperEl + } = swiper; + const { + $el, + $dragEl + } = scrollbar; + isTouched = true; + dragStartPos = e.target === $dragEl[0] || e.target === $dragEl ? getPointerPosition(e) - e.target.getBoundingClientRect()[swiper.isHorizontal() ? 'left' : 'top'] : null; + e.preventDefault(); + e.stopPropagation(); + $wrapperEl.transition(100); + $dragEl.transition(100); + setDragPosition(e); + clearTimeout(dragTimeout); + $el.transition(0); + + if (params.hide) { + $el.css('opacity', 1); + } + + if (swiper.params.cssMode) { + swiper.$wrapperEl.css('scroll-snap-type', 'none'); + } + + emit('scrollbarDragStart', e); + } + + function onDragMove(e) { + const { + scrollbar, + $wrapperEl + } = swiper; + const { + $el, + $dragEl + } = scrollbar; + if (!isTouched) return; + if (e.preventDefault) e.preventDefault();else e.returnValue = false; + setDragPosition(e); + $wrapperEl.transition(0); + $el.transition(0); + $dragEl.transition(0); + emit('scrollbarDragMove', e); + } + + function onDragEnd(e) { + const params = swiper.params.scrollbar; + const { + scrollbar, + $wrapperEl + } = swiper; + const { + $el + } = scrollbar; + if (!isTouched) return; + isTouched = false; + + if (swiper.params.cssMode) { + swiper.$wrapperEl.css('scroll-snap-type', ''); + $wrapperEl.transition(''); + } + + if (params.hide) { + clearTimeout(dragTimeout); + dragTimeout = nextTick(() => { + $el.css('opacity', 0); + $el.transition(400); + }, 1000); + } + + emit('scrollbarDragEnd', e); + + if (params.snapOnRelease) { + swiper.slideToClosest(); + } + } + + function events(method) { + const { + scrollbar, + touchEventsTouch, + touchEventsDesktop, + params, + support + } = swiper; + const $el = scrollbar.$el; + const target = $el[0]; + const activeListener = support.passiveListener && params.passiveListeners ? { + passive: false, + capture: false + } : false; + const passiveListener = support.passiveListener && params.passiveListeners ? { + passive: true, + capture: false + } : false; + if (!target) return; + const eventMethod = method === 'on' ? 'addEventListener' : 'removeEventListener'; + + if (!support.touch) { + target[eventMethod](touchEventsDesktop.start, onDragStart, activeListener); + document[eventMethod](touchEventsDesktop.move, onDragMove, activeListener); + document[eventMethod](touchEventsDesktop.end, onDragEnd, passiveListener); + } else { + target[eventMethod](touchEventsTouch.start, onDragStart, activeListener); + target[eventMethod](touchEventsTouch.move, onDragMove, activeListener); + target[eventMethod](touchEventsTouch.end, onDragEnd, passiveListener); + } + } + + function enableDraggable() { + if (!swiper.params.scrollbar.el) return; + events('on'); + } + + function disableDraggable() { + if (!swiper.params.scrollbar.el) return; + events('off'); + } + + function init() { + const { + scrollbar, + $el: $swiperEl + } = swiper; + swiper.params.scrollbar = createElementIfNotDefined(swiper, swiper.originalParams.scrollbar, swiper.params.scrollbar, { + el: 'swiper-scrollbar' + }); + const params = swiper.params.scrollbar; + if (!params.el) return; + let $el = $(params.el); + + if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) { + $el = $swiperEl.find(params.el); + } + + let $dragEl = $el.find(`.${swiper.params.scrollbar.dragClass}`); + + if ($dragEl.length === 0) { + $dragEl = $(`
      `); + $el.append($dragEl); + } + + Object.assign(scrollbar, { + $el, + el: $el[0], + $dragEl, + dragEl: $dragEl[0] + }); + + if (params.draggable) { + enableDraggable(); + } + + if ($el) { + $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.scrollbar.lockClass); + } + } + + function destroy() { + disableDraggable(); + } + + on('init', () => { + init(); + updateSize(); + setTranslate(); + }); + on('update resize observerUpdate lock unlock', () => { + updateSize(); + }); + on('setTranslate', () => { + setTranslate(); + }); + on('setTransition', (_s, duration) => { + setTransition(duration); + }); + on('enable disable', () => { + const { + $el + } = swiper.scrollbar; + + if ($el) { + $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.scrollbar.lockClass); + } + }); + on('destroy', () => { + destroy(); + }); + Object.assign(swiper.scrollbar, { + updateSize, + setTranslate, + init, + destroy + }); + } + + function Parallax(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + parallax: { + enabled: false + } + }); + + const setTransform = (el, progress) => { + const { + rtl + } = swiper; + const $el = $(el); + const rtlFactor = rtl ? -1 : 1; + const p = $el.attr('data-swiper-parallax') || '0'; + let x = $el.attr('data-swiper-parallax-x'); + let y = $el.attr('data-swiper-parallax-y'); + const scale = $el.attr('data-swiper-parallax-scale'); + const opacity = $el.attr('data-swiper-parallax-opacity'); + + if (x || y) { + x = x || '0'; + y = y || '0'; + } else if (swiper.isHorizontal()) { + x = p; + y = '0'; + } else { + y = p; + x = '0'; + } + + if (x.indexOf('%') >= 0) { + x = `${parseInt(x, 10) * progress * rtlFactor}%`; + } else { + x = `${x * progress * rtlFactor}px`; + } + + if (y.indexOf('%') >= 0) { + y = `${parseInt(y, 10) * progress}%`; + } else { + y = `${y * progress}px`; + } + + if (typeof opacity !== 'undefined' && opacity !== null) { + const currentOpacity = opacity - (opacity - 1) * (1 - Math.abs(progress)); + $el[0].style.opacity = currentOpacity; + } + + if (typeof scale === 'undefined' || scale === null) { + $el.transform(`translate3d(${x}, ${y}, 0px)`); + } else { + const currentScale = scale - (scale - 1) * (1 - Math.abs(progress)); + $el.transform(`translate3d(${x}, ${y}, 0px) scale(${currentScale})`); + } + }; + + const setTranslate = () => { + const { + $el, + slides, + progress, + snapGrid + } = swiper; + $el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(el => { + setTransform(el, progress); + }); + slides.each((slideEl, slideIndex) => { + let slideProgress = slideEl.progress; + + if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') { + slideProgress += Math.ceil(slideIndex / 2) - progress * (snapGrid.length - 1); + } + + slideProgress = Math.min(Math.max(slideProgress, -1), 1); + $(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(el => { + setTransform(el, slideProgress); + }); + }); + }; + + const setTransition = function (duration) { + if (duration === void 0) { + duration = swiper.params.speed; + } + + const { + $el + } = swiper; + $el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(parallaxEl => { + const $parallaxEl = $(parallaxEl); + let parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration; + if (duration === 0) parallaxDuration = 0; + $parallaxEl.transition(parallaxDuration); + }); + }; + + on('beforeInit', () => { + if (!swiper.params.parallax.enabled) return; + swiper.params.watchSlidesProgress = true; + swiper.originalParams.watchSlidesProgress = true; + }); + on('init', () => { + if (!swiper.params.parallax.enabled) return; + setTranslate(); + }); + on('setTranslate', () => { + if (!swiper.params.parallax.enabled) return; + setTranslate(); + }); + on('setTransition', (_swiper, duration) => { + if (!swiper.params.parallax.enabled) return; + setTransition(duration); + }); + } + + function Zoom(_ref) { + let { + swiper, + extendParams, + on, + emit + } = _ref; + const window = getWindow(); + extendParams({ + zoom: { + enabled: false, + maxRatio: 3, + minRatio: 1, + toggle: true, + containerClass: 'swiper-zoom-container', + zoomedSlideClass: 'swiper-slide-zoomed' + } + }); + swiper.zoom = { + enabled: false + }; + let currentScale = 1; + let isScaling = false; + let gesturesEnabled; + let fakeGestureTouched; + let fakeGestureMoved; + const gesture = { + $slideEl: undefined, + slideWidth: undefined, + slideHeight: undefined, + $imageEl: undefined, + $imageWrapEl: undefined, + maxRatio: 3 + }; + const image = { + isTouched: undefined, + isMoved: undefined, + currentX: undefined, + currentY: undefined, + minX: undefined, + minY: undefined, + maxX: undefined, + maxY: undefined, + width: undefined, + height: undefined, + startX: undefined, + startY: undefined, + touchesStart: {}, + touchesCurrent: {} + }; + const velocity = { + x: undefined, + y: undefined, + prevPositionX: undefined, + prevPositionY: undefined, + prevTime: undefined + }; + let scale = 1; + Object.defineProperty(swiper.zoom, 'scale', { + get() { + return scale; + }, + + set(value) { + if (scale !== value) { + const imageEl = gesture.$imageEl ? gesture.$imageEl[0] : undefined; + const slideEl = gesture.$slideEl ? gesture.$slideEl[0] : undefined; + emit('zoomChange', value, imageEl, slideEl); + } + + scale = value; + } + + }); + + function getDistanceBetweenTouches(e) { + if (e.targetTouches.length < 2) return 1; + const x1 = e.targetTouches[0].pageX; + const y1 = e.targetTouches[0].pageY; + const x2 = e.targetTouches[1].pageX; + const y2 = e.targetTouches[1].pageY; + const distance = Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2); + return distance; + } // Events + + + function onGestureStart(e) { + const support = swiper.support; + const params = swiper.params.zoom; + fakeGestureTouched = false; + fakeGestureMoved = false; + + if (!support.gestures) { + if (e.type !== 'touchstart' || e.type === 'touchstart' && e.targetTouches.length < 2) { + return; + } + + fakeGestureTouched = true; + gesture.scaleStart = getDistanceBetweenTouches(e); + } + + if (!gesture.$slideEl || !gesture.$slideEl.length) { + gesture.$slideEl = $(e.target).closest(`.${swiper.params.slideClass}`); + if (gesture.$slideEl.length === 0) gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); + gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0); + gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`); + gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; + + if (gesture.$imageWrapEl.length === 0) { + gesture.$imageEl = undefined; + return; + } + } + + if (gesture.$imageEl) { + gesture.$imageEl.transition(0); + } + + isScaling = true; + } + + function onGestureChange(e) { + const support = swiper.support; + const params = swiper.params.zoom; + const zoom = swiper.zoom; + + if (!support.gestures) { + if (e.type !== 'touchmove' || e.type === 'touchmove' && e.targetTouches.length < 2) { + return; + } + + fakeGestureMoved = true; + gesture.scaleMove = getDistanceBetweenTouches(e); + } + + if (!gesture.$imageEl || gesture.$imageEl.length === 0) { + if (e.type === 'gesturechange') onGestureStart(e); + return; + } + + if (support.gestures) { + zoom.scale = e.scale * currentScale; + } else { + zoom.scale = gesture.scaleMove / gesture.scaleStart * currentScale; + } + + if (zoom.scale > gesture.maxRatio) { + zoom.scale = gesture.maxRatio - 1 + (zoom.scale - gesture.maxRatio + 1) ** 0.5; + } + + if (zoom.scale < params.minRatio) { + zoom.scale = params.minRatio + 1 - (params.minRatio - zoom.scale + 1) ** 0.5; + } + + gesture.$imageEl.transform(`translate3d(0,0,0) scale(${zoom.scale})`); + } + + function onGestureEnd(e) { + const device = swiper.device; + const support = swiper.support; + const params = swiper.params.zoom; + const zoom = swiper.zoom; + + if (!support.gestures) { + if (!fakeGestureTouched || !fakeGestureMoved) { + return; + } + + if (e.type !== 'touchend' || e.type === 'touchend' && e.changedTouches.length < 2 && !device.android) { + return; + } + + fakeGestureTouched = false; + fakeGestureMoved = false; + } + + if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; + zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio); + gesture.$imageEl.transition(swiper.params.speed).transform(`translate3d(0,0,0) scale(${zoom.scale})`); + currentScale = zoom.scale; + isScaling = false; + if (zoom.scale === 1) gesture.$slideEl = undefined; + } + + function onTouchStart(e) { + const device = swiper.device; + if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; + if (image.isTouched) return; + if (device.android && e.cancelable) e.preventDefault(); + image.isTouched = true; + image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + } + + function onTouchMove(e) { + const zoom = swiper.zoom; + if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; + swiper.allowClick = false; + if (!image.isTouched || !gesture.$slideEl) return; + + if (!image.isMoved) { + image.width = gesture.$imageEl[0].offsetWidth; + image.height = gesture.$imageEl[0].offsetHeight; + image.startX = getTranslate(gesture.$imageWrapEl[0], 'x') || 0; + image.startY = getTranslate(gesture.$imageWrapEl[0], 'y') || 0; + gesture.slideWidth = gesture.$slideEl[0].offsetWidth; + gesture.slideHeight = gesture.$slideEl[0].offsetHeight; + gesture.$imageWrapEl.transition(0); + } // Define if we need image drag + + + const scaledWidth = image.width * zoom.scale; + const scaledHeight = image.height * zoom.scale; + if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return; + image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0); + image.maxX = -image.minX; + image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0); + image.maxY = -image.minY; + image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + + if (!image.isMoved && !isScaling) { + if (swiper.isHorizontal() && (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x || Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)) { + image.isTouched = false; + return; + } + + if (!swiper.isHorizontal() && (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y || Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)) { + image.isTouched = false; + return; + } + } + + if (e.cancelable) { + e.preventDefault(); + } + + e.stopPropagation(); + image.isMoved = true; + image.currentX = image.touchesCurrent.x - image.touchesStart.x + image.startX; + image.currentY = image.touchesCurrent.y - image.touchesStart.y + image.startY; + + if (image.currentX < image.minX) { + image.currentX = image.minX + 1 - (image.minX - image.currentX + 1) ** 0.8; + } + + if (image.currentX > image.maxX) { + image.currentX = image.maxX - 1 + (image.currentX - image.maxX + 1) ** 0.8; + } + + if (image.currentY < image.minY) { + image.currentY = image.minY + 1 - (image.minY - image.currentY + 1) ** 0.8; + } + + if (image.currentY > image.maxY) { + image.currentY = image.maxY - 1 + (image.currentY - image.maxY + 1) ** 0.8; + } // Velocity + + + if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x; + if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y; + if (!velocity.prevTime) velocity.prevTime = Date.now(); + velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2; + velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2; + if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0; + if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0; + velocity.prevPositionX = image.touchesCurrent.x; + velocity.prevPositionY = image.touchesCurrent.y; + velocity.prevTime = Date.now(); + gesture.$imageWrapEl.transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`); + } + + function onTouchEnd() { + const zoom = swiper.zoom; + if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; + + if (!image.isTouched || !image.isMoved) { + image.isTouched = false; + image.isMoved = false; + return; + } + + image.isTouched = false; + image.isMoved = false; + let momentumDurationX = 300; + let momentumDurationY = 300; + const momentumDistanceX = velocity.x * momentumDurationX; + const newPositionX = image.currentX + momentumDistanceX; + const momentumDistanceY = velocity.y * momentumDurationY; + const newPositionY = image.currentY + momentumDistanceY; // Fix duration + + if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x); + if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y); + const momentumDuration = Math.max(momentumDurationX, momentumDurationY); + image.currentX = newPositionX; + image.currentY = newPositionY; // Define if we need image drag + + const scaledWidth = image.width * zoom.scale; + const scaledHeight = image.height * zoom.scale; + image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0); + image.maxX = -image.minX; + image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0); + image.maxY = -image.minY; + image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX); + image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY); + gesture.$imageWrapEl.transition(momentumDuration).transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`); + } + + function onTransitionEnd() { + const zoom = swiper.zoom; + + if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) { + if (gesture.$imageEl) { + gesture.$imageEl.transform('translate3d(0,0,0) scale(1)'); + } + + if (gesture.$imageWrapEl) { + gesture.$imageWrapEl.transform('translate3d(0,0,0)'); + } + + zoom.scale = 1; + currentScale = 1; + gesture.$slideEl = undefined; + gesture.$imageEl = undefined; + gesture.$imageWrapEl = undefined; + } + } + + function zoomIn(e) { + const zoom = swiper.zoom; + const params = swiper.params.zoom; + + if (!gesture.$slideEl) { + if (e && e.target) { + gesture.$slideEl = $(e.target).closest(`.${swiper.params.slideClass}`); + } + + if (!gesture.$slideEl) { + if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) { + gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`); + } else { + gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); + } + } + + gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0); + gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`); + } + + if (!gesture.$imageEl || gesture.$imageEl.length === 0 || !gesture.$imageWrapEl || gesture.$imageWrapEl.length === 0) return; + + if (swiper.params.cssMode) { + swiper.wrapperEl.style.overflow = 'hidden'; + swiper.wrapperEl.style.touchAction = 'none'; + } + + gesture.$slideEl.addClass(`${params.zoomedSlideClass}`); + let touchX; + let touchY; + let offsetX; + let offsetY; + let diffX; + let diffY; + let translateX; + let translateY; + let imageWidth; + let imageHeight; + let scaledWidth; + let scaledHeight; + let translateMinX; + let translateMinY; + let translateMaxX; + let translateMaxY; + let slideWidth; + let slideHeight; + + if (typeof image.touchesStart.x === 'undefined' && e) { + touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX; + touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY; + } else { + touchX = image.touchesStart.x; + touchY = image.touchesStart.y; + } + + zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; + currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; + + if (e) { + slideWidth = gesture.$slideEl[0].offsetWidth; + slideHeight = gesture.$slideEl[0].offsetHeight; + offsetX = gesture.$slideEl.offset().left + window.scrollX; + offsetY = gesture.$slideEl.offset().top + window.scrollY; + diffX = offsetX + slideWidth / 2 - touchX; + diffY = offsetY + slideHeight / 2 - touchY; + imageWidth = gesture.$imageEl[0].offsetWidth; + imageHeight = gesture.$imageEl[0].offsetHeight; + scaledWidth = imageWidth * zoom.scale; + scaledHeight = imageHeight * zoom.scale; + translateMinX = Math.min(slideWidth / 2 - scaledWidth / 2, 0); + translateMinY = Math.min(slideHeight / 2 - scaledHeight / 2, 0); + translateMaxX = -translateMinX; + translateMaxY = -translateMinY; + translateX = diffX * zoom.scale; + translateY = diffY * zoom.scale; + + if (translateX < translateMinX) { + translateX = translateMinX; + } + + if (translateX > translateMaxX) { + translateX = translateMaxX; + } + + if (translateY < translateMinY) { + translateY = translateMinY; + } + + if (translateY > translateMaxY) { + translateY = translateMaxY; + } + } else { + translateX = 0; + translateY = 0; + } + + gesture.$imageWrapEl.transition(300).transform(`translate3d(${translateX}px, ${translateY}px,0)`); + gesture.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${zoom.scale})`); + } + + function zoomOut() { + const zoom = swiper.zoom; + const params = swiper.params.zoom; + + if (!gesture.$slideEl) { + if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) { + gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`); + } else { + gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); + } + + gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0); + gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`); + } + + if (!gesture.$imageEl || gesture.$imageEl.length === 0 || !gesture.$imageWrapEl || gesture.$imageWrapEl.length === 0) return; + + if (swiper.params.cssMode) { + swiper.wrapperEl.style.overflow = ''; + swiper.wrapperEl.style.touchAction = ''; + } + + zoom.scale = 1; + currentScale = 1; + gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)'); + gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)'); + gesture.$slideEl.removeClass(`${params.zoomedSlideClass}`); + gesture.$slideEl = undefined; + } // Toggle Zoom + + + function zoomToggle(e) { + const zoom = swiper.zoom; + + if (zoom.scale && zoom.scale !== 1) { + // Zoom Out + zoomOut(); + } else { + // Zoom In + zoomIn(e); + } + } + + function getListeners() { + const support = swiper.support; + const passiveListener = swiper.touchEvents.start === 'touchstart' && support.passiveListener && swiper.params.passiveListeners ? { + passive: true, + capture: false + } : false; + const activeListenerWithCapture = support.passiveListener ? { + passive: false, + capture: true + } : true; + return { + passiveListener, + activeListenerWithCapture + }; + } + + function getSlideSelector() { + return `.${swiper.params.slideClass}`; + } + + function toggleGestures(method) { + const { + passiveListener + } = getListeners(); + const slideSelector = getSlideSelector(); + swiper.$wrapperEl[method]('gesturestart', slideSelector, onGestureStart, passiveListener); + swiper.$wrapperEl[method]('gesturechange', slideSelector, onGestureChange, passiveListener); + swiper.$wrapperEl[method]('gestureend', slideSelector, onGestureEnd, passiveListener); + } + + function enableGestures() { + if (gesturesEnabled) return; + gesturesEnabled = true; + toggleGestures('on'); + } + + function disableGestures() { + if (!gesturesEnabled) return; + gesturesEnabled = false; + toggleGestures('off'); + } // Attach/Detach Events + + + function enable() { + const zoom = swiper.zoom; + if (zoom.enabled) return; + zoom.enabled = true; + const support = swiper.support; + const { + passiveListener, + activeListenerWithCapture + } = getListeners(); + const slideSelector = getSlideSelector(); // Scale image + + if (support.gestures) { + swiper.$wrapperEl.on(swiper.touchEvents.start, enableGestures, passiveListener); + swiper.$wrapperEl.on(swiper.touchEvents.end, disableGestures, passiveListener); + } else if (swiper.touchEvents.start === 'touchstart') { + swiper.$wrapperEl.on(swiper.touchEvents.start, slideSelector, onGestureStart, passiveListener); + swiper.$wrapperEl.on(swiper.touchEvents.move, slideSelector, onGestureChange, activeListenerWithCapture); + swiper.$wrapperEl.on(swiper.touchEvents.end, slideSelector, onGestureEnd, passiveListener); + + if (swiper.touchEvents.cancel) { + swiper.$wrapperEl.on(swiper.touchEvents.cancel, slideSelector, onGestureEnd, passiveListener); + } + } // Move image + + + swiper.$wrapperEl.on(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, onTouchMove, activeListenerWithCapture); + } + + function disable() { + const zoom = swiper.zoom; + if (!zoom.enabled) return; + const support = swiper.support; + zoom.enabled = false; + const { + passiveListener, + activeListenerWithCapture + } = getListeners(); + const slideSelector = getSlideSelector(); // Scale image + + if (support.gestures) { + swiper.$wrapperEl.off(swiper.touchEvents.start, enableGestures, passiveListener); + swiper.$wrapperEl.off(swiper.touchEvents.end, disableGestures, passiveListener); + } else if (swiper.touchEvents.start === 'touchstart') { + swiper.$wrapperEl.off(swiper.touchEvents.start, slideSelector, onGestureStart, passiveListener); + swiper.$wrapperEl.off(swiper.touchEvents.move, slideSelector, onGestureChange, activeListenerWithCapture); + swiper.$wrapperEl.off(swiper.touchEvents.end, slideSelector, onGestureEnd, passiveListener); + + if (swiper.touchEvents.cancel) { + swiper.$wrapperEl.off(swiper.touchEvents.cancel, slideSelector, onGestureEnd, passiveListener); + } + } // Move image + + + swiper.$wrapperEl.off(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, onTouchMove, activeListenerWithCapture); + } + + on('init', () => { + if (swiper.params.zoom.enabled) { + enable(); + } + }); + on('destroy', () => { + disable(); + }); + on('touchStart', (_s, e) => { + if (!swiper.zoom.enabled) return; + onTouchStart(e); + }); + on('touchEnd', (_s, e) => { + if (!swiper.zoom.enabled) return; + onTouchEnd(); + }); + on('doubleTap', (_s, e) => { + if (!swiper.animating && swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) { + zoomToggle(e); + } + }); + on('transitionEnd', () => { + if (swiper.zoom.enabled && swiper.params.zoom.enabled) { + onTransitionEnd(); + } + }); + on('slideChange', () => { + if (swiper.zoom.enabled && swiper.params.zoom.enabled && swiper.params.cssMode) { + onTransitionEnd(); + } + }); + Object.assign(swiper.zoom, { + enable, + disable, + in: zoomIn, + out: zoomOut, + toggle: zoomToggle + }); + } + + function Lazy(_ref) { + let { + swiper, + extendParams, + on, + emit + } = _ref; + extendParams({ + lazy: { + checkInView: false, + enabled: false, + loadPrevNext: false, + loadPrevNextAmount: 1, + loadOnTransitionStart: false, + scrollingElement: '', + elementClass: 'swiper-lazy', + loadingClass: 'swiper-lazy-loading', + loadedClass: 'swiper-lazy-loaded', + preloaderClass: 'swiper-lazy-preloader' + } + }); + swiper.lazy = {}; + let scrollHandlerAttached = false; + let initialImageLoaded = false; + + function loadInSlide(index, loadInDuplicate) { + if (loadInDuplicate === void 0) { + loadInDuplicate = true; + } + + const params = swiper.params.lazy; + if (typeof index === 'undefined') return; + if (swiper.slides.length === 0) return; + const isVirtual = swiper.virtual && swiper.params.virtual.enabled; + const $slideEl = isVirtual ? swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-swiper-slide-index="${index}"]`) : swiper.slides.eq(index); + const $images = $slideEl.find(`.${params.elementClass}:not(.${params.loadedClass}):not(.${params.loadingClass})`); + + if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) { + $images.push($slideEl[0]); + } + + if ($images.length === 0) return; + $images.each(imageEl => { + const $imageEl = $(imageEl); + $imageEl.addClass(params.loadingClass); + const background = $imageEl.attr('data-background'); + const src = $imageEl.attr('data-src'); + const srcset = $imageEl.attr('data-srcset'); + const sizes = $imageEl.attr('data-sizes'); + const $pictureEl = $imageEl.parent('picture'); + swiper.loadImage($imageEl[0], src || background, srcset, sizes, false, () => { + if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper && !swiper.params || swiper.destroyed) return; + + if (background) { + $imageEl.css('background-image', `url("${background}")`); + $imageEl.removeAttr('data-background'); + } else { + if (srcset) { + $imageEl.attr('srcset', srcset); + $imageEl.removeAttr('data-srcset'); + } + + if (sizes) { + $imageEl.attr('sizes', sizes); + $imageEl.removeAttr('data-sizes'); + } + + if ($pictureEl.length) { + $pictureEl.children('source').each(sourceEl => { + const $source = $(sourceEl); + + if ($source.attr('data-srcset')) { + $source.attr('srcset', $source.attr('data-srcset')); + $source.removeAttr('data-srcset'); + } + }); + } + + if (src) { + $imageEl.attr('src', src); + $imageEl.removeAttr('data-src'); + } + } + + $imageEl.addClass(params.loadedClass).removeClass(params.loadingClass); + $slideEl.find(`.${params.preloaderClass}`).remove(); + + if (swiper.params.loop && loadInDuplicate) { + const slideOriginalIndex = $slideEl.attr('data-swiper-slide-index'); + + if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) { + const originalSlide = swiper.$wrapperEl.children(`[data-swiper-slide-index="${slideOriginalIndex}"]:not(.${swiper.params.slideDuplicateClass})`); + loadInSlide(originalSlide.index(), false); + } else { + const duplicatedSlide = swiper.$wrapperEl.children(`.${swiper.params.slideDuplicateClass}[data-swiper-slide-index="${slideOriginalIndex}"]`); + loadInSlide(duplicatedSlide.index(), false); + } + } + + emit('lazyImageReady', $slideEl[0], $imageEl[0]); + + if (swiper.params.autoHeight) { + swiper.updateAutoHeight(); + } + }); + emit('lazyImageLoad', $slideEl[0], $imageEl[0]); + }); + } + + function load() { + const { + $wrapperEl, + params: swiperParams, + slides, + activeIndex + } = swiper; + const isVirtual = swiper.virtual && swiperParams.virtual.enabled; + const params = swiperParams.lazy; + let slidesPerView = swiperParams.slidesPerView; + + if (slidesPerView === 'auto') { + slidesPerView = 0; + } + + function slideExist(index) { + if (isVirtual) { + if ($wrapperEl.children(`.${swiperParams.slideClass}[data-swiper-slide-index="${index}"]`).length) { + return true; + } + } else if (slides[index]) return true; + + return false; + } + + function slideIndex(slideEl) { + if (isVirtual) { + return $(slideEl).attr('data-swiper-slide-index'); + } + + return $(slideEl).index(); + } + + if (!initialImageLoaded) initialImageLoaded = true; + + if (swiper.params.watchSlidesProgress) { + $wrapperEl.children(`.${swiperParams.slideVisibleClass}`).each(slideEl => { + const index = isVirtual ? $(slideEl).attr('data-swiper-slide-index') : $(slideEl).index(); + loadInSlide(index); + }); + } else if (slidesPerView > 1) { + for (let i = activeIndex; i < activeIndex + slidesPerView; i += 1) { + if (slideExist(i)) loadInSlide(i); + } + } else { + loadInSlide(activeIndex); + } + + if (params.loadPrevNext) { + if (slidesPerView > 1 || params.loadPrevNextAmount && params.loadPrevNextAmount > 1) { + const amount = params.loadPrevNextAmount; + const spv = slidesPerView; + const maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length); + const minIndex = Math.max(activeIndex - Math.max(spv, amount), 0); // Next Slides + + for (let i = activeIndex + slidesPerView; i < maxIndex; i += 1) { + if (slideExist(i)) loadInSlide(i); + } // Prev Slides + + + for (let i = minIndex; i < activeIndex; i += 1) { + if (slideExist(i)) loadInSlide(i); + } + } else { + const nextSlide = $wrapperEl.children(`.${swiperParams.slideNextClass}`); + if (nextSlide.length > 0) loadInSlide(slideIndex(nextSlide)); + const prevSlide = $wrapperEl.children(`.${swiperParams.slidePrevClass}`); + if (prevSlide.length > 0) loadInSlide(slideIndex(prevSlide)); + } + } + } + + function checkInViewOnLoad() { + const window = getWindow(); + if (!swiper || swiper.destroyed) return; + const $scrollElement = swiper.params.lazy.scrollingElement ? $(swiper.params.lazy.scrollingElement) : $(window); + const isWindow = $scrollElement[0] === window; + const scrollElementWidth = isWindow ? window.innerWidth : $scrollElement[0].offsetWidth; + const scrollElementHeight = isWindow ? window.innerHeight : $scrollElement[0].offsetHeight; + const swiperOffset = swiper.$el.offset(); + const { + rtlTranslate: rtl + } = swiper; + let inView = false; + if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft; + const swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiper.width, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiper.height], [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height]]; + + for (let i = 0; i < swiperCoord.length; i += 1) { + const point = swiperCoord[i]; + + if (point[0] >= 0 && point[0] <= scrollElementWidth && point[1] >= 0 && point[1] <= scrollElementHeight) { + if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line + + inView = true; + } + } + + const passiveListener = swiper.touchEvents.start === 'touchstart' && swiper.support.passiveListener && swiper.params.passiveListeners ? { + passive: true, + capture: false + } : false; + + if (inView) { + load(); + $scrollElement.off('scroll', checkInViewOnLoad, passiveListener); + } else if (!scrollHandlerAttached) { + scrollHandlerAttached = true; + $scrollElement.on('scroll', checkInViewOnLoad, passiveListener); + } + } + + on('beforeInit', () => { + if (swiper.params.lazy.enabled && swiper.params.preloadImages) { + swiper.params.preloadImages = false; + } + }); + on('init', () => { + if (swiper.params.lazy.enabled) { + if (swiper.params.lazy.checkInView) { + checkInViewOnLoad(); + } else { + load(); + } + } + }); + on('scroll', () => { + if (swiper.params.freeMode && swiper.params.freeMode.enabled && !swiper.params.freeMode.sticky) { + load(); + } + }); + on('scrollbarDragMove resize _freeModeNoMomentumRelease', () => { + if (swiper.params.lazy.enabled) { + if (swiper.params.lazy.checkInView) { + checkInViewOnLoad(); + } else { + load(); + } + } + }); + on('transitionStart', () => { + if (swiper.params.lazy.enabled) { + if (swiper.params.lazy.loadOnTransitionStart || !swiper.params.lazy.loadOnTransitionStart && !initialImageLoaded) { + if (swiper.params.lazy.checkInView) { + checkInViewOnLoad(); + } else { + load(); + } + } + } + }); + on('transitionEnd', () => { + if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) { + if (swiper.params.lazy.checkInView) { + checkInViewOnLoad(); + } else { + load(); + } + } + }); + on('slideChange', () => { + const { + lazy, + cssMode, + watchSlidesProgress, + touchReleaseOnEdges, + resistanceRatio + } = swiper.params; + + if (lazy.enabled && (cssMode || watchSlidesProgress && (touchReleaseOnEdges || resistanceRatio === 0))) { + load(); + } + }); + Object.assign(swiper.lazy, { + load, + loadInSlide + }); + } + + /* eslint no-bitwise: ["error", { "allow": [">>"] }] */ + function Controller(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + controller: { + control: undefined, + inverse: false, + by: 'slide' // or 'container' + + } + }); + swiper.controller = { + control: undefined + }; + + function LinearSpline(x, y) { + const binarySearch = function search() { + let maxIndex; + let minIndex; + let guess; + return (array, val) => { + minIndex = -1; + maxIndex = array.length; + + while (maxIndex - minIndex > 1) { + guess = maxIndex + minIndex >> 1; + + if (array[guess] <= val) { + minIndex = guess; + } else { + maxIndex = guess; + } + } + + return maxIndex; + }; + }(); + + this.x = x; + this.y = y; + this.lastIndex = x.length - 1; // Given an x value (x2), return the expected y2 value: + // (x1,y1) is the known point before given value, + // (x3,y3) is the known point after given value. + + let i1; + let i3; + + this.interpolate = function interpolate(x2) { + if (!x2) return 0; // Get the indexes of x1 and x3 (the array indexes before and after given x2): + + i3 = binarySearch(this.x, x2); + i1 = i3 - 1; // We have our indexes i1 & i3, so we can calculate already: + // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1 + + return (x2 - this.x[i1]) * (this.y[i3] - this.y[i1]) / (this.x[i3] - this.x[i1]) + this.y[i1]; + }; + + return this; + } // xxx: for now i will just save one spline function to to + + + function getInterpolateFunction(c) { + if (!swiper.controller.spline) { + swiper.controller.spline = swiper.params.loop ? new LinearSpline(swiper.slidesGrid, c.slidesGrid) : new LinearSpline(swiper.snapGrid, c.snapGrid); + } + } + + function setTranslate(_t, byController) { + const controlled = swiper.controller.control; + let multiplier; + let controlledTranslate; + const Swiper = swiper.constructor; + + function setControlledTranslate(c) { + // this will create an Interpolate function based on the snapGrids + // x is the Grid of the scrolled scroller and y will be the controlled scroller + // it makes sense to create this only once and recall it for the interpolation + // the function does a lot of value caching for performance + const translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate; + + if (swiper.params.controller.by === 'slide') { + getInterpolateFunction(c); // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid + // but it did not work out + + controlledTranslate = -swiper.controller.spline.interpolate(-translate); + } + + if (!controlledTranslate || swiper.params.controller.by === 'container') { + multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate()); + controlledTranslate = (translate - swiper.minTranslate()) * multiplier + c.minTranslate(); + } + + if (swiper.params.controller.inverse) { + controlledTranslate = c.maxTranslate() - controlledTranslate; + } + + c.updateProgress(controlledTranslate); + c.setTranslate(controlledTranslate, swiper); + c.updateActiveIndex(); + c.updateSlidesClasses(); + } + + if (Array.isArray(controlled)) { + for (let i = 0; i < controlled.length; i += 1) { + if (controlled[i] !== byController && controlled[i] instanceof Swiper) { + setControlledTranslate(controlled[i]); + } + } + } else if (controlled instanceof Swiper && byController !== controlled) { + setControlledTranslate(controlled); + } + } + + function setTransition(duration, byController) { + const Swiper = swiper.constructor; + const controlled = swiper.controller.control; + let i; + + function setControlledTransition(c) { + c.setTransition(duration, swiper); + + if (duration !== 0) { + c.transitionStart(); + + if (c.params.autoHeight) { + nextTick(() => { + c.updateAutoHeight(); + }); + } + + c.$wrapperEl.transitionEnd(() => { + if (!controlled) return; + + if (c.params.loop && swiper.params.controller.by === 'slide') { + c.loopFix(); + } + + c.transitionEnd(); + }); + } + } + + if (Array.isArray(controlled)) { + for (i = 0; i < controlled.length; i += 1) { + if (controlled[i] !== byController && controlled[i] instanceof Swiper) { + setControlledTransition(controlled[i]); + } + } + } else if (controlled instanceof Swiper && byController !== controlled) { + setControlledTransition(controlled); + } + } + + function removeSpline() { + if (!swiper.controller.control) return; + + if (swiper.controller.spline) { + swiper.controller.spline = undefined; + delete swiper.controller.spline; + } + } + + on('beforeInit', () => { + swiper.controller.control = swiper.params.controller.control; + }); + on('update', () => { + removeSpline(); + }); + on('resize', () => { + removeSpline(); + }); + on('observerUpdate', () => { + removeSpline(); + }); + on('setTranslate', (_s, translate, byController) => { + if (!swiper.controller.control) return; + swiper.controller.setTranslate(translate, byController); + }); + on('setTransition', (_s, duration, byController) => { + if (!swiper.controller.control) return; + swiper.controller.setTransition(duration, byController); + }); + Object.assign(swiper.controller, { + setTranslate, + setTransition + }); + } + + function A11y(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + a11y: { + enabled: true, + notificationClass: 'swiper-notification', + prevSlideMessage: 'Previous slide', + nextSlideMessage: 'Next slide', + firstSlideMessage: 'This is the first slide', + lastSlideMessage: 'This is the last slide', + paginationBulletMessage: 'Go to slide {{index}}', + slideLabelMessage: '{{index}} / {{slidesLength}}', + containerMessage: null, + containerRoleDescriptionMessage: null, + itemRoleDescriptionMessage: null, + slideRole: 'group', + id: null + } + }); + let liveRegion = null; + + function notify(message) { + const notification = liveRegion; + if (notification.length === 0) return; + notification.html(''); + notification.html(message); + } + + function getRandomNumber(size) { + if (size === void 0) { + size = 16; + } + + const randomChar = () => Math.round(16 * Math.random()).toString(16); + + return 'x'.repeat(size).replace(/x/g, randomChar); + } + + function makeElFocusable($el) { + $el.attr('tabIndex', '0'); + } + + function makeElNotFocusable($el) { + $el.attr('tabIndex', '-1'); + } + + function addElRole($el, role) { + $el.attr('role', role); + } + + function addElRoleDescription($el, description) { + $el.attr('aria-roledescription', description); + } + + function addElControls($el, controls) { + $el.attr('aria-controls', controls); + } + + function addElLabel($el, label) { + $el.attr('aria-label', label); + } + + function addElId($el, id) { + $el.attr('id', id); + } + + function addElLive($el, live) { + $el.attr('aria-live', live); + } + + function disableEl($el) { + $el.attr('aria-disabled', true); + } + + function enableEl($el) { + $el.attr('aria-disabled', false); + } + + function onEnterOrSpaceKey(e) { + if (e.keyCode !== 13 && e.keyCode !== 32) return; + const params = swiper.params.a11y; + const $targetEl = $(e.target); + + if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) { + if (!(swiper.isEnd && !swiper.params.loop)) { + swiper.slideNext(); + } + + if (swiper.isEnd) { + notify(params.lastSlideMessage); + } else { + notify(params.nextSlideMessage); + } + } + + if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) { + if (!(swiper.isBeginning && !swiper.params.loop)) { + swiper.slidePrev(); + } + + if (swiper.isBeginning) { + notify(params.firstSlideMessage); + } else { + notify(params.prevSlideMessage); + } + } + + if (swiper.pagination && $targetEl.is(classesToSelector(swiper.params.pagination.bulletClass))) { + $targetEl[0].click(); + } + } + + function updateNavigation() { + if (swiper.params.loop || swiper.params.rewind || !swiper.navigation) return; + const { + $nextEl, + $prevEl + } = swiper.navigation; + + if ($prevEl && $prevEl.length > 0) { + if (swiper.isBeginning) { + disableEl($prevEl); + makeElNotFocusable($prevEl); + } else { + enableEl($prevEl); + makeElFocusable($prevEl); + } + } + + if ($nextEl && $nextEl.length > 0) { + if (swiper.isEnd) { + disableEl($nextEl); + makeElNotFocusable($nextEl); + } else { + enableEl($nextEl); + makeElFocusable($nextEl); + } + } + } + + function hasPagination() { + return swiper.pagination && swiper.pagination.bullets && swiper.pagination.bullets.length; + } + + function hasClickablePagination() { + return hasPagination() && swiper.params.pagination.clickable; + } + + function updatePagination() { + const params = swiper.params.a11y; + if (!hasPagination()) return; + swiper.pagination.bullets.each(bulletEl => { + const $bulletEl = $(bulletEl); + + if (swiper.params.pagination.clickable) { + makeElFocusable($bulletEl); + + if (!swiper.params.pagination.renderBullet) { + addElRole($bulletEl, 'button'); + addElLabel($bulletEl, params.paginationBulletMessage.replace(/\{\{index\}\}/, $bulletEl.index() + 1)); + } + } + + if ($bulletEl.is(`.${swiper.params.pagination.bulletActiveClass}`)) { + $bulletEl.attr('aria-current', 'true'); + } else { + $bulletEl.removeAttr('aria-current'); + } + }); + } + + const initNavEl = ($el, wrapperId, message) => { + makeElFocusable($el); + + if ($el[0].tagName !== 'BUTTON') { + addElRole($el, 'button'); + $el.on('keydown', onEnterOrSpaceKey); + } + + addElLabel($el, message); + addElControls($el, wrapperId); + }; + + const handleFocus = e => { + const slideEl = e.target.closest(`.${swiper.params.slideClass}`); + if (!slideEl || !swiper.slides.includes(slideEl)) return; + const isActive = swiper.slides.indexOf(slideEl) === swiper.activeIndex; + const isVisible = swiper.params.watchSlidesProgress && swiper.visibleSlides && swiper.visibleSlides.includes(slideEl); + if (isActive || isVisible) return; + swiper.slideTo(swiper.slides.indexOf(slideEl), 0); + }; + + function init() { + const params = swiper.params.a11y; + swiper.$el.append(liveRegion); // Container + + const $containerEl = swiper.$el; + + if (params.containerRoleDescriptionMessage) { + addElRoleDescription($containerEl, params.containerRoleDescriptionMessage); + } + + if (params.containerMessage) { + addElLabel($containerEl, params.containerMessage); + } // Wrapper + + + const $wrapperEl = swiper.$wrapperEl; + const wrapperId = params.id || $wrapperEl.attr('id') || `swiper-wrapper-${getRandomNumber(16)}`; + const live = swiper.params.autoplay && swiper.params.autoplay.enabled ? 'off' : 'polite'; + addElId($wrapperEl, wrapperId); + addElLive($wrapperEl, live); // Slide + + if (params.itemRoleDescriptionMessage) { + addElRoleDescription($(swiper.slides), params.itemRoleDescriptionMessage); + } + + addElRole($(swiper.slides), params.slideRole); + const slidesLength = swiper.params.loop ? swiper.slides.filter(el => !el.classList.contains(swiper.params.slideDuplicateClass)).length : swiper.slides.length; + swiper.slides.each((slideEl, index) => { + const $slideEl = $(slideEl); + const slideIndex = swiper.params.loop ? parseInt($slideEl.attr('data-swiper-slide-index'), 10) : index; + const ariaLabelMessage = params.slideLabelMessage.replace(/\{\{index\}\}/, slideIndex + 1).replace(/\{\{slidesLength\}\}/, slidesLength); + addElLabel($slideEl, ariaLabelMessage); + }); // Navigation + + let $nextEl; + let $prevEl; + + if (swiper.navigation && swiper.navigation.$nextEl) { + $nextEl = swiper.navigation.$nextEl; + } + + if (swiper.navigation && swiper.navigation.$prevEl) { + $prevEl = swiper.navigation.$prevEl; + } + + if ($nextEl && $nextEl.length) { + initNavEl($nextEl, wrapperId, params.nextSlideMessage); + } + + if ($prevEl && $prevEl.length) { + initNavEl($prevEl, wrapperId, params.prevSlideMessage); + } // Pagination + + + if (hasClickablePagination()) { + swiper.pagination.$el.on('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey); + } // Tab focus + + + swiper.$el.on('focus', handleFocus, true); + } + + function destroy() { + if (liveRegion && liveRegion.length > 0) liveRegion.remove(); + let $nextEl; + let $prevEl; + + if (swiper.navigation && swiper.navigation.$nextEl) { + $nextEl = swiper.navigation.$nextEl; + } + + if (swiper.navigation && swiper.navigation.$prevEl) { + $prevEl = swiper.navigation.$prevEl; + } + + if ($nextEl) { + $nextEl.off('keydown', onEnterOrSpaceKey); + } + + if ($prevEl) { + $prevEl.off('keydown', onEnterOrSpaceKey); + } // Pagination + + + if (hasClickablePagination()) { + swiper.pagination.$el.off('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey); + } // Tab focus + + + swiper.$el.off('focus', handleFocus, true); + } + + on('beforeInit', () => { + liveRegion = $(``); + }); + on('afterInit', () => { + if (!swiper.params.a11y.enabled) return; + init(); + }); + on('fromEdge toEdge afterInit lock unlock', () => { + if (!swiper.params.a11y.enabled) return; + updateNavigation(); + }); + on('paginationUpdate', () => { + if (!swiper.params.a11y.enabled) return; + updatePagination(); + }); + on('destroy', () => { + if (!swiper.params.a11y.enabled) return; + destroy(); + }); + } + + function History(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + history: { + enabled: false, + root: '', + replaceState: false, + key: 'slides' + } + }); + let initialized = false; + let paths = {}; + + const slugify = text => { + return text.toString().replace(/\s+/g, '-').replace(/[^\w-]+/g, '').replace(/--+/g, '-').replace(/^-+/, '').replace(/-+$/, ''); + }; + + const getPathValues = urlOverride => { + const window = getWindow(); + let location; + + if (urlOverride) { + location = new URL(urlOverride); + } else { + location = window.location; + } + + const pathArray = location.pathname.slice(1).split('/').filter(part => part !== ''); + const total = pathArray.length; + const key = pathArray[total - 2]; + const value = pathArray[total - 1]; + return { + key, + value + }; + }; + + const setHistory = (key, index) => { + const window = getWindow(); + if (!initialized || !swiper.params.history.enabled) return; + let location; + + if (swiper.params.url) { + location = new URL(swiper.params.url); + } else { + location = window.location; + } + + const slide = swiper.slides.eq(index); + let value = slugify(slide.attr('data-history')); + + if (swiper.params.history.root.length > 0) { + let root = swiper.params.history.root; + if (root[root.length - 1] === '/') root = root.slice(0, root.length - 1); + value = `${root}/${key}/${value}`; + } else if (!location.pathname.includes(key)) { + value = `${key}/${value}`; + } + + const currentState = window.history.state; + + if (currentState && currentState.value === value) { + return; + } + + if (swiper.params.history.replaceState) { + window.history.replaceState({ + value + }, null, value); + } else { + window.history.pushState({ + value + }, null, value); + } + }; + + const scrollToSlide = (speed, value, runCallbacks) => { + if (value) { + for (let i = 0, length = swiper.slides.length; i < length; i += 1) { + const slide = swiper.slides.eq(i); + const slideHistory = slugify(slide.attr('data-history')); + + if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) { + const index = slide.index(); + swiper.slideTo(index, speed, runCallbacks); + } + } + } else { + swiper.slideTo(0, speed, runCallbacks); + } + }; + + const setHistoryPopState = () => { + paths = getPathValues(swiper.params.url); + scrollToSlide(swiper.params.speed, swiper.paths.value, false); + }; + + const init = () => { + const window = getWindow(); + if (!swiper.params.history) return; + + if (!window.history || !window.history.pushState) { + swiper.params.history.enabled = false; + swiper.params.hashNavigation.enabled = true; + return; + } + + initialized = true; + paths = getPathValues(swiper.params.url); + if (!paths.key && !paths.value) return; + scrollToSlide(0, paths.value, swiper.params.runCallbacksOnInit); + + if (!swiper.params.history.replaceState) { + window.addEventListener('popstate', setHistoryPopState); + } + }; + + const destroy = () => { + const window = getWindow(); + + if (!swiper.params.history.replaceState) { + window.removeEventListener('popstate', setHistoryPopState); + } + }; + + on('init', () => { + if (swiper.params.history.enabled) { + init(); + } + }); + on('destroy', () => { + if (swiper.params.history.enabled) { + destroy(); + } + }); + on('transitionEnd _freeModeNoMomentumRelease', () => { + if (initialized) { + setHistory(swiper.params.history.key, swiper.activeIndex); + } + }); + on('slideChange', () => { + if (initialized && swiper.params.cssMode) { + setHistory(swiper.params.history.key, swiper.activeIndex); + } + }); + } + + function HashNavigation(_ref) { + let { + swiper, + extendParams, + emit, + on + } = _ref; + let initialized = false; + const document = getDocument(); + const window = getWindow(); + extendParams({ + hashNavigation: { + enabled: false, + replaceState: false, + watchState: false + } + }); + + const onHashChange = () => { + emit('hashChange'); + const newHash = document.location.hash.replace('#', ''); + const activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash'); + + if (newHash !== activeSlideHash) { + const newIndex = swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-hash="${newHash}"]`).index(); + if (typeof newIndex === 'undefined') return; + swiper.slideTo(newIndex); + } + }; + + const setHash = () => { + if (!initialized || !swiper.params.hashNavigation.enabled) return; + + if (swiper.params.hashNavigation.replaceState && window.history && window.history.replaceState) { + window.history.replaceState(null, null, `#${swiper.slides.eq(swiper.activeIndex).attr('data-hash')}` || ''); + emit('hashSet'); + } else { + const slide = swiper.slides.eq(swiper.activeIndex); + const hash = slide.attr('data-hash') || slide.attr('data-history'); + document.location.hash = hash || ''; + emit('hashSet'); + } + }; + + const init = () => { + if (!swiper.params.hashNavigation.enabled || swiper.params.history && swiper.params.history.enabled) return; + initialized = true; + const hash = document.location.hash.replace('#', ''); + + if (hash) { + const speed = 0; + + for (let i = 0, length = swiper.slides.length; i < length; i += 1) { + const slide = swiper.slides.eq(i); + const slideHash = slide.attr('data-hash') || slide.attr('data-history'); + + if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) { + const index = slide.index(); + swiper.slideTo(index, speed, swiper.params.runCallbacksOnInit, true); + } + } + } + + if (swiper.params.hashNavigation.watchState) { + $(window).on('hashchange', onHashChange); + } + }; + + const destroy = () => { + if (swiper.params.hashNavigation.watchState) { + $(window).off('hashchange', onHashChange); + } + }; + + on('init', () => { + if (swiper.params.hashNavigation.enabled) { + init(); + } + }); + on('destroy', () => { + if (swiper.params.hashNavigation.enabled) { + destroy(); + } + }); + on('transitionEnd _freeModeNoMomentumRelease', () => { + if (initialized) { + setHash(); + } + }); + on('slideChange', () => { + if (initialized && swiper.params.cssMode) { + setHash(); + } + }); + } + + /* eslint no-underscore-dangle: "off" */ + function Autoplay(_ref) { + let { + swiper, + extendParams, + on, + emit + } = _ref; + let timeout; + swiper.autoplay = { + running: false, + paused: false + }; + extendParams({ + autoplay: { + enabled: false, + delay: 3000, + waitForTransition: true, + disableOnInteraction: true, + stopOnLastSlide: false, + reverseDirection: false, + pauseOnMouseEnter: false + } + }); + + function run() { + const $activeSlideEl = swiper.slides.eq(swiper.activeIndex); + let delay = swiper.params.autoplay.delay; + + if ($activeSlideEl.attr('data-swiper-autoplay')) { + delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay; + } + + clearTimeout(timeout); + timeout = nextTick(() => { + let autoplayResult; + + if (swiper.params.autoplay.reverseDirection) { + if (swiper.params.loop) { + swiper.loopFix(); + autoplayResult = swiper.slidePrev(swiper.params.speed, true, true); + emit('autoplay'); + } else if (!swiper.isBeginning) { + autoplayResult = swiper.slidePrev(swiper.params.speed, true, true); + emit('autoplay'); + } else if (!swiper.params.autoplay.stopOnLastSlide) { + autoplayResult = swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true); + emit('autoplay'); + } else { + stop(); + } + } else if (swiper.params.loop) { + swiper.loopFix(); + autoplayResult = swiper.slideNext(swiper.params.speed, true, true); + emit('autoplay'); + } else if (!swiper.isEnd) { + autoplayResult = swiper.slideNext(swiper.params.speed, true, true); + emit('autoplay'); + } else if (!swiper.params.autoplay.stopOnLastSlide) { + autoplayResult = swiper.slideTo(0, swiper.params.speed, true, true); + emit('autoplay'); + } else { + stop(); + } + + if (swiper.params.cssMode && swiper.autoplay.running) run();else if (autoplayResult === false) { + run(); + } + }, delay); + } + + function start() { + if (typeof timeout !== 'undefined') return false; + if (swiper.autoplay.running) return false; + swiper.autoplay.running = true; + emit('autoplayStart'); + run(); + return true; + } + + function stop() { + if (!swiper.autoplay.running) return false; + if (typeof timeout === 'undefined') return false; + + if (timeout) { + clearTimeout(timeout); + timeout = undefined; + } + + swiper.autoplay.running = false; + emit('autoplayStop'); + return true; + } + + function pause(speed) { + if (!swiper.autoplay.running) return; + if (swiper.autoplay.paused) return; + if (timeout) clearTimeout(timeout); + swiper.autoplay.paused = true; + + if (speed === 0 || !swiper.params.autoplay.waitForTransition) { + swiper.autoplay.paused = false; + run(); + } else { + ['transitionend', 'webkitTransitionEnd'].forEach(event => { + swiper.$wrapperEl[0].addEventListener(event, onTransitionEnd); + }); + } + } + + function onVisibilityChange() { + const document = getDocument(); + + if (document.visibilityState === 'hidden' && swiper.autoplay.running) { + pause(); + } + + if (document.visibilityState === 'visible' && swiper.autoplay.paused) { + run(); + swiper.autoplay.paused = false; + } + } + + function onTransitionEnd(e) { + if (!swiper || swiper.destroyed || !swiper.$wrapperEl) return; + if (e.target !== swiper.$wrapperEl[0]) return; + ['transitionend', 'webkitTransitionEnd'].forEach(event => { + swiper.$wrapperEl[0].removeEventListener(event, onTransitionEnd); + }); + swiper.autoplay.paused = false; + + if (!swiper.autoplay.running) { + stop(); + } else { + run(); + } + } + + function onMouseEnter() { + if (swiper.params.autoplay.disableOnInteraction) { + stop(); + } else { + emit('autoplayPause'); + pause(); + } + + ['transitionend', 'webkitTransitionEnd'].forEach(event => { + swiper.$wrapperEl[0].removeEventListener(event, onTransitionEnd); + }); + } + + function onMouseLeave() { + if (swiper.params.autoplay.disableOnInteraction) { + return; + } + + swiper.autoplay.paused = false; + emit('autoplayResume'); + run(); + } + + function attachMouseEvents() { + if (swiper.params.autoplay.pauseOnMouseEnter) { + swiper.$el.on('mouseenter', onMouseEnter); + swiper.$el.on('mouseleave', onMouseLeave); + } + } + + function detachMouseEvents() { + swiper.$el.off('mouseenter', onMouseEnter); + swiper.$el.off('mouseleave', onMouseLeave); + } + + on('init', () => { + if (swiper.params.autoplay.enabled) { + start(); + const document = getDocument(); + document.addEventListener('visibilitychange', onVisibilityChange); + attachMouseEvents(); + } + }); + on('beforeTransitionStart', (_s, speed, internal) => { + if (swiper.autoplay.running) { + if (internal || !swiper.params.autoplay.disableOnInteraction) { + swiper.autoplay.pause(speed); + } else { + stop(); + } + } + }); + on('sliderFirstMove', () => { + if (swiper.autoplay.running) { + if (swiper.params.autoplay.disableOnInteraction) { + stop(); + } else { + pause(); + } + } + }); + on('touchEnd', () => { + if (swiper.params.cssMode && swiper.autoplay.paused && !swiper.params.autoplay.disableOnInteraction) { + run(); + } + }); + on('destroy', () => { + detachMouseEvents(); + + if (swiper.autoplay.running) { + stop(); + } + + const document = getDocument(); + document.removeEventListener('visibilitychange', onVisibilityChange); + }); + Object.assign(swiper.autoplay, { + pause, + run, + start, + stop + }); + } + + function Thumb(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + thumbs: { + swiper: null, + multipleActiveThumbs: true, + autoScrollOffset: 0, + slideThumbActiveClass: 'swiper-slide-thumb-active', + thumbsContainerClass: 'swiper-thumbs' + } + }); + let initialized = false; + let swiperCreated = false; + swiper.thumbs = { + swiper: null + }; + + function onThumbClick() { + const thumbsSwiper = swiper.thumbs.swiper; + if (!thumbsSwiper || thumbsSwiper.destroyed) return; + const clickedIndex = thumbsSwiper.clickedIndex; + const clickedSlide = thumbsSwiper.clickedSlide; + if (clickedSlide && $(clickedSlide).hasClass(swiper.params.thumbs.slideThumbActiveClass)) return; + if (typeof clickedIndex === 'undefined' || clickedIndex === null) return; + let slideToIndex; + + if (thumbsSwiper.params.loop) { + slideToIndex = parseInt($(thumbsSwiper.clickedSlide).attr('data-swiper-slide-index'), 10); + } else { + slideToIndex = clickedIndex; + } + + if (swiper.params.loop) { + let currentIndex = swiper.activeIndex; + + if (swiper.slides.eq(currentIndex).hasClass(swiper.params.slideDuplicateClass)) { + swiper.loopFix(); // eslint-disable-next-line + + swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; + currentIndex = swiper.activeIndex; + } + + const prevIndex = swiper.slides.eq(currentIndex).prevAll(`[data-swiper-slide-index="${slideToIndex}"]`).eq(0).index(); + const nextIndex = swiper.slides.eq(currentIndex).nextAll(`[data-swiper-slide-index="${slideToIndex}"]`).eq(0).index(); + if (typeof prevIndex === 'undefined') slideToIndex = nextIndex;else if (typeof nextIndex === 'undefined') slideToIndex = prevIndex;else if (nextIndex - currentIndex < currentIndex - prevIndex) slideToIndex = nextIndex;else slideToIndex = prevIndex; + } + + swiper.slideTo(slideToIndex); + } + + function init() { + const { + thumbs: thumbsParams + } = swiper.params; + if (initialized) return false; + initialized = true; + const SwiperClass = swiper.constructor; + + if (thumbsParams.swiper instanceof SwiperClass) { + swiper.thumbs.swiper = thumbsParams.swiper; + Object.assign(swiper.thumbs.swiper.originalParams, { + watchSlidesProgress: true, + slideToClickedSlide: false + }); + Object.assign(swiper.thumbs.swiper.params, { + watchSlidesProgress: true, + slideToClickedSlide: false + }); + } else if (isObject(thumbsParams.swiper)) { + const thumbsSwiperParams = Object.assign({}, thumbsParams.swiper); + Object.assign(thumbsSwiperParams, { + watchSlidesProgress: true, + slideToClickedSlide: false + }); + swiper.thumbs.swiper = new SwiperClass(thumbsSwiperParams); + swiperCreated = true; + } + + swiper.thumbs.swiper.$el.addClass(swiper.params.thumbs.thumbsContainerClass); + swiper.thumbs.swiper.on('tap', onThumbClick); + return true; + } + + function update(initial) { + const thumbsSwiper = swiper.thumbs.swiper; + if (!thumbsSwiper || thumbsSwiper.destroyed) return; + const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView; + const autoScrollOffset = swiper.params.thumbs.autoScrollOffset; + const useOffset = autoScrollOffset && !thumbsSwiper.params.loop; + + if (swiper.realIndex !== thumbsSwiper.realIndex || useOffset) { + let currentThumbsIndex = thumbsSwiper.activeIndex; + let newThumbsIndex; + let direction; + + if (thumbsSwiper.params.loop) { + if (thumbsSwiper.slides.eq(currentThumbsIndex).hasClass(thumbsSwiper.params.slideDuplicateClass)) { + thumbsSwiper.loopFix(); // eslint-disable-next-line + + thumbsSwiper._clientLeft = thumbsSwiper.$wrapperEl[0].clientLeft; + currentThumbsIndex = thumbsSwiper.activeIndex; + } // Find actual thumbs index to slide to + + + const prevThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).prevAll(`[data-swiper-slide-index="${swiper.realIndex}"]`).eq(0).index(); + const nextThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).nextAll(`[data-swiper-slide-index="${swiper.realIndex}"]`).eq(0).index(); + + if (typeof prevThumbsIndex === 'undefined') { + newThumbsIndex = nextThumbsIndex; + } else if (typeof nextThumbsIndex === 'undefined') { + newThumbsIndex = prevThumbsIndex; + } else if (nextThumbsIndex - currentThumbsIndex === currentThumbsIndex - prevThumbsIndex) { + newThumbsIndex = thumbsSwiper.params.slidesPerGroup > 1 ? nextThumbsIndex : currentThumbsIndex; + } else if (nextThumbsIndex - currentThumbsIndex < currentThumbsIndex - prevThumbsIndex) { + newThumbsIndex = nextThumbsIndex; + } else { + newThumbsIndex = prevThumbsIndex; + } + + direction = swiper.activeIndex > swiper.previousIndex ? 'next' : 'prev'; + } else { + newThumbsIndex = swiper.realIndex; + direction = newThumbsIndex > swiper.previousIndex ? 'next' : 'prev'; + } + + if (useOffset) { + newThumbsIndex += direction === 'next' ? autoScrollOffset : -1 * autoScrollOffset; + } + + if (thumbsSwiper.visibleSlidesIndexes && thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0) { + if (thumbsSwiper.params.centeredSlides) { + if (newThumbsIndex > currentThumbsIndex) { + newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1; + } else { + newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1; + } + } else if (newThumbsIndex > currentThumbsIndex && thumbsSwiper.params.slidesPerGroup === 1) ; + + thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined); + } + } // Activate thumbs + + + let thumbsToActivate = 1; + const thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass; + + if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) { + thumbsToActivate = swiper.params.slidesPerView; + } + + if (!swiper.params.thumbs.multipleActiveThumbs) { + thumbsToActivate = 1; + } + + thumbsToActivate = Math.floor(thumbsToActivate); + thumbsSwiper.slides.removeClass(thumbActiveClass); + + if (thumbsSwiper.params.loop || thumbsSwiper.params.virtual && thumbsSwiper.params.virtual.enabled) { + for (let i = 0; i < thumbsToActivate; i += 1) { + thumbsSwiper.$wrapperEl.children(`[data-swiper-slide-index="${swiper.realIndex + i}"]`).addClass(thumbActiveClass); + } + } else { + for (let i = 0; i < thumbsToActivate; i += 1) { + thumbsSwiper.slides.eq(swiper.realIndex + i).addClass(thumbActiveClass); + } + } + } + + on('beforeInit', () => { + const { + thumbs + } = swiper.params; + if (!thumbs || !thumbs.swiper) return; + init(); + update(true); + }); + on('slideChange update resize observerUpdate', () => { + update(); + }); + on('setTransition', (_s, duration) => { + const thumbsSwiper = swiper.thumbs.swiper; + if (!thumbsSwiper || thumbsSwiper.destroyed) return; + thumbsSwiper.setTransition(duration); + }); + on('beforeDestroy', () => { + const thumbsSwiper = swiper.thumbs.swiper; + if (!thumbsSwiper || thumbsSwiper.destroyed) return; + + if (swiperCreated) { + thumbsSwiper.destroy(); + } + }); + Object.assign(swiper.thumbs, { + init, + update + }); + } + + function freeMode(_ref) { + let { + swiper, + extendParams, + emit, + once + } = _ref; + extendParams({ + freeMode: { + enabled: false, + momentum: true, + momentumRatio: 1, + momentumBounce: true, + momentumBounceRatio: 1, + momentumVelocityRatio: 1, + sticky: false, + minimumVelocity: 0.02 + } + }); + + function onTouchStart() { + const translate = swiper.getTranslate(); + swiper.setTranslate(translate); + swiper.setTransition(0); + swiper.touchEventsData.velocities.length = 0; + swiper.freeMode.onTouchEnd({ + currentPos: swiper.rtl ? swiper.translate : -swiper.translate + }); + } + + function onTouchMove() { + const { + touchEventsData: data, + touches + } = swiper; // Velocity + + if (data.velocities.length === 0) { + data.velocities.push({ + position: touches[swiper.isHorizontal() ? 'startX' : 'startY'], + time: data.touchStartTime + }); + } + + data.velocities.push({ + position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'], + time: now() + }); + } + + function onTouchEnd(_ref2) { + let { + currentPos + } = _ref2; + const { + params, + $wrapperEl, + rtlTranslate: rtl, + snapGrid, + touchEventsData: data + } = swiper; // Time diff + + const touchEndTime = now(); + const timeDiff = touchEndTime - data.touchStartTime; + + if (currentPos < -swiper.minTranslate()) { + swiper.slideTo(swiper.activeIndex); + return; + } + + if (currentPos > -swiper.maxTranslate()) { + if (swiper.slides.length < snapGrid.length) { + swiper.slideTo(snapGrid.length - 1); + } else { + swiper.slideTo(swiper.slides.length - 1); + } + + return; + } + + if (params.freeMode.momentum) { + if (data.velocities.length > 1) { + const lastMoveEvent = data.velocities.pop(); + const velocityEvent = data.velocities.pop(); + const distance = lastMoveEvent.position - velocityEvent.position; + const time = lastMoveEvent.time - velocityEvent.time; + swiper.velocity = distance / time; + swiper.velocity /= 2; + + if (Math.abs(swiper.velocity) < params.freeMode.minimumVelocity) { + swiper.velocity = 0; + } // this implies that the user stopped moving a finger then released. + // There would be no events with distance zero, so the last event is stale. + + + if (time > 150 || now() - lastMoveEvent.time > 300) { + swiper.velocity = 0; + } + } else { + swiper.velocity = 0; + } + + swiper.velocity *= params.freeMode.momentumVelocityRatio; + data.velocities.length = 0; + let momentumDuration = 1000 * params.freeMode.momentumRatio; + const momentumDistance = swiper.velocity * momentumDuration; + let newPosition = swiper.translate + momentumDistance; + if (rtl) newPosition = -newPosition; + let doBounce = false; + let afterBouncePosition; + const bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeMode.momentumBounceRatio; + let needsLoopFix; + + if (newPosition < swiper.maxTranslate()) { + if (params.freeMode.momentumBounce) { + if (newPosition + swiper.maxTranslate() < -bounceAmount) { + newPosition = swiper.maxTranslate() - bounceAmount; + } + + afterBouncePosition = swiper.maxTranslate(); + doBounce = true; + data.allowMomentumBounce = true; + } else { + newPosition = swiper.maxTranslate(); + } + + if (params.loop && params.centeredSlides) needsLoopFix = true; + } else if (newPosition > swiper.minTranslate()) { + if (params.freeMode.momentumBounce) { + if (newPosition - swiper.minTranslate() > bounceAmount) { + newPosition = swiper.minTranslate() + bounceAmount; + } + + afterBouncePosition = swiper.minTranslate(); + doBounce = true; + data.allowMomentumBounce = true; + } else { + newPosition = swiper.minTranslate(); + } + + if (params.loop && params.centeredSlides) needsLoopFix = true; + } else if (params.freeMode.sticky) { + let nextSlide; + + for (let j = 0; j < snapGrid.length; j += 1) { + if (snapGrid[j] > -newPosition) { + nextSlide = j; + break; + } + } + + if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') { + newPosition = snapGrid[nextSlide]; + } else { + newPosition = snapGrid[nextSlide - 1]; + } + + newPosition = -newPosition; + } + + if (needsLoopFix) { + once('transitionEnd', () => { + swiper.loopFix(); + }); + } // Fix duration + + + if (swiper.velocity !== 0) { + if (rtl) { + momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity); + } else { + momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity); + } + + if (params.freeMode.sticky) { + // If freeMode.sticky is active and the user ends a swipe with a slow-velocity + // event, then durations can be 20+ seconds to slide one (or zero!) slides. + // It's easy to see this when simulating touch with mouse events. To fix this, + // limit single-slide swipes to the default slide duration. This also has the + // nice side effect of matching slide speed if the user stopped moving before + // lifting finger or mouse vs. moving slowly before lifting the finger/mouse. + // For faster swipes, also apply limits (albeit higher ones). + const moveDistance = Math.abs((rtl ? -newPosition : newPosition) - swiper.translate); + const currentSlideSize = swiper.slidesSizesGrid[swiper.activeIndex]; + + if (moveDistance < currentSlideSize) { + momentumDuration = params.speed; + } else if (moveDistance < 2 * currentSlideSize) { + momentumDuration = params.speed * 1.5; + } else { + momentumDuration = params.speed * 2.5; + } + } + } else if (params.freeMode.sticky) { + swiper.slideToClosest(); + return; + } + + if (params.freeMode.momentumBounce && doBounce) { + swiper.updateProgress(afterBouncePosition); + swiper.setTransition(momentumDuration); + swiper.setTranslate(newPosition); + swiper.transitionStart(true, swiper.swipeDirection); + swiper.animating = true; + $wrapperEl.transitionEnd(() => { + if (!swiper || swiper.destroyed || !data.allowMomentumBounce) return; + emit('momentumBounce'); + swiper.setTransition(params.speed); + setTimeout(() => { + swiper.setTranslate(afterBouncePosition); + $wrapperEl.transitionEnd(() => { + if (!swiper || swiper.destroyed) return; + swiper.transitionEnd(); + }); + }, 0); + }); + } else if (swiper.velocity) { + emit('_freeModeNoMomentumRelease'); + swiper.updateProgress(newPosition); + swiper.setTransition(momentumDuration); + swiper.setTranslate(newPosition); + swiper.transitionStart(true, swiper.swipeDirection); + + if (!swiper.animating) { + swiper.animating = true; + $wrapperEl.transitionEnd(() => { + if (!swiper || swiper.destroyed) return; + swiper.transitionEnd(); + }); + } + } else { + swiper.updateProgress(newPosition); + } + + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + } else if (params.freeMode.sticky) { + swiper.slideToClosest(); + return; + } else if (params.freeMode) { + emit('_freeModeNoMomentumRelease'); + } + + if (!params.freeMode.momentum || timeDiff >= params.longSwipesMs) { + swiper.updateProgress(); + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + } + } + + Object.assign(swiper, { + freeMode: { + onTouchStart, + onTouchMove, + onTouchEnd + } + }); + } + + function Grid(_ref) { + let { + swiper, + extendParams + } = _ref; + extendParams({ + grid: { + rows: 1, + fill: 'column' + } + }); + let slidesNumberEvenToRows; + let slidesPerRow; + let numFullColumns; + + const initSlides = slidesLength => { + const { + slidesPerView + } = swiper.params; + const { + rows, + fill + } = swiper.params.grid; + slidesPerRow = slidesNumberEvenToRows / rows; + numFullColumns = Math.floor(slidesLength / rows); + + if (Math.floor(slidesLength / rows) === slidesLength / rows) { + slidesNumberEvenToRows = slidesLength; + } else { + slidesNumberEvenToRows = Math.ceil(slidesLength / rows) * rows; + } + + if (slidesPerView !== 'auto' && fill === 'row') { + slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, slidesPerView * rows); + } + }; + + const updateSlide = (i, slide, slidesLength, getDirectionLabel) => { + const { + slidesPerGroup, + spaceBetween + } = swiper.params; + const { + rows, + fill + } = swiper.params.grid; // Set slides order + + let newSlideOrderIndex; + let column; + let row; + + if (fill === 'row' && slidesPerGroup > 1) { + const groupIndex = Math.floor(i / (slidesPerGroup * rows)); + const slideIndexInGroup = i - rows * slidesPerGroup * groupIndex; + const columnsInGroup = groupIndex === 0 ? slidesPerGroup : Math.min(Math.ceil((slidesLength - groupIndex * rows * slidesPerGroup) / rows), slidesPerGroup); + row = Math.floor(slideIndexInGroup / columnsInGroup); + column = slideIndexInGroup - row * columnsInGroup + groupIndex * slidesPerGroup; + newSlideOrderIndex = column + row * slidesNumberEvenToRows / rows; + slide.css({ + '-webkit-order': newSlideOrderIndex, + order: newSlideOrderIndex + }); + } else if (fill === 'column') { + column = Math.floor(i / rows); + row = i - column * rows; + + if (column > numFullColumns || column === numFullColumns && row === rows - 1) { + row += 1; + + if (row >= rows) { + row = 0; + column += 1; + } + } + } else { + row = Math.floor(i / slidesPerRow); + column = i - row * slidesPerRow; + } + + slide.css(getDirectionLabel('margin-top'), row !== 0 ? spaceBetween && `${spaceBetween}px` : ''); + }; + + const updateWrapperSize = (slideSize, snapGrid, getDirectionLabel) => { + const { + spaceBetween, + centeredSlides, + roundLengths + } = swiper.params; + const { + rows + } = swiper.params.grid; + swiper.virtualSize = (slideSize + spaceBetween) * slidesNumberEvenToRows; + swiper.virtualSize = Math.ceil(swiper.virtualSize / rows) - spaceBetween; + swiper.$wrapperEl.css({ + [getDirectionLabel('width')]: `${swiper.virtualSize + spaceBetween}px` + }); + + if (centeredSlides) { + snapGrid.splice(0, snapGrid.length); + const newSlidesGrid = []; + + for (let i = 0; i < snapGrid.length; i += 1) { + let slidesGridItem = snapGrid[i]; + if (roundLengths) slidesGridItem = Math.floor(slidesGridItem); + if (snapGrid[i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem); + } + + snapGrid.push(...newSlidesGrid); + } + }; + + swiper.grid = { + initSlides, + updateSlide, + updateWrapperSize + }; + } + + function appendSlide(slides) { + const swiper = this; + const { + $wrapperEl, + params + } = swiper; + + if (params.loop) { + swiper.loopDestroy(); + } + + if (typeof slides === 'object' && 'length' in slides) { + for (let i = 0; i < slides.length; i += 1) { + if (slides[i]) $wrapperEl.append(slides[i]); + } + } else { + $wrapperEl.append(slides); + } + + if (params.loop) { + swiper.loopCreate(); + } + + if (!params.observer) { + swiper.update(); + } + } + + function prependSlide(slides) { + const swiper = this; + const { + params, + $wrapperEl, + activeIndex + } = swiper; + + if (params.loop) { + swiper.loopDestroy(); + } + + let newActiveIndex = activeIndex + 1; + + if (typeof slides === 'object' && 'length' in slides) { + for (let i = 0; i < slides.length; i += 1) { + if (slides[i]) $wrapperEl.prepend(slides[i]); + } + + newActiveIndex = activeIndex + slides.length; + } else { + $wrapperEl.prepend(slides); + } + + if (params.loop) { + swiper.loopCreate(); + } + + if (!params.observer) { + swiper.update(); + } + + swiper.slideTo(newActiveIndex, 0, false); + } + + function addSlide(index, slides) { + const swiper = this; + const { + $wrapperEl, + params, + activeIndex + } = swiper; + let activeIndexBuffer = activeIndex; + + if (params.loop) { + activeIndexBuffer -= swiper.loopedSlides; + swiper.loopDestroy(); + swiper.slides = $wrapperEl.children(`.${params.slideClass}`); + } + + const baseLength = swiper.slides.length; + + if (index <= 0) { + swiper.prependSlide(slides); + return; + } + + if (index >= baseLength) { + swiper.appendSlide(slides); + return; + } + + let newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer; + const slidesBuffer = []; + + for (let i = baseLength - 1; i >= index; i -= 1) { + const currentSlide = swiper.slides.eq(i); + currentSlide.remove(); + slidesBuffer.unshift(currentSlide); + } + + if (typeof slides === 'object' && 'length' in slides) { + for (let i = 0; i < slides.length; i += 1) { + if (slides[i]) $wrapperEl.append(slides[i]); + } + + newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer; + } else { + $wrapperEl.append(slides); + } + + for (let i = 0; i < slidesBuffer.length; i += 1) { + $wrapperEl.append(slidesBuffer[i]); + } + + if (params.loop) { + swiper.loopCreate(); + } + + if (!params.observer) { + swiper.update(); + } + + if (params.loop) { + swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false); + } else { + swiper.slideTo(newActiveIndex, 0, false); + } + } + + function removeSlide(slidesIndexes) { + const swiper = this; + const { + params, + $wrapperEl, + activeIndex + } = swiper; + let activeIndexBuffer = activeIndex; + + if (params.loop) { + activeIndexBuffer -= swiper.loopedSlides; + swiper.loopDestroy(); + swiper.slides = $wrapperEl.children(`.${params.slideClass}`); + } + + let newActiveIndex = activeIndexBuffer; + let indexToRemove; + + if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) { + for (let i = 0; i < slidesIndexes.length; i += 1) { + indexToRemove = slidesIndexes[i]; + if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove(); + if (indexToRemove < newActiveIndex) newActiveIndex -= 1; + } + + newActiveIndex = Math.max(newActiveIndex, 0); + } else { + indexToRemove = slidesIndexes; + if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove(); + if (indexToRemove < newActiveIndex) newActiveIndex -= 1; + newActiveIndex = Math.max(newActiveIndex, 0); + } + + if (params.loop) { + swiper.loopCreate(); + } + + if (!params.observer) { + swiper.update(); + } + + if (params.loop) { + swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false); + } else { + swiper.slideTo(newActiveIndex, 0, false); + } + } + + function removeAllSlides() { + const swiper = this; + const slidesIndexes = []; + + for (let i = 0; i < swiper.slides.length; i += 1) { + slidesIndexes.push(i); + } + + swiper.removeSlide(slidesIndexes); + } + + function Manipulation(_ref) { + let { + swiper + } = _ref; + Object.assign(swiper, { + appendSlide: appendSlide.bind(swiper), + prependSlide: prependSlide.bind(swiper), + addSlide: addSlide.bind(swiper), + removeSlide: removeSlide.bind(swiper), + removeAllSlides: removeAllSlides.bind(swiper) + }); + } + + function effectInit(params) { + const { + effect, + swiper, + on, + setTranslate, + setTransition, + overwriteParams, + perspective, + recreateShadows, + getEffectParams + } = params; + on('beforeInit', () => { + if (swiper.params.effect !== effect) return; + swiper.classNames.push(`${swiper.params.containerModifierClass}${effect}`); + + if (perspective && perspective()) { + swiper.classNames.push(`${swiper.params.containerModifierClass}3d`); + } + + const overwriteParamsResult = overwriteParams ? overwriteParams() : {}; + Object.assign(swiper.params, overwriteParamsResult); + Object.assign(swiper.originalParams, overwriteParamsResult); + }); + on('setTranslate', () => { + if (swiper.params.effect !== effect) return; + setTranslate(); + }); + on('setTransition', (_s, duration) => { + if (swiper.params.effect !== effect) return; + setTransition(duration); + }); + on('transitionEnd', () => { + if (swiper.params.effect !== effect) return; + + if (recreateShadows) { + if (!getEffectParams || !getEffectParams().slideShadows) return; // remove shadows + + swiper.slides.each(slideEl => { + const $slideEl = swiper.$(slideEl); + $slideEl.find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').remove(); + }); // create new one + + recreateShadows(); + } + }); + let requireUpdateOnVirtual; + on('virtualUpdate', () => { + if (swiper.params.effect !== effect) return; + + if (!swiper.slides.length) { + requireUpdateOnVirtual = true; + } + + requestAnimationFrame(() => { + if (requireUpdateOnVirtual && swiper.slides && swiper.slides.length) { + setTranslate(); + requireUpdateOnVirtual = false; + } + }); + }); + } + + function effectTarget(effectParams, $slideEl) { + if (effectParams.transformEl) { + return $slideEl.find(effectParams.transformEl).css({ + 'backface-visibility': 'hidden', + '-webkit-backface-visibility': 'hidden' + }); + } + + return $slideEl; + } + + function effectVirtualTransitionEnd(_ref) { + let { + swiper, + duration, + transformEl, + allSlides + } = _ref; + const { + slides, + activeIndex, + $wrapperEl + } = swiper; + + if (swiper.params.virtualTranslate && duration !== 0) { + let eventTriggered = false; + let $transitionEndTarget; + + if (allSlides) { + $transitionEndTarget = transformEl ? slides.find(transformEl) : slides; + } else { + $transitionEndTarget = transformEl ? slides.eq(activeIndex).find(transformEl) : slides.eq(activeIndex); + } + + $transitionEndTarget.transitionEnd(() => { + if (eventTriggered) return; + if (!swiper || swiper.destroyed) return; + eventTriggered = true; + swiper.animating = false; + const triggerEvents = ['webkitTransitionEnd', 'transitionend']; + + for (let i = 0; i < triggerEvents.length; i += 1) { + $wrapperEl.trigger(triggerEvents[i]); + } + }); + } + } + + function EffectFade(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + fadeEffect: { + crossFade: false, + transformEl: null + } + }); + + const setTranslate = () => { + const { + slides + } = swiper; + const params = swiper.params.fadeEffect; + + for (let i = 0; i < slides.length; i += 1) { + const $slideEl = swiper.slides.eq(i); + const offset = $slideEl[0].swiperSlideOffset; + let tx = -offset; + if (!swiper.params.virtualTranslate) tx -= swiper.translate; + let ty = 0; + + if (!swiper.isHorizontal()) { + ty = tx; + tx = 0; + } + + const slideOpacity = swiper.params.fadeEffect.crossFade ? Math.max(1 - Math.abs($slideEl[0].progress), 0) : 1 + Math.min(Math.max($slideEl[0].progress, -1), 0); + const $targetEl = effectTarget(params, $slideEl); + $targetEl.css({ + opacity: slideOpacity + }).transform(`translate3d(${tx}px, ${ty}px, 0px)`); + } + }; + + const setTransition = duration => { + const { + transformEl + } = swiper.params.fadeEffect; + const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides; + $transitionElements.transition(duration); + effectVirtualTransitionEnd({ + swiper, + duration, + transformEl, + allSlides: true + }); + }; + + effectInit({ + effect: 'fade', + swiper, + on, + setTranslate, + setTransition, + overwriteParams: () => ({ + slidesPerView: 1, + slidesPerGroup: 1, + watchSlidesProgress: true, + spaceBetween: 0, + virtualTranslate: !swiper.params.cssMode + }) + }); + } + + function EffectCube(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + cubeEffect: { + slideShadows: true, + shadow: true, + shadowOffset: 20, + shadowScale: 0.94 + } + }); + + const createSlideShadows = ($slideEl, progress, isHorizontal) => { + let shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); + let shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); + + if (shadowBefore.length === 0) { + shadowBefore = $(`
      `); + $slideEl.append(shadowBefore); + } + + if (shadowAfter.length === 0) { + shadowAfter = $(`
      `); + $slideEl.append(shadowAfter); + } + + if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0); + if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0); + }; + + const recreateShadows = () => { + // create new ones + const isHorizontal = swiper.isHorizontal(); + swiper.slides.each(slideEl => { + const progress = Math.max(Math.min(slideEl.progress, 1), -1); + createSlideShadows($(slideEl), progress, isHorizontal); + }); + }; + + const setTranslate = () => { + const { + $el, + $wrapperEl, + slides, + width: swiperWidth, + height: swiperHeight, + rtlTranslate: rtl, + size: swiperSize, + browser + } = swiper; + const params = swiper.params.cubeEffect; + const isHorizontal = swiper.isHorizontal(); + const isVirtual = swiper.virtual && swiper.params.virtual.enabled; + let wrapperRotate = 0; + let $cubeShadowEl; + + if (params.shadow) { + if (isHorizontal) { + $cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow'); + + if ($cubeShadowEl.length === 0) { + $cubeShadowEl = $('
      '); + $wrapperEl.append($cubeShadowEl); + } + + $cubeShadowEl.css({ + height: `${swiperWidth}px` + }); + } else { + $cubeShadowEl = $el.find('.swiper-cube-shadow'); + + if ($cubeShadowEl.length === 0) { + $cubeShadowEl = $('
      '); + $el.append($cubeShadowEl); + } + } + } + + for (let i = 0; i < slides.length; i += 1) { + const $slideEl = slides.eq(i); + let slideIndex = i; + + if (isVirtual) { + slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10); + } + + let slideAngle = slideIndex * 90; + let round = Math.floor(slideAngle / 360); + + if (rtl) { + slideAngle = -slideAngle; + round = Math.floor(-slideAngle / 360); + } + + const progress = Math.max(Math.min($slideEl[0].progress, 1), -1); + let tx = 0; + let ty = 0; + let tz = 0; + + if (slideIndex % 4 === 0) { + tx = -round * 4 * swiperSize; + tz = 0; + } else if ((slideIndex - 1) % 4 === 0) { + tx = 0; + tz = -round * 4 * swiperSize; + } else if ((slideIndex - 2) % 4 === 0) { + tx = swiperSize + round * 4 * swiperSize; + tz = swiperSize; + } else if ((slideIndex - 3) % 4 === 0) { + tx = -swiperSize; + tz = 3 * swiperSize + swiperSize * 4 * round; + } + + if (rtl) { + tx = -tx; + } + + if (!isHorizontal) { + ty = tx; + tx = 0; + } + + const transform = `rotateX(${isHorizontal ? 0 : -slideAngle}deg) rotateY(${isHorizontal ? slideAngle : 0}deg) translate3d(${tx}px, ${ty}px, ${tz}px)`; + + if (progress <= 1 && progress > -1) { + wrapperRotate = slideIndex * 90 + progress * 90; + if (rtl) wrapperRotate = -slideIndex * 90 - progress * 90; + } + + $slideEl.transform(transform); + + if (params.slideShadows) { + createSlideShadows($slideEl, progress, isHorizontal); + } + } + + $wrapperEl.css({ + '-webkit-transform-origin': `50% 50% -${swiperSize / 2}px`, + 'transform-origin': `50% 50% -${swiperSize / 2}px` + }); + + if (params.shadow) { + if (isHorizontal) { + $cubeShadowEl.transform(`translate3d(0px, ${swiperWidth / 2 + params.shadowOffset}px, ${-swiperWidth / 2}px) rotateX(90deg) rotateZ(0deg) scale(${params.shadowScale})`); + } else { + const shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90; + const multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2); + const scale1 = params.shadowScale; + const scale2 = params.shadowScale / multiplier; + const offset = params.shadowOffset; + $cubeShadowEl.transform(`scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${swiperHeight / 2 + offset}px, ${-swiperHeight / 2 / scale2}px) rotateX(-90deg)`); + } + } + + const zFactor = browser.isSafari || browser.isWebView ? -swiperSize / 2 : 0; + $wrapperEl.transform(`translate3d(0px,0,${zFactor}px) rotateX(${swiper.isHorizontal() ? 0 : wrapperRotate}deg) rotateY(${swiper.isHorizontal() ? -wrapperRotate : 0}deg)`); + $wrapperEl[0].style.setProperty('--swiper-cube-translate-z', `${zFactor}px`); + }; + + const setTransition = duration => { + const { + $el, + slides + } = swiper; + slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); + + if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) { + $el.find('.swiper-cube-shadow').transition(duration); + } + }; + + effectInit({ + effect: 'cube', + swiper, + on, + setTranslate, + setTransition, + recreateShadows, + getEffectParams: () => swiper.params.cubeEffect, + perspective: () => true, + overwriteParams: () => ({ + slidesPerView: 1, + slidesPerGroup: 1, + watchSlidesProgress: true, + resistanceRatio: 0, + spaceBetween: 0, + centeredSlides: false, + virtualTranslate: true + }) + }); + } + + function createShadow(params, $slideEl, side) { + const shadowClass = `swiper-slide-shadow${side ? `-${side}` : ''}`; + const $shadowContainer = params.transformEl ? $slideEl.find(params.transformEl) : $slideEl; + let $shadowEl = $shadowContainer.children(`.${shadowClass}`); + + if (!$shadowEl.length) { + $shadowEl = $(`
      `); + $shadowContainer.append($shadowEl); + } + + return $shadowEl; + } + + function EffectFlip(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + flipEffect: { + slideShadows: true, + limitRotation: true, + transformEl: null + } + }); + + const createSlideShadows = ($slideEl, progress, params) => { + let shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); + let shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); + + if (shadowBefore.length === 0) { + shadowBefore = createShadow(params, $slideEl, swiper.isHorizontal() ? 'left' : 'top'); + } + + if (shadowAfter.length === 0) { + shadowAfter = createShadow(params, $slideEl, swiper.isHorizontal() ? 'right' : 'bottom'); + } + + if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0); + if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0); + }; + + const recreateShadows = () => { + // Set shadows + const params = swiper.params.flipEffect; + swiper.slides.each(slideEl => { + const $slideEl = $(slideEl); + let progress = $slideEl[0].progress; + + if (swiper.params.flipEffect.limitRotation) { + progress = Math.max(Math.min(slideEl.progress, 1), -1); + } + + createSlideShadows($slideEl, progress, params); + }); + }; + + const setTranslate = () => { + const { + slides, + rtlTranslate: rtl + } = swiper; + const params = swiper.params.flipEffect; + + for (let i = 0; i < slides.length; i += 1) { + const $slideEl = slides.eq(i); + let progress = $slideEl[0].progress; + + if (swiper.params.flipEffect.limitRotation) { + progress = Math.max(Math.min($slideEl[0].progress, 1), -1); + } + + const offset = $slideEl[0].swiperSlideOffset; + const rotate = -180 * progress; + let rotateY = rotate; + let rotateX = 0; + let tx = swiper.params.cssMode ? -offset - swiper.translate : -offset; + let ty = 0; + + if (!swiper.isHorizontal()) { + ty = tx; + tx = 0; + rotateX = -rotateY; + rotateY = 0; + } else if (rtl) { + rotateY = -rotateY; + } + + $slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length; + + if (params.slideShadows) { + createSlideShadows($slideEl, progress, params); + } + + const transform = `translate3d(${tx}px, ${ty}px, 0px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`; + const $targetEl = effectTarget(params, $slideEl); + $targetEl.transform(transform); + } + }; + + const setTransition = duration => { + const { + transformEl + } = swiper.params.flipEffect; + const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides; + $transitionElements.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); + effectVirtualTransitionEnd({ + swiper, + duration, + transformEl + }); + }; + + effectInit({ + effect: 'flip', + swiper, + on, + setTranslate, + setTransition, + recreateShadows, + getEffectParams: () => swiper.params.flipEffect, + perspective: () => true, + overwriteParams: () => ({ + slidesPerView: 1, + slidesPerGroup: 1, + watchSlidesProgress: true, + spaceBetween: 0, + virtualTranslate: !swiper.params.cssMode + }) + }); + } + + function EffectCoverflow(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + coverflowEffect: { + rotate: 50, + stretch: 0, + depth: 100, + scale: 1, + modifier: 1, + slideShadows: true, + transformEl: null + } + }); + + const setTranslate = () => { + const { + width: swiperWidth, + height: swiperHeight, + slides, + slidesSizesGrid + } = swiper; + const params = swiper.params.coverflowEffect; + const isHorizontal = swiper.isHorizontal(); + const transform = swiper.translate; + const center = isHorizontal ? -transform + swiperWidth / 2 : -transform + swiperHeight / 2; + const rotate = isHorizontal ? params.rotate : -params.rotate; + const translate = params.depth; // Each slide offset from center + + for (let i = 0, length = slides.length; i < length; i += 1) { + const $slideEl = slides.eq(i); + const slideSize = slidesSizesGrid[i]; + const slideOffset = $slideEl[0].swiperSlideOffset; + const centerOffset = (center - slideOffset - slideSize / 2) / slideSize; + const offsetMultiplier = typeof params.modifier === 'function' ? params.modifier(centerOffset) : centerOffset * params.modifier; + let rotateY = isHorizontal ? rotate * offsetMultiplier : 0; + let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier; // var rotateZ = 0 + + let translateZ = -translate * Math.abs(offsetMultiplier); + let stretch = params.stretch; // Allow percentage to make a relative stretch for responsive sliders + + if (typeof stretch === 'string' && stretch.indexOf('%') !== -1) { + stretch = parseFloat(params.stretch) / 100 * slideSize; + } + + let translateY = isHorizontal ? 0 : stretch * offsetMultiplier; + let translateX = isHorizontal ? stretch * offsetMultiplier : 0; + let scale = 1 - (1 - params.scale) * Math.abs(offsetMultiplier); // Fix for ultra small values + + if (Math.abs(translateX) < 0.001) translateX = 0; + if (Math.abs(translateY) < 0.001) translateY = 0; + if (Math.abs(translateZ) < 0.001) translateZ = 0; + if (Math.abs(rotateY) < 0.001) rotateY = 0; + if (Math.abs(rotateX) < 0.001) rotateX = 0; + if (Math.abs(scale) < 0.001) scale = 0; + const slideTransform = `translate3d(${translateX}px,${translateY}px,${translateZ}px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale(${scale})`; + const $targetEl = effectTarget(params, $slideEl); + $targetEl.transform(slideTransform); + $slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1; + + if (params.slideShadows) { + // Set shadows + let $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); + let $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); + + if ($shadowBeforeEl.length === 0) { + $shadowBeforeEl = createShadow(params, $slideEl, isHorizontal ? 'left' : 'top'); + } + + if ($shadowAfterEl.length === 0) { + $shadowAfterEl = createShadow(params, $slideEl, isHorizontal ? 'right' : 'bottom'); + } + + if ($shadowBeforeEl.length) $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0; + if ($shadowAfterEl.length) $shadowAfterEl[0].style.opacity = -offsetMultiplier > 0 ? -offsetMultiplier : 0; + } + } + }; + + const setTransition = duration => { + const { + transformEl + } = swiper.params.coverflowEffect; + const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides; + $transitionElements.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); + }; + + effectInit({ + effect: 'coverflow', + swiper, + on, + setTranslate, + setTransition, + perspective: () => true, + overwriteParams: () => ({ + watchSlidesProgress: true + }) + }); + } + + function EffectCreative(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + creativeEffect: { + transformEl: null, + limitProgress: 1, + shadowPerProgress: false, + progressMultiplier: 1, + perspective: true, + prev: { + translate: [0, 0, 0], + rotate: [0, 0, 0], + opacity: 1, + scale: 1 + }, + next: { + translate: [0, 0, 0], + rotate: [0, 0, 0], + opacity: 1, + scale: 1 + } + } + }); + + const getTranslateValue = value => { + if (typeof value === 'string') return value; + return `${value}px`; + }; + + const setTranslate = () => { + const { + slides, + $wrapperEl, + slidesSizesGrid + } = swiper; + const params = swiper.params.creativeEffect; + const { + progressMultiplier: multiplier + } = params; + const isCenteredSlides = swiper.params.centeredSlides; + + if (isCenteredSlides) { + const margin = slidesSizesGrid[0] / 2 - swiper.params.slidesOffsetBefore || 0; + $wrapperEl.transform(`translateX(calc(50% - ${margin}px))`); + } + + for (let i = 0; i < slides.length; i += 1) { + const $slideEl = slides.eq(i); + const slideProgress = $slideEl[0].progress; + const progress = Math.min(Math.max($slideEl[0].progress, -params.limitProgress), params.limitProgress); + let originalProgress = progress; + + if (!isCenteredSlides) { + originalProgress = Math.min(Math.max($slideEl[0].originalProgress, -params.limitProgress), params.limitProgress); + } + + const offset = $slideEl[0].swiperSlideOffset; + const t = [swiper.params.cssMode ? -offset - swiper.translate : -offset, 0, 0]; + const r = [0, 0, 0]; + let custom = false; + + if (!swiper.isHorizontal()) { + t[1] = t[0]; + t[0] = 0; + } + + let data = { + translate: [0, 0, 0], + rotate: [0, 0, 0], + scale: 1, + opacity: 1 + }; + + if (progress < 0) { + data = params.next; + custom = true; + } else if (progress > 0) { + data = params.prev; + custom = true; + } // set translate + + + t.forEach((value, index) => { + t[index] = `calc(${value}px + (${getTranslateValue(data.translate[index])} * ${Math.abs(progress * multiplier)}))`; + }); // set rotates + + r.forEach((value, index) => { + r[index] = data.rotate[index] * Math.abs(progress * multiplier); + }); + $slideEl[0].style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length; + const translateString = t.join(', '); + const rotateString = `rotateX(${r[0]}deg) rotateY(${r[1]}deg) rotateZ(${r[2]}deg)`; + const scaleString = originalProgress < 0 ? `scale(${1 + (1 - data.scale) * originalProgress * multiplier})` : `scale(${1 - (1 - data.scale) * originalProgress * multiplier})`; + const opacityString = originalProgress < 0 ? 1 + (1 - data.opacity) * originalProgress * multiplier : 1 - (1 - data.opacity) * originalProgress * multiplier; + const transform = `translate3d(${translateString}) ${rotateString} ${scaleString}`; // Set shadows + + if (custom && data.shadow || !custom) { + let $shadowEl = $slideEl.children('.swiper-slide-shadow'); + + if ($shadowEl.length === 0 && data.shadow) { + $shadowEl = createShadow(params, $slideEl); + } + + if ($shadowEl.length) { + const shadowOpacity = params.shadowPerProgress ? progress * (1 / params.limitProgress) : progress; + $shadowEl[0].style.opacity = Math.min(Math.max(Math.abs(shadowOpacity), 0), 1); + } + } + + const $targetEl = effectTarget(params, $slideEl); + $targetEl.transform(transform).css({ + opacity: opacityString + }); + + if (data.origin) { + $targetEl.css('transform-origin', data.origin); + } + } + }; + + const setTransition = duration => { + const { + transformEl + } = swiper.params.creativeEffect; + const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides; + $transitionElements.transition(duration).find('.swiper-slide-shadow').transition(duration); + effectVirtualTransitionEnd({ + swiper, + duration, + transformEl, + allSlides: true + }); + }; + + effectInit({ + effect: 'creative', + swiper, + on, + setTranslate, + setTransition, + perspective: () => swiper.params.creativeEffect.perspective, + overwriteParams: () => ({ + watchSlidesProgress: true, + virtualTranslate: !swiper.params.cssMode + }) + }); + } + + function EffectCards(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + cardsEffect: { + slideShadows: true, + transformEl: null, + rotate: true + } + }); + + const setTranslate = () => { + const { + slides, + activeIndex + } = swiper; + const params = swiper.params.cardsEffect; + const { + startTranslate, + isTouched + } = swiper.touchEventsData; + const currentTranslate = swiper.translate; + + for (let i = 0; i < slides.length; i += 1) { + const $slideEl = slides.eq(i); + const slideProgress = $slideEl[0].progress; + const progress = Math.min(Math.max(slideProgress, -4), 4); + let offset = $slideEl[0].swiperSlideOffset; + + if (swiper.params.centeredSlides && !swiper.params.cssMode) { + swiper.$wrapperEl.transform(`translateX(${swiper.minTranslate()}px)`); + } + + if (swiper.params.centeredSlides && swiper.params.cssMode) { + offset -= slides[0].swiperSlideOffset; + } + + let tX = swiper.params.cssMode ? -offset - swiper.translate : -offset; + let tY = 0; + const tZ = -100 * Math.abs(progress); + let scale = 1; + let rotate = -2 * progress; + let tXAdd = 8 - Math.abs(progress) * 0.75; + const slideIndex = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.from + i : i; + const isSwipeToNext = (slideIndex === activeIndex || slideIndex === activeIndex - 1) && progress > 0 && progress < 1 && (isTouched || swiper.params.cssMode) && currentTranslate < startTranslate; + const isSwipeToPrev = (slideIndex === activeIndex || slideIndex === activeIndex + 1) && progress < 0 && progress > -1 && (isTouched || swiper.params.cssMode) && currentTranslate > startTranslate; + + if (isSwipeToNext || isSwipeToPrev) { + const subProgress = (1 - Math.abs((Math.abs(progress) - 0.5) / 0.5)) ** 0.5; + rotate += -28 * progress * subProgress; + scale += -0.5 * subProgress; + tXAdd += 96 * subProgress; + tY = `${-25 * subProgress * Math.abs(progress)}%`; + } + + if (progress < 0) { + // next + tX = `calc(${tX}px + (${tXAdd * Math.abs(progress)}%))`; + } else if (progress > 0) { + // prev + tX = `calc(${tX}px + (-${tXAdd * Math.abs(progress)}%))`; + } else { + tX = `${tX}px`; + } + + if (!swiper.isHorizontal()) { + const prevY = tY; + tY = tX; + tX = prevY; + } + + const scaleString = progress < 0 ? `${1 + (1 - scale) * progress}` : `${1 - (1 - scale) * progress}`; + const transform = ` + translate3d(${tX}, ${tY}, ${tZ}px) + rotateZ(${params.rotate ? rotate : 0}deg) + scale(${scaleString}) + `; + + if (params.slideShadows) { + // Set shadows + let $shadowEl = $slideEl.find('.swiper-slide-shadow'); + + if ($shadowEl.length === 0) { + $shadowEl = createShadow(params, $slideEl); + } + + if ($shadowEl.length) $shadowEl[0].style.opacity = Math.min(Math.max((Math.abs(progress) - 0.5) / 0.5, 0), 1); + } + + $slideEl[0].style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length; + const $targetEl = effectTarget(params, $slideEl); + $targetEl.transform(transform); + } + }; + + const setTransition = duration => { + const { + transformEl + } = swiper.params.cardsEffect; + const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides; + $transitionElements.transition(duration).find('.swiper-slide-shadow').transition(duration); + effectVirtualTransitionEnd({ + swiper, + duration, + transformEl + }); + }; + + effectInit({ + effect: 'cards', + swiper, + on, + setTranslate, + setTransition, + perspective: () => true, + overwriteParams: () => ({ + watchSlidesProgress: true, + virtualTranslate: !swiper.params.cssMode + }) + }); + } + + // Swiper Class + const modules = [Virtual, Keyboard, Mousewheel, Navigation, Pagination, Scrollbar, Parallax, Zoom, Lazy, Controller, A11y, History, HashNavigation, Autoplay, Thumb, freeMode, Grid, Manipulation, EffectFade, EffectCube, EffectFlip, EffectCoverflow, EffectCreative, EffectCards]; + Swiper.use(modules); + + return Swiper; + +})); +//# sourceMappingURL=swiper-bundle.js.map diff --git a/html/js/swiper.js b/html/js/swiper.js new file mode 100644 index 0000000..19a19fc --- /dev/null +++ b/html/js/swiper.js @@ -0,0 +1,8647 @@ +/** + * Swiper 5.3.0 + * Most modern mobile touch slider and framework with hardware accelerated transitions + * http://swiperjs.com + * + * Copyright 2014-2020 Vladimir Kharlampidi + * + * Released under the MIT License + * + * Released on: January 11, 2020 + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.Swiper = factory()); +}(this, function () { 'use strict'; + + /** + * SSR Window 1.0.1 + * Better handling for window object in SSR environment + * https://github.com/nolimits4web/ssr-window + * + * Copyright 2018, Vladimir Kharlampidi + * + * Licensed under MIT + * + * Released on: July 18, 2018 + */ + var doc = (typeof document === 'undefined') ? { + body: {}, + addEventListener: function addEventListener() {}, + removeEventListener: function removeEventListener() {}, + activeElement: { + blur: function blur() {}, + nodeName: '', + }, + querySelector: function querySelector() { + return null; + }, + querySelectorAll: function querySelectorAll() { + return []; + }, + getElementById: function getElementById() { + return null; + }, + createEvent: function createEvent() { + return { + initEvent: function initEvent() {}, + }; + }, + createElement: function createElement() { + return { + children: [], + childNodes: [], + style: {}, + setAttribute: function setAttribute() {}, + getElementsByTagName: function getElementsByTagName() { + return []; + }, + }; + }, + location: { hash: '' }, + } : document; // eslint-disable-line + + var win = (typeof window === 'undefined') ? { + document: doc, + navigator: { + userAgent: '', + }, + location: {}, + history: {}, + CustomEvent: function CustomEvent() { + return this; + }, + addEventListener: function addEventListener() {}, + removeEventListener: function removeEventListener() {}, + getComputedStyle: function getComputedStyle() { + return { + getPropertyValue: function getPropertyValue() { + return ''; + }, + }; + }, + Image: function Image() {}, + Date: function Date() {}, + screen: {}, + setTimeout: function setTimeout() {}, + clearTimeout: function clearTimeout() {}, + } : window; // eslint-disable-line + + /** + * Dom7 2.1.3 + * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API + * http://framework7.io/docs/dom.html + * + * Copyright 2019, Vladimir Kharlampidi + * The iDangero.us + * http://www.idangero.us/ + * + * Licensed under MIT + * + * Released on: February 11, 2019 + */ + + var Dom7 = function Dom7(arr) { + var self = this; + // Create array-like object + for (var i = 0; i < arr.length; i += 1) { + self[i] = arr[i]; + } + self.length = arr.length; + // Return collection with methods + return this; + }; + + function $(selector, context) { + var arr = []; + var i = 0; + if (selector && !context) { + if (selector instanceof Dom7) { + return selector; + } + } + if (selector) { + // String + if (typeof selector === 'string') { + var els; + var tempParent; + var html = selector.trim(); + if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) { + var toCreate = 'div'; + if (html.indexOf(':~]/)) { + // Pure ID selector + els = [doc.getElementById(selector.trim().split('#')[1])]; + } else { + // Other selectors + els = (context || doc).querySelectorAll(selector.trim()); + } + for (i = 0; i < els.length; i += 1) { + if (els[i]) { arr.push(els[i]); } + } + } + } else if (selector.nodeType || selector === win || selector === doc) { + // Node/element + arr.push(selector); + } else if (selector.length > 0 && selector[0].nodeType) { + // Array of elements or instance of Dom + for (i = 0; i < selector.length; i += 1) { + arr.push(selector[i]); + } + } + } + return new Dom7(arr); + } + + $.fn = Dom7.prototype; + $.Class = Dom7; + $.Dom7 = Dom7; + + function unique(arr) { + var uniqueArray = []; + for (var i = 0; i < arr.length; i += 1) { + if (uniqueArray.indexOf(arr[i]) === -1) { uniqueArray.push(arr[i]); } + } + return uniqueArray; + } + + // Classes and attributes + function addClass(className) { + if (typeof className === 'undefined') { + return this; + } + var classes = className.split(' '); + for (var i = 0; i < classes.length; i += 1) { + for (var j = 0; j < this.length; j += 1) { + if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') { this[j].classList.add(classes[i]); } + } + } + return this; + } + function removeClass(className) { + var classes = className.split(' '); + for (var i = 0; i < classes.length; i += 1) { + for (var j = 0; j < this.length; j += 1) { + if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') { this[j].classList.remove(classes[i]); } + } + } + return this; + } + function hasClass(className) { + if (!this[0]) { return false; } + return this[0].classList.contains(className); + } + function toggleClass(className) { + var classes = className.split(' '); + for (var i = 0; i < classes.length; i += 1) { + for (var j = 0; j < this.length; j += 1) { + if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') { this[j].classList.toggle(classes[i]); } + } + } + return this; + } + function attr(attrs, value) { + var arguments$1 = arguments; + + if (arguments.length === 1 && typeof attrs === 'string') { + // Get attr + if (this[0]) { return this[0].getAttribute(attrs); } + return undefined; + } + + // Set attrs + for (var i = 0; i < this.length; i += 1) { + if (arguments$1.length === 2) { + // String + this[i].setAttribute(attrs, value); + } else { + // Object + // eslint-disable-next-line + for (var attrName in attrs) { + this[i][attrName] = attrs[attrName]; + this[i].setAttribute(attrName, attrs[attrName]); + } + } + } + return this; + } + // eslint-disable-next-line + function removeAttr(attr) { + for (var i = 0; i < this.length; i += 1) { + this[i].removeAttribute(attr); + } + return this; + } + function data(key, value) { + var el; + if (typeof value === 'undefined') { + el = this[0]; + // Get value + if (el) { + if (el.dom7ElementDataStorage && (key in el.dom7ElementDataStorage)) { + return el.dom7ElementDataStorage[key]; + } + + var dataKey = el.getAttribute(("data-" + key)); + if (dataKey) { + return dataKey; + } + return undefined; + } + return undefined; + } + + // Set value + for (var i = 0; i < this.length; i += 1) { + el = this[i]; + if (!el.dom7ElementDataStorage) { el.dom7ElementDataStorage = {}; } + el.dom7ElementDataStorage[key] = value; + } + return this; + } + // Transforms + // eslint-disable-next-line + function transform(transform) { + for (var i = 0; i < this.length; i += 1) { + var elStyle = this[i].style; + elStyle.webkitTransform = transform; + elStyle.transform = transform; + } + return this; + } + function transition(duration) { + if (typeof duration !== 'string') { + duration = duration + "ms"; // eslint-disable-line + } + for (var i = 0; i < this.length; i += 1) { + var elStyle = this[i].style; + elStyle.webkitTransitionDuration = duration; + elStyle.transitionDuration = duration; + } + return this; + } + // Events + function on() { + var assign; + + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + var eventType = args[0]; + var targetSelector = args[1]; + var listener = args[2]; + var capture = args[3]; + if (typeof args[1] === 'function') { + (assign = args, eventType = assign[0], listener = assign[1], capture = assign[2]); + targetSelector = undefined; + } + if (!capture) { capture = false; } + + function handleLiveEvent(e) { + var target = e.target; + if (!target) { return; } + var eventData = e.target.dom7EventData || []; + if (eventData.indexOf(e) < 0) { + eventData.unshift(e); + } + if ($(target).is(targetSelector)) { listener.apply(target, eventData); } + else { + var parents = $(target).parents(); // eslint-disable-line + for (var k = 0; k < parents.length; k += 1) { + if ($(parents[k]).is(targetSelector)) { listener.apply(parents[k], eventData); } + } + } + } + function handleEvent(e) { + var eventData = e && e.target ? e.target.dom7EventData || [] : []; + if (eventData.indexOf(e) < 0) { + eventData.unshift(e); + } + listener.apply(this, eventData); + } + var events = eventType.split(' '); + var j; + for (var i = 0; i < this.length; i += 1) { + var el = this[i]; + if (!targetSelector) { + for (j = 0; j < events.length; j += 1) { + var event = events[j]; + if (!el.dom7Listeners) { el.dom7Listeners = {}; } + if (!el.dom7Listeners[event]) { el.dom7Listeners[event] = []; } + el.dom7Listeners[event].push({ + listener: listener, + proxyListener: handleEvent, + }); + el.addEventListener(event, handleEvent, capture); + } + } else { + // Live events + for (j = 0; j < events.length; j += 1) { + var event$1 = events[j]; + if (!el.dom7LiveListeners) { el.dom7LiveListeners = {}; } + if (!el.dom7LiveListeners[event$1]) { el.dom7LiveListeners[event$1] = []; } + el.dom7LiveListeners[event$1].push({ + listener: listener, + proxyListener: handleLiveEvent, + }); + el.addEventListener(event$1, handleLiveEvent, capture); + } + } + } + return this; + } + function off() { + var assign; + + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + var eventType = args[0]; + var targetSelector = args[1]; + var listener = args[2]; + var capture = args[3]; + if (typeof args[1] === 'function') { + (assign = args, eventType = assign[0], listener = assign[1], capture = assign[2]); + targetSelector = undefined; + } + if (!capture) { capture = false; } + + var events = eventType.split(' '); + for (var i = 0; i < events.length; i += 1) { + var event = events[i]; + for (var j = 0; j < this.length; j += 1) { + var el = this[j]; + var handlers = (void 0); + if (!targetSelector && el.dom7Listeners) { + handlers = el.dom7Listeners[event]; + } else if (targetSelector && el.dom7LiveListeners) { + handlers = el.dom7LiveListeners[event]; + } + if (handlers && handlers.length) { + for (var k = handlers.length - 1; k >= 0; k -= 1) { + var handler = handlers[k]; + if (listener && handler.listener === listener) { + el.removeEventListener(event, handler.proxyListener, capture); + handlers.splice(k, 1); + } else if (listener && handler.listener && handler.listener.dom7proxy && handler.listener.dom7proxy === listener) { + el.removeEventListener(event, handler.proxyListener, capture); + handlers.splice(k, 1); + } else if (!listener) { + el.removeEventListener(event, handler.proxyListener, capture); + handlers.splice(k, 1); + } + } + } + } + } + return this; + } + function trigger() { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var events = args[0].split(' '); + var eventData = args[1]; + for (var i = 0; i < events.length; i += 1) { + var event = events[i]; + for (var j = 0; j < this.length; j += 1) { + var el = this[j]; + var evt = (void 0); + try { + evt = new win.CustomEvent(event, { + detail: eventData, + bubbles: true, + cancelable: true, + }); + } catch (e) { + evt = doc.createEvent('Event'); + evt.initEvent(event, true, true); + evt.detail = eventData; + } + // eslint-disable-next-line + el.dom7EventData = args.filter(function (data, dataIndex) { return dataIndex > 0; }); + el.dispatchEvent(evt); + el.dom7EventData = []; + delete el.dom7EventData; + } + } + return this; + } + function transitionEnd(callback) { + var events = ['webkitTransitionEnd', 'transitionend']; + var dom = this; + var i; + function fireCallBack(e) { + /* jshint validthis:true */ + if (e.target !== this) { return; } + callback.call(this, e); + for (i = 0; i < events.length; i += 1) { + dom.off(events[i], fireCallBack); + } + } + if (callback) { + for (i = 0; i < events.length; i += 1) { + dom.on(events[i], fireCallBack); + } + } + return this; + } + function outerWidth(includeMargins) { + if (this.length > 0) { + if (includeMargins) { + // eslint-disable-next-line + var styles = this.styles(); + return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left')); + } + return this[0].offsetWidth; + } + return null; + } + function outerHeight(includeMargins) { + if (this.length > 0) { + if (includeMargins) { + // eslint-disable-next-line + var styles = this.styles(); + return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom')); + } + return this[0].offsetHeight; + } + return null; + } + function offset() { + if (this.length > 0) { + var el = this[0]; + var box = el.getBoundingClientRect(); + var body = doc.body; + var clientTop = el.clientTop || body.clientTop || 0; + var clientLeft = el.clientLeft || body.clientLeft || 0; + var scrollTop = el === win ? win.scrollY : el.scrollTop; + var scrollLeft = el === win ? win.scrollX : el.scrollLeft; + return { + top: (box.top + scrollTop) - clientTop, + left: (box.left + scrollLeft) - clientLeft, + }; + } + + return null; + } + function styles() { + if (this[0]) { return win.getComputedStyle(this[0], null); } + return {}; + } + function css(props, value) { + var i; + if (arguments.length === 1) { + if (typeof props === 'string') { + if (this[0]) { return win.getComputedStyle(this[0], null).getPropertyValue(props); } + } else { + for (i = 0; i < this.length; i += 1) { + // eslint-disable-next-line + for (var prop in props) { + this[i].style[prop] = props[prop]; + } + } + return this; + } + } + if (arguments.length === 2 && typeof props === 'string') { + for (i = 0; i < this.length; i += 1) { + this[i].style[props] = value; + } + return this; + } + return this; + } + // Iterate over the collection passing elements to `callback` + function each(callback) { + // Don't bother continuing without a callback + if (!callback) { return this; } + // Iterate over the current collection + for (var i = 0; i < this.length; i += 1) { + // If the callback returns false + if (callback.call(this[i], i, this[i]) === false) { + // End the loop early + return this; + } + } + // Return `this` to allow chained DOM operations + return this; + } + function filter(callback) { + var matchedItems = []; + var dom = this; + for (var i = 0; i < dom.length; i += 1) { + if (callback.call(dom[i], i, dom[i])) { matchedItems.push(dom[i]); } + } + return new Dom7(matchedItems); + } + // eslint-disable-next-line + function html(html) { + if (typeof html === 'undefined') { + return this[0] ? this[0].innerHTML : undefined; + } + + for (var i = 0; i < this.length; i += 1) { + this[i].innerHTML = html; + } + return this; + } + // eslint-disable-next-line + function text(text) { + if (typeof text === 'undefined') { + if (this[0]) { + return this[0].textContent.trim(); + } + return null; + } + + for (var i = 0; i < this.length; i += 1) { + this[i].textContent = text; + } + return this; + } + function is(selector) { + var el = this[0]; + var compareWith; + var i; + if (!el || typeof selector === 'undefined') { return false; } + if (typeof selector === 'string') { + if (el.matches) { return el.matches(selector); } + else if (el.webkitMatchesSelector) { return el.webkitMatchesSelector(selector); } + else if (el.msMatchesSelector) { return el.msMatchesSelector(selector); } + + compareWith = $(selector); + for (i = 0; i < compareWith.length; i += 1) { + if (compareWith[i] === el) { return true; } + } + return false; + } else if (selector === doc) { return el === doc; } + else if (selector === win) { return el === win; } + + if (selector.nodeType || selector instanceof Dom7) { + compareWith = selector.nodeType ? [selector] : selector; + for (i = 0; i < compareWith.length; i += 1) { + if (compareWith[i] === el) { return true; } + } + return false; + } + return false; + } + function index() { + var child = this[0]; + var i; + if (child) { + i = 0; + // eslint-disable-next-line + while ((child = child.previousSibling) !== null) { + if (child.nodeType === 1) { i += 1; } + } + return i; + } + return undefined; + } + // eslint-disable-next-line + function eq(index) { + if (typeof index === 'undefined') { return this; } + var length = this.length; + var returnIndex; + if (index > length - 1) { + return new Dom7([]); + } + if (index < 0) { + returnIndex = length + index; + if (returnIndex < 0) { return new Dom7([]); } + return new Dom7([this[returnIndex]]); + } + return new Dom7([this[index]]); + } + function append() { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var newChild; + + for (var k = 0; k < args.length; k += 1) { + newChild = args[k]; + for (var i = 0; i < this.length; i += 1) { + if (typeof newChild === 'string') { + var tempDiv = doc.createElement('div'); + tempDiv.innerHTML = newChild; + while (tempDiv.firstChild) { + this[i].appendChild(tempDiv.firstChild); + } + } else if (newChild instanceof Dom7) { + for (var j = 0; j < newChild.length; j += 1) { + this[i].appendChild(newChild[j]); + } + } else { + this[i].appendChild(newChild); + } + } + } + + return this; + } + function prepend(newChild) { + var i; + var j; + for (i = 0; i < this.length; i += 1) { + if (typeof newChild === 'string') { + var tempDiv = doc.createElement('div'); + tempDiv.innerHTML = newChild; + for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) { + this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]); + } + } else if (newChild instanceof Dom7) { + for (j = 0; j < newChild.length; j += 1) { + this[i].insertBefore(newChild[j], this[i].childNodes[0]); + } + } else { + this[i].insertBefore(newChild, this[i].childNodes[0]); + } + } + return this; + } + function next(selector) { + if (this.length > 0) { + if (selector) { + if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) { + return new Dom7([this[0].nextElementSibling]); + } + return new Dom7([]); + } + + if (this[0].nextElementSibling) { return new Dom7([this[0].nextElementSibling]); } + return new Dom7([]); + } + return new Dom7([]); + } + function nextAll(selector) { + var nextEls = []; + var el = this[0]; + if (!el) { return new Dom7([]); } + while (el.nextElementSibling) { + var next = el.nextElementSibling; // eslint-disable-line + if (selector) { + if ($(next).is(selector)) { nextEls.push(next); } + } else { nextEls.push(next); } + el = next; + } + return new Dom7(nextEls); + } + function prev(selector) { + if (this.length > 0) { + var el = this[0]; + if (selector) { + if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) { + return new Dom7([el.previousElementSibling]); + } + return new Dom7([]); + } + + if (el.previousElementSibling) { return new Dom7([el.previousElementSibling]); } + return new Dom7([]); + } + return new Dom7([]); + } + function prevAll(selector) { + var prevEls = []; + var el = this[0]; + if (!el) { return new Dom7([]); } + while (el.previousElementSibling) { + var prev = el.previousElementSibling; // eslint-disable-line + if (selector) { + if ($(prev).is(selector)) { prevEls.push(prev); } + } else { prevEls.push(prev); } + el = prev; + } + return new Dom7(prevEls); + } + function parent(selector) { + var parents = []; // eslint-disable-line + for (var i = 0; i < this.length; i += 1) { + if (this[i].parentNode !== null) { + if (selector) { + if ($(this[i].parentNode).is(selector)) { parents.push(this[i].parentNode); } + } else { + parents.push(this[i].parentNode); + } + } + } + return $(unique(parents)); + } + function parents(selector) { + var parents = []; // eslint-disable-line + for (var i = 0; i < this.length; i += 1) { + var parent = this[i].parentNode; // eslint-disable-line + while (parent) { + if (selector) { + if ($(parent).is(selector)) { parents.push(parent); } + } else { + parents.push(parent); + } + parent = parent.parentNode; + } + } + return $(unique(parents)); + } + function closest(selector) { + var closest = this; // eslint-disable-line + if (typeof selector === 'undefined') { + return new Dom7([]); + } + if (!closest.is(selector)) { + closest = closest.parents(selector).eq(0); + } + return closest; + } + function find(selector) { + var foundElements = []; + for (var i = 0; i < this.length; i += 1) { + var found = this[i].querySelectorAll(selector); + for (var j = 0; j < found.length; j += 1) { + foundElements.push(found[j]); + } + } + return new Dom7(foundElements); + } + function children(selector) { + var children = []; // eslint-disable-line + for (var i = 0; i < this.length; i += 1) { + var childNodes = this[i].childNodes; + + for (var j = 0; j < childNodes.length; j += 1) { + if (!selector) { + if (childNodes[j].nodeType === 1) { children.push(childNodes[j]); } + } else if (childNodes[j].nodeType === 1 && $(childNodes[j]).is(selector)) { + children.push(childNodes[j]); + } + } + } + return new Dom7(unique(children)); + } + function remove() { + for (var i = 0; i < this.length; i += 1) { + if (this[i].parentNode) { this[i].parentNode.removeChild(this[i]); } + } + return this; + } + function add() { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var dom = this; + var i; + var j; + for (i = 0; i < args.length; i += 1) { + var toAdd = $(args[i]); + for (j = 0; j < toAdd.length; j += 1) { + dom[dom.length] = toAdd[j]; + dom.length += 1; + } + } + return dom; + } + + var Methods = { + addClass: addClass, + removeClass: removeClass, + hasClass: hasClass, + toggleClass: toggleClass, + attr: attr, + removeAttr: removeAttr, + data: data, + transform: transform, + transition: transition, + on: on, + off: off, + trigger: trigger, + transitionEnd: transitionEnd, + outerWidth: outerWidth, + outerHeight: outerHeight, + offset: offset, + css: css, + each: each, + html: html, + text: text, + is: is, + index: index, + eq: eq, + append: append, + prepend: prepend, + next: next, + nextAll: nextAll, + prev: prev, + prevAll: prevAll, + parent: parent, + parents: parents, + closest: closest, + find: find, + children: children, + filter: filter, + remove: remove, + add: add, + styles: styles, + }; + + Object.keys(Methods).forEach(function (methodName) { + $.fn[methodName] = $.fn[methodName] || Methods[methodName]; + }); + + var Utils = { + deleteProps: function deleteProps(obj) { + var object = obj; + Object.keys(object).forEach(function (key) { + try { + object[key] = null; + } catch (e) { + // no getter for object + } + try { + delete object[key]; + } catch (e) { + // something got wrong + } + }); + }, + nextTick: function nextTick(callback, delay) { + if ( delay === void 0 ) delay = 0; + + return setTimeout(callback, delay); + }, + now: function now() { + return Date.now(); + }, + getTranslate: function getTranslate(el, axis) { + if ( axis === void 0 ) axis = 'x'; + + var matrix; + var curTransform; + var transformMatrix; + + var curStyle = win.getComputedStyle(el, null); + + if (win.WebKitCSSMatrix) { + curTransform = curStyle.transform || curStyle.webkitTransform; + if (curTransform.split(',').length > 6) { + curTransform = curTransform.split(', ').map(function (a) { return a.replace(',', '.'); }).join(', '); + } + // Some old versions of Webkit choke when 'none' is passed; pass + // empty string instead in this case + transformMatrix = new win.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform); + } else { + transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,'); + matrix = transformMatrix.toString().split(','); + } + + if (axis === 'x') { + // Latest Chrome and webkits Fix + if (win.WebKitCSSMatrix) { curTransform = transformMatrix.m41; } + // Crazy IE10 Matrix + else if (matrix.length === 16) { curTransform = parseFloat(matrix[12]); } + // Normal Browsers + else { curTransform = parseFloat(matrix[4]); } + } + if (axis === 'y') { + // Latest Chrome and webkits Fix + if (win.WebKitCSSMatrix) { curTransform = transformMatrix.m42; } + // Crazy IE10 Matrix + else if (matrix.length === 16) { curTransform = parseFloat(matrix[13]); } + // Normal Browsers + else { curTransform = parseFloat(matrix[5]); } + } + return curTransform || 0; + }, + parseUrlQuery: function parseUrlQuery(url) { + var query = {}; + var urlToParse = url || win.location.href; + var i; + var params; + var param; + var length; + if (typeof urlToParse === 'string' && urlToParse.length) { + urlToParse = urlToParse.indexOf('?') > -1 ? urlToParse.replace(/\S*\?/, '') : ''; + params = urlToParse.split('&').filter(function (paramsPart) { return paramsPart !== ''; }); + length = params.length; + + for (i = 0; i < length; i += 1) { + param = params[i].replace(/#\S+/g, '').split('='); + query[decodeURIComponent(param[0])] = typeof param[1] === 'undefined' ? undefined : decodeURIComponent(param[1]) || ''; + } + } + return query; + }, + isObject: function isObject(o) { + return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object; + }, + extend: function extend() { + var args = [], len$1 = arguments.length; + while ( len$1-- ) args[ len$1 ] = arguments[ len$1 ]; + + var to = Object(args[0]); + for (var i = 1; i < args.length; i += 1) { + var nextSource = args[i]; + if (nextSource !== undefined && nextSource !== null) { + var keysArray = Object.keys(Object(nextSource)); + for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) { + var nextKey = keysArray[nextIndex]; + var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); + if (desc !== undefined && desc.enumerable) { + if (Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) { + Utils.extend(to[nextKey], nextSource[nextKey]); + } else if (!Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) { + to[nextKey] = {}; + Utils.extend(to[nextKey], nextSource[nextKey]); + } else { + to[nextKey] = nextSource[nextKey]; + } + } + } + } + } + return to; + }, + }; + + var Support = (function Support() { + return { + touch: (win.Modernizr && win.Modernizr.touch === true) || (function checkTouch() { + return !!((win.navigator.maxTouchPoints > 0) || ('ontouchstart' in win) || (win.DocumentTouch && doc instanceof win.DocumentTouch)); + }()), + + pointerEvents: !!win.PointerEvent && ('maxTouchPoints' in win.navigator) && win.navigator.maxTouchPoints > 0, + + observer: (function checkObserver() { + return ('MutationObserver' in win || 'WebkitMutationObserver' in win); + }()), + + passiveListener: (function checkPassiveListener() { + var supportsPassive = false; + try { + var opts = Object.defineProperty({}, 'passive', { + // eslint-disable-next-line + get: function get() { + supportsPassive = true; + }, + }); + win.addEventListener('testPassiveListener', null, opts); + } catch (e) { + // No support + } + return supportsPassive; + }()), + + gestures: (function checkGestures() { + return 'ongesturestart' in win; + }()), + }; + }()); + + var SwiperClass = function SwiperClass(params) { + if ( params === void 0 ) params = {}; + + var self = this; + self.params = params; + + // Events + self.eventsListeners = {}; + + if (self.params && self.params.on) { + Object.keys(self.params.on).forEach(function (eventName) { + self.on(eventName, self.params.on[eventName]); + }); + } + }; + + var staticAccessors = { components: { configurable: true } }; + + SwiperClass.prototype.on = function on (events, handler, priority) { + var self = this; + if (typeof handler !== 'function') { return self; } + var method = priority ? 'unshift' : 'push'; + events.split(' ').forEach(function (event) { + if (!self.eventsListeners[event]) { self.eventsListeners[event] = []; } + self.eventsListeners[event][method](handler); + }); + return self; + }; + + SwiperClass.prototype.once = function once (events, handler, priority) { + var self = this; + if (typeof handler !== 'function') { return self; } + function onceHandler() { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + self.off(events, onceHandler); + if (onceHandler.f7proxy) { + delete onceHandler.f7proxy; + } + handler.apply(self, args); + } + onceHandler.f7proxy = handler; + return self.on(events, onceHandler, priority); + }; + + SwiperClass.prototype.off = function off (events, handler) { + var self = this; + if (!self.eventsListeners) { return self; } + events.split(' ').forEach(function (event) { + if (typeof handler === 'undefined') { + self.eventsListeners[event] = []; + } else if (self.eventsListeners[event] && self.eventsListeners[event].length) { + self.eventsListeners[event].forEach(function (eventHandler, index) { + if (eventHandler === handler || (eventHandler.f7proxy && eventHandler.f7proxy === handler)) { + self.eventsListeners[event].splice(index, 1); + } + }); + } + }); + return self; + }; + + SwiperClass.prototype.emit = function emit () { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var self = this; + if (!self.eventsListeners) { return self; } + var events; + var data; + var context; + if (typeof args[0] === 'string' || Array.isArray(args[0])) { + events = args[0]; + data = args.slice(1, args.length); + context = self; + } else { + events = args[0].events; + data = args[0].data; + context = args[0].context || self; + } + var eventsArray = Array.isArray(events) ? events : events.split(' '); + eventsArray.forEach(function (event) { + if (self.eventsListeners && self.eventsListeners[event]) { + var handlers = []; + self.eventsListeners[event].forEach(function (eventHandler) { + handlers.push(eventHandler); + }); + handlers.forEach(function (eventHandler) { + eventHandler.apply(context, data); + }); + } + }); + return self; + }; + + SwiperClass.prototype.useModulesParams = function useModulesParams (instanceParams) { + var instance = this; + if (!instance.modules) { return; } + Object.keys(instance.modules).forEach(function (moduleName) { + var module = instance.modules[moduleName]; + // Extend params + if (module.params) { + Utils.extend(instanceParams, module.params); + } + }); + }; + + SwiperClass.prototype.useModules = function useModules (modulesParams) { + if ( modulesParams === void 0 ) modulesParams = {}; + + var instance = this; + if (!instance.modules) { return; } + Object.keys(instance.modules).forEach(function (moduleName) { + var module = instance.modules[moduleName]; + var moduleParams = modulesParams[moduleName] || {}; + // Extend instance methods and props + if (module.instance) { + Object.keys(module.instance).forEach(function (modulePropName) { + var moduleProp = module.instance[modulePropName]; + if (typeof moduleProp === 'function') { + instance[modulePropName] = moduleProp.bind(instance); + } else { + instance[modulePropName] = moduleProp; + } + }); + } + // Add event listeners + if (module.on && instance.on) { + Object.keys(module.on).forEach(function (moduleEventName) { + instance.on(moduleEventName, module.on[moduleEventName]); + }); + } + + // Module create callback + if (module.create) { + module.create.bind(instance)(moduleParams); + } + }); + }; + + staticAccessors.components.set = function (components) { + var Class = this; + if (!Class.use) { return; } + Class.use(components); + }; + + SwiperClass.installModule = function installModule (module) { + var params = [], len = arguments.length - 1; + while ( len-- > 0 ) params[ len ] = arguments[ len + 1 ]; + + var Class = this; + if (!Class.prototype.modules) { Class.prototype.modules = {}; } + var name = module.name || (((Object.keys(Class.prototype.modules).length) + "_" + (Utils.now()))); + Class.prototype.modules[name] = module; + // Prototype + if (module.proto) { + Object.keys(module.proto).forEach(function (key) { + Class.prototype[key] = module.proto[key]; + }); + } + // Class + if (module.static) { + Object.keys(module.static).forEach(function (key) { + Class[key] = module.static[key]; + }); + } + // Callback + if (module.install) { + module.install.apply(Class, params); + } + return Class; + }; + + SwiperClass.use = function use (module) { + var params = [], len = arguments.length - 1; + while ( len-- > 0 ) params[ len ] = arguments[ len + 1 ]; + + var Class = this; + if (Array.isArray(module)) { + module.forEach(function (m) { return Class.installModule(m); }); + return Class; + } + return Class.installModule.apply(Class, [ module ].concat( params )); + }; + + Object.defineProperties( SwiperClass, staticAccessors ); + + function updateSize () { + var swiper = this; + var width; + var height; + var $el = swiper.$el; + if (typeof swiper.params.width !== 'undefined') { + width = swiper.params.width; + } else { + width = $el[0].clientWidth; + } + if (typeof swiper.params.height !== 'undefined') { + height = swiper.params.height; + } else { + height = $el[0].clientHeight; + } + if ((width === 0 && swiper.isHorizontal()) || (height === 0 && swiper.isVertical())) { + return; + } + + // Subtract paddings + width = width - parseInt($el.css('padding-left'), 10) - parseInt($el.css('padding-right'), 10); + height = height - parseInt($el.css('padding-top'), 10) - parseInt($el.css('padding-bottom'), 10); + + Utils.extend(swiper, { + width: width, + height: height, + size: swiper.isHorizontal() ? width : height, + }); + } + + function updateSlides () { + var swiper = this; + var params = swiper.params; + + var $wrapperEl = swiper.$wrapperEl; + var swiperSize = swiper.size; + var rtl = swiper.rtlTranslate; + var wrongRTL = swiper.wrongRTL; + var isVirtual = swiper.virtual && params.virtual.enabled; + var previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length; + var slides = $wrapperEl.children(("." + (swiper.params.slideClass))); + var slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length; + var snapGrid = []; + var slidesGrid = []; + var slidesSizesGrid = []; + + function slidesForMargin(slideIndex) { + if (!params.cssMode) { return true; } + if (slideIndex === slides.length - 1) { + return false; + } + return true; + } + + var offsetBefore = params.slidesOffsetBefore; + if (typeof offsetBefore === 'function') { + offsetBefore = params.slidesOffsetBefore.call(swiper); + } + + var offsetAfter = params.slidesOffsetAfter; + if (typeof offsetAfter === 'function') { + offsetAfter = params.slidesOffsetAfter.call(swiper); + } + + var previousSnapGridLength = swiper.snapGrid.length; + var previousSlidesGridLength = swiper.snapGrid.length; + + var spaceBetween = params.spaceBetween; + var slidePosition = -offsetBefore; + var prevSlideSize = 0; + var index = 0; + if (typeof swiperSize === 'undefined') { + return; + } + if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) { + spaceBetween = (parseFloat(spaceBetween.replace('%', '')) / 100) * swiperSize; + } + + swiper.virtualSize = -spaceBetween; + + // reset margins + if (rtl) { slides.css({ marginLeft: '', marginTop: '' }); } + else { slides.css({ marginRight: '', marginBottom: '' }); } + + var slidesNumberEvenToRows; + if (params.slidesPerColumn > 1) { + if (Math.floor(slidesLength / params.slidesPerColumn) === slidesLength / swiper.params.slidesPerColumn) { + slidesNumberEvenToRows = slidesLength; + } else { + slidesNumberEvenToRows = Math.ceil(slidesLength / params.slidesPerColumn) * params.slidesPerColumn; + } + if (params.slidesPerView !== 'auto' && params.slidesPerColumnFill === 'row') { + slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, params.slidesPerView * params.slidesPerColumn); + } + } + + // Calc slides + var slideSize; + var slidesPerColumn = params.slidesPerColumn; + var slidesPerRow = slidesNumberEvenToRows / slidesPerColumn; + var numFullColumns = Math.floor(slidesLength / params.slidesPerColumn); + for (var i = 0; i < slidesLength; i += 1) { + slideSize = 0; + var slide = slides.eq(i); + if (params.slidesPerColumn > 1) { + // Set slides order + var newSlideOrderIndex = (void 0); + var column = (void 0); + var row = (void 0); + if (params.slidesPerColumnFill === 'row' && params.slidesPerGroup > 1) { + var groupIndex = Math.floor(i / (params.slidesPerGroup * params.slidesPerColumn)); + var slideIndexInGroup = i - params.slidesPerColumn * params.slidesPerGroup * groupIndex; + var columnsInGroup = groupIndex === 0 + ? params.slidesPerGroup + : Math.min(Math.ceil((slidesLength - groupIndex * slidesPerColumn * params.slidesPerGroup) / slidesPerColumn), params.slidesPerGroup); + row = Math.floor(slideIndexInGroup / columnsInGroup); + column = (slideIndexInGroup - row * columnsInGroup) + groupIndex * params.slidesPerGroup; + + newSlideOrderIndex = column + ((row * slidesNumberEvenToRows) / slidesPerColumn); + slide + .css({ + '-webkit-box-ordinal-group': newSlideOrderIndex, + '-moz-box-ordinal-group': newSlideOrderIndex, + '-ms-flex-order': newSlideOrderIndex, + '-webkit-order': newSlideOrderIndex, + order: newSlideOrderIndex, + }); + } else if (params.slidesPerColumnFill === 'column') { + column = Math.floor(i / slidesPerColumn); + row = i - (column * slidesPerColumn); + if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn - 1)) { + row += 1; + if (row >= slidesPerColumn) { + row = 0; + column += 1; + } + } + } else { + row = Math.floor(i / slidesPerRow); + column = i - (row * slidesPerRow); + } + slide.css( + ("margin-" + (swiper.isHorizontal() ? 'top' : 'left')), + (row !== 0 && params.spaceBetween) && (((params.spaceBetween) + "px")) + ); + } + if (slide.css('display') === 'none') { continue; } // eslint-disable-line + + if (params.slidesPerView === 'auto') { + var slideStyles = win.getComputedStyle(slide[0], null); + var currentTransform = slide[0].style.transform; + var currentWebKitTransform = slide[0].style.webkitTransform; + if (currentTransform) { + slide[0].style.transform = 'none'; + } + if (currentWebKitTransform) { + slide[0].style.webkitTransform = 'none'; + } + if (params.roundLengths) { + slideSize = swiper.isHorizontal() + ? slide.outerWidth(true) + : slide.outerHeight(true); + } else { + // eslint-disable-next-line + if (swiper.isHorizontal()) { + var width = parseFloat(slideStyles.getPropertyValue('width')); + var paddingLeft = parseFloat(slideStyles.getPropertyValue('padding-left')); + var paddingRight = parseFloat(slideStyles.getPropertyValue('padding-right')); + var marginLeft = parseFloat(slideStyles.getPropertyValue('margin-left')); + var marginRight = parseFloat(slideStyles.getPropertyValue('margin-right')); + var boxSizing = slideStyles.getPropertyValue('box-sizing'); + if (boxSizing && boxSizing === 'border-box') { + slideSize = width + marginLeft + marginRight; + } else { + slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight; + } + } else { + var height = parseFloat(slideStyles.getPropertyValue('height')); + var paddingTop = parseFloat(slideStyles.getPropertyValue('padding-top')); + var paddingBottom = parseFloat(slideStyles.getPropertyValue('padding-bottom')); + var marginTop = parseFloat(slideStyles.getPropertyValue('margin-top')); + var marginBottom = parseFloat(slideStyles.getPropertyValue('margin-bottom')); + var boxSizing$1 = slideStyles.getPropertyValue('box-sizing'); + if (boxSizing$1 && boxSizing$1 === 'border-box') { + slideSize = height + marginTop + marginBottom; + } else { + slideSize = height + paddingTop + paddingBottom + marginTop + marginBottom; + } + } + } + if (currentTransform) { + slide[0].style.transform = currentTransform; + } + if (currentWebKitTransform) { + slide[0].style.webkitTransform = currentWebKitTransform; + } + if (params.roundLengths) { slideSize = Math.floor(slideSize); } + } else { + slideSize = (swiperSize - ((params.slidesPerView - 1) * spaceBetween)) / params.slidesPerView; + if (params.roundLengths) { slideSize = Math.floor(slideSize); } + + if (slides[i]) { + if (swiper.isHorizontal()) { + slides[i].style.width = slideSize + "px"; + } else { + slides[i].style.height = slideSize + "px"; + } + } + } + if (slides[i]) { + slides[i].swiperSlideSize = slideSize; + } + slidesSizesGrid.push(slideSize); + + + if (params.centeredSlides) { + slidePosition = slidePosition + (slideSize / 2) + (prevSlideSize / 2) + spaceBetween; + if (prevSlideSize === 0 && i !== 0) { slidePosition = slidePosition - (swiperSize / 2) - spaceBetween; } + if (i === 0) { slidePosition = slidePosition - (swiperSize / 2) - spaceBetween; } + if (Math.abs(slidePosition) < 1 / 1000) { slidePosition = 0; } + if (params.roundLengths) { slidePosition = Math.floor(slidePosition); } + if ((index) % params.slidesPerGroup === 0) { snapGrid.push(slidePosition); } + slidesGrid.push(slidePosition); + } else { + if (params.roundLengths) { slidePosition = Math.floor(slidePosition); } + if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) { snapGrid.push(slidePosition); } + slidesGrid.push(slidePosition); + slidePosition = slidePosition + slideSize + spaceBetween; + } + + swiper.virtualSize += slideSize + spaceBetween; + + prevSlideSize = slideSize; + + index += 1; + } + swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter; + var newSlidesGrid; + + if ( + rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) { + $wrapperEl.css({ width: ((swiper.virtualSize + params.spaceBetween) + "px") }); + } + if (params.setWrapperSize) { + if (swiper.isHorizontal()) { $wrapperEl.css({ width: ((swiper.virtualSize + params.spaceBetween) + "px") }); } + else { $wrapperEl.css({ height: ((swiper.virtualSize + params.spaceBetween) + "px") }); } + } + + if (params.slidesPerColumn > 1) { + swiper.virtualSize = (slideSize + params.spaceBetween) * slidesNumberEvenToRows; + swiper.virtualSize = Math.ceil(swiper.virtualSize / params.slidesPerColumn) - params.spaceBetween; + if (swiper.isHorizontal()) { $wrapperEl.css({ width: ((swiper.virtualSize + params.spaceBetween) + "px") }); } + else { $wrapperEl.css({ height: ((swiper.virtualSize + params.spaceBetween) + "px") }); } + if (params.centeredSlides) { + newSlidesGrid = []; + for (var i$1 = 0; i$1 < snapGrid.length; i$1 += 1) { + var slidesGridItem = snapGrid[i$1]; + if (params.roundLengths) { slidesGridItem = Math.floor(slidesGridItem); } + if (snapGrid[i$1] < swiper.virtualSize + snapGrid[0]) { newSlidesGrid.push(slidesGridItem); } + } + snapGrid = newSlidesGrid; + } + } + + // Remove last grid elements depending on width + if (!params.centeredSlides) { + newSlidesGrid = []; + for (var i$2 = 0; i$2 < snapGrid.length; i$2 += 1) { + var slidesGridItem$1 = snapGrid[i$2]; + if (params.roundLengths) { slidesGridItem$1 = Math.floor(slidesGridItem$1); } + if (snapGrid[i$2] <= swiper.virtualSize - swiperSize) { + newSlidesGrid.push(slidesGridItem$1); + } + } + snapGrid = newSlidesGrid; + if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) { + snapGrid.push(swiper.virtualSize - swiperSize); + } + } + if (snapGrid.length === 0) { snapGrid = [0]; } + + if (params.spaceBetween !== 0) { + if (swiper.isHorizontal()) { + if (rtl) { slides.filter(slidesForMargin).css({ marginLeft: (spaceBetween + "px") }); } + else { slides.filter(slidesForMargin).css({ marginRight: (spaceBetween + "px") }); } + } else { slides.filter(slidesForMargin).css({ marginBottom: (spaceBetween + "px") }); } + } + + if (params.centeredSlides && params.centeredSlidesBounds) { + var allSlidesSize = 0; + slidesSizesGrid.forEach(function (slideSizeValue) { + allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0); + }); + allSlidesSize -= params.spaceBetween; + var maxSnap = allSlidesSize - swiperSize; + snapGrid = snapGrid.map(function (snap) { + if (snap < 0) { return -offsetBefore; } + if (snap > maxSnap) { return maxSnap + offsetAfter; } + return snap; + }); + } + + if (params.centerInsufficientSlides) { + var allSlidesSize$1 = 0; + slidesSizesGrid.forEach(function (slideSizeValue) { + allSlidesSize$1 += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0); + }); + allSlidesSize$1 -= params.spaceBetween; + if (allSlidesSize$1 < swiperSize) { + var allSlidesOffset = (swiperSize - allSlidesSize$1) / 2; + snapGrid.forEach(function (snap, snapIndex) { + snapGrid[snapIndex] = snap - allSlidesOffset; + }); + slidesGrid.forEach(function (snap, snapIndex) { + slidesGrid[snapIndex] = snap + allSlidesOffset; + }); + } + } + + Utils.extend(swiper, { + slides: slides, + snapGrid: snapGrid, + slidesGrid: slidesGrid, + slidesSizesGrid: slidesSizesGrid, + }); + + if (slidesLength !== previousSlidesLength) { + swiper.emit('slidesLengthChange'); + } + if (snapGrid.length !== previousSnapGridLength) { + if (swiper.params.watchOverflow) { swiper.checkOverflow(); } + swiper.emit('snapGridLengthChange'); + } + if (slidesGrid.length !== previousSlidesGridLength) { + swiper.emit('slidesGridLengthChange'); + } + + if (params.watchSlidesProgress || params.watchSlidesVisibility) { + swiper.updateSlidesOffset(); + } + } + + function updateAutoHeight (speed) { + var swiper = this; + var activeSlides = []; + var newHeight = 0; + var i; + if (typeof speed === 'number') { + swiper.setTransition(speed); + } else if (speed === true) { + swiper.setTransition(swiper.params.speed); + } + // Find slides currently in view + if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) { + for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) { + var index = swiper.activeIndex + i; + if (index > swiper.slides.length) { break; } + activeSlides.push(swiper.slides.eq(index)[0]); + } + } else { + activeSlides.push(swiper.slides.eq(swiper.activeIndex)[0]); + } + + // Find new height from highest slide in view + for (i = 0; i < activeSlides.length; i += 1) { + if (typeof activeSlides[i] !== 'undefined') { + var height = activeSlides[i].offsetHeight; + newHeight = height > newHeight ? height : newHeight; + } + } + + // Update Height + if (newHeight) { swiper.$wrapperEl.css('height', (newHeight + "px")); } + } + + function updateSlidesOffset () { + var swiper = this; + var slides = swiper.slides; + for (var i = 0; i < slides.length; i += 1) { + slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop; + } + } + + function updateSlidesProgress (translate) { + if ( translate === void 0 ) translate = (this && this.translate) || 0; + + var swiper = this; + var params = swiper.params; + + var slides = swiper.slides; + var rtl = swiper.rtlTranslate; + + if (slides.length === 0) { return; } + if (typeof slides[0].swiperSlideOffset === 'undefined') { swiper.updateSlidesOffset(); } + + var offsetCenter = -translate; + if (rtl) { offsetCenter = translate; } + + // Visible Slides + slides.removeClass(params.slideVisibleClass); + + swiper.visibleSlidesIndexes = []; + swiper.visibleSlides = []; + + for (var i = 0; i < slides.length; i += 1) { + var slide = slides[i]; + var slideProgress = ( + (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0)) - slide.swiperSlideOffset + ) / (slide.swiperSlideSize + params.spaceBetween); + if (params.watchSlidesVisibility) { + var slideBefore = -(offsetCenter - slide.swiperSlideOffset); + var slideAfter = slideBefore + swiper.slidesSizesGrid[i]; + var isVisible = (slideBefore >= 0 && slideBefore < swiper.size - 1) + || (slideAfter > 1 && slideAfter <= swiper.size) + || (slideBefore <= 0 && slideAfter >= swiper.size); + if (isVisible) { + swiper.visibleSlides.push(slide); + swiper.visibleSlidesIndexes.push(i); + slides.eq(i).addClass(params.slideVisibleClass); + } + } + slide.progress = rtl ? -slideProgress : slideProgress; + } + swiper.visibleSlides = $(swiper.visibleSlides); + } + + function updateProgress (translate) { + var swiper = this; + if (typeof translate === 'undefined') { + var multiplier = swiper.rtlTranslate ? -1 : 1; + // eslint-disable-next-line + translate = (swiper && swiper.translate && (swiper.translate * multiplier)) || 0; + } + var params = swiper.params; + var translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); + var progress = swiper.progress; + var isBeginning = swiper.isBeginning; + var isEnd = swiper.isEnd; + var wasBeginning = isBeginning; + var wasEnd = isEnd; + if (translatesDiff === 0) { + progress = 0; + isBeginning = true; + isEnd = true; + } else { + progress = (translate - swiper.minTranslate()) / (translatesDiff); + isBeginning = progress <= 0; + isEnd = progress >= 1; + } + Utils.extend(swiper, { + progress: progress, + isBeginning: isBeginning, + isEnd: isEnd, + }); + + if (params.watchSlidesProgress || params.watchSlidesVisibility) { swiper.updateSlidesProgress(translate); } + + if (isBeginning && !wasBeginning) { + swiper.emit('reachBeginning toEdge'); + } + if (isEnd && !wasEnd) { + swiper.emit('reachEnd toEdge'); + } + if ((wasBeginning && !isBeginning) || (wasEnd && !isEnd)) { + swiper.emit('fromEdge'); + } + + swiper.emit('progress', progress); + } + + function updateSlidesClasses () { + var swiper = this; + + var slides = swiper.slides; + var params = swiper.params; + var $wrapperEl = swiper.$wrapperEl; + var activeIndex = swiper.activeIndex; + var realIndex = swiper.realIndex; + var isVirtual = swiper.virtual && params.virtual.enabled; + + slides.removeClass(((params.slideActiveClass) + " " + (params.slideNextClass) + " " + (params.slidePrevClass) + " " + (params.slideDuplicateActiveClass) + " " + (params.slideDuplicateNextClass) + " " + (params.slideDuplicatePrevClass))); + + var activeSlide; + if (isVirtual) { + activeSlide = swiper.$wrapperEl.find(("." + (params.slideClass) + "[data-swiper-slide-index=\"" + activeIndex + "\"]")); + } else { + activeSlide = slides.eq(activeIndex); + } + + // Active classes + activeSlide.addClass(params.slideActiveClass); + + if (params.loop) { + // Duplicate to all looped slides + if (activeSlide.hasClass(params.slideDuplicateClass)) { + $wrapperEl + .children(("." + (params.slideClass) + ":not(." + (params.slideDuplicateClass) + ")[data-swiper-slide-index=\"" + realIndex + "\"]")) + .addClass(params.slideDuplicateActiveClass); + } else { + $wrapperEl + .children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + realIndex + "\"]")) + .addClass(params.slideDuplicateActiveClass); + } + } + // Next Slide + var nextSlide = activeSlide.nextAll(("." + (params.slideClass))).eq(0).addClass(params.slideNextClass); + if (params.loop && nextSlide.length === 0) { + nextSlide = slides.eq(0); + nextSlide.addClass(params.slideNextClass); + } + // Prev Slide + var prevSlide = activeSlide.prevAll(("." + (params.slideClass))).eq(0).addClass(params.slidePrevClass); + if (params.loop && prevSlide.length === 0) { + prevSlide = slides.eq(-1); + prevSlide.addClass(params.slidePrevClass); + } + if (params.loop) { + // Duplicate to all looped slides + if (nextSlide.hasClass(params.slideDuplicateClass)) { + $wrapperEl + .children(("." + (params.slideClass) + ":not(." + (params.slideDuplicateClass) + ")[data-swiper-slide-index=\"" + (nextSlide.attr('data-swiper-slide-index')) + "\"]")) + .addClass(params.slideDuplicateNextClass); + } else { + $wrapperEl + .children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + (nextSlide.attr('data-swiper-slide-index')) + "\"]")) + .addClass(params.slideDuplicateNextClass); + } + if (prevSlide.hasClass(params.slideDuplicateClass)) { + $wrapperEl + .children(("." + (params.slideClass) + ":not(." + (params.slideDuplicateClass) + ")[data-swiper-slide-index=\"" + (prevSlide.attr('data-swiper-slide-index')) + "\"]")) + .addClass(params.slideDuplicatePrevClass); + } else { + $wrapperEl + .children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + (prevSlide.attr('data-swiper-slide-index')) + "\"]")) + .addClass(params.slideDuplicatePrevClass); + } + } + } + + function updateActiveIndex (newActiveIndex) { + var swiper = this; + var translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; + var slidesGrid = swiper.slidesGrid; + var snapGrid = swiper.snapGrid; + var params = swiper.params; + var previousIndex = swiper.activeIndex; + var previousRealIndex = swiper.realIndex; + var previousSnapIndex = swiper.snapIndex; + var activeIndex = newActiveIndex; + var snapIndex; + if (typeof activeIndex === 'undefined') { + for (var i = 0; i < slidesGrid.length; i += 1) { + if (typeof slidesGrid[i + 1] !== 'undefined') { + if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - ((slidesGrid[i + 1] - slidesGrid[i]) / 2)) { + activeIndex = i; + } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) { + activeIndex = i + 1; + } + } else if (translate >= slidesGrid[i]) { + activeIndex = i; + } + } + // Normalize slideIndex + if (params.normalizeSlideIndex) { + if (activeIndex < 0 || typeof activeIndex === 'undefined') { activeIndex = 0; } + } + } + if (snapGrid.indexOf(translate) >= 0) { + snapIndex = snapGrid.indexOf(translate); + } else { + var skip = Math.min(params.slidesPerGroupSkip, activeIndex); + snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup); + } + if (snapIndex >= snapGrid.length) { snapIndex = snapGrid.length - 1; } + if (activeIndex === previousIndex) { + if (snapIndex !== previousSnapIndex) { + swiper.snapIndex = snapIndex; + swiper.emit('snapIndexChange'); + } + return; + } + + // Get real index + var realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10); + + Utils.extend(swiper, { + snapIndex: snapIndex, + realIndex: realIndex, + previousIndex: previousIndex, + activeIndex: activeIndex, + }); + swiper.emit('activeIndexChange'); + swiper.emit('snapIndexChange'); + if (previousRealIndex !== realIndex) { + swiper.emit('realIndexChange'); + } + if (swiper.initialized || swiper.runCallbacksOnInit) { + swiper.emit('slideChange'); + } + } + + function updateClickedSlide (e) { + var swiper = this; + var params = swiper.params; + var slide = $(e.target).closest(("." + (params.slideClass)))[0]; + var slideFound = false; + if (slide) { + for (var i = 0; i < swiper.slides.length; i += 1) { + if (swiper.slides[i] === slide) { slideFound = true; } + } + } + + if (slide && slideFound) { + swiper.clickedSlide = slide; + if (swiper.virtual && swiper.params.virtual.enabled) { + swiper.clickedIndex = parseInt($(slide).attr('data-swiper-slide-index'), 10); + } else { + swiper.clickedIndex = $(slide).index(); + } + } else { + swiper.clickedSlide = undefined; + swiper.clickedIndex = undefined; + return; + } + if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) { + swiper.slideToClickedSlide(); + } + } + + var update = { + updateSize: updateSize, + updateSlides: updateSlides, + updateAutoHeight: updateAutoHeight, + updateSlidesOffset: updateSlidesOffset, + updateSlidesProgress: updateSlidesProgress, + updateProgress: updateProgress, + updateSlidesClasses: updateSlidesClasses, + updateActiveIndex: updateActiveIndex, + updateClickedSlide: updateClickedSlide, + }; + + function getTranslate (axis) { + if ( axis === void 0 ) axis = this.isHorizontal() ? 'x' : 'y'; + + var swiper = this; + + var params = swiper.params; + var rtl = swiper.rtlTranslate; + var translate = swiper.translate; + var $wrapperEl = swiper.$wrapperEl; + + if (params.virtualTranslate) { + return rtl ? -translate : translate; + } + if (params.cssMode) { + return translate; + } + + var currentTranslate = Utils.getTranslate($wrapperEl[0], axis); + if (rtl) { currentTranslate = -currentTranslate; } + + return currentTranslate || 0; + } + + function setTranslate (translate, byController) { + var swiper = this; + var rtl = swiper.rtlTranslate; + var params = swiper.params; + var $wrapperEl = swiper.$wrapperEl; + var wrapperEl = swiper.wrapperEl; + var progress = swiper.progress; + var x = 0; + var y = 0; + var z = 0; + + if (swiper.isHorizontal()) { + x = rtl ? -translate : translate; + } else { + y = translate; + } + + if (params.roundLengths) { + x = Math.floor(x); + y = Math.floor(y); + } + + if (params.cssMode) { + wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y; + } else if (!params.virtualTranslate) { + $wrapperEl.transform(("translate3d(" + x + "px, " + y + "px, " + z + "px)")); + } + swiper.previousTranslate = swiper.translate; + swiper.translate = swiper.isHorizontal() ? x : y; + + // Check if we need to update progress + var newProgress; + var translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); + if (translatesDiff === 0) { + newProgress = 0; + } else { + newProgress = (translate - swiper.minTranslate()) / (translatesDiff); + } + if (newProgress !== progress) { + swiper.updateProgress(translate); + } + + swiper.emit('setTranslate', swiper.translate, byController); + } + + function minTranslate () { + return (-this.snapGrid[0]); + } + + function maxTranslate () { + return (-this.snapGrid[this.snapGrid.length - 1]); + } + + function translateTo (translate, speed, runCallbacks, translateBounds, internal) { + var obj; + + if ( translate === void 0 ) translate = 0; + if ( speed === void 0 ) speed = this.params.speed; + if ( runCallbacks === void 0 ) runCallbacks = true; + if ( translateBounds === void 0 ) translateBounds = true; + var swiper = this; + + var params = swiper.params; + var wrapperEl = swiper.wrapperEl; + + if (swiper.animating && params.preventInteractionOnTransition) { + return false; + } + + var minTranslate = swiper.minTranslate(); + var maxTranslate = swiper.maxTranslate(); + var newTranslate; + if (translateBounds && translate > minTranslate) { newTranslate = minTranslate; } + else if (translateBounds && translate < maxTranslate) { newTranslate = maxTranslate; } + else { newTranslate = translate; } + + // Update progress + swiper.updateProgress(newTranslate); + + if (params.cssMode) { + var isH = swiper.isHorizontal(); + if (speed === 0) { + wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate; + } else { + // eslint-disable-next-line + if (wrapperEl.scrollTo) { + wrapperEl.scrollTo(( obj = {}, obj[isH ? 'left' : 'top'] = -newTranslate, obj.behavior = 'smooth', obj )); + } else { + wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate; + } + } + return true; + } + + if (speed === 0) { + swiper.setTransition(0); + swiper.setTranslate(newTranslate); + if (runCallbacks) { + swiper.emit('beforeTransitionStart', speed, internal); + swiper.emit('transitionEnd'); + } + } else { + swiper.setTransition(speed); + swiper.setTranslate(newTranslate); + if (runCallbacks) { + swiper.emit('beforeTransitionStart', speed, internal); + swiper.emit('transitionStart'); + } + if (!swiper.animating) { + swiper.animating = true; + if (!swiper.onTranslateToWrapperTransitionEnd) { + swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) { + if (!swiper || swiper.destroyed) { return; } + if (e.target !== this) { return; } + swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd); + swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd); + swiper.onTranslateToWrapperTransitionEnd = null; + delete swiper.onTranslateToWrapperTransitionEnd; + if (runCallbacks) { + swiper.emit('transitionEnd'); + } + }; + } + swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd); + swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd); + } + } + + return true; + } + + var translate = { + getTranslate: getTranslate, + setTranslate: setTranslate, + minTranslate: minTranslate, + maxTranslate: maxTranslate, + translateTo: translateTo, + }; + + function setTransition (duration, byController) { + var swiper = this; + + if (!swiper.params.cssMode) { + swiper.$wrapperEl.transition(duration); + } + + swiper.emit('setTransition', duration, byController); + } + + function transitionStart (runCallbacks, direction) { + if ( runCallbacks === void 0 ) runCallbacks = true; + + var swiper = this; + var activeIndex = swiper.activeIndex; + var params = swiper.params; + var previousIndex = swiper.previousIndex; + if (params.cssMode) { return; } + if (params.autoHeight) { + swiper.updateAutoHeight(); + } + + var dir = direction; + if (!dir) { + if (activeIndex > previousIndex) { dir = 'next'; } + else if (activeIndex < previousIndex) { dir = 'prev'; } + else { dir = 'reset'; } + } + + swiper.emit('transitionStart'); + + if (runCallbacks && activeIndex !== previousIndex) { + if (dir === 'reset') { + swiper.emit('slideResetTransitionStart'); + return; + } + swiper.emit('slideChangeTransitionStart'); + if (dir === 'next') { + swiper.emit('slideNextTransitionStart'); + } else { + swiper.emit('slidePrevTransitionStart'); + } + } + } + + function transitionEnd$1 (runCallbacks, direction) { + if ( runCallbacks === void 0 ) runCallbacks = true; + + var swiper = this; + var activeIndex = swiper.activeIndex; + var previousIndex = swiper.previousIndex; + var params = swiper.params; + swiper.animating = false; + if (params.cssMode) { return; } + swiper.setTransition(0); + + var dir = direction; + if (!dir) { + if (activeIndex > previousIndex) { dir = 'next'; } + else if (activeIndex < previousIndex) { dir = 'prev'; } + else { dir = 'reset'; } + } + + swiper.emit('transitionEnd'); + + if (runCallbacks && activeIndex !== previousIndex) { + if (dir === 'reset') { + swiper.emit('slideResetTransitionEnd'); + return; + } + swiper.emit('slideChangeTransitionEnd'); + if (dir === 'next') { + swiper.emit('slideNextTransitionEnd'); + } else { + swiper.emit('slidePrevTransitionEnd'); + } + } + } + + var transition$1 = { + setTransition: setTransition, + transitionStart: transitionStart, + transitionEnd: transitionEnd$1, + }; + + function slideTo (index, speed, runCallbacks, internal) { + var obj; + + if ( index === void 0 ) index = 0; + if ( speed === void 0 ) speed = this.params.speed; + if ( runCallbacks === void 0 ) runCallbacks = true; + var swiper = this; + var slideIndex = index; + if (slideIndex < 0) { slideIndex = 0; } + + var params = swiper.params; + var snapGrid = swiper.snapGrid; + var slidesGrid = swiper.slidesGrid; + var previousIndex = swiper.previousIndex; + var activeIndex = swiper.activeIndex; + var rtl = swiper.rtlTranslate; + var wrapperEl = swiper.wrapperEl; + if (swiper.animating && params.preventInteractionOnTransition) { + return false; + } + + var skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex); + var snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup); + if (snapIndex >= slidesGrid.length) { snapIndex = slidesGrid.length - 1; } + + if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) { + swiper.emit('beforeSlideChangeStart'); + } + + var translate = -snapGrid[snapIndex]; + + // Update progress + swiper.updateProgress(translate); + + // Normalize slideIndex + if (params.normalizeSlideIndex) { + for (var i = 0; i < slidesGrid.length; i += 1) { + if (-Math.floor(translate * 100) >= Math.floor(slidesGrid[i] * 100)) { + slideIndex = i; + } + } + } + // Directions locks + if (swiper.initialized && slideIndex !== activeIndex) { + if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) { + return false; + } + if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) { + if ((activeIndex || 0) !== slideIndex) { return false; } + } + } + + var direction; + if (slideIndex > activeIndex) { direction = 'next'; } + else if (slideIndex < activeIndex) { direction = 'prev'; } + else { direction = 'reset'; } + + + // Update Index + if ((rtl && -translate === swiper.translate) || (!rtl && translate === swiper.translate)) { + swiper.updateActiveIndex(slideIndex); + // Update Height + if (params.autoHeight) { + swiper.updateAutoHeight(); + } + swiper.updateSlidesClasses(); + if (params.effect !== 'slide') { + swiper.setTranslate(translate); + } + if (direction !== 'reset') { + swiper.transitionStart(runCallbacks, direction); + swiper.transitionEnd(runCallbacks, direction); + } + return false; + } + if (params.cssMode) { + var isH = swiper.isHorizontal(); + if (speed === 0) { + wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -translate; + } else { + // eslint-disable-next-line + if (wrapperEl.scrollTo) { + wrapperEl.scrollTo(( obj = {}, obj[isH ? 'left' : 'top'] = -translate, obj.behavior = 'smooth', obj )); + } else { + wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -translate; + } + } + return true; + } + + if (speed === 0) { + swiper.setTransition(0); + swiper.setTranslate(translate); + swiper.updateActiveIndex(slideIndex); + swiper.updateSlidesClasses(); + swiper.emit('beforeTransitionStart', speed, internal); + swiper.transitionStart(runCallbacks, direction); + swiper.transitionEnd(runCallbacks, direction); + } else { + swiper.setTransition(speed); + swiper.setTranslate(translate); + swiper.updateActiveIndex(slideIndex); + swiper.updateSlidesClasses(); + swiper.emit('beforeTransitionStart', speed, internal); + swiper.transitionStart(runCallbacks, direction); + if (!swiper.animating) { + swiper.animating = true; + if (!swiper.onSlideToWrapperTransitionEnd) { + swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) { + if (!swiper || swiper.destroyed) { return; } + if (e.target !== this) { return; } + swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd); + swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd); + swiper.onSlideToWrapperTransitionEnd = null; + delete swiper.onSlideToWrapperTransitionEnd; + swiper.transitionEnd(runCallbacks, direction); + }; + } + swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd); + swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd); + } + } + + return true; + } + + function slideToLoop (index, speed, runCallbacks, internal) { + if ( index === void 0 ) index = 0; + if ( speed === void 0 ) speed = this.params.speed; + if ( runCallbacks === void 0 ) runCallbacks = true; + + var swiper = this; + var newIndex = index; + if (swiper.params.loop) { + newIndex += swiper.loopedSlides; + } + + return swiper.slideTo(newIndex, speed, runCallbacks, internal); + } + + /* eslint no-unused-vars: "off" */ + function slideNext (speed, runCallbacks, internal) { + if ( speed === void 0 ) speed = this.params.speed; + if ( runCallbacks === void 0 ) runCallbacks = true; + + var swiper = this; + var params = swiper.params; + var animating = swiper.animating; + var increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup; + if (params.loop) { + if (animating) { return false; } + swiper.loopFix(); + // eslint-disable-next-line + swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; + } + return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal); + } + + /* eslint no-unused-vars: "off" */ + function slidePrev (speed, runCallbacks, internal) { + if ( speed === void 0 ) speed = this.params.speed; + if ( runCallbacks === void 0 ) runCallbacks = true; + + var swiper = this; + var params = swiper.params; + var animating = swiper.animating; + var snapGrid = swiper.snapGrid; + var slidesGrid = swiper.slidesGrid; + var rtlTranslate = swiper.rtlTranslate; + + if (params.loop) { + if (animating) { return false; } + swiper.loopFix(); + // eslint-disable-next-line + swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; + } + var translate = rtlTranslate ? swiper.translate : -swiper.translate; + function normalize(val) { + if (val < 0) { return -Math.floor(Math.abs(val)); } + return Math.floor(val); + } + var normalizedTranslate = normalize(translate); + var normalizedSnapGrid = snapGrid.map(function (val) { return normalize(val); }); + var normalizedSlidesGrid = slidesGrid.map(function (val) { return normalize(val); }); + + var currentSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate)]; + var prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1]; + if (typeof prevSnap === 'undefined' && params.cssMode) { + snapGrid.forEach(function (snap) { + if (!prevSnap && normalizedTranslate >= snap) { prevSnap = snap; } + }); + } + var prevIndex; + if (typeof prevSnap !== 'undefined') { + prevIndex = slidesGrid.indexOf(prevSnap); + if (prevIndex < 0) { prevIndex = swiper.activeIndex - 1; } + } + return swiper.slideTo(prevIndex, speed, runCallbacks, internal); + } + + /* eslint no-unused-vars: "off" */ + function slideReset (speed, runCallbacks, internal) { + if ( speed === void 0 ) speed = this.params.speed; + if ( runCallbacks === void 0 ) runCallbacks = true; + + var swiper = this; + return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal); + } + + /* eslint no-unused-vars: "off" */ + function slideToClosest (speed, runCallbacks, internal, threshold) { + if ( speed === void 0 ) speed = this.params.speed; + if ( runCallbacks === void 0 ) runCallbacks = true; + if ( threshold === void 0 ) threshold = 0.5; + + var swiper = this; + var index = swiper.activeIndex; + var skip = Math.min(swiper.params.slidesPerGroupSkip, index); + var snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup); + + var translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; + + if (translate >= swiper.snapGrid[snapIndex]) { + // The current translate is on or after the current snap index, so the choice + // is between the current index and the one after it. + var currentSnap = swiper.snapGrid[snapIndex]; + var nextSnap = swiper.snapGrid[snapIndex + 1]; + if ((translate - currentSnap) > (nextSnap - currentSnap) * threshold) { + index += swiper.params.slidesPerGroup; + } + } else { + // The current translate is before the current snap index, so the choice + // is between the current index and the one before it. + var prevSnap = swiper.snapGrid[snapIndex - 1]; + var currentSnap$1 = swiper.snapGrid[snapIndex]; + if ((translate - prevSnap) <= (currentSnap$1 - prevSnap) * threshold) { + index -= swiper.params.slidesPerGroup; + } + } + index = Math.max(index, 0); + index = Math.min(index, swiper.slidesGrid.length - 1); + + return swiper.slideTo(index, speed, runCallbacks, internal); + } + + function slideToClickedSlide () { + var swiper = this; + var params = swiper.params; + var $wrapperEl = swiper.$wrapperEl; + + var slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView; + var slideToIndex = swiper.clickedIndex; + var realIndex; + if (params.loop) { + if (swiper.animating) { return; } + realIndex = parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'), 10); + if (params.centeredSlides) { + if ( + (slideToIndex < swiper.loopedSlides - (slidesPerView / 2)) + || (slideToIndex > (swiper.slides.length - swiper.loopedSlides) + (slidesPerView / 2)) + ) { + swiper.loopFix(); + slideToIndex = $wrapperEl + .children(("." + (params.slideClass) + "[data-swiper-slide-index=\"" + realIndex + "\"]:not(." + (params.slideDuplicateClass) + ")")) + .eq(0) + .index(); + + Utils.nextTick(function () { + swiper.slideTo(slideToIndex); + }); + } else { + swiper.slideTo(slideToIndex); + } + } else if (slideToIndex > swiper.slides.length - slidesPerView) { + swiper.loopFix(); + slideToIndex = $wrapperEl + .children(("." + (params.slideClass) + "[data-swiper-slide-index=\"" + realIndex + "\"]:not(." + (params.slideDuplicateClass) + ")")) + .eq(0) + .index(); + + Utils.nextTick(function () { + swiper.slideTo(slideToIndex); + }); + } else { + swiper.slideTo(slideToIndex); + } + } else { + swiper.slideTo(slideToIndex); + } + } + + var slide = { + slideTo: slideTo, + slideToLoop: slideToLoop, + slideNext: slideNext, + slidePrev: slidePrev, + slideReset: slideReset, + slideToClosest: slideToClosest, + slideToClickedSlide: slideToClickedSlide, + }; + + function loopCreate () { + var swiper = this; + var params = swiper.params; + var $wrapperEl = swiper.$wrapperEl; + // Remove duplicated slides + $wrapperEl.children(("." + (params.slideClass) + "." + (params.slideDuplicateClass))).remove(); + + var slides = $wrapperEl.children(("." + (params.slideClass))); + + if (params.loopFillGroupWithBlank) { + var blankSlidesNum = params.slidesPerGroup - (slides.length % params.slidesPerGroup); + if (blankSlidesNum !== params.slidesPerGroup) { + for (var i = 0; i < blankSlidesNum; i += 1) { + var blankNode = $(doc.createElement('div')).addClass(((params.slideClass) + " " + (params.slideBlankClass))); + $wrapperEl.append(blankNode); + } + slides = $wrapperEl.children(("." + (params.slideClass))); + } + } + + if (params.slidesPerView === 'auto' && !params.loopedSlides) { params.loopedSlides = slides.length; } + + swiper.loopedSlides = Math.ceil(parseFloat(params.loopedSlides || params.slidesPerView, 10)); + swiper.loopedSlides += params.loopAdditionalSlides; + if (swiper.loopedSlides > slides.length) { + swiper.loopedSlides = slides.length; + } + + var prependSlides = []; + var appendSlides = []; + slides.each(function (index, el) { + var slide = $(el); + if (index < swiper.loopedSlides) { appendSlides.push(el); } + if (index < slides.length && index >= slides.length - swiper.loopedSlides) { prependSlides.push(el); } + slide.attr('data-swiper-slide-index', index); + }); + for (var i$1 = 0; i$1 < appendSlides.length; i$1 += 1) { + $wrapperEl.append($(appendSlides[i$1].cloneNode(true)).addClass(params.slideDuplicateClass)); + } + for (var i$2 = prependSlides.length - 1; i$2 >= 0; i$2 -= 1) { + $wrapperEl.prepend($(prependSlides[i$2].cloneNode(true)).addClass(params.slideDuplicateClass)); + } + } + + function loopFix () { + var swiper = this; + + swiper.emit('beforeLoopFix'); + + var activeIndex = swiper.activeIndex; + var slides = swiper.slides; + var loopedSlides = swiper.loopedSlides; + var allowSlidePrev = swiper.allowSlidePrev; + var allowSlideNext = swiper.allowSlideNext; + var snapGrid = swiper.snapGrid; + var rtl = swiper.rtlTranslate; + var newIndex; + swiper.allowSlidePrev = true; + swiper.allowSlideNext = true; + + var snapTranslate = -snapGrid[activeIndex]; + var diff = snapTranslate - swiper.getTranslate(); + + // Fix For Negative Oversliding + if (activeIndex < loopedSlides) { + newIndex = (slides.length - (loopedSlides * 3)) + activeIndex; + newIndex += loopedSlides; + var slideChanged = swiper.slideTo(newIndex, 0, false, true); + if (slideChanged && diff !== 0) { + swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff); + } + } else if (activeIndex >= slides.length - loopedSlides) { + // Fix For Positive Oversliding + newIndex = -slides.length + activeIndex + loopedSlides; + newIndex += loopedSlides; + var slideChanged$1 = swiper.slideTo(newIndex, 0, false, true); + if (slideChanged$1 && diff !== 0) { + swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff); + } + } + swiper.allowSlidePrev = allowSlidePrev; + swiper.allowSlideNext = allowSlideNext; + + swiper.emit('loopFix'); + } + + function loopDestroy () { + var swiper = this; + var $wrapperEl = swiper.$wrapperEl; + var params = swiper.params; + var slides = swiper.slides; + $wrapperEl.children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + ",." + (params.slideClass) + "." + (params.slideBlankClass))).remove(); + slides.removeAttr('data-swiper-slide-index'); + } + + var loop = { + loopCreate: loopCreate, + loopFix: loopFix, + loopDestroy: loopDestroy, + }; + + function setGrabCursor (moving) { + var swiper = this; + if (Support.touch || !swiper.params.simulateTouch || (swiper.params.watchOverflow && swiper.isLocked) || swiper.params.cssMode) { return; } + var el = swiper.el; + el.style.cursor = 'move'; + el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab'; + el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab'; + el.style.cursor = moving ? 'grabbing' : 'grab'; + } + + function unsetGrabCursor () { + var swiper = this; + if (Support.touch || (swiper.params.watchOverflow && swiper.isLocked) || swiper.params.cssMode) { return; } + swiper.el.style.cursor = ''; + } + + var grabCursor = { + setGrabCursor: setGrabCursor, + unsetGrabCursor: unsetGrabCursor, + }; + + function appendSlide (slides) { + var swiper = this; + var $wrapperEl = swiper.$wrapperEl; + var params = swiper.params; + if (params.loop) { + swiper.loopDestroy(); + } + if (typeof slides === 'object' && 'length' in slides) { + for (var i = 0; i < slides.length; i += 1) { + if (slides[i]) { $wrapperEl.append(slides[i]); } + } + } else { + $wrapperEl.append(slides); + } + if (params.loop) { + swiper.loopCreate(); + } + if (!(params.observer && Support.observer)) { + swiper.update(); + } + } + + function prependSlide (slides) { + var swiper = this; + var params = swiper.params; + var $wrapperEl = swiper.$wrapperEl; + var activeIndex = swiper.activeIndex; + + if (params.loop) { + swiper.loopDestroy(); + } + var newActiveIndex = activeIndex + 1; + if (typeof slides === 'object' && 'length' in slides) { + for (var i = 0; i < slides.length; i += 1) { + if (slides[i]) { $wrapperEl.prepend(slides[i]); } + } + newActiveIndex = activeIndex + slides.length; + } else { + $wrapperEl.prepend(slides); + } + if (params.loop) { + swiper.loopCreate(); + } + if (!(params.observer && Support.observer)) { + swiper.update(); + } + swiper.slideTo(newActiveIndex, 0, false); + } + + function addSlide (index, slides) { + var swiper = this; + var $wrapperEl = swiper.$wrapperEl; + var params = swiper.params; + var activeIndex = swiper.activeIndex; + var activeIndexBuffer = activeIndex; + if (params.loop) { + activeIndexBuffer -= swiper.loopedSlides; + swiper.loopDestroy(); + swiper.slides = $wrapperEl.children(("." + (params.slideClass))); + } + var baseLength = swiper.slides.length; + if (index <= 0) { + swiper.prependSlide(slides); + return; + } + if (index >= baseLength) { + swiper.appendSlide(slides); + return; + } + var newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer; + + var slidesBuffer = []; + for (var i = baseLength - 1; i >= index; i -= 1) { + var currentSlide = swiper.slides.eq(i); + currentSlide.remove(); + slidesBuffer.unshift(currentSlide); + } + + if (typeof slides === 'object' && 'length' in slides) { + for (var i$1 = 0; i$1 < slides.length; i$1 += 1) { + if (slides[i$1]) { $wrapperEl.append(slides[i$1]); } + } + newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer; + } else { + $wrapperEl.append(slides); + } + + for (var i$2 = 0; i$2 < slidesBuffer.length; i$2 += 1) { + $wrapperEl.append(slidesBuffer[i$2]); + } + + if (params.loop) { + swiper.loopCreate(); + } + if (!(params.observer && Support.observer)) { + swiper.update(); + } + if (params.loop) { + swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false); + } else { + swiper.slideTo(newActiveIndex, 0, false); + } + } + + function removeSlide (slidesIndexes) { + var swiper = this; + var params = swiper.params; + var $wrapperEl = swiper.$wrapperEl; + var activeIndex = swiper.activeIndex; + + var activeIndexBuffer = activeIndex; + if (params.loop) { + activeIndexBuffer -= swiper.loopedSlides; + swiper.loopDestroy(); + swiper.slides = $wrapperEl.children(("." + (params.slideClass))); + } + var newActiveIndex = activeIndexBuffer; + var indexToRemove; + + if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) { + for (var i = 0; i < slidesIndexes.length; i += 1) { + indexToRemove = slidesIndexes[i]; + if (swiper.slides[indexToRemove]) { swiper.slides.eq(indexToRemove).remove(); } + if (indexToRemove < newActiveIndex) { newActiveIndex -= 1; } + } + newActiveIndex = Math.max(newActiveIndex, 0); + } else { + indexToRemove = slidesIndexes; + if (swiper.slides[indexToRemove]) { swiper.slides.eq(indexToRemove).remove(); } + if (indexToRemove < newActiveIndex) { newActiveIndex -= 1; } + newActiveIndex = Math.max(newActiveIndex, 0); + } + + if (params.loop) { + swiper.loopCreate(); + } + + if (!(params.observer && Support.observer)) { + swiper.update(); + } + if (params.loop) { + swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false); + } else { + swiper.slideTo(newActiveIndex, 0, false); + } + } + + function removeAllSlides () { + var swiper = this; + + var slidesIndexes = []; + for (var i = 0; i < swiper.slides.length; i += 1) { + slidesIndexes.push(i); + } + swiper.removeSlide(slidesIndexes); + } + + var manipulation = { + appendSlide: appendSlide, + prependSlide: prependSlide, + addSlide: addSlide, + removeSlide: removeSlide, + removeAllSlides: removeAllSlides, + }; + + var Device = (function Device() { + var platform = win.navigator.platform; + var ua = win.navigator.userAgent; + + var device = { + ios: false, + android: false, + androidChrome: false, + desktop: false, + iphone: false, + ipod: false, + ipad: false, + edge: false, + ie: false, + firefox: false, + macos: false, + windows: false, + cordova: !!(win.cordova || win.phonegap), + phonegap: !!(win.cordova || win.phonegap), + electron: false, + }; + + var screenWidth = win.screen.width; + var screenHeight = win.screen.height; + + var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line + var ipad = ua.match(/(iPad).*OS\s([\d_]+)/); + var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); + var iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); + var ie = ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0; + var edge = ua.indexOf('Edge/') >= 0; + var firefox = ua.indexOf('Gecko/') >= 0 && ua.indexOf('Firefox/') >= 0; + var windows = platform === 'Win32'; + var electron = ua.toLowerCase().indexOf('electron') >= 0; + var macos = platform === 'MacIntel'; + + // iPadOs 13 fix + if (!ipad + && macos + && Support.touch + && ( + (screenWidth === 1024 && screenHeight === 1366) // Pro 12.9 + || (screenWidth === 834 && screenHeight === 1194) // Pro 11 + || (screenWidth === 834 && screenHeight === 1112) // Pro 10.5 + || (screenWidth === 768 && screenHeight === 1024) // other + ) + ) { + ipad = ua.match(/(Version)\/([\d.]+)/); + macos = false; + } + + device.ie = ie; + device.edge = edge; + device.firefox = firefox; + + // Android + if (android && !windows) { + device.os = 'android'; + device.osVersion = android[2]; + device.android = true; + device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0; + } + if (ipad || iphone || ipod) { + device.os = 'ios'; + device.ios = true; + } + // iOS + if (iphone && !ipod) { + device.osVersion = iphone[2].replace(/_/g, '.'); + device.iphone = true; + } + if (ipad) { + device.osVersion = ipad[2].replace(/_/g, '.'); + device.ipad = true; + } + if (ipod) { + device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null; + device.ipod = true; + } + // iOS 8+ changed UA + if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) { + if (device.osVersion.split('.')[0] === '10') { + device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0]; + } + } + + // Webview + device.webView = !!((iphone || ipad || ipod) && (ua.match(/.*AppleWebKit(?!.*Safari)/i) || win.navigator.standalone)) + || (win.matchMedia && win.matchMedia('(display-mode: standalone)').matches); + device.webview = device.webView; + device.standalone = device.webView; + + // Desktop + device.desktop = !(device.ios || device.android) || electron; + if (device.desktop) { + device.electron = electron; + device.macos = macos; + device.windows = windows; + if (device.macos) { + device.os = 'macos'; + } + if (device.windows) { + device.os = 'windows'; + } + } + + // Pixel Ratio + device.pixelRatio = win.devicePixelRatio || 1; + + // Export object + return device; + }()); + + function onTouchStart (event) { + var swiper = this; + var data = swiper.touchEventsData; + var params = swiper.params; + var touches = swiper.touches; + + if (swiper.animating && params.preventInteractionOnTransition) { + return; + } + var e = event; + if (e.originalEvent) { e = e.originalEvent; } + var $targetEl = $(e.target); + + if (params.touchEventsTarget === 'wrapper') { + if (!$targetEl.closest(swiper.wrapperEl).length) { return; } + } + data.isTouchEvent = e.type === 'touchstart'; + if (!data.isTouchEvent && 'which' in e && e.which === 3) { return; } + if (!data.isTouchEvent && 'button' in e && e.button > 0) { return; } + if (data.isTouched && data.isMoved) { return; } + if (params.noSwiping && $targetEl.closest(params.noSwipingSelector ? params.noSwipingSelector : ("." + (params.noSwipingClass)))[0]) { + swiper.allowClick = true; + return; + } + if (params.swipeHandler) { + if (!$targetEl.closest(params.swipeHandler)[0]) { return; } + } + + touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + var startX = touches.currentX; + var startY = touches.currentY; + + // Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore + + var edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection; + var edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold; + if ( + edgeSwipeDetection + && ((startX <= edgeSwipeThreshold) + || (startX >= win.screen.width - edgeSwipeThreshold)) + ) { + return; + } + + Utils.extend(data, { + isTouched: true, + isMoved: false, + allowTouchCallbacks: true, + isScrolling: undefined, + startMoving: undefined, + }); + + touches.startX = startX; + touches.startY = startY; + data.touchStartTime = Utils.now(); + swiper.allowClick = true; + swiper.updateSize(); + swiper.swipeDirection = undefined; + if (params.threshold > 0) { data.allowThresholdMove = false; } + if (e.type !== 'touchstart') { + var preventDefault = true; + if ($targetEl.is(data.formElements)) { preventDefault = false; } + if ( + doc.activeElement + && $(doc.activeElement).is(data.formElements) + && doc.activeElement !== $targetEl[0] + ) { + doc.activeElement.blur(); + } + + var shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault; + if (params.touchStartForcePreventDefault || shouldPreventDefault) { + e.preventDefault(); + } + } + swiper.emit('touchStart', e); + } + + function onTouchMove (event) { + var swiper = this; + var data = swiper.touchEventsData; + var params = swiper.params; + var touches = swiper.touches; + var rtl = swiper.rtlTranslate; + var e = event; + if (e.originalEvent) { e = e.originalEvent; } + if (!data.isTouched) { + if (data.startMoving && data.isScrolling) { + swiper.emit('touchMoveOpposite', e); + } + return; + } + if (data.isTouchEvent && e.type === 'mousemove') { return; } + var targetTouch = e.type === 'touchmove' && e.targetTouches && (e.targetTouches[0] || e.changedTouches[0]); + var pageX = e.type === 'touchmove' ? targetTouch.pageX : e.pageX; + var pageY = e.type === 'touchmove' ? targetTouch.pageY : e.pageY; + if (e.preventedByNestedSwiper) { + touches.startX = pageX; + touches.startY = pageY; + return; + } + if (!swiper.allowTouchMove) { + // isMoved = true; + swiper.allowClick = false; + if (data.isTouched) { + Utils.extend(touches, { + startX: pageX, + startY: pageY, + currentX: pageX, + currentY: pageY, + }); + data.touchStartTime = Utils.now(); + } + return; + } + if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) { + if (swiper.isVertical()) { + // Vertical + if ( + (pageY < touches.startY && swiper.translate <= swiper.maxTranslate()) + || (pageY > touches.startY && swiper.translate >= swiper.minTranslate()) + ) { + data.isTouched = false; + data.isMoved = false; + return; + } + } else if ( + (pageX < touches.startX && swiper.translate <= swiper.maxTranslate()) + || (pageX > touches.startX && swiper.translate >= swiper.minTranslate()) + ) { + return; + } + } + if (data.isTouchEvent && doc.activeElement) { + if (e.target === doc.activeElement && $(e.target).is(data.formElements)) { + data.isMoved = true; + swiper.allowClick = false; + return; + } + } + if (data.allowTouchCallbacks) { + swiper.emit('touchMove', e); + } + if (e.targetTouches && e.targetTouches.length > 1) { return; } + + touches.currentX = pageX; + touches.currentY = pageY; + + var diffX = touches.currentX - touches.startX; + var diffY = touches.currentY - touches.startY; + if (swiper.params.threshold && Math.sqrt((Math.pow( diffX, 2 )) + (Math.pow( diffY, 2 ))) < swiper.params.threshold) { return; } + + if (typeof data.isScrolling === 'undefined') { + var touchAngle; + if ((swiper.isHorizontal() && touches.currentY === touches.startY) || (swiper.isVertical() && touches.currentX === touches.startX)) { + data.isScrolling = false; + } else { + // eslint-disable-next-line + if ((diffX * diffX) + (diffY * diffY) >= 25) { + touchAngle = (Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180) / Math.PI; + data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : (90 - touchAngle > params.touchAngle); + } + } + } + if (data.isScrolling) { + swiper.emit('touchMoveOpposite', e); + } + if (typeof data.startMoving === 'undefined') { + if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) { + data.startMoving = true; + } + } + if (data.isScrolling) { + data.isTouched = false; + return; + } + if (!data.startMoving) { + return; + } + swiper.allowClick = false; + if (!params.cssMode) { + e.preventDefault(); + } + if (params.touchMoveStopPropagation && !params.nested) { + e.stopPropagation(); + } + + if (!data.isMoved) { + if (params.loop) { + swiper.loopFix(); + } + data.startTranslate = swiper.getTranslate(); + swiper.setTransition(0); + if (swiper.animating) { + swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend'); + } + data.allowMomentumBounce = false; + // Grab Cursor + if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { + swiper.setGrabCursor(true); + } + swiper.emit('sliderFirstMove', e); + } + swiper.emit('sliderMove', e); + data.isMoved = true; + + var diff = swiper.isHorizontal() ? diffX : diffY; + touches.diff = diff; + + diff *= params.touchRatio; + if (rtl) { diff = -diff; } + + swiper.swipeDirection = diff > 0 ? 'prev' : 'next'; + data.currentTranslate = diff + data.startTranslate; + + var disableParentSwiper = true; + var resistanceRatio = params.resistanceRatio; + if (params.touchReleaseOnEdges) { + resistanceRatio = 0; + } + if ((diff > 0 && data.currentTranslate > swiper.minTranslate())) { + disableParentSwiper = false; + if (params.resistance) { data.currentTranslate = (swiper.minTranslate() - 1) + (Math.pow( (-swiper.minTranslate() + data.startTranslate + diff), resistanceRatio )); } + } else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) { + disableParentSwiper = false; + if (params.resistance) { data.currentTranslate = (swiper.maxTranslate() + 1) - (Math.pow( (swiper.maxTranslate() - data.startTranslate - diff), resistanceRatio )); } + } + + if (disableParentSwiper) { + e.preventedByNestedSwiper = true; + } + + // Directions locks + if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) { + data.currentTranslate = data.startTranslate; + } + if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) { + data.currentTranslate = data.startTranslate; + } + + + // Threshold + if (params.threshold > 0) { + if (Math.abs(diff) > params.threshold || data.allowThresholdMove) { + if (!data.allowThresholdMove) { + data.allowThresholdMove = true; + touches.startX = touches.currentX; + touches.startY = touches.currentY; + data.currentTranslate = data.startTranslate; + touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY; + return; + } + } else { + data.currentTranslate = data.startTranslate; + return; + } + } + + if (!params.followFinger || params.cssMode) { return; } + + // Update active index in free mode + if (params.freeMode || params.watchSlidesProgress || params.watchSlidesVisibility) { + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + } + if (params.freeMode) { + // Velocity + if (data.velocities.length === 0) { + data.velocities.push({ + position: touches[swiper.isHorizontal() ? 'startX' : 'startY'], + time: data.touchStartTime, + }); + } + data.velocities.push({ + position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'], + time: Utils.now(), + }); + } + // Update progress + swiper.updateProgress(data.currentTranslate); + // Update translate + swiper.setTranslate(data.currentTranslate); + } + + function onTouchEnd (event) { + var swiper = this; + var data = swiper.touchEventsData; + + var params = swiper.params; + var touches = swiper.touches; + var rtl = swiper.rtlTranslate; + var $wrapperEl = swiper.$wrapperEl; + var slidesGrid = swiper.slidesGrid; + var snapGrid = swiper.snapGrid; + var e = event; + if (e.originalEvent) { e = e.originalEvent; } + if (data.allowTouchCallbacks) { + swiper.emit('touchEnd', e); + } + data.allowTouchCallbacks = false; + if (!data.isTouched) { + if (data.isMoved && params.grabCursor) { + swiper.setGrabCursor(false); + } + data.isMoved = false; + data.startMoving = false; + return; + } + // Return Grab Cursor + if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { + swiper.setGrabCursor(false); + } + + // Time diff + var touchEndTime = Utils.now(); + var timeDiff = touchEndTime - data.touchStartTime; + + // Tap, doubleTap, Click + if (swiper.allowClick) { + swiper.updateClickedSlide(e); + swiper.emit('tap click', e); + if (timeDiff < 300 && (touchEndTime - data.lastClickTime) < 300) { + swiper.emit('doubleTap doubleClick', e); + } + } + + data.lastClickTime = Utils.now(); + Utils.nextTick(function () { + if (!swiper.destroyed) { swiper.allowClick = true; } + }); + + if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) { + data.isTouched = false; + data.isMoved = false; + data.startMoving = false; + return; + } + data.isTouched = false; + data.isMoved = false; + data.startMoving = false; + + var currentPos; + if (params.followFinger) { + currentPos = rtl ? swiper.translate : -swiper.translate; + } else { + currentPos = -data.currentTranslate; + } + + if (params.cssMode) { + return; + } + + if (params.freeMode) { + if (currentPos < -swiper.minTranslate()) { + swiper.slideTo(swiper.activeIndex); + return; + } + if (currentPos > -swiper.maxTranslate()) { + if (swiper.slides.length < snapGrid.length) { + swiper.slideTo(snapGrid.length - 1); + } else { + swiper.slideTo(swiper.slides.length - 1); + } + return; + } + + if (params.freeModeMomentum) { + if (data.velocities.length > 1) { + var lastMoveEvent = data.velocities.pop(); + var velocityEvent = data.velocities.pop(); + + var distance = lastMoveEvent.position - velocityEvent.position; + var time = lastMoveEvent.time - velocityEvent.time; + swiper.velocity = distance / time; + swiper.velocity /= 2; + if (Math.abs(swiper.velocity) < params.freeModeMinimumVelocity) { + swiper.velocity = 0; + } + // this implies that the user stopped moving a finger then released. + // There would be no events with distance zero, so the last event is stale. + if (time > 150 || (Utils.now() - lastMoveEvent.time) > 300) { + swiper.velocity = 0; + } + } else { + swiper.velocity = 0; + } + swiper.velocity *= params.freeModeMomentumVelocityRatio; + + data.velocities.length = 0; + var momentumDuration = 1000 * params.freeModeMomentumRatio; + var momentumDistance = swiper.velocity * momentumDuration; + + var newPosition = swiper.translate + momentumDistance; + if (rtl) { newPosition = -newPosition; } + + var doBounce = false; + var afterBouncePosition; + var bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeModeMomentumBounceRatio; + var needsLoopFix; + if (newPosition < swiper.maxTranslate()) { + if (params.freeModeMomentumBounce) { + if (newPosition + swiper.maxTranslate() < -bounceAmount) { + newPosition = swiper.maxTranslate() - bounceAmount; + } + afterBouncePosition = swiper.maxTranslate(); + doBounce = true; + data.allowMomentumBounce = true; + } else { + newPosition = swiper.maxTranslate(); + } + if (params.loop && params.centeredSlides) { needsLoopFix = true; } + } else if (newPosition > swiper.minTranslate()) { + if (params.freeModeMomentumBounce) { + if (newPosition - swiper.minTranslate() > bounceAmount) { + newPosition = swiper.minTranslate() + bounceAmount; + } + afterBouncePosition = swiper.minTranslate(); + doBounce = true; + data.allowMomentumBounce = true; + } else { + newPosition = swiper.minTranslate(); + } + if (params.loop && params.centeredSlides) { needsLoopFix = true; } + } else if (params.freeModeSticky) { + var nextSlide; + for (var j = 0; j < snapGrid.length; j += 1) { + if (snapGrid[j] > -newPosition) { + nextSlide = j; + break; + } + } + + if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') { + newPosition = snapGrid[nextSlide]; + } else { + newPosition = snapGrid[nextSlide - 1]; + } + newPosition = -newPosition; + } + if (needsLoopFix) { + swiper.once('transitionEnd', function () { + swiper.loopFix(); + }); + } + // Fix duration + if (swiper.velocity !== 0) { + if (rtl) { + momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity); + } else { + momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity); + } + if (params.freeModeSticky) { + // If freeModeSticky is active and the user ends a swipe with a slow-velocity + // event, then durations can be 20+ seconds to slide one (or zero!) slides. + // It's easy to see this when simulating touch with mouse events. To fix this, + // limit single-slide swipes to the default slide duration. This also has the + // nice side effect of matching slide speed if the user stopped moving before + // lifting finger or mouse vs. moving slowly before lifting the finger/mouse. + // For faster swipes, also apply limits (albeit higher ones). + var moveDistance = Math.abs((rtl ? -newPosition : newPosition) - swiper.translate); + var currentSlideSize = swiper.slidesSizesGrid[swiper.activeIndex]; + if (moveDistance < currentSlideSize) { + momentumDuration = params.speed; + } else if (moveDistance < 2 * currentSlideSize) { + momentumDuration = params.speed * 1.5; + } else { + momentumDuration = params.speed * 2.5; + } + } + } else if (params.freeModeSticky) { + swiper.slideToClosest(); + return; + } + + if (params.freeModeMomentumBounce && doBounce) { + swiper.updateProgress(afterBouncePosition); + swiper.setTransition(momentumDuration); + swiper.setTranslate(newPosition); + swiper.transitionStart(true, swiper.swipeDirection); + swiper.animating = true; + $wrapperEl.transitionEnd(function () { + if (!swiper || swiper.destroyed || !data.allowMomentumBounce) { return; } + swiper.emit('momentumBounce'); + + swiper.setTransition(params.speed); + swiper.setTranslate(afterBouncePosition); + $wrapperEl.transitionEnd(function () { + if (!swiper || swiper.destroyed) { return; } + swiper.transitionEnd(); + }); + }); + } else if (swiper.velocity) { + swiper.updateProgress(newPosition); + swiper.setTransition(momentumDuration); + swiper.setTranslate(newPosition); + swiper.transitionStart(true, swiper.swipeDirection); + if (!swiper.animating) { + swiper.animating = true; + $wrapperEl.transitionEnd(function () { + if (!swiper || swiper.destroyed) { return; } + swiper.transitionEnd(); + }); + } + } else { + swiper.updateProgress(newPosition); + } + + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + } else if (params.freeModeSticky) { + swiper.slideToClosest(); + return; + } + + if (!params.freeModeMomentum || timeDiff >= params.longSwipesMs) { + swiper.updateProgress(); + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + } + return; + } + + // Find current slide + var stopIndex = 0; + var groupSize = swiper.slidesSizesGrid[0]; + for (var i = 0; i < slidesGrid.length; i += (i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup)) { + var increment$1 = (i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup); + if (typeof slidesGrid[i + increment$1] !== 'undefined') { + if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment$1]) { + stopIndex = i; + groupSize = slidesGrid[i + increment$1] - slidesGrid[i]; + } + } else if (currentPos >= slidesGrid[i]) { + stopIndex = i; + groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2]; + } + } + + // Find current slide size + var ratio = (currentPos - slidesGrid[stopIndex]) / groupSize; + var increment = (stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup); + + if (timeDiff > params.longSwipesMs) { + // Long touches + if (!params.longSwipes) { + swiper.slideTo(swiper.activeIndex); + return; + } + if (swiper.swipeDirection === 'next') { + if (ratio >= params.longSwipesRatio) { swiper.slideTo(stopIndex + increment); } + else { swiper.slideTo(stopIndex); } + } + if (swiper.swipeDirection === 'prev') { + if (ratio > (1 - params.longSwipesRatio)) { swiper.slideTo(stopIndex + increment); } + else { swiper.slideTo(stopIndex); } + } + } else { + // Short swipes + if (!params.shortSwipes) { + swiper.slideTo(swiper.activeIndex); + return; + } + var isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl); + if (!isNavButtonTarget) { + if (swiper.swipeDirection === 'next') { + swiper.slideTo(stopIndex + increment); + } + if (swiper.swipeDirection === 'prev') { + swiper.slideTo(stopIndex); + } + } else if (e.target === swiper.navigation.nextEl) { + swiper.slideTo(stopIndex + increment); + } else { + swiper.slideTo(stopIndex); + } + } + } + + function onResize () { + var swiper = this; + + var params = swiper.params; + var el = swiper.el; + + if (el && el.offsetWidth === 0) { return; } + + // Breakpoints + if (params.breakpoints) { + swiper.setBreakpoint(); + } + + // Save locks + var allowSlideNext = swiper.allowSlideNext; + var allowSlidePrev = swiper.allowSlidePrev; + var snapGrid = swiper.snapGrid; + + // Disable locks on resize + swiper.allowSlideNext = true; + swiper.allowSlidePrev = true; + + swiper.updateSize(); + swiper.updateSlides(); + + swiper.updateSlidesClasses(); + if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) { + swiper.slideTo(swiper.slides.length - 1, 0, false, true); + } else { + swiper.slideTo(swiper.activeIndex, 0, false, true); + } + + if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) { + swiper.autoplay.run(); + } + // Return locks after resize + swiper.allowSlidePrev = allowSlidePrev; + swiper.allowSlideNext = allowSlideNext; + + if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) { + swiper.checkOverflow(); + } + } + + function onClick (e) { + var swiper = this; + if (!swiper.allowClick) { + if (swiper.params.preventClicks) { e.preventDefault(); } + if (swiper.params.preventClicksPropagation && swiper.animating) { + e.stopPropagation(); + e.stopImmediatePropagation(); + } + } + } + + function onScroll () { + var swiper = this; + var wrapperEl = swiper.wrapperEl; + swiper.previousTranslate = swiper.translate; + swiper.translate = swiper.isHorizontal() ? -wrapperEl.scrollLeft : -wrapperEl.scrollTop; + // eslint-disable-next-line + if (swiper.translate === -0) { swiper.translate = 0; } + + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + + var newProgress; + var translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); + if (translatesDiff === 0) { + newProgress = 0; + } else { + newProgress = (swiper.translate - swiper.minTranslate()) / (translatesDiff); + } + if (newProgress !== swiper.progress) { + swiper.updateProgress(swiper.translate); + } + + swiper.emit('setTranslate', swiper.translate, false); + } + + var dummyEventAttached = false; + function dummyEventListener() {} + + function attachEvents() { + var swiper = this; + var params = swiper.params; + var touchEvents = swiper.touchEvents; + var el = swiper.el; + var wrapperEl = swiper.wrapperEl; + + swiper.onTouchStart = onTouchStart.bind(swiper); + swiper.onTouchMove = onTouchMove.bind(swiper); + swiper.onTouchEnd = onTouchEnd.bind(swiper); + if (params.cssMode) { + swiper.onScroll = onScroll.bind(swiper); + } + + swiper.onClick = onClick.bind(swiper); + + var capture = !!params.nested; + + // Touch Events + if (!Support.touch && Support.pointerEvents) { + el.addEventListener(touchEvents.start, swiper.onTouchStart, false); + doc.addEventListener(touchEvents.move, swiper.onTouchMove, capture); + doc.addEventListener(touchEvents.end, swiper.onTouchEnd, false); + } else { + if (Support.touch) { + var passiveListener = touchEvents.start === 'touchstart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false; + el.addEventListener(touchEvents.start, swiper.onTouchStart, passiveListener); + el.addEventListener(touchEvents.move, swiper.onTouchMove, Support.passiveListener ? { passive: false, capture: capture } : capture); + el.addEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener); + if (touchEvents.cancel) { + el.addEventListener(touchEvents.cancel, swiper.onTouchEnd, passiveListener); + } + if (!dummyEventAttached) { + doc.addEventListener('touchstart', dummyEventListener); + dummyEventAttached = true; + } + } + if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) { + el.addEventListener('mousedown', swiper.onTouchStart, false); + doc.addEventListener('mousemove', swiper.onTouchMove, capture); + doc.addEventListener('mouseup', swiper.onTouchEnd, false); + } + } + // Prevent Links Clicks + if (params.preventClicks || params.preventClicksPropagation) { + el.addEventListener('click', swiper.onClick, true); + } + if (params.cssMode) { + wrapperEl.addEventListener('scroll', swiper.onScroll); + } + + // Resize handler + if (params.updateOnWindowResize) { + swiper.on((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize, true); + } else { + swiper.on('observerUpdate', onResize, true); + } + } + + function detachEvents() { + var swiper = this; + + var params = swiper.params; + var touchEvents = swiper.touchEvents; + var el = swiper.el; + var wrapperEl = swiper.wrapperEl; + + var capture = !!params.nested; + + // Touch Events + if (!Support.touch && Support.pointerEvents) { + el.removeEventListener(touchEvents.start, swiper.onTouchStart, false); + doc.removeEventListener(touchEvents.move, swiper.onTouchMove, capture); + doc.removeEventListener(touchEvents.end, swiper.onTouchEnd, false); + } else { + if (Support.touch) { + var passiveListener = touchEvents.start === 'onTouchStart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false; + el.removeEventListener(touchEvents.start, swiper.onTouchStart, passiveListener); + el.removeEventListener(touchEvents.move, swiper.onTouchMove, capture); + el.removeEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener); + if (touchEvents.cancel) { + el.removeEventListener(touchEvents.cancel, swiper.onTouchEnd, passiveListener); + } + } + if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) { + el.removeEventListener('mousedown', swiper.onTouchStart, false); + doc.removeEventListener('mousemove', swiper.onTouchMove, capture); + doc.removeEventListener('mouseup', swiper.onTouchEnd, false); + } + } + // Prevent Links Clicks + if (params.preventClicks || params.preventClicksPropagation) { + el.removeEventListener('click', swiper.onClick, true); + } + + if (params.cssMode) { + wrapperEl.removeEventListener('scroll', swiper.onScroll); + } + + // Resize handler + swiper.off((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize); + } + + var events = { + attachEvents: attachEvents, + detachEvents: detachEvents, + }; + + function setBreakpoint () { + var swiper = this; + var activeIndex = swiper.activeIndex; + var initialized = swiper.initialized; + var loopedSlides = swiper.loopedSlides; if ( loopedSlides === void 0 ) loopedSlides = 0; + var params = swiper.params; + var $el = swiper.$el; + var breakpoints = params.breakpoints; + if (!breakpoints || (breakpoints && Object.keys(breakpoints).length === 0)) { return; } + + // Get breakpoint for window width and update parameters + var breakpoint = swiper.getBreakpoint(breakpoints); + + if (breakpoint && swiper.currentBreakpoint !== breakpoint) { + var breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined; + if (breakpointOnlyParams) { + ['slidesPerView', 'spaceBetween', 'slidesPerGroup', 'slidesPerGroupSkip', 'slidesPerColumn'].forEach(function (param) { + var paramValue = breakpointOnlyParams[param]; + if (typeof paramValue === 'undefined') { return; } + if (param === 'slidesPerView' && (paramValue === 'AUTO' || paramValue === 'auto')) { + breakpointOnlyParams[param] = 'auto'; + } else if (param === 'slidesPerView') { + breakpointOnlyParams[param] = parseFloat(paramValue); + } else { + breakpointOnlyParams[param] = parseInt(paramValue, 10); + } + }); + } + + var breakpointParams = breakpointOnlyParams || swiper.originalParams; + var wasMultiRow = params.slidesPerColumn > 1; + var isMultiRow = breakpointParams.slidesPerColumn > 1; + if (wasMultiRow && !isMultiRow) { + $el.removeClass(((params.containerModifierClass) + "multirow " + (params.containerModifierClass) + "multirow-column")); + } else if (!wasMultiRow && isMultiRow) { + $el.addClass(((params.containerModifierClass) + "multirow")); + if (breakpointParams.slidesPerColumnFill === 'column') { + $el.addClass(((params.containerModifierClass) + "multirow-column")); + } + } + + var directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction; + var needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged); + + if (directionChanged && initialized) { + swiper.changeDirection(); + } + + Utils.extend(swiper.params, breakpointParams); + + Utils.extend(swiper, { + allowTouchMove: swiper.params.allowTouchMove, + allowSlideNext: swiper.params.allowSlideNext, + allowSlidePrev: swiper.params.allowSlidePrev, + }); + + swiper.currentBreakpoint = breakpoint; + + if (needsReLoop && initialized) { + swiper.loopDestroy(); + swiper.loopCreate(); + swiper.updateSlides(); + swiper.slideTo((activeIndex - loopedSlides) + swiper.loopedSlides, 0, false); + } + + swiper.emit('breakpoint', breakpointParams); + } + } + + function getBreakpoint (breakpoints) { + // Get breakpoint for window width + if (!breakpoints) { return undefined; } + var breakpoint = false; + + var points = Object.keys(breakpoints).map(function (point) { + if (typeof point === 'string' && point.startsWith('@')) { + var minRatio = parseFloat(point.substr(1)); + var value = win.innerHeight * minRatio; + return { value: value, point: point }; + } + return { value: point, point: point }; + }); + + points.sort(function (a, b) { return parseInt(a.value, 10) - parseInt(b.value, 10); }); + for (var i = 0; i < points.length; i += 1) { + var ref = points[i]; + var point = ref.point; + var value = ref.value; + if (value <= win.innerWidth) { + breakpoint = point; + } + } + return breakpoint || 'max'; + } + + var breakpoints = { setBreakpoint: setBreakpoint, getBreakpoint: getBreakpoint }; + + function addClasses () { + var swiper = this; + var classNames = swiper.classNames; + var params = swiper.params; + var rtl = swiper.rtl; + var $el = swiper.$el; + var suffixes = []; + + suffixes.push('initialized'); + suffixes.push(params.direction); + + if (params.freeMode) { + suffixes.push('free-mode'); + } + if (params.autoHeight) { + suffixes.push('autoheight'); + } + if (rtl) { + suffixes.push('rtl'); + } + if (params.slidesPerColumn > 1) { + suffixes.push('multirow'); + if (params.slidesPerColumnFill === 'column') { + suffixes.push('multirow-column'); + } + } + if (Device.android) { + suffixes.push('android'); + } + if (Device.ios) { + suffixes.push('ios'); + } + + if (params.cssMode) { + suffixes.push('css-mode'); + } + + suffixes.forEach(function (suffix) { + classNames.push(params.containerModifierClass + suffix); + }); + + $el.addClass(classNames.join(' ')); + } + + function removeClasses () { + var swiper = this; + var $el = swiper.$el; + var classNames = swiper.classNames; + + $el.removeClass(classNames.join(' ')); + } + + var classes = { addClasses: addClasses, removeClasses: removeClasses }; + + function loadImage (imageEl, src, srcset, sizes, checkForComplete, callback) { + var image; + function onReady() { + if (callback) { callback(); } + } + if (!imageEl.complete || !checkForComplete) { + if (src) { + image = new win.Image(); + image.onload = onReady; + image.onerror = onReady; + if (sizes) { + image.sizes = sizes; + } + if (srcset) { + image.srcset = srcset; + } + if (src) { + image.src = src; + } + } else { + onReady(); + } + } else { + // image already loaded... + onReady(); + } + } + + function preloadImages () { + var swiper = this; + swiper.imagesToLoad = swiper.$el.find('img'); + function onReady() { + if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) { return; } + if (swiper.imagesLoaded !== undefined) { swiper.imagesLoaded += 1; } + if (swiper.imagesLoaded === swiper.imagesToLoad.length) { + if (swiper.params.updateOnImagesReady) { swiper.update(); } + swiper.emit('imagesReady'); + } + } + for (var i = 0; i < swiper.imagesToLoad.length; i += 1) { + var imageEl = swiper.imagesToLoad[i]; + swiper.loadImage( + imageEl, + imageEl.currentSrc || imageEl.getAttribute('src'), + imageEl.srcset || imageEl.getAttribute('srcset'), + imageEl.sizes || imageEl.getAttribute('sizes'), + true, + onReady + ); + } + } + + var images = { + loadImage: loadImage, + preloadImages: preloadImages, + }; + + function checkOverflow() { + var swiper = this; + var params = swiper.params; + var wasLocked = swiper.isLocked; + var lastSlidePosition = swiper.slides.length > 0 && (params.slidesOffsetBefore + (params.spaceBetween * (swiper.slides.length - 1)) + ((swiper.slides[0]).offsetWidth) * swiper.slides.length); + + if (params.slidesOffsetBefore && params.slidesOffsetAfter && lastSlidePosition) { + swiper.isLocked = lastSlidePosition <= swiper.size; + } else { + swiper.isLocked = swiper.snapGrid.length === 1; + } + + swiper.allowSlideNext = !swiper.isLocked; + swiper.allowSlidePrev = !swiper.isLocked; + + // events + if (wasLocked !== swiper.isLocked) { swiper.emit(swiper.isLocked ? 'lock' : 'unlock'); } + + if (wasLocked && wasLocked !== swiper.isLocked) { + swiper.isEnd = false; + swiper.navigation.update(); + } + } + + var checkOverflow$1 = { checkOverflow: checkOverflow }; + + var defaults = { + init: true, + direction: 'horizontal', + touchEventsTarget: 'container', + initialSlide: 0, + speed: 300, + cssMode: false, + updateOnWindowResize: true, + // + preventInteractionOnTransition: false, + + // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView). + edgeSwipeDetection: false, + edgeSwipeThreshold: 20, + + // Free mode + freeMode: false, + freeModeMomentum: true, + freeModeMomentumRatio: 1, + freeModeMomentumBounce: true, + freeModeMomentumBounceRatio: 1, + freeModeMomentumVelocityRatio: 1, + freeModeSticky: false, + freeModeMinimumVelocity: 0.02, + + // Autoheight + autoHeight: false, + + // Set wrapper width + setWrapperSize: false, + + // Virtual Translate + virtualTranslate: false, + + // Effects + effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip' + + // Breakpoints + breakpoints: undefined, + + // Slides grid + spaceBetween: 0, + slidesPerView: 1, + slidesPerColumn: 1, + slidesPerColumnFill: 'column', + slidesPerGroup: 1, + slidesPerGroupSkip: 0, + centeredSlides: false, + centeredSlidesBounds: false, + slidesOffsetBefore: 0, // in px + slidesOffsetAfter: 0, // in px + normalizeSlideIndex: true, + centerInsufficientSlides: false, + + // Disable swiper and hide navigation when container not overflow + watchOverflow: false, + + // Round length + roundLengths: false, + + // Touches + touchRatio: 1, + touchAngle: 45, + simulateTouch: true, + shortSwipes: true, + longSwipes: true, + longSwipesRatio: 0.5, + longSwipesMs: 300, + followFinger: true, + allowTouchMove: true, + threshold: 0, + touchMoveStopPropagation: false, + touchStartPreventDefault: true, + touchStartForcePreventDefault: false, + touchReleaseOnEdges: false, + + // Unique Navigation Elements + uniqueNavElements: true, + + // Resistance + resistance: true, + resistanceRatio: 0.85, + + // Progress + watchSlidesProgress: false, + watchSlidesVisibility: false, + + // Cursor + grabCursor: false, + + // Clicks + preventClicks: true, + preventClicksPropagation: true, + slideToClickedSlide: false, + + // Images + preloadImages: true, + updateOnImagesReady: true, + + // loop + loop: false, + loopAdditionalSlides: 0, + loopedSlides: null, + loopFillGroupWithBlank: false, + + // Swiping/no swiping + allowSlidePrev: true, + allowSlideNext: true, + swipeHandler: null, // '.swipe-handler', + noSwiping: true, + noSwipingClass: 'swiper-no-swiping', + noSwipingSelector: null, + + // Passive Listeners + passiveListeners: true, + + // NS + containerModifierClass: 'swiper-container-', // NEW + slideClass: 'swiper-slide', + slideBlankClass: 'swiper-slide-invisible-blank', + slideActiveClass: 'swiper-slide-active', + slideDuplicateActiveClass: 'swiper-slide-duplicate-active', + slideVisibleClass: 'swiper-slide-visible', + slideDuplicateClass: 'swiper-slide-duplicate', + slideNextClass: 'swiper-slide-next', + slideDuplicateNextClass: 'swiper-slide-duplicate-next', + slidePrevClass: 'swiper-slide-prev', + slideDuplicatePrevClass: 'swiper-slide-duplicate-prev', + wrapperClass: 'swiper-wrapper', + + // Callbacks + runCallbacksOnInit: true, + }; + + /* eslint no-param-reassign: "off" */ + + var prototypes = { + update: update, + translate: translate, + transition: transition$1, + slide: slide, + loop: loop, + grabCursor: grabCursor, + manipulation: manipulation, + events: events, + breakpoints: breakpoints, + checkOverflow: checkOverflow$1, + classes: classes, + images: images, + }; + + var extendedDefaults = {}; + + var Swiper = /*@__PURE__*/(function (SwiperClass) { + function Swiper() { + var assign; + + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + var el; + var params; + if (args.length === 1 && args[0].constructor && args[0].constructor === Object) { + params = args[0]; + } else { + (assign = args, el = assign[0], params = assign[1]); + } + if (!params) { params = {}; } + + params = Utils.extend({}, params); + if (el && !params.el) { params.el = el; } + + SwiperClass.call(this, params); + + Object.keys(prototypes).forEach(function (prototypeGroup) { + Object.keys(prototypes[prototypeGroup]).forEach(function (protoMethod) { + if (!Swiper.prototype[protoMethod]) { + Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod]; + } + }); + }); + + // Swiper Instance + var swiper = this; + if (typeof swiper.modules === 'undefined') { + swiper.modules = {}; + } + Object.keys(swiper.modules).forEach(function (moduleName) { + var module = swiper.modules[moduleName]; + if (module.params) { + var moduleParamName = Object.keys(module.params)[0]; + var moduleParams = module.params[moduleParamName]; + if (typeof moduleParams !== 'object' || moduleParams === null) { return; } + if (!(moduleParamName in params && 'enabled' in moduleParams)) { return; } + if (params[moduleParamName] === true) { + params[moduleParamName] = { enabled: true }; + } + if ( + typeof params[moduleParamName] === 'object' + && !('enabled' in params[moduleParamName]) + ) { + params[moduleParamName].enabled = true; + } + if (!params[moduleParamName]) { params[moduleParamName] = { enabled: false }; } + } + }); + + // Extend defaults with modules params + var swiperParams = Utils.extend({}, defaults); + swiper.useModulesParams(swiperParams); + + // Extend defaults with passed params + swiper.params = Utils.extend({}, swiperParams, extendedDefaults, params); + swiper.originalParams = Utils.extend({}, swiper.params); + swiper.passedParams = Utils.extend({}, params); + + // Save Dom lib + swiper.$ = $; + + // Find el + var $el = $(swiper.params.el); + el = $el[0]; + + if (!el) { + return undefined; + } + + if ($el.length > 1) { + var swipers = []; + $el.each(function (index, containerEl) { + var newParams = Utils.extend({}, params, { el: containerEl }); + swipers.push(new Swiper(newParams)); + }); + return swipers; + } + + el.swiper = swiper; + $el.data('swiper', swiper); + + // Find Wrapper + var $wrapperEl; + if (el && el.shadowRoot && el.shadowRoot.querySelector) { + $wrapperEl = $(el.shadowRoot.querySelector(("." + (swiper.params.wrapperClass)))); + // Children needs to return slot items + $wrapperEl.children = function (options) { return $el.children(options); }; + } else { + $wrapperEl = $el.children(("." + (swiper.params.wrapperClass))); + } + // Extend Swiper + Utils.extend(swiper, { + $el: $el, + el: el, + $wrapperEl: $wrapperEl, + wrapperEl: $wrapperEl[0], + + // Classes + classNames: [], + + // Slides + slides: $(), + slidesGrid: [], + snapGrid: [], + slidesSizesGrid: [], + + // isDirection + isHorizontal: function isHorizontal() { + return swiper.params.direction === 'horizontal'; + }, + isVertical: function isVertical() { + return swiper.params.direction === 'vertical'; + }, + // RTL + rtl: (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'), + rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'), + wrongRTL: $wrapperEl.css('display') === '-webkit-box', + + // Indexes + activeIndex: 0, + realIndex: 0, + + // + isBeginning: true, + isEnd: false, + + // Props + translate: 0, + previousTranslate: 0, + progress: 0, + velocity: 0, + animating: false, + + // Locks + allowSlideNext: swiper.params.allowSlideNext, + allowSlidePrev: swiper.params.allowSlidePrev, + + // Touch Events + touchEvents: (function touchEvents() { + var touch = ['touchstart', 'touchmove', 'touchend', 'touchcancel']; + var desktop = ['mousedown', 'mousemove', 'mouseup']; + if (Support.pointerEvents) { + desktop = ['pointerdown', 'pointermove', 'pointerup']; + } + swiper.touchEventsTouch = { + start: touch[0], + move: touch[1], + end: touch[2], + cancel: touch[3], + }; + swiper.touchEventsDesktop = { + start: desktop[0], + move: desktop[1], + end: desktop[2], + }; + return Support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop; + }()), + touchEventsData: { + isTouched: undefined, + isMoved: undefined, + allowTouchCallbacks: undefined, + touchStartTime: undefined, + isScrolling: undefined, + currentTranslate: undefined, + startTranslate: undefined, + allowThresholdMove: undefined, + // Form elements to match + formElements: 'input, select, option, textarea, button, video', + // Last click time + lastClickTime: Utils.now(), + clickTimeout: undefined, + // Velocities + velocities: [], + allowMomentumBounce: undefined, + isTouchEvent: undefined, + startMoving: undefined, + }, + + // Clicks + allowClick: true, + + // Touches + allowTouchMove: swiper.params.allowTouchMove, + + touches: { + startX: 0, + startY: 0, + currentX: 0, + currentY: 0, + diff: 0, + }, + + // Images + imagesToLoad: [], + imagesLoaded: 0, + + }); + + // Install Modules + swiper.useModules(); + + // Init + if (swiper.params.init) { + swiper.init(); + } + + // Return app instance + return swiper; + } + + if ( SwiperClass ) Swiper.__proto__ = SwiperClass; + Swiper.prototype = Object.create( SwiperClass && SwiperClass.prototype ); + Swiper.prototype.constructor = Swiper; + + var staticAccessors = { extendedDefaults: { configurable: true },defaults: { configurable: true },Class: { configurable: true },$: { configurable: true } }; + + Swiper.prototype.slidesPerViewDynamic = function slidesPerViewDynamic () { + var swiper = this; + var params = swiper.params; + var slides = swiper.slides; + var slidesGrid = swiper.slidesGrid; + var swiperSize = swiper.size; + var activeIndex = swiper.activeIndex; + var spv = 1; + if (params.centeredSlides) { + var slideSize = slides[activeIndex].swiperSlideSize; + var breakLoop; + for (var i = activeIndex + 1; i < slides.length; i += 1) { + if (slides[i] && !breakLoop) { + slideSize += slides[i].swiperSlideSize; + spv += 1; + if (slideSize > swiperSize) { breakLoop = true; } + } + } + for (var i$1 = activeIndex - 1; i$1 >= 0; i$1 -= 1) { + if (slides[i$1] && !breakLoop) { + slideSize += slides[i$1].swiperSlideSize; + spv += 1; + if (slideSize > swiperSize) { breakLoop = true; } + } + } + } else { + for (var i$2 = activeIndex + 1; i$2 < slides.length; i$2 += 1) { + if (slidesGrid[i$2] - slidesGrid[activeIndex] < swiperSize) { + spv += 1; + } + } + } + return spv; + }; + + Swiper.prototype.update = function update () { + var swiper = this; + if (!swiper || swiper.destroyed) { return; } + var snapGrid = swiper.snapGrid; + var params = swiper.params; + // Breakpoints + if (params.breakpoints) { + swiper.setBreakpoint(); + } + swiper.updateSize(); + swiper.updateSlides(); + swiper.updateProgress(); + swiper.updateSlidesClasses(); + + function setTranslate() { + var translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate; + var newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate()); + swiper.setTranslate(newTranslate); + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + } + var translated; + if (swiper.params.freeMode) { + setTranslate(); + if (swiper.params.autoHeight) { + swiper.updateAutoHeight(); + } + } else { + if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) { + translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true); + } else { + translated = swiper.slideTo(swiper.activeIndex, 0, false, true); + } + if (!translated) { + setTranslate(); + } + } + if (params.watchOverflow && snapGrid !== swiper.snapGrid) { + swiper.checkOverflow(); + } + swiper.emit('update'); + }; + + Swiper.prototype.changeDirection = function changeDirection (newDirection, needUpdate) { + if ( needUpdate === void 0 ) needUpdate = true; + + var swiper = this; + var currentDirection = swiper.params.direction; + if (!newDirection) { + // eslint-disable-next-line + newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal'; + } + if ((newDirection === currentDirection) || (newDirection !== 'horizontal' && newDirection !== 'vertical')) { + return swiper; + } + + swiper.$el + .removeClass(("" + (swiper.params.containerModifierClass) + currentDirection)) + .addClass(("" + (swiper.params.containerModifierClass) + newDirection)); + + swiper.params.direction = newDirection; + + swiper.slides.each(function (slideIndex, slideEl) { + if (newDirection === 'vertical') { + slideEl.style.width = ''; + } else { + slideEl.style.height = ''; + } + }); + + swiper.emit('changeDirection'); + if (needUpdate) { swiper.update(); } + + return swiper; + }; + + Swiper.prototype.init = function init () { + var swiper = this; + if (swiper.initialized) { return; } + + swiper.emit('beforeInit'); + + // Set breakpoint + if (swiper.params.breakpoints) { + swiper.setBreakpoint(); + } + + // Add Classes + swiper.addClasses(); + + // Create loop + if (swiper.params.loop) { + swiper.loopCreate(); + } + + // Update size + swiper.updateSize(); + + // Update slides + swiper.updateSlides(); + + if (swiper.params.watchOverflow) { + swiper.checkOverflow(); + } + + // Set Grab Cursor + if (swiper.params.grabCursor) { + swiper.setGrabCursor(); + } + + if (swiper.params.preloadImages) { + swiper.preloadImages(); + } + + // Slide To Initial Slide + if (swiper.params.loop) { + swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit); + } else { + swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit); + } + + // Attach events + swiper.attachEvents(); + + // Init Flag + swiper.initialized = true; + + // Emit + swiper.emit('init'); + }; + + Swiper.prototype.destroy = function destroy (deleteInstance, cleanStyles) { + if ( deleteInstance === void 0 ) deleteInstance = true; + if ( cleanStyles === void 0 ) cleanStyles = true; + + var swiper = this; + var params = swiper.params; + var $el = swiper.$el; + var $wrapperEl = swiper.$wrapperEl; + var slides = swiper.slides; + + if (typeof swiper.params === 'undefined' || swiper.destroyed) { + return null; + } + + swiper.emit('beforeDestroy'); + + // Init Flag + swiper.initialized = false; + + // Detach events + swiper.detachEvents(); + + // Destroy loop + if (params.loop) { + swiper.loopDestroy(); + } + + // Cleanup styles + if (cleanStyles) { + swiper.removeClasses(); + $el.removeAttr('style'); + $wrapperEl.removeAttr('style'); + if (slides && slides.length) { + slides + .removeClass([ + params.slideVisibleClass, + params.slideActiveClass, + params.slideNextClass, + params.slidePrevClass ].join(' ')) + .removeAttr('style') + .removeAttr('data-swiper-slide-index'); + } + } + + swiper.emit('destroy'); + + // Detach emitter events + Object.keys(swiper.eventsListeners).forEach(function (eventName) { + swiper.off(eventName); + }); + + if (deleteInstance !== false) { + swiper.$el[0].swiper = null; + swiper.$el.data('swiper', null); + Utils.deleteProps(swiper); + } + swiper.destroyed = true; + + return null; + }; + + Swiper.extendDefaults = function extendDefaults (newDefaults) { + Utils.extend(extendedDefaults, newDefaults); + }; + + staticAccessors.extendedDefaults.get = function () { + return extendedDefaults; + }; + + staticAccessors.defaults.get = function () { + return defaults; + }; + + staticAccessors.Class.get = function () { + return SwiperClass; + }; + + staticAccessors.$.get = function () { + return $; + }; + + Object.defineProperties( Swiper, staticAccessors ); + + return Swiper; + }(SwiperClass)); + + var Device$1 = { + name: 'device', + proto: { + device: Device, + }, + static: { + device: Device, + }, + }; + + var Support$1 = { + name: 'support', + proto: { + support: Support, + }, + static: { + support: Support, + }, + }; + + var Browser = (function Browser() { + function isSafari() { + var ua = win.navigator.userAgent.toLowerCase(); + return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0); + } + return { + isEdge: !!win.navigator.userAgent.match(/Edge/g), + isSafari: isSafari(), + isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(win.navigator.userAgent), + }; + }()); + + var Browser$1 = { + name: 'browser', + proto: { + browser: Browser, + }, + static: { + browser: Browser, + }, + }; + + var Resize = { + name: 'resize', + create: function create() { + var swiper = this; + Utils.extend(swiper, { + resize: { + resizeHandler: function resizeHandler() { + if (!swiper || swiper.destroyed || !swiper.initialized) { return; } + swiper.emit('beforeResize'); + swiper.emit('resize'); + }, + orientationChangeHandler: function orientationChangeHandler() { + if (!swiper || swiper.destroyed || !swiper.initialized) { return; } + swiper.emit('orientationchange'); + }, + }, + }); + }, + on: { + init: function init() { + var swiper = this; + // Emit resize + win.addEventListener('resize', swiper.resize.resizeHandler); + + // Emit orientationchange + win.addEventListener('orientationchange', swiper.resize.orientationChangeHandler); + }, + destroy: function destroy() { + var swiper = this; + win.removeEventListener('resize', swiper.resize.resizeHandler); + win.removeEventListener('orientationchange', swiper.resize.orientationChangeHandler); + }, + }, + }; + + var Observer = { + func: win.MutationObserver || win.WebkitMutationObserver, + attach: function attach(target, options) { + if ( options === void 0 ) options = {}; + + var swiper = this; + + var ObserverFunc = Observer.func; + var observer = new ObserverFunc(function (mutations) { + // The observerUpdate event should only be triggered + // once despite the number of mutations. Additional + // triggers are redundant and are very costly + if (mutations.length === 1) { + swiper.emit('observerUpdate', mutations[0]); + return; + } + var observerUpdate = function observerUpdate() { + swiper.emit('observerUpdate', mutations[0]); + }; + + if (win.requestAnimationFrame) { + win.requestAnimationFrame(observerUpdate); + } else { + win.setTimeout(observerUpdate, 0); + } + }); + + observer.observe(target, { + attributes: typeof options.attributes === 'undefined' ? true : options.attributes, + childList: typeof options.childList === 'undefined' ? true : options.childList, + characterData: typeof options.characterData === 'undefined' ? true : options.characterData, + }); + + swiper.observer.observers.push(observer); + }, + init: function init() { + var swiper = this; + if (!Support.observer || !swiper.params.observer) { return; } + if (swiper.params.observeParents) { + var containerParents = swiper.$el.parents(); + for (var i = 0; i < containerParents.length; i += 1) { + swiper.observer.attach(containerParents[i]); + } + } + // Observe container + swiper.observer.attach(swiper.$el[0], { childList: swiper.params.observeSlideChildren }); + + // Observe wrapper + swiper.observer.attach(swiper.$wrapperEl[0], { attributes: false }); + }, + destroy: function destroy() { + var swiper = this; + swiper.observer.observers.forEach(function (observer) { + observer.disconnect(); + }); + swiper.observer.observers = []; + }, + }; + + var Observer$1 = { + name: 'observer', + params: { + observer: false, + observeParents: false, + observeSlideChildren: false, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + observer: { + init: Observer.init.bind(swiper), + attach: Observer.attach.bind(swiper), + destroy: Observer.destroy.bind(swiper), + observers: [], + }, + }); + }, + on: { + init: function init() { + var swiper = this; + swiper.observer.init(); + }, + destroy: function destroy() { + var swiper = this; + swiper.observer.destroy(); + }, + }, + }; + + var Virtual = { + update: function update(force) { + var swiper = this; + var ref = swiper.params; + var slidesPerView = ref.slidesPerView; + var slidesPerGroup = ref.slidesPerGroup; + var centeredSlides = ref.centeredSlides; + var ref$1 = swiper.params.virtual; + var addSlidesBefore = ref$1.addSlidesBefore; + var addSlidesAfter = ref$1.addSlidesAfter; + var ref$2 = swiper.virtual; + var previousFrom = ref$2.from; + var previousTo = ref$2.to; + var slides = ref$2.slides; + var previousSlidesGrid = ref$2.slidesGrid; + var renderSlide = ref$2.renderSlide; + var previousOffset = ref$2.offset; + swiper.updateActiveIndex(); + var activeIndex = swiper.activeIndex || 0; + + var offsetProp; + if (swiper.rtlTranslate) { offsetProp = 'right'; } + else { offsetProp = swiper.isHorizontal() ? 'left' : 'top'; } + + var slidesAfter; + var slidesBefore; + if (centeredSlides) { + slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore; + slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter; + } else { + slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesBefore; + slidesBefore = slidesPerGroup + addSlidesAfter; + } + var from = Math.max((activeIndex || 0) - slidesBefore, 0); + var to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1); + var offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0); + + Utils.extend(swiper.virtual, { + from: from, + to: to, + offset: offset, + slidesGrid: swiper.slidesGrid, + }); + + function onRendered() { + swiper.updateSlides(); + swiper.updateProgress(); + swiper.updateSlidesClasses(); + if (swiper.lazy && swiper.params.lazy.enabled) { + swiper.lazy.load(); + } + } + + if (previousFrom === from && previousTo === to && !force) { + if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) { + swiper.slides.css(offsetProp, (offset + "px")); + } + swiper.updateProgress(); + return; + } + if (swiper.params.virtual.renderExternal) { + swiper.params.virtual.renderExternal.call(swiper, { + offset: offset, + from: from, + to: to, + slides: (function getSlides() { + var slidesToRender = []; + for (var i = from; i <= to; i += 1) { + slidesToRender.push(slides[i]); + } + return slidesToRender; + }()), + }); + onRendered(); + return; + } + var prependIndexes = []; + var appendIndexes = []; + if (force) { + swiper.$wrapperEl.find(("." + (swiper.params.slideClass))).remove(); + } else { + for (var i = previousFrom; i <= previousTo; i += 1) { + if (i < from || i > to) { + swiper.$wrapperEl.find(("." + (swiper.params.slideClass) + "[data-swiper-slide-index=\"" + i + "\"]")).remove(); + } + } + } + for (var i$1 = 0; i$1 < slides.length; i$1 += 1) { + if (i$1 >= from && i$1 <= to) { + if (typeof previousTo === 'undefined' || force) { + appendIndexes.push(i$1); + } else { + if (i$1 > previousTo) { appendIndexes.push(i$1); } + if (i$1 < previousFrom) { prependIndexes.push(i$1); } + } + } + } + appendIndexes.forEach(function (index) { + swiper.$wrapperEl.append(renderSlide(slides[index], index)); + }); + prependIndexes.sort(function (a, b) { return b - a; }).forEach(function (index) { + swiper.$wrapperEl.prepend(renderSlide(slides[index], index)); + }); + swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, (offset + "px")); + onRendered(); + }, + renderSlide: function renderSlide(slide, index) { + var swiper = this; + var params = swiper.params.virtual; + if (params.cache && swiper.virtual.cache[index]) { + return swiper.virtual.cache[index]; + } + var $slideEl = params.renderSlide + ? $(params.renderSlide.call(swiper, slide, index)) + : $(("
      " + slide + "
      ")); + if (!$slideEl.attr('data-swiper-slide-index')) { $slideEl.attr('data-swiper-slide-index', index); } + if (params.cache) { swiper.virtual.cache[index] = $slideEl; } + return $slideEl; + }, + appendSlide: function appendSlide(slides) { + var swiper = this; + if (typeof slides === 'object' && 'length' in slides) { + for (var i = 0; i < slides.length; i += 1) { + if (slides[i]) { swiper.virtual.slides.push(slides[i]); } + } + } else { + swiper.virtual.slides.push(slides); + } + swiper.virtual.update(true); + }, + prependSlide: function prependSlide(slides) { + var swiper = this; + var activeIndex = swiper.activeIndex; + var newActiveIndex = activeIndex + 1; + var numberOfNewSlides = 1; + + if (Array.isArray(slides)) { + for (var i = 0; i < slides.length; i += 1) { + if (slides[i]) { swiper.virtual.slides.unshift(slides[i]); } + } + newActiveIndex = activeIndex + slides.length; + numberOfNewSlides = slides.length; + } else { + swiper.virtual.slides.unshift(slides); + } + if (swiper.params.virtual.cache) { + var cache = swiper.virtual.cache; + var newCache = {}; + Object.keys(cache).forEach(function (cachedIndex) { + var $cachedEl = cache[cachedIndex]; + var cachedElIndex = $cachedEl.attr('data-swiper-slide-index'); + if (cachedElIndex) { + $cachedEl.attr('data-swiper-slide-index', parseInt(cachedElIndex, 10) + 1); + } + newCache[parseInt(cachedIndex, 10) + numberOfNewSlides] = $cachedEl; + }); + swiper.virtual.cache = newCache; + } + swiper.virtual.update(true); + swiper.slideTo(newActiveIndex, 0); + }, + removeSlide: function removeSlide(slidesIndexes) { + var swiper = this; + if (typeof slidesIndexes === 'undefined' || slidesIndexes === null) { return; } + var activeIndex = swiper.activeIndex; + if (Array.isArray(slidesIndexes)) { + for (var i = slidesIndexes.length - 1; i >= 0; i -= 1) { + swiper.virtual.slides.splice(slidesIndexes[i], 1); + if (swiper.params.virtual.cache) { + delete swiper.virtual.cache[slidesIndexes[i]]; + } + if (slidesIndexes[i] < activeIndex) { activeIndex -= 1; } + activeIndex = Math.max(activeIndex, 0); + } + } else { + swiper.virtual.slides.splice(slidesIndexes, 1); + if (swiper.params.virtual.cache) { + delete swiper.virtual.cache[slidesIndexes]; + } + if (slidesIndexes < activeIndex) { activeIndex -= 1; } + activeIndex = Math.max(activeIndex, 0); + } + swiper.virtual.update(true); + swiper.slideTo(activeIndex, 0); + }, + removeAllSlides: function removeAllSlides() { + var swiper = this; + swiper.virtual.slides = []; + if (swiper.params.virtual.cache) { + swiper.virtual.cache = {}; + } + swiper.virtual.update(true); + swiper.slideTo(0, 0); + }, + }; + + var Virtual$1 = { + name: 'virtual', + params: { + virtual: { + enabled: false, + slides: [], + cache: true, + renderSlide: null, + renderExternal: null, + addSlidesBefore: 0, + addSlidesAfter: 0, + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + virtual: { + update: Virtual.update.bind(swiper), + appendSlide: Virtual.appendSlide.bind(swiper), + prependSlide: Virtual.prependSlide.bind(swiper), + removeSlide: Virtual.removeSlide.bind(swiper), + removeAllSlides: Virtual.removeAllSlides.bind(swiper), + renderSlide: Virtual.renderSlide.bind(swiper), + slides: swiper.params.virtual.slides, + cache: {}, + }, + }); + }, + on: { + beforeInit: function beforeInit() { + var swiper = this; + if (!swiper.params.virtual.enabled) { return; } + swiper.classNames.push(((swiper.params.containerModifierClass) + "virtual")); + var overwriteParams = { + watchSlidesProgress: true, + }; + Utils.extend(swiper.params, overwriteParams); + Utils.extend(swiper.originalParams, overwriteParams); + + if (!swiper.params.initialSlide) { + swiper.virtual.update(); + } + }, + setTranslate: function setTranslate() { + var swiper = this; + if (!swiper.params.virtual.enabled) { return; } + swiper.virtual.update(); + }, + }, + }; + + var Keyboard = { + handle: function handle(event) { + var swiper = this; + var rtl = swiper.rtlTranslate; + var e = event; + if (e.originalEvent) { e = e.originalEvent; } // jquery fix + var kc = e.keyCode || e.charCode; + // Directions locks + if (!swiper.allowSlideNext && ((swiper.isHorizontal() && kc === 39) || (swiper.isVertical() && kc === 40) || kc === 34)) { + return false; + } + if (!swiper.allowSlidePrev && ((swiper.isHorizontal() && kc === 37) || (swiper.isVertical() && kc === 38) || kc === 33)) { + return false; + } + if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) { + return undefined; + } + if (doc.activeElement && doc.activeElement.nodeName && (doc.activeElement.nodeName.toLowerCase() === 'input' || doc.activeElement.nodeName.toLowerCase() === 'textarea')) { + return undefined; + } + if (swiper.params.keyboard.onlyInViewport && (kc === 33 || kc === 34 || kc === 37 || kc === 39 || kc === 38 || kc === 40)) { + var inView = false; + // Check that swiper should be inside of visible area of window + if (swiper.$el.parents(("." + (swiper.params.slideClass))).length > 0 && swiper.$el.parents(("." + (swiper.params.slideActiveClass))).length === 0) { + return undefined; + } + var windowWidth = win.innerWidth; + var windowHeight = win.innerHeight; + var swiperOffset = swiper.$el.offset(); + if (rtl) { swiperOffset.left -= swiper.$el[0].scrollLeft; } + var swiperCoord = [ + [swiperOffset.left, swiperOffset.top], + [swiperOffset.left + swiper.width, swiperOffset.top], + [swiperOffset.left, swiperOffset.top + swiper.height], + [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height] ]; + for (var i = 0; i < swiperCoord.length; i += 1) { + var point = swiperCoord[i]; + if ( + point[0] >= 0 && point[0] <= windowWidth + && point[1] >= 0 && point[1] <= windowHeight + ) { + inView = true; + } + } + if (!inView) { return undefined; } + } + if (swiper.isHorizontal()) { + if (kc === 33 || kc === 34 || kc === 37 || kc === 39) { + if (e.preventDefault) { e.preventDefault(); } + else { e.returnValue = false; } + } + if (((kc === 34 || kc === 39) && !rtl) || ((kc === 33 || kc === 37) && rtl)) { swiper.slideNext(); } + if (((kc === 33 || kc === 37) && !rtl) || ((kc === 34 || kc === 39) && rtl)) { swiper.slidePrev(); } + } else { + if (kc === 33 || kc === 34 || kc === 38 || kc === 40) { + if (e.preventDefault) { e.preventDefault(); } + else { e.returnValue = false; } + } + if (kc === 34 || kc === 40) { swiper.slideNext(); } + if (kc === 33 || kc === 38) { swiper.slidePrev(); } + } + swiper.emit('keyPress', kc); + return undefined; + }, + enable: function enable() { + var swiper = this; + if (swiper.keyboard.enabled) { return; } + $(doc).on('keydown', swiper.keyboard.handle); + swiper.keyboard.enabled = true; + }, + disable: function disable() { + var swiper = this; + if (!swiper.keyboard.enabled) { return; } + $(doc).off('keydown', swiper.keyboard.handle); + swiper.keyboard.enabled = false; + }, + }; + + var Keyboard$1 = { + name: 'keyboard', + params: { + keyboard: { + enabled: false, + onlyInViewport: true, + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + keyboard: { + enabled: false, + enable: Keyboard.enable.bind(swiper), + disable: Keyboard.disable.bind(swiper), + handle: Keyboard.handle.bind(swiper), + }, + }); + }, + on: { + init: function init() { + var swiper = this; + if (swiper.params.keyboard.enabled) { + swiper.keyboard.enable(); + } + }, + destroy: function destroy() { + var swiper = this; + if (swiper.keyboard.enabled) { + swiper.keyboard.disable(); + } + }, + }, + }; + + function isEventSupported() { + var eventName = 'onwheel'; + var isSupported = eventName in doc; + + if (!isSupported) { + var element = doc.createElement('div'); + element.setAttribute(eventName, 'return;'); + isSupported = typeof element[eventName] === 'function'; + } + + if (!isSupported + && doc.implementation + && doc.implementation.hasFeature + // always returns true in newer browsers as per the standard. + // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature + && doc.implementation.hasFeature('', '') !== true + ) { + // This is the only way to test support for the `wheel` event in IE9+. + isSupported = doc.implementation.hasFeature('Events.wheel', '3.0'); + } + + return isSupported; + } + var Mousewheel = { + lastScrollTime: Utils.now(), + lastEventBeforeSnap: undefined, + recentWheelEvents: [], + event: function event() { + if (win.navigator.userAgent.indexOf('firefox') > -1) { return 'DOMMouseScroll'; } + return isEventSupported() ? 'wheel' : 'mousewheel'; + }, + normalize: function normalize(e) { + // Reasonable defaults + var PIXEL_STEP = 10; + var LINE_HEIGHT = 40; + var PAGE_HEIGHT = 800; + + var sX = 0; + var sY = 0; // spinX, spinY + var pX = 0; + var pY = 0; // pixelX, pixelY + + // Legacy + if ('detail' in e) { + sY = e.detail; + } + if ('wheelDelta' in e) { + sY = -e.wheelDelta / 120; + } + if ('wheelDeltaY' in e) { + sY = -e.wheelDeltaY / 120; + } + if ('wheelDeltaX' in e) { + sX = -e.wheelDeltaX / 120; + } + + // side scrolling on FF with DOMMouseScroll + if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) { + sX = sY; + sY = 0; + } + + pX = sX * PIXEL_STEP; + pY = sY * PIXEL_STEP; + + if ('deltaY' in e) { + pY = e.deltaY; + } + if ('deltaX' in e) { + pX = e.deltaX; + } + + if (e.shiftKey && !pX) { // if user scrolls with shift he wants horizontal scroll + pX = pY; + pY = 0; + } + + if ((pX || pY) && e.deltaMode) { + if (e.deltaMode === 1) { // delta in LINE units + pX *= LINE_HEIGHT; + pY *= LINE_HEIGHT; + } else { // delta in PAGE units + pX *= PAGE_HEIGHT; + pY *= PAGE_HEIGHT; + } + } + + // Fall-back if spin cannot be determined + if (pX && !sX) { + sX = (pX < 1) ? -1 : 1; + } + if (pY && !sY) { + sY = (pY < 1) ? -1 : 1; + } + + return { + spinX: sX, + spinY: sY, + pixelX: pX, + pixelY: pY, + }; + }, + handleMouseEnter: function handleMouseEnter() { + var swiper = this; + swiper.mouseEntered = true; + }, + handleMouseLeave: function handleMouseLeave() { + var swiper = this; + swiper.mouseEntered = false; + }, + handle: function handle(event) { + var e = event; + var swiper = this; + var params = swiper.params.mousewheel; + + if (swiper.params.cssMode) { + e.preventDefault(); + } + + var target = swiper.$el; + if (swiper.params.mousewheel.eventsTarged !== 'container') { + target = $(swiper.params.mousewheel.eventsTarged); + } + if (!swiper.mouseEntered && !target[0].contains(e.target) && !params.releaseOnEdges) { return true; } + + if (e.originalEvent) { e = e.originalEvent; } // jquery fix + var delta = 0; + var rtlFactor = swiper.rtlTranslate ? -1 : 1; + + var data = Mousewheel.normalize(e); + + if (params.forceToAxis) { + if (swiper.isHorizontal()) { + if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) { delta = data.pixelX * rtlFactor; } + else { return true; } + } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) { delta = data.pixelY; } + else { return true; } + } else { + delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY; + } + + if (delta === 0) { return true; } + + if (params.invert) { delta = -delta; } + + if (!swiper.params.freeMode) { + // Register the new event in a variable which stores the relevant data + var newEvent = { + time: Utils.now(), + delta: Math.abs(delta), + direction: Math.sign(delta), + raw: event, + }; + + // Keep the most recent events + var recentWheelEvents = swiper.mousewheel.recentWheelEvents; + if (recentWheelEvents.length >= 2) { + recentWheelEvents.shift(); // only store the last N events + } + var prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined; + recentWheelEvents.push(newEvent); + + // If there is at least one previous recorded event: + // If direction has changed or + // if the scroll is quicker than the previous one: + // Animate the slider. + // Else (this is the first time the wheel is moved): + // Animate the slider. + if (prevEvent) { + if (newEvent.direction !== prevEvent.direction || newEvent.delta > prevEvent.delta) { + swiper.mousewheel.animateSlider(newEvent); + } + } else { + swiper.mousewheel.animateSlider(newEvent); + } + + // If it's time to release the scroll: + // Return now so you don't hit the preventDefault. + if (swiper.mousewheel.releaseScroll(newEvent)) { + return true; + } + } else { + // Freemode or scrollContainer: + + // If we recently snapped after a momentum scroll, then ignore wheel events + // to give time for the deceleration to finish. Stop ignoring after 500 msecs + // or if it's a new scroll (larger delta or inverse sign as last event before + // an end-of-momentum snap). + var newEvent$1 = { time: Utils.now(), delta: Math.abs(delta), direction: Math.sign(delta) }; + var ref = swiper.mousewheel; + var lastEventBeforeSnap = ref.lastEventBeforeSnap; + var ignoreWheelEvents = lastEventBeforeSnap + && newEvent$1.time < lastEventBeforeSnap.time + 500 + && newEvent$1.delta <= lastEventBeforeSnap.delta + && newEvent$1.direction === lastEventBeforeSnap.direction; + if (!ignoreWheelEvents) { + swiper.mousewheel.lastEventBeforeSnap = undefined; + + if (swiper.params.loop) { + swiper.loopFix(); + } + var position = swiper.getTranslate() + (delta * params.sensitivity); + var wasBeginning = swiper.isBeginning; + var wasEnd = swiper.isEnd; + + if (position >= swiper.minTranslate()) { position = swiper.minTranslate(); } + if (position <= swiper.maxTranslate()) { position = swiper.maxTranslate(); } + + swiper.setTransition(0); + swiper.setTranslate(position); + swiper.updateProgress(); + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + + if ((!wasBeginning && swiper.isBeginning) || (!wasEnd && swiper.isEnd)) { + swiper.updateSlidesClasses(); + } + + if (swiper.params.freeModeSticky) { + // When wheel scrolling starts with sticky (aka snap) enabled, then detect + // the end of a momentum scroll by storing recent (N=15?) wheel events. + // 1. do all N events have decreasing or same (absolute value) delta? + // 2. did all N events arrive in the last M (M=500?) msecs? + // 3. does the earliest event have an (absolute value) delta that's + // at least P (P=1?) larger than the most recent event's delta? + // 4. does the latest event have a delta that's smaller than Q (Q=6?) pixels? + // If 1-4 are "yes" then we're near the end of a momuntum scroll deceleration. + // Snap immediately and ignore remaining wheel events in this scroll. + // See comment above for "remaining wheel events in this scroll" determination. + // If 1-4 aren't satisfied, then wait to snap until 500ms after the last event. + clearTimeout(swiper.mousewheel.timeout); + swiper.mousewheel.timeout = undefined; + var recentWheelEvents$1 = swiper.mousewheel.recentWheelEvents; + if (recentWheelEvents$1.length >= 15) { + recentWheelEvents$1.shift(); // only store the last N events + } + var prevEvent$1 = recentWheelEvents$1.length ? recentWheelEvents$1[recentWheelEvents$1.length - 1] : undefined; + var firstEvent = recentWheelEvents$1[0]; + recentWheelEvents$1.push(newEvent$1); + if (prevEvent$1 && (newEvent$1.delta > prevEvent$1.delta || newEvent$1.direction !== prevEvent$1.direction)) { + // Increasing or reverse-sign delta means the user started scrolling again. Clear the wheel event log. + recentWheelEvents$1.splice(0); + } else if (recentWheelEvents$1.length >= 15 + && newEvent$1.time - firstEvent.time < 500 + && firstEvent.delta - newEvent$1.delta >= 1 + && newEvent$1.delta <= 6 + ) { + // We're at the end of the deceleration of a momentum scroll, so there's no need + // to wait for more events. Snap ASAP on the next tick. + // Also, because there's some remaining momentum we'll bias the snap in the + // direction of the ongoing scroll because it's better UX for the scroll to snap + // in the same direction as the scroll instead of reversing to snap. Therefore, + // if it's already scrolled more than 20% in the current direction, keep going. + var snapToThreshold = delta > 0 ? 0.8 : 0.2; + swiper.mousewheel.lastEventBeforeSnap = newEvent$1; + recentWheelEvents$1.splice(0); + swiper.mousewheel.timeout = Utils.nextTick(function () { + swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold); + }, 0); // no delay; move on next tick + } + if (!swiper.mousewheel.timeout) { + // if we get here, then we haven't detected the end of a momentum scroll, so + // we'll consider a scroll "complete" when there haven't been any wheel events + // for 500ms. + swiper.mousewheel.timeout = Utils.nextTick(function () { + var snapToThreshold = 0.5; + swiper.mousewheel.lastEventBeforeSnap = newEvent$1; + recentWheelEvents$1.splice(0); + swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold); + }, 500); + } + } + + // Emit event + if (!ignoreWheelEvents) { swiper.emit('scroll', e); } + + // Stop autoplay + if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) { swiper.autoplay.stop(); } + // Return page scroll on edge positions + if (position === swiper.minTranslate() || position === swiper.maxTranslate()) { return true; } + } + } + + if (e.preventDefault) { e.preventDefault(); } + else { e.returnValue = false; } + return false; + }, + animateSlider: function animateSlider(newEvent) { + var swiper = this; + // If the movement is NOT big enough and + // if the last time the user scrolled was too close to the current one (avoid continuously triggering the slider): + // Don't go any further (avoid insignificant scroll movement). + if (newEvent.delta >= 6 && Utils.now() - swiper.mousewheel.lastScrollTime < 60) { + // Return false as a default + return true; + } + // If user is scrolling towards the end: + // If the slider hasn't hit the latest slide or + // if the slider is a loop and + // if the slider isn't moving right now: + // Go to next slide and + // emit a scroll event. + // Else (the user is scrolling towards the beginning) and + // if the slider hasn't hit the first slide or + // if the slider is a loop and + // if the slider isn't moving right now: + // Go to prev slide and + // emit a scroll event. + if (newEvent.direction < 0) { + if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) { + swiper.slideNext(); + swiper.emit('scroll', newEvent.raw); + } + } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) { + swiper.slidePrev(); + swiper.emit('scroll', newEvent.raw); + } + // If you got here is because an animation has been triggered so store the current time + swiper.mousewheel.lastScrollTime = (new win.Date()).getTime(); + // Return false as a default + return false; + }, + releaseScroll: function releaseScroll(newEvent) { + var swiper = this; + var params = swiper.params.mousewheel; + if (newEvent.direction < 0) { + if (swiper.isEnd && !swiper.params.loop && params.releaseOnEdges) { + // Return true to animate scroll on edges + return true; + } + } else if (swiper.isBeginning && !swiper.params.loop && params.releaseOnEdges) { + // Return true to animate scroll on edges + return true; + } + return false; + }, + enable: function enable() { + var swiper = this; + var event = Mousewheel.event(); + if (swiper.params.cssMode) { + swiper.wrapperEl.removeEventListener(event, swiper.mousewheel.handle); + return true; + } + if (!event) { return false; } + if (swiper.mousewheel.enabled) { return false; } + var target = swiper.$el; + if (swiper.params.mousewheel.eventsTarged !== 'container') { + target = $(swiper.params.mousewheel.eventsTarged); + } + target.on('mouseenter', swiper.mousewheel.handleMouseEnter); + target.on('mouseleave', swiper.mousewheel.handleMouseLeave); + target.on(event, swiper.mousewheel.handle); + swiper.mousewheel.enabled = true; + return true; + }, + disable: function disable() { + var swiper = this; + var event = Mousewheel.event(); + if (swiper.params.cssMode) { + swiper.wrapperEl.addEventListener(event, swiper.mousewheel.handle); + return true; + } + if (!event) { return false; } + if (!swiper.mousewheel.enabled) { return false; } + var target = swiper.$el; + if (swiper.params.mousewheel.eventsTarged !== 'container') { + target = $(swiper.params.mousewheel.eventsTarged); + } + target.off(event, swiper.mousewheel.handle); + swiper.mousewheel.enabled = false; + return true; + }, + }; + + var Mousewheel$1 = { + name: 'mousewheel', + params: { + mousewheel: { + enabled: false, + releaseOnEdges: false, + invert: false, + forceToAxis: false, + sensitivity: 1, + eventsTarged: 'container', + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + mousewheel: { + enabled: false, + enable: Mousewheel.enable.bind(swiper), + disable: Mousewheel.disable.bind(swiper), + handle: Mousewheel.handle.bind(swiper), + handleMouseEnter: Mousewheel.handleMouseEnter.bind(swiper), + handleMouseLeave: Mousewheel.handleMouseLeave.bind(swiper), + animateSlider: Mousewheel.animateSlider.bind(swiper), + releaseScroll: Mousewheel.releaseScroll.bind(swiper), + lastScrollTime: Utils.now(), + lastEventBeforeSnap: undefined, + recentWheelEvents: [], + }, + }); + }, + on: { + init: function init() { + var swiper = this; + if (!swiper.params.mousewheel.enabled && swiper.params.cssMode) { + swiper.mousewheel.disable(); + } + if (swiper.params.mousewheel.enabled) { swiper.mousewheel.enable(); } + }, + destroy: function destroy() { + var swiper = this; + if (swiper.params.cssMode) { + swiper.mousewheel.enable(); + } + if (swiper.mousewheel.enabled) { swiper.mousewheel.disable(); } + }, + }, + }; + + var Navigation = { + update: function update() { + // Update Navigation Buttons + var swiper = this; + var params = swiper.params.navigation; + + if (swiper.params.loop) { return; } + var ref = swiper.navigation; + var $nextEl = ref.$nextEl; + var $prevEl = ref.$prevEl; + + if ($prevEl && $prevEl.length > 0) { + if (swiper.isBeginning) { + $prevEl.addClass(params.disabledClass); + } else { + $prevEl.removeClass(params.disabledClass); + } + $prevEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); + } + if ($nextEl && $nextEl.length > 0) { + if (swiper.isEnd) { + $nextEl.addClass(params.disabledClass); + } else { + $nextEl.removeClass(params.disabledClass); + } + $nextEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); + } + }, + onPrevClick: function onPrevClick(e) { + var swiper = this; + e.preventDefault(); + if (swiper.isBeginning && !swiper.params.loop) { return; } + swiper.slidePrev(); + }, + onNextClick: function onNextClick(e) { + var swiper = this; + e.preventDefault(); + if (swiper.isEnd && !swiper.params.loop) { return; } + swiper.slideNext(); + }, + init: function init() { + var swiper = this; + var params = swiper.params.navigation; + if (!(params.nextEl || params.prevEl)) { return; } + + var $nextEl; + var $prevEl; + if (params.nextEl) { + $nextEl = $(params.nextEl); + if ( + swiper.params.uniqueNavElements + && typeof params.nextEl === 'string' + && $nextEl.length > 1 + && swiper.$el.find(params.nextEl).length === 1 + ) { + $nextEl = swiper.$el.find(params.nextEl); + } + } + if (params.prevEl) { + $prevEl = $(params.prevEl); + if ( + swiper.params.uniqueNavElements + && typeof params.prevEl === 'string' + && $prevEl.length > 1 + && swiper.$el.find(params.prevEl).length === 1 + ) { + $prevEl = swiper.$el.find(params.prevEl); + } + } + + if ($nextEl && $nextEl.length > 0) { + $nextEl.on('click', swiper.navigation.onNextClick); + } + if ($prevEl && $prevEl.length > 0) { + $prevEl.on('click', swiper.navigation.onPrevClick); + } + + Utils.extend(swiper.navigation, { + $nextEl: $nextEl, + nextEl: $nextEl && $nextEl[0], + $prevEl: $prevEl, + prevEl: $prevEl && $prevEl[0], + }); + }, + destroy: function destroy() { + var swiper = this; + var ref = swiper.navigation; + var $nextEl = ref.$nextEl; + var $prevEl = ref.$prevEl; + if ($nextEl && $nextEl.length) { + $nextEl.off('click', swiper.navigation.onNextClick); + $nextEl.removeClass(swiper.params.navigation.disabledClass); + } + if ($prevEl && $prevEl.length) { + $prevEl.off('click', swiper.navigation.onPrevClick); + $prevEl.removeClass(swiper.params.navigation.disabledClass); + } + }, + }; + + var Navigation$1 = { + name: 'navigation', + params: { + navigation: { + nextEl: null, + prevEl: null, + + hideOnClick: false, + disabledClass: 'swiper-button-disabled', + hiddenClass: 'swiper-button-hidden', + lockClass: 'swiper-button-lock', + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + navigation: { + init: Navigation.init.bind(swiper), + update: Navigation.update.bind(swiper), + destroy: Navigation.destroy.bind(swiper), + onNextClick: Navigation.onNextClick.bind(swiper), + onPrevClick: Navigation.onPrevClick.bind(swiper), + }, + }); + }, + on: { + init: function init() { + var swiper = this; + swiper.navigation.init(); + swiper.navigation.update(); + }, + toEdge: function toEdge() { + var swiper = this; + swiper.navigation.update(); + }, + fromEdge: function fromEdge() { + var swiper = this; + swiper.navigation.update(); + }, + destroy: function destroy() { + var swiper = this; + swiper.navigation.destroy(); + }, + click: function click(e) { + var swiper = this; + var ref = swiper.navigation; + var $nextEl = ref.$nextEl; + var $prevEl = ref.$prevEl; + if ( + swiper.params.navigation.hideOnClick + && !$(e.target).is($prevEl) + && !$(e.target).is($nextEl) + ) { + var isHidden; + if ($nextEl) { + isHidden = $nextEl.hasClass(swiper.params.navigation.hiddenClass); + } else if ($prevEl) { + isHidden = $prevEl.hasClass(swiper.params.navigation.hiddenClass); + } + if (isHidden === true) { + swiper.emit('navigationShow', swiper); + } else { + swiper.emit('navigationHide', swiper); + } + if ($nextEl) { + $nextEl.toggleClass(swiper.params.navigation.hiddenClass); + } + if ($prevEl) { + $prevEl.toggleClass(swiper.params.navigation.hiddenClass); + } + } + }, + }, + }; + + var Pagination = { + update: function update() { + // Render || Update Pagination bullets/items + var swiper = this; + var rtl = swiper.rtl; + var params = swiper.params.pagination; + if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) { return; } + var slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length; + var $el = swiper.pagination.$el; + // Current/Total + var current; + var total = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length; + if (swiper.params.loop) { + current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup); + if (current > slidesLength - 1 - (swiper.loopedSlides * 2)) { + current -= (slidesLength - (swiper.loopedSlides * 2)); + } + if (current > total - 1) { current -= total; } + if (current < 0 && swiper.params.paginationType !== 'bullets') { current = total + current; } + } else if (typeof swiper.snapIndex !== 'undefined') { + current = swiper.snapIndex; + } else { + current = swiper.activeIndex || 0; + } + // Types + if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) { + var bullets = swiper.pagination.bullets; + var firstIndex; + var lastIndex; + var midIndex; + if (params.dynamicBullets) { + swiper.pagination.bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true); + $el.css(swiper.isHorizontal() ? 'width' : 'height', ((swiper.pagination.bulletSize * (params.dynamicMainBullets + 4)) + "px")); + if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) { + swiper.pagination.dynamicBulletIndex += (current - swiper.previousIndex); + if (swiper.pagination.dynamicBulletIndex > (params.dynamicMainBullets - 1)) { + swiper.pagination.dynamicBulletIndex = params.dynamicMainBullets - 1; + } else if (swiper.pagination.dynamicBulletIndex < 0) { + swiper.pagination.dynamicBulletIndex = 0; + } + } + firstIndex = current - swiper.pagination.dynamicBulletIndex; + lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1); + midIndex = (lastIndex + firstIndex) / 2; + } + bullets.removeClass(((params.bulletActiveClass) + " " + (params.bulletActiveClass) + "-next " + (params.bulletActiveClass) + "-next-next " + (params.bulletActiveClass) + "-prev " + (params.bulletActiveClass) + "-prev-prev " + (params.bulletActiveClass) + "-main")); + if ($el.length > 1) { + bullets.each(function (index, bullet) { + var $bullet = $(bullet); + var bulletIndex = $bullet.index(); + if (bulletIndex === current) { + $bullet.addClass(params.bulletActiveClass); + } + if (params.dynamicBullets) { + if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) { + $bullet.addClass(((params.bulletActiveClass) + "-main")); + } + if (bulletIndex === firstIndex) { + $bullet + .prev() + .addClass(((params.bulletActiveClass) + "-prev")) + .prev() + .addClass(((params.bulletActiveClass) + "-prev-prev")); + } + if (bulletIndex === lastIndex) { + $bullet + .next() + .addClass(((params.bulletActiveClass) + "-next")) + .next() + .addClass(((params.bulletActiveClass) + "-next-next")); + } + } + }); + } else { + var $bullet = bullets.eq(current); + var bulletIndex = $bullet.index(); + $bullet.addClass(params.bulletActiveClass); + if (params.dynamicBullets) { + var $firstDisplayedBullet = bullets.eq(firstIndex); + var $lastDisplayedBullet = bullets.eq(lastIndex); + for (var i = firstIndex; i <= lastIndex; i += 1) { + bullets.eq(i).addClass(((params.bulletActiveClass) + "-main")); + } + if (swiper.params.loop) { + if (bulletIndex >= bullets.length - params.dynamicMainBullets) { + for (var i$1 = params.dynamicMainBullets; i$1 >= 0; i$1 -= 1) { + bullets.eq(bullets.length - i$1).addClass(((params.bulletActiveClass) + "-main")); + } + bullets.eq(bullets.length - params.dynamicMainBullets - 1).addClass(((params.bulletActiveClass) + "-prev")); + } else { + $firstDisplayedBullet + .prev() + .addClass(((params.bulletActiveClass) + "-prev")) + .prev() + .addClass(((params.bulletActiveClass) + "-prev-prev")); + $lastDisplayedBullet + .next() + .addClass(((params.bulletActiveClass) + "-next")) + .next() + .addClass(((params.bulletActiveClass) + "-next-next")); + } + } else { + $firstDisplayedBullet + .prev() + .addClass(((params.bulletActiveClass) + "-prev")) + .prev() + .addClass(((params.bulletActiveClass) + "-prev-prev")); + $lastDisplayedBullet + .next() + .addClass(((params.bulletActiveClass) + "-next")) + .next() + .addClass(((params.bulletActiveClass) + "-next-next")); + } + } + } + if (params.dynamicBullets) { + var dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4); + var bulletsOffset = (((swiper.pagination.bulletSize * dynamicBulletsLength) - (swiper.pagination.bulletSize)) / 2) - (midIndex * swiper.pagination.bulletSize); + var offsetProp = rtl ? 'right' : 'left'; + bullets.css(swiper.isHorizontal() ? offsetProp : 'top', (bulletsOffset + "px")); + } + } + if (params.type === 'fraction') { + $el.find(("." + (params.currentClass))).text(params.formatFractionCurrent(current + 1)); + $el.find(("." + (params.totalClass))).text(params.formatFractionTotal(total)); + } + if (params.type === 'progressbar') { + var progressbarDirection; + if (params.progressbarOpposite) { + progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal'; + } else { + progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical'; + } + var scale = (current + 1) / total; + var scaleX = 1; + var scaleY = 1; + if (progressbarDirection === 'horizontal') { + scaleX = scale; + } else { + scaleY = scale; + } + $el.find(("." + (params.progressbarFillClass))).transform(("translate3d(0,0,0) scaleX(" + scaleX + ") scaleY(" + scaleY + ")")).transition(swiper.params.speed); + } + if (params.type === 'custom' && params.renderCustom) { + $el.html(params.renderCustom(swiper, current + 1, total)); + swiper.emit('paginationRender', swiper, $el[0]); + } else { + swiper.emit('paginationUpdate', swiper, $el[0]); + } + $el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); + }, + render: function render() { + // Render Container + var swiper = this; + var params = swiper.params.pagination; + if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) { return; } + var slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length; + + var $el = swiper.pagination.$el; + var paginationHTML = ''; + if (params.type === 'bullets') { + var numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length; + for (var i = 0; i < numberOfBullets; i += 1) { + if (params.renderBullet) { + paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass); + } else { + paginationHTML += "<" + (params.bulletElement) + " class=\"" + (params.bulletClass) + "\">"; + } + } + $el.html(paginationHTML); + swiper.pagination.bullets = $el.find(("." + (params.bulletClass))); + } + if (params.type === 'fraction') { + if (params.renderFraction) { + paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass); + } else { + paginationHTML = "" + + ' / ' + + ""; + } + $el.html(paginationHTML); + } + if (params.type === 'progressbar') { + if (params.renderProgressbar) { + paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass); + } else { + paginationHTML = ""; + } + $el.html(paginationHTML); + } + if (params.type !== 'custom') { + swiper.emit('paginationRender', swiper.pagination.$el[0]); + } + }, + init: function init() { + var swiper = this; + var params = swiper.params.pagination; + if (!params.el) { return; } + + var $el = $(params.el); + if ($el.length === 0) { return; } + + if ( + swiper.params.uniqueNavElements + && typeof params.el === 'string' + && $el.length > 1 + && swiper.$el.find(params.el).length === 1 + ) { + $el = swiper.$el.find(params.el); + } + + if (params.type === 'bullets' && params.clickable) { + $el.addClass(params.clickableClass); + } + + $el.addClass(params.modifierClass + params.type); + + if (params.type === 'bullets' && params.dynamicBullets) { + $el.addClass(("" + (params.modifierClass) + (params.type) + "-dynamic")); + swiper.pagination.dynamicBulletIndex = 0; + if (params.dynamicMainBullets < 1) { + params.dynamicMainBullets = 1; + } + } + if (params.type === 'progressbar' && params.progressbarOpposite) { + $el.addClass(params.progressbarOppositeClass); + } + + if (params.clickable) { + $el.on('click', ("." + (params.bulletClass)), function onClick(e) { + e.preventDefault(); + var index = $(this).index() * swiper.params.slidesPerGroup; + if (swiper.params.loop) { index += swiper.loopedSlides; } + swiper.slideTo(index); + }); + } + + Utils.extend(swiper.pagination, { + $el: $el, + el: $el[0], + }); + }, + destroy: function destroy() { + var swiper = this; + var params = swiper.params.pagination; + if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) { return; } + var $el = swiper.pagination.$el; + + $el.removeClass(params.hiddenClass); + $el.removeClass(params.modifierClass + params.type); + if (swiper.pagination.bullets) { swiper.pagination.bullets.removeClass(params.bulletActiveClass); } + if (params.clickable) { + $el.off('click', ("." + (params.bulletClass))); + } + }, + }; + + var Pagination$1 = { + name: 'pagination', + params: { + pagination: { + el: null, + bulletElement: 'span', + clickable: false, + hideOnClick: false, + renderBullet: null, + renderProgressbar: null, + renderFraction: null, + renderCustom: null, + progressbarOpposite: false, + type: 'bullets', // 'bullets' or 'progressbar' or 'fraction' or 'custom' + dynamicBullets: false, + dynamicMainBullets: 1, + formatFractionCurrent: function (number) { return number; }, + formatFractionTotal: function (number) { return number; }, + bulletClass: 'swiper-pagination-bullet', + bulletActiveClass: 'swiper-pagination-bullet-active', + modifierClass: 'swiper-pagination-', // NEW + currentClass: 'swiper-pagination-current', + totalClass: 'swiper-pagination-total', + hiddenClass: 'swiper-pagination-hidden', + progressbarFillClass: 'swiper-pagination-progressbar-fill', + progressbarOppositeClass: 'swiper-pagination-progressbar-opposite', + clickableClass: 'swiper-pagination-clickable', // NEW + lockClass: 'swiper-pagination-lock', + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + pagination: { + init: Pagination.init.bind(swiper), + render: Pagination.render.bind(swiper), + update: Pagination.update.bind(swiper), + destroy: Pagination.destroy.bind(swiper), + dynamicBulletIndex: 0, + }, + }); + }, + on: { + init: function init() { + var swiper = this; + swiper.pagination.init(); + swiper.pagination.render(); + swiper.pagination.update(); + }, + activeIndexChange: function activeIndexChange() { + var swiper = this; + if (swiper.params.loop) { + swiper.pagination.update(); + } else if (typeof swiper.snapIndex === 'undefined') { + swiper.pagination.update(); + } + }, + snapIndexChange: function snapIndexChange() { + var swiper = this; + if (!swiper.params.loop) { + swiper.pagination.update(); + } + }, + slidesLengthChange: function slidesLengthChange() { + var swiper = this; + if (swiper.params.loop) { + swiper.pagination.render(); + swiper.pagination.update(); + } + }, + snapGridLengthChange: function snapGridLengthChange() { + var swiper = this; + if (!swiper.params.loop) { + swiper.pagination.render(); + swiper.pagination.update(); + } + }, + destroy: function destroy() { + var swiper = this; + swiper.pagination.destroy(); + }, + click: function click(e) { + var swiper = this; + if ( + swiper.params.pagination.el + && swiper.params.pagination.hideOnClick + && swiper.pagination.$el.length > 0 + && !$(e.target).hasClass(swiper.params.pagination.bulletClass) + ) { + var isHidden = swiper.pagination.$el.hasClass(swiper.params.pagination.hiddenClass); + if (isHidden === true) { + swiper.emit('paginationShow', swiper); + } else { + swiper.emit('paginationHide', swiper); + } + swiper.pagination.$el.toggleClass(swiper.params.pagination.hiddenClass); + } + }, + }, + }; + + var Scrollbar = { + setTranslate: function setTranslate() { + var swiper = this; + if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) { return; } + var scrollbar = swiper.scrollbar; + var rtl = swiper.rtlTranslate; + var progress = swiper.progress; + var dragSize = scrollbar.dragSize; + var trackSize = scrollbar.trackSize; + var $dragEl = scrollbar.$dragEl; + var $el = scrollbar.$el; + var params = swiper.params.scrollbar; + + var newSize = dragSize; + var newPos = (trackSize - dragSize) * progress; + if (rtl) { + newPos = -newPos; + if (newPos > 0) { + newSize = dragSize - newPos; + newPos = 0; + } else if (-newPos + dragSize > trackSize) { + newSize = trackSize + newPos; + } + } else if (newPos < 0) { + newSize = dragSize + newPos; + newPos = 0; + } else if (newPos + dragSize > trackSize) { + newSize = trackSize - newPos; + } + if (swiper.isHorizontal()) { + $dragEl.transform(("translate3d(" + newPos + "px, 0, 0)")); + $dragEl[0].style.width = newSize + "px"; + } else { + $dragEl.transform(("translate3d(0px, " + newPos + "px, 0)")); + $dragEl[0].style.height = newSize + "px"; + } + if (params.hide) { + clearTimeout(swiper.scrollbar.timeout); + $el[0].style.opacity = 1; + swiper.scrollbar.timeout = setTimeout(function () { + $el[0].style.opacity = 0; + $el.transition(400); + }, 1000); + } + }, + setTransition: function setTransition(duration) { + var swiper = this; + if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) { return; } + swiper.scrollbar.$dragEl.transition(duration); + }, + updateSize: function updateSize() { + var swiper = this; + if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) { return; } + + var scrollbar = swiper.scrollbar; + var $dragEl = scrollbar.$dragEl; + var $el = scrollbar.$el; + + $dragEl[0].style.width = ''; + $dragEl[0].style.height = ''; + var trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight; + + var divider = swiper.size / swiper.virtualSize; + var moveDivider = divider * (trackSize / swiper.size); + var dragSize; + if (swiper.params.scrollbar.dragSize === 'auto') { + dragSize = trackSize * divider; + } else { + dragSize = parseInt(swiper.params.scrollbar.dragSize, 10); + } + + if (swiper.isHorizontal()) { + $dragEl[0].style.width = dragSize + "px"; + } else { + $dragEl[0].style.height = dragSize + "px"; + } + + if (divider >= 1) { + $el[0].style.display = 'none'; + } else { + $el[0].style.display = ''; + } + if (swiper.params.scrollbar.hide) { + $el[0].style.opacity = 0; + } + Utils.extend(scrollbar, { + trackSize: trackSize, + divider: divider, + moveDivider: moveDivider, + dragSize: dragSize, + }); + scrollbar.$el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass); + }, + getPointerPosition: function getPointerPosition(e) { + var swiper = this; + if (swiper.isHorizontal()) { + return ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].clientX : e.clientX); + } + return ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].clientY : e.clientY); + }, + setDragPosition: function setDragPosition(e) { + var swiper = this; + var scrollbar = swiper.scrollbar; + var rtl = swiper.rtlTranslate; + var $el = scrollbar.$el; + var dragSize = scrollbar.dragSize; + var trackSize = scrollbar.trackSize; + var dragStartPos = scrollbar.dragStartPos; + + var positionRatio; + positionRatio = ((scrollbar.getPointerPosition(e)) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] + - (dragStartPos !== null ? dragStartPos : dragSize / 2)) / (trackSize - dragSize); + positionRatio = Math.max(Math.min(positionRatio, 1), 0); + if (rtl) { + positionRatio = 1 - positionRatio; + } + + var position = swiper.minTranslate() + ((swiper.maxTranslate() - swiper.minTranslate()) * positionRatio); + + swiper.updateProgress(position); + swiper.setTranslate(position); + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + }, + onDragStart: function onDragStart(e) { + var swiper = this; + var params = swiper.params.scrollbar; + var scrollbar = swiper.scrollbar; + var $wrapperEl = swiper.$wrapperEl; + var $el = scrollbar.$el; + var $dragEl = scrollbar.$dragEl; + swiper.scrollbar.isTouched = true; + swiper.scrollbar.dragStartPos = (e.target === $dragEl[0] || e.target === $dragEl) + ? scrollbar.getPointerPosition(e) - e.target.getBoundingClientRect()[swiper.isHorizontal() ? 'left' : 'top'] : null; + e.preventDefault(); + e.stopPropagation(); + + $wrapperEl.transition(100); + $dragEl.transition(100); + scrollbar.setDragPosition(e); + + clearTimeout(swiper.scrollbar.dragTimeout); + + $el.transition(0); + if (params.hide) { + $el.css('opacity', 1); + } + if (swiper.params.cssMode) { + swiper.$wrapperEl.css('scroll-snap-type', 'none'); + } + swiper.emit('scrollbarDragStart', e); + }, + onDragMove: function onDragMove(e) { + var swiper = this; + var scrollbar = swiper.scrollbar; + var $wrapperEl = swiper.$wrapperEl; + var $el = scrollbar.$el; + var $dragEl = scrollbar.$dragEl; + + if (!swiper.scrollbar.isTouched) { return; } + if (e.preventDefault) { e.preventDefault(); } + else { e.returnValue = false; } + scrollbar.setDragPosition(e); + $wrapperEl.transition(0); + $el.transition(0); + $dragEl.transition(0); + swiper.emit('scrollbarDragMove', e); + }, + onDragEnd: function onDragEnd(e) { + var swiper = this; + + var params = swiper.params.scrollbar; + var scrollbar = swiper.scrollbar; + var $wrapperEl = swiper.$wrapperEl; + var $el = scrollbar.$el; + + if (!swiper.scrollbar.isTouched) { return; } + swiper.scrollbar.isTouched = false; + if (swiper.params.cssMode) { + swiper.$wrapperEl.css('scroll-snap-type', ''); + $wrapperEl.transition(''); + } + if (params.hide) { + clearTimeout(swiper.scrollbar.dragTimeout); + swiper.scrollbar.dragTimeout = Utils.nextTick(function () { + $el.css('opacity', 0); + $el.transition(400); + }, 1000); + } + swiper.emit('scrollbarDragEnd', e); + if (params.snapOnRelease) { + swiper.slideToClosest(); + } + }, + enableDraggable: function enableDraggable() { + var swiper = this; + if (!swiper.params.scrollbar.el) { return; } + var scrollbar = swiper.scrollbar; + var touchEventsTouch = swiper.touchEventsTouch; + var touchEventsDesktop = swiper.touchEventsDesktop; + var params = swiper.params; + var $el = scrollbar.$el; + var target = $el[0]; + var activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false; + var passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false; + if (!Support.touch) { + target.addEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener); + doc.addEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener); + doc.addEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener); + } else { + target.addEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener); + target.addEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener); + target.addEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener); + } + }, + disableDraggable: function disableDraggable() { + var swiper = this; + if (!swiper.params.scrollbar.el) { return; } + var scrollbar = swiper.scrollbar; + var touchEventsTouch = swiper.touchEventsTouch; + var touchEventsDesktop = swiper.touchEventsDesktop; + var params = swiper.params; + var $el = scrollbar.$el; + var target = $el[0]; + var activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false; + var passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false; + if (!Support.touch) { + target.removeEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener); + doc.removeEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener); + doc.removeEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener); + } else { + target.removeEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener); + target.removeEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener); + target.removeEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener); + } + }, + init: function init() { + var swiper = this; + if (!swiper.params.scrollbar.el) { return; } + var scrollbar = swiper.scrollbar; + var $swiperEl = swiper.$el; + var params = swiper.params.scrollbar; + + var $el = $(params.el); + if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) { + $el = $swiperEl.find(params.el); + } + + var $dragEl = $el.find(("." + (swiper.params.scrollbar.dragClass))); + if ($dragEl.length === 0) { + $dragEl = $(("
      ")); + $el.append($dragEl); + } + + Utils.extend(scrollbar, { + $el: $el, + el: $el[0], + $dragEl: $dragEl, + dragEl: $dragEl[0], + }); + + if (params.draggable) { + scrollbar.enableDraggable(); + } + }, + destroy: function destroy() { + var swiper = this; + swiper.scrollbar.disableDraggable(); + }, + }; + + var Scrollbar$1 = { + name: 'scrollbar', + params: { + scrollbar: { + el: null, + dragSize: 'auto', + hide: false, + draggable: false, + snapOnRelease: true, + lockClass: 'swiper-scrollbar-lock', + dragClass: 'swiper-scrollbar-drag', + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + scrollbar: { + init: Scrollbar.init.bind(swiper), + destroy: Scrollbar.destroy.bind(swiper), + updateSize: Scrollbar.updateSize.bind(swiper), + setTranslate: Scrollbar.setTranslate.bind(swiper), + setTransition: Scrollbar.setTransition.bind(swiper), + enableDraggable: Scrollbar.enableDraggable.bind(swiper), + disableDraggable: Scrollbar.disableDraggable.bind(swiper), + setDragPosition: Scrollbar.setDragPosition.bind(swiper), + getPointerPosition: Scrollbar.getPointerPosition.bind(swiper), + onDragStart: Scrollbar.onDragStart.bind(swiper), + onDragMove: Scrollbar.onDragMove.bind(swiper), + onDragEnd: Scrollbar.onDragEnd.bind(swiper), + isTouched: false, + timeout: null, + dragTimeout: null, + }, + }); + }, + on: { + init: function init() { + var swiper = this; + swiper.scrollbar.init(); + swiper.scrollbar.updateSize(); + swiper.scrollbar.setTranslate(); + }, + update: function update() { + var swiper = this; + swiper.scrollbar.updateSize(); + }, + resize: function resize() { + var swiper = this; + swiper.scrollbar.updateSize(); + }, + observerUpdate: function observerUpdate() { + var swiper = this; + swiper.scrollbar.updateSize(); + }, + setTranslate: function setTranslate() { + var swiper = this; + swiper.scrollbar.setTranslate(); + }, + setTransition: function setTransition(duration) { + var swiper = this; + swiper.scrollbar.setTransition(duration); + }, + destroy: function destroy() { + var swiper = this; + swiper.scrollbar.destroy(); + }, + }, + }; + + var Parallax = { + setTransform: function setTransform(el, progress) { + var swiper = this; + var rtl = swiper.rtl; + + var $el = $(el); + var rtlFactor = rtl ? -1 : 1; + + var p = $el.attr('data-swiper-parallax') || '0'; + var x = $el.attr('data-swiper-parallax-x'); + var y = $el.attr('data-swiper-parallax-y'); + var scale = $el.attr('data-swiper-parallax-scale'); + var opacity = $el.attr('data-swiper-parallax-opacity'); + + if (x || y) { + x = x || '0'; + y = y || '0'; + } else if (swiper.isHorizontal()) { + x = p; + y = '0'; + } else { + y = p; + x = '0'; + } + + if ((x).indexOf('%') >= 0) { + x = (parseInt(x, 10) * progress * rtlFactor) + "%"; + } else { + x = (x * progress * rtlFactor) + "px"; + } + if ((y).indexOf('%') >= 0) { + y = (parseInt(y, 10) * progress) + "%"; + } else { + y = (y * progress) + "px"; + } + + if (typeof opacity !== 'undefined' && opacity !== null) { + var currentOpacity = opacity - ((opacity - 1) * (1 - Math.abs(progress))); + $el[0].style.opacity = currentOpacity; + } + if (typeof scale === 'undefined' || scale === null) { + $el.transform(("translate3d(" + x + ", " + y + ", 0px)")); + } else { + var currentScale = scale - ((scale - 1) * (1 - Math.abs(progress))); + $el.transform(("translate3d(" + x + ", " + y + ", 0px) scale(" + currentScale + ")")); + } + }, + setTranslate: function setTranslate() { + var swiper = this; + var $el = swiper.$el; + var slides = swiper.slides; + var progress = swiper.progress; + var snapGrid = swiper.snapGrid; + $el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]') + .each(function (index, el) { + swiper.parallax.setTransform(el, progress); + }); + slides.each(function (slideIndex, slideEl) { + var slideProgress = slideEl.progress; + if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') { + slideProgress += Math.ceil(slideIndex / 2) - (progress * (snapGrid.length - 1)); + } + slideProgress = Math.min(Math.max(slideProgress, -1), 1); + $(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]') + .each(function (index, el) { + swiper.parallax.setTransform(el, slideProgress); + }); + }); + }, + setTransition: function setTransition(duration) { + if ( duration === void 0 ) duration = this.params.speed; + + var swiper = this; + var $el = swiper.$el; + $el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]') + .each(function (index, parallaxEl) { + var $parallaxEl = $(parallaxEl); + var parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration; + if (duration === 0) { parallaxDuration = 0; } + $parallaxEl.transition(parallaxDuration); + }); + }, + }; + + var Parallax$1 = { + name: 'parallax', + params: { + parallax: { + enabled: false, + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + parallax: { + setTransform: Parallax.setTransform.bind(swiper), + setTranslate: Parallax.setTranslate.bind(swiper), + setTransition: Parallax.setTransition.bind(swiper), + }, + }); + }, + on: { + beforeInit: function beforeInit() { + var swiper = this; + if (!swiper.params.parallax.enabled) { return; } + swiper.params.watchSlidesProgress = true; + swiper.originalParams.watchSlidesProgress = true; + }, + init: function init() { + var swiper = this; + if (!swiper.params.parallax.enabled) { return; } + swiper.parallax.setTranslate(); + }, + setTranslate: function setTranslate() { + var swiper = this; + if (!swiper.params.parallax.enabled) { return; } + swiper.parallax.setTranslate(); + }, + setTransition: function setTransition(duration) { + var swiper = this; + if (!swiper.params.parallax.enabled) { return; } + swiper.parallax.setTransition(duration); + }, + }, + }; + + var Zoom = { + // Calc Scale From Multi-touches + getDistanceBetweenTouches: function getDistanceBetweenTouches(e) { + if (e.targetTouches.length < 2) { return 1; } + var x1 = e.targetTouches[0].pageX; + var y1 = e.targetTouches[0].pageY; + var x2 = e.targetTouches[1].pageX; + var y2 = e.targetTouches[1].pageY; + var distance = Math.sqrt((Math.pow( (x2 - x1), 2 )) + (Math.pow( (y2 - y1), 2 ))); + return distance; + }, + // Events + onGestureStart: function onGestureStart(e) { + var swiper = this; + var params = swiper.params.zoom; + var zoom = swiper.zoom; + var gesture = zoom.gesture; + zoom.fakeGestureTouched = false; + zoom.fakeGestureMoved = false; + if (!Support.gestures) { + if (e.type !== 'touchstart' || (e.type === 'touchstart' && e.targetTouches.length < 2)) { + return; + } + zoom.fakeGestureTouched = true; + gesture.scaleStart = Zoom.getDistanceBetweenTouches(e); + } + if (!gesture.$slideEl || !gesture.$slideEl.length) { + gesture.$slideEl = $(e.target).closest('.swiper-slide'); + if (gesture.$slideEl.length === 0) { gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); } + gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas'); + gesture.$imageWrapEl = gesture.$imageEl.parent(("." + (params.containerClass))); + gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; + if (gesture.$imageWrapEl.length === 0) { + gesture.$imageEl = undefined; + return; + } + } + gesture.$imageEl.transition(0); + swiper.zoom.isScaling = true; + }, + onGestureChange: function onGestureChange(e) { + var swiper = this; + var params = swiper.params.zoom; + var zoom = swiper.zoom; + var gesture = zoom.gesture; + if (!Support.gestures) { + if (e.type !== 'touchmove' || (e.type === 'touchmove' && e.targetTouches.length < 2)) { + return; + } + zoom.fakeGestureMoved = true; + gesture.scaleMove = Zoom.getDistanceBetweenTouches(e); + } + if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; } + if (Support.gestures) { + zoom.scale = e.scale * zoom.currentScale; + } else { + zoom.scale = (gesture.scaleMove / gesture.scaleStart) * zoom.currentScale; + } + if (zoom.scale > gesture.maxRatio) { + zoom.scale = (gesture.maxRatio - 1) + (Math.pow( ((zoom.scale - gesture.maxRatio) + 1), 0.5 )); + } + if (zoom.scale < params.minRatio) { + zoom.scale = (params.minRatio + 1) - (Math.pow( ((params.minRatio - zoom.scale) + 1), 0.5 )); + } + gesture.$imageEl.transform(("translate3d(0,0,0) scale(" + (zoom.scale) + ")")); + }, + onGestureEnd: function onGestureEnd(e) { + var swiper = this; + var params = swiper.params.zoom; + var zoom = swiper.zoom; + var gesture = zoom.gesture; + if (!Support.gestures) { + if (!zoom.fakeGestureTouched || !zoom.fakeGestureMoved) { + return; + } + if (e.type !== 'touchend' || (e.type === 'touchend' && e.changedTouches.length < 2 && !Device.android)) { + return; + } + zoom.fakeGestureTouched = false; + zoom.fakeGestureMoved = false; + } + if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; } + zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio); + gesture.$imageEl.transition(swiper.params.speed).transform(("translate3d(0,0,0) scale(" + (zoom.scale) + ")")); + zoom.currentScale = zoom.scale; + zoom.isScaling = false; + if (zoom.scale === 1) { gesture.$slideEl = undefined; } + }, + onTouchStart: function onTouchStart(e) { + var swiper = this; + var zoom = swiper.zoom; + var gesture = zoom.gesture; + var image = zoom.image; + if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; } + if (image.isTouched) { return; } + if (Device.android) { e.preventDefault(); } + image.isTouched = true; + image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + }, + onTouchMove: function onTouchMove(e) { + var swiper = this; + var zoom = swiper.zoom; + var gesture = zoom.gesture; + var image = zoom.image; + var velocity = zoom.velocity; + if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; } + swiper.allowClick = false; + if (!image.isTouched || !gesture.$slideEl) { return; } + + if (!image.isMoved) { + image.width = gesture.$imageEl[0].offsetWidth; + image.height = gesture.$imageEl[0].offsetHeight; + image.startX = Utils.getTranslate(gesture.$imageWrapEl[0], 'x') || 0; + image.startY = Utils.getTranslate(gesture.$imageWrapEl[0], 'y') || 0; + gesture.slideWidth = gesture.$slideEl[0].offsetWidth; + gesture.slideHeight = gesture.$slideEl[0].offsetHeight; + gesture.$imageWrapEl.transition(0); + if (swiper.rtl) { + image.startX = -image.startX; + image.startY = -image.startY; + } + } + // Define if we need image drag + var scaledWidth = image.width * zoom.scale; + var scaledHeight = image.height * zoom.scale; + + if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) { return; } + + image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0); + image.maxX = -image.minX; + image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0); + image.maxY = -image.minY; + + image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + + if (!image.isMoved && !zoom.isScaling) { + if ( + swiper.isHorizontal() + && ( + (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x) + || (Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x) + ) + ) { + image.isTouched = false; + return; + } if ( + !swiper.isHorizontal() + && ( + (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y) + || (Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y) + ) + ) { + image.isTouched = false; + return; + } + } + e.preventDefault(); + e.stopPropagation(); + + image.isMoved = true; + image.currentX = (image.touchesCurrent.x - image.touchesStart.x) + image.startX; + image.currentY = (image.touchesCurrent.y - image.touchesStart.y) + image.startY; + + if (image.currentX < image.minX) { + image.currentX = (image.minX + 1) - (Math.pow( ((image.minX - image.currentX) + 1), 0.8 )); + } + if (image.currentX > image.maxX) { + image.currentX = (image.maxX - 1) + (Math.pow( ((image.currentX - image.maxX) + 1), 0.8 )); + } + + if (image.currentY < image.minY) { + image.currentY = (image.minY + 1) - (Math.pow( ((image.minY - image.currentY) + 1), 0.8 )); + } + if (image.currentY > image.maxY) { + image.currentY = (image.maxY - 1) + (Math.pow( ((image.currentY - image.maxY) + 1), 0.8 )); + } + + // Velocity + if (!velocity.prevPositionX) { velocity.prevPositionX = image.touchesCurrent.x; } + if (!velocity.prevPositionY) { velocity.prevPositionY = image.touchesCurrent.y; } + if (!velocity.prevTime) { velocity.prevTime = Date.now(); } + velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2; + velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2; + if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) { velocity.x = 0; } + if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) { velocity.y = 0; } + velocity.prevPositionX = image.touchesCurrent.x; + velocity.prevPositionY = image.touchesCurrent.y; + velocity.prevTime = Date.now(); + + gesture.$imageWrapEl.transform(("translate3d(" + (image.currentX) + "px, " + (image.currentY) + "px,0)")); + }, + onTouchEnd: function onTouchEnd() { + var swiper = this; + var zoom = swiper.zoom; + var gesture = zoom.gesture; + var image = zoom.image; + var velocity = zoom.velocity; + if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; } + if (!image.isTouched || !image.isMoved) { + image.isTouched = false; + image.isMoved = false; + return; + } + image.isTouched = false; + image.isMoved = false; + var momentumDurationX = 300; + var momentumDurationY = 300; + var momentumDistanceX = velocity.x * momentumDurationX; + var newPositionX = image.currentX + momentumDistanceX; + var momentumDistanceY = velocity.y * momentumDurationY; + var newPositionY = image.currentY + momentumDistanceY; + + // Fix duration + if (velocity.x !== 0) { momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x); } + if (velocity.y !== 0) { momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y); } + var momentumDuration = Math.max(momentumDurationX, momentumDurationY); + + image.currentX = newPositionX; + image.currentY = newPositionY; + + // Define if we need image drag + var scaledWidth = image.width * zoom.scale; + var scaledHeight = image.height * zoom.scale; + image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0); + image.maxX = -image.minX; + image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0); + image.maxY = -image.minY; + image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX); + image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY); + + gesture.$imageWrapEl.transition(momentumDuration).transform(("translate3d(" + (image.currentX) + "px, " + (image.currentY) + "px,0)")); + }, + onTransitionEnd: function onTransitionEnd() { + var swiper = this; + var zoom = swiper.zoom; + var gesture = zoom.gesture; + if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) { + gesture.$imageEl.transform('translate3d(0,0,0) scale(1)'); + gesture.$imageWrapEl.transform('translate3d(0,0,0)'); + + zoom.scale = 1; + zoom.currentScale = 1; + + gesture.$slideEl = undefined; + gesture.$imageEl = undefined; + gesture.$imageWrapEl = undefined; + } + }, + // Toggle Zoom + toggle: function toggle(e) { + var swiper = this; + var zoom = swiper.zoom; + + if (zoom.scale && zoom.scale !== 1) { + // Zoom Out + zoom.out(); + } else { + // Zoom In + zoom.in(e); + } + }, + in: function in$1(e) { + var swiper = this; + + var zoom = swiper.zoom; + var params = swiper.params.zoom; + var gesture = zoom.gesture; + var image = zoom.image; + + if (!gesture.$slideEl) { + gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex); + gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas'); + gesture.$imageWrapEl = gesture.$imageEl.parent(("." + (params.containerClass))); + } + if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; } + + gesture.$slideEl.addClass(("" + (params.zoomedSlideClass))); + + var touchX; + var touchY; + var offsetX; + var offsetY; + var diffX; + var diffY; + var translateX; + var translateY; + var imageWidth; + var imageHeight; + var scaledWidth; + var scaledHeight; + var translateMinX; + var translateMinY; + var translateMaxX; + var translateMaxY; + var slideWidth; + var slideHeight; + + if (typeof image.touchesStart.x === 'undefined' && e) { + touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX; + touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY; + } else { + touchX = image.touchesStart.x; + touchY = image.touchesStart.y; + } + + zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; + zoom.currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; + if (e) { + slideWidth = gesture.$slideEl[0].offsetWidth; + slideHeight = gesture.$slideEl[0].offsetHeight; + offsetX = gesture.$slideEl.offset().left; + offsetY = gesture.$slideEl.offset().top; + diffX = (offsetX + (slideWidth / 2)) - touchX; + diffY = (offsetY + (slideHeight / 2)) - touchY; + + imageWidth = gesture.$imageEl[0].offsetWidth; + imageHeight = gesture.$imageEl[0].offsetHeight; + scaledWidth = imageWidth * zoom.scale; + scaledHeight = imageHeight * zoom.scale; + + translateMinX = Math.min(((slideWidth / 2) - (scaledWidth / 2)), 0); + translateMinY = Math.min(((slideHeight / 2) - (scaledHeight / 2)), 0); + translateMaxX = -translateMinX; + translateMaxY = -translateMinY; + + translateX = diffX * zoom.scale; + translateY = diffY * zoom.scale; + + if (translateX < translateMinX) { + translateX = translateMinX; + } + if (translateX > translateMaxX) { + translateX = translateMaxX; + } + + if (translateY < translateMinY) { + translateY = translateMinY; + } + if (translateY > translateMaxY) { + translateY = translateMaxY; + } + } else { + translateX = 0; + translateY = 0; + } + gesture.$imageWrapEl.transition(300).transform(("translate3d(" + translateX + "px, " + translateY + "px,0)")); + gesture.$imageEl.transition(300).transform(("translate3d(0,0,0) scale(" + (zoom.scale) + ")")); + }, + out: function out() { + var swiper = this; + + var zoom = swiper.zoom; + var params = swiper.params.zoom; + var gesture = zoom.gesture; + + if (!gesture.$slideEl) { + gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex); + gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas'); + gesture.$imageWrapEl = gesture.$imageEl.parent(("." + (params.containerClass))); + } + if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; } + + zoom.scale = 1; + zoom.currentScale = 1; + gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)'); + gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)'); + gesture.$slideEl.removeClass(("" + (params.zoomedSlideClass))); + gesture.$slideEl = undefined; + }, + // Attach/Detach Events + enable: function enable() { + var swiper = this; + var zoom = swiper.zoom; + if (zoom.enabled) { return; } + zoom.enabled = true; + + var passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false; + var activeListenerWithCapture = Support.passiveListener ? { passive: false, capture: true } : true; + + // Scale image + if (Support.gestures) { + swiper.$wrapperEl.on('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener); + swiper.$wrapperEl.on('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener); + swiper.$wrapperEl.on('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener); + } else if (swiper.touchEvents.start === 'touchstart') { + swiper.$wrapperEl.on(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener); + swiper.$wrapperEl.on(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, activeListenerWithCapture); + swiper.$wrapperEl.on(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener); + if (swiper.touchEvents.cancel) { + swiper.$wrapperEl.on(swiper.touchEvents.cancel, '.swiper-slide', zoom.onGestureEnd, passiveListener); + } + } + + // Move image + swiper.$wrapperEl.on(swiper.touchEvents.move, ("." + (swiper.params.zoom.containerClass)), zoom.onTouchMove, activeListenerWithCapture); + }, + disable: function disable() { + var swiper = this; + var zoom = swiper.zoom; + if (!zoom.enabled) { return; } + + swiper.zoom.enabled = false; + + var passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false; + var activeListenerWithCapture = Support.passiveListener ? { passive: false, capture: true } : true; + + // Scale image + if (Support.gestures) { + swiper.$wrapperEl.off('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener); + swiper.$wrapperEl.off('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener); + swiper.$wrapperEl.off('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener); + } else if (swiper.touchEvents.start === 'touchstart') { + swiper.$wrapperEl.off(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener); + swiper.$wrapperEl.off(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, activeListenerWithCapture); + swiper.$wrapperEl.off(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener); + if (swiper.touchEvents.cancel) { + swiper.$wrapperEl.off(swiper.touchEvents.cancel, '.swiper-slide', zoom.onGestureEnd, passiveListener); + } + } + + // Move image + swiper.$wrapperEl.off(swiper.touchEvents.move, ("." + (swiper.params.zoom.containerClass)), zoom.onTouchMove, activeListenerWithCapture); + }, + }; + + var Zoom$1 = { + name: 'zoom', + params: { + zoom: { + enabled: false, + maxRatio: 3, + minRatio: 1, + toggle: true, + containerClass: 'swiper-zoom-container', + zoomedSlideClass: 'swiper-slide-zoomed', + }, + }, + create: function create() { + var swiper = this; + var zoom = { + enabled: false, + scale: 1, + currentScale: 1, + isScaling: false, + gesture: { + $slideEl: undefined, + slideWidth: undefined, + slideHeight: undefined, + $imageEl: undefined, + $imageWrapEl: undefined, + maxRatio: 3, + }, + image: { + isTouched: undefined, + isMoved: undefined, + currentX: undefined, + currentY: undefined, + minX: undefined, + minY: undefined, + maxX: undefined, + maxY: undefined, + width: undefined, + height: undefined, + startX: undefined, + startY: undefined, + touchesStart: {}, + touchesCurrent: {}, + }, + velocity: { + x: undefined, + y: undefined, + prevPositionX: undefined, + prevPositionY: undefined, + prevTime: undefined, + }, + }; + + ('onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out').split(' ').forEach(function (methodName) { + zoom[methodName] = Zoom[methodName].bind(swiper); + }); + Utils.extend(swiper, { + zoom: zoom, + }); + + var scale = 1; + Object.defineProperty(swiper.zoom, 'scale', { + get: function get() { + return scale; + }, + set: function set(value) { + if (scale !== value) { + var imageEl = swiper.zoom.gesture.$imageEl ? swiper.zoom.gesture.$imageEl[0] : undefined; + var slideEl = swiper.zoom.gesture.$slideEl ? swiper.zoom.gesture.$slideEl[0] : undefined; + swiper.emit('zoomChange', value, imageEl, slideEl); + } + scale = value; + }, + }); + }, + on: { + init: function init() { + var swiper = this; + if (swiper.params.zoom.enabled) { + swiper.zoom.enable(); + } + }, + destroy: function destroy() { + var swiper = this; + swiper.zoom.disable(); + }, + touchStart: function touchStart(e) { + var swiper = this; + if (!swiper.zoom.enabled) { return; } + swiper.zoom.onTouchStart(e); + }, + touchEnd: function touchEnd(e) { + var swiper = this; + if (!swiper.zoom.enabled) { return; } + swiper.zoom.onTouchEnd(e); + }, + doubleTap: function doubleTap(e) { + var swiper = this; + if (swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) { + swiper.zoom.toggle(e); + } + }, + transitionEnd: function transitionEnd() { + var swiper = this; + if (swiper.zoom.enabled && swiper.params.zoom.enabled) { + swiper.zoom.onTransitionEnd(); + } + }, + slideChange: function slideChange() { + var swiper = this; + if (swiper.zoom.enabled && swiper.params.zoom.enabled && swiper.params.cssMode) { + swiper.zoom.onTransitionEnd(); + } + }, + }, + }; + + var Lazy = { + loadInSlide: function loadInSlide(index, loadInDuplicate) { + if ( loadInDuplicate === void 0 ) loadInDuplicate = true; + + var swiper = this; + var params = swiper.params.lazy; + if (typeof index === 'undefined') { return; } + if (swiper.slides.length === 0) { return; } + var isVirtual = swiper.virtual && swiper.params.virtual.enabled; + + var $slideEl = isVirtual + ? swiper.$wrapperEl.children(("." + (swiper.params.slideClass) + "[data-swiper-slide-index=\"" + index + "\"]")) + : swiper.slides.eq(index); + + var $images = $slideEl.find(("." + (params.elementClass) + ":not(." + (params.loadedClass) + "):not(." + (params.loadingClass) + ")")); + if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) { + $images = $images.add($slideEl[0]); + } + if ($images.length === 0) { return; } + + $images.each(function (imageIndex, imageEl) { + var $imageEl = $(imageEl); + $imageEl.addClass(params.loadingClass); + + var background = $imageEl.attr('data-background'); + var src = $imageEl.attr('data-src'); + var srcset = $imageEl.attr('data-srcset'); + var sizes = $imageEl.attr('data-sizes'); + + swiper.loadImage($imageEl[0], (src || background), srcset, sizes, false, function () { + if (typeof swiper === 'undefined' || swiper === null || !swiper || (swiper && !swiper.params) || swiper.destroyed) { return; } + if (background) { + $imageEl.css('background-image', ("url(\"" + background + "\")")); + $imageEl.removeAttr('data-background'); + } else { + if (srcset) { + $imageEl.attr('srcset', srcset); + $imageEl.removeAttr('data-srcset'); + } + if (sizes) { + $imageEl.attr('sizes', sizes); + $imageEl.removeAttr('data-sizes'); + } + if (src) { + $imageEl.attr('src', src); + $imageEl.removeAttr('data-src'); + } + } + + $imageEl.addClass(params.loadedClass).removeClass(params.loadingClass); + $slideEl.find(("." + (params.preloaderClass))).remove(); + if (swiper.params.loop && loadInDuplicate) { + var slideOriginalIndex = $slideEl.attr('data-swiper-slide-index'); + if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) { + var originalSlide = swiper.$wrapperEl.children(("[data-swiper-slide-index=\"" + slideOriginalIndex + "\"]:not(." + (swiper.params.slideDuplicateClass) + ")")); + swiper.lazy.loadInSlide(originalSlide.index(), false); + } else { + var duplicatedSlide = swiper.$wrapperEl.children(("." + (swiper.params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + slideOriginalIndex + "\"]")); + swiper.lazy.loadInSlide(duplicatedSlide.index(), false); + } + } + swiper.emit('lazyImageReady', $slideEl[0], $imageEl[0]); + }); + + swiper.emit('lazyImageLoad', $slideEl[0], $imageEl[0]); + }); + }, + load: function load() { + var swiper = this; + var $wrapperEl = swiper.$wrapperEl; + var swiperParams = swiper.params; + var slides = swiper.slides; + var activeIndex = swiper.activeIndex; + var isVirtual = swiper.virtual && swiperParams.virtual.enabled; + var params = swiperParams.lazy; + + var slidesPerView = swiperParams.slidesPerView; + if (slidesPerView === 'auto') { + slidesPerView = 0; + } + + function slideExist(index) { + if (isVirtual) { + if ($wrapperEl.children(("." + (swiperParams.slideClass) + "[data-swiper-slide-index=\"" + index + "\"]")).length) { + return true; + } + } else if (slides[index]) { return true; } + return false; + } + function slideIndex(slideEl) { + if (isVirtual) { + return $(slideEl).attr('data-swiper-slide-index'); + } + return $(slideEl).index(); + } + + if (!swiper.lazy.initialImageLoaded) { swiper.lazy.initialImageLoaded = true; } + if (swiper.params.watchSlidesVisibility) { + $wrapperEl.children(("." + (swiperParams.slideVisibleClass))).each(function (elIndex, slideEl) { + var index = isVirtual ? $(slideEl).attr('data-swiper-slide-index') : $(slideEl).index(); + swiper.lazy.loadInSlide(index); + }); + } else if (slidesPerView > 1) { + for (var i = activeIndex; i < activeIndex + slidesPerView; i += 1) { + if (slideExist(i)) { swiper.lazy.loadInSlide(i); } + } + } else { + swiper.lazy.loadInSlide(activeIndex); + } + if (params.loadPrevNext) { + if (slidesPerView > 1 || (params.loadPrevNextAmount && params.loadPrevNextAmount > 1)) { + var amount = params.loadPrevNextAmount; + var spv = slidesPerView; + var maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length); + var minIndex = Math.max(activeIndex - Math.max(spv, amount), 0); + // Next Slides + for (var i$1 = activeIndex + slidesPerView; i$1 < maxIndex; i$1 += 1) { + if (slideExist(i$1)) { swiper.lazy.loadInSlide(i$1); } + } + // Prev Slides + for (var i$2 = minIndex; i$2 < activeIndex; i$2 += 1) { + if (slideExist(i$2)) { swiper.lazy.loadInSlide(i$2); } + } + } else { + var nextSlide = $wrapperEl.children(("." + (swiperParams.slideNextClass))); + if (nextSlide.length > 0) { swiper.lazy.loadInSlide(slideIndex(nextSlide)); } + + var prevSlide = $wrapperEl.children(("." + (swiperParams.slidePrevClass))); + if (prevSlide.length > 0) { swiper.lazy.loadInSlide(slideIndex(prevSlide)); } + } + } + }, + }; + + var Lazy$1 = { + name: 'lazy', + params: { + lazy: { + enabled: false, + loadPrevNext: false, + loadPrevNextAmount: 1, + loadOnTransitionStart: false, + + elementClass: 'swiper-lazy', + loadingClass: 'swiper-lazy-loading', + loadedClass: 'swiper-lazy-loaded', + preloaderClass: 'swiper-lazy-preloader', + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + lazy: { + initialImageLoaded: false, + load: Lazy.load.bind(swiper), + loadInSlide: Lazy.loadInSlide.bind(swiper), + }, + }); + }, + on: { + beforeInit: function beforeInit() { + var swiper = this; + if (swiper.params.lazy.enabled && swiper.params.preloadImages) { + swiper.params.preloadImages = false; + } + }, + init: function init() { + var swiper = this; + if (swiper.params.lazy.enabled && !swiper.params.loop && swiper.params.initialSlide === 0) { + swiper.lazy.load(); + } + }, + scroll: function scroll() { + var swiper = this; + if (swiper.params.freeMode && !swiper.params.freeModeSticky) { + swiper.lazy.load(); + } + }, + resize: function resize() { + var swiper = this; + if (swiper.params.lazy.enabled) { + swiper.lazy.load(); + } + }, + scrollbarDragMove: function scrollbarDragMove() { + var swiper = this; + if (swiper.params.lazy.enabled) { + swiper.lazy.load(); + } + }, + transitionStart: function transitionStart() { + var swiper = this; + if (swiper.params.lazy.enabled) { + if (swiper.params.lazy.loadOnTransitionStart || (!swiper.params.lazy.loadOnTransitionStart && !swiper.lazy.initialImageLoaded)) { + swiper.lazy.load(); + } + } + }, + transitionEnd: function transitionEnd() { + var swiper = this; + if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) { + swiper.lazy.load(); + } + }, + slideChange: function slideChange() { + var swiper = this; + if (swiper.params.lazy.enabled && swiper.params.cssMode) { + swiper.lazy.load(); + } + }, + }, + }; + + /* eslint no-bitwise: ["error", { "allow": [">>"] }] */ + + var Controller = { + LinearSpline: function LinearSpline(x, y) { + var binarySearch = (function search() { + var maxIndex; + var minIndex; + var guess; + return function (array, val) { + minIndex = -1; + maxIndex = array.length; + while (maxIndex - minIndex > 1) { + guess = maxIndex + minIndex >> 1; + if (array[guess] <= val) { + minIndex = guess; + } else { + maxIndex = guess; + } + } + return maxIndex; + }; + }()); + this.x = x; + this.y = y; + this.lastIndex = x.length - 1; + // Given an x value (x2), return the expected y2 value: + // (x1,y1) is the known point before given value, + // (x3,y3) is the known point after given value. + var i1; + var i3; + + this.interpolate = function interpolate(x2) { + if (!x2) { return 0; } + + // Get the indexes of x1 and x3 (the array indexes before and after given x2): + i3 = binarySearch(this.x, x2); + i1 = i3 - 1; + + // We have our indexes i1 & i3, so we can calculate already: + // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1 + return (((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1])) + this.y[i1]; + }; + return this; + }, + // xxx: for now i will just save one spline function to to + getInterpolateFunction: function getInterpolateFunction(c) { + var swiper = this; + if (!swiper.controller.spline) { + swiper.controller.spline = swiper.params.loop + ? new Controller.LinearSpline(swiper.slidesGrid, c.slidesGrid) + : new Controller.LinearSpline(swiper.snapGrid, c.snapGrid); + } + }, + setTranslate: function setTranslate(setTranslate$1, byController) { + var swiper = this; + var controlled = swiper.controller.control; + var multiplier; + var controlledTranslate; + function setControlledTranslate(c) { + // this will create an Interpolate function based on the snapGrids + // x is the Grid of the scrolled scroller and y will be the controlled scroller + // it makes sense to create this only once and recall it for the interpolation + // the function does a lot of value caching for performance + var translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate; + if (swiper.params.controller.by === 'slide') { + swiper.controller.getInterpolateFunction(c); + // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid + // but it did not work out + controlledTranslate = -swiper.controller.spline.interpolate(-translate); + } + + if (!controlledTranslate || swiper.params.controller.by === 'container') { + multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate()); + controlledTranslate = ((translate - swiper.minTranslate()) * multiplier) + c.minTranslate(); + } + + if (swiper.params.controller.inverse) { + controlledTranslate = c.maxTranslate() - controlledTranslate; + } + c.updateProgress(controlledTranslate); + c.setTranslate(controlledTranslate, swiper); + c.updateActiveIndex(); + c.updateSlidesClasses(); + } + if (Array.isArray(controlled)) { + for (var i = 0; i < controlled.length; i += 1) { + if (controlled[i] !== byController && controlled[i] instanceof Swiper) { + setControlledTranslate(controlled[i]); + } + } + } else if (controlled instanceof Swiper && byController !== controlled) { + setControlledTranslate(controlled); + } + }, + setTransition: function setTransition(duration, byController) { + var swiper = this; + var controlled = swiper.controller.control; + var i; + function setControlledTransition(c) { + c.setTransition(duration, swiper); + if (duration !== 0) { + c.transitionStart(); + if (c.params.autoHeight) { + Utils.nextTick(function () { + c.updateAutoHeight(); + }); + } + c.$wrapperEl.transitionEnd(function () { + if (!controlled) { return; } + if (c.params.loop && swiper.params.controller.by === 'slide') { + c.loopFix(); + } + c.transitionEnd(); + }); + } + } + if (Array.isArray(controlled)) { + for (i = 0; i < controlled.length; i += 1) { + if (controlled[i] !== byController && controlled[i] instanceof Swiper) { + setControlledTransition(controlled[i]); + } + } + } else if (controlled instanceof Swiper && byController !== controlled) { + setControlledTransition(controlled); + } + }, + }; + var Controller$1 = { + name: 'controller', + params: { + controller: { + control: undefined, + inverse: false, + by: 'slide', // or 'container' + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + controller: { + control: swiper.params.controller.control, + getInterpolateFunction: Controller.getInterpolateFunction.bind(swiper), + setTranslate: Controller.setTranslate.bind(swiper), + setTransition: Controller.setTransition.bind(swiper), + }, + }); + }, + on: { + update: function update() { + var swiper = this; + if (!swiper.controller.control) { return; } + if (swiper.controller.spline) { + swiper.controller.spline = undefined; + delete swiper.controller.spline; + } + }, + resize: function resize() { + var swiper = this; + if (!swiper.controller.control) { return; } + if (swiper.controller.spline) { + swiper.controller.spline = undefined; + delete swiper.controller.spline; + } + }, + observerUpdate: function observerUpdate() { + var swiper = this; + if (!swiper.controller.control) { return; } + if (swiper.controller.spline) { + swiper.controller.spline = undefined; + delete swiper.controller.spline; + } + }, + setTranslate: function setTranslate(translate, byController) { + var swiper = this; + if (!swiper.controller.control) { return; } + swiper.controller.setTranslate(translate, byController); + }, + setTransition: function setTransition(duration, byController) { + var swiper = this; + if (!swiper.controller.control) { return; } + swiper.controller.setTransition(duration, byController); + }, + }, + }; + + var a11y = { + makeElFocusable: function makeElFocusable($el) { + $el.attr('tabIndex', '0'); + return $el; + }, + addElRole: function addElRole($el, role) { + $el.attr('role', role); + return $el; + }, + addElLabel: function addElLabel($el, label) { + $el.attr('aria-label', label); + return $el; + }, + disableEl: function disableEl($el) { + $el.attr('aria-disabled', true); + return $el; + }, + enableEl: function enableEl($el) { + $el.attr('aria-disabled', false); + return $el; + }, + onEnterKey: function onEnterKey(e) { + var swiper = this; + var params = swiper.params.a11y; + if (e.keyCode !== 13) { return; } + var $targetEl = $(e.target); + if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) { + if (!(swiper.isEnd && !swiper.params.loop)) { + swiper.slideNext(); + } + if (swiper.isEnd) { + swiper.a11y.notify(params.lastSlideMessage); + } else { + swiper.a11y.notify(params.nextSlideMessage); + } + } + if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) { + if (!(swiper.isBeginning && !swiper.params.loop)) { + swiper.slidePrev(); + } + if (swiper.isBeginning) { + swiper.a11y.notify(params.firstSlideMessage); + } else { + swiper.a11y.notify(params.prevSlideMessage); + } + } + if (swiper.pagination && $targetEl.is(("." + (swiper.params.pagination.bulletClass)))) { + $targetEl[0].click(); + } + }, + notify: function notify(message) { + var swiper = this; + var notification = swiper.a11y.liveRegion; + if (notification.length === 0) { return; } + notification.html(''); + notification.html(message); + }, + updateNavigation: function updateNavigation() { + var swiper = this; + + if (swiper.params.loop || !swiper.navigation) { return; } + var ref = swiper.navigation; + var $nextEl = ref.$nextEl; + var $prevEl = ref.$prevEl; + + if ($prevEl && $prevEl.length > 0) { + if (swiper.isBeginning) { + swiper.a11y.disableEl($prevEl); + } else { + swiper.a11y.enableEl($prevEl); + } + } + if ($nextEl && $nextEl.length > 0) { + if (swiper.isEnd) { + swiper.a11y.disableEl($nextEl); + } else { + swiper.a11y.enableEl($nextEl); + } + } + }, + updatePagination: function updatePagination() { + var swiper = this; + var params = swiper.params.a11y; + if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) { + swiper.pagination.bullets.each(function (bulletIndex, bulletEl) { + var $bulletEl = $(bulletEl); + swiper.a11y.makeElFocusable($bulletEl); + swiper.a11y.addElRole($bulletEl, 'button'); + swiper.a11y.addElLabel($bulletEl, params.paginationBulletMessage.replace(/{{index}}/, $bulletEl.index() + 1)); + }); + } + }, + init: function init() { + var swiper = this; + + swiper.$el.append(swiper.a11y.liveRegion); + + // Navigation + var params = swiper.params.a11y; + var $nextEl; + var $prevEl; + if (swiper.navigation && swiper.navigation.$nextEl) { + $nextEl = swiper.navigation.$nextEl; + } + if (swiper.navigation && swiper.navigation.$prevEl) { + $prevEl = swiper.navigation.$prevEl; + } + if ($nextEl) { + swiper.a11y.makeElFocusable($nextEl); + swiper.a11y.addElRole($nextEl, 'button'); + swiper.a11y.addElLabel($nextEl, params.nextSlideMessage); + $nextEl.on('keydown', swiper.a11y.onEnterKey); + } + if ($prevEl) { + swiper.a11y.makeElFocusable($prevEl); + swiper.a11y.addElRole($prevEl, 'button'); + swiper.a11y.addElLabel($prevEl, params.prevSlideMessage); + $prevEl.on('keydown', swiper.a11y.onEnterKey); + } + + // Pagination + if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) { + swiper.pagination.$el.on('keydown', ("." + (swiper.params.pagination.bulletClass)), swiper.a11y.onEnterKey); + } + }, + destroy: function destroy() { + var swiper = this; + if (swiper.a11y.liveRegion && swiper.a11y.liveRegion.length > 0) { swiper.a11y.liveRegion.remove(); } + + var $nextEl; + var $prevEl; + if (swiper.navigation && swiper.navigation.$nextEl) { + $nextEl = swiper.navigation.$nextEl; + } + if (swiper.navigation && swiper.navigation.$prevEl) { + $prevEl = swiper.navigation.$prevEl; + } + if ($nextEl) { + $nextEl.off('keydown', swiper.a11y.onEnterKey); + } + if ($prevEl) { + $prevEl.off('keydown', swiper.a11y.onEnterKey); + } + + // Pagination + if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) { + swiper.pagination.$el.off('keydown', ("." + (swiper.params.pagination.bulletClass)), swiper.a11y.onEnterKey); + } + }, + }; + var A11y = { + name: 'a11y', + params: { + a11y: { + enabled: true, + notificationClass: 'swiper-notification', + prevSlideMessage: 'Previous slide', + nextSlideMessage: 'Next slide', + firstSlideMessage: 'This is the first slide', + lastSlideMessage: 'This is the last slide', + paginationBulletMessage: 'Go to slide {{index}}', + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + a11y: { + liveRegion: $(("")), + }, + }); + Object.keys(a11y).forEach(function (methodName) { + swiper.a11y[methodName] = a11y[methodName].bind(swiper); + }); + }, + on: { + init: function init() { + var swiper = this; + if (!swiper.params.a11y.enabled) { return; } + swiper.a11y.init(); + swiper.a11y.updateNavigation(); + }, + toEdge: function toEdge() { + var swiper = this; + if (!swiper.params.a11y.enabled) { return; } + swiper.a11y.updateNavigation(); + }, + fromEdge: function fromEdge() { + var swiper = this; + if (!swiper.params.a11y.enabled) { return; } + swiper.a11y.updateNavigation(); + }, + paginationUpdate: function paginationUpdate() { + var swiper = this; + if (!swiper.params.a11y.enabled) { return; } + swiper.a11y.updatePagination(); + }, + destroy: function destroy() { + var swiper = this; + if (!swiper.params.a11y.enabled) { return; } + swiper.a11y.destroy(); + }, + }, + }; + + var History = { + init: function init() { + var swiper = this; + if (!swiper.params.history) { return; } + if (!win.history || !win.history.pushState) { + swiper.params.history.enabled = false; + swiper.params.hashNavigation.enabled = true; + return; + } + var history = swiper.history; + history.initialized = true; + history.paths = History.getPathValues(); + if (!history.paths.key && !history.paths.value) { return; } + history.scrollToSlide(0, history.paths.value, swiper.params.runCallbacksOnInit); + if (!swiper.params.history.replaceState) { + win.addEventListener('popstate', swiper.history.setHistoryPopState); + } + }, + destroy: function destroy() { + var swiper = this; + if (!swiper.params.history.replaceState) { + win.removeEventListener('popstate', swiper.history.setHistoryPopState); + } + }, + setHistoryPopState: function setHistoryPopState() { + var swiper = this; + swiper.history.paths = History.getPathValues(); + swiper.history.scrollToSlide(swiper.params.speed, swiper.history.paths.value, false); + }, + getPathValues: function getPathValues() { + var pathArray = win.location.pathname.slice(1).split('/').filter(function (part) { return part !== ''; }); + var total = pathArray.length; + var key = pathArray[total - 2]; + var value = pathArray[total - 1]; + return { key: key, value: value }; + }, + setHistory: function setHistory(key, index) { + var swiper = this; + if (!swiper.history.initialized || !swiper.params.history.enabled) { return; } + var slide = swiper.slides.eq(index); + var value = History.slugify(slide.attr('data-history')); + if (!win.location.pathname.includes(key)) { + value = key + "/" + value; + } + var currentState = win.history.state; + if (currentState && currentState.value === value) { + return; + } + if (swiper.params.history.replaceState) { + win.history.replaceState({ value: value }, null, value); + } else { + win.history.pushState({ value: value }, null, value); + } + }, + slugify: function slugify(text) { + return text.toString() + .replace(/\s+/g, '-') + .replace(/[^\w-]+/g, '') + .replace(/--+/g, '-') + .replace(/^-+/, '') + .replace(/-+$/, ''); + }, + scrollToSlide: function scrollToSlide(speed, value, runCallbacks) { + var swiper = this; + if (value) { + for (var i = 0, length = swiper.slides.length; i < length; i += 1) { + var slide = swiper.slides.eq(i); + var slideHistory = History.slugify(slide.attr('data-history')); + if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) { + var index = slide.index(); + swiper.slideTo(index, speed, runCallbacks); + } + } + } else { + swiper.slideTo(0, speed, runCallbacks); + } + }, + }; + + var History$1 = { + name: 'history', + params: { + history: { + enabled: false, + replaceState: false, + key: 'slides', + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + history: { + init: History.init.bind(swiper), + setHistory: History.setHistory.bind(swiper), + setHistoryPopState: History.setHistoryPopState.bind(swiper), + scrollToSlide: History.scrollToSlide.bind(swiper), + destroy: History.destroy.bind(swiper), + }, + }); + }, + on: { + init: function init() { + var swiper = this; + if (swiper.params.history.enabled) { + swiper.history.init(); + } + }, + destroy: function destroy() { + var swiper = this; + if (swiper.params.history.enabled) { + swiper.history.destroy(); + } + }, + transitionEnd: function transitionEnd() { + var swiper = this; + if (swiper.history.initialized) { + swiper.history.setHistory(swiper.params.history.key, swiper.activeIndex); + } + }, + slideChange: function slideChange() { + var swiper = this; + if (swiper.history.initialized && swiper.params.cssMode) { + swiper.history.setHistory(swiper.params.history.key, swiper.activeIndex); + } + }, + }, + }; + + var HashNavigation = { + onHashCange: function onHashCange() { + var swiper = this; + var newHash = doc.location.hash.replace('#', ''); + var activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash'); + if (newHash !== activeSlideHash) { + var newIndex = swiper.$wrapperEl.children(("." + (swiper.params.slideClass) + "[data-hash=\"" + newHash + "\"]")).index(); + if (typeof newIndex === 'undefined') { return; } + swiper.slideTo(newIndex); + } + }, + setHash: function setHash() { + var swiper = this; + if (!swiper.hashNavigation.initialized || !swiper.params.hashNavigation.enabled) { return; } + if (swiper.params.hashNavigation.replaceState && win.history && win.history.replaceState) { + win.history.replaceState(null, null, (("#" + (swiper.slides.eq(swiper.activeIndex).attr('data-hash'))) || '')); + } else { + var slide = swiper.slides.eq(swiper.activeIndex); + var hash = slide.attr('data-hash') || slide.attr('data-history'); + doc.location.hash = hash || ''; + } + }, + init: function init() { + var swiper = this; + if (!swiper.params.hashNavigation.enabled || (swiper.params.history && swiper.params.history.enabled)) { return; } + swiper.hashNavigation.initialized = true; + var hash = doc.location.hash.replace('#', ''); + if (hash) { + var speed = 0; + for (var i = 0, length = swiper.slides.length; i < length; i += 1) { + var slide = swiper.slides.eq(i); + var slideHash = slide.attr('data-hash') || slide.attr('data-history'); + if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) { + var index = slide.index(); + swiper.slideTo(index, speed, swiper.params.runCallbacksOnInit, true); + } + } + } + if (swiper.params.hashNavigation.watchState) { + $(win).on('hashchange', swiper.hashNavigation.onHashCange); + } + }, + destroy: function destroy() { + var swiper = this; + if (swiper.params.hashNavigation.watchState) { + $(win).off('hashchange', swiper.hashNavigation.onHashCange); + } + }, + }; + var HashNavigation$1 = { + name: 'hash-navigation', + params: { + hashNavigation: { + enabled: false, + replaceState: false, + watchState: false, + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + hashNavigation: { + initialized: false, + init: HashNavigation.init.bind(swiper), + destroy: HashNavigation.destroy.bind(swiper), + setHash: HashNavigation.setHash.bind(swiper), + onHashCange: HashNavigation.onHashCange.bind(swiper), + }, + }); + }, + on: { + init: function init() { + var swiper = this; + if (swiper.params.hashNavigation.enabled) { + swiper.hashNavigation.init(); + } + }, + destroy: function destroy() { + var swiper = this; + if (swiper.params.hashNavigation.enabled) { + swiper.hashNavigation.destroy(); + } + }, + transitionEnd: function transitionEnd() { + var swiper = this; + if (swiper.hashNavigation.initialized) { + swiper.hashNavigation.setHash(); + } + }, + slideChange: function slideChange() { + var swiper = this; + if (swiper.hashNavigation.initialized && swiper.params.cssMode) { + swiper.hashNavigation.setHash(); + } + }, + }, + }; + + /* eslint no-underscore-dangle: "off" */ + + var Autoplay = { + run: function run() { + var swiper = this; + var $activeSlideEl = swiper.slides.eq(swiper.activeIndex); + var delay = swiper.params.autoplay.delay; + if ($activeSlideEl.attr('data-swiper-autoplay')) { + delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay; + } + clearTimeout(swiper.autoplay.timeout); + swiper.autoplay.timeout = Utils.nextTick(function () { + if (swiper.params.autoplay.reverseDirection) { + if (swiper.params.loop) { + swiper.loopFix(); + swiper.slidePrev(swiper.params.speed, true, true); + swiper.emit('autoplay'); + } else if (!swiper.isBeginning) { + swiper.slidePrev(swiper.params.speed, true, true); + swiper.emit('autoplay'); + } else if (!swiper.params.autoplay.stopOnLastSlide) { + swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true); + swiper.emit('autoplay'); + } else { + swiper.autoplay.stop(); + } + } else if (swiper.params.loop) { + swiper.loopFix(); + swiper.slideNext(swiper.params.speed, true, true); + swiper.emit('autoplay'); + } else if (!swiper.isEnd) { + swiper.slideNext(swiper.params.speed, true, true); + swiper.emit('autoplay'); + } else if (!swiper.params.autoplay.stopOnLastSlide) { + swiper.slideTo(0, swiper.params.speed, true, true); + swiper.emit('autoplay'); + } else { + swiper.autoplay.stop(); + } + if (swiper.params.cssMode && swiper.autoplay.running) { swiper.autoplay.run(); } + }, delay); + }, + start: function start() { + var swiper = this; + if (typeof swiper.autoplay.timeout !== 'undefined') { return false; } + if (swiper.autoplay.running) { return false; } + swiper.autoplay.running = true; + swiper.emit('autoplayStart'); + swiper.autoplay.run(); + return true; + }, + stop: function stop() { + var swiper = this; + if (!swiper.autoplay.running) { return false; } + if (typeof swiper.autoplay.timeout === 'undefined') { return false; } + + if (swiper.autoplay.timeout) { + clearTimeout(swiper.autoplay.timeout); + swiper.autoplay.timeout = undefined; + } + swiper.autoplay.running = false; + swiper.emit('autoplayStop'); + return true; + }, + pause: function pause(speed) { + var swiper = this; + if (!swiper.autoplay.running) { return; } + if (swiper.autoplay.paused) { return; } + if (swiper.autoplay.timeout) { clearTimeout(swiper.autoplay.timeout); } + swiper.autoplay.paused = true; + if (speed === 0 || !swiper.params.autoplay.waitForTransition) { + swiper.autoplay.paused = false; + swiper.autoplay.run(); + } else { + swiper.$wrapperEl[0].addEventListener('transitionend', swiper.autoplay.onTransitionEnd); + swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd); + } + }, + }; + + var Autoplay$1 = { + name: 'autoplay', + params: { + autoplay: { + enabled: false, + delay: 3000, + waitForTransition: true, + disableOnInteraction: true, + stopOnLastSlide: false, + reverseDirection: false, + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + autoplay: { + running: false, + paused: false, + run: Autoplay.run.bind(swiper), + start: Autoplay.start.bind(swiper), + stop: Autoplay.stop.bind(swiper), + pause: Autoplay.pause.bind(swiper), + onVisibilityChange: function onVisibilityChange() { + if (document.visibilityState === 'hidden' && swiper.autoplay.running) { + swiper.autoplay.pause(); + } + if (document.visibilityState === 'visible' && swiper.autoplay.paused) { + swiper.autoplay.run(); + swiper.autoplay.paused = false; + } + }, + onTransitionEnd: function onTransitionEnd(e) { + if (!swiper || swiper.destroyed || !swiper.$wrapperEl) { return; } + if (e.target !== this) { return; } + swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.autoplay.onTransitionEnd); + swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd); + swiper.autoplay.paused = false; + if (!swiper.autoplay.running) { + swiper.autoplay.stop(); + } else { + swiper.autoplay.run(); + } + }, + }, + }); + }, + on: { + init: function init() { + var swiper = this; + if (swiper.params.autoplay.enabled) { + swiper.autoplay.start(); + document.addEventListener('visibilitychange', swiper.autoplay.onVisibilityChange); + } + }, + beforeTransitionStart: function beforeTransitionStart(speed, internal) { + var swiper = this; + if (swiper.autoplay.running) { + if (internal || !swiper.params.autoplay.disableOnInteraction) { + swiper.autoplay.pause(speed); + } else { + swiper.autoplay.stop(); + } + } + }, + sliderFirstMove: function sliderFirstMove() { + var swiper = this; + if (swiper.autoplay.running) { + if (swiper.params.autoplay.disableOnInteraction) { + swiper.autoplay.stop(); + } else { + swiper.autoplay.pause(); + } + } + }, + touchEnd: function touchEnd() { + var swiper = this; + if (swiper.params.cssMode && swiper.autoplay.paused && !swiper.params.autoplay.disableOnInteraction) { + swiper.autoplay.run(); + } + }, + destroy: function destroy() { + var swiper = this; + if (swiper.autoplay.running) { + swiper.autoplay.stop(); + } + document.removeEventListener('visibilitychange', swiper.autoplay.onVisibilityChange); + }, + }, + }; + + var Fade = { + setTranslate: function setTranslate() { + var swiper = this; + var slides = swiper.slides; + for (var i = 0; i < slides.length; i += 1) { + var $slideEl = swiper.slides.eq(i); + var offset = $slideEl[0].swiperSlideOffset; + var tx = -offset; + if (!swiper.params.virtualTranslate) { tx -= swiper.translate; } + var ty = 0; + if (!swiper.isHorizontal()) { + ty = tx; + tx = 0; + } + var slideOpacity = swiper.params.fadeEffect.crossFade + ? Math.max(1 - Math.abs($slideEl[0].progress), 0) + : 1 + Math.min(Math.max($slideEl[0].progress, -1), 0); + $slideEl + .css({ + opacity: slideOpacity, + }) + .transform(("translate3d(" + tx + "px, " + ty + "px, 0px)")); + } + }, + setTransition: function setTransition(duration) { + var swiper = this; + var slides = swiper.slides; + var $wrapperEl = swiper.$wrapperEl; + slides.transition(duration); + if (swiper.params.virtualTranslate && duration !== 0) { + var eventTriggered = false; + slides.transitionEnd(function () { + if (eventTriggered) { return; } + if (!swiper || swiper.destroyed) { return; } + eventTriggered = true; + swiper.animating = false; + var triggerEvents = ['webkitTransitionEnd', 'transitionend']; + for (var i = 0; i < triggerEvents.length; i += 1) { + $wrapperEl.trigger(triggerEvents[i]); + } + }); + } + }, + }; + + var EffectFade = { + name: 'effect-fade', + params: { + fadeEffect: { + crossFade: false, + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + fadeEffect: { + setTranslate: Fade.setTranslate.bind(swiper), + setTransition: Fade.setTransition.bind(swiper), + }, + }); + }, + on: { + beforeInit: function beforeInit() { + var swiper = this; + if (swiper.params.effect !== 'fade') { return; } + swiper.classNames.push(((swiper.params.containerModifierClass) + "fade")); + var overwriteParams = { + slidesPerView: 1, + slidesPerColumn: 1, + slidesPerGroup: 1, + watchSlidesProgress: true, + spaceBetween: 0, + virtualTranslate: true, + }; + Utils.extend(swiper.params, overwriteParams); + Utils.extend(swiper.originalParams, overwriteParams); + }, + setTranslate: function setTranslate() { + var swiper = this; + if (swiper.params.effect !== 'fade') { return; } + swiper.fadeEffect.setTranslate(); + }, + setTransition: function setTransition(duration) { + var swiper = this; + if (swiper.params.effect !== 'fade') { return; } + swiper.fadeEffect.setTransition(duration); + }, + }, + }; + + var Cube = { + setTranslate: function setTranslate() { + var swiper = this; + var $el = swiper.$el; + var $wrapperEl = swiper.$wrapperEl; + var slides = swiper.slides; + var swiperWidth = swiper.width; + var swiperHeight = swiper.height; + var rtl = swiper.rtlTranslate; + var swiperSize = swiper.size; + var params = swiper.params.cubeEffect; + var isHorizontal = swiper.isHorizontal(); + var isVirtual = swiper.virtual && swiper.params.virtual.enabled; + var wrapperRotate = 0; + var $cubeShadowEl; + if (params.shadow) { + if (isHorizontal) { + $cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow'); + if ($cubeShadowEl.length === 0) { + $cubeShadowEl = $('
      '); + $wrapperEl.append($cubeShadowEl); + } + $cubeShadowEl.css({ height: (swiperWidth + "px") }); + } else { + $cubeShadowEl = $el.find('.swiper-cube-shadow'); + if ($cubeShadowEl.length === 0) { + $cubeShadowEl = $('
      '); + $el.append($cubeShadowEl); + } + } + } + for (var i = 0; i < slides.length; i += 1) { + var $slideEl = slides.eq(i); + var slideIndex = i; + if (isVirtual) { + slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10); + } + var slideAngle = slideIndex * 90; + var round = Math.floor(slideAngle / 360); + if (rtl) { + slideAngle = -slideAngle; + round = Math.floor(-slideAngle / 360); + } + var progress = Math.max(Math.min($slideEl[0].progress, 1), -1); + var tx = 0; + var ty = 0; + var tz = 0; + if (slideIndex % 4 === 0) { + tx = -round * 4 * swiperSize; + tz = 0; + } else if ((slideIndex - 1) % 4 === 0) { + tx = 0; + tz = -round * 4 * swiperSize; + } else if ((slideIndex - 2) % 4 === 0) { + tx = swiperSize + (round * 4 * swiperSize); + tz = swiperSize; + } else if ((slideIndex - 3) % 4 === 0) { + tx = -swiperSize; + tz = (3 * swiperSize) + (swiperSize * 4 * round); + } + if (rtl) { + tx = -tx; + } + + if (!isHorizontal) { + ty = tx; + tx = 0; + } + + var transform = "rotateX(" + (isHorizontal ? 0 : -slideAngle) + "deg) rotateY(" + (isHorizontal ? slideAngle : 0) + "deg) translate3d(" + tx + "px, " + ty + "px, " + tz + "px)"; + if (progress <= 1 && progress > -1) { + wrapperRotate = (slideIndex * 90) + (progress * 90); + if (rtl) { wrapperRotate = (-slideIndex * 90) - (progress * 90); } + } + $slideEl.transform(transform); + if (params.slideShadows) { + // Set shadows + var shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); + var shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); + if (shadowBefore.length === 0) { + shadowBefore = $(("
      ")); + $slideEl.append(shadowBefore); + } + if (shadowAfter.length === 0) { + shadowAfter = $(("
      ")); + $slideEl.append(shadowAfter); + } + if (shadowBefore.length) { shadowBefore[0].style.opacity = Math.max(-progress, 0); } + if (shadowAfter.length) { shadowAfter[0].style.opacity = Math.max(progress, 0); } + } + } + $wrapperEl.css({ + '-webkit-transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"), + '-moz-transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"), + '-ms-transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"), + 'transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"), + }); + + if (params.shadow) { + if (isHorizontal) { + $cubeShadowEl.transform(("translate3d(0px, " + ((swiperWidth / 2) + params.shadowOffset) + "px, " + (-swiperWidth / 2) + "px) rotateX(90deg) rotateZ(0deg) scale(" + (params.shadowScale) + ")")); + } else { + var shadowAngle = Math.abs(wrapperRotate) - (Math.floor(Math.abs(wrapperRotate) / 90) * 90); + var multiplier = 1.5 - ( + (Math.sin((shadowAngle * 2 * Math.PI) / 360) / 2) + + (Math.cos((shadowAngle * 2 * Math.PI) / 360) / 2) + ); + var scale1 = params.shadowScale; + var scale2 = params.shadowScale / multiplier; + var offset = params.shadowOffset; + $cubeShadowEl.transform(("scale3d(" + scale1 + ", 1, " + scale2 + ") translate3d(0px, " + ((swiperHeight / 2) + offset) + "px, " + (-swiperHeight / 2 / scale2) + "px) rotateX(-90deg)")); + } + } + var zFactor = (Browser.isSafari || Browser.isUiWebView) ? (-swiperSize / 2) : 0; + $wrapperEl + .transform(("translate3d(0px,0," + zFactor + "px) rotateX(" + (swiper.isHorizontal() ? 0 : wrapperRotate) + "deg) rotateY(" + (swiper.isHorizontal() ? -wrapperRotate : 0) + "deg)")); + }, + setTransition: function setTransition(duration) { + var swiper = this; + var $el = swiper.$el; + var slides = swiper.slides; + slides + .transition(duration) + .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left') + .transition(duration); + if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) { + $el.find('.swiper-cube-shadow').transition(duration); + } + }, + }; + + var EffectCube = { + name: 'effect-cube', + params: { + cubeEffect: { + slideShadows: true, + shadow: true, + shadowOffset: 20, + shadowScale: 0.94, + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + cubeEffect: { + setTranslate: Cube.setTranslate.bind(swiper), + setTransition: Cube.setTransition.bind(swiper), + }, + }); + }, + on: { + beforeInit: function beforeInit() { + var swiper = this; + if (swiper.params.effect !== 'cube') { return; } + swiper.classNames.push(((swiper.params.containerModifierClass) + "cube")); + swiper.classNames.push(((swiper.params.containerModifierClass) + "3d")); + var overwriteParams = { + slidesPerView: 1, + slidesPerColumn: 1, + slidesPerGroup: 1, + watchSlidesProgress: true, + resistanceRatio: 0, + spaceBetween: 0, + centeredSlides: false, + virtualTranslate: true, + }; + Utils.extend(swiper.params, overwriteParams); + Utils.extend(swiper.originalParams, overwriteParams); + }, + setTranslate: function setTranslate() { + var swiper = this; + if (swiper.params.effect !== 'cube') { return; } + swiper.cubeEffect.setTranslate(); + }, + setTransition: function setTransition(duration) { + var swiper = this; + if (swiper.params.effect !== 'cube') { return; } + swiper.cubeEffect.setTransition(duration); + }, + }, + }; + + var Flip = { + setTranslate: function setTranslate() { + var swiper = this; + var slides = swiper.slides; + var rtl = swiper.rtlTranslate; + for (var i = 0; i < slides.length; i += 1) { + var $slideEl = slides.eq(i); + var progress = $slideEl[0].progress; + if (swiper.params.flipEffect.limitRotation) { + progress = Math.max(Math.min($slideEl[0].progress, 1), -1); + } + var offset = $slideEl[0].swiperSlideOffset; + var rotate = -180 * progress; + var rotateY = rotate; + var rotateX = 0; + var tx = -offset; + var ty = 0; + if (!swiper.isHorizontal()) { + ty = tx; + tx = 0; + rotateX = -rotateY; + rotateY = 0; + } else if (rtl) { + rotateY = -rotateY; + } + + $slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length; + + if (swiper.params.flipEffect.slideShadows) { + // Set shadows + var shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); + var shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); + if (shadowBefore.length === 0) { + shadowBefore = $(("
      ")); + $slideEl.append(shadowBefore); + } + if (shadowAfter.length === 0) { + shadowAfter = $(("
      ")); + $slideEl.append(shadowAfter); + } + if (shadowBefore.length) { shadowBefore[0].style.opacity = Math.max(-progress, 0); } + if (shadowAfter.length) { shadowAfter[0].style.opacity = Math.max(progress, 0); } + } + $slideEl + .transform(("translate3d(" + tx + "px, " + ty + "px, 0px) rotateX(" + rotateX + "deg) rotateY(" + rotateY + "deg)")); + } + }, + setTransition: function setTransition(duration) { + var swiper = this; + var slides = swiper.slides; + var activeIndex = swiper.activeIndex; + var $wrapperEl = swiper.$wrapperEl; + slides + .transition(duration) + .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left') + .transition(duration); + if (swiper.params.virtualTranslate && duration !== 0) { + var eventTriggered = false; + // eslint-disable-next-line + slides.eq(activeIndex).transitionEnd(function onTransitionEnd() { + if (eventTriggered) { return; } + if (!swiper || swiper.destroyed) { return; } + // if (!$(this).hasClass(swiper.params.slideActiveClass)) return; + eventTriggered = true; + swiper.animating = false; + var triggerEvents = ['webkitTransitionEnd', 'transitionend']; + for (var i = 0; i < triggerEvents.length; i += 1) { + $wrapperEl.trigger(triggerEvents[i]); + } + }); + } + }, + }; + + var EffectFlip = { + name: 'effect-flip', + params: { + flipEffect: { + slideShadows: true, + limitRotation: true, + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + flipEffect: { + setTranslate: Flip.setTranslate.bind(swiper), + setTransition: Flip.setTransition.bind(swiper), + }, + }); + }, + on: { + beforeInit: function beforeInit() { + var swiper = this; + if (swiper.params.effect !== 'flip') { return; } + swiper.classNames.push(((swiper.params.containerModifierClass) + "flip")); + swiper.classNames.push(((swiper.params.containerModifierClass) + "3d")); + var overwriteParams = { + slidesPerView: 1, + slidesPerColumn: 1, + slidesPerGroup: 1, + watchSlidesProgress: true, + spaceBetween: 0, + virtualTranslate: true, + }; + Utils.extend(swiper.params, overwriteParams); + Utils.extend(swiper.originalParams, overwriteParams); + }, + setTranslate: function setTranslate() { + var swiper = this; + if (swiper.params.effect !== 'flip') { return; } + swiper.flipEffect.setTranslate(); + }, + setTransition: function setTransition(duration) { + var swiper = this; + if (swiper.params.effect !== 'flip') { return; } + swiper.flipEffect.setTransition(duration); + }, + }, + }; + + var Coverflow = { + setTranslate: function setTranslate() { + var swiper = this; + var swiperWidth = swiper.width; + var swiperHeight = swiper.height; + var slides = swiper.slides; + var $wrapperEl = swiper.$wrapperEl; + var slidesSizesGrid = swiper.slidesSizesGrid; + var params = swiper.params.coverflowEffect; + var isHorizontal = swiper.isHorizontal(); + var transform = swiper.translate; + var center = isHorizontal ? -transform + (swiperWidth / 2) : -transform + (swiperHeight / 2); + var rotate = isHorizontal ? params.rotate : -params.rotate; + var translate = params.depth; + // Each slide offset from center + for (var i = 0, length = slides.length; i < length; i += 1) { + var $slideEl = slides.eq(i); + var slideSize = slidesSizesGrid[i]; + var slideOffset = $slideEl[0].swiperSlideOffset; + var offsetMultiplier = ((center - slideOffset - (slideSize / 2)) / slideSize) * params.modifier; + + var rotateY = isHorizontal ? rotate * offsetMultiplier : 0; + var rotateX = isHorizontal ? 0 : rotate * offsetMultiplier; + // var rotateZ = 0 + var translateZ = -translate * Math.abs(offsetMultiplier); + + var translateY = isHorizontal ? 0 : params.stretch * (offsetMultiplier); + var translateX = isHorizontal ? params.stretch * (offsetMultiplier) : 0; + + // Fix for ultra small values + if (Math.abs(translateX) < 0.001) { translateX = 0; } + if (Math.abs(translateY) < 0.001) { translateY = 0; } + if (Math.abs(translateZ) < 0.001) { translateZ = 0; } + if (Math.abs(rotateY) < 0.001) { rotateY = 0; } + if (Math.abs(rotateX) < 0.001) { rotateX = 0; } + + var slideTransform = "translate3d(" + translateX + "px," + translateY + "px," + translateZ + "px) rotateX(" + rotateX + "deg) rotateY(" + rotateY + "deg)"; + + $slideEl.transform(slideTransform); + $slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1; + if (params.slideShadows) { + // Set shadows + var $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); + var $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); + if ($shadowBeforeEl.length === 0) { + $shadowBeforeEl = $(("
      ")); + $slideEl.append($shadowBeforeEl); + } + if ($shadowAfterEl.length === 0) { + $shadowAfterEl = $(("
      ")); + $slideEl.append($shadowAfterEl); + } + if ($shadowBeforeEl.length) { $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0; } + if ($shadowAfterEl.length) { $shadowAfterEl[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0; } + } + } + + // Set correct perspective for IE10 + if (Support.pointerEvents || Support.prefixedPointerEvents) { + var ws = $wrapperEl[0].style; + ws.perspectiveOrigin = center + "px 50%"; + } + }, + setTransition: function setTransition(duration) { + var swiper = this; + swiper.slides + .transition(duration) + .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left') + .transition(duration); + }, + }; + + var EffectCoverflow = { + name: 'effect-coverflow', + params: { + coverflowEffect: { + rotate: 50, + stretch: 0, + depth: 100, + modifier: 1, + slideShadows: true, + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + coverflowEffect: { + setTranslate: Coverflow.setTranslate.bind(swiper), + setTransition: Coverflow.setTransition.bind(swiper), + }, + }); + }, + on: { + beforeInit: function beforeInit() { + var swiper = this; + if (swiper.params.effect !== 'coverflow') { return; } + + swiper.classNames.push(((swiper.params.containerModifierClass) + "coverflow")); + swiper.classNames.push(((swiper.params.containerModifierClass) + "3d")); + + swiper.params.watchSlidesProgress = true; + swiper.originalParams.watchSlidesProgress = true; + }, + setTranslate: function setTranslate() { + var swiper = this; + if (swiper.params.effect !== 'coverflow') { return; } + swiper.coverflowEffect.setTranslate(); + }, + setTransition: function setTransition(duration) { + var swiper = this; + if (swiper.params.effect !== 'coverflow') { return; } + swiper.coverflowEffect.setTransition(duration); + }, + }, + }; + + var Thumbs = { + init: function init() { + var swiper = this; + var ref = swiper.params; + var thumbsParams = ref.thumbs; + var SwiperClass = swiper.constructor; + if (thumbsParams.swiper instanceof SwiperClass) { + swiper.thumbs.swiper = thumbsParams.swiper; + Utils.extend(swiper.thumbs.swiper.originalParams, { + watchSlidesProgress: true, + slideToClickedSlide: false, + }); + Utils.extend(swiper.thumbs.swiper.params, { + watchSlidesProgress: true, + slideToClickedSlide: false, + }); + } else if (Utils.isObject(thumbsParams.swiper)) { + swiper.thumbs.swiper = new SwiperClass(Utils.extend({}, thumbsParams.swiper, { + watchSlidesVisibility: true, + watchSlidesProgress: true, + slideToClickedSlide: false, + })); + swiper.thumbs.swiperCreated = true; + } + swiper.thumbs.swiper.$el.addClass(swiper.params.thumbs.thumbsContainerClass); + swiper.thumbs.swiper.on('tap', swiper.thumbs.onThumbClick); + }, + onThumbClick: function onThumbClick() { + var swiper = this; + var thumbsSwiper = swiper.thumbs.swiper; + if (!thumbsSwiper) { return; } + var clickedIndex = thumbsSwiper.clickedIndex; + var clickedSlide = thumbsSwiper.clickedSlide; + if (clickedSlide && $(clickedSlide).hasClass(swiper.params.thumbs.slideThumbActiveClass)) { return; } + if (typeof clickedIndex === 'undefined' || clickedIndex === null) { return; } + var slideToIndex; + if (thumbsSwiper.params.loop) { + slideToIndex = parseInt($(thumbsSwiper.clickedSlide).attr('data-swiper-slide-index'), 10); + } else { + slideToIndex = clickedIndex; + } + if (swiper.params.loop) { + var currentIndex = swiper.activeIndex; + if (swiper.slides.eq(currentIndex).hasClass(swiper.params.slideDuplicateClass)) { + swiper.loopFix(); + // eslint-disable-next-line + swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; + currentIndex = swiper.activeIndex; + } + var prevIndex = swiper.slides.eq(currentIndex).prevAll(("[data-swiper-slide-index=\"" + slideToIndex + "\"]")).eq(0).index(); + var nextIndex = swiper.slides.eq(currentIndex).nextAll(("[data-swiper-slide-index=\"" + slideToIndex + "\"]")).eq(0).index(); + if (typeof prevIndex === 'undefined') { slideToIndex = nextIndex; } + else if (typeof nextIndex === 'undefined') { slideToIndex = prevIndex; } + else if (nextIndex - currentIndex < currentIndex - prevIndex) { slideToIndex = nextIndex; } + else { slideToIndex = prevIndex; } + } + swiper.slideTo(slideToIndex); + }, + update: function update(initial) { + var swiper = this; + var thumbsSwiper = swiper.thumbs.swiper; + if (!thumbsSwiper) { return; } + + var slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' + ? thumbsSwiper.slidesPerViewDynamic() + : thumbsSwiper.params.slidesPerView; + + if (swiper.realIndex !== thumbsSwiper.realIndex) { + var currentThumbsIndex = thumbsSwiper.activeIndex; + var newThumbsIndex; + if (thumbsSwiper.params.loop) { + if (thumbsSwiper.slides.eq(currentThumbsIndex).hasClass(thumbsSwiper.params.slideDuplicateClass)) { + thumbsSwiper.loopFix(); + // eslint-disable-next-line + thumbsSwiper._clientLeft = thumbsSwiper.$wrapperEl[0].clientLeft; + currentThumbsIndex = thumbsSwiper.activeIndex; + } + // Find actual thumbs index to slide to + var prevThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).prevAll(("[data-swiper-slide-index=\"" + (swiper.realIndex) + "\"]")).eq(0).index(); + var nextThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).nextAll(("[data-swiper-slide-index=\"" + (swiper.realIndex) + "\"]")).eq(0).index(); + if (typeof prevThumbsIndex === 'undefined') { newThumbsIndex = nextThumbsIndex; } + else if (typeof nextThumbsIndex === 'undefined') { newThumbsIndex = prevThumbsIndex; } + else if (nextThumbsIndex - currentThumbsIndex === currentThumbsIndex - prevThumbsIndex) { newThumbsIndex = currentThumbsIndex; } + else if (nextThumbsIndex - currentThumbsIndex < currentThumbsIndex - prevThumbsIndex) { newThumbsIndex = nextThumbsIndex; } + else { newThumbsIndex = prevThumbsIndex; } + } else { + newThumbsIndex = swiper.realIndex; + } + if (thumbsSwiper.visibleSlidesIndexes && thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0) { + if (thumbsSwiper.params.centeredSlides) { + if (newThumbsIndex > currentThumbsIndex) { + newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1; + } else { + newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1; + } + } else if (newThumbsIndex > currentThumbsIndex) { + newThumbsIndex = newThumbsIndex - slidesPerView + 1; + } + thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined); + } + } + + // Activate thumbs + var thumbsToActivate = 1; + var thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass; + + if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) { + thumbsToActivate = swiper.params.slidesPerView; + } + + if (!swiper.params.thumbs.multipleActiveThumbs) { + thumbsToActivate = 1; + } + + thumbsToActivate = Math.floor(thumbsToActivate); + + thumbsSwiper.slides.removeClass(thumbActiveClass); + if (thumbsSwiper.params.loop || (thumbsSwiper.params.virtual && thumbsSwiper.params.virtual.enabled)) { + for (var i = 0; i < thumbsToActivate; i += 1) { + thumbsSwiper.$wrapperEl.children(("[data-swiper-slide-index=\"" + (swiper.realIndex + i) + "\"]")).addClass(thumbActiveClass); + } + } else { + for (var i$1 = 0; i$1 < thumbsToActivate; i$1 += 1) { + thumbsSwiper.slides.eq(swiper.realIndex + i$1).addClass(thumbActiveClass); + } + } + }, + }; + var Thumbs$1 = { + name: 'thumbs', + params: { + thumbs: { + multipleActiveThumbs: true, + swiper: null, + slideThumbActiveClass: 'swiper-slide-thumb-active', + thumbsContainerClass: 'swiper-container-thumbs', + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + thumbs: { + swiper: null, + init: Thumbs.init.bind(swiper), + update: Thumbs.update.bind(swiper), + onThumbClick: Thumbs.onThumbClick.bind(swiper), + }, + }); + }, + on: { + beforeInit: function beforeInit() { + var swiper = this; + var ref = swiper.params; + var thumbs = ref.thumbs; + if (!thumbs || !thumbs.swiper) { return; } + swiper.thumbs.init(); + swiper.thumbs.update(true); + }, + slideChange: function slideChange() { + var swiper = this; + if (!swiper.thumbs.swiper) { return; } + swiper.thumbs.update(); + }, + update: function update() { + var swiper = this; + if (!swiper.thumbs.swiper) { return; } + swiper.thumbs.update(); + }, + resize: function resize() { + var swiper = this; + if (!swiper.thumbs.swiper) { return; } + swiper.thumbs.update(); + }, + observerUpdate: function observerUpdate() { + var swiper = this; + if (!swiper.thumbs.swiper) { return; } + swiper.thumbs.update(); + }, + setTransition: function setTransition(duration) { + var swiper = this; + var thumbsSwiper = swiper.thumbs.swiper; + if (!thumbsSwiper) { return; } + thumbsSwiper.setTransition(duration); + }, + beforeDestroy: function beforeDestroy() { + var swiper = this; + var thumbsSwiper = swiper.thumbs.swiper; + if (!thumbsSwiper) { return; } + if (swiper.thumbs.swiperCreated && thumbsSwiper) { + thumbsSwiper.destroy(); + } + }, + }, + }; + + // Swiper Class + + var components = [ + Device$1, + Support$1, + Browser$1, + Resize, + Observer$1, + Virtual$1, + Keyboard$1, + Mousewheel$1, + Navigation$1, + Pagination$1, + Scrollbar$1, + Parallax$1, + Zoom$1, + Lazy$1, + Controller$1, + A11y, + History$1, + HashNavigation$1, + Autoplay$1, + EffectFade, + EffectCube, + EffectFlip, + EffectCoverflow, + Thumbs$1 + ]; + + if (typeof Swiper.use === 'undefined') { + Swiper.use = Swiper.Class.use; + Swiper.installModule = Swiper.Class.installModule; + } + + Swiper.use(components); + + return Swiper; + +})); +//# sourceMappingURL=swiper.js.map diff --git a/html/js/swiper.min.js b/html/js/swiper.min.js new file mode 100644 index 0000000..4754a3d --- /dev/null +++ b/html/js/swiper.min.js @@ -0,0 +1,14 @@ +/** + * Swiper 5.3.0 + * Most modern mobile touch slider and framework with hardware accelerated transitions + * http://swiperjs.com + * + * Copyright 2014-2020 Vladimir Kharlampidi + * + * Released under the MIT License + * + * Released on: January 11, 2020 + */ + +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Swiper=t()}(this,(function(){"use strict";var e="undefined"==typeof document?{body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},location:{hash:""}}:document,t="undefined"==typeof window?{document:e,navigator:{userAgent:""},location:{},history:{},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){}}:window,i=function(e){for(var t=0;t=0&&d.indexOf(">")>=0){var h="div";for(0===d.indexOf(":~]/)?(a||e).querySelectorAll(s.trim()):[e.getElementById(s.trim().split("#")[1])],n=0;n0&&s[0].nodeType)for(n=0;n=0;u-=1){var v=c[u];r&&v.listener===r?(p.removeEventListener(d,v.proxyListener,n),c.splice(u,1)):r&&v.listener&&v.listener.dom7proxy&&v.listener.dom7proxy===r?(p.removeEventListener(d,v.proxyListener,n),c.splice(u,1)):r||(p.removeEventListener(d,v.proxyListener,n),c.splice(u,1))}}return this},trigger:function(){for(var i=[],s=arguments.length;s--;)i[s]=arguments[s];for(var a=i[0].split(" "),r=i[1],n=0;n0})),d.dispatchEvent(h),d.dom7EventData=[],delete d.dom7EventData}return this},transitionEnd:function(e){var t,i=["webkitTransitionEnd","transitionend"],s=this;function a(r){if(r.target===this)for(e.call(this,r),t=0;t0){if(e){var t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},offset:function(){if(this.length>0){var i=this[0],s=i.getBoundingClientRect(),a=e.body,r=i.clientTop||a.clientTop||0,n=i.clientLeft||a.clientLeft||0,o=i===t?t.scrollY:i.scrollTop,l=i===t?t.scrollX:i.scrollLeft;return{top:s.top+o-r,left:s.left+l-n}}return null},css:function(e,i){var s;if(1===arguments.length){if("string"!=typeof e){for(s=0;ss-1?[]:e<0?(t=s+e)<0?[]:[this[t]]:[this[e]])},append:function(){for(var t,s=[],a=arguments.length;a--;)s[a]=arguments[a];for(var r=0;r=0;a-=1)this[s].insertBefore(r.childNodes[a],this[s].childNodes[0])}else if(t instanceof i)for(a=0;a0?e?this[0].nextElementSibling&&s(this[0].nextElementSibling).is(e)?new i([this[0].nextElementSibling]):new i([]):this[0].nextElementSibling?new i([this[0].nextElementSibling]):new i([]):new i([])},nextAll:function(e){var t=[],a=this[0];if(!a)return new i([]);for(;a.nextElementSibling;){var r=a.nextElementSibling;e?s(r).is(e)&&t.push(r):t.push(r),a=r}return new i(t)},prev:function(e){if(this.length>0){var t=this[0];return e?t.previousElementSibling&&s(t.previousElementSibling).is(e)?new i([t.previousElementSibling]):new i([]):t.previousElementSibling?new i([t.previousElementSibling]):new i([])}return new i([])},prevAll:function(e){var t=[],a=this[0];if(!a)return new i([]);for(;a.previousElementSibling;){var r=a.previousElementSibling;e?s(r).is(e)&&t.push(r):t.push(r),a=r}return new i(t)},parent:function(e){for(var t=[],i=0;i6&&(a=a.split(", ").map((function(e){return e.replace(",",".")})).join(", ")),r=new t.WebKitCSSMatrix("none"===a?"":a)):s=(r=n.MozTransform||n.OTransform||n.MsTransform||n.msTransform||n.transform||n.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===i&&(a=t.WebKitCSSMatrix?r.m41:16===s.length?parseFloat(s[12]):parseFloat(s[4])),"y"===i&&(a=t.WebKitCSSMatrix?r.m42:16===s.length?parseFloat(s[13]):parseFloat(s[5])),a||0},parseUrlQuery:function(e){var i,s,a,r,n={},o=e||t.location.href;if("string"==typeof o&&o.length)for(r=(s=(o=o.indexOf("?")>-1?o.replace(/\S*\?/,""):"").split("&").filter((function(e){return""!==e}))).length,i=0;i0||"ontouchstart"in t||t.DocumentTouch&&e instanceof t.DocumentTouch),pointerEvents:!!t.PointerEvent&&"maxTouchPoints"in t.navigator&&t.navigator.maxTouchPoints>0,observer:"MutationObserver"in t||"WebkitMutationObserver"in t,passiveListener:function(){var e=!1;try{var i=Object.defineProperty({},"passive",{get:function(){e=!0}});t.addEventListener("testPassiveListener",null,i)}catch(e){}return e}(),gestures:"ongesturestart"in t},l=function(e){void 0===e&&(e={});var t=this;t.params=e,t.eventsListeners={},t.params&&t.params.on&&Object.keys(t.params.on).forEach((function(e){t.on(e,t.params.on[e])}))},d={components:{configurable:!0}};l.prototype.on=function(e,t,i){var s=this;if("function"!=typeof t)return s;var a=i?"unshift":"push";return e.split(" ").forEach((function(e){s.eventsListeners[e]||(s.eventsListeners[e]=[]),s.eventsListeners[e][a](t)})),s},l.prototype.once=function(e,t,i){var s=this;if("function"!=typeof t)return s;function a(){for(var i=[],r=arguments.length;r--;)i[r]=arguments[r];s.off(e,a),a.f7proxy&&delete a.f7proxy,t.apply(s,i)}return a.f7proxy=t,s.on(e,a,i)},l.prototype.off=function(e,t){var i=this;return i.eventsListeners?(e.split(" ").forEach((function(e){void 0===t?i.eventsListeners[e]=[]:i.eventsListeners[e]&&i.eventsListeners[e].length&&i.eventsListeners[e].forEach((function(s,a){(s===t||s.f7proxy&&s.f7proxy===t)&&i.eventsListeners[e].splice(a,1)}))})),i):i},l.prototype.emit=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var i,s,a,r=this;if(!r.eventsListeners)return r;"string"==typeof e[0]||Array.isArray(e[0])?(i=e[0],s=e.slice(1,e.length),a=r):(i=e[0].events,s=e[0].data,a=e[0].context||r);var n=Array.isArray(i)?i:i.split(" ");return n.forEach((function(e){if(r.eventsListeners&&r.eventsListeners[e]){var t=[];r.eventsListeners[e].forEach((function(e){t.push(e)})),t.forEach((function(e){e.apply(a,s)}))}})),r},l.prototype.useModulesParams=function(e){var t=this;t.modules&&Object.keys(t.modules).forEach((function(i){var s=t.modules[i];s.params&&n.extend(e,s.params)}))},l.prototype.useModules=function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach((function(i){var s=t.modules[i],a=e[i]||{};s.instance&&Object.keys(s.instance).forEach((function(e){var i=s.instance[e];t[e]="function"==typeof i?i.bind(t):i})),s.on&&t.on&&Object.keys(s.on).forEach((function(e){t.on(e,s.on[e])})),s.create&&s.create.bind(t)(a)}))},d.components.set=function(e){this.use&&this.use(e)},l.installModule=function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];var s=this;s.prototype.modules||(s.prototype.modules={});var a=e.name||Object.keys(s.prototype.modules).length+"_"+n.now();return s.prototype.modules[a]=e,e.proto&&Object.keys(e.proto).forEach((function(t){s.prototype[t]=e.proto[t]})),e.static&&Object.keys(e.static).forEach((function(t){s[t]=e.static[t]})),e.install&&e.install.apply(s,t),s},l.use=function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];var s=this;return Array.isArray(e)?(e.forEach((function(e){return s.installModule(e)})),s):s.installModule.apply(s,[e].concat(t))},Object.defineProperties(l,d);var h={updateSize:function(){var e,t,i=this.$el;e=void 0!==this.params.width?this.params.width:i[0].clientWidth,t=void 0!==this.params.height?this.params.height:i[0].clientHeight,0===e&&this.isHorizontal()||0===t&&this.isVertical()||(e=e-parseInt(i.css("padding-left"),10)-parseInt(i.css("padding-right"),10),t=t-parseInt(i.css("padding-top"),10)-parseInt(i.css("padding-bottom"),10),n.extend(this,{width:e,height:t,size:this.isHorizontal()?e:t}))},updateSlides:function(){var e=this.params,i=this.$wrapperEl,s=this.size,a=this.rtlTranslate,r=this.wrongRTL,o=this.virtual&&e.virtual.enabled,l=o?this.virtual.slides.length:this.slides.length,d=i.children("."+this.params.slideClass),h=o?this.virtual.slides.length:d.length,p=[],c=[],u=[];function v(t){return!e.cssMode||t!==d.length-1}var f=e.slidesOffsetBefore;"function"==typeof f&&(f=e.slidesOffsetBefore.call(this));var m=e.slidesOffsetAfter;"function"==typeof m&&(m=e.slidesOffsetAfter.call(this));var g=this.snapGrid.length,b=this.snapGrid.length,w=e.spaceBetween,y=-f,x=0,T=0;if(void 0!==s){var E,S;"string"==typeof w&&w.indexOf("%")>=0&&(w=parseFloat(w.replace("%",""))/100*s),this.virtualSize=-w,a?d.css({marginLeft:"",marginTop:""}):d.css({marginRight:"",marginBottom:""}),e.slidesPerColumn>1&&(E=Math.floor(h/e.slidesPerColumn)===h/this.params.slidesPerColumn?h:Math.ceil(h/e.slidesPerColumn)*e.slidesPerColumn,"auto"!==e.slidesPerView&&"row"===e.slidesPerColumnFill&&(E=Math.max(E,e.slidesPerView*e.slidesPerColumn)));for(var C,M=e.slidesPerColumn,P=E/M,z=Math.floor(h/e.slidesPerColumn),k=0;k1){var L=void 0,I=void 0,D=void 0;if("row"===e.slidesPerColumnFill&&e.slidesPerGroup>1){var O=Math.floor(k/(e.slidesPerGroup*e.slidesPerColumn)),A=k-e.slidesPerColumn*e.slidesPerGroup*O,G=0===O?e.slidesPerGroup:Math.min(Math.ceil((h-O*M*e.slidesPerGroup)/M),e.slidesPerGroup);L=(I=A-(D=Math.floor(A/G))*G+O*e.slidesPerGroup)+D*E/M,$.css({"-webkit-box-ordinal-group":L,"-moz-box-ordinal-group":L,"-ms-flex-order":L,"-webkit-order":L,order:L})}else"column"===e.slidesPerColumnFill?(D=k-(I=Math.floor(k/M))*M,(I>z||I===z&&D===M-1)&&(D+=1)>=M&&(D=0,I+=1)):I=k-(D=Math.floor(k/P))*P;$.css("margin-"+(this.isHorizontal()?"top":"left"),0!==D&&e.spaceBetween&&e.spaceBetween+"px")}if("none"!==$.css("display")){if("auto"===e.slidesPerView){var B=t.getComputedStyle($[0],null),H=$[0].style.transform,N=$[0].style.webkitTransform;if(H&&($[0].style.transform="none"),N&&($[0].style.webkitTransform="none"),e.roundLengths)S=this.isHorizontal()?$.outerWidth(!0):$.outerHeight(!0);else if(this.isHorizontal()){var X=parseFloat(B.getPropertyValue("width")),V=parseFloat(B.getPropertyValue("padding-left")),Y=parseFloat(B.getPropertyValue("padding-right")),F=parseFloat(B.getPropertyValue("margin-left")),W=parseFloat(B.getPropertyValue("margin-right")),R=B.getPropertyValue("box-sizing");S=R&&"border-box"===R?X+F+W:X+V+Y+F+W}else{var q=parseFloat(B.getPropertyValue("height")),j=parseFloat(B.getPropertyValue("padding-top")),K=parseFloat(B.getPropertyValue("padding-bottom")),U=parseFloat(B.getPropertyValue("margin-top")),_=parseFloat(B.getPropertyValue("margin-bottom")),Z=B.getPropertyValue("box-sizing");S=Z&&"border-box"===Z?q+U+_:q+j+K+U+_}H&&($[0].style.transform=H),N&&($[0].style.webkitTransform=N),e.roundLengths&&(S=Math.floor(S))}else S=(s-(e.slidesPerView-1)*w)/e.slidesPerView,e.roundLengths&&(S=Math.floor(S)),d[k]&&(this.isHorizontal()?d[k].style.width=S+"px":d[k].style.height=S+"px");d[k]&&(d[k].swiperSlideSize=S),u.push(S),e.centeredSlides?(y=y+S/2+x/2+w,0===x&&0!==k&&(y=y-s/2-w),0===k&&(y=y-s/2-w),Math.abs(y)<.001&&(y=0),e.roundLengths&&(y=Math.floor(y)),T%e.slidesPerGroup==0&&p.push(y),c.push(y)):(e.roundLengths&&(y=Math.floor(y)),(T-Math.min(this.params.slidesPerGroupSkip,T))%this.params.slidesPerGroup==0&&p.push(y),c.push(y),y=y+S+w),this.virtualSize+=S+w,x=S,T+=1}}if(this.virtualSize=Math.max(this.virtualSize,s)+m,a&&r&&("slide"===e.effect||"coverflow"===e.effect)&&i.css({width:this.virtualSize+e.spaceBetween+"px"}),e.setWrapperSize&&(this.isHorizontal()?i.css({width:this.virtualSize+e.spaceBetween+"px"}):i.css({height:this.virtualSize+e.spaceBetween+"px"})),e.slidesPerColumn>1&&(this.virtualSize=(S+e.spaceBetween)*E,this.virtualSize=Math.ceil(this.virtualSize/e.slidesPerColumn)-e.spaceBetween,this.isHorizontal()?i.css({width:this.virtualSize+e.spaceBetween+"px"}):i.css({height:this.virtualSize+e.spaceBetween+"px"}),e.centeredSlides)){C=[];for(var Q=0;Q1&&p.push(this.virtualSize-s)}if(0===p.length&&(p=[0]),0!==e.spaceBetween&&(this.isHorizontal()?a?d.filter(v).css({marginLeft:w+"px"}):d.filter(v).css({marginRight:w+"px"}):d.filter(v).css({marginBottom:w+"px"})),e.centeredSlides&&e.centeredSlidesBounds){var ie=0;u.forEach((function(t){ie+=t+(e.spaceBetween?e.spaceBetween:0)}));var se=(ie-=e.spaceBetween)-s;p=p.map((function(e){return e<0?-f:e>se?se+m:e}))}if(e.centerInsufficientSlides){var ae=0;if(u.forEach((function(t){ae+=t+(e.spaceBetween?e.spaceBetween:0)})),(ae-=e.spaceBetween)1)for(t=0;tthis.slides.length)break;i.push(this.slides.eq(a)[0])}else i.push(this.slides.eq(this.activeIndex)[0]);for(t=0;ts?r:s}s&&this.$wrapperEl.css("height",s+"px")},updateSlidesOffset:function(){for(var e=this.slides,t=0;t=0&&d1&&h<=this.size||d<=0&&h>=this.size)&&(this.visibleSlides.push(o),this.visibleSlidesIndexes.push(n),i.eq(n).addClass(t.slideVisibleClass))}o.progress=a?-l:l}this.visibleSlides=s(this.visibleSlides)}},updateProgress:function(e){if(void 0===e){var t=this.rtlTranslate?-1:1;e=this&&this.translate&&this.translate*t||0}var i=this.params,s=this.maxTranslate()-this.minTranslate(),a=this.progress,r=this.isBeginning,o=this.isEnd,l=r,d=o;0===s?(a=0,r=!0,o=!0):(r=(a=(e-this.minTranslate())/s)<=0,o=a>=1),n.extend(this,{progress:a,isBeginning:r,isEnd:o}),(i.watchSlidesProgress||i.watchSlidesVisibility)&&this.updateSlidesProgress(e),r&&!l&&this.emit("reachBeginning toEdge"),o&&!d&&this.emit("reachEnd toEdge"),(l&&!r||d&&!o)&&this.emit("fromEdge"),this.emit("progress",a)},updateSlidesClasses:function(){var e,t=this.slides,i=this.params,s=this.$wrapperEl,a=this.activeIndex,r=this.realIndex,n=this.virtual&&i.virtual.enabled;t.removeClass(i.slideActiveClass+" "+i.slideNextClass+" "+i.slidePrevClass+" "+i.slideDuplicateActiveClass+" "+i.slideDuplicateNextClass+" "+i.slideDuplicatePrevClass),(e=n?this.$wrapperEl.find("."+i.slideClass+'[data-swiper-slide-index="'+a+'"]'):t.eq(a)).addClass(i.slideActiveClass),i.loop&&(e.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+r+'"]').addClass(i.slideDuplicateActiveClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+r+'"]').addClass(i.slideDuplicateActiveClass));var o=e.nextAll("."+i.slideClass).eq(0).addClass(i.slideNextClass);i.loop&&0===o.length&&(o=t.eq(0)).addClass(i.slideNextClass);var l=e.prevAll("."+i.slideClass).eq(0).addClass(i.slidePrevClass);i.loop&&0===l.length&&(l=t.eq(-1)).addClass(i.slidePrevClass),i.loop&&(o.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+o.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+o.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass),l.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass))},updateActiveIndex:function(e){var t,i=this.rtlTranslate?this.translate:-this.translate,s=this.slidesGrid,a=this.snapGrid,r=this.params,o=this.activeIndex,l=this.realIndex,d=this.snapIndex,h=e;if(void 0===h){for(var p=0;p=s[p]&&i=s[p]&&i=s[p]&&(h=p);r.normalizeSlideIndex&&(h<0||void 0===h)&&(h=0)}if(a.indexOf(i)>=0)t=a.indexOf(i);else{var c=Math.min(r.slidesPerGroupSkip,h);t=c+Math.floor((h-c)/r.slidesPerGroup)}if(t>=a.length&&(t=a.length-1),h!==o){var u=parseInt(this.slides.eq(h).attr("data-swiper-slide-index")||h,10);n.extend(this,{snapIndex:t,realIndex:u,previousIndex:o,activeIndex:h}),this.emit("activeIndexChange"),this.emit("snapIndexChange"),l!==u&&this.emit("realIndexChange"),(this.initialized||this.runCallbacksOnInit)&&this.emit("slideChange")}else t!==d&&(this.snapIndex=t,this.emit("snapIndexChange"))},updateClickedSlide:function(e){var t=this.params,i=s(e.target).closest("."+t.slideClass)[0],a=!1;if(i)for(var r=0;rh?h:s&&ea?"next":is?"next":i=d.length&&(f=d.length-1),(p||o.initialSlide||0)===(h||0)&&i&&r.emit("beforeSlideChangeStart");var m,g=-l[f];if(r.updateProgress(g),o.normalizeSlideIndex)for(var b=0;b=Math.floor(100*d[b])&&(n=b);if(r.initialized&&n!==p){if(!r.allowSlideNext&&gr.translate&&g>r.maxTranslate()&&(p||0)!==n)return!1}if(m=n>p?"next":n=e&&(c=e)})),void 0!==c&&(d=n.indexOf(c))<0&&(d=this.activeIndex-1),this.slideTo(d,e,t,i)},slideReset:function(e,t,i){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,i)},slideToClosest:function(e,t,i,s){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),void 0===s&&(s=.5);var a=this.activeIndex,r=Math.min(this.params.slidesPerGroupSkip,a),n=r+Math.floor((a-r)/this.params.slidesPerGroup),o=this.rtlTranslate?this.translate:-this.translate;if(o>=this.snapGrid[n]){var l=this.snapGrid[n];o-l>(this.snapGrid[n+1]-l)*s&&(a+=this.params.slidesPerGroup)}else{var d=this.snapGrid[n-1];o-d<=(this.snapGrid[n]-d)*s&&(a-=this.params.slidesPerGroup)}return a=Math.max(a,0),a=Math.min(a,this.slidesGrid.length-1),this.slideTo(a,e,t,i)},slideToClickedSlide:function(){var e,t=this,i=t.params,a=t.$wrapperEl,r="auto"===i.slidesPerView?t.slidesPerViewDynamic():i.slidesPerView,o=t.clickedIndex;if(i.loop){if(t.animating)return;e=parseInt(s(t.clickedSlide).attr("data-swiper-slide-index"),10),i.centeredSlides?ot.slides.length-t.loopedSlides+r/2?(t.loopFix(),o=a.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),n.nextTick((function(){t.slideTo(o)}))):t.slideTo(o):o>t.slides.length-r?(t.loopFix(),o=a.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),n.nextTick((function(){t.slideTo(o)}))):t.slideTo(o)}else t.slideTo(o)}};var v={loopCreate:function(){var t=this,i=t.params,a=t.$wrapperEl;a.children("."+i.slideClass+"."+i.slideDuplicateClass).remove();var r=a.children("."+i.slideClass);if(i.loopFillGroupWithBlank){var n=i.slidesPerGroup-r.length%i.slidesPerGroup;if(n!==i.slidesPerGroup){for(var o=0;or.length&&(t.loopedSlides=r.length);var d=[],h=[];r.each((function(e,i){var a=s(i);e=r.length-t.loopedSlides&&d.push(i),a.attr("data-swiper-slide-index",e)}));for(var p=0;p=0;c-=1)a.prepend(s(d[c].cloneNode(!0)).addClass(i.slideDuplicateClass))},loopFix:function(){this.emit("beforeLoopFix");var e,t=this.activeIndex,i=this.slides,s=this.loopedSlides,a=this.allowSlidePrev,r=this.allowSlideNext,n=this.snapGrid,o=this.rtlTranslate;this.allowSlidePrev=!0,this.allowSlideNext=!0;var l=-n[t]-this.getTranslate();if(t=i.length-s){e=-i.length+t+s,e+=s,this.slideTo(e,0,!1,!0)&&0!==l&&this.setTranslate((o?-this.translate:this.translate)-l)}this.allowSlidePrev=a,this.allowSlideNext=r,this.emit("loopFix")},loopDestroy:function(){var e=this.$wrapperEl,t=this.params,i=this.slides;e.children("."+t.slideClass+"."+t.slideDuplicateClass+",."+t.slideClass+"."+t.slideBlankClass).remove(),i.removeAttr("data-swiper-slide-index")}};var f={setGrabCursor:function(e){if(!(o.touch||!this.params.simulateTouch||this.params.watchOverflow&&this.isLocked||this.params.cssMode)){var t=this.el;t.style.cursor="move",t.style.cursor=e?"-webkit-grabbing":"-webkit-grab",t.style.cursor=e?"-moz-grabbin":"-moz-grab",t.style.cursor=e?"grabbing":"grab"}},unsetGrabCursor:function(){o.touch||this.params.watchOverflow&&this.isLocked||this.params.cssMode||(this.el.style.cursor="")}};var m,g,b,w,y,x,T,E,S,C,M,P,z,k,$,L={appendSlide:function(e){var t=this.$wrapperEl,i=this.params;if(i.loop&&this.loopDestroy(),"object"==typeof e&&"length"in e)for(var s=0;s=r)this.appendSlide(t);else{for(var n=a>e?a+1:a,l=[],d=r-1;d>=e;d-=1){var h=this.slides.eq(d);h.remove(),l.unshift(h)}if("object"==typeof t&&"length"in t){for(var p=0;pe?a+t.length:a}else i.append(t);for(var c=0;c=0||g.indexOf("Trident/")>=0,M=g.indexOf("Edge/")>=0,P=g.indexOf("Gecko/")>=0&&g.indexOf("Firefox/")>=0,z="Win32"===m,k=g.toLowerCase().indexOf("electron")>=0,$="MacIntel"===m,!T&&$&&o.touch&&(1024===w&&1366===y||834===w&&1194===y||834===w&&1112===y||768===w&&1024===y)&&(T=g.match(/(Version)\/([\d.]+)/),$=!1),b.ie=C,b.edge=M,b.firefox=P,x&&!z&&(b.os="android",b.osVersion=x[2],b.android=!0,b.androidChrome=g.toLowerCase().indexOf("chrome")>=0),(T||S||E)&&(b.os="ios",b.ios=!0),S&&!E&&(b.osVersion=S[2].replace(/_/g,"."),b.iphone=!0),T&&(b.osVersion=T[2].replace(/_/g,"."),b.ipad=!0),E&&(b.osVersion=E[3]?E[3].replace(/_/g,"."):null,b.ipod=!0),b.ios&&b.osVersion&&g.indexOf("Version/")>=0&&"10"===b.osVersion.split(".")[0]&&(b.osVersion=g.toLowerCase().split("version/")[1].split(" ")[0]),b.webView=!(!(S||T||E)||!g.match(/.*AppleWebKit(?!.*Safari)/i)&&!t.navigator.standalone)||t.matchMedia&&t.matchMedia("(display-mode: standalone)").matches,b.webview=b.webView,b.standalone=b.webView,b.desktop=!(b.ios||b.android)||k,b.desktop&&(b.electron=k,b.macos=$,b.windows=z,b.macos&&(b.os="macos"),b.windows&&(b.os="windows")),b.pixelRatio=t.devicePixelRatio||1,b);function D(i){var a=this.touchEventsData,r=this.params,o=this.touches;if(!this.animating||!r.preventInteractionOnTransition){var l=i;l.originalEvent&&(l=l.originalEvent);var d=s(l.target);if(("wrapper"!==r.touchEventsTarget||d.closest(this.wrapperEl).length)&&(a.isTouchEvent="touchstart"===l.type,(a.isTouchEvent||!("which"in l)||3!==l.which)&&!(!a.isTouchEvent&&"button"in l&&l.button>0||a.isTouched&&a.isMoved)))if(r.noSwiping&&d.closest(r.noSwipingSelector?r.noSwipingSelector:"."+r.noSwipingClass)[0])this.allowClick=!0;else if(!r.swipeHandler||d.closest(r.swipeHandler)[0]){o.currentX="touchstart"===l.type?l.targetTouches[0].pageX:l.pageX,o.currentY="touchstart"===l.type?l.targetTouches[0].pageY:l.pageY;var h=o.currentX,p=o.currentY,c=r.edgeSwipeDetection||r.iOSEdgeSwipeDetection,u=r.edgeSwipeThreshold||r.iOSEdgeSwipeThreshold;if(!c||!(h<=u||h>=t.screen.width-u)){if(n.extend(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=h,o.startY=p,a.touchStartTime=n.now(),this.allowClick=!0,this.updateSize(),this.swipeDirection=void 0,r.threshold>0&&(a.allowThresholdMove=!1),"touchstart"!==l.type){var v=!0;d.is(a.formElements)&&(v=!1),e.activeElement&&s(e.activeElement).is(a.formElements)&&e.activeElement!==d[0]&&e.activeElement.blur();var f=v&&this.allowTouchMove&&r.touchStartPreventDefault;(r.touchStartForcePreventDefault||f)&&l.preventDefault()}this.emit("touchStart",l)}}}}function O(t){var i=this.touchEventsData,a=this.params,r=this.touches,o=this.rtlTranslate,l=t;if(l.originalEvent&&(l=l.originalEvent),i.isTouched){if(!i.isTouchEvent||"mousemove"!==l.type){var d="touchmove"===l.type&&l.targetTouches&&(l.targetTouches[0]||l.changedTouches[0]),h="touchmove"===l.type?d.pageX:l.pageX,p="touchmove"===l.type?d.pageY:l.pageY;if(l.preventedByNestedSwiper)return r.startX=h,void(r.startY=p);if(!this.allowTouchMove)return this.allowClick=!1,void(i.isTouched&&(n.extend(r,{startX:h,startY:p,currentX:h,currentY:p}),i.touchStartTime=n.now()));if(i.isTouchEvent&&a.touchReleaseOnEdges&&!a.loop)if(this.isVertical()){if(pr.startY&&this.translate>=this.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else if(hr.startX&&this.translate>=this.minTranslate())return;if(i.isTouchEvent&&e.activeElement&&l.target===e.activeElement&&s(l.target).is(i.formElements))return i.isMoved=!0,void(this.allowClick=!1);if(i.allowTouchCallbacks&&this.emit("touchMove",l),!(l.targetTouches&&l.targetTouches.length>1)){r.currentX=h,r.currentY=p;var c=r.currentX-r.startX,u=r.currentY-r.startY;if(!(this.params.threshold&&Math.sqrt(Math.pow(c,2)+Math.pow(u,2))=25&&(v=180*Math.atan2(Math.abs(u),Math.abs(c))/Math.PI,i.isScrolling=this.isHorizontal()?v>a.touchAngle:90-v>a.touchAngle);if(i.isScrolling&&this.emit("touchMoveOpposite",l),void 0===i.startMoving&&(r.currentX===r.startX&&r.currentY===r.startY||(i.startMoving=!0)),i.isScrolling)i.isTouched=!1;else if(i.startMoving){this.allowClick=!1,a.cssMode||l.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&l.stopPropagation(),i.isMoved||(a.loop&&this.loopFix(),i.startTranslate=this.getTranslate(),this.setTransition(0),this.animating&&this.$wrapperEl.trigger("webkitTransitionEnd transitionend"),i.allowMomentumBounce=!1,!a.grabCursor||!0!==this.allowSlideNext&&!0!==this.allowSlidePrev||this.setGrabCursor(!0),this.emit("sliderFirstMove",l)),this.emit("sliderMove",l),i.isMoved=!0;var f=this.isHorizontal()?c:u;r.diff=f,f*=a.touchRatio,o&&(f=-f),this.swipeDirection=f>0?"prev":"next",i.currentTranslate=f+i.startTranslate;var m=!0,g=a.resistanceRatio;if(a.touchReleaseOnEdges&&(g=0),f>0&&i.currentTranslate>this.minTranslate()?(m=!1,a.resistance&&(i.currentTranslate=this.minTranslate()-1+Math.pow(-this.minTranslate()+i.startTranslate+f,g))):f<0&&i.currentTranslatei.startTranslate&&(i.currentTranslate=i.startTranslate),a.threshold>0){if(!(Math.abs(f)>a.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,i.currentTranslate=i.startTranslate,void(r.diff=this.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY)}a.followFinger&&!a.cssMode&&((a.freeMode||a.watchSlidesProgress||a.watchSlidesVisibility)&&(this.updateActiveIndex(),this.updateSlidesClasses()),a.freeMode&&(0===i.velocities.length&&i.velocities.push({position:r[this.isHorizontal()?"startX":"startY"],time:i.touchStartTime}),i.velocities.push({position:r[this.isHorizontal()?"currentX":"currentY"],time:n.now()})),this.updateProgress(i.currentTranslate),this.setTranslate(i.currentTranslate))}}}}}else i.startMoving&&i.isScrolling&&this.emit("touchMoveOpposite",l)}function A(e){var t=this,i=t.touchEventsData,s=t.params,a=t.touches,r=t.rtlTranslate,o=t.$wrapperEl,l=t.slidesGrid,d=t.snapGrid,h=e;if(h.originalEvent&&(h=h.originalEvent),i.allowTouchCallbacks&&t.emit("touchEnd",h),i.allowTouchCallbacks=!1,!i.isTouched)return i.isMoved&&s.grabCursor&&t.setGrabCursor(!1),i.isMoved=!1,void(i.startMoving=!1);s.grabCursor&&i.isMoved&&i.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);var p,c=n.now(),u=c-i.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(h),t.emit("tap click",h),u<300&&c-i.lastClickTime<300&&t.emit("doubleTap doubleClick",h)),i.lastClickTime=n.now(),n.nextTick((function(){t.destroyed||(t.allowClick=!0)})),!i.isTouched||!i.isMoved||!t.swipeDirection||0===a.diff||i.currentTranslate===i.startTranslate)return i.isTouched=!1,i.isMoved=!1,void(i.startMoving=!1);if(i.isTouched=!1,i.isMoved=!1,i.startMoving=!1,p=s.followFinger?r?t.translate:-t.translate:-i.currentTranslate,!s.cssMode)if(s.freeMode){if(p<-t.minTranslate())return void t.slideTo(t.activeIndex);if(p>-t.maxTranslate())return void(t.slides.length1){var v=i.velocities.pop(),f=i.velocities.pop(),m=v.position-f.position,g=v.time-f.time;t.velocity=m/g,t.velocity/=2,Math.abs(t.velocity)150||n.now()-v.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=s.freeModeMomentumVelocityRatio,i.velocities.length=0;var b=1e3*s.freeModeMomentumRatio,w=t.velocity*b,y=t.translate+w;r&&(y=-y);var x,T,E=!1,S=20*Math.abs(t.velocity)*s.freeModeMomentumBounceRatio;if(yt.minTranslate())s.freeModeMomentumBounce?(y-t.minTranslate()>S&&(y=t.minTranslate()+S),x=t.minTranslate(),E=!0,i.allowMomentumBounce=!0):y=t.minTranslate(),s.loop&&s.centeredSlides&&(T=!0);else if(s.freeModeSticky){for(var C,M=0;M-y){C=M;break}y=-(y=Math.abs(d[C]-y)=s.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}else{for(var k=0,$=t.slidesSizesGrid[0],L=0;L=l[L]&&p=l[L]&&(k=L,$=l[l.length-1]-l[l.length-2])}var D=(p-l[k])/$,O=ks.longSwipesMs){if(!s.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(D>=s.longSwipesRatio?t.slideTo(k+O):t.slideTo(k)),"prev"===t.swipeDirection&&(D>1-s.longSwipesRatio?t.slideTo(k+O):t.slideTo(k))}else{if(!s.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(h.target===t.navigation.nextEl||h.target===t.navigation.prevEl)?h.target===t.navigation.nextEl?t.slideTo(k+O):t.slideTo(k):("next"===t.swipeDirection&&t.slideTo(k+O),"prev"===t.swipeDirection&&t.slideTo(k))}}}function G(){var e=this.params,t=this.el;if(!t||0!==t.offsetWidth){e.breakpoints&&this.setBreakpoint();var i=this.allowSlideNext,s=this.allowSlidePrev,a=this.snapGrid;this.allowSlideNext=!0,this.allowSlidePrev=!0,this.updateSize(),this.updateSlides(),this.updateSlidesClasses(),("auto"===e.slidesPerView||e.slidesPerView>1)&&this.isEnd&&!this.params.centeredSlides?this.slideTo(this.slides.length-1,0,!1,!0):this.slideTo(this.activeIndex,0,!1,!0),this.autoplay&&this.autoplay.running&&this.autoplay.paused&&this.autoplay.run(),this.allowSlidePrev=s,this.allowSlideNext=i,this.params.watchOverflow&&a!==this.snapGrid&&this.checkOverflow()}}function B(e){this.allowClick||(this.params.preventClicks&&e.preventDefault(),this.params.preventClicksPropagation&&this.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}function H(){var e=this.wrapperEl;this.previousTranslate=this.translate,this.translate=this.isHorizontal()?-e.scrollLeft:-e.scrollTop,-0===this.translate&&(this.translate=0),this.updateActiveIndex(),this.updateSlidesClasses();var t=this.maxTranslate()-this.minTranslate();(0===t?0:(this.translate-this.minTranslate())/t)!==this.progress&&this.updateProgress(this.translate),this.emit("setTranslate",this.translate,!1)}var N=!1;function X(){}var V={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,preventInteractionOnTransition:!1,edgeSwipeDetection:!1,edgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,slidesPerGroupSkip:0,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!1,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0},Y={update:h,translate:p,transition:c,slide:u,loop:v,grabCursor:f,manipulation:L,events:{attachEvents:function(){var t=this.params,i=this.touchEvents,s=this.el,a=this.wrapperEl;this.onTouchStart=D.bind(this),this.onTouchMove=O.bind(this),this.onTouchEnd=A.bind(this),t.cssMode&&(this.onScroll=H.bind(this)),this.onClick=B.bind(this);var r=!!t.nested;if(!o.touch&&o.pointerEvents)s.addEventListener(i.start,this.onTouchStart,!1),e.addEventListener(i.move,this.onTouchMove,r),e.addEventListener(i.end,this.onTouchEnd,!1);else{if(o.touch){var n=!("touchstart"!==i.start||!o.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};s.addEventListener(i.start,this.onTouchStart,n),s.addEventListener(i.move,this.onTouchMove,o.passiveListener?{passive:!1,capture:r}:r),s.addEventListener(i.end,this.onTouchEnd,n),i.cancel&&s.addEventListener(i.cancel,this.onTouchEnd,n),N||(e.addEventListener("touchstart",X),N=!0)}(t.simulateTouch&&!I.ios&&!I.android||t.simulateTouch&&!o.touch&&I.ios)&&(s.addEventListener("mousedown",this.onTouchStart,!1),e.addEventListener("mousemove",this.onTouchMove,r),e.addEventListener("mouseup",this.onTouchEnd,!1))}(t.preventClicks||t.preventClicksPropagation)&&s.addEventListener("click",this.onClick,!0),t.cssMode&&a.addEventListener("scroll",this.onScroll),t.updateOnWindowResize?this.on(I.ios||I.android?"resize orientationchange observerUpdate":"resize observerUpdate",G,!0):this.on("observerUpdate",G,!0)},detachEvents:function(){var t=this.params,i=this.touchEvents,s=this.el,a=this.wrapperEl,r=!!t.nested;if(!o.touch&&o.pointerEvents)s.removeEventListener(i.start,this.onTouchStart,!1),e.removeEventListener(i.move,this.onTouchMove,r),e.removeEventListener(i.end,this.onTouchEnd,!1);else{if(o.touch){var n=!("onTouchStart"!==i.start||!o.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};s.removeEventListener(i.start,this.onTouchStart,n),s.removeEventListener(i.move,this.onTouchMove,r),s.removeEventListener(i.end,this.onTouchEnd,n),i.cancel&&s.removeEventListener(i.cancel,this.onTouchEnd,n)}(t.simulateTouch&&!I.ios&&!I.android||t.simulateTouch&&!o.touch&&I.ios)&&(s.removeEventListener("mousedown",this.onTouchStart,!1),e.removeEventListener("mousemove",this.onTouchMove,r),e.removeEventListener("mouseup",this.onTouchEnd,!1))}(t.preventClicks||t.preventClicksPropagation)&&s.removeEventListener("click",this.onClick,!0),t.cssMode&&a.removeEventListener("scroll",this.onScroll),this.off(I.ios||I.android?"resize orientationchange observerUpdate":"resize observerUpdate",G)}},breakpoints:{setBreakpoint:function(){var e=this.activeIndex,t=this.initialized,i=this.loopedSlides;void 0===i&&(i=0);var s=this.params,a=this.$el,r=s.breakpoints;if(r&&(!r||0!==Object.keys(r).length)){var o=this.getBreakpoint(r);if(o&&this.currentBreakpoint!==o){var l=o in r?r[o]:void 0;l&&["slidesPerView","spaceBetween","slidesPerGroup","slidesPerGroupSkip","slidesPerColumn"].forEach((function(e){var t=l[e];void 0!==t&&(l[e]="slidesPerView"!==e||"AUTO"!==t&&"auto"!==t?"slidesPerView"===e?parseFloat(t):parseInt(t,10):"auto")}));var d=l||this.originalParams,h=s.slidesPerColumn>1,p=d.slidesPerColumn>1;h&&!p?a.removeClass(s.containerModifierClass+"multirow "+s.containerModifierClass+"multirow-column"):!h&&p&&(a.addClass(s.containerModifierClass+"multirow"),"column"===d.slidesPerColumnFill&&a.addClass(s.containerModifierClass+"multirow-column"));var c=d.direction&&d.direction!==s.direction,u=s.loop&&(d.slidesPerView!==s.slidesPerView||c);c&&t&&this.changeDirection(),n.extend(this.params,d),n.extend(this,{allowTouchMove:this.params.allowTouchMove,allowSlideNext:this.params.allowSlideNext,allowSlidePrev:this.params.allowSlidePrev}),this.currentBreakpoint=o,u&&t&&(this.loopDestroy(),this.loopCreate(),this.updateSlides(),this.slideTo(e-i+this.loopedSlides,0,!1)),this.emit("breakpoint",d)}}},getBreakpoint:function(e){if(e){var i=!1,s=Object.keys(e).map((function(e){if("string"==typeof e&&e.startsWith("@")){var i=parseFloat(e.substr(1));return{value:t.innerHeight*i,point:e}}return{value:e,point:e}}));s.sort((function(e,t){return parseInt(e.value,10)-parseInt(t.value,10)}));for(var a=0;a0&&e.slidesOffsetBefore+e.spaceBetween*(this.slides.length-1)+this.slides[0].offsetWidth*this.slides.length;e.slidesOffsetBefore&&e.slidesOffsetAfter&&i?this.isLocked=i<=this.size:this.isLocked=1===this.snapGrid.length,this.allowSlideNext=!this.isLocked,this.allowSlidePrev=!this.isLocked,t!==this.isLocked&&this.emit(this.isLocked?"lock":"unlock"),t&&t!==this.isLocked&&(this.isEnd=!1,this.navigation.update())}},classes:{addClasses:function(){var e=this.classNames,t=this.params,i=this.rtl,s=this.$el,a=[];a.push("initialized"),a.push(t.direction),t.freeMode&&a.push("free-mode"),t.autoHeight&&a.push("autoheight"),i&&a.push("rtl"),t.slidesPerColumn>1&&(a.push("multirow"),"column"===t.slidesPerColumnFill&&a.push("multirow-column")),I.android&&a.push("android"),I.ios&&a.push("ios"),t.cssMode&&a.push("css-mode"),a.forEach((function(i){e.push(t.containerModifierClass+i)})),s.addClass(e.join(" "))},removeClasses:function(){var e=this.$el,t=this.classNames;e.removeClass(t.join(" "))}},images:{loadImage:function(e,i,s,a,r,n){var o;function l(){n&&n()}e.complete&&r?l():i?((o=new t.Image).onload=l,o.onerror=l,a&&(o.sizes=a),s&&(o.srcset=s),i&&(o.src=i)):l()},preloadImages:function(){var e=this;function t(){null!=e&&e&&!e.destroyed&&(void 0!==e.imagesLoaded&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(var i=0;i1){var u=[];return c.each((function(e,i){var s=n.extend({},r,{el:i});u.push(new t(s))})),u}var v,f,m;return a.swiper=h,c.data("swiper",h),a&&a.shadowRoot&&a.shadowRoot.querySelector?(v=s(a.shadowRoot.querySelector("."+h.params.wrapperClass))).children=function(e){return c.children(e)}:v=c.children("."+h.params.wrapperClass),n.extend(h,{$el:c,el:a,$wrapperEl:v,wrapperEl:v[0],classNames:[],slides:s(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===h.params.direction},isVertical:function(){return"vertical"===h.params.direction},rtl:"rtl"===a.dir.toLowerCase()||"rtl"===c.css("direction"),rtlTranslate:"horizontal"===h.params.direction&&("rtl"===a.dir.toLowerCase()||"rtl"===c.css("direction")),wrongRTL:"-webkit-box"===v.css("display"),activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:h.params.allowSlideNext,allowSlidePrev:h.params.allowSlidePrev,touchEvents:(f=["touchstart","touchmove","touchend","touchcancel"],m=["mousedown","mousemove","mouseup"],o.pointerEvents&&(m=["pointerdown","pointermove","pointerup"]),h.touchEventsTouch={start:f[0],move:f[1],end:f[2],cancel:f[3]},h.touchEventsDesktop={start:m[0],move:m[1],end:m[2]},o.touch||!h.params.simulateTouch?h.touchEventsTouch:h.touchEventsDesktop),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,formElements:"input, select, option, textarea, button, video",lastClickTime:n.now(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:h.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),h.useModules(),h.params.init&&h.init(),h}}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={extendedDefaults:{configurable:!0},defaults:{configurable:!0},Class:{configurable:!0},$:{configurable:!0}};return t.prototype.slidesPerViewDynamic=function(){var e=this.params,t=this.slides,i=this.slidesGrid,s=this.size,a=this.activeIndex,r=1;if(e.centeredSlides){for(var n,o=t[a].swiperSlideSize,l=a+1;ls&&(n=!0));for(var d=a-1;d>=0;d-=1)t[d]&&!n&&(r+=1,(o+=t[d].swiperSlideSize)>s&&(n=!0))}else for(var h=a+1;h1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0))||s(),i.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}function s(){var t=e.rtlTranslate?-1*e.translate:e.translate,i=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(i),e.updateActiveIndex(),e.updateSlidesClasses()}},t.prototype.changeDirection=function(e,t){void 0===t&&(t=!0);var i=this.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e?this:(this.$el.removeClass(""+this.params.containerModifierClass+i).addClass(""+this.params.containerModifierClass+e),this.params.direction=e,this.slides.each((function(t,i){"vertical"===e?i.style.width="":i.style.height=""})),this.emit("changeDirection"),t&&this.update(),this)},t.prototype.init=function(){this.initialized||(this.emit("beforeInit"),this.params.breakpoints&&this.setBreakpoint(),this.addClasses(),this.params.loop&&this.loopCreate(),this.updateSize(),this.updateSlides(),this.params.watchOverflow&&this.checkOverflow(),this.params.grabCursor&&this.setGrabCursor(),this.params.preloadImages&&this.preloadImages(),this.params.loop?this.slideTo(this.params.initialSlide+this.loopedSlides,0,this.params.runCallbacksOnInit):this.slideTo(this.params.initialSlide,0,this.params.runCallbacksOnInit),this.attachEvents(),this.initialized=!0,this.emit("init"))},t.prototype.destroy=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);var i=this,s=i.params,a=i.$el,r=i.$wrapperEl,o=i.slides;return void 0===i.params||i.destroyed?null:(i.emit("beforeDestroy"),i.initialized=!1,i.detachEvents(),s.loop&&i.loopDestroy(),t&&(i.removeClasses(),a.removeAttr("style"),r.removeAttr("style"),o&&o.length&&o.removeClass([s.slideVisibleClass,s.slideActiveClass,s.slideNextClass,s.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),i.emit("destroy"),Object.keys(i.eventsListeners).forEach((function(e){i.off(e)})),!1!==e&&(i.$el[0].swiper=null,i.$el.data("swiper",null),n.deleteProps(i)),i.destroyed=!0,null)},t.extendDefaults=function(e){n.extend(F,e)},i.extendedDefaults.get=function(){return F},i.defaults.get=function(){return V},i.Class.get=function(){return e},i.$.get=function(){return s},Object.defineProperties(t,i),t}(l),R={name:"device",proto:{device:I},static:{device:I}},q={name:"support",proto:{support:o},static:{support:o}},j={isEdge:!!t.navigator.userAgent.match(/Edge/g),isSafari:function(){var e=t.navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t.navigator.userAgent)},K={name:"browser",proto:{browser:j},static:{browser:j}},U={name:"resize",create:function(){var e=this;n.extend(e,{resize:{resizeHandler:function(){e&&!e.destroyed&&e.initialized&&(e.emit("beforeResize"),e.emit("resize"))},orientationChangeHandler:function(){e&&!e.destroyed&&e.initialized&&e.emit("orientationchange")}}})},on:{init:function(){t.addEventListener("resize",this.resize.resizeHandler),t.addEventListener("orientationchange",this.resize.orientationChangeHandler)},destroy:function(){t.removeEventListener("resize",this.resize.resizeHandler),t.removeEventListener("orientationchange",this.resize.orientationChangeHandler)}}},_={func:t.MutationObserver||t.WebkitMutationObserver,attach:function(e,i){void 0===i&&(i={});var s=this,a=new(0,_.func)((function(e){if(1!==e.length){var i=function(){s.emit("observerUpdate",e[0])};t.requestAnimationFrame?t.requestAnimationFrame(i):t.setTimeout(i,0)}else s.emit("observerUpdate",e[0])}));a.observe(e,{attributes:void 0===i.attributes||i.attributes,childList:void 0===i.childList||i.childList,characterData:void 0===i.characterData||i.characterData}),s.observer.observers.push(a)},init:function(){if(o.observer&&this.params.observer){if(this.params.observeParents)for(var e=this.$el.parents(),t=0;tT)&&t.$wrapperEl.find("."+t.params.slideClass+'[data-swiper-slide-index="'+P+'"]').remove();for(var z=0;z=x&&z<=T&&(void 0===c||e?M.push(z):(z>c&&M.push(z),z'+e+"");return a.attr("data-swiper-slide-index")||a.attr("data-swiper-slide-index",t),i.cache&&(this.virtual.cache[t]=a),a},appendSlide:function(e){if("object"==typeof e&&"length"in e)for(var t=0;t=0;i-=1)this.virtual.slides.splice(e[i],1),this.params.virtual.cache&&delete this.virtual.cache[e[i]],e[i]0&&0===this.$el.parents("."+this.params.slideActiveClass).length)return;var o=t.innerWidth,l=t.innerHeight,d=this.$el.offset();s&&(d.left-=this.$el[0].scrollLeft);for(var h=[[d.left,d.top],[d.left+this.width,d.top],[d.left,d.top+this.height],[d.left+this.width,d.top+this.height]],p=0;p=0&&c[0]<=o&&c[1]>=0&&c[1]<=l&&(n=!0)}if(!n)return}this.isHorizontal()?(33!==r&&34!==r&&37!==r&&39!==r||(a.preventDefault?a.preventDefault():a.returnValue=!1),(34!==r&&39!==r||s)&&(33!==r&&37!==r||!s)||this.slideNext(),(33!==r&&37!==r||s)&&(34!==r&&39!==r||!s)||this.slidePrev()):(33!==r&&34!==r&&38!==r&&40!==r||(a.preventDefault?a.preventDefault():a.returnValue=!1),34!==r&&40!==r||this.slideNext(),33!==r&&38!==r||this.slidePrev()),this.emit("keyPress",r)}},enable:function(){this.keyboard.enabled||(s(e).on("keydown",this.keyboard.handle),this.keyboard.enabled=!0)},disable:function(){this.keyboard.enabled&&(s(e).off("keydown",this.keyboard.handle),this.keyboard.enabled=!1)}},te={name:"keyboard",params:{keyboard:{enabled:!1,onlyInViewport:!0}},create:function(){n.extend(this,{keyboard:{enabled:!1,enable:ee.enable.bind(this),disable:ee.disable.bind(this),handle:ee.handle.bind(this)}})},on:{init:function(){this.params.keyboard.enabled&&this.keyboard.enable()},destroy:function(){this.keyboard.enabled&&this.keyboard.disable()}}};var ie={lastScrollTime:n.now(),lastEventBeforeSnap:void 0,recentWheelEvents:[],event:function(){return t.navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":function(){var t="onwheel"in e;if(!t){var i=e.createElement("div");i.setAttribute("onwheel","return;"),t="function"==typeof i.onwheel}return!t&&e.implementation&&e.implementation.hasFeature&&!0!==e.implementation.hasFeature("","")&&(t=e.implementation.hasFeature("Events.wheel","3.0")),t}()?"wheel":"mousewheel"},normalize:function(e){var t=0,i=0,s=0,a=0;return"detail"in e&&(i=e.detail),"wheelDelta"in e&&(i=-e.wheelDelta/120),"wheelDeltaY"in e&&(i=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=i,i=0),s=10*t,a=10*i,"deltaY"in e&&(a=e.deltaY),"deltaX"in e&&(s=e.deltaX),e.shiftKey&&!s&&(s=a,a=0),(s||a)&&e.deltaMode&&(1===e.deltaMode?(s*=40,a*=40):(s*=800,a*=800)),s&&!t&&(t=s<1?-1:1),a&&!i&&(i=a<1?-1:1),{spinX:t,spinY:i,pixelX:s,pixelY:a}},handleMouseEnter:function(){this.mouseEntered=!0},handleMouseLeave:function(){this.mouseEntered=!1},handle:function(e){var t=e,i=this,a=i.params.mousewheel;i.params.cssMode&&t.preventDefault();var r=i.$el;if("container"!==i.params.mousewheel.eventsTarged&&(r=s(i.params.mousewheel.eventsTarged)),!i.mouseEntered&&!r[0].contains(t.target)&&!a.releaseOnEdges)return!0;t.originalEvent&&(t=t.originalEvent);var o=0,l=i.rtlTranslate?-1:1,d=ie.normalize(t);if(a.forceToAxis)if(i.isHorizontal()){if(!(Math.abs(d.pixelX)>Math.abs(d.pixelY)))return!0;o=d.pixelX*l}else{if(!(Math.abs(d.pixelY)>Math.abs(d.pixelX)))return!0;o=d.pixelY}else o=Math.abs(d.pixelX)>Math.abs(d.pixelY)?-d.pixelX*l:-d.pixelY;if(0===o)return!0;if(a.invert&&(o=-o),i.params.freeMode){var h={time:n.now(),delta:Math.abs(o),direction:Math.sign(o)},p=i.mousewheel.lastEventBeforeSnap,c=p&&h.time=i.minTranslate()&&(u=i.minTranslate()),u<=i.maxTranslate()&&(u=i.maxTranslate()),i.setTransition(0),i.setTranslate(u),i.updateProgress(),i.updateActiveIndex(),i.updateSlidesClasses(),(!v&&i.isBeginning||!f&&i.isEnd)&&i.updateSlidesClasses(),i.params.freeModeSticky){clearTimeout(i.mousewheel.timeout),i.mousewheel.timeout=void 0;var m=i.mousewheel.recentWheelEvents;m.length>=15&&m.shift();var g=m.length?m[m.length-1]:void 0,b=m[0];if(m.push(h),g&&(h.delta>g.delta||h.direction!==g.direction))m.splice(0);else if(m.length>=15&&h.time-b.time<500&&b.delta-h.delta>=1&&h.delta<=6){var w=o>0?.8:.2;i.mousewheel.lastEventBeforeSnap=h,m.splice(0),i.mousewheel.timeout=n.nextTick((function(){i.slideToClosest(i.params.speed,!0,void 0,w)}),0)}i.mousewheel.timeout||(i.mousewheel.timeout=n.nextTick((function(){i.mousewheel.lastEventBeforeSnap=h,m.splice(0),i.slideToClosest(i.params.speed,!0,void 0,.5)}),500))}if(c||i.emit("scroll",t),i.params.autoplay&&i.params.autoplayDisableOnInteraction&&i.autoplay.stop(),u===i.minTranslate()||u===i.maxTranslate())return!0}}else{var y={time:n.now(),delta:Math.abs(o),direction:Math.sign(o),raw:e},x=i.mousewheel.recentWheelEvents;x.length>=2&&x.shift();var T=x.length?x[x.length-1]:void 0;if(x.push(y),T?(y.direction!==T.direction||y.delta>T.delta)&&i.mousewheel.animateSlider(y):i.mousewheel.animateSlider(y),i.mousewheel.releaseScroll(y))return!0}return t.preventDefault?t.preventDefault():t.returnValue=!1,!1},animateSlider:function(e){return e.delta>=6&&n.now()-this.mousewheel.lastScrollTime<60||(e.direction<0?this.isEnd&&!this.params.loop||this.animating||(this.slideNext(),this.emit("scroll",e.raw)):this.isBeginning&&!this.params.loop||this.animating||(this.slidePrev(),this.emit("scroll",e.raw)),this.mousewheel.lastScrollTime=(new t.Date).getTime(),!1)},releaseScroll:function(e){var t=this.params.mousewheel;if(e.direction<0){if(this.isEnd&&!this.params.loop&&t.releaseOnEdges)return!0}else if(this.isBeginning&&!this.params.loop&&t.releaseOnEdges)return!0;return!1},enable:function(){var e=ie.event();if(this.params.cssMode)return this.wrapperEl.removeEventListener(e,this.mousewheel.handle),!0;if(!e)return!1;if(this.mousewheel.enabled)return!1;var t=this.$el;return"container"!==this.params.mousewheel.eventsTarged&&(t=s(this.params.mousewheel.eventsTarged)),t.on("mouseenter",this.mousewheel.handleMouseEnter),t.on("mouseleave",this.mousewheel.handleMouseLeave),t.on(e,this.mousewheel.handle),this.mousewheel.enabled=!0,!0},disable:function(){var e=ie.event();if(this.params.cssMode)return this.wrapperEl.addEventListener(e,this.mousewheel.handle),!0;if(!e)return!1;if(!this.mousewheel.enabled)return!1;var t=this.$el;return"container"!==this.params.mousewheel.eventsTarged&&(t=s(this.params.mousewheel.eventsTarged)),t.off(e,this.mousewheel.handle),this.mousewheel.enabled=!1,!0}},se={update:function(){var e=this.params.navigation;if(!this.params.loop){var t=this.navigation,i=t.$nextEl,s=t.$prevEl;s&&s.length>0&&(this.isBeginning?s.addClass(e.disabledClass):s.removeClass(e.disabledClass),s[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](e.lockClass)),i&&i.length>0&&(this.isEnd?i.addClass(e.disabledClass):i.removeClass(e.disabledClass),i[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](e.lockClass))}},onPrevClick:function(e){e.preventDefault(),this.isBeginning&&!this.params.loop||this.slidePrev()},onNextClick:function(e){e.preventDefault(),this.isEnd&&!this.params.loop||this.slideNext()},init:function(){var e,t,i=this.params.navigation;(i.nextEl||i.prevEl)&&(i.nextEl&&(e=s(i.nextEl),this.params.uniqueNavElements&&"string"==typeof i.nextEl&&e.length>1&&1===this.$el.find(i.nextEl).length&&(e=this.$el.find(i.nextEl))),i.prevEl&&(t=s(i.prevEl),this.params.uniqueNavElements&&"string"==typeof i.prevEl&&t.length>1&&1===this.$el.find(i.prevEl).length&&(t=this.$el.find(i.prevEl))),e&&e.length>0&&e.on("click",this.navigation.onNextClick),t&&t.length>0&&t.on("click",this.navigation.onPrevClick),n.extend(this.navigation,{$nextEl:e,nextEl:e&&e[0],$prevEl:t,prevEl:t&&t[0]}))},destroy:function(){var e=this.navigation,t=e.$nextEl,i=e.$prevEl;t&&t.length&&(t.off("click",this.navigation.onNextClick),t.removeClass(this.params.navigation.disabledClass)),i&&i.length&&(i.off("click",this.navigation.onPrevClick),i.removeClass(this.params.navigation.disabledClass))}},ae={update:function(){var e=this.rtl,t=this.params.pagination;if(t.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var i,a=this.virtual&&this.params.virtual.enabled?this.virtual.slides.length:this.slides.length,r=this.pagination.$el,n=this.params.loop?Math.ceil((a-2*this.loopedSlides)/this.params.slidesPerGroup):this.snapGrid.length;if(this.params.loop?((i=Math.ceil((this.activeIndex-this.loopedSlides)/this.params.slidesPerGroup))>a-1-2*this.loopedSlides&&(i-=a-2*this.loopedSlides),i>n-1&&(i-=n),i<0&&"bullets"!==this.params.paginationType&&(i=n+i)):i=void 0!==this.snapIndex?this.snapIndex:this.activeIndex||0,"bullets"===t.type&&this.pagination.bullets&&this.pagination.bullets.length>0){var o,l,d,h=this.pagination.bullets;if(t.dynamicBullets&&(this.pagination.bulletSize=h.eq(0)[this.isHorizontal()?"outerWidth":"outerHeight"](!0),r.css(this.isHorizontal()?"width":"height",this.pagination.bulletSize*(t.dynamicMainBullets+4)+"px"),t.dynamicMainBullets>1&&void 0!==this.previousIndex&&(this.pagination.dynamicBulletIndex+=i-this.previousIndex,this.pagination.dynamicBulletIndex>t.dynamicMainBullets-1?this.pagination.dynamicBulletIndex=t.dynamicMainBullets-1:this.pagination.dynamicBulletIndex<0&&(this.pagination.dynamicBulletIndex=0)),o=i-this.pagination.dynamicBulletIndex,d=((l=o+(Math.min(h.length,t.dynamicMainBullets)-1))+o)/2),h.removeClass(t.bulletActiveClass+" "+t.bulletActiveClass+"-next "+t.bulletActiveClass+"-next-next "+t.bulletActiveClass+"-prev "+t.bulletActiveClass+"-prev-prev "+t.bulletActiveClass+"-main"),r.length>1)h.each((function(e,a){var r=s(a),n=r.index();n===i&&r.addClass(t.bulletActiveClass),t.dynamicBullets&&(n>=o&&n<=l&&r.addClass(t.bulletActiveClass+"-main"),n===o&&r.prev().addClass(t.bulletActiveClass+"-prev").prev().addClass(t.bulletActiveClass+"-prev-prev"),n===l&&r.next().addClass(t.bulletActiveClass+"-next").next().addClass(t.bulletActiveClass+"-next-next"))}));else{var p=h.eq(i),c=p.index();if(p.addClass(t.bulletActiveClass),t.dynamicBullets){for(var u=h.eq(o),v=h.eq(l),f=o;f<=l;f+=1)h.eq(f).addClass(t.bulletActiveClass+"-main");if(this.params.loop)if(c>=h.length-t.dynamicMainBullets){for(var m=t.dynamicMainBullets;m>=0;m-=1)h.eq(h.length-m).addClass(t.bulletActiveClass+"-main");h.eq(h.length-t.dynamicMainBullets-1).addClass(t.bulletActiveClass+"-prev")}else u.prev().addClass(t.bulletActiveClass+"-prev").prev().addClass(t.bulletActiveClass+"-prev-prev"),v.next().addClass(t.bulletActiveClass+"-next").next().addClass(t.bulletActiveClass+"-next-next");else u.prev().addClass(t.bulletActiveClass+"-prev").prev().addClass(t.bulletActiveClass+"-prev-prev"),v.next().addClass(t.bulletActiveClass+"-next").next().addClass(t.bulletActiveClass+"-next-next")}}if(t.dynamicBullets){var g=Math.min(h.length,t.dynamicMainBullets+4),b=(this.pagination.bulletSize*g-this.pagination.bulletSize)/2-d*this.pagination.bulletSize,w=e?"right":"left";h.css(this.isHorizontal()?w:"top",b+"px")}}if("fraction"===t.type&&(r.find("."+t.currentClass).text(t.formatFractionCurrent(i+1)),r.find("."+t.totalClass).text(t.formatFractionTotal(n))),"progressbar"===t.type){var y;y=t.progressbarOpposite?this.isHorizontal()?"vertical":"horizontal":this.isHorizontal()?"horizontal":"vertical";var x=(i+1)/n,T=1,E=1;"horizontal"===y?T=x:E=x,r.find("."+t.progressbarFillClass).transform("translate3d(0,0,0) scaleX("+T+") scaleY("+E+")").transition(this.params.speed)}"custom"===t.type&&t.renderCustom?(r.html(t.renderCustom(this,i+1,n)),this.emit("paginationRender",this,r[0])):this.emit("paginationUpdate",this,r[0]),r[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](t.lockClass)}},render:function(){var e=this.params.pagination;if(e.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var t=this.virtual&&this.params.virtual.enabled?this.virtual.slides.length:this.slides.length,i=this.pagination.$el,s="";if("bullets"===e.type){for(var a=this.params.loop?Math.ceil((t-2*this.loopedSlides)/this.params.slidesPerGroup):this.snapGrid.length,r=0;r";i.html(s),this.pagination.bullets=i.find("."+e.bulletClass)}"fraction"===e.type&&(s=e.renderFraction?e.renderFraction.call(this,e.currentClass,e.totalClass):' / ',i.html(s)),"progressbar"===e.type&&(s=e.renderProgressbar?e.renderProgressbar.call(this,e.progressbarFillClass):'',i.html(s)),"custom"!==e.type&&this.emit("paginationRender",this.pagination.$el[0])}},init:function(){var e=this,t=e.params.pagination;if(t.el){var i=s(t.el);0!==i.length&&(e.params.uniqueNavElements&&"string"==typeof t.el&&i.length>1&&1===e.$el.find(t.el).length&&(i=e.$el.find(t.el)),"bullets"===t.type&&t.clickable&&i.addClass(t.clickableClass),i.addClass(t.modifierClass+t.type),"bullets"===t.type&&t.dynamicBullets&&(i.addClass(""+t.modifierClass+t.type+"-dynamic"),e.pagination.dynamicBulletIndex=0,t.dynamicMainBullets<1&&(t.dynamicMainBullets=1)),"progressbar"===t.type&&t.progressbarOpposite&&i.addClass(t.progressbarOppositeClass),t.clickable&&i.on("click","."+t.bulletClass,(function(t){t.preventDefault();var i=s(this).index()*e.params.slidesPerGroup;e.params.loop&&(i+=e.loopedSlides),e.slideTo(i)})),n.extend(e.pagination,{$el:i,el:i[0]}))}},destroy:function(){var e=this.params.pagination;if(e.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var t=this.pagination.$el;t.removeClass(e.hiddenClass),t.removeClass(e.modifierClass+e.type),this.pagination.bullets&&this.pagination.bullets.removeClass(e.bulletActiveClass),e.clickable&&t.off("click","."+e.bulletClass)}}},re={setTranslate:function(){if(this.params.scrollbar.el&&this.scrollbar.el){var e=this.scrollbar,t=this.rtlTranslate,i=this.progress,s=e.dragSize,a=e.trackSize,r=e.$dragEl,n=e.$el,o=this.params.scrollbar,l=s,d=(a-s)*i;t?(d=-d)>0?(l=s-d,d=0):-d+s>a&&(l=a+d):d<0?(l=s+d,d=0):d+s>a&&(l=a-d),this.isHorizontal()?(r.transform("translate3d("+d+"px, 0, 0)"),r[0].style.width=l+"px"):(r.transform("translate3d(0px, "+d+"px, 0)"),r[0].style.height=l+"px"),o.hide&&(clearTimeout(this.scrollbar.timeout),n[0].style.opacity=1,this.scrollbar.timeout=setTimeout((function(){n[0].style.opacity=0,n.transition(400)}),1e3))}},setTransition:function(e){this.params.scrollbar.el&&this.scrollbar.el&&this.scrollbar.$dragEl.transition(e)},updateSize:function(){if(this.params.scrollbar.el&&this.scrollbar.el){var e=this.scrollbar,t=e.$dragEl,i=e.$el;t[0].style.width="",t[0].style.height="";var s,a=this.isHorizontal()?i[0].offsetWidth:i[0].offsetHeight,r=this.size/this.virtualSize,o=r*(a/this.size);s="auto"===this.params.scrollbar.dragSize?a*r:parseInt(this.params.scrollbar.dragSize,10),this.isHorizontal()?t[0].style.width=s+"px":t[0].style.height=s+"px",i[0].style.display=r>=1?"none":"",this.params.scrollbar.hide&&(i[0].style.opacity=0),n.extend(e,{trackSize:a,divider:r,moveDivider:o,dragSize:s}),e.$el[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](this.params.scrollbar.lockClass)}},getPointerPosition:function(e){return this.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientX:e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientY:e.clientY},setDragPosition:function(e){var t,i=this.scrollbar,s=this.rtlTranslate,a=i.$el,r=i.dragSize,n=i.trackSize,o=i.dragStartPos;t=(i.getPointerPosition(e)-a.offset()[this.isHorizontal()?"left":"top"]-(null!==o?o:r/2))/(n-r),t=Math.max(Math.min(t,1),0),s&&(t=1-t);var l=this.minTranslate()+(this.maxTranslate()-this.minTranslate())*t;this.updateProgress(l),this.setTranslate(l),this.updateActiveIndex(),this.updateSlidesClasses()},onDragStart:function(e){var t=this.params.scrollbar,i=this.scrollbar,s=this.$wrapperEl,a=i.$el,r=i.$dragEl;this.scrollbar.isTouched=!0,this.scrollbar.dragStartPos=e.target===r[0]||e.target===r?i.getPointerPosition(e)-e.target.getBoundingClientRect()[this.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),s.transition(100),r.transition(100),i.setDragPosition(e),clearTimeout(this.scrollbar.dragTimeout),a.transition(0),t.hide&&a.css("opacity",1),this.params.cssMode&&this.$wrapperEl.css("scroll-snap-type","none"),this.emit("scrollbarDragStart",e)},onDragMove:function(e){var t=this.scrollbar,i=this.$wrapperEl,s=t.$el,a=t.$dragEl;this.scrollbar.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,t.setDragPosition(e),i.transition(0),s.transition(0),a.transition(0),this.emit("scrollbarDragMove",e))},onDragEnd:function(e){var t=this.params.scrollbar,i=this.scrollbar,s=this.$wrapperEl,a=i.$el;this.scrollbar.isTouched&&(this.scrollbar.isTouched=!1,this.params.cssMode&&(this.$wrapperEl.css("scroll-snap-type",""),s.transition("")),t.hide&&(clearTimeout(this.scrollbar.dragTimeout),this.scrollbar.dragTimeout=n.nextTick((function(){a.css("opacity",0),a.transition(400)}),1e3)),this.emit("scrollbarDragEnd",e),t.snapOnRelease&&this.slideToClosest())},enableDraggable:function(){if(this.params.scrollbar.el){var t=this.scrollbar,i=this.touchEventsTouch,s=this.touchEventsDesktop,a=this.params,r=t.$el[0],n=!(!o.passiveListener||!a.passiveListeners)&&{passive:!1,capture:!1},l=!(!o.passiveListener||!a.passiveListeners)&&{passive:!0,capture:!1};o.touch?(r.addEventListener(i.start,this.scrollbar.onDragStart,n),r.addEventListener(i.move,this.scrollbar.onDragMove,n),r.addEventListener(i.end,this.scrollbar.onDragEnd,l)):(r.addEventListener(s.start,this.scrollbar.onDragStart,n),e.addEventListener(s.move,this.scrollbar.onDragMove,n),e.addEventListener(s.end,this.scrollbar.onDragEnd,l))}},disableDraggable:function(){if(this.params.scrollbar.el){var t=this.scrollbar,i=this.touchEventsTouch,s=this.touchEventsDesktop,a=this.params,r=t.$el[0],n=!(!o.passiveListener||!a.passiveListeners)&&{passive:!1,capture:!1},l=!(!o.passiveListener||!a.passiveListeners)&&{passive:!0,capture:!1};o.touch?(r.removeEventListener(i.start,this.scrollbar.onDragStart,n),r.removeEventListener(i.move,this.scrollbar.onDragMove,n),r.removeEventListener(i.end,this.scrollbar.onDragEnd,l)):(r.removeEventListener(s.start,this.scrollbar.onDragStart,n),e.removeEventListener(s.move,this.scrollbar.onDragMove,n),e.removeEventListener(s.end,this.scrollbar.onDragEnd,l))}},init:function(){if(this.params.scrollbar.el){var e=this.scrollbar,t=this.$el,i=this.params.scrollbar,a=s(i.el);this.params.uniqueNavElements&&"string"==typeof i.el&&a.length>1&&1===t.find(i.el).length&&(a=t.find(i.el));var r=a.find("."+this.params.scrollbar.dragClass);0===r.length&&(r=s('
      '),a.append(r)),n.extend(e,{$el:a,el:a[0],$dragEl:r,dragEl:r[0]}),i.draggable&&e.enableDraggable()}},destroy:function(){this.scrollbar.disableDraggable()}},ne={setTransform:function(e,t){var i=this.rtl,a=s(e),r=i?-1:1,n=a.attr("data-swiper-parallax")||"0",o=a.attr("data-swiper-parallax-x"),l=a.attr("data-swiper-parallax-y"),d=a.attr("data-swiper-parallax-scale"),h=a.attr("data-swiper-parallax-opacity");if(o||l?(o=o||"0",l=l||"0"):this.isHorizontal()?(o=n,l="0"):(l=n,o="0"),o=o.indexOf("%")>=0?parseInt(o,10)*t*r+"%":o*t*r+"px",l=l.indexOf("%")>=0?parseInt(l,10)*t+"%":l*t+"px",null!=h){var p=h-(h-1)*(1-Math.abs(t));a[0].style.opacity=p}if(null==d)a.transform("translate3d("+o+", "+l+", 0px)");else{var c=d-(d-1)*(1-Math.abs(t));a.transform("translate3d("+o+", "+l+", 0px) scale("+c+")")}},setTranslate:function(){var e=this,t=e.$el,i=e.slides,a=e.progress,r=e.snapGrid;t.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t,i){e.parallax.setTransform(i,a)})),i.each((function(t,i){var n=i.progress;e.params.slidesPerGroup>1&&"auto"!==e.params.slidesPerView&&(n+=Math.ceil(t/2)-a*(r.length-1)),n=Math.min(Math.max(n,-1),1),s(i).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t,i){e.parallax.setTransform(i,n)}))}))},setTransition:function(e){void 0===e&&(e=this.params.speed);this.$el.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t,i){var a=s(i),r=parseInt(a.attr("data-swiper-parallax-duration"),10)||e;0===e&&(r=0),a.transition(r)}))}},oe={getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var t=e.targetTouches[0].pageX,i=e.targetTouches[0].pageY,s=e.targetTouches[1].pageX,a=e.targetTouches[1].pageY;return Math.sqrt(Math.pow(s-t,2)+Math.pow(a-i,2))},onGestureStart:function(e){var t=this.params.zoom,i=this.zoom,a=i.gesture;if(i.fakeGestureTouched=!1,i.fakeGestureMoved=!1,!o.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;i.fakeGestureTouched=!0,a.scaleStart=oe.getDistanceBetweenTouches(e)}a.$slideEl&&a.$slideEl.length||(a.$slideEl=s(e.target).closest(".swiper-slide"),0===a.$slideEl.length&&(a.$slideEl=this.slides.eq(this.activeIndex)),a.$imageEl=a.$slideEl.find("img, svg, canvas"),a.$imageWrapEl=a.$imageEl.parent("."+t.containerClass),a.maxRatio=a.$imageWrapEl.attr("data-swiper-zoom")||t.maxRatio,0!==a.$imageWrapEl.length)?(a.$imageEl.transition(0),this.zoom.isScaling=!0):a.$imageEl=void 0},onGestureChange:function(e){var t=this.params.zoom,i=this.zoom,s=i.gesture;if(!o.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;i.fakeGestureMoved=!0,s.scaleMove=oe.getDistanceBetweenTouches(e)}s.$imageEl&&0!==s.$imageEl.length&&(o.gestures?i.scale=e.scale*i.currentScale:i.scale=s.scaleMove/s.scaleStart*i.currentScale,i.scale>s.maxRatio&&(i.scale=s.maxRatio-1+Math.pow(i.scale-s.maxRatio+1,.5)),i.scales.touchesStart.x))return void(s.isTouched=!1);if(!this.isHorizontal()&&(Math.floor(s.minY)===Math.floor(s.startY)&&s.touchesCurrent.ys.touchesStart.y))return void(s.isTouched=!1)}e.preventDefault(),e.stopPropagation(),s.isMoved=!0,s.currentX=s.touchesCurrent.x-s.touchesStart.x+s.startX,s.currentY=s.touchesCurrent.y-s.touchesStart.y+s.startY,s.currentXs.maxX&&(s.currentX=s.maxX-1+Math.pow(s.currentX-s.maxX+1,.8)),s.currentYs.maxY&&(s.currentY=s.maxY-1+Math.pow(s.currentY-s.maxY+1,.8)),a.prevPositionX||(a.prevPositionX=s.touchesCurrent.x),a.prevPositionY||(a.prevPositionY=s.touchesCurrent.y),a.prevTime||(a.prevTime=Date.now()),a.x=(s.touchesCurrent.x-a.prevPositionX)/(Date.now()-a.prevTime)/2,a.y=(s.touchesCurrent.y-a.prevPositionY)/(Date.now()-a.prevTime)/2,Math.abs(s.touchesCurrent.x-a.prevPositionX)<2&&(a.x=0),Math.abs(s.touchesCurrent.y-a.prevPositionY)<2&&(a.y=0),a.prevPositionX=s.touchesCurrent.x,a.prevPositionY=s.touchesCurrent.y,a.prevTime=Date.now(),i.$imageWrapEl.transform("translate3d("+s.currentX+"px, "+s.currentY+"px,0)")}}},onTouchEnd:function(){var e=this.zoom,t=e.gesture,i=e.image,s=e.velocity;if(t.$imageEl&&0!==t.$imageEl.length){if(!i.isTouched||!i.isMoved)return i.isTouched=!1,void(i.isMoved=!1);i.isTouched=!1,i.isMoved=!1;var a=300,r=300,n=s.x*a,o=i.currentX+n,l=s.y*r,d=i.currentY+l;0!==s.x&&(a=Math.abs((o-i.currentX)/s.x)),0!==s.y&&(r=Math.abs((d-i.currentY)/s.y));var h=Math.max(a,r);i.currentX=o,i.currentY=d;var p=i.width*e.scale,c=i.height*e.scale;i.minX=Math.min(t.slideWidth/2-p/2,0),i.maxX=-i.minX,i.minY=Math.min(t.slideHeight/2-c/2,0),i.maxY=-i.minY,i.currentX=Math.max(Math.min(i.currentX,i.maxX),i.minX),i.currentY=Math.max(Math.min(i.currentY,i.maxY),i.minY),t.$imageWrapEl.transition(h).transform("translate3d("+i.currentX+"px, "+i.currentY+"px,0)")}},onTransitionEnd:function(){var e=this.zoom,t=e.gesture;t.$slideEl&&this.previousIndex!==this.activeIndex&&(t.$imageEl.transform("translate3d(0,0,0) scale(1)"),t.$imageWrapEl.transform("translate3d(0,0,0)"),e.scale=1,e.currentScale=1,t.$slideEl=void 0,t.$imageEl=void 0,t.$imageWrapEl=void 0)},toggle:function(e){var t=this.zoom;t.scale&&1!==t.scale?t.out():t.in(e)},in:function(e){var t,i,a,r,n,o,l,d,h,p,c,u,v,f,m,g,b=this.zoom,w=this.params.zoom,y=b.gesture,x=b.image;(y.$slideEl||(y.$slideEl=this.clickedSlide?s(this.clickedSlide):this.slides.eq(this.activeIndex),y.$imageEl=y.$slideEl.find("img, svg, canvas"),y.$imageWrapEl=y.$imageEl.parent("."+w.containerClass)),y.$imageEl&&0!==y.$imageEl.length)&&(y.$slideEl.addClass(""+w.zoomedSlideClass),void 0===x.touchesStart.x&&e?(t="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,i="touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(t=x.touchesStart.x,i=x.touchesStart.y),b.scale=y.$imageWrapEl.attr("data-swiper-zoom")||w.maxRatio,b.currentScale=y.$imageWrapEl.attr("data-swiper-zoom")||w.maxRatio,e?(m=y.$slideEl[0].offsetWidth,g=y.$slideEl[0].offsetHeight,a=y.$slideEl.offset().left+m/2-t,r=y.$slideEl.offset().top+g/2-i,l=y.$imageEl[0].offsetWidth,d=y.$imageEl[0].offsetHeight,h=l*b.scale,p=d*b.scale,v=-(c=Math.min(m/2-h/2,0)),f=-(u=Math.min(g/2-p/2,0)),(n=a*b.scale)v&&(n=v),(o=r*b.scale)f&&(o=f)):(n=0,o=0),y.$imageWrapEl.transition(300).transform("translate3d("+n+"px, "+o+"px,0)"),y.$imageEl.transition(300).transform("translate3d(0,0,0) scale("+b.scale+")"))},out:function(){var e=this.zoom,t=this.params.zoom,i=e.gesture;i.$slideEl||(i.$slideEl=this.clickedSlide?s(this.clickedSlide):this.slides.eq(this.activeIndex),i.$imageEl=i.$slideEl.find("img, svg, canvas"),i.$imageWrapEl=i.$imageEl.parent("."+t.containerClass)),i.$imageEl&&0!==i.$imageEl.length&&(e.scale=1,e.currentScale=1,i.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),i.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),i.$slideEl.removeClass(""+t.zoomedSlideClass),i.$slideEl=void 0)},enable:function(){var e=this.zoom;if(!e.enabled){e.enabled=!0;var t=!("touchstart"!==this.touchEvents.start||!o.passiveListener||!this.params.passiveListeners)&&{passive:!0,capture:!1},i=!o.passiveListener||{passive:!1,capture:!0};o.gestures?(this.$wrapperEl.on("gesturestart",".swiper-slide",e.onGestureStart,t),this.$wrapperEl.on("gesturechange",".swiper-slide",e.onGestureChange,t),this.$wrapperEl.on("gestureend",".swiper-slide",e.onGestureEnd,t)):"touchstart"===this.touchEvents.start&&(this.$wrapperEl.on(this.touchEvents.start,".swiper-slide",e.onGestureStart,t),this.$wrapperEl.on(this.touchEvents.move,".swiper-slide",e.onGestureChange,i),this.$wrapperEl.on(this.touchEvents.end,".swiper-slide",e.onGestureEnd,t),this.touchEvents.cancel&&this.$wrapperEl.on(this.touchEvents.cancel,".swiper-slide",e.onGestureEnd,t)),this.$wrapperEl.on(this.touchEvents.move,"."+this.params.zoom.containerClass,e.onTouchMove,i)}},disable:function(){var e=this.zoom;if(e.enabled){this.zoom.enabled=!1;var t=!("touchstart"!==this.touchEvents.start||!o.passiveListener||!this.params.passiveListeners)&&{passive:!0,capture:!1},i=!o.passiveListener||{passive:!1,capture:!0};o.gestures?(this.$wrapperEl.off("gesturestart",".swiper-slide",e.onGestureStart,t),this.$wrapperEl.off("gesturechange",".swiper-slide",e.onGestureChange,t),this.$wrapperEl.off("gestureend",".swiper-slide",e.onGestureEnd,t)):"touchstart"===this.touchEvents.start&&(this.$wrapperEl.off(this.touchEvents.start,".swiper-slide",e.onGestureStart,t),this.$wrapperEl.off(this.touchEvents.move,".swiper-slide",e.onGestureChange,i),this.$wrapperEl.off(this.touchEvents.end,".swiper-slide",e.onGestureEnd,t),this.touchEvents.cancel&&this.$wrapperEl.off(this.touchEvents.cancel,".swiper-slide",e.onGestureEnd,t)),this.$wrapperEl.off(this.touchEvents.move,"."+this.params.zoom.containerClass,e.onTouchMove,i)}}},le={loadInSlide:function(e,t){void 0===t&&(t=!0);var i=this,a=i.params.lazy;if(void 0!==e&&0!==i.slides.length){var r=i.virtual&&i.params.virtual.enabled?i.$wrapperEl.children("."+i.params.slideClass+'[data-swiper-slide-index="'+e+'"]'):i.slides.eq(e),n=r.find("."+a.elementClass+":not(."+a.loadedClass+"):not(."+a.loadingClass+")");!r.hasClass(a.elementClass)||r.hasClass(a.loadedClass)||r.hasClass(a.loadingClass)||(n=n.add(r[0])),0!==n.length&&n.each((function(e,n){var o=s(n);o.addClass(a.loadingClass);var l=o.attr("data-background"),d=o.attr("data-src"),h=o.attr("data-srcset"),p=o.attr("data-sizes");i.loadImage(o[0],d||l,h,p,!1,(function(){if(null!=i&&i&&(!i||i.params)&&!i.destroyed){if(l?(o.css("background-image",'url("'+l+'")'),o.removeAttr("data-background")):(h&&(o.attr("srcset",h),o.removeAttr("data-srcset")),p&&(o.attr("sizes",p),o.removeAttr("data-sizes")),d&&(o.attr("src",d),o.removeAttr("data-src"))),o.addClass(a.loadedClass).removeClass(a.loadingClass),r.find("."+a.preloaderClass).remove(),i.params.loop&&t){var e=r.attr("data-swiper-slide-index");if(r.hasClass(i.params.slideDuplicateClass)){var s=i.$wrapperEl.children('[data-swiper-slide-index="'+e+'"]:not(.'+i.params.slideDuplicateClass+")");i.lazy.loadInSlide(s.index(),!1)}else{var n=i.$wrapperEl.children("."+i.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');i.lazy.loadInSlide(n.index(),!1)}}i.emit("lazyImageReady",r[0],o[0])}})),i.emit("lazyImageLoad",r[0],o[0])}))}},load:function(){var e=this,t=e.$wrapperEl,i=e.params,a=e.slides,r=e.activeIndex,n=e.virtual&&i.virtual.enabled,o=i.lazy,l=i.slidesPerView;function d(e){if(n){if(t.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]').length)return!0}else if(a[e])return!0;return!1}function h(e){return n?s(e).attr("data-swiper-slide-index"):s(e).index()}if("auto"===l&&(l=0),e.lazy.initialImageLoaded||(e.lazy.initialImageLoaded=!0),e.params.watchSlidesVisibility)t.children("."+i.slideVisibleClass).each((function(t,i){var a=n?s(i).attr("data-swiper-slide-index"):s(i).index();e.lazy.loadInSlide(a)}));else if(l>1)for(var p=r;p1||o.loadPrevNextAmount&&o.loadPrevNextAmount>1){for(var c=o.loadPrevNextAmount,u=l,v=Math.min(r+u+Math.max(c,u),a.length),f=Math.max(r-Math.max(u,c),0),m=r+l;m0&&e.lazy.loadInSlide(h(b));var w=t.children("."+i.slidePrevClass);w.length>0&&e.lazy.loadInSlide(h(w))}}},de={LinearSpline:function(e,t){var i,s,a,r,n,o=function(e,t){for(s=-1,i=e.length;i-s>1;)e[a=i+s>>1]<=t?s=a:i=a;return i};return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(n=o(this.x,e),r=n-1,(e-this.x[r])*(this.y[n]-this.y[r])/(this.x[n]-this.x[r])+this.y[r]):0},this},getInterpolateFunction:function(e){this.controller.spline||(this.controller.spline=this.params.loop?new de.LinearSpline(this.slidesGrid,e.slidesGrid):new de.LinearSpline(this.snapGrid,e.snapGrid))},setTranslate:function(e,t){var i,s,a=this,r=a.controller.control;function n(e){var t=a.rtlTranslate?-a.translate:a.translate;"slide"===a.params.controller.by&&(a.controller.getInterpolateFunction(e),s=-a.controller.spline.interpolate(-t)),s&&"container"!==a.params.controller.by||(i=(e.maxTranslate()-e.minTranslate())/(a.maxTranslate()-a.minTranslate()),s=(t-a.minTranslate())*i+e.minTranslate()),a.params.controller.inverse&&(s=e.maxTranslate()-s),e.updateProgress(s),e.setTranslate(s,a),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(r))for(var o=0;o0&&(this.isBeginning?this.a11y.disableEl(i):this.a11y.enableEl(i)),t&&t.length>0&&(this.isEnd?this.a11y.disableEl(t):this.a11y.enableEl(t))}},updatePagination:function(){var e=this,t=e.params.a11y;e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.bullets.each((function(i,a){var r=s(a);e.a11y.makeElFocusable(r),e.a11y.addElRole(r,"button"),e.a11y.addElLabel(r,t.paginationBulletMessage.replace(/{{index}}/,r.index()+1))}))},init:function(){this.$el.append(this.a11y.liveRegion);var e,t,i=this.params.a11y;this.navigation&&this.navigation.$nextEl&&(e=this.navigation.$nextEl),this.navigation&&this.navigation.$prevEl&&(t=this.navigation.$prevEl),e&&(this.a11y.makeElFocusable(e),this.a11y.addElRole(e,"button"),this.a11y.addElLabel(e,i.nextSlideMessage),e.on("keydown",this.a11y.onEnterKey)),t&&(this.a11y.makeElFocusable(t),this.a11y.addElRole(t,"button"),this.a11y.addElLabel(t,i.prevSlideMessage),t.on("keydown",this.a11y.onEnterKey)),this.pagination&&this.params.pagination.clickable&&this.pagination.bullets&&this.pagination.bullets.length&&this.pagination.$el.on("keydown","."+this.params.pagination.bulletClass,this.a11y.onEnterKey)},destroy:function(){var e,t;this.a11y.liveRegion&&this.a11y.liveRegion.length>0&&this.a11y.liveRegion.remove(),this.navigation&&this.navigation.$nextEl&&(e=this.navigation.$nextEl),this.navigation&&this.navigation.$prevEl&&(t=this.navigation.$prevEl),e&&e.off("keydown",this.a11y.onEnterKey),t&&t.off("keydown",this.a11y.onEnterKey),this.pagination&&this.params.pagination.clickable&&this.pagination.bullets&&this.pagination.bullets.length&&this.pagination.$el.off("keydown","."+this.params.pagination.bulletClass,this.a11y.onEnterKey)}},pe={init:function(){if(this.params.history){if(!t.history||!t.history.pushState)return this.params.history.enabled=!1,void(this.params.hashNavigation.enabled=!0);var e=this.history;e.initialized=!0,e.paths=pe.getPathValues(),(e.paths.key||e.paths.value)&&(e.scrollToSlide(0,e.paths.value,this.params.runCallbacksOnInit),this.params.history.replaceState||t.addEventListener("popstate",this.history.setHistoryPopState))}},destroy:function(){this.params.history.replaceState||t.removeEventListener("popstate",this.history.setHistoryPopState)},setHistoryPopState:function(){this.history.paths=pe.getPathValues(),this.history.scrollToSlide(this.params.speed,this.history.paths.value,!1)},getPathValues:function(){var e=t.location.pathname.slice(1).split("/").filter((function(e){return""!==e})),i=e.length;return{key:e[i-2],value:e[i-1]}},setHistory:function(e,i){if(this.history.initialized&&this.params.history.enabled){var s=this.slides.eq(i),a=pe.slugify(s.attr("data-history"));t.location.pathname.includes(e)||(a=e+"/"+a);var r=t.history.state;r&&r.value===a||(this.params.history.replaceState?t.history.replaceState({value:a},null,a):t.history.pushState({value:a},null,a))}},slugify:function(e){return e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(e,t,i){if(t)for(var s=0,a=this.slides.length;s'),i.append(e)),e.css({height:r+"px"})):0===(e=t.find(".swiper-cube-shadow")).length&&(e=s('
      '),t.append(e)));for(var u=0;u-1&&(c=90*f+90*b,o&&(c=90*-f-90*b)),v.transform(T),d.slideShadows){var E=h?v.find(".swiper-slide-shadow-left"):v.find(".swiper-slide-shadow-top"),S=h?v.find(".swiper-slide-shadow-right"):v.find(".swiper-slide-shadow-bottom");0===E.length&&(E=s('
      '),v.append(E)),0===S.length&&(S=s('
      '),v.append(S)),E.length&&(E[0].style.opacity=Math.max(-b,0)),S.length&&(S[0].style.opacity=Math.max(b,0))}}if(i.css({"-webkit-transform-origin":"50% 50% -"+l/2+"px","-moz-transform-origin":"50% 50% -"+l/2+"px","-ms-transform-origin":"50% 50% -"+l/2+"px","transform-origin":"50% 50% -"+l/2+"px"}),d.shadow)if(h)e.transform("translate3d(0px, "+(r/2+d.shadowOffset)+"px, "+-r/2+"px) rotateX(90deg) rotateZ(0deg) scale("+d.shadowScale+")");else{var C=Math.abs(c)-90*Math.floor(Math.abs(c)/90),M=1.5-(Math.sin(2*C*Math.PI/360)/2+Math.cos(2*C*Math.PI/360)/2),P=d.shadowScale,z=d.shadowScale/M,k=d.shadowOffset;e.transform("scale3d("+P+", 1, "+z+") translate3d(0px, "+(n/2+k)+"px, "+-n/2/z+"px) rotateX(-90deg)")}var $=j.isSafari||j.isUiWebView?-l/2:0;i.transform("translate3d(0px,0,"+$+"px) rotateX("+(this.isHorizontal()?0:c)+"deg) rotateY("+(this.isHorizontal()?-c:0)+"deg)")},setTransition:function(e){var t=this.$el;this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),this.params.cubeEffect.shadow&&!this.isHorizontal()&&t.find(".swiper-cube-shadow").transition(e)}},me={setTranslate:function(){for(var e=this.slides,t=this.rtlTranslate,i=0;i'),a.append(h)),0===p.length&&(p=s('
      '),a.append(p)),h.length&&(h[0].style.opacity=Math.max(-r,0)),p.length&&(p[0].style.opacity=Math.max(r,0))}a.transform("translate3d("+l+"px, "+d+"px, 0px) rotateX("+o+"deg) rotateY("+n+"deg)")}},setTransition:function(e){var t=this,i=t.slides,s=t.activeIndex,a=t.$wrapperEl;if(i.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.virtualTranslate&&0!==e){var r=!1;i.eq(s).transitionEnd((function(){if(!r&&t&&!t.destroyed){r=!0,t.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],i=0;i'),f.append(S)),0===C.length&&(C=s('
      '),f.append(C)),S.length&&(S[0].style.opacity=g>0?g:0),C.length&&(C[0].style.opacity=-g>0?-g:0)}}(o.pointerEvents||o.prefixedPointerEvents)&&(a[0].style.perspectiveOrigin=h+"px 50%")},setTransition:function(e){this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}},be={init:function(){var e=this.params.thumbs,t=this.constructor;e.swiper instanceof t?(this.thumbs.swiper=e.swiper,n.extend(this.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),n.extend(this.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1})):n.isObject(e.swiper)&&(this.thumbs.swiper=new t(n.extend({},e.swiper,{watchSlidesVisibility:!0,watchSlidesProgress:!0,slideToClickedSlide:!1})),this.thumbs.swiperCreated=!0),this.thumbs.swiper.$el.addClass(this.params.thumbs.thumbsContainerClass),this.thumbs.swiper.on("tap",this.thumbs.onThumbClick)},onThumbClick:function(){var e=this.thumbs.swiper;if(e){var t=e.clickedIndex,i=e.clickedSlide;if(!(i&&s(i).hasClass(this.params.thumbs.slideThumbActiveClass)||null==t)){var a;if(a=e.params.loop?parseInt(s(e.clickedSlide).attr("data-swiper-slide-index"),10):t,this.params.loop){var r=this.activeIndex;this.slides.eq(r).hasClass(this.params.slideDuplicateClass)&&(this.loopFix(),this._clientLeft=this.$wrapperEl[0].clientLeft,r=this.activeIndex);var n=this.slides.eq(r).prevAll('[data-swiper-slide-index="'+a+'"]').eq(0).index(),o=this.slides.eq(r).nextAll('[data-swiper-slide-index="'+a+'"]').eq(0).index();a=void 0===n?o:void 0===o?n:o-ra?s-Math.floor(i/2)+1:s+Math.floor(i/2)-1:s>a&&(s=s-i+1),t.slideTo(s,e?0:void 0))}var o=1,l=this.params.thumbs.slideThumbActiveClass;if(this.params.slidesPerView>1&&!this.params.centeredSlides&&(o=this.params.slidesPerView),this.params.thumbs.multipleActiveThumbs||(o=1),o=Math.floor(o),t.slides.removeClass(l),t.params.loop||t.params.virtual&&t.params.virtual.enabled)for(var d=0;d0&&!s(e.target).hasClass(this.params.pagination.bulletClass)&&(!0===this.pagination.$el.hasClass(this.params.pagination.hiddenClass)?this.emit("paginationShow",this):this.emit("paginationHide",this),this.pagination.$el.toggleClass(this.params.pagination.hiddenClass))}}},{name:"scrollbar",params:{scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag"}},create:function(){n.extend(this,{scrollbar:{init:re.init.bind(this),destroy:re.destroy.bind(this),updateSize:re.updateSize.bind(this),setTranslate:re.setTranslate.bind(this),setTransition:re.setTransition.bind(this),enableDraggable:re.enableDraggable.bind(this),disableDraggable:re.disableDraggable.bind(this),setDragPosition:re.setDragPosition.bind(this),getPointerPosition:re.getPointerPosition.bind(this),onDragStart:re.onDragStart.bind(this),onDragMove:re.onDragMove.bind(this),onDragEnd:re.onDragEnd.bind(this),isTouched:!1,timeout:null,dragTimeout:null}})},on:{init:function(){this.scrollbar.init(),this.scrollbar.updateSize(),this.scrollbar.setTranslate()},update:function(){this.scrollbar.updateSize()},resize:function(){this.scrollbar.updateSize()},observerUpdate:function(){this.scrollbar.updateSize()},setTranslate:function(){this.scrollbar.setTranslate()},setTransition:function(e){this.scrollbar.setTransition(e)},destroy:function(){this.scrollbar.destroy()}}},{name:"parallax",params:{parallax:{enabled:!1}},create:function(){n.extend(this,{parallax:{setTransform:ne.setTransform.bind(this),setTranslate:ne.setTranslate.bind(this),setTransition:ne.setTransition.bind(this)}})},on:{beforeInit:function(){this.params.parallax.enabled&&(this.params.watchSlidesProgress=!0,this.originalParams.watchSlidesProgress=!0)},init:function(){this.params.parallax.enabled&&this.parallax.setTranslate()},setTranslate:function(){this.params.parallax.enabled&&this.parallax.setTranslate()},setTransition:function(e){this.params.parallax.enabled&&this.parallax.setTransition(e)}}},{name:"zoom",params:{zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}},create:function(){var e=this,t={enabled:!1,scale:1,currentScale:1,isScaling:!1,gesture:{$slideEl:void 0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void 0,maxRatio:3},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0}};"onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out".split(" ").forEach((function(i){t[i]=oe[i].bind(e)})),n.extend(e,{zoom:t});var i=1;Object.defineProperty(e.zoom,"scale",{get:function(){return i},set:function(t){if(i!==t){var s=e.zoom.gesture.$imageEl?e.zoom.gesture.$imageEl[0]:void 0,a=e.zoom.gesture.$slideEl?e.zoom.gesture.$slideEl[0]:void 0;e.emit("zoomChange",t,s,a)}i=t}})},on:{init:function(){this.params.zoom.enabled&&this.zoom.enable()},destroy:function(){this.zoom.disable()},touchStart:function(e){this.zoom.enabled&&this.zoom.onTouchStart(e)},touchEnd:function(e){this.zoom.enabled&&this.zoom.onTouchEnd(e)},doubleTap:function(e){this.params.zoom.enabled&&this.zoom.enabled&&this.params.zoom.toggle&&this.zoom.toggle(e)},transitionEnd:function(){this.zoom.enabled&&this.params.zoom.enabled&&this.zoom.onTransitionEnd()},slideChange:function(){this.zoom.enabled&&this.params.zoom.enabled&&this.params.cssMode&&this.zoom.onTransitionEnd()}}},{name:"lazy",params:{lazy:{enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}},create:function(){n.extend(this,{lazy:{initialImageLoaded:!1,load:le.load.bind(this),loadInSlide:le.loadInSlide.bind(this)}})},on:{beforeInit:function(){this.params.lazy.enabled&&this.params.preloadImages&&(this.params.preloadImages=!1)},init:function(){this.params.lazy.enabled&&!this.params.loop&&0===this.params.initialSlide&&this.lazy.load()},scroll:function(){this.params.freeMode&&!this.params.freeModeSticky&&this.lazy.load()},resize:function(){this.params.lazy.enabled&&this.lazy.load()},scrollbarDragMove:function(){this.params.lazy.enabled&&this.lazy.load()},transitionStart:function(){this.params.lazy.enabled&&(this.params.lazy.loadOnTransitionStart||!this.params.lazy.loadOnTransitionStart&&!this.lazy.initialImageLoaded)&&this.lazy.load()},transitionEnd:function(){this.params.lazy.enabled&&!this.params.lazy.loadOnTransitionStart&&this.lazy.load()},slideChange:function(){this.params.lazy.enabled&&this.params.cssMode&&this.lazy.load()}}},{name:"controller",params:{controller:{control:void 0,inverse:!1,by:"slide"}},create:function(){n.extend(this,{controller:{control:this.params.controller.control,getInterpolateFunction:de.getInterpolateFunction.bind(this),setTranslate:de.setTranslate.bind(this),setTransition:de.setTransition.bind(this)}})},on:{update:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void 0,delete this.controller.spline)},resize:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void 0,delete this.controller.spline)},observerUpdate:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void 0,delete this.controller.spline)},setTranslate:function(e,t){this.controller.control&&this.controller.setTranslate(e,t)},setTransition:function(e,t){this.controller.control&&this.controller.setTransition(e,t)}}},{name:"a11y",params:{a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}"}},create:function(){var e=this;n.extend(e,{a11y:{liveRegion:s('')}}),Object.keys(he).forEach((function(t){e.a11y[t]=he[t].bind(e)}))},on:{init:function(){this.params.a11y.enabled&&(this.a11y.init(),this.a11y.updateNavigation())},toEdge:function(){this.params.a11y.enabled&&this.a11y.updateNavigation()},fromEdge:function(){this.params.a11y.enabled&&this.a11y.updateNavigation()},paginationUpdate:function(){this.params.a11y.enabled&&this.a11y.updatePagination()},destroy:function(){this.params.a11y.enabled&&this.a11y.destroy()}}},{name:"history",params:{history:{enabled:!1,replaceState:!1,key:"slides"}},create:function(){n.extend(this,{history:{init:pe.init.bind(this),setHistory:pe.setHistory.bind(this),setHistoryPopState:pe.setHistoryPopState.bind(this),scrollToSlide:pe.scrollToSlide.bind(this),destroy:pe.destroy.bind(this)}})},on:{init:function(){this.params.history.enabled&&this.history.init()},destroy:function(){this.params.history.enabled&&this.history.destroy()},transitionEnd:function(){this.history.initialized&&this.history.setHistory(this.params.history.key,this.activeIndex)},slideChange:function(){this.history.initialized&&this.params.cssMode&&this.history.setHistory(this.params.history.key,this.activeIndex)}}},{name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create:function(){n.extend(this,{hashNavigation:{initialized:!1,init:ce.init.bind(this),destroy:ce.destroy.bind(this),setHash:ce.setHash.bind(this),onHashCange:ce.onHashCange.bind(this)}})},on:{init:function(){this.params.hashNavigation.enabled&&this.hashNavigation.init()},destroy:function(){this.params.hashNavigation.enabled&&this.hashNavigation.destroy()},transitionEnd:function(){this.hashNavigation.initialized&&this.hashNavigation.setHash()},slideChange:function(){this.hashNavigation.initialized&&this.params.cssMode&&this.hashNavigation.setHash()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1}},create:function(){var e=this;n.extend(e,{autoplay:{running:!1,paused:!1,run:ue.run.bind(e),start:ue.start.bind(e),stop:ue.stop.bind(e),pause:ue.pause.bind(e),onVisibilityChange:function(){"hidden"===document.visibilityState&&e.autoplay.running&&e.autoplay.pause(),"visible"===document.visibilityState&&e.autoplay.paused&&(e.autoplay.run(),e.autoplay.paused=!1)},onTransitionEnd:function(t){e&&!e.destroyed&&e.$wrapperEl&&t.target===this&&(e.$wrapperEl[0].removeEventListener("transitionend",e.autoplay.onTransitionEnd),e.$wrapperEl[0].removeEventListener("webkitTransitionEnd",e.autoplay.onTransitionEnd),e.autoplay.paused=!1,e.autoplay.running?e.autoplay.run():e.autoplay.stop())}}})},on:{init:function(){this.params.autoplay.enabled&&(this.autoplay.start(),document.addEventListener("visibilitychange",this.autoplay.onVisibilityChange))},beforeTransitionStart:function(e,t){this.autoplay.running&&(t||!this.params.autoplay.disableOnInteraction?this.autoplay.pause(e):this.autoplay.stop())},sliderFirstMove:function(){this.autoplay.running&&(this.params.autoplay.disableOnInteraction?this.autoplay.stop():this.autoplay.pause())},touchEnd:function(){this.params.cssMode&&this.autoplay.paused&&!this.params.autoplay.disableOnInteraction&&this.autoplay.run()},destroy:function(){this.autoplay.running&&this.autoplay.stop(),document.removeEventListener("visibilitychange",this.autoplay.onVisibilityChange)}}},{name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create:function(){n.extend(this,{fadeEffect:{setTranslate:ve.setTranslate.bind(this),setTransition:ve.setTransition.bind(this)}})},on:{beforeInit:function(){if("fade"===this.params.effect){this.classNames.push(this.params.containerModifierClass+"fade");var e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};n.extend(this.params,e),n.extend(this.originalParams,e)}},setTranslate:function(){"fade"===this.params.effect&&this.fadeEffect.setTranslate()},setTransition:function(e){"fade"===this.params.effect&&this.fadeEffect.setTransition(e)}}},{name:"effect-cube",params:{cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}},create:function(){n.extend(this,{cubeEffect:{setTranslate:fe.setTranslate.bind(this),setTransition:fe.setTransition.bind(this)}})},on:{beforeInit:function(){if("cube"===this.params.effect){this.classNames.push(this.params.containerModifierClass+"cube"),this.classNames.push(this.params.containerModifierClass+"3d");var e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0};n.extend(this.params,e),n.extend(this.originalParams,e)}},setTranslate:function(){"cube"===this.params.effect&&this.cubeEffect.setTranslate()},setTransition:function(e){"cube"===this.params.effect&&this.cubeEffect.setTransition(e)}}},{name:"effect-flip",params:{flipEffect:{slideShadows:!0,limitRotation:!0}},create:function(){n.extend(this,{flipEffect:{setTranslate:me.setTranslate.bind(this),setTransition:me.setTransition.bind(this)}})},on:{beforeInit:function(){if("flip"===this.params.effect){this.classNames.push(this.params.containerModifierClass+"flip"),this.classNames.push(this.params.containerModifierClass+"3d");var e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};n.extend(this.params,e),n.extend(this.originalParams,e)}},setTranslate:function(){"flip"===this.params.effect&&this.flipEffect.setTranslate()},setTransition:function(e){"flip"===this.params.effect&&this.flipEffect.setTransition(e)}}},{name:"effect-coverflow",params:{coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0}},create:function(){n.extend(this,{coverflowEffect:{setTranslate:ge.setTranslate.bind(this),setTransition:ge.setTransition.bind(this)}})},on:{beforeInit:function(){"coverflow"===this.params.effect&&(this.classNames.push(this.params.containerModifierClass+"coverflow"),this.classNames.push(this.params.containerModifierClass+"3d"),this.params.watchSlidesProgress=!0,this.originalParams.watchSlidesProgress=!0)},setTranslate:function(){"coverflow"===this.params.effect&&this.coverflowEffect.setTranslate()},setTransition:function(e){"coverflow"===this.params.effect&&this.coverflowEffect.setTransition(e)}}},{name:"thumbs",params:{thumbs:{multipleActiveThumbs:!0,swiper:null,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-container-thumbs"}},create:function(){n.extend(this,{thumbs:{swiper:null,init:be.init.bind(this),update:be.update.bind(this),onThumbClick:be.onThumbClick.bind(this)}})},on:{beforeInit:function(){var e=this.params.thumbs;e&&e.swiper&&(this.thumbs.init(),this.thumbs.update(!0))},slideChange:function(){this.thumbs.swiper&&this.thumbs.update()},update:function(){this.thumbs.swiper&&this.thumbs.update()},resize:function(){this.thumbs.swiper&&this.thumbs.update()},observerUpdate:function(){this.thumbs.swiper&&this.thumbs.update()},setTransition:function(e){var t=this.thumbs.swiper;t&&t.setTransition(e)},beforeDestroy:function(){var e=this.thumbs.swiper;e&&this.thumbs.swiperCreated&&e&&e.destroy()}}}];return void 0===W.use&&(W.use=W.Class.use,W.installModule=W.Class.installModule),W.use(we),W})); +//# sourceMappingURL=swiper.min.js.map \ No newline at end of file diff --git a/html/js/wow.min.js b/html/js/wow.min.js new file mode 100644 index 0000000..a123b5e --- /dev/null +++ b/html/js/wow.min.js @@ -0,0 +1,3 @@ +/*! WOW wow.js - v1.3.0 - 2016-10-04 +* https://wowjs.uk +* Copyright (c) 2016 Thomas Grainger; Licensed MIT */!function(a,b){if("function"==typeof define&&define.amd)define(["module","exports"],b);else if("undefined"!=typeof exports)b(module,exports);else{var c={exports:{}};b(c,c.exports),a.WOW=c.exports}}(this,function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){return b.indexOf(a)>=0}function e(a,b){for(var c in b)if(null==a[c]){var d=b[c];a[c]=d}return a}function f(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)}function g(a){var b=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],c=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],d=arguments.length<=3||void 0===arguments[3]?null:arguments[3],e=void 0;return null!=document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(a,b,c,d)):null!=document.createEventObject?(e=document.createEventObject(),e.eventType=a):e.eventName=a,e}function h(a,b){null!=a.dispatchEvent?a.dispatchEvent(b):b in(null!=a)?a[b]():"on"+b in(null!=a)&&a["on"+b]()}function i(a,b,c){null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c}function j(a,b,c){null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]}function k(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight}Object.defineProperty(b,"__esModule",{value:!0});var l,m,n=function(){function a(a,b){for(var c=0;c=0){var b=a.target||a.srcElement;b.className=b.className.replace(this.config.animateClass,"").trim()}}},{key:"customStyle",value:function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a}},{key:"vendorSet",value:function(a,b){for(var c in b)if(b.hasOwnProperty(c)){var d=b[c];a[""+c]=d;for(var e=0;e=e&&f>=c}},{key:"disabled",value:function(){return!this.config.mobile&&f(navigator.userAgent)}}]),a}();b["default"]=r,a.exports=b["default"]}); \ No newline at end of file