var EJS = function(_0x574f5e) { window.EJS_MODULES = _0x574f5e; var _0x41a1e4 = {}; var o = []; function _0x1d686b(_0x289550) { if (_0x41a1e4[_0x289550]) return _0x41a1e4[_0x289550].exports; o.push(_0x289550) var _0x4f6398 = _0x41a1e4[_0x289550] = { 'i': _0x289550, 'l': false, 'exports': {} }; return _0x574f5e[_0x289550].call(_0x4f6398.exports, _0x4f6398, _0x4f6398.exports, _0x1d686b), _0x4f6398.l = true, _0x4f6398.exports; } window.getUsedModules = function() { return o.sort(function(a, b) { return (a > b) ? 1 : -1; }); } window.getUnusedModules = function() { var rv = []; var q = getUsedModules(); for (var i=0; i<_0x574f5e.length; i++) { if (_0x574f5e[i] === null) continue; if (!q.includes(i)) rv.push(i); } return rv; } if (!typeof Array.isArray == 'function') { var _0x484695 = {}.toString; Array.isArray = function(_0xd04970) { return '[object Array]' == _0x484695.call(_0xd04970); }; } _0x1d686b.m = _0x574f5e; _0x1d686b.c = _0x41a1e4; _0x1d686b.d = function(_0x3c0e40, _0x5aa193, _0x1a35d2) { _0x1d686b.o(_0x3c0e40, _0x5aa193) || Object.defineProperty(_0x3c0e40, _0x5aa193, { 'enumerable': true, 'get': _0x1a35d2 }); }; _0x1d686b.r = function(_0x4668d1) { 'undefined' != typeof Symbol && Symbol.toStringTag && Object.defineProperty(_0x4668d1, Symbol.toStringTag, { 'value': 'Module' }), Object.defineProperty(_0x4668d1, '__esModule', { 'value': true }); }; _0x1d686b.t = function(_0xb8bed8, _0x43e71a) { if (0x1 & _0x43e71a && (_0xb8bed8 = _0x1d686b(_0xb8bed8)), 0x8 & _0x43e71a) return _0xb8bed8; if (0x4 & _0x43e71a && 'object' == typeof _0xb8bed8 && _0xb8bed8 && _0xb8bed8.__esModule) return _0xb8bed8; var _0x300168 = Object.create(null); if (_0x1d686b.r(_0x300168), Object.defineProperty(_0x300168, 'default', { 'enumerable': true, 'value': _0xb8bed8 }), 0x2 & _0x43e71a && 'string' != typeof _0xb8bed8) for (var _0xbd7857 in _0xb8bed8) _0x1d686b.d(_0x300168, _0xbd7857, function(_0x811a86) { return _0xb8bed8[_0x811a86]; }.bind(null, _0xbd7857)); return _0x300168; }; _0x1d686b.n = function(_0x55b0d4) { var _0x4d7468 = _0x55b0d4 && _0x55b0d4.__esModule ? function() { return _0x55b0d4.default; } : function() { return _0x55b0d4; }; return _0x1d686b.d(_0x4d7468, 'a', _0x4d7468), _0x4d7468; }; _0x1d686b.o = function(_0x1ed01a, _0x4abf0b) { return Object.prototype.hasOwnProperty.call(_0x1ed01a, _0x4abf0b); }; _0x1d686b.p = ''; _0x1d686b.s = 161; return _0x1d686b(_0x1d686b.s); }([function(module) { module.exports = function(error, element, _this) { console.warn(error) if (error && error.response && error.response.status === 0) { element.innerHTML = ''+_this.localization('CORS Error')+''; } else { element.innerHTML = ''+_this.localization('Network Error')+''; } } }, null, null, null, null, null, function(module) { //I wrote this myself -- theres bound to be bugs function Gamepad() { var gp = navigator.getGamepads || navigator.webkitGetGamepads; if (!gp) { throw new Error("get gamepads not found!"); } this.rAF = window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.requestAnimationFrame; if (!this.rAF) { throw new Error("request animation frame was not found!"); } this.loop(); } Gamepad.prototype = { gamepads: [], rAF: null, getGamepads: function() { return navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : []); }, loop: async function() { this.updateGamepadState(); this.rAF.call(null, this.loop.bind(this)); }, updateGamepadState: function() { var gamepads = this.getGamepads(); for (var i=0; i= 0x0 && _0x16647e._handlers_[_0x241550].splice(_0x16647e._handlers_[_0x241550].indexOf(_0xc2215a), 0x1), _0x16647e; }, _0x3fa093.prototype.trigger = function(_0x38a190, _0x828e63) { var _0x16647e, _0xcf280d = this, _0xaa0dc6 = _0x38a190.split(/[ ,]+/g); _0xcf280d._handlers_ = _0xcf280d._handlers_ || {}; for (var _0x5c0574 = 0x0; _0x5c0574 < _0xaa0dc6.length; _0x5c0574 += 0x1) _0x16647e = _0xaa0dc6[_0x5c0574], _0xcf280d._handlers_[_0x16647e] && _0xcf280d._handlers_[_0x16647e].length && _0xcf280d._handlers_[_0x16647e].forEach(function(_0xd6a234) { _0xd6a234.call(_0xcf280d, { 'type': _0x16647e, 'target': _0xcf280d }, _0x828e63); }); }, _0x3fa093.prototype.config = function(_0x4c598e) { var _0x472eae = this; _0x472eae.options = _0x472eae.defaults || {}, _0x4c598e && (_0x472eae.options = _0x58adb3.safeExtend(_0x472eae.options, _0x4c598e)); }, _0x3fa093.prototype.bindEvt = function(_0x1ada9c, _0x498cf5) { var _0x16647e = this; return _0x16647e._domHandlers_ = _0x16647e._domHandlers_ || {}, _0x16647e._domHandlers_[_0x498cf5] = function() { 'function' == typeof _0x16647e['on' + _0x498cf5] ? _0x16647e['on' + _0x498cf5].apply(_0x16647e, arguments) : console.warn('[WARNING] : Missing "on' + _0x498cf5 + '" handler.'); }, _0x58adb3.bindEvt(_0x1ada9c, _0x57280e[_0x498cf5], _0x16647e._domHandlers_[_0x498cf5]), _0x3ab23c[_0x498cf5] && _0x58adb3.bindEvt(_0x1ada9c, _0x3ab23c[_0x498cf5], _0x16647e._domHandlers_[_0x498cf5]), _0x16647e; }, _0x3fa093.prototype.unbindEvt = function(_0x5d5ea4, _0x581a68) { var _0x16647e = this; return _0x16647e._domHandlers_ = _0x16647e._domHandlers_ || {}, _0x58adb3.unbindEvt(_0x5d5ea4, _0x57280e[_0x581a68], _0x16647e._domHandlers_[_0x581a68]), _0x3ab23c[_0x581a68] && _0x58adb3.unbindEvt(_0x5d5ea4, _0x3ab23c[_0x581a68], _0x16647e._domHandlers_[_0x581a68]), delete _0x16647e._domHandlers_[_0x581a68], this; }, _0x472eae.prototype = new _0x3fa093(), _0x472eae.constructor = _0x472eae, _0x472eae.id = 0x0, _0x472eae.prototype.buildEl = function(_0x2b6936) { return this.ui = {}, this.options.dataOnly ? this : (this.ui.el = document.createElement('div'), this.ui.back = document.createElement('div'), this.ui.front = document.createElement('div'), this.ui.el.className = 'nipple collection_' + this.collection.id, this.ui.back.className = 'back', this.ui.front.className = 'front', this.ui.el.setAttribute('id', 'nipple_' + this.collection.id + '_' + this.id), this.ui.el.appendChild(this.ui.back), this.ui.el.appendChild(this.ui.front), this); }, _0x472eae.prototype.stylize = function() { if (this.options.dataOnly) return this; var _0x3fa093 = this.options.fadeTime + 'ms', _0x472eae = _0x58adb3.getVendorStyle('borderRadius', '50%'), _0x16647e = _0x58adb3.getTransitionStyle('transition', 'opacity', _0x3fa093), _0x344f45 = {}; return _0x344f45.el = { 'position': 'absolute', 'opacity': this.options.restOpacity, 'display': 'block', 'zIndex': 0x3e7 }, _0x344f45.back = { 'position': 'absolute', 'display': 'block', 'width': this.options.size + 'px', 'height': this.options.size + 'px', 'marginLeft': -this.options.size / 0x2 + 'px', 'marginTop': -this.options.size / 0x2 + 'px', 'background': this.options.color, 'opacity': '.5' }, _0x344f45.front = { 'width': this.options.size / 0x2 + 'px', 'height': this.options.size / 0x2 + 'px', 'position': 'absolute', 'display': 'block', 'marginLeft': -this.options.size / 0x4 + 'px', 'marginTop': -this.options.size / 0x4 + 'px', 'background': this.options.color, 'opacity': '.5' }, _0x58adb3.extend(_0x344f45.el, _0x16647e), _0x58adb3.extend(_0x344f45.back, _0x472eae), _0x58adb3.extend(_0x344f45.front, _0x472eae), this.applyStyles(_0x344f45), this; }, _0x472eae.prototype.applyStyles = function(_0x3381ee) { for (var _0x472eae in this.ui) if (this.ui.hasOwnProperty(_0x472eae)) for (var _0x16647e in _0x3381ee[_0x472eae]) this.ui[_0x472eae].style[_0x16647e] = _0x3381ee[_0x472eae][_0x16647e]; return this; }, _0x472eae.prototype.addToDom = function() { return this.options.dataOnly || document.body.contains(this.ui.el) ? this : (this.options.zone.appendChild(this.ui.el), this); }, _0x472eae.prototype.removeFromDom = function() { return this.options.dataOnly || !document.body.contains(this.ui.el) ? this : (this.options.zone.removeChild(this.ui.el), this); }, _0x472eae.prototype.destroy = function() { clearTimeout(this.removeTimeout), clearTimeout(this.showTimeout), clearTimeout(this.restTimeout), this.trigger('destroyed', this.instance), this.removeFromDom(), this.off(); }, _0x472eae.prototype.show = function(_0x6bda29) { var _0x472eae = this; return _0x472eae.options.dataOnly ? _0x472eae : (clearTimeout(_0x472eae.removeTimeout), clearTimeout(_0x472eae.showTimeout), clearTimeout(_0x472eae.restTimeout), _0x472eae.addToDom(), _0x472eae.restCallback(), setTimeout(function() { _0x472eae.ui.el.style.opacity = 0x1; }, 0x0), _0x472eae.showTimeout = setTimeout(function() { _0x472eae.trigger('shown', _0x472eae.instance), 'function' == typeof _0x6bda29 && _0x6bda29.call(this); }, _0x472eae.options.fadeTime), _0x472eae); }, _0x472eae.prototype.hide = function(_0x5d40e9) { var _0x472eae = this; return _0x472eae.options.dataOnly ? _0x472eae : (_0x472eae.ui.el.style.opacity = _0x472eae.options.restOpacity, clearTimeout(_0x472eae.removeTimeout), clearTimeout(_0x472eae.showTimeout), clearTimeout(_0x472eae.restTimeout), _0x472eae.removeTimeout = setTimeout(function() { var _0x16647e = 'dynamic' === _0x472eae.options.mode ? 'none' : 'block'; _0x472eae.ui.el.style.display = _0x16647e, 'function' == typeof _0x5d40e9 && _0x5d40e9.call(_0x472eae), _0x472eae.trigger('hidden', _0x472eae.instance); }, _0x472eae.options.fadeTime), _0x472eae.options.restJoystick && _0x472eae.restPosition(), _0x472eae); }, _0x472eae.prototype.restPosition = function(_0x535ac8) { var _0x472eae = this; _0x472eae.frontPosition = { 'x': 0x0, 'y': 0x0 }; var _0x16647e = _0x472eae.options.fadeTime + 'ms', _0x274bb9 = {}; _0x274bb9.front = _0x58adb3.getTransitionStyle('transition', ['top', 'left'], _0x16647e); var _0x4998bc = { 'front': {} }; _0x4998bc.front = { 'left': _0x472eae.frontPosition.x + 'px', 'top': _0x472eae.frontPosition.y + 'px' }, _0x472eae.applyStyles(_0x274bb9), _0x472eae.applyStyles(_0x4998bc), _0x472eae.restTimeout = setTimeout(function() { 'function' == typeof _0x535ac8 && _0x535ac8.call(_0x472eae), _0x472eae.restCallback(); }, _0x472eae.options.fadeTime); }, _0x472eae.prototype.restCallback = function() { var _0x3fa093 = this, _0x472eae = {}; _0x472eae.front = _0x58adb3.getTransitionStyle('transition', 'none', ''), _0x3fa093.applyStyles(_0x472eae), _0x3fa093.trigger('rested', _0x3fa093.instance); }, _0x472eae.prototype.resetDirection = function() { this.direction = { 'x': !0x1, 'y': !0x1, 'angle': !0x1 }; }, _0x472eae.prototype.computeDirection = function(_0x43e5d8) { var _0x472eae, _0x16647e, _0xfc023b, _0xee7b86 = _0x43e5d8.angle.radian, _0x22a09e = Math.PI / 0x4, _0xc76eb4 = Math.PI / 0x2; if (_0xee7b86 > _0x22a09e && _0xee7b86 < 0x3 * _0x22a09e && !_0x43e5d8.lockX ? _0x472eae = 'up' : _0xee7b86 > -_0x22a09e && _0xee7b86 <= _0x22a09e && !_0x43e5d8.lockY ? _0x472eae = 'left' : _0xee7b86 > 0x3 * -_0x22a09e && _0xee7b86 <= -_0x22a09e && !_0x43e5d8.lockX ? _0x472eae = 'down' : _0x43e5d8.lockY || (_0x472eae = 'right'), _0x43e5d8.lockY || (_0x16647e = _0xee7b86 > -_0xc76eb4 && _0xee7b86 < _0xc76eb4 ? 'left' : 'right'), _0x43e5d8.lockX || (_0xfc023b = _0xee7b86 > 0x0 ? 'up' : 'down'), _0x43e5d8.force > this.options.threshold) { var _0x3e5187 = {}; for (var _0x28b8ad in this.direction) this.direction.hasOwnProperty(_0x28b8ad) && (_0x3e5187[_0x28b8ad] = this.direction[_0x28b8ad]); var _0x2939ab = {}; for (var _0x28b8ad in this.direction = { 'x': _0x16647e, 'y': _0xfc023b, 'angle': _0x472eae }, _0x43e5d8.direction = this.direction, _0x3e5187) _0x3e5187[_0x28b8ad] === this.direction[_0x28b8ad] && (_0x2939ab[_0x28b8ad] = true); if (_0x2939ab.x && _0x2939ab.y && _0x2939ab.angle) return _0x43e5d8; _0x2939ab.x && _0x2939ab.y || this.trigger('plain', _0x43e5d8), _0x2939ab.x || this.trigger('plain:' + _0x16647e, _0x43e5d8), _0x2939ab.y || this.trigger('plain:' + _0xfc023b, _0x43e5d8), _0x2939ab.angle || this.trigger('dir dir:' + _0x472eae, _0x43e5d8); } return _0x43e5d8; }, _0x16647e.prototype = new _0x3fa093(), _0x16647e.constructor = _0x16647e, _0x16647e.id = 0x0, _0x16647e.prototype.prepareNipples = function() { var _0x3fa093 = this, _0x472eae = _0x3fa093.nipples; _0x472eae.on = _0x3fa093.on.bind(_0x3fa093), _0x472eae.off = _0x3fa093.off.bind(_0x3fa093), _0x472eae.options = _0x3fa093.options, _0x472eae.destroy = _0x3fa093.destroy.bind(_0x3fa093), _0x472eae.ids = _0x3fa093.ids, _0x472eae.id = _0x3fa093.id, _0x472eae.processOnMove = _0x3fa093.processOnMove.bind(_0x3fa093), _0x472eae.processOnEnd = _0x3fa093.processOnEnd.bind(_0x3fa093), _0x472eae.get = function(_0x551448) { if (void 0x0 === _0x551448) return _0x472eae[0x0]; for (var _0x16647e = 0x0, _0x189014 = _0x472eae.length; _0x16647e < _0x189014; _0x16647e += 0x1) if (_0x472eae[_0x16647e].identifier === _0x551448) return _0x472eae[_0x16647e]; return !0x1; }; }, _0x16647e.prototype.bindings = function() { var _0x3fa093 = this; _0x3fa093.bindEvt(_0x3fa093.options.zone, 'start'), _0x3fa093.options.zone.style.touchAction = 'none', _0x3fa093.options.zone.style.msTouchAction = 'none'; }, _0x16647e.prototype.begin = function() { var _0x3fa093 = this, _0x472eae = _0x3fa093.options; if ('static' === _0x472eae.mode) { var _0x16647e = _0x3fa093.createNipple(_0x472eae.position, _0x3fa093.manager.getIdentifier()); _0x16647e.add(), _0x3fa093.idles.push(_0x16647e); } }, _0x16647e.prototype.createNipple = function(_0xc0ab75, _0x5ce020) { var _0x386a33 = this, _0x173c13 = _0x58adb3.getScroll(), _0x3c5320 = {}, _0x500442 = _0x386a33.options; if (_0xc0ab75.x && _0xc0ab75.y) _0x3c5320 = { 'x': _0xc0ab75.x - (_0x173c13.x + _0x386a33.box.left), 'y': _0xc0ab75.y - (_0x173c13.y + _0x386a33.box.top) }; else if (_0xc0ab75.top || _0xc0ab75.right || _0xc0ab75.bottom || _0xc0ab75.left) { var _0x549507 = document.createElement('DIV'); _0x549507.style.display = 'hidden', _0x549507.style.top = _0xc0ab75.top, _0x549507.style.right = _0xc0ab75.right, _0x549507.style.bottom = _0xc0ab75.bottom, _0x549507.style.left = _0xc0ab75.left, _0x549507.style.position = 'absolute', _0x500442.zone.appendChild(_0x549507); var _0x399802 = _0x549507.getBoundingClientRect(); _0x500442.zone.removeChild(_0x549507), _0x3c5320 = _0xc0ab75, _0xc0ab75 = { 'x': _0x399802.left + _0x173c13.x, 'y': _0x399802.top + _0x173c13.y }; } var _0x1efaec = new _0x472eae(_0x386a33, { 'color': _0x500442.color, 'size': _0x500442.size, 'threshold': _0x500442.threshold, 'fadeTime': _0x500442.fadeTime, 'dataOnly': _0x500442.dataOnly, 'restJoystick': _0x500442.restJoystick, 'restOpacity': _0x500442.restOpacity, 'mode': _0x500442.mode, 'identifier': _0x5ce020, 'position': _0xc0ab75, 'zone': _0x500442.zone, 'frontPosition': { 'x': 0x0, 'y': 0x0 } }); return _0x500442.dataOnly || (_0x58adb3.applyPosition(_0x1efaec.ui.el, _0x3c5320), _0x58adb3.applyPosition(_0x1efaec.ui.front, _0x1efaec.frontPosition)), _0x386a33.nipples.push(_0x1efaec), _0x386a33.trigger('added ' + _0x1efaec.identifier + ':added', _0x1efaec), _0x386a33.manager.trigger('added ' + _0x1efaec.identifier + ':added', _0x1efaec), _0x386a33.bindNipple(_0x1efaec), _0x1efaec; }, _0x16647e.prototype.updateBox = function() { this.box = this.options.zone.getBoundingClientRect(); }, _0x16647e.prototype.bindNipple = function(_0xf4e27d) { var _0x472eae, _0x16647e = this, _0x4afd5b = function(_0x15dccf, _0xc9235b) { _0x472eae = _0x15dccf.type + ' ' + _0xc9235b.id + ':' + _0x15dccf.type, _0x16647e.trigger(_0x472eae, _0xc9235b); }; _0xf4e27d.on('destroyed', _0x16647e.onDestroyed.bind(_0x16647e)), _0xf4e27d.on('shown hidden rested dir plain', _0x4afd5b), _0xf4e27d.on('dir:up dir:right dir:down dir:left', _0x4afd5b), _0xf4e27d.on('plain:up plain:right plain:down plain:left', _0x4afd5b); }, _0x16647e.prototype.pressureFn = function(_0x136ce1, _0xc3b871, _0x2644f5) { var _0x19ef4e = this, _0xa70739 = 0x0; clearInterval(_0x19ef4e.pressureIntervals[_0x2644f5]), _0x19ef4e.pressureIntervals[_0x2644f5] = setInterval(function() { var _0x2644f5 = _0x136ce1.force || _0x136ce1.pressure || _0x136ce1.webkitForce || 0x0; _0x2644f5 !== _0xa70739 && (_0xc3b871.trigger('pressure', _0x2644f5), _0x19ef4e.trigger('pressure ' + _0xc3b871.identifier + ':pressure', _0x2644f5), _0xa70739 = _0x2644f5); }.bind(_0x19ef4e), 0x64); }, _0x16647e.prototype.onstart = function(_0x5699c2) { var _0x472eae = this, _0x16647e = _0x472eae.options; _0x5699c2 = _0x58adb3.prepareEvent(_0x5699c2), _0x472eae.updateBox(); return _0x58adb3.map(_0x5699c2, function(_0x17a155) { _0x472eae.actives.length < _0x16647e.maxNumberOfNipples && _0x472eae.processOnStart(_0x17a155); }), _0x472eae.manager.bindDocument(), !0x1; }, _0x16647e.prototype.processOnStart = function(_0x4d7333) { var _0x472eae, _0x16647e = this, _0x1c6bd6 = _0x16647e.options, _0x5a237d = _0x16647e.manager.getIdentifier(_0x4d7333), _0x4afe2c = _0x4d7333.force || _0x4d7333.pressure || _0x4d7333.webkitForce || 0x0, _0x47c07e = { 'x': _0x4d7333.pageX, 'y': _0x4d7333.pageY }, _0xd40c11 = _0x16647e.getOrCreate(_0x5a237d, _0x47c07e); _0xd40c11.identifier !== _0x5a237d && _0x16647e.manager.removeIdentifier(_0xd40c11.identifier), _0xd40c11.identifier = _0x5a237d; var _0x5e158d = function(_0x3f02f1) { _0x3f02f1.trigger('start', _0x3f02f1), _0x16647e.trigger('start ' + _0x3f02f1.id + ':start', _0x3f02f1), _0x3f02f1.show(), _0x4afe2c > 0x0 && _0x16647e.pressureFn(_0x4d7333, _0x3f02f1, _0x3f02f1.identifier), _0x16647e.processOnMove(_0x4d7333); }; if ((_0x472eae = _0x16647e.idles.indexOf(_0xd40c11)) >= 0x0 && _0x16647e.idles.splice(_0x472eae, 0x1), _0x16647e.actives.push(_0xd40c11), _0x16647e.ids.push(_0xd40c11.identifier), 'semi' !== _0x1c6bd6.mode) _0x5e158d(_0xd40c11); else { if (!(_0x58adb3.distance(_0x47c07e, _0xd40c11.position) <= _0x1c6bd6.catchDistance)) return _0xd40c11.destroy(), void _0x16647e.processOnStart(_0x4d7333); _0x5e158d(_0xd40c11); } return _0xd40c11; }, _0x16647e.prototype.getOrCreate = function(_0x265630, _0x4759b2) { var _0x16647e, _0x2f9720 = this, _0x11375b = _0x2f9720.options; return /(semi|static)/ .test(_0x11375b.mode) ? (_0x16647e = _0x2f9720.idles[0x0]) ? (_0x2f9720.idles.splice(0x0, 0x1), _0x16647e) : 'semi' === _0x11375b.mode ? _0x2f9720.createNipple(_0x4759b2, _0x265630) : (console.warn('Coudln\x27t find the needed nipple.'), !0x1) : _0x16647e = _0x2f9720.createNipple(_0x4759b2, _0x265630); }, _0x16647e.prototype.processOnMove = function(_0x15a60f) { var _0x472eae = this, _0x16647e = _0x472eae.options, _0x1a29a3 = _0x472eae.manager.getIdentifier(_0x15a60f), _0x117854 = _0x472eae.nipples.get(_0x1a29a3); if (!_0x117854) return console.error('Found zombie joystick with ID ' + _0x1a29a3), void _0x472eae.manager.removeIdentifier(_0x1a29a3); _0x117854.identifier = _0x1a29a3; var _0x2f202f = _0x117854.options.size / 0x2, _0x4cd3e8 = { 'x': _0x15a60f.pageX, 'y': _0x15a60f.pageY }, _0xb2440c = _0x58adb3.distance(_0x4cd3e8, _0x117854.position), _0x2f6ab9 = _0x58adb3.angle(_0x4cd3e8, _0x117854.position), _0x266647 = _0x58adb3.radians(_0x2f6ab9), _0x55efdf = _0xb2440c / _0x2f202f; _0xb2440c > _0x2f202f && (_0xb2440c = _0x2f202f, _0x4cd3e8 = _0x58adb3.findCoord(_0x117854.position, _0xb2440c, _0x2f6ab9)); var _0x2c7232 = _0x4cd3e8.x - _0x117854.position.x, _0x179519 = _0x4cd3e8.y - _0x117854.position.y; _0x16647e.lockX && (_0x179519 = 0x0), _0x16647e.lockY && (_0x2c7232 = 0x0), _0x117854.frontPosition = { 'x': _0x2c7232, 'y': _0x179519 }, _0x16647e.dataOnly || _0x58adb3.applyPosition(_0x117854.ui.front, _0x117854.frontPosition); var _0x2d347e = { 'identifier': _0x117854.identifier, 'position': _0x4cd3e8, 'force': _0x55efdf, 'pressure': _0x15a60f.force || _0x15a60f.pressure || _0x15a60f.webkitForce || 0x0, 'distance': _0xb2440c, 'angle': { 'radian': _0x266647, 'degree': _0x2f6ab9 }, 'instance': _0x117854, 'lockX': _0x16647e.lockX, 'lockY': _0x16647e.lockY }; (_0x2d347e = _0x117854.computeDirection(_0x2d347e)).angle = { 'radian': _0x58adb3.radians(0xb4 - _0x2f6ab9), 'degree': 0xb4 - _0x2f6ab9 }, _0x117854.trigger('move', _0x2d347e), _0x472eae.trigger('move ' + _0x117854.id + ':move', _0x2d347e); }, _0x16647e.prototype.processOnEnd = function(_0x17d221) { var _0x472eae = this, _0x16647e = _0x472eae.options, _0xfa275e = _0x472eae.manager.getIdentifier(_0x17d221), _0x184c33 = _0x472eae.nipples.get(_0xfa275e), _0x3c0d87 = _0x472eae.manager.removeIdentifier(_0x184c33.identifier); _0x184c33 && (_0x16647e.dataOnly || _0x184c33.hide(function() { 'dynamic' === _0x16647e.mode && (_0x184c33.trigger('removed', _0x184c33), _0x472eae.trigger('removed ' + _0x184c33.id + ':removed', _0x184c33), _0x472eae.manager.trigger('removed ' + _0x184c33.id + ':removed', _0x184c33), _0x184c33.destroy()); }), clearInterval(_0x472eae.pressureIntervals[_0x184c33.identifier]), _0x184c33.resetDirection(), _0x184c33.trigger('end', _0x184c33), _0x472eae.trigger('end ' + _0x184c33.id + ':end', _0x184c33), _0x472eae.ids.indexOf(_0x184c33.identifier) >= 0x0 && _0x472eae.ids.splice(_0x472eae.ids.indexOf(_0x184c33.identifier), 0x1), _0x472eae.actives.indexOf(_0x184c33) >= 0x0 && _0x472eae.actives.splice(_0x472eae.actives.indexOf(_0x184c33), 0x1), /(semi|static)/ .test(_0x16647e.mode) ? _0x472eae.idles.push(_0x184c33) : _0x472eae.nipples.indexOf(_0x184c33) >= 0x0 && _0x472eae.nipples.splice(_0x472eae.nipples.indexOf(_0x184c33), 0x1), _0x472eae.manager.unbindDocument(), /(semi|static)/ .test(_0x16647e.mode) && (_0x472eae.manager.ids[_0x3c0d87.id] = _0x3c0d87.identifier)); }, _0x16647e.prototype.onDestroyed = function(_0x19ea83, _0x59a0c6) { var _0x16647e = this; _0x16647e.nipples.indexOf(_0x59a0c6) >= 0x0 && _0x16647e.nipples.splice(_0x16647e.nipples.indexOf(_0x59a0c6), 0x1), _0x16647e.actives.indexOf(_0x59a0c6) >= 0x0 && _0x16647e.actives.splice(_0x16647e.actives.indexOf(_0x59a0c6), 0x1), _0x16647e.idles.indexOf(_0x59a0c6) >= 0x0 && _0x16647e.idles.splice(_0x16647e.idles.indexOf(_0x59a0c6), 0x1), _0x16647e.ids.indexOf(_0x59a0c6.identifier) >= 0x0 && _0x16647e.ids.splice(_0x16647e.ids.indexOf(_0x59a0c6.identifier), 0x1), _0x16647e.manager.removeIdentifier(_0x59a0c6.identifier), _0x16647e.manager.unbindDocument(); }, _0x16647e.prototype.destroy = function() { var _0x3fa093 = this; for (var _0x472eae in _0x3fa093.unbindEvt(_0x3fa093.options.zone, 'start'), _0x3fa093.nipples.forEach(function(_0x658e68) { _0x658e68.destroy(); }), _0x3fa093.pressureIntervals) _0x3fa093.pressureIntervals.hasOwnProperty(_0x472eae) && clearInterval(_0x3fa093.pressureIntervals[_0x472eae]); _0x3fa093.trigger('destroyed', _0x3fa093.nipples), _0x3fa093.manager.unbindDocument(), _0x3fa093.off(); }, _0x239176.prototype = new _0x3fa093(), _0x239176.constructor = _0x239176, _0x239176.prototype.prepareCollections = function() { var _0x3fa093 = this; _0x3fa093.collections.create = _0x3fa093.create.bind(_0x3fa093), _0x3fa093.collections.on = _0x3fa093.on.bind(_0x3fa093), _0x3fa093.collections.off = _0x3fa093.off.bind(_0x3fa093), _0x3fa093.collections.destroy = _0x3fa093.destroy.bind(_0x3fa093), _0x3fa093.collections.get = function(_0x1ddafb) { var _0x16647e; return _0x3fa093.collections.every(function(_0x14c8e1) { return !(_0x16647e = _0x14c8e1.get(_0x1ddafb)); }), _0x16647e; }; }, _0x239176.prototype.create = function(_0x46af65) { return this.createCollection(_0x46af65); }, _0x239176.prototype.createCollection = function(_0x252eb1) { var _0x472eae = this, _0x58e8ba = new _0x16647e(_0x472eae, _0x252eb1); return _0x472eae.bindCollection(_0x58e8ba), _0x472eae.collections.push(_0x58e8ba), _0x58e8ba; }, _0x239176.prototype.bindCollection = function(_0x56e9ba) { var _0x472eae, _0x16647e = this, _0x87b125 = function(_0x7e6251, _0x2c4076) { _0x472eae = _0x7e6251.type + ' ' + _0x2c4076.id + ':' + _0x7e6251.type, _0x16647e.trigger(_0x472eae, _0x2c4076); }; _0x56e9ba.on('destroyed', _0x16647e.onDestroyed.bind(_0x16647e)), _0x56e9ba.on('shown hidden rested dir plain', _0x87b125), _0x56e9ba.on('dir:up dir:right dir:down dir:left', _0x87b125), _0x56e9ba.on('plain:up plain:right plain:down plain:left', _0x87b125); }, _0x239176.prototype.bindDocument = function() { var _0x3fa093 = this; _0x3fa093.binded || (_0x3fa093.bindEvt(document, 'move').bindEvt(document, 'end'), _0x3fa093.binded = true); }, _0x239176.prototype.unbindDocument = function(_0x1b19b9) { var _0x472eae = this; Object.keys(_0x472eae.ids).length && true !== _0x1b19b9 || (_0x472eae.unbindEvt(document, 'move').unbindEvt(document, 'end'), _0x472eae.binded = !0x1); }, _0x239176.prototype.getIdentifier = function(_0x5b021b) { var _0x472eae; return _0x5b021b ? void 0x0 === (_0x472eae = void 0x0 === _0x5b021b.identifier ? _0x5b021b.pointerId : _0x5b021b.identifier) && (_0x472eae = this.latest || 0x0) : _0x472eae = this.index, void 0x0 === this.ids[_0x472eae] && (this.ids[_0x472eae] = this.index, this.index += 0x1), this.latest = _0x472eae, this.ids[_0x472eae]; }, _0x239176.prototype.removeIdentifier = function(_0x371920) { var _0x472eae = {}; for (var _0x16647e in this.ids) if (this.ids[_0x16647e] === _0x371920) { _0x472eae.id = _0x16647e, _0x472eae.identifier = this.ids[_0x16647e], delete this.ids[_0x16647e]; break; } return _0x472eae; }, _0x239176.prototype.onmove = function(_0x591f10) { return this.onAny('move', _0x591f10), !0x1; }, _0x239176.prototype.onend = function(_0x383c4e) { return this.onAny('end', _0x383c4e), !0x1; }, _0x239176.prototype.oncancel = function(_0x4ff5ab) { return this.onAny('end', _0x4ff5ab), !0x1; }, _0x239176.prototype.onAny = function(_0x223496, _0x1bbc17) { var _0x16647e, _0x91a6ff = this, _0x348841 = 'processOn' + _0x223496.charAt(0x0).toUpperCase() + _0x223496.slice(0x1); _0x1bbc17 = _0x58adb3.prepareEvent(_0x1bbc17); var _0xcd5113 = function(_0x578516, _0x470568, _0x2652b6) { _0x2652b6.ids.indexOf(_0x470568) >= 0x0 && (_0x2652b6[_0x348841](_0x578516), _0x578516._found_ = true); }; return _0x58adb3.map(_0x1bbc17, function(_0x22d50b) { _0x16647e = _0x91a6ff.getIdentifier(_0x22d50b), _0x58adb3.map(_0x91a6ff.collections, _0xcd5113.bind(null, _0x22d50b, _0x16647e)), _0x22d50b._found_ || _0x91a6ff.removeIdentifier(_0x16647e); }), !0x1; }, _0x239176.prototype.destroy = function() { var _0x3fa093 = this; _0x3fa093.unbindDocument(true), _0x3fa093.ids = {}, _0x3fa093.index = 0x0, _0x3fa093.collections.forEach(function(_0x2b7da3) { _0x2b7da3.destroy(); }), _0x3fa093.off(); }, _0x239176.prototype.onDestroyed = function(_0x31c290, _0x2339d4) { var _0x16647e = this; if (_0x16647e.collections.indexOf(_0x2339d4) < 0x0) return !0x1; _0x16647e.collections.splice(_0x16647e.collections.indexOf(_0x2339d4), 0x1); }; var _0x5c2a4b = new _0x239176(); return { 'create': function(_0x19c0dc) { return _0x5c2a4b.create(_0x19c0dc); }, 'factory': _0x5c2a4b }; }); }, null, window.EJS_main]).default;