!function(){var e,t,o,r,n={frameRate:150,animationTime:400,stepSize:100,pulseAlgorithm:!0,pulseScale:4,pulseNormalize:1,accelerationDelta:50,accelerationMax:3,keyboardSupport:!0,arrowScroll:50,fixedBackground:!0,excluded:""},a=n,i=!1,l=!1,c={x:0,y:0},u=!1,s=document.documentElement,d=[],f=/^Mac/.test(navigator.platform);function m(){if(!u&&document.body){u=!0;var r=document.body,n=document.documentElement,c=window.innerHeight,d=r.scrollHeight;if(s=document.compatMode.indexOf("CSS")>=0?n:r,e=r,a.keyboardSupport&&N("keydown",b),top!=self)l=!0;else if(Q&&d>c&&(r.offsetHeight<=c||n.offsetHeight<=c)){var f,m=document.createElement("div");m.style.cssText="position:absolute; z-index:-10000; top:0; left:0; right:0; height:"+s.scrollHeight+"px",document.body.appendChild(m),o=function(){f||(f=setTimeout(function(){i||(m.style.height="0",m.style.height=s.scrollHeight+"px",f=null);},500));},setTimeout(o,10),N("resize",o);if((t=new j(o)).observe(r,{attributes:!0,childList:!0,characterData:!1}),s.offsetHeight<=c){var h=document.createElement("div");h.style.clear="both",r.appendChild(h);}}a.fixedBackground||i||(r.style.backgroundAttachment="scroll",n.style.backgroundAttachment="scroll");}}var h=[],w=!1,p=Date.now();function v(e,t,o){var r,n;if(r=(r=t)>0?1:-1,n=(n=o)>0?1:-1,(c.x!==r||c.y!==n)&&(c.x=r,c.y=n,h=[],p=0),1!=a.accelerationMax){var i=Date.now()-p;if(i<a.accelerationDelta){var l=(1+50/i)/2;l>1&&(l=Math.min(l,a.accelerationMax),t*=l,o*=l);}p=Date.now();}if(h.push({x:t,y:o,lastX:t<0?.99:-.99,lastY:o<0?.99:-.99,start:Date.now()}),!w){var u=q(),s=e===u||e===document.body;null==e.$scrollBehavior&&function(e){var t=k(e);if(null==T[t]){var o=getComputedStyle(e,"")["scroll-behavior"];T[t]="smooth"==o;}return T[t];}(e)&&(e.$scrollBehavior=e.style.scrollBehavior,e.style.scrollBehavior="auto");var d=function(r){for(var n=Date.now(),i=0,l=0,c=0;c<h.length;c++){var u=h[c],f=n-u.start,m=f>=a.animationTime,p=m?1:f/a.animationTime;a.pulseAlgorithm&&(p=V(p));var v=u.x*p-u.lastX>>0,y=u.y*p-u.lastY>>0;i+=v,l+=y,u.lastX+=v,u.lastY+=y,m&&(h.splice(c,1),c--);}s?window.scrollBy(i,l):(i&&(e.scrollLeft+=i),l&&(e.scrollTop+=l)),t||o||(h=[]),h.length?$(d,e,1e3/a.frameRate+1):(w=!1,null!=e.$scrollBehavior&&(e.style.scrollBehavior=e.$scrollBehavior,e.$scrollBehavior=null));};$(d,e,0),w=!0;}}function y(t){u||m();var o=S(t);if(t.defaultPrevented||t.ctrlKey)return!0;if(R(e,"embed")||R(o,"embed")&&/\.pdf/i.test(o.src)||R(e,"object"))return!0;var n=-t.wheelDeltaX||t.deltaX||0,i=-t.wheelDeltaY||t.deltaY||0;f&&(t.wheelDeltaX&&X(t.wheelDeltaX,120)&&(n=t.wheelDeltaX/Math.abs(t.wheelDeltaX)*-120),t.wheelDeltaY&&X(t.wheelDeltaY,120)&&(i=t.wheelDeltaY/Math.abs(t.wheelDeltaY)*-120)),n||i||(i=-t.wheelDelta||0),1===t.deltaMode&&(n*=40,i*=40);var c=z(o);return c?!!function(e){if(!e)return;d.length||(d=[e,e,e]);e=Math.abs(e),d.push(e),d.shift(),clearTimeout(r),r=setTimeout(function(){try{localStorage.SS_deltaBuffer=d.join(",");}catch(e){}},1e3);var t=e>120&&Y(e),o=!Y(120)&&!Y(100)&&!t;return e<50||o;}(i)||(Math.abs(n)>1.2&&(n*=a.stepSize/120),Math.abs(i)>1.2&&(i*=a.stepSize/120),v(c,n,i),t.preventDefault(),void A()):!l||!_||(Object.defineProperty(t,"target",{value:window.frameElement}),parent.wheel(t));}function b(t){var o=S(t),r=t.ctrlKey||t.altKey||t.metaKey||t.shiftKey&&"Space"!==t.code;document.body.contains(e)||(e=document.activeElement);var n=/^(button|submit|radio|checkbox|file|color|image)$/i;if(t.defaultPrevented||/^(textarea|select|embed|object)$/i.test(o.nodeName)||R(o,"input")&&!n.test(o.type)||R(e,"video")||function(e){var t=S(e),o=!1;if(-1!=document.URL.indexOf("www.youtube.com/watch"))do{if(o=t.classList&&t.classList.contains("html5-video-controls"))break;}while(t=t.parentNode);return o;}(t)||o.isContentEditable||r)return!0;if((R(o,"button")||R(o,"input")&&n.test(o.type))&&"Space"===t.code)return!0;if(R(o,"input")&&"radio"==o.type&&("ArrowUp"===t.code||"ArrowDown"===t.code||"ArrowLeft"===t.code||"ArrowRight"===t.code))return!0;var i=0,c=0,u=z(e);if(!u)return!l||!_||parent.keydown(t);var s=u.clientHeight;switch(u==document.body&&(s=window.innerHeight),t.code){case"ArrowUp":c=-a.arrowScroll;break;case"ArrowDown":c=a.arrowScroll;break;case"Space":c=-(t.shiftKey?1:-1)*s*.9;break;case"PageUp":c=.9*-s;break;case"PageDown":c=.9*s;break;case"Home":u==document.body&&document.scrollingElement&&(u=document.scrollingElement),c=-u.scrollTop;break;case"End":var d=u.scrollHeight-u.scrollTop-s;c=d>0?d+10:0;break;case"ArrowLeft":i=-a.arrowScroll;break;case"ArrowRight":i=a.arrowScroll;break;default:return!0;}v(u,i,c),t.preventDefault(),A();}function g(t){e=S(t);}function S(e){return e.composedPath?e.composedPath()[0]:e.target;}var x,D,k=(x=0,function(e){return e.uniqueID||(e.uniqueID=x++);}),E={},M={},T={};function A(){clearTimeout(D),D=setInterval(function(){E=M=T={};},1e3);}function B(e,t,o){for(var r=o?E:M,n=e.length;n--;)r[k(e[n])]=t;return t;}function H(e,t){return(t?E:M)[k(e)];}function z(e){for(var t=[],o=document.body,r=s.scrollHeight;e;){var n=H(e,!1);if(n)return B(t,n);if(t.push(e),r===e.scrollHeight){var a=C(s)&&C(o)||P(s);if(l&&L(s)||!l&&a)return B(t,q());}else if(L(e)&&P(e))return B(t,e);e=e.parentElement||e.getRootNode&&e.getRootNode().host;}}function L(e){return e.clientHeight+10<e.scrollHeight;}function C(e){return"hidden"!==getComputedStyle(e,"").getPropertyValue("overflow-y");}function P(e){var t=getComputedStyle(e,"").getPropertyValue("overflow-y");return"scroll"===t||"auto"===t;}function N(e,t,o){window.addEventListener(e,t,o||!1);}function O(e,t,o){window.removeEventListener(e,t,o||!1);}function R(e,t){return e&&(e.nodeName||"").toLowerCase()===t.toLowerCase();}try{localStorage.SS_deltaBuffer&&(d=localStorage.SS_deltaBuffer.split(","));}catch(e){}function X(e,t){return Math.floor(e/t)==e/t;}function Y(e){return X(d[0],e)&&X(d[1],e)&&X(d[2],e);}var K,$=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e,t,o){window.setTimeout(e,o||1e3/60);},j=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,q=(K=document.scrollingElement,function(){if(!K){var e=document.createElement("div");e.style.cssText="height:10000px;width:1px;",document.body.appendChild(e);var t=document.body.scrollTop;document.documentElement.scrollTop,window.scrollBy(0,3),K=document.body.scrollTop!=t?document.body:document.documentElement,window.scrollBy(0,-3),document.body.removeChild(e);}return K;});function U(e){var t,o;return(e*=a.pulseScale)<1?t=e-(1-Math.exp(-e)):(e-=1,t=(o=Math.exp(-1))+(1-Math.exp(-e))*(1-o)),t*a.pulseNormalize;}function V(e){return e>=1?1:e<=0?0:(1==a.pulseNormalize&&(a.pulseNormalize/=U(1)),U(e));}var F=window.navigator.userAgent,I=/Edge/.test(F),_=/chrome/i.test(F)&&!I,W=/safari/i.test(F)&&!I,G=/mobile/i.test(F),J=/Windows NT 6.1/i.test(F)&&/rv:11/i.test(F),Q=W&&(/Version\/8/i.test(F)||/Version\/9/i.test(F)),Z=(_||W||J)&&!G,ee=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){ee=!0;}}));}catch(e){}var te=!!ee&&{passive:!1},oe="onwheel"in document.createElement("div")?"wheel":"mousewheel";function re(e){for(var t in e)n.hasOwnProperty(t)&&(a[t]=e[t]);}oe&&Z&&(N(oe,y,te),N("mousedown",g),N("load",m)),re.destroy=function(){t&&t.disconnect(),O(oe,y),O("mousedown",g),O("keydown",b),O("resize",o),O("load",m);},window.SmoothScrollOptions&&re(window.SmoothScrollOptions),"function"==typeof define&&define.amd?define(function(){return re;}):"object"==typeof exports?module.exports=re:window.SmoothScroll=re;}();