1.8644db92.js 44 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[1],{435:function(t,e,o){"use strict";function n(t){console.error("[BScroll warn]: "+t)}function i(t,e){if(!t)throw new Error("[BScroll] "+e)}o.d(e,"S",(function(){return n})),o.d(e,"l",(function(){return i})),o.d(e,"x",(function(){return P})),o.d(e,"H",(function(){return O})),o.d(e,"I",(function(){return E})),o.d(e,"J",(function(){return B})),o.d(e,"p",(function(){return D})),o.d(e,"B",(function(){return M})),o.d(e,"C",(function(){return x})),o.d(e,"D",(function(){return Y})),o.d(e,"P",(function(){return X})),o.d(e,"s",(function(){return L})),o.d(e,"z",(function(){return A})),o.d(e,"L",(function(){return z})),o.d(e,"Q",(function(){return H})),o.d(e,"R",(function(){return F})),o.d(e,"o",(function(){return _})),o.d(e,"q",(function(){return R})),o.d(e,"K",(function(){return N})),o.d(e,"N",(function(){return K})),o.d(e,"A",(function(){return I})),o.d(e,"h",(function(){return W})),o.d(e,"v",(function(){return q})),o.d(e,"r",(function(){return V})),o.d(e,"E",(function(){return c})),o.d(e,"F",(function(){return a})),o.d(e,"y",(function(){return p})),o.d(e,"t",(function(){return f})),o.d(e,"G",(function(){return d})),o.d(e,"w",(function(){return v})),o.d(e,"m",(function(){return y})),o.d(e,"u",(function(){return m})),o.d(e,"O",(function(){return it})),o.d(e,"n",(function(){return rt})),o.d(e,"M",(function(){return ct})),o.d(e,"c",(function(){return J})),o.d(e,"b",(function(){return Z})),o.d(e,"a",(function(){return $})),o.d(e,"e",(function(){return Q})),o.d(e,"g",(function(){return tt})),o.d(e,"i",(function(){return et})),o.d(e,"j",(function(){return ot})),o.d(e,"k",(function(){return nt})),o.d(e,"d",(function(){return lt})),o.d(e,"f",(function(){return ut}));var r="undefined"!=typeof window,s=r&&navigator.userAgent.toLowerCase(),h=!(!s||!/wechatdevtools/.test(s)),c=s&&s.indexOf("android")>0,a=function(){if("string"==typeof s){var t=/os (\d\d?_\d(_\d)?)/.exec(s);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}(),l=!1;if(r){try{var u={};Object.defineProperty(u,"passive",{get:function(){l=!0}}),window.addEventListener("test-passive",(function(){}),u)}catch(t){}}function p(){return window.performance&&window.performance.now&&window.performance.timing?window.performance.now()+window.performance.timing.navigationStart:+new Date}var f=function(t,e){for(var o in e)t[o]=e[o];return t};function d(t){return null==t}function v(t,e){return Math.sqrt(t*t+e*e)}function y(t,e,o){return t<e?e:t>o?o:t}function m(t,e){if(t.findIndex)return t.findIndex(e);var o=-1;return t.some((function(t,n,i){var r=e(t,n,i);if(r)return o=n,r})),o}var g=function(){return(g=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},k=r&&document.createElement("div").style,b=function(){if(!r)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!==k[o.value])return o.key}return!1}();function T(t){return!1===b?t:"standard"===b?"transitionEnd"===t?"transitionend":t:b+t.charAt(0).toUpperCase()+t.substr(1)}function P(t){return"string"==typeof t?document.querySelector(t):t}function S(t,e,o,n){var i=l?{passive:!1,capture:!!n}:!!n;t.addEventListener(e,o,i)}function w(t,e,o,n){t.removeEventListener(e,o,{capture:!!n})}function O(t){t.cancelable&&t.preventDefault()}function E(t){for(var e=0,o=0;t;)e-=t.offsetLeft,o-=t.offsetTop,t=t.offsetParent;return{left:e,top:o}}function B(t){var e=t.getBoundingClientRect();return{left:-(e.left+window.pageXOffset),top:-(e.top+window.pageYOffset)}}var D=b&&"standard"!==b?"-"+b.toLowerCase()+"-":"",C=T("transform"),j=T("transition"),M=r&&T("perspective")in k,x=r&&("ontouchstart"in window||h),Y=r&&j in k,X={transform:C,transition:j,transitionTimingFunction:T("transitionTimingFunction"),transitionDuration:T("transitionDuration"),transitionDelay:T("transitionDelay"),transformOrigin:T("transformOrigin"),transitionEnd:T("transitionEnd"),transitionProperty:T("transitionProperty")},L={touchstart:1,touchmove:1,touchend:1,touchcancel:1,mousedown:2,mousemove:2,mouseup:2};function A(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 z(t,e){for(var o in e)if(e[o].test(t[o]))return!0;return!1}var H=z;function F(t,e){var o=document.createEvent("Event");o.initEvent(e,!0,!0),o.pageX=t.pageX,o.pageY=t.pageY,t.target.dispatchEvent(o)}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 n,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{n=new MouseEvent(e,f(g({bubbles:!0,cancelable:!0},r),i))}catch(t){s()}else s();function s(){(n=document.createEvent("Event")).initEvent(e,!0,!0),f(n,i)}n.forwardedTouchEvent=!0,n._constructed=!0,t.target.dispatchEvent(n)}function R(t){_(t,"dblclick")}function N(t,e){var o=e.firstChild;o?function(t,e){e.parentNode.insertBefore(t,e)}(t,o):e.appendChild(t)}function K(t,e){t.removeChild(e)}function I(t,e){return new RegExp("(^|\\s)"+e+"(\\s|$)").test(t.className)}function W(t){return Array.prototype.slice.call(t,0)}function q(t){return{width:t.clientWidth,height:t.clientHeight}}var V={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}}},G=r&&window;function U(){}var J,Z,$,Q,tt,et,ot,nt,it=r?G.requestAnimationFrame||G.webkitRequestAnimationFrame||G.mozRequestAnimationFrame||G.oRequestAnimationFrame||function(t){return window.setTimeout(t,t.interval||1e3/60)}:U,rt=r?G.cancelAnimationFrame||G.webkitCancelAnimationFrame||G.mozCancelAnimationFrame||G.oCancelAnimationFrame||function(t){window.clearTimeout(t)}:U,st=function(t){},ht={enumerable:!0,configurable:!0,get:st,set:st};function ct(t,e,o){ht.get=function(){return function(t,e){for(var o=e.split("."),n=0;n<o.length-1;n++)if("object"!=typeof(t=t[o[n]])||!t)return;var i=o.pop();return"function"==typeof t[i]?function(){return t[i].apply(t,arguments)}:t[i]}(this,e)},ht.set=function(t){!function(t,e,o){for(var n,i=e.split("."),r=0;r<i.length-1;r++)t[n=i[r]]||(t[n]={}),t=t[n];t[i.pop()]=o}(this,e,t)},Object.defineProperty(t,o,ht)}!function(t){t.Default="",t.Horizontal="horizontal",t.Vertical="vertical",t.None="none"}(J||(J={})),function(t){t[t.Positive=1]="Positive",t[t.Negative=-1]="Negative",t[t.Default=0]="Default"}(Z||(Z={})),function(t){t.Pre="pre",t.Post="post"}($||($={})),function(t){t.None="",t.Horizontal="horizontal",t.Vertical="vertical"}(Q||(Q={})),function(t){t[t.Touch=1]="Touch",t[t.Mouse=2]="Mouse"}(tt||(tt={})),function(t){t[t.Left=0]="Left",t[t.Middle=1]="Middle",t[t.Right=2]="Right"}(et||(et={})),function(t){t[t.Default=0]="Default",t[t.Throttle=1]="Throttle",t[t.Normal=2]="Normal",t[t.Realtime=3]="Realtime"}(ot||(ot={})),function(t){t[t.First=1]="First",t[t.Second=2]="Second",t[t.Third=3]="Third",t[t.Forth=4]="Forth"}(nt||(nt={}));var at=function(){for(var t=0,e=0,o=arguments.length;e<o;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<o;e++)for(var r=arguments[e],s=0,h=r.length;s<h;s++,i++)n[i]=r[s];return n},lt=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 n=this;void 0===o&&(o=this),this.hasType(t);var i=function(){for(var r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];n.off(t,i);var h=e.apply(o,r);if(!0===h)return h};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 n=o.length;n--;)(o[n][0]===e||o[n][0]&&o[n][0].fn===e)&&o.splice(n,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 n=this.events[t];if(n)for(var i,r=n.length,s=at(n),h=0;h<r;h++){var c=s[h],a=c[0],l=c[1];if(a&&!0===(i=a.apply(l,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||n('EventEmitter has used unknown event type: "'+t+'", should be oneof ['+Object.keys(e).map((function(t){return JSON.stringify(t)}))+"]")},t}(),ut=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(S)},t.prototype.removeDOMEvents=function(){this.handleDOMEvents(w)},t.prototype.handleDOMEvents=function(t){var e=this,o=this.wrapper;this.events.forEach((function(n){t(o,n.name,e,!!n.capture)}))},t.prototype.handleEvent=function(t){var e=t.type;this.events.some((function(o){return o.name===e&&(o.handler(t),!0)}))},t}()},436:function(t,e,o){"use strict";var n,i=[{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"}],r=o(435),s=(n=function(t,e){return(n=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)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),h=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=r.e.None,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=r.j.Default,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=r.C,e.disableTouch=!r.C,e.autoBlur=!0,e.autoEndDistance=5,e.outOfBoundaryDampingFactor=1/3,e.specifiedIndexAsContent=0,e.quadrant=r.k.First,e}return s(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&&r.B?" translateZ(1px)":"",this.useTransition=this.useTransition&&r.D,this.preventDefault=!this.eventPassthrough&&this.preventDefault,this.scrollX=this.eventPassthrough!==r.e.Horizontal&&this.scrollX,this.scrollY=this.eventPassthrough!==r.e.Vertical&&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?Object(r.t)(e,t):t?e:{top:!1,right:!1,bottom:!1,left:!1}},e}((function(){})),c=function(){function t(t,e){this.wrapper=t,this.options=e,this.hooks=new r.d(["beforeStart","start","move","end","click"]),this.handleDOMEvents()}return t.prototype.handleDOMEvents=function(){var t=this.options,e=t.bindToWrapper,o=t.disableMouse,n=t.disableTouch,i=t.click,s=this.wrapper,h=e?s:window,c=[],a=[],l=!n,u=!o;i&&c.push({name:"click",handler:this.click.bind(this),capture:!0}),l&&(c.push({name:"touchstart",handler:this.start.bind(this)}),a.push({name:"touchmove",handler:this.move.bind(this)},{name:"touchend",handler:this.end.bind(this)},{name:"touchcancel",handler:this.end.bind(this)})),u&&(c.push({name:"mousedown",handler:this.start.bind(this)}),a.push({name:"mousemove",handler:this.move.bind(this)},{name:"mouseup",handler:this.end.bind(this)})),this.wrapperEventRegister=new r.f(s,c),this.targetEventRegister=new r.f(h,a)},t.prototype.beforeHandler=function(t,e){var o=this.options,n=o.preventDefault,i=o.stopPropagation,s=o.preventDefaultException;({start:function(){return n&&!Object(r.L)(t.target,s)},end:function(){return n&&!Object(r.L)(t.target,s)},move:function(){return n}})[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=r.s[t.type];if(!this.initiated||this.initiated===e)if(this.setInitiated(e),Object(r.Q)(t.target,this.options.tagException))this.setInitiated();else if((e!==r.g.Mouse||t.button===r.i.Left)&&!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(r.s[t.type]===this.initiated){this.beforeHandler(t,"move");var e=t.touches?t.touches[0]:t,o=e.pageX-this.pointX,n=e.pageY-this.pointY;if(this.pointX=e.pageX,this.pointY=e.pageY,!this.hooks.trigger(this.hooks.eventTypes.move,{deltaX:o,deltaY:n,e:t})){var i=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,s=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,h=this.pointX-i,c=this.pointY-s,a=this.options.autoEndDistance;(h>document.documentElement.clientWidth-a||c>document.documentElement.clientHeight-a||h<a||c<a)&&this.end(t)}}},t.prototype.end=function(t){r.s[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}(),a={x:["translateX","px"],y:["translateY","px"]},l=function(){function t(t){this.setContent(t),this.hooks=new r.d(["beforeTranslate","translate"])}return t.prototype.getComputedPosition=function(){var t=window.getComputedStyle(this.content,null)[r.P.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(a[o]){var n=a[o][0];if(n){var i=a[o][1],r=t[o];e.push(n+"("+r+i+")")}}})),this.hooks.trigger(this.hooks.eventTypes.beforeTranslate,e,t),this.style[r.P.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}(),u=function(){function t(t,e,o){this.translater=e,this.options=o,this.timer=0,this.hooks=new r.d(["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&&(Object(r.n)(this.timer),this.timer=0)},t.prototype.destroy=function(){this.hooks.destroy(),Object(r.n)(this.timer)},t}(),p=function(){var t=function(e,o){return(t=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])})(e,o)};return function(e,o){function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.startProbe=function(t,e){var o=this,n=t,i=function(){var s=o.translater.getComputedPosition();(function(t,e,o,n){var i=function(t,e){var o=t-e;return o>0?r.b.Negative:o<0?r.b.Positive:r.b.Default},s=i(e.x,t.x),h=i(e.y,t.y),c=o.x-n.x,a=o.y-n.y;return s*c<=0&&h*a<=0})(t,e,s,n)&&o.hooks.trigger(o.hooks.eventTypes.move,s),o.pending||(o.callStopWhenPending?o.callStopWhenPending=!1:o.hooks.trigger(o.hooks.eventTypes.end,s)),n=s,o.pending&&(o.timer=Object(r.O)(i))};this.callStopWhenPending&&this.setCallStop(!1),Object(r.n)(this.timer),i()},e.prototype.transitionTime=function(t){void 0===t&&(t=0),this.style[r.P.transitionDuration]=t+"ms",this.hooks.trigger(this.hooks.eventTypes.time,t)},e.prototype.transitionTimingFunction=function(t){this.style[r.P.transitionTimingFunction]=t,this.hooks.trigger(this.hooks.eventTypes.timeFunction,t)},e.prototype.transitionProperty=function(){this.style[r.P.transitionProperty]=r.P.transform},e.prototype.move=function(t,e,o,n){this.setPending(o>0),this.transitionTimingFunction(n),this.transitionProperty(),this.transitionTime(o),this.translate(e);var i=this.options.probeType===r.j.Realtime;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),Object(r.n)(this.timer);var e=this.translater.getComputedPosition(),o=e.x,n=e.y;this.transitionTime(),this.translate({x:o,y:n}),this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,{x:o,y:n})}return t},e.prototype.stop=function(){this.doStop()&&this.hooks.trigger(this.hooks.eventTypes.callStop)},e}(u),d=function(){var t=function(e,o){return(t=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])})(e,o)};return function(e,o){function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),v=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.prototype.move=function(t,e,o,n){if(!o)return this.translate(e),this.options.probeType===r.j.Realtime&&this.hooks.trigger(this.hooks.eventTypes.move,e),void this.hooks.trigger(this.hooks.eventTypes.end,e);this.animate(t,e,o,n)},e.prototype.animate=function(t,e,o,n){var i=this,s=Object(r.y)(),h=s+o,c=this.options.probeType===r.j.Realtime,a=function(){var l=Object(r.y)();if(l>=h)return i.translate(e),c&&i.hooks.trigger(i.hooks.eventTypes.move,e),void i.hooks.trigger(i.hooks.eventTypes.end,e);var u=n(l=(l-s)/o),p={};Object.keys(e).forEach((function(o){var n=t[o],i=e[o];p[o]=(i-n)*u+n})),i.translate(p),c&&i.hooks.trigger(i.hooks.eventTypes.move,p),i.pending&&(i.timer=Object(r.O)(a)),i.pending||(i.callStopWhenPending?i.callStopWhenPending=!1:i.hooks.trigger(i.hooks.eventTypes.end,e))};this.setPending(!0),this.callStopWhenPending&&this.setCallStop(!1),Object(r.n)(this.timer),a()},e.prototype.doStop=function(){var t=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),t){this.setPending(!1),Object(r.n)(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}(u);var y,m,g,k,b,T=function(){function t(t,e,o){this.wrapper=t,this.options=o,this.hooks=new r.d(["beforeComputeBoundary","computeBoundary","momentum","end","ignoreHasScroll"]),this.refresh(e)}return t.prototype.start=function(){this.dist=0,this.setMovingDirection(r.b.Default),this.setDirection(r.b.Default)},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?r.b.Negative:t<0?r.b.Positive:r.b.Default},t.prototype.setDirection=function(t){this.direction=t>0?r.b.Negative:t<0?r.b.Positive:r.b.Default},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 n=this.direction===r.b.Negative&&this.options.bounces[0]||this.direction===r.b.Positive&&this.options.bounces[1]?this.wrapperSize:0;e=this.hasScroll?this.momentum(this.currentPos,this.startPos,t,this.maxScrollPos,this.minScrollPos,n,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,n,i,r,s){void 0===s&&(s=this.options);var h=t-e,c=Math.abs(h)/o,a=s.deceleration,l=s.swipeBounceTime,u=s.swipeTime,p={destination:t+c*c/a*(h<0?-1:1),duration:Math.min(u,2*c/a),rate:15};return this.hooks.trigger(this.hooks.eventTypes.momentum,p,h),p.destination<n?(p.destination=r?Math.max(n-r/4,n-r/p.rate*c):n,p.duration=l):p.destination>i&&(p.destination=r?Math.min(i+r/4,i+r/p.rate*c):i,p.duration=l),p.destination=Math.round(p.destination),p},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,n=e.position,i="static"===window.getComputedStyle(this.wrapper,null).position,s=Object(r.z)(this.wrapper);this.wrapperSize=this.wrapper["width"===o?"clientWidth":"clientHeight"],this.setContent(t);var h=Object(r.z)(this.content);this.contentSize=h[o],this.relativeOffset=h[n],i&&(this.relativeOffset-=s[n]),this.computeBoundary(),this.setDirection(r.b.Default)},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(r.b.Default),this.setMovingDirection(r.b.Default),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}();!function(t){t.Yes="yes",t.No="no"}(b||(b={}));var P=((y={})[b.Yes]=function(t){return!0},y[b.No]=function(t){return Object(r.H)(t),!1},y),S=((m={})[r.c.Horizontal]=((g={})[b.Yes]=r.e.Horizontal,g[b.No]=r.e.Vertical,g),m[r.c.Vertical]=((k={})[b.Yes]=r.e.Vertical,k[b.No]=r.e.Horizontal,k),m),w=function(){function t(t,e,o){this.directionLockThreshold=t,this.freeScroll=e,this.eventPassthrough=o,this.reset()}return t.prototype.reset=function(){this.directionLocked=r.c.Default},t.prototype.checkMovingDirection=function(t,e,o){return this.computeDirectionLock(t,e),this.handleEventPassthrough(o)},t.prototype.adjustDelta=function(t,e){return this.directionLocked===r.c.Horizontal?e=0:this.directionLocked===r.c.Vertical&&(t=0),{deltaX:t,deltaY:e}},t.prototype.computeDirectionLock=function(t,e){this.directionLocked!==r.c.Default||this.freeScroll||(t>e+this.directionLockThreshold?this.directionLocked=r.c.Horizontal:e>=t+this.directionLockThreshold?this.directionLocked=r.c.Vertical:this.directionLocked=r.c.None)},t.prototype.handleEventPassthrough=function(t){var e=S[this.directionLocked];if(e){if(this.eventPassthrough===e[b.Yes])return P[b.Yes](t);if(this.eventPassthrough===e[b.No])return P[b.No](t)}return!1},t}(),O=function(){function t(t,e,o,n,i){this.hooks=new r.d(["start","beforeMove","scrollStart","scroll","beforeEnd","end","scrollEnd","contentNotMoved","detectMovingDirection","coordinateTransformation"]),this.scrollBehaviorX=t,this.scrollBehaviorY=e,this.actionsHandler=o,this.animater=n,this.options=i,this.directionLockAction=new w(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,n=e.deltaY,i=e.e;if(!t.enabled)return!0;var s=function(t,e,o){return o===r.k.Second?[e,-t]:o===r.k.Third?[-t,-e]:o===r.k.Forth?[-e,t]:[t,e]}(o,n,t.options.quadrant),h={deltaX:s[0],deltaY:s[1]};return t.hooks.trigger(t.hooks.eventTypes.coordinateTransformation,h),t.handleMove(h.deltaX,h.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=Object(r.y)();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 n=this.scrollBehaviorX.getAbsDist(t),i=this.scrollBehaviorY.getAbsDist(e),s=Object(r.y)();if(this.checkMomentum(n,i,s))return!0;if(this.directionLockAction.checkMovingDirection(n,i,o))return this.actionsHandler.setInitiated(),!0;var h=this.directionLockAction.adjustDelta(t,e),c=this.scrollBehaviorX.getCurrentPos(),a=this.scrollBehaviorX.move(h.deltaX),l=this.scrollBehaviorY.getCurrentPos(),u=this.scrollBehaviorY.move(h.deltaY);if(!this.hooks.trigger(this.hooks.eventTypes.detectMovingDirection)){this.fingerMoved||(this.fingerMoved=!0);var p=a!==c||u!==l;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:a,y:u}),this.dispatchScroll(s))}}},t.prototype.dispatchScroll=function(t){t-this.startTime>this.options.momentumLimitTime&&(this.startTime=t,this.scrollBehaviorX.updateStartPos(),this.scrollBehaviorY.updateStartPos(),this.options.probeType===r.j.Throttle&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())),this.options.probeType>r.j.Throttle&&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=Object(r.y)();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,n=this.scrollBehaviorX,i=n.minScrollPos,s=n.maxScrollPos,h=this.scrollBehaviorY,c=h.minScrollPos,a=h.maxScrollPos;return e=e>0?Math.ceil(e):Math.floor(e),o=o>0?Math.ceil(o):Math.floor(o),{x:e=Object(r.m)(e,s,i),y:o=Object(r.m)(o,a,c)}},t.prototype.handleClick=function(t){Object(r.L)(t.target,this.options.preventDefaultException)||(Object(r.H)(t),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 E(t,e,o,n){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=n,i}var B=function(){for(var t=0,e=0,o=arguments.length;e<o;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<o;e++)for(var r=arguments[e],s=0,h=r.length;s<h;s++,i++)n[i]=r[s];return n};function D(t,e,o){o.forEach((function(o){var n,i;"string"==typeof o?n=i=o:(n=o.source,i=o.target),t.on(n,(function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return e.trigger.apply(e,B([i],t))}))}))}var C=function(){return(C=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},j=function(){function t(t,e,o){this.wrapper=t,this.content=e,this.resizeTimeout=0,this.hooks=new r.d(["beforeStart","beforeMove","beforeScrollStart","scrollStart","scroll","beforeEnd","scrollEnd","resize","touchEnd","end","flick","scrollCancel","momentum","scrollTo","minDistanceScroll","scrollToElement","beforeRefresh"]),this.options=o;var n,i=this.options.bounce,s=i.left,h=i.right,a=i.top,u=i.bottom;this.scrollBehaviorX=new T(t,e,E(o,"scrollX",[s,h],{size:"width",position:"left"})),this.scrollBehaviorY=new T(t,e,E(o,"scrollY",[a,u],{size:"height",position:"top"})),this.translater=new l(this.content),this.animater=function(t,e,o){var n=o.useTransition,i={};return Object.defineProperty(i,"probeType",{enumerable:!0,configurable:!1,get:function(){return o.probeType}}),n?new f(t,e,i):new v(t,e,i)}(this.content,this.translater,this.options),this.actionsHandler=new c(this.options.bindToTarget?this.content:t,(n=this.options,["click","bindToWrapper","disableMouse","disableTouch","preventDefault","stopPropagation","tagException","preventDefaultException","autoEndDistance"].reduce((function(t,e){return t[e]=n[e],t}),{}))),this.actions=new O(this.scrollBehaviorX,this.scrollBehaviorY,this.actionsHandler,this.animater,this.options);var p=this.resize.bind(this);this.resizeRegister=new r.f(window,[{name:"orientationchange",handler:p},{name:"resize",handler:p}]),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 r.f(this.content,[{name:r.P.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))})),D(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;D(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,n){return t.hooks.trigger(t.hooks.eventTypes.touchEnd,n),!!t.hooks.trigger(t.hooks.eventTypes.end,n)||(!(e.fingerMoved||(t.hooks.trigger(t.hooks.eventTypes.scrollCancel),!t.checkClick(o)))||(t.resetPosition(t.options.bounceTime,r.r.bounce)?(t.animater.setForceStopped(!1),!0):void 0))})),e.hooks.on(e.hooks.eventTypes.scrollEnd,(function(o,n){var i=Math.abs(o.x-t.scrollBehaviorX.startPos),r=Math.abs(o.y-t.scrollBehaviorY.startPos);if(t.checkFlick(n,i,r))return t.animater.setForceStopped(!1),void t.hooks.trigger(t.hooks.eventTypes.flick);t.momentum(o,n)?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:r.r.swiper,newX:t.x,newY:t.y},n=this.scrollBehaviorX.end(e),i=this.scrollBehaviorY.end(e);if(o.newX=Object(r.G)(n.destination)?o.newX:n.destination,o.newY=Object(r.G)(i.destination)?o.newY:i.destination,o.time=Math.max(n.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=r.r.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,n=!1;if(o&&this.lastClickTime){var i=o.delay,s=void 0===i?300:i;Object(r.y)()-this.lastClickTime<s&&(n=!0,Object(r.q)(t))}return this.options.tap&&Object(r.R)(t,this.options.tap),this.options.click&&!Object(r.L)(t.target,this.options.preventDefaultException)&&Object(r.o)(t),this.lastClickTime=n?null:Object(r.y)(),!0}return!1},t.prototype.resize=function(){var t=this;this.actions.enabled&&(r.E&&(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,r.r.bounce)||(this.animater.setPending(!1),this.options.probeType!==r.j.Realtime&&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",n=0;n<e.length;n++){var i=e[n];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=Object(r.I)(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,n){void 0===o&&(o=0);var i=this.getCurrentPos(),s=i.x,h=i.y;n=n||r.r.bounce,t+=s,e+=h,this.scrollTo(t,e,o,n)},t.prototype.scrollTo=function(t,e,o,n,i){void 0===o&&(o=0),void 0===n&&(n=r.r.bounce),void 0===i&&(i={start:{},end:{}});var s=this.options.useTransition?n.style:n.fn,h=this.getCurrentPos(),c=C({x:h.x,y:h.y},i.start),a=C({x:t,y:e},i.end);if(this.hooks.trigger(this.hooks.eventTypes.scrollTo,a),!function(t,e){for(var o=0,n=Object.keys(t);o<n.length;o++){var i=n[o];if(t[i]!==e[i])return!1}return!0}(c,a)){var l=Math.abs(a.x-c.x),u=Math.abs(a.y-c.y);l<1&&u<1&&(o=0,this.hooks.trigger(this.hooks.eventTypes.minDistanceScroll)),this.animater.move(c,a,o,s)}},t.prototype.scrollToElement=function(t,e,o,n,i){var s=Object(r.x)(t),h=Object(r.I)(s),c=function(t,e,o){return"number"==typeof t?t:t?Math.round(e/2-o/2):0};o=c(o,s.offsetWidth,this.wrapper.offsetWidth),n=c(n,s.offsetHeight,this.wrapper.offsetHeight);var a=function(t,e,o,n){return t-=e,t=n.adjustPosition(t-o)};h.left=a(h.left,this.wrapperOffset.left,o,this.scrollBehaviorX),h.top=a(h.top,this.wrapperOffset.top,n,this.scrollBehaviorY),this.hooks.trigger(this.hooks.eventTypes.scrollToElement,s,h)||this.scrollTo(h.left,h.top,e,i)},t.prototype.resetPosition=function(t,e){void 0===t&&(t=0),void 0===e&&(e=r.r.bounce);var o=this.scrollBehaviorX.checkInBoundary(),n=o.position,i=o.inBoundary,s=this.scrollBehaviorY.checkInBoundary(),h=s.position,c=s.inBoundary;return(!i||!c)&&(r.F&&this.reflow(),this.scrollTo(n,h,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(){Object(r.n)(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}(),M=function(){var t=function(e,o){return(t=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])})(e,o)};return function(e,o){function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),x=function(t){function e(e,o){var n=t.call(this,["refresh","contentChanged","enable","disable","beforeScrollStart","scrollStart","scroll","scrollEnd","scrollCancel","touchEnd","flick","destroy"])||this,i=Object(r.x)(e);return i?(n.plugins={},n.options=(new h).merge(o).process(),n.setContent(i).valid?(n.hooks=new r.d(["refresh","enable","disable","destroy","beforeInitialScrollTo","contentChanged"]),n.init(i),n):n):(Object(r.S)("Can not resolve the wrapper DOM."),n)}return M(e,t),e.use=function(t){var o=t.pluginName;return e.plugins.some((function(e){return t===e.ctor}))?e:Object(r.G)(o)?(Object(r.S)("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,n=t.children[this.options.specifiedIndexAsContent];return n?(e=this.content!==n)&&(this.content=n):(Object(r.S)("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 j(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(i),this.applyPlugins(),this.refreshWithoutReset(this.content);var o=this.options,n={x:o.startX,y:o.startY};this.hooks.trigger(this.hooks.eventTypes.beforeInitialScrollTo,n)||this.scroller.scrollTo(n.x,n.y)},e.prototype.applyPlugins=function(){var t=this,o=this.options;e.plugins.sort((function(t,e){var o,n=((o={})[r.a.Pre]=-1,o[r.a.Post]=1,o);return(t.applyOrder?n[t.applyOrder]:0)-(e.applyOrder?n[e.applyOrder]:0)})).forEach((function(e){var n=e.ctor;o[e.name]&&"function"==typeof n&&(t.plugins[e.name]=new n(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(){D(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,n=t.sourceKey;Object(r.M)(e,n,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}(r.d);function Y(t,e){return new x(t,e)}Y.use=x.use,Y.plugins=x.plugins,Y.pluginsMap=x.pluginsMap;var X=Y;e.a=X}}]);