!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):e.vuescroll=t(e.Vue)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},o=function(){function i(e,t){for(var o=0;o container's height!");else S("refresh must be enabled!")}else S("You can only use triggerRefreshOrLoad in slide mode!")},getCurrentviewDomSlide:function(){return q(this.scrollPanelElm,this.$el)}}},{mounted:function(){this.scrollX=new K,this.scrollY=new K},methods:{nativeStop:function(){this.scrollX.stop(),this.scrollY.stop()},nativePause:function(){this.scrollX.pause(),this.scrollY.pause()},nativeContinue:function(){this.scrollX.continue(),this.scrollY.continue()},nativeScrollTo:function(e,t,o,i){!1===o||void 0===o&&(o=this.mergedOptions.scrollPanel.speed);var r=this.scrollPanelElm,n=r.scrollTop,s=r.scrollLeft,l=r.scrollWidth,a=r.clientWidth,c=r.scrollHeight,h=r.clientHeight;if(e=void 0===e?s:B(e,l-a),t=void 0===t?n:B(t,c-h),o){var u=F(i=i||this.mergedOptions.scrollPanel.easing,Q);e!=s&&this.scrollX.startScroll(s,e,o,function(e){r.scrollLeft=e},this.scrollingComplete.bind(this),void 0,u),t!=n&&this.scrollY.startScroll(n,t,o,function(e){r.scrollTop=e},this.scrollingComplete.bind(this),void 0,u)}else r.scrollTop=t,r.scrollLeft=e},getCurrentviewDomNative:function(){return q(this.scrollContentElm,this.$el)}}}],methods:{internalScrollTo:function(e,t,o,i){"native"==this.mode?this.nativeScrollTo(e,t,o,i):"slide"==this.mode&&this.slideScrollTo(e,t,o,i)},stop:function(){this.nativeStop()},pause:function(){this.nativePause()},continue:function(){this.nativeContinue()},getCurrentviewDom:function(){return"slide"==this.mode?this.getCurrentviewDomSlide():this.getCurrentviewDomNative()}}},ne=Date.now||function(){return+new Date},se={},le=1,ae={effect:{}},ce=null;ce="undefined"!=typeof window?window:{},ae.effect.Animate={requestAnimationFrame:$(ce),stop:function(e){var t=null!=se[e];return t&&(se[e]=null),t},isRunning:function(e){return null!=se[e]},start:function(l,a,c,h,u,d){var _=ne(),f=_,p=0,v=0,m=le++;if(d||(d=document.body),m%20==0){var e={};for(var t in se)e[t]=!0;se=e}return se[m]=!0,ae.effect.Animate.requestAnimationFrame(function e(t){var o=!0!==t,i=ne();if(!se[m]||a&&!a(m))return se[m]=null,void(c&&c(60-v/((i-_)/1e3),m,!1));if(o)for(var r=Math.round((i-f)/(1e3/60))-1,n=0;nn.__maxScrollLeft?l=n.__maxScrollLeft:l<0&&(l=0),a>n.__maxScrollTop?a=n.__maxScrollTop:a<0&&(a=0),n.__publish(l,a,e,t)},zoomBy:function(e,t,o,i,r){this.zoomTo(this.__zoomLevel*e,t,o,i,r)},scrollTo:function(e,t,o,i,r,n,s){var l=this;if(l.__isDecelerating&&(ae.effect.Animate.stop(l.__isDecelerating),l.__isDecelerating=!1),null!=i&&i!==l.__zoomLevel){if(!l.options.zooming)throw new Error("Zooming is not enabled!");e*=i,t*=i,l.__computeScrollMax(i)}else i=l.__zoomLevel;l.options.scrollingX||r?l.options.paging?e=Math.round(e/l.__clientWidth)*l.__clientWidth:l.options.snapping&&(e=Math.round(e/l.__snapWidth)*l.__snapWidth):e=l.__scrollLeft,l.options.scrollingY||r?l.options.paging?t=Math.round(t/l.__clientHeight)*l.__clientHeight:l.options.snapping&&(t=Math.round(t/l.__snapHeight)*l.__snapHeight):t=l.__scrollTop,r||(e=Math.max(Math.min(l.__maxScrollLeft,e),0),t=Math.max(Math.min(l.__maxScrollTop,t),0)),e===l.__scrollLeft&&t===l.__scrollTop&&(o=!1),l.__isTracking||l.__publish(e,t,i,o,n,s)},scrollBy:function(e,t,o){var i=this,r=i.__isAnimating?i.__scheduledLeft:i.__scrollLeft,n=i.__isAnimating?i.__scheduledTop:i.__scrollTop;i.scrollTo(r+(e||0),n+(t||0),o)},getCurrentPage:function(){return this.__computePage(),{x:this.__currentPageX,y:this.__currentPageY}},goToPage:function(e,t){var o=e.x,i=e.y;isNaN(o)&&(o=1),isNaN(i)&&(i=1),this.scrollTo((o-1)*this.__clientWidth,(i-1)*this.__clientHeight,t)},doMouseZoom:function(e,t,o,i){var r=0-i.__refreshHeight?(i.__refreshActive=!1,i.__refreshDeactivate&&i.__refreshDeactivate()):!i.__loadActive&&h>=i.__maxScrollTop+i.__loadHeight&&0t.__lastTouchMove-100;n-=3)r=n;if(r!==i){var s=o[i]-o[r],l=t.__scrollLeft-o[r-2],a=t.__scrollTop-o[r-1];t.__decelerationVelocityX=l/s*(1e3/60),t.__decelerationVelocityY=a/s*(1e3/60);var c=t.options.paging||t.options.snapping?4:1;Math.abs(t.__decelerationVelocityX)>c||Math.abs(t.__decelerationVelocityY)>c?t.__refreshActive||t.__loadActive||t.__startDeceleration(e):t.__scrollComplete()}else t.__scrollComplete()}else 100=n||Math.abs(i.__decelerationVelocityY)>=n;return e||(i.__didDecelerationComplete=!0),e},function(){i.__isDecelerating&&(i.__isDecelerating=!1,i.__didDecelerationComplete&&i.__scrollComplete(),i.scrollTo(i.__scrollLeft,i.__scrollTop,i.options.snapping))})},__stepThroughDeceleration:function(e){var t=this,o=t.options.bouncing,i=t.__minDecelerationScrollLeft,r=t.__maxDecelerationScrollLeft,n=t.__minDecelerationScrollTop,s=t.__maxDecelerationScrollTop,l=t.__scrollLeft+t.__decelerationVelocityX,a=t.__scrollTop+t.__decelerationVelocityY,c=lt.__maxDecelerationScrollLeft&&(_=t.__maxDecelerationScrollLeft-l)),h&&(at.__maxDecelerationScrollTop&&(f=t.__maxDecelerationScrollTop-a)),0!==_&&(_*t.__decelerationVelocityX<=0?(t.__decelerationVelocityX+=_*p,_<0&&-_>=o.right&&0=o.left&&t.__decelerationVelocityX<0&&(t.__decelerationVelocityX=o.left/2)):t.__decelerationVelocityX=_*v),0!==f&&(f*t.__decelerationVelocityY<=0?(t.__decelerationVelocityY+=f*p,f<0&&-f>=o.bottom&&0=o.top&&t.__decelerationVelocityY<0&&(t.__decelerationVelocityY=o.top/2)):t.__decelerationVelocityY=f*v/2)}};for(var fe in _e)de.prototype[fe]=_e[fe];var pe=new m;O("vuescroll-silde-mode-style","\n @-webkit-keyframes loading-rotate {\n to {\n -webkit-transform: rotate(1turn);\n transform: rotate(1turn);\n }\n }\n\n @keyframes loading-rotate {\n to {\n -webkit-transform: rotate(1turn);\n transform: rotate(1turn);\n }\n }\n\n @-webkit-keyframes loading-wipe {\n 0% {\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -40px;\n }\n to {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -120px;\n }\n }\n\n @keyframes loading-wipe {\n 0% {\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -40px;\n }\n to {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -120px;\n }\n }\n\n .__vuescroll .__refresh,\n .__vuescroll .__load {\n position: absolute;\n width: 100%;\n color: black;\n height: 50px;\n line-height: 50px;\n text-align: center;\n font-size: 16px;\n }\n .__vuescroll .__refresh svg,\n .__vuescroll .__load svg {\n margin-right: 10px;\n width: 25px;\n height: 25px;\n vertical-align: sub;\n }\n .__vuescroll .__refresh svg.active,\n .__vuescroll .__load svg.active {\n transition: all 0.2s;\n }\n .__vuescroll .__refresh svg.active.deactive,\n .__vuescroll .__load svg.active.deactive {\n transform: rotateZ(180deg);\n }\n .__vuescroll .__refresh svg path,\n .__vuescroll .__refresh svg rect,\n .__vuescroll .__load svg path,\n .__vuescroll .__load svg rect {\n fill: #20a0ff;\n }\n .__vuescroll .__refresh svg.start,\n .__vuescroll .__load svg.start {\n stroke: #343640;\n stroke-width: 4;\n stroke-linecap: round;\n -webkit-animation: loading-rotate 2s linear infinite;\n animation: loading-rotate 2s linear infinite;\n }\n .__vuescroll .__refresh svg.start .bg-path,\n .__vuescroll .__load svg.start .bg-path {\n stroke: #f2f2f2;\n fill: none;\n }\n .__vuescroll .__refresh svg.start .active-path,\n .__vuescroll .__load svg.start .active-path {\n stroke: #20a0ff;\n fill: none;\n stroke-dasharray: 90, 150;\n stroke-dashoffset: 0;\n -webkit-animation: loading-wipe 1.5s ease-in-out infinite;\n animation: loading-wipe 1.5s ease-in-out infinite;\n }\n ");var ve=function(e,t){var o,i=2i.__maxScrollLeft&&(r=i.__scrollLeft-i.__maxScrollLeft),i.__scrollTop<0?(n=-i.__scrollTop,this.outTheBottomBoundary=!1,this.outTheTopBoundary=!0):i.__scrollTop>i.__maxScrollTop?(n=i.__scrollTop-i.__maxScrollTop,this.outTheTopBoundary=!1,this.outTheBottomBoundary=!0):this.outTheTopBoundary=this.outTheBottomBoundary=!1,e=a/(h+n),t=l/(c+r);var u=Math.min(Math.max(0,i.__scrollTop),i.__maxScrollTop),d=Math.min(Math.max(0,i.__scrollLeft),i.__maxScrollLeft);this.bar.vBar.state.posValue=100*(u+n)/o.clientHeight,this.bar.hBar.state.posValue=100*(d+r)/o.clientWidth,i.__scrollLeft<0&&(this.bar.hBar.state.posValue=0),i.__scrollTop<0&&(this.bar.vBar.state.posValue=0),this.bar.vBar.state.size=e<1?e:0,this.bar.hBar.state.size=t<1?t:0},registryEvent:function(e){var t,o,i,r,n,s,l,a="refresh"==e?A:R,c="refresh"==e?this.scroller.activatePullToRefresh:this.scroller.activatePushToLoad,h="refresh"==e?"refreshStage":"loadStage",u=this.$refs[a].elm||this.$refs[a],d=(t=e,o=h,r=u,n=(i=this).$listeners,s=function(){i.vuescroll.state[o]="start",setTimeout(function(){i.scroller.finishRefreshOrLoad()},2e3)},l=void 0,n[t+"-before-deactivate"]&&(l=function(e){i.vuescroll.state[o]="beforeDeactive",i.$emit(t+"-before-deactivate",i,r,e.bind(i.scroller))}),n[t+"-start"]&&(s=function(){i.vuescroll.state[o]="start",i.$emit(t+"-start",i,r,i.scroller.finishRefreshOrLoad.bind(i.scroller))}),{activateCallback:function(){i.vuescroll.state[o]="active",i.$emit(t+"-activate",i,r)},deactivateCallback:function(){i.vuescroll.state[o]="deactive",i.$emit(t+"-deactivate",i,r)},startCallback:s,beforeDeactivateCallback:l,beforeDeactiveEnd:function(){i.vuescroll.state[o]="beforeDeactiveEnd",i.$emit(t+"-before-deactivate-end",i,r)}}),_=u.offsetHeight;c.bind(this.scroller)(_,d)},getSlidePosition:function(){return{scrollLeft:this.scroller.__scrollLeft,scrollTop:this.scroller.__scrollTop}}}},{methods:{updateNativeModeBarState:function(){var e=this.scrollPanelElm,t="percent"==this.vuescroll.state.currentSizeStrategy,o=this.vuescroll.state,i=o.width,r=o.height,n=t||!i?e.clientWidth:i.slice(0,-2),s=t||!r?e.clientHeight:r.slice(0,-2),l=s/e.scrollHeight,a=n/e.scrollWidth;this.bar.vBar.state.posValue=100*e.scrollTop/s,this.bar.hBar.state.posValue=100*e.scrollLeft/n,this.bar.vBar.state.size=l<1?l:0,this.bar.hBar.state.size=a<1?a:0},getNativePosition:function(){return{scrollTop:this.scrollPanelElm.scrollTop,scrollLeft:this.scrollPanelElm.scrollLeft}},css:function(e,t){return window.getComputedStyle(e)[t]},checkScrollable:function(e,t,o){for(var i=!1,r=e.target?e.target:e;r&&1==r.nodeType&&r!==this.scrollPanelElm.parentNode&&!/^BODY|HTML/.test(r.nodeName);){var n=("dy"==t?this.css(r,"overflowY"):this.css(r,"overflowX"))||this.css(r,"overflow")||"";if(/scroll|auto/.test(n)){var s=this.getScrollProcess(r),l=s.v,a=s.h;if("dx"==t&&(o<0&&0