Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nicescroll

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nicescroll - npm Package Compare versions

Comparing version 3.7.2 to 3.7.3

4

dist/jquery.nicescroll.min.js

@@ -1,2 +0,2 @@

/* nicescroll v3.7.2 InuYaksa - MIT - https://nicescroll.areaaperta.com */
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){"use strict";var o=!1,t=!1,r=0,i=2e3,s=0,n=e,l=l,a=n(window),c=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||!1}(),d=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||!1}();if(c)window.cancelAnimationFrame||(d=function(e){});else{var u=0;c=function(e,o){var t=(new Date).getTime(),r=Math.max(0,16-(t-u)),i=window.setTimeout(function(){e(t+r)},r);return u=t+r,i},d=function(e){window.clearTimeout(e)}}var h=window.MutationObserver||window.WebKitMutationObserver||!1,p=Date.now||function(){return(new Date).getTime()},m={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:60,mousescrollstep:24,touchbehavior:!1,emulatetouch:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:function(){var e=l.currentScript||function(){var e=l.getElementsByTagName("script");return!!e.length&&e[e.length-1]}(),o=e?e.src.split("?")[0]:"";return o.split("/").length>0?o.split("/").slice(0,-1).join("/")+"/":""}(),preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1},f=!1,g=function(){if(f)return f;var e=l.createElement("DIV"),o=e.style,t=navigator.userAgent,r=navigator.platform,i={};return i.haspointerlock="pointerLockElement"in l||"webkitPointerLockElement"in l||"mozPointerLockElement"in l,i.isopera="opera"in window,i.isopera12=i.isopera&&"getUserMedia"in navigator,i.isoperamini="[object OperaMini]"===Object.prototype.toString.call(window.operamini),i.isie="all"in l&&"attachEvent"in e&&!i.isopera,i.isieold=i.isie&&!("msInterpolationMode"in o),i.isie7=i.isie&&!i.isieold&&(!("documentMode"in l)||7===l.documentMode),i.isie8=i.isie&&"documentMode"in l&&8===l.documentMode,i.isie9=i.isie&&"performance"in window&&9===l.documentMode,i.isie10=i.isie&&"performance"in window&&10===l.documentMode,i.isie11="msRequestFullscreen"in e&&l.documentMode>=11,i.ismsedge="msCredentials"in window,i.ismozilla="MozAppearance"in o,i.iswebkit=!i.ismsedge&&"WebkitAppearance"in o,i.ischrome=i.iswebkit&&"chrome"in window,i.ischrome38=i.ischrome&&"touchAction"in o,i.ischrome22=!i.ischrome38&&i.ischrome&&i.haspointerlock,i.ischrome26=!i.ischrome38&&i.ischrome&&"transition"in o,i.cantouch="ontouchstart"in l.documentElement||"ontouchstart"in window,i.hasw3ctouch=(window.PointerEvent||!1)&&(navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0),i.hasmstouch=!i.hasw3ctouch&&(window.MSPointerEvent||!1),i.ismac=/^mac$/i.test(r),i.isios=i.cantouch&&/iphone|ipad|ipod/i.test(r),i.isios4=i.isios&&!("seal"in Object),i.isios7=i.isios&&"webkitHidden"in l,i.isios8=i.isios&&"hidden"in l,i.isios10=i.isios&&window.Proxy,i.isandroid=/android/i.test(t),i.haseventlistener="addEventListener"in e,i.trstyle=!1,i.hastransform=!1,i.hastranslate3d=!1,i.transitionstyle=!1,i.hastransition=!1,i.transitionend=!1,i.trstyle="transform",i.hastransform="transform"in o||function(){for(var e=["msTransform","webkitTransform","MozTransform","OTransform"],t=0,r=e.length;t<r;t++)if(void 0!==o[e[t]]){i.trstyle=e[t];break}i.hastransform=!!i.trstyle}(),i.hastransform&&(o[i.trstyle]="translate3d(1px,2px,3px)",i.hastranslate3d=/translate3d/.test(o[i.trstyle])),i.transitionstyle="transition",i.prefixstyle="",i.transitionend="transitionend",i.hastransition="transition"in o||function(){i.transitionend=!1;for(var e=["webkitTransition","msTransition","MozTransition","OTransition","OTransition","KhtmlTransition"],t=["-webkit-","-ms-","-moz-","-o-","-o","-khtml-"],r=["webkitTransitionEnd","msTransitionEnd","transitionend","otransitionend","oTransitionEnd","KhtmlTransitionEnd"],s=0,n=e.length;s<n;s++)if(e[s]in o){i.transitionstyle=e[s],i.prefixstyle=t[s],i.transitionend=r[s];break}i.ischrome26&&(i.prefixstyle=t[1]),i.hastransition=i.transitionstyle}(),i.cursorgrabvalue=function(){var e=["grab","-webkit-grab","-moz-grab"];(i.ischrome&&!i.ischrome38||i.isie)&&(e=[]);for(var t=0,r=e.length;t<r;t++){var s=e[t];if(o.cursor=s,o.cursor==s)return s}return"url(https://cdnjs.cloudflare.com/ajax/libs/slider-pro/1.3.0/css/images/openhand.cur),n-resize"}(),i.hasmousecapture="setCapture"in e,i.hasMutationObserver=!1!==h,e=null,f=i,i},w=function(e,u){function f(){var e=S.doc.css(E.trstyle);return!(!e||"matrix"!=e.substr(0,6))&&e.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/)}function w(){var e=S.win;if("zIndex"in e)return e.zIndex();for(;e.length>0;){if(9==e[0].nodeType)return!1;var o=e.css("zIndex");if(!isNaN(o)&&0!=o)return parseInt(o);e=e.parent()}return!1}function b(e,o,t){var r=e.css(o),i=parseFloat(r);if(isNaN(i)){var s=3==(i=P[r]||0)?t?S.win.outerHeight()-S.win.innerHeight():S.win.outerWidth()-S.win.innerWidth():1;return S.isie8&&i&&(i+=1),s?i:0}return i}function y(e,o,t,r){S._bind(e,o,function(r){var i={original:r=r||window.event,target:r.target||r.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==r.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return r.preventDefault?r.preventDefault():r.returnValue=!1,!1},stopImmediatePropagation:function(){r.stopImmediatePropagation?r.stopImmediatePropagation():r.cancelBubble=!0}};return"mousewheel"==o?(r.wheelDeltaX&&(i.deltaX=-.025*r.wheelDeltaX),r.wheelDeltaY&&(i.deltaY=-.025*r.wheelDeltaY),!i.deltaY&&!i.deltaX&&(i.deltaY=-.025*r.wheelDelta)):i.deltaY=r.detail,t.call(e,i)},r)}function x(e,o,t){var r,i;if(0==e.deltaMode?(r=-Math.floor(e.deltaX*(S.opt.mousescrollstep/54)),i=-Math.floor(e.deltaY*(S.opt.mousescrollstep/54))):1==e.deltaMode&&(r=-Math.floor(e.deltaX*S.opt.mousescrollstep),i=-Math.floor(e.deltaY*S.opt.mousescrollstep)),o&&S.opt.oneaxismousemode&&0===r&&i&&(r=i,i=0,t&&(r<0?S.getScrollLeft()>=S.page.maxw:S.getScrollLeft()<=0)&&(i=r,r=0)),S.isrtlmode&&(r=-r),r){if(S.scrollmom)S.scrollmom.stop();else if(r<0){if(S.getScrollLeft()>=S.page.maxw)return!0}else if(S.getScrollLeft()<=0)return!0;S.lastdeltax+=r,S.debounced("mousewheelx",function(){var e=S.lastdeltax;S.lastdeltax=0,S.rail.drag||S.doScrollLeftBy(e)},15)}if(i){if(S.opt.nativeparentscrolling&&t&&!S.ispage&&!S.zoomactive)if(i<0){if(S.getScrollTop()>=S.page.maxh)return!0}else if(S.getScrollTop()<=0)return!0;S.scrollmom&&S.scrollmom.stop(),S.lastdeltay+=i,S.synched("mousewheely",function(){var e=S.lastdeltay;S.lastdeltay=0,S.rail.drag||S.doScrollBy(e)},15)}return e.stopImmediatePropagation(),e.preventDefault()}var S=this;this.version="3.7.2",this.name="nicescroll",this.me=u;var z=n("body");if(this.opt={doc:z,win:!1},n.extend(this.opt,m),this.opt.snapbackspeed=80,e)for(var k in S.opt)void 0!==e[k]&&(S.opt[k]=e[k]);if(S.opt.disablemutationobserver&&(h=!1),this.doc=S.opt.doc,this.iddoc=this.doc&&this.doc[0]?this.doc[0].id||"":"",this.ispage=/^BODY|HTML/.test(S.opt.win?S.opt.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=!1!==S.opt.win,this.win=S.opt.win||(this.ispage?a:this.doc),this.docscroll=this.ispage&&!this.haswrapper?a:this.win,this.body=z,this.viewport=!1,this.isfixed=!1,this.iframe=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=S.opt.autohidemode,this.onmousedown=!1,this.onmouseup=!1,this.onmousemove=!1,this.onmousewheel=!1,this.onkeypress=!1,this.ongesturezoom=!1,this.onclick=!1,this.onscrollstart=!1,this.onscrollend=!1,this.onscrollcancel=!1,this.onzoomin=!1,this.onzoomout=!1,this.view=!1,this.page=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,"auto"==this.opt.rtlmode){var T=this.win[0]==window?this.body:this.win,M=T.css("writing-mode")||T.css("-webkit-writing-mode")||T.css("-ms-writing-mode")||T.css("-moz-writing-mode");"horizontal-tb"==M||"lr-tb"==M||""==M?(this.isrtlmode="rtl"==T.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==M||"tb"==M||"tb-rl"==M||"rl-tb"==M,this.isvertical="vertical-rl"==M||"tb"==M||"tb-rl"==M)}else this.isrtlmode=!0===this.opt.rtlmode,this.isvertical=!1;if(this.scrollrunning=!1,this.scrollmom=!1,this.observer=!1,this.observerremover=!1,this.observerbody=!1,!1===S.opt.scrollbarid)do{this.id="ascrail"+i++}while(l.getElementById(this.id));else this.id=S.opt.scrollbarid;this.rail=!1,this.cursor=!1,this.cursorfreezed=!1,this.selectiondrag=!1,this.zoom=!1,this.zoomactive=!1,this.hasfocus=!1,this.hasmousefocus=!1,this.visibility=!0,this.railslocked=!1,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=S.opt.overflowx,this.overflowy=S.opt.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=g();var E=n.extend({},this.detected);this.canhwscroll=E.hastransform&&S.opt.hwacceleration,this.ishwscroll=this.canhwscroll&&S.haswrapper,this.isrtlmode?this.isvertical?this.hasreversehr=!(E.iswebkit||E.isie||E.isie11):this.hasreversehr=!(E.iswebkit||E.isie&&!E.isie10&&!E.isie11):this.hasreversehr=!1,this.istouchcapable=!1,E.cantouch||!E.hasw3ctouch&&!E.hasmstouch?!E.cantouch||E.isios||E.isandroid||!E.iswebkit&&!E.ismozilla||(this.istouchcapable=!0):this.istouchcapable=!0,S.opt.enablemouselockapi||(E.hasmousecapture=!1,E.haspointerlock=!1),this.debounced=function(e,o,t){S&&(S.delaylist[e]||!1||(S.delaylist[e]={h:c(function(){S.delaylist[e].fn.call(S),S.delaylist[e]=!1},t)},o.call(S)),S.delaylist[e].fn=o)};var L=!1;this.synched=function(e,o){return S.synclist[e]=o,function(){L||(c(function(){if(S){L=!1;for(var e in S.synclist){var o=S.synclist[e];o&&o.call(S),S.synclist[e]=!1}}}),L=!0)}(),e},this.unsynched=function(e){S.synclist[e]&&(S.synclist[e]=!1)},this.css=function(e,o){for(var t in o)S.saved.css.push([e,t,e.css(t)]),e.css(t,o[t])},this.scrollTop=function(e){return void 0===e?S.getScrollTop():S.setScrollTop(e)},this.scrollLeft=function(e){return void 0===e?S.getScrollLeft():S.setScrollLeft(e)};var C=function(e,o,t,r,i,s,n){this.st=e,this.ed=o,this.spd=t,this.p1=r||0,this.p2=i||1,this.p3=s||0,this.p4=n||1,this.ts=p(),this.df=this.ed-this.st};if(C.prototype={B2:function(e){return 3*e*e*(1-e)},B3:function(e){return 3*e*(1-e)*(1-e)},B4:function(e){return(1-e)*(1-e)*(1-e)},getNow:function(){var e=1-(p()-this.ts)/this.spd,o=this.B2(e)+this.B3(e)+this.B4(e);return e<0?this.ed:this.st+Math.round(this.df*o)},update:function(e,o){return this.st=this.getNow(),this.ed=e,this.spd=o,this.ts=p(),this.df=this.ed-this.st,this}},this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},E.hastranslate3d&&E.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(e){if(!e){var o=f();if(o)return 16==o.length?-o[13]:-o[5];if(S.timerscroll&&S.timerscroll.bz)return S.timerscroll.bz.getNow()}return S.doc.translate.y},this.getScrollLeft=function(e){if(!e){var o=f();if(o)return 16==o.length?-o[12]:-o[4];if(S.timerscroll&&S.timerscroll.bh)return S.timerscroll.bh.getNow()}return S.doc.translate.x},this.notifyScrollEvent=function(e){var o=l.createEvent("UIEvents");o.initUIEvent("scroll",!1,!0,window,1),o.niceevent=!0,e.dispatchEvent(o)};var N=this.isrtlmode?1:-1;E.hastranslate3d&&S.opt.enabletranslate3d?(this.setScrollTop=function(e,o){S.doc.translate.y=e,S.doc.translate.ty=-1*e+"px",S.doc.css(E.trstyle,"translate3d("+S.doc.translate.tx+","+S.doc.translate.ty+",0)"),o||S.notifyScrollEvent(S.win[0])},this.setScrollLeft=function(e,o){S.doc.translate.x=e,S.doc.translate.tx=e*N+"px",S.doc.css(E.trstyle,"translate3d("+S.doc.translate.tx+","+S.doc.translate.ty+",0)"),o||S.notifyScrollEvent(S.win[0])}):(this.setScrollTop=function(e,o){S.doc.translate.y=e,S.doc.translate.ty=-1*e+"px",S.doc.css(E.trstyle,"translate("+S.doc.translate.tx+","+S.doc.translate.ty+")"),o||S.notifyScrollEvent(S.win[0])},this.setScrollLeft=function(e,o){S.doc.translate.x=e,S.doc.translate.tx=e*N+"px",S.doc.css(E.trstyle,"translate("+S.doc.translate.tx+","+S.doc.translate.ty+")"),o||S.notifyScrollEvent(S.win[0])})}else this.getScrollTop=function(){return S.docscroll.scrollTop()},this.setScrollTop=function(e){return setTimeout(function(){S&&S.docscroll.scrollTop(e)},1)},this.getScrollLeft=function(){return S.hasreversehr?S.detected.ismozilla?S.page.maxw-Math.abs(S.docscroll.scrollLeft()):S.page.maxw-S.docscroll.scrollLeft():S.docscroll.scrollLeft()},this.setScrollLeft=function(e){return setTimeout(function(){if(S)return S.hasreversehr&&(e=S.detected.ismozilla?-(S.page.maxw-e):S.page.maxw-e),S.docscroll.scrollLeft(e)},1)};this.getTarget=function(e){return!!e&&(e.target?e.target:!!e.srcElement&&e.srcElement)},this.hasParent=function(e,o){if(!e)return!1;for(var t=e.target||e.srcElement||e||!1;t&&t.id!=o;)t=t.parentNode||!1;return!1!==t};var P={thin:1,medium:3,thick:5};this.getDocumentScrollOffset=function(){return{top:window.pageYOffset||l.documentElement.scrollTop,left:window.pageXOffset||l.documentElement.scrollLeft}},this.getOffset=function(){if(S.isfixed){var e=S.win.offset(),o=S.getDocumentScrollOffset();return e.top-=o.top,e.left-=o.left,e}var t=S.win.offset();if(!S.viewport)return t;var r=S.viewport.offset();return{top:t.top-r.top,left:t.left-r.left}},this.updateScrollBar=function(e){var o,t;if(S.ishwscroll)S.rail.css({height:S.win.innerHeight()-(S.opt.railpadding.top+S.opt.railpadding.bottom)}),S.railh&&S.railh.css({width:S.win.innerWidth()-(S.opt.railpadding.left+S.opt.railpadding.right)});else{var r=S.getOffset();if(o={top:r.top,left:r.left-(S.opt.railpadding.left+S.opt.railpadding.right)},o.top+=b(S.win,"border-top-width",!0),o.left+=S.rail.align?S.win.outerWidth()-b(S.win,"border-right-width")-S.rail.width:b(S.win,"border-left-width"),(t=S.opt.railoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left)),S.railslocked||S.rail.css({top:o.top,left:o.left,height:(e?e.h:S.win.innerHeight())-(S.opt.railpadding.top+S.opt.railpadding.bottom)}),S.zoom&&S.zoom.css({top:o.top+1,left:1==S.rail.align?o.left-20:o.left+S.rail.width+4}),S.railh&&!S.railslocked){o={top:r.top,left:r.left},(t=S.opt.railhoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left));var i=S.railh.align?o.top+b(S.win,"border-top-width",!0)+S.win.innerHeight()-S.railh.height:o.top+b(S.win,"border-top-width",!0),s=o.left+b(S.win,"border-left-width");S.railh.css({top:i-(S.opt.railpadding.top+S.opt.railpadding.bottom),left:s,width:S.railh.width})}}},this.doRailClick=function(e,o,t){var r,i,s,n;S.railslocked||(S.cancelEvent(e),"pageY"in e||(e.pageX=e.clientX+l.documentElement.scrollLeft,e.pageY=e.clientY+l.documentElement.scrollTop),o?(r=t?S.doScrollLeft:S.doScrollTop)(s=t?(e.pageX-S.railh.offset().left-S.cursorwidth/2)*S.scrollratio.x:(e.pageY-S.rail.offset().top-S.cursorheight/2)*S.scrollratio.y):(r=t?S.doScrollLeftBy:S.doScrollBy,s=t?S.scroll.x:S.scroll.y,n=t?e.pageX-S.railh.offset().left:e.pageY-S.rail.offset().top,i=t?S.view.w:S.view.h,r(s>=n?i:-i)))},S.hasanimationframe="requestAnimationFrame"in window,S.hascancelanimationframe="cancelAnimationFrame"in window,this.init=function(){if(S.saved.css=[],E.isoperamini)return!0;if(E.isandroid&&!("hidden"in l))return!0;S.opt.emulatetouch=S.opt.emulatetouch||S.opt.touchbehavior;var e={"overflow-y":"hidden"};if((E.isie11||E.isie10)&&(e["-ms-overflow-style"]="none"),S.zindex="auto",S.ispage||"auto"!=S.opt.zindex?S.zindex=S.opt.zindex:S.zindex=w()||"auto",!S.ispage&&"auto"!=S.zindex&&S.zindex>s&&(s=S.zindex),S.isie&&0==S.zindex&&"auto"==S.opt.zindex&&(S.zindex="auto"),!S.ispage||!E.cantouch&&!E.isieold){var i=S.docscroll;S.ispage&&(i=S.haswrapper?S.win:S.doc),S.css(i,e),S.ispage&&(E.isie11||E.isie)&&S.css(n("html"),e),!E.isios||S.ispage||S.haswrapper||S.css(z,{"-webkit-overflow-scrolling":"touch"});var c=n(l.createElement("div"));c.css({position:"relative",top:0,float:"right",width:S.opt.cursorwidth,height:0,"background-color":S.opt.cursorcolor,border:S.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":S.opt.cursorborderradius,"-moz-border-radius":S.opt.cursorborderradius,"border-radius":S.opt.cursorborderradius}),c.addClass("nicescroll-cursors"),S.cursor=c;var d=n(l.createElement("div"));d.attr("id",S.id),d.addClass("nicescroll-rails nicescroll-rails-vr");var u,p,m=["left","right","top","bottom"];for(var f in m)p=m[f],(u=S.opt.railpadding[p])?d.css("padding-"+p,u+"px"):S.opt.railpadding[p]=0;d.append(c),d.width=Math.max(parseFloat(S.opt.cursorwidth),c.outerWidth()),d.css({width:d.width+"px",zIndex:S.zindex,background:S.opt.background,cursor:"default"}),d.visibility=!0,d.scrollable=!0,d.align="left"==S.opt.railalign?0:1,S.rail=d,S.rail.drag=!1;var g=!1;!S.opt.boxzoom||S.ispage||E.isieold||(g=l.createElement("div"),S.bind(g,"click",S.doZoom),S.bind(g,"mouseenter",function(){S.zoom.css("opacity",S.opt.cursoropacitymax)}),S.bind(g,"mouseleave",function(){S.zoom.css("opacity",S.opt.cursoropacitymin)}),S.zoom=n(g),S.zoom.css({cursor:"pointer",zIndex:S.zindex,backgroundImage:"url("+S.opt.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),S.opt.dblclickzoom&&S.bind(S.win,"dblclick",S.doZoom),E.cantouch&&S.opt.gesturezoom&&(S.ongesturezoom=function(e){return e.scale>1.5&&S.doZoomIn(e),e.scale<.8&&S.doZoomOut(e),S.cancelEvent(e)},S.bind(S.win,"gestureend",S.ongesturezoom))),S.railh=!1;var b;if(S.opt.horizrailenabled&&(S.css(i,{overflowX:"hidden"}),(c=n(l.createElement("div"))).css({position:"absolute",top:0,height:S.opt.cursorwidth,width:0,backgroundColor:S.opt.cursorcolor,border:S.opt.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":S.opt.cursorborderradius,"-moz-border-radius":S.opt.cursorborderradius,"border-radius":S.opt.cursorborderradius}),E.isieold&&c.css("overflow","hidden"),c.addClass("nicescroll-cursors"),S.cursorh=c,(b=n(l.createElement("div"))).attr("id",S.id+"-hr"),b.addClass("nicescroll-rails nicescroll-rails-hr"),b.height=Math.max(parseFloat(S.opt.cursorwidth),c.outerHeight()),b.css({height:b.height+"px",zIndex:S.zindex,background:S.opt.background}),b.append(c),b.visibility=!0,b.scrollable=!0,b.align="top"==S.opt.railvalign?0:1,S.railh=b,S.railh.drag=!1),S.ispage)d.css({position:"fixed",top:0,height:"100%"}),d.align?d.css({right:0}):d.css({left:0}),S.body.append(d),S.railh&&(b.css({position:"fixed",left:0,width:"100%"}),b.align?b.css({bottom:0}):b.css({top:0}),S.body.append(b));else{if(S.ishwscroll){"static"==S.win.css("position")&&S.css(S.win,{position:"relative"});var y="HTML"==S.win[0].nodeName?S.body:S.win;n(y).scrollTop(0).scrollLeft(0),S.zoom&&(S.zoom.css({position:"absolute",top:1,right:0,"margin-right":d.width+4}),y.append(S.zoom)),d.css({position:"absolute",top:0}),d.align?d.css({right:0}):d.css({left:0}),y.append(d),b&&(b.css({position:"absolute",left:0,bottom:0}),b.align?b.css({bottom:0}):b.css({top:0}),y.append(b))}else{S.isfixed="fixed"==S.win.css("position");var x=S.isfixed?"fixed":"absolute";S.isfixed||(S.viewport=S.getViewport(S.win[0])),S.viewport&&(S.body=S.viewport,0==/fixed|absolute/.test(S.viewport.css("position"))&&S.css(S.viewport,{position:"relative"})),d.css({position:x}),S.zoom&&S.zoom.css({position:x}),S.updateScrollBar(),S.body.append(d),S.zoom&&S.body.append(S.zoom),S.railh&&(b.css({position:x}),S.body.append(b))}E.isios&&S.css(S.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),E.isie&&S.opt.disableoutline&&S.win.attr("hideFocus","true"),E.iswebkit&&S.opt.disableoutline&&S.win.css("outline","none")}if(!1===S.opt.autohidemode?(S.autohidedom=!1,S.rail.css({opacity:S.opt.cursoropacitymax}),S.railh&&S.railh.css({opacity:S.opt.cursoropacitymax})):!0===S.opt.autohidemode||"leave"===S.opt.autohidemode?(S.autohidedom=n().add(S.rail),E.isie8&&(S.autohidedom=S.autohidedom.add(S.cursor)),S.railh&&(S.autohidedom=S.autohidedom.add(S.railh)),S.railh&&E.isie8&&(S.autohidedom=S.autohidedom.add(S.cursorh))):"scroll"==S.opt.autohidemode?(S.autohidedom=n().add(S.rail),S.railh&&(S.autohidedom=S.autohidedom.add(S.railh))):"cursor"==S.opt.autohidemode?(S.autohidedom=n().add(S.cursor),S.railh&&(S.autohidedom=S.autohidedom.add(S.cursorh))):"hidden"==S.opt.autohidemode&&(S.autohidedom=!1,S.hide(),S.railslocked=!1),E.cantouch||S.istouchcapable||S.opt.emulatetouch||E.hasmstouch){S.scrollmom=new v(S),S.ontouchstart=function(e){if(e.pointerType&&2!=e.pointerType&&"touch"!=e.pointerType)return!1;if(S.hasmoving=!1,!S.railslocked){var o;if(E.hasmstouch)for(o=!!e.target&&e.target;o;){var t=n(o).getNiceScroll();if(t.length>0&&t[0].me==S.me)break;if(t.length>0)return!1;if("DIV"==o.nodeName&&o.id==S.id)break;o=!!o.parentNode&&o.parentNode}if(e.stopPropagation(),S.cancelScroll(),(o=S.getTarget(e))&&/INPUT/i.test(o.nodeName)&&/range/i.test(o.type))return S.stopPropagation(e);if(!("clientX"in e)&&"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),S.forcescreen){var r=e;(e={original:e.original?e.original:e}).clientX=r.screenX,e.clientY=r.screenY}if(S.rail.drag={x:e.clientX,y:e.clientY,sx:S.scroll.x,sy:S.scroll.y,st:S.getScrollTop(),sl:S.getScrollLeft(),pt:2,dl:!1,tg:o},S.ispage||!S.opt.directionlockdeadzone)S.rail.drag.dl="f";else{var i={w:a.width(),h:a.height()},s={w:Math.max(l.body.scrollWidth,l.documentElement.scrollWidth),h:Math.max(l.body.scrollHeight,l.documentElement.scrollHeight)},c=Math.max(0,s.h-i.h),d=Math.max(0,s.w-i.w);!S.rail.scrollable&&S.railh.scrollable?S.rail.drag.ck=c>0&&"v":S.rail.scrollable&&!S.railh.scrollable?S.rail.drag.ck=d>0&&"h":S.rail.drag.ck=!1,S.rail.drag.ck||(S.rail.drag.dl="f")}if(S.opt.emulatetouch&&S.isiframe&&E.isie){var u=S.win.position();S.rail.drag.x+=u.left,S.rail.drag.y+=u.top}if(S.hasmoving=!1,S.lastmouseup=!1,S.scrollmom.reset(e.clientX,e.clientY),!E.cantouch&&!this.istouchcapable&&!e.pointerType){if(!(!!o&&/INPUT|SELECT|BUTTON|TEXTAREA/i.test(o.nodeName)))return!S.ispage&&E.hasmousecapture&&o.setCapture(),S.opt.emulatetouch?(o.onclick&&!o._onclick&&(o._onclick=o.onclick,o.onclick=function(e){if(S.hasmoving)return!1;o._onclick.call(this,e)}),S.cancelEvent(e)):S.stopPropagation(e);/SUBMIT|CANCEL|BUTTON/i.test(n(o).attr("type"))&&(S.preventclick={tg:o,click:!1})}}},S.ontouchend=function(e){if(!S.rail.drag)return!0;if(2==S.rail.drag.pt){if(e.pointerType&&2!=e.pointerType&&"touch"!=e.pointerType)return!1;if(S.rail.drag=!1,S.hasmoving&&(S.scrollmom.doMomentum(),S.lastmouseup=!0,S.hideCursor(),E.hasmousecapture&&l.releaseCapture(),!E.cantouch))return S.cancelEvent(e)}else if(1==S.rail.drag.pt)return S.onmouseup(e)};var k=S.opt.emulatetouch&&S.isiframe&&!E.hasmousecapture;S.ontouchmove=function(e,o){if(!S.rail.drag)return!1;if(e.targetTouches&&S.opt.preventmultitouchscrolling&&e.targetTouches.length>1)return!1;if(e.pointerType&&2!=e.pointerType&&"touch"!=e.pointerType)return!1;if(2==S.rail.drag.pt){if("changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),S.rail.drag.y===e.clientY&&S.rail.drag.x===e.clientX)return!1;S.hasmoving||S.triggerScrollStart(e.clientX,e.clientY,0,0,0),S.hasmoving=!0,S.preventclick&&!S.preventclick.click&&(S.preventclick.click=S.preventclick.tg.onclick||!1,S.preventclick.tg.onclick=S.onpreventclick);var t,r;if(r=t=0,k&&!o){var i=S.win.position();r=-i.left,t=-i.top}var s=e.clientY+t,n=s-S.rail.drag.y,a=e.clientX+r,c=a-S.rail.drag.x,d=S.rail.drag.st-n;S.ishwscroll&&S.opt.bouncescroll?d<0?d=Math.round(d/2):d>S.page.maxh&&(d=S.page.maxh+Math.round((d-S.page.maxh)/2)):(d<0&&(d=0,s=0),d>S.page.maxh&&(d=S.page.maxh,s=0));var u;S.railh&&S.railh.scrollable&&(u=S.isrtlmode?c-S.rail.drag.sl:S.rail.drag.sl-c,S.ishwscroll&&S.opt.bouncescroll?u<0?u=Math.round(u/2):u>S.page.maxw&&(u=S.page.maxw+Math.round((u-S.page.maxw)/2)):(u<0&&(u=0,a=0),u>S.page.maxw&&(u=S.page.maxw,a=0)));var h=!1;if(S.rail.drag.dl)h=!0,"v"==S.rail.drag.dl?u=S.rail.drag.sl:"h"==S.rail.drag.dl&&(d=S.rail.drag.st);else{var p=Math.abs(n),m=Math.abs(c),f=S.opt.directionlockdeadzone;if("v"==S.rail.drag.ck){if(p>f&&m<=.3*p)return S.rail.drag=!1,!0;m>f&&(S.rail.drag.dl="f",z.scrollTop(z.scrollTop()))}else if("h"==S.rail.drag.ck){if(m>f&&p<=.3*m)return S.rail.drag=!1,!0;p>f&&(S.rail.drag.dl="f",z.scrollLeft(z.scrollLeft()))}}if(S.synched("touchmove",function(){S.rail.drag&&2==S.rail.drag.pt&&(S.prepareTransition&&S.prepareTransition(0),S.rail.scrollable&&S.setScrollTop(d),S.scrollmom.update(a,s),S.railh&&S.railh.scrollable?(S.setScrollLeft(u),S.showCursor(d,u)):S.showCursor(d),E.isie10&&l.selection.clear())}),E.ischrome&&S.istouchcapable&&(h=!1),h)return S.cancelEvent(e)}else if(1==S.rail.drag.pt)return S.onmousemove(e)},S.ontouchstartCursor=function(e,o){if(!S.rail.drag||3==S.rail.drag.pt){if(S.locked)return S.cancelEvent(e);S.cancelScroll(),S.rail.drag={x:e.touches[0].clientX,y:e.touches[0].clientY,sx:S.scroll.x,sy:S.scroll.y,pt:3,hr:!!o};var t=S.getTarget(e);return!S.ispage&&E.hasmousecapture&&t.setCapture(),S.isiframe&&!E.hasmousecapture&&(S.saved.csspointerevents=S.doc.css("pointer-events"),S.css(S.doc,{"pointer-events":"none"})),S.cancelEvent(e)}},S.ontouchendCursor=function(e){if(S.rail.drag){if(E.hasmousecapture&&l.releaseCapture(),S.isiframe&&!E.hasmousecapture&&S.doc.css("pointer-events",S.saved.csspointerevents),3!=S.rail.drag.pt)return;return S.rail.drag=!1,S.cancelEvent(e)}},S.ontouchmoveCursor=function(e){if(S.rail.drag){if(3!=S.rail.drag.pt)return;if(S.cursorfreezed=!0,S.rail.drag.hr){S.scroll.x=S.rail.drag.sx+(e.touches[0].clientX-S.rail.drag.x),S.scroll.x<0&&(S.scroll.x=0);var o=S.scrollvaluemaxw;S.scroll.x>o&&(S.scroll.x=o)}else{S.scroll.y=S.rail.drag.sy+(e.touches[0].clientY-S.rail.drag.y),S.scroll.y<0&&(S.scroll.y=0);var t=S.scrollvaluemax;S.scroll.y>t&&(S.scroll.y=t)}return S.synched("touchmove",function(){S.rail.drag&&3==S.rail.drag.pt&&(S.showCursor(),S.rail.drag.hr?S.doScrollLeft(Math.round(S.scroll.x*S.scrollratio.x),S.opt.cursordragspeed):S.doScrollTop(Math.round(S.scroll.y*S.scrollratio.y),S.opt.cursordragspeed))}),S.cancelEvent(e)}}}if(S.onmousedown=function(e,o){if(!S.rail.drag||1==S.rail.drag.pt){if(S.railslocked)return S.cancelEvent(e);S.cancelScroll(),S.rail.drag={x:e.clientX,y:e.clientY,sx:S.scroll.x,sy:S.scroll.y,pt:1,hr:o||!1};var t=S.getTarget(e);return!S.ispage&&E.hasmousecapture&&t.setCapture(),S.isiframe&&!E.hasmousecapture&&(S.saved.csspointerevents=S.doc.css("pointer-events"),S.css(S.doc,{"pointer-events":"none"})),S.hasmoving=!1,S.cancelEvent(e)}},S.onmouseup=function(e){if(S.rail.drag)return 1!=S.rail.drag.pt||(E.hasmousecapture&&l.releaseCapture(),S.isiframe&&!E.hasmousecapture&&S.doc.css("pointer-events",S.saved.csspointerevents),S.rail.drag=!1,S.hasmoving&&S.triggerScrollEnd(),S.cancelEvent(e))},S.onmousemove=function(e){if(S.rail.drag){if(1!==S.rail.drag.pt)return;if(E.ischrome&&0===e.which)return S.onmouseup(e);if(S.cursorfreezed=!0,S.hasmoving=!0,S.rail.drag.hr){S.scroll.x=S.rail.drag.sx+(e.clientX-S.rail.drag.x),S.scroll.x<0&&(S.scroll.x=0);var o=S.scrollvaluemaxw;S.scroll.x>o&&(S.scroll.x=o)}else{S.scroll.y=S.rail.drag.sy+(e.clientY-S.rail.drag.y),S.scroll.y<0&&(S.scroll.y=0);var t=S.scrollvaluemax;S.scroll.y>t&&(S.scroll.y=t)}return S.synched("mousemove",function(){S.rail.drag&&1==S.rail.drag.pt&&(S.showCursor(),S.rail.drag.hr?S.hasreversehr?S.doScrollLeft(S.scrollvaluemaxw-Math.round(S.scroll.x*S.scrollratio.x),S.opt.cursordragspeed):S.doScrollLeft(Math.round(S.scroll.x*S.scrollratio.x),S.opt.cursordragspeed):S.doScrollTop(Math.round(S.scroll.y*S.scrollratio.y),S.opt.cursordragspeed))}),S.cancelEvent(e)}S.checkarea=0},E.cantouch||S.opt.emulatetouch)S.onpreventclick=function(e){if(S.preventclick)return S.preventclick.tg.onclick=S.preventclick.click,S.preventclick=!1,S.cancelEvent(e)},S.onclick=!E.isios&&function(e){return!S.lastmouseup||(S.lastmouseup=!1,S.cancelEvent(e))},S.opt.grabcursorenabled&&E.cursorgrabvalue&&(S.css(S.ispage?S.doc:S.win,{cursor:E.cursorgrabvalue}),S.css(S.rail,{cursor:E.cursorgrabvalue}));else{var T=function(e){if(S.selectiondrag){if(e){var o=S.win.outerHeight(),t=e.pageY-S.selectiondrag.top;t>0&&t<o&&(t=0),t>=o&&(t-=o),S.selectiondrag.df=t}if(0!=S.selectiondrag.df){var r=2*-Math.floor(S.selectiondrag.df/6);S.doScrollBy(r),S.debounced("doselectionscroll",function(){T()},50)}}};S.hasTextSelected="getSelection"in l?function(){return l.getSelection().rangeCount>0}:"selection"in l?function(){return"None"!=l.selection.type}:function(){return!1},S.onselectionstart=function(e){S.ispage||(S.selectiondrag=S.win.offset())},S.onselectionend=function(e){S.selectiondrag=!1},S.onselectiondrag=function(e){S.selectiondrag&&S.hasTextSelected()&&S.debounced("selectionscroll",function(){T(e)},250)}}if(E.hasw3ctouch?(S.css(S.ispage?n("html"):S.win,{"touch-action":"none"}),S.css(S.rail,{"touch-action":"none"}),S.css(S.cursor,{"touch-action":"none"}),S.bind(S.win,"pointerdown",S.ontouchstart),S.bind(l,"pointerup",S.ontouchend),S.bind(l,"pointermove",S.ontouchmove)):E.hasmstouch?(S.css(S.ispage?n("html"):S.win,{"-ms-touch-action":"none"}),S.css(S.rail,{"-ms-touch-action":"none"}),S.css(S.cursor,{"-ms-touch-action":"none"}),S.bind(S.win,"MSPointerDown",S.ontouchstart),S.bind(l,"MSPointerUp",S.ontouchend),S.bind(l,"MSPointerMove",S.ontouchmove),S.bind(S.cursor,"MSGestureHold",function(e){e.preventDefault()}),S.bind(S.cursor,"contextmenu",function(e){e.preventDefault()})):E.cantouch&&(S.bind(S.win,"touchstart",S.ontouchstart,!1,!0),S.bind(l,"touchend",S.ontouchend,!1,!0),S.bind(l,"touchcancel",S.ontouchend,!1,!0),S.bind(l,"touchmove",S.ontouchmove,!1,!0)),S.opt.emulatetouch&&(S.bind(S.win,"mousedown",S.ontouchstart,!1,!0),S.bind(l,"mouseup",S.ontouchend,!1,!0),S.bind(l,"mousemove",S.ontouchmove,!1,!0)),(S.opt.cursordragontouch||!E.cantouch&&!S.opt.emulatetouch)&&(S.rail.css({cursor:"default"}),S.railh&&S.railh.css({cursor:"default"}),S.jqbind(S.rail,"mouseenter",function(){if(!S.ispage&&!S.win.is(":visible"))return!1;S.canshowonmouseevent&&S.showCursor(),S.rail.active=!0}),S.jqbind(S.rail,"mouseleave",function(){S.rail.active=!1,S.rail.drag||S.hideCursor()}),S.opt.sensitiverail&&(S.bind(S.rail,"click",function(e){S.doRailClick(e,!1,!1)}),S.bind(S.rail,"dblclick",function(e){S.doRailClick(e,!0,!1)}),S.bind(S.cursor,"click",function(e){S.cancelEvent(e)}),S.bind(S.cursor,"dblclick",function(e){S.cancelEvent(e)})),S.railh&&(S.jqbind(S.railh,"mouseenter",function(){if(!S.ispage&&!S.win.is(":visible"))return!1;S.canshowonmouseevent&&S.showCursor(),S.rail.active=!0}),S.jqbind(S.railh,"mouseleave",function(){S.rail.active=!1,S.rail.drag||S.hideCursor()}),S.opt.sensitiverail&&(S.bind(S.railh,"click",function(e){S.doRailClick(e,!1,!0)}),S.bind(S.railh,"dblclick",function(e){S.doRailClick(e,!0,!0)}),S.bind(S.cursorh,"click",function(e){S.cancelEvent(e)}),S.bind(S.cursorh,"dblclick",function(e){S.cancelEvent(e)})))),S.opt.cursordragontouch&&(this.istouchcapable||E.cantouch)&&(S.bind(S.cursor,"touchstart",S.ontouchstartCursor),S.bind(S.cursor,"touchmove",S.ontouchmoveCursor),S.bind(S.cursor,"touchend",S.ontouchendCursor),S.cursorh&&S.bind(S.cursorh,"touchstart",function(e){S.ontouchstartCursor(e,!0)}),S.cursorh&&S.bind(S.cursorh,"touchmove",S.ontouchmoveCursor),S.cursorh&&S.bind(S.cursorh,"touchend",S.ontouchendCursor)),E.cantouch||S.opt.emulatetouch?(S.bind(E.hasmousecapture?S.win:l,"mouseup",S.ontouchend),S.onclick&&S.bind(l,"click",S.onclick),S.opt.cursordragontouch?(S.bind(S.cursor,"mousedown",S.onmousedown),S.bind(S.cursor,"mouseup",S.onmouseup),S.cursorh&&S.bind(S.cursorh,"mousedown",function(e){S.onmousedown(e,!0)}),S.cursorh&&S.bind(S.cursorh,"mouseup",S.onmouseup)):(S.bind(S.rail,"mousedown",function(e){e.preventDefault()}),S.railh&&S.bind(S.railh,"mousedown",function(e){e.preventDefault()}))):(S.bind(E.hasmousecapture?S.win:l,"mouseup",S.onmouseup),S.bind(l,"mousemove",S.onmousemove),S.onclick&&S.bind(l,"click",S.onclick),S.bind(S.cursor,"mousedown",S.onmousedown),S.bind(S.cursor,"mouseup",S.onmouseup),S.railh&&(S.bind(S.cursorh,"mousedown",function(e){S.onmousedown(e,!0)}),S.bind(S.cursorh,"mouseup",S.onmouseup)),!S.ispage&&S.opt.enablescrollonselection&&(S.bind(S.win[0],"mousedown",S.onselectionstart),S.bind(l,"mouseup",S.onselectionend),S.bind(S.cursor,"mouseup",S.onselectionend),S.cursorh&&S.bind(S.cursorh,"mouseup",S.onselectionend),S.bind(l,"mousemove",S.onselectiondrag)),S.zoom&&(S.jqbind(S.zoom,"mouseenter",function(){S.canshowonmouseevent&&S.showCursor(),S.rail.active=!0}),S.jqbind(S.zoom,"mouseleave",function(){S.rail.active=!1,S.rail.drag||S.hideCursor()}))),S.opt.enablemousewheel&&(S.isiframe||S.mousewheel(E.isie&&S.ispage?l:S.win,S.onmousewheel),S.mousewheel(S.rail,S.onmousewheel),S.railh&&S.mousewheel(S.railh,S.onmousewheelhr)),S.ispage||E.cantouch||/HTML|^BODY/.test(S.win[0].nodeName)||(S.win.attr("tabindex")||S.win.attr({tabindex:++r}),S.bind(S.win,"focus",function(e){o=S.getTarget(e).id||!0,S.hasfocus=!0,S.canshowonmouseevent&&S.noticeCursor()}),S.bind(S.win,"blur",function(e){o=!1,S.hasfocus=!1}),S.bind(S.win,"mouseenter",function(e){t=S.getTarget(e).id||!0,S.hasmousefocus=!0,S.canshowonmouseevent&&S.noticeCursor()}),S.bind(S.win,"mouseleave",function(e){t=!1,S.hasmousefocus=!1,S.rail.drag||S.hideCursor()})),S.onkeypress=function(e){if(S.railslocked&&0==S.page.maxh)return!0;e=e||window.e;var r=S.getTarget(e);if(r&&/INPUT|TEXTAREA|SELECT|OPTION/.test(r.nodeName)&&(!(r.getAttribute("type")||r.type||!1)||!/submit|button|cancel/i.tp))return!0;if(n(r).attr("contenteditable"))return!0;if(S.hasfocus||S.hasmousefocus&&!o||S.ispage&&!o&&!t){var i=e.keyCode;if(S.railslocked&&27!=i)return S.cancelEvent(e);var s=e.ctrlKey||!1,l=e.shiftKey||!1,a=!1;switch(i){case 38:case 63233:S.doScrollBy(72),a=!0;break;case 40:case 63235:S.doScrollBy(-72),a=!0;break;case 37:case 63232:S.railh&&(s?S.doScrollLeft(0):S.doScrollLeftBy(72),a=!0);break;case 39:case 63234:S.railh&&(s?S.doScrollLeft(S.page.maxw):S.doScrollLeftBy(-72),a=!0);break;case 33:case 63276:S.doScrollBy(S.view.h),a=!0;break;case 34:case 63277:S.doScrollBy(-S.view.h),a=!0;break;case 36:case 63273:S.railh&&s?S.doScrollPos(0,0):S.doScrollTo(0),a=!0;break;case 35:case 63275:S.railh&&s?S.doScrollPos(S.page.maxw,S.page.maxh):S.doScrollTo(S.page.maxh),a=!0;break;case 32:S.opt.spacebarenabled&&(l?S.doScrollBy(S.view.h):S.doScrollBy(-S.view.h),a=!0);break;case 27:S.zoomactive&&(S.doZoom(),a=!0)}if(a)return S.cancelEvent(e)}},S.opt.enablekeyboard&&S.bind(l,E.isopera&&!E.isopera12?"keypress":"keydown",S.onkeypress),S.bind(l,"keydown",function(e){(e.ctrlKey||!1)&&(S.wheelprevented=!0)}),S.bind(l,"keyup",function(e){e.ctrlKey||!1||(S.wheelprevented=!1)}),S.bind(window,"blur",function(e){S.wheelprevented=!1}),S.bind(window,"resize",S.lazyResize),S.bind(window,"orientationchange",S.lazyResize),S.bind(window,"load",S.lazyResize),E.ischrome&&!S.ispage&&!S.haswrapper){var M=S.win.attr("style"),L=parseFloat(S.win.css("width"))+1;S.win.css("width",L),S.synched("chromefix",function(){S.win.attr("style",M)})}S.onAttributeChange=function(e){S.lazyResize(S.isieold?250:30)},S.opt.enableobserver&&(S.isie11||!1===h||(S.observerbody=new h(function(e){if(e.forEach(function(e){if("attributes"==e.type)return z.hasClass("modal-open")&&z.hasClass("modal-dialog")&&!n.contains(n(".modal-dialog")[0],S.doc[0])?S.hide():S.show()}),S.me.clientWidth!=S.page.width||S.me.clientHeight!=S.page.height)return S.lazyResize(30)}),S.observerbody.observe(l.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),S.ispage||S.haswrapper||(!1!==h?(S.observer=new h(function(e){e.forEach(S.onAttributeChange)}),S.observer.observe(S.win[0],{childList:!0,characterData:!1,attributes:!0,subtree:!1}),S.observerremover=new h(function(e){e.forEach(function(e){if(e.removedNodes.length>0)for(var o in e.removedNodes)if(S&&e.removedNodes[o]==S.win[0])return S.remove()})}),S.observerremover.observe(S.win[0].parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(S.bind(S.win,E.isie&&!E.isie9?"propertychange":"DOMAttrModified",S.onAttributeChange),E.isie9&&S.win[0].attachEvent("onpropertychange",S.onAttributeChange),S.bind(S.win,"DOMNodeRemoved",function(e){e.target==S.win[0]&&S.remove()})))),!S.ispage&&S.opt.boxzoom&&S.bind(window,"resize",S.resizeZoom),S.istextarea&&(S.bind(S.win,"keydown",S.lazyResize),S.bind(S.win,"mouseup",S.lazyResize)),S.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var C=function(){S.iframexd=!1;var o;try{(o="contentDocument"in this?this.contentDocument:this.contentWindow.document).domain}catch(e){S.iframexd=!0,o=!1}if(S.iframexd)return"console"in window&&console.log("NiceScroll error: policy restriced iframe"),!0;if(S.forcescreen=!0,S.isiframe&&(S.iframe={doc:n(o),html:S.doc.contents().find("html")[0],body:S.doc.contents().find("body")[0]},S.getContentSize=function(){return{w:Math.max(S.iframe.html.scrollWidth,S.iframe.body.scrollWidth),h:Math.max(S.iframe.html.scrollHeight,S.iframe.body.scrollHeight)}},S.docscroll=n(S.iframe.body)),!E.isios&&S.opt.iframeautoresize&&!S.isiframe){S.win.scrollTop(0),S.doc.height("");var t=Math.max(o.getElementsByTagName("html")[0].scrollHeight,o.body.scrollHeight);S.doc.height(t)}S.lazyResize(30),S.css(n(S.iframe.body),e),E.isios&&S.haswrapper&&S.css(n(o.body),{"-webkit-transform":"translate3d(0,0,0)"}),"contentWindow"in this?S.bind(this.contentWindow,"scroll",S.onscroll):S.bind(o,"scroll",S.onscroll),S.opt.enablemousewheel&&S.mousewheel(o,S.onmousewheel),S.opt.enablekeyboard&&S.bind(o,E.isopera?"keypress":"keydown",S.onkeypress),E.cantouch?(S.bind(o,"touchstart",S.ontouchstart),S.bind(o,"touchmove",S.ontouchmove)):S.opt.emulatetouch&&(S.bind(o,"mousedown",S.ontouchstart),S.bind(o,"mousemove",function(e){return S.ontouchmove(e,!0)}),S.opt.grabcursorenabled&&E.cursorgrabvalue&&S.css(n(o.body),{cursor:E.cursorgrabvalue})),S.bind(o,"mouseup",S.ontouchend),S.zoom&&(S.opt.dblclickzoom&&S.bind(o,"dblclick",S.doZoom),S.ongesturezoom&&S.bind(o,"gestureend",S.ongesturezoom))};this.doc[0].readyState&&"complete"==this.doc[0].readyState&&setTimeout(function(){C.call(S.doc[0],!1)},500),S.bind(this.doc,"load",C)}},this.showCursor=function(e,o){if(S.cursortimeout&&(clearTimeout(S.cursortimeout),S.cursortimeout=0),S.rail){if(S.autohidedom&&(S.autohidedom.stop().css({opacity:S.opt.cursoropacitymax}),S.cursoractive=!0),S.rail.drag&&1==S.rail.drag.pt||(void 0!==e&&!1!==e&&(S.scroll.y=Math.round(1*e/S.scrollratio.y)),void 0!==o&&(S.scroll.x=Math.round(1*o/S.scrollratio.x))),S.cursor.css({height:S.cursorheight,top:S.scroll.y}),S.cursorh){var t=S.hasreversehr?S.scrollvaluemaxw-S.scroll.x:S.scroll.x;!S.rail.align&&S.rail.visibility?S.cursorh.css({width:S.cursorwidth,left:t+S.rail.width}):S.cursorh.css({width:S.cursorwidth,left:t}),S.cursoractive=!0}S.zoom&&S.zoom.stop().css({opacity:S.opt.cursoropacitymax})}},this.hideCursor=function(e){S.cursortimeout||S.rail&&S.autohidedom&&(S.hasmousefocus&&"leave"==S.opt.autohidemode||(S.cursortimeout=setTimeout(function(){S.rail.active&&S.showonmouseevent||(S.autohidedom.stop().animate({opacity:S.opt.cursoropacitymin}),S.zoom&&S.zoom.stop().animate({opacity:S.opt.cursoropacitymin}),S.cursoractive=!1),S.cursortimeout=0},e||S.opt.hidecursordelay)))},this.noticeCursor=function(e,o,t){S.showCursor(o,t),S.rail.active||S.hideCursor(e)},this.getContentSize=S.ispage?function(){return{w:Math.max(l.body.scrollWidth,l.documentElement.scrollWidth),h:Math.max(l.body.scrollHeight,l.documentElement.scrollHeight)}}:S.haswrapper?function(){return{w:S.doc[0].offsetWidth,h:S.doc[0].offsetHeight}}:function(){return{w:S.docscroll[0].scrollWidth,h:S.docscroll[0].scrollHeight}},this.onResize=function(e,o){if(!S||!S.win)return!1;if(!S.haswrapper&&!S.ispage){if("none"==S.win.css("display"))return S.visibility&&S.hideRail().hideRailHr(),!1;S.hidden||S.visibility||S.showRail().showRailHr()}var t=S.page.maxh,r=S.page.maxw,i={h:S.view.h,w:S.view.w};if(S.view={w:S.ispage?S.win.width():S.win[0].clientWidth,h:S.ispage?S.win.height():S.win[0].clientHeight},S.page=o||S.getContentSize(),S.page.maxh=Math.max(0,S.page.h-S.view.h),S.page.maxw=Math.max(0,S.page.w-S.view.w),S.page.maxh==t&&S.page.maxw==r&&S.view.w==i.w&&S.view.h==i.h){if(S.ispage)return S;var s=S.win.offset();if(S.lastposition){var n=S.lastposition;if(n.top==s.top&&n.left==s.left)return S}S.lastposition=s}return 0===S.page.maxh?(S.hideRail(),S.scrollvaluemax=0,S.scroll.y=0,S.scrollratio.y=0,S.cursorheight=0,S.setScrollTop(0),S.rail&&(S.rail.scrollable=!1)):(S.page.maxh-=S.opt.railpadding.top+S.opt.railpadding.bottom,S.rail.scrollable=!0),0===S.page.maxw?(S.hideRailHr(),S.scrollvaluemaxw=0,S.scroll.x=0,S.scrollratio.x=0,S.cursorwidth=0,S.setScrollLeft(0),S.railh&&(S.railh.scrollable=!1)):(S.page.maxw-=S.opt.railpadding.left+S.opt.railpadding.right,S.railh&&(S.railh.scrollable=S.opt.horizrailenabled)),S.railslocked=S.locked||0===S.page.maxh&&0===S.page.maxw,S.railslocked?(S.ispage||S.updateScrollBar(S.view),!1):(S.hidden||S.visibility?!S.railh||S.hidden||S.railh.visibility||S.showRailHr():S.showRail().showRailHr(),S.istextarea&&S.win.css("resize")&&"none"!=S.win.css("resize")&&(S.view.h-=20),S.cursorheight=Math.min(S.view.h,Math.round(S.view.h*(S.view.h/S.page.h))),S.cursorheight=S.opt.cursorfixedheight?S.opt.cursorfixedheight:Math.max(S.opt.cursorminheight,S.cursorheight),S.cursorwidth=Math.min(S.view.w,Math.round(S.view.w*(S.view.w/S.page.w))),S.cursorwidth=S.opt.cursorfixedheight?S.opt.cursorfixedheight:Math.max(S.opt.cursorminheight,S.cursorwidth),S.scrollvaluemax=S.view.h-S.cursorheight-(S.opt.railpadding.top+S.opt.railpadding.bottom),S.railh&&(S.railh.width=S.page.maxh>0?S.view.w-S.rail.width:S.view.w,S.scrollvaluemaxw=S.railh.width-S.cursorwidth-(S.opt.railpadding.left+S.opt.railpadding.right)),S.ispage||S.updateScrollBar(S.view),S.scrollratio={x:S.page.maxw/S.scrollvaluemaxw,y:S.page.maxh/S.scrollvaluemax},S.getScrollTop()>S.page.maxh?S.doScrollTop(S.page.maxh):(S.scroll.y=Math.round(S.getScrollTop()*(1/S.scrollratio.y)),S.scroll.x=Math.round(S.getScrollLeft()*(1/S.scrollratio.x)),S.cursoractive&&S.noticeCursor()),S.scroll.y&&0==S.getScrollTop()&&S.doScrollTo(Math.floor(S.scroll.y*S.scrollratio.y)),S)},this.resize=S.onResize,this.hlazyresize=0,this.lazyResize=function(e){return S.haswrapper||S.hide(),S.hlazyresize&&clearTimeout(S.hlazyresize),S.hlazyresize=setTimeout(function(){S&&(S.resize(),S.show())},240),S},this.jqbind=function(e,o,t){S.events.push({e:e,n:o,f:t,q:!0}),n(e).bind(o,t)},this.mousewheel=function(e,o,t){var r="jquery"in e?e[0]:e;if("onwheel"in l.createElement("div"))S._bind(r,"wheel",o,t||!1);else{var i=void 0!==l.onmousewheel?"mousewheel":"DOMMouseScroll";y(r,i,o,t||!1),"DOMMouseScroll"==i&&y(r,"MozMousePixelScroll",o,t||!1)}};var R=!1;if(E.haseventlistener){try{var H=Object.defineProperty({},"passive",{get:function(){R=!0}});window.addEventListener("test",null,H)}catch(e){}this.cancelEvent=function(e){return!!e&&((e=e.original?e.original:e).cancelable&&e.preventDefault(),e.stopPropagation(),e.preventManipulation&&e.preventManipulation(),!1)},this.stopPropagation=function(e){return!!e&&((e=e.original?e.original:e).stopPropagation(),!1)}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},window.constructor.prototype.addEventListener=l.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(e,o,t){this.attachEvent("on"+e,o)},window.constructor.prototype.removeEventListener=l.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(e,o,t){this.detachEvent("on"+e,o)},this.cancelEvent=function(e){return!!(e=window.event||!1)&&(e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1,!1)},this.stopPropagation=function(e){return!!(e=window.event||!1)&&(e.cancelBubble=!0,!1)};this.bind=function(e,o,t,r,i){var s="jquery"in e?e[0]:e;S._bind(s,o,t,r||!1,i||!1)},this._bind=function(e,o,t,r,i){S.events.push({e:e,n:o,f:t,b:r,q:!1}),R&&i?e.addEventListener(o,t,{passive:!1,capture:r}):e.addEventListener(o,t,r||!1)},this._unbind=function(e,o,t,r){e.removeEventListener(o,t,r)},this.unbindAll=function(){for(var e=0;e<S.events.length;e++){var o=S.events[e];o.q?o.e.unbind(o.n,o.f):S._unbind(o.e,o.n,o.f,o.b)}},this.showRail=function(){return 0==S.page.maxh||!S.ispage&&"none"==S.win.css("display")||(S.visibility=!0,S.rail.visibility=!0,S.rail.css("display","block")),S},this.showRailHr=function(){return S.railh?(0==S.page.maxw||!S.ispage&&"none"==S.win.css("display")||(S.railh.visibility=!0,S.railh.css("display","block")),S):S},this.hideRail=function(){return S.visibility=!1,S.rail.visibility=!1,S.rail.css("display","none"),S},this.hideRailHr=function(){return S.railh?(S.railh.visibility=!1,S.railh.css("display","none"),S):S},this.show=function(){return S.hidden=!1,S.railslocked=!1,S.showRail().showRailHr()},this.hide=function(){return S.hidden=!0,S.railslocked=!0,S.hideRail().hideRailHr()},this.toggle=function(){return S.hidden?S.show():S.hide()},this.remove=function(){S.stop(),S.cursortimeout&&clearTimeout(S.cursortimeout);for(var e in S.delaylist)S.delaylist[e]&&d(S.delaylist[e].h);S.doZoomOut(),S.unbindAll(),E.isie9&&S.win[0].detachEvent("onpropertychange",S.onAttributeChange),!1!==S.observer&&S.observer.disconnect(),!1!==S.observerremover&&S.observerremover.disconnect(),!1!==S.observerbody&&S.observerbody.disconnect(),S.events=null,S.cursor&&S.cursor.remove(),S.cursorh&&S.cursorh.remove(),S.rail&&S.rail.remove(),S.railh&&S.railh.remove(),S.zoom&&S.zoom.remove();for(var o=0;o<S.saved.css.length;o++){var t=S.saved.css[o];t[0].css(t[1],void 0===t[2]?"":t[2])}S.saved=!1,S.me.data("__nicescroll","");var r=n.nicescroll;r.each(function(e){if(this&&this.id===S.id){delete r[e];for(var o=++e;o<r.length;o++,e++)r[e]=r[o];--r.length&&delete r[r.length]}});for(var i in S)S[i]=null,delete S[i];S=null},this.scrollstart=function(e){return this.onscrollstart=e,S},this.scrollend=function(e){return this.onscrollend=e,S},this.scrollcancel=function(e){return this.onscrollcancel=e,S},this.zoomin=function(e){return this.onzoomin=e,S},this.zoomout=function(e){return this.onzoomout=e,S},this.isScrollable=function(e){var o=e.target?e.target:e;if("OPTION"==o.nodeName)return!0;for(;o&&1==o.nodeType&&o!==this.me[0]&&!/^BODY|HTML/.test(o.nodeName);){var t=n(o),r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r))return o.clientHeight!=o.scrollHeight;o=!!o.parentNode&&o.parentNode}return!1},this.getViewport=function(e){for(var o=!(!e||!e.parentNode)&&e.parentNode;o&&1==o.nodeType&&!/^BODY|HTML/.test(o.nodeName);){var t=n(o);if(/fixed|absolute/.test(t.css("position")))return t;var r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r)&&o.clientHeight!=o.scrollHeight)return t;if(t.getNiceScroll().length>0)return t;o=!!o.parentNode&&o.parentNode}return!1},this.triggerScrollStart=function(e,o,t,r,i){var s={type:"scrollstart",current:{x:e,y:o},request:{x:t,y:r},end:{x:S.newscrollx,y:S.newscrolly},speed:i};S.onscrollstart.call(S,s)},this.triggerScrollEnd=function(){if(S.onscrollend){var e=S.getScrollLeft(),o=S.getScrollTop(),t={type:"scrollend",current:{x:e,y:o},end:{x:e,y:o}};S.onscrollend.call(S,t)}},this.onmousewheel=function(e){if(!S.wheelprevented){if(S.railslocked)return S.debounced("checkunlock",S.resize,250),!0;if(S.rail.drag)return S.cancelEvent(e);if("auto"===S.opt.oneaxismousemode&&0!==e.deltaX&&(S.opt.oneaxismousemode=!1),S.opt.oneaxismousemode&&0===e.deltaX&&!S.rail.scrollable)return!S.railh||!S.railh.scrollable||S.onmousewheelhr(e);var o=p(),t=!1;if(S.opt.preservenativescrolling&&S.checkarea+600<o&&(S.nativescrollingarea=S.isScrollable(e),t=!0),S.checkarea=o,S.nativescrollingarea)return!0;var r=x(e,!1,t);return r&&(S.checkarea=0),r}},this.onmousewheelhr=function(e){if(!S.wheelprevented){if(S.railslocked||!S.railh.scrollable)return!0;if(S.rail.drag)return S.cancelEvent(e);var o=p(),t=!1;return S.opt.preservenativescrolling&&S.checkarea+600<o&&(S.nativescrollingarea=S.isScrollable(e),t=!0),S.checkarea=o,!!S.nativescrollingarea||(S.railslocked?S.cancelEvent(e):x(e,!0,t))}},this.stop=function(){return S.cancelScroll(),S.scrollmon&&S.scrollmon.stop(),S.cursorfreezed=!1,S.scroll.y=Math.round(S.getScrollTop()*(1/S.scrollratio.y)),S.noticeCursor(),S},this.getTransitionSpeed=function(e){var o=Math.round(10*S.opt.scrollspeed),t=Math.min(o,Math.round(e/20*S.opt.scrollspeed));return t>20?t:0},S.opt.smoothscroll?S.ishwscroll&&E.hastransition&&S.opt.usetransition&&S.opt.smoothscroll?(this.prepareTransition=function(e,o){var t=o?e>20?e:0:S.getTransitionSpeed(e),r=t?E.prefixstyle+"transform "+t+"ms ease-out":"";return S.lasttransitionstyle&&S.lasttransitionstyle==r||(S.lasttransitionstyle=r,S.doc.css(E.transitionstyle,r)),t},this.doScrollLeft=function(e,o){var t=S.scrollrunning?S.newscrolly:S.getScrollTop();S.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=S.scrollrunning?S.newscrollx:S.getScrollLeft();S.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=S.getScrollTop(),i=S.getScrollLeft();return((S.newscrolly-r)*(o-r)<0||(S.newscrollx-i)*(e-i)<0)&&S.cancelScroll(),0==S.opt.bouncescroll&&(o<0?o=0:o>S.page.maxh&&(o=S.page.maxh),e<0?e=0:e>S.page.maxw&&(e=S.page.maxw)),(!S.scrollrunning||e!=S.newscrollx||o!=S.newscrolly)&&(S.newscrolly=o,S.newscrollx=e,S.newscrollspeed=t||!1,!S.timer&&void(S.timer=setTimeout(function(){var t=S.getScrollTop(),r=S.getScrollLeft(),i={};i.x=e-r,i.y=o-t,i.px=r,i.py=t;var s=Math.round(Math.sqrt(Math.pow(i.x,2)+Math.pow(i.y,2))),n=S.newscrollspeed&&S.newscrollspeed>1?S.newscrollspeed:S.getTransitionSpeed(s);if(S.newscrollspeed&&S.newscrollspeed<=1&&(n*=S.newscrollspeed),S.prepareTransition(n,!0),S.timerscroll&&S.timerscroll.tm&&clearInterval(S.timerscroll.tm),n>0){!S.scrollrunning&&S.onscrollstart&&S.triggerScrollStart(r,t,e,o,n),E.transitionend?S.scrollendtrapped||(S.scrollendtrapped=!0,S.bind(S.doc,E.transitionend,S.onScrollTransitionEnd,!1)):(S.scrollendtrapped&&clearTimeout(S.scrollendtrapped),S.scrollendtrapped=setTimeout(S.onScrollTransitionEnd,n));var l=t,a=r;S.timerscroll={bz:new C(l,S.newscrolly,n,0,0,.58,1),bh:new C(a,S.newscrollx,n,0,0,.58,1)},S.cursorfreezed||(S.timerscroll.tm=setInterval(function(){S.showCursor(S.getScrollTop(),S.getScrollLeft())},60))}S.synched("doScroll-set",function(){S.timer=0,S.scrollendtrapped&&(S.scrollrunning=!0),S.setScrollTop(S.newscrolly),S.setScrollLeft(S.newscrollx),S.scrollendtrapped||S.onScrollTransitionEnd()})},50)))},this.cancelScroll=function(){if(!S.scrollendtrapped)return!0;var e=S.getScrollTop(),o=S.getScrollLeft();return S.scrollrunning=!1,E.transitionend||clearTimeout(E.transitionend),S.scrollendtrapped=!1,S._unbind(S.doc[0],E.transitionend,S.onScrollTransitionEnd),S.prepareTransition(0),S.setScrollTop(e),S.railh&&S.setScrollLeft(o),S.timerscroll&&S.timerscroll.tm&&clearInterval(S.timerscroll.tm),S.timerscroll=!1,S.cursorfreezed=!1,S.showCursor(e,o),S},this.onScrollTransitionEnd=function(){S.scrollendtrapped&&S._unbind(S.doc[0],E.transitionend,S.onScrollTransitionEnd),S.scrollendtrapped=!1,S.prepareTransition(0),S.timerscroll&&S.timerscroll.tm&&clearInterval(S.timerscroll.tm),S.timerscroll=!1;var e=S.getScrollTop(),o=S.getScrollLeft();if(S.setScrollTop(e),S.railh&&S.setScrollLeft(o),S.noticeCursor(!1,e,o),S.cursorfreezed=!1,e<0?e=0:e>S.page.maxh&&(e=S.page.maxh),o<0?o=0:o>S.page.maxw&&(o=S.page.maxw),e!=S.newscrolly||o!=S.newscrollx)return S.doScrollPos(o,e,S.opt.snapbackspeed);S.onscrollend&&S.scrollrunning&&S.triggerScrollEnd(),S.scrollrunning=!1}):(this.doScrollLeft=function(e,o){var t=S.scrollrunning?S.newscrolly:S.getScrollTop();S.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=S.scrollrunning?S.newscrollx:S.getScrollLeft();S.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){function r(){if(S.cancelAnimationFrame)return!0;if(S.scrollrunning=!0,h=1-h)return S.timer=c(r)||1;var e,o,t=0,i=o=S.getScrollTop();S.dst.ay?(((n=(i=S.bzscroll?S.dst.py+S.bzscroll.getNow()*S.dst.ay:S.newscrolly)-o)<0&&i<S.newscrolly||n>0&&i>S.newscrolly)&&(i=S.newscrolly),S.setScrollTop(i),i==S.newscrolly&&(t=1)):t=1;var s=e=S.getScrollLeft();if(S.dst.ax){var n=(s=S.bzscroll?S.dst.px+S.bzscroll.getNow()*S.dst.ax:S.newscrollx)-e;(n<0&&s<S.newscrollx||n>0&&s>S.newscrollx)&&(s=S.newscrollx),S.setScrollLeft(s),s==S.newscrollx&&(t+=1)}else t+=1;2==t?(S.timer=0,S.cursorfreezed=!1,S.bzscroll=!1,S.scrollrunning=!1,i<0?i=0:i>S.page.maxh&&(i=Math.max(0,S.page.maxh)),s<0?s=0:s>S.page.maxw&&(s=S.page.maxw),s!=S.newscrollx||i!=S.newscrolly?S.doScrollPos(s,i):S.onscrollend&&S.triggerScrollEnd()):S.timer=c(r)||1}var o=void 0===o||!1===o?S.getScrollTop(!0):o;if(S.timer&&S.newscrolly==o&&S.newscrollx==e)return!0;S.timer&&d(S.timer),S.timer=0;var i=S.getScrollTop(),s=S.getScrollLeft();((S.newscrolly-i)*(o-i)<0||(S.newscrollx-s)*(e-s)<0)&&S.cancelScroll(),S.newscrolly=o,S.newscrollx=e,S.bouncescroll&&S.rail.visibility||(S.newscrolly<0?S.newscrolly=0:S.newscrolly>S.page.maxh&&(S.newscrolly=S.page.maxh)),S.bouncescroll&&S.railh.visibility||(S.newscrollx<0?S.newscrollx=0:S.newscrollx>S.page.maxw&&(S.newscrollx=S.page.maxw)),S.dst={},S.dst.x=e-s,S.dst.y=o-i,S.dst.px=s,S.dst.py=i;var n=Math.round(Math.sqrt(Math.pow(S.dst.x,2)+Math.pow(S.dst.y,2)));S.dst.ax=S.dst.x/n,S.dst.ay=S.dst.y/n;var l=0,a=n;0==S.dst.x?(l=i,a=o,S.dst.ay=1,S.dst.py=0):0==S.dst.y&&(l=s,a=e,S.dst.ax=1,S.dst.px=0);var u=S.getTransitionSpeed(n);if(t&&t<=1&&(u*=t),S.bzscroll=u>0&&(S.bzscroll?S.bzscroll.update(a,u):new C(l,a,u,0,1,0,1)),!S.timer){(i==S.page.maxh&&o>=S.page.maxh||s==S.page.maxw&&e>=S.page.maxw)&&S.checkContentSize();var h=1;S.cancelAnimationFrame=!1,S.timer=1,S.onscrollstart&&!S.scrollrunning&&S.triggerScrollStart(s,i,e,o,u),r(),(i==S.page.maxh&&o>=i||s==S.page.maxw&&e>=s)&&S.checkContentSize(),S.noticeCursor()}},this.cancelScroll=function(){return S.timer&&d(S.timer),S.timer=0,S.bzscroll=!1,S.scrollrunning=!1,S}):(this.doScrollLeft=function(e,o){var t=S.getScrollTop();S.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=S.getScrollLeft();S.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=e>S.page.maxw?S.page.maxw:e;r<0&&(r=0);var i=o>S.page.maxh?S.page.maxh:o;i<0&&(i=0),S.synched("scroll",function(){S.setScrollTop(i),S.setScrollLeft(r)})},this.cancelScroll=function(){}),this.doScrollBy=function(e,o){var t=0;if(t=o?Math.floor((S.scroll.y-e)*S.scrollratio.y):(S.timer?S.newscrolly:S.getScrollTop(!0))-e,S.bouncescroll){var r=Math.round(S.view.h/2);t<-r?t=-r:t>S.page.maxh+r&&(t=S.page.maxh+r)}S.cursorfreezed=!1;var i=S.getScrollTop(!0);return t<0&&i<=0?S.noticeCursor():t>S.page.maxh&&i>=S.page.maxh?(S.checkContentSize(),S.noticeCursor()):void S.doScrollTop(t)},this.doScrollLeftBy=function(e,o){var t=0;if(t=o?Math.floor((S.scroll.x-e)*S.scrollratio.x):(S.timer?S.newscrollx:S.getScrollLeft(!0))-e,S.bouncescroll){var r=Math.round(S.view.w/2);t<-r?t=-r:t>S.page.maxw+r&&(t=S.page.maxw+r)}S.cursorfreezed=!1;var i=S.getScrollLeft(!0);return t<0&&i<=0?S.noticeCursor():t>S.page.maxw&&i>=S.page.maxw?S.noticeCursor():void S.doScrollLeft(t)},this.doScrollTo=function(e,o){var t=o?Math.round(e*S.scrollratio.y):e;t<0?t=0:t>S.page.maxh&&(t=S.page.maxh),S.cursorfreezed=!1,S.doScrollTop(e)},this.checkContentSize=function(){var e=S.getContentSize();e.h==S.page.h&&e.w==S.page.w||S.resize(!1,e)},S.onscroll=function(e){S.rail.drag||S.cursorfreezed||S.synched("scroll",function(){S.scroll.y=Math.round(S.getScrollTop()*(1/S.scrollratio.y)),S.railh&&(S.scroll.x=Math.round(S.getScrollLeft()*(1/S.scrollratio.x))),S.noticeCursor()})},S.bind(S.docscroll,"scroll",S.onscroll),this.doZoomIn=function(e){if(!S.zoomactive){S.zoomactive=!0,S.zoomrestore={style:{}};var o=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"],t=S.win[0].style;for(var r in o){var i=o[r];S.zoomrestore.style[i]=void 0!==t[i]?t[i]:""}S.zoomrestore.style.width=S.win.css("width"),S.zoomrestore.style.height=S.win.css("height"),S.zoomrestore.padding={w:S.win.outerWidth()-S.win.width(),h:S.win.outerHeight()-S.win.height()},E.isios4&&(S.zoomrestore.scrollTop=a.scrollTop(),a.scrollTop(0)),S.win.css({position:E.isios4?"absolute":"fixed",top:0,left:0,zIndex:s+100,margin:0});var n=S.win.css("backgroundColor");return(""==n||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(n))&&S.win.css("backgroundColor","#fff"),S.rail.css({zIndex:s+101}),S.zoom.css({zIndex:s+102}),S.zoom.css("backgroundPosition","0 -18px"),S.resizeZoom(),S.onzoomin&&S.onzoomin.call(S),S.cancelEvent(e)}},this.doZoomOut=function(e){if(S.zoomactive)return S.zoomactive=!1,S.win.css("margin",""),S.win.css(S.zoomrestore.style),E.isios4&&a.scrollTop(S.zoomrestore.scrollTop),S.rail.css({"z-index":S.zindex}),S.zoom.css({"z-index":S.zindex}),S.zoomrestore=!1,S.zoom.css("backgroundPosition","0 0"),S.onResize(),S.onzoomout&&S.onzoomout.call(S),S.cancelEvent(e)},this.doZoom=function(e){return S.zoomactive?S.doZoomOut(e):S.doZoomIn(e)},this.resizeZoom=function(){if(S.zoomactive){var e=S.getScrollTop();S.win.css({width:a.width()-S.zoomrestore.padding.w+"px",height:a.height()-S.zoomrestore.padding.h+"px"}),S.onResize(),S.setScrollTop(Math.min(S.page.maxh,e))}},this.init(),n.nicescroll.push(this)},v=function(e){var o=this;this.nc=e,this.lastx=0,this.lasty=0,this.speedx=0,this.speedy=0,this.lasttime=0,this.steptime=0,this.snapx=!1,this.snapy=!1,this.demulx=0,this.demuly=0,this.lastscrollx=-1,this.lastscrolly=-1,this.chkx=0,this.chky=0,this.timer=0,this.reset=function(e,t){o.stop(),o.steptime=0,o.lasttime=p(),o.speedx=0,o.speedy=0,o.lastx=e,o.lasty=t,o.lastscrollx=-1,o.lastscrolly=-1},this.update=function(e,t){var r=p();o.steptime=r-o.lasttime,o.lasttime=r;var i=t-o.lasty,s=e-o.lastx,n=o.nc.getScrollTop()+i,l=o.nc.getScrollLeft()+s;o.snapx=l<0||l>o.nc.page.maxw,o.snapy=n<0||n>o.nc.page.maxh,o.speedx=s,o.speedy=i,o.lastx=e,o.lasty=t},this.stop=function(){o.nc.unsynched("domomentum2d"),o.timer&&clearTimeout(o.timer),o.timer=0,o.lastscrollx=-1,o.lastscrolly=-1},this.doSnapy=function(e,t){var r=!1;t<0?(t=0,r=!0):t>o.nc.page.maxh&&(t=o.nc.page.maxh,r=!0),e<0?(e=0,r=!0):e>o.nc.page.maxw&&(e=o.nc.page.maxw,r=!0),r?o.nc.doScrollPos(e,t,o.nc.opt.snapbackspeed):o.nc.triggerScrollEnd()},this.doMomentum=function(e){var t=p(),r=e?t+e:o.lasttime,i=o.nc.getScrollLeft(),s=o.nc.getScrollTop(),n=o.nc.page.maxh,l=o.nc.page.maxw;o.speedx=l>0?Math.min(60,o.speedx):0,o.speedy=n>0?Math.min(60,o.speedy):0;var a=r&&t-r<=60;(s<0||s>n||i<0||i>l)&&(a=!1);var c=!(!o.speedy||!a)&&o.speedy,d=!(!o.speedx||!a)&&o.speedx;if(c||d){var u=Math.max(16,o.steptime);if(u>50){var h=u/50;o.speedx*=h,o.speedy*=h,u=50}o.demulxy=0,o.lastscrollx=o.nc.getScrollLeft(),o.chkx=o.lastscrollx,o.lastscrolly=o.nc.getScrollTop(),o.chky=o.lastscrolly;var m=o.lastscrollx,f=o.lastscrolly,g=function(){var e=p()-t>600?.04:.02;o.speedx&&(m=Math.floor(o.lastscrollx-o.speedx*(1-o.demulxy)),o.lastscrollx=m,(m<0||m>l)&&(e=.1)),o.speedy&&(f=Math.floor(o.lastscrolly-o.speedy*(1-o.demulxy)),o.lastscrolly=f,(f<0||f>n)&&(e=.1)),o.demulxy=Math.min(1,o.demulxy+e),o.nc.synched("domomentum2d",function(){if(o.speedx){o.nc.getScrollLeft();o.chkx=m,o.nc.setScrollLeft(m)}if(o.speedy){o.nc.getScrollTop();o.chky=f,o.nc.setScrollTop(f)}o.timer||(o.nc.hideCursor(),o.doSnapy(m,f))}),o.demulxy<1?o.timer=setTimeout(g,u):(o.stop(),o.nc.hideCursor(),o.doSnapy(m,f))};g()}else o.doSnapy(o.nc.getScrollLeft(),o.nc.getScrollTop())}},b=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(e,o,t){var r=n.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollTop():b.call(e)},set:function(e,o){var t=n.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollTop(parseInt(o)):b.call(e,o),this}},e.fn.scrollTop=function(e){if(void 0===e){var o=!!this[0]&&(n.data(this[0],"__nicescroll")||!1);return o&&o.ishwscroll?o.getScrollTop():b.call(this)}return this.each(function(){var o=n.data(this,"__nicescroll")||!1;o&&o.ishwscroll?o.setScrollTop(parseInt(e)):b.call(n(this),e)})};var y=e.fn.scrollLeft;n.cssHooks.pageXOffset={get:function(e,o,t){var r=n.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollLeft():y.call(e)},set:function(e,o){var t=n.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollLeft(parseInt(o)):y.call(e,o),this}},e.fn.scrollLeft=function(e){if(void 0===e){var o=!!this[0]&&(n.data(this[0],"__nicescroll")||!1);return o&&o.ishwscroll?o.getScrollLeft():y.call(this)}return this.each(function(){var o=n.data(this,"__nicescroll")||!1;o&&o.ishwscroll?o.setScrollLeft(parseInt(e)):y.call(n(this),e)})};var x=function(e){var o=this;if(this.length=0,this.name="nicescrollarray",this.each=function(e){return n.each(o,e),o},this.push=function(e){o[o.length]=e,o.length++},this.eq=function(e){return o[e]},e)for(var t=0;t<e.length;t++){var r=n.data(e[t],"__nicescroll")||!1;r&&(this[this.length]=r,this.length++)}return this};!function(e,o,t){for(var r=0,i=o.length;r<i;r++)t(e,o[r])}(x.prototype,["show","hide","toggle","onResize","resize","remove","stop","doScrollPos"],function(e,o){e[o]=function(){var e=arguments;return this.each(function(){this[o].apply(this,e)})}}),e.fn.getNiceScroll=function(e){return void 0===e?new x(this):this[e]&&n.data(this[e],"__nicescroll")||!1},e.expr[":"].nicescroll=function(e){return void 0!==n.data(e,"__nicescroll")},n.fn.niceScroll=function(e,o){void 0!==o||"object"!=typeof e||"jquery"in e||(o=e,e=!1);var t=new x;return this.each(function(){var r=n(this),i=n.extend({},o);if(e){var s=n(e);i.doc=s.length>1?n(e,r):s,i.win=r}!("doc"in i)||"win"in i||(i.win=r);var l=r.data("__nicescroll")||!1;l||(i.doc=i.doc||r,l=new w(i,r),r.data("__nicescroll",l)),t.push(l)}),1===t.length?t[0]:t},window.NiceScroll={getjQuery:function(){return e}},n.nicescroll||(n.nicescroll=new x,n.nicescroll.options=m)});
/* nicescroll v3.7.3 InuYaksa - MIT - https://nicescroll.areaaperta.com */
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){"use strict";var o=!1,t=!1,r=0,i=2e3,s=0,n=e,l=document,a=n(window),c=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||!1}(),d=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||!1}();if(c)window.cancelAnimationFrame||(d=function(e){});else{var u=0;c=function(e,o){var t=(new Date).getTime(),r=Math.max(0,16-(t-u)),i=window.setTimeout(function(){e(t+r)},r);return u=t+r,i},d=function(e){window.clearTimeout(e)}}var h=window.MutationObserver||window.WebKitMutationObserver||!1,p=Date.now||function(){return(new Date).getTime()},m={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:60,mousescrollstep:24,touchbehavior:!1,emulatetouch:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:function(){var e=l.currentScript||function(){var e=l.getElementsByTagName("script");return!!e.length&&e[e.length-1]}(),o=e?e.src.split("?")[0]:"";return o.split("/").length>0?o.split("/").slice(0,-1).join("/")+"/":""}(),preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1},f=!1,g=function(){if(f)return f;var e=l.createElement("DIV"),o=e.style,t=navigator.userAgent,r=navigator.platform,i={};return i.haspointerlock="pointerLockElement"in l||"webkitPointerLockElement"in l||"mozPointerLockElement"in l,i.isopera="opera"in window,i.isopera12=i.isopera&&"getUserMedia"in navigator,i.isoperamini="[object OperaMini]"===Object.prototype.toString.call(window.operamini),i.isie="all"in l&&"attachEvent"in e&&!i.isopera,i.isieold=i.isie&&!("msInterpolationMode"in o),i.isie7=i.isie&&!i.isieold&&(!("documentMode"in l)||7===l.documentMode),i.isie8=i.isie&&"documentMode"in l&&8===l.documentMode,i.isie9=i.isie&&"performance"in window&&9===l.documentMode,i.isie10=i.isie&&"performance"in window&&10===l.documentMode,i.isie11="msRequestFullscreen"in e&&l.documentMode>=11,i.ismsedge="msCredentials"in window,i.ismozilla="MozAppearance"in o,i.iswebkit=!i.ismsedge&&"WebkitAppearance"in o,i.ischrome=i.iswebkit&&"chrome"in window,i.ischrome38=i.ischrome&&"touchAction"in o,i.ischrome22=!i.ischrome38&&i.ischrome&&i.haspointerlock,i.ischrome26=!i.ischrome38&&i.ischrome&&"transition"in o,i.cantouch="ontouchstart"in l.documentElement||"ontouchstart"in window,i.hasw3ctouch=(window.PointerEvent||!1)&&(navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0),i.hasmstouch=!i.hasw3ctouch&&(window.MSPointerEvent||!1),i.ismac=/^mac$/i.test(r),i.isios=i.cantouch&&/iphone|ipad|ipod/i.test(r),i.isios4=i.isios&&!("seal"in Object),i.isios7=i.isios&&"webkitHidden"in l,i.isios8=i.isios&&"hidden"in l,i.isios10=i.isios&&window.Proxy,i.isandroid=/android/i.test(t),i.haseventlistener="addEventListener"in e,i.trstyle=!1,i.hastransform=!1,i.hastranslate3d=!1,i.transitionstyle=!1,i.hastransition=!1,i.transitionend=!1,i.trstyle="transform",i.hastransform="transform"in o||function(){for(var e=["msTransform","webkitTransform","MozTransform","OTransform"],t=0,r=e.length;t<r;t++)if(void 0!==o[e[t]]){i.trstyle=e[t];break}i.hastransform=!!i.trstyle}(),i.hastransform&&(o[i.trstyle]="translate3d(1px,2px,3px)",i.hastranslate3d=/translate3d/.test(o[i.trstyle])),i.transitionstyle="transition",i.prefixstyle="",i.transitionend="transitionend",i.hastransition="transition"in o||function(){i.transitionend=!1;for(var e=["webkitTransition","msTransition","MozTransition","OTransition","OTransition","KhtmlTransition"],t=["-webkit-","-ms-","-moz-","-o-","-o","-khtml-"],r=["webkitTransitionEnd","msTransitionEnd","transitionend","otransitionend","oTransitionEnd","KhtmlTransitionEnd"],s=0,n=e.length;s<n;s++)if(e[s]in o){i.transitionstyle=e[s],i.prefixstyle=t[s],i.transitionend=r[s];break}i.ischrome26&&(i.prefixstyle=t[1]),i.hastransition=i.transitionstyle}(),i.cursorgrabvalue=function(){var e=["grab","-webkit-grab","-moz-grab"];(i.ischrome&&!i.ischrome38||i.isie)&&(e=[]);for(var t=0,r=e.length;t<r;t++){var s=e[t];if(o.cursor=s,o.cursor==s)return s}return"url(https://cdnjs.cloudflare.com/ajax/libs/slider-pro/1.3.0/css/images/openhand.cur),n-resize"}(),i.hasmousecapture="setCapture"in e,i.hasMutationObserver=!1!==h,e=null,f=i,i},w=function(e,u){function f(){var e=S.doc.css(E.trstyle);return!(!e||"matrix"!=e.substr(0,6))&&e.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/)}function w(){var e=S.win;if("zIndex"in e)return e.zIndex();for(;e.length>0;){if(9==e[0].nodeType)return!1;var o=e.css("zIndex");if(!isNaN(o)&&0!=o)return parseInt(o);e=e.parent()}return!1}function b(e,o,t){var r=e.css(o),i=parseFloat(r);if(isNaN(i)){var s=3==(i=P[r]||0)?t?S.win.outerHeight()-S.win.innerHeight():S.win.outerWidth()-S.win.innerWidth():1;return S.isie8&&i&&(i+=1),s?i:0}return i}function y(e,o,t,r){S._bind(e,o,function(r){var i={original:r=r||window.event,target:r.target||r.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==r.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return r.preventDefault?r.preventDefault():r.returnValue=!1,!1},stopImmediatePropagation:function(){r.stopImmediatePropagation?r.stopImmediatePropagation():r.cancelBubble=!0}};return"mousewheel"==o?(r.wheelDeltaX&&(i.deltaX=-.025*r.wheelDeltaX),r.wheelDeltaY&&(i.deltaY=-.025*r.wheelDeltaY),!i.deltaY&&!i.deltaX&&(i.deltaY=-.025*r.wheelDelta)):i.deltaY=r.detail,t.call(e,i)},r)}function x(e,o,t){var r,i;if(0==e.deltaMode?(r=-Math.floor(e.deltaX*(S.opt.mousescrollstep/54)),i=-Math.floor(e.deltaY*(S.opt.mousescrollstep/54))):1==e.deltaMode&&(r=-Math.floor(e.deltaX*S.opt.mousescrollstep),i=-Math.floor(e.deltaY*S.opt.mousescrollstep)),o&&S.opt.oneaxismousemode&&0===r&&i&&(r=i,i=0,t&&(r<0?S.getScrollLeft()>=S.page.maxw:S.getScrollLeft()<=0)&&(i=r,r=0)),S.isrtlmode&&(r=-r),r){if(S.scrollmom)S.scrollmom.stop();else if(r<0){if(S.getScrollLeft()>=S.page.maxw)return!0}else if(S.getScrollLeft()<=0)return!0;S.lastdeltax+=r,S.debounced("mousewheelx",function(){var e=S.lastdeltax;S.lastdeltax=0,S.rail.drag||S.doScrollLeftBy(e)},15)}if(i){if(S.opt.nativeparentscrolling&&t&&!S.ispage&&!S.zoomactive)if(i<0){if(S.getScrollTop()>=S.page.maxh)return!0}else if(S.getScrollTop()<=0)return!0;S.scrollmom&&S.scrollmom.stop(),S.lastdeltay+=i,S.synched("mousewheely",function(){var e=S.lastdeltay;S.lastdeltay=0,S.rail.drag||S.doScrollBy(e)},15)}return e.stopImmediatePropagation(),e.preventDefault()}var S=this;this.version="3.7.3",this.name="nicescroll",this.me=u;var z=n("body");if(this.opt={doc:z,win:!1},n.extend(this.opt,m),this.opt.snapbackspeed=80,e)for(var k in S.opt)void 0!==e[k]&&(S.opt[k]=e[k]);if(S.opt.disablemutationobserver&&(h=!1),this.doc=S.opt.doc,this.iddoc=this.doc&&this.doc[0]?this.doc[0].id||"":"",this.ispage=/^BODY|HTML/.test(S.opt.win?S.opt.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=!1!==S.opt.win,this.win=S.opt.win||(this.ispage?a:this.doc),this.docscroll=this.ispage&&!this.haswrapper?a:this.win,this.body=z,this.viewport=!1,this.isfixed=!1,this.iframe=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=S.opt.autohidemode,this.onmousedown=!1,this.onmouseup=!1,this.onmousemove=!1,this.onmousewheel=!1,this.onkeypress=!1,this.ongesturezoom=!1,this.onclick=!1,this.onscrollstart=!1,this.onscrollend=!1,this.onscrollcancel=!1,this.onzoomin=!1,this.onzoomout=!1,this.view=!1,this.page=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,"auto"==this.opt.rtlmode){var T=this.win[0]==window?this.body:this.win,M=T.css("writing-mode")||T.css("-webkit-writing-mode")||T.css("-ms-writing-mode")||T.css("-moz-writing-mode");"horizontal-tb"==M||"lr-tb"==M||""==M?(this.isrtlmode="rtl"==T.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==M||"tb"==M||"tb-rl"==M||"rl-tb"==M,this.isvertical="vertical-rl"==M||"tb"==M||"tb-rl"==M)}else this.isrtlmode=!0===this.opt.rtlmode,this.isvertical=!1;if(this.scrollrunning=!1,this.scrollmom=!1,this.observer=!1,this.observerremover=!1,this.observerbody=!1,!1===S.opt.scrollbarid)do{this.id="ascrail"+i++}while(l.getElementById(this.id));else this.id=S.opt.scrollbarid;this.rail=!1,this.cursor=!1,this.cursorfreezed=!1,this.selectiondrag=!1,this.zoom=!1,this.zoomactive=!1,this.hasfocus=!1,this.hasmousefocus=!1,this.visibility=!0,this.railslocked=!1,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=S.opt.overflowx,this.overflowy=S.opt.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=g();var E=n.extend({},this.detected);this.canhwscroll=E.hastransform&&S.opt.hwacceleration,this.ishwscroll=this.canhwscroll&&S.haswrapper,this.isrtlmode?this.isvertical?this.hasreversehr=!(E.iswebkit||E.isie||E.isie11):this.hasreversehr=!(E.iswebkit||E.isie&&!E.isie10&&!E.isie11):this.hasreversehr=!1,this.istouchcapable=!1,E.cantouch||!E.hasw3ctouch&&!E.hasmstouch?!E.cantouch||E.isios||E.isandroid||!E.iswebkit&&!E.ismozilla||(this.istouchcapable=!0):this.istouchcapable=!0,S.opt.enablemouselockapi||(E.hasmousecapture=!1,E.haspointerlock=!1),this.debounced=function(e,o,t){S&&(S.delaylist[e]||!1||(S.delaylist[e]={h:c(function(){S.delaylist[e].fn.call(S),S.delaylist[e]=!1},t)},o.call(S)),S.delaylist[e].fn=o)};var L=!1;this.synched=function(e,o){return S.synclist[e]=o,function(){L||(c(function(){if(S){L=!1;for(var e in S.synclist){var o=S.synclist[e];o&&o.call(S),S.synclist[e]=!1}}}),L=!0)}(),e},this.unsynched=function(e){S.synclist[e]&&(S.synclist[e]=!1)},this.css=function(e,o){for(var t in o)S.saved.css.push([e,t,e.css(t)]),e.css(t,o[t])},this.scrollTop=function(e){return void 0===e?S.getScrollTop():S.setScrollTop(e)},this.scrollLeft=function(e){return void 0===e?S.getScrollLeft():S.setScrollLeft(e)};var C=function(e,o,t,r,i,s,n){this.st=e,this.ed=o,this.spd=t,this.p1=r||0,this.p2=i||1,this.p3=s||0,this.p4=n||1,this.ts=p(),this.df=this.ed-this.st};if(C.prototype={B2:function(e){return 3*e*e*(1-e)},B3:function(e){return 3*e*(1-e)*(1-e)},B4:function(e){return(1-e)*(1-e)*(1-e)},getNow:function(){var e=1-(p()-this.ts)/this.spd,o=this.B2(e)+this.B3(e)+this.B4(e);return e<0?this.ed:this.st+Math.round(this.df*o)},update:function(e,o){return this.st=this.getNow(),this.ed=e,this.spd=o,this.ts=p(),this.df=this.ed-this.st,this}},this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},E.hastranslate3d&&E.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(e){if(!e){var o=f();if(o)return 16==o.length?-o[13]:-o[5];if(S.timerscroll&&S.timerscroll.bz)return S.timerscroll.bz.getNow()}return S.doc.translate.y},this.getScrollLeft=function(e){if(!e){var o=f();if(o)return 16==o.length?-o[12]:-o[4];if(S.timerscroll&&S.timerscroll.bh)return S.timerscroll.bh.getNow()}return S.doc.translate.x},this.notifyScrollEvent=function(e){var o=l.createEvent("UIEvents");o.initUIEvent("scroll",!1,!0,window,1),o.niceevent=!0,e.dispatchEvent(o)};var N=this.isrtlmode?1:-1;E.hastranslate3d&&S.opt.enabletranslate3d?(this.setScrollTop=function(e,o){S.doc.translate.y=e,S.doc.translate.ty=-1*e+"px",S.doc.css(E.trstyle,"translate3d("+S.doc.translate.tx+","+S.doc.translate.ty+",0)"),o||S.notifyScrollEvent(S.win[0])},this.setScrollLeft=function(e,o){S.doc.translate.x=e,S.doc.translate.tx=e*N+"px",S.doc.css(E.trstyle,"translate3d("+S.doc.translate.tx+","+S.doc.translate.ty+",0)"),o||S.notifyScrollEvent(S.win[0])}):(this.setScrollTop=function(e,o){S.doc.translate.y=e,S.doc.translate.ty=-1*e+"px",S.doc.css(E.trstyle,"translate("+S.doc.translate.tx+","+S.doc.translate.ty+")"),o||S.notifyScrollEvent(S.win[0])},this.setScrollLeft=function(e,o){S.doc.translate.x=e,S.doc.translate.tx=e*N+"px",S.doc.css(E.trstyle,"translate("+S.doc.translate.tx+","+S.doc.translate.ty+")"),o||S.notifyScrollEvent(S.win[0])})}else this.getScrollTop=function(){return S.docscroll.scrollTop()},this.setScrollTop=function(e){return setTimeout(function(){S&&S.docscroll.scrollTop(e)},1)},this.getScrollLeft=function(){return S.hasreversehr?S.detected.ismozilla?S.page.maxw-Math.abs(S.docscroll.scrollLeft()):S.page.maxw-S.docscroll.scrollLeft():S.docscroll.scrollLeft()},this.setScrollLeft=function(e){return setTimeout(function(){if(S)return S.hasreversehr&&(e=S.detected.ismozilla?-(S.page.maxw-e):S.page.maxw-e),S.docscroll.scrollLeft(e)},1)};this.getTarget=function(e){return!!e&&(e.target?e.target:!!e.srcElement&&e.srcElement)},this.hasParent=function(e,o){if(!e)return!1;for(var t=e.target||e.srcElement||e||!1;t&&t.id!=o;)t=t.parentNode||!1;return!1!==t};var P={thin:1,medium:3,thick:5};this.getDocumentScrollOffset=function(){return{top:window.pageYOffset||l.documentElement.scrollTop,left:window.pageXOffset||l.documentElement.scrollLeft}},this.getOffset=function(){if(S.isfixed){var e=S.win.offset(),o=S.getDocumentScrollOffset();return e.top-=o.top,e.left-=o.left,e}var t=S.win.offset();if(!S.viewport)return t;var r=S.viewport.offset();return{top:t.top-r.top,left:t.left-r.left}},this.updateScrollBar=function(e){var o,t;if(S.ishwscroll)S.rail.css({height:S.win.innerHeight()-(S.opt.railpadding.top+S.opt.railpadding.bottom)}),S.railh&&S.railh.css({width:S.win.innerWidth()-(S.opt.railpadding.left+S.opt.railpadding.right)});else{var r=S.getOffset();if(o={top:r.top,left:r.left-(S.opt.railpadding.left+S.opt.railpadding.right)},o.top+=b(S.win,"border-top-width",!0),o.left+=S.rail.align?S.win.outerWidth()-b(S.win,"border-right-width")-S.rail.width:b(S.win,"border-left-width"),(t=S.opt.railoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left)),S.railslocked||S.rail.css({top:o.top,left:o.left,height:(e?e.h:S.win.innerHeight())-(S.opt.railpadding.top+S.opt.railpadding.bottom)}),S.zoom&&S.zoom.css({top:o.top+1,left:1==S.rail.align?o.left-20:o.left+S.rail.width+4}),S.railh&&!S.railslocked){o={top:r.top,left:r.left},(t=S.opt.railhoffset)&&(t.top&&(o.top+=t.top),t.left&&(o.left+=t.left));var i=S.railh.align?o.top+b(S.win,"border-top-width",!0)+S.win.innerHeight()-S.railh.height:o.top+b(S.win,"border-top-width",!0),s=o.left+b(S.win,"border-left-width");S.railh.css({top:i-(S.opt.railpadding.top+S.opt.railpadding.bottom),left:s,width:S.railh.width})}}},this.doRailClick=function(e,o,t){var r,i,s,n;S.railslocked||(S.cancelEvent(e),"pageY"in e||(e.pageX=e.clientX+l.documentElement.scrollLeft,e.pageY=e.clientY+l.documentElement.scrollTop),o?(r=t?S.doScrollLeft:S.doScrollTop)(s=t?(e.pageX-S.railh.offset().left-S.cursorwidth/2)*S.scrollratio.x:(e.pageY-S.rail.offset().top-S.cursorheight/2)*S.scrollratio.y):(r=t?S.doScrollLeftBy:S.doScrollBy,s=t?S.scroll.x:S.scroll.y,n=t?e.pageX-S.railh.offset().left:e.pageY-S.rail.offset().top,i=t?S.view.w:S.view.h,r(s>=n?i:-i)))},S.hasanimationframe="requestAnimationFrame"in window,S.hascancelanimationframe="cancelAnimationFrame"in window,this.init=function(){if(S.saved.css=[],E.isoperamini)return!0;if(E.isandroid&&!("hidden"in l))return!0;S.opt.emulatetouch=S.opt.emulatetouch||S.opt.touchbehavior;var e={"overflow-y":"hidden"};if((E.isie11||E.isie10)&&(e["-ms-overflow-style"]="none"),S.zindex="auto",S.ispage||"auto"!=S.opt.zindex?S.zindex=S.opt.zindex:S.zindex=w()||"auto",!S.ispage&&"auto"!=S.zindex&&S.zindex>s&&(s=S.zindex),S.isie&&0==S.zindex&&"auto"==S.opt.zindex&&(S.zindex="auto"),!S.ispage||!E.cantouch&&!E.isieold){var i=S.docscroll;S.ispage&&(i=S.haswrapper?S.win:S.doc),S.css(i,e),S.ispage&&(E.isie11||E.isie)&&S.css(n("html"),e),!E.isios||S.ispage||S.haswrapper||S.css(z,{"-webkit-overflow-scrolling":"touch"});var c=n(l.createElement("div"));c.css({position:"relative",top:0,float:"right",width:S.opt.cursorwidth,height:0,"background-color":S.opt.cursorcolor,border:S.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":S.opt.cursorborderradius,"-moz-border-radius":S.opt.cursorborderradius,"border-radius":S.opt.cursorborderradius}),c.addClass("nicescroll-cursors"),S.cursor=c;var d=n(l.createElement("div"));d.attr("id",S.id),d.addClass("nicescroll-rails nicescroll-rails-vr");var u,p,m=["left","right","top","bottom"];for(var f in m)p=m[f],(u=S.opt.railpadding[p])?d.css("padding-"+p,u+"px"):S.opt.railpadding[p]=0;d.append(c),d.width=Math.max(parseFloat(S.opt.cursorwidth),c.outerWidth()),d.css({width:d.width+"px",zIndex:S.zindex,background:S.opt.background,cursor:"default"}),d.visibility=!0,d.scrollable=!0,d.align="left"==S.opt.railalign?0:1,S.rail=d,S.rail.drag=!1;var g=!1;!S.opt.boxzoom||S.ispage||E.isieold||(g=l.createElement("div"),S.bind(g,"click",S.doZoom),S.bind(g,"mouseenter",function(){S.zoom.css("opacity",S.opt.cursoropacitymax)}),S.bind(g,"mouseleave",function(){S.zoom.css("opacity",S.opt.cursoropacitymin)}),S.zoom=n(g),S.zoom.css({cursor:"pointer",zIndex:S.zindex,backgroundImage:"url("+S.opt.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),S.opt.dblclickzoom&&S.bind(S.win,"dblclick",S.doZoom),E.cantouch&&S.opt.gesturezoom&&(S.ongesturezoom=function(e){return e.scale>1.5&&S.doZoomIn(e),e.scale<.8&&S.doZoomOut(e),S.cancelEvent(e)},S.bind(S.win,"gestureend",S.ongesturezoom))),S.railh=!1;var b;if(S.opt.horizrailenabled&&(S.css(i,{overflowX:"hidden"}),(c=n(l.createElement("div"))).css({position:"absolute",top:0,height:S.opt.cursorwidth,width:0,backgroundColor:S.opt.cursorcolor,border:S.opt.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":S.opt.cursorborderradius,"-moz-border-radius":S.opt.cursorborderradius,"border-radius":S.opt.cursorborderradius}),E.isieold&&c.css("overflow","hidden"),c.addClass("nicescroll-cursors"),S.cursorh=c,(b=n(l.createElement("div"))).attr("id",S.id+"-hr"),b.addClass("nicescroll-rails nicescroll-rails-hr"),b.height=Math.max(parseFloat(S.opt.cursorwidth),c.outerHeight()),b.css({height:b.height+"px",zIndex:S.zindex,background:S.opt.background}),b.append(c),b.visibility=!0,b.scrollable=!0,b.align="top"==S.opt.railvalign?0:1,S.railh=b,S.railh.drag=!1),S.ispage)d.css({position:"fixed",top:0,height:"100%"}),d.align?d.css({right:0}):d.css({left:0}),S.body.append(d),S.railh&&(b.css({position:"fixed",left:0,width:"100%"}),b.align?b.css({bottom:0}):b.css({top:0}),S.body.append(b));else{if(S.ishwscroll){"static"==S.win.css("position")&&S.css(S.win,{position:"relative"});var y="HTML"==S.win[0].nodeName?S.body:S.win;n(y).scrollTop(0).scrollLeft(0),S.zoom&&(S.zoom.css({position:"absolute",top:1,right:0,"margin-right":d.width+4}),y.append(S.zoom)),d.css({position:"absolute",top:0}),d.align?d.css({right:0}):d.css({left:0}),y.append(d),b&&(b.css({position:"absolute",left:0,bottom:0}),b.align?b.css({bottom:0}):b.css({top:0}),y.append(b))}else{S.isfixed="fixed"==S.win.css("position");var x=S.isfixed?"fixed":"absolute";S.isfixed||(S.viewport=S.getViewport(S.win[0])),S.viewport&&(S.body=S.viewport,0==/fixed|absolute/.test(S.viewport.css("position"))&&S.css(S.viewport,{position:"relative"})),d.css({position:x}),S.zoom&&S.zoom.css({position:x}),S.updateScrollBar(),S.body.append(d),S.zoom&&S.body.append(S.zoom),S.railh&&(b.css({position:x}),S.body.append(b))}E.isios&&S.css(S.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),E.isie&&S.opt.disableoutline&&S.win.attr("hideFocus","true"),E.iswebkit&&S.opt.disableoutline&&S.win.css("outline","none")}if(!1===S.opt.autohidemode?(S.autohidedom=!1,S.rail.css({opacity:S.opt.cursoropacitymax}),S.railh&&S.railh.css({opacity:S.opt.cursoropacitymax})):!0===S.opt.autohidemode||"leave"===S.opt.autohidemode?(S.autohidedom=n().add(S.rail),E.isie8&&(S.autohidedom=S.autohidedom.add(S.cursor)),S.railh&&(S.autohidedom=S.autohidedom.add(S.railh)),S.railh&&E.isie8&&(S.autohidedom=S.autohidedom.add(S.cursorh))):"scroll"==S.opt.autohidemode?(S.autohidedom=n().add(S.rail),S.railh&&(S.autohidedom=S.autohidedom.add(S.railh))):"cursor"==S.opt.autohidemode?(S.autohidedom=n().add(S.cursor),S.railh&&(S.autohidedom=S.autohidedom.add(S.cursorh))):"hidden"==S.opt.autohidemode&&(S.autohidedom=!1,S.hide(),S.railslocked=!1),E.cantouch||S.istouchcapable||S.opt.emulatetouch||E.hasmstouch){S.scrollmom=new v(S),S.ontouchstart=function(e){if(e.pointerType&&2!=e.pointerType&&"touch"!=e.pointerType)return!1;if(S.hasmoving=!1,!S.railslocked){var o;if(E.hasmstouch)for(o=!!e.target&&e.target;o;){var t=n(o).getNiceScroll();if(t.length>0&&t[0].me==S.me)break;if(t.length>0)return!1;if("DIV"==o.nodeName&&o.id==S.id)break;o=!!o.parentNode&&o.parentNode}if(e.stopPropagation(),S.cancelScroll(),(o=S.getTarget(e))&&/INPUT/i.test(o.nodeName)&&/range/i.test(o.type))return S.stopPropagation(e);if(!("clientX"in e)&&"changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),S.forcescreen){var r=e;(e={original:e.original?e.original:e}).clientX=r.screenX,e.clientY=r.screenY}if(S.rail.drag={x:e.clientX,y:e.clientY,sx:S.scroll.x,sy:S.scroll.y,st:S.getScrollTop(),sl:S.getScrollLeft(),pt:2,dl:!1,tg:o},S.ispage||!S.opt.directionlockdeadzone)S.rail.drag.dl="f";else{var i={w:a.width(),h:a.height()},s={w:Math.max(l.body.scrollWidth,l.documentElement.scrollWidth),h:Math.max(l.body.scrollHeight,l.documentElement.scrollHeight)},c=Math.max(0,s.h-i.h),d=Math.max(0,s.w-i.w);!S.rail.scrollable&&S.railh.scrollable?S.rail.drag.ck=c>0&&"v":S.rail.scrollable&&!S.railh.scrollable?S.rail.drag.ck=d>0&&"h":S.rail.drag.ck=!1,S.rail.drag.ck||(S.rail.drag.dl="f")}if(S.opt.emulatetouch&&S.isiframe&&E.isie){var u=S.win.position();S.rail.drag.x+=u.left,S.rail.drag.y+=u.top}if(S.hasmoving=!1,S.lastmouseup=!1,S.scrollmom.reset(e.clientX,e.clientY),!E.cantouch&&!this.istouchcapable&&!e.pointerType){if(!(!!o&&/INPUT|SELECT|BUTTON|TEXTAREA/i.test(o.nodeName)))return!S.ispage&&E.hasmousecapture&&o.setCapture(),S.opt.emulatetouch?(o.onclick&&!o._onclick&&(o._onclick=o.onclick,o.onclick=function(e){if(S.hasmoving)return!1;o._onclick.call(this,e)}),S.cancelEvent(e)):S.stopPropagation(e);/SUBMIT|CANCEL|BUTTON/i.test(n(o).attr("type"))&&(S.preventclick={tg:o,click:!1})}}},S.ontouchend=function(e){if(!S.rail.drag)return!0;if(2==S.rail.drag.pt){if(e.pointerType&&2!=e.pointerType&&"touch"!=e.pointerType)return!1;if(S.rail.drag=!1,S.hasmoving&&(S.scrollmom.doMomentum(),S.lastmouseup=!0,S.hideCursor(),E.hasmousecapture&&l.releaseCapture(),!E.cantouch))return S.cancelEvent(e)}else if(1==S.rail.drag.pt)return S.onmouseup(e)};var k=S.opt.emulatetouch&&S.isiframe&&!E.hasmousecapture;S.ontouchmove=function(e,o){if(!S.rail.drag)return!1;if(e.targetTouches&&S.opt.preventmultitouchscrolling&&e.targetTouches.length>1)return!1;if(e.pointerType&&2!=e.pointerType&&"touch"!=e.pointerType)return!1;if(2==S.rail.drag.pt){if("changedTouches"in e&&(e.clientX=e.changedTouches[0].clientX,e.clientY=e.changedTouches[0].clientY),S.rail.drag.y===e.clientY&&S.rail.drag.x===e.clientX)return!1;S.hasmoving||S.onscrollstart&&S.triggerScrollStart(e.clientX,e.clientY,0,0,0),S.hasmoving=!0,S.preventclick&&!S.preventclick.click&&(S.preventclick.click=S.preventclick.tg.onclick||!1,S.preventclick.tg.onclick=S.onpreventclick);var t,r;if(r=t=0,k&&!o){var i=S.win.position();r=-i.left,t=-i.top}var s=e.clientY+t,n=s-S.rail.drag.y,a=e.clientX+r,c=a-S.rail.drag.x,d=S.rail.drag.st-n;S.ishwscroll&&S.opt.bouncescroll?d<0?d=Math.round(d/2):d>S.page.maxh&&(d=S.page.maxh+Math.round((d-S.page.maxh)/2)):(d<0&&(d=0,s=0),d>S.page.maxh&&(d=S.page.maxh,s=0));var u;S.railh&&S.railh.scrollable&&(u=S.isrtlmode?c-S.rail.drag.sl:S.rail.drag.sl-c,S.ishwscroll&&S.opt.bouncescroll?u<0?u=Math.round(u/2):u>S.page.maxw&&(u=S.page.maxw+Math.round((u-S.page.maxw)/2)):(u<0&&(u=0,a=0),u>S.page.maxw&&(u=S.page.maxw,a=0)));var h=!1;if(S.rail.drag.dl)h=!0,"v"==S.rail.drag.dl?u=S.rail.drag.sl:"h"==S.rail.drag.dl&&(d=S.rail.drag.st);else{var p=Math.abs(n),m=Math.abs(c),f=S.opt.directionlockdeadzone;if("v"==S.rail.drag.ck){if(p>f&&m<=.3*p)return S.rail.drag=!1,!0;m>f&&(S.rail.drag.dl="f",z.scrollTop(z.scrollTop()))}else if("h"==S.rail.drag.ck){if(m>f&&p<=.3*m)return S.rail.drag=!1,!0;p>f&&(S.rail.drag.dl="f",z.scrollLeft(z.scrollLeft()))}}if(S.synched("touchmove",function(){S.rail.drag&&2==S.rail.drag.pt&&(S.prepareTransition&&S.prepareTransition(0),S.rail.scrollable&&S.setScrollTop(d),S.scrollmom.update(a,s),S.railh&&S.railh.scrollable?(S.setScrollLeft(u),S.showCursor(d,u)):S.showCursor(d),E.isie10&&l.selection.clear())}),E.ischrome&&S.istouchcapable&&(h=!1),h)return S.cancelEvent(e)}else if(1==S.rail.drag.pt)return S.onmousemove(e)},S.ontouchstartCursor=function(e,o){if(!S.rail.drag||3==S.rail.drag.pt){if(S.locked)return S.cancelEvent(e);S.cancelScroll(),S.rail.drag={x:e.touches[0].clientX,y:e.touches[0].clientY,sx:S.scroll.x,sy:S.scroll.y,pt:3,hr:!!o};var t=S.getTarget(e);return!S.ispage&&E.hasmousecapture&&t.setCapture(),S.isiframe&&!E.hasmousecapture&&(S.saved.csspointerevents=S.doc.css("pointer-events"),S.css(S.doc,{"pointer-events":"none"})),S.cancelEvent(e)}},S.ontouchendCursor=function(e){if(S.rail.drag){if(E.hasmousecapture&&l.releaseCapture(),S.isiframe&&!E.hasmousecapture&&S.doc.css("pointer-events",S.saved.csspointerevents),3!=S.rail.drag.pt)return;return S.rail.drag=!1,S.cancelEvent(e)}},S.ontouchmoveCursor=function(e){if(S.rail.drag){if(3!=S.rail.drag.pt)return;if(S.cursorfreezed=!0,S.rail.drag.hr){S.scroll.x=S.rail.drag.sx+(e.touches[0].clientX-S.rail.drag.x),S.scroll.x<0&&(S.scroll.x=0);var o=S.scrollvaluemaxw;S.scroll.x>o&&(S.scroll.x=o)}else{S.scroll.y=S.rail.drag.sy+(e.touches[0].clientY-S.rail.drag.y),S.scroll.y<0&&(S.scroll.y=0);var t=S.scrollvaluemax;S.scroll.y>t&&(S.scroll.y=t)}return S.synched("touchmove",function(){S.rail.drag&&3==S.rail.drag.pt&&(S.showCursor(),S.rail.drag.hr?S.doScrollLeft(Math.round(S.scroll.x*S.scrollratio.x),S.opt.cursordragspeed):S.doScrollTop(Math.round(S.scroll.y*S.scrollratio.y),S.opt.cursordragspeed))}),S.cancelEvent(e)}}}if(S.onmousedown=function(e,o){if(!S.rail.drag||1==S.rail.drag.pt){if(S.railslocked)return S.cancelEvent(e);S.cancelScroll(),S.rail.drag={x:e.clientX,y:e.clientY,sx:S.scroll.x,sy:S.scroll.y,pt:1,hr:o||!1};var t=S.getTarget(e);return!S.ispage&&E.hasmousecapture&&t.setCapture(),S.isiframe&&!E.hasmousecapture&&(S.saved.csspointerevents=S.doc.css("pointer-events"),S.css(S.doc,{"pointer-events":"none"})),S.hasmoving=!1,S.cancelEvent(e)}},S.onmouseup=function(e){if(S.rail.drag)return 1!=S.rail.drag.pt||(E.hasmousecapture&&l.releaseCapture(),S.isiframe&&!E.hasmousecapture&&S.doc.css("pointer-events",S.saved.csspointerevents),S.rail.drag=!1,S.hasmoving&&S.triggerScrollEnd(),S.cancelEvent(e))},S.onmousemove=function(e){if(S.rail.drag){if(1!==S.rail.drag.pt)return;if(E.ischrome&&0===e.which)return S.onmouseup(e);if(S.cursorfreezed=!0,S.hasmoving=!0,S.rail.drag.hr){S.scroll.x=S.rail.drag.sx+(e.clientX-S.rail.drag.x),S.scroll.x<0&&(S.scroll.x=0);var o=S.scrollvaluemaxw;S.scroll.x>o&&(S.scroll.x=o)}else{S.scroll.y=S.rail.drag.sy+(e.clientY-S.rail.drag.y),S.scroll.y<0&&(S.scroll.y=0);var t=S.scrollvaluemax;S.scroll.y>t&&(S.scroll.y=t)}return S.synched("mousemove",function(){S.rail.drag&&1==S.rail.drag.pt&&(S.showCursor(),S.rail.drag.hr?S.hasreversehr?S.doScrollLeft(S.scrollvaluemaxw-Math.round(S.scroll.x*S.scrollratio.x),S.opt.cursordragspeed):S.doScrollLeft(Math.round(S.scroll.x*S.scrollratio.x),S.opt.cursordragspeed):S.doScrollTop(Math.round(S.scroll.y*S.scrollratio.y),S.opt.cursordragspeed))}),S.cancelEvent(e)}S.checkarea=0},E.cantouch||S.opt.emulatetouch)S.onpreventclick=function(e){if(S.preventclick)return S.preventclick.tg.onclick=S.preventclick.click,S.preventclick=!1,S.cancelEvent(e)},S.onclick=!E.isios&&function(e){return!S.lastmouseup||(S.lastmouseup=!1,S.cancelEvent(e))},S.opt.grabcursorenabled&&E.cursorgrabvalue&&(S.css(S.ispage?S.doc:S.win,{cursor:E.cursorgrabvalue}),S.css(S.rail,{cursor:E.cursorgrabvalue}));else{var T=function(e){if(S.selectiondrag){if(e){var o=S.win.outerHeight(),t=e.pageY-S.selectiondrag.top;t>0&&t<o&&(t=0),t>=o&&(t-=o),S.selectiondrag.df=t}if(0!=S.selectiondrag.df){var r=2*-Math.floor(S.selectiondrag.df/6);S.doScrollBy(r),S.debounced("doselectionscroll",function(){T()},50)}}};S.hasTextSelected="getSelection"in l?function(){return l.getSelection().rangeCount>0}:"selection"in l?function(){return"None"!=l.selection.type}:function(){return!1},S.onselectionstart=function(e){S.ispage||(S.selectiondrag=S.win.offset())},S.onselectionend=function(e){S.selectiondrag=!1},S.onselectiondrag=function(e){S.selectiondrag&&S.hasTextSelected()&&S.debounced("selectionscroll",function(){T(e)},250)}}if(E.hasw3ctouch?(S.css(S.ispage?n("html"):S.win,{"touch-action":"none"}),S.css(S.rail,{"touch-action":"none"}),S.css(S.cursor,{"touch-action":"none"}),S.bind(S.win,"pointerdown",S.ontouchstart),S.bind(l,"pointerup",S.ontouchend),S.bind(l,"pointermove",S.ontouchmove)):E.hasmstouch?(S.css(S.ispage?n("html"):S.win,{"-ms-touch-action":"none"}),S.css(S.rail,{"-ms-touch-action":"none"}),S.css(S.cursor,{"-ms-touch-action":"none"}),S.bind(S.win,"MSPointerDown",S.ontouchstart),S.bind(l,"MSPointerUp",S.ontouchend),S.bind(l,"MSPointerMove",S.ontouchmove),S.bind(S.cursor,"MSGestureHold",function(e){e.preventDefault()}),S.bind(S.cursor,"contextmenu",function(e){e.preventDefault()})):E.cantouch&&(S.bind(S.win,"touchstart",S.ontouchstart,!1,!0),S.bind(l,"touchend",S.ontouchend,!1,!0),S.bind(l,"touchcancel",S.ontouchend,!1,!0),S.bind(l,"touchmove",S.ontouchmove,!1,!0)),S.opt.emulatetouch&&(S.bind(S.win,"mousedown",S.ontouchstart,!1,!0),S.bind(l,"mouseup",S.ontouchend,!1,!0),S.bind(l,"mousemove",S.ontouchmove,!1,!0)),(S.opt.cursordragontouch||!E.cantouch&&!S.opt.emulatetouch)&&(S.rail.css({cursor:"default"}),S.railh&&S.railh.css({cursor:"default"}),S.jqbind(S.rail,"mouseenter",function(){if(!S.ispage&&!S.win.is(":visible"))return!1;S.canshowonmouseevent&&S.showCursor(),S.rail.active=!0}),S.jqbind(S.rail,"mouseleave",function(){S.rail.active=!1,S.rail.drag||S.hideCursor()}),S.opt.sensitiverail&&(S.bind(S.rail,"click",function(e){S.doRailClick(e,!1,!1)}),S.bind(S.rail,"dblclick",function(e){S.doRailClick(e,!0,!1)}),S.bind(S.cursor,"click",function(e){S.cancelEvent(e)}),S.bind(S.cursor,"dblclick",function(e){S.cancelEvent(e)})),S.railh&&(S.jqbind(S.railh,"mouseenter",function(){if(!S.ispage&&!S.win.is(":visible"))return!1;S.canshowonmouseevent&&S.showCursor(),S.rail.active=!0}),S.jqbind(S.railh,"mouseleave",function(){S.rail.active=!1,S.rail.drag||S.hideCursor()}),S.opt.sensitiverail&&(S.bind(S.railh,"click",function(e){S.doRailClick(e,!1,!0)}),S.bind(S.railh,"dblclick",function(e){S.doRailClick(e,!0,!0)}),S.bind(S.cursorh,"click",function(e){S.cancelEvent(e)}),S.bind(S.cursorh,"dblclick",function(e){S.cancelEvent(e)})))),S.opt.cursordragontouch&&(this.istouchcapable||E.cantouch)&&(S.bind(S.cursor,"touchstart",S.ontouchstartCursor),S.bind(S.cursor,"touchmove",S.ontouchmoveCursor),S.bind(S.cursor,"touchend",S.ontouchendCursor),S.cursorh&&S.bind(S.cursorh,"touchstart",function(e){S.ontouchstartCursor(e,!0)}),S.cursorh&&S.bind(S.cursorh,"touchmove",S.ontouchmoveCursor),S.cursorh&&S.bind(S.cursorh,"touchend",S.ontouchendCursor)),E.cantouch||S.opt.emulatetouch?(S.bind(E.hasmousecapture?S.win:l,"mouseup",S.ontouchend),S.onclick&&S.bind(l,"click",S.onclick),S.opt.cursordragontouch?(S.bind(S.cursor,"mousedown",S.onmousedown),S.bind(S.cursor,"mouseup",S.onmouseup),S.cursorh&&S.bind(S.cursorh,"mousedown",function(e){S.onmousedown(e,!0)}),S.cursorh&&S.bind(S.cursorh,"mouseup",S.onmouseup)):(S.bind(S.rail,"mousedown",function(e){e.preventDefault()}),S.railh&&S.bind(S.railh,"mousedown",function(e){e.preventDefault()}))):(S.bind(E.hasmousecapture?S.win:l,"mouseup",S.onmouseup),S.bind(l,"mousemove",S.onmousemove),S.onclick&&S.bind(l,"click",S.onclick),S.bind(S.cursor,"mousedown",S.onmousedown),S.bind(S.cursor,"mouseup",S.onmouseup),S.railh&&(S.bind(S.cursorh,"mousedown",function(e){S.onmousedown(e,!0)}),S.bind(S.cursorh,"mouseup",S.onmouseup)),!S.ispage&&S.opt.enablescrollonselection&&(S.bind(S.win[0],"mousedown",S.onselectionstart),S.bind(l,"mouseup",S.onselectionend),S.bind(S.cursor,"mouseup",S.onselectionend),S.cursorh&&S.bind(S.cursorh,"mouseup",S.onselectionend),S.bind(l,"mousemove",S.onselectiondrag)),S.zoom&&(S.jqbind(S.zoom,"mouseenter",function(){S.canshowonmouseevent&&S.showCursor(),S.rail.active=!0}),S.jqbind(S.zoom,"mouseleave",function(){S.rail.active=!1,S.rail.drag||S.hideCursor()}))),S.opt.enablemousewheel&&(S.isiframe||S.mousewheel(E.isie&&S.ispage?l:S.win,S.onmousewheel),S.mousewheel(S.rail,S.onmousewheel),S.railh&&S.mousewheel(S.railh,S.onmousewheelhr)),S.ispage||E.cantouch||/HTML|^BODY/.test(S.win[0].nodeName)||(S.win.attr("tabindex")||S.win.attr({tabindex:++r}),S.bind(S.win,"focus",function(e){o=S.getTarget(e).id||!0,S.hasfocus=!0,S.canshowonmouseevent&&S.noticeCursor()}),S.bind(S.win,"blur",function(e){o=!1,S.hasfocus=!1}),S.bind(S.win,"mouseenter",function(e){t=S.getTarget(e).id||!0,S.hasmousefocus=!0,S.canshowonmouseevent&&S.noticeCursor()}),S.bind(S.win,"mouseleave",function(e){t=!1,S.hasmousefocus=!1,S.rail.drag||S.hideCursor()})),S.onkeypress=function(e){if(S.railslocked&&0==S.page.maxh)return!0;e=e||window.e;var r=S.getTarget(e);if(r&&/INPUT|TEXTAREA|SELECT|OPTION/.test(r.nodeName)&&(!(r.getAttribute("type")||r.type||!1)||!/submit|button|cancel/i.tp))return!0;if(n(r).attr("contenteditable"))return!0;if(S.hasfocus||S.hasmousefocus&&!o||S.ispage&&!o&&!t){var i=e.keyCode;if(S.railslocked&&27!=i)return S.cancelEvent(e);var s=e.ctrlKey||!1,l=e.shiftKey||!1,a=!1;switch(i){case 38:case 63233:S.doScrollBy(72),a=!0;break;case 40:case 63235:S.doScrollBy(-72),a=!0;break;case 37:case 63232:S.railh&&(s?S.doScrollLeft(0):S.doScrollLeftBy(72),a=!0);break;case 39:case 63234:S.railh&&(s?S.doScrollLeft(S.page.maxw):S.doScrollLeftBy(-72),a=!0);break;case 33:case 63276:S.doScrollBy(S.view.h),a=!0;break;case 34:case 63277:S.doScrollBy(-S.view.h),a=!0;break;case 36:case 63273:S.railh&&s?S.doScrollPos(0,0):S.doScrollTo(0),a=!0;break;case 35:case 63275:S.railh&&s?S.doScrollPos(S.page.maxw,S.page.maxh):S.doScrollTo(S.page.maxh),a=!0;break;case 32:S.opt.spacebarenabled&&(l?S.doScrollBy(S.view.h):S.doScrollBy(-S.view.h),a=!0);break;case 27:S.zoomactive&&(S.doZoom(),a=!0)}if(a)return S.cancelEvent(e)}},S.opt.enablekeyboard&&S.bind(l,E.isopera&&!E.isopera12?"keypress":"keydown",S.onkeypress),S.bind(l,"keydown",function(e){(e.ctrlKey||!1)&&(S.wheelprevented=!0)}),S.bind(l,"keyup",function(e){e.ctrlKey||!1||(S.wheelprevented=!1)}),S.bind(window,"blur",function(e){S.wheelprevented=!1}),S.bind(window,"resize",S.lazyResize),S.bind(window,"orientationchange",S.lazyResize),S.bind(window,"load",S.lazyResize),E.ischrome&&!S.ispage&&!S.haswrapper){var M=S.win.attr("style"),L=parseFloat(S.win.css("width"))+1;S.win.css("width",L),S.synched("chromefix",function(){S.win.attr("style",M)})}S.onAttributeChange=function(e){S.lazyResize(S.isieold?250:30)},S.opt.enableobserver&&(S.isie11||!1===h||(S.observerbody=new h(function(e){if(e.forEach(function(e){if("attributes"==e.type)return z.hasClass("modal-open")&&z.hasClass("modal-dialog")&&!n.contains(n(".modal-dialog")[0],S.doc[0])?S.hide():S.show()}),S.me.clientWidth!=S.page.width||S.me.clientHeight!=S.page.height)return S.lazyResize(30)}),S.observerbody.observe(l.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),S.ispage||S.haswrapper||(!1!==h?(S.observer=new h(function(e){e.forEach(S.onAttributeChange)}),S.observer.observe(S.win[0],{childList:!0,characterData:!1,attributes:!0,subtree:!1}),S.observerremover=new h(function(e){e.forEach(function(e){if(e.removedNodes.length>0)for(var o in e.removedNodes)if(S&&e.removedNodes[o]==S.win[0])return S.remove()})}),S.observerremover.observe(S.win[0].parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(S.bind(S.win,E.isie&&!E.isie9?"propertychange":"DOMAttrModified",S.onAttributeChange),E.isie9&&S.win[0].attachEvent("onpropertychange",S.onAttributeChange),S.bind(S.win,"DOMNodeRemoved",function(e){e.target==S.win[0]&&S.remove()})))),!S.ispage&&S.opt.boxzoom&&S.bind(window,"resize",S.resizeZoom),S.istextarea&&(S.bind(S.win,"keydown",S.lazyResize),S.bind(S.win,"mouseup",S.lazyResize)),S.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var C=function(){S.iframexd=!1;var o;try{(o="contentDocument"in this?this.contentDocument:this.contentWindow._doc).domain}catch(e){S.iframexd=!0,o=!1}if(S.iframexd)return"console"in window&&console.log("NiceScroll error: policy restriced iframe"),!0;if(S.forcescreen=!0,S.isiframe&&(S.iframe={doc:n(o),html:S.doc.contents().find("html")[0],body:S.doc.contents().find("body")[0]},S.getContentSize=function(){return{w:Math.max(S.iframe.html.scrollWidth,S.iframe.body.scrollWidth),h:Math.max(S.iframe.html.scrollHeight,S.iframe.body.scrollHeight)}},S.docscroll=n(S.iframe.body)),!E.isios&&S.opt.iframeautoresize&&!S.isiframe){S.win.scrollTop(0),S.doc.height("");var t=Math.max(o.getElementsByTagName("html")[0].scrollHeight,o.body.scrollHeight);S.doc.height(t)}S.lazyResize(30),S.css(n(S.iframe.body),e),E.isios&&S.haswrapper&&S.css(n(o.body),{"-webkit-transform":"translate3d(0,0,0)"}),"contentWindow"in this?S.bind(this.contentWindow,"scroll",S.onscroll):S.bind(o,"scroll",S.onscroll),S.opt.enablemousewheel&&S.mousewheel(o,S.onmousewheel),S.opt.enablekeyboard&&S.bind(o,E.isopera?"keypress":"keydown",S.onkeypress),E.cantouch?(S.bind(o,"touchstart",S.ontouchstart),S.bind(o,"touchmove",S.ontouchmove)):S.opt.emulatetouch&&(S.bind(o,"mousedown",S.ontouchstart),S.bind(o,"mousemove",function(e){return S.ontouchmove(e,!0)}),S.opt.grabcursorenabled&&E.cursorgrabvalue&&S.css(n(o.body),{cursor:E.cursorgrabvalue})),S.bind(o,"mouseup",S.ontouchend),S.zoom&&(S.opt.dblclickzoom&&S.bind(o,"dblclick",S.doZoom),S.ongesturezoom&&S.bind(o,"gestureend",S.ongesturezoom))};this.doc[0].readyState&&"complete"==this.doc[0].readyState&&setTimeout(function(){C.call(S.doc[0],!1)},500),S.bind(this.doc,"load",C)}},this.showCursor=function(e,o){if(S.cursortimeout&&(clearTimeout(S.cursortimeout),S.cursortimeout=0),S.rail){if(S.autohidedom&&(S.autohidedom.stop().css({opacity:S.opt.cursoropacitymax}),S.cursoractive=!0),S.rail.drag&&1==S.rail.drag.pt||(void 0!==e&&!1!==e&&(S.scroll.y=Math.round(1*e/S.scrollratio.y)),void 0!==o&&(S.scroll.x=Math.round(1*o/S.scrollratio.x))),S.cursor.css({height:S.cursorheight,top:S.scroll.y}),S.cursorh){var t=S.hasreversehr?S.scrollvaluemaxw-S.scroll.x:S.scroll.x;!S.rail.align&&S.rail.visibility?S.cursorh.css({width:S.cursorwidth,left:t+S.rail.width}):S.cursorh.css({width:S.cursorwidth,left:t}),S.cursoractive=!0}S.zoom&&S.zoom.stop().css({opacity:S.opt.cursoropacitymax})}},this.hideCursor=function(e){S.cursortimeout||S.rail&&S.autohidedom&&(S.hasmousefocus&&"leave"==S.opt.autohidemode||(S.cursortimeout=setTimeout(function(){S.rail.active&&S.showonmouseevent||(S.autohidedom.stop().animate({opacity:S.opt.cursoropacitymin}),S.zoom&&S.zoom.stop().animate({opacity:S.opt.cursoropacitymin}),S.cursoractive=!1),S.cursortimeout=0},e||S.opt.hidecursordelay)))},this.noticeCursor=function(e,o,t){S.showCursor(o,t),S.rail.active||S.hideCursor(e)},this.getContentSize=S.ispage?function(){return{w:Math.max(l.body.scrollWidth,l.documentElement.scrollWidth),h:Math.max(l.body.scrollHeight,l.documentElement.scrollHeight)}}:S.haswrapper?function(){return{w:S.doc[0].offsetWidth,h:S.doc[0].offsetHeight}}:function(){return{w:S.docscroll[0].scrollWidth,h:S.docscroll[0].scrollHeight}},this.onResize=function(e,o){if(!S||!S.win)return!1;if(!S.haswrapper&&!S.ispage){if("none"==S.win.css("display"))return S.visibility&&S.hideRail().hideRailHr(),!1;S.hidden||S.visibility||S.showRail().showRailHr()}var t=S.page.maxh,r=S.page.maxw,i={h:S.view.h,w:S.view.w};if(S.view={w:S.ispage?S.win.width():S.win[0].clientWidth,h:S.ispage?S.win.height():S.win[0].clientHeight},S.page=o||S.getContentSize(),S.page.maxh=Math.max(0,S.page.h-S.view.h),S.page.maxw=Math.max(0,S.page.w-S.view.w),S.page.maxh==t&&S.page.maxw==r&&S.view.w==i.w&&S.view.h==i.h){if(S.ispage)return S;var s=S.win.offset();if(S.lastposition){var n=S.lastposition;if(n.top==s.top&&n.left==s.left)return S}S.lastposition=s}return 0===S.page.maxh?(S.hideRail(),S.scrollvaluemax=0,S.scroll.y=0,S.scrollratio.y=0,S.cursorheight=0,S.setScrollTop(0),S.rail&&(S.rail.scrollable=!1)):(S.page.maxh-=S.opt.railpadding.top+S.opt.railpadding.bottom,S.rail.scrollable=!0),0===S.page.maxw?(S.hideRailHr(),S.scrollvaluemaxw=0,S.scroll.x=0,S.scrollratio.x=0,S.cursorwidth=0,S.setScrollLeft(0),S.railh&&(S.railh.scrollable=!1)):(S.page.maxw-=S.opt.railpadding.left+S.opt.railpadding.right,S.railh&&(S.railh.scrollable=S.opt.horizrailenabled)),S.railslocked=S.locked||0===S.page.maxh&&0===S.page.maxw,S.railslocked?(S.ispage||S.updateScrollBar(S.view),!1):(S.hidden||S.visibility?!S.railh||S.hidden||S.railh.visibility||S.showRailHr():S.showRail().showRailHr(),S.istextarea&&S.win.css("resize")&&"none"!=S.win.css("resize")&&(S.view.h-=20),S.cursorheight=Math.min(S.view.h,Math.round(S.view.h*(S.view.h/S.page.h))),S.cursorheight=S.opt.cursorfixedheight?S.opt.cursorfixedheight:Math.max(S.opt.cursorminheight,S.cursorheight),S.cursorwidth=Math.min(S.view.w,Math.round(S.view.w*(S.view.w/S.page.w))),S.cursorwidth=S.opt.cursorfixedheight?S.opt.cursorfixedheight:Math.max(S.opt.cursorminheight,S.cursorwidth),S.scrollvaluemax=S.view.h-S.cursorheight-(S.opt.railpadding.top+S.opt.railpadding.bottom),S.railh&&(S.railh.width=S.page.maxh>0?S.view.w-S.rail.width:S.view.w,S.scrollvaluemaxw=S.railh.width-S.cursorwidth-(S.opt.railpadding.left+S.opt.railpadding.right)),S.ispage||S.updateScrollBar(S.view),S.scrollratio={x:S.page.maxw/S.scrollvaluemaxw,y:S.page.maxh/S.scrollvaluemax},S.getScrollTop()>S.page.maxh?S.doScrollTop(S.page.maxh):(S.scroll.y=Math.round(S.getScrollTop()*(1/S.scrollratio.y)),S.scroll.x=Math.round(S.getScrollLeft()*(1/S.scrollratio.x)),S.cursoractive&&S.noticeCursor()),S.scroll.y&&0==S.getScrollTop()&&S.doScrollTo(Math.floor(S.scroll.y*S.scrollratio.y)),S)},this.resize=S.onResize,this.hlazyresize=0,this.lazyResize=function(e){return S.haswrapper||S.hide(),S.hlazyresize&&clearTimeout(S.hlazyresize),S.hlazyresize=setTimeout(function(){S&&(S.resize(),S.show())},240),S},this.jqbind=function(e,o,t){S.events.push({e:e,n:o,f:t,q:!0}),n(e).bind(o,t)},this.mousewheel=function(e,o,t){var r="jquery"in e?e[0]:e;if("onwheel"in l.createElement("div"))S._bind(r,"wheel",o,t||!1);else{var i=void 0!==l.onmousewheel?"mousewheel":"DOMMouseScroll";y(r,i,o,t||!1),"DOMMouseScroll"==i&&y(r,"MozMousePixelScroll",o,t||!1)}};var R=!1;if(E.haseventlistener){try{var H=Object.defineProperty({},"passive",{get:function(){R=!0}});window.addEventListener("test",null,H)}catch(e){}this.cancelEvent=function(e){return!!e&&((e=e.original?e.original:e).cancelable&&e.preventDefault(),e.stopPropagation(),e.preventManipulation&&e.preventManipulation(),!1)},this.stopPropagation=function(e){return!!e&&((e=e.original?e.original:e).stopPropagation(),!1)}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},window.constructor.prototype.addEventListener=l.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(e,o,t){this.attachEvent("on"+e,o)},window.constructor.prototype.removeEventListener=l.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(e,o,t){this.detachEvent("on"+e,o)},this.cancelEvent=function(e){return!!(e=window.event||!1)&&(e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1,!1)},this.stopPropagation=function(e){return!!(e=window.event||!1)&&(e.cancelBubble=!0,!1)};this.bind=function(e,o,t,r,i){var s="jquery"in e?e[0]:e;S._bind(s,o,t,r||!1,i||!1)},this._bind=function(e,o,t,r,i){S.events.push({e:e,n:o,f:t,b:r,q:!1}),R&&i?e.addEventListener(o,t,{passive:!1,capture:r}):e.addEventListener(o,t,r||!1)},this._unbind=function(e,o,t,r){e.removeEventListener(o,t,r)},this.unbindAll=function(){for(var e=0;e<S.events.length;e++){var o=S.events[e];o.q?o.e.unbind(o.n,o.f):S._unbind(o.e,o.n,o.f,o.b)}},this.showRail=function(){return 0==S.page.maxh||!S.ispage&&"none"==S.win.css("display")||(S.visibility=!0,S.rail.visibility=!0,S.rail.css("display","block")),S},this.showRailHr=function(){return S.railh?(0==S.page.maxw||!S.ispage&&"none"==S.win.css("display")||(S.railh.visibility=!0,S.railh.css("display","block")),S):S},this.hideRail=function(){return S.visibility=!1,S.rail.visibility=!1,S.rail.css("display","none"),S},this.hideRailHr=function(){return S.railh?(S.railh.visibility=!1,S.railh.css("display","none"),S):S},this.show=function(){return S.hidden=!1,S.railslocked=!1,S.showRail().showRailHr()},this.hide=function(){return S.hidden=!0,S.railslocked=!0,S.hideRail().hideRailHr()},this.toggle=function(){return S.hidden?S.show():S.hide()},this.remove=function(){S.stop(),S.cursortimeout&&clearTimeout(S.cursortimeout);for(var e in S.delaylist)S.delaylist[e]&&d(S.delaylist[e].h);S.doZoomOut(),S.unbindAll(),E.isie9&&S.win[0].detachEvent("onpropertychange",S.onAttributeChange),!1!==S.observer&&S.observer.disconnect(),!1!==S.observerremover&&S.observerremover.disconnect(),!1!==S.observerbody&&S.observerbody.disconnect(),S.events=null,S.cursor&&S.cursor.remove(),S.cursorh&&S.cursorh.remove(),S.rail&&S.rail.remove(),S.railh&&S.railh.remove(),S.zoom&&S.zoom.remove();for(var o=0;o<S.saved.css.length;o++){var t=S.saved.css[o];t[0].css(t[1],void 0===t[2]?"":t[2])}S.saved=!1,S.me.data("__nicescroll","");var r=n.nicescroll;r.each(function(e){if(this&&this.id===S.id){delete r[e];for(var o=++e;o<r.length;o++,e++)r[e]=r[o];--r.length&&delete r[r.length]}});for(var i in S)S[i]=null,delete S[i];S=null},this.scrollstart=function(e){return this.onscrollstart=e,S},this.scrollend=function(e){return this.onscrollend=e,S},this.scrollcancel=function(e){return this.onscrollcancel=e,S},this.zoomin=function(e){return this.onzoomin=e,S},this.zoomout=function(e){return this.onzoomout=e,S},this.isScrollable=function(e){var o=e.target?e.target:e;if("OPTION"==o.nodeName)return!0;for(;o&&1==o.nodeType&&o!==this.me[0]&&!/^BODY|HTML/.test(o.nodeName);){var t=n(o),r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r))return o.clientHeight!=o.scrollHeight;o=!!o.parentNode&&o.parentNode}return!1},this.getViewport=function(e){for(var o=!(!e||!e.parentNode)&&e.parentNode;o&&1==o.nodeType&&!/^BODY|HTML/.test(o.nodeName);){var t=n(o);if(/fixed|absolute/.test(t.css("position")))return t;var r=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(r)&&o.clientHeight!=o.scrollHeight)return t;if(t.getNiceScroll().length>0)return t;o=!!o.parentNode&&o.parentNode}return!1},this.triggerScrollStart=function(e,o,t,r,i){var s={type:"scrollstart",current:{x:e,y:o},request:{x:t,y:r},end:{x:S.newscrollx,y:S.newscrolly},speed:i};S.onscrollstart.call(S,s)},this.triggerScrollEnd=function(){if(S.onscrollend){var e=S.getScrollLeft(),o=S.getScrollTop(),t={type:"scrollend",current:{x:e,y:o},end:{x:e,y:o}};S.onscrollend.call(S,t)}},this.onmousewheel=function(e){if(!S.wheelprevented){if(S.railslocked)return S.debounced("checkunlock",S.resize,250),!0;if(S.rail.drag)return S.cancelEvent(e);if("auto"===S.opt.oneaxismousemode&&0!==e.deltaX&&(S.opt.oneaxismousemode=!1),S.opt.oneaxismousemode&&0===e.deltaX&&!S.rail.scrollable)return!S.railh||!S.railh.scrollable||S.onmousewheelhr(e);var o=p(),t=!1;if(S.opt.preservenativescrolling&&S.checkarea+600<o&&(S.nativescrollingarea=S.isScrollable(e),t=!0),S.checkarea=o,S.nativescrollingarea)return!0;var r=x(e,!1,t);return r&&(S.checkarea=0),r}},this.onmousewheelhr=function(e){if(!S.wheelprevented){if(S.railslocked||!S.railh.scrollable)return!0;if(S.rail.drag)return S.cancelEvent(e);var o=p(),t=!1;return S.opt.preservenativescrolling&&S.checkarea+600<o&&(S.nativescrollingarea=S.isScrollable(e),t=!0),S.checkarea=o,!!S.nativescrollingarea||(S.railslocked?S.cancelEvent(e):x(e,!0,t))}},this.stop=function(){return S.cancelScroll(),S.scrollmon&&S.scrollmon.stop(),S.cursorfreezed=!1,S.scroll.y=Math.round(S.getScrollTop()*(1/S.scrollratio.y)),S.noticeCursor(),S},this.getTransitionSpeed=function(e){var o=Math.round(10*S.opt.scrollspeed),t=Math.min(o,Math.round(e/20*S.opt.scrollspeed));return t>20?t:0},S.opt.smoothscroll?S.ishwscroll&&E.hastransition&&S.opt.usetransition&&S.opt.smoothscroll?(this.prepareTransition=function(e,o){var t=o?e>20?e:0:S.getTransitionSpeed(e),r=t?E.prefixstyle+"transform "+t+"ms ease-out":"";return S.lasttransitionstyle&&S.lasttransitionstyle==r||(S.lasttransitionstyle=r,S.doc.css(E.transitionstyle,r)),t},this.doScrollLeft=function(e,o){var t=S.scrollrunning?S.newscrolly:S.getScrollTop();S.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=S.scrollrunning?S.newscrollx:S.getScrollLeft();S.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=S.getScrollTop(),i=S.getScrollLeft();return((S.newscrolly-r)*(o-r)<0||(S.newscrollx-i)*(e-i)<0)&&S.cancelScroll(),0==S.opt.bouncescroll&&(o<0?o=0:o>S.page.maxh&&(o=S.page.maxh),e<0?e=0:e>S.page.maxw&&(e=S.page.maxw)),(!S.scrollrunning||e!=S.newscrollx||o!=S.newscrolly)&&(S.newscrolly=o,S.newscrollx=e,S.newscrollspeed=t||!1,!S.timer&&void(S.timer=setTimeout(function(){var t=S.getScrollTop(),r=S.getScrollLeft(),i={};i.x=e-r,i.y=o-t,i.px=r,i.py=t;var s=Math.round(Math.sqrt(Math.pow(i.x,2)+Math.pow(i.y,2))),n=S.newscrollspeed&&S.newscrollspeed>1?S.newscrollspeed:S.getTransitionSpeed(s);if(S.newscrollspeed&&S.newscrollspeed<=1&&(n*=S.newscrollspeed),S.prepareTransition(n,!0),S.timerscroll&&S.timerscroll.tm&&clearInterval(S.timerscroll.tm),n>0){!S.scrollrunning&&S.onscrollstart&&S.triggerScrollStart(r,t,e,o,n),E.transitionend?S.scrollendtrapped||(S.scrollendtrapped=!0,S.bind(S.doc,E.transitionend,S.onScrollTransitionEnd,!1)):(S.scrollendtrapped&&clearTimeout(S.scrollendtrapped),S.scrollendtrapped=setTimeout(S.onScrollTransitionEnd,n));var l=t,a=r;S.timerscroll={bz:new C(l,S.newscrolly,n,0,0,.58,1),bh:new C(a,S.newscrollx,n,0,0,.58,1)},S.cursorfreezed||(S.timerscroll.tm=setInterval(function(){S.showCursor(S.getScrollTop(),S.getScrollLeft())},60))}S.synched("doScroll-set",function(){S.timer=0,S.scrollendtrapped&&(S.scrollrunning=!0),S.setScrollTop(S.newscrolly),S.setScrollLeft(S.newscrollx),S.scrollendtrapped||S.onScrollTransitionEnd()})},50)))},this.cancelScroll=function(){if(!S.scrollendtrapped)return!0;var e=S.getScrollTop(),o=S.getScrollLeft();return S.scrollrunning=!1,E.transitionend||clearTimeout(E.transitionend),S.scrollendtrapped=!1,S._unbind(S.doc[0],E.transitionend,S.onScrollTransitionEnd),S.prepareTransition(0),S.setScrollTop(e),S.railh&&S.setScrollLeft(o),S.timerscroll&&S.timerscroll.tm&&clearInterval(S.timerscroll.tm),S.timerscroll=!1,S.cursorfreezed=!1,S.showCursor(e,o),S},this.onScrollTransitionEnd=function(){S.scrollendtrapped&&S._unbind(S.doc[0],E.transitionend,S.onScrollTransitionEnd),S.scrollendtrapped=!1,S.prepareTransition(0),S.timerscroll&&S.timerscroll.tm&&clearInterval(S.timerscroll.tm),S.timerscroll=!1;var e=S.getScrollTop(),o=S.getScrollLeft();if(S.setScrollTop(e),S.railh&&S.setScrollLeft(o),S.noticeCursor(!1,e,o),S.cursorfreezed=!1,e<0?e=0:e>S.page.maxh&&(e=S.page.maxh),o<0?o=0:o>S.page.maxw&&(o=S.page.maxw),e!=S.newscrolly||o!=S.newscrollx)return S.doScrollPos(o,e,S.opt.snapbackspeed);S.onscrollend&&S.scrollrunning&&S.triggerScrollEnd(),S.scrollrunning=!1}):(this.doScrollLeft=function(e,o){var t=S.scrollrunning?S.newscrolly:S.getScrollTop();S.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=S.scrollrunning?S.newscrollx:S.getScrollLeft();S.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){function r(){if(S.cancelAnimationFrame)return!0;if(S.scrollrunning=!0,h=1-h)return S.timer=c(r)||1;var e,o,t=0,i=o=S.getScrollTop();S.dst.ay?(((n=(i=S.bzscroll?S.dst.py+S.bzscroll.getNow()*S.dst.ay:S.newscrolly)-o)<0&&i<S.newscrolly||n>0&&i>S.newscrolly)&&(i=S.newscrolly),S.setScrollTop(i),i==S.newscrolly&&(t=1)):t=1;var s=e=S.getScrollLeft();if(S.dst.ax){var n=(s=S.bzscroll?S.dst.px+S.bzscroll.getNow()*S.dst.ax:S.newscrollx)-e;(n<0&&s<S.newscrollx||n>0&&s>S.newscrollx)&&(s=S.newscrollx),S.setScrollLeft(s),s==S.newscrollx&&(t+=1)}else t+=1;2==t?(S.timer=0,S.cursorfreezed=!1,S.bzscroll=!1,S.scrollrunning=!1,i<0?i=0:i>S.page.maxh&&(i=Math.max(0,S.page.maxh)),s<0?s=0:s>S.page.maxw&&(s=S.page.maxw),s!=S.newscrollx||i!=S.newscrolly?S.doScrollPos(s,i):S.onscrollend&&S.triggerScrollEnd()):S.timer=c(r)||1}var o=void 0===o||!1===o?S.getScrollTop(!0):o;if(S.timer&&S.newscrolly==o&&S.newscrollx==e)return!0;S.timer&&d(S.timer),S.timer=0;var i=S.getScrollTop(),s=S.getScrollLeft();((S.newscrolly-i)*(o-i)<0||(S.newscrollx-s)*(e-s)<0)&&S.cancelScroll(),S.newscrolly=o,S.newscrollx=e,S.bouncescroll&&S.rail.visibility||(S.newscrolly<0?S.newscrolly=0:S.newscrolly>S.page.maxh&&(S.newscrolly=S.page.maxh)),S.bouncescroll&&S.railh.visibility||(S.newscrollx<0?S.newscrollx=0:S.newscrollx>S.page.maxw&&(S.newscrollx=S.page.maxw)),S.dst={},S.dst.x=e-s,S.dst.y=o-i,S.dst.px=s,S.dst.py=i;var n=Math.round(Math.sqrt(Math.pow(S.dst.x,2)+Math.pow(S.dst.y,2)));S.dst.ax=S.dst.x/n,S.dst.ay=S.dst.y/n;var l=0,a=n;0==S.dst.x?(l=i,a=o,S.dst.ay=1,S.dst.py=0):0==S.dst.y&&(l=s,a=e,S.dst.ax=1,S.dst.px=0);var u=S.getTransitionSpeed(n);if(t&&t<=1&&(u*=t),S.bzscroll=u>0&&(S.bzscroll?S.bzscroll.update(a,u):new C(l,a,u,0,1,0,1)),!S.timer){(i==S.page.maxh&&o>=S.page.maxh||s==S.page.maxw&&e>=S.page.maxw)&&S.checkContentSize();var h=1;S.cancelAnimationFrame=!1,S.timer=1,S.onscrollstart&&!S.scrollrunning&&S.triggerScrollStart(s,i,e,o,u),r(),(i==S.page.maxh&&o>=i||s==S.page.maxw&&e>=s)&&S.checkContentSize(),S.noticeCursor()}},this.cancelScroll=function(){return S.timer&&d(S.timer),S.timer=0,S.bzscroll=!1,S.scrollrunning=!1,S}):(this.doScrollLeft=function(e,o){var t=S.getScrollTop();S.doScrollPos(e,t,o)},this.doScrollTop=function(e,o){var t=S.getScrollLeft();S.doScrollPos(t,e,o)},this.doScrollPos=function(e,o,t){var r=e>S.page.maxw?S.page.maxw:e;r<0&&(r=0);var i=o>S.page.maxh?S.page.maxh:o;i<0&&(i=0),S.synched("scroll",function(){S.setScrollTop(i),S.setScrollLeft(r)})},this.cancelScroll=function(){}),this.doScrollBy=function(e,o){var t=0;if(t=o?Math.floor((S.scroll.y-e)*S.scrollratio.y):(S.timer?S.newscrolly:S.getScrollTop(!0))-e,S.bouncescroll){var r=Math.round(S.view.h/2);t<-r?t=-r:t>S.page.maxh+r&&(t=S.page.maxh+r)}S.cursorfreezed=!1;var i=S.getScrollTop(!0);return t<0&&i<=0?S.noticeCursor():t>S.page.maxh&&i>=S.page.maxh?(S.checkContentSize(),S.noticeCursor()):void S.doScrollTop(t)},this.doScrollLeftBy=function(e,o){var t=0;if(t=o?Math.floor((S.scroll.x-e)*S.scrollratio.x):(S.timer?S.newscrollx:S.getScrollLeft(!0))-e,S.bouncescroll){var r=Math.round(S.view.w/2);t<-r?t=-r:t>S.page.maxw+r&&(t=S.page.maxw+r)}S.cursorfreezed=!1;var i=S.getScrollLeft(!0);return t<0&&i<=0?S.noticeCursor():t>S.page.maxw&&i>=S.page.maxw?S.noticeCursor():void S.doScrollLeft(t)},this.doScrollTo=function(e,o){var t=o?Math.round(e*S.scrollratio.y):e;t<0?t=0:t>S.page.maxh&&(t=S.page.maxh),S.cursorfreezed=!1,S.doScrollTop(e)},this.checkContentSize=function(){var e=S.getContentSize();e.h==S.page.h&&e.w==S.page.w||S.resize(!1,e)},S.onscroll=function(e){S.rail.drag||S.cursorfreezed||S.synched("scroll",function(){S.scroll.y=Math.round(S.getScrollTop()*(1/S.scrollratio.y)),S.railh&&(S.scroll.x=Math.round(S.getScrollLeft()*(1/S.scrollratio.x))),S.noticeCursor()})},S.bind(S.docscroll,"scroll",S.onscroll),this.doZoomIn=function(e){if(!S.zoomactive){S.zoomactive=!0,S.zoomrestore={style:{}};var o=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"],t=S.win[0].style;for(var r in o){var i=o[r];S.zoomrestore.style[i]=void 0!==t[i]?t[i]:""}S.zoomrestore.style.width=S.win.css("width"),S.zoomrestore.style.height=S.win.css("height"),S.zoomrestore.padding={w:S.win.outerWidth()-S.win.width(),h:S.win.outerHeight()-S.win.height()},E.isios4&&(S.zoomrestore.scrollTop=a.scrollTop(),a.scrollTop(0)),S.win.css({position:E.isios4?"absolute":"fixed",top:0,left:0,zIndex:s+100,margin:0});var n=S.win.css("backgroundColor");return(""==n||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(n))&&S.win.css("backgroundColor","#fff"),S.rail.css({zIndex:s+101}),S.zoom.css({zIndex:s+102}),S.zoom.css("backgroundPosition","0 -18px"),S.resizeZoom(),S.onzoomin&&S.onzoomin.call(S),S.cancelEvent(e)}},this.doZoomOut=function(e){if(S.zoomactive)return S.zoomactive=!1,S.win.css("margin",""),S.win.css(S.zoomrestore.style),E.isios4&&a.scrollTop(S.zoomrestore.scrollTop),S.rail.css({"z-index":S.zindex}),S.zoom.css({"z-index":S.zindex}),S.zoomrestore=!1,S.zoom.css("backgroundPosition","0 0"),S.onResize(),S.onzoomout&&S.onzoomout.call(S),S.cancelEvent(e)},this.doZoom=function(e){return S.zoomactive?S.doZoomOut(e):S.doZoomIn(e)},this.resizeZoom=function(){if(S.zoomactive){var e=S.getScrollTop();S.win.css({width:a.width()-S.zoomrestore.padding.w+"px",height:a.height()-S.zoomrestore.padding.h+"px"}),S.onResize(),S.setScrollTop(Math.min(S.page.maxh,e))}},this.init(),n.nicescroll.push(this)},v=function(e){var o=this;this.nc=e,this.lastx=0,this.lasty=0,this.speedx=0,this.speedy=0,this.lasttime=0,this.steptime=0,this.snapx=!1,this.snapy=!1,this.demulx=0,this.demuly=0,this.lastscrollx=-1,this.lastscrolly=-1,this.chkx=0,this.chky=0,this.timer=0,this.reset=function(e,t){o.stop(),o.steptime=0,o.lasttime=p(),o.speedx=0,o.speedy=0,o.lastx=e,o.lasty=t,o.lastscrollx=-1,o.lastscrolly=-1},this.update=function(e,t){var r=p();o.steptime=r-o.lasttime,o.lasttime=r;var i=t-o.lasty,s=e-o.lastx,n=o.nc.getScrollTop()+i,l=o.nc.getScrollLeft()+s;o.snapx=l<0||l>o.nc.page.maxw,o.snapy=n<0||n>o.nc.page.maxh,o.speedx=s,o.speedy=i,o.lastx=e,o.lasty=t},this.stop=function(){o.nc.unsynched("domomentum2d"),o.timer&&clearTimeout(o.timer),o.timer=0,o.lastscrollx=-1,o.lastscrolly=-1},this.doSnapy=function(e,t){var r=!1;t<0?(t=0,r=!0):t>o.nc.page.maxh&&(t=o.nc.page.maxh,r=!0),e<0?(e=0,r=!0):e>o.nc.page.maxw&&(e=o.nc.page.maxw,r=!0),r?o.nc.doScrollPos(e,t,o.nc.opt.snapbackspeed):o.nc.triggerScrollEnd()},this.doMomentum=function(e){var t=p(),r=e?t+e:o.lasttime,i=o.nc.getScrollLeft(),s=o.nc.getScrollTop(),n=o.nc.page.maxh,l=o.nc.page.maxw;o.speedx=l>0?Math.min(60,o.speedx):0,o.speedy=n>0?Math.min(60,o.speedy):0;var a=r&&t-r<=60;(s<0||s>n||i<0||i>l)&&(a=!1);var c=!(!o.speedy||!a)&&o.speedy,d=!(!o.speedx||!a)&&o.speedx;if(c||d){var u=Math.max(16,o.steptime);if(u>50){var h=u/50;o.speedx*=h,o.speedy*=h,u=50}o.demulxy=0,o.lastscrollx=o.nc.getScrollLeft(),o.chkx=o.lastscrollx,o.lastscrolly=o.nc.getScrollTop(),o.chky=o.lastscrolly;var m=o.lastscrollx,f=o.lastscrolly,g=function(){var e=p()-t>600?.04:.02;o.speedx&&(m=Math.floor(o.lastscrollx-o.speedx*(1-o.demulxy)),o.lastscrollx=m,(m<0||m>l)&&(e=.1)),o.speedy&&(f=Math.floor(o.lastscrolly-o.speedy*(1-o.demulxy)),o.lastscrolly=f,(f<0||f>n)&&(e=.1)),o.demulxy=Math.min(1,o.demulxy+e),o.nc.synched("domomentum2d",function(){if(o.speedx){o.nc.getScrollLeft();o.chkx=m,o.nc.setScrollLeft(m)}if(o.speedy){o.nc.getScrollTop();o.chky=f,o.nc.setScrollTop(f)}o.timer||(o.nc.hideCursor(),o.doSnapy(m,f))}),o.demulxy<1?o.timer=setTimeout(g,u):(o.stop(),o.nc.hideCursor(),o.doSnapy(m,f))};g()}else o.doSnapy(o.nc.getScrollLeft(),o.nc.getScrollTop())}},b=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(e,o,t){var r=n.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollTop():b.call(e)},set:function(e,o){var t=n.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollTop(parseInt(o)):b.call(e,o),this}},e.fn.scrollTop=function(e){if(void 0===e){var o=!!this[0]&&(n.data(this[0],"__nicescroll")||!1);return o&&o.ishwscroll?o.getScrollTop():b.call(this)}return this.each(function(){var o=n.data(this,"__nicescroll")||!1;o&&o.ishwscroll?o.setScrollTop(parseInt(e)):b.call(n(this),e)})};var y=e.fn.scrollLeft;n.cssHooks.pageXOffset={get:function(e,o,t){var r=n.data(e,"__nicescroll")||!1;return r&&r.ishwscroll?r.getScrollLeft():y.call(e)},set:function(e,o){var t=n.data(e,"__nicescroll")||!1;return t&&t.ishwscroll?t.setScrollLeft(parseInt(o)):y.call(e,o),this}},e.fn.scrollLeft=function(e){if(void 0===e){var o=!!this[0]&&(n.data(this[0],"__nicescroll")||!1);return o&&o.ishwscroll?o.getScrollLeft():y.call(this)}return this.each(function(){var o=n.data(this,"__nicescroll")||!1;o&&o.ishwscroll?o.setScrollLeft(parseInt(e)):y.call(n(this),e)})};var x=function(e){var o=this;if(this.length=0,this.name="nicescrollarray",this.each=function(e){return n.each(o,e),o},this.push=function(e){o[o.length]=e,o.length++},this.eq=function(e){return o[e]},e)for(var t=0;t<e.length;t++){var r=n.data(e[t],"__nicescroll")||!1;r&&(this[this.length]=r,this.length++)}return this};!function(e,o,t){for(var r=0,i=o.length;r<i;r++)t(e,o[r])}(x.prototype,["show","hide","toggle","onResize","resize","remove","stop","doScrollPos"],function(e,o){e[o]=function(){var e=arguments;return this.each(function(){this[o].apply(this,e)})}}),e.fn.getNiceScroll=function(e){return void 0===e?new x(this):this[e]&&n.data(this[e],"__nicescroll")||!1},e.expr[":"].nicescroll=function(e){return void 0!==n.data(e,"__nicescroll")},n.fn.niceScroll=function(e,o){void 0!==o||"object"!=typeof e||"jquery"in e||(o=e,e=!1);var t=new x;return this.each(function(){var r=n(this),i=n.extend({},o);if(e){var s=n(e);i.doc=s.length>1?n(e,r):s,i.win=r}!("doc"in i)||"win"in i||(i.win=r);var l=r.data("__nicescroll")||!1;l||(i.doc=i.doc||r,l=new w(i,r),r.data("__nicescroll",l)),t.push(l)}),1===t.length?t[0]:t},window.NiceScroll={getjQuery:function(){return e}},n.nicescroll||(n.nicescroll=new x,n.nicescroll.options=m)});
{
"name": "nicescroll",
"version": "3.7.2",
"version": "3.7.3",
"bugs": "https://github.com/inuyaksa/jquery.nicescroll/issues",

@@ -5,0 +5,0 @@ "repository": {

# jQuery.NiceScroll
v. 3.7.2 2017-06-18
v. 3.7.3 2017-06-18

@@ -4,0 +4,0 @@ - [Web Site: nicescroll.areaaperta.com](https://nicescroll.areaaperta.com)

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc