//>>built
define("dojox/mobile/app/_event",["dojo","dijit","dojox"],function(b,r,c){b.provide("dojox.mobile.app._event");b.experimental("dojox.mobile.app._event.js");b.mixin(c.mobile.app,{eventMap:{},connectFlick:function(c,d,e){var f,g,h=!1,i,j,k,l,m,o;b.connect("onmousedown",c,function(a){h=!1;f=a.targetTouches?a.targetTouches[0].clientX:a.clientX;g=a.targetTouches?a.targetTouches[0].clientY:a.clientY;o=(new Date).getTime();k=b.connect(c,"onmousemove",p);l=b.connect(c,"onmouseup",q)});var p=function(a){b.stopEvent(a);
i=a.targetTouches?a.targetTouches[0].clientX:a.clientX;j=a.targetTouches?a.targetTouches[0].clientY:a.clientY;15<Math.abs(Math.abs(i)-Math.abs(f))?(h=!0,m=i>f?"ltr":"rtl"):15<Math.abs(Math.abs(j)-Math.abs(g))&&(h=!0,m=j>g?"ttb":"btt")},q=function(a){b.stopEvent(a);k&&b.disconnect(k);l&&b.disconnect(l);if(h)if(a={target:c,direction:m,duration:(new Date).getTime()-o},d&&e)d[e](a);else e(a)}}});c.mobile.app.isIPhone=b.isSafari&&(-1<navigator.userAgent.indexOf("iPhone")||-1<navigator.userAgent.indexOf("iPod"));
c.mobile.app.isWebOS=-1<navigator.userAgent.indexOf("webOS");c.mobile.app.isAndroid=-1<navigator.userAgent.toLowerCase().indexOf("android");if(c.mobile.app.isIPhone||c.mobile.app.isAndroid)c.mobile.app.eventMap={onmousedown:"ontouchstart",mousedown:"ontouchstart",onmouseup:"ontouchend",mouseup:"ontouchend",onmousemove:"ontouchmove",mousemove:"ontouchmove"};b._oldConnect=b._connect;b._connect=function(n,d,e,f,g){d=c.mobile.app.eventMap[d]||d;if("flick"==d||"onflick"==d)if(b.global.Mojo)d=Mojo.Event.flick;
else return c.mobile.app.connectFlick(n,e,f);return b._oldConnect(n,d,e,f,g)}});