!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("smooth-scrollbar")):"function"==typeof define&&define.amd?define(["smooth-scrollbar"],e):"object"==typeof exports?exports.OverscrollPlugin=e(require("smooth-scrollbar")):t.OverscrollPlugin=e(t.Scrollbar)}(this,function(t){return function(t){function e(r){if(o[r])return o[r].exports;var n=o[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var o={};return e.m=t,e.c=o,e.d=function(t,o,r){e.o(t,o)||Object.defineProperty(t,o,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(o,"a",o),o},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,o){t.exports=o(1)},function(t,e,o){"use strict";function r(t,e){function o(){this.constructor=t}_(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}function n(t,e,o){return t===t&&(void 0!==o&&(t=t<=o?t:o),void 0!==e&&(t=t>=e?t:e)),t}function i(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function s(t){var e=S.call(t,E),o=t[E];try{t[E]=void 0;var r=!0}catch(t){}var n=P.call(t);return r&&(e?t[E]=o:delete t[E]),n}function c(t){return A.call(t)}function l(t){return null==t?void 0===t?B:N:z&&z in Object(t)?T(t):C(t)}function a(t){return null!=t&&"object"==typeof t}function u(t){return"symbol"==typeof t||U(t)&&L(t)==G}function h(t){if("number"==typeof t)return t;if(X(t))return Y;if(m(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=m(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(q,"");var o=$.test(t);return o||I.test(t)?D(t.slice(2),o?2:8):R.test(t)?Y:+t}function f(t,e,o){return void 0===o&&(o=e,e=void 0),void 0!==o&&(o=F(o),o=o===o?o:0),void 0!==e&&(e=F(e),e=e===e?e:0),b(F(t),e,o)}function p(t,e,o){function r(e){var o=f,r=p;return f=p=void 0,b=e,v=t.apply(r,o)}function n(t){return b=t,_=setTimeout(c,e),x?r(t):v}function i(t){var o=t-y,r=t-b,n=e-o;return g?Z(n,d-r):n}function s(t){var o=t-y,r=t-b;return void 0===y||o>=e||o<0||g&&r>=d}function c(){var t=K();if(s(t))return l(t);_=setTimeout(c,i(t))}function l(t){return _=void 0,O&&f?r(t):(f=p=void 0,v)}function a(){void 0!==_&&clearTimeout(_),b=0,f=y=p=_=void 0}function u(){return void 0===_?v:l(K())}function h(){var t=K(),o=s(t);if(f=arguments,p=this,y=t,o){if(void 0===_)return n(y);if(g)return _=setTimeout(c,e),r(y)}return void 0===_&&(_=setTimeout(c,e)),v}var f,p,d,v,_,y,b=0,x=!1,g=!1,O=!0;if("function"!=typeof t)throw new TypeError(Q);return e=F(e)||0,m(o)&&(x=!!o.leading,g="maxWait"in o,d=g?V(F(o.maxWait)||0,e):d,O="trailing"in o?!!o.trailing:O),h.cancel=a,h.flush=u,h}function d(t){var e={};return Object.keys(t).forEach(function(o){if(!rt.test(o))return void(e[o]=t[o]);var r=t[o];o=o.replace(/^-/,""),e[o]=r,ot.forEach(function(t){e["-"+t+"-"+o]=r})}),e}function v(t,e){e=d(e),Object.keys(e).forEach(function(o){var r=o.replace(/^-/,"").replace(/-([a-z])/g,function(t,e){return e.toUpperCase()});t.style[r]=e[o]})}Object.defineProperty(e,"__esModule",{value:!0});var _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])},y=Object.assign||function(t){for(var e,o=1,r=arguments.length;o0&&s.transform(-1,0,0,1,n,0);var c=H(Math.abs(t)/o,0,.75),l=H(c,0,.25)*n,a=Math.abs(t),u=this._touchY||i/2;s.globalAlpha=c,s.beginPath(),s.moveTo(0,-l),s.quadraticCurveTo(a,u,0,i+l),s.fill(),s.closePath(),s.restore()},t.prototype._renderY=function(t){var e=this._scrollbar.size,o=this._getMaxOverscroll(),r=e.container,n=r.width,i=r.height,s=this._ctx;s.save(),t>0&&s.transform(1,0,0,-1,0,i);var c=H(Math.abs(t)/o,0,.75),l=H(c,0,.25)*n,a=this._touchX||n/2,u=Math.abs(t);s.globalAlpha=c,s.beginPath(),s.moveTo(-l,0),s.quadraticCurveTo(a,u,n+l,0),s.fill(),s.closePath(),s.restore()},t}();o.d(e,"OverscrollEffect",function(){return st});var st;!function(t){t.BOUNCE="bounce",t.GLOW="glow"}(st||(st={}));var ct=/wheel|touch/,lt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._glow=new it(e.scrollbar),e._bounce=new nt(e.scrollbar),e._wheelScrollBack={x:!1,y:!1},e._lockWheel={x:!1,y:!1},e._touching=!1,e._amplitude={x:0,y:0},e._position={x:0,y:0},e._releaseWheel=tt(function(){e._lockWheel.x=!1,e._lockWheel.y=!1},30),e}return r(e,t),Object.defineProperty(e.prototype,"_isWheelLocked",{get:function(){return this._lockWheel.x||this._lockWheel.y},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_enabled",{get:function(){return!!this.options.effect},enumerable:!0,configurable:!0}),e.prototype.onInit=function(){var t=this,e=t._glow,o=t.options,r=t.scrollbar,n=o.effect;Object.defineProperty(o,"effect",{get:function(){return n},set:function(t){if(!t)return void(n=void 0);if(t!==st.BOUNCE&&t!==st.GLOW)throw new TypeError("unknow overscroll effect: "+t);n=t,r.options.continuousScrolling=!1,t===st.GLOW?(e.mount(),e.adjust()):e.unmount()}}),o.effect=n},e.prototype.onUpdate=function(){this.options.effect===st.GLOW&&this._glow.adjust()},e.prototype.onRender=function(t){if(this._enabled){this.scrollbar.options.continuousScrolling&&(this.scrollbar.options.continuousScrolling=!1);var e=t.x,o=t.y;!this._amplitude.x&&this._willOverscroll("x",t.x)&&(e=0,this._absorbMomentum("x",t.x)),!this._amplitude.y&&this._willOverscroll("y",t.y)&&(o=0,this._absorbMomentum("y",t.y)),this.scrollbar.setMomentum(e,o),this._render()}},e.prototype.transformDelta=function(t,e){if(this._lastEventType=e.type,!this._enabled||!ct.test(e.type))return t;this._isWheelLocked&&/wheel/.test(e.type)&&(this._releaseWheel(),this._willOverscroll("x",t.x)&&(t.x=0),this._willOverscroll("y",t.y)&&(t.y=0));var o=t.x,r=t.y;switch(this._willOverscroll("x",t.x)&&(o=0,this._addAmplitude("x",t.x)),this._willOverscroll("y",t.y)&&(r=0,this._addAmplitude("y",t.y)),e.type){case"touchstart":case"touchmove":this._touching=!0,this._glow.recordTouch(e);break;case"touchcancel":case"touchend":this._touching=!1}return{x:o,y:r}},e.prototype._willOverscroll=function(t,e){if(!e)return!1;if(this._position[t])return!0;var o=this.scrollbar.offset[t],r=this.scrollbar.limit[t];return 0!==r&&(H(o+e,0,r)===o&&(0===o||o===r))},e.prototype._absorbMomentum=function(t,e){var o=this,r=o.options,n=o._lastEventType,i=o._amplitude;ct.test(n)&&(i[t]=H(e,-r.maxOverscroll,r.maxOverscroll))},e.prototype._addAmplitude=function(t,e){var o,r=this,n=r.options,i=r.scrollbar,s=r._amplitude,c=r._position,l=s[t],a=e*l<0;o=a?0:this._wheelScrollBack[t]?1:Math.abs(l/n.maxOverscroll);var u=l+e*(1-o);s[t]=0===i.offset[t]?H(u,-n.maxOverscroll,0):H(u,0,n.maxOverscroll),a&&(c[t]=s[t])},e.prototype._render=function(){var t=this,e=t.options,o=t._amplitude,r=t._position;if(this._enabled&&(o.x||o.y||r.x||r.y)){var n=this._nextAmp("x"),i=this._nextAmp("y");switch(o.x=n.amplitude,r.x=n.position,o.y=i.amplitude,r.y=i.position,e.effect){case st.BOUNCE:this._bounce.render(r);break;case st.GLOW:this._glow.render(r,this.options.glowColor)}"function"==typeof e.onScroll&&e.onScroll.call(this,y({},r))}},e.prototype._nextAmp=function(t){var e=this,o=e.options,r=e._amplitude,n=e._position,i=1-o.damping,s=r[t],c=n[t],l=this._touching?s:s*i|0,a=l-c,u=c+a-(a*i|0);return!this._touching&&Math.abs(u)