!function(t,e,i,n){"use strict";function r(t,e,i){return settimeout(u(t,i),e)}function s(t,e,i){return!!array.isarray(t)&&(o(t,i[e],i),!0)}function o(t,e,i){var r;if(t)if(t.foreach)t.foreach(e,i);else if(t.length!==n)for(r=0;r\s*\(/gm,"{anonymous}()@"):"unknown stack trace",s=t.console&&(t.console.warn||t.console.log);return s&&s.call(t.console,r,n),e.apply(this,arguments)}}function h(t,e,i){var n,r=e.prototype;n=t.prototype=object.create(r),n.constructor=t,n._super=r,i&&ct(n,i)}function u(t,e){return function(){return t.apply(e,arguments)}}function c(t,e){return typeof t==ft?t.apply(e?e[0]||n:n,e):t}function l(t,e){return t===n?e:t}function p(t,e,i){o(m(e),function(e){t.addeventlistener(e,i,!1)})}function f(t,e,i){o(m(e),function(e){t.removeeventlistener(e,i,!1)})}function d(t,e){for(;t;){if(t==e)return!0;t=t.parentnode}return!1}function v(t,e){return t.indexof(e)>-1}function m(t){return t.trim().split(/\s+/g)}function g(t,e,i){if(t.indexof&&!i)return t.indexof(e);for(var n=0;ni[e]}):n.sort()),n}function e(t,e){for(var i,r,s=e[0].touppercase()+e.slice(1),o=0;o1&&!i.firstmultiple?i.firstmultiple=x(e):1===r&&(i.firstmultiple=!1);var s=i.firstinput,o=i.firstmultiple,a=o?o.center:s.center,h=e.center=c(n);e.timestamp=mt(),e.deltatime=e.timestamp-s.timestamp,e.angle=z(a,h),e.distance=m(a,h),s(i,e),e.offsetdirection=r(e.deltax,e.deltay);var u=o(e.deltatime,e.deltax,e.deltay);e.overallvelocityx=u.x,e.overallvelocityy=u.y,e.overallvelocity=vt(u.x)>vt(u.y)?u.x:u.y,e.scale=o?x(o.pointers,n):1,e.rotation=o?n(o.pointers,n):0,e.maxpointers=i.previnput?e.pointers.length>i.previnput.maxpointers?e.pointers.length:i.previnput.maxpointers:e.pointers.length,w(i,e);var c=t.element;d(e.srcevent.target,c)&&(c=e.srcevent.target),e.target=c}function s(t,e){var i=e.center,n=t.offsetdelta||{},r=t.prevdelta||{},s=t.previnput||{};e.eventtype!==dt&&s.eventtype!==st||(r=t.prevdelta={x:s.deltax||0,y:s.deltay||0},n=t.offsetdelta={x:i.x,y:i.y}),e.deltax=r.x+(i.x-n.x),e.deltay=r.y+(i.y-n.y)}function w(t,e){var i,r,s,o,a=t.lastinterval||e,h=e.timestamp-a.timestamp;if(e.eventtype!=wt&&(h>bt||a.velocity===n)){var u=e.deltax-a.deltax,c=e.deltay-a.deltay,l=o(h,u,c);r=l.x,s=l.y,i=vt(l.x)>vt(l.y)?l.x:l.y,o=r(u,c),t.lastinterval=e}else i=a.velocity,r=a.velocityx,s=a.velocityy,o=a.direction;e.velocity=i,e.velocityx=r,e.velocityy=s,e.direction=o}function x(t){for(var e=[],i=0;i=vt(e)?t<0?ct:ot:e<0?rt:mt}function m(t,e,i){i||(i=yt);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return math.sqrt(n*n+r*r)}function z(t,e,i){i||(i=yt);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return 180*math.atan2(r,n)/math.pi}function n(t,e){return z(e[1],e[0],ft)+z(t[1],t[0],ft)}function x(t,e){return m(e[0],e[1],ft)/m(t[0],t[1],ft)}function y(){this.evel=qt,this.evwin=kt,this.pressed=!1,_.apply(this,arguments)}function f(){this.evel=ut,this.evwin=vt,_.apply(this,arguments),this.store=this.manager.session.pointerevents=[]}function w(){this.evtarget=gt,this.evwin=zt,this.started=!1,_.apply(this,arguments)}function q(t,e){var i=t(t.touches),n=t(t.changedtouches);return e&(st|wt)&&(i=y(i.concat(n),"identifier",!0)),[i,n]}function k(){this.evtarget=$t,this.targetids={},_.apply(this,arguments)}function h(t,e){var i=t(t.touches),n=this.targetids;if(e&(dt|pt)&&1===i.length)return n[i[0].identifier]=!0,[i,i];var r,s,o=t(t.changedtouches),a=[],h=this.target;if(s=i.filter(function(t){return d(t.target,h)}),e===dt)for(r=0;r-1&&n.splice(t,1)};settimeout(r,jt)}}function j(t){for(var e=t.srcevent.clientx,i=t.srcevent.clienty,n=0;n-1&&this.requirefail.splice(e,1),this},hasrequirefailures:function(){return this.requirefail.length>0},canrecognizewith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(e,t)}var i=this,n=this.state;n=ue&&e(i.options.event+$(n))},tryemit:function(t){if(this.canemit())return this.emit(t);this.state=32},canemit:function(){for(var t=0;te.threshold&&r&e.direction},attrtest:function(t){return q.prototype.attrtest.call(this,t)&&(this.state&ae||!(this.state&ae)&&this.directiontest(t))},emit:function(t){this.px=t.deltax,this.py=t.deltay;var e=j(t.direction);e&&(t.additionalevent=this.options.event+e),this._super.emit.call(this,t)}}),h(et,q,{defaults:{event:"pinch",threshold:0,pointers:2},gettouchaction:function(){return[ne]},attrtest:function(t){return this._super.attrtest.call(this,t)&&(math.abs(t.scale-1)>this.options.threshold||this.state&ae)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalevent=this.options.event+e}this._super.emit.call(this,t)}}),h(it,b,{defaults:{event:"press",pointers:1,time:251,threshold:9},gettouchaction:function(){return[ee]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distancee.time;if(this._input=t,!n||!i||t.eventtype&(st|wt)&&!s)this.reset();else if(t.eventtype&dt)this.reset(),this._timer=r(function(){this.state=ce,this.tryemit()},e.time,this);else if(t.eventtype&st)return ce;return 32},reset:function(){cleartimeout(this._timer)},emit:function(t){this.state===ce&&(t&&t.eventtype&st?this.manager.emit(this.options.event+"up",t):(this._input.timestamp=mt(),this.manager.emit(this.options.event,this._input)))}}),h(nt,q,{defaults:{event:"rotate",threshold:0,pointers:2},gettouchaction:function(){return[ne]},attrtest:function(t){return this._super.attrtest.call(this,t)&&(math.abs(t.rotation)>this.options.threshold||this.state&ae)}}),h(rt,q,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:zt|nt,pointers:1},gettouchaction:function(){return tt.prototype.gettouchaction.call(this)},attrtest:function(t){var e,i=this.options.direction;return i&(zt|nt)?e=t.overallvelocity:i&zt?e=t.overallvelocityx:i&nt&&(e=t.overallvelocityy),this._super.attrtest.call(this,t)&&i&t.offsetdirection&&t.distance>this.options.threshold&&t.maxpointers==this.options.pointers&&vt(e)>this.options.velocity&&t.eventtype&st},emit:function(t){var e=j(t.offsetdirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),h(st,b,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posthreshold:10},gettouchaction:function(){return[ie]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance