@egjs/axes
Advanced tools
Comparing version 2.5.2 to 2.5.3
@@ -28,3 +28,3 @@ import { IInputType } from "./inputType/InputType"; | ||
static getDuration(duration: number, min: number, max: number): number; | ||
constructor({options, itm, em, axm}: { | ||
constructor({ options, itm, em, axm }: { | ||
options: any; | ||
@@ -36,3 +36,3 @@ itm: any; | ||
getDuration(depaPos: Axis, destPos: Axis, wishDuration?: number): number; | ||
private createAnimationParam(pos, duration, option?); | ||
private createAnimationParam; | ||
grab(axes: string[], option?: ChangeEventOption): void; | ||
@@ -42,3 +42,3 @@ getEventInfo(): ChangeEventOption; | ||
animationEnd(): void; | ||
private animateLoop(param, complete); | ||
private animateLoop; | ||
getUserControll(param: AnimationParam): { | ||
@@ -49,3 +49,3 @@ destPos: Axis; | ||
animateTo(destPos: Axis, duration: number, option?: ChangeEventOption): void; | ||
private frame(param); | ||
private frame; | ||
easing(p: any): number; | ||
@@ -52,0 +52,0 @@ setTo(pos: Axis, duration?: number): this; |
@@ -1,2 +0,2 @@ | ||
import * as Component from "@egjs/component"; | ||
import Component from "@egjs/component"; | ||
import { AnimationManager } from "./AnimationManager"; | ||
@@ -3,0 +3,0 @@ import { EventManager } from "./EventManager"; |
@@ -16,3 +16,3 @@ import { AxesOption } from "./Axes"; | ||
constructor(axis: any, options: AxesOption); | ||
private _complementOptions(); | ||
private _complementOptions; | ||
getDelta(depaPos: Axis, destPos: Axis): Axis; | ||
@@ -19,0 +19,0 @@ get(axes?: string[] | Axis): Axis; |
@@ -9,4 +9,4 @@ export declare enum DIRECTION { | ||
DIRECTION_VERTICAL = 24, | ||
DIRECTION_ALL = 30, | ||
DIRECTION_ALL = 30 | ||
} | ||
export declare const TRANSFORM: string; |
@@ -18,5 +18,5 @@ import { IInputType } from "./inputType/InputType"; | ||
triggerFinish(isTrusted?: boolean): void; | ||
private createUserControll(pos, duration?); | ||
private createUserControll; | ||
setAnimationManager(am: AnimationManager): void; | ||
destroy(): void; | ||
} |
@@ -12,3 +12,3 @@ import { IInputType, IInputTypeObserver } from "./inputType/InputType"; | ||
private am; | ||
constructor({options, itm, em, axm, am}: { | ||
constructor({ options, itm, em, axm, am }: { | ||
options: any; | ||
@@ -20,3 +20,3 @@ itm: any; | ||
}); | ||
private atOutside(pos); | ||
private atOutside; | ||
get(input: IInputType): Axis; | ||
@@ -23,0 +23,0 @@ hold(input: IInputType, event: any): void; |
@@ -28,6 +28,6 @@ import { IInputType, IInputTypeObserver } from "./InputType"; | ||
destroy(): void; | ||
private onKeydown(e); | ||
private onKeyup(e); | ||
private attachEvent(observer); | ||
private dettachEvent(); | ||
private onKeydown; | ||
private onKeyup; | ||
private attachEvent; | ||
private dettachEvent; | ||
enable(): this; | ||
@@ -34,0 +34,0 @@ disable(): this; |
@@ -29,9 +29,9 @@ import { DIRECTION } from "../const"; | ||
isEnable(): boolean; | ||
private removeRecognizer(); | ||
private onHammerInput(event); | ||
private onPanmove(event); | ||
private onPanend(event); | ||
private attachEvent(observer); | ||
private dettachEvent(); | ||
private getOffset(properties, useDirection); | ||
private removeRecognizer; | ||
private onHammerInput; | ||
private onPanmove; | ||
private onPanend; | ||
private attachEvent; | ||
private dettachEvent; | ||
private getOffset; | ||
} |
@@ -22,9 +22,9 @@ import { IInputType, IInputTypeObserver } from "./InputType"; | ||
destroy(): void; | ||
private removeRecognizer(); | ||
private onPinchStart(event); | ||
private onPinchMove(event); | ||
private onPinchEnd(event); | ||
private getOffset(pinchScale, prev?); | ||
private attachEvent(observer); | ||
private dettachEvent(); | ||
private removeRecognizer; | ||
private onPinchStart; | ||
private onPinchMove; | ||
private onPinchEnd; | ||
private getOffset; | ||
private attachEvent; | ||
private dettachEvent; | ||
enable(): this; | ||
@@ -31,0 +31,0 @@ disable(): this; |
@@ -19,5 +19,5 @@ import { IInputType, IInputTypeObserver } from "./InputType"; | ||
destroy(): void; | ||
private onWheel(event); | ||
private attachEvent(observer); | ||
private dettachEvent(); | ||
private onWheel; | ||
private attachEvent; | ||
private dettachEvent; | ||
enable(): this; | ||
@@ -24,0 +24,0 @@ disable(): this; |
@@ -8,5 +8,5 @@ /*! | ||
* | ||
* @version 2.5.2 | ||
* @version 2.5.3 | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("hammerjs"),require("@egjs/component")):"function"==typeof define&&define.amd?define(["hammerjs","@egjs/component"],e):"object"==typeof exports?exports.Axes=e(require("hammerjs"),require("@egjs/component")):(t.eg=t.eg||{},t.eg.Axes=e(t.Hammer,t.eg.Component))}("undefined"!=typeof self?self:this,function(t,e){return function(t){var e={};function __webpack_require__(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,__webpack_require__),i.l=!0,i.exports}return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=6)}([function(t,e,n){"use strict";function toArray(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}e.__esModule=!0,e.toArray=toArray,e.$=function $(t,e){var n;if(void 0===e&&(e=!1),"string"==typeof t){if(t.match(/^<([a-z]+)\s*([^>]*)>/)){var i=document.createElement("div");i.innerHTML=t,n=toArray(i.childNodes)}else n=toArray(document.querySelectorAll(t));e||(n=n.length>=1?n[0]:undefined)}else t===window?n=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in window&&t instanceof jQuery||t.constructor.prototype.jquery?n=e?t.toArray():t.get(0):Array.isArray(t)&&(n=t.map(function(t){return $(t)}),e||(n=n.length>=1?n[0]:undefined)):n=t;return n};var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame,r=window.cancelAnimationFrame||window.webkitCancelAnimationFrame;if(i&&!r){var s={},o=i;i=function(t){var e=o(function(n){s[e]&&t(n)});return s[e]=!0,e},r=function(t){delete s[t]}}else i&&r||(i=function(t){return window.setTimeout(function(){t(window.performance&&window.performance.now&&window.performance.now()||(new Date).getTime())},16)},r=window.clearTimeout);e.requestAnimationFrame=function(t){return i(t)},e.cancelAnimationFrame=function(t){r(t)}},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(4);e.SUPPORT_POINTER_EVENTS="PointerEvent"in window||"MSPointerEvent"in window,e.SUPPORT_TOUCH="ontouchstart"in window,e.UNIQUEKEY="_EGJS_AXES_INPUTTYPE_",e.toAxis=function(t,e){return e.reduce(function(e,n,i){return t[i]&&(e[t[i]]=n),e},{})},e.createHammer=function(t,e){try{return new r.Manager(t,i({},e))}catch(n){return null}},e.convertInputType=function(t){void 0===t&&(t=[]);var n=!1,i=!1,s=!1;return t.forEach(function(t){switch(t){case"mouse":i=!0;break;case"touch":n=e.SUPPORT_TOUCH;break;case"pointer":s=e.SUPPORT_POINTER_EVENTS}}),s?r.PointerEventInput:n&&i?r.TouchMouseInput:n?r.TouchInput:i?r.MouseInput:null}},function(t,e,n){"use strict";e.__esModule=!0;var i={getInsidePosition:function(t,e,n,i){var r=t,s=[n[0]?e[0]:i?e[0]-i[0]:e[0],n[1]?e[1]:i?e[1]+i[1]:e[1]];return r=Math.max(s[0],r),+(r=Math.min(s[1],r)).toFixed(5)},isOutside:function(t,e){return t<e[0]||t>e[1]},getDuration:function(t,e){var n=Math.sqrt(t/e*2);return n<100?0:n},isCircularable:function(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]},getCirculatedPos:function(t,e,n){var i=t,r=e[0],s=e[1],o=s-r;return n[1]&&t>s&&(i=(i-s)%o+r),n[0]&&t<r&&(i=(i-r)%o+s),+i.toFixed(5)}};e["default"]=i},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(2),s=function(){function AxisManager(t,e){var n=this;this.axis=t,this.options=e,this._complementOptions(),this._pos=Object.keys(this.axis).reduce(function(t,e){return t[e]=n.axis[e].range[0],t},{})}return AxisManager.equal=function(t,e){for(var n in t)if(t[n]!==e[n])return!1;return!0},AxisManager.prototype._complementOptions=function(){var t=this;Object.keys(this.axis).forEach(function(e){t.axis[e]=i({range:[0,100],bounce:[0,0],circular:[!1,!1]},t.axis[e]),["bounce","circular"].forEach(function(n){var i=t.axis,r=i[e][n];/string|number|boolean/.test(typeof r)&&(i[e][n]=[r,r])})})},AxisManager.prototype.getDelta=function(t,e){var n=this.get(t);return this.map(this.get(e),function(t,e){return t-n[e]})},AxisManager.prototype.get=function(t){var e=this;return t&&Array.isArray(t)?t.reduce(function(t,n){return n&&n in e._pos&&(t[n]=e._pos[n]),t},{}):i({},this._pos,t||{})},AxisManager.prototype.moveTo=function(t){var e=this,n=this.map(this._pos,function(n,i){return t[i]?t[i]-e._pos[i]:0});return this.set(t),{pos:i({},this._pos),delta:n}},AxisManager.prototype.set=function(t){for(var e in t)e&&e in this._pos&&(this._pos[e]=t[e])},AxisManager.prototype.every=function(t,e){var n=this.axis;for(var i in t)if(i&&!e(t[i],i,n[i]))return!1;return!0},AxisManager.prototype.filter=function(t,e){var n={},i=this.axis;for(var r in t)r&&e(t[r],r,i[r])&&(n[r]=t[r]);return n},AxisManager.prototype.map=function(t,e){var n={},i=this.axis;for(var r in t)r&&(n[r]=e(t[r],r,i[r]));return n},AxisManager.prototype.isOutside=function(t){return!this.every(t?this.get(t):this._pos,function(t,e,n){return!r["default"].isOutside(t,n.range)})},AxisManager}();e.AxisManager=s},function(e,n){e.exports=t},function(t,e,n){"use strict";var i;e.__esModule=!0,(i=e.DIRECTION||(e.DIRECTION={}))[i.DIRECTION_NONE=1]="DIRECTION_NONE",i[i.DIRECTION_LEFT=2]="DIRECTION_LEFT",i[i.DIRECTION_RIGHT=4]="DIRECTION_RIGHT",i[i.DIRECTION_HORIZONTAL=6]="DIRECTION_HORIZONTAL",i[i.DIRECTION_UP=8]="DIRECTION_UP",i[i.DIRECTION_DOWN=16]="DIRECTION_DOWN",i[i.DIRECTION_VERTICAL=24]="DIRECTION_VERTICAL",i[i.DIRECTION_ALL=30]="DIRECTION_ALL",e.TRANSFORM=function(){for(var t=(document.head||document.getElementsByTagName("head")[0]).style,e=["transform","webkitTransform","msTransform","mozTransform"],n=0,i=e.length;n<i;n++)if(e[n]in t)return e[n];return""}()},function(t,e,n){"use strict";var i=n(7),r=n(13),s=n(14),o=n(15),a=n(16);i["default"].PanInput=r.PanInput,i["default"].PinchInput=s.PinchInput,i["default"].WheelInput=o.WheelInput,i["default"].MoveKeyInput=a.MoveKeyInput,t.exports=i["default"]},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function __(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),s=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var o=n(8),a=n(9),u=n(10),h=n(11),c=n(3),p=n(12),m=n(5),l=function(t){function Axes(e,n,i){void 0===e&&(e={});var r=t.call(this)||this;return r.axis=e,r._inputs=[],r.options=s({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:Infinity,minimumDuration:0,deceleration:6e-4},n),r.itm=new h.InterruptManager(r.options),r.axm=new c.AxisManager(r.axis,r.options),r.em=new u.EventManager(r),r.am=new a.AnimationManager(r),r.io=new p.InputObserver(r),r.em.setAnimationManager(r.am),i&&r.em.triggerChange(i),r}return r(Axes,t),Axes.prototype.connect=function(t,e){var n;if(n="string"==typeof t?t.split(" "):t.concat(),~this._inputs.indexOf(e)&&this.disconnect(e),"hammer"in e){var i=this._inputs.filter(function(t){return t.hammer&&t.element===e.element});i.length&&(e.hammer=i[0].hammer)}return e.mapAxes(n),e.connect(this.io),this._inputs.push(e),this},Axes.prototype.disconnect=function(t){if(t){var e=this._inputs.indexOf(t);e>=0&&(this._inputs[e].disconnect(),this._inputs.splice(e,1))}else this._inputs.forEach(function(t){return t.disconnect()}),this._inputs=[];return this},Axes.prototype.get=function(t){return this.axm.get(t)},Axes.prototype.setTo=function(t,e){return void 0===e&&(e=0),this.am.setTo(t,e),this},Axes.prototype.setBy=function(t,e){return void 0===e&&(e=0),this.am.setBy(t,e),this},Axes.prototype.isBounceArea=function(t){return this.axm.isOutside(t)},Axes.prototype.destroy=function(){this.disconnect(),this.em.destroy()},Axes.VERSION="#__VERSION__#",Axes.TRANSFORM=m.TRANSFORM,Axes.DIRECTION_NONE=m.DIRECTION.DIRECTION_NONE,Axes.DIRECTION_LEFT=m.DIRECTION.DIRECTION_LEFT,Axes.DIRECTION_RIGHT=m.DIRECTION.DIRECTION_RIGHT,Axes.DIRECTION_UP=m.DIRECTION.DIRECTION_UP,Axes.DIRECTION_DOWN=m.DIRECTION.DIRECTION_DOWN,Axes.DIRECTION_HORIZONTAL=m.DIRECTION.DIRECTION_HORIZONTAL,Axes.DIRECTION_VERTICAL=m.DIRECTION.DIRECTION_VERTICAL,Axes.DIRECTION_ALL=m.DIRECTION.DIRECTION_ALL,Axes}(o);e["default"]=l},function(t,n){t.exports=e},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(2),s=n(3),o=n(0),a=function(){function AnimationManager(t){var e=t.options,n=t.itm,i=t.em,r=t.axm;this.options=e,this.itm=n,this.em=i,this.axm=r,this.animationEnd=this.animationEnd.bind(this)}return AnimationManager.getDuration=function(t,e,n){return Math.max(Math.min(t,n),e)},AnimationManager.prototype.getDuration=function(t,e,n){var i,s=this;if(void 0!==n)i=n;else{var o=this.axm.map(e,function(e,n){return r["default"].getDuration(Math.abs(Math.abs(e)-Math.abs(t[n])),s.options.deceleration)});i=Object.keys(o).reduce(function(t,e){return Math.max(t,o[e])},-Infinity)}return AnimationManager.getDuration(i,this.options.minimumDuration,this.options.maximumDuration)},AnimationManager.prototype.createAnimationParam=function(t,e,n){var i=this.axm.get(),r=t,s=n&&n.event||null;return{depaPos:i,destPos:r,duration:AnimationManager.getDuration(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,r),inputEvent:s,input:n&&n.input||null,isTrusted:!!s,done:this.animationEnd}},AnimationManager.prototype.grab=function(t,e){if(this._animateParam&&t.length){var n=this.axm.get(t),i=this.axm.map(n,function(t,e,n){return r["default"].getCirculatedPos(t,n.range,n.circular)});this.axm.every(i,function(t,e){return n[e]===t})||this.em.triggerChange(i,e,!!e),this._animateParam=null,this._raf&&o.cancelAnimationFrame(this._raf),this._raf=null,this.em.triggerAnimationEnd(!(!e||!e.event))}},AnimationManager.prototype.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},AnimationManager.prototype.restore=function(t){var e=this.axm.get(),n=this.axm.map(e,function(t,e,n){return Math.min(n.range[1],Math.max(n.range[0],t))});this.animateTo(n,this.getDuration(e,n),t)},AnimationManager.prototype.animationEnd=function(){var t=this.getEventInfo();this._animateParam=null;var e=this.axm.filter(this.axm.get(),function(t,e,n){return r["default"].isCircularable(t,n.range,n.circular)});Object.keys(e).length>0&&this.setTo(this.axm.map(e,function(t,e,n){return r["default"].getCirculatedPos(t,n.range,n.circular)})),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(!!t),this.axm.isOutside()?this.restore(t):this.em.triggerFinish(!!t)},AnimationManager.prototype.animateLoop=function(t,e){if(this._animateParam=i({},t),this._animateParam.startTime=(new Date).getTime(),t.duration){var n=this._animateParam,r=this;!function loop(){if(r._raf=null,r.frame(n)>=1)return s.AxisManager.equal(t.destPos,r.axm.get(Object.keys(t.destPos)))||r.em.triggerChange(t.destPos),void e();r._raf=o.requestAnimationFrame(loop)}()}else this.em.triggerChange(t.destPos),e()},AnimationManager.prototype.getUserControll=function(t){var e=t.setTo();return e.destPos=this.axm.get(e.destPos),e.duration=AnimationManager.getDuration(e.duration,this.options.minimumDuration,this.options.maximumDuration),e},AnimationManager.prototype.animateTo=function(t,e,n){var o=this,a=this.createAnimationParam(t,e,n),u=i({},a.depaPos),h=this.em.triggerAnimationStart(a),c=this.getUserControll(a);if(!h&&this.axm.every(c.destPos,function(t,e,n){return r["default"].isCircularable(t,n.range,n.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),h&&!s.AxisManager.equal(c.destPos,u)){var p=n&&n.event||null;this.animateLoop({depaPos:u,destPos:c.destPos,duration:c.duration,delta:this.axm.getDelta(u,c.destPos),isTrusted:!!p,inputEvent:p,input:n&&n.input||null},function(){return o.animationEnd()})}},AnimationManager.prototype.frame=function(t){var e=(new Date).getTime()-t.startTime,n=this.easing(e/t.duration),i=t.depaPos;return i=this.axm.map(i,function(e,i,s){return e+=t.delta[i]*n,r["default"].getCirculatedPos(e,s.range,s.circular)}),this.em.triggerChange(i),n},AnimationManager.prototype.easing=function(t){return t>1?1:this.options.easing(t)},AnimationManager.prototype.setTo=function(t,e){void 0===e&&(e=0);var n=Object.keys(t);this.grab(n);var i=this.axm.get(n);if(s.AxisManager.equal(t,i))return this;this.itm.setInterrupt(!0);var o=this.axm.filter(t,function(t,e){return i[e]!==t});return Object.keys(o).length?(o=this.axm.map(o,function(t,n,i){return i.circular&&(i.circular[0]||i.circular[1])?e>0?t:r["default"].getCirculatedPos(t,i.range,i.circular):r["default"].getInsidePosition(t,i.range,i.circular)}),s.AxisManager.equal(o,i)?this:(e>0?this.animateTo(o,e):(this.em.triggerChange(o),this.itm.setInterrupt(!1)),this)):this},AnimationManager.prototype.setBy=function(t,e){return void 0===e&&(e=0),this.setTo(this.axm.map(this.axm.get(Object.keys(t)),function(e,n){return e+t[n]}),e)},AnimationManager}();e.AnimationManager=a},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=function(){function EventManager(t){this.axes=t}return EventManager.prototype.triggerHold=function(t,e){this.axes.trigger("hold",{pos:t,input:e.input||null,inputEvent:e.event||null,isTrusted:!0})},EventManager.prototype.triggerRelease=function(t){t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("release",t)},EventManager.prototype.triggerChange=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var i=this.am.getEventInfo(),r=this.am.axm.moveTo(t),s=e&&e.event||i&&i.event||null,o={pos:r.pos,delta:r.delta,holding:n,inputEvent:s,isTrusted:!!s,input:e&&e.input||i&&i.input||null,set:s?this.createUserControll(r.pos):function(){}};this.axes.trigger("change",o),s&&this.am.axm.set(o.set().destPos)},EventManager.prototype.triggerAnimationStart=function(t){return t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("animationStart",t)},EventManager.prototype.triggerAnimationEnd=function(t){void 0===t&&(t=!1),this.axes.trigger("animationEnd",{isTrusted:t})},EventManager.prototype.triggerFinish=function(t){void 0===t&&(t=!1),this.axes.trigger("finish",{isTrusted:t})},EventManager.prototype.createUserControll=function(t,e){void 0===e&&(e=0);var n={destPos:i({},t),duration:e};return function(t,e){return t&&(n.destPos=i({},t)),e!==undefined&&(n.duration=e),n}},EventManager.prototype.setAnimationManager=function(t){this.am=t},EventManager.prototype.destroy=function(){this.axes.off()},EventManager}();e.EventManager=r},function(t,e,n){"use strict";e.__esModule=!0;var i=function(){function InterruptManager(t){this.options=t,this._prevented=!1}return InterruptManager.prototype.isInterrupting=function(){return this.options.interruptable||this._prevented},InterruptManager.prototype.isInterrupted=function(){return!this.options.interruptable&&this._prevented},InterruptManager.prototype.setInterrupt=function(t){!this.options.interruptable&&(this._prevented=t)},InterruptManager}();e.InterruptManager=i},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(3),s=n(2),o=function(){function InputObserver(t){var e=t.options,n=t.itm,i=t.em,r=t.axm,s=t.am;this.isOutside=!1,this.moveDistance=null,this.options=e,this.itm=n,this.em=i,this.axm=r,this.am=s}return InputObserver.prototype.atOutside=function(t){var e=this;if(this.isOutside)return this.axm.map(t,function(t,e,n){var i=n.range[0]-n.bounce[0],r=n.range[1]+n.bounce[1];return t>r?r:t<i?i:t});var n=this.am.easing(1e-5)/1e-5;return this.axm.map(t,function(t,i,r){var s=r.range[0],o=r.range[1],a=r.bounce;return t<s?s-e.am.easing((s-t)/(a[0]*n))*a[0]:t>o?o+e.am.easing((t-o)/(a[1]*n))*a[1]:t})},InputObserver.prototype.get=function(t){return this.axm.get(t.axes)},InputObserver.prototype.hold=function(t,e){if(!this.itm.isInterrupted()&&t.axes.length){var n={input:t,event:e};this.itm.setInterrupt(!0),this.am.grab(t.axes,n),!this.moveDistance&&this.em.triggerHold(this.axm.get(),n),this.isOutside=this.axm.isOutside(t.axes),this.moveDistance=this.axm.get(t.axes)}},InputObserver.prototype.change=function(t,e,n){if(this.itm.isInterrupting()&&!this.axm.every(n,function(t){return 0===t})){var i,r=this.axm.get(t.axes);i=this.axm.map(this.moveDistance||r,function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=i),i=this.axm.map(i,function(t,e,n){return s["default"].getCirculatedPos(t,n.range,n.circular)}),this.isOutside&&this.axm.every(r,function(t,e,n){return!s["default"].isOutside(t,n.range)})&&(this.isOutside=!1),i=this.atOutside(i),this.em.triggerChange(i,{input:t,event:e},!0)}},InputObserver.prototype.release=function(t,e,n,o){if(this.itm.isInterrupting()&&this.moveDistance){var a=this.axm.get(t.axes),u=this.axm.get(),h=this.axm.get(this.axm.map(n,function(t,e,n){return n.circular&&(n.circular[0]||n.circular[1])?a[e]+t:s["default"].getInsidePosition(a[e]+t,n.range,n.circular,n.bounce)})),c=this.am.getDuration(h,a,o);0===c&&(h=i({},u));var p={depaPos:u,destPos:h,duration:c,delta:this.axm.getDelta(u,h),inputEvent:e,input:t,isTrusted:!0};this.em.triggerRelease(p),this.moveDistance=null;var m=this.am.getUserControll(p),l=r.AxisManager.equal(m.destPos,u),f={input:t,event:e};l||0===m.duration?(!l&&this.em.triggerChange(m.destPos,f,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(f):this.em.triggerFinish(!0)):this.am.animateTo(m.destPos,m.duration,f)}},InputObserver}();e.InputObserver=o},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(4),s=n(5),o=n(0),a=n(1),u=function(){function PanInput(t,e){if(this.axes=[],this.hammer=null,this.element=null,this.panRecognizer=null,void 0===r)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=o.$(t),this.options=i({inputType:["touch","mouse","pointer"],scale:[1,1],thresholdAngle:45,threshold:0,hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}}},e),this.onHammerInput=this.onHammerInput.bind(this),this.onPanmove=this.onPanmove.bind(this),this.onPanend=this.onPanend.bind(this)}return PanInput.getDirectionByAngle=function(t,e){if(e<0||e>90)return s.DIRECTION.DIRECTION_NONE;var n=Math.abs(t);return n>e&&n<180-e?s.DIRECTION.DIRECTION_VERTICAL:s.DIRECTION.DIRECTION_HORIZONTAL},PanInput.getNextOffset=function(t,e){var n=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.abs(n/-e);return[t[0]/2*i,t[1]/2*i]},PanInput.useDirection=function(t,e,n){return n?!!(e===s.DIRECTION.DIRECTION_ALL||e&t&&n&t):!!(e&t)},PanInput.prototype.mapAxes=function(t){var e=!!t[0],n=!!t[1];this._direction=e&&n?s.DIRECTION.DIRECTION_ALL:e?s.DIRECTION.DIRECTION_HORIZONTAL:n?s.DIRECTION.DIRECTION_VERTICAL:s.DIRECTION.DIRECTION_NONE,this.axes=t},PanInput.prototype.connect=function(t){var e={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var n=this.element[a.UNIQUEKEY];n||(n=String(Math.round(Math.random()*(new Date).getTime())));var s=a.convertInputType(this.options.inputType);if(!s)throw new Error("Wrong inputType parameter!");this.hammer=a.createHammer(this.element,i({inputClass:s},this.options.hammerManagerOptions)),this.element[a.UNIQUEKEY]=n}return this.panRecognizer=new r.Pan(e),this.hammer.add(this.panRecognizer),this.attachEvent(t),this},PanInput.prototype.disconnect=function(){return this.removeRecognizer(),this.hammer&&this.dettachEvent(),this._direction=s.DIRECTION.DIRECTION_NONE,this},PanInput.prototype.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[a.UNIQUEKEY],this.element=null,this.hammer=null},PanInput.prototype.enable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!0),this},PanInput.prototype.disable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!1),this},PanInput.prototype.isEnable=function(){return!(!this.hammer||!this.hammer.get("pan").options.enable)},PanInput.prototype.removeRecognizer=function(){this.hammer&&this.panRecognizer&&(this.hammer.remove(this.panRecognizer),this.panRecognizer=null)},PanInput.prototype.onHammerInput=function(t){this.isEnable()&&(t.isFirst?this.observer.hold(this,t):t.isFinal&&this.onPanend(t))},PanInput.prototype.onPanmove=function(t){var e=PanInput.getDirectionByAngle(t.angle,this.options.thresholdAngle),n=this.hammer.session.prevInput;n?(t.offsetX=t.deltaX-n.deltaX,t.offsetY=t.deltaY-n.deltaY):(t.offsetX=0,t.offsetY=0);var i=this.getOffset([t.offsetX,t.offsetY],[PanInput.useDirection(s.DIRECTION.DIRECTION_HORIZONTAL,this._direction,e),PanInput.useDirection(s.DIRECTION.DIRECTION_VERTICAL,this._direction,e)]),r=i.some(function(t){return 0!==t});r&&(t.srcEvent.preventDefault(),t.srcEvent.stopPropagation()),t.preventSystemEvent=r,r&&this.observer.change(this,t,a.toAxis(this.axes,i))},PanInput.prototype.onPanend=function(t){var e=this.getOffset([Math.abs(t.velocityX)*(t.deltaX<0?-1:1),Math.abs(t.velocityY)*(t.deltaY<0?-1:1)],[PanInput.useDirection(s.DIRECTION.DIRECTION_HORIZONTAL,this._direction),PanInput.useDirection(s.DIRECTION.DIRECTION_VERTICAL,this._direction)]);e=PanInput.getNextOffset(e,this.observer.options.deceleration),this.observer.release(this,t,a.toAxis(this.axes,e))},PanInput.prototype.attachEvent=function(t){this.observer=t,this.hammer.on("hammer.input",this.onHammerInput).on("panstart panmove",this.onPanmove)},PanInput.prototype.dettachEvent=function(){this.hammer.off("hammer.input",this.onHammerInput).off("panstart panmove",this.onPanmove),this.observer=null},PanInput.prototype.getOffset=function(t,e){var n=[0,0],i=this.options.scale;return e[0]&&(n[0]=t[0]*i[0]),e[1]&&(n[1]=t[1]*i[1]),n},PanInput}();e.PanInput=u},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(4),s=n(0),o=n(1),a=function(){function PinchInput(t,e){if(this.axes=[],this.hammer=null,this.element=null,this._base=null,this._prev=null,this.pinchRecognizer=null,void 0===r)throw new Error("The Hammerjs must be loaded before eg.Axes.PinchInput.\nhttp://hammerjs.github.io/");this.element=s.$(t),this.options=i({scale:1,threshold:0,inputType:["touch","pointer"],hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}}},e),this.onPinchStart=this.onPinchStart.bind(this),this.onPinchMove=this.onPinchMove.bind(this),this.onPinchEnd=this.onPinchEnd.bind(this)}return PinchInput.prototype.mapAxes=function(t){this.axes=t},PinchInput.prototype.connect=function(t){var e={threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var n=this.element[o.UNIQUEKEY];n||(n=String(Math.round(Math.random()*(new Date).getTime())));var s=o.convertInputType(this.options.inputType);if(!s)throw new Error("Wrong inputType parameter!");this.hammer=o.createHammer(this.element,i({inputClass:s},this.options.hammerManagerOptions)),this.element[o.UNIQUEKEY]=n}return this.pinchRecognizer=new r.Pinch(e),this.hammer.add(this.pinchRecognizer),this.attachEvent(t),this},PinchInput.prototype.disconnect=function(){return this.removeRecognizer(),this.hammer&&(this.hammer.remove(this.pinchRecognizer),this.pinchRecognizer=null,this.dettachEvent()),this},PinchInput.prototype.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[o.UNIQUEKEY],this.element=null,this.hammer=null},PinchInput.prototype.removeRecognizer=function(){this.hammer&&this.pinchRecognizer&&(this.hammer.remove(this.pinchRecognizer),this.pinchRecognizer=null)},PinchInput.prototype.onPinchStart=function(t){this._base=this.observer.get(this)[this.axes[0]];var e=this.getOffset(t.scale);this.observer.hold(this,t),this.observer.change(this,t,o.toAxis(this.axes,[e])),this._prev=t.scale},PinchInput.prototype.onPinchMove=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,o.toAxis(this.axes,[e])),this._prev=t.scale},PinchInput.prototype.onPinchEnd=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,o.toAxis(this.axes,[e])),this.observer.release(this,t,o.toAxis(this.axes,[0]),0),this._base=null,this._prev=null},PinchInput.prototype.getOffset=function(t,e){return void 0===e&&(e=1),this._base*(t-e)*this.options.scale},PinchInput.prototype.attachEvent=function(t){this.observer=t,this.hammer.on("pinchstart",this.onPinchStart).on("pinchmove",this.onPinchMove).on("pinchend",this.onPinchEnd)},PinchInput.prototype.dettachEvent=function(){this.hammer.off("pinchstart",this.onPinchStart).off("pinchmove",this.onPinchMove).off("pinchend",this.onPinchEnd),this.observer=null,this._prev=null},PinchInput.prototype.enable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!0),this},PinchInput.prototype.disable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!1),this},PinchInput.prototype.isEnable=function(){return!(!this.hammer||!this.hammer.get("pinch").options.enable)},PinchInput}();e.PinchInput=a},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(0),s=n(1),o=function(){function WheelInput(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this._timer=null,this.element=r.$(t),this.options=i({scale:1,useNormalized:!0},e),this.onWheel=this.onWheel.bind(this)}return WheelInput.prototype.mapAxes=function(t){this.axes=t},WheelInput.prototype.connect=function(t){return this.dettachEvent(),this.attachEvent(t),this},WheelInput.prototype.disconnect=function(){return this.dettachEvent(),this},WheelInput.prototype.destroy=function(){this.disconnect(),this.element=null},WheelInput.prototype.onWheel=function(t){var e=this;if(this._isEnabled&&(t.preventDefault(),0!==t.deltaY)){this._isHolded||(this.observer.hold(this,t),this._isHolded=!0);var n=(t.deltaY>0?-1:1)*this.options.scale*(this.options.useNormalized?1:Math.abs(t.deltaY));this.observer.change(this,t,s.toAxis(this.axes,[n])),clearTimeout(this._timer);this._timer=setTimeout(function(){e._isHolded&&(e._isHolded=!1,e.observer.release(e,t,s.toAxis(e.axes,[0])))},50)}},WheelInput.prototype.attachEvent=function(t){this.observer=t,this.element.addEventListener("wheel",this.onWheel),this._isEnabled=!0},WheelInput.prototype.dettachEvent=function(){this.element.removeEventListener("wheel",this.onWheel),this._isEnabled=!1,this.observer=null},WheelInput.prototype.enable=function(){return this._isEnabled=!0,this},WheelInput.prototype.disable=function(){return this._isEnabled=!1,this},WheelInput.prototype.isEnable=function(){return this._isEnabled},WheelInput}();e.WheelInput=o},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(0),s=n(1);e.KEYMAP={LEFT_ARROW:37,A:65,UP_ARROW:38,W:87,RIGHT_ARROW:39,D:68,DOWN_ARROW:40,S:83};var o=function(){function MoveKeyInput(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this._timer=null,this.element=r.$(t),this.options=i({scale:[1,1]},e),this.onKeydown=this.onKeydown.bind(this),this.onKeyup=this.onKeyup.bind(this)}return MoveKeyInput.prototype.mapAxes=function(t){this.axes=t},MoveKeyInput.prototype.connect=function(t){return this.dettachEvent(),"0"!==this.element.getAttribute("tabindex")&&this.element.setAttribute("tabindex","0"),this.attachEvent(t),this},MoveKeyInput.prototype.disconnect=function(){return this.dettachEvent(),this},MoveKeyInput.prototype.destroy=function(){this.disconnect(),this.element=null},MoveKeyInput.prototype.onKeydown=function(t){if(this._isEnabled){var n=!0,i=1,r=-1;switch(t.keyCode){case e.KEYMAP.LEFT_ARROW:case e.KEYMAP.A:i=-1;break;case e.KEYMAP.RIGHT_ARROW:case e.KEYMAP.D:break;case e.KEYMAP.DOWN_ARROW:case e.KEYMAP.S:i=-1,r=1;break;case e.KEYMAP.UP_ARROW:case e.KEYMAP.W:r=1;break;default:n=!1}if((-1===r&&!this.axes[0]||1===r&&!this.axes[1])&&(n=!1),n){var o=-1===r?[+this.options.scale[0]*i,0]:[0,+this.options.scale[1]*i];this._isHolded||(this.observer.hold(this,event),this._isHolded=!0),clearTimeout(this._timer),this.observer.change(this,event,s.toAxis(this.axes,o))}}},MoveKeyInput.prototype.onKeyup=function(t){var e=this;this._isHolded&&(clearTimeout(this._timer),this._timer=setTimeout(function(){e.observer.release(e,t,s.toAxis(e.axes,[0,0])),e._isHolded=!1},80))},MoveKeyInput.prototype.attachEvent=function(t){this.observer=t,this.element.addEventListener("keydown",this.onKeydown,!1),this.element.addEventListener("keypress",this.onKeydown,!1),this.element.addEventListener("keyup",this.onKeyup,!1),this._isEnabled=!0},MoveKeyInput.prototype.dettachEvent=function(){this.element.removeEventListener("keydown",this.onKeydown,!1),this.element.removeEventListener("keypress",this.onKeydown,!1),this.element.removeEventListener("keyup",this.onKeyup,!1),this._isEnabled=!1,this.observer=null},MoveKeyInput.prototype.enable=function(){return this._isEnabled=!0,this},MoveKeyInput.prototype.disable=function(){return this._isEnabled=!1,this},MoveKeyInput.prototype.isEnable=function(){return this._isEnabled},MoveKeyInput}();e.MoveKeyInput=o}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("hammerjs"),require("@egjs/component")):"function"==typeof define&&define.amd?define(["hammerjs","@egjs/component"],e):"object"==typeof exports?exports.Axes=e(require("hammerjs"),require("@egjs/component")):(t.eg=t.eg||{},t.eg.Axes=e(t.Hammer,t.eg.Component))}("undefined"!=typeof self?self:this,function(t,e){return function(t){var e={};function __webpack_require__(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,__webpack_require__),i.l=!0,i.exports}return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=6)}([function(t,e,n){"use strict";function toArray(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}e.__esModule=!0,e.toArray=toArray,e.$=function $(t,e){var n;if(void 0===e&&(e=!1),"string"==typeof t){if(t.match(/^<([a-z]+)\s*([^>]*)>/)){var i=document.createElement("div");i.innerHTML=t,n=toArray(i.childNodes)}else n=toArray(document.querySelectorAll(t));e||(n=n.length>=1?n[0]:undefined)}else t===window?n=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in window&&t instanceof jQuery||t.constructor.prototype.jquery?n=e?t.toArray():t.get(0):Array.isArray(t)&&(n=t.map(function(t){return $(t)}),e||(n=n.length>=1?n[0]:undefined)):n=t;return n};var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame,r=window.cancelAnimationFrame||window.webkitCancelAnimationFrame;if(i&&!r){var s={},o=i;i=function(t){var e=o(function(n){s[e]&&t(n)});return s[e]=!0,e},r=function(t){delete s[t]}}else i&&r||(i=function(t){return window.setTimeout(function(){t(window.performance&&window.performance.now&&window.performance.now()||(new Date).getTime())},16)},r=window.clearTimeout);e.requestAnimationFrame=function(t){return i(t)},e.cancelAnimationFrame=function(t){r(t)}},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e};e.__esModule=!0;var s=r(n(4));e.SUPPORT_POINTER_EVENTS="PointerEvent"in window||"MSPointerEvent"in window,e.SUPPORT_TOUCH="ontouchstart"in window,e.UNIQUEKEY="_EGJS_AXES_INPUTTYPE_",e.toAxis=function(t,e){return e.reduce(function(e,n,i){return t[i]&&(e[t[i]]=n),e},{})},e.createHammer=function(t,e){try{return new s.Manager(t,i({},e))}catch(n){return null}},e.convertInputType=function(t){void 0===t&&(t=[]);var n=!1,i=!1,r=!1;return t.forEach(function(t){switch(t){case"mouse":i=!0;break;case"touch":n=e.SUPPORT_TOUCH;break;case"pointer":r=e.SUPPORT_POINTER_EVENTS}}),r?s.PointerEventInput:n&&i?s.TouchMouseInput:n?s.TouchInput:i?s.MouseInput:null}},function(t,e,n){"use strict";e.__esModule=!0;var i={getInsidePosition:function(t,e,n,i){var r=t,s=[n[0]?e[0]:i?e[0]-i[0]:e[0],n[1]?e[1]:i?e[1]+i[1]:e[1]];return r=Math.max(s[0],r),+(r=Math.min(s[1],r)).toFixed(5)},isOutside:function(t,e){return t<e[0]||t>e[1]},getDuration:function(t,e){var n=Math.sqrt(t/e*2);return n<100?0:n},isCircularable:function(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]},getCirculatedPos:function(t,e,n){var i=t,r=e[0],s=e[1],o=s-r;return n[1]&&t>s&&(i=(i-s)%o+r),n[0]&&t<r&&(i=(i-r)%o+s),+i.toFixed(5)}};e["default"]=i},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};e.__esModule=!0;var s=r(n(2)),o=function(){function AxisManager(t,e){var n=this;this.axis=t,this.options=e,this._complementOptions(),this._pos=Object.keys(this.axis).reduce(function(t,e){return t[e]=n.axis[e].range[0],t},{})}return AxisManager.equal=function(t,e){for(var n in t)if(t[n]!==e[n])return!1;return!0},AxisManager.prototype._complementOptions=function(){var t=this;Object.keys(this.axis).forEach(function(e){t.axis[e]=i({range:[0,100],bounce:[0,0],circular:[!1,!1]},t.axis[e]),["bounce","circular"].forEach(function(n){var i=t.axis,r=i[e][n];/string|number|boolean/.test(typeof r)&&(i[e][n]=[r,r])})})},AxisManager.prototype.getDelta=function(t,e){var n=this.get(t);return this.map(this.get(e),function(t,e){return t-n[e]})},AxisManager.prototype.get=function(t){var e=this;return t&&Array.isArray(t)?t.reduce(function(t,n){return n&&n in e._pos&&(t[n]=e._pos[n]),t},{}):i({},this._pos,t||{})},AxisManager.prototype.moveTo=function(t){var e=this,n=this.map(this._pos,function(n,i){return t[i]?t[i]-e._pos[i]:0});return this.set(t),{pos:i({},this._pos),delta:n}},AxisManager.prototype.set=function(t){for(var e in t)e&&e in this._pos&&(this._pos[e]=t[e])},AxisManager.prototype.every=function(t,e){var n=this.axis;for(var i in t)if(i&&!e(t[i],i,n[i]))return!1;return!0},AxisManager.prototype.filter=function(t,e){var n={},i=this.axis;for(var r in t)r&&e(t[r],r,i[r])&&(n[r]=t[r]);return n},AxisManager.prototype.map=function(t,e){var n={},i=this.axis;for(var r in t)r&&(n[r]=e(t[r],r,i[r]));return n},AxisManager.prototype.isOutside=function(t){return!this.every(t?this.get(t):this._pos,function(t,e,n){return!s["default"].isOutside(t,n.range)})},AxisManager}();e.AxisManager=o},function(e,n){e.exports=t},function(t,e,n){"use strict";var i;e.__esModule=!0,(i=e.DIRECTION||(e.DIRECTION={}))[i.DIRECTION_NONE=1]="DIRECTION_NONE",i[i.DIRECTION_LEFT=2]="DIRECTION_LEFT",i[i.DIRECTION_RIGHT=4]="DIRECTION_RIGHT",i[i.DIRECTION_HORIZONTAL=6]="DIRECTION_HORIZONTAL",i[i.DIRECTION_UP=8]="DIRECTION_UP",i[i.DIRECTION_DOWN=16]="DIRECTION_DOWN",i[i.DIRECTION_VERTICAL=24]="DIRECTION_VERTICAL",i[i.DIRECTION_ALL=30]="DIRECTION_ALL",e.TRANSFORM=function(){for(var t=(document.head||document.getElementsByTagName("head")[0]).style,e=["transform","webkitTransform","msTransform","mozTransform"],n=0,i=e.length;n<i;n++)if(e[n]in t)return e[n];return""}()},function(t,e,n){"use strict";var i=(this&&this.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}})(n(7)),r=n(13),s=n(14),o=n(15),a=n(16);i["default"].PanInput=r.PanInput,i["default"].PinchInput=s.PinchInput,i["default"].WheelInput=o.WheelInput,i["default"].MoveKeyInput=a.MoveKeyInput,t.exports=i["default"]},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function __(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),s=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};e.__esModule=!0;var a=o(n(8)),u=n(9),h=n(10),c=n(11),p=n(3),m=n(12),l=n(5),f=function(t){function Axes(e,n,i){void 0===e&&(e={});var r=t.call(this)||this;return r.axis=e,r._inputs=[],r.options=s({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:Infinity,minimumDuration:0,deceleration:6e-4},n),r.itm=new c.InterruptManager(r.options),r.axm=new p.AxisManager(r.axis,r.options),r.em=new h.EventManager(r),r.am=new u.AnimationManager(r),r.io=new m.InputObserver(r),r.em.setAnimationManager(r.am),i&&r.em.triggerChange(i),r}return r(Axes,t),Axes.prototype.connect=function(t,e){var n;if(n="string"==typeof t?t.split(" "):t.concat(),~this._inputs.indexOf(e)&&this.disconnect(e),"hammer"in e){var i=this._inputs.filter(function(t){return t.hammer&&t.element===e.element});i.length&&(e.hammer=i[0].hammer)}return e.mapAxes(n),e.connect(this.io),this._inputs.push(e),this},Axes.prototype.disconnect=function(t){if(t){var e=this._inputs.indexOf(t);e>=0&&(this._inputs[e].disconnect(),this._inputs.splice(e,1))}else this._inputs.forEach(function(t){return t.disconnect()}),this._inputs=[];return this},Axes.prototype.get=function(t){return this.axm.get(t)},Axes.prototype.setTo=function(t,e){return void 0===e&&(e=0),this.am.setTo(t,e),this},Axes.prototype.setBy=function(t,e){return void 0===e&&(e=0),this.am.setBy(t,e),this},Axes.prototype.isBounceArea=function(t){return this.axm.isOutside(t)},Axes.prototype.destroy=function(){this.disconnect(),this.em.destroy()},Axes.VERSION="#__VERSION__#",Axes.TRANSFORM=l.TRANSFORM,Axes.DIRECTION_NONE=l.DIRECTION.DIRECTION_NONE,Axes.DIRECTION_LEFT=l.DIRECTION.DIRECTION_LEFT,Axes.DIRECTION_RIGHT=l.DIRECTION.DIRECTION_RIGHT,Axes.DIRECTION_UP=l.DIRECTION.DIRECTION_UP,Axes.DIRECTION_DOWN=l.DIRECTION.DIRECTION_DOWN,Axes.DIRECTION_HORIZONTAL=l.DIRECTION.DIRECTION_HORIZONTAL,Axes.DIRECTION_VERTICAL=l.DIRECTION.DIRECTION_VERTICAL,Axes.DIRECTION_ALL=l.DIRECTION.DIRECTION_ALL,Axes}(a["default"]);e["default"]=f},function(t,n){t.exports=e},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};e.__esModule=!0;var s=r(n(2)),o=n(3),a=n(0),u=function(){function AnimationManager(t){var e=t.options,n=t.itm,i=t.em,r=t.axm;this.options=e,this.itm=n,this.em=i,this.axm=r,this.animationEnd=this.animationEnd.bind(this)}return AnimationManager.getDuration=function(t,e,n){return Math.max(Math.min(t,n),e)},AnimationManager.prototype.getDuration=function(t,e,n){var i,r=this;if(void 0!==n)i=n;else{var o=this.axm.map(e,function(e,n){return s["default"].getDuration(Math.abs(Math.abs(e)-Math.abs(t[n])),r.options.deceleration)});i=Object.keys(o).reduce(function(t,e){return Math.max(t,o[e])},-Infinity)}return AnimationManager.getDuration(i,this.options.minimumDuration,this.options.maximumDuration)},AnimationManager.prototype.createAnimationParam=function(t,e,n){var i=this.axm.get(),r=t,s=n&&n.event||null;return{depaPos:i,destPos:r,duration:AnimationManager.getDuration(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,r),inputEvent:s,input:n&&n.input||null,isTrusted:!!s,done:this.animationEnd}},AnimationManager.prototype.grab=function(t,e){if(this._animateParam&&t.length){var n=this.axm.get(t),i=this.axm.map(n,function(t,e,n){return s["default"].getCirculatedPos(t,n.range,n.circular)});this.axm.every(i,function(t,e){return n[e]===t})||this.em.triggerChange(i,e,!!e),this._animateParam=null,this._raf&&a.cancelAnimationFrame(this._raf),this._raf=null,this.em.triggerAnimationEnd(!(!e||!e.event))}},AnimationManager.prototype.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},AnimationManager.prototype.restore=function(t){var e=this.axm.get(),n=this.axm.map(e,function(t,e,n){return Math.min(n.range[1],Math.max(n.range[0],t))});this.animateTo(n,this.getDuration(e,n),t)},AnimationManager.prototype.animationEnd=function(){var t=this.getEventInfo();this._animateParam=null;var e=this.axm.filter(this.axm.get(),function(t,e,n){return s["default"].isCircularable(t,n.range,n.circular)});Object.keys(e).length>0&&this.setTo(this.axm.map(e,function(t,e,n){return s["default"].getCirculatedPos(t,n.range,n.circular)})),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(!!t),this.axm.isOutside()?this.restore(t):this.em.triggerFinish(!!t)},AnimationManager.prototype.animateLoop=function(t,e){if(this._animateParam=i({},t),this._animateParam.startTime=(new Date).getTime(),t.duration){var n=this._animateParam,r=this;!function loop(){if(r._raf=null,r.frame(n)>=1)return o.AxisManager.equal(t.destPos,r.axm.get(Object.keys(t.destPos)))||r.em.triggerChange(t.destPos),void e();r._raf=a.requestAnimationFrame(loop)}()}else this.em.triggerChange(t.destPos),e()},AnimationManager.prototype.getUserControll=function(t){var e=t.setTo();return e.destPos=this.axm.get(e.destPos),e.duration=AnimationManager.getDuration(e.duration,this.options.minimumDuration,this.options.maximumDuration),e},AnimationManager.prototype.animateTo=function(t,e,n){var r=this,a=this.createAnimationParam(t,e,n),u=i({},a.depaPos),h=this.em.triggerAnimationStart(a),c=this.getUserControll(a);if(!h&&this.axm.every(c.destPos,function(t,e,n){return s["default"].isCircularable(t,n.range,n.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),h&&!o.AxisManager.equal(c.destPos,u)){var p=n&&n.event||null;this.animateLoop({depaPos:u,destPos:c.destPos,duration:c.duration,delta:this.axm.getDelta(u,c.destPos),isTrusted:!!p,inputEvent:p,input:n&&n.input||null},function(){return r.animationEnd()})}},AnimationManager.prototype.frame=function(t){var e=(new Date).getTime()-t.startTime,n=this.easing(e/t.duration),i=t.depaPos;return i=this.axm.map(i,function(e,i,r){return e+=t.delta[i]*n,s["default"].getCirculatedPos(e,r.range,r.circular)}),this.em.triggerChange(i),n},AnimationManager.prototype.easing=function(t){return t>1?1:this.options.easing(t)},AnimationManager.prototype.setTo=function(t,e){void 0===e&&(e=0);var n=Object.keys(t);this.grab(n);var i=this.axm.get(n);if(o.AxisManager.equal(t,i))return this;this.itm.setInterrupt(!0);var r=this.axm.filter(t,function(t,e){return i[e]!==t});return Object.keys(r).length?(r=this.axm.map(r,function(t,n,i){return i.circular&&(i.circular[0]||i.circular[1])?e>0?t:s["default"].getCirculatedPos(t,i.range,i.circular):s["default"].getInsidePosition(t,i.range,i.circular)}),o.AxisManager.equal(r,i)?this:(e>0?this.animateTo(r,e):(this.em.triggerChange(r),this.itm.setInterrupt(!1)),this)):this},AnimationManager.prototype.setBy=function(t,e){return void 0===e&&(e=0),this.setTo(this.axm.map(this.axm.get(Object.keys(t)),function(e,n){return e+t[n]}),e)},AnimationManager}();e.AnimationManager=u},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=function(){function EventManager(t){this.axes=t}return EventManager.prototype.triggerHold=function(t,e){this.axes.trigger("hold",{pos:t,input:e.input||null,inputEvent:e.event||null,isTrusted:!0})},EventManager.prototype.triggerRelease=function(t){t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("release",t)},EventManager.prototype.triggerChange=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var i=this.am.getEventInfo(),r=this.am.axm.moveTo(t),s=e&&e.event||i&&i.event||null,o={pos:r.pos,delta:r.delta,holding:n,inputEvent:s,isTrusted:!!s,input:e&&e.input||i&&i.input||null,set:s?this.createUserControll(r.pos):function(){}};this.axes.trigger("change",o),s&&this.am.axm.set(o.set().destPos)},EventManager.prototype.triggerAnimationStart=function(t){return t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("animationStart",t)},EventManager.prototype.triggerAnimationEnd=function(t){void 0===t&&(t=!1),this.axes.trigger("animationEnd",{isTrusted:t})},EventManager.prototype.triggerFinish=function(t){void 0===t&&(t=!1),this.axes.trigger("finish",{isTrusted:t})},EventManager.prototype.createUserControll=function(t,e){void 0===e&&(e=0);var n={destPos:i({},t),duration:e};return function(t,e){return t&&(n.destPos=i({},t)),e!==undefined&&(n.duration=e),n}},EventManager.prototype.setAnimationManager=function(t){this.am=t},EventManager.prototype.destroy=function(){this.axes.off()},EventManager}();e.EventManager=r},function(t,e,n){"use strict";e.__esModule=!0;var i=function(){function InterruptManager(t){this.options=t,this._prevented=!1}return InterruptManager.prototype.isInterrupting=function(){return this.options.interruptable||this._prevented},InterruptManager.prototype.isInterrupted=function(){return!this.options.interruptable&&this._prevented},InterruptManager.prototype.setInterrupt=function(t){!this.options.interruptable&&(this._prevented=t)},InterruptManager}();e.InterruptManager=i},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};e.__esModule=!0;var s=n(3),o=r(n(2)),a=function(){function InputObserver(t){var e=t.options,n=t.itm,i=t.em,r=t.axm,s=t.am;this.isOutside=!1,this.moveDistance=null,this.options=e,this.itm=n,this.em=i,this.axm=r,this.am=s}return InputObserver.prototype.atOutside=function(t){var e=this;if(this.isOutside)return this.axm.map(t,function(t,e,n){var i=n.range[0]-n.bounce[0],r=n.range[1]+n.bounce[1];return t>r?r:t<i?i:t});var n=this.am.easing(1e-5)/1e-5;return this.axm.map(t,function(t,i,r){var s=r.range[0],o=r.range[1],a=r.bounce;return t<s?s-e.am.easing((s-t)/(a[0]*n))*a[0]:t>o?o+e.am.easing((t-o)/(a[1]*n))*a[1]:t})},InputObserver.prototype.get=function(t){return this.axm.get(t.axes)},InputObserver.prototype.hold=function(t,e){if(!this.itm.isInterrupted()&&t.axes.length){var n={input:t,event:e};this.itm.setInterrupt(!0),this.am.grab(t.axes,n),!this.moveDistance&&this.em.triggerHold(this.axm.get(),n),this.isOutside=this.axm.isOutside(t.axes),this.moveDistance=this.axm.get(t.axes)}},InputObserver.prototype.change=function(t,e,n){if(this.itm.isInterrupting()&&!this.axm.every(n,function(t){return 0===t})){var i,r=this.axm.get(t.axes);i=this.axm.map(this.moveDistance||r,function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=i),i=this.axm.map(i,function(t,e,n){return o["default"].getCirculatedPos(t,n.range,n.circular)}),this.isOutside&&this.axm.every(r,function(t,e,n){return!o["default"].isOutside(t,n.range)})&&(this.isOutside=!1),i=this.atOutside(i),this.em.triggerChange(i,{input:t,event:e},!0)}},InputObserver.prototype.release=function(t,e,n,r){if(this.itm.isInterrupting()&&this.moveDistance){var a=this.axm.get(t.axes),u=this.axm.get(),h=this.axm.get(this.axm.map(n,function(t,e,n){return n.circular&&(n.circular[0]||n.circular[1])?a[e]+t:o["default"].getInsidePosition(a[e]+t,n.range,n.circular,n.bounce)})),c=this.am.getDuration(h,a,r);0===c&&(h=i({},u));var p={depaPos:u,destPos:h,duration:c,delta:this.axm.getDelta(u,h),inputEvent:e,input:t,isTrusted:!0};this.em.triggerRelease(p),this.moveDistance=null;var m=this.am.getUserControll(p),l=s.AxisManager.equal(m.destPos,u),f={input:t,event:e};l||0===m.duration?(!l&&this.em.triggerChange(m.destPos,f,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(f):this.em.triggerFinish(!0)):this.am.animateTo(m.destPos,m.duration,f)}},InputObserver}();e.InputObserver=a},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e};e.__esModule=!0;var s=r(n(4)),o=n(5),a=n(0),u=n(1),h=function(){function PanInput(t,e){if(this.axes=[],this.hammer=null,this.element=null,this.panRecognizer=null,void 0===s)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=a.$(t),this.options=i({inputType:["touch","mouse","pointer"],scale:[1,1],thresholdAngle:45,threshold:0,hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}}},e),this.onHammerInput=this.onHammerInput.bind(this),this.onPanmove=this.onPanmove.bind(this),this.onPanend=this.onPanend.bind(this)}return PanInput.getDirectionByAngle=function(t,e){if(e<0||e>90)return o.DIRECTION.DIRECTION_NONE;var n=Math.abs(t);return n>e&&n<180-e?o.DIRECTION.DIRECTION_VERTICAL:o.DIRECTION.DIRECTION_HORIZONTAL},PanInput.getNextOffset=function(t,e){var n=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.abs(n/-e);return[t[0]/2*i,t[1]/2*i]},PanInput.useDirection=function(t,e,n){return n?!!(e===o.DIRECTION.DIRECTION_ALL||e&t&&n&t):!!(e&t)},PanInput.prototype.mapAxes=function(t){var e=!!t[0],n=!!t[1];this._direction=e&&n?o.DIRECTION.DIRECTION_ALL:e?o.DIRECTION.DIRECTION_HORIZONTAL:n?o.DIRECTION.DIRECTION_VERTICAL:o.DIRECTION.DIRECTION_NONE,this.axes=t},PanInput.prototype.connect=function(t){var e={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var n=this.element[u.UNIQUEKEY];n||(n=String(Math.round(Math.random()*(new Date).getTime())));var r=u.convertInputType(this.options.inputType);if(!r)throw new Error("Wrong inputType parameter!");this.hammer=u.createHammer(this.element,i({inputClass:r},this.options.hammerManagerOptions)),this.element[u.UNIQUEKEY]=n}return this.panRecognizer=new s.Pan(e),this.hammer.add(this.panRecognizer),this.attachEvent(t),this},PanInput.prototype.disconnect=function(){return this.removeRecognizer(),this.hammer&&this.dettachEvent(),this._direction=o.DIRECTION.DIRECTION_NONE,this},PanInput.prototype.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[u.UNIQUEKEY],this.element=null,this.hammer=null},PanInput.prototype.enable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!0),this},PanInput.prototype.disable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!1),this},PanInput.prototype.isEnable=function(){return!(!this.hammer||!this.hammer.get("pan").options.enable)},PanInput.prototype.removeRecognizer=function(){this.hammer&&this.panRecognizer&&(this.hammer.remove(this.panRecognizer),this.panRecognizer=null)},PanInput.prototype.onHammerInput=function(t){this.isEnable()&&(t.isFirst?this.observer.hold(this,t):t.isFinal&&this.onPanend(t))},PanInput.prototype.onPanmove=function(t){var e=PanInput.getDirectionByAngle(t.angle,this.options.thresholdAngle),n=this.hammer.session.prevInput;n?(t.offsetX=t.deltaX-n.deltaX,t.offsetY=t.deltaY-n.deltaY):(t.offsetX=0,t.offsetY=0);var i=this.getOffset([t.offsetX,t.offsetY],[PanInput.useDirection(o.DIRECTION.DIRECTION_HORIZONTAL,this._direction,e),PanInput.useDirection(o.DIRECTION.DIRECTION_VERTICAL,this._direction,e)]),r=i.some(function(t){return 0!==t});r&&(t.srcEvent.preventDefault(),t.srcEvent.stopPropagation()),t.preventSystemEvent=r,r&&this.observer.change(this,t,u.toAxis(this.axes,i))},PanInput.prototype.onPanend=function(t){var e=this.getOffset([Math.abs(t.velocityX)*(t.deltaX<0?-1:1),Math.abs(t.velocityY)*(t.deltaY<0?-1:1)],[PanInput.useDirection(o.DIRECTION.DIRECTION_HORIZONTAL,this._direction),PanInput.useDirection(o.DIRECTION.DIRECTION_VERTICAL,this._direction)]);e=PanInput.getNextOffset(e,this.observer.options.deceleration),this.observer.release(this,t,u.toAxis(this.axes,e))},PanInput.prototype.attachEvent=function(t){this.observer=t,this.hammer.on("hammer.input",this.onHammerInput).on("panstart panmove",this.onPanmove)},PanInput.prototype.dettachEvent=function(){this.hammer.off("hammer.input",this.onHammerInput).off("panstart panmove",this.onPanmove),this.observer=null},PanInput.prototype.getOffset=function(t,e){var n=[0,0],i=this.options.scale;return e[0]&&(n[0]=t[0]*i[0]),e[1]&&(n[1]=t[1]*i[1]),n},PanInput}();e.PanInput=h},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e};e.__esModule=!0;var s=r(n(4)),o=n(0),a=n(1),u=function(){function PinchInput(t,e){if(this.axes=[],this.hammer=null,this.element=null,this._base=null,this._prev=null,this.pinchRecognizer=null,void 0===s)throw new Error("The Hammerjs must be loaded before eg.Axes.PinchInput.\nhttp://hammerjs.github.io/");this.element=o.$(t),this.options=i({scale:1,threshold:0,inputType:["touch","pointer"],hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}}},e),this.onPinchStart=this.onPinchStart.bind(this),this.onPinchMove=this.onPinchMove.bind(this),this.onPinchEnd=this.onPinchEnd.bind(this)}return PinchInput.prototype.mapAxes=function(t){this.axes=t},PinchInput.prototype.connect=function(t){var e={threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var n=this.element[a.UNIQUEKEY];n||(n=String(Math.round(Math.random()*(new Date).getTime())));var r=a.convertInputType(this.options.inputType);if(!r)throw new Error("Wrong inputType parameter!");this.hammer=a.createHammer(this.element,i({inputClass:r},this.options.hammerManagerOptions)),this.element[a.UNIQUEKEY]=n}return this.pinchRecognizer=new s.Pinch(e),this.hammer.add(this.pinchRecognizer),this.attachEvent(t),this},PinchInput.prototype.disconnect=function(){return this.removeRecognizer(),this.hammer&&(this.hammer.remove(this.pinchRecognizer),this.pinchRecognizer=null,this.dettachEvent()),this},PinchInput.prototype.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[a.UNIQUEKEY],this.element=null,this.hammer=null},PinchInput.prototype.removeRecognizer=function(){this.hammer&&this.pinchRecognizer&&(this.hammer.remove(this.pinchRecognizer),this.pinchRecognizer=null)},PinchInput.prototype.onPinchStart=function(t){this._base=this.observer.get(this)[this.axes[0]];var e=this.getOffset(t.scale);this.observer.hold(this,t),this.observer.change(this,t,a.toAxis(this.axes,[e])),this._prev=t.scale},PinchInput.prototype.onPinchMove=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,a.toAxis(this.axes,[e])),this._prev=t.scale},PinchInput.prototype.onPinchEnd=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,a.toAxis(this.axes,[e])),this.observer.release(this,t,a.toAxis(this.axes,[0]),0),this._base=null,this._prev=null},PinchInput.prototype.getOffset=function(t,e){return void 0===e&&(e=1),this._base*(t-e)*this.options.scale},PinchInput.prototype.attachEvent=function(t){this.observer=t,this.hammer.on("pinchstart",this.onPinchStart).on("pinchmove",this.onPinchMove).on("pinchend",this.onPinchEnd)},PinchInput.prototype.dettachEvent=function(){this.hammer.off("pinchstart",this.onPinchStart).off("pinchmove",this.onPinchMove).off("pinchend",this.onPinchEnd),this.observer=null,this._prev=null},PinchInput.prototype.enable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!0),this},PinchInput.prototype.disable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!1),this},PinchInput.prototype.isEnable=function(){return!(!this.hammer||!this.hammer.get("pinch").options.enable)},PinchInput}();e.PinchInput=u},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(0),s=n(1),o=function(){function WheelInput(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this._timer=null,this.element=r.$(t),this.options=i({scale:1,useNormalized:!0},e),this.onWheel=this.onWheel.bind(this)}return WheelInput.prototype.mapAxes=function(t){this.axes=t},WheelInput.prototype.connect=function(t){return this.dettachEvent(),this.attachEvent(t),this},WheelInput.prototype.disconnect=function(){return this.dettachEvent(),this},WheelInput.prototype.destroy=function(){this.disconnect(),this.element=null},WheelInput.prototype.onWheel=function(t){var e=this;if(this._isEnabled&&(t.preventDefault(),0!==t.deltaY)){this._isHolded||(this.observer.hold(this,t),this._isHolded=!0);var n=(t.deltaY>0?-1:1)*this.options.scale*(this.options.useNormalized?1:Math.abs(t.deltaY));this.observer.change(this,t,s.toAxis(this.axes,[n])),clearTimeout(this._timer);this._timer=setTimeout(function(){e._isHolded&&(e._isHolded=!1,e.observer.release(e,t,s.toAxis(e.axes,[0])))},50)}},WheelInput.prototype.attachEvent=function(t){this.observer=t,this.element.addEventListener("wheel",this.onWheel),this._isEnabled=!0},WheelInput.prototype.dettachEvent=function(){this.element.removeEventListener("wheel",this.onWheel),this._isEnabled=!1,this.observer=null},WheelInput.prototype.enable=function(){return this._isEnabled=!0,this},WheelInput.prototype.disable=function(){return this._isEnabled=!1,this},WheelInput.prototype.isEnable=function(){return this._isEnabled},WheelInput}();e.WheelInput=o},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(0),s=n(1);e.KEYMAP={LEFT_ARROW:37,A:65,UP_ARROW:38,W:87,RIGHT_ARROW:39,D:68,DOWN_ARROW:40,S:83};var o=function(){function MoveKeyInput(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this._timer=null,this.element=r.$(t),this.options=i({scale:[1,1]},e),this.onKeydown=this.onKeydown.bind(this),this.onKeyup=this.onKeyup.bind(this)}return MoveKeyInput.prototype.mapAxes=function(t){this.axes=t},MoveKeyInput.prototype.connect=function(t){return this.dettachEvent(),"0"!==this.element.getAttribute("tabindex")&&this.element.setAttribute("tabindex","0"),this.attachEvent(t),this},MoveKeyInput.prototype.disconnect=function(){return this.dettachEvent(),this},MoveKeyInput.prototype.destroy=function(){this.disconnect(),this.element=null},MoveKeyInput.prototype.onKeydown=function(t){if(this._isEnabled){var n=!0,i=1,r=-1;switch(t.keyCode){case e.KEYMAP.LEFT_ARROW:case e.KEYMAP.A:i=-1;break;case e.KEYMAP.RIGHT_ARROW:case e.KEYMAP.D:break;case e.KEYMAP.DOWN_ARROW:case e.KEYMAP.S:i=-1,r=1;break;case e.KEYMAP.UP_ARROW:case e.KEYMAP.W:r=1;break;default:n=!1}if((-1===r&&!this.axes[0]||1===r&&!this.axes[1])&&(n=!1),n){var o=-1===r?[+this.options.scale[0]*i,0]:[0,+this.options.scale[1]*i];this._isHolded||(this.observer.hold(this,event),this._isHolded=!0),clearTimeout(this._timer),this.observer.change(this,event,s.toAxis(this.axes,o))}}},MoveKeyInput.prototype.onKeyup=function(t){var e=this;this._isHolded&&(clearTimeout(this._timer),this._timer=setTimeout(function(){e.observer.release(e,t,s.toAxis(e.axes,[0,0])),e._isHolded=!1},80))},MoveKeyInput.prototype.attachEvent=function(t){this.observer=t,this.element.addEventListener("keydown",this.onKeydown,!1),this.element.addEventListener("keypress",this.onKeydown,!1),this.element.addEventListener("keyup",this.onKeyup,!1),this._isEnabled=!0},MoveKeyInput.prototype.dettachEvent=function(){this.element.removeEventListener("keydown",this.onKeydown,!1),this.element.removeEventListener("keypress",this.onKeydown,!1),this.element.removeEventListener("keyup",this.onKeyup,!1),this._isEnabled=!1,this.observer=null},MoveKeyInput.prototype.enable=function(){return this._isEnabled=!0,this},MoveKeyInput.prototype.disable=function(){return this._isEnabled=!1,this},MoveKeyInput.prototype.isEnable=function(){return this._isEnabled},MoveKeyInput}();e.MoveKeyInput=o}])}); | ||
//# sourceMappingURL=axes.min.js.map |
@@ -8,3 +8,3 @@ /*! | ||
* | ||
* @version 2.5.2 | ||
* @version 2.5.3 | ||
* | ||
@@ -15,3 +15,3 @@ * All-in-one packaged file for ease use of '@egjs/axes' with below dependencies. | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Axes=e():(t.eg=t.eg||{},t.eg.Axes=e())}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function __webpack_require__(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,__webpack_require__),i.l=!0,i.exports}return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=6)}([function(t,e,n){"use strict";function toArray(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}e.__esModule=!0,e.toArray=toArray,e.$=function $(t,e){var n;if(void 0===e&&(e=!1),"string"==typeof t){if(t.match(/^<([a-z]+)\s*([^>]*)>/)){var i=document.createElement("div");i.innerHTML=t,n=toArray(i.childNodes)}else n=toArray(document.querySelectorAll(t));e||(n=n.length>=1?n[0]:undefined)}else t===window?n=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in window&&t instanceof jQuery||t.constructor.prototype.jquery?n=e?t.toArray():t.get(0):Array.isArray(t)&&(n=t.map(function(t){return $(t)}),e||(n=n.length>=1?n[0]:undefined)):n=t;return n};var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame,r=window.cancelAnimationFrame||window.webkitCancelAnimationFrame;if(i&&!r){var o={},s=i;i=function(t){var e=s(function(n){o[e]&&t(n)});return o[e]=!0,e},r=function(t){delete o[t]}}else i&&r||(i=function(t){return window.setTimeout(function(){t(window.performance&&window.performance.now&&window.performance.now()||(new Date).getTime())},16)},r=window.clearTimeout);e.requestAnimationFrame=function(t){return i(t)},e.cancelAnimationFrame=function(t){r(t)}},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(4);e.SUPPORT_POINTER_EVENTS="PointerEvent"in window||"MSPointerEvent"in window,e.SUPPORT_TOUCH="ontouchstart"in window,e.UNIQUEKEY="_EGJS_AXES_INPUTTYPE_",e.toAxis=function(t,e){return e.reduce(function(e,n,i){return t[i]&&(e[t[i]]=n),e},{})},e.createHammer=function(t,e){try{return new r.Manager(t,i({},e))}catch(n){return null}},e.convertInputType=function(t){void 0===t&&(t=[]);var n=!1,i=!1,o=!1;return t.forEach(function(t){switch(t){case"mouse":i=!0;break;case"touch":n=e.SUPPORT_TOUCH;break;case"pointer":o=e.SUPPORT_POINTER_EVENTS}}),o?r.PointerEventInput:n&&i?r.TouchMouseInput:n?r.TouchInput:i?r.MouseInput:null}},function(t,e,n){"use strict";e.__esModule=!0;var i={getInsidePosition:function(t,e,n,i){var r=t,o=[n[0]?e[0]:i?e[0]-i[0]:e[0],n[1]?e[1]:i?e[1]+i[1]:e[1]];return r=Math.max(o[0],r),+(r=Math.min(o[1],r)).toFixed(5)},isOutside:function(t,e){return t<e[0]||t>e[1]},getDuration:function(t,e){var n=Math.sqrt(t/e*2);return n<100?0:n},isCircularable:function(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]},getCirculatedPos:function(t,e,n){var i=t,r=e[0],o=e[1],s=o-r;return n[1]&&t>o&&(i=(i-o)%s+r),n[0]&&t<r&&(i=(i-r)%s+o),+i.toFixed(5)}};e["default"]=i},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(2),o=function(){function AxisManager(t,e){var n=this;this.axis=t,this.options=e,this._complementOptions(),this._pos=Object.keys(this.axis).reduce(function(t,e){return t[e]=n.axis[e].range[0],t},{})}return AxisManager.equal=function(t,e){for(var n in t)if(t[n]!==e[n])return!1;return!0},AxisManager.prototype._complementOptions=function(){var t=this;Object.keys(this.axis).forEach(function(e){t.axis[e]=i({range:[0,100],bounce:[0,0],circular:[!1,!1]},t.axis[e]),["bounce","circular"].forEach(function(n){var i=t.axis,r=i[e][n];/string|number|boolean/.test(typeof r)&&(i[e][n]=[r,r])})})},AxisManager.prototype.getDelta=function(t,e){var n=this.get(t);return this.map(this.get(e),function(t,e){return t-n[e]})},AxisManager.prototype.get=function(t){var e=this;return t&&Array.isArray(t)?t.reduce(function(t,n){return n&&n in e._pos&&(t[n]=e._pos[n]),t},{}):i({},this._pos,t||{})},AxisManager.prototype.moveTo=function(t){var e=this,n=this.map(this._pos,function(n,i){return t[i]?t[i]-e._pos[i]:0});return this.set(t),{pos:i({},this._pos),delta:n}},AxisManager.prototype.set=function(t){for(var e in t)e&&e in this._pos&&(this._pos[e]=t[e])},AxisManager.prototype.every=function(t,e){var n=this.axis;for(var i in t)if(i&&!e(t[i],i,n[i]))return!1;return!0},AxisManager.prototype.filter=function(t,e){var n={},i=this.axis;for(var r in t)r&&e(t[r],r,i[r])&&(n[r]=t[r]);return n},AxisManager.prototype.map=function(t,e){var n={},i=this.axis;for(var r in t)r&&(n[r]=e(t[r],r,i[r]));return n},AxisManager.prototype.isOutside=function(t){return!this.every(t?this.get(t):this._pos,function(t,e,n){return!r["default"].isOutside(t,n.range)})},AxisManager}();e.AxisManager=o},function(t,e,n){var i;!function(r,o,s,a){"use strict";var u,h=["","webkit","Moz","MS","ms","o"],c=o.createElement("div"),p="function",l=Math.round,f=Math.abs,m=Date.now;function setTimeoutContext(t,e,n){return setTimeout(bindFn(t,n),e)}function invokeArrayArg(t,e,n){return!!Array.isArray(t)&&(each(t,n[e],n),!0)}function each(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==a)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function deprecate(t,e,n){var i="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=r.console&&(r.console.warn||r.console.log);return o&&o.call(r.console,i,n),t.apply(this,arguments)}}u="function"!=typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==a&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}:Object.assign;var d=deprecate(function(t,e,n){for(var i=Object.keys(e),r=0;r<i.length;)(!n||n&&t[i[r]]===a)&&(t[i[r]]=e[i[r]]),r++;return t},"extend","Use `assign`."),v=deprecate(function(t,e){return d(t,e,!0)},"merge","Use `assign`.");function inherit(t,e,n){var i,r=e.prototype;(i=t.prototype=Object.create(r)).constructor=t,i._super=r,n&&u(i,n)}function bindFn(t,e){return function(){return t.apply(e,arguments)}}function boolOrFn(t,e){return typeof t==p?t.apply(e&&e[0]||a,e):t}function ifUndefined(t,e){return t===a?e:t}function addEventListeners(t,e,n){each(splitStr(e),function(e){t.addEventListener(e,n,!1)})}function removeEventListeners(t,e,n){each(splitStr(e),function(e){t.removeEventListener(e,n,!1)})}function hasParent(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function inStr(t,e){return t.indexOf(e)>-1}function splitStr(t){return t.trim().split(/\s+/g)}function inArray(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;i<t.length;){if(n&&t[i][n]==e||!n&&t[i]===e)return i;i++}return-1}function toArray(t){return Array.prototype.slice.call(t,0)}function uniqueArray(t,e,n){for(var i=[],r=[],o=0;o<t.length;){var s=e?t[o][e]:t[o];inArray(r,s)<0&&i.push(t[o]),r[o]=s,o++}return n&&(i=e?i.sort(function(t,n){return t[e]>n[e]}):i.sort()),i}function prefixed(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),o=0;o<h.length;){if((i=(n=h[o])?n+r:e)in t)return i;o++}return a}var g=1;function getWindowForElement(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||r}var y="ontouchstart"in r,_=prefixed(r,"PointerEvent")!==a,I=y&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),E="touch",T="mouse",A=25,b=1,O=2,P=4,x=8,R=1,M=2,C=4,D=8,N=16,w=M|C,z=D|N,S=w|z,L=["x","y"],H=["clientX","clientY"];function Input(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){boolOrFn(t.options.enable,[t])&&n.handler(e)},this.init()}function inputHandler(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,o=e&b&&i-r==0,s=e&(P|x)&&i-r==0;n.isFirst=!!o,n.isFinal=!!s,o&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,i=e.pointers,r=i.length;n.firstInput||(n.firstInput=simpleCloneInputData(e));r>1&&!n.firstMultiple?n.firstMultiple=simpleCloneInputData(e):1===r&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,u=s?s.center:o.center,h=e.center=getCenter(i);e.timeStamp=m(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=getAngle(u,h),e.distance=getDistance(u,h),function(t,e){var n=e.center,i=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};e.eventType!==b&&o.eventType!==P||(r=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y});e.deltaX=r.x+(n.x-i.x),e.deltaY=r.y+(n.y-i.y)}(n,e),e.offsetDirection=getDirection(e.deltaX,e.deltaY);var c=getVelocity(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=f(c.x)>f(c.y)?c.x:c.y,e.scale=s?(d=s.pointers,v=i,getDistance(v[0],v[1],H)/getDistance(d[0],d[1],H)):1,e.rotation=s?(p=s.pointers,l=i,getAngle(l[1],l[0],H)+getAngle(p[1],p[0],H)):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,r,o,s=t.lastInterval||e,u=e.timeStamp-s.timeStamp;if(e.eventType!=x&&(u>A||s.velocity===a)){var h=e.deltaX-s.deltaX,c=e.deltaY-s.deltaY,p=getVelocity(u,h,c);i=p.x,r=p.y,n=f(p.x)>f(p.y)?p.x:p.y,o=getDirection(h,c),t.lastInterval=e}else n=s.velocity,i=s.velocityX,r=s.velocityY,o=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=o}(n,e);var p,l;var d,v;var g=t.element;hasParent(e.srcEvent.target,g)&&(g=e.srcEvent.target);e.target=g}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function simpleCloneInputData(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:l(t.pointers[n].clientX),clientY:l(t.pointers[n].clientY)},n++;return{timeStamp:m(),pointers:e,center:getCenter(e),deltaX:t.deltaX,deltaY:t.deltaY}}function getCenter(t){var e=t.length;if(1===e)return{x:l(t[0].clientX),y:l(t[0].clientY)};for(var n=0,i=0,r=0;r<e;)n+=t[r].clientX,i+=t[r].clientY,r++;return{x:l(n/e),y:l(i/e)}}function getVelocity(t,e,n){return{x:e/t||0,y:n/t||0}}function getDirection(t,e){return t===e?R:f(t)>=f(e)?t<0?M:C:e<0?D:N}function getDistance(t,e,n){n||(n=L);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function getAngle(t,e,n){n||(n=L);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return 180*Math.atan2(r,i)/Math.PI}Input.prototype={handler:function(){},init:function(){this.evEl&&addEventListeners(this.element,this.evEl,this.domHandler),this.evTarget&&addEventListeners(this.target,this.evTarget,this.domHandler),this.evWin&&addEventListeners(getWindowForElement(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&removeEventListeners(this.element,this.evEl,this.domHandler),this.evTarget&&removeEventListeners(this.target,this.evTarget,this.domHandler),this.evWin&&removeEventListeners(getWindowForElement(this.element),this.evWin,this.domHandler)}};var k={mousedown:b,mousemove:O,mouseup:P},W="mousedown",q="mousemove mouseup";function MouseInput(){this.evEl=W,this.evWin=q,this.pressed=!1,Input.apply(this,arguments)}inherit(MouseInput,Input,{handler:function(t){var e=k[t.type];e&b&&0===t.button&&(this.pressed=!0),e&O&&1!==t.which&&(e=P),this.pressed&&(e&P&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:T,srcEvent:t}))}});var F={pointerdown:b,pointermove:O,pointerup:P,pointercancel:x,pointerout:x},j={2:E,3:"pen",4:T,5:"kinect"},Y="pointerdown",U="pointermove pointerup pointercancel";function PointerEventInput(){this.evEl=Y,this.evWin=U,Input.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r.MSPointerEvent&&!r.PointerEvent&&(Y="MSPointerDown",U="MSPointerMove MSPointerUp MSPointerCancel"),inherit(PointerEventInput,Input,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=F[i],o=j[t.pointerType]||t.pointerType,s=o==E,a=inArray(e,t.pointerId,"pointerId");r&b&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):r&(P|x)&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(a,1))}});var K={touchstart:b,touchmove:O,touchend:P,touchcancel:x},X="touchstart",V="touchstart touchmove touchend touchcancel";function SingleTouchInput(){this.evTarget=X,this.evWin=V,this.started=!1,Input.apply(this,arguments)}inherit(SingleTouchInput,Input,{handler:function(t){var e=K[t.type];if(e===b&&(this.started=!0),this.started){var n=function(t,e){var n=toArray(t.touches),i=toArray(t.changedTouches);e&(P|x)&&(n=uniqueArray(n.concat(i),"identifier",!0));return[n,i]}.call(this,t,e);e&(P|x)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:E,srcEvent:t})}}});var B={touchstart:b,touchmove:O,touchend:P,touchcancel:x},G="touchstart touchmove touchend touchcancel";function TouchInput(){this.evTarget=G,this.targetIds={},Input.apply(this,arguments)}inherit(TouchInput,Input,{handler:function(t){var e=B[t.type],n=function(t,e){var n=toArray(t.touches),i=this.targetIds;if(e&(b|O)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,s=toArray(t.changedTouches),a=[],u=this.target;if(o=n.filter(function(t){return hasParent(t.target,u)}),e===b)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;r=0;for(;r<s.length;)i[s[r].identifier]&&a.push(s[r]),e&(P|x)&&delete i[s[r].identifier],r++;if(!a.length)return;return[uniqueArray(o.concat(a),"identifier",!0),a]}.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:E,srcEvent:t})}});var Z=2500,Q=25;function TouchMouseInput(){Input.apply(this,arguments);var t=bindFn(this.handler,this);this.touch=new TouchInput(this.manager,t),this.mouse=new MouseInput(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function setLastTouch(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var i=this.lastTouches;setTimeout(function(){var t=i.indexOf(n);t>-1&&i.splice(t,1)},Z)}}inherit(TouchMouseInput,Input,{handler:function(t,e,n){var i=n.pointerType==E,r=n.pointerType==T;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)(function(t,e){t&b?(this.primaryTouch=e.changedPointers[0].identifier,setLastTouch.call(this,e)):t&(P|x)&&setLastTouch.call(this,e)}).call(this,e,n);else if(r&&function(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(e-r.x),s=Math.abs(n-r.y);if(o<=Q&&s<=Q)return!0}return!1}.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var $=prefixed(c.style,"touchAction"),J=$!==a,tt="compute",et="auto",nt="manipulation",it="none",rt="pan-x",ot="pan-y",st=function(){if(!J)return!1;var t={},e=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){t[n]=!e||r.CSS.supports("touch-action",n)}),t}();function TouchAction(t,e){this.manager=t,this.set(e)}TouchAction.prototype={set:function(t){t==tt&&(t=this.compute()),J&&this.manager.element.style&&st[t]&&(this.manager.element.style[$]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return each(this.manager.recognizers,function(e){boolOrFn(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(t){if(inStr(t,it))return it;var e=inStr(t,rt),n=inStr(t,ot);if(e&&n)return it;if(e||n)return e?rt:ot;if(inStr(t,nt))return nt;return et}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var i=this.actions,r=inStr(i,it)&&!st[it],o=inStr(i,ot)&&!st[ot],s=inStr(i,rt)&&!st[rt];if(r){var a=1===t.pointers.length,u=t.distance<2,h=t.deltaTime<250;if(a&&u&&h)return}if(!s||!o)return r||o&&n&w||s&&n&z?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var at=1,ut=2,ht=4,ct=8,pt=ct,lt=16;function Recognizer(t){this.options=u({},this.defaults,t||{}),this.id=g++,this.manager=null,this.options.enable=ifUndefined(this.options.enable,!0),this.state=at,this.simultaneous={},this.requireFail=[]}function stateStr(t){return t<?"cancel":t&ct?"end":t&ht?"move":t&ut?"start":""}function directionStr(t){return t==N?"down":t==D?"up":t==M?"left":t==C?"right":""}function getRecognizerByNameIfManager(t,e){var n=e.manager;return n?n.get(t):t}function AttrRecognizer(){Recognizer.apply(this,arguments)}function PanRecognizer(){AttrRecognizer.apply(this,arguments),this.pX=null,this.pY=null}function PinchRecognizer(){AttrRecognizer.apply(this,arguments)}function PressRecognizer(){Recognizer.apply(this,arguments),this._timer=null,this._input=null}function RotateRecognizer(){AttrRecognizer.apply(this,arguments)}function SwipeRecognizer(){AttrRecognizer.apply(this,arguments)}function TapRecognizer(){Recognizer.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Hammer(t,e){return(e=e||{}).recognizers=ifUndefined(e.recognizers,Hammer.defaults.preset),new Manager(t,e)}Recognizer.prototype={defaults:{},set:function(t){return u(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(invokeArrayArg(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=getRecognizerByNameIfManager(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return invokeArrayArg(t,"dropRecognizeWith",this)?this:(t=getRecognizerByNameIfManager(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(invokeArrayArg(t,"requireFailure",this))return this;var e=this.requireFail;return-1===inArray(e,t=getRecognizerByNameIfManager(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(invokeArrayArg(t,"dropRequireFailure",this))return this;t=getRecognizerByNameIfManager(t,this);var e=inArray(this.requireFail,t);return e>-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){var e=this,n=this.state;function emit(n){e.manager.emit(n,t)}n<ct&&emit(e.options.event+stateStr(n)),emit(e.options.event),t.additionalEvent&&emit(t.additionalEvent),n>=ct&&emit(e.options.event+stateStr(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(32|at)))return!1;t++}return!0},recognize:function(t){var e=u({},t);if(!boolOrFn(this.options.enable,[this,e]))return this.reset(),void(this.state=32);this.state&(pt|lt|32)&&(this.state=at),this.state=this.process(e),this.state&(ut|ht|ct|lt)&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},inherit(AttrRecognizer,Recognizer,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,i=e&(ut|ht),r=this.attrTest(t);return i&&(n&x||!r)?e|lt:i||r?n&P?e|ct:e&ut?e|ht:ut:32}}),inherit(PanRecognizer,AttrRecognizer,{defaults:{event:"pan",threshold:10,pointers:1,direction:S},getTouchAction:function(){var t=this.options.direction,e=[];return t&w&&e.push(ot),t&z&&e.push(rt),e},directionTest:function(t){var e=this.options,n=!0,i=t.distance,r=t.direction,o=t.deltaX,s=t.deltaY;return r&e.direction||(e.direction&w?(r=0===o?R:o<0?M:C,n=o!=this.pX,i=Math.abs(t.deltaX)):(r=0===s?R:s<0?D:N,n=s!=this.pY,i=Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},attrTest:function(t){return AttrRecognizer.prototype.attrTest.call(this,t)&&(this.state&ut||!(this.state&ut)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=directionStr(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),inherit(PinchRecognizer,AttrRecognizer,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[it]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ut)},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)}}),inherit(PressRecognizer,Recognizer,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[et]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime>e.time;if(this._input=t,!i||!n||t.eventType&(P|x)&&!r)this.reset();else if(t.eventType&b)this.reset(),this._timer=setTimeoutContext(function(){this.state=pt,this.tryEmit()},e.time,this);else if(t.eventType&P)return pt;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===pt&&(t&&t.eventType&P?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=m(),this.manager.emit(this.options.event,this._input)))}}),inherit(RotateRecognizer,AttrRecognizer,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[it]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ut)}}),inherit(SwipeRecognizer,AttrRecognizer,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:w|z,pointers:1},getTouchAction:function(){return PanRecognizer.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(w|z)?e=t.overallVelocity:n&w?e=t.overallVelocityX:n&z&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&f(e)>this.options.velocity&&t.eventType&P},emit:function(t){var e=directionStr(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),inherit(TapRecognizer,Recognizer,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[nt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime<e.time;if(this.reset(),t.eventType&b&&0===this.count)return this.failTimeout();if(i&&r&&n){if(t.eventType!=P)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||getDistance(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,s&&o?this.count+=1:this.count=1,this._input=t,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=setTimeoutContext(function(){this.state=pt,this.tryEmit()},e.interval,this),ut):pt}return 32},failTimeout:function(){return this._timer=setTimeoutContext(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==pt&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Hammer.VERSION="2.0.7",Hammer.defaults={domEvents:!1,touchAction:tt,enable:!0,inputTarget:null,inputClass:null,preset:[[RotateRecognizer,{enable:!1}],[PinchRecognizer,{enable:!1},["rotate"]],[SwipeRecognizer,{direction:w}],[PanRecognizer,{direction:w},["swipe"]],[TapRecognizer],[TapRecognizer,{event:"doubletap",taps:2},["tap"]],[PressRecognizer]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Manager(t,e){var n;this.options=u({},Hammer.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((n=this).options.inputClass||(_?PointerEventInput:I?TouchInput:y?TouchMouseInput:MouseInput))(n,inputHandler),this.touchAction=new TouchAction(this,this.options.touchAction),toggleCssProps(this,!0),each(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function toggleCssProps(t,e){var n,i=t.element;i.style&&(each(t.options.cssProps,function(r,o){n=prefixed(i.style,o),e?(t.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=t.oldCssProps[n]||""}),e||(t.oldCssProps={}))}Manager.prototype={set:function(t){return u(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var i=this.recognizers,r=e.curRecognizer;(!r||r&&r.state&pt)&&(r=e.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],2===e.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(t),!r&&n.state&(ut|ht|ct)&&(r=e.curRecognizer=n),o++}},get:function(t){if(t instanceof Recognizer)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(invokeArrayArg(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(invokeArrayArg(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=inArray(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(t!==a&&e!==a){var n=this.handlers;return each(splitStr(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this}},off:function(t,e){if(t!==a){var n=this.handlers;return each(splitStr(t),function(t){e?n[t]&&n[t].splice(inArray(n[t],e),1):delete n[t]}),this}},emit:function(t,e){var n,i,r;this.options.domEvents&&(n=t,i=e,(r=o.createEvent("Event")).initEvent(n,!0,!0),r.gesture=i,i.target.dispatchEvent(r));var s=this.handlers[t]&&this.handlers[t].slice();if(s&&s.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var a=0;a<s.length;)s[a](e),a++}},destroy:function(){this.element&&toggleCssProps(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},u(Hammer,{INPUT_START:b,INPUT_MOVE:O,INPUT_END:P,INPUT_CANCEL:x,STATE_POSSIBLE:at,STATE_BEGAN:ut,STATE_CHANGED:ht,STATE_ENDED:ct,STATE_RECOGNIZED:pt,STATE_CANCELLED:lt,STATE_FAILED:32,DIRECTION_NONE:R,DIRECTION_LEFT:M,DIRECTION_RIGHT:C,DIRECTION_UP:D,DIRECTION_DOWN:N,DIRECTION_HORIZONTAL:w,DIRECTION_VERTICAL:z,DIRECTION_ALL:S,Manager:Manager,Input:Input,TouchAction:TouchAction,TouchInput:TouchInput,MouseInput:MouseInput,PointerEventInput:PointerEventInput,TouchMouseInput:TouchMouseInput,SingleTouchInput:SingleTouchInput,Recognizer:Recognizer,AttrRecognizer:AttrRecognizer,Tap:TapRecognizer,Pan:PanRecognizer,Swipe:SwipeRecognizer,Pinch:PinchRecognizer,Rotate:RotateRecognizer,Press:PressRecognizer,on:addEventListeners,off:removeEventListeners,each:each,merge:v,extend:d,assign:u,inherit:inherit,bindFn:bindFn,prefixed:prefixed}),(void 0!==r?r:"undefined"!=typeof self?self:{}).Hammer=Hammer,(i=function(){return Hammer}.call(e,n,e,t))===a||(t.exports=i)}(window,document)},function(t,e,n){"use strict";var i;e.__esModule=!0,(i=e.DIRECTION||(e.DIRECTION={}))[i.DIRECTION_NONE=1]="DIRECTION_NONE",i[i.DIRECTION_LEFT=2]="DIRECTION_LEFT",i[i.DIRECTION_RIGHT=4]="DIRECTION_RIGHT",i[i.DIRECTION_HORIZONTAL=6]="DIRECTION_HORIZONTAL",i[i.DIRECTION_UP=8]="DIRECTION_UP",i[i.DIRECTION_DOWN=16]="DIRECTION_DOWN",i[i.DIRECTION_VERTICAL=24]="DIRECTION_VERTICAL",i[i.DIRECTION_ALL=30]="DIRECTION_ALL",e.TRANSFORM=function(){for(var t=(document.head||document.getElementsByTagName("head")[0]).style,e=["transform","webkitTransform","msTransform","mozTransform"],n=0,i=e.length;n<i;n++)if(e[n]in t)return e[n];return""}()},function(t,e,n){"use strict";var i=n(7),r=n(13),o=n(14),s=n(15),a=n(16);i["default"].PanInput=r.PanInput,i["default"].PinchInput=o.PinchInput,i["default"].WheelInput=s.WheelInput,i["default"].MoveKeyInput=a.MoveKeyInput,t.exports=i["default"]},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function __(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),o=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var s=n(8),a=n(9),u=n(10),h=n(11),c=n(3),p=n(12),l=n(5),f=function(t){function Axes(e,n,i){void 0===e&&(e={});var r=t.call(this)||this;return r.axis=e,r._inputs=[],r.options=o({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:Infinity,minimumDuration:0,deceleration:6e-4},n),r.itm=new h.InterruptManager(r.options),r.axm=new c.AxisManager(r.axis,r.options),r.em=new u.EventManager(r),r.am=new a.AnimationManager(r),r.io=new p.InputObserver(r),r.em.setAnimationManager(r.am),i&&r.em.triggerChange(i),r}return r(Axes,t),Axes.prototype.connect=function(t,e){var n;if(n="string"==typeof t?t.split(" "):t.concat(),~this._inputs.indexOf(e)&&this.disconnect(e),"hammer"in e){var i=this._inputs.filter(function(t){return t.hammer&&t.element===e.element});i.length&&(e.hammer=i[0].hammer)}return e.mapAxes(n),e.connect(this.io),this._inputs.push(e),this},Axes.prototype.disconnect=function(t){if(t){var e=this._inputs.indexOf(t);e>=0&&(this._inputs[e].disconnect(),this._inputs.splice(e,1))}else this._inputs.forEach(function(t){return t.disconnect()}),this._inputs=[];return this},Axes.prototype.get=function(t){return this.axm.get(t)},Axes.prototype.setTo=function(t,e){return void 0===e&&(e=0),this.am.setTo(t,e),this},Axes.prototype.setBy=function(t,e){return void 0===e&&(e=0),this.am.setBy(t,e),this},Axes.prototype.isBounceArea=function(t){return this.axm.isOutside(t)},Axes.prototype.destroy=function(){this.disconnect(),this.em.destroy()},Axes.VERSION="#__VERSION__#",Axes.TRANSFORM=l.TRANSFORM,Axes.DIRECTION_NONE=l.DIRECTION.DIRECTION_NONE,Axes.DIRECTION_LEFT=l.DIRECTION.DIRECTION_LEFT,Axes.DIRECTION_RIGHT=l.DIRECTION.DIRECTION_RIGHT,Axes.DIRECTION_UP=l.DIRECTION.DIRECTION_UP,Axes.DIRECTION_DOWN=l.DIRECTION.DIRECTION_DOWN,Axes.DIRECTION_HORIZONTAL=l.DIRECTION.DIRECTION_HORIZONTAL,Axes.DIRECTION_VERTICAL=l.DIRECTION.DIRECTION_VERTICAL,Axes.DIRECTION_ALL=l.DIRECTION.DIRECTION_ALL,Axes}(s);e["default"]=f},function(t,e,n){var i;i=function(){return function(t){var e={};function __webpack_require__(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,__webpack_require__),i.l=!0,i.exports}return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=0)}([function(t,e,n){"use strict";var i,r=n(1),o=(i=r)&&i.__esModule?i:{"default":i};o["default"].VERSION="2.0.0",t.exports=o["default"]},function(t,e,n){"use strict";e.__esModule=!0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var r=function(){function Component(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,Component),this._eventHandler={},this.options={}}return Component.prototype.trigger=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=this._eventHandler[t]||[];if(!(n.length>0))return!0;n=n.concat(),e.eventType=t;var i=!1,r=[e],o=0;e.stop=function(){i=!0};for(var s=arguments.length,a=Array(s>2?s-2:0),u=2;u<s;u++)a[u-2]=arguments[u];for(a.length>=1&&(r=r.concat(a)),o=0;n[o];o++)n[o].apply(this,r);return!i},Component.prototype.once=function(t,e){if("object"===(void 0===t?"undefined":i(t))&&void 0===e){var n=t,r=void 0;for(r in n)this.once(r,n[r]);return this}if("string"==typeof t&&"function"==typeof e){var o=this;this.on(t,function listener(){for(var n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];e.apply(o,i),o.off(t,listener)})}return this},Component.prototype.hasOn=function(t){return!!this._eventHandler[t]},Component.prototype.on=function(t,e){if("object"===(void 0===t?"undefined":i(t))&&void 0===e){var n=t,r=void 0;for(r in n)this.on(r,n[r]);return this}if("string"==typeof t&&"function"==typeof e){var o=this._eventHandler[t];void 0===o&&(this._eventHandler[t]=[],o=this._eventHandler[t]),o.push(e)}return this},Component.prototype.off=function(t,e){if(void 0===t)return this._eventHandler={},this;if(void 0===e){if("string"==typeof t)return this._eventHandler[t]=undefined,this;var n=t,i=void 0;for(i in n)this.off(i,n[i]);return this}var r=this._eventHandler[t];if(r){var o=void 0,s=void 0;for(o=0;(s=r[o])!==undefined;o++)if(s===e){r=r.splice(o,1);break}}return this},Component}();e["default"]=r,t.exports=e["default"]}])},t.exports=i()},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(2),o=n(3),s=n(0),a=function(){function AnimationManager(t){var e=t.options,n=t.itm,i=t.em,r=t.axm;this.options=e,this.itm=n,this.em=i,this.axm=r,this.animationEnd=this.animationEnd.bind(this)}return AnimationManager.getDuration=function(t,e,n){return Math.max(Math.min(t,n),e)},AnimationManager.prototype.getDuration=function(t,e,n){var i,o=this;if(void 0!==n)i=n;else{var s=this.axm.map(e,function(e,n){return r["default"].getDuration(Math.abs(Math.abs(e)-Math.abs(t[n])),o.options.deceleration)});i=Object.keys(s).reduce(function(t,e){return Math.max(t,s[e])},-Infinity)}return AnimationManager.getDuration(i,this.options.minimumDuration,this.options.maximumDuration)},AnimationManager.prototype.createAnimationParam=function(t,e,n){var i=this.axm.get(),r=t,o=n&&n.event||null;return{depaPos:i,destPos:r,duration:AnimationManager.getDuration(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,r),inputEvent:o,input:n&&n.input||null,isTrusted:!!o,done:this.animationEnd}},AnimationManager.prototype.grab=function(t,e){if(this._animateParam&&t.length){var n=this.axm.get(t),i=this.axm.map(n,function(t,e,n){return r["default"].getCirculatedPos(t,n.range,n.circular)});this.axm.every(i,function(t,e){return n[e]===t})||this.em.triggerChange(i,e,!!e),this._animateParam=null,this._raf&&s.cancelAnimationFrame(this._raf),this._raf=null,this.em.triggerAnimationEnd(!(!e||!e.event))}},AnimationManager.prototype.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},AnimationManager.prototype.restore=function(t){var e=this.axm.get(),n=this.axm.map(e,function(t,e,n){return Math.min(n.range[1],Math.max(n.range[0],t))});this.animateTo(n,this.getDuration(e,n),t)},AnimationManager.prototype.animationEnd=function(){var t=this.getEventInfo();this._animateParam=null;var e=this.axm.filter(this.axm.get(),function(t,e,n){return r["default"].isCircularable(t,n.range,n.circular)});Object.keys(e).length>0&&this.setTo(this.axm.map(e,function(t,e,n){return r["default"].getCirculatedPos(t,n.range,n.circular)})),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(!!t),this.axm.isOutside()?this.restore(t):this.em.triggerFinish(!!t)},AnimationManager.prototype.animateLoop=function(t,e){if(this._animateParam=i({},t),this._animateParam.startTime=(new Date).getTime(),t.duration){var n=this._animateParam,r=this;!function loop(){if(r._raf=null,r.frame(n)>=1)return o.AxisManager.equal(t.destPos,r.axm.get(Object.keys(t.destPos)))||r.em.triggerChange(t.destPos),void e();r._raf=s.requestAnimationFrame(loop)}()}else this.em.triggerChange(t.destPos),e()},AnimationManager.prototype.getUserControll=function(t){var e=t.setTo();return e.destPos=this.axm.get(e.destPos),e.duration=AnimationManager.getDuration(e.duration,this.options.minimumDuration,this.options.maximumDuration),e},AnimationManager.prototype.animateTo=function(t,e,n){var s=this,a=this.createAnimationParam(t,e,n),u=i({},a.depaPos),h=this.em.triggerAnimationStart(a),c=this.getUserControll(a);if(!h&&this.axm.every(c.destPos,function(t,e,n){return r["default"].isCircularable(t,n.range,n.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),h&&!o.AxisManager.equal(c.destPos,u)){var p=n&&n.event||null;this.animateLoop({depaPos:u,destPos:c.destPos,duration:c.duration,delta:this.axm.getDelta(u,c.destPos),isTrusted:!!p,inputEvent:p,input:n&&n.input||null},function(){return s.animationEnd()})}},AnimationManager.prototype.frame=function(t){var e=(new Date).getTime()-t.startTime,n=this.easing(e/t.duration),i=t.depaPos;return i=this.axm.map(i,function(e,i,o){return e+=t.delta[i]*n,r["default"].getCirculatedPos(e,o.range,o.circular)}),this.em.triggerChange(i),n},AnimationManager.prototype.easing=function(t){return t>1?1:this.options.easing(t)},AnimationManager.prototype.setTo=function(t,e){void 0===e&&(e=0);var n=Object.keys(t);this.grab(n);var i=this.axm.get(n);if(o.AxisManager.equal(t,i))return this;this.itm.setInterrupt(!0);var s=this.axm.filter(t,function(t,e){return i[e]!==t});return Object.keys(s).length?(s=this.axm.map(s,function(t,n,i){return i.circular&&(i.circular[0]||i.circular[1])?e>0?t:r["default"].getCirculatedPos(t,i.range,i.circular):r["default"].getInsidePosition(t,i.range,i.circular)}),o.AxisManager.equal(s,i)?this:(e>0?this.animateTo(s,e):(this.em.triggerChange(s),this.itm.setInterrupt(!1)),this)):this},AnimationManager.prototype.setBy=function(t,e){return void 0===e&&(e=0),this.setTo(this.axm.map(this.axm.get(Object.keys(t)),function(e,n){return e+t[n]}),e)},AnimationManager}();e.AnimationManager=a},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=function(){function EventManager(t){this.axes=t}return EventManager.prototype.triggerHold=function(t,e){this.axes.trigger("hold",{pos:t,input:e.input||null,inputEvent:e.event||null,isTrusted:!0})},EventManager.prototype.triggerRelease=function(t){t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("release",t)},EventManager.prototype.triggerChange=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var i=this.am.getEventInfo(),r=this.am.axm.moveTo(t),o=e&&e.event||i&&i.event||null,s={pos:r.pos,delta:r.delta,holding:n,inputEvent:o,isTrusted:!!o,input:e&&e.input||i&&i.input||null,set:o?this.createUserControll(r.pos):function(){}};this.axes.trigger("change",s),o&&this.am.axm.set(s.set().destPos)},EventManager.prototype.triggerAnimationStart=function(t){return t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("animationStart",t)},EventManager.prototype.triggerAnimationEnd=function(t){void 0===t&&(t=!1),this.axes.trigger("animationEnd",{isTrusted:t})},EventManager.prototype.triggerFinish=function(t){void 0===t&&(t=!1),this.axes.trigger("finish",{isTrusted:t})},EventManager.prototype.createUserControll=function(t,e){void 0===e&&(e=0);var n={destPos:i({},t),duration:e};return function(t,e){return t&&(n.destPos=i({},t)),e!==undefined&&(n.duration=e),n}},EventManager.prototype.setAnimationManager=function(t){this.am=t},EventManager.prototype.destroy=function(){this.axes.off()},EventManager}();e.EventManager=r},function(t,e,n){"use strict";e.__esModule=!0;var i=function(){function InterruptManager(t){this.options=t,this._prevented=!1}return InterruptManager.prototype.isInterrupting=function(){return this.options.interruptable||this._prevented},InterruptManager.prototype.isInterrupted=function(){return!this.options.interruptable&&this._prevented},InterruptManager.prototype.setInterrupt=function(t){!this.options.interruptable&&(this._prevented=t)},InterruptManager}();e.InterruptManager=i},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(3),o=n(2),s=function(){function InputObserver(t){var e=t.options,n=t.itm,i=t.em,r=t.axm,o=t.am;this.isOutside=!1,this.moveDistance=null,this.options=e,this.itm=n,this.em=i,this.axm=r,this.am=o}return InputObserver.prototype.atOutside=function(t){var e=this;if(this.isOutside)return this.axm.map(t,function(t,e,n){var i=n.range[0]-n.bounce[0],r=n.range[1]+n.bounce[1];return t>r?r:t<i?i:t});var n=this.am.easing(1e-5)/1e-5;return this.axm.map(t,function(t,i,r){var o=r.range[0],s=r.range[1],a=r.bounce;return t<o?o-e.am.easing((o-t)/(a[0]*n))*a[0]:t>s?s+e.am.easing((t-s)/(a[1]*n))*a[1]:t})},InputObserver.prototype.get=function(t){return this.axm.get(t.axes)},InputObserver.prototype.hold=function(t,e){if(!this.itm.isInterrupted()&&t.axes.length){var n={input:t,event:e};this.itm.setInterrupt(!0),this.am.grab(t.axes,n),!this.moveDistance&&this.em.triggerHold(this.axm.get(),n),this.isOutside=this.axm.isOutside(t.axes),this.moveDistance=this.axm.get(t.axes)}},InputObserver.prototype.change=function(t,e,n){if(this.itm.isInterrupting()&&!this.axm.every(n,function(t){return 0===t})){var i,r=this.axm.get(t.axes);i=this.axm.map(this.moveDistance||r,function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=i),i=this.axm.map(i,function(t,e,n){return o["default"].getCirculatedPos(t,n.range,n.circular)}),this.isOutside&&this.axm.every(r,function(t,e,n){return!o["default"].isOutside(t,n.range)})&&(this.isOutside=!1),i=this.atOutside(i),this.em.triggerChange(i,{input:t,event:e},!0)}},InputObserver.prototype.release=function(t,e,n,s){if(this.itm.isInterrupting()&&this.moveDistance){var a=this.axm.get(t.axes),u=this.axm.get(),h=this.axm.get(this.axm.map(n,function(t,e,n){return n.circular&&(n.circular[0]||n.circular[1])?a[e]+t:o["default"].getInsidePosition(a[e]+t,n.range,n.circular,n.bounce)})),c=this.am.getDuration(h,a,s);0===c&&(h=i({},u));var p={depaPos:u,destPos:h,duration:c,delta:this.axm.getDelta(u,h),inputEvent:e,input:t,isTrusted:!0};this.em.triggerRelease(p),this.moveDistance=null;var l=this.am.getUserControll(p),f=r.AxisManager.equal(l.destPos,u),m={input:t,event:e};f||0===l.duration?(!f&&this.em.triggerChange(l.destPos,m,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(m):this.em.triggerFinish(!0)):this.am.animateTo(l.destPos,l.duration,m)}},InputObserver}();e.InputObserver=s},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(4),o=n(5),s=n(0),a=n(1),u=function(){function PanInput(t,e){if(this.axes=[],this.hammer=null,this.element=null,this.panRecognizer=null,void 0===r)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=s.$(t),this.options=i({inputType:["touch","mouse","pointer"],scale:[1,1],thresholdAngle:45,threshold:0,hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}}},e),this.onHammerInput=this.onHammerInput.bind(this),this.onPanmove=this.onPanmove.bind(this),this.onPanend=this.onPanend.bind(this)}return PanInput.getDirectionByAngle=function(t,e){if(e<0||e>90)return o.DIRECTION.DIRECTION_NONE;var n=Math.abs(t);return n>e&&n<180-e?o.DIRECTION.DIRECTION_VERTICAL:o.DIRECTION.DIRECTION_HORIZONTAL},PanInput.getNextOffset=function(t,e){var n=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.abs(n/-e);return[t[0]/2*i,t[1]/2*i]},PanInput.useDirection=function(t,e,n){return n?!!(e===o.DIRECTION.DIRECTION_ALL||e&t&&n&t):!!(e&t)},PanInput.prototype.mapAxes=function(t){var e=!!t[0],n=!!t[1];this._direction=e&&n?o.DIRECTION.DIRECTION_ALL:e?o.DIRECTION.DIRECTION_HORIZONTAL:n?o.DIRECTION.DIRECTION_VERTICAL:o.DIRECTION.DIRECTION_NONE,this.axes=t},PanInput.prototype.connect=function(t){var e={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var n=this.element[a.UNIQUEKEY];n||(n=String(Math.round(Math.random()*(new Date).getTime())));var o=a.convertInputType(this.options.inputType);if(!o)throw new Error("Wrong inputType parameter!");this.hammer=a.createHammer(this.element,i({inputClass:o},this.options.hammerManagerOptions)),this.element[a.UNIQUEKEY]=n}return this.panRecognizer=new r.Pan(e),this.hammer.add(this.panRecognizer),this.attachEvent(t),this},PanInput.prototype.disconnect=function(){return this.removeRecognizer(),this.hammer&&this.dettachEvent(),this._direction=o.DIRECTION.DIRECTION_NONE,this},PanInput.prototype.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[a.UNIQUEKEY],this.element=null,this.hammer=null},PanInput.prototype.enable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!0),this},PanInput.prototype.disable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!1),this},PanInput.prototype.isEnable=function(){return!(!this.hammer||!this.hammer.get("pan").options.enable)},PanInput.prototype.removeRecognizer=function(){this.hammer&&this.panRecognizer&&(this.hammer.remove(this.panRecognizer),this.panRecognizer=null)},PanInput.prototype.onHammerInput=function(t){this.isEnable()&&(t.isFirst?this.observer.hold(this,t):t.isFinal&&this.onPanend(t))},PanInput.prototype.onPanmove=function(t){var e=PanInput.getDirectionByAngle(t.angle,this.options.thresholdAngle),n=this.hammer.session.prevInput;n?(t.offsetX=t.deltaX-n.deltaX,t.offsetY=t.deltaY-n.deltaY):(t.offsetX=0,t.offsetY=0);var i=this.getOffset([t.offsetX,t.offsetY],[PanInput.useDirection(o.DIRECTION.DIRECTION_HORIZONTAL,this._direction,e),PanInput.useDirection(o.DIRECTION.DIRECTION_VERTICAL,this._direction,e)]),r=i.some(function(t){return 0!==t});r&&(t.srcEvent.preventDefault(),t.srcEvent.stopPropagation()),t.preventSystemEvent=r,r&&this.observer.change(this,t,a.toAxis(this.axes,i))},PanInput.prototype.onPanend=function(t){var e=this.getOffset([Math.abs(t.velocityX)*(t.deltaX<0?-1:1),Math.abs(t.velocityY)*(t.deltaY<0?-1:1)],[PanInput.useDirection(o.DIRECTION.DIRECTION_HORIZONTAL,this._direction),PanInput.useDirection(o.DIRECTION.DIRECTION_VERTICAL,this._direction)]);e=PanInput.getNextOffset(e,this.observer.options.deceleration),this.observer.release(this,t,a.toAxis(this.axes,e))},PanInput.prototype.attachEvent=function(t){this.observer=t,this.hammer.on("hammer.input",this.onHammerInput).on("panstart panmove",this.onPanmove)},PanInput.prototype.dettachEvent=function(){this.hammer.off("hammer.input",this.onHammerInput).off("panstart panmove",this.onPanmove),this.observer=null},PanInput.prototype.getOffset=function(t,e){var n=[0,0],i=this.options.scale;return e[0]&&(n[0]=t[0]*i[0]),e[1]&&(n[1]=t[1]*i[1]),n},PanInput}();e.PanInput=u},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(4),o=n(0),s=n(1),a=function(){function PinchInput(t,e){if(this.axes=[],this.hammer=null,this.element=null,this._base=null,this._prev=null,this.pinchRecognizer=null,void 0===r)throw new Error("The Hammerjs must be loaded before eg.Axes.PinchInput.\nhttp://hammerjs.github.io/");this.element=o.$(t),this.options=i({scale:1,threshold:0,inputType:["touch","pointer"],hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}}},e),this.onPinchStart=this.onPinchStart.bind(this),this.onPinchMove=this.onPinchMove.bind(this),this.onPinchEnd=this.onPinchEnd.bind(this)}return PinchInput.prototype.mapAxes=function(t){this.axes=t},PinchInput.prototype.connect=function(t){var e={threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var n=this.element[s.UNIQUEKEY];n||(n=String(Math.round(Math.random()*(new Date).getTime())));var o=s.convertInputType(this.options.inputType);if(!o)throw new Error("Wrong inputType parameter!");this.hammer=s.createHammer(this.element,i({inputClass:o},this.options.hammerManagerOptions)),this.element[s.UNIQUEKEY]=n}return this.pinchRecognizer=new r.Pinch(e),this.hammer.add(this.pinchRecognizer),this.attachEvent(t),this},PinchInput.prototype.disconnect=function(){return this.removeRecognizer(),this.hammer&&(this.hammer.remove(this.pinchRecognizer),this.pinchRecognizer=null,this.dettachEvent()),this},PinchInput.prototype.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[s.UNIQUEKEY],this.element=null,this.hammer=null},PinchInput.prototype.removeRecognizer=function(){this.hammer&&this.pinchRecognizer&&(this.hammer.remove(this.pinchRecognizer),this.pinchRecognizer=null)},PinchInput.prototype.onPinchStart=function(t){this._base=this.observer.get(this)[this.axes[0]];var e=this.getOffset(t.scale);this.observer.hold(this,t),this.observer.change(this,t,s.toAxis(this.axes,[e])),this._prev=t.scale},PinchInput.prototype.onPinchMove=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,s.toAxis(this.axes,[e])),this._prev=t.scale},PinchInput.prototype.onPinchEnd=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,s.toAxis(this.axes,[e])),this.observer.release(this,t,s.toAxis(this.axes,[0]),0),this._base=null,this._prev=null},PinchInput.prototype.getOffset=function(t,e){return void 0===e&&(e=1),this._base*(t-e)*this.options.scale},PinchInput.prototype.attachEvent=function(t){this.observer=t,this.hammer.on("pinchstart",this.onPinchStart).on("pinchmove",this.onPinchMove).on("pinchend",this.onPinchEnd)},PinchInput.prototype.dettachEvent=function(){this.hammer.off("pinchstart",this.onPinchStart).off("pinchmove",this.onPinchMove).off("pinchend",this.onPinchEnd),this.observer=null,this._prev=null},PinchInput.prototype.enable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!0),this},PinchInput.prototype.disable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!1),this},PinchInput.prototype.isEnable=function(){return!(!this.hammer||!this.hammer.get("pinch").options.enable)},PinchInput}();e.PinchInput=a},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(0),o=n(1),s=function(){function WheelInput(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this._timer=null,this.element=r.$(t),this.options=i({scale:1,useNormalized:!0},e),this.onWheel=this.onWheel.bind(this)}return WheelInput.prototype.mapAxes=function(t){this.axes=t},WheelInput.prototype.connect=function(t){return this.dettachEvent(),this.attachEvent(t),this},WheelInput.prototype.disconnect=function(){return this.dettachEvent(),this},WheelInput.prototype.destroy=function(){this.disconnect(),this.element=null},WheelInput.prototype.onWheel=function(t){var e=this;if(this._isEnabled&&(t.preventDefault(),0!==t.deltaY)){this._isHolded||(this.observer.hold(this,t),this._isHolded=!0);var n=(t.deltaY>0?-1:1)*this.options.scale*(this.options.useNormalized?1:Math.abs(t.deltaY));this.observer.change(this,t,o.toAxis(this.axes,[n])),clearTimeout(this._timer);this._timer=setTimeout(function(){e._isHolded&&(e._isHolded=!1,e.observer.release(e,t,o.toAxis(e.axes,[0])))},50)}},WheelInput.prototype.attachEvent=function(t){this.observer=t,this.element.addEventListener("wheel",this.onWheel),this._isEnabled=!0},WheelInput.prototype.dettachEvent=function(){this.element.removeEventListener("wheel",this.onWheel),this._isEnabled=!1,this.observer=null},WheelInput.prototype.enable=function(){return this._isEnabled=!0,this},WheelInput.prototype.disable=function(){return this._isEnabled=!1,this},WheelInput.prototype.isEnable=function(){return this._isEnabled},WheelInput}();e.WheelInput=s},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(0),o=n(1);e.KEYMAP={LEFT_ARROW:37,A:65,UP_ARROW:38,W:87,RIGHT_ARROW:39,D:68,DOWN_ARROW:40,S:83};var s=function(){function MoveKeyInput(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this._timer=null,this.element=r.$(t),this.options=i({scale:[1,1]},e),this.onKeydown=this.onKeydown.bind(this),this.onKeyup=this.onKeyup.bind(this)}return MoveKeyInput.prototype.mapAxes=function(t){this.axes=t},MoveKeyInput.prototype.connect=function(t){return this.dettachEvent(),"0"!==this.element.getAttribute("tabindex")&&this.element.setAttribute("tabindex","0"),this.attachEvent(t),this},MoveKeyInput.prototype.disconnect=function(){return this.dettachEvent(),this},MoveKeyInput.prototype.destroy=function(){this.disconnect(),this.element=null},MoveKeyInput.prototype.onKeydown=function(t){if(this._isEnabled){var n=!0,i=1,r=-1;switch(t.keyCode){case e.KEYMAP.LEFT_ARROW:case e.KEYMAP.A:i=-1;break;case e.KEYMAP.RIGHT_ARROW:case e.KEYMAP.D:break;case e.KEYMAP.DOWN_ARROW:case e.KEYMAP.S:i=-1,r=1;break;case e.KEYMAP.UP_ARROW:case e.KEYMAP.W:r=1;break;default:n=!1}if((-1===r&&!this.axes[0]||1===r&&!this.axes[1])&&(n=!1),n){var s=-1===r?[+this.options.scale[0]*i,0]:[0,+this.options.scale[1]*i];this._isHolded||(this.observer.hold(this,event),this._isHolded=!0),clearTimeout(this._timer),this.observer.change(this,event,o.toAxis(this.axes,s))}}},MoveKeyInput.prototype.onKeyup=function(t){var e=this;this._isHolded&&(clearTimeout(this._timer),this._timer=setTimeout(function(){e.observer.release(e,t,o.toAxis(e.axes,[0,0])),e._isHolded=!1},80))},MoveKeyInput.prototype.attachEvent=function(t){this.observer=t,this.element.addEventListener("keydown",this.onKeydown,!1),this.element.addEventListener("keypress",this.onKeydown,!1),this.element.addEventListener("keyup",this.onKeyup,!1),this._isEnabled=!0},MoveKeyInput.prototype.dettachEvent=function(){this.element.removeEventListener("keydown",this.onKeydown,!1),this.element.removeEventListener("keypress",this.onKeydown,!1),this.element.removeEventListener("keyup",this.onKeyup,!1),this._isEnabled=!1,this.observer=null},MoveKeyInput.prototype.enable=function(){return this._isEnabled=!0,this},MoveKeyInput.prototype.disable=function(){return this._isEnabled=!1,this},MoveKeyInput.prototype.isEnable=function(){return this._isEnabled},MoveKeyInput}();e.MoveKeyInput=s}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Axes=e():(t.eg=t.eg||{},t.eg.Axes=e())}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function __webpack_require__(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,__webpack_require__),i.l=!0,i.exports}return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=6)}([function(t,e,n){"use strict";function toArray(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}e.__esModule=!0,e.toArray=toArray,e.$=function $(t,e){var n;if(void 0===e&&(e=!1),"string"==typeof t){if(t.match(/^<([a-z]+)\s*([^>]*)>/)){var i=document.createElement("div");i.innerHTML=t,n=toArray(i.childNodes)}else n=toArray(document.querySelectorAll(t));e||(n=n.length>=1?n[0]:undefined)}else t===window?n=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in window&&t instanceof jQuery||t.constructor.prototype.jquery?n=e?t.toArray():t.get(0):Array.isArray(t)&&(n=t.map(function(t){return $(t)}),e||(n=n.length>=1?n[0]:undefined)):n=t;return n};var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame,r=window.cancelAnimationFrame||window.webkitCancelAnimationFrame;if(i&&!r){var o={},s=i;i=function(t){var e=s(function(n){o[e]&&t(n)});return o[e]=!0,e},r=function(t){delete o[t]}}else i&&r||(i=function(t){return window.setTimeout(function(){t(window.performance&&window.performance.now&&window.performance.now()||(new Date).getTime())},16)},r=window.clearTimeout);e.requestAnimationFrame=function(t){return i(t)},e.cancelAnimationFrame=function(t){r(t)}},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e};e.__esModule=!0;var o=r(n(4));e.SUPPORT_POINTER_EVENTS="PointerEvent"in window||"MSPointerEvent"in window,e.SUPPORT_TOUCH="ontouchstart"in window,e.UNIQUEKEY="_EGJS_AXES_INPUTTYPE_",e.toAxis=function(t,e){return e.reduce(function(e,n,i){return t[i]&&(e[t[i]]=n),e},{})},e.createHammer=function(t,e){try{return new o.Manager(t,i({},e))}catch(n){return null}},e.convertInputType=function(t){void 0===t&&(t=[]);var n=!1,i=!1,r=!1;return t.forEach(function(t){switch(t){case"mouse":i=!0;break;case"touch":n=e.SUPPORT_TOUCH;break;case"pointer":r=e.SUPPORT_POINTER_EVENTS}}),r?o.PointerEventInput:n&&i?o.TouchMouseInput:n?o.TouchInput:i?o.MouseInput:null}},function(t,e,n){"use strict";e.__esModule=!0;var i={getInsidePosition:function(t,e,n,i){var r=t,o=[n[0]?e[0]:i?e[0]-i[0]:e[0],n[1]?e[1]:i?e[1]+i[1]:e[1]];return r=Math.max(o[0],r),+(r=Math.min(o[1],r)).toFixed(5)},isOutside:function(t,e){return t<e[0]||t>e[1]},getDuration:function(t,e){var n=Math.sqrt(t/e*2);return n<100?0:n},isCircularable:function(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]},getCirculatedPos:function(t,e,n){var i=t,r=e[0],o=e[1],s=o-r;return n[1]&&t>o&&(i=(i-o)%s+r),n[0]&&t<r&&(i=(i-r)%s+o),+i.toFixed(5)}};e["default"]=i},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};e.__esModule=!0;var o=r(n(2)),s=function(){function AxisManager(t,e){var n=this;this.axis=t,this.options=e,this._complementOptions(),this._pos=Object.keys(this.axis).reduce(function(t,e){return t[e]=n.axis[e].range[0],t},{})}return AxisManager.equal=function(t,e){for(var n in t)if(t[n]!==e[n])return!1;return!0},AxisManager.prototype._complementOptions=function(){var t=this;Object.keys(this.axis).forEach(function(e){t.axis[e]=i({range:[0,100],bounce:[0,0],circular:[!1,!1]},t.axis[e]),["bounce","circular"].forEach(function(n){var i=t.axis,r=i[e][n];/string|number|boolean/.test(typeof r)&&(i[e][n]=[r,r])})})},AxisManager.prototype.getDelta=function(t,e){var n=this.get(t);return this.map(this.get(e),function(t,e){return t-n[e]})},AxisManager.prototype.get=function(t){var e=this;return t&&Array.isArray(t)?t.reduce(function(t,n){return n&&n in e._pos&&(t[n]=e._pos[n]),t},{}):i({},this._pos,t||{})},AxisManager.prototype.moveTo=function(t){var e=this,n=this.map(this._pos,function(n,i){return t[i]?t[i]-e._pos[i]:0});return this.set(t),{pos:i({},this._pos),delta:n}},AxisManager.prototype.set=function(t){for(var e in t)e&&e in this._pos&&(this._pos[e]=t[e])},AxisManager.prototype.every=function(t,e){var n=this.axis;for(var i in t)if(i&&!e(t[i],i,n[i]))return!1;return!0},AxisManager.prototype.filter=function(t,e){var n={},i=this.axis;for(var r in t)r&&e(t[r],r,i[r])&&(n[r]=t[r]);return n},AxisManager.prototype.map=function(t,e){var n={},i=this.axis;for(var r in t)r&&(n[r]=e(t[r],r,i[r]));return n},AxisManager.prototype.isOutside=function(t){return!this.every(t?this.get(t):this._pos,function(t,e,n){return!o["default"].isOutside(t,n.range)})},AxisManager}();e.AxisManager=s},function(t,e,n){var i;!function(r,o,s,a){"use strict";var u,h=["","webkit","Moz","MS","ms","o"],c=o.createElement("div"),p="function",l=Math.round,f=Math.abs,m=Date.now;function setTimeoutContext(t,e,n){return setTimeout(bindFn(t,n),e)}function invokeArrayArg(t,e,n){return!!Array.isArray(t)&&(each(t,n[e],n),!0)}function each(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==a)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function deprecate(t,e,n){var i="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=r.console&&(r.console.warn||r.console.log);return o&&o.call(r.console,i,n),t.apply(this,arguments)}}u="function"!=typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==a&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}:Object.assign;var d=deprecate(function(t,e,n){for(var i=Object.keys(e),r=0;r<i.length;)(!n||n&&t[i[r]]===a)&&(t[i[r]]=e[i[r]]),r++;return t},"extend","Use `assign`."),v=deprecate(function(t,e){return d(t,e,!0)},"merge","Use `assign`.");function inherit(t,e,n){var i,r=e.prototype;(i=t.prototype=Object.create(r)).constructor=t,i._super=r,n&&u(i,n)}function bindFn(t,e){return function(){return t.apply(e,arguments)}}function boolOrFn(t,e){return typeof t==p?t.apply(e&&e[0]||a,e):t}function ifUndefined(t,e){return t===a?e:t}function addEventListeners(t,e,n){each(splitStr(e),function(e){t.addEventListener(e,n,!1)})}function removeEventListeners(t,e,n){each(splitStr(e),function(e){t.removeEventListener(e,n,!1)})}function hasParent(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function inStr(t,e){return t.indexOf(e)>-1}function splitStr(t){return t.trim().split(/\s+/g)}function inArray(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;i<t.length;){if(n&&t[i][n]==e||!n&&t[i]===e)return i;i++}return-1}function toArray(t){return Array.prototype.slice.call(t,0)}function uniqueArray(t,e,n){for(var i=[],r=[],o=0;o<t.length;){var s=e?t[o][e]:t[o];inArray(r,s)<0&&i.push(t[o]),r[o]=s,o++}return n&&(i=e?i.sort(function(t,n){return t[e]>n[e]}):i.sort()),i}function prefixed(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),o=0;o<h.length;){if((i=(n=h[o])?n+r:e)in t)return i;o++}return a}var g=1;function getWindowForElement(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||r}var _="ontouchstart"in r,y=prefixed(r,"PointerEvent")!==a,I=_&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),E="touch",T="mouse",A=25,b=1,O=2,P=4,x=8,R=1,M=2,D=4,C=8,w=16,N=M|D,z=C|w,S=N|z,L=["x","y"],H=["clientX","clientY"];function Input(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){boolOrFn(t.options.enable,[t])&&n.handler(e)},this.init()}function inputHandler(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,o=e&b&&i-r==0,s=e&(P|x)&&i-r==0;n.isFirst=!!o,n.isFinal=!!s,o&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,i=e.pointers,r=i.length;n.firstInput||(n.firstInput=simpleCloneInputData(e));r>1&&!n.firstMultiple?n.firstMultiple=simpleCloneInputData(e):1===r&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,u=s?s.center:o.center,h=e.center=getCenter(i);e.timeStamp=m(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=getAngle(u,h),e.distance=getDistance(u,h),function(t,e){var n=e.center,i=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};e.eventType!==b&&o.eventType!==P||(r=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y});e.deltaX=r.x+(n.x-i.x),e.deltaY=r.y+(n.y-i.y)}(n,e),e.offsetDirection=getDirection(e.deltaX,e.deltaY);var c=getVelocity(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=f(c.x)>f(c.y)?c.x:c.y,e.scale=s?(d=s.pointers,v=i,getDistance(v[0],v[1],H)/getDistance(d[0],d[1],H)):1,e.rotation=s?(p=s.pointers,l=i,getAngle(l[1],l[0],H)+getAngle(p[1],p[0],H)):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,r,o,s=t.lastInterval||e,u=e.timeStamp-s.timeStamp;if(e.eventType!=x&&(u>A||s.velocity===a)){var h=e.deltaX-s.deltaX,c=e.deltaY-s.deltaY,p=getVelocity(u,h,c);i=p.x,r=p.y,n=f(p.x)>f(p.y)?p.x:p.y,o=getDirection(h,c),t.lastInterval=e}else n=s.velocity,i=s.velocityX,r=s.velocityY,o=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=o}(n,e);var p,l;var d,v;var g=t.element;hasParent(e.srcEvent.target,g)&&(g=e.srcEvent.target);e.target=g}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function simpleCloneInputData(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:l(t.pointers[n].clientX),clientY:l(t.pointers[n].clientY)},n++;return{timeStamp:m(),pointers:e,center:getCenter(e),deltaX:t.deltaX,deltaY:t.deltaY}}function getCenter(t){var e=t.length;if(1===e)return{x:l(t[0].clientX),y:l(t[0].clientY)};for(var n=0,i=0,r=0;r<e;)n+=t[r].clientX,i+=t[r].clientY,r++;return{x:l(n/e),y:l(i/e)}}function getVelocity(t,e,n){return{x:e/t||0,y:n/t||0}}function getDirection(t,e){return t===e?R:f(t)>=f(e)?t<0?M:D:e<0?C:w}function getDistance(t,e,n){n||(n=L);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function getAngle(t,e,n){n||(n=L);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return 180*Math.atan2(r,i)/Math.PI}Input.prototype={handler:function(){},init:function(){this.evEl&&addEventListeners(this.element,this.evEl,this.domHandler),this.evTarget&&addEventListeners(this.target,this.evTarget,this.domHandler),this.evWin&&addEventListeners(getWindowForElement(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&removeEventListeners(this.element,this.evEl,this.domHandler),this.evTarget&&removeEventListeners(this.target,this.evTarget,this.domHandler),this.evWin&&removeEventListeners(getWindowForElement(this.element),this.evWin,this.domHandler)}};var k={mousedown:b,mousemove:O,mouseup:P},W="mousedown",j="mousemove mouseup";function MouseInput(){this.evEl=W,this.evWin=j,this.pressed=!1,Input.apply(this,arguments)}inherit(MouseInput,Input,{handler:function(t){var e=k[t.type];e&b&&0===t.button&&(this.pressed=!0),e&O&&1!==t.which&&(e=P),this.pressed&&(e&P&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:T,srcEvent:t}))}});var q={pointerdown:b,pointermove:O,pointerup:P,pointercancel:x,pointerout:x},F={2:E,3:"pen",4:T,5:"kinect"},Y="pointerdown",U="pointermove pointerup pointercancel";function PointerEventInput(){this.evEl=Y,this.evWin=U,Input.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r.MSPointerEvent&&!r.PointerEvent&&(Y="MSPointerDown",U="MSPointerMove MSPointerUp MSPointerCancel"),inherit(PointerEventInput,Input,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=q[i],o=F[t.pointerType]||t.pointerType,s=o==E,a=inArray(e,t.pointerId,"pointerId");r&b&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):r&(P|x)&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(a,1))}});var K={touchstart:b,touchmove:O,touchend:P,touchcancel:x},X="touchstart",V="touchstart touchmove touchend touchcancel";function SingleTouchInput(){this.evTarget=X,this.evWin=V,this.started=!1,Input.apply(this,arguments)}inherit(SingleTouchInput,Input,{handler:function(t){var e=K[t.type];if(e===b&&(this.started=!0),this.started){var n=function(t,e){var n=toArray(t.touches),i=toArray(t.changedTouches);e&(P|x)&&(n=uniqueArray(n.concat(i),"identifier",!0));return[n,i]}.call(this,t,e);e&(P|x)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:E,srcEvent:t})}}});var B={touchstart:b,touchmove:O,touchend:P,touchcancel:x},G="touchstart touchmove touchend touchcancel";function TouchInput(){this.evTarget=G,this.targetIds={},Input.apply(this,arguments)}inherit(TouchInput,Input,{handler:function(t){var e=B[t.type],n=function(t,e){var n=toArray(t.touches),i=this.targetIds;if(e&(b|O)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,s=toArray(t.changedTouches),a=[],u=this.target;if(o=n.filter(function(t){return hasParent(t.target,u)}),e===b)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;r=0;for(;r<s.length;)i[s[r].identifier]&&a.push(s[r]),e&(P|x)&&delete i[s[r].identifier],r++;if(!a.length)return;return[uniqueArray(o.concat(a),"identifier",!0),a]}.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:E,srcEvent:t})}});var Z=2500,Q=25;function TouchMouseInput(){Input.apply(this,arguments);var t=bindFn(this.handler,this);this.touch=new TouchInput(this.manager,t),this.mouse=new MouseInput(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function setLastTouch(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var i=this.lastTouches;setTimeout(function(){var t=i.indexOf(n);t>-1&&i.splice(t,1)},Z)}}inherit(TouchMouseInput,Input,{handler:function(t,e,n){var i=n.pointerType==E,r=n.pointerType==T;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)(function(t,e){t&b?(this.primaryTouch=e.changedPointers[0].identifier,setLastTouch.call(this,e)):t&(P|x)&&setLastTouch.call(this,e)}).call(this,e,n);else if(r&&function(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(e-r.x),s=Math.abs(n-r.y);if(o<=Q&&s<=Q)return!0}return!1}.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var $=prefixed(c.style,"touchAction"),J=$!==a,tt="compute",et="auto",nt="manipulation",it="none",rt="pan-x",ot="pan-y",st=function(){if(!J)return!1;var t={},e=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){t[n]=!e||r.CSS.supports("touch-action",n)}),t}();function TouchAction(t,e){this.manager=t,this.set(e)}TouchAction.prototype={set:function(t){t==tt&&(t=this.compute()),J&&this.manager.element.style&&st[t]&&(this.manager.element.style[$]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return each(this.manager.recognizers,function(e){boolOrFn(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(t){if(inStr(t,it))return it;var e=inStr(t,rt),n=inStr(t,ot);if(e&&n)return it;if(e||n)return e?rt:ot;if(inStr(t,nt))return nt;return et}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var i=this.actions,r=inStr(i,it)&&!st[it],o=inStr(i,ot)&&!st[ot],s=inStr(i,rt)&&!st[rt];if(r){var a=1===t.pointers.length,u=t.distance<2,h=t.deltaTime<250;if(a&&u&&h)return}if(!s||!o)return r||o&&n&N||s&&n&z?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var at=1,ut=2,ht=4,ct=8,pt=ct,lt=16;function Recognizer(t){this.options=u({},this.defaults,t||{}),this.id=g++,this.manager=null,this.options.enable=ifUndefined(this.options.enable,!0),this.state=at,this.simultaneous={},this.requireFail=[]}function stateStr(t){return t<?"cancel":t&ct?"end":t&ht?"move":t&ut?"start":""}function directionStr(t){return t==w?"down":t==C?"up":t==M?"left":t==D?"right":""}function getRecognizerByNameIfManager(t,e){var n=e.manager;return n?n.get(t):t}function AttrRecognizer(){Recognizer.apply(this,arguments)}function PanRecognizer(){AttrRecognizer.apply(this,arguments),this.pX=null,this.pY=null}function PinchRecognizer(){AttrRecognizer.apply(this,arguments)}function PressRecognizer(){Recognizer.apply(this,arguments),this._timer=null,this._input=null}function RotateRecognizer(){AttrRecognizer.apply(this,arguments)}function SwipeRecognizer(){AttrRecognizer.apply(this,arguments)}function TapRecognizer(){Recognizer.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Hammer(t,e){return(e=e||{}).recognizers=ifUndefined(e.recognizers,Hammer.defaults.preset),new Manager(t,e)}Recognizer.prototype={defaults:{},set:function(t){return u(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(invokeArrayArg(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=getRecognizerByNameIfManager(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return invokeArrayArg(t,"dropRecognizeWith",this)?this:(t=getRecognizerByNameIfManager(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(invokeArrayArg(t,"requireFailure",this))return this;var e=this.requireFail;return-1===inArray(e,t=getRecognizerByNameIfManager(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(invokeArrayArg(t,"dropRequireFailure",this))return this;t=getRecognizerByNameIfManager(t,this);var e=inArray(this.requireFail,t);return e>-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){var e=this,n=this.state;function emit(n){e.manager.emit(n,t)}n<ct&&emit(e.options.event+stateStr(n)),emit(e.options.event),t.additionalEvent&&emit(t.additionalEvent),n>=ct&&emit(e.options.event+stateStr(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(32|at)))return!1;t++}return!0},recognize:function(t){var e=u({},t);if(!boolOrFn(this.options.enable,[this,e]))return this.reset(),void(this.state=32);this.state&(pt|lt|32)&&(this.state=at),this.state=this.process(e),this.state&(ut|ht|ct|lt)&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},inherit(AttrRecognizer,Recognizer,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,i=e&(ut|ht),r=this.attrTest(t);return i&&(n&x||!r)?e|lt:i||r?n&P?e|ct:e&ut?e|ht:ut:32}}),inherit(PanRecognizer,AttrRecognizer,{defaults:{event:"pan",threshold:10,pointers:1,direction:S},getTouchAction:function(){var t=this.options.direction,e=[];return t&N&&e.push(ot),t&z&&e.push(rt),e},directionTest:function(t){var e=this.options,n=!0,i=t.distance,r=t.direction,o=t.deltaX,s=t.deltaY;return r&e.direction||(e.direction&N?(r=0===o?R:o<0?M:D,n=o!=this.pX,i=Math.abs(t.deltaX)):(r=0===s?R:s<0?C:w,n=s!=this.pY,i=Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},attrTest:function(t){return AttrRecognizer.prototype.attrTest.call(this,t)&&(this.state&ut||!(this.state&ut)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=directionStr(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),inherit(PinchRecognizer,AttrRecognizer,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[it]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ut)},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)}}),inherit(PressRecognizer,Recognizer,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[et]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime>e.time;if(this._input=t,!i||!n||t.eventType&(P|x)&&!r)this.reset();else if(t.eventType&b)this.reset(),this._timer=setTimeoutContext(function(){this.state=pt,this.tryEmit()},e.time,this);else if(t.eventType&P)return pt;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===pt&&(t&&t.eventType&P?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=m(),this.manager.emit(this.options.event,this._input)))}}),inherit(RotateRecognizer,AttrRecognizer,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[it]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ut)}}),inherit(SwipeRecognizer,AttrRecognizer,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:N|z,pointers:1},getTouchAction:function(){return PanRecognizer.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(N|z)?e=t.overallVelocity:n&N?e=t.overallVelocityX:n&z&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&f(e)>this.options.velocity&&t.eventType&P},emit:function(t){var e=directionStr(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),inherit(TapRecognizer,Recognizer,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[nt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime<e.time;if(this.reset(),t.eventType&b&&0===this.count)return this.failTimeout();if(i&&r&&n){if(t.eventType!=P)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||getDistance(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,s&&o?this.count+=1:this.count=1,this._input=t,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=setTimeoutContext(function(){this.state=pt,this.tryEmit()},e.interval,this),ut):pt}return 32},failTimeout:function(){return this._timer=setTimeoutContext(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==pt&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Hammer.VERSION="2.0.7",Hammer.defaults={domEvents:!1,touchAction:tt,enable:!0,inputTarget:null,inputClass:null,preset:[[RotateRecognizer,{enable:!1}],[PinchRecognizer,{enable:!1},["rotate"]],[SwipeRecognizer,{direction:N}],[PanRecognizer,{direction:N},["swipe"]],[TapRecognizer],[TapRecognizer,{event:"doubletap",taps:2},["tap"]],[PressRecognizer]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Manager(t,e){var n;this.options=u({},Hammer.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((n=this).options.inputClass||(y?PointerEventInput:I?TouchInput:_?TouchMouseInput:MouseInput))(n,inputHandler),this.touchAction=new TouchAction(this,this.options.touchAction),toggleCssProps(this,!0),each(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function toggleCssProps(t,e){var n,i=t.element;i.style&&(each(t.options.cssProps,function(r,o){n=prefixed(i.style,o),e?(t.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=t.oldCssProps[n]||""}),e||(t.oldCssProps={}))}Manager.prototype={set:function(t){return u(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var i=this.recognizers,r=e.curRecognizer;(!r||r&&r.state&pt)&&(r=e.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],2===e.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(t),!r&&n.state&(ut|ht|ct)&&(r=e.curRecognizer=n),o++}},get:function(t){if(t instanceof Recognizer)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(invokeArrayArg(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(invokeArrayArg(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=inArray(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(t!==a&&e!==a){var n=this.handlers;return each(splitStr(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this}},off:function(t,e){if(t!==a){var n=this.handlers;return each(splitStr(t),function(t){e?n[t]&&n[t].splice(inArray(n[t],e),1):delete n[t]}),this}},emit:function(t,e){var n,i,r;this.options.domEvents&&(n=t,i=e,(r=o.createEvent("Event")).initEvent(n,!0,!0),r.gesture=i,i.target.dispatchEvent(r));var s=this.handlers[t]&&this.handlers[t].slice();if(s&&s.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var a=0;a<s.length;)s[a](e),a++}},destroy:function(){this.element&&toggleCssProps(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},u(Hammer,{INPUT_START:b,INPUT_MOVE:O,INPUT_END:P,INPUT_CANCEL:x,STATE_POSSIBLE:at,STATE_BEGAN:ut,STATE_CHANGED:ht,STATE_ENDED:ct,STATE_RECOGNIZED:pt,STATE_CANCELLED:lt,STATE_FAILED:32,DIRECTION_NONE:R,DIRECTION_LEFT:M,DIRECTION_RIGHT:D,DIRECTION_UP:C,DIRECTION_DOWN:w,DIRECTION_HORIZONTAL:N,DIRECTION_VERTICAL:z,DIRECTION_ALL:S,Manager:Manager,Input:Input,TouchAction:TouchAction,TouchInput:TouchInput,MouseInput:MouseInput,PointerEventInput:PointerEventInput,TouchMouseInput:TouchMouseInput,SingleTouchInput:SingleTouchInput,Recognizer:Recognizer,AttrRecognizer:AttrRecognizer,Tap:TapRecognizer,Pan:PanRecognizer,Swipe:SwipeRecognizer,Pinch:PinchRecognizer,Rotate:RotateRecognizer,Press:PressRecognizer,on:addEventListeners,off:removeEventListeners,each:each,merge:v,extend:d,assign:u,inherit:inherit,bindFn:bindFn,prefixed:prefixed}),(void 0!==r?r:"undefined"!=typeof self?self:{}).Hammer=Hammer,(i=function(){return Hammer}.call(e,n,e,t))===a||(t.exports=i)}(window,document)},function(t,e,n){"use strict";var i;e.__esModule=!0,(i=e.DIRECTION||(e.DIRECTION={}))[i.DIRECTION_NONE=1]="DIRECTION_NONE",i[i.DIRECTION_LEFT=2]="DIRECTION_LEFT",i[i.DIRECTION_RIGHT=4]="DIRECTION_RIGHT",i[i.DIRECTION_HORIZONTAL=6]="DIRECTION_HORIZONTAL",i[i.DIRECTION_UP=8]="DIRECTION_UP",i[i.DIRECTION_DOWN=16]="DIRECTION_DOWN",i[i.DIRECTION_VERTICAL=24]="DIRECTION_VERTICAL",i[i.DIRECTION_ALL=30]="DIRECTION_ALL",e.TRANSFORM=function(){for(var t=(document.head||document.getElementsByTagName("head")[0]).style,e=["transform","webkitTransform","msTransform","mozTransform"],n=0,i=e.length;n<i;n++)if(e[n]in t)return e[n];return""}()},function(t,e,n){"use strict";var i=(this&&this.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}})(n(7)),r=n(13),o=n(14),s=n(15),a=n(16);i["default"].PanInput=r.PanInput,i["default"].PinchInput=o.PinchInput,i["default"].WheelInput=s.WheelInput,i["default"].MoveKeyInput=a.MoveKeyInput,t.exports=i["default"]},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function __(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}),o=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};e.__esModule=!0;var a=s(n(8)),u=n(9),h=n(10),c=n(11),p=n(3),l=n(12),f=n(5),m=function(t){function Axes(e,n,i){void 0===e&&(e={});var r=t.call(this)||this;return r.axis=e,r._inputs=[],r.options=o({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:Infinity,minimumDuration:0,deceleration:6e-4},n),r.itm=new c.InterruptManager(r.options),r.axm=new p.AxisManager(r.axis,r.options),r.em=new h.EventManager(r),r.am=new u.AnimationManager(r),r.io=new l.InputObserver(r),r.em.setAnimationManager(r.am),i&&r.em.triggerChange(i),r}return r(Axes,t),Axes.prototype.connect=function(t,e){var n;if(n="string"==typeof t?t.split(" "):t.concat(),~this._inputs.indexOf(e)&&this.disconnect(e),"hammer"in e){var i=this._inputs.filter(function(t){return t.hammer&&t.element===e.element});i.length&&(e.hammer=i[0].hammer)}return e.mapAxes(n),e.connect(this.io),this._inputs.push(e),this},Axes.prototype.disconnect=function(t){if(t){var e=this._inputs.indexOf(t);e>=0&&(this._inputs[e].disconnect(),this._inputs.splice(e,1))}else this._inputs.forEach(function(t){return t.disconnect()}),this._inputs=[];return this},Axes.prototype.get=function(t){return this.axm.get(t)},Axes.prototype.setTo=function(t,e){return void 0===e&&(e=0),this.am.setTo(t,e),this},Axes.prototype.setBy=function(t,e){return void 0===e&&(e=0),this.am.setBy(t,e),this},Axes.prototype.isBounceArea=function(t){return this.axm.isOutside(t)},Axes.prototype.destroy=function(){this.disconnect(),this.em.destroy()},Axes.VERSION="#__VERSION__#",Axes.TRANSFORM=f.TRANSFORM,Axes.DIRECTION_NONE=f.DIRECTION.DIRECTION_NONE,Axes.DIRECTION_LEFT=f.DIRECTION.DIRECTION_LEFT,Axes.DIRECTION_RIGHT=f.DIRECTION.DIRECTION_RIGHT,Axes.DIRECTION_UP=f.DIRECTION.DIRECTION_UP,Axes.DIRECTION_DOWN=f.DIRECTION.DIRECTION_DOWN,Axes.DIRECTION_HORIZONTAL=f.DIRECTION.DIRECTION_HORIZONTAL,Axes.DIRECTION_VERTICAL=f.DIRECTION.DIRECTION_VERTICAL,Axes.DIRECTION_ALL=f.DIRECTION.DIRECTION_ALL,Axes}(a["default"]);e["default"]=m},function(t,e,n){var i;i=function(){return function(t){var e={};function __webpack_require__(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,__webpack_require__),i.l=!0,i.exports}return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=2)}([function(t,e,n){"use strict";e.__esModule=!0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var r=function(){function Component(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,Component),this._eventHandler={},this.options={}}return Component.prototype.trigger=function(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=this._eventHandler[t]||[];if(!(n.length>0))return!0;n=n.concat(),e.eventType=t;var i=!1,r=[e],o=0;e.stop=function(){i=!0},e.currentTarget=this;for(var s=arguments.length,a=Array(s>2?s-2:0),u=2;u<s;u++)a[u-2]=arguments[u];for(a.length>=1&&(r=r.concat(a)),o=0;n[o];o++)n[o].apply(this,r);return!i},Component.prototype.once=function(t,e){if("object"===(void 0===t?"undefined":i(t))&&void 0===e){var n=t,r=void 0;for(r in n)this.once(r,n[r]);return this}if("string"==typeof t&&"function"==typeof e){var o=this;this.on(t,function listener(){for(var n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];e.apply(o,i),o.off(t,listener)})}return this},Component.prototype.hasOn=function(t){return!!this._eventHandler[t]},Component.prototype.on=function(t,e){if("object"===(void 0===t?"undefined":i(t))&&void 0===e){var n=t,r=void 0;for(r in n)this.on(r,n[r]);return this}if("string"==typeof t&&"function"==typeof e){var o=this._eventHandler[t];void 0===o&&(this._eventHandler[t]=[],o=this._eventHandler[t]),o.push(e)}return this},Component.prototype.off=function(t,e){if(void 0===t)return this._eventHandler={},this;if(void 0===e){if("string"==typeof t)return this._eventHandler[t]=undefined,this;var n=t,i=void 0;for(i in n)this.off(i,n[i]);return this}var r=this._eventHandler[t];if(r){var o=void 0,s=void 0;for(o=0;(s=r[o])!==undefined;o++)if(s===e){r=r.splice(o,1);break}}return this},Component}();e["default"]=r,t.exports=e["default"]},,function(t,e,n){"use strict";e.__esModule=!0;var i,r=n(0),o=(i=r)&&i.__esModule?i:{"default":i};o["default"].VERSION="2.1.1",e["default"]=o["default"],t.exports=e["default"]}])},t.exports=i()},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};e.__esModule=!0;var o=r(n(2)),s=n(3),a=n(0),u=function(){function AnimationManager(t){var e=t.options,n=t.itm,i=t.em,r=t.axm;this.options=e,this.itm=n,this.em=i,this.axm=r,this.animationEnd=this.animationEnd.bind(this)}return AnimationManager.getDuration=function(t,e,n){return Math.max(Math.min(t,n),e)},AnimationManager.prototype.getDuration=function(t,e,n){var i,r=this;if(void 0!==n)i=n;else{var s=this.axm.map(e,function(e,n){return o["default"].getDuration(Math.abs(Math.abs(e)-Math.abs(t[n])),r.options.deceleration)});i=Object.keys(s).reduce(function(t,e){return Math.max(t,s[e])},-Infinity)}return AnimationManager.getDuration(i,this.options.minimumDuration,this.options.maximumDuration)},AnimationManager.prototype.createAnimationParam=function(t,e,n){var i=this.axm.get(),r=t,o=n&&n.event||null;return{depaPos:i,destPos:r,duration:AnimationManager.getDuration(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,r),inputEvent:o,input:n&&n.input||null,isTrusted:!!o,done:this.animationEnd}},AnimationManager.prototype.grab=function(t,e){if(this._animateParam&&t.length){var n=this.axm.get(t),i=this.axm.map(n,function(t,e,n){return o["default"].getCirculatedPos(t,n.range,n.circular)});this.axm.every(i,function(t,e){return n[e]===t})||this.em.triggerChange(i,e,!!e),this._animateParam=null,this._raf&&a.cancelAnimationFrame(this._raf),this._raf=null,this.em.triggerAnimationEnd(!(!e||!e.event))}},AnimationManager.prototype.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},AnimationManager.prototype.restore=function(t){var e=this.axm.get(),n=this.axm.map(e,function(t,e,n){return Math.min(n.range[1],Math.max(n.range[0],t))});this.animateTo(n,this.getDuration(e,n),t)},AnimationManager.prototype.animationEnd=function(){var t=this.getEventInfo();this._animateParam=null;var e=this.axm.filter(this.axm.get(),function(t,e,n){return o["default"].isCircularable(t,n.range,n.circular)});Object.keys(e).length>0&&this.setTo(this.axm.map(e,function(t,e,n){return o["default"].getCirculatedPos(t,n.range,n.circular)})),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(!!t),this.axm.isOutside()?this.restore(t):this.em.triggerFinish(!!t)},AnimationManager.prototype.animateLoop=function(t,e){if(this._animateParam=i({},t),this._animateParam.startTime=(new Date).getTime(),t.duration){var n=this._animateParam,r=this;!function loop(){if(r._raf=null,r.frame(n)>=1)return s.AxisManager.equal(t.destPos,r.axm.get(Object.keys(t.destPos)))||r.em.triggerChange(t.destPos),void e();r._raf=a.requestAnimationFrame(loop)}()}else this.em.triggerChange(t.destPos),e()},AnimationManager.prototype.getUserControll=function(t){var e=t.setTo();return e.destPos=this.axm.get(e.destPos),e.duration=AnimationManager.getDuration(e.duration,this.options.minimumDuration,this.options.maximumDuration),e},AnimationManager.prototype.animateTo=function(t,e,n){var r=this,a=this.createAnimationParam(t,e,n),u=i({},a.depaPos),h=this.em.triggerAnimationStart(a),c=this.getUserControll(a);if(!h&&this.axm.every(c.destPos,function(t,e,n){return o["default"].isCircularable(t,n.range,n.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),h&&!s.AxisManager.equal(c.destPos,u)){var p=n&&n.event||null;this.animateLoop({depaPos:u,destPos:c.destPos,duration:c.duration,delta:this.axm.getDelta(u,c.destPos),isTrusted:!!p,inputEvent:p,input:n&&n.input||null},function(){return r.animationEnd()})}},AnimationManager.prototype.frame=function(t){var e=(new Date).getTime()-t.startTime,n=this.easing(e/t.duration),i=t.depaPos;return i=this.axm.map(i,function(e,i,r){return e+=t.delta[i]*n,o["default"].getCirculatedPos(e,r.range,r.circular)}),this.em.triggerChange(i),n},AnimationManager.prototype.easing=function(t){return t>1?1:this.options.easing(t)},AnimationManager.prototype.setTo=function(t,e){void 0===e&&(e=0);var n=Object.keys(t);this.grab(n);var i=this.axm.get(n);if(s.AxisManager.equal(t,i))return this;this.itm.setInterrupt(!0);var r=this.axm.filter(t,function(t,e){return i[e]!==t});return Object.keys(r).length?(r=this.axm.map(r,function(t,n,i){return i.circular&&(i.circular[0]||i.circular[1])?e>0?t:o["default"].getCirculatedPos(t,i.range,i.circular):o["default"].getInsidePosition(t,i.range,i.circular)}),s.AxisManager.equal(r,i)?this:(e>0?this.animateTo(r,e):(this.em.triggerChange(r),this.itm.setInterrupt(!1)),this)):this},AnimationManager.prototype.setBy=function(t,e){return void 0===e&&(e=0),this.setTo(this.axm.map(this.axm.get(Object.keys(t)),function(e,n){return e+t[n]}),e)},AnimationManager}();e.AnimationManager=u},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=function(){function EventManager(t){this.axes=t}return EventManager.prototype.triggerHold=function(t,e){this.axes.trigger("hold",{pos:t,input:e.input||null,inputEvent:e.event||null,isTrusted:!0})},EventManager.prototype.triggerRelease=function(t){t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("release",t)},EventManager.prototype.triggerChange=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var i=this.am.getEventInfo(),r=this.am.axm.moveTo(t),o=e&&e.event||i&&i.event||null,s={pos:r.pos,delta:r.delta,holding:n,inputEvent:o,isTrusted:!!o,input:e&&e.input||i&&i.input||null,set:o?this.createUserControll(r.pos):function(){}};this.axes.trigger("change",s),o&&this.am.axm.set(s.set().destPos)},EventManager.prototype.triggerAnimationStart=function(t){return t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("animationStart",t)},EventManager.prototype.triggerAnimationEnd=function(t){void 0===t&&(t=!1),this.axes.trigger("animationEnd",{isTrusted:t})},EventManager.prototype.triggerFinish=function(t){void 0===t&&(t=!1),this.axes.trigger("finish",{isTrusted:t})},EventManager.prototype.createUserControll=function(t,e){void 0===e&&(e=0);var n={destPos:i({},t),duration:e};return function(t,e){return t&&(n.destPos=i({},t)),e!==undefined&&(n.duration=e),n}},EventManager.prototype.setAnimationManager=function(t){this.am=t},EventManager.prototype.destroy=function(){this.axes.off()},EventManager}();e.EventManager=r},function(t,e,n){"use strict";e.__esModule=!0;var i=function(){function InterruptManager(t){this.options=t,this._prevented=!1}return InterruptManager.prototype.isInterrupting=function(){return this.options.interruptable||this._prevented},InterruptManager.prototype.isInterrupted=function(){return!this.options.interruptable&&this._prevented},InterruptManager.prototype.setInterrupt=function(t){!this.options.interruptable&&(this._prevented=t)},InterruptManager}();e.InterruptManager=i},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{"default":t}};e.__esModule=!0;var o=n(3),s=r(n(2)),a=function(){function InputObserver(t){var e=t.options,n=t.itm,i=t.em,r=t.axm,o=t.am;this.isOutside=!1,this.moveDistance=null,this.options=e,this.itm=n,this.em=i,this.axm=r,this.am=o}return InputObserver.prototype.atOutside=function(t){var e=this;if(this.isOutside)return this.axm.map(t,function(t,e,n){var i=n.range[0]-n.bounce[0],r=n.range[1]+n.bounce[1];return t>r?r:t<i?i:t});var n=this.am.easing(1e-5)/1e-5;return this.axm.map(t,function(t,i,r){var o=r.range[0],s=r.range[1],a=r.bounce;return t<o?o-e.am.easing((o-t)/(a[0]*n))*a[0]:t>s?s+e.am.easing((t-s)/(a[1]*n))*a[1]:t})},InputObserver.prototype.get=function(t){return this.axm.get(t.axes)},InputObserver.prototype.hold=function(t,e){if(!this.itm.isInterrupted()&&t.axes.length){var n={input:t,event:e};this.itm.setInterrupt(!0),this.am.grab(t.axes,n),!this.moveDistance&&this.em.triggerHold(this.axm.get(),n),this.isOutside=this.axm.isOutside(t.axes),this.moveDistance=this.axm.get(t.axes)}},InputObserver.prototype.change=function(t,e,n){if(this.itm.isInterrupting()&&!this.axm.every(n,function(t){return 0===t})){var i,r=this.axm.get(t.axes);i=this.axm.map(this.moveDistance||r,function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=i),i=this.axm.map(i,function(t,e,n){return s["default"].getCirculatedPos(t,n.range,n.circular)}),this.isOutside&&this.axm.every(r,function(t,e,n){return!s["default"].isOutside(t,n.range)})&&(this.isOutside=!1),i=this.atOutside(i),this.em.triggerChange(i,{input:t,event:e},!0)}},InputObserver.prototype.release=function(t,e,n,r){if(this.itm.isInterrupting()&&this.moveDistance){var a=this.axm.get(t.axes),u=this.axm.get(),h=this.axm.get(this.axm.map(n,function(t,e,n){return n.circular&&(n.circular[0]||n.circular[1])?a[e]+t:s["default"].getInsidePosition(a[e]+t,n.range,n.circular,n.bounce)})),c=this.am.getDuration(h,a,r);0===c&&(h=i({},u));var p={depaPos:u,destPos:h,duration:c,delta:this.axm.getDelta(u,h),inputEvent:e,input:t,isTrusted:!0};this.em.triggerRelease(p),this.moveDistance=null;var l=this.am.getUserControll(p),f=o.AxisManager.equal(l.destPos,u),m={input:t,event:e};f||0===l.duration?(!f&&this.em.triggerChange(l.destPos,m,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(m):this.em.triggerFinish(!0)):this.am.animateTo(l.destPos,l.duration,m)}},InputObserver}();e.InputObserver=a},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e};e.__esModule=!0;var o=r(n(4)),s=n(5),a=n(0),u=n(1),h=function(){function PanInput(t,e){if(this.axes=[],this.hammer=null,this.element=null,this.panRecognizer=null,void 0===o)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=a.$(t),this.options=i({inputType:["touch","mouse","pointer"],scale:[1,1],thresholdAngle:45,threshold:0,hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}}},e),this.onHammerInput=this.onHammerInput.bind(this),this.onPanmove=this.onPanmove.bind(this),this.onPanend=this.onPanend.bind(this)}return PanInput.getDirectionByAngle=function(t,e){if(e<0||e>90)return s.DIRECTION.DIRECTION_NONE;var n=Math.abs(t);return n>e&&n<180-e?s.DIRECTION.DIRECTION_VERTICAL:s.DIRECTION.DIRECTION_HORIZONTAL},PanInput.getNextOffset=function(t,e){var n=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.abs(n/-e);return[t[0]/2*i,t[1]/2*i]},PanInput.useDirection=function(t,e,n){return n?!!(e===s.DIRECTION.DIRECTION_ALL||e&t&&n&t):!!(e&t)},PanInput.prototype.mapAxes=function(t){var e=!!t[0],n=!!t[1];this._direction=e&&n?s.DIRECTION.DIRECTION_ALL:e?s.DIRECTION.DIRECTION_HORIZONTAL:n?s.DIRECTION.DIRECTION_VERTICAL:s.DIRECTION.DIRECTION_NONE,this.axes=t},PanInput.prototype.connect=function(t){var e={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var n=this.element[u.UNIQUEKEY];n||(n=String(Math.round(Math.random()*(new Date).getTime())));var r=u.convertInputType(this.options.inputType);if(!r)throw new Error("Wrong inputType parameter!");this.hammer=u.createHammer(this.element,i({inputClass:r},this.options.hammerManagerOptions)),this.element[u.UNIQUEKEY]=n}return this.panRecognizer=new o.Pan(e),this.hammer.add(this.panRecognizer),this.attachEvent(t),this},PanInput.prototype.disconnect=function(){return this.removeRecognizer(),this.hammer&&this.dettachEvent(),this._direction=s.DIRECTION.DIRECTION_NONE,this},PanInput.prototype.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[u.UNIQUEKEY],this.element=null,this.hammer=null},PanInput.prototype.enable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!0),this},PanInput.prototype.disable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!1),this},PanInput.prototype.isEnable=function(){return!(!this.hammer||!this.hammer.get("pan").options.enable)},PanInput.prototype.removeRecognizer=function(){this.hammer&&this.panRecognizer&&(this.hammer.remove(this.panRecognizer),this.panRecognizer=null)},PanInput.prototype.onHammerInput=function(t){this.isEnable()&&(t.isFirst?this.observer.hold(this,t):t.isFinal&&this.onPanend(t))},PanInput.prototype.onPanmove=function(t){var e=PanInput.getDirectionByAngle(t.angle,this.options.thresholdAngle),n=this.hammer.session.prevInput;n?(t.offsetX=t.deltaX-n.deltaX,t.offsetY=t.deltaY-n.deltaY):(t.offsetX=0,t.offsetY=0);var i=this.getOffset([t.offsetX,t.offsetY],[PanInput.useDirection(s.DIRECTION.DIRECTION_HORIZONTAL,this._direction,e),PanInput.useDirection(s.DIRECTION.DIRECTION_VERTICAL,this._direction,e)]),r=i.some(function(t){return 0!==t});r&&(t.srcEvent.preventDefault(),t.srcEvent.stopPropagation()),t.preventSystemEvent=r,r&&this.observer.change(this,t,u.toAxis(this.axes,i))},PanInput.prototype.onPanend=function(t){var e=this.getOffset([Math.abs(t.velocityX)*(t.deltaX<0?-1:1),Math.abs(t.velocityY)*(t.deltaY<0?-1:1)],[PanInput.useDirection(s.DIRECTION.DIRECTION_HORIZONTAL,this._direction),PanInput.useDirection(s.DIRECTION.DIRECTION_VERTICAL,this._direction)]);e=PanInput.getNextOffset(e,this.observer.options.deceleration),this.observer.release(this,t,u.toAxis(this.axes,e))},PanInput.prototype.attachEvent=function(t){this.observer=t,this.hammer.on("hammer.input",this.onHammerInput).on("panstart panmove",this.onPanmove)},PanInput.prototype.dettachEvent=function(){this.hammer.off("hammer.input",this.onHammerInput).off("panstart panmove",this.onPanmove),this.observer=null},PanInput.prototype.getOffset=function(t,e){var n=[0,0],i=this.options.scale;return e[0]&&(n[0]=t[0]*i[0]),e[1]&&(n[1]=t[1]*i[1]),n},PanInput}();e.PanInput=h},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e};e.__esModule=!0;var o=r(n(4)),s=n(0),a=n(1),u=function(){function PinchInput(t,e){if(this.axes=[],this.hammer=null,this.element=null,this._base=null,this._prev=null,this.pinchRecognizer=null,void 0===o)throw new Error("The Hammerjs must be loaded before eg.Axes.PinchInput.\nhttp://hammerjs.github.io/");this.element=s.$(t),this.options=i({scale:1,threshold:0,inputType:["touch","pointer"],hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}}},e),this.onPinchStart=this.onPinchStart.bind(this),this.onPinchMove=this.onPinchMove.bind(this),this.onPinchEnd=this.onPinchEnd.bind(this)}return PinchInput.prototype.mapAxes=function(t){this.axes=t},PinchInput.prototype.connect=function(t){var e={threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var n=this.element[a.UNIQUEKEY];n||(n=String(Math.round(Math.random()*(new Date).getTime())));var r=a.convertInputType(this.options.inputType);if(!r)throw new Error("Wrong inputType parameter!");this.hammer=a.createHammer(this.element,i({inputClass:r},this.options.hammerManagerOptions)),this.element[a.UNIQUEKEY]=n}return this.pinchRecognizer=new o.Pinch(e),this.hammer.add(this.pinchRecognizer),this.attachEvent(t),this},PinchInput.prototype.disconnect=function(){return this.removeRecognizer(),this.hammer&&(this.hammer.remove(this.pinchRecognizer),this.pinchRecognizer=null,this.dettachEvent()),this},PinchInput.prototype.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[a.UNIQUEKEY],this.element=null,this.hammer=null},PinchInput.prototype.removeRecognizer=function(){this.hammer&&this.pinchRecognizer&&(this.hammer.remove(this.pinchRecognizer),this.pinchRecognizer=null)},PinchInput.prototype.onPinchStart=function(t){this._base=this.observer.get(this)[this.axes[0]];var e=this.getOffset(t.scale);this.observer.hold(this,t),this.observer.change(this,t,a.toAxis(this.axes,[e])),this._prev=t.scale},PinchInput.prototype.onPinchMove=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,a.toAxis(this.axes,[e])),this._prev=t.scale},PinchInput.prototype.onPinchEnd=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,a.toAxis(this.axes,[e])),this.observer.release(this,t,a.toAxis(this.axes,[0]),0),this._base=null,this._prev=null},PinchInput.prototype.getOffset=function(t,e){return void 0===e&&(e=1),this._base*(t-e)*this.options.scale},PinchInput.prototype.attachEvent=function(t){this.observer=t,this.hammer.on("pinchstart",this.onPinchStart).on("pinchmove",this.onPinchMove).on("pinchend",this.onPinchEnd)},PinchInput.prototype.dettachEvent=function(){this.hammer.off("pinchstart",this.onPinchStart).off("pinchmove",this.onPinchMove).off("pinchend",this.onPinchEnd),this.observer=null,this._prev=null},PinchInput.prototype.enable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!0),this},PinchInput.prototype.disable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!1),this},PinchInput.prototype.isEnable=function(){return!(!this.hammer||!this.hammer.get("pinch").options.enable)},PinchInput}();e.PinchInput=u},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(0),o=n(1),s=function(){function WheelInput(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this._timer=null,this.element=r.$(t),this.options=i({scale:1,useNormalized:!0},e),this.onWheel=this.onWheel.bind(this)}return WheelInput.prototype.mapAxes=function(t){this.axes=t},WheelInput.prototype.connect=function(t){return this.dettachEvent(),this.attachEvent(t),this},WheelInput.prototype.disconnect=function(){return this.dettachEvent(),this},WheelInput.prototype.destroy=function(){this.disconnect(),this.element=null},WheelInput.prototype.onWheel=function(t){var e=this;if(this._isEnabled&&(t.preventDefault(),0!==t.deltaY)){this._isHolded||(this.observer.hold(this,t),this._isHolded=!0);var n=(t.deltaY>0?-1:1)*this.options.scale*(this.options.useNormalized?1:Math.abs(t.deltaY));this.observer.change(this,t,o.toAxis(this.axes,[n])),clearTimeout(this._timer);this._timer=setTimeout(function(){e._isHolded&&(e._isHolded=!1,e.observer.release(e,t,o.toAxis(e.axes,[0])))},50)}},WheelInput.prototype.attachEvent=function(t){this.observer=t,this.element.addEventListener("wheel",this.onWheel),this._isEnabled=!0},WheelInput.prototype.dettachEvent=function(){this.element.removeEventListener("wheel",this.onWheel),this._isEnabled=!1,this.observer=null},WheelInput.prototype.enable=function(){return this._isEnabled=!0,this},WheelInput.prototype.disable=function(){return this._isEnabled=!1,this},WheelInput.prototype.isEnable=function(){return this._isEnabled},WheelInput}();e.WheelInput=s},function(t,e,n){"use strict";var i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t};e.__esModule=!0;var r=n(0),o=n(1);e.KEYMAP={LEFT_ARROW:37,A:65,UP_ARROW:38,W:87,RIGHT_ARROW:39,D:68,DOWN_ARROW:40,S:83};var s=function(){function MoveKeyInput(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this._timer=null,this.element=r.$(t),this.options=i({scale:[1,1]},e),this.onKeydown=this.onKeydown.bind(this),this.onKeyup=this.onKeyup.bind(this)}return MoveKeyInput.prototype.mapAxes=function(t){this.axes=t},MoveKeyInput.prototype.connect=function(t){return this.dettachEvent(),"0"!==this.element.getAttribute("tabindex")&&this.element.setAttribute("tabindex","0"),this.attachEvent(t),this},MoveKeyInput.prototype.disconnect=function(){return this.dettachEvent(),this},MoveKeyInput.prototype.destroy=function(){this.disconnect(),this.element=null},MoveKeyInput.prototype.onKeydown=function(t){if(this._isEnabled){var n=!0,i=1,r=-1;switch(t.keyCode){case e.KEYMAP.LEFT_ARROW:case e.KEYMAP.A:i=-1;break;case e.KEYMAP.RIGHT_ARROW:case e.KEYMAP.D:break;case e.KEYMAP.DOWN_ARROW:case e.KEYMAP.S:i=-1,r=1;break;case e.KEYMAP.UP_ARROW:case e.KEYMAP.W:r=1;break;default:n=!1}if((-1===r&&!this.axes[0]||1===r&&!this.axes[1])&&(n=!1),n){var s=-1===r?[+this.options.scale[0]*i,0]:[0,+this.options.scale[1]*i];this._isHolded||(this.observer.hold(this,event),this._isHolded=!0),clearTimeout(this._timer),this.observer.change(this,event,o.toAxis(this.axes,s))}}},MoveKeyInput.prototype.onKeyup=function(t){var e=this;this._isHolded&&(clearTimeout(this._timer),this._timer=setTimeout(function(){e.observer.release(e,t,o.toAxis(e.axes,[0,0])),e._isHolded=!1},80))},MoveKeyInput.prototype.attachEvent=function(t){this.observer=t,this.element.addEventListener("keydown",this.onKeydown,!1),this.element.addEventListener("keypress",this.onKeydown,!1),this.element.addEventListener("keyup",this.onKeyup,!1),this._isEnabled=!0},MoveKeyInput.prototype.dettachEvent=function(){this.element.removeEventListener("keydown",this.onKeydown,!1),this.element.removeEventListener("keypress",this.onKeydown,!1),this.element.removeEventListener("keyup",this.onKeyup,!1),this._isEnabled=!1,this.observer=null},MoveKeyInput.prototype.enable=function(){return this._isEnabled=!0,this},MoveKeyInput.prototype.disable=function(){return this._isEnabled=!1,this},MoveKeyInput.prototype.isEnable=function(){return this._isEnabled},MoveKeyInput}();e.MoveKeyInput=s}])}); | ||
//# sourceMappingURL=axes.pkgd.min.js.map |
@@ -10,4 +10,7 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
exports.__esModule = true; | ||
var Coordinate_1 = require("./Coordinate"); | ||
var Coordinate_1 = __importDefault(require("./Coordinate")); | ||
var AxisManager_1 = require("./AxisManager"); | ||
@@ -14,0 +17,0 @@ var utils_1 = require("./utils"); |
@@ -20,4 +20,7 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
exports.__esModule = true; | ||
var Component = require("@egjs/component"); | ||
var component_1 = __importDefault(require("@egjs/component")); | ||
var AnimationManager_1 = require("./AnimationManager"); | ||
@@ -360,2 +363,12 @@ var EventManager_1 = require("./EventManager"); | ||
}; | ||
/** | ||
* Version info string | ||
* @ko 버전정보 문자열 | ||
* @name VERSION | ||
* @static | ||
* @type {String} | ||
* @example | ||
* eg.Axes.VERSION; // ex) 3.3.3 | ||
* @memberof eg.Axes | ||
*/ | ||
Axes.VERSION = "#__VERSION__#"; | ||
@@ -422,4 +435,4 @@ /** | ||
return Axes; | ||
}(Component)); | ||
}(component_1["default"])); | ||
exports["default"] = Axes; | ||
; |
@@ -10,4 +10,7 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
exports.__esModule = true; | ||
var Coordinate_1 = require("./Coordinate"); | ||
var Coordinate_1 = __importDefault(require("./Coordinate")); | ||
; | ||
@@ -14,0 +17,0 @@ var AxisManager = /** @class */ (function () { |
@@ -32,6 +32,6 @@ "use strict"; | ||
var length = max - min; | ||
if (circular[1] && pos > max) { | ||
if (circular[1] && pos > max) { // right | ||
toPos = (toPos - max) % length + min; | ||
} | ||
if (circular[0] && pos < min) { | ||
if (circular[0] && pos < min) { // left | ||
toPos = (toPos - min) % length + max; | ||
@@ -38,0 +38,0 @@ } |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
exports.__esModule = true; | ||
var Axes_1 = require("./Axes"); | ||
var Axes_1 = __importDefault(require("./Axes")); | ||
var PanInput_1 = require("./inputType/PanInput"); | ||
@@ -5,0 +8,0 @@ exports.PanInput = PanInput_1.PanInput; |
"use strict"; | ||
var Axes_1 = require("./Axes"); | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
var Axes_1 = __importDefault(require("./Axes")); | ||
var PanInput_1 = require("./inputType/PanInput"); | ||
@@ -4,0 +7,0 @@ var PinchInput_1 = require("./inputType/PinchInput"); |
@@ -10,5 +10,8 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
exports.__esModule = true; | ||
var AxisManager_1 = require("./AxisManager"); | ||
var Coordinate_1 = require("./Coordinate"); | ||
var Coordinate_1 = __importDefault(require("./Coordinate")); | ||
var InputObserver = /** @class */ (function () { | ||
@@ -43,6 +46,6 @@ function InputObserver(_a) { | ||
var out = opt.bounce; | ||
if (v < min) { | ||
if (v < min) { // left | ||
return min - _this.am.easing((min - v) / (out[0] * initSlope_1)) * out[0]; | ||
} | ||
else if (v > max) { | ||
else if (v > max) { // right | ||
return max + _this.am.easing((v - max) / (out[1] * initSlope_1)) * out[1]; | ||
@@ -49,0 +52,0 @@ } |
@@ -10,4 +10,11 @@ "use strict"; | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
exports.__esModule = true; | ||
var Hammer = require("hammerjs"); | ||
var Hammer = __importStar(require("hammerjs")); | ||
exports.SUPPORT_POINTER_EVENTS = "PointerEvent" in window || "MSPointerEvent" in window; | ||
@@ -51,2 +58,3 @@ exports.SUPPORT_TOUCH = "ontouchstart" in window; | ||
case "pointer": hasPointer = exports.SUPPORT_POINTER_EVENTS; | ||
// no default | ||
} | ||
@@ -53,0 +61,0 @@ }); |
@@ -10,4 +10,11 @@ "use strict"; | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
exports.__esModule = true; | ||
var Hammer = require("hammerjs"); | ||
var Hammer = __importStar(require("hammerjs")); | ||
var const_1 = require("../const"); | ||
@@ -137,3 +144,3 @@ var utils_1 = require("../utils"); | ||
}; | ||
if (this.hammer) { | ||
if (this.hammer) { // for sharing hammer instance. | ||
// hammer remove previous PanRecognizer. | ||
@@ -140,0 +147,0 @@ this.removeRecognizer(); |
@@ -10,4 +10,11 @@ "use strict"; | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
exports.__esModule = true; | ||
var Hammer = require("hammerjs"); | ||
var Hammer = __importStar(require("hammerjs")); | ||
var utils_1 = require("../utils"); | ||
@@ -81,3 +88,3 @@ var InputType_1 = require("./InputType"); | ||
var hammerOption = { threshold: this.options.threshold }; | ||
if (this.hammer) { | ||
if (this.hammer) { // for sharing hammer instance. | ||
// hammer remove previous PinchRecognizer. | ||
@@ -84,0 +91,0 @@ this.removeRecognizer(); |
@@ -16,7 +16,7 @@ "use strict"; | ||
var el; | ||
if (typeof param === "string") { | ||
if (typeof param === "string") { // String (HTML, Selector) | ||
// check if string is HTML tag format | ||
var match = param.match(/^<([a-z]+)\s*([^>]*)>/); | ||
// creating element | ||
if (match) { | ||
if (match) { // HTML | ||
var dummy = document.createElement("div"); | ||
@@ -26,3 +26,3 @@ dummy.innerHTML = param; | ||
} | ||
else { | ||
else { // Selector | ||
el = toArray(document.querySelectorAll(param)); | ||
@@ -34,11 +34,11 @@ } | ||
} | ||
else if (param === window) { | ||
else if (param === window) { // window | ||
el = param; | ||
} | ||
else if (param.nodeName && | ||
(param.nodeType === 1 || param.nodeType === 9)) { | ||
(param.nodeType === 1 || param.nodeType === 9)) { // HTMLElement, Document | ||
el = param; | ||
} | ||
else if (("jQuery" in window && param instanceof jQuery) || | ||
param.constructor.prototype.jquery) { | ||
param.constructor.prototype.jquery) { // jQuery | ||
el = multi ? param.toArray() : param.get(0); | ||
@@ -45,0 +45,0 @@ } |
{ | ||
"name": "@egjs/axes", | ||
"version": "2.5.2", | ||
"version": "2.5.3", | ||
"description": "A module used to change the information of user action entered by various input devices such as touch screen or mouse into the logical virtual coordinates. You can easily create a UI that responds to user actions.", | ||
@@ -41,3 +41,3 @@ "main": "dist/axes.js", | ||
"dependencies": { | ||
"@egjs/component": "^2.0.0", | ||
"@egjs/component": "^2.1.1", | ||
"hammerjs": "^2.0.8" | ||
@@ -75,2 +75,3 @@ }, | ||
"lite-fixture": "^1.0.2", | ||
"marked": "^0.3.12", | ||
"mocha": "^4.1.0", | ||
@@ -83,3 +84,3 @@ "sinon": "^4.1.4", | ||
"tslint-loader": "^3.5.3", | ||
"typescript": "^2.6.2", | ||
"typescript": "^2.9.2", | ||
"uglifyjs-webpack-plugin": "^1.1.6", | ||
@@ -90,5 +91,4 @@ "webpack": "^3.10.0", | ||
"write-file-webpack-plugin": "^4.2.0", | ||
"xml2js": "^0.4.19", | ||
"marked": "^0.3.12" | ||
"xml2js": "^0.4.19" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
import * as Component from "@egjs/component"; | ||
import Component from "@egjs/component"; | ||
import { AnimationManager } from "./AnimationManager"; | ||
@@ -112,2 +112,12 @@ import { EventManager } from "./EventManager"; | ||
export default class Axes extends Component { | ||
/** | ||
* Version info string | ||
* @ko 버전정보 문자열 | ||
* @name VERSION | ||
* @static | ||
* @type {String} | ||
* @example | ||
* eg.Axes.VERSION; // ex) 3.3.3 | ||
* @memberof eg.Axes | ||
*/ | ||
static VERSION = "#__VERSION__#"; | ||
@@ -114,0 +124,0 @@ // for tree shaking |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1022090
12888
Updated@egjs/component@^2.1.1