/** 
 * Kendo UI v2016.3.1118 (http://www.telerik.com/kendo-ui)                                                                                                                                              
 * Copyright 2016 Telerik AD. All rights reserved.                                                                                                                                                      
 *                                                                                                                                                                                                      
 * Kendo UI commercial licenses may be obtained at                                                                                                                                                      
 * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete                                                                                                                                  
 * If you do not own a commercial license, this file shall be governed by the trial license terms.                                                                                                      
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       

*/
!function(e,define){define("kendo.userevents.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(e,t){var n=e.x.location,i=e.y.location,o=t.x.location,r=t.y.location,s=n-o,a=i-r;return{center:{x:(n+o)/2,y:(i+r)/2},distance:Math.sqrt(s*s+a*a)}}function i(e){var t,n,i,o=[],r=e.originalEvent,a=e.currentTarget,c=0;if(e.api)o.push({id:2,event:e,target:e.target,currentTarget:e.target,location:e,type:"api"});else if(e.type.match(/touch/))for(n=r?r.changedTouches:[],t=n.length;c<t;c++)i=n[c],o.push({location:i,event:e,target:i.target,currentTarget:a,id:i.identifier,type:"touch"});else o.push(s.pointers||s.msPointers?{location:r,event:e,target:e.target,currentTarget:a,id:r.pointerId,type:"pointer"}:{id:1,event:e,target:e.target,currentTarget:a,location:e,type:"mouse"});return o}function o(e){for(var t=r.eventMap.up.split(" "),n=0,i=t.length;n<i;n++)e(t[n])}var r=window.kendo,s=r.support,a=r.Class,c=r.Observable,u=e.now,h=e.extend,l=s.mobileOS,p=l&&l.android,d=800,f=s.browser.msie?5:0,v="press",g="hold",m="select",_="start",T="move",y="end",x="cancel",M="tap",w="release",E="gesturestart",k="gesturechange",D="gestureend",C="gesturetap",b={api:0,touch:0,mouse:9,pointer:9},A=!s.touch||s.mouseAndTouchPresent,I=a.extend({init:function(e,t){var n=this;n.axis=e,n._updateLocationData(t),n.startLocation=n.location,n.velocity=n.delta=0,n.timeStamp=u()},move:function(e){var t=this,n=e["page"+t.axis],i=u(),o=i-t.timeStamp||1;!n&&p||(t.delta=n-t.location,t._updateLocationData(e),t.initialDelta=n-t.startLocation,t.velocity=t.delta/o,t.timeStamp=i)},_updateLocationData:function(e){var t=this,n=t.axis;t.location=e["page"+n],t.client=e["client"+n],t.screen=e["screen"+n]}}),S=a.extend({init:function(e,t,n){h(this,{x:new I("X",n.location),y:new I("Y",n.location),type:n.type,useClickAsTap:e.useClickAsTap,threshold:e.threshold||b[n.type],userEvents:e,target:t,currentTarget:n.currentTarget,initialTouch:n.target,id:n.id,pressEvent:n,_moved:!1,_finished:!1})},press:function(){this._holdTimeout=setTimeout(e.proxy(this,"_hold"),this.userEvents.minHold),this._trigger(v,this.pressEvent)},_hold:function(){this._trigger(g,this.pressEvent)},move:function(e){var t=this;if(!t._finished){if(t.x.move(e.location),t.y.move(e.location),!t._moved){if(t._withinIgnoreThreshold())return;if(P.current&&P.current!==t.userEvents)return t.dispose();t._start(e)}t._finished||t._trigger(T,e)}},end:function(e){this.endTime=u(),this._finished||(this._finished=!0,this._trigger(w,e),this._moved?this._trigger(y,e):this.useClickAsTap||this._trigger(M,e),clearTimeout(this._holdTimeout),this.dispose())},dispose:function(){var t=this.userEvents,n=t.touches;this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout),n.splice(e.inArray(this,n),1)},skip:function(){this.dispose()},cancel:function(){this.dispose()},isMoved:function(){return this._moved},_start:function(e){clearTimeout(this._holdTimeout),this.startTime=u(),this._moved=!0,this._trigger(_,e)},_trigger:function(e,t){var n=this,i=t.event,o={touch:n,x:n.x,y:n.y,target:n.target,event:i};n.userEvents.notify(e,o)&&i.preventDefault()},_withinIgnoreThreshold:function(){var e=this.x.initialDelta,t=this.y.initialDelta;return Math.sqrt(e*e+t*t)<=this.threshold}}),P=c.extend({init:function(t,n){var i,a,u,l=this,p=r.guid();n=n||{},i=l.filter=n.filter,l.threshold=n.threshold||f,l.minHold=n.minHold||d,l.touches=[],l._maxTouches=n.multiTouch?2:1,l.allowSelection=n.allowSelection,l.captureUpIfMoved=n.captureUpIfMoved,l.useClickAsTap=!n.fastTap&&!s.delayedClick(),l.eventNS=p,t=e(t).handler(l),c.fn.init.call(l),h(l,{element:t,surface:e(n.global&&A?t[0].ownerDocument.documentElement:n.surface||t),stopPropagation:n.stopPropagation,pressed:!1}),l.surface.handler(l).on(r.applyEventMap("move",p),"_move").on(r.applyEventMap("up cancel",p),"_end"),t.on(r.applyEventMap("down",p),i,"_start"),l.useClickAsTap&&t.on(r.applyEventMap("click",p),i,"_click"),(s.pointers||s.msPointers)&&(s.browser.version<11?t.css("-ms-touch-action","pinch-zoom double-tap-zoom"):t.css("touch-action",n.touchAction||"none")),n.preventDragEvent&&t.on(r.applyEventMap("dragstart",p),r.preventDefault),t.on(r.applyEventMap("mousedown",p),i,{root:t},"_select"),l.captureUpIfMoved&&s.eventCapture&&(a=l.surface[0],u=e.proxy(l.preventIfMoving,l),o(function(e){a.addEventListener(e,u,!0)})),l.bind([v,g,M,_,T,y,w,x,E,k,D,C,m],n)},preventIfMoving:function(e){this._isMoved()&&e.preventDefault()},destroy:function(){var e,t=this;t._destroyed||(t._destroyed=!0,t.captureUpIfMoved&&s.eventCapture&&(e=t.surface[0],o(function(n){e.removeEventListener(n,t.preventIfMoving)})),t.element.kendoDestroy(t.eventNS),t.surface.kendoDestroy(t.eventNS),t.element.removeData("handler"),t.surface.removeData("handler"),t._disposeAll(),t.unbind(),delete t.surface,delete t.element,delete t.currentTarget)},capture:function(){P.current=this},cancel:function(){this._disposeAll(),this.trigger(x)},notify:function(e,t){var i=this,o=i.touches;if(this._isMultiTouch()){switch(e){case T:e=k;break;case y:e=D;break;case M:e=C}h(t,{touches:o},n(o[0],o[1]))}return this.trigger(e,h(t,{type:e}))},press:function(e,t,n){this._apiCall("_start",e,t,n)},move:function(e,t){this._apiCall("_move",e,t)},end:function(e,t){this._apiCall("_end",e,t)},_isMultiTouch:function(){return this.touches.length>1},_maxTouchesReached:function(){return this.touches.length>=this._maxTouches},_disposeAll:function(){for(var e=this.touches;e.length>0;)e.pop().dispose()},_isMoved:function(){return e.grep(this.touches,function(e){return e.isMoved()}).length},_select:function(e){this.allowSelection&&!this.trigger(m,{event:e})||e.preventDefault()},_start:function(t){var n,o,r=this,s=0,a=r.filter,c=i(t),u=c.length,h=t.which;if(!(h&&h>1||r._maxTouchesReached()))for(P.current=null,r.currentTarget=t.currentTarget,r.stopPropagation&&t.stopPropagation();s<u&&!r._maxTouchesReached();s++)o=c[s],n=a?e(o.currentTarget):r.element,n.length&&(o=new S(r,n,o),r.touches.push(o),o.press(),r._isMultiTouch()&&r.notify("gesturestart",{}))},_move:function(e){this._eachTouch("move",e)},_end:function(e){this._eachTouch("end",e)},_click:function(t){var n={touch:{initialTouch:t.target,target:e(t.currentTarget),endTime:u(),x:{location:t.pageX,client:t.clientX},y:{location:t.pageY,client:t.clientY}},x:t.pageX,y:t.pageY,target:e(t.currentTarget),event:t,type:"tap"};this.trigger("tap",n)&&t.preventDefault()},_eachTouch:function(e,t){var n,o,r,s,a=this,c={},u=i(t),h=a.touches;for(n=0;n<h.length;n++)o=h[n],c[o.id]=o;for(n=0;n<u.length;n++)r=u[n],s=c[r.id],s&&s[e](r)},_apiCall:function(t,n,i,o){this[t]({api:!0,pageX:n,pageY:i,clientX:n,clientY:i,target:e(o||this.element)[0],stopPropagation:e.noop,preventDefault:e.noop})}});P.defaultThreshold=function(e){f=e},P.minHold=function(e){d=e},r.getTouches=i,r.touchDelta=n,r.UserEvents=P}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()});
//# sourceMappingURL=kendo.userevents.min.js.map
