YUI.add("event-flick",function(o,e){var t=o.Event._GESTURE_MAP,h={start:t.start,end:t.end,move:t.move},u="minVelocity",f="minDistance",r="preventDefault",d="_fs",c="_fsh",l="_feh",_="_fmh";o.Event.define("flick",{on:function(e,t,n){n=e.on(h.start,this._onStart,this,e,t,n);t[c]=n},detach:function(e,t,n){var i=t[c],a=t[l];i&&(i.detach(),t[c]=null),a&&(a.detach(),t[l]=null)},processArgs:function(e){e=3<e.length?o.merge(e.splice(3,1)[0]):{};return u in e||(e[u]=this.MIN_VELOCITY),f in e||(e[f]=this.MIN_DISTANCE),r in e||(e[r]=this.PREVENT_DEFAULT),e},_onStart:function(e,t,n,i){var a=!0,c=n._extra.preventDefault,s=e;e.touches&&(a=1===e.touches.length,e=e.touches[0]),a&&(!c||c.call&&!c(e)||s.preventDefault(),e.flick={time:(new Date).getTime()},n[d]=e,a=n[l],c=9===t.get("nodeType")?t:t.get("ownerDocument"),a||(a=c.on(h.end,o.bind(this._onEnd,this),null,t,n,i),n[l]=a),n[_]=c.once(h.move,o.bind(this._onMove,this),null,t,n,i))},_onMove:function(e,t,n,i){n=n[d];n&&n.flick&&(n.flick.time=(new Date).getTime())},_onEnd:function(e,t,n,i){(new Date).getTime();var a,c,s=n[d],o=!!s,h=e,l=n[_];l&&(l.detach(),delete n[_]),o&&(e.changedTouches&&(1===e.changedTouches.length&&0===e.touches.length?h=e.changedTouches[0]:o=!1),o&&(!(o=(l=n._extra)[r])||o.call&&!o(e)||e.preventDefault(),o=s.flick.time,o=(new Date).getTime()-o,a=(h=[h.pageX-s.pageX,h.pageY-s.pageY])["x"===(h=l.axis||(Math.abs(h[0])>=Math.abs(h[1])?"x":"y"))?0:1],c=0!=o?a/o:0,isFinite(c)&&Math.abs(a)>=l[f]&&Math.abs(c)>=l[u]&&(e.type="flick",e.flick={time:o,distance:a,velocity:c,axis:h,start:s},i.fire(e)),n[d]=null))},MIN_VELOCITY:0,MIN_DISTANCE:0,PREVENT_DEFAULT:!1})},"patched-v3.18.3",{requires:["node-base","event-touch","event-synthetic"]});