Authored by ccbikai

gulp ge

1 -!function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){function n(e,t,i){var n=e.find(t),r=e.find(i);n[0].mlellipsis(2),r[0].mlellipsis(3)}function r(e){var t=new Image,i="";i=e.data("avatar"),i&&(t.src=i),t.onload=function(){e.css("background-image","url("+i+")")}}function s(){var e,t=u("#yoho-header").outerHeight(),i=u(".loading-tip"),s=u(".avatar-wrap"),d=u(".avatar").height(),f=u(".star-info").css("margin-top");e=new v(".star-wrap",{height:u(window).height()-t-d-2*parseInt(f,10),pullDown:function(){b||(b=!0,a&&(a.destroy(!0,!0),a=""),l())}}),e.iScroll.on("scrollStart",function(){-1===this.directionY&&(x.slideDown(),i.slideDown())}),e.iScroll.on("scroll",function(){t>s.offset().top&&(u(".avatar-clone").show(),a||(a=new h(".avatar-0",{loop:!0,initialSlide:u(".avatar-1").find(".swiper-slide-active").index(),centeredSlides:!0,slidesPerView:"auto",loopedSlides:c,spaceBetween:10,slidesOffsetBefore:-u(".swiper-num").width(),watchSlidesProgress:!0,watchSlidesVisibility:!0}),a.params.control=o,o.params.control=a)),Math.abs(this.startY)<u(".banner-top").height()+d+u(".head-tab").height()&&u(".avatar-clone").hide()}),e.iScroll.on("scrollEnd",function(){1===this.directionY&&x.slideUp(600),i.slideUp()}),u(".avatar").each(function(e,t){u(t).addClass("avatar-"+e)}),u(".banner-swiper").find("li").length>1&&new h(".banner-swiper",{lazyLoading:!0,lazyLoadingInPrevNext:!0,loop:!0,autoplay:3e3,autoplayDisableOnInteraction:!1,paginationClickable:!0,slideElement:"li",pagination:".banner-top .pagination-inner"}),c>1&&(o=new h(".avatar-1",{loop:!0,centeredSlides:!0,slidesPerView:"auto",loopedSlides:c,spaceBetween:10,slidesOffsetBefore:-u(".swiper-num").width(),watchSlidesProgress:!0,watchSlidesVisibility:!0})),u(".article-avatar-swiper").find("li").length>1&&new h(".article-avatar-swiper",{initialSlide:0,lazyLoading:!0,lazyLoadingInPrevNext:!0,loop:!0,autoplay:5e3}),u(".star-info").find("li").length>0&&w.each(function(e,t){n(u(t),".article-title","p")}),u(".avatar-swiper li").on("click",function(){return u(this).hasClass("swiper-slide-active")?void 0:(p=u(this).index(),p>=2*c+1?(a&&a.slideTo(c+1,0),o.slideTo(c+1,0)):c-1>=p?(a&&a.slideTo(2*c-1,0),o.slideTo(2*c-1,0)):(a&&a.slideTo(p,0),o.slideTo(p,0)),!1)}),u(".rank-avatar").each(function(e,t){""!==u(t).attr("data-avatar")&&r(u(t))})}var o,a,l,p,c,u=i(2),h=i(3),d=i(11),f=i(4),m=i(14),g=i(12),v=i(16),y=u(window),w=u(".star-article"),x=u(".head-tab"),b=!1;i(8),f(u("img.lazy")),m.init(),y.on("mousewheel",!1),(l=function(){var e=u(".star-main");g.showLoadingMask(),u.ajax({url:"/guang/star/getIndexHtml",dataType:"html",success:function(t){b=!1,t||(b=!0,d.show("没有更多内容了")),e.html(t),c=u(".avatar .swiper-slide").length,u(".avatar-clone")&&u(".avatar-clone").remove(),u(".avatar li").each(function(){r(u(this).find("span"))}),e.before(u(".avatar-swiper").clone().addClass("avatar-clone").hide()),u(".cont-area").each(function(){n(u(this),".title",".cont-txt")}),g.hideLoadingMask(),f(u("img.lazy")),setTimeout(function(){s()},100)},error:function(){d.show("网络断开连接了~")}})})()},,function(e,t,i){var n,r;/*! 1 +!function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){function n(e,t,i){var n=e.find(t),r=e.find(i);n[0].mlellipsis(2),r[0].mlellipsis(3)}function r(e){var t=new Image,i="";i=e.data("avatar"),i&&(t.src=i),t.onload=function(){e.css("background-image","url("+i+")")}}function s(){var e,t=u("#yoho-header").outerHeight(),i=u(".loading-tip"),s=u(".avatar-wrap"),d=u(".avatar").height(),f=u(".star-info").css("margin-top");e=new v(".star-wrap",{height:u(window).height()-t-d-2*parseInt(f,10),pullDown:function(){b||(b=!0,a&&(a.destroy(!0,!0),a=""),l())}}),e.iScroll.on("scrollStart",function(){-1===this.directionY&&(x.slideDown(),i.slideDown())}),e.iScroll.on("scroll",function(){t>s.offset().top&&(u(".avatar-clone").show(),a||(a=new h(".avatar-0",{loop:!0,initialSlide:u(".avatar-1").find(".swiper-slide-active").index(),centeredSlides:!0,slidesPerView:"auto",loopedSlides:c,spaceBetween:10,slidesOffsetBefore:-u(".swiper-num").width(),watchSlidesProgress:!0,watchSlidesVisibility:!0}),a.params.control=o,o.params.control=a)),Math.abs(this.startY)<u(".banner-top").height()+d+u(".head-tab").height()&&u(".avatar-clone").hide()}),e.iScroll.on("scrollEnd",function(){1===this.directionY&&x.slideUp(600),i.slideUp()}),u(".avatar").each(function(e,t){u(t).addClass("avatar-"+e)}),u(".banner-swiper").find("li").length>1&&new h(".banner-swiper",{lazyLoading:!0,lazyLoadingInPrevNext:!0,loop:!0,autoplay:3e3,autoplayDisableOnInteraction:!1,paginationClickable:!0,slideElement:"li",pagination:".banner-top .pagination-inner"}),c>1&&(o=new h(".avatar-1",{loop:!0,centeredSlides:!0,slidesPerView:"auto",loopedSlides:c,spaceBetween:10,slidesOffsetBefore:-u(".swiper-num").width(),watchSlidesProgress:!0,watchSlidesVisibility:!0})),u(".article-avatar-swiper").find("li").length>1&&new h(".article-avatar-swiper",{initialSlide:0,lazyLoading:!0,lazyLoadingInPrevNext:!0,loop:!0,autoplay:5e3}),u(".star-info").find("li").length>0&&w.each(function(e,t){n(u(t),".article-title","p")}),u(".avatar-swiper li").on("click",function(){return u(this).hasClass("swiper-slide-active")?window.queryString.app_version?!1:void 0:(p=u(this).index(),p>=2*c+1?(a&&a.slideTo(c+1,0),o.slideTo(c+1,0)):c-1>=p?(a&&a.slideTo(2*c-1,0),o.slideTo(2*c-1,0)):(a&&a.slideTo(p,0),o.slideTo(p,0)),!1)}),u(".rank-avatar").each(function(e,t){""!==u(t).attr("data-avatar")&&r(u(t))})}var o,a,l,p,c,u=i(2),h=i(3),d=i(11),f=i(4),m=i(14),g=i(12),v=i(16),y=u(window),w=u(".star-article"),x=u(".head-tab"),b=!1;i(8),f(u("img.lazy")),m.init(),y.on("mousewheel",!1),(l=function(){var e=u(".star-main");g.showLoadingMask(),u.ajax({url:"/guang/star/getIndexHtml",dataType:"html",success:function(t){b=!1,t||(b=!0,d.show("没有更多内容了")),e.html(t),c=u(".avatar .swiper-slide").length,u(".avatar-clone")&&u(".avatar-clone").remove(),u(".avatar li").each(function(){r(u(this).find("span"))}),e.before(u(".avatar-swiper").clone().addClass("avatar-clone").hide()),u(".cont-area").each(function(){n(u(this),".title",".cont-txt")}),g.hideLoadingMask(),f(u("img.lazy")),setTimeout(function(){s()},100)},error:function(){d.show("网络断开连接了~")}})})()},,function(e,t,i){var n,r;/*!
2 * jQuery JavaScript Library v2.2.4 2 * jQuery JavaScript Library v2.2.4
3 * http://jquery.com/ 3 * http://jquery.com/
4 * 4 *
@@ -30,6 +30,6 @@ s[i](x.touchEvents.move,x.onTouchMove,o),s[i](x.touchEvents.end,x.onTouchEnd,!1) @@ -30,6 +30,6 @@ s[i](x.touchEvents.move,x.onTouchMove,o),s[i](x.touchEvents.end,x.onTouchEnd,!1)
30 * 30 *
31 * Copyright (c) 2016 Jorik Tangelder; 31 * Copyright (c) 2016 Jorik Tangelder;
32 * Licensed under the MIT license */ 32 * Licensed under the MIT license */
33 -!function(r,s,o,a){"use strict";function l(e,t,i){return setTimeout(d(e,i),t)}function p(e,t,i){return Array.isArray(e)?(c(e,i[t],i),!0):!1}function c(e,t,i){var n;if(e)if(e.forEach)e.forEach(t,i);else if(e.length!==a)for(n=0;n<e.length;)t.call(i,e[n],n,e),n++;else for(n in e)e.hasOwnProperty(n)&&t.call(i,e[n],n,e)}function u(e,t,i){var n="DEPRECATED METHOD: "+t+"\n"+i+" AT \n";return function(){var t=new Error("get-stack-trace"),i=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=r.console&&(r.console.warn||r.console.log);return s&&s.call(r.console,n,i),e.apply(this,arguments)}}function h(e,t,i){var n,r=t.prototype;n=e.prototype=Object.create(r),n.constructor=e,n._super=r,i&&me(n,i)}function d(e,t){return function(){return e.apply(t,arguments)}}function f(e,t){return typeof e==ye?e.apply(t?t[0]||a:a,t):e}function m(e,t){return e===a?t:e}function g(e,t,i){c(x(t),function(t){e.addEventListener(t,i,!1)})}function v(e,t,i){c(x(t),function(t){e.removeEventListener(t,i,!1)})}function y(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function w(e,t){return e.indexOf(t)>-1}function x(e){return e.trim().split(/\s+/g)}function b(e,t,i){if(e.indexOf&&!i)return e.indexOf(t);for(var n=0;n<e.length;){if(i&&e[n][i]==t||!i&&e[n]===t)return n;n++}return-1}function T(e){return Array.prototype.slice.call(e,0)}function S(e,t,i){for(var n=[],r=[],s=0;s<e.length;){var o=t?e[s][t]:e[s];b(r,o)<0&&n.push(e[s]),r[s]=o,s++}return i&&(n=t?n.sort(function(e,i){return e[t]>i[t]}):n.sort()),n}function C(e,t){for(var i,n,r=t[0].toUpperCase()+t.slice(1),s=0;s<ge.length;){if(i=ge[s],n=i?i+r:t,n in e)return n;s++}return a}function E(){return Ce++}function k(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||r}function A(e,t){var i=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){f(e.options.enable,[e])&&i.handler(t)},this.init()}function P(e){var t,i=e.options.inputClass;return new(t=i?i:Ae?W:Pe?F:ke?V:R)(e,D)}function D(e,t,i){var n=i.pointers.length,r=i.changedPointers.length,s=t&Ne&&n-r===0,o=t&(Be|Xe)&&n-r===0;i.isFirst=!!s,i.isFinal=!!o,s&&(e.session={}),i.eventType=t,z(e,i),e.emit("hammer.input",i),e.recognize(i),e.session.prevInput=i}function z(e,t){var i=e.session,n=t.pointers,r=n.length;i.firstInput||(i.firstInput=I(t)),r>1&&!i.firstMultiple?i.firstMultiple=I(t):1===r&&(i.firstMultiple=!1);var s=i.firstInput,o=i.firstMultiple,a=o?o.center:s.center,l=t.center=N(n);t.timeStamp=be(),t.deltaTime=t.timeStamp-s.timeStamp,t.angle=O(a,l),t.distance=X(a,l),M(i,t),t.offsetDirection=B(t.deltaX,t.deltaY);var p=H(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=p.x,t.overallVelocityY=p.y,t.overallVelocity=xe(p.x)>xe(p.y)?p.x:p.y,t.scale=o?_(o.pointers,n):1,t.rotation=o?Y(o.pointers,n):0,t.maxPointers=i.prevInput?t.pointers.length>i.prevInput.maxPointers?t.pointers.length:i.prevInput.maxPointers:t.pointers.length,L(i,t);var c=e.element;y(t.srcEvent.target,c)&&(c=t.srcEvent.target),t.target=c}function M(e,t){var i=t.center,n=e.offsetDelta||{},r=e.prevDelta||{},s=e.prevInput||{};t.eventType!==Ne&&s.eventType!==Be||(r=e.prevDelta={x:s.deltaX||0,y:s.deltaY||0},n=e.offsetDelta={x:i.x,y:i.y}),t.deltaX=r.x+(i.x-n.x),t.deltaY=r.y+(i.y-n.y)}function L(e,t){var i,n,r,s,o=e.lastInterval||t,l=t.timeStamp-o.timeStamp;if(t.eventType!=Xe&&(l>Ie||o.velocity===a)){var p=t.deltaX-o.deltaX,c=t.deltaY-o.deltaY,u=H(l,p,c);n=u.x,r=u.y,i=xe(u.x)>xe(u.y)?u.x:u.y,s=B(p,c),e.lastInterval=t}else i=o.velocity,n=o.velocityX,r=o.velocityY,s=o.direction;t.velocity=i,t.velocityX=n,t.velocityY=r,t.direction=s}function I(e){for(var t=[],i=0;i<e.pointers.length;)t[i]={clientX:we(e.pointers[i].clientX),clientY:we(e.pointers[i].clientY)},i++;return{timeStamp:be(),pointers:t,center:N(t),deltaX:e.deltaX,deltaY:e.deltaY}}function N(e){var t=e.length;if(1===t)return{x:we(e[0].clientX),y:we(e[0].clientY)};for(var i=0,n=0,r=0;t>r;)i+=e[r].clientX,n+=e[r].clientY,r++;return{x:we(i/t),y:we(n/t)}}function H(e,t,i){return{x:t/e||0,y:i/e||0}}function B(e,t){return e===t?Oe:xe(e)>=xe(t)?0>e?Ye:_e:0>t?Re:We}function X(e,t,i){i||(i=Ge);var n=t[i[0]]-e[i[0]],r=t[i[1]]-e[i[1]];return Math.sqrt(n*n+r*r)}function O(e,t,i){i||(i=Ge);var n=t[i[0]]-e[i[0]],r=t[i[1]]-e[i[1]];return 180*Math.atan2(r,n)/Math.PI}function Y(e,t){return O(t[1],t[0],Ve)+O(e[1],e[0],Ve)}function _(e,t){return X(t[0],t[1],Ve)/X(e[0],e[1],Ve)}function R(){this.evEl=$e,this.evWin=Ke,this.pressed=!1,A.apply(this,arguments)}function W(){this.evEl=Je,this.evWin=et,A.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function q(){this.evTarget=it,this.evWin=nt,this.started=!1,A.apply(this,arguments)}function j(e,t){var i=T(e.touches),n=T(e.changedTouches);return t&(Be|Xe)&&(i=S(i.concat(n),"identifier",!0)),[i,n]}function F(){this.evTarget=st,this.targetIds={},A.apply(this,arguments)}function G(e,t){var i=T(e.touches),n=this.targetIds;if(t&(Ne|He)&&1===i.length)return n[i[0].identifier]=!0,[i,i];var r,s,o=T(e.changedTouches),a=[],l=this.target;if(s=i.filter(function(e){return y(e.target,l)}),t===Ne)for(r=0;r<s.length;)n[s[r].identifier]=!0,r++;for(r=0;r<o.length;)n[o[r].identifier]&&a.push(o[r]),t&(Be|Xe)&&delete n[o[r].identifier],r++;return a.length?[S(s.concat(a),"identifier",!0),a]:void 0}function V(){A.apply(this,arguments);var e=d(this.handler,this);this.touch=new F(this.manager,e),this.mouse=new R(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function U(e,t){e&Ne?(this.primaryTouch=t.changedPointers[0].identifier,$.call(this,t)):e&(Be|Xe)&&$.call(this,t)}function $(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var i={x:t.clientX,y:t.clientY};this.lastTouches.push(i);var n=this.lastTouches,r=function(){var e=n.indexOf(i);e>-1&&n.splice(e,1)};setTimeout(r,ot)}}function K(e){for(var t=e.srcEvent.clientX,i=e.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var r=this.lastTouches[n],s=Math.abs(t-r.x),o=Math.abs(i-r.y);if(at>=s&&at>=o)return!0}return!1}function Q(e,t){this.manager=e,this.set(t)}function Z(e){if(w(e,dt))return dt;var t=w(e,ft),i=w(e,mt);return t&&i?dt:t||i?t?ft:mt:w(e,ht)?ht:ut}function J(){if(!pt)return!1;var e={},t=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(i){e[i]=t?r.CSS.supports("touch-action",i):!0}),e}function ee(e){this.options=me({},this.defaults,e||{}),this.id=E(),this.manager=null,this.options.enable=m(this.options.enable,!0),this.state=vt,this.simultaneous={},this.requireFail=[]}function te(e){return e&Tt?"cancel":e&xt?"end":e&wt?"move":e&yt?"start":""}function ie(e){return e==We?"down":e==Re?"up":e==Ye?"left":e==_e?"right":""}function ne(e,t){var i=t.manager;return i?i.get(e):e}function re(){ee.apply(this,arguments)}function se(){re.apply(this,arguments),this.pX=null,this.pY=null}function oe(){re.apply(this,arguments)}function ae(){ee.apply(this,arguments),this._timer=null,this._input=null}function le(){re.apply(this,arguments)}function pe(){re.apply(this,arguments)}function ce(){ee.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function ue(e,t){return t=t||{},t.recognizers=m(t.recognizers,ue.defaults.preset),new he(e,t)}function he(e,t){this.options=me({},ue.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=P(this),this.touchAction=new Q(this,this.options.touchAction),de(this,!0),c(this.options.recognizers,function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}function de(e,t){var i=e.element;if(i.style){var n;c(e.options.cssProps,function(r,s){n=C(i.style,s),t?(e.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=e.oldCssProps[n]||""}),t||(e.oldCssProps={})}}function fe(e,t){var i=s.createEvent("Event");i.initEvent(e,!0,!0),i.gesture=t,t.target.dispatchEvent(i)}var me,ge=["","webkit","Moz","MS","ms","o"],ve=s.createElement("div"),ye="function",we=Math.round,xe=Math.abs,be=Date.now;me="function"!=typeof Object.assign?function(e){if(e===a||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;i<arguments.length;i++){var n=arguments[i];if(n!==a&&null!==n)for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}return t}:Object.assign;var Te=u(function(e,t,i){for(var n=Object.keys(t),r=0;r<n.length;)(!i||i&&e[n[r]]===a)&&(e[n[r]]=t[n[r]]),r++;return e},"extend","Use `assign`."),Se=u(function(e,t){return Te(e,t,!0)},"merge","Use `assign`."),Ce=1,Ee=/mobile|tablet|ip(ad|hone|od)|android/i,ke="ontouchstart"in r,Ae=C(r,"PointerEvent")!==a,Pe=ke&&Ee.test(navigator.userAgent),De="touch",ze="pen",Me="mouse",Le="kinect",Ie=25,Ne=1,He=2,Be=4,Xe=8,Oe=1,Ye=2,_e=4,Re=8,We=16,qe=Ye|_e,je=Re|We,Fe=qe|je,Ge=["x","y"],Ve=["clientX","clientY"];A.prototype={handler:function(){},init:function(){this.evEl&&g(this.element,this.evEl,this.domHandler),this.evTarget&&g(this.target,this.evTarget,this.domHandler),this.evWin&&g(k(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&v(this.element,this.evEl,this.domHandler),this.evTarget&&v(this.target,this.evTarget,this.domHandler),this.evWin&&v(k(this.element),this.evWin,this.domHandler)}};var Ue={mousedown:Ne,mousemove:He,mouseup:Be},$e="mousedown",Ke="mousemove mouseup";h(R,A,{handler:function(e){var t=Ue[e.type];t&Ne&&0===e.button&&(this.pressed=!0),t&He&&1!==e.which&&(t=Be),this.pressed&&(t&Be&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:Me,srcEvent:e}))}});var Qe={pointerdown:Ne,pointermove:He,pointerup:Be,pointercancel:Xe,pointerout:Xe},Ze={2:De,3:ze,4:Me,5:Le},Je="pointerdown",et="pointermove pointerup pointercancel";r.MSPointerEvent&&!r.PointerEvent&&(Je="MSPointerDown",et="MSPointerMove MSPointerUp MSPointerCancel"),h(W,A,{handler:function(e){var t=this.store,i=!1,n=e.type.toLowerCase().replace("ms",""),r=Qe[n],s=Ze[e.pointerType]||e.pointerType,o=s==De,a=b(t,e.pointerId,"pointerId");r&Ne&&(0===e.button||o)?0>a&&(t.push(e),a=t.length-1):r&(Be|Xe)&&(i=!0),0>a||(t[a]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:s,srcEvent:e}),i&&t.splice(a,1))}});var tt={touchstart:Ne,touchmove:He,touchend:Be,touchcancel:Xe},it="touchstart",nt="touchstart touchmove touchend touchcancel";h(q,A,{handler:function(e){var t=tt[e.type];if(t===Ne&&(this.started=!0),this.started){var i=j.call(this,e,t);t&(Be|Xe)&&i[0].length-i[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:i[0],changedPointers:i[1],pointerType:De,srcEvent:e})}}});var rt={touchstart:Ne,touchmove:He,touchend:Be,touchcancel:Xe},st="touchstart touchmove touchend touchcancel";h(F,A,{handler:function(e){var t=rt[e.type],i=G.call(this,e,t);i&&this.callback(this.manager,t,{pointers:i[0],changedPointers:i[1],pointerType:De,srcEvent:e})}});var ot=2500,at=25;h(V,A,{handler:function(e,t,i){var n=i.pointerType==De,r=i.pointerType==Me;if(!(r&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(n)U.call(this,t,i);else if(r&&K.call(this,i))return;this.callback(e,t,i)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var lt=C(ve.style,"touchAction"),pt=lt!==a,ct="compute",ut="auto",ht="manipulation",dt="none",ft="pan-x",mt="pan-y",gt=J();Q.prototype={set:function(e){e==ct&&(e=this.compute()),pt&&this.manager.element.style&&gt[e]&&(this.manager.element.style[lt]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return c(this.manager.recognizers,function(t){f(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),Z(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,i=e.offsetDirection;if(this.manager.session.prevented)return void t.preventDefault();var n=this.actions,r=w(n,dt)&&!gt[dt],s=w(n,mt)&&!gt[mt],o=w(n,ft)&&!gt[ft];if(r){var a=1===e.pointers.length,l=e.distance<2,p=e.deltaTime<250;if(a&&l&&p)return}return o&&s?void 0:r||s&&i&qe||o&&i&je?this.preventSrc(t):void 0},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var vt=1,yt=2,wt=4,xt=8,bt=xt,Tt=16,St=32;ee.prototype={defaults:{},set:function(e){return me(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(p(e,"recognizeWith",this))return this;var t=this.simultaneous;return e=ne(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return p(e,"dropRecognizeWith",this)?this:(e=ne(e,this),delete this.simultaneous[e.id],this)},requireFailure:function(e){if(p(e,"requireFailure",this))return this;var t=this.requireFail;return e=ne(e,this),-1===b(t,e)&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(p(e,"dropRequireFailure",this))return this;e=ne(e,this);var t=b(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){function t(t){i.manager.emit(t,e)}var i=this,n=this.state;xt>n&&t(i.options.event+te(n)),t(i.options.event),e.additionalEvent&&t(e.additionalEvent),n>=xt&&t(i.options.event+te(n))},tryEmit:function(e){return this.canEmit()?this.emit(e):void(this.state=St)},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(St|vt)))return!1;e++}return!0},recognize:function(e){var t=me({},e);return f(this.options.enable,[this,t])?(this.state&(bt|Tt|St)&&(this.state=vt),this.state=this.process(t),void(this.state&(yt|wt|xt|Tt)&&this.tryEmit(t))):(this.reset(),void(this.state=St))},process:function(e){},getTouchAction:function(){},reset:function(){}},h(re,ee,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,i=e.eventType,n=t&(yt|wt),r=this.attrTest(e);return n&&(i&Xe||!r)?t|Tt:n||r?i&Be?t|xt:t&yt?t|wt:yt:St}}),h(se,re,{defaults:{event:"pan",threshold:10,pointers:1,direction:Fe},getTouchAction:function(){var e=this.options.direction,t=[];return e&qe&&t.push(mt),e&je&&t.push(ft),t},directionTest:function(e){var t=this.options,i=!0,n=e.distance,r=e.direction,s=e.deltaX,o=e.deltaY;return r&t.direction||(t.direction&qe?(r=0===s?Oe:0>s?Ye:_e,i=s!=this.pX,n=Math.abs(e.deltaX)):(r=0===o?Oe:0>o?Re:We,i=o!=this.pY,n=Math.abs(e.deltaY))),e.direction=r,i&&n>t.threshold&&r&t.direction},attrTest:function(e){return re.prototype.attrTest.call(this,e)&&(this.state&yt||!(this.state&yt)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=ie(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),h(oe,re,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[dt]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&yt)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),h(ae,ee,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ut]},process:function(e){var t=this.options,i=e.pointers.length===t.pointers,n=e.distance<t.threshold,r=e.deltaTime>t.time;if(this._input=e,!n||!i||e.eventType&(Be|Xe)&&!r)this.reset();else if(e.eventType&Ne)this.reset(),this._timer=l(function(){this.state=bt,this.tryEmit()},t.time,this);else if(e.eventType&Be)return bt;return St},reset:function(){clearTimeout(this._timer)},emit:function(e){this.state===bt&&(e&&e.eventType&Be?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=be(),this.manager.emit(this.options.event,this._input)))}}),h(le,re,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[dt]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&yt)}}),h(pe,re,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:qe|je,pointers:1},getTouchAction:function(){return se.prototype.getTouchAction.call(this)},attrTest:function(e){var t,i=this.options.direction;return i&(qe|je)?t=e.overallVelocity:i&qe?t=e.overallVelocityX:i&je&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&i&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&xe(t)>this.options.velocity&&e.eventType&Be},emit:function(e){var t=ie(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),h(ce,ee,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ht]},process:function(e){var t=this.options,i=e.pointers.length===t.pointers,n=e.distance<t.threshold,r=e.deltaTime<t.time;if(this.reset(),e.eventType&Ne&&0===this.count)return this.failTimeout();if(n&&r&&i){if(e.eventType!=Be)return this.failTimeout();var s=this.pTime?e.timeStamp-this.pTime<t.interval:!0,o=!this.pCenter||X(this.pCenter,e.center)<t.posThreshold;this.pTime=e.timeStamp,this.pCenter=e.center,o&&s?this.count+=1:this.count=1,this._input=e;var a=this.count%t.taps;if(0===a)return this.hasRequireFailures()?(this._timer=l(function(){this.state=bt,this.tryEmit()},t.interval,this),yt):bt}return St},failTimeout:function(){return this._timer=l(function(){this.state=St},this.options.interval,this),St},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==bt&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),ue.VERSION="2.0.7",ue.defaults={domEvents:!1,touchAction:ct,enable:!0,inputTarget:null,inputClass:null,preset:[[le,{enable:!1}],[oe,{enable:!1},["rotate"]],[pe,{direction:qe}],[se,{direction:qe},["swipe"]],[ce],[ce,{event:"doubletap",taps:2},["tap"]],[ae]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Ct=1,Et=2;he.prototype={set:function(e){return me(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?Et:Ct},recognize:function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var i,n=this.recognizers,r=t.curRecognizer;(!r||r&&r.state&bt)&&(r=t.curRecognizer=null);for(var s=0;s<n.length;)i=n[s],t.stopped===Et||r&&i!=r&&!i.canRecognizeWith(r)?i.reset():i.recognize(e),!r&&i.state&(yt|wt|xt)&&(r=t.curRecognizer=i),s++}},get:function(e){if(e instanceof ee)return e;for(var t=this.recognizers,i=0;i<t.length;i++)if(t[i].options.event==e)return t[i];return null},add:function(e){if(p(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(p(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,i=b(t,e);-1!==i&&(t.splice(i,1),this.touchAction.update())}return this},on:function(e,t){if(e!==a&&t!==a){var i=this.handlers;return c(x(e),function(e){i[e]=i[e]||[],i[e].push(t)}),this}},off:function(e,t){if(e!==a){var i=this.handlers;return c(x(e),function(e){t?i[e]&&i[e].splice(b(i[e],t),1):delete i[e]}),this}},emit:function(e,t){this.options.domEvents&&fe(e,t);var i=this.handlers[e]&&this.handlers[e].slice();if(i&&i.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var n=0;n<i.length;)i[n](t),n++}},destroy:function(){this.element&&de(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},me(ue,{INPUT_START:Ne,INPUT_MOVE:He,INPUT_END:Be,INPUT_CANCEL:Xe,STATE_POSSIBLE:vt,STATE_BEGAN:yt,STATE_CHANGED:wt,STATE_ENDED:xt,STATE_RECOGNIZED:bt,STATE_CANCELLED:Tt,STATE_FAILED:St,DIRECTION_NONE:Oe,DIRECTION_LEFT:Ye,DIRECTION_RIGHT:_e,DIRECTION_UP:Re,DIRECTION_DOWN:We,DIRECTION_HORIZONTAL:qe,DIRECTION_VERTICAL:je,DIRECTION_ALL:Fe,Manager:he,Input:A,TouchAction:Q,TouchInput:F,MouseInput:R,PointerEventInput:W,TouchMouseInput:V,SingleTouchInput:q,Recognizer:ee,AttrRecognizer:re,Tap:ce,Pan:se,Swipe:pe,Pinch:oe,Rotate:le,Press:ae,on:g,off:v,each:c,merge:Se,extend:Te,assign:me,inherit:h,bindFn:d,prefixed:C});var kt="undefined"!=typeof r?r:"undefined"!=typeof self?self:{};kt.Hammer=ue,n=function(){return ue}.call(t,i,t,e),!(n!==a&&(e.exports=n))}(window,document,"Hammer")},,function(e,t,i){function n(e,t){var i,n;"undefined"!=typeof e&&(i=e.toString(),n=t&&t>0?t:2e3,r.text(i).show(),s=setTimeout(function(){"block"===r.css("display")&&r.hide()},n))}var r,s,o=i(2);!function(){var e='<div id="yoho-tip" class="yoho-tip"></div>';o(".yoho-page").append(e),r=o("#yoho-tip"),r.on("touchend",function(){r.hide(),clearTimeout(s)})}(),t.show=n},function(e,t,i){function n(e){var t='<div class="loading-mask hide"><div class="loading"><div></div><div></div><div></div></div></div>';p=!0,e||(e=l),e.append(t),o=e.children(".loading-mask")}function r(){p||(n(),p=!0),o.removeClass("hide")}function s(){o.addClass("hide")}var o,a=i(2),l=a(".yoho-page"),p=!1;t.init=n,t.showLoadingMask=r,t.hideLoadingMask=s,t.show=r,t.hide=s},,function(e,t){t.init=function(){Element.prototype.getText=function(){return void 0==this.innerText?this.textContent:this.innerText},Element.prototype.setText=function(e){void 0==this.innerText?this.textContent=e||"":this.innerText=e||""},Element.prototype.getFinalStyle=function(e,t){var i;return i=window.getComputedStyle?window.getComputedStyle(this,null)[e]:this.currentStyle[e],void 0!=t&&(i=i*t+"px"),i.substring(0,i.toString().length-2)},Element.prototype.mlellipsis=function(e){var t=this.getText(),i=this.getAttribute("title");null==i?this.setAttribute("title",t):this.setText(i);var n=this.getFinalStyle("fontSize");if(/msie/i.test(navigator.userAgent))var r=this.getFinalStyle("lineHeight",n);else var r=this.getFinalStyle("lineHeight");var s=Math.floor(this.clientHeight);"norm"==r?(r=Number(1.5*n),this.setAttribute("style","line-height:"+r+"px")):r=Number(r);var o=e*r;if(s>=o){for(t=this.getText();3*o<this.clientHeight;)this.setText(t.substring(0,t.length/2)),t=this.getText();for(;this.clientHeight-o>r-1&&(t=this.getText(),!(t.length<3));)this.setText(t.replace(/(\s)*([a-zA-Z0-9]+|\W)(\.\.\.)?$/,"..."))}},Element.prototype.getTextLineNumber=function(e){var t=this.getText(),i=this.getAttribute("title");null==i?this.setAttribute("title",t):this.setText(i);var n=this.getFinalStyle("fontSize");if(/msie/i.test(navigator.userAgent))var r=this.getFinalStyle("lineHeight",n);else var r=this.getFinalStyle("lineHeight");var s=this.clientHeight;return"norm"==r?(r=Number(1.5*n),this.setAttribute("style","line-height:"+r+"px")):r=Number(r),s/r}}},,function(e,t,i){function n(e,t){var i,n,o,a=r(window),l=!1;i=r(e),i.length&&(t.height&&i.height(t.height),o=-i.outerHeight(),this.iScroll=new s(i.get(0),{click:!0,probeType:3}),this.iScroll.on("scrollStart",function(){this.y>=o&&(l=!0),n=this.y,a.trigger("scroll")}),this.iScroll.on("scrollEnd",function(){l&&-1===this.directionY&&t.pullDown&&t.pullDown(),l=!1,n===this.y&&1===this.directionY&&t.pullUp&&t.pullUp(),a.trigger("scroll")}))}var r=i(2),s=i(17);e.exports=n},function(e,t,i){var n;/*! iScroll v5.2.0 ~ (c) 2008-2016 Matteo Spinelli ~ http://cubiq.org/license */ 33 +!function(r,s,o,a){"use strict";function l(e,t,i){return setTimeout(d(e,i),t)}function p(e,t,i){return Array.isArray(e)?(c(e,i[t],i),!0):!1}function c(e,t,i){var n;if(e)if(e.forEach)e.forEach(t,i);else if(e.length!==a)for(n=0;n<e.length;)t.call(i,e[n],n,e),n++;else for(n in e)e.hasOwnProperty(n)&&t.call(i,e[n],n,e)}function u(e,t,i){var n="DEPRECATED METHOD: "+t+"\n"+i+" AT \n";return function(){var t=new Error("get-stack-trace"),i=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=r.console&&(r.console.warn||r.console.log);return s&&s.call(r.console,n,i),e.apply(this,arguments)}}function h(e,t,i){var n,r=t.prototype;n=e.prototype=Object.create(r),n.constructor=e,n._super=r,i&&me(n,i)}function d(e,t){return function(){return e.apply(t,arguments)}}function f(e,t){return typeof e==ye?e.apply(t?t[0]||a:a,t):e}function m(e,t){return e===a?t:e}function g(e,t,i){c(x(t),function(t){e.addEventListener(t,i,!1)})}function v(e,t,i){c(x(t),function(t){e.removeEventListener(t,i,!1)})}function y(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function w(e,t){return e.indexOf(t)>-1}function x(e){return e.trim().split(/\s+/g)}function b(e,t,i){if(e.indexOf&&!i)return e.indexOf(t);for(var n=0;n<e.length;){if(i&&e[n][i]==t||!i&&e[n]===t)return n;n++}return-1}function T(e){return Array.prototype.slice.call(e,0)}function S(e,t,i){for(var n=[],r=[],s=0;s<e.length;){var o=t?e[s][t]:e[s];b(r,o)<0&&n.push(e[s]),r[s]=o,s++}return i&&(n=t?n.sort(function(e,i){return e[t]>i[t]}):n.sort()),n}function C(e,t){for(var i,n,r=t[0].toUpperCase()+t.slice(1),s=0;s<ge.length;){if(i=ge[s],n=i?i+r:t,n in e)return n;s++}return a}function E(){return Ce++}function k(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||r}function A(e,t){var i=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){f(e.options.enable,[e])&&i.handler(t)},this.init()}function P(e){var t,i=e.options.inputClass;return new(t=i?i:Ae?W:Pe?F:ke?V:R)(e,D)}function D(e,t,i){var n=i.pointers.length,r=i.changedPointers.length,s=t&Ne&&n-r===0,o=t&(Be|Xe)&&n-r===0;i.isFirst=!!s,i.isFinal=!!o,s&&(e.session={}),i.eventType=t,z(e,i),e.emit("hammer.input",i),e.recognize(i),e.session.prevInput=i}function z(e,t){var i=e.session,n=t.pointers,r=n.length;i.firstInput||(i.firstInput=I(t)),r>1&&!i.firstMultiple?i.firstMultiple=I(t):1===r&&(i.firstMultiple=!1);var s=i.firstInput,o=i.firstMultiple,a=o?o.center:s.center,l=t.center=N(n);t.timeStamp=be(),t.deltaTime=t.timeStamp-s.timeStamp,t.angle=O(a,l),t.distance=X(a,l),M(i,t),t.offsetDirection=B(t.deltaX,t.deltaY);var p=H(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=p.x,t.overallVelocityY=p.y,t.overallVelocity=xe(p.x)>xe(p.y)?p.x:p.y,t.scale=o?_(o.pointers,n):1,t.rotation=o?Y(o.pointers,n):0,t.maxPointers=i.prevInput?t.pointers.length>i.prevInput.maxPointers?t.pointers.length:i.prevInput.maxPointers:t.pointers.length,L(i,t);var c=e.element;y(t.srcEvent.target,c)&&(c=t.srcEvent.target),t.target=c}function M(e,t){var i=t.center,n=e.offsetDelta||{},r=e.prevDelta||{},s=e.prevInput||{};t.eventType!==Ne&&s.eventType!==Be||(r=e.prevDelta={x:s.deltaX||0,y:s.deltaY||0},n=e.offsetDelta={x:i.x,y:i.y}),t.deltaX=r.x+(i.x-n.x),t.deltaY=r.y+(i.y-n.y)}function L(e,t){var i,n,r,s,o=e.lastInterval||t,l=t.timeStamp-o.timeStamp;if(t.eventType!=Xe&&(l>Ie||o.velocity===a)){var p=t.deltaX-o.deltaX,c=t.deltaY-o.deltaY,u=H(l,p,c);n=u.x,r=u.y,i=xe(u.x)>xe(u.y)?u.x:u.y,s=B(p,c),e.lastInterval=t}else i=o.velocity,n=o.velocityX,r=o.velocityY,s=o.direction;t.velocity=i,t.velocityX=n,t.velocityY=r,t.direction=s}function I(e){for(var t=[],i=0;i<e.pointers.length;)t[i]={clientX:we(e.pointers[i].clientX),clientY:we(e.pointers[i].clientY)},i++;return{timeStamp:be(),pointers:t,center:N(t),deltaX:e.deltaX,deltaY:e.deltaY}}function N(e){var t=e.length;if(1===t)return{x:we(e[0].clientX),y:we(e[0].clientY)};for(var i=0,n=0,r=0;t>r;)i+=e[r].clientX,n+=e[r].clientY,r++;return{x:we(i/t),y:we(n/t)}}function H(e,t,i){return{x:t/e||0,y:i/e||0}}function B(e,t){return e===t?Oe:xe(e)>=xe(t)?0>e?Ye:_e:0>t?Re:We}function X(e,t,i){i||(i=Ge);var n=t[i[0]]-e[i[0]],r=t[i[1]]-e[i[1]];return Math.sqrt(n*n+r*r)}function O(e,t,i){i||(i=Ge);var n=t[i[0]]-e[i[0]],r=t[i[1]]-e[i[1]];return 180*Math.atan2(r,n)/Math.PI}function Y(e,t){return O(t[1],t[0],Ve)+O(e[1],e[0],Ve)}function _(e,t){return X(t[0],t[1],Ve)/X(e[0],e[1],Ve)}function R(){this.evEl=$e,this.evWin=Ke,this.pressed=!1,A.apply(this,arguments)}function W(){this.evEl=Je,this.evWin=et,A.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function q(){this.evTarget=it,this.evWin=nt,this.started=!1,A.apply(this,arguments)}function j(e,t){var i=T(e.touches),n=T(e.changedTouches);return t&(Be|Xe)&&(i=S(i.concat(n),"identifier",!0)),[i,n]}function F(){this.evTarget=st,this.targetIds={},A.apply(this,arguments)}function G(e,t){var i=T(e.touches),n=this.targetIds;if(t&(Ne|He)&&1===i.length)return n[i[0].identifier]=!0,[i,i];var r,s,o=T(e.changedTouches),a=[],l=this.target;if(s=i.filter(function(e){return y(e.target,l)}),t===Ne)for(r=0;r<s.length;)n[s[r].identifier]=!0,r++;for(r=0;r<o.length;)n[o[r].identifier]&&a.push(o[r]),t&(Be|Xe)&&delete n[o[r].identifier],r++;return a.length?[S(s.concat(a),"identifier",!0),a]:void 0}function V(){A.apply(this,arguments);var e=d(this.handler,this);this.touch=new F(this.manager,e),this.mouse=new R(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function U(e,t){e&Ne?(this.primaryTouch=t.changedPointers[0].identifier,$.call(this,t)):e&(Be|Xe)&&$.call(this,t)}function $(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var i={x:t.clientX,y:t.clientY};this.lastTouches.push(i);var n=this.lastTouches,r=function(){var e=n.indexOf(i);e>-1&&n.splice(e,1)};setTimeout(r,ot)}}function K(e){for(var t=e.srcEvent.clientX,i=e.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var r=this.lastTouches[n],s=Math.abs(t-r.x),o=Math.abs(i-r.y);if(at>=s&&at>=o)return!0}return!1}function Q(e,t){this.manager=e,this.set(t)}function Z(e){if(w(e,dt))return dt;var t=w(e,ft),i=w(e,mt);return t&&i?dt:t||i?t?ft:mt:w(e,ht)?ht:ut}function J(){if(!pt)return!1;var e={},t=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(i){e[i]=t?r.CSS.supports("touch-action",i):!0}),e}function ee(e){this.options=me({},this.defaults,e||{}),this.id=E(),this.manager=null,this.options.enable=m(this.options.enable,!0),this.state=vt,this.simultaneous={},this.requireFail=[]}function te(e){return e&Tt?"cancel":e&xt?"end":e&wt?"move":e&yt?"start":""}function ie(e){return e==We?"down":e==Re?"up":e==Ye?"left":e==_e?"right":""}function ne(e,t){var i=t.manager;return i?i.get(e):e}function re(){ee.apply(this,arguments)}function se(){re.apply(this,arguments),this.pX=null,this.pY=null}function oe(){re.apply(this,arguments)}function ae(){ee.apply(this,arguments),this._timer=null,this._input=null}function le(){re.apply(this,arguments)}function pe(){re.apply(this,arguments)}function ce(){ee.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function ue(e,t){return t=t||{},t.recognizers=m(t.recognizers,ue.defaults.preset),new he(e,t)}function he(e,t){this.options=me({},ue.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=P(this),this.touchAction=new Q(this,this.options.touchAction),de(this,!0),c(this.options.recognizers,function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}function de(e,t){var i=e.element;if(i.style){var n;c(e.options.cssProps,function(r,s){n=C(i.style,s),t?(e.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=e.oldCssProps[n]||""}),t||(e.oldCssProps={})}}function fe(e,t){var i=s.createEvent("Event");i.initEvent(e,!0,!0),i.gesture=t,t.target.dispatchEvent(i)}var me,ge=["","webkit","Moz","MS","ms","o"],ve=s.createElement("div"),ye="function",we=Math.round,xe=Math.abs,be=Date.now;me="function"!=typeof Object.assign?function(e){if(e===a||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;i<arguments.length;i++){var n=arguments[i];if(n!==a&&null!==n)for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}return t}:Object.assign;var Te=u(function(e,t,i){for(var n=Object.keys(t),r=0;r<n.length;)(!i||i&&e[n[r]]===a)&&(e[n[r]]=t[n[r]]),r++;return e},"extend","Use `assign`."),Se=u(function(e,t){return Te(e,t,!0)},"merge","Use `assign`."),Ce=1,Ee=/mobile|tablet|ip(ad|hone|od)|android/i,ke="ontouchstart"in r,Ae=C(r,"PointerEvent")!==a,Pe=ke&&Ee.test(navigator.userAgent),De="touch",ze="pen",Me="mouse",Le="kinect",Ie=25,Ne=1,He=2,Be=4,Xe=8,Oe=1,Ye=2,_e=4,Re=8,We=16,qe=Ye|_e,je=Re|We,Fe=qe|je,Ge=["x","y"],Ve=["clientX","clientY"];A.prototype={handler:function(){},init:function(){this.evEl&&g(this.element,this.evEl,this.domHandler),this.evTarget&&g(this.target,this.evTarget,this.domHandler),this.evWin&&g(k(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&v(this.element,this.evEl,this.domHandler),this.evTarget&&v(this.target,this.evTarget,this.domHandler),this.evWin&&v(k(this.element),this.evWin,this.domHandler)}};var Ue={mousedown:Ne,mousemove:He,mouseup:Be},$e="mousedown",Ke="mousemove mouseup";h(R,A,{handler:function(e){var t=Ue[e.type];t&Ne&&0===e.button&&(this.pressed=!0),t&He&&1!==e.which&&(t=Be),this.pressed&&(t&Be&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:Me,srcEvent:e}))}});var Qe={pointerdown:Ne,pointermove:He,pointerup:Be,pointercancel:Xe,pointerout:Xe},Ze={2:De,3:ze,4:Me,5:Le},Je="pointerdown",et="pointermove pointerup pointercancel";r.MSPointerEvent&&!r.PointerEvent&&(Je="MSPointerDown",et="MSPointerMove MSPointerUp MSPointerCancel"),h(W,A,{handler:function(e){var t=this.store,i=!1,n=e.type.toLowerCase().replace("ms",""),r=Qe[n],s=Ze[e.pointerType]||e.pointerType,o=s==De,a=b(t,e.pointerId,"pointerId");r&Ne&&(0===e.button||o)?0>a&&(t.push(e),a=t.length-1):r&(Be|Xe)&&(i=!0),0>a||(t[a]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:s,srcEvent:e}),i&&t.splice(a,1))}});var tt={touchstart:Ne,touchmove:He,touchend:Be,touchcancel:Xe},it="touchstart",nt="touchstart touchmove touchend touchcancel";h(q,A,{handler:function(e){var t=tt[e.type];if(t===Ne&&(this.started=!0),this.started){var i=j.call(this,e,t);t&(Be|Xe)&&i[0].length-i[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:i[0],changedPointers:i[1],pointerType:De,srcEvent:e})}}});var rt={touchstart:Ne,touchmove:He,touchend:Be,touchcancel:Xe},st="touchstart touchmove touchend touchcancel";h(F,A,{handler:function(e){var t=rt[e.type],i=G.call(this,e,t);i&&this.callback(this.manager,t,{pointers:i[0],changedPointers:i[1],pointerType:De,srcEvent:e})}});var ot=2500,at=25;h(V,A,{handler:function(e,t,i){var n=i.pointerType==De,r=i.pointerType==Me;if(!(r&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(n)U.call(this,t,i);else if(r&&K.call(this,i))return;this.callback(e,t,i)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var lt=C(ve.style,"touchAction"),pt=lt!==a,ct="compute",ut="auto",ht="manipulation",dt="none",ft="pan-x",mt="pan-y",gt=J();Q.prototype={set:function(e){e==ct&&(e=this.compute()),pt&&this.manager.element.style&&gt[e]&&(this.manager.element.style[lt]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return c(this.manager.recognizers,function(t){f(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),Z(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,i=e.offsetDirection;if(this.manager.session.prevented)return void t.preventDefault();var n=this.actions,r=w(n,dt)&&!gt[dt],s=w(n,mt)&&!gt[mt],o=w(n,ft)&&!gt[ft];if(r){var a=1===e.pointers.length,l=e.distance<2,p=e.deltaTime<250;if(a&&l&&p)return}return o&&s?void 0:r||s&&i&qe||o&&i&je?this.preventSrc(t):void 0},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var vt=1,yt=2,wt=4,xt=8,bt=xt,Tt=16,St=32;ee.prototype={defaults:{},set:function(e){return me(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(p(e,"recognizeWith",this))return this;var t=this.simultaneous;return e=ne(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return p(e,"dropRecognizeWith",this)?this:(e=ne(e,this),delete this.simultaneous[e.id],this)},requireFailure:function(e){if(p(e,"requireFailure",this))return this;var t=this.requireFail;return e=ne(e,this),-1===b(t,e)&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(p(e,"dropRequireFailure",this))return this;e=ne(e,this);var t=b(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){function t(t){i.manager.emit(t,e)}var i=this,n=this.state;xt>n&&t(i.options.event+te(n)),t(i.options.event),e.additionalEvent&&t(e.additionalEvent),n>=xt&&t(i.options.event+te(n))},tryEmit:function(e){return this.canEmit()?this.emit(e):void(this.state=St)},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(St|vt)))return!1;e++}return!0},recognize:function(e){var t=me({},e);return f(this.options.enable,[this,t])?(this.state&(bt|Tt|St)&&(this.state=vt),this.state=this.process(t),void(this.state&(yt|wt|xt|Tt)&&this.tryEmit(t))):(this.reset(),void(this.state=St))},process:function(e){},getTouchAction:function(){},reset:function(){}},h(re,ee,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,i=e.eventType,n=t&(yt|wt),r=this.attrTest(e);return n&&(i&Xe||!r)?t|Tt:n||r?i&Be?t|xt:t&yt?t|wt:yt:St}}),h(se,re,{defaults:{event:"pan",threshold:10,pointers:1,direction:Fe},getTouchAction:function(){var e=this.options.direction,t=[];return e&qe&&t.push(mt),e&je&&t.push(ft),t},directionTest:function(e){var t=this.options,i=!0,n=e.distance,r=e.direction,s=e.deltaX,o=e.deltaY;return r&t.direction||(t.direction&qe?(r=0===s?Oe:0>s?Ye:_e,i=s!=this.pX,n=Math.abs(e.deltaX)):(r=0===o?Oe:0>o?Re:We,i=o!=this.pY,n=Math.abs(e.deltaY))),e.direction=r,i&&n>t.threshold&&r&t.direction},attrTest:function(e){return re.prototype.attrTest.call(this,e)&&(this.state&yt||!(this.state&yt)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=ie(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),h(oe,re,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[dt]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&yt)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),h(ae,ee,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ut]},process:function(e){var t=this.options,i=e.pointers.length===t.pointers,n=e.distance<t.threshold,r=e.deltaTime>t.time;if(this._input=e,!n||!i||e.eventType&(Be|Xe)&&!r)this.reset();else if(e.eventType&Ne)this.reset(),this._timer=l(function(){this.state=bt,this.tryEmit()},t.time,this);else if(e.eventType&Be)return bt;return St},reset:function(){clearTimeout(this._timer)},emit:function(e){this.state===bt&&(e&&e.eventType&Be?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=be(),this.manager.emit(this.options.event,this._input)))}}),h(le,re,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[dt]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&yt)}}),h(pe,re,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:qe|je,pointers:1},getTouchAction:function(){return se.prototype.getTouchAction.call(this)},attrTest:function(e){var t,i=this.options.direction;return i&(qe|je)?t=e.overallVelocity:i&qe?t=e.overallVelocityX:i&je&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&i&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&xe(t)>this.options.velocity&&e.eventType&Be},emit:function(e){var t=ie(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),h(ce,ee,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ht]},process:function(e){var t=this.options,i=e.pointers.length===t.pointers,n=e.distance<t.threshold,r=e.deltaTime<t.time;if(this.reset(),e.eventType&Ne&&0===this.count)return this.failTimeout();if(n&&r&&i){if(e.eventType!=Be)return this.failTimeout();var s=this.pTime?e.timeStamp-this.pTime<t.interval:!0,o=!this.pCenter||X(this.pCenter,e.center)<t.posThreshold;this.pTime=e.timeStamp,this.pCenter=e.center,o&&s?this.count+=1:this.count=1,this._input=e;var a=this.count%t.taps;if(0===a)return this.hasRequireFailures()?(this._timer=l(function(){this.state=bt,this.tryEmit()},t.interval,this),yt):bt}return St},failTimeout:function(){return this._timer=l(function(){this.state=St},this.options.interval,this),St},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==bt&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),ue.VERSION="2.0.7",ue.defaults={domEvents:!1,touchAction:ct,enable:!0,inputTarget:null,inputClass:null,preset:[[le,{enable:!1}],[oe,{enable:!1},["rotate"]],[pe,{direction:qe}],[se,{direction:qe},["swipe"]],[ce],[ce,{event:"doubletap",taps:2},["tap"]],[ae]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Ct=1,Et=2;he.prototype={set:function(e){return me(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?Et:Ct},recognize:function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var i,n=this.recognizers,r=t.curRecognizer;(!r||r&&r.state&bt)&&(r=t.curRecognizer=null);for(var s=0;s<n.length;)i=n[s],t.stopped===Et||r&&i!=r&&!i.canRecognizeWith(r)?i.reset():i.recognize(e),!r&&i.state&(yt|wt|xt)&&(r=t.curRecognizer=i),s++}},get:function(e){if(e instanceof ee)return e;for(var t=this.recognizers,i=0;i<t.length;i++)if(t[i].options.event==e)return t[i];return null},add:function(e){if(p(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(p(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,i=b(t,e);-1!==i&&(t.splice(i,1),this.touchAction.update())}return this},on:function(e,t){if(e!==a&&t!==a){var i=this.handlers;return c(x(e),function(e){i[e]=i[e]||[],i[e].push(t)}),this}},off:function(e,t){if(e!==a){var i=this.handlers;return c(x(e),function(e){t?i[e]&&i[e].splice(b(i[e],t),1):delete i[e]}),this}},emit:function(e,t){this.options.domEvents&&fe(e,t);var i=this.handlers[e]&&this.handlers[e].slice();if(i&&i.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var n=0;n<i.length;)i[n](t),n++}},destroy:function(){this.element&&de(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},me(ue,{INPUT_START:Ne,INPUT_MOVE:He,INPUT_END:Be,INPUT_CANCEL:Xe,STATE_POSSIBLE:vt,STATE_BEGAN:yt,STATE_CHANGED:wt,STATE_ENDED:xt,STATE_RECOGNIZED:bt,STATE_CANCELLED:Tt,STATE_FAILED:St,DIRECTION_NONE:Oe,DIRECTION_LEFT:Ye,DIRECTION_RIGHT:_e,DIRECTION_UP:Re,DIRECTION_DOWN:We,DIRECTION_HORIZONTAL:qe,DIRECTION_VERTICAL:je,DIRECTION_ALL:Fe,Manager:he,Input:A,TouchAction:Q,TouchInput:F,MouseInput:R,PointerEventInput:W,TouchMouseInput:V,SingleTouchInput:q,Recognizer:ee,AttrRecognizer:re,Tap:ce,Pan:se,Swipe:pe,Pinch:oe,Rotate:le,Press:ae,on:g,off:v,each:c,merge:Se,extend:Te,assign:me,inherit:h,bindFn:d,prefixed:C});var kt="undefined"!=typeof r?r:"undefined"!=typeof self?self:{};kt.Hammer=ue,n=function(){return ue}.call(t,i,t,e),!(n!==a&&(e.exports=n))}(window,document,"Hammer")},,function(e,t,i){function n(e,t){var i,n;"undefined"!=typeof e&&(i=e.toString(),n=t&&t>0?t:2e3,r.text(i).show(),s=setTimeout(function(){"block"===r.css("display")&&r.hide()},n))}var r,s,o=i(2);!function(){var e='<div id="yoho-tip" class="yoho-tip"></div>';o(".yoho-page").append(e),r=o("#yoho-tip"),r.on("touchend",function(){r.hide(),clearTimeout(s)})}(),t.show=n},function(e,t,i){function n(e){var t='<div class="loading-mask hide"><div class="loading"><div></div><div></div><div></div></div></div>';p=!0,e||(e=l),e.append(t),o=e.children(".loading-mask")}function r(){p||(n(),p=!0),o.removeClass("hide")}function s(){o.addClass("hide")}var o,a=i(2),l=a(".yoho-page"),p=!1;t.init=n,t.showLoadingMask=r,t.hideLoadingMask=s,t.show=r,t.hide=s},,function(e,t){t.init=function(){Element.prototype.getText=function(){return void 0==this.innerText?this.textContent:this.innerText},Element.prototype.setText=function(e){void 0==this.innerText?this.textContent=e||"":this.innerText=e||""},Element.prototype.getFinalStyle=function(e,t){var i;return i=window.getComputedStyle?window.getComputedStyle(this,null)[e]:this.currentStyle[e],void 0!=t&&(i=i*t+"px"),i.substring(0,i.toString().length-2)},Element.prototype.mlellipsis=function(e){var t=this.getText(),i=this.getAttribute("title");null==i?this.setAttribute("title",t):this.setText(i);var n=this.getFinalStyle("fontSize");if(/msie/i.test(navigator.userAgent))var r=this.getFinalStyle("lineHeight",n);else var r=this.getFinalStyle("lineHeight");var s=Math.floor(this.clientHeight);"norm"==r?(r=Number(1.5*n),this.setAttribute("style","line-height:"+r+"px")):r=Number(r);var o=e*r;if(s>=o){for(t=this.getText();3*o<this.clientHeight;)this.setText(t.substring(0,t.length/2)),t=this.getText();for(;this.clientHeight-o>r-1&&(t=this.getText(),!(t.length<3));)this.setText(t.replace(/(\s)*([a-zA-Z0-9]+|\W)(\.\.\.)?$/,"..."))}},Element.prototype.getTextLineNumber=function(e){var t=this.getText(),i=this.getAttribute("title");null==i?this.setAttribute("title",t):this.setText(i);var n=this.getFinalStyle("fontSize");if(/msie/i.test(navigator.userAgent))var r=this.getFinalStyle("lineHeight",n);else var r=this.getFinalStyle("lineHeight");var s=this.clientHeight;return"norm"==r?(r=Number(1.5*n),this.setAttribute("style","line-height:"+r+"px")):r=Number(r),s/r}}},,function(e,t,i){function n(e,t){var i,n,o=r(window),a=!1;i=r(e),i.length&&(t.height&&i.height(t.height),this.iScroll=new s(i.get(0),{click:!0,probeType:3}),this.iScroll.on("scrollStart",function(){0===this.y&&(a=!0),n=this.y,o.trigger("scroll")}),this.iScroll.on("scrollEnd",function(){a&&-1===this.directionY&&t.pullDown&&t.pullDown(),a=!1,n===this.y&&1===this.directionY&&t.pullUp&&t.pullUp(),o.trigger("scroll")}))}var r=i(2),s=i(17);e.exports=n},function(e,t,i){var n;/*! iScroll v5.2.0 ~ (c) 2008-2016 Matteo Spinelli ~ http://cubiq.org/license */
34 !function(r,s,o){function a(e,t){this.wrapper="string"==typeof e?s.querySelector(e):e,this.scroller=this.wrapper.children[0],this.scrollerStyle=this.scroller.style,this.options={resizeScrollbars:!0,mouseWheelSpeed:20,snapThreshold:.334,disablePointer:!u.hasPointer,disableTouch:u.hasPointer||!u.hasTouch,disableMouse:u.hasPointer||u.hasTouch,startX:0,startY:0,scrollY:!0,directionLockThreshold:5,momentum:!0,bounce:!0,bounceTime:600,bounceEasing:"",preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:"undefined"==typeof r.onmousedown};for(var i in t)this.options[i]=t[i];this.translateZ=this.options.HWCompositing&&u.hasPerspective?" translateZ(0)":"",this.options.useTransition=u.hasTransition&&this.options.useTransition,this.options.useTransform=u.hasTransform&&this.options.useTransform,this.options.eventPassthrough=this.options.eventPassthrough===!0?"vertical":this.options.eventPassthrough,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollY="vertical"==this.options.eventPassthrough?!1:this.options.scrollY,this.options.scrollX="horizontal"==this.options.eventPassthrough?!1:this.options.scrollX,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,this.options.bounceEasing="string"==typeof this.options.bounceEasing?u.ease[this.options.bounceEasing]||u.ease.circular:this.options.bounceEasing,this.options.resizePolling=void 0===this.options.resizePolling?60:this.options.resizePolling,this.options.tap===!0&&(this.options.tap="tap"),"scale"==this.options.shrinkScrollbars&&(this.options.useTransition=!1),this.options.invertWheelDirection=this.options.invertWheelDirection?-1:1,3==this.options.probeType&&(this.options.useTransition=!1),this.x=0,this.y=0,this.directionX=0,this.directionY=0,this._events={},this._init(),this.refresh(),this.scrollTo(this.options.startX,this.options.startY),this.enable()}function l(e,t,i){var n=s.createElement("div"),r=s.createElement("div");return i===!0&&(n.style.cssText="position:absolute;z-index:9999",r.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px"),r.className="iScrollIndicator","h"==e?(i===!0&&(n.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",r.style.height="100%"),n.className="iScrollHorizontalScrollbar"):(i===!0&&(n.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",r.style.width="100%"),n.className="iScrollVerticalScrollbar"),n.style.cssText+=";overflow:hidden",t||(n.style.pointerEvents="none"),n.appendChild(r),n}function p(e,t){this.wrapper="string"==typeof t.el?s.querySelector(t.el):t.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=e,this.options={listenX:!0,listenY:!0,interactive:!1,resize:!0,defaultScrollbars:!1,shrink:!1,fade:!1,speedRatioX:0,speedRatioY:0};for(var i in t)this.options[i]=t[i];if(this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.options.interactive&&(this.options.disableTouch||(u.addEvent(this.indicator,"touchstart",this),u.addEvent(r,"touchend",this)),this.options.disablePointer||(u.addEvent(this.indicator,u.prefixPointerEvent("pointerdown"),this),u.addEvent(r,u.prefixPointerEvent("pointerup"),this)),this.options.disableMouse||(u.addEvent(this.indicator,"mousedown",this),u.addEvent(r,"mouseup",this))),this.options.fade){this.wrapperStyle[u.style.transform]=this.scroller.translateZ;var n=u.style.transitionDuration;this.wrapperStyle[n]=u.isBadAndroid?"0.0001ms":"0ms";var o=this;u.isBadAndroid&&c(function(){"0.0001ms"===o.wrapperStyle[n]&&(o.wrapperStyle[n]="0s")}),this.wrapperStyle.opacity="0"}}var c=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.oRequestAnimationFrame||r.msRequestAnimationFrame||function(e){r.setTimeout(e,1e3/60)},u=function(){function e(e){return n===!1?!1:""===n?e:n+e.charAt(0).toUpperCase()+e.substr(1)}var t={},i=s.createElement("div").style,n=function(){for(var e,t=["t","webkitT","MozT","msT","OT"],n=0,r=t.length;r>n;n++)if(e=t[n]+"ransform",e in i)return t[n].substr(0,t[n].length-1);return!1}();t.getTime=Date.now||function(){return(new Date).getTime()},t.extend=function(e,t){for(var i in t)e[i]=t[i]},t.addEvent=function(e,t,i,n){e.addEventListener(t,i,!!n)},t.removeEvent=function(e,t,i,n){e.removeEventListener(t,i,!!n)},t.prefixPointerEvent=function(e){return r.MSPointerEvent?"MSPointer"+e.charAt(7).toUpperCase()+e.substr(8):e},t.momentum=function(e,t,i,n,r,s){var a,l,p=e-t,c=o.abs(p)/i;return s=void 0===s?6e-4:s,a=e+c*c/(2*s)*(0>p?-1:1),l=c/s,n>a?(a=r?n-r/2.5*(c/8):n,p=o.abs(a-e),l=p/c):a>0&&(a=r?r/2.5*(c/8):0,p=o.abs(e)+a,l=p/c),{destination:o.round(a),duration:l}};var a=e("transform");return t.extend(t,{hasTransform:a!==!1,hasPerspective:e("perspective")in i,hasTouch:"ontouchstart"in r,hasPointer:!(!r.PointerEvent&&!r.MSPointerEvent),hasTransition:e("transition")in i}),t.isBadAndroid=function(){var e=r.navigator.appVersion;if(/Android/.test(e)&&!/Chrome\/\d/.test(e)){var t=e.match(/Safari\/(\d+.\d)/);return t&&"object"==typeof t&&t.length>=2?parseFloat(t[1])<535.19:!0}return!1}(),t.extend(t.style={},{transform:a,transitionTimingFunction:e("transitionTimingFunction"),transitionDuration:e("transitionDuration"),transitionDelay:e("transitionDelay"),transformOrigin:e("transformOrigin")}),t.hasClass=function(e,t){var i=new RegExp("(^|\\s)"+t+"(\\s|$)");return i.test(e.className)},t.addClass=function(e,i){if(!t.hasClass(e,i)){var n=e.className.split(" ");n.push(i),e.className=n.join(" ")}},t.removeClass=function(e,i){if(t.hasClass(e,i)){var n=new RegExp("(^|\\s)"+i+"(\\s|$)","g");e.className=e.className.replace(n," ")}},t.offset=function(e){for(var t=-e.offsetLeft,i=-e.offsetTop;e=e.offsetParent;)t-=e.offsetLeft,i-=e.offsetTop;return{left:t,top:i}},t.preventDefaultException=function(e,t){for(var i in t)if(t[i].test(e[i]))return!0;return!1},t.extend(t.eventType={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,pointerdown:3,pointermove:3,pointerup:3,MSPointerDown:3,MSPointerMove:3,MSPointerUp:3}),t.extend(t.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(e){return e*(2-e)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(e){return o.sqrt(1- --e*e)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(e){var t=4;return(e-=1)*e*((t+1)*e+t)+1}},bounce:{style:"",fn:function(e){return(e/=1)<1/2.75?7.5625*e*e:2/2.75>e?7.5625*(e-=1.5/2.75)*e+.75:2.5/2.75>e?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}},elastic:{style:"",fn:function(e){var t=.22,i=.4;return 0===e?0:1==e?1:i*o.pow(2,-10*e)*o.sin((e-t/4)*(2*o.PI)/t)+1}}}),t.tap=function(e,t){var i=s.createEvent("Event");i.initEvent(t,!0,!0),i.pageX=e.pageX,i.pageY=e.pageY,e.target.dispatchEvent(i)},t.click=function(e){var t,i=e.target;/(SELECT|INPUT|TEXTAREA)/i.test(i.tagName)||(t=s.createEvent("MouseEvents"),t.initMouseEvent("click",!0,!0,e.view,1,i.screenX,i.screenY,i.clientX,i.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,0,null),t._constructed=!0,i.dispatchEvent(t))},t}();a.prototype={version:"5.2.0",_init:function(){this._initEvents(),(this.options.scrollbars||this.options.indicators)&&this._initIndicators(),this.options.mouseWheel&&this._initWheel(),this.options.snap&&this._initSnap(),this.options.keyBindings&&this._initKeys()},destroy:function(){this._initEvents(!0),clearTimeout(this.resizeTimeout),this.resizeTimeout=null,this._execEvent("destroy")},_transitionEnd:function(e){e.target==this.scroller&&this.isInTransition&&(this._transitionTime(),this.resetPosition(this.options.bounceTime)||(this.isInTransition=!1,this._execEvent("scrollEnd")))},_start:function(e){if(1!=u.eventType[e.type]){var t;if(t=e.which?e.button:e.button<2?0:4==e.button?1:2,0!==t)return}if(this.enabled&&(!this.initiated||u.eventType[e.type]===this.initiated)){!this.options.preventDefault||u.isBadAndroid||u.preventDefaultException(e.target,this.options.preventDefaultException)||e.preventDefault();var i,n=e.touches?e.touches[0]:e;this.initiated=u.eventType[e.type],this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.directionLocked=0,this.startTime=u.getTime(),this.options.useTransition&&this.isInTransition?(this._transitionTime(),this.isInTransition=!1,i=this.getComputedPosition(),this._translate(o.round(i.x),o.round(i.y)),this._execEvent("scrollEnd")):!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this._execEvent("scrollEnd")),this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=n.pageX,this.pointY=n.pageY,this._execEvent("beforeScrollStart")}},_move:function(e){if(this.enabled&&u.eventType[e.type]===this.initiated){this.options.preventDefault&&e.preventDefault();var t,i,n,r,s=e.touches?e.touches[0]:e,a=s.pageX-this.pointX,l=s.pageY-this.pointY,p=u.getTime();if(this.pointX=s.pageX,this.pointY=s.pageY,this.distX+=a,this.distY+=l,n=o.abs(this.distX),r=o.abs(this.distY),!(p-this.endTime>300&&10>n&&10>r)){if(this.directionLocked||this.options.freeScroll||(n>r+this.options.directionLockThreshold?this.directionLocked="h":r>=n+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n"),"h"==this.directionLocked){if("vertical"==this.options.eventPassthrough)e.preventDefault();else if("horizontal"==this.options.eventPassthrough)return void(this.initiated=!1);l=0}else if("v"==this.directionLocked){if("horizontal"==this.options.eventPassthrough)e.preventDefault();else if("vertical"==this.options.eventPassthrough)return void(this.initiated=!1);a=0}a=this.hasHorizontalScroll?a:0,l=this.hasVerticalScroll?l:0,t=this.x+a,i=this.y+l,(t>0||t<this.maxScrollX)&&(t=this.options.bounce?this.x+a/3:t>0?0:this.maxScrollX),(i>0||i<this.maxScrollY)&&(i=this.options.bounce?this.y+l/3:i>0?0:this.maxScrollY),this.directionX=a>0?-1:0>a?1:0,this.directionY=l>0?-1:0>l?1:0,this.moved||this._execEvent("scrollStart"),this.moved=!0,this._translate(t,i),p-this.startTime>300&&(this.startTime=p,this.startX=this.x,this.startY=this.y,1==this.options.probeType&&this._execEvent("scroll")),this.options.probeType>1&&this._execEvent("scroll")}}},_end:function(e){if(this.enabled&&u.eventType[e.type]===this.initiated){this.options.preventDefault&&!u.preventDefaultException(e.target,this.options.preventDefaultException)&&e.preventDefault();var t,i,n=(e.changedTouches?e.changedTouches[0]:e,u.getTime()-this.startTime),r=o.round(this.x),s=o.round(this.y),a=o.abs(r-this.startX),l=o.abs(s-this.startY),p=0,c="";if(this.isInTransition=0,this.initiated=0,this.endTime=u.getTime(),!this.resetPosition(this.options.bounceTime)){if(this.scrollTo(r,s),!this.moved)return this.options.tap&&u.tap(e,this.options.tap),this.options.click&&u.click(e),void this._execEvent("scrollCancel");if(this._events.flick&&200>n&&100>a&&100>l)return void this._execEvent("flick");if(this.options.momentum&&300>n&&(t=this.hasHorizontalScroll?u.momentum(this.x,this.startX,n,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options.deceleration):{destination:r,duration:0},i=this.hasVerticalScroll?u.momentum(this.y,this.startY,n,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options.deceleration):{destination:s,duration:0},r=t.destination,s=i.destination,p=o.max(t.duration,i.duration),this.isInTransition=1),this.options.snap){var h=this._nearestSnap(r,s);this.currentPage=h,p=this.options.snapSpeed||o.max(o.max(o.min(o.abs(r-h.x),1e3),o.min(o.abs(s-h.y),1e3)),300),r=h.x,s=h.y,this.directionX=0,this.directionY=0,c=this.options.bounceEasing}return r!=this.x||s!=this.y?((r>0||r<this.maxScrollX||s>0||s<this.maxScrollY)&&(c=u.ease.quadratic),void this.scrollTo(r,s,p,c)):void this._execEvent("scrollEnd")}}},_resize:function(){var e=this;clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){e.refresh()},this.options.resizePolling)},resetPosition:function(e){var t=this.x,i=this.y;return e=e||0,!this.hasHorizontalScroll||this.x>0?t=0:this.x<this.maxScrollX&&(t=this.maxScrollX),!this.hasVerticalScroll||this.y>0?i=0:this.y<this.maxScrollY&&(i=this.maxScrollY),t==this.x&&i==this.y?!1:(this.scrollTo(t,i,e,this.options.bounceEasing),!0)},disable:function(){this.enabled=!1},enable:function(){this.enabled=!0},refresh:function(){this.wrapper.offsetHeight;this.wrapperWidth=this.wrapper.clientWidth,this.wrapperHeight=this.wrapper.clientHeight,this.scrollerWidth=this.scroller.offsetWidth,this.scrollerHeight=this.scroller.offsetHeight,this.maxScrollX=this.wrapperWidth-this.scrollerWidth,this.maxScrollY=this.wrapperHeight-this.scrollerHeight,this.hasHorizontalScroll=this.options.scrollX&&this.maxScrollX<0,this.hasVerticalScroll=this.options.scrollY&&this.maxScrollY<0,this.hasHorizontalScroll||(this.maxScrollX=0,this.scrollerWidth=this.wrapperWidth),this.hasVerticalScroll||(this.maxScrollY=0,this.scrollerHeight=this.wrapperHeight),this.endTime=0,this.directionX=0,this.directionY=0,this.wrapperOffset=u.offset(this.wrapper),this._execEvent("refresh"),this.resetPosition()},on:function(e,t){this._events[e]||(this._events[e]=[]),this._events[e].push(t)},off:function(e,t){if(this._events[e]){var i=this._events[e].indexOf(t);i>-1&&this._events[e].splice(i,1)}},_execEvent:function(e){if(this._events[e]){var t=0,i=this._events[e].length;if(i)for(;i>t;t++)this._events[e][t].apply(this,[].slice.call(arguments,1))}},scrollBy:function(e,t,i,n){e=this.x+e,t=this.y+t,i=i||0,this.scrollTo(e,t,i,n)},scrollTo:function(e,t,i,n){n=n||u.ease.circular,this.isInTransition=this.options.useTransition&&i>0;var r=this.options.useTransition&&n.style;!i||r?(r&&(this._transitionTimingFunction(n.style),this._transitionTime(i)),this._translate(e,t)):this._animate(e,t,i,n.fn)},scrollToElement:function(e,t,i,n,r){if(e=e.nodeType?e:this.scroller.querySelector(e)){var s=u.offset(e);s.left-=this.wrapperOffset.left,s.top-=this.wrapperOffset.top,i===!0&&(i=o.round(e.offsetWidth/2-this.wrapper.offsetWidth/2)),n===!0&&(n=o.round(e.offsetHeight/2-this.wrapper.offsetHeight/2)),s.left-=i||0,s.top-=n||0,s.left=s.left>0?0:s.left<this.maxScrollX?this.maxScrollX:s.left,s.top=s.top>0?0:s.top<this.maxScrollY?this.maxScrollY:s.top,t=void 0===t||null===t||"auto"===t?o.max(o.abs(this.x-s.left),o.abs(this.y-s.top)):t,this.scrollTo(s.left,s.top,t,r)}},_transitionTime:function(e){e=e||0;var t=u.style.transitionDuration;if(this.scrollerStyle[t]=e+"ms",!e&&u.isBadAndroid){this.scrollerStyle[t]="0.0001ms";var i=this;c(function(){"0.0001ms"===i.scrollerStyle[t]&&(i.scrollerStyle[t]="0s")})}if(this.indicators)for(var n=this.indicators.length;n--;)this.indicators[n].transitionTime(e)},_transitionTimingFunction:function(e){if(this.scrollerStyle[u.style.transitionTimingFunction]=e,this.indicators)for(var t=this.indicators.length;t--;)this.indicators[t].transitionTimingFunction(e)},_translate:function(e,t){if(this.options.useTransform?this.scrollerStyle[u.style.transform]="translate("+e+"px,"+t+"px)"+this.translateZ:(e=o.round(e),t=o.round(t),this.scrollerStyle.left=e+"px",this.scrollerStyle.top=t+"px"),this.x=e,this.y=t,this.indicators)for(var i=this.indicators.length;i--;)this.indicators[i].updatePosition()},_initEvents:function(e){var t=e?u.removeEvent:u.addEvent,i=this.options.bindToWrapper?this.wrapper:r;t(r,"orientationchange",this),t(r,"resize",this),this.options.click&&t(this.wrapper,"click",this,!0),this.options.disableMouse||(t(this.wrapper,"mousedown",this),t(i,"mousemove",this),t(i,"mousecancel",this),t(i,"mouseup",this)),u.hasPointer&&!this.options.disablePointer&&(t(this.wrapper,u.prefixPointerEvent("pointerdown"),this),t(i,u.prefixPointerEvent("pointermove"),this),t(i,u.prefixPointerEvent("pointercancel"),this),t(i,u.prefixPointerEvent("pointerup"),this)),u.hasTouch&&!this.options.disableTouch&&(t(this.wrapper,"touchstart",this),t(i,"touchmove",this),t(i,"touchcancel",this),t(i,"touchend",this)),t(this.scroller,"transitionend",this),t(this.scroller,"webkitTransitionEnd",this),t(this.scroller,"oTransitionEnd",this),t(this.scroller,"MSTransitionEnd",this)},getComputedPosition:function(){var e,t,i=r.getComputedStyle(this.scroller,null);return this.options.useTransform?(i=i[u.style.transform].split(")")[0].split(", "),e=+(i[12]||i[4]),t=+(i[13]||i[5])):(e=+i.left.replace(/[^-\d.]/g,""),t=+i.top.replace(/[^-\d.]/g,"")),{x:e,y:t}},_initIndicators:function(){function e(e){if(s.indicators)for(var t=s.indicators.length;t--;)e.call(s.indicators[t])}var t,i=this.options.interactiveScrollbars,n="string"!=typeof this.options.scrollbars,r=[],s=this;this.indicators=[],this.options.scrollbars&&(this.options.scrollY&&(t={el:l("v",i,this.options.scrollbars),interactive:i,defaultScrollbars:!0,customStyle:n,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenX:!1},this.wrapper.appendChild(t.el),r.push(t)),this.options.scrollX&&(t={el:l("h",i,this.options.scrollbars),interactive:i,defaultScrollbars:!0,customStyle:n,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenY:!1},this.wrapper.appendChild(t.el),r.push(t))),this.options.indicators&&(r=r.concat(this.options.indicators));for(var o=r.length;o--;)this.indicators.push(new p(this,r[o]));this.options.fadeScrollbars&&(this.on("scrollEnd",function(){e(function(){this.fade()})}),this.on("scrollCancel",function(){e(function(){this.fade()})}),this.on("scrollStart",function(){e(function(){this.fade(1)})}),this.on("beforeScrollStart",function(){e(function(){this.fade(1,!0)})})),this.on("refresh",function(){e(function(){this.refresh()})}),this.on("destroy",function(){e(function(){this.destroy()}),delete this.indicators})},_initWheel:function(){u.addEvent(this.wrapper,"wheel",this),u.addEvent(this.wrapper,"mousewheel",this),u.addEvent(this.wrapper,"DOMMouseScroll",this),this.on("destroy",function(){clearTimeout(this.wheelTimeout),this.wheelTimeout=null,u.removeEvent(this.wrapper,"wheel",this),u.removeEvent(this.wrapper,"mousewheel",this),u.removeEvent(this.wrapper,"DOMMouseScroll",this)})},_wheel:function(e){if(this.enabled){e.preventDefault();var t,i,n,r,s=this;if(void 0===this.wheelTimeout&&s._execEvent("scrollStart"),clearTimeout(this.wheelTimeout),this.wheelTimeout=setTimeout(function(){s.options.snap||s._execEvent("scrollEnd"),s.wheelTimeout=void 0},400),"deltaX"in e)1===e.deltaMode?(t=-e.deltaX*this.options.mouseWheelSpeed,i=-e.deltaY*this.options.mouseWheelSpeed):(t=-e.deltaX,i=-e.deltaY);else if("wheelDeltaX"in e)t=e.wheelDeltaX/120*this.options.mouseWheelSpeed,i=e.wheelDeltaY/120*this.options.mouseWheelSpeed;else if("wheelDelta"in e)t=i=e.wheelDelta/120*this.options.mouseWheelSpeed;else{if(!("detail"in e))return;t=i=-e.detail/3*this.options.mouseWheelSpeed}if(t*=this.options.invertWheelDirection,i*=this.options.invertWheelDirection,this.hasVerticalScroll||(t=i,i=0),this.options.snap)return n=this.currentPage.pageX,r=this.currentPage.pageY,t>0?n--:0>t&&n++,i>0?r--:0>i&&r++,void this.goToPage(n,r);n=this.x+o.round(this.hasHorizontalScroll?t:0),r=this.y+o.round(this.hasVerticalScroll?i:0),this.directionX=t>0?-1:0>t?1:0,this.directionY=i>0?-1:0>i?1:0,n>0?n=0:n<this.maxScrollX&&(n=this.maxScrollX),r>0?r=0:r<this.maxScrollY&&(r=this.maxScrollY),this.scrollTo(n,r,0),this.options.probeType>1&&this._execEvent("scroll")}},_initSnap:function(){this.currentPage={},"string"==typeof this.options.snap&&(this.options.snap=this.scroller.querySelectorAll(this.options.snap)),this.on("refresh",function(){var e,t,i,n,r,s,a=0,l=0,p=0,c=this.options.snapStepX||this.wrapperWidth,u=this.options.snapStepY||this.wrapperHeight;if(this.pages=[],this.wrapperWidth&&this.wrapperHeight&&this.scrollerWidth&&this.scrollerHeight){if(this.options.snap===!0)for(i=o.round(c/2),n=o.round(u/2);p>-this.scrollerWidth;){for(this.pages[a]=[],e=0,r=0;r>-this.scrollerHeight;)this.pages[a][e]={x:o.max(p,this.maxScrollX),y:o.max(r,this.maxScrollY),width:c,height:u,cx:p-i,cy:r-n},r-=u,e++;p-=c,a++}else for(s=this.options.snap,e=s.length,t=-1;e>a;a++)(0===a||s[a].offsetLeft<=s[a-1].offsetLeft)&&(l=0,t++),this.pages[l]||(this.pages[l]=[]),p=o.max(-s[a].offsetLeft,this.maxScrollX),r=o.max(-s[a].offsetTop,this.maxScrollY),i=p-o.round(s[a].offsetWidth/2),n=r-o.round(s[a].offsetHeight/2),this.pages[l][t]={x:p,y:r,width:s[a].offsetWidth,height:s[a].offsetHeight,cx:i,cy:n},p>this.maxScrollX&&l++;this.goToPage(this.currentPage.pageX||0,this.currentPage.pageY||0,0),this.options.snapThreshold%1===0?(this.snapThresholdX=this.options.snapThreshold,this.snapThresholdY=this.options.snapThreshold):(this.snapThresholdX=o.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width*this.options.snapThreshold),this.snapThresholdY=o.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height*this.options.snapThreshold))}}),this.on("flick",function(){var e=this.options.snapSpeed||o.max(o.max(o.min(o.abs(this.x-this.startX),1e3),o.min(o.abs(this.y-this.startY),1e3)),300);this.goToPage(this.currentPage.pageX+this.directionX,this.currentPage.pageY+this.directionY,e)})},_nearestSnap:function(e,t){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var i=0,n=this.pages.length,r=0;if(o.abs(e-this.absStartX)<this.snapThresholdX&&o.abs(t-this.absStartY)<this.snapThresholdY)return this.currentPage;for(e>0?e=0:e<this.maxScrollX&&(e=this.maxScrollX),t>0?t=0:t<this.maxScrollY&&(t=this.maxScrollY);n>i;i++)if(e>=this.pages[i][0].cx){e=this.pages[i][0].x;break}for(n=this.pages[i].length;n>r;r++)if(t>=this.pages[0][r].cy){t=this.pages[0][r].y;break}return i==this.currentPage.pageX&&(i+=this.directionX,0>i?i=0:i>=this.pages.length&&(i=this.pages.length-1),e=this.pages[i][0].x),r==this.currentPage.pageY&&(r+=this.directionY,0>r?r=0:r>=this.pages[0].length&&(r=this.pages[0].length-1),t=this.pages[0][r].y),{x:e,y:t,pageX:i,pageY:r}},goToPage:function(e,t,i,n){n=n||this.options.bounceEasing,e>=this.pages.length?e=this.pages.length-1:0>e&&(e=0),t>=this.pages[e].length?t=this.pages[e].length-1:0>t&&(t=0);var r=this.pages[e][t].x,s=this.pages[e][t].y;i=void 0===i?this.options.snapSpeed||o.max(o.max(o.min(o.abs(r-this.x),1e3),o.min(o.abs(s-this.y),1e3)),300):i,this.currentPage={x:r,y:s,pageX:e,pageY:t},this.scrollTo(r,s,i,n)},next:function(e,t){var i=this.currentPage.pageX,n=this.currentPage.pageY;i++,i>=this.pages.length&&this.hasVerticalScroll&&(i=0,n++),this.goToPage(i,n,e,t)},prev:function(e,t){var i=this.currentPage.pageX,n=this.currentPage.pageY;i--,0>i&&this.hasVerticalScroll&&(i=0,n--),this.goToPage(i,n,e,t)},_initKeys:function(e){var t,i={pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40};if("object"==typeof this.options.keyBindings)for(t in this.options.keyBindings)"string"==typeof this.options.keyBindings[t]&&(this.options.keyBindings[t]=this.options.keyBindings[t].toUpperCase().charCodeAt(0));else this.options.keyBindings={};for(t in i)this.options.keyBindings[t]=this.options.keyBindings[t]||i[t];u.addEvent(r,"keydown",this),this.on("destroy",function(){u.removeEvent(r,"keydown",this)})},_key:function(e){if(this.enabled){var t,i=this.options.snap,n=i?this.currentPage.pageX:this.x,r=i?this.currentPage.pageY:this.y,s=u.getTime(),a=this.keyTime||0,l=.25;switch(this.options.useTransition&&this.isInTransition&&(t=this.getComputedPosition(),this._translate(o.round(t.x),o.round(t.y)),this.isInTransition=!1),this.keyAcceleration=200>s-a?o.min(this.keyAcceleration+l,50):0,e.keyCode){case this.options.keyBindings.pageUp:this.hasHorizontalScroll&&!this.hasVerticalScroll?n+=i?1:this.wrapperWidth:r+=i?1:this.wrapperHeight;break;case this.options.keyBindings.pageDown:this.hasHorizontalScroll&&!this.hasVerticalScroll?n-=i?1:this.wrapperWidth:r-=i?1:this.wrapperHeight;break;case this.options.keyBindings.end:n=i?this.pages.length-1:this.maxScrollX,r=i?this.pages[0].length-1:this.maxScrollY;break;case this.options.keyBindings.home:n=0,r=0;break;case this.options.keyBindings.left:n+=i?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.up:r+=i?1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.right:n-=i?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.down:r-=i?1:5+this.keyAcceleration>>0;break;default:return}if(i)return void this.goToPage(n,r);n>0?(n=0,this.keyAcceleration=0):n<this.maxScrollX&&(n=this.maxScrollX,this.keyAcceleration=0),r>0?(r=0,this.keyAcceleration=0):r<this.maxScrollY&&(r=this.maxScrollY,this.keyAcceleration=0),this.scrollTo(n,r,0),this.keyTime=s}},_animate:function(e,t,i,n){function r(){var h,d,f,m=u.getTime();return m>=p?(s.isAnimating=!1,s._translate(e,t),void(s.resetPosition(s.options.bounceTime)||s._execEvent("scrollEnd"))):(m=(m-l)/i,f=n(m),h=(e-o)*f+o,d=(t-a)*f+a,s._translate(h,d),s.isAnimating&&c(r),void(3==s.options.probeType&&s._execEvent("scroll")))}var s=this,o=this.x,a=this.y,l=u.getTime(),p=l+i;this.isAnimating=!0,r()},handleEvent:function(e){switch(e.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(e);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(e);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(e);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"oTransitionEnd":case"MSTransitionEnd":this._transitionEnd(e);break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._wheel(e);break;case"keydown":this._key(e);break;case"click":this.enabled&&!e._constructed&&(e.preventDefault(),e.stopPropagation())}}},p.prototype={handleEvent:function(e){switch(e.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(e);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(e);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(e)}},destroy:function(){this.options.fadeScrollbars&&(clearTimeout(this.fadeTimeout),this.fadeTimeout=null),this.options.interactive&&(u.removeEvent(this.indicator,"touchstart",this),u.removeEvent(this.indicator,u.prefixPointerEvent("pointerdown"),this),u.removeEvent(this.indicator,"mousedown",this),u.removeEvent(r,"touchmove",this),u.removeEvent(r,u.prefixPointerEvent("pointermove"),this),u.removeEvent(r,"mousemove",this),u.removeEvent(r,"touchend",this),u.removeEvent(r,u.prefixPointerEvent("pointerup"),this),u.removeEvent(r,"mouseup",this)),this.options.defaultScrollbars&&this.wrapper.parentNode.removeChild(this.wrapper)},_start:function(e){var t=e.touches?e.touches[0]:e;e.preventDefault(),e.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=t.pageX,this.lastPointY=t.pageY,this.startTime=u.getTime(),this.options.disableTouch||u.addEvent(r,"touchmove",this),this.options.disablePointer||u.addEvent(r,u.prefixPointerEvent("pointermove"),this),this.options.disableMouse||u.addEvent(r,"mousemove",this),this.scroller._execEvent("beforeScrollStart")},_move:function(e){var t,i,n,r,s=e.touches?e.touches[0]:e,o=u.getTime();this.moved||this.scroller._execEvent("scrollStart"),this.moved=!0,t=s.pageX-this.lastPointX,this.lastPointX=s.pageX,i=s.pageY-this.lastPointY,this.lastPointY=s.pageY,n=this.x+t,r=this.y+i,this._pos(n,r),1==this.scroller.options.probeType&&o-this.startTime>300?(this.startTime=o,this.scroller._execEvent("scroll")):this.scroller.options.probeType>1&&this.scroller._execEvent("scroll"),e.preventDefault(),e.stopPropagation()},_end:function(e){if(this.initiated){if(this.initiated=!1,e.preventDefault(),e.stopPropagation(),u.removeEvent(r,"touchmove",this),u.removeEvent(r,u.prefixPointerEvent("pointermove"),this),u.removeEvent(r,"mousemove",this),this.scroller.options.snap){var t=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),i=this.options.snapSpeed||o.max(o.max(o.min(o.abs(this.scroller.x-t.x),1e3),o.min(o.abs(this.scroller.y-t.y),1e3)),300);this.scroller.x==t.x&&this.scroller.y==t.y||(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=t,this.scroller.scrollTo(t.x,t.y,i,this.scroller.options.bounceEasing))}this.moved&&this.scroller._execEvent("scrollEnd")}},transitionTime:function(e){e=e||0;var t=u.style.transitionDuration;if(this.indicatorStyle[t]=e+"ms",!e&&u.isBadAndroid){this.indicatorStyle[t]="0.0001ms";var i=this;c(function(){"0.0001ms"===i.indicatorStyle[t]&&(i.indicatorStyle[t]="0s")})}},transitionTimingFunction:function(e){this.indicatorStyle[u.style.transitionTimingFunction]=e},refresh:function(){this.transitionTime(),this.options.listenX&&!this.options.listenY?this.indicatorStyle.display=this.scroller.hasHorizontalScroll?"block":"none":this.options.listenY&&!this.options.listenX?this.indicatorStyle.display=this.scroller.hasVerticalScroll?"block":"none":this.indicatorStyle.display=this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?"block":"none",this.scroller.hasHorizontalScroll&&this.scroller.hasVerticalScroll?(u.addClass(this.wrapper,"iScrollBothScrollbars"),u.removeClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="8px":this.wrapper.style.bottom="8px")):(u.removeClass(this.wrapper,"iScrollBothScrollbars"),u.addClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="2px":this.wrapper.style.bottom="2px"));this.wrapper.offsetHeight;this.options.listenX&&(this.wrapperWidth=this.wrapper.clientWidth,this.options.resize?(this.indicatorWidth=o.max(o.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px"):this.indicatorWidth=this.indicator.clientWidth,this.maxPosX=this.wrapperWidth-this.indicatorWidth,"clip"==this.options.shrink?(this.minBoundaryX=-this.indicatorWidth+8,this.maxBoundaryX=this.wrapperWidth-8):(this.minBoundaryX=0,this.maxBoundaryX=this.maxPosX),this.sizeRatioX=this.options.speedRatioX||this.scroller.maxScrollX&&this.maxPosX/this.scroller.maxScrollX),this.options.listenY&&(this.wrapperHeight=this.wrapper.clientHeight,this.options.resize?(this.indicatorHeight=o.max(o.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px"):this.indicatorHeight=this.indicator.clientHeight,this.maxPosY=this.wrapperHeight-this.indicatorHeight,"clip"==this.options.shrink?(this.minBoundaryY=-this.indicatorHeight+8,this.maxBoundaryY=this.wrapperHeight-8):(this.minBoundaryY=0,this.maxBoundaryY=this.maxPosY),this.maxPosY=this.wrapperHeight-this.indicatorHeight,this.sizeRatioY=this.options.speedRatioY||this.scroller.maxScrollY&&this.maxPosY/this.scroller.maxScrollY),this.updatePosition()},updatePosition:function(){var e=this.options.listenX&&o.round(this.sizeRatioX*this.scroller.x)||0,t=this.options.listenY&&o.round(this.sizeRatioY*this.scroller.y)||0;this.options.ignoreBoundaries||(e<this.minBoundaryX?("scale"==this.options.shrink&&(this.width=o.max(this.indicatorWidth+e,8),this.indicatorStyle.width=this.width+"px"),e=this.minBoundaryX):e>this.maxBoundaryX?"scale"==this.options.shrink?(this.width=o.max(this.indicatorWidth-(e-this.maxPosX),8),this.indicatorStyle.width=this.width+"px",e=this.maxPosX+this.indicatorWidth-this.width):e=this.maxBoundaryX:"scale"==this.options.shrink&&this.width!=this.indicatorWidth&&(this.width=this.indicatorWidth,this.indicatorStyle.width=this.width+"px"),t<this.minBoundaryY?("scale"==this.options.shrink&&(this.height=o.max(this.indicatorHeight+3*t,8), 34 !function(r,s,o){function a(e,t){this.wrapper="string"==typeof e?s.querySelector(e):e,this.scroller=this.wrapper.children[0],this.scrollerStyle=this.scroller.style,this.options={resizeScrollbars:!0,mouseWheelSpeed:20,snapThreshold:.334,disablePointer:!u.hasPointer,disableTouch:u.hasPointer||!u.hasTouch,disableMouse:u.hasPointer||u.hasTouch,startX:0,startY:0,scrollY:!0,directionLockThreshold:5,momentum:!0,bounce:!0,bounceTime:600,bounceEasing:"",preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:"undefined"==typeof r.onmousedown};for(var i in t)this.options[i]=t[i];this.translateZ=this.options.HWCompositing&&u.hasPerspective?" translateZ(0)":"",this.options.useTransition=u.hasTransition&&this.options.useTransition,this.options.useTransform=u.hasTransform&&this.options.useTransform,this.options.eventPassthrough=this.options.eventPassthrough===!0?"vertical":this.options.eventPassthrough,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollY="vertical"==this.options.eventPassthrough?!1:this.options.scrollY,this.options.scrollX="horizontal"==this.options.eventPassthrough?!1:this.options.scrollX,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,this.options.bounceEasing="string"==typeof this.options.bounceEasing?u.ease[this.options.bounceEasing]||u.ease.circular:this.options.bounceEasing,this.options.resizePolling=void 0===this.options.resizePolling?60:this.options.resizePolling,this.options.tap===!0&&(this.options.tap="tap"),"scale"==this.options.shrinkScrollbars&&(this.options.useTransition=!1),this.options.invertWheelDirection=this.options.invertWheelDirection?-1:1,3==this.options.probeType&&(this.options.useTransition=!1),this.x=0,this.y=0,this.directionX=0,this.directionY=0,this._events={},this._init(),this.refresh(),this.scrollTo(this.options.startX,this.options.startY),this.enable()}function l(e,t,i){var n=s.createElement("div"),r=s.createElement("div");return i===!0&&(n.style.cssText="position:absolute;z-index:9999",r.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px"),r.className="iScrollIndicator","h"==e?(i===!0&&(n.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",r.style.height="100%"),n.className="iScrollHorizontalScrollbar"):(i===!0&&(n.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",r.style.width="100%"),n.className="iScrollVerticalScrollbar"),n.style.cssText+=";overflow:hidden",t||(n.style.pointerEvents="none"),n.appendChild(r),n}function p(e,t){this.wrapper="string"==typeof t.el?s.querySelector(t.el):t.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=e,this.options={listenX:!0,listenY:!0,interactive:!1,resize:!0,defaultScrollbars:!1,shrink:!1,fade:!1,speedRatioX:0,speedRatioY:0};for(var i in t)this.options[i]=t[i];if(this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.options.interactive&&(this.options.disableTouch||(u.addEvent(this.indicator,"touchstart",this),u.addEvent(r,"touchend",this)),this.options.disablePointer||(u.addEvent(this.indicator,u.prefixPointerEvent("pointerdown"),this),u.addEvent(r,u.prefixPointerEvent("pointerup"),this)),this.options.disableMouse||(u.addEvent(this.indicator,"mousedown",this),u.addEvent(r,"mouseup",this))),this.options.fade){this.wrapperStyle[u.style.transform]=this.scroller.translateZ;var n=u.style.transitionDuration;this.wrapperStyle[n]=u.isBadAndroid?"0.0001ms":"0ms";var o=this;u.isBadAndroid&&c(function(){"0.0001ms"===o.wrapperStyle[n]&&(o.wrapperStyle[n]="0s")}),this.wrapperStyle.opacity="0"}}var c=r.requestAnimationFrame||r.webkitRequestAnimationFrame||r.mozRequestAnimationFrame||r.oRequestAnimationFrame||r.msRequestAnimationFrame||function(e){r.setTimeout(e,1e3/60)},u=function(){function e(e){return n===!1?!1:""===n?e:n+e.charAt(0).toUpperCase()+e.substr(1)}var t={},i=s.createElement("div").style,n=function(){for(var e,t=["t","webkitT","MozT","msT","OT"],n=0,r=t.length;r>n;n++)if(e=t[n]+"ransform",e in i)return t[n].substr(0,t[n].length-1);return!1}();t.getTime=Date.now||function(){return(new Date).getTime()},t.extend=function(e,t){for(var i in t)e[i]=t[i]},t.addEvent=function(e,t,i,n){e.addEventListener(t,i,!!n)},t.removeEvent=function(e,t,i,n){e.removeEventListener(t,i,!!n)},t.prefixPointerEvent=function(e){return r.MSPointerEvent?"MSPointer"+e.charAt(7).toUpperCase()+e.substr(8):e},t.momentum=function(e,t,i,n,r,s){var a,l,p=e-t,c=o.abs(p)/i;return s=void 0===s?6e-4:s,a=e+c*c/(2*s)*(0>p?-1:1),l=c/s,n>a?(a=r?n-r/2.5*(c/8):n,p=o.abs(a-e),l=p/c):a>0&&(a=r?r/2.5*(c/8):0,p=o.abs(e)+a,l=p/c),{destination:o.round(a),duration:l}};var a=e("transform");return t.extend(t,{hasTransform:a!==!1,hasPerspective:e("perspective")in i,hasTouch:"ontouchstart"in r,hasPointer:!(!r.PointerEvent&&!r.MSPointerEvent),hasTransition:e("transition")in i}),t.isBadAndroid=function(){var e=r.navigator.appVersion;if(/Android/.test(e)&&!/Chrome\/\d/.test(e)){var t=e.match(/Safari\/(\d+.\d)/);return t&&"object"==typeof t&&t.length>=2?parseFloat(t[1])<535.19:!0}return!1}(),t.extend(t.style={},{transform:a,transitionTimingFunction:e("transitionTimingFunction"),transitionDuration:e("transitionDuration"),transitionDelay:e("transitionDelay"),transformOrigin:e("transformOrigin")}),t.hasClass=function(e,t){var i=new RegExp("(^|\\s)"+t+"(\\s|$)");return i.test(e.className)},t.addClass=function(e,i){if(!t.hasClass(e,i)){var n=e.className.split(" ");n.push(i),e.className=n.join(" ")}},t.removeClass=function(e,i){if(t.hasClass(e,i)){var n=new RegExp("(^|\\s)"+i+"(\\s|$)","g");e.className=e.className.replace(n," ")}},t.offset=function(e){for(var t=-e.offsetLeft,i=-e.offsetTop;e=e.offsetParent;)t-=e.offsetLeft,i-=e.offsetTop;return{left:t,top:i}},t.preventDefaultException=function(e,t){for(var i in t)if(t[i].test(e[i]))return!0;return!1},t.extend(t.eventType={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,pointerdown:3,pointermove:3,pointerup:3,MSPointerDown:3,MSPointerMove:3,MSPointerUp:3}),t.extend(t.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(e){return e*(2-e)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(e){return o.sqrt(1- --e*e)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(e){var t=4;return(e-=1)*e*((t+1)*e+t)+1}},bounce:{style:"",fn:function(e){return(e/=1)<1/2.75?7.5625*e*e:2/2.75>e?7.5625*(e-=1.5/2.75)*e+.75:2.5/2.75>e?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}},elastic:{style:"",fn:function(e){var t=.22,i=.4;return 0===e?0:1==e?1:i*o.pow(2,-10*e)*o.sin((e-t/4)*(2*o.PI)/t)+1}}}),t.tap=function(e,t){var i=s.createEvent("Event");i.initEvent(t,!0,!0),i.pageX=e.pageX,i.pageY=e.pageY,e.target.dispatchEvent(i)},t.click=function(e){var t,i=e.target;/(SELECT|INPUT|TEXTAREA)/i.test(i.tagName)||(t=s.createEvent("MouseEvents"),t.initMouseEvent("click",!0,!0,e.view,1,i.screenX,i.screenY,i.clientX,i.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,0,null),t._constructed=!0,i.dispatchEvent(t))},t}();a.prototype={version:"5.2.0",_init:function(){this._initEvents(),(this.options.scrollbars||this.options.indicators)&&this._initIndicators(),this.options.mouseWheel&&this._initWheel(),this.options.snap&&this._initSnap(),this.options.keyBindings&&this._initKeys()},destroy:function(){this._initEvents(!0),clearTimeout(this.resizeTimeout),this.resizeTimeout=null,this._execEvent("destroy")},_transitionEnd:function(e){e.target==this.scroller&&this.isInTransition&&(this._transitionTime(),this.resetPosition(this.options.bounceTime)||(this.isInTransition=!1,this._execEvent("scrollEnd")))},_start:function(e){if(1!=u.eventType[e.type]){var t;if(t=e.which?e.button:e.button<2?0:4==e.button?1:2,0!==t)return}if(this.enabled&&(!this.initiated||u.eventType[e.type]===this.initiated)){!this.options.preventDefault||u.isBadAndroid||u.preventDefaultException(e.target,this.options.preventDefaultException)||e.preventDefault();var i,n=e.touches?e.touches[0]:e;this.initiated=u.eventType[e.type],this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.directionLocked=0,this.startTime=u.getTime(),this.options.useTransition&&this.isInTransition?(this._transitionTime(),this.isInTransition=!1,i=this.getComputedPosition(),this._translate(o.round(i.x),o.round(i.y)),this._execEvent("scrollEnd")):!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this._execEvent("scrollEnd")),this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=n.pageX,this.pointY=n.pageY,this._execEvent("beforeScrollStart")}},_move:function(e){if(this.enabled&&u.eventType[e.type]===this.initiated){this.options.preventDefault&&e.preventDefault();var t,i,n,r,s=e.touches?e.touches[0]:e,a=s.pageX-this.pointX,l=s.pageY-this.pointY,p=u.getTime();if(this.pointX=s.pageX,this.pointY=s.pageY,this.distX+=a,this.distY+=l,n=o.abs(this.distX),r=o.abs(this.distY),!(p-this.endTime>300&&10>n&&10>r)){if(this.directionLocked||this.options.freeScroll||(n>r+this.options.directionLockThreshold?this.directionLocked="h":r>=n+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n"),"h"==this.directionLocked){if("vertical"==this.options.eventPassthrough)e.preventDefault();else if("horizontal"==this.options.eventPassthrough)return void(this.initiated=!1);l=0}else if("v"==this.directionLocked){if("horizontal"==this.options.eventPassthrough)e.preventDefault();else if("vertical"==this.options.eventPassthrough)return void(this.initiated=!1);a=0}a=this.hasHorizontalScroll?a:0,l=this.hasVerticalScroll?l:0,t=this.x+a,i=this.y+l,(t>0||t<this.maxScrollX)&&(t=this.options.bounce?this.x+a/3:t>0?0:this.maxScrollX),(i>0||i<this.maxScrollY)&&(i=this.options.bounce?this.y+l/3:i>0?0:this.maxScrollY),this.directionX=a>0?-1:0>a?1:0,this.directionY=l>0?-1:0>l?1:0,this.moved||this._execEvent("scrollStart"),this.moved=!0,this._translate(t,i),p-this.startTime>300&&(this.startTime=p,this.startX=this.x,this.startY=this.y,1==this.options.probeType&&this._execEvent("scroll")),this.options.probeType>1&&this._execEvent("scroll")}}},_end:function(e){if(this.enabled&&u.eventType[e.type]===this.initiated){this.options.preventDefault&&!u.preventDefaultException(e.target,this.options.preventDefaultException)&&e.preventDefault();var t,i,n=(e.changedTouches?e.changedTouches[0]:e,u.getTime()-this.startTime),r=o.round(this.x),s=o.round(this.y),a=o.abs(r-this.startX),l=o.abs(s-this.startY),p=0,c="";if(this.isInTransition=0,this.initiated=0,this.endTime=u.getTime(),!this.resetPosition(this.options.bounceTime)){if(this.scrollTo(r,s),!this.moved)return this.options.tap&&u.tap(e,this.options.tap),this.options.click&&u.click(e),void this._execEvent("scrollCancel");if(this._events.flick&&200>n&&100>a&&100>l)return void this._execEvent("flick");if(this.options.momentum&&300>n&&(t=this.hasHorizontalScroll?u.momentum(this.x,this.startX,n,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options.deceleration):{destination:r,duration:0},i=this.hasVerticalScroll?u.momentum(this.y,this.startY,n,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options.deceleration):{destination:s,duration:0},r=t.destination,s=i.destination,p=o.max(t.duration,i.duration),this.isInTransition=1),this.options.snap){var h=this._nearestSnap(r,s);this.currentPage=h,p=this.options.snapSpeed||o.max(o.max(o.min(o.abs(r-h.x),1e3),o.min(o.abs(s-h.y),1e3)),300),r=h.x,s=h.y,this.directionX=0,this.directionY=0,c=this.options.bounceEasing}return r!=this.x||s!=this.y?((r>0||r<this.maxScrollX||s>0||s<this.maxScrollY)&&(c=u.ease.quadratic),void this.scrollTo(r,s,p,c)):void this._execEvent("scrollEnd")}}},_resize:function(){var e=this;clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){e.refresh()},this.options.resizePolling)},resetPosition:function(e){var t=this.x,i=this.y;return e=e||0,!this.hasHorizontalScroll||this.x>0?t=0:this.x<this.maxScrollX&&(t=this.maxScrollX),!this.hasVerticalScroll||this.y>0?i=0:this.y<this.maxScrollY&&(i=this.maxScrollY),t==this.x&&i==this.y?!1:(this.scrollTo(t,i,e,this.options.bounceEasing),!0)},disable:function(){this.enabled=!1},enable:function(){this.enabled=!0},refresh:function(){this.wrapper.offsetHeight;this.wrapperWidth=this.wrapper.clientWidth,this.wrapperHeight=this.wrapper.clientHeight,this.scrollerWidth=this.scroller.offsetWidth,this.scrollerHeight=this.scroller.offsetHeight,this.maxScrollX=this.wrapperWidth-this.scrollerWidth,this.maxScrollY=this.wrapperHeight-this.scrollerHeight,this.hasHorizontalScroll=this.options.scrollX&&this.maxScrollX<0,this.hasVerticalScroll=this.options.scrollY&&this.maxScrollY<0,this.hasHorizontalScroll||(this.maxScrollX=0,this.scrollerWidth=this.wrapperWidth),this.hasVerticalScroll||(this.maxScrollY=0,this.scrollerHeight=this.wrapperHeight),this.endTime=0,this.directionX=0,this.directionY=0,this.wrapperOffset=u.offset(this.wrapper),this._execEvent("refresh"),this.resetPosition()},on:function(e,t){this._events[e]||(this._events[e]=[]),this._events[e].push(t)},off:function(e,t){if(this._events[e]){var i=this._events[e].indexOf(t);i>-1&&this._events[e].splice(i,1)}},_execEvent:function(e){if(this._events[e]){var t=0,i=this._events[e].length;if(i)for(;i>t;t++)this._events[e][t].apply(this,[].slice.call(arguments,1))}},scrollBy:function(e,t,i,n){e=this.x+e,t=this.y+t,i=i||0,this.scrollTo(e,t,i,n)},scrollTo:function(e,t,i,n){n=n||u.ease.circular,this.isInTransition=this.options.useTransition&&i>0;var r=this.options.useTransition&&n.style;!i||r?(r&&(this._transitionTimingFunction(n.style),this._transitionTime(i)),this._translate(e,t)):this._animate(e,t,i,n.fn)},scrollToElement:function(e,t,i,n,r){if(e=e.nodeType?e:this.scroller.querySelector(e)){var s=u.offset(e);s.left-=this.wrapperOffset.left,s.top-=this.wrapperOffset.top,i===!0&&(i=o.round(e.offsetWidth/2-this.wrapper.offsetWidth/2)),n===!0&&(n=o.round(e.offsetHeight/2-this.wrapper.offsetHeight/2)),s.left-=i||0,s.top-=n||0,s.left=s.left>0?0:s.left<this.maxScrollX?this.maxScrollX:s.left,s.top=s.top>0?0:s.top<this.maxScrollY?this.maxScrollY:s.top,t=void 0===t||null===t||"auto"===t?o.max(o.abs(this.x-s.left),o.abs(this.y-s.top)):t,this.scrollTo(s.left,s.top,t,r)}},_transitionTime:function(e){e=e||0;var t=u.style.transitionDuration;if(this.scrollerStyle[t]=e+"ms",!e&&u.isBadAndroid){this.scrollerStyle[t]="0.0001ms";var i=this;c(function(){"0.0001ms"===i.scrollerStyle[t]&&(i.scrollerStyle[t]="0s")})}if(this.indicators)for(var n=this.indicators.length;n--;)this.indicators[n].transitionTime(e)},_transitionTimingFunction:function(e){if(this.scrollerStyle[u.style.transitionTimingFunction]=e,this.indicators)for(var t=this.indicators.length;t--;)this.indicators[t].transitionTimingFunction(e)},_translate:function(e,t){if(this.options.useTransform?this.scrollerStyle[u.style.transform]="translate("+e+"px,"+t+"px)"+this.translateZ:(e=o.round(e),t=o.round(t),this.scrollerStyle.left=e+"px",this.scrollerStyle.top=t+"px"),this.x=e,this.y=t,this.indicators)for(var i=this.indicators.length;i--;)this.indicators[i].updatePosition()},_initEvents:function(e){var t=e?u.removeEvent:u.addEvent,i=this.options.bindToWrapper?this.wrapper:r;t(r,"orientationchange",this),t(r,"resize",this),this.options.click&&t(this.wrapper,"click",this,!0),this.options.disableMouse||(t(this.wrapper,"mousedown",this),t(i,"mousemove",this),t(i,"mousecancel",this),t(i,"mouseup",this)),u.hasPointer&&!this.options.disablePointer&&(t(this.wrapper,u.prefixPointerEvent("pointerdown"),this),t(i,u.prefixPointerEvent("pointermove"),this),t(i,u.prefixPointerEvent("pointercancel"),this),t(i,u.prefixPointerEvent("pointerup"),this)),u.hasTouch&&!this.options.disableTouch&&(t(this.wrapper,"touchstart",this),t(i,"touchmove",this),t(i,"touchcancel",this),t(i,"touchend",this)),t(this.scroller,"transitionend",this),t(this.scroller,"webkitTransitionEnd",this),t(this.scroller,"oTransitionEnd",this),t(this.scroller,"MSTransitionEnd",this)},getComputedPosition:function(){var e,t,i=r.getComputedStyle(this.scroller,null);return this.options.useTransform?(i=i[u.style.transform].split(")")[0].split(", "),e=+(i[12]||i[4]),t=+(i[13]||i[5])):(e=+i.left.replace(/[^-\d.]/g,""),t=+i.top.replace(/[^-\d.]/g,"")),{x:e,y:t}},_initIndicators:function(){function e(e){if(s.indicators)for(var t=s.indicators.length;t--;)e.call(s.indicators[t])}var t,i=this.options.interactiveScrollbars,n="string"!=typeof this.options.scrollbars,r=[],s=this;this.indicators=[],this.options.scrollbars&&(this.options.scrollY&&(t={el:l("v",i,this.options.scrollbars),interactive:i,defaultScrollbars:!0,customStyle:n,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenX:!1},this.wrapper.appendChild(t.el),r.push(t)),this.options.scrollX&&(t={el:l("h",i,this.options.scrollbars),interactive:i,defaultScrollbars:!0,customStyle:n,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenY:!1},this.wrapper.appendChild(t.el),r.push(t))),this.options.indicators&&(r=r.concat(this.options.indicators));for(var o=r.length;o--;)this.indicators.push(new p(this,r[o]));this.options.fadeScrollbars&&(this.on("scrollEnd",function(){e(function(){this.fade()})}),this.on("scrollCancel",function(){e(function(){this.fade()})}),this.on("scrollStart",function(){e(function(){this.fade(1)})}),this.on("beforeScrollStart",function(){e(function(){this.fade(1,!0)})})),this.on("refresh",function(){e(function(){this.refresh()})}),this.on("destroy",function(){e(function(){this.destroy()}),delete this.indicators})},_initWheel:function(){u.addEvent(this.wrapper,"wheel",this),u.addEvent(this.wrapper,"mousewheel",this),u.addEvent(this.wrapper,"DOMMouseScroll",this),this.on("destroy",function(){clearTimeout(this.wheelTimeout),this.wheelTimeout=null,u.removeEvent(this.wrapper,"wheel",this),u.removeEvent(this.wrapper,"mousewheel",this),u.removeEvent(this.wrapper,"DOMMouseScroll",this)})},_wheel:function(e){if(this.enabled){e.preventDefault();var t,i,n,r,s=this;if(void 0===this.wheelTimeout&&s._execEvent("scrollStart"),clearTimeout(this.wheelTimeout),this.wheelTimeout=setTimeout(function(){s.options.snap||s._execEvent("scrollEnd"),s.wheelTimeout=void 0},400),"deltaX"in e)1===e.deltaMode?(t=-e.deltaX*this.options.mouseWheelSpeed,i=-e.deltaY*this.options.mouseWheelSpeed):(t=-e.deltaX,i=-e.deltaY);else if("wheelDeltaX"in e)t=e.wheelDeltaX/120*this.options.mouseWheelSpeed,i=e.wheelDeltaY/120*this.options.mouseWheelSpeed;else if("wheelDelta"in e)t=i=e.wheelDelta/120*this.options.mouseWheelSpeed;else{if(!("detail"in e))return;t=i=-e.detail/3*this.options.mouseWheelSpeed}if(t*=this.options.invertWheelDirection,i*=this.options.invertWheelDirection,this.hasVerticalScroll||(t=i,i=0),this.options.snap)return n=this.currentPage.pageX,r=this.currentPage.pageY,t>0?n--:0>t&&n++,i>0?r--:0>i&&r++,void this.goToPage(n,r);n=this.x+o.round(this.hasHorizontalScroll?t:0),r=this.y+o.round(this.hasVerticalScroll?i:0),this.directionX=t>0?-1:0>t?1:0,this.directionY=i>0?-1:0>i?1:0,n>0?n=0:n<this.maxScrollX&&(n=this.maxScrollX),r>0?r=0:r<this.maxScrollY&&(r=this.maxScrollY),this.scrollTo(n,r,0),this.options.probeType>1&&this._execEvent("scroll")}},_initSnap:function(){this.currentPage={},"string"==typeof this.options.snap&&(this.options.snap=this.scroller.querySelectorAll(this.options.snap)),this.on("refresh",function(){var e,t,i,n,r,s,a=0,l=0,p=0,c=this.options.snapStepX||this.wrapperWidth,u=this.options.snapStepY||this.wrapperHeight;if(this.pages=[],this.wrapperWidth&&this.wrapperHeight&&this.scrollerWidth&&this.scrollerHeight){if(this.options.snap===!0)for(i=o.round(c/2),n=o.round(u/2);p>-this.scrollerWidth;){for(this.pages[a]=[],e=0,r=0;r>-this.scrollerHeight;)this.pages[a][e]={x:o.max(p,this.maxScrollX),y:o.max(r,this.maxScrollY),width:c,height:u,cx:p-i,cy:r-n},r-=u,e++;p-=c,a++}else for(s=this.options.snap,e=s.length,t=-1;e>a;a++)(0===a||s[a].offsetLeft<=s[a-1].offsetLeft)&&(l=0,t++),this.pages[l]||(this.pages[l]=[]),p=o.max(-s[a].offsetLeft,this.maxScrollX),r=o.max(-s[a].offsetTop,this.maxScrollY),i=p-o.round(s[a].offsetWidth/2),n=r-o.round(s[a].offsetHeight/2),this.pages[l][t]={x:p,y:r,width:s[a].offsetWidth,height:s[a].offsetHeight,cx:i,cy:n},p>this.maxScrollX&&l++;this.goToPage(this.currentPage.pageX||0,this.currentPage.pageY||0,0),this.options.snapThreshold%1===0?(this.snapThresholdX=this.options.snapThreshold,this.snapThresholdY=this.options.snapThreshold):(this.snapThresholdX=o.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width*this.options.snapThreshold),this.snapThresholdY=o.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height*this.options.snapThreshold))}}),this.on("flick",function(){var e=this.options.snapSpeed||o.max(o.max(o.min(o.abs(this.x-this.startX),1e3),o.min(o.abs(this.y-this.startY),1e3)),300);this.goToPage(this.currentPage.pageX+this.directionX,this.currentPage.pageY+this.directionY,e)})},_nearestSnap:function(e,t){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var i=0,n=this.pages.length,r=0;if(o.abs(e-this.absStartX)<this.snapThresholdX&&o.abs(t-this.absStartY)<this.snapThresholdY)return this.currentPage;for(e>0?e=0:e<this.maxScrollX&&(e=this.maxScrollX),t>0?t=0:t<this.maxScrollY&&(t=this.maxScrollY);n>i;i++)if(e>=this.pages[i][0].cx){e=this.pages[i][0].x;break}for(n=this.pages[i].length;n>r;r++)if(t>=this.pages[0][r].cy){t=this.pages[0][r].y;break}return i==this.currentPage.pageX&&(i+=this.directionX,0>i?i=0:i>=this.pages.length&&(i=this.pages.length-1),e=this.pages[i][0].x),r==this.currentPage.pageY&&(r+=this.directionY,0>r?r=0:r>=this.pages[0].length&&(r=this.pages[0].length-1),t=this.pages[0][r].y),{x:e,y:t,pageX:i,pageY:r}},goToPage:function(e,t,i,n){n=n||this.options.bounceEasing,e>=this.pages.length?e=this.pages.length-1:0>e&&(e=0),t>=this.pages[e].length?t=this.pages[e].length-1:0>t&&(t=0);var r=this.pages[e][t].x,s=this.pages[e][t].y;i=void 0===i?this.options.snapSpeed||o.max(o.max(o.min(o.abs(r-this.x),1e3),o.min(o.abs(s-this.y),1e3)),300):i,this.currentPage={x:r,y:s,pageX:e,pageY:t},this.scrollTo(r,s,i,n)},next:function(e,t){var i=this.currentPage.pageX,n=this.currentPage.pageY;i++,i>=this.pages.length&&this.hasVerticalScroll&&(i=0,n++),this.goToPage(i,n,e,t)},prev:function(e,t){var i=this.currentPage.pageX,n=this.currentPage.pageY;i--,0>i&&this.hasVerticalScroll&&(i=0,n--),this.goToPage(i,n,e,t)},_initKeys:function(e){var t,i={pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40};if("object"==typeof this.options.keyBindings)for(t in this.options.keyBindings)"string"==typeof this.options.keyBindings[t]&&(this.options.keyBindings[t]=this.options.keyBindings[t].toUpperCase().charCodeAt(0));else this.options.keyBindings={};for(t in i)this.options.keyBindings[t]=this.options.keyBindings[t]||i[t];u.addEvent(r,"keydown",this),this.on("destroy",function(){u.removeEvent(r,"keydown",this)})},_key:function(e){if(this.enabled){var t,i=this.options.snap,n=i?this.currentPage.pageX:this.x,r=i?this.currentPage.pageY:this.y,s=u.getTime(),a=this.keyTime||0,l=.25;switch(this.options.useTransition&&this.isInTransition&&(t=this.getComputedPosition(),this._translate(o.round(t.x),o.round(t.y)),this.isInTransition=!1),this.keyAcceleration=200>s-a?o.min(this.keyAcceleration+l,50):0,e.keyCode){case this.options.keyBindings.pageUp:this.hasHorizontalScroll&&!this.hasVerticalScroll?n+=i?1:this.wrapperWidth:r+=i?1:this.wrapperHeight;break;case this.options.keyBindings.pageDown:this.hasHorizontalScroll&&!this.hasVerticalScroll?n-=i?1:this.wrapperWidth:r-=i?1:this.wrapperHeight;break;case this.options.keyBindings.end:n=i?this.pages.length-1:this.maxScrollX,r=i?this.pages[0].length-1:this.maxScrollY;break;case this.options.keyBindings.home:n=0,r=0;break;case this.options.keyBindings.left:n+=i?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.up:r+=i?1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.right:n-=i?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.down:r-=i?1:5+this.keyAcceleration>>0;break;default:return}if(i)return void this.goToPage(n,r);n>0?(n=0,this.keyAcceleration=0):n<this.maxScrollX&&(n=this.maxScrollX,this.keyAcceleration=0),r>0?(r=0,this.keyAcceleration=0):r<this.maxScrollY&&(r=this.maxScrollY,this.keyAcceleration=0),this.scrollTo(n,r,0),this.keyTime=s}},_animate:function(e,t,i,n){function r(){var h,d,f,m=u.getTime();return m>=p?(s.isAnimating=!1,s._translate(e,t),void(s.resetPosition(s.options.bounceTime)||s._execEvent("scrollEnd"))):(m=(m-l)/i,f=n(m),h=(e-o)*f+o,d=(t-a)*f+a,s._translate(h,d),s.isAnimating&&c(r),void(3==s.options.probeType&&s._execEvent("scroll")))}var s=this,o=this.x,a=this.y,l=u.getTime(),p=l+i;this.isAnimating=!0,r()},handleEvent:function(e){switch(e.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(e);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(e);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(e);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"oTransitionEnd":case"MSTransitionEnd":this._transitionEnd(e);break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._wheel(e);break;case"keydown":this._key(e);break;case"click":this.enabled&&!e._constructed&&(e.preventDefault(),e.stopPropagation())}}},p.prototype={handleEvent:function(e){switch(e.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(e);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(e);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(e)}},destroy:function(){this.options.fadeScrollbars&&(clearTimeout(this.fadeTimeout),this.fadeTimeout=null),this.options.interactive&&(u.removeEvent(this.indicator,"touchstart",this),u.removeEvent(this.indicator,u.prefixPointerEvent("pointerdown"),this),u.removeEvent(this.indicator,"mousedown",this),u.removeEvent(r,"touchmove",this),u.removeEvent(r,u.prefixPointerEvent("pointermove"),this),u.removeEvent(r,"mousemove",this),u.removeEvent(r,"touchend",this),u.removeEvent(r,u.prefixPointerEvent("pointerup"),this),u.removeEvent(r,"mouseup",this)),this.options.defaultScrollbars&&this.wrapper.parentNode.removeChild(this.wrapper)},_start:function(e){var t=e.touches?e.touches[0]:e;e.preventDefault(),e.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=t.pageX,this.lastPointY=t.pageY,this.startTime=u.getTime(),this.options.disableTouch||u.addEvent(r,"touchmove",this),this.options.disablePointer||u.addEvent(r,u.prefixPointerEvent("pointermove"),this),this.options.disableMouse||u.addEvent(r,"mousemove",this),this.scroller._execEvent("beforeScrollStart")},_move:function(e){var t,i,n,r,s=e.touches?e.touches[0]:e,o=u.getTime();this.moved||this.scroller._execEvent("scrollStart"),this.moved=!0,t=s.pageX-this.lastPointX,this.lastPointX=s.pageX,i=s.pageY-this.lastPointY,this.lastPointY=s.pageY,n=this.x+t,r=this.y+i,this._pos(n,r),1==this.scroller.options.probeType&&o-this.startTime>300?(this.startTime=o,this.scroller._execEvent("scroll")):this.scroller.options.probeType>1&&this.scroller._execEvent("scroll"),e.preventDefault(),e.stopPropagation()},_end:function(e){if(this.initiated){if(this.initiated=!1,e.preventDefault(),e.stopPropagation(),u.removeEvent(r,"touchmove",this),u.removeEvent(r,u.prefixPointerEvent("pointermove"),this),u.removeEvent(r,"mousemove",this),this.scroller.options.snap){var t=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),i=this.options.snapSpeed||o.max(o.max(o.min(o.abs(this.scroller.x-t.x),1e3),o.min(o.abs(this.scroller.y-t.y),1e3)),300);this.scroller.x==t.x&&this.scroller.y==t.y||(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=t,this.scroller.scrollTo(t.x,t.y,i,this.scroller.options.bounceEasing))}this.moved&&this.scroller._execEvent("scrollEnd")}},transitionTime:function(e){e=e||0;var t=u.style.transitionDuration;if(this.indicatorStyle[t]=e+"ms",!e&&u.isBadAndroid){this.indicatorStyle[t]="0.0001ms";var i=this;c(function(){"0.0001ms"===i.indicatorStyle[t]&&(i.indicatorStyle[t]="0s")})}},transitionTimingFunction:function(e){this.indicatorStyle[u.style.transitionTimingFunction]=e},refresh:function(){this.transitionTime(),this.options.listenX&&!this.options.listenY?this.indicatorStyle.display=this.scroller.hasHorizontalScroll?"block":"none":this.options.listenY&&!this.options.listenX?this.indicatorStyle.display=this.scroller.hasVerticalScroll?"block":"none":this.indicatorStyle.display=this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?"block":"none",this.scroller.hasHorizontalScroll&&this.scroller.hasVerticalScroll?(u.addClass(this.wrapper,"iScrollBothScrollbars"),u.removeClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="8px":this.wrapper.style.bottom="8px")):(u.removeClass(this.wrapper,"iScrollBothScrollbars"),u.addClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="2px":this.wrapper.style.bottom="2px"));this.wrapper.offsetHeight;this.options.listenX&&(this.wrapperWidth=this.wrapper.clientWidth,this.options.resize?(this.indicatorWidth=o.max(o.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px"):this.indicatorWidth=this.indicator.clientWidth,this.maxPosX=this.wrapperWidth-this.indicatorWidth,"clip"==this.options.shrink?(this.minBoundaryX=-this.indicatorWidth+8,this.maxBoundaryX=this.wrapperWidth-8):(this.minBoundaryX=0,this.maxBoundaryX=this.maxPosX),this.sizeRatioX=this.options.speedRatioX||this.scroller.maxScrollX&&this.maxPosX/this.scroller.maxScrollX),this.options.listenY&&(this.wrapperHeight=this.wrapper.clientHeight,this.options.resize?(this.indicatorHeight=o.max(o.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px"):this.indicatorHeight=this.indicator.clientHeight,this.maxPosY=this.wrapperHeight-this.indicatorHeight,"clip"==this.options.shrink?(this.minBoundaryY=-this.indicatorHeight+8,this.maxBoundaryY=this.wrapperHeight-8):(this.minBoundaryY=0,this.maxBoundaryY=this.maxPosY),this.maxPosY=this.wrapperHeight-this.indicatorHeight,this.sizeRatioY=this.options.speedRatioY||this.scroller.maxScrollY&&this.maxPosY/this.scroller.maxScrollY),this.updatePosition()},updatePosition:function(){var e=this.options.listenX&&o.round(this.sizeRatioX*this.scroller.x)||0,t=this.options.listenY&&o.round(this.sizeRatioY*this.scroller.y)||0;this.options.ignoreBoundaries||(e<this.minBoundaryX?("scale"==this.options.shrink&&(this.width=o.max(this.indicatorWidth+e,8),this.indicatorStyle.width=this.width+"px"),e=this.minBoundaryX):e>this.maxBoundaryX?"scale"==this.options.shrink?(this.width=o.max(this.indicatorWidth-(e-this.maxPosX),8),this.indicatorStyle.width=this.width+"px",e=this.maxPosX+this.indicatorWidth-this.width):e=this.maxBoundaryX:"scale"==this.options.shrink&&this.width!=this.indicatorWidth&&(this.width=this.indicatorWidth,this.indicatorStyle.width=this.width+"px"),t<this.minBoundaryY?("scale"==this.options.shrink&&(this.height=o.max(this.indicatorHeight+3*t,8),
35 this.indicatorStyle.height=this.height+"px"),t=this.minBoundaryY):t>this.maxBoundaryY?"scale"==this.options.shrink?(this.height=o.max(this.indicatorHeight-3*(t-this.maxPosY),8),this.indicatorStyle.height=this.height+"px",t=this.maxPosY+this.indicatorHeight-this.height):t=this.maxBoundaryY:"scale"==this.options.shrink&&this.height!=this.indicatorHeight&&(this.height=this.indicatorHeight,this.indicatorStyle.height=this.height+"px")),this.x=e,this.y=t,this.scroller.options.useTransform?this.indicatorStyle[u.style.transform]="translate("+e+"px,"+t+"px)"+this.scroller.translateZ:(this.indicatorStyle.left=e+"px",this.indicatorStyle.top=t+"px")},_pos:function(e,t){0>e?e=0:e>this.maxPosX&&(e=this.maxPosX),0>t?t=0:t>this.maxPosY&&(t=this.maxPosY),e=this.options.listenX?o.round(e/this.sizeRatioX):this.scroller.x,t=this.options.listenY?o.round(t/this.sizeRatioY):this.scroller.y,this.scroller.scrollTo(e,t)},fade:function(e,t){if(!t||this.visible){clearTimeout(this.fadeTimeout),this.fadeTimeout=null;var i=e?250:500,n=e?0:300;e=e?"1":"0",this.wrapperStyle[u.style.transitionDuration]=i+"ms",this.fadeTimeout=setTimeout(function(e){this.wrapperStyle.opacity=e,this.visible=+e}.bind(this,e),n)}}},a.utils=u,"undefined"!=typeof e&&e.exports?e.exports=a:(n=function(){return a}.call(t,i,t,e),!(void 0!==n&&(e.exports=n)))}(window,document,Math)}]); 35 this.indicatorStyle.height=this.height+"px"),t=this.minBoundaryY):t>this.maxBoundaryY?"scale"==this.options.shrink?(this.height=o.max(this.indicatorHeight-3*(t-this.maxPosY),8),this.indicatorStyle.height=this.height+"px",t=this.maxPosY+this.indicatorHeight-this.height):t=this.maxBoundaryY:"scale"==this.options.shrink&&this.height!=this.indicatorHeight&&(this.height=this.indicatorHeight,this.indicatorStyle.height=this.height+"px")),this.x=e,this.y=t,this.scroller.options.useTransform?this.indicatorStyle[u.style.transform]="translate("+e+"px,"+t+"px)"+this.scroller.translateZ:(this.indicatorStyle.left=e+"px",this.indicatorStyle.top=t+"px")},_pos:function(e,t){0>e?e=0:e>this.maxPosX&&(e=this.maxPosX),0>t?t=0:t>this.maxPosY&&(t=this.maxPosY),e=this.options.listenX?o.round(e/this.sizeRatioX):this.scroller.x,t=this.options.listenY?o.round(t/this.sizeRatioY):this.scroller.y,this.scroller.scrollTo(e,t)},fade:function(e,t){if(!t||this.visible){clearTimeout(this.fadeTimeout),this.fadeTimeout=null;var i=e?250:500,n=e?0:300;e=e?"1":"0",this.wrapperStyle[u.style.transitionDuration]=i+"ms",this.fadeTimeout=setTimeout(function(e){this.wrapperStyle.opacity=e,this.visible=+e}.bind(this,e),n)}}},a.utils=u,"undefined"!=typeof e&&e.exports?e.exports=a:(n=function(){return a}.call(t,i,t,e),!(void 0!==n&&(e.exports=n)))}(window,document,Math)}]);
This diff could not be displayed because it is too large.