swiper-3.3.1.min.js 95 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947
  1. /**
  2. * Swiper 3.3.1
  3. * Most modern mobile touch slider and framework with hardware accelerated transitions
  4. *
  5. * http://www.idangero.us/swiper/
  6. *
  7. * Copyright 2016, Vladimir Kharlampidi
  8. * The iDangero.us
  9. * http://www.idangero.us/
  10. *
  11. * Licensed under MIT
  12. *
  13. * Released on: February 7, 2016
  14. */
  15. !
  16. function() {
  17. "use strict";
  18. function e(e) {
  19. e.fn.swiper = function(a) {
  20. var r;
  21. return e(this).each(function() {
  22. var e = new t(this, a);
  23. r || (r = e)
  24. }),
  25. r
  26. }
  27. }
  28. var a, t = function(e, i) {
  29. function s(e) {
  30. return Math.floor(e)
  31. }
  32. function n() {
  33. b.autoplayTimeoutId = setTimeout(function() {
  34. b.params.loop ? (b.fixLoop(), b._slideNext(), b.emit("onAutoplay", b)) : b.isEnd ? i.autoplayStopOnLast ? b.stopAutoplay() : (b._slideTo(0), b.emit("onAutoplay", b)) : (b._slideNext(), b.emit("onAutoplay", b))
  35. },
  36. b.params.autoplay)
  37. }
  38. function o(e, t) {
  39. var r = a(e.target);
  40. if (!r.is(t)) if ("string" == typeof t) r = r.parents(t);
  41. else if (t.nodeType) {
  42. var i;
  43. return r.parents().each(function(e, a) {
  44. a === t && (i = t)
  45. }),
  46. i ? t: void 0
  47. }
  48. if (0 !== r.length) return r[0]
  49. }
  50. function l(e, a) {
  51. a = a || {};
  52. var t = window.MutationObserver || window.WebkitMutationObserver,
  53. r = new t(function(e) {
  54. e.forEach(function(e) {
  55. b.onResize(!0),
  56. b.emit("onObserverUpdate", b, e)
  57. })
  58. });
  59. r.observe(e, {
  60. attributes: "undefined" == typeof a.attributes ? !0 : a.attributes,
  61. childList: "undefined" == typeof a.childList ? !0 : a.childList,
  62. characterData: "undefined" == typeof a.characterData ? !0 : a.characterData
  63. }),
  64. b.observers.push(r)
  65. }
  66. function p(e) {
  67. e.originalEvent && (e = e.originalEvent);
  68. var a = e.keyCode || e.charCode;
  69. if (!b.params.allowSwipeToNext && (b.isHorizontal() && 39 === a || !b.isHorizontal() && 40 === a)) return ! 1;
  70. if (!b.params.allowSwipeToPrev && (b.isHorizontal() && 37 === a || !b.isHorizontal() && 38 === a)) return ! 1;
  71. if (! (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey || document.activeElement && document.activeElement.nodeName && ("input" === document.activeElement.nodeName.toLowerCase() || "textarea" === document.activeElement.nodeName.toLowerCase()))) {
  72. if (37 === a || 39 === a || 38 === a || 40 === a) {
  73. var t = !1;
  74. if (b.container.parents(".swiper-slide").length > 0 && 0 === b.container.parents(".swiper-slide-active").length) return;
  75. var r = {
  76. left: window.pageXOffset,
  77. top: window.pageYOffset
  78. },
  79. i = window.innerWidth,
  80. s = window.innerHeight,
  81. n = b.container.offset();
  82. b.rtl && (n.left = n.left - b.container[0].scrollLeft);
  83. for (var o = [[n.left, n.top], [n.left + b.width, n.top], [n.left, n.top + b.height], [n.left + b.width, n.top + b.height]], l = 0; l < o.length; l++) {
  84. var p = o[l];
  85. p[0] >= r.left && p[0] <= r.left + i && p[1] >= r.top && p[1] <= r.top + s && (t = !0)
  86. }
  87. if (!t) return
  88. }
  89. b.isHorizontal() ? ((37 === a || 39 === a) && (e.preventDefault ? e.preventDefault() : e.returnValue = !1), (39 === a && !b.rtl || 37 === a && b.rtl) && b.slideNext(), (37 === a && !b.rtl || 39 === a && b.rtl) && b.slidePrev()) : ((38 === a || 40 === a) && (e.preventDefault ? e.preventDefault() : e.returnValue = !1), 40 === a && b.slideNext(), 38 === a && b.slidePrev())
  90. }
  91. }
  92. function d(e) {
  93. e.originalEvent && (e = e.originalEvent);
  94. var a = b.mousewheel.event,
  95. t = 0,
  96. r = b.rtl ? -1 : 1;
  97. if ("mousewheel" === a) if (b.params.mousewheelForceToAxis) if (b.isHorizontal()) {
  98. if (! (Math.abs(e.wheelDeltaX) > Math.abs(e.wheelDeltaY))) return;
  99. t = e.wheelDeltaX * r
  100. } else {
  101. if (! (Math.abs(e.wheelDeltaY) > Math.abs(e.wheelDeltaX))) return;
  102. t = e.wheelDeltaY
  103. } else t = Math.abs(e.wheelDeltaX) > Math.abs(e.wheelDeltaY) ? -e.wheelDeltaX * r: -e.wheelDeltaY;
  104. else if ("DOMMouseScroll" === a) t = -e.detail;
  105. else if ("wheel" === a) if (b.params.mousewheelForceToAxis) if (b.isHorizontal()) {
  106. if (! (Math.abs(e.deltaX) > Math.abs(e.deltaY))) return;
  107. t = -e.deltaX * r
  108. } else {
  109. if (! (Math.abs(e.deltaY) > Math.abs(e.deltaX))) return;
  110. t = -e.deltaY
  111. } else t = Math.abs(e.deltaX) > Math.abs(e.deltaY) ? -e.deltaX * r: -e.deltaY;
  112. if (0 !== t) {
  113. if (b.params.mousewheelInvert && (t = -t), b.params.freeMode) {
  114. var i = b.getWrapperTranslate() + t * b.params.mousewheelSensitivity,
  115. s = b.isBeginning,
  116. n = b.isEnd;
  117. if (i >= b.minTranslate() && (i = b.minTranslate()), i <= b.maxTranslate() && (i = b.maxTranslate()), b.setWrapperTransition(0), b.setWrapperTranslate(i), b.updateProgress(), b.updateActiveIndex(), (!s && b.isBeginning || !n && b.isEnd) && b.updateClasses(), b.params.freeModeSticky ? (clearTimeout(b.mousewheel.timeout), b.mousewheel.timeout = setTimeout(function() {
  118. b.slideReset()
  119. },
  120. 300)) : b.params.lazyLoading && b.lazy && b.lazy.load(), 0 === i || i === b.maxTranslate()) return
  121. } else {
  122. if ((new window.Date).getTime() - b.mousewheel.lastScrollTime > 60) if (0 > t) if (b.isEnd && !b.params.loop || b.animating) {
  123. if (b.params.mousewheelReleaseOnEdges) return ! 0
  124. } else b.slideNext();
  125. else if (b.isBeginning && !b.params.loop || b.animating) {
  126. if (b.params.mousewheelReleaseOnEdges) return ! 0
  127. } else b.slidePrev();
  128. b.mousewheel.lastScrollTime = (new window.Date).getTime()
  129. }
  130. return b.params.autoplay && b.stopAutoplay(),
  131. e.preventDefault ? e.preventDefault() : e.returnValue = !1,
  132. !1
  133. }
  134. }
  135. function u(e, t) {
  136. e = a(e);
  137. var r, i, s, n = b.rtl ? -1 : 1;
  138. r = e.attr("data-swiper-parallax") || "0",
  139. i = e.attr("data-swiper-parallax-x"),
  140. s = e.attr("data-swiper-parallax-y"),
  141. i || s ? (i = i || "0", s = s || "0") : b.isHorizontal() ? (i = r, s = "0") : (s = r, i = "0"),
  142. i = i.indexOf("%") >= 0 ? parseInt(i, 10) * t * n + "%": i * t * n + "px",
  143. s = s.indexOf("%") >= 0 ? parseInt(s, 10) * t + "%": s * t + "px",
  144. e.transform("translate3d(" + i + ", " + s + ",0px)")
  145. }
  146. function c(e) {
  147. return 0 !== e.indexOf("on") && (e = e[0] !== e[0].toUpperCase() ? "on" + e[0].toUpperCase() + e.substring(1) : "on" + e),
  148. e
  149. }
  150. if (! (this instanceof t)) return new t(e, i);
  151. var m = {
  152. direction: "horizontal",
  153. touchEventsTarget: "container",
  154. initialSlide: 0,
  155. speed: 300,
  156. autoplay: !1,
  157. autoplayDisableOnInteraction: !0,
  158. autoplayStopOnLast: !1,
  159. iOSEdgeSwipeDetection: !1,
  160. iOSEdgeSwipeThreshold: 20,
  161. freeMode: !1,
  162. freeModeMomentum: !0,
  163. freeModeMomentumRatio: 1,
  164. freeModeMomentumBounce: !0,
  165. freeModeMomentumBounceRatio: 1,
  166. freeModeSticky: !1,
  167. freeModeMinimumVelocity: .02,
  168. autoHeight: !1,
  169. setWrapperSize: !1,
  170. virtualTranslate: !1,
  171. effect: "slide",
  172. coverflow: {
  173. rotate: 50,
  174. stretch: 0,
  175. depth: 100,
  176. modifier: 1,
  177. slideShadows: !0
  178. },
  179. flip: {
  180. slideShadows: !0,
  181. limitRotation: !0
  182. },
  183. cube: {
  184. slideShadows: !0,
  185. shadow: !0,
  186. shadowOffset: 20,
  187. shadowScale: .94
  188. },
  189. fade: {
  190. crossFade: !1
  191. },
  192. parallax: !1,
  193. scrollbar: null,
  194. scrollbarHide: !0,
  195. scrollbarDraggable: !1,
  196. scrollbarSnapOnRelease: !1,
  197. keyboardControl: !1,
  198. mousewheelControl: !1,
  199. mousewheelReleaseOnEdges: !1,
  200. mousewheelInvert: !1,
  201. mousewheelForceToAxis: !1,
  202. mousewheelSensitivity: 1,
  203. hashnav: !1,
  204. breakpoints: void 0,
  205. spaceBetween: 0,
  206. slidesPerView: 1,
  207. slidesPerColumn: 1,
  208. slidesPerColumnFill: "column",
  209. slidesPerGroup: 1,
  210. centeredSlides: !1,
  211. slidesOffsetBefore: 0,
  212. slidesOffsetAfter: 0,
  213. roundLengths: !1,
  214. touchRatio: 1,
  215. touchAngle: 45,
  216. simulateTouch: !0,
  217. shortSwipes: !0,
  218. longSwipes: !0,
  219. longSwipesRatio: .5,
  220. longSwipesMs: 300,
  221. followFinger: !0,
  222. onlyExternal: !1,
  223. threshold: 0,
  224. touchMoveStopPropagation: !0,
  225. uniqueNavElements: !0,
  226. pagination: null,
  227. paginationElement: "span",
  228. paginationClickable: !1,
  229. paginationHide: !1,
  230. paginationBulletRender: null,
  231. paginationProgressRender: null,
  232. paginationFractionRender: null,
  233. paginationCustomRender: null,
  234. paginationType: "bullets",
  235. resistance: !0,
  236. resistanceRatio: .85,
  237. nextButton: null,
  238. prevButton: null,
  239. watchSlidesProgress: !1,
  240. watchSlidesVisibility: !1,
  241. grabCursor: !1,
  242. preventClicks: !0,
  243. preventClicksPropagation: !0,
  244. slideToClickedSlide: !1,
  245. lazyLoading: !1,
  246. lazyLoadingInPrevNext: !1,
  247. lazyLoadingInPrevNextAmount: 1,
  248. lazyLoadingOnTransitionStart: !1,
  249. preloadImages: !0,
  250. updateOnImagesReady: !0,
  251. loop: !1,
  252. loopAdditionalSlides: 0,
  253. loopedSlides: null,
  254. control: void 0,
  255. controlInverse: !1,
  256. controlBy: "slide",
  257. allowSwipeToPrev: !0,
  258. allowSwipeToNext: !0,
  259. swipeHandler: null,
  260. noSwiping: !0,
  261. noSwipingClass: "swiper-no-swiping",
  262. slideClass: "swiper-slide",
  263. slideActiveClass: "swiper-slide-active",
  264. slideVisibleClass: "swiper-slide-visible",
  265. slideDuplicateClass: "swiper-slide-duplicate",
  266. slideNextClass: "swiper-slide-next",
  267. slidePrevClass: "swiper-slide-prev",
  268. wrapperClass: "swiper-wrapper",
  269. bulletClass: "swiper-pagination-bullet",
  270. bulletActiveClass: "swiper-pagination-bullet-active",
  271. buttonDisabledClass: "swiper-button-disabled",
  272. paginationCurrentClass: "swiper-pagination-current",
  273. paginationTotalClass: "swiper-pagination-total",
  274. paginationHiddenClass: "swiper-pagination-hidden",
  275. paginationProgressbarClass: "swiper-pagination-progressbar",
  276. observer: !1,
  277. observeParents: !1,
  278. a11y: !1,
  279. prevSlideMessage: "Previous slide",
  280. nextSlideMessage: "Next slide",
  281. firstSlideMessage: "This is the first slide",
  282. lastSlideMessage: "This is the last slide",
  283. paginationBulletMessage: "Go to slide {{index}}",
  284. runCallbacksOnInit: !0
  285. },
  286. h = i && i.virtualTranslate;
  287. i = i || {};
  288. var f = {};
  289. for (var g in i) if ("object" != typeof i[g] || null === i[g] || (i[g].nodeType || i[g] === window || i[g] === document || "undefined" != typeof r && i[g] instanceof r || "undefined" != typeof jQuery && i[g] instanceof jQuery)) f[g] = i[g];
  290. else {
  291. f[g] = {};
  292. for (var v in i[g]) f[g][v] = i[g][v]
  293. }
  294. for (var w in m) if ("undefined" == typeof i[w]) i[w] = m[w];
  295. else if ("object" == typeof i[w]) for (var y in m[w])"undefined" == typeof i[w][y] && (i[w][y] = m[w][y]);
  296. var b = this;
  297. if (b.params = i, b.originalParams = f, b.classNames = [], "undefined" != typeof a && "undefined" != typeof r && (a = r), ("undefined" != typeof a || (a = "undefined" == typeof r ? window.Dom7 || window.Zepto || window.jQuery: r)) && (b.$ = a, b.currentBreakpoint = void 0, b.getActiveBreakpoint = function() {
  298. if (!b.params.breakpoints) return ! 1;
  299. var e, a = !1,
  300. t = [];
  301. for (e in b.params.breakpoints) b.params.breakpoints.hasOwnProperty(e) && t.push(e);
  302. t.sort(function(e, a) {
  303. return parseInt(e, 10) > parseInt(a, 10)
  304. });
  305. for (var r = 0; r < t.length; r++) e = t[r],
  306. e >= window.innerWidth && !a && (a = e);
  307. return a || "max"
  308. },
  309. b.setBreakpoint = function() {
  310. var e = b.getActiveBreakpoint();
  311. if (e && b.currentBreakpoint !== e) {
  312. var a = e in b.params.breakpoints ? b.params.breakpoints[e] : b.originalParams,
  313. t = b.params.loop && a.slidesPerView !== b.params.slidesPerView;
  314. for (var r in a) b.params[r] = a[r];
  315. b.currentBreakpoint = e,
  316. t && b.destroyLoop && b.reLoop(!0)
  317. }
  318. },
  319. b.params.breakpoints && b.setBreakpoint(), b.container = a(e), 0 !== b.container.length)) {
  320. if (b.container.length > 1) {
  321. var x = [];
  322. return b.container.each(function() {
  323. x.push(new t(this, i))
  324. }),
  325. x
  326. }
  327. b.container[0].swiper = b,
  328. b.container.data("swiper", b),
  329. b.classNames.push("list-guanggaowei-" + b.params.direction),
  330. b.params.freeMode && b.classNames.push("list-guanggaowei-free-mode"),
  331. b.support.flexbox || (b.classNames.push("list-guanggaowei-no-flexbox"), b.params.slidesPerColumn = 1),
  332. b.params.autoHeight && b.classNames.push("list-guanggaowei-autoheight"),
  333. (b.params.parallax || b.params.watchSlidesVisibility) && (b.params.watchSlidesProgress = !0),
  334. ["cube", "coverflow", "flip"].indexOf(b.params.effect) >= 0 && (b.support.transforms3d ? (b.params.watchSlidesProgress = !0, b.classNames.push("list-guanggaowei-3d")) : b.params.effect = "slide"),
  335. "slide" !== b.params.effect && b.classNames.push("list-guanggaowei-" + b.params.effect),
  336. "cube" === b.params.effect && (b.params.resistanceRatio = 0, b.params.slidesPerView = 1, b.params.slidesPerColumn = 1, b.params.slidesPerGroup = 1, b.params.centeredSlides = !1, b.params.spaceBetween = 0, b.params.virtualTranslate = !0, b.params.setWrapperSize = !1),
  337. ("fade" === b.params.effect || "flip" === b.params.effect) && (b.params.slidesPerView = 1, b.params.slidesPerColumn = 1, b.params.slidesPerGroup = 1, b.params.watchSlidesProgress = !0, b.params.spaceBetween = 0, b.params.setWrapperSize = !1, "undefined" == typeof h && (b.params.virtualTranslate = !0)),
  338. b.params.grabCursor && b.support.touch && (b.params.grabCursor = !1),
  339. b.wrapper = b.container.children("." + b.params.wrapperClass),
  340. b.params.pagination && (b.paginationContainer = a(b.params.pagination), b.params.uniqueNavElements && "string" == typeof b.params.pagination && b.paginationContainer.length > 1 && 1 === b.container.find(b.params.pagination).length && (b.paginationContainer = b.container.find(b.params.pagination)), "bullets" === b.params.paginationType && b.params.paginationClickable ? b.paginationContainer.addClass("swiper-pagination-clickable") : b.params.paginationClickable = !1, b.paginationContainer.addClass("swiper-pagination-" + b.params.paginationType)),
  341. (b.params.nextButton || b.params.prevButton) && (b.params.nextButton && (b.nextButton = a(b.params.nextButton), b.params.uniqueNavElements && "string" == typeof b.params.nextButton && b.nextButton.length > 1 && 1 === b.container.find(b.params.nextButton).length && (b.nextButton = b.container.find(b.params.nextButton))), b.params.prevButton && (b.prevButton = a(b.params.prevButton), b.params.uniqueNavElements && "string" == typeof b.params.prevButton && b.prevButton.length > 1 && 1 === b.container.find(b.params.prevButton).length && (b.prevButton = b.container.find(b.params.prevButton)))),
  342. b.isHorizontal = function() {
  343. return "horizontal" === b.params.direction
  344. },
  345. b.rtl = b.isHorizontal() && ("rtl" === b.container[0].dir.toLowerCase() || "rtl" === b.container.css("direction")),
  346. b.rtl && b.classNames.push("list-guanggaowei-rtl"),
  347. b.rtl && (b.wrongRTL = "-webkit-box" === b.wrapper.css("display")),
  348. b.params.slidesPerColumn > 1 && b.classNames.push("list-guanggaowei-multirow"),
  349. b.device.android && b.classNames.push("list-guanggaowei-android"),
  350. b.container.addClass(b.classNames.join(" ")),
  351. b.translate = 0,
  352. b.progress = 0,
  353. b.velocity = 0,
  354. b.lockSwipeToNext = function() {
  355. b.params.allowSwipeToNext = !1
  356. },
  357. b.lockSwipeToPrev = function() {
  358. b.params.allowSwipeToPrev = !1
  359. },
  360. b.lockSwipes = function() {
  361. b.params.allowSwipeToNext = b.params.allowSwipeToPrev = !1
  362. },
  363. b.unlockSwipeToNext = function() {
  364. b.params.allowSwipeToNext = !0
  365. },
  366. b.unlockSwipeToPrev = function() {
  367. b.params.allowSwipeToPrev = !0
  368. },
  369. b.unlockSwipes = function() {
  370. b.params.allowSwipeToNext = b.params.allowSwipeToPrev = !0
  371. },
  372. b.params.grabCursor && (b.container[0].style.cursor = "move", b.container[0].style.cursor = "-webkit-grab", b.container[0].style.cursor = "-moz-grab", b.container[0].style.cursor = "grab"),
  373. b.imagesToLoad = [],
  374. b.imagesLoaded = 0,
  375. b.loadImage = function(e, a, t, r, i) {
  376. function s() {
  377. i && i()
  378. }
  379. var n;
  380. e.complete && r ? s() : a ? (n = new window.Image, n.onload = s, n.onerror = s, t && (n.srcset = t), a && (n.src = a)) : s()
  381. },
  382. b.preloadImages = function() {
  383. function e() {
  384. "undefined" != typeof b && null !== b && (void 0 !== b.imagesLoaded && b.imagesLoaded++, b.imagesLoaded === b.imagesToLoad.length && (b.params.updateOnImagesReady && b.update(), b.emit("onImagesReady", b)))
  385. }
  386. b.imagesToLoad = b.container.find("img");
  387. for (var a = 0; a < b.imagesToLoad.length; a++) b.loadImage(b.imagesToLoad[a], b.imagesToLoad[a].currentSrc || b.imagesToLoad[a].getAttribute("src"), b.imagesToLoad[a].srcset || b.imagesToLoad[a].getAttribute("srcset"), !0, e)
  388. },
  389. b.autoplayTimeoutId = void 0,
  390. b.autoplaying = !1,
  391. b.autoplayPaused = !1,
  392. b.startAutoplay = function() {
  393. return "undefined" != typeof b.autoplayTimeoutId ? !1 : b.params.autoplay ? b.autoplaying ? !1 : (b.autoplaying = !0, b.emit("onAutoplayStart", b), void n()) : !1
  394. },
  395. b.stopAutoplay = function(e) {
  396. b.autoplayTimeoutId && (b.autoplayTimeoutId && clearTimeout(b.autoplayTimeoutId), b.autoplaying = !1, b.autoplayTimeoutId = void 0, b.emit("onAutoplayStop", b))
  397. },
  398. b.pauseAutoplay = function(e) {
  399. b.autoplayPaused || (b.autoplayTimeoutId && clearTimeout(b.autoplayTimeoutId), b.autoplayPaused = !0, 0 === e ? (b.autoplayPaused = !1, n()) : b.wrapper.transitionEnd(function() {
  400. b && (b.autoplayPaused = !1, b.autoplaying ? n() : b.stopAutoplay())
  401. }))
  402. },
  403. b.minTranslate = function() {
  404. return - b.snapGrid[0]
  405. },
  406. b.maxTranslate = function() {
  407. return - b.snapGrid[b.snapGrid.length - 1]
  408. },
  409. b.updateAutoHeight = function() {
  410. var e = b.slides.eq(b.activeIndex)[0];
  411. if ("undefined" != typeof e) {
  412. var a = e.offsetHeight;
  413. a && b.wrapper.css("height", a + "px")
  414. }
  415. },
  416. b.updateContainerSize = function() {
  417. var e, a;
  418. e = "undefined" != typeof b.params.width ? b.params.width: b.container[0].clientWidth,
  419. a = "undefined" != typeof b.params.height ? b.params.height: b.container[0].clientHeight,
  420. 0 === e && b.isHorizontal() || 0 === a && !b.isHorizontal() || (e = e - parseInt(b.container.css("padding-left"), 10) - parseInt(b.container.css("padding-right"), 10), a = a - parseInt(b.container.css("padding-top"), 10) - parseInt(b.container.css("padding-bottom"), 10), b.width = e, b.height = a, b.size = b.isHorizontal() ? b.width: b.height)
  421. },
  422. b.updateSlidesSize = function() {
  423. b.slides = b.wrapper.children("." + b.params.slideClass),
  424. b.snapGrid = [],
  425. b.slidesGrid = [],
  426. b.slidesSizesGrid = [];
  427. var e, a = b.params.spaceBetween,
  428. t = -b.params.slidesOffsetBefore,
  429. r = 0,
  430. i = 0;
  431. if ("undefined" != typeof b.size) {
  432. "string" == typeof a && a.indexOf("%") >= 0 && (a = parseFloat(a.replace("%", "")) / 100 * b.size),
  433. b.virtualSize = -a,
  434. b.rtl ? b.slides.css({
  435. marginLeft: "",
  436. marginTop: ""
  437. }) : b.slides.css({
  438. marginRight: "",
  439. marginBottom: ""
  440. });
  441. var n;
  442. b.params.slidesPerColumn > 1 && (n = Math.floor(b.slides.length / b.params.slidesPerColumn) === b.slides.length / b.params.slidesPerColumn ? b.slides.length: Math.ceil(b.slides.length / b.params.slidesPerColumn) * b.params.slidesPerColumn, "auto" !== b.params.slidesPerView && "row" === b.params.slidesPerColumnFill && (n = Math.max(n, b.params.slidesPerView * b.params.slidesPerColumn)));
  443. var o, l = b.params.slidesPerColumn,
  444. p = n / l,
  445. d = p - (b.params.slidesPerColumn * p - b.slides.length);
  446. for (e = 0; e < b.slides.length; e++) {
  447. o = 0;
  448. var u = b.slides.eq(e);
  449. if (b.params.slidesPerColumn > 1) {
  450. var c, m, h;
  451. "column" === b.params.slidesPerColumnFill ? (m = Math.floor(e / l), h = e - m * l, (m > d || m === d && h === l - 1) && ++h >= l && (h = 0, m++), c = m + h * n / l, u.css({
  452. "-webkit-box-ordinal-group": c,
  453. "-moz-box-ordinal-group": c,
  454. "-ms-flex-order": c,
  455. "-webkit-order": c,
  456. order: c
  457. })) : (h = Math.floor(e / p), m = e - h * p),
  458. u.css({
  459. "margin-top": 0 !== h && b.params.spaceBetween && b.params.spaceBetween + "px"
  460. }).attr("data-swiper-column", m).attr("data-swiper-row", h)
  461. }
  462. "none" !== u.css("display") && ("auto" === b.params.slidesPerView ? (o = b.isHorizontal() ? u.outerWidth(!0) : u.outerHeight(!0), b.params.roundLengths && (o = s(o))) : (o = (b.size - (b.params.slidesPerView - 1) * a) / b.params.slidesPerView, b.params.roundLengths && (o = s(o)), b.isHorizontal() ? b.slides[e].style.width = o + "px": b.slides[e].style.height = o + "px"), b.slides[e].swiperSlideSize = o, b.slidesSizesGrid.push(o), b.params.centeredSlides ? (t = t + o / 2 + r / 2 + a, 0 === e && (t = t - b.size / 2 - a), Math.abs(t) < .001 && (t = 0), i % b.params.slidesPerGroup === 0 && b.snapGrid.push(t), b.slidesGrid.push(t)) : (i % b.params.slidesPerGroup === 0 && b.snapGrid.push(t), b.slidesGrid.push(t), t = t + o + a), b.virtualSize += o + a, r = o, i++)
  463. }
  464. b.virtualSize = Math.max(b.virtualSize, b.size) + b.params.slidesOffsetAfter;
  465. var f;
  466. if (b.rtl && b.wrongRTL && ("slide" === b.params.effect || "coverflow" === b.params.effect) && b.wrapper.css({
  467. width: b.virtualSize + b.params.spaceBetween + "px"
  468. }), (!b.support.flexbox || b.params.setWrapperSize) && (b.isHorizontal() ? b.wrapper.css({
  469. width: b.virtualSize + b.params.spaceBetween + "px"
  470. }) : b.wrapper.css({
  471. height: b.virtualSize + b.params.spaceBetween + "px"
  472. })), b.params.slidesPerColumn > 1 && (b.virtualSize = (o + b.params.spaceBetween) * n, b.virtualSize = Math.ceil(b.virtualSize / b.params.slidesPerColumn) - b.params.spaceBetween, b.wrapper.css({
  473. width: b.virtualSize + b.params.spaceBetween + "px"
  474. }), b.params.centeredSlides)) {
  475. for (f = [], e = 0; e < b.snapGrid.length; e++) b.snapGrid[e] < b.virtualSize + b.snapGrid[0] && f.push(b.snapGrid[e]);
  476. b.snapGrid = f
  477. }
  478. if (!b.params.centeredSlides) {
  479. for (f = [], e = 0; e < b.snapGrid.length; e++) b.snapGrid[e] <= b.virtualSize - b.size && f.push(b.snapGrid[e]);
  480. b.snapGrid = f,
  481. Math.floor(b.virtualSize - b.size) - Math.floor(b.snapGrid[b.snapGrid.length - 1]) > 1 && b.snapGrid.push(b.virtualSize - b.size)
  482. }
  483. 0 === b.snapGrid.length && (b.snapGrid = [0]),
  484. 0 !== b.params.spaceBetween && (b.isHorizontal() ? b.rtl ? b.slides.css({
  485. marginLeft: a + "px"
  486. }) : b.slides.css({
  487. marginRight: a + "px"
  488. }) : b.slides.css({
  489. marginBottom: a + "px"
  490. })),
  491. b.params.watchSlidesProgress && b.updateSlidesOffset()
  492. }
  493. },
  494. b.updateSlidesOffset = function() {
  495. for (var e = 0; e < b.slides.length; e++) b.slides[e].swiperSlideOffset = b.isHorizontal() ? b.slides[e].offsetLeft: b.slides[e].offsetTop
  496. },
  497. b.updateSlidesProgress = function(e) {
  498. if ("undefined" == typeof e && (e = b.translate || 0), 0 !== b.slides.length) {
  499. "undefined" == typeof b.slides[0].swiperSlideOffset && b.updateSlidesOffset();
  500. var a = -e;
  501. b.rtl && (a = e),
  502. b.slides.removeClass(b.params.slideVisibleClass);
  503. for (var t = 0; t < b.slides.length; t++) {
  504. var r = b.slides[t],
  505. i = (a - r.swiperSlideOffset) / (r.swiperSlideSize + b.params.spaceBetween);
  506. if (b.params.watchSlidesVisibility) {
  507. var s = -(a - r.swiperSlideOffset),
  508. n = s + b.slidesSizesGrid[t],
  509. o = s >= 0 && s < b.size || n > 0 && n <= b.size || 0 >= s && n >= b.size;
  510. o && b.slides.eq(t).addClass(b.params.slideVisibleClass)
  511. }
  512. r.progress = b.rtl ? -i: i
  513. }
  514. }
  515. },
  516. b.updateProgress = function(e) {
  517. "undefined" == typeof e && (e = b.translate || 0);
  518. var a = b.maxTranslate() - b.minTranslate(),
  519. t = b.isBeginning,
  520. r = b.isEnd;
  521. 0 === a ? (b.progress = 0, b.isBeginning = b.isEnd = !0) : (b.progress = (e - b.minTranslate()) / a, b.isBeginning = b.progress <= 0, b.isEnd = b.progress >= 1),
  522. b.isBeginning && !t && b.emit("onReachBeginning", b),
  523. b.isEnd && !r && b.emit("onReachEnd", b),
  524. b.params.watchSlidesProgress && b.updateSlidesProgress(e),
  525. b.emit("onProgress", b, b.progress)
  526. },
  527. b.updateActiveIndex = function() {
  528. var e, a, t, r = b.rtl ? b.translate: -b.translate;
  529. for (a = 0; a < b.slidesGrid.length; a++)"undefined" != typeof b.slidesGrid[a + 1] ? r >= b.slidesGrid[a] && r < b.slidesGrid[a + 1] - (b.slidesGrid[a + 1] - b.slidesGrid[a]) / 2 ? e = a: r >= b.slidesGrid[a] && r < b.slidesGrid[a + 1] && (e = a + 1) : r >= b.slidesGrid[a] && (e = a); (0 > e || "undefined" == typeof e) && (e = 0),
  530. t = Math.floor(e / b.params.slidesPerGroup),
  531. t >= b.snapGrid.length && (t = b.snapGrid.length - 1),
  532. e !== b.activeIndex && (b.snapIndex = t, b.previousIndex = b.activeIndex, b.activeIndex = e, b.updateClasses())
  533. },
  534. b.updateClasses = function() {
  535. b.slides.removeClass(b.params.slideActiveClass + " " + b.params.slideNextClass + " " + b.params.slidePrevClass);
  536. var e = b.slides.eq(b.activeIndex);
  537. e.addClass(b.params.slideActiveClass);
  538. var t = e.next("." + b.params.slideClass).addClass(b.params.slideNextClass);
  539. b.params.loop && 0 === t.length && b.slides.eq(0).addClass(b.params.slideNextClass);
  540. var r = e.prev("." + b.params.slideClass).addClass(b.params.slidePrevClass);
  541. if (b.params.loop && 0 === r.length && b.slides.eq( - 1).addClass(b.params.slidePrevClass), b.paginationContainer && b.paginationContainer.length > 0) {
  542. var i, s = b.params.loop ? Math.ceil((b.slides.length - 2 * b.loopedSlides) / b.params.slidesPerGroup) : b.snapGrid.length;
  543. if (b.params.loop ? (i = Math.ceil((b.activeIndex - b.loopedSlides) / b.params.slidesPerGroup), i > b.slides.length - 1 - 2 * b.loopedSlides && (i -= b.slides.length - 2 * b.loopedSlides), i > s - 1 && (i -= s), 0 > i && "bullets" !== b.params.paginationType && (i = s + i)) : i = "undefined" != typeof b.snapIndex ? b.snapIndex: b.activeIndex || 0, "bullets" === b.params.paginationType && b.bullets && b.bullets.length > 0 && (b.bullets.removeClass(b.params.bulletActiveClass), b.paginationContainer.length > 1 ? b.bullets.each(function() {
  544. a(this).index() === i && a(this).addClass(b.params.bulletActiveClass)
  545. }) : b.bullets.eq(i).addClass(b.params.bulletActiveClass)), "fraction" === b.params.paginationType && (b.paginationContainer.find("." + b.params.paginationCurrentClass).text(i + 1), b.paginationContainer.find("." + b.params.paginationTotalClass).text(s)), "progress" === b.params.paginationType) {
  546. var n = (i + 1) / s,
  547. o = n,
  548. l = 1;
  549. b.isHorizontal() || (l = n, o = 1),
  550. b.paginationContainer.find("." + b.params.paginationProgressbarClass).transform("translate3d(0,0,0) scaleX(" + o + ") scaleY(" + l + ")").transition(b.params.speed)
  551. }
  552. "custom" === b.params.paginationType && b.params.paginationCustomRender && (b.paginationContainer.html(b.params.paginationCustomRender(b, i + 1, s)), b.emit("onPaginationRendered", b, b.paginationContainer[0]))
  553. }
  554. b.params.loop || (b.params.prevButton && b.prevButton && b.prevButton.length > 0 && (b.isBeginning ? (b.prevButton.addClass(b.params.buttonDisabledClass), b.params.a11y && b.a11y && b.a11y.disable(b.prevButton)) : (b.prevButton.removeClass(b.params.buttonDisabledClass), b.params.a11y && b.a11y && b.a11y.enable(b.prevButton))), b.params.nextButton && b.nextButton && b.nextButton.length > 0 && (b.isEnd ? (b.nextButton.addClass(b.params.buttonDisabledClass), b.params.a11y && b.a11y && b.a11y.disable(b.nextButton)) : (b.nextButton.removeClass(b.params.buttonDisabledClass), b.params.a11y && b.a11y && b.a11y.enable(b.nextButton))))
  555. },
  556. b.updatePagination = function() {
  557. if (b.params.pagination && b.paginationContainer && b.paginationContainer.length > 0) {
  558. var e = "";
  559. if ("bullets" === b.params.paginationType) {
  560. for (var a = b.params.loop ? Math.ceil((b.slides.length - 2 * b.loopedSlides) / b.params.slidesPerGroup) : b.snapGrid.length, t = 0; a > t; t++) e += b.params.paginationBulletRender ? b.params.paginationBulletRender(t, b.params.bulletClass) : "<" + b.params.paginationElement + ' class="' + b.params.bulletClass + '"></' + b.params.paginationElement + ">";
  561. b.paginationContainer.html(e),
  562. b.bullets = b.paginationContainer.find("." + b.params.bulletClass),
  563. b.params.paginationClickable && b.params.a11y && b.a11y && b.a11y.initPagination()
  564. }
  565. "fraction" === b.params.paginationType && (e = b.params.paginationFractionRender ? b.params.paginationFractionRender(b, b.params.paginationCurrentClass, b.params.paginationTotalClass) : '<span class="' + b.params.paginationCurrentClass + '"></span> / <span class="' + b.params.paginationTotalClass + '"></span>', b.paginationContainer.html(e)),
  566. "progress" === b.params.paginationType && (e = b.params.paginationProgressRender ? b.params.paginationProgressRender(b, b.params.paginationProgressbarClass) : '<span class="' + b.params.paginationProgressbarClass + '"></span>', b.paginationContainer.html(e)),
  567. "custom" !== b.params.paginationType && b.emit("onPaginationRendered", b, b.paginationContainer[0])
  568. }
  569. },
  570. b.update = function(e) {
  571. function a() {
  572. r = Math.min(Math.max(b.translate, b.maxTranslate()), b.minTranslate()),
  573. b.setWrapperTranslate(r),
  574. b.updateActiveIndex(),
  575. b.updateClasses()
  576. }
  577. if (b.updateContainerSize(), b.updateSlidesSize(), b.updateProgress(), b.updatePagination(), b.updateClasses(), b.params.scrollbar && b.scrollbar && b.scrollbar.set(), e) {
  578. var t, r;
  579. b.controller && b.controller.spline && (b.controller.spline = void 0),
  580. b.params.freeMode ? (a(), b.params.autoHeight && b.updateAutoHeight()) : (t = ("auto" === b.params.slidesPerView || b.params.slidesPerView > 1) && b.isEnd && !b.params.centeredSlides ? b.slideTo(b.slides.length - 1, 0, !1, !0) : b.slideTo(b.activeIndex, 0, !1, !0), t || a())
  581. } else b.params.autoHeight && b.updateAutoHeight()
  582. },
  583. b.onResize = function(e) {
  584. b.params.breakpoints && b.setBreakpoint();
  585. var a = b.params.allowSwipeToPrev,
  586. t = b.params.allowSwipeToNext;
  587. b.params.allowSwipeToPrev = b.params.allowSwipeToNext = !0,
  588. b.updateContainerSize(),
  589. b.updateSlidesSize(),
  590. ("auto" === b.params.slidesPerView || b.params.freeMode || e) && b.updatePagination(),
  591. b.params.scrollbar && b.scrollbar && b.scrollbar.set(),
  592. b.controller && b.controller.spline && (b.controller.spline = void 0);
  593. var r = !1;
  594. if (b.params.freeMode) {
  595. var i = Math.min(Math.max(b.translate, b.maxTranslate()), b.minTranslate());
  596. b.setWrapperTranslate(i),
  597. b.updateActiveIndex(),
  598. b.updateClasses(),
  599. b.params.autoHeight && b.updateAutoHeight()
  600. } else b.updateClasses(),
  601. r = ("auto" === b.params.slidesPerView || b.params.slidesPerView > 1) && b.isEnd && !b.params.centeredSlides ? b.slideTo(b.slides.length - 1, 0, !1, !0) : b.slideTo(b.activeIndex, 0, !1, !0);
  602. b.params.lazyLoading && !r && b.lazy && b.lazy.load(),
  603. b.params.allowSwipeToPrev = a,
  604. b.params.allowSwipeToNext = t
  605. };
  606. var T = ["mousedown", "mousemove", "mouseup"];
  607. window.navigator.pointerEnabled ? T = ["pointerdown", "pointermove", "pointerup"] : window.navigator.msPointerEnabled && (T = ["MSPointerDown", "MSPointerMove", "MSPointerUp"]),
  608. b.touchEvents = {
  609. start: b.support.touch || !b.params.simulateTouch ? "touchstart": T[0],
  610. move: b.support.touch || !b.params.simulateTouch ? "touchmove": T[1],
  611. end: b.support.touch || !b.params.simulateTouch ? "touchend": T[2]
  612. },
  613. (window.navigator.pointerEnabled || window.navigator.msPointerEnabled) && ("container" === b.params.touchEventsTarget ? b.container: b.wrapper).addClass("swiper-wp8-" + b.params.direction),
  614. b.initEvents = function(e) {
  615. var a = e ? "off": "on",
  616. t = e ? "removeEventListener": "addEventListener",
  617. r = "container" === b.params.touchEventsTarget ? b.container[0] : b.wrapper[0],
  618. s = b.support.touch ? r: document,
  619. n = b.params.nested ? !0 : !1;
  620. b.browser.ie ? (r[t](b.touchEvents.start, b.onTouchStart, !1), s[t](b.touchEvents.move, b.onTouchMove, n), s[t](b.touchEvents.end, b.onTouchEnd, !1)) : (b.support.touch && (r[t](b.touchEvents.start, b.onTouchStart, !1), r[t](b.touchEvents.move, b.onTouchMove, n), r[t](b.touchEvents.end, b.onTouchEnd, !1)), !i.simulateTouch || b.device.ios || b.device.android || (r[t]("mousedown", b.onTouchStart, !1), document[t]("mousemove", b.onTouchMove, n), document[t]("mouseup", b.onTouchEnd, !1))),
  621. window[t]("resize", b.onResize),
  622. b.params.nextButton && b.nextButton && b.nextButton.length > 0 && (b.nextButton[a]("click", b.onClickNext), b.params.a11y && b.a11y && b.nextButton[a]("keydown", b.a11y.onEnterKey)),
  623. b.params.prevButton && b.prevButton && b.prevButton.length > 0 && (b.prevButton[a]("click", b.onClickPrev), b.params.a11y && b.a11y && b.prevButton[a]("keydown", b.a11y.onEnterKey)),
  624. b.params.pagination && b.params.paginationClickable && (b.paginationContainer[a]("click", "." + b.params.bulletClass, b.onClickIndex), b.params.a11y && b.a11y && b.paginationContainer[a]("keydown", "." + b.params.bulletClass, b.a11y.onEnterKey)),
  625. (b.params.preventClicks || b.params.preventClicksPropagation) && r[t]("click", b.preventClicks, !0)
  626. },
  627. b.attachEvents = function() {
  628. b.initEvents()
  629. },
  630. b.detachEvents = function() {
  631. b.initEvents(!0)
  632. },
  633. b.allowClick = !0,
  634. b.preventClicks = function(e) {
  635. b.allowClick || (b.params.preventClicks && e.preventDefault(), b.params.preventClicksPropagation && b.animating && (e.stopPropagation(), e.stopImmediatePropagation()))
  636. },
  637. b.onClickNext = function(e) {
  638. e.preventDefault(),
  639. (!b.isEnd || b.params.loop) && b.slideNext()
  640. },
  641. b.onClickPrev = function(e) {
  642. e.preventDefault(),
  643. (!b.isBeginning || b.params.loop) && b.slidePrev()
  644. },
  645. b.onClickIndex = function(e) {
  646. e.preventDefault();
  647. var t = a(this).index() * b.params.slidesPerGroup;
  648. b.params.loop && (t += b.loopedSlides),
  649. b.slideTo(t)
  650. },
  651. b.updateClickedSlide = function(e) {
  652. var t = o(e, "." + b.params.slideClass),
  653. r = !1;
  654. if (t) for (var i = 0; i < b.slides.length; i++) b.slides[i] === t && (r = !0);
  655. if (!t || !r) return b.clickedSlide = void 0,
  656. void(b.clickedIndex = void 0);
  657. if (b.clickedSlide = t, b.clickedIndex = a(t).index(), b.params.slideToClickedSlide && void 0 !== b.clickedIndex && b.clickedIndex !== b.activeIndex) {
  658. var s, n = b.clickedIndex;
  659. if (b.params.loop) {
  660. if (b.animating) return;
  661. s = a(b.clickedSlide).attr("data-swiper-slide-index"),
  662. b.params.centeredSlides ? n < b.loopedSlides - b.params.slidesPerView / 2 || n > b.slides.length - b.loopedSlides + b.params.slidesPerView / 2 ? (b.fixLoop(), n = b.wrapper.children("." + b.params.slideClass + '[data-swiper-slide-index="' + s + '"]:not(.swiper-slide-duplicate)').eq(0).index(), setTimeout(function() {
  663. b.slideTo(n)
  664. },
  665. 0)) : b.slideTo(n) : n > b.slides.length - b.params.slidesPerView ? (b.fixLoop(), n = b.wrapper.children("." + b.params.slideClass + '[data-swiper-slide-index="' + s + '"]:not(.swiper-slide-duplicate)').eq(0).index(), setTimeout(function() {
  666. b.slideTo(n)
  667. },
  668. 0)) : b.slideTo(n)
  669. } else b.slideTo(n)
  670. }
  671. };
  672. var S, C, z, M, E, P, k, I, L, B, D = "input, select, textarea, button",
  673. H = Date.now(),
  674. A = [];
  675. b.animating = !1,
  676. b.touches = {
  677. startX: 0,
  678. startY: 0,
  679. currentX: 0,
  680. currentY: 0,
  681. diff: 0
  682. };
  683. var G, O;
  684. if (b.onTouchStart = function(e) {
  685. if (e.originalEvent && (e = e.originalEvent), G = "touchstart" === e.type, G || !("which" in e) || 3 !== e.which) {
  686. if (b.params.noSwiping && o(e, "." + b.params.noSwipingClass)) return void(b.allowClick = !0);
  687. if (!b.params.swipeHandler || o(e, b.params.swipeHandler)) {
  688. var t = b.touches.currentX = "touchstart" === e.type ? e.targetTouches[0].pageX: e.pageX,
  689. r = b.touches.currentY = "touchstart" === e.type ? e.targetTouches[0].pageY: e.pageY;
  690. if (! (b.device.ios && b.params.iOSEdgeSwipeDetection && t <= b.params.iOSEdgeSwipeThreshold)) {
  691. if (S = !0, C = !1, z = !0, E = void 0, O = void 0, b.touches.startX = t, b.touches.startY = r, M = Date.now(), b.allowClick = !0, b.updateContainerSize(), b.swipeDirection = void 0, b.params.threshold > 0 && (I = !1), "touchstart" !== e.type) {
  692. var i = !0;
  693. a(e.target).is(D) && (i = !1),
  694. document.activeElement && a(document.activeElement).is(D) && document.activeElement.blur(),
  695. i && e.preventDefault()
  696. }
  697. b.emit("onTouchStart", b, e)
  698. }
  699. }
  700. }
  701. },
  702. b.onTouchMove = function(e) {
  703. if (e.originalEvent && (e = e.originalEvent), !G || "mousemove" !== e.type) {
  704. if (e.preventedByNestedSwiper) return b.touches.startX = "touchmove" === e.type ? e.targetTouches[0].pageX: e.pageX,
  705. void(b.touches.startY = "touchmove" === e.type ? e.targetTouches[0].pageY: e.pageY);
  706. if (b.params.onlyExternal) return b.allowClick = !1,
  707. void(S && (b.touches.startX = b.touches.currentX = "touchmove" === e.type ? e.targetTouches[0].pageX: e.pageX, b.touches.startY = b.touches.currentY = "touchmove" === e.type ? e.targetTouches[0].pageY: e.pageY, M = Date.now()));
  708. if (G && document.activeElement && e.target === document.activeElement && a(e.target).is(D)) return C = !0,
  709. void(b.allowClick = !1);
  710. if (z && b.emit("onTouchMove", b, e), !(e.targetTouches && e.targetTouches.length > 1)) {
  711. if (b.touches.currentX = "touchmove" === e.type ? e.targetTouches[0].pageX: e.pageX, b.touches.currentY = "touchmove" === e.type ? e.targetTouches[0].pageY: e.pageY, "undefined" == typeof E) {
  712. var t = 180 * Math.atan2(Math.abs(b.touches.currentY - b.touches.startY), Math.abs(b.touches.currentX - b.touches.startX)) / Math.PI;
  713. E = b.isHorizontal() ? t > b.params.touchAngle: 90 - t > b.params.touchAngle
  714. }
  715. if (E && b.emit("onTouchMoveOpposite", b, e), "undefined" == typeof O && b.browser.ieTouch && (b.touches.currentX !== b.touches.startX || b.touches.currentY !== b.touches.startY) && (O = !0), S) {
  716. if (E) return void(S = !1);
  717. if (O || !b.browser.ieTouch) {
  718. b.allowClick = !1,
  719. b.emit("onSliderMove", b, e),
  720. e.preventDefault(),
  721. b.params.touchMoveStopPropagation && !b.params.nested && e.stopPropagation(),
  722. C || (i.loop && b.fixLoop(), k = b.getWrapperTranslate(), b.setWrapperTransition(0), b.animating && b.wrapper.trigger("webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd"), b.params.autoplay && b.autoplaying && (b.params.autoplayDisableOnInteraction ? b.stopAutoplay() : b.pauseAutoplay()), B = !1, b.params.grabCursor && (b.container[0].style.cursor = "move", b.container[0].style.cursor = "-webkit-grabbing", b.container[0].style.cursor = "-moz-grabbin", b.container[0].style.cursor = "grabbing")),
  723. C = !0;
  724. var r = b.touches.diff = b.isHorizontal() ? b.touches.currentX - b.touches.startX: b.touches.currentY - b.touches.startY;
  725. r *= b.params.touchRatio,
  726. b.rtl && (r = -r),
  727. b.swipeDirection = r > 0 ? "prev": "next",
  728. P = r + k;
  729. var s = !0;
  730. if (r > 0 && P > b.minTranslate() ? (s = !1, b.params.resistance && (P = b.minTranslate() - 1 + Math.pow( - b.minTranslate() + k + r, b.params.resistanceRatio))) : 0 > r && P < b.maxTranslate() && (s = !1, b.params.resistance && (P = b.maxTranslate() + 1 - Math.pow(b.maxTranslate() - k - r, b.params.resistanceRatio))), s && (e.preventedByNestedSwiper = !0), !b.params.allowSwipeToNext && "next" === b.swipeDirection && k > P && (P = k), !b.params.allowSwipeToPrev && "prev" === b.swipeDirection && P > k && (P = k), b.params.followFinger) {
  731. if (b.params.threshold > 0) {
  732. if (! (Math.abs(r) > b.params.threshold || I)) return void(P = k);
  733. if (!I) return I = !0,
  734. b.touches.startX = b.touches.currentX,
  735. b.touches.startY = b.touches.currentY,
  736. P = k,
  737. void(b.touches.diff = b.isHorizontal() ? b.touches.currentX - b.touches.startX: b.touches.currentY - b.touches.startY)
  738. } (b.params.freeMode || b.params.watchSlidesProgress) && b.updateActiveIndex(),
  739. b.params.freeMode && (0 === A.length && A.push({
  740. position: b.touches[b.isHorizontal() ? "startX": "startY"],
  741. time: M
  742. }), A.push({
  743. position: b.touches[b.isHorizontal() ? "currentX": "currentY"],
  744. time: (new window.Date).getTime()
  745. })),
  746. b.updateProgress(P),
  747. b.setWrapperTranslate(P)
  748. }
  749. }
  750. }
  751. }
  752. }
  753. },
  754. b.onTouchEnd = function(e) {
  755. if (e.originalEvent && (e = e.originalEvent), z && b.emit("onTouchEnd", b, e), z = !1, S) {
  756. b.params.grabCursor && C && S && (b.container[0].style.cursor = "move", b.container[0].style.cursor = "-webkit-grab", b.container[0].style.cursor = "-moz-grab", b.container[0].style.cursor = "grab");
  757. var t = Date.now(),
  758. r = t - M;
  759. if (b.allowClick && (b.updateClickedSlide(e), b.emit("onTap", b, e), 300 > r && t - H > 300 && (L && clearTimeout(L), L = setTimeout(function() {
  760. b && (b.params.paginationHide && b.paginationContainer.length > 0 && !a(e.target).hasClass(b.params.bulletClass) && b.paginationContainer.toggleClass(b.params.paginationHiddenClass), b.emit("onClick", b, e))
  761. },
  762. 300)), 300 > r && 300 > t - H && (L && clearTimeout(L), b.emit("onDoubleTap", b, e))), H = Date.now(), setTimeout(function() {
  763. b && (b.allowClick = !0)
  764. },
  765. 0), !S || !C || !b.swipeDirection || 0 === b.touches.diff || P === k) return void(S = C = !1);
  766. S = C = !1;
  767. var i;
  768. if (i = b.params.followFinger ? b.rtl ? b.translate: -b.translate: -P, b.params.freeMode) {
  769. if (i < -b.minTranslate()) return void b.slideTo(b.activeIndex);
  770. if (i > -b.maxTranslate()) return void(b.slides.length < b.snapGrid.length ? b.slideTo(b.snapGrid.length - 1) : b.slideTo(b.slides.length - 1));
  771. if (b.params.freeModeMomentum) {
  772. if (A.length > 1) {
  773. var s = A.pop(),
  774. n = A.pop(),
  775. o = s.position - n.position,
  776. l = s.time - n.time;
  777. b.velocity = o / l,
  778. b.velocity = b.velocity / 2,
  779. Math.abs(b.velocity) < b.params.freeModeMinimumVelocity && (b.velocity = 0),
  780. (l > 150 || (new window.Date).getTime() - s.time > 300) && (b.velocity = 0)
  781. } else b.velocity = 0;
  782. A.length = 0;
  783. var p = 1e3 * b.params.freeModeMomentumRatio,
  784. d = b.velocity * p,
  785. u = b.translate + d;
  786. b.rtl && (u = -u);
  787. var c, m = !1,
  788. h = 20 * Math.abs(b.velocity) * b.params.freeModeMomentumBounceRatio;
  789. if (u < b.maxTranslate()) b.params.freeModeMomentumBounce ? (u + b.maxTranslate() < -h && (u = b.maxTranslate() - h), c = b.maxTranslate(), m = !0, B = !0) : u = b.maxTranslate();
  790. else if (u > b.minTranslate()) b.params.freeModeMomentumBounce ? (u - b.minTranslate() > h && (u = b.minTranslate() + h), c = b.minTranslate(), m = !0, B = !0) : u = b.minTranslate();
  791. else if (b.params.freeModeSticky) {
  792. var f, g = 0;
  793. for (g = 0; g < b.snapGrid.length; g += 1) if (b.snapGrid[g] > -u) {
  794. f = g;
  795. break
  796. }
  797. u = Math.abs(b.snapGrid[f] - u) < Math.abs(b.snapGrid[f - 1] - u) || "next" === b.swipeDirection ? b.snapGrid[f] : b.snapGrid[f - 1],
  798. b.rtl || (u = -u)
  799. }
  800. if (0 !== b.velocity) p = b.rtl ? Math.abs(( - u - b.translate) / b.velocity) : Math.abs((u - b.translate) / b.velocity);
  801. else if (b.params.freeModeSticky) return void b.slideReset();
  802. b.params.freeModeMomentumBounce && m ? (b.updateProgress(c), b.setWrapperTransition(p), b.setWrapperTranslate(u), b.onTransitionStart(), b.animating = !0, b.wrapper.transitionEnd(function() {
  803. b && B && (b.emit("onMomentumBounce", b), b.setWrapperTransition(b.params.speed), b.setWrapperTranslate(c), b.wrapper.transitionEnd(function() {
  804. b && b.onTransitionEnd()
  805. }))
  806. })) : b.velocity ? (b.updateProgress(u), b.setWrapperTransition(p), b.setWrapperTranslate(u), b.onTransitionStart(), b.animating || (b.animating = !0, b.wrapper.transitionEnd(function() {
  807. b && b.onTransitionEnd()
  808. }))) : b.updateProgress(u),
  809. b.updateActiveIndex()
  810. }
  811. return void((!b.params.freeModeMomentum || r >= b.params.longSwipesMs) && (b.updateProgress(), b.updateActiveIndex()))
  812. }
  813. var v, w = 0,
  814. y = b.slidesSizesGrid[0];
  815. for (v = 0; v < b.slidesGrid.length; v += b.params.slidesPerGroup)"undefined" != typeof b.slidesGrid[v + b.params.slidesPerGroup] ? i >= b.slidesGrid[v] && i < b.slidesGrid[v + b.params.slidesPerGroup] && (w = v, y = b.slidesGrid[v + b.params.slidesPerGroup] - b.slidesGrid[v]) : i >= b.slidesGrid[v] && (w = v, y = b.slidesGrid[b.slidesGrid.length - 1] - b.slidesGrid[b.slidesGrid.length - 2]);
  816. var x = (i - b.slidesGrid[w]) / y;
  817. if (r > b.params.longSwipesMs) {
  818. if (!b.params.longSwipes) return void b.slideTo(b.activeIndex);
  819. "next" === b.swipeDirection && (x >= b.params.longSwipesRatio ? b.slideTo(w + b.params.slidesPerGroup) : b.slideTo(w)),
  820. "prev" === b.swipeDirection && (x > 1 - b.params.longSwipesRatio ? b.slideTo(w + b.params.slidesPerGroup) : b.slideTo(w))
  821. } else {
  822. if (!b.params.shortSwipes) return void b.slideTo(b.activeIndex);
  823. "next" === b.swipeDirection && b.slideTo(w + b.params.slidesPerGroup),
  824. "prev" === b.swipeDirection && b.slideTo(w)
  825. }
  826. }
  827. },
  828. b._slideTo = function(e, a) {
  829. return b.slideTo(e, a, !0, !0)
  830. },
  831. b.slideTo = function(e, a, t, r) {
  832. "undefined" == typeof t && (t = !0),
  833. "undefined" == typeof e && (e = 0),
  834. 0 > e && (e = 0),
  835. b.snapIndex = Math.floor(e / b.params.slidesPerGroup),
  836. b.snapIndex >= b.snapGrid.length && (b.snapIndex = b.snapGrid.length - 1);
  837. var i = -b.snapGrid[b.snapIndex];
  838. b.params.autoplay && b.autoplaying && (r || !b.params.autoplayDisableOnInteraction ? b.pauseAutoplay(a) : b.stopAutoplay()),
  839. b.updateProgress(i);
  840. for (var s = 0; s < b.slidesGrid.length; s++) - Math.floor(100 * i) >= Math.floor(100 * b.slidesGrid[s]) && (e = s);
  841. return ! b.params.allowSwipeToNext && i < b.translate && i < b.minTranslate() ? !1 : !b.params.allowSwipeToPrev && i > b.translate && i > b.maxTranslate() && (b.activeIndex || 0) !== e ? !1 : ("undefined" == typeof a && (a = b.params.speed), b.previousIndex = b.activeIndex || 0, b.activeIndex = e, b.rtl && -i === b.translate || !b.rtl && i === b.translate ? (b.params.autoHeight && b.updateAutoHeight(), b.updateClasses(), "slide" !== b.params.effect && b.setWrapperTranslate(i), !1) : (b.updateClasses(), b.onTransitionStart(t), 0 === a ? (b.setWrapperTranslate(i), b.setWrapperTransition(0), b.onTransitionEnd(t)) : (b.setWrapperTranslate(i), b.setWrapperTransition(a), b.animating || (b.animating = !0, b.wrapper.transitionEnd(function() {
  842. b && b.onTransitionEnd(t)
  843. }))), !0))
  844. },
  845. b.onTransitionStart = function(e) {
  846. "undefined" == typeof e && (e = !0),
  847. b.params.autoHeight && b.updateAutoHeight(),
  848. b.lazy && b.lazy.onTransitionStart(),
  849. e && (b.emit("onTransitionStart", b), b.activeIndex !== b.previousIndex && (b.emit("onSlideChangeStart", b), b.activeIndex > b.previousIndex ? b.emit("onSlideNextStart", b) : b.emit("onSlidePrevStart", b)))
  850. },
  851. b.onTransitionEnd = function(e) {
  852. b.animating = !1,
  853. b.setWrapperTransition(0),
  854. "undefined" == typeof e && (e = !0),
  855. b.lazy && b.lazy.onTransitionEnd(),
  856. e && (b.emit("onTransitionEnd", b), b.activeIndex !== b.previousIndex && (b.emit("onSlideChangeEnd", b), b.activeIndex > b.previousIndex ? b.emit("onSlideNextEnd", b) : b.emit("onSlidePrevEnd", b))),
  857. b.params.hashnav && b.hashnav && b.hashnav.setHash()
  858. },
  859. b.slideNext = function(e, a, t) {
  860. if (b.params.loop) {
  861. if (b.animating) return ! 1;
  862. b.fixLoop();
  863. b.container[0].clientLeft;
  864. return b.slideTo(b.activeIndex + b.params.slidesPerGroup, a, e, t)
  865. }
  866. return b.slideTo(b.activeIndex + b.params.slidesPerGroup, a, e, t)
  867. },
  868. b._slideNext = function(e) {
  869. return b.slideNext(!0, e, !0)
  870. },
  871. b.slidePrev = function(e, a, t) {
  872. if (b.params.loop) {
  873. if (b.animating) return ! 1;
  874. b.fixLoop();
  875. b.container[0].clientLeft;
  876. return b.slideTo(b.activeIndex - 1, a, e, t)
  877. }
  878. return b.slideTo(b.activeIndex - 1, a, e, t)
  879. },
  880. b._slidePrev = function(e) {
  881. return b.slidePrev(!0, e, !0)
  882. },
  883. b.slideReset = function(e, a, t) {
  884. return b.slideTo(b.activeIndex, a, e)
  885. },
  886. b.setWrapperTransition = function(e, a) {
  887. b.wrapper.transition(e),
  888. "slide" !== b.params.effect && b.effects[b.params.effect] && b.effects[b.params.effect].setTransition(e),
  889. b.params.parallax && b.parallax && b.parallax.setTransition(e),
  890. b.params.scrollbar && b.scrollbar && b.scrollbar.setTransition(e),
  891. b.params.control && b.controller && b.controller.setTransition(e, a),
  892. b.emit("onSetTransition", b, e)
  893. },
  894. b.setWrapperTranslate = function(e, a, t) {
  895. var r = 0,
  896. i = 0,
  897. n = 0;
  898. b.isHorizontal() ? r = b.rtl ? -e: e: i = e,
  899. b.params.roundLengths && (r = s(r), i = s(i)),
  900. b.params.virtualTranslate || (b.support.transforms3d ? b.wrapper.transform("translate3d(" + r + "px, " + i + "px, " + n + "px)") : b.wrapper.transform("translate(" + r + "px, " + i + "px)")),
  901. b.translate = b.isHorizontal() ? r: i;
  902. var o, l = b.maxTranslate() - b.minTranslate();
  903. o = 0 === l ? 0 : (e - b.minTranslate()) / l,
  904. o !== b.progress && b.updateProgress(e),
  905. a && b.updateActiveIndex(),
  906. "slide" !== b.params.effect && b.effects[b.params.effect] && b.effects[b.params.effect].setTranslate(b.translate),
  907. b.params.parallax && b.parallax && b.parallax.setTranslate(b.translate),
  908. b.params.scrollbar && b.scrollbar && b.scrollbar.setTranslate(b.translate),
  909. b.params.control && b.controller && b.controller.setTranslate(b.translate, t),
  910. b.emit("onSetTranslate", b, b.translate)
  911. },
  912. b.getTranslate = function(e, a) {
  913. var t, r, i, s;
  914. return "undefined" == typeof a && (a = "x"),
  915. b.params.virtualTranslate ? b.rtl ? -b.translate: b.translate: (i = window.getComputedStyle(e, null), window.WebKitCSSMatrix ? (r = i.transform || i.webkitTransform, r.split(",").length > 6 && (r = r.split(", ").map(function(e) {
  916. return e.replace(",", ".")
  917. }).join(", ")), s = new window.WebKitCSSMatrix("none" === r ? "": r)) : (s = i.MozTransform || i.OTransform || i.MsTransform || i.msTransform || i.transform || i.getPropertyValue("transform").replace("translate(", "matrix(1, 0, 0, 1,"), t = s.toString().split(",")), "x" === a && (r = window.WebKitCSSMatrix ? s.m41: 16 === t.length ? parseFloat(t[12]) : parseFloat(t[4])), "y" === a && (r = window.WebKitCSSMatrix ? s.m42: 16 === t.length ? parseFloat(t[13]) : parseFloat(t[5])), b.rtl && r && (r = -r), r || 0)
  918. },
  919. b.getWrapperTranslate = function(e) {
  920. return "undefined" == typeof e && (e = b.isHorizontal() ? "x": "y"),
  921. b.getTranslate(b.wrapper[0], e)
  922. },
  923. b.observers = [], b.initObservers = function() {
  924. if (b.params.observeParents) for (var e = b.container.parents(), a = 0; a < e.length; a++) l(e[a]);
  925. l(b.container[0], {
  926. childList: !1
  927. }),
  928. l(b.wrapper[0], {
  929. attributes: !1
  930. })
  931. },
  932. b.disconnectObservers = function() {
  933. for (var e = 0; e < b.observers.length; e++) b.observers[e].disconnect();
  934. b.observers = []
  935. },
  936. b.createLoop = function() {
  937. b.wrapper.children("." + b.params.slideClass + "." + b.params.slideDuplicateClass).remove();
  938. var e = b.wrapper.children("." + b.params.slideClass);
  939. "auto" !== b.params.slidesPerView || b.params.loopedSlides || (b.params.loopedSlides = e.length),
  940. b.loopedSlides = parseInt(b.params.loopedSlides || b.params.slidesPerView, 10),
  941. b.loopedSlides = b.loopedSlides + b.params.loopAdditionalSlides,
  942. b.loopedSlides > e.length && (b.loopedSlides = e.length);
  943. var t, r = [],
  944. i = [];
  945. for (e.each(function(t, s) {
  946. var n = a(this);
  947. t < b.loopedSlides && i.push(s),
  948. t < e.length && t >= e.length - b.loopedSlides && r.push(s),
  949. n.attr("data-swiper-slide-index", t)
  950. }), t = 0; t < i.length; t++) b.wrapper.append(a(i[t].cloneNode(!0)).addClass(b.params.slideDuplicateClass));
  951. for (t = r.length - 1; t >= 0; t--) b.wrapper.prepend(a(r[t].cloneNode(!0)).addClass(b.params.slideDuplicateClass))
  952. },
  953. b.destroyLoop = function() {
  954. b.wrapper.children("." + b.params.slideClass + "." + b.params.slideDuplicateClass).remove(),
  955. b.slides.removeAttr("data-swiper-slide-index")
  956. },
  957. b.reLoop = function(e) {
  958. var a = b.activeIndex - b.loopedSlides;
  959. b.destroyLoop(),
  960. b.createLoop(),
  961. b.updateSlidesSize(),
  962. e && b.slideTo(a + b.loopedSlides, 0, !1)
  963. },
  964. b.fixLoop = function() {
  965. var e;
  966. b.activeIndex < b.loopedSlides ? (e = b.slides.length - 3 * b.loopedSlides + b.activeIndex, e += b.loopedSlides, b.slideTo(e, 0, !1, !0)) : ("auto" === b.params.slidesPerView && b.activeIndex >= 2 * b.loopedSlides || b.activeIndex > b.slides.length - 2 * b.params.slidesPerView) && (e = -b.slides.length + b.activeIndex + b.loopedSlides, e += b.loopedSlides, b.slideTo(e, 0, !1, !0))
  967. },
  968. b.appendSlide = function(e) {
  969. if (b.params.loop && b.destroyLoop(), "object" == typeof e && e.length) for (var a = 0; a < e.length; a++) e[a] && b.wrapper.append(e[a]);
  970. else b.wrapper.append(e);
  971. b.params.loop && b.createLoop(),
  972. b.params.observer && b.support.observer || b.update(!0)
  973. },
  974. b.prependSlide = function(e) {
  975. b.params.loop && b.destroyLoop();
  976. var a = b.activeIndex + 1;
  977. if ("object" == typeof e && e.length) {
  978. for (var t = 0; t < e.length; t++) e[t] && b.wrapper.prepend(e[t]);
  979. a = b.activeIndex + e.length
  980. } else b.wrapper.prepend(e);
  981. b.params.loop && b.createLoop(),
  982. b.params.observer && b.support.observer || b.update(!0),
  983. b.slideTo(a, 0, !1)
  984. },
  985. b.removeSlide = function(e) {
  986. b.params.loop && (b.destroyLoop(), b.slides = b.wrapper.children("." + b.params.slideClass));
  987. var a, t = b.activeIndex;
  988. if ("object" == typeof e && e.length) {
  989. for (var r = 0; r < e.length; r++) a = e[r],
  990. b.slides[a] && b.slides.eq(a).remove(),
  991. t > a && t--;
  992. t = Math.max(t, 0)
  993. } else a = e,
  994. b.slides[a] && b.slides.eq(a).remove(),
  995. t > a && t--,
  996. t = Math.max(t, 0);
  997. b.params.loop && b.createLoop(),
  998. b.params.observer && b.support.observer || b.update(!0),
  999. b.params.loop ? b.slideTo(t + b.loopedSlides, 0, !1) : b.slideTo(t, 0, !1)
  1000. },
  1001. b.removeAllSlides = function() {
  1002. for (var e = [], a = 0; a < b.slides.length; a++) e.push(a);
  1003. b.removeSlide(e)
  1004. },
  1005. b.effects = {
  1006. fade: {
  1007. setTranslate: function() {
  1008. for (var e = 0; e < b.slides.length; e++) {
  1009. var a = b.slides.eq(e),
  1010. t = a[0].swiperSlideOffset,
  1011. r = -t;
  1012. b.params.virtualTranslate || (r -= b.translate);
  1013. var i = 0;
  1014. b.isHorizontal() || (i = r, r = 0);
  1015. var s = b.params.fade.crossFade ? Math.max(1 - Math.abs(a[0].progress), 0) : 1 + Math.min(Math.max(a[0].progress, -1), 0);
  1016. a.css({
  1017. opacity: s
  1018. }).transform("translate3d(" + r + "px, " + i + "px, 0px)")
  1019. }
  1020. },
  1021. setTransition: function(e) {
  1022. if (b.slides.transition(e), b.params.virtualTranslate && 0 !== e) {
  1023. var a = !1;
  1024. b.slides.transitionEnd(function() {
  1025. if (!a && b) {
  1026. a = !0,
  1027. b.animating = !1;
  1028. for (var e = ["webkitTransitionEnd", "transitionend", "oTransitionEnd", "MSTransitionEnd", "msTransitionEnd"], t = 0; t < e.length; t++) b.wrapper.trigger(e[t])
  1029. }
  1030. })
  1031. }
  1032. }
  1033. },
  1034. flip: {
  1035. setTranslate: function() {
  1036. for (var e = 0; e < b.slides.length; e++) {
  1037. var t = b.slides.eq(e),
  1038. r = t[0].progress;
  1039. b.params.flip.limitRotation && (r = Math.max(Math.min(t[0].progress, 1), -1));
  1040. var i = t[0].swiperSlideOffset,
  1041. s = -180 * r,
  1042. n = s,
  1043. o = 0,
  1044. l = -i,
  1045. p = 0;
  1046. if (b.isHorizontal() ? b.rtl && (n = -n) : (p = l, l = 0, o = -n, n = 0), t[0].style.zIndex = -Math.abs(Math.round(r)) + b.slides.length, b.params.flip.slideShadows) {
  1047. var d = b.isHorizontal() ? t.find(".swiper-slide-shadow-left") : t.find(".swiper-slide-shadow-top"),
  1048. u = b.isHorizontal() ? t.find(".swiper-slide-shadow-right") : t.find(".swiper-slide-shadow-bottom");
  1049. 0 === d.length && (d = a('<div class="swiper-slide-shadow-' + (b.isHorizontal() ? "left": "top") + '"></div>'), t.append(d)),
  1050. 0 === u.length && (u = a('<div class="swiper-slide-shadow-' + (b.isHorizontal() ? "right": "bottom") + '"></div>'), t.append(u)),
  1051. d.length && (d[0].style.opacity = Math.max( - r, 0)),
  1052. u.length && (u[0].style.opacity = Math.max(r, 0))
  1053. }
  1054. t.transform("translate3d(" + l + "px, " + p + "px, 0px) rotateX(" + o + "deg) rotateY(" + n + "deg)")
  1055. }
  1056. },
  1057. setTransition: function(e) {
  1058. if (b.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e), b.params.virtualTranslate && 0 !== e) {
  1059. var t = !1;
  1060. b.slides.eq(b.activeIndex).transitionEnd(function() {
  1061. if (!t && b && a(this).hasClass(b.params.slideActiveClass)) {
  1062. t = !0,
  1063. b.animating = !1;
  1064. for (var e = ["webkitTransitionEnd", "transitionend", "oTransitionEnd", "MSTransitionEnd", "msTransitionEnd"], r = 0; r < e.length; r++) b.wrapper.trigger(e[r])
  1065. }
  1066. })
  1067. }
  1068. }
  1069. },
  1070. cube: {
  1071. setTranslate: function() {
  1072. var e, t = 0;
  1073. b.params.cube.shadow && (b.isHorizontal() ? (e = b.wrapper.find(".swiper-cube-shadow"), 0 === e.length && (e = a('<div class="swiper-cube-shadow"></div>'), b.wrapper.append(e)), e.css({
  1074. height: b.width + "px"
  1075. })) : (e = b.container.find(".swiper-cube-shadow"), 0 === e.length && (e = a('<div class="swiper-cube-shadow"></div>'), b.container.append(e))));
  1076. for (var r = 0; r < b.slides.length; r++) {
  1077. var i = b.slides.eq(r),
  1078. s = 90 * r,
  1079. n = Math.floor(s / 360);
  1080. b.rtl && (s = -s, n = Math.floor( - s / 360));
  1081. var o = Math.max(Math.min(i[0].progress, 1), -1),
  1082. l = 0,
  1083. p = 0,
  1084. d = 0;
  1085. r % 4 === 0 ? (l = 4 * -n * b.size, d = 0) : (r - 1) % 4 === 0 ? (l = 0, d = 4 * -n * b.size) : (r - 2) % 4 === 0 ? (l = b.size + 4 * n * b.size, d = b.size) : (r - 3) % 4 === 0 && (l = -b.size, d = 3 * b.size + 4 * b.size * n),
  1086. b.rtl && (l = -l),
  1087. b.isHorizontal() || (p = l, l = 0);
  1088. var u = "rotateX(" + (b.isHorizontal() ? 0 : -s) + "deg) rotateY(" + (b.isHorizontal() ? s: 0) + "deg) translate3d(" + l + "px, " + p + "px, " + d + "px)";
  1089. if (1 >= o && o > -1 && (t = 90 * r + 90 * o, b.rtl && (t = 90 * -r - 90 * o)), i.transform(u), b.params.cube.slideShadows) {
  1090. var c = b.isHorizontal() ? i.find(".swiper-slide-shadow-left") : i.find(".swiper-slide-shadow-top"),
  1091. m = b.isHorizontal() ? i.find(".swiper-slide-shadow-right") : i.find(".swiper-slide-shadow-bottom");
  1092. 0 === c.length && (c = a('<div class="swiper-slide-shadow-' + (b.isHorizontal() ? "left": "top") + '"></div>'), i.append(c)),
  1093. 0 === m.length && (m = a('<div class="swiper-slide-shadow-' + (b.isHorizontal() ? "right": "bottom") + '"></div>'), i.append(m)),
  1094. c.length && (c[0].style.opacity = Math.max( - o, 0)),
  1095. m.length && (m[0].style.opacity = Math.max(o, 0))
  1096. }
  1097. }
  1098. if (b.wrapper.css({
  1099. "-webkit-transform-origin": "50% 50% -" + b.size / 2 + "px",
  1100. "-moz-transform-origin": "50% 50% -" + b.size / 2 + "px",
  1101. "-ms-transform-origin": "50% 50% -" + b.size / 2 + "px",
  1102. "transform-origin": "50% 50% -" + b.size / 2 + "px"
  1103. }), b.params.cube.shadow) if (b.isHorizontal()) e.transform("translate3d(0px, " + (b.width / 2 + b.params.cube.shadowOffset) + "px, " + -b.width / 2 + "px) rotateX(90deg) rotateZ(0deg) scale(" + b.params.cube.shadowScale + ")");
  1104. else {
  1105. var h = Math.abs(t) - 90 * Math.floor(Math.abs(t) / 90),
  1106. f = 1.5 - (Math.sin(2 * h * Math.PI / 360) / 2 + Math.cos(2 * h * Math.PI / 360) / 2),
  1107. g = b.params.cube.shadowScale,
  1108. v = b.params.cube.shadowScale / f,
  1109. w = b.params.cube.shadowOffset;
  1110. e.transform("scale3d(" + g + ", 1, " + v + ") translate3d(0px, " + (b.height / 2 + w) + "px, " + -b.height / 2 / v + "px) rotateX(-90deg)")
  1111. }
  1112. var y = b.isSafari || b.isUiWebView ? -b.size / 2 : 0;
  1113. b.wrapper.transform("translate3d(0px,0," + y + "px) rotateX(" + (b.isHorizontal() ? 0 : t) + "deg) rotateY(" + (b.isHorizontal() ? -t: 0) + "deg)")
  1114. },
  1115. setTransition: function(e) {
  1116. b.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),
  1117. b.params.cube.shadow && !b.isHorizontal() && b.container.find(".swiper-cube-shadow").transition(e)
  1118. }
  1119. },
  1120. coverflow: {
  1121. setTranslate: function() {
  1122. for (var e = b.translate,
  1123. t = b.isHorizontal() ? -e + b.width / 2 : -e + b.height / 2, r = b.isHorizontal() ? b.params.coverflow.rotate: -b.params.coverflow.rotate, i = b.params.coverflow.depth, s = 0, n = b.slides.length; n > s; s++) {
  1124. var o = b.slides.eq(s),
  1125. l = b.slidesSizesGrid[s],
  1126. p = o[0].swiperSlideOffset,
  1127. d = (t - p - l / 2) / l * b.params.coverflow.modifier,
  1128. u = b.isHorizontal() ? r * d: 0,
  1129. c = b.isHorizontal() ? 0 : r * d,
  1130. m = -i * Math.abs(d),
  1131. h = b.isHorizontal() ? 0 : b.params.coverflow.stretch * d,
  1132. f = b.isHorizontal() ? b.params.coverflow.stretch * d: 0;
  1133. Math.abs(f) < .001 && (f = 0),
  1134. Math.abs(h) < .001 && (h = 0),
  1135. Math.abs(m) < .001 && (m = 0),
  1136. Math.abs(u) < .001 && (u = 0),
  1137. Math.abs(c) < .001 && (c = 0);
  1138. var g = "translate3d(" + f + "px," + h + "px," + m + "px) rotateX(" + c + "deg) rotateY(" + u + "deg)";
  1139. if (o.transform(g), o[0].style.zIndex = -Math.abs(Math.round(d)) + 1, b.params.coverflow.slideShadows) {
  1140. var v = b.isHorizontal() ? o.find(".swiper-slide-shadow-left") : o.find(".swiper-slide-shadow-top"),
  1141. w = b.isHorizontal() ? o.find(".swiper-slide-shadow-right") : o.find(".swiper-slide-shadow-bottom");
  1142. 0 === v.length && (v = a('<div class="swiper-slide-shadow-' + (b.isHorizontal() ? "left": "top") + '"></div>'), o.append(v)),
  1143. 0 === w.length && (w = a('<div class="swiper-slide-shadow-' + (b.isHorizontal() ? "right": "bottom") + '"></div>'), o.append(w)),
  1144. v.length && (v[0].style.opacity = d > 0 ? d: 0),
  1145. w.length && (w[0].style.opacity = -d > 0 ? -d: 0)
  1146. }
  1147. }
  1148. if (b.browser.ie) {
  1149. var y = b.wrapper[0].style;
  1150. y.perspectiveOrigin = t + "px 50%"
  1151. }
  1152. },
  1153. setTransition: function(e) {
  1154. b.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)
  1155. }
  1156. }
  1157. },
  1158. b.lazy = {
  1159. initialImageLoaded: !1,
  1160. loadImageInSlide: function(e, t) {
  1161. if ("undefined" != typeof e && ("undefined" == typeof t && (t = !0), 0 !== b.slides.length)) {
  1162. var r = b.slides.eq(e),
  1163. i = r.find(".swiper-lazy:not(.swiper-lazy-loaded):not(.swiper-lazy-loading)"); ! r.hasClass("swiper-lazy") || r.hasClass("swiper-lazy-loaded") || r.hasClass("swiper-lazy-loading") || (i = i.add(r[0])),
  1164. 0 !== i.length && i.each(function() {
  1165. var e = a(this);
  1166. e.addClass("swiper-lazy-loading");
  1167. var i = e.attr("data-background"),
  1168. s = e.attr("data-src"),
  1169. n = e.attr("data-srcset");
  1170. b.loadImage(e[0], s || i, n, !1,
  1171. function() {
  1172. if (i ? (e.css("background-image", 'url("' + i + '")'), e.removeAttr("data-background")) : (n && (e.attr("srcset", n), e.removeAttr("data-srcset")), s && (e.attr("src", s), e.removeAttr("data-src"))), e.addClass("swiper-lazy-loaded").removeClass("swiper-lazy-loading"), r.find(".swiper-lazy-preloader, .preloader").remove(), b.params.loop && t) {
  1173. var a = r.attr("data-swiper-slide-index");
  1174. if (r.hasClass(b.params.slideDuplicateClass)) {
  1175. var o = b.wrapper.children('[data-swiper-slide-index="' + a + '"]:not(.' + b.params.slideDuplicateClass + ")");
  1176. b.lazy.loadImageInSlide(o.index(), !1)
  1177. } else {
  1178. var l = b.wrapper.children("." + b.params.slideDuplicateClass + '[data-swiper-slide-index="' + a + '"]');
  1179. b.lazy.loadImageInSlide(l.index(), !1)
  1180. }
  1181. }
  1182. b.emit("onLazyImageReady", b, r[0], e[0])
  1183. }),
  1184. b.emit("onLazyImageLoad", b, r[0], e[0])
  1185. })
  1186. }
  1187. },
  1188. load: function() {
  1189. var e;
  1190. if (b.params.watchSlidesVisibility) b.wrapper.children("." + b.params.slideVisibleClass).each(function() {
  1191. b.lazy.loadImageInSlide(a(this).index())
  1192. });
  1193. else if (b.params.slidesPerView > 1) for (e = b.activeIndex; e < b.activeIndex + b.params.slidesPerView; e++) b.slides[e] && b.lazy.loadImageInSlide(e);
  1194. else b.lazy.loadImageInSlide(b.activeIndex);
  1195. if (b.params.lazyLoadingInPrevNext) if (b.params.slidesPerView > 1 || b.params.lazyLoadingInPrevNextAmount && b.params.lazyLoadingInPrevNextAmount > 1) {
  1196. var t = b.params.lazyLoadingInPrevNextAmount,
  1197. r = b.params.slidesPerView,
  1198. i = Math.min(b.activeIndex + r + Math.max(t, r), b.slides.length),
  1199. s = Math.max(b.activeIndex - Math.max(r, t), 0);
  1200. for (e = b.activeIndex + b.params.slidesPerView; i > e; e++) b.slides[e] && b.lazy.loadImageInSlide(e);
  1201. for (e = s; e < b.activeIndex; e++) b.slides[e] && b.lazy.loadImageInSlide(e)
  1202. } else {
  1203. var n = b.wrapper.children("." + b.params.slideNextClass);
  1204. n.length > 0 && b.lazy.loadImageInSlide(n.index());
  1205. var o = b.wrapper.children("." + b.params.slidePrevClass);
  1206. o.length > 0 && b.lazy.loadImageInSlide(o.index())
  1207. }
  1208. },
  1209. onTransitionStart: function() {
  1210. b.params.lazyLoading && (b.params.lazyLoadingOnTransitionStart || !b.params.lazyLoadingOnTransitionStart && !b.lazy.initialImageLoaded) && b.lazy.load()
  1211. },
  1212. onTransitionEnd: function() {
  1213. b.params.lazyLoading && !b.params.lazyLoadingOnTransitionStart && b.lazy.load()
  1214. }
  1215. },
  1216. b.scrollbar = {
  1217. isTouched: !1,
  1218. setDragPosition: function(e) {
  1219. var a = b.scrollbar,
  1220. t = b.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,
  1221. r = t - a.track.offset()[b.isHorizontal() ? "left": "top"] - a.dragSize / 2,
  1222. i = -b.minTranslate() * a.moveDivider,
  1223. s = -b.maxTranslate() * a.moveDivider;
  1224. i > r ? r = i: r > s && (r = s),
  1225. r = -r / a.moveDivider,
  1226. b.updateProgress(r),
  1227. b.setWrapperTranslate(r, !0)
  1228. },
  1229. dragStart: function(e) {
  1230. var a = b.scrollbar;
  1231. a.isTouched = !0,
  1232. e.preventDefault(),
  1233. e.stopPropagation(),
  1234. a.setDragPosition(e),
  1235. clearTimeout(a.dragTimeout),
  1236. a.track.transition(0),
  1237. b.params.scrollbarHide && a.track.css("opacity", 1),
  1238. b.wrapper.transition(100),
  1239. a.drag.transition(100),
  1240. b.emit("onScrollbarDragStart", b)
  1241. },
  1242. dragMove: function(e) {
  1243. var a = b.scrollbar;
  1244. a.isTouched && (e.preventDefault ? e.preventDefault() : e.returnValue = !1, a.setDragPosition(e), b.wrapper.transition(0), a.track.transition(0), a.drag.transition(0), b.emit("onScrollbarDragMove", b))
  1245. },
  1246. dragEnd: function(e) {
  1247. var a = b.scrollbar;
  1248. a.isTouched && (a.isTouched = !1, b.params.scrollbarHide && (clearTimeout(a.dragTimeout), a.dragTimeout = setTimeout(function() {
  1249. a.track.css("opacity", 0),
  1250. a.track.transition(400)
  1251. },
  1252. 1e3)), b.emit("onScrollbarDragEnd", b), b.params.scrollbarSnapOnRelease && b.slideReset())
  1253. },
  1254. enableDraggable: function() {
  1255. var e = b.scrollbar,
  1256. t = b.support.touch ? e.track: document;
  1257. a(e.track).on(b.touchEvents.start, e.dragStart),
  1258. a(t).on(b.touchEvents.move, e.dragMove),
  1259. a(t).on(b.touchEvents.end, e.dragEnd)
  1260. },
  1261. disableDraggable: function() {
  1262. var e = b.scrollbar,
  1263. t = b.support.touch ? e.track: document;
  1264. a(e.track).off(b.touchEvents.start, e.dragStart),
  1265. a(t).off(b.touchEvents.move, e.dragMove),
  1266. a(t).off(b.touchEvents.end, e.dragEnd)
  1267. },
  1268. set: function() {
  1269. if (b.params.scrollbar) {
  1270. var e = b.scrollbar;
  1271. e.track = a(b.params.scrollbar),
  1272. b.params.uniqueNavElements && "string" == typeof b.params.scrollbar && e.track.length > 1 && 1 === b.container.find(b.params.scrollbar).length && (e.track = b.container.find(b.params.scrollbar)),
  1273. e.drag = e.track.find(".swiper-scrollbar-drag"),
  1274. 0 === e.drag.length && (e.drag = a('<div class="swiper-scrollbar-drag"></div>'), e.track.append(e.drag)),
  1275. e.drag[0].style.width = "",
  1276. e.drag[0].style.height = "",
  1277. e.trackSize = b.isHorizontal() ? e.track[0].offsetWidth: e.track[0].offsetHeight,
  1278. e.divider = b.size / b.virtualSize,
  1279. e.moveDivider = e.divider * (e.trackSize / b.size),
  1280. e.dragSize = e.trackSize * e.divider,
  1281. b.isHorizontal() ? e.drag[0].style.width = e.dragSize + "px": e.drag[0].style.height = e.dragSize + "px",
  1282. e.divider >= 1 ? e.track[0].style.display = "none": e.track[0].style.display = "",
  1283. b.params.scrollbarHide && (e.track[0].style.opacity = 0)
  1284. }
  1285. },
  1286. setTranslate: function() {
  1287. if (b.params.scrollbar) {
  1288. var e, a = b.scrollbar,
  1289. t = (b.translate || 0, a.dragSize);
  1290. e = (a.trackSize - a.dragSize) * b.progress,
  1291. b.rtl && b.isHorizontal() ? (e = -e, e > 0 ? (t = a.dragSize - e, e = 0) : -e + a.dragSize > a.trackSize && (t = a.trackSize + e)) : 0 > e ? (t = a.dragSize + e, e = 0) : e + a.dragSize > a.trackSize && (t = a.trackSize - e),
  1292. b.isHorizontal() ? (b.support.transforms3d ? a.drag.transform("translate3d(" + e + "px, 0, 0)") : a.drag.transform("translateX(" + e + "px)"), a.drag[0].style.width = t + "px") : (b.support.transforms3d ? a.drag.transform("translate3d(0px, " + e + "px, 0)") : a.drag.transform("translateY(" + e + "px)"), a.drag[0].style.height = t + "px"),
  1293. b.params.scrollbarHide && (clearTimeout(a.timeout), a.track[0].style.opacity = 1, a.timeout = setTimeout(function() {
  1294. a.track[0].style.opacity = 0,
  1295. a.track.transition(400)
  1296. },
  1297. 1e3))
  1298. }
  1299. },
  1300. setTransition: function(e) {
  1301. b.params.scrollbar && b.scrollbar.drag.transition(e)
  1302. }
  1303. },
  1304. b.controller = {
  1305. LinearSpline: function(e, a) {
  1306. this.x = e,
  1307. this.y = a,
  1308. this.lastIndex = e.length - 1;
  1309. var t, r;
  1310. this.x.length;
  1311. this.interpolate = function(e) {
  1312. return e ? (r = i(this.x, e), t = r - 1, (e - this.x[t]) * (this.y[r] - this.y[t]) / (this.x[r] - this.x[t]) + this.y[t]) : 0
  1313. };
  1314. var i = function() {
  1315. var e, a, t;
  1316. return function(r, i) {
  1317. for (a = -1, e = r.length; e - a > 1;) r[t = e + a >> 1] <= i ? a = t: e = t;
  1318. return e
  1319. }
  1320. } ()
  1321. },
  1322. getInterpolateFunction: function(e) {
  1323. b.controller.spline || (b.controller.spline = b.params.loop ? new b.controller.LinearSpline(b.slidesGrid, e.slidesGrid) : new b.controller.LinearSpline(b.snapGrid, e.snapGrid))
  1324. },
  1325. setTranslate: function(e, a) {
  1326. function r(a) {
  1327. e = a.rtl && "horizontal" === a.params.direction ? -b.translate: b.translate,
  1328. "slide" === b.params.controlBy && (b.controller.getInterpolateFunction(a), s = -b.controller.spline.interpolate( - e)),
  1329. s && "container" !== b.params.controlBy || (i = (a.maxTranslate() - a.minTranslate()) / (b.maxTranslate() - b.minTranslate()), s = (e - b.minTranslate()) * i + a.minTranslate()),
  1330. b.params.controlInverse && (s = a.maxTranslate() - s),
  1331. a.updateProgress(s),
  1332. a.setWrapperTranslate(s, !1, b),
  1333. a.updateActiveIndex()
  1334. }
  1335. var i, s, n = b.params.control;
  1336. if (b.isArray(n)) for (var o = 0; o < n.length; o++) n[o] !== a && n[o] instanceof t && r(n[o]);
  1337. else n instanceof t && a !== n && r(n)
  1338. },
  1339. setTransition: function(e, a) {
  1340. function r(a) {
  1341. a.setWrapperTransition(e, b),
  1342. 0 !== e && (a.onTransitionStart(), a.wrapper.transitionEnd(function() {
  1343. s && (a.params.loop && "slide" === b.params.controlBy && a.fixLoop(), a.onTransitionEnd())
  1344. }))
  1345. }
  1346. var i, s = b.params.control;
  1347. if (b.isArray(s)) for (i = 0; i < s.length; i++) s[i] !== a && s[i] instanceof t && r(s[i]);
  1348. else s instanceof t && a !== s && r(s)
  1349. }
  1350. },
  1351. b.hashnav = {
  1352. init: function() {
  1353. if (b.params.hashnav) {
  1354. b.hashnav.initialized = !0;
  1355. var e = document.location.hash.replace("#", "");
  1356. if (e) for (var a = 0,
  1357. t = 0,
  1358. r = b.slides.length; r > t; t++) {
  1359. var i = b.slides.eq(t),
  1360. s = i.attr("data-hash");
  1361. if (s === e && !i.hasClass(b.params.slideDuplicateClass)) {
  1362. var n = i.index();
  1363. b.slideTo(n, a, b.params.runCallbacksOnInit, !0)
  1364. }
  1365. }
  1366. }
  1367. },
  1368. setHash: function() {
  1369. b.hashnav.initialized && b.params.hashnav && (document.location.hash = b.slides.eq(b.activeIndex).attr("data-hash") || "")
  1370. }
  1371. },
  1372. b.disableKeyboardControl = function() {
  1373. b.params.keyboardControl = !1,
  1374. a(document).off("keydown", p)
  1375. },
  1376. b.enableKeyboardControl = function() {
  1377. b.params.keyboardControl = !0,
  1378. a(document).on("keydown", p)
  1379. },
  1380. b.mousewheel = {
  1381. event: !1,
  1382. lastScrollTime: (new window.Date).getTime()
  1383. },
  1384. b.params.mousewheelControl) {
  1385. try {
  1386. new window.WheelEvent("wheel"),
  1387. b.mousewheel.event = "wheel"
  1388. } catch(N) { (window.WheelEvent || b.container[0] && "wheel" in b.container[0]) && (b.mousewheel.event = "wheel")
  1389. } ! b.mousewheel.event && window.WheelEvent,
  1390. b.mousewheel.event || void 0 === document.onmousewheel || (b.mousewheel.event = "mousewheel"),
  1391. b.mousewheel.event || (b.mousewheel.event = "DOMMouseScroll")
  1392. }
  1393. b.disableMousewheelControl = function() {
  1394. return b.mousewheel.event ? (b.container.off(b.mousewheel.event, d), !0) : !1
  1395. },
  1396. b.enableMousewheelControl = function() {
  1397. return b.mousewheel.event ? (b.container.on(b.mousewheel.event, d), !0) : !1
  1398. },
  1399. b.parallax = {
  1400. setTranslate: function() {
  1401. b.container.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function() {
  1402. u(this, b.progress)
  1403. }),
  1404. b.slides.each(function() {
  1405. var e = a(this);
  1406. e.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function() {
  1407. var a = Math.min(Math.max(e[0].progress, -1), 1);
  1408. u(this, a)
  1409. })
  1410. })
  1411. },
  1412. setTransition: function(e) {
  1413. "undefined" == typeof e && (e = b.params.speed),
  1414. b.container.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function() {
  1415. var t = a(this),
  1416. r = parseInt(t.attr("data-swiper-parallax-duration"), 10) || e;
  1417. 0 === e && (r = 0),
  1418. t.transition(r)
  1419. })
  1420. }
  1421. },
  1422. b._plugins = [];
  1423. for (var R in b.plugins) {
  1424. var W = b.plugins[R](b, b.params[R]);
  1425. W && b._plugins.push(W)
  1426. }
  1427. return b.callPlugins = function(e) {
  1428. for (var a = 0; a < b._plugins.length; a++) e in b._plugins[a] && b._plugins[a][e](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5])
  1429. },
  1430. b.emitterEventListeners = {},
  1431. b.emit = function(e) {
  1432. b.params[e] && b.params[e](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
  1433. var a;
  1434. if (b.emitterEventListeners[e]) for (a = 0; a < b.emitterEventListeners[e].length; a++) b.emitterEventListeners[e][a](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
  1435. b.callPlugins && b.callPlugins(e, arguments[1], arguments[2], arguments[3], arguments[4], arguments[5])
  1436. },
  1437. b.on = function(e, a) {
  1438. return e = c(e),
  1439. b.emitterEventListeners[e] || (b.emitterEventListeners[e] = []),
  1440. b.emitterEventListeners[e].push(a),
  1441. b
  1442. },
  1443. b.off = function(e, a) {
  1444. var t;
  1445. if (e = c(e), "undefined" == typeof a) return b.emitterEventListeners[e] = [],
  1446. b;
  1447. if (b.emitterEventListeners[e] && 0 !== b.emitterEventListeners[e].length) {
  1448. for (t = 0; t < b.emitterEventListeners[e].length; t++) b.emitterEventListeners[e][t] === a && b.emitterEventListeners[e].splice(t, 1);
  1449. return b
  1450. }
  1451. },
  1452. b.once = function(e, a) {
  1453. e = c(e);
  1454. var t = function() {
  1455. a(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]),
  1456. b.off(e, t)
  1457. };
  1458. return b.on(e, t),
  1459. b
  1460. },
  1461. b.a11y = {
  1462. makeFocusable: function(e) {
  1463. return e.attr("tabIndex", "0"),
  1464. e
  1465. },
  1466. addRole: function(e, a) {
  1467. return e.attr("role", a),
  1468. e
  1469. },
  1470. addLabel: function(e, a) {
  1471. return e.attr("aria-label", a),
  1472. e
  1473. },
  1474. disable: function(e) {
  1475. return e.attr("aria-disabled", !0),
  1476. e
  1477. },
  1478. enable: function(e) {
  1479. return e.attr("aria-disabled", !1),
  1480. e
  1481. },
  1482. onEnterKey: function(e) {
  1483. 13 === e.keyCode && (a(e.target).is(b.params.nextButton) ? (b.onClickNext(e), b.isEnd ? b.a11y.notify(b.params.lastSlideMessage) : b.a11y.notify(b.params.nextSlideMessage)) : a(e.target).is(b.params.prevButton) && (b.onClickPrev(e), b.isBeginning ? b.a11y.notify(b.params.firstSlideMessage) : b.a11y.notify(b.params.prevSlideMessage)), a(e.target).is("." + b.params.bulletClass) && a(e.target)[0].click())
  1484. },
  1485. liveRegion: a('<span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span>'),
  1486. notify: function(e) {
  1487. var a = b.a11y.liveRegion;
  1488. 0 !== a.length && (a.html(""), a.html(e))
  1489. },
  1490. init: function() {
  1491. b.params.nextButton && b.nextButton && b.nextButton.length > 0 && (b.a11y.makeFocusable(b.nextButton), b.a11y.addRole(b.nextButton, "button"), b.a11y.addLabel(b.nextButton, b.params.nextSlideMessage)),
  1492. b.params.prevButton && b.prevButton && b.prevButton.length > 0 && (b.a11y.makeFocusable(b.prevButton), b.a11y.addRole(b.prevButton, "button"), b.a11y.addLabel(b.prevButton, b.params.prevSlideMessage)),
  1493. a(b.container).append(b.a11y.liveRegion)
  1494. },
  1495. initPagination: function() {
  1496. b.params.pagination && b.params.paginationClickable && b.bullets && b.bullets.length && b.bullets.each(function() {
  1497. var e = a(this);
  1498. b.a11y.makeFocusable(e),
  1499. b.a11y.addRole(e, "button"),
  1500. b.a11y.addLabel(e, b.params.paginationBulletMessage.replace(/{{index}}/, e.index() + 1))
  1501. })
  1502. },
  1503. destroy: function() {
  1504. b.a11y.liveRegion && b.a11y.liveRegion.length > 0 && b.a11y.liveRegion.remove()
  1505. }
  1506. },
  1507. b.init = function() {
  1508. b.params.loop && b.createLoop(),
  1509. b.updateContainerSize(),
  1510. b.updateSlidesSize(),
  1511. b.updatePagination(),
  1512. b.params.scrollbar && b.scrollbar && (b.scrollbar.set(), b.params.scrollbarDraggable && b.scrollbar.enableDraggable()),
  1513. "slide" !== b.params.effect && b.effects[b.params.effect] && (b.params.loop || b.updateProgress(), b.effects[b.params.effect].setTranslate()),
  1514. b.params.loop ? b.slideTo(b.params.initialSlide + b.loopedSlides, 0, b.params.runCallbacksOnInit) : (b.slideTo(b.params.initialSlide, 0, b.params.runCallbacksOnInit), 0 === b.params.initialSlide && (b.parallax && b.params.parallax && b.parallax.setTranslate(), b.lazy && b.params.lazyLoading && (b.lazy.load(), b.lazy.initialImageLoaded = !0))),
  1515. b.attachEvents(),
  1516. b.params.observer && b.support.observer && b.initObservers(),
  1517. b.params.preloadImages && !b.params.lazyLoading && b.preloadImages(),
  1518. b.params.autoplay && b.startAutoplay(),
  1519. b.params.keyboardControl && b.enableKeyboardControl && b.enableKeyboardControl(),
  1520. b.params.mousewheelControl && b.enableMousewheelControl && b.enableMousewheelControl(),
  1521. b.params.hashnav && b.hashnav && b.hashnav.init(),
  1522. b.params.a11y && b.a11y && b.a11y.init(),
  1523. b.emit("onInit", b)
  1524. },
  1525. b.cleanupStyles = function() {
  1526. b.container.removeClass(b.classNames.join(" ")).removeAttr("style"),
  1527. b.wrapper.removeAttr("style"),
  1528. b.slides && b.slides.length && b.slides.removeClass([b.params.slideVisibleClass, b.params.slideActiveClass, b.params.slideNextClass, b.params.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-column").removeAttr("data-swiper-row"),
  1529. b.paginationContainer && b.paginationContainer.length && b.paginationContainer.removeClass(b.params.paginationHiddenClass),
  1530. b.bullets && b.bullets.length && b.bullets.removeClass(b.params.bulletActiveClass),
  1531. b.params.prevButton && a(b.params.prevButton).removeClass(b.params.buttonDisabledClass),
  1532. b.params.nextButton && a(b.params.nextButton).removeClass(b.params.buttonDisabledClass),
  1533. b.params.scrollbar && b.scrollbar && (b.scrollbar.track && b.scrollbar.track.length && b.scrollbar.track.removeAttr("style"), b.scrollbar.drag && b.scrollbar.drag.length && b.scrollbar.drag.removeAttr("style"))
  1534. },
  1535. b.destroy = function(e, a) {
  1536. b.detachEvents(),
  1537. b.stopAutoplay(),
  1538. b.params.scrollbar && b.scrollbar && b.params.scrollbarDraggable && b.scrollbar.disableDraggable(),
  1539. b.params.loop && b.destroyLoop(),
  1540. a && b.cleanupStyles(),
  1541. b.disconnectObservers(),
  1542. b.params.keyboardControl && b.disableKeyboardControl && b.disableKeyboardControl(),
  1543. b.params.mousewheelControl && b.disableMousewheelControl && b.disableMousewheelControl(),
  1544. b.params.a11y && b.a11y && b.a11y.destroy(),
  1545. b.emit("onDestroy"),
  1546. e !== !1 && (b = null)
  1547. },
  1548. b.init(),
  1549. b
  1550. }
  1551. };
  1552. t.prototype = {
  1553. isSafari: function() {
  1554. var e = navigator.userAgent.toLowerCase();
  1555. return e.indexOf("safari") >= 0 && e.indexOf("chrome") < 0 && e.indexOf("android") < 0
  1556. } (),
  1557. isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(navigator.userAgent),
  1558. isArray: function(e) {
  1559. return "[object Array]" === Object.prototype.toString.apply(e)
  1560. },
  1561. browser: {
  1562. ie: window.navigator.pointerEnabled || window.navigator.msPointerEnabled,
  1563. ieTouch: window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints > 1 || window.navigator.pointerEnabled && window.navigator.maxTouchPoints > 1
  1564. },
  1565. device: function() {
  1566. var e = navigator.userAgent,
  1567. a = e.match(/(Android);?[\s\/]+([\d.]+)?/),
  1568. t = e.match(/(iPad).*OS\s([\d_]+)/),
  1569. r = e.match(/(iPod)(.*OS\s([\d_]+))?/),
  1570. i = !t && e.match(/(iPhone\sOS)\s([\d_]+)/);
  1571. return {
  1572. ios: t || i || r,
  1573. android: a
  1574. }
  1575. } (),
  1576. support: {
  1577. touch: window.Modernizr && Modernizr.touch === !0 ||
  1578. function() {
  1579. return !! ("ontouchstart" in window || window.DocumentTouch && document instanceof DocumentTouch)
  1580. } (),
  1581. transforms3d: window.Modernizr && Modernizr.csstransforms3d === !0 ||
  1582. function() {
  1583. var e = document.createElement("div").style;
  1584. return "webkitPerspective" in e || "MozPerspective" in e || "OPerspective" in e || "MsPerspective" in e || "perspective" in e
  1585. } (),
  1586. flexbox: function() {
  1587. for (var e = document.createElement("div").style, a = "alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "), t = 0; t < a.length; t++) if (a[t] in e) return ! 0
  1588. } (),
  1589. observer: function() {
  1590. return "MutationObserver" in window || "WebkitMutationObserver" in window
  1591. } ()
  1592. },
  1593. plugins: {}
  1594. };
  1595. for (var r = (function() {
  1596. var e = function(e) {
  1597. var a = this,
  1598. t = 0;
  1599. for (t = 0; t < e.length; t++) a[t] = e[t];
  1600. return a.length = e.length,
  1601. this
  1602. },
  1603. a = function(a, t) {
  1604. var r = [],
  1605. i = 0;
  1606. if (a && !t && a instanceof e) return a;
  1607. if (a) if ("string" == typeof a) {
  1608. var s, n, o = a.trim();
  1609. if (o.indexOf("<") >= 0 && o.indexOf(">") >= 0) {
  1610. var l = "div";
  1611. for (0 === o.indexOf("<li") && (l = "ul"), 0 === o.indexOf("<tr") && (l = "tbody"), (0 === o.indexOf("<td") || 0 === o.indexOf("<th")) && (l = "tr"), 0 === o.indexOf("<tbody") && (l = "table"), 0 === o.indexOf("<option") && (l = "select"), n = document.createElement(l), n.innerHTML = a, i = 0; i < n.childNodes.length; i++) r.push(n.childNodes[i])
  1612. } else for (s = t || "#" !== a[0] || a.match(/[ .<>:~]/) ? (t || document).querySelectorAll(a) : [document.getElementById(a.split("#")[1])], i = 0; i < s.length; i++) s[i] && r.push(s[i])
  1613. } else if (a.nodeType || a === window || a === document) r.push(a);
  1614. else if (a.length > 0 && a[0].nodeType) for (i = 0; i < a.length; i++) r.push(a[i]);
  1615. return new e(r)
  1616. };
  1617. return e.prototype = {
  1618. addClass: function(e) {
  1619. if ("undefined" == typeof e) return this;
  1620. for (var a = e.split(" "), t = 0; t < a.length; t++) for (var r = 0; r < this.length; r++) this[r].classList.add(a[t]);
  1621. return this
  1622. },
  1623. removeClass: function(e) {
  1624. for (var a = e.split(" "), t = 0; t < a.length; t++) for (var r = 0; r < this.length; r++) this[r].classList.remove(a[t]);
  1625. return this
  1626. },
  1627. hasClass: function(e) {
  1628. return this[0] ? this[0].classList.contains(e) : !1
  1629. },
  1630. toggleClass: function(e) {
  1631. for (var a = e.split(" "), t = 0; t < a.length; t++) for (var r = 0; r < this.length; r++) this[r].classList.toggle(a[t]);
  1632. return this
  1633. },
  1634. attr: function(e, a) {
  1635. if (1 === arguments.length && "string" == typeof e) return this[0] ? this[0].getAttribute(e) : void 0;
  1636. for (var t = 0; t < this.length; t++) if (2 === arguments.length) this[t].setAttribute(e, a);
  1637. else for (var r in e) this[t][r] = e[r],
  1638. this[t].setAttribute(r, e[r]);
  1639. return this
  1640. },
  1641. removeAttr: function(e) {
  1642. for (var a = 0; a < this.length; a++) this[a].removeAttribute(e);
  1643. return this
  1644. },
  1645. data: function(e, a) {
  1646. if ("undefined" != typeof a) {
  1647. for (var t = 0; t < this.length; t++) {
  1648. var r = this[t];
  1649. r.dom7ElementDataStorage || (r.dom7ElementDataStorage = {}),
  1650. r.dom7ElementDataStorage[e] = a
  1651. }
  1652. return this
  1653. }
  1654. if (this[0]) {
  1655. var i = this[0].getAttribute("data-" + e);
  1656. return i ? i: this[0].dom7ElementDataStorage && e in this[0].dom7ElementDataStorage ? this[0].dom7ElementDataStorage[e] : void 0
  1657. }
  1658. },
  1659. transform: function(e) {
  1660. for (var a = 0; a < this.length; a++) {
  1661. var t = this[a].style;
  1662. t.webkitTransform = t.MsTransform = t.msTransform = t.MozTransform = t.OTransform = t.transform = e
  1663. }
  1664. return this
  1665. },
  1666. transition: function(e) {
  1667. "string" != typeof e && (e += "ms");
  1668. for (var a = 0; a < this.length; a++) {
  1669. var t = this[a].style;
  1670. t.webkitTransitionDuration = t.MsTransitionDuration = t.msTransitionDuration = t.MozTransitionDuration = t.OTransitionDuration = t.transitionDuration = e
  1671. }
  1672. return this
  1673. },
  1674. on: function(e, t, r, i) {
  1675. function s(e) {
  1676. var i = e.target;
  1677. if (a(i).is(t)) r.call(i, e);
  1678. else for (var s = a(i).parents(), n = 0; n < s.length; n++) a(s[n]).is(t) && r.call(s[n], e)
  1679. }
  1680. var n, o, l = e.split(" ");
  1681. for (n = 0; n < this.length; n++) if ("function" == typeof t || t === !1) for ("function" == typeof t && (r = arguments[1], i = arguments[2] || !1), o = 0; o < l.length; o++) this[n].addEventListener(l[o], r, i);
  1682. else for (o = 0; o < l.length; o++) this[n].dom7LiveListeners || (this[n].dom7LiveListeners = []),
  1683. this[n].dom7LiveListeners.push({
  1684. listener: r,
  1685. liveListener: s
  1686. }),
  1687. this[n].addEventListener(l[o], s, i);
  1688. return this
  1689. },
  1690. off: function(e, a, t, r) {
  1691. for (var i = e.split(" "), s = 0; s < i.length; s++) for (var n = 0; n < this.length; n++) if ("function" == typeof a || a === !1)"function" == typeof a && (t = arguments[1], r = arguments[2] || !1),
  1692. this[n].removeEventListener(i[s], t, r);
  1693. else if (this[n].dom7LiveListeners) for (var o = 0; o < this[n].dom7LiveListeners.length; o++) this[n].dom7LiveListeners[o].listener === t && this[n].removeEventListener(i[s], this[n].dom7LiveListeners[o].liveListener, r);
  1694. return this
  1695. },
  1696. once: function(e, a, t, r) {
  1697. function i(n) {
  1698. t(n),
  1699. s.off(e, a, i, r)
  1700. }
  1701. var s = this;
  1702. "function" == typeof a && (a = !1, t = arguments[1], r = arguments[2]),
  1703. s.on(e, a, i, r)
  1704. },
  1705. trigger: function(e, a) {
  1706. for (var t = 0; t < this.length; t++) {
  1707. var r;
  1708. try {
  1709. r = new window.CustomEvent(e, {
  1710. detail: a,
  1711. bubbles: !0,
  1712. cancelable: !0
  1713. })
  1714. } catch(i) {
  1715. r = document.createEvent("Event"),
  1716. r.initEvent(e, !0, !0),
  1717. r.detail = a
  1718. }
  1719. this[t].dispatchEvent(r)
  1720. }
  1721. return this
  1722. },
  1723. transitionEnd: function(e) {
  1724. function a(s) {
  1725. if (s.target === this) for (e.call(this, s), t = 0; t < r.length; t++) i.off(r[t], a)
  1726. }
  1727. var t, r = ["webkitTransitionEnd", "transitionend", "oTransitionEnd", "MSTransitionEnd", "msTransitionEnd"],
  1728. i = this;
  1729. if (e) for (t = 0; t < r.length; t++) i.on(r[t], a);
  1730. return this
  1731. },
  1732. width: function() {
  1733. return this[0] === window ? window.innerWidth: this.length > 0 ? parseFloat(this.css("width")) : null
  1734. },
  1735. outerWidth: function(e) {
  1736. return this.length > 0 ? e ? this[0].offsetWidth + parseFloat(this.css("margin-right")) + parseFloat(this.css("margin-left")) : this[0].offsetWidth: null
  1737. },
  1738. height: function() {
  1739. return this[0] === window ? window.innerHeight: this.length > 0 ? parseFloat(this.css("height")) : null
  1740. },
  1741. outerHeight: function(e) {
  1742. return this.length > 0 ? e ? this[0].offsetHeight + parseFloat(this.css("margin-top")) + parseFloat(this.css("margin-bottom")) : this[0].offsetHeight: null
  1743. },
  1744. offset: function() {
  1745. if (this.length > 0) {
  1746. var e = this[0],
  1747. a = e.getBoundingClientRect(),
  1748. t = document.body,
  1749. r = e.clientTop || t.clientTop || 0,
  1750. i = e.clientLeft || t.clientLeft || 0,
  1751. s = window.pageYOffset || e.scrollTop,
  1752. n = window.pageXOffset || e.scrollLeft;
  1753. return {
  1754. top: a.top + s - r,
  1755. left: a.left + n - i
  1756. }
  1757. }
  1758. return null
  1759. },
  1760. css: function(e, a) {
  1761. var t;
  1762. if (1 === arguments.length) {
  1763. if ("string" != typeof e) {
  1764. for (t = 0; t < this.length; t++) for (var r in e) this[t].style[r] = e[r];
  1765. return this
  1766. }
  1767. if (this[0]) return window.getComputedStyle(this[0], null).getPropertyValue(e)
  1768. }
  1769. if (2 === arguments.length && "string" == typeof e) {
  1770. for (t = 0; t < this.length; t++) this[t].style[e] = a;
  1771. return this
  1772. }
  1773. return this
  1774. },
  1775. each: function(e) {
  1776. for (var a = 0; a < this.length; a++) e.call(this[a], a, this[a]);
  1777. return this
  1778. },
  1779. html: function(e) {
  1780. if ("undefined" == typeof e) return this[0] ? this[0].innerHTML: void 0;
  1781. for (var a = 0; a < this.length; a++) this[a].innerHTML = e;
  1782. return this
  1783. },
  1784. text: function(e) {
  1785. if ("undefined" == typeof e) return this[0] ? this[0].textContent.trim() : null;
  1786. for (var a = 0; a < this.length; a++) this[a].textContent = e;
  1787. return this
  1788. },
  1789. is: function(t) {
  1790. if (!this[0]) return ! 1;
  1791. var r, i;
  1792. if ("string" == typeof t) {
  1793. var s = this[0];
  1794. if (s === document) return t === document;
  1795. if (s === window) return t === window;
  1796. if (s.matches) return s.matches(t);
  1797. if (s.webkitMatchesSelector) return s.webkitMatchesSelector(t);
  1798. if (s.mozMatchesSelector) return s.mozMatchesSelector(t);
  1799. if (s.msMatchesSelector) return s.msMatchesSelector(t);
  1800. for (r = a(t), i = 0; i < r.length; i++) if (r[i] === this[0]) return ! 0;
  1801. return ! 1
  1802. }
  1803. if (t === document) return this[0] === document;
  1804. if (t === window) return this[0] === window;
  1805. if (t.nodeType || t instanceof e) {
  1806. for (r = t.nodeType ? [t] : t, i = 0; i < r.length; i++) if (r[i] === this[0]) return ! 0;
  1807. return ! 1
  1808. }
  1809. return ! 1
  1810. },
  1811. index: function() {
  1812. if (this[0]) {
  1813. for (var e = this[0], a = 0; null !== (e = e.previousSibling);) 1 === e.nodeType && a++;
  1814. return a
  1815. }
  1816. },
  1817. eq: function(a) {
  1818. if ("undefined" == typeof a) return this;
  1819. var t, r = this.length;
  1820. return a > r - 1 ? new e([]) : 0 > a ? (t = r + a, new e(0 > t ? [] : [this[t]])) : new e([this[a]])
  1821. },
  1822. append: function(a) {
  1823. var t, r;
  1824. for (t = 0; t < this.length; t++) if ("string" == typeof a) {
  1825. var i = document.createElement("div");
  1826. for (i.innerHTML = a; i.firstChild;) this[t].appendChild(i.firstChild)
  1827. } else if (a instanceof e) for (r = 0; r < a.length; r++) this[t].appendChild(a[r]);
  1828. else this[t].appendChild(a);
  1829. return this
  1830. },
  1831. prepend: function(a) {
  1832. var t, r;
  1833. for (t = 0; t < this.length; t++) if ("string" == typeof a) {
  1834. var i = document.createElement("div");
  1835. for (i.innerHTML = a, r = i.childNodes.length - 1; r >= 0; r--) this[t].insertBefore(i.childNodes[r], this[t].childNodes[0])
  1836. } else if (a instanceof e) for (r = 0; r < a.length; r++) this[t].insertBefore(a[r], this[t].childNodes[0]);
  1837. else this[t].insertBefore(a, this[t].childNodes[0]);
  1838. return this
  1839. },
  1840. insertBefore: function(e) {
  1841. for (var t = a(e), r = 0; r < this.length; r++) if (1 === t.length) t[0].parentNode.insertBefore(this[r], t[0]);
  1842. else if (t.length > 1) for (var i = 0; i < t.length; i++) t[i].parentNode.insertBefore(this[r].cloneNode(!0), t[i])
  1843. },
  1844. insertAfter: function(e) {
  1845. for (var t = a(e), r = 0; r < this.length; r++) if (1 === t.length) t[0].parentNode.insertBefore(this[r], t[0].nextSibling);
  1846. else if (t.length > 1) for (var i = 0; i < t.length; i++) t[i].parentNode.insertBefore(this[r].cloneNode(!0), t[i].nextSibling)
  1847. },
  1848. next: function(t) {
  1849. return new e(this.length > 0 ? t ? this[0].nextElementSibling && a(this[0].nextElementSibling).is(t) ? [this[0].nextElementSibling] : [] : this[0].nextElementSibling ? [this[0].nextElementSibling] : [] : [])
  1850. },
  1851. nextAll: function(t) {
  1852. var r = [],
  1853. i = this[0];
  1854. if (!i) return new e([]);
  1855. for (; i.nextElementSibling;) {
  1856. var s = i.nextElementSibling;
  1857. t ? a(s).is(t) && r.push(s) : r.push(s),
  1858. i = s
  1859. }
  1860. return new e(r)
  1861. },
  1862. prev: function(t) {
  1863. return new e(this.length > 0 ? t ? this[0].previousElementSibling && a(this[0].previousElementSibling).is(t) ? [this[0].previousElementSibling] : [] : this[0].previousElementSibling ? [this[0].previousElementSibling] : [] : [])
  1864. },
  1865. prevAll: function(t) {
  1866. var r = [],
  1867. i = this[0];
  1868. if (!i) return new e([]);
  1869. for (; i.previousElementSibling;) {
  1870. var s = i.previousElementSibling;
  1871. t ? a(s).is(t) && r.push(s) : r.push(s),
  1872. i = s
  1873. }
  1874. return new e(r)
  1875. },
  1876. parent: function(e) {
  1877. for (var t = [], r = 0; r < this.length; r++) e ? a(this[r].parentNode).is(e) && t.push(this[r].parentNode) : t.push(this[r].parentNode);
  1878. return a(a.unique(t))
  1879. },
  1880. parents: function(e) {
  1881. for (var t = [], r = 0; r < this.length; r++) for (var i = this[r].parentNode; i;) e ? a(i).is(e) && t.push(i) : t.push(i),
  1882. i = i.parentNode;
  1883. return a(a.unique(t))
  1884. },
  1885. find: function(a) {
  1886. for (var t = [], r = 0; r < this.length; r++) for (var i = this[r].querySelectorAll(a), s = 0; s < i.length; s++) t.push(i[s]);
  1887. return new e(t)
  1888. },
  1889. children: function(t) {
  1890. for (var r = [], i = 0; i < this.length; i++) for (var s = this[i].childNodes, n = 0; n < s.length; n++) t ? 1 === s[n].nodeType && a(s[n]).is(t) && r.push(s[n]) : 1 === s[n].nodeType && r.push(s[n]);
  1891. return new e(a.unique(r))
  1892. },
  1893. remove: function() {
  1894. for (var e = 0; e < this.length; e++) this[e].parentNode && this[e].parentNode.removeChild(this[e]);
  1895. return this
  1896. },
  1897. add: function() {
  1898. var e, t, r = this;
  1899. for (e = 0; e < arguments.length; e++) {
  1900. var i = a(arguments[e]);
  1901. for (t = 0; t < i.length; t++) r[r.length] = i[t],
  1902. r.length++
  1903. }
  1904. return r
  1905. }
  1906. },
  1907. a.fn = e.prototype,
  1908. a.unique = function(e) {
  1909. for (var a = [], t = 0; t < e.length; t++) - 1 === a.indexOf(e[t]) && a.push(e[t]);
  1910. return a
  1911. },
  1912. a
  1913. } ()), i = ["jQuery", "Zepto", "Dom7"], s = 0; s < i.length; s++) window[i[s]] && e(window[i[s]]);
  1914. var n;
  1915. n = "undefined" == typeof r ? window.Dom7 || window.Zepto || window.jQuery: r,
  1916. n && ("transitionEnd" in n.fn || (n.fn.transitionEnd = function(e) {
  1917. function a(s) {
  1918. if (s.target === this) for (e.call(this, s), t = 0; t < r.length; t++) i.off(r[t], a)
  1919. }
  1920. var t, r = ["webkitTransitionEnd", "transitionend", "oTransitionEnd", "MSTransitionEnd", "msTransitionEnd"],
  1921. i = this;
  1922. if (e) for (t = 0; t < r.length; t++) i.on(r[t], a);
  1923. return this
  1924. }), "transform" in n.fn || (n.fn.transform = function(e) {
  1925. for (var a = 0; a < this.length; a++) {
  1926. var t = this[a].style;
  1927. t.webkitTransform = t.MsTransform = t.msTransform = t.MozTransform = t.OTransform = t.transform = e
  1928. }
  1929. return this
  1930. }), "transition" in n.fn || (n.fn.transition = function(e) {
  1931. "string" != typeof e && (e += "ms");
  1932. for (var a = 0; a < this.length; a++) {
  1933. var t = this[a].style;
  1934. t.webkitTransitionDuration = t.MsTransitionDuration = t.msTransitionDuration = t.MozTransitionDuration = t.OTransitionDuration = t.transitionDuration = e
  1935. }
  1936. return this
  1937. })),
  1938. window.Swiper = t
  1939. } (),
  1940. "undefined" != typeof module ? module.exports = window.Swiper: "function" == typeof define && define.amd && define([],
  1941. function() {
  1942. "use strict";
  1943. return window.Swiper
  1944. });