shadow$provide.module$node_modules$eventemitter3$index = function(global, require, module, exports) {
  function Events() {
  }
  function EE(fn, context, once) {
    this.fn = fn;
    this.context = context;
    this.once = once || !1;
  }
  function addListener(emitter, event, fn, context, once) {
    if ("function" !== typeof fn) {
      throw new TypeError("The listener must be a function");
    }
    fn = new EE(fn, context || emitter, once);
    event = prefix ? prefix + event : event;
    emitter._events[event] ? emitter._events[event].fn ? emitter._events[event] = [emitter._events[event], fn] : emitter._events[event].push(fn) : (emitter._events[event] = fn, emitter._eventsCount++);
    return emitter;
  }
  function clearEvent(emitter, evt) {
    0 === --emitter._eventsCount ? emitter._events = new Events() : delete emitter._events[evt];
  }
  function EventEmitter() {
    this._events = new Events();
    this._eventsCount = 0;
  }
  var has = Object.prototype.hasOwnProperty, prefix = "~";
  Object.create && (Events.prototype = Object.create(null), (new Events()).__proto__ || (prefix = !1));
  EventEmitter.prototype.eventNames = function() {
    var names = [], events, name;
    if (0 === this._eventsCount) {
      return names;
    }
    for (name in events = this._events) {
      has.call(events, name) && names.push(prefix ? name.slice(1) : name);
    }
    return Object.getOwnPropertySymbols ? names.concat(Object.getOwnPropertySymbols(events)) : names;
  };
  EventEmitter.prototype.listeners = function(event) {
    event = this._events[prefix ? prefix + event : event];
    if (!event) {
      return [];
    }
    if (event.fn) {
      return [event.fn];
    }
    for (var i = 0, l = event.length, ee = Array(l); i < l; i++) {
      ee[i] = event[i].fn;
    }
    return ee;
  };
  EventEmitter.prototype.listenerCount = function(event) {
    return (event = this._events[prefix ? prefix + event : event]) ? event.fn ? 1 : event.length : 0;
  };
  EventEmitter.prototype.emit = function(event, a1, a2, a3, a4, a5) {
    var evt = prefix ? prefix + event : event;
    if (!this._events[evt]) {
      return !1;
    }
    evt = this._events[evt];
    var len = arguments.length, args;
    if (evt.fn) {
      evt.once && this.removeListener(event, evt.fn, void 0, !0);
      switch(len) {
        case 1:
          return evt.fn.call(evt.context), !0;
        case 2:
          return evt.fn.call(evt.context, a1), !0;
        case 3:
          return evt.fn.call(evt.context, a1, a2), !0;
        case 4:
          return evt.fn.call(evt.context, a1, a2, a3), !0;
        case 5:
          return evt.fn.call(evt.context, a1, a2, a3, a4), !0;
        case 6:
          return evt.fn.call(evt.context, a1, a2, a3, a4, a5), !0;
      }
      var i = 1;
      for (args = Array(len - 1); i < len; i++) {
        args[i - 1] = arguments[i];
      }
      evt.fn.apply(evt.context, args);
    } else {
      var length = evt.length;
      for (i = 0; i < length; i++) {
        switch(evt[i].once && this.removeListener(event, evt[i].fn, void 0, !0), len) {
          case 1:
            evt[i].fn.call(evt[i].context);
            break;
          case 2:
            evt[i].fn.call(evt[i].context, a1);
            break;
          case 3:
            evt[i].fn.call(evt[i].context, a1, a2);
            break;
          case 4:
            evt[i].fn.call(evt[i].context, a1, a2, a3);
            break;
          default:
            if (!args) {
              var j = 1;
              for (args = Array(len - 1); j < len; j++) {
                args[j - 1] = arguments[j];
              }
            }
            evt[i].fn.apply(evt[i].context, args);
        }
      }
    }
    return !0;
  };
  EventEmitter.prototype.on = function(event, fn, context) {
    return addListener(this, event, fn, context, !1);
  };
  EventEmitter.prototype.once = function(event, fn, context) {
    return addListener(this, event, fn, context, !0);
  };
  EventEmitter.prototype.removeListener = function(event, fn, context, once) {
    event = prefix ? prefix + event : event;
    if (!this._events[event]) {
      return this;
    }
    if (!fn) {
      return clearEvent(this, event), this;
    }
    var listeners = this._events[event];
    if (listeners.fn) {
      listeners.fn !== fn || once && !listeners.once || context && listeners.context !== context || clearEvent(this, event);
    } else {
      for (var i = 0, events = [], length = listeners.length; i < length; i++) {
        (listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) && events.push(listeners[i]);
      }
      events.length ? this._events[event] = 1 === events.length ? events[0] : events : clearEvent(this, event);
    }
    return this;
  };
  EventEmitter.prototype.removeAllListeners = function(event) {
    event ? (event = prefix ? prefix + event : event, this._events[event] && clearEvent(this, event)) : (this._events = new Events(), this._eventsCount = 0);
    return this;
  };
  EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
  EventEmitter.prototype.addListener = EventEmitter.prototype.on;
  EventEmitter.prefixed = prefix;
  EventEmitter.EventEmitter = EventEmitter;
  "undefined" !== typeof module && (module.exports = EventEmitter);
};

//# sourceMappingURL=module$node_modules$eventemitter3$index.js.map
