jquery.fullpage.js 26 KB

1
  1. !function(e,n){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(o){return n(o,e,e.document,e.Math)}):"undefined"!=typeof exports?module.exports=n(require("src/modules/jquery/jquery"),e,e.document,e.Math):n(jQuery,e,e.document,e.Math)}("undefined"!=typeof window?window:this,function(e,n,o,t,i){"use strict";var l,r="fullpage-wrapper",a="."+r,s="fp-scrollable",c="."+s,d=".slimScrollBar",f=".slimScrollRail",u="fp-responsive",h="fp-notransition",p="fp-destroyed",v="fp-enabled",g="fp-viewing",m="active",S="."+m,w="fp-completely",y="."+w,b=".section",x="fp-section",T="."+x,C=T+S,k=T+":first",A=T+":last",L="fp-tableCell",B="."+L,E="fp-auto-height",M="fp-normal-scroll",H="fp-nav",R="#"+H,O="fp-tooltip",z="."+O,D="fp-show-active",P=".slide",I="fp-slide",F="."+I,V=F+S,q="fp-slides",W="."+q,Y="fp-slidesContainer",U="."+Y,X="fp-table",N="fp-slidesNav",K="."+N,j=K+" a",Q="fp-controlArrow",G="."+Q,J="fp-prev",Z="."+J,$=Q+" "+J,_=G+Z,en="fp-next",nn="."+en,on=Q+" "+en,tn=G+nn,ln=e(n),rn=e(o);e.fn.fullpage=function(s){function c(){s.css3&&(s.css3=wo()),s.scrollBar=s.scrollBar||s.hybrid,f(),Q(),Fo.setAllowScrolling(!0),Fo.setAutoScrolling(s.autoScrolling,"internal");var n=e(C).find(V);n.length&&(0!==e(C).index(T)||0===e(C).index(T)&&0!==n.index())&&Bo(n),Jn(),So(),ln.on("load",function(){Dn()})}function d(){ln.on("scroll",un).on("hashchange",Pn).blur(Un).resize(Gn),rn.keydown(In).keyup(Vn).on("click touchstart",R+" a",Xn).on("click touchstart",j,Nn).on("click",z,Fn),e(T).on("click touchstart",G,Yn),s.normalScrollElements&&(rn.on("mouseenter",s.normalScrollElements,function(){Fo.setMouseWheelScrolling(!1)}),rn.on("mouseleave",s.normalScrollElements,function(){Fo.setMouseWheelScrolling(!0)}))}function f(){s.anchors.length||(s.anchors=e(s.sectionSelector+"[data-anchor]").map(function(){return e(this).data("anchor").toString()}).get()),s.navigationTooltips.length||(s.navigationTooltips=e(s.sectionSelector+"[data-tooltip]").map(function(){return e(this).data("tooltip").toString()}).get())}function Q(){No.css({height:"100%",position:"relative"}),No.addClass(r),e("html").addClass(v),Ko=ln.height(),No.removeClass(p),an(),e(T).each(function(n){var o=e(this),t=o.find(F),i=t.length;en(o,n),nn(o,n),i>0?Z(o,t,i):s.verticalCentered&&ro(o)}),s.fixedElements&&s.css3&&e(s.fixedElements).appendTo(Io),s.navigation&&cn(),s.scrollOverflow?("complete"===o.readyState&&dn(),ln.on("load",dn)):fn()}function Z(n,o,t){var i=100*t,l=100/t;o.wrapAll('<div class="'+Y+'" />'),o.parent().wrap('<div class="'+q+'" />'),n.find(U).css("width",i+"%"),t>1&&(s.controlArrows&&sn(n),s.slidesNavigation&&po(n,t)),o.each(function(){e(this).css("width",l+"%"),s.verticalCentered&&ro(e(this))});var r=n.find(V);r.length&&(0!==e(C).index(T)||0===e(C).index(T)&&0!==r.index())?Bo(r):o.eq(0).addClass(m)}function en(n,o){o||0!==e(C).length||n.addClass(m),n.css("height",Ko+"px"),s.paddingTop&&n.css("padding-top",s.paddingTop),s.paddingBottom&&n.css("padding-bottom",s.paddingBottom),"undefined"!=typeof s.sectionsColor[o]&&n.css("background-color",s.sectionsColor[o]),"undefined"!=typeof s.anchors[o]&&n.attr("data-anchor",s.anchors[o])}function nn(n,o){"undefined"!=typeof s.anchors[o]&&n.hasClass(m)&&oo(s.anchors[o],o),s.menu&&s.css3&&e(s.menu).closest(a).length&&e(s.menu).appendTo(Io)}function an(){e(s.sectionSelector).each(function(){e(this).addClass(x)}),e(s.slideSelector).each(function(){e(this).addClass(I)})}function sn(e){e.find(W).after('<div class="'+$+'"></div><div class="'+on+'"></div>'),"#fff"!=s.controlArrowColor&&(e.find(tn).css("border-color","transparent transparent transparent "+s.controlArrowColor),e.find(_).css("border-color","transparent "+s.controlArrowColor+" transparent transparent")),s.loopHorizontal||e.find(_).hide()}function cn(){Io.append('<div id="'+H+'"><ul></ul></div>');var n=e(R);n.addClass(function(){return s.showActiveTooltip?D+" "+s.navigationPosition:s.navigationPosition});for(var o=0;o<e(T).length;o++){var t="";s.anchors.length&&(t=s.anchors[o]);var i='<li><a href="#'+t+'"><span></span></a>',l=s.navigationTooltips[o];"undefined"!=typeof l&&""!==l&&(i+='<div class="'+O+" "+s.navigationPosition+'">'+l+"</div>"),i+="</li>",n.find("ul").append(i)}e(R).css("margin-top","-"+e(R).height()/2+"px"),e(R).find("li").eq(e(C).index(T)).find("a").addClass(m)}function dn(){e(T).each(function(){var n=e(this).find(F);n.length?n.each(function(){lo(e(this))}):lo(e(this))}),fn()}function fn(){var n=e(C);n.addClass(w),s.scrollOverflowHandler.afterRender&&s.scrollOverflowHandler.afterRender(n),Hn(n),Rn(n),e.isFunction(s.afterLoad)&&s.afterLoad.call(n,n.data("anchor"),n.index(T)+1),e.isFunction(s.afterRender)&&s.afterRender.call(No)}function un(){var n;if(!s.autoScrolling||s.scrollBar){for(var t=ln.scrollTop(),i=pn(t),l=0,r=t+ln.height()/2,a=o.querySelectorAll(T),c=0;c<a.length;++c){var d=a[c];d.offsetTop<=r&&(l=c)}if(hn(i)&&(e(C).hasClass(w)||e(C).addClass(w).siblings().removeClass(w)),n=e(a).eq(l),!n.hasClass(m)){lt=!0;var f=e(C),u=f.index(T)+1,h=to(n),p=n.data("anchor"),v=n.index(T)+1,g=n.find(V);if(g.length)var S=g.data("anchor"),y=g.index();Go&&(n.addClass(m).siblings().removeClass(m),e.isFunction(s.onLeave)&&s.onLeave.call(f,u,v,h),e.isFunction(s.afterLoad)&&s.afterLoad.call(n,p,v),Hn(n),oo(p,v-1),s.anchors.length&&(Vo=p,vo(y,S,p,v))),clearTimeout(nt),nt=setTimeout(function(){lt=!1},100)}s.fitToSection&&(clearTimeout(ot),ot=setTimeout(function(){Go&&s.fitToSection&&(e(C).is(n)&&(jo=!0),kn(e(C)),jo=!1)},s.fitToSectionDelay))}}function hn(n){var o=e(C).position().top,t=o+ln.height();return"up"==n?t>=ln.scrollTop()+ln.height():o<=ln.scrollTop()}function pn(e){var n=e>rt?"down":"up";return rt=e,n}function vn(e,n){if(Zo.m[e]){var o,t;if("down"==e?(o="bottom",t=Fo.moveSectionDown):(o="top",t=Fo.moveSectionUp),n.length>0){if(!s.scrollOverflowHandler.isScrolled(o,n))return!0;t()}else t()}}function gn(n){var o=n.originalEvent;if(!mn(n.target)&&Sn(o)){s.autoScrolling&&n.preventDefault();var i=e(C),l=s.scrollOverflowHandler.scrollable(i);if(Go&&!Yo){var r=Lo(o);ct=r.y,dt=r.x,i.find(W).length&&t.abs(st-dt)>t.abs(at-ct)?t.abs(st-dt)>ln.outerWidth()/100*s.touchSensitivity&&(st>dt?Zo.m.right&&Fo.moveSlideRight():Zo.m.left&&Fo.moveSlideLeft()):s.autoScrolling&&t.abs(at-ct)>ln.height()/100*s.touchSensitivity&&(at>ct?vn("down",l):ct>at&&vn("up",l))}}}function mn(n,o){o=o||0;var t=e(n).parent();return o<s.normalScrollElementTouchThreshold&&t.is(s.normalScrollElements)?!0:o==s.normalScrollElementTouchThreshold?!1:mn(t,++o)}function Sn(e){return"undefined"==typeof e.pointerType||"mouse"!=e.pointerType}function wn(e){var n=e.originalEvent;if(s.fitToSection&&Po.stop(),Sn(n)){var o=Lo(n);at=o.y,st=o.x}}function yn(e,n){for(var o=0,i=e.slice(t.max(e.length-n,1)),l=0;l<i.length;l++)o+=i[l];return t.ceil(o/n)}function bn(o){var i=(new Date).getTime(),l=e(y).hasClass(M);if(s.autoScrolling&&!Wo&&!l){o=o||n.event;var r=o.wheelDelta||-o.deltaY||-o.detail,a=t.max(-1,t.min(1,r)),c="undefined"!=typeof o.wheelDeltaX||"undefined"!=typeof o.deltaX,d=t.abs(o.wheelDeltaX)<t.abs(o.wheelDelta)||t.abs(o.deltaX)<t.abs(o.deltaY)||!c;Jo.length>149&&Jo.shift(),Jo.push(t.abs(r)),s.scrollBar&&(o.preventDefault?o.preventDefault():o.returnValue=!1);var f=e(C),u=s.scrollOverflowHandler.scrollable(f),h=i-ft;if(ft=i,h>200&&(Jo=[]),Go){var p=yn(Jo,10),v=yn(Jo,70),g=p>=v;g&&d&&(0>a?vn("down",u):vn("up",u))}return!1}s.fitToSection&&Po.stop()}function xn(n,o){var t="undefined"==typeof o?e(C):o,i=t.find(W),l=i.find(F).length;if(!(!i.length||Yo||2>l)){var r=i.find(V),a=null;if(a="prev"===n?r.prev(F):r.next(F),!a.length){if(!s.loopHorizontal)return;a=r.siblings("prev"===n?":last":":first")}Yo=!0,Qn(i,a)}}function Tn(){e(V).each(function(){Bo(e(this),"internal")})}function Cn(e){var n=e.position(),o=n.top,t=n.top>ut,i=o-Ko+e.outerHeight();return e.outerHeight()>Ko?t||(o=i):(t||jo&&e.is(":last-child"))&&(o=i),ut=o,o}function kn(n,o,t){if("undefined"!=typeof n){var i=Cn(n),l={element:n,callback:o,isMovementUp:t,dtop:i,yMovement:to(n),anchorLink:n.data("anchor"),sectionIndex:n.index(T),activeSlide:n.find(V),activeSection:e(C),leavingSection:e(C).index(T)+1,localIsResizing:jo};if(!(l.activeSection.is(n)&&!jo||s.scrollBar&&ln.scrollTop()===l.dtop&&!n.hasClass(E))){if(l.activeSlide.length)var r=l.activeSlide.data("anchor"),a=l.activeSlide.index();s.autoScrolling&&s.continuousVertical&&"undefined"!=typeof l.isMovementUp&&(!l.isMovementUp&&"up"==l.yMovement||l.isMovementUp&&"down"==l.yMovement)&&(l=Bn(l)),e.isFunction(s.onLeave)&&!l.localIsResizing&&s.onLeave.call(l.activeSection,l.leavingSection,l.sectionIndex+1,l.yMovement)===!1||(On(l.activeSection),n.addClass(m).siblings().removeClass(m),Hn(n),Go=!1,vo(a,r,l.anchorLink,l.sectionIndex),An(l),Vo=l.anchorLink,oo(l.anchorLink,l.sectionIndex))}}}function An(n){if(s.css3&&s.autoScrolling&&!s.scrollBar){var o="translate3d(0px, -"+n.dtop+"px, 0px)";so(o,!0),s.scrollingSpeed?_o=setTimeout(function(){Mn(n)},s.scrollingSpeed):Mn(n)}else{var t=Ln(n);e(t.element).animate(t.options,s.scrollingSpeed,s.easing).promise().done(function(){s.scrollBar?setTimeout(function(){Mn(n)},30):Mn(n)})}}function Ln(e){var n={};return s.autoScrolling&&!s.scrollBar?(n.options={top:-e.dtop},n.element=a):(n.options={scrollTop:e.dtop},n.element="html, body"),n}function Bn(n){return n.isMovementUp?e(C).before(n.activeSection.nextAll(T)):e(C).after(n.activeSection.prevAll(T).get().reverse()),Eo(e(C).position().top),Tn(),n.wrapAroundElements=n.activeSection,n.dtop=n.element.position().top,n.yMovement=to(n.element),n}function En(n){n.wrapAroundElements&&n.wrapAroundElements.length&&(n.isMovementUp?e(k).before(n.wrapAroundElements):e(A).after(n.wrapAroundElements),Eo(e(C).position().top),Tn())}function Mn(n){En(n),n.element.find(".fp-scrollable").mouseover(),e.isFunction(s.afterLoad)&&!n.localIsResizing&&s.afterLoad.call(n.element,n.anchorLink,n.sectionIndex+1),Rn(n.element),n.element.addClass(w).siblings().removeClass(w),Go=!0,e.isFunction(n.callback)&&n.callback.call(this)}function Hn(n){var n=zn(n);n.find("img[data-src], source[data-src], audio[data-src]").each(function(){e(this).attr("src",e(this).data("src")),e(this).removeAttr("data-src"),e(this).is("source")&&e(this).closest("video").get(0).load()})}function Rn(n){var n=zn(n);n.find("video, audio").each(function(){var n=e(this).get(0);n.hasAttribute("autoplay")&&"function"==typeof n.play&&n.play()})}function On(n){var n=zn(n);n.find("video, audio").each(function(){var n=e(this).get(0);n.hasAttribute("data-ignore")||"function"!=typeof n.pause||n.pause()})}function zn(n){var o=n.find(V);return o.length&&(n=e(o)),n}function Dn(){var e=n.location.hash.replace("#","").split("/"),o=e[0],t=e[1];o&&(s.animateAnchor?uo(o,t):Fo.silentMoveTo(o,t))}function Pn(){if(!lt&&!s.lockAnchors){var e=n.location.hash.replace("#","").split("/"),o=e[0],t=e[1],i="undefined"==typeof Vo,l="undefined"==typeof Vo&&"undefined"==typeof t&&!Yo;o.length&&(o&&o!==Vo&&!i||l||!Yo&&qo!=t)&&uo(o,t)}}function In(n){clearTimeout(tt);var o=e(":focus");if(!o.is("textarea")&&!o.is("input")&&!o.is("select")&&"true"!==o.attr("contentEditable")&&""!==o.attr("contentEditable")&&s.keyboardScrolling&&s.autoScrolling){var t=n.which,i=[40,38,32,33,34];e.inArray(t,i)>-1&&n.preventDefault(),Wo=n.ctrlKey,tt=setTimeout(function(){Kn(n)},150)}}function Fn(){e(this).prev().trigger("click")}function Vn(e){Qo&&(Wo=e.ctrlKey)}function qn(e){2==e.which&&(ht=e.pageY,No.on("mousemove",jn))}function Wn(e){2==e.which&&No.off("mousemove")}function Yn(){var n=e(this).closest(T);e(this).hasClass(J)?Zo.m.left&&Fo.moveSlideLeft(n):Zo.m.right&&Fo.moveSlideRight(n)}function Un(){Qo=!1,Wo=!1}function Xn(n){n.preventDefault();var o=e(this).parent().index();kn(e(T).eq(o))}function Nn(n){n.preventDefault();var o=e(this).closest(T).find(W),t=o.find(F).eq(e(this).closest("li").index());Qn(o,t)}function Kn(n){var o=n.shiftKey;switch(n.which){case 38:case 33:Zo.k.up&&Fo.moveSectionUp();break;case 32:if(o&&Zo.k.up){Fo.moveSectionUp();break}case 40:case 34:Zo.k.down&&Fo.moveSectionDown();break;case 36:Zo.k.up&&Fo.moveTo(1);break;case 35:Zo.k.down&&Fo.moveTo(e(T).length);break;case 37:Zo.k.left&&Fo.moveSlideLeft();break;case 39:Zo.k.right&&Fo.moveSlideRight();break;default:return}}function jn(e){Go&&(e.pageY<ht&&Zo.m.up?Fo.moveSectionUp():e.pageY>ht&&Zo.m.down&&Fo.moveSectionDown()),ht=e.pageY}function Qn(n,o){var i=o.position(),l=o.index(),r=n.closest(T),a=r.index(T),c=r.data("anchor"),d=r.find(K),f=mo(o),u=r.find(V),h=jo;if(s.onSlideLeave){var p=u.index(),v=io(p,l);if(!h&&"none"!==v&&e.isFunction(s.onSlideLeave)&&s.onSlideLeave.call(u,c,a+1,p,v,l)===!1)return void(Yo=!1)}On(u),o.addClass(m).siblings().removeClass(m),h||Hn(o),!s.loopHorizontal&&s.controlArrows&&(r.find(_).toggle(0!==l),r.find(tn).toggle(!o.is(":last-child"))),r.hasClass(m)&&vo(l,f,c,a);var g=function(){h||e.isFunction(s.afterSlideLoad)&&s.afterSlideLoad.call(o,c,a+1,f,l),Rn(o),Yo=!1};if(s.css3){var w="translate3d(-"+t.round(i.left)+"px, 0px, 0px)";Zn(n.find(U),s.scrollingSpeed>0).css(Mo(w)),et=setTimeout(function(){g()},s.scrollingSpeed,s.easing)}else n.animate({scrollLeft:t.round(i.left)},s.scrollingSpeed,s.easing,function(){g()});d.find(S).removeClass(m),d.find("li").eq(l).find("a").addClass(m)}function Gn(){if(Jn(),Uo){var n=e(o.activeElement);if(!n.is("textarea")&&!n.is("input")&&!n.is("select")){var i=ln.height();t.abs(i-pt)>20*t.max(pt,i)/100&&(Fo.reBuild(!0),pt=i)}}else clearTimeout($o),$o=setTimeout(function(){Fo.reBuild(!0)},350)}function Jn(){var e=s.responsive||s.responsiveWidth,n=s.responsiveHeight,o=e&&ln.outerWidth()<e,t=n&&ln.height()<n;e&&n?Fo.setResponsive(o||t):e?Fo.setResponsive(o):n&&Fo.setResponsive(t)}function Zn(e){var n="all "+s.scrollingSpeed+"ms "+s.easingcss3;return e.removeClass(h),e.css({"-webkit-transition":n,transition:n})}function $n(e){return e.addClass(h)}function _n(e,n){var o=825,i=900;if(o>e||i>n){var l=100*e/o,r=100*n/i,a=t.min(l,r),s=a.toFixed(2);Io.css("font-size",s+"%")}else Io.css("font-size","100%")}function eo(n,o){s.navigation&&(e(R).find(S).removeClass(m),n?e(R).find('a[href="#'+n+'"]').addClass(m):e(R).find("li").eq(o).find("a").addClass(m))}function no(n){s.menu&&(e(s.menu).find(S).removeClass(m),e(s.menu).find('[data-menuanchor="'+n+'"]').addClass(m))}function oo(e,n){no(e),eo(e,n)}function to(n){var o=e(C).index(T),t=n.index(T);return o==t?"none":o>t?"up":"down"}function io(e,n){return e==n?"none":e>n?"left":"right"}function lo(e){e.css("overflow","hidden");var n,o=s.scrollOverflowHandler,t=o.wrapContent(),i=e.closest(T),l=o.scrollable(e);l.length?n=o.scrollHeight(e):(n=e.get(0).scrollHeight,s.verticalCentered&&(n=e.find(B).get(0).scrollHeight));var r=Ko-parseInt(i.css("padding-bottom"))-parseInt(i.css("padding-top"));n>r?l.length?o.update(e,r):(s.verticalCentered?e.find(B).wrapInner(t):e.wrapInner(t),o.create(e,r)):o.remove(e),e.css("overflow","")}function ro(e){e.addClass(X).wrapInner('<div class="'+L+'" style="height:'+ao(e)+'px;" />')}function ao(e){var n=Ko;if(s.paddingTop||s.paddingBottom){var o=e;o.hasClass(x)||(o=e.closest(T));var t=parseInt(o.css("padding-top"))+parseInt(o.css("padding-bottom"));n=Ko-t}return n}function so(e,n){n?Zn(No):$n(No),No.css(Mo(e)),setTimeout(function(){No.removeClass(h)},10)}function co(n){var o=No.find(T+'[data-anchor="'+n+'"]');return o.length||(o=e(T).eq(n-1)),o}function fo(e,n){var o=n.find(W),t=o.find(F+'[data-anchor="'+e+'"]');return t.length||(t=o.find(F).eq(e)),t}function uo(e,n){var o=co(e);"undefined"==typeof n&&(n=0),e===Vo||o.hasClass(m)?ho(o,n):kn(o,function(){ho(o,n)})}function ho(e,n){if("undefined"!=typeof n){var o=e.find(W),t=fo(n,e);t.length&&Qn(o,t)}}function po(e,n){e.append('<div class="'+N+'"><ul></ul></div>');var o=e.find(K);o.addClass(s.slidesNavPosition);for(var t=0;n>t;t++)o.find("ul").append('<li><a href="#"><span></span></a></li>');o.css("margin-left","-"+o.width()/2+"px"),o.find("li").first().find("a").addClass(m)}function vo(e,n,o){var t="";s.anchors.length&&!s.lockAnchors&&(e?("undefined"!=typeof o&&(t=o),"undefined"==typeof n&&(n=e),qo=n,go(t+"/"+n)):"undefined"!=typeof e?(qo=n,go(o)):go(o)),So()}function go(e){if(s.recordHistory)location.hash=e;else if(Uo||Xo)n.history.replaceState(i,i,"#"+e);else{var o=n.location.href.split("#")[0];n.location.replace(o+"#"+e)}}function mo(e){var n=e.data("anchor"),o=e.index();return"undefined"==typeof n&&(n=o),n}function So(){var n=e(C),o=n.find(V),t=mo(n),i=mo(o),l=(n.index(T),String(t));o.length&&(l=l+"-"+i),l=l.replace("/","-").replace("#","");var r=new RegExp("\\b\\s?"+g+"-[^\\s]+\\b","g");Io[0].className=Io[0].className.replace(r,""),Io.addClass(g+"-"+l)}function wo(){var e,t=o.createElement("p"),l={webkitTransform:"-webkit-transform",OTransform:"-o-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",transform:"transform"};o.body.insertBefore(t,null);for(var r in l)t.style[r]!==i&&(t.style[r]="translate3d(1px,1px,1px)",e=n.getComputedStyle(t).getPropertyValue(l[r]));return o.body.removeChild(t),e!==i&&e.length>0&&"none"!==e}function yo(){o.addEventListener?(o.removeEventListener("mousewheel",bn,!1),o.removeEventListener("wheel",bn,!1),o.removeEventListener("MozMousePixelScroll",bn,!1)):o.detachEvent("onmousewheel",bn)}function bo(){var e,t="";n.addEventListener?e="addEventListener":(e="attachEvent",t="on");var l="onwheel"in o.createElement("div")?"wheel":o.onmousewheel!==i?"mousewheel":"DOMMouseScroll";"DOMMouseScroll"==l?o[e](t+"MozMousePixelScroll",bn,!1):o[e](t+l,bn,!1)}function xo(){No.on("mousedown",qn).on("mouseup",Wn)}function To(){No.off("mousedown",qn).off("mouseup",Wn)}function Co(){if(Uo||Xo){var n=Ao();e(a).off("touchstart "+n.down).on("touchstart "+n.down,wn),e(a).off("touchmove "+n.move).on("touchmove "+n.move,gn)}}function ko(){if(Uo||Xo){var n=Ao();e(a).off("touchstart "+n.down),e(a).off("touchmove "+n.move)}}function Ao(){var e;return e=n.PointerEvent?{down:"pointerdown",move:"pointermove"}:{down:"MSPointerDown",move:"MSPointerMove"}}function Lo(e){var n=[];return n.y="undefined"!=typeof e.pageY&&(e.pageY||e.pageX)?e.pageY:e.touches[0].pageY,n.x="undefined"!=typeof e.pageX&&(e.pageY||e.pageX)?e.pageX:e.touches[0].pageX,Xo&&Sn(e)&&s.scrollBar&&(n.y=e.touches[0].pageY,n.x=e.touches[0].pageX),n}function Bo(e,n){Fo.setScrollingSpeed(0,"internal"),"undefined"!=typeof n&&(jo=!0),Qn(e.closest(W),e),"undefined"!=typeof n&&(jo=!1),Fo.setScrollingSpeed(it.scrollingSpeed,"internal")}function Eo(e){if(s.scrollBar)No.scrollTop(e);else if(s.css3){var n="translate3d(0px, -"+e+"px, 0px)";so(n,!1)}else No.css("top",-e)}function Mo(e){return{"-webkit-transform":e,"-moz-transform":e,"-ms-transform":e,transform:e}}function Ho(e,n,o){switch(n){case"up":Zo[o].up=e;break;case"down":Zo[o].down=e;break;case"left":Zo[o].left=e;break;case"right":Zo[o].right=e;break;case"all":"m"==o?Fo.setAllowScrolling(e):Fo.setKeyboardScrolling(e)}}function Ro(){Eo(0),e(R+", "+K+", "+G).remove(),e(T).css({height:"","background-color":"",padding:""}),e(F).css({width:""}),No.css({height:"",position:"","-ms-touch-action":"","touch-action":""}),Po.css({overflow:"",height:""}),e("html").removeClass(v),e.each(Io.get(0).className.split(/\s+/),function(e,n){0===n.indexOf(g)&&Io.removeClass(n)}),e(T+", "+F).each(function(){s.scrollOverflowHandler.remove(e(this)),e(this).removeClass(X+" "+m)}),$n(No),No.find(B+", "+U+", "+W).each(function(){e(this).replaceWith(this.childNodes)}),Po.scrollTop(0);var n=[x,I,Y];e.each(n,function(n,o){e("."+o).removeClass(o)})}function Oo(e,n,o){s[e]=n,"internal"!==o&&(it[e]=n)}function zo(){return e("html").hasClass(v)?void Do("error","Fullpage.js can only be initialized once and you are doing it multiple times!"):(s.continuousVertical&&(s.loopTop||s.loopBottom)&&(s.continuousVertical=!1,Do("warn","Option `loopTop/loopBottom` is mutually exclusive with `continuousVertical`; `continuousVertical` disabled")),s.scrollBar&&s.scrollOverflow&&Do("warn","Option `scrollBar` is mutually exclusive with `scrollOverflow`. Sections with scrollOverflow might not work well in Firefox"),s.continuousVertical&&s.scrollBar&&(s.continuousVertical=!1,Do("warn","Option `scrollBar` is mutually exclusive with `continuousVertical`; `continuousVertical` disabled")),void e.each(s.anchors,function(n,o){var t=rn.find("[name]").filter(function(){return e(this).attr("name")&&e(this).attr("name").toLowerCase()==o.toLowerCase()}),i=rn.find("[id]").filter(function(){return e(this).attr("id")&&e(this).attr("id").toLowerCase()==o.toLowerCase()});(i.length||t.length)&&(Do("error","data-anchor tags can not have the same value as any `id` element on the site (or `name` element for IE)."),i.length&&Do("error",'"'+o+'" is is being used by another element `id` property'),t.length&&Do("error",'"'+o+'" is is being used by another element `name` property'))}))}function Do(e,n){console&&console[e]&&console[e]("fullPage: "+n)}if(e("html").hasClass(v))return void zo();var Po=e("html, body"),Io=e("body"),Fo=e.fn.fullpage;s=e.extend({menu:!1,anchors:[],lockAnchors:!1,navigation:!1,navigationPosition:"right",navigationTooltips:[],showActiveTooltip:!1,slidesNavigation:!1,slidesNavPosition:"bottom",scrollBar:!1,hybrid:!1,css3:!0,scrollingSpeed:700,autoScrolling:!0,fitToSection:!0,fitToSectionDelay:1e3,easing:"easeInOutCubic",easingcss3:"ease",loopBottom:!1,loopTop:!1,loopHorizontal:!0,continuousVertical:!1,normalScrollElements:null,scrollOverflow:!1,scrollOverflowHandler:l,touchSensitivity:5,normalScrollElementTouchThreshold:5,keyboardScrolling:!0,animateAnchor:!0,recordHistory:!0,controlArrows:!0,controlArrowColor:"#fff",verticalCentered:!0,resize:!1,sectionsColor:[],paddingTop:0,paddingBottom:0,fixedElements:null,responsive:0,responsiveWidth:0,responsiveHeight:0,sectionSelector:b,slideSelector:P,afterLoad:null,onLeave:null,afterRender:null,afterResize:null,afterReBuild:null,afterSlideLoad:null,onSlideLeave:null},s),zo(),e.extend(e.easing,{easeInOutCubic:function(e,n,o,t,i){return(n/=i/2)<1?t/2*n*n*n+o:t/2*((n-=2)*n*n+2)+o}}),Fo.setAutoScrolling=function(n,o){Oo("autoScrolling",n,o);var t=e(C);s.autoScrolling&&!s.scrollBar?(Po.css({overflow:"hidden",height:"100%"}),Fo.setRecordHistory(it.recordHistory,"internal"),No.css({"-ms-touch-action":"none","touch-action":"none"}),t.length&&Eo(t.position().top)):(Po.css({overflow:"visible",height:"initial"}),Fo.setRecordHistory(!1,"internal"),No.css({"-ms-touch-action":"","touch-action":""}),Eo(0),t.length&&Po.scrollTop(t.position().top))},Fo.setRecordHistory=function(e,n){Oo("recordHistory",e,n)},Fo.setScrollingSpeed=function(e,n){Oo("scrollingSpeed",e,n)},Fo.setFitToSection=function(e,n){Oo("fitToSection",e,n)},Fo.setLockAnchors=function(e){s.lockAnchors=e},Fo.setMouseWheelScrolling=function(e){e?(bo(),xo()):(yo(),To())},Fo.setAllowScrolling=function(n,o){"undefined"!=typeof o?(o=o.replace(/ /g,"").split(","),e.each(o,function(e,o){Ho(n,o,"m")})):n?(Fo.setMouseWheelScrolling(!0),Co()):(Fo.setMouseWheelScrolling(!1),ko())},Fo.setKeyboardScrolling=function(n,o){"undefined"!=typeof o?(o=o.replace(/ /g,"").split(","),e.each(o,function(e,o){Ho(n,o,"k")})):s.keyboardScrolling=n},Fo.moveSectionUp=function(){var n=e(C).prev(T);n.length||!s.loopTop&&!s.continuousVertical||(n=e(T).last()),n.length&&kn(n,null,!0)},Fo.moveSectionDown=function(){var n=e(C).next(T);n.length||!s.loopBottom&&!s.continuousVertical||(n=e(T).first()),n.length&&kn(n,null,!1)},Fo.silentMoveTo=function(e,n){Fo.setScrollingSpeed(0,"internal"),Fo.moveTo(e,n),Fo.setScrollingSpeed(it.scrollingSpeed,"internal")},Fo.moveTo=function(e,n){var o=co(e);"undefined"!=typeof n?uo(e,n):o.length>0&&kn(o)},Fo.moveSlideRight=function(e){xn("next",e)},Fo.moveSlideLeft=function(e){xn("prev",e)},Fo.reBuild=function(n){if(!No.hasClass(p)){jo=!0;var o=ln.outerWidth();Ko=ln.height(),s.resize&&_n(Ko,o),e(T).each(function(){var n=e(this).find(W),o=e(this).find(F);s.verticalCentered&&e(this).find(B).css("height",ao(e(this))+"px"),e(this).css("height",Ko+"px"),s.scrollOverflow&&(o.length?o.each(function(){lo(e(this))}):lo(e(this))),o.length>1&&Qn(n,n.find(V))});var t=e(C),i=t.index(T);i&&Fo.silentMoveTo(i+1),jo=!1,e.isFunction(s.afterResize)&&n&&s.afterResize.call(No),e.isFunction(s.afterReBuild)&&!n&&s.afterReBuild.call(No)}},Fo.setResponsive=function(n){var o=Io.hasClass(u);n?o||(Fo.setAutoScrolling(!1,"internal"),Fo.setFitToSection(!1,"internal"),e(R).hide(),Io.addClass(u)):o&&(Fo.setAutoScrolling(it.autoScrolling,"internal"),Fo.setFitToSection(it.autoScrolling,"internal"),e(R).show(),Io.removeClass(u))};var Vo,qo,Wo,Yo=!1,Uo=navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/),Xo="ontouchstart"in n||navigator.msMaxTouchPoints>0||navigator.maxTouchPoints,No=e(this),Ko=ln.height(),jo=!1,Qo=!0,Go=!0,Jo=[],Zo={};Zo.m={up:!0,down:!0,left:!0,right:!0},Zo.k=e.extend(!0,{},Zo.m);var $o,_o,et,nt,ot,tt,it=e.extend(!0,{},s);e(this).length&&(c(),d());var lt=!1,rt=0,at=0,st=0,ct=0,dt=0,ft=(new Date).getTime(),ut=0,ht=0,pt=Ko;Fo.destroy=function(n){Fo.setAutoScrolling(!1,"internal"),Fo.setAllowScrolling(!1),Fo.setKeyboardScrolling(!1),No.addClass(p),clearTimeout(et),clearTimeout(_o),clearTimeout($o),clearTimeout(nt),clearTimeout(ot),ln.off("scroll",un).off("hashchange",Pn).off("resize",Gn),rn.off("click",R+" a").off("mouseenter",R+" li").off("mouseleave",R+" li").off("click",j).off("mouseover",s.normalScrollElements).off("mouseout",s.normalScrollElements),e(T).off("click",G),clearTimeout(et),clearTimeout(_o),n&&Ro()}};var an={afterRender:function(e){var n=e.find(q),o=e.find(c);n.length&&(o=n.find(V)),o.mouseover()},create:function(e,n){e.find(c).slimScroll({allowPageScroll:!0,height:n+"px",size:"10px",alwaysVisible:!0})},isScrolled:function(e,n){return"top"===e?!n.scrollTop():"bottom"===e?n.scrollTop()+1+n.innerHeight()>=n[0].scrollHeight:void 0},scrollable:function(e){return e.find(W).length?e.find(V).find(c):e.find(c)},scrollHeight:function(e){return e.find(c).get(0).scrollHeight},remove:function(e){e.find(c).children().first().unwrap().unwrap(),e.find(d).remove(),e.find(f).remove()},update:function(e,n){e.find(c).css("height",n+"px").parent().css("height",n+"px")},wrapContent:function(){return'<div class="'+s+'"></div>'}};l=an});