simplebar
Advanced tools
Comparing version 6.0.0-beta.5 to 6.0.0-beta.6
@@ -15,1 +15,6 @@ ## 6.0.0 | ||
`.simplebar-scrollable`. | ||
- Scrollbar recalculations are now throttled with RAQ instead of Lodash's throttle function, which prevents stuttering on animations (#507) | ||
### Bug fixes | ||
- Prevent click on track to be triggered on touch events |
/** | ||
* SimpleBar.js - v6.0.0-beta.5 | ||
* SimpleBar.js - v6.0.0-beta.6 | ||
* 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 t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e,i){return t(i={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&i.path)}},i.exports),i.exports}var i=function(t){return t&&t.Math==Math&&t},r=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||Function("return this")(),s=function(t){try{return!!t()}catch(t){return!0}},n=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),o={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,a={f:l&&!o.call({1:2},1)?function(t){var e=l(this,t);return!!e&&e.enumerable}:o},c=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},h={}.toString,u=function(t){return h.call(t).slice(8,-1)},f="".split,d=s((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==u(t)?f.call(t,""):Object(t)}:Object,p=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},v=function(t){return d(p(t))},g=function(t){return"object"==typeof t?null!==t:"function"==typeof t},m=function(t,e){if(!g(t))return t;var i,r;if(e&&"function"==typeof(i=t.toString)&&!g(r=i.call(t)))return r;if("function"==typeof(i=t.valueOf)&&!g(r=i.call(t)))return r;if(!e&&"function"==typeof(i=t.toString)&&!g(r=i.call(t)))return r;throw TypeError("Can't convert object to primitive value")},y={}.hasOwnProperty,b=function(t,e){return y.call(t,e)},x=r.document,E=g(x)&&g(x.createElement),S=!n&&!s((function(){return 7!=Object.defineProperty((t="div",E?x.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),w=Object.getOwnPropertyDescriptor,O={f:n?w:function(t,e){if(t=v(t),e=m(e,!0),S)try{return w(t,e)}catch(t){}if(b(t,e))return c(!a.f.call(t,e),t[e])}},A=function(t){if(!g(t))throw TypeError(String(t)+" is not an object");return t},L=Object.defineProperty,k={f:n?L:function(t,e,i){if(A(t),e=m(e,!0),A(i),S)try{return L(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}},_=n?function(t,e,i){return k.f(t,e,c(1,i))}:function(t,e,i){return t[e]=i,t},M=function(t,e){try{_(r,t,e)}catch(i){r[t]=e}return e},C=r["__core-js_shared__"]||M("__core-js_shared__",{}),N=Function.toString;"function"!=typeof C.inspectSource&&(C.inspectSource=function(t){return N.call(t)});var T,z,R,W,P=C.inspectSource,j=r.WeakMap,D="function"==typeof j&&/native code/.test(P(j)),$=e((function(t){(t.exports=function(t,e){return C[t]||(C[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),I=0,V=Math.random(),F=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++I+V).toString(36)},B=$("keys"),H={},q=r.WeakMap;if(D){var Y=new q,X=Y.get,U=Y.has,G=Y.set;T=function(t,e){return G.call(Y,t,e),e},z=function(t){return X.call(Y,t)||{}},R=function(t){return U.call(Y,t)}}else{var K=B[W="state"]||(B[W]=F(W));H[K]=!0,T=function(t,e){return _(t,K,e),e},z=function(t){return b(t,K)?t[K]:{}},R=function(t){return b(t,K)}}var Z={set:T,get:z,has:R,enforce:function(t){return R(t)?z(t):T(t,{})},getterFor:function(t){return function(e){var i;if(!g(e)||(i=z(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return i}}},J=e((function(t){var e=Z.get,i=Z.enforce,s=String(String).split("String");(t.exports=function(t,e,n,o){var l=!!o&&!!o.unsafe,a=!!o&&!!o.enumerable,c=!!o&&!!o.noTargetGet;"function"==typeof n&&("string"!=typeof e||b(n,"name")||_(n,"name",e),i(n).source=s.join("string"==typeof e?e:"")),t!==r?(l?!c&&t[e]&&(a=!0):delete t[e],a?t[e]=n:_(t,e,n)):a?t[e]=n:M(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||P(this)}))})),Q=r,tt=function(t){return"function"==typeof t?t:void 0},et=Math.ceil,it=Math.floor,rt=function(t){return isNaN(t=+t)?0:(t>0?it:et)(t)},st=Math.min,nt=function(t){return t>0?st(rt(t),9007199254740991):0},ot=Math.max,lt=Math.min,at=function(t){return function(e,i,r){var s,n=v(e),o=nt(n.length),l=function(t,e){var i=rt(t);return i<0?ot(i+e,0):lt(i,e)}(r,o);if(t&&i!=i){for(;o>l;)if((s=n[l++])!=s)return!0}else for(;o>l;l++)if((t||l in n)&&n[l]===i)return t||l||0;return!t&&-1}},ct={includes:at(!0),indexOf:at(!1)}.indexOf,ht=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),ut={f:Object.getOwnPropertyNames||function(t){return function(t,e){var i,r=v(t),s=0,n=[];for(i in r)!b(H,i)&&b(r,i)&&n.push(i);for(;e.length>s;)b(r,i=e[s++])&&(~ct(n,i)||n.push(i));return n}(t,ht)}},ft={f:Object.getOwnPropertySymbols},dt=function(t,e){return arguments.length<2?tt(Q[t])||tt(r[t]):Q[t]&&Q[t][e]||r[t]&&r[t][e]}("Reflect","ownKeys")||function(t){var e=ut.f(A(t)),i=ft.f;return i?e.concat(i(t)):e},pt=function(t,e){for(var i=dt(e),r=k.f,s=O.f,n=0;n<i.length;n++){var o=i[n];b(t,o)||r(t,o,s(e,o))}},vt=/#|\.prototype\./,gt=function(t,e){var i=yt[mt(t)];return i==xt||i!=bt&&("function"==typeof e?s(e):!!e)},mt=gt.normalize=function(t){return String(t).replace(vt,".").toLowerCase()},yt=gt.data={},bt=gt.NATIVE="N",xt=gt.POLYFILL="P",Et=gt,St=O.f,wt=function(t,e){var i,s,n,o,l,a=t.target,c=t.global,h=t.stat;if(i=c?r:h?r[a]||M(a,{}):(r[a]||{}).prototype)for(s in e){if(o=e[s],n=t.noTargetGet?(l=St(i,s))&&l.value:i[s],!Et(c?s:a+(h?".":"#")+s,t.forced)&&void 0!==n){if(typeof o==typeof n)continue;pt(o,n)}(t.sham||n&&n.sham)&&_(o,"sham",!0),J(i,s,o,t)}},Ot=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},At=function(t){return Object(p(t))},Lt=Array.isArray||function(t){return"Array"==u(t)},kt=!!Object.getOwnPropertySymbols&&!s((function(){return!String(Symbol())})),_t=kt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Mt=$("wks"),Ct=r.Symbol,Nt=_t?Ct:Ct&&Ct.withoutSetter||F,Tt=function(t){return b(Mt,t)||(kt&&b(Ct,t)?Mt[t]=Ct[t]:Mt[t]=Nt("Symbol."+t)),Mt[t]},zt=Tt("species"),Rt=function(t,e){var i;return Lt(t)&&("function"!=typeof(i=t.constructor)||i!==Array&&!Lt(i.prototype)?g(i)&&null===(i=i[zt])&&(i=void 0):i=void 0),new(void 0===i?Array:i)(0===e?0:e)},Wt=[].push,Pt=function(t){var e=1==t,i=2==t,r=3==t,s=4==t,n=6==t,o=5==t||n;return function(l,a,c,h){for(var u,f,p=At(l),v=d(p),g=function(t,e,i){if(Ot(t),void 0===e)return t;switch(i){case 0:return function(){return t.call(e)};case 1:return function(i){return t.call(e,i)};case 2:return function(i,r){return t.call(e,i,r)};case 3:return function(i,r,s){return t.call(e,i,r,s)}}return function(){return t.apply(e,arguments)}}(a,c,3),m=nt(v.length),y=0,b=h||Rt,x=e?b(l,m):i?b(l,0):void 0;m>y;y++)if((o||y in v)&&(f=g(u=v[y],y,p),t))if(e)x[y]=f;else if(f)switch(t){case 3:return!0;case 5:return u;case 6:return y;case 2:Wt.call(x,u)}else if(s)return!1;return n?-1:r||s?s:x}},jt={forEach:Pt(0),map:Pt(1),filter:Pt(2),some:Pt(3),every:Pt(4),find:Pt(5),findIndex:Pt(6)},Dt=function(t,e){var i=[][t];return!!i&&s((function(){i.call(null,e||function(){throw 1},1)}))},$t=Object.defineProperty,It={},Vt=function(t){throw t},Ft=function(t,e){if(b(It,t))return It[t];e||(e={});var i=[][t],r=!!b(e,"ACCESSORS")&&e.ACCESSORS,o=b(e,0)?e[0]:Vt,l=b(e,1)?e[1]:void 0;return It[t]=!!i&&!s((function(){if(r&&!n)return!0;var t={length:-1};r?$t(t,1,{enumerable:!0,get:Vt}):t[1]=1,i.call(t,o,l)}))},Bt=jt.forEach,Ht=Dt("forEach"),qt=Ft("forEach"),Yt=Ht&&qt?[].forEach:function(t){return Bt(this,t,arguments.length>1?arguments[1]:void 0)};wt({target:"Array",proto:!0,forced:[].forEach!=Yt},{forEach:Yt});for(var Xt in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var Ut=r[Xt],Gt=Ut&&Ut.prototype;if(Gt&&Gt.forEach!==Yt)try{_(Gt,"forEach",Yt)}catch(t){Gt.forEach=Yt}}var Kt=!("undefined"==typeof window||!window.document||!window.document.createElement),Zt="object"==typeof global&&global&&global.Object===Object&&global,Jt="object"==typeof self&&self&&self.Object===Object&&self,Qt=Zt||Jt||Function("return this")(),te=Qt.Symbol,ee=Object.prototype,ie=ee.hasOwnProperty,re=ee.toString,se=te?te.toStringTag:void 0;var ne=Object.prototype.toString;var oe=te?te.toStringTag:void 0;function le(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":oe&&oe in Object(t)?function(t){var e=ie.call(t,se),i=t[se];try{t[se]=void 0;var r=!0}catch(t){}var s=re.call(t);return r&&(e?t[se]=i:delete t[se]),s}(t):function(t){return ne.call(t)}(t)}function ae(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var ce=/^\s+|\s+$/g,he=/^[-+]0x[0-9a-f]+$/i,ue=/^0b[01]+$/i,fe=/^0o[0-7]+$/i,de=parseInt;function pe(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return null!=t&&"object"==typeof t}(t)&&"[object Symbol]"==le(t)}(t))return NaN;if(ae(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ae(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(ce,"");var i=ue.test(t);return i||fe.test(t)?de(t.slice(2),i?2:8):he.test(t)?NaN:+t}var ve=Qt["__core-js_shared__"],ge=function(){var t=/[^.]+$/.exec(ve&&ve.keys&&ve.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();var me=Function.prototype.toString;var ye=/^\[object .+?Constructor\]$/,be=Function.prototype,xe=Object.prototype,Ee=be.toString,Se=xe.hasOwnProperty,we=RegExp("^"+Ee.call(Se).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Oe(t){return!(!ae(t)||(e=t,ge&&ge in e))&&(function(t){if(!ae(t))return!1;var e=le(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}(t)?we:ye).test(function(t){if(null!=t){try{return me.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function Ae(t,e){var i=function(t,e){return null==t?void 0:t[e]}(t,e);return Oe(i)?i:void 0}var Le=Ae(Object,"create");var ke=Object.prototype.hasOwnProperty;var _e=Object.prototype.hasOwnProperty;function Me(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}function Ce(t,e){for(var i,r,s=t.length;s--;)if((i=t[s][0])===(r=e)||i!=i&&r!=r)return s;return-1}Me.prototype.clear=function(){this.__data__=Le?Le(null):{},this.size=0},Me.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Me.prototype.get=function(t){var e=this.__data__;if(Le){var i=e[t];return"__lodash_hash_undefined__"===i?void 0:i}return ke.call(e,t)?e[t]:void 0},Me.prototype.has=function(t){var e=this.__data__;return Le?void 0!==e[t]:_e.call(e,t)},Me.prototype.set=function(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=Le&&void 0===e?"__lodash_hash_undefined__":e,this};var Ne=Array.prototype.splice;function Te(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}Te.prototype.clear=function(){this.__data__=[],this.size=0},Te.prototype.delete=function(t){var e=this.__data__,i=Ce(e,t);return!(i<0)&&(i==e.length-1?e.pop():Ne.call(e,i,1),--this.size,!0)},Te.prototype.get=function(t){var e=this.__data__,i=Ce(e,t);return i<0?void 0:e[i][1]},Te.prototype.has=function(t){return Ce(this.__data__,t)>-1},Te.prototype.set=function(t,e){var i=this.__data__,r=Ce(i,t);return r<0?(++this.size,i.push([t,e])):i[r][1]=e,this};var ze=Ae(Qt,"Map");function Re(t,e){var i,r,s=t.__data__;return("string"==(r=typeof(i=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?s["string"==typeof e?"string":"hash"]:s.map}function We(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}We.prototype.clear=function(){this.size=0,this.__data__={hash:new Me,map:new(ze||Te),string:new Me}},We.prototype.delete=function(t){var e=Re(this,t).delete(t);return this.size-=e?1:0,e},We.prototype.get=function(t){return Re(this,t).get(t)},We.prototype.has=function(t){return Re(this,t).has(t)},We.prototype.set=function(t,e){var i=Re(this,t),r=i.size;return i.set(t,e),this.size+=i.size==r?0:1,this};function Pe(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var i=function(){var r=arguments,s=e?e.apply(this,r):r[0],n=i.cache;if(n.has(s))return n.get(s);var o=t.apply(this,r);return i.cache=n.set(s,o)||n,o};return i.cache=new(Pe.Cache||We),i}Pe.Cache=We;var je=function(){return Qt.Date.now()},De=Math.max,$e=Math.min;function Ie(t,e,i){var r,s,n,o,l,a,c=0,h=!1,u=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var i=r,n=s;return r=s=void 0,c=e,o=t.apply(n,i)}function p(t){return c=t,l=setTimeout(g,e),h?d(t):o}function v(t){var i=t-a;return void 0===a||i>=e||i<0||u&&t-c>=n}function g(){var t=je();if(v(t))return m(t);l=setTimeout(g,function(t){var i=e-(t-a);return u?$e(i,n-(t-c)):i}(t))}function m(t){return l=void 0,f&&r?d(t):(r=s=void 0,o)}function y(){var t=je(),i=v(t);if(r=arguments,s=this,a=t,i){if(void 0===l)return p(a);if(u)return clearTimeout(l),l=setTimeout(g,e),d(a)}return void 0===l&&(l=setTimeout(g,e)),o}return e=pe(e)||0,ae(i)&&(h=!!i.leading,n=(u="maxWait"in i)?De(pe(i.maxWait)||0,e):n,f="trailing"in i?!!i.trailing:f),y.cancel=function(){void 0!==l&&clearTimeout(l),c=0,r=a=s=l=void 0},y.flush=function(){return void 0===l?o:m(je())},y}let Ve=null,Fe=null;function Be(){if(null===Ve){if("undefined"==typeof document)return Ve=0,Ve;const t=document.body,e=document.createElement("div");e.classList.add("simplebar-hide-scrollbar"),t.appendChild(e);const i=e.getBoundingClientRect().right;t.removeChild(e),Ve=i}return Ve}function He(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:window}function qe(t){return t&&t.ownerDocument?t.ownerDocument:document}Kt&&window.addEventListener("resize",()=>{Fe!==window.devicePixelRatio&&(Fe=window.devicePixelRatio,Ve=null)});class Ye{constructor(t,e={}){this.onScroll=()=>{const t=He(this.el);this.scrollXTicking||(t.requestAnimationFrame(this.scrollX),this.scrollXTicking=!0),this.scrollYTicking||(t.requestAnimationFrame(this.scrollY),this.scrollYTicking=!0),this.isScrolling||(this.isScrolling=!0,this.el.classList.add(this.classNames.scrolling)),this.onStopScrolling()},this.scrollX=()=>{this.axis.x.isOverflowing&&this.positionScrollbar("x"),this.scrollXTicking=!1},this.scrollY=()=>{this.axis.y.isOverflowing&&this.positionScrollbar("y"),this.scrollYTicking=!1},this.onStopScrolling=()=>{this.el.classList.remove(this.classNames.scrolling),this.isScrolling=!1},this.onMouseEnter=()=>{this.isMouseEntering||(this.el.classList.add(this.classNames.mouseEntered),this.isMouseEntering=!0),this.onMouseEntered()},this.onMouseEntered=()=>{this.el.classList.remove(this.classNames.mouseEntered),this.isMouseEntering=!1},this.onMouseMove=t=>{this.mouseX=t.clientX,this.mouseY=t.clientY,(this.axis.x.isOverflowing||this.axis.x.forceVisible)&&this.onMouseMoveForAxis("x"),(this.axis.y.isOverflowing||this.axis.y.forceVisible)&&this.onMouseMoveForAxis("y")},this.onMouseLeave=()=>{this.onMouseMove.cancel(),(this.axis.x.isOverflowing||this.axis.x.forceVisible)&&this.onMouseLeaveForAxis("x"),(this.axis.y.isOverflowing||this.axis.y.forceVisible)&&this.onMouseLeaveForAxis("y"),this.mouseX=-1,this.mouseY=-1},this.onWindowResize=()=>{this.scrollbarWidth=this.getScrollbarWidth(),this.hideNativeScrollbar()},this.onPointerEvent=t=>{let e,i;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.axis.x.forceVisible)&&(e=this.isWithinBounds(this.axis.x.track.rect)),(this.axis.y.isOverflowing||this.axis.y.forceVisible)&&(i=this.isWithinBounds(this.axis.y.track.rect)),(e||i)&&(t.preventDefault(),t.stopPropagation(),"mousedown"===t.type&&(e&&(this.axis.x.scrollbar.rect=this.axis.x.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis.x.scrollbar.rect)?this.onDragStart(t,"x"):this.onTrackClick(t,"x")),i&&(this.axis.y.scrollbar.rect=this.axis.y.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis.y.scrollbar.rect)?this.onDragStart(t,"y"):this.onTrackClick(t,"y"))))},this.drag=t=>{let e;const i=this.axis[this.draggedAxis].track,r=i.rect[this.axis[this.draggedAxis].sizeAttr],s=this.axis[this.draggedAxis].scrollbar,n=this.contentWrapperEl[this.axis[this.draggedAxis].scrollSizeAttr],o=parseInt(this.elStyles[this.axis[this.draggedAxis].sizeAttr],10);t.preventDefault(),t.stopPropagation(),e="y"===this.draggedAxis?t.pageY:t.pageX;let l=(e-i.rect[this.axis[this.draggedAxis].offsetAttr]-this.axis[this.draggedAxis].dragOffset)/(r-s.size)*(n-o);"x"===this.draggedAxis&&(l=this.isRtl&&Ye.getRtlHelpers().isScrollOriginAtZero?l-(r+s.size):l),this.contentWrapperEl[this.axis[this.draggedAxis].scrollOffsetAttr]=l},this.onEndDrag=t=>{const e=qe(this.el),i=He(this.el);t.preventDefault(),t.stopPropagation(),this.el.classList.remove(this.classNames.dragging),e.removeEventListener("mousemove",this.drag,!0),e.removeEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId=i.setTimeout(()=>{e.removeEventListener("click",this.preventClick,!0),e.removeEventListener("dblclick",this.preventClick,!0),this.removePreventClickId=null})},this.preventClick=t=>{t.preventDefault(),t.stopPropagation()},this.el=t,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.options={...Ye.defaultOptions,...e},this.classNames={contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",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",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered",...this.options.classNames},this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,this.isScrolling=!1,this.isMouseEntering=!1,Ye.instances.has(this.el)||(e.classNames&&console.warn("simplebar: classNames option is deprecated. Please override the styles with CSS instead."),e.autoHide&&console.warn("simplebar: autoHide option is deprecated. Please use CSS instead: '.simplebar-scrollbar::before { opacity: 0.5 };' for autoHide: false"),this.onMouseMove=function(t,e,i){var r=!0,s=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return ae(i)&&(r="leading"in i?!!i.leading:r,s="trailing"in i?!!i.trailing:s),Ie(t,e,{leading:r,maxWait:e,trailing:s})}(this.onMouseMove,64),this.onWindowResize=Ie(this.onWindowResize,64,{leading:!0}),this.onStopScrolling=Ie(this.onStopScrolling,this.stopScrollDelay),this.onMouseEntered=Ie(this.onMouseEntered,this.stopScrollDelay),Ye.getRtlHelpers=Pe(Ye.getRtlHelpers),this.init())}static getRtlHelpers(){const t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';const e=t.firstElementChild,i=e.firstElementChild;document.body.appendChild(e),e.scrollLeft=0;const r=Ye.getOffset(e),s=Ye.getOffset(i);e.scrollLeft=-999;const n=Ye.getOffset(i);return{isScrollOriginAtZero:r.left!==s.left,isScrollingToNegative:s.left!==n.left}}static getOffset(t){const e=t.getBoundingClientRect(),i=qe(t),r=He(t);return{top:e.top+(r.pageYOffset||i.documentElement.scrollTop),left:e.left+(r.pageXOffset||i.documentElement.scrollLeft)}}init(){Ye.instances.set(this.el,this),Kt&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())}initDOM(){if(Array.prototype.filter.call(this.el.children,t=>t.classList.contains(this.classNames.wrapper)).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,`.${this.classNames.track}.${this.classNames.horizontal}`),this.axis.y.track.el=this.findChild(this.el,`.${this.classNames.track}.${this.classNames.vertical}`);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=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.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),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.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),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){const t=document.createElement("div"),e=document.createElement("div");t.classList.add(this.classNames.track),e.classList.add(this.classNames.scrollbar),t.appendChild(e),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("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")}initListeners(){const t=He(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(t=>{this.el.addEventListener(t,this.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(t=>{this.el.addEventListener(t,this.onPointerEvent,{capture:!0,passive:!0})}),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),t.addEventListener("resize",this.onWindowResize),window.ResizeObserver){let e=!1;const i=t.ResizeObserver||ResizeObserver;this.resizeObserver=new i(()=>{e&&t.requestAnimationFrame(()=>{this.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),t.requestAnimationFrame(()=>{e=!0})}this.mutationObserver=new t.MutationObserver(()=>{t.requestAnimationFrame(()=>{this.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}recalculate(){const t=He(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;const e=this.contentEl.offsetWidth,i=this.heightAutoObserverEl.offsetHeight<=1,r=this.heightAutoObserverEl.offsetWidth<=1||e>0,s=this.contentWrapperEl.offsetWidth,n=this.elStyles.overflowX,o=this.elStyles.overflowY;this.contentEl.style.padding=`${this.elStyles.paddingTop} ${this.elStyles.paddingRight} ${this.elStyles.paddingBottom} ${this.elStyles.paddingLeft}`,this.wrapperEl.style.margin=`-${this.elStyles.paddingTop} -${this.elStyles.paddingRight} -${this.elStyles.paddingBottom} -${this.elStyles.paddingLeft}`;const l=this.contentEl.scrollHeight,a=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=i?"auto":"100%",this.placeholderEl.style.width=r?(e||a)+"px":"auto",this.placeholderEl.style.height=l+"px";const c=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=0!==e&&a>e,this.axis.y.isOverflowing=l>c,this.axis.x.isOverflowing="hidden"!==n&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==o&&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.hideNativeScrollbar();let h=this.axis.x.isOverflowing?this.scrollbarWidth:0,u=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&a>s-u,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&l>c-h,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}getScrollbarSize(t="y"){if(!this.axis[t].isOverflowing)return 0;const e=this.contentEl[this.axis[t].scrollSizeAttr],i=this.axis[t].track.el[this.axis[t].offsetSizeAttr];let r,s=i/e;return r=Math.max(~~(s*i),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(r=Math.min(r,this.options.scrollbarMaxSize)),r}positionScrollbar(t="y"){if(!this.axis[t].isOverflowing)return;const e=this.contentWrapperEl[this.axis[t].scrollSizeAttr],i=this.axis[t].track.el[this.axis[t].offsetSizeAttr],r=parseInt(this.elStyles[this.axis[t].sizeAttr],10),s=this.axis[t].scrollbar;let n=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];n="x"===t&&this.isRtl&&Ye.getRtlHelpers().isScrollOriginAtZero?-n:n;let o=n/(e-r),l=~~((i-s.size)*o);l="x"===t&&this.isRtl&&Ye.getRtlHelpers().isScrollingToNegative?-l+(i-s.size):l,s.el.style.transform="x"===t?`translate3d(${l}px, 0, 0)`:`translate3d(0, ${l}px, 0)`}toggleTrackVisibility(t="y"){const 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.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add(`${this.classNames.scrollable}-${t}`)):(e.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove(`${this.classNames.scrollable}-${t}`)),this.axis[t].isOverflowing?i.style.display="block":i.style.display="none"}hideNativeScrollbar(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?`-${this.scrollbarWidth}px`:0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?`-${this.scrollbarWidth}px`:0}onMouseMoveForAxis(t="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.axis[t].track.el.classList.add(this.classNames.hover):this.axis[t].track.el.classList.remove(this.classNames.hover)}onMouseLeaveForAxis(t="y"){this.axis[t].track.el.classList.remove(this.classNames.hover),this.axis[t].scrollbar.el.classList.remove(this.classNames.hover)}onDragStart(t,e="y"){const i=qe(this.el),r=He(this.el),s=this.axis[e].scrollbar,n="y"===e?t.pageY:t.pageX;this.axis[e].dragOffset=n-s.rect[this.axis[e].offsetAttr],this.draggedAxis=e,this.el.classList.add(this.classNames.dragging),i.addEventListener("mousemove",this.drag,!0),i.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(i.addEventListener("click",this.preventClick,!0),i.addEventListener("dblclick",this.preventClick,!0)):(r.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)}onTrackClick(t,e="y"){if(!this.options.clickOnTrack)return;const i=He(this.el);this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect();const r=this.axis[e].scrollbar.rect[this.axis[e].offsetAttr],s=parseInt(this.elStyles[this.axis[e].sizeAttr],10);let n=this.contentWrapperEl[this.axis[e].scrollOffsetAttr];const o=("y"===e?this.mouseY-r:this.mouseX-r)<0?-1:1,l=-1===o?n-s:n+s,a=()=>{-1===o?n>l&&(n-=40):n<l&&(n+=40),this.contentWrapperEl[this.axis[e].scrollOffsetAttr]=n,i.requestAnimationFrame(a)};a()}getContentElement(){return this.contentEl}getScrollElement(){return this.contentWrapperEl}getScrollbarWidth(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:Be()}catch(t){return Be()}}removeListeners(){const t=He(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(t=>{this.el.removeEventListener(t,this.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(t=>{this.el.removeEventListener(t,this.onPointerEvent,{capture:!0,passive:!0})}),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()}unMount(){this.removeListeners(),Ye.instances.delete(this.el)}isWithinBounds(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height}findChild(t,e){const i=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,t=>i.call(t,e))[0]}}Ye.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0},Ye.instances=new WeakMap;var Xe=function(t){return function(e,i,r,s){Ot(i);var n=At(e),o=d(n),l=nt(n.length),a=t?l-1:0,c=t?-1:1;if(r<2)for(;;){if(a in o){s=o[a],a+=c;break}if(a+=c,t?a<0:l<=a)throw TypeError("Reduce of empty array with no initial value")}for(;t?a>=0:l>a;a+=c)a in o&&(s=i(s,o[a],a,n));return s}},Ue={left:Xe(!1),right:Xe(!0)}.left,Ge=Dt("reduce"),Ke=Ft("reduce",{1:0});wt({target:"Array",proto:!0,forced:!Ge||!Ke},{reduce:function(t){return Ue(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}});var Ze=k.f,Je=Function.prototype,Qe=Je.toString,ti=/^\s*function ([^ (]*)/;n&&!("name"in Je)&&Ze(Je,"name",{configurable:!0,get:function(){try{return Qe.call(this).match(ti)[1]}catch(t){return""}}});var ei=function(){var t=A(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e};function ii(t,e){return RegExp(t,e)}var ri,si,ni={UNSUPPORTED_Y:s((function(){var t=ii("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),BROKEN_CARET:s((function(){var t=ii("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},oi=RegExp.prototype.exec,li=String.prototype.replace,ai=oi,ci=(ri=/a/,si=/b*/g,oi.call(ri,"a"),oi.call(si,"a"),0!==ri.lastIndex||0!==si.lastIndex),hi=ni.UNSUPPORTED_Y||ni.BROKEN_CARET,ui=void 0!==/()??/.exec("")[1];(ci||ui||hi)&&(ai=function(t){var e,i,r,s,n=this,o=hi&&n.sticky,l=ei.call(n),a=n.source,c=0,h=t;return o&&(-1===(l=l.replace("y","")).indexOf("g")&&(l+="g"),h=String(t).slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&"\n"!==t[n.lastIndex-1])&&(a="(?: "+a+")",h=" "+h,c++),i=new RegExp("^(?:"+a+")",l)),ui&&(i=new RegExp("^"+a+"$(?!\\s)",l)),ci&&(e=n.lastIndex),r=oi.call(o?i:n,h),o?r?(r.input=r.input.slice(c),r[0]=r[0].slice(c),r.index=n.lastIndex,n.lastIndex+=r[0].length):n.lastIndex=0:ci&&r&&(n.lastIndex=n.global?r.index+r[0].length:e),ui&&r&&r.length>1&&li.call(r[0],i,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(r[s]=void 0)})),r});var fi=ai;wt({target:"RegExp",proto:!0,forced:/./.exec!==fi},{exec:fi});var di=Tt("species"),pi=!s((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),vi="$0"==="a".replace(/./,"$0"),gi=Tt("replace"),mi=!!/./[gi]&&""===/./[gi]("a","$0"),yi=!s((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]})),bi=function(t,e,i,r){var n=Tt(t),o=!s((function(){var e={};return e[n]=function(){return 7},7!=""[t](e)})),l=o&&!s((function(){var e=!1,i=/a/;return"split"===t&&((i={}).constructor={},i.constructor[di]=function(){return i},i.flags="",i[n]=/./[n]),i.exec=function(){return e=!0,null},i[n](""),!e}));if(!o||!l||"replace"===t&&(!pi||!vi||mi)||"split"===t&&!yi){var a=/./[n],c=i(n,""[t],(function(t,e,i,r,s){return e.exec===fi?o&&!s?{done:!0,value:a.call(e,i,r)}:{done:!0,value:t.call(i,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:vi,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:mi}),h=c[0],u=c[1];J(String.prototype,t,h),J(RegExp.prototype,n,2==e?function(t,e){return u.call(t,this,e)}:function(t){return u.call(t,this)})}r&&_(RegExp.prototype[n],"sham",!0)},xi=function(t){return function(e,i){var r,s,n=String(p(e)),o=rt(i),l=n.length;return o<0||o>=l?t?"":void 0:(r=n.charCodeAt(o))<55296||r>56319||o+1===l||(s=n.charCodeAt(o+1))<56320||s>57343?t?n.charAt(o):r:t?n.slice(o,o+2):s-56320+(r-55296<<10)+65536}},Ei={codeAt:xi(!1),charAt:xi(!0)}.charAt,Si=function(t,e,i){return e+(i?Ei(t,e).length:1)},wi=function(t,e){var i=t.exec;if("function"==typeof i){var r=i.call(t,e);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==u(t))throw TypeError("RegExp#exec called on incompatible receiver");return fi.call(t,e)};bi("match",1,(function(t,e,i){return[function(e){var i=p(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,i):new RegExp(e)[t](String(i))},function(t){var r=i(e,t,this);if(r.done)return r.value;var s=A(t),n=String(this);if(!s.global)return wi(s,n);var o=s.unicode;s.lastIndex=0;for(var l,a=[],c=0;null!==(l=wi(s,n));){var h=String(l[0]);a[c]=h,""===h&&(s.lastIndex=Si(n,nt(s.lastIndex),o)),c++}return 0===c?null:a}]}));var Oi=Math.max,Ai=Math.min,Li=Math.floor,ki=/\$([$&'`]|\d\d?|<[^>]*>)/g,_i=/\$([$&'`]|\d\d?)/g;bi("replace",2,(function(t,e,i,r){var s=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,n=r.REPLACE_KEEPS_$0,o=s?"$":"$0";return[function(i,r){var s=p(this),n=null==i?void 0:i[t];return void 0!==n?n.call(i,s,r):e.call(String(s),i,r)},function(t,r){if(!s&&n||"string"==typeof r&&-1===r.indexOf(o)){var a=i(e,t,this,r);if(a.done)return a.value}var c=A(t),h=String(this),u="function"==typeof r;u||(r=String(r));var f=c.global;if(f){var d=c.unicode;c.lastIndex=0}for(var p=[];;){var v=wi(c,h);if(null===v)break;if(p.push(v),!f)break;""===String(v[0])&&(c.lastIndex=Si(h,nt(c.lastIndex),d))}for(var g,m="",y=0,b=0;b<p.length;b++){v=p[b];for(var x=String(v[0]),E=Oi(Ai(rt(v.index),h.length),0),S=[],w=1;w<v.length;w++)S.push(void 0===(g=v[w])?g:String(g));var O=v.groups;if(u){var L=[x].concat(S,E,h);void 0!==O&&L.push(O);var k=String(r.apply(void 0,L))}else k=l(x,h,E,S,O,r);E>=y&&(m+=h.slice(y,E)+k,y=E+x.length)}return m+h.slice(y)}];function l(t,i,r,s,n,o){var l=r+t.length,a=s.length,c=_i;return void 0!==n&&(n=At(n),c=ki),e.call(o,c,(function(e,o){var c;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return i.slice(0,r);case"'":return i.slice(l);case"<":c=n[o.slice(1,-1)];break;default:var h=+o;if(0===h)return e;if(h>a){var u=Li(h/10);return 0===u?e:u<=a?void 0===s[u-1]?o.charAt(1):s[u-1]+o.charAt(1):e}c=s[h-1]}return void 0===c?"":c}))}}));var Mi=function(t){return Array.prototype.reduce.call(t,(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}),{})};return Ye.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),(function(t){"init"===t.getAttribute("data-simplebar")||Ye.instances.has(t)||new Ye(t,Mi(t.attributes))}))},Ye.removeObserver=function(){this.globalObserver.disconnect()},Ye.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(Ye.handleMutations),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))},Ye.handleMutations=function(t){t.forEach((function(t){Array.prototype.forEach.call(t.addedNodes,(function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?!Ye.instances.has(t)&&new Ye(t,Mi(t.attributes)):Array.prototype.forEach.call(t.querySelectorAll("[data-simplebar]"),(function(t){"init"===t.getAttribute("data-simplebar")||Ye.instances.has(t)||new Ye(t,Mi(t.attributes))})))})),Array.prototype.forEach.call(t.removedNodes,(function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?Ye.instances.has(t)&&Ye.instances.get(t).unMount():Array.prototype.forEach.call(t.querySelectorAll('[data-simplebar="init"]'),(function(t){Ye.instances.has(t)&&Ye.instances.get(t).unMount()})))}))}))},Ye.getOptions=Mi,Ye.default=Ye,Kt&&Ye.initHtmlApi(),Ye})); | ||
!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 t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e,i){return t(i={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&i.path)}},i.exports),i.exports}var i=function(t){return t&&t.Math==Math&&t},r=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||Function("return this")(),s=function(t){try{return!!t()}catch(t){return!0}},n=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),o={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,a={f:l&&!o.call({1:2},1)?function(t){var e=l(this,t);return!!e&&e.enumerable}:o},c=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},h={}.toString,u=function(t){return h.call(t).slice(8,-1)},f="".split,d=s((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==u(t)?f.call(t,""):Object(t)}:Object,p=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},v=function(t){return d(p(t))},g=function(t){return"object"==typeof t?null!==t:"function"==typeof t},m=function(t,e){if(!g(t))return t;var i,r;if(e&&"function"==typeof(i=t.toString)&&!g(r=i.call(t)))return r;if("function"==typeof(i=t.valueOf)&&!g(r=i.call(t)))return r;if(!e&&"function"==typeof(i=t.toString)&&!g(r=i.call(t)))return r;throw TypeError("Can't convert object to primitive value")},y={}.hasOwnProperty,b=function(t,e){return y.call(t,e)},x=r.document,E=g(x)&&g(x.createElement),S=!n&&!s((function(){return 7!=Object.defineProperty((t="div",E?x.createElement(t):{}),"a",{get:function(){return 7}}).a;var t})),w=Object.getOwnPropertyDescriptor,O={f:n?w:function(t,e){if(t=v(t),e=m(e,!0),S)try{return w(t,e)}catch(t){}if(b(t,e))return c(!a.f.call(t,e),t[e])}},A=function(t){if(!g(t))throw TypeError(String(t)+" is not an object");return t},L=Object.defineProperty,k={f:n?L:function(t,e,i){if(A(t),e=m(e,!0),A(i),S)try{return L(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}},_=n?function(t,e,i){return k.f(t,e,c(1,i))}:function(t,e,i){return t[e]=i,t},M=function(t,e){try{_(r,t,e)}catch(i){r[t]=e}return e},C=r["__core-js_shared__"]||M("__core-js_shared__",{}),N=Function.toString;"function"!=typeof C.inspectSource&&(C.inspectSource=function(t){return N.call(t)});var T,W,z,R,P=C.inspectSource,j=r.WeakMap,D="function"==typeof j&&/native code/.test(P(j)),$=e((function(t){(t.exports=function(t,e){return C[t]||(C[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),I=0,V=Math.random(),F=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++I+V).toString(36)},B=$("keys"),q={},H=r.WeakMap;if(D){var Y=new H,X=Y.get,U=Y.has,G=Y.set;T=function(t,e){return G.call(Y,t,e),e},W=function(t){return X.call(Y,t)||{}},z=function(t){return U.call(Y,t)}}else{var K=B[R="state"]||(B[R]=F(R));q[K]=!0,T=function(t,e){return _(t,K,e),e},W=function(t){return b(t,K)?t[K]:{}},z=function(t){return b(t,K)}}var Z={set:T,get:W,has:z,enforce:function(t){return z(t)?W(t):T(t,{})},getterFor:function(t){return function(e){var i;if(!g(e)||(i=W(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return i}}},J=e((function(t){var e=Z.get,i=Z.enforce,s=String(String).split("String");(t.exports=function(t,e,n,o){var l=!!o&&!!o.unsafe,a=!!o&&!!o.enumerable,c=!!o&&!!o.noTargetGet;"function"==typeof n&&("string"!=typeof e||b(n,"name")||_(n,"name",e),i(n).source=s.join("string"==typeof e?e:"")),t!==r?(l?!c&&t[e]&&(a=!0):delete t[e],a?t[e]=n:_(t,e,n)):a?t[e]=n:M(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||P(this)}))})),Q=r,tt=function(t){return"function"==typeof t?t:void 0},et=Math.ceil,it=Math.floor,rt=function(t){return isNaN(t=+t)?0:(t>0?it:et)(t)},st=Math.min,nt=function(t){return t>0?st(rt(t),9007199254740991):0},ot=Math.max,lt=Math.min,at=function(t){return function(e,i,r){var s,n=v(e),o=nt(n.length),l=function(t,e){var i=rt(t);return i<0?ot(i+e,0):lt(i,e)}(r,o);if(t&&i!=i){for(;o>l;)if((s=n[l++])!=s)return!0}else for(;o>l;l++)if((t||l in n)&&n[l]===i)return t||l||0;return!t&&-1}},ct={includes:at(!0),indexOf:at(!1)}.indexOf,ht=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype"),ut={f:Object.getOwnPropertyNames||function(t){return function(t,e){var i,r=v(t),s=0,n=[];for(i in r)!b(q,i)&&b(r,i)&&n.push(i);for(;e.length>s;)b(r,i=e[s++])&&(~ct(n,i)||n.push(i));return n}(t,ht)}},ft={f:Object.getOwnPropertySymbols},dt=function(t,e){return arguments.length<2?tt(Q[t])||tt(r[t]):Q[t]&&Q[t][e]||r[t]&&r[t][e]}("Reflect","ownKeys")||function(t){var e=ut.f(A(t)),i=ft.f;return i?e.concat(i(t)):e},pt=function(t,e){for(var i=dt(e),r=k.f,s=O.f,n=0;n<i.length;n++){var o=i[n];b(t,o)||r(t,o,s(e,o))}},vt=/#|\.prototype\./,gt=function(t,e){var i=yt[mt(t)];return i==xt||i!=bt&&("function"==typeof e?s(e):!!e)},mt=gt.normalize=function(t){return String(t).replace(vt,".").toLowerCase()},yt=gt.data={},bt=gt.NATIVE="N",xt=gt.POLYFILL="P",Et=gt,St=O.f,wt=function(t,e){var i,s,n,o,l,a=t.target,c=t.global,h=t.stat;if(i=c?r:h?r[a]||M(a,{}):(r[a]||{}).prototype)for(s in e){if(o=e[s],n=t.noTargetGet?(l=St(i,s))&&l.value:i[s],!Et(c?s:a+(h?".":"#")+s,t.forced)&&void 0!==n){if(typeof o==typeof n)continue;pt(o,n)}(t.sham||n&&n.sham)&&_(o,"sham",!0),J(i,s,o,t)}},Ot=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},At=function(t){return Object(p(t))},Lt=Array.isArray||function(t){return"Array"==u(t)},kt=!!Object.getOwnPropertySymbols&&!s((function(){return!String(Symbol())})),_t=kt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Mt=$("wks"),Ct=r.Symbol,Nt=_t?Ct:Ct&&Ct.withoutSetter||F,Tt=function(t){return b(Mt,t)||(kt&&b(Ct,t)?Mt[t]=Ct[t]:Mt[t]=Nt("Symbol."+t)),Mt[t]},Wt=Tt("species"),zt=function(t,e){var i;return Lt(t)&&("function"!=typeof(i=t.constructor)||i!==Array&&!Lt(i.prototype)?g(i)&&null===(i=i[Wt])&&(i=void 0):i=void 0),new(void 0===i?Array:i)(0===e?0:e)},Rt=[].push,Pt=function(t){var e=1==t,i=2==t,r=3==t,s=4==t,n=6==t,o=5==t||n;return function(l,a,c,h){for(var u,f,p=At(l),v=d(p),g=function(t,e,i){if(Ot(t),void 0===e)return t;switch(i){case 0:return function(){return t.call(e)};case 1:return function(i){return t.call(e,i)};case 2:return function(i,r){return t.call(e,i,r)};case 3:return function(i,r,s){return t.call(e,i,r,s)}}return function(){return t.apply(e,arguments)}}(a,c,3),m=nt(v.length),y=0,b=h||zt,x=e?b(l,m):i?b(l,0):void 0;m>y;y++)if((o||y in v)&&(f=g(u=v[y],y,p),t))if(e)x[y]=f;else if(f)switch(t){case 3:return!0;case 5:return u;case 6:return y;case 2:Rt.call(x,u)}else if(s)return!1;return n?-1:r||s?s:x}},jt={forEach:Pt(0),map:Pt(1),filter:Pt(2),some:Pt(3),every:Pt(4),find:Pt(5),findIndex:Pt(6)},Dt=function(t,e){var i=[][t];return!!i&&s((function(){i.call(null,e||function(){throw 1},1)}))},$t=Object.defineProperty,It={},Vt=function(t){throw t},Ft=function(t,e){if(b(It,t))return It[t];e||(e={});var i=[][t],r=!!b(e,"ACCESSORS")&&e.ACCESSORS,o=b(e,0)?e[0]:Vt,l=b(e,1)?e[1]:void 0;return It[t]=!!i&&!s((function(){if(r&&!n)return!0;var t={length:-1};r?$t(t,1,{enumerable:!0,get:Vt}):t[1]=1,i.call(t,o,l)}))},Bt=jt.forEach,qt=Dt("forEach"),Ht=Ft("forEach"),Yt=qt&&Ht?[].forEach:function(t){return Bt(this,t,arguments.length>1?arguments[1]:void 0)};wt({target:"Array",proto:!0,forced:[].forEach!=Yt},{forEach:Yt});for(var Xt in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var Ut=r[Xt],Gt=Ut&&Ut.prototype;if(Gt&&Gt.forEach!==Yt)try{_(Gt,"forEach",Yt)}catch(t){Gt.forEach=Yt}}var Kt=!("undefined"==typeof window||!window.document||!window.document.createElement),Zt="object"==typeof global&&global&&global.Object===Object&&global,Jt="object"==typeof self&&self&&self.Object===Object&&self,Qt=Zt||Jt||Function("return this")(),te=Qt.Symbol,ee=Object.prototype,ie=ee.hasOwnProperty,re=ee.toString,se=te?te.toStringTag:void 0;var ne=Object.prototype.toString;var oe=te?te.toStringTag:void 0;function le(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":oe&&oe in Object(t)?function(t){var e=ie.call(t,se),i=t[se];try{t[se]=void 0;var r=!0}catch(t){}var s=re.call(t);return r&&(e?t[se]=i:delete t[se]),s}(t):function(t){return ne.call(t)}(t)}function ae(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var ce=/^\s+|\s+$/g,he=/^[-+]0x[0-9a-f]+$/i,ue=/^0b[01]+$/i,fe=/^0o[0-7]+$/i,de=parseInt;function pe(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return null!=t&&"object"==typeof t}(t)&&"[object Symbol]"==le(t)}(t))return NaN;if(ae(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ae(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(ce,"");var i=ue.test(t);return i||fe.test(t)?de(t.slice(2),i?2:8):he.test(t)?NaN:+t}var ve=Qt["__core-js_shared__"],ge=function(){var t=/[^.]+$/.exec(ve&&ve.keys&&ve.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();var me=Function.prototype.toString;var ye=/^\[object .+?Constructor\]$/,be=Function.prototype,xe=Object.prototype,Ee=be.toString,Se=xe.hasOwnProperty,we=RegExp("^"+Ee.call(Se).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Oe(t){return!(!ae(t)||(e=t,ge&&ge in e))&&(function(t){if(!ae(t))return!1;var e=le(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}(t)?we:ye).test(function(t){if(null!=t){try{return me.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function Ae(t,e){var i=function(t,e){return null==t?void 0:t[e]}(t,e);return Oe(i)?i:void 0}var Le=Ae(Object,"create");var ke=Object.prototype.hasOwnProperty;var _e=Object.prototype.hasOwnProperty;function Me(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}function Ce(t,e){for(var i,r,s=t.length;s--;)if((i=t[s][0])===(r=e)||i!=i&&r!=r)return s;return-1}Me.prototype.clear=function(){this.__data__=Le?Le(null):{},this.size=0},Me.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Me.prototype.get=function(t){var e=this.__data__;if(Le){var i=e[t];return"__lodash_hash_undefined__"===i?void 0:i}return ke.call(e,t)?e[t]:void 0},Me.prototype.has=function(t){var e=this.__data__;return Le?void 0!==e[t]:_e.call(e,t)},Me.prototype.set=function(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=Le&&void 0===e?"__lodash_hash_undefined__":e,this};var Ne=Array.prototype.splice;function Te(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}Te.prototype.clear=function(){this.__data__=[],this.size=0},Te.prototype.delete=function(t){var e=this.__data__,i=Ce(e,t);return!(i<0)&&(i==e.length-1?e.pop():Ne.call(e,i,1),--this.size,!0)},Te.prototype.get=function(t){var e=this.__data__,i=Ce(e,t);return i<0?void 0:e[i][1]},Te.prototype.has=function(t){return Ce(this.__data__,t)>-1},Te.prototype.set=function(t,e){var i=this.__data__,r=Ce(i,t);return r<0?(++this.size,i.push([t,e])):i[r][1]=e,this};var We=Ae(Qt,"Map");function ze(t,e){var i,r,s=t.__data__;return("string"==(r=typeof(i=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?s["string"==typeof e?"string":"hash"]:s.map}function Re(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}Re.prototype.clear=function(){this.size=0,this.__data__={hash:new Me,map:new(We||Te),string:new Me}},Re.prototype.delete=function(t){var e=ze(this,t).delete(t);return this.size-=e?1:0,e},Re.prototype.get=function(t){return ze(this,t).get(t)},Re.prototype.has=function(t){return ze(this,t).has(t)},Re.prototype.set=function(t,e){var i=ze(this,t),r=i.size;return i.set(t,e),this.size+=i.size==r?0:1,this};function Pe(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var i=function(){var r=arguments,s=e?e.apply(this,r):r[0],n=i.cache;if(n.has(s))return n.get(s);var o=t.apply(this,r);return i.cache=n.set(s,o)||n,o};return i.cache=new(Pe.Cache||Re),i}Pe.Cache=Re;var je=function(){return Qt.Date.now()},De=Math.max,$e=Math.min;function Ie(t,e,i){var r,s,n,o,l,a,c=0,h=!1,u=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var i=r,n=s;return r=s=void 0,c=e,o=t.apply(n,i)}function p(t){return c=t,l=setTimeout(g,e),h?d(t):o}function v(t){var i=t-a;return void 0===a||i>=e||i<0||u&&t-c>=n}function g(){var t=je();if(v(t))return m(t);l=setTimeout(g,function(t){var i=e-(t-a);return u?$e(i,n-(t-c)):i}(t))}function m(t){return l=void 0,f&&r?d(t):(r=s=void 0,o)}function y(){var t=je(),i=v(t);if(r=arguments,s=this,a=t,i){if(void 0===l)return p(a);if(u)return clearTimeout(l),l=setTimeout(g,e),d(a)}return void 0===l&&(l=setTimeout(g,e)),o}return e=pe(e)||0,ae(i)&&(h=!!i.leading,n=(u="maxWait"in i)?De(pe(i.maxWait)||0,e):n,f="trailing"in i?!!i.trailing:f),y.cancel=function(){void 0!==l&&clearTimeout(l),c=0,r=a=s=l=void 0},y.flush=function(){return void 0===l?o:m(je())},y}let Ve=null,Fe=null;function Be(){if(null===Ve){if("undefined"==typeof document)return Ve=0,Ve;const t=document.body,e=document.createElement("div");e.classList.add("simplebar-hide-scrollbar"),t.appendChild(e);const i=e.getBoundingClientRect().right;t.removeChild(e),Ve=i}return Ve}function qe(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:window}function He(t){return t&&t.ownerDocument?t.ownerDocument:document}Kt&&window.addEventListener("resize",()=>{Fe!==window.devicePixelRatio&&(Fe=window.devicePixelRatio,Ve=null)});class Ye{constructor(t,e={}){this.onScroll=()=>{const t=qe(this.el);this.scrollXTicking||(t.requestAnimationFrame(this.scrollX),this.scrollXTicking=!0),this.scrollYTicking||(t.requestAnimationFrame(this.scrollY),this.scrollYTicking=!0),this.isScrolling||(this.isScrolling=!0,this.el.classList.add(this.classNames.scrolling)),this.onStopScrolling()},this.scrollX=()=>{this.axis.x.isOverflowing&&this.positionScrollbar("x"),this.scrollXTicking=!1},this.scrollY=()=>{this.axis.y.isOverflowing&&this.positionScrollbar("y"),this.scrollYTicking=!1},this.onStopScrolling=()=>{this.el.classList.remove(this.classNames.scrolling),this.isScrolling=!1},this.onMouseEnter=()=>{this.isMouseEntering||(this.el.classList.add(this.classNames.mouseEntered),this.isMouseEntering=!0),this.onMouseEntered()},this.onMouseEntered=()=>{this.el.classList.remove(this.classNames.mouseEntered),this.isMouseEntering=!1},this.onMouseMove=t=>{this.mouseX=t.clientX,this.mouseY=t.clientY,(this.axis.x.isOverflowing||this.axis.x.forceVisible)&&this.onMouseMoveForAxis("x"),(this.axis.y.isOverflowing||this.axis.y.forceVisible)&&this.onMouseMoveForAxis("y")},this.onMouseLeave=()=>{this.onMouseMove.cancel(),(this.axis.x.isOverflowing||this.axis.x.forceVisible)&&this.onMouseLeaveForAxis("x"),(this.axis.y.isOverflowing||this.axis.y.forceVisible)&&this.onMouseLeaveForAxis("y"),this.mouseX=-1,this.mouseY=-1},this.onWindowResize=()=>{this.scrollbarWidth=this.getScrollbarWidth(),this.hideNativeScrollbar()},this.onPointerEvent=t=>{let e,i;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.axis.x.forceVisible)&&(e=this.isWithinBounds(this.axis.x.track.rect)),(this.axis.y.isOverflowing||this.axis.y.forceVisible)&&(i=this.isWithinBounds(this.axis.y.track.rect)),(e||i)&&(t.stopPropagation(),"pointerdown"===t.type&&"touch"!==t.pointerType&&(e&&(this.axis.x.scrollbar.rect=this.axis.x.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis.x.scrollbar.rect)?this.onDragStart(t,"x"):this.onTrackClick(t,"x")),i&&(this.axis.y.scrollbar.rect=this.axis.y.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis.y.scrollbar.rect)?this.onDragStart(t,"y"):this.onTrackClick(t,"y"))))},this.drag=t=>{let e;const i=this.axis[this.draggedAxis].track,r=i.rect[this.axis[this.draggedAxis].sizeAttr],s=this.axis[this.draggedAxis].scrollbar,n=this.contentWrapperEl[this.axis[this.draggedAxis].scrollSizeAttr],o=parseInt(this.elStyles[this.axis[this.draggedAxis].sizeAttr],10);t.preventDefault(),t.stopPropagation(),e="y"===this.draggedAxis?t.pageY:t.pageX;let l=(e-i.rect[this.axis[this.draggedAxis].offsetAttr]-this.axis[this.draggedAxis].dragOffset)/(r-s.size)*(n-o);"x"===this.draggedAxis&&(l=this.isRtl&&Ye.getRtlHelpers().isScrollOriginAtZero?l-(r+s.size):l),this.contentWrapperEl[this.axis[this.draggedAxis].scrollOffsetAttr]=l},this.onEndDrag=t=>{const e=He(this.el),i=qe(this.el);t.preventDefault(),t.stopPropagation(),this.el.classList.remove(this.classNames.dragging),e.removeEventListener("mousemove",this.drag,!0),e.removeEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId=i.setTimeout(()=>{e.removeEventListener("click",this.preventClick,!0),e.removeEventListener("dblclick",this.preventClick,!0),this.removePreventClickId=null})},this.preventClick=t=>{t.preventDefault(),t.stopPropagation()},this.el=t,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.options={...Ye.defaultOptions,...e},this.classNames={contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",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",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered",...this.options.classNames},this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,this.isScrolling=!1,this.isMouseEntering=!1,Ye.instances.has(this.el)||(e.classNames&&console.warn("simplebar: classNames option is deprecated. Please override the styles with CSS instead."),e.autoHide&&console.warn("simplebar: autoHide option is deprecated. Please use CSS instead: '.simplebar-scrollbar::before { opacity: 0.5 };' for autoHide: false"),this.onMouseMove=function(t,e,i){var r=!0,s=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return ae(i)&&(r="leading"in i?!!i.leading:r,s="trailing"in i?!!i.trailing:s),Ie(t,e,{leading:r,maxWait:e,trailing:s})}(this.onMouseMove,64),this.onWindowResize=Ie(this.onWindowResize,64,{leading:!0}),this.onStopScrolling=Ie(this.onStopScrolling,this.stopScrollDelay),this.onMouseEntered=Ie(this.onMouseEntered,this.stopScrollDelay),Ye.getRtlHelpers=Pe(Ye.getRtlHelpers),this.init())}static getRtlHelpers(){const t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';const e=t.firstElementChild,i=e.firstElementChild;document.body.appendChild(e),e.scrollLeft=0;const r=Ye.getOffset(e),s=Ye.getOffset(i);e.scrollLeft=-999;const n=Ye.getOffset(i);return{isScrollOriginAtZero:r.left!==s.left,isScrollingToNegative:s.left!==n.left}}static getOffset(t){const e=t.getBoundingClientRect(),i=He(t),r=qe(t);return{top:e.top+(r.pageYOffset||i.documentElement.scrollTop),left:e.left+(r.pageXOffset||i.documentElement.scrollLeft)}}init(){Ye.instances.set(this.el,this),Kt&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())}initDOM(){if(Array.prototype.filter.call(this.el.children,t=>t.classList.contains(this.classNames.wrapper)).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,`.${this.classNames.track}.${this.classNames.horizontal}`),this.axis.y.track.el=this.findChild(this.el,`.${this.classNames.track}.${this.classNames.vertical}`);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=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.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),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.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),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){const t=document.createElement("div"),e=document.createElement("div");t.classList.add(this.classNames.track),e.classList.add(this.classNames.scrollbar),t.appendChild(e),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("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")}initListeners(){const t=qe(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),t.addEventListener("resize",this.onWindowResize),window.ResizeObserver){let e=!1;const i=t.ResizeObserver||ResizeObserver;this.resizeObserver=new i(()=>{e&&t.requestAnimationFrame(()=>{this.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),t.requestAnimationFrame(()=>{e=!0})}this.mutationObserver=new t.MutationObserver(()=>{t.requestAnimationFrame(()=>{this.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}recalculate(){const t=qe(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;const e=this.contentEl.offsetWidth,i=this.heightAutoObserverEl.offsetHeight<=1,r=this.heightAutoObserverEl.offsetWidth<=1||e>0,s=this.contentWrapperEl.offsetWidth,n=this.elStyles.overflowX,o=this.elStyles.overflowY;this.contentEl.style.padding=`${this.elStyles.paddingTop} ${this.elStyles.paddingRight} ${this.elStyles.paddingBottom} ${this.elStyles.paddingLeft}`,this.wrapperEl.style.margin=`-${this.elStyles.paddingTop} -${this.elStyles.paddingRight} -${this.elStyles.paddingBottom} -${this.elStyles.paddingLeft}`;const l=this.contentEl.scrollHeight,a=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=i?"auto":"100%",this.placeholderEl.style.width=r?(e||a)+"px":"auto",this.placeholderEl.style.height=l+"px";const c=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=0!==e&&a>e,this.axis.y.isOverflowing=l>c,this.axis.x.isOverflowing="hidden"!==n&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==o&&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.hideNativeScrollbar();let h=this.axis.x.isOverflowing?this.scrollbarWidth:0,u=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&a>s-u,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&l>c-h,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}getScrollbarSize(t="y"){if(!this.axis[t].isOverflowing)return 0;const e=this.contentEl[this.axis[t].scrollSizeAttr],i=this.axis[t].track.el[this.axis[t].offsetSizeAttr];let r,s=i/e;return r=Math.max(~~(s*i),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(r=Math.min(r,this.options.scrollbarMaxSize)),r}positionScrollbar(t="y"){if(!this.axis[t].isOverflowing)return;const e=this.contentWrapperEl[this.axis[t].scrollSizeAttr],i=this.axis[t].track.el[this.axis[t].offsetSizeAttr],r=parseInt(this.elStyles[this.axis[t].sizeAttr],10),s=this.axis[t].scrollbar;let n=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];n="x"===t&&this.isRtl&&Ye.getRtlHelpers().isScrollOriginAtZero?-n:n;let o=n/(e-r),l=~~((i-s.size)*o);l="x"===t&&this.isRtl&&Ye.getRtlHelpers().isScrollingToNegative?-l+(i-s.size):l,s.el.style.transform="x"===t?`translate3d(${l}px, 0, 0)`:`translate3d(0, ${l}px, 0)`}toggleTrackVisibility(t="y"){const 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.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add(`${this.classNames.scrollable}-${t}`)):(e.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove(`${this.classNames.scrollable}-${t}`)),this.axis[t].isOverflowing?i.style.display="block":i.style.display="none"}hideNativeScrollbar(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?`-${this.scrollbarWidth}px`:0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?`-${this.scrollbarWidth}px`:0}onMouseMoveForAxis(t="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.axis[t].track.el.classList.add(this.classNames.hover):this.axis[t].track.el.classList.remove(this.classNames.hover)}onMouseLeaveForAxis(t="y"){this.axis[t].track.el.classList.remove(this.classNames.hover),this.axis[t].scrollbar.el.classList.remove(this.classNames.hover)}onDragStart(t,e="y"){const i=He(this.el),r=qe(this.el),s=this.axis[e].scrollbar,n="y"===e?t.pageY:t.pageX;this.axis[e].dragOffset=n-s.rect[this.axis[e].offsetAttr],this.draggedAxis=e,this.el.classList.add(this.classNames.dragging),i.addEventListener("mousemove",this.drag,!0),i.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(i.addEventListener("click",this.preventClick,!0),i.addEventListener("dblclick",this.preventClick,!0)):(r.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)}onTrackClick(t,e="y"){if(!this.options.clickOnTrack)return;t.preventDefault();const i=qe(this.el);this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect();const r=this.axis[e].scrollbar.rect[this.axis[e].offsetAttr],s=parseInt(this.elStyles[this.axis[e].sizeAttr],10);let n=this.contentWrapperEl[this.axis[e].scrollOffsetAttr];const o=("y"===e?this.mouseY-r:this.mouseX-r)<0?-1:1,l=-1===o?n-s:n+s,a=()=>{-1===o?n>l&&(n-=40,this.contentWrapperEl[this.axis[e].scrollOffsetAttr]=n,i.requestAnimationFrame(a)):n<l&&(n+=40,this.contentWrapperEl[this.axis[e].scrollOffsetAttr]=n,i.requestAnimationFrame(a))};a()}getContentElement(){return this.contentEl}getScrollElement(){return this.contentWrapperEl}getScrollbarWidth(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:Be()}catch(t){return Be()}}removeListeners(){const t=qe(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()}unMount(){this.removeListeners(),Ye.instances.delete(this.el)}isWithinBounds(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height}findChild(t,e){const i=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,t=>i.call(t,e))[0]}}Ye.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0},Ye.instances=new WeakMap;var Xe=function(t){return function(e,i,r,s){Ot(i);var n=At(e),o=d(n),l=nt(n.length),a=t?l-1:0,c=t?-1:1;if(r<2)for(;;){if(a in o){s=o[a],a+=c;break}if(a+=c,t?a<0:l<=a)throw TypeError("Reduce of empty array with no initial value")}for(;t?a>=0:l>a;a+=c)a in o&&(s=i(s,o[a],a,n));return s}},Ue={left:Xe(!1),right:Xe(!0)}.left,Ge=Dt("reduce"),Ke=Ft("reduce",{1:0});wt({target:"Array",proto:!0,forced:!Ge||!Ke},{reduce:function(t){return Ue(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}});var Ze=k.f,Je=Function.prototype,Qe=Je.toString,ti=/^\s*function ([^ (]*)/;n&&!("name"in Je)&&Ze(Je,"name",{configurable:!0,get:function(){try{return Qe.call(this).match(ti)[1]}catch(t){return""}}});var ei=function(){var t=A(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e};function ii(t,e){return RegExp(t,e)}var ri,si,ni={UNSUPPORTED_Y:s((function(){var t=ii("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),BROKEN_CARET:s((function(){var t=ii("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},oi=RegExp.prototype.exec,li=String.prototype.replace,ai=oi,ci=(ri=/a/,si=/b*/g,oi.call(ri,"a"),oi.call(si,"a"),0!==ri.lastIndex||0!==si.lastIndex),hi=ni.UNSUPPORTED_Y||ni.BROKEN_CARET,ui=void 0!==/()??/.exec("")[1];(ci||ui||hi)&&(ai=function(t){var e,i,r,s,n=this,o=hi&&n.sticky,l=ei.call(n),a=n.source,c=0,h=t;return o&&(-1===(l=l.replace("y","")).indexOf("g")&&(l+="g"),h=String(t).slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&"\n"!==t[n.lastIndex-1])&&(a="(?: "+a+")",h=" "+h,c++),i=new RegExp("^(?:"+a+")",l)),ui&&(i=new RegExp("^"+a+"$(?!\\s)",l)),ci&&(e=n.lastIndex),r=oi.call(o?i:n,h),o?r?(r.input=r.input.slice(c),r[0]=r[0].slice(c),r.index=n.lastIndex,n.lastIndex+=r[0].length):n.lastIndex=0:ci&&r&&(n.lastIndex=n.global?r.index+r[0].length:e),ui&&r&&r.length>1&&li.call(r[0],i,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(r[s]=void 0)})),r});var fi=ai;wt({target:"RegExp",proto:!0,forced:/./.exec!==fi},{exec:fi});var di=Tt("species"),pi=!s((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),vi="$0"==="a".replace(/./,"$0"),gi=Tt("replace"),mi=!!/./[gi]&&""===/./[gi]("a","$0"),yi=!s((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]})),bi=function(t,e,i,r){var n=Tt(t),o=!s((function(){var e={};return e[n]=function(){return 7},7!=""[t](e)})),l=o&&!s((function(){var e=!1,i=/a/;return"split"===t&&((i={}).constructor={},i.constructor[di]=function(){return i},i.flags="",i[n]=/./[n]),i.exec=function(){return e=!0,null},i[n](""),!e}));if(!o||!l||"replace"===t&&(!pi||!vi||mi)||"split"===t&&!yi){var a=/./[n],c=i(n,""[t],(function(t,e,i,r,s){return e.exec===fi?o&&!s?{done:!0,value:a.call(e,i,r)}:{done:!0,value:t.call(i,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:vi,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:mi}),h=c[0],u=c[1];J(String.prototype,t,h),J(RegExp.prototype,n,2==e?function(t,e){return u.call(t,this,e)}:function(t){return u.call(t,this)})}r&&_(RegExp.prototype[n],"sham",!0)},xi=function(t){return function(e,i){var r,s,n=String(p(e)),o=rt(i),l=n.length;return o<0||o>=l?t?"":void 0:(r=n.charCodeAt(o))<55296||r>56319||o+1===l||(s=n.charCodeAt(o+1))<56320||s>57343?t?n.charAt(o):r:t?n.slice(o,o+2):s-56320+(r-55296<<10)+65536}},Ei={codeAt:xi(!1),charAt:xi(!0)}.charAt,Si=function(t,e,i){return e+(i?Ei(t,e).length:1)},wi=function(t,e){var i=t.exec;if("function"==typeof i){var r=i.call(t,e);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==u(t))throw TypeError("RegExp#exec called on incompatible receiver");return fi.call(t,e)};bi("match",1,(function(t,e,i){return[function(e){var i=p(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,i):new RegExp(e)[t](String(i))},function(t){var r=i(e,t,this);if(r.done)return r.value;var s=A(t),n=String(this);if(!s.global)return wi(s,n);var o=s.unicode;s.lastIndex=0;for(var l,a=[],c=0;null!==(l=wi(s,n));){var h=String(l[0]);a[c]=h,""===h&&(s.lastIndex=Si(n,nt(s.lastIndex),o)),c++}return 0===c?null:a}]}));var Oi=Math.max,Ai=Math.min,Li=Math.floor,ki=/\$([$&'`]|\d\d?|<[^>]*>)/g,_i=/\$([$&'`]|\d\d?)/g;bi("replace",2,(function(t,e,i,r){var s=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,n=r.REPLACE_KEEPS_$0,o=s?"$":"$0";return[function(i,r){var s=p(this),n=null==i?void 0:i[t];return void 0!==n?n.call(i,s,r):e.call(String(s),i,r)},function(t,r){if(!s&&n||"string"==typeof r&&-1===r.indexOf(o)){var a=i(e,t,this,r);if(a.done)return a.value}var c=A(t),h=String(this),u="function"==typeof r;u||(r=String(r));var f=c.global;if(f){var d=c.unicode;c.lastIndex=0}for(var p=[];;){var v=wi(c,h);if(null===v)break;if(p.push(v),!f)break;""===String(v[0])&&(c.lastIndex=Si(h,nt(c.lastIndex),d))}for(var g,m="",y=0,b=0;b<p.length;b++){v=p[b];for(var x=String(v[0]),E=Oi(Ai(rt(v.index),h.length),0),S=[],w=1;w<v.length;w++)S.push(void 0===(g=v[w])?g:String(g));var O=v.groups;if(u){var L=[x].concat(S,E,h);void 0!==O&&L.push(O);var k=String(r.apply(void 0,L))}else k=l(x,h,E,S,O,r);E>=y&&(m+=h.slice(y,E)+k,y=E+x.length)}return m+h.slice(y)}];function l(t,i,r,s,n,o){var l=r+t.length,a=s.length,c=_i;return void 0!==n&&(n=At(n),c=ki),e.call(o,c,(function(e,o){var c;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return i.slice(0,r);case"'":return i.slice(l);case"<":c=n[o.slice(1,-1)];break;default:var h=+o;if(0===h)return e;if(h>a){var u=Li(h/10);return 0===u?e:u<=a?void 0===s[u-1]?o.charAt(1):s[u-1]+o.charAt(1):e}c=s[h-1]}return void 0===c?"":c}))}}));var Mi=function(t){return Array.prototype.reduce.call(t,(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}),{})};return Ye.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),(function(t){"init"===t.getAttribute("data-simplebar")||Ye.instances.has(t)||new Ye(t,Mi(t.attributes))}))},Ye.removeObserver=function(){this.globalObserver.disconnect()},Ye.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(Ye.handleMutations),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))},Ye.handleMutations=function(t){t.forEach((function(t){Array.prototype.forEach.call(t.addedNodes,(function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?!Ye.instances.has(t)&&new Ye(t,Mi(t.attributes)):Array.prototype.forEach.call(t.querySelectorAll("[data-simplebar]"),(function(t){"init"===t.getAttribute("data-simplebar")||Ye.instances.has(t)||new Ye(t,Mi(t.attributes))})))})),Array.prototype.forEach.call(t.removedNodes,(function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?Ye.instances.has(t)&&Ye.instances.get(t).unMount():Array.prototype.forEach.call(t.querySelectorAll('[data-simplebar="init"]'),(function(t){Ye.instances.has(t)&&Ye.instances.get(t).unMount()})))}))}))},Ye.getOptions=Mi,Ye.default=Ye,Kt&&Ye.initHtmlApi(),Ye})); |
{ | ||
"version": "6.0.0-beta.5", | ||
"version": "6.0.0-beta.6", | ||
"name": "simplebar", | ||
@@ -34,3 +34,3 @@ "title": "SimpleBar.js", | ||
"core-js": "^3.6.5", | ||
"simplebar-core": "^1.0.2" | ||
"simplebar-core": "^1.0.3" | ||
}, | ||
@@ -58,3 +58,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "6664a62b06fac24ddfe1444f691d64b4f635f12f" | ||
"gitHead": "acd602c8e43513e77da3df438ae3dc7a7f217871" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
405010
6939
Updatedsimplebar-core@^1.0.3