Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@egjs/axes

Package Overview
Dependencies
Maintainers
5
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@egjs/axes - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

CHANGELOG.md

28

declaration/AnimationManager.d.ts
import { IInputType } from "./inputType/InputType";
import { Axis, AxisManager } from "./AxisManager";
import { InterruptManager } from "./InterruptManager";
import { EventManager } from "./EventManager";
import { AxesOption } from "./Axes";
import { EventManager, ChangeEventOption } from "./EventManager";
export interface AnimationParam {

@@ -11,2 +10,3 @@ depaPos: Axis;

delta: Axis;
isTrusted?: boolean;
setTo?: (destPos?: Axis, duration?: number) => {

@@ -22,14 +22,20 @@ destPos: Axis;

export declare class AnimationManager {
private options;
private itm;
private em;
private axm;
private _raf;
private _animateParam;
private options;
itm: InterruptManager;
em: EventManager;
axm: AxisManager;
static getDuration(duration: number, min: number, max: number): number;
constructor(options: AxesOption, itm: InterruptManager, em: EventManager, axm: AxisManager);
constructor({options, itm, em, axm}: {
options: any;
itm: any;
em: any;
axm: any;
});
getDuration(depaPos: Axis, destPos: Axis, wishDuration?: number): number;
private createAnimationParam(pos, duration, inputEvent?);
grab(axes: string[], inputType?: IInputType, event?: any): void;
restore(inputEvent?: any): void;
private createAnimationParam(pos, duration, option?);
grab(axes: string[], option?: ChangeEventOption): void;
getEventInfo(): ChangeEventOption;
restore(option: ChangeEventOption): void;
animationEnd(): void;

@@ -41,3 +47,3 @@ private animateLoop(param, complete);

};
animateTo(destPos: Axis, duration: number, inputEvent?: any): void;
animateTo(destPos: Axis, duration: number, option?: ChangeEventOption): void;
private frame(param);

@@ -44,0 +50,0 @@ easing(p: any): number;

import * as Component from "@egjs/component";
import { AxisOption, Axis } from "./AxisManager";
import { AnimationManager } from "./AnimationManager";
import { EventManager } from "./EventManager";
import { InterruptManager } from "./InterruptManager";
import { AxisManager, AxisOption, Axis } from "./AxisManager";
import { InputObserver } from "./InputObserver";
import { PanInput } from "./inputType/PanInput";
import { PinchInput } from "./inputType/PinchInput";
import { WheelInput } from "./inputType/WheelInput";
import { MoveKeyInput } from "./inputType/MoveKeyInput";
import { DIRECTION } from "./const";

@@ -23,2 +28,3 @@ import { IInputType } from "./inputType/InputType";

static WheelInput: typeof WheelInput;
static MoveKeyInput: typeof MoveKeyInput;
static TRANSFORM: string;

@@ -34,7 +40,7 @@ static DIRECTION_NONE: DIRECTION;

options: AxesOption;
private _em;
private _axm;
private _itm;
private _am;
private _io;
em: EventManager;
axm: AxisManager;
itm: InterruptManager;
am: AnimationManager;
io: InputObserver;
private _inputs;

@@ -41,0 +47,0 @@ constructor(axis: {

import { IInputType } from "./inputType/InputType";
import { Axis } from "./AxisManager";
import { AnimationParam } from "./AnimationManager";
import { AnimationParam, AnimationManager } from "./AnimationManager";
export interface ChangeEventOption {
input: IInputType;
event: any;
}
export declare class EventManager {
private axes;
private axm;
constructor(axes: any, axm: any);
triggerHold(pos: Axis, input: IInputType, event: any): void;
am: AnimationManager;
constructor(axes: any);
triggerHold(pos: Axis, option: ChangeEventOption): void;
triggerRelease(param: AnimationParam): void;
triggerChange(pos: Axis, input?: IInputType, event?: any): void;
triggerChange(pos: Axis, option?: ChangeEventOption, holding?: boolean): void;
triggerAnimationStart(param: AnimationParam): Boolean;
triggerAnimationEnd(): void;
triggerAnimationEnd(isTrusted?: boolean): void;
private createUserControll(pos, duration?);
setAnimationManager(am: AnimationManager): void;
destroy(): void;
}

@@ -1,8 +0,7 @@

import { InterruptManager } from "./InterruptManager";
import { IInputType, IInputTypeObserver } from "./inputType/InputType";
import { EventManager } from "./EventManager";
import { AxisManager, Axis } from "./AxisManager";
import { AnimationManager } from "./AnimationManager";
import { Axis } from "./AxisManager";
import { AxesOption } from "./Axes";
export declare class InputObserver implements IInputTypeObserver {
isOutside: boolean;
moveDistance: Axis;
options: AxesOption;

@@ -13,10 +12,14 @@ private itm;

private am;
isOutside: boolean;
moveDistance: Axis;
constructor(options: AxesOption, itm: InterruptManager, em: EventManager, axm: AxisManager, am: AnimationManager);
constructor({options, itm, em, axm, am}: {
options: any;
itm: any;
em: any;
axm: any;
am: any;
});
private atOutside(pos);
get(inputType: IInputType): Axis;
hold(inputType: IInputType, event: any): void;
change(inputType: IInputType, event: any, offset: Axis): void;
release(inputType: IInputType, event: any, offset: Axis, inputDuration?: number): void;
get(input: IInputType): Axis;
hold(input: IInputType, event: any): void;
change(input: IInputType, event: any, offset: Axis): void;
release(input: IInputType, event: any, offset: Axis, inputDuration?: number): void;
}
import { IInputType, IInputTypeObserver } from "./InputType";
export interface WheelInputOption {
scale?: number;
throttle?: number;
}

@@ -11,2 +10,3 @@ export declare class WheelInput implements IInputType {

private _isEnabled;
private _isHolded;
private _timer;

@@ -13,0 +13,0 @@ private observer;

@@ -0,3 +1,4 @@

export declare function toArray(nodes: NodeList): Array<HTMLElement>;
export declare function $(param: any, multi?: boolean): any;
export declare function requestAnimationFrame(fp: any): number;
export declare function cancelAnimationFrame(key: any): void;

@@ -6,7 +6,7 @@ /*!

* @egjs/axes JavaScript library
* https://github.com/naver/egjs-axes
*
*
* @version 2.1.1
* @version 2.2.0
*/
!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))}(this,function(t,e){return function(t){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}var e={};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 $(t,e){void 0===e&&(e=!1);var n;if("string"==typeof t){if(t.match(/^<([a-z]+)\s*([^>]*)>/)){var i=document.createElement("div");i.innerHTML=t,n=Array.prototype.slice.call(i.childNodes)}else n=Array.prototype.slice.call(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}function requestAnimationFrame(t){return i(t)}function cancelAnimationFrame(t){r(t)}e.__esModule=!0,e.$=$;var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame,r=window.cancelAnimationFrame||window.webkitCancelAnimationFrame;if(i&&!r){var s={},o=i;i=function(t){function wrapCallback(n){s[e]&&t(n)}var e=o(wrapCallback);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())},16)},r=window.clearTimeout);e.requestAnimationFrame=requestAnimationFrame,e.cancelAnimationFrame=cancelAnimationFrame},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),+Math.min(s[1],Math.max(s[0],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(1),s=function(){function AxisManager(t,e){var n=this;this.axis=t,this.options=e,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.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";function toAxis(t,e){return e.reduce(function(e,n,i){return t[i]&&(e[t[i]]=n),e},{})}function createHammer(t,e,n){try{var r={recognizers:[e],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}};return n&&(r.inputClass=n),new i.Manager(t,r)}catch(s){return null}}function convertInputType(t){void 0===t&&(t=[]);var n=!1,r=!1;return t.forEach(function(t){switch(t){case"mouse":r=!0;break;case"touch":n=e.SUPPORT_TOUCH}}),n&&i.TouchInput||r&&i.MouseInput||null}e.__esModule=!0;var i=n(3);e.SUPPORT_TOUCH="ontouchstart"in window,e.UNIQUEKEY="_EGJS_AXES_INPUTTYPE_",e.toAxis=toAxis,e.createHammer=createHammer,e.convertInputType=convertInputType},function(t,e,n){"use strict";e.__esModule=!0;!function(t){t[t.DIRECTION_NONE=1]="DIRECTION_NONE",t[t.DIRECTION_LEFT=2]="DIRECTION_LEFT",t[t.DIRECTION_RIGHT=4]="DIRECTION_RIGHT",t[t.DIRECTION_HORIZONTAL=6]="DIRECTION_HORIZONTAL",t[t.DIRECTION_UP=8]="DIRECTION_UP",t[t.DIRECTION_DOWN=16]="DIRECTION_DOWN",t[t.DIRECTION_VERTICAL=24]="DIRECTION_VERTICAL",t[t.DIRECTION_ALL=30]="DIRECTION_ALL"}(e.DIRECTION||(e.DIRECTION={})),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);t.exports=i["default"]},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=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])};return function(e,n){function __(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)}}(),r=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),o=n(9),a=n(10),u=n(11),h=n(2),c=n(12),p=n(13),m=n(14),l=n(15),f=n(5),d=function(t){function Axes(e,n,i){void 0===e&&(e={});var s=t.call(this)||this;return s.axis=e,s._inputs=[],s.options=r({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:Infinity,minimumDuration:0,deceleration:6e-4},n),s._complementOptions(),s._axm=new h.AxisManager(s.axis,s.options),s._em=new a.EventManager(s,s._axm),s._itm=new u.InterruptManager(s.options),s._am=new o.AnimationManager(s.options,s._itm,s._em,s._axm),s._io=new c.InputObserver(s.options,s._itm,s._em,s._axm,s._am),i&&setTimeout(function(){return s._em.triggerChange(i)},0),s}return i(Axes,t),Axes.prototype._complementOptions=function(){var t=this;Object.keys(this.axis).forEach(function(e){t.axis[e]=r({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])})})},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);this._inputs[e].disconnect(),~e&&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.PanInput=p.PanInput,Axes.PinchInput=m.PinchInput,Axes.WheelInput=l.WheelInput,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}(s);e["default"]=d},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(1),s=n(2),o=n(0),a=function(){function AnimationManager(t,e,n,i){this.options=t,this.itm=e,this.em=n,this.axm=i,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){void 0===n&&(n=null);var i=this.axm.get(),s=this.axm.get(this.axm.map(t,function(t,e,n){return r["default"].getInsidePosition(t,n.range,n.circular,n.bounce)}));return{depaPos:i,destPos:s,duration:AnimationManager.getDuration(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,s),inputEvent:n,done:this.animationEnd}},AnimationManager.prototype.grab=function(t,e,n){if(this._animateParam&&!t.length){var i=this.axm.get(t),s=this.axm.map(i,function(t,e,n){return r["default"].getCirculatedPos(t,n.range,n.circular)});this.axm.every(s,function(t,e){return i[e]===t})||this.em.triggerChange(s,e,n),this._animateParam=null,this._raf&&o.cancelAnimationFrame(this._raf),this._raf=null,this.em.triggerAnimationEnd()}},AnimationManager.prototype.restore=function(t){void 0===t&&(t=null);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(){this._animateParam=null;var t=this.axm.filter(this.axm.get(),function(t,e,n){return r["default"].isCircularable(t,n.range,n.circular)});Object.keys(t).length>0&&this.setTo(this.axm.map(t,function(t,e,n){return r["default"].getCirculatedPos(t,n.range,n.circular)})),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(),this.axm.isOutside()&&this.restore()},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;void 0===n&&(n=null);var a=this.createAnimationParam(t,e,n),u=i({},a.depaPos),h=this.em.triggerAnimationStart(a),c=this.getUserControll(a);!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)&&this.animateLoop({depaPos:u,destPos:c.destPos,duration:c.duration,delta:this.axm.getDelta(u,c.destPos)},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.destPos[i]-e)*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});if(Object.keys(o).length)return o=this.axm.map(o,function(t,n,i){return t=r["default"].getInsidePosition(t,i.range,i.circular),e?t:r["default"].getCirculatedPos(t,i.range,i.circular)}),s.AxisManager.equal(o,i)?this:(e?this.animateTo(o,e):(this.em.triggerChange(o),this.itm.setInterrupt(!1)),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,e){this.axes=t,this.axm=e}return EventManager.prototype.triggerHold=function(t,e,n){this.axes.trigger("hold",{pos:t,input:e,inputEvent:n})},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=null);var i=this.axm.moveTo(t),r={pos:i.pos,delta:i.delta,holding:!!n,inputEvent:n,input:e,set:n?this.createUserControll(i.pos):function(){}};this.axes.trigger("change",r),n&&this.axm.set(r.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(){this.axes.trigger("animationEnd")},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.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";e.__esModule=!0;var i=n(2),r=n(1),s=function(){function InputObserver(t,e,n,i,r){this.options=t,this.itm=e,this.em=n,this.axm=i,this.am=r,this.isOutside=!1,this.moveDistance=null}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){!this.itm.isInterrupted()&&t.axes.length&&(this.itm.setInterrupt(!0),this.am.grab(t.axes,t,e),this.moveDistance||this.em.triggerHold(this.axm.get(),t,e),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,s=this.axm.get(t.axes);i=this.axm.map(this.moveDistance||s,function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=i),i=this.axm.map(i,function(t,e,n){return r["default"].getCirculatedPos(t,n.range,n.circular)}),this.isOutside&&this.axm.every(s,function(t,e,n){return!r["default"].isOutside(t,n.range)})&&(this.isOutside=!1),i=this.atOutside(i),this.em.triggerChange(i,t,e)}},InputObserver.prototype.release=function(t,e,n,s){if(this.itm.isInterrupting()&&this.moveDistance){var o=this.axm.get(t.axes),a=this.axm.get(),u=this.axm.get(this.axm.map(n,function(t,e,n){return r["default"].getInsidePosition(o[e]+t,n.range,n.circular,n.bounce)})),h={depaPos:a,destPos:u,duration:this.am.getDuration(u,o,s),delta:this.axm.getDelta(a,u),inputEvent:e,input:t};this.em.triggerRelease(h),this.moveDistance=null;var c=this.am.getUserControll(h),p=i.AxisManager.equal(c.destPos,a);p||0===c.duration?(!p&&this.em.triggerChange(c.destPos,t,e),this.itm.setInterrupt(!1),this.axm.isOutside()&&this.am.restore(e)):this.am.animateTo(c.destPos,c.duration,e)}},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(3),s=n(5),o=n(0),a=n(4),u=function(){function PanInput(t,e){if(this.axes=[],this.hammer=null,this.element=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"],scale:[1,1],thresholdAngle:45,threshold:0},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.dettachEvent(),this.hammer.add(new r.Pan(e));else{var n=this.element[a.UNIQUEKEY];n?this.hammer.destroy():n=String(Math.round(Math.random()*(new Date).getTime()));var i=a.convertInputType(this.options.inputType);if(!i)throw new Error("Wrong inputType parameter!");this.hammer=a.createHammer(this.element,[r.Pan,e],i),this.element[a.UNIQUEKEY]=n}return this.attachEvent(t),this},PanInput.prototype.disconnect=function(){return this.hammer&&this.dettachEvent(),this._direction=s.DIRECTION.DIRECTION_NONE,this},PanInput.prototype.destroy=function(){this.disconnect(),this.hammer&&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.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(3),s=n(0),o=n(4),a=function(){function PinchInput(t,e){if(this.axes=[],this.hammer=null,this.element=null,this._base=null,this._prev=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},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.dettachEvent(),this.hammer.add(new r.Pinch(e));else{var n=this.element[o.UNIQUEKEY];n?this.hammer.destroy():n=String(Math.round(Math.random()*(new Date).getTime())),this.hammer=o.createHammer(this.element,[r.Pinch,e],r.TouchInput),this.element[o.UNIQUEKEY]=n}return this.attachEvent(t),this},PinchInput.prototype.disconnect=function(){return this.hammer&&this.dettachEvent(),this},PinchInput.prototype.destroy=function(){this.disconnect(),this.hammer&&this.hammer.destroy(),delete this.element[o.UNIQUEKEY],this.element=null,this.hammer=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(4),o=function(){function WheelInput(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._timer=null,this.element=r.$(t),this.options=i({scale:1,throttle:100},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;this._isEnabled&&(t.preventDefault(),0!==t.deltaY&&(clearTimeout(this._timer),this._timer=setTimeout(function(){e.observer.hold(e,t);var n=(t.deltaY>0?-1:1)*e.options.scale;e.observer.change(e,t,s.toAxis(e.axes,[n])),e.observer.release(e,t,s.toAxis(e.axes,[0]))},200)))},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){"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))}(this,function(t,e){return function(t){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}var e={};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}function $(t,e){void 0===e&&(e=!1);var n;if("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}function requestAnimationFrame(t){return i(t)}function cancelAnimationFrame(t){r(t)}e.__esModule=!0,e.toArray=toArray,e.$=$;var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame,r=window.cancelAnimationFrame||window.webkitCancelAnimationFrame;if(i&&!r){var s={},o=i;i=function(t){function wrapCallback(n){s[e]&&t(n)}var e=o(wrapCallback);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=requestAnimationFrame,e.cancelAnimationFrame=cancelAnimationFrame},function(t,e,n){"use strict";function toAxis(t,e){return e.reduce(function(e,n,i){return t[i]&&(e[t[i]]=n),e},{})}function createHammer(t,e,n){try{var r={recognizers:[e],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}};return n&&(r.inputClass=n),new i.Manager(t,r)}catch(s){return null}}function convertInputType(t){void 0===t&&(t=[]);var n=!1,r=!1;return t.forEach(function(t){switch(t){case"mouse":r=!0;break;case"touch":n=e.SUPPORT_TOUCH}}),n&&i.TouchInput||r&&i.MouseInput||null}e.__esModule=!0;var i=n(4);e.SUPPORT_TOUCH="ontouchstart"in window,e.UNIQUEKEY="_EGJS_AXES_INPUTTYPE_",e.toAxis=toAxis,e.createHammer=createHammer,e.convertInputType=convertInputType},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),+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._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.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";e.__esModule=!0;!function(t){t[t.DIRECTION_NONE=1]="DIRECTION_NONE",t[t.DIRECTION_LEFT=2]="DIRECTION_LEFT",t[t.DIRECTION_RIGHT=4]="DIRECTION_RIGHT",t[t.DIRECTION_HORIZONTAL=6]="DIRECTION_HORIZONTAL",t[t.DIRECTION_UP=8]="DIRECTION_UP",t[t.DIRECTION_DOWN=16]="DIRECTION_DOWN",t[t.DIRECTION_VERTICAL=24]="DIRECTION_VERTICAL",t[t.DIRECTION_ALL=30]="DIRECTION_ALL"}(e.DIRECTION||(e.DIRECTION={})),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);t.exports=i["default"]},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=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])};return function(e,n){function __(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)}}(),r=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),o=n(9),a=n(10),u=n(11),h=n(3),c=n(12),p=n(13),m=n(14),l=n(15),f=n(16),d=n(5),v=function(t){function Axes(e,n,i){void 0===e&&(e={});var s=t.call(this)||this;return s.axis=e,s._inputs=[],s.options=r({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:Infinity,minimumDuration:0,deceleration:6e-4},n),s._complementOptions(),s.itm=new u.InterruptManager(s.options),s.axm=new h.AxisManager(s.axis,s.options),s.em=new a.EventManager(s),s.am=new o.AnimationManager(s),s.io=new c.InputObserver(s),s.em.setAnimationManager(s.am),i&&s.em.triggerChange(i),s}return i(Axes,t),Axes.prototype._complementOptions=function(){var t=this;Object.keys(this.axis).forEach(function(e){t.axis[e]=r({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])})})},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.PanInput=p.PanInput,Axes.PinchInput=m.PinchInput,Axes.WheelInput=l.WheelInput,Axes.MoveKeyInput=f.MoveKeyInput,Axes.TRANSFORM=d.TRANSFORM,Axes.DIRECTION_NONE=d.DIRECTION.DIRECTION_NONE,Axes.DIRECTION_LEFT=d.DIRECTION.DIRECTION_LEFT,Axes.DIRECTION_RIGHT=d.DIRECTION.DIRECTION_RIGHT,Axes.DIRECTION_UP=d.DIRECTION.DIRECTION_UP,Axes.DIRECTION_DOWN=d.DIRECTION.DIRECTION_DOWN,Axes.DIRECTION_HORIZONTAL=d.DIRECTION.DIRECTION_HORIZONTAL,Axes.DIRECTION_VERTICAL=d.DIRECTION.DIRECTION_VERTICAL,Axes.DIRECTION_ALL=d.DIRECTION.DIRECTION_ALL,Axes}(s);e["default"]=v},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(),s=this.axm.get(this.axm.map(t,function(t,e,n){return r["default"].getInsidePosition(t,n.range,n.circular,n.bounce)})),o=n&&n.event||null;return{depaPos:i,destPos:s,duration:AnimationManager.getDuration(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,s),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&&o.cancelAnimationFrame(this._raf),this._raf=null,this.em.triggerAnimationEnd(!!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)},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.destPos[i]-e)*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});if(Object.keys(o).length)return o=this.axm.map(o,function(t,n,i){return t=r["default"].getInsidePosition(t,i.range,i.circular),e?t:r["default"].getCirculatedPos(t,i.range,i.circular)}),s.AxisManager.equal(o,i)?this:(e?this.animateTo(o,e):(this.em.triggerChange(o),this.itm.setInterrupt(!1)),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:event?this.createUserControll(r.pos):function(){}};this.axes.trigger("change",o),event&&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.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";e.__esModule=!0;var i=n(3),r=n(2),s=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,s=this.axm.get(t.axes);i=this.axm.map(this.moveDistance||s,function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=i),i=this.axm.map(i,function(t,e,n){return r["default"].getCirculatedPos(t,n.range,n.circular)}),this.isOutside&&this.axm.every(s,function(t,e,n){return!r["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 o=this.axm.get(t.axes),a=this.axm.get(),u=this.axm.get(this.axm.map(n,function(t,e,n){return r["default"].getInsidePosition(o[e]+t,n.range,n.circular,n.bounce)})),h={depaPos:a,destPos:u,duration:this.am.getDuration(u,o,s),delta:this.axm.getDelta(a,u),inputEvent:e,input:t,isTrusted:!0};this.em.triggerRelease(h),this.moveDistance=null;var c=this.am.getUserControll(h),p=i.AxisManager.equal(c.destPos,a),m={input:t,event:e};p||0===c.duration?(!p&&this.em.triggerChange(c.destPos,m,!0),this.itm.setInterrupt(!1),this.axm.isOutside()&&this.am.restore(m)):this.am.animateTo(c.destPos,c.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),s=n(5),o=n(0),a=n(1),u=function(){function PanInput(t,e){if(this.axes=[],this.hammer=null,this.element=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"],scale:[1,1],thresholdAngle:45,threshold:0},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.dettachEvent(),this.hammer.add(new r.Pan(e));else{var n=this.element[a.UNIQUEKEY];n?this.hammer.destroy():n=String(Math.round(Math.random()*(new Date).getTime()));var i=a.convertInputType(this.options.inputType);if(!i)throw new Error("Wrong inputType parameter!");this.hammer=a.createHammer(this.element,[r.Pan,e],i),this.element[a.UNIQUEKEY]=n}return this.attachEvent(t),this},PanInput.prototype.disconnect=function(){return this.hammer&&this.dettachEvent(),this._direction=s.DIRECTION.DIRECTION_NONE,this},PanInput.prototype.destroy=function(){this.disconnect(),this.hammer&&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.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,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},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.dettachEvent(),this.hammer.add(new r.Pinch(e));else{var n=this.element[o.UNIQUEKEY];n?this.hammer.destroy():n=String(Math.round(Math.random()*(new Date).getTime())),this.hammer=o.createHammer(this.element,[r.Pinch,e],r.TouchInput),this.element[o.UNIQUEKEY]=n}return this.attachEvent(t),this},PinchInput.prototype.disconnect=function(){return this.hammer&&this.dettachEvent(),this},PinchInput.prototype.destroy=function(){this.disconnect(),this.hammer&&this.hammer.destroy(),delete this.element[o.UNIQUEKEY],this.element=null,this.hammer=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},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.observer.change(this,t,s.toAxis(this.axes,[n])),clearTimeout(this._timer),this._timer=setTimeout(function(){e._isHolded&&(e.observer.release(e,t,s.toAxis(e.axes,[0])),e._isHolded=!1)},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.element=r.$(t),this.options=i({scale:[1,1]},e),this.onKeydown=this.onKeydown.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){t.preventDefault();var n,i=!0,r=t;switch(r.keyCode){case e.KEYMAP.LEFT_ARROW:case e.KEYMAP.A:n=[-this.options.scale[0],0];break;case e.KEYMAP.RIGHT_ARROW:case e.KEYMAP.D:n=[this.options.scale[0],0];break;case e.KEYMAP.UP_ARROW:case e.KEYMAP.W:n=[0,this.options.scale[1]];break;case e.KEYMAP.DOWN_ARROW:case e.KEYMAP.S:n=[0,-this.options.scale[1]];break;default:i=!1}i&&(this.observer.change(this,t,s.toAxis(this.axes,n)),r.preventDefault())}},MoveKeyInput.prototype.attachEvent=function(t){this.observer=t,this.element.addEventListener("keydown",this.onKeydown,!1),this._isEnabled=!0},MoveKeyInput.prototype.dettachEvent=function(){this.element.removeEventListener("keydown",this.onKeydown,!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

@@ -6,6 +6,6 @@ /*!

* @egjs/axes JavaScript library
* https://github.com/naver/egjs-axes
*
* @version 2.2.0
*
* @version 2.1.1
*
* All-in-one packaged file for ease use of '@egjs/axes' with below dependencies.

@@ -15,3 +15,3 @@ * NOTE: This is not an official distribution file and is only for user convenience.

*/
!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())}(this,function(){return function(t){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}var e={};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 $(t,e){void 0===e&&(e=!1);var n;if("string"==typeof t){if(t.match(/^<([a-z]+)\s*([^>]*)>/)){var i=document.createElement("div");i.innerHTML=t,n=Array.prototype.slice.call(i.childNodes)}else n=Array.prototype.slice.call(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}function requestAnimationFrame(t){return i(t)}function cancelAnimationFrame(t){r(t)}e.__esModule=!0,e.$=$;var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame,r=window.cancelAnimationFrame||window.webkitCancelAnimationFrame;if(i&&!r){var o={},s=i;i=function(t){function wrapCallback(n){o[e]&&t(n)}var e=s(wrapCallback);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())},16)},r=window.clearTimeout);e.requestAnimationFrame=requestAnimationFrame,e.cancelAnimationFrame=cancelAnimationFrame},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),+Math.min(o[1],Math.max(o[0],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(1),o=function(){function AxisManager(t,e){var n=this;this.axis=t,this.options=e,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.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";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)}}function inherit(t,e,n){var i,r=e.prototype;i=t.prototype=Object.create(r),i.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: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(n=h[o],(i=n?n+r:e)in t)return i;o++}return a}function uniqueId(){return v++}function getWindowForElement(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||r}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 createInputInstance(t){var e=t.options.inputClass;return new(e||(y?PointerEventInput:T?TouchInput:_?TouchMouseInput:MouseInput))(t,inputHandler)}function inputHandler(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,o=e&A&&i-r==0,s=e&(b|O)&&i-r==0;n.isFirst=!!o,n.isFinal=!!s,o&&(t.session={}),n.eventType=e,computeInputData(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function computeInputData(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,a=s?s.center:o.center,u=e.center=getCenter(i);e.timeStamp=m(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=getAngle(a,u),e.distance=getDistance(a,u),computeDeltaXY(n,e),e.offsetDirection=getDirection(e.deltaX,e.deltaY);var h=getVelocity(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=h.x,e.overallVelocityY=h.y,e.overallVelocity=f(h.x)>f(h.y)?h.x:h.y,e.scale=s?getScale(s.pointers,i):1,e.rotation=s?getRotation(s.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,computeIntervalInputData(n,e);var c=t.element;hasParent(e.srcEvent.target,c)&&(c=e.srcEvent.target),e.target=c}function computeDeltaXY(t,e){var n=e.center,i=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};e.eventType!==A&&o.eventType!==b||(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)}function computeIntervalInputData(t,e){var n,i,r,o,s=t.lastInterval||e,u=e.timeStamp-s.timeStamp;if(e.eventType!=O&&(u>E||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}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?P:f(t)>=f(e)?t<0?R:C:e<0?D:M}function getDistance(t,e,n){n||(n=z);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=z);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return 180*Math.atan2(r,i)/Math.PI}function getRotation(t,e){return getAngle(e[1],e[0],L)+getAngle(t[1],t[0],L)}function getScale(t,e){return getDistance(e[0],e[1],L)/getDistance(t[0],t[1],L)}function MouseInput(){this.evEl=q,this.evWin=H,this.pressed=!1,Input.apply(this,arguments)}function PointerEventInput(){this.evEl=W,this.evWin=Y,Input.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function SingleTouchInput(){this.evTarget=X,this.evWin=V,this.started=!1,Input.apply(this,arguments)}function normalizeSingleTouches(t,e){var n=toArray(t.touches),i=toArray(t.changedTouches);return e&(b|O)&&(n=uniqueArray(n.concat(i),"identifier",!0)),[n,i]}function TouchInput(){this.evTarget=Z,this.targetIds={},Input.apply(this,arguments)}function getTouches(t,e){var n=toArray(t.touches),i=this.targetIds;if(e&(A|x)&&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===A)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<s.length;)i[s[r].identifier]&&a.push(s[r]),e&(b|O)&&delete i[s[r].identifier],r++;return a.length?[uniqueArray(o.concat(a),"identifier",!0),a]:void 0}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 recordTouches(t,e){t&A?(this.primaryTouch=e.changedPointers[0].identifier,setLastTouch.call(this,e)):t&(b|O)&&setLastTouch.call(this,e)}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,r=function(){var t=i.indexOf(n);t>-1&&i.splice(t,1)};setTimeout(r,G)}}function isSyntheticEvent(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}function TouchAction(t,e){this.manager=t,this.set(e)}function cleanTouchActions(t){if(inStr(t,et))return et;var e=inStr(t,nt),n=inStr(t,it);return e&&n?et:e||n?e?nt:it:inStr(t,tt)?tt:J}function Recognizer(t){this.options=u({},this.defaults,t||{}),this.id=uniqueId(),this.manager=null,this.options.enable=ifUndefined(this.options.enable,!0),this.state=ot,this.simultaneous={},this.requireFail=[]}function stateStr(t){return t&ct?"cancel":t&ut?"end":t&at?"move":t&st?"start":""}function directionStr(t){return t==M?"down":t==D?"up":t==R?"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||{},e.recognizers=ifUndefined(e.recognizers,Hammer.defaults.preset),new Manager(t,e)}function Manager(t,e){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=createInputInstance(this),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=t.element;if(n.style){var i;each(t.options.cssProps,function(r,o){i=prefixed(n.style,o),e?(t.oldCssProps[i]=n.style[i],n.style[i]=r):n.style[i]=t.oldCssProps[i]||""}),e||(t.oldCssProps={})}}function triggerDomEvent(t,e){var n=o.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}var u,h=["","webkit","Moz","MS","ms","o"],c=o.createElement("div"),p="function",l=Math.round,f=Math.abs,m=Date.now;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`."),g=deprecate(function(t,e){return d(t,e,!0)},"merge","Use `assign`."),v=1,I=/mobile|tablet|ip(ad|hone|od)|android/i,_="ontouchstart"in r,y=prefixed(r,"PointerEvent")!==a,T=_&&I.test(navigator.userAgent),E=25,A=1,x=2,b=4,O=8,P=1,R=2,C=4,D=8,M=16,N=R|C,w=D|M,S=N|w,z=["x","y"],L=["clientX","clientY"];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:A,mousemove:x,mouseup:b},q="mousedown",H="mousemove mouseup";inherit(MouseInput,Input,{handler:function(t){var e=k[t.type];e&A&&0===t.button&&(this.pressed=!0),e&x&&1!==t.which&&(e=b),this.pressed&&(e&b&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var F={pointerdown:A,pointermove:x,pointerup:b,pointercancel:O,pointerout:O},j={2:"touch",3:"pen",4:"mouse",5:"kinect"},W="pointerdown",Y="pointermove pointerup pointercancel";r.MSPointerEvent&&!r.PointerEvent&&(W="MSPointerDown",Y="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="touch"==o,a=inArray(e,t.pointerId,"pointerId");r&A&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):r&(b|O)&&(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 U={touchstart:A,touchmove:x,touchend:b,touchcancel:O},X="touchstart",V="touchstart touchmove touchend touchcancel";inherit(SingleTouchInput,Input,{handler:function(t){var e=U[t.type];if(e===A&&(this.started=!0),this.started){var n=normalizeSingleTouches.call(this,t,e);e&(b|O)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}}});var B={touchstart:A,touchmove:x,touchend:b,touchcancel:O},Z="touchstart touchmove touchend touchcancel";inherit(TouchInput,Input,{handler:function(t){var e=B[t.type],n=getTouches.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}});var G=2500,Q=25;inherit(TouchMouseInput,Input,{handler:function(t,e,n){var i="touch"==n.pointerType,r="mouse"==n.pointerType;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)recordTouches.call(this,e,n);else if(r&&isSyntheticEvent.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var $=prefixed(c.style,"touchAction"),K=$!==a,J="auto",tt="manipulation",et="none",nt="pan-x",it="pan-y",rt=function(){if(!K)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}();TouchAction.prototype={set:function(t){"compute"==t&&(t=this.compute()),K&&this.manager.element.style&&rt[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()))}),cleanTouchActions(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)return void e.preventDefault();var i=this.actions,r=inStr(i,et)&&!rt[et],o=inStr(i,it)&&!rt[it],s=inStr(i,nt)&&!rt[nt];if(r){var a=1===t.pointers.length,u=t.distance<2,h=t.deltaTime<250;if(a&&u&&h)return}return s&&o?void 0:r||o&&n&N||s&&n&w?this.preventSrc(e):void 0},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var ot=1,st=2,at=4,ut=8,ht=ut,ct=16;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 t=getRecognizerByNameIfManager(t,this),e[t.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 t=getRecognizerByNameIfManager(t,this),-1===inArray(e,t)&&(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){function emit(n){e.manager.emit(n,t)}var e=this,n=this.state;n<ut&&emit(e.options.event+stateStr(n)),emit(e.options.event),t.additionalEvent&&emit(t.additionalEvent),n>=ut&&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|ot)))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&(ht|ct|32)&&(this.state=ot),this.state=this.process(e),this.state&(st|at|ut|ct)&&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&(st|at),r=this.attrTest(t);return i&&(n&O||!r)?e|ct:i||r?n&b?e|ut:e&st?e|at:st: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(it),t&w&&e.push(nt),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?P:o<0?R:C,n=o!=this.pX,i=Math.abs(t.deltaX)):(r=0===s?P:s<0?D:M,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&st||!(this.state&st)&&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[et]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&st)},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[J]},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&(b|O)&&!r)this.reset();else if(t.eventType&A)this.reset(),this._timer=setTimeoutContext(function(){this.state=ht,this.tryEmit()},e.time,this);else if(t.eventType&b)return ht;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===ht&&(t&&t.eventType&b?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[et]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&st)}}),inherit(SwipeRecognizer,AttrRecognizer,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:N|w,pointers:1},getTouchAction:function(){return PanRecognizer.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(N|w)?e=t.overallVelocity:n&N?e=t.overallVelocityX:n&w&&(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&b},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[tt]},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&A&&0===this.count)return this.failTimeout();if(i&&r&&n){if(t.eventType!=b)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||getDistance(this.pCenter,t.center)<e.posThreshold;this.pTime=t.timeStamp,this.pCenter=t.center,s&&o?this.count+=1:this.count=1,this._input=t;if(0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=setTimeoutContext(function(){this.state=ht,this.tryEmit()},e.interval,this),st):ht}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==ht&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Hammer.VERSION="2.0.7",Hammer.defaults={domEvents:!1,touchAction:"compute",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)"}};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){this.touchAction.preventDefaults(t);var n,i=this.recognizers,r=e.curRecognizer;(!r||r&&r.state&ht)&&(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&(st|at|ut)&&(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){this.options.domEvents&&triggerDomEvent(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](e),i++}},destroy:function(){this.element&&toggleCssProps(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},u(Hammer,{INPUT_START:A,INPUT_MOVE:x,INPUT_END:b,INPUT_CANCEL:O,STATE_POSSIBLE:ot,STATE_BEGAN:st,STATE_CHANGED:at,STATE_ENDED:ut,STATE_RECOGNIZED:ht,STATE_CANCELLED:ct,STATE_FAILED:32,DIRECTION_NONE:P,DIRECTION_LEFT:R,DIRECTION_RIGHT:C,DIRECTION_UP:D,DIRECTION_DOWN:M,DIRECTION_HORIZONTAL:N,DIRECTION_VERTICAL:w,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:g,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";function toAxis(t,e){return e.reduce(function(e,n,i){return t[i]&&(e[t[i]]=n),e},{})}function createHammer(t,e,n){try{var r={recognizers:[e],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}};return n&&(r.inputClass=n),new i.Manager(t,r)}catch(o){return null}}function convertInputType(t){void 0===t&&(t=[]);var n=!1,r=!1;return t.forEach(function(t){switch(t){case"mouse":r=!0;break;case"touch":n=e.SUPPORT_TOUCH}}),n&&i.TouchInput||r&&i.MouseInput||null}e.__esModule=!0;var i=n(3);e.SUPPORT_TOUCH="ontouchstart"in window,e.UNIQUEKEY="_EGJS_AXES_INPUTTYPE_",e.toAxis=toAxis,e.createHammer=createHammer,e.convertInputType=convertInputType},function(t,e,n){"use strict";e.__esModule=!0;!function(t){t[t.DIRECTION_NONE=1]="DIRECTION_NONE",t[t.DIRECTION_LEFT=2]="DIRECTION_LEFT",t[t.DIRECTION_RIGHT=4]="DIRECTION_RIGHT",t[t.DIRECTION_HORIZONTAL=6]="DIRECTION_HORIZONTAL",t[t.DIRECTION_UP=8]="DIRECTION_UP",t[t.DIRECTION_DOWN=16]="DIRECTION_DOWN",t[t.DIRECTION_VERTICAL=24]="DIRECTION_VERTICAL",t[t.DIRECTION_ALL=30]="DIRECTION_ALL"}(e.DIRECTION||(e.DIRECTION={})),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);t.exports=i["default"]},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=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])};return function(e,n){function __(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)}}(),r=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),s=n(9),a=n(10),u=n(11),h=n(2),c=n(12),p=n(13),l=n(14),f=n(15),m=n(5),d=function(t){function Axes(e,n,i){void 0===e&&(e={});var o=t.call(this)||this;return o.axis=e,o._inputs=[],o.options=r({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:Infinity,minimumDuration:0,deceleration:6e-4},n),o._complementOptions(),o._axm=new h.AxisManager(o.axis,o.options),o._em=new a.EventManager(o,o._axm),o._itm=new u.InterruptManager(o.options),o._am=new s.AnimationManager(o.options,o._itm,o._em,o._axm),o._io=new c.InputObserver(o.options,o._itm,o._em,o._axm,o._am),i&&setTimeout(function(){return o._em.triggerChange(i)},0),o}return i(Axes,t),Axes.prototype._complementOptions=function(){var t=this;Object.keys(this.axis).forEach(function(e){t.axis[e]=r({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])})})},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);this._inputs[e].disconnect(),~e&&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.PanInput=p.PanInput,Axes.PinchInput=l.PinchInput,Axes.WheelInput=f.WheelInput,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"]=d},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){return function(t){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}var e={};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=n(1),r=function(t){return t&&t.__esModule?t:{"default":t}}(i);r["default"].VERSION="2.0.0",t.exports=r["default"]},function(t,e,n){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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},r=function(){function Component(){_classCallCheck(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"]}])})},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(1),o=n(2),s=n(0),a=function(){function AnimationManager(t,e,n,i){this.options=t,this.itm=e,this.em=n,this.axm=i,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){void 0===n&&(n=null);var i=this.axm.get(),o=this.axm.get(this.axm.map(t,function(t,e,n){return r["default"].getInsidePosition(t,n.range,n.circular,n.bounce)}));return{depaPos:i,destPos:o,duration:AnimationManager.getDuration(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,o),inputEvent:n,done:this.animationEnd}},AnimationManager.prototype.grab=function(t,e,n){if(this._animateParam&&!t.length){var i=this.axm.get(t),o=this.axm.map(i,function(t,e,n){return r["default"].getCirculatedPos(t,n.range,n.circular)});this.axm.every(o,function(t,e){return i[e]===t})||this.em.triggerChange(o,e,n),this._animateParam=null,this._raf&&s.cancelAnimationFrame(this._raf),this._raf=null,this.em.triggerAnimationEnd()}},AnimationManager.prototype.restore=function(t){void 0===t&&(t=null);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(){this._animateParam=null;var t=this.axm.filter(this.axm.get(),function(t,e,n){return r["default"].isCircularable(t,n.range,n.circular)});Object.keys(t).length>0&&this.setTo(this.axm.map(t,function(t,e,n){return r["default"].getCirculatedPos(t,n.range,n.circular)})),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(),this.axm.isOutside()&&this.restore()},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;void 0===n&&(n=null);var a=this.createAnimationParam(t,e,n),u=i({},a.depaPos),h=this.em.triggerAnimationStart(a),c=this.getUserControll(a);!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)&&this.animateLoop({depaPos:u,destPos:c.destPos,duration:c.duration,delta:this.axm.getDelta(u,c.destPos)},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.destPos[i]-e)*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});if(Object.keys(s).length)return s=this.axm.map(s,function(t,n,i){return t=r["default"].getInsidePosition(t,i.range,i.circular),e?t:r["default"].getCirculatedPos(t,i.range,i.circular)}),o.AxisManager.equal(s,i)?this:(e?this.animateTo(s,e):(this.em.triggerChange(s),this.itm.setInterrupt(!1)),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,e){this.axes=t,this.axm=e}return EventManager.prototype.triggerHold=function(t,e,n){this.axes.trigger("hold",{pos:t,input:e,inputEvent:n})},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=null);var i=this.axm.moveTo(t),r={pos:i.pos,delta:i.delta,holding:!!n,inputEvent:n,input:e,set:n?this.createUserControll(i.pos):function(){}};this.axes.trigger("change",r),n&&this.axm.set(r.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(){this.axes.trigger("animationEnd")},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.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";e.__esModule=!0;var i=n(2),r=n(1),o=function(){function InputObserver(t,e,n,i,r){this.options=t,this.itm=e,this.em=n,this.axm=i,this.am=r,this.isOutside=!1,this.moveDistance=null}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){!this.itm.isInterrupted()&&t.axes.length&&(this.itm.setInterrupt(!0),this.am.grab(t.axes,t,e),this.moveDistance||this.em.triggerHold(this.axm.get(),t,e),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,o=this.axm.get(t.axes);i=this.axm.map(this.moveDistance||o,function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=i),i=this.axm.map(i,function(t,e,n){return r["default"].getCirculatedPos(t,n.range,n.circular)}),this.isOutside&&this.axm.every(o,function(t,e,n){return!r["default"].isOutside(t,n.range)})&&(this.isOutside=!1),i=this.atOutside(i),this.em.triggerChange(i,t,e)}},InputObserver.prototype.release=function(t,e,n,o){if(this.itm.isInterrupting()&&this.moveDistance){var s=this.axm.get(t.axes),a=this.axm.get(),u=this.axm.get(this.axm.map(n,function(t,e,n){return r["default"].getInsidePosition(s[e]+t,n.range,n.circular,n.bounce)})),h={depaPos:a,destPos:u,duration:this.am.getDuration(u,s,o),delta:this.axm.getDelta(a,u),inputEvent:e,input:t};this.em.triggerRelease(h),this.moveDistance=null;var c=this.am.getUserControll(h),p=i.AxisManager.equal(c.destPos,a);p||0===c.duration?(!p&&this.em.triggerChange(c.destPos,t,e),this.itm.setInterrupt(!1),this.axm.isOutside()&&this.am.restore(e)):this.am.animateTo(c.destPos,c.duration,e)}},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(3),o=n(5),s=n(0),a=n(4),u=function(){function PanInput(t,e){if(this.axes=[],this.hammer=null,this.element=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"],scale:[1,1],thresholdAngle:45,threshold:0},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.dettachEvent(),this.hammer.add(new r.Pan(e));else{var n=this.element[a.UNIQUEKEY];n?this.hammer.destroy():n=String(Math.round(Math.random()*(new Date).getTime()));var i=a.convertInputType(this.options.inputType);if(!i)throw new Error("Wrong inputType parameter!");this.hammer=a.createHammer(this.element,[r.Pan,e],i),this.element[a.UNIQUEKEY]=n}return this.attachEvent(t),this},PanInput.prototype.disconnect=function(){return this.hammer&&this.dettachEvent(),this._direction=o.DIRECTION.DIRECTION_NONE,this},PanInput.prototype.destroy=function(){this.disconnect(),this.hammer&&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.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(3),o=n(0),s=n(4),a=function(){function PinchInput(t,e){if(this.axes=[],this.hammer=null,this.element=null,this._base=null,this._prev=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},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.dettachEvent(),this.hammer.add(new r.Pinch(e));else{var n=this.element[s.UNIQUEKEY];n?this.hammer.destroy():n=String(Math.round(Math.random()*(new Date).getTime())),this.hammer=s.createHammer(this.element,[r.Pinch,e],r.TouchInput),this.element[s.UNIQUEKEY]=n}return this.attachEvent(t),this},PinchInput.prototype.disconnect=function(){return this.hammer&&this.dettachEvent(),this},PinchInput.prototype.destroy=function(){this.disconnect(),this.hammer&&this.hammer.destroy(),delete this.element[s.UNIQUEKEY],this.element=null,this.hammer=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(4),s=function(){function WheelInput(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._timer=null,this.element=r.$(t),this.options=i({scale:1,throttle:100},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;this._isEnabled&&(t.preventDefault(),0!==t.deltaY&&(clearTimeout(this._timer),this._timer=setTimeout(function(){e.observer.hold(e,t);var n=(t.deltaY>0?-1:1)*e.options.scale;e.observer.change(e,t,o.toAxis(e.axes,[n])),e.observer.release(e,t,o.toAxis(e.axes,[0]))},200)))},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){"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())}(this,function(){return function(t){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}var e={};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}function $(t,e){void 0===e&&(e=!1);var n;if("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}function requestAnimationFrame(t){return i(t)}function cancelAnimationFrame(t){r(t)}e.__esModule=!0,e.toArray=toArray,e.$=$;var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame,r=window.cancelAnimationFrame||window.webkitCancelAnimationFrame;if(i&&!r){var o={},s=i;i=function(t){function wrapCallback(n){o[e]&&t(n)}var e=s(wrapCallback);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=requestAnimationFrame,e.cancelAnimationFrame=cancelAnimationFrame},function(t,e,n){"use strict";function toAxis(t,e){return e.reduce(function(e,n,i){return t[i]&&(e[t[i]]=n),e},{})}function createHammer(t,e,n){try{var r={recognizers:[e],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}};return n&&(r.inputClass=n),new i.Manager(t,r)}catch(o){return null}}function convertInputType(t){void 0===t&&(t=[]);var n=!1,r=!1;return t.forEach(function(t){switch(t){case"mouse":r=!0;break;case"touch":n=e.SUPPORT_TOUCH}}),n&&i.TouchInput||r&&i.MouseInput||null}e.__esModule=!0;var i=n(4);e.SUPPORT_TOUCH="ontouchstart"in window,e.UNIQUEKEY="_EGJS_AXES_INPUTTYPE_",e.toAxis=toAxis,e.createHammer=createHammer,e.convertInputType=convertInputType},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),+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._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.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";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)}}function inherit(t,e,n){var i,r=e.prototype;i=t.prototype=Object.create(r),i.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: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(n=h[o],(i=n?n+r:e)in t)return i;o++}return a}function uniqueId(){return g++}function getWindowForElement(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||r}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 createInputInstance(t){var e=t.options.inputClass;return new(e||(_?PointerEventInput:T?TouchInput:y?TouchMouseInput:MouseInput))(t,inputHandler)}function inputHandler(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,o=e&A&&i-r==0,s=e&(x|O)&&i-r==0;n.isFirst=!!o,n.isFinal=!!s,o&&(t.session={}),n.eventType=e,computeInputData(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function computeInputData(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,a=s?s.center:o.center,u=e.center=getCenter(i);e.timeStamp=m(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=getAngle(a,u),e.distance=getDistance(a,u),computeDeltaXY(n,e),e.offsetDirection=getDirection(e.deltaX,e.deltaY);var h=getVelocity(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=h.x,e.overallVelocityY=h.y,e.overallVelocity=f(h.x)>f(h.y)?h.x:h.y,e.scale=s?getScale(s.pointers,i):1,e.rotation=s?getRotation(s.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,computeIntervalInputData(n,e);var c=t.element;hasParent(e.srcEvent.target,c)&&(c=e.srcEvent.target),e.target=c}function computeDeltaXY(t,e){var n=e.center,i=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};e.eventType!==A&&o.eventType!==x||(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)}function computeIntervalInputData(t,e){var n,i,r,o,s=t.lastInterval||e,u=e.timeStamp-s.timeStamp;if(e.eventType!=O&&(u>E||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}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?P:f(t)>=f(e)?t<0?R:M:e<0?D:C}function getDistance(t,e,n){n||(n=z);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=z);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return 180*Math.atan2(r,i)/Math.PI}function getRotation(t,e){return getAngle(e[1],e[0],k)+getAngle(t[1],t[0],k)}function getScale(t,e){return getDistance(e[0],e[1],k)/getDistance(t[0],t[1],k)}function MouseInput(){this.evEl=L,this.evWin=q,this.pressed=!1,Input.apply(this,arguments)}function PointerEventInput(){this.evEl=Y,this.evWin=j,Input.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function SingleTouchInput(){this.evTarget=K,this.evWin=X,this.started=!1,Input.apply(this,arguments)}function normalizeSingleTouches(t,e){var n=toArray(t.touches),i=toArray(t.changedTouches);return e&(x|O)&&(n=uniqueArray(n.concat(i),"identifier",!0)),[n,i]}function TouchInput(){this.evTarget=B,this.targetIds={},Input.apply(this,arguments)}function getTouches(t,e){var n=toArray(t.touches),i=this.targetIds;if(e&(A|b)&&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===A)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<s.length;)i[s[r].identifier]&&a.push(s[r]),e&(x|O)&&delete i[s[r].identifier],r++;return a.length?[uniqueArray(o.concat(a),"identifier",!0),a]:void 0}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 recordTouches(t,e){t&A?(this.primaryTouch=e.changedPointers[0].identifier,setLastTouch.call(this,e)):t&(x|O)&&setLastTouch.call(this,e)}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,r=function(){var t=i.indexOf(n);t>-1&&i.splice(t,1)};setTimeout(r,G)}}function isSyntheticEvent(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<=Z&&s<=Z)return!0}return!1}function TouchAction(t,e){this.manager=t,this.set(e)}function cleanTouchActions(t){if(inStr(t,et))return et;var e=inStr(t,nt),n=inStr(t,it);return e&&n?et:e||n?e?nt:it:inStr(t,tt)?tt:J}function Recognizer(t){this.options=u({},this.defaults,t||{}),this.id=uniqueId(),this.manager=null,this.options.enable=ifUndefined(this.options.enable,!0),this.state=ot,this.simultaneous={},this.requireFail=[]}function stateStr(t){return t&ct?"cancel":t&ut?"end":t&at?"move":t&st?"start":""}function directionStr(t){return t==C?"down":t==D?"up":t==R?"left":t==M?"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||{},e.recognizers=ifUndefined(e.recognizers,Hammer.defaults.preset),new Manager(t,e)}function Manager(t,e){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=createInputInstance(this),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=t.element;if(n.style){var i;each(t.options.cssProps,function(r,o){i=prefixed(n.style,o),e?(t.oldCssProps[i]=n.style[i],n.style[i]=r):n.style[i]=t.oldCssProps[i]||""}),e||(t.oldCssProps={})}}function triggerDomEvent(t,e){var n=o.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}var u,h=["","webkit","Moz","MS","ms","o"],c=o.createElement("div"),p="function",l=Math.round,f=Math.abs,m=Date.now;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`."),g=1,I=/mobile|tablet|ip(ad|hone|od)|android/i,y="ontouchstart"in r,_=prefixed(r,"PointerEvent")!==a,T=y&&I.test(navigator.userAgent),E=25,A=1,b=2,x=4,O=8,P=1,R=2,M=4,D=8,C=16,N=R|M,w=D|C,S=N|w,z=["x","y"],k=["clientX","clientY"];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 H={mousedown:A,mousemove:b,mouseup:x},L="mousedown",q="mousemove mouseup";inherit(MouseInput,Input,{handler:function(t){var e=H[t.type];e&A&&0===t.button&&(this.pressed=!0),e&b&&1!==t.which&&(e=x),this.pressed&&(e&x&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var W={pointerdown:A,pointermove:b,pointerup:x,pointercancel:O,pointerout:O},F={2:"touch",3:"pen",4:"mouse",5:"kinect"},Y="pointerdown",j="pointermove pointerup pointercancel";r.MSPointerEvent&&!r.PointerEvent&&(Y="MSPointerDown",j="MSPointerMove MSPointerUp MSPointerCancel"),inherit(PointerEventInput,Input,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=W[i],o=F[t.pointerType]||t.pointerType,s="touch"==o,a=inArray(e,t.pointerId,"pointerId");r&A&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):r&(x|O)&&(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 U={touchstart:A,touchmove:b,touchend:x,touchcancel:O},K="touchstart",X="touchstart touchmove touchend touchcancel";inherit(SingleTouchInput,Input,{handler:function(t){var e=U[t.type];if(e===A&&(this.started=!0),this.started){var n=normalizeSingleTouches.call(this,t,e);e&(x|O)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}}});var V={touchstart:A,touchmove:b,touchend:x,touchcancel:O},B="touchstart touchmove touchend touchcancel";inherit(TouchInput,Input,{handler:function(t){var e=V[t.type],n=getTouches.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}});var G=2500,Z=25;inherit(TouchMouseInput,Input,{handler:function(t,e,n){var i="touch"==n.pointerType,r="mouse"==n.pointerType;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)recordTouches.call(this,e,n);else if(r&&isSyntheticEvent.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Q=prefixed(c.style,"touchAction"),$=Q!==a,J="auto",tt="manipulation",et="none",nt="pan-x",it="pan-y",rt=function(){if(!$)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}();TouchAction.prototype={set:function(t){"compute"==t&&(t=this.compute()),$&&this.manager.element.style&&rt[t]&&(this.manager.element.style[Q]=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()))}),cleanTouchActions(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)return void e.preventDefault();var i=this.actions,r=inStr(i,et)&&!rt[et],o=inStr(i,it)&&!rt[it],s=inStr(i,nt)&&!rt[nt];if(r){var a=1===t.pointers.length,u=t.distance<2,h=t.deltaTime<250;if(a&&u&&h)return}return s&&o?void 0:r||o&&n&N||s&&n&w?this.preventSrc(e):void 0},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var ot=1,st=2,at=4,ut=8,ht=ut,ct=16;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 t=getRecognizerByNameIfManager(t,this),e[t.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 t=getRecognizerByNameIfManager(t,this),-1===inArray(e,t)&&(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){function emit(n){e.manager.emit(n,t)}var e=this,n=this.state;n<ut&&emit(e.options.event+stateStr(n)),emit(e.options.event),t.additionalEvent&&emit(t.additionalEvent),n>=ut&&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|ot)))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&(ht|ct|32)&&(this.state=ot),this.state=this.process(e),this.state&(st|at|ut|ct)&&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&(st|at),r=this.attrTest(t);return i&&(n&O||!r)?e|ct:i||r?n&x?e|ut:e&st?e|at:st: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(it),t&w&&e.push(nt),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?P:o<0?R:M,n=o!=this.pX,i=Math.abs(t.deltaX)):(r=0===s?P:s<0?D:C,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&st||!(this.state&st)&&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[et]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&st)},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[J]},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&(x|O)&&!r)this.reset();else if(t.eventType&A)this.reset(),this._timer=setTimeoutContext(function(){this.state=ht,this.tryEmit()},e.time,this);else if(t.eventType&x)return ht;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===ht&&(t&&t.eventType&x?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[et]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&st)}}),inherit(SwipeRecognizer,AttrRecognizer,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:N|w,pointers:1},getTouchAction:function(){return PanRecognizer.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(N|w)?e=t.overallVelocity:n&N?e=t.overallVelocityX:n&w&&(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&x},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[tt]},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&A&&0===this.count)return this.failTimeout();if(i&&r&&n){if(t.eventType!=x)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||getDistance(this.pCenter,t.center)<e.posThreshold;this.pTime=t.timeStamp,this.pCenter=t.center,s&&o?this.count+=1:this.count=1,this._input=t;if(0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=setTimeoutContext(function(){this.state=ht,this.tryEmit()},e.interval,this),st):ht}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==ht&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Hammer.VERSION="2.0.7",Hammer.defaults={domEvents:!1,touchAction:"compute",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)"}};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){this.touchAction.preventDefaults(t);var n,i=this.recognizers,r=e.curRecognizer;(!r||r&&r.state&ht)&&(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&(st|at|ut)&&(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){this.options.domEvents&&triggerDomEvent(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](e),i++}},destroy:function(){this.element&&toggleCssProps(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},u(Hammer,{INPUT_START:A,INPUT_MOVE:b,INPUT_END:x,INPUT_CANCEL:O,STATE_POSSIBLE:ot,STATE_BEGAN:st,STATE_CHANGED:at,STATE_ENDED:ut,STATE_RECOGNIZED:ht,STATE_CANCELLED:ct,STATE_FAILED:32,DIRECTION_NONE:P,DIRECTION_LEFT:R,DIRECTION_RIGHT:M,DIRECTION_UP:D,DIRECTION_DOWN:C,DIRECTION_HORIZONTAL:N,DIRECTION_VERTICAL:w,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";e.__esModule=!0;!function(t){t[t.DIRECTION_NONE=1]="DIRECTION_NONE",t[t.DIRECTION_LEFT=2]="DIRECTION_LEFT",t[t.DIRECTION_RIGHT=4]="DIRECTION_RIGHT",t[t.DIRECTION_HORIZONTAL=6]="DIRECTION_HORIZONTAL",t[t.DIRECTION_UP=8]="DIRECTION_UP",t[t.DIRECTION_DOWN=16]="DIRECTION_DOWN",t[t.DIRECTION_VERTICAL=24]="DIRECTION_VERTICAL",t[t.DIRECTION_ALL=30]="DIRECTION_ALL"}(e.DIRECTION||(e.DIRECTION={})),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);t.exports=i["default"]},function(t,e,n){"use strict";var i=this&&this.__extends||function(){var t=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])};return function(e,n){function __(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)}}(),r=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),s=n(9),a=n(10),u=n(11),h=n(3),c=n(12),p=n(13),l=n(14),f=n(15),m=n(16),d=n(5),v=function(t){function Axes(e,n,i){void 0===e&&(e={});var o=t.call(this)||this;return o.axis=e,o._inputs=[],o.options=r({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:Infinity,minimumDuration:0,deceleration:6e-4},n),o._complementOptions(),o.itm=new u.InterruptManager(o.options),o.axm=new h.AxisManager(o.axis,o.options),o.em=new a.EventManager(o),o.am=new s.AnimationManager(o),o.io=new c.InputObserver(o),o.em.setAnimationManager(o.am),i&&o.em.triggerChange(i),o}return i(Axes,t),Axes.prototype._complementOptions=function(){var t=this;Object.keys(this.axis).forEach(function(e){t.axis[e]=r({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])})})},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.PanInput=p.PanInput,Axes.PinchInput=l.PinchInput,Axes.WheelInput=f.WheelInput,Axes.MoveKeyInput=m.MoveKeyInput,Axes.TRANSFORM=d.TRANSFORM,Axes.DIRECTION_NONE=d.DIRECTION.DIRECTION_NONE,Axes.DIRECTION_LEFT=d.DIRECTION.DIRECTION_LEFT,Axes.DIRECTION_RIGHT=d.DIRECTION.DIRECTION_RIGHT,Axes.DIRECTION_UP=d.DIRECTION.DIRECTION_UP,Axes.DIRECTION_DOWN=d.DIRECTION.DIRECTION_DOWN,Axes.DIRECTION_HORIZONTAL=d.DIRECTION.DIRECTION_HORIZONTAL,Axes.DIRECTION_VERTICAL=d.DIRECTION.DIRECTION_VERTICAL,Axes.DIRECTION_ALL=d.DIRECTION.DIRECTION_ALL,Axes}(o);e["default"]=v},function(t,e,n){!function(e,n){t.exports=n()}(0,function(){return function(t){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}var e={};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=n(1),r=function(t){return t&&t.__esModule?t:{"default":t}}(i);r["default"].VERSION="2.0.0",t.exports=r["default"]},function(t,e,n){"use strict";function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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},r=function(){function Component(){_classCallCheck(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"]}])})},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(),o=this.axm.get(this.axm.map(t,function(t,e,n){return r["default"].getInsidePosition(t,n.range,n.circular,n.bounce)})),s=n&&n.event||null;return{depaPos:i,destPos:o,duration:AnimationManager.getDuration(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,o),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&&s.cancelAnimationFrame(this._raf),this._raf=null,this.em.triggerAnimationEnd(!!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)},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.destPos[i]-e)*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});if(Object.keys(s).length)return s=this.axm.map(s,function(t,n,i){return t=r["default"].getInsidePosition(t,i.range,i.circular),e?t:r["default"].getCirculatedPos(t,i.range,i.circular)}),o.AxisManager.equal(s,i)?this:(e?this.animateTo(s,e):(this.em.triggerChange(s),this.itm.setInterrupt(!1)),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:event?this.createUserControll(r.pos):function(){}};this.axes.trigger("change",s),event&&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.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";e.__esModule=!0;var i=n(3),r=n(2),o=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,o=this.axm.get(t.axes);i=this.axm.map(this.moveDistance||o,function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=i),i=this.axm.map(i,function(t,e,n){return r["default"].getCirculatedPos(t,n.range,n.circular)}),this.isOutside&&this.axm.every(o,function(t,e,n){return!r["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 s=this.axm.get(t.axes),a=this.axm.get(),u=this.axm.get(this.axm.map(n,function(t,e,n){return r["default"].getInsidePosition(s[e]+t,n.range,n.circular,n.bounce)})),h={depaPos:a,destPos:u,duration:this.am.getDuration(u,s,o),delta:this.axm.getDelta(a,u),inputEvent:e,input:t,isTrusted:!0};this.em.triggerRelease(h),this.moveDistance=null;var c=this.am.getUserControll(h),p=i.AxisManager.equal(c.destPos,a),l={input:t,event:e};p||0===c.duration?(!p&&this.em.triggerChange(c.destPos,l,!0),this.itm.setInterrupt(!1),this.axm.isOutside()&&this.am.restore(l)):this.am.animateTo(c.destPos,c.duration,l)}},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),o=n(5),s=n(0),a=n(1),u=function(){function PanInput(t,e){if(this.axes=[],this.hammer=null,this.element=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"],scale:[1,1],thresholdAngle:45,threshold:0},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.dettachEvent(),this.hammer.add(new r.Pan(e));else{var n=this.element[a.UNIQUEKEY];n?this.hammer.destroy():n=String(Math.round(Math.random()*(new Date).getTime()));var i=a.convertInputType(this.options.inputType);if(!i)throw new Error("Wrong inputType parameter!");this.hammer=a.createHammer(this.element,[r.Pan,e],i),this.element[a.UNIQUEKEY]=n}return this.attachEvent(t),this},PanInput.prototype.disconnect=function(){return this.hammer&&this.dettachEvent(),this._direction=o.DIRECTION.DIRECTION_NONE,this},PanInput.prototype.destroy=function(){this.disconnect(),this.hammer&&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.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,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},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.dettachEvent(),this.hammer.add(new r.Pinch(e));else{var n=this.element[s.UNIQUEKEY];n?this.hammer.destroy():n=String(Math.round(Math.random()*(new Date).getTime())),this.hammer=s.createHammer(this.element,[r.Pinch,e],r.TouchInput),this.element[s.UNIQUEKEY]=n}return this.attachEvent(t),this},PinchInput.prototype.disconnect=function(){return this.hammer&&this.dettachEvent(),this},PinchInput.prototype.destroy=function(){this.disconnect(),this.hammer&&this.hammer.destroy(),delete this.element[s.UNIQUEKEY],this.element=null,this.hammer=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},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.observer.change(this,t,o.toAxis(this.axes,[n])),clearTimeout(this._timer),this._timer=setTimeout(function(){e._isHolded&&(e.observer.release(e,t,o.toAxis(e.axes,[0])),e._isHolded=!1)},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.element=r.$(t),this.options=i({scale:[1,1]},e),this.onKeydown=this.onKeydown.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){t.preventDefault();var n,i=!0,r=t;switch(r.keyCode){case e.KEYMAP.LEFT_ARROW:case e.KEYMAP.A:n=[-this.options.scale[0],0];break;case e.KEYMAP.RIGHT_ARROW:case e.KEYMAP.D:n=[this.options.scale[0],0];break;case e.KEYMAP.UP_ARROW:case e.KEYMAP.W:n=[0,this.options.scale[1]];break;case e.KEYMAP.DOWN_ARROW:case e.KEYMAP.S:n=[0,-this.options.scale[1]];break;default:i=!1}i&&(this.observer.change(this,t,o.toAxis(this.axes,n)),r.preventDefault())}},MoveKeyInput.prototype.attachEvent=function(t){this.observer=t,this.element.addEventListener("keydown",this.onKeydown,!1),this._isEnabled=!0},MoveKeyInput.prototype.dettachEvent=function(){this.element.removeEventListener("keydown",this.onKeydown,!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
{
"name": "@egjs/axes",
"version": "2.1.1",
"version": "2.2.0",
"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.",

@@ -25,2 +25,3 @@ "main": "dist/axes.js",

"coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"changelog": "node ./config/changelog.js",
"prepush": "npm run lint",

@@ -37,2 +38,3 @@ "commitmsg": "node config/validate-commit-msg.js"

"license": "MIT",
"homepage": "https://github.com/naver/egjs-axes",
"dependencies": {

@@ -48,3 +50,3 @@ "@egjs/component": "^2.0.0",

"babel-preset-es2015": "^6.24.1",
"chai": "^4.1.1",
"chai": "^4.1.2",
"chalk": "^2.1.0",

@@ -55,10 +57,11 @@ "clean-webpack-plugin": "^0.1.16",

"egjs-jsdoc-template": "^1.4.0",
"fs-extra": "^4.0.1",
"fs-extra": "^4.0.2",
"gh-pages": "^1.0.0",
"hammer-simulator": "0.0.1",
"hammerjs-compatible": "^1.1.0",
"husky": "^0.14.3",
"inject-loader": "^3.0.1",
"istanbul-instrumenter-loader": "^3.0.0",
"jsdoc": "^3.5.4",
"karma": "^1.7.0",
"jsdoc": "^3.5.5",
"karma": "^1.7.1",
"karma-chai": "^0.1.0",

@@ -73,4 +76,4 @@ "karma-chrome-launcher": "^2.2.0",

"lite-fixture": "^1.0.2",
"mocha": "^3.5.0",
"sinon": "^3.2.1",
"mocha": "^3.5.3",
"sinon": "^3.3.0",
"string-replace-webpack-plugin": "0.1.3",

@@ -81,9 +84,10 @@ "sync-exec": "^0.6.2",

"tslint-loader": "^3.5.3",
"typescript": "^2.4.2",
"typescript": "^2.5.2",
"uglifyjs-webpack-plugin": "^0.4.6",
"webpack": "^3.5.5",
"webpack-dev-server": "^2.7.1",
"webpack": "^3.6.0",
"webpack-dev-server": "^2.8.2",
"webpack-merge": "^4.1.0",
"write-file-webpack-plugin": "^4.1.0"
"write-file-webpack-plugin": "^4.1.0",
"xml2js": "^0.4.19"
}
}

@@ -139,7 +139,7 @@ # egjs-axes [![npm version](https://badge.fury.io/js/%40egjs%2Faxes.svg)](https://badge.fury.io/js/%40egjs%2Faxes) [![Build Status](https://travis-ci.org/naver/egjs-axes.svg?branch=master)](https://travis-ci.org/naver/egjs-axes) [![Coverage Status](https://coveralls.io/repos/github/naver/egjs-axes/badge.svg?branch=master)](https://coveralls.io/github/naver/egjs-axes?branch=master)

## License
egjs-axes is released under the [MIT license](http://naver.github.io/egjs/license.txt).
egjs-axes is released under the [MIT license](https://github.com/naver/egjs-axes/blob/master/LICENSE).
```
Copyright (c) 2015 NAVER Corp.
Copyright (c) 2017 NAVER Corp.

@@ -146,0 +146,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

@@ -5,3 +5,3 @@ import { IInputType } from "./inputType/InputType";

import { InterruptManager } from "./InterruptManager";
import { EventManager } from "./EventManager";
import { EventManager, ChangeEventOption } from "./EventManager";
import { requestAnimationFrame, cancelAnimationFrame } from "./utils";

@@ -15,2 +15,3 @@ import { AxesOption } from "./Axes";

delta: Axis;
isTrusted?: boolean;
setTo?: (destPos?: Axis, duration?: number) => { destPos: Axis, duration: number };

@@ -20,3 +21,3 @@ done?: () => void;

inputEvent?;
input?: IInputType
input?: IInputType,
}

@@ -27,2 +28,6 @@

private _animateParam: AnimationParam;
private options: AxesOption;
public itm: InterruptManager;
public em: EventManager;
public axm: AxisManager;

@@ -33,8 +38,7 @@ static getDuration(duration: number, min: number, max: number): number {

constructor(
private options: AxesOption,
private itm: InterruptManager,
private em: EventManager,
private axm: AxisManager
) {
constructor({options, itm, em, axm}) {
this.options = options;
this.itm = itm;
this.em = em;
this.axm = axm;
this.animationEnd = this.animationEnd.bind(this);

@@ -61,3 +65,3 @@ }

private createAnimationParam(pos: Axis, duration: number, inputEvent = null): AnimationParam {
private createAnimationParam(pos: Axis, duration: number, option?: ChangeEventOption): AnimationParam {
const depaPos: Axis = this.axm.get();

@@ -72,2 +76,3 @@ const destPos: Axis = this.axm.get(this.axm.map(pos, (v, k, opt) => {

}));
const inputEvent = option && option.event || null;
return {

@@ -82,2 +87,4 @@ depaPos,

inputEvent,
input: option && option.input || null,
isTrusted: !!inputEvent,
done: this.animationEnd

@@ -87,3 +94,3 @@ };

grab(axes: string[], inputType?: IInputType, event?) {
grab(axes: string[], option?: ChangeEventOption) {
if (this._animateParam && !axes.length) {

@@ -94,3 +101,3 @@ const orgPos: Axis = this.axm.get(axes);

if (!this.axm.every(pos, (v, k) => orgPos[k] === v)) {
this.em.triggerChange(pos, inputType, event);
this.em.triggerChange(pos, option, !!option);
}

@@ -100,14 +107,26 @@ this._animateParam = null;

this._raf = null;
this.em.triggerAnimationEnd();
this.em.triggerAnimationEnd(!!event);
}
}
restore(inputEvent = null) {
getEventInfo(): ChangeEventOption {
if (this._animateParam && this._animateParam.input && this._animateParam.inputEvent) {
return {
input: this._animateParam.input,
event: this._animateParam.inputEvent,
};
} else {
return null;
}
}
restore(option: ChangeEventOption) {
const pos: Axis = this.axm.get();
const destPos: Axis = this.axm.map(pos,
(v, k, opt) => Math.min(opt.range[1], Math.max(opt.range[0], v)));
this.animateTo(destPos, this.getDuration(pos, destPos), inputEvent);
this.animateTo(destPos, this.getDuration(pos, destPos), option);
}
animationEnd() {
const beforeParam: ChangeEventOption = this.getEventInfo();
this._animateParam = null;

@@ -125,4 +144,6 @@

this.itm.setInterrupt(false);
this.em.triggerAnimationEnd();
this.axm.isOutside() && this.restore();
this.em.triggerAnimationEnd(!!beforeParam);
if (this.axm.isOutside()) {
this.restore(beforeParam);
}
}

@@ -164,4 +185,4 @@

animateTo(destPos: Axis, duration: number, inputEvent = null) {
const param: AnimationParam = this.createAnimationParam(destPos, duration, inputEvent);
animateTo(destPos: Axis, duration: number, option?: ChangeEventOption) {
const param: AnimationParam = this.createAnimationParam(destPos, duration, option);
const depaPos = { ...param.depaPos };

@@ -181,2 +202,3 @@ const retTrigger = this.em.triggerAnimationStart(param);

if (retTrigger && !AxisManager.equal(userWish.destPos, depaPos)) {
const inputEvent = option && option.event || null;
this.animateLoop({

@@ -187,2 +209,5 @@ depaPos,

delta: this.axm.getDelta(depaPos, userWish.destPos),
isTrusted: !!inputEvent,
inputEvent,
input: option && option.input || null,
}, () => this.animationEnd());

@@ -189,0 +214,0 @@ }

@@ -10,2 +10,3 @@ import * as Component from "@egjs/component";

import { WheelInput } from "./inputType/WheelInput";
import { MoveKeyInput } from "./inputType/MoveKeyInput";
import { TRANSFORM, DIRECTION } from "./const";

@@ -54,3 +55,3 @@ import { IInputType } from "./inputType/InputType";

* @param {AxesOption} [options] The option object of the eg.Axes module<ko>eg.Axes 모듈의 옵션 객체</ko>
* @param {Object.<string, number>} [startPos] The coordinates to be moved when creating an instance<ko>인스턴스 생성시 이동할 좌표</ko>
* @param {Object.<string, number>} [startPos] The coordinates to be moved when creating an instance. not triggering change event.<ko>인스턴스 생성시 이동할 좌표, change 이벤트는 발생하지 않음.</ko>
*

@@ -121,2 +122,3 @@ * @support {"ie": "10+", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "2.3+ (except 3.x)"}

static WheelInput = WheelInput;
static MoveKeyInput = MoveKeyInput;

@@ -183,8 +185,8 @@ /**

options: AxesOption;
private _em: EventManager;
private _axm: AxisManager;
private _itm: InterruptManager;
private _am: AnimationManager;
private _io: InputObserver;
public options: AxesOption;
public em: EventManager;
public axm: AxisManager;
public itm: InterruptManager;
public am: AnimationManager;
public io: InputObserver;
private _inputs: IInputType[] = [];

@@ -207,8 +209,9 @@

this._complementOptions();
this._axm = new AxisManager(this.axis, this.options);
this._em = new EventManager(this, this._axm);
this._itm = new InterruptManager(this.options);
this._am = new AnimationManager(this.options, this._itm, this._em, this._axm);
this._io = new InputObserver(this.options, this._itm, this._em, this._axm, this._am);
startPos && setTimeout(() => this._em.triggerChange(startPos), 0);
this.itm = new InterruptManager(this.options);
this.axm = new AxisManager(this.axis, this.options);
this.em = new EventManager(this);
this.am = new AnimationManager(this);
this.io = new InputObserver(this);
this.em.setAnimationManager(this.am);
startPos && this.em.triggerChange(startPos);
}

@@ -286,3 +289,3 @@

inputType.mapAxes(mapped);
inputType.connect(this._io);
inputType.connect(this.io);
this._inputs.push(inputType);

@@ -321,4 +324,7 @@ return this;

const index = this._inputs.indexOf(inputType);
this._inputs[index].disconnect();
~index && this._inputs.splice(index, 1);
if (index >= 0) {
this._inputs[index].disconnect();
this._inputs.splice(index, 1);
}
} else {

@@ -354,3 +360,3 @@ this._inputs.forEach(v => v.disconnect());

get(axes?: string[]) {
return this._axm.get(axes);
return this.axm.get(axes);
}

@@ -387,3 +393,3 @@

setTo(pos: Axis, duration = 0) {
this._am.setTo(pos, duration);
this.am.setTo(pos, duration);
return this;

@@ -421,3 +427,3 @@ }

setBy(pos: Axis, duration = 0) {
this._am.setBy(pos, duration);
this.am.setBy(pos, duration);
return this;

@@ -450,3 +456,3 @@ }

isBounceArea(axes?: string[]) {
return this._axm.isOutside(axes);
return this.axm.isOutside(axes);
}

@@ -461,4 +467,4 @@

this.disconnect();
this._em.destroy();
this.em.destroy();
}
};

@@ -19,3 +19,3 @@ import { Axis } from "./AxisManager";

return +Math.min(targetRange[1], Math.max(targetRange[0], toDestPos)).toFixed(5);
return +toDestPos.toFixed(5);
},

@@ -22,0 +22,0 @@

import { IInputType } from "./inputType/InputType";
import { Axis } from "./AxisManager";
import { AnimationParam } from "./AnimationManager";
import { AnimationParam, AnimationManager } from "./AnimationManager";
export interface ChangeEventOption {
input: IInputType,
event,
}
export class EventManager {
constructor(private axes, private axm) {
}
public am: AnimationManager;
constructor(private axes) {}
/**

@@ -13,6 +18,7 @@ * This event is fired when a user holds an element on the screen of the device.

* @event
* @param {Object} param The object of data to be sent when the event is fired<ko>이벤트가 발생할 때 전달되는 데이터 객체</ko>
* @param {Object.<string, number>} param.pos coordinate <ko>좌표 정보</ko>
* @param {Object} param.input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
* @param {Object} param.inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
* @type {object} The object of data to be sent when the event is fired<ko>이벤트가 발생할 때 전달되는 데이터 객체</ko>
* @property {Object.<string, number>} pos coordinate <ko>좌표 정보</ko>
* @property {Object} input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
* @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
* @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
*

@@ -31,9 +37,11 @@ * @example

* // event.inputEvent
* // isTrusted
* });
*/
triggerHold(pos: Axis, input: IInputType, event) {
triggerHold(pos: Axis, option: ChangeEventOption) {
this.axes.trigger("hold", {
pos,
input,
inputEvent: event,
input: option.input || null,
inputEvent: option.event || null,
isTrusted: true,
});

@@ -82,11 +90,11 @@ }

* @event
* @type {object} The object of data to be sent when the event is fired<ko>이벤트가 발생할 때 전달되는 데이터 객체</ko>
* @property {Object.<string, number>} depaPos The coordinates when releasing an element<ko>손을 뗐을 때의 좌표 </ko>
* @property {Object.<string, number>} destPos The coordinates to move to after releasing an element<ko>손을 뗀 뒤에 이동할 좌표</ko>
* @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
* @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
* @property {Object} input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
* @property {setTo} setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
* @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
*
* @param {Object} param The object of data to be sent when the event is fired<ko>이벤트가 발생할 때 전달되는 데이터 객체</ko>
* @param {Object.<string, number>} param.depaPos The coordinates when releasing an element<ko>손을 뗐을 때의 좌표 </ko>
* @param {Object.<string, number>} param.destPos The coordinates to move to after releasing an element<ko>손을 뗀 뒤에 이동할 좌표</ko>
* @param {Object.<string, number>} param.delta The movement variation of coordinate <ko>좌표의 변화량</ko>
* @param {Object} param.inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
* @param {Object} param.input The instance of inputType where the event occurred<ko>이벤트가 발생한 inputType 인스턴스</ko>
* @param {setTo} param.setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
*
* @example

@@ -107,2 +115,3 @@ * const axes = new eg.Axes({

* // event.setTo
* // event.isTrusted
*

@@ -123,11 +132,11 @@ * // if you want to change the animation coordinates to move after the 'release' event.

* @event
* @type {object} The object of data to be sent when the event is fired <ko>이벤트가 발생할 때 전달되는 데이터 객체</ko>
* @property {Object.<string, number>} pos The coordinate <ko>좌표</ko>
* @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
* @property {Boolean} holding Indicates whether a user holds an element on the screen of the device.<ko>사용자가 기기의 화면을 누르고 있는지 여부</ko>
* @property {Object} input The instance of inputType where the event occurred. If the value is changed by animation, it returns 'null'.<ko>이벤트가 발생한 inputType 인스턴스. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다.</ko>
* @property {Object} inputEvent The event object received from inputType. If the value is changed by animation, it returns 'null'.<ko>inputType으로 부터 받은 이벤트 객체. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다.</ko>
* @property {set} set Specifies the coordinates to move after the event. It works when the holding value is true <ko>이벤트 이후 이동할 좌표를 지정한다. holding 값이 true일 경우에 동작한다.</ko>
* @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
*
* @param {Object} param The object of data to be sent when the event is fired <ko>이벤트가 발생할 때 전달되는 데이터 객체</ko>
* @param {Object.<string, number>} param.pos The coordinate <ko>좌표</ko>
* @param {Object.<string, number>} param.delta The movement variation of coordinate <ko>좌표의 변화량</ko>
* @param {Boolean} param.holding Indicates whether a user holds an element on the screen of the device.<ko>사용자가 기기의 화면을 누르고 있는지 여부</ko>
* @param {Object} param.input The instance of inputType where the event occurred. If the value is changed by animation, it returns 'null'.<ko>이벤트가 발생한 inputType 인스턴스. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다.</ko>
* @param {Object} param.inputEvent The event object received from inputType. If the value is changed by animation, it returns 'null'.<ko>inputType으로 부터 받은 이벤트 객체. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다.</ko>
* @param {set} param.set Specifies the coordinates to move after the event. It works when the holding value is true <ko>이벤트 이후 이동할 좌표를 지정한다. holding 값이 true일 경우에 동작한다.</ko>
*
* @example

@@ -148,2 +157,3 @@ * const axes = new eg.Axes({

* // event.set
* // event.isTrusted
*

@@ -155,10 +165,13 @@ * // if you want to change the coordinates to move after the 'change' event.

*/
triggerChange(pos: Axis, input: IInputType = null, event = null) {
const moveTo = this.axm.moveTo(pos);
triggerChange(pos: Axis, option: ChangeEventOption = null, holding: boolean = false) {
const eventInfo = this.am.getEventInfo();
const moveTo = this.am.axm.moveTo(pos);
const inputEvent = option && option.event || eventInfo && eventInfo.event || null;
const param = {
pos: moveTo.pos,
delta: moveTo.delta,
holding: !!event,
inputEvent: event,
input,
holding,
inputEvent,
isTrusted: !!inputEvent,
input: option && option.input || eventInfo && eventInfo.input || null,
set: event ? this.createUserControll(moveTo.pos) : () => { },

@@ -168,3 +181,3 @@ };

event && this.axm.set(param.set()["destPos"]);
event && this.am.axm.set(param.set()["destPos"]);
}

@@ -177,11 +190,12 @@

* @event
* @type {object} The object of data to be sent when the event is fired<ko>이벤트가 발생할 때 전달되는 데이터 객체</ko>
* @property {Object.<string, number>} depaPos The coordinates when animation starts<ko>애니메이션이 시작 되었을 때의 좌표 </ko>
* @property {Object.<string, number>} destPos The coordinates to move to. If you change this value, you can run the animation<ko>이동할 좌표. 이값을 변경하여 애니메이션을 동작시킬수 있다</ko>
* @property {Object.<string, number>} delta The movement variation of coordinate <ko>좌표의 변화량</ko>
* @property {Number} duration Duration of the animation (unit: ms). If you change this value, you can control the animation duration time.<ko>애니메이션 진행 시간(단위: ms). 이값을 변경하여 애니메이션의 이동시간을 조절할 수 있다.</ko>
* @property {Object} input The instance of inputType where the event occurred. If the value is changed by animation, it returns 'null'.<ko>이벤트가 발생한 inputType 인스턴스. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다.</ko>
* @property {Object} inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
* @property {setTo} setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
* @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
*
* @param {Object} param The object of data to be sent when the event is fired<ko>이벤트가 발생할 때 전달되는 데이터 객체</ko>
* @param {Object.<string, number>} param.depaPos The coordinates when animation starts<ko>애니메이션이 시작 되었을 때의 좌표 </ko>
* @param {Object.<string, number>} param.destPos The coordinates to move to. If you change this value, you can run the animation<ko>이동할 좌표. 이값을 변경하여 애니메이션을 동작시킬수 있다</ko>
* @param {Object.<string, number>} param.delta The movement variation of coordinate <ko>좌표의 변화량</ko>
* @param {Number} duration Duration of the animation (unit: ms). If you change this value, you can control the animation duration time.<ko>애니메이션 진행 시간(단위: ms). 이값을 변경하여 애니메이션의 이동시간을 조절할 수 있다.</ko>
* @param {Object} param.inputEvent The event object received from inputType <ko>inputType으로 부터 받은 이벤트 객체</ko>
* @param {setTo} param.setTo Specifies the animation coordinates to move after the event <ko>이벤트 이후 이동할 애니메이션 좌표를 지정한다</ko>
*
* @example

@@ -199,4 +213,6 @@ * const axes = new eg.Axes({

* // event.delta
* // event.input
* // event.inputEvent
* // event.setTo
* // event.isTrusted
*

@@ -217,2 +233,4 @@ * // if you want to change the animation coordinates to move after the 'animationStart' event.

* @event
* @type {object} The object of data to be sent when the event is fired<ko>이벤트가 발생할 때 전달되는 데이터 객체</ko>
* @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call <ko>사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다.</ko>
*

@@ -227,7 +245,10 @@ * @example

* }
* }).on("animationEnd", function() {
* }).on("animationEnd", function(event) {
* // event.isTrusted
* });
*/
triggerAnimationEnd() {
this.axes.trigger("animationEnd");
triggerAnimationEnd(isTrusted: boolean = false) {
this.axes.trigger("animationEnd", {
isTrusted,
});
}

@@ -248,2 +269,6 @@

setAnimationManager(am: AnimationManager) {
this.am = am;
}
destroy() {

@@ -250,0 +275,0 @@ this.axes.off();

import Axes from "./Axes";
import { InterruptManager } from "./InterruptManager";
import { IInputType, IInputTypeObserver } from "./inputType/InputType";
import { EventManager } from "./EventManager";
import { EventManager, ChangeEventOption } from "./EventManager";
import { AxisManager, Axis } from "./AxisManager";

@@ -13,9 +13,13 @@ import { AnimationParam, AnimationManager } from "./AnimationManager";

moveDistance: Axis = null;
constructor(
public options: AxesOption,
private itm: InterruptManager,
private em: EventManager,
private axm: AxisManager,
private am: AnimationManager,
) {
public options: AxesOption;
private itm: InterruptManager;
private em: EventManager;
private axm: AxisManager;
private am: AnimationManager;
constructor({options, itm, em, axm, am}) {
this.options = options;
this.itm = itm;
this.em = em;
this.axm = axm;
this.am = am;
}

@@ -48,22 +52,24 @@

}
get(inputType: IInputType): Axis {
return this.axm.get(inputType.axes);
get(input: IInputType): Axis {
return this.axm.get(input.axes);
}
hold(inputType: IInputType, event) {
if (this.itm.isInterrupted() || !inputType.axes.length) {
hold(input: IInputType, event) {
if (this.itm.isInterrupted() || !input.axes.length) {
return;
}
const changeOption: ChangeEventOption = {
input,
event,
};
this.itm.setInterrupt(true);
this.am.grab(inputType.axes, inputType, event);
if (!this.moveDistance) {
this.em.triggerHold(this.axm.get(), inputType, event);
}
this.isOutside = this.axm.isOutside(inputType.axes);
this.moveDistance = this.axm.get(inputType.axes);
this.am.grab(input.axes, changeOption);
!this.moveDistance && this.em.triggerHold(this.axm.get(), changeOption);
this.isOutside = this.axm.isOutside(input.axes);
this.moveDistance = this.axm.get(input.axes);
}
change(inputType: IInputType, event, offset: Axis) {
change(input: IInputType, event, offset: Axis) {
if (!this.itm.isInterrupting() || this.axm.every(offset, v => v === 0)) {
return;
}
const depaPos: Axis = this.axm.get(inputType.axes);
const depaPos: Axis = this.axm.get(input.axes);
let destPos: Axis;

@@ -83,5 +89,8 @@

this.em.triggerChange(destPos, inputType, event);
this.em.triggerChange(destPos, {
input,
event,
}, true);
}
release(inputType: IInputType, event, offset: Axis, inputDuration?: number) {
release(input: IInputType, event, offset: Axis, inputDuration?: number) {
if (!this.itm.isInterrupting()) {

@@ -93,3 +102,3 @@ return;

}
const pos: Axis = this.axm.get(inputType.axes);
const pos: Axis = this.axm.get(input.axes);
const depaPos: Axis = this.axm.get();

@@ -111,3 +120,4 @@ const destPos: Axis = this.axm.get(this.axm.map(offset, (v, k, opt) => {

inputEvent: event,
input: inputType,
input,
isTrusted: true,
};

@@ -120,10 +130,14 @@ this.em.triggerRelease(param);

const isEqual = AxisManager.equal(userWish.destPos, depaPos);
const changeOption: ChangeEventOption = {
input,
event,
};
if (isEqual || userWish.duration === 0) {
!isEqual && this.em.triggerChange(userWish.destPos, inputType, event);
!isEqual && this.em.triggerChange(userWish.destPos, changeOption, true);
this.itm.setInterrupt(false);
this.axm.isOutside() && this.am.restore(event);
this.axm.isOutside() && this.am.restore(changeOption);
} else {
this.am.animateTo(userWish.destPos, userWish.duration, event);
this.am.animateTo(userWish.destPos, userWish.duration, changeOption);
}
}
};

@@ -119,9 +119,9 @@ import { InputObserver } from "./../InputObserver";

this._base = this.observer.get(this)[this.axes[0]];
const offset = this.getOffset(event.scale);
const offset = this.getOffset(event.scale);
this.observer.hold(this, event);
this.observer.change(this, event, toAxis(this.axes, [offset]));
this._prev = event.scale;
this._prev = event.scale;
}
private onPinchMove(event) {
const offset = this.getOffset(event.scale, this._prev);
const offset = this.getOffset(event.scale, this._prev);
this.observer.change(this, event, toAxis(this.axes, [offset]));

@@ -131,3 +131,3 @@ this._prev = event.scale;

private onPinchEnd(event) {
const offset = this.getOffset(event.scale, this._prev);
const offset = this.getOffset(event.scale, this._prev);
this.observer.change(this, event, toAxis(this.axes, [offset]));

@@ -139,3 +139,3 @@ this.observer.release(this, event, toAxis(this.axes, [0]), 0);

private getOffset(pinchScale: number, prev: number = 1): number {
return this._base * (pinchScale - prev) * this.options.scale;
return this._base * (pinchScale - prev) * this.options.scale;
}

@@ -142,0 +142,0 @@

import { InputObserver } from "./../InputObserver";
import * as Hammer from "hammerjs";
import { $ } from "../utils";

@@ -9,3 +8,2 @@ import { UNIQUEKEY, toAxis, convertInputType, createHammer, IInputType, IInputTypeObserver } from "./InputType";

scale?: number;
throttle?: number;
}

@@ -17,3 +15,2 @@

* @property {Number} [scale=1] Coordinate scale that a user can move<ko>사용자의 동작으로 이동하는 좌표의 배율</ko>
* @property {Number} [throttle=100]
**/

@@ -42,2 +39,3 @@

private _isEnabled = false;
private _isHolded = false;
private _timer = null;

@@ -49,4 +47,3 @@ private observer: IInputTypeObserver;

...{
scale: 1,
throttle: 100
scale: 1
}, ...options

@@ -91,9 +88,17 @@ };

}
if (!this._isHolded) {
this.observer.hold(this, event);
this._isHolded = true;
}
const offset = (event.deltaY > 0 ? -1 : 1) * this.options.scale;
this.observer.change(this, event, toAxis(this.axes, [offset]));
clearTimeout(this._timer);
this._timer = setTimeout(() => {
this.observer.hold(this, event);
const offset = (event.deltaY > 0 ? -1 : 1) * this.options.scale;
this.observer.change(this, event, toAxis(this.axes, [offset]));
this.observer.release(this, event, toAxis(this.axes, [0]));
}, 200);
if (this._isHolded) {
this.observer.release(this, event, toAxis(this.axes, [0]));
this._isHolded = false;
}
}, 50);
}

@@ -100,0 +105,0 @@

declare var jQuery: any;
export function toArray(nodes: NodeList): Array<HTMLElement> {
// const el = Array.prototype.slice.call(nodes);
// for IE8
const el = [];
for (let i = 0, len = nodes.length;
i < len; i++) {
el.push(nodes[i]);
}
return el;
}
export function $(param, multi = false) {

@@ -15,5 +26,5 @@ let el;

dummy.innerHTML = param;
el = Array.prototype.slice.call(dummy.childNodes);
el = toArray(dummy.childNodes);
} else { // Selector
el = Array.prototype.slice.call(document.querySelectorAll(param));
el = toArray(document.querySelectorAll(param));
}

@@ -62,3 +73,3 @@ if (!multi) {

return window.setTimeout(function() {
callback(window.performance && window.performance.now());
callback(window.performance && window.performance.now && window.performance.now() || new Date().getTime());
}, 16);

@@ -65,0 +76,0 @@ };

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc