!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).window=e.window||{})}(this,function(e){"use strict";function _defineProperties(e,t){for(var r=0;rMath.abs(l)?s:l)/(1-t),u=-c*t;return 0=t.start&&r<=t.end)return void(l&&(t.trig.progress+=t.trig.direction<0?.001:-.001,t.trig.update(0,0,1),l.resetTo("y",parseFloat(d.y),-w,!0),S&&l.progress(1)));r>t.end&&(a+=t.distance),n-=t.distance}o=h+a+m*((P.utils.clamp(e.start,e.end,r)-e.start-a)/(n-e.start)-c)}o=function _round(e){return Math.round(1e5*e)/1e5||0}(o+u),p.length&&!s&&p.forEach(function(e){return e(o-a)}),l?(l.resetTo("y",o,-w,!0),S&&l.progress(1)):(d.y=o+"px",d.renderTransform(1))}}})),P.core.getCache(i.trigger).stRevert=va,i.startY=h,i.pins=g,i.markers=p,i.ratio=o,i.autoSpeed=s,r.style.willChange="transform"),i}var r,v,t,n,b,i,a,s,l,c,u,f,h=F.getScrollFunc(R),d=1===F.isTouch?!0===e.smoothTouch?.8:parseFloat(e.smoothTouch)||0:0===e.smooth||!1===e.smooth?0:parseFloat(e.smooth)||.8,g=0,w=0,S=1,p=e.onUpdate,m=e.onStop,T=U(0),x={y:0};function refreshHeight(){return t=r.clientHeight,r.style.overflow="visible",H.style.height=t+"px",t-R.innerHeight}F.addEventListener("refresh",ta),P.delayedCall(.5,function(){return S=0}),this.scrollTop=pa,this.scrollTo=function(e,t,r){var n=P.utils.clamp(0,F.maxScroll(R),isNaN(e)?o.offset(e,r):+e);t?l?P.to(o,{duration:d,scrollTop:n,overwrite:"auto",ease:I}):h(n):pa(n)},this.offset=function(e,t){e=M(e)[0];var r,n=P.getProperty(e,"y"),o=F.create({trigger:e,start:t||"top top"});return b&&sa([o]),r=o.start,o.kill(!1),P.set(e,{y:n}),r},this.content=function(e){return arguments.length?(r=M(e||"#smooth-content")[0]||H.children[0],s=r.getAttribute("style")||"",P.set(r,{overflow:"visible",width:"100%"}),this):r},this.wrapper=function(e){return arguments.length?(v=M(e||"#smooth-wrapper")[0]||function _wrap(e){var t=_.createElement("div");return t.classList.add("ScrollSmoother-wrapper"),e.parentNode.insertBefore(t,e),t.appendChild(e),t}(r),a=v.getAttribute("style")||"",refreshHeight(),P.set(v,d?{overflow:"hidden",position:"fixed",height:"100%",width:"100%",top:0,left:0,right:0,bottom:0}:{overflow:"visible",position:"relative",width:"100%",height:"auto",top:"auto",bottom:"auto",left:"auto",right:"auto"}),this):v},this.effects=function(e,t){if(b=b||[],!e)return b.slice(0);(e=M(e)).forEach(function(e){for(var t=b.length;t--;)b[t].trigger===e&&(b[t].kill(),b.splice(t,1))});t=t||{};var r,n,o=t.speed,i=t.lag,a=[];for(r=0;r