this.eventespresso=this.eventespresso||{},this.eventespresso.events=function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="/",e(e.s=1542)}({1542:function(t,n,e){t.exports=e(1706)},1706:function(t,n,e){"use strict";e.r(n),e.d(n,"EventEmitter",(function(){return a}));var r=function(){function t(t,n){this.emitter=t,this.handler=n}return t.prototype.getHandler=function(){return this.handler},t}(),o=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(n,e)};return function(n,e){function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),i=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.run=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];this.handler.apply(null,n)},n}(r),u=function(){var t=function(n,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(n,e)};return function(n,e){function r(){this.constructor=n}t(n,e),n.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}}(),f=function(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var r=Array(t),o=0;for(n=0;n<e;n++)for(var i=arguments[n],u=0,f=i.length;u<f;u++,o++)r[o]=i[u];return r},s=function(t){function n(n,e,r){void 0===r&&(r=1);var o=t.call(this,n,e)||this;if(o.total=r,o.i=0,o.total<1)throw new Error("{total} can not be less than 1");return o}return u(n,t),n.prototype.run=function(n){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];t.prototype.run.apply(this,f([n],e)),++this.i>=this.total&&this.emitter.off(n,this.handler)},n}(i),c=function(){for(var t=0,n=0,e=arguments.length;n<e;n++)t+=arguments[n].length;var r=Array(t),o=0;for(n=0;n<e;n++)for(var i=arguments[n],u=0,f=i.length;u<f;u++,o++)r[o]=i[u];return r},a=function(){function t(){this._events=Object.create(null)}return t.prototype.on=function(t,n){this._addEventListener(t,new i(this,n))},t.prototype.once=function(t,n){this._addEventListener(t,new s(this,n,1))},t.prototype.off=function(t,n){var e=this._events[t];(null===e||void 0===e?void 0:e.length)&&(this._events[t]=e.filter((function(t){return t.getHandler()!==n})))},t.prototype.offByName=function(t){var n=this._events[t];void 0!==n&&(n.length=0,delete this._events[t])},t.prototype.offAll=function(){var t=this;Object.keys(this._events).forEach((function(n){var e=t._events[n];e&&(e.length=0)})),this._events=Object.create(null)},t.prototype.emit=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];var r=this._events[t];r&&r.forEach((function(e){return e.run.apply(e,c([t],n))}))},t.prototype.has=function(t,n){var e=this._events[t];if(!e)return!1;for(var r=0;r<e.length;r++)if(e[r].getHandler()===n)return!0;return!1},t.prototype._addEventListener=function(t,n){var e=this._events[t];Array.isArray(e)?e.push(n):this._events[t]=[n]},t}()}});
//# sourceMappingURL=events.21408177.js.map