diff --git a/dist/vuescroll.common.js b/dist/vuescroll.common.js index 0b7298d3..c346db4b 100644 --- a/dist/vuescroll.common.js +++ b/dist/vuescroll.common.js @@ -2824,7 +2824,7 @@ var bar = { var vm = this; var parentRef = vm.$parent.$refs; var railBackgroundColor = getRgbAColor(vm.ops.rail.background, vm.ops.rail.opacity); - var style = (_style = {}, _defineProperty$1(_style, vm.bar.posName, 0), _defineProperty$1(_style, vm.bar.opsSize, '100%'), _defineProperty$1(_style, vm.bar.size, vm.state.size), _defineProperty$1(_style, 'borderRadius', vm.ops.rail[vm.bar.opsSize]), _defineProperty$1(_style, 'background', vm.ops.bar.background), _defineProperty$1(_style, 'opacity', vm.state.opacity), _defineProperty$1(_style, 'transform', 'translate' + scrollMap[vm.type].axis + '(' + vm.state.posValue + '%)'), _defineProperty$1(_style, 'cursor', 'pointer'), _defineProperty$1(_style, 'position', 'relative'), _defineProperty$1(_style, 'transition', 'opacity .5s'), _defineProperty$1(_style, 'userSelect', 'none'), _style); + var style = (_style = {}, _defineProperty$1(_style, vm.bar.posName, 0), _defineProperty$1(_style, vm.bar.opsSize, '100%'), _defineProperty$1(_style, vm.bar.size, vm.state.size), _defineProperty$1(_style, 'borderRadius', 'inherit'), _defineProperty$1(_style, 'background', vm.ops.bar.background), _defineProperty$1(_style, 'opacity', vm.state.opacity), _defineProperty$1(_style, 'transform', 'translate' + scrollMap[vm.type].axis + '(' + vm.state.posValue + '%)'), _defineProperty$1(_style, 'cursor', 'pointer'), _defineProperty$1(_style, 'position', 'relative'), _defineProperty$1(_style, 'transition', 'opacity .5s'), _defineProperty$1(_style, 'userSelect', 'none'), _style); var bar = { style: style, class: 'vuescroll-' + vm.type + '-bar', @@ -2852,7 +2852,8 @@ var bar = { class: 'vuescroll-' + vm.type + '-rail', style: (_style2 = { position: 'absolute', - borderRadius: vm.ops.rail[vm.bar.opsSize], + zIndex: 1, + // borderRadius: vm.ops.rail[vm.bar.opsSize], background: railBackgroundColor }, _defineProperty$1(_style2, vm.bar.opsSize, vm.ops.rail[vm.bar.opsSize]), _defineProperty$1(_style2, vm.bar.posName, '2px'), _defineProperty$1(_style2, vm.bar.opposName, '2px'), _defineProperty$1(_style2, vm.ops.rail.pos, 0), _style2), on: { diff --git a/dist/vuescroll.common.min.js b/dist/vuescroll.common.min.js index d54cd05b..ac9b4a88 100644 --- a/dist/vuescroll.common.min.js +++ b/dist/vuescroll.common.min.js @@ -1 +1 @@ -"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var Vue=_interopDefault(require("vue")),_typeof="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};function deepCopy(e,t){for(var i in t="object"===(void 0===t?"undefined":_typeof(t))&&t||{},e)t[i]="object"===_typeof(e[i])?deepCopy(e[i],t[i]={}):e[i];return t}function deepMerge(e,t){for(var i in t=t||{},e)"object"===_typeof(e[i])?void 0===t[i]?(t[i]={},deepCopy(e[i],t[i])):deepMerge(e[i],t[i]):void 0===t[i]&&(t[i]=e[i]);return t}function defineReactive(e,t,i,o){var r=null;(i[t]||"function"==typeof i)&&(o=o||t,"function"==typeof i&&(r=i),Object.defineProperty(e,t,{get:r||function(){return i[o]},configurable:!0}))}var scrollBarWidth=void 0;function getGutter(){if(Vue.prototype.$isServer)return 0;if(void 0!==scrollBarWidth)return scrollBarWidth;var e=document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var i=document.createElement("div");i.style.width="100%",e.appendChild(i);var o=i.offsetWidth;return e.parentNode.removeChild(e),scrollBarWidth=t-o}var doneUtil={refreshDomStyle:!1,loadDomStyle:!1,hide:!1};function hideSystemBar(){if(!doneUtil.hide){doneUtil.hide=!0;var e=document.createElement("style");e.type="text/css",e.innerHTML=".vuescroll-panel::-webkit-scrollbar{width:0;height:0}",document.getElementsByTagName("HEAD").item(0).appendChild(e)}}var styleMap={};function createDomStyle(e){if(!doneUtil[e]){doneUtil[e]=!0;var t=document.createElement("style");t.type="text/css",t.innerHTML=styleMap[e],document.getElementsByTagName("HEAD").item(0).appendChild(t)}}function eventCenter(e,t,i){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];"on"==(arguments.length>4&&void 0!==arguments[4]?arguments[4]:"on")?e.addEventListener(t,i,o):e.removeEventListener(t,i,o)}styleMap.refreshDomStyle="\n.vuescroll-refresh {\n position:absolute;\n width: 100%;\n color: black;\n height: 50px;\n text-align: center;\n font-size: 16px;\n line-height: 50px;\n}\n.vuescroll-refresh svg {\n margin-right: 10px;\n width: 25px;\n height: 25px;\n vertical-align: sub;\n}\n.vuescroll-refresh svg path,\n.vuescroll-refresh svg rect{\nfill: #FF6700;\n}\n",styleMap.loadDomStyle="\n.vuescroll-load {\n position:absolute;\n width: 100%;\n color: black;\n height: 50px;\n text-align: center;\n font-size: 16px;\n line-height: 50px;\n}\n.vuescroll-load svg {\n margin-right: 10px;\n width: 25px;\n height: 25px;\n vertical-align: sub;\n}\n.vuescroll-load svg path,\n.vuescroll-load svg rect{\nfill: #FF6700;\n}\n";var error=function(e){console.error("[vuescroll] "+e)},warn=function(e){console.warn("[vuescroll] "+e)};function isChildInParent(e,t){var i=!1;if(!e||!t)return i;for(;e.parentNode!==t&&9!==e.parentNode.nodeType&&!e.parentNode._isVuescroll;)e=e.parentNode;return e.parentNode==t&&(i=!0),i}var pxValueReg=/(.*?)px/;function extractNumberFromPx(e){var t=pxValueReg.exec(e);return t&&t[1]}function isSupportTouch(){return"ontouchstart"in window}function getPrefix(e){var t,i=document.documentElement.style;return e.opera&&"[object Opera]"===Object.prototype.toString.call(opera)?t="presto":"MozAppearance"in i?t="gecko":"WebkitAppearance"in i?t="webkit":"string"==typeof navigator.cpuClass&&(t="trident"),{trident:"ms",gecko:"moz",webkit:"webkit",presto:"O"}[t]}function isSupportGivenStyle(e,t){var i="-"+getPrefix(window)+"-"+t,o=document.createElement("div");return o.style[e]=i,o.style[e]==i&&i}function listenResize(e,t){return injectObject(e,t)}function injectObject(e,t){if(!e.hasResized){var i=document.createElement("object");return e.hasResized=!0,i.style.cssText="display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; padding: 0; margin: 0; opacity: 0; z-index: -1000; pointer-events: none;",i.tabIndex=-1,i.type="text/html",i.data="about:blank",i.isResizeElm=!0,i.onload=function(){eventCenter(i.contentDocument.defaultView,"resize",t)},e.appendChild(i),function(){i.contentDocument&&eventCenter(i.contentDocument.defaultView,"resize",t,"off"),e.removeChild(i),e.hasResized=!1}}}var modes=["slide","native","pure-native"],NOOP=function(){},smallChangeArray=["mergedOptions.vuescroll.pullRefresh.tips","mergedOptions.vuescroll.pushLoad.tips","mergedOptions.rail","mergedOptions.bar"],GCF={vuescroll:{mode:"native",sizeStrategy:"percent",pullRefresh:{enable:!1,tips:{deactive:"Pull to Refresh",active:"Release to Refresh",start:"Refreshing...",beforeDeactive:"Refresh Successfully!"}},pushLoad:{enable:!1,tips:{deactive:"Push to Load",active:"Release to Load",start:"Loading...",beforeDeactive:"Load Successfully!"}},paging:!1,zooming:!0,snapping:{enable:!1,width:100,height:100},scroller:{bouncing:!0,locking:!0,minZoom:.5,maxZoom:3,speedMultiplier:1,penetrationDeceleration:.03,penetrationAcceleration:.08,preventDefault:!0}},scrollPanel:{initialScrollY:!1,initialScrollX:!1,scrollingX:!0,scrollingY:!0,speed:300,easing:void 0},scrollContent:{tag:"div",padding:!1,props:{},attrs:{}},rail:{vRail:{width:"6px",pos:"right",background:"#01a99a",opacity:0},hRail:{height:"6px",pos:"bottom",background:"#01a99a",opacity:0}},bar:{showDelay:500,vBar:{background:"#00a650",keepShow:!1,opacity:1,hover:!1},hBar:{background:"#00a650",keepShow:!1,opacity:1,hover:!1}}};function validateOptions(e){var t=!1,i=e.vuescroll,o=e.scrollPanel;~modes.indexOf(i.mode)||(error('The vuescroll\'s option "mode" should be one of the '+modes),t=!0),i.paging==i.snapping.enable&&i.paging&&(i.pullRefresh||i.pushLoad)&&error("paging, snapping, (pullRefresh with pushLoad) can only one of them to be true.");var r=o.initialScrollY,l=o.initialScrollX;return r&&!String(r).match(/^\d+(\.\d+)?(%)?$/)&&error("The prop `initialScrollY` should be a percent number like 10% or an exact number that greater than or equal to 0 like 100."),l&&!String(l).match(/^\d+(\.\d+)?(%)?$/)&&error("The prop `initialScrollX` should be a percent number like 10% or an exact number that greater than or equal to 0 like 100."),t}function hackPropsData(){var e=this;if("vueScroll"===e.$options.name){var t=deepMerge(e.$vuescrollConfig,{}),i=deepMerge(GCF,t);e.$options.propsData.ops=e.$options.propsData.ops||{},Object.keys(e.$options.propsData.ops).forEach(function(t){defineReactive(e.mergedOptions,t,e.$options.propsData.ops)}),deepMerge(i,e.mergedOptions);defineReactive(e.mergedOptions.scrollContent,"paddPos",function(){return"padding-"+e.mergedOptions.rail.vRail.pos}),defineReactive(e.mergedOptions.scrollContent,"paddValue",function(){return e.mergedOptions.rail.vRail.width})}}var hackLifecycle={data:function(){return{shouldStopRender:!1,mergedOptions:{vuescroll:{},scrollPanel:{},scrollContent:{},rail:{},bar:{}}}},created:function(){hackPropsData.call(this),this.renderError=validateOptions(this.mergedOptions)}};function createEasingFunction(e,t){return function(i){return t(e,i)}}function easingPattern(e,t){var i=null;return"easeInQuad"===e&&(i=t*t),"easeOutQuad"===e&&(i=t*(2-t)),"easeInOutQuad"===e&&(i=t<.5?2*t*t:(4-2*t)*t-1),"easeInCubic"===e&&(i=t*t*t),"easeOutCubic"===e&&(i=--t*t*t+1),"easeInOutCubic"===e&&(i=t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1),"easeInQuart"===e&&(i=t*t*t*t),"easeOutQuart"===e&&(i=1- --t*t*t*t),"easeInOutQuart"===e&&(i=t<.5?8*t*t*t*t:1-8*--t*t*t*t),"easeInQuint"===e&&(i=t*t*t*t*t),"easeOutQuint"===e&&(i=1+--t*t*t*t*t),"easeInOutQuint"===e&&(i=t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t),i||t}function requestAnimationFrame(e){var t=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame,i=!!t;if(t&&!/requestAnimationFrame\(\)\s*\{\s*\[native code\]\s*\}/i.test(t.toString())&&(i=!1),i)return function(e,i){t(e,i)};var o={},r=1,l=null,s=+new Date;return function(e){var t=r++;return o[t]=e,requestCount++,null===l&&(l=setInterval(function(){var e=+new Date,t=o;for(var i in o={},requestCount=0,t)t.hasOwnProperty(i)&&(t[i](e),s=e);e-s>2500&&(clearInterval(l),l=null)},1e3/60)),t}}var time=Date.now||function(){return+new Date},desiredFrames=60,millisecondsPerSecond=1e3,running={},counter=1,core={effect:{}},global=null;function getNumericValue(e,t){var i=void 0;return i=(i=/(-?\d+(?:\.\d+?)?)%$/.exec(e))?t*(i=i[1]-0)/100:e-0}function goScrolling(e,t,i,o,r,l){var s=e.scrollTop,n=e.scrollLeft,a=n,c=s;s+i<0&&(i=-s);var h=e.scrollHeight;s+i>h&&(i=h-s),n+t<0&&(t=-n),n+t>e.scrollWidth&&(t=e.scrollWidth-n);var u=createEasingFunction(r,easingPattern);core.effect.Animate.start(function(o){a=n+t*o,c=s+i*o,e.scrollTop=Math.floor(c),e.scrollLeft=Math.floor(a)},function(){return Math.abs(c-s)<=Math.abs(i)||Math.abs(a-n)<=Math.abs(t)},l,o,u)}global="undefined"!=typeof window?window:{},core.effect.Animate={requestAnimationFrame:requestAnimationFrame(global),stop:function(e){var t=null!=running[e];return t&&(running[e]=null),t},isRunning:function(e){return null!=running[e]},start:function(e,t,i,o,r,l){var s=time(),n=s,a=0,c=0,h=counter++;if(l||(l=document.body),h%20==0){var u={};for(var _ in running)u[_]=!0;running=u}return running[h]=!0,core.effect.Animate.requestAnimationFrame(function u(_){var d=!0!==_,p=time();if(!running[h]||t&&!t(h))return running[h]=null,void(i&&i(desiredFrames-c/((p-s)/millisecondsPerSecond),h,!1));if(d)for(var f=Math.round((p-n)/(millisecondsPerSecond/desiredFrames))-1,m=0;m1&&(a=1);var v=r?r(a):a;!1!==e(v,p,d)&&1!==a||!d?d&&(n=p,core.effect.Animate.requestAnimationFrame(u,l)):(running[h]=null,i&&i(desiredFrames-c/((p-s)/millisecondsPerSecond),h,1===a||null==o))},l),h}};var api={methods:{scrollTo:function(e){var t=e.x,i=e.y,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=void 0===t?this.vuescroll.state.internalScrollLeft||0:getNumericValue(t,this.scrollPanelElm.scrollWidth),i=void 0===i?this.vuescroll.state.internalScrollTop||0:getNumericValue(i,this.scrollPanelElm.scrollHeight),this.internalScrollTo(t,i,o,r)},scrollBy:function(e){var t=e.dx,i=void 0===t?0:t,o=e.dy,r=void 0===o?0:o,l=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=this.vuescroll.state,n=s.internalScrollLeft,a=void 0===n?0:n,c=s.internalScrollTop,h=void 0===c?0:c;i&&(a+=getNumericValue(i,this.scrollPanelElm.scrollWidth)),r&&(h+=getNumericValue(r,this.scrollPanelElm.scrollHeight)),this.internalScrollTo(a,h,l)},zoomBy:function(e,t,i,o,r){"slide"==this.mode?this.scroller.zoomBy(e,t,i,o,r):warn("zoomBy and zoomTo are only for slide mode!")},zoomTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments[2],o=arguments[3],r=arguments[4];"slide"==this.mode?this.scroller.zoomTo(e,t,i,o,r):warn("zoomBy and zoomTo are only for slide mode!")},getCurrentPage:function(){if("slide"==this.mode&&this.mergedOptions.vuescroll.paging)return this.scroller.getCurrentPage();warn("getCurrentPage and goToPage are only for slide mode and paging is enble!")},goToPage:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];"slide"==this.mode&&this.mergedOptions.vuescroll.paging?this.scroller.goToPage(e,t):warn("getCurrentPage and goToPage are only for slide mode and paging is enble!")},triggerRefreshOrLoad:function(e){if("slide"==this.mode){var t=this.mergedOptions.vuescroll.pullRefresh.enable,i=this.mergedOptions.vuescroll.pushLoad.enable;if("refresh"!=e||t)if("load"!=e||i)if("refresh"===e||"load"===e){if("start"!=this.vuescroll.state[e+"Stage"])return this.scroller.triggerRefreshOrLoad(e),!0}else warn("param must be one of load and refresh!");else warn("load must be enabled!");else warn("refresh must be enabled!")}else warn("You can only use triggerRefreshOrLoad in slide mode!")},getCurrentviewDom:function(){for(var e=this,t=("slide"==this.mode||"pure-native"==this.mode?this.scrollPanelElm:this.scrollContentElm).children,i=[],o=function(t){var i=t.getBoundingClientRect(),o=i.left,r=i.top,l=i.width,s=i.height,n=e.$el.getBoundingClientRect(),a=n.left,c=n.top,h=n.height,u=n.width;return o-a+l>0&&o-a0&&r-c1&&void 0!==arguments[1])||arguments[1],i=this.$el;if("string"==typeof e&&(e=i.querySelector(e)),isChildInParent(e,i)){var o=this.$el.getBoundingClientRect(),r=o.left,l=o.top,s=e.getBoundingClientRect(),n=r-s.left,a=l-s.top;this.scrollBy({dx:-n,dy:-a},t)}else warn("The element or selector you passed is not the element of Vuescroll, please pass the element that is in Vuescroll to scrollIntoView API. ")}}},nativeMode={methods:{updateNativeModeBarState:function(){var e=this.scrollPanelElm,t=this.$el,i="percent"==this.mergedOptions.vuescroll.sizeStrategy,o=i?t.clientWidth:extractNumberFromPx(this.vuescroll.state.width),r=i?t.clientHeight:extractNumberFromPx(this.vuescroll.state.height),l=100*r/e.scrollHeight,s=100*o/e.scrollWidth;this.bar.vBar.state.posValue=100*e.scrollTop/r,this.bar.hBar.state.posValue=100*e.scrollLeft/o,this.bar.vBar.state.size=l<100?l+"%":0,this.bar.hBar.state.size=s<100?s+"%":0}}},animatingMethod=null,noAnimatingMethod=null;function Scroller(e,t){for(var i in this.__callback=e,this.options={scrollingX:!0,scrollingY:!0,animating:!0,animationDuration:250,bouncing:!0,locking:!0,paging:!1,snapping:!1,zooming:!1,minZoom:.5,maxZoom:3,speedMultiplier:1,scrollingComplete:NOOP,animatingEasing:"easeOutCubic",noAnimatingEasing:"easeInOutCubic",penetrationDeceleration:.03,penetrationAcceleration:.08},t)this.options[i]=t[i];animatingMethod=createEasingFunction(this.options.animatingEasing,easingPattern),noAnimatingMethod=createEasingFunction(this.options.noAnimatingEasing,easingPattern)}var members={__isSingleTouch:!1,__isTracking:!1,__didDecelerationComplete:!1,__isGesturing:!1,__isDragging:!1,__isDecelerating:!1,__isAnimating:!1,__clientLeft:0,__clientTop:0,__clientWidth:0,__clientHeight:0,__contentWidth:0,__contentHeight:0,__snapWidth:100,__snapHeight:100,__refreshHeight:null,__loadHeight:null,__refreshActive:!1,__refreshActivate:null,__refreshBeforeDeactivate:null,__refreshDeactivate:null,__refreshStart:null,__loadActive:null,__loadActivate:null,__loadBeforeDeactivate:null,__loadDeactivate:null,__loadStart:null,__zoomLevel:1,__scrollLeft:0,__scrollTop:0,__maxScrollLeft:0,__maxScrollTop:0,__scheduledLeft:0,__scheduledTop:0,__scheduledZoom:0,__currentPageX:null,__currentPageY:null,__totalXPage:null,__totalYPage:null,__disable:!1,__lastTouchLeft:null,__lastTouchTop:null,__lastTouchMove:null,__positions:null,__minDecelerationScrollLeft:null,__minDecelerationScrollTop:null,__maxDecelerationScrollLeft:null,__maxDecelerationScrollTop:null,__decelerationVelocityX:null,__decelerationVelocityY:null,setDimensions:function(e,t,i,o){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:trye;e===+e&&(this.__clientWidth=e),t===+t&&(this.__clientHeight=t),i===+i&&(this.__contentWidth=i),o===+o&&(this.__contentHeight=o),this.__computeScrollMax(),this.scrollTo(this.__scrollLeft,this.__scrollTop,r)},setPosition:function(e,t){this.__clientLeft=e||0,this.__clientTop=t||0},setSnapSize:function(e,t){this.__snapWidth=e,this.__snapHeight=t},activatePullToRefresh:function(e,t){var i=t.activateCallback,o=t.deactivateCallback,r=t.startCallback,l=t.beforeDeactivateCallback;this.__refreshHeight=e,this.__refreshActivate=i,this.__refreshBeforeDeactivate=l,this.__refreshDeactivate=o,this.__refreshStart=r},activatePushToLoad:function(e,t){var i=t.activateCallback,o=t.deactivateCallback,r=t.startCallback,l=t.beforeDeactivateCallback;this.__loadHeight=e,this.__loadActivate=i,this.__loadBeforeDeactivate=l,this.__loadDeactivate=o,this.__loadStart=r},triggerRefreshOrLoad:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"refresh",t=this.__isDecelerating;t&&(core.effect.Animate.stop(t),this.__isDecelerating=!1),"refresh"==e?(this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0),this.__refreshStart&&(this.__refreshStart(),this.__refreshActive=!0)):(this.__publish(this.__scrollLeft,this.__maxScrollTop+this.__loadHeight,this.__zoomLevel,!0),this.__loadStart&&(this.__loadStart(),this.__loadActive=!0))},finishRefreshOrLoad:function(){var e=this;e.__refreshBeforeDeactivate&&e.__refreshActive?(e.__refreshActive=!1,e.__refreshBeforeDeactivate(function(){e.__refreshDeactivate&&e.__refreshDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)})):e.__refreshDeactivate&&e.__refreshActive&&(e.__refreshActive=!1,e.__refreshDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)),e.__loadBeforeDeactivate&&e.__loadActive?(e.__loadActive=!1,e.__loadBeforeDeactivate(function(){e.__loadDeactivate&&e.__loadDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)})):e.__loadDeactivate&&e.__loadActive&&(e.__loadActive=!1,e.__loadDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0))},getValues:function(){return{left:this.__scrollLeft,top:this.__scrollTop,zoom:this.__zoomLevel}},getScrollMax:function(){return{left:this.__maxScrollLeft,top:this.__maxScrollTop}},zoomTo:function(e,t,i,o,r){if(!this.options.zooming)throw new Error("Zooming is not enabled!");r&&(this.__zoomComplete=r),this.__isDecelerating&&(core.effect.Animate.stop(this.__isDecelerating),this.__isDecelerating=!1);var l=this.__zoomLevel;null==i&&(i=this.__clientWidth/2),null==o&&(o=this.__clientHeight/2),e=Math.max(Math.min(e,this.options.maxZoom),this.options.minZoom),this.__computeScrollMax(e);var s=(i+this.__scrollLeft)*e/l-i,n=(o+this.__scrollTop)*e/l-o;s>this.__maxScrollLeft?s=this.__maxScrollLeft:s<0&&(s=0),n>this.__maxScrollTop?n=this.__maxScrollTop:n<0&&(n=0),this.__publish(s,n,e,t)},zoomBy:function(e,t,i,o,r){this.zoomTo(this.__zoomLevel*e,t,i,o,r)},scrollTo:function(e,t,i,o,r){if(this.__isDecelerating&&(core.effect.Animate.stop(this.__isDecelerating),this.__isDecelerating=!1),null!=o&&o!==this.__zoomLevel){if(!this.options.zooming)throw new Error("Zooming is not enabled!");e*=o,t*=o,this.__computeScrollMax(o)}else o=this.__zoomLevel;this.options.scrollingX||r?this.options.paging?e=Math.round(e/this.__clientWidth)*this.__clientWidth:this.options.snapping&&(e=Math.round(e/this.__snapWidth)*this.__snapWidth):e=this.__scrollLeft,this.options.scrollingY||r?this.options.paging?t=Math.round(t/this.__clientHeight)*this.__clientHeight:this.options.snapping&&(t=Math.round(t/this.__snapHeight)*this.__snapHeight):t=this.__scrollTop,e=Math.max(Math.min(this.__maxScrollLeft,e),0),t=Math.max(Math.min(this.__maxScrollTop,t),0),e===this.__scrollLeft&&t===this.__scrollTop&&(i=!1),this.__isTracking||this.__publish(e,t,o,i)},scrollBy:function(e,t,i){var o=this.__isAnimating?this.__scheduledLeft:this.__scrollLeft,r=this.__isAnimating?this.__scheduledTop:this.__scrollTop;this.scrollTo(o+(e||0),r+(t||0),i)},getCurrentPage:function(){return this.__computePage(),{x:this.__currentPageX,y:this.__currentPageY}},goToPage:function(e,t){var i=e.x,o=e.y;isNaN(i)&&(i=1),isNaN(o)&&(o=1),this.scrollTo((i-1)*this.__clientWidth,(o-1)*this.__clientHeight,t)},doMouseZoom:function(e,t,i,o){var r=e>0?.97:1.03;return this.zoomTo(this.__zoomLevel*r,!1,i-this.__clientLeft,o-this.__clientTop)},doTouchStart:function(e,t){if(null==e.length)throw new Error("Invalid touch list: "+e);if(t instanceof Date&&(t=t.valueOf()),"number"!=typeof t)throw new Error("Invalid timestamp value: "+t);var i,o;this.__interruptedAnimation=!0,this.__isDecelerating&&(core.effect.Animate.stop(this.__isDecelerating),this.__isDecelerating=!1,this.__interruptedAnimation=!0),this.__isAnimating&&(core.effect.Animate.stop(this.__isAnimating),this.__isAnimating=!1,this.__interruptedAnimation=!0);var r=1===e.length;r?(i=e[0].pageX,o=e[0].pageY):(i=Math.abs(e[0].pageX+e[1].pageX)/2,o=Math.abs(e[0].pageY+e[1].pageY)/2),this.__initialTouchLeft=i,this.__initialTouchTop=o,this.__zoomLevelStart=this.__zoomLevel,this.__lastTouchLeft=i,this.__lastTouchTop=o,this.__lastTouchMove=t,this.__lastScale=1,this.__enableScrollX=!r&&this.options.scrollingX,this.__enableScrollY=!r&&this.options.scrollingY,this.__isTracking=!0,this.__didDecelerationComplete=!1,this.__isDragging=!r,this.__isSingleTouch=r,this.__positions=[]},doTouchMove:function(e,t,i){if(null==e.length)throw new Error("Invalid touch list: "+e);if(t instanceof Date&&(t=t.valueOf()),"number"!=typeof t)throw new Error("Invalid timestamp value: "+t);if(this.__isTracking){var o,r;2===e.length?(o=Math.abs(e[0].pageX+e[1].pageX)/2,r=Math.abs(e[0].pageY+e[1].pageY)/2):(o=e[0].pageX,r=e[0].pageY);var l=this.__positions;if(this.__isDragging){var s=o-this.__lastTouchLeft,n=r-this.__lastTouchTop,a=this.__scrollLeft,c=this.__scrollTop,h=this.__zoomLevel;if(null!=i&&this.options.zooming){var u=h;if(h=h/this.__lastScale*i,u!==(h=Math.max(Math.min(h,this.options.maxZoom),this.options.minZoom))){var _=o-this.__clientLeft,d=r-this.__clientTop;a=(_+a)*h/u-_,c=(d+c)*h/u-d,this.__computeScrollMax(h)}}if(this.__enableScrollX){a-=s*this.options.speedMultiplier;var p=this.__maxScrollLeft;(a>p||a<0)&&(this.options.bouncing?a+=s/2*this.options.speedMultiplier:a=a>p?p:0)}if(this.__enableScrollY){c-=n*this.options.speedMultiplier;var f=this.__maxScrollTop;(c>f||c<0)&&(this.options.bouncing?(c+=n/2*this.options.speedMultiplier,this.__enableScrollX||null==this.__refreshHeight&&null==this.__loadHeight||(!this.__refreshActive&&c<=-this.__refreshHeight?(this.__refreshActive=!0,this.__refreshActivate&&this.__refreshActivate()):this.__refreshActive&&c>-this.__refreshHeight?(this.__refreshActive=!1,this.__refreshDeactivate&&this.__refreshDeactivate()):!this.__loadActive&&c>=this.__maxScrollTop+this.__loadHeight?(this.__loadActive=!0,this.__loadActivate&&this.__loadActivate()):this.__refreshActive&&cf?f:0)}l.length>60&&l.splice(0,30),l.push(a,c,t),this.__publish(a,c,h)}else{var m=this.options.locking?3:0,v=Math.abs(o-this.__initialTouchLeft),g=Math.abs(r-this.__initialTouchTop);this.__enableScrollX=this.options.scrollingX&&v>=m,this.__enableScrollY=this.options.scrollingY&&g>=m,l.push(this.__scrollLeft,this.__scrollTop,t),this.__isDragging=(this.__enableScrollX||this.__enableScrollY)&&(v>=5||g>=5),this.__isDragging&&(this.__interruptedAnimation=!1)}this.__lastTouchLeft=o,this.__lastTouchTop=r,this.__lastTouchMove=t,this.__lastScale=i}},doTouchEnd:function(e){if(e instanceof Date&&(e=e.valueOf()),"number"!=typeof e)throw new Error("Invalid timestamp value: "+e);if(this.__isTracking){if(this.__isTracking=!1,this.__isDragging)if(this.__isDragging=!1,this.__isSingleTouch&&this.options.animating&&e-this.__lastTouchMove<=100){for(var t=this.__positions,i=t.length-1,o=i,r=i;r>0&&t[r]>this.__lastTouchMove-100;r-=3)o=r;if(o!==i){var l=t[i]-t[o],s=this.__scrollLeft-t[o-2],n=this.__scrollTop-t[o-1];this.__decelerationVelocityX=s/l*(1e3/60),this.__decelerationVelocityY=n/l*(1e3/60);var a=this.options.paging||this.options.snapping?4:1;Math.abs(this.__decelerationVelocityX)>a||Math.abs(this.__decelerationVelocityY)>a?this.__refreshActive||this.__loadActive||this.__startDeceleration(e):this.__scrollComplete()}else this.__scrollComplete()}else e-this.__lastTouchMove>100&&this.__scrollComplete();this.__isDecelerating||(this.__refreshActive&&this.__refreshStart?(this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0),this.__refreshStart&&this.__refreshStart()):this.__loadActive&&this.__loadStart?(this.__publish(this.__scrollLeft,this.__maxScrollTop+this.__loadHeight,this.__zoomLevel,!0),this.__loadStart&&this.__loadStart()):((this.__interruptedAnimation||this.__isDragging)&&this.__scrollComplete(),this.scrollTo(this.__scrollLeft,this.__scrollTop,!0,this.__zoomLevel),this.__refreshActive?(this.__refreshActive=!1,this.__refreshDeactivate&&this.__refreshDeactivate()):this.__loadActive&&(this.__loadActive=!1,this.__loadDeactivate&&this.__loadDeactivate()))),this.__positions.length=0}},onScroll:NOOP,stop:function(){this.__disable=!0},start:function(){self.__disable=!0},__publish:function(e,t,i,o){var r=this;if(!r.__disable){isNaN(e)&&(e=this.__scrollLeft),isNaN(t)&&(t=this.__scrollTop);var l=r.__isAnimating;if(l&&(core.effect.Animate.stop(l),r.__isAnimating=!1),o&&r.options.animating){r.__scheduledLeft=e,r.__scheduledTop=t,r.__scheduledZoom=i;var s=r.__scrollLeft,n=r.__scrollTop,a=r.__zoomLevel,c=e-s,h=t-n,u=i-a;r.__isAnimating=core.effect.Animate.start(function(e,t,i){i&&(r.__scrollLeft=s+c*e,r.__scrollTop=n+h*e,r.__zoomLevel=a+u*e,r.__callback&&(r.__callback(r.__scrollLeft,r.__scrollTop,r.__zoomLevel),r.onScroll()))},function(e){return r.__isAnimating===e},function(e,t,i){t===r.__isAnimating&&(r.__isAnimating=!1),(r.__didDecelerationComplete||i)&&r.__scrollComplete(),r.options.zooming&&(r.__computeScrollMax(),r.__zoomComplete&&(r.__zoomComplete(),r.__zoomComplete=null))},r.options.animationDuration,l?animatingMethod:noAnimatingMethod)}else r.__scheduledLeft=r.__scrollLeft=e,r.__scheduledTop=r.__scrollTop=t,r.__scheduledZoom=r.__zoomLevel=i,r.__callback&&(r.__callback(e,t,i),r.onScroll()),r.options.zooming&&(r.__computeScrollMax(),r.__zoomComplete&&(r.__zoomComplete(),r.__zoomComplete=null))}},__computeScrollMax:function(e){null==e&&(e=this.__zoomLevel),this.__maxScrollLeft=Math.max(this.__contentWidth*e-this.__clientWidth,0),this.__maxScrollTop=Math.max(this.__contentHeight*e-this.__clientHeight,0)},__computePage:function(){var e=this.__clientWidth,t=this.__clientHeight,i=this.__scrollLeft,o=this.__scrollTop;this.__totalXPage=Math.ceil(this.__contentWidth/e),this.__currentPageX=Math.ceil(i/e+1),this.__totalYPage=Math.ceil(this.__contentHeight/t),this.__currentPageY=Math.ceil(o/t+1)},__scrollComplete:function(){this.options.scrollingComplete()},__startDeceleration:function(){var e=this;if(e.options.paging){var t=Math.max(Math.min(e.__scrollLeft,e.__maxScrollLeft),0),i=Math.max(Math.min(e.__scrollTop,e.__maxScrollTop),0),o=e.__clientWidth,r=e.__clientHeight;e.__minDecelerationScrollLeft=Math.floor(t/o)*o,e.__minDecelerationScrollTop=Math.floor(i/r)*r,e.__maxDecelerationScrollLeft=Math.ceil(t/o)*o,e.__maxDecelerationScrollTop=Math.ceil(i/r)*r}else e.__minDecelerationScrollLeft=0,e.__minDecelerationScrollTop=0,e.__maxDecelerationScrollLeft=e.__maxScrollLeft,e.__maxDecelerationScrollTop=e.__maxScrollTop;var l=e.options.snapping?4:.001;e.__isDecelerating=core.effect.Animate.start(function(t,i,o){e.__stepThroughDeceleration(o)},function(){var t=Math.abs(e.__decelerationVelocityX)>=l||Math.abs(e.__decelerationVelocityY)>=l;return t||(e.__didDecelerationComplete=!0),t},function(){e.__isDecelerating&&(e.__isDecelerating=!1,e.__didDecelerationComplete&&e.__scrollComplete(),e.scrollTo(e.__scrollLeft,e.__scrollTop,e.options.snapping))})},__stepThroughDeceleration:function(e){var t=this.__scrollLeft+this.__decelerationVelocityX,i=this.__scrollTop+this.__decelerationVelocityY;if(!this.options.bouncing){var o=Math.max(Math.min(this.__maxDecelerationScrollLeft,t),this.__minDecelerationScrollLeft);o!==t&&(t=o,this.__decelerationVelocityX=0);var r=Math.max(Math.min(this.__maxDecelerationScrollTop,i),this.__minDecelerationScrollTop);r!==i&&(i=r,this.__decelerationVelocityY=0)}if(e?this.__publish(t,i,this.__zoomLevel):(this.__scrollLeft=t,this.__scrollTop=i),!this.options.paging){this.__decelerationVelocityX*=.95,this.__decelerationVelocityY*=.95}if(this.options.bouncing){var l=0,s=0,n=this.options.penetrationDeceleration,a=this.options.penetrationAcceleration;tthis.__maxDecelerationScrollLeft&&(l=this.__maxDecelerationScrollLeft-t),ithis.__maxDecelerationScrollTop&&(s=this.__maxDecelerationScrollTop-i),0!==l&&(l*this.__decelerationVelocityX<=0?this.__decelerationVelocityX+=l*n:this.__decelerationVelocityX=l*a),0!==s&&(s*this.__decelerationVelocityY<=0?this.__decelerationVelocityY+=s*n:this.__decelerationVelocityY=s*a)}}};for(var key in members)Scroller.prototype[key]=members[key];function _defineProperty(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function render(e,t,i,o){var r=null,l=null;"string"==typeof e&&(l="vertical"==e?(r=0)||o:(r=o)&&0);var s=getPrefix(t),n=document.createElement("div"),a=s+"Perspective";return void 0!==n.style[a]?"string"==typeof e?_defineProperty({},"transform","translate3d("+r+i+","+l+i+",0)"):function(t,o,r){e.style.transform="translate3d("+-t+i+","+-o+i+",0) scale("+r+")"}:void 0!==n.style.transform?"string"==typeof e?_defineProperty({},"transform","translate("+r+i+","+l+i+")"):function(t,o,r){e.style.transform="translate("+-t+i+","+-o+i+") scale("+r+")"}:void 0}function listenContainer(e,t,i,o,r){var l=null;function s(e){e.touches[0]&&e.touches[0].target&&e.touches[0].target.tagName.match(/input|textarea|select/i)||(i("mousedown"),t.doTouchStart(e.touches,e.timeStamp),r&&e.preventDefault(),document.addEventListener("touchmove",n,{passive:!1}))}function n(e){i("mousemove"),t.doTouchMove(e.touches,e.timeStamp,e.scale),e.preventDefault()}function a(e){i("mouseup"),t.doTouchEnd(e.timeStamp),document.removeEventListener("touchmove",n)}function c(e){t.doTouchEnd(e.timeStamp)}function h(e){e.target.tagName.match(/input|textarea|select/i)||(i("mousedown"),t.doTouchStart([{pageX:e.pageX,pageY:e.pageY}],e.timeStamp),r&&e.preventDefault(),p=!0)}function u(e){p&&(i("mousemove"),t.doTouchMove([{pageX:e.pageX,pageY:e.pageY}],e.timeStamp),p=!0)}function _(e){p&&(i("mouseup"),t.doTouchEnd(e.timeStamp),p=!1)}function d(e){t.doMouseZoom(e.detail?-120*e.detail:e.wheelDelta,e.timeStamp,e.pageX,e.pageY)}if("ontouchstart"in window)e.addEventListener("touchstart",s,!1),document.addEventListener("touchend",a,!1),document.addEventListener("touchcancel",c,!1),l=function(){e.removeEventListener("touchstart",s,!1),document.removeEventListener("touchend",a,!1),document.removeEventListener("touchcancel",c,!1)};else{var p=!1;e.addEventListener("mousedown",h,!1),document.addEventListener("mousemove",u,!1),document.addEventListener("mouseup",_,!1),o&&e.addEventListener(navigator.userAgent.indexOf("Firefox")>-1?"DOMMouseScroll":"mousewheel",d,!1),l=function(){e.removeEventListener("mousedown",h,!1),document.removeEventListener("mousemove",u,!1),document.removeEventListener("mouseup",_,!1),e.removeEventListener(navigator.userAgent.indexOf("Firefox")>-1?"DOMMouseScroll":"mousewheel",d,!1)}}return t.onScroll=function(){i("onscroll")},l}var _extends=Object.assign||function(e){for(var t=1;to.__maxScrollLeft&&(r=o.__scrollLeft-o.__maxScrollLeft)),u&&(o.__scrollTop<0?l=-o.__scrollTop:o.__scrollTop>o.__maxScrollTop&&(l=o.__scrollTop-o.__maxScrollTop)),e=100*n/(c+l),t=100*s/(a+r);var _=Math.min(Math.max(0,o.__scrollTop),o.__maxScrollTop),d=Math.min(Math.max(0,o.__scrollLeft),o.__maxScrollLeft);this.bar.vBar.state.posValue=100*(_+l)/i.clientHeight,this.bar.hBar.state.posValue=100*(d+r)/i.clientWidth,o.__scrollLeft<0&&(this.bar.hBar.state.posValue=0),o.__scrollTop<0&&(this.bar.vBar.state.posValue=0),this.bar.vBar.state.size=e<100?e+"%":0,this.bar.hBar.state.size=t<100?t+"%":0},registryEvent:function(e){var t="refresh"==e?"refreshDom":"loadDom",i="refresh"==e?this.scroller.activatePullToRefresh:this.scroller.activatePushToLoad,o="refresh"==e?"refreshStage":"loadStage",r=this.$refs[t].elm||this.$refs[t],l=createStateCallbacks(e,o,this,r),s=r.offsetHeight;i.bind(this.scroller)(s,l)}}},scrollMap={vertical:{bar:{size:"height",opsSize:"width",posName:"top",opposName:"bottom",page:"pageY",scroll:"scrollTop",scrollSize:"scrollHeight",offset:"offsetHeight",client:"clientY"},axis:"Y"},horizontal:{bar:{size:"width",opsSize:"height",posName:"left",opposName:"right",page:"pageX",scroll:"scrollLeft",scrollSize:"scrollWidth",offset:"offsetWidth",client:"clientX"},axis:"X"}};function _defineProperty$1(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var colorCache={},rgbReg=/rgb\(/,extractRgbColor=/rgb\((.*)\)/;function createMouseEvent(e){function t(t){if(e.axisStartPos){var i=(t[e.bar.client]-e.$el.getBoundingClientRect()[e.bar.posName]-e.axisStartPos)/e.$el[e.bar.offset];e.$parent.scrollTo(_defineProperty$1({},e.axis.toLowerCase(),e.parent.scrollPanel.$el[e.bar.scrollSize]*i),!1)}}function i(){e.$emit("setBarClick",!1),document.onselectstart=null,e.$parent.hideBar(),e.axisStartPos=0,eventCenter(document,"mousemove",t,"off"),eventCenter(document,"mouseup",i,"off")}return function(o){o.stopImmediatePropagation(),document.onselectstart=function(){return!1},e.axisStartPos=o[e.bar.client]-e.$refs.inner.getBoundingClientRect()[e.bar.posName],e.$emit("setBarClick",!0),eventCenter(document,"mousemove",t),eventCenter(document,"mouseup",i)}}function createTouchEvent(e){function t(t){if(e.axisStartPos){var i=(t.touches[0][e.bar.client]-e.$el.getBoundingClientRect()[e.bar.posName]-e.axisStartPos)/e.$el[e.bar.offset];e.$parent.scrollTo(_defineProperty$1({},e.axis.toLowerCase(),e.parent.scrollPanel.$el[e.bar.scrollSize]*i),!1)}}function i(){e.$emit("setBarClick",!1),document.onselectstart=null,e.$parent.hideBar(),e.axisStartPos=0,eventCenter(document,"touchmove",t,"off"),eventCenter(document,"touchend",i,"off")}return function(o){o.stopImmediatePropagation(),o.preventDefault(),document.onselectstart=function(){return!1},e.axisStartPos=o.touches[0][e.bar.client]-e.$refs.inner.getBoundingClientRect()[e.bar.posName],e.$emit("setBarClick",!0),eventCenter(document,"touchmove",t),eventCenter(document,"touchend",i)}}function getRgbAColor(e,t){var i=e+"&"+t;if(colorCache[i])return colorCache[i];var o=document.createElement("div");o.style.background=e,document.body.appendChild(o);var r=window.getComputedStyle(o).backgroundColor;return document.body.removeChild(o),rgbReg.test(r)?colorCache[i]="rgba("+extractRgbColor.exec(r)[1]+", "+t+")":e}function handleClickTrack(e,t,i,o,r){var l=t.client,s=t.offset,n=t.posName,a=t.scrollSize,c=i[o+"Bar"].$refs.inner[s],h=(e[l]-e.target.getBoundingClientRect()[n]-c/2)/e.target[s],u=i.scrollPanel.$el[a]*h;r.scrollTo(_defineProperty$1({},scrollMap[o].axis.toLowerCase(),u))}var bar={name:"bar",props:{ops:{type:Object,required:!0},state:{type:Object,required:!0},type:{type:String,required:!0}},computed:{bar:function(){return scrollMap[this.type].bar},axis:function(){return scrollMap[this.type].axis},parent:function(){return this.$parent.$refs}},render:function(e){var t,i,o=this,r=o.$parent.$refs,l=getRgbAColor(o.ops.rail.background,o.ops.rail.opacity),s={style:(_defineProperty$1(t={},o.bar.posName,0),_defineProperty$1(t,o.bar.opsSize,"100%"),_defineProperty$1(t,o.bar.size,o.state.size),_defineProperty$1(t,"borderRadius",o.ops.rail[o.bar.opsSize]),_defineProperty$1(t,"background",o.ops.bar.background),_defineProperty$1(t,"opacity",o.state.opacity),_defineProperty$1(t,"transform","translate"+scrollMap[o.type].axis+"("+o.state.posValue+"%)"),_defineProperty$1(t,"cursor","pointer"),_defineProperty$1(t,"position","relative"),_defineProperty$1(t,"transition","opacity .5s"),_defineProperty$1(t,"userSelect","none"),t),class:"vuescroll-"+o.type+"-bar",ref:"inner",on:{}};return o.ops.bar.hover&&(s.on.mouseenter=function(){o.$el.style.background=o.ops.hover},s.on.mouseleave=function(){o.$el.style.background=o.ops.background}),isSupportTouch()?s.on.touchstart=createTouchEvent(this):s.on.mousedown=createMouseEvent(this),e("div",{class:"vuescroll-"+o.type+"-rail",style:(i={position:"absolute",borderRadius:o.ops.rail[o.bar.opsSize],background:l},_defineProperty$1(i,o.bar.opsSize,o.ops.rail[o.bar.opsSize]),_defineProperty$1(i,o.bar.posName,"2px"),_defineProperty$1(i,o.bar.opposName,"2px"),_defineProperty$1(i,o.ops.rail.pos,0),i),on:{click:function(e){handleClickTrack(e,o.bar,r,o.type,o.$parent)}}},[e("div",s)])}};function createBar(e,t,i){var o="vertical"===i?"Y":"X",r=i.charAt(0)+"Bar",l=i.charAt(0)+"Rail";return!t.bar[r].state.size||!t.mergedOptions.scrollPanel["scrolling"+o]||"pure-native"==t.mode||t.refreshLoad&&"vertical"!==i&&"slide"===t.mode?null:e("bar",{props:{type:i,ops:{bar:t.mergedOptions.bar[r],rail:t.mergedOptions.rail[l]},state:t.bar[r].state},on:{setBarClick:t.setBarClick},ref:i+"Bar"})}var scrollContent={name:"scrollContent",functional:!0,props:{ops:{type:Object},state:{type:Object,default:function(){return{}}}},render:function(e,t){var i=t.props,o=t.slots,r=deepMerge(i.state.style,{});r.position="relative",r["min-width"]="100%",r["min-height"]="100%";var l=isSupportGivenStyle("width","fit-content");return l?r.width=l:r.display="inline-block",r.boxSizing="border-box",i.ops.padding&&(r[i.ops.paddPos]=i.ops.paddValue),e(i.ops.tag,{style:r,ref:"scrollContent",class:"vuescroll-content",props:i.ops.props,attrs:i.ops.attrs},o().default)}};function createContent(e,t){return e("scrollContent",{props:{ops:t.mergedOptions.scrollContent}},[[t.$slots.default]])}var scrollPanel={name:"scrollPanel",props:{ops:{type:Object,required:!0}},methods:{updateInitialScroll:function(){var e=0,t=0;this.ops.initialScrollX&&(e=this.ops.initialScrollX),this.ops.initialScrollY&&(t=this.ops.initialScrollY),(e||t)&&this.$parent.scrollTo({x:e,y:t})}},mounted:function(){var e=this;setTimeout(function(){e._isDestroyed||e.updateInitialScroll()},0)},render:function(e){return e("div",{class:["vuescroll-panel"]},[[this.$slots.default]])}};function createPanel(e,t){var i={ref:"scrollPanel",style:{position:"relative",height:"100%"},nativeOn:{scroll:t.handleScroll},props:{ops:t.mergedOptions.scrollPanel,state:t.scrollPanel.state}};if("native"==t.mode){t.mergedOptions.scrollPanel.scrollingY?i.style.overflowY=t.bar.vBar.state.size?"scroll":"":i.style.overflowY="hidden",t.mergedOptions.scrollPanel.scrollingX?i.style.overflowX=t.bar.hBar.state.size?"scroll":"":i.style.overflowX="hidden";var o=getGutter();o?(t.bar.vBar.state.size&&t.mergedOptions.scrollPanel.scrollingY&&(i.style.marginRight="-"+o+"px"),t.bar.hBar.state.size&&t.mergedOptions.scrollPanel.scrollingX&&(i.style.height="calc(100% + "+o+"px)")):(hideSystemBar(),i.style.height="100%"),i.style.transformOrigin="",i.style.transform=""}else if("slide"==t.mode){i.style.transformOrigin="left top 0px",i.style.userSelect="none",i.style.height="",i.style["box-sizing"]="border-box",i.style["min-width"]="100%",i.style["min-height"]="100%";var r=isSupportGivenStyle("width","fit-content");r?i.style.width=r:i.display="inline-block"}else"pure-native"==t.mode&&(i.style.width="100%",t.mergedOptions.scrollPanel.scrollingY?i.style.overflowY="auto":i.style.overflowY="hidden",t.mergedOptions.scrollPanel.scrollingX?i.style.overflowX="auto":i.style.overflowX="hidden");return e("scrollPanel",i,[createPanelChildren(t,e)])}function createPanelChildren(e,t){if("native"==e.mode)return[createContent(t,e)];if("slide"==e.mode){var i=[e.$slots.default];if(e.mergedOptions.vuescroll.pullRefresh.enable){createDomStyle("refreshDomStyle");var o;o=createTipDom(t,e,"refresh"),i.unshift(t("div",{class:"vuescroll-refresh",ref:"refreshDom",key:"refshDom"},[[o,e.pullRefreshTip]]))}if(e.mergedOptions.vuescroll.pushLoad.enable){createDomStyle("loadDomStyle");var r;r=createTipDom(t,e,"load"),i.push(t("div",{class:"vuescroll-load",ref:"loadDom",key:"loadDom"},[[r,e.pushLoadTip]]))}return i}return"pure-native"==e.mode?[e.$slots.default]:void 0}function createTipDom(e,t,i){var o=t.vuescroll.state[i+"Stage"],r=null;if(r=t.$slots[i+"-"+o])return r[0];switch(o){case"deactive":r=e("svg",{attrs:{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 1000 1000","enable-background":"new 0 0 1000 1000",xmlSpace:"preserve"}},[e("metadata",[" Svg Vector Icons : http://www.sfont.cn "]),e("g",[e("g",{attrs:{transform:"matrix(1 0 0 -1 0 1008)"}},[e("path",{attrs:{d:"M10,543l490,455l490-455L885,438L570,735.5V18H430v717.5L115,438L10,543z"}})])])]);break;case"start":r=e("svg",{attrs:{version:"1.1",id:"loader-1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 50 50",xmlSpace:"preserve"},style:"enable-background:new 0 0 50 50;"},[e("path",{attrs:{fill:"#000",d:"M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"}},[e("animateTransform",{attrs:{attributeType:"xml",attributeName:"transform",type:"rotate",from:"0 25 25",to:"360 25 25",dur:"0.6s",repeatCount:"indefinite"}})])]);break;case"active":r=e("svg",{attrs:{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 1000 1000","enable-background":"new 0 0 1000 1000",xmlSpace:"preserve"}},[e("metadata",[" Svg Vector Icons : http://www.sfont.cn "]),e("g",[e("g",{attrs:{transform:"matrix(1 0 0 -1 0 1008)"}},[e("path",{attrs:{d:"M500,18L10,473l105,105l315-297.5V998h140V280.5L885,578l105-105L500,18z"}})])])])}return r}function findValuesByMode(e,t){var i={};switch(e){case"native":case"pure-native":i={x:t.scrollPanelElm.scrollLeft,y:t.scrollPanelElm.scrollTop};break;case"slide":i={x:t.scroller.__scrollLeft,y:t.scroller.__scrollTop}}return i}function getClientSizeByType(e){var t=this.$el;return("percent"==this.mergedOptions.vuescroll.sizeStrategy?t["client"+(e.charAt(0).toUpperCase()+e.slice(1))]:extractNumberFromPx(this.vuescroll.state[e]))-0}var vueScrollCore={name:"vueScroll",components:{bar:bar,scrollContent:scrollContent,scrollPanel:scrollPanel},props:{ops:{type:Object}},mixins:[hackLifecycle,api,nativeMode,slideMode],mounted:function(){var e=this;this.renderError||(this.initVariables(),this.initVuescrollSizeType(),this.initScroller(),this.initResizeDetection(),this.initWatchOpsChange(),this.updateBarStateAndEmitEvent(),this.$nextTick(function(){e._isDestroyed||(e.updateBarStateAndEmitEvent(),e.initVuescrollPosition())},0))},beforeDestroy:function(){this.destroyParentDomResize&&(this.destroyParentDomResize(),this.destroyParentDomResize=null),this.destroyResize&&(this.destroyResize(),this.destroyResize=null)},data:function(){return{vuescroll:{state:{isDragging:!1,isClickingBar:!1,pointerLeave:!0,internalScrollTop:0,internalScrollLeft:0,posX:null,posY:null,refreshStage:"deactive",loadStage:"deactive",height:"100%",width:"100%"}},scrollPanel:{},scrollContent:{},rail:{vRail:{state:{}},hRail:{state:{}}},bar:{vBar:{state:{posValue:0,size:0,opacity:0}},hBar:{state:{posValue:0,size:0,opacity:0}},renderError:!1}}},render:function(e){var t=this;if(t.renderError)return e("div",[[t.$slots.default]]);var i={style:{position:"relative",height:t.vuescroll.state.height,width:t.vuescroll.state.width,padding:0,overflow:"hidden"},class:"vue-scroll"};return isSupportTouch()?i.on={touchstart:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()},touchend:function(){t.vuescroll.state.pointerLeave=!0,t.hideBar()},touchmove:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()}}:i.on={mouseenter:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()},mouseleave:function(){t.vuescroll.state.pointerLeave=!0,t.hideBar()},mousemove:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()}},e("div",i,[createPanel(e,t),createBar(e,t,"vertical"),createBar(e,t,"horizontal")])},computed:{scrollPanelElm:function(){return this.$refs.scrollPanel.$el},scrollContentElm:function(){return this.$refs.scrollContent._isVue?this.$refs.scrollContent.$el:this.$refs.scrollContent},mode:function(){return this.mergedOptions.vuescroll.mode},pullRefreshTip:function(){return this.mergedOptions.vuescroll.pullRefresh.tips[this.vuescroll.state.refreshStage]},pushLoadTip:function(){return this.mergedOptions.vuescroll.pushLoad.tips[this.vuescroll.state.loadStage]},refreshLoad:function(){return this.mergedOptions.vuescroll.pullRefresh.enable||this.mergedOptions.vuescroll.pushLoad.enable},clientWidth:function(){return getClientSizeByType.call(this,"width")},clientHeight:function(){return getClientSizeByType.call(this,"height")}},methods:{updateBarStateAndEmitEvent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("native"==this.mode||"pure-native"==this.mode)this.updateNativeModeBarState();else if("slide"==this.mode){if(!this.scroller)return;this.updateSlideModeBarState()}e&&this.emitEvent(e,t),this.showAndDefferedHideBar()},updateMode:function(){var e=this.vuescroll.state.internalScrollLeft,t=this.vuescroll.state.internalScrollTop;this.destroyScroller&&(this.scroller.stop(),this.destroyScroller(),this.destroyScroller=null),"slide"==this.mode?this.destroyScroller=this.registryScroller():"native"!=this.mode&&"pure-native"!=this.mode||(this.scrollPanelElm.style.transform="",this.scrollPanelElm.style.transformOrigin=""),this.scrollTo({x:e,y:t},!1,!0)},handleScroll:function(e){this.recordCurrentPos(),this.updateBarStateAndEmitEvent("handle-scroll",e)},setBarClick:function(e){this.vuescroll.state.isClickingBar=e},showAndDefferedHideBar:function(){var e=this;this.showBar(),this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0),this.timeoutId=setTimeout(function(){e.timeoutId=0,e.hideBar()},this.mergedOptions.bar.showDelay)},emitEvent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.scrollPanelElm,o=i.scrollHeight,r=i.scrollWidth,l=i.clientHeight,s=i.clientWidth,n=i.scrollTop,a=i.scrollLeft,c={type:"vertical"},h={type:"horizontal"};"slide"==this.mode&&(o=this.scroller.__contentHeight,r=this.scroller.__contentWidth,n=this.scroller.__scrollTop,a=this.scroller.__scrollLeft,l=this.$el.clientHeight,s=this.$el.clientWidth),c.process=Math.min(n/(o-l),1),h.process=Math.min(a/(r-s),1),c.barSize=this.bar.vBar.state.size,h.barSize=this.bar.hBar.state.size,c.scrollTop=n,h.scrollLeft=a,c.directionY=this.vuescroll.state.posY,h.directionX=this.vuescroll.state.posX,this.$emit(e,c,h,t)},showBar:function(){this.bar.vBar.state.opacity=this.mergedOptions.bar.vBar.opacity,this.bar.hBar.state.opacity=this.mergedOptions.bar.hBar.opacity},hideBar:function(){this.vuescroll.state.isDragging||(this.mergedOptions.bar.vBar.keepShow||this.vuescroll.state.isClickingBar||!this.vuescroll.state.pointerLeave||(this.bar.vBar.state.opacity=0),this.mergedOptions.bar.hBar.keepShow||this.vuescroll.state.isClickingBar||!this.vuescroll.state.pointerLeave||(this.bar.hBar.state.opacity=0))},registryResize:function(){var e=this;this.destroyResize&&this.destroyResize();var t=null;"slide"==this.mode||"pure-native"==this.mode?t=this.scrollPanelElm:"native"==this.mode&&(t=this.scrollContentElm);var i=function(){e.updateBarStateAndEmitEvent(),"slide"==e.mode&&e.updateScroller()};window.addEventListener("resize",i,!1);var o=listenResize(t,function(){var t={};"slide"==e.mode?(e.updateScroller(),t.width=e.scroller.__contentWidth,t.height=e.scroller.__contentHeight):"native"!=e.mode&&"pure-native"!=e.mode||(t.width=e.scrollPanelElm.scrollWidth,t.height=e.scrollPanelElm.scrollHeight),e.updateBarStateAndEmitEvent("handle-resize",t)});this.destroyResize=function(){window.removeEventListener("resize",i,!1),o()}},registryParentResize:function(){this.destroyParentDomResize=listenResize(this.$el.parentNode,this.useNumbericSize)},useNumbericSize:function(){var e=this.$el.parentNode,t=e.style.position;t&&"static"!=t||(this.$el.parentNode.style.position="relative"),this.vuescroll.state.height=e.offsetHeight+"px",this.vuescroll.state.width=e.offsetWidth+"px"},usePercentSize:function(){this.vuescroll.state.height="100%",this.vuescroll.state.width="100%"},setVsSize:function(){"number"==this.mergedOptions.vuescroll.sizeStrategy?(this.useNumbericSize(),this.registryParentResize()):"percent"==this.mergedOptions.vuescroll.sizeStrategy&&(this.destroyParentDomResize&&(this.destroyParentDomResize(),this.destroyParentDomResize=null),this.usePercentSize())},recordCurrentPos:function(){var e=this.mode;this.mode!==this.lastMode&&(e=this.lastMode,this.lastMode=this.mode);var t=this.vuescroll.state,i=findValuesByMode(e,this),o=t.internalScrollLeft,r=t.internalScrollTop;t.posX=o-i.x>0?"right":o-i.x<0?"left":null,t.posY=r-i.y>0?"up":r-i.y<0?"down":null,t.internalScrollLeft=i.x,t.internalScrollTop=i.y},initWatchOpsChange:function(){var e=this,t={deep:!0,sync:!0};this.$watch("mergedOptions",function(){e.recordCurrentPos(),setTimeout(function(){if(1==e.isSmallChangeThisTick)return e.isSmallChangeThisTick=!1,void e.updateBarStateAndEmitEvent();e.setVsSize(),e.registryResize(),e.updateMode(),e.updateBarStateAndEmitEvent()},0)},t),smallChangeArray.forEach(function(i){e.$watch(i,function(){e.isSmallChangeThisTick=!0},t)})},scrollToHash:function(){var e=window.location.hash;if(e&&(!(e=e.slice(e.lastIndexOf("#")))||function(e){return/^#[a-zA-Z_]\d*$/.test(e)}(e))){var t=document.querySelector(e);!isChildInParent(t,this.$el)||this.mergedOptions.scrollPanel.initialScrollY||this.mergedOptions.scrollPanel.initialScrollX||this.scrollIntoView(t)}},initVariables:function(){this.lastMode=this.mode,this.$el._isVuescroll=!0},initScroller:function(){"slide"==this.mode&&(this.destroyScroller=this.registryScroller())},initVuescrollSizeType:function(){this.setVsSize()},initResizeDetection:function(){this.registryResize()},initVuescrollPosition:function(){this.scrollToHash()}}},Vuescroll={install:function(e){e.component(vueScrollCore.name,vueScrollCore),e.prototype.$vuescrollConfig=deepMerge(GCF,{})},version:"4.5.33"};"undefined"!=typeof window&&window.Vue&&Vue.use(Vuescroll),module.exports=Vuescroll; \ No newline at end of file +"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var Vue=_interopDefault(require("vue")),_typeof="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};function deepCopy(e,t){for(var i in t="object"===(void 0===t?"undefined":_typeof(t))&&t||{},e)t[i]="object"===_typeof(e[i])?deepCopy(e[i],t[i]={}):e[i];return t}function deepMerge(e,t){for(var i in t=t||{},e)"object"===_typeof(e[i])?void 0===t[i]?(t[i]={},deepCopy(e[i],t[i])):deepMerge(e[i],t[i]):void 0===t[i]&&(t[i]=e[i]);return t}function defineReactive(e,t,i,o){var r=null;(i[t]||"function"==typeof i)&&(o=o||t,"function"==typeof i&&(r=i),Object.defineProperty(e,t,{get:r||function(){return i[o]},configurable:!0}))}var scrollBarWidth=void 0;function getGutter(){if(Vue.prototype.$isServer)return 0;if(void 0!==scrollBarWidth)return scrollBarWidth;var e=document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var i=document.createElement("div");i.style.width="100%",e.appendChild(i);var o=i.offsetWidth;return e.parentNode.removeChild(e),scrollBarWidth=t-o}var doneUtil={refreshDomStyle:!1,loadDomStyle:!1,hide:!1};function hideSystemBar(){if(!doneUtil.hide){doneUtil.hide=!0;var e=document.createElement("style");e.type="text/css",e.innerHTML=".vuescroll-panel::-webkit-scrollbar{width:0;height:0}",document.getElementsByTagName("HEAD").item(0).appendChild(e)}}var styleMap={};function createDomStyle(e){if(!doneUtil[e]){doneUtil[e]=!0;var t=document.createElement("style");t.type="text/css",t.innerHTML=styleMap[e],document.getElementsByTagName("HEAD").item(0).appendChild(t)}}function eventCenter(e,t,i){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];"on"==(arguments.length>4&&void 0!==arguments[4]?arguments[4]:"on")?e.addEventListener(t,i,o):e.removeEventListener(t,i,o)}styleMap.refreshDomStyle="\n.vuescroll-refresh {\n position:absolute;\n width: 100%;\n color: black;\n height: 50px;\n text-align: center;\n font-size: 16px;\n line-height: 50px;\n}\n.vuescroll-refresh svg {\n margin-right: 10px;\n width: 25px;\n height: 25px;\n vertical-align: sub;\n}\n.vuescroll-refresh svg path,\n.vuescroll-refresh svg rect{\nfill: #FF6700;\n}\n",styleMap.loadDomStyle="\n.vuescroll-load {\n position:absolute;\n width: 100%;\n color: black;\n height: 50px;\n text-align: center;\n font-size: 16px;\n line-height: 50px;\n}\n.vuescroll-load svg {\n margin-right: 10px;\n width: 25px;\n height: 25px;\n vertical-align: sub;\n}\n.vuescroll-load svg path,\n.vuescroll-load svg rect{\nfill: #FF6700;\n}\n";var error=function(e){console.error("[vuescroll] "+e)},warn=function(e){console.warn("[vuescroll] "+e)};function isChildInParent(e,t){var i=!1;if(!e||!t)return i;for(;e.parentNode!==t&&9!==e.parentNode.nodeType&&!e.parentNode._isVuescroll;)e=e.parentNode;return e.parentNode==t&&(i=!0),i}var pxValueReg=/(.*?)px/;function extractNumberFromPx(e){var t=pxValueReg.exec(e);return t&&t[1]}function isSupportTouch(){return"ontouchstart"in window}function getPrefix(e){var t,i=document.documentElement.style;return e.opera&&"[object Opera]"===Object.prototype.toString.call(opera)?t="presto":"MozAppearance"in i?t="gecko":"WebkitAppearance"in i?t="webkit":"string"==typeof navigator.cpuClass&&(t="trident"),{trident:"ms",gecko:"moz",webkit:"webkit",presto:"O"}[t]}function isSupportGivenStyle(e,t){var i="-"+getPrefix(window)+"-"+t,o=document.createElement("div");return o.style[e]=i,o.style[e]==i&&i}function listenResize(e,t){return injectObject(e,t)}function injectObject(e,t){if(!e.hasResized){var i=document.createElement("object");return e.hasResized=!0,i.style.cssText="display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; padding: 0; margin: 0; opacity: 0; z-index: -1000; pointer-events: none;",i.tabIndex=-1,i.type="text/html",i.data="about:blank",i.isResizeElm=!0,i.onload=function(){eventCenter(i.contentDocument.defaultView,"resize",t)},e.appendChild(i),function(){i.contentDocument&&eventCenter(i.contentDocument.defaultView,"resize",t,"off"),e.removeChild(i),e.hasResized=!1}}}var modes=["slide","native","pure-native"],NOOP=function(){},smallChangeArray=["mergedOptions.vuescroll.pullRefresh.tips","mergedOptions.vuescroll.pushLoad.tips","mergedOptions.rail","mergedOptions.bar"],GCF={vuescroll:{mode:"native",sizeStrategy:"percent",pullRefresh:{enable:!1,tips:{deactive:"Pull to Refresh",active:"Release to Refresh",start:"Refreshing...",beforeDeactive:"Refresh Successfully!"}},pushLoad:{enable:!1,tips:{deactive:"Push to Load",active:"Release to Load",start:"Loading...",beforeDeactive:"Load Successfully!"}},paging:!1,zooming:!0,snapping:{enable:!1,width:100,height:100},scroller:{bouncing:!0,locking:!0,minZoom:.5,maxZoom:3,speedMultiplier:1,penetrationDeceleration:.03,penetrationAcceleration:.08,preventDefault:!0}},scrollPanel:{initialScrollY:!1,initialScrollX:!1,scrollingX:!0,scrollingY:!0,speed:300,easing:void 0},scrollContent:{tag:"div",padding:!1,props:{},attrs:{}},rail:{vRail:{width:"6px",pos:"right",background:"#01a99a",opacity:0},hRail:{height:"6px",pos:"bottom",background:"#01a99a",opacity:0}},bar:{showDelay:500,vBar:{background:"#00a650",keepShow:!1,opacity:1,hover:!1},hBar:{background:"#00a650",keepShow:!1,opacity:1,hover:!1}}};function validateOptions(e){var t=!1,i=e.vuescroll,o=e.scrollPanel;~modes.indexOf(i.mode)||(error('The vuescroll\'s option "mode" should be one of the '+modes),t=!0),i.paging==i.snapping.enable&&i.paging&&(i.pullRefresh||i.pushLoad)&&error("paging, snapping, (pullRefresh with pushLoad) can only one of them to be true.");var r=o.initialScrollY,l=o.initialScrollX;return r&&!String(r).match(/^\d+(\.\d+)?(%)?$/)&&error("The prop `initialScrollY` should be a percent number like 10% or an exact number that greater than or equal to 0 like 100."),l&&!String(l).match(/^\d+(\.\d+)?(%)?$/)&&error("The prop `initialScrollX` should be a percent number like 10% or an exact number that greater than or equal to 0 like 100."),t}function hackPropsData(){var e=this;if("vueScroll"===e.$options.name){var t=deepMerge(e.$vuescrollConfig,{}),i=deepMerge(GCF,t);e.$options.propsData.ops=e.$options.propsData.ops||{},Object.keys(e.$options.propsData.ops).forEach(function(t){defineReactive(e.mergedOptions,t,e.$options.propsData.ops)}),deepMerge(i,e.mergedOptions);defineReactive(e.mergedOptions.scrollContent,"paddPos",function(){return"padding-"+e.mergedOptions.rail.vRail.pos}),defineReactive(e.mergedOptions.scrollContent,"paddValue",function(){return e.mergedOptions.rail.vRail.width})}}var hackLifecycle={data:function(){return{shouldStopRender:!1,mergedOptions:{vuescroll:{},scrollPanel:{},scrollContent:{},rail:{},bar:{}}}},created:function(){hackPropsData.call(this),this.renderError=validateOptions(this.mergedOptions)}};function createEasingFunction(e,t){return function(i){return t(e,i)}}function easingPattern(e,t){var i=null;return"easeInQuad"===e&&(i=t*t),"easeOutQuad"===e&&(i=t*(2-t)),"easeInOutQuad"===e&&(i=t<.5?2*t*t:(4-2*t)*t-1),"easeInCubic"===e&&(i=t*t*t),"easeOutCubic"===e&&(i=--t*t*t+1),"easeInOutCubic"===e&&(i=t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1),"easeInQuart"===e&&(i=t*t*t*t),"easeOutQuart"===e&&(i=1- --t*t*t*t),"easeInOutQuart"===e&&(i=t<.5?8*t*t*t*t:1-8*--t*t*t*t),"easeInQuint"===e&&(i=t*t*t*t*t),"easeOutQuint"===e&&(i=1+--t*t*t*t*t),"easeInOutQuint"===e&&(i=t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t),i||t}function requestAnimationFrame(e){var t=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame,i=!!t;if(t&&!/requestAnimationFrame\(\)\s*\{\s*\[native code\]\s*\}/i.test(t.toString())&&(i=!1),i)return function(e,i){t(e,i)};var o={},r=1,l=null,s=+new Date;return function(e){var t=r++;return o[t]=e,requestCount++,null===l&&(l=setInterval(function(){var e=+new Date,t=o;for(var i in o={},requestCount=0,t)t.hasOwnProperty(i)&&(t[i](e),s=e);e-s>2500&&(clearInterval(l),l=null)},1e3/60)),t}}var time=Date.now||function(){return+new Date},desiredFrames=60,millisecondsPerSecond=1e3,running={},counter=1,core={effect:{}},global=null;function getNumericValue(e,t){var i=void 0;return i=(i=/(-?\d+(?:\.\d+?)?)%$/.exec(e))?t*(i=i[1]-0)/100:e-0}function goScrolling(e,t,i,o,r,l){var s=e.scrollTop,n=e.scrollLeft,a=n,c=s;s+i<0&&(i=-s);var h=e.scrollHeight;s+i>h&&(i=h-s),n+t<0&&(t=-n),n+t>e.scrollWidth&&(t=e.scrollWidth-n);var u=createEasingFunction(r,easingPattern);core.effect.Animate.start(function(o){a=n+t*o,c=s+i*o,e.scrollTop=Math.floor(c),e.scrollLeft=Math.floor(a)},function(){return Math.abs(c-s)<=Math.abs(i)||Math.abs(a-n)<=Math.abs(t)},l,o,u)}global="undefined"!=typeof window?window:{},core.effect.Animate={requestAnimationFrame:requestAnimationFrame(global),stop:function(e){var t=null!=running[e];return t&&(running[e]=null),t},isRunning:function(e){return null!=running[e]},start:function(e,t,i,o,r,l){var s=time(),n=s,a=0,c=0,h=counter++;if(l||(l=document.body),h%20==0){var u={};for(var _ in running)u[_]=!0;running=u}return running[h]=!0,core.effect.Animate.requestAnimationFrame(function u(_){var d=!0!==_,p=time();if(!running[h]||t&&!t(h))return running[h]=null,void(i&&i(desiredFrames-c/((p-s)/millisecondsPerSecond),h,!1));if(d)for(var f=Math.round((p-n)/(millisecondsPerSecond/desiredFrames))-1,m=0;m1&&(a=1);var v=r?r(a):a;!1!==e(v,p,d)&&1!==a||!d?d&&(n=p,core.effect.Animate.requestAnimationFrame(u,l)):(running[h]=null,i&&i(desiredFrames-c/((p-s)/millisecondsPerSecond),h,1===a||null==o))},l),h}};var api={methods:{scrollTo:function(e){var t=e.x,i=e.y,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=void 0===t?this.vuescroll.state.internalScrollLeft||0:getNumericValue(t,this.scrollPanelElm.scrollWidth),i=void 0===i?this.vuescroll.state.internalScrollTop||0:getNumericValue(i,this.scrollPanelElm.scrollHeight),this.internalScrollTo(t,i,o,r)},scrollBy:function(e){var t=e.dx,i=void 0===t?0:t,o=e.dy,r=void 0===o?0:o,l=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=this.vuescroll.state,n=s.internalScrollLeft,a=void 0===n?0:n,c=s.internalScrollTop,h=void 0===c?0:c;i&&(a+=getNumericValue(i,this.scrollPanelElm.scrollWidth)),r&&(h+=getNumericValue(r,this.scrollPanelElm.scrollHeight)),this.internalScrollTo(a,h,l)},zoomBy:function(e,t,i,o,r){"slide"==this.mode?this.scroller.zoomBy(e,t,i,o,r):warn("zoomBy and zoomTo are only for slide mode!")},zoomTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments[2],o=arguments[3],r=arguments[4];"slide"==this.mode?this.scroller.zoomTo(e,t,i,o,r):warn("zoomBy and zoomTo are only for slide mode!")},getCurrentPage:function(){if("slide"==this.mode&&this.mergedOptions.vuescroll.paging)return this.scroller.getCurrentPage();warn("getCurrentPage and goToPage are only for slide mode and paging is enble!")},goToPage:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];"slide"==this.mode&&this.mergedOptions.vuescroll.paging?this.scroller.goToPage(e,t):warn("getCurrentPage and goToPage are only for slide mode and paging is enble!")},triggerRefreshOrLoad:function(e){if("slide"==this.mode){var t=this.mergedOptions.vuescroll.pullRefresh.enable,i=this.mergedOptions.vuescroll.pushLoad.enable;if("refresh"!=e||t)if("load"!=e||i)if("refresh"===e||"load"===e){if("start"!=this.vuescroll.state[e+"Stage"])return this.scroller.triggerRefreshOrLoad(e),!0}else warn("param must be one of load and refresh!");else warn("load must be enabled!");else warn("refresh must be enabled!")}else warn("You can only use triggerRefreshOrLoad in slide mode!")},getCurrentviewDom:function(){for(var e=this,t=("slide"==this.mode||"pure-native"==this.mode?this.scrollPanelElm:this.scrollContentElm).children,i=[],o=function(t){var i=t.getBoundingClientRect(),o=i.left,r=i.top,l=i.width,s=i.height,n=e.$el.getBoundingClientRect(),a=n.left,c=n.top,h=n.height,u=n.width;return o-a+l>0&&o-a0&&r-c1&&void 0!==arguments[1])||arguments[1],i=this.$el;if("string"==typeof e&&(e=i.querySelector(e)),isChildInParent(e,i)){var o=this.$el.getBoundingClientRect(),r=o.left,l=o.top,s=e.getBoundingClientRect(),n=r-s.left,a=l-s.top;this.scrollBy({dx:-n,dy:-a},t)}else warn("The element or selector you passed is not the element of Vuescroll, please pass the element that is in Vuescroll to scrollIntoView API. ")}}},nativeMode={methods:{updateNativeModeBarState:function(){var e=this.scrollPanelElm,t=this.$el,i="percent"==this.mergedOptions.vuescroll.sizeStrategy,o=i?t.clientWidth:extractNumberFromPx(this.vuescroll.state.width),r=i?t.clientHeight:extractNumberFromPx(this.vuescroll.state.height),l=100*r/e.scrollHeight,s=100*o/e.scrollWidth;this.bar.vBar.state.posValue=100*e.scrollTop/r,this.bar.hBar.state.posValue=100*e.scrollLeft/o,this.bar.vBar.state.size=l<100?l+"%":0,this.bar.hBar.state.size=s<100?s+"%":0}}},animatingMethod=null,noAnimatingMethod=null;function Scroller(e,t){for(var i in this.__callback=e,this.options={scrollingX:!0,scrollingY:!0,animating:!0,animationDuration:250,bouncing:!0,locking:!0,paging:!1,snapping:!1,zooming:!1,minZoom:.5,maxZoom:3,speedMultiplier:1,scrollingComplete:NOOP,animatingEasing:"easeOutCubic",noAnimatingEasing:"easeInOutCubic",penetrationDeceleration:.03,penetrationAcceleration:.08},t)this.options[i]=t[i];animatingMethod=createEasingFunction(this.options.animatingEasing,easingPattern),noAnimatingMethod=createEasingFunction(this.options.noAnimatingEasing,easingPattern)}var members={__isSingleTouch:!1,__isTracking:!1,__didDecelerationComplete:!1,__isGesturing:!1,__isDragging:!1,__isDecelerating:!1,__isAnimating:!1,__clientLeft:0,__clientTop:0,__clientWidth:0,__clientHeight:0,__contentWidth:0,__contentHeight:0,__snapWidth:100,__snapHeight:100,__refreshHeight:null,__loadHeight:null,__refreshActive:!1,__refreshActivate:null,__refreshBeforeDeactivate:null,__refreshDeactivate:null,__refreshStart:null,__loadActive:null,__loadActivate:null,__loadBeforeDeactivate:null,__loadDeactivate:null,__loadStart:null,__zoomLevel:1,__scrollLeft:0,__scrollTop:0,__maxScrollLeft:0,__maxScrollTop:0,__scheduledLeft:0,__scheduledTop:0,__scheduledZoom:0,__currentPageX:null,__currentPageY:null,__totalXPage:null,__totalYPage:null,__disable:!1,__lastTouchLeft:null,__lastTouchTop:null,__lastTouchMove:null,__positions:null,__minDecelerationScrollLeft:null,__minDecelerationScrollTop:null,__maxDecelerationScrollLeft:null,__maxDecelerationScrollTop:null,__decelerationVelocityX:null,__decelerationVelocityY:null,setDimensions:function(e,t,i,o){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:trye;e===+e&&(this.__clientWidth=e),t===+t&&(this.__clientHeight=t),i===+i&&(this.__contentWidth=i),o===+o&&(this.__contentHeight=o),this.__computeScrollMax(),this.scrollTo(this.__scrollLeft,this.__scrollTop,r)},setPosition:function(e,t){this.__clientLeft=e||0,this.__clientTop=t||0},setSnapSize:function(e,t){this.__snapWidth=e,this.__snapHeight=t},activatePullToRefresh:function(e,t){var i=t.activateCallback,o=t.deactivateCallback,r=t.startCallback,l=t.beforeDeactivateCallback;this.__refreshHeight=e,this.__refreshActivate=i,this.__refreshBeforeDeactivate=l,this.__refreshDeactivate=o,this.__refreshStart=r},activatePushToLoad:function(e,t){var i=t.activateCallback,o=t.deactivateCallback,r=t.startCallback,l=t.beforeDeactivateCallback;this.__loadHeight=e,this.__loadActivate=i,this.__loadBeforeDeactivate=l,this.__loadDeactivate=o,this.__loadStart=r},triggerRefreshOrLoad:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"refresh",t=this.__isDecelerating;t&&(core.effect.Animate.stop(t),this.__isDecelerating=!1),"refresh"==e?(this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0),this.__refreshStart&&(this.__refreshStart(),this.__refreshActive=!0)):(this.__publish(this.__scrollLeft,this.__maxScrollTop+this.__loadHeight,this.__zoomLevel,!0),this.__loadStart&&(this.__loadStart(),this.__loadActive=!0))},finishRefreshOrLoad:function(){var e=this;e.__refreshBeforeDeactivate&&e.__refreshActive?(e.__refreshActive=!1,e.__refreshBeforeDeactivate(function(){e.__refreshDeactivate&&e.__refreshDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)})):e.__refreshDeactivate&&e.__refreshActive&&(e.__refreshActive=!1,e.__refreshDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)),e.__loadBeforeDeactivate&&e.__loadActive?(e.__loadActive=!1,e.__loadBeforeDeactivate(function(){e.__loadDeactivate&&e.__loadDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)})):e.__loadDeactivate&&e.__loadActive&&(e.__loadActive=!1,e.__loadDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0))},getValues:function(){return{left:this.__scrollLeft,top:this.__scrollTop,zoom:this.__zoomLevel}},getScrollMax:function(){return{left:this.__maxScrollLeft,top:this.__maxScrollTop}},zoomTo:function(e,t,i,o,r){if(!this.options.zooming)throw new Error("Zooming is not enabled!");r&&(this.__zoomComplete=r),this.__isDecelerating&&(core.effect.Animate.stop(this.__isDecelerating),this.__isDecelerating=!1);var l=this.__zoomLevel;null==i&&(i=this.__clientWidth/2),null==o&&(o=this.__clientHeight/2),e=Math.max(Math.min(e,this.options.maxZoom),this.options.minZoom),this.__computeScrollMax(e);var s=(i+this.__scrollLeft)*e/l-i,n=(o+this.__scrollTop)*e/l-o;s>this.__maxScrollLeft?s=this.__maxScrollLeft:s<0&&(s=0),n>this.__maxScrollTop?n=this.__maxScrollTop:n<0&&(n=0),this.__publish(s,n,e,t)},zoomBy:function(e,t,i,o,r){this.zoomTo(this.__zoomLevel*e,t,i,o,r)},scrollTo:function(e,t,i,o,r){if(this.__isDecelerating&&(core.effect.Animate.stop(this.__isDecelerating),this.__isDecelerating=!1),null!=o&&o!==this.__zoomLevel){if(!this.options.zooming)throw new Error("Zooming is not enabled!");e*=o,t*=o,this.__computeScrollMax(o)}else o=this.__zoomLevel;this.options.scrollingX||r?this.options.paging?e=Math.round(e/this.__clientWidth)*this.__clientWidth:this.options.snapping&&(e=Math.round(e/this.__snapWidth)*this.__snapWidth):e=this.__scrollLeft,this.options.scrollingY||r?this.options.paging?t=Math.round(t/this.__clientHeight)*this.__clientHeight:this.options.snapping&&(t=Math.round(t/this.__snapHeight)*this.__snapHeight):t=this.__scrollTop,e=Math.max(Math.min(this.__maxScrollLeft,e),0),t=Math.max(Math.min(this.__maxScrollTop,t),0),e===this.__scrollLeft&&t===this.__scrollTop&&(i=!1),this.__isTracking||this.__publish(e,t,o,i)},scrollBy:function(e,t,i){var o=this.__isAnimating?this.__scheduledLeft:this.__scrollLeft,r=this.__isAnimating?this.__scheduledTop:this.__scrollTop;this.scrollTo(o+(e||0),r+(t||0),i)},getCurrentPage:function(){return this.__computePage(),{x:this.__currentPageX,y:this.__currentPageY}},goToPage:function(e,t){var i=e.x,o=e.y;isNaN(i)&&(i=1),isNaN(o)&&(o=1),this.scrollTo((i-1)*this.__clientWidth,(o-1)*this.__clientHeight,t)},doMouseZoom:function(e,t,i,o){var r=e>0?.97:1.03;return this.zoomTo(this.__zoomLevel*r,!1,i-this.__clientLeft,o-this.__clientTop)},doTouchStart:function(e,t){if(null==e.length)throw new Error("Invalid touch list: "+e);if(t instanceof Date&&(t=t.valueOf()),"number"!=typeof t)throw new Error("Invalid timestamp value: "+t);var i,o;this.__interruptedAnimation=!0,this.__isDecelerating&&(core.effect.Animate.stop(this.__isDecelerating),this.__isDecelerating=!1,this.__interruptedAnimation=!0),this.__isAnimating&&(core.effect.Animate.stop(this.__isAnimating),this.__isAnimating=!1,this.__interruptedAnimation=!0);var r=1===e.length;r?(i=e[0].pageX,o=e[0].pageY):(i=Math.abs(e[0].pageX+e[1].pageX)/2,o=Math.abs(e[0].pageY+e[1].pageY)/2),this.__initialTouchLeft=i,this.__initialTouchTop=o,this.__zoomLevelStart=this.__zoomLevel,this.__lastTouchLeft=i,this.__lastTouchTop=o,this.__lastTouchMove=t,this.__lastScale=1,this.__enableScrollX=!r&&this.options.scrollingX,this.__enableScrollY=!r&&this.options.scrollingY,this.__isTracking=!0,this.__didDecelerationComplete=!1,this.__isDragging=!r,this.__isSingleTouch=r,this.__positions=[]},doTouchMove:function(e,t,i){if(null==e.length)throw new Error("Invalid touch list: "+e);if(t instanceof Date&&(t=t.valueOf()),"number"!=typeof t)throw new Error("Invalid timestamp value: "+t);if(this.__isTracking){var o,r;2===e.length?(o=Math.abs(e[0].pageX+e[1].pageX)/2,r=Math.abs(e[0].pageY+e[1].pageY)/2):(o=e[0].pageX,r=e[0].pageY);var l=this.__positions;if(this.__isDragging){var s=o-this.__lastTouchLeft,n=r-this.__lastTouchTop,a=this.__scrollLeft,c=this.__scrollTop,h=this.__zoomLevel;if(null!=i&&this.options.zooming){var u=h;if(h=h/this.__lastScale*i,u!==(h=Math.max(Math.min(h,this.options.maxZoom),this.options.minZoom))){var _=o-this.__clientLeft,d=r-this.__clientTop;a=(_+a)*h/u-_,c=(d+c)*h/u-d,this.__computeScrollMax(h)}}if(this.__enableScrollX){a-=s*this.options.speedMultiplier;var p=this.__maxScrollLeft;(a>p||a<0)&&(this.options.bouncing?a+=s/2*this.options.speedMultiplier:a=a>p?p:0)}if(this.__enableScrollY){c-=n*this.options.speedMultiplier;var f=this.__maxScrollTop;(c>f||c<0)&&(this.options.bouncing?(c+=n/2*this.options.speedMultiplier,this.__enableScrollX||null==this.__refreshHeight&&null==this.__loadHeight||(!this.__refreshActive&&c<=-this.__refreshHeight?(this.__refreshActive=!0,this.__refreshActivate&&this.__refreshActivate()):this.__refreshActive&&c>-this.__refreshHeight?(this.__refreshActive=!1,this.__refreshDeactivate&&this.__refreshDeactivate()):!this.__loadActive&&c>=this.__maxScrollTop+this.__loadHeight?(this.__loadActive=!0,this.__loadActivate&&this.__loadActivate()):this.__refreshActive&&cf?f:0)}l.length>60&&l.splice(0,30),l.push(a,c,t),this.__publish(a,c,h)}else{var m=this.options.locking?3:0,v=Math.abs(o-this.__initialTouchLeft),g=Math.abs(r-this.__initialTouchTop);this.__enableScrollX=this.options.scrollingX&&v>=m,this.__enableScrollY=this.options.scrollingY&&g>=m,l.push(this.__scrollLeft,this.__scrollTop,t),this.__isDragging=(this.__enableScrollX||this.__enableScrollY)&&(v>=5||g>=5),this.__isDragging&&(this.__interruptedAnimation=!1)}this.__lastTouchLeft=o,this.__lastTouchTop=r,this.__lastTouchMove=t,this.__lastScale=i}},doTouchEnd:function(e){if(e instanceof Date&&(e=e.valueOf()),"number"!=typeof e)throw new Error("Invalid timestamp value: "+e);if(this.__isTracking){if(this.__isTracking=!1,this.__isDragging)if(this.__isDragging=!1,this.__isSingleTouch&&this.options.animating&&e-this.__lastTouchMove<=100){for(var t=this.__positions,i=t.length-1,o=i,r=i;r>0&&t[r]>this.__lastTouchMove-100;r-=3)o=r;if(o!==i){var l=t[i]-t[o],s=this.__scrollLeft-t[o-2],n=this.__scrollTop-t[o-1];this.__decelerationVelocityX=s/l*(1e3/60),this.__decelerationVelocityY=n/l*(1e3/60);var a=this.options.paging||this.options.snapping?4:1;Math.abs(this.__decelerationVelocityX)>a||Math.abs(this.__decelerationVelocityY)>a?this.__refreshActive||this.__loadActive||this.__startDeceleration(e):this.__scrollComplete()}else this.__scrollComplete()}else e-this.__lastTouchMove>100&&this.__scrollComplete();this.__isDecelerating||(this.__refreshActive&&this.__refreshStart?(this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0),this.__refreshStart&&this.__refreshStart()):this.__loadActive&&this.__loadStart?(this.__publish(this.__scrollLeft,this.__maxScrollTop+this.__loadHeight,this.__zoomLevel,!0),this.__loadStart&&this.__loadStart()):((this.__interruptedAnimation||this.__isDragging)&&this.__scrollComplete(),this.scrollTo(this.__scrollLeft,this.__scrollTop,!0,this.__zoomLevel),this.__refreshActive?(this.__refreshActive=!1,this.__refreshDeactivate&&this.__refreshDeactivate()):this.__loadActive&&(this.__loadActive=!1,this.__loadDeactivate&&this.__loadDeactivate()))),this.__positions.length=0}},onScroll:NOOP,stop:function(){this.__disable=!0},start:function(){self.__disable=!0},__publish:function(e,t,i,o){var r=this;if(!r.__disable){isNaN(e)&&(e=this.__scrollLeft),isNaN(t)&&(t=this.__scrollTop);var l=r.__isAnimating;if(l&&(core.effect.Animate.stop(l),r.__isAnimating=!1),o&&r.options.animating){r.__scheduledLeft=e,r.__scheduledTop=t,r.__scheduledZoom=i;var s=r.__scrollLeft,n=r.__scrollTop,a=r.__zoomLevel,c=e-s,h=t-n,u=i-a;r.__isAnimating=core.effect.Animate.start(function(e,t,i){i&&(r.__scrollLeft=s+c*e,r.__scrollTop=n+h*e,r.__zoomLevel=a+u*e,r.__callback&&(r.__callback(r.__scrollLeft,r.__scrollTop,r.__zoomLevel),r.onScroll()))},function(e){return r.__isAnimating===e},function(e,t,i){t===r.__isAnimating&&(r.__isAnimating=!1),(r.__didDecelerationComplete||i)&&r.__scrollComplete(),r.options.zooming&&(r.__computeScrollMax(),r.__zoomComplete&&(r.__zoomComplete(),r.__zoomComplete=null))},r.options.animationDuration,l?animatingMethod:noAnimatingMethod)}else r.__scheduledLeft=r.__scrollLeft=e,r.__scheduledTop=r.__scrollTop=t,r.__scheduledZoom=r.__zoomLevel=i,r.__callback&&(r.__callback(e,t,i),r.onScroll()),r.options.zooming&&(r.__computeScrollMax(),r.__zoomComplete&&(r.__zoomComplete(),r.__zoomComplete=null))}},__computeScrollMax:function(e){null==e&&(e=this.__zoomLevel),this.__maxScrollLeft=Math.max(this.__contentWidth*e-this.__clientWidth,0),this.__maxScrollTop=Math.max(this.__contentHeight*e-this.__clientHeight,0)},__computePage:function(){var e=this.__clientWidth,t=this.__clientHeight,i=this.__scrollLeft,o=this.__scrollTop;this.__totalXPage=Math.ceil(this.__contentWidth/e),this.__currentPageX=Math.ceil(i/e+1),this.__totalYPage=Math.ceil(this.__contentHeight/t),this.__currentPageY=Math.ceil(o/t+1)},__scrollComplete:function(){this.options.scrollingComplete()},__startDeceleration:function(){var e=this;if(e.options.paging){var t=Math.max(Math.min(e.__scrollLeft,e.__maxScrollLeft),0),i=Math.max(Math.min(e.__scrollTop,e.__maxScrollTop),0),o=e.__clientWidth,r=e.__clientHeight;e.__minDecelerationScrollLeft=Math.floor(t/o)*o,e.__minDecelerationScrollTop=Math.floor(i/r)*r,e.__maxDecelerationScrollLeft=Math.ceil(t/o)*o,e.__maxDecelerationScrollTop=Math.ceil(i/r)*r}else e.__minDecelerationScrollLeft=0,e.__minDecelerationScrollTop=0,e.__maxDecelerationScrollLeft=e.__maxScrollLeft,e.__maxDecelerationScrollTop=e.__maxScrollTop;var l=e.options.snapping?4:.001;e.__isDecelerating=core.effect.Animate.start(function(t,i,o){e.__stepThroughDeceleration(o)},function(){var t=Math.abs(e.__decelerationVelocityX)>=l||Math.abs(e.__decelerationVelocityY)>=l;return t||(e.__didDecelerationComplete=!0),t},function(){e.__isDecelerating&&(e.__isDecelerating=!1,e.__didDecelerationComplete&&e.__scrollComplete(),e.scrollTo(e.__scrollLeft,e.__scrollTop,e.options.snapping))})},__stepThroughDeceleration:function(e){var t=this.__scrollLeft+this.__decelerationVelocityX,i=this.__scrollTop+this.__decelerationVelocityY;if(!this.options.bouncing){var o=Math.max(Math.min(this.__maxDecelerationScrollLeft,t),this.__minDecelerationScrollLeft);o!==t&&(t=o,this.__decelerationVelocityX=0);var r=Math.max(Math.min(this.__maxDecelerationScrollTop,i),this.__minDecelerationScrollTop);r!==i&&(i=r,this.__decelerationVelocityY=0)}if(e?this.__publish(t,i,this.__zoomLevel):(this.__scrollLeft=t,this.__scrollTop=i),!this.options.paging){this.__decelerationVelocityX*=.95,this.__decelerationVelocityY*=.95}if(this.options.bouncing){var l=0,s=0,n=this.options.penetrationDeceleration,a=this.options.penetrationAcceleration;tthis.__maxDecelerationScrollLeft&&(l=this.__maxDecelerationScrollLeft-t),ithis.__maxDecelerationScrollTop&&(s=this.__maxDecelerationScrollTop-i),0!==l&&(l*this.__decelerationVelocityX<=0?this.__decelerationVelocityX+=l*n:this.__decelerationVelocityX=l*a),0!==s&&(s*this.__decelerationVelocityY<=0?this.__decelerationVelocityY+=s*n:this.__decelerationVelocityY=s*a)}}};for(var key in members)Scroller.prototype[key]=members[key];function _defineProperty(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function render(e,t,i,o){var r=null,l=null;"string"==typeof e&&(l="vertical"==e?(r=0)||o:(r=o)&&0);var s=getPrefix(t),n=document.createElement("div"),a=s+"Perspective";return void 0!==n.style[a]?"string"==typeof e?_defineProperty({},"transform","translate3d("+r+i+","+l+i+",0)"):function(t,o,r){e.style.transform="translate3d("+-t+i+","+-o+i+",0) scale("+r+")"}:void 0!==n.style.transform?"string"==typeof e?_defineProperty({},"transform","translate("+r+i+","+l+i+")"):function(t,o,r){e.style.transform="translate("+-t+i+","+-o+i+") scale("+r+")"}:void 0}function listenContainer(e,t,i,o,r){var l=null;function s(e){e.touches[0]&&e.touches[0].target&&e.touches[0].target.tagName.match(/input|textarea|select/i)||(i("mousedown"),t.doTouchStart(e.touches,e.timeStamp),r&&e.preventDefault(),document.addEventListener("touchmove",n,{passive:!1}))}function n(e){i("mousemove"),t.doTouchMove(e.touches,e.timeStamp,e.scale),e.preventDefault()}function a(e){i("mouseup"),t.doTouchEnd(e.timeStamp),document.removeEventListener("touchmove",n)}function c(e){t.doTouchEnd(e.timeStamp)}function h(e){e.target.tagName.match(/input|textarea|select/i)||(i("mousedown"),t.doTouchStart([{pageX:e.pageX,pageY:e.pageY}],e.timeStamp),r&&e.preventDefault(),p=!0)}function u(e){p&&(i("mousemove"),t.doTouchMove([{pageX:e.pageX,pageY:e.pageY}],e.timeStamp),p=!0)}function _(e){p&&(i("mouseup"),t.doTouchEnd(e.timeStamp),p=!1)}function d(e){t.doMouseZoom(e.detail?-120*e.detail:e.wheelDelta,e.timeStamp,e.pageX,e.pageY)}if("ontouchstart"in window)e.addEventListener("touchstart",s,!1),document.addEventListener("touchend",a,!1),document.addEventListener("touchcancel",c,!1),l=function(){e.removeEventListener("touchstart",s,!1),document.removeEventListener("touchend",a,!1),document.removeEventListener("touchcancel",c,!1)};else{var p=!1;e.addEventListener("mousedown",h,!1),document.addEventListener("mousemove",u,!1),document.addEventListener("mouseup",_,!1),o&&e.addEventListener(navigator.userAgent.indexOf("Firefox")>-1?"DOMMouseScroll":"mousewheel",d,!1),l=function(){e.removeEventListener("mousedown",h,!1),document.removeEventListener("mousemove",u,!1),document.removeEventListener("mouseup",_,!1),e.removeEventListener(navigator.userAgent.indexOf("Firefox")>-1?"DOMMouseScroll":"mousewheel",d,!1)}}return t.onScroll=function(){i("onscroll")},l}var _extends=Object.assign||function(e){for(var t=1;to.__maxScrollLeft&&(r=o.__scrollLeft-o.__maxScrollLeft)),u&&(o.__scrollTop<0?l=-o.__scrollTop:o.__scrollTop>o.__maxScrollTop&&(l=o.__scrollTop-o.__maxScrollTop)),e=100*n/(c+l),t=100*s/(a+r);var _=Math.min(Math.max(0,o.__scrollTop),o.__maxScrollTop),d=Math.min(Math.max(0,o.__scrollLeft),o.__maxScrollLeft);this.bar.vBar.state.posValue=100*(_+l)/i.clientHeight,this.bar.hBar.state.posValue=100*(d+r)/i.clientWidth,o.__scrollLeft<0&&(this.bar.hBar.state.posValue=0),o.__scrollTop<0&&(this.bar.vBar.state.posValue=0),this.bar.vBar.state.size=e<100?e+"%":0,this.bar.hBar.state.size=t<100?t+"%":0},registryEvent:function(e){var t="refresh"==e?"refreshDom":"loadDom",i="refresh"==e?this.scroller.activatePullToRefresh:this.scroller.activatePushToLoad,o="refresh"==e?"refreshStage":"loadStage",r=this.$refs[t].elm||this.$refs[t],l=createStateCallbacks(e,o,this,r),s=r.offsetHeight;i.bind(this.scroller)(s,l)}}},scrollMap={vertical:{bar:{size:"height",opsSize:"width",posName:"top",opposName:"bottom",page:"pageY",scroll:"scrollTop",scrollSize:"scrollHeight",offset:"offsetHeight",client:"clientY"},axis:"Y"},horizontal:{bar:{size:"width",opsSize:"height",posName:"left",opposName:"right",page:"pageX",scroll:"scrollLeft",scrollSize:"scrollWidth",offset:"offsetWidth",client:"clientX"},axis:"X"}};function _defineProperty$1(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var colorCache={},rgbReg=/rgb\(/,extractRgbColor=/rgb\((.*)\)/;function createMouseEvent(e){function t(t){if(e.axisStartPos){var i=(t[e.bar.client]-e.$el.getBoundingClientRect()[e.bar.posName]-e.axisStartPos)/e.$el[e.bar.offset];e.$parent.scrollTo(_defineProperty$1({},e.axis.toLowerCase(),e.parent.scrollPanel.$el[e.bar.scrollSize]*i),!1)}}function i(){e.$emit("setBarClick",!1),document.onselectstart=null,e.$parent.hideBar(),e.axisStartPos=0,eventCenter(document,"mousemove",t,"off"),eventCenter(document,"mouseup",i,"off")}return function(o){o.stopImmediatePropagation(),document.onselectstart=function(){return!1},e.axisStartPos=o[e.bar.client]-e.$refs.inner.getBoundingClientRect()[e.bar.posName],e.$emit("setBarClick",!0),eventCenter(document,"mousemove",t),eventCenter(document,"mouseup",i)}}function createTouchEvent(e){function t(t){if(e.axisStartPos){var i=(t.touches[0][e.bar.client]-e.$el.getBoundingClientRect()[e.bar.posName]-e.axisStartPos)/e.$el[e.bar.offset];e.$parent.scrollTo(_defineProperty$1({},e.axis.toLowerCase(),e.parent.scrollPanel.$el[e.bar.scrollSize]*i),!1)}}function i(){e.$emit("setBarClick",!1),document.onselectstart=null,e.$parent.hideBar(),e.axisStartPos=0,eventCenter(document,"touchmove",t,"off"),eventCenter(document,"touchend",i,"off")}return function(o){o.stopImmediatePropagation(),o.preventDefault(),document.onselectstart=function(){return!1},e.axisStartPos=o.touches[0][e.bar.client]-e.$refs.inner.getBoundingClientRect()[e.bar.posName],e.$emit("setBarClick",!0),eventCenter(document,"touchmove",t),eventCenter(document,"touchend",i)}}function getRgbAColor(e,t){var i=e+"&"+t;if(colorCache[i])return colorCache[i];var o=document.createElement("div");o.style.background=e,document.body.appendChild(o);var r=window.getComputedStyle(o).backgroundColor;return document.body.removeChild(o),rgbReg.test(r)?colorCache[i]="rgba("+extractRgbColor.exec(r)[1]+", "+t+")":e}function handleClickTrack(e,t,i,o,r){var l=t.client,s=t.offset,n=t.posName,a=t.scrollSize,c=i[o+"Bar"].$refs.inner[s],h=(e[l]-e.target.getBoundingClientRect()[n]-c/2)/e.target[s],u=i.scrollPanel.$el[a]*h;r.scrollTo(_defineProperty$1({},scrollMap[o].axis.toLowerCase(),u))}var bar={name:"bar",props:{ops:{type:Object,required:!0},state:{type:Object,required:!0},type:{type:String,required:!0}},computed:{bar:function(){return scrollMap[this.type].bar},axis:function(){return scrollMap[this.type].axis},parent:function(){return this.$parent.$refs}},render:function(e){var t,i,o=this,r=o.$parent.$refs,l=getRgbAColor(o.ops.rail.background,o.ops.rail.opacity),s={style:(_defineProperty$1(t={},o.bar.posName,0),_defineProperty$1(t,o.bar.opsSize,"100%"),_defineProperty$1(t,o.bar.size,o.state.size),_defineProperty$1(t,"borderRadius","inherit"),_defineProperty$1(t,"background",o.ops.bar.background),_defineProperty$1(t,"opacity",o.state.opacity),_defineProperty$1(t,"transform","translate"+scrollMap[o.type].axis+"("+o.state.posValue+"%)"),_defineProperty$1(t,"cursor","pointer"),_defineProperty$1(t,"position","relative"),_defineProperty$1(t,"transition","opacity .5s"),_defineProperty$1(t,"userSelect","none"),t),class:"vuescroll-"+o.type+"-bar",ref:"inner",on:{}};return o.ops.bar.hover&&(s.on.mouseenter=function(){o.$el.style.background=o.ops.hover},s.on.mouseleave=function(){o.$el.style.background=o.ops.background}),isSupportTouch()?s.on.touchstart=createTouchEvent(this):s.on.mousedown=createMouseEvent(this),e("div",{class:"vuescroll-"+o.type+"-rail",style:(i={position:"absolute",zIndex:1,background:l},_defineProperty$1(i,o.bar.opsSize,o.ops.rail[o.bar.opsSize]),_defineProperty$1(i,o.bar.posName,"2px"),_defineProperty$1(i,o.bar.opposName,"2px"),_defineProperty$1(i,o.ops.rail.pos,0),i),on:{click:function(e){handleClickTrack(e,o.bar,r,o.type,o.$parent)}}},[e("div",s)])}};function createBar(e,t,i){var o="vertical"===i?"Y":"X",r=i.charAt(0)+"Bar",l=i.charAt(0)+"Rail";return!t.bar[r].state.size||!t.mergedOptions.scrollPanel["scrolling"+o]||"pure-native"==t.mode||t.refreshLoad&&"vertical"!==i&&"slide"===t.mode?null:e("bar",{props:{type:i,ops:{bar:t.mergedOptions.bar[r],rail:t.mergedOptions.rail[l]},state:t.bar[r].state},on:{setBarClick:t.setBarClick},ref:i+"Bar"})}var scrollContent={name:"scrollContent",functional:!0,props:{ops:{type:Object},state:{type:Object,default:function(){return{}}}},render:function(e,t){var i=t.props,o=t.slots,r=deepMerge(i.state.style,{});r.position="relative",r["min-width"]="100%",r["min-height"]="100%";var l=isSupportGivenStyle("width","fit-content");return l?r.width=l:r.display="inline-block",r.boxSizing="border-box",i.ops.padding&&(r[i.ops.paddPos]=i.ops.paddValue),e(i.ops.tag,{style:r,ref:"scrollContent",class:"vuescroll-content",props:i.ops.props,attrs:i.ops.attrs},o().default)}};function createContent(e,t){return e("scrollContent",{props:{ops:t.mergedOptions.scrollContent}},[[t.$slots.default]])}var scrollPanel={name:"scrollPanel",props:{ops:{type:Object,required:!0}},methods:{updateInitialScroll:function(){var e=0,t=0;this.ops.initialScrollX&&(e=this.ops.initialScrollX),this.ops.initialScrollY&&(t=this.ops.initialScrollY),(e||t)&&this.$parent.scrollTo({x:e,y:t})}},mounted:function(){var e=this;setTimeout(function(){e._isDestroyed||e.updateInitialScroll()},0)},render:function(e){return e("div",{class:["vuescroll-panel"]},[[this.$slots.default]])}};function createPanel(e,t){var i={ref:"scrollPanel",style:{position:"relative",height:"100%"},nativeOn:{scroll:t.handleScroll},props:{ops:t.mergedOptions.scrollPanel,state:t.scrollPanel.state}};if("native"==t.mode){t.mergedOptions.scrollPanel.scrollingY?i.style.overflowY=t.bar.vBar.state.size?"scroll":"":i.style.overflowY="hidden",t.mergedOptions.scrollPanel.scrollingX?i.style.overflowX=t.bar.hBar.state.size?"scroll":"":i.style.overflowX="hidden";var o=getGutter();o?(t.bar.vBar.state.size&&t.mergedOptions.scrollPanel.scrollingY&&(i.style.marginRight="-"+o+"px"),t.bar.hBar.state.size&&t.mergedOptions.scrollPanel.scrollingX&&(i.style.height="calc(100% + "+o+"px)")):(hideSystemBar(),i.style.height="100%"),i.style.transformOrigin="",i.style.transform=""}else if("slide"==t.mode){i.style.transformOrigin="left top 0px",i.style.userSelect="none",i.style.height="",i.style["box-sizing"]="border-box",i.style["min-width"]="100%",i.style["min-height"]="100%";var r=isSupportGivenStyle("width","fit-content");r?i.style.width=r:i.display="inline-block"}else"pure-native"==t.mode&&(i.style.width="100%",t.mergedOptions.scrollPanel.scrollingY?i.style.overflowY="auto":i.style.overflowY="hidden",t.mergedOptions.scrollPanel.scrollingX?i.style.overflowX="auto":i.style.overflowX="hidden");return e("scrollPanel",i,[createPanelChildren(t,e)])}function createPanelChildren(e,t){if("native"==e.mode)return[createContent(t,e)];if("slide"==e.mode){var i=[e.$slots.default];if(e.mergedOptions.vuescroll.pullRefresh.enable){createDomStyle("refreshDomStyle");var o;o=createTipDom(t,e,"refresh"),i.unshift(t("div",{class:"vuescroll-refresh",ref:"refreshDom",key:"refshDom"},[[o,e.pullRefreshTip]]))}if(e.mergedOptions.vuescroll.pushLoad.enable){createDomStyle("loadDomStyle");var r;r=createTipDom(t,e,"load"),i.push(t("div",{class:"vuescroll-load",ref:"loadDom",key:"loadDom"},[[r,e.pushLoadTip]]))}return i}return"pure-native"==e.mode?[e.$slots.default]:void 0}function createTipDom(e,t,i){var o=t.vuescroll.state[i+"Stage"],r=null;if(r=t.$slots[i+"-"+o])return r[0];switch(o){case"deactive":r=e("svg",{attrs:{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 1000 1000","enable-background":"new 0 0 1000 1000",xmlSpace:"preserve"}},[e("metadata",[" Svg Vector Icons : http://www.sfont.cn "]),e("g",[e("g",{attrs:{transform:"matrix(1 0 0 -1 0 1008)"}},[e("path",{attrs:{d:"M10,543l490,455l490-455L885,438L570,735.5V18H430v717.5L115,438L10,543z"}})])])]);break;case"start":r=e("svg",{attrs:{version:"1.1",id:"loader-1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 50 50",xmlSpace:"preserve"},style:"enable-background:new 0 0 50 50;"},[e("path",{attrs:{fill:"#000",d:"M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"}},[e("animateTransform",{attrs:{attributeType:"xml",attributeName:"transform",type:"rotate",from:"0 25 25",to:"360 25 25",dur:"0.6s",repeatCount:"indefinite"}})])]);break;case"active":r=e("svg",{attrs:{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 1000 1000","enable-background":"new 0 0 1000 1000",xmlSpace:"preserve"}},[e("metadata",[" Svg Vector Icons : http://www.sfont.cn "]),e("g",[e("g",{attrs:{transform:"matrix(1 0 0 -1 0 1008)"}},[e("path",{attrs:{d:"M500,18L10,473l105,105l315-297.5V998h140V280.5L885,578l105-105L500,18z"}})])])])}return r}function findValuesByMode(e,t){var i={};switch(e){case"native":case"pure-native":i={x:t.scrollPanelElm.scrollLeft,y:t.scrollPanelElm.scrollTop};break;case"slide":i={x:t.scroller.__scrollLeft,y:t.scroller.__scrollTop}}return i}function getClientSizeByType(e){var t=this.$el;return("percent"==this.mergedOptions.vuescroll.sizeStrategy?t["client"+(e.charAt(0).toUpperCase()+e.slice(1))]:extractNumberFromPx(this.vuescroll.state[e]))-0}var vueScrollCore={name:"vueScroll",components:{bar:bar,scrollContent:scrollContent,scrollPanel:scrollPanel},props:{ops:{type:Object}},mixins:[hackLifecycle,api,nativeMode,slideMode],mounted:function(){var e=this;this.renderError||(this.initVariables(),this.initVuescrollSizeType(),this.initScroller(),this.initResizeDetection(),this.initWatchOpsChange(),this.updateBarStateAndEmitEvent(),this.$nextTick(function(){e._isDestroyed||(e.updateBarStateAndEmitEvent(),e.initVuescrollPosition())},0))},beforeDestroy:function(){this.destroyParentDomResize&&(this.destroyParentDomResize(),this.destroyParentDomResize=null),this.destroyResize&&(this.destroyResize(),this.destroyResize=null)},data:function(){return{vuescroll:{state:{isDragging:!1,isClickingBar:!1,pointerLeave:!0,internalScrollTop:0,internalScrollLeft:0,posX:null,posY:null,refreshStage:"deactive",loadStage:"deactive",height:"100%",width:"100%"}},scrollPanel:{},scrollContent:{},rail:{vRail:{state:{}},hRail:{state:{}}},bar:{vBar:{state:{posValue:0,size:0,opacity:0}},hBar:{state:{posValue:0,size:0,opacity:0}},renderError:!1}}},render:function(e){var t=this;if(t.renderError)return e("div",[[t.$slots.default]]);var i={style:{position:"relative",height:t.vuescroll.state.height,width:t.vuescroll.state.width,padding:0,overflow:"hidden"},class:"vue-scroll"};return isSupportTouch()?i.on={touchstart:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()},touchend:function(){t.vuescroll.state.pointerLeave=!0,t.hideBar()},touchmove:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()}}:i.on={mouseenter:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()},mouseleave:function(){t.vuescroll.state.pointerLeave=!0,t.hideBar()},mousemove:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()}},e("div",i,[createPanel(e,t),createBar(e,t,"vertical"),createBar(e,t,"horizontal")])},computed:{scrollPanelElm:function(){return this.$refs.scrollPanel.$el},scrollContentElm:function(){return this.$refs.scrollContent._isVue?this.$refs.scrollContent.$el:this.$refs.scrollContent},mode:function(){return this.mergedOptions.vuescroll.mode},pullRefreshTip:function(){return this.mergedOptions.vuescroll.pullRefresh.tips[this.vuescroll.state.refreshStage]},pushLoadTip:function(){return this.mergedOptions.vuescroll.pushLoad.tips[this.vuescroll.state.loadStage]},refreshLoad:function(){return this.mergedOptions.vuescroll.pullRefresh.enable||this.mergedOptions.vuescroll.pushLoad.enable},clientWidth:function(){return getClientSizeByType.call(this,"width")},clientHeight:function(){return getClientSizeByType.call(this,"height")}},methods:{updateBarStateAndEmitEvent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("native"==this.mode||"pure-native"==this.mode)this.updateNativeModeBarState();else if("slide"==this.mode){if(!this.scroller)return;this.updateSlideModeBarState()}e&&this.emitEvent(e,t),this.showAndDefferedHideBar()},updateMode:function(){var e=this.vuescroll.state.internalScrollLeft,t=this.vuescroll.state.internalScrollTop;this.destroyScroller&&(this.scroller.stop(),this.destroyScroller(),this.destroyScroller=null),"slide"==this.mode?this.destroyScroller=this.registryScroller():"native"!=this.mode&&"pure-native"!=this.mode||(this.scrollPanelElm.style.transform="",this.scrollPanelElm.style.transformOrigin=""),this.scrollTo({x:e,y:t},!1,!0)},handleScroll:function(e){this.recordCurrentPos(),this.updateBarStateAndEmitEvent("handle-scroll",e)},setBarClick:function(e){this.vuescroll.state.isClickingBar=e},showAndDefferedHideBar:function(){var e=this;this.showBar(),this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0),this.timeoutId=setTimeout(function(){e.timeoutId=0,e.hideBar()},this.mergedOptions.bar.showDelay)},emitEvent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.scrollPanelElm,o=i.scrollHeight,r=i.scrollWidth,l=i.clientHeight,s=i.clientWidth,n=i.scrollTop,a=i.scrollLeft,c={type:"vertical"},h={type:"horizontal"};"slide"==this.mode&&(o=this.scroller.__contentHeight,r=this.scroller.__contentWidth,n=this.scroller.__scrollTop,a=this.scroller.__scrollLeft,l=this.$el.clientHeight,s=this.$el.clientWidth),c.process=Math.min(n/(o-l),1),h.process=Math.min(a/(r-s),1),c.barSize=this.bar.vBar.state.size,h.barSize=this.bar.hBar.state.size,c.scrollTop=n,h.scrollLeft=a,c.directionY=this.vuescroll.state.posY,h.directionX=this.vuescroll.state.posX,this.$emit(e,c,h,t)},showBar:function(){this.bar.vBar.state.opacity=this.mergedOptions.bar.vBar.opacity,this.bar.hBar.state.opacity=this.mergedOptions.bar.hBar.opacity},hideBar:function(){this.vuescroll.state.isDragging||(this.mergedOptions.bar.vBar.keepShow||this.vuescroll.state.isClickingBar||!this.vuescroll.state.pointerLeave||(this.bar.vBar.state.opacity=0),this.mergedOptions.bar.hBar.keepShow||this.vuescroll.state.isClickingBar||!this.vuescroll.state.pointerLeave||(this.bar.hBar.state.opacity=0))},registryResize:function(){var e=this;this.destroyResize&&this.destroyResize();var t=null;"slide"==this.mode||"pure-native"==this.mode?t=this.scrollPanelElm:"native"==this.mode&&(t=this.scrollContentElm);var i=function(){e.updateBarStateAndEmitEvent(),"slide"==e.mode&&e.updateScroller()};window.addEventListener("resize",i,!1);var o=listenResize(t,function(){var t={};"slide"==e.mode?(e.updateScroller(),t.width=e.scroller.__contentWidth,t.height=e.scroller.__contentHeight):"native"!=e.mode&&"pure-native"!=e.mode||(t.width=e.scrollPanelElm.scrollWidth,t.height=e.scrollPanelElm.scrollHeight),e.updateBarStateAndEmitEvent("handle-resize",t)});this.destroyResize=function(){window.removeEventListener("resize",i,!1),o()}},registryParentResize:function(){this.destroyParentDomResize=listenResize(this.$el.parentNode,this.useNumbericSize)},useNumbericSize:function(){var e=this.$el.parentNode,t=e.style.position;t&&"static"!=t||(this.$el.parentNode.style.position="relative"),this.vuescroll.state.height=e.offsetHeight+"px",this.vuescroll.state.width=e.offsetWidth+"px"},usePercentSize:function(){this.vuescroll.state.height="100%",this.vuescroll.state.width="100%"},setVsSize:function(){"number"==this.mergedOptions.vuescroll.sizeStrategy?(this.useNumbericSize(),this.registryParentResize()):"percent"==this.mergedOptions.vuescroll.sizeStrategy&&(this.destroyParentDomResize&&(this.destroyParentDomResize(),this.destroyParentDomResize=null),this.usePercentSize())},recordCurrentPos:function(){var e=this.mode;this.mode!==this.lastMode&&(e=this.lastMode,this.lastMode=this.mode);var t=this.vuescroll.state,i=findValuesByMode(e,this),o=t.internalScrollLeft,r=t.internalScrollTop;t.posX=o-i.x>0?"right":o-i.x<0?"left":null,t.posY=r-i.y>0?"up":r-i.y<0?"down":null,t.internalScrollLeft=i.x,t.internalScrollTop=i.y},initWatchOpsChange:function(){var e=this,t={deep:!0,sync:!0};this.$watch("mergedOptions",function(){e.recordCurrentPos(),setTimeout(function(){if(1==e.isSmallChangeThisTick)return e.isSmallChangeThisTick=!1,void e.updateBarStateAndEmitEvent();e.setVsSize(),e.registryResize(),e.updateMode(),e.updateBarStateAndEmitEvent()},0)},t),smallChangeArray.forEach(function(i){e.$watch(i,function(){e.isSmallChangeThisTick=!0},t)})},scrollToHash:function(){var e=window.location.hash;if(e&&(!(e=e.slice(e.lastIndexOf("#")))||function(e){return/^#[a-zA-Z_]\d*$/.test(e)}(e))){var t=document.querySelector(e);!isChildInParent(t,this.$el)||this.mergedOptions.scrollPanel.initialScrollY||this.mergedOptions.scrollPanel.initialScrollX||this.scrollIntoView(t)}},initVariables:function(){this.lastMode=this.mode,this.$el._isVuescroll=!0},initScroller:function(){"slide"==this.mode&&(this.destroyScroller=this.registryScroller())},initVuescrollSizeType:function(){this.setVsSize()},initResizeDetection:function(){this.registryResize()},initVuescrollPosition:function(){this.scrollToHash()}}},Vuescroll={install:function(e){e.component(vueScrollCore.name,vueScrollCore),e.prototype.$vuescrollConfig=deepMerge(GCF,{})},version:"4.5.33"};"undefined"!=typeof window&&window.Vue&&Vue.use(Vuescroll),module.exports=Vuescroll; \ No newline at end of file diff --git a/dist/vuescroll.esm.js b/dist/vuescroll.esm.js index 2d8d7088..872ce514 100644 --- a/dist/vuescroll.esm.js +++ b/dist/vuescroll.esm.js @@ -2820,7 +2820,7 @@ var bar = { var vm = this; var parentRef = vm.$parent.$refs; var railBackgroundColor = getRgbAColor(vm.ops.rail.background, vm.ops.rail.opacity); - var style = (_style = {}, _defineProperty$1(_style, vm.bar.posName, 0), _defineProperty$1(_style, vm.bar.opsSize, '100%'), _defineProperty$1(_style, vm.bar.size, vm.state.size), _defineProperty$1(_style, 'borderRadius', vm.ops.rail[vm.bar.opsSize]), _defineProperty$1(_style, 'background', vm.ops.bar.background), _defineProperty$1(_style, 'opacity', vm.state.opacity), _defineProperty$1(_style, 'transform', 'translate' + scrollMap[vm.type].axis + '(' + vm.state.posValue + '%)'), _defineProperty$1(_style, 'cursor', 'pointer'), _defineProperty$1(_style, 'position', 'relative'), _defineProperty$1(_style, 'transition', 'opacity .5s'), _defineProperty$1(_style, 'userSelect', 'none'), _style); + var style = (_style = {}, _defineProperty$1(_style, vm.bar.posName, 0), _defineProperty$1(_style, vm.bar.opsSize, '100%'), _defineProperty$1(_style, vm.bar.size, vm.state.size), _defineProperty$1(_style, 'borderRadius', 'inherit'), _defineProperty$1(_style, 'background', vm.ops.bar.background), _defineProperty$1(_style, 'opacity', vm.state.opacity), _defineProperty$1(_style, 'transform', 'translate' + scrollMap[vm.type].axis + '(' + vm.state.posValue + '%)'), _defineProperty$1(_style, 'cursor', 'pointer'), _defineProperty$1(_style, 'position', 'relative'), _defineProperty$1(_style, 'transition', 'opacity .5s'), _defineProperty$1(_style, 'userSelect', 'none'), _style); var bar = { style: style, class: 'vuescroll-' + vm.type + '-bar', @@ -2848,7 +2848,8 @@ var bar = { class: 'vuescroll-' + vm.type + '-rail', style: (_style2 = { position: 'absolute', - borderRadius: vm.ops.rail[vm.bar.opsSize], + zIndex: 1, + // borderRadius: vm.ops.rail[vm.bar.opsSize], background: railBackgroundColor }, _defineProperty$1(_style2, vm.bar.opsSize, vm.ops.rail[vm.bar.opsSize]), _defineProperty$1(_style2, vm.bar.posName, '2px'), _defineProperty$1(_style2, vm.bar.opposName, '2px'), _defineProperty$1(_style2, vm.ops.rail.pos, 0), _style2), on: { diff --git a/dist/vuescroll.esm.min.js b/dist/vuescroll.esm.min.js index 8ff189ba..fc06c23a 100644 --- a/dist/vuescroll.esm.min.js +++ b/dist/vuescroll.esm.min.js @@ -1 +1 @@ -import Vue from"vue";var _typeof="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};function deepCopy(e,t){for(var i in t="object"===(void 0===t?"undefined":_typeof(t))&&t||{},e)t[i]="object"===_typeof(e[i])?deepCopy(e[i],t[i]={}):e[i];return t}function deepMerge(e,t){for(var i in t=t||{},e)"object"===_typeof(e[i])?void 0===t[i]?(t[i]={},deepCopy(e[i],t[i])):deepMerge(e[i],t[i]):void 0===t[i]&&(t[i]=e[i]);return t}function defineReactive(e,t,i,o){var r=null;(i[t]||"function"==typeof i)&&(o=o||t,"function"==typeof i&&(r=i),Object.defineProperty(e,t,{get:r||function(){return i[o]},configurable:!0}))}var scrollBarWidth=void 0;function getGutter(){if(Vue.prototype.$isServer)return 0;if(void 0!==scrollBarWidth)return scrollBarWidth;var e=document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var i=document.createElement("div");i.style.width="100%",e.appendChild(i);var o=i.offsetWidth;return e.parentNode.removeChild(e),scrollBarWidth=t-o}var doneUtil={refreshDomStyle:!1,loadDomStyle:!1,hide:!1};function hideSystemBar(){if(!doneUtil.hide){doneUtil.hide=!0;var e=document.createElement("style");e.type="text/css",e.innerHTML=".vuescroll-panel::-webkit-scrollbar{width:0;height:0}",document.getElementsByTagName("HEAD").item(0).appendChild(e)}}var styleMap={};function createDomStyle(e){if(!doneUtil[e]){doneUtil[e]=!0;var t=document.createElement("style");t.type="text/css",t.innerHTML=styleMap[e],document.getElementsByTagName("HEAD").item(0).appendChild(t)}}function eventCenter(e,t,i){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];"on"==(arguments.length>4&&void 0!==arguments[4]?arguments[4]:"on")?e.addEventListener(t,i,o):e.removeEventListener(t,i,o)}styleMap.refreshDomStyle="\n.vuescroll-refresh {\n position:absolute;\n width: 100%;\n color: black;\n height: 50px;\n text-align: center;\n font-size: 16px;\n line-height: 50px;\n}\n.vuescroll-refresh svg {\n margin-right: 10px;\n width: 25px;\n height: 25px;\n vertical-align: sub;\n}\n.vuescroll-refresh svg path,\n.vuescroll-refresh svg rect{\nfill: #FF6700;\n}\n",styleMap.loadDomStyle="\n.vuescroll-load {\n position:absolute;\n width: 100%;\n color: black;\n height: 50px;\n text-align: center;\n font-size: 16px;\n line-height: 50px;\n}\n.vuescroll-load svg {\n margin-right: 10px;\n width: 25px;\n height: 25px;\n vertical-align: sub;\n}\n.vuescroll-load svg path,\n.vuescroll-load svg rect{\nfill: #FF6700;\n}\n";var error=function(e){console.error("[vuescroll] "+e)},warn=function(e){console.warn("[vuescroll] "+e)};function isChildInParent(e,t){var i=!1;if(!e||!t)return i;for(;e.parentNode!==t&&9!==e.parentNode.nodeType&&!e.parentNode._isVuescroll;)e=e.parentNode;return e.parentNode==t&&(i=!0),i}var pxValueReg=/(.*?)px/;function extractNumberFromPx(e){var t=pxValueReg.exec(e);return t&&t[1]}function isSupportTouch(){return"ontouchstart"in window}function getPrefix(e){var t,i=document.documentElement.style;return e.opera&&"[object Opera]"===Object.prototype.toString.call(opera)?t="presto":"MozAppearance"in i?t="gecko":"WebkitAppearance"in i?t="webkit":"string"==typeof navigator.cpuClass&&(t="trident"),{trident:"ms",gecko:"moz",webkit:"webkit",presto:"O"}[t]}function isSupportGivenStyle(e,t){var i="-"+getPrefix(window)+"-"+t,o=document.createElement("div");return o.style[e]=i,o.style[e]==i&&i}function listenResize(e,t){return injectObject(e,t)}function injectObject(e,t){if(!e.hasResized){var i=document.createElement("object");return e.hasResized=!0,i.style.cssText="display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; padding: 0; margin: 0; opacity: 0; z-index: -1000; pointer-events: none;",i.tabIndex=-1,i.type="text/html",i.data="about:blank",i.isResizeElm=!0,i.onload=function(){eventCenter(i.contentDocument.defaultView,"resize",t)},e.appendChild(i),function(){i.contentDocument&&eventCenter(i.contentDocument.defaultView,"resize",t,"off"),e.removeChild(i),e.hasResized=!1}}}var modes=["slide","native","pure-native"],NOOP=function(){},smallChangeArray=["mergedOptions.vuescroll.pullRefresh.tips","mergedOptions.vuescroll.pushLoad.tips","mergedOptions.rail","mergedOptions.bar"],GCF={vuescroll:{mode:"native",sizeStrategy:"percent",pullRefresh:{enable:!1,tips:{deactive:"Pull to Refresh",active:"Release to Refresh",start:"Refreshing...",beforeDeactive:"Refresh Successfully!"}},pushLoad:{enable:!1,tips:{deactive:"Push to Load",active:"Release to Load",start:"Loading...",beforeDeactive:"Load Successfully!"}},paging:!1,zooming:!0,snapping:{enable:!1,width:100,height:100},scroller:{bouncing:!0,locking:!0,minZoom:.5,maxZoom:3,speedMultiplier:1,penetrationDeceleration:.03,penetrationAcceleration:.08,preventDefault:!0}},scrollPanel:{initialScrollY:!1,initialScrollX:!1,scrollingX:!0,scrollingY:!0,speed:300,easing:void 0},scrollContent:{tag:"div",padding:!1,props:{},attrs:{}},rail:{vRail:{width:"6px",pos:"right",background:"#01a99a",opacity:0},hRail:{height:"6px",pos:"bottom",background:"#01a99a",opacity:0}},bar:{showDelay:500,vBar:{background:"#00a650",keepShow:!1,opacity:1,hover:!1},hBar:{background:"#00a650",keepShow:!1,opacity:1,hover:!1}}};function validateOptions(e){var t=!1,i=e.vuescroll,o=e.scrollPanel;~modes.indexOf(i.mode)||(error('The vuescroll\'s option "mode" should be one of the '+modes),t=!0),i.paging==i.snapping.enable&&i.paging&&(i.pullRefresh||i.pushLoad)&&error("paging, snapping, (pullRefresh with pushLoad) can only one of them to be true.");var r=o.initialScrollY,l=o.initialScrollX;return r&&!String(r).match(/^\d+(\.\d+)?(%)?$/)&&error("The prop `initialScrollY` should be a percent number like 10% or an exact number that greater than or equal to 0 like 100."),l&&!String(l).match(/^\d+(\.\d+)?(%)?$/)&&error("The prop `initialScrollX` should be a percent number like 10% or an exact number that greater than or equal to 0 like 100."),t}function hackPropsData(){var e=this;if("vueScroll"===e.$options.name){var t=deepMerge(e.$vuescrollConfig,{}),i=deepMerge(GCF,t);e.$options.propsData.ops=e.$options.propsData.ops||{},Object.keys(e.$options.propsData.ops).forEach(function(t){defineReactive(e.mergedOptions,t,e.$options.propsData.ops)}),deepMerge(i,e.mergedOptions);defineReactive(e.mergedOptions.scrollContent,"paddPos",function(){return"padding-"+e.mergedOptions.rail.vRail.pos}),defineReactive(e.mergedOptions.scrollContent,"paddValue",function(){return e.mergedOptions.rail.vRail.width})}}var hackLifecycle={data:function(){return{shouldStopRender:!1,mergedOptions:{vuescroll:{},scrollPanel:{},scrollContent:{},rail:{},bar:{}}}},created:function(){hackPropsData.call(this),this.renderError=validateOptions(this.mergedOptions)}};function createEasingFunction(e,t){return function(i){return t(e,i)}}function easingPattern(e,t){var i=null;return"easeInQuad"===e&&(i=t*t),"easeOutQuad"===e&&(i=t*(2-t)),"easeInOutQuad"===e&&(i=t<.5?2*t*t:(4-2*t)*t-1),"easeInCubic"===e&&(i=t*t*t),"easeOutCubic"===e&&(i=--t*t*t+1),"easeInOutCubic"===e&&(i=t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1),"easeInQuart"===e&&(i=t*t*t*t),"easeOutQuart"===e&&(i=1- --t*t*t*t),"easeInOutQuart"===e&&(i=t<.5?8*t*t*t*t:1-8*--t*t*t*t),"easeInQuint"===e&&(i=t*t*t*t*t),"easeOutQuint"===e&&(i=1+--t*t*t*t*t),"easeInOutQuint"===e&&(i=t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t),i||t}function requestAnimationFrame(e){var t=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame,i=!!t;if(t&&!/requestAnimationFrame\(\)\s*\{\s*\[native code\]\s*\}/i.test(t.toString())&&(i=!1),i)return function(e,i){t(e,i)};var o={},r=1,l=null,s=+new Date;return function(e){var t=r++;return o[t]=e,requestCount++,null===l&&(l=setInterval(function(){var e=+new Date,t=o;for(var i in o={},requestCount=0,t)t.hasOwnProperty(i)&&(t[i](e),s=e);e-s>2500&&(clearInterval(l),l=null)},1e3/60)),t}}var time=Date.now||function(){return+new Date},desiredFrames=60,millisecondsPerSecond=1e3,running={},counter=1,core={effect:{}},global=null;function getNumericValue(e,t){var i=void 0;return i=(i=/(-?\d+(?:\.\d+?)?)%$/.exec(e))?t*(i=i[1]-0)/100:e-0}function goScrolling(e,t,i,o,r,l){var s=e.scrollTop,n=e.scrollLeft,a=n,c=s;s+i<0&&(i=-s);var h=e.scrollHeight;s+i>h&&(i=h-s),n+t<0&&(t=-n),n+t>e.scrollWidth&&(t=e.scrollWidth-n);var u=createEasingFunction(r,easingPattern);core.effect.Animate.start(function(o){a=n+t*o,c=s+i*o,e.scrollTop=Math.floor(c),e.scrollLeft=Math.floor(a)},function(){return Math.abs(c-s)<=Math.abs(i)||Math.abs(a-n)<=Math.abs(t)},l,o,u)}global="undefined"!=typeof window?window:{},core.effect.Animate={requestAnimationFrame:requestAnimationFrame(global),stop:function(e){var t=null!=running[e];return t&&(running[e]=null),t},isRunning:function(e){return null!=running[e]},start:function(e,t,i,o,r,l){var s=time(),n=s,a=0,c=0,h=counter++;if(l||(l=document.body),h%20==0){var u={};for(var _ in running)u[_]=!0;running=u}return running[h]=!0,core.effect.Animate.requestAnimationFrame(function u(_){var d=!0!==_,p=time();if(!running[h]||t&&!t(h))return running[h]=null,void(i&&i(desiredFrames-c/((p-s)/millisecondsPerSecond),h,!1));if(d)for(var f=Math.round((p-n)/(millisecondsPerSecond/desiredFrames))-1,m=0;m1&&(a=1);var v=r?r(a):a;!1!==e(v,p,d)&&1!==a||!d?d&&(n=p,core.effect.Animate.requestAnimationFrame(u,l)):(running[h]=null,i&&i(desiredFrames-c/((p-s)/millisecondsPerSecond),h,1===a||null==o))},l),h}};var api={methods:{scrollTo:function(e){var t=e.x,i=e.y,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=void 0===t?this.vuescroll.state.internalScrollLeft||0:getNumericValue(t,this.scrollPanelElm.scrollWidth),i=void 0===i?this.vuescroll.state.internalScrollTop||0:getNumericValue(i,this.scrollPanelElm.scrollHeight),this.internalScrollTo(t,i,o,r)},scrollBy:function(e){var t=e.dx,i=void 0===t?0:t,o=e.dy,r=void 0===o?0:o,l=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=this.vuescroll.state,n=s.internalScrollLeft,a=void 0===n?0:n,c=s.internalScrollTop,h=void 0===c?0:c;i&&(a+=getNumericValue(i,this.scrollPanelElm.scrollWidth)),r&&(h+=getNumericValue(r,this.scrollPanelElm.scrollHeight)),this.internalScrollTo(a,h,l)},zoomBy:function(e,t,i,o,r){"slide"==this.mode?this.scroller.zoomBy(e,t,i,o,r):warn("zoomBy and zoomTo are only for slide mode!")},zoomTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments[2],o=arguments[3],r=arguments[4];"slide"==this.mode?this.scroller.zoomTo(e,t,i,o,r):warn("zoomBy and zoomTo are only for slide mode!")},getCurrentPage:function(){if("slide"==this.mode&&this.mergedOptions.vuescroll.paging)return this.scroller.getCurrentPage();warn("getCurrentPage and goToPage are only for slide mode and paging is enble!")},goToPage:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];"slide"==this.mode&&this.mergedOptions.vuescroll.paging?this.scroller.goToPage(e,t):warn("getCurrentPage and goToPage are only for slide mode and paging is enble!")},triggerRefreshOrLoad:function(e){if("slide"==this.mode){var t=this.mergedOptions.vuescroll.pullRefresh.enable,i=this.mergedOptions.vuescroll.pushLoad.enable;if("refresh"!=e||t)if("load"!=e||i)if("refresh"===e||"load"===e){if("start"!=this.vuescroll.state[e+"Stage"])return this.scroller.triggerRefreshOrLoad(e),!0}else warn("param must be one of load and refresh!");else warn("load must be enabled!");else warn("refresh must be enabled!")}else warn("You can only use triggerRefreshOrLoad in slide mode!")},getCurrentviewDom:function(){for(var e=this,t=("slide"==this.mode||"pure-native"==this.mode?this.scrollPanelElm:this.scrollContentElm).children,i=[],o=function(t){var i=t.getBoundingClientRect(),o=i.left,r=i.top,l=i.width,s=i.height,n=e.$el.getBoundingClientRect(),a=n.left,c=n.top,h=n.height,u=n.width;return o-a+l>0&&o-a0&&r-c1&&void 0!==arguments[1])||arguments[1],i=this.$el;if("string"==typeof e&&(e=i.querySelector(e)),isChildInParent(e,i)){var o=this.$el.getBoundingClientRect(),r=o.left,l=o.top,s=e.getBoundingClientRect(),n=r-s.left,a=l-s.top;this.scrollBy({dx:-n,dy:-a},t)}else warn("The element or selector you passed is not the element of Vuescroll, please pass the element that is in Vuescroll to scrollIntoView API. ")}}},nativeMode={methods:{updateNativeModeBarState:function(){var e=this.scrollPanelElm,t=this.$el,i="percent"==this.mergedOptions.vuescroll.sizeStrategy,o=i?t.clientWidth:extractNumberFromPx(this.vuescroll.state.width),r=i?t.clientHeight:extractNumberFromPx(this.vuescroll.state.height),l=100*r/e.scrollHeight,s=100*o/e.scrollWidth;this.bar.vBar.state.posValue=100*e.scrollTop/r,this.bar.hBar.state.posValue=100*e.scrollLeft/o,this.bar.vBar.state.size=l<100?l+"%":0,this.bar.hBar.state.size=s<100?s+"%":0}}},animatingMethod=null,noAnimatingMethod=null;function Scroller(e,t){for(var i in this.__callback=e,this.options={scrollingX:!0,scrollingY:!0,animating:!0,animationDuration:250,bouncing:!0,locking:!0,paging:!1,snapping:!1,zooming:!1,minZoom:.5,maxZoom:3,speedMultiplier:1,scrollingComplete:NOOP,animatingEasing:"easeOutCubic",noAnimatingEasing:"easeInOutCubic",penetrationDeceleration:.03,penetrationAcceleration:.08},t)this.options[i]=t[i];animatingMethod=createEasingFunction(this.options.animatingEasing,easingPattern),noAnimatingMethod=createEasingFunction(this.options.noAnimatingEasing,easingPattern)}var members={__isSingleTouch:!1,__isTracking:!1,__didDecelerationComplete:!1,__isGesturing:!1,__isDragging:!1,__isDecelerating:!1,__isAnimating:!1,__clientLeft:0,__clientTop:0,__clientWidth:0,__clientHeight:0,__contentWidth:0,__contentHeight:0,__snapWidth:100,__snapHeight:100,__refreshHeight:null,__loadHeight:null,__refreshActive:!1,__refreshActivate:null,__refreshBeforeDeactivate:null,__refreshDeactivate:null,__refreshStart:null,__loadActive:null,__loadActivate:null,__loadBeforeDeactivate:null,__loadDeactivate:null,__loadStart:null,__zoomLevel:1,__scrollLeft:0,__scrollTop:0,__maxScrollLeft:0,__maxScrollTop:0,__scheduledLeft:0,__scheduledTop:0,__scheduledZoom:0,__currentPageX:null,__currentPageY:null,__totalXPage:null,__totalYPage:null,__disable:!1,__lastTouchLeft:null,__lastTouchTop:null,__lastTouchMove:null,__positions:null,__minDecelerationScrollLeft:null,__minDecelerationScrollTop:null,__maxDecelerationScrollLeft:null,__maxDecelerationScrollTop:null,__decelerationVelocityX:null,__decelerationVelocityY:null,setDimensions:function(e,t,i,o){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:trye;e===+e&&(this.__clientWidth=e),t===+t&&(this.__clientHeight=t),i===+i&&(this.__contentWidth=i),o===+o&&(this.__contentHeight=o),this.__computeScrollMax(),this.scrollTo(this.__scrollLeft,this.__scrollTop,r)},setPosition:function(e,t){this.__clientLeft=e||0,this.__clientTop=t||0},setSnapSize:function(e,t){this.__snapWidth=e,this.__snapHeight=t},activatePullToRefresh:function(e,t){var i=t.activateCallback,o=t.deactivateCallback,r=t.startCallback,l=t.beforeDeactivateCallback;this.__refreshHeight=e,this.__refreshActivate=i,this.__refreshBeforeDeactivate=l,this.__refreshDeactivate=o,this.__refreshStart=r},activatePushToLoad:function(e,t){var i=t.activateCallback,o=t.deactivateCallback,r=t.startCallback,l=t.beforeDeactivateCallback;this.__loadHeight=e,this.__loadActivate=i,this.__loadBeforeDeactivate=l,this.__loadDeactivate=o,this.__loadStart=r},triggerRefreshOrLoad:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"refresh",t=this.__isDecelerating;t&&(core.effect.Animate.stop(t),this.__isDecelerating=!1),"refresh"==e?(this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0),this.__refreshStart&&(this.__refreshStart(),this.__refreshActive=!0)):(this.__publish(this.__scrollLeft,this.__maxScrollTop+this.__loadHeight,this.__zoomLevel,!0),this.__loadStart&&(this.__loadStart(),this.__loadActive=!0))},finishRefreshOrLoad:function(){var e=this;e.__refreshBeforeDeactivate&&e.__refreshActive?(e.__refreshActive=!1,e.__refreshBeforeDeactivate(function(){e.__refreshDeactivate&&e.__refreshDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)})):e.__refreshDeactivate&&e.__refreshActive&&(e.__refreshActive=!1,e.__refreshDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)),e.__loadBeforeDeactivate&&e.__loadActive?(e.__loadActive=!1,e.__loadBeforeDeactivate(function(){e.__loadDeactivate&&e.__loadDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)})):e.__loadDeactivate&&e.__loadActive&&(e.__loadActive=!1,e.__loadDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0))},getValues:function(){return{left:this.__scrollLeft,top:this.__scrollTop,zoom:this.__zoomLevel}},getScrollMax:function(){return{left:this.__maxScrollLeft,top:this.__maxScrollTop}},zoomTo:function(e,t,i,o,r){if(!this.options.zooming)throw new Error("Zooming is not enabled!");r&&(this.__zoomComplete=r),this.__isDecelerating&&(core.effect.Animate.stop(this.__isDecelerating),this.__isDecelerating=!1);var l=this.__zoomLevel;null==i&&(i=this.__clientWidth/2),null==o&&(o=this.__clientHeight/2),e=Math.max(Math.min(e,this.options.maxZoom),this.options.minZoom),this.__computeScrollMax(e);var s=(i+this.__scrollLeft)*e/l-i,n=(o+this.__scrollTop)*e/l-o;s>this.__maxScrollLeft?s=this.__maxScrollLeft:s<0&&(s=0),n>this.__maxScrollTop?n=this.__maxScrollTop:n<0&&(n=0),this.__publish(s,n,e,t)},zoomBy:function(e,t,i,o,r){this.zoomTo(this.__zoomLevel*e,t,i,o,r)},scrollTo:function(e,t,i,o,r){if(this.__isDecelerating&&(core.effect.Animate.stop(this.__isDecelerating),this.__isDecelerating=!1),null!=o&&o!==this.__zoomLevel){if(!this.options.zooming)throw new Error("Zooming is not enabled!");e*=o,t*=o,this.__computeScrollMax(o)}else o=this.__zoomLevel;this.options.scrollingX||r?this.options.paging?e=Math.round(e/this.__clientWidth)*this.__clientWidth:this.options.snapping&&(e=Math.round(e/this.__snapWidth)*this.__snapWidth):e=this.__scrollLeft,this.options.scrollingY||r?this.options.paging?t=Math.round(t/this.__clientHeight)*this.__clientHeight:this.options.snapping&&(t=Math.round(t/this.__snapHeight)*this.__snapHeight):t=this.__scrollTop,e=Math.max(Math.min(this.__maxScrollLeft,e),0),t=Math.max(Math.min(this.__maxScrollTop,t),0),e===this.__scrollLeft&&t===this.__scrollTop&&(i=!1),this.__isTracking||this.__publish(e,t,o,i)},scrollBy:function(e,t,i){var o=this.__isAnimating?this.__scheduledLeft:this.__scrollLeft,r=this.__isAnimating?this.__scheduledTop:this.__scrollTop;this.scrollTo(o+(e||0),r+(t||0),i)},getCurrentPage:function(){return this.__computePage(),{x:this.__currentPageX,y:this.__currentPageY}},goToPage:function(e,t){var i=e.x,o=e.y;isNaN(i)&&(i=1),isNaN(o)&&(o=1),this.scrollTo((i-1)*this.__clientWidth,(o-1)*this.__clientHeight,t)},doMouseZoom:function(e,t,i,o){var r=e>0?.97:1.03;return this.zoomTo(this.__zoomLevel*r,!1,i-this.__clientLeft,o-this.__clientTop)},doTouchStart:function(e,t){if(null==e.length)throw new Error("Invalid touch list: "+e);if(t instanceof Date&&(t=t.valueOf()),"number"!=typeof t)throw new Error("Invalid timestamp value: "+t);var i,o;this.__interruptedAnimation=!0,this.__isDecelerating&&(core.effect.Animate.stop(this.__isDecelerating),this.__isDecelerating=!1,this.__interruptedAnimation=!0),this.__isAnimating&&(core.effect.Animate.stop(this.__isAnimating),this.__isAnimating=!1,this.__interruptedAnimation=!0);var r=1===e.length;r?(i=e[0].pageX,o=e[0].pageY):(i=Math.abs(e[0].pageX+e[1].pageX)/2,o=Math.abs(e[0].pageY+e[1].pageY)/2),this.__initialTouchLeft=i,this.__initialTouchTop=o,this.__zoomLevelStart=this.__zoomLevel,this.__lastTouchLeft=i,this.__lastTouchTop=o,this.__lastTouchMove=t,this.__lastScale=1,this.__enableScrollX=!r&&this.options.scrollingX,this.__enableScrollY=!r&&this.options.scrollingY,this.__isTracking=!0,this.__didDecelerationComplete=!1,this.__isDragging=!r,this.__isSingleTouch=r,this.__positions=[]},doTouchMove:function(e,t,i){if(null==e.length)throw new Error("Invalid touch list: "+e);if(t instanceof Date&&(t=t.valueOf()),"number"!=typeof t)throw new Error("Invalid timestamp value: "+t);if(this.__isTracking){var o,r;2===e.length?(o=Math.abs(e[0].pageX+e[1].pageX)/2,r=Math.abs(e[0].pageY+e[1].pageY)/2):(o=e[0].pageX,r=e[0].pageY);var l=this.__positions;if(this.__isDragging){var s=o-this.__lastTouchLeft,n=r-this.__lastTouchTop,a=this.__scrollLeft,c=this.__scrollTop,h=this.__zoomLevel;if(null!=i&&this.options.zooming){var u=h;if(h=h/this.__lastScale*i,u!==(h=Math.max(Math.min(h,this.options.maxZoom),this.options.minZoom))){var _=o-this.__clientLeft,d=r-this.__clientTop;a=(_+a)*h/u-_,c=(d+c)*h/u-d,this.__computeScrollMax(h)}}if(this.__enableScrollX){a-=s*this.options.speedMultiplier;var p=this.__maxScrollLeft;(a>p||a<0)&&(this.options.bouncing?a+=s/2*this.options.speedMultiplier:a=a>p?p:0)}if(this.__enableScrollY){c-=n*this.options.speedMultiplier;var f=this.__maxScrollTop;(c>f||c<0)&&(this.options.bouncing?(c+=n/2*this.options.speedMultiplier,this.__enableScrollX||null==this.__refreshHeight&&null==this.__loadHeight||(!this.__refreshActive&&c<=-this.__refreshHeight?(this.__refreshActive=!0,this.__refreshActivate&&this.__refreshActivate()):this.__refreshActive&&c>-this.__refreshHeight?(this.__refreshActive=!1,this.__refreshDeactivate&&this.__refreshDeactivate()):!this.__loadActive&&c>=this.__maxScrollTop+this.__loadHeight?(this.__loadActive=!0,this.__loadActivate&&this.__loadActivate()):this.__refreshActive&&cf?f:0)}l.length>60&&l.splice(0,30),l.push(a,c,t),this.__publish(a,c,h)}else{var m=this.options.locking?3:0,v=Math.abs(o-this.__initialTouchLeft),g=Math.abs(r-this.__initialTouchTop);this.__enableScrollX=this.options.scrollingX&&v>=m,this.__enableScrollY=this.options.scrollingY&&g>=m,l.push(this.__scrollLeft,this.__scrollTop,t),this.__isDragging=(this.__enableScrollX||this.__enableScrollY)&&(v>=5||g>=5),this.__isDragging&&(this.__interruptedAnimation=!1)}this.__lastTouchLeft=o,this.__lastTouchTop=r,this.__lastTouchMove=t,this.__lastScale=i}},doTouchEnd:function(e){if(e instanceof Date&&(e=e.valueOf()),"number"!=typeof e)throw new Error("Invalid timestamp value: "+e);if(this.__isTracking){if(this.__isTracking=!1,this.__isDragging)if(this.__isDragging=!1,this.__isSingleTouch&&this.options.animating&&e-this.__lastTouchMove<=100){for(var t=this.__positions,i=t.length-1,o=i,r=i;r>0&&t[r]>this.__lastTouchMove-100;r-=3)o=r;if(o!==i){var l=t[i]-t[o],s=this.__scrollLeft-t[o-2],n=this.__scrollTop-t[o-1];this.__decelerationVelocityX=s/l*(1e3/60),this.__decelerationVelocityY=n/l*(1e3/60);var a=this.options.paging||this.options.snapping?4:1;Math.abs(this.__decelerationVelocityX)>a||Math.abs(this.__decelerationVelocityY)>a?this.__refreshActive||this.__loadActive||this.__startDeceleration(e):this.__scrollComplete()}else this.__scrollComplete()}else e-this.__lastTouchMove>100&&this.__scrollComplete();this.__isDecelerating||(this.__refreshActive&&this.__refreshStart?(this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0),this.__refreshStart&&this.__refreshStart()):this.__loadActive&&this.__loadStart?(this.__publish(this.__scrollLeft,this.__maxScrollTop+this.__loadHeight,this.__zoomLevel,!0),this.__loadStart&&this.__loadStart()):((this.__interruptedAnimation||this.__isDragging)&&this.__scrollComplete(),this.scrollTo(this.__scrollLeft,this.__scrollTop,!0,this.__zoomLevel),this.__refreshActive?(this.__refreshActive=!1,this.__refreshDeactivate&&this.__refreshDeactivate()):this.__loadActive&&(this.__loadActive=!1,this.__loadDeactivate&&this.__loadDeactivate()))),this.__positions.length=0}},onScroll:NOOP,stop:function(){this.__disable=!0},start:function(){self.__disable=!0},__publish:function(e,t,i,o){var r=this;if(!r.__disable){isNaN(e)&&(e=this.__scrollLeft),isNaN(t)&&(t=this.__scrollTop);var l=r.__isAnimating;if(l&&(core.effect.Animate.stop(l),r.__isAnimating=!1),o&&r.options.animating){r.__scheduledLeft=e,r.__scheduledTop=t,r.__scheduledZoom=i;var s=r.__scrollLeft,n=r.__scrollTop,a=r.__zoomLevel,c=e-s,h=t-n,u=i-a;r.__isAnimating=core.effect.Animate.start(function(e,t,i){i&&(r.__scrollLeft=s+c*e,r.__scrollTop=n+h*e,r.__zoomLevel=a+u*e,r.__callback&&(r.__callback(r.__scrollLeft,r.__scrollTop,r.__zoomLevel),r.onScroll()))},function(e){return r.__isAnimating===e},function(e,t,i){t===r.__isAnimating&&(r.__isAnimating=!1),(r.__didDecelerationComplete||i)&&r.__scrollComplete(),r.options.zooming&&(r.__computeScrollMax(),r.__zoomComplete&&(r.__zoomComplete(),r.__zoomComplete=null))},r.options.animationDuration,l?animatingMethod:noAnimatingMethod)}else r.__scheduledLeft=r.__scrollLeft=e,r.__scheduledTop=r.__scrollTop=t,r.__scheduledZoom=r.__zoomLevel=i,r.__callback&&(r.__callback(e,t,i),r.onScroll()),r.options.zooming&&(r.__computeScrollMax(),r.__zoomComplete&&(r.__zoomComplete(),r.__zoomComplete=null))}},__computeScrollMax:function(e){null==e&&(e=this.__zoomLevel),this.__maxScrollLeft=Math.max(this.__contentWidth*e-this.__clientWidth,0),this.__maxScrollTop=Math.max(this.__contentHeight*e-this.__clientHeight,0)},__computePage:function(){var e=this.__clientWidth,t=this.__clientHeight,i=this.__scrollLeft,o=this.__scrollTop;this.__totalXPage=Math.ceil(this.__contentWidth/e),this.__currentPageX=Math.ceil(i/e+1),this.__totalYPage=Math.ceil(this.__contentHeight/t),this.__currentPageY=Math.ceil(o/t+1)},__scrollComplete:function(){this.options.scrollingComplete()},__startDeceleration:function(){var e=this;if(e.options.paging){var t=Math.max(Math.min(e.__scrollLeft,e.__maxScrollLeft),0),i=Math.max(Math.min(e.__scrollTop,e.__maxScrollTop),0),o=e.__clientWidth,r=e.__clientHeight;e.__minDecelerationScrollLeft=Math.floor(t/o)*o,e.__minDecelerationScrollTop=Math.floor(i/r)*r,e.__maxDecelerationScrollLeft=Math.ceil(t/o)*o,e.__maxDecelerationScrollTop=Math.ceil(i/r)*r}else e.__minDecelerationScrollLeft=0,e.__minDecelerationScrollTop=0,e.__maxDecelerationScrollLeft=e.__maxScrollLeft,e.__maxDecelerationScrollTop=e.__maxScrollTop;var l=e.options.snapping?4:.001;e.__isDecelerating=core.effect.Animate.start(function(t,i,o){e.__stepThroughDeceleration(o)},function(){var t=Math.abs(e.__decelerationVelocityX)>=l||Math.abs(e.__decelerationVelocityY)>=l;return t||(e.__didDecelerationComplete=!0),t},function(){e.__isDecelerating&&(e.__isDecelerating=!1,e.__didDecelerationComplete&&e.__scrollComplete(),e.scrollTo(e.__scrollLeft,e.__scrollTop,e.options.snapping))})},__stepThroughDeceleration:function(e){var t=this.__scrollLeft+this.__decelerationVelocityX,i=this.__scrollTop+this.__decelerationVelocityY;if(!this.options.bouncing){var o=Math.max(Math.min(this.__maxDecelerationScrollLeft,t),this.__minDecelerationScrollLeft);o!==t&&(t=o,this.__decelerationVelocityX=0);var r=Math.max(Math.min(this.__maxDecelerationScrollTop,i),this.__minDecelerationScrollTop);r!==i&&(i=r,this.__decelerationVelocityY=0)}if(e?this.__publish(t,i,this.__zoomLevel):(this.__scrollLeft=t,this.__scrollTop=i),!this.options.paging){this.__decelerationVelocityX*=.95,this.__decelerationVelocityY*=.95}if(this.options.bouncing){var l=0,s=0,n=this.options.penetrationDeceleration,a=this.options.penetrationAcceleration;tthis.__maxDecelerationScrollLeft&&(l=this.__maxDecelerationScrollLeft-t),ithis.__maxDecelerationScrollTop&&(s=this.__maxDecelerationScrollTop-i),0!==l&&(l*this.__decelerationVelocityX<=0?this.__decelerationVelocityX+=l*n:this.__decelerationVelocityX=l*a),0!==s&&(s*this.__decelerationVelocityY<=0?this.__decelerationVelocityY+=s*n:this.__decelerationVelocityY=s*a)}}};for(var key in members)Scroller.prototype[key]=members[key];function _defineProperty(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function render(e,t,i,o){var r=null,l=null;"string"==typeof e&&(l="vertical"==e?(r=0)||o:(r=o)&&0);var s=getPrefix(t),n=document.createElement("div"),a=s+"Perspective";return void 0!==n.style[a]?"string"==typeof e?_defineProperty({},"transform","translate3d("+r+i+","+l+i+",0)"):function(t,o,r){e.style.transform="translate3d("+-t+i+","+-o+i+",0) scale("+r+")"}:void 0!==n.style.transform?"string"==typeof e?_defineProperty({},"transform","translate("+r+i+","+l+i+")"):function(t,o,r){e.style.transform="translate("+-t+i+","+-o+i+") scale("+r+")"}:void 0}function listenContainer(e,t,i,o,r){var l=null;function s(e){e.touches[0]&&e.touches[0].target&&e.touches[0].target.tagName.match(/input|textarea|select/i)||(i("mousedown"),t.doTouchStart(e.touches,e.timeStamp),r&&e.preventDefault(),document.addEventListener("touchmove",n,{passive:!1}))}function n(e){i("mousemove"),t.doTouchMove(e.touches,e.timeStamp,e.scale),e.preventDefault()}function a(e){i("mouseup"),t.doTouchEnd(e.timeStamp),document.removeEventListener("touchmove",n)}function c(e){t.doTouchEnd(e.timeStamp)}function h(e){e.target.tagName.match(/input|textarea|select/i)||(i("mousedown"),t.doTouchStart([{pageX:e.pageX,pageY:e.pageY}],e.timeStamp),r&&e.preventDefault(),p=!0)}function u(e){p&&(i("mousemove"),t.doTouchMove([{pageX:e.pageX,pageY:e.pageY}],e.timeStamp),p=!0)}function _(e){p&&(i("mouseup"),t.doTouchEnd(e.timeStamp),p=!1)}function d(e){t.doMouseZoom(e.detail?-120*e.detail:e.wheelDelta,e.timeStamp,e.pageX,e.pageY)}if("ontouchstart"in window)e.addEventListener("touchstart",s,!1),document.addEventListener("touchend",a,!1),document.addEventListener("touchcancel",c,!1),l=function(){e.removeEventListener("touchstart",s,!1),document.removeEventListener("touchend",a,!1),document.removeEventListener("touchcancel",c,!1)};else{var p=!1;e.addEventListener("mousedown",h,!1),document.addEventListener("mousemove",u,!1),document.addEventListener("mouseup",_,!1),o&&e.addEventListener(navigator.userAgent.indexOf("Firefox")>-1?"DOMMouseScroll":"mousewheel",d,!1),l=function(){e.removeEventListener("mousedown",h,!1),document.removeEventListener("mousemove",u,!1),document.removeEventListener("mouseup",_,!1),e.removeEventListener(navigator.userAgent.indexOf("Firefox")>-1?"DOMMouseScroll":"mousewheel",d,!1)}}return t.onScroll=function(){i("onscroll")},l}var _extends=Object.assign||function(e){for(var t=1;to.__maxScrollLeft&&(r=o.__scrollLeft-o.__maxScrollLeft)),u&&(o.__scrollTop<0?l=-o.__scrollTop:o.__scrollTop>o.__maxScrollTop&&(l=o.__scrollTop-o.__maxScrollTop)),e=100*n/(c+l),t=100*s/(a+r);var _=Math.min(Math.max(0,o.__scrollTop),o.__maxScrollTop),d=Math.min(Math.max(0,o.__scrollLeft),o.__maxScrollLeft);this.bar.vBar.state.posValue=100*(_+l)/i.clientHeight,this.bar.hBar.state.posValue=100*(d+r)/i.clientWidth,o.__scrollLeft<0&&(this.bar.hBar.state.posValue=0),o.__scrollTop<0&&(this.bar.vBar.state.posValue=0),this.bar.vBar.state.size=e<100?e+"%":0,this.bar.hBar.state.size=t<100?t+"%":0},registryEvent:function(e){var t="refresh"==e?"refreshDom":"loadDom",i="refresh"==e?this.scroller.activatePullToRefresh:this.scroller.activatePushToLoad,o="refresh"==e?"refreshStage":"loadStage",r=this.$refs[t].elm||this.$refs[t],l=createStateCallbacks(e,o,this,r),s=r.offsetHeight;i.bind(this.scroller)(s,l)}}},scrollMap={vertical:{bar:{size:"height",opsSize:"width",posName:"top",opposName:"bottom",page:"pageY",scroll:"scrollTop",scrollSize:"scrollHeight",offset:"offsetHeight",client:"clientY"},axis:"Y"},horizontal:{bar:{size:"width",opsSize:"height",posName:"left",opposName:"right",page:"pageX",scroll:"scrollLeft",scrollSize:"scrollWidth",offset:"offsetWidth",client:"clientX"},axis:"X"}};function _defineProperty$1(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var colorCache={},rgbReg=/rgb\(/,extractRgbColor=/rgb\((.*)\)/;function createMouseEvent(e){function t(t){if(e.axisStartPos){var i=(t[e.bar.client]-e.$el.getBoundingClientRect()[e.bar.posName]-e.axisStartPos)/e.$el[e.bar.offset];e.$parent.scrollTo(_defineProperty$1({},e.axis.toLowerCase(),e.parent.scrollPanel.$el[e.bar.scrollSize]*i),!1)}}function i(){e.$emit("setBarClick",!1),document.onselectstart=null,e.$parent.hideBar(),e.axisStartPos=0,eventCenter(document,"mousemove",t,"off"),eventCenter(document,"mouseup",i,"off")}return function(o){o.stopImmediatePropagation(),document.onselectstart=function(){return!1},e.axisStartPos=o[e.bar.client]-e.$refs.inner.getBoundingClientRect()[e.bar.posName],e.$emit("setBarClick",!0),eventCenter(document,"mousemove",t),eventCenter(document,"mouseup",i)}}function createTouchEvent(e){function t(t){if(e.axisStartPos){var i=(t.touches[0][e.bar.client]-e.$el.getBoundingClientRect()[e.bar.posName]-e.axisStartPos)/e.$el[e.bar.offset];e.$parent.scrollTo(_defineProperty$1({},e.axis.toLowerCase(),e.parent.scrollPanel.$el[e.bar.scrollSize]*i),!1)}}function i(){e.$emit("setBarClick",!1),document.onselectstart=null,e.$parent.hideBar(),e.axisStartPos=0,eventCenter(document,"touchmove",t,"off"),eventCenter(document,"touchend",i,"off")}return function(o){o.stopImmediatePropagation(),o.preventDefault(),document.onselectstart=function(){return!1},e.axisStartPos=o.touches[0][e.bar.client]-e.$refs.inner.getBoundingClientRect()[e.bar.posName],e.$emit("setBarClick",!0),eventCenter(document,"touchmove",t),eventCenter(document,"touchend",i)}}function getRgbAColor(e,t){var i=e+"&"+t;if(colorCache[i])return colorCache[i];var o=document.createElement("div");o.style.background=e,document.body.appendChild(o);var r=window.getComputedStyle(o).backgroundColor;return document.body.removeChild(o),rgbReg.test(r)?colorCache[i]="rgba("+extractRgbColor.exec(r)[1]+", "+t+")":e}function handleClickTrack(e,t,i,o,r){var l=t.client,s=t.offset,n=t.posName,a=t.scrollSize,c=i[o+"Bar"].$refs.inner[s],h=(e[l]-e.target.getBoundingClientRect()[n]-c/2)/e.target[s],u=i.scrollPanel.$el[a]*h;r.scrollTo(_defineProperty$1({},scrollMap[o].axis.toLowerCase(),u))}var bar={name:"bar",props:{ops:{type:Object,required:!0},state:{type:Object,required:!0},type:{type:String,required:!0}},computed:{bar:function(){return scrollMap[this.type].bar},axis:function(){return scrollMap[this.type].axis},parent:function(){return this.$parent.$refs}},render:function(e){var t,i,o=this,r=o.$parent.$refs,l=getRgbAColor(o.ops.rail.background,o.ops.rail.opacity),s={style:(_defineProperty$1(t={},o.bar.posName,0),_defineProperty$1(t,o.bar.opsSize,"100%"),_defineProperty$1(t,o.bar.size,o.state.size),_defineProperty$1(t,"borderRadius",o.ops.rail[o.bar.opsSize]),_defineProperty$1(t,"background",o.ops.bar.background),_defineProperty$1(t,"opacity",o.state.opacity),_defineProperty$1(t,"transform","translate"+scrollMap[o.type].axis+"("+o.state.posValue+"%)"),_defineProperty$1(t,"cursor","pointer"),_defineProperty$1(t,"position","relative"),_defineProperty$1(t,"transition","opacity .5s"),_defineProperty$1(t,"userSelect","none"),t),class:"vuescroll-"+o.type+"-bar",ref:"inner",on:{}};return o.ops.bar.hover&&(s.on.mouseenter=function(){o.$el.style.background=o.ops.hover},s.on.mouseleave=function(){o.$el.style.background=o.ops.background}),isSupportTouch()?s.on.touchstart=createTouchEvent(this):s.on.mousedown=createMouseEvent(this),e("div",{class:"vuescroll-"+o.type+"-rail",style:(i={position:"absolute",borderRadius:o.ops.rail[o.bar.opsSize],background:l},_defineProperty$1(i,o.bar.opsSize,o.ops.rail[o.bar.opsSize]),_defineProperty$1(i,o.bar.posName,"2px"),_defineProperty$1(i,o.bar.opposName,"2px"),_defineProperty$1(i,o.ops.rail.pos,0),i),on:{click:function(e){handleClickTrack(e,o.bar,r,o.type,o.$parent)}}},[e("div",s)])}};function createBar(e,t,i){var o="vertical"===i?"Y":"X",r=i.charAt(0)+"Bar",l=i.charAt(0)+"Rail";return!t.bar[r].state.size||!t.mergedOptions.scrollPanel["scrolling"+o]||"pure-native"==t.mode||t.refreshLoad&&"vertical"!==i&&"slide"===t.mode?null:e("bar",{props:{type:i,ops:{bar:t.mergedOptions.bar[r],rail:t.mergedOptions.rail[l]},state:t.bar[r].state},on:{setBarClick:t.setBarClick},ref:i+"Bar"})}var scrollContent={name:"scrollContent",functional:!0,props:{ops:{type:Object},state:{type:Object,default:function(){return{}}}},render:function(e,t){var i=t.props,o=t.slots,r=deepMerge(i.state.style,{});r.position="relative",r["min-width"]="100%",r["min-height"]="100%";var l=isSupportGivenStyle("width","fit-content");return l?r.width=l:r.display="inline-block",r.boxSizing="border-box",i.ops.padding&&(r[i.ops.paddPos]=i.ops.paddValue),e(i.ops.tag,{style:r,ref:"scrollContent",class:"vuescroll-content",props:i.ops.props,attrs:i.ops.attrs},o().default)}};function createContent(e,t){return e("scrollContent",{props:{ops:t.mergedOptions.scrollContent}},[[t.$slots.default]])}var scrollPanel={name:"scrollPanel",props:{ops:{type:Object,required:!0}},methods:{updateInitialScroll:function(){var e=0,t=0;this.ops.initialScrollX&&(e=this.ops.initialScrollX),this.ops.initialScrollY&&(t=this.ops.initialScrollY),(e||t)&&this.$parent.scrollTo({x:e,y:t})}},mounted:function(){var e=this;setTimeout(function(){e._isDestroyed||e.updateInitialScroll()},0)},render:function(e){return e("div",{class:["vuescroll-panel"]},[[this.$slots.default]])}};function createPanel(e,t){var i={ref:"scrollPanel",style:{position:"relative",height:"100%"},nativeOn:{scroll:t.handleScroll},props:{ops:t.mergedOptions.scrollPanel,state:t.scrollPanel.state}};if("native"==t.mode){t.mergedOptions.scrollPanel.scrollingY?i.style.overflowY=t.bar.vBar.state.size?"scroll":"":i.style.overflowY="hidden",t.mergedOptions.scrollPanel.scrollingX?i.style.overflowX=t.bar.hBar.state.size?"scroll":"":i.style.overflowX="hidden";var o=getGutter();o?(t.bar.vBar.state.size&&t.mergedOptions.scrollPanel.scrollingY&&(i.style.marginRight="-"+o+"px"),t.bar.hBar.state.size&&t.mergedOptions.scrollPanel.scrollingX&&(i.style.height="calc(100% + "+o+"px)")):(hideSystemBar(),i.style.height="100%"),i.style.transformOrigin="",i.style.transform=""}else if("slide"==t.mode){i.style.transformOrigin="left top 0px",i.style.userSelect="none",i.style.height="",i.style["box-sizing"]="border-box",i.style["min-width"]="100%",i.style["min-height"]="100%";var r=isSupportGivenStyle("width","fit-content");r?i.style.width=r:i.display="inline-block"}else"pure-native"==t.mode&&(i.style.width="100%",t.mergedOptions.scrollPanel.scrollingY?i.style.overflowY="auto":i.style.overflowY="hidden",t.mergedOptions.scrollPanel.scrollingX?i.style.overflowX="auto":i.style.overflowX="hidden");return e("scrollPanel",i,[createPanelChildren(t,e)])}function createPanelChildren(e,t){if("native"==e.mode)return[createContent(t,e)];if("slide"==e.mode){var i=[e.$slots.default];if(e.mergedOptions.vuescroll.pullRefresh.enable){createDomStyle("refreshDomStyle");var o;o=createTipDom(t,e,"refresh"),i.unshift(t("div",{class:"vuescroll-refresh",ref:"refreshDom",key:"refshDom"},[[o,e.pullRefreshTip]]))}if(e.mergedOptions.vuescroll.pushLoad.enable){createDomStyle("loadDomStyle");var r;r=createTipDom(t,e,"load"),i.push(t("div",{class:"vuescroll-load",ref:"loadDom",key:"loadDom"},[[r,e.pushLoadTip]]))}return i}return"pure-native"==e.mode?[e.$slots.default]:void 0}function createTipDom(e,t,i){var o=t.vuescroll.state[i+"Stage"],r=null;if(r=t.$slots[i+"-"+o])return r[0];switch(o){case"deactive":r=e("svg",{attrs:{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 1000 1000","enable-background":"new 0 0 1000 1000",xmlSpace:"preserve"}},[e("metadata",[" Svg Vector Icons : http://www.sfont.cn "]),e("g",[e("g",{attrs:{transform:"matrix(1 0 0 -1 0 1008)"}},[e("path",{attrs:{d:"M10,543l490,455l490-455L885,438L570,735.5V18H430v717.5L115,438L10,543z"}})])])]);break;case"start":r=e("svg",{attrs:{version:"1.1",id:"loader-1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 50 50",xmlSpace:"preserve"},style:"enable-background:new 0 0 50 50;"},[e("path",{attrs:{fill:"#000",d:"M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"}},[e("animateTransform",{attrs:{attributeType:"xml",attributeName:"transform",type:"rotate",from:"0 25 25",to:"360 25 25",dur:"0.6s",repeatCount:"indefinite"}})])]);break;case"active":r=e("svg",{attrs:{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 1000 1000","enable-background":"new 0 0 1000 1000",xmlSpace:"preserve"}},[e("metadata",[" Svg Vector Icons : http://www.sfont.cn "]),e("g",[e("g",{attrs:{transform:"matrix(1 0 0 -1 0 1008)"}},[e("path",{attrs:{d:"M500,18L10,473l105,105l315-297.5V998h140V280.5L885,578l105-105L500,18z"}})])])])}return r}function findValuesByMode(e,t){var i={};switch(e){case"native":case"pure-native":i={x:t.scrollPanelElm.scrollLeft,y:t.scrollPanelElm.scrollTop};break;case"slide":i={x:t.scroller.__scrollLeft,y:t.scroller.__scrollTop}}return i}function getClientSizeByType(e){var t=this.$el;return("percent"==this.mergedOptions.vuescroll.sizeStrategy?t["client"+(e.charAt(0).toUpperCase()+e.slice(1))]:extractNumberFromPx(this.vuescroll.state[e]))-0}var vueScrollCore={name:"vueScroll",components:{bar:bar,scrollContent:scrollContent,scrollPanel:scrollPanel},props:{ops:{type:Object}},mixins:[hackLifecycle,api,nativeMode,slideMode],mounted:function(){var e=this;this.renderError||(this.initVariables(),this.initVuescrollSizeType(),this.initScroller(),this.initResizeDetection(),this.initWatchOpsChange(),this.updateBarStateAndEmitEvent(),this.$nextTick(function(){e._isDestroyed||(e.updateBarStateAndEmitEvent(),e.initVuescrollPosition())},0))},beforeDestroy:function(){this.destroyParentDomResize&&(this.destroyParentDomResize(),this.destroyParentDomResize=null),this.destroyResize&&(this.destroyResize(),this.destroyResize=null)},data:function(){return{vuescroll:{state:{isDragging:!1,isClickingBar:!1,pointerLeave:!0,internalScrollTop:0,internalScrollLeft:0,posX:null,posY:null,refreshStage:"deactive",loadStage:"deactive",height:"100%",width:"100%"}},scrollPanel:{},scrollContent:{},rail:{vRail:{state:{}},hRail:{state:{}}},bar:{vBar:{state:{posValue:0,size:0,opacity:0}},hBar:{state:{posValue:0,size:0,opacity:0}},renderError:!1}}},render:function(e){var t=this;if(t.renderError)return e("div",[[t.$slots.default]]);var i={style:{position:"relative",height:t.vuescroll.state.height,width:t.vuescroll.state.width,padding:0,overflow:"hidden"},class:"vue-scroll"};return isSupportTouch()?i.on={touchstart:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()},touchend:function(){t.vuescroll.state.pointerLeave=!0,t.hideBar()},touchmove:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()}}:i.on={mouseenter:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()},mouseleave:function(){t.vuescroll.state.pointerLeave=!0,t.hideBar()},mousemove:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()}},e("div",i,[createPanel(e,t),createBar(e,t,"vertical"),createBar(e,t,"horizontal")])},computed:{scrollPanelElm:function(){return this.$refs.scrollPanel.$el},scrollContentElm:function(){return this.$refs.scrollContent._isVue?this.$refs.scrollContent.$el:this.$refs.scrollContent},mode:function(){return this.mergedOptions.vuescroll.mode},pullRefreshTip:function(){return this.mergedOptions.vuescroll.pullRefresh.tips[this.vuescroll.state.refreshStage]},pushLoadTip:function(){return this.mergedOptions.vuescroll.pushLoad.tips[this.vuescroll.state.loadStage]},refreshLoad:function(){return this.mergedOptions.vuescroll.pullRefresh.enable||this.mergedOptions.vuescroll.pushLoad.enable},clientWidth:function(){return getClientSizeByType.call(this,"width")},clientHeight:function(){return getClientSizeByType.call(this,"height")}},methods:{updateBarStateAndEmitEvent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("native"==this.mode||"pure-native"==this.mode)this.updateNativeModeBarState();else if("slide"==this.mode){if(!this.scroller)return;this.updateSlideModeBarState()}e&&this.emitEvent(e,t),this.showAndDefferedHideBar()},updateMode:function(){var e=this.vuescroll.state.internalScrollLeft,t=this.vuescroll.state.internalScrollTop;this.destroyScroller&&(this.scroller.stop(),this.destroyScroller(),this.destroyScroller=null),"slide"==this.mode?this.destroyScroller=this.registryScroller():"native"!=this.mode&&"pure-native"!=this.mode||(this.scrollPanelElm.style.transform="",this.scrollPanelElm.style.transformOrigin=""),this.scrollTo({x:e,y:t},!1,!0)},handleScroll:function(e){this.recordCurrentPos(),this.updateBarStateAndEmitEvent("handle-scroll",e)},setBarClick:function(e){this.vuescroll.state.isClickingBar=e},showAndDefferedHideBar:function(){var e=this;this.showBar(),this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0),this.timeoutId=setTimeout(function(){e.timeoutId=0,e.hideBar()},this.mergedOptions.bar.showDelay)},emitEvent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.scrollPanelElm,o=i.scrollHeight,r=i.scrollWidth,l=i.clientHeight,s=i.clientWidth,n=i.scrollTop,a=i.scrollLeft,c={type:"vertical"},h={type:"horizontal"};"slide"==this.mode&&(o=this.scroller.__contentHeight,r=this.scroller.__contentWidth,n=this.scroller.__scrollTop,a=this.scroller.__scrollLeft,l=this.$el.clientHeight,s=this.$el.clientWidth),c.process=Math.min(n/(o-l),1),h.process=Math.min(a/(r-s),1),c.barSize=this.bar.vBar.state.size,h.barSize=this.bar.hBar.state.size,c.scrollTop=n,h.scrollLeft=a,c.directionY=this.vuescroll.state.posY,h.directionX=this.vuescroll.state.posX,this.$emit(e,c,h,t)},showBar:function(){this.bar.vBar.state.opacity=this.mergedOptions.bar.vBar.opacity,this.bar.hBar.state.opacity=this.mergedOptions.bar.hBar.opacity},hideBar:function(){this.vuescroll.state.isDragging||(this.mergedOptions.bar.vBar.keepShow||this.vuescroll.state.isClickingBar||!this.vuescroll.state.pointerLeave||(this.bar.vBar.state.opacity=0),this.mergedOptions.bar.hBar.keepShow||this.vuescroll.state.isClickingBar||!this.vuescroll.state.pointerLeave||(this.bar.hBar.state.opacity=0))},registryResize:function(){var e=this;this.destroyResize&&this.destroyResize();var t=null;"slide"==this.mode||"pure-native"==this.mode?t=this.scrollPanelElm:"native"==this.mode&&(t=this.scrollContentElm);var i=function(){e.updateBarStateAndEmitEvent(),"slide"==e.mode&&e.updateScroller()};window.addEventListener("resize",i,!1);var o=listenResize(t,function(){var t={};"slide"==e.mode?(e.updateScroller(),t.width=e.scroller.__contentWidth,t.height=e.scroller.__contentHeight):"native"!=e.mode&&"pure-native"!=e.mode||(t.width=e.scrollPanelElm.scrollWidth,t.height=e.scrollPanelElm.scrollHeight),e.updateBarStateAndEmitEvent("handle-resize",t)});this.destroyResize=function(){window.removeEventListener("resize",i,!1),o()}},registryParentResize:function(){this.destroyParentDomResize=listenResize(this.$el.parentNode,this.useNumbericSize)},useNumbericSize:function(){var e=this.$el.parentNode,t=e.style.position;t&&"static"!=t||(this.$el.parentNode.style.position="relative"),this.vuescroll.state.height=e.offsetHeight+"px",this.vuescroll.state.width=e.offsetWidth+"px"},usePercentSize:function(){this.vuescroll.state.height="100%",this.vuescroll.state.width="100%"},setVsSize:function(){"number"==this.mergedOptions.vuescroll.sizeStrategy?(this.useNumbericSize(),this.registryParentResize()):"percent"==this.mergedOptions.vuescroll.sizeStrategy&&(this.destroyParentDomResize&&(this.destroyParentDomResize(),this.destroyParentDomResize=null),this.usePercentSize())},recordCurrentPos:function(){var e=this.mode;this.mode!==this.lastMode&&(e=this.lastMode,this.lastMode=this.mode);var t=this.vuescroll.state,i=findValuesByMode(e,this),o=t.internalScrollLeft,r=t.internalScrollTop;t.posX=o-i.x>0?"right":o-i.x<0?"left":null,t.posY=r-i.y>0?"up":r-i.y<0?"down":null,t.internalScrollLeft=i.x,t.internalScrollTop=i.y},initWatchOpsChange:function(){var e=this,t={deep:!0,sync:!0};this.$watch("mergedOptions",function(){e.recordCurrentPos(),setTimeout(function(){if(1==e.isSmallChangeThisTick)return e.isSmallChangeThisTick=!1,void e.updateBarStateAndEmitEvent();e.setVsSize(),e.registryResize(),e.updateMode(),e.updateBarStateAndEmitEvent()},0)},t),smallChangeArray.forEach(function(i){e.$watch(i,function(){e.isSmallChangeThisTick=!0},t)})},scrollToHash:function(){var e=window.location.hash;if(e&&(!(e=e.slice(e.lastIndexOf("#")))||function(e){return/^#[a-zA-Z_]\d*$/.test(e)}(e))){var t=document.querySelector(e);!isChildInParent(t,this.$el)||this.mergedOptions.scrollPanel.initialScrollY||this.mergedOptions.scrollPanel.initialScrollX||this.scrollIntoView(t)}},initVariables:function(){this.lastMode=this.mode,this.$el._isVuescroll=!0},initScroller:function(){"slide"==this.mode&&(this.destroyScroller=this.registryScroller())},initVuescrollSizeType:function(){this.setVsSize()},initResizeDetection:function(){this.registryResize()},initVuescrollPosition:function(){this.scrollToHash()}}},Vuescroll={install:function(e){e.component(vueScrollCore.name,vueScrollCore),e.prototype.$vuescrollConfig=deepMerge(GCF,{})},version:"4.5.33"};"undefined"!=typeof window&&window.Vue&&Vue.use(Vuescroll);export default Vuescroll; \ No newline at end of file +import Vue from"vue";var _typeof="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};function deepCopy(e,t){for(var i in t="object"===(void 0===t?"undefined":_typeof(t))&&t||{},e)t[i]="object"===_typeof(e[i])?deepCopy(e[i],t[i]={}):e[i];return t}function deepMerge(e,t){for(var i in t=t||{},e)"object"===_typeof(e[i])?void 0===t[i]?(t[i]={},deepCopy(e[i],t[i])):deepMerge(e[i],t[i]):void 0===t[i]&&(t[i]=e[i]);return t}function defineReactive(e,t,i,o){var r=null;(i[t]||"function"==typeof i)&&(o=o||t,"function"==typeof i&&(r=i),Object.defineProperty(e,t,{get:r||function(){return i[o]},configurable:!0}))}var scrollBarWidth=void 0;function getGutter(){if(Vue.prototype.$isServer)return 0;if(void 0!==scrollBarWidth)return scrollBarWidth;var e=document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var i=document.createElement("div");i.style.width="100%",e.appendChild(i);var o=i.offsetWidth;return e.parentNode.removeChild(e),scrollBarWidth=t-o}var doneUtil={refreshDomStyle:!1,loadDomStyle:!1,hide:!1};function hideSystemBar(){if(!doneUtil.hide){doneUtil.hide=!0;var e=document.createElement("style");e.type="text/css",e.innerHTML=".vuescroll-panel::-webkit-scrollbar{width:0;height:0}",document.getElementsByTagName("HEAD").item(0).appendChild(e)}}var styleMap={};function createDomStyle(e){if(!doneUtil[e]){doneUtil[e]=!0;var t=document.createElement("style");t.type="text/css",t.innerHTML=styleMap[e],document.getElementsByTagName("HEAD").item(0).appendChild(t)}}function eventCenter(e,t,i){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];"on"==(arguments.length>4&&void 0!==arguments[4]?arguments[4]:"on")?e.addEventListener(t,i,o):e.removeEventListener(t,i,o)}styleMap.refreshDomStyle="\n.vuescroll-refresh {\n position:absolute;\n width: 100%;\n color: black;\n height: 50px;\n text-align: center;\n font-size: 16px;\n line-height: 50px;\n}\n.vuescroll-refresh svg {\n margin-right: 10px;\n width: 25px;\n height: 25px;\n vertical-align: sub;\n}\n.vuescroll-refresh svg path,\n.vuescroll-refresh svg rect{\nfill: #FF6700;\n}\n",styleMap.loadDomStyle="\n.vuescroll-load {\n position:absolute;\n width: 100%;\n color: black;\n height: 50px;\n text-align: center;\n font-size: 16px;\n line-height: 50px;\n}\n.vuescroll-load svg {\n margin-right: 10px;\n width: 25px;\n height: 25px;\n vertical-align: sub;\n}\n.vuescroll-load svg path,\n.vuescroll-load svg rect{\nfill: #FF6700;\n}\n";var error=function(e){console.error("[vuescroll] "+e)},warn=function(e){console.warn("[vuescroll] "+e)};function isChildInParent(e,t){var i=!1;if(!e||!t)return i;for(;e.parentNode!==t&&9!==e.parentNode.nodeType&&!e.parentNode._isVuescroll;)e=e.parentNode;return e.parentNode==t&&(i=!0),i}var pxValueReg=/(.*?)px/;function extractNumberFromPx(e){var t=pxValueReg.exec(e);return t&&t[1]}function isSupportTouch(){return"ontouchstart"in window}function getPrefix(e){var t,i=document.documentElement.style;return e.opera&&"[object Opera]"===Object.prototype.toString.call(opera)?t="presto":"MozAppearance"in i?t="gecko":"WebkitAppearance"in i?t="webkit":"string"==typeof navigator.cpuClass&&(t="trident"),{trident:"ms",gecko:"moz",webkit:"webkit",presto:"O"}[t]}function isSupportGivenStyle(e,t){var i="-"+getPrefix(window)+"-"+t,o=document.createElement("div");return o.style[e]=i,o.style[e]==i&&i}function listenResize(e,t){return injectObject(e,t)}function injectObject(e,t){if(!e.hasResized){var i=document.createElement("object");return e.hasResized=!0,i.style.cssText="display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; padding: 0; margin: 0; opacity: 0; z-index: -1000; pointer-events: none;",i.tabIndex=-1,i.type="text/html",i.data="about:blank",i.isResizeElm=!0,i.onload=function(){eventCenter(i.contentDocument.defaultView,"resize",t)},e.appendChild(i),function(){i.contentDocument&&eventCenter(i.contentDocument.defaultView,"resize",t,"off"),e.removeChild(i),e.hasResized=!1}}}var modes=["slide","native","pure-native"],NOOP=function(){},smallChangeArray=["mergedOptions.vuescroll.pullRefresh.tips","mergedOptions.vuescroll.pushLoad.tips","mergedOptions.rail","mergedOptions.bar"],GCF={vuescroll:{mode:"native",sizeStrategy:"percent",pullRefresh:{enable:!1,tips:{deactive:"Pull to Refresh",active:"Release to Refresh",start:"Refreshing...",beforeDeactive:"Refresh Successfully!"}},pushLoad:{enable:!1,tips:{deactive:"Push to Load",active:"Release to Load",start:"Loading...",beforeDeactive:"Load Successfully!"}},paging:!1,zooming:!0,snapping:{enable:!1,width:100,height:100},scroller:{bouncing:!0,locking:!0,minZoom:.5,maxZoom:3,speedMultiplier:1,penetrationDeceleration:.03,penetrationAcceleration:.08,preventDefault:!0}},scrollPanel:{initialScrollY:!1,initialScrollX:!1,scrollingX:!0,scrollingY:!0,speed:300,easing:void 0},scrollContent:{tag:"div",padding:!1,props:{},attrs:{}},rail:{vRail:{width:"6px",pos:"right",background:"#01a99a",opacity:0},hRail:{height:"6px",pos:"bottom",background:"#01a99a",opacity:0}},bar:{showDelay:500,vBar:{background:"#00a650",keepShow:!1,opacity:1,hover:!1},hBar:{background:"#00a650",keepShow:!1,opacity:1,hover:!1}}};function validateOptions(e){var t=!1,i=e.vuescroll,o=e.scrollPanel;~modes.indexOf(i.mode)||(error('The vuescroll\'s option "mode" should be one of the '+modes),t=!0),i.paging==i.snapping.enable&&i.paging&&(i.pullRefresh||i.pushLoad)&&error("paging, snapping, (pullRefresh with pushLoad) can only one of them to be true.");var r=o.initialScrollY,l=o.initialScrollX;return r&&!String(r).match(/^\d+(\.\d+)?(%)?$/)&&error("The prop `initialScrollY` should be a percent number like 10% or an exact number that greater than or equal to 0 like 100."),l&&!String(l).match(/^\d+(\.\d+)?(%)?$/)&&error("The prop `initialScrollX` should be a percent number like 10% or an exact number that greater than or equal to 0 like 100."),t}function hackPropsData(){var e=this;if("vueScroll"===e.$options.name){var t=deepMerge(e.$vuescrollConfig,{}),i=deepMerge(GCF,t);e.$options.propsData.ops=e.$options.propsData.ops||{},Object.keys(e.$options.propsData.ops).forEach(function(t){defineReactive(e.mergedOptions,t,e.$options.propsData.ops)}),deepMerge(i,e.mergedOptions);defineReactive(e.mergedOptions.scrollContent,"paddPos",function(){return"padding-"+e.mergedOptions.rail.vRail.pos}),defineReactive(e.mergedOptions.scrollContent,"paddValue",function(){return e.mergedOptions.rail.vRail.width})}}var hackLifecycle={data:function(){return{shouldStopRender:!1,mergedOptions:{vuescroll:{},scrollPanel:{},scrollContent:{},rail:{},bar:{}}}},created:function(){hackPropsData.call(this),this.renderError=validateOptions(this.mergedOptions)}};function createEasingFunction(e,t){return function(i){return t(e,i)}}function easingPattern(e,t){var i=null;return"easeInQuad"===e&&(i=t*t),"easeOutQuad"===e&&(i=t*(2-t)),"easeInOutQuad"===e&&(i=t<.5?2*t*t:(4-2*t)*t-1),"easeInCubic"===e&&(i=t*t*t),"easeOutCubic"===e&&(i=--t*t*t+1),"easeInOutCubic"===e&&(i=t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1),"easeInQuart"===e&&(i=t*t*t*t),"easeOutQuart"===e&&(i=1- --t*t*t*t),"easeInOutQuart"===e&&(i=t<.5?8*t*t*t*t:1-8*--t*t*t*t),"easeInQuint"===e&&(i=t*t*t*t*t),"easeOutQuint"===e&&(i=1+--t*t*t*t*t),"easeInOutQuint"===e&&(i=t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t),i||t}function requestAnimationFrame(e){var t=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame,i=!!t;if(t&&!/requestAnimationFrame\(\)\s*\{\s*\[native code\]\s*\}/i.test(t.toString())&&(i=!1),i)return function(e,i){t(e,i)};var o={},r=1,l=null,s=+new Date;return function(e){var t=r++;return o[t]=e,requestCount++,null===l&&(l=setInterval(function(){var e=+new Date,t=o;for(var i in o={},requestCount=0,t)t.hasOwnProperty(i)&&(t[i](e),s=e);e-s>2500&&(clearInterval(l),l=null)},1e3/60)),t}}var time=Date.now||function(){return+new Date},desiredFrames=60,millisecondsPerSecond=1e3,running={},counter=1,core={effect:{}},global=null;function getNumericValue(e,t){var i=void 0;return i=(i=/(-?\d+(?:\.\d+?)?)%$/.exec(e))?t*(i=i[1]-0)/100:e-0}function goScrolling(e,t,i,o,r,l){var s=e.scrollTop,n=e.scrollLeft,a=n,c=s;s+i<0&&(i=-s);var h=e.scrollHeight;s+i>h&&(i=h-s),n+t<0&&(t=-n),n+t>e.scrollWidth&&(t=e.scrollWidth-n);var u=createEasingFunction(r,easingPattern);core.effect.Animate.start(function(o){a=n+t*o,c=s+i*o,e.scrollTop=Math.floor(c),e.scrollLeft=Math.floor(a)},function(){return Math.abs(c-s)<=Math.abs(i)||Math.abs(a-n)<=Math.abs(t)},l,o,u)}global="undefined"!=typeof window?window:{},core.effect.Animate={requestAnimationFrame:requestAnimationFrame(global),stop:function(e){var t=null!=running[e];return t&&(running[e]=null),t},isRunning:function(e){return null!=running[e]},start:function(e,t,i,o,r,l){var s=time(),n=s,a=0,c=0,h=counter++;if(l||(l=document.body),h%20==0){var u={};for(var _ in running)u[_]=!0;running=u}return running[h]=!0,core.effect.Animate.requestAnimationFrame(function u(_){var d=!0!==_,p=time();if(!running[h]||t&&!t(h))return running[h]=null,void(i&&i(desiredFrames-c/((p-s)/millisecondsPerSecond),h,!1));if(d)for(var f=Math.round((p-n)/(millisecondsPerSecond/desiredFrames))-1,m=0;m1&&(a=1);var v=r?r(a):a;!1!==e(v,p,d)&&1!==a||!d?d&&(n=p,core.effect.Animate.requestAnimationFrame(u,l)):(running[h]=null,i&&i(desiredFrames-c/((p-s)/millisecondsPerSecond),h,1===a||null==o))},l),h}};var api={methods:{scrollTo:function(e){var t=e.x,i=e.y,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=void 0===t?this.vuescroll.state.internalScrollLeft||0:getNumericValue(t,this.scrollPanelElm.scrollWidth),i=void 0===i?this.vuescroll.state.internalScrollTop||0:getNumericValue(i,this.scrollPanelElm.scrollHeight),this.internalScrollTo(t,i,o,r)},scrollBy:function(e){var t=e.dx,i=void 0===t?0:t,o=e.dy,r=void 0===o?0:o,l=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=this.vuescroll.state,n=s.internalScrollLeft,a=void 0===n?0:n,c=s.internalScrollTop,h=void 0===c?0:c;i&&(a+=getNumericValue(i,this.scrollPanelElm.scrollWidth)),r&&(h+=getNumericValue(r,this.scrollPanelElm.scrollHeight)),this.internalScrollTo(a,h,l)},zoomBy:function(e,t,i,o,r){"slide"==this.mode?this.scroller.zoomBy(e,t,i,o,r):warn("zoomBy and zoomTo are only for slide mode!")},zoomTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments[2],o=arguments[3],r=arguments[4];"slide"==this.mode?this.scroller.zoomTo(e,t,i,o,r):warn("zoomBy and zoomTo are only for slide mode!")},getCurrentPage:function(){if("slide"==this.mode&&this.mergedOptions.vuescroll.paging)return this.scroller.getCurrentPage();warn("getCurrentPage and goToPage are only for slide mode and paging is enble!")},goToPage:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];"slide"==this.mode&&this.mergedOptions.vuescroll.paging?this.scroller.goToPage(e,t):warn("getCurrentPage and goToPage are only for slide mode and paging is enble!")},triggerRefreshOrLoad:function(e){if("slide"==this.mode){var t=this.mergedOptions.vuescroll.pullRefresh.enable,i=this.mergedOptions.vuescroll.pushLoad.enable;if("refresh"!=e||t)if("load"!=e||i)if("refresh"===e||"load"===e){if("start"!=this.vuescroll.state[e+"Stage"])return this.scroller.triggerRefreshOrLoad(e),!0}else warn("param must be one of load and refresh!");else warn("load must be enabled!");else warn("refresh must be enabled!")}else warn("You can only use triggerRefreshOrLoad in slide mode!")},getCurrentviewDom:function(){for(var e=this,t=("slide"==this.mode||"pure-native"==this.mode?this.scrollPanelElm:this.scrollContentElm).children,i=[],o=function(t){var i=t.getBoundingClientRect(),o=i.left,r=i.top,l=i.width,s=i.height,n=e.$el.getBoundingClientRect(),a=n.left,c=n.top,h=n.height,u=n.width;return o-a+l>0&&o-a0&&r-c1&&void 0!==arguments[1])||arguments[1],i=this.$el;if("string"==typeof e&&(e=i.querySelector(e)),isChildInParent(e,i)){var o=this.$el.getBoundingClientRect(),r=o.left,l=o.top,s=e.getBoundingClientRect(),n=r-s.left,a=l-s.top;this.scrollBy({dx:-n,dy:-a},t)}else warn("The element or selector you passed is not the element of Vuescroll, please pass the element that is in Vuescroll to scrollIntoView API. ")}}},nativeMode={methods:{updateNativeModeBarState:function(){var e=this.scrollPanelElm,t=this.$el,i="percent"==this.mergedOptions.vuescroll.sizeStrategy,o=i?t.clientWidth:extractNumberFromPx(this.vuescroll.state.width),r=i?t.clientHeight:extractNumberFromPx(this.vuescroll.state.height),l=100*r/e.scrollHeight,s=100*o/e.scrollWidth;this.bar.vBar.state.posValue=100*e.scrollTop/r,this.bar.hBar.state.posValue=100*e.scrollLeft/o,this.bar.vBar.state.size=l<100?l+"%":0,this.bar.hBar.state.size=s<100?s+"%":0}}},animatingMethod=null,noAnimatingMethod=null;function Scroller(e,t){for(var i in this.__callback=e,this.options={scrollingX:!0,scrollingY:!0,animating:!0,animationDuration:250,bouncing:!0,locking:!0,paging:!1,snapping:!1,zooming:!1,minZoom:.5,maxZoom:3,speedMultiplier:1,scrollingComplete:NOOP,animatingEasing:"easeOutCubic",noAnimatingEasing:"easeInOutCubic",penetrationDeceleration:.03,penetrationAcceleration:.08},t)this.options[i]=t[i];animatingMethod=createEasingFunction(this.options.animatingEasing,easingPattern),noAnimatingMethod=createEasingFunction(this.options.noAnimatingEasing,easingPattern)}var members={__isSingleTouch:!1,__isTracking:!1,__didDecelerationComplete:!1,__isGesturing:!1,__isDragging:!1,__isDecelerating:!1,__isAnimating:!1,__clientLeft:0,__clientTop:0,__clientWidth:0,__clientHeight:0,__contentWidth:0,__contentHeight:0,__snapWidth:100,__snapHeight:100,__refreshHeight:null,__loadHeight:null,__refreshActive:!1,__refreshActivate:null,__refreshBeforeDeactivate:null,__refreshDeactivate:null,__refreshStart:null,__loadActive:null,__loadActivate:null,__loadBeforeDeactivate:null,__loadDeactivate:null,__loadStart:null,__zoomLevel:1,__scrollLeft:0,__scrollTop:0,__maxScrollLeft:0,__maxScrollTop:0,__scheduledLeft:0,__scheduledTop:0,__scheduledZoom:0,__currentPageX:null,__currentPageY:null,__totalXPage:null,__totalYPage:null,__disable:!1,__lastTouchLeft:null,__lastTouchTop:null,__lastTouchMove:null,__positions:null,__minDecelerationScrollLeft:null,__minDecelerationScrollTop:null,__maxDecelerationScrollLeft:null,__maxDecelerationScrollTop:null,__decelerationVelocityX:null,__decelerationVelocityY:null,setDimensions:function(e,t,i,o){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:trye;e===+e&&(this.__clientWidth=e),t===+t&&(this.__clientHeight=t),i===+i&&(this.__contentWidth=i),o===+o&&(this.__contentHeight=o),this.__computeScrollMax(),this.scrollTo(this.__scrollLeft,this.__scrollTop,r)},setPosition:function(e,t){this.__clientLeft=e||0,this.__clientTop=t||0},setSnapSize:function(e,t){this.__snapWidth=e,this.__snapHeight=t},activatePullToRefresh:function(e,t){var i=t.activateCallback,o=t.deactivateCallback,r=t.startCallback,l=t.beforeDeactivateCallback;this.__refreshHeight=e,this.__refreshActivate=i,this.__refreshBeforeDeactivate=l,this.__refreshDeactivate=o,this.__refreshStart=r},activatePushToLoad:function(e,t){var i=t.activateCallback,o=t.deactivateCallback,r=t.startCallback,l=t.beforeDeactivateCallback;this.__loadHeight=e,this.__loadActivate=i,this.__loadBeforeDeactivate=l,this.__loadDeactivate=o,this.__loadStart=r},triggerRefreshOrLoad:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"refresh",t=this.__isDecelerating;t&&(core.effect.Animate.stop(t),this.__isDecelerating=!1),"refresh"==e?(this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0),this.__refreshStart&&(this.__refreshStart(),this.__refreshActive=!0)):(this.__publish(this.__scrollLeft,this.__maxScrollTop+this.__loadHeight,this.__zoomLevel,!0),this.__loadStart&&(this.__loadStart(),this.__loadActive=!0))},finishRefreshOrLoad:function(){var e=this;e.__refreshBeforeDeactivate&&e.__refreshActive?(e.__refreshActive=!1,e.__refreshBeforeDeactivate(function(){e.__refreshDeactivate&&e.__refreshDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)})):e.__refreshDeactivate&&e.__refreshActive&&(e.__refreshActive=!1,e.__refreshDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)),e.__loadBeforeDeactivate&&e.__loadActive?(e.__loadActive=!1,e.__loadBeforeDeactivate(function(){e.__loadDeactivate&&e.__loadDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)})):e.__loadDeactivate&&e.__loadActive&&(e.__loadActive=!1,e.__loadDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0))},getValues:function(){return{left:this.__scrollLeft,top:this.__scrollTop,zoom:this.__zoomLevel}},getScrollMax:function(){return{left:this.__maxScrollLeft,top:this.__maxScrollTop}},zoomTo:function(e,t,i,o,r){if(!this.options.zooming)throw new Error("Zooming is not enabled!");r&&(this.__zoomComplete=r),this.__isDecelerating&&(core.effect.Animate.stop(this.__isDecelerating),this.__isDecelerating=!1);var l=this.__zoomLevel;null==i&&(i=this.__clientWidth/2),null==o&&(o=this.__clientHeight/2),e=Math.max(Math.min(e,this.options.maxZoom),this.options.minZoom),this.__computeScrollMax(e);var s=(i+this.__scrollLeft)*e/l-i,n=(o+this.__scrollTop)*e/l-o;s>this.__maxScrollLeft?s=this.__maxScrollLeft:s<0&&(s=0),n>this.__maxScrollTop?n=this.__maxScrollTop:n<0&&(n=0),this.__publish(s,n,e,t)},zoomBy:function(e,t,i,o,r){this.zoomTo(this.__zoomLevel*e,t,i,o,r)},scrollTo:function(e,t,i,o,r){if(this.__isDecelerating&&(core.effect.Animate.stop(this.__isDecelerating),this.__isDecelerating=!1),null!=o&&o!==this.__zoomLevel){if(!this.options.zooming)throw new Error("Zooming is not enabled!");e*=o,t*=o,this.__computeScrollMax(o)}else o=this.__zoomLevel;this.options.scrollingX||r?this.options.paging?e=Math.round(e/this.__clientWidth)*this.__clientWidth:this.options.snapping&&(e=Math.round(e/this.__snapWidth)*this.__snapWidth):e=this.__scrollLeft,this.options.scrollingY||r?this.options.paging?t=Math.round(t/this.__clientHeight)*this.__clientHeight:this.options.snapping&&(t=Math.round(t/this.__snapHeight)*this.__snapHeight):t=this.__scrollTop,e=Math.max(Math.min(this.__maxScrollLeft,e),0),t=Math.max(Math.min(this.__maxScrollTop,t),0),e===this.__scrollLeft&&t===this.__scrollTop&&(i=!1),this.__isTracking||this.__publish(e,t,o,i)},scrollBy:function(e,t,i){var o=this.__isAnimating?this.__scheduledLeft:this.__scrollLeft,r=this.__isAnimating?this.__scheduledTop:this.__scrollTop;this.scrollTo(o+(e||0),r+(t||0),i)},getCurrentPage:function(){return this.__computePage(),{x:this.__currentPageX,y:this.__currentPageY}},goToPage:function(e,t){var i=e.x,o=e.y;isNaN(i)&&(i=1),isNaN(o)&&(o=1),this.scrollTo((i-1)*this.__clientWidth,(o-1)*this.__clientHeight,t)},doMouseZoom:function(e,t,i,o){var r=e>0?.97:1.03;return this.zoomTo(this.__zoomLevel*r,!1,i-this.__clientLeft,o-this.__clientTop)},doTouchStart:function(e,t){if(null==e.length)throw new Error("Invalid touch list: "+e);if(t instanceof Date&&(t=t.valueOf()),"number"!=typeof t)throw new Error("Invalid timestamp value: "+t);var i,o;this.__interruptedAnimation=!0,this.__isDecelerating&&(core.effect.Animate.stop(this.__isDecelerating),this.__isDecelerating=!1,this.__interruptedAnimation=!0),this.__isAnimating&&(core.effect.Animate.stop(this.__isAnimating),this.__isAnimating=!1,this.__interruptedAnimation=!0);var r=1===e.length;r?(i=e[0].pageX,o=e[0].pageY):(i=Math.abs(e[0].pageX+e[1].pageX)/2,o=Math.abs(e[0].pageY+e[1].pageY)/2),this.__initialTouchLeft=i,this.__initialTouchTop=o,this.__zoomLevelStart=this.__zoomLevel,this.__lastTouchLeft=i,this.__lastTouchTop=o,this.__lastTouchMove=t,this.__lastScale=1,this.__enableScrollX=!r&&this.options.scrollingX,this.__enableScrollY=!r&&this.options.scrollingY,this.__isTracking=!0,this.__didDecelerationComplete=!1,this.__isDragging=!r,this.__isSingleTouch=r,this.__positions=[]},doTouchMove:function(e,t,i){if(null==e.length)throw new Error("Invalid touch list: "+e);if(t instanceof Date&&(t=t.valueOf()),"number"!=typeof t)throw new Error("Invalid timestamp value: "+t);if(this.__isTracking){var o,r;2===e.length?(o=Math.abs(e[0].pageX+e[1].pageX)/2,r=Math.abs(e[0].pageY+e[1].pageY)/2):(o=e[0].pageX,r=e[0].pageY);var l=this.__positions;if(this.__isDragging){var s=o-this.__lastTouchLeft,n=r-this.__lastTouchTop,a=this.__scrollLeft,c=this.__scrollTop,h=this.__zoomLevel;if(null!=i&&this.options.zooming){var u=h;if(h=h/this.__lastScale*i,u!==(h=Math.max(Math.min(h,this.options.maxZoom),this.options.minZoom))){var _=o-this.__clientLeft,d=r-this.__clientTop;a=(_+a)*h/u-_,c=(d+c)*h/u-d,this.__computeScrollMax(h)}}if(this.__enableScrollX){a-=s*this.options.speedMultiplier;var p=this.__maxScrollLeft;(a>p||a<0)&&(this.options.bouncing?a+=s/2*this.options.speedMultiplier:a=a>p?p:0)}if(this.__enableScrollY){c-=n*this.options.speedMultiplier;var f=this.__maxScrollTop;(c>f||c<0)&&(this.options.bouncing?(c+=n/2*this.options.speedMultiplier,this.__enableScrollX||null==this.__refreshHeight&&null==this.__loadHeight||(!this.__refreshActive&&c<=-this.__refreshHeight?(this.__refreshActive=!0,this.__refreshActivate&&this.__refreshActivate()):this.__refreshActive&&c>-this.__refreshHeight?(this.__refreshActive=!1,this.__refreshDeactivate&&this.__refreshDeactivate()):!this.__loadActive&&c>=this.__maxScrollTop+this.__loadHeight?(this.__loadActive=!0,this.__loadActivate&&this.__loadActivate()):this.__refreshActive&&cf?f:0)}l.length>60&&l.splice(0,30),l.push(a,c,t),this.__publish(a,c,h)}else{var m=this.options.locking?3:0,v=Math.abs(o-this.__initialTouchLeft),g=Math.abs(r-this.__initialTouchTop);this.__enableScrollX=this.options.scrollingX&&v>=m,this.__enableScrollY=this.options.scrollingY&&g>=m,l.push(this.__scrollLeft,this.__scrollTop,t),this.__isDragging=(this.__enableScrollX||this.__enableScrollY)&&(v>=5||g>=5),this.__isDragging&&(this.__interruptedAnimation=!1)}this.__lastTouchLeft=o,this.__lastTouchTop=r,this.__lastTouchMove=t,this.__lastScale=i}},doTouchEnd:function(e){if(e instanceof Date&&(e=e.valueOf()),"number"!=typeof e)throw new Error("Invalid timestamp value: "+e);if(this.__isTracking){if(this.__isTracking=!1,this.__isDragging)if(this.__isDragging=!1,this.__isSingleTouch&&this.options.animating&&e-this.__lastTouchMove<=100){for(var t=this.__positions,i=t.length-1,o=i,r=i;r>0&&t[r]>this.__lastTouchMove-100;r-=3)o=r;if(o!==i){var l=t[i]-t[o],s=this.__scrollLeft-t[o-2],n=this.__scrollTop-t[o-1];this.__decelerationVelocityX=s/l*(1e3/60),this.__decelerationVelocityY=n/l*(1e3/60);var a=this.options.paging||this.options.snapping?4:1;Math.abs(this.__decelerationVelocityX)>a||Math.abs(this.__decelerationVelocityY)>a?this.__refreshActive||this.__loadActive||this.__startDeceleration(e):this.__scrollComplete()}else this.__scrollComplete()}else e-this.__lastTouchMove>100&&this.__scrollComplete();this.__isDecelerating||(this.__refreshActive&&this.__refreshStart?(this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0),this.__refreshStart&&this.__refreshStart()):this.__loadActive&&this.__loadStart?(this.__publish(this.__scrollLeft,this.__maxScrollTop+this.__loadHeight,this.__zoomLevel,!0),this.__loadStart&&this.__loadStart()):((this.__interruptedAnimation||this.__isDragging)&&this.__scrollComplete(),this.scrollTo(this.__scrollLeft,this.__scrollTop,!0,this.__zoomLevel),this.__refreshActive?(this.__refreshActive=!1,this.__refreshDeactivate&&this.__refreshDeactivate()):this.__loadActive&&(this.__loadActive=!1,this.__loadDeactivate&&this.__loadDeactivate()))),this.__positions.length=0}},onScroll:NOOP,stop:function(){this.__disable=!0},start:function(){self.__disable=!0},__publish:function(e,t,i,o){var r=this;if(!r.__disable){isNaN(e)&&(e=this.__scrollLeft),isNaN(t)&&(t=this.__scrollTop);var l=r.__isAnimating;if(l&&(core.effect.Animate.stop(l),r.__isAnimating=!1),o&&r.options.animating){r.__scheduledLeft=e,r.__scheduledTop=t,r.__scheduledZoom=i;var s=r.__scrollLeft,n=r.__scrollTop,a=r.__zoomLevel,c=e-s,h=t-n,u=i-a;r.__isAnimating=core.effect.Animate.start(function(e,t,i){i&&(r.__scrollLeft=s+c*e,r.__scrollTop=n+h*e,r.__zoomLevel=a+u*e,r.__callback&&(r.__callback(r.__scrollLeft,r.__scrollTop,r.__zoomLevel),r.onScroll()))},function(e){return r.__isAnimating===e},function(e,t,i){t===r.__isAnimating&&(r.__isAnimating=!1),(r.__didDecelerationComplete||i)&&r.__scrollComplete(),r.options.zooming&&(r.__computeScrollMax(),r.__zoomComplete&&(r.__zoomComplete(),r.__zoomComplete=null))},r.options.animationDuration,l?animatingMethod:noAnimatingMethod)}else r.__scheduledLeft=r.__scrollLeft=e,r.__scheduledTop=r.__scrollTop=t,r.__scheduledZoom=r.__zoomLevel=i,r.__callback&&(r.__callback(e,t,i),r.onScroll()),r.options.zooming&&(r.__computeScrollMax(),r.__zoomComplete&&(r.__zoomComplete(),r.__zoomComplete=null))}},__computeScrollMax:function(e){null==e&&(e=this.__zoomLevel),this.__maxScrollLeft=Math.max(this.__contentWidth*e-this.__clientWidth,0),this.__maxScrollTop=Math.max(this.__contentHeight*e-this.__clientHeight,0)},__computePage:function(){var e=this.__clientWidth,t=this.__clientHeight,i=this.__scrollLeft,o=this.__scrollTop;this.__totalXPage=Math.ceil(this.__contentWidth/e),this.__currentPageX=Math.ceil(i/e+1),this.__totalYPage=Math.ceil(this.__contentHeight/t),this.__currentPageY=Math.ceil(o/t+1)},__scrollComplete:function(){this.options.scrollingComplete()},__startDeceleration:function(){var e=this;if(e.options.paging){var t=Math.max(Math.min(e.__scrollLeft,e.__maxScrollLeft),0),i=Math.max(Math.min(e.__scrollTop,e.__maxScrollTop),0),o=e.__clientWidth,r=e.__clientHeight;e.__minDecelerationScrollLeft=Math.floor(t/o)*o,e.__minDecelerationScrollTop=Math.floor(i/r)*r,e.__maxDecelerationScrollLeft=Math.ceil(t/o)*o,e.__maxDecelerationScrollTop=Math.ceil(i/r)*r}else e.__minDecelerationScrollLeft=0,e.__minDecelerationScrollTop=0,e.__maxDecelerationScrollLeft=e.__maxScrollLeft,e.__maxDecelerationScrollTop=e.__maxScrollTop;var l=e.options.snapping?4:.001;e.__isDecelerating=core.effect.Animate.start(function(t,i,o){e.__stepThroughDeceleration(o)},function(){var t=Math.abs(e.__decelerationVelocityX)>=l||Math.abs(e.__decelerationVelocityY)>=l;return t||(e.__didDecelerationComplete=!0),t},function(){e.__isDecelerating&&(e.__isDecelerating=!1,e.__didDecelerationComplete&&e.__scrollComplete(),e.scrollTo(e.__scrollLeft,e.__scrollTop,e.options.snapping))})},__stepThroughDeceleration:function(e){var t=this.__scrollLeft+this.__decelerationVelocityX,i=this.__scrollTop+this.__decelerationVelocityY;if(!this.options.bouncing){var o=Math.max(Math.min(this.__maxDecelerationScrollLeft,t),this.__minDecelerationScrollLeft);o!==t&&(t=o,this.__decelerationVelocityX=0);var r=Math.max(Math.min(this.__maxDecelerationScrollTop,i),this.__minDecelerationScrollTop);r!==i&&(i=r,this.__decelerationVelocityY=0)}if(e?this.__publish(t,i,this.__zoomLevel):(this.__scrollLeft=t,this.__scrollTop=i),!this.options.paging){this.__decelerationVelocityX*=.95,this.__decelerationVelocityY*=.95}if(this.options.bouncing){var l=0,s=0,n=this.options.penetrationDeceleration,a=this.options.penetrationAcceleration;tthis.__maxDecelerationScrollLeft&&(l=this.__maxDecelerationScrollLeft-t),ithis.__maxDecelerationScrollTop&&(s=this.__maxDecelerationScrollTop-i),0!==l&&(l*this.__decelerationVelocityX<=0?this.__decelerationVelocityX+=l*n:this.__decelerationVelocityX=l*a),0!==s&&(s*this.__decelerationVelocityY<=0?this.__decelerationVelocityY+=s*n:this.__decelerationVelocityY=s*a)}}};for(var key in members)Scroller.prototype[key]=members[key];function _defineProperty(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function render(e,t,i,o){var r=null,l=null;"string"==typeof e&&(l="vertical"==e?(r=0)||o:(r=o)&&0);var s=getPrefix(t),n=document.createElement("div"),a=s+"Perspective";return void 0!==n.style[a]?"string"==typeof e?_defineProperty({},"transform","translate3d("+r+i+","+l+i+",0)"):function(t,o,r){e.style.transform="translate3d("+-t+i+","+-o+i+",0) scale("+r+")"}:void 0!==n.style.transform?"string"==typeof e?_defineProperty({},"transform","translate("+r+i+","+l+i+")"):function(t,o,r){e.style.transform="translate("+-t+i+","+-o+i+") scale("+r+")"}:void 0}function listenContainer(e,t,i,o,r){var l=null;function s(e){e.touches[0]&&e.touches[0].target&&e.touches[0].target.tagName.match(/input|textarea|select/i)||(i("mousedown"),t.doTouchStart(e.touches,e.timeStamp),r&&e.preventDefault(),document.addEventListener("touchmove",n,{passive:!1}))}function n(e){i("mousemove"),t.doTouchMove(e.touches,e.timeStamp,e.scale),e.preventDefault()}function a(e){i("mouseup"),t.doTouchEnd(e.timeStamp),document.removeEventListener("touchmove",n)}function c(e){t.doTouchEnd(e.timeStamp)}function h(e){e.target.tagName.match(/input|textarea|select/i)||(i("mousedown"),t.doTouchStart([{pageX:e.pageX,pageY:e.pageY}],e.timeStamp),r&&e.preventDefault(),p=!0)}function u(e){p&&(i("mousemove"),t.doTouchMove([{pageX:e.pageX,pageY:e.pageY}],e.timeStamp),p=!0)}function _(e){p&&(i("mouseup"),t.doTouchEnd(e.timeStamp),p=!1)}function d(e){t.doMouseZoom(e.detail?-120*e.detail:e.wheelDelta,e.timeStamp,e.pageX,e.pageY)}if("ontouchstart"in window)e.addEventListener("touchstart",s,!1),document.addEventListener("touchend",a,!1),document.addEventListener("touchcancel",c,!1),l=function(){e.removeEventListener("touchstart",s,!1),document.removeEventListener("touchend",a,!1),document.removeEventListener("touchcancel",c,!1)};else{var p=!1;e.addEventListener("mousedown",h,!1),document.addEventListener("mousemove",u,!1),document.addEventListener("mouseup",_,!1),o&&e.addEventListener(navigator.userAgent.indexOf("Firefox")>-1?"DOMMouseScroll":"mousewheel",d,!1),l=function(){e.removeEventListener("mousedown",h,!1),document.removeEventListener("mousemove",u,!1),document.removeEventListener("mouseup",_,!1),e.removeEventListener(navigator.userAgent.indexOf("Firefox")>-1?"DOMMouseScroll":"mousewheel",d,!1)}}return t.onScroll=function(){i("onscroll")},l}var _extends=Object.assign||function(e){for(var t=1;to.__maxScrollLeft&&(r=o.__scrollLeft-o.__maxScrollLeft)),u&&(o.__scrollTop<0?l=-o.__scrollTop:o.__scrollTop>o.__maxScrollTop&&(l=o.__scrollTop-o.__maxScrollTop)),e=100*n/(c+l),t=100*s/(a+r);var _=Math.min(Math.max(0,o.__scrollTop),o.__maxScrollTop),d=Math.min(Math.max(0,o.__scrollLeft),o.__maxScrollLeft);this.bar.vBar.state.posValue=100*(_+l)/i.clientHeight,this.bar.hBar.state.posValue=100*(d+r)/i.clientWidth,o.__scrollLeft<0&&(this.bar.hBar.state.posValue=0),o.__scrollTop<0&&(this.bar.vBar.state.posValue=0),this.bar.vBar.state.size=e<100?e+"%":0,this.bar.hBar.state.size=t<100?t+"%":0},registryEvent:function(e){var t="refresh"==e?"refreshDom":"loadDom",i="refresh"==e?this.scroller.activatePullToRefresh:this.scroller.activatePushToLoad,o="refresh"==e?"refreshStage":"loadStage",r=this.$refs[t].elm||this.$refs[t],l=createStateCallbacks(e,o,this,r),s=r.offsetHeight;i.bind(this.scroller)(s,l)}}},scrollMap={vertical:{bar:{size:"height",opsSize:"width",posName:"top",opposName:"bottom",page:"pageY",scroll:"scrollTop",scrollSize:"scrollHeight",offset:"offsetHeight",client:"clientY"},axis:"Y"},horizontal:{bar:{size:"width",opsSize:"height",posName:"left",opposName:"right",page:"pageX",scroll:"scrollLeft",scrollSize:"scrollWidth",offset:"offsetWidth",client:"clientX"},axis:"X"}};function _defineProperty$1(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var colorCache={},rgbReg=/rgb\(/,extractRgbColor=/rgb\((.*)\)/;function createMouseEvent(e){function t(t){if(e.axisStartPos){var i=(t[e.bar.client]-e.$el.getBoundingClientRect()[e.bar.posName]-e.axisStartPos)/e.$el[e.bar.offset];e.$parent.scrollTo(_defineProperty$1({},e.axis.toLowerCase(),e.parent.scrollPanel.$el[e.bar.scrollSize]*i),!1)}}function i(){e.$emit("setBarClick",!1),document.onselectstart=null,e.$parent.hideBar(),e.axisStartPos=0,eventCenter(document,"mousemove",t,"off"),eventCenter(document,"mouseup",i,"off")}return function(o){o.stopImmediatePropagation(),document.onselectstart=function(){return!1},e.axisStartPos=o[e.bar.client]-e.$refs.inner.getBoundingClientRect()[e.bar.posName],e.$emit("setBarClick",!0),eventCenter(document,"mousemove",t),eventCenter(document,"mouseup",i)}}function createTouchEvent(e){function t(t){if(e.axisStartPos){var i=(t.touches[0][e.bar.client]-e.$el.getBoundingClientRect()[e.bar.posName]-e.axisStartPos)/e.$el[e.bar.offset];e.$parent.scrollTo(_defineProperty$1({},e.axis.toLowerCase(),e.parent.scrollPanel.$el[e.bar.scrollSize]*i),!1)}}function i(){e.$emit("setBarClick",!1),document.onselectstart=null,e.$parent.hideBar(),e.axisStartPos=0,eventCenter(document,"touchmove",t,"off"),eventCenter(document,"touchend",i,"off")}return function(o){o.stopImmediatePropagation(),o.preventDefault(),document.onselectstart=function(){return!1},e.axisStartPos=o.touches[0][e.bar.client]-e.$refs.inner.getBoundingClientRect()[e.bar.posName],e.$emit("setBarClick",!0),eventCenter(document,"touchmove",t),eventCenter(document,"touchend",i)}}function getRgbAColor(e,t){var i=e+"&"+t;if(colorCache[i])return colorCache[i];var o=document.createElement("div");o.style.background=e,document.body.appendChild(o);var r=window.getComputedStyle(o).backgroundColor;return document.body.removeChild(o),rgbReg.test(r)?colorCache[i]="rgba("+extractRgbColor.exec(r)[1]+", "+t+")":e}function handleClickTrack(e,t,i,o,r){var l=t.client,s=t.offset,n=t.posName,a=t.scrollSize,c=i[o+"Bar"].$refs.inner[s],h=(e[l]-e.target.getBoundingClientRect()[n]-c/2)/e.target[s],u=i.scrollPanel.$el[a]*h;r.scrollTo(_defineProperty$1({},scrollMap[o].axis.toLowerCase(),u))}var bar={name:"bar",props:{ops:{type:Object,required:!0},state:{type:Object,required:!0},type:{type:String,required:!0}},computed:{bar:function(){return scrollMap[this.type].bar},axis:function(){return scrollMap[this.type].axis},parent:function(){return this.$parent.$refs}},render:function(e){var t,i,o=this,r=o.$parent.$refs,l=getRgbAColor(o.ops.rail.background,o.ops.rail.opacity),s={style:(_defineProperty$1(t={},o.bar.posName,0),_defineProperty$1(t,o.bar.opsSize,"100%"),_defineProperty$1(t,o.bar.size,o.state.size),_defineProperty$1(t,"borderRadius","inherit"),_defineProperty$1(t,"background",o.ops.bar.background),_defineProperty$1(t,"opacity",o.state.opacity),_defineProperty$1(t,"transform","translate"+scrollMap[o.type].axis+"("+o.state.posValue+"%)"),_defineProperty$1(t,"cursor","pointer"),_defineProperty$1(t,"position","relative"),_defineProperty$1(t,"transition","opacity .5s"),_defineProperty$1(t,"userSelect","none"),t),class:"vuescroll-"+o.type+"-bar",ref:"inner",on:{}};return o.ops.bar.hover&&(s.on.mouseenter=function(){o.$el.style.background=o.ops.hover},s.on.mouseleave=function(){o.$el.style.background=o.ops.background}),isSupportTouch()?s.on.touchstart=createTouchEvent(this):s.on.mousedown=createMouseEvent(this),e("div",{class:"vuescroll-"+o.type+"-rail",style:(i={position:"absolute",zIndex:1,background:l},_defineProperty$1(i,o.bar.opsSize,o.ops.rail[o.bar.opsSize]),_defineProperty$1(i,o.bar.posName,"2px"),_defineProperty$1(i,o.bar.opposName,"2px"),_defineProperty$1(i,o.ops.rail.pos,0),i),on:{click:function(e){handleClickTrack(e,o.bar,r,o.type,o.$parent)}}},[e("div",s)])}};function createBar(e,t,i){var o="vertical"===i?"Y":"X",r=i.charAt(0)+"Bar",l=i.charAt(0)+"Rail";return!t.bar[r].state.size||!t.mergedOptions.scrollPanel["scrolling"+o]||"pure-native"==t.mode||t.refreshLoad&&"vertical"!==i&&"slide"===t.mode?null:e("bar",{props:{type:i,ops:{bar:t.mergedOptions.bar[r],rail:t.mergedOptions.rail[l]},state:t.bar[r].state},on:{setBarClick:t.setBarClick},ref:i+"Bar"})}var scrollContent={name:"scrollContent",functional:!0,props:{ops:{type:Object},state:{type:Object,default:function(){return{}}}},render:function(e,t){var i=t.props,o=t.slots,r=deepMerge(i.state.style,{});r.position="relative",r["min-width"]="100%",r["min-height"]="100%";var l=isSupportGivenStyle("width","fit-content");return l?r.width=l:r.display="inline-block",r.boxSizing="border-box",i.ops.padding&&(r[i.ops.paddPos]=i.ops.paddValue),e(i.ops.tag,{style:r,ref:"scrollContent",class:"vuescroll-content",props:i.ops.props,attrs:i.ops.attrs},o().default)}};function createContent(e,t){return e("scrollContent",{props:{ops:t.mergedOptions.scrollContent}},[[t.$slots.default]])}var scrollPanel={name:"scrollPanel",props:{ops:{type:Object,required:!0}},methods:{updateInitialScroll:function(){var e=0,t=0;this.ops.initialScrollX&&(e=this.ops.initialScrollX),this.ops.initialScrollY&&(t=this.ops.initialScrollY),(e||t)&&this.$parent.scrollTo({x:e,y:t})}},mounted:function(){var e=this;setTimeout(function(){e._isDestroyed||e.updateInitialScroll()},0)},render:function(e){return e("div",{class:["vuescroll-panel"]},[[this.$slots.default]])}};function createPanel(e,t){var i={ref:"scrollPanel",style:{position:"relative",height:"100%"},nativeOn:{scroll:t.handleScroll},props:{ops:t.mergedOptions.scrollPanel,state:t.scrollPanel.state}};if("native"==t.mode){t.mergedOptions.scrollPanel.scrollingY?i.style.overflowY=t.bar.vBar.state.size?"scroll":"":i.style.overflowY="hidden",t.mergedOptions.scrollPanel.scrollingX?i.style.overflowX=t.bar.hBar.state.size?"scroll":"":i.style.overflowX="hidden";var o=getGutter();o?(t.bar.vBar.state.size&&t.mergedOptions.scrollPanel.scrollingY&&(i.style.marginRight="-"+o+"px"),t.bar.hBar.state.size&&t.mergedOptions.scrollPanel.scrollingX&&(i.style.height="calc(100% + "+o+"px)")):(hideSystemBar(),i.style.height="100%"),i.style.transformOrigin="",i.style.transform=""}else if("slide"==t.mode){i.style.transformOrigin="left top 0px",i.style.userSelect="none",i.style.height="",i.style["box-sizing"]="border-box",i.style["min-width"]="100%",i.style["min-height"]="100%";var r=isSupportGivenStyle("width","fit-content");r?i.style.width=r:i.display="inline-block"}else"pure-native"==t.mode&&(i.style.width="100%",t.mergedOptions.scrollPanel.scrollingY?i.style.overflowY="auto":i.style.overflowY="hidden",t.mergedOptions.scrollPanel.scrollingX?i.style.overflowX="auto":i.style.overflowX="hidden");return e("scrollPanel",i,[createPanelChildren(t,e)])}function createPanelChildren(e,t){if("native"==e.mode)return[createContent(t,e)];if("slide"==e.mode){var i=[e.$slots.default];if(e.mergedOptions.vuescroll.pullRefresh.enable){createDomStyle("refreshDomStyle");var o;o=createTipDom(t,e,"refresh"),i.unshift(t("div",{class:"vuescroll-refresh",ref:"refreshDom",key:"refshDom"},[[o,e.pullRefreshTip]]))}if(e.mergedOptions.vuescroll.pushLoad.enable){createDomStyle("loadDomStyle");var r;r=createTipDom(t,e,"load"),i.push(t("div",{class:"vuescroll-load",ref:"loadDom",key:"loadDom"},[[r,e.pushLoadTip]]))}return i}return"pure-native"==e.mode?[e.$slots.default]:void 0}function createTipDom(e,t,i){var o=t.vuescroll.state[i+"Stage"],r=null;if(r=t.$slots[i+"-"+o])return r[0];switch(o){case"deactive":r=e("svg",{attrs:{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 1000 1000","enable-background":"new 0 0 1000 1000",xmlSpace:"preserve"}},[e("metadata",[" Svg Vector Icons : http://www.sfont.cn "]),e("g",[e("g",{attrs:{transform:"matrix(1 0 0 -1 0 1008)"}},[e("path",{attrs:{d:"M10,543l490,455l490-455L885,438L570,735.5V18H430v717.5L115,438L10,543z"}})])])]);break;case"start":r=e("svg",{attrs:{version:"1.1",id:"loader-1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 50 50",xmlSpace:"preserve"},style:"enable-background:new 0 0 50 50;"},[e("path",{attrs:{fill:"#000",d:"M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"}},[e("animateTransform",{attrs:{attributeType:"xml",attributeName:"transform",type:"rotate",from:"0 25 25",to:"360 25 25",dur:"0.6s",repeatCount:"indefinite"}})])]);break;case"active":r=e("svg",{attrs:{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 1000 1000","enable-background":"new 0 0 1000 1000",xmlSpace:"preserve"}},[e("metadata",[" Svg Vector Icons : http://www.sfont.cn "]),e("g",[e("g",{attrs:{transform:"matrix(1 0 0 -1 0 1008)"}},[e("path",{attrs:{d:"M500,18L10,473l105,105l315-297.5V998h140V280.5L885,578l105-105L500,18z"}})])])])}return r}function findValuesByMode(e,t){var i={};switch(e){case"native":case"pure-native":i={x:t.scrollPanelElm.scrollLeft,y:t.scrollPanelElm.scrollTop};break;case"slide":i={x:t.scroller.__scrollLeft,y:t.scroller.__scrollTop}}return i}function getClientSizeByType(e){var t=this.$el;return("percent"==this.mergedOptions.vuescroll.sizeStrategy?t["client"+(e.charAt(0).toUpperCase()+e.slice(1))]:extractNumberFromPx(this.vuescroll.state[e]))-0}var vueScrollCore={name:"vueScroll",components:{bar:bar,scrollContent:scrollContent,scrollPanel:scrollPanel},props:{ops:{type:Object}},mixins:[hackLifecycle,api,nativeMode,slideMode],mounted:function(){var e=this;this.renderError||(this.initVariables(),this.initVuescrollSizeType(),this.initScroller(),this.initResizeDetection(),this.initWatchOpsChange(),this.updateBarStateAndEmitEvent(),this.$nextTick(function(){e._isDestroyed||(e.updateBarStateAndEmitEvent(),e.initVuescrollPosition())},0))},beforeDestroy:function(){this.destroyParentDomResize&&(this.destroyParentDomResize(),this.destroyParentDomResize=null),this.destroyResize&&(this.destroyResize(),this.destroyResize=null)},data:function(){return{vuescroll:{state:{isDragging:!1,isClickingBar:!1,pointerLeave:!0,internalScrollTop:0,internalScrollLeft:0,posX:null,posY:null,refreshStage:"deactive",loadStage:"deactive",height:"100%",width:"100%"}},scrollPanel:{},scrollContent:{},rail:{vRail:{state:{}},hRail:{state:{}}},bar:{vBar:{state:{posValue:0,size:0,opacity:0}},hBar:{state:{posValue:0,size:0,opacity:0}},renderError:!1}}},render:function(e){var t=this;if(t.renderError)return e("div",[[t.$slots.default]]);var i={style:{position:"relative",height:t.vuescroll.state.height,width:t.vuescroll.state.width,padding:0,overflow:"hidden"},class:"vue-scroll"};return isSupportTouch()?i.on={touchstart:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()},touchend:function(){t.vuescroll.state.pointerLeave=!0,t.hideBar()},touchmove:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()}}:i.on={mouseenter:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()},mouseleave:function(){t.vuescroll.state.pointerLeave=!0,t.hideBar()},mousemove:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()}},e("div",i,[createPanel(e,t),createBar(e,t,"vertical"),createBar(e,t,"horizontal")])},computed:{scrollPanelElm:function(){return this.$refs.scrollPanel.$el},scrollContentElm:function(){return this.$refs.scrollContent._isVue?this.$refs.scrollContent.$el:this.$refs.scrollContent},mode:function(){return this.mergedOptions.vuescroll.mode},pullRefreshTip:function(){return this.mergedOptions.vuescroll.pullRefresh.tips[this.vuescroll.state.refreshStage]},pushLoadTip:function(){return this.mergedOptions.vuescroll.pushLoad.tips[this.vuescroll.state.loadStage]},refreshLoad:function(){return this.mergedOptions.vuescroll.pullRefresh.enable||this.mergedOptions.vuescroll.pushLoad.enable},clientWidth:function(){return getClientSizeByType.call(this,"width")},clientHeight:function(){return getClientSizeByType.call(this,"height")}},methods:{updateBarStateAndEmitEvent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("native"==this.mode||"pure-native"==this.mode)this.updateNativeModeBarState();else if("slide"==this.mode){if(!this.scroller)return;this.updateSlideModeBarState()}e&&this.emitEvent(e,t),this.showAndDefferedHideBar()},updateMode:function(){var e=this.vuescroll.state.internalScrollLeft,t=this.vuescroll.state.internalScrollTop;this.destroyScroller&&(this.scroller.stop(),this.destroyScroller(),this.destroyScroller=null),"slide"==this.mode?this.destroyScroller=this.registryScroller():"native"!=this.mode&&"pure-native"!=this.mode||(this.scrollPanelElm.style.transform="",this.scrollPanelElm.style.transformOrigin=""),this.scrollTo({x:e,y:t},!1,!0)},handleScroll:function(e){this.recordCurrentPos(),this.updateBarStateAndEmitEvent("handle-scroll",e)},setBarClick:function(e){this.vuescroll.state.isClickingBar=e},showAndDefferedHideBar:function(){var e=this;this.showBar(),this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0),this.timeoutId=setTimeout(function(){e.timeoutId=0,e.hideBar()},this.mergedOptions.bar.showDelay)},emitEvent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.scrollPanelElm,o=i.scrollHeight,r=i.scrollWidth,l=i.clientHeight,s=i.clientWidth,n=i.scrollTop,a=i.scrollLeft,c={type:"vertical"},h={type:"horizontal"};"slide"==this.mode&&(o=this.scroller.__contentHeight,r=this.scroller.__contentWidth,n=this.scroller.__scrollTop,a=this.scroller.__scrollLeft,l=this.$el.clientHeight,s=this.$el.clientWidth),c.process=Math.min(n/(o-l),1),h.process=Math.min(a/(r-s),1),c.barSize=this.bar.vBar.state.size,h.barSize=this.bar.hBar.state.size,c.scrollTop=n,h.scrollLeft=a,c.directionY=this.vuescroll.state.posY,h.directionX=this.vuescroll.state.posX,this.$emit(e,c,h,t)},showBar:function(){this.bar.vBar.state.opacity=this.mergedOptions.bar.vBar.opacity,this.bar.hBar.state.opacity=this.mergedOptions.bar.hBar.opacity},hideBar:function(){this.vuescroll.state.isDragging||(this.mergedOptions.bar.vBar.keepShow||this.vuescroll.state.isClickingBar||!this.vuescroll.state.pointerLeave||(this.bar.vBar.state.opacity=0),this.mergedOptions.bar.hBar.keepShow||this.vuescroll.state.isClickingBar||!this.vuescroll.state.pointerLeave||(this.bar.hBar.state.opacity=0))},registryResize:function(){var e=this;this.destroyResize&&this.destroyResize();var t=null;"slide"==this.mode||"pure-native"==this.mode?t=this.scrollPanelElm:"native"==this.mode&&(t=this.scrollContentElm);var i=function(){e.updateBarStateAndEmitEvent(),"slide"==e.mode&&e.updateScroller()};window.addEventListener("resize",i,!1);var o=listenResize(t,function(){var t={};"slide"==e.mode?(e.updateScroller(),t.width=e.scroller.__contentWidth,t.height=e.scroller.__contentHeight):"native"!=e.mode&&"pure-native"!=e.mode||(t.width=e.scrollPanelElm.scrollWidth,t.height=e.scrollPanelElm.scrollHeight),e.updateBarStateAndEmitEvent("handle-resize",t)});this.destroyResize=function(){window.removeEventListener("resize",i,!1),o()}},registryParentResize:function(){this.destroyParentDomResize=listenResize(this.$el.parentNode,this.useNumbericSize)},useNumbericSize:function(){var e=this.$el.parentNode,t=e.style.position;t&&"static"!=t||(this.$el.parentNode.style.position="relative"),this.vuescroll.state.height=e.offsetHeight+"px",this.vuescroll.state.width=e.offsetWidth+"px"},usePercentSize:function(){this.vuescroll.state.height="100%",this.vuescroll.state.width="100%"},setVsSize:function(){"number"==this.mergedOptions.vuescroll.sizeStrategy?(this.useNumbericSize(),this.registryParentResize()):"percent"==this.mergedOptions.vuescroll.sizeStrategy&&(this.destroyParentDomResize&&(this.destroyParentDomResize(),this.destroyParentDomResize=null),this.usePercentSize())},recordCurrentPos:function(){var e=this.mode;this.mode!==this.lastMode&&(e=this.lastMode,this.lastMode=this.mode);var t=this.vuescroll.state,i=findValuesByMode(e,this),o=t.internalScrollLeft,r=t.internalScrollTop;t.posX=o-i.x>0?"right":o-i.x<0?"left":null,t.posY=r-i.y>0?"up":r-i.y<0?"down":null,t.internalScrollLeft=i.x,t.internalScrollTop=i.y},initWatchOpsChange:function(){var e=this,t={deep:!0,sync:!0};this.$watch("mergedOptions",function(){e.recordCurrentPos(),setTimeout(function(){if(1==e.isSmallChangeThisTick)return e.isSmallChangeThisTick=!1,void e.updateBarStateAndEmitEvent();e.setVsSize(),e.registryResize(),e.updateMode(),e.updateBarStateAndEmitEvent()},0)},t),smallChangeArray.forEach(function(i){e.$watch(i,function(){e.isSmallChangeThisTick=!0},t)})},scrollToHash:function(){var e=window.location.hash;if(e&&(!(e=e.slice(e.lastIndexOf("#")))||function(e){return/^#[a-zA-Z_]\d*$/.test(e)}(e))){var t=document.querySelector(e);!isChildInParent(t,this.$el)||this.mergedOptions.scrollPanel.initialScrollY||this.mergedOptions.scrollPanel.initialScrollX||this.scrollIntoView(t)}},initVariables:function(){this.lastMode=this.mode,this.$el._isVuescroll=!0},initScroller:function(){"slide"==this.mode&&(this.destroyScroller=this.registryScroller())},initVuescrollSizeType:function(){this.setVsSize()},initResizeDetection:function(){this.registryResize()},initVuescrollPosition:function(){this.scrollToHash()}}},Vuescroll={install:function(e){e.component(vueScrollCore.name,vueScrollCore),e.prototype.$vuescrollConfig=deepMerge(GCF,{})},version:"4.5.33"};"undefined"!=typeof window&&window.Vue&&Vue.use(Vuescroll);export default Vuescroll; \ No newline at end of file diff --git a/dist/vuescroll.js b/dist/vuescroll.js index 51837c49..998dd05f 100644 --- a/dist/vuescroll.js +++ b/dist/vuescroll.js @@ -2826,7 +2826,7 @@ var bar = { var vm = this; var parentRef = vm.$parent.$refs; var railBackgroundColor = getRgbAColor(vm.ops.rail.background, vm.ops.rail.opacity); - var style = (_style = {}, _defineProperty$1(_style, vm.bar.posName, 0), _defineProperty$1(_style, vm.bar.opsSize, '100%'), _defineProperty$1(_style, vm.bar.size, vm.state.size), _defineProperty$1(_style, 'borderRadius', vm.ops.rail[vm.bar.opsSize]), _defineProperty$1(_style, 'background', vm.ops.bar.background), _defineProperty$1(_style, 'opacity', vm.state.opacity), _defineProperty$1(_style, 'transform', 'translate' + scrollMap[vm.type].axis + '(' + vm.state.posValue + '%)'), _defineProperty$1(_style, 'cursor', 'pointer'), _defineProperty$1(_style, 'position', 'relative'), _defineProperty$1(_style, 'transition', 'opacity .5s'), _defineProperty$1(_style, 'userSelect', 'none'), _style); + var style = (_style = {}, _defineProperty$1(_style, vm.bar.posName, 0), _defineProperty$1(_style, vm.bar.opsSize, '100%'), _defineProperty$1(_style, vm.bar.size, vm.state.size), _defineProperty$1(_style, 'borderRadius', 'inherit'), _defineProperty$1(_style, 'background', vm.ops.bar.background), _defineProperty$1(_style, 'opacity', vm.state.opacity), _defineProperty$1(_style, 'transform', 'translate' + scrollMap[vm.type].axis + '(' + vm.state.posValue + '%)'), _defineProperty$1(_style, 'cursor', 'pointer'), _defineProperty$1(_style, 'position', 'relative'), _defineProperty$1(_style, 'transition', 'opacity .5s'), _defineProperty$1(_style, 'userSelect', 'none'), _style); var bar = { style: style, class: 'vuescroll-' + vm.type + '-bar', @@ -2854,7 +2854,8 @@ var bar = { class: 'vuescroll-' + vm.type + '-rail', style: (_style2 = { position: 'absolute', - borderRadius: vm.ops.rail[vm.bar.opsSize], + zIndex: 1, + // borderRadius: vm.ops.rail[vm.bar.opsSize], background: railBackgroundColor }, _defineProperty$1(_style2, vm.bar.opsSize, vm.ops.rail[vm.bar.opsSize]), _defineProperty$1(_style2, vm.bar.posName, '2px'), _defineProperty$1(_style2, vm.bar.opposName, '2px'), _defineProperty$1(_style2, vm.ops.rail.pos, 0), _style2), on: { diff --git a/dist/vuescroll.min.js b/dist/vuescroll.min.js index 8ee55bff..be090787 100644 --- a/dist/vuescroll.min.js +++ b/dist/vuescroll.min.js @@ -1 +1 @@ -!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 t="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};function i(e,o){for(var s in o="object"===(void 0===o?"undefined":t(o))&&o||{},e)o[s]="object"===t(e[s])?i(e[s],o[s]={}):e[s];return o}function o(e,s){for(var l in s=s||{},e)"object"===t(e[l])?void 0===s[l]?(s[l]={},i(e[l],s[l])):o(e[l],s[l]):void 0===s[l]&&(s[l]=e[l]);return s}function s(e,t,i,o){var s=null;(i[t]||"function"==typeof i)&&(o=o||t,"function"==typeof i&&(s=i),Object.defineProperty(e,t,{get:s||function(){return i[o]},configurable:!0}))}var l=void 0;var r={refreshDomStyle:!1,loadDomStyle:!1,hide:!1};var n={};function a(e){if(!r[e]){r[e]=!0;var t=document.createElement("style");t.type="text/css",t.innerHTML=n[e],document.getElementsByTagName("HEAD").item(0).appendChild(t)}}function c(e,t,i){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];"on"==(arguments.length>4&&void 0!==arguments[4]?arguments[4]:"on")?e.addEventListener(t,i,o):e.removeEventListener(t,i,o)}n.refreshDomStyle="\n.vuescroll-refresh {\n position:absolute;\n width: 100%;\n color: black;\n height: 50px;\n text-align: center;\n font-size: 16px;\n line-height: 50px;\n}\n.vuescroll-refresh svg {\n margin-right: 10px;\n width: 25px;\n height: 25px;\n vertical-align: sub;\n}\n.vuescroll-refresh svg path,\n.vuescroll-refresh svg rect{\nfill: #FF6700;\n}\n",n.loadDomStyle="\n.vuescroll-load {\n position:absolute;\n width: 100%;\n color: black;\n height: 50px;\n text-align: center;\n font-size: 16px;\n line-height: 50px;\n}\n.vuescroll-load svg {\n margin-right: 10px;\n width: 25px;\n height: 25px;\n vertical-align: sub;\n}\n.vuescroll-load svg path,\n.vuescroll-load svg rect{\nfill: #FF6700;\n}\n";var h=function(e){console.error("[vuescroll] "+e)},u=function(e){console.warn("[vuescroll] "+e)};function _(e,t){var i=!1;if(!e||!t)return i;for(;e.parentNode!==t&&9!==e.parentNode.nodeType&&!e.parentNode._isVuescroll;)e=e.parentNode;return e.parentNode==t&&(i=!0),i}var d=/(.*?)px/;function p(e){var t=d.exec(e);return t&&t[1]}function f(){return"ontouchstart"in window}function m(e){var t,i=document.documentElement.style;return e.opera&&"[object Opera]"===Object.prototype.toString.call(opera)?t="presto":"MozAppearance"in i?t="gecko":"WebkitAppearance"in i?t="webkit":"string"==typeof navigator.cpuClass&&(t="trident"),{trident:"ms",gecko:"moz",webkit:"webkit",presto:"O"}[t]}function v(e,t){var i="-"+m(window)+"-"+t,o=document.createElement("div");return o.style[e]=i,o.style[e]==i&&i}function g(e,t){return function(e,t){if(e.hasResized)return;var i=document.createElement("object");return e.hasResized=!0,i.style.cssText="display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; padding: 0; margin: 0; opacity: 0; z-index: -1000; pointer-events: none;",i.tabIndex=-1,i.type="text/html",i.data="about:blank",i.isResizeElm=!0,i.onload=function(){c(i.contentDocument.defaultView,"resize",t)},e.appendChild(i),function(){i.contentDocument&&c(i.contentDocument.defaultView,"resize",t,"off"),e.removeChild(i),e.hasResized=!1}}(e,t)}var b=["slide","native","pure-native"],S=function(){},y=["mergedOptions.vuescroll.pullRefresh.tips","mergedOptions.vuescroll.pushLoad.tips","mergedOptions.rail","mergedOptions.bar"],T={vuescroll:{mode:"native",sizeStrategy:"percent",pullRefresh:{enable:!1,tips:{deactive:"Pull to Refresh",active:"Release to Refresh",start:"Refreshing...",beforeDeactive:"Refresh Successfully!"}},pushLoad:{enable:!1,tips:{deactive:"Push to Load",active:"Release to Load",start:"Loading...",beforeDeactive:"Load Successfully!"}},paging:!1,zooming:!0,snapping:{enable:!1,width:100,height:100},scroller:{bouncing:!0,locking:!0,minZoom:.5,maxZoom:3,speedMultiplier:1,penetrationDeceleration:.03,penetrationAcceleration:.08,preventDefault:!0}},scrollPanel:{initialScrollY:!1,initialScrollX:!1,scrollingX:!0,scrollingY:!0,speed:300,easing:void 0},scrollContent:{tag:"div",padding:!1,props:{},attrs:{}},rail:{vRail:{width:"6px",pos:"right",background:"#01a99a",opacity:0},hRail:{height:"6px",pos:"bottom",background:"#01a99a",opacity:0}},bar:{showDelay:500,vBar:{background:"#00a650",keepShow:!1,opacity:1,hover:!1},hBar:{background:"#00a650",keepShow:!1,opacity:1,hover:!1}}};var L={data:function(){return{shouldStopRender:!1,mergedOptions:{vuescroll:{},scrollPanel:{},scrollContent:{},rail:{},bar:{}}}},created:function(){(function(){var e=this;if("vueScroll"===e.$options.name){var t=o(e.$vuescrollConfig,{}),i=o(T,t);e.$options.propsData.ops=e.$options.propsData.ops||{},Object.keys(e.$options.propsData.ops).forEach(function(t){s(e.mergedOptions,t,e.$options.propsData.ops)}),o(i,e.mergedOptions),s(e.mergedOptions.scrollContent,"paddPos",function(){return"padding-"+e.mergedOptions.rail.vRail.pos}),s(e.mergedOptions.scrollContent,"paddValue",function(){return e.mergedOptions.rail.vRail.width})}}).call(this),this.renderError=function(e){var t=!1,i=e.vuescroll,o=e.scrollPanel;~b.indexOf(i.mode)||(h('The vuescroll\'s option "mode" should be one of the '+b),t=!0),i.paging==i.snapping.enable&&i.paging&&(i.pullRefresh||i.pushLoad)&&h("paging, snapping, (pullRefresh with pushLoad) can only one of them to be true.");var s=o.initialScrollY,l=o.initialScrollX;return s&&!String(s).match(/^\d+(\.\d+)?(%)?$/)&&h("The prop `initialScrollY` should be a percent number like 10% or an exact number that greater than or equal to 0 like 100."),l&&!String(l).match(/^\d+(\.\d+)?(%)?$/)&&h("The prop `initialScrollX` should be a percent number like 10% or an exact number that greater than or equal to 0 like 100."),t}(this.mergedOptions)}};function x(e,t){return function(i){return t(e,i)}}function w(e,t){var i=null;return"easeInQuad"===e&&(i=t*t),"easeOutQuad"===e&&(i=t*(2-t)),"easeInOutQuad"===e&&(i=t<.5?2*t*t:(4-2*t)*t-1),"easeInCubic"===e&&(i=t*t*t),"easeOutCubic"===e&&(i=--t*t*t+1),"easeInOutCubic"===e&&(i=t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1),"easeInQuart"===e&&(i=t*t*t*t),"easeOutQuart"===e&&(i=1- --t*t*t*t),"easeInOutQuart"===e&&(i=t<.5?8*t*t*t*t:1-8*--t*t*t*t),"easeInQuint"===e&&(i=t*t*t*t*t),"easeOutQuint"===e&&(i=1+--t*t*t*t*t),"easeInOutQuint"===e&&(i=t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t),i||t}var D=Date.now||function(){return+new Date},z={},P=1,O={effect:{}},C=null;function E(e,t){var i=void 0;return i=(i=/(-?\d+(?:\.\d+?)?)%$/.exec(e))?t*(i=i[1]-0)/100:e-0}C="undefined"!=typeof window?window:{},O.effect.Animate={requestAnimationFrame:function(e){var t=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame,i=!!t;if(t&&!/requestAnimationFrame\(\)\s*\{\s*\[native code\]\s*\}/i.test(t.toString())&&(i=!1),i)return function(e,i){t(e,i)};var o={},s=1,l=null,r=+new Date;return function(e){var t=s++;return o[t]=e,requestCount++,null===l&&(l=setInterval(function(){var e=+new Date,t=o;for(var i in o={},requestCount=0,t)t.hasOwnProperty(i)&&(t[i](e),r=e);e-r>2500&&(clearInterval(l),l=null)},1e3/60)),t}}(C),stop:function(e){var t=null!=z[e];return t&&(z[e]=null),t},isRunning:function(e){return null!=z[e]},start:function(e,t,i,o,s,l){var r=D(),n=r,a=0,c=0,h=P++;if(l||(l=document.body),h%20==0){var u={};for(var _ in z)u[_]=!0;z=u}return z[h]=!0,O.effect.Animate.requestAnimationFrame(function u(_){var d=!0!==_,p=D();if(!z[h]||t&&!t(h))return z[h]=null,void(i&&i(60-c/((p-r)/1e3),h,!1));if(d)for(var f=Math.round((p-n)/(1e3/60))-1,m=0;m1&&(a=1);var v=s?s(a):a;!1!==e(v,p,d)&&1!==a||!d?d&&(n=p,O.effect.Animate.requestAnimationFrame(u,l)):(z[h]=null,i&&i(60-c/((p-r)/1e3),h,1===a||null==o))},l),h}};var A={methods:{scrollTo:function(e){var t=e.x,i=e.y,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=void 0===t?this.vuescroll.state.internalScrollLeft||0:E(t,this.scrollPanelElm.scrollWidth),i=void 0===i?this.vuescroll.state.internalScrollTop||0:E(i,this.scrollPanelElm.scrollHeight),this.internalScrollTo(t,i,o,s)},scrollBy:function(e){var t=e.dx,i=void 0===t?0:t,o=e.dy,s=void 0===o?0:o,l=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.vuescroll.state,n=r.internalScrollLeft,a=void 0===n?0:n,c=r.internalScrollTop,h=void 0===c?0:c;i&&(a+=E(i,this.scrollPanelElm.scrollWidth)),s&&(h+=E(s,this.scrollPanelElm.scrollHeight)),this.internalScrollTo(a,h,l)},zoomBy:function(e,t,i,o,s){"slide"==this.mode?this.scroller.zoomBy(e,t,i,o,s):u("zoomBy and zoomTo are only for slide mode!")},zoomTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments[2],o=arguments[3],s=arguments[4];"slide"==this.mode?this.scroller.zoomTo(e,t,i,o,s):u("zoomBy and zoomTo are only for slide mode!")},getCurrentPage:function(){if("slide"==this.mode&&this.mergedOptions.vuescroll.paging)return this.scroller.getCurrentPage();u("getCurrentPage and goToPage are only for slide mode and paging is enble!")},goToPage:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];"slide"==this.mode&&this.mergedOptions.vuescroll.paging?this.scroller.goToPage(e,t):u("getCurrentPage and goToPage are only for slide mode and paging is enble!")},triggerRefreshOrLoad:function(e){if("slide"==this.mode){var t=this.mergedOptions.vuescroll.pullRefresh.enable,i=this.mergedOptions.vuescroll.pushLoad.enable;if("refresh"!=e||t)if("load"!=e||i)if("refresh"===e||"load"===e){if("start"!=this.vuescroll.state[e+"Stage"])return this.scroller.triggerRefreshOrLoad(e),!0}else u("param must be one of load and refresh!");else u("load must be enabled!");else u("refresh must be enabled!")}else u("You can only use triggerRefreshOrLoad in slide mode!")},getCurrentviewDom:function(){for(var e=this,t=("slide"==this.mode||"pure-native"==this.mode?this.scrollPanelElm:this.scrollContentElm).children,i=[],o=function(t){var i=t.getBoundingClientRect(),o=i.left,s=i.top,l=i.width,r=i.height,n=e.$el.getBoundingClientRect(),a=n.left,c=n.top,h=n.height,u=n.width;return o-a+l>0&&o-a0&&s-ch&&(i=h-r),n+t<0&&(t=-n),n+t>e.scrollWidth&&(t=e.scrollWidth-n);var u=x(s,w);O.effect.Animate.start(function(o){a=n+t*o,c=r+i*o,e.scrollTop=Math.floor(c),e.scrollLeft=Math.floor(a)},function(){return Math.abs(c-r)<=Math.abs(i)||Math.abs(a-n)<=Math.abs(t)},l,o,u)}(this.$refs.scrollPanel.$el,e-this.$refs.scrollPanel.$el.scrollLeft,t-this.$refs.scrollPanel.$el.scrollTop,this.mergedOptions.scrollPanel.speed,this.mergedOptions.scrollPanel.easing,function(){s.updateBarStateAndEmitEvent("handle-scroll-complete")})}else this.$refs.scrollPanel.$el.scrollTop=t,this.$refs.scrollPanel.$el.scrollLeft=e;else"slide"==this.mode&&this.scroller.scrollTo(e,t,i,void 0,o)},scrollIntoView:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.$el;if("string"==typeof e&&(e=i.querySelector(e)),_(e,i)){var o=this.$el.getBoundingClientRect(),s=o.left,l=o.top,r=e.getBoundingClientRect(),n=s-r.left,a=l-r.top;this.scrollBy({dx:-n,dy:-a},t)}else u("The element or selector you passed is not the element of Vuescroll, please pass the element that is in Vuescroll to scrollIntoView API. ")}}},B={methods:{updateNativeModeBarState:function(){var e=this.scrollPanelElm,t=this.$el,i="percent"==this.mergedOptions.vuescroll.sizeStrategy,o=i?t.clientWidth:p(this.vuescroll.state.width),s=i?t.clientHeight:p(this.vuescroll.state.height),l=100*s/e.scrollHeight,r=100*o/e.scrollWidth;this.bar.vBar.state.posValue=100*e.scrollTop/s,this.bar.hBar.state.posValue=100*e.scrollLeft/o,this.bar.vBar.state.size=l<100?l+"%":0,this.bar.hBar.state.size=r<100?r+"%":0}}},M=null,k=null;function $(e,t){for(var i in this.__callback=e,this.options={scrollingX:!0,scrollingY:!0,animating:!0,animationDuration:250,bouncing:!0,locking:!0,paging:!1,snapping:!1,zooming:!1,minZoom:.5,maxZoom:3,speedMultiplier:1,scrollingComplete:S,animatingEasing:"easeOutCubic",noAnimatingEasing:"easeInOutCubic",penetrationDeceleration:.03,penetrationAcceleration:.08},t)this.options[i]=t[i];M=x(this.options.animatingEasing,w),k=x(this.options.noAnimatingEasing,w)}var R={__isSingleTouch:!1,__isTracking:!1,__didDecelerationComplete:!1,__isGesturing:!1,__isDragging:!1,__isDecelerating:!1,__isAnimating:!1,__clientLeft:0,__clientTop:0,__clientWidth:0,__clientHeight:0,__contentWidth:0,__contentHeight:0,__snapWidth:100,__snapHeight:100,__refreshHeight:null,__loadHeight:null,__refreshActive:!1,__refreshActivate:null,__refreshBeforeDeactivate:null,__refreshDeactivate:null,__refreshStart:null,__loadActive:null,__loadActivate:null,__loadBeforeDeactivate:null,__loadDeactivate:null,__loadStart:null,__zoomLevel:1,__scrollLeft:0,__scrollTop:0,__maxScrollLeft:0,__maxScrollTop:0,__scheduledLeft:0,__scheduledTop:0,__scheduledZoom:0,__currentPageX:null,__currentPageY:null,__totalXPage:null,__totalYPage:null,__disable:!1,__lastTouchLeft:null,__lastTouchTop:null,__lastTouchMove:null,__positions:null,__minDecelerationScrollLeft:null,__minDecelerationScrollTop:null,__maxDecelerationScrollLeft:null,__maxDecelerationScrollTop:null,__decelerationVelocityX:null,__decelerationVelocityY:null,setDimensions:function(e,t,i,o){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:trye;e===+e&&(this.__clientWidth=e),t===+t&&(this.__clientHeight=t),i===+i&&(this.__contentWidth=i),o===+o&&(this.__contentHeight=o),this.__computeScrollMax(),this.scrollTo(this.__scrollLeft,this.__scrollTop,s)},setPosition:function(e,t){this.__clientLeft=e||0,this.__clientTop=t||0},setSnapSize:function(e,t){this.__snapWidth=e,this.__snapHeight=t},activatePullToRefresh:function(e,t){var i=t.activateCallback,o=t.deactivateCallback,s=t.startCallback,l=t.beforeDeactivateCallback;this.__refreshHeight=e,this.__refreshActivate=i,this.__refreshBeforeDeactivate=l,this.__refreshDeactivate=o,this.__refreshStart=s},activatePushToLoad:function(e,t){var i=t.activateCallback,o=t.deactivateCallback,s=t.startCallback,l=t.beforeDeactivateCallback;this.__loadHeight=e,this.__loadActivate=i,this.__loadBeforeDeactivate=l,this.__loadDeactivate=o,this.__loadStart=s},triggerRefreshOrLoad:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"refresh",t=this.__isDecelerating;t&&(O.effect.Animate.stop(t),this.__isDecelerating=!1),"refresh"==e?(this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0),this.__refreshStart&&(this.__refreshStart(),this.__refreshActive=!0)):(this.__publish(this.__scrollLeft,this.__maxScrollTop+this.__loadHeight,this.__zoomLevel,!0),this.__loadStart&&(this.__loadStart(),this.__loadActive=!0))},finishRefreshOrLoad:function(){var e=this;e.__refreshBeforeDeactivate&&e.__refreshActive?(e.__refreshActive=!1,e.__refreshBeforeDeactivate(function(){e.__refreshDeactivate&&e.__refreshDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)})):e.__refreshDeactivate&&e.__refreshActive&&(e.__refreshActive=!1,e.__refreshDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)),e.__loadBeforeDeactivate&&e.__loadActive?(e.__loadActive=!1,e.__loadBeforeDeactivate(function(){e.__loadDeactivate&&e.__loadDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)})):e.__loadDeactivate&&e.__loadActive&&(e.__loadActive=!1,e.__loadDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0))},getValues:function(){return{left:this.__scrollLeft,top:this.__scrollTop,zoom:this.__zoomLevel}},getScrollMax:function(){return{left:this.__maxScrollLeft,top:this.__maxScrollTop}},zoomTo:function(e,t,i,o,s){if(!this.options.zooming)throw new Error("Zooming is not enabled!");s&&(this.__zoomComplete=s),this.__isDecelerating&&(O.effect.Animate.stop(this.__isDecelerating),this.__isDecelerating=!1);var l=this.__zoomLevel;null==i&&(i=this.__clientWidth/2),null==o&&(o=this.__clientHeight/2),e=Math.max(Math.min(e,this.options.maxZoom),this.options.minZoom),this.__computeScrollMax(e);var r=(i+this.__scrollLeft)*e/l-i,n=(o+this.__scrollTop)*e/l-o;r>this.__maxScrollLeft?r=this.__maxScrollLeft:r<0&&(r=0),n>this.__maxScrollTop?n=this.__maxScrollTop:n<0&&(n=0),this.__publish(r,n,e,t)},zoomBy:function(e,t,i,o,s){this.zoomTo(this.__zoomLevel*e,t,i,o,s)},scrollTo:function(e,t,i,o,s){if(this.__isDecelerating&&(O.effect.Animate.stop(this.__isDecelerating),this.__isDecelerating=!1),null!=o&&o!==this.__zoomLevel){if(!this.options.zooming)throw new Error("Zooming is not enabled!");e*=o,t*=o,this.__computeScrollMax(o)}else o=this.__zoomLevel;this.options.scrollingX||s?this.options.paging?e=Math.round(e/this.__clientWidth)*this.__clientWidth:this.options.snapping&&(e=Math.round(e/this.__snapWidth)*this.__snapWidth):e=this.__scrollLeft,this.options.scrollingY||s?this.options.paging?t=Math.round(t/this.__clientHeight)*this.__clientHeight:this.options.snapping&&(t=Math.round(t/this.__snapHeight)*this.__snapHeight):t=this.__scrollTop,e=Math.max(Math.min(this.__maxScrollLeft,e),0),t=Math.max(Math.min(this.__maxScrollTop,t),0),e===this.__scrollLeft&&t===this.__scrollTop&&(i=!1),this.__isTracking||this.__publish(e,t,o,i)},scrollBy:function(e,t,i){var o=this.__isAnimating?this.__scheduledLeft:this.__scrollLeft,s=this.__isAnimating?this.__scheduledTop:this.__scrollTop;this.scrollTo(o+(e||0),s+(t||0),i)},getCurrentPage:function(){return this.__computePage(),{x:this.__currentPageX,y:this.__currentPageY}},goToPage:function(e,t){var i=e.x,o=e.y;isNaN(i)&&(i=1),isNaN(o)&&(o=1),this.scrollTo((i-1)*this.__clientWidth,(o-1)*this.__clientHeight,t)},doMouseZoom:function(e,t,i,o){var s=e>0?.97:1.03;return this.zoomTo(this.__zoomLevel*s,!1,i-this.__clientLeft,o-this.__clientTop)},doTouchStart:function(e,t){if(null==e.length)throw new Error("Invalid touch list: "+e);if(t instanceof Date&&(t=t.valueOf()),"number"!=typeof t)throw new Error("Invalid timestamp value: "+t);var i,o;this.__interruptedAnimation=!0,this.__isDecelerating&&(O.effect.Animate.stop(this.__isDecelerating),this.__isDecelerating=!1,this.__interruptedAnimation=!0),this.__isAnimating&&(O.effect.Animate.stop(this.__isAnimating),this.__isAnimating=!1,this.__interruptedAnimation=!0);var s=1===e.length;s?(i=e[0].pageX,o=e[0].pageY):(i=Math.abs(e[0].pageX+e[1].pageX)/2,o=Math.abs(e[0].pageY+e[1].pageY)/2),this.__initialTouchLeft=i,this.__initialTouchTop=o,this.__zoomLevelStart=this.__zoomLevel,this.__lastTouchLeft=i,this.__lastTouchTop=o,this.__lastTouchMove=t,this.__lastScale=1,this.__enableScrollX=!s&&this.options.scrollingX,this.__enableScrollY=!s&&this.options.scrollingY,this.__isTracking=!0,this.__didDecelerationComplete=!1,this.__isDragging=!s,this.__isSingleTouch=s,this.__positions=[]},doTouchMove:function(e,t,i){if(null==e.length)throw new Error("Invalid touch list: "+e);if(t instanceof Date&&(t=t.valueOf()),"number"!=typeof t)throw new Error("Invalid timestamp value: "+t);if(this.__isTracking){var o,s;2===e.length?(o=Math.abs(e[0].pageX+e[1].pageX)/2,s=Math.abs(e[0].pageY+e[1].pageY)/2):(o=e[0].pageX,s=e[0].pageY);var l=this.__positions;if(this.__isDragging){var r=o-this.__lastTouchLeft,n=s-this.__lastTouchTop,a=this.__scrollLeft,c=this.__scrollTop,h=this.__zoomLevel;if(null!=i&&this.options.zooming){var u=h;if(h=h/this.__lastScale*i,u!==(h=Math.max(Math.min(h,this.options.maxZoom),this.options.minZoom))){var _=o-this.__clientLeft,d=s-this.__clientTop;a=(_+a)*h/u-_,c=(d+c)*h/u-d,this.__computeScrollMax(h)}}if(this.__enableScrollX){a-=r*this.options.speedMultiplier;var p=this.__maxScrollLeft;(a>p||a<0)&&(this.options.bouncing?a+=r/2*this.options.speedMultiplier:a=a>p?p:0)}if(this.__enableScrollY){c-=n*this.options.speedMultiplier;var f=this.__maxScrollTop;(c>f||c<0)&&(this.options.bouncing?(c+=n/2*this.options.speedMultiplier,this.__enableScrollX||null==this.__refreshHeight&&null==this.__loadHeight||(!this.__refreshActive&&c<=-this.__refreshHeight?(this.__refreshActive=!0,this.__refreshActivate&&this.__refreshActivate()):this.__refreshActive&&c>-this.__refreshHeight?(this.__refreshActive=!1,this.__refreshDeactivate&&this.__refreshDeactivate()):!this.__loadActive&&c>=this.__maxScrollTop+this.__loadHeight?(this.__loadActive=!0,this.__loadActivate&&this.__loadActivate()):this.__refreshActive&&cf?f:0)}l.length>60&&l.splice(0,30),l.push(a,c,t),this.__publish(a,c,h)}else{var m=this.options.locking?3:0,v=Math.abs(o-this.__initialTouchLeft),g=Math.abs(s-this.__initialTouchTop);this.__enableScrollX=this.options.scrollingX&&v>=m,this.__enableScrollY=this.options.scrollingY&&g>=m,l.push(this.__scrollLeft,this.__scrollTop,t),this.__isDragging=(this.__enableScrollX||this.__enableScrollY)&&(v>=5||g>=5),this.__isDragging&&(this.__interruptedAnimation=!1)}this.__lastTouchLeft=o,this.__lastTouchTop=s,this.__lastTouchMove=t,this.__lastScale=i}},doTouchEnd:function(e){if(e instanceof Date&&(e=e.valueOf()),"number"!=typeof e)throw new Error("Invalid timestamp value: "+e);if(this.__isTracking){if(this.__isTracking=!1,this.__isDragging)if(this.__isDragging=!1,this.__isSingleTouch&&this.options.animating&&e-this.__lastTouchMove<=100){for(var t=this.__positions,i=t.length-1,o=i,s=i;s>0&&t[s]>this.__lastTouchMove-100;s-=3)o=s;if(o!==i){var l=t[i]-t[o],r=this.__scrollLeft-t[o-2],n=this.__scrollTop-t[o-1];this.__decelerationVelocityX=r/l*(1e3/60),this.__decelerationVelocityY=n/l*(1e3/60);var a=this.options.paging||this.options.snapping?4:1;Math.abs(this.__decelerationVelocityX)>a||Math.abs(this.__decelerationVelocityY)>a?this.__refreshActive||this.__loadActive||this.__startDeceleration(e):this.__scrollComplete()}else this.__scrollComplete()}else e-this.__lastTouchMove>100&&this.__scrollComplete();this.__isDecelerating||(this.__refreshActive&&this.__refreshStart?(this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0),this.__refreshStart&&this.__refreshStart()):this.__loadActive&&this.__loadStart?(this.__publish(this.__scrollLeft,this.__maxScrollTop+this.__loadHeight,this.__zoomLevel,!0),this.__loadStart&&this.__loadStart()):((this.__interruptedAnimation||this.__isDragging)&&this.__scrollComplete(),this.scrollTo(this.__scrollLeft,this.__scrollTop,!0,this.__zoomLevel),this.__refreshActive?(this.__refreshActive=!1,this.__refreshDeactivate&&this.__refreshDeactivate()):this.__loadActive&&(this.__loadActive=!1,this.__loadDeactivate&&this.__loadDeactivate()))),this.__positions.length=0}},onScroll:S,stop:function(){this.__disable=!0},start:function(){self.__disable=!0},__publish:function(e,t,i,o){var s=this;if(!s.__disable){isNaN(e)&&(e=this.__scrollLeft),isNaN(t)&&(t=this.__scrollTop);var l=s.__isAnimating;if(l&&(O.effect.Animate.stop(l),s.__isAnimating=!1),o&&s.options.animating){s.__scheduledLeft=e,s.__scheduledTop=t,s.__scheduledZoom=i;var r=s.__scrollLeft,n=s.__scrollTop,a=s.__zoomLevel,c=e-r,h=t-n,u=i-a;s.__isAnimating=O.effect.Animate.start(function(e,t,i){i&&(s.__scrollLeft=r+c*e,s.__scrollTop=n+h*e,s.__zoomLevel=a+u*e,s.__callback&&(s.__callback(s.__scrollLeft,s.__scrollTop,s.__zoomLevel),s.onScroll()))},function(e){return s.__isAnimating===e},function(e,t,i){t===s.__isAnimating&&(s.__isAnimating=!1),(s.__didDecelerationComplete||i)&&s.__scrollComplete(),s.options.zooming&&(s.__computeScrollMax(),s.__zoomComplete&&(s.__zoomComplete(),s.__zoomComplete=null))},s.options.animationDuration,l?M:k)}else s.__scheduledLeft=s.__scrollLeft=e,s.__scheduledTop=s.__scrollTop=t,s.__scheduledZoom=s.__zoomLevel=i,s.__callback&&(s.__callback(e,t,i),s.onScroll()),s.options.zooming&&(s.__computeScrollMax(),s.__zoomComplete&&(s.__zoomComplete(),s.__zoomComplete=null))}},__computeScrollMax:function(e){null==e&&(e=this.__zoomLevel),this.__maxScrollLeft=Math.max(this.__contentWidth*e-this.__clientWidth,0),this.__maxScrollTop=Math.max(this.__contentHeight*e-this.__clientHeight,0)},__computePage:function(){var e=this.__clientWidth,t=this.__clientHeight,i=this.__scrollLeft,o=this.__scrollTop;this.__totalXPage=Math.ceil(this.__contentWidth/e),this.__currentPageX=Math.ceil(i/e+1),this.__totalYPage=Math.ceil(this.__contentHeight/t),this.__currentPageY=Math.ceil(o/t+1)},__scrollComplete:function(){this.options.scrollingComplete()},__startDeceleration:function(){var e=this;if(e.options.paging){var t=Math.max(Math.min(e.__scrollLeft,e.__maxScrollLeft),0),i=Math.max(Math.min(e.__scrollTop,e.__maxScrollTop),0),o=e.__clientWidth,s=e.__clientHeight;e.__minDecelerationScrollLeft=Math.floor(t/o)*o,e.__minDecelerationScrollTop=Math.floor(i/s)*s,e.__maxDecelerationScrollLeft=Math.ceil(t/o)*o,e.__maxDecelerationScrollTop=Math.ceil(i/s)*s}else e.__minDecelerationScrollLeft=0,e.__minDecelerationScrollTop=0,e.__maxDecelerationScrollLeft=e.__maxScrollLeft,e.__maxDecelerationScrollTop=e.__maxScrollTop;var l=e.options.snapping?4:.001;e.__isDecelerating=O.effect.Animate.start(function(t,i,o){e.__stepThroughDeceleration(o)},function(){var t=Math.abs(e.__decelerationVelocityX)>=l||Math.abs(e.__decelerationVelocityY)>=l;return t||(e.__didDecelerationComplete=!0),t},function(){e.__isDecelerating&&(e.__isDecelerating=!1,e.__didDecelerationComplete&&e.__scrollComplete(),e.scrollTo(e.__scrollLeft,e.__scrollTop,e.options.snapping))})},__stepThroughDeceleration:function(e){var t=this.__scrollLeft+this.__decelerationVelocityX,i=this.__scrollTop+this.__decelerationVelocityY;if(!this.options.bouncing){var o=Math.max(Math.min(this.__maxDecelerationScrollLeft,t),this.__minDecelerationScrollLeft);o!==t&&(t=o,this.__decelerationVelocityX=0);var s=Math.max(Math.min(this.__maxDecelerationScrollTop,i),this.__minDecelerationScrollTop);s!==i&&(i=s,this.__decelerationVelocityY=0)}if(e?this.__publish(t,i,this.__zoomLevel):(this.__scrollLeft=t,this.__scrollTop=i),!this.options.paging){this.__decelerationVelocityX*=.95,this.__decelerationVelocityY*=.95}if(this.options.bouncing){var l=0,r=0,n=this.options.penetrationDeceleration,a=this.options.penetrationAcceleration;tthis.__maxDecelerationScrollLeft&&(l=this.__maxDecelerationScrollLeft-t),ithis.__maxDecelerationScrollTop&&(r=this.__maxDecelerationScrollTop-i),0!==l&&(l*this.__decelerationVelocityX<=0?this.__decelerationVelocityX+=l*n:this.__decelerationVelocityX=l*a),0!==r&&(r*this.__decelerationVelocityY<=0?this.__decelerationVelocityY+=r*n:this.__decelerationVelocityY=r*a)}}};for(var H in R)$.prototype[H]=R[H];function X(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var Y=Object.assign||function(e){for(var t=1;t-1?"DOMMouseScroll":"mousewheel",d,!1),l=function(){e.removeEventListener("mousedown",h,!1),document.removeEventListener("mousemove",u,!1),document.removeEventListener("mouseup",_,!1),e.removeEventListener(navigator.userAgent.indexOf("Firefox")>-1?"DOMMouseScroll":"mousewheel",d,!1)}}return t.onScroll=function(){i("onscroll")},l}(this.$el,this.scroller,function(t){switch(t){case"mousedown":e.vuescroll.state.isDragging=!0;break;case"onscroll":e.handleScroll(!1);break;case"mouseup":e.vuescroll.state.isDragging=!1}},s,t);return this.mergedOptions.vuescroll.pullRefresh.enable&&this.registryEvent("refresh"),this.mergedOptions.vuescroll.pushLoad.enable&&this.registryEvent("load"),this.updateScroller(),c},updateSlideModeBarState:function(){var e,t,i=this.$el,o=this.scroller,s=0,l=0,r=this.clientWidth,n=this.clientHeight,a=r+this.scroller.__maxScrollLeft,c=n+this.scroller.__maxScrollTop,h=ro.__maxScrollLeft&&(s=o.__scrollLeft-o.__maxScrollLeft)),u&&(o.__scrollTop<0?l=-o.__scrollTop:o.__scrollTop>o.__maxScrollTop&&(l=o.__scrollTop-o.__maxScrollTop)),e=100*n/(c+l),t=100*r/(a+s);var _=Math.min(Math.max(0,o.__scrollTop),o.__maxScrollTop),d=Math.min(Math.max(0,o.__scrollLeft),o.__maxScrollLeft);this.bar.vBar.state.posValue=100*(_+l)/i.clientHeight,this.bar.hBar.state.posValue=100*(d+s)/i.clientWidth,o.__scrollLeft<0&&(this.bar.hBar.state.posValue=0),o.__scrollTop<0&&(this.bar.vBar.state.posValue=0),this.bar.vBar.state.size=e<100?e+"%":0,this.bar.hBar.state.size=t<100?t+"%":0},registryEvent:function(e){var t="refresh"==e?"refreshDom":"loadDom",i="refresh"==e?this.scroller.activatePullToRefresh:this.scroller.activatePushToLoad,o="refresh"==e?"refreshStage":"loadStage",s=this.$refs[t].elm||this.$refs[t],l=function(e,t,i,o){var s=i.$listeners,l=function(){i.vuescroll.state[t]="active"},r=function(){i.vuescroll.state[t]="deactive"},n=function(){i.vuescroll.state[t]="start",setTimeout(function(){i.scroller.finishRefreshOrLoad()},2e3)},a=function(e){i.vuescroll.state[t]="beforeDeactive",setTimeout(function(){e()},500)};return s[e+"-activate"]&&(l=function(){i.vuescroll.state[t]="active",i.$emit(e+"-activate",i,o)}),s[e+"-before-deactivate"]&&(a=function(s){i.vuescroll.state[t]="beforeDeactive",i.$emit(e+"-before-deactivate",i,o,s.bind(i.scroller))}),s[e+"-deactivate"]&&(r=function(){i.vuescroll.state[t]="deactive",i.$emit(e+"-deactivate",i,o)}),s[e+"-start"]&&(n=function(){i.vuescroll.state[t]="start",i.$emit(e+"-start",i,o,i.scroller.finishRefreshOrLoad.bind(i.scroller))}),{activateCallback:l,deactivateCallback:r,startCallback:n,beforeDeactivateCallback:a}}(e,o,this,s),r=s.offsetHeight;i.bind(this.scroller)(r,l)}}}],mounted:function(){var e=this;this.renderError||(this.initVariables(),this.initVuescrollSizeType(),this.initScroller(),this.initResizeDetection(),this.initWatchOpsChange(),this.updateBarStateAndEmitEvent(),this.$nextTick(function(){e._isDestroyed||(e.updateBarStateAndEmitEvent(),e.initVuescrollPosition())},0))},beforeDestroy:function(){this.destroyParentDomResize&&(this.destroyParentDomResize(),this.destroyParentDomResize=null),this.destroyResize&&(this.destroyResize(),this.destroyResize=null)},data:function(){return{vuescroll:{state:{isDragging:!1,isClickingBar:!1,pointerLeave:!0,internalScrollTop:0,internalScrollLeft:0,posX:null,posY:null,refreshStage:"deactive",loadStage:"deactive",height:"100%",width:"100%"}},scrollPanel:{},scrollContent:{},rail:{vRail:{state:{}},hRail:{state:{}}},bar:{vBar:{state:{posValue:0,size:0,opacity:0}},hBar:{state:{posValue:0,size:0,opacity:0}},renderError:!1}}},render:function(e){var t=this;if(t.renderError)return e("div",[[t.$slots.default]]);var i={style:{position:"relative",height:t.vuescroll.state.height,width:t.vuescroll.state.width,padding:0,overflow:"hidden"},class:"vue-scroll"};return f()?i.on={touchstart:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()},touchend:function(){t.vuescroll.state.pointerLeave=!0,t.hideBar()},touchmove:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()}}:i.on={mouseenter:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()},mouseleave:function(){t.vuescroll.state.pointerLeave=!0,t.hideBar()},mousemove:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()}},e("div",i,[Z(e,t),q(e,t,"vertical"),q(e,t,"horizontal")])},computed:{scrollPanelElm:function(){return this.$refs.scrollPanel.$el},scrollContentElm:function(){return this.$refs.scrollContent._isVue?this.$refs.scrollContent.$el:this.$refs.scrollContent},mode:function(){return this.mergedOptions.vuescroll.mode},pullRefreshTip:function(){return this.mergedOptions.vuescroll.pullRefresh.tips[this.vuescroll.state.refreshStage]},pushLoadTip:function(){return this.mergedOptions.vuescroll.pushLoad.tips[this.vuescroll.state.loadStage]},refreshLoad:function(){return this.mergedOptions.vuescroll.pullRefresh.enable||this.mergedOptions.vuescroll.pushLoad.enable},clientWidth:function(){return Q.call(this,"width")},clientHeight:function(){return Q.call(this,"height")}},methods:{updateBarStateAndEmitEvent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("native"==this.mode||"pure-native"==this.mode)this.updateNativeModeBarState();else if("slide"==this.mode){if(!this.scroller)return;this.updateSlideModeBarState()}e&&this.emitEvent(e,t),this.showAndDefferedHideBar()},updateMode:function(){var e=this.vuescroll.state.internalScrollLeft,t=this.vuescroll.state.internalScrollTop;this.destroyScroller&&(this.scroller.stop(),this.destroyScroller(),this.destroyScroller=null),"slide"==this.mode?this.destroyScroller=this.registryScroller():"native"!=this.mode&&"pure-native"!=this.mode||(this.scrollPanelElm.style.transform="",this.scrollPanelElm.style.transformOrigin=""),this.scrollTo({x:e,y:t},!1,!0)},handleScroll:function(e){this.recordCurrentPos(),this.updateBarStateAndEmitEvent("handle-scroll",e)},setBarClick:function(e){this.vuescroll.state.isClickingBar=e},showAndDefferedHideBar:function(){var e=this;this.showBar(),this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0),this.timeoutId=setTimeout(function(){e.timeoutId=0,e.hideBar()},this.mergedOptions.bar.showDelay)},emitEvent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.scrollPanelElm,o=i.scrollHeight,s=i.scrollWidth,l=i.clientHeight,r=i.clientWidth,n=i.scrollTop,a=i.scrollLeft,c={type:"vertical"},h={type:"horizontal"};"slide"==this.mode&&(o=this.scroller.__contentHeight,s=this.scroller.__contentWidth,n=this.scroller.__scrollTop,a=this.scroller.__scrollLeft,l=this.$el.clientHeight,r=this.$el.clientWidth),c.process=Math.min(n/(o-l),1),h.process=Math.min(a/(s-r),1),c.barSize=this.bar.vBar.state.size,h.barSize=this.bar.hBar.state.size,c.scrollTop=n,h.scrollLeft=a,c.directionY=this.vuescroll.state.posY,h.directionX=this.vuescroll.state.posX,this.$emit(e,c,h,t)},showBar:function(){this.bar.vBar.state.opacity=this.mergedOptions.bar.vBar.opacity,this.bar.hBar.state.opacity=this.mergedOptions.bar.hBar.opacity},hideBar:function(){this.vuescroll.state.isDragging||(this.mergedOptions.bar.vBar.keepShow||this.vuescroll.state.isClickingBar||!this.vuescroll.state.pointerLeave||(this.bar.vBar.state.opacity=0),this.mergedOptions.bar.hBar.keepShow||this.vuescroll.state.isClickingBar||!this.vuescroll.state.pointerLeave||(this.bar.hBar.state.opacity=0))},registryResize:function(){var e=this;this.destroyResize&&this.destroyResize();var t=null;"slide"==this.mode||"pure-native"==this.mode?t=this.scrollPanelElm:"native"==this.mode&&(t=this.scrollContentElm);var i=function(){e.updateBarStateAndEmitEvent(),"slide"==e.mode&&e.updateScroller()};window.addEventListener("resize",i,!1);var o=g(t,function(){var t={};"slide"==e.mode?(e.updateScroller(),t.width=e.scroller.__contentWidth,t.height=e.scroller.__contentHeight):"native"!=e.mode&&"pure-native"!=e.mode||(t.width=e.scrollPanelElm.scrollWidth,t.height=e.scrollPanelElm.scrollHeight),e.updateBarStateAndEmitEvent("handle-resize",t)});this.destroyResize=function(){window.removeEventListener("resize",i,!1),o()}},registryParentResize:function(){this.destroyParentDomResize=g(this.$el.parentNode,this.useNumbericSize)},useNumbericSize:function(){var e=this.$el.parentNode,t=e.style.position;t&&"static"!=t||(this.$el.parentNode.style.position="relative"),this.vuescroll.state.height=e.offsetHeight+"px",this.vuescroll.state.width=e.offsetWidth+"px"},usePercentSize:function(){this.vuescroll.state.height="100%",this.vuescroll.state.width="100%"},setVsSize:function(){"number"==this.mergedOptions.vuescroll.sizeStrategy?(this.useNumbericSize(),this.registryParentResize()):"percent"==this.mergedOptions.vuescroll.sizeStrategy&&(this.destroyParentDomResize&&(this.destroyParentDomResize(),this.destroyParentDomResize=null),this.usePercentSize())},recordCurrentPos:function(){var e=this.mode;this.mode!==this.lastMode&&(e=this.lastMode,this.lastMode=this.mode);var t=this.vuescroll.state,i=function(e,t){var i={};switch(e){case"native":case"pure-native":i={x:t.scrollPanelElm.scrollLeft,y:t.scrollPanelElm.scrollTop};break;case"slide":i={x:t.scroller.__scrollLeft,y:t.scroller.__scrollTop}}return i}(e,this),o=t.internalScrollLeft,s=t.internalScrollTop;t.posX=o-i.x>0?"right":o-i.x<0?"left":null,t.posY=s-i.y>0?"up":s-i.y<0?"down":null,t.internalScrollLeft=i.x,t.internalScrollTop=i.y},initWatchOpsChange:function(){var e=this,t={deep:!0,sync:!0};this.$watch("mergedOptions",function(){e.recordCurrentPos(),setTimeout(function(){if(1==e.isSmallChangeThisTick)return e.isSmallChangeThisTick=!1,void e.updateBarStateAndEmitEvent();e.setVsSize(),e.registryResize(),e.updateMode(),e.updateBarStateAndEmitEvent()},0)},t),y.forEach(function(i){e.$watch(i,function(){e.isSmallChangeThisTick=!0},t)})},scrollToHash:function(){var e=window.location.hash;if(e&&(!(e=e.slice(e.lastIndexOf("#")))||function(e){return/^#[a-zA-Z_]\d*$/.test(e)}(e))){var t=document.querySelector(e);!_(t,this.$el)||this.mergedOptions.scrollPanel.initialScrollY||this.mergedOptions.scrollPanel.initialScrollX||this.scrollIntoView(t)}},initVariables:function(){this.lastMode=this.mode,this.$el._isVuescroll=!0},initScroller:function(){"slide"==this.mode&&(this.destroyScroller=this.registryScroller())},initVuescrollSizeType:function(){this.setVsSize()},initResizeDetection:function(){this.registryResize()},initVuescrollPosition:function(){this.scrollToHash()}}},U={install:function(e){e.component(G.name,G),e.prototype.$vuescrollConfig=o(T,{})},version:"4.5.33"};return"undefined"!=typeof window&&window.Vue&&e.use(U),U}); \ No newline at end of file +!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 t="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};function i(e,o){for(var s in o="object"===(void 0===o?"undefined":t(o))&&o||{},e)o[s]="object"===t(e[s])?i(e[s],o[s]={}):e[s];return o}function o(e,s){for(var l in s=s||{},e)"object"===t(e[l])?void 0===s[l]?(s[l]={},i(e[l],s[l])):o(e[l],s[l]):void 0===s[l]&&(s[l]=e[l]);return s}function s(e,t,i,o){var s=null;(i[t]||"function"==typeof i)&&(o=o||t,"function"==typeof i&&(s=i),Object.defineProperty(e,t,{get:s||function(){return i[o]},configurable:!0}))}var l=void 0;var r={refreshDomStyle:!1,loadDomStyle:!1,hide:!1};var n={};function a(e){if(!r[e]){r[e]=!0;var t=document.createElement("style");t.type="text/css",t.innerHTML=n[e],document.getElementsByTagName("HEAD").item(0).appendChild(t)}}function c(e,t,i){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];"on"==(arguments.length>4&&void 0!==arguments[4]?arguments[4]:"on")?e.addEventListener(t,i,o):e.removeEventListener(t,i,o)}n.refreshDomStyle="\n.vuescroll-refresh {\n position:absolute;\n width: 100%;\n color: black;\n height: 50px;\n text-align: center;\n font-size: 16px;\n line-height: 50px;\n}\n.vuescroll-refresh svg {\n margin-right: 10px;\n width: 25px;\n height: 25px;\n vertical-align: sub;\n}\n.vuescroll-refresh svg path,\n.vuescroll-refresh svg rect{\nfill: #FF6700;\n}\n",n.loadDomStyle="\n.vuescroll-load {\n position:absolute;\n width: 100%;\n color: black;\n height: 50px;\n text-align: center;\n font-size: 16px;\n line-height: 50px;\n}\n.vuescroll-load svg {\n margin-right: 10px;\n width: 25px;\n height: 25px;\n vertical-align: sub;\n}\n.vuescroll-load svg path,\n.vuescroll-load svg rect{\nfill: #FF6700;\n}\n";var h=function(e){console.error("[vuescroll] "+e)},u=function(e){console.warn("[vuescroll] "+e)};function _(e,t){var i=!1;if(!e||!t)return i;for(;e.parentNode!==t&&9!==e.parentNode.nodeType&&!e.parentNode._isVuescroll;)e=e.parentNode;return e.parentNode==t&&(i=!0),i}var d=/(.*?)px/;function p(e){var t=d.exec(e);return t&&t[1]}function f(){return"ontouchstart"in window}function m(e){var t,i=document.documentElement.style;return e.opera&&"[object Opera]"===Object.prototype.toString.call(opera)?t="presto":"MozAppearance"in i?t="gecko":"WebkitAppearance"in i?t="webkit":"string"==typeof navigator.cpuClass&&(t="trident"),{trident:"ms",gecko:"moz",webkit:"webkit",presto:"O"}[t]}function v(e,t){var i="-"+m(window)+"-"+t,o=document.createElement("div");return o.style[e]=i,o.style[e]==i&&i}function g(e,t){return function(e,t){if(e.hasResized)return;var i=document.createElement("object");return e.hasResized=!0,i.style.cssText="display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; padding: 0; margin: 0; opacity: 0; z-index: -1000; pointer-events: none;",i.tabIndex=-1,i.type="text/html",i.data="about:blank",i.isResizeElm=!0,i.onload=function(){c(i.contentDocument.defaultView,"resize",t)},e.appendChild(i),function(){i.contentDocument&&c(i.contentDocument.defaultView,"resize",t,"off"),e.removeChild(i),e.hasResized=!1}}(e,t)}var b=["slide","native","pure-native"],S=function(){},y=["mergedOptions.vuescroll.pullRefresh.tips","mergedOptions.vuescroll.pushLoad.tips","mergedOptions.rail","mergedOptions.bar"],T={vuescroll:{mode:"native",sizeStrategy:"percent",pullRefresh:{enable:!1,tips:{deactive:"Pull to Refresh",active:"Release to Refresh",start:"Refreshing...",beforeDeactive:"Refresh Successfully!"}},pushLoad:{enable:!1,tips:{deactive:"Push to Load",active:"Release to Load",start:"Loading...",beforeDeactive:"Load Successfully!"}},paging:!1,zooming:!0,snapping:{enable:!1,width:100,height:100},scroller:{bouncing:!0,locking:!0,minZoom:.5,maxZoom:3,speedMultiplier:1,penetrationDeceleration:.03,penetrationAcceleration:.08,preventDefault:!0}},scrollPanel:{initialScrollY:!1,initialScrollX:!1,scrollingX:!0,scrollingY:!0,speed:300,easing:void 0},scrollContent:{tag:"div",padding:!1,props:{},attrs:{}},rail:{vRail:{width:"6px",pos:"right",background:"#01a99a",opacity:0},hRail:{height:"6px",pos:"bottom",background:"#01a99a",opacity:0}},bar:{showDelay:500,vBar:{background:"#00a650",keepShow:!1,opacity:1,hover:!1},hBar:{background:"#00a650",keepShow:!1,opacity:1,hover:!1}}};var L={data:function(){return{shouldStopRender:!1,mergedOptions:{vuescroll:{},scrollPanel:{},scrollContent:{},rail:{},bar:{}}}},created:function(){(function(){var e=this;if("vueScroll"===e.$options.name){var t=o(e.$vuescrollConfig,{}),i=o(T,t);e.$options.propsData.ops=e.$options.propsData.ops||{},Object.keys(e.$options.propsData.ops).forEach(function(t){s(e.mergedOptions,t,e.$options.propsData.ops)}),o(i,e.mergedOptions),s(e.mergedOptions.scrollContent,"paddPos",function(){return"padding-"+e.mergedOptions.rail.vRail.pos}),s(e.mergedOptions.scrollContent,"paddValue",function(){return e.mergedOptions.rail.vRail.width})}}).call(this),this.renderError=function(e){var t=!1,i=e.vuescroll,o=e.scrollPanel;~b.indexOf(i.mode)||(h('The vuescroll\'s option "mode" should be one of the '+b),t=!0),i.paging==i.snapping.enable&&i.paging&&(i.pullRefresh||i.pushLoad)&&h("paging, snapping, (pullRefresh with pushLoad) can only one of them to be true.");var s=o.initialScrollY,l=o.initialScrollX;return s&&!String(s).match(/^\d+(\.\d+)?(%)?$/)&&h("The prop `initialScrollY` should be a percent number like 10% or an exact number that greater than or equal to 0 like 100."),l&&!String(l).match(/^\d+(\.\d+)?(%)?$/)&&h("The prop `initialScrollX` should be a percent number like 10% or an exact number that greater than or equal to 0 like 100."),t}(this.mergedOptions)}};function x(e,t){return function(i){return t(e,i)}}function w(e,t){var i=null;return"easeInQuad"===e&&(i=t*t),"easeOutQuad"===e&&(i=t*(2-t)),"easeInOutQuad"===e&&(i=t<.5?2*t*t:(4-2*t)*t-1),"easeInCubic"===e&&(i=t*t*t),"easeOutCubic"===e&&(i=--t*t*t+1),"easeInOutCubic"===e&&(i=t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1),"easeInQuart"===e&&(i=t*t*t*t),"easeOutQuart"===e&&(i=1- --t*t*t*t),"easeInOutQuart"===e&&(i=t<.5?8*t*t*t*t:1-8*--t*t*t*t),"easeInQuint"===e&&(i=t*t*t*t*t),"easeOutQuint"===e&&(i=1+--t*t*t*t*t),"easeInOutQuint"===e&&(i=t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t),i||t}var D=Date.now||function(){return+new Date},z={},P=1,O={effect:{}},C=null;function E(e,t){var i=void 0;return i=(i=/(-?\d+(?:\.\d+?)?)%$/.exec(e))?t*(i=i[1]-0)/100:e-0}C="undefined"!=typeof window?window:{},O.effect.Animate={requestAnimationFrame:function(e){var t=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame,i=!!t;if(t&&!/requestAnimationFrame\(\)\s*\{\s*\[native code\]\s*\}/i.test(t.toString())&&(i=!1),i)return function(e,i){t(e,i)};var o={},s=1,l=null,r=+new Date;return function(e){var t=s++;return o[t]=e,requestCount++,null===l&&(l=setInterval(function(){var e=+new Date,t=o;for(var i in o={},requestCount=0,t)t.hasOwnProperty(i)&&(t[i](e),r=e);e-r>2500&&(clearInterval(l),l=null)},1e3/60)),t}}(C),stop:function(e){var t=null!=z[e];return t&&(z[e]=null),t},isRunning:function(e){return null!=z[e]},start:function(e,t,i,o,s,l){var r=D(),n=r,a=0,c=0,h=P++;if(l||(l=document.body),h%20==0){var u={};for(var _ in z)u[_]=!0;z=u}return z[h]=!0,O.effect.Animate.requestAnimationFrame(function u(_){var d=!0!==_,p=D();if(!z[h]||t&&!t(h))return z[h]=null,void(i&&i(60-c/((p-r)/1e3),h,!1));if(d)for(var f=Math.round((p-n)/(1e3/60))-1,m=0;m1&&(a=1);var v=s?s(a):a;!1!==e(v,p,d)&&1!==a||!d?d&&(n=p,O.effect.Animate.requestAnimationFrame(u,l)):(z[h]=null,i&&i(60-c/((p-r)/1e3),h,1===a||null==o))},l),h}};var A={methods:{scrollTo:function(e){var t=e.x,i=e.y,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=void 0===t?this.vuescroll.state.internalScrollLeft||0:E(t,this.scrollPanelElm.scrollWidth),i=void 0===i?this.vuescroll.state.internalScrollTop||0:E(i,this.scrollPanelElm.scrollHeight),this.internalScrollTo(t,i,o,s)},scrollBy:function(e){var t=e.dx,i=void 0===t?0:t,o=e.dy,s=void 0===o?0:o,l=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.vuescroll.state,n=r.internalScrollLeft,a=void 0===n?0:n,c=r.internalScrollTop,h=void 0===c?0:c;i&&(a+=E(i,this.scrollPanelElm.scrollWidth)),s&&(h+=E(s,this.scrollPanelElm.scrollHeight)),this.internalScrollTo(a,h,l)},zoomBy:function(e,t,i,o,s){"slide"==this.mode?this.scroller.zoomBy(e,t,i,o,s):u("zoomBy and zoomTo are only for slide mode!")},zoomTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments[2],o=arguments[3],s=arguments[4];"slide"==this.mode?this.scroller.zoomTo(e,t,i,o,s):u("zoomBy and zoomTo are only for slide mode!")},getCurrentPage:function(){if("slide"==this.mode&&this.mergedOptions.vuescroll.paging)return this.scroller.getCurrentPage();u("getCurrentPage and goToPage are only for slide mode and paging is enble!")},goToPage:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];"slide"==this.mode&&this.mergedOptions.vuescroll.paging?this.scroller.goToPage(e,t):u("getCurrentPage and goToPage are only for slide mode and paging is enble!")},triggerRefreshOrLoad:function(e){if("slide"==this.mode){var t=this.mergedOptions.vuescroll.pullRefresh.enable,i=this.mergedOptions.vuescroll.pushLoad.enable;if("refresh"!=e||t)if("load"!=e||i)if("refresh"===e||"load"===e){if("start"!=this.vuescroll.state[e+"Stage"])return this.scroller.triggerRefreshOrLoad(e),!0}else u("param must be one of load and refresh!");else u("load must be enabled!");else u("refresh must be enabled!")}else u("You can only use triggerRefreshOrLoad in slide mode!")},getCurrentviewDom:function(){for(var e=this,t=("slide"==this.mode||"pure-native"==this.mode?this.scrollPanelElm:this.scrollContentElm).children,i=[],o=function(t){var i=t.getBoundingClientRect(),o=i.left,s=i.top,l=i.width,r=i.height,n=e.$el.getBoundingClientRect(),a=n.left,c=n.top,h=n.height,u=n.width;return o-a+l>0&&o-a0&&s-ch&&(i=h-r),n+t<0&&(t=-n),n+t>e.scrollWidth&&(t=e.scrollWidth-n);var u=x(s,w);O.effect.Animate.start(function(o){a=n+t*o,c=r+i*o,e.scrollTop=Math.floor(c),e.scrollLeft=Math.floor(a)},function(){return Math.abs(c-r)<=Math.abs(i)||Math.abs(a-n)<=Math.abs(t)},l,o,u)}(this.$refs.scrollPanel.$el,e-this.$refs.scrollPanel.$el.scrollLeft,t-this.$refs.scrollPanel.$el.scrollTop,this.mergedOptions.scrollPanel.speed,this.mergedOptions.scrollPanel.easing,function(){s.updateBarStateAndEmitEvent("handle-scroll-complete")})}else this.$refs.scrollPanel.$el.scrollTop=t,this.$refs.scrollPanel.$el.scrollLeft=e;else"slide"==this.mode&&this.scroller.scrollTo(e,t,i,void 0,o)},scrollIntoView:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.$el;if("string"==typeof e&&(e=i.querySelector(e)),_(e,i)){var o=this.$el.getBoundingClientRect(),s=o.left,l=o.top,r=e.getBoundingClientRect(),n=s-r.left,a=l-r.top;this.scrollBy({dx:-n,dy:-a},t)}else u("The element or selector you passed is not the element of Vuescroll, please pass the element that is in Vuescroll to scrollIntoView API. ")}}},B={methods:{updateNativeModeBarState:function(){var e=this.scrollPanelElm,t=this.$el,i="percent"==this.mergedOptions.vuescroll.sizeStrategy,o=i?t.clientWidth:p(this.vuescroll.state.width),s=i?t.clientHeight:p(this.vuescroll.state.height),l=100*s/e.scrollHeight,r=100*o/e.scrollWidth;this.bar.vBar.state.posValue=100*e.scrollTop/s,this.bar.hBar.state.posValue=100*e.scrollLeft/o,this.bar.vBar.state.size=l<100?l+"%":0,this.bar.hBar.state.size=r<100?r+"%":0}}},M=null,k=null;function $(e,t){for(var i in this.__callback=e,this.options={scrollingX:!0,scrollingY:!0,animating:!0,animationDuration:250,bouncing:!0,locking:!0,paging:!1,snapping:!1,zooming:!1,minZoom:.5,maxZoom:3,speedMultiplier:1,scrollingComplete:S,animatingEasing:"easeOutCubic",noAnimatingEasing:"easeInOutCubic",penetrationDeceleration:.03,penetrationAcceleration:.08},t)this.options[i]=t[i];M=x(this.options.animatingEasing,w),k=x(this.options.noAnimatingEasing,w)}var R={__isSingleTouch:!1,__isTracking:!1,__didDecelerationComplete:!1,__isGesturing:!1,__isDragging:!1,__isDecelerating:!1,__isAnimating:!1,__clientLeft:0,__clientTop:0,__clientWidth:0,__clientHeight:0,__contentWidth:0,__contentHeight:0,__snapWidth:100,__snapHeight:100,__refreshHeight:null,__loadHeight:null,__refreshActive:!1,__refreshActivate:null,__refreshBeforeDeactivate:null,__refreshDeactivate:null,__refreshStart:null,__loadActive:null,__loadActivate:null,__loadBeforeDeactivate:null,__loadDeactivate:null,__loadStart:null,__zoomLevel:1,__scrollLeft:0,__scrollTop:0,__maxScrollLeft:0,__maxScrollTop:0,__scheduledLeft:0,__scheduledTop:0,__scheduledZoom:0,__currentPageX:null,__currentPageY:null,__totalXPage:null,__totalYPage:null,__disable:!1,__lastTouchLeft:null,__lastTouchTop:null,__lastTouchMove:null,__positions:null,__minDecelerationScrollLeft:null,__minDecelerationScrollTop:null,__maxDecelerationScrollLeft:null,__maxDecelerationScrollTop:null,__decelerationVelocityX:null,__decelerationVelocityY:null,setDimensions:function(e,t,i,o){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:trye;e===+e&&(this.__clientWidth=e),t===+t&&(this.__clientHeight=t),i===+i&&(this.__contentWidth=i),o===+o&&(this.__contentHeight=o),this.__computeScrollMax(),this.scrollTo(this.__scrollLeft,this.__scrollTop,s)},setPosition:function(e,t){this.__clientLeft=e||0,this.__clientTop=t||0},setSnapSize:function(e,t){this.__snapWidth=e,this.__snapHeight=t},activatePullToRefresh:function(e,t){var i=t.activateCallback,o=t.deactivateCallback,s=t.startCallback,l=t.beforeDeactivateCallback;this.__refreshHeight=e,this.__refreshActivate=i,this.__refreshBeforeDeactivate=l,this.__refreshDeactivate=o,this.__refreshStart=s},activatePushToLoad:function(e,t){var i=t.activateCallback,o=t.deactivateCallback,s=t.startCallback,l=t.beforeDeactivateCallback;this.__loadHeight=e,this.__loadActivate=i,this.__loadBeforeDeactivate=l,this.__loadDeactivate=o,this.__loadStart=s},triggerRefreshOrLoad:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"refresh",t=this.__isDecelerating;t&&(O.effect.Animate.stop(t),this.__isDecelerating=!1),"refresh"==e?(this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0),this.__refreshStart&&(this.__refreshStart(),this.__refreshActive=!0)):(this.__publish(this.__scrollLeft,this.__maxScrollTop+this.__loadHeight,this.__zoomLevel,!0),this.__loadStart&&(this.__loadStart(),this.__loadActive=!0))},finishRefreshOrLoad:function(){var e=this;e.__refreshBeforeDeactivate&&e.__refreshActive?(e.__refreshActive=!1,e.__refreshBeforeDeactivate(function(){e.__refreshDeactivate&&e.__refreshDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)})):e.__refreshDeactivate&&e.__refreshActive&&(e.__refreshActive=!1,e.__refreshDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)),e.__loadBeforeDeactivate&&e.__loadActive?(e.__loadActive=!1,e.__loadBeforeDeactivate(function(){e.__loadDeactivate&&e.__loadDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)})):e.__loadDeactivate&&e.__loadActive&&(e.__loadActive=!1,e.__loadDeactivate(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0))},getValues:function(){return{left:this.__scrollLeft,top:this.__scrollTop,zoom:this.__zoomLevel}},getScrollMax:function(){return{left:this.__maxScrollLeft,top:this.__maxScrollTop}},zoomTo:function(e,t,i,o,s){if(!this.options.zooming)throw new Error("Zooming is not enabled!");s&&(this.__zoomComplete=s),this.__isDecelerating&&(O.effect.Animate.stop(this.__isDecelerating),this.__isDecelerating=!1);var l=this.__zoomLevel;null==i&&(i=this.__clientWidth/2),null==o&&(o=this.__clientHeight/2),e=Math.max(Math.min(e,this.options.maxZoom),this.options.minZoom),this.__computeScrollMax(e);var r=(i+this.__scrollLeft)*e/l-i,n=(o+this.__scrollTop)*e/l-o;r>this.__maxScrollLeft?r=this.__maxScrollLeft:r<0&&(r=0),n>this.__maxScrollTop?n=this.__maxScrollTop:n<0&&(n=0),this.__publish(r,n,e,t)},zoomBy:function(e,t,i,o,s){this.zoomTo(this.__zoomLevel*e,t,i,o,s)},scrollTo:function(e,t,i,o,s){if(this.__isDecelerating&&(O.effect.Animate.stop(this.__isDecelerating),this.__isDecelerating=!1),null!=o&&o!==this.__zoomLevel){if(!this.options.zooming)throw new Error("Zooming is not enabled!");e*=o,t*=o,this.__computeScrollMax(o)}else o=this.__zoomLevel;this.options.scrollingX||s?this.options.paging?e=Math.round(e/this.__clientWidth)*this.__clientWidth:this.options.snapping&&(e=Math.round(e/this.__snapWidth)*this.__snapWidth):e=this.__scrollLeft,this.options.scrollingY||s?this.options.paging?t=Math.round(t/this.__clientHeight)*this.__clientHeight:this.options.snapping&&(t=Math.round(t/this.__snapHeight)*this.__snapHeight):t=this.__scrollTop,e=Math.max(Math.min(this.__maxScrollLeft,e),0),t=Math.max(Math.min(this.__maxScrollTop,t),0),e===this.__scrollLeft&&t===this.__scrollTop&&(i=!1),this.__isTracking||this.__publish(e,t,o,i)},scrollBy:function(e,t,i){var o=this.__isAnimating?this.__scheduledLeft:this.__scrollLeft,s=this.__isAnimating?this.__scheduledTop:this.__scrollTop;this.scrollTo(o+(e||0),s+(t||0),i)},getCurrentPage:function(){return this.__computePage(),{x:this.__currentPageX,y:this.__currentPageY}},goToPage:function(e,t){var i=e.x,o=e.y;isNaN(i)&&(i=1),isNaN(o)&&(o=1),this.scrollTo((i-1)*this.__clientWidth,(o-1)*this.__clientHeight,t)},doMouseZoom:function(e,t,i,o){var s=e>0?.97:1.03;return this.zoomTo(this.__zoomLevel*s,!1,i-this.__clientLeft,o-this.__clientTop)},doTouchStart:function(e,t){if(null==e.length)throw new Error("Invalid touch list: "+e);if(t instanceof Date&&(t=t.valueOf()),"number"!=typeof t)throw new Error("Invalid timestamp value: "+t);var i,o;this.__interruptedAnimation=!0,this.__isDecelerating&&(O.effect.Animate.stop(this.__isDecelerating),this.__isDecelerating=!1,this.__interruptedAnimation=!0),this.__isAnimating&&(O.effect.Animate.stop(this.__isAnimating),this.__isAnimating=!1,this.__interruptedAnimation=!0);var s=1===e.length;s?(i=e[0].pageX,o=e[0].pageY):(i=Math.abs(e[0].pageX+e[1].pageX)/2,o=Math.abs(e[0].pageY+e[1].pageY)/2),this.__initialTouchLeft=i,this.__initialTouchTop=o,this.__zoomLevelStart=this.__zoomLevel,this.__lastTouchLeft=i,this.__lastTouchTop=o,this.__lastTouchMove=t,this.__lastScale=1,this.__enableScrollX=!s&&this.options.scrollingX,this.__enableScrollY=!s&&this.options.scrollingY,this.__isTracking=!0,this.__didDecelerationComplete=!1,this.__isDragging=!s,this.__isSingleTouch=s,this.__positions=[]},doTouchMove:function(e,t,i){if(null==e.length)throw new Error("Invalid touch list: "+e);if(t instanceof Date&&(t=t.valueOf()),"number"!=typeof t)throw new Error("Invalid timestamp value: "+t);if(this.__isTracking){var o,s;2===e.length?(o=Math.abs(e[0].pageX+e[1].pageX)/2,s=Math.abs(e[0].pageY+e[1].pageY)/2):(o=e[0].pageX,s=e[0].pageY);var l=this.__positions;if(this.__isDragging){var r=o-this.__lastTouchLeft,n=s-this.__lastTouchTop,a=this.__scrollLeft,c=this.__scrollTop,h=this.__zoomLevel;if(null!=i&&this.options.zooming){var u=h;if(h=h/this.__lastScale*i,u!==(h=Math.max(Math.min(h,this.options.maxZoom),this.options.minZoom))){var _=o-this.__clientLeft,d=s-this.__clientTop;a=(_+a)*h/u-_,c=(d+c)*h/u-d,this.__computeScrollMax(h)}}if(this.__enableScrollX){a-=r*this.options.speedMultiplier;var p=this.__maxScrollLeft;(a>p||a<0)&&(this.options.bouncing?a+=r/2*this.options.speedMultiplier:a=a>p?p:0)}if(this.__enableScrollY){c-=n*this.options.speedMultiplier;var f=this.__maxScrollTop;(c>f||c<0)&&(this.options.bouncing?(c+=n/2*this.options.speedMultiplier,this.__enableScrollX||null==this.__refreshHeight&&null==this.__loadHeight||(!this.__refreshActive&&c<=-this.__refreshHeight?(this.__refreshActive=!0,this.__refreshActivate&&this.__refreshActivate()):this.__refreshActive&&c>-this.__refreshHeight?(this.__refreshActive=!1,this.__refreshDeactivate&&this.__refreshDeactivate()):!this.__loadActive&&c>=this.__maxScrollTop+this.__loadHeight?(this.__loadActive=!0,this.__loadActivate&&this.__loadActivate()):this.__refreshActive&&cf?f:0)}l.length>60&&l.splice(0,30),l.push(a,c,t),this.__publish(a,c,h)}else{var m=this.options.locking?3:0,v=Math.abs(o-this.__initialTouchLeft),g=Math.abs(s-this.__initialTouchTop);this.__enableScrollX=this.options.scrollingX&&v>=m,this.__enableScrollY=this.options.scrollingY&&g>=m,l.push(this.__scrollLeft,this.__scrollTop,t),this.__isDragging=(this.__enableScrollX||this.__enableScrollY)&&(v>=5||g>=5),this.__isDragging&&(this.__interruptedAnimation=!1)}this.__lastTouchLeft=o,this.__lastTouchTop=s,this.__lastTouchMove=t,this.__lastScale=i}},doTouchEnd:function(e){if(e instanceof Date&&(e=e.valueOf()),"number"!=typeof e)throw new Error("Invalid timestamp value: "+e);if(this.__isTracking){if(this.__isTracking=!1,this.__isDragging)if(this.__isDragging=!1,this.__isSingleTouch&&this.options.animating&&e-this.__lastTouchMove<=100){for(var t=this.__positions,i=t.length-1,o=i,s=i;s>0&&t[s]>this.__lastTouchMove-100;s-=3)o=s;if(o!==i){var l=t[i]-t[o],r=this.__scrollLeft-t[o-2],n=this.__scrollTop-t[o-1];this.__decelerationVelocityX=r/l*(1e3/60),this.__decelerationVelocityY=n/l*(1e3/60);var a=this.options.paging||this.options.snapping?4:1;Math.abs(this.__decelerationVelocityX)>a||Math.abs(this.__decelerationVelocityY)>a?this.__refreshActive||this.__loadActive||this.__startDeceleration(e):this.__scrollComplete()}else this.__scrollComplete()}else e-this.__lastTouchMove>100&&this.__scrollComplete();this.__isDecelerating||(this.__refreshActive&&this.__refreshStart?(this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0),this.__refreshStart&&this.__refreshStart()):this.__loadActive&&this.__loadStart?(this.__publish(this.__scrollLeft,this.__maxScrollTop+this.__loadHeight,this.__zoomLevel,!0),this.__loadStart&&this.__loadStart()):((this.__interruptedAnimation||this.__isDragging)&&this.__scrollComplete(),this.scrollTo(this.__scrollLeft,this.__scrollTop,!0,this.__zoomLevel),this.__refreshActive?(this.__refreshActive=!1,this.__refreshDeactivate&&this.__refreshDeactivate()):this.__loadActive&&(this.__loadActive=!1,this.__loadDeactivate&&this.__loadDeactivate()))),this.__positions.length=0}},onScroll:S,stop:function(){this.__disable=!0},start:function(){self.__disable=!0},__publish:function(e,t,i,o){var s=this;if(!s.__disable){isNaN(e)&&(e=this.__scrollLeft),isNaN(t)&&(t=this.__scrollTop);var l=s.__isAnimating;if(l&&(O.effect.Animate.stop(l),s.__isAnimating=!1),o&&s.options.animating){s.__scheduledLeft=e,s.__scheduledTop=t,s.__scheduledZoom=i;var r=s.__scrollLeft,n=s.__scrollTop,a=s.__zoomLevel,c=e-r,h=t-n,u=i-a;s.__isAnimating=O.effect.Animate.start(function(e,t,i){i&&(s.__scrollLeft=r+c*e,s.__scrollTop=n+h*e,s.__zoomLevel=a+u*e,s.__callback&&(s.__callback(s.__scrollLeft,s.__scrollTop,s.__zoomLevel),s.onScroll()))},function(e){return s.__isAnimating===e},function(e,t,i){t===s.__isAnimating&&(s.__isAnimating=!1),(s.__didDecelerationComplete||i)&&s.__scrollComplete(),s.options.zooming&&(s.__computeScrollMax(),s.__zoomComplete&&(s.__zoomComplete(),s.__zoomComplete=null))},s.options.animationDuration,l?M:k)}else s.__scheduledLeft=s.__scrollLeft=e,s.__scheduledTop=s.__scrollTop=t,s.__scheduledZoom=s.__zoomLevel=i,s.__callback&&(s.__callback(e,t,i),s.onScroll()),s.options.zooming&&(s.__computeScrollMax(),s.__zoomComplete&&(s.__zoomComplete(),s.__zoomComplete=null))}},__computeScrollMax:function(e){null==e&&(e=this.__zoomLevel),this.__maxScrollLeft=Math.max(this.__contentWidth*e-this.__clientWidth,0),this.__maxScrollTop=Math.max(this.__contentHeight*e-this.__clientHeight,0)},__computePage:function(){var e=this.__clientWidth,t=this.__clientHeight,i=this.__scrollLeft,o=this.__scrollTop;this.__totalXPage=Math.ceil(this.__contentWidth/e),this.__currentPageX=Math.ceil(i/e+1),this.__totalYPage=Math.ceil(this.__contentHeight/t),this.__currentPageY=Math.ceil(o/t+1)},__scrollComplete:function(){this.options.scrollingComplete()},__startDeceleration:function(){var e=this;if(e.options.paging){var t=Math.max(Math.min(e.__scrollLeft,e.__maxScrollLeft),0),i=Math.max(Math.min(e.__scrollTop,e.__maxScrollTop),0),o=e.__clientWidth,s=e.__clientHeight;e.__minDecelerationScrollLeft=Math.floor(t/o)*o,e.__minDecelerationScrollTop=Math.floor(i/s)*s,e.__maxDecelerationScrollLeft=Math.ceil(t/o)*o,e.__maxDecelerationScrollTop=Math.ceil(i/s)*s}else e.__minDecelerationScrollLeft=0,e.__minDecelerationScrollTop=0,e.__maxDecelerationScrollLeft=e.__maxScrollLeft,e.__maxDecelerationScrollTop=e.__maxScrollTop;var l=e.options.snapping?4:.001;e.__isDecelerating=O.effect.Animate.start(function(t,i,o){e.__stepThroughDeceleration(o)},function(){var t=Math.abs(e.__decelerationVelocityX)>=l||Math.abs(e.__decelerationVelocityY)>=l;return t||(e.__didDecelerationComplete=!0),t},function(){e.__isDecelerating&&(e.__isDecelerating=!1,e.__didDecelerationComplete&&e.__scrollComplete(),e.scrollTo(e.__scrollLeft,e.__scrollTop,e.options.snapping))})},__stepThroughDeceleration:function(e){var t=this.__scrollLeft+this.__decelerationVelocityX,i=this.__scrollTop+this.__decelerationVelocityY;if(!this.options.bouncing){var o=Math.max(Math.min(this.__maxDecelerationScrollLeft,t),this.__minDecelerationScrollLeft);o!==t&&(t=o,this.__decelerationVelocityX=0);var s=Math.max(Math.min(this.__maxDecelerationScrollTop,i),this.__minDecelerationScrollTop);s!==i&&(i=s,this.__decelerationVelocityY=0)}if(e?this.__publish(t,i,this.__zoomLevel):(this.__scrollLeft=t,this.__scrollTop=i),!this.options.paging){this.__decelerationVelocityX*=.95,this.__decelerationVelocityY*=.95}if(this.options.bouncing){var l=0,r=0,n=this.options.penetrationDeceleration,a=this.options.penetrationAcceleration;tthis.__maxDecelerationScrollLeft&&(l=this.__maxDecelerationScrollLeft-t),ithis.__maxDecelerationScrollTop&&(r=this.__maxDecelerationScrollTop-i),0!==l&&(l*this.__decelerationVelocityX<=0?this.__decelerationVelocityX+=l*n:this.__decelerationVelocityX=l*a),0!==r&&(r*this.__decelerationVelocityY<=0?this.__decelerationVelocityY+=r*n:this.__decelerationVelocityY=r*a)}}};for(var H in R)$.prototype[H]=R[H];function X(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var Y=Object.assign||function(e){for(var t=1;t-1?"DOMMouseScroll":"mousewheel",d,!1),l=function(){e.removeEventListener("mousedown",h,!1),document.removeEventListener("mousemove",u,!1),document.removeEventListener("mouseup",_,!1),e.removeEventListener(navigator.userAgent.indexOf("Firefox")>-1?"DOMMouseScroll":"mousewheel",d,!1)}}return t.onScroll=function(){i("onscroll")},l}(this.$el,this.scroller,function(t){switch(t){case"mousedown":e.vuescroll.state.isDragging=!0;break;case"onscroll":e.handleScroll(!1);break;case"mouseup":e.vuescroll.state.isDragging=!1}},s,t);return this.mergedOptions.vuescroll.pullRefresh.enable&&this.registryEvent("refresh"),this.mergedOptions.vuescroll.pushLoad.enable&&this.registryEvent("load"),this.updateScroller(),c},updateSlideModeBarState:function(){var e,t,i=this.$el,o=this.scroller,s=0,l=0,r=this.clientWidth,n=this.clientHeight,a=r+this.scroller.__maxScrollLeft,c=n+this.scroller.__maxScrollTop,h=ro.__maxScrollLeft&&(s=o.__scrollLeft-o.__maxScrollLeft)),u&&(o.__scrollTop<0?l=-o.__scrollTop:o.__scrollTop>o.__maxScrollTop&&(l=o.__scrollTop-o.__maxScrollTop)),e=100*n/(c+l),t=100*r/(a+s);var _=Math.min(Math.max(0,o.__scrollTop),o.__maxScrollTop),d=Math.min(Math.max(0,o.__scrollLeft),o.__maxScrollLeft);this.bar.vBar.state.posValue=100*(_+l)/i.clientHeight,this.bar.hBar.state.posValue=100*(d+s)/i.clientWidth,o.__scrollLeft<0&&(this.bar.hBar.state.posValue=0),o.__scrollTop<0&&(this.bar.vBar.state.posValue=0),this.bar.vBar.state.size=e<100?e+"%":0,this.bar.hBar.state.size=t<100?t+"%":0},registryEvent:function(e){var t="refresh"==e?"refreshDom":"loadDom",i="refresh"==e?this.scroller.activatePullToRefresh:this.scroller.activatePushToLoad,o="refresh"==e?"refreshStage":"loadStage",s=this.$refs[t].elm||this.$refs[t],l=function(e,t,i,o){var s=i.$listeners,l=function(){i.vuescroll.state[t]="active"},r=function(){i.vuescroll.state[t]="deactive"},n=function(){i.vuescroll.state[t]="start",setTimeout(function(){i.scroller.finishRefreshOrLoad()},2e3)},a=function(e){i.vuescroll.state[t]="beforeDeactive",setTimeout(function(){e()},500)};return s[e+"-activate"]&&(l=function(){i.vuescroll.state[t]="active",i.$emit(e+"-activate",i,o)}),s[e+"-before-deactivate"]&&(a=function(s){i.vuescroll.state[t]="beforeDeactive",i.$emit(e+"-before-deactivate",i,o,s.bind(i.scroller))}),s[e+"-deactivate"]&&(r=function(){i.vuescroll.state[t]="deactive",i.$emit(e+"-deactivate",i,o)}),s[e+"-start"]&&(n=function(){i.vuescroll.state[t]="start",i.$emit(e+"-start",i,o,i.scroller.finishRefreshOrLoad.bind(i.scroller))}),{activateCallback:l,deactivateCallback:r,startCallback:n,beforeDeactivateCallback:a}}(e,o,this,s),r=s.offsetHeight;i.bind(this.scroller)(r,l)}}}],mounted:function(){var e=this;this.renderError||(this.initVariables(),this.initVuescrollSizeType(),this.initScroller(),this.initResizeDetection(),this.initWatchOpsChange(),this.updateBarStateAndEmitEvent(),this.$nextTick(function(){e._isDestroyed||(e.updateBarStateAndEmitEvent(),e.initVuescrollPosition())},0))},beforeDestroy:function(){this.destroyParentDomResize&&(this.destroyParentDomResize(),this.destroyParentDomResize=null),this.destroyResize&&(this.destroyResize(),this.destroyResize=null)},data:function(){return{vuescroll:{state:{isDragging:!1,isClickingBar:!1,pointerLeave:!0,internalScrollTop:0,internalScrollLeft:0,posX:null,posY:null,refreshStage:"deactive",loadStage:"deactive",height:"100%",width:"100%"}},scrollPanel:{},scrollContent:{},rail:{vRail:{state:{}},hRail:{state:{}}},bar:{vBar:{state:{posValue:0,size:0,opacity:0}},hBar:{state:{posValue:0,size:0,opacity:0}},renderError:!1}}},render:function(e){var t=this;if(t.renderError)return e("div",[[t.$slots.default]]);var i={style:{position:"relative",height:t.vuescroll.state.height,width:t.vuescroll.state.width,padding:0,overflow:"hidden"},class:"vue-scroll"};return f()?i.on={touchstart:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()},touchend:function(){t.vuescroll.state.pointerLeave=!0,t.hideBar()},touchmove:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()}}:i.on={mouseenter:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()},mouseleave:function(){t.vuescroll.state.pointerLeave=!0,t.hideBar()},mousemove:function(){t.vuescroll.state.pointerLeave=!1,t.updateBarStateAndEmitEvent()}},e("div",i,[Z(e,t),q(e,t,"vertical"),q(e,t,"horizontal")])},computed:{scrollPanelElm:function(){return this.$refs.scrollPanel.$el},scrollContentElm:function(){return this.$refs.scrollContent._isVue?this.$refs.scrollContent.$el:this.$refs.scrollContent},mode:function(){return this.mergedOptions.vuescroll.mode},pullRefreshTip:function(){return this.mergedOptions.vuescroll.pullRefresh.tips[this.vuescroll.state.refreshStage]},pushLoadTip:function(){return this.mergedOptions.vuescroll.pushLoad.tips[this.vuescroll.state.loadStage]},refreshLoad:function(){return this.mergedOptions.vuescroll.pullRefresh.enable||this.mergedOptions.vuescroll.pushLoad.enable},clientWidth:function(){return Q.call(this,"width")},clientHeight:function(){return Q.call(this,"height")}},methods:{updateBarStateAndEmitEvent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("native"==this.mode||"pure-native"==this.mode)this.updateNativeModeBarState();else if("slide"==this.mode){if(!this.scroller)return;this.updateSlideModeBarState()}e&&this.emitEvent(e,t),this.showAndDefferedHideBar()},updateMode:function(){var e=this.vuescroll.state.internalScrollLeft,t=this.vuescroll.state.internalScrollTop;this.destroyScroller&&(this.scroller.stop(),this.destroyScroller(),this.destroyScroller=null),"slide"==this.mode?this.destroyScroller=this.registryScroller():"native"!=this.mode&&"pure-native"!=this.mode||(this.scrollPanelElm.style.transform="",this.scrollPanelElm.style.transformOrigin=""),this.scrollTo({x:e,y:t},!1,!0)},handleScroll:function(e){this.recordCurrentPos(),this.updateBarStateAndEmitEvent("handle-scroll",e)},setBarClick:function(e){this.vuescroll.state.isClickingBar=e},showAndDefferedHideBar:function(){var e=this;this.showBar(),this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0),this.timeoutId=setTimeout(function(){e.timeoutId=0,e.hideBar()},this.mergedOptions.bar.showDelay)},emitEvent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.scrollPanelElm,o=i.scrollHeight,s=i.scrollWidth,l=i.clientHeight,r=i.clientWidth,n=i.scrollTop,a=i.scrollLeft,c={type:"vertical"},h={type:"horizontal"};"slide"==this.mode&&(o=this.scroller.__contentHeight,s=this.scroller.__contentWidth,n=this.scroller.__scrollTop,a=this.scroller.__scrollLeft,l=this.$el.clientHeight,r=this.$el.clientWidth),c.process=Math.min(n/(o-l),1),h.process=Math.min(a/(s-r),1),c.barSize=this.bar.vBar.state.size,h.barSize=this.bar.hBar.state.size,c.scrollTop=n,h.scrollLeft=a,c.directionY=this.vuescroll.state.posY,h.directionX=this.vuescroll.state.posX,this.$emit(e,c,h,t)},showBar:function(){this.bar.vBar.state.opacity=this.mergedOptions.bar.vBar.opacity,this.bar.hBar.state.opacity=this.mergedOptions.bar.hBar.opacity},hideBar:function(){this.vuescroll.state.isDragging||(this.mergedOptions.bar.vBar.keepShow||this.vuescroll.state.isClickingBar||!this.vuescroll.state.pointerLeave||(this.bar.vBar.state.opacity=0),this.mergedOptions.bar.hBar.keepShow||this.vuescroll.state.isClickingBar||!this.vuescroll.state.pointerLeave||(this.bar.hBar.state.opacity=0))},registryResize:function(){var e=this;this.destroyResize&&this.destroyResize();var t=null;"slide"==this.mode||"pure-native"==this.mode?t=this.scrollPanelElm:"native"==this.mode&&(t=this.scrollContentElm);var i=function(){e.updateBarStateAndEmitEvent(),"slide"==e.mode&&e.updateScroller()};window.addEventListener("resize",i,!1);var o=g(t,function(){var t={};"slide"==e.mode?(e.updateScroller(),t.width=e.scroller.__contentWidth,t.height=e.scroller.__contentHeight):"native"!=e.mode&&"pure-native"!=e.mode||(t.width=e.scrollPanelElm.scrollWidth,t.height=e.scrollPanelElm.scrollHeight),e.updateBarStateAndEmitEvent("handle-resize",t)});this.destroyResize=function(){window.removeEventListener("resize",i,!1),o()}},registryParentResize:function(){this.destroyParentDomResize=g(this.$el.parentNode,this.useNumbericSize)},useNumbericSize:function(){var e=this.$el.parentNode,t=e.style.position;t&&"static"!=t||(this.$el.parentNode.style.position="relative"),this.vuescroll.state.height=e.offsetHeight+"px",this.vuescroll.state.width=e.offsetWidth+"px"},usePercentSize:function(){this.vuescroll.state.height="100%",this.vuescroll.state.width="100%"},setVsSize:function(){"number"==this.mergedOptions.vuescroll.sizeStrategy?(this.useNumbericSize(),this.registryParentResize()):"percent"==this.mergedOptions.vuescroll.sizeStrategy&&(this.destroyParentDomResize&&(this.destroyParentDomResize(),this.destroyParentDomResize=null),this.usePercentSize())},recordCurrentPos:function(){var e=this.mode;this.mode!==this.lastMode&&(e=this.lastMode,this.lastMode=this.mode);var t=this.vuescroll.state,i=function(e,t){var i={};switch(e){case"native":case"pure-native":i={x:t.scrollPanelElm.scrollLeft,y:t.scrollPanelElm.scrollTop};break;case"slide":i={x:t.scroller.__scrollLeft,y:t.scroller.__scrollTop}}return i}(e,this),o=t.internalScrollLeft,s=t.internalScrollTop;t.posX=o-i.x>0?"right":o-i.x<0?"left":null,t.posY=s-i.y>0?"up":s-i.y<0?"down":null,t.internalScrollLeft=i.x,t.internalScrollTop=i.y},initWatchOpsChange:function(){var e=this,t={deep:!0,sync:!0};this.$watch("mergedOptions",function(){e.recordCurrentPos(),setTimeout(function(){if(1==e.isSmallChangeThisTick)return e.isSmallChangeThisTick=!1,void e.updateBarStateAndEmitEvent();e.setVsSize(),e.registryResize(),e.updateMode(),e.updateBarStateAndEmitEvent()},0)},t),y.forEach(function(i){e.$watch(i,function(){e.isSmallChangeThisTick=!0},t)})},scrollToHash:function(){var e=window.location.hash;if(e&&(!(e=e.slice(e.lastIndexOf("#")))||function(e){return/^#[a-zA-Z_]\d*$/.test(e)}(e))){var t=document.querySelector(e);!_(t,this.$el)||this.mergedOptions.scrollPanel.initialScrollY||this.mergedOptions.scrollPanel.initialScrollX||this.scrollIntoView(t)}},initVariables:function(){this.lastMode=this.mode,this.$el._isVuescroll=!0},initScroller:function(){"slide"==this.mode&&(this.destroyScroller=this.registryScroller())},initVuescrollSizeType:function(){this.setVsSize()},initResizeDetection:function(){this.registryResize()},initVuescrollPosition:function(){this.scrollToHash()}}},U={install:function(e){e.component(G.name,G),e.prototype.$vuescrollConfig=o(T,{})},version:"4.5.33"};return"undefined"!=typeof window&&window.Vue&&e.use(U),U}); \ No newline at end of file diff --git a/src/components/child-components/vuescroll-bar.js b/src/components/child-components/vuescroll-bar.js index 68624b8c..209c61cc 100644 --- a/src/components/child-components/vuescroll-bar.js +++ b/src/components/child-components/vuescroll-bar.js @@ -165,7 +165,7 @@ export default { [vm.bar.posName]: 0, [vm.bar.opsSize]: '100%', [vm.bar.size]: vm.state.size, - borderRadius: vm.ops.rail[vm.bar.opsSize], + borderRadius: 'inherit', background: vm.ops.bar.background, opacity: vm.state.opacity, transform: `translate${scrollMap[vm.type].axis}(${vm.state.posValue}%)`, @@ -201,7 +201,8 @@ export default { class: `vuescroll-${vm.type}-rail`, style: { position: 'absolute', - borderRadius: vm.ops.rail[vm.bar.opsSize], + zIndex: 1, + // borderRadius: vm.ops.rail[vm.bar.opsSize], background: railBackgroundColor, [vm.bar.opsSize]: vm.ops.rail[vm.bar.opsSize], [vm.bar.posName]: '2px',