!function(){var t={},e={},n={},i={},r={},o={},s={},c={},a={},u={},l={},h={},f={},d={},p={},g={},v={};t=function(t){function e(){}function n(t,n){var i;return Object.create?i=Object.create(t):(e.prototype=t,i=new e),i.constructor=n,i}function i(t,e){if(t){if(t.nodeType)return[t];var e=e&&e.nodeType?e:document;return t&&"string"==typeof t?e.querySelectorAll(t):void 0}}for(var r=/\\?\{([^{}]+)\}/g,o="",s=/^[\s\xa0]+|[\s\xa0]+$/g,c=String.prototype.trim,a=c?function(t){return null==t?o:c.call(t)}:function(t){return null==t?o:(t+"").replace(s,o)},u=0,l=function(t){var e=t.offsetTop;return null!=t.offsetParent&&(e+=l(t.offsetParent)),e},h=function(t){var e=t.offsetLeft;return null!=t.offsetParent&&(e+=h(t.offsetParent)),e},f=({isObject:function(t){return t===Object(t)},isArray:Array.isArray||function(t){return"[object Array]"==toString.call(t)},isEmpty:function(t){if(null==t)return!0;if(this.isArray(t)||this.isString(t))return 0===t.length;for(var e in t)if(this.has(t,e))return!1;return!0},mix:function(t,e,n){for(var i in e)t[i]=e[i];return t},extend:function(t,e,i,r){if(!e||!t)return t;var o,s=e.prototype;return o=n(s,t),t.prototype=this.mix(o,t.prototype),t.superclass=n(s,e),i&&this.mix(o,i),r&&this.mix(t,r),t},startsWith:function(t,e){return 0===t.lastIndexOf(e,0)},endsWith:function(t,e){var n=t.length-e.length;return n>=0&&t.indexOf(e,n)===n},trim:a,substitute:function(t,e,n){return"string"==typeof t&&e?t.replace(n||r,function(t,n){return"\\"===t.charAt(0)?t.slice(1):void 0===e[n]?o:e[n]}):t},vendor:function(){for(var t,e=document.createElement("div").style,n=["t","webkitT","MozT","msT","OT"],i=0,r=n.length;i1?n:n[0]||null}}}),"object"==typeof module&&module.exports?n=o:o}(n),i=function(t){var e={linear:[0,0,1,1],ease:[.25,.1,.25,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1],quadratic:[.33,.66,.66,1],circular:[.1,.57,.1,1],bounce:[.71,1.35,.47,1.41],format:function(t){if(t)return"string"==typeof t&&this[t]?this[t]instanceof Array?[" cubic-bezier(",this[t],") "].join(""):this[t]:t instanceof Array?[" cubic-bezier(",t,") "].join(""):t}};return"object"==typeof module&&module.exports?t=e:e}(i),r=function(e){function r(t,e,n,i,r){var o=function(e){var i=1-e;return 3*i*i*e*t+3*i*e*e*n+e*e*e},s=function(t){var n=1-t;return 3*n*n*t*e+3*n*t*t*i+t*t*t},c=function(e){var i=1-e;return 3*(2*(e-1)*e+i*i)*t+3*(-e*e*e+2*i*e)*n};return function(t){var e,n,i,a,u,l,h=t;for(i=h,l=0;l<8;l++){if(a=o(i)-h,Math.abs(a)n)return s(n);for(;ea?e=i:n=i,i=.5*(n-e)+e}return s(i)}}function o(t){var e=this;e.cfg=s.mix({easing:"linear"},t)}var s=t,c=n,a=i,u=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)},l=["webkit","moz","ms","o"],h=window.cancelAnimationFrame;if(!h)for(var f=0;f=t.cfg.duration?t.cfg.duration:t.now-t.start,t.progress=t.easingFn(t.duration/t.cfg.duration),t.percent=t.duration/t.cfg.duration+t._hasFinishedPercent,t.percent>=1||t._stop){t.percent=t._stop&&t._stop.percent?t._stop.percent:1,t.duration=t._stop&&t._stop.duration?t._stop.duration:t.duration;var e={percent:t.percent};return t.trigger("stop",e),void(t.percent>=1&&(t.isfinished=!0,t.trigger("end",{percent:1})))}t.trigger("run",{percent:t.progress,originPercent:t.percent}),t._run()})},stop:function(){var t=this;t._stop={percent:t.percent,now:t.now},h(t._raf)}}),"object"==typeof module&&module.exports?e=o:o}(r),o=function(e){function o(t){return Math.round(1e5*parseFloat(t))/1e5}function s(){return{translateX:0,translateY:0,rotate:0,skewX:0,skewY:0,scaleX:1,scaleY:1}}function c(t){return t=t.split(/,/),t=Array.prototype.map.call(t,function(t){return o(t)})}function a(t){t=c(t);var e,n,i,r=t[0],s=t[1],a=t[2],u=t[3];return r*u-s*a?(e=Math.sqrt(r*r+s*s),i=(r*a+s*u)/(r*u-a*s),n=(r*u-s*a)/e,r*ug.MIN_DURATION){var e=window.getComputedStyle(this.el);for(var n in t.cfg.css)if(C[n]){var i=/transform/.test(n)?e[y]:e[n];d(t.el,n,p.substitute(T+" scale({scaleX},{scaleY})",u(i)))}t.el.style[_]="none"}return t.timer&&t.timer.stop()&&t.timer.reset(),t.computeStyle=null,t},reset:function(t){var e=this;return e.computeStyle=null,p.mix(e.cfg,t),this.timer&&e.timer.reset({duration:Math.round(e.cfg.duration),easing:e.cfg.easing}),e}}),"object"==typeof module&&module.exports?e=l:l}(o),s=function(t){function e(t,e,n){return setTimeout(c(t,n),e)}function n(t,e,n){return!!Array.isArray(t)&&(i(t,n[e],n),!0)}function i(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(void 0!==t.length)for(i=0;i-1}function p(t){return t.trim().split(/\s+/g)}function g(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;in[e]}):i.sort()),i}function y(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),o=0;o1&&!n.firstMultiple?n.firstMultiple=w(e):1===r&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,c=s?s.center:o.center,a=e.center=N(i);e.timeStamp=lt(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=R(c,a),e.distance=Y(c,a),k(n,e),e.offsetDirection=O(e.deltaX,e.deltaY),e.scale=s?B(s.pointers,i):1,e.rotation=s?L(s.pointers,i):0,S(n,e);var u=t.element;f(e.srcEvent.target,u)&&(u=e.srcEvent.target),e.target=u}function k(t,e){var n=e.center,i=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};e.eventType!==Tt&&o.eventType!==bt||(r=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=r.x+(n.x-i.x),e.deltaY=r.y+(n.y-i.y)}function S(t,e){var n,i,r,o,s=t.lastInterval||e,c=e.timeStamp-s.timeStamp;if(e.eventType!=Et&&(c>xt||void 0===s.velocity)){var a=s.deltaX-e.deltaX,u=s.deltaY-e.deltaY,l=A(c,a,u);i=l.x,r=l.y,n=ut(l.x)>ut(l.y)?l.x:l.y,o=O(a,u),t.lastInterval=e}else n=s.velocity,i=s.velocityX,r=s.velocityY,o=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=o}function w(t){for(var e=[],n=0;n=ut(e)?t>0?St:wt:e>0?Nt:At}function Y(t,e,n){n||(n=Lt);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function R(t,e,n){n||(n=Lt);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return 180*Math.atan2(r,i)/Math.PI}function L(t,e){return R(e[1],e[0],Bt)-R(t[1],t[0],Bt)}function B(t,e){return Y(e[0],e[1],Bt)/Y(t[0],t[1],Bt)}function I(){this.evEl=Xt,this.evWin=Mt,this.allow=!0,this.pressed=!1,T.apply(this,arguments)}function X(){this.evEl=zt,this.evWin=Ht,T.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function M(){this.evTarget=Ut,this.evWin=jt,this.started=!1,T.apply(this,arguments)}function P(t,e){var n=v(t.touches),i=v(t.changedTouches);return e&(bt|Et)&&(n=m(n.concat(i),"identifier",!0)),[n,i]}function D(){this.evTarget=Wt,this.targetIds={},T.apply(this,arguments)}function z(t,e){var n=v(t.touches),i=this.targetIds;if(e&(Tt|Ct)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,s=v(t.changedTouches),c=[],a=this.target;if(o=n.filter(function(t){return f(t.target,a)}),e===Tt)for(r=0;r-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){n.manager.emit(n.options.event+(e?q(i):""),t)}var n=this,i=this.state;i=re&&e(!0)},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=ce)},canEmit:function(){for(var t=0;te.threshold&&r&e.direction},attrTest:function(t){return K.prototype.attrTest.call(this,t)&&(this.state&ne||!(this.state&ne)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=W(t.direction);e&&this.manager.emit(this.options.event+e,t),this._super.emit.call(this,t)},reset:function(){}}),s(G,K,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[$t]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ne)},emit:function(t){if(this._super.emit.call(this,t),1!==t.scale){var e=t.scale<1?"in":"out";this.manager.emit(this.options.event+e,t)}}}),s(J,j,{defaults:{event:"press",pointers:1,time:500,threshold:5},getTouchAction:function(){return[Gt]},process:function(t){var n=this.options,i=t.pointers.length===n.pointers,r=t.distancen.time;if(this._input=t,!r||!i||t.eventType&(bt|Et)&&!o)this.reset();else if(t.eventType&Tt)this.reset(),this._timer=e(function(){this.state=oe,this.tryEmit()},n.time,this);else if(t.eventType&bt)return oe;return ce},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===oe&&(t&&t.eventType&bt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=lt(),this.manager.emit(this.options.event,this._input)))}}),s($,K,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[$t]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ne)}}),s(Q,K,{defaults:{event:"swipe",threshold:10,velocity:.65,direction:Ot|Yt,pointers:1},getTouchAction:function(){return V.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(Ot|Yt)?e=t.velocity:n&Ot?e=t.velocityX:n&Yt&&(e=t.velocityY),this._super.attrTest.call(this,t)&&n&t.direction&&t.distance>this.options.threshold&&ut(e)>this.options.velocity&&t.eventType&bt},emit:function(t){var e=W(t.direction);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),s(tt,j,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:10,posThreshold:10},getTouchAction:function(){return[Jt]},process:function(t){var n=this.options,i=t.pointers.length===n.pointers,r=t.distance0?this.right-this.left:0,this.height=this.bottom-this.top>0?this.bottom-this.top:0,this}}),"object"==typeof module&&module.exports?e=n:n}(c),a=function(e){var i=t,r=n,o=i.prefixStyle("transform"),s=function(t){var e=t.stickyElement,n=t.curStickyElement,r=t.xscroll,o=t._,s=r.getPlugin("infinite");if(s){s.userConfig.renderHook.call(self,e,n),e.setAttribute("xs-guid",n.guid),i.addClass(e,n.className);for(var c in n.style)"display"!=c&&"position"!=c&&(e.style[c]=c==o.height?n.style[c]+"px":n.style[c])}else{var a=n.getAttribute("style");e.innerHTML=n.innerHTML,e.className=n.className,a&&e.setAttribute("style",a)}},c=function(t){c.superclass.constructor.call(this,t),this.userConfig=i.mix({stickyRenderTo:void 0,forceSticky:!0,prefix:"xs-sticky-container",stickyRenderFunc:s,zoomType:"y"},t),this.init()};return i.extend(c,r,{init:function(){var t=this,e=t.userConfig;t.xscroll=e.xscroll,t.isY=!("y"!=e.zoomType);return t._={top:t.isY?"top":"left",left:t.isY?"left":"bottom",right:t.isY?"right":"top",height:t.isY?"height":"width",width:t.isY?"width":"height"},t.stickyRenderTo=i.getNode(e.stickyRenderTo),t._handlers=[],t},getStickiesPos:function(){for(var t=this,e=(t.xscroll,t.isInfinite),n=t.isY,r=t._,o=[],s=function(o){var s={};return e?(s[r.top]=n?o._top:o._left,s[r.height]=n?o._height:o._width):(s[r.top]=t.isY?i.getOffsetTop(o):i.getOffsetLeft(o),s[r.height]=t.isY?o.offsetHeight:o.offsetWidth),s},c=0;cl&&c.push(a)}if(!c.length)return e.stickyElement&&(e.stickyElement.style.display="none"),void(e.curStickyIndex=void 0);var h=Math.max.apply(null,c);if(e.curStickyIndex!=h||t){var f=e.curStickyIndex;e.curStickyIndex=h,e.curStickyElement=e.stickyElements[h],e.curStickyPos=r[h],e.stickyElement=e.curStickyPos.el;for(var a=0,u=r.length;av[s.top]&&i+g[s.height]=0?t.style[s.top]:t._top)+"px",t.style[s.height]&&(h.style[s.height]=t.style[s.height]+"px"),l.userConfig.renderHook.call(r,h,t)):(h.style.display="block",h.style.position="absolute",h.style[s.width]="100%",h.innerHTML=t.innerHTML,h.className=t.className,h.setAttribute("style",t.getAttribute("style")),h.style[s.top]=t[s.offsetTop]+"px",t.style.display="none"),n.appendChild(h),r.fixedElements.push(h))),c.trigger("fixedchange",{fixedIndex:e,fixedElement:u?t:h,originalFixedElement:t,isRender:o})},destroy:function(){var t=this;t.fixedElements=void 0}}),"object"==typeof module&&module.exports?e=o:o}(u),l=function(e){function i(t){i.superclass.constructor.call(this),this.userConfig=t,this.init()}var r=t,o=n,l=c,h=s,f=a,d=u,p=500,g="ease",v=.1;return r.extend(i,o,{version:"3.0.13",init:function(){var t=this,e={preventDefault:!0,bounce:!0,boundryCheck:!0,useTransition:!0,gpuAcceleration:!0,BOUNDRY_CHECK_EASING:g,BOUNDRY_CHECK_DURATION:p,BOUNDRY_CHECK_ACCELERATION:v,useOriginScroll:!1,zoomType:"y",indicatorInsets:{top:3,bottom:3,left:3,right:3,width:3,spacing:5},container:".xs-container",content:".xs-content",stickyElements:".xs-sticky",fixedElements:".xs-fixed",touchAction:"auto"};t.guid=r.guid(),t.renderTo=r.getNode(t.userConfig.renderTo),t.__timers={};var n=JSON.parse(t.renderTo.getAttribute("xs-cfg")),i=t.userConfig=r.mix(r.mix(e,n),t.userConfig);return t.container=r.getNode(i.container,t.renderTo),t.content=r.getNode(i.content,t.renderTo),t.boundry=new l,t.boundry.refresh(),t},destroy:function(){var t=this;t.mc&&t.mc.destroy(),t.sticky&&t.sticky.destroy(),t.fixed&&t.fixed.destroy()},_initContainer:function(){},enableGPUAcceleration:function(){return this.userConfig.gpuAcceleration=!0,this},disableGPUAcceleration:function(){return this.userConfig.gpuAcceleration=!1,this},getScrollPos:function(){var t=this;return{scrollLeft:t.getScrollLeft(),scrollTop:t.getScrollTop()}},getScrollTop:function(){},getScrollLeft:function(){},scrollTo:function(t,e,n,i,r){var o=this,t=void 0===t||isNaN(t)?-o.getScrollLeft():t,e=void 0===e||isNaN(e)?-o.getScrollTop():e;o.scrollLeft(t,n,i,r),o.scrollTop(e,n,i,r)},scrollBy:function(t,e,n,i,r){this.scrollByX(t,n,i,r),this.scrollByY(e,n,i,r)},scrollLeftBy:function(t,e,n,i){this.scrollLeft(Number(t)+Number(this.getScrollLeft()),e,n,i)},scrollTopBy:function(t,e,n,i){this.scrollTop(Number(t)+Number(this.getScrollTop()),e,n,i)},scrollLeft:function(t,e,n,i){},scrollTop:function(t,e,n,i){},resetSize:function(){var t=this;if(t.container&&t.content){var e=t.userConfig,n=getComputedStyle(t.renderTo),i=(t.width=(e.width||t.renderTo.offsetWidth)-r.px2Num(n["padding-left"])-r.px2Num(n["padding-right"]),t.height=(e.height||t.renderTo.offsetHeight)-r.px2Num(n["padding-top"])-r.px2Num(n["padding-bottom"]),e.containerWidth||t.content.offsetWidth),o=e.containerHeight||t.content.offsetHeight;return t.containerWidth=i0?c-f:0;if(f=f=0){var v=d/a;v=v>1?1:v,h=-v*(f-s)}if(p>=0){var v=p/a;v=v>1?1:v,h=v*(f-s)+u-f}return e.barPos=Math.round(h),{size:Math.round(f),pos:e.barPos}},scrollTo:function(t,e,n,r){var o=this;o.show();var s=o.xscroll.userConfig.gpuAcceleration?" translateZ(0) ":"",c={css:{transform:o.isY?"translateY("+t+"px)"+s:"translateX("+t+"px)"+s},duration:e,easing:n,useTransition:o.xscroll.userConfig.useTransition,end:r};o.__timer=o.__timer||new i(o.indicate,c),o.__timer.stop(),o.__timer.reset(c),o.__timer.run()},moveTo:function(t){var e=this;e.show();var n=e.xscroll.userConfig.gpuAcceleration?" translateZ(0) ":"";e.isY?e.indicate.style[a]="translateY("+t+"px) "+n:e.indicate.style[a]="translateX("+t+"px) "+n,e.indicate.style[l]=""},_scrollHandler:function(t){var e=this;return e._update(t[e.scrollTopOrLeft]),e},isBoundryOut:function(){var t=this;return t.isY?t.xscroll.isBoundryOutTop()||t.xscroll.isBoundryOutBottom():t.xscroll.isBoundryOutLeft()||t.xscroll.isBoundryOutRight()},_scrollEndHandler:function(t){var e=this;return e.isBoundryOut()||(e._update(t[e.scrollTopOrLeft]),e.hide()),e},_bindEvt:function(){var t=this;t.__isEvtBind||(t.__isEvtBind=!0,t.xscroll.on("scroll",t._scrollHandler,t),t.xscroll.on("scrollend",t._scrollEndHandler,t))},reset:function(){var t=this;t.pos=0,t._update()},hide:function(t,e,n){var i=this,t=t>=0?t:300,n=n>=0?n:100;i.scrollbar.style.opacity=0,i.scrollbar.style[l]=["opacity ",t,"ms "," ease-out ",n,"ms"].join("")},show:function(){var t=this;t.scrollbar.style.opacity=1,t.scrollbar.style[l]=""}}),"object"==typeof module&&module.exports?e=h:h}(h),f=function(e){var i=t,r=n,o=function(t){o.superclass.constructor.call(this,t),this.userConfig=i.mix({},t),this.init()};return i.extend(o,r,{init:function(){var t=this;t.xscroll=t.userConfig.xscroll},add:function(t,e){var n=this;if(e=i.extend({captureBounce:!1,stopPropagation:!0},e),n.__scrolls||(n.__scrolls={}),t.guid&&!n.__scrolls[t.guid])return t.parentscroll=n.xscroll,n._bind(t),n.__scrolls[t.guid]=t},remove:function(t){var e=this;if(t&&t.guid){var n=e.__scrolls[t.guid];n&&(n.parentscroll=null,e._unbind(t),n=null)}},get:function(t){return t?this.__scrolls[t]:this.__scrolls},_unbind:function(t){},_bind:function(t){var e=this,n=e.xscroll;n.renderTo.addEventListener("touchstart",function(){n._resetLockConfig()}),t.renderTo.addEventListener("touchstart",function(){t._resetLockConfig()}),n.on("panend",n._resetLockConfig),t.on("panend",t._resetLockConfig),t.on("panstart",function(e){if(!t.userConfig.lockY&&!n.userConfig.lockY){if(t.isBoundryOut())return void(n.userConfig.lockY=!0);16==e.direction&&t.getBoundryOutTop()>=0?t.userConfig.lockY=!0:8==e.direction&&t.getBoundryOutTop()>=0&&t.getBoundryOutBottom()<0&&(n.userConfig.lockY=!0),8==e.direction&&t.getBoundryOutBottom()>=0?t.userConfig.lockY=!0:16==e.direction&&t.getBoundryOutBottom()>=0&&t.getBoundryOutTop()<0&&(n.userConfig.lockY=!0),t.getBoundryOutTop()<0&&t.getBoundryOutBottom()<0&&(n.userConfig.lockY=!0)}if(!t.userConfig.lockX&&!n.userConfig.lockX){if(t.isBoundryOut())return void(n.userConfig.lockX=!0);4==e.direction&&t.getBoundryOutLeft()>=0?t.userConfig.lockX=!0:2==e.direction&&t.getBoundryOutLeft()>=0&&t.getBoundryOutRight()<0&&(n.userConfig.lockX=!0),2==e.direction&&t.getBoundryOutRight()>=0?t.userConfig.lockX=!0:4==e.direction&&t.getBoundryOutRight()>=0&&t.getBoundryOutLeft()<0&&(n.userConfig.lockX=!0),t.getBoundryOutLeft()<0&&t.getBoundryOutRight()<0&&(n.userConfig.lockX=!0)}!t.userConfig.lockX&&n.userConfig.lockX&&(2==e.direction||4==e.direction?n.userConfig.lockY=!0:t.userConfig.lockX=!0),!t.userConfig.lockY&&n.userConfig.lockY&&(8==e.direction||16==e.direction?n.userConfig.lockX=!0:t.userConfig.lockY=!0)})}}),"object"==typeof module&&module.exports?e=o:o}(f),d=function(e){function n(t){n.superclass.constructor.call(this,t)}var i=t,r=l,c=o,a=s,u=h,d=f,p=.382,g=5e-4,v=.03,m=i.prefixStyle("transformOrigin"),y=i.prefixStyle("transform");return i.extend(n,r,{init:function(){var t=this,e={preventDefault:!0,preventTouchMove:!0};return n.superclass.init.call(this),t.userConfig=i.mix(e,t.userConfig),t.SCROLL_ACCELERATION=t.userConfig.SCROLL_ACCELERATION||g,t.BOUNDRY_ACCELERATION=t.userConfig.BOUNDRY_ACCELERATION||v,t._initContainer(),t.resetSize(),t._setOverflowBehavior(),t.defaltConfig={lockY:t.userConfig.lockY,lockX:t.userConfig.lockX},t},destroy:function(){var t=this;n.superclass.destroy.call(this),t.renderTo.style.overflow="",t.renderTo.style.touchAction="",t.container.style.transform="",t.container.style.transformOrigin="",t.content.style.transform="",t.content.style.transformOrigin="",t.off("touchstart mousedown",t._ontouchstart),t.off("touchmove",t._ontouchmove),window.removeEventListener("resize",t.resizeHandler,t),t.destroyScrollBars()},_setOverflowBehavior:function(){var t=this,e=t.renderTo,n=getComputedStyle(e);return t.userConfig.lockX=void 0===t.userConfig.lockX?"hidden"==n["overflow-x"]||t.width==t.containerWidth:t.userConfig.lockX,t.userConfig.lockY=void 0===t.userConfig.lockY?"hidden"==n["overflow-y"]||t.height==t.containerHeight:t.userConfig.lockY,t.userConfig.scrollbarX=void 0===t.userConfig.scrollbarX?!t.userConfig.lockX:t.userConfig.scrollbarX,t.userConfig.scrollbarY=void 0===t.userConfig.scrollbarY?!t.userConfig.lockY:t.userConfig.scrollbarY,t},_resetLockConfig:function(){var t=this;return t.userConfig.lockX=t.defaltConfig.lockX,t.userConfig.lockY=t.defaltConfig.lockY,t},_initContainer:function(){var t=this;if(n.superclass._initContainer.call(t),!t.__isContainerInited&&t.container&&t.content)return t.container.style[m]="0 0",t.content.style[m]="0 0",t.translate(0,0),t.__isContainerInited=!0,t},getScrollTop:function(){var t=window.getComputedStyle(this.container)[y].match(/[-\d\.*\d*]+/g);return t?0===Math.round(t[5])?0:-Math.round(t[5]):0},getScrollLeft:function(){var t=window.getComputedStyle(this.content)[y].match(/[-\d\.*\d*]+/g);return t?0===Math.round(t[4])?0:-Math.round(t[4]):0},scrollLeft:function(t,e,n,i){if(!this.userConfig.lockX){var r=this.userConfig.gpuAcceleration?" translateZ(0) ":"";return this.x=void 0===t||isNaN(t)||0===t?0:-Math.round(t),this._animate("x","translateX("+this.x+"px) scale("+this.scale+")"+r,e,n,i),this}},scrollTop:function(t,e,n,i){if(!this.userConfig.lockY){var r=this.userConfig.gpuAcceleration?" translateZ(0) ":"";return this.y=void 0===t||isNaN(t)||0===t?0:-Math.round(t),this._animate("y","translateY("+this.y+"px) "+r,e,n,i),this}},translate:function(t,e,n){var i=this.userConfig.gpuAcceleration?" translateZ(0) ":"";return this.x=t||this.x||0,this.y=e||this.y||0,this.scale=n||this.scale||1,this.content.style[y]="translate("+this.x+"px,0px) scale("+this.scale+") "+i,this.container.style[y]="translate(0px,"+this.y+"px) "+i,this},_animate:function(t,e,n,i,r){var o=this,n=n||0,i=i||"quadratic",s="y"==t?o.container:o.content,a={css:{transform:e},duration:n,easing:i,run:function(t){o.trigger("scroll",{scrollTop:o.getScrollTop(),scrollLeft:o.getScrollLeft(),type:"scroll"})},useTransition:o.userConfig.useTransition,end:function(e){r&&r(),0!==o["_bounce"+t]&&void 0!==o["_bounce"+t]||"linear"==i||(o["isScrolling"+t.toUpperCase()]=!1,o["isRealScrolling"+t.toUpperCase()]=!1,o.trigger("scrollend",{type:"scrollend",scrollTop:o.getScrollTop(),scrollLeft:o.getScrollLeft(),zoomType:t,duration:n,easing:i}))}},u=o.__timers[t]=o.__timers[t]||new c(s,a);return u.stop(),u.reset(a),u.run(),o.trigger("scrollanimate",{type:"scrollanimate",scrollTop:-o.y,scrollLeft:-o.x,duration:n,easing:i,zoomType:t}),this},_ontap:function(t){var e=this;e.boundryCheck(),!e.isRealScrollingX&&!e.isRealScrollingY,e.isRealScrollingY=!1,e.isRealScrollingY=!1},_bindEvt:function(){n.superclass._bindEvt.call(this);var t=this;if(!t.__isEvtBind){t.__isEvtBind=!0;var e=new a.Pinch;return t.mc.add(e),t.on("touchstart mousedown",t._ontouchstart,t),t.on("touchmove",t._ontouchmove,t),t.on("tap",t._ontap,t),t.on("panstart",t._onpanstart,t),t.on("pan",t._onpan,t),t.on("panend",t._onpanend,t),t.resizeHandler=function(e){setTimeout(function(){t.resetSize(),t.boundryCheck(0),t.render()},100)},window.addEventListener("resize",t.resizeHandler,t),this}},_ontouchstart:function(t){var e=this;!/(SELECT|INPUT|TEXTAREA)/i.test(t.target.tagName)&&e.userConfig.preventDefault&&t.preventDefault(),e.stop()},_ontouchmove:function(t){this.userConfig.preventTouchMove&&t.preventDefault()},_onpanstart:function(t){this.userConfig.preventTouchMove&&t.preventDefault();var e=this,n=e.getScrollLeft(),i=e.getScrollTop();e.stop(),e.translate(-n,-i);var r=e.mc.get("pan").options.threshold;return e.thresholdY="8"==t.direction?r:"16"==t.direction?-r:0,e.thresholdX="2"==t.direction?r:"4"==t.direction?-r:0,e},_onpan:function(t){this.userConfig.preventTouchMove&&t.preventDefault();var e=this,n=e.boundry,i=e.userConfig,r=i.boundryCheck,o=i.bounce,s=e.__topstart||(e.__topstart=-e.getScrollTop()),c=e.__leftstart||(e.__leftstart=-e.getScrollLeft()),a=i.lockY?Number(s):Number(s)+(t.deltaY+e.thresholdY),u=i.lockX?Number(c):Number(c)+(t.deltaX+e.thresholdX),l=e.containerWidth,h=e.containerHeight;return r&&(a=a>n.top?o?(a-n.top)*p+n.top:n.top:a,a=an.left?o?(u-n.left)*p+n.left:n.left:u,u=u0},isBoundryOutRight:function(){return this.getBoundryOutRight()>0},isBoundryOutTop:function(){return this.getBoundryOutTop()>0},isBoundryOutBottom:function(){return this.getBoundryOutBottom()>0},getBoundryOutTop:function(){return-this.boundry.top-this.getScrollTop()},getBoundryOutLeft:function(){return-this.boundry.left-this.getScrollLeft()},getBoundryOutBottom:function(){return this.boundry.bottom-this.containerHeight+this.getScrollTop()},getBoundryOutRight:function(){return this.boundry.right-this.containerWidth+this.getScrollLeft()},computeScroll:function(t,e){var n=this,i=n.userConfig,r=n.boundry,o="x"==t?n.getScrollLeft():n.getScrollTop(),s="x"==t?r.left:r.top,c="x"==t?r.right:r.bottom,a="x"==t?n.containerWidth:n.containerHeight,u=i.maxSpeed||2,l=i.boundryCheck,h=i.bounce,f={},d="inside";if(l){if("x"==t&&(n.isBoundryOutLeft()||n.isBoundryOutRight()))return void n.boundryCheckX();if("y"==t&&(n.isBoundryOutTop()||n.isBoundryOutBottom()))return void n.boundryCheckY()}if(!("x"==t&&n.userConfig.lockX||"y"==t&&n.userConfig.lockY)){e=e>u?u:e<-u?-u:e;var p=n.SCROLL_ACCELERATION*(e/(Math.abs(e)||1)),g=n.BOUNDRY_ACCELERATION,v=isNaN(e/p)?0:e/p,m=Number(o)+v*e/2;if(m<-s&&l){var y=-s-o,_=(Math.sqrt(-2*p*y+e*e)+e)/p,x=e-p*_,T=Math.abs(x/g),C=x/2*T;v=_+T,m=h?-s+C:-s,d="outside"}else if(m>a-c&&l){var y=c-a+o,_=(Math.sqrt(-2*p*y+e*e)-e)/p,x=e-p*_,T=Math.abs(x/g),C=x/2*T;v=_+T,m=h?a-c+C:a-c,d="outside"}if(!isNaN(m)&&!isNaN(v)){f.pos=m,f.duration=v,f.easing=Math.abs(e)>2?"circular":"quadratic",f.status=d;var b=t.toUpperCase();return n["isScrolling"+b]=!0,n["isRealScrolling"+b]=!0,f}}},boundryCheckX:function(t,e,n){var i=this;if(i.userConfig.boundryCheck&&("function"==typeof arguments[0]?(n=arguments[0],t=i.userConfig.BOUNDRY_CHECK_DURATION,e=i.userConfig.BOUNDRY_CHECK_EASING):(t=0===t?0:i.userConfig.BOUNDRY_CHECK_DURATION,e=e||i.userConfig.BOUNDRY_CHECK_EASING),i.userConfig.bounce&&!i.userConfig.lockX)){var r=i.boundry;return i.isBoundryOutLeft()?i.scrollLeft(-r.left,t,e,n):i.isBoundryOutRight()&&i.scrollLeft(i.containerWidth-r.right,t,e,n),i}},boundryCheckY:function(t,e,n){var i=this;if(i.userConfig.boundryCheck&&("function"==typeof arguments[0]?(n=arguments[0],t=i.userConfig.BOUNDRY_CHECK_DURATION,e=i.userConfig.BOUNDRY_CHECK_EASING):(t=0===t?0:i.userConfig.BOUNDRY_CHECK_DURATION,e=e||i.userConfig.BOUNDRY_CHECK_EASING),i.userConfig.boundryCheck&&!i.userConfig.lockY)){var r=i.boundry;return i.isBoundryOutTop()?i.scrollTop(-r.top,t,e,n):i.isBoundryOutBottom()&&i.scrollTop(i.containerHeight-r.bottom,t,e,n),i}},boundryCheck:function(t,e,n){return this.boundryCheckX(t,e,n),this.boundryCheckY(t,e,n),this},stop:function(){var t=this;if(t.__timers.x&&t.__timers.x.stop(),t.__timers.y&&t.__timers.y.stop(),t.isScrollingX||t.isScrollingY){var e=t.getScrollTop(),n=t.getScrollLeft();t.trigger("scrollend",{scrollTop:e,scrollLeft:n}),t.trigger("stop",{scrollTop:e,scrollLeft:n}),t.isScrollingX=!1,t.isScrollingY=!1}return t},render:function(){var t=this;return n.superclass.render.call(this),"static"==getComputedStyle(t.renderTo).position&&(t.renderTo.style.position="relative"),t.renderTo.style.overflow="hidden",t.initScrollBars(),t.initController(),t},initScrollBars:function(){var t=this;if(t.userConfig.boundryCheck){var e=t.userConfig.indicatorInsets;return t.userConfig.scrollbarX&&(t.scrollbarX=t.scrollbarX||new u({xscroll:t,type:"x",spacing:e.spacing}),t.scrollbarX.render(),t.scrollbarX._update(),t.scrollbarX.hide()),t.userConfig.scrollbarY&&(t.scrollbarY=t.scrollbarY||new u({xscroll:t,type:"y",spacing:e.spacing}),t.scrollbarY.render(),t.scrollbarY._update(),t.scrollbarY.hide()),t}},destroyScrollBars:function(){return this.scrollbarX&&this.scrollbarX.destroy(),this.scrollbarY&&this.scrollbarY.destroy(),this},initController:function(){var t=this;return t.controller=t.controller||new d({xscroll:t}),t},_unPreventHref:function(t){var e=i.findParentEl(t.target,"a",this.renderTo);if(e&&"a"==e.tagName.toLowerCase()){var n=e.getAttribute("data-xs-href");n&&e.setAttribute("href",n)}},_preventHref:function(t){var e=i.findParentEl(t.target,"a",this.renderTo);if(e&&"a"==e.tagName.toLowerCase()){var n=e.getAttribute("href");n&&e.setAttribute("href","javascript:void(0)"),n&&e.setAttribute("data-xs-href",n)}},_triggerClick:function(t){var e=t.target;if(!/(SELECT|INPUT|TEXTAREA)/i.test(e.tagName)){var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,t.view,1,e.screenX,e.screenY,e.clientX,e.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,0,null),e.dispatchEvent(n)}}}),"object"==typeof module&&module.exports?e=n:n}(d),p=function(e){function n(t){n.superclass.constructor.call(this,t)}var i=t,r=l,s=o;i.prefixStyle("transformOrigin");return i.extend(n,r,{init:function(){var t=this;n.superclass.init.call(this),t.resetSize()},getScrollTop:function(){return this.renderTo.scrollTop},getScrollLeft:function(){return this.renderTo.scrollLeft},scrollTop:function(t,e,n,i){var r=this,t=Math.round(t);if(!r.userConfig.lockY){var e=e||0,n=n||"quadratic",o={css:{scrollTop:t},duration:e,easing:n,run:function(t){r.trigger("scroll",{scrollTop:r.getScrollTop(),scrollLeft:r.getScrollLeft()})},useTransition:!1,end:i};r.__timers.y=r.__timers.y||new s(r.renderTo,o),r.__timers.y.stop(),r.__timers.y.reset(o),r.__timers.y.run()}},scrollLeft:function(t,e,n,i){var r=this,t=Math.round(t);if(!r.userConfig.lockX){var e=e||0,n=n||"quadratic",o={css:{scrollLeft:t},duration:e,easing:n,run:function(t){r.trigger("scroll",{scrollTop:r.getScrollTop(),scrollLeft:r.getScrollLeft()})},useTransition:!1,end:i};r.__timers.x=r.__timers.x||new s(r.renderTo,o),r.__timers.x.stop(),r.__timers.x.reset(o),r.__timers.x.run()}},_bindEvt:function(){n.superclass._bindEvt.call(this);var t=this;t.__isEvtBind||(t.__isEvtBind=!0,t.renderTo.addEventListener("scroll",function(e){t.trigger("scroll",{type:"scroll",scrollTop:t.getScrollTop(),scrollLeft:t.getScrollLeft()})},!1))}}),"object"==typeof module&&module.exports?e=n:n}(p),g=function(e){var i=t,c=n,a=r,u=o,l=s,h=d,f=p,g=function(t){var e=t&&t.useOriginScroll?f:h;return new e(t)};return g.Util=i,g.Base=c,g.Timer=a,g.Animate=u,g.Hammer=l,g.Plugins={},"object"==typeof module&&module.exports?e=g:window.XScroll=g}(g),v=function(e){var i=t,r=n,o=g,s=function(t){s.superclass.constructor.call(this,t),this.init(t)};return i.extend(s,r,{init:function(t){var e=this;return e.userConfig=i.mix({selector:".xscroll"},t),e},get:function(t){var e=this;if(t)for(var n=0,i=e.xscrolls.length;n