simplebar
Advanced tools
Comparing version
/** | ||
* SimpleBar.js - v3.1.2 | ||
* SimpleBar.js - v3.1.3 | ||
* Scrollbars, simpler. | ||
@@ -314,7 +314,6 @@ * https://grsmto.github.io/simplebar/ | ||
// Save a reference to the instance, so we know this DOM node has already been instancied | ||
this.el.SimpleBar = this; | ||
this.initDOM(); // We stop here on server-side | ||
this.el.SimpleBar = this; // We stop here on server-side | ||
if (canUseDOM) { | ||
// Recalculate scrollbarWidth in case it's a zoom | ||
this.initDOM(); | ||
this.scrollbarWidth = scrollbarWidth(); | ||
@@ -630,2 +629,4 @@ this.recalculate(); | ||
value: function removeListeners() { | ||
var _this4 = this; | ||
// Event listeners | ||
@@ -636,6 +637,16 @@ if (this.options.autoHide) { | ||
['mousedown', 'click', 'dblclick', 'touchstart', 'touchend', 'touchmove'].forEach(function (e) { | ||
_this4.el.removeEventListener(e, _this4.onPointerEvent); | ||
}); | ||
this.el.removeEventListener('mousemove', this.onMouseMove); | ||
this.el.removeEventListener('mouseleave', this.onMouseLeave); | ||
this.contentEl.removeEventListener('scroll', this.onScroll); | ||
window.removeEventListener('resize', this.onWindowResize); | ||
this.mutationObserver && this.mutationObserver.disconnect(); | ||
this.resizeObserver.disconnect(); | ||
this.resizeObserver.disconnect(); // Cancel all debounced functions | ||
this.recalculate.cancel(); | ||
this.onMouseMove.cancel(); | ||
this.hideScrollbars.cancel(); | ||
this.onWindowResize.cancel(); | ||
} | ||
@@ -642,0 +653,0 @@ /** |
/** | ||
* SimpleBar.js - v3.1.2 | ||
* SimpleBar.js - v3.1.3 | ||
* Scrollbars, simpler. | ||
@@ -10,2 +10,2 @@ * https://grsmto.github.io/simplebar/ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).SimpleBar=e()}(this,function(){"use strict";var n=function(t){return"object"==typeof t?null!==t:"function"==typeof t},O=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t},u=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},d=function(t){return Object(u(t))},e=Math.ceil,i=Math.floor,S=function(t){return isNaN(t=+t)?0:(0<t?i:e)(t)},r=Math.min,k=function(t){return 0<t?r(S(t),9007199254740991):0},t=function(a){return function(t,e){var i,r,n=String(u(t)),o=S(e),s=n.length;return o<0||s<=o?a?"":void 0:(i=n.charCodeAt(o))<55296||56319<i||o+1===s||(r=n.charCodeAt(o+1))<56320||57343<r?a?n.charAt(o):i:a?n.slice(o,o+2):r-56320+(i-55296<<10)+65536}},o=t(!0),A=function(t,e,i){return e+(i?o(t,e).length:1)},s={}.toString,a=function(t){return s.call(t).slice(8,-1)},l="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(t,e){return t(e={exports:{}},e.exports),e.exports}var h,f,v=c(function(t){var e=t.exports={version:"2.6.2"};"number"==typeof __e&&(__e=e)}),y=(v.version,c(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)})),p=c(function(t){var e="__core-js_shared__",i=y[e]||(y[e]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:v.version,mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),b=0,g=Math.random(),m=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++b+g).toString(36))},x=c(function(t){var e=p("wks"),i=y.Symbol,r="function"==typeof i;(t.exports=function(t){return e[t]||(e[t]=r&&i[t]||(r?i:m)("Symbol."+t))}).store=e}),w=x("toStringTag"),E="Arguments"==a(function(){return arguments}()),_=function(t){var e,i,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),w))?i:E?a(e):"Object"==(r=a(e))&&"function"==typeof e.callee?"Arguments":r},M=RegExp.prototype.exec,L=function(t,e){var i=t.exec;if("function"==typeof i){var r=i.call(t,e);if("object"!=typeof r)throw new TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==_(t))throw new TypeError("RegExp#exec called on incompatible receiver");return M.call(t,e)},T=RegExp.prototype.exec,j=String.prototype.replace,R=T,N="lastIndex",C=(h=/a/,f=/b*/g,T.call(h,"a"),T.call(f,"a"),0!==h[N]||0!==f[N]),W=void 0!==/()??/.exec("")[1];(C||W)&&(R=function(t){var e,i,r,n,o=this;return W&&(i=new RegExp("^"+o.source+"$(?!\\s)",function(){var t=O(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}.call(o))),C&&(e=o[N]),r=T.call(o,t),C&&r&&(o[N]=o.global?r.index+r[0].length:e),W&&r&&1<r.length&&j.call(r[0],i,function(){for(n=1;n<arguments.length-2;n++)void 0===arguments[n]&&(r[n]=void 0)}),r});var z=R,D=function(t){try{return!!t()}catch(t){return!0}},V=!D(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),B=y.document,P=n(B)&&n(B.createElement),F=function(t){return P?B.createElement(t):{}},H=!V&&!D(function(){return 7!=Object.defineProperty(F("div"),"a",{get:function(){return 7}}).a}),I=Object.defineProperty,q={f:V?Object.defineProperty:function(t,e,i){if(O(t),e=function(t,e){if(!n(t))return t;var i,r;if(e&&"function"==typeof(i=t.toString)&&!n(r=i.call(t)))return r;if("function"==typeof(i=t.valueOf)&&!n(r=i.call(t)))return r;if(!e&&"function"==typeof(i=t.toString)&&!n(r=i.call(t)))return r;throw TypeError("Can't convert object to primitive value")}(e,!0),O(i),H)try{return I(t,e,i)}catch(t){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(t[e]=i.value),t}},$=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},X=V?function(t,e,i){return q.f(t,e,$(1,i))}:function(t,e,i){return t[e]=i,t},Y={}.hasOwnProperty,G=function(t,e){return Y.call(t,e)},U=c(function(t){var o=m("src"),e="toString",i=Function[e],s=(""+i).split(e);v.inspectSource=function(t){return i.call(t)},(t.exports=function(t,e,i,r){var n="function"==typeof i;n&&(G(i,"name")||X(i,"name",e)),t[e]!==i&&(n&&(G(i,o)||X(i,o,t[e]?""+t[e]:s.join(String(e)))),t===y?t[e]=i:r?t[e]?t[e]=i:X(t,e,i):(delete t[e],X(t,e,i)))})(Function.prototype,e,function(){return"function"==typeof this&&this[o]||i.call(this)})}),J=function(r,n,t){if(function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!")}(r),void 0===n)return r;switch(t){case 1:return function(t){return r.call(n,t)};case 2:return function(t,e){return r.call(n,t,e)};case 3:return function(t,e,i){return r.call(n,t,e,i)}}return function(){return r.apply(n,arguments)}},K="prototype",Q=function(t,e,i){var r,n,o,s,a=t&Q.F,l=t&Q.G,c=t&Q.S,u=t&Q.P,h=t&Q.B,f=l?y:c?y[e]||(y[e]={}):(y[e]||{})[K],d=l?v:v[e]||(v[e]={}),p=d[K]||(d[K]={});for(r in l&&(i=e),i)o=((n=!a&&f&&void 0!==f[r])?f:i)[r],s=h&&n?J(o,y):u&&"function"==typeof o?J(Function.call,o):o,f&&U(f,r,o,t&Q.U),d[r]!=o&&X(d,r,s),u&&p[r]!=o&&(p[r]=o)};y.core=v,Q.F=1,Q.G=2,Q.S=4,Q.P=8,Q.B=16,Q.W=32,Q.U=64,Q.R=128;var Z=Q;Z({target:"RegExp",proto:!0,forced:z!==/./.exec},{exec:z});var tt=x("species"),et=!D(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),it=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var i="ab".split(t);return 2===i.length&&"a"===i[0]&&"b"===i[1]}(),rt=function(i,t,e){var r=x(i),o=!D(function(){var t={};return t[r]=function(){return 7},7!=""[i](t)}),n=o?!D(function(){var t=!1,e=/a/;return e.exec=function(){return t=!0,null},"split"===i&&(e.constructor={},e.constructor[tt]=function(){return e}),e[r](""),!t}):void 0;if(!o||!n||"replace"===i&&!et||"split"===i&&!it){var s=/./[r],a=e(u,r,""[i],function(t,e,i,r,n){return e.exec===z?o&&!n?{done:!0,value:s.call(e,i,r)}:{done:!0,value:t.call(i,e,r)}:{done:!1}}),l=a[0],c=a[1];U(String.prototype,i,l),X(RegExp.prototype,r,2==t?function(t,e){return c.call(t,this,e)}:function(t){return c.call(t,this)})}},nt=Math.max,ot=Math.min,st=Math.floor,at=/\$([$&`']|\d\d?|<[^>]*>)/g,lt=/\$([$&`']|\d\d?)/g;rt("replace",2,function(n,o,w,E){return[function(t,e){var i=n(this),r=null==t?void 0:t[o];return void 0!==r?r.call(t,i,e):w.call(String(i),t,e)},function(t,e){var i=E(w,t,this,e);if(i.done)return i.value;var r=O(t),n=String(this),o="function"==typeof e;o||(e=String(e));var s=r.global;if(s){var a=r.unicode;r.lastIndex=0}for(var l=[];;){var c=L(r,n);if(null===c)break;if(l.push(c),!s)break;""===String(c[0])&&(r.lastIndex=A(n,k(r.lastIndex),a))}for(var u,h="",f=0,d=0;d<l.length;d++){c=l[d];for(var p=String(c[0]),v=nt(ot(S(c.index),n.length),0),y=[],b=1;b<c.length;b++)y.push(void 0===(u=c[b])?u:String(u));var g=c.groups;if(o){var m=[p].concat(y,v,n);void 0!==g&&m.push(g);var x=String(e.apply(void 0,m))}else x=_(p,n,v,y,g,e);f<=v&&(h+=n.slice(f,v)+x,f=v+p.length)}return h+n.slice(f)}];function _(o,s,a,l,c,t){var u=a+o.length,h=l.length,e=lt;return void 0!==c&&(c=d(c),e=at),w.call(t,e,function(t,e){var i;switch(e.charAt(0)){case"$":return"$";case"&":return o;case"`":return s.slice(0,a);case"'":return s.slice(u);case"<":i=c[e.slice(1,-1)];break;default:var r=+e;if(0===r)return t;if(h<r){var n=st(r/10);return 0===n?t:n<=h?void 0===l[n-1]?e.charAt(1):l[n-1]+e.charAt(1):t}i=l[r-1]}return void 0===i?"":i})}});var ct=q.f,ut=Function.prototype,ht=/^\s*function ([^ (]*)/;"name"in ut||V&&ct(ut,"name",{configurable:!0,get:function(){try{return(""+this).match(ht)[1]}catch(t){return""}}}),rt("match",1,function(r,n,c,u){return[function(t){var e=r(this),i=null==t?void 0:t[n];return void 0!==i?i.call(t,e):new RegExp(t)[n](String(e))},function(t){var e=u(c,t,this);if(e.done)return e.value;var i=O(t),r=String(this);if(!i.global)return L(i,r);for(var n,o=i.unicode,s=[],a=i.lastIndex=0;null!==(n=L(i,r));){var l=String(n[0]);""===(s[a]=l)&&(i.lastIndex=A(r,k(i.lastIndex),o)),a++}return 0===a?null:s}]});var ft=x("unscopables"),dt=Array.prototype;null==dt[ft]&&X(dt,ft,{});var pt,vt=function(t){dt[ft][t]=!0},yt=function(t,e){return{value:e,done:!!t}},bt={},gt=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==a(t)?t.split(""):Object(t)},mt=function(t){return gt(u(t))},xt=Math.max,wt=Math.min,Et=p("keys"),_t=function(t){return Et[t]||(Et[t]=m(t))},Ot=(pt=!1,function(t,e,i){var r,n,o,s=mt(t),a=k(s.length),l=(n=a,(r=S(r=i))<0?xt(r+n,0):wt(r,n));if(pt&&e!=e){for(;l<a;)if((o=s[l++])!=o)return!0}else for(;l<a;l++)if((pt||l in s)&&s[l]===e)return pt||l||0;return!pt&&-1}),St=_t("IE_PROTO"),kt="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),At=Object.keys||function(t){return function(t,e){var i,r=mt(t),n=0,o=[];for(i in r)i!=St&&G(r,i)&&o.push(i);for(;e.length>n;)G(r,i=e[n++])&&(~Ot(o,i)||o.push(i));return o}(t,kt)},Mt=V?Object.defineProperties:function(t,e){O(t);for(var i,r=At(e),n=r.length,o=0;o<n;)q.f(t,i=r[o++],e[i]);return t},Lt=y.document,Tt=Lt&&Lt.documentElement,jt=_t("IE_PROTO"),Rt=function(){},Nt="prototype",Ct=function(){var t,e=F("iframe"),i=kt.length;for(e.style.display="none",Tt.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),Ct=t.F;i--;)delete Ct[Nt][kt[i]];return Ct()},Wt=Object.create||function(t,e){var i;return null!==t?(Rt[Nt]=O(t),i=new Rt,Rt[Nt]=null,i[jt]=t):i=Ct(),void 0===e?i:Mt(i,e)},zt=q.f,Dt=x("toStringTag"),Vt=function(t,e,i){t&&!G(t=i?t:t.prototype,Dt)&&zt(t,Dt,{configurable:!0,value:e})},Bt={};X(Bt,x("iterator"),function(){return this});var Pt=_t("IE_PROTO"),Ft=Object.prototype,Ht=Object.getPrototypeOf||function(t){return t=d(t),G(t,Pt)?t[Pt]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Ft:null},It=x("iterator"),qt=!([].keys&&"next"in[].keys()),$t="values",Xt=function(){return this},Yt=function(t,e,i,r,n,o,s){var a,l,c;l=e,c=r,(a=i).prototype=Wt(Bt,{next:$(1,c)}),Vt(a,l+" Iterator");var u,h,f,d=function(t){if(!qt&&t in b)return b[t];switch(t){case"keys":case $t:return function(){return new i(this,t)}}return function(){return new i(this,t)}},p=e+" Iterator",v=n==$t,y=!1,b=t.prototype,g=b[It]||b["@@iterator"]||n&&b[n],m=g||d(n),x=n?v?d("entries"):m:void 0,w="Array"==e&&b.entries||g;if(w&&(f=Ht(w.call(new t)))!==Object.prototype&&f.next&&(Vt(f,p,!0),"function"!=typeof f[It]&&X(f,It,Xt)),v&&g&&g.name!==$t&&(y=!0,m=function(){return g.call(this)}),(qt||y||!b[It])&&X(b,It,m),bt[e]=m,bt[p]=Xt,n)if(u={values:v?m:d($t),keys:o?m:d("keys"),entries:x},s)for(h in u)h in b||U(b,h,u[h]);else Z(Z.P+Z.F*(qt||y),e,u);return u},Gt=Yt(Array,"Array",function(t,e){this._t=mt(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,i=this._i++;return!t||i>=t.length?(this._t=void 0,yt(1)):yt(0,"keys"==e?i:"values"==e?t[i]:[i,t[i]])},"values");bt.Arguments=bt.Array,vt("keys"),vt("values"),vt("entries");for(var Ut=x("iterator"),Jt=x("toStringTag"),Kt=bt.Array,Qt={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},Zt=At(Qt),te=0;te<Zt.length;te++){var ee,ie=Zt[te],re=Qt[ie],ne=y[ie],oe=ne&&ne.prototype;if(oe&&(oe[Ut]||X(oe,Ut,Kt),oe[Jt]||X(oe,Jt,ie),bt[ie]=Kt,re))for(ee in Gt)oe[ee]||U(oe,ee,Gt[ee],!0)}var se=t(!0);Yt(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,i=this._i;return i>=e.length?{value:void 0,done:!0}:(t=se(e,i),this._i+=t.length,{value:t,done:!1})});var ae=function(e,t,i,r){try{return r?t(O(i)[0],i[1]):t(i)}catch(t){var n=e.return;throw void 0!==n&&O(n.call(e)),t}},le=x("iterator"),ce=Array.prototype,ue=function(t,e,i){e in t?q.f(t,e,$(0,i)):t[e]=i},he=x("iterator"),fe=v.getIteratorMethod=function(t){if(null!=t)return t[he]||t["@@iterator"]||bt[_(t)]},de=x("iterator"),pe=!1;try{[7][de]().return=function(){pe=!0}}catch(t){}function ve(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ye(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{},e=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(o).filter(function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable}))),e.forEach(function(t){var e,i,r;e=n,r=o[i=t],i in e?Object.defineProperty(e,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[i]=r})}return n}Z(Z.S+Z.F*!function(t,e){if(!e&&!pe)return!1;var i=!1;try{var r=[7],n=r[de]();n.next=function(){return{done:i=!0}},r[de]=function(){return n},t(r)}catch(t){}return i}(function(t){}),"Array",{from:function(t){var e,i,r,n,o,s=d(t),a="function"==typeof this?this:Array,l=arguments.length,c=1<l?arguments[1]:void 0,u=void 0!==c,h=0,f=fe(s);if(u&&(c=J(c,2<l?arguments[2]:void 0,2)),null!=f&&(a!=Array||(void 0===(o=f)||bt.Array!==o&&ce[le]!==o)))for(n=f.call(s),i=new a;!(r=n.next()).done;h++)ue(i,h,u?ae(n,c,[r.value,h],!0):r.value);else for(i=new a(e=k(s.length));h<e;h++)ue(i,h,u?c(s[h],h):s[h]);return i.length=h,i}});var be=c(function(t,e){t.exports=function(){if("undefined"==typeof document)return 0;var t,e=document.body,i=document.createElement("div"),r=i.style;return r.position="absolute",r.top=r.left="-9999px",r.width=r.height="100px",r.overflow="scroll",e.appendChild(i),t=i.offsetWidth-i.clientWidth,e.removeChild(i),t}}),ge="Expected a function",me=NaN,xe="[object Symbol]",we=/^\s+|\s+$/g,Ee=/^[-+]0x[0-9a-f]+$/i,_e=/^0b[01]+$/i,Oe=/^0o[0-7]+$/i,Se=parseInt,ke="object"==typeof l&&l&&l.Object===Object&&l,Ae="object"==typeof self&&self&&self.Object===Object&&self,Me=ke||Ae||Function("return this")(),Le=Object.prototype.toString,Te=Math.max,je=Math.min,Re=function(){return Me.Date.now()};function Ne(r,n,t){var o,s,a,l,c,u,h=0,f=!1,d=!1,e=!0;if("function"!=typeof r)throw new TypeError(ge);function p(t){var e=o,i=s;return o=s=void 0,h=t,l=r.apply(i,e)}function v(t){var e=t-u;return void 0===u||n<=e||e<0||d&&a<=t-h}function y(){var t,e,i=Re();if(v(i))return b(i);c=setTimeout(y,(e=n-((t=i)-u),d?je(e,a-(t-h)):e))}function b(t){return c=void 0,e&&o?p(t):(o=s=void 0,l)}function i(){var t,e=Re(),i=v(e);if(o=arguments,s=this,u=e,i){if(void 0===c)return h=t=u,c=setTimeout(y,n),f?p(t):l;if(d)return c=setTimeout(y,n),p(u)}return void 0===c&&(c=setTimeout(y,n)),l}return n=We(n)||0,Ce(t)&&(f=!!t.leading,a=(d="maxWait"in t)?Te(We(t.maxWait)||0,n):a,e="trailing"in t?!!t.trailing:e),i.cancel=function(){void 0!==c&&clearTimeout(c),o=u=s=c=void(h=0)},i.flush=function(){return void 0===c?l:b(Re())},i}function Ce(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function We(t){if("number"==typeof t)return t;if("symbol"==typeof(e=t)||(i=e)&&"object"==typeof i&&Le.call(e)==xe)return me;var e,i;if(Ce(t)){var r="function"==typeof t.valueOf?t.valueOf():t;t=Ce(r)?r+"":r}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(we,"");var n=_e.test(t);return n||Oe.test(t)?Se(t.slice(2),n?2:8):Ee.test(t)?me:+t}var ze=function(t,e,i){var r=!0,n=!0;if("function"!=typeof t)throw new TypeError(ge);return Ce(i)&&(r="leading"in i?!!i.leading:r,n="trailing"in i?!!i.trailing:n),Ne(t,e,{leading:r,maxWait:e,trailing:n})},De=NaN,Ve="[object Symbol]",Be=/^\s+|\s+$/g,Pe=/^[-+]0x[0-9a-f]+$/i,Fe=/^0b[01]+$/i,He=/^0o[0-7]+$/i,Ie=parseInt,qe="object"==typeof l&&l&&l.Object===Object&&l,$e="object"==typeof self&&self&&self.Object===Object&&self,Xe=qe||$e||Function("return this")(),Ye=Object.prototype.toString,Ge=Math.max,Ue=Math.min,Je=function(){return Xe.Date.now()};function Ke(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Qe(t){if("number"==typeof t)return t;if("symbol"==typeof(e=t)||(i=e)&&"object"==typeof i&&Ye.call(e)==Ve)return De;var e,i;if(Ke(t)){var r="function"==typeof t.valueOf?t.valueOf():t;t=Ke(r)?r+"":r}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Be,"");var n=Fe.test(t);return n||He.test(t)?Ie(t.slice(2),n?2:8):Pe.test(t)?De:+t}var Ze=function(r,n,t){var o,s,a,l,c,u,h=0,f=!1,d=!1,e=!0;if("function"!=typeof r)throw new TypeError("Expected a function");function p(t){var e=o,i=s;return o=s=void 0,h=t,l=r.apply(i,e)}function v(t){var e=t-u;return void 0===u||n<=e||e<0||d&&a<=t-h}function y(){var t,e,i=Je();if(v(i))return b(i);c=setTimeout(y,(e=n-((t=i)-u),d?Ue(e,a-(t-h)):e))}function b(t){return c=void 0,e&&o?p(t):(o=s=void 0,l)}function i(){var t,e=Je(),i=v(e);if(o=arguments,s=this,u=e,i){if(void 0===c)return h=t=u,c=setTimeout(y,n),f?p(t):l;if(d)return c=setTimeout(y,n),p(u)}return void 0===c&&(c=setTimeout(y,n)),l}return n=Qe(n)||0,Ke(t)&&(f=!!t.leading,a=(d="maxWait"in t)?Ge(Qe(t.maxWait)||0,n):a,e="trailing"in t?!!t.trailing:e),i.cancel=function(){void 0!==c&&clearTimeout(c),o=u=s=c=void(h=0)},i.flush=function(){return void 0===c?l:b(Je())},i},ti="Expected a function",ei="__lodash_hash_undefined__",ii="[object Function]",ri="[object GeneratorFunction]",ni=/^\[object .+?Constructor\]$/,oi="object"==typeof l&&l&&l.Object===Object&&l,si="object"==typeof self&&self&&self.Object===Object&&self,ai=oi||si||Function("return this")();var li,ci=Array.prototype,ui=Function.prototype,hi=Object.prototype,fi=ai["__core-js_shared__"],di=(li=/[^.]+$/.exec(fi&&fi.keys&&fi.keys.IE_PROTO||""))?"Symbol(src)_1."+li:"",pi=ui.toString,vi=hi.hasOwnProperty,yi=hi.toString,bi=RegExp("^"+pi.call(vi).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),gi=ci.splice,mi=Ai(ai,"Map"),xi=Ai(Object,"create");function wi(t){var e=-1,i=t?t.length:0;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}function Ei(t){var e=-1,i=t?t.length:0;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}function _i(t){var e=-1,i=t?t.length:0;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}function Oi(t,e){for(var i,r,n=t.length;n--;)if((i=t[n][0])===(r=e)||i!=i&&r!=r)return n;return-1}function Si(t){return!(!Li(t)||(e=t,di&&di in e))&&((r=Li(i=t)?yi.call(i):"")==ii||r==ri||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?bi:ni).test(function(t){if(null!=t){try{return pi.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e,i,r}function ki(t,e){var i,r,n=t.__data__;return("string"==(r=typeof(i=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?n["string"==typeof e?"string":"hash"]:n.map}function Ai(t,e){var i,r,n=(r=e,null==(i=t)?void 0:i[r]);return Si(n)?n:void 0}function Mi(n,o){if("function"!=typeof n||o&&"function"!=typeof o)throw new TypeError(ti);var s=function(){var t=arguments,e=o?o.apply(this,t):t[0],i=s.cache;if(i.has(e))return i.get(e);var r=n.apply(this,t);return s.cache=i.set(e,r),r};return s.cache=new(Mi.Cache||_i),s}function Li(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}wi.prototype.clear=function(){this.__data__=xi?xi(null):{}},wi.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},wi.prototype.get=function(t){var e=this.__data__;if(xi){var i=e[t];return i===ei?void 0:i}return vi.call(e,t)?e[t]:void 0},wi.prototype.has=function(t){var e=this.__data__;return xi?void 0!==e[t]:vi.call(e,t)},wi.prototype.set=function(t,e){return this.__data__[t]=xi&&void 0===e?ei:e,this},Ei.prototype.clear=function(){this.__data__=[]},Ei.prototype.delete=function(t){var e=this.__data__,i=Oi(e,t);return!(i<0||(i==e.length-1?e.pop():gi.call(e,i,1),0))},Ei.prototype.get=function(t){var e=this.__data__,i=Oi(e,t);return i<0?void 0:e[i][1]},Ei.prototype.has=function(t){return-1<Oi(this.__data__,t)},Ei.prototype.set=function(t,e){var i=this.__data__,r=Oi(i,t);return r<0?i.push([t,e]):i[r][1]=e,this},_i.prototype.clear=function(){this.__data__={hash:new wi,map:new(mi||Ei),string:new wi}},_i.prototype.delete=function(t){return ki(this,t).delete(t)},_i.prototype.get=function(t){return ki(this,t).get(t)},_i.prototype.has=function(t){return ki(this,t).has(t)},_i.prototype.set=function(t,e){return ki(this,t).set(t,e),this},Mi.Cache=_i;var Ti=Mi,ji=function(){if("undefined"!=typeof Map)return Map;function r(t,i){var r=-1;return t.some(function(t,e){return t[0]===i&&(r=e,!0)}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var e=r(this.__entries__,t),i=this.__entries__[e];return i&&i[1]},t.prototype.set=function(t,e){var i=r(this.__entries__,t);~i?this.__entries__[i][1]=e:this.__entries__.push([t,e])},t.prototype.delete=function(t){var e=this.__entries__,i=r(e,t);~i&&e.splice(i,1)},t.prototype.has=function(t){return!!~r(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var i=0,r=this.__entries__;i<r.length;i++){var n=r[i];t.call(e,n[1],n[0])}},t}()}(),Ri="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Ni="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Ci="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Ni):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)},Wi=2;var zi=["top","right","bottom","left","width","height","size","weight"],Di="undefined"!=typeof MutationObserver,Vi=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var i=!1,r=!1,n=0;function o(){i&&(i=!1,t()),r&&a()}function s(){Ci(o)}function a(){var t=Date.now();if(i){if(t-n<Wi)return;r=!0}else r=!(i=!0),setTimeout(s,e);n=t}return a}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,i=e.indexOf(t);~i&&e.splice(i,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return t.forEach(function(t){return t.broadcastActive()}),0<t.length},t.prototype.connect_=function(){Ri&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Di?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){Ri&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,i=void 0===e?"":e;zi.some(function(t){return!!~i.indexOf(t)})&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),Bi=function(t,e){for(var i=0,r=Object.keys(e);i<r.length;i++){var n=r[i];Object.defineProperty(t,n,{value:e[n],enumerable:!1,writable:!1,configurable:!0})}return t},Pi=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Ni},Fi=Yi(0,0,0,0);function Hi(t){return parseFloat(t)||0}function Ii(i){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return t.reduce(function(t,e){return t+Hi(i["border-"+e+"-width"])},0)}function qi(t){var e=t.clientWidth,i=t.clientHeight;if(!e&&!i)return Fi;var r,n=Pi(t).getComputedStyle(t),o=function(t){for(var e={},i=0,r=["top","right","bottom","left"];i<r.length;i++){var n=r[i],o=t["padding-"+n];e[n]=Hi(o)}return e}(n),s=o.left+o.right,a=o.top+o.bottom,l=Hi(n.width),c=Hi(n.height);if("border-box"===n.boxSizing&&(Math.round(l+s)!==e&&(l-=Ii(n,"left","right")+s),Math.round(c+a)!==i&&(c-=Ii(n,"top","bottom")+a)),(r=t)!==Pi(r).document.documentElement){var u=Math.round(l+s)-e,h=Math.round(c+a)-i;1!==Math.abs(u)&&(l-=u),1!==Math.abs(h)&&(c-=h)}return Yi(o.left,o.top,l,c)}var $i="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Pi(t).SVGGraphicsElement}:function(t){return t instanceof Pi(t).SVGElement&&"function"==typeof t.getBBox};function Xi(t){return Ri?$i(t)?Yi(0,0,(e=t.getBBox()).width,e.height):qi(t):Fi;var e}function Yi(t,e,i,r){return{x:t,y:e,width:i,height:r}}var Gi=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Yi(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=Xi(this.target);return(this.contentRect_=t).width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),Ui=function(t,e){var i,r,n,o,s,a,l,c=(r=(i=e).x,n=i.y,o=i.width,s=i.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(a.prototype),Bi(l,{x:r,y:n,width:o,height:s,top:n,right:r+o,bottom:s+n,left:r}),l);Bi(this,{target:t,contentRect:c})},Ji=function(){function t(t,e,i){if(this.activeObservations_=[],this.observations_=new ji,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=i}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Pi(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Gi(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Pi(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(t){return new Ui(t.target,t.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return 0<this.activeObservations_.length},t}(),Ki="undefined"!=typeof WeakMap?new WeakMap:new ji,Qi=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var i=Vi.getInstance(),r=new Ji(e,i,this);Ki.set(this,r)};["observe","unobserve","disconnect"].forEach(function(e){Qi.prototype[e]=function(){var t;return(t=Ki.get(this))[e].apply(t,arguments)}});var Zi=void 0!==Ni.ResizeObserver?Ni.ResizeObserver:Qi,tr=!("undefined"==typeof window||!window.document||!window.document.createElement),er=function(){function l(t,e){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),this.onScroll=function(){o.scrollXTicking||(window.requestAnimationFrame(o.scrollX),o.scrollXTicking=!0),o.scrollYTicking||(window.requestAnimationFrame(o.scrollY),o.scrollYTicking=!0)},this.scrollX=function(){o.axis.x.isOverflowing&&(o.showScrollbar("x"),o.positionScrollbar("x")),o.scrollXTicking=!1},this.scrollY=function(){o.axis.y.isOverflowing&&(o.showScrollbar("y"),o.positionScrollbar("y")),o.scrollYTicking=!1},this.onMouseEnter=function(){o.showScrollbar("x"),o.showScrollbar("y")},this.onMouseMove=function(t){o.mouseX=t.clientX,o.mouseY=t.clientY,(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&o.onMouseMoveForAxis("x"),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&o.onMouseMoveForAxis("y")},this.onMouseLeave=function(){o.onMouseMove.cancel(),(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&o.onMouseLeaveForAxis("x"),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&o.onMouseLeaveForAxis("y"),o.mouseX=-1,o.mouseY=-1},this.onWindowResize=function(){o.scrollbarWidth=be(),o.hideNativeScrollbar()},this.hideScrollbars=function(){o.axis.x.track.rect=o.axis.x.track.el.getBoundingClientRect(),o.axis.y.track.rect=o.axis.y.track.el.getBoundingClientRect(),o.isWithinBounds(o.axis.y.track.rect)||(o.axis.y.scrollbar.el.classList.remove(o.classNames.visible),o.axis.y.isVisible=!1),o.isWithinBounds(o.axis.x.track.rect)||(o.axis.x.scrollbar.el.classList.remove(o.classNames.visible),o.axis.x.isVisible=!1)},this.onPointerEvent=function(t){var e,i;o.axis.x.scrollbar.rect=o.axis.x.scrollbar.el.getBoundingClientRect(),o.axis.y.scrollbar.rect=o.axis.y.scrollbar.el.getBoundingClientRect(),(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&(i=o.isWithinBounds(o.axis.x.scrollbar.rect)),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&(e=o.isWithinBounds(o.axis.y.scrollbar.rect)),(e||i)&&(t.preventDefault(),t.stopPropagation(),"mousedown"===t.type&&(e&&o.onDragStart(t,"y"),i&&o.onDragStart(t,"x")))},this.drag=function(t){var e=o.axis[o.draggedAxis].track,i=e.rect[o.axis[o.draggedAxis].sizeAttr],r=o.axis[o.draggedAxis].scrollbar;t.preventDefault(),t.stopPropagation();var n=(("y"===o.draggedAxis?t.pageY:t.pageX)-e.rect[o.axis[o.draggedAxis].offsetAttr]-o.axis[o.draggedAxis].dragOffset)/e.rect[o.axis[o.draggedAxis].sizeAttr]*o.contentEl[o.axis[o.draggedAxis].scrollSizeAttr];"x"===o.draggedAxis&&(n=o.isRtl&&l.getRtlHelpers().isRtlScrollbarInverted?n-(i+r.size):n,n=o.isRtl&&l.getRtlHelpers().isRtlScrollingInverted?-n:n),o.contentEl[o.axis[o.draggedAxis].scrollOffsetAttr]=n},this.onEndDrag=function(t){t.preventDefault(),t.stopPropagation(),document.removeEventListener("mousemove",o.drag),document.removeEventListener("mouseup",o.onEndDrag)},this.el=t,this.flashTimeout,this.contentEl,this.offsetEl,this.maskEl,this.globalObserver,this.mutationObserver,this.resizeObserver,this.scrollbarWidth,this.minScrollbarWidth=20,this.options=ye({},l.defaultOptions,e),this.classNames=ye({},l.defaultOptions.classNames,this.options.classNames),this.isRtl,this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.recalculate=ze(this.recalculate.bind(this),64),this.onMouseMove=ze(this.onMouseMove.bind(this),64),this.hideScrollbars=Ze(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=Ze(this.onWindowResize.bind(this),64,{leading:!0}),l.getRtlHelpers=Ti(l.getRtlHelpers),this.getContentElement=this.getScrollElement,this.init()}var t,e,i;return t=l,i=[{key:"getRtlHelpers",value:function(){var t=document.createElement("div");t.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var e=t.firstElementChild;document.body.appendChild(e);var i=e.firstElementChild;e.scrollLeft=0;var r=l.getOffset(e),n=l.getOffset(i);e.scrollLeft=999;var o=l.getOffset(i);return{isRtlScrollingInverted:r.left!==n.left&&n.left-o.left!=0,isRtlScrollbarInverted:r.left!==n.left}}},{key:"initHtmlApi",value:function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(function(t){t.forEach(function(t){Array.from(t.addedNodes).forEach(function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?!t.SimpleBar&&new l(t,l.getElOptions(t)):Array.from(t.querySelectorAll("[data-simplebar]")).forEach(function(t){!t.SimpleBar&&new l(t,l.getElOptions(t))}))}),Array.from(t.removedNodes).forEach(function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?t.SimpleBar&&t.SimpleBar.unMount():Array.from(t.querySelectorAll("[data-simplebar]")).forEach(function(t){t.SimpleBar&&t.SimpleBar.unMount()}))})})}),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))}},{key:"getElOptions",value:function(t){return Array.from(t.attributes).reduce(function(t,e){var i=e.name.match(/data-simplebar-(.+)/);if(i){var r=i[1].replace(/\W+(.)/g,function(t,e){return e.toUpperCase()});switch(e.value){case"true":t[r]=!0;break;case"false":t[r]=!1;break;case void 0:t[r]=!0;break;default:t[r]=e.value}}return t},{})}},{key:"removeObserver",value:function(){this.globalObserver.disconnect()}},{key:"initDOMLoadedElements",value:function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.from(document.querySelectorAll("[data-simplebar]")).forEach(function(t){t.SimpleBar||new l(t,l.getElOptions(t))})}},{key:"getOffset",value:function(t){var e=t.getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft)}}}],(e=[{key:"init",value:function(){(this.el.SimpleBar=this).initDOM(),tr&&(this.scrollbarWidth=be(),this.recalculate(),this.initListeners())}},{key:"initDOM",value:function(){var e=this;if(Array.from(this.el.children).filter(function(t){return t.classList.contains(e.classNames.wrapper)}).length)this.wrapperEl=this.el.querySelector(".".concat(this.classNames.wrapper)),this.contentEl=this.el.querySelector(".".concat(this.classNames.content)),this.offsetEl=this.el.querySelector(".".concat(this.classNames.offset)),this.maskEl=this.el.querySelector(".".concat(this.classNames.mask)),this.placeholderEl=this.el.querySelector(".".concat(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(".".concat(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(".".concat(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.el.querySelector(".".concat(this.classNames.track,".").concat(this.classNames.horizontal)),this.axis.y.track.el=this.el.querySelector(".".concat(this.classNames.track,".").concat(this.classNames.vertical));else{for(this.wrapperEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentEl.classList.add(this.classNames.content),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.offsetEl.appendChild(this.contentEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var t=document.createElement("div"),i=document.createElement("div");t.classList.add(this.classNames.track),i.classList.add(this.classNames.scrollbar),this.options.autoHide||i.classList.add(this.classNames.visible),t.appendChild(i),this.axis.x.track.el=t.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=t.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector(".".concat(this.classNames.scrollbar)),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector(".".concat(this.classNames.scrollbar)),this.el.setAttribute("data-simplebar","init")}},{key:"initListeners",value:function(){var e=this;this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick","touchstart","touchend","touchmove"].forEach(function(t){e.el.addEventListener(t,e.onPointerEvent,!0)}),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentEl.addEventListener("scroll",this.onScroll),window.addEventListener("resize",this.onWindowResize),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver(function(t){t.forEach(function(t){(t.target===e.el||!e.isChildNode(t.target)||t.addedNodes.length||t.removedNodes.length)&&e.recalculate()})}),this.mutationObserver.observe(this.el,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this.resizeObserver=new Zi(this.recalculate),this.resizeObserver.observe(this.el)}},{key:"recalculate",value:function(){var t=this.heightAutoObserverEl.offsetHeight<=1;this.elStyles=window.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction,this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.contentEl.style.height=t?"auto":"100%",this.placeholderEl.style.width="".concat(this.contentEl.scrollWidth,"px"),this.placeholderEl.style.height="".concat(this.contentEl.scrollHeight,"px"),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft),this.axis.x.track.rect=this.axis.x.track.el.getBoundingClientRect(),this.axis.y.track.rect=this.axis.y.track.el.getBoundingClientRect(),this.axis.x.isOverflowing=(this.scrollbarWidth?this.contentEl.scrollWidth:this.contentEl.scrollWidth-this.minScrollbarWidth)>Math.ceil(this.axis.x.track.rect.width),this.axis.y.isOverflowing=(this.scrollbarWidth?this.contentEl.scrollHeight:this.contentEl.scrollHeight-this.minScrollbarWidth)>Math.ceil(this.axis.y.track.rect.height),this.axis.x.isOverflowing="hidden"!==this.elStyles.overflowX&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==this.elStyles.overflowY&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px"),this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px"),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y"),this.hideNativeScrollbar()}},{key:"getScrollbarSize",value:function(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"y",i=this.scrollbarWidth?this.contentEl[this.axis[e].scrollSizeAttr]:this.contentEl[this.axis[e].scrollSizeAttr]-this.minScrollbarWidth,r=this.axis[e].track.rect[this.axis[e].sizeAttr];if(this.axis[e].isOverflowing){var n=r/i;return t=Math.max(~~(n*r),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(t=Math.min(t,this.options.scrollbarMaxSize)),t}}},{key:"positionScrollbar",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"y",e=this.contentEl[this.axis[t].scrollSizeAttr],i=this.axis[t].track.rect[this.axis[t].sizeAttr],r=parseInt(this.elStyles[this.axis[t].sizeAttr],10),n=this.axis[t].scrollbar,o=this.contentEl[this.axis[t].scrollOffsetAttr],s=(o="x"===t&&this.isRtl&&l.getRtlHelpers().isRtlScrollingInverted?-o:o)/(e-r),a=~~((i-n.size)*s);a="x"===t&&this.isRtl&&l.getRtlHelpers().isRtlScrollbarInverted?a+(i-n.size):a,n.el.style.transform="x"===t?"translate3d(".concat(a,"px, 0, 0)"):"translate3d(0, ".concat(a,"px, 0)")}},{key:"toggleTrackVisibility",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"y",e=this.axis[t].track.el,i=this.axis[t].scrollbar.el;this.axis[t].isOverflowing||this.axis[t].forceVisible?(e.style.visibility="visible",this.contentEl.style[this.axis[t].overflowAttr]="scroll"):(e.style.visibility="hidden",this.contentEl.style[this.axis[t].overflowAttr]="hidden"),this.axis[t].isOverflowing?i.style.visibility="visible":i.style.visibility="hidden"}},{key:"hideNativeScrollbar",value:function(){if(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth||this.minScrollbarWidth,"px"):0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth||this.minScrollbarWidth,"px"):0,!this.scrollbarWidth){var t=[this.isRtl?"paddingLeft":"paddingRight"];this.contentEl.style[t]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"calc(".concat(this.elStyles[t]," + ").concat(this.minScrollbarWidth,"px)"):this.elStyles[t],this.contentEl.style.paddingBottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"calc(".concat(this.elStyles.paddingBottom," + ").concat(this.minScrollbarWidth,"px)"):this.elStyles.paddingBottom}}},{key:"onMouseMoveForAxis",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"y";this.axis[t].track.rect=this.axis[t].track.el.getBoundingClientRect(),this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[t].scrollbar.rect)?this.axis[t].scrollbar.el.classList.add(this.classNames.hover):this.axis[t].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[t].track.rect)?(this.showScrollbar(t),this.axis[t].track.el.classList.add(this.classNames.hover)):this.axis[t].track.el.classList.remove(this.classNames.hover)}},{key:"onMouseLeaveForAxis",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"y";this.axis[t].track.el.classList.remove(this.classNames.hover),this.axis[t].scrollbar.el.classList.remove(this.classNames.hover)}},{key:"showScrollbar",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"y",e=this.axis[t].scrollbar.el;this.axis[t].isVisible||(e.classList.add(this.classNames.visible),this.axis[t].isVisible=!0),this.options.autoHide&&this.hideScrollbars()}},{key:"onDragStart",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"y",i=this.axis[e].scrollbar.el,r="y"===e?t.pageY:t.pageX;this.axis[e].dragOffset=r-i.getBoundingClientRect()[this.axis[e].offsetAttr],this.draggedAxis=e,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.onEndDrag)}},{key:"getScrollElement",value:function(){return this.contentEl}},{key:"removeListeners",value:function(){this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),this.contentEl.removeEventListener("scroll",this.onScroll),window.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver.disconnect()}},{key:"unMount",value:function(){this.removeListeners(),this.el.SimpleBar=null}},{key:"isChildNode",value:function(t){return null!==t&&(t===this.el||this.isChildNode(t.parentNode))}},{key:"isWithinBounds",value:function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height}}])&&ve(t.prototype,e),i&&ve(t,i),l}();return er.defaultOptions={autoHide:!0,forceVisible:!1,classNames:{content:"simplebar-content",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},tr&&er.initHtmlApi(),er}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).SimpleBar=e()}(this,function(){"use strict";var n=function(t){return"object"==typeof t?null!==t:"function"==typeof t},O=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t},u=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},d=function(t){return Object(u(t))},e=Math.ceil,i=Math.floor,S=function(t){return isNaN(t=+t)?0:(0<t?i:e)(t)},r=Math.min,k=function(t){return 0<t?r(S(t),9007199254740991):0},t=function(a){return function(t,e){var i,r,n=String(u(t)),o=S(e),s=n.length;return o<0||s<=o?a?"":void 0:(i=n.charCodeAt(o))<55296||56319<i||o+1===s||(r=n.charCodeAt(o+1))<56320||57343<r?a?n.charAt(o):i:a?n.slice(o,o+2):r-56320+(i-55296<<10)+65536}},o=t(!0),A=function(t,e,i){return e+(i?o(t,e).length:1)},s={}.toString,a=function(t){return s.call(t).slice(8,-1)},l="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(t,e){return t(e={exports:{}},e.exports),e.exports}var h,f,v=c(function(t){var e=t.exports={version:"2.6.2"};"number"==typeof __e&&(__e=e)}),b=(v.version,c(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)})),p=c(function(t){var e="__core-js_shared__",i=b[e]||(b[e]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:v.version,mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),y=0,g=Math.random(),m=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++y+g).toString(36))},x=c(function(t){var e=p("wks"),i=b.Symbol,r="function"==typeof i;(t.exports=function(t){return e[t]||(e[t]=r&&i[t]||(r?i:m)("Symbol."+t))}).store=e}),E=x("toStringTag"),w="Arguments"==a(function(){return arguments}()),_=function(t){var e,i,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),E))?i:w?a(e):"Object"==(r=a(e))&&"function"==typeof e.callee?"Arguments":r},M=RegExp.prototype.exec,L=function(t,e){var i=t.exec;if("function"==typeof i){var r=i.call(t,e);if("object"!=typeof r)throw new TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==_(t))throw new TypeError("RegExp#exec called on incompatible receiver");return M.call(t,e)},T=RegExp.prototype.exec,j=String.prototype.replace,R=T,N="lastIndex",W=(h=/a/,f=/b*/g,T.call(h,"a"),T.call(f,"a"),0!==h[N]||0!==f[N]),C=void 0!==/()??/.exec("")[1];(W||C)&&(R=function(t){var e,i,r,n,o=this;return C&&(i=new RegExp("^"+o.source+"$(?!\\s)",function(){var t=O(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}.call(o))),W&&(e=o[N]),r=T.call(o,t),W&&r&&(o[N]=o.global?r.index+r[0].length:e),C&&r&&1<r.length&&j.call(r[0],i,function(){for(n=1;n<arguments.length-2;n++)void 0===arguments[n]&&(r[n]=void 0)}),r});var z=R,D=function(t){try{return!!t()}catch(t){return!0}},V=!D(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),B=b.document,P=n(B)&&n(B.createElement),F=function(t){return P?B.createElement(t):{}},H=!V&&!D(function(){return 7!=Object.defineProperty(F("div"),"a",{get:function(){return 7}}).a}),I=Object.defineProperty,q={f:V?Object.defineProperty:function(t,e,i){if(O(t),e=function(t,e){if(!n(t))return t;var i,r;if(e&&"function"==typeof(i=t.toString)&&!n(r=i.call(t)))return r;if("function"==typeof(i=t.valueOf)&&!n(r=i.call(t)))return r;if(!e&&"function"==typeof(i=t.toString)&&!n(r=i.call(t)))return r;throw TypeError("Can't convert object to primitive value")}(e,!0),O(i),H)try{return I(t,e,i)}catch(t){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(t[e]=i.value),t}},$=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},X=V?function(t,e,i){return q.f(t,e,$(1,i))}:function(t,e,i){return t[e]=i,t},Y={}.hasOwnProperty,G=function(t,e){return Y.call(t,e)},U=c(function(t){var o=m("src"),e="toString",i=Function[e],s=(""+i).split(e);v.inspectSource=function(t){return i.call(t)},(t.exports=function(t,e,i,r){var n="function"==typeof i;n&&(G(i,"name")||X(i,"name",e)),t[e]!==i&&(n&&(G(i,o)||X(i,o,t[e]?""+t[e]:s.join(String(e)))),t===b?t[e]=i:r?t[e]?t[e]=i:X(t,e,i):(delete t[e],X(t,e,i)))})(Function.prototype,e,function(){return"function"==typeof this&&this[o]||i.call(this)})}),J=function(r,n,t){if(function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!")}(r),void 0===n)return r;switch(t){case 1:return function(t){return r.call(n,t)};case 2:return function(t,e){return r.call(n,t,e)};case 3:return function(t,e,i){return r.call(n,t,e,i)}}return function(){return r.apply(n,arguments)}},K="prototype",Q=function(t,e,i){var r,n,o,s,a=t&Q.F,l=t&Q.G,c=t&Q.S,u=t&Q.P,h=t&Q.B,f=l?b:c?b[e]||(b[e]={}):(b[e]||{})[K],d=l?v:v[e]||(v[e]={}),p=d[K]||(d[K]={});for(r in l&&(i=e),i)o=((n=!a&&f&&void 0!==f[r])?f:i)[r],s=h&&n?J(o,b):u&&"function"==typeof o?J(Function.call,o):o,f&&U(f,r,o,t&Q.U),d[r]!=o&&X(d,r,s),u&&p[r]!=o&&(p[r]=o)};b.core=v,Q.F=1,Q.G=2,Q.S=4,Q.P=8,Q.B=16,Q.W=32,Q.U=64,Q.R=128;var Z=Q;Z({target:"RegExp",proto:!0,forced:z!==/./.exec},{exec:z});var tt=x("species"),et=!D(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),it=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var i="ab".split(t);return 2===i.length&&"a"===i[0]&&"b"===i[1]}(),rt=function(i,t,e){var r=x(i),o=!D(function(){var t={};return t[r]=function(){return 7},7!=""[i](t)}),n=o?!D(function(){var t=!1,e=/a/;return e.exec=function(){return t=!0,null},"split"===i&&(e.constructor={},e.constructor[tt]=function(){return e}),e[r](""),!t}):void 0;if(!o||!n||"replace"===i&&!et||"split"===i&&!it){var s=/./[r],a=e(u,r,""[i],function(t,e,i,r,n){return e.exec===z?o&&!n?{done:!0,value:s.call(e,i,r)}:{done:!0,value:t.call(i,e,r)}:{done:!1}}),l=a[0],c=a[1];U(String.prototype,i,l),X(RegExp.prototype,r,2==t?function(t,e){return c.call(t,this,e)}:function(t){return c.call(t,this)})}},nt=Math.max,ot=Math.min,st=Math.floor,at=/\$([$&`']|\d\d?|<[^>]*>)/g,lt=/\$([$&`']|\d\d?)/g;rt("replace",2,function(n,o,E,w){return[function(t,e){var i=n(this),r=null==t?void 0:t[o];return void 0!==r?r.call(t,i,e):E.call(String(i),t,e)},function(t,e){var i=w(E,t,this,e);if(i.done)return i.value;var r=O(t),n=String(this),o="function"==typeof e;o||(e=String(e));var s=r.global;if(s){var a=r.unicode;r.lastIndex=0}for(var l=[];;){var c=L(r,n);if(null===c)break;if(l.push(c),!s)break;""===String(c[0])&&(r.lastIndex=A(n,k(r.lastIndex),a))}for(var u,h="",f=0,d=0;d<l.length;d++){c=l[d];for(var p=String(c[0]),v=nt(ot(S(c.index),n.length),0),b=[],y=1;y<c.length;y++)b.push(void 0===(u=c[y])?u:String(u));var g=c.groups;if(o){var m=[p].concat(b,v,n);void 0!==g&&m.push(g);var x=String(e.apply(void 0,m))}else x=_(p,n,v,b,g,e);f<=v&&(h+=n.slice(f,v)+x,f=v+p.length)}return h+n.slice(f)}];function _(o,s,a,l,c,t){var u=a+o.length,h=l.length,e=lt;return void 0!==c&&(c=d(c),e=at),E.call(t,e,function(t,e){var i;switch(e.charAt(0)){case"$":return"$";case"&":return o;case"`":return s.slice(0,a);case"'":return s.slice(u);case"<":i=c[e.slice(1,-1)];break;default:var r=+e;if(0===r)return t;if(h<r){var n=st(r/10);return 0===n?t:n<=h?void 0===l[n-1]?e.charAt(1):l[n-1]+e.charAt(1):t}i=l[r-1]}return void 0===i?"":i})}});var ct=q.f,ut=Function.prototype,ht=/^\s*function ([^ (]*)/;"name"in ut||V&&ct(ut,"name",{configurable:!0,get:function(){try{return(""+this).match(ht)[1]}catch(t){return""}}}),rt("match",1,function(r,n,c,u){return[function(t){var e=r(this),i=null==t?void 0:t[n];return void 0!==i?i.call(t,e):new RegExp(t)[n](String(e))},function(t){var e=u(c,t,this);if(e.done)return e.value;var i=O(t),r=String(this);if(!i.global)return L(i,r);for(var n,o=i.unicode,s=[],a=i.lastIndex=0;null!==(n=L(i,r));){var l=String(n[0]);""===(s[a]=l)&&(i.lastIndex=A(r,k(i.lastIndex),o)),a++}return 0===a?null:s}]});var ft=x("unscopables"),dt=Array.prototype;null==dt[ft]&&X(dt,ft,{});var pt,vt=function(t){dt[ft][t]=!0},bt=function(t,e){return{value:e,done:!!t}},yt={},gt=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==a(t)?t.split(""):Object(t)},mt=function(t){return gt(u(t))},xt=Math.max,Et=Math.min,wt=p("keys"),_t=function(t){return wt[t]||(wt[t]=m(t))},Ot=(pt=!1,function(t,e,i){var r,n,o,s=mt(t),a=k(s.length),l=(n=a,(r=S(r=i))<0?xt(r+n,0):Et(r,n));if(pt&&e!=e){for(;l<a;)if((o=s[l++])!=o)return!0}else for(;l<a;l++)if((pt||l in s)&&s[l]===e)return pt||l||0;return!pt&&-1}),St=_t("IE_PROTO"),kt="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),At=Object.keys||function(t){return function(t,e){var i,r=mt(t),n=0,o=[];for(i in r)i!=St&&G(r,i)&&o.push(i);for(;e.length>n;)G(r,i=e[n++])&&(~Ot(o,i)||o.push(i));return o}(t,kt)},Mt=V?Object.defineProperties:function(t,e){O(t);for(var i,r=At(e),n=r.length,o=0;o<n;)q.f(t,i=r[o++],e[i]);return t},Lt=b.document,Tt=Lt&&Lt.documentElement,jt=_t("IE_PROTO"),Rt=function(){},Nt="prototype",Wt=function(){var t,e=F("iframe"),i=kt.length;for(e.style.display="none",Tt.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),Wt=t.F;i--;)delete Wt[Nt][kt[i]];return Wt()},Ct=Object.create||function(t,e){var i;return null!==t?(Rt[Nt]=O(t),i=new Rt,Rt[Nt]=null,i[jt]=t):i=Wt(),void 0===e?i:Mt(i,e)},zt=q.f,Dt=x("toStringTag"),Vt=function(t,e,i){t&&!G(t=i?t:t.prototype,Dt)&&zt(t,Dt,{configurable:!0,value:e})},Bt={};X(Bt,x("iterator"),function(){return this});var Pt=_t("IE_PROTO"),Ft=Object.prototype,Ht=Object.getPrototypeOf||function(t){return t=d(t),G(t,Pt)?t[Pt]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Ft:null},It=x("iterator"),qt=!([].keys&&"next"in[].keys()),$t="values",Xt=function(){return this},Yt=function(t,e,i,r,n,o,s){var a,l,c;l=e,c=r,(a=i).prototype=Ct(Bt,{next:$(1,c)}),Vt(a,l+" Iterator");var u,h,f,d=function(t){if(!qt&&t in y)return y[t];switch(t){case"keys":case $t:return function(){return new i(this,t)}}return function(){return new i(this,t)}},p=e+" Iterator",v=n==$t,b=!1,y=t.prototype,g=y[It]||y["@@iterator"]||n&&y[n],m=g||d(n),x=n?v?d("entries"):m:void 0,E="Array"==e&&y.entries||g;if(E&&(f=Ht(E.call(new t)))!==Object.prototype&&f.next&&(Vt(f,p,!0),"function"!=typeof f[It]&&X(f,It,Xt)),v&&g&&g.name!==$t&&(b=!0,m=function(){return g.call(this)}),(qt||b||!y[It])&&X(y,It,m),yt[e]=m,yt[p]=Xt,n)if(u={values:v?m:d($t),keys:o?m:d("keys"),entries:x},s)for(h in u)h in y||U(y,h,u[h]);else Z(Z.P+Z.F*(qt||b),e,u);return u},Gt=Yt(Array,"Array",function(t,e){this._t=mt(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,i=this._i++;return!t||i>=t.length?(this._t=void 0,bt(1)):bt(0,"keys"==e?i:"values"==e?t[i]:[i,t[i]])},"values");yt.Arguments=yt.Array,vt("keys"),vt("values"),vt("entries");for(var Ut=x("iterator"),Jt=x("toStringTag"),Kt=yt.Array,Qt={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},Zt=At(Qt),te=0;te<Zt.length;te++){var ee,ie=Zt[te],re=Qt[ie],ne=b[ie],oe=ne&&ne.prototype;if(oe&&(oe[Ut]||X(oe,Ut,Kt),oe[Jt]||X(oe,Jt,ie),yt[ie]=Kt,re))for(ee in Gt)oe[ee]||U(oe,ee,Gt[ee],!0)}var se=t(!0);Yt(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,i=this._i;return i>=e.length?{value:void 0,done:!0}:(t=se(e,i),this._i+=t.length,{value:t,done:!1})});var ae=function(e,t,i,r){try{return r?t(O(i)[0],i[1]):t(i)}catch(t){var n=e.return;throw void 0!==n&&O(n.call(e)),t}},le=x("iterator"),ce=Array.prototype,ue=function(t,e,i){e in t?q.f(t,e,$(0,i)):t[e]=i},he=x("iterator"),fe=v.getIteratorMethod=function(t){if(null!=t)return t[he]||t["@@iterator"]||yt[_(t)]},de=x("iterator"),pe=!1;try{[7][de]().return=function(){pe=!0}}catch(t){}function ve(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function be(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{},e=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(o).filter(function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable}))),e.forEach(function(t){var e,i,r;e=n,r=o[i=t],i in e?Object.defineProperty(e,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[i]=r})}return n}Z(Z.S+Z.F*!function(t,e){if(!e&&!pe)return!1;var i=!1;try{var r=[7],n=r[de]();n.next=function(){return{done:i=!0}},r[de]=function(){return n},t(r)}catch(t){}return i}(function(t){}),"Array",{from:function(t){var e,i,r,n,o,s=d(t),a="function"==typeof this?this:Array,l=arguments.length,c=1<l?arguments[1]:void 0,u=void 0!==c,h=0,f=fe(s);if(u&&(c=J(c,2<l?arguments[2]:void 0,2)),null!=f&&(a!=Array||(void 0===(o=f)||yt.Array!==o&&ce[le]!==o)))for(n=f.call(s),i=new a;!(r=n.next()).done;h++)ue(i,h,u?ae(n,c,[r.value,h],!0):r.value);else for(i=new a(e=k(s.length));h<e;h++)ue(i,h,u?c(s[h],h):s[h]);return i.length=h,i}});var ye=c(function(t,e){t.exports=function(){if("undefined"==typeof document)return 0;var t,e=document.body,i=document.createElement("div"),r=i.style;return r.position="absolute",r.top=r.left="-9999px",r.width=r.height="100px",r.overflow="scroll",e.appendChild(i),t=i.offsetWidth-i.clientWidth,e.removeChild(i),t}}),ge="Expected a function",me=NaN,xe="[object Symbol]",Ee=/^\s+|\s+$/g,we=/^[-+]0x[0-9a-f]+$/i,_e=/^0b[01]+$/i,Oe=/^0o[0-7]+$/i,Se=parseInt,ke="object"==typeof l&&l&&l.Object===Object&&l,Ae="object"==typeof self&&self&&self.Object===Object&&self,Me=ke||Ae||Function("return this")(),Le=Object.prototype.toString,Te=Math.max,je=Math.min,Re=function(){return Me.Date.now()};function Ne(r,n,t){var o,s,a,l,c,u,h=0,f=!1,d=!1,e=!0;if("function"!=typeof r)throw new TypeError(ge);function p(t){var e=o,i=s;return o=s=void 0,h=t,l=r.apply(i,e)}function v(t){var e=t-u;return void 0===u||n<=e||e<0||d&&a<=t-h}function b(){var t,e,i=Re();if(v(i))return y(i);c=setTimeout(b,(e=n-((t=i)-u),d?je(e,a-(t-h)):e))}function y(t){return c=void 0,e&&o?p(t):(o=s=void 0,l)}function i(){var t,e=Re(),i=v(e);if(o=arguments,s=this,u=e,i){if(void 0===c)return h=t=u,c=setTimeout(b,n),f?p(t):l;if(d)return c=setTimeout(b,n),p(u)}return void 0===c&&(c=setTimeout(b,n)),l}return n=Ce(n)||0,We(t)&&(f=!!t.leading,a=(d="maxWait"in t)?Te(Ce(t.maxWait)||0,n):a,e="trailing"in t?!!t.trailing:e),i.cancel=function(){void 0!==c&&clearTimeout(c),o=u=s=c=void(h=0)},i.flush=function(){return void 0===c?l:y(Re())},i}function We(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Ce(t){if("number"==typeof t)return t;if("symbol"==typeof(e=t)||(i=e)&&"object"==typeof i&&Le.call(e)==xe)return me;var e,i;if(We(t)){var r="function"==typeof t.valueOf?t.valueOf():t;t=We(r)?r+"":r}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Ee,"");var n=_e.test(t);return n||Oe.test(t)?Se(t.slice(2),n?2:8):we.test(t)?me:+t}var ze=function(t,e,i){var r=!0,n=!0;if("function"!=typeof t)throw new TypeError(ge);return We(i)&&(r="leading"in i?!!i.leading:r,n="trailing"in i?!!i.trailing:n),Ne(t,e,{leading:r,maxWait:e,trailing:n})},De=NaN,Ve="[object Symbol]",Be=/^\s+|\s+$/g,Pe=/^[-+]0x[0-9a-f]+$/i,Fe=/^0b[01]+$/i,He=/^0o[0-7]+$/i,Ie=parseInt,qe="object"==typeof l&&l&&l.Object===Object&&l,$e="object"==typeof self&&self&&self.Object===Object&&self,Xe=qe||$e||Function("return this")(),Ye=Object.prototype.toString,Ge=Math.max,Ue=Math.min,Je=function(){return Xe.Date.now()};function Ke(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Qe(t){if("number"==typeof t)return t;if("symbol"==typeof(e=t)||(i=e)&&"object"==typeof i&&Ye.call(e)==Ve)return De;var e,i;if(Ke(t)){var r="function"==typeof t.valueOf?t.valueOf():t;t=Ke(r)?r+"":r}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Be,"");var n=Fe.test(t);return n||He.test(t)?Ie(t.slice(2),n?2:8):Pe.test(t)?De:+t}var Ze=function(r,n,t){var o,s,a,l,c,u,h=0,f=!1,d=!1,e=!0;if("function"!=typeof r)throw new TypeError("Expected a function");function p(t){var e=o,i=s;return o=s=void 0,h=t,l=r.apply(i,e)}function v(t){var e=t-u;return void 0===u||n<=e||e<0||d&&a<=t-h}function b(){var t,e,i=Je();if(v(i))return y(i);c=setTimeout(b,(e=n-((t=i)-u),d?Ue(e,a-(t-h)):e))}function y(t){return c=void 0,e&&o?p(t):(o=s=void 0,l)}function i(){var t,e=Je(),i=v(e);if(o=arguments,s=this,u=e,i){if(void 0===c)return h=t=u,c=setTimeout(b,n),f?p(t):l;if(d)return c=setTimeout(b,n),p(u)}return void 0===c&&(c=setTimeout(b,n)),l}return n=Qe(n)||0,Ke(t)&&(f=!!t.leading,a=(d="maxWait"in t)?Ge(Qe(t.maxWait)||0,n):a,e="trailing"in t?!!t.trailing:e),i.cancel=function(){void 0!==c&&clearTimeout(c),o=u=s=c=void(h=0)},i.flush=function(){return void 0===c?l:y(Je())},i},ti="Expected a function",ei="__lodash_hash_undefined__",ii="[object Function]",ri="[object GeneratorFunction]",ni=/^\[object .+?Constructor\]$/,oi="object"==typeof l&&l&&l.Object===Object&&l,si="object"==typeof self&&self&&self.Object===Object&&self,ai=oi||si||Function("return this")();var li,ci=Array.prototype,ui=Function.prototype,hi=Object.prototype,fi=ai["__core-js_shared__"],di=(li=/[^.]+$/.exec(fi&&fi.keys&&fi.keys.IE_PROTO||""))?"Symbol(src)_1."+li:"",pi=ui.toString,vi=hi.hasOwnProperty,bi=hi.toString,yi=RegExp("^"+pi.call(vi).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),gi=ci.splice,mi=Ai(ai,"Map"),xi=Ai(Object,"create");function Ei(t){var e=-1,i=t?t.length:0;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}function wi(t){var e=-1,i=t?t.length:0;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}function _i(t){var e=-1,i=t?t.length:0;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}function Oi(t,e){for(var i,r,n=t.length;n--;)if((i=t[n][0])===(r=e)||i!=i&&r!=r)return n;return-1}function Si(t){return!(!Li(t)||(e=t,di&&di in e))&&((r=Li(i=t)?bi.call(i):"")==ii||r==ri||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?yi:ni).test(function(t){if(null!=t){try{return pi.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e,i,r}function ki(t,e){var i,r,n=t.__data__;return("string"==(r=typeof(i=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?n["string"==typeof e?"string":"hash"]:n.map}function Ai(t,e){var i,r,n=(r=e,null==(i=t)?void 0:i[r]);return Si(n)?n:void 0}function Mi(n,o){if("function"!=typeof n||o&&"function"!=typeof o)throw new TypeError(ti);var s=function(){var t=arguments,e=o?o.apply(this,t):t[0],i=s.cache;if(i.has(e))return i.get(e);var r=n.apply(this,t);return s.cache=i.set(e,r),r};return s.cache=new(Mi.Cache||_i),s}function Li(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}Ei.prototype.clear=function(){this.__data__=xi?xi(null):{}},Ei.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},Ei.prototype.get=function(t){var e=this.__data__;if(xi){var i=e[t];return i===ei?void 0:i}return vi.call(e,t)?e[t]:void 0},Ei.prototype.has=function(t){var e=this.__data__;return xi?void 0!==e[t]:vi.call(e,t)},Ei.prototype.set=function(t,e){return this.__data__[t]=xi&&void 0===e?ei:e,this},wi.prototype.clear=function(){this.__data__=[]},wi.prototype.delete=function(t){var e=this.__data__,i=Oi(e,t);return!(i<0||(i==e.length-1?e.pop():gi.call(e,i,1),0))},wi.prototype.get=function(t){var e=this.__data__,i=Oi(e,t);return i<0?void 0:e[i][1]},wi.prototype.has=function(t){return-1<Oi(this.__data__,t)},wi.prototype.set=function(t,e){var i=this.__data__,r=Oi(i,t);return r<0?i.push([t,e]):i[r][1]=e,this},_i.prototype.clear=function(){this.__data__={hash:new Ei,map:new(mi||wi),string:new Ei}},_i.prototype.delete=function(t){return ki(this,t).delete(t)},_i.prototype.get=function(t){return ki(this,t).get(t)},_i.prototype.has=function(t){return ki(this,t).has(t)},_i.prototype.set=function(t,e){return ki(this,t).set(t,e),this},Mi.Cache=_i;var Ti=Mi,ji=function(){if("undefined"!=typeof Map)return Map;function r(t,i){var r=-1;return t.some(function(t,e){return t[0]===i&&(r=e,!0)}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var e=r(this.__entries__,t),i=this.__entries__[e];return i&&i[1]},t.prototype.set=function(t,e){var i=r(this.__entries__,t);~i?this.__entries__[i][1]=e:this.__entries__.push([t,e])},t.prototype.delete=function(t){var e=this.__entries__,i=r(e,t);~i&&e.splice(i,1)},t.prototype.has=function(t){return!!~r(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var i=0,r=this.__entries__;i<r.length;i++){var n=r[i];t.call(e,n[1],n[0])}},t}()}(),Ri="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Ni="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Wi="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Ni):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)},Ci=2;var zi=["top","right","bottom","left","width","height","size","weight"],Di="undefined"!=typeof MutationObserver,Vi=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var i=!1,r=!1,n=0;function o(){i&&(i=!1,t()),r&&a()}function s(){Wi(o)}function a(){var t=Date.now();if(i){if(t-n<Ci)return;r=!0}else r=!(i=!0),setTimeout(s,e);n=t}return a}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,i=e.indexOf(t);~i&&e.splice(i,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return t.forEach(function(t){return t.broadcastActive()}),0<t.length},t.prototype.connect_=function(){Ri&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Di?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){Ri&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,i=void 0===e?"":e;zi.some(function(t){return!!~i.indexOf(t)})&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),Bi=function(t,e){for(var i=0,r=Object.keys(e);i<r.length;i++){var n=r[i];Object.defineProperty(t,n,{value:e[n],enumerable:!1,writable:!1,configurable:!0})}return t},Pi=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Ni},Fi=Yi(0,0,0,0);function Hi(t){return parseFloat(t)||0}function Ii(i){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return t.reduce(function(t,e){return t+Hi(i["border-"+e+"-width"])},0)}function qi(t){var e=t.clientWidth,i=t.clientHeight;if(!e&&!i)return Fi;var r,n=Pi(t).getComputedStyle(t),o=function(t){for(var e={},i=0,r=["top","right","bottom","left"];i<r.length;i++){var n=r[i],o=t["padding-"+n];e[n]=Hi(o)}return e}(n),s=o.left+o.right,a=o.top+o.bottom,l=Hi(n.width),c=Hi(n.height);if("border-box"===n.boxSizing&&(Math.round(l+s)!==e&&(l-=Ii(n,"left","right")+s),Math.round(c+a)!==i&&(c-=Ii(n,"top","bottom")+a)),(r=t)!==Pi(r).document.documentElement){var u=Math.round(l+s)-e,h=Math.round(c+a)-i;1!==Math.abs(u)&&(l-=u),1!==Math.abs(h)&&(c-=h)}return Yi(o.left,o.top,l,c)}var $i="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Pi(t).SVGGraphicsElement}:function(t){return t instanceof Pi(t).SVGElement&&"function"==typeof t.getBBox};function Xi(t){return Ri?$i(t)?Yi(0,0,(e=t.getBBox()).width,e.height):qi(t):Fi;var e}function Yi(t,e,i,r){return{x:t,y:e,width:i,height:r}}var Gi=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Yi(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=Xi(this.target);return(this.contentRect_=t).width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),Ui=function(t,e){var i,r,n,o,s,a,l,c=(r=(i=e).x,n=i.y,o=i.width,s=i.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(a.prototype),Bi(l,{x:r,y:n,width:o,height:s,top:n,right:r+o,bottom:s+n,left:r}),l);Bi(this,{target:t,contentRect:c})},Ji=function(){function t(t,e,i){if(this.activeObservations_=[],this.observations_=new ji,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=i}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Pi(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Gi(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Pi(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(t){return new Ui(t.target,t.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return 0<this.activeObservations_.length},t}(),Ki="undefined"!=typeof WeakMap?new WeakMap:new ji,Qi=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var i=Vi.getInstance(),r=new Ji(e,i,this);Ki.set(this,r)};["observe","unobserve","disconnect"].forEach(function(e){Qi.prototype[e]=function(){var t;return(t=Ki.get(this))[e].apply(t,arguments)}});var Zi=void 0!==Ni.ResizeObserver?Ni.ResizeObserver:Qi,tr=!("undefined"==typeof window||!window.document||!window.document.createElement),er=function(){function l(t,e){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),this.onScroll=function(){o.scrollXTicking||(window.requestAnimationFrame(o.scrollX),o.scrollXTicking=!0),o.scrollYTicking||(window.requestAnimationFrame(o.scrollY),o.scrollYTicking=!0)},this.scrollX=function(){o.axis.x.isOverflowing&&(o.showScrollbar("x"),o.positionScrollbar("x")),o.scrollXTicking=!1},this.scrollY=function(){o.axis.y.isOverflowing&&(o.showScrollbar("y"),o.positionScrollbar("y")),o.scrollYTicking=!1},this.onMouseEnter=function(){o.showScrollbar("x"),o.showScrollbar("y")},this.onMouseMove=function(t){o.mouseX=t.clientX,o.mouseY=t.clientY,(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&o.onMouseMoveForAxis("x"),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&o.onMouseMoveForAxis("y")},this.onMouseLeave=function(){o.onMouseMove.cancel(),(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&o.onMouseLeaveForAxis("x"),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&o.onMouseLeaveForAxis("y"),o.mouseX=-1,o.mouseY=-1},this.onWindowResize=function(){o.scrollbarWidth=ye(),o.hideNativeScrollbar()},this.hideScrollbars=function(){o.axis.x.track.rect=o.axis.x.track.el.getBoundingClientRect(),o.axis.y.track.rect=o.axis.y.track.el.getBoundingClientRect(),o.isWithinBounds(o.axis.y.track.rect)||(o.axis.y.scrollbar.el.classList.remove(o.classNames.visible),o.axis.y.isVisible=!1),o.isWithinBounds(o.axis.x.track.rect)||(o.axis.x.scrollbar.el.classList.remove(o.classNames.visible),o.axis.x.isVisible=!1)},this.onPointerEvent=function(t){var e,i;o.axis.x.scrollbar.rect=o.axis.x.scrollbar.el.getBoundingClientRect(),o.axis.y.scrollbar.rect=o.axis.y.scrollbar.el.getBoundingClientRect(),(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&(i=o.isWithinBounds(o.axis.x.scrollbar.rect)),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&(e=o.isWithinBounds(o.axis.y.scrollbar.rect)),(e||i)&&(t.preventDefault(),t.stopPropagation(),"mousedown"===t.type&&(e&&o.onDragStart(t,"y"),i&&o.onDragStart(t,"x")))},this.drag=function(t){var e=o.axis[o.draggedAxis].track,i=e.rect[o.axis[o.draggedAxis].sizeAttr],r=o.axis[o.draggedAxis].scrollbar;t.preventDefault(),t.stopPropagation();var n=(("y"===o.draggedAxis?t.pageY:t.pageX)-e.rect[o.axis[o.draggedAxis].offsetAttr]-o.axis[o.draggedAxis].dragOffset)/e.rect[o.axis[o.draggedAxis].sizeAttr]*o.contentEl[o.axis[o.draggedAxis].scrollSizeAttr];"x"===o.draggedAxis&&(n=o.isRtl&&l.getRtlHelpers().isRtlScrollbarInverted?n-(i+r.size):n,n=o.isRtl&&l.getRtlHelpers().isRtlScrollingInverted?-n:n),o.contentEl[o.axis[o.draggedAxis].scrollOffsetAttr]=n},this.onEndDrag=function(t){t.preventDefault(),t.stopPropagation(),document.removeEventListener("mousemove",o.drag),document.removeEventListener("mouseup",o.onEndDrag)},this.el=t,this.flashTimeout,this.contentEl,this.offsetEl,this.maskEl,this.globalObserver,this.mutationObserver,this.resizeObserver,this.scrollbarWidth,this.minScrollbarWidth=20,this.options=be({},l.defaultOptions,e),this.classNames=be({},l.defaultOptions.classNames,this.options.classNames),this.isRtl,this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.recalculate=ze(this.recalculate.bind(this),64),this.onMouseMove=ze(this.onMouseMove.bind(this),64),this.hideScrollbars=Ze(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=Ze(this.onWindowResize.bind(this),64,{leading:!0}),l.getRtlHelpers=Ti(l.getRtlHelpers),this.getContentElement=this.getScrollElement,this.init()}var t,e,i;return t=l,i=[{key:"getRtlHelpers",value:function(){var t=document.createElement("div");t.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var e=t.firstElementChild;document.body.appendChild(e);var i=e.firstElementChild;e.scrollLeft=0;var r=l.getOffset(e),n=l.getOffset(i);e.scrollLeft=999;var o=l.getOffset(i);return{isRtlScrollingInverted:r.left!==n.left&&n.left-o.left!=0,isRtlScrollbarInverted:r.left!==n.left}}},{key:"initHtmlApi",value:function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(function(t){t.forEach(function(t){Array.from(t.addedNodes).forEach(function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?!t.SimpleBar&&new l(t,l.getElOptions(t)):Array.from(t.querySelectorAll("[data-simplebar]")).forEach(function(t){!t.SimpleBar&&new l(t,l.getElOptions(t))}))}),Array.from(t.removedNodes).forEach(function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?t.SimpleBar&&t.SimpleBar.unMount():Array.from(t.querySelectorAll("[data-simplebar]")).forEach(function(t){t.SimpleBar&&t.SimpleBar.unMount()}))})})}),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))}},{key:"getElOptions",value:function(t){return Array.from(t.attributes).reduce(function(t,e){var i=e.name.match(/data-simplebar-(.+)/);if(i){var r=i[1].replace(/\W+(.)/g,function(t,e){return e.toUpperCase()});switch(e.value){case"true":t[r]=!0;break;case"false":t[r]=!1;break;case void 0:t[r]=!0;break;default:t[r]=e.value}}return t},{})}},{key:"removeObserver",value:function(){this.globalObserver.disconnect()}},{key:"initDOMLoadedElements",value:function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.from(document.querySelectorAll("[data-simplebar]")).forEach(function(t){t.SimpleBar||new l(t,l.getElOptions(t))})}},{key:"getOffset",value:function(t){var e=t.getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft)}}}],(e=[{key:"init",value:function(){this.el.SimpleBar=this,tr&&(this.initDOM(),this.scrollbarWidth=ye(),this.recalculate(),this.initListeners())}},{key:"initDOM",value:function(){var e=this;if(Array.from(this.el.children).filter(function(t){return t.classList.contains(e.classNames.wrapper)}).length)this.wrapperEl=this.el.querySelector(".".concat(this.classNames.wrapper)),this.contentEl=this.el.querySelector(".".concat(this.classNames.content)),this.offsetEl=this.el.querySelector(".".concat(this.classNames.offset)),this.maskEl=this.el.querySelector(".".concat(this.classNames.mask)),this.placeholderEl=this.el.querySelector(".".concat(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(".".concat(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(".".concat(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.el.querySelector(".".concat(this.classNames.track,".").concat(this.classNames.horizontal)),this.axis.y.track.el=this.el.querySelector(".".concat(this.classNames.track,".").concat(this.classNames.vertical));else{for(this.wrapperEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentEl.classList.add(this.classNames.content),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.offsetEl.appendChild(this.contentEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var t=document.createElement("div"),i=document.createElement("div");t.classList.add(this.classNames.track),i.classList.add(this.classNames.scrollbar),this.options.autoHide||i.classList.add(this.classNames.visible),t.appendChild(i),this.axis.x.track.el=t.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=t.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector(".".concat(this.classNames.scrollbar)),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector(".".concat(this.classNames.scrollbar)),this.el.setAttribute("data-simplebar","init")}},{key:"initListeners",value:function(){var e=this;this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick","touchstart","touchend","touchmove"].forEach(function(t){e.el.addEventListener(t,e.onPointerEvent,!0)}),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentEl.addEventListener("scroll",this.onScroll),window.addEventListener("resize",this.onWindowResize),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver(function(t){t.forEach(function(t){(t.target===e.el||!e.isChildNode(t.target)||t.addedNodes.length||t.removedNodes.length)&&e.recalculate()})}),this.mutationObserver.observe(this.el,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this.resizeObserver=new Zi(this.recalculate),this.resizeObserver.observe(this.el)}},{key:"recalculate",value:function(){var t=this.heightAutoObserverEl.offsetHeight<=1;this.elStyles=window.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction,this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.contentEl.style.height=t?"auto":"100%",this.placeholderEl.style.width="".concat(this.contentEl.scrollWidth,"px"),this.placeholderEl.style.height="".concat(this.contentEl.scrollHeight,"px"),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft),this.axis.x.track.rect=this.axis.x.track.el.getBoundingClientRect(),this.axis.y.track.rect=this.axis.y.track.el.getBoundingClientRect(),this.axis.x.isOverflowing=(this.scrollbarWidth?this.contentEl.scrollWidth:this.contentEl.scrollWidth-this.minScrollbarWidth)>Math.ceil(this.axis.x.track.rect.width),this.axis.y.isOverflowing=(this.scrollbarWidth?this.contentEl.scrollHeight:this.contentEl.scrollHeight-this.minScrollbarWidth)>Math.ceil(this.axis.y.track.rect.height),this.axis.x.isOverflowing="hidden"!==this.elStyles.overflowX&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==this.elStyles.overflowY&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px"),this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px"),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y"),this.hideNativeScrollbar()}},{key:"getScrollbarSize",value:function(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"y",i=this.scrollbarWidth?this.contentEl[this.axis[e].scrollSizeAttr]:this.contentEl[this.axis[e].scrollSizeAttr]-this.minScrollbarWidth,r=this.axis[e].track.rect[this.axis[e].sizeAttr];if(this.axis[e].isOverflowing){var n=r/i;return t=Math.max(~~(n*r),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(t=Math.min(t,this.options.scrollbarMaxSize)),t}}},{key:"positionScrollbar",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"y",e=this.contentEl[this.axis[t].scrollSizeAttr],i=this.axis[t].track.rect[this.axis[t].sizeAttr],r=parseInt(this.elStyles[this.axis[t].sizeAttr],10),n=this.axis[t].scrollbar,o=this.contentEl[this.axis[t].scrollOffsetAttr],s=(o="x"===t&&this.isRtl&&l.getRtlHelpers().isRtlScrollingInverted?-o:o)/(e-r),a=~~((i-n.size)*s);a="x"===t&&this.isRtl&&l.getRtlHelpers().isRtlScrollbarInverted?a+(i-n.size):a,n.el.style.transform="x"===t?"translate3d(".concat(a,"px, 0, 0)"):"translate3d(0, ".concat(a,"px, 0)")}},{key:"toggleTrackVisibility",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"y",e=this.axis[t].track.el,i=this.axis[t].scrollbar.el;this.axis[t].isOverflowing||this.axis[t].forceVisible?(e.style.visibility="visible",this.contentEl.style[this.axis[t].overflowAttr]="scroll"):(e.style.visibility="hidden",this.contentEl.style[this.axis[t].overflowAttr]="hidden"),this.axis[t].isOverflowing?i.style.visibility="visible":i.style.visibility="hidden"}},{key:"hideNativeScrollbar",value:function(){if(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth||this.minScrollbarWidth,"px"):0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth||this.minScrollbarWidth,"px"):0,!this.scrollbarWidth){var t=[this.isRtl?"paddingLeft":"paddingRight"];this.contentEl.style[t]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"calc(".concat(this.elStyles[t]," + ").concat(this.minScrollbarWidth,"px)"):this.elStyles[t],this.contentEl.style.paddingBottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"calc(".concat(this.elStyles.paddingBottom," + ").concat(this.minScrollbarWidth,"px)"):this.elStyles.paddingBottom}}},{key:"onMouseMoveForAxis",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"y";this.axis[t].track.rect=this.axis[t].track.el.getBoundingClientRect(),this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[t].scrollbar.rect)?this.axis[t].scrollbar.el.classList.add(this.classNames.hover):this.axis[t].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[t].track.rect)?(this.showScrollbar(t),this.axis[t].track.el.classList.add(this.classNames.hover)):this.axis[t].track.el.classList.remove(this.classNames.hover)}},{key:"onMouseLeaveForAxis",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"y";this.axis[t].track.el.classList.remove(this.classNames.hover),this.axis[t].scrollbar.el.classList.remove(this.classNames.hover)}},{key:"showScrollbar",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"y",e=this.axis[t].scrollbar.el;this.axis[t].isVisible||(e.classList.add(this.classNames.visible),this.axis[t].isVisible=!0),this.options.autoHide&&this.hideScrollbars()}},{key:"onDragStart",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"y",i=this.axis[e].scrollbar.el,r="y"===e?t.pageY:t.pageX;this.axis[e].dragOffset=r-i.getBoundingClientRect()[this.axis[e].offsetAttr],this.draggedAxis=e,document.addEventListener("mousemove",this.drag),document.addEventListener("mouseup",this.onEndDrag)}},{key:"getScrollElement",value:function(){return this.contentEl}},{key:"removeListeners",value:function(){var e=this;this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick","touchstart","touchend","touchmove"].forEach(function(t){e.el.removeEventListener(t,e.onPointerEvent)}),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentEl.removeEventListener("scroll",this.onScroll),window.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()}},{key:"unMount",value:function(){this.removeListeners(),this.el.SimpleBar=null}},{key:"isChildNode",value:function(t){return null!==t&&(t===this.el||this.isChildNode(t.parentNode))}},{key:"isWithinBounds",value:function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height}}])&&ve(t.prototype,e),i&&ve(t,i),l}();return er.defaultOptions={autoHide:!0,forceVisible:!1,classNames:{content:"simplebar-content",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},tr&&er.initHtmlApi(),er}); |
{ | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"name": "simplebar", | ||
@@ -41,3 +41,3 @@ "title": "SimpleBar.js", | ||
}, | ||
"gitHead": "598b2619f10d2a60183d6b6ceaf9575dd26184d5" | ||
"gitHead": "0016518f0922c22adb49a2dc0d61e6ce29e398b9" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
293385
0.74%5054
0.4%