").css(n.extend({left:"-1000px",overflow:"scroll",position:"absolute",top:"-1000px"},r)).append(t.data.inner).appendTo("body")}return t.data.outer.scrollLeft(1e3).scrollTop(1e3),{height:Math.ceil(t.data.outer.offset().top-t.data.inner.offset().top||0),width:Math.ceil(t.data.outer.offset().left-t.data.inner.offset().left||0)}}function h(){var n=f(!0);return!(n.height||n.width)}function e(n){var t=n.originalEvent;return t.axis&&t.axis===t.HORIZONTAL_AXIS?!1:t.wheelDeltaX?!1:!0}var s=!1,t={data:{index:0,name:"scrollbar"},firefox:/firefox/i.test(navigator.userAgent),macosx:/mac/i.test(navigator.platform),msedge:/edge\/\d+/i.test(navigator.userAgent),msie:/(msie|trident)/i.test(navigator.userAgent),mobile:/android|webos|iphone|ipad|ipod|blackberry/i.test(navigator.userAgent),overlay:null,scroll:null,scrolls:[],webkit:/webkit/i.test(navigator.userAgent)&&!/edge\/\d+/i.test(navigator.userAgent)},r,u,o,i;t.scrolls.add=function(n){this.remove(n).push(n)};t.scrolls.remove=function(t){while(n.inArray(t,this)>=0)this.splice(n.inArray(t,this),1);return this};r={autoScrollSize:!0,autoUpdate:!0,debug:!1,disableBodyScroll:!1,duration:200,ignoreMobile:!1,ignoreOverlay:!1,isRtl:!1,scrollStep:30,showArrows:!1,stepScrolling:!0,scrollx:null,scrolly:null,onDestroy:null,onFallback:null,onInit:null,onScroll:null,onUpdate:null};u=function(u){t.scroll||(t.overlay=h(),t.scroll=f(),i(),n(window).resize(function(){var r=!1,n;t.scroll&&(t.scroll.height||t.scroll.width)&&(n=f(),(n.height!==t.scroll.height||n.width!==t.scroll.width)&&(t.scroll=n,r=!0));i(r)}));this.container=u;this.namespace=".scrollbar_"+t.data.index++;this.options=n.extend({},r,window.jQueryScrollbarOptions||{});this.scrollTo=null;this.scrollx={};this.scrolly={};u.data(t.data.name,this);t.scrolls.add(this)};u.prototype={destroy:function(){if(this.wrapper){this.container.removeData(t.data.name);t.scrolls.remove(this);var i=this.container.scrollLeft(),r=this.container.scrollTop();this.container.insertBefore(this.wrapper).css({height:"",margin:"","max-height":""}).removeClass("scroll-content scroll-scrollx_visible scroll-scrolly_visible").off(this.namespace).scrollLeft(i).scrollTop(r);this.scrollx.scroll.removeClass("scroll-scrollx_visible").find("div").addBack().off(this.namespace);this.scrolly.scroll.removeClass("scroll-scrolly_visible").find("div").addBack().off(this.namespace);this.wrapper.remove();n(document).add("body").off(this.namespace);n.isFunction(this.options.onDestroy)&&this.options.onDestroy.apply(this,[this.container])}},init:function(i){var o=this,r=this.container,l=this.containerWrapper||r,s=this.namespace,u=n.extend(this.options,i||{}),f={x:this.scrollx,y:this.scrolly},h=this.wrapper,c={},v={scrollLeft:r.scrollLeft(),scrollTop:r.scrollTop()},a;if(t.mobile&&u.ignoreMobile||t.overlay&&u.ignoreOverlay||t.macosx&&!t.webkit)return n.isFunction(u.onFallback)&&u.onFallback.apply(this,[r]),!1;if(h)c={height:"auto","margin-bottom":t.scroll.height*-1+"px","max-height":""},c[u.isRtl?"margin-left":"margin-right"]=t.scroll.width*-1+"px",l.css(c);else{this.wrapper=h=n("
").addClass("scroll-wrapper").addClass(r.attr("class")).css("position",r.css("position")==="absolute"?"absolute":"relative").insertBefore(r).append(r);u.isRtl&&h.addClass("scroll--rtl");r.is("textarea")&&(this.containerWrapper=l=n("
").insertBefore(r).append(r),h.addClass("scroll-textarea"));c={height:"auto","margin-bottom":t.scroll.height*-1+"px","max-height":""};c[u.isRtl?"margin-left":"margin-right"]=t.scroll.width*-1+"px";l.addClass("scroll-content").css(c);r.on("scroll"+s,function(){var i=r.scrollLeft(),e=r.scrollTop();if(u.isRtl)switch(!0){case t.firefox:i=Math.abs(i);case t.msedge||t.msie:i=r[0].scrollWidth-r[0].clientWidth-i}n.isFunction(u.onScroll)&&u.onScroll.call(o,{maxScroll:f.y.maxScrollOffset,scroll:e,size:f.y.size,visible:f.y.visible},{maxScroll:f.x.maxScrollOffset,scroll:i,size:f.x.size,visible:f.x.visible});f.x.isVisible&&f.x.scroll.bar.css("left",i*f.x.kx+"px");f.y.isVisible&&f.y.scroll.bar.css("top",e*f.y.kx+"px")});h.on("scroll"+s,function(){h.scrollTop(0).scrollLeft(0)});if(u.disableBodyScroll){a=function(n){e(n)?f.y.isVisible&&f.y.mousewheel(n):f.x.isVisible&&f.x.mousewheel(n)};h.on("MozMousePixelScroll"+s,a);h.on("mousewheel"+s,a);if(t.mobile)h.on("touchstart"+s,function(t){var i=t.originalEvent.touches&&t.originalEvent.touches[0]||t,u={pageX:i.pageX,pageY:i.pageY},f={left:r.scrollLeft(),top:r.scrollTop()};n(document).on("touchmove"+s,function(n){var t=n.originalEvent.targetTouches&&n.originalEvent.targetTouches[0]||n;r.scrollLeft(f.left+u.pageX-t.pageX);r.scrollTop(f.top+u.pageY-t.pageY);n.preventDefault()});n(document).on("touchend"+s,function(){n(document).off(s)})})}n.isFunction(u.onInit)&&u.onInit.apply(this,[r])}n.each(f,function(i,h){var y=null,a=1,l=i==="x"?"scrollLeft":"scrollTop",v=u.scrollStep,p=function(){var n=r[l]();r[l](n+v);a==1&&n+v>=c&&(n=r[l]());a==-1&&n+v<=c&&(n=r[l]());r[l]()==n&&y&&y()},c=0;if(!h.scroll){h.scroll=o._getScroll(u["scroll"+i]).addClass("scroll-"+i);u.showArrows&&h.scroll.addClass("scroll-element_arrows_visible");h.mousewheel=function(n){if(!h.isVisible||i==="x"&&e(n))return!0;if(i==="y"&&!e(n))return f.x.mousewheel(n),!0;var t=n.originalEvent.wheelDelta*-1||n.originalEvent.detail,u=h.size-h.visible-h.offset;return t||(i!=="x"||!n.originalEvent.deltaX?i!=="y"||!n.originalEvent.deltaY||(t=n.originalEvent.deltaY*40):t=n.originalEvent.deltaX*40),(t>0&&c
0)&&(c=c+t,c<0&&(c=0),c>u&&(c=u),o.scrollTo=o.scrollTo||{},o.scrollTo[l]=c,setTimeout(function(){o.scrollTo&&(r.stop().animate(o.scrollTo,240,"linear",function(){c=r[l]()}),o.scrollTo=null)},1)),n.preventDefault(),!1};h.scroll.on("MozMousePixelScroll"+s,h.mousewheel).on("mousewheel"+s,h.mousewheel).on("mouseenter"+s,function(){c=r[l]()});h.scroll.find(".scroll-arrow, .scroll-element_track").on("mousedown"+s,function(f){if(f.which!=1)return!0;a=1;var e={eventOffset:f[i==="x"?"pageX":"pageY"],maxScrollValue:h.size-h.visible-h.offset,scrollbarOffset:h.scroll.bar.offset()[i==="x"?"left":"top"],scrollbarSize:h.scroll.bar[i==="x"?"outerWidth":"outerHeight"]()},s=0,w=0;if(n(this).hasClass("scroll-arrow")){if(a=n(this).hasClass("scroll-arrow_more")?1:-1,v=u.scrollStep*a,c=a>0?e.maxScrollValue:0,u.isRtl)switch(!0){case t.firefox:c=a>0?0:e.maxScrollValue*-1}}else a=e.eventOffset>e.scrollbarOffset+e.scrollbarSize?1:e.eventOffset