UNPKG

@minix-iot/ui

Version:

基于Vue的移动端轻量级UI组件库

26 lines 122 kB
/*!
 * @minix-iot/ui v0.2.4 - scrollview.js, 2709badeb34a699cd765, Wed Nov 24 2021 14:21:12 GMT+0800 (中国标准时间)
 * (c) 2017-2020 JDC
 * Released under the MIT License.
 */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define("scrollview",["vue"],e):"object"==typeof exports?exports.scrollview=e(require("vue")):t.scrollview=e(t.Vue)}("undefined"!=typeof self?self:this,(function(t){return function(t){var e={};function o(s){if(e[s])return e[s].exports;var i=e[s]={i:s,l:!1,exports:{}};return t[s].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=t,o.c=e,o.d=function(t,e,s){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(o.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(s,i,function(e){return t[e]}.bind(null,i));return s},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="./",o(o.s=103)}({0:function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},1:function(t,e){t.exports=function(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t},t.exports.default=t.exports,t.exports.__esModule=!0},10:function(t,e,o){var s=o(7);t.exports=function(t,e){if(t){if("string"==typeof t)return s(t,e);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?s(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},103:function(t,e,o){"use strict";o.r(e);var s=o(5),i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)};
/*!
 * better-scroll / better-scroll
 * (c) 2016-2021 ustbhuangyi
 * Released under the MIT License.
 */
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function r(t,e){function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}var n=function(){return(n=Object.assign||function(t){for(var e,o=1,s=arguments.length;o<s;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function l(t,e,o,s){return new(o||(o=Promise))((function(i,r){function n(t){try{h(s.next(t))}catch(t){r(t)}}function l(t){try{h(s.throw(t))}catch(t){r(t)}}function h(t){var e;t.done?i(t.value):(e=t.value,e instanceof o?e:new o((function(t){t(e)}))).then(n,l)}h((s=s.apply(t,e||[])).next())}))}function h(t,e){var o,s,i,r,n={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function l(r){return function(l){return function(r){if(o)throw new TypeError("Generator is already executing.");for(;n;)try{if(o=1,s&&(i=2&r[0]?s.return:r[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,r[1])).done)return i;switch(s=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return n.label++,{value:r[1],done:!1};case 5:n.label++,s=r[1],r=[0];continue;case 7:r=n.ops.pop(),n.trys.pop();continue;default:if(!(i=n.trys,(i=i.length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){n=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){n.label=r[1];break}if(6===r[0]&&n.label<i[1]){n.label=i[1],i=r;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(r);break}i[2]&&n.ops.pop(),n.trys.pop();continue}r=e.call(t,n)}catch(t){r=[6,t],s=0}finally{o=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,l])}}}function a(){for(var t=0,e=0,o=arguments.length;e<o;e++)t+=arguments[e].length;var s=Array(t),i=0;for(e=0;e<o;e++)for(var r=arguments[e],n=0,l=r.length;n<l;n++,i++)s[i]=r[n];return s}var c=[{sourceKey:"scroller.scrollBehaviorX.currentPos",key:"x"},{sourceKey:"scroller.scrollBehaviorY.currentPos",key:"y"},{sourceKey:"scroller.scrollBehaviorX.hasScroll",key:"hasHorizontalScroll"},{sourceKey:"scroller.scrollBehaviorY.hasScroll",key:"hasVerticalScroll"},{sourceKey:"scroller.scrollBehaviorX.contentSize",key:"scrollerWidth"},{sourceKey:"scroller.scrollBehaviorY.contentSize",key:"scrollerHeight"},{sourceKey:"scroller.scrollBehaviorX.maxScrollPos",key:"maxScrollX"},{sourceKey:"scroller.scrollBehaviorY.maxScrollPos",key:"maxScrollY"},{sourceKey:"scroller.scrollBehaviorX.minScrollPos",key:"minScrollX"},{sourceKey:"scroller.scrollBehaviorY.minScrollPos",key:"minScrollY"},{sourceKey:"scroller.scrollBehaviorX.movingDirection",key:"movingDirectionX"},{sourceKey:"scroller.scrollBehaviorY.movingDirection",key:"movingDirectionY"},{sourceKey:"scroller.scrollBehaviorX.direction",key:"directionX"},{sourceKey:"scroller.scrollBehaviorY.direction",key:"directionY"},{sourceKey:"scroller.actions.enabled",key:"enabled"},{sourceKey:"scroller.animater.pending",key:"pending"},{sourceKey:"scroller.animater.stop",key:"stop"},{sourceKey:"scroller.scrollTo",key:"scrollTo"},{sourceKey:"scroller.scrollBy",key:"scrollBy"},{sourceKey:"scroller.scrollToElement",key:"scrollToElement"},{sourceKey:"scroller.resetPosition",key:"resetPosition"}];function p(t){console.error("[BScroll warn]: "+t)}function u(t,e){if(!t)throw new Error("[BScroll] "+e)}var d="undefined"!=typeof window,f=d&&navigator.userAgent.toLowerCase(),g=!(!f||!/wechatdevtools/.test(f)),y=f&&f.indexOf("android")>0,v=function(){if("string"==typeof f){var t=/os (\d\d?_\d(_\d)?)/.exec(f);if(!t)return!1;var e=t[1].split("_").map((function(t){return parseInt(t,10)}));return!!(13===e[0]&&e[1]>=4)}return!1}(),m=!1;if(d){try{var k={};Object.defineProperty(k,"passive",{get:function(){m=!0}}),window.addEventListener("test-passive",(function(){}),k)}catch(t){}}function T(){return window.performance&&window.performance.now&&window.performance.timing?window.performance.now()+window.performance.timing.navigationStart:+new Date}var S=function(t,e){for(var o in e)t[o]=e[o];return t};function b(t){return null==t}function P(t,e,o){return t<e?e:t>o?o:t}function w(t,e){if(t.findIndex)return t.findIndex(e);var o=-1;return t.some((function(t,s,i){var r=e(t,s,i);if(r)return o=s,r})),o}var x=d&&document.createElement("div").style,M=function(){if(!d)return!1;for(var t=0,e=[{key:"standard",value:"transform"},{key:"webkit",value:"webkitTransform"},{key:"Moz",value:"MozTransform"},{key:"O",value:"OTransform"},{key:"ms",value:"msTransform"}];t<e.length;t++){var o=e[t];if(void 0!==x[o.value])return o.key}return!1}();function Y(t){return!1===M?t:"standard"===M?"transitionEnd"===t?"transitionend":t:M+t.charAt(0).toUpperCase()+t.substr(1)}function E(t){return"string"==typeof t?document.querySelector(t):t}function B(t,e,o,s){var i=m?{passive:!1,capture:!!s}:!!s;t.addEventListener(e,o,i)}function X(t,e,o,s){t.removeEventListener(e,o,{capture:!!s})}function O(t){for(var e=0,o=0;t;)e-=t.offsetLeft,o-=t.offsetTop,t=t.offsetParent;return{left:e,top:o}}var D=M&&"standard"!==M?"-"+M.toLowerCase()+"-":"",H=Y("transform"),C=Y("transition"),I=d&&Y("perspective")in x,z=d&&("ontouchstart"in window||g),L=d&&C in x,F={transform:H,transition:C,transitionTimingFunction:Y("transitionTimingFunction"),transitionDuration:Y("transitionDuration"),transitionDelay:Y("transitionDelay"),transformOrigin:Y("transformOrigin"),transitionEnd:Y("transitionEnd"),transitionProperty:Y("transitionProperty")},A={touchstart:1,touchmove:1,touchend:1,touchcancel:1,mousedown:2,mousemove:2,mouseup:2};function N(t){if(t instanceof window.SVGElement){var e=t.getBoundingClientRect();return{top:e.top,left:e.left,width:e.width,height:e.height}}return{top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}}function R(t,e){for(var o in e)if(e[o].test(t[o]))return!0;return!1}var W=R;function _(t,e){var o;void 0===e&&(e="click"),"mouseup"===t.type?o=t:"touchend"!==t.type&&"touchcancel"!==t.type||(o=t.changedTouches[0]);var s,i={};o&&(i.screenX=o.screenX||0,i.screenY=o.screenY||0,i.clientX=o.clientX||0,i.clientY=o.clientY||0);var r={ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey};if("undefined"!=typeof MouseEvent)try{s=new MouseEvent(e,S(n({bubbles:!0,cancelable:!0},r),i))}catch(t){l()}else l();function l(){(s=document.createEvent("Event")).initEvent(e,!0,!0),S(s,i)}s.forwardedTouchEvent=!0,s._constructed=!0,t.target.dispatchEvent(s)}function j(t,e){return new RegExp("(^|\\s)"+e+"(\\s|$)").test(t.className)}var K={swipe:{style:"cubic-bezier(0.23, 1, 0.32, 1)",fn:function(t){return 1+--t*t*t*t*t}},swipeBounce:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(t){return t*(2-t)}},bounce:{style:"cubic-bezier(0.165, 0.84, 0.44, 1)",fn:function(t){return 1- --t*t*t*t}}},U=d&&window;function V(){}var $=d?U.requestAnimationFrame||U.webkitRequestAnimationFrame||U.mozRequestAnimationFrame||U.oRequestAnimationFrame||function(t){return window.setTimeout(t,t.interval||1e3/60)}:V,Z=d?U.cancelAnimationFrame||U.webkitCancelAnimationFrame||U.mozCancelAnimationFrame||U.oCancelAnimationFrame||function(t){window.clearTimeout(t)}:V,q=function(t){},G={enumerable:!0,configurable:!0,get:q,set:q};var J=function(){function t(t){this.events={},this.eventTypes={},this.registerType(t)}return t.prototype.on=function(t,e,o){return void 0===o&&(o=this),this.hasType(t),this.events[t]||(this.events[t]=[]),this.events[t].push([e,o]),this},t.prototype.once=function(t,e,o){var s=this;void 0===o&&(o=this),this.hasType(t);var i=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];s.off(t,i);var l=e.apply(o,r);if(!0===l)return l};return i.fn=e,this.on(t,i),this},t.prototype.off=function(t,e){if(!t&&!e)return this.events={},this;if(t){if(this.hasType(t),!e)return this.events[t]=[],this;var o=this.events[t];if(!o)return this;for(var s=o.length;s--;)(o[s][0]===e||o[s][0]&&o[s][0].fn===e)&&o.splice(s,1);return this}},t.prototype.trigger=function(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];this.hasType(t);var s=this.events[t];if(s)for(var i,r=s.length,n=a(s),l=0;l<r;l++){var h=n[l],c=h[0],p=h[1];if(c&&!0===(i=c.apply(p,e)))return i}},t.prototype.registerType=function(t){var e=this;t.forEach((function(t){e.eventTypes[t]=t}))},t.prototype.destroy=function(){this.events={},this.eventTypes={}},t.prototype.hasType=function(t){var e=this.eventTypes;e[t]===t||p('EventEmitter has used unknown event type: "'+t+'", should be oneof ['+Object.keys(e).map((function(t){return JSON.stringify(t)}))+"]")},t}(),Q=function(){function t(t,e){this.wrapper=t,this.events=e,this.addDOMEvents()}return t.prototype.destroy=function(){this.removeDOMEvents(),this.events=[]},t.prototype.addDOMEvents=function(){this.handleDOMEvents(B)},t.prototype.removeDOMEvents=function(){this.handleDOMEvents(X)},t.prototype.handleDOMEvents=function(t){var e=this,o=this.wrapper;this.events.forEach((function(s){t(o,s.name,e,!!s.capture)}))},t.prototype.handleEvent=function(t){var e=t.type;this.events.some((function(o){return o.name===e&&(o.handler(t),!0)}))},t}(),tt=function(t){function e(){var e=t.call(this)||this;return e.startX=0,e.startY=0,e.scrollX=!1,e.scrollY=!0,e.freeScroll=!1,e.directionLockThreshold=0,e.eventPassthrough="",e.click=!1,e.dblclick=!1,e.tap="",e.bounce={top:!0,bottom:!0,left:!0,right:!0},e.bounceTime=800,e.momentum=!0,e.momentumLimitTime=300,e.momentumLimitDistance=15,e.swipeTime=2500,e.swipeBounceTime=500,e.deceleration=.0015,e.flickLimitTime=200,e.flickLimitDistance=100,e.resizePolling=60,e.probeType=0,e.stopPropagation=!1,e.preventDefault=!0,e.preventDefaultException={tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT|AUDIO)$/},e.tagException={tagName:/^TEXTAREA$/},e.HWCompositing=!0,e.useTransition=!0,e.bindToWrapper=!1,e.bindToTarget=!1,e.disableMouse=z,e.disableTouch=!z,e.autoBlur=!0,e.autoEndDistance=5,e.outOfBoundaryDampingFactor=1/3,e.specifiedIndexAsContent=0,e.quadrant=1,e}return r(e,t),e.prototype.merge=function(t){if(!t)return this;for(var e in t)"bounce"!==e?this[e]=t[e]:this.bounce=this.resolveBounce(t[e]);return this},e.prototype.process=function(){return this.translateZ=this.HWCompositing&&I?" translateZ(1px)":"",this.useTransition=this.useTransition&&L,this.preventDefault=!this.eventPassthrough&&this.preventDefault,this.scrollX="horizontal"!==this.eventPassthrough&&this.scrollX,this.scrollY="vertical"!==this.eventPassthrough&&this.scrollY,this.freeScroll=this.freeScroll&&!this.eventPassthrough,this.scrollX=!!this.freeScroll||this.scrollX,this.scrollY=!!this.freeScroll||this.scrollY,this.directionLockThreshold=this.eventPassthrough?0:this.directionLockThreshold,this},e.prototype.resolveBounce=function(t){var e={top:!0,right:!0,bottom:!0,left:!0};return"object"==typeof t?S(e,t):t?e:{top:!1,right:!1,bottom:!1,left:!1}},e}((function(){})),et=function(){function t(t,e){this.wrapper=t,this.options=e,this.hooks=new J(["beforeStart","start","move","end","click"]),this.handleDOMEvents()}return t.prototype.handleDOMEvents=function(){var t=this.options,e=t.bindToWrapper,o=t.disableMouse,s=t.disableTouch,i=t.click,r=this.wrapper,n=e?r:window,l=[],h=[],a=!s,c=!o;i&&l.push({name:"click",handler:this.click.bind(this),capture:!0}),a&&(l.push({name:"touchstart",handler:this.start.bind(this)}),h.push({name:"touchmove",handler:this.move.bind(this)},{name:"touchend",handler:this.end.bind(this)},{name:"touchcancel",handler:this.end.bind(this)})),c&&(l.push({name:"mousedown",handler:this.start.bind(this)}),h.push({name:"mousemove",handler:this.move.bind(this)},{name:"mouseup",handler:this.end.bind(this)})),this.wrapperEventRegister=new Q(r,l),this.targetEventRegister=new Q(n,h)},t.prototype.beforeHandler=function(t,e){var o=this.options,s=o.preventDefault,i=o.stopPropagation,r=o.preventDefaultException;({start:function(){return s&&!R(t.target,r)},end:function(){return s&&!R(t.target,r)},move:function(){return s}})[e]()&&t.preventDefault(),i&&t.stopPropagation()},t.prototype.setInitiated=function(t){void 0===t&&(t=0),this.initiated=t},t.prototype.start=function(t){var e=A[t.type];if(!this.initiated||this.initiated===e)if(this.setInitiated(e),W(t.target,this.options.tagException))this.setInitiated();else if((2!==e||0===t.button)&&!this.hooks.trigger(this.hooks.eventTypes.beforeStart,t)){this.beforeHandler(t,"start");var o=t.touches?t.touches[0]:t;this.pointX=o.pageX,this.pointY=o.pageY,this.hooks.trigger(this.hooks.eventTypes.start,t)}},t.prototype.move=function(t){if(A[t.type]===this.initiated){this.beforeHandler(t,"move");var e=t.touches?t.touches[0]:t,o=e.pageX-this.pointX,s=e.pageY-this.pointY;if(this.pointX=e.pageX,this.pointY=e.pageY,!this.hooks.trigger(this.hooks.eventTypes.move,{deltaX:o,deltaY:s,e:t})){var i=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,r=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,n=this.pointX-i,l=this.pointY-r,h=this.options.autoEndDistance;(n>document.documentElement.clientWidth-h||l>document.documentElement.clientHeight-h||n<h||l<h)&&this.end(t)}}},t.prototype.end=function(t){A[t.type]===this.initiated&&(this.setInitiated(),this.beforeHandler(t,"end"),this.hooks.trigger(this.hooks.eventTypes.end,t))},t.prototype.click=function(t){this.hooks.trigger(this.hooks.eventTypes.click,t)},t.prototype.setContent=function(t){t!==this.wrapper&&(this.wrapper=t,this.rebindDOMEvents())},t.prototype.rebindDOMEvents=function(){this.wrapperEventRegister.destroy(),this.targetEventRegister.destroy(),this.handleDOMEvents()},t.prototype.destroy=function(){this.wrapperEventRegister.destroy(),this.targetEventRegister.destroy(),this.hooks.destroy()},t}(),ot={x:["translateX","px"],y:["translateY","px"]},st=function(){function t(t){this.setContent(t),this.hooks=new J(["beforeTranslate","translate"])}return t.prototype.getComputedPosition=function(){var t=window.getComputedStyle(this.content,null)[F.transform].split(")")[0].split(", ");return{x:+(t[12]||t[4])||0,y:+(t[13]||t[5])||0}},t.prototype.translate=function(t){var e=[];Object.keys(t).forEach((function(o){if(ot[o]){var s=ot[o][0];if(s){var i=ot[o][1],r=t[o];e.push(s+"("+r+i+")")}}})),this.hooks.trigger(this.hooks.eventTypes.beforeTranslate,e,t),this.style[F.transform]=e.join(" "),this.hooks.trigger(this.hooks.eventTypes.translate,t)},t.prototype.setContent=function(t){this.content!==t&&(this.content=t,this.style=t.style)},t.prototype.destroy=function(){this.hooks.destroy()},t}(),it=function(){function t(t,e,o){this.translater=e,this.options=o,this.timer=0,this.hooks=new J(["move","end","beforeForceStop","forceStop","callStop","time","timeFunction"]),this.setContent(t)}return t.prototype.translate=function(t){this.translater.translate(t)},t.prototype.setPending=function(t){this.pending=t},t.prototype.setForceStopped=function(t){this.forceStopped=t},t.prototype.setCallStop=function(t){this.callStopWhenPending=t},t.prototype.setContent=function(t){this.content!==t&&(this.content=t,this.style=t.style,this.stop())},t.prototype.clearTimer=function(){this.timer&&(Z(this.timer),this.timer=0)},t.prototype.destroy=function(){this.hooks.destroy(),Z(this.timer)},t}(),rt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.startProbe=function(t,e){var o=this,s=t,i=function(){var r=o.translater.getComputedPosition();(function(t,e,o,s){var i=function(t,e){var o=t-e;return o>0?-1:o<0?1:0},r=i(e.x,t.x),n=i(e.y,t.y),l=o.x-s.x,h=o.y-s.y;return r*l<=0&&n*h<=0})(t,e,r,s)&&o.hooks.trigger(o.hooks.eventTypes.move,r),o.pending||(o.callStopWhenPending?o.callStopWhenPending=!1:o.hooks.trigger(o.hooks.eventTypes.end,r)),s=r,o.pending&&(o.timer=$(i))};this.callStopWhenPending&&this.setCallStop(!1),Z(this.timer),i()},e.prototype.transitionTime=function(t){void 0===t&&(t=0),this.style[F.transitionDuration]=t+"ms",this.hooks.trigger(this.hooks.eventTypes.time,t)},e.prototype.transitionTimingFunction=function(t){this.style[F.transitionTimingFunction]=t,this.hooks.trigger(this.hooks.eventTypes.timeFunction,t)},e.prototype.transitionProperty=function(){this.style[F.transitionProperty]=F.transform},e.prototype.move=function(t,e,o,s){this.setPending(o>0),this.transitionTimingFunction(s),this.transitionProperty(),this.transitionTime(o),this.translate(e);var i=3===this.options.probeType;o&&i&&this.startProbe(t,e),o||(this._reflow=this.content.offsetHeight,i&&this.hooks.trigger(this.hooks.eventTypes.move,e),this.hooks.trigger(this.hooks.eventTypes.end,e))},e.prototype.doStop=function(){var t=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),t){this.setPending(!1),Z(this.timer);var e=this.translater.getComputedPosition(),o=e.x,s=e.y;this.transitionTime(),this.translate({x:o,y:s}),this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,{x:o,y:s})}return t},e.prototype.stop=function(){this.doStop()&&this.hooks.trigger(this.hooks.eventTypes.callStop)},e}(it),nt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.move=function(t,e,o,s){if(!o)return this.translate(e),3===this.options.probeType&&this.hooks.trigger(this.hooks.eventTypes.move,e),void this.hooks.trigger(this.hooks.eventTypes.end,e);this.animate(t,e,o,s)},e.prototype.animate=function(t,e,o,s){var i=this,r=T(),n=r+o,l=3===this.options.probeType,h=function(){var a=T();if(a>=n)return i.translate(e),l&&i.hooks.trigger(i.hooks.eventTypes.move,e),void i.hooks.trigger(i.hooks.eventTypes.end,e);var c=s(a=(a-r)/o),p={};Object.keys(e).forEach((function(o){var s=t[o],i=e[o];p[o]=(i-s)*c+s})),i.translate(p),l&&i.hooks.trigger(i.hooks.eventTypes.move,p),i.pending&&(i.timer=$(h)),i.pending||(i.callStopWhenPending?i.callStopWhenPending=!1:i.hooks.trigger(i.hooks.eventTypes.end,e))};this.setPending(!0),this.callStopWhenPending&&this.setCallStop(!1),Z(this.timer),h()},e.prototype.doStop=function(){var t=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),t){this.setPending(!1),Z(this.timer);var e=this.translater.getComputedPosition();this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,e)}return t},e.prototype.stop=function(){this.doStop()&&this.hooks.trigger(this.hooks.eventTypes.callStop)},e}(it);var lt,ht,at,ct,pt=function(){function t(t,e,o){this.wrapper=t,this.options=o,this.hooks=new J(["beforeComputeBoundary","computeBoundary","momentum","end","ignoreHasScroll"]),this.refresh(e)}return t.prototype.start=function(){this.dist=0,this.setMovingDirection(0),this.setDirection(0)},t.prototype.move=function(t){return t=this.hasScroll?t:0,this.setMovingDirection(t),this.performDampingAlgorithm(t,this.options.outOfBoundaryDampingFactor)},t.prototype.setMovingDirection=function(t){this.movingDirection=t>0?-1:t<0?1:0},t.prototype.setDirection=function(t){this.direction=t>0?-1:t<0?1:0},t.prototype.performDampingAlgorithm=function(t,e){var o=this.currentPos+t;return(o>this.minScrollPos||o<this.maxScrollPos)&&(o=o>this.minScrollPos&&this.options.bounces[0]||o<this.maxScrollPos&&this.options.bounces[1]?this.currentPos+t*e:o>this.minScrollPos?this.minScrollPos:this.maxScrollPos),o},t.prototype.end=function(t){var e={duration:0},o=Math.abs(this.currentPos-this.startPos);if(this.options.momentum&&t<this.options.momentumLimitTime&&o>this.options.momentumLimitDistance){var s=-1===this.direction&&this.options.bounces[0]||1===this.direction&&this.options.bounces[1]?this.wrapperSize:0;e=this.hasScroll?this.momentum(this.currentPos,this.startPos,t,this.maxScrollPos,this.minScrollPos,s,this.options):{destination:this.currentPos,duration:0}}else this.hooks.trigger(this.hooks.eventTypes.end,e);return e},t.prototype.momentum=function(t,e,o,s,i,r,n){void 0===n&&(n=this.options);var l=t-e,h=Math.abs(l)/o,a=n.deceleration,c=n.swipeBounceTime,p=n.swipeTime,u={destination:t+h*h/a*(l<0?-1:1),duration:Math.min(p,2*h/a),rate:15};return this.hooks.trigger(this.hooks.eventTypes.momentum,u,l),u.destination<s?(u.destination=r?Math.max(s-r/4,s-r/u.rate*h):s,u.duration=c):u.destination>i&&(u.destination=r?Math.min(i+r/4,i+r/u.rate*h):i,u.duration=c),u.destination=Math.round(u.destination),u},t.prototype.updateDirection=function(){var t=this.currentPos-this.absStartPos;this.setDirection(t)},t.prototype.refresh=function(t){var e=this.options.rect,o=e.size,s=e.position,i="static"===window.getComputedStyle(this.wrapper,null).position,r=N(this.wrapper);this.wrapperSize=this.wrapper["width"===o?"clientWidth":"clientHeight"],this.setContent(t);var n=N(this.content);this.contentSize=n[o],this.relativeOffset=n[s],i&&(this.relativeOffset-=r[s]),this.computeBoundary(),this.setDirection(0)},t.prototype.setContent=function(t){t!==this.content&&(this.content=t,this.resetState())},t.prototype.resetState=function(){this.currentPos=0,this.startPos=0,this.dist=0,this.setDirection(0),this.setMovingDirection(0),this.resetStartPos()},t.prototype.computeBoundary=function(){this.hooks.trigger(this.hooks.eventTypes.beforeComputeBoundary);var t={minScrollPos:0,maxScrollPos:this.wrapperSize-this.contentSize};t.maxScrollPos<0&&(t.maxScrollPos-=this.relativeOffset,0===this.options.specifiedIndexAsContent&&(t.minScrollPos=-this.relativeOffset)),this.hooks.trigger(this.hooks.eventTypes.computeBoundary,t),this.minScrollPos=t.minScrollPos,this.maxScrollPos=t.maxScrollPos,this.hasScroll=this.options.scrollable&&this.maxScrollPos<this.minScrollPos,!this.hasScroll&&this.minScrollPos<this.maxScrollPos&&(this.maxScrollPos=this.minScrollPos,this.contentSize=this.wrapperSize)},t.prototype.updatePosition=function(t){this.currentPos=t},t.prototype.getCurrentPos=function(){return this.currentPos},t.prototype.checkInBoundary=function(){var t=this.adjustPosition(this.currentPos);return{position:t,inBoundary:t===this.getCurrentPos()}},t.prototype.adjustPosition=function(t){return this.hasScroll||this.hooks.trigger(this.hooks.eventTypes.ignoreHasScroll)?t>this.minScrollPos?t=this.minScrollPos:t<this.maxScrollPos&&(t=this.maxScrollPos):t=this.minScrollPos,t},t.prototype.updateStartPos=function(){this.startPos=this.currentPos},t.prototype.updateAbsStartPos=function(){this.absStartPos=this.currentPos},t.prototype.resetStartPos=function(){this.updateStartPos(),this.updateAbsStartPos()},t.prototype.getAbsDist=function(t){return this.dist+=t,Math.abs(this.dist)},t.prototype.destroy=function(){this.hooks.destroy()},t}(),ut=((lt={}).yes=function(t){return!0},lt.no=function(t){return t.preventDefault(),!1},lt),dt=((ht={}).horizontal=((at={}).yes="horizontal",at.no="vertical",at),ht.vertical=((ct={}).yes="vertical",ct.no="horizontal",ct),ht),ft=function(){function t(t,e,o){this.directionLockThreshold=t,this.freeScroll=e,this.eventPassthrough=o,this.reset()}return t.prototype.reset=function(){this.directionLocked=""},t.prototype.checkMovingDirection=function(t,e,o){return this.computeDirectionLock(t,e),this.handleEventPassthrough(o)},t.prototype.adjustDelta=function(t,e){return"horizontal"===this.directionLocked?e=0:"vertical"===this.directionLocked&&(t=0),{deltaX:t,deltaY:e}},t.prototype.computeDirectionLock=function(t,e){""!==this.directionLocked||this.freeScroll||(t>e+this.directionLockThreshold?this.directionLocked="horizontal":e>=t+this.directionLockThreshold?this.directionLocked="vertical":this.directionLocked="none")},t.prototype.handleEventPassthrough=function(t){var e=dt[this.directionLocked];if(e){if(this.eventPassthrough===e.yes)return ut.yes(t);if(this.eventPassthrough===e.no)return ut.no(t)}return!1},t}(),gt=function(){function t(t,e,o,s,i){this.hooks=new J(["start","beforeMove","scrollStart","scroll","beforeEnd","end","scrollEnd","contentNotMoved","detectMovingDirection","coordinateTransformation"]),this.scrollBehaviorX=t,this.scrollBehaviorY=e,this.actionsHandler=o,this.animater=s,this.options=i,this.directionLockAction=new ft(i.directionLockThreshold,i.freeScroll,i.eventPassthrough),this.enabled=!0,this.bindActionsHandler()}return t.prototype.bindActionsHandler=function(){var t=this;this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.start,(function(e){return!t.enabled||t.handleStart(e)})),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.move,(function(e){var o=e.deltaX,s=e.deltaY,i=e.e;if(!t.enabled)return!0;var r=function(t,e,o){return 2===o?[e,-t]:3===o?[-t,-e]:4===o?[-e,t]:[t,e]}(o,s,t.options.quadrant),n={deltaX:r[0],deltaY:r[1]};return t.hooks.trigger(t.hooks.eventTypes.coordinateTransformation,n),t.handleMove(n.deltaX,n.deltaY,i)})),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.end,(function(e){return!t.enabled||t.handleEnd(e)})),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.click,(function(e){t.enabled&&!e._constructed&&t.handleClick(e)}))},t.prototype.handleStart=function(t){var e=T();this.fingerMoved=!1,this.contentMoved=!1,this.startTime=e,this.directionLockAction.reset(),this.scrollBehaviorX.start(),this.scrollBehaviorY.start(),this.animater.doStop(),this.scrollBehaviorX.resetStartPos(),this.scrollBehaviorY.resetStartPos(),this.hooks.trigger(this.hooks.eventTypes.start,t)},t.prototype.handleMove=function(t,e,o){if(!this.hooks.trigger(this.hooks.eventTypes.beforeMove,o)){var s=this.scrollBehaviorX.getAbsDist(t),i=this.scrollBehaviorY.getAbsDist(e),r=T();if(this.checkMomentum(s,i,r))return!0;if(this.directionLockAction.checkMovingDirection(s,i,o))return this.actionsHandler.setInitiated(),!0;var n=this.directionLockAction.adjustDelta(t,e),l=this.scrollBehaviorX.getCurrentPos(),h=this.scrollBehaviorX.move(n.deltaX),a=this.scrollBehaviorY.getCurrentPos(),c=this.scrollBehaviorY.move(n.deltaY);if(!this.hooks.trigger(this.hooks.eventTypes.detectMovingDirection)){this.fingerMoved||(this.fingerMoved=!0);var p=h!==l||c!==a;this.contentMoved||p||this.hooks.trigger(this.hooks.eventTypes.contentNotMoved),!this.contentMoved&&p&&(this.contentMoved=!0,this.hooks.trigger(this.hooks.eventTypes.scrollStart)),this.contentMoved&&p&&(this.animater.translate({x:h,y:c}),this.dispatchScroll(r))}}},t.prototype.dispatchScroll=function(t){t-this.startTime>this.options.momentumLimitTime&&(this.startTime=t,this.scrollBehaviorX.updateStartPos(),this.scrollBehaviorY.updateStartPos(),1===this.options.probeType&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())),this.options.probeType>1&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())},t.prototype.checkMomentum=function(t,e,o){return o-this.endTime>this.options.momentumLimitTime&&e<this.options.momentumLimitDistance&&t<this.options.momentumLimitDistance},t.prototype.handleEnd=function(t){if(!this.hooks.trigger(this.hooks.eventTypes.beforeEnd,t)){var e=this.getCurrentPos();if(this.scrollBehaviorX.updateDirection(),this.scrollBehaviorY.updateDirection(),this.hooks.trigger(this.hooks.eventTypes.end,t,e))return!0;e=this.ensureIntegerPos(e),this.animater.translate(e),this.endTime=T();var o=this.endTime-this.startTime;this.hooks.trigger(this.hooks.eventTypes.scrollEnd,e,o)}},t.prototype.ensureIntegerPos=function(t){this.ensuringInteger=!0;var e=t.x,o=t.y,s=this.scrollBehaviorX,i=s.minScrollPos,r=s.maxScrollPos,n=this.scrollBehaviorY,l=n.minScrollPos,h=n.maxScrollPos;return e=e>0?Math.ceil(e):Math.floor(e),o=o>0?Math.ceil(o):Math.floor(o),{x:e=P(e,r,i),y:o=P(o,h,l)}},t.prototype.handleClick=function(t){R(t.target,this.options.preventDefaultException)||(t.preventDefault(),t.stopPropagation())},t.prototype.getCurrentPos=function(){return{x:this.scrollBehaviorX.getCurrentPos(),y:this.scrollBehaviorY.getCurrentPos()}},t.prototype.refresh=function(){this.endTime=0},t.prototype.destroy=function(){this.hooks.destroy()},t}();function yt(t,e,o,s){var i=["momentum","momentumLimitTime","momentumLimitDistance","deceleration","swipeBounceTime","swipeTime","outOfBoundaryDampingFactor","specifiedIndexAsContent"].reduce((function(e,o){return e[o]=t[o],e}),{});return i.scrollable=!!t[e],i.bounces=o,i.rect=s,i}function vt(t,e,o){o.forEach((function(o){var s,i;"string"==typeof o?s=i=o:(s=o.source,i=o.target),t.on(s,(function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return e.trigger.apply(e,a([i],t))}))}))}var mt=function(){function t(t,e,o){this.wrapper=t,this.content=e,this.resizeTimeout=0,this.hooks=new J(["beforeStart","beforeMove","beforeScrollStart","scrollStart","scroll","beforeEnd","scrollEnd","resize","touchEnd","end","flick","scrollCancel","momentum","scrollTo","minDistanceScroll","scrollToElement","beforeRefresh"]),this.options=o;var s,i=this.options.bounce,r=i.left,n=i.right,l=i.top,h=i.bottom;this.scrollBehaviorX=new pt(t,e,yt(o,"scrollX",[r,n],{size:"width",position:"left"})),this.scrollBehaviorY=new pt(t,e,yt(o,"scrollY",[l,h],{size:"height",position:"top"})),this.translater=new st(this.content),this.animater=function(t,e,o){var s=o.useTransition,i={};return Object.defineProperty(i,"probeType",{enumerable:!0,configurable:!1,get:function(){return o.probeType}}),s?new rt(t,e,i):new nt(t,e,i)}(this.content,this.translater,this.options),this.actionsHandler=new et(this.options.bindToTarget?this.content:t,(s=this.options,["click","bindToWrapper","disableMouse","disableTouch","preventDefault","stopPropagation","tagException","preventDefaultException","autoEndDistance"].reduce((function(t,e){return t[e]=s[e],t}),{}))),this.actions=new gt(this.scrollBehaviorX,this.scrollBehaviorY,this.actionsHandler,this.animater,this.options);var a=this.resize.bind(this);this.resizeRegister=new Q(window,[{name:"orientationchange",handler:a},{name:"resize",handler:a}]),this.registerTransitionEnd(),this.init()}return t.prototype.init=function(){var t=this;this.bindTranslater(),this.bindAnimater(),this.bindActions(),this.hooks.on(this.hooks.eventTypes.scrollEnd,(function(){t.togglePointerEvents(!0)}))},t.prototype.registerTransitionEnd=function(){this.transitionEndRegister=new Q(this.content,[{name:F.transitionEnd,handler:this.transitionEnd.bind(this)}])},t.prototype.bindTranslater=function(){var t=this,e=this.translater.hooks;e.on(e.eventTypes.beforeTranslate,(function(e){t.options.translateZ&&e.push(t.options.translateZ)})),e.on(e.eventTypes.translate,(function(e){var o=t.getCurrentPos();t.updatePositions(e),!0!==t.actions.ensuringInteger?e.x===o.x&&e.y===o.y||t.togglePointerEvents(!1):t.actions.ensuringInteger=!1}))},t.prototype.bindAnimater=function(){var t=this;this.animater.hooks.on(this.animater.hooks.eventTypes.end,(function(e){t.resetPosition(t.options.bounceTime)||(t.animater.setPending(!1),t.hooks.trigger(t.hooks.eventTypes.scrollEnd,e))})),vt(this.animater.hooks,this.hooks,[{source:this.animater.hooks.eventTypes.move,target:this.hooks.eventTypes.scroll},{source:this.animater.hooks.eventTypes.forceStop,target:this.hooks.eventTypes.scrollEnd}])},t.prototype.bindActions=function(){var t=this,e=this.actions;vt(e.hooks,this.hooks,[{source:e.hooks.eventTypes.start,target:this.hooks.eventTypes.beforeStart},{source:e.hooks.eventTypes.start,target:this.hooks.eventTypes.beforeScrollStart},{source:e.hooks.eventTypes.beforeMove,target:this.hooks.eventTypes.beforeMove},{source:e.hooks.eventTypes.scrollStart,target:this.hooks.eventTypes.scrollStart},{source:e.hooks.eventTypes.scroll,target:this.hooks.eventTypes.scroll},{source:e.hooks.eventTypes.beforeEnd,target:this.hooks.eventTypes.beforeEnd}]),e.hooks.on(e.hooks.eventTypes.end,(function(o,s){return t.hooks.trigger(t.hooks.eventTypes.touchEnd,s),!!t.hooks.trigger(t.hooks.eventTypes.end,s)||(!(e.fingerMoved||(t.hooks.trigger(t.hooks.eventTypes.scrollCancel),!t.checkClick(o)))||(t.resetPosition(t.options.bounceTime,K.bounce)?(t.animater.setForceStopped(!1),!0):void 0))})),e.hooks.on(e.hooks.eventTypes.scrollEnd,(function(o,s){var i=Math.abs(o.x-t.scrollBehaviorX.startPos),r=Math.abs(o.y-t.scrollBehaviorY.startPos);if(t.checkFlick(s,i,r))return t.animater.setForceStopped(!1),void t.hooks.trigger(t.hooks.eventTypes.flick);t.momentum(o,s)?t.animater.setForceStopped(!1):(e.contentMoved&&t.hooks.trigger(t.hooks.eventTypes.scrollEnd,o),t.animater.forceStopped&&t.animater.setForceStopped(!1))}))},t.prototype.checkFlick=function(t,e,o){if(this.hooks.events.flick.length>1&&t<this.options.flickLimitTime&&e<this.options.flickLimitDistance&&o<this.options.flickLimitDistance&&(o>1||e>1))return!0},t.prototype.momentum=function(t,e){var o={time:0,easing:K.swiper,newX:t.x,newY:t.y},s=this.scrollBehaviorX.end(e),i=this.scrollBehaviorY.end(e);if(o.newX=b(s.destination)?o.newX:s.destination,o.newY=b(i.destination)?o.newY:i.destination,o.time=Math.max(s.duration,i.duration),this.hooks.trigger(this.hooks.eventTypes.momentum,o,this),o.newX!==t.x||o.newY!==t.y)return(o.newX>this.scrollBehaviorX.minScrollPos||o.newX<this.scrollBehaviorX.maxScrollPos||o.newY>this.scrollBehaviorY.minScrollPos||o.newY<this.scrollBehaviorY.maxScrollPos)&&(o.easing=K.swipeBounce),this.scrollTo(o.newX,o.newY,o.time,o.easing),!0},t.prototype.checkClick=function(t){var e=this.animater.forceStopped;if(this.hooks.trigger(this.hooks.eventTypes.checkClick))return this.animater.setForceStopped(!1),!0;if(!e){var o=this.options.dblclick,s=!1;if(o&&this.lastClickTime){var i=o.delay,r=void 0===i?300:i;T()-this.lastClickTime<r&&(s=!0,function(t){_(t,"dblclick")}(t))}return this.options.tap&&function(t,e){var o=document.createEvent("Event");o.initEvent(e,!0,!0),o.pageX=t.pageX,o.pageY=t.pageY,t.target.dispatchEvent(o)}(t,this.options.tap),this.options.click&&!R(t.target,this.options.preventDefaultException)&&_(t),this.lastClickTime=s?null:T(),!0}return!1},t.prototype.resize=function(){var t=this;this.actions.enabled&&(y&&(this.wrapper.scrollTop=0),clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout((function(){t.hooks.trigger(t.hooks.eventTypes.resize)}),this.options.resizePolling))},t.prototype.transitionEnd=function(t){t.target===this.content&&this.animater.pending&&(this.animater.transitionTime(),this.resetPosition(this.options.bounceTime,K.bounce)||(this.animater.setPending(!1),3!==this.options.probeType&&this.hooks.trigger(this.hooks.eventTypes.scrollEnd,this.getCurrentPos())))},t.prototype.togglePointerEvents=function(t){void 0===t&&(t=!0);for(var e=this.content.children.length?this.content.children:[this.content],o=t?"auto":"none",s=0;s<e.length;s++){var i=e[s];i.isBScrollContainer||(i.style.pointerEvents=o)}},t.prototype.refresh=function(t){var e=this.setContent(t);this.hooks.trigger(this.hooks.eventTypes.beforeRefresh),this.scrollBehaviorX.refresh(t),this.scrollBehaviorY.refresh(t),e&&(this.translater.setContent(t),this.animater.setContent(t),this.transitionEndRegister.destroy(),this.registerTransitionEnd(),this.options.bindToTarget&&this.actionsHandler.setContent(t)),this.actions.refresh(),this.wrapperOffset=O(this.wrapper)},t.prototype.setContent=function(t){var e=t!==this.content;return e&&(this.content=t),e},t.prototype.scrollBy=function(t,e,o,s){void 0===o&&(o=0);var i=this.getCurrentPos(),r=i.x,n=i.y;s=s||K.bounce,t+=r,e+=n,this.scrollTo(t,e,o,s)},t.prototype.scrollTo=function(t,e,o,s,i){void 0===o&&(o=0),void 0===s&&(s=K.bounce),void 0===i&&(i={start:{},end:{}});var r=this.options.useTransition?s.style:s.fn,l=this.getCurrentPos(),h=n({x:l.x,y:l.y},i.start),a=n({x:t,y:e},i.end);if(this.hooks.trigger(this.hooks.eventTypes.scrollTo,a),!function(t,e){for(var o=0,s=Object.keys(t);o<s.length;o++){var i=s[o];if(t[i]!==e[i])return!1}return!0}(h,a)){var c=Math.abs(a.x-h.x),p=Math.abs(a.y-h.y);c<1&&p<1&&(o=0,this.hooks.trigger(this.hooks.eventTypes.minDistanceScroll)),this.animater.move(h,a,o,r)}},t.prototype.scrollToElement=function(t,e,o,s,i){var r=E(t),n=O(r),l=function(t,e,o){return"number"==typeof t?t:t?Math.round(e/2-o/2):0};o=l(o,r.offsetWidth,this.wrapper.offsetWidth),s=l(s,r.offsetHeight,this.wrapper.offsetHeight);var h=function(t,e,o,s){return t-=e,t=s.adjustPosition(t-o)};n.left=h(n.left,this.wrapperOffset.left,o,this.scrollBehaviorX),n.top=h(n.top,this.wrapperOffset.top,s,this.scrollBehaviorY),this.hooks.trigger(this.hooks.eventTypes.scrollToElement,r,n)||this.scrollTo(n.left,n.top,e,i)},t.prototype.resetPosition=function(t,e){void 0===t&&(t=0),void 0===e&&(e=K.bounce);var o=this.scrollBehaviorX.checkInBoundary(),s=o.position,i=o.inBoundary,r=this.scrollBehaviorY.checkInBoundary(),n=r.position,l=r.inBoundary;return(!i||!l)&&(v&&this.reflow(),this.scrollTo(s,n,t,e),!0)},t.prototype.reflow=function(){this._reflow=this.content.offsetHeight},t.prototype.updatePositions=function(t){this.scrollBehaviorX.updatePosition(t.x),this.scrollBehaviorY.updatePosition(t.y)},t.prototype.getCurrentPos=function(){return this.actions.getCurrentPos()},t.prototype.enable=function(){this.actions.enabled=!0},t.prototype.disable=function(){Z(this.animater.timer),this.actions.enabled=!1},t.prototype.destroy=function(){var t=this;["resizeRegister","transitionEndRegister","actionsHandler","actions","hooks","animater","translater","scrollBehaviorX","scrollBehaviorY"].forEach((function(e){return t[e].destroy()}))},t}(),kt=function(t){function e(e,o){var s=t.call(this,["refresh","contentChanged","enable","disable","beforeScrollStart","scrollStart","scroll","scrollEnd","scrollCancel","touchEnd","flick","destroy"])||this,i=E(e);return i?(s.plugins={},s.options=(new tt).merge(o).process(),s.setContent(i).valid?(s.hooks=new J(["refresh","enable","disable","destroy","beforeInitialScrollTo","contentChanged"]),s.init(i),s):s):(p("Can not resolve the wrapper DOM."),s)}return r(e,t),e.use=function(t){var o=t.pluginName;return e.plugins.some((function(e){return t===e.ctor}))?e:b(o)?(p("Plugin Class must specify plugin's name in static property by 'pluginName' field."),e):(e.pluginsMap[o]=!0,e.plugins.push({name:o,applyOrder:t.applyOrder,ctor:t}),e)},e.prototype.setContent=function(t){var e=!1,o=!0,s=t.children[this.options.specifiedIndexAsContent];return s?(e=this.content!==s)&&(this.content=s):(p("The wrapper need at least one child element to be content element to scroll."),o=!1),{valid:o,contentChanged:e}},e.prototype.init=function(t){var e=this;this.wrapper=t,t.isBScrollContainer=!0,this.scroller=new mt(t,this.content,this.options),this.scroller.hooks.on(this.scroller.hooks.eventTypes.resize,(function(){e.refresh()})),this.eventBubbling(),this.handleAutoBlur(),this.enable(),this.proxy(c),this.applyPlugins(),this.refreshWithoutReset(this.content);var o=this.options,s={x:o.startX,y:o.startY};this.hooks.trigger(this.hooks.eventTypes.beforeInitialScrollTo,s)||this.scroller.scrollTo(s.x,s.y)},e.prototype.applyPlugins=function(){var t=this,o=this.options;e.plugins.sort((function(t,e){var o,s=((o={}).pre=-1,o.post=1,o);return(t.applyOrder?s[t.applyOrder]:0)-(e.applyOrder?s[e.applyOrder]:0)})).forEach((function(e){var s=e.ctor;o[e.name]&&"function"==typeof s&&(t.plugins[e.name]=new s(t))}))},e.prototype.handleAutoBlur=function(){this.options.autoBlur&&this.on(this.eventTypes.beforeScrollStart,(function(){var t=document.activeElement;!t||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName||t.blur()}))},e.prototype.eventBubbling=function(){vt(this.scroller.hooks,this,[this.eventTypes.beforeScrollStart,this.eventTypes.scrollStart,this.eventTypes.scroll,this.eventTypes.scrollEnd,this.eventTypes.scrollCancel,this.eventTypes.touchEnd,this.eventTypes.flick])},e.prototype.refreshWithoutReset=function(t){this.scroller.refresh(t),this.hooks.trigger(this.hooks.eventTypes.refresh,t),this.trigger(this.eventTypes.refresh,t)},e.prototype.proxy=function(t){var e=this;t.forEach((function(t){var o=t.key,s=t.sourceKey;!function(t,e,o){G.get=function(){return function(t,e){for(var o=e.split("."),s=0;s<o.length-1;s++)if("object"!=typeof(t=t[o[s]])||!t)return;var i=o.pop();return"function"==typeof t[i]?function(){return t[i].apply(t,arguments)}:t[i]}(this,e)},G.set=function(t){!function(t,e,o){for(var s,i=e.split("."),r=0;r<i.length-1;r++)t[s=i[r]]||(t[s]={}),t=t[s];t[i.pop()]=o}(this,e,t)},Object.defineProperty(t,o,G)}(e,s,o)}))},e.prototype.refresh=function(){var t=this.setContent(this.wrapper),e=t.contentChanged;if(t.valid){var o=this.content;this.refreshWithoutReset(o),e&&(this.hooks.trigger(this.hooks.eventTypes.contentChanged,o),this.trigger(this.eventTypes.contentChanged,o)),this.scroller.resetPosition()}},e.prototype.enable=function(){this.scroller.enable(),this.hooks.trigger(this.hooks.eventTypes.enable),this.trigger(this.eventTypes.enable)},e.prototype.disable=function(){this.scroller.disable(),this.hooks.trigger(this.hooks.eventTypes.disable),this.trigger(this.eventTypes.disable)},e.prototype.destroy=function(){this.hooks.trigger(this.hooks.eventTypes.destroy),this.trigger(this.eventTypes.destroy),this.scroller.destroy()},e.prototype.eventRegister=function(t){this.registerType(t)},e.plugins=[],e.pluginsMap={},e}(J);function Tt(t,e){return new kt(t,e)}Tt.use=kt.use,Tt.plugins=kt.plugins,Tt.pluginsMap=kt.pluginsMap;var St=Tt,bt=function(){function t(t){this.scroll=t,this.wheelEndTimer=0,this.wheelMoveTimer=0,this.wheelStart=!1,this.init()}return t.prototype.init=function(){this.handleBScroll(),this.handleOptions(),this.handleHooks(),this.registerEvent()},t.prototype.handleBScroll=function(){this.scroll.registerType(["alterOptions","mousewheelStart","mousewheelMove","mousewheelEnd"])},t.prototype.handleOptions=function(){var t=!0===this.scroll.options.mouseWheel?{}:this.scroll.options.mouseWheel;this.mouseWheelOpt=S({speed:20,invert:!1,easeTime:300,discreteTime:400,throttleTime:0,dampingFactor:.1},t)},t.prototype.handleHooks=function(){this.hooksFn=[],this.registerHooks(this.scroll.hooks,"destroy",this.destroy)},t.prototype.registerEvent=function(){this.eventRegister=new Q(this.scroll.scroller.wrapper,[{name:"wheel",handler:this.wheelHandler.bind(this)},{name:"mousewheel",handler:this.wheelHandler.bind(this)},{name:"DOMMouseScroll",handler:this.wheelHandler.bind(this)}])},t.prototype.registerHooks=function(t,e,o){t.on(e,o,this),this.hooksFn.push([t,e,o])},t.prototype.wheelHandler=function(t){if(this.scroll.enabled){this.beforeHandler(t),this.wheelStart||(this.wheelStartHandler(t),this.wheelStart=!0);var e=this.getWheelDelta(t);this.wheelMoveHandler(e),this.wheelEndDetector(e)}},t.prototype.wheelStartHandler=function(t){this.cleanCache();var e=this.scroll.scroller,o=e.scrollBehaviorX,s=e.scrollBehaviorY;o.setMovingDirection(0),s.setMovingDirection(0),o.setDirection(0),s.setDirection(0),this.scroll.trigger(this.scroll.eventTypes.alterOptions,this.mouseWheelOpt),this.scroll.trigger(this.scroll.eventTypes.mousewheelStart)},t.prototype.cleanCache=function(){this.deltaCache=[]},t.prototype.wheelMoveHandler=function(t){var e=this,o=this.mouseWheelOpt,s=o.throttleTime,i=o.dampingFactor;if(s&&this.wheelMoveTimer)this.deltaCache.push(t);else{var r=this.deltaCache.reduce((function(t,e){return{x:t.x+e.x,y:t.y+e.y}}),{x:0,y:0});this.cleanCache();var n=this.scroll.scroller,l=n.scrollBehaviorX,h=n.scrollBehaviorY;l.setMovingDirection(-t.directionX),h.setMovingDirection(-t.directionY),l.setDirection(t.x),h.setDirection(t.y);var a=l.performDampingAlgorithm(Math.round(t.x)+r.x,i),c=h.performDampingAlgorithm(Math.round(t.y)+r.x,i);if(!this.scroll.trigger(this.scroll.eventTypes.mousewheelMove,{x:a,y:c})){var p=this.getEaseTime();a===this.scroll.x&&c===this.scroll.y||this.scroll.scrollTo(a,c,p)}s&&(this.wheelMoveTimer=window.setTimeout((function(){e.wheelMoveTimer=0}),s))}},t.prototype.wheelEndDetector=function(t){var e=this;window.clearTimeout(this.wheelEndTimer),this.wheelEndTimer=window.setTimeout((function(){e.wheelStart=!1,window.clearTimeout(e.wheelMoveTimer),e.wheelMoveTimer=0,e.scroll.trigger(e.scroll.eventTypes.mousewheelEnd,t)}),this.mouseWheelOpt.discreteTime)},t.prototype.getWheelDelta=function(t){var e=this.mouseWheelOpt,o=e.speed,s=0,i=0,r=e.invert?-1:1;switch(!0){case"deltaX"in t:1===t.deltaMode?(s=-t.deltaX*o,i=-t.deltaY*o):(s=-t.deltaX,i=-t.deltaY);break;case"wheelDeltaX"in t:s=t.wheelDeltaX/120*o,i=t.wheelDeltaY/120*o;break;case"wheelDelta"in t:s=i=t.wheelDelta/120*o;break;case"detail"in t:s=i=-t.detail/3*o}return s*=r,i*=r,this.scroll.hasVerticalScroll||(Math.abs(i)>Math.abs(s)&&(s=i),i=0),this.scroll.hasHorizontalScroll||(s=0),{x:s,y:i,directionX:s>0?-1:s<0?1:0,directionY:i>0?-1:i<0?1:0}},t.prototype.beforeHandler=function(t){var e=this.scroll.options,o=e.preventDefault,s=e.stopPropagation,i=e.preventDefaultException;o&&!R(t.target,i)&&t.preventDefault(),s&&t.stopPropagation()},t.prototype.getEaseTime=function(){var t=this.mouseWheelOpt.easeTime;return t<100&&p("easeTime should be greater than 100.If mouseWheel easeTime is too small,scrollEnd will be triggered many times."),Math.max(t,100)},t.prototype.destroy=function(){this.eventRegister.destroy(),window.clearTimeout(this.wheelEndTimer),window.clearTimeout(this.wheelMoveTimer),this.hooksFn.forEach((function(t){var e=t[0],o=t[1],s=t[2];e.off(o,s)}))},t.pluginName="mouseWheel",t.applyOrder="pre",t}(),Pt=function(){function t(t){this.scroll=t,this.stopObserver=!1,this.init()}return t.prototype.init=function(){this.handleMutationObserver(),this.handleHooks()},t.prototype.handleMutationObserver=function(){var t=this;if("undefined"!=typeof MutationObserver){this.observer=new MutationObserver((function(e){t.mutationObserverHandler(e,0)})),this.startObserve(this.observer)}else this.checkDOMUpdate()},t.prototype.handleHooks=function(){var t=this;this.hooksFn=[],this.registerHooks(this.scroll.hooks,this.scroll.hooks.eventTypes.contentChanged,(function(){t.stopObserve(),t.handleMutationObserver()})),this.registerHooks(this.scroll.hooks,this.scroll.hooks.eventTypes.enable,(function(){t.stopObserver&&t.handleMutationObserver()})),this.registerHooks(this.scroll.hooks,this.scroll.hooks.eventTypes.disable,(function(){t.stopObserve()})),this.registerHooks(this.scroll.hooks,this.scroll.hooks.eventTypes.destroy,(function(){t.destroy()}))},t.prototype.mutationObserverHandler=function(t,e){var o=this;if(!this.shouldNotRefresh()){for(var s=!1,i=!1,r=0;r<t.length;r++){var n=t[r];if("attributes"!==n.type){s=!0;break}if(n.target!==this.scroll.scroller.content){i=!0;break}}s?this.scroll.refresh():i&&(clearTimeout(e),e=window.setTimeout((function(){o.shouldNotRefresh()||o.scroll.refresh()}),60))}},t.prototype.startObserve=function(t){t.observe(this.scroll.scroller.content,{attributes:!0,childList:!0,subtree:!0})},t.prototype.shouldNotRefresh=function(){var t=this.scroll.scroller,e=t.scrollBehaviorX,o=t.scrollBehaviorY,s=e.currentPos>e.minScrollPos||e.currentPos<e.maxScrollPos||o.currentPos>o.minScrollPos||o.currentPos<o.maxScrollPos;return t.animater.pending||s},t.prototype.checkDOMUpdate=function(){var t=this,e=this.scroll.scroller.content,o=N(e),s=o.width,i=o.height,r=function(){setTimeout((function(){!function(){if(!t.stopObserver){var n=(o=N(e)).width,l=o.height;s===n&&i===l||t.scroll.refresh(),s=n,i=l,r()}}()}),1e3)};r()},t.prototype.registerHooks=function(t,e,o){t.on(e,o,this),this.hooksFn.push([t,e,o])},t.prototype.stopObserve=function(){this.stopObserver=!0,this.observer&&this.observer.disconnect()},t.prototype.destroy=function(){this.stopObserve(),this.hooksFn.forEach((function(t){var e=t[0],o=t[1],s=t[2];e.off(o,s)})),this.hooksFn.length=0},t.pluginName="observeDOM",t}(),wt=[{key:"finishPullDown",name:"finishPullDown"},{key:"openPullDown",name:"openPullDown"},{key:"closePullDown",name:"closePullDown"},{key:"autoPullDownRefresh",name:"autoPullDownRefresh"}].map((function(t){return{key:t.key,sourceKey:"plugins.pullDownRefresh."+t.name}})),xt=function(){function t(t){this.scroll=t,this.pulling=0,this.thresholdBoundary=0,this.init()}return t.prototype.setPulling=function(t){this.pulling=t},t.prototype.setThresholdBoundary=function(t){this.thresholdBoundary=t},t.prototype.init=function(){this.handleBScroll(),this.handleOptions(this.scroll.options.pullDownRefresh),this.handleHooks(),this.watch()},t.prototype.handleBScroll=function(){this.scroll.registerType(["pullingDown","enterThreshold","leaveThreshold"]),this.scroll.proxy(wt)},t.prototype.handleOptions=function(t){void 0===t&&(t={}),t=!0===t?{}:t;this.options=S({threshold:90,stop:40},t),this.scroll.options.probeType=3},t.prototype.handleHooks=function(){var t=this;this.hooksFn=[];var e=this.scroll.scroller,o=e.scrollBehaviorY;this.currentMinScrollY=this.cachedOriginanMinScrollY=o.minScrollPos,this.registerHooks(this.scroll.hooks,this.scroll.hooks.eventTypes.contentChanged,(function(){t.finishPullDown()})),this.registerHooks(o.hooks,o.hooks.eventTypes.computeBoundary,(function(e){e.maxScrollPos>0&&(e.maxScrollPos=-1),e.minScrollPos=t.currentMinScrollY})),this.hasMouseWheelPlugin()&&(this.registerHooks(this.scroll,this.scroll.eventTypes.alterOptions,(function(t){t.discreteTime=300,t.easeTime=350})),this.registerHooks(this.scroll,this.scroll.eventTypes.mousewheelEnd,(function(){e.hooks.trigger(e.hooks.eventTypes.end)})))},t.prototype.registerHooks=function(t,e,o){t.on(e,o,this),this.hooksFn.push([t,e,o])},t.prototype.hasMouseWheelPlugin=function(){return!!this.scroll.eventTypes.alterOptions},t.prototype.watch=function(){var t=this.scroll.scroller;this.watching=!0,this.registerHooks(t.hooks,t.hooks.eventTypes.end,this.checkPullDown),this.registerHooks(this.scroll,this.scroll.eventTypes.scrollStart,this.resetStateBeforeScrollStart),this.registerHooks(this.scroll,this.scroll.eventTypes.scroll,this.checkLocationOfThresholdBoundary),this.hasMouseWheelPlugin()&&this.registerHooks(this.scroll,this.scroll.eventTypes.mousewheelStart,this.resetStateBeforeScrollStart)},t.prototype.resetStateBeforeScrollStart=function(){this.isFetchingStatus()||(this.setPulling(1),this.setThresholdBoundary(0))},t.prototype.checkLocationOfThresholdBoundary=function(){if(1===this.pulling){var t=this.scroll,e=1!==this.thresholdBoundary&&this.locateInsideThresholdBoundary(),o=2!==this.thresholdBoundary&&!this.locateInsideThresholdBoundary();e&&(this.setThresholdBoundary(1),t.trigger("enterThreshold")),o&&(this.setThresholdBoundary(2),t.trigger("leaveThreshold"))}},t.prototype.locateInsideThresholdBoundary=function(){return this.scroll.y<=this.options.threshold},t.prototype.unwatch=function(){var t=this.scroll,e=t.scroller;this.watching=!1,e.hooks.off(e.hooks.eventTypes.end,this.checkPullDown),t.off(t.eventTypes.scrollStart,this.resetStateBeforeScrollStart),t.off(t.eventTypes.scroll,this.checkLocationOfThresholdBoundary),this.hasMouseWheelPlugin()&&t.off(t.eventTypes.mousewheelStart,this.resetStateBeforeScrollStart)},t.prototype.checkPullDown=function(){var t=this.options,e=t.threshold,o=t.stop;return!(this.scroll.y<e)&&(1===this.pulling&&(this.modifyBehaviorYBoundary(o),this.setPulling(2),this.scroll.trigger("pullingDown")),this.scroll.scrollTo(this.scroll.x,o,this.scroll.options.bounceTime,K.bounce),this.isFetchingStatus())},t.prototype.isFetchingStatus=function(){return 2===this.pulling},t.prototype.modifyBehaviorYBoundary=function(t){var e=this.scroll.scroller.scrollBehaviorY;this.cachedOriginanMinScrollY=e.minScrollPos,this.currentMinScrollY=t,e.computeBoundary()},t.prototype.finishPullDown=function(){if(this.isFetchingStatus()){var t=this.scroll.scroller.scrollBehaviorY;this.currentMinScrollY=this.cachedOriginanMinScrollY,t.computeBoundary(),this.setPulling(0),this.scroll.resetPosition(this.scroll.options.bounceTime,K.bounce)}},t.prototype.openPullDown=function(t){void 0===t&&(t={}),this.handleOptions(t),this.watching||this.watch()},t.prototype.closePullDown=function(){this.unwatch()},t.prototype.autoPullDownRefresh=function(){var t=this.options,e=t.threshold,o=t.stop;!this.isFetchingStatus()&&this.watching&&(this.modifyBehaviorYBoundary(o),this.scroll.trigger(this.scroll.eventTypes.scrollStart),this.scroll.scrollTo(this.scroll.x,e),this.setPulling(2),this.scroll.trigger("pullingDown"),this.scroll.scrollTo(this.scroll.x,o,this.scroll.options.bounceTime,K.bounce))},t.pluginName="pullDownRefresh",t}(),Mt=[{key:"finishPullUp",name:"finishPullUp"},{key:"openPullUp",name:"openPullUp"},{key:"closePullUp",name:"closePullUp"},{key:"autoPullUpLoad",name:"autoPullUpLoad"}].map((function(t){return{key:t.key,sourceKey:"plugins.pullUpLoad."+t.name}})),Yt=function(){function t(t){this.scroll=t,this.pulling=!1,this.watching=!1,this.init()}return t.prototype.init=function(){this.handleBScroll(),this.handleOptions(this.scroll.options.pullUpLoad),this.handleHooks(),this.watch()},t.prototype.handleBScroll=function(){this.scroll.registerType(["pullingUp"]),this.scroll.proxy(Mt)},t.prototype.handleOptions=function(t){void 0===t&&(t={}),t=!0===t?{}:t;this.options=S({threshold:0},t),this.scroll.options.probeType=3},t.prototype.handleHooks=function(){var t=this;this.hooksFn=[];var e=this.scroll.scroller.scrollBehaviorY;this.registerHooks(this.scroll.hooks,this.scroll.hooks.eventTypes.contentChanged,(function(){t.finishPullUp()})),this.registerHooks(e.hooks,e.hooks.eventTypes.computeBoundary,(function(t){t.maxScrollPos>0&&(t.maxScrollPos=-1)}))},t.prototype.registerHooks=function(t,e,o){t.on(e,o,this),this.hooksFn.push([t,e,o])},t.prototype.watch=function(){this.watching||(this.watching=!0,this.registerHooks(this.scroll,this.scroll.eventTypes.scroll,this.checkPullUp))},t.prototype.unwatch=function(){this.watching=!1,this.scroll.off(this.scroll.eventTypes.scroll,this.checkPullUp)},t.prototype.checkPullUp=function(t){var e=this,o=this.options.threshold;1===this.scroll.movingDirectionY&&t.y<=this.scroll.maxScrollY+o&&(this.pulling=!0,this.scroll.once(this.scroll.eventTypes.scrollEnd,(function(){e.pulling=!1})),this.unwatch(),this.scroll.trigger("pullingUp"))},t.prototype.finishPullUp=function(){var t=this;this.scroll.scroller.scrollBehaviorY.setMovingDirection(0),this.pulling?this.scroll.once(this.scroll.eventTypes.scrollEnd,(function(){t.watch()})):this.watch()},t.prototype.openPullUp=function(t){void 0===t&&(t={}),this.handleOptions(t),this.watch()},t.prototype.closePullUp=function(){this.unwatch()},t.prototype.autoPullUpLoad=function(){var t=this.options.threshold,e=this.scroll.scroller.scrollBehaviorY;if(!this.pulling&&this.watching){var o=e.maxScrollPos+t+-1;this.scroll.scroller.scrollBehaviorY.setMovingDirection(-1),this.scroll.scrollTo(this.scroll.x,o,this.scroll.options.bounceTime)}},t.pluginName="pullUpLoad",t}(),Et=function(){function t(t,e){this.indicator=t,this.options=e,this.hooks=new J(["touchStart","touchMove","touchEnd"]),this.registerEvents()}return t.prototype.registerEvents=function(){var t=this.options,e=t.disableMouse,o=t.disableTouch,s=[],i=[],r=[];e||(s.push({name:"mousedown",handler:this.start.bind(this)}),i.push({name:"mousemove",handler:this.move.bind(this)}),r.push({name:"mouseup",handler:this.end.bind(this)})),o||(s.push({name:"touchstart",handler:this.start.bind(this)}),i.push({name:"touchmove",handler:this.move.bind(this)}),r.push({name:"touchend",handler:this.end.bind(this)},{name:"touchcancel",handler:this.end.bind(this)})),this.startEventRegister=new Q(this.indicator.indicatorEl,s),this.moveEventRegister=new Q(window,i),this.endEventRegister=new Q(window,r)},t.prototype.BScrollIsDisabled=function(){return!this.indicator.scroll.enabled},t.prototype.start=function(t){if(!this.BScrollIsDisabled()){var e=t.touches?t.touches[0]:t;t.preventDefault(),t.stopPropagation(),this.initiated=!0,this.lastPoint=e[this.indicator.keysMap.point],this.hooks.trigger(this.hooks.eventTypes.touchStart)}},t.prototype.move=function(t){if(this.initiated){var e=(t.touches?t.touches[0]:t)[this.indicator.keysMap.point];t.preventDefault(),t.stopPropagation();var o=e-this.lastPoint;this.lastPoint=e,this.hooks.trigger(this.hooks.eventTypes.touchMove,o)}},t.prototype.end=function(t){this.initiated&&(this.initiated=!1,t.preventDefault(),t.stopPropagation(),this.hooks.trigger(this.hooks.eventTypes.touchEnd))},t.prototype.destroy=function(){this.startEventRegister.destroy(),this.moveEventRegister.destroy(),this.endEventRegister.destroy()},t}(),Bt=function(){function t(t,e){this.scroll=t,this.options=e,this.hooksFn=[],this.wrapper=e.wrapper,this.direction=e.direction,this.indicatorEl=this.wrapper.children[0],this.keysMap=this.getKeysMap(),this.handleFade(),this.handleHooks()}return t.prototype.handleFade=function(){this.options.fade&&(this.wrapper.style.opacity="0")},t.prototype.handleHooks=function(){var t=this,e=this.options,o=e.fade,s=e.interactive,i=e.scrollbarTrackClickable,r=this.scroll,n=r.hooks,l=r.scroller.translater.hooks,h=r.scroller.animater.hooks;if(this.registerHooks(n,n.eventTypes.refresh,this.refresh),this.registerHooks(l,l.eventTypes.translate,(function(e){var o=t.keysMap.hasScroll;t.scroll[o]&&t.updatePosition(e)})),this.registerHooks(h,h.eventTypes.time,this.transitionTime),this.registerHooks(h,h.eventTypes.timeFunction,this.transitionTimingFunction),o&&(this.registerHooks(r,r.eventTypes.scrollEnd,(function(){t.fade()})),this.registerHooks(r,r.eventTypes.scrollStart,(function(){t.fade(!0)})),r.eventTypes.mousewheelStart&&r.eventTypes.mousewheelEnd&&(this.registerHooks(r,r.eventTypes.mousewheelStart,(function(){t.fade(!0)})),this.registerHooks(r,r.eventTypes.mousewheelMove,(function(){t.fade(!0)})),this.registerHooks(r,r.eventTypes.mousewheelEnd,(function(){t.fade()})))),s){var a=this.scroll.options,c=a.disableMouse,p=a.disableTouch;this.eventHandler=new Et(this,{disableMouse:c,disableTouch:p});var u=this.eventHandler.hooks;this.registerHooks(u,u.eventTypes.touchStart,this.startHandler),this.registerHooks(u,u.eventTypes.touchMove,this.moveHandler),this.registerHooks(u,u.eventTypes.touchEnd,this.endHandler)}i&&this.bindClick()},t.prototype.registerHooks=function(t,e,o){t.on(e,o,this),this.hooksFn.push([t,e,o])},t.prototype.bindClick=function(){var t=this.wrapper;this.clickEventRegister=new Q(t,[{name:"click",handler:this.handleClick.bind(this)}])},t.prototype.handleClick=function(t){var e=this.calculateclickOffsetPos(t),o=this.scroll,s=o.x,i=o.y;s="horizontal"===this.direction?e:s,i="vertical"===this.direction?e:i,this.scroll.scrollTo(s,i,this.options.scrollbarTrackOffsetTime)},t.prototype.calculateclickOffsetPos=function(t){var e=this.keysMap,o=e.point,s=e.domRect,i=this.options.scrollbarTrackOffsetType,r=t[o]-this.wrapperRect[s],n=r<this.currentPos?-1:1,l=0,h=this.currentPos;return"step"===i?l=this.scrollInfo.baseSize*n:(l=0,h=r),this.newPos(h,l,this.scrollInfo)},t.prototype.getKeysMap=function(){return"vertical"===this.direction?{hasScroll:"hasVerticalScroll",size:"height",wrapperSize:"clientHeight",scrollerSize:"scrollerHeight",maxScrollPos:"maxScrollY",pos:"y",point:"pageY",translateProperty:"translateY",domRect:"top"}:{hasScroll:"hasHorizontalScroll",size:"width",wrapperSize:"clientWidth",scrollerSize:"scrollerWidth",maxScrollPos:"maxScrollX",pos:"x",point:"pageX",translateProperty:"translateX",domRect:"left"}},t.prototype.fade=function(t){var e=this.options,o=e.fadeInTime,s=e.fadeOutTime,i=t?o:s,r=this.wrapper;r.style[F.transitionDuration]=i+"ms",r.style.opacity=t?"1":"0"},t.prototype.refresh=function(){var t=this.keysMap.hasScroll,e=this.scroll,o=e.x,s=e.y;if(this.wrapperRect=this.wrapper.getBoundingClientRect(),this.canScroll(e[t])){var i=this.keysMap,r=i.wrapperSize,n=i.scrollerSize,l=i.maxScrollPos;this.scrollInfo=this.refreshScrollInfo(this.wrapper[r],e[n],e[l],this.indicatorEl[r]),this.updatePosition({x:o,y:s})}},t.prototype.transitionTime=function(t){void 0===t&&(t=0),this.indicatorEl.style[F.transitionDuration]=t+"ms"},t.prototype.transitionTimingFunction=function(t){this.indicatorEl.style[F.transitionTimingFunction]=t},t.prototype.canScroll=function(t){return this.wrapper.style.display=t?"block":"none",t},t.prototype.refreshScrollInfo=function(t,e,o,s){var i=Math.max(Math.round(t*t/(e||t||1)),this.options.minSize);this.options.isCustom&&(i=s);var r=t-i;return{baseSize:i,maxScrollPos:r,minScrollPos:0,sizeRatio:r/o}},t.prototype.updatePosition=function(t){var e=this.caculatePosAndSize(t,this.scrollInfo),o=e.pos,s=e.size;this.refreshStyle(s,o),this.currentPos=o},t.prototype.caculatePosAndSize=function(t,e){var o,s=this.keysMap.pos,i=e.sizeRatio,r=e.baseSize,n=e.maxScrollPos,l=e.minScrollPos,h=this.options.minSize,a=Math.round(i*t[s]);return a<l?(o=Math.max(r+3*a,h),a=l):a>n?a=n+r-(o=Math.max(r-3*(a-n),h)):o=r,{pos:a,size:o}},t.prototype.refreshStyle=function(t,e){var o=this.keysMap,s=o.translateProperty,i=o.size,r=this.scroll.options.translateZ;this.indicatorEl.style[i]=t+"px",this.indicatorEl.style[F.transform]=s+"("+e+"px)"+r},t.prototype.startHandler=function(){this.moved=!1,this.startTime=T(),this.transitionTime(),this.scroll.scroller.hooks.trigger(this.scroll.scroller.hooks.eventTypes.beforeScrollStart)},t.prototype.moveHandler=function(t){if(this.moved||this.indicatorNotMoved(t)||(this.moved=!0,this.scroll.scroller.hooks.trigger(this.scroll.scroller.hooks.eventTypes.scrollStart)),this.moved){var e=this.newPos(this.currentPos,t,this.scrollInfo);this.syncBScroll(e)}},t.prototype.endHandler=function(){if(this.moved){var t=this.scroll,e=t.x,o=t.y;this.scroll.scroller.hooks.trigger(this.scroll.scroller.hooks.eventTypes.scrollEnd,{x:e,y:o})}},t.prototype.indicatorNotMoved=function(t){var e=this.currentPos,o=this.scrollInfo,s=o.maxScrollPos;return e===o.minScrollPos&&t<=0||e===s&&t>=0},t.prototype.syncBScroll=function(t){var e=T(),o=this.scroll,s=o.x,i=o.y,r=o.options,n=o.scroller,l=o.maxScrollY,h=o.minScrollY,a=o.maxScrollX,c=o.minScrollX,p=r.probeType,u=r.momentumLimitTime,d={x:s,y:i};"vertical"===this.direction?d.y=P(t,l,h):d.x=P(t,a,c),n.translater.translate(d),e-this.startTime>u&&(this.startTime=e,1===p&&n.hooks.trigger(n.hooks.eventTypes.scroll,d)),p>1&&n.hooks.trigger(n.hooks.eventTypes.scroll,d)},t.prototype.newPos=function(t,e,o){var s=o.maxScrollPos,i=o.sizeRatio,r=t+e;return r=P(r,o.minScrollPos,s),Math.round(r/i)},t.prototype.destroy=function(){var t=this.options,e=t.interactive,o=t.scrollbarTrackClickable,s=t.isCustom;e&&this.eventHandler.destroy(),o&&this.clickEventRegister.destroy(),s||this.wrapper.parentNode.removeChild(this.wrapper),this.hooksFn.forEach((function(t){var e=t[0],o=t[1],s=t[2];e.off(o,s)})),this.hooksFn.length=0},t}(),Xt=function(){function t(t){this.scroll=t,this.handleOptions(),this.createIndicators(),this.handleHooks()}return t.prototype.handleHooks=function(){var t=this,e=this.scroll;e.hooks.on(e.hooks.eventTypes.destroy,(function(){for(var e=0,o=t.indicators;e<o.length;e++){o[e].destroy()}}))},t.prototype.handleOptions=function(){var t=!0===this.scroll.options.scrollbar?{}:this.scroll.options.scrollbar;this.options=S({fade:!0,fadeInTime:250,fadeOutTime:500,interactive:!1,customElements:[],minSize:8,scrollbarTrackClickable:!1,scrollbarTrackOffsetType:"step",scrollbarTrackOffsetTime:300},t)},t.prototype.createIndicators=function(){for(var t,e=this.scroll,o=[],s=["scrollX","scrollY"],i=["horizontal","vertical"],r=this.options.customElements,l=0;l<s.length;l++){var h=s[l];if(e.options[h]){var a=r.shift(),c=i[l],p=!1,u=a||this.createScrollbarElement(c);u!==a?e.wrapper.appendChild(u):p=!0,t=n(n({wrapper:u,direction:c},this.options),{isCustom:p}),o.push(new Bt(e,t))}}this.indicators=o},t.prototype.createScrollbarElement=function(t,e){void 0===e&&(e=this.options.scrollbarTrackClickable);var o=document.createElement("div"),s=document.createElement("div");return o.style.cssText="position:absolute;z-index:9999;overflow:hidden;",s.style.cssText="box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px;",s.className="bscroll-indicator","horizontal"===t?(o.style.cssText+="height:7px;left:2px;right:2px;bottom:0;",s.style.height="100%",o.className="bscroll-horizontal-scrollbar"):(o.style.cssText+="width:7px;bottom:2px;top:2px;right:1px;",s.style.width="100%",o.className="bscroll-vertical-scrollbar"),e||(o.style.cssText+="pointer-events:none;"),o.appendChild(s),o},t.pluginName="scrollbar",t}(),Ot=function(){function t(t){this.scroll=t,this.init()}return t.prototype.init=function(){var t=this.scroll.scroller,e=t.scrollBehaviorX,o=t.scrollBehaviorY;this.wrapperWidth=e.wrapperSize,this.wrapperHeight=o.wrapperSize,this.scrollerHeight=o.contentSize,this.scrollerWidth=e.contentSize,this.pages=this.buildPagesMatrix(this.wrapperWidth,this.wrapperHeight),this.pageLengthOfX=this.pages?this.pages.length:0,this.pageLengthOfY=this.pages&&this.pages[0]?this.pages[0].length:0},t.prototype.getPageStats=function(t,e){return this.pages[t][e]},t.prototype.getNearestPageIndex=function(t,e){for(var o=0,s=0,i=this.pages.length;o<i-1&&!(t>=this.pages[o][0].cx);o++);for(i=this.pages[o].length;s<i-1&&!(e>=this.pages[0][s].cy);s++);return{pageX:o,pageY:s}},t.prototype.buildPagesMatrix=function(t,e){var o,s,i,r,n=[],l=0,h=0,a=this.scroll.scroller.scrollBehaviorX.maxScrollPos,c=this.scroll.scroller.scrollBehaviorY.maxScrollPos;for(s=Math.round(t/2),i=Math.round(e/2);l>-this.scrollerWidth;){for(n[h]=[],r=0,o=0;o>-this.scrollerHeight;)n[h][r]={x:Math.max(l,a),y:Math.max(o,c),width:t,height:e,cx:l-s,cy:o-i},o-=e,r++;l-=t,h++}return n},t}(),Dt={pageX:0,pageY:0,x:0,y:0},Ht=function(){function t(t,e){this.scroll=t,this.slideOptions=e,this.slideX=!1,this.slideY=!1,this.currentPage=S({},Dt)}return t.prototype.refresh=function(){this.pagesMatrix=new Ot(this.scroll),this.checkSlideLoop(),this.currentPage=this.getAdjustedCurrentPage()},t.prototype.getAdjustedCurrentPage=function(){var t=this.currentPage,e=t.pageX,o=t.pageY;e=Math.min(e,this.pagesMatrix.pageLengthOfX-1),o=Math.min(o,this.pagesMatrix.pageLengthOfY-1),this.loopX&&(e=Math.min(e,this.pagesMatrix.pageLengthOfX-2)),this.loopY&&(o=Math.min(o,this.pagesMatrix.pageLengthOfY-2));var s=this.pagesMatrix.getPageStats(e,o);return{pageX:e,pageY:o,x:s.x,y:s.y}},t.prototype.setCurrentPage=function(t){this.currentPage=t},t.prototype.getInternalPage=function(t,e){t>=this.pagesMatrix.pageLengthOfX?t=this.pagesMatrix.pageLengthOfX-1:t<0&&(t=0),e>=this.pagesMatrix.pageLengthOfY?e=this.pagesMatrix.pageLengthOfY-1:e<0&&(e=0);var o=this.pagesMatrix.getPageStats(t,e);return{pageX:t,pageY:e,x:o.x,y:o.y}},t.prototype.getInitialPage=function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var o=this.slideOptions,s=o.startPageXIndex,i=o.startPageYIndex,r=this.loopX?1:0,n=this.loopY?1:0,l=t?r:this.currentPage.pageX,h=t?n:this.currentPage.pageY;e?(l=this.loopX?s+1:s,h=this.loopY?i+1:i):(l=t?r:this.currentPage.pageX,h=t?n:this.currentPage.pageY);var a=this.pagesMatrix.getPageStats(l,h);return{pageX:l,pageY:h,x:a.x,y:a.y}},t.prototype.getExposedPage=function(t){var e=S({},t);return this.loopX&&(e.pageX=this.fixedPage(e.pageX,this.pagesMatrix.pageLengthOfX-2)),this.loopY&&(e.pageY=this.fixedPage(e.pageY,this.pagesMatrix.pageLengthOfY-2)),e},t.prototype.getExposedPageByPageIndex=function(t,e){var o={pageX:t,pageY:e};this.loopX&&(o.pageX=t+1),this.loopY&&(o.pageY=e+1);var s=this.pagesMatrix.getPageStats(o.pageX,o.pageY);return{x:s.x,y:s.y,pageX:t,pageY:e}},t.prototype.getWillChangedPage=function(t){return t=S({},t),this.loopX&&(t.pageX=this.fixedPage(t.pageX,this.pagesMatrix.pageLengthOfX-2),t.x=this.pagesMatrix.getPageStats(t.pageX+1,0).x),this.loopY&&(t.pageY=this.fixedPage(t.pageY,this.pagesMatrix.pageLengthOfY-2),t.y=this.pagesMatrix.getPageStats(0,t.pageY+1).y),t},t.prototype.fixedPage=function(t,e){for(var o=[],s=0;s<e;s++)o.push(s);return o.unshift(e-1),o.push(0),o[t]},t.prototype.getPageStats=function(){return this.pagesMatrix.getPageStats(this.currentPage.pageX,this.currentPage.pageY)},t.prototype.getValidPageIndex=function(t,e){var o=this.pagesMatrix.pageLengthOfX-1,s=this.pagesMatrix.pageLengthOfY-1,i=0,r=0;return this.loopX&&(t+=1,i+=1,o-=1),this.loopY&&(e+=1,r+=1,s-=1),{pageX:t=P(t,i,o),pageY:e=P(e,r,s)}},t.prototype.nextPageIndex=function(){return this.getPageIndexByDirection("positive")},t.prototype.prevPageIndex=function(){return this.getPageIndexByDirection("negative")},t.prototype.getNearestPage=function(t,e){var o=this.pagesMatrix.getNearestPageIndex(t,e),s=o.pageX,i=o.pageY;return{x:this.pagesMatrix.getPageStats(s,0).x,y:this.pagesMatrix.getPageStats(0,i).y,pageX:s,pageY:i}},t.prototype.getPageByDirection=function(t,e,o){var s=t.pageX,i=t.pageY;return s===this.currentPage.pageX&&(s=P(s+e,0,this.pagesMatrix.pageLengthOfX-1)),i===this.currentPage.pageY&&(i=P(i+o,0,this.pagesMatrix.pageLengthOfY-1)),{x:this.pagesMatrix.getPageStats(s,0).x,y:this.pagesMatrix.getPageStats(0,i).y,pageX:s,pageY:i}},t.prototype.resetLoopPage=function(){if(this.loopX){if(0===this.currentPage.pageX)return{pageX:this.pagesMatrix.pageLengthOfX-2,pageY:this.currentPage.pageY};if(this.currentPage.pageX===this.pagesMatrix.pageLengthOfX-1)return{pageX:1,pageY:this.currentPage.pageY}}if(this.loopY){if(0===this.currentPage.pageY)return{pageX:this.currentPage.pageX,pageY:this.pagesMatrix.pageLengthOfY-2};if(this.currentPage.pageY===this.pagesMatrix.pageLengthOfY-1)return{pageX:this.currentPage.pageX,pageY:1}}},t.prototype.getPageIndexByDirection=function(t){var e=this.currentPage.pageX,o=this.currentPage.pageY;return this.slideX&&(e="negative"===t?e-1:e+1),this.slideY&&(o="negative"===t?o-1:o+1),{pageX:e,pageY:o}},t.prototype.checkSlideLoop=function(){this.wannaLoop=this.slideOptions.loop,this.pagesMatrix.pageLengthOfX>1?this.slideX=!0:this.slideX=!1,this.pagesMatrix.pages[0]&&this.pagesMatrix.pageLengthOfY>1?this.slideY=!0:this.slideY=!1,this.loopX=this.wannaLoop&&this.slideX,this.loopY=this.wannaLoop&&this.slideY,this.slideX&&this.slideY&&p("slide does not support two direction at the same time.")},t}(),Ct=[{key:"next",name:"next"},{key:"prev",name:"prev"},{key:"goToPage",name:"goToPage"},{key:"getCurrentPage",name:"getCurrentPage"},{key:"startPlay",name:"startPlay"},{key:"pausePlay",name:"pausePlay"}].map((function(t){return{key:t.key,sourceKey:"plugins.slide."+t.name}})),It=function(){function t(t){this.scroll=t,this.cachedClonedPageDOM=[],this.resetLooping=!1,this.autoplayTimer=0,this.satisfyInitialization()&&this.init()}return t.prototype.satisfyInitialization=function(){return!(this.scroll.scroller.content.children.length<=0)||(p("slide need at least one slide page to be initialised.please check your DOM layout."),!1)},t.prototype.init=function(){this.willChangeToPage=S({},Dt),this.handleBScroll(),this.handleOptions(),this.handleHooks(),this.createPages()},t.prototype.createPages=function(){this.pages=new Ht(this.scroll,this.options)},t.prototype.handleBScroll=function(){this.scroll.registerType(["slideWillChange","slidePageChanged"]),this.scroll.proxy(Ct)},t.prototype.handleOptions=function(){var t=!0===this.scroll.options.slide?{}:this.scroll.options.slide,e={loop:!0,threshold:.1,speed:400,easing:K.bounce,listenFlick:!0,autoplay:!0,interval:3e3,startPageXIndex:0,startPageYIndex:0};this.options=S(e,t)},t.prototype.handleLoop=function(t){var e=this.options.loop,o=this.scroll.scroller.content,s=o.children.length;e&&(o!==t?(this.resetLoopChangedStatus(),this.removeClonedSlidePage(t),s>1&&this.cloneFirstAndLastSlidePage(o)):3===s&&this.initialised?(this.removeClonedSlidePage(o),this.moreToOnePageInLoop=!0,this.oneToMorePagesInLoop=!1):s>1?(this.initialised&&0===this.cachedClonedPageDOM.length?(this.oneToMorePagesInLoop=!0,this.moreToOnePageInLoop=!1):(this.removeClonedSlidePage(o),this.resetLoopChangedStatus()),this.cloneFirstAndLastSlidePage(o)):this.resetLoopChangedStatus())},t.prototype.resetLoopChangedStatus=function(){this.moreToOnePageInLoop=!1,this.oneToMorePagesInLoop=!1},t.prototype.handleHooks=function(){var t=this,e=this.scroll.hooks,o=this.scroll.scroller.hooks,s=this.options.listenFlick;this.prevContent=this.scroll.scroller.content,this.hooksFn=[],this.registerHooks(this.scroll,this.scroll.eventTypes.beforeScrollStart,this.pausePlay),this.registerHooks(this.scroll,this.scroll.eventTypes.scrollEnd,this.modifyCurrentPage),this.registerHooks(this.scroll,this.scroll.eventTypes.scrollEnd,this.startPlay),this.scroll.eventTypes.mousewheelMove&&(this.registerHooks(this.scroll,this.scroll.eventTypes.mousewheelMove,(function(){return!0})),this.registerHooks(this.scroll,this.scroll.eventTypes.mousewheelEnd,(function(e){1!==e.directionX&&1!==e.directionY||t.next(),-1!==e.directionX&&-1!==e.directionY||t.prev()}))),this.registerHooks(e,e.eventTypes.refresh,this.refreshHandler),this.registerHooks(e,e.eventTypes.destroy,this.destroy),this.registerHooks(o,o.eventTypes.beforeRefresh,(function(){t.handleLoop(t.prevContent),t.setSlideInlineStyle()})),this.registerHooks(o,o.eventTypes.momentum,this.modifyScrollMetaHandler),this.registerHooks(o,o.eventTypes.scroll,this.scrollHandler),this.registerHooks(o,o.eventTypes.checkClick,this.startPlay),s&&this.registerHooks(o,o.eventTypes.flick,this.flickHandler)},t.prototype.startPlay=function(){var t=this,e=this.options,o=e.interval;e.autoplay&&(clearTimeout(this.autoplayTimer),this.autoplayTimer=window.setTimeout((function(){t.next()}),o))},t.prototype.pausePlay=function(){this.options.autoplay&&clearTimeout(this.autoplayTimer)},t.prototype.setSlideInlineStyle=function(){var t=this.scroll.scroller,e=t.content,o=t.wrapper,s=this.scroll.options;[{direction:"scrollX",sizeType:"offsetWidth",styleType:"width"},{direction:"scrollY",sizeType:"offsetHeight",styleType:"height"}].forEach((function(t){var i=t.direction,r=t.sizeType,n=t.styleType;if(s[i]){for(var l=o[r],h=e.children,a=h.length,c=0;c<a;c++){h[c].style[n]=l+"px"}e.style[n]=l*a+"px"}}))},t.prototype.next=function(t,e){var o=this.pages.nextPageIndex(),s=o.pageX,i=o.pageY;this.goTo(s,i,t,e)},t.prototype.prev=function(t,e){var o=this.pages.prevPageIndex(),s=o.pageX,i=o.pageY;this.goTo(s,i,t,e)},t.prototype.goToPage=function(t,e,o,s){var i=this.pages.getValidPageIndex(t,e);this.goTo(i.pageX,i.pageY,o,s)},t.prototype.getCurrentPage=function(){return this.exposedPage||this.pages.getInitialPage(!1,!0)},t.prototype.setCurrentPage=function(t){this.pages.setCurrentPage(t),this.exposedPage=this.pages.getExposedPage(t)},t.prototype.nearestPage=function(t,e){var o=this.scroll.scroller,s=o.scrollBehaviorX,i=o.scrollBehaviorY,r=s.maxScrollPos,n=s.minScrollPos,l=i.maxScrollPos,h=i.minScrollPos;return this.pages.getNearestPage(P(t,r,n),P(e,l,h))},t.prototype.satisfyThreshold=function(t,e){var o=this.scroll.scroller,s=o.scrollBehaviorX,i=o.scrollBehaviorY,r=!0;return Math.abs(t-s.absStartPos)<=this.thresholdX&&Math.abs(e-i.absStartPos)<=this.thresholdY&&(r=!1),r},t.prototype.refreshHandler=function(t){var e=this;if(this.satisfyInitialization()){this.pages.refresh(),this.computeThreshold();var o=this.contentChanged=this.prevContent!==t;o&&(this.prevContent=t);var s=this.pages.getInitialPage(this.oneToMorePagesInLoop||this.moreToOnePageInLoop,o||!this.initialised);this.initialised?this.goTo(s.pageX,s.pageY,0):this.registerHooks(this.scroll.hooks,this.scroll.hooks.eventTypes.beforeInitialScrollTo,(function(t){e.initialised=!0,t.x=s.x,t.y=s.y})),this.startPlay()}},t.prototype.computeThreshold=function(){var t=this.options.threshold;if(t%1==0)this.thresholdX=t,this.thresholdY=t;else{var e=this.pages.getPageStats(),o=e.width,s=e.height;this.thresholdX=Math.round(o*t),this.thresholdY=Math.round(s*t)}},t.prototype.cloneFirstAndLastSlidePage=function(t){var e,o,s,i=t.children,r=i[i.length-1].cloneNode(!0),n=i[0].cloneNode(!0);e=r,(s=(o=t).firstChild)?function(t,e){e.parentNode.insertBefore(t,e)}(e,s):o.appendChild(e),t.appendChild(n),this.cachedClonedPageDOM=[r,n]},t.prototype.removeClonedSlidePage=function(t){(t&&t.children||[]).length&&this.cachedClonedPageDOM.forEach((function(e){!function(t,e){t.removeChild(e)}(t,e)})),this.cachedClonedPageDOM=[]},t.prototype.modifyCurrentPage=function(t){var e=this.getCurrentPage(),o=e.pageX,s=e.pageY,i=this.nearestPage(t.x,t.y);if(this.setCurrentPage(i),this.contentChanged)return this.contentChanged=!1,!0;var r=this.getCurrentPage(),n=r.pageX,l=r.pageY;if(this.pageWillChangeTo(i),this.oneToMorePagesInLoop)return this.oneToMorePagesInLoop=!1,!0;if(this.moreToOnePageInLoop&&0===o&&0===s)return this.moreToOnePageInLoop=!1,!0;if(o!==n||s!==l){var h=this.pages.getExposedPageByPageIndex(n,l);this.scroll.trigger(this.scroll.eventTypes.slidePageChanged,h)}if(!this.resetLooping){var a=this.pages.resetLoopPage();return a?(this.resetLooping=!0,this.goTo(a.pageX,a.pageY,0),!0):void 0}this.resetLooping=!1},t.prototype.goTo=function(t,e,o,s){var i=this.pages.getInternalPage(t,e),r=s||this.options.easing||K.bounce,n=i.x,l=i.y,h=n-this.scroll.scroller.scrollBehaviorX.currentPos,a=l-this.scroll.scroller.scrollBehaviorY.currentPos;h||a?(o=void 0===o?this.getEaseTime(h,a):o,this.scroll.scroller.scrollTo(n,l,o,r)):this.scroll.scroller.togglePointerEvents(!0)},t.prototype.flickHandler=function(){var t=this.scroll.scroller,e=t.scrollBehaviorX,o=t.scrollBehaviorY,s=e.currentPos,i=e.startPos,r=e.direction,n=o.currentPos,l=o.startPos,h=o.direction,a=this.pages.currentPage,c=a.pageX,p=a.pageY,u=this.getEaseTime(s-i,n-l);this.goTo(c+r,p+h,u)},t.prototype.getEaseTime=function(t,e){return this.options.speed||Math.max(Math.max(Math.min(Math.abs(t),1e3),Math.min(Math.abs(e),1e3)),300)},t.prototype.modifyScrollMetaHandler=function(t){var e=this.scroll.scroller,o=e.scrollBehaviorX,s=e.scrollBehaviorY,i=e.animater,r=t.newX,n=t.newY,l=this.satisfyThreshold(r,n)||i.forceStopped?this.pages.getPageByDirection(this.nearestPage(r,n),o.direction,s.direction):this.pages.currentPage;t.time=this.getEaseTime(t.newX-l.x,t.newY-l.y),t.newX=l.x,t.newY=l.y,t.easing=this.options.easing||K.bounce},t.prototype.scrollHandler=function(t){var e=t.x,o=t.y;if(this.satisfyThreshold(e,o)){var s=this.nearestPage(e,o);this.pageWillChangeTo(s)}},t.prototype.pageWillChangeTo=function(t){var e,o,s=this.pages.getWillChangedPage(t);e=this.willChangeToPage,o=s,(e.pageX!==o.pageX||e.pageY!==o.pageY)&&(this.willChangeToPage=s,this.scroll.trigger(this.scroll.eventTypes.slideWillChange,this.willChangeToPage))},t.prototype.registerHooks=function(t,e,o){t.on(e,o,this),this.hooksFn.push([t,e,o])},t.prototype.destroy=function(){var t=this.scroll.scroller.content,e=this.options,o=e.loop,s=e.autoplay;o&&this.removeClonedSlidePage(t),s&&clearTimeout(this.autoplayTimer),this.hooksFn.forEach((function(t){var e=t[0],o=t[1],s=t[2];e.eventTypes[o]&&e.off(o,s)})),this.hooksFn.length=0},t.pluginName="slide",t}(),zt=[{key:"wheelTo",name:"wheelTo"},{key:"getSelectedIndex",name:"getSelectedIndex"},{key:"restorePosition",name:"restorePosition"}].map((function(t){return{key:t.key,sourceKey:"plugins.wheel."+t.name}})),Lt=4,Ft=function(){function t(t){this.scroll=t,this.init()}return t.prototype.init=function(){this.handleBScroll(),this.handleOptions(),this.handleHooks(),this.refreshBoundary(),this.setSelectedIndex(this.options.selectedIndex)},t.prototype.handleBScroll=function(){this.scroll.proxy(zt),this.scroll.registerType(["wheelIndexChanged"])},t.prototype.handleOptions=function(){var t=!0===this.scroll.options.wheel?{}:this.scroll.options.wheel;this.options=S({wheelWrapperClass:"wheel-scroll",wheelItemClass:"wheel-item",rotate:25,adjustTime:400,selectedIndex:0,wheelDisabledItemClass:"wheel-disabled-item"},t)},t.prototype.handleHooks=function(){var t=this,e=this.scroll,o=this.scroll.scroller,s=o.actionsHandler,i=o.scrollBehaviorX,r=o.scrollBehaviorY,n=o.animater,l=o.content;e.on(e.eventTypes.scrollEnd,(function(e){var s=t.findNearestValidWheel(e.y).index;if(o.animater.forceStopped&&!t.isAdjustingPosition)return t.target=t.items[s],!0;t.setSelectedIndex(s),t.isAdjustingPosition&&(t.isAdjustingPosition=!1)})),this.scroll.hooks.on(this.scroll.hooks.eventTypes.refresh,(function(e){e!==l&&(l=e,t.setSelectedIndex(t.options.selectedIndex,!0)),t.rotateX(t.scroll.y),t.wheelTo(t.selectedIndex,0)})),this.scroll.hooks.on(this.scroll.hooks.eventTypes.beforeInitialScrollTo,(function(e){e.x=0,e.y=-t.selectedIndex*t.itemHeight})),o.hooks.on(o.hooks.eventTypes.checkClick,(function(){var e,o=(e=t.items,Array.prototype.slice.call(e,0)).indexOf(t.target);return-1===o||t.wheelTo(o,t.options.adjustTime,K.swipe),!0})),o.hooks.on(o.hooks.eventTypes.scrollTo,(function(e){e.y=t.findNearestValidWheel(e.y).y})),o.hooks.on(o.hooks.eventTypes.minDistanceScroll,(function(){var t=o.animater;!0===t.forceStopped&&(t.forceStopped=!1)})),o.hooks.on(o.hooks.eventTypes.scrollToElement,(function(e,o){if(!j(e,t.options.wheelItemClass))return!0;o.top=t.findNearestValidWheel(o.top).y})),s.hooks.on(s.hooks.eventTypes.beforeStart,(function(e){t.target=e.target})),i.hooks.on(i.hooks.eventTypes.computeBoundary,(function(t){t.maxScrollPos=0,t.minScrollPos=0})),r.hooks.on(r.hooks.eventTypes.computeBoundary,(function(e){t.items=t.scroll.scroller.content.children,t.checkWheelAllDisabled(),t.itemHeight=t.items.length>0?r.contentSize/t.items.length:0,e.maxScrollPos=-t.itemHeight*(t.items.length-1),e.minScrollPos=0})),r.hooks.on(r.hooks.eventTypes.momentum,(function(e){e.rate=Lt,e.destination=t.findNearestValidWheel(e.destination).y})),r.hooks.on(r.hooks.eventTypes.end,(function(e){var o=t.findNearestValidWheel(r.currentPos);e.destination=o.y,e.duration=t.options.adjustTime})),n.hooks.on(n.hooks.eventTypes.time,(function(e){t.transitionDuration(e)})),n.hooks.on(n.hooks.eventTypes.timeFunction,(function(e){t.timeFunction(e)})),n.hooks.on(n.hooks.eventTypes.callStop,(function(){var e=t.findNearestValidWheel(t.scroll.y).index;t.isAdjustingPosition=!0,t.wheelTo(e,0)})),n.translater.hooks.on(n.translater.hooks.eventTypes.translate,(function(e){t.rotateX(e.y)}))},t.prototype.refreshBoundary=function(){var t=this.scroll.scroller,e=t.scrollBehaviorX,o=t.scrollBehaviorY,s=t.content;e.refresh(s),o.refresh(s)},t.prototype.setSelectedIndex=function(t,e){void 0===e&&(e=!1);var o=this.selectedIndex;this.selectedIndex=t,o===t||e||this.scroll.trigger("wheelIndexChanged",t)},t.prototype.getSelectedIndex=function(){return this.selectedIndex},t.prototype.wheelTo=function(t,e,o){void 0===t&&(t=0),void 0===e&&(e=0);var s=-t*this.itemHeight;this.scroll.scrollTo(0,s,e,o)},t.prototype.restorePosition=function(){if(this.scroll.pending){var t=this.getSelectedIndex();this.scroll.scroller.animater.clearTimer(),this.wheelTo(t,0)}},t.prototype.transitionDuration=function(t){for(var e=0;e<this.items.length;e++)this.items[e].style[F.transitionDuration]=t+"ms"},t.prototype.timeFunction=function(t){for(var e=0;e<this.items.length;e++)this.items[e].style[F.transitionTimingFunction]=t},t.prototype.rotateX=function(t){for(var e=this.options.rotate,o=void 0===e?25:e,s=0;s<this.items.length;s++){var i=(o*(t/this.itemHeight+s)).toFixed(3);this.items[s].style[F.transform]="rotateX("+i+"deg)"}},t.prototype.findNearestValidWheel=function(t){t=t>0?0:t<this.scroll.maxScrollY?this.scroll.maxScrollY:t;for(var e=Math.abs(Math.round(-t/this.itemHeight)),o=e,s=this.items,i=this.options.wheelDisabledItemClass;e>=0&&j(s[e],i);)e--;if(e<0)for(e=o;e<=s.length-1&&j(s[e],i);)e++;return e===s.length&&(e=o),{index:this.wheelItemsAllDisabled?-1:e,y:-e*this.itemHeight}},t.prototype.checkWheelAllDisabled=function(){var t=this.options.wheelDisabledItemClass,e=this.items;this.wheelItemsAllDisabled=!0;for(var o=0;o<e.length;o++)if(!j(e[o],t)){this.wheelItemsAllDisabled=!1;break}},t.pluginName="wheel",t}(),At=[{key:"zoomTo",name:"zoomTo"}].map((function(t){return{key:t.key,sourceKey:"plugins.zoom."+t.name}})),Nt=function(){function t(t){this.scroll=t,this.scale=1,this.prevScale=1,this.init()}return t.prototype.init=function(){this.handleBScroll(),this.handleOptions(),this.handleHooks(),this.tryInitialZoomTo(this.zoomOpt)},t.prototype.zoomTo=function(t,e,o,s){var i=this.resolveOrigin(e,o),r={x:i.originX,y:i.originY,baseScale:this.scale};this._doZoomTo(t,r,s,!0)},t.prototype.handleBScroll=function(){this.scroll.proxy(At),this.scroll.registerType(["beforeZoomStart","zoomStart","zooming","zoomEnd"])},t.prototype.handleOptions=function(){var t=!0===this.scroll.options.zoom?{}:this.scroll.options.zoom;this.zoomOpt=S({start:1,min:1,max:4,initialOrigin:[0,0],minimalZoomDistance:5,bounceTime:800},t)},t.prototype.handleHooks=function(){var t=this,e=this.scroll,o=this.scroll.scroller;this.wrapper=this.scroll.scroller.wrapper,this.setTransformOrigin(this.scroll.scroller.content);var s=o.scrollBehaviorX,i=o.scrollBehaviorY;this.hooksFn=[],this.registerHooks(e.hooks,e.hooks.eventTypes.contentChanged,(function(e){t.setTransformOrigin(e),t.scale=1,t.tryInitialZoomTo(t.zoomOpt)})),this.registerHooks(e.hooks,e.hooks.eventTypes.beforeInitialScrollTo,(function(){if(1!==t.zoomOpt.start)return!0})),this.registerHooks(s.hooks,s.hooks.eventTypes.beforeComputeBoundary,(function(){var e=N(t.scroll.scroller.content);s.contentSize=Math.floor(e.width*t.scale)})),this.registerHooks(i.hooks,i.hooks.eventTypes.beforeComputeBoundary,(function(){var e=N(t.scroll.scroller.content);i.contentSize=Math.floor(e.height*t.scale)})),this.registerHooks(o.actions.hooks,o.actions.hooks.eventTypes.start,(function(e){var o=e.touches&&e.touches.length||0;t.fingersOperation(o),2===o&&t.zoomStart(e)})),this.registerHooks(o.actions.hooks,o.actions.hooks.eventTypes.beforeMove,(function(e){var o=e.touches&&e.touches.length||0;if(t.fingersOperation(o),2===o)return t.zoom(e),!0})),this.registerHooks(o.actions.hooks,o.actions.hooks.eventTypes.beforeEnd,(function(e){if(2===t.fingersOperation())return t.zoomEnd(),!0})),this.registerHooks(o.translater.hooks,o.translater.hooks.eventTypes.beforeTranslate,(function(e,o){var s=o.scale?o.scale:t.prevScale;t.prevScale=s,e.push("scale("+s+")")})),this.registerHooks(o.hooks,o.hooks.eventTypes.scrollEnd,(function(){2===t.fingersOperation()&&t.scroll.trigger(t.scroll.eventTypes.zoomEnd,{scale:t.scale})})),this.registerHooks(this.scroll.hooks,"destroy",this.destroy)},t.prototype.setTransformOrigin=function(t){t.style[F.transformOrigin]="0 0"},t.prototype.tryInitialZoomTo=function(t){var e=t.start,o=t.initialOrigin,s=this.scroll.scroller,i=s.scrollBehaviorX,r=s.scrollBehaviorY;1!==e&&(this.resetBoundaries([i,r]),this.zoomTo(e,o[0],o[1],0))},t.prototype.fingersOperation=function(t){if("number"!=typeof t)return this.numberOfFingers;this.numberOfFingers=t},t.prototype._doZoomTo=function(t,e,o,s){var i=this;void 0===o&&(o=this.zoomOpt.bounceTime),void 0===s&&(s=!1);var r=this.zoomOpt,n=r.min,l=r.max,h=this.scale,a=P(t,n,l);!function(){if(0!==o){if(o>0){var t,e=T(),s=e+o,r=function(){var n=T();if(n>=s)return i.scroll.trigger(i.scroll.eventTypes.zooming,{scale:a}),void Z(t);var l=K.bounce.fn((n-e)/o)*(a-h)+h;i.scroll.trigger(i.scroll.eventTypes.zooming,{scale:l}),t=$(r)};r()}}else i.scroll.trigger(i.scroll.eventTypes.zooming,{scale:a})}(),this.fingersOperation(2),this._zoomTo(a,h,e,o,s)},t.prototype._zoomTo=function(t,e,o,s,i){void 0===i&&(i=!1);var r=t/o.baseScale;this.setScale(t);var n=this.scroll.scroller,l=n.scrollBehaviorX,h=n.scrollBehaviorY;this.resetBoundaries([l,h]);var a=this.getNewPos(o.x,r,l,!0,i),c=this.getNewPos(o.y,r,h,!0,i);l.currentPos===Math.round(a)&&h.currentPos===Math.round(c)&&t===e||n.scrollTo(a,c,s,K.bounce,{start:{scale:e},end:{scale:t}})},t.prototype.resolveOrigin=function(t,e){var o=this.scroll.scroller,s=o.scrollBehaviorX,i=o.scrollBehaviorY,r={left:function(){return 0},top:function(){return 0},right:function(){return s.contentSize},bottom:function(){return i.contentSize},center:function(t){return(0===t?s.contentSize:i.contentSize)/2}};return{originX:"number"==typeof t?t:r[t](0),originY:"number"==typeof e?e:r[e](1)}},t.prototype.zoomStart=function(t){var e=t.touches[0],o=t.touches[1];this.startDistance=this.getFingerDistance(t),this.startScale=this.scale;var s,i,r=(s=this.wrapper,{left:-((i=s.getBoundingClientRect()).left+window.pageXOffset),top:-(i.top+window.pageYOffset)}),n=r.left,l=r.top;this.origin={x:Math.abs(e.pageX+o.pageX)/2+n-this.scroll.x,y:Math.abs(e.pageY+o.pageY)/2+l-this.scroll.y,baseScale:this.startScale},this.scroll.trigger(this.scroll.eventTypes.beforeZoomStart)},t.prototype.zoom=function(t){var e=this.getFingerDistance(t);if(this.zoomed||!(Math.abs(e-this.startDistance)<this.zoomOpt.minimalZoomDistance)){var o=this.dampingScale(e/this.startDistance*this.startScale),s=o/this.startScale;this.setScale(o),this.zoomed||(this.zoomed=!0,this.scroll.trigger(this.scroll.eventTypes.zoomStart));var i=this.scroll.scroller,r=i.scrollBehaviorX,n=i.scrollBehaviorY,l=this.getNewPos(this.origin.x,s,r,!1,!1),h=this.getNewPos(this.origin.y,s,n,!1,!1);this.scroll.trigger(this.scroll.eventTypes.zooming,{scale:this.scale}),i.translater.translate({x:l,y:h,scale:o})}},t.prototype.zoomEnd=function(){this.zoomed&&(this.shouldRebound()?this._doZoomTo(this.scale,this.origin,this.zoomOpt.bounceTime):this.scroll.trigger(this.scroll.eventTypes.zoomEnd,{scale:this.scale}))},t.prototype.getFingerDistance=function(t){var e,o,s=t.touches[0],i=t.touches[1],r=Math.abs(s.pageX-i.pageX),n=Math.abs(s.pageY-i.pageY);return e=r,o=n,Math.sqrt(e*e+o*o)},t.prototype.shouldRebound=function(){var t=this.zoomOpt,e=t.min,o=t.max,s=this.scale;if(s!==P(s,e,o))return!0;var i=this.scroll.scroller,r=i.scrollBehaviorX,n=i.scrollBehaviorY;this.resetBoundaries([r,n]);var l=r.checkInBoundary().inBoundary,h=r.checkInBoundary().inBoundary;return!(l&&h)},t.prototype.dampingScale=function(t){var e=this.zoomOpt,o=e.min,s=e.max;return t<o?t=.5*o*Math.pow(2,t/o):t>s&&(t=2*s*Math.pow(.5,s/t)),t},t.prototype.setScale=function(t){this.scale=t},t.prototype.resetBoundaries=function(t){t.forEach((function(t){return t.computeBoundary()}))},t.prototype.getNewPos=function(t,e,o,s,i){void 0===i&&(i=!1);var r=t-t*e+(i?o.currentPos:o.startPos);return s&&(r=P(r,o.maxScrollPos,o.minScrollPos)),r>0?Math.floor(r):Math.ceil(r)},t.prototype.registerHooks=function(t,e,o){t.on(e,o,this),this.hooksFn.push([t,e,o])},t.prototype.destroy=function(){this.hooksFn.forEach((function(t){var e=t[0],o=t[1],s=t[2];e.off(o,s)})),this.hooksFn.length=0},t.pluginName="zoom",t}(),Rt=function(){function t(t){this.ancestors=[],this.descendants=[],this.hooksManager=[],this.analyzed=!1,this.selfScroll=t}return t.create=function(e){return new t(e)},t.prototype.hasAncestors=function(t){return w(this.ancestors,(function(e){return e[0]===t}))>-1},t.prototype.hasDescendants=function(t){return w(this.descendants,(function(e){return e[0]===t}))>-1},t.prototype.addAncestor=function(t,e){var o=this.ancestors;o.push([t,e]),o.sort((function(t,e){return t[1]-e[1]}))},t.prototype.addDescendant=function(t,e){var o=this.descendants;o.push([t,e]),o.sort((function(t,e){return t[1]-e[1]}))},t.prototype.removeAncestor=function(t){var e=this.ancestors;if(e.length){var o=w(this.ancestors,(function(e){return e[0]===t}));if(o>-1)return e.splice(o,1)}},t.prototype.removeDescendant=function(t){var e=this.descendants;if(e.length){var o=w(this.descendants,(function(e){return e[0]===t}));if(o>-1)return e.splice(o,1)}},t.prototype.registerHooks=function(t,e,o){t.on(e,o),this.hooksManager.push([t,e,o])},t.prototype.setAnalyzed=function(t){void 0===t&&(t=!1),this.analyzed=t},t.prototype.purge=function(){var t=this;this.ancestors.forEach((function(e){e[0].removeDescendant(t)})),this.descendants.forEach((function(e){e[0].removeAncestor(t)})),this.hooksManager.forEach((function(t){var e=t[0],o=t[1],s=t[2];e.off(o,s)})),this.hooksManager=[]},t}(),Wt=[{key:"purgeNestedScroll",name:"purgeNestedScroll"}].map((function(t){return{key:t.key,sourceKey:"plugins.nestedScroll."+t.name}})),_t=function(t){t.forEach((function(t){t.enable()}))},jt=function(t,e){t.forEach((function(t){t.hasHorizontalScroll!==e.hasHorizontalScroll&&t.hasVerticalScroll!==e.hasVerticalScroll||t.disable()}))},Kt=function(t,e){for(var o=0,s=t.parentNode;s&&s!==e;)o++,s=s.parentNode;return o},Ut=function(){function t(e){var o=this.handleOptions(e),s=t.instancesMap[o];return s||((s=t.instancesMap[o]=this).store=[],s.hooksFn=[]),s.init(e),s}return t.getAllNestedScrolls=function(){var e=t.instancesMap;return Object.keys(e).map((function(t){return e[t]}))},t.purgeAllNestedScrolls=function(){t.getAllNestedScrolls().forEach((function(t){return t.purgeNestedScroll()}))},t.prototype.handleOptions=function(t){var e=!0===t.options.nestedScroll?{}:t.options.nestedScroll,o={groupId:"INTERNAL_NESTED_SCROLL"};this.options=S(o,e);var s=typeof this.options.groupId;return"string"!==s&&"number"!==s&&p("groupId must be string or number for NestedScroll plugin"),this.options.groupId},t.prototype.init=function(t){t.proxy(Wt),this.addBScroll(t),this.buildBScrollGraph(),this.analyzeBScrollGraph(),this.ensureEventInvokeSequence(),this.handleHooks(t)},t.prototype.handleHooks=function(t){var e=this;this.registerHooks(t.hooks,t.hooks.eventTypes.destroy,(function(){e.deleteScroll(t)}))},t.prototype.deleteScroll=function(t){t.wrapper.isBScrollContainer=void 0;var e=this.store,o=this.hooksFn,s=w(e,(function(e){return e.selfScroll===t}));s>-1&&(e[s].purge(),e.splice(s,1));var i=w(o,(function(e){return e[0]===t.hooks}));if(i>-1){var r=o[i],n=r[0],l=r[1],h=r[2];n.off(l,h),o.splice(i,1)}},t.prototype.addBScroll=function(t){this.store.push(Rt.create(t))},t.prototype.buildBScrollGraph=function(){for(var t,e,o,s,i=this.store,r=this.store.length,n=0;n<r;n++){o=(t=i[n]).selfScroll.wrapper;for(var l=0;l<r;l++)if(s=(e=i[l]).selfScroll.wrapper,t!==e&&o.contains(s)){var h=Kt(s,o);t.hasDescendants(e)||t.addDescendant(e,h),e.hasAncestors(t)||e.addAncestor(t,h)}}},t.prototype.analyzeBScrollGraph=function(){this.store.forEach((function(t){if(!t.analyzed){var e=t.ancestors,o=t.descendants,s=t.selfScroll;t.registerHooks(s,s.eventTypes.beforeScrollStart,(function(){var t,i,r,n,l,h,c,p,u,d,f=e.map((function(t){return t[0].selfScroll})),g=o.map((function(t){return t[0].selfScroll}));a(f,g).forEach((function(t){t.pending&&(t.stop(),t.resetPosition())})),i=(t=s).hasHorizontalScroll,r=t.hasVerticalScroll,n=t.x,l=t.y,h=t.minScrollX,c=t.maxScrollX,p=t.minScrollY,u=t.maxScrollY,d=!1,r?d=l>p||l<u:i&&(d=n>h||n<c),d&&function(t){t.scroller.reflow(),t.resetPosition(0)}(s),function(t){t.forEach((function(t){var e=t.scroller,o=e.actions,s=e.scrollBehaviorX,i=e.scrollBehaviorY;o.fingerMoved=!0,o.contentMoved=!1,o.directionLockAction.reset(),s.start(),i.start(),s.resetStartPos(),i.resetStartPos(),o.startTime=+new Date}))}(f),jt(f,s)})),t.registerHooks(s,s.eventTypes.touchEnd,(function(){var t=e.map((function(t){return t[0].selfScroll})),s=o.map((function(t){return t[0].selfScroll}));_t(a(t,s))}));var i=s.scroller.actions.hooks;t.registerHooks(i,i.eventTypes.detectMovingDirection,(function(){var t,o,i,r,n,l,h,a,c,p,u,d,f=e.map((function(t){return t[0].selfScroll})),g=f[0],y=f.slice(1),v=s.scroller.actions.contentMoved,m=0===f.length;if(v)jt(f,s);else if(!m&&(o=(t=s).hasHorizontalScroll,i=t.hasVerticalScroll,r=t.x,n=t.y,l=t.minScrollX,h=t.maxScrollX,a=t.minScrollY,c=t.maxScrollY,p=t.movingDirectionX,u=t.movingDirectionY,d=!1,i?d=n>=a&&-1===u||n<=c&&1===u:o&&(d=r>=l&&-1===p||r<=h&&1===p),d))return jt([s],s),g&&_t([g]),jt(y,s),!0})),t.setAnalyzed(!0)}}))},t.prototype.ensureEventInvokeSequence=function(){this.store.slice().sort((function(t,e){return t.descendants.length-e.descendants.length})).forEach((function(t){t.selfScroll.scroller.actionsHandler.rebindDOMEvents()}))},t.prototype.registerHooks=function(t,e,o){t.on(e,o,this),this.hooksFn.push([t,e,o])},t.prototype.purgeNestedScroll=function(){var e=this.options.groupId;this.store.forEach((function(t){t.purge()})),this.store=[],this.hooksFn.forEach((function(t){var e=t[0],o=t[1],s=t[2];e.off(o,s)})),this.hooksFn=[],delete t.instancesMap[e]},t.pluginName="nestedScroll",t.instancesMap={},t}(),Vt=function(){function t(t,e){this.wrapperHeight=t,this.tombstoneHeight=e,this.lastDirection=1,this.lastPos=0}return t.prototype.calculate=function(t,e){var o=t-this.lastPos;this.lastPos=t;var s=this.getDirection(o),i=this.calculateIndex(0,t,e),r=this.calculateIndex(i,t+this.wrapperHeight,e);return 1===s?(i-=10,r+=30):(i-=30,r+=10),i<0&&(i=0),{start:i,end:r}},t.prototype.getDirection=function(t){var e;if(t>0)e=1;else{if(!(t<0))return this.lastDirection;e=0}return this.lastDirection=e,e},t.prototype.calculateIndex=function(t,e,o){if(e<=0)return t;for(var s=t,i=o[s]&&-1!==o[s].pos?o[s].pos:0,r=0;s<o.length&&o[s].pos<e;)i=o[s].pos,s++;return s===o.length&&(r=Math.floor((e-i)/this.tombstoneHeight)),s+=r},t.prototype.resetState=function(){this.lastDirection=1,this.lastPos=0},t}(),$t=function(){this.data=null,this.dom=null,this.tombstone=null,this.width=0,this.height=0,this.pos=0},Zt=function(){function t(t,e,o){this.fetchFn=e,this.onFetchFinish=o,this.loadedNum=0,this.fetching=!1,this.hasMore=!0,this.list=t||[]}return t.prototype.update=function(t){return l(this,void 0,void 0,(function(){var e;return h(this,(function(o){return this.hasMore||(t=Math.min(t,this.list.length)),t>this.list.length&&(e=t-this.list.length,this.addEmptyData(e)),[2,this.checkToFetch(t)]}))}))},t.prototype.add=function(t){for(var e=0;e<t.length;e++)this.list[this.loadedNum]?this.list[this.loadedNum]=n(n({},this.list[this.loadedNum]),{data:t[e]}):this.list[this.loadedNum]={data:t[e]},this.loadedNum++;return this.list},t.prototype.addEmptyData=function(t){for(var e=0;e<t;e++)this.list.push(new $t);return this.list},t.prototype.fetch=function(t){return l(this,void 0,void 0,(function(){var e;return h(this,(function(o){switch(o.label){case 0:return this.fetching?[2,[]]:(this.fetching=!0,[4,this.fetchFn(t)]);case 1:return e=o.sent(),this.fetching=!1,[2,e]}}))}))},t.prototype.checkToFetch=function(t){return l(this,void 0,void 0,(function(){var e,o,s;return h(this,(function(i){switch(i.label){case 0:return this.hasMore?t<=this.loadedNum?[2]:(e=t-this.loadedNum,[4,this.fetch(e)]):[2];case 1:return(o=i.sent())instanceof Array&&o.length?(this.add(o),s=this.onFetchFinish(this.list,!0),[2,this.checkToFetch(s)]):("boolean"==typeof o&&!1===o&&(this.hasMore=!1,this.list.splice(this.loadedNum),this.onFetchFinish(this.list,!1)),[2])}}))}))},t.prototype.getList=function(){return this.list},t.prototype.resetState=function(){this.loadedNum=0,this.fetching=!1,this.hasMore=!0,this.list=[]},t}(),qt=function(){function t(t){this.create=t,this.cached=[],this.width=0,this.height=0,this.initialed=!1,this.getSize()}return t.isTombstone=function(t){return!(!t||!t.classList)&&t.classList.contains("tombstone")},t.prototype.getSize=function(){if(!this.initialed){var t=this.create();t.style.position="absolute",document.body.appendChild(t),t.style.display="",this.height=t.offsetHeight,this.width=t.offsetWidth,document.body.removeChild(t),this.cached.push(t)}},t.prototype.getOne=function(){var t=this.cached.pop();if(t){var e=t.style;return e.display="",e.opacity="1",e[F.transform]="",e[F.transition]="",t}return this.create()},t.prototype.recycle=function(t){for(var e=0,o=t;e<o.length;e++){var s=o[e];s.style.display="none",this.cached.push(s)}return this.cached},t.prototype.recycleOne=function(t){return this.cached.push(t),this.cached},t}(),Gt=function(){function t(t,e,o){this.renderFn=e,this.tombstone=o,this.unusedDom=[],this.timers=[],this.setContent(t)}return t.prototype.update=function(t,e,o){e>=t.length&&(e=t.length-1),o>t.length&&(o=t.length),this.collectUnusedDom(t,e,o),this.createDom(t,e,o),this.cacheHeight(t,e,o);var s=this.positionDom(t,e,o);return{start:e,startPos:s.startPos,startDelta:s.startDelta,end:o,endPos:s.endPos}},t.prototype.collectUnusedDom=function(t,e,o){for(var s=0;s<t.length;s++)if(s!==e){if(t[s].dom){var i=t[s].dom;qt.isTombstone(i)?(this.tombstone.recycleOne(i),i.style.display="none"):this.unusedDom.push(i),t[s].dom=null}}else s=o-1;return t},t.prototype.createDom=function(t,e,o){for(var s=e;s<o;s++){var i=t[s].dom,r=t[s].data;if(i){if(!qt.isTombstone(i)||!r)continue;t[s].tombstone=i,t[s].dom=null}(i=r?this.renderFn(r,this.unusedDom.pop()):this.tombstone.getOne()).style.position="absolute",t[s].dom=i,t[s].pos=-1,this.content.appendChild(i)}},t.prototype.cacheHeight=function(t,e,o){for(var s=e;s<o;s++)t[s].data&&!t[s].height&&(t[s].height=t[s].dom.offsetHeight)},t.prototype.positionDom=function(t,e,o){for(var s=this,i=[],r=this.getStartPos(t,e,o),n=r.start,l=r.delta,h=n,a=e;a<o;a++){var c=t[a].tombstone;if(c){var p=c.style;p[F.transition]=D+"transform 200ms, opacity 200ms",p[F.transform]="translateY("+h+"px)",p.opacity="0",t[a].tombstone=null,i.push(c)}t[a].dom&&t[a].pos!==h&&(t[a].dom.style[F.transform]="translateY("+h+"px)",t[a].pos=h),h+=t[a].height||this.tombstone.height}var u=window.setTimeout((function(){s.tombstone.recycle(i)}),200);return this.timers.push(u),{startPos:n,startDelta:l,endPos:h}},t.prototype.getStartPos=function(t,e,o){if(t[e]&&-1!==t[e].pos)return{start:t[e].pos,delta:0};for(var s=-1===t[0].pos?0:t[0].pos,i=0;i<e;i++)s+=t[i].height||this.tombstone.height;var r,n=s;for(r=e;r<o;r++)if(!qt.isTombstone(t[r].dom)&&-1!==t[r].pos){s=t[r].pos;break}var l=r;if(l<o)for(;l>e;)s-=t[l-1].height,l--;return{start:s,delta:n-s}},t.prototype.removeTombstone=function(){for(var t=this.content.querySelectorAll(".tombstone"),e=t.length-1;e>=0;e--)this.content.removeChild(t[e])},t.prototype.setContent=function(t){t!==this.content&&(this.content=t)},t.prototype.destroy=function(){this.removeTombstone(),this.timers.forEach((function(t){clearTimeout(t)}))},t.prototype.resetState=function(){this.destroy(),this.timers=[],this.unusedDom=[]},t}(),Jt=function(){function t(t){this.scroll=t,this.start=0,this.end=0,this.init()}return t.prototype.init=function(){var t=this;this.handleOptions();var e=this.options,o=e.fetch,s=e.render,i=e.createTombstone;this.tombstone=new qt(i),this.indexCalculator=new Vt(this.scroll.scroller.scrollBehaviorY.wrapperSize,this.tombstone.height),this.domManager=new Gt(this.scroll.scroller.content,s,this.tombstone),this.dataManager=new Zt([],o,this.onFetchFinish.bind(this)),this.scroll.on(this.scroll.eventTypes.destroy,this.destroy,this),this.scroll.on(this.scroll.eventTypes.scroll,this.update,this),this.scroll.on(this.scroll.eventTypes.contentChanged,(function(e){t.domManager.setContent(e),t.indexCalculator.resetState(),t.domManager.resetState(),t.dataManager.resetState(),t.update({y:0})}));var r=this.scroll.scroller.scrollBehaviorY;r.hooks.on(r.hooks.eventTypes.computeBoundary,this.modifyBoundary,this),this.update({y:0})},t.prototype.modifyBoundary=function(t){t.maxScrollPos=-2e3},t.prototype.handleOptions=function(){var t=this.scroll.options.infinity;t&&("function"!=typeof t.fetch&&p("Infinity plugin need fetch Function to new data."),"function"!=typeof t.render&&p("Infinity plugin need render Function to render each item."),"function"!=typeof t.render&&p("Infinity plugin need createTombstone Function to create tombstone."),this.options=t),this.scroll.options.probeType=3},t.prototype.update=function(t){var e=Math.round(-t.y),o=this.indexCalculator.calculate(e,this.dataManager.getList()),s=o.start,i=o.end;this.start=s,this.end=i,this.dataManager.update(i),this.updateDom(this.dataManager.getList())},t.prototype.onFetchFinish=function(t,e){var o=this.updateDom(t).end;return e||(this.domManager.removeTombstone(),this.scroll.scroller.animater.stop(),this.scroll.resetPosition()),o},t.prototype.updateDom=function(t){var e=this.domManager.update(t,this.start,this.end),o=e.end,s=e.startPos,i=e.endPos,r=e.startDelta;return r&&(this.scroll.minScrollY=r),i>this.scroll.maxScrollY&&(this.scroll.maxScrollY=-(i-this.scroll.scroller.scrollBehaviorY.wrapperSize)),{end:o,startPos:s,endPos:i}},t.prototype.destroy=function(){for(var t=this.scroll.scroller,e=t.content,o=t.scrollBehaviorY;e.firstChild;)e.removeChild(e.firstChild);this.domManager.destroy(),this.scroll.off("scroll",this.update),this.scroll.off("destroy",this.destroy),o.hooks.off(o.hooks.eventTypes.computeBoundary)},t.pluginName="infinity",t}(),Qt=[{key:"putAt",name:"putAt"}].map((function(t){return{key:t.key,sourceKey:"plugins.movable."+t.name}})),te=function(){function t(t){this.scroll=t,this.handleBScroll(),this.handleHooks()}return t.prototype.handleBScroll=function(){this.scroll.proxy(Qt)},t.prototype.handleHooks=function(){var t=this;this.hooksFn=[];var e=this.scroll.scroller,o=e.scrollBehaviorX,s=e.scrollBehaviorY,i=function(t,e){t.maxScrollPos>0&&(t.minScrollPos=e.wrapperSize-e.contentSize,t.maxScrollPos=0)};this.registerHooks(o.hooks,o.hooks.eventTypes.ignoreHasScroll,(function(){return!0})),this.registerHooks(o.hooks,o.hooks.eventTypes.computeBoundary,(function(t){i(t,o)})),this.registerHooks(s.hooks,s.hooks.eventTypes.ignoreHasScroll,(function(){return!0})),this.registerHooks(s.hooks,s.hooks.eventTypes.computeBoundary,(function(t){i(t,s)})),this.registerHooks(this.scroll.hooks,this.scroll.hooks.eventTypes.destroy,(function(){t.destroy()}))},t.prototype.putAt=function(t,e,o,s){void 0===o&&(o=this.scroll.options.bounceTime),void 0===s&&(s=K.bounce);var i=this.resolvePostion(t,e);this.scroll.scrollTo(i.x,i.y,o,s)},t.prototype.resolvePostion=function(t,e){var o=this.scroll.scroller,s=o.scrollBehaviorX,i=o.scrollBehaviorY,r={left:function(){return 0},top:function(){return 0},right:function(){return s.minScrollPos},bottom:function(){return i.minScrollPos},center:function(t){return(0===t?s.minScrollPos:i.minScrollPos)/2}};return{x:"number"==typeof t?t:r[t](0),y:"number"==typeof e?e:r[e](1)}},t.prototype.destroy=function(){this.hooksFn.forEach((function(t){var e=t[0],o=t[1],s=t[2];e.off(o,s)})),this.hooksFn.length=0},t.prototype.registerHooks=function(t,e,o){t.on(e,o,this),this.hooksFn.push([t,e,o])},t.pluginName="movable",t.applyOrder="pre",t}(),ee=function(){function t(t){this.scroll=t,this.refreshTimer=0,this.init()}return t.prototype.init=function(){this.handleOptions(this.scroll.options.observeImage),this.bindEventsToWrapper()},t.prototype.handleOptions=function(t){void 0===t&&(t={}),t=!0===t?{}:t;this.options=S({debounceTime:100},t)},t.prototype.bindEventsToWrapper=function(){var t=this.scroll.scroller.wrapper;this.imageLoadEventRegister=new Q(t,[{name:"load",handler:this.load.bind(this),capture:!0}]),this.imageErrorEventRegister=new Q(t,[{name:"error",handler:this.load.bind(this),capture:!0}])},t.prototype.load=function(t){var e=this,o=t.target,s=this.options.debounceTime;o&&"img"===o.tagName.toLowerCase()&&(0===s?this.scroll.refresh():(clearTimeout(this.refreshTimer),this.refreshTimer=window.setTimeout((function(){e.scroll.refresh()}),this.options.debounceTime)))},t.pluginName="observeImage",t}(),oe=function(t){t.preventDefault(),t.stopPropagation()},se=function(){function t(t,e){this.scroll=t,this.options=e,this.currentPos={x:0,y:0},this.hooksFn=[],this.handleDOM(),this.handleHooks(),this.handleInteractive()}return t.prototype.handleDOM=function(){var t=this.options,e=t.relationElement,o=t.relationElementHandleElementIndex,s=void 0===o?0:o;this.wrapper=e,this.indicatorEl=this.wrapper.children[s]},t.prototype.handleHooks=function(){var t=this,e=this.scroll,o=e.hooks,s=e.scroller.translater.hooks,i=e.scroller.animater.hooks;this.registerHooks(o,o.eventTypes.refresh,this.refresh),this.registerHooks(s,s.eventTypes.translate,(function(e){t.updatePosition(e)})),this.registerHooks(i,i.eventTypes.time,this.transitionTime),this.registerHooks(i,i.eventTypes.timeFunction,this.transitionTimingFunction)},t.prototype.transitionTime=function(t){void 0===t&&(t=0),this.indicatorEl.style[F.transitionDuration]=t+"ms"},t.prototype.transitionTimingFunction=function(t){this.indicatorEl.style[F.transitionTimingFunction]=t},t.prototype.handleInteractive=function(){!1!==this.options.interactive&&this.registerEvents()},t.prototype.registerHooks=function(t,e,o){t.on(e,o,this),this.hooksFn.push([t,e,o])},t.prototype.registerEvents=function(){var t=this.scroll.options,e=t.disableMouse,o=t.disableTouch,s=[],i=[],r=[];e||(s.push({name:"mousedown",handler:this.start.bind(this)}),i.push({name:"mousemove",handler:this.move.bind(this)}),r.push({name:"mouseup",handler:this.end.bind(this)})),o||(s.push({name:"touchstart",handler:this.start.bind(this)}),i.push({name:"touchmove",handler:this.move.bind(this)}),r.push({name:"touchend",handler:this.end.bind(this)},{name:"touchcancel",handler:this.end.bind(this)})),this.startEventRegister=new Q(this.indicatorEl,s),this.moveEventRegister=new Q(window,i),this.endEventRegister=new Q(window,r)},t.prototype.refresh=function(){var t,e,o,s=this.scroll,i=s.x,r=s.y,n=s.hasHorizontalScroll,l=s.hasVerticalScroll,h=s.maxScrollX,a=s.maxScrollY,c=(t=this.options.ratio,e={ratioX:0,ratioY:0},t?("number"==typeof t?e.ratioX=e.ratioY=t:"object"==typeof t&&t&&(e.ratioX=t.x||0,e.ratioY=t.y||0),e):e),p=c.ratioX,u=c.ratioY,d={width:(o=this.wrapper).clientWidth,height:o.clientHeight},f=d.width,g=d.height,y=N(this.indicatorEl),v=y.width,m=y.height;n&&(this.maxScrollX=f-v,this.translateXSign=this.maxScrollX>0?-1:1,this.minScrollX=0,this.ratioX=p||Math.abs(this.maxScrollX/h)),l&&(this.maxScrollY=g-m,this.translateYSign=this.maxScrollY>0?-1:1,this.minScrollY=0,this.ratioY=u||Math.abs(this.maxScrollY/a)),this.updatePosition({x:i,y:r})},t.prototype.start=function(t){if(!this.BScrollIsDisabled()){var e=t.touches?t.touches[0]:t;oe(t),this.initiated=!0,this.moved=!1,this.lastPointX=e.pageX,this.lastPointY=e.pageY,this.startTime=T(),this.scroll.scroller.hooks.trigger(this.scroll.scroller.hooks.eventTypes.beforeScrollStart)}},t.prototype.BScrollIsDisabled=function(){return!this.scroll.enabled},t.prototype.move=function(t){if(this.initiated){var e=t.touches?t.touches[0]:t,o=e.pageX,s=e.pageY;oe(t);var i=o-this.lastPointX,r=s-this.lastPointY;if(this.lastPointX=o,this.lastPointY=s,this.moved||this.indicatorNotMoved(i,r)||(this.moved=!0,this.scroll.scroller.hooks.trigger(this.scroll.scroller.hooks.eventTypes.scrollStart)),this.moved){var n=this.getBScrollPosByRatio(this.currentPos,i,r);this.syncBScroll(n)}}},t.prototype.end=function(t){if(this.initiated&&(this.initiated=!1,oe(t),this.moved)){var e=this.scroll,o=e.x,s=e.y;this.scroll.scroller.hooks.trigger(this.scroll.scroller.hooks.eventTypes.scrollEnd,{x:o,y:s})}},t.prototype.getBScrollPosByRatio=function(t,e,o){var s=t.x,i=t.y,r=this.scroll,n=r.hasHorizontalScroll,l=r.hasVerticalScroll,h=r.minScrollX,a=r.maxScrollX,c=r.minScrollY,p=r.maxScrollY,u=this.scroll,d=u.x,f=u.y;if(n){var g=P(s+e,Math.min(this.minScrollX,this.maxScrollX),Math.max(this.minScrollX,this.maxScrollX));d=P(Math.round(g/this.ratioX*this.translateXSign),a,h)}if(l){var y=P(i+o,Math.min(this.minScrollY,this.maxScrollY),Math.max(this.minScrollY,this.maxScrollY));f=P(Math.round(y/this.ratioY*this.translateYSign),p,c)}return{x:d,y:f}},t.prototype.indicatorNotMoved=function(t,e){var o=this.currentPos,s=o.x,i=o.y,r=s===this.minScrollX&&t<=0||s===this.maxScrollX&&t>=0,n=i===this.minScrollY&&e<=0||i===this.maxScrollY&&e>=0;return r&&n},t.prototype.syncBScroll=function(t){var e=T(),o=this.scroll,s=o.options,i=o.scroller,r=s.probeType,n=s.momentumLimitTime;i.translater.translate(t),e-this.startTime>n&&(this.startTime=e,1===r&&i.hooks.trigger(i.hooks.eventTypes.scroll,t)),r>1&&i.hooks.trigger(i.hooks.eventTypes.scroll,t)},t.prototype.updatePosition=function(t){var e=this.getIndicatorPosByRatio(t);this.applyTransformProperty(e),this.currentPos=n({},e)},t.prototype.applyTransformProperty=function(t){var e=this.scroll.options.translateZ,o=["translateX("+t.x+"px)","translateY("+t.y+"px)",""+e];this.indicatorEl.style[F.transform]=o.join(" ")},t.prototype.getIndicatorPosByRatio=function(t){var e=t.x,o=t.y,s=this.scroll,i=s.hasHorizontalScroll,r=s.hasVerticalScroll,l=n({},this.currentPos);if(i){var h=Math.round(this.ratioX*e*this.translateXSign);l.x=P(h,Math.min(this.minScrollX,this.maxScrollX),Math.max(this.minScrollX,this.maxScrollX))}if(r){var a=Math.round(this.ratioY*o*this.translateYSign);l.y=P(a,Math.min(this.minScrollY,this.maxScrollY),Math.max(this.minScrollY,this.maxScrollY))}return l},t.prototype.destroy=function(){!1!==this.options.interactive&&(this.startEventRegister.destroy(),this.moveEventRegister.destroy(),this.endEventRegister.destroy()),this.hooksFn.forEach((function(t){var e=t[0],o=t[1],s=t[2];e.off(o,s)})),this.hooksFn.length=0},t}(),ie=function(){function t(t){this.scroll=t,this.options=[],this.indicators=[],this.handleOptions(),this.handleHooks()}return t.prototype.handleOptions=function(){var t=this.scroll.options.indicators;u(Array.isArray(t),"'indicators' must be an array.");for(var e=0,o=t;e<o.length;e++){var s=o[e];u(!!s.relationElement,"'relationElement' must be a HTMLElement."),this.createIndicators(s)}},t.prototype.createIndicators=function(t){this.indicators.push(new se(this.scroll,t))},t.prototype.handleHooks=function(){var t=this,e=this.scroll.hooks;e.on(e.eventTypes.destroy,(function(){for(var e=0,o=t.indicators;e<o.length;e++){o[e].destroy()}t.indicators=[]}))},t.pluginName="indicators",t}();St.use(bt).use(Pt).use(xt).use(Yt).use(Xt).use(It).use(Ft).use(Nt).use(Ut).use(Jt).use(te).use(ee).use(ie);var re=St,ne={name:o(3).a.Create("scroll-view").name,props:{probeType:{type:Number,default:1},click:{type:Boolean,default:!0},scrollbar:{type:Boolean,default:!1},scrollX:{type:Boolean,default:!1},listenScroll:{type:Boolean,default:!1},data:{type:Array,default:null},pullup:{type:Boolean,default:!1},pulldown:{type:Boolean,default:!1},beforeScroll:{type:Boolean,default:!1},refreshDelay:{type:Number,default:20}},mounted:function(){var t=this;setTimeout((function(){t._initScroll()}),20)},methods:{_initScroll:function(){var t=this;this.scroll=new re(this.$refs.wrapper,{probeType:this.probeType,click:this.click,scrollbar:this.scrollbar,scrollX:this.scrollX}),this.listenScroll&&this.scroll.on("scroll",(function(e){t.$emit("scroll",e)})),this.pullup&&this.scroll.on("scrollEnd",(function(){t.scroll.y<=t.scroll.maxScrollY+50&&(console.log("pullup"),t.$emit("scrollToEnd"))})),this.pulldown&&this.scroll.on("touchEnd",(function(e){e.y>50&&(console.log("pulldown"),t.$emit("pulldown"))})),this.beforeScroll&&this.scroll.on("beforeScrollStart",(function(){t.$emit("beforeScroll")}))},disable:function(){this.scroll&&this.scroll.disable()},enable:function(){this.scroll&&this.scroll.enable()},refresh:function(){this.scroll&&this.scroll.refresh()},scrollTo:function(){this.scroll&&this.scroll.scrollTo.apply(this.scroll,arguments)},scrollToElement:function(){this.scroll&&this.scroll.scrollToElement.apply(this.scroll,arguments)}},watch:{data:function(){var t=this;setTimeout((function(){t.refresh()}),this.refreshDelay)}},render:function(){var t=arguments[0];return t("div",{ref:"wrapper"},[this.$slots.default])}};o(64);s.a.WithInstall(ne);e.default=ne},12:function(t,e,o){var s=o(7);t.exports=function(t){if(Array.isArray(t))return s(t)},t.exports.default=t.exports,t.exports.__esModule=!0},13:function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},14:function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},2:function(t,e){function o(t,e){for(var o=0;o<e.length;o++){var s=e[o];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}t.exports=function(t,e,s){return e&&o(t.prototype,e),s&&o(t,s),t},t.exports.default=t.exports,t.exports.__esModule=!0},3:function(t,e,o){"use strict";o.d(e,"a",(function(){return a}));var s=o(0),i=o.n(s),r=o(2),n=o.n(r),l=o(1),h=o.n(l),a=function(){function t(e){i()(this,t),this._name=e}return n()(t,[{key:"name",get:function(){return"".concat(t.ROOT,"-").concat(this._name)}},{key:"derive",value:function(t,e){return t&&"string"!=typeof t&&(e=t,t=""),t=t?this.sub(t):this.name,"".concat(t).concat(this.mod(t,e))}},{key:"sub",value:function(t){var e=Array.isArray(t)?t:[t];return e.reduce((function(t,e){return"".concat(t,"-").concat(e)}),e.length?this.name:"")}},{key:"mod",value:function(t,e){var o=this;return e?"string"==typeof e?" ".concat(t,"--").concat(e):Array.isArray(e)?e.reduce((function(e,s){return e+o.mod(t,s)}),""):Object.keys(e).reduce((function(s,i){return s+(e[i]?o.mod(t,i):"")}),""):""}}],[{key:"Create",value:function(e){return new t(e)}}]),t}();h()(a,"ROOT","mx")},4:function(t,e,o){var s=o(12),i=o(13),r=o(10),n=o(14);t.exports=function(t){return s(t)||i(t)||r(t)||n()},t.exports.default=t.exports,t.exports.__esModule=!0},5:function(t,e,o){"use strict";o.d(e,"a",(function(){return g}));var s=o(4),i=o.n(s),r=o(6),n=o.n(r),l=o(0),h=o.n(l),a=o(2),c=o.n(a),p=o(8),u=o.n(p);function d(t,e){var o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!o){if(Array.isArray(t)||(o=function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var o=Object.prototype.toString.call(t).slice(8,-1);"Object"===o&&t.constructor&&(o=t.constructor.name);if("Map"===o||"Set"===o)return Array.from(t);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return f(t,e)}(t))||e&&t&&"number"==typeof t.length){o&&(t=o);var s=0,i=function(){};return{s:i,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,n=!0,l=!1;return{s:function(){o=o.call(t)},n:function(){var t=o.next();return n=t.done,t},e:function(t){l=!0,r=t},f:function(){try{n||null==o.return||o.return()}finally{if(l)throw r}}}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,s=new Array(e);o<e;o++)s[o]=t[o];return s}var g=function(){function t(){h()(this,t)}return c()(t,null,[{key:"WithInstall",value:function(t,e){if("object"!==n()(t)&&!t.name)throw new Error("could not install,because it is not a vue component!");t.install=function(o){o.component(t.name,t),e&&(o.prototype["$".concat(t.name.replace("mx-",""))]=e)}}},{key:"SortChildren",value:function(t,e){var o=e.$vnode.componentOptions;if(o&&o.children&&o.children.length){var s=this.FlattenVNode(o.children);return t.sort((function(t,e){return s.indexOf(t.$vnode)-s.indexOf(e.$vnode)})),t}}},{key:"FlattenVNode",value:function(t){return this.TraverseVNode(t)}},{key:"TraverseVNode",value:function(t){var e,o=[],s=d(t);try{for(s.s();!(e=s.n()).done;){var r=e.value;o.push(r),r.componentInstance&&o.push.apply(o,i()(this.TraverseVNode(r.componentInstance.$children.map((function(t){return t.$vnode}))))),r.children&&o.push.apply(o,i()(this.TraverseVNode(r.children)))}}catch(t){s.e(t)}finally{s.f()}return o}},{key:"InvokeComponent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=[],s=function(){var e=t((function(){s.$destroy(),document.body.removeChild(s.$el),o=o.filter((function(t){return t!==s}))})),s=new u.a(e),i=document.createElement("div");return document.body.appendChild(i),s.$mount(i),s},i=function(){return o.length&&!e||o.push(s()),o[o.length-1]};return function(t){i().open(t)}}}]),t}()},6:function(t,e){function o(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=o=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=o=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),o(e)}t.exports=o,t.exports.default=t.exports,t.exports.__esModule=!0},64:function(t,e,o){},7:function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,s=new Array(e);o<e;o++)s[o]=t[o];return s},t.exports.default=t.exports,t.exports.__esModule=!0},8:function(e,o){e.exports=t}})}));
//# sourceMappingURL=scrollview.js.map