foliokit 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +17 -0
- data/assets/foliokit.css +2 -0
- data/assets/foliokit.js +18 -0
- data/bin/foliokit +4 -0
- data/lib/foliokit.rb +39 -0
- data/lib/foliokit/article.rb +47 -0
- data/lib/foliokit/asset_rendition.rb +54 -0
- data/lib/foliokit/base.rb +7 -0
- data/lib/foliokit/command.rb +81 -0
- data/lib/foliokit/content_stack.rb +57 -0
- data/lib/foliokit/event.rb +88 -0
- data/lib/foliokit/exporter.rb +106 -0
- data/lib/foliokit/issue.rb +92 -0
- data/lib/foliokit/manifest.rb +72 -0
- data/lib/foliokit/manifest_article.rb +55 -0
- data/lib/foliokit/manifest_folio.rb +9 -0
- data/lib/foliokit/modules/core.rb +9 -0
- data/lib/foliokit/modules/element.rb +99 -0
- data/lib/foliokit/overlay.rb +20 -0
- data/lib/foliokit/overlay/overlay360.rb +50 -0
- data/lib/foliokit/overlay/overlay_audio.rb +29 -0
- data/lib/foliokit/overlay/overlay_base.rb +108 -0
- data/lib/foliokit/overlay/overlay_button.rb +24 -0
- data/lib/foliokit/overlay/overlay_container.rb +10 -0
- data/lib/foliokit/overlay/overlay_hyperlink.rb +87 -0
- data/lib/foliokit/overlay/overlay_image.rb +18 -0
- data/lib/foliokit/overlay/overlay_imagepan.rb +36 -0
- data/lib/foliokit/overlay/overlay_video.rb +42 -0
- data/lib/foliokit/overlay/overlay_webview.rb +57 -0
- data/lib/foliokit/package.rb +123 -0
- data/lib/foliokit/slide.rb +9 -0
- data/lib/foliokit/state.rb +6 -0
- data/lib/foliokit/types/bounds.rb +47 -0
- data/lib/foliokit/types/source.rb +9 -0
- data/lib/foliokit/version.rb +3 -0
- metadata +269 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d21590c44ca84b89b4b81543d5436decc60fafbe
|
4
|
+
data.tar.gz: b74b89ad89350dbeb53526422f7cadf02ff1783e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: afc15b37bbca68379525de620207622cf7a5f3018d4fb72bc00c53fdd380d7ada401082f76c80c9d3ce94363e2b458d86237aff2b1e6a186296bfc278ad936c6
|
7
|
+
data.tar.gz: 5f3cb246d0d78c8bea98e6f065d5c727e532880687c2c18da4dad8565be53dddadd0dfef1c66e2c27b483a298d34da1ba99514a60913ea23581ef4c5ecf5ab5f
|
data/README.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# FolioKit
|
2
|
+
|
3
|
+
> Convert InDesign .folio files to HTML
|
4
|
+
|
5
|
+
Foliokit allows you to convert InDesign .folio files to HTML, which can be presented using the Foliokit Reader.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
# install globally
|
10
|
+
gem install foliokit
|
11
|
+
|
12
|
+
# install using bundler / Gemfile
|
13
|
+
gem "foliokit"
|
14
|
+
|
15
|
+
## License
|
16
|
+
|
17
|
+
FolioKit is available under an MIT-style license.
|
data/assets/foliokit.css
ADDED
@@ -0,0 +1,2 @@
|
|
1
|
+
.swiper-container{margin:0 auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1}.swiper-container-no-flexbox .swiper-slide{float:left}.swiper-container-vertical>.swiper-wrapper{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;-o-transition-property:transform;transition-property:transform;transition-property:transform,-webkit-transform;-webkit-box-sizing:content-box;box-sizing:content-box}.swiper-container-android .swiper-slide,.swiper-wrapper{-webkit-transform:translateZ(0);transform:translateZ(0)}.swiper-container-multirow>.swiper-wrapper{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.swiper-container-free-mode>.swiper-wrapper{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out;margin:0 auto}.swiper-slide{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;-o-transition-property:transform;transition-property:transform;transition-property:transform,-webkit-transform}.swiper-invisible-blank-slide{visibility:hidden}.swiper-container-autoheight,.swiper-container-autoheight .swiper-slide{height:auto}.swiper-container-autoheight .swiper-wrapper{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-transition-property:height,-webkit-transform;transition-property:height,-webkit-transform;-o-transition-property:transform,height;transition-property:transform,height;transition-property:transform,height,-webkit-transform}.swiper-container-3d{-webkit-perspective:1200px;perspective:1200px}.swiper-container-3d .swiper-cube-shadow,.swiper-container-3d .swiper-slide,.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top,.swiper-container-3d .swiper-wrapper{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-container-3d .swiper-slide-shadow-left{background-image:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.5)),to(transparent));background-image:-webkit-linear-gradient(right,rgba(0,0,0,.5),transparent);background-image:-o-linear-gradient(right,rgba(0,0,0,.5),transparent);background-image:linear-gradient(270deg,rgba(0,0,0,.5),transparent)}.swiper-container-3d .swiper-slide-shadow-right{background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(transparent));background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),transparent);background-image:-o-linear-gradient(left,rgba(0,0,0,.5),transparent);background-image:linear-gradient(90deg,rgba(0,0,0,.5),transparent)}.swiper-container-3d .swiper-slide-shadow-top{background-image:-webkit-gradient(linear,left bottom,left top,from(rgba(0,0,0,.5)),to(transparent));background-image:-webkit-linear-gradient(bottom,rgba(0,0,0,.5),transparent);background-image:-o-linear-gradient(bottom,rgba(0,0,0,.5),transparent);background-image:linear-gradient(0deg,rgba(0,0,0,.5),transparent)}.swiper-container-3d .swiper-slide-shadow-bottom{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.5)),to(transparent));background-image:-webkit-linear-gradient(top,rgba(0,0,0,.5),transparent);background-image:-o-linear-gradient(top,rgba(0,0,0,.5),transparent);background-image:linear-gradient(180deg,rgba(0,0,0,.5),transparent)}.swiper-container-wp8-horizontal,.swiper-container-wp8-horizontal>.swiper-wrapper{-ms-touch-action:pan-y;touch-action:pan-y}.swiper-container-wp8-vertical,.swiper-container-wp8-vertical>.swiper-wrapper{-ms-touch-action:pan-x;touch-action:pan-x}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:27px;height:44px;margin-top:-22px;z-index:10;cursor:pointer;background-size:27px 44px;background-position:50%;background-repeat:no-repeat}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-prev,.swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'%3E%3Cpath d='M0 22L22 0l2.1 2.1L4.2 22l19.9 19.9L22 44 0 22z' fill='%23007aff'/%3E%3C/svg%3E");left:10px;right:auto}.swiper-button-next,.swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'%3E%3Cpath d='M27 22L5 44l-2.1-2.1L22.8 22 2.9 2.1 5 0l22 22z' fill='%23007aff'/%3E%3C/svg%3E");right:10px;left:auto}.swiper-button-prev.swiper-button-white,.swiper-container-rtl .swiper-button-next.swiper-button-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'%3E%3Cpath d='M0 22L22 0l2.1 2.1L4.2 22l19.9 19.9L22 44 0 22z' fill='%23fff'/%3E%3C/svg%3E")}.swiper-button-next.swiper-button-white,.swiper-container-rtl .swiper-button-prev.swiper-button-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'%3E%3Cpath d='M27 22L5 44l-2.1-2.1L22.8 22 2.9 2.1 5 0l22 22z' fill='%23fff'/%3E%3C/svg%3E")}.swiper-button-prev.swiper-button-black,.swiper-container-rtl .swiper-button-next.swiper-button-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'%3E%3Cpath d='M0 22L22 0l2.1 2.1L4.2 22l19.9 19.9L22 44 0 22z'/%3E%3C/svg%3E")}.swiper-button-next.swiper-button-black,.swiper-container-rtl .swiper-button-prev.swiper-button-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 44'%3E%3Cpath d='M27 22L5 44l-2.1-2.1L22.8 22 2.9 2.1 5 0l22 22z'/%3E%3C/svg%3E")}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;-webkit-transition:opacity .3s;-o-transition:.3s opacity;transition:opacity .3s;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-container-horizontal>.swiper-pagination-bullets,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:10px;left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active,.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}.swiper-pagination-bullet{width:8px;height:8px;display:inline-block;border-radius:100%;background:#000;opacity:.2}button.swiper-pagination-bullet{border:none;margin:0;padding:0;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet-active{opacity:1;background:#007aff}.swiper-container-vertical>.swiper-pagination-bullets{right:10px;top:50%;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.swiper-container-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:6px 0;display:block}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:8px}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;-webkit-transition:top .2s,-webkit-transform .2s;transition:top .2s,-webkit-transform .2s;-o-transition:.2s transform,.2s top;transition:transform .2s,top .2s;transition:transform .2s,top .2s,-webkit-transform .2s}.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 4px}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:left .2s,-webkit-transform .2s;transition:left .2s,-webkit-transform .2s;-o-transition:.2s transform,.2s left;transition:transform .2s,left .2s;transition:transform .2s,left .2s,-webkit-transform .2s}.swiper-container-horizontal.swiper-container-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:right .2s,-webkit-transform .2s;transition:right .2s,-webkit-transform .2s;-o-transition:.2s transform,.2s right;transition:transform .2s,right .2s;transition:transform .2s,right .2s,-webkit-transform .2s}.swiper-pagination-progressbar{background:rgba(0,0,0,.25);position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:#007aff;position:absolute;left:0;top:0;width:100%;height:100%;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-transform-origin:left top;-ms-transform-origin:left top;transform-origin:left top}.swiper-container-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{-webkit-transform-origin:right top;-ms-transform-origin:right top;transform-origin:right top}.swiper-container-horizontal>.swiper-pagination-progressbar,.swiper-container-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:4px;left:0;top:0}.swiper-container-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-container-vertical>.swiper-pagination-progressbar{width:4px;height:100%;left:0;top:0}.swiper-pagination-white .swiper-pagination-bullet-active{background:#fff}.swiper-pagination-progressbar.swiper-pagination-white{background:hsla(0,0%,100%,.25)}.swiper-pagination-progressbar.swiper-pagination-white .swiper-pagination-progressbar-fill{background:#fff}.swiper-pagination-black .swiper-pagination-bullet-active{background:#000}.swiper-pagination-progressbar.swiper-pagination-black{background:rgba(0,0,0,.25)}.swiper-pagination-progressbar.swiper-pagination-black .swiper-pagination-progressbar-fill{background:#000}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:10px;position:relative;-ms-touch-action:none;background:rgba(0,0,0,.1)}.swiper-container-horizontal>.swiper-scrollbar{position:absolute;left:1%;bottom:3px;z-index:50;height:5px;width:98%}.swiper-container-vertical>.swiper-scrollbar{position:absolute;right:3px;top:1%;z-index:50;width:5px;height:98%}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:rgba(0,0,0,.5);border-radius:10px;left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain}.swiper-slide-zoomed{cursor:move}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;-webkit-transform-origin:50%;-ms-transform-origin:50%;transform-origin:50%;-webkit-animation:swiper-preloader-spin 1s steps(12) infinite;animation:swiper-preloader-spin 1s steps(12) infinite}.swiper-lazy-preloader:after{display:block;content:"";width:100%;height:100%;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cdefs%3E%3Cpath id='a' stroke='%236c6c6c' stroke-width='11' stroke-linecap='round' d='M60 7v20'/%3E%3C/defs%3E%3Cuse xlink:href='%23a' opacity='.27'/%3E%3Cuse xlink:href='%23a' opacity='.27' transform='rotate(30 60 60)'/%3E%3Cuse xlink:href='%23a' opacity='.27' transform='rotate(60 60 60)'/%3E%3Cuse xlink:href='%23a' opacity='.27' transform='rotate(90 60 60)'/%3E%3Cuse xlink:href='%23a' opacity='.27' transform='rotate(120 60 60)'/%3E%3Cuse xlink:href='%23a' opacity='.27' transform='rotate(150 60 60)'/%3E%3Cuse xlink:href='%23a' opacity='.37' transform='rotate(180 60 60)'/%3E%3Cuse xlink:href='%23a' opacity='.46' transform='rotate(210 60 60)'/%3E%3Cuse xlink:href='%23a' opacity='.56' transform='rotate(240 60 60)'/%3E%3Cuse xlink:href='%23a' opacity='.66' transform='rotate(270 60 60)'/%3E%3Cuse xlink:href='%23a' opacity='.75' transform='rotate(300 60 60)'/%3E%3Cuse xlink:href='%23a' opacity='.85' transform='rotate(330 60 60)'/%3E%3C/svg%3E");background-position:50%;background-size:100%;background-repeat:no-repeat}.swiper-lazy-preloader-white:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cdefs%3E%3Cpath id='a' stroke='%23fff' stroke-width='11' stroke-linecap='round' d='M60 7v20'/%3E%3C/defs%3E%3Cuse xlink:href='%23a' opacity='.27'/%3E%3Cuse xlink:href='%23a' opacity='.27' transform='rotate(30 60 60)'/%3E%3Cuse xlink:href='%23a' opacity='.27' transform='rotate(60 60 60)'/%3E%3Cuse xlink:href='%23a' opacity='.27' transform='rotate(90 60 60)'/%3E%3Cuse xlink:href='%23a' opacity='.27' transform='rotate(120 60 60)'/%3E%3Cuse xlink:href='%23a' opacity='.27' transform='rotate(150 60 60)'/%3E%3Cuse xlink:href='%23a' opacity='.37' transform='rotate(180 60 60)'/%3E%3Cuse xlink:href='%23a' opacity='.46' transform='rotate(210 60 60)'/%3E%3Cuse xlink:href='%23a' opacity='.56' transform='rotate(240 60 60)'/%3E%3Cuse xlink:href='%23a' opacity='.66' transform='rotate(270 60 60)'/%3E%3Cuse xlink:href='%23a' opacity='.75' transform='rotate(300 60 60)'/%3E%3Cuse xlink:href='%23a' opacity='.85' transform='rotate(330 60 60)'/%3E%3C/svg%3E")}@-webkit-keyframes swiper-preloader-spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes swiper-preloader-spin{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.swiper-container .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-container-fade.swiper-container-free-mode .swiper-slide{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out}.swiper-container-fade .swiper-slide{pointer-events:none;-webkit-transition-property:opacity;-o-transition-property:opacity;transition-property:opacity}.swiper-container-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-fade .swiper-slide-active,.swiper-container-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube{overflow:visible}.swiper-container-cube .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;width:100%;height:100%}.swiper-container-cube .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-cube.swiper-container-rtl .swiper-slide{-webkit-transform-origin:100% 0;-ms-transform-origin:100% 0;transform-origin:100% 0}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-next,.swiper-container-cube .swiper-slide-next+.swiper-slide,.swiper-container-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-container-cube .swiper-slide-shadow-bottom,.swiper-container-cube .swiper-slide-shadow-left,.swiper-container-cube .swiper-slide-shadow-right,.swiper-container-cube .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0;width:100%;height:100%;background:#000;opacity:.6;-webkit-filter:blur(50px);filter:blur(50px);z-index:0}.swiper-container-flip{overflow:visible}.swiper-container-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-container-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-flip .swiper-slide-active,.swiper-container-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-flip .swiper-slide-shadow-bottom,.swiper-container-flip .swiper-slide-shadow-left,.swiper-container-flip .swiper-slide-shadow-right,.swiper-container-flip .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-coverflow .swiper-wrapper{-ms-perspective:1200px}
|
2
|
+
body,html{position:relative;height:100%;width:100%;overflow-y:hidden}body{margin:0;padding:0;background-color:#171717;display:flex;align-items:center;justify-content:center}.hidden{display:none}.foliokit-container{width:100%;height:100%;margin:auto;box-shadow:0 4px 17px rgba(0,0,0,.75);background:#fff}.foliokit-container .swiper-slide{max-height:100%;overflow-y:hidden}.foliokit-container .swiper-slide.smooth-scrolling{-webkit-overflow-scrolling:touch;overflow-x:hidden;overflow-y:scroll}.foliokit-container .swiper-slide.swiper-slide-next{transform:translate3d(-.1px,0,0)}.foliokit-container .swiper-slide.swiper-slide-prev{transform:translate3d(.1px,0,0)}.foliokit-container .swiper-slide.swiper-slide-active{z-index:1}article main{background-size:100%;background-position:top;background-repeat:no-repeat;position:relative;overflow:hidden}.smooth-scrolling{-webkit-overflow-scrolling:touch;overflow-x:hidden;overflow-y:scroll}.overlay-360,.overlay-button,.overlay-container,.overlay-hyperlink,.overlay-image,.overlay-imagepan,.overlay-video,.overlay-webview{-webkit-tap-highlight-color:transparent;position:absolute!important;pointer-events:none;-webkit-overflow-scrolling:unset;-webkit-backface-visibility:hidden}[touchable]{pointer-events:all}:not([touchable]){pointer-events:none;-webkit-overflow-scrolling:unset}.overlay-button{cursor:pointer}.overlay-webview[data-type=youtube]:after{display:block;content:"";position:absolute;left:50%;top:50%;width:68px;height:48px;margin-left:-34px;margin-top:-24px;-moz-transition:opacity .25s cubic-bezier(0,0,.2,1);-webkit-transition:opacity .25s cubic-bezier(0,0,.2,1);transition:opacity .25s cubic-bezier(0,0,.2,1);z-index:63;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDY4IDQ4IiB3aWR0aD0iMTAwJSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48cGF0aCBjbGFzcz0ieXRwLWxhcmdlLXBsYXktYnV0dG9uLWJnIiBkPSJNNjYuNTIsNy43NGMtMC43OC0yLjkzLTIuNDktNS40MS01LjQyLTYuMTlDNTUuNzksLjEzLDM0LDAsMzQsMFMxMi4yMSwuMTMsNi45LDEuNTUgQzMuOTcsMi4zMywyLjI3LDQuODEsMS40OCw3Ljc0QzAuMDYsMTMuMDUsMCwyNCwwLDI0czAuMDYsMTAuOTUsMS40OCwxNi4yNmMwLjc4LDIuOTMsMi40OSw1LjQxLDUuNDIsNi4xOSBDMTIuMjEsNDcuODcsMzQsNDgsMzQsNDhzMjEuNzktMC4xMywyNy4xLTEuNTVjMi45My0wLjc4LDQuNjQtMy4yNiw1LjQyLTYuMTlDNjcuOTQsMzQuOTUsNjgsMjQsNjgsMjRTNjcuOTQsMTMuMDUsNjYuNTIsNy43NHoiIGZpbGw9IiMyMTIxMjEiIGZpbGwtb3BhY2l0eT0iMC44Ij48L3BhdGg+PHBhdGggZD0iTSA0NSwyNCAyNywxNCAyNywzNCIgZmlsbD0iI2ZmZiI+PC9wYXRoPjwvc3ZnPg==);background-size:100%;background-position:50%;background-repeat:no-repeat;pointer-events:none;opacity:1;transition:opacity 2s,transform 2s}.overlay-webview[data-type=youtube] iframe{opacity:0;transition:opacity .5s}.overlay-webview[data-type=youtube].loading:after{transform:scale(3);opacity:.15}.overlay-webview[data-type=youtube].loaded:after{transform:scale(8);opacity:0}.overlay-webview[data-type=youtube].loaded iframe{opacity:1}.overlay-webview[data-type=iframe]:after{display:block;content:"";position:absolute;left:50%;top:50%;width:80px;height:80px;margin-left:-40px;margin-top:-40px;z-index:63;background-image:url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJsb2FkZXItMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI0MHB4IiBoZWlnaHQ9IjQwcHgiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgNDAgNDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIG9wYWNpdHk9IjAuMiIgZmlsbD0iIzAwMCIgZD0iTTIwLjIwMSw1LjE2OWMtOC4yNTQsMC0xNC45NDYsNi42OTItMTQuOTQ2LDE0Ljk0NmMwLDguMjU1LDYuNjkyLDE0Ljk0NiwxNC45NDYsMTQuOTQ2czE0Ljk0Ni02LjY5MSwxNC45NDYtMTQuOTQ2QzM1LjE0NiwxMS44NjEsMjguNDU1LDUuMTY5LDIwLjIwMSw1LjE2OXogTTIwLjIwMSwzMS43NDljLTYuNDI1LDAtMTEuNjM0LTUuMjA4LTExLjYzNC0xMS42MzRjMC02LjQyNSw1LjIwOS0xMS42MzQsMTEuNjM0LTExLjYzNGM2LjQyNSwwLDExLjYzMyw1LjIwOSwxMS42MzMsMTEuNjM0QzMxLjgzNCwyNi41NDEsMjYuNjI2LDMxLjc0OSwyMC4yMDEsMzEuNzQ5eiI+PC9wYXRoPjxwYXRoIGZpbGw9IiMwMDAiIGQ9Ik0yNi4wMTMsMTAuMDQ3bDEuNjU0LTIuODY2Yy0yLjE5OC0xLjI3Mi00Ljc0My0yLjAxMi03LjQ2Ni0yLjAxMmgwdjMuMzEyaDBDMjIuMzIsOC40ODEsMjQuMzAxLDkuMDU3LDI2LjAxMywxMC4wNDd6IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTYgMjAgMjApIj48YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVUeXBlPSJ4bWwiIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgdHlwZT0icm90YXRlIiBmcm9tPSIwIDIwIDIwIiB0bz0iMzYwIDIwIDIwIiBkdXI9IjAuNXMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIj48L2FuaW1hdGVUcmFuc2Zvcm0+PC9wYXRoPjwvc3ZnPg==);background-size:100%;background-position:50%;background-repeat:no-repeat;pointer-events:none;opacity:1;transition:opacity .5s}.overlay-webview[data-type=iframe] iframe{opacity:0;transition:opacity .25s}.overlay-webview[data-type=iframe].loaded iframe{opacity:1}.overlay-webview[data-type=iframe].loaded:after{opacity:0}.overlay-webview iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:none}.overlay-hyperlink>img{display:block;position:absolute;top:0;left:0}.overlay-hyperlink>img.active-source{display:none}.overlay-hyperlink:active>img.active-source,.overlay-hyperlink:focus>img.active-source,.overlay-hyperlink:hover>img.active-source{display:block}.overlay-hyperlink,.overlay-video:not([playsinline]){cursor:pointer;z-index:2}.overlay-video.require-tap:after{content:"";display:block;position:absolute;left:0;top:0;right:0;bottom:0;z-index:63;cursor:pointer;background-size:128px;background-position:50%;background-repeat:no-repeat;background-color:rgba(0,0,0,.5);background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDY4IDQ4IiB3aWR0aD0iMTAwJSIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48cGF0aCBjbGFzcz0ieXRwLWxhcmdlLXBsYXktYnV0dG9uLWJnIiBkPSJNNjYuNTIsNy43NGMtMC43OC0yLjkzLTIuNDktNS40MS01LjQyLTYuMTlDNTUuNzksLjEzLDM0LDAsMzQsMFMxMi4yMSwuMTMsNi45LDEuNTUgQzMuOTcsMi4zMywyLjI3LDQuODEsMS40OCw3Ljc0QzAuMDYsMTMuMDUsMCwyNCwwLDI0czAuMDYsMTAuOTUsMS40OCwxNi4yNmMwLjc4LDIuOTMsMi40OSw1LjQxLDUuNDIsNi4xOSBDMTIuMjEsNDcuODcsMzQsNDgsMzQsNDhzMjEuNzktMC4xMywyNy4xLTEuNTVjMi45My0wLjc4LDQuNjQtMy4yNiw1LjQyLTYuMTlDNjcuOTQsMzQuOTUsNjgsMjQsNjgsMjRTNjcuOTQsMTMuMDUsNjYuNTIsNy43NHoiIGZpbGw9IiMyMTIxMjEiIGZpbGwtb3BhY2l0eT0iMC44Ij48L3BhdGg+PHBhdGggZD0iTSA0NSwyNCAyNywxNCAyNywzNCIgZmlsbD0iI2ZmZiI+PC9wYXRoPjwvc3ZnPg==)}.overlay-imagepan{background-position-x:0;background-position-y:0;background-size:100%;background-repeat:no-repeat;background-color:#fff;cursor:move}[active-state]>.overlay-container{opacity:0!important}[active-state]>.overlay-container.fadeIn{opacity:1!important;transition:opacity .5s;z-index:1}.overlay-container[scroll=vertical]:not([name]),[active-state]>.overlay-container.fadeIn>[scroll=vertical]{-webkit-overflow-scrolling:touch;pointer-events:all!important;overflow-x:hidden;overflow-y:scroll}.overlay-container[scroll=horizontal]:not([name]),[active-state]>.overlay-container.fadeIn>[scroll=horizontal]{-webkit-overflow-scrolling:touch;pointer-events:all!important;overflow-x:scroll;overflow-y:hidden}.overlay-container[scroll]:not([name])>*,[active-state]>.overlay-container.fadeIn>[scroll]>*{position:relative}[active-state]>.overlay-container.fadeIn>.overlay-360>.circlr-container{z-index:2}[active-state]>.overlay-container:not(.fadeIn) *{pointer-events:none!important;-webkit-overflow-scrolling:unset}video{background-color:transparent;pointer-events:all!important;transition:opacity .5s;opacity:1;background:#000;cursor:pointer}.fade-overlay>video{opacity:0}
|
data/assets/foliokit.js
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
!function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}__webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.d=function(exports,name,getter){__webpack_require__.o(exports,name)||Object.defineProperty(exports,name,{enumerable:!0,get:getter})},__webpack_require__.r=function(exports){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.t=function(value,mode){if(1&mode&&(value=__webpack_require__(value)),8&mode)return value;if(4&mode&&"object"==typeof value&&value&&value.__esModule)return value;var ns=Object.create(null);if(__webpack_require__.r(ns),Object.defineProperty(ns,"default",{enumerable:!0,value:value}),2&mode&&"string"!=typeof value)for(var key in value)__webpack_require__.d(ns,key,function(key){return value[key]}.bind(null,key));return ns},__webpack_require__.n=function(module){var getter=module&&module.__esModule?function(){return module.default}:function(){return module};return __webpack_require__.d(getter,"a",getter),getter},__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=11)}([function(module,exports,__webpack_require__){module.exports=function(w,isModule){var routes=[],map={},oldReference=w.routie,Route=function(path,name){this.name=name,this.path=path,this.keys=[],this.fns=[],this.params={},this.regex=pathToRegexp(this.path,this.keys,!1,!1)};Route.prototype.addHandler=function(fn){this.fns.push(fn)},Route.prototype.removeHandler=function(fn){for(var i=0,c=this.fns.length;i<c;i++)if(fn==this.fns[i])return void this.fns.splice(i,1)},Route.prototype.run=function(params){for(var i=0,c=this.fns.length;i<c;i++)this.fns[i].apply(this,params)},Route.prototype.match=function(path,params){var m=this.regex.exec(path);if(!m)return!1;for(var i=1,len=m.length;i<len;++i){var key=this.keys[i-1],val="string"==typeof m[i]?decodeURIComponent(m[i]):m[i];key&&(this.params[key.name]=val),params.push(val)}return!0},Route.prototype.toURL=function(params){var path=this.path;for(var param in params)path=path.replace("/:"+param,"/"+params[param]);if(-1!=(path=path.replace(/\/:.*\?/g,"/").replace(/\?/g,"")).indexOf(":"))throw new Error("missing parameters for url: "+path);return path};var pathToRegexp=function(path,keys,sensitive,strict){return path instanceof RegExp?path:(path instanceof Array&&(path="("+path.join("|")+")"),path=path.concat(strict?"":"/?").replace(/\/\(/g,"(?:/").replace(/\+/g,"__plus__").replace(/(\/)?(\.)?:(\w+)(?:(\(.*?\)))?(\?)?/g,function(_,slash,format,key,capture,optional){return keys.push({name:key,optional:!!optional}),slash=slash||"",(optional?"":slash)+"(?:"+(optional?slash:"")+(format||"")+(capture||format&&"([^/.]+?)"||"([^/]+?)")+")"+(optional||"")}).replace(/([\/.])/g,"\\$1").replace(/__plus__/g,"(.+)").replace(/\*/g,"(.*)"),new RegExp("^"+path+"$",sensitive?"":"i"))},addHandler=function(path,fn){var s=path.split(" "),name=2==s.length?s[0]:null;path=2==s.length?s[1]:s[0],map[path]||(map[path]=new Route(path,name),routes.push(map[path])),map[path].addHandler(fn)},routie=function(path,fn){if("function"==typeof fn)addHandler(path,fn),routie.reload();else if("object"==typeof path){for(var p in path)addHandler(p,path[p]);routie.reload()}else void 0===fn&&routie.navigate(path)};routie.lookup=function(name,obj){for(var i=0,c=routes.length;i<c;i++){var route=routes[i];if(route.name==name)return route.toURL(obj)}},routie.remove=function(path,fn){var route=map[path];route&&route.removeHandler(fn)},routie.removeAll=function(){map={},routes=[]},routie.navigate=function(path,options){var silent=(options=options||{}).silent||!1;silent&&removeListener(),setTimeout(function(){window.location.hash=path,silent&&setTimeout(function(){addListener()},1)},1)},routie.noConflict=function(){return w.routie=oldReference,routie};var checkRoute=function(hash,route){var params=[];return!!route.match(hash,params)&&(route.run(params),!0)},hashChanged=routie.reload=function(){for(var hash=window.location.hash.substring(1),i=0,c=routes.length;i<c;i++){var route=routes[i];if(checkRoute(hash,route))return}},addListener=function(){w.addEventListener?w.addEventListener("hashchange",hashChanged,!1):w.attachEvent("onhashchange",hashChanged)},removeListener=function(){w.removeEventListener?w.removeEventListener("hashchange",hashChanged):w.detachEvent("onhashchange",hashChanged)};if(addListener(),isModule)return routie;w.routie=routie}(window,!0)},function(module,exports){
|
2
|
+
/*!
|
3
|
+
* screenfull
|
4
|
+
* v3.3.2 - 2017-10-27
|
5
|
+
* (c) Sindre Sorhus; MIT License
|
6
|
+
*/
|
7
|
+
!function(){"use strict";var document="undefined"!=typeof window&&void 0!==window.document?window.document:{},isCommonjs=void 0!==module&&module.exports,keyboardAllowed="undefined"!=typeof Element&&"ALLOW_KEYBOARD_INPUT"in Element,fn=function(){for(var val,fnMap=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i=0,l=fnMap.length,ret={};i<l;i++)if((val=fnMap[i])&&val[1]in document){for(i=0;i<val.length;i++)ret[fnMap[0][i]]=val[i];return ret}return!1}(),eventNameMap={change:fn.fullscreenchange,error:fn.fullscreenerror},screenfull={request:function(elem){var request=fn.requestFullscreen;elem=elem||document.documentElement,/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)?elem[request]():elem[request](keyboardAllowed&&Element.ALLOW_KEYBOARD_INPUT)},exit:function(){document[fn.exitFullscreen]()},toggle:function(elem){this.isFullscreen?this.exit():this.request(elem)},onchange:function(callback){this.on("change",callback)},onerror:function(callback){this.on("error",callback)},on:function(event,callback){var eventName=eventNameMap[event];eventName&&document.addEventListener(eventName,callback,!1)},off:function(event,callback){var eventName=eventNameMap[event];eventName&&document.removeEventListener(eventName,callback,!1)},raw:fn};fn?(Object.defineProperties(screenfull,{isFullscreen:{get:function(){return Boolean(document[fn.fullscreenElement])}},element:{enumerable:!0,get:function(){return document[fn.fullscreenElement]}},enabled:{enumerable:!0,get:function(){return Boolean(document[fn.fullscreenEnabled])}}}),isCommonjs?module.exports=screenfull:window.screenfull=screenfull):isCommonjs?module.exports=!1:window.screenfull=!1}()},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_RESULT__;
|
8
|
+
/*! Hammer.JS - v2.0.7 - 2016-04-22
|
9
|
+
* http://hammerjs.github.io/
|
10
|
+
*
|
11
|
+
* Copyright (c) 2016 Jorik Tangelder;
|
12
|
+
* Licensed under the MIT license */
|
13
|
+
/*! Hammer.JS - v2.0.7 - 2016-04-22
|
14
|
+
* http://hammerjs.github.io/
|
15
|
+
*
|
16
|
+
* Copyright (c) 2016 Jorik Tangelder;
|
17
|
+
* Licensed under the MIT license */
|
18
|
+
!function(window,document,exportName,undefined){"use strict";var assign,VENDOR_PREFIXES=["","webkit","Moz","MS","ms","o"],TEST_ELEMENT=document.createElement("div"),TYPE_FUNCTION="function",round=Math.round,abs=Math.abs,now=Date.now;function setTimeoutContext(fn,timeout,context){return setTimeout(bindFn(fn,context),timeout)}function invokeArrayArg(arg,fn,context){return!!Array.isArray(arg)&&(each(arg,context[fn],context),!0)}function each(obj,iterator,context){var i;if(obj)if(obj.forEach)obj.forEach(iterator,context);else if(obj.length!==undefined)for(i=0;i<obj.length;)iterator.call(context,obj[i],i,obj),i++;else for(i in obj)obj.hasOwnProperty(i)&&iterator.call(context,obj[i],i,obj)}function deprecate(method,name,message){var deprecationMessage="DEPRECATED METHOD: "+name+"\n"+message+" AT \n";return function(){var e=new Error("get-stack-trace"),stack=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",log=window.console&&(window.console.warn||window.console.log);return log&&log.call(window.console,deprecationMessage,stack),method.apply(this,arguments)}}assign="function"!=typeof Object.assign?function(target){if(target===undefined||null===target)throw new TypeError("Cannot convert undefined or null to object");for(var output=Object(target),index=1;index<arguments.length;index++){var source=arguments[index];if(source!==undefined&&null!==source)for(var nextKey in source)source.hasOwnProperty(nextKey)&&(output[nextKey]=source[nextKey])}return output}:Object.assign;var extend=deprecate(function(dest,src,merge){for(var keys=Object.keys(src),i=0;i<keys.length;)(!merge||merge&&dest[keys[i]]===undefined)&&(dest[keys[i]]=src[keys[i]]),i++;return dest},"extend","Use `assign`."),merge=deprecate(function(dest,src){return extend(dest,src,!0)},"merge","Use `assign`.");function inherit(child,base,properties){var childP,baseP=base.prototype;(childP=child.prototype=Object.create(baseP)).constructor=child,childP._super=baseP,properties&&assign(childP,properties)}function bindFn(fn,context){return function(){return fn.apply(context,arguments)}}function boolOrFn(val,args){return typeof val==TYPE_FUNCTION?val.apply(args&&args[0]||undefined,args):val}function ifUndefined(val1,val2){return val1===undefined?val2:val1}function addEventListeners(target,types,handler){each(splitStr(types),function(type){target.addEventListener(type,handler,!1)})}function removeEventListeners(target,types,handler){each(splitStr(types),function(type){target.removeEventListener(type,handler,!1)})}function hasParent(node,parent){for(;node;){if(node==parent)return!0;node=node.parentNode}return!1}function inStr(str,find){return str.indexOf(find)>-1}function splitStr(str){return str.trim().split(/\s+/g)}function inArray(src,find,findByKey){if(src.indexOf&&!findByKey)return src.indexOf(find);for(var i=0;i<src.length;){if(findByKey&&src[i][findByKey]==find||!findByKey&&src[i]===find)return i;i++}return-1}function toArray(obj){return Array.prototype.slice.call(obj,0)}function uniqueArray(src,key,sort){for(var results=[],values=[],i=0;i<src.length;){var val=key?src[i][key]:src[i];inArray(values,val)<0&&results.push(src[i]),values[i]=val,i++}return sort&&(results=key?results.sort(function(a,b){return a[key]>b[key]}):results.sort()),results}function prefixed(obj,property){for(var prefix,prop,camelProp=property[0].toUpperCase()+property.slice(1),i=0;i<VENDOR_PREFIXES.length;){if((prop=(prefix=VENDOR_PREFIXES[i])?prefix+camelProp:property)in obj)return prop;i++}return undefined}var _uniqueId=1;function getWindowForElement(element){var doc=element.ownerDocument||element;return doc.defaultView||doc.parentWindow||window}var SUPPORT_TOUCH="ontouchstart"in window,SUPPORT_POINTER_EVENTS=prefixed(window,"PointerEvent")!==undefined,SUPPORT_ONLY_TOUCH=SUPPORT_TOUCH&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),COMPUTE_INTERVAL=25,INPUT_START=1,INPUT_MOVE=2,INPUT_END=4,INPUT_CANCEL=8,DIRECTION_NONE=1,DIRECTION_LEFT=2,DIRECTION_RIGHT=4,DIRECTION_UP=8,DIRECTION_DOWN=16,DIRECTION_HORIZONTAL=DIRECTION_LEFT|DIRECTION_RIGHT,DIRECTION_VERTICAL=DIRECTION_UP|DIRECTION_DOWN,DIRECTION_ALL=DIRECTION_HORIZONTAL|DIRECTION_VERTICAL,PROPS_XY=["x","y"],PROPS_CLIENT_XY=["clientX","clientY"];function Input(manager,callback){var self=this;this.manager=manager,this.callback=callback,this.element=manager.element,this.target=manager.options.inputTarget,this.domHandler=function(ev){boolOrFn(manager.options.enable,[manager])&&self.handler(ev)},this.init()}function inputHandler(manager,eventType,input){var pointersLen=input.pointers.length,changedPointersLen=input.changedPointers.length,isFirst=eventType&INPUT_START&&pointersLen-changedPointersLen==0,isFinal=eventType&(INPUT_END|INPUT_CANCEL)&&pointersLen-changedPointersLen==0;input.isFirst=!!isFirst,input.isFinal=!!isFinal,isFirst&&(manager.session={}),input.eventType=eventType,function(manager,input){var session=manager.session,pointers=input.pointers,pointersLength=pointers.length;session.firstInput||(session.firstInput=simpleCloneInputData(input));pointersLength>1&&!session.firstMultiple?session.firstMultiple=simpleCloneInputData(input):1===pointersLength&&(session.firstMultiple=!1);var firstInput=session.firstInput,firstMultiple=session.firstMultiple,offsetCenter=firstMultiple?firstMultiple.center:firstInput.center,center=input.center=getCenter(pointers);input.timeStamp=now(),input.deltaTime=input.timeStamp-firstInput.timeStamp,input.angle=getAngle(offsetCenter,center),input.distance=getDistance(offsetCenter,center),function(session,input){var center=input.center,offset=session.offsetDelta||{},prevDelta=session.prevDelta||{},prevInput=session.prevInput||{};input.eventType!==INPUT_START&&prevInput.eventType!==INPUT_END||(prevDelta=session.prevDelta={x:prevInput.deltaX||0,y:prevInput.deltaY||0},offset=session.offsetDelta={x:center.x,y:center.y});input.deltaX=prevDelta.x+(center.x-offset.x),input.deltaY=prevDelta.y+(center.y-offset.y)}(session,input),input.offsetDirection=getDirection(input.deltaX,input.deltaY);var overallVelocity=getVelocity(input.deltaTime,input.deltaX,input.deltaY);input.overallVelocityX=overallVelocity.x,input.overallVelocityY=overallVelocity.y,input.overallVelocity=abs(overallVelocity.x)>abs(overallVelocity.y)?overallVelocity.x:overallVelocity.y,input.scale=firstMultiple?function(start,end){return getDistance(end[0],end[1],PROPS_CLIENT_XY)/getDistance(start[0],start[1],PROPS_CLIENT_XY)}(firstMultiple.pointers,pointers):1,input.rotation=firstMultiple?function(start,end){return getAngle(end[1],end[0],PROPS_CLIENT_XY)+getAngle(start[1],start[0],PROPS_CLIENT_XY)}(firstMultiple.pointers,pointers):0,input.maxPointers=session.prevInput?input.pointers.length>session.prevInput.maxPointers?input.pointers.length:session.prevInput.maxPointers:input.pointers.length,function(session,input){var velocity,velocityX,velocityY,direction,last=session.lastInterval||input,deltaTime=input.timeStamp-last.timeStamp;if(input.eventType!=INPUT_CANCEL&&(deltaTime>COMPUTE_INTERVAL||last.velocity===undefined)){var deltaX=input.deltaX-last.deltaX,deltaY=input.deltaY-last.deltaY,v=getVelocity(deltaTime,deltaX,deltaY);velocityX=v.x,velocityY=v.y,velocity=abs(v.x)>abs(v.y)?v.x:v.y,direction=getDirection(deltaX,deltaY),session.lastInterval=input}else velocity=last.velocity,velocityX=last.velocityX,velocityY=last.velocityY,direction=last.direction;input.velocity=velocity,input.velocityX=velocityX,input.velocityY=velocityY,input.direction=direction}(session,input);var target=manager.element;hasParent(input.srcEvent.target,target)&&(target=input.srcEvent.target);input.target=target}(manager,input),manager.emit("hammer.input",input),manager.recognize(input),manager.session.prevInput=input}function simpleCloneInputData(input){for(var pointers=[],i=0;i<input.pointers.length;)pointers[i]={clientX:round(input.pointers[i].clientX),clientY:round(input.pointers[i].clientY)},i++;return{timeStamp:now(),pointers:pointers,center:getCenter(pointers),deltaX:input.deltaX,deltaY:input.deltaY}}function getCenter(pointers){var pointersLength=pointers.length;if(1===pointersLength)return{x:round(pointers[0].clientX),y:round(pointers[0].clientY)};for(var x=0,y=0,i=0;i<pointersLength;)x+=pointers[i].clientX,y+=pointers[i].clientY,i++;return{x:round(x/pointersLength),y:round(y/pointersLength)}}function getVelocity(deltaTime,x,y){return{x:x/deltaTime||0,y:y/deltaTime||0}}function getDirection(x,y){return x===y?DIRECTION_NONE:abs(x)>=abs(y)?x<0?DIRECTION_LEFT:DIRECTION_RIGHT:y<0?DIRECTION_UP:DIRECTION_DOWN}function getDistance(p1,p2,props){props||(props=PROPS_XY);var x=p2[props[0]]-p1[props[0]],y=p2[props[1]]-p1[props[1]];return Math.sqrt(x*x+y*y)}function getAngle(p1,p2,props){props||(props=PROPS_XY);var x=p2[props[0]]-p1[props[0]],y=p2[props[1]]-p1[props[1]];return 180*Math.atan2(y,x)/Math.PI}Input.prototype={handler:function(){},init:function(){this.evEl&&addEventListeners(this.element,this.evEl,this.domHandler),this.evTarget&&addEventListeners(this.target,this.evTarget,this.domHandler),this.evWin&&addEventListeners(getWindowForElement(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&removeEventListeners(this.element,this.evEl,this.domHandler),this.evTarget&&removeEventListeners(this.target,this.evTarget,this.domHandler),this.evWin&&removeEventListeners(getWindowForElement(this.element),this.evWin,this.domHandler)}};var MOUSE_INPUT_MAP={mousedown:INPUT_START,mousemove:INPUT_MOVE,mouseup:INPUT_END},MOUSE_ELEMENT_EVENTS="mousedown",MOUSE_WINDOW_EVENTS="mousemove mouseup";function MouseInput(){this.evEl=MOUSE_ELEMENT_EVENTS,this.evWin=MOUSE_WINDOW_EVENTS,this.pressed=!1,Input.apply(this,arguments)}inherit(MouseInput,Input,{handler:function(ev){var eventType=MOUSE_INPUT_MAP[ev.type];eventType&INPUT_START&&0===ev.button&&(this.pressed=!0),eventType&INPUT_MOVE&&1!==ev.which&&(eventType=INPUT_END),this.pressed&&(eventType&INPUT_END&&(this.pressed=!1),this.callback(this.manager,eventType,{pointers:[ev],changedPointers:[ev],pointerType:"mouse",srcEvent:ev}))}});var POINTER_INPUT_MAP={pointerdown:INPUT_START,pointermove:INPUT_MOVE,pointerup:INPUT_END,pointercancel:INPUT_CANCEL,pointerout:INPUT_CANCEL},IE10_POINTER_TYPE_ENUM={2:"touch",3:"pen",4:"mouse",5:"kinect"},POINTER_ELEMENT_EVENTS="pointerdown",POINTER_WINDOW_EVENTS="pointermove pointerup pointercancel";function PointerEventInput(){this.evEl=POINTER_ELEMENT_EVENTS,this.evWin=POINTER_WINDOW_EVENTS,Input.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}window.MSPointerEvent&&!window.PointerEvent&&(POINTER_ELEMENT_EVENTS="MSPointerDown",POINTER_WINDOW_EVENTS="MSPointerMove MSPointerUp MSPointerCancel"),inherit(PointerEventInput,Input,{handler:function(ev){var store=this.store,removePointer=!1,eventTypeNormalized=ev.type.toLowerCase().replace("ms",""),eventType=POINTER_INPUT_MAP[eventTypeNormalized],pointerType=IE10_POINTER_TYPE_ENUM[ev.pointerType]||ev.pointerType,isTouch="touch"==pointerType,storeIndex=inArray(store,ev.pointerId,"pointerId");eventType&INPUT_START&&(0===ev.button||isTouch)?storeIndex<0&&(store.push(ev),storeIndex=store.length-1):eventType&(INPUT_END|INPUT_CANCEL)&&(removePointer=!0),storeIndex<0||(store[storeIndex]=ev,this.callback(this.manager,eventType,{pointers:store,changedPointers:[ev],pointerType:pointerType,srcEvent:ev}),removePointer&&store.splice(storeIndex,1))}});var SINGLE_TOUCH_INPUT_MAP={touchstart:INPUT_START,touchmove:INPUT_MOVE,touchend:INPUT_END,touchcancel:INPUT_CANCEL},SINGLE_TOUCH_TARGET_EVENTS="touchstart",SINGLE_TOUCH_WINDOW_EVENTS="touchstart touchmove touchend touchcancel";function SingleTouchInput(){this.evTarget=SINGLE_TOUCH_TARGET_EVENTS,this.evWin=SINGLE_TOUCH_WINDOW_EVENTS,this.started=!1,Input.apply(this,arguments)}inherit(SingleTouchInput,Input,{handler:function(ev){var type=SINGLE_TOUCH_INPUT_MAP[ev.type];if(type===INPUT_START&&(this.started=!0),this.started){var touches=function(ev,type){var all=toArray(ev.touches),changed=toArray(ev.changedTouches);type&(INPUT_END|INPUT_CANCEL)&&(all=uniqueArray(all.concat(changed),"identifier",!0));return[all,changed]}.call(this,ev,type);type&(INPUT_END|INPUT_CANCEL)&&touches[0].length-touches[1].length==0&&(this.started=!1),this.callback(this.manager,type,{pointers:touches[0],changedPointers:touches[1],pointerType:"touch",srcEvent:ev})}}});var TOUCH_INPUT_MAP={touchstart:INPUT_START,touchmove:INPUT_MOVE,touchend:INPUT_END,touchcancel:INPUT_CANCEL},TOUCH_TARGET_EVENTS="touchstart touchmove touchend touchcancel";function TouchInput(){this.evTarget=TOUCH_TARGET_EVENTS,this.targetIds={},Input.apply(this,arguments)}inherit(TouchInput,Input,{handler:function(ev){var type=TOUCH_INPUT_MAP[ev.type],touches=function(ev,type){var allTouches=toArray(ev.touches),targetIds=this.targetIds;if(type&(INPUT_START|INPUT_MOVE)&&1===allTouches.length)return targetIds[allTouches[0].identifier]=!0,[allTouches,allTouches];var i,targetTouches,changedTouches=toArray(ev.changedTouches),changedTargetTouches=[],target=this.target;if(targetTouches=allTouches.filter(function(touch){return hasParent(touch.target,target)}),type===INPUT_START)for(i=0;i<targetTouches.length;)targetIds[targetTouches[i].identifier]=!0,i++;i=0;for(;i<changedTouches.length;)targetIds[changedTouches[i].identifier]&&changedTargetTouches.push(changedTouches[i]),type&(INPUT_END|INPUT_CANCEL)&&delete targetIds[changedTouches[i].identifier],i++;if(!changedTargetTouches.length)return;return[uniqueArray(targetTouches.concat(changedTargetTouches),"identifier",!0),changedTargetTouches]}.call(this,ev,type);touches&&this.callback(this.manager,type,{pointers:touches[0],changedPointers:touches[1],pointerType:"touch",srcEvent:ev})}});var DEDUP_TIMEOUT=2500,DEDUP_DISTANCE=25;function TouchMouseInput(){Input.apply(this,arguments);var handler=bindFn(this.handler,this);this.touch=new TouchInput(this.manager,handler),this.mouse=new MouseInput(this.manager,handler),this.primaryTouch=null,this.lastTouches=[]}function setLastTouch(eventData){var touch=eventData.changedPointers[0];if(touch.identifier===this.primaryTouch){var lastTouch={x:touch.clientX,y:touch.clientY};this.lastTouches.push(lastTouch);var lts=this.lastTouches;setTimeout(function(){var i=lts.indexOf(lastTouch);i>-1&<s.splice(i,1)},DEDUP_TIMEOUT)}}inherit(TouchMouseInput,Input,{handler:function(manager,inputEvent,inputData){var isTouch="touch"==inputData.pointerType,isMouse="mouse"==inputData.pointerType;if(!(isMouse&&inputData.sourceCapabilities&&inputData.sourceCapabilities.firesTouchEvents)){if(isTouch)(function(eventType,eventData){eventType&INPUT_START?(this.primaryTouch=eventData.changedPointers[0].identifier,setLastTouch.call(this,eventData)):eventType&(INPUT_END|INPUT_CANCEL)&&setLastTouch.call(this,eventData)}).call(this,inputEvent,inputData);else if(isMouse&&function(eventData){for(var x=eventData.srcEvent.clientX,y=eventData.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var t=this.lastTouches[i],dx=Math.abs(x-t.x),dy=Math.abs(y-t.y);if(dx<=DEDUP_DISTANCE&&dy<=DEDUP_DISTANCE)return!0}return!1}.call(this,inputData))return;this.callback(manager,inputEvent,inputData)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var PREFIXED_TOUCH_ACTION=prefixed(TEST_ELEMENT.style,"touchAction"),NATIVE_TOUCH_ACTION=PREFIXED_TOUCH_ACTION!==undefined,TOUCH_ACTION_AUTO="auto",TOUCH_ACTION_MANIPULATION="manipulation",TOUCH_ACTION_NONE="none",TOUCH_ACTION_PAN_X="pan-x",TOUCH_ACTION_PAN_Y="pan-y",TOUCH_ACTION_MAP=function(){if(!NATIVE_TOUCH_ACTION)return!1;var touchMap={},cssSupports=window.CSS&&window.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(val){touchMap[val]=!cssSupports||window.CSS.supports("touch-action",val)}),touchMap}();function TouchAction(manager,value){this.manager=manager,this.set(value)}TouchAction.prototype={set:function(value){"compute"==value&&(value=this.compute()),NATIVE_TOUCH_ACTION&&this.manager.element.style&&TOUCH_ACTION_MAP[value]&&(this.manager.element.style[PREFIXED_TOUCH_ACTION]=value),this.actions=value.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var actions=[];return each(this.manager.recognizers,function(recognizer){boolOrFn(recognizer.options.enable,[recognizer])&&(actions=actions.concat(recognizer.getTouchAction()))}),function(actions){if(inStr(actions,TOUCH_ACTION_NONE))return TOUCH_ACTION_NONE;var hasPanX=inStr(actions,TOUCH_ACTION_PAN_X),hasPanY=inStr(actions,TOUCH_ACTION_PAN_Y);if(hasPanX&&hasPanY)return TOUCH_ACTION_NONE;if(hasPanX||hasPanY)return hasPanX?TOUCH_ACTION_PAN_X:TOUCH_ACTION_PAN_Y;if(inStr(actions,TOUCH_ACTION_MANIPULATION))return TOUCH_ACTION_MANIPULATION;return TOUCH_ACTION_AUTO}(actions.join(" "))},preventDefaults:function(input){var srcEvent=input.srcEvent,direction=input.offsetDirection;if(this.manager.session.prevented)srcEvent.preventDefault();else{var actions=this.actions,hasNone=inStr(actions,TOUCH_ACTION_NONE)&&!TOUCH_ACTION_MAP[TOUCH_ACTION_NONE],hasPanY=inStr(actions,TOUCH_ACTION_PAN_Y)&&!TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y],hasPanX=inStr(actions,TOUCH_ACTION_PAN_X)&&!TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];if(hasNone){var isTapPointer=1===input.pointers.length,isTapMovement=input.distance<2,isTapTouchTime=input.deltaTime<250;if(isTapPointer&&isTapMovement&&isTapTouchTime)return}if(!hasPanX||!hasPanY)return hasNone||hasPanY&&direction&DIRECTION_HORIZONTAL||hasPanX&&direction&DIRECTION_VERTICAL?this.preventSrc(srcEvent):void 0}},preventSrc:function(srcEvent){this.manager.session.prevented=!0,srcEvent.preventDefault()}};var STATE_POSSIBLE=1,STATE_BEGAN=2,STATE_CHANGED=4,STATE_ENDED=8,STATE_RECOGNIZED=STATE_ENDED,STATE_CANCELLED=16;function Recognizer(options){this.options=assign({},this.defaults,options||{}),this.id=_uniqueId++,this.manager=null,this.options.enable=ifUndefined(this.options.enable,!0),this.state=STATE_POSSIBLE,this.simultaneous={},this.requireFail=[]}function stateStr(state){return state&STATE_CANCELLED?"cancel":state&STATE_ENDED?"end":state&STATE_CHANGED?"move":state&STATE_BEGAN?"start":""}function directionStr(direction){return direction==DIRECTION_DOWN?"down":direction==DIRECTION_UP?"up":direction==DIRECTION_LEFT?"left":direction==DIRECTION_RIGHT?"right":""}function getRecognizerByNameIfManager(otherRecognizer,recognizer){var manager=recognizer.manager;return manager?manager.get(otherRecognizer):otherRecognizer}function AttrRecognizer(){Recognizer.apply(this,arguments)}function PanRecognizer(){AttrRecognizer.apply(this,arguments),this.pX=null,this.pY=null}function PinchRecognizer(){AttrRecognizer.apply(this,arguments)}function PressRecognizer(){Recognizer.apply(this,arguments),this._timer=null,this._input=null}function RotateRecognizer(){AttrRecognizer.apply(this,arguments)}function SwipeRecognizer(){AttrRecognizer.apply(this,arguments)}function TapRecognizer(){Recognizer.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Hammer(element,options){return(options=options||{}).recognizers=ifUndefined(options.recognizers,Hammer.defaults.preset),new Manager(element,options)}Recognizer.prototype={defaults:{},set:function(options){return assign(this.options,options),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(otherRecognizer){if(invokeArrayArg(otherRecognizer,"recognizeWith",this))return this;var simultaneous=this.simultaneous;return simultaneous[(otherRecognizer=getRecognizerByNameIfManager(otherRecognizer,this)).id]||(simultaneous[otherRecognizer.id]=otherRecognizer,otherRecognizer.recognizeWith(this)),this},dropRecognizeWith:function(otherRecognizer){return invokeArrayArg(otherRecognizer,"dropRecognizeWith",this)?this:(otherRecognizer=getRecognizerByNameIfManager(otherRecognizer,this),delete this.simultaneous[otherRecognizer.id],this)},requireFailure:function(otherRecognizer){if(invokeArrayArg(otherRecognizer,"requireFailure",this))return this;var requireFail=this.requireFail;return-1===inArray(requireFail,otherRecognizer=getRecognizerByNameIfManager(otherRecognizer,this))&&(requireFail.push(otherRecognizer),otherRecognizer.requireFailure(this)),this},dropRequireFailure:function(otherRecognizer){if(invokeArrayArg(otherRecognizer,"dropRequireFailure",this))return this;otherRecognizer=getRecognizerByNameIfManager(otherRecognizer,this);var index=inArray(this.requireFail,otherRecognizer);return index>-1&&this.requireFail.splice(index,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(otherRecognizer){return!!this.simultaneous[otherRecognizer.id]},emit:function(input){var self=this,state=this.state;function emit(event){self.manager.emit(event,input)}state<STATE_ENDED&&emit(self.options.event+stateStr(state)),emit(self.options.event),input.additionalEvent&&emit(input.additionalEvent),state>=STATE_ENDED&&emit(self.options.event+stateStr(state))},tryEmit:function(input){if(this.canEmit())return this.emit(input);this.state=32},canEmit:function(){for(var i=0;i<this.requireFail.length;){if(!(this.requireFail[i].state&(32|STATE_POSSIBLE)))return!1;i++}return!0},recognize:function(inputData){var inputDataClone=assign({},inputData);if(!boolOrFn(this.options.enable,[this,inputDataClone]))return this.reset(),void(this.state=32);this.state&(STATE_RECOGNIZED|STATE_CANCELLED|32)&&(this.state=STATE_POSSIBLE),this.state=this.process(inputDataClone),this.state&(STATE_BEGAN|STATE_CHANGED|STATE_ENDED|STATE_CANCELLED)&&this.tryEmit(inputDataClone)},process:function(inputData){},getTouchAction:function(){},reset:function(){}},inherit(AttrRecognizer,Recognizer,{defaults:{pointers:1},attrTest:function(input){var optionPointers=this.options.pointers;return 0===optionPointers||input.pointers.length===optionPointers},process:function(input){var state=this.state,eventType=input.eventType,isRecognized=state&(STATE_BEGAN|STATE_CHANGED),isValid=this.attrTest(input);return isRecognized&&(eventType&INPUT_CANCEL||!isValid)?state|STATE_CANCELLED:isRecognized||isValid?eventType&INPUT_END?state|STATE_ENDED:state&STATE_BEGAN?state|STATE_CHANGED:STATE_BEGAN:32}}),inherit(PanRecognizer,AttrRecognizer,{defaults:{event:"pan",threshold:10,pointers:1,direction:DIRECTION_ALL},getTouchAction:function(){var direction=this.options.direction,actions=[];return direction&DIRECTION_HORIZONTAL&&actions.push(TOUCH_ACTION_PAN_Y),direction&DIRECTION_VERTICAL&&actions.push(TOUCH_ACTION_PAN_X),actions},directionTest:function(input){var options=this.options,hasMoved=!0,distance=input.distance,direction=input.direction,x=input.deltaX,y=input.deltaY;return direction&options.direction||(options.direction&DIRECTION_HORIZONTAL?(direction=0===x?DIRECTION_NONE:x<0?DIRECTION_LEFT:DIRECTION_RIGHT,hasMoved=x!=this.pX,distance=Math.abs(input.deltaX)):(direction=0===y?DIRECTION_NONE:y<0?DIRECTION_UP:DIRECTION_DOWN,hasMoved=y!=this.pY,distance=Math.abs(input.deltaY))),input.direction=direction,hasMoved&&distance>options.threshold&&direction&options.direction},attrTest:function(input){return AttrRecognizer.prototype.attrTest.call(this,input)&&(this.state&STATE_BEGAN||!(this.state&STATE_BEGAN)&&this.directionTest(input))},emit:function(input){this.pX=input.deltaX,this.pY=input.deltaY;var direction=directionStr(input.direction);direction&&(input.additionalEvent=this.options.event+direction),this._super.emit.call(this,input)}}),inherit(PinchRecognizer,AttrRecognizer,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[TOUCH_ACTION_NONE]},attrTest:function(input){return this._super.attrTest.call(this,input)&&(Math.abs(input.scale-1)>this.options.threshold||this.state&STATE_BEGAN)},emit:function(input){if(1!==input.scale){var inOut=input.scale<1?"in":"out";input.additionalEvent=this.options.event+inOut}this._super.emit.call(this,input)}}),inherit(PressRecognizer,Recognizer,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[TOUCH_ACTION_AUTO]},process:function(input){var options=this.options,validPointers=input.pointers.length===options.pointers,validMovement=input.distance<options.threshold,validTime=input.deltaTime>options.time;if(this._input=input,!validMovement||!validPointers||input.eventType&(INPUT_END|INPUT_CANCEL)&&!validTime)this.reset();else if(input.eventType&INPUT_START)this.reset(),this._timer=setTimeoutContext(function(){this.state=STATE_RECOGNIZED,this.tryEmit()},options.time,this);else if(input.eventType&INPUT_END)return STATE_RECOGNIZED;return 32},reset:function(){clearTimeout(this._timer)},emit:function(input){this.state===STATE_RECOGNIZED&&(input&&input.eventType&INPUT_END?this.manager.emit(this.options.event+"up",input):(this._input.timeStamp=now(),this.manager.emit(this.options.event,this._input)))}}),inherit(RotateRecognizer,AttrRecognizer,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[TOUCH_ACTION_NONE]},attrTest:function(input){return this._super.attrTest.call(this,input)&&(Math.abs(input.rotation)>this.options.threshold||this.state&STATE_BEGAN)}}),inherit(SwipeRecognizer,AttrRecognizer,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:DIRECTION_HORIZONTAL|DIRECTION_VERTICAL,pointers:1},getTouchAction:function(){return PanRecognizer.prototype.getTouchAction.call(this)},attrTest:function(input){var velocity,direction=this.options.direction;return direction&(DIRECTION_HORIZONTAL|DIRECTION_VERTICAL)?velocity=input.overallVelocity:direction&DIRECTION_HORIZONTAL?velocity=input.overallVelocityX:direction&DIRECTION_VERTICAL&&(velocity=input.overallVelocityY),this._super.attrTest.call(this,input)&&direction&input.offsetDirection&&input.distance>this.options.threshold&&input.maxPointers==this.options.pointers&&abs(velocity)>this.options.velocity&&input.eventType&INPUT_END},emit:function(input){var direction=directionStr(input.offsetDirection);direction&&this.manager.emit(this.options.event+direction,input),this.manager.emit(this.options.event,input)}}),inherit(TapRecognizer,Recognizer,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[TOUCH_ACTION_MANIPULATION]},process:function(input){var options=this.options,validPointers=input.pointers.length===options.pointers,validMovement=input.distance<options.threshold,validTouchTime=input.deltaTime<options.time;if(this.reset(),input.eventType&INPUT_START&&0===this.count)return this.failTimeout();if(validMovement&&validTouchTime&&validPointers){if(input.eventType!=INPUT_END)return this.failTimeout();var validInterval=!this.pTime||input.timeStamp-this.pTime<options.interval,validMultiTap=!this.pCenter||getDistance(this.pCenter,input.center)<options.posThreshold;if(this.pTime=input.timeStamp,this.pCenter=input.center,validMultiTap&&validInterval?this.count+=1:this.count=1,this._input=input,0===this.count%options.taps)return this.hasRequireFailures()?(this._timer=setTimeoutContext(function(){this.state=STATE_RECOGNIZED,this.tryEmit()},options.interval,this),STATE_BEGAN):STATE_RECOGNIZED}return 32},failTimeout:function(){return this._timer=setTimeoutContext(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==STATE_RECOGNIZED&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Hammer.VERSION="2.0.7",Hammer.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[RotateRecognizer,{enable:!1}],[PinchRecognizer,{enable:!1},["rotate"]],[SwipeRecognizer,{direction:DIRECTION_HORIZONTAL}],[PanRecognizer,{direction:DIRECTION_HORIZONTAL},["swipe"]],[TapRecognizer],[TapRecognizer,{event:"doubletap",taps:2},["tap"]],[PressRecognizer]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Manager(element,options){this.options=assign({},Hammer.defaults,options||{}),this.options.inputTarget=this.options.inputTarget||element,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=element,this.input=function(manager){var inputClass=manager.options.inputClass;return new(inputClass||(SUPPORT_POINTER_EVENTS?PointerEventInput:SUPPORT_ONLY_TOUCH?TouchInput:SUPPORT_TOUCH?TouchMouseInput:MouseInput))(manager,inputHandler)}(this),this.touchAction=new TouchAction(this,this.options.touchAction),toggleCssProps(this,!0),each(this.options.recognizers,function(item){var recognizer=this.add(new item[0](item[1]));item[2]&&recognizer.recognizeWith(item[2]),item[3]&&recognizer.requireFailure(item[3])},this)}function toggleCssProps(manager,add){var prop,element=manager.element;element.style&&(each(manager.options.cssProps,function(value,name){prop=prefixed(element.style,name),add?(manager.oldCssProps[prop]=element.style[prop],element.style[prop]=value):element.style[prop]=manager.oldCssProps[prop]||""}),add||(manager.oldCssProps={}))}Manager.prototype={set:function(options){return assign(this.options,options),options.touchAction&&this.touchAction.update(),options.inputTarget&&(this.input.destroy(),this.input.target=options.inputTarget,this.input.init()),this},stop:function(force){this.session.stopped=force?2:1},recognize:function(inputData){var session=this.session;if(!session.stopped){var recognizer;this.touchAction.preventDefaults(inputData);var recognizers=this.recognizers,curRecognizer=session.curRecognizer;(!curRecognizer||curRecognizer&&curRecognizer.state&STATE_RECOGNIZED)&&(curRecognizer=session.curRecognizer=null);for(var i=0;i<recognizers.length;)recognizer=recognizers[i],2===session.stopped||curRecognizer&&recognizer!=curRecognizer&&!recognizer.canRecognizeWith(curRecognizer)?recognizer.reset():recognizer.recognize(inputData),!curRecognizer&&recognizer.state&(STATE_BEGAN|STATE_CHANGED|STATE_ENDED)&&(curRecognizer=session.curRecognizer=recognizer),i++}},get:function(recognizer){if(recognizer instanceof Recognizer)return recognizer;for(var recognizers=this.recognizers,i=0;i<recognizers.length;i++)if(recognizers[i].options.event==recognizer)return recognizers[i];return null},add:function(recognizer){if(invokeArrayArg(recognizer,"add",this))return this;var existing=this.get(recognizer.options.event);return existing&&this.remove(existing),this.recognizers.push(recognizer),recognizer.manager=this,this.touchAction.update(),recognizer},remove:function(recognizer){if(invokeArrayArg(recognizer,"remove",this))return this;if(recognizer=this.get(recognizer)){var recognizers=this.recognizers,index=inArray(recognizers,recognizer);-1!==index&&(recognizers.splice(index,1),this.touchAction.update())}return this},on:function(events,handler){if(events!==undefined&&handler!==undefined){var handlers=this.handlers;return each(splitStr(events),function(event){handlers[event]=handlers[event]||[],handlers[event].push(handler)}),this}},off:function(events,handler){if(events!==undefined){var handlers=this.handlers;return each(splitStr(events),function(event){handler?handlers[event]&&handlers[event].splice(inArray(handlers[event],handler),1):delete handlers[event]}),this}},emit:function(event,data){this.options.domEvents&&function(event,data){var gestureEvent=document.createEvent("Event");gestureEvent.initEvent(event,!0,!0),gestureEvent.gesture=data,data.target.dispatchEvent(gestureEvent)}(event,data);var handlers=this.handlers[event]&&this.handlers[event].slice();if(handlers&&handlers.length){data.type=event,data.preventDefault=function(){data.srcEvent.preventDefault()};for(var i=0;i<handlers.length;)handlers[i](data),i++}},destroy:function(){this.element&&toggleCssProps(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},assign(Hammer,{INPUT_START:INPUT_START,INPUT_MOVE:INPUT_MOVE,INPUT_END:INPUT_END,INPUT_CANCEL:INPUT_CANCEL,STATE_POSSIBLE:STATE_POSSIBLE,STATE_BEGAN:STATE_BEGAN,STATE_CHANGED:STATE_CHANGED,STATE_ENDED:STATE_ENDED,STATE_RECOGNIZED:STATE_RECOGNIZED,STATE_CANCELLED:STATE_CANCELLED,STATE_FAILED:32,DIRECTION_NONE:DIRECTION_NONE,DIRECTION_LEFT:DIRECTION_LEFT,DIRECTION_RIGHT:DIRECTION_RIGHT,DIRECTION_UP:DIRECTION_UP,DIRECTION_DOWN:DIRECTION_DOWN,DIRECTION_HORIZONTAL:DIRECTION_HORIZONTAL,DIRECTION_VERTICAL:DIRECTION_VERTICAL,DIRECTION_ALL:DIRECTION_ALL,Manager:Manager,Input:Input,TouchAction:TouchAction,TouchInput:TouchInput,MouseInput:MouseInput,PointerEventInput:PointerEventInput,TouchMouseInput:TouchMouseInput,SingleTouchInput:SingleTouchInput,Recognizer:Recognizer,AttrRecognizer:AttrRecognizer,Tap:TapRecognizer,Pan:PanRecognizer,Swipe:SwipeRecognizer,Pinch:PinchRecognizer,Rotate:RotateRecognizer,Press:PressRecognizer,on:addEventListeners,off:removeEventListeners,each:each,merge:merge,extend:extend,assign:assign,inherit:inherit,bindFn:bindFn,prefixed:prefixed}),(void 0!==window?window:"undefined"!=typeof self?self:{}).Hammer=Hammer,(__WEBPACK_AMD_DEFINE_RESULT__=function(){return Hammer}.call(exports,__webpack_require__,exports,module))===undefined||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)}(window,document)},function(module,exports,__webpack_require__){module.exports=function(){"use strict";var doc="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,win="undefined"==typeof window?{document:doc,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,Dom7=function(arr){for(var i=0;i<arr.length;i+=1)this[i]=arr[i];return this.length=arr.length,this};function $(selector,context){var arr=[],i=0;if(selector&&!context&&selector instanceof Dom7)return selector;if(selector)if("string"==typeof selector){var els,tempParent,html=selector.trim();if(html.indexOf("<")>=0&&html.indexOf(">")>=0){var toCreate="div";for(0===html.indexOf("<li")&&(toCreate="ul"),0===html.indexOf("<tr")&&(toCreate="tbody"),0!==html.indexOf("<td")&&0!==html.indexOf("<th")||(toCreate="tr"),0===html.indexOf("<tbody")&&(toCreate="table"),0===html.indexOf("<option")&&(toCreate="select"),(tempParent=doc.createElement(toCreate)).innerHTML=html,i=0;i<tempParent.childNodes.length;i+=1)arr.push(tempParent.childNodes[i])}else for(els=context||"#"!==selector[0]||selector.match(/[ .<>:~]/)?(context||doc).querySelectorAll(selector.trim()):[doc.getElementById(selector.trim().split("#")[1])],i=0;i<els.length;i+=1)els[i]&&arr.push(els[i])}else if(selector.nodeType||selector===win||selector===doc)arr.push(selector);else if(selector.length>0&&selector[0].nodeType)for(i=0;i<selector.length;i+=1)arr.push(selector[i]);return new Dom7(arr)}function unique(arr){for(var uniqueArray=[],i=0;i<arr.length;i+=1)-1===uniqueArray.indexOf(arr[i])&&uniqueArray.push(arr[i]);return uniqueArray}$.fn=Dom7.prototype,$.Class=Dom7,$.Dom7=Dom7;var Methods={addClass:function(className){if(void 0===className)return this;for(var classes=className.split(" "),i=0;i<classes.length;i+=1)for(var j=0;j<this.length;j+=1)void 0!==this[j].classList&&this[j].classList.add(classes[i]);return this},removeClass:function(className){for(var classes=className.split(" "),i=0;i<classes.length;i+=1)for(var j=0;j<this.length;j+=1)void 0!==this[j].classList&&this[j].classList.remove(classes[i]);return this},hasClass:function(className){return!!this[0]&&this[0].classList.contains(className)},toggleClass:function(className){for(var classes=className.split(" "),i=0;i<classes.length;i+=1)for(var j=0;j<this.length;j+=1)void 0!==this[j].classList&&this[j].classList.toggle(classes[i]);return this},attr:function(attrs,value){var arguments$1=arguments;if(1===arguments.length&&"string"==typeof attrs)return this[0]?this[0].getAttribute(attrs):void 0;for(var i=0;i<this.length;i+=1)if(2===arguments$1.length)this[i].setAttribute(attrs,value);else for(var attrName in attrs)this[i][attrName]=attrs[attrName],this[i].setAttribute(attrName,attrs[attrName]);return this},removeAttr:function(attr){for(var i=0;i<this.length;i+=1)this[i].removeAttribute(attr);return this},data:function(key,value){var el;if(void 0!==value){for(var i=0;i<this.length;i+=1)(el=this[i]).dom7ElementDataStorage||(el.dom7ElementDataStorage={}),el.dom7ElementDataStorage[key]=value;return this}if(el=this[0]){if(el.dom7ElementDataStorage&&key in el.dom7ElementDataStorage)return el.dom7ElementDataStorage[key];var dataKey=el.getAttribute("data-"+key);return dataKey||void 0}},transform:function(transform){for(var i=0;i<this.length;i+=1){var elStyle=this[i].style;elStyle.webkitTransform=transform,elStyle.transform=transform}return this},transition:function(duration){"string"!=typeof duration&&(duration+="ms");for(var i=0;i<this.length;i+=1){var elStyle=this[i].style;elStyle.webkitTransitionDuration=duration,elStyle.transitionDuration=duration}return this},on:function(){for(var assign,args=[],len=arguments.length;len--;)args[len]=arguments[len];var eventType=args[0],targetSelector=args[1],listener=args[2],capture=args[3];function handleLiveEvent(e){var target=e.target;if(target){var eventData=e.target.dom7EventData||[];if(eventData.indexOf(e)<0&&eventData.unshift(e),$(target).is(targetSelector))listener.apply(target,eventData);else for(var parents=$(target).parents(),k=0;k<parents.length;k+=1)$(parents[k]).is(targetSelector)&&listener.apply(parents[k],eventData)}}function handleEvent(e){var eventData=e&&e.target&&e.target.dom7EventData||[];eventData.indexOf(e)<0&&eventData.unshift(e),listener.apply(this,eventData)}"function"==typeof args[1]&&(eventType=(assign=args)[0],listener=assign[1],capture=assign[2],targetSelector=void 0),capture||(capture=!1);for(var j,events=eventType.split(" "),i=0;i<this.length;i+=1){var el=this[i];if(targetSelector)for(j=0;j<events.length;j+=1){var event$1=events[j];el.dom7LiveListeners||(el.dom7LiveListeners={}),el.dom7LiveListeners[event$1]||(el.dom7LiveListeners[event$1]=[]),el.dom7LiveListeners[event$1].push({listener:listener,proxyListener:handleLiveEvent}),el.addEventListener(event$1,handleLiveEvent,capture)}else for(j=0;j<events.length;j+=1){var event=events[j];el.dom7Listeners||(el.dom7Listeners={}),el.dom7Listeners[event]||(el.dom7Listeners[event]=[]),el.dom7Listeners[event].push({listener:listener,proxyListener:handleEvent}),el.addEventListener(event,handleEvent,capture)}}return this},off:function(){for(var assign,args=[],len=arguments.length;len--;)args[len]=arguments[len];var eventType=args[0],targetSelector=args[1],listener=args[2],capture=args[3];"function"==typeof args[1]&&(eventType=(assign=args)[0],listener=assign[1],capture=assign[2],targetSelector=void 0),capture||(capture=!1);for(var events=eventType.split(" "),i=0;i<events.length;i+=1)for(var event=events[i],j=0;j<this.length;j+=1){var el=this[j],handlers=void 0;if(!targetSelector&&el.dom7Listeners?handlers=el.dom7Listeners[event]:targetSelector&&el.dom7LiveListeners&&(handlers=el.dom7LiveListeners[event]),handlers&&handlers.length)for(var k=handlers.length-1;k>=0;k-=1){var handler=handlers[k];listener&&handler.listener===listener?(el.removeEventListener(event,handler.proxyListener,capture),handlers.splice(k,1)):listener||(el.removeEventListener(event,handler.proxyListener,capture),handlers.splice(k,1))}}return this},trigger:function(){for(var args=[],len=arguments.length;len--;)args[len]=arguments[len];for(var events=args[0].split(" "),eventData=args[1],i=0;i<events.length;i+=1)for(var event=events[i],j=0;j<this.length;j+=1){var el=this[j],evt=void 0;try{evt=new win.CustomEvent(event,{detail:eventData,bubbles:!0,cancelable:!0})}catch(e){(evt=doc.createEvent("Event")).initEvent(event,!0,!0),evt.detail=eventData}el.dom7EventData=args.filter(function(data,dataIndex){return dataIndex>0}),el.dispatchEvent(evt),el.dom7EventData=[],delete el.dom7EventData}return this},transitionEnd:function(callback){var i,events=["webkitTransitionEnd","transitionend"],dom=this;function fireCallBack(e){if(e.target===this)for(callback.call(this,e),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},outerWidth:function(includeMargins){if(this.length>0){if(includeMargins){var styles=this.styles();return this[0].offsetWidth+parseFloat(styles.getPropertyValue("margin-right"))+parseFloat(styles.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(includeMargins){if(this.length>0){if(includeMargins){var styles=this.styles();return this[0].offsetHeight+parseFloat(styles.getPropertyValue("margin-top"))+parseFloat(styles.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},offset:function(){if(this.length>0){var el=this[0],box=el.getBoundingClientRect(),body=doc.body,clientTop=el.clientTop||body.clientTop||0,clientLeft=el.clientLeft||body.clientLeft||0,scrollTop=el===win?win.scrollY:el.scrollTop,scrollLeft=el===win?win.scrollX:el.scrollLeft;return{top:box.top+scrollTop-clientTop,left:box.left+scrollLeft-clientLeft}}return null},css:function(props,value){var i;if(1===arguments.length){if("string"!=typeof props){for(i=0;i<this.length;i+=1)for(var prop in props)this[i].style[prop]=props[prop];return this}if(this[0])return win.getComputedStyle(this[0],null).getPropertyValue(props)}if(2===arguments.length&&"string"==typeof props){for(i=0;i<this.length;i+=1)this[i].style[props]=value;return this}return this},each:function(callback){if(!callback)return this;for(var i=0;i<this.length;i+=1)if(!1===callback.call(this[i],i,this[i]))return this;return this},html:function(html){if(void 0===html)return this[0]?this[0].innerHTML:void 0;for(var i=0;i<this.length;i+=1)this[i].innerHTML=html;return this},text:function(text){if(void 0===text)return this[0]?this[0].textContent.trim():null;for(var i=0;i<this.length;i+=1)this[i].textContent=text;return this},is:function(selector){var compareWith,i,el=this[0];if(!el||void 0===selector)return!1;if("string"==typeof selector){if(el.matches)return el.matches(selector);if(el.webkitMatchesSelector)return el.webkitMatchesSelector(selector);if(el.msMatchesSelector)return el.msMatchesSelector(selector);for(compareWith=$(selector),i=0;i<compareWith.length;i+=1)if(compareWith[i]===el)return!0;return!1}if(selector===doc)return el===doc;if(selector===win)return el===win;if(selector.nodeType||selector instanceof Dom7){for(compareWith=selector.nodeType?[selector]:selector,i=0;i<compareWith.length;i+=1)if(compareWith[i]===el)return!0;return!1}return!1},index:function(){var i,child=this[0];if(child){for(i=0;null!==(child=child.previousSibling);)1===child.nodeType&&(i+=1);return i}},eq:function(index){if(void 0===index)return this;var returnIndex,length=this.length;return new Dom7(index>length-1?[]:index<0?(returnIndex=length+index)<0?[]:[this[returnIndex]]:[this[index]])},append:function(){for(var newChild,args=[],len=arguments.length;len--;)args[len]=arguments[len];for(var k=0;k<args.length;k+=1){newChild=args[k];for(var i=0;i<this.length;i+=1)if("string"==typeof newChild){var tempDiv=doc.createElement("div");for(tempDiv.innerHTML=newChild;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},prepend:function(newChild){var i,j;for(i=0;i<this.length;i+=1)if("string"==typeof newChild){var tempDiv=doc.createElement("div");for(tempDiv.innerHTML=newChild,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},next:function(selector){return this.length>0?selector?this[0].nextElementSibling&&$(this[0].nextElementSibling).is(selector)?new Dom7([this[0].nextElementSibling]):new Dom7([]):this[0].nextElementSibling?new Dom7([this[0].nextElementSibling]):new Dom7([]):new Dom7([])},nextAll:function(selector){var nextEls=[],el=this[0];if(!el)return new Dom7([]);for(;el.nextElementSibling;){var next=el.nextElementSibling;selector?$(next).is(selector)&&nextEls.push(next):nextEls.push(next),el=next}return new Dom7(nextEls)},prev:function(selector){if(this.length>0){var el=this[0];return selector?el.previousElementSibling&&$(el.previousElementSibling).is(selector)?new Dom7([el.previousElementSibling]):new Dom7([]):el.previousElementSibling?new Dom7([el.previousElementSibling]):new Dom7([])}return new Dom7([])},prevAll:function(selector){var prevEls=[],el=this[0];if(!el)return new Dom7([]);for(;el.previousElementSibling;){var prev=el.previousElementSibling;selector?$(prev).is(selector)&&prevEls.push(prev):prevEls.push(prev),el=prev}return new Dom7(prevEls)},parent:function(selector){for(var parents=[],i=0;i<this.length;i+=1)null!==this[i].parentNode&&(selector?$(this[i].parentNode).is(selector)&&parents.push(this[i].parentNode):parents.push(this[i].parentNode));return $(unique(parents))},parents:function(selector){for(var parents=[],i=0;i<this.length;i+=1)for(var parent=this[i].parentNode;parent;)selector?$(parent).is(selector)&&parents.push(parent):parents.push(parent),parent=parent.parentNode;return $(unique(parents))},closest:function(selector){var closest=this;return void 0===selector?new Dom7([]):(closest.is(selector)||(closest=closest.parents(selector).eq(0)),closest)},find:function(selector){for(var foundElements=[],i=0;i<this.length;i+=1)for(var found=this[i].querySelectorAll(selector),j=0;j<found.length;j+=1)foundElements.push(found[j]);return new Dom7(foundElements)},children:function(selector){for(var children=[],i=0;i<this.length;i+=1)for(var childNodes=this[i].childNodes,j=0;j<childNodes.length;j+=1)selector?1===childNodes[j].nodeType&&$(childNodes[j]).is(selector)&&children.push(childNodes[j]):1===childNodes[j].nodeType&&children.push(childNodes[j]);return new Dom7(unique(children))},remove:function(){for(var i=0;i<this.length;i+=1)this[i].parentNode&&this[i].parentNode.removeChild(this[i]);return this},add:function(){for(var i,j,args=[],len=arguments.length;len--;)args[len]=arguments[len];for(i=0;i<args.length;i+=1){var toAdd=$(args[i]);for(j=0;j<toAdd.length;j+=1)this[this.length]=toAdd[j],this.length+=1}return this},styles:function(){return this[0]?win.getComputedStyle(this[0],null):{}}};Object.keys(Methods).forEach(function(methodName){$.fn[methodName]=Methods[methodName]});var Utils={deleteProps:function(obj){var object=obj;Object.keys(object).forEach(function(key){try{object[key]=null}catch(e){}try{delete object[key]}catch(e){}})},nextTick:function(callback,delay){return void 0===delay&&(delay=0),setTimeout(callback,delay)},now:function(){return Date.now()},getTranslate:function(el,axis){var matrix,curTransform,transformMatrix;void 0===axis&&(axis="x");var curStyle=win.getComputedStyle(el,null);return win.WebKitCSSMatrix?((curTransform=curStyle.transform||curStyle.webkitTransform).split(",").length>6&&(curTransform=curTransform.split(", ").map(function(a){return a.replace(",",".")}).join(", ")),transformMatrix=new win.WebKitCSSMatrix("none"===curTransform?"":curTransform)):(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(",")),"x"===axis&&(curTransform=win.WebKitCSSMatrix?transformMatrix.m41:16===matrix.length?parseFloat(matrix[12]):parseFloat(matrix[4])),"y"===axis&&(curTransform=win.WebKitCSSMatrix?transformMatrix.m42:16===matrix.length?parseFloat(matrix[13]):parseFloat(matrix[5])),curTransform||0},parseUrlQuery:function(url){var i,params,param,length,query={},urlToParse=url||win.location.href;if("string"==typeof urlToParse&&urlToParse.length)for(urlToParse=urlToParse.indexOf("?")>-1?urlToParse.replace(/\S*\?/,""):"",params=urlToParse.split("&").filter(function(paramsPart){return""!==paramsPart}),length=params.length,i=0;i<length;i+=1)param=params[i].replace(/#\S+/g,"").split("="),query[decodeURIComponent(param[0])]=void 0===param[1]?void 0:decodeURIComponent(param[1])||"";return query},isObject:function(o){return"object"==typeof o&&null!==o&&o.constructor&&o.constructor===Object},extend:function(){for(var args=[],len$1=arguments.length;len$1--;)args[len$1]=arguments[len$1];for(var to=Object(args[0]),i=1;i<args.length;i+=1){var nextSource=args[i];if(void 0!==nextSource&&null!==nextSource)for(var keysArray=Object.keys(Object(nextSource)),nextIndex=0,len=keysArray.length;nextIndex<len;nextIndex+=1){var nextKey=keysArray[nextIndex],desc=Object.getOwnPropertyDescriptor(nextSource,nextKey);void 0!==desc&&desc.enumerable&&(Utils.isObject(to[nextKey])&&Utils.isObject(nextSource[nextKey])?Utils.extend(to[nextKey],nextSource[nextKey]):!Utils.isObject(to[nextKey])&&Utils.isObject(nextSource[nextKey])?(to[nextKey]={},Utils.extend(to[nextKey],nextSource[nextKey])):to[nextKey]=nextSource[nextKey])}}return to}},Support=function(){var testDiv=doc.createElement("div");return{touch:win.Modernizr&&!0===win.Modernizr.touch||!!("ontouchstart"in win||win.DocumentTouch&&doc instanceof win.DocumentTouch),pointerEvents:!(!win.navigator.pointerEnabled&&!win.PointerEvent),prefixedPointerEvents:!!win.navigator.msPointerEnabled,transition:function(){var style=testDiv.style;return"transition"in style||"webkitTransition"in style||"MozTransition"in style}(),transforms3d:win.Modernizr&&!0===win.Modernizr.csstransforms3d||function(){var style=testDiv.style;return"webkitPerspective"in style||"MozPerspective"in style||"OPerspective"in style||"MsPerspective"in style||"perspective"in style}(),flexbox:function(){for(var style=testDiv.style,styles="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),i=0;i<styles.length;i+=1)if(styles[i]in style)return!0;return!1}(),observer:"MutationObserver"in win||"WebkitMutationObserver"in win,passiveListener:function(){var supportsPassive=!1;try{var opts=Object.defineProperty({},"passive",{get:function(){supportsPassive=!0}});win.addEventListener("testPassiveListener",null,opts)}catch(e){}return supportsPassive}(),gestures:"ongesturestart"in win}}(),SwiperClass=function(params){void 0===params&&(params={});var self=this;self.params=params,self.eventsListeners={},self.params&&self.params.on&&Object.keys(self.params.on).forEach(function(eventName){self.on(eventName,self.params.on[eventName])})},staticAccessors={components:{configurable:!0}};SwiperClass.prototype.on=function(events,handler,priority){var self=this;if("function"!=typeof handler)return self;var method=priority?"unshift":"push";return events.split(" ").forEach(function(event){self.eventsListeners[event]||(self.eventsListeners[event]=[]),self.eventsListeners[event][method](handler)}),self},SwiperClass.prototype.once=function(events,handler,priority){var self=this;return"function"!=typeof handler?self:self.on(events,function onceHandler(){for(var args=[],len=arguments.length;len--;)args[len]=arguments[len];handler.apply(self,args),self.off(events,onceHandler)},priority)},SwiperClass.prototype.off=function(events,handler){var self=this;return self.eventsListeners?(events.split(" ").forEach(function(event){void 0===handler?self.eventsListeners[event]=[]:self.eventsListeners[event].forEach(function(eventHandler,index){eventHandler===handler&&self.eventsListeners[event].splice(index,1)})}),self):self},SwiperClass.prototype.emit=function(){for(var args=[],len=arguments.length;len--;)args[len]=arguments[len];var events,data,context,self=this;if(!self.eventsListeners)return self;"string"==typeof args[0]||Array.isArray(args[0])?(events=args[0],data=args.slice(1,args.length),context=self):(events=args[0].events,data=args[0].data,context=args[0].context||self);var eventsArray=Array.isArray(events)?events:events.split(" ");return 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)})}}),self},SwiperClass.prototype.useModulesParams=function(instanceParams){var instance=this;instance.modules&&Object.keys(instance.modules).forEach(function(moduleName){var module=instance.modules[moduleName];module.params&&Utils.extend(instanceParams,module.params)})},SwiperClass.prototype.useModules=function(modulesParams){void 0===modulesParams&&(modulesParams={});var instance=this;instance.modules&&Object.keys(instance.modules).forEach(function(moduleName){var module=instance.modules[moduleName],moduleParams=modulesParams[moduleName]||{};module.instance&&Object.keys(module.instance).forEach(function(modulePropName){var moduleProp=module.instance[modulePropName];instance[modulePropName]="function"==typeof moduleProp?moduleProp.bind(instance):moduleProp}),module.on&&instance.on&&Object.keys(module.on).forEach(function(moduleEventName){instance.on(moduleEventName,module.on[moduleEventName])}),module.create&&module.create.bind(instance)(moduleParams)})},staticAccessors.components.set=function(components){this.use&&this.use(components)},SwiperClass.installModule=function(module){for(var params=[],len=arguments.length-1;len-- >0;)params[len]=arguments[len+1];var Class=this;Class.prototype.modules||(Class.prototype.modules={});var name=module.name||Object.keys(Class.prototype.modules).length+"_"+Utils.now();return Class.prototype.modules[name]=module,module.proto&&Object.keys(module.proto).forEach(function(key){Class.prototype[key]=module.proto[key]}),module.static&&Object.keys(module.static).forEach(function(key){Class[key]=module.static[key]}),module.install&&module.install.apply(Class,params),Class},SwiperClass.use=function(module){for(var params=[],len=arguments.length-1;len-- >0;)params[len]=arguments[len+1];var Class=this;return Array.isArray(module)?(module.forEach(function(m){return Class.installModule(m)}),Class):Class.installModule.apply(Class,[module].concat(params))},Object.defineProperties(SwiperClass,staticAccessors);var update={updateSize:function(){var width,height,$el=this.$el;width=void 0!==this.params.width?this.params.width:$el[0].clientWidth,height=void 0!==this.params.height?this.params.height:$el[0].clientHeight,0===width&&this.isHorizontal()||0===height&&this.isVertical()||(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(this,{width:width,height:height,size:this.isHorizontal()?width:height}))},updateSlides:function(){var params=this.params,$wrapperEl=this.$wrapperEl,swiperSize=this.size,rtl=this.rtlTranslate,wrongRTL=this.wrongRTL,isVirtual=this.virtual&¶ms.virtual.enabled,previousSlidesLength=isVirtual?this.virtual.slides.length:this.slides.length,slides=$wrapperEl.children("."+this.params.slideClass),slidesLength=isVirtual?this.virtual.slides.length:slides.length,snapGrid=[],slidesGrid=[],slidesSizesGrid=[],offsetBefore=params.slidesOffsetBefore;"function"==typeof offsetBefore&&(offsetBefore=params.slidesOffsetBefore.call(this));var offsetAfter=params.slidesOffsetAfter;"function"==typeof offsetAfter&&(offsetAfter=params.slidesOffsetAfter.call(this));var slidesNumberEvenToRows,slideSize,previousSnapGridLength=this.snapGrid.length,previousSlidesGridLength=this.snapGrid.length,spaceBetween=params.spaceBetween,slidePosition=-offsetBefore,prevSlideSize=0,index=0;if(void 0!==swiperSize){"string"==typeof spaceBetween&&spaceBetween.indexOf("%")>=0&&(spaceBetween=parseFloat(spaceBetween.replace("%",""))/100*swiperSize),this.virtualSize=-spaceBetween,rtl?slides.css({marginLeft:"",marginTop:""}):slides.css({marginRight:"",marginBottom:""}),params.slidesPerColumn>1&&(slidesNumberEvenToRows=Math.floor(slidesLength/params.slidesPerColumn)===slidesLength/this.params.slidesPerColumn?slidesLength:Math.ceil(slidesLength/params.slidesPerColumn)*params.slidesPerColumn,"auto"!==params.slidesPerView&&"row"===params.slidesPerColumnFill&&(slidesNumberEvenToRows=Math.max(slidesNumberEvenToRows,params.slidesPerView*params.slidesPerColumn)));for(var newSlidesGrid,slidesPerColumn=params.slidesPerColumn,slidesPerRow=slidesNumberEvenToRows/slidesPerColumn,numFullColumns=slidesPerRow-(params.slidesPerColumn*slidesPerRow-slidesLength),i=0;i<slidesLength;i+=1){slideSize=0;var slide=slides.eq(i);if(params.slidesPerColumn>1){var newSlideOrderIndex=void 0,column=void 0,row=void 0;"column"===params.slidesPerColumnFill?(column=Math.floor(i/slidesPerColumn),row=i-column*slidesPerColumn,(column>numFullColumns||column===numFullColumns&&row===slidesPerColumn-1)&&(row+=1)>=slidesPerColumn&&(row=0,column+=1),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})):(row=Math.floor(i/slidesPerRow),column=i-row*slidesPerRow),slide.css("margin-"+(this.isHorizontal()?"top":"left"),0!==row&¶ms.spaceBetween&¶ms.spaceBetween+"px").attr("data-swiper-column",column).attr("data-swiper-row",row)}if("none"!==slide.css("display")){if("auto"===params.slidesPerView){var slideStyles=win.getComputedStyle(slide[0],null),currentTransform=slide[0].style.transform,currentWebKitTransform=slide[0].style.webkitTransform;currentTransform&&(slide[0].style.transform="none"),currentWebKitTransform&&(slide[0].style.webkitTransform="none"),slideSize=this.isHorizontal()?slide[0].getBoundingClientRect().width+parseFloat(slideStyles.getPropertyValue("margin-left"))+parseFloat(slideStyles.getPropertyValue("margin-right")):slide[0].getBoundingClientRect().height+parseFloat(slideStyles.getPropertyValue("margin-top"))+parseFloat(slideStyles.getPropertyValue("margin-bottom")),currentTransform&&(slide[0].style.transform=currentTransform),currentWebKitTransform&&(slide[0].style.webkitTransform=currentWebKitTransform),params.roundLengths&&(slideSize=Math.floor(slideSize))}else slideSize=(swiperSize-(params.slidesPerView-1)*spaceBetween)/params.slidesPerView,params.roundLengths&&(slideSize=Math.floor(slideSize)),slides[i]&&(this.isHorizontal()?slides[i].style.width=slideSize+"px":slides[i].style.height=slideSize+"px");slides[i]&&(slides[i].swiperSlideSize=slideSize),slidesSizesGrid.push(slideSize),params.centeredSlides?(slidePosition=slidePosition+slideSize/2+prevSlideSize/2+spaceBetween,0===prevSlideSize&&0!==i&&(slidePosition=slidePosition-swiperSize/2-spaceBetween),0===i&&(slidePosition=slidePosition-swiperSize/2-spaceBetween),Math.abs(slidePosition)<.001&&(slidePosition=0),params.roundLengths&&(slidePosition=Math.floor(slidePosition)),index%params.slidesPerGroup==0&&snapGrid.push(slidePosition),slidesGrid.push(slidePosition)):(params.roundLengths&&(slidePosition=Math.floor(slidePosition)),index%params.slidesPerGroup==0&&snapGrid.push(slidePosition),slidesGrid.push(slidePosition),slidePosition=slidePosition+slideSize+spaceBetween),this.virtualSize+=slideSize+spaceBetween,prevSlideSize=slideSize,index+=1}}if(this.virtualSize=Math.max(this.virtualSize,swiperSize)+offsetAfter,rtl&&wrongRTL&&("slide"===params.effect||"coverflow"===params.effect)&&$wrapperEl.css({width:this.virtualSize+params.spaceBetween+"px"}),Support.flexbox&&!params.setWrapperSize||(this.isHorizontal()?$wrapperEl.css({width:this.virtualSize+params.spaceBetween+"px"}):$wrapperEl.css({height:this.virtualSize+params.spaceBetween+"px"})),params.slidesPerColumn>1&&(this.virtualSize=(slideSize+params.spaceBetween)*slidesNumberEvenToRows,this.virtualSize=Math.ceil(this.virtualSize/params.slidesPerColumn)-params.spaceBetween,this.isHorizontal()?$wrapperEl.css({width:this.virtualSize+params.spaceBetween+"px"}):$wrapperEl.css({height:this.virtualSize+params.spaceBetween+"px"}),params.centeredSlides)){newSlidesGrid=[];for(var i$1=0;i$1<snapGrid.length;i$1+=1){var slidesGridItem=snapGrid[i$1];params.roundLengths&&(slidesGridItem=Math.floor(slidesGridItem)),snapGrid[i$1]<this.virtualSize+snapGrid[0]&&newSlidesGrid.push(slidesGridItem)}snapGrid=newSlidesGrid}if(!params.centeredSlides){newSlidesGrid=[];for(var i$2=0;i$2<snapGrid.length;i$2+=1){var slidesGridItem$1=snapGrid[i$2];params.roundLengths&&(slidesGridItem$1=Math.floor(slidesGridItem$1)),snapGrid[i$2]<=this.virtualSize-swiperSize&&newSlidesGrid.push(slidesGridItem$1)}snapGrid=newSlidesGrid,Math.floor(this.virtualSize-swiperSize)-Math.floor(snapGrid[snapGrid.length-1])>1&&snapGrid.push(this.virtualSize-swiperSize)}0===snapGrid.length&&(snapGrid=[0]),0!==params.spaceBetween&&(this.isHorizontal()?rtl?slides.css({marginLeft:spaceBetween+"px"}):slides.css({marginRight:spaceBetween+"px"}):slides.css({marginBottom:spaceBetween+"px"})),Utils.extend(this,{slides:slides,snapGrid:snapGrid,slidesGrid:slidesGrid,slidesSizesGrid:slidesSizesGrid}),slidesLength!==previousSlidesLength&&this.emit("slidesLengthChange"),snapGrid.length!==previousSnapGridLength&&(this.params.watchOverflow&&this.checkOverflow(),this.emit("snapGridLengthChange")),slidesGrid.length!==previousSlidesGridLength&&this.emit("slidesGridLengthChange"),(params.watchSlidesProgress||params.watchSlidesVisibility)&&this.updateSlidesOffset()}},updateAutoHeight:function(speed){var i,activeSlides=[],newHeight=0;if("number"==typeof speed?this.setTransition(speed):!0===speed&&this.setTransition(this.params.speed),"auto"!==this.params.slidesPerView&&this.params.slidesPerView>1)for(i=0;i<Math.ceil(this.params.slidesPerView);i+=1){var index=this.activeIndex+i;if(index>this.slides.length)break;activeSlides.push(this.slides.eq(index)[0])}else activeSlides.push(this.slides.eq(this.activeIndex)[0]);for(i=0;i<activeSlides.length;i+=1)if(void 0!==activeSlides[i]){var height=activeSlides[i].offsetHeight;newHeight=height>newHeight?height:newHeight}newHeight&&this.$wrapperEl.css("height",newHeight+"px")},updateSlidesOffset:function(){for(var slides=this.slides,i=0;i<slides.length;i+=1)slides[i].swiperSlideOffset=this.isHorizontal()?slides[i].offsetLeft:slides[i].offsetTop},updateSlidesProgress:function(translate){void 0===translate&&(translate=this&&this.translate||0);var params=this.params,slides=this.slides,rtl=this.rtlTranslate;if(0!==slides.length){void 0===slides[0].swiperSlideOffset&&this.updateSlidesOffset();var offsetCenter=-translate;rtl&&(offsetCenter=translate),slides.removeClass(params.slideVisibleClass);for(var i=0;i<slides.length;i+=1){var slide=slides[i],slideProgress=(offsetCenter+(params.centeredSlides?this.minTranslate():0)-slide.swiperSlideOffset)/(slide.swiperSlideSize+params.spaceBetween);if(params.watchSlidesVisibility){var slideBefore=-(offsetCenter-slide.swiperSlideOffset),slideAfter=slideBefore+this.slidesSizesGrid[i],isVisible=slideBefore>=0&&slideBefore<this.size||slideAfter>0&&slideAfter<=this.size||slideBefore<=0&&slideAfter>=this.size;isVisible&&slides.eq(i).addClass(params.slideVisibleClass)}slide.progress=rtl?-slideProgress:slideProgress}}},updateProgress:function(translate){void 0===translate&&(translate=this&&this.translate||0);var params=this.params,translatesDiff=this.maxTranslate()-this.minTranslate(),progress=this.progress,isBeginning=this.isBeginning,isEnd=this.isEnd,wasBeginning=isBeginning,wasEnd=isEnd;0===translatesDiff?(progress=0,isBeginning=!0,isEnd=!0):(progress=(translate-this.minTranslate())/translatesDiff,isBeginning=progress<=0,isEnd=progress>=1),Utils.extend(this,{progress:progress,isBeginning:isBeginning,isEnd:isEnd}),(params.watchSlidesProgress||params.watchSlidesVisibility)&&this.updateSlidesProgress(translate),isBeginning&&!wasBeginning&&this.emit("reachBeginning toEdge"),isEnd&&!wasEnd&&this.emit("reachEnd toEdge"),(wasBeginning&&!isBeginning||wasEnd&&!isEnd)&&this.emit("fromEdge"),this.emit("progress",progress)},updateSlidesClasses:function(){var activeSlide,slides=this.slides,params=this.params,$wrapperEl=this.$wrapperEl,activeIndex=this.activeIndex,realIndex=this.realIndex,isVirtual=this.virtual&¶ms.virtual.enabled;slides.removeClass(params.slideActiveClass+" "+params.slideNextClass+" "+params.slidePrevClass+" "+params.slideDuplicateActiveClass+" "+params.slideDuplicateNextClass+" "+params.slideDuplicatePrevClass),(activeSlide=isVirtual?this.$wrapperEl.find("."+params.slideClass+'[data-swiper-slide-index="'+activeIndex+'"]'):slides.eq(activeIndex)).addClass(params.slideActiveClass),params.loop&&(activeSlide.hasClass(params.slideDuplicateClass)?$wrapperEl.children("."+params.slideClass+":not(."+params.slideDuplicateClass+')[data-swiper-slide-index="'+realIndex+'"]').addClass(params.slideDuplicateActiveClass):$wrapperEl.children("."+params.slideClass+"."+params.slideDuplicateClass+'[data-swiper-slide-index="'+realIndex+'"]').addClass(params.slideDuplicateActiveClass));var nextSlide=activeSlide.nextAll("."+params.slideClass).eq(0).addClass(params.slideNextClass);params.loop&&0===nextSlide.length&&(nextSlide=slides.eq(0)).addClass(params.slideNextClass);var prevSlide=activeSlide.prevAll("."+params.slideClass).eq(0).addClass(params.slidePrevClass);params.loop&&0===prevSlide.length&&(prevSlide=slides.eq(-1)).addClass(params.slidePrevClass),params.loop&&(nextSlide.hasClass(params.slideDuplicateClass)?$wrapperEl.children("."+params.slideClass+":not(."+params.slideDuplicateClass+')[data-swiper-slide-index="'+nextSlide.attr("data-swiper-slide-index")+'"]').addClass(params.slideDuplicateNextClass):$wrapperEl.children("."+params.slideClass+"."+params.slideDuplicateClass+'[data-swiper-slide-index="'+nextSlide.attr("data-swiper-slide-index")+'"]').addClass(params.slideDuplicateNextClass),prevSlide.hasClass(params.slideDuplicateClass)?$wrapperEl.children("."+params.slideClass+":not(."+params.slideDuplicateClass+')[data-swiper-slide-index="'+prevSlide.attr("data-swiper-slide-index")+'"]').addClass(params.slideDuplicatePrevClass):$wrapperEl.children("."+params.slideClass+"."+params.slideDuplicateClass+'[data-swiper-slide-index="'+prevSlide.attr("data-swiper-slide-index")+'"]').addClass(params.slideDuplicatePrevClass))},updateActiveIndex:function(newActiveIndex){var snapIndex,translate=this.rtlTranslate?this.translate:-this.translate,slidesGrid=this.slidesGrid,snapGrid=this.snapGrid,params=this.params,previousIndex=this.activeIndex,previousRealIndex=this.realIndex,previousSnapIndex=this.snapIndex,activeIndex=newActiveIndex;if(void 0===activeIndex){for(var i=0;i<slidesGrid.length;i+=1)void 0!==slidesGrid[i+1]?translate>=slidesGrid[i]&&translate<slidesGrid[i+1]-(slidesGrid[i+1]-slidesGrid[i])/2?activeIndex=i:translate>=slidesGrid[i]&&translate<slidesGrid[i+1]&&(activeIndex=i+1):translate>=slidesGrid[i]&&(activeIndex=i);params.normalizeSlideIndex&&(activeIndex<0||void 0===activeIndex)&&(activeIndex=0)}if((snapIndex=snapGrid.indexOf(translate)>=0?snapGrid.indexOf(translate):Math.floor(activeIndex/params.slidesPerGroup))>=snapGrid.length&&(snapIndex=snapGrid.length-1),activeIndex!==previousIndex){var realIndex=parseInt(this.slides.eq(activeIndex).attr("data-swiper-slide-index")||activeIndex,10);Utils.extend(this,{snapIndex:snapIndex,realIndex:realIndex,previousIndex:previousIndex,activeIndex:activeIndex}),this.emit("activeIndexChange"),this.emit("snapIndexChange"),previousRealIndex!==realIndex&&this.emit("realIndexChange"),this.emit("slideChange")}else snapIndex!==previousSnapIndex&&(this.snapIndex=snapIndex,this.emit("snapIndexChange"))},updateClickedSlide:function(e){var params=this.params,slide=$(e.target).closest("."+params.slideClass)[0],slideFound=!1;if(slide)for(var i=0;i<this.slides.length;i+=1)this.slides[i]===slide&&(slideFound=!0);if(!slide||!slideFound)return this.clickedSlide=void 0,void(this.clickedIndex=void 0);this.clickedSlide=slide,this.virtual&&this.params.virtual.enabled?this.clickedIndex=parseInt($(slide).attr("data-swiper-slide-index"),10):this.clickedIndex=$(slide).index(),params.slideToClickedSlide&&void 0!==this.clickedIndex&&this.clickedIndex!==this.activeIndex&&this.slideToClickedSlide()}},translate={getTranslate:function(axis){void 0===axis&&(axis=this.isHorizontal()?"x":"y");var params=this.params,rtl=this.rtlTranslate,translate=this.translate,$wrapperEl=this.$wrapperEl;if(params.virtualTranslate)return rtl?-translate:translate;var currentTranslate=Utils.getTranslate($wrapperEl[0],axis);return rtl&&(currentTranslate=-currentTranslate),currentTranslate||0},setTranslate:function(translate,byController){var rtl=this.rtlTranslate,params=this.params,$wrapperEl=this.$wrapperEl,progress=this.progress,x=0,y=0;this.isHorizontal()?x=rtl?-translate:translate:y=translate,params.roundLengths&&(x=Math.floor(x),y=Math.floor(y)),params.virtualTranslate||(Support.transforms3d?$wrapperEl.transform("translate3d("+x+"px, "+y+"px, 0px)"):$wrapperEl.transform("translate("+x+"px, "+y+"px)")),this.previousTranslate=this.translate,this.translate=this.isHorizontal()?x:y;var translatesDiff=this.maxTranslate()-this.minTranslate();(0===translatesDiff?0:(translate-this.minTranslate())/translatesDiff)!==progress&&this.updateProgress(translate),this.emit("setTranslate",this.translate,byController)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]}},transition$1={setTransition:function(duration,byController){this.$wrapperEl.transition(duration),this.emit("setTransition",duration,byController)},transitionStart:function(runCallbacks,direction){void 0===runCallbacks&&(runCallbacks=!0);var activeIndex=this.activeIndex,params=this.params,previousIndex=this.previousIndex;params.autoHeight&&this.updateAutoHeight();var dir=direction;if(dir||(dir=activeIndex>previousIndex?"next":activeIndex<previousIndex?"prev":"reset"),this.emit("transitionStart"),runCallbacks&&activeIndex!==previousIndex){if("reset"===dir)return void this.emit("slideResetTransitionStart");this.emit("slideChangeTransitionStart"),"next"===dir?this.emit("slideNextTransitionStart"):this.emit("slidePrevTransitionStart")}},transitionEnd:function(runCallbacks,direction){void 0===runCallbacks&&(runCallbacks=!0);var activeIndex=this.activeIndex,previousIndex=this.previousIndex;this.animating=!1,this.setTransition(0);var dir=direction;if(dir||(dir=activeIndex>previousIndex?"next":activeIndex<previousIndex?"prev":"reset"),this.emit("transitionEnd"),runCallbacks&&activeIndex!==previousIndex){if("reset"===dir)return void this.emit("slideResetTransitionEnd");this.emit("slideChangeTransitionEnd"),"next"===dir?this.emit("slideNextTransitionEnd"):this.emit("slidePrevTransitionEnd")}}},slide={slideTo:function(index,speed,runCallbacks,internal){void 0===index&&(index=0),void 0===speed&&(speed=this.params.speed),void 0===runCallbacks&&(runCallbacks=!0);var swiper=this,slideIndex=index;slideIndex<0&&(slideIndex=0);var params=swiper.params,snapGrid=swiper.snapGrid,slidesGrid=swiper.slidesGrid,previousIndex=swiper.previousIndex,activeIndex=swiper.activeIndex,rtl=swiper.rtlTranslate;if(swiper.animating&¶ms.preventIntercationOnTransition)return!1;var snapIndex=Math.floor(slideIndex/params.slidesPerGroup);snapIndex>=snapGrid.length&&(snapIndex=snapGrid.length-1),(activeIndex||params.initialSlide||0)===(previousIndex||0)&&runCallbacks&&swiper.emit("beforeSlideChangeStart");var direction,translate=-snapGrid[snapIndex];if(swiper.updateProgress(translate),params.normalizeSlideIndex)for(var i=0;i<slidesGrid.length;i+=1)-Math.floor(100*translate)>=Math.floor(100*slidesGrid[i])&&(slideIndex=i);if(swiper.initialized&&slideIndex!==activeIndex){if(!swiper.allowSlideNext&&translate<swiper.translate&&translate<swiper.minTranslate())return!1;if(!swiper.allowSlidePrev&&translate>swiper.translate&&translate>swiper.maxTranslate()&&(activeIndex||0)!==slideIndex)return!1}return direction=slideIndex>activeIndex?"next":slideIndex<activeIndex?"prev":"reset",rtl&&-translate===swiper.translate||!rtl&&translate===swiper.translate?(swiper.updateActiveIndex(slideIndex),params.autoHeight&&swiper.updateAutoHeight(),swiper.updateSlidesClasses(),"slide"!==params.effect&&swiper.setTranslate(translate),"reset"!==direction&&(swiper.transitionStart(runCallbacks,direction),swiper.transitionEnd(runCallbacks,direction)),!1):(0!==speed&&Support.transition?(swiper.setTransition(speed),swiper.setTranslate(translate),swiper.updateActiveIndex(slideIndex),swiper.updateSlidesClasses(),swiper.emit("beforeTransitionStart",speed,internal),swiper.transitionStart(runCallbacks,direction),swiper.animating||(swiper.animating=!0,swiper.onSlideToWrapperTransitionEnd||(swiper.onSlideToWrapperTransitionEnd=function(e){swiper&&!swiper.destroyed&&e.target===this&&(swiper.$wrapperEl[0].removeEventListener("transitionend",swiper.onSlideToWrapperTransitionEnd),swiper.$wrapperEl[0].removeEventListener("webkitTransitionEnd",swiper.onSlideToWrapperTransitionEnd),swiper.transitionEnd(runCallbacks,direction))}),swiper.$wrapperEl[0].addEventListener("transitionend",swiper.onSlideToWrapperTransitionEnd),swiper.$wrapperEl[0].addEventListener("webkitTransitionEnd",swiper.onSlideToWrapperTransitionEnd))):(swiper.setTransition(0),swiper.setTranslate(translate),swiper.updateActiveIndex(slideIndex),swiper.updateSlidesClasses(),swiper.emit("beforeTransitionStart",speed,internal),swiper.transitionStart(runCallbacks,direction),swiper.transitionEnd(runCallbacks,direction)),!0)},slideToLoop:function(index,speed,runCallbacks,internal){void 0===index&&(index=0),void 0===speed&&(speed=this.params.speed),void 0===runCallbacks&&(runCallbacks=!0);var newIndex=index;return this.params.loop&&(newIndex+=this.loopedSlides),this.slideTo(newIndex,speed,runCallbacks,internal)},slideNext:function(speed,runCallbacks,internal){void 0===speed&&(speed=this.params.speed),void 0===runCallbacks&&(runCallbacks=!0);var params=this.params,animating=this.animating;return params.loop?!animating&&(this.loopFix(),this._clientLeft=this.$wrapperEl[0].clientLeft,this.slideTo(this.activeIndex+params.slidesPerGroup,speed,runCallbacks,internal)):this.slideTo(this.activeIndex+params.slidesPerGroup,speed,runCallbacks,internal)},slidePrev:function(speed,runCallbacks,internal){void 0===speed&&(speed=this.params.speed),void 0===runCallbacks&&(runCallbacks=!0);var params=this.params,animating=this.animating,snapGrid=this.snapGrid,slidesGrid=this.slidesGrid,rtlTranslate=this.rtlTranslate;if(params.loop){if(animating)return!1;this.loopFix(),this._clientLeft=this.$wrapperEl[0].clientLeft}function normalize(val){return val<0?-Math.floor(Math.abs(val)):Math.floor(val)}var prevIndex,normalizedTranslate=normalize(rtlTranslate?this.translate:-this.translate),normalizedSnapGrid=snapGrid.map(function(val){return normalize(val)}),prevSnap=(slidesGrid.map(function(val){return normalize(val)}),snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate)],snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate)-1]);return void 0!==prevSnap&&(prevIndex=slidesGrid.indexOf(prevSnap))<0&&(prevIndex=this.activeIndex-1),this.slideTo(prevIndex,speed,runCallbacks,internal)},slideReset:function(speed,runCallbacks,internal){return void 0===speed&&(speed=this.params.speed),void 0===runCallbacks&&(runCallbacks=!0),this.slideTo(this.activeIndex,speed,runCallbacks,internal)},slideToClosest:function(speed,runCallbacks,internal){void 0===speed&&(speed=this.params.speed),void 0===runCallbacks&&(runCallbacks=!0);var index=this.activeIndex,snapIndex=Math.floor(index/this.params.slidesPerGroup);if(snapIndex<this.snapGrid.length-1){var translate=this.rtlTranslate?this.translate:-this.translate,currentSnap=this.snapGrid[snapIndex],nextSnap=this.snapGrid[snapIndex+1];translate-currentSnap>(nextSnap-currentSnap)/2&&(index=this.params.slidesPerGroup)}return this.slideTo(index,speed,runCallbacks,internal)},slideToClickedSlide:function(){var realIndex,swiper=this,params=swiper.params,$wrapperEl=swiper.$wrapperEl,slidesPerView="auto"===params.slidesPerView?swiper.slidesPerViewDynamic():params.slidesPerView,slideToIndex=swiper.clickedIndex;if(params.loop){if(swiper.animating)return;realIndex=parseInt($(swiper.clickedSlide).attr("data-swiper-slide-index"),10),params.centeredSlides?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)})):swiper.slideTo(slideToIndex):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)})):swiper.slideTo(slideToIndex)}else swiper.slideTo(slideToIndex)}},loop={loopCreate:function(){var swiper=this,params=swiper.params,$wrapperEl=swiper.$wrapperEl;$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)}}"auto"!==params.slidesPerView||params.loopedSlides||(params.loopedSlides=slides.length),swiper.loopedSlides=parseInt(params.loopedSlides||params.slidesPerView,10),swiper.loopedSlides+=params.loopAdditionalSlides,swiper.loopedSlides>slides.length&&(swiper.loopedSlides=slides.length);var prependSlides=[],appendSlides=[];slides.each(function(index,el){var slide=$(el);index<swiper.loopedSlides&&appendSlides.push(el),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(!0)).addClass(params.slideDuplicateClass));for(var i$2=prependSlides.length-1;i$2>=0;i$2-=1)$wrapperEl.prepend($(prependSlides[i$2].cloneNode(!0)).addClass(params.slideDuplicateClass))},loopFix:function(){var newIndex,params=this.params,activeIndex=this.activeIndex,slides=this.slides,loopedSlides=this.loopedSlides,allowSlidePrev=this.allowSlidePrev,allowSlideNext=this.allowSlideNext,snapGrid=this.snapGrid,rtl=this.rtlTranslate;this.allowSlidePrev=!0,this.allowSlideNext=!0;var diff=-snapGrid[activeIndex]-this.getTranslate();if(activeIndex<loopedSlides){newIndex=slides.length-3*loopedSlides+activeIndex,newIndex+=loopedSlides;var slideChanged=this.slideTo(newIndex,0,!1,!0);slideChanged&&0!==diff&&this.setTranslate((rtl?-this.translate:this.translate)-diff)}else if("auto"===params.slidesPerView&&activeIndex>=2*loopedSlides||activeIndex>=slides.length-loopedSlides){newIndex=-slides.length+activeIndex+loopedSlides,newIndex+=loopedSlides;var slideChanged$1=this.slideTo(newIndex,0,!1,!0);slideChanged$1&&0!==diff&&this.setTranslate((rtl?-this.translate:this.translate)-diff)}this.allowSlidePrev=allowSlidePrev,this.allowSlideNext=allowSlideNext},loopDestroy:function(){var $wrapperEl=this.$wrapperEl,params=this.params,slides=this.slides;$wrapperEl.children("."+params.slideClass+"."+params.slideDuplicateClass).remove(),slides.removeAttr("data-swiper-slide-index")}},grabCursor={setGrabCursor:function(moving){if(!(Support.touch||!this.params.simulateTouch||this.params.watchOverflow&&this.isLocked)){var el=this.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"}},unsetGrabCursor:function(){Support.touch||this.params.watchOverflow&&this.isLocked||(this.el.style.cursor="")}},manipulation={appendSlide:function(slides){var $wrapperEl=this.$wrapperEl,params=this.params;if(params.loop&&this.loopDestroy(),"object"==typeof slides&&"length"in slides)for(var i=0;i<slides.length;i+=1)slides[i]&&$wrapperEl.append(slides[i]);else $wrapperEl.append(slides);params.loop&&this.loopCreate(),params.observer&&Support.observer||this.update()},prependSlide:function(slides){var params=this.params,$wrapperEl=this.$wrapperEl,activeIndex=this.activeIndex;params.loop&&this.loopDestroy();var newActiveIndex=activeIndex+1;if("object"==typeof slides&&"length"in slides){for(var i=0;i<slides.length;i+=1)slides[i]&&$wrapperEl.prepend(slides[i]);newActiveIndex=activeIndex+slides.length}else $wrapperEl.prepend(slides);params.loop&&this.loopCreate(),params.observer&&Support.observer||this.update(),this.slideTo(newActiveIndex,0,!1)},addSlide:function(index,slides){var $wrapperEl=this.$wrapperEl,params=this.params,activeIndexBuffer=this.activeIndex;params.loop&&(activeIndexBuffer-=this.loopedSlides,this.loopDestroy(),this.slides=$wrapperEl.children("."+params.slideClass));var baseLength=this.slides.length;if(index<=0)this.prependSlide(slides);else if(index>=baseLength)this.appendSlide(slides);else{for(var newActiveIndex=activeIndexBuffer>index?activeIndexBuffer+1:activeIndexBuffer,slidesBuffer=[],i=baseLength-1;i>=index;i-=1){var currentSlide=this.slides.eq(i);currentSlide.remove(),slidesBuffer.unshift(currentSlide)}if("object"==typeof slides&&"length"in slides){for(var i$1=0;i$1<slides.length;i$1+=1)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]);params.loop&&this.loopCreate(),params.observer&&Support.observer||this.update(),params.loop?this.slideTo(newActiveIndex+this.loopedSlides,0,!1):this.slideTo(newActiveIndex,0,!1)}},removeSlide:function(slidesIndexes){var params=this.params,$wrapperEl=this.$wrapperEl,activeIndexBuffer=this.activeIndex;params.loop&&(activeIndexBuffer-=this.loopedSlides,this.loopDestroy(),this.slides=$wrapperEl.children("."+params.slideClass));var indexToRemove,newActiveIndex=activeIndexBuffer;if("object"==typeof slidesIndexes&&"length"in slidesIndexes){for(var i=0;i<slidesIndexes.length;i+=1)indexToRemove=slidesIndexes[i],this.slides[indexToRemove]&&this.slides.eq(indexToRemove).remove(),indexToRemove<newActiveIndex&&(newActiveIndex-=1);newActiveIndex=Math.max(newActiveIndex,0)}else indexToRemove=slidesIndexes,this.slides[indexToRemove]&&this.slides.eq(indexToRemove).remove(),indexToRemove<newActiveIndex&&(newActiveIndex-=1),newActiveIndex=Math.max(newActiveIndex,0);params.loop&&this.loopCreate(),params.observer&&Support.observer||this.update(),params.loop?this.slideTo(newActiveIndex+this.loopedSlides,0,!1):this.slideTo(newActiveIndex,0,!1)},removeAllSlides:function(){for(var slidesIndexes=[],i=0;i<this.slides.length;i+=1)slidesIndexes.push(i);this.removeSlide(slidesIndexes)}},Device=function(){var ua=win.navigator.userAgent,device={ios:!1,android:!1,androidChrome:!1,desktop:!1,windows:!1,iphone:!1,ipod:!1,ipad:!1,cordova:win.cordova||win.phonegap,phonegap:win.cordova||win.phonegap},windows=ua.match(/(Windows Phone);?[\s\/]+([\d.]+)?/),android=ua.match(/(Android);?[\s\/]+([\d.]+)?/),ipad=ua.match(/(iPad).*OS\s([\d_]+)/),ipod=ua.match(/(iPod)(.*OS\s([\d_]+))?/),iphone=!ipad&&ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/);if(windows&&(device.os="windows",device.osVersion=windows[2],device.windows=!0),android&&!windows&&(device.os="android",device.osVersion=android[2],device.android=!0,device.androidChrome=ua.toLowerCase().indexOf("chrome")>=0),(ipad||iphone||ipod)&&(device.os="ios",device.ios=!0),iphone&&!ipod&&(device.osVersion=iphone[2].replace(/_/g,"."),device.iphone=!0),ipad&&(device.osVersion=ipad[2].replace(/_/g,"."),device.ipad=!0),ipod&&(device.osVersion=ipod[3]?ipod[3].replace(/_/g,"."):null,device.iphone=!0),device.ios&&device.osVersion&&ua.indexOf("Version/")>=0&&"10"===device.osVersion.split(".")[0]&&(device.osVersion=ua.toLowerCase().split("version/")[1].split(" ")[0]),device.desktop=!(device.os||device.android||device.webView),device.webView=(iphone||ipad||ipod)&&ua.match(/.*AppleWebKit(?!.*Safari)/i),device.os&&"ios"===device.os){var osVersionArr=device.osVersion.split("."),metaViewport=doc.querySelector('meta[name="viewport"]');device.minimalUi=!device.webView&&(ipod||iphone)&&(1*osVersionArr[0]==7?1*osVersionArr[1]>=1:1*osVersionArr[0]>7)&&metaViewport&&metaViewport.getAttribute("content").indexOf("minimal-ui")>=0}return device.pixelRatio=win.devicePixelRatio||1,device}();function onResize(){var params=this.params,el=this.el;if(!el||0!==el.offsetWidth){params.breakpoints&&this.setBreakpoint();var allowSlideNext=this.allowSlideNext,allowSlidePrev=this.allowSlidePrev,snapGrid=this.snapGrid;if(this.allowSlideNext=!0,this.allowSlidePrev=!0,this.updateSize(),this.updateSlides(),params.freeMode){var newTranslate=Math.min(Math.max(this.translate,this.maxTranslate()),this.minTranslate());this.setTranslate(newTranslate),this.updateActiveIndex(),this.updateSlidesClasses(),params.autoHeight&&this.updateAutoHeight()}else this.updateSlidesClasses(),("auto"===params.slidesPerView||params.slidesPerView>1)&&this.isEnd&&!this.params.centeredSlides?this.slideTo(this.slides.length-1,0,!1,!0):this.slideTo(this.activeIndex,0,!1,!0);this.allowSlidePrev=allowSlidePrev,this.allowSlideNext=allowSlideNext,this.params.watchOverflow&&snapGrid!==this.snapGrid&&this.checkOverflow()}}var events={attachEvents:function(){var params=this.params,touchEvents=this.touchEvents,el=this.el,wrapperEl=this.wrapperEl;this.onTouchStart=function(event){var data=this.touchEventsData,params=this.params,touches=this.touches;if(!this.animating||!params.preventIntercationOnTransition){var e=event;if(e.originalEvent&&(e=e.originalEvent),data.isTouchEvent="touchstart"===e.type,(data.isTouchEvent||!("which"in e)||3!==e.which)&&(!data.isTouched||!data.isMoved))if(params.noSwiping&&$(e.target).closest(params.noSwipingSelector?params.noSwipingSelector:"."+params.noSwipingClass)[0])this.allowClick=!0;else if(!params.swipeHandler||$(e).closest(params.swipeHandler)[0]){touches.currentX="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,touches.currentY="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY;var startX=touches.currentX,startY=touches.currentY;if(!Device.ios||Device.cordova||!params.iOSEdgeSwipeDetection||!(startX<=params.iOSEdgeSwipeThreshold||startX>=win.screen.width-params.iOSEdgeSwipeThreshold)){if(Utils.extend(data,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),touches.startX=startX,touches.startY=startY,data.touchStartTime=Utils.now(),this.allowClick=!0,this.updateSize(),this.swipeDirection=void 0,params.threshold>0&&(data.allowThresholdMove=!1),"touchstart"!==e.type){var preventDefault=!0;$(e.target).is(data.formElements)&&(preventDefault=!1),doc.activeElement&&$(doc.activeElement).is(data.formElements)&&doc.activeElement!==e.target&&doc.activeElement.blur(),preventDefault&&this.allowTouchMove&&e.preventDefault()}this.emit("touchStart",e)}}}}.bind(this),this.onTouchMove=function(event){var data=this.touchEventsData,params=this.params,touches=this.touches,rtl=this.rtlTranslate,e=event;if(e.originalEvent&&(e=e.originalEvent),data.isTouched){if(!data.isTouchEvent||"mousemove"!==e.type){var pageX="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,pageY="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY;if(e.preventedByNestedSwiper)return touches.startX=pageX,void(touches.startY=pageY);if(!this.allowTouchMove)return this.allowClick=!1,void(data.isTouched&&(Utils.extend(touches,{startX:pageX,startY:pageY,currentX:pageX,currentY:pageY}),data.touchStartTime=Utils.now()));if(data.isTouchEvent&¶ms.touchReleaseOnEdges&&!params.loop)if(this.isVertical()){if(pageY<touches.startY&&this.translate<=this.maxTranslate()||pageY>touches.startY&&this.translate>=this.minTranslate())return data.isTouched=!1,void(data.isMoved=!1)}else if(pageX<touches.startX&&this.translate<=this.maxTranslate()||pageX>touches.startX&&this.translate>=this.minTranslate())return;if(data.isTouchEvent&&doc.activeElement&&e.target===doc.activeElement&&$(e.target).is(data.formElements))return data.isMoved=!0,void(this.allowClick=!1);if(data.allowTouchCallbacks&&this.emit("touchMove",e),!(e.targetTouches&&e.targetTouches.length>1)){touches.currentX=pageX,touches.currentY=pageY;var touchAngle,diffX=touches.currentX-touches.startX,diffY=touches.currentY-touches.startY;if(void 0===data.isScrolling&&(this.isHorizontal()&&touches.currentY===touches.startY||this.isVertical()&&touches.currentX===touches.startX?data.isScrolling=!1:diffX*diffX+diffY*diffY>=25&&(touchAngle=180*Math.atan2(Math.abs(diffY),Math.abs(diffX))/Math.PI,data.isScrolling=this.isHorizontal()?touchAngle>params.touchAngle:90-touchAngle>params.touchAngle)),data.isScrolling&&this.emit("touchMoveOpposite",e),"undefined"==typeof startMoving&&(touches.currentX===touches.startX&&touches.currentY===touches.startY||(data.startMoving=!0)),data.isScrolling)data.isTouched=!1;else if(data.startMoving){this.allowClick=!1,e.preventDefault(),params.touchMoveStopPropagation&&!params.nested&&e.stopPropagation(),data.isMoved||(params.loop&&this.loopFix(),data.startTranslate=this.getTranslate(),this.setTransition(0),this.animating&&this.$wrapperEl.trigger("webkitTransitionEnd transitionend"),data.allowMomentumBounce=!1,!params.grabCursor||!0!==this.allowSlideNext&&!0!==this.allowSlidePrev||this.setGrabCursor(!0),this.emit("sliderFirstMove",e)),this.emit("sliderMove",e),data.isMoved=!0;var diff=this.isHorizontal()?diffX:diffY;touches.diff=diff,diff*=params.touchRatio,rtl&&(diff=-diff),this.swipeDirection=diff>0?"prev":"next",data.currentTranslate=diff+data.startTranslate;var disableParentSwiper=!0,resistanceRatio=params.resistanceRatio;if(params.touchReleaseOnEdges&&(resistanceRatio=0),diff>0&&data.currentTranslate>this.minTranslate()?(disableParentSwiper=!1,params.resistance&&(data.currentTranslate=this.minTranslate()-1+Math.pow(-this.minTranslate()+data.startTranslate+diff,resistanceRatio))):diff<0&&data.currentTranslate<this.maxTranslate()&&(disableParentSwiper=!1,params.resistance&&(data.currentTranslate=this.maxTranslate()+1-Math.pow(this.maxTranslate()-data.startTranslate-diff,resistanceRatio))),disableParentSwiper&&(e.preventedByNestedSwiper=!0),!this.allowSlideNext&&"next"===this.swipeDirection&&data.currentTranslate<data.startTranslate&&(data.currentTranslate=data.startTranslate),!this.allowSlidePrev&&"prev"===this.swipeDirection&&data.currentTranslate>data.startTranslate&&(data.currentTranslate=data.startTranslate),params.threshold>0){if(!(Math.abs(diff)>params.threshold||data.allowThresholdMove))return void(data.currentTranslate=data.startTranslate);if(!data.allowThresholdMove)return data.allowThresholdMove=!0,touches.startX=touches.currentX,touches.startY=touches.currentY,data.currentTranslate=data.startTranslate,void(touches.diff=this.isHorizontal()?touches.currentX-touches.startX:touches.currentY-touches.startY)}params.followFinger&&((params.freeMode||params.watchSlidesProgress||params.watchSlidesVisibility)&&(this.updateActiveIndex(),this.updateSlidesClasses()),params.freeMode&&(0===data.velocities.length&&data.velocities.push({position:touches[this.isHorizontal()?"startX":"startY"],time:data.touchStartTime}),data.velocities.push({position:touches[this.isHorizontal()?"currentX":"currentY"],time:Utils.now()})),this.updateProgress(data.currentTranslate),this.setTranslate(data.currentTranslate))}}}}else data.startMoving&&data.isScrolling&&this.emit("touchMoveOpposite",e)}.bind(this),this.onTouchEnd=function(event){var swiper=this,data=swiper.touchEventsData,params=swiper.params,touches=swiper.touches,rtl=swiper.rtlTranslate,$wrapperEl=swiper.$wrapperEl,slidesGrid=swiper.slidesGrid,snapGrid=swiper.snapGrid,e=event;if(e.originalEvent&&(e=e.originalEvent),data.allowTouchCallbacks&&swiper.emit("touchEnd",e),data.allowTouchCallbacks=!1,!data.isTouched)return data.isMoved&¶ms.grabCursor&&swiper.setGrabCursor(!1),data.isMoved=!1,void(data.startMoving=!1);params.grabCursor&&data.isMoved&&data.isTouched&&(!0===swiper.allowSlideNext||!0===swiper.allowSlidePrev)&&swiper.setGrabCursor(!1);var currentPos,touchEndTime=Utils.now(),timeDiff=touchEndTime-data.touchStartTime;if(swiper.allowClick&&(swiper.updateClickedSlide(e),swiper.emit("tap",e),timeDiff<300&&touchEndTime-data.lastClickTime>300&&(data.clickTimeout&&clearTimeout(data.clickTimeout),data.clickTimeout=Utils.nextTick(function(){swiper&&!swiper.destroyed&&swiper.emit("click",e)},300)),timeDiff<300&&touchEndTime-data.lastClickTime<300&&(data.clickTimeout&&clearTimeout(data.clickTimeout),swiper.emit("doubleTap",e))),data.lastClickTime=Utils.now(),Utils.nextTick(function(){swiper.destroyed||(swiper.allowClick=!0)}),!data.isTouched||!data.isMoved||!swiper.swipeDirection||0===touches.diff||data.currentTranslate===data.startTranslate)return data.isTouched=!1,data.isMoved=!1,void(data.startMoving=!1);if(data.isTouched=!1,data.isMoved=!1,data.startMoving=!1,currentPos=params.followFinger?rtl?swiper.translate:-swiper.translate:-data.currentTranslate,params.freeMode){if(currentPos<-swiper.minTranslate())return void swiper.slideTo(swiper.activeIndex);if(currentPos>-swiper.maxTranslate())return void(swiper.slides.length<snapGrid.length?swiper.slideTo(snapGrid.length-1):swiper.slideTo(swiper.slides.length-1));if(params.freeModeMomentum){if(data.velocities.length>1){var lastMoveEvent=data.velocities.pop(),velocityEvent=data.velocities.pop(),distance=lastMoveEvent.position-velocityEvent.position,time=lastMoveEvent.time-velocityEvent.time;swiper.velocity=distance/time,swiper.velocity/=2,Math.abs(swiper.velocity)<params.freeModeMinimumVelocity&&(swiper.velocity=0),(time>150||Utils.now()-lastMoveEvent.time>300)&&(swiper.velocity=0)}else swiper.velocity=0;swiper.velocity*=params.freeModeMomentumVelocityRatio,data.velocities.length=0;var momentumDuration=1e3*params.freeModeMomentumRatio,momentumDistance=swiper.velocity*momentumDuration,newPosition=swiper.translate+momentumDistance;rtl&&(newPosition=-newPosition);var afterBouncePosition,needsLoopFix,doBounce=!1,bounceAmount=20*Math.abs(swiper.velocity)*params.freeModeMomentumBounceRatio;if(newPosition<swiper.maxTranslate())params.freeModeMomentumBounce?(newPosition+swiper.maxTranslate()<-bounceAmount&&(newPosition=swiper.maxTranslate()-bounceAmount),afterBouncePosition=swiper.maxTranslate(),doBounce=!0,data.allowMomentumBounce=!0):newPosition=swiper.maxTranslate(),params.loop&¶ms.centeredSlides&&(needsLoopFix=!0);else if(newPosition>swiper.minTranslate())params.freeModeMomentumBounce?(newPosition-swiper.minTranslate()>bounceAmount&&(newPosition=swiper.minTranslate()+bounceAmount),afterBouncePosition=swiper.minTranslate(),doBounce=!0,data.allowMomentumBounce=!0):newPosition=swiper.minTranslate(),params.loop&¶ms.centeredSlides&&(needsLoopFix=!0);else if(params.freeModeSticky){for(var nextSlide,j=0;j<snapGrid.length;j+=1)if(snapGrid[j]>-newPosition){nextSlide=j;break}newPosition=-(newPosition=Math.abs(snapGrid[nextSlide]-newPosition)<Math.abs(snapGrid[nextSlide-1]-newPosition)||"next"===swiper.swipeDirection?snapGrid[nextSlide]:snapGrid[nextSlide-1])}if(needsLoopFix&&swiper.once("transitionEnd",function(){swiper.loopFix()}),0!==swiper.velocity)momentumDuration=rtl?Math.abs((-newPosition-swiper.translate)/swiper.velocity):Math.abs((newPosition-swiper.translate)/swiper.velocity);else if(params.freeModeSticky)return void swiper.slideToClosest();params.freeModeMomentumBounce&&doBounce?(swiper.updateProgress(afterBouncePosition),swiper.setTransition(momentumDuration),swiper.setTranslate(newPosition),swiper.transitionStart(!0,swiper.swipeDirection),swiper.animating=!0,$wrapperEl.transitionEnd(function(){swiper&&!swiper.destroyed&&data.allowMomentumBounce&&(swiper.emit("momentumBounce"),swiper.setTransition(params.speed),swiper.setTranslate(afterBouncePosition),$wrapperEl.transitionEnd(function(){swiper&&!swiper.destroyed&&swiper.transitionEnd()}))})):swiper.velocity?(swiper.updateProgress(newPosition),swiper.setTransition(momentumDuration),swiper.setTranslate(newPosition),swiper.transitionStart(!0,swiper.swipeDirection),swiper.animating||(swiper.animating=!0,$wrapperEl.transitionEnd(function(){swiper&&!swiper.destroyed&&swiper.transitionEnd()}))):swiper.updateProgress(newPosition),swiper.updateActiveIndex(),swiper.updateSlidesClasses()}else if(params.freeModeSticky)return void swiper.slideToClosest();(!params.freeModeMomentum||timeDiff>=params.longSwipesMs)&&(swiper.updateProgress(),swiper.updateActiveIndex(),swiper.updateSlidesClasses())}else{for(var stopIndex=0,groupSize=swiper.slidesSizesGrid[0],i=0;i<slidesGrid.length;i+=params.slidesPerGroup)void 0!==slidesGrid[i+params.slidesPerGroup]?currentPos>=slidesGrid[i]&¤tPos<slidesGrid[i+params.slidesPerGroup]&&(stopIndex=i,groupSize=slidesGrid[i+params.slidesPerGroup]-slidesGrid[i]):currentPos>=slidesGrid[i]&&(stopIndex=i,groupSize=slidesGrid[slidesGrid.length-1]-slidesGrid[slidesGrid.length-2]);var ratio=(currentPos-slidesGrid[stopIndex])/groupSize;if(timeDiff>params.longSwipesMs){if(!params.longSwipes)return void swiper.slideTo(swiper.activeIndex);"next"===swiper.swipeDirection&&(ratio>=params.longSwipesRatio?swiper.slideTo(stopIndex+params.slidesPerGroup):swiper.slideTo(stopIndex)),"prev"===swiper.swipeDirection&&(ratio>1-params.longSwipesRatio?swiper.slideTo(stopIndex+params.slidesPerGroup):swiper.slideTo(stopIndex))}else{if(!params.shortSwipes)return void swiper.slideTo(swiper.activeIndex);"next"===swiper.swipeDirection&&swiper.slideTo(stopIndex+params.slidesPerGroup),"prev"===swiper.swipeDirection&&swiper.slideTo(stopIndex)}}}.bind(this),this.onClick=function(e){this.allowClick||(this.params.preventClicks&&e.preventDefault(),this.params.preventClicksPropagation&&this.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}.bind(this);var target="container"===params.touchEventsTarget?el:wrapperEl,capture=!!params.nested;if(Support.touch||!Support.pointerEvents&&!Support.prefixedPointerEvents){if(Support.touch){var passiveListener=!("touchstart"!==touchEvents.start||!Support.passiveListener||!params.passiveListeners)&&{passive:!0,capture:!1};target.addEventListener(touchEvents.start,this.onTouchStart,passiveListener),target.addEventListener(touchEvents.move,this.onTouchMove,Support.passiveListener?{passive:!1,capture:capture}:capture),target.addEventListener(touchEvents.end,this.onTouchEnd,passiveListener)}(params.simulateTouch&&!Device.ios&&!Device.android||params.simulateTouch&&!Support.touch&&Device.ios)&&(target.addEventListener("mousedown",this.onTouchStart,!1),doc.addEventListener("mousemove",this.onTouchMove,capture),doc.addEventListener("mouseup",this.onTouchEnd,!1))}else target.addEventListener(touchEvents.start,this.onTouchStart,!1),doc.addEventListener(touchEvents.move,this.onTouchMove,capture),doc.addEventListener(touchEvents.end,this.onTouchEnd,!1);(params.preventClicks||params.preventClicksPropagation)&&target.addEventListener("click",this.onClick,!0),this.on(Device.ios||Device.android?"resize orientationchange observerUpdate":"resize observerUpdate",onResize,!0)},detachEvents:function(){var params=this.params,touchEvents=this.touchEvents,el=this.el,wrapperEl=this.wrapperEl,target="container"===params.touchEventsTarget?el:wrapperEl,capture=!!params.nested;if(Support.touch||!Support.pointerEvents&&!Support.prefixedPointerEvents){if(Support.touch){var passiveListener=!("onTouchStart"!==touchEvents.start||!Support.passiveListener||!params.passiveListeners)&&{passive:!0,capture:!1};target.removeEventListener(touchEvents.start,this.onTouchStart,passiveListener),target.removeEventListener(touchEvents.move,this.onTouchMove,capture),target.removeEventListener(touchEvents.end,this.onTouchEnd,passiveListener)}(params.simulateTouch&&!Device.ios&&!Device.android||params.simulateTouch&&!Support.touch&&Device.ios)&&(target.removeEventListener("mousedown",this.onTouchStart,!1),doc.removeEventListener("mousemove",this.onTouchMove,capture),doc.removeEventListener("mouseup",this.onTouchEnd,!1))}else target.removeEventListener(touchEvents.start,this.onTouchStart,!1),doc.removeEventListener(touchEvents.move,this.onTouchMove,capture),doc.removeEventListener(touchEvents.end,this.onTouchEnd,!1);(params.preventClicks||params.preventClicksPropagation)&&target.removeEventListener("click",this.onClick,!0),this.off(Device.ios||Device.android?"resize orientationchange observerUpdate":"resize observerUpdate",onResize)}},breakpoints={setBreakpoint:function(){var activeIndex=this.activeIndex,initialized=this.initialized,loopedSlides=this.loopedSlides;void 0===loopedSlides&&(loopedSlides=0);var params=this.params,breakpoints=params.breakpoints;if(breakpoints&&(!breakpoints||0!==Object.keys(breakpoints).length)){var breakpoint=this.getBreakpoint(breakpoints);if(breakpoint&&this.currentBreakpoint!==breakpoint){var breakPointsParams=breakpoint in breakpoints?breakpoints[breakpoint]:this.originalParams,needsReLoop=params.loop&&breakPointsParams.slidesPerView!==params.slidesPerView;Utils.extend(this.params,breakPointsParams),Utils.extend(this,{allowTouchMove:this.params.allowTouchMove,allowSlideNext:this.params.allowSlideNext,allowSlidePrev:this.params.allowSlidePrev}),this.currentBreakpoint=breakpoint,needsReLoop&&initialized&&(this.loopDestroy(),this.loopCreate(),this.updateSlides(),this.slideTo(activeIndex-loopedSlides+this.loopedSlides,0,!1)),this.emit("breakpoint",breakPointsParams)}}},getBreakpoint:function(breakpoints){if(breakpoints){var breakpoint=!1,points=[];Object.keys(breakpoints).forEach(function(point){points.push(point)}),points.sort(function(a,b){return parseInt(a,10)-parseInt(b,10)});for(var i=0;i<points.length;i+=1){var point=points[i];point>=win.innerWidth&&!breakpoint&&(breakpoint=point)}return breakpoint||"max"}}},Browser={isIE:!!win.navigator.userAgent.match(/Trident/g)||!!win.navigator.userAgent.match(/MSIE/g),isSafari:function(){var ua=win.navigator.userAgent.toLowerCase();return ua.indexOf("safari")>=0&&ua.indexOf("chrome")<0&&ua.indexOf("android")<0}(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(win.navigator.userAgent)},defaults={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,preventIntercationOnTransition:!1,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold: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,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,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:!0,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},prototypes={update:update,translate:translate,transition:transition$1,slide:slide,loop:loop,grabCursor:grabCursor,manipulation:manipulation,events:events,breakpoints:breakpoints,checkOverflow:{checkOverflow:function(){var wasLocked=this.isLocked;this.isLocked=1===this.snapGrid.length,this.allowSlideNext=!this.isLocked,this.allowSlidePrev=!this.isLocked,wasLocked!==this.isLocked&&this.emit(this.isLocked?"lock":"unlock"),wasLocked&&wasLocked!==this.isLocked&&(this.isEnd=!1,this.navigation.update())}},classes:{addClasses:function(){var classNames=this.classNames,params=this.params,rtl=this.rtl,$el=this.$el,suffixes=[];suffixes.push(params.direction),params.freeMode&&suffixes.push("free-mode"),Support.flexbox||suffixes.push("no-flexbox"),params.autoHeight&&suffixes.push("autoheight"),rtl&&suffixes.push("rtl"),params.slidesPerColumn>1&&suffixes.push("multirow"),Device.android&&suffixes.push("android"),Device.ios&&suffixes.push("ios"),Browser.isIE&&(Support.pointerEvents||Support.prefixedPointerEvents)&&suffixes.push("wp8-"+params.direction),suffixes.forEach(function(suffix){classNames.push(params.containerModifierClass+suffix)}),$el.addClass(classNames.join(" "))},removeClasses:function(){var $el=this.$el,classNames=this.classNames;$el.removeClass(classNames.join(" "))}},images:{loadImage:function(imageEl,src,srcset,sizes,checkForComplete,callback){var image;function onReady(){callback&&callback()}imageEl.complete&&checkForComplete?onReady():src?((image=new win.Image).onload=onReady,image.onerror=onReady,sizes&&(image.sizes=sizes),srcset&&(image.srcset=srcset),src&&(image.src=src)):onReady()},preloadImages:function(){var swiper=this;function onReady(){void 0!==swiper&&null!==swiper&&swiper&&!swiper.destroyed&&(void 0!==swiper.imagesLoaded&&(swiper.imagesLoaded+=1),swiper.imagesLoaded===swiper.imagesToLoad.length&&(swiper.params.updateOnImagesReady&&swiper.update(),swiper.emit("imagesReady")))}swiper.imagesToLoad=swiper.$el.find("img");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"),!0,onReady)}}}},extendedDefaults={},Swiper=function(SwiperClass$$1){function Swiper(){for(var assign,el,params,args=[],len=arguments.length;len--;)args[len]=arguments[len];1===args.length&&args[0].constructor&&args[0].constructor===Object?params=args[0]:(el=(assign=args)[0],params=assign[1]),params||(params={}),params=Utils.extend({},params),el&&!params.el&&(params.el=el),SwiperClass$$1.call(this,params),Object.keys(prototypes).forEach(function(prototypeGroup){Object.keys(prototypes[prototypeGroup]).forEach(function(protoMethod){Swiper.prototype[protoMethod]||(Swiper.prototype[protoMethod]=prototypes[prototypeGroup][protoMethod])})});var swiper=this;void 0===swiper.modules&&(swiper.modules={}),Object.keys(swiper.modules).forEach(function(moduleName){var module=swiper.modules[moduleName];if(module.params){var moduleParamName=Object.keys(module.params)[0],moduleParams=module.params[moduleParamName];if("object"!=typeof moduleParams)return;if(!(moduleParamName in params&&"enabled"in moduleParams))return;!0===params[moduleParamName]&&(params[moduleParamName]={enabled:!0}),"object"!=typeof params[moduleParamName]||"enabled"in params[moduleParamName]||(params[moduleParamName].enabled=!0),params[moduleParamName]||(params[moduleParamName]={enabled:!1})}});var swiperParams=Utils.extend({},defaults);swiper.useModulesParams(swiperParams),swiper.params=Utils.extend({},swiperParams,extendedDefaults,params),swiper.originalParams=Utils.extend({},swiper.params),swiper.passedParams=Utils.extend({},params),swiper.$=$;var $el=$(swiper.params.el);if(el=$el[0]){if($el.length>1){var swipers=[];return $el.each(function(index,containerEl){var newParams=Utils.extend({},params,{el:containerEl});swipers.push(new Swiper(newParams))}),swipers}el.swiper=swiper,$el.data("swiper",swiper);var $wrapperEl=$el.children("."+swiper.params.wrapperClass);return Utils.extend(swiper,{$el:$el,el:el,$wrapperEl:$wrapperEl,wrapperEl:$wrapperEl[0],classNames:[],slides:$(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===swiper.params.direction},isVertical:function(){return"vertical"===swiper.params.direction},rtl:"rtl"===el.dir.toLowerCase()||"rtl"===$el.css("direction"),rtlTranslate:"horizontal"===swiper.params.direction&&("rtl"===el.dir.toLowerCase()||"rtl"===$el.css("direction")),wrongRTL:"-webkit-box"===$wrapperEl.css("display"),activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:swiper.params.allowSlideNext,allowSlidePrev:swiper.params.allowSlidePrev,touchEvents:function(){var touch=["touchstart","touchmove","touchend"],desktop=["mousedown","mousemove","mouseup"];return Support.pointerEvents?desktop=["pointerdown","pointermove","pointerup"]:Support.prefixedPointerEvents&&(desktop=["MSPointerDown","MSPointerMove","MSPointerUp"]),swiper.touchEventsTouch={start:touch[0],move:touch[1],end:touch[2]},swiper.touchEventsDesktop={start:desktop[0],move:desktop[1],end:desktop[2]},Support.touch||!swiper.params.simulateTouch?swiper.touchEventsTouch:swiper.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:Utils.now(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:swiper.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),swiper.useModules(),swiper.params.init&&swiper.init(),swiper}}SwiperClass$$1&&(Swiper.__proto__=SwiperClass$$1),Swiper.prototype=Object.create(SwiperClass$$1&&SwiperClass$$1.prototype),Swiper.prototype.constructor=Swiper;var staticAccessors={extendedDefaults:{configurable:!0},defaults:{configurable:!0},Class:{configurable:!0},$:{configurable:!0}};return Swiper.prototype.slidesPerViewDynamic=function(){var params=this.params,slides=this.slides,slidesGrid=this.slidesGrid,swiperSize=this.size,activeIndex=this.activeIndex,spv=1;if(params.centeredSlides){for(var breakLoop,slideSize=slides[activeIndex].swiperSlideSize,i=activeIndex+1;i<slides.length;i+=1)slides[i]&&!breakLoop&&(slideSize+=slides[i].swiperSlideSize,spv+=1,slideSize>swiperSize&&(breakLoop=!0));for(var i$1=activeIndex-1;i$1>=0;i$1-=1)slides[i$1]&&!breakLoop&&(slideSize+=slides[i$1].swiperSlideSize,spv+=1,slideSize>swiperSize&&(breakLoop=!0))}else for(var i$2=activeIndex+1;i$2<slides.length;i$2+=1)slidesGrid[i$2]-slidesGrid[activeIndex]<swiperSize&&(spv+=1);return spv},Swiper.prototype.update=function(){var swiper=this;if(swiper&&!swiper.destroyed){var snapGrid=swiper.snapGrid,params=swiper.params;params.breakpoints&&swiper.setBreakpoint(),swiper.updateSize(),swiper.updateSlides(),swiper.updateProgress(),swiper.updateSlidesClasses(),swiper.params.freeMode?(setTranslate(),swiper.params.autoHeight&&swiper.updateAutoHeight()):(("auto"===swiper.params.slidesPerView||swiper.params.slidesPerView>1)&&swiper.isEnd&&!swiper.params.centeredSlides?swiper.slideTo(swiper.slides.length-1,0,!1,!0):swiper.slideTo(swiper.activeIndex,0,!1,!0))||setTranslate(),params.watchOverflow&&snapGrid!==swiper.snapGrid&&swiper.checkOverflow(),swiper.emit("update")}function setTranslate(){var translateValue=swiper.rtlTranslate?-1*swiper.translate:swiper.translate,newTranslate=Math.min(Math.max(translateValue,swiper.maxTranslate()),swiper.minTranslate());swiper.setTranslate(newTranslate),swiper.updateActiveIndex(),swiper.updateSlidesClasses()}},Swiper.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"))},Swiper.prototype.destroy=function(deleteInstance,cleanStyles){void 0===deleteInstance&&(deleteInstance=!0),void 0===cleanStyles&&(cleanStyles=!0);var swiper=this,params=swiper.params,$el=swiper.$el,$wrapperEl=swiper.$wrapperEl,slides=swiper.slides;return void 0===swiper.params||swiper.destroyed?null:(swiper.emit("beforeDestroy"),swiper.initialized=!1,swiper.detachEvents(),params.loop&&swiper.loopDestroy(),cleanStyles&&(swiper.removeClasses(),$el.removeAttr("style"),$wrapperEl.removeAttr("style"),slides&&slides.length&&slides.removeClass([params.slideVisibleClass,params.slideActiveClass,params.slideNextClass,params.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index").removeAttr("data-swiper-column").removeAttr("data-swiper-row")),swiper.emit("destroy"),Object.keys(swiper.eventsListeners).forEach(function(eventName){swiper.off(eventName)}),!1!==deleteInstance&&(swiper.$el[0].swiper=null,swiper.$el.data("swiper",null),Utils.deleteProps(swiper)),swiper.destroyed=!0,null)},Swiper.extendDefaults=function(newDefaults){Utils.extend(extendedDefaults,newDefaults)},staticAccessors.extendedDefaults.get=function(){return extendedDefaults},staticAccessors.defaults.get=function(){return defaults},staticAccessors.Class.get=function(){return SwiperClass$$1},staticAccessors.$.get=function(){return $},Object.defineProperties(Swiper,staticAccessors),Swiper}(SwiperClass),Device$1={name:"device",proto:{device:Device},static:{device:Device}},Support$1={name:"support",proto:{support:Support},static:{support:Support}},Browser$1={name:"browser",proto:{browser:Browser},static:{browser:Browser}},Resize={name:"resize",create:function(){var swiper=this;Utils.extend(swiper,{resize:{resizeHandler:function(){swiper&&!swiper.destroyed&&swiper.initialized&&(swiper.emit("beforeResize"),swiper.emit("resize"))},orientationChangeHandler:function(){swiper&&!swiper.destroyed&&swiper.initialized&&swiper.emit("orientationchange")}}})},on:{init:function(){win.addEventListener("resize",this.resize.resizeHandler),win.addEventListener("orientationchange",this.resize.orientationChangeHandler)},destroy:function(){win.removeEventListener("resize",this.resize.resizeHandler),win.removeEventListener("orientationchange",this.resize.orientationChangeHandler)}}},Observer={func:win.MutationObserver||win.WebkitMutationObserver,attach:function(target,options){void 0===options&&(options={});var swiper=this,ObserverFunc=Observer.func,observer=new ObserverFunc(function(mutations){mutations.forEach(function(mutation){swiper.emit("observerUpdate",mutation)})});observer.observe(target,{attributes:void 0===options.attributes||options.attributes,childList:void 0===options.childList||options.childList,characterData:void 0===options.characterData||options.characterData}),swiper.observer.observers.push(observer)},init:function(){if(Support.observer&&this.params.observer){if(this.params.observeParents)for(var containerParents=this.$el.parents(),i=0;i<containerParents.length;i+=1)this.observer.attach(containerParents[i]);this.observer.attach(this.$el[0],{childList:!1}),this.observer.attach(this.$wrapperEl[0],{attributes:!1})}},destroy:function(){this.observer.observers.forEach(function(observer){observer.disconnect()}),this.observer.observers=[]}},Observer$1={name:"observer",params:{observer:!1,observeParents:!1},create:function(){Utils.extend(this,{observer:{init:Observer.init.bind(this),attach:Observer.attach.bind(this),destroy:Observer.destroy.bind(this),observers:[]}})},on:{init:function(){this.observer.init()},destroy:function(){this.observer.destroy()}}},Virtual={update:function(force){var swiper=this,ref=swiper.params,slidesPerView=ref.slidesPerView,slidesPerGroup=ref.slidesPerGroup,centeredSlides=ref.centeredSlides,ref$1=swiper.virtual,previousFrom=ref$1.from,previousTo=ref$1.to,slides=ref$1.slides,previousSlidesGrid=ref$1.slidesGrid,renderSlide=ref$1.renderSlide,previousOffset=ref$1.offset;swiper.updateActiveIndex();var offsetProp,slidesAfter,slidesBefore,activeIndex=swiper.activeIndex||0;offsetProp=swiper.rtlTranslate?"right":swiper.isHorizontal()?"left":"top",centeredSlides?(slidesAfter=Math.floor(slidesPerView/2)+slidesPerGroup,slidesBefore=Math.floor(slidesPerView/2)+slidesPerGroup):(slidesAfter=slidesPerView+(slidesPerGroup-1),slidesBefore=slidesPerGroup);var from=Math.max((activeIndex||0)-slidesBefore,0),to=Math.min((activeIndex||0)+slidesAfter,slides.length-1),offset=(swiper.slidesGrid[from]||0)-(swiper.slidesGrid[0]||0);function onRendered(){swiper.updateSlides(),swiper.updateProgress(),swiper.updateSlidesClasses(),swiper.lazy&&swiper.params.lazy.enabled&&swiper.lazy.load()}if(Utils.extend(swiper.virtual,{from:from,to:to,offset:offset,slidesGrid:swiper.slidesGrid}),previousFrom===from&&previousTo===to&&!force)return swiper.slidesGrid!==previousSlidesGrid&&offset!==previousOffset&&swiper.slides.css(offsetProp,offset+"px"),void swiper.updateProgress();if(swiper.params.virtual.renderExternal)return swiper.params.virtual.renderExternal.call(swiper,{offset:offset,from:from,to:to,slides:function(){for(var slidesToRender=[],i=from;i<=to;i+=1)slidesToRender.push(slides[i]);return slidesToRender}()}),void onRendered();var prependIndexes=[],appendIndexes=[];if(force)swiper.$wrapperEl.find("."+swiper.params.slideClass).remove();else for(var i=previousFrom;i<=previousTo;i+=1)(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)i$1>=from&&i$1<=to&&(void 0===previousTo||force?appendIndexes.push(i$1):(i$1>previousTo&&appendIndexes.push(i$1),i$1<previousFrom&&prependIndexes.push(i$1)));appendIndexes.forEach(function(index){swiper.$wrapperEl.append(renderSlide(slides[index],index))}),prependIndexes.sort(function(a,b){return a<b}).forEach(function(index){swiper.$wrapperEl.prepend(renderSlide(slides[index],index))}),swiper.$wrapperEl.children(".swiper-slide").css(offsetProp,offset+"px"),onRendered()},renderSlide:function(slide,index){var params=this.params.virtual;if(params.cache&&this.virtual.cache[index])return this.virtual.cache[index];var $slideEl=params.renderSlide?$(params.renderSlide.call(this,slide,index)):$('<div class="'+this.params.slideClass+'" data-swiper-slide-index="'+index+'">'+slide+"</div>");return $slideEl.attr("data-swiper-slide-index")||$slideEl.attr("data-swiper-slide-index",index),params.cache&&(this.virtual.cache[index]=$slideEl),$slideEl},appendSlide:function(slide){this.virtual.slides.push(slide),this.virtual.update(!0)},prependSlide:function(slide){if(this.virtual.slides.unshift(slide),this.params.virtual.cache){var cache=this.virtual.cache,newCache={};Object.keys(cache).forEach(function(cachedIndex){newCache[cachedIndex+1]=cache[cachedIndex]}),this.virtual.cache=newCache}this.virtual.update(!0),this.slideNext(0)}},Virtual$1={name:"virtual",params:{virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null}},create:function(){Utils.extend(this,{virtual:{update:Virtual.update.bind(this),appendSlide:Virtual.appendSlide.bind(this),prependSlide:Virtual.prependSlide.bind(this),renderSlide:Virtual.renderSlide.bind(this),slides:this.params.virtual.slides,cache:{}}})},on:{beforeInit:function(){if(this.params.virtual.enabled){this.classNames.push(this.params.containerModifierClass+"virtual");var overwriteParams={watchSlidesProgress:!0};Utils.extend(this.params,overwriteParams),Utils.extend(this.originalParams,overwriteParams),this.virtual.update()}},setTranslate:function(){this.params.virtual.enabled&&this.virtual.update()}}},Keyboard={handle:function(event){var rtl=this.rtlTranslate,e=event;e.originalEvent&&(e=e.originalEvent);var kc=e.keyCode||e.charCode;if(!this.allowSlideNext&&(this.isHorizontal()&&39===kc||this.isVertical()&&40===kc))return!1;if(!this.allowSlidePrev&&(this.isHorizontal()&&37===kc||this.isVertical()&&38===kc))return!1;if(!(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey||doc.activeElement&&doc.activeElement.nodeName&&("input"===doc.activeElement.nodeName.toLowerCase()||"textarea"===doc.activeElement.nodeName.toLowerCase()))){if(this.params.keyboard.onlyInViewport&&(37===kc||39===kc||38===kc||40===kc)){var inView=!1;if(this.$el.parents("."+this.params.slideClass).length>0&&0===this.$el.parents("."+this.params.slideActiveClass).length)return;var windowWidth=win.innerWidth,windowHeight=win.innerHeight,swiperOffset=this.$el.offset();rtl&&(swiperOffset.left-=this.$el[0].scrollLeft);for(var swiperCoord=[[swiperOffset.left,swiperOffset.top],[swiperOffset.left+this.width,swiperOffset.top],[swiperOffset.left,swiperOffset.top+this.height],[swiperOffset.left+this.width,swiperOffset.top+this.height]],i=0;i<swiperCoord.length;i+=1){var point=swiperCoord[i];point[0]>=0&&point[0]<=windowWidth&&point[1]>=0&&point[1]<=windowHeight&&(inView=!0)}if(!inView)return}this.isHorizontal()?(37!==kc&&39!==kc||(e.preventDefault?e.preventDefault():e.returnValue=!1),(39===kc&&!rtl||37===kc&&rtl)&&this.slideNext(),(37===kc&&!rtl||39===kc&&rtl)&&this.slidePrev()):(38!==kc&&40!==kc||(e.preventDefault?e.preventDefault():e.returnValue=!1),40===kc&&this.slideNext(),38===kc&&this.slidePrev()),this.emit("keyPress",kc)}},enable:function(){this.keyboard.enabled||($(doc).on("keydown",this.keyboard.handle),this.keyboard.enabled=!0)},disable:function(){this.keyboard.enabled&&($(doc).off("keydown",this.keyboard.handle),this.keyboard.enabled=!1)}},Keyboard$1={name:"keyboard",params:{keyboard:{enabled:!1,onlyInViewport:!0}},create:function(){Utils.extend(this,{keyboard:{enabled:!1,enable:Keyboard.enable.bind(this),disable:Keyboard.disable.bind(this),handle:Keyboard.handle.bind(this)}})},on:{init:function(){this.params.keyboard.enabled&&this.keyboard.enable()},destroy:function(){this.keyboard.enabled&&this.keyboard.disable()}}},Mousewheel={lastScrollTime:Utils.now(),event:win.navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":function(){var isSupported="onwheel"in doc;if(!isSupported){var element=doc.createElement("div");element.setAttribute("onwheel","return;"),isSupported="function"==typeof element.onwheel}return!isSupported&&doc.implementation&&doc.implementation.hasFeature&&!0!==doc.implementation.hasFeature("","")&&(isSupported=doc.implementation.hasFeature("Events.wheel","3.0")),isSupported}()?"wheel":"mousewheel",normalize:function(e){var sX=0,sY=0,pX=0,pY=0;return"detail"in e&&(sY=e.detail),"wheelDelta"in e&&(sY=-e.wheelDelta/120),"wheelDeltaY"in e&&(sY=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(sX=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(sX=sY,sY=0),pX=10*sX,pY=10*sY,"deltaY"in e&&(pY=e.deltaY),"deltaX"in e&&(pX=e.deltaX),(pX||pY)&&e.deltaMode&&(1===e.deltaMode?(pX*=40,pY*=40):(pX*=800,pY*=800)),pX&&!sX&&(sX=pX<1?-1:1),pY&&!sY&&(sY=pY<1?-1:1),{spinX:sX,spinY:sY,pixelX:pX,pixelY:pY}},handleMouseEnter:function(){this.mouseEntered=!0},handleMouseLeave:function(){this.mouseEntered=!1},handle:function(event){var e=event,swiper=this,params=swiper.params.mousewheel;if(!swiper.mouseEntered&&!params.releaseOnEdges)return!0;e.originalEvent&&(e=e.originalEvent);var delta=0,rtlFactor=swiper.rtlTranslate?-1:1,data=Mousewheel.normalize(e);if(params.forceToAxis)if(swiper.isHorizontal()){if(!(Math.abs(data.pixelX)>Math.abs(data.pixelY)))return!0;delta=data.pixelX*rtlFactor}else{if(!(Math.abs(data.pixelY)>Math.abs(data.pixelX)))return!0;delta=data.pixelY}else delta=Math.abs(data.pixelX)>Math.abs(data.pixelY)?-data.pixelX*rtlFactor:-data.pixelY;if(0===delta)return!0;if(params.invert&&(delta=-delta),swiper.params.freeMode){swiper.params.loop&&swiper.loopFix();var position=swiper.getTranslate()+delta*params.sensitivity,wasBeginning=swiper.isBeginning,wasEnd=swiper.isEnd;if(position>=swiper.minTranslate()&&(position=swiper.minTranslate()),position<=swiper.maxTranslate()&&(position=swiper.maxTranslate()),swiper.setTransition(0),swiper.setTranslate(position),swiper.updateProgress(),swiper.updateActiveIndex(),swiper.updateSlidesClasses(),(!wasBeginning&&swiper.isBeginning||!wasEnd&&swiper.isEnd)&&swiper.updateSlidesClasses(),swiper.params.freeModeSticky&&(clearTimeout(swiper.mousewheel.timeout),swiper.mousewheel.timeout=Utils.nextTick(function(){swiper.slideToClosest()},300)),swiper.emit("scroll",e),swiper.params.autoplay&&swiper.params.autoplayDisableOnInteraction&&swiper.autoplay.stop(),position===swiper.minTranslate()||position===swiper.maxTranslate())return!0}else{if(Utils.now()-swiper.mousewheel.lastScrollTime>60)if(delta<0)if(swiper.isEnd&&!swiper.params.loop||swiper.animating){if(params.releaseOnEdges)return!0}else swiper.slideNext(),swiper.emit("scroll",e);else if(swiper.isBeginning&&!swiper.params.loop||swiper.animating){if(params.releaseOnEdges)return!0}else swiper.slidePrev(),swiper.emit("scroll",e);swiper.mousewheel.lastScrollTime=(new win.Date).getTime()}return e.preventDefault?e.preventDefault():e.returnValue=!1,!1},enable:function(){if(!Mousewheel.event)return!1;if(this.mousewheel.enabled)return!1;var target=this.$el;return"container"!==this.params.mousewheel.eventsTarged&&(target=$(this.params.mousewheel.eventsTarged)),target.on("mouseenter",this.mousewheel.handleMouseEnter),target.on("mouseleave",this.mousewheel.handleMouseLeave),target.on(Mousewheel.event,this.mousewheel.handle),this.mousewheel.enabled=!0,!0},disable:function(){if(!Mousewheel.event)return!1;if(!this.mousewheel.enabled)return!1;var target=this.$el;return"container"!==this.params.mousewheel.eventsTarged&&(target=$(this.params.mousewheel.eventsTarged)),target.off(Mousewheel.event,this.mousewheel.handle),this.mousewheel.enabled=!1,!0}},Navigation={update:function(){var params=this.params.navigation;if(!this.params.loop){var ref=this.navigation,$nextEl=ref.$nextEl,$prevEl=ref.$prevEl;$prevEl&&$prevEl.length>0&&(this.isBeginning?$prevEl.addClass(params.disabledClass):$prevEl.removeClass(params.disabledClass),$prevEl[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](params.lockClass)),$nextEl&&$nextEl.length>0&&(this.isEnd?$nextEl.addClass(params.disabledClass):$nextEl.removeClass(params.disabledClass),$nextEl[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](params.lockClass))}},init:function(){var $nextEl,$prevEl,swiper=this,params=swiper.params.navigation;(params.nextEl||params.prevEl)&&(params.nextEl&&($nextEl=$(params.nextEl),swiper.params.uniqueNavElements&&"string"==typeof params.nextEl&&$nextEl.length>1&&1===swiper.$el.find(params.nextEl).length&&($nextEl=swiper.$el.find(params.nextEl))),params.prevEl&&($prevEl=$(params.prevEl),swiper.params.uniqueNavElements&&"string"==typeof params.prevEl&&$prevEl.length>1&&1===swiper.$el.find(params.prevEl).length&&($prevEl=swiper.$el.find(params.prevEl))),$nextEl&&$nextEl.length>0&&$nextEl.on("click",function(e){e.preventDefault(),swiper.isEnd&&!swiper.params.loop||swiper.slideNext()}),$prevEl&&$prevEl.length>0&&$prevEl.on("click",function(e){e.preventDefault(),swiper.isBeginning&&!swiper.params.loop||swiper.slidePrev()}),Utils.extend(swiper.navigation,{$nextEl:$nextEl,nextEl:$nextEl&&$nextEl[0],$prevEl:$prevEl,prevEl:$prevEl&&$prevEl[0]}))},destroy:function(){var ref=this.navigation,$nextEl=ref.$nextEl,$prevEl=ref.$prevEl;$nextEl&&$nextEl.length&&($nextEl.off("click"),$nextEl.removeClass(this.params.navigation.disabledClass)),$prevEl&&$prevEl.length&&($prevEl.off("click"),$prevEl.removeClass(this.params.navigation.disabledClass))}},Pagination={update:function(){var rtl=this.rtl,params=this.params.pagination;if(params.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var current,slidesLength=this.virtual&&this.params.virtual.enabled?this.virtual.slides.length:this.slides.length,$el=this.pagination.$el,total=this.params.loop?Math.ceil((slidesLength-2*this.loopedSlides)/this.params.slidesPerGroup):this.snapGrid.length;if(this.params.loop?((current=Math.ceil((this.activeIndex-this.loopedSlides)/this.params.slidesPerGroup))>slidesLength-1-2*this.loopedSlides&&(current-=slidesLength-2*this.loopedSlides),current>total-1&&(current-=total),current<0&&"bullets"!==this.params.paginationType&&(current=total+current)):current=void 0!==this.snapIndex?this.snapIndex:this.activeIndex||0,"bullets"===params.type&&this.pagination.bullets&&this.pagination.bullets.length>0){var firstIndex,lastIndex,midIndex,bullets=this.pagination.bullets;if(params.dynamicBullets&&(this.pagination.bulletSize=bullets.eq(0)[this.isHorizontal()?"outerWidth":"outerHeight"](!0),$el.css(this.isHorizontal()?"width":"height",this.pagination.bulletSize*(params.dynamicMainBullets+4)+"px"),params.dynamicMainBullets>1&&void 0!==this.previousIndex&&(this.pagination.dynamicBulletIndex+=current-this.previousIndex,this.pagination.dynamicBulletIndex>params.dynamicMainBullets-1?this.pagination.dynamicBulletIndex=params.dynamicMainBullets-1:this.pagination.dynamicBulletIndex<0&&(this.pagination.dynamicBulletIndex=0)),firstIndex=current-this.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"),$el.length>1)bullets.each(function(index,bullet){var $bullet=$(bullet),bulletIndex=$bullet.index();bulletIndex===current&&$bullet.addClass(params.bulletActiveClass),params.dynamicBullets&&(bulletIndex>=firstIndex&&bulletIndex<=lastIndex&&$bullet.addClass(params.bulletActiveClass+"-main"),bulletIndex===firstIndex&&$bullet.prev().addClass(params.bulletActiveClass+"-prev").prev().addClass(params.bulletActiveClass+"-prev-prev"),bulletIndex===lastIndex&&$bullet.next().addClass(params.bulletActiveClass+"-next").next().addClass(params.bulletActiveClass+"-next-next"))});else{var $bullet=bullets.eq(current);if($bullet.addClass(params.bulletActiveClass),params.dynamicBullets){for(var $firstDisplayedBullet=bullets.eq(firstIndex),$lastDisplayedBullet=bullets.eq(lastIndex),i=firstIndex;i<=lastIndex;i+=1)bullets.eq(i).addClass(params.bulletActiveClass+"-main");$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),bulletsOffset=(this.pagination.bulletSize*dynamicBulletsLength-this.pagination.bulletSize)/2-midIndex*this.pagination.bulletSize,offsetProp=rtl?"right":"left";bullets.css(this.isHorizontal()?offsetProp:"top",bulletsOffset+"px")}}if("fraction"===params.type&&($el.find("."+params.currentClass).text(params.formatFractionCurrent(current+1)),$el.find("."+params.totalClass).text(params.formatFractionTotal(total))),"progressbar"===params.type){var progressbarDirection;progressbarDirection=params.progressbarOpposite?this.isHorizontal()?"vertical":"horizontal":this.isHorizontal()?"horizontal":"vertical";var scale=(current+1)/total,scaleX=1,scaleY=1;"horizontal"===progressbarDirection?scaleX=scale:scaleY=scale,$el.find("."+params.progressbarFillClass).transform("translate3d(0,0,0) scaleX("+scaleX+") scaleY("+scaleY+")").transition(this.params.speed)}"custom"===params.type&¶ms.renderCustom?($el.html(params.renderCustom(this,current+1,total)),this.emit("paginationRender",this,$el[0])):this.emit("paginationUpdate",this,$el[0]),$el[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](params.lockClass)}},render:function(){var params=this.params.pagination;if(params.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var slidesLength=this.virtual&&this.params.virtual.enabled?this.virtual.slides.length:this.slides.length,$el=this.pagination.$el,paginationHTML="";if("bullets"===params.type){for(var numberOfBullets=this.params.loop?Math.ceil((slidesLength-2*this.loopedSlides)/this.params.slidesPerGroup):this.snapGrid.length,i=0;i<numberOfBullets;i+=1)params.renderBullet?paginationHTML+=params.renderBullet.call(this,i,params.bulletClass):paginationHTML+="<"+params.bulletElement+' class="'+params.bulletClass+'"></'+params.bulletElement+">";$el.html(paginationHTML),this.pagination.bullets=$el.find("."+params.bulletClass)}"fraction"===params.type&&(paginationHTML=params.renderFraction?params.renderFraction.call(this,params.currentClass,params.totalClass):'<span class="'+params.currentClass+'"></span> / <span class="'+params.totalClass+'"></span>',$el.html(paginationHTML)),"progressbar"===params.type&&(paginationHTML=params.renderProgressbar?params.renderProgressbar.call(this,params.progressbarFillClass):'<span class="'+params.progressbarFillClass+'"></span>',$el.html(paginationHTML)),"custom"!==params.type&&this.emit("paginationRender",this.pagination.$el[0])}},init:function(){var swiper=this,params=swiper.params.pagination;if(params.el){var $el=$(params.el);0!==$el.length&&(swiper.params.uniqueNavElements&&"string"==typeof params.el&&$el.length>1&&1===swiper.$el.find(params.el).length&&($el=swiper.$el.find(params.el)),"bullets"===params.type&¶ms.clickable&&$el.addClass(params.clickableClass),$el.addClass(params.modifierClass+params.type),"bullets"===params.type&¶ms.dynamicBullets&&($el.addClass(""+params.modifierClass+params.type+"-dynamic"),swiper.pagination.dynamicBulletIndex=0,params.dynamicMainBullets<1&&(params.dynamicMainBullets=1)),"progressbar"===params.type&¶ms.progressbarOpposite&&$el.addClass(params.progressbarOppositeClass),params.clickable&&$el.on("click","."+params.bulletClass,function(e){e.preventDefault();var index=$(this).index()*swiper.params.slidesPerGroup;swiper.params.loop&&(index+=swiper.loopedSlides),swiper.slideTo(index)}),Utils.extend(swiper.pagination,{$el:$el,el:$el[0]}))}},destroy:function(){var params=this.params.pagination;if(params.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var $el=this.pagination.$el;$el.removeClass(params.hiddenClass),$el.removeClass(params.modifierClass+params.type),this.pagination.bullets&&this.pagination.bullets.removeClass(params.bulletActiveClass),params.clickable&&$el.off("click","."+params.bulletClass)}}},Scrollbar={setTranslate:function(){if(this.params.scrollbar.el&&this.scrollbar.el){var scrollbar=this.scrollbar,rtl=this.rtlTranslate,progress=this.progress,dragSize=scrollbar.dragSize,trackSize=scrollbar.trackSize,$dragEl=scrollbar.$dragEl,$el=scrollbar.$el,params=this.params.scrollbar,newSize=dragSize,newPos=(trackSize-dragSize)*progress;rtl?(newPos=-newPos)>0?(newSize=dragSize-newPos,newPos=0):-newPos+dragSize>trackSize&&(newSize=trackSize+newPos):newPos<0?(newSize=dragSize+newPos,newPos=0):newPos+dragSize>trackSize&&(newSize=trackSize-newPos),this.isHorizontal()?(Support.transforms3d?$dragEl.transform("translate3d("+newPos+"px, 0, 0)"):$dragEl.transform("translateX("+newPos+"px)"),$dragEl[0].style.width=newSize+"px"):(Support.transforms3d?$dragEl.transform("translate3d(0px, "+newPos+"px, 0)"):$dragEl.transform("translateY("+newPos+"px)"),$dragEl[0].style.height=newSize+"px"),params.hide&&(clearTimeout(this.scrollbar.timeout),$el[0].style.opacity=1,this.scrollbar.timeout=setTimeout(function(){$el[0].style.opacity=0,$el.transition(400)},1e3))}},setTransition:function(duration){this.params.scrollbar.el&&this.scrollbar.el&&this.scrollbar.$dragEl.transition(duration)},updateSize:function(){if(this.params.scrollbar.el&&this.scrollbar.el){var scrollbar=this.scrollbar,$dragEl=scrollbar.$dragEl,$el=scrollbar.$el;$dragEl[0].style.width="",$dragEl[0].style.height="";var dragSize,trackSize=this.isHorizontal()?$el[0].offsetWidth:$el[0].offsetHeight,divider=this.size/this.virtualSize,moveDivider=divider*(trackSize/this.size);dragSize="auto"===this.params.scrollbar.dragSize?trackSize*divider:parseInt(this.params.scrollbar.dragSize,10),this.isHorizontal()?$dragEl[0].style.width=dragSize+"px":$dragEl[0].style.height=dragSize+"px",$el[0].style.display=divider>=1?"none":"",this.params.scrollbarHide&&($el[0].style.opacity=0),Utils.extend(scrollbar,{trackSize:trackSize,divider:divider,moveDivider:moveDivider,dragSize:dragSize}),scrollbar.$el[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](this.params.scrollbar.lockClass)}},setDragPosition:function(e){var pointerPosition,positionRatio,scrollbar=this.scrollbar,rtl=this.rtlTranslate,$el=scrollbar.$el,dragSize=scrollbar.dragSize,trackSize=scrollbar.trackSize;pointerPosition=this.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY,positionRatio=(pointerPosition-$el.offset()[this.isHorizontal()?"left":"top"]-dragSize/2)/(trackSize-dragSize),positionRatio=Math.max(Math.min(positionRatio,1),0),rtl&&(positionRatio=1-positionRatio);var position=this.minTranslate()+(this.maxTranslate()-this.minTranslate())*positionRatio;this.updateProgress(position),this.setTranslate(position),this.updateActiveIndex(),this.updateSlidesClasses()},onDragStart:function(e){var params=this.params.scrollbar,scrollbar=this.scrollbar,$wrapperEl=this.$wrapperEl,$el=scrollbar.$el,$dragEl=scrollbar.$dragEl;this.scrollbar.isTouched=!0,e.preventDefault(),e.stopPropagation(),$wrapperEl.transition(100),$dragEl.transition(100),scrollbar.setDragPosition(e),clearTimeout(this.scrollbar.dragTimeout),$el.transition(0),params.hide&&$el.css("opacity",1),this.emit("scrollbarDragStart",e)},onDragMove:function(e){var scrollbar=this.scrollbar,$wrapperEl=this.$wrapperEl,$el=scrollbar.$el,$dragEl=scrollbar.$dragEl;this.scrollbar.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,scrollbar.setDragPosition(e),$wrapperEl.transition(0),$el.transition(0),$dragEl.transition(0),this.emit("scrollbarDragMove",e))},onDragEnd:function(e){var params=this.params.scrollbar,scrollbar=this.scrollbar,$el=scrollbar.$el;this.scrollbar.isTouched&&(this.scrollbar.isTouched=!1,params.hide&&(clearTimeout(this.scrollbar.dragTimeout),this.scrollbar.dragTimeout=Utils.nextTick(function(){$el.css("opacity",0),$el.transition(400)},1e3)),this.emit("scrollbarDragEnd",e),params.snapOnRelease&&this.slideToClosest())},enableDraggable:function(){if(this.params.scrollbar.el){var scrollbar=this.scrollbar,touchEvents=this.touchEvents,touchEventsDesktop=this.touchEventsDesktop,params=this.params,$el=scrollbar.$el,target=$el[0],activeListener=!(!Support.passiveListener||!params.passiveListener)&&{passive:!1,capture:!1},passiveListener=!(!Support.passiveListener||!params.passiveListener)&&{passive:!0,capture:!1};Support.touch||!Support.pointerEvents&&!Support.prefixedPointerEvents?(Support.touch&&(target.addEventListener(touchEvents.start,this.scrollbar.onDragStart,activeListener),target.addEventListener(touchEvents.move,this.scrollbar.onDragMove,activeListener),target.addEventListener(touchEvents.end,this.scrollbar.onDragEnd,passiveListener)),(params.simulateTouch&&!Device.ios&&!Device.android||params.simulateTouch&&!Support.touch&&Device.ios)&&(target.addEventListener("mousedown",this.scrollbar.onDragStart,activeListener),doc.addEventListener("mousemove",this.scrollbar.onDragMove,activeListener),doc.addEventListener("mouseup",this.scrollbar.onDragEnd,passiveListener))):(target.addEventListener(touchEventsDesktop.start,this.scrollbar.onDragStart,activeListener),doc.addEventListener(touchEventsDesktop.move,this.scrollbar.onDragMove,activeListener),doc.addEventListener(touchEventsDesktop.end,this.scrollbar.onDragEnd,passiveListener))}},disableDraggable:function(){if(this.params.scrollbar.el){var scrollbar=this.scrollbar,touchEvents=this.touchEvents,touchEventsDesktop=this.touchEventsDesktop,params=this.params,$el=scrollbar.$el,target=$el[0],activeListener=!(!Support.passiveListener||!params.passiveListener)&&{passive:!1,capture:!1},passiveListener=!(!Support.passiveListener||!params.passiveListener)&&{passive:!0,capture:!1};Support.touch||!Support.pointerEvents&&!Support.prefixedPointerEvents?(Support.touch&&(target.removeEventListener(touchEvents.start,this.scrollbar.onDragStart,activeListener),target.removeEventListener(touchEvents.move,this.scrollbar.onDragMove,activeListener),target.removeEventListener(touchEvents.end,this.scrollbar.onDragEnd,passiveListener)),(params.simulateTouch&&!Device.ios&&!Device.android||params.simulateTouch&&!Support.touch&&Device.ios)&&(target.removeEventListener("mousedown",this.scrollbar.onDragStart,activeListener),doc.removeEventListener("mousemove",this.scrollbar.onDragMove,activeListener),doc.removeEventListener("mouseup",this.scrollbar.onDragEnd,passiveListener))):(target.removeEventListener(touchEventsDesktop.start,this.scrollbar.onDragStart,activeListener),doc.removeEventListener(touchEventsDesktop.move,this.scrollbar.onDragMove,activeListener),doc.removeEventListener(touchEventsDesktop.end,this.scrollbar.onDragEnd,passiveListener))}},init:function(){if(this.params.scrollbar.el){var scrollbar=this.scrollbar,$swiperEl=this.$el,params=this.params.scrollbar,$el=$(params.el);this.params.uniqueNavElements&&"string"==typeof params.el&&$el.length>1&&1===$swiperEl.find(params.el).length&&($el=$swiperEl.find(params.el));var $dragEl=$el.find("."+this.params.scrollbar.dragClass);0===$dragEl.length&&($dragEl=$('<div class="'+this.params.scrollbar.dragClass+'"></div>'),$el.append($dragEl)),Utils.extend(scrollbar,{$el:$el,el:$el[0],$dragEl:$dragEl,dragEl:$dragEl[0]}),params.draggable&&scrollbar.enableDraggable()}},destroy:function(){this.scrollbar.disableDraggable()}},Parallax={setTransform:function(el,progress){var rtl=this.rtl,$el=$(el),rtlFactor=rtl?-1:1,p=$el.attr("data-swiper-parallax")||"0",x=$el.attr("data-swiper-parallax-x"),y=$el.attr("data-swiper-parallax-y"),scale=$el.attr("data-swiper-parallax-scale"),opacity=$el.attr("data-swiper-parallax-opacity");if(x||y?(x=x||"0",y=y||"0"):this.isHorizontal()?(x=p,y="0"):(y=p,x="0"),x=x.indexOf("%")>=0?parseInt(x,10)*progress*rtlFactor+"%":x*progress*rtlFactor+"px",y=y.indexOf("%")>=0?parseInt(y,10)*progress+"%":y*progress+"px",void 0!==opacity&&null!==opacity){var currentOpacity=opacity-(opacity-1)*(1-Math.abs(progress));$el[0].style.opacity=currentOpacity}if(void 0===scale||null===scale)$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(){var swiper=this,$el=swiper.$el,slides=swiper.slides,progress=swiper.progress,snapGrid=swiper.snapGrid;$el.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(index,el){swiper.parallax.setTransform(el,progress)}),slides.each(function(slideIndex,slideEl){var slideProgress=slideEl.progress;swiper.params.slidesPerGroup>1&&"auto"!==swiper.params.slidesPerView&&(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]").each(function(index,el){swiper.parallax.setTransform(el,slideProgress)})})},setTransition:function(duration){void 0===duration&&(duration=this.params.speed);var $el=this.$el;$el.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(index,parallaxEl){var $parallaxEl=$(parallaxEl),parallaxDuration=parseInt($parallaxEl.attr("data-swiper-parallax-duration"),10)||duration;0===duration&&(parallaxDuration=0),$parallaxEl.transition(parallaxDuration)})}},Zoom={getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var x1=e.targetTouches[0].pageX,y1=e.targetTouches[0].pageY,x2=e.targetTouches[1].pageX,y2=e.targetTouches[1].pageY,distance=Math.sqrt(Math.pow(x2-x1,2)+Math.pow(y2-y1,2));return distance},onGestureStart:function(e){var params=this.params.zoom,zoom=this.zoom,gesture=zoom.gesture;if(zoom.fakeGestureTouched=!1,zoom.fakeGestureMoved=!1,!Support.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;zoom.fakeGestureTouched=!0,gesture.scaleStart=Zoom.getDistanceBetweenTouches(e)}gesture.$slideEl&&gesture.$slideEl.length||(gesture.$slideEl=$(e.target).closest(".swiper-slide"),0===gesture.$slideEl.length&&(gesture.$slideEl=this.slides.eq(this.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,0!==gesture.$imageWrapEl.length)?(gesture.$imageEl.transition(0),this.zoom.isScaling=!0):gesture.$imageEl=void 0},onGestureChange:function(e){var params=this.params.zoom,zoom=this.zoom,gesture=zoom.gesture;if(!Support.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;zoom.fakeGestureMoved=!0,gesture.scaleMove=Zoom.getDistanceBetweenTouches(e)}gesture.$imageEl&&0!==gesture.$imageEl.length&&(Support.gestures?this.zoom.scale=e.scale*zoom.currentScale:zoom.scale=gesture.scaleMove/gesture.scaleStart*zoom.currentScale,zoom.scale>gesture.maxRatio&&(zoom.scale=gesture.maxRatio-1+Math.pow(zoom.scale-gesture.maxRatio+1,.5)),zoom.scale<params.minRatio&&(zoom.scale=params.minRatio+1-Math.pow(params.minRatio-zoom.scale+1,.5)),gesture.$imageEl.transform("translate3d(0,0,0) scale("+zoom.scale+")"))},onGestureEnd:function(e){var params=this.params.zoom,zoom=this.zoom,gesture=zoom.gesture;if(!Support.gestures){if(!zoom.fakeGestureTouched||!zoom.fakeGestureMoved)return;if("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2&&!Device.android)return;zoom.fakeGestureTouched=!1,zoom.fakeGestureMoved=!1}gesture.$imageEl&&0!==gesture.$imageEl.length&&(zoom.scale=Math.max(Math.min(zoom.scale,gesture.maxRatio),params.minRatio),gesture.$imageEl.transition(this.params.speed).transform("translate3d(0,0,0) scale("+zoom.scale+")"),zoom.currentScale=zoom.scale,zoom.isScaling=!1,1===zoom.scale&&(gesture.$slideEl=void 0))},onTouchStart:function(e){var zoom=this.zoom,gesture=zoom.gesture,image=zoom.image;gesture.$imageEl&&0!==gesture.$imageEl.length&&(image.isTouched||(Device.android&&e.preventDefault(),image.isTouched=!0,image.touchesStart.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,image.touchesStart.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY))},onTouchMove:function(e){var zoom=this.zoom,gesture=zoom.gesture,image=zoom.image,velocity=zoom.velocity;if(gesture.$imageEl&&0!==gesture.$imageEl.length&&(this.allowClick=!1,image.isTouched&&gesture.$slideEl)){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),this.rtl&&(image.startX=-image.startX,image.startY=-image.startY));var scaledWidth=image.width*zoom.scale,scaledHeight=image.height*zoom.scale;if(!(scaledWidth<gesture.slideWidth&&scaledHeight<gesture.slideHeight)){if(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="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,image.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!image.isMoved&&!zoom.isScaling){if(this.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))return void(image.isTouched=!1);if(!this.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))return void(image.isTouched=!1)}e.preventDefault(),e.stopPropagation(),image.isMoved=!0,image.currentX=image.touchesCurrent.x-image.touchesStart.x+image.startX,image.currentY=image.touchesCurrent.y-image.touchesStart.y+image.startY,image.currentX<image.minX&&(image.currentX=image.minX+1-Math.pow(image.minX-image.currentX+1,.8)),image.currentX>image.maxX&&(image.currentX=image.maxX-1+Math.pow(image.currentX-image.maxX+1,.8)),image.currentY<image.minY&&(image.currentY=image.minY+1-Math.pow(image.minY-image.currentY+1,.8)),image.currentY>image.maxY&&(image.currentY=image.maxY-1+Math.pow(image.currentY-image.maxY+1,.8)),velocity.prevPositionX||(velocity.prevPositionX=image.touchesCurrent.x),velocity.prevPositionY||(velocity.prevPositionY=image.touchesCurrent.y),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,Math.abs(image.touchesCurrent.x-velocity.prevPositionX)<2&&(velocity.x=0),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(){var zoom=this.zoom,gesture=zoom.gesture,image=zoom.image,velocity=zoom.velocity;if(gesture.$imageEl&&0!==gesture.$imageEl.length){if(!image.isTouched||!image.isMoved)return image.isTouched=!1,void(image.isMoved=!1);image.isTouched=!1,image.isMoved=!1;var momentumDurationX=300,momentumDurationY=300,momentumDistanceX=velocity.x*momentumDurationX,newPositionX=image.currentX+momentumDistanceX,momentumDistanceY=velocity.y*momentumDurationY,newPositionY=image.currentY+momentumDistanceY;0!==velocity.x&&(momentumDurationX=Math.abs((newPositionX-image.currentX)/velocity.x)),0!==velocity.y&&(momentumDurationY=Math.abs((newPositionY-image.currentY)/velocity.y));var momentumDuration=Math.max(momentumDurationX,momentumDurationY);image.currentX=newPositionX,image.currentY=newPositionY;var scaledWidth=image.width*zoom.scale,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(){var zoom=this.zoom,gesture=zoom.gesture;gesture.$slideEl&&this.previousIndex!==this.activeIndex&&(gesture.$imageEl.transform("translate3d(0,0,0) scale(1)"),gesture.$imageWrapEl.transform("translate3d(0,0,0)"),gesture.$slideEl=void 0,gesture.$imageEl=void 0,gesture.$imageWrapEl=void 0,zoom.scale=1,zoom.currentScale=1)},toggle:function(e){var zoom=this.zoom;zoom.scale&&1!==zoom.scale?zoom.out():zoom.in(e)},in:function(e){var touchX,touchY,offsetX,offsetY,diffX,diffY,translateX,translateY,imageWidth,imageHeight,scaledWidth,scaledHeight,translateMinX,translateMinY,translateMaxX,translateMaxY,slideWidth,slideHeight,zoom=this.zoom,params=this.params.zoom,gesture=zoom.gesture,image=zoom.image;gesture.$slideEl||(gesture.$slideEl=this.clickedSlide?$(this.clickedSlide):this.slides.eq(this.activeIndex),gesture.$imageEl=gesture.$slideEl.find("img, svg, canvas"),gesture.$imageWrapEl=gesture.$imageEl.parent("."+params.containerClass)),gesture.$imageEl&&0!==gesture.$imageEl.length&&(gesture.$slideEl.addClass(""+params.zoomedSlideClass),void 0===image.touchesStart.x&&e?(touchX="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,touchY="touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(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,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,translateX<translateMinX&&(translateX=translateMinX),translateX>translateMaxX&&(translateX=translateMaxX),translateY<translateMinY&&(translateY=translateMinY),translateY>translateMaxY&&(translateY=translateMaxY)):(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(){var zoom=this.zoom,params=this.params.zoom,gesture=zoom.gesture;gesture.$slideEl||(gesture.$slideEl=this.clickedSlide?$(this.clickedSlide):this.slides.eq(this.activeIndex),gesture.$imageEl=gesture.$slideEl.find("img, svg, canvas"),gesture.$imageWrapEl=gesture.$imageEl.parent("."+params.containerClass)),gesture.$imageEl&&0!==gesture.$imageEl.length&&(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=void 0)},enable:function(){var zoom=this.zoom;if(!zoom.enabled){zoom.enabled=!0;var passiveListener=!("touchstart"!==this.touchEvents.start||!Support.passiveListener||!this.params.passiveListeners)&&{passive:!0,capture:!1};Support.gestures?(this.$wrapperEl.on("gesturestart",".swiper-slide",zoom.onGestureStart,passiveListener),this.$wrapperEl.on("gesturechange",".swiper-slide",zoom.onGestureChange,passiveListener),this.$wrapperEl.on("gestureend",".swiper-slide",zoom.onGestureEnd,passiveListener)):"touchstart"===this.touchEvents.start&&(this.$wrapperEl.on(this.touchEvents.start,".swiper-slide",zoom.onGestureStart,passiveListener),this.$wrapperEl.on(this.touchEvents.move,".swiper-slide",zoom.onGestureChange,passiveListener),this.$wrapperEl.on(this.touchEvents.end,".swiper-slide",zoom.onGestureEnd,passiveListener)),this.$wrapperEl.on(this.touchEvents.move,"."+this.params.zoom.containerClass,zoom.onTouchMove)}},disable:function(){var zoom=this.zoom;if(zoom.enabled){this.zoom.enabled=!1;var passiveListener=!("touchstart"!==this.touchEvents.start||!Support.passiveListener||!this.params.passiveListeners)&&{passive:!0,capture:!1};Support.gestures?(this.$wrapperEl.off("gesturestart",".swiper-slide",zoom.onGestureStart,passiveListener),this.$wrapperEl.off("gesturechange",".swiper-slide",zoom.onGestureChange,passiveListener),this.$wrapperEl.off("gestureend",".swiper-slide",zoom.onGestureEnd,passiveListener)):"touchstart"===this.touchEvents.start&&(this.$wrapperEl.off(this.touchEvents.start,".swiper-slide",zoom.onGestureStart,passiveListener),this.$wrapperEl.off(this.touchEvents.move,".swiper-slide",zoom.onGestureChange,passiveListener),this.$wrapperEl.off(this.touchEvents.end,".swiper-slide",zoom.onGestureEnd,passiveListener)),this.$wrapperEl.off(this.touchEvents.move,"."+this.params.zoom.containerClass,zoom.onTouchMove)}}},Lazy={loadInSlide:function(index,loadInDuplicate){void 0===loadInDuplicate&&(loadInDuplicate=!0);var swiper=this,params=swiper.params.lazy;if(void 0!==index&&0!==swiper.slides.length){var isVirtual=swiper.virtual&&swiper.params.virtual.enabled,$slideEl=isVirtual?swiper.$wrapperEl.children("."+swiper.params.slideClass+'[data-swiper-slide-index="'+index+'"]'):swiper.slides.eq(index),$images=$slideEl.find("."+params.elementClass+":not(."+params.loadedClass+"):not(."+params.loadingClass+")");!$slideEl.hasClass(params.elementClass)||$slideEl.hasClass(params.loadedClass)||$slideEl.hasClass(params.loadingClass)||($images=$images.add($slideEl[0])),0!==$images.length&&$images.each(function(imageIndex,imageEl){var $imageEl=$(imageEl);$imageEl.addClass(params.loadingClass);var background=$imageEl.attr("data-background"),src=$imageEl.attr("data-src"),srcset=$imageEl.attr("data-srcset"),sizes=$imageEl.attr("data-sizes");swiper.loadImage($imageEl[0],src||background,srcset,sizes,!1,function(){if(void 0!==swiper&&null!==swiper&&swiper&&(!swiper||swiper.params)&&!swiper.destroyed){if(background?($imageEl.css("background-image",'url("'+background+'")'),$imageEl.removeAttr("data-background")):(srcset&&($imageEl.attr("srcset",srcset),$imageEl.removeAttr("data-srcset")),sizes&&($imageEl.attr("sizes",sizes),$imageEl.removeAttr("data-sizes")),src&&($imageEl.attr("src",src),$imageEl.removeAttr("data-src"))),$imageEl.addClass(params.loadedClass).removeClass(params.loadingClass),$slideEl.find("."+params.preloaderClass).remove(),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(),!1)}else{var duplicatedSlide=swiper.$wrapperEl.children("."+swiper.params.slideDuplicateClass+'[data-swiper-slide-index="'+slideOriginalIndex+'"]');swiper.lazy.loadInSlide(duplicatedSlide.index(),!1)}}swiper.emit("lazyImageReady",$slideEl[0],$imageEl[0])}}),swiper.emit("lazyImageLoad",$slideEl[0],$imageEl[0])})}},load:function(){var swiper=this,$wrapperEl=swiper.$wrapperEl,swiperParams=swiper.params,slides=swiper.slides,activeIndex=swiper.activeIndex,isVirtual=swiper.virtual&&swiperParams.virtual.enabled,params=swiperParams.lazy,slidesPerView=swiperParams.slidesPerView;function slideExist(index){if(isVirtual){if($wrapperEl.children("."+swiperParams.slideClass+'[data-swiper-slide-index="'+index+'"]').length)return!0}else if(slides[index])return!0;return!1}function slideIndex(slideEl){return isVirtual?$(slideEl).attr("data-swiper-slide-index"):$(slideEl).index()}if("auto"===slidesPerView&&(slidesPerView=0),swiper.lazy.initialImageLoaded||(swiper.lazy.initialImageLoaded=!0),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)slideExist(i)&&swiper.lazy.loadInSlide(i);else swiper.lazy.loadInSlide(activeIndex);if(params.loadPrevNext)if(slidesPerView>1||params.loadPrevNextAmount&¶ms.loadPrevNextAmount>1){for(var amount=params.loadPrevNextAmount,spv=slidesPerView,maxIndex=Math.min(activeIndex+spv+Math.max(amount,spv),slides.length),minIndex=Math.max(activeIndex-Math.max(spv,amount),0),i$1=activeIndex+slidesPerView;i$1<maxIndex;i$1+=1)slideExist(i$1)&&swiper.lazy.loadInSlide(i$1);for(var i$2=minIndex;i$2<activeIndex;i$2+=1)slideExist(i$2)&&swiper.lazy.loadInSlide(i$2)}else{var nextSlide=$wrapperEl.children("."+swiperParams.slideNextClass);nextSlide.length>0&&swiper.lazy.loadInSlide(slideIndex(nextSlide));var prevSlide=$wrapperEl.children("."+swiperParams.slidePrevClass);prevSlide.length>0&&swiper.lazy.loadInSlide(slideIndex(prevSlide))}}},Controller={LinearSpline:function(x,y){var i1,i3,binarySearch=function(){var maxIndex,minIndex,guess;return function(array,val){for(minIndex=-1,maxIndex=array.length;maxIndex-minIndex>1;)array[guess=maxIndex+minIndex>>1]<=val?minIndex=guess:maxIndex=guess;return maxIndex}}();return this.x=x,this.y=y,this.lastIndex=x.length-1,this.interpolate=function(x2){return x2?(i3=binarySearch(this.x,x2),i1=i3-1,(x2-this.x[i1])*(this.y[i3]-this.y[i1])/(this.x[i3]-this.x[i1])+this.y[i1]):0},this},getInterpolateFunction:function(c){this.controller.spline||(this.controller.spline=this.params.loop?new Controller.LinearSpline(this.slidesGrid,c.slidesGrid):new Controller.LinearSpline(this.snapGrid,c.snapGrid))},setTranslate:function(setTranslate$1,byController){var multiplier,controlledTranslate,swiper=this,controlled=swiper.controller.control;function setControlledTranslate(c){var translate=swiper.rtlTranslate?-swiper.translate:swiper.translate;"slide"===swiper.params.controller.by&&(swiper.controller.getInterpolateFunction(c),controlledTranslate=-swiper.controller.spline.interpolate(-translate)),controlledTranslate&&"container"!==swiper.params.controller.by||(multiplier=(c.maxTranslate()-c.minTranslate())/(swiper.maxTranslate()-swiper.minTranslate()),controlledTranslate=(translate-swiper.minTranslate())*multiplier+c.minTranslate()),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)controlled[i]!==byController&&controlled[i]instanceof Swiper&&setControlledTranslate(controlled[i]);else controlled instanceof Swiper&&byController!==controlled&&setControlledTranslate(controlled)},setTransition:function(duration,byController){var i,swiper=this,controlled=swiper.controller.control;function setControlledTransition(c){c.setTransition(duration,swiper),0!==duration&&(c.transitionStart(),c.$wrapperEl.transitionEnd(function(){controlled&&(c.params.loop&&"slide"===swiper.params.controller.by&&c.loopFix(),c.transitionEnd())}))}if(Array.isArray(controlled))for(i=0;i<controlled.length;i+=1)controlled[i]!==byController&&controlled[i]instanceof Swiper&&setControlledTransition(controlled[i]);else controlled instanceof Swiper&&byController!==controlled&&setControlledTransition(controlled)}},Controller$1={name:"controller",params:{controller:{control:void 0,inverse:!1,by:"slide"}},create:function(){Utils.extend(this,{controller:{control:this.params.controller.control,getInterpolateFunction:Controller.getInterpolateFunction.bind(this),setTranslate:Controller.setTranslate.bind(this),setTransition:Controller.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(translate,byController){this.controller.control&&this.controller.setTranslate(translate,byController)},setTransition:function(duration,byController){this.controller.control&&this.controller.setTransition(duration,byController)}}},a11y={makeElFocusable:function($el){return $el.attr("tabIndex","0"),$el},addElRole:function($el,role){return $el.attr("role",role),$el},addElLabel:function($el,label){return $el.attr("aria-label",label),$el},disableEl:function($el){return $el.attr("aria-disabled",!0),$el},enableEl:function($el){return $el.attr("aria-disabled",!1),$el},onEnterKey:function(e){var params=this.params.a11y;if(13===e.keyCode){var $targetEl=$(e.target);this.navigation&&this.navigation.$nextEl&&$targetEl.is(this.navigation.$nextEl)&&(this.isEnd&&!this.params.loop||this.slideNext(),this.isEnd?this.a11y.notify(params.lastSlideMessage):this.a11y.notify(params.nextSlideMessage)),this.navigation&&this.navigation.$prevEl&&$targetEl.is(this.navigation.$prevEl)&&(this.isBeginning&&!this.params.loop||this.slidePrev(),this.isBeginning?this.a11y.notify(params.firstSlideMessage):this.a11y.notify(params.prevSlideMessage)),this.pagination&&$targetEl.is("."+this.params.pagination.bulletClass)&&$targetEl[0].click()}},notify:function(message){var notification=this.a11y.liveRegion;0!==notification.length&&(notification.html(""),notification.html(message))},updateNavigation:function(){if(!this.params.loop){var ref=this.navigation,$nextEl=ref.$nextEl,$prevEl=ref.$prevEl;$prevEl&&$prevEl.length>0&&(this.isBeginning?this.a11y.disableEl($prevEl):this.a11y.enableEl($prevEl)),$nextEl&&$nextEl.length>0&&(this.isEnd?this.a11y.disableEl($nextEl):this.a11y.enableEl($nextEl))}},updatePagination:function(){var swiper=this,params=swiper.params.a11y;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(){this.$el.append(this.a11y.liveRegion);var $nextEl,$prevEl,params=this.params.a11y;this.navigation&&this.navigation.$nextEl&&($nextEl=this.navigation.$nextEl),this.navigation&&this.navigation.$prevEl&&($prevEl=this.navigation.$prevEl),$nextEl&&(this.a11y.makeElFocusable($nextEl),this.a11y.addElRole($nextEl,"button"),this.a11y.addElLabel($nextEl,params.nextSlideMessage),$nextEl.on("keydown",this.a11y.onEnterKey)),$prevEl&&(this.a11y.makeElFocusable($prevEl),this.a11y.addElRole($prevEl,"button"),this.a11y.addElLabel($prevEl,params.prevSlideMessage),$prevEl.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 $nextEl,$prevEl;this.a11y.liveRegion&&this.a11y.liveRegion.length>0&&this.a11y.liveRegion.remove(),this.navigation&&this.navigation.$nextEl&&($nextEl=this.navigation.$nextEl),this.navigation&&this.navigation.$prevEl&&($prevEl=this.navigation.$prevEl),$nextEl&&$nextEl.off("keydown",this.a11y.onEnterKey),$prevEl&&$prevEl.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)}},History={init:function(){if(this.params.history){if(!win.history||!win.history.pushState)return this.params.history.enabled=!1,void(this.params.hashNavigation.enabled=!0);var history=this.history;history.initialized=!0,history.paths=History.getPathValues(),(history.paths.key||history.paths.value)&&(history.scrollToSlide(0,history.paths.value,this.params.runCallbacksOnInit),this.params.history.replaceState||win.addEventListener("popstate",this.history.setHistoryPopState))}},destroy:function(){this.params.history.replaceState||win.removeEventListener("popstate",this.history.setHistoryPopState)},setHistoryPopState:function(){this.history.paths=History.getPathValues(),this.history.scrollToSlide(this.params.speed,this.history.paths.value,!1)},getPathValues:function(){var pathArray=win.location.pathname.slice(1).split("/").filter(function(part){return""!==part}),total=pathArray.length,key=pathArray[total-2],value=pathArray[total-1];return{key:key,value:value}},setHistory:function(key,index){if(this.history.initialized&&this.params.history.enabled){var slide=this.slides.eq(index),value=History.slugify(slide.attr("data-history"));win.location.pathname.includes(key)||(value=key+"/"+value);var currentState=win.history.state;currentState&¤tState.value===value||(this.params.history.replaceState?win.history.replaceState({value:value},null,value):win.history.pushState({value:value},null,value))}},slugify:function(text){return text.toString().toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(speed,value,runCallbacks){if(value)for(var i=0,length=this.slides.length;i<length;i+=1){var slide=this.slides.eq(i),slideHistory=History.slugify(slide.attr("data-history"));if(slideHistory===value&&!slide.hasClass(this.params.slideDuplicateClass)){var index=slide.index();this.slideTo(index,speed,runCallbacks)}}else this.slideTo(0,speed,runCallbacks)}},HashNavigation={onHashCange:function(){var newHash=doc.location.hash.replace("#",""),activeSlideHash=this.slides.eq(this.activeIndex).attr("data-hash");newHash!==activeSlideHash&&this.slideTo(this.$wrapperEl.children("."+this.params.slideClass+'[data-hash="'+newHash+'"]').index())},setHash:function(){if(this.hashNavigation.initialized&&this.params.hashNavigation.enabled)if(this.params.hashNavigation.replaceState&&win.history&&win.history.replaceState)win.history.replaceState(null,null,"#"+this.slides.eq(this.activeIndex).attr("data-hash")||"");else{var slide=this.slides.eq(this.activeIndex),hash=slide.attr("data-hash")||slide.attr("data-history");doc.location.hash=hash||""}},init:function(){if(!(!this.params.hashNavigation.enabled||this.params.history&&this.params.history.enabled)){this.hashNavigation.initialized=!0;var hash=doc.location.hash.replace("#","");if(hash)for(var i=0,length=this.slides.length;i<length;i+=1){var slide=this.slides.eq(i),slideHash=slide.attr("data-hash")||slide.attr("data-history");if(slideHash===hash&&!slide.hasClass(this.params.slideDuplicateClass)){var index=slide.index();this.slideTo(index,0,this.params.runCallbacksOnInit,!0)}}this.params.hashNavigation.watchState&&$(win).on("hashchange",this.hashNavigation.onHashCange)}},destroy:function(){this.params.hashNavigation.watchState&&$(win).off("hashchange",this.hashNavigation.onHashCange)}},Autoplay={run:function(){var swiper=this,$activeSlideEl=swiper.slides.eq(swiper.activeIndex),delay=swiper.params.autoplay.delay;$activeSlideEl.attr("data-swiper-autoplay")&&(delay=$activeSlideEl.attr("data-swiper-autoplay")||swiper.params.autoplay.delay),swiper.autoplay.timeout=Utils.nextTick(function(){swiper.params.autoplay.reverseDirection?swiper.params.loop?(swiper.loopFix(),swiper.slidePrev(swiper.params.speed,!0,!0),swiper.emit("autoplay")):swiper.isBeginning?swiper.params.autoplay.stopOnLastSlide?swiper.autoplay.stop():(swiper.slideTo(swiper.slides.length-1,swiper.params.speed,!0,!0),swiper.emit("autoplay")):(swiper.slidePrev(swiper.params.speed,!0,!0),swiper.emit("autoplay")):swiper.params.loop?(swiper.loopFix(),swiper.slideNext(swiper.params.speed,!0,!0),swiper.emit("autoplay")):swiper.isEnd?swiper.params.autoplay.stopOnLastSlide?swiper.autoplay.stop():(swiper.slideTo(0,swiper.params.speed,!0,!0),swiper.emit("autoplay")):(swiper.slideNext(swiper.params.speed,!0,!0),swiper.emit("autoplay"))},delay)},start:function(){return void 0===this.autoplay.timeout&&!this.autoplay.running&&(this.autoplay.running=!0,this.emit("autoplayStart"),this.autoplay.run(),!0)},stop:function(){return!!this.autoplay.running&&void 0!==this.autoplay.timeout&&(this.autoplay.timeout&&(clearTimeout(this.autoplay.timeout),this.autoplay.timeout=void 0),this.autoplay.running=!1,this.emit("autoplayStop"),!0)},pause:function(speed){this.autoplay.running&&(this.autoplay.paused||(this.autoplay.timeout&&clearTimeout(this.autoplay.timeout),this.autoplay.paused=!0,0!==speed&&this.params.autoplay.waitForTransition?(this.$wrapperEl[0].addEventListener("transitionend",this.autoplay.onTransitionEnd),this.$wrapperEl[0].addEventListener("webkitTransitionEnd",this.autoplay.onTransitionEnd)):(this.autoplay.paused=!1,this.autoplay.run())))}},Fade={setTranslate:function(){for(var slides=this.slides,i=0;i<slides.length;i+=1){var $slideEl=this.slides.eq(i),offset=$slideEl[0].swiperSlideOffset,tx=-offset;this.params.virtualTranslate||(tx-=this.translate);var ty=0;this.isHorizontal()||(ty=tx,tx=0);var slideOpacity=this.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(duration){var swiper=this,slides=swiper.slides,$wrapperEl=swiper.$wrapperEl;if(slides.transition(duration),swiper.params.virtualTranslate&&0!==duration){var eventTriggered=!1;slides.transitionEnd(function(){if(!eventTriggered&&swiper&&!swiper.destroyed){eventTriggered=!0,swiper.animating=!1;for(var triggerEvents=["webkitTransitionEnd","transitionend"],i=0;i<triggerEvents.length;i+=1)$wrapperEl.trigger(triggerEvents[i])}})}}},Cube={setTranslate:function(){var $cubeShadowEl,$el=this.$el,$wrapperEl=this.$wrapperEl,slides=this.slides,swiperWidth=this.width,swiperHeight=this.height,rtl=this.rtlTranslate,swiperSize=this.size,params=this.params.cubeEffect,isHorizontal=this.isHorizontal(),isVirtual=this.virtual&&this.params.virtual.enabled,wrapperRotate=0;params.shadow&&(isHorizontal?(0===($cubeShadowEl=$wrapperEl.find(".swiper-cube-shadow")).length&&($cubeShadowEl=$('<div class="swiper-cube-shadow"></div>'),$wrapperEl.append($cubeShadowEl)),$cubeShadowEl.css({height:swiperWidth+"px"})):0===($cubeShadowEl=$el.find(".swiper-cube-shadow")).length&&($cubeShadowEl=$('<div class="swiper-cube-shadow"></div>'),$el.append($cubeShadowEl)));for(var i=0;i<slides.length;i+=1){var $slideEl=slides.eq(i),slideIndex=i;isVirtual&&(slideIndex=parseInt($slideEl.attr("data-swiper-slide-index"),10));var slideAngle=90*slideIndex,round=Math.floor(slideAngle/360);rtl&&(slideAngle=-slideAngle,round=Math.floor(-slideAngle/360));var progress=Math.max(Math.min($slideEl[0].progress,1),-1),tx=0,ty=0,tz=0;slideIndex%4==0?(tx=4*-round*swiperSize,tz=0):(slideIndex-1)%4==0?(tx=0,tz=4*-round*swiperSize):(slideIndex-2)%4==0?(tx=swiperSize+4*round*swiperSize,tz=swiperSize):(slideIndex-3)%4==0&&(tx=-swiperSize,tz=3*swiperSize+4*swiperSize*round),rtl&&(tx=-tx),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=90*slideIndex+90*progress,rtl&&(wrapperRotate=90*-slideIndex-90*progress)),$slideEl.transform(transform),params.slideShadows){var shadowBefore=isHorizontal?$slideEl.find(".swiper-slide-shadow-left"):$slideEl.find(".swiper-slide-shadow-top"),shadowAfter=isHorizontal?$slideEl.find(".swiper-slide-shadow-right"):$slideEl.find(".swiper-slide-shadow-bottom");0===shadowBefore.length&&(shadowBefore=$('<div class="swiper-slide-shadow-'+(isHorizontal?"left":"top")+'"></div>'),$slideEl.append(shadowBefore)),0===shadowAfter.length&&(shadowAfter=$('<div class="swiper-slide-shadow-'+(isHorizontal?"right":"bottom")+'"></div>'),$slideEl.append(shadowAfter)),shadowBefore.length&&(shadowBefore[0].style.opacity=Math.max(-progress,0)),shadowAfter.length&&(shadowAfter[0].style.opacity=Math.max(progress,0))}}if($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"}),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)-90*Math.floor(Math.abs(wrapperRotate)/90),multiplier=1.5-(Math.sin(2*shadowAngle*Math.PI/360)/2+Math.cos(2*shadowAngle*Math.PI/360)/2),scale1=params.shadowScale,scale2=params.shadowScale/multiplier,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("+(this.isHorizontal()?0:wrapperRotate)+"deg) rotateY("+(this.isHorizontal()?-wrapperRotate:0)+"deg)")},setTransition:function(duration){var $el=this.$el,slides=this.slides;slides.transition(duration).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(duration),this.params.cubeEffect.shadow&&!this.isHorizontal()&&$el.find(".swiper-cube-shadow").transition(duration)}},Flip={setTranslate:function(){for(var slides=this.slides,rtl=this.rtlTranslate,i=0;i<slides.length;i+=1){var $slideEl=slides.eq(i),progress=$slideEl[0].progress;this.params.flipEffect.limitRotation&&(progress=Math.max(Math.min($slideEl[0].progress,1),-1));var offset=$slideEl[0].swiperSlideOffset,rotate=-180*progress,rotateY=rotate,rotateX=0,tx=-offset,ty=0;if(this.isHorizontal()?rtl&&(rotateY=-rotateY):(ty=tx,tx=0,rotateX=-rotateY,rotateY=0),$slideEl[0].style.zIndex=-Math.abs(Math.round(progress))+slides.length,this.params.flipEffect.slideShadows){var shadowBefore=this.isHorizontal()?$slideEl.find(".swiper-slide-shadow-left"):$slideEl.find(".swiper-slide-shadow-top"),shadowAfter=this.isHorizontal()?$slideEl.find(".swiper-slide-shadow-right"):$slideEl.find(".swiper-slide-shadow-bottom");0===shadowBefore.length&&(shadowBefore=$('<div class="swiper-slide-shadow-'+(this.isHorizontal()?"left":"top")+'"></div>'),$slideEl.append(shadowBefore)),0===shadowAfter.length&&(shadowAfter=$('<div class="swiper-slide-shadow-'+(this.isHorizontal()?"right":"bottom")+'"></div>'),$slideEl.append(shadowAfter)),shadowBefore.length&&(shadowBefore[0].style.opacity=Math.max(-progress,0)),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(duration){var swiper=this,slides=swiper.slides,activeIndex=swiper.activeIndex,$wrapperEl=swiper.$wrapperEl;if(slides.transition(duration).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(duration),swiper.params.virtualTranslate&&0!==duration){var eventTriggered=!1;slides.eq(activeIndex).transitionEnd(function(){if(!eventTriggered&&swiper&&!swiper.destroyed){eventTriggered=!0,swiper.animating=!1;for(var triggerEvents=["webkitTransitionEnd","transitionend"],i=0;i<triggerEvents.length;i+=1)$wrapperEl.trigger(triggerEvents[i])}})}}},Coverflow={setTranslate:function(){for(var swiperWidth=this.width,swiperHeight=this.height,slides=this.slides,$wrapperEl=this.$wrapperEl,slidesSizesGrid=this.slidesSizesGrid,params=this.params.coverflowEffect,isHorizontal=this.isHorizontal(),transform=this.translate,center=isHorizontal?swiperWidth/2-transform:swiperHeight/2-transform,rotate=isHorizontal?params.rotate:-params.rotate,translate=params.depth,i=0,length=slides.length;i<length;i+=1){var $slideEl=slides.eq(i),slideSize=slidesSizesGrid[i],slideOffset=$slideEl[0].swiperSlideOffset,offsetMultiplier=(center-slideOffset-slideSize/2)/slideSize*params.modifier,rotateY=isHorizontal?rotate*offsetMultiplier:0,rotateX=isHorizontal?0:rotate*offsetMultiplier,translateZ=-translate*Math.abs(offsetMultiplier),translateY=isHorizontal?0:params.stretch*offsetMultiplier,translateX=isHorizontal?params.stretch*offsetMultiplier:0;Math.abs(translateX)<.001&&(translateX=0),Math.abs(translateY)<.001&&(translateY=0),Math.abs(translateZ)<.001&&(translateZ=0),Math.abs(rotateY)<.001&&(rotateY=0),Math.abs(rotateX)<.001&&(rotateX=0);var slideTransform="translate3d("+translateX+"px,"+translateY+"px,"+translateZ+"px) rotateX("+rotateX+"deg) rotateY("+rotateY+"deg)";if($slideEl.transform(slideTransform),$slideEl[0].style.zIndex=1-Math.abs(Math.round(offsetMultiplier)),params.slideShadows){var $shadowBeforeEl=isHorizontal?$slideEl.find(".swiper-slide-shadow-left"):$slideEl.find(".swiper-slide-shadow-top"),$shadowAfterEl=isHorizontal?$slideEl.find(".swiper-slide-shadow-right"):$slideEl.find(".swiper-slide-shadow-bottom");0===$shadowBeforeEl.length&&($shadowBeforeEl=$('<div class="swiper-slide-shadow-'+(isHorizontal?"left":"top")+'"></div>'),$slideEl.append($shadowBeforeEl)),0===$shadowAfterEl.length&&($shadowAfterEl=$('<div class="swiper-slide-shadow-'+(isHorizontal?"right":"bottom")+'"></div>'),$slideEl.append($shadowAfterEl)),$shadowBeforeEl.length&&($shadowBeforeEl[0].style.opacity=offsetMultiplier>0?offsetMultiplier:0),$shadowAfterEl.length&&($shadowAfterEl[0].style.opacity=-offsetMultiplier>0?-offsetMultiplier:0)}}if(Support.pointerEvents||Support.prefixedPointerEvents){var ws=$wrapperEl[0].style;ws.perspectiveOrigin=center+"px 50%"}},setTransition:function(duration){this.slides.transition(duration).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(duration)}},components=[Device$1,Support$1,Browser$1,Resize,Observer$1,Virtual$1,Keyboard$1,{name:"mousewheel",params:{mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarged:"container"}},create:function(){Utils.extend(this,{mousewheel:{enabled:!1,enable:Mousewheel.enable.bind(this),disable:Mousewheel.disable.bind(this),handle:Mousewheel.handle.bind(this),handleMouseEnter:Mousewheel.handleMouseEnter.bind(this),handleMouseLeave:Mousewheel.handleMouseLeave.bind(this),lastScrollTime:Utils.now()}})},on:{init:function(){this.params.mousewheel.enabled&&this.mousewheel.enable()},destroy:function(){this.mousewheel.enabled&&this.mousewheel.disable()}}},{name:"navigation",params:{navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}},create:function(){Utils.extend(this,{navigation:{init:Navigation.init.bind(this),update:Navigation.update.bind(this),destroy:Navigation.destroy.bind(this)}})},on:{init:function(){this.navigation.init(),this.navigation.update()},toEdge:function(){this.navigation.update()},fromEdge:function(){this.navigation.update()},destroy:function(){this.navigation.destroy()},click:function(e){var ref=this.navigation,$nextEl=ref.$nextEl,$prevEl=ref.$prevEl;!this.params.navigation.hideOnClick||$(e.target).is($prevEl)||$(e.target).is($nextEl)||($nextEl&&$nextEl.toggleClass(this.params.navigation.hiddenClass),$prevEl&&$prevEl.toggleClass(this.params.navigation.hiddenClass))}}},{name:"pagination",params:{pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:function(number){return number},formatFractionTotal:function(number){return number},bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",modifierClass:"swiper-pagination-",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",lockClass:"swiper-pagination-lock"}},create:function(){Utils.extend(this,{pagination:{init:Pagination.init.bind(this),render:Pagination.render.bind(this),update:Pagination.update.bind(this),destroy:Pagination.destroy.bind(this),dynamicBulletIndex:0}})},on:{init:function(){this.pagination.init(),this.pagination.render(),this.pagination.update()},activeIndexChange:function(){this.params.loop?this.pagination.update():void 0===this.snapIndex&&this.pagination.update()},snapIndexChange:function(){this.params.loop||this.pagination.update()},slidesLengthChange:function(){this.params.loop&&(this.pagination.render(),this.pagination.update())},snapGridLengthChange:function(){this.params.loop||(this.pagination.render(),this.pagination.update())},destroy:function(){this.pagination.destroy()},click:function(e){this.params.pagination.el&&this.params.pagination.hideOnClick&&this.pagination.$el.length>0&&!$(e.target).hasClass(this.params.pagination.bulletClass)&&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(){Utils.extend(this,{scrollbar:{init:Scrollbar.init.bind(this),destroy:Scrollbar.destroy.bind(this),updateSize:Scrollbar.updateSize.bind(this),setTranslate:Scrollbar.setTranslate.bind(this),setTransition:Scrollbar.setTransition.bind(this),enableDraggable:Scrollbar.enableDraggable.bind(this),disableDraggable:Scrollbar.disableDraggable.bind(this),setDragPosition:Scrollbar.setDragPosition.bind(this),onDragStart:Scrollbar.onDragStart.bind(this),onDragMove:Scrollbar.onDragMove.bind(this),onDragEnd:Scrollbar.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(duration){this.scrollbar.setTransition(duration)},destroy:function(){this.scrollbar.destroy()}}},{name:"parallax",params:{parallax:{enabled:!1}},create:function(){Utils.extend(this,{parallax:{setTransform:Parallax.setTransform.bind(this),setTranslate:Parallax.setTranslate.bind(this),setTransition:Parallax.setTransition.bind(this)}})},on:{beforeInit:function(){this.params.parallax.enabled&&(this.params.watchSlidesProgress=!0)},init:function(){this.params.parallax&&this.parallax.setTranslate()},setTranslate:function(){this.params.parallax&&this.parallax.setTranslate()},setTransition:function(duration){this.params.parallax&&this.parallax.setTransition(duration)}}},{name:"zoom",params:{zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}},create:function(){var swiper=this,zoom={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(methodName){zoom[methodName]=Zoom[methodName].bind(swiper)}),Utils.extend(swiper,{zoom:zoom})},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()}}},{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(){Utils.extend(this,{lazy:{initialImageLoaded:!1,load:Lazy.load.bind(this),loadInSlide:Lazy.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()}}},Controller$1,{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 swiper=this;Utils.extend(swiper,{a11y:{liveRegion:$('<span class="'+swiper.params.a11y.notificationClass+'" aria-live="assertive" aria-atomic="true"></span>')}}),Object.keys(a11y).forEach(function(methodName){swiper.a11y[methodName]=a11y[methodName].bind(swiper)})},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(){Utils.extend(this,{history:{init:History.init.bind(this),setHistory:History.setHistory.bind(this),setHistoryPopState:History.setHistoryPopState.bind(this),scrollToSlide:History.scrollToSlide.bind(this),destroy:History.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)}}},{name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create:function(){Utils.extend(this,{hashNavigation:{initialized:!1,init:HashNavigation.init.bind(this),destroy:HashNavigation.destroy.bind(this),setHash:HashNavigation.setHash.bind(this),onHashCange:HashNavigation.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()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1}},create:function(){var swiper=this;Utils.extend(swiper,{autoplay:{running:!1,paused:!1,run:Autoplay.run.bind(swiper),start:Autoplay.start.bind(swiper),stop:Autoplay.stop.bind(swiper),pause:Autoplay.pause.bind(swiper),onTransitionEnd:function(e){swiper&&!swiper.destroyed&&swiper.$wrapperEl&&e.target===this&&(swiper.$wrapperEl[0].removeEventListener("transitionend",swiper.autoplay.onTransitionEnd),swiper.$wrapperEl[0].removeEventListener("webkitTransitionEnd",swiper.autoplay.onTransitionEnd),swiper.autoplay.paused=!1,swiper.autoplay.running?swiper.autoplay.run():swiper.autoplay.stop())}}})},on:{init:function(){this.params.autoplay.enabled&&this.autoplay.start()},beforeTransitionStart:function(speed,internal){this.autoplay.running&&(internal||!this.params.autoplay.disableOnInteraction?this.autoplay.pause(speed):this.autoplay.stop())},sliderFirstMove:function(){this.autoplay.running&&(this.params.autoplay.disableOnInteraction?this.autoplay.stop():this.autoplay.pause())},destroy:function(){this.autoplay.running&&this.autoplay.stop()}}},{name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create:function(){Utils.extend(this,{fadeEffect:{setTranslate:Fade.setTranslate.bind(this),setTransition:Fade.setTransition.bind(this)}})},on:{beforeInit:function(){if("fade"===this.params.effect){this.classNames.push(this.params.containerModifierClass+"fade");var overwriteParams={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};Utils.extend(this.params,overwriteParams),Utils.extend(this.originalParams,overwriteParams)}},setTranslate:function(){"fade"===this.params.effect&&this.fadeEffect.setTranslate()},setTransition:function(duration){"fade"===this.params.effect&&this.fadeEffect.setTransition(duration)}}},{name:"effect-cube",params:{cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}},create:function(){Utils.extend(this,{cubeEffect:{setTranslate:Cube.setTranslate.bind(this),setTransition:Cube.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 overwriteParams={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0};Utils.extend(this.params,overwriteParams),Utils.extend(this.originalParams,overwriteParams)}},setTranslate:function(){"cube"===this.params.effect&&this.cubeEffect.setTranslate()},setTransition:function(duration){"cube"===this.params.effect&&this.cubeEffect.setTransition(duration)}}},{name:"effect-flip",params:{flipEffect:{slideShadows:!0,limitRotation:!0}},create:function(){Utils.extend(this,{flipEffect:{setTranslate:Flip.setTranslate.bind(this),setTransition:Flip.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 overwriteParams={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};Utils.extend(this.params,overwriteParams),Utils.extend(this.originalParams,overwriteParams)}},setTranslate:function(){"flip"===this.params.effect&&this.flipEffect.setTranslate()},setTransition:function(duration){"flip"===this.params.effect&&this.flipEffect.setTransition(duration)}}},{name:"effect-coverflow",params:{coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0}},create:function(){Utils.extend(this,{coverflowEffect:{setTranslate:Coverflow.setTranslate.bind(this),setTransition:Coverflow.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(duration){"coverflow"===this.params.effect&&this.coverflowEffect.setTransition(duration)}}}];return void 0===Swiper.use&&(Swiper.use=Swiper.Class.use,Swiper.installModule=Swiper.Class.installModule),Swiper.use(components),Swiper}()},,,function(module,exports,__webpack_require__){var require;module.exports=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){"use strict";var _slicedToArray=function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return function(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i.return&&_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Impetus=require("impetus"),wheel=require("mouse-wheel"),touchPinch=require("touch-pinch"),position=require("touch-position");module.exports=function(target,cb){if(!(target&&cb instanceof Function))return!1;var pos=position({element:target}),lastY=0,lastX=0;new Impetus({source:target,update:function(x,y){var e={type:"mouse",dx:x-lastX,dy:y-lastY,dz:0,x:pos[0],y:pos[1]};lastX=x,lastY=y,cb(e)},multiplier:1,friction:.75}),wheel(target,function(dx,dy,dz,e){e.preventDefault(),cb({type:"mouse",dx:0,dy:0,dz:dy,x:pos[0],y:pos[1]})});var pinch=touchPinch(target),initialCoords=void 0;pinch.on("start",function(curr){var _pinch$fingers=_slicedToArray(pinch.fingers,2),f1=_pinch$fingers[0],f2=_pinch$fingers[1];initialCoords=[.5*f2.position[0]+.5*f1.position[0],.5*f2.position[1]+.5*f1.position[1]]}),pinch.on("end",function(){initialCoords=null}),pinch.on("change",function(curr,prev){pinch.pinching&&initialCoords&&cb({type:"touch",dx:0,dy:0,dz:2*-(curr-prev),x:initialCoords[0],y:initialCoords[1]})})}},{impetus:5,"mouse-wheel":7,"touch-pinch":10,"touch-position":11}],2:[function(require,module,exports){module.exports=function(get,set){return{configurable:!0,enumerable:!0,get:get,set:set}}},{}],3:[function(require,module,exports){function EventEmitter(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function isFunction(arg){return"function"==typeof arg}function isObject(arg){return"object"==typeof arg&&null!==arg}function isUndefined(arg){return void 0===arg}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.prototype.setMaxListeners=function(n){if(!function(arg){return"number"==typeof arg}(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");return this._maxListeners=n,this},EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(this._events||(this._events={}),"error"===type&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if((er=arguments[1])instanceof Error)throw er;var err=new Error('Uncaught, unspecified "error" event. ('+er+")");throw err.context=er,err}if(isUndefined(handler=this._events[type]))return!1;if(isFunction(handler))switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:args=Array.prototype.slice.call(arguments,1),handler.apply(this,args)}else if(isObject(handler))for(args=Array.prototype.slice.call(arguments,1),listeners=handler.slice(),len=listeners.length,i=0;i<len;i++)listeners[i].apply(this,args);return!0},EventEmitter.prototype.addListener=function(type,listener){var m;if(!isFunction(listener))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",type,isFunction(listener.listener)?listener.listener:listener),this._events[type]?isObject(this._events[type])?this._events[type].push(listener):this._events[type]=[this._events[type],listener]:this._events[type]=listener,isObject(this._events[type])&&!this._events[type].warned&&(m=isUndefined(this._maxListeners)?EventEmitter.defaultMaxListeners:this._maxListeners)&&m>0&&this._events[type].length>m&&(this._events[type].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[type].length),"function"==typeof console.trace&&console.trace()),this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(type,listener){if(!isFunction(listener))throw TypeError("listener must be a function");var fired=!1;function g(){this.removeListener(type,g),fired||(fired=!0,listener.apply(this,arguments))}return g.listener=listener,this.on(type,g),this},EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;if(list=this._events[type],length=list.length,position=-1,list===listener||isFunction(list.listener)&&list.listener===listener)delete this._events[type],this._events.removeListener&&this.emit("removeListener",type,listener);else if(isObject(list)){for(i=length;i-- >0;)if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}if(position<0)return this;1===list.length?(list.length=0,delete this._events[type]):list.splice(position,1),this._events.removeListener&&this.emit("removeListener",type,listener)}return this},EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[type]&&delete this._events[type],this;if(0===arguments.length){for(key in this._events)"removeListener"!==key&&this.removeAllListeners(key);return this.removeAllListeners("removeListener"),this._events={},this}if(isFunction(listeners=this._events[type]))this.removeListener(type,listeners);else if(listeners)for(;listeners.length;)this.removeListener(type,listeners[listeners.length-1]);return delete this._events[type],this},EventEmitter.prototype.listeners=function(type){return this._events&&this._events[type]?isFunction(this._events[type])?[this._events[type]]:this._events[type].slice():[]},EventEmitter.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction(evlistener))return 1;if(evlistener)return evlistener.length}return 0},EventEmitter.listenerCount=function(emitter,type){return emitter.listenerCount(type)}},{}],4:[function(require,module,exports){module.exports=function(a,b){var x=b[0]-a[0],y=b[1]-a[1];return Math.sqrt(x*x+y*y)}},{}],5:[function(require,module,exports){!function(global,factory){if(void 0!==exports&&void 0!==module)factory(0,module);else{var mod={exports:{}};factory(0,mod),global.Impetus=mod.exports}}(this,function(exports,module){"use strict";var bounceDeceleration=.04,bounceAcceleration=.11;window.addEventListener("touchmove",function(){}),module.exports=function Impetus(_ref){var boundXmin,boundXmax,boundYmin,boundYmax,pointerLastX,pointerLastY,pointerCurrentX,pointerCurrentY,pointerId,decVelX,decVelY,_ref$source=_ref.source,sourceEl=void 0===_ref$source?document:_ref$source,updateCallback=_ref.update,_ref$multiplier=_ref.multiplier,multiplier=void 0===_ref$multiplier?1:_ref$multiplier,_ref$friction=_ref.friction,friction=void 0===_ref$friction?.92:_ref$friction,initialValues=_ref.initialValues,boundX=_ref.boundX,boundY=_ref.boundY,_ref$bounce=_ref.bounce,bounce=void 0===_ref$bounce||_ref$bounce;!function(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}(this,Impetus);var targetX=0,targetY=0,stopThreshold=.3*multiplier,ticking=!1,pointerActive=!1,paused=!1,decelerating=!1,trackingPoints=[];function callUpdateCallback(){updateCallback.call(sourceEl,targetX,targetY)}function normalizeEvent(ev){if("touchmove"===ev.type||"touchstart"===ev.type||"touchend"===ev.type){var touch=ev.targetTouches[0]||ev.changedTouches[0];return{x:touch.clientX,y:touch.clientY,id:touch.identifier}}return{x:ev.clientX,y:ev.clientY,id:null}}function onDown(ev){var event=normalizeEvent(ev);pointerActive||paused||(pointerActive=!0,decelerating=!1,pointerId=event.id,pointerLastX=pointerCurrentX=event.x,pointerLastY=pointerCurrentY=event.y,trackingPoints=[],addTrackingPoint(pointerLastX,pointerLastY),document.addEventListener("touchmove",onMove,!!getPassiveSupported()&&{passive:!1}),document.addEventListener("touchend",onUp),document.addEventListener("touchcancel",stopTracking),document.addEventListener("mousemove",onMove,!!getPassiveSupported()&&{passive:!1}),document.addEventListener("mouseup",onUp))}function onMove(ev){ev.preventDefault();var event=normalizeEvent(ev);pointerActive&&event.id===pointerId&&(pointerCurrentX=event.x,pointerCurrentY=event.y,addTrackingPoint(pointerLastX,pointerLastY),ticking||requestAnimFrame(updateAndRender),ticking=!0)}function onUp(ev){var event=normalizeEvent(ev);pointerActive&&event.id===pointerId&&stopTracking()}function stopTracking(){pointerActive=!1,addTrackingPoint(pointerLastX,pointerLastY),function(){var firstPoint=trackingPoints[0],lastPoint=trackingPoints[trackingPoints.length-1],xOffset=lastPoint.x-firstPoint.x,yOffset=lastPoint.y-firstPoint.y,D=(lastPoint.time-firstPoint.time)/15/multiplier;decVelX=xOffset/D||0,decVelY=yOffset/D||0;var diff=checkBounds();(Math.abs(decVelX)>1||Math.abs(decVelY)>1||!diff.inBounds)&&(decelerating=!0,requestAnimFrame(stepDecelAnim))}(),document.removeEventListener("touchmove",onMove),document.removeEventListener("touchend",onUp),document.removeEventListener("touchcancel",stopTracking),document.removeEventListener("mouseup",onUp),document.removeEventListener("mousemove",onMove)}function addTrackingPoint(x,y){for(var time=Date.now();trackingPoints.length>0&&!(time-trackingPoints[0].time<=100);)trackingPoints.shift();trackingPoints.push({x:x,y:y,time:time})}function updateAndRender(){var pointerChangeX=pointerCurrentX-pointerLastX,pointerChangeY=pointerCurrentY-pointerLastY;if(targetX+=pointerChangeX*multiplier,targetY+=pointerChangeY*multiplier,bounce){var diff=checkBounds();0!==diff.x&&(targetX-=pointerChangeX*dragOutOfBoundsMultiplier(diff.x)*multiplier),0!==diff.y&&(targetY-=pointerChangeY*dragOutOfBoundsMultiplier(diff.y)*multiplier)}else checkBounds(!0);callUpdateCallback(),pointerLastX=pointerCurrentX,pointerLastY=pointerCurrentY,ticking=!1}function dragOutOfBoundsMultiplier(val){return 5e-6*Math.pow(val,2)+1e-4*val+.55}function checkBounds(restrict){var xDiff=0,yDiff=0;return void 0!==boundXmin&&targetX<boundXmin?xDiff=boundXmin-targetX:void 0!==boundXmax&&targetX>boundXmax&&(xDiff=boundXmax-targetX),void 0!==boundYmin&&targetY<boundYmin?yDiff=boundYmin-targetY:void 0!==boundYmax&&targetY>boundYmax&&(yDiff=boundYmax-targetY),restrict&&(0!==xDiff&&(targetX=xDiff>0?boundXmin:boundXmax),0!==yDiff&&(targetY=yDiff>0?boundYmin:boundYmax)),{x:xDiff,y:yDiff,inBounds:0===xDiff&&0===yDiff}}function stepDecelAnim(){if(decelerating){targetX+=decVelX*=friction,targetY+=decVelY*=friction;var diff=checkBounds();if(Math.abs(decVelX)>stopThreshold||Math.abs(decVelY)>stopThreshold||!diff.inBounds){if(bounce){if(0!==diff.x)if(diff.x*decVelX<=0)decVelX+=diff.x*bounceDeceleration;else{var adjust=diff.x>0?2.5:-2.5;decVelX=(diff.x+adjust)*bounceAcceleration}if(0!==diff.y)if(diff.y*decVelY<=0)decVelY+=diff.y*bounceDeceleration;else{var adjust=diff.y>0?2.5:-2.5;decVelY=(diff.y+adjust)*bounceAcceleration}}else 0!==diff.x&&(targetX=diff.x>0?boundXmin:boundXmax,decVelX=0),0!==diff.y&&(targetY=diff.y>0?boundYmin:boundYmax,decVelY=0);callUpdateCallback(),requestAnimFrame(stepDecelAnim)}else decelerating=!1}}(function(){if(!(sourceEl="string"==typeof sourceEl?document.querySelector(sourceEl):sourceEl))throw new Error("IMPETUS: source not found.");if(!updateCallback)throw new Error("IMPETUS: update function not defined.");initialValues&&(initialValues[0]&&(targetX=initialValues[0]),initialValues[1]&&(targetY=initialValues[1]),callUpdateCallback()),boundX&&(boundXmin=boundX[0],boundXmax=boundX[1]),boundY&&(boundYmin=boundY[0],boundYmax=boundY[1]),sourceEl.addEventListener("touchstart",onDown),sourceEl.addEventListener("mousedown",onDown)})(),this.destroy=function(){return sourceEl.removeEventListener("touchstart",onDown),sourceEl.removeEventListener("mousedown",onDown),null},this.pause=function(){pointerActive=!1,paused=!0},this.resume=function(){paused=!1},this.setValues=function(x,y){"number"==typeof x&&(targetX=x),"number"==typeof y&&(targetY=y)},this.setMultiplier=function(val){stopThreshold=.3*(multiplier=val)},this.setBoundX=function(boundX){boundXmin=boundX[0],boundXmax=boundX[1]},this.setBoundY=function(boundY){boundYmin=boundY[0],boundYmax=boundY[1]}};var requestAnimFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(callback){window.setTimeout(callback,1e3/60)};function getPassiveSupported(){var passiveSupported=!1;try{var options=Object.defineProperty({},"passive",{get:function(){passiveSupported=!0}});window.addEventListener("test",null,options)}catch(err){}return getPassiveSupported=function(){return passiveSupported},passiveSupported}})},{}],6:[function(require,module,exports){var rootPosition={left:0,top:0};module.exports=function(ev,target,out){target=target||ev.currentTarget||ev.srcElement,Array.isArray(out)||(out=[0,0]);var cx=ev.clientX||0,cy=ev.clientY||0,rect=function(element){return element===window||element===document||element===document.body?rootPosition:element.getBoundingClientRect()}(target);return out[0]=cx-rect.left,out[1]=cy-rect.top,out}},{}],7:[function(require,module,exports){"use strict";var toPX=require("to-px");module.exports=function(element,callback,noScroll){"function"==typeof element&&(noScroll=!!callback,callback=element,element=window);var lineHeight=toPX("ex",element),listener=function(ev){noScroll&&ev.preventDefault();var dx=ev.deltaX||0,dy=ev.deltaY||0,dz=ev.deltaZ||0,mode=ev.deltaMode,scale=1;switch(mode){case 1:scale=lineHeight;break;case 2:scale=window.innerHeight}if(dy*=scale,dz*=scale,(dx*=scale)||dy||dz)return callback(dx,dy,dz,ev)};return element.addEventListener("wheel",listener),listener}},{"to-px":9}],8:[function(require,module,exports){module.exports=function(str,out){out||(out=[0,""]),str=String(str);var num=parseFloat(str,10);return out[0]=num,out[1]=str.match(/[\d.\-\+]*\s*(.*)/)[1]||"",out}},{}],9:[function(require,module,exports){"use strict";var parseUnit=require("parse-unit");module.exports=toPX;var PIXELS_PER_INCH=96;function getPropertyInPX(element,prop){var parts=parseUnit(getComputedStyle(element).getPropertyValue(prop));return parts[0]*toPX(parts[1],element)}function toPX(str,element){switch(element=element||document.body,str=(str||"px").trim().toLowerCase(),element!==window&&element!==document||(element=document.body),str){case"%":return element.clientHeight/100;case"ch":case"ex":return function(unit,element){var testDIV=document.createElement("div");testDIV.style["font-size"]="128"+unit,element.appendChild(testDIV);var size=getPropertyInPX(testDIV,"font-size")/128;return element.removeChild(testDIV),size}(str,element);case"em":return getPropertyInPX(element,"font-size");case"rem":return getPropertyInPX(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return PIXELS_PER_INCH;case"cm":return PIXELS_PER_INCH/2.54;case"mm":return PIXELS_PER_INCH/25.4;case"pt":return PIXELS_PER_INCH/72;case"pc":return PIXELS_PER_INCH/6}return 1}},{"parse-unit":8}],10:[function(require,module,exports){var getDistance=require("gl-vec2/distance"),EventEmitter=require("events").EventEmitter,dprop=require("dprop"),eventOffset=require("mouse-event-offset");function Finger(){this.position=[0,0],this.touch=null}module.exports=function(target){target=target||window;var emitter=new EventEmitter,fingers=[null,null],activeCount=0,lastDistance=0,ended=!1,enabled=!1;return Object.defineProperties(emitter,{pinching:dprop(function(){return 2===activeCount}),fingers:dprop(function(){return fingers})}),enable(),emitter.enable=enable,emitter.disable=function(){enabled&&(enabled=!1,activeCount=0,fingers[0]=null,fingers[1]=null,lastDistance=0,ended=!1,target.removeEventListener("touchstart",onTouchStart,!1),target.removeEventListener("touchmove",onTouchMove,!1),target.removeEventListener("touchend",onTouchRemoved,!1),target.removeEventListener("touchcancel",onTouchRemoved,!1))},emitter.indexOfTouch=indexOfTouch,emitter;function indexOfTouch(touch){for(var id=touch.identifier,i=0;i<fingers.length;i++)if(fingers[i]&&fingers[i].touch&&fingers[i].touch.identifier===id)return i;return-1}function enable(){enabled||(enabled=!0,target.addEventListener("touchstart",onTouchStart,!1),target.addEventListener("touchmove",onTouchMove,!1),target.addEventListener("touchend",onTouchRemoved,!1),target.addEventListener("touchcancel",onTouchRemoved,!1))}function onTouchStart(ev){for(var i=0;i<ev.changedTouches.length;i++){var newTouch=ev.changedTouches[i],id=newTouch.identifier,idx=indexOfTouch(id);if(-1===idx&&activeCount<2){var first=0===activeCount,newIndex=fingers[0]?1:0,oldIndex=fingers[0]?0:1,newFinger=new Finger;fingers[newIndex]=newFinger,activeCount++,newFinger.touch=newTouch,eventOffset(newTouch,target,newFinger.position);var oldTouch=fingers[oldIndex]?fingers[oldIndex].touch:void 0;if(emitter.emit("place",newTouch,oldTouch),!first){var initialDistance=computeDistance();ended=!1,emitter.emit("start",initialDistance),lastDistance=initialDistance}}}}function onTouchMove(ev){for(var changed=!1,i=0;i<ev.changedTouches.length;i++){var movedTouch=ev.changedTouches[i],idx=indexOfTouch(movedTouch);-1!==idx&&(changed=!0,fingers[idx].touch=movedTouch,eventOffset(movedTouch,target,fingers[idx].position))}if(2===activeCount&&changed){var currentDistance=computeDistance();emitter.emit("change",currentDistance,lastDistance),lastDistance=currentDistance}}function onTouchRemoved(ev){for(var i=0;i<ev.changedTouches.length;i++){var removed=ev.changedTouches[i],idx=indexOfTouch(removed);if(-1!==idx){fingers[idx]=null,activeCount--;var otherIdx=0===idx?1:0,otherTouch=fingers[otherIdx]?fingers[otherIdx].touch:void 0;emitter.emit("lift",removed,otherTouch)}}ended||2===activeCount||(ended=!0,emitter.emit("end"))}function computeDistance(){return activeCount<2?0:getDistance(fingers[0].position,fingers[1].position)}}},{dprop:2,events:3,"gl-vec2/distance":4,"mouse-event-offset":6}],11:[function(require,module,exports){var offset=require("mouse-event-offset"),EventEmitter=require("events").EventEmitter;function attach(opt){var element=(opt=opt||{}).element||window,emitter=new EventEmitter,position=opt.position||[0,0];return!1!==opt.touchstart&&(element.addEventListener("mousedown",update,!1),element.addEventListener("touchstart",updateTouch,!1)),element.addEventListener("mousemove",update,!1),element.addEventListener("touchmove",updateTouch,!1),emitter.position=position,emitter.dispose=function(){element.removeEventListener("mousemove",update,!1),element.removeEventListener("mousedown",update,!1),element.removeEventListener("touchmove",updateTouch,!1),element.removeEventListener("touchstart",updateTouch,!1)},emitter;function updateTouch(ev){var touch=ev.targetTouches[0];update(touch)}function update(ev){offset(ev,element,position),emitter.emit("move",ev)}}module.exports=function(opt){return attach(opt).position},module.exports.emitter=function(opt){return attach(opt)}},{events:3,"mouse-event-offset":6}]},{},[1])(1)},function(module,exports,__webpack_require__){window,module.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=3)}([function(t,e){var n=window.addEventListener?"addEventListener":"attachEvent",i=window.removeEventListener?"removeEventListener":"detachEvent",o="addEventListener"!==n?"on":"";e.bind=function(t,e,i,r){return t[n](o+e,i,r||!1),i},e.unbind=function(t,e,n,r){return t[i](o+e,n,r||!1),n}},function(t,e,n){"use strict";try{var i=n(0)}catch(t){i=n(0)}var o=["wheel","mousewheel","scroll","DOMMouseScroll"],r="mousewheel";if(window.addEventListener)for(var s=0;s<o.length;s++)if("on"+o[s]in window){r=o[s];break}function h(t,e,n){return i.bind(t,r,e,n||!1)}t.exports=h.bind=h,t.exports.unbind=function(t,e,n){return i.unbind(t,r,e,n||!1)}},function(t,e,n){function i(t){if(t)return function(t){for(var e in i.prototype)t[e]=i.prototype[e];return t}(t)}t.exports=i,i.prototype.on=i.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},i.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,i=this._callbacks["$"+t];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<i.length;o++)if((n=i[o])===e||n.fn===e){i.splice(o,1);break}return this},i.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),n=this._callbacks["$"+t];if(n)for(var i=0,o=(n=n.slice(0)).length;i<o;++i)n[i].apply(this,e);return this},i.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},i.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e,n){"use strict";var i=n(2),o=n(1);function r(t){if(!(this instanceof r))return new r(t);"string"==typeof t&&(t=document.querySelector(t)),this.el=t,this.current=0,this.cycle(!0),this.interval(75),this.start(0),this.onTouchStart=this.onTouchStart.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.onWheel=this.onWheel.bind(this),this.bind()}t.exports=r,i(r.prototype),r.prototype.scroll=function(t){return this._scroll===t?this:(this._scroll=t,this._scroll?o.bind(this.el,this.onWheel):o.unbind(this.el,this.onWheel),this)},r.prototype.vertical=function(t){return this._vertical=t,this},r.prototype.reverse=function(t){return this._reverse=t,this},r.prototype.cycle=function(t){return this._cycle=t,this},r.prototype.interval=function(t){return this._interval=t,this},r.prototype.start=function(t){var e=this.children();this.el.style.position="relative",this.el.style.width="100%";for(var n=0,i=e.length;n<i;n++)e[n].style.display="none",e[n].style.width="100%";return this.show(t),this},r.prototype.play=function(t){if(!this.timer){var e=this;return this.timer=setInterval(function(){(void 0===t||t>e.current)&&e.next(),t<e.current&&e.prev(),t===e.current&&e.stop()},this._interval),this}},r.prototype.stop=function(){return clearInterval(this.timer),this.timer=null,this},r.prototype.prev=function(){return this.show(this.current-1)},r.prototype.next=function(){return this.show(this.current+1)},r.prototype.show=function(t){var e=this.children(),n=e.length;return t<0&&(t=this._cycle?t+n:0),t>n-1&&(t=this._cycle?t-n:n-1),e[this.current].style.display="none",e[t].style.display="block",t!==this.current&&this.emit("show",t,n),this.current=t,this},r.prototype.bind=function(){this.el.addEventListener("touchstart",this.onTouchStart,!1),this.el.addEventListener("touchmove",this.onTouchMove,!1),this.el.addEventListener("touchend",this.onTouchEnd,!1),this.el.addEventListener("mousedown",this.onTouchStart,!1),this.el.addEventListener("mousemove",this.onTouchMove,!1),document.addEventListener("mouseup",this.onTouchEnd,!1),this._scroll&&o.bind(this.el,this.onWheel)},r.prototype.unbind=function(){this.el.removeEventListener("touchstart",this.onTouchStart,!1),this.el.removeEventListener("touchmove",this.onTouchMove,!1),this.el.removeEventListener("touchend",this.onTouchEnd,!1),this.el.removeEventListener("mousedown",this.onTouchStart,!1),this.el.removeEventListener("mousemove",this.onTouchMove,!1),document.removeEventListener("mouseup",this.onTouchEnd,!1),this._scroll&&o.unbind(this.el,this.onWheel)},r.prototype.onTouchStart=function(t){this.timer&&this.stop(),t.preventDefault(),this.touch=this.getTouch(t),this.currentTouched=this.current},r.prototype.onTouchMove=function(t){if("number"==typeof this.touch){t.preventDefault();var e=this.getTouch(t),n=this.children().length,i=this.el[this._vertical?"clientHeight":"clientWidth"],o=e-this.touch;o=this._reverse?-o:o,o=Math.floor(o/i*n),this.show(this.currentTouched+o)}},r.prototype.onTouchEnd=function(t){"number"==typeof this.touch&&(t.preventDefault(),this.touch=null)},r.prototype.onWheel=function(t){this.timer&&this.stop(),t.preventDefault();var e=t.deltaY||t.detail||-t.wheelDelta;e=0!==e?e/Math.abs(e):e,this[(e=this._reverse?-e:e)>0?"next":"prev"]()},r.prototype.children=function(){for(var t=this.el.childNodes,e=[],n=0,i=t.length;n<i;n++)1===t[n].nodeType&&e.push(t[n]);return e},r.prototype.getTouch=function(t){return t=/^touch/.test(t.type)?t.changedTouches[0]:t,this._vertical?t.clientY-this.el.offsetTop:t.clientX-this.el.offsetLeft}}])},function(module,exports,__webpack_require__){(function(process){function detectOS(userAgentString){var detected=buildRules([["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/],["Search Bot",/(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/]]).filter(function(os){return os.rule&&os.rule.test(userAgentString)})[0];return detected?detected.name:null}function getNodeVersion(){return"undefined"==typeof navigator&&void 0!==process?{name:"node",version:process.version.slice(1),os:__webpack_require__(12).type().toLowerCase()}:null}function parseUserAgent(userAgentString){var browsers=buildRules([["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["vivaldi",/Vivaldi\/([0-9\.]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)$/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\ ([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/]]);if(!userAgentString)return null;var detected=browsers.map(function(browser){var match=browser.rule.exec(userAgentString),version=match&&match[1].split(/[._]/).slice(0,3);return version&&version.length<3&&(version=version.concat(1==version.length?[0,0]:[0])),match&&{name:browser.name,version:version.join(".")}}).filter(Boolean)[0]||null;return detected&&(detected.os=detectOS(userAgentString)),/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/i.test(userAgentString)&&((detected=detected||{}).bot=!0),detected}function buildRules(ruleTuples){return ruleTuples.map(function(tuple){return{name:tuple[0],rule:tuple[1]}})}module.exports={detect:function(){var nodeVersion=getNodeVersion();return nodeVersion||("undefined"!=typeof navigator?parseUserAgent(navigator.userAgent):null)},detectOS:detectOS,getNodeVersion:getNodeVersion,parseUserAgent:parseUserAgent}}).call(this,__webpack_require__(13))},,,function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__(15);var detect_browser=__webpack_require__(8),hammerjs_hammer=__webpack_require__(2),hammer_default=__webpack_require__.n(hammerjs_hammer),horizontalSwipeEvent=element=>{let isPanning=!1;element.addEventListener("activate",()=>{element.style.pointerEvents="all"}),element.addEventListener("deactivate",()=>{element.style.pointerEvents=null}),element.classList.add("prevent-swipe-horizontal");const hammer=new hammer_default.a.Manager(element);hammer.add(new hammer_default.a.Pan({event:"pan",direction:hammer_default.a.DIRECTION_HORIZONTAL,threshold:100})),hammer.on("panstart",()=>{isPanning=!1}),hammer.on("pan",event=>{isPanning||(event.offsetDirection===hammer_default.a.DIRECTION_RIGHT?element.dispatchEvent(new CustomEvent("prevstate",{detail:{stopSlideshow:!0,userInteraction:!0}})):event.offsetDirection===hammer_default.a.DIRECTION_LEFT&&element.dispatchEvent(new CustomEvent("nextstate",{detail:{stopSlideshow:!0,userInteraction:!0}}))),isPanning=!0})},clickEvent=element=>{element.bindings.click.forEach(binding=>{const target=document.getElementById(binding.target);if(null==target)"playslideshow"===binding.selector&&element.addEventListener("click",event=>{element.dispatchEvent(new CustomEvent(binding.selector,{detail:{binding:binding}})),event.preventDefault()});else if("prevstate"===binding.selector||"nextstate"===binding.selector)element.addEventListener("click",event=>{target.dispatchEvent(new Event(binding.selector)),event.preventDefault()});else if("changestate"===binding.selector){const state=document.getElementById(binding.state);element.addEventListener("click",clickEvent=>{target.dispatchEvent(new CustomEvent("changestate",{detail:{state:state}})),clickEvent.preventDefault()})}else"start"===binding.selector&&element.addEventListener("click",clickEvent=>{target.dispatchEvent(new CustomEvent("start",{detail:{binding:binding}})),clickEvent.preventDefault()})})},hyperlinkEvent=element=>{"goto://FolioNavigation/lastview"===element.getAttribute("href")&&element.addEventListener("click",event=>(window.history.back(),event.preventDefault(),!1),!1)},videoEvent=element=>{const autoPlay="true"===element.getAttribute("auto-start"),source=element.getAttribute("src"),playsInline="playsinline"===element.getAttribute("playsinline"),loop="true"===element.getAttribute("loop"),video=function(){const videoElement=document.createElement("video"),sourceElement=document.createElement("source");sourceElement.setAttribute("src",source),sourceElement.setAttribute("type","video/mp4"),videoElement.appendChild(sourceElement),loop&&videoElement.setAttribute("loop","");playsInline&&(videoElement.setAttribute("playsinline","playsinline"),videoElement.setAttribute("webkit-playsinline",""));autoPlay?window.MagLoftReader.platform&&"ios"===window.MagLoftReader.platform&&videoElement.setAttribute("muted",""):(videoElement.setAttribute("controls",""),element.addEventListener("click",event=>{event.preventDefault(),attachVideo(),playVideo(videoElement)}));return videoElement.style.pointerEvents="none",videoElement.style.width=element.style.width,videoElement.style.height=element.style.height,element.style.pointerEvents="none",videoElement}();let autoplayTimeout=null;function playVideo(videoElement){videoElement.play().then(()=>{element.classList.remove("require-tap")}).catch(()=>{element.classList.add("require-tap"),element.addEventListener("click",event=>{event.preventDefault(),playVideo(videoElement)})})}function attachVideo(){null==video.parentElement&&element.appendChild(video)}element.addEventListener("start",()=>{attachVideo(),playVideo(video)}),element.addEventListener("activate",()=>{attachVideo(),autoplayTimeout=setTimeout(()=>{element.classList.add("fade-overlay"),setTimeout(()=>{autoPlay&&playVideo(video),element.classList.remove("fade-overlay")},1)},500)}),element.addEventListener("deactivate",()=>{null!=autoplayTimeout&&(clearTimeout(autoplayTimeout),autoplayTimeout=null),video.pause(),video.currentTime=0})},screenfull=__webpack_require__(1),videoFullscreenEvent=element=>{const source=element.getAttribute("src"),video=function(){const videoElement=document.createElement("video"),sourceElement=document.createElement("source");return sourceElement.setAttribute("src",source),sourceElement.setAttribute("type","video/mp4"),videoElement.appendChild(sourceElement),videoElement.setAttribute("controls","controls"),videoElement.setAttribute("touchable",""),videoElement.style.opacity=0,videoElement.style.width=element.style.width,videoElement.style.height=element.style.height,videoElement}();function onFullscreenChanged(){screenfull.isFullscreen?(video.style.opacity=1,video.play()):(video.style.opacity=0,video.pause(),video.parentElement.removeChild(video),screenfull.off("change",onFullscreenChanged))}screenfull.enabled?element.addEventListener("click",event=>{screenfull.isFullscreen||(null==video.parentElement&&element.appendChild(video),screenfull.on("change",onFullscreenChanged),screenfull.request(video)),event.preventDefault()}):(null==video.parentElement&&element.appendChild(video),element.addEventListener("click",()=>{video.style.opacity=1,video.play()}))},audioEvent=element=>{const autoPlay="true"===element.getAttribute("auto-start");element.addEventListener("activate",()=>{autoPlay&&(element.currentTime=0,element.play())}),element.addEventListener("deactivate",()=>{element.pause()})},stateEvent=element=>{const children=Array.from(element.children),bindings=!!element.getAttribute("bindings")&&JSON.parse(element.getAttribute("bindings")),total=children.length,stateful=!!element.getAttribute("active-state");let animationTimeout,index=0,loopCount=0,currentLoop=0,finished=!1,stopAtEnd=!0,toggle=!1,reverse=!1,delay=0,sleep=0;if(bindings){const type=Object.keys(bindings).shift();Array.isArray(bindings[type])||(bindings[type]=[bindings[type]]),bindings[type].forEach(action=>{loopCount=action.loopCount?action.loopCount:loopCount,stopAtEnd=action.stopAtEnd?action.stopAtEnd:stopAtEnd,toggle=action.toggle?action.toggle:toggle,reverse=action.reverseDirection?action.reverseDirection:reverse}),bindings.enterview&&bindings.enterview.forEach(binding=>{"sleep"===binding.selector?sleep=1e3*binding.time:"playslideshow"===binding.selector&&(delay=1e3*binding.delay*1.2,loopCount=binding.loopCount?binding.loopCount:loopCount,stopAtEnd=binding.stopAtEnd?binding.stopAtEnd:stopAtEnd,toggle=binding.toggle?binding.toggle:toggle,reverse=binding.reverseDirection?binding.reverseDirection:reverse)})}function setIndex(direction){(index="next"===direction?index+1:index-1)<0&&(index=total-1,currentLoop+=1),index===total&&(index=0,currentLoop+=1),!finished&&loopCount>0&&loopCount===currentLoop&&(finished=!0,index=stopAtEnd?total-1:0)}function notifyCurrentState(eventName){children[index].dispatchEvent(new Event(eventName))}function notifyAllChildren(eventName){children.forEach(child=>child.dispatchEvent(new Event(eventName)))}function animate(){0!==delay&&(element.dispatchEvent(new Event("nextstate")),finished||(animationTimeout=setTimeout(animate,delay)))}element.addEventListener("playslideshow",event=>{const binding=event.detail.binding;binding.toggle&&0!==delay?delay=0:0===delay&&(delay=1e3*binding.delay*1.2,loopCount=binding.loopCount?parseInt(binding.loopCount,10):loopCount,stopAtEnd=binding.stopAtEnd?binding.stopAtEnd:stopAtEnd,toggle=binding.toggle?binding.toggle:toggle,reverse=binding.reverseDirection?binding.reverseDirection:reverse,null!=animationTimeout&&(clearTimeout(animationTimeout),animationTimeout=null),animate())}),element.addEventListener("preactivate",()=>{index=0,currentLoop=0,finished=!1,element.classList.add("fadeIn"),stateful?notifyCurrentState("preactivate"):notifyAllChildren("preactivate")}),element.addEventListener("activate",()=>{index=0,currentLoop=0,finished=!1,element.classList.add("fadeIn"),element.style.zIndex=2,stateful?notifyCurrentState("activate"):notifyAllChildren("activate"),0!==delay&&(null!=animationTimeout&&(clearTimeout(animationTimeout),animationTimeout=null),animationTimeout=setTimeout(animate,delay+sleep))}),element.addEventListener("deactivate",()=>{null!=animationTimeout&&(clearTimeout(animationTimeout),animationTimeout=null),element.classList.remove("fadeIn"),finished=!0,notifyAllChildren("deactivate")}),element.addEventListener("nextstate",event=>{event.detail&&event.detail.stopSlideshow&&(delay=0),(!finished||event.detail&&event.detail.userInteraction)&&(notifyCurrentState("deactivate"),setIndex("next"),notifyCurrentState("activate"))}),element.addEventListener("prevstate",event=>{event.detail&&event.detail.stopSlideshow&&(delay=0),!finished||event.detail&&event.detail.userInteraction?(notifyCurrentState("deactivate"),setIndex("prev"),notifyCurrentState("activate")):event.finished=!0}),element.addEventListener("changestate",event=>{notifyCurrentState("deactivate"),index=children.indexOf(event.detail.state),notifyCurrentState("activate")})},passthroughStateEvent=element=>{const children=Array.from(element.children);element.addEventListener("preactivate",()=>{children.forEach(child=>child.dispatchEvent(new Event("preactivate")))}),element.addEventListener("activate",()=>{children.forEach(child=>child.dispatchEvent(new Event("activate")))}),element.addEventListener("deactivate",()=>{children.forEach(child=>child.dispatchEvent(new Event("deactivate")))})},circlr=__webpack_require__(7),circlr_default=__webpack_require__.n(circlr),circlrEvent=element=>{const circlrElement=element.children[0],clockwise="true"===element.getAttribute("clockwise"),autoStart="true"===element.getAttribute("auto-start"),swipeEnabled="true"===element.getAttribute("swipe-enabled"),stopAtLast="true"===element.getAttribute("auto-play-stop-at-last"),framesPerSecond=parseInt(element.getAttribute("frames-per-second"),10);let isClick=!1;const runner=circlr_default()(circlrElement).reverse(!clockwise).scroll(swipeEnabled).interval(1e3/framesPerSecond);function onTouchStart(){isClick=!0}function onTouchMove(){isClick=!1}function onTouchEnd(event){if(!isClick)return;isClick=!1;const x=event instanceof TouchEvent?event.changedTouches[0].clientX:event.clientX,y=event instanceof TouchEvent?event.changedTouches[0].clientY:event.clientY,orig={value:runner.el.style.getPropertyValue("pointer-events"),priority:runner.el.style.getPropertyPriority("pointer-events")};runner.el.style.setProperty("pointer-events","none","important");const delegateElement=document.elementFromPoint(x,y);if(null!=delegateElement){const delegateEvent=document.createEvent("MouseEvents");delegateEvent.initMouseEvent("click",!1,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),delegateElement.dispatchEvent(delegateEvent)}runner.el.style.setProperty("pointer-events",orig.value?orig.value:"",orig.priority)}autoStart&&element.addEventListener("triggerCirclr",function(){runner.start(0),autoStart&&(stopAtLast?runner.play(runner.children().length-1):runner.play())}),element.addEventListener("activate",()=>{runner.el.addEventListener("touchstart",onTouchStart,!1),runner.el.addEventListener("mousedown",onTouchStart,!1),runner.el.addEventListener("touchmove",onTouchMove,!1),runner.el.addEventListener("mousemove",onTouchMove,!1),runner.el.addEventListener("touchend",onTouchEnd,!1),runner.el.addEventListener("mouseup",onTouchEnd,!1),element.dispatchEvent(new Event("triggerCirclr"))}),element.addEventListener("deactivate",()=>{runner.el.removeEventListener("touchstart",onTouchStart,!1),runner.el.removeEventListener("mousedown",onTouchStart,!1),runner.el.removeEventListener("touchmove",onTouchMove,!1),runner.el.removeEventListener("mousemove",onTouchMove,!1),runner.el.removeEventListener("touchend",onTouchEnd,!1),runner.el.removeEventListener("mouseup",onTouchEnd,!1)})},pan_zoom_min=__webpack_require__(6),pan_zoom_min_default=__webpack_require__.n(pan_zoom_min),imagepanEvent=element=>{const containerWidth=element.offsetWidth,containerHeight=element.offsetHeight,sourceWidth=parseInt(element.getAttribute("source-width")||640,10),sourceHeight=parseInt(element.getAttribute("source-height")||480,10),ratio=sourceWidth/sourceHeight;pan_zoom_min_default()(element,event=>{const dx=event.dx,dy=event.dy;let dz=event.dz,x=parseInt(element.style.backgroundPositionX||0,10),y=parseInt(element.style.backgroundPositionY||0,10),width=parseFloat(element.style.backgroundSize,10),height=(width=Math.max(Math.min(width+dz,sourceWidth),containerWidth))/ratio;height<containerHeight&&(height=(width=containerHeight*ratio)/ratio,dz=0),x=Math.max(Math.min(x+dx-dz/2,0),containerWidth-width),y=Math.max(Math.min(y+dy-dz/2,0),containerHeight-height),element.style.backgroundPositionX=`${x}px`,element.style.backgroundPositionY=`${y}px`,element.style.backgroundSize=`${width}px`})},webViewEvent=element=>{const src=element.getAttribute("data-src"),autoPlay="iframe"===element.getAttribute("data-type"),iframe=document.createElement("iframe");iframe.setAttribute("touchable",!0),iframe.setAttribute("allowfullscreen",!0),iframe.onload=function(){const currentSrc=iframe.getAttribute("src");if(null==currentSrc||""===currentSrc)return element.removeAttribute("loaded"),element.classList.remove("loaded"),void iframe.remove();element.setAttribute("loaded",!0),element.classList.add("loaded");try{const doc=iframe.contentDocument;doc.body.onhashchange=(()=>{const match=element.contentWindow.location.hash.match(/^#\/([0-9]+)\/?([0-9]+)?/);if(null!=match){const pageId=parseInt(match[1],10);MagLoftReader.slide(pageId,0)}}),doc.addEventListener("click",event=>{if("A"===event.target.tagName){const href=event.target.getAttribute("href");if(null!=href.match(/^navto:\/\//)){const pageId=href.split("://")[1];return MagLoftReader.slide(pageId,0),event.preventDefault(),!1}}return!0},!1)}catch(e){}},autoPlay||element.addEventListener("click",event=>(null==iframe.parentElement&&(iframe.setAttribute("src",src),element.appendChild(iframe)),event.preventDefault(),!1)),element.addEventListener("activate",()=>{autoPlay&&(iframe.setAttribute("src",src),element.appendChild(iframe))}),element.addEventListener("deactivate",()=>{iframe.setAttribute("src","")})};const youtubeScript=document.createElement("script");youtubeScript.src="https://www.youtube.com/iframe_api",document.body.appendChild(youtubeScript);var webViewYoutubeEvent=element=>{const match=element.getAttribute("data-src").match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/),videoId=!(!match||11!==match[7].length)&&match[7];if(!videoId)return;const videoContainer=document.createElement("div");videoContainer.setAttribute("touchable",!0),element.addEventListener("click",event=>(element.classList.add("loading"),new YT.Player(videoContainer,{height:element.offsetHeight,width:element.offsetWidth,videoId:videoId,events:{onReady:event=>{event.target.playVideo()},onStateChange:event=>{event.data===YT.PlayerState.PLAYING&&(element.classList.remove("loading"),element.classList.add("loaded"))}}}),event.preventDefault(),!1)),element.addEventListener("activate",()=>{element.appendChild(videoContainer)}),element.addEventListener("deactivate",()=>{videoContainer.remove()})},swiper=__webpack_require__(3),swiper_default=__webpack_require__.n(swiper),routie=__webpack_require__(0),routie_default=__webpack_require__.n(routie);function updateScale(element){const scaleX=window.innerWidth/element.offsetWidth,scaleY=window.innerHeight/element.offsetHeight,offset=(window.innerHeight-document.body.offsetHeight)/2;element.style.transform=`scale(${Math.min(scaleX,scaleY)}) translateY(${offset}px)`}var FitScreen={name:"fitscreen",params:{fitScreen:!1,fitScreenContainer:null},on:{init(){this.params.fitScreen&&this.params.fitScreenContainer&&(this.el.style.transformOrigin="center center",updateScale(this.el))},resize(){this.params.fitScreen&&this.params.fitScreenContainer&&updateScale(this.el)},touchEnd(){this.params.fitScreen&&this.params.fitScreenContainer&&updateScale(this.el)}}};swiper_default.a.use(FitScreen);let preloadTimeout=null;window.MagLoftReader=new class{constructor(element){this.xIndex=null,this.yIndex=null,this.slide=null,this.slides=null,this.initialized=!1,this.initialX=0,this.initialY=0,this.element=element,this.slides=Array.from(this.element.querySelectorAll("article.article")),routie_default()("/:x/:y",this.onRouteChanged.bind(this))}init(){const container=document.querySelector(".foliokit-container");this.swiper=new swiper_default.a(this.element,{init:!1,initialSlide:this.initialX,direction:"horizontal",noSwipingClass:"prevent-swipe-horizontal",threshold:20,shortSwipes:!0,longSwipesRatio:.2,longSwipesMs:150,mousewheel:{enabled:!1},fitScreen:!0,fitScreenContainer:document.querySelector(".foliokit-wrapper"),on:{transitionEnd:()=>{this.onSwiperTransitionEnd()}}}),this.swiper.on("init",()=>{this.swiper.$wrapperEl.children().each((index,element)=>{if(element.classList.contains("swiper-container")){const initialSlide=index===this.initialX?this.initialY:0;new swiper_default.a(element,{width:container.offsetWidth,height:container.offsetHeight,direction:"vertical",initialSlide:initialSlide,noSwipingClass:"prevent-swipe-vertical",threshold:20,shortSwipes:!0,longSwipesRatio:.2,longSwipesMs:150,mousewheel:{enabled:!1},nested:!0,on:{transitionEnd:()=>{this.onSwiperTransitionEnd()}}})}}),this.update(this.initialX,this.initialY),this.initialized=!0}),this.swiper.init(),document.addEventListener("keydown",this.onKeyboardInput.bind(this))}onSwiperTransitionEnd(){const slide=this.swiper.slides[this.swiper.activeIndex];null==slide.swiper?this.update(this.swiper.activeIndex,0):this.update(this.swiper.activeIndex,slide.swiper.activeIndex)}onKeyboardInput(event){const keycode=event.keyCode||event.charCode;keycode<37||keycode>40||(37===keycode&&this.slideLeft(),39===keycode&&this.slideRight(),38===keycode&&this.slideUp(),40===keycode&&this.slideDown())}onRouteChanged(x,y){this.initialized?this.slideTo(parseInt(x,10),parseInt(y,10)):(this.initialX=parseInt(x,10),this.initialY=parseInt(y,10))}slideLeft(){const slide=this.getActiveSlideInColumn(this.xIndex-1);null!=slide&&this.slideTo(slide.x,slide.y)}slideRight(){const slide=this.getActiveSlideInColumn(this.xIndex+1);null!=slide&&this.slideTo(slide.x,slide.y)}slideUp(){const slide=this.getSlide(this.xIndex,this.yIndex-1);null!=slide&&this.slideTo(slide.x,slide.y)}slideDown(){const slide=this.getSlide(this.xIndex,this.yIndex+1);null!=slide&&this.slideTo(slide.x,slide.y)}slideTo(x,y,speed=300){const slide=this.swiper.slides[x];null!=slide&&(slide.swiper&&slide.swiper.slideTo(y,speed,!1),this.swiper.slideTo(x,speed,!1),setTimeout(()=>{this.update(x,y)},speed||1))}update(x,y){if(!(null!=x&&x!==this.xIndex||null!=y&&y!==this.yIndex))return;null!=this.slide&&this.slide.dispatchEvent(new Event("deactivate")),null!=x&&(this.xIndex=x),null!=y&&(this.yIndex=y);const xSlide=this.swiper.slides[this.xIndex];null==xSlide.swiper?this.slide=xSlide:this.slide=xSlide.swiper.slides[this.yIndex],this.slide.dispatchEvent(new Event("load")),this.slide.dispatchEvent(new Event("activate")),null!=preloadTimeout&&(preloadTimeout=null),preloadTimeout=setTimeout(()=>{const activeSlides=this.getSurroundingSlides(this.xIndex,this.yIndex);this.slides.forEach(slide=>{slide.x===this.xIndex&&slide.y===this.yIndex||(-1!==activeSlides.indexOf(slide)?slide.loaded||(slide.dispatchEvent(new Event("load")),slide.dispatchEvent(new Event("preactivate"))):slide.loaded&&slide.dispatchEvent(new Event("unload")))})},1e3),routie_default.a.navigate(`/${this.xIndex}/${this.yIndex}`,{silent:!0})}getSurroundingSlides(x,y){const slides=[];let slide;return null!=(slide=this.getSlide(x,y))&&slides.push(slide),null!=(slide=this.getSlide(x,y-1))&&slides.push(slide),null!=(slide=this.getSlide(x,y+1))&&slides.push(slide),null!=(slide=this.getActiveSlideInColumn(x-1))&&slides.push(slide),null!=(slide=this.getActiveSlideInColumn(x+1))&&slides.push(slide),slides}getActiveSlideInColumn(x){let slide=this.swiper.slides[x];return null!=slide&&null!=slide.swiper&&(slide=slide.swiper.slides[slide.swiper.activeIndex]),slide}getSlide(x,y){if(y<0)return null;const xSlide=this.swiper.slides[x];if(null==xSlide)return null;let slide;if(null!=xSlide.swiper)slide=xSlide.swiper.slides[y];else{if(0!==y)return null;slide=xSlide}return slide||null}}(document.querySelector(".foliokit-container")),MagLoftReader.platform=Object(detect_browser.detect)().name,MagLoftReader.slides.forEach(element=>{const html=element.getAttribute("data-html");element.thumb=element.getAttribute("thumb");const height=parseInt(element.getAttribute("height"),10),main=document.createElement("main");main.style.backgroundImage=`url(${element.thumb})`,main.style.height=`${height}px`,element.appendChild(main),element.x=parseInt(element.getAttribute("x"),10),element.y=parseInt(element.getAttribute("y"),10),element.removeAttribute("data-html"),element.loaded=!1,element.activated=!1,element.addEventListener("load",()=>{if(element.loaded)return;element.loaded=!0,main.innerHTML=html;const bindingElements=Array.from(element.querySelectorAll("[bindings]"));bindingElements.forEach(el=>{el.bindings=JSON.parse(el.getAttribute("bindings"))}),bindingElements.filter(el=>null!=el.bindings.horizontalSwipe).forEach(horizontalSwipeEvent),bindingElements.filter(el=>null!=el.bindings.click).forEach(clickEvent),Array.from(element.querySelectorAll(".overlay-hyperlink")).forEach(hyperlinkEvent),Array.from(element.querySelectorAll(".overlay-video[fullscreen]:not([fullscreen=false])")).forEach(videoFullscreenEvent),Array.from(element.querySelectorAll(".overlay-video:not([fullscreen]), .overlay-video[fullscreen=false]")).forEach(videoEvent),Array.from(element.querySelectorAll(".overlay-audio")).forEach(audioEvent),Array.from(element.querySelectorAll("[active-state], .overlay-container[name]")).forEach(stateEvent),Array.from(element.querySelectorAll(".overlay-container:not([active-state]):not([name])")).forEach(passthroughStateEvent),Array.from(element.querySelectorAll(".overlay-360")).forEach(circlrEvent),Array.from(element.querySelectorAll(".overlay-imagepan")).forEach(imagepanEvent),Array.from(element.querySelectorAll(".overlay-webview[data-type=iframe]")).forEach(webViewEvent),Array.from(element.querySelectorAll(".overlay-webview[data-type=youtube]")).forEach(webViewYoutubeEvent)}),element.addEventListener("unload",()=>{element.loaded&&(element.loaded=!1,main.innerHTML="",Array.from(main.children).forEach(child=>child.dispatchEvent(new Event("activate"))))}),element.addEventListener("activate",()=>{element.activated||(element.activated=!0,Array.from(main.children).forEach(child=>child.dispatchEvent(new Event("activate"))))}),element.addEventListener("preactivate",()=>{Array.from(main.children).forEach(child=>child.dispatchEvent(new Event("preactivate")))}),element.addEventListener("deactivate",()=>{element.activated&&(element.activated=!1,Array.from(main.children).forEach(child=>child.dispatchEvent(new Event("deactivate"))))})}),document.addEventListener("DOMContentLoaded",()=>{setTimeout(()=>{MagLoftReader.init(),window.scrollTo(0,1)},250)})},function(module,exports){exports.endianness=function(){return"LE"},exports.hostname=function(){return"undefined"!=typeof location?location.hostname:""},exports.loadavg=function(){return[]},exports.uptime=function(){return 0},exports.freemem=function(){return Number.MAX_VALUE},exports.totalmem=function(){return Number.MAX_VALUE},exports.cpus=function(){return[]},exports.type=function(){return"Browser"},exports.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},exports.networkInterfaces=exports.getNetworkInterfaces=function(){return{}},exports.arch=function(){return"javascript"},exports.platform=function(){return"browser"},exports.tmpdir=exports.tmpDir=function(){return"/tmp"},exports.EOL="\n",exports.homedir=function(){return"/"}},function(module,exports){var cachedSetTimeout,cachedClearTimeout,process=module.exports={};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(fun){if(cachedSetTimeout===setTimeout)return setTimeout(fun,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(fun,0);try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var currentQueue,queue=[],draining=!1,queueIndex=-1;function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var timeout=runTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex<len;)currentQueue&¤tQueue[queueIndex].run();queueIndex=-1,len=queue.length}currentQueue=null,draining=!1,function(marker){if(cachedClearTimeout===clearTimeout)return clearTimeout(marker);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(marker);try{cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}(timeout)}}function Item(fun,array){this.fun=fun,this.array=array}function noop(){}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)args[i-1]=arguments[i];queue.push(new Item(fun,args)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.prependListener=noop,process.prependOnceListener=noop,process.listeners=function(name){return[]},process.binding=function(name){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(dir){throw new Error("process.chdir is not supported")},process.umask=function(){return 0}},,function(module,exports,__webpack_require__){}]);
|
data/bin/foliokit
ADDED
data/lib/foliokit.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
require "nokogiri"
|
2
|
+
require "workspace"
|
3
|
+
require "workspace-archive"
|
4
|
+
require "workspace-media"
|
5
|
+
require "active_support"
|
6
|
+
require "active_support/core_ext"
|
7
|
+
require "mini_magick"
|
8
|
+
require "poppler"
|
9
|
+
require "addressable/uri"
|
10
|
+
|
11
|
+
module Foliokit
|
12
|
+
extend ActiveSupport::Autoload
|
13
|
+
require 'foliokit/modules/core'
|
14
|
+
require 'foliokit/modules/element'
|
15
|
+
require 'foliokit/types/bounds'
|
16
|
+
require 'foliokit/types/source'
|
17
|
+
autoload :Issue
|
18
|
+
autoload :Slide
|
19
|
+
autoload :Article
|
20
|
+
autoload :Package
|
21
|
+
autoload :ContentStack
|
22
|
+
autoload :Manifest
|
23
|
+
autoload :ManifestFolio
|
24
|
+
autoload :ManifestArticle
|
25
|
+
autoload :AssetRendition
|
26
|
+
autoload :Overlay
|
27
|
+
autoload :State
|
28
|
+
autoload :Event
|
29
|
+
autoload :Exporter
|
30
|
+
end
|
31
|
+
|
32
|
+
class String
|
33
|
+
def to_bool
|
34
|
+
return true if self == true || self =~ /(true|t|yes|y|1)$/i
|
35
|
+
return false if self == false || self.blank? || self =~ /(false|f|no|n|0)$/i
|
36
|
+
|
37
|
+
raise ArgumentError, "invalid value for Boolean: \"#{self}\""
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module Foliokit
|
2
|
+
class Article
|
3
|
+
attr_reader :content_stack, :overlays, :index
|
4
|
+
|
5
|
+
def initialize(content_stack, overlays, index)
|
6
|
+
@content_stack = content_stack
|
7
|
+
@overlays = overlays
|
8
|
+
@index = index
|
9
|
+
end
|
10
|
+
|
11
|
+
def export(document, x, y)
|
12
|
+
node = Nokogiri::XML::Node.new("article", document)
|
13
|
+
html_node = Nokogiri::XML::Node.new("x", document)
|
14
|
+
node["class"] = "swiper-slide article"
|
15
|
+
node["class"] += " smooth-scrolling" if content_stack.unify?
|
16
|
+
node["x"] = x
|
17
|
+
node["y"] = y
|
18
|
+
node["touchable"] = true
|
19
|
+
node["style"] = ["width: #{content_stack.package.manifest.device_width}px", "height: #{content_stack.package.manifest.device_height}px"].join('; ')
|
20
|
+
|
21
|
+
# add asset renditions
|
22
|
+
height = 0
|
23
|
+
content_stack.renditions(index).each_with_index do |rendition, ri|
|
24
|
+
height += rendition.height
|
25
|
+
rendition.slices.each_with_index do |slice, si|
|
26
|
+
# export slice to html node
|
27
|
+
html_node << slice.export(document)
|
28
|
+
# assign thumbnail if first rendition and first slice
|
29
|
+
node["thumb"] = slice.src if ri == 0 and si == 0
|
30
|
+
end
|
31
|
+
end
|
32
|
+
node["height"] = height
|
33
|
+
|
34
|
+
# render overlays
|
35
|
+
overlays&.each do |overlay|
|
36
|
+
child_node = overlay.export(document, section_index: index)
|
37
|
+
html_node << child_node unless child_node.nil?
|
38
|
+
end
|
39
|
+
|
40
|
+
# render html
|
41
|
+
node["data-html"] = html_node.children.to_html.delete("\n")
|
42
|
+
|
43
|
+
# append to node list
|
44
|
+
node
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module Foliokit
|
2
|
+
class AssetRendition
|
3
|
+
include Modules::Element
|
4
|
+
attr_accessor :bounds
|
5
|
+
element_reader :type
|
6
|
+
element_reader :source, type: Types::Source
|
7
|
+
element_reader :includesOverlays, type: "bool"
|
8
|
+
element_reader :width, type: "i"
|
9
|
+
element_reader :height, type: "i"
|
10
|
+
element_reader :role
|
11
|
+
|
12
|
+
# clamp asset rendition height to device height,
|
13
|
+
# as the rendition can never visially exceet the device height
|
14
|
+
def height
|
15
|
+
(@height > package.manifest.device_height) ? package.manifest.device_height : @height
|
16
|
+
end
|
17
|
+
|
18
|
+
def slices
|
19
|
+
result = []
|
20
|
+
# split up long images
|
21
|
+
if bounds.height > package.manifest.device_height
|
22
|
+
result.push(Slice.new(self, Types::Bounds.new(0, 0, bounds.width, package.manifest.device_height)))
|
23
|
+
result.push(Slice.new(self, Types::Bounds.new(0, package.manifest.device_height, bounds.width, bounds.height - package.manifest.device_height)))
|
24
|
+
else
|
25
|
+
result.push(Slice.new(self))
|
26
|
+
end
|
27
|
+
result
|
28
|
+
end
|
29
|
+
|
30
|
+
class Slice
|
31
|
+
attr_reader :rendition, :bounds
|
32
|
+
|
33
|
+
def initialize(rendition, bounds = nil)
|
34
|
+
@rendition = rendition
|
35
|
+
@bounds = bounds
|
36
|
+
end
|
37
|
+
|
38
|
+
def src
|
39
|
+
rendition.package.store_asset(rendition.source, nil, bounds)
|
40
|
+
end
|
41
|
+
|
42
|
+
def export(document)
|
43
|
+
node_bounds = bounds || rendition.bounds
|
44
|
+
node = Nokogiri::XML::Node.new("img", document)
|
45
|
+
node["class"] = "overlay-image"
|
46
|
+
node["style"] = "height: #{node_bounds.height}px; width: #{node_bounds.width}px; left: #{node_bounds.x}px; top: #{node_bounds.y}px;"
|
47
|
+
node["swipable"] = true
|
48
|
+
node["touchable"] = true
|
49
|
+
node["src"] = src
|
50
|
+
node
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,81 @@
|
|
1
|
+
require 'thor'
|
2
|
+
require 'foliokit'
|
3
|
+
require 'foliokit/version'
|
4
|
+
|
5
|
+
module Foliokit
|
6
|
+
class Command < Thor
|
7
|
+
desc "convert FOLIO_PATH HPUB_PATH", "Convert folio documents to html / hpub"
|
8
|
+
method_option :version, aliases: "-v", desc: "show version", type: :boolean
|
9
|
+
method_option :quiet, aliases: "-q", desc: "quiet / suppress output", type: :boolean
|
10
|
+
method_option :help, aliases: "-h", desc: "show help", type: :boolean
|
11
|
+
method_option :force, aliases: "-f", desc: "overwrite output", type: :boolean
|
12
|
+
method_option :tmp, aliases: "-t", desc: "temporary directory", type: :string
|
13
|
+
method_option :out, aliases: "-o", desc: "output directory", type: :string
|
14
|
+
def convert(folio_path, hpub_path = nil)
|
15
|
+
# print usage information or version if requests
|
16
|
+
respond!(Foliokit::VERSION) if options.version?
|
17
|
+
help("convert") && exit if options.help?
|
18
|
+
|
19
|
+
# validate arguments
|
20
|
+
(folio_file, range) = parse_file_arg(folio_path, must_exist: true)
|
21
|
+
hpub_path = "#{folio_file.dir}/#{folio_file.basename}.hpub" if !options.out? and hpub_path.nil?
|
22
|
+
hpub_file = parse_file_arg(hpub_path)&.first
|
23
|
+
tmp_dir = parse_dir_arg(options.tmp, must_not_exist: !options.force?) || Workspace.tmpdir
|
24
|
+
out_dir = parse_dir_arg(options.out, must_not_exist: !options.force?) || Workspace.tmpdir
|
25
|
+
|
26
|
+
# convert folio issue
|
27
|
+
issue = Foliokit::Issue.new(folio_file, tmp_dir, range)
|
28
|
+
error!("no slides to export") if issue.slides.empty?
|
29
|
+
exporter = Foliokit::Exporter.new(issue)
|
30
|
+
exporter.export(out_dir.clean) do |slide, index|
|
31
|
+
puts "-- converting slide #{index}" unless options.quiet?
|
32
|
+
end
|
33
|
+
|
34
|
+
# export hpub
|
35
|
+
exporter.pack_hpub(hpub_file) unless hpub_file.nil?
|
36
|
+
|
37
|
+
# clear directories
|
38
|
+
tmp_dir.delete unless options.tmp?
|
39
|
+
out_dir.delete unless options.out?
|
40
|
+
end
|
41
|
+
|
42
|
+
private
|
43
|
+
|
44
|
+
def parse_file_arg(value, must_exist: false, must_not_exist: false)
|
45
|
+
return nil if value.nil?
|
46
|
+
|
47
|
+
range = { from: nil, to: nil }
|
48
|
+
match = value.match(/^([^\[]+)\[?([0-9.]+)?/)
|
49
|
+
path = match[1]
|
50
|
+
if match[2]
|
51
|
+
range_match = match[2].match(/^([0-9]*)(\.*)([0-9]*)$/)
|
52
|
+
range[:from] = range_match[1].to_i unless range_match[1].blank?
|
53
|
+
range[:to] = range_match[3].to_i unless range_match[3].blank?
|
54
|
+
range[:to] = range[:from] if range[:to].nil? and range_match[2].blank?
|
55
|
+
end
|
56
|
+
file = Workspace::File.new("/", File.expand_path(path))
|
57
|
+
error!("file #{file} doesn't exists") if must_exist and !file.exists?
|
58
|
+
error!("file #{file} already exists") if must_not_exist and file.exists?
|
59
|
+
error!("invalid range: #{match[2]}") if !range[:from].nil? and range[:to] and range[:from] > range[:to]
|
60
|
+
[file, range]
|
61
|
+
end
|
62
|
+
|
63
|
+
def parse_dir_arg(value, must_exist: false, must_not_exist: false)
|
64
|
+
return nil if value.nil?
|
65
|
+
|
66
|
+
dir = Workspace::Dir.new("/", File.expand_path(value))
|
67
|
+
error!("directory #{dir} doesn't exists") if must_exist and !dir.exists?
|
68
|
+
error!("directory #{dir} already exists") if must_not_exist and dir.exists?
|
69
|
+
dir
|
70
|
+
end
|
71
|
+
|
72
|
+
def error!(message)
|
73
|
+
raise(Thor::Error, "ERROR: #{message}")
|
74
|
+
end
|
75
|
+
|
76
|
+
def respond!(message)
|
77
|
+
puts message
|
78
|
+
exit
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
module Foliokit
|
2
|
+
class ContentStack
|
3
|
+
include Modules::Element
|
4
|
+
element_reader :id
|
5
|
+
element_reader :lastUpdated, type: :datetime
|
6
|
+
element_reader :smoothScrolling
|
7
|
+
element_reader :layout
|
8
|
+
element_reader :alwaysDisplayOverlays, type: :bool
|
9
|
+
element_reader :orientation
|
10
|
+
element_reader :width, type: :i, selector: "content > regions > region > * > rectangle"
|
11
|
+
element_reader :height, type: :i, selector: "content > regions > region > * > rectangle"
|
12
|
+
element_reader :source, selector: "content > assets > asset > assetRendition"
|
13
|
+
element_collection :overlays, "content > overlays > overlay", Overlay
|
14
|
+
element_xpath_collection :asset_renditions, "./content/assets/asset/assetRendition[@role='content']", AssetRendition
|
15
|
+
element_xpath_collection :thumbnails, "./content/assets/asset/assetRendition[@role='thumbnail']", AssetRendition
|
16
|
+
|
17
|
+
def initialize(element, package)
|
18
|
+
super(element, package)
|
19
|
+
end
|
20
|
+
|
21
|
+
def unify?
|
22
|
+
(smooth_scrolling == orientation) || (smooth_scrolling == "true")
|
23
|
+
end
|
24
|
+
|
25
|
+
def renditions(index)
|
26
|
+
if unify?
|
27
|
+
asset_renditions.each_with_index.map do |rendition, i|
|
28
|
+
rendition.bounds = Types::Bounds.new(0, package.manifest.device_height * i, rendition.width, rendition.height)
|
29
|
+
rendition
|
30
|
+
end
|
31
|
+
else
|
32
|
+
rendition = asset_renditions[index]
|
33
|
+
rendition.bounds = Types::Bounds.new(0, 0, rendition.width, rendition.height)
|
34
|
+
[rendition]
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def articles
|
39
|
+
overlay_map = []
|
40
|
+
max_index = asset_renditions.count - 1
|
41
|
+
device_height = package.manifest.device_height
|
42
|
+
overlays.each do |overlay|
|
43
|
+
median_y = overlay.bounds.y + (overlay.bounds.height / 2)
|
44
|
+
index = unify? ? 0 : [median_y / device_height, max_index].min
|
45
|
+
offset_top = index * device_height
|
46
|
+
overlay.bounds.translate(0, -offset_top)
|
47
|
+
overlay_map[index] ||= []
|
48
|
+
overlay_map[index].push(overlay)
|
49
|
+
end
|
50
|
+
overlay_map = [[]] if overlay_map.empty?
|
51
|
+
unless unify?
|
52
|
+
overlay_map.push([]) while overlay_map.length < asset_renditions.count
|
53
|
+
end
|
54
|
+
overlay_map.each_with_index.map { |overlays, index| Article.new(self, overlays, index) }
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,88 @@
|
|
1
|
+
module Foliokit
|
2
|
+
class EventAction
|
3
|
+
include Modules::Element
|
4
|
+
element_reader :selector
|
5
|
+
element_reader :delay, type: "f"
|
6
|
+
element_reader :loopCount, type: "i"
|
7
|
+
element_reader :reverseDirection, type: "bool"
|
8
|
+
element_reader :stopAtEnd, type: "bool"
|
9
|
+
element_reader :toggle, type: "bool"
|
10
|
+
element_reader :time, type: "f"
|
11
|
+
element_reader :target, hash: true
|
12
|
+
element_reader :state, hash: true
|
13
|
+
|
14
|
+
def to_hash
|
15
|
+
Hash[element.attributes.map do |k, v|
|
16
|
+
value = normalize_value(v.value)
|
17
|
+
if ["target", "state"].include?(k)
|
18
|
+
value = hashify(value)
|
19
|
+
end
|
20
|
+
[k, value]
|
21
|
+
end]
|
22
|
+
end
|
23
|
+
|
24
|
+
def valid?
|
25
|
+
return false if target.present? and !package.valid_overlay_id?(target)
|
26
|
+
return false if state.present? and !package.valid_overlay_id?(state)
|
27
|
+
|
28
|
+
true
|
29
|
+
end
|
30
|
+
|
31
|
+
def normalize_value(value)
|
32
|
+
if value == "true"
|
33
|
+
true
|
34
|
+
elsif value == "false"
|
35
|
+
false
|
36
|
+
elsif value =~ /^[0-9.]+$/
|
37
|
+
value.to_f
|
38
|
+
elsif value =~ /^[0-9]+$/
|
39
|
+
value.to_i
|
40
|
+
else
|
41
|
+
value
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def export(document, event)
|
46
|
+
node = Nokogiri::XML::Node.new("overlay-action", document)
|
47
|
+
node["trigger"] = event.name
|
48
|
+
node["action"] = selector
|
49
|
+
node["delay"] = delay unless delay.nil?
|
50
|
+
node["time"] = time unless time.nil?
|
51
|
+
node["target"] = target unless target.nil?
|
52
|
+
node["state"] = state unless state.nil?
|
53
|
+
node["reverse-direction"] = "" if reverse_direction
|
54
|
+
node["stop-at-end"] = "" if stop_at_end
|
55
|
+
node["loop-count"] = loop_count unless loop_count.nil?
|
56
|
+
node
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
class EventActionGroup
|
61
|
+
include Modules::Element
|
62
|
+
element_reader :type
|
63
|
+
element_collection :actions, "action", EventAction
|
64
|
+
|
65
|
+
def valid_actions
|
66
|
+
actions.select(&:valid?)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
class Event
|
71
|
+
include Modules::Element
|
72
|
+
element_reader :name
|
73
|
+
element_collection :actions, "action", EventAction
|
74
|
+
element_collection :actiongroups, "actiongroup", EventActionGroup
|
75
|
+
|
76
|
+
def valid_actions
|
77
|
+
actions.select(&:valid?)
|
78
|
+
end
|
79
|
+
|
80
|
+
def all_actions
|
81
|
+
result = valid_actions
|
82
|
+
actiongroups.each do |actiongroup|
|
83
|
+
result |= actiongroup.valid_actions
|
84
|
+
end
|
85
|
+
result
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,106 @@
|
|
1
|
+
module Foliokit
|
2
|
+
class Exporter
|
3
|
+
attr_accessor :issue
|
4
|
+
attr_reader :converted, :output_dir
|
5
|
+
|
6
|
+
def initialize(issue)
|
7
|
+
@issue = issue
|
8
|
+
@converted = false
|
9
|
+
end
|
10
|
+
|
11
|
+
def export(dir, url: nil, cover: nil, &block)
|
12
|
+
spec = Gem::Specification.find_by_name("foliokit")
|
13
|
+
assets_dir = Workspace::Dir.new(spec.gem_dir).dir("assets")
|
14
|
+
issue_dir = issue.dir
|
15
|
+
dir.clean
|
16
|
+
dir.file("index.html").write(build_html(url: url, cover: cover, &block))
|
17
|
+
issue.store_assets(dir.dir("assets"))
|
18
|
+
issue_dir.dir("html").copy(dir.dir("html")) if issue_dir.dir("html").exists?
|
19
|
+
assets_dir.file("foliokit.css").copy(dir.file("foliokit.css"))
|
20
|
+
assets_dir.file("foliokit.js").copy(dir.file("foliokit.js"))
|
21
|
+
@output_dir = dir
|
22
|
+
@converted = true
|
23
|
+
true
|
24
|
+
end
|
25
|
+
|
26
|
+
def pack_hpub(hpub_file)
|
27
|
+
# export book.json
|
28
|
+
book_json = {
|
29
|
+
"hpub": 1,
|
30
|
+
"title": issue.title,
|
31
|
+
"author": ["MagLoft"],
|
32
|
+
"creator": ["MagLoft"],
|
33
|
+
"date": Date.today.strftime,
|
34
|
+
"url": "book://#{issue.package.id}",
|
35
|
+
"orientation": issue.package.manifest.orientation,
|
36
|
+
"zoomable": false,
|
37
|
+
"-baker-background": "#FFFFFF",
|
38
|
+
"-baker-vertical-bounce": false,
|
39
|
+
"-baker-media-autoplay": true,
|
40
|
+
"-baker-page-numbers-color": "#000000",
|
41
|
+
"-baker-rendering": "three-cards",
|
42
|
+
"cover": "cover.jpg",
|
43
|
+
"navigator": "disable",
|
44
|
+
"contents": ["index.html"]
|
45
|
+
}
|
46
|
+
output_dir.file("book.json").write(JSON.dump(book_json))
|
47
|
+
output_dir.file(".nomedia").write("")
|
48
|
+
# export cover
|
49
|
+
rendition = issue.slides.first.articles.first.content_stack.renditions(0).first.slices.first
|
50
|
+
cover_file = output_dir.file("cover.jpg")
|
51
|
+
issue.dir.file(rendition.src).copy(cover_file)
|
52
|
+
cover_file.fit(width: 768, height: 1024)
|
53
|
+
# compress hpub
|
54
|
+
output_dir.compress(hpub_file)
|
55
|
+
end
|
56
|
+
|
57
|
+
def build_html(url: nil, cover: nil, &block)
|
58
|
+
builder = Nokogiri::HTML::Builder.new do |b|
|
59
|
+
b.doc.internal_subset.remove
|
60
|
+
b.doc.create_internal_subset('html', nil, nil)
|
61
|
+
b.html do
|
62
|
+
b.head do
|
63
|
+
b.meta("http-equiv" => 'Content-Type', content: "text/html; charset=UTF-8")
|
64
|
+
b.title(issue.title)
|
65
|
+
b.meta(charset: 'utf-8')
|
66
|
+
b.meta("http-equiv" => 'X-UA-Compatible', content: "IE=edge,chrome=1")
|
67
|
+
b.meta(name: 'viewport', content: "width=#{issue.width}.00,minimum-scale=.2,user-scalable=no")
|
68
|
+
b.meta(name: 'description', content: issue.description)
|
69
|
+
b.meta(name: 'author', content: "MagLoft")
|
70
|
+
b.meta(property: 'og:url', content: url) unless url.nil?
|
71
|
+
b.meta(property: 'og:image', content: cover) unless cover.nil?
|
72
|
+
b.meta(property: 'og:type', content: "website")
|
73
|
+
b.meta(property: 'og:title', content: issue.title)
|
74
|
+
b.meta(property: 'og:description', content: issue.description)
|
75
|
+
b.meta(property: 'fb:app_id', content: "631288863616870")
|
76
|
+
b.link(rel: 'stylesheet', href: "foliokit.css")
|
77
|
+
end
|
78
|
+
b.body do
|
79
|
+
b.div(class: "foliokit-wrapper") do
|
80
|
+
b.div(class: "foliokit-container swiper-container", style: "width: #{issue.width}px; height: #{issue.height}px") do
|
81
|
+
b.div(class: "swiper-wrapper") do |wrapper_h|
|
82
|
+
issue.slides.each_with_index do |slide, x|
|
83
|
+
yield(slide, x) if block_given?
|
84
|
+
if slide.articles.length > 1
|
85
|
+
b.article(class: "swiper-slide swiper-container") do
|
86
|
+
b.div(class: "swiper-wrapper") do |wrapper_v|
|
87
|
+
slide.articles.each_with_index do |article, y|
|
88
|
+
wrapper_v << article.export(b.doc, x, y)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
else
|
93
|
+
wrapper_h << slide.articles.first.export(b.doc, x, 0)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
b.script(type: 'text/javascript', src: "foliokit.js")
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
builder.doc.to_html(indent: 4)
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|