(()=>{"use strict";const g=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var t="object"==typeof global&&global&&global.Object===Object&&global,e="object"==typeof self&&self&&self.Object===Object&&self;const i=t||e||Function("return this")(),x=function(){return i.Date.now()};var s=/\s/;const l=function(t){for(var e=t.length;e--&&s.test(t.charAt(e)););return e};var r=/^\s+/;const o=function(t){return t&&t.slice(0,l(t)+1).replace(r,"")};var t=i.Symbol,e=Object.prototype,n=e.hasOwnProperty,a=e.toString,c=t?t.toStringTag:void 0;const h=function(t){var e=n.call(t,c),i=t[c];try{var s=!(t[c]=void 0)}catch(t){}var l=a.call(t);return s&&(e?t[c]=i:delete t[c]),l};var V=Object.prototype.toString;const H=function(t){return V.call(t)};var u=t?t.toStringTag:void 0;const j=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(u&&u in Object(t)?h:H)(t)},B=function(t){return null!=t&&"object"==typeof t},_=function(t){return"symbol"==typeof t||B(t)&&"[object Symbol]"==j(t)};var q=/^[-+]0x[0-9a-f]+$/i,P=/^0b[01]+$/i,X=/^0o[0-7]+$/i,Y=parseInt;const y=function(t){if("number"==typeof t)return t;if(_(t))return NaN;if(g(t)&&(e="function"==typeof t.valueOf?t.valueOf():t,t=g(e)?e+"":e),"string"!=typeof t)return 0===t?t:+t;t=o(t);var e=P.test(t);return e||X.test(t)?Y(t.slice(2),e?2:8):q.test(t)?NaN:+t};var F=Math.max,I=Math.min;const d=function(s,i,t){var l,r,o,n,a,c,h=0,u=!1,d=!1,e=!0;if("function"!=typeof s)throw new TypeError("Expected a function");function p(t){var e=l,i=r;return l=r=void 0,h=t,n=s.apply(i,e)}function f(t){var e=t-c;return void 0===c||i<=e||e<0||d&&o<=t-h}function v(){var t,e=x();if(f(e))return m(e);a=setTimeout(v,(t=i-(e-c),d?I(t,o-(e-h)):t))}function m(t){return a=void 0,e&&l?p(t):(l=r=void 0,n)}function b(){var t=x(),e=f(t);if(l=arguments,r=this,c=t,e){if(void 0===a)return h=t=c,a=setTimeout(v,i),u?p(t):n;if(d)return clearTimeout(a),a=setTimeout(v,i),p(c)}return void 0===a&&(a=setTimeout(v,i)),n}return i=y(i)||0,g(t)&&(u=!!t.leading,o=(d="maxWait"in t)?F(y(t.maxWait)||0,i):o,e="trailing"in t?!!t.trailing:e),b.cancel=function(){void 0!==a&&clearTimeout(a),l=c=r=a=void(h=0)},b.flush=function(){return void 0===a?n:m(x())},b};var p=function(){return(p=Object.assign||function(t){for(var e,i=1,s=arguments.length;i<s;i++)for(var l in e=arguments[i])Object.prototype.hasOwnProperty.call(e,l)&&(t[l]=e[l]);return t}).apply(this,arguments)};function f(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:window}function v(t){return t&&t.ownerDocument?t.ownerDocument:document}e=function(t){return Array.prototype.reduce.call(t,function(t,e){var i=e.name.match(/data-simplebar-(.+)/);if(i){var s=i[1].replace(/\W+(.)/g,function(t,e){return e.toUpperCase()});switch(e.value){case"true":t[s]=!0;break;case"false":t[s]=!1;break;case void 0:t[s]=!0;break;default:t[s]=e.value}}return t},{})};function m(t,e){t&&(t=t.classList).add.apply(t,e.split(" "))}function b(e,t){e&&t.split(" ").forEach(function(t){e.classList.remove(t)})}function E(t){return".".concat(t.split(" ").join("."))}var O=!("undefined"==typeof window||!window.document||!window.document.createElement),t=Object.freeze({__proto__:null,addClasses:m,canUseDOM:O,classNamesToQuery:E,getElementDocument:v,getElementWindow:f,getOptions:e,removeClasses:b}),w=null,S=null;function A(){if(null===w){if("undefined"==typeof document)return w=0;var t=document.body,e=document.createElement("div"),i=(e.classList.add("simplebar-hide-scrollbar"),t.appendChild(e),e.getBoundingClientRect().right);t.removeChild(e),w=i}return w}O&&window.addEventListener("resize",function(){S!==window.devicePixelRatio&&(S=window.devicePixelRatio,w=null)});var k=f,W=v,M=m,N=b,L=E,z=(T.getRtlHelpers=function(){if(!T.rtlHelpers){var t=document.createElement("div"),t=(t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>',t.firstElementChild),e=null==t?void 0:t.firstElementChild;if(!e)return null;document.body.appendChild(t),t.scrollLeft=0;var i=T.getOffset(t),s=T.getOffset(e),e=(t.scrollLeft=-999,T.getOffset(e));document.body.removeChild(t),T.rtlHelpers={isScrollOriginAtZero:i.left!==s.left,isScrollingToNegative:s.left!==e.left}}return T.rtlHelpers},T.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:A()}catch(T){return A()}},T.getOffset=function(t){var e=t.getBoundingClientRect(),i=W(t),t=k(t);return{top:e.top+(t.pageYOffset||i.documentElement.scrollTop),left:e.left+(t.pageXOffset||i.documentElement.scrollLeft)}},T.prototype.init=function(){O&&(this.initDOM(),this.rtlHelpers=T.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},T.prototype.initDOM=function(){var t;this.wrapperEl=this.el.querySelector(L(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(L(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(L(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(L(this.classNames.offset)),this.maskEl=this.el.querySelector(L(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,L(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(L(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(L(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(L(this.classNames.track)).concat(L(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(L(this.classNames.track)).concat(L(this.classNames.vertical))),this.axis.x.scrollbar.el=(null==(t=this.axis.x.track.el)?void 0:t.querySelector(L(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=(null==(t=this.axis.y.track.el)?void 0:t.querySelector(L(this.classNames.scrollbar)))||null,this.options.autoHide||(M(this.axis.x.scrollbar.el,this.classNames.visible),M(this.axis.y.scrollbar.el,this.classNames.visible))},T.prototype.initListeners=function(){var t,e,i=this,s=k(this.el);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),null!=(e=this.contentWrapperEl)&&e.addEventListener("scroll",this.onScroll),s.addEventListener("resize",this.onWindowResize),this.contentEl&&(window.ResizeObserver&&(t=!1,e=s.ResizeObserver||ResizeObserver,this.resizeObserver=new e(function(){t&&s.requestAnimationFrame(function(){i.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),s.requestAnimationFrame(function(){t=!0})),this.mutationObserver=new s.MutationObserver(function(){s.requestAnimationFrame(function(){i.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0}))},T.prototype.recalculate=function(){var t,e,i,s,l,r,o,n;this.heightAutoObserverEl&&this.contentEl&&this.contentWrapperEl&&this.wrapperEl&&this.placeholderEl&&(n=k(this.el),this.elStyles=n.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction,n=this.contentEl.offsetWidth,r=this.heightAutoObserverEl.offsetHeight<=1,o=this.heightAutoObserverEl.offsetWidth<=1||0<n,t=this.contentWrapperEl.offsetWidth,e=this.elStyles.overflowX,i=this.elStyles.overflowY,this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft),s=this.contentEl.scrollHeight,l=this.contentEl.scrollWidth,this.contentWrapperEl.style.height=r?"auto":"100%",this.placeholderEl.style.width=o?"".concat(n||l,"px"):"auto",this.placeholderEl.style.height="".concat(s,"px"),r=this.contentWrapperEl.offsetHeight,this.axis.x.isOverflowing=0!==n&&n<l,this.axis.y.isOverflowing=r<s,this.axis.x.isOverflowing="hidden"!==e&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==i&&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(),o=this.axis.x.isOverflowing?this.scrollbarWidth:0,n=this.axis.y.isOverflowing?this.scrollbarWidth:0,this.axis.x.isOverflowing=this.axis.x.isOverflowing&&t-n<l,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&r-o<s,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(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"))},T.prototype.getScrollbarSize=function(t){var e,i;return this.axis[t=void 0===t?"y":t].isOverflowing&&this.contentEl?(e=this.contentEl[this.axis[t].scrollSizeAttr],i=null!=(t=null==(i=this.axis[t].track.el)?void 0:i[this.axis[t].offsetSizeAttr])?t:0,t=Math.max(~~(i/e*i),this.options.scrollbarMinSize),this.options.scrollbarMaxSize?Math.min(t,this.options.scrollbarMaxSize):t):0},T.prototype.positionScrollbar=function(t){var e,i,s,l,r,o=this.axis[t=void 0===t?"y":t].scrollbar;this.axis[t].isOverflowing&&this.contentWrapperEl&&o.el&&this.elStyles&&(e=this.contentWrapperEl[this.axis[t].scrollSizeAttr],i=(null==(i=this.axis[t].track.el)?void 0:i[this.axis[t].offsetSizeAttr])||0,s=parseInt(this.elStyles[this.axis[t].sizeAttr],10),l=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],l="x"===t&&this.isRtl&&null!=(r=T.getRtlHelpers())&&r.isScrollOriginAtZero?-l:l,"x"===t&&this.isRtl&&(l=null!=(r=T.getRtlHelpers())&&r.isScrollingToNegative?l:-l),r=~~((i-o.size)*(l/(e-s))),r="x"===t&&this.isRtl?-r+(i-o.size):r,o.el.style.transform="x"===t?"translate3d(".concat(r,"px, 0, 0)"):"translate3d(0, ".concat(r,"px, 0)"))},T.prototype.toggleTrackVisibility=function(t){var e=this.axis[t=void 0===t?"y":t].track.el,i=this.axis[t].scrollbar.el;e&&i&&this.contentWrapperEl&&(this.axis[t].isOverflowing||this.axis[t].forceVisible?(e.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(e.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?i.style.display="block":i.style.display="none")},T.prototype.showScrollbar=function(t){this.axis[t=void 0===t?"y":t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(M(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},T.prototype.hideScrollbar=function(t){void 0===t&&(t="y"),this.isDragging||this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(N(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},T.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},T.prototype.onMouseMoveForAxis=function(t){var e=this.axis[t=void 0===t?"y":t];e.track.el&&e.scrollbar.el&&(e.track.rect=e.track.el.getBoundingClientRect(),e.scrollbar.rect=e.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(e.track.rect)?(this.showScrollbar(t),M(e.track.el,this.classNames.hover),(this.isWithinBounds(e.scrollbar.rect)?M:N)(e.scrollbar.el,this.classNames.hover)):(N(e.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},T.prototype.onMouseLeaveForAxis=function(t){N(this.axis[t=void 0===t?"y":t].track.el,this.classNames.hover),N(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},T.prototype.onDragStart=function(t,e){void 0===e&&(e="y"),this.isDragging=!0;var i=W(this.el),s=k(this.el),l=this.axis[e].scrollbar,t="y"===e?t.pageY:t.pageX;this.axis[e].dragOffset=t-((null==(t=l.rect)?void 0:t[this.axis[e].offsetAttr])||0),this.draggedAxis=e,M(this.el,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)):(s.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},T.prototype.onTrackClick=function(t,e){var i,s,l,r,o,n=this,a=(void 0===e&&(e="y"),this.axis[e]);this.options.clickOnTrack&&a.scrollbar.el&&this.contentWrapperEl&&(t.preventDefault(),i=k(this.el),this.axis[e].scrollbar.rect=a.scrollbar.el.getBoundingClientRect(),t=null!=(a=null==(t=this.axis[e].scrollbar.rect)?void 0:t[this.axis[e].offsetAttr])?a:0,a=parseInt(null!=(a=null==(a=this.elStyles)?void 0:a[this.axis[e].sizeAttr])?a:"0px",10),s=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],l=("y"===e?this.mouseY-t:this.mouseX-t)<0?-1:1,r=-1===l?s-a:s+a,(o=function(){n.contentWrapperEl&&(-1===l?r<s&&(s-=40,n.contentWrapperEl[n.axis[e].scrollOffsetAttr]=s,i.requestAnimationFrame(o)):s<r&&(s+=40,n.contentWrapperEl[n.axis[e].scrollOffsetAttr]=s,i.requestAnimationFrame(o)))})())},T.prototype.getContentElement=function(){return this.contentEl},T.prototype.getScrollElement=function(){return this.contentWrapperEl},T.prototype.removeListeners=function(){var t=k(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&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},T.prototype.unMount=function(){this.removeListeners()},T.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},T.prototype.findChild=function(t,e){var i=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,function(t){return i.call(t,e)})[0]},T.rtlHelpers=null,T.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,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"},scrollableNode:null,contentNode:null,autoHide:!0},T.getOptions=e,T.helpers=t,T),C=function(t,e){return(C=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}))(t,e)};function T(t,e){void 0===e&&(e={});var o=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var t=k(o.el);o.scrollXTicking||(t.requestAnimationFrame(o.scrollX),o.scrollXTicking=!0),o.scrollYTicking||(t.requestAnimationFrame(o.scrollY),o.scrollYTicking=!0),o.isScrolling||(o.isScrolling=!0,M(o.el,o.classNames.scrolling)),o.showScrollbar("x"),o.showScrollbar("y"),o.onStopScrolling()},this.scrollX=function(){o.axis.x.isOverflowing&&o.positionScrollbar("x"),o.scrollXTicking=!1},this.scrollY=function(){o.axis.y.isOverflowing&&o.positionScrollbar("y"),o.scrollYTicking=!1},this._onStopScrolling=function(){N(o.el,o.classNames.scrolling),o.options.autoHide&&(o.hideScrollbar("x"),o.hideScrollbar("y")),o.isScrolling=!1},this.onMouseEnter=function(){o.isMouseEntering||(M(o.el,o.classNames.mouseEntered),o.showScrollbar("x"),o.showScrollbar("y"),o.isMouseEntering=!0),o.onMouseEntered()},this._onMouseEntered=function(){N(o.el,o.classNames.mouseEntered),o.options.autoHide&&(o.hideScrollbar("x"),o.hideScrollbar("y")),o.isMouseEntering=!1},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=o.getScrollbarWidth(),o.hideNativeScrollbar()},this.onPointerEvent=function(t){var e,i;o.axis.x.track.el&&o.axis.y.track.el&&o.axis.x.scrollbar.el&&o.axis.y.scrollbar.el&&(o.axis.x.track.rect=o.axis.x.track.el.getBoundingClientRect(),o.axis.y.track.rect=o.axis.y.track.el.getBoundingClientRect(),(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&(e=o.isWithinBounds(o.axis.x.track.rect)),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&(i=o.isWithinBounds(o.axis.y.track.rect)),e||i)&&(t.stopPropagation(),"pointerdown"===t.type)&&"touch"!==t.pointerType&&(e&&(o.axis.x.scrollbar.rect=o.axis.x.scrollbar.el.getBoundingClientRect(),o.isWithinBounds(o.axis.x.scrollbar.rect)?o.onDragStart(t,"x"):o.onTrackClick(t,"x")),i)&&(o.axis.y.scrollbar.rect=o.axis.y.scrollbar.el.getBoundingClientRect(),o.isWithinBounds(o.axis.y.scrollbar.rect)?o.onDragStart(t,"y"):o.onTrackClick(t,"y"))},this.drag=function(t){var e,i,s,l,r;o.draggedAxis&&o.contentWrapperEl&&(e=null!=(e=null==(e=(r=o.axis[o.draggedAxis].track).rect)?void 0:e[o.axis[o.draggedAxis].sizeAttr])?e:0,i=o.axis[o.draggedAxis].scrollbar,s=null!=(s=null==(s=o.contentWrapperEl)?void 0:s[o.axis[o.draggedAxis].scrollSizeAttr])?s:0,l=parseInt(null!=(l=null==(l=o.elStyles)?void 0:l[o.axis[o.draggedAxis].sizeAttr])?l:"0px",10),t.preventDefault(),t.stopPropagation(),t=("y"===o.draggedAxis?t.pageY:t.pageX)-(null!=(t=null==(t=r.rect)?void 0:t[o.axis[o.draggedAxis].offsetAttr])?t:0)-o.axis[o.draggedAxis].dragOffset,r=(t="x"===o.draggedAxis&&o.isRtl?(null!=(r=null==(r=r.rect)?void 0:r[o.axis[o.draggedAxis].sizeAttr])?r:0)-i.size-t:t)/(e-i.size)*(s-l),"x"===o.draggedAxis&&o.isRtl&&(r=null!=(t=T.getRtlHelpers())&&t.isScrollingToNegative?-r:r),o.contentWrapperEl[o.axis[o.draggedAxis].scrollOffsetAttr]=r)},this.onEndDrag=function(t){o.isDragging=!1;var e=W(o.el),i=k(o.el);t.preventDefault(),t.stopPropagation(),N(o.el,o.classNames.dragging),o.onStopScrolling(),e.removeEventListener("mousemove",o.drag,!0),e.removeEventListener("mouseup",o.onEndDrag,!0),o.removePreventClickId=i.setTimeout(function(){e.removeEventListener("click",o.preventClick,!0),e.removeEventListener("dblclick",o.preventClick,!0),o.removePreventClickId=null})},this.preventClick=function(t){t.preventDefault(),t.stopPropagation()},this.el=t,this.options=p(p({},T.defaultOptions),e),this.classNames=p(p({},T.defaultOptions.classNames),e.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},"object"!=typeof this.el||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=function(t,e,i){var s=!0,l=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return g(i)&&(s="leading"in i?!!i.leading:s,l="trailing"in i?!!i.trailing:l),d(t,e,{leading:s,maxWait:e,trailing:l})}(this._onMouseMove,64),this.onWindowResize=d(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=d(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=d(this._onMouseEntered,this.stopScrollDelay),this.init()}var e=z.helpers,D=e.getOptions,R=e.addClasses,t=e.canUseDOM,e=function(s){function l(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=s.apply(this,t)||this;return l.instances.set(t[0],i),i}var t=l,e=s;if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}return C(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i),l.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")||l.instances.has(t)||new l(t,D(t.attributes))})},l.removeObserver=function(){var t;null!=(t=l.globalObserver)&&t.disconnect()},l.prototype.initDOM=function(){var t,e,i=this;if(!Array.prototype.filter.call(this.el.children,function(t){return t.classList.contains(i.classNames.wrapper)}).length){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"),R(this.wrapperEl,this.classNames.wrapper),R(this.contentWrapperEl,this.classNames.contentWrapper),R(this.offsetEl,this.classNames.offset),R(this.maskEl,this.classNames.mask),R(this.contentEl,this.classNames.contentEl),R(this.placeholderEl,this.classNames.placeholder),R(this.heightAutoObserverWrapperEl,this.classNames.heightAutoObserverWrapperEl),R(this.heightAutoObserverEl,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),null!=(t=this.contentWrapperEl)&&t.setAttribute("tabindex",this.options.tabIndex.toString()),null!=(t=this.contentWrapperEl)&&t.setAttribute("role","region"),null!=(t=this.contentWrapperEl)&&t.setAttribute("aria-label",this.options.ariaLabel)}this.axis.x.track.el&&this.axis.y.track.el||(t=document.createElement("div"),e=document.createElement("div"),R(t,this.classNames.track),R(e,this.classNames.scrollbar),t.appendChild(e),this.axis.x.track.el=t.cloneNode(!0),R(this.axis.x.track.el,this.classNames.horizontal),this.axis.y.track.el=t.cloneNode(!0),R(this.axis.y.track.el,this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)),z.prototype.initDOM.call(this),this.el.setAttribute("data-simplebar","init")},l.prototype.unMount=function(){z.prototype.unMount.call(this),l.instances["delete"](this.el)},l.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(l.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))},l.handleMutations=function(t){t.forEach(function(t){t.addedNodes.forEach(function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?!l.instances.has(t)&&document.documentElement.contains(t)&&new l(t,D(t.attributes)):t.querySelectorAll("[data-simplebar]").forEach(function(t){"init"!==t.getAttribute("data-simplebar")&&!l.instances.has(t)&&document.documentElement.contains(t)&&new l(t,D(t.attributes))}))}),t.removedNodes.forEach(function(t){var e;1===t.nodeType&&("init"===t.getAttribute("data-simplebar")?document.documentElement.contains(t)||null!=(e=l.instances.get(t))&&e.unMount():Array.prototype.forEach.call(t.querySelectorAll('[data-simplebar="init"]'),function(t){document.documentElement.contains(t)||null!=(t=l.instances.get(t))&&t.unMount()}))})})},l.instances=new WeakMap,l}(z);t&&e.initHtmlApi(),ywar.SimpleBar=e})();