text: /*! touchme 05-01-2016 */
  (function(){"use strict";var a=this,b=this.document||{},c=this.CustomEvent;("undefined"==typeof c||"object"==typeof c)&&(c=function(){function c(a,c){c=c||{bubbles:!1,cancelable:!1,detail:void 0};var d=b.createEvent("CustomEvent");return d.initCustomEvent(a,c.bubbles,c.cancelable,c.detail),d}return c.prototype=a.Event.prototype,c}());var d=function(d){var e="ontouchstart"in a;console.log("test");var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t=!1,u=0,v={swipeThreshold:80,tapThreshold:150,pinchResolution:15,holdThreshold:550,precision:45,onlyTouch:!1,onlyTap:!1,swipeOnlyTouch:!1,nTap:!1};if(d)for(var w in d)d.hasOwnProperty(w)&&v.hasOwnProperty(w)&&(v[w]=d[w]);var x=function(){return h>=j-v.precision&&h<=j+v.precision&&i>=k-v.precision&&i<=k+v.precision},y=function(a,b,c){for(var d=b.split(" "),e=d.length;e--;)v.onlyTouch&&d[e].match(/mouse/)||a.addEventListener(d[e],c,!1)},z=function(a){return a.targetTouches?a.targetTouches[0]:a},A=function(a){var b=!1;return a.targetTouches&&a.targetTouches[0]&&a.targetTouches[1]&&(b=!0),b},B=function(a){for(var b={},c=a.targetTouches,d=0;d<c.length;d++){var e="touch"+d;b[e]={x:c[d].pageX,y:c[d].pageY,id:c[d].identifier}}return b},C=function(a){var b,c=a.touch0.x,d=a.touch1.x,e=a.touch0.y,f=a.touch1.y;return b={x:(c+d)/2,y:(e+f)/2}},D=function(a,b,c,d){return Math.sqrt(Math.pow(b-a,2)+Math.pow(d-c,2))},E=function(a,b){var c=D(a.touch0.x,b.touch0.x,a.touch0.y,b.touch0.y),d=D(a.touch1.x,b.touch1.x,a.touch1.y,b.touch1.y),e=!1;return(c>v.pinchResolution||d>v.pinchResolution)&&(e=!0),e},F=function(a,b,d){d=d||{x:h,y:i};var e=new c(b,{bubbles:!0,cancelable:!0});for(var f in d)d.hasOwnProperty(f)&&(e[f]=d[f]);a.dispatchEvent(e)};v.onlyTouch&&(e=!0),y(b,e?"mousedown touchstart":"mousedown",function(a){t=!0,u+=1;var b=z(a);j=h=b.pageX,k=i=b.pageY,clearTimeout(f),v.onlyTap?F(a.target,"tap",{taps:u,x:h,y:i}):(f=setTimeout(function(){if(x()&&!t){var b=u>=2?"dbltap":"tap";v.ntap&&(b=u>=3?"ntap":b),F(a.target,b,{taps:u,x:h,y:i}),u=0}else x()||(u=0)},v.tapThreshold),clearTimeout(g),m||(g=setTimeout(function(){x()&&t&&(m=!0,p=setInterval(function(){q=h,r=i},50),l=a,n=l.pageX,o=l.pageY,F(l.target,"hold",{x:h,y:i}),u=0)},v.holdThreshold))),A(a)&&(s=B(a),s.distance=D(s.touch0.x,s.touch1.x,s.touch0.y,s.touch1.y))}),y(b,e?"mousemove touchmove":"mousemove",function(a){var b=z(a);if(h=b.pageX,i=b.pageY,m&&F(l.target,"drag",{x:h,y:i}),A(a)){var c={};c.touchPoints=B(a),c.distance=D(c.touchPoints.touch0.x,c.touchPoints.touch1.x,c.touchPoints.touch0.y,c.touchPoints.touch1.y),c.midPoint=C(c.touchPoints),c.initialPinch=s,E(c.initialPinch,c.touchPoints)&&(F(a.target,"pinch",c),s=c.touchPoints,s.distance=c.distance)}}),y(b,e?"mouseup touchend":"mouseup",function(){t=!1,s&&(s=void 0),m&&(m=!1,clearInterval(p),F(l.target,"holdrelease",{originalX:n,originalY:o,lastX:q,lastY:r}))});var G=e?"mouseup touchend":"mouseup";return G=v.swipeOnlyTouch?"touchend":G,y(b,G,function(a){t=!1;var b=[],c=j-h,d=k-i,e=Math.atan2(i-k,h-j);0>e&&(e+=2*Math.PI),(c<=v.swipeThreshold||d<=v.swipeThreshold)&&b.push("swipe"),c<=-v.swipeThreshold&&b.push("swiperight"),c>=v.swipeThreshold&&b.push("swipeleft"),d>=v.swipeThreshold&&b.push("swipeup"),d<=-v.swipeThreshold&&b.push("swipedown");for(var f=b.length;f--;)F(a.target,b[f],{distance:{x:Math.abs(c),y:Math.abs(d)},direction:{radians:e,degrees:e*(180/Math.PI)}})}),e};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=d),exports.touchme=d):a.touchme=d,d.VERSION="0.1.0"}).call(this);