YUI.add("node-flick",function(c,t){var i="host",h="boundingBox",u="bounce",s="duration",e="easing",n=c.ClassNameManager.getClassName;function r(t){r.superclass.constructor.apply(this,arguments)}r.ATTRS={deceleration:{value:.98},bounce:{value:.7},bounceDistance:{value:150},minVelocity:{value:0},minDistance:{value:10},boundingBox:{valueFn:function(){return this.get(i).get("parentNode")}},step:{value:10},duration:{value:null},easing:{value:null}},r.NAME="pluginFlick",c.extend(r,c.Plugin.Base,{initializer:function(t){this._node=this.get(i),this._renderClasses(),this.setBounds(),this._node.on("flick",c.bind(this._onFlick,this),{minDistance:this.get("minDistance"),minVelocity:this.get("minVelocity")})},setBounds:function(){var t=this.get(h),i=this._node,s=t.get("offsetHeight"),t=t.get("offsetWidth"),e=i.get("scrollHeight"),n=i.get("scrollWidth");s<e&&(this._maxY=e-s,this._minY=0,this._scrollY=!0),t<n&&(this._maxX=n-t,this._minX=0,this._scrollX=!0),this._x=this._y=0,i.set("top",this._y+"px"),i.set("left",this._x+"px")},_renderClasses:function(){this.get(h).addClass(r.CLASS_NAMES.box),this._node.addClass(r.CLASS_NAMES.content)},_onFlick:function(t){this._v=t.flick.velocity,this._flick=!0,this._flickAnim()},_flickAnim:function(){var t=this._y,i=this._x,s=this._maxY,e=this._minY,n=this._maxX,h=this._minX,l=this._v,o=this.get("step"),_=this.get("deceleration"),a=this.get(u);this._v=l*_,this._snapToEdge=!1,this._scrollX&&(i-=l*o),this._scrollY&&(t-=l*o),Math.abs(l).toFixed(4)<=r.VELOCITY_THRESHOLD?(this._flick=!1,this._killTimer(!(this._exceededYBoundary||this._exceededXBoundary)),this._scrollX&&(i<h?(this._snapToEdge=!0,this._setX(h)):n<i&&(this._snapToEdge=!0,this._setX(n))),this._scrollY&&(t<e?(this._snapToEdge=!0,this._setY(e)):s<t&&(this._snapToEdge=!0,this._setY(s)))):(this._scrollX&&(i<h||n<i)&&(this._exceededXBoundary=!0,this._v*=a),this._scrollY&&(t<e||s<t)&&(this._exceededYBoundary=!0,this._v*=a),this._scrollX&&this._setX(i),this._scrollY&&this._setY(t),this._flickTimer=c.later(o,this,this._flickAnim))},_setX:function(t){this._move(t,null,this.get(s),this.get(e))},_setY:function(t){this._move(null,t,this.get(s),this.get(e))},_move:function(t,i,s,e){t=null!==t?this._bounce(t):this._x,i=null!==i?this._bounce(i):this._y,s=s||this._snapToEdge?r.SNAP_DURATION:0,e=e||this._snapToEdge?r.SNAP_EASING:r.EASING,this._x=t,this._y=i,this._anim(t,i,s,e)},_anim:function(t,i,s,e){t*=-1,i*=-1,s={duration:s/1e3,easing:e};c.Transition.useNative?s.transform="translate("+t+"px,"+i+"px)":(s.left=t+"px",s.top=i+"px"),this._node.transition(s)},_bounce:function(t,i){var s=this.get(u),e=this.get("bounceDistance"),n=s?-e:0;return i=s?i+e:i,s||(t<n?t=n:i<t&&(t=i)),t},_killTimer:function(){this._flickTimer&&this._flickTimer.cancel()}},{VELOCITY_THRESHOLD:.015,SNAP_DURATION:400,EASING:"cubic-bezier(0, 0.1, 0, 1.0)",SNAP_EASING:"ease-out",CLASS_NAMES:{box:n(r.NS="flick"),content:n(r.NS,"content")}}),c.Plugin.Flick=r},"patched-v3.18.7",{requires:["classnamemanager","transition","event-flick","plugin"],skinnable:!0});