text: modulex.add("event-dom/gesture/tap",["event-dom/gesture/util","event-dom/base","ua","modulex-util"],function(e,t,a){var i,r=e("event-dom/gesture/util"),n=e("event-dom/base"),o=e("ua"),u=e("modulex-util");i=function(e){function t(e){e.preventDefault()}function a(e){e.singleTapTimer&&(clearTimeout(e.singleTapTimer),e.singleTapTimer=0),e.tapHoldTimer&&(clearTimeout(e.tapHoldTimer),e.tapHoldTimer=0)}function i(){i.superclass.constructor.apply(this,arguments)}e={};var s=r,l=s.addEvent,p=n,m=s.SingleTouch,g=o,d=u,c="singleTap",T="doubleTap",v="hold",f="tap",h=1e3,X=300,Y=5,w=p.Object;return d.extend(i,m,{start:function(e){var t=this;i.superclass.start.call(t,e),a(t);var r=t.lastTouches[0];return t.tapHoldTimer=setTimeout(function(){var a=d.mix({which:1,duration:(d.now()-e.timeStamp)/1e3},t.lastXY);t.tapHoldTimer=0,t.lastXY=0,p.fire(r.target,v,a)},h),t.isStarted=!0,void 0},move:function(){var e,t=this;if(!(e=t.lastXY))return!1;var i=t.lastTouches[0];return!i||Math.abs(i.pageX-e.pageX)>Y||Math.abs(i.pageY-e.pageY)>Y?(a(t),!1):void 0},end:function(e,i){var r,n=this;if(a(n),!i&&(r=n.lastXY)){var o=n.lastTouches[0],u=o.target,s=new w(e.originalEvent);d.mix(s,{type:f,which:1,pageX:r.pageX,pageY:r.pageY,target:u,currentTarget:u}),p.fire(u,f,s),s.isDefaultPrevented()&&g.mobile&&(g.ios?e.preventDefault():p.on(u.ownerDocument||u,"click",{fn:t,once:1}));var l,m=n.lastEndTime,v=e.timeStamp;if(n.lastEndTime=v,m&&(l=v-m,X>l))return n.lastEndTime=0,p.fire(u,T,{pageX:r.pageX,pageY:r.pageY,which:1,duration:l/1e3}),void 0;l=v-n.startTime,l>X?p.fire(u,c,{pageX:r.pageX,pageY:r.pageY,which:1,duration:l/1e3}):n.singleTapTimer=setTimeout(function(){p.fire(u,c,{pageX:r.pageX,pageY:r.pageY,which:1,duration:(d.now()-n.startTime)/1e3})},X)}}}),l([f,T,c,v],{handle:new i}),e={TAP:f,SINGLE_TAP:c,DOUBLE_TAP:T,HOLD:v}}(),a.exports=i});