/** * customized version of iscroll.js 0.0.8 * it fixes bugs affecting its integration with fullpage.js * @license */ !function(t,i,s){var e=t.requestanimationframe||t.webkitrequestanimationframe||t.mozrequestanimationframe||t.orequestanimationframe||t.msrequestanimationframe||function(i){t.settimeout(i,1e3/60)},o=function(){var e={},o=i.createelement("div").style,n=function(){for(var t=["t","webkitt","mozt","mst","ot"],i=0,s=t.length;i0&&(h=n?n/2.5*(c/8):0,a=(l=s.abs(t)+h)/c),{destination:s.round(h),duration:a}};var h=r("transform");return e.extend(e,{hastransform:!1!==h,hasperspective:r("perspective")in o,hastouch:"ontouchstart"in t,haspointer:!(!t.pointerevent&&!t.mspointerevent),hastransition:r("transition")in o}),e.isbadandroid=function(){var i=t.navigator.appversion;if(/android/.test(i)&&!/chrome\/\d/.test(i)){var s=i.match(/safari\/(\d+.\d)/);return!(s&&"object"==typeof s&&s.length>=2)||parsefloat(s[1])<535.19}return!1}(),e.extend(e.style={},{transform:h,transitiontimingfunction:r("transitiontimingfunction"),transitionduration:r("transitionduration"),transitiondelay:r("transitiondelay"),transformorigin:r("transformorigin")}),e.hasclass=function(t,i){return new regexp("(^|\\s)"+i+"(\\s|$)").test(t.classname)},e.addclass=function(t,i){if(!e.hasclass(t,i)){var s=t.classname.split(" ");s.push(i),t.classname=s.join(" ")}},e.removeclass=function(t,i){if(e.hasclass(t,i)){var s=new regexp("(^|\\s)"+i+"(\\s|$)","g");t.classname=t.classname.replace(s," ")}},e.offset=function(t){for(var i=-t.offsetleft,s=-t.offsettop;t=t.offsetparent;)i-=t.offsetleft,s-=t.offsettop;return{left:i,top:s}},e.preventdefaultexception=function(t,i){for(var s in i)if(i[s].test(t[s]))return!0;return!1},e.extend(e.eventtype={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,pointerdown:3,pointermove:3,pointerup:3,mspointerdown:3,mspointermove:3,mspointerup:3}),e.extend(e.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(t){return t*(2-t)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(t){return s.sqrt(1- --t*t)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(t){return(t-=1)*t*(5*t+4)+1}},bounce:{style:"",fn:function(t){return(t/=1)<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},elastic:{style:"",fn:function(t){return 0===t?0:1==t?1:.4*s.pow(2,-10*t)*s.sin((t-.055)*(2*s.pi)/.22)+1}}}),e.tap=function(t,s){var e=i.createevent("event");e.initevent(s,!0,!0),e.pagex=t.pagex,e.pagey=t.pagey,t.target.dispatchevent(e)},e.click=function(s){var e,o=s.target;/(select|input|textarea)/i.test(o.tagname)||((e=i.createevent(t.mouseevent?"mouseevents":"event")).initevent("click",!0,!0),e.view=s.view||t,e.detail=1,e.screenx=o.screenx||0,e.screeny=o.screeny||0,e.clientx=o.clientx||0,e.clienty=o.clienty||0,e.ctrlkey=!!s.ctrlkey,e.altkey=!!s.altkey,e.shiftkey=!!s.shiftkey,e.metakey=!!s.metakey,e.button=0,e.relatedtarget=null,e._constructed=!0,o.dispatchevent(e))},e}();function n(s,e){for(var n in this.wrapper="string"==typeof s?i.queryselector(s):s,this.scroller=this.wrapper.children[0],this.scrollerstyle=this.scroller.style,this.options={resizescrollbars:!0,mousewheelspeed:20,snapthreshold:.334,disablepointer:!o.haspointer,disabletouch:o.haspointer||!o.hastouch,disablemouse:o.haspointer||o.hastouch,startx:0,starty:0,scrolly:!0,directionlockthreshold:5,momentum:!0,bounce:!0,bouncetime:600,bounceeasing:"",preventdefault:!0,preventdefaultexception:{tagname:/^(input|textarea|button|select|label)$/},hwcompositing:!0,usetransition:0,usetransform:0,bindtowrapper:void 0===t.onmousedown},e)this.options[n]=e[n];this.translatez=this.options.hwcompositing&&o.hasperspective?" translatez(0)":"",this.options.usetransition=o.hastransition&&this.options.usetransition,this.options.usetransform=o.hastransform&&this.options.usetransform,this.options.eventpassthrough=!0===this.options.eventpassthrough?"vertical":this.options.eventpassthrough,this.options.preventdefault=!this.options.eventpassthrough&&this.options.preventdefault,this.options.scrolly="vertical"!=this.options.eventpassthrough&&this.options.scrolly,this.options.scrollx="horizontal"!=this.options.eventpassthrough&&this.options.scrollx,this.options.freescroll=this.options.freescroll&&!this.options.eventpassthrough,this.options.directionlockthreshold=this.options.eventpassthrough?0:this.options.directionlockthreshold,this.options.bounceeasing="string"==typeof this.options.bounceeasing?o.ease[this.options.bounceeasing]||o.ease.circular:this.options.bounceeasing,this.options.resizepolling=void 0===this.options.resizepolling?60:this.options.resizepolling,!0===this.options.tap&&(this.options.tap="tap"),this.options.usetransition||this.options.usetransform||/relative|absolute/i.test(this.scrollerstyle.position)||(this.scrollerstyle.position="relative"),"scale"==this.options.shrinkscrollbars&&(this.options.usetransition=!1),this.options.invertwheeldirection=this.options.invertwheeldirection?-1:1,this.x=0,this.y=0,this.directionx=0,this.directiony=0,this._events={},this._init(),this.refresh(),this.scrollto(this.options.startx,this.options.starty),this.enable()}function r(t,s,e){var o=i.createelement("div"),n=i.createelement("div");return!0===e&&(o.style.csstext="position:absolute;z-index:9999",n.style.csstext="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px"),n.classname="iscrollindicator","h"==t?(!0===e&&(o.style.csstext+=";height:7px;left:2px;right:2px;bottom:0",n.style.height="100%"),o.classname="iscrollhorizontalscrollbar"):(!0===e&&(o.style.csstext+=";width:7px;bottom:2px;top:2px;right:1px",n.style.width="100%"),o.classname="iscrollverticalscrollbar"),o.style.csstext+=";overflow:hidden",s||(o.style.pointerevents="none"),o.appendchild(n),o}function h(s,n){for(var r in this.wrapper="string"==typeof n.el?i.queryselector(n.el):n.el,this.wrapperstyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorstyle=this.indicator.style,this.scroller=s,this.options={listenx:!0,listeny:!0,interactive:!1,resize:!0,defaultscrollbars:!1,shrink:!1,fade:!1,speedratiox:0,speedratioy:0},n)this.options[r]=n[r];if(this.sizeratiox=1,this.sizeratioy=1,this.maxposx=0,this.maxposy=0,this.options.interactive&&(this.options.disabletouch||(o.addevent(this.indicator,"touchstart",this),o.addevent(t,"touchend",this)),this.options.disablepointer||(o.addevent(this.indicator,o.prefixpointerevent("pointerdown"),this),o.addevent(t,o.prefixpointerevent("pointerup"),this)),this.options.disablemouse||(o.addevent(this.indicator,"mousedown",this),o.addevent(t,"mouseup",this))),this.options.fade){this.wrapperstyle[o.style.transform]=this.scroller.translatez;var h=o.style.transitionduration;if(!h)return;this.wrapperstyle[h]=o.isbadandroid?"0.0001ms":"0ms";var a=this;o.isbadandroid&&e(function(){"0.0001ms"===a.wrapperstyle[h]&&(a.wrapperstyle[h]="0s")}),this.wrapperstyle.opacity="0"}}n.prototype={version:"5.2.0",_init:function(){this._initevents(),(this.options.scrollbars||this.options.indicators)&&this._initindicators(),this.options.mousewheel&&this._initwheel(),this.options.snap&&this._initsnap(),this.options.keybindings&&this._initkeys()},destroy:function(){this._initevents(!0),cleartimeout(this.resizetimeout),this.resizetimeout=null,this._execevent("destroy")},_transitionend:function(t){t.target==this.scroller&&this.isintransition&&(this._transitiontime(),this.resetposition(this.options.bouncetime)||(this.isintransition=!1,this._execevent("scrollend")))},_start:function(t){if(1!=o.eventtype[t.type]&&0!==(t.which?t.button:t.button<2?0:4==t.button?1:2))return;if(this.enabled&&(!this.initiated||o.eventtype[t.type]===this.initiated)){!this.options.preventdefault||o.isbadandroid||o.preventdefaultexception(t.target,this.options.preventdefaultexception)||t.preventdefault();var i,e=t.touches?t.touches[0]:t;this.initiated=o.eventtype[t.type],this.moved=!1,this.distx=0,this.disty=0,this.directionx=0,this.directiony=0,this.directionlocked=0,this.starttime=o.gettime(),this.options.usetransition&&this.isintransition?(this._transitiontime(),this.isintransition=!1,i=this.getcomputedposition(),this._translate(s.round(i.x),s.round(i.y)),this._execevent("scrollend")):!this.options.usetransition&&this.isanimating&&(this.isanimating=!1,this._execevent("scrollend")),this.startx=this.x,this.starty=this.y,this.absstartx=this.x,this.absstarty=this.y,this.pointx=e.pagex,this.pointy=e.pagey,this._execevent("beforescrollstart")}},_move:function(t){if(this.enabled&&o.eventtype[t.type]===this.initiated){this.options.preventdefault&&t.preventdefault();var i,e,n,r,h=t.touches?t.touches[0]:t,a=h.pagex-this.pointx,l=h.pagey-this.pointy,c=o.gettime();if(this.pointx=h.pagex,this.pointy=h.pagey,this.distx+=a,this.disty+=l,n=s.abs(this.distx),r=s.abs(this.disty),!(c-this.endtime>300&&n<10&&r<10)){if(this.directionlocked||this.options.freescroll||(n>r+this.options.directionlockthreshold?this.directionlocked="h":r>=n+this.options.directionlockthreshold?this.directionlocked="v":this.directionlocked="n"),"h"==this.directionlocked){if("vertical"==this.options.eventpassthrough)t.preventdefault();else if("horizontal"==this.options.eventpassthrough)return void(this.initiated=!1);l=0}else if("v"==this.directionlocked){if("horizontal"==this.options.eventpassthrough)t.preventdefault();else if("vertical"==this.options.eventpassthrough)return void(this.initiated=!1);a=0}a=this.hashorizontalscroll?a:0,l=this.hasverticalscroll?l:0,i=this.x+a,e=this.y+l,(i>0||i0?0:this.maxscrollx),(e>0||e0?0:this.maxscrolly),this.directionx=a>0?-1:a<0?1:0,this.directiony=l>0?-1:l<0?1:0,this.moved||this._execevent("scrollstart"),this.moved=!0,this._translate(i,e),c-this.starttime>300&&(this.starttime=c,this.startx=this.x,this.starty=this.y)}}},_end:function(t){if(this.enabled&&o.eventtype[t.type]===this.initiated){this.options.preventdefault&&!o.preventdefaultexception(t.target,this.options.preventdefaultexception)&&t.preventdefault();t.changedtouches&&t.changedtouches[0];var i,e,n=o.gettime()-this.starttime,r=s.round(this.x),h=s.round(this.y),a=s.abs(r-this.startx),l=s.abs(h-this.starty),c=0,p="";if(this.isintransition=0,this.initiated=0,this.endtime=o.gettime(),!this.resetposition(this.options.bouncetime)){if(this.scrollto(r,h),!this.moved)return this.options.tap&&o.tap(t,this.options.tap),this.options.click&&o.click(t),void this._execevent("scrollcancel");if(this._events.flick&&n<200&&a<100&&l<100)this._execevent("flick");else{if(this.options.momentum&&n<300&&(i=this.hashorizontalscroll?o.momentum(this.x,this.startx,n,this.maxscrollx,this.options.bounce?this.wrapperwidth:0,this.options.deceleration):{destination:r,duration:0},e=this.hasverticalscroll?o.momentum(this.y,this.starty,n,this.maxscrolly,this.options.bounce?this.wrapperheight:0,this.options.deceleration):{destination:h,duration:0},r=i.destination,h=e.destination,c=s.max(i.duration,e.duration),this.isintransition=1),this.options.snap){var d=this._nearestsnap(r,h);this.currentpage=d,c=this.options.snapspeed||s.max(s.max(s.min(s.abs(r-d.x),1e3),s.min(s.abs(h-d.y),1e3)),300),r=d.x,h=d.y,this.directionx=0,this.directiony=0,p=this.options.bounceeasing}if(r!=this.x||h!=this.y)return(r>0||r0||h0?i=0:this.x0?s=0:this.y-1&&this._events[t].splice(s,1)}},_execevent:function(t){if(this._events[t]){var i=0,s=this._events[t].length;if(s)for(;i0;var n=this.options.usetransition&&e.style;!s||n?(n&&(this._transitiontimingfunction(e.style),this._transitiontime(s)),this._translate(t,i)):this._animate(t,i,s,e.fn)},scrolltoelement:function(t,i,e,n,r){if(t=t.nodetype?t:this.scroller.queryselector(t)){var h=o.offset(t);h.left-=this.wrapperoffset.left,h.top-=this.wrapperoffset.top,!0===e&&(e=s.round(t.offsetwidth/2-this.wrapper.offsetwidth/2)),!0===n&&(n=s.round(t.offsetheight/2-this.wrapper.offsetheight/2)),h.left-=e||0,h.top-=n||0,h.left=h.left>0?0:h.left0?0:h.top0?o--:i<0&&o++,e>0?n--:e<0&&n++,void this.gotopage(o,n);o=this.x+s.round(this.hashorizontalscroll?i:0),n=this.y+s.round(this.hasverticalscroll?e:0),this.directionx=i>0?-1:i<0?1:0,this.directiony=e>0?-1:e<0?1:0,o>0?o=0:o0?n=0:n-this.scrollerwidth;){for(this.pages[h]=[],t=0,n=0;n>-this.scrollerheight;)this.pages[h][t]={x:s.max(l,this.maxscrollx),y:s.max(n,this.maxscrolly),width:c,height:p,cx:l-e,cy:n-o},n-=p,t++;l-=c,h++}else for(t=(r=this.options.snap).length,i=-1;hthis.maxscrollx&&a++;this.gotopage(this.currentpage.pagex||0,this.currentpage.pagey||0,0),this.options.snapthreshold%1==0?(this.snapthresholdx=this.options.snapthreshold,this.snapthresholdy=this.options.snapthreshold):(this.snapthresholdx=s.round(this.pages[this.currentpage.pagex][this.currentpage.pagey].width*this.options.snapthreshold),this.snapthresholdy=s.round(this.pages[this.currentpage.pagex][this.currentpage.pagey].height*this.options.snapthreshold))}}),this.on("flick",function(){var t=this.options.snapspeed||s.max(s.max(s.min(s.abs(this.x-this.startx),1e3),s.min(s.abs(this.y-this.starty),1e3)),300);this.gotopage(this.currentpage.pagex+this.directionx,this.currentpage.pagey+this.directiony,t)})},_nearestsnap:function(t,i){if(!this.pages.length)return{x:0,y:0,pagex:0,pagey:0};var e=0,o=this.pages.length,n=0;if(s.abs(t-this.absstartx)0?t=0:t0?i=0:i=this.pages[e][0].cx){t=this.pages[e][0].x;break}for(o=this.pages[e].length;n=this.pages[0][n].cy){i=this.pages[0][n].y;break}return e==this.currentpage.pagex&&((e+=this.directionx)<0?e=0:e>=this.pages.length&&(e=this.pages.length-1),t=this.pages[e][0].x),n==this.currentpage.pagey&&((n+=this.directiony)<0?n=0:n>=this.pages[0].length&&(n=this.pages[0].length-1),i=this.pages[0][n].y),{x:t,y:i,pagex:e,pagey:n}},gotopage:function(t,i,e,o){o=o||this.options.bounceeasing,t>=this.pages.length?t=this.pages.length-1:t<0&&(t=0),i>=this.pages[t].length?i=this.pages[t].length-1:i<0&&(i=0);var n=this.pages[t][i].x,r=this.pages[t][i].y;e=void 0===e?this.options.snapspeed||s.max(s.max(s.min(s.abs(n-this.x),1e3),s.min(s.abs(r-this.y),1e3)),300):e,this.currentpage={x:n,y:r,pagex:t,pagey:i},this.scrollto(n,r,e,o)},next:function(t,i){var s=this.currentpage.pagex,e=this.currentpage.pagey;++s>=this.pages.length&&this.hasverticalscroll&&(s=0,e++),this.gotopage(s,e,t,i)},prev:function(t,i){var s=this.currentpage.pagex,e=this.currentpage.pagey;--s<0&&this.hasverticalscroll&&(s=0,e--),this.gotopage(s,e,t,i)},_initkeys:function(i){var s,e={pageup:33,pagedown:34,end:35,home:36,left:37,up:38,right:39,down:40};if("object"==typeof this.options.keybindings)for(s in this.options.keybindings)"string"==typeof this.options.keybindings[s]&&(this.options.keybindings[s]=this.options.keybindings[s].touppercase().charcodeat(0));else this.options.keybindings={};for(s in e)this.options.keybindings[s]=this.options.keybindings[s]||e[s];o.addevent(t,"keydown",this),this.on("destroy",function(){o.removeevent(t,"keydown",this)})},_key:function(t){if(this.enabled){var i,e=this.options.snap,n=e?this.currentpage.pagex:this.x,r=e?this.currentpage.pagey:this.y,h=o.gettime(),a=this.keytime||0;switch(this.options.usetransition&&this.isintransition&&(i=this.getcomputedposition(),this._translate(s.round(i.x),s.round(i.y)),this.isintransition=!1),this.keyacceleration=h-a<200?s.min(this.keyacceleration+.25,50):0,t.keycode){case this.options.keybindings.pageup:this.hashorizontalscroll&&!this.hasverticalscroll?n+=e?1:this.wrapperwidth:r+=e?1:this.wrapperheight;break;case this.options.keybindings.pagedown:this.hashorizontalscroll&&!this.hasverticalscroll?n-=e?1:this.wrapperwidth:r-=e?1:this.wrapperheight;break;case this.options.keybindings.end:n=e?this.pages.length-1:this.maxscrollx,r=e?this.pages[0].length-1:this.maxscrolly;break;case this.options.keybindings.home:n=0,r=0;break;case this.options.keybindings.left:n+=e?-1:5+this.keyacceleration>>0;break;case this.options.keybindings.up:r+=e?1:5+this.keyacceleration>>0;break;case this.options.keybindings.right:n-=e?-1:5+this.keyacceleration>>0;break;case this.options.keybindings.down:r-=e?1:5+this.keyacceleration>>0;break;default:return}e?this.gotopage(n,r):(n>0?(n=0,this.keyacceleration=0):n0?(r=0,this.keyacceleration=0):r=c)return r.isanimating=!1,r._translate(t,i),void(r.resetposition(r.options.bouncetime)||r._execevent("scrollend"));f=n(m=(m-l)/s),d=(t-h)*f+h,u=(i-a)*f+a,r._translate(d,u),r.isanimating&&e(p)}()},handleevent:function(t){switch(t.type){case"touchstart":case"pointerdown":case"mspointerdown":case"mousedown":this._start(t);break;case"touchmove":case"pointermove":case"mspointermove":case"mousemove":this._move(t);break;case"touchend":case"pointerup":case"mspointerup":case"mouseup":case"touchcancel":case"pointercancel":case"mspointercancel":case"mousecancel":this._end(t);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkittransitionend":case"otransitionend":case"mstransitionend":this._transitionend(t);break;case"wheel":case"dommousescroll":case"mousewheel":this._wheel(t);break;case"keydown":this._key(t);break;case"click":this.enabled&&!t._constructed&&(t.preventdefault(),t.stoppropagation())}}},h.prototype={handleevent:function(t){switch(t.type){case"touchstart":case"pointerdown":case"mspointerdown":case"mousedown":this._start(t);break;case"touchmove":case"pointermove":case"mspointermove":case"mousemove":this._move(t);break;case"touchend":case"pointerup":case"mspointerup":case"mouseup":case"touchcancel":case"pointercancel":case"mspointercancel":case"mousecancel":this._end(t)}},destroy:function(){this.options.fadescrollbars&&(cleartimeout(this.fadetimeout),this.fadetimeout=null),this.options.interactive&&(o.removeevent(this.indicator,"touchstart",this),o.removeevent(this.indicator,o.prefixpointerevent("pointerdown"),this),o.removeevent(this.indicator,"mousedown",this),o.removeevent(t,"touchmove",this),o.removeevent(t,o.prefixpointerevent("pointermove"),this),o.removeevent(t,"mousemove",this),o.removeevent(t,"touchend",this),o.removeevent(t,o.prefixpointerevent("pointerup"),this),o.removeevent(t,"mouseup",this)),this.options.defaultscrollbars&&this.wrapper.parentnode.removechild(this.wrapper)},_start:function(i){var s=i.touches?i.touches[0]:i;i.preventdefault(),i.stoppropagation(),this.transitiontime(),this.initiated=!0,this.moved=!1,this.lastpointx=s.pagex,this.lastpointy=s.pagey,this.starttime=o.gettime(),this.options.disabletouch||o.addevent(t,"touchmove",this),this.options.disablepointer||o.addevent(t,o.prefixpointerevent("pointermove"),this),this.options.disablemouse||o.addevent(t,"mousemove",this),this.scroller._execevent("beforescrollstart")},_move:function(t){var i,s,e,n,r=t.touches?t.touches[0]:t;o.gettime();this.moved||this.scroller._execevent("scrollstart"),this.moved=!0,i=r.pagex-this.lastpointx,this.lastpointx=r.pagex,s=r.pagey-this.lastpointy,this.lastpointy=r.pagey,e=this.x+i,n=this.y+s,this._pos(e,n),t.preventdefault(),t.stoppropagation()},_end:function(i){if(this.initiated){if(this.initiated=!1,i.preventdefault(),i.stoppropagation(),o.removeevent(t,"touchmove",this),o.removeevent(t,o.prefixpointerevent("pointermove"),this),o.removeevent(t,"mousemove",this),this.scroller.options.snap){var e=this.scroller._nearestsnap(this.scroller.x,this.scroller.y),n=this.options.snapspeed||s.max(s.max(s.min(s.abs(this.scroller.x-e.x),1e3),s.min(s.abs(this.scroller.y-e.y),1e3)),300);this.scroller.x==e.x&&this.scroller.y==e.y||(this.scroller.directionx=0,this.scroller.directiony=0,this.scroller.currentpage=e,this.scroller.scrollto(e.x,e.y,n,this.scroller.options.bounceeasing))}this.moved&&this.scroller._execevent("scrollend")}},transitiontime:function(t){t=t||0;var i=o.style.transitionduration;if(i&&(this.indicatorstyle[i]=t+"ms",!t&&o.isbadandroid)){this.indicatorstyle[i]="0.0001ms";var s=this;e(function(){"0.0001ms"===s.indicatorstyle[i]&&(s.indicatorstyle[i]="0s")})}},transitiontimingfunction:function(t){this.indicatorstyle[o.style.transitiontimingfunction]=t},refresh:function(){this.transitiontime(),this.options.listenx&&!this.options.listeny?this.indicatorstyle.display=this.scroller.hashorizontalscroll?"block":"none":this.options.listeny&&!this.options.listenx?this.indicatorstyle.display=this.scroller.hasverticalscroll?"block":"none":this.indicatorstyle.display=this.scroller.hashorizontalscroll||this.scroller.hasverticalscroll?"block":"none",this.scroller.hashorizontalscroll&&this.scroller.hasverticalscroll?(o.addclass(this.wrapper,"iscrollbothscrollbars"),o.removeclass(this.wrapper,"iscrolllonescrollbar"),this.options.defaultscrollbars&&this.options.customstyle&&(this.options.listenx?this.wrapper.style.right="8px":this.wrapper.style.bottom="8px")):(o.removeclass(this.wrapper,"iscrollbothscrollbars"),o.addclass(this.wrapper,"iscrolllonescrollbar"),this.options.defaultscrollbars&&this.options.customstyle&&(this.options.listenx?this.wrapper.style.right="2px":this.wrapper.style.bottom="2px"));this.wrapper.offsetheight;this.options.listenx&&(this.wrapperwidth=this.wrapper.clientwidth,this.options.resize?(this.indicatorwidth=s.max(s.round(this.wrapperwidth*this.wrapperwidth/(this.scroller.scrollerwidth||this.wrapperwidth||1)),8),this.indicatorstyle.width=this.indicatorwidth+"px"):this.indicatorwidth=this.indicator.clientwidth,this.maxposx=this.wrapperwidth-this.indicatorwidth,"clip"==this.options.shrink?(this.minboundaryx=8-this.indicatorwidth,this.maxboundaryx=this.wrapperwidth-8):(this.minboundaryx=0,this.maxboundaryx=this.maxposx),this.sizeratiox=this.options.speedratiox||this.scroller.maxscrollx&&this.maxposx/this.scroller.maxscrollx),this.options.listeny&&(this.wrapperheight=this.wrapper.clientheight,this.options.resize?(this.indicatorheight=s.max(s.round(this.wrapperheight*this.wrapperheight/(this.scroller.scrollerheight||this.wrapperheight||1)),8),this.indicatorstyle.height=this.indicatorheight+"px"):this.indicatorheight=this.indicator.clientheight,this.maxposy=this.wrapperheight-this.indicatorheight,"clip"==this.options.shrink?(this.minboundaryy=8-this.indicatorheight,this.maxboundaryy=this.wrapperheight-8):(this.minboundaryy=0,this.maxboundaryy=this.maxposy),this.maxposy=this.wrapperheight-this.indicatorheight,this.sizeratioy=this.options.speedratioy||this.scroller.maxscrolly&&this.maxposy/this.scroller.maxscrolly),this.updateposition()},updateposition:function(){var t=this.options.listenx&&s.round(this.sizeratiox*this.scroller.x)||0,i=this.options.listeny&&s.round(this.sizeratioy*this.scroller.y)||0;this.options.ignoreboundaries||(tthis.maxboundaryx?"scale"==this.options.shrink?(this.width=s.max(this.indicatorwidth-(t-this.maxposx),8),this.indicatorstyle.width=this.width+"px",t=this.maxposx+this.indicatorwidth-this.width):t=this.maxboundaryx:"scale"==this.options.shrink&&this.width!=this.indicatorwidth&&(this.width=this.indicatorwidth,this.indicatorstyle.width=this.width+"px"),ithis.maxboundaryy?"scale"==this.options.shrink?(this.height=s.max(this.indicatorheight-3*(i-this.maxposy),8),this.indicatorstyle.height=this.height+"px",i=this.maxposy+this.indicatorheight-this.height):i=this.maxboundaryy:"scale"==this.options.shrink&&this.height!=this.indicatorheight&&(this.height=this.indicatorheight,this.indicatorstyle.height=this.height+"px")),this.x=t,this.y=i,this.scroller.options.usetransform?this.indicatorstyle[o.style.transform]="translate("+t+"px,"+i+"px)"+this.scroller.translatez:(this.indicatorstyle.left=t+"px",this.indicatorstyle.top=i+"px")},_pos:function(t,i){t<0?t=0:t>this.maxposx&&(t=this.maxposx),i<0?i=0:i>this.maxposy&&(i=this.maxposy),t=this.options.listenx?s.round(t/this.sizeratiox):this.scroller.x,i=this.options.listeny?s.round(i/this.sizeratioy):this.scroller.y,this.scroller.scrollto(t,i)},fade:function(t,i){if(!i||this.visible){cleartimeout(this.fadetimeout),this.fadetimeout=null;var s=t?250:500,e=t?0:300;t=t?"1":"0",this.wrapperstyle[o.style.transitionduration]=s+"ms",this.fadetimeout=settimeout(function(t){this.wrapperstyle.opacity=t,this.visible=+t}.bind(this,t),e)}}},n.utils=o,"undefined"!=typeof module&&module.exports?module.exports=n:"function"==typeof define&&define.amd?define(function(){return n}):t.iscroll=n}(window,document,math), /*! * scrolloverflow 2.0.0 module for fullpage.js >= 3 * https://github.com/alvarotrigo/fullpage.js * @license mit licensed * * copyright (c) 2015 alvarotrigo.com - a project by alvaro trigo */ function(t,i){t.fp_scrolloverflow=function(){var s="fp-scrollable",e="."+s,o=".active",n=".fp-section",r=n+o,h=".fp-slide",a=h+o,l=".fp-tablecell",c="fp-responsive",p="fp-auto-height-responsive";function d(t){var i=fp_utils.closest(t,n);return null!=i?parseint(getcomputedstyle(i)["padding-bottom"])+parseint(getcomputedstyle(i)["padding-top"]):0}function u(){var s=this;function e(){var t;fp_utils.hasclass(i.body,c)?(t=s.options.scrolloverflowhandler,r(function(i){fp_utils.hasclass(fp_utils.closest(i,n),p)&&t.remove(i)})):r(o)}function o(t){if(!fp_utils.hasclass(t,"fp-noscroll")){fp_utils.css(t,{overflow:"hidden"});var i,e=s.options.scrolloverflowhandler,o=e.wrapcontent(),r=fp_utils.closest(t,n),h=e.scrollable(t),a=d(r);null!=h?i=e.scrollheight(t):(i=t.scrollheight-a,s.options.verticalcentered&&(i=f(l,t)[0].scrollheight-a));var c=fp_utils.getwindowheight()-a;i>c?null!=h?e.update(t,c):(s.options.verticalcentered?(fp_utils.wrapinner(f(l,t)[0],o.scroller),fp_utils.wrapinner(f(l,t)[0],o.scrollable)):(fp_utils.wrapinner(t,o.scroller),fp_utils.wrapinner(t,o.scrollable)),e.create(t,c,s.iscrolloptions)):e.remove(t),fp_utils.css(t,{overflow:""})}}function r(t){f(n).foreach(function(i){var s=f(h,i);s.length?s.foreach(function(i){t(i)}):t(i)})}s.options=null,s.init=function(o,n){return s.options=o,s.iscrolloptions=n,"complete"===i.readystate&&(e(),fullpage_api.shared.afterrenderactions()),t.addeventlistener("load",function(){e(),fullpage_api.shared.afterrenderactions()}),s},s.createscrollbarforall=e}iscroll.prototype.wheelon=function(){this.wrapper.addeventlistener("wheel",this),this.wrapper.addeventlistener("mousewheel",this),this.wrapper.addeventlistener("dommousescroll",this)},iscroll.prototype.wheeloff=function(){this.wrapper.removeeventlistener("wheel",this),this.wrapper.removeeventlistener("mousewheel",this),this.wrapper.removeeventlistener("dommousescroll",this)};var f=null,m={refreshid:null,iscrollinstances:[],iscrolloptions:{scrollbars:!0,mousewheel:!0,hidescrollbars:!1,fadescrollbars:!1,disablemouse:!0,interactivescrollbars:!0},init:function(i){f=fp_utils.$;var s="ontouchstart"in t||navigator.msmaxtouchpoints>0||navigator.maxtouchpoints;return m.iscrolloptions.click=s,m.iscrolloptions=fp_utils.deepextend(m.iscrolloptions,i.scrolloverflowoptions),(new u).init(i,m.iscrolloptions)},togglewheel:function(t){f(e,f(r)[0]).foreach(function(i){var s=i.fp_iscrollinstance;null!=s&&(t?s.wheelon():s.wheeloff())})},onleave:function(){m.togglewheel(!1)},beforeleave:function(){m.onleave()},afterload:function(){m.togglewheel(!0)},create:function(t,i,s){f(e,t).foreach(function(e){fp_utils.css(e,{height:i+"px"});var o=e.fp_iscrollinstance;null!=o&&m.iscrollinstances.foreach(function(t){t.destroy()}),o=new iscroll(e,s),m.iscrollinstances.push(o),fp_utils.hasclass(fp_utils.closest(t,n),"active")||o.wheeloff(),e.fp_iscrollinstance=o})},isscrolled:function(t,i){var s=i.fp_iscrollinstance;return!s||("top"===t?s.y>=0&&!fp_utils.getscrolltop(i):"bottom"===t?0-s.y+fp_utils.getscrolltop(i)+1+i.offsetheight>=i.scrollheight:void 0)},scrollable:function(t){return f(".fp-slides",t).length?f(e,f(a,t)[0])[0]:f(e,t)[0]},scrollheight:function(t){return f(".fp-scroller",f(e,t)[0])[0].scrollheight},remove:function(t){if(null!=t){var i=f(e,t)[0];if(null!=i){var s=i.fp_iscrollinstance;null!=s&&s.destroy(),i.fp_iscrollinstance=null,f(".fp-scroller",t)[0].outerhtml=f(".fp-scroller",t)[0].innerhtml,f(e,t)[0].outerhtml=f(e,t)[0].innerhtml}}},update:function(t,i){cleartimeout(m.refreshid),m.refreshid=settimeout(function(){m.iscrollinstances.foreach(function(t){t.refresh(),fullpage_api.silentmoveto(fp_utils.index(f(r)[0])+1)})},150),fp_utils.css(f(e,t)[0],{height:i+"px"}),fp_utils.css(f(e,t)[0].parentnode,{height:i+d(t)+"px"})},wrapcontent:function(){var t=i.createelement("div");t.classname=s;var e=i.createelement("div");return e.classname="fp-scroller",{scrollable:t,scroller:e}}};return{iscrollhandler:m}}()}(window,document); //# sourcemappingurl=scrolloverflow.min.js.map