text: var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";var t=document.documentElement,e=_gsScope,s=function(s,i){var o="x"===i?"Width":"Height",n="scroll"+o,l="client"+o,h=document.body;return s===e||s===t||s===h?Math.max(t[n],h[n])-(e["inner"+o]||t[l]||h[l]):s[n]-s["offset"+o]},i=function(t){return"string"==typeof t&&(t=TweenLite.selector(t)),t.length&&t!==e&&t[0]&&t[0].style&&!t.nodeType&&(t=t[0]),t===e||t.nodeType&&t.style?t:null},o=function(s,i){var o="scroll"+("x"===i?"Left":"Top");return s===e&&(null!=s.pageXOffset?o="page"+i.toUpperCase()+"Offset":s=null!=t[o]?t:document.body),function(){return s[o]}},n=function(s,n){var l=i(s).getBoundingClientRect(),h=!n||n===e||n===document.body,r=(h?t:n).getBoundingClientRect(),u={x:l.left-r.left,y:l.top-r.top};return!h&&n&&(u.x+=o(n,"x")(),u.y+=o(n,"y")()),u},l=function(t,e,i){var o=typeof t;return"number"===o||"string"===o&&"="===t.charAt(1)?t:"max"===t?s(e,i):Math.min(s(e,i),n(t,e)[i])},h=_gsScope._gsDefine.plugin({propName:"scrollTo",API:2,global:!0,version:"1.8.1",init:function(t,s,i){return this._wdw=t===e,this._target=t,this._tween=i,"object"!=typeof s?(s={y:s},"string"==typeof s.y&&"max"!==s.y&&"="!==s.y.charAt(1)&&(s.x=s.y)):s.nodeType&&(s={y:s,x:s}),this.vars=s,this._autoKill=!1!==s.autoKill,this.getX=o(t,"x"),this.getY=o(t,"y"),this.x=this.xPrev=this.getX(),this.y=this.yPrev=this.getY(),null!=s.x?(this._addTween(this,"x",this.x,l(s.x,t,"x")-(s.offsetX||0),"scrollTo_x",!0),this._overwriteProps.push("scrollTo_x")):this.skipX=!0,null!=s.y?(this._addTween(this,"y",this.y,l(s.y,t,"y")-(s.offsetY||0),"scrollTo_y",!0),this._overwriteProps.push("scrollTo_y")):this.skipY=!0,!0},set:function(t){this._super.setRatio.call(this,t);var i=this._wdw||!this.skipX?this.getX():this.xPrev,o=this._wdw||!this.skipY?this.getY():this.yPrev,n=o-this.yPrev,l=i-this.xPrev,r=h.autoKillThreshold;this.x<0&&(this.x=0),this.y<0&&(this.y=0),this._autoKill&&(!this.skipX&&(l>r||-r>l)&&i<s(this._target,"x")&&(this.skipX=!0),!this.skipY&&(n>r||-r>n)&&o<s(this._target,"y")&&(this.skipY=!0),this.skipX&&this.skipY&&(this._tween.kill(),this.vars.onAutoKill&&this.vars.onAutoKill.apply(this.vars.onAutoKillScope||this._tween,this.vars.onAutoKillParams||[]))),this._wdw?e.scrollTo(this.skipX?i:this.x,this.skipY?o:this.y):(this.skipY||(this._target.scrollTop=this.y),this.skipX||(this._target.scrollLeft=this.x)),this.xPrev=this.x,this.yPrev=this.y}}),r=h.prototype;h.max=s,h.getOffset=n,h.autoKillThreshold=7,r._kill=function(t){return t.scrollTo_x&&(this.skipX=!0),t.scrollTo_y&&(this.skipY=!0),this._super._kill.call(this,t)}}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(t){"use strict";var e=function(){return(_gsScope.GreenSockGlobals||_gsScope).ScrollToPlugin};"function"==typeof define&&define.amd?define(["TweenLite"],e):"undefined"!=typeof module&&module.exports&&(require("../TweenLite.js"),module.exports=e())}();